@feedmepos/mf-connect 0.1.0-beta.35 → 0.1.0-beta.36

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 (84) hide show
  1. package/dist/{Analytic-BMdB7x5F.js → Analytic-BQQMo8gn.js} +18 -17
  2. package/dist/{App-AakWqQHx.js → App-XbDR-3id.js} +6 -6
  3. package/dist/{Broadcast-Bf5GOV7p.js → Broadcast-BV0fALHZ.js} +8 -8
  4. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BBTBapxi.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Cmq6EQxz.js} +6 -7
  5. package/dist/{Card-DmxekNts.js → Card-ni0g9f0W.js} +16 -17
  6. package/dist/{Collections-CL7hOycU.js → Collections-CzqFRaQq.js} +4 -4
  7. package/dist/{Credit-0eGxacBN.js → Credit-BhaiYIIH.js} +8 -8
  8. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-BLWeJ73S.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-ByIKDwhp.js} +27 -27
  9. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-q7qJ9Ec5.js → EffectSheet.vue_vue_type_style_index_0_lang-CCPGbV9-.js} +6 -6
  10. package/dist/{Experience-NjmDx3_p.js → Experience-l24HNuYa.js} +8 -8
  11. package/dist/{Game-q19qmf8t.js → Game-CYR3nNcT.js} +8 -8
  12. package/dist/{Index-BmzHphDm.js → Index-BYC9ThLe.js} +9 -9
  13. package/dist/{Marketing-BgL2CqkH.js → Marketing-C_oZtbqT.js} +5 -5
  14. package/dist/{Member-DXO7yer0.js → Member-DxAoZFfz.js} +4 -4
  15. package/dist/MemberList-CyHaxFqq.js +1538 -0
  16. package/dist/MemberTransactions-Ce1N88OQ.js +45 -0
  17. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DFiCQcTe.js → MessageInput.vue_vue_type_script_setup_true_lang-CwF3Vok8.js} +2 -2
  18. package/dist/{Mission-DOdkoytR.js → Mission-DdgpqYWl.js} +8 -8
  19. package/dist/{Overview-Bizp0BGu.js → Overview-DVcotUZ5.js} +18 -19
  20. package/dist/{Point-Bvyg1zuh.js → Point-B56BrM7H.js} +8 -8
  21. package/dist/{Promotion-B75LcnHm.js → Promotion-4yL1H9g5.js} +9 -9
  22. package/dist/{Record-BjAbPbiI.js → Record-DZ2SbNCg.js} +5 -5
  23. package/dist/{Reward-l1gt8pwu.js → Reward-DX5V3RGG.js} +14 -14
  24. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-C76emk8A.js → RewardGroup.vue_vue_type_script_setup_true_lang-D9UFAixa.js} +12 -13
  25. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-B4ak1Gem.js → RuleGroup.vue_vue_type_script_setup_true_lang-4tF-6JVC.js} +14 -15
  26. package/dist/{Segment-DJSkWWH8.js → Segment-DKpM-dlV.js} +68 -68
  27. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-ByqgSxPo.js → SelectItems.vue_vue_type_script_setup_true_lang-4Co06qsp.js} +2 -2
  28. package/dist/{Setting-DTV24iE5.js → Setting-CbV6piRR.js} +8 -8
  29. package/dist/{Store-C1obQwdr.js → Store-BIMMzBEA.js} +19 -20
  30. package/dist/{StoreRewards-apMVv0Ca.js → StoreRewards-Tr8TXAWt.js} +12 -12
  31. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DBzA_4gb.js → StoreTransactions.vue_vue_type_script_setup_true_lang-wPxHMj1_.js} +330 -363
  32. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-PxZ5Au5X.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CaRE8E-o.js} +1 -1
  33. package/dist/{Tier-DSvMUZJG.js → Tier-BN3HKQpg.js} +20 -21
  34. package/dist/{Title-CWoqOkd2.js → Title-DhDuDHSD.js} +20 -21
  35. package/dist/{Transaction-CaCsXoB5.js → Transaction-Tz3ewMZm.js} +2 -2
  36. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-DaT8PyWl.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-w5Cq6L8_.js} +6 -6
  37. package/dist/{Voucher-BBtDXr9q.js → Voucher-CdEDGQkq.js} +11 -11
  38. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BCSO2-oB.js → VoucherEditor.vue_vue_type_script_setup_true_lang-CajIUE-r.js} +10 -10
  39. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BTm3pDid.js → ZodTextField.vue_vue_type_script_setup_true_lang-CFCVdVWx.js} +1 -1
  40. package/dist/{app-D8kcy7_R.js → app-Cx8AYCg_.js} +1 -1
  41. package/dist/{app-B8JBXu5M.js → app-oW33KZ3o.js} +28 -28
  42. package/dist/app.js +1 -1
  43. package/dist/{business-DN4-BTel.js → business-DjK1cD6M.js} +1 -1
  44. package/dist/{dto-D94IgAXy.js → campaign-D4CDaSod.js} +610 -818
  45. package/dist/{campaign-Cf6jJz3e.js → campaign-DBISpYyM.js} +2 -2
  46. package/dist/{campaign.enum-DVOwgVTa.js → campaign.enum-BB6zKvqL.js} +1 -1
  47. package/dist/{campaign.fn-D8apF_YE.js → campaign.fn-BBuN-vxE.js} +30 -30
  48. package/dist/{collectible.enum-DPsEC03C.js → collectible.enum-BkzPmWP5.js} +1 -1
  49. package/dist/{collection.fn-CzeGWVx2.js → collection.fn--9IoH5C8.js} +2 -2
  50. package/dist/dto-Cf4bZ2Ha.js +214 -0
  51. package/dist/{effect-CDg44P_g.js → effect-BpSxSe0d.js} +1 -1
  52. package/dist/{email-addresses-CDozpvzz.js → email-addresses-wHQnOKcN.js} +1 -1
  53. package/dist/{export-DQLXrn4F.js → export-pg40fbOp.js} +3 -3
  54. package/dist/{helper-DJMf--V-.js → helper-vuZmD3vd.js} +1 -1
  55. package/dist/{index-Df84_Ww3.js → index-BbhmmxBp.js} +2057 -1010
  56. package/dist/{index-DrvefOT4.js → index-BjcUav4X.js} +3 -3
  57. package/dist/{index-BbPavTej.js → index-Bl60bODV.js} +3 -3
  58. package/dist/{index-BgXfVzZF.js → index-CCRD2tgv.js} +12 -13
  59. package/dist/{index-B0n_PU3b.js → index-D6knHtFJ.js} +1 -1
  60. package/dist/{index-BnbkejyF.js → index-D8CIHJ0z.js} +1 -1
  61. package/dist/{index-V6yWwXYr.js → index-DInxnKvr.js} +22 -4
  62. package/dist/index-K7WU4vc1.js +44 -0
  63. package/dist/{index-BUZR5Bkw.js → index-UNh4BJAd.js} +1 -1
  64. package/dist/{index-DvE5xL4s.js → index-VjvyNKmR.js} +6 -6
  65. package/dist/{index-CVV5I3bh.js → index-t-NFK-AQ.js} +1 -1
  66. package/dist/{index-BmblCnlD.js → index-tWez6zPm.js} +1 -1
  67. package/dist/{index.esm2017-C90-ettH.js → index.esm2017-Djt10vTu.js} +1 -1
  68. package/dist/{loading-B56wz_ef.js → loading-CVE2HNjb.js} +4 -4
  69. package/dist/{membership-CF1jgR11.js → membership-BLkSVFx9.js} +3 -3
  70. package/dist/{money-BEEp2WdU.js → money-DqUkifCn.js} +1 -1
  71. package/dist/{number-u7HbwLPt.js → number-BPlOwScu.js} +1 -1
  72. package/dist/{objectid-S3_nH1F7.js → objectid-J3u1WeUz.js} +7 -7
  73. package/dist/{reward-BUY77BiP.js → reward-B9WzNBWQ.js} +1 -1
  74. package/dist/{rule-BdAPBN8_.js → rule-FtBYuezP.js} +3 -3
  75. package/dist/{rule-builder-z51VUtHk.js → rule-builder-caiYx8mw.js} +1 -1
  76. package/dist/{template-B_J4Q9D6.js → template-C1Iii37r.js} +4 -4
  77. package/dist/{trigger-CGrv0M0q.js → trigger-DEH6eTbm.js} +6 -6
  78. package/dist/{user-D02jOhtd.js → user-DqSmwkKW.js} +1 -1
  79. package/dist/{vue-i18n-rCSjqg2P.js → vue-i18n-4lC91qO3.js} +294 -294
  80. package/dist/{xlsx-CL102mzm.js → xlsx-DNspY5sG.js} +1 -1
  81. package/package.json +1 -1
  82. package/dist/MemberList-WGMopz-y.js +0 -1044
  83. package/dist/MemberTransactions-DmQgrLdy.js +0 -38
  84. package/dist/index-DFbITElv.js +0 -1052
@@ -1,74 +1,73 @@
1
- import { h as V } from "./moment-BWErdI6_.js";
2
- import { g as Ae, a as k, h as Ve } from "./index-DFbITElv.js";
3
- import { e as X } from "./effect-CDg44P_g.js";
4
- import { components as le } from "@feedmepos/ui-library";
5
- import { i as ge, R as ue } from "./rule-builder-z51VUtHk.js";
6
- import { c as Me } from "./rule-BdAPBN8_.js";
7
- import { u as _e } from "./business-DN4-BTel.js";
8
- import { C as A } from "./campaign.fn-D8apF_YE.js";
9
- import { c as ve, F as w, z as b } from "./loading-B56wz_ef.js";
10
- import { e as Ue, Z as S, a as ye, i as De, z as Ke } from "./app-B8JBXu5M.js";
11
- import { createFeedMeI18n as He, detectLocale as he } from "@feedmepos/mf-common";
12
- import { h as Y } from "vue";
13
- import { F as $ } from "./campaign.enum-DVOwgVTa.js";
14
- import { F as re } from "./index-DvE5xL4s.js";
15
- const d = (r) => typeof r == "string", W = () => {
16
- let r, e;
1
+ import { h as F } from "./moment-BWErdI6_.js";
2
+ import "./index-BbhmmxBp.js";
3
+ import { e as G } from "./effect-BpSxSe0d.js";
4
+ import { components as ie } from "@feedmepos/ui-library";
5
+ import { i as Ne } from "./rule-builder-caiYx8mw.js";
6
+ import { c as Ee } from "./rule-FtBYuezP.js";
7
+ import { u as Ve } from "./business-DjK1cD6M.js";
8
+ import { C as j } from "./campaign.fn-BBuN-vxE.js";
9
+ import { c as ce } from "./loading-CVE2HNjb.js";
10
+ import { e as je, Z as S, a as fe, i as Re, z as Fe } from "./app-oW33KZ3o.js";
11
+ import { createFeedMeI18n as Ie, detectLocale as ae } from "@feedmepos/mf-common";
12
+ import { h as B } from "vue";
13
+ import { F as R } from "./campaign.enum-BB6zKvqL.js";
14
+ const d = (a) => typeof a == "string", _ = () => {
15
+ let a, e;
17
16
  const t = new Promise((s, i) => {
18
- r = s, e = i;
17
+ a = s, e = i;
19
18
  });
20
- return t.resolve = r, t.reject = e, t;
21
- }, xe = (r) => r == null ? "" : "" + r, ze = (r, e, t) => {
22
- r.forEach((s) => {
19
+ return t.resolve = a, t.reject = e, t;
20
+ }, he = (a) => a == null ? "" : "" + a, De = (a, e, t) => {
21
+ a.forEach((s) => {
23
22
  e[s] && (t[s] = e[s]);
24
23
  });
25
- }, Be = /###/g, be = (r) => r && r.indexOf("###") > -1 ? r.replace(Be, ".") : r, Oe = (r) => !r || d(r), G = (r, e, t) => {
24
+ }, Te = /###/g, ge = (a) => a && a.indexOf("###") > -1 ? a.replace(Te, ".") : a, de = (a) => !a || d(a), z = (a, e, t) => {
26
25
  const s = d(e) ? e.split(".") : e;
27
26
  let i = 0;
28
27
  for (; i < s.length - 1; ) {
29
- if (Oe(r)) return {};
30
- const n = be(s[i]);
31
- !r[n] && t && (r[n] = new t()), Object.prototype.hasOwnProperty.call(r, n) ? r = r[n] : r = {}, ++i;
28
+ if (de(a)) return {};
29
+ const r = ge(s[i]);
30
+ !a[r] && t && (a[r] = new t()), Object.prototype.hasOwnProperty.call(a, r) ? a = a[r] : a = {}, ++i;
32
31
  }
33
- return Oe(r) ? {} : {
34
- obj: r,
35
- k: be(s[i])
32
+ return de(a) ? {} : {
33
+ obj: a,
34
+ k: ge(s[i])
36
35
  };
37
- }, Se = (r, e, t) => {
36
+ }, pe = (a, e, t) => {
38
37
  const {
39
38
  obj: s,
40
39
  k: i
41
- } = G(r, e, Object);
40
+ } = z(a, e, Object);
42
41
  if (s !== void 0 || e.length === 1) {
43
42
  s[i] = t;
44
43
  return;
45
44
  }
46
- let n = e[e.length - 1], a = e.slice(0, e.length - 1), o = G(r, a, Object);
47
- for (; o.obj === void 0 && a.length; )
48
- n = `${a[a.length - 1]}.${n}`, a = a.slice(0, a.length - 1), o = G(r, a, Object), o != null && o.obj && typeof o.obj[`${o.k}.${n}`] < "u" && (o.obj = void 0);
49
- o.obj[`${o.k}.${n}`] = t;
50
- }, Je = (r, e, t, s) => {
45
+ let r = e[e.length - 1], n = e.slice(0, e.length - 1), o = z(a, n, Object);
46
+ for (; o.obj === void 0 && n.length; )
47
+ r = `${n[n.length - 1]}.${r}`, n = n.slice(0, n.length - 1), o = z(a, n, Object), o != null && o.obj && typeof o.obj[`${o.k}.${r}`] < "u" && (o.obj = void 0);
48
+ o.obj[`${o.k}.${r}`] = t;
49
+ }, Ae = (a, e, t, s) => {
51
50
  const {
52
51
  obj: i,
53
- k: n
54
- } = G(r, e, Object);
55
- i[n] = i[n] || [], i[n].push(t);
56
- }, ee = (r, e) => {
52
+ k: r
53
+ } = z(a, e, Object);
54
+ i[r] = i[r] || [], i[r].push(t);
55
+ }, Z = (a, e) => {
57
56
  const {
58
57
  obj: t,
59
58
  k: s
60
- } = G(r, e);
59
+ } = z(a, e);
61
60
  if (t && Object.prototype.hasOwnProperty.call(t, s))
62
61
  return t[s];
63
- }, We = (r, e, t) => {
64
- const s = ee(r, t);
65
- return s !== void 0 ? s : ee(e, t);
66
- }, Fe = (r, e, t) => {
62
+ }, Me = (a, e, t) => {
63
+ const s = Z(a, t);
64
+ return s !== void 0 ? s : Z(e, t);
65
+ }, $e = (a, e, t) => {
67
66
  for (const s in e)
68
- s !== "__proto__" && s !== "constructor" && (s in r ? d(r[s]) || r[s] instanceof String || d(e[s]) || e[s] instanceof String ? t && (r[s] = e[s]) : Fe(r[s], e[s], t) : r[s] = e[s]);
69
- return r;
70
- }, U = (r) => r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
71
- var Ye = {
67
+ s !== "__proto__" && s !== "constructor" && (s in a ? d(a[s]) || a[s] instanceof String || d(e[s]) || e[s] instanceof String ? t && (a[s] = e[s]) : $e(a[s], e[s], t) : a[s] = e[s]);
68
+ return a;
69
+ }, T = (a) => a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
70
+ var Ke = {
72
71
  "&": "&amp;",
73
72
  "<": "&lt;",
74
73
  ">": "&gt;",
@@ -76,8 +75,8 @@ var Ye = {
76
75
  "'": "&#39;",
77
76
  "/": "&#x2F;"
78
77
  };
79
- const Ge = (r) => d(r) ? r.replace(/[&<>"'\/]/g, (e) => Ye[e]) : r;
80
- class Ze {
78
+ const Ue = (a) => d(a) ? a.replace(/[&<>"'\/]/g, (e) => Ke[e]) : a;
79
+ class He {
81
80
  constructor(e) {
82
81
  this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
83
82
  }
@@ -89,62 +88,62 @@ class Ze {
89
88
  return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e, s), this.regExpQueue.push(e), s;
90
89
  }
91
90
  }
92
- const qe = [" ", ",", "?", "!", ";"], Qe = new Ze(20), Xe = (r, e, t) => {
91
+ const _e = [" ", ",", "?", "!", ";"], Be = new He(20), ze = (a, e, t) => {
93
92
  e = e || "", t = t || "";
94
- const s = qe.filter((a) => e.indexOf(a) < 0 && t.indexOf(a) < 0);
93
+ const s = _e.filter((n) => e.indexOf(n) < 0 && t.indexOf(n) < 0);
95
94
  if (s.length === 0) return !0;
96
- const i = Qe.getRegExp(`(${s.map((a) => a === "?" ? "\\?" : a).join("|")})`);
97
- let n = !i.test(r);
98
- if (!n) {
99
- const a = r.indexOf(t);
100
- a > 0 && !i.test(r.substring(0, a)) && (n = !0);
101
- }
102
- return n;
103
- }, ce = function(r, e) {
95
+ const i = Be.getRegExp(`(${s.map((n) => n === "?" ? "\\?" : n).join("|")})`);
96
+ let r = !i.test(a);
97
+ if (!r) {
98
+ const n = a.indexOf(t);
99
+ n > 0 && !i.test(a.substring(0, n)) && (r = !0);
100
+ }
101
+ return r;
102
+ }, re = function(a, e) {
104
103
  let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ".";
105
- if (!r) return;
106
- if (r[e])
107
- return Object.prototype.hasOwnProperty.call(r, e) ? r[e] : void 0;
104
+ if (!a) return;
105
+ if (a[e])
106
+ return Object.prototype.hasOwnProperty.call(a, e) ? a[e] : void 0;
108
107
  const s = e.split(t);
109
- let i = r;
110
- for (let n = 0; n < s.length; ) {
108
+ let i = a;
109
+ for (let r = 0; r < s.length; ) {
111
110
  if (!i || typeof i != "object")
112
111
  return;
113
- let a, o = "";
114
- for (let l = n; l < s.length; ++l)
115
- if (l !== n && (o += t), o += s[l], a = i[o], a !== void 0) {
116
- if (["string", "number", "boolean"].indexOf(typeof a) > -1 && l < s.length - 1)
112
+ let n, o = "";
113
+ for (let l = r; l < s.length; ++l)
114
+ if (l !== r && (o += t), o += s[l], n = i[o], n !== void 0) {
115
+ if (["string", "number", "boolean"].indexOf(typeof n) > -1 && l < s.length - 1)
117
116
  continue;
118
- n += l - n + 1;
117
+ r += l - r + 1;
119
118
  break;
120
119
  }
121
- i = a;
120
+ i = n;
122
121
  }
123
122
  return i;
124
- }, te = (r) => r == null ? void 0 : r.replace("_", "-"), et = {
123
+ }, Q = (a) => a == null ? void 0 : a.replace("_", "-"), Je = {
125
124
  type: "logger",
126
- log(r) {
127
- this.output("log", r);
125
+ log(a) {
126
+ this.output("log", a);
128
127
  },
129
- warn(r) {
130
- this.output("warn", r);
128
+ warn(a) {
129
+ this.output("warn", a);
131
130
  },
132
- error(r) {
133
- this.output("error", r);
131
+ error(a) {
132
+ this.output("error", a);
134
133
  },
135
- output(r, e) {
134
+ output(a, e) {
136
135
  var t, s;
137
- (s = (t = console == null ? void 0 : console[r]) == null ? void 0 : t.apply) == null || s.call(t, console, e);
136
+ (s = (t = console == null ? void 0 : console[a]) == null ? void 0 : t.apply) == null || s.call(t, console, e);
138
137
  }
139
138
  };
140
- class se {
139
+ class X {
141
140
  constructor(e) {
142
141
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
143
142
  this.init(e, t);
144
143
  }
145
144
  init(e) {
146
145
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
147
- this.prefix = t.prefix || "i18next:", this.logger = e || et, this.options = t, this.debug = t.debug;
146
+ this.prefix = t.prefix || "i18next:", this.logger = e || Je, this.options = t, this.debug = t.debug;
148
147
  }
149
148
  log() {
150
149
  for (var e = arguments.length, t = new Array(e), s = 0; s < e; s++)
@@ -170,17 +169,17 @@ class se {
170
169
  return i && !this.debug ? null : (d(e[0]) && (e[0] = `${s}${this.prefix} ${e[0]}`), this.logger[t](e));
171
170
  }
172
171
  create(e) {
173
- return new se(this.logger, {
172
+ return new X(this.logger, {
174
173
  prefix: `${this.prefix}:${e}:`,
175
174
  ...this.options
176
175
  });
177
176
  }
178
177
  clone(e) {
179
- return e = e || this.options, e.prefix = e.prefix || this.prefix, new se(this.logger, e);
178
+ return e = e || this.options, e.prefix = e.prefix || this.prefix, new X(this.logger, e);
180
179
  }
181
180
  }
182
- var E = new se();
183
- class ne {
181
+ var P = new X();
182
+ class ee {
184
183
  constructor() {
185
184
  this.observers = {};
186
185
  }
@@ -203,18 +202,18 @@ class ne {
203
202
  emit(e) {
204
203
  for (var t = arguments.length, s = new Array(t > 1 ? t - 1 : 0), i = 1; i < t; i++)
205
204
  s[i - 1] = arguments[i];
206
- this.observers[e] && Array.from(this.observers[e].entries()).forEach((a) => {
207
- let [o, l] = a;
205
+ this.observers[e] && Array.from(this.observers[e].entries()).forEach((n) => {
206
+ let [o, l] = n;
208
207
  for (let u = 0; u < l; u++)
209
208
  o(...s);
210
- }), this.observers["*"] && Array.from(this.observers["*"].entries()).forEach((a) => {
211
- let [o, l] = a;
209
+ }), this.observers["*"] && Array.from(this.observers["*"].entries()).forEach((n) => {
210
+ let [o, l] = n;
212
211
  for (let u = 0; u < l; u++)
213
212
  o.apply(o, [e, ...s]);
214
213
  });
215
214
  }
216
215
  }
217
- class Ce extends ne {
216
+ class me extends ee {
218
217
  constructor(e) {
219
218
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
220
219
  ns: ["translation"],
@@ -232,41 +231,41 @@ class Ce extends ne {
232
231
  getResource(e, t, s) {
233
232
  var u, f;
234
233
  let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
235
- const n = i.keySeparator !== void 0 ? i.keySeparator : this.options.keySeparator, a = i.ignoreJSONStructure !== void 0 ? i.ignoreJSONStructure : this.options.ignoreJSONStructure;
234
+ const r = i.keySeparator !== void 0 ? i.keySeparator : this.options.keySeparator, n = i.ignoreJSONStructure !== void 0 ? i.ignoreJSONStructure : this.options.ignoreJSONStructure;
236
235
  let o;
237
- e.indexOf(".") > -1 ? o = e.split(".") : (o = [e, t], s && (Array.isArray(s) ? o.push(...s) : d(s) && n ? o.push(...s.split(n)) : o.push(s)));
238
- const l = ee(this.data, o);
239
- return !l && !t && !s && e.indexOf(".") > -1 && (e = o[0], t = o[1], s = o.slice(2).join(".")), l || !a || !d(s) ? l : ce((f = (u = this.data) == null ? void 0 : u[e]) == null ? void 0 : f[t], s, n);
236
+ e.indexOf(".") > -1 ? o = e.split(".") : (o = [e, t], s && (Array.isArray(s) ? o.push(...s) : d(s) && r ? o.push(...s.split(r)) : o.push(s)));
237
+ const l = Z(this.data, o);
238
+ return !l && !t && !s && e.indexOf(".") > -1 && (e = o[0], t = o[1], s = o.slice(2).join(".")), l || !n || !d(s) ? l : re((f = (u = this.data) == null ? void 0 : u[e]) == null ? void 0 : f[t], s, r);
240
239
  }
241
240
  addResource(e, t, s, i) {
242
- let n = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
241
+ let r = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
243
242
  silent: !1
244
243
  };
245
- const a = n.keySeparator !== void 0 ? n.keySeparator : this.options.keySeparator;
244
+ const n = r.keySeparator !== void 0 ? r.keySeparator : this.options.keySeparator;
246
245
  let o = [e, t];
247
- s && (o = o.concat(a ? s.split(a) : s)), e.indexOf(".") > -1 && (o = e.split("."), i = t, t = o[1]), this.addNamespaces(t), Se(this.data, o, i), n.silent || this.emit("added", e, t, s, i);
246
+ s && (o = o.concat(n ? s.split(n) : s)), e.indexOf(".") > -1 && (o = e.split("."), i = t, t = o[1]), this.addNamespaces(t), pe(this.data, o, i), r.silent || this.emit("added", e, t, s, i);
248
247
  }
249
248
  addResources(e, t, s) {
250
249
  let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {
251
250
  silent: !1
252
251
  };
253
- for (const n in s)
254
- (d(s[n]) || Array.isArray(s[n])) && this.addResource(e, t, n, s[n], {
252
+ for (const r in s)
253
+ (d(s[r]) || Array.isArray(s[r])) && this.addResource(e, t, r, s[r], {
255
254
  silent: !0
256
255
  });
257
256
  i.silent || this.emit("added", e, t, s);
258
257
  }
259
- addResourceBundle(e, t, s, i, n) {
260
- let a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {
258
+ addResourceBundle(e, t, s, i, r) {
259
+ let n = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {
261
260
  silent: !1,
262
261
  skipCopy: !1
263
262
  }, o = [e, t];
264
263
  e.indexOf(".") > -1 && (o = e.split("."), i = s, s = t, t = o[1]), this.addNamespaces(t);
265
- let l = ee(this.data, o) || {};
266
- a.skipCopy || (s = JSON.parse(JSON.stringify(s))), i ? Fe(l, s, n) : l = {
264
+ let l = Z(this.data, o) || {};
265
+ n.skipCopy || (s = JSON.parse(JSON.stringify(s))), i ? $e(l, s, r) : l = {
267
266
  ...l,
268
267
  ...s
269
- }, Se(this.data, o, l), a.silent || this.emit("added", e, t, s);
268
+ }, pe(this.data, o, l), n.silent || this.emit("added", e, t, s);
270
269
  }
271
270
  removeResourceBundle(e, t) {
272
271
  this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t);
@@ -288,23 +287,23 @@ class Ce extends ne {
288
287
  return this.data;
289
288
  }
290
289
  }
291
- var je = {
290
+ var Pe = {
292
291
  processors: {},
293
- addPostProcessor(r) {
294
- this.processors[r.name] = r;
292
+ addPostProcessor(a) {
293
+ this.processors[a.name] = a;
295
294
  },
296
- handle(r, e, t, s, i) {
297
- return r.forEach((n) => {
298
- var a;
299
- e = ((a = this.processors[n]) == null ? void 0 : a.process(e, t, s, i)) ?? e;
295
+ handle(a, e, t, s, i) {
296
+ return a.forEach((r) => {
297
+ var n;
298
+ e = ((n = this.processors[r]) == null ? void 0 : n.process(e, t, s, i)) ?? e;
300
299
  }), e;
301
300
  }
302
301
  };
303
- const Le = {};
304
- class ie extends ne {
302
+ const ve = {};
303
+ class q extends ee {
305
304
  constructor(e) {
306
305
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
307
- super(), ze(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = E.create("translator");
306
+ super(), De(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = P.create("translator");
308
307
  }
309
308
  changeLanguage(e) {
310
309
  e && (this.language = e);
@@ -322,21 +321,21 @@ class ie extends ne {
322
321
  let s = t.nsSeparator !== void 0 ? t.nsSeparator : this.options.nsSeparator;
323
322
  s === void 0 && (s = ":");
324
323
  const i = t.keySeparator !== void 0 ? t.keySeparator : this.options.keySeparator;
325
- let n = t.ns || this.options.defaultNS || [];
326
- const a = s && e.indexOf(s) > -1, o = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !Xe(e, s, i);
327
- if (a && !o) {
324
+ let r = t.ns || this.options.defaultNS || [];
325
+ const n = s && e.indexOf(s) > -1, o = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !ze(e, s, i);
326
+ if (n && !o) {
328
327
  const l = e.match(this.interpolator.nestingRegexp);
329
328
  if (l && l.length > 0)
330
329
  return {
331
330
  key: e,
332
- namespaces: d(n) ? [n] : n
331
+ namespaces: d(r) ? [r] : r
333
332
  };
334
333
  const u = e.split(s);
335
- (s !== i || s === i && this.options.ns.indexOf(u[0]) > -1) && (n = u.shift()), e = u.join(i);
334
+ (s !== i || s === i && this.options.ns.indexOf(u[0]) > -1) && (r = u.shift()), e = u.join(i);
336
335
  }
337
336
  return {
338
337
  key: e,
339
- namespaces: d(n) ? [n] : n
338
+ namespaces: d(r) ? [r] : r
340
339
  };
341
340
  }
342
341
  translate(e, t, s) {
@@ -344,98 +343,98 @@ class ie extends ne {
344
343
  ...t
345
344
  }), t || (t = {}), e == null) return "";
346
345
  Array.isArray(e) || (e = [String(e)]);
347
- const i = t.returnDetails !== void 0 ? t.returnDetails : this.options.returnDetails, n = t.keySeparator !== void 0 ? t.keySeparator : this.options.keySeparator, {
348
- key: a,
346
+ const i = t.returnDetails !== void 0 ? t.returnDetails : this.options.returnDetails, r = t.keySeparator !== void 0 ? t.keySeparator : this.options.keySeparator, {
347
+ key: n,
349
348
  namespaces: o
350
349
  } = this.extractFromKey(e[e.length - 1], t), l = o[o.length - 1], u = t.lng || this.language, f = t.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
351
350
  if ((u == null ? void 0 : u.toLowerCase()) === "cimode") {
352
351
  if (f) {
353
352
  const y = t.nsSeparator || this.options.nsSeparator;
354
353
  return i ? {
355
- res: `${l}${y}${a}`,
356
- usedKey: a,
357
- exactUsedKey: a,
354
+ res: `${l}${y}${n}`,
355
+ usedKey: n,
356
+ exactUsedKey: n,
358
357
  usedLng: u,
359
358
  usedNS: l,
360
359
  usedParams: this.getUsedParamsDetails(t)
361
- } : `${l}${y}${a}`;
360
+ } : `${l}${y}${n}`;
362
361
  }
363
362
  return i ? {
364
- res: a,
365
- usedKey: a,
366
- exactUsedKey: a,
363
+ res: n,
364
+ usedKey: n,
365
+ exactUsedKey: n,
367
366
  usedLng: u,
368
367
  usedNS: l,
369
368
  usedParams: this.getUsedParamsDetails(t)
370
- } : a;
369
+ } : n;
371
370
  }
372
- const g = this.resolve(e, t);
373
- let c = g == null ? void 0 : g.res;
374
- const m = (g == null ? void 0 : g.usedKey) || a, h = (g == null ? void 0 : g.exactUsedKey) || a, p = Object.prototype.toString.apply(c), v = ["[object Number]", "[object Function]", "[object RegExp]"], L = t.joinArrays !== void 0 ? t.joinArrays : this.options.joinArrays, P = !this.i18nFormat || this.i18nFormat.handleAsObject, M = !d(c) && typeof c != "boolean" && typeof c != "number";
375
- if (P && c && M && v.indexOf(p) < 0 && !(d(L) && Array.isArray(c))) {
371
+ const h = this.resolve(e, t);
372
+ let c = h == null ? void 0 : h.res;
373
+ const m = (h == null ? void 0 : h.usedKey) || n, g = (h == null ? void 0 : h.exactUsedKey) || n, p = Object.prototype.toString.apply(c), v = ["[object Number]", "[object Function]", "[object RegExp]"], L = t.joinArrays !== void 0 ? t.joinArrays : this.options.joinArrays, w = !this.i18nFormat || this.i18nFormat.handleAsObject, I = !d(c) && typeof c != "boolean" && typeof c != "number";
374
+ if (w && c && I && v.indexOf(p) < 0 && !(d(L) && Array.isArray(c))) {
376
375
  if (!t.returnObjects && !this.options.returnObjects) {
377
376
  this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
378
377
  const y = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(m, c, {
379
378
  ...t,
380
379
  ns: o
381
- }) : `key '${a} (${this.language})' returned an object instead of string.`;
382
- return i ? (g.res = y, g.usedParams = this.getUsedParamsDetails(t), g) : y;
380
+ }) : `key '${n} (${this.language})' returned an object instead of string.`;
381
+ return i ? (h.res = y, h.usedParams = this.getUsedParamsDetails(t), h) : y;
383
382
  }
384
- if (n) {
385
- const y = Array.isArray(c), C = y ? [] : {}, I = y ? h : m;
383
+ if (r) {
384
+ const y = Array.isArray(c), O = y ? [] : {}, k = y ? g : m;
386
385
  for (const x in c)
387
386
  if (Object.prototype.hasOwnProperty.call(c, x)) {
388
- const F = `${I}${n}${x}`;
389
- C[x] = this.translate(F, {
387
+ const N = `${k}${r}${x}`;
388
+ O[x] = this.translate(N, {
390
389
  ...t,
391
390
  joinArrays: !1,
392
391
  ns: o
393
- }), C[x] === F && (C[x] = c[x]);
392
+ }), O[x] === N && (O[x] = c[x]);
394
393
  }
395
- c = C;
394
+ c = O;
396
395
  }
397
- } else if (P && d(L) && Array.isArray(c))
396
+ } else if (w && d(L) && Array.isArray(c))
398
397
  c = c.join(L), c && (c = this.extendTranslation(c, e, t, s));
399
398
  else {
400
- let y = !1, C = !1;
401
- const I = t.count !== void 0 && !d(t.count), x = ie.hasDefaultValue(t), F = I ? this.pluralResolver.getSuffix(u, t.count, t) : "", _ = t.ordinal && I ? this.pluralResolver.getSuffix(u, t.count, {
399
+ let y = !1, O = !1;
400
+ const k = t.count !== void 0 && !d(t.count), x = q.hasDefaultValue(t), N = k ? this.pluralResolver.getSuffix(u, t.count, t) : "", D = t.ordinal && k ? this.pluralResolver.getSuffix(u, t.count, {
402
401
  ordinal: !1
403
- }) : "", j = I && !t.ordinal && t.count === 0, H = j && t[`defaultValue${this.options.pluralSeparator}zero`] || t[`defaultValue${F}`] || t[`defaultValue${_}`] || t.defaultValue;
404
- !this.isValidLookup(c) && x && (y = !0, c = H), this.isValidLookup(c) || (C = !0, c = a);
405
- const Te = (t.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && C ? void 0 : c, z = x && H !== c && this.options.updateMissing;
406
- if (C || y || z) {
407
- if (this.logger.log(z ? "updateKey" : "missingKey", u, l, a, z ? H : c), n) {
408
- const R = this.resolve(a, {
402
+ }) : "", E = k && !t.ordinal && t.count === 0, M = E && t[`defaultValue${this.options.pluralSeparator}zero`] || t[`defaultValue${N}`] || t[`defaultValue${D}`] || t.defaultValue;
403
+ !this.isValidLookup(c) && x && (y = !0, c = M), this.isValidLookup(c) || (O = !0, c = n);
404
+ const ke = (t.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && O ? void 0 : c, K = x && M !== c && this.options.updateMissing;
405
+ if (O || y || K) {
406
+ if (this.logger.log(K ? "updateKey" : "missingKey", u, l, n, K ? M : c), r) {
407
+ const C = this.resolve(n, {
409
408
  ...t,
410
409
  keySeparator: !1
411
410
  });
412
- R && R.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.");
411
+ C && C.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.");
413
412
  }
414
- let B = [];
415
- const q = this.languageUtils.getFallbackCodes(this.options.fallbackLng, t.lng || this.language);
416
- if (this.options.saveMissingTo === "fallback" && q && q[0])
417
- for (let R = 0; R < q.length; R++)
418
- B.push(q[R]);
419
- else this.options.saveMissingTo === "all" ? B = this.languageUtils.toResolveHierarchy(t.lng || this.language) : B.push(t.lng || this.language);
420
- const de = (R, T, J) => {
421
- var me;
422
- const pe = x && J !== c ? J : Te;
423
- this.options.missingKeyHandler ? this.options.missingKeyHandler(R, l, T, pe, z, t) : (me = this.backendConnector) != null && me.saveMissing && this.backendConnector.saveMissing(R, l, T, pe, z, t), this.emit("missingKey", R, l, T, c);
413
+ let U = [];
414
+ const Y = this.languageUtils.getFallbackCodes(this.options.fallbackLng, t.lng || this.language);
415
+ if (this.options.saveMissingTo === "fallback" && Y && Y[0])
416
+ for (let C = 0; C < Y.length; C++)
417
+ U.push(Y[C]);
418
+ else this.options.saveMissingTo === "all" ? U = this.languageUtils.toResolveHierarchy(t.lng || this.language) : U.push(t.lng || this.language);
419
+ const oe = (C, V, H) => {
420
+ var ue;
421
+ const le = x && H !== c ? H : ke;
422
+ this.options.missingKeyHandler ? this.options.missingKeyHandler(C, l, V, le, K, t) : (ue = this.backendConnector) != null && ue.saveMissing && this.backendConnector.saveMissing(C, l, V, le, K, t), this.emit("missingKey", C, l, V, c);
424
423
  };
425
- this.options.saveMissing && (this.options.saveMissingPlurals && I ? B.forEach((R) => {
426
- const T = this.pluralResolver.getSuffixes(R, t);
427
- j && t[`defaultValue${this.options.pluralSeparator}zero`] && T.indexOf(`${this.options.pluralSeparator}zero`) < 0 && T.push(`${this.options.pluralSeparator}zero`), T.forEach((J) => {
428
- de([R], a + J, t[`defaultValue${J}`] || H);
424
+ this.options.saveMissing && (this.options.saveMissingPlurals && k ? U.forEach((C) => {
425
+ const V = this.pluralResolver.getSuffixes(C, t);
426
+ E && t[`defaultValue${this.options.pluralSeparator}zero`] && V.indexOf(`${this.options.pluralSeparator}zero`) < 0 && V.push(`${this.options.pluralSeparator}zero`), V.forEach((H) => {
427
+ oe([C], n + H, t[`defaultValue${H}`] || M);
429
428
  });
430
- }) : de(B, a, H));
429
+ }) : oe(U, n, M));
431
430
  }
432
- c = this.extendTranslation(c, e, t, g, s), C && c === a && this.options.appendNamespaceToMissingKey && (c = `${l}:${a}`), (C || y) && this.options.parseMissingKeyHandler && (c = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${l}:${a}` : a, y ? c : void 0));
431
+ c = this.extendTranslation(c, e, t, h, s), O && c === n && this.options.appendNamespaceToMissingKey && (c = `${l}:${n}`), (O || y) && this.options.parseMissingKeyHandler && (c = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${l}:${n}` : n, y ? c : void 0));
433
432
  }
434
- return i ? (g.res = c, g.usedParams = this.getUsedParamsDetails(t), g) : c;
433
+ return i ? (h.res = c, h.usedParams = this.getUsedParamsDetails(t), h) : c;
435
434
  }
436
- extendTranslation(e, t, s, i, n) {
435
+ extendTranslation(e, t, s, i, r) {
437
436
  var u, f;
438
- var a = this;
437
+ var n = this;
439
438
  if ((u = this.i18nFormat) != null && u.parse)
440
439
  e = this.i18nFormat.parse(e, {
441
440
  ...this.options.interpolation.defaultVariables,
@@ -451,28 +450,28 @@ class ie extends ne {
451
450
  ...s.interpolation
452
451
  }
453
452
  });
454
- const g = d(e) && (((f = s == null ? void 0 : s.interpolation) == null ? void 0 : f.skipOnVariables) !== void 0 ? s.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
453
+ const h = d(e) && (((f = s == null ? void 0 : s.interpolation) == null ? void 0 : f.skipOnVariables) !== void 0 ? s.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
455
454
  let c;
456
- if (g) {
457
- const h = e.match(this.interpolator.nestingRegexp);
458
- c = h && h.length;
455
+ if (h) {
456
+ const g = e.match(this.interpolator.nestingRegexp);
457
+ c = g && g.length;
459
458
  }
460
459
  let m = s.replace && !d(s.replace) ? s.replace : s;
461
460
  if (this.options.interpolation.defaultVariables && (m = {
462
461
  ...this.options.interpolation.defaultVariables,
463
462
  ...m
464
- }), e = this.interpolator.interpolate(e, m, s.lng || this.language || i.usedLng, s), g) {
465
- const h = e.match(this.interpolator.nestingRegexp), p = h && h.length;
463
+ }), e = this.interpolator.interpolate(e, m, s.lng || this.language || i.usedLng, s), h) {
464
+ const g = e.match(this.interpolator.nestingRegexp), p = g && g.length;
466
465
  c < p && (s.nest = !1);
467
466
  }
468
467
  !s.lng && i && i.res && (s.lng = this.language || i.usedLng), s.nest !== !1 && (e = this.interpolator.nest(e, function() {
469
- for (var h = arguments.length, p = new Array(h), v = 0; v < h; v++)
468
+ for (var g = arguments.length, p = new Array(g), v = 0; v < g; v++)
470
469
  p[v] = arguments[v];
471
- return (n == null ? void 0 : n[0]) === p[0] && !s.context ? (a.logger.warn(`It seems you are nesting recursively key: ${p[0]} in key: ${t[0]}`), null) : a.translate(...p, t);
470
+ return (r == null ? void 0 : r[0]) === p[0] && !s.context ? (n.logger.warn(`It seems you are nesting recursively key: ${p[0]} in key: ${t[0]}`), null) : n.translate(...p, t);
472
471
  }, s)), s.interpolation && this.interpolator.reset();
473
472
  }
474
473
  const o = s.postProcess || this.options.postProcess, l = d(o) ? [o] : o;
475
- return e != null && (l != null && l.length) && s.applyPostProcessor !== !1 && (e = je.handle(l, e, t, this.options && this.options.postProcessPassResolved ? {
474
+ return e != null && (l != null && l.length) && s.applyPostProcessor !== !1 && (e = Pe.handle(l, e, t, this.options && this.options.postProcessPassResolved ? {
476
475
  i18nResolved: {
477
476
  ...i,
478
477
  usedParams: this.getUsedParamsDetails(s)
@@ -481,42 +480,42 @@ class ie extends ne {
481
480
  } : s, this)), e;
482
481
  }
483
482
  resolve(e) {
484
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, s, i, n, a, o;
483
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, s, i, r, n, o;
485
484
  return d(e) && (e = [e]), e.forEach((l) => {
486
485
  if (this.isValidLookup(s)) return;
487
486
  const u = this.extractFromKey(l, t), f = u.key;
488
487
  i = f;
489
- let g = u.namespaces;
490
- this.options.fallbackNS && (g = g.concat(this.options.fallbackNS));
491
- const c = t.count !== void 0 && !d(t.count), m = c && !t.ordinal && t.count === 0, h = t.context !== void 0 && (d(t.context) || typeof t.context == "number") && t.context !== "", p = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
492
- g.forEach((v) => {
493
- var L, P;
494
- this.isValidLookup(s) || (o = v, !Le[`${p[0]}-${v}`] && ((L = this.utils) != null && L.hasLoadedNamespace) && !((P = this.utils) != null && P.hasLoadedNamespace(o)) && (Le[`${p[0]}-${v}`] = !0, this.logger.warn(`key "${i}" for languages "${p.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), p.forEach((M) => {
495
- var I;
488
+ let h = u.namespaces;
489
+ this.options.fallbackNS && (h = h.concat(this.options.fallbackNS));
490
+ const c = t.count !== void 0 && !d(t.count), m = c && !t.ordinal && t.count === 0, g = t.context !== void 0 && (d(t.context) || typeof t.context == "number") && t.context !== "", p = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
491
+ h.forEach((v) => {
492
+ var L, w;
493
+ this.isValidLookup(s) || (o = v, !ve[`${p[0]}-${v}`] && ((L = this.utils) != null && L.hasLoadedNamespace) && !((w = this.utils) != null && w.hasLoadedNamespace(o)) && (ve[`${p[0]}-${v}`] = !0, this.logger.warn(`key "${i}" for languages "${p.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), p.forEach((I) => {
494
+ var k;
496
495
  if (this.isValidLookup(s)) return;
497
- a = M;
496
+ n = I;
498
497
  const y = [f];
499
- if ((I = this.i18nFormat) != null && I.addLookupKeys)
500
- this.i18nFormat.addLookupKeys(y, f, M, v, t);
498
+ if ((k = this.i18nFormat) != null && k.addLookupKeys)
499
+ this.i18nFormat.addLookupKeys(y, f, I, v, t);
501
500
  else {
502
501
  let x;
503
- c && (x = this.pluralResolver.getSuffix(M, t.count, t));
504
- const F = `${this.options.pluralSeparator}zero`, _ = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
505
- if (c && (y.push(f + x), t.ordinal && x.indexOf(_) === 0 && y.push(f + x.replace(_, this.options.pluralSeparator)), m && y.push(f + F)), h) {
506
- const j = `${f}${this.options.contextSeparator}${t.context}`;
507
- y.push(j), c && (y.push(j + x), t.ordinal && x.indexOf(_) === 0 && y.push(j + x.replace(_, this.options.pluralSeparator)), m && y.push(j + F));
502
+ c && (x = this.pluralResolver.getSuffix(I, t.count, t));
503
+ const N = `${this.options.pluralSeparator}zero`, D = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
504
+ if (c && (y.push(f + x), t.ordinal && x.indexOf(D) === 0 && y.push(f + x.replace(D, this.options.pluralSeparator)), m && y.push(f + N)), g) {
505
+ const E = `${f}${this.options.contextSeparator}${t.context}`;
506
+ y.push(E), c && (y.push(E + x), t.ordinal && x.indexOf(D) === 0 && y.push(E + x.replace(D, this.options.pluralSeparator)), m && y.push(E + N));
508
507
  }
509
508
  }
510
- let C;
511
- for (; C = y.pop(); )
512
- this.isValidLookup(s) || (n = C, s = this.getResource(M, v, C, t));
509
+ let O;
510
+ for (; O = y.pop(); )
511
+ this.isValidLookup(s) || (r = O, s = this.getResource(I, v, O, t));
513
512
  }));
514
513
  });
515
514
  }), {
516
515
  res: s,
517
516
  usedKey: i,
518
- exactUsedKey: n,
519
- usedLng: a,
517
+ exactUsedKey: r,
518
+ usedLng: n,
520
519
  usedNS: o
521
520
  };
522
521
  }
@@ -524,9 +523,9 @@ class ie extends ne {
524
523
  return e !== void 0 && !(!this.options.returnNull && e === null) && !(!this.options.returnEmptyString && e === "");
525
524
  }
526
525
  getResource(e, t, s) {
527
- var n;
526
+ var r;
528
527
  let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
529
- return (n = this.i18nFormat) != null && n.getResource ? this.i18nFormat.getResource(e, t, s, i) : this.resourceStore.getResource(e, t, s, i);
528
+ return (r = this.i18nFormat) != null && r.getResource ? this.i18nFormat.getResource(e, t, s, i) : this.resourceStore.getResource(e, t, s, i);
530
529
  }
531
530
  getUsedParamsDetails() {
532
531
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
@@ -539,8 +538,8 @@ class ie extends ne {
539
538
  i = {
540
539
  ...i
541
540
  };
542
- for (const n of t)
543
- delete i[n];
541
+ for (const r of t)
542
+ delete i[r];
544
543
  }
545
544
  return i;
546
545
  }
@@ -552,17 +551,17 @@ class ie extends ne {
552
551
  return !1;
553
552
  }
554
553
  }
555
- class Re {
554
+ class ye {
556
555
  constructor(e) {
557
- this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = E.create("languageUtils");
556
+ this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = P.create("languageUtils");
558
557
  }
559
558
  getScriptPartFromCode(e) {
560
- if (e = te(e), !e || e.indexOf("-") < 0) return null;
559
+ if (e = Q(e), !e || e.indexOf("-") < 0) return null;
561
560
  const t = e.split("-");
562
561
  return t.length === 2 || (t.pop(), t[t.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(t.join("-"));
563
562
  }
564
563
  getLanguagePartFromCode(e) {
565
- if (e = te(e), !e || e.indexOf("-") < 0) return e;
564
+ if (e = Q(e), !e || e.indexOf("-") < 0) return e;
566
565
  const t = e.split("-");
567
566
  return this.formatLanguageCode(t[0]);
568
567
  }
@@ -591,10 +590,10 @@ class Re {
591
590
  if (t) return;
592
591
  const i = this.getLanguagePartFromCode(s);
593
592
  if (this.isSupportedCode(i)) return t = i;
594
- t = this.options.supportedLngs.find((n) => {
595
- if (n === i) return n;
596
- if (!(n.indexOf("-") < 0 && i.indexOf("-") < 0) && (n.indexOf("-") > 0 && i.indexOf("-") < 0 && n.substring(0, n.indexOf("-")) === i || n.indexOf(i) === 0 && i.length > 1))
597
- return n;
593
+ t = this.options.supportedLngs.find((r) => {
594
+ if (r === i) return r;
595
+ if (!(r.indexOf("-") < 0 && i.indexOf("-") < 0) && (r.indexOf("-") > 0 && i.indexOf("-") < 0 && r.substring(0, r.indexOf("-")) === i || r.indexOf(i) === 0 && i.length > 1))
596
+ return r;
598
597
  });
599
598
  }), t || (t = this.getFallbackCodes(this.options.fallbackLng)[0]), t;
600
599
  }
@@ -606,31 +605,31 @@ class Re {
606
605
  return s || (s = e[this.getScriptPartFromCode(t)]), s || (s = e[this.formatLanguageCode(t)]), s || (s = e[this.getLanguagePartFromCode(t)]), s || (s = e.default), s || [];
607
606
  }
608
607
  toResolveHierarchy(e, t) {
609
- const s = this.getFallbackCodes(t || this.options.fallbackLng || [], e), i = [], n = (a) => {
610
- a && (this.isSupportedCode(a) ? i.push(a) : this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`));
608
+ const s = this.getFallbackCodes(t || this.options.fallbackLng || [], e), i = [], r = (n) => {
609
+ n && (this.isSupportedCode(n) ? i.push(n) : this.logger.warn(`rejecting language code not found in supportedLngs: ${n}`));
611
610
  };
612
- return d(e) && (e.indexOf("-") > -1 || e.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && n(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && n(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && n(this.getLanguagePartFromCode(e))) : d(e) && n(this.formatLanguageCode(e)), s.forEach((a) => {
613
- i.indexOf(a) < 0 && n(this.formatLanguageCode(a));
611
+ return d(e) && (e.indexOf("-") > -1 || e.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && r(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && r(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && r(this.getLanguagePartFromCode(e))) : d(e) && r(this.formatLanguageCode(e)), s.forEach((n) => {
612
+ i.indexOf(n) < 0 && r(this.formatLanguageCode(n));
614
613
  }), i;
615
614
  }
616
615
  }
617
- const we = {
616
+ const xe = {
618
617
  zero: 0,
619
618
  one: 1,
620
619
  two: 2,
621
620
  few: 3,
622
621
  many: 4,
623
622
  other: 5
624
- }, Pe = {
625
- select: (r) => r === 1 ? "one" : "other",
623
+ }, be = {
624
+ select: (a) => a === 1 ? "one" : "other",
626
625
  resolvedOptions: () => ({
627
626
  pluralCategories: ["one", "other"]
628
627
  })
629
628
  };
630
- class tt {
629
+ class Ye {
631
630
  constructor(e) {
632
631
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
633
- this.languageUtils = e, this.options = t, this.logger = E.create("pluralResolver"), this.pluralRulesCache = {};
632
+ this.languageUtils = e, this.options = t, this.logger = P.create("pluralResolver"), this.pluralRulesCache = {};
634
633
  }
635
634
  addRule(e, t) {
636
635
  this.rules[e] = t;
@@ -640,25 +639,25 @@ class tt {
640
639
  }
641
640
  getRule(e) {
642
641
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
643
- const s = te(e === "dev" ? "en" : e), i = t.ordinal ? "ordinal" : "cardinal", n = JSON.stringify({
642
+ const s = Q(e === "dev" ? "en" : e), i = t.ordinal ? "ordinal" : "cardinal", r = JSON.stringify({
644
643
  cleanedCode: s,
645
644
  type: i
646
645
  });
647
- if (n in this.pluralRulesCache)
648
- return this.pluralRulesCache[n];
649
- let a;
646
+ if (r in this.pluralRulesCache)
647
+ return this.pluralRulesCache[r];
648
+ let n;
650
649
  try {
651
- a = new Intl.PluralRules(s, {
650
+ n = new Intl.PluralRules(s, {
652
651
  type: i
653
652
  });
654
653
  } catch {
655
654
  if (!Intl)
656
- return this.logger.error("No Intl support, please use an Intl polyfill!"), Pe;
657
- if (!e.match(/-|_/)) return Pe;
655
+ return this.logger.error("No Intl support, please use an Intl polyfill!"), be;
656
+ if (!e.match(/-|_/)) return be;
658
657
  const l = this.languageUtils.getLanguagePartFromCode(e);
659
- a = this.getRule(l, t);
658
+ n = this.getRule(l, t);
660
659
  }
661
- return this.pluralRulesCache[n] = a, a;
660
+ return this.pluralRulesCache[r] = n, n;
662
661
  }
663
662
  needsPlural(e) {
664
663
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, s = this.getRule(e, t);
@@ -670,7 +669,7 @@ class tt {
670
669
  }
671
670
  getSuffixes(e) {
672
671
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, s = this.getRule(e, t);
673
- return s || (s = this.getRule("dev", t)), s ? s.resolvedOptions().pluralCategories.sort((i, n) => we[i] - we[n]).map((i) => `${this.options.prepend}${t.ordinal ? `ordinal${this.options.prepend}` : ""}${i}`) : [];
672
+ return s || (s = this.getRule("dev", t)), s ? s.resolvedOptions().pluralCategories.sort((i, r) => xe[i] - xe[r]).map((i) => `${this.options.prepend}${t.ordinal ? `ordinal${this.options.prepend}` : ""}${i}`) : [];
674
673
  }
675
674
  getSuffix(e, t) {
676
675
  let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
@@ -678,15 +677,15 @@ class tt {
678
677
  return i ? `${this.options.prepend}${s.ordinal ? `ordinal${this.options.prepend}` : ""}${i.select(t)}` : (this.logger.warn(`no plural rule found for: ${e}`), this.getSuffix("dev", t, s));
679
678
  }
680
679
  }
681
- const $e = function(r, e, t) {
682
- let s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, n = We(r, e, t);
683
- return !n && i && d(t) && (n = ce(r, t, s), n === void 0 && (n = ce(e, t, s))), n;
684
- }, ae = (r) => r.replace(/\$/g, "$$$$");
685
- class st {
680
+ const Se = function(a, e, t) {
681
+ let s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, r = Me(a, e, t);
682
+ return !r && i && d(t) && (r = re(a, t, s), r === void 0 && (r = re(e, t, s))), r;
683
+ }, te = (a) => a.replace(/\$/g, "$$$$");
684
+ class We {
686
685
  constructor() {
687
686
  var t;
688
687
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
689
- this.logger = E.create("interpolator"), this.options = e, this.format = ((t = e == null ? void 0 : e.interpolation) == null ? void 0 : t.format) || ((s) => s), this.init(e);
688
+ this.logger = P.create("interpolator"), this.options = e, this.format = ((t = e == null ? void 0 : e.interpolation) == null ? void 0 : t.format) || ((s) => s), this.init(e);
690
689
  }
691
690
  init() {
692
691
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
@@ -697,22 +696,22 @@ class st {
697
696
  escape: t,
698
697
  escapeValue: s,
699
698
  useRawValueToEscape: i,
700
- prefix: n,
701
- prefixEscaped: a,
699
+ prefix: r,
700
+ prefixEscaped: n,
702
701
  suffix: o,
703
702
  suffixEscaped: l,
704
703
  formatSeparator: u,
705
704
  unescapeSuffix: f,
706
- unescapePrefix: g,
705
+ unescapePrefix: h,
707
706
  nestingPrefix: c,
708
707
  nestingPrefixEscaped: m,
709
- nestingSuffix: h,
708
+ nestingSuffix: g,
710
709
  nestingSuffixEscaped: p,
711
710
  nestingOptionsSeparator: v,
712
711
  maxReplaces: L,
713
- alwaysFormat: P
712
+ alwaysFormat: w
714
713
  } = e.interpolation;
715
- this.escape = t !== void 0 ? t : Ge, this.escapeValue = s !== void 0 ? s : !0, this.useRawValueToEscape = i !== void 0 ? i : !1, this.prefix = n ? U(n) : a || "{{", this.suffix = o ? U(o) : l || "}}", this.formatSeparator = u || ",", this.unescapePrefix = f ? "" : g || "-", this.unescapeSuffix = this.unescapePrefix ? "" : f || "", this.nestingPrefix = c ? U(c) : m || U("$t("), this.nestingSuffix = h ? U(h) : p || U(")"), this.nestingOptionsSeparator = v || ",", this.maxReplaces = L || 1e3, this.alwaysFormat = P !== void 0 ? P : !1, this.resetRegExp();
714
+ this.escape = t !== void 0 ? t : Ue, this.escapeValue = s !== void 0 ? s : !0, this.useRawValueToEscape = i !== void 0 ? i : !1, this.prefix = r ? T(r) : n || "{{", this.suffix = o ? T(o) : l || "}}", this.formatSeparator = u || ",", this.unescapePrefix = f ? "" : h || "-", this.unescapeSuffix = this.unescapePrefix ? "" : f || "", this.nestingPrefix = c ? T(c) : m || T("$t("), this.nestingSuffix = g ? T(g) : p || T(")"), this.nestingOptionsSeparator = v || ",", this.maxReplaces = L || 1e3, this.alwaysFormat = w !== void 0 ? w : !1, this.resetRegExp();
716
715
  }
717
716
  reset() {
718
717
  this.options && this.init(this.options);
@@ -723,101 +722,101 @@ class st {
723
722
  }
724
723
  interpolate(e, t, s, i) {
725
724
  var m;
726
- let n, a, o;
727
- const l = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, u = (h) => {
728
- if (h.indexOf(this.formatSeparator) < 0) {
729
- const P = $e(t, l, h, this.options.keySeparator, this.options.ignoreJSONStructure);
730
- return this.alwaysFormat ? this.format(P, void 0, s, {
725
+ let r, n, o;
726
+ const l = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, u = (g) => {
727
+ if (g.indexOf(this.formatSeparator) < 0) {
728
+ const w = Se(t, l, g, this.options.keySeparator, this.options.ignoreJSONStructure);
729
+ return this.alwaysFormat ? this.format(w, void 0, s, {
731
730
  ...i,
732
731
  ...t,
733
- interpolationkey: h
734
- }) : P;
732
+ interpolationkey: g
733
+ }) : w;
735
734
  }
736
- const p = h.split(this.formatSeparator), v = p.shift().trim(), L = p.join(this.formatSeparator).trim();
737
- return this.format($e(t, l, v, this.options.keySeparator, this.options.ignoreJSONStructure), L, s, {
735
+ const p = g.split(this.formatSeparator), v = p.shift().trim(), L = p.join(this.formatSeparator).trim();
736
+ return this.format(Se(t, l, v, this.options.keySeparator, this.options.ignoreJSONStructure), L, s, {
738
737
  ...i,
739
738
  ...t,
740
739
  interpolationkey: v
741
740
  });
742
741
  };
743
742
  this.resetRegExp();
744
- const f = (i == null ? void 0 : i.missingInterpolationHandler) || this.options.missingInterpolationHandler, g = ((m = i == null ? void 0 : i.interpolation) == null ? void 0 : m.skipOnVariables) !== void 0 ? i.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
743
+ const f = (i == null ? void 0 : i.missingInterpolationHandler) || this.options.missingInterpolationHandler, h = ((m = i == null ? void 0 : i.interpolation) == null ? void 0 : m.skipOnVariables) !== void 0 ? i.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
745
744
  return [{
746
745
  regex: this.regexpUnescape,
747
- safeValue: (h) => ae(h)
746
+ safeValue: (g) => te(g)
748
747
  }, {
749
748
  regex: this.regexp,
750
- safeValue: (h) => this.escapeValue ? ae(this.escape(h)) : ae(h)
751
- }].forEach((h) => {
752
- for (o = 0; n = h.regex.exec(e); ) {
753
- const p = n[1].trim();
754
- if (a = u(p), a === void 0)
749
+ safeValue: (g) => this.escapeValue ? te(this.escape(g)) : te(g)
750
+ }].forEach((g) => {
751
+ for (o = 0; r = g.regex.exec(e); ) {
752
+ const p = r[1].trim();
753
+ if (n = u(p), n === void 0)
755
754
  if (typeof f == "function") {
756
- const L = f(e, n, i);
757
- a = d(L) ? L : "";
755
+ const L = f(e, r, i);
756
+ n = d(L) ? L : "";
758
757
  } else if (i && Object.prototype.hasOwnProperty.call(i, p))
759
- a = "";
760
- else if (g) {
761
- a = n[0];
758
+ n = "";
759
+ else if (h) {
760
+ n = r[0];
762
761
  continue;
763
762
  } else
764
- this.logger.warn(`missed to pass in variable ${p} for interpolating ${e}`), a = "";
765
- else !d(a) && !this.useRawValueToEscape && (a = xe(a));
766
- const v = h.safeValue(a);
767
- if (e = e.replace(n[0], v), g ? (h.regex.lastIndex += a.length, h.regex.lastIndex -= n[0].length) : h.regex.lastIndex = 0, o++, o >= this.maxReplaces)
763
+ this.logger.warn(`missed to pass in variable ${p} for interpolating ${e}`), n = "";
764
+ else !d(n) && !this.useRawValueToEscape && (n = he(n));
765
+ const v = g.safeValue(n);
766
+ if (e = e.replace(r[0], v), h ? (g.regex.lastIndex += n.length, g.regex.lastIndex -= r[0].length) : g.regex.lastIndex = 0, o++, o >= this.maxReplaces)
768
767
  break;
769
768
  }
770
769
  }), e;
771
770
  }
772
771
  nest(e, t) {
773
- let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, i, n, a;
772
+ let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, i, r, n;
774
773
  const o = (l, u) => {
775
774
  const f = this.nestingOptionsSeparator;
776
775
  if (l.indexOf(f) < 0) return l;
777
- const g = l.split(new RegExp(`${f}[ ]*{`));
778
- let c = `{${g[1]}`;
779
- l = g[0], c = this.interpolate(c, a);
780
- const m = c.match(/'/g), h = c.match(/"/g);
781
- (((m == null ? void 0 : m.length) ?? 0) % 2 === 0 && !h || h.length % 2 !== 0) && (c = c.replace(/'/g, '"'));
776
+ const h = l.split(new RegExp(`${f}[ ]*{`));
777
+ let c = `{${h[1]}`;
778
+ l = h[0], c = this.interpolate(c, n);
779
+ const m = c.match(/'/g), g = c.match(/"/g);
780
+ (((m == null ? void 0 : m.length) ?? 0) % 2 === 0 && !g || g.length % 2 !== 0) && (c = c.replace(/'/g, '"'));
782
781
  try {
783
- a = JSON.parse(c), u && (a = {
782
+ n = JSON.parse(c), u && (n = {
784
783
  ...u,
785
- ...a
784
+ ...n
786
785
  });
787
786
  } catch (p) {
788
787
  return this.logger.warn(`failed parsing options string in nesting for key ${l}`, p), `${l}${f}${c}`;
789
788
  }
790
- return a.defaultValue && a.defaultValue.indexOf(this.prefix) > -1 && delete a.defaultValue, l;
789
+ return n.defaultValue && n.defaultValue.indexOf(this.prefix) > -1 && delete n.defaultValue, l;
791
790
  };
792
791
  for (; i = this.nestingRegexp.exec(e); ) {
793
792
  let l = [];
794
- a = {
793
+ n = {
795
794
  ...s
796
- }, a = a.replace && !d(a.replace) ? a.replace : a, a.applyPostProcessor = !1, delete a.defaultValue;
795
+ }, n = n.replace && !d(n.replace) ? n.replace : n, n.applyPostProcessor = !1, delete n.defaultValue;
797
796
  let u = !1;
798
797
  if (i[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(i[1])) {
799
- const f = i[1].split(this.formatSeparator).map((g) => g.trim());
798
+ const f = i[1].split(this.formatSeparator).map((h) => h.trim());
800
799
  i[1] = f.shift(), l = f, u = !0;
801
800
  }
802
- if (n = t(o.call(this, i[1].trim(), a), a), n && i[0] === e && !d(n)) return n;
803
- d(n) || (n = xe(n)), n || (this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`), n = ""), u && (n = l.reduce((f, g) => this.format(f, g, s.lng, {
801
+ if (r = t(o.call(this, i[1].trim(), n), n), r && i[0] === e && !d(r)) return r;
802
+ d(r) || (r = he(r)), r || (this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`), r = ""), u && (r = l.reduce((f, h) => this.format(f, h, s.lng, {
804
803
  ...s,
805
804
  interpolationkey: i[1].trim()
806
- }), n.trim())), e = e.replace(i[0], n), this.regexp.lastIndex = 0;
805
+ }), r.trim())), e = e.replace(i[0], r), this.regexp.lastIndex = 0;
807
806
  }
808
807
  return e;
809
808
  }
810
809
  }
811
- const it = (r) => {
812
- let e = r.toLowerCase().trim();
810
+ const Ge = (a) => {
811
+ let e = a.toLowerCase().trim();
813
812
  const t = {};
814
- if (r.indexOf("(") > -1) {
815
- const s = r.split("(");
813
+ if (a.indexOf("(") > -1) {
814
+ const s = a.split("(");
816
815
  e = s[0].toLowerCase().trim();
817
816
  const i = s[1].substring(0, s[1].length - 1);
818
- e === "currency" && i.indexOf(":") < 0 ? t.currency || (t.currency = i.trim()) : e === "relativetime" && i.indexOf(":") < 0 ? t.range || (t.range = i.trim()) : i.split(";").forEach((a) => {
819
- if (a) {
820
- const [o, ...l] = a.split(":"), u = l.join(":").trim().replace(/^'+|'+$/g, ""), f = o.trim();
817
+ e === "currency" && i.indexOf(":") < 0 ? t.currency || (t.currency = i.trim()) : e === "relativetime" && i.indexOf(":") < 0 ? t.range || (t.range = i.trim()) : i.split(";").forEach((n) => {
818
+ if (n) {
819
+ const [o, ...l] = n.split(":"), u = l.join(":").trim().replace(/^'+|'+$/g, ""), f = o.trim();
821
820
  t[f] || (t[f] = u), u === "false" && (t[f] = !1), u === "true" && (t[f] = !0), isNaN(u) || (t[f] = parseInt(u, 10));
822
821
  }
823
822
  });
@@ -826,53 +825,53 @@ const it = (r) => {
826
825
  formatName: e,
827
826
  formatOptions: t
828
827
  };
829
- }, K = (r) => {
828
+ }, A = (a) => {
830
829
  const e = {};
831
830
  return (t, s, i) => {
832
- let n = i;
833
- i && i.interpolationkey && i.formatParams && i.formatParams[i.interpolationkey] && i[i.interpolationkey] && (n = {
834
- ...n,
831
+ let r = i;
832
+ i && i.interpolationkey && i.formatParams && i.formatParams[i.interpolationkey] && i[i.interpolationkey] && (r = {
833
+ ...r,
835
834
  [i.interpolationkey]: void 0
836
835
  });
837
- const a = s + JSON.stringify(n);
838
- let o = e[a];
839
- return o || (o = r(te(s), i), e[a] = o), o(t);
836
+ const n = s + JSON.stringify(r);
837
+ let o = e[n];
838
+ return o || (o = a(Q(s), i), e[n] = o), o(t);
840
839
  };
841
840
  };
842
- class nt {
841
+ class Ze {
843
842
  constructor() {
844
843
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
845
- this.logger = E.create("formatter"), this.options = e, this.formats = {
846
- number: K((t, s) => {
844
+ this.logger = P.create("formatter"), this.options = e, this.formats = {
845
+ number: A((t, s) => {
847
846
  const i = new Intl.NumberFormat(t, {
848
847
  ...s
849
848
  });
850
- return (n) => i.format(n);
849
+ return (r) => i.format(r);
851
850
  }),
852
- currency: K((t, s) => {
851
+ currency: A((t, s) => {
853
852
  const i = new Intl.NumberFormat(t, {
854
853
  ...s,
855
854
  style: "currency"
856
855
  });
857
- return (n) => i.format(n);
856
+ return (r) => i.format(r);
858
857
  }),
859
- datetime: K((t, s) => {
858
+ datetime: A((t, s) => {
860
859
  const i = new Intl.DateTimeFormat(t, {
861
860
  ...s
862
861
  });
863
- return (n) => i.format(n);
862
+ return (r) => i.format(r);
864
863
  }),
865
- relativetime: K((t, s) => {
864
+ relativetime: A((t, s) => {
866
865
  const i = new Intl.RelativeTimeFormat(t, {
867
866
  ...s
868
867
  });
869
- return (n) => i.format(n, s.range || "day");
868
+ return (r) => i.format(r, s.range || "day");
870
869
  }),
871
- list: K((t, s) => {
870
+ list: A((t, s) => {
872
871
  const i = new Intl.ListFormat(t, {
873
872
  ...s
874
873
  });
875
- return (n) => i.format(n);
874
+ return (r) => i.format(r);
876
875
  })
877
876
  }, this.init(e);
878
877
  }
@@ -886,26 +885,26 @@ class nt {
886
885
  this.formats[e.toLowerCase().trim()] = t;
887
886
  }
888
887
  addCached(e, t) {
889
- this.formats[e.toLowerCase().trim()] = K(t);
888
+ this.formats[e.toLowerCase().trim()] = A(t);
890
889
  }
891
890
  format(e, t, s) {
892
891
  let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
893
- const n = t.split(this.formatSeparator);
894
- if (n.length > 1 && n[0].indexOf("(") > 1 && n[0].indexOf(")") < 0 && n.find((o) => o.indexOf(")") > -1)) {
895
- const o = n.findIndex((l) => l.indexOf(")") > -1);
896
- n[0] = [n[0], ...n.splice(1, o)].join(this.formatSeparator);
892
+ const r = t.split(this.formatSeparator);
893
+ if (r.length > 1 && r[0].indexOf("(") > 1 && r[0].indexOf(")") < 0 && r.find((o) => o.indexOf(")") > -1)) {
894
+ const o = r.findIndex((l) => l.indexOf(")") > -1);
895
+ r[0] = [r[0], ...r.splice(1, o)].join(this.formatSeparator);
897
896
  }
898
- return n.reduce((o, l) => {
899
- var g;
897
+ return r.reduce((o, l) => {
898
+ var h;
900
899
  const {
901
900
  formatName: u,
902
901
  formatOptions: f
903
- } = it(l);
902
+ } = Ge(l);
904
903
  if (this.formats[u]) {
905
904
  let c = o;
906
905
  try {
907
- const m = ((g = i == null ? void 0 : i.formatParams) == null ? void 0 : g[i.interpolationkey]) || {}, h = m.locale || m.lng || i.locale || i.lng || s;
908
- c = this.formats[u](o, h, {
906
+ const m = ((h = i == null ? void 0 : i.formatParams) == null ? void 0 : h[i.interpolationkey]) || {}, g = m.locale || m.lng || i.locale || i.lng || s;
907
+ c = this.formats[u](o, g, {
909
908
  ...f,
910
909
  ...i,
911
910
  ...m
@@ -920,79 +919,79 @@ class nt {
920
919
  }, e);
921
920
  }
922
921
  }
923
- const rt = (r, e) => {
924
- r.pending[e] !== void 0 && (delete r.pending[e], r.pendingCount--);
922
+ const Qe = (a, e) => {
923
+ a.pending[e] !== void 0 && (delete a.pending[e], a.pendingCount--);
925
924
  };
926
- class at extends ne {
925
+ class Xe extends ee {
927
926
  constructor(e, t, s) {
928
- var n, a;
927
+ var r, n;
929
928
  let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
930
- super(), this.backend = e, this.store = t, this.services = s, this.languageUtils = s.languageUtils, this.options = i, this.logger = E.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = i.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = i.maxRetries >= 0 ? i.maxRetries : 5, this.retryTimeout = i.retryTimeout >= 1 ? i.retryTimeout : 350, this.state = {}, this.queue = [], (a = (n = this.backend) == null ? void 0 : n.init) == null || a.call(n, s, i.backend, i);
929
+ super(), this.backend = e, this.store = t, this.services = s, this.languageUtils = s.languageUtils, this.options = i, this.logger = P.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = i.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = i.maxRetries >= 0 ? i.maxRetries : 5, this.retryTimeout = i.retryTimeout >= 1 ? i.retryTimeout : 350, this.state = {}, this.queue = [], (n = (r = this.backend) == null ? void 0 : r.init) == null || n.call(r, s, i.backend, i);
931
930
  }
932
931
  queueLoad(e, t, s, i) {
933
- const n = {}, a = {}, o = {}, l = {};
932
+ const r = {}, n = {}, o = {}, l = {};
934
933
  return e.forEach((u) => {
935
934
  let f = !0;
936
- t.forEach((g) => {
937
- const c = `${u}|${g}`;
938
- !s.reload && this.store.hasResourceBundle(u, g) ? this.state[c] = 2 : this.state[c] < 0 || (this.state[c] === 1 ? a[c] === void 0 && (a[c] = !0) : (this.state[c] = 1, f = !1, a[c] === void 0 && (a[c] = !0), n[c] === void 0 && (n[c] = !0), l[g] === void 0 && (l[g] = !0)));
935
+ t.forEach((h) => {
936
+ const c = `${u}|${h}`;
937
+ !s.reload && this.store.hasResourceBundle(u, h) ? this.state[c] = 2 : this.state[c] < 0 || (this.state[c] === 1 ? n[c] === void 0 && (n[c] = !0) : (this.state[c] = 1, f = !1, n[c] === void 0 && (n[c] = !0), r[c] === void 0 && (r[c] = !0), l[h] === void 0 && (l[h] = !0)));
939
938
  }), f || (o[u] = !0);
940
- }), (Object.keys(n).length || Object.keys(a).length) && this.queue.push({
941
- pending: a,
942
- pendingCount: Object.keys(a).length,
939
+ }), (Object.keys(r).length || Object.keys(n).length) && this.queue.push({
940
+ pending: n,
941
+ pendingCount: Object.keys(n).length,
943
942
  loaded: {},
944
943
  errors: [],
945
944
  callback: i
946
945
  }), {
947
- toLoad: Object.keys(n),
948
- pending: Object.keys(a),
946
+ toLoad: Object.keys(r),
947
+ pending: Object.keys(n),
949
948
  toLoadLanguages: Object.keys(o),
950
949
  toLoadNamespaces: Object.keys(l)
951
950
  };
952
951
  }
953
952
  loaded(e, t, s) {
954
- const i = e.split("|"), n = i[0], a = i[1];
955
- t && this.emit("failedLoading", n, a, t), !t && s && this.store.addResourceBundle(n, a, s, void 0, void 0, {
953
+ const i = e.split("|"), r = i[0], n = i[1];
954
+ t && this.emit("failedLoading", r, n, t), !t && s && this.store.addResourceBundle(r, n, s, void 0, void 0, {
956
955
  skipCopy: !0
957
956
  }), this.state[e] = t ? -1 : 2, t && s && (this.state[e] = 0);
958
957
  const o = {};
959
958
  this.queue.forEach((l) => {
960
- Je(l.loaded, [n], a), rt(l, e), t && l.errors.push(t), l.pendingCount === 0 && !l.done && (Object.keys(l.loaded).forEach((u) => {
959
+ Ae(l.loaded, [r], n), Qe(l, e), t && l.errors.push(t), l.pendingCount === 0 && !l.done && (Object.keys(l.loaded).forEach((u) => {
961
960
  o[u] || (o[u] = {});
962
961
  const f = l.loaded[u];
963
- f.length && f.forEach((g) => {
964
- o[u][g] === void 0 && (o[u][g] = !0);
962
+ f.length && f.forEach((h) => {
963
+ o[u][h] === void 0 && (o[u][h] = !0);
965
964
  });
966
965
  }), l.done = !0, l.errors.length ? l.callback(l.errors) : l.callback());
967
966
  }), this.emit("loaded", o), this.queue = this.queue.filter((l) => !l.done);
968
967
  }
969
968
  read(e, t, s) {
970
- let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0, n = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : this.retryTimeout, a = arguments.length > 5 ? arguments[5] : void 0;
971
- if (!e.length) return a(null, {});
969
+ let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0, r = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : this.retryTimeout, n = arguments.length > 5 ? arguments[5] : void 0;
970
+ if (!e.length) return n(null, {});
972
971
  if (this.readingCalls >= this.maxParallelReads) {
973
972
  this.waitingReads.push({
974
973
  lng: e,
975
974
  ns: t,
976
975
  fcName: s,
977
976
  tried: i,
978
- wait: n,
979
- callback: a
977
+ wait: r,
978
+ callback: n
980
979
  });
981
980
  return;
982
981
  }
983
982
  this.readingCalls++;
984
983
  const o = (u, f) => {
985
984
  if (this.readingCalls--, this.waitingReads.length > 0) {
986
- const g = this.waitingReads.shift();
987
- this.read(g.lng, g.ns, g.fcName, g.tried, g.wait, g.callback);
985
+ const h = this.waitingReads.shift();
986
+ this.read(h.lng, h.ns, h.fcName, h.tried, h.wait, h.callback);
988
987
  }
989
988
  if (u && f && i < this.maxRetries) {
990
989
  setTimeout(() => {
991
- this.read.call(this, e, t, s, i + 1, n * 2, a);
992
- }, n);
990
+ this.read.call(this, e, t, s, i + 1, r * 2, n);
991
+ }, r);
993
992
  return;
994
993
  }
995
- a(u, f);
994
+ n(u, f);
996
995
  }, l = this.backend[s].bind(this.backend);
997
996
  if (l.length === 2) {
998
997
  try {
@@ -1010,11 +1009,11 @@ class at extends ne {
1010
1009
  if (!this.backend)
1011
1010
  return this.logger.warn("No backend was added via i18next.use. Will not load resources."), i && i();
1012
1011
  d(e) && (e = this.languageUtils.toResolveHierarchy(e)), d(t) && (t = [t]);
1013
- const n = this.queueLoad(e, t, s, i);
1014
- if (!n.toLoad.length)
1015
- return n.pending.length || i(), null;
1016
- n.toLoad.forEach((a) => {
1017
- this.loadOne(a);
1012
+ const r = this.queueLoad(e, t, s, i);
1013
+ if (!r.toLoad.length)
1014
+ return r.pending.length || i(), null;
1015
+ r.toLoad.forEach((n) => {
1016
+ this.loadOne(n);
1018
1017
  });
1019
1018
  }
1020
1019
  load(e, t, s) {
@@ -1027,40 +1026,40 @@ class at extends ne {
1027
1026
  }
1028
1027
  loadOne(e) {
1029
1028
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
1030
- const s = e.split("|"), i = s[0], n = s[1];
1031
- this.read(i, n, "read", void 0, void 0, (a, o) => {
1032
- a && this.logger.warn(`${t}loading namespace ${n} for language ${i} failed`, a), !a && o && this.logger.log(`${t}loaded namespace ${n} for language ${i}`, o), this.loaded(e, a, o);
1029
+ const s = e.split("|"), i = s[0], r = s[1];
1030
+ this.read(i, r, "read", void 0, void 0, (n, o) => {
1031
+ n && this.logger.warn(`${t}loading namespace ${r} for language ${i} failed`, n), !n && o && this.logger.log(`${t}loaded namespace ${r} for language ${i}`, o), this.loaded(e, n, o);
1033
1032
  });
1034
1033
  }
1035
- saveMissing(e, t, s, i, n) {
1036
- var l, u, f, g, c;
1037
- let a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {}, o = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : () => {
1034
+ saveMissing(e, t, s, i, r) {
1035
+ var l, u, f, h, c;
1036
+ let n = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {}, o = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : () => {
1038
1037
  };
1039
- if ((u = (l = this.services) == null ? void 0 : l.utils) != null && u.hasLoadedNamespace && !((g = (f = this.services) == null ? void 0 : f.utils) != null && g.hasLoadedNamespace(t))) {
1038
+ if ((u = (l = this.services) == null ? void 0 : l.utils) != null && u.hasLoadedNamespace && !((h = (f = this.services) == null ? void 0 : f.utils) != null && h.hasLoadedNamespace(t))) {
1040
1039
  this.logger.warn(`did not save key "${s}" as the namespace "${t}" 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!!!");
1041
1040
  return;
1042
1041
  }
1043
1042
  if (!(s == null || s === "")) {
1044
1043
  if ((c = this.backend) != null && c.create) {
1045
1044
  const m = {
1046
- ...a,
1047
- isUpdate: n
1048
- }, h = this.backend.create.bind(this.backend);
1049
- if (h.length < 6)
1045
+ ...n,
1046
+ isUpdate: r
1047
+ }, g = this.backend.create.bind(this.backend);
1048
+ if (g.length < 6)
1050
1049
  try {
1051
1050
  let p;
1052
- h.length === 5 ? p = h(e, t, s, i, m) : p = h(e, t, s, i), p && typeof p.then == "function" ? p.then((v) => o(null, v)).catch(o) : o(null, p);
1051
+ g.length === 5 ? p = g(e, t, s, i, m) : p = g(e, t, s, i), p && typeof p.then == "function" ? p.then((v) => o(null, v)).catch(o) : o(null, p);
1053
1052
  } catch (p) {
1054
1053
  o(p);
1055
1054
  }
1056
1055
  else
1057
- h(e, t, s, i, o, m);
1056
+ g(e, t, s, i, o, m);
1058
1057
  }
1059
1058
  !e || !e[0] || this.store.addResource(e[0], t, s, i);
1060
1059
  }
1061
1060
  }
1062
1061
  }
1063
- const Ne = () => ({
1062
+ const Oe = () => ({
1064
1063
  debug: !1,
1065
1064
  initAsync: !0,
1066
1065
  ns: ["translation"],
@@ -1093,10 +1092,10 @@ const Ne = () => ({
1093
1092
  parseMissingKeyHandler: !1,
1094
1093
  appendNamespaceToMissingKey: !1,
1095
1094
  appendNamespaceToCIMode: !1,
1096
- overloadTranslationOptionHandler: (r) => {
1095
+ overloadTranslationOptionHandler: (a) => {
1097
1096
  let e = {};
1098
- if (typeof r[1] == "object" && (e = r[1]), d(r[1]) && (e.defaultValue = r[1]), d(r[2]) && (e.tDescription = r[2]), typeof r[2] == "object" || typeof r[3] == "object") {
1099
- const t = r[3] || r[2];
1097
+ if (typeof a[1] == "object" && (e = a[1]), d(a[1]) && (e.defaultValue = a[1]), d(a[2]) && (e.tDescription = a[2]), typeof a[2] == "object" || typeof a[3] == "object") {
1098
+ const t = a[3] || a[2];
1100
1099
  Object.keys(t).forEach((s) => {
1101
1100
  e[s] = t[s];
1102
1101
  });
@@ -1105,7 +1104,7 @@ const Ne = () => ({
1105
1104
  },
1106
1105
  interpolation: {
1107
1106
  escapeValue: !0,
1108
- format: (r) => r,
1107
+ format: (a) => a,
1109
1108
  prefix: "{{",
1110
1109
  suffix: "}}",
1111
1110
  formatSeparator: ",",
@@ -1116,21 +1115,21 @@ const Ne = () => ({
1116
1115
  maxReplaces: 1e3,
1117
1116
  skipOnVariables: !0
1118
1117
  }
1119
- }), Ee = (r) => {
1118
+ }), Le = (a) => {
1120
1119
  var e, t;
1121
- return d(r.ns) && (r.ns = [r.ns]), d(r.fallbackLng) && (r.fallbackLng = [r.fallbackLng]), d(r.fallbackNS) && (r.fallbackNS = [r.fallbackNS]), ((t = (e = r.supportedLngs) == null ? void 0 : e.indexOf) == null ? void 0 : t.call(e, "cimode")) < 0 && (r.supportedLngs = r.supportedLngs.concat(["cimode"])), typeof r.initImmediate == "boolean" && (r.initAsync = r.initImmediate), r;
1122
- }, Q = () => {
1123
- }, ot = (r) => {
1124
- Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach((t) => {
1125
- typeof r[t] == "function" && (r[t] = r[t].bind(r));
1120
+ return d(a.ns) && (a.ns = [a.ns]), d(a.fallbackLng) && (a.fallbackLng = [a.fallbackLng]), d(a.fallbackNS) && (a.fallbackNS = [a.fallbackNS]), ((t = (e = a.supportedLngs) == null ? void 0 : e.indexOf) == null ? void 0 : t.call(e, "cimode")) < 0 && (a.supportedLngs = a.supportedLngs.concat(["cimode"])), typeof a.initImmediate == "boolean" && (a.initAsync = a.initImmediate), a;
1121
+ }, W = () => {
1122
+ }, qe = (a) => {
1123
+ Object.getOwnPropertyNames(Object.getPrototypeOf(a)).forEach((t) => {
1124
+ typeof a[t] == "function" && (a[t] = a[t].bind(a));
1126
1125
  });
1127
1126
  };
1128
- class Z extends ne {
1127
+ class J extends ee {
1129
1128
  constructor() {
1130
1129
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 ? arguments[1] : void 0;
1131
- if (super(), this.options = Ee(e), this.services = {}, this.logger = E, this.modules = {
1130
+ if (super(), this.options = Le(e), this.services = {}, this.logger = P, this.modules = {
1132
1131
  external: []
1133
- }, ot(this), t && !this.isInitialized && !e.isClone) {
1132
+ }, qe(this), t && !this.isInitialized && !e.isClone) {
1134
1133
  if (!this.options.initAsync)
1135
1134
  return this.init(e, t), this;
1136
1135
  setTimeout(() => {
@@ -1142,41 +1141,41 @@ class Z extends ne {
1142
1141
  var e = this;
1143
1142
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, s = arguments.length > 1 ? arguments[1] : void 0;
1144
1143
  this.isInitializing = !0, typeof t == "function" && (s = t, t = {}), t.defaultNS == null && t.ns && (d(t.ns) ? t.defaultNS = t.ns : t.ns.indexOf("translation") < 0 && (t.defaultNS = t.ns[0]));
1145
- const i = Ne();
1144
+ const i = Oe();
1146
1145
  this.options = {
1147
1146
  ...i,
1148
1147
  ...this.options,
1149
- ...Ee(t)
1148
+ ...Le(t)
1150
1149
  }, this.options.interpolation = {
1151
1150
  ...i.interpolation,
1152
1151
  ...this.options.interpolation
1153
1152
  }, t.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = t.keySeparator), t.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = t.nsSeparator);
1154
- const n = (f) => f ? typeof f == "function" ? new f() : f : null;
1153
+ const r = (f) => f ? typeof f == "function" ? new f() : f : null;
1155
1154
  if (!this.options.isClone) {
1156
- this.modules.logger ? E.init(n(this.modules.logger), this.options) : E.init(null, this.options);
1155
+ this.modules.logger ? P.init(r(this.modules.logger), this.options) : P.init(null, this.options);
1157
1156
  let f;
1158
- this.modules.formatter ? f = this.modules.formatter : f = nt;
1159
- const g = new Re(this.options);
1160
- this.store = new Ce(this.options.resources, this.options);
1157
+ this.modules.formatter ? f = this.modules.formatter : f = Ze;
1158
+ const h = new ye(this.options);
1159
+ this.store = new me(this.options.resources, this.options);
1161
1160
  const c = this.services;
1162
- c.logger = E, c.resourceStore = this.store, c.languageUtils = g, c.pluralResolver = new tt(g, {
1161
+ c.logger = P, c.resourceStore = this.store, c.languageUtils = h, c.pluralResolver = new Ye(h, {
1163
1162
  prepend: this.options.pluralSeparator,
1164
1163
  simplifyPluralSuffix: this.options.simplifyPluralSuffix
1165
- }), f && (!this.options.interpolation.format || this.options.interpolation.format === i.interpolation.format) && (c.formatter = n(f), c.formatter.init(c, this.options), this.options.interpolation.format = c.formatter.format.bind(c.formatter)), c.interpolator = new st(this.options), c.utils = {
1164
+ }), f && (!this.options.interpolation.format || this.options.interpolation.format === i.interpolation.format) && (c.formatter = r(f), c.formatter.init(c, this.options), this.options.interpolation.format = c.formatter.format.bind(c.formatter)), c.interpolator = new We(this.options), c.utils = {
1166
1165
  hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
1167
- }, c.backendConnector = new at(n(this.modules.backend), c.resourceStore, c, this.options), c.backendConnector.on("*", function(m) {
1168
- for (var h = arguments.length, p = new Array(h > 1 ? h - 1 : 0), v = 1; v < h; v++)
1166
+ }, c.backendConnector = new Xe(r(this.modules.backend), c.resourceStore, c, this.options), c.backendConnector.on("*", function(m) {
1167
+ for (var g = arguments.length, p = new Array(g > 1 ? g - 1 : 0), v = 1; v < g; v++)
1169
1168
  p[v - 1] = arguments[v];
1170
1169
  e.emit(m, ...p);
1171
- }), this.modules.languageDetector && (c.languageDetector = n(this.modules.languageDetector), c.languageDetector.init && c.languageDetector.init(c, this.options.detection, this.options)), this.modules.i18nFormat && (c.i18nFormat = n(this.modules.i18nFormat), c.i18nFormat.init && c.i18nFormat.init(this)), this.translator = new ie(this.services, this.options), this.translator.on("*", function(m) {
1172
- for (var h = arguments.length, p = new Array(h > 1 ? h - 1 : 0), v = 1; v < h; v++)
1170
+ }), this.modules.languageDetector && (c.languageDetector = r(this.modules.languageDetector), c.languageDetector.init && c.languageDetector.init(c, this.options.detection, this.options)), this.modules.i18nFormat && (c.i18nFormat = r(this.modules.i18nFormat), c.i18nFormat.init && c.i18nFormat.init(this)), this.translator = new q(this.services, this.options), this.translator.on("*", function(m) {
1171
+ for (var g = arguments.length, p = new Array(g > 1 ? g - 1 : 0), v = 1; v < g; v++)
1173
1172
  p[v - 1] = arguments[v];
1174
1173
  e.emit(m, ...p);
1175
1174
  }), this.modules.external.forEach((m) => {
1176
1175
  m.init && m.init(this);
1177
1176
  });
1178
1177
  }
1179
- if (this.format = this.options.interpolation.format, s || (s = Q), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
1178
+ if (this.format = this.options.interpolation.format, s || (s = W), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
1180
1179
  const f = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
1181
1180
  f.length > 0 && f[0] !== "dev" && (this.options.lng = f[0]);
1182
1181
  }
@@ -1189,9 +1188,9 @@ class Z extends ne {
1189
1188
  return e.store[f](...arguments), e;
1190
1189
  };
1191
1190
  });
1192
- const l = W(), u = () => {
1193
- const f = (g, c) => {
1194
- 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), l.resolve(c), s(g, c);
1191
+ const l = _(), u = () => {
1192
+ const f = (h, c) => {
1193
+ 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), l.resolve(c), s(h, c);
1195
1194
  };
1196
1195
  if (this.languages && !this.isInitialized) return f(null, this.t.bind(this));
1197
1196
  this.changeLanguage(this.options.lng, f);
@@ -1199,33 +1198,33 @@ class Z extends ne {
1199
1198
  return this.options.resources || !this.options.initAsync ? u() : setTimeout(u, 0), l;
1200
1199
  }
1201
1200
  loadResources(e) {
1202
- var n, a;
1203
- let s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Q;
1201
+ var r, n;
1202
+ let s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : W;
1204
1203
  const i = d(e) ? e : this.language;
1205
1204
  if (typeof e == "function" && (s = e), !this.options.resources || this.options.partialBundledLanguages) {
1206
1205
  if ((i == null ? void 0 : i.toLowerCase()) === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return s();
1207
1206
  const o = [], l = (u) => {
1208
1207
  if (!u || u === "cimode") return;
1209
- this.services.languageUtils.toResolveHierarchy(u).forEach((g) => {
1210
- g !== "cimode" && o.indexOf(g) < 0 && o.push(g);
1208
+ this.services.languageUtils.toResolveHierarchy(u).forEach((h) => {
1209
+ h !== "cimode" && o.indexOf(h) < 0 && o.push(h);
1211
1210
  });
1212
1211
  };
1213
- i ? l(i) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((f) => l(f)), (a = (n = this.options.preload) == null ? void 0 : n.forEach) == null || a.call(n, (u) => l(u)), this.services.backendConnector.load(o, this.options.ns, (u) => {
1212
+ i ? l(i) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((f) => l(f)), (n = (r = this.options.preload) == null ? void 0 : r.forEach) == null || n.call(r, (u) => l(u)), this.services.backendConnector.load(o, this.options.ns, (u) => {
1214
1213
  !u && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language), s(u);
1215
1214
  });
1216
1215
  } else
1217
1216
  s(null);
1218
1217
  }
1219
1218
  reloadResources(e, t, s) {
1220
- const i = W();
1221
- return typeof e == "function" && (s = e, e = void 0), typeof t == "function" && (s = t, t = void 0), e || (e = this.languages), t || (t = this.options.ns), s || (s = Q), this.services.backendConnector.reload(e, t, (n) => {
1222
- i.resolve(), s(n);
1219
+ const i = _();
1220
+ return typeof e == "function" && (s = e, e = void 0), typeof t == "function" && (s = t, t = void 0), e || (e = this.languages), t || (t = this.options.ns), s || (s = W), this.services.backendConnector.reload(e, t, (r) => {
1221
+ i.resolve(), s(r);
1223
1222
  }), i;
1224
1223
  }
1225
1224
  use(e) {
1226
1225
  if (!e) throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");
1227
1226
  if (!e.type) throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");
1228
- 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" && je.addPostProcessor(e), e.type === "formatter" && (this.modules.formatter = e), e.type === "3rdParty" && this.modules.external.push(e), this;
1227
+ 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" && Pe.addPostProcessor(e), e.type === "formatter" && (this.modules.formatter = e), e.type === "3rdParty" && this.modules.external.push(e), this;
1229
1228
  }
1230
1229
  setResolvedLanguage(e) {
1231
1230
  if (!(!e || !this.languages) && !(["cimode", "dev"].indexOf(e) > -1))
@@ -1240,44 +1239,44 @@ class Z extends ne {
1240
1239
  changeLanguage(e, t) {
1241
1240
  var s = this;
1242
1241
  this.isLanguageChangingTo = e;
1243
- const i = W();
1242
+ const i = _();
1244
1243
  this.emit("languageChanging", e);
1245
- const n = (l) => {
1244
+ const r = (l) => {
1246
1245
  this.language = l, this.languages = this.services.languageUtils.toResolveHierarchy(l), this.resolvedLanguage = void 0, this.setResolvedLanguage(l);
1247
- }, a = (l, u) => {
1248
- u ? (n(u), this.translator.changeLanguage(u), this.isLanguageChangingTo = void 0, this.emit("languageChanged", u), this.logger.log("languageChanged", u)) : this.isLanguageChangingTo = void 0, i.resolve(function() {
1246
+ }, n = (l, u) => {
1247
+ u ? (r(u), this.translator.changeLanguage(u), this.isLanguageChangingTo = void 0, this.emit("languageChanged", u), this.logger.log("languageChanged", u)) : this.isLanguageChangingTo = void 0, i.resolve(function() {
1249
1248
  return s.t(...arguments);
1250
1249
  }), t && t(l, function() {
1251
1250
  return s.t(...arguments);
1252
1251
  });
1253
1252
  }, o = (l) => {
1254
- var f, g;
1253
+ var f, h;
1255
1254
  !e && !l && this.services.languageDetector && (l = []);
1256
1255
  const u = d(l) ? l : this.services.languageUtils.getBestMatchFromCodes(l);
1257
- u && (this.language || n(u), this.translator.language || this.translator.changeLanguage(u), (g = (f = this.services.languageDetector) == null ? void 0 : f.cacheUserLanguage) == null || g.call(f, u)), this.loadResources(u, (c) => {
1258
- a(c, u);
1256
+ u && (this.language || r(u), this.translator.language || this.translator.changeLanguage(u), (h = (f = this.services.languageDetector) == null ? void 0 : f.cacheUserLanguage) == null || h.call(f, u)), this.loadResources(u, (c) => {
1257
+ n(c, u);
1259
1258
  });
1260
1259
  };
1261
1260
  return !e && this.services.languageDetector && !this.services.languageDetector.async ? o(this.services.languageDetector.detect()) : !e && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect.length === 0 ? this.services.languageDetector.detect().then(o) : this.services.languageDetector.detect(o) : o(e), i;
1262
1261
  }
1263
1262
  getFixedT(e, t, s) {
1264
1263
  var i = this;
1265
- const n = function(a, o) {
1264
+ const r = function(n, o) {
1266
1265
  let l;
1267
1266
  if (typeof o != "object") {
1268
- for (var u = arguments.length, f = new Array(u > 2 ? u - 2 : 0), g = 2; g < u; g++)
1269
- f[g - 2] = arguments[g];
1270
- l = i.options.overloadTranslationOptionHandler([a, o].concat(f));
1267
+ for (var u = arguments.length, f = new Array(u > 2 ? u - 2 : 0), h = 2; h < u; h++)
1268
+ f[h - 2] = arguments[h];
1269
+ l = i.options.overloadTranslationOptionHandler([n, o].concat(f));
1271
1270
  } else
1272
1271
  l = {
1273
1272
  ...o
1274
1273
  };
1275
- l.lng = l.lng || n.lng, l.lngs = l.lngs || n.lngs, l.ns = l.ns || n.ns, l.keyPrefix !== "" && (l.keyPrefix = l.keyPrefix || s || n.keyPrefix);
1274
+ l.lng = l.lng || r.lng, l.lngs = l.lngs || r.lngs, l.ns = l.ns || r.ns, l.keyPrefix !== "" && (l.keyPrefix = l.keyPrefix || s || r.keyPrefix);
1276
1275
  const c = i.options.keySeparator || ".";
1277
1276
  let m;
1278
- return l.keyPrefix && Array.isArray(a) ? m = a.map((h) => `${l.keyPrefix}${c}${h}`) : m = l.keyPrefix ? `${l.keyPrefix}${c}${a}` : a, i.t(m, l);
1277
+ return l.keyPrefix && Array.isArray(n) ? m = n.map((g) => `${l.keyPrefix}${c}${g}`) : m = l.keyPrefix ? `${l.keyPrefix}${c}${n}` : n, i.t(m, l);
1279
1278
  };
1280
- return d(e) ? n.lng = e : n.lngs = e, n.ns = t, n.keyPrefix = s, n;
1279
+ return d(e) ? r.lng = e : r.lngs = e, r.ns = t, r.keyPrefix = s, r;
1281
1280
  }
1282
1281
  t() {
1283
1282
  var i;
@@ -1300,20 +1299,20 @@ class Z extends ne {
1300
1299
  return this.logger.warn("hasLoadedNamespace: i18next was not initialized", this.languages), !1;
1301
1300
  if (!this.languages || !this.languages.length)
1302
1301
  return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty", this.languages), !1;
1303
- const s = t.lng || this.resolvedLanguage || this.languages[0], i = this.options ? this.options.fallbackLng : !1, n = this.languages[this.languages.length - 1];
1302
+ const s = t.lng || this.resolvedLanguage || this.languages[0], i = this.options ? this.options.fallbackLng : !1, r = this.languages[this.languages.length - 1];
1304
1303
  if (s.toLowerCase() === "cimode") return !0;
1305
- const a = (o, l) => {
1304
+ const n = (o, l) => {
1306
1305
  const u = this.services.backendConnector.state[`${o}|${l}`];
1307
1306
  return u === -1 || u === 0 || u === 2;
1308
1307
  };
1309
1308
  if (t.precheck) {
1310
- const o = t.precheck(this, a);
1309
+ const o = t.precheck(this, n);
1311
1310
  if (o !== void 0) return o;
1312
1311
  }
1313
- return !!(this.hasResourceBundle(s, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || a(s, e) && (!i || a(n, e)));
1312
+ return !!(this.hasResourceBundle(s, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || n(s, e) && (!i || n(r, e)));
1314
1313
  }
1315
1314
  loadNamespaces(e, t) {
1316
- const s = W();
1315
+ const s = _();
1317
1316
  return this.options.ns ? (d(e) && (e = [e]), e.forEach((i) => {
1318
1317
  this.options.ns.indexOf(i) < 0 && this.options.ns.push(i);
1319
1318
  }), this.loadResources((i) => {
@@ -1321,53 +1320,53 @@ class Z extends ne {
1321
1320
  }), s) : (t && t(), Promise.resolve());
1322
1321
  }
1323
1322
  loadLanguages(e, t) {
1324
- const s = W();
1323
+ const s = _();
1325
1324
  d(e) && (e = [e]);
1326
- const i = this.options.preload || [], n = e.filter((a) => i.indexOf(a) < 0 && this.services.languageUtils.isSupportedCode(a));
1327
- return n.length ? (this.options.preload = i.concat(n), this.loadResources((a) => {
1328
- s.resolve(), t && t(a);
1325
+ const i = this.options.preload || [], r = e.filter((n) => i.indexOf(n) < 0 && this.services.languageUtils.isSupportedCode(n));
1326
+ return r.length ? (this.options.preload = i.concat(r), this.loadResources((n) => {
1327
+ s.resolve(), t && t(n);
1329
1328
  }), s) : (t && t(), Promise.resolve());
1330
1329
  }
1331
1330
  dir(e) {
1332
- var i, n;
1331
+ var i, r;
1333
1332
  if (e || (e = this.resolvedLanguage || (((i = this.languages) == null ? void 0 : i.length) > 0 ? this.languages[0] : this.language)), !e) return "rtl";
1334
- 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"], s = ((n = this.services) == null ? void 0 : n.languageUtils) || new Re(Ne());
1333
+ 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"], s = ((r = this.services) == null ? void 0 : r.languageUtils) || new ye(Oe());
1335
1334
  return t.indexOf(s.getLanguagePartFromCode(e)) > -1 || e.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
1336
1335
  }
1337
1336
  static createInstance() {
1338
1337
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 ? arguments[1] : void 0;
1339
- return new Z(e, t);
1338
+ return new J(e, t);
1340
1339
  }
1341
1340
  cloneInstance() {
1342
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Q;
1341
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : W;
1343
1342
  const s = e.forkResourceStore;
1344
1343
  s && delete e.forkResourceStore;
1345
1344
  const i = {
1346
1345
  ...this.options,
1347
1346
  ...e,
1348
1347
  isClone: !0
1349
- }, n = new Z(i);
1350
- if ((e.debug !== void 0 || e.prefix !== void 0) && (n.logger = n.logger.clone(e)), ["store", "services", "language"].forEach((o) => {
1351
- n[o] = this[o];
1352
- }), n.services = {
1348
+ }, r = new J(i);
1349
+ if ((e.debug !== void 0 || e.prefix !== void 0) && (r.logger = r.logger.clone(e)), ["store", "services", "language"].forEach((o) => {
1350
+ r[o] = this[o];
1351
+ }), r.services = {
1353
1352
  ...this.services
1354
- }, n.services.utils = {
1355
- hasLoadedNamespace: n.hasLoadedNamespace.bind(n)
1353
+ }, r.services.utils = {
1354
+ hasLoadedNamespace: r.hasLoadedNamespace.bind(r)
1356
1355
  }, s) {
1357
1356
  const o = Object.keys(this.store.data).reduce((l, u) => (l[u] = {
1358
1357
  ...this.store.data[u]
1359
- }, Object.keys(l[u]).reduce((f, g) => (f[g] = {
1360
- ...l[u][g]
1358
+ }, Object.keys(l[u]).reduce((f, h) => (f[h] = {
1359
+ ...l[u][h]
1361
1360
  }, f), {})), {});
1362
- n.store = new Ce(o, i), n.services.resourceStore = n.store;
1361
+ r.store = new me(o, i), r.services.resourceStore = r.store;
1363
1362
  }
1364
- return n.translator = new ie(n.services, i), n.translator.on("*", function(o) {
1363
+ return r.translator = new q(r.services, i), r.translator.on("*", function(o) {
1365
1364
  for (var l = arguments.length, u = new Array(l > 1 ? l - 1 : 0), f = 1; f < l; f++)
1366
1365
  u[f - 1] = arguments[f];
1367
- n.emit(o, ...u);
1368
- }), n.init(i, t), n.translator.options = i, n.translator.backendConnector.services.utils = {
1369
- hasLoadedNamespace: n.hasLoadedNamespace.bind(n)
1370
- }, n;
1366
+ r.emit(o, ...u);
1367
+ }), r.init(i, t), r.translator.options = i, r.translator.backendConnector.services.utils = {
1368
+ hasLoadedNamespace: r.hasLoadedNamespace.bind(r)
1369
+ }, r;
1371
1370
  }
1372
1371
  toJSON() {
1373
1372
  return {
@@ -1379,77 +1378,77 @@ class Z extends ne {
1379
1378
  };
1380
1379
  }
1381
1380
  }
1382
- const O = Z.createInstance();
1383
- O.createInstance = Z.createInstance;
1384
- O.createInstance;
1385
- O.dir;
1386
- O.init;
1387
- O.loadResources;
1388
- O.reloadResources;
1389
- O.use;
1390
- O.changeLanguage;
1391
- O.getFixedT;
1392
- O.t;
1393
- O.exists;
1394
- O.setDefaultNamespace;
1395
- O.hasLoadedNamespace;
1396
- O.loadNamespaces;
1397
- O.loadLanguages;
1398
- var lt = (r, e) => typeof e == "bigint" ? e.toString() : e;
1399
- function oe(r, e = " | ") {
1400
- return r.map((t) => typeof t == "string" ? `'${t}'` : t).join(e);
1381
+ const b = J.createInstance();
1382
+ b.createInstance = J.createInstance;
1383
+ b.createInstance;
1384
+ b.dir;
1385
+ b.init;
1386
+ b.loadResources;
1387
+ b.reloadResources;
1388
+ b.use;
1389
+ b.changeLanguage;
1390
+ b.getFixedT;
1391
+ b.t;
1392
+ b.exists;
1393
+ b.setDefaultNamespace;
1394
+ b.hasLoadedNamespace;
1395
+ b.loadNamespaces;
1396
+ b.loadLanguages;
1397
+ var et = (a, e) => typeof e == "bigint" ? e.toString() : e;
1398
+ function se(a, e = " | ") {
1399
+ return a.map((t) => typeof t == "string" ? `'${t}'` : t).join(e);
1401
1400
  }
1402
- var Ie = (r) => {
1403
- if (typeof r != "object" || r === null)
1401
+ var Ce = (a) => {
1402
+ if (typeof a != "object" || a === null)
1404
1403
  return !1;
1405
- for (const e in r)
1406
- if (!Object.prototype.hasOwnProperty.call(r, e))
1404
+ for (const e in a)
1405
+ if (!Object.prototype.hasOwnProperty.call(a, e))
1407
1406
  return !1;
1408
1407
  return !0;
1409
- }, ut = (r, e) => {
1410
- if (typeof r == "string")
1411
- return { key: r, values: {} };
1412
- if (Ie(r)) {
1413
- const t = "key" in r && typeof r.key == "string" ? r.key : e, s = "values" in r && Ie(r.values) ? r.values : {};
1408
+ }, tt = (a, e) => {
1409
+ if (typeof a == "string")
1410
+ return { key: a, values: {} };
1411
+ if (Ce(a)) {
1412
+ const t = "key" in a && typeof a.key == "string" ? a.key : e, s = "values" in a && Ce(a.values) ? a.values : {};
1414
1413
  return { key: t, values: s };
1415
1414
  }
1416
1415
  return { key: e, values: {} };
1417
- }, ke = "zod", ct = (r) => (e, t) => {
1416
+ }, we = "zod", st = (a) => (e, t) => {
1418
1417
  var l;
1419
- const { t: s, ns: i, handlePath: n } = {
1420
- t: O.t,
1421
- ns: ke,
1422
- ...r,
1423
- handlePath: (r == null ? void 0 : r.handlePath) !== !1 ? {
1418
+ const { t: s, ns: i, handlePath: r } = {
1419
+ t: b.t,
1420
+ ns: we,
1421
+ ...a,
1422
+ handlePath: (a == null ? void 0 : a.handlePath) !== !1 ? {
1424
1423
  context: "with_path",
1425
- ns: (r == null ? void 0 : r.ns) ?? ke,
1424
+ ns: (a == null ? void 0 : a.ns) ?? we,
1426
1425
  keyPrefix: void 0,
1427
- ...r == null ? void 0 : r.handlePath
1426
+ ...a == null ? void 0 : a.handlePath
1428
1427
  } : null
1429
1428
  };
1430
- let a;
1431
- a = Ue(e, t).message;
1432
- const o = e.path.length > 0 && n ? {
1433
- context: n.context,
1429
+ let n;
1430
+ n = je(e, t).message;
1431
+ const o = e.path.length > 0 && r ? {
1432
+ context: r.context,
1434
1433
  path: s(
1435
- [n.keyPrefix, e.path.join(".")].filter(Boolean).join("."),
1434
+ [r.keyPrefix, e.path.join(".")].filter(Boolean).join("."),
1436
1435
  {
1437
- ns: n.ns,
1436
+ ns: r.ns,
1438
1437
  defaultValue: e.path.join(".")
1439
1438
  }
1440
1439
  )
1441
1440
  } : {};
1442
1441
  switch (e.code) {
1443
1442
  case S.invalid_type:
1444
- e.received === ye.undefined ? a = s("errors.invalid_type_received_undefined", {
1443
+ e.received === fe.undefined ? n = s("errors.invalid_type_received_undefined", {
1445
1444
  ns: i,
1446
- defaultValue: a,
1445
+ defaultValue: n,
1447
1446
  ...o
1448
- }) : e.received === ye.null ? a = s("errors.invalid_type_received_null", {
1447
+ }) : e.received === fe.null ? n = s("errors.invalid_type_received_null", {
1449
1448
  ns: i,
1450
- defaultValue: a,
1449
+ defaultValue: n,
1451
1450
  ...o
1452
- }) : a = s("errors.invalid_type", {
1451
+ }) : n = s("errors.invalid_type", {
1453
1452
  expected: s(`types.${e.expected}`, {
1454
1453
  defaultValue: e.expected,
1455
1454
  ns: i
@@ -1459,560 +1458,353 @@ var Ie = (r) => {
1459
1458
  ns: i
1460
1459
  }),
1461
1460
  ns: i,
1462
- defaultValue: a,
1461
+ defaultValue: n,
1463
1462
  ...o
1464
1463
  });
1465
1464
  break;
1466
1465
  case S.invalid_literal:
1467
- a = s("errors.invalid_literal", {
1468
- expected: JSON.stringify(e.expected, lt),
1466
+ n = s("errors.invalid_literal", {
1467
+ expected: JSON.stringify(e.expected, et),
1469
1468
  ns: i,
1470
- defaultValue: a,
1469
+ defaultValue: n,
1471
1470
  ...o
1472
1471
  });
1473
1472
  break;
1474
1473
  case S.unrecognized_keys:
1475
- a = s("errors.unrecognized_keys", {
1476
- keys: oe(e.keys, ", "),
1474
+ n = s("errors.unrecognized_keys", {
1475
+ keys: se(e.keys, ", "),
1477
1476
  count: e.keys.length,
1478
1477
  ns: i,
1479
- defaultValue: a,
1478
+ defaultValue: n,
1480
1479
  ...o
1481
1480
  });
1482
1481
  break;
1483
1482
  case S.invalid_union:
1484
- a = s("errors.invalid_union", {
1483
+ n = s("errors.invalid_union", {
1485
1484
  ns: i,
1486
- defaultValue: a,
1485
+ defaultValue: n,
1487
1486
  ...o
1488
1487
  });
1489
1488
  break;
1490
1489
  case S.invalid_union_discriminator:
1491
- a = s("errors.invalid_union_discriminator", {
1492
- options: oe(e.options),
1490
+ n = s("errors.invalid_union_discriminator", {
1491
+ options: se(e.options),
1493
1492
  ns: i,
1494
- defaultValue: a,
1493
+ defaultValue: n,
1495
1494
  ...o
1496
1495
  });
1497
1496
  break;
1498
1497
  case S.invalid_enum_value:
1499
- a = s("errors.invalid_enum_value", {
1500
- options: oe(e.options),
1498
+ n = s("errors.invalid_enum_value", {
1499
+ options: se(e.options),
1501
1500
  received: e.received,
1502
1501
  ns: i,
1503
- defaultValue: a,
1502
+ defaultValue: n,
1504
1503
  ...o
1505
1504
  });
1506
1505
  break;
1507
1506
  case S.invalid_arguments:
1508
- a = s("errors.invalid_arguments", {
1507
+ n = s("errors.invalid_arguments", {
1509
1508
  ns: i,
1510
- defaultValue: a,
1509
+ defaultValue: n,
1511
1510
  ...o
1512
1511
  });
1513
1512
  break;
1514
1513
  case S.invalid_return_type:
1515
- a = s("errors.invalid_return_type", {
1514
+ n = s("errors.invalid_return_type", {
1516
1515
  ns: i,
1517
- defaultValue: a,
1516
+ defaultValue: n,
1518
1517
  ...o
1519
1518
  });
1520
1519
  break;
1521
1520
  case S.invalid_date:
1522
- a = s("errors.invalid_date", {
1521
+ n = s("errors.invalid_date", {
1523
1522
  ns: i,
1524
- defaultValue: a,
1523
+ defaultValue: n,
1525
1524
  ...o
1526
1525
  });
1527
1526
  break;
1528
1527
  case S.invalid_string:
1529
- typeof e.validation == "object" ? "startsWith" in e.validation ? a = s("errors.invalid_string.startsWith", {
1528
+ typeof e.validation == "object" ? "startsWith" in e.validation ? n = s("errors.invalid_string.startsWith", {
1530
1529
  startsWith: e.validation.startsWith,
1531
1530
  ns: i,
1532
- defaultValue: a,
1531
+ defaultValue: n,
1533
1532
  ...o
1534
- }) : "endsWith" in e.validation && (a = s("errors.invalid_string.endsWith", {
1533
+ }) : "endsWith" in e.validation && (n = s("errors.invalid_string.endsWith", {
1535
1534
  endsWith: e.validation.endsWith,
1536
1535
  ns: i,
1537
- defaultValue: a,
1536
+ defaultValue: n,
1538
1537
  ...o
1539
- })) : a = s(`errors.invalid_string.${e.validation}`, {
1538
+ })) : n = s(`errors.invalid_string.${e.validation}`, {
1540
1539
  validation: s(`validations.${e.validation}`, {
1541
1540
  defaultValue: e.validation,
1542
1541
  ns: i
1543
1542
  }),
1544
1543
  ns: i,
1545
- defaultValue: a,
1544
+ defaultValue: n,
1546
1545
  ...o
1547
1546
  });
1548
1547
  break;
1549
1548
  case S.too_small:
1550
1549
  const u = e.type === "date" ? new Date(e.minimum) : e.minimum;
1551
- a = s(
1550
+ n = s(
1552
1551
  `errors.too_small.${e.type}.${e.exact ? "exact" : e.inclusive ? "inclusive" : "not_inclusive"}`,
1553
1552
  {
1554
1553
  minimum: u,
1555
1554
  count: typeof u == "number" ? u : void 0,
1556
1555
  ns: i,
1557
- defaultValue: a,
1556
+ defaultValue: n,
1558
1557
  ...o
1559
1558
  }
1560
1559
  );
1561
1560
  break;
1562
1561
  case S.too_big:
1563
1562
  const f = e.type === "date" ? new Date(e.maximum) : e.maximum;
1564
- a = s(
1563
+ n = s(
1565
1564
  `errors.too_big.${e.type}.${e.exact ? "exact" : e.inclusive ? "inclusive" : "not_inclusive"}`,
1566
1565
  {
1567
1566
  maximum: f,
1568
1567
  count: typeof f == "number" ? f : void 0,
1569
1568
  ns: i,
1570
- defaultValue: a,
1569
+ defaultValue: n,
1571
1570
  ...o
1572
1571
  }
1573
1572
  );
1574
1573
  break;
1575
1574
  case S.custom:
1576
- const { key: g, values: c } = ut(
1575
+ const { key: h, values: c } = tt(
1577
1576
  (l = e.params) == null ? void 0 : l.i18n,
1578
1577
  "errors.custom"
1579
1578
  );
1580
- a = s(g, {
1579
+ n = s(h, {
1581
1580
  ...c,
1582
1581
  ns: i,
1583
- defaultValue: a,
1582
+ defaultValue: n,
1584
1583
  ...o
1585
1584
  });
1586
1585
  break;
1587
1586
  case S.invalid_intersection_types:
1588
- a = s("errors.invalid_intersection_types", {
1587
+ n = s("errors.invalid_intersection_types", {
1589
1588
  ns: i,
1590
- defaultValue: a,
1589
+ defaultValue: n,
1591
1590
  ...o
1592
1591
  });
1593
1592
  break;
1594
1593
  case S.not_multiple_of:
1595
- a = s("errors.not_multiple_of", {
1594
+ n = s("errors.not_multiple_of", {
1596
1595
  multipleOf: e.multipleOf,
1597
1596
  ns: i,
1598
- defaultValue: a,
1597
+ defaultValue: n,
1599
1598
  ...o
1600
1599
  });
1601
1600
  break;
1602
1601
  case S.not_finite:
1603
- a = s("errors.not_finite", {
1602
+ n = s("errors.not_finite", {
1604
1603
  ns: i,
1605
- defaultValue: a,
1604
+ defaultValue: n,
1606
1605
  ...o
1607
1606
  });
1608
1607
  break;
1609
1608
  }
1610
- return { message: a };
1609
+ return { message: n };
1611
1610
  };
1612
- const ft = He({
1613
- locale: he(),
1614
- messages: De
1611
+ const it = Ie({
1612
+ locale: ae(),
1613
+ messages: Re
1615
1614
  });
1616
- console.log(he());
1617
- O.init({
1618
- lng: he(),
1619
- resources: De
1615
+ console.log(ae());
1616
+ b.init({
1617
+ lng: ae(),
1618
+ resources: Re
1620
1619
  });
1621
- Ke.setErrorMap(ct({ ns: ["connectZod", "connectZodCustom"] }));
1622
- const fe = ft;
1623
- function N(r) {
1624
- return Y(
1620
+ Fe.setErrorMap(st({ ns: ["connectZod", "connectZodCustom"] }));
1621
+ const ne = it;
1622
+ function $(a) {
1623
+ return B(
1625
1624
  "div",
1626
1625
  {
1627
- class: `${r.chipClass} gap-4 h-[22px] inline-flex items-center justify-center min-w-min px-8 rounded-md`
1626
+ class: `${a.chipClass} gap-4 h-[22px] inline-flex items-center justify-center min-w-min px-8 rounded-md`
1628
1627
  },
1629
1628
  [
1630
- Y(le.FmIcon, { size: "sm", name: r.icon, outline: !0 }),
1631
- Y("span", { class: "fm-typo-en-body-md-600" }, r.name)
1629
+ B(ie.FmIcon, { size: "sm", name: a.icon, outline: !0 }),
1630
+ B("span", { class: "fm-typo-en-body-md-600" }, a.name)
1632
1631
  ]
1633
1632
  );
1634
1633
  }
1635
- const $t = {
1636
- [$.enum.CREDIT]: {
1634
+ const xt = {
1635
+ [R.enum.CREDIT]: {
1637
1636
  chipClass: "!text-fm-color-secondary-plum !bg-[#f2ebfe]",
1638
1637
  icon: "local_activity",
1639
1638
  name: "Credit",
1640
1639
  chip() {
1641
- return N(this);
1640
+ return $(this);
1642
1641
  }
1643
1642
  },
1644
- [$.enum.PROMOTION]: {
1643
+ [R.enum.PROMOTION]: {
1645
1644
  chipClass: "!text-fm-color-secondary-citrus !bg-fm-color-system-warning-100",
1646
1645
  icon: "loyalty",
1647
1646
  name: "Promotion",
1648
1647
  chip() {
1649
- return N(this);
1648
+ return $(this);
1650
1649
  }
1651
1650
  },
1652
- [$.enum.VOUCHER]: {
1651
+ [R.enum.VOUCHER]: {
1653
1652
  chipClass: "!text-fm-color-secondary-halite !bg-[#fff0f6]",
1654
1653
  icon: "sell",
1655
- name: fe.global.t("connect.campaign.voucher.title"),
1654
+ name: ne.global.t("connect.campaign.voucher.title"),
1656
1655
  chip() {
1657
- return N(this);
1656
+ return $(this);
1658
1657
  }
1659
1658
  },
1660
- [$.enum.POINT]: {
1659
+ [R.enum.POINT]: {
1661
1660
  chipClass: "!text-fm-color-secondary-cocoa !bg-[#fff9e6]",
1662
1661
  icon: "award_star",
1663
1662
  name: "Experience",
1664
1663
  chip() {
1665
- return N(this);
1664
+ return $(this);
1666
1665
  }
1667
1666
  },
1668
- [$.enum.BROADCAST]: {
1667
+ [R.enum.BROADCAST]: {
1669
1668
  chipClass: "!text-fm-color-typo-info !bg-fm-color-system-info-100",
1670
1669
  icon: "campaign",
1671
1670
  name: "Broadcast",
1672
1671
  chip() {
1673
- return N(this);
1672
+ return $(this);
1674
1673
  }
1675
1674
  },
1676
- [$.enum.GAME]: {
1675
+ [R.enum.GAME]: {
1677
1676
  chipClass: "!text-fm-color-secondary-mint !bg-fm-color-system-success-100",
1678
1677
  icon: "database",
1679
1678
  name: "Token",
1680
1679
  chip() {
1681
- return N(this);
1680
+ return $(this);
1682
1681
  }
1683
1682
  },
1684
- [$.enum.REWARD_POOL]: {
1683
+ [R.enum.REWARD_POOL]: {
1685
1684
  chipClass: "!text-fm-color-secondary-tuna !bg-[#e3f4f9]",
1686
1685
  icon: "editor_choice",
1687
1686
  name: "Reward Pool",
1688
1687
  chip() {
1689
- return N(this);
1688
+ return $(this);
1690
1689
  }
1691
1690
  },
1692
- [$.enum.COIN]: {
1691
+ [R.enum.COIN]: {
1693
1692
  chipClass: "!text-fm-color-system-success-400 !bg-fm-color-system-success-100",
1694
1693
  icon: "monetization_on",
1695
1694
  name: "Point",
1696
1695
  chip() {
1697
- return N(this);
1696
+ return $(this);
1698
1697
  }
1699
1698
  },
1700
- [$.enum.MEMBERSHIP]: {
1699
+ [R.enum.MEMBERSHIP]: {
1701
1700
  chipClass: "",
1702
1701
  icon: "",
1703
1702
  name: "Membership",
1704
1703
  chip() {
1705
- return N(this);
1704
+ return $(this);
1706
1705
  }
1707
1706
  },
1708
1707
  // TODO: confirm color
1709
- [$.enum.MISSION]: {
1708
+ [R.enum.MISSION]: {
1710
1709
  chipClass: "!text-fm-color-secondary-tuna !bg-[#e3f4f9]",
1711
1710
  icon: "editor_choice",
1712
1711
  name: "Mission",
1713
1712
  chip() {
1714
- return N(this);
1713
+ return $(this);
1715
1714
  }
1716
1715
  }
1717
1716
  };
1718
- function Nt(r) {
1719
- const e = gt(r), t = {
1717
+ function bt(a) {
1718
+ const e = rt(a), t = {
1720
1719
  active: "text-fm-color-typo-success bg-fm-color-system-success-100",
1721
1720
  upcoming: "text-fm-color-typo-info bg-fm-color-system-info-100",
1722
1721
  expired: "text-fm-color-typo-error bg-fm-color-system-error-100"
1723
1722
  };
1724
- return r.type == "VOUCHER" ? Y(le.FmChip, {
1723
+ return a.type == "VOUCHER" ? B(ie.FmChip, {
1725
1724
  class: t[e],
1726
- label: ve.title(fe.global.t(`connect.campaign.common.status.${e}`)),
1725
+ label: ce.title(ne.global.t(`connect.campaign.common.status.${e}`)),
1727
1726
  compact: !0
1728
- }) : Y(le.FmChip, {
1727
+ }) : B(ie.FmChip, {
1729
1728
  class: t[e],
1730
- label: ve.title(fe.global.t(`connect.campaign.common.status.${e}`)),
1729
+ label: ce.title(ne.global.t(`connect.campaign.common.status.${e}`)),
1731
1730
  compact: !0
1732
1731
  });
1733
1732
  }
1734
- function Et(r) {
1735
- const { campaign: e } = r;
1733
+ function St(a) {
1734
+ const { campaign: e } = a;
1736
1735
  function t(s) {
1737
1736
  if (!s || !s.start && !s.end)
1738
1737
  return "connect.campaign.common.always";
1739
- const i = s.start ? V(s.start).format("DD MMM YYYY") : "From campaign creation", n = s.end ? V(s.end).format("DD MMM YYYY") : "Never ends";
1740
- return `${i} - ${n}`;
1738
+ const i = s.start ? F(s.start).format("DD MMM YYYY") : "From campaign creation", r = s.end ? F(s.end).format("DD MMM YYYY") : "Never ends";
1739
+ return `${i} - ${r}`;
1741
1740
  }
1742
1741
  return {
1743
1742
  "connect.campaign.common.campaign_name": e.name,
1744
1743
  "connect.campaign.common.campaign_period": t(e.timeframeOptions),
1745
1744
  get "connect.campaign.common.next_schedule_at"() {
1746
- if (e.event.type != "SCHEDULE" || !e.event.rule || !ge(e.event.rule))
1745
+ if (e.event.type != "SCHEDULE" || !e.event.rule || !Ne(e.event.rule))
1747
1746
  return;
1748
- const s = Me(
1747
+ const s = Ee(
1749
1748
  e.event.rule.rules.g_schedule
1750
1749
  );
1751
- return s ? V(s).format("ddd, DD MMM YYYY, hh:mmA") : void 0;
1750
+ return s ? F(s).format("ddd, DD MMM YYYY, hh:mmA") : void 0;
1752
1751
  },
1753
1752
  get "connect.campaign.common.discount_type"() {
1754
- if (e.type == "PROMOTION") return X(e.effect);
1755
- if ("configs" in r && r.configs.type == "VOUCHER")
1756
- return X(r.configs.extras.effect);
1753
+ if (e.type == "PROMOTION") return G(e.effect);
1754
+ if ("configs" in a && a.configs.type == "VOUCHER")
1755
+ return G(a.configs.extras.effect);
1757
1756
  },
1758
1757
  get "connect.campaign.common.available_at"() {
1759
1758
  return e.targetLocation ? e.targetLocation.length > 0 ? e.targetLocation.map(
1760
- (s) => _e().locationItems.find((i) => i.value == s).label
1759
+ (s) => Ve().locationItems.find((i) => i.value == s).label
1761
1760
  ).join(",") : "connect.campaign.common.no_location" : "connect.campaign.common.all_locations";
1762
1761
  }
1763
1762
  };
1764
1763
  }
1765
- function gt(r) {
1766
- return r.timeframeOptions && r.timeframeOptions.type == "timeframe" ? V().isBetween(
1767
- r.timeframeOptions.start ?? V().subtract(1, "d"),
1768
- r.timeframeOptions.end ?? V().add(1, "d")
1769
- ) ? "active" : V().isAfter(r.timeframeOptions.end) ? "expired" : "upcoming" : "active";
1764
+ function rt(a) {
1765
+ return a.timeframeOptions && a.timeframeOptions.type == "timeframe" ? F().isBetween(
1766
+ a.timeframeOptions.start ?? F().subtract(1, "d"),
1767
+ a.timeframeOptions.end ?? F().add(1, "d")
1768
+ ) ? "active" : F().isAfter(a.timeframeOptions.end) ? "expired" : "upcoming" : "active";
1770
1769
  }
1771
- function It(r) {
1770
+ function Ot(a) {
1772
1771
  var e, t;
1773
- switch (r.event.type) {
1772
+ switch (a.event.type) {
1774
1773
  case "BILL_COMPLETED":
1775
- const s = `Spend to get ${A.formattedType(r.type)}`;
1776
- switch (r.type) {
1774
+ const s = `Spend to get ${j.formattedType(a.type)}`;
1775
+ switch (a.type) {
1777
1776
  case "POINT":
1778
1777
  case "CREDIT":
1779
1778
  case "COIN":
1780
- return r.earningOption.type == "FIXED" ? `Spend to get ${r.earningOption.amount} ${A.formattedType(r.type)}` : `Every ${r.earningOption.every} amount spent get ${r.earningOption.amount} ${A.formattedType(r.type)}`;
1779
+ return a.earningOption.type == "FIXED" ? `Spend to get ${a.earningOption.amount} ${j.formattedType(a.type)}` : `Every ${a.earningOption.every} amount spent get ${a.earningOption.amount} ${j.formattedType(a.type)}`;
1781
1780
  case "VOUCHER":
1782
- const i = (t = (e = r == null ? void 0 : r.pf_collectible) == null ? void 0 : e.extras) == null ? void 0 : t.effect;
1783
- return i ? `${s} - ${X(i)}` : s;
1781
+ const i = (t = (e = a == null ? void 0 : a.pf_collectible) == null ? void 0 : e.extras) == null ? void 0 : t.effect;
1782
+ return i ? `${s} - ${G(i)}` : s;
1784
1783
  default:
1785
1784
  return s;
1786
1785
  }
1787
1786
  case "FEEDBACK":
1788
- return `Give feedback to receive ${A.formattedType(r.type)}`;
1787
+ return `Give feedback to receive ${j.formattedType(a.type)}`;
1789
1788
  case "SCHEDULE":
1790
- return `Receive ${A.formattedType(r.type)} on scheduled time`;
1789
+ return `Receive ${j.formattedType(a.type)} on scheduled time`;
1791
1790
  case "SIMPLE_CLAIM":
1792
1791
  return "Simple claim voucher";
1793
1792
  case "TIER_UPGRADED":
1794
- return `Receive ${A.formattedType(r.type)} when member tier upgraded`;
1793
+ return `Receive ${j.formattedType(a.type)} when member tier upgraded`;
1795
1794
  case "MEMBERSHIP_JOINED":
1796
- return `Receive ${A.formattedType(r.type)} when member joined`;
1795
+ return `Receive ${j.formattedType(a.type)} when member joined`;
1797
1796
  case "MAKING_ORDER":
1798
- return r.type !== "PROMOTION" ? void 0 : X(r.effect);
1797
+ return a.type !== "PROMOTION" ? void 0 : G(a.effect);
1799
1798
  default:
1800
1799
  throw new Error(
1801
- `Not implemented ${JSON.stringify({ cause: r.event.type })}`
1800
+ `Not implemented ${JSON.stringify({ cause: a.event.type })}`
1802
1801
  );
1803
1802
  }
1804
1803
  }
1805
- function kt(r, e) {
1806
- var i, n;
1807
- if (!r) return;
1808
- const t = r.campaign;
1809
- if (!t) return;
1810
- const s = t.event.rule;
1811
- if (!s || !ge(s)) {
1812
- e.addIssue({
1813
- code: "custom",
1814
- path: ["campaign", "event", "rule"],
1815
- params: {
1816
- i18n: { key: "zodCustom.campaign.rule_required", values: { type: t.event.type } }
1817
- }
1818
- });
1819
- return;
1820
- }
1821
- switch (t.type) {
1822
- case "MISSION": {
1823
- t.earningOption.amount > t.mission.end && e.addIssue({
1824
- code: "custom",
1825
- path: ["campaign", "earningOption"],
1826
- params: {
1827
- i18n: { key: "zodCustom.campaign.earning_amount_exceed", values: { max: t.mission.end } }
1828
- }
1829
- });
1830
- break;
1831
- }
1832
- case "CREDIT": {
1833
- const a = (i = t.config) == null ? void 0 : i.validityOption;
1834
- (!a || ["validForDay", "validBefore"].every((l) => a[l] == null)) && e.addIssue({
1835
- code: "custom",
1836
- path: ["campaign", "config", "validityOption"],
1837
- params: {
1838
- i18n: { key: "zodCustom.campaign.credit_validity_required" }
1839
- }
1840
- });
1841
- }
1842
- }
1843
- switch (t.event.type) {
1844
- case "BILL_COMPLETED":
1845
- t.type === "MISSION" && t.rewards.length && (t.rewards.forEach((a, o) => {
1846
- (a.threshold < 0 || a.threshold > t.mission.end) && e.addIssue({
1847
- code: "custom",
1848
- path: ["campaign", "rewards", o, "threshold"],
1849
- params: {
1850
- i18n: { key: "zodCustom.campaign.reward_threshold_range" }
1851
- }
1852
- });
1853
- }), (n = t.config) != null && n.validityOption.followFirstReceive || e.addIssue({
1854
- code: "custom",
1855
- path: ["campaign", "config", "validityOption"],
1856
- params: {
1857
- i18n: { key: "zodCustom.campaign.mission_first_receive" }
1858
- }
1859
- }));
1860
- break;
1861
- case "SCHEDULE": {
1862
- if (!s.rules.g_schedule) {
1863
- e.addIssue({
1864
- code: "custom",
1865
- path: ["campaign", "event", "rule"],
1866
- params: {
1867
- i18n: { key: "zodCustom.campaign.schedule_period_required" }
1868
- },
1869
- fatal: !0
1870
- });
1871
- return;
1872
- }
1873
- const a = ue.getRules(
1874
- s.rules.g_schedule
1875
- ), o = [
1876
- {
1877
- property: "trigger.date",
1878
- operator: ["_isOnDate", "_rrule"]
1879
- },
1880
- {
1881
- property: "trigger.time",
1882
- operator: ["_isOnTime"]
1883
- }
1884
- ];
1885
- o.length == a.length && o.every((u) => a.some((f) => {
1886
- const g = ue.simplify(f);
1887
- return g.property === u.property && u.operator.includes(g.operator);
1888
- })) || e.addIssue({
1889
- code: "custom",
1890
- path: ["campaign", "event", "rule"],
1891
- params: {
1892
- i18n: { key: "zodCustom.campaign.active_period_invalid" }
1893
- }
1894
- });
1895
- break;
1896
- }
1897
- default: {
1898
- "earningOption" in t && t.earningOption.type != "FIXED" && e.addIssue({
1899
- code: "custom",
1900
- path: ["campaign", "earningOption"],
1901
- params: {
1902
- i18n: { key: "zodCustom.campaign.fixed_earning_required" }
1903
- }
1904
- });
1905
- break;
1906
- }
1907
- }
1908
- }
1909
- function Dt(r) {
1910
- var t;
1911
- if (r.campaign.type === "VOUCHER" && "configs" in r) {
1912
- const s = r.configs;
1913
- s.extras.targetLocation = r.campaign.targetLocation;
1914
- const i = Math.max(
1915
- r.campaign.earningOption.amount,
1916
- s.options.maxUse ?? 1
1917
- );
1918
- r.campaign.earningOption.amount = i, s.options.maxUse = i, r.campaign.earningOption = {
1919
- type: "FIXED",
1920
- amount: 1
1921
- };
1922
- }
1923
- if (r.campaign.type == "MISSION" && "configs" in r) {
1924
- const s = r.configs;
1925
- s.options.validityOption = (t = r.campaign.config) == null ? void 0 : t.validityOption;
1926
- }
1927
- const e = r.campaign.event;
1928
- return e.type != "BILL_COMPLETED" && e.rule && ge(e.rule) && (e.rule = ue.removeEntry(e.rule, "g_bill"), r.campaign.event = e), r;
1929
- }
1930
- function D(r) {
1931
- const e = Ve.optionsMap.get(r).extend({
1932
- _id: w.optional(),
1933
- collectible: b.string().nullish()
1934
- });
1935
- switch (r) {
1936
- case "VOUCHER":
1937
- return b.object({
1938
- campaign: e,
1939
- templateId: w,
1940
- configs: re,
1941
- updateCollections: b.boolean().optional(),
1942
- code: b.string().optional()
1943
- });
1944
- case "PROMOTION":
1945
- return b.object({
1946
- campaign: e,
1947
- templateId: w
1948
- });
1949
- case "POINT":
1950
- return b.object({
1951
- campaign: e,
1952
- templateId: w
1953
- });
1954
- case "CREDIT":
1955
- return b.object({
1956
- campaign: e,
1957
- templateId: w
1958
- });
1959
- case "BROADCAST":
1960
- return b.object({
1961
- campaign: e,
1962
- templateId: w
1963
- });
1964
- case "COIN":
1965
- return b.object({
1966
- campaign: e,
1967
- templateId: w
1968
- });
1969
- case "REWARD_POOL":
1970
- return b.object({
1971
- campaign: e,
1972
- templateId: w,
1973
- updateCollections: b.boolean().optional()
1974
- });
1975
- case "GAME":
1976
- return b.object({
1977
- campaign: e,
1978
- configs: re,
1979
- templateId: w,
1980
- updateCollections: b.boolean().optional()
1981
- });
1982
- case "MISSION":
1983
- return b.object({
1984
- campaign: e,
1985
- configs: re,
1986
- templateId: w,
1987
- updateCollections: b.boolean().optional()
1988
- });
1989
- default:
1990
- throw new Error("Not implemented");
1991
- }
1992
- }
1993
- const Ft = Ae.extend({
1994
- _id: w.optional(),
1995
- name: b.string().min(1).max(300),
1996
- business: w.optional(),
1997
- campaigns: b.array(w).optional()
1998
- }), jt = {
1999
- [k.enum.VOUCHER]: D("VOUCHER"),
2000
- [k.enum.PROMOTION]: D("PROMOTION"),
2001
- [k.enum.POINT]: D("POINT"),
2002
- [k.enum.CREDIT]: D("CREDIT"),
2003
- [k.enum.BROADCAST]: D("BROADCAST"),
2004
- [k.enum.COIN]: D("COIN"),
2005
- [k.enum.REWARD_POOL]: D("REWARD_POOL"),
2006
- [k.enum.GAME]: D("GAME"),
2007
- [k.enum.MISSION]: D("MISSION")
2008
- };
2009
1804
  export {
2010
- $t as C,
2011
- Ft as F,
2012
- It as a,
2013
- Et as b,
2014
- kt as c,
2015
- jt as d,
2016
- Dt as e,
2017
- Nt as g
1805
+ xt as C,
1806
+ Ot as a,
1807
+ St as b,
1808
+ rt as c,
1809
+ bt as g
2018
1810
  };