@feedmepos/mf-connect 0.1.119-prod → 0.1.121-dev

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 (146) hide show
  1. package/dist/{App-BN2LKM3u.js → App-DwtaLO6F.js} +147 -135
  2. package/dist/AuditLogs-s572aHLw.js +2016 -0
  3. package/dist/{Bin-DpQ1atb7.js → Bin-BBaVggZI.js} +8 -8
  4. package/dist/{Broadcast-c1ZyYClI.js → Broadcast-CqAQ3EmE.js} +22 -21
  5. package/dist/{CampaignAnalytic-w1hIlc2r.js → CampaignAnalytic-34bfP8iY.js} +7 -7
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D7U6evm1.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BvAAxE3a.js} +8 -9
  7. package/dist/{Card-De53Xgbe.js → Card-8hlnKnhk.js} +22 -22
  8. package/dist/{Collections-BL2RD3FU.js → Collections-BJ0-UjKf.js} +197 -185
  9. package/dist/{Credit-2KvFFcwR.js → Credit-DJNc__yp.js} +21 -20
  10. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-CKSs2nYE.js → DateRangeChip.vue_vue_type_script_setup_true_lang-BvilcyyB.js} +1 -1
  11. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-CSjOHBhA.js +4439 -0
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Jy7HkK5Z.js → EffectSheet.vue_vue_type_style_index_0_lang-DFzVuuEy.js} +30 -30
  13. package/dist/{Experience-Cb0jHtVo.js → Experience-D-cUhjWc.js} +32 -31
  14. package/dist/{FileSaver.min-UDgZF_Cv.js → FileSaver.min-DKYYse6A.js} +1 -1
  15. package/dist/{Game-BnysxSMs.js → Game-DdFV90Kp.js} +19 -18
  16. package/dist/{GiftCardSetup-s1OR6xQq.js → GiftCardSetup-Dz0AN159.js} +31 -31
  17. package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-D108r20x.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-GCp3IFaC.js} +7 -7
  18. package/dist/{Goals-BAieLPzR.js → Goals-Dg_kAezl.js} +4 -4
  19. package/dist/Grab-BSQt4deB.js +301 -0
  20. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-B9Jgq5Bp.js → ImageInput.vue_vue_type_script_setup_true_lang-B_H1Bgy1.js} +1 -1
  21. package/dist/{Index-DnX16GAE.js → Index-ZSup3I7J.js} +10 -10
  22. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-DeM-WG6m.js → LocationPicker.vue_vue_type_script_setup_true_lang-DisF-jcd.js} +1 -1
  23. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-BAN69FOS.js → LottieAnimation.vue_vue_type_script_setup_true_lang-BHhjZOYi.js} +1 -1
  24. package/dist/{LoyaltyDashboard-D8g6OSbC.js → LoyaltyDashboard-D8BhHsaw.js} +15 -15
  25. package/dist/{MainLayout-DWABjpQn.js → MainLayout-BBnhRxyR.js} +1 -1
  26. package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-COp7iulq.js → MainLayout.vue_vue_type_script_setup_true_lang-DFrPlj5u.js} +16 -16
  27. package/dist/{Marketing-Dagatr0y.js → Marketing-5F9LLn91.js} +4 -4
  28. package/dist/{MarketingMaterialEdit-DYVzNDpM.js → MarketingMaterialEdit-C7dD4Bzw.js} +214 -211
  29. package/dist/{Member-DAxdEF_Z.js → Member-Dk4JeGru.js} +7 -7
  30. package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-nBg7Hckj.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-ISolD_Qg.js} +39 -47
  31. package/dist/{MemberImportHistory-2gx6FnLh.js → MemberImportHistory-C0Ep8L2q.js} +7 -7
  32. package/dist/{MemberList-By_gGl-J.js → MemberList-BsuPfBgk.js} +103 -105
  33. package/dist/{MemberTransactions-BEF-4ZNp.js → MemberTransactions-mZ3fHw5O.js} +1 -1
  34. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Bs8wKx9B.js → MessageInput.vue_vue_type_script_setup_true_lang-1weyRM8c.js} +12 -12
  35. package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DN3mWfKj.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-caED3JRW.js} +1 -1
  36. package/dist/{Mission-jg15lBxo.js → Mission-C7DqUOJz.js} +22 -21
  37. package/dist/{Overview-C7WfdzfV.js → Overview-U201nBVO.js} +20 -20
  38. package/dist/{Overview-BFKLTAk1.js → Overview-VABLg36G.js} +145 -144
  39. package/dist/{Point-dv9WgWTQ.js → Point-DU6Ndv35.js} +22 -21
  40. package/dist/{Promotion-mFPF_8jO.js → Promotion-9UhZXNPb.js} +137 -131
  41. package/dist/{Queue-BQoR_M5H.js → Queue-CUxMedbd.js} +45 -45
  42. package/dist/{Record-1JZ1N5iX.js → Record-BIftCQzV.js} +9 -9
  43. package/dist/{Review-B52AxCeT.js → Review-lyVgTfsP.js} +2 -2
  44. package/dist/ReviewFacebookCallback-Da5G19bE.js +225 -0
  45. package/dist/{ReviewGoogleCallback-DO6SVFIC.js → ReviewGoogleCallback-B41PXfsj.js} +5 -5
  46. package/dist/{Reward-Cp4jPAB0.js → Reward-BMun_Rs4.js} +16 -16
  47. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-DLD6X13Z.js → RewardGroup.vue_vue_type_script_setup_true_lang-3TONrUQu.js} +13 -13
  48. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DHzFgr4h.js +1923 -0
  49. package/dist/{Segment-DaKw0YXF.js → Segment-1VS7ycXi.js} +303 -306
  50. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-Bj3OQ_JJ.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-C5iJSlxi.js} +14 -14
  51. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-B1Otak97.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CXY9Wyk9.js} +4 -4
  52. package/dist/{Setting-DveUrt8J.js → Setting-BdtzvKjt.js} +159 -148
  53. package/dist/{SettingAdvertisements-QRXOMNnM.js → SettingAdvertisements-BO2l3HBT.js} +12 -12
  54. package/dist/Settings-CvYawDU5.js +286 -0
  55. package/dist/{Store-DjdXRw3V.js → Store-DWQz-MgY.js} +28 -28
  56. package/dist/{StoreRewards-CjlGrc9E.js → StoreRewards-Bfwuqxf-.js} +15 -15
  57. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CBwmDKAw.js +1319 -0
  58. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-CHzFjo24.js +7007 -0
  59. package/dist/{Tier-D74Oh2np.js → Tier-CKn-l-wY.js} +2575 -687
  60. package/dist/{Title-CeeviOW8.js → Title-BXDk69uL.js} +95 -94
  61. package/dist/{Transaction-CWdw0ITl.js → Transaction-D4HQO4i9.js} +2 -2
  62. package/dist/Upselling-CikWzKq7.js +1032 -0
  63. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-B9nf-9s0.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-um124o4t.js} +26 -26
  64. package/dist/{Voucher-C0nNXMtv.js → Voucher-BGIyw4jq.js} +19 -19
  65. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DxZLsQq9.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BKyZj5SP.js} +12 -12
  66. package/dist/{WhatsappAccount-CoLSjCQ2.js → WhatsappAccount-Cd82g_xj.js} +6 -6
  67. package/dist/{WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-DkHPlGgT.js → WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-DWy8kS66.js} +1 -1
  68. package/dist/{WhatsappBot-kLb3kUav.js → WhatsappBot-auQhO8zk.js} +6 -6
  69. package/dist/{WhatsappBotLogs-jcYaHs0t.js → WhatsappBotLogs-CWuJzK9W.js} +6 -6
  70. package/dist/{WhatsappBotSettings-B6jJD61h.js → WhatsappBotSettings-B8KXMpIF.js} +4 -4
  71. package/dist/{WhatsappLayout-C24bIjI2.js → WhatsappLayout-DxooAkkL.js} +3 -3
  72. package/dist/{WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-9a_grP76.js → WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-CYHmgQ2v.js} +3 -3
  73. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-i8Wc2mCr.js → ZodTextField.vue_vue_type_script_setup_true_lang-DilxQM_z.js} +2 -2
  74. package/dist/{app-C06bAZj3.js → app-BG-zK89d.js} +4181 -3401
  75. package/dist/app.js +4 -3
  76. package/dist/{base.export-CgNRhKu8.js → base.export-BcMuREGH.js} +2 -2
  77. package/dist/{business-D23Dt1x4.js → business-9_NOI2V9.js} +1 -1
  78. package/dist/{campaign-FVcbXtrP.js → campaign-8y_9SvKP.js} +34 -28
  79. package/dist/{campaign-DfEvGigm.js → campaign-DjBTRZyA.js} +121 -94
  80. package/dist/{campaign.enum-BqekIiiN.js → campaign.enum-Dx-Zo68Q.js} +2 -1
  81. package/dist/campaign.fn-COkPH1QE.js +776 -0
  82. package/dist/{collection.fn-DC1AMI9o.js → collection.fn-yXurU9iv.js} +2 -2
  83. package/dist/{currency-Bra2RJK4.js → currency-YzyBFtDU.js} +1 -1
  84. package/dist/duplicateCampaign-dRWioann.js +51 -0
  85. package/dist/{effect-EL4V3pAu.js → effect-bMGarJZ6.js} +1 -1
  86. package/dist/{email-addresses-Ddtf1x_y.js → email-addresses-Ciu83j_3.js} +2 -2
  87. package/dist/{feature-flag-umACX47C.js → feature-flag-H5D1Cob5.js} +70 -70
  88. package/dist/google-BQK68wbe.js +5 -0
  89. package/dist/{helper-DqDOnLCf.js → helper-BH9HMikb.js} +1 -1
  90. package/dist/{index-CEh6ryp2.js → index-B7-Uvnfn.js} +19 -6
  91. package/dist/{index-DuCJtx1m.js → index-BHO82_Ix.js} +1 -1
  92. package/dist/{index-B_BmgKrh.js → index-BaTnDV-T.js} +2699 -2613
  93. package/dist/{index-C3hAzzS2.js → index-BvKJM3M2.js} +29 -15
  94. package/dist/{index-rcfcslIC.js → index-BxwJfT08.js} +197 -197
  95. package/dist/{index-C6p9Lsvf.js → index-CH-KHkm5.js} +1 -1
  96. package/dist/{index-B2lqC_hH.js → index-CIOidYvo.js} +1 -1
  97. package/dist/{index-BzwwXWpZ.js → index-CJAFz9Nn.js} +1 -1
  98. package/dist/{index-ByVPdKdB.js → index-CooParq-.js} +682 -581
  99. package/dist/{index-pfmx-Gor.js → index-Cyf05z_2.js} +2 -2
  100. package/dist/{index-Bvk61_w_.js → index-DYu7ZdQt.js} +1 -1
  101. package/dist/{index-B3U3KZl0.js → index-DbxiG50D.js} +2 -2
  102. package/dist/{index-BkKu2G2c.js → index-DkMy7WpU.js} +2 -2
  103. package/dist/{index-LjoAs_nX.js → index-DpkoCl4z.js} +10 -10
  104. package/dist/{index-C3lk4GHF.js → index-MWNnMT2T.js} +4 -4
  105. package/dist/{index-DK9zxpDu.js → index-RvJ5cq__.js} +3 -3
  106. package/dist/{index-iVbjwKxc.js → index-Ye3qFt34.js} +10 -10
  107. package/dist/{index-BTjhdlN_.js → index-_giqGuYM.js} +1 -1
  108. package/dist/{index-TDCPGtW3.js → index-pnM5q4c_.js} +389 -232
  109. package/dist/{index-BroF2fC8.js → index-taPHgOqE.js} +608 -251
  110. package/dist/{index.esm2017-DCuQPCX2.js → index.esm2017-CLxZor1Y.js} +111 -111
  111. package/dist/{loading-CQm1DKWE.js → loading-CsOSUWBd.js} +1 -1
  112. package/dist/{lodash-C2wVbAap.js → lodash-CshibTzh.js} +1 -1
  113. package/dist/{member-import-BLEmTRso.js → member-import-BdaGAjjt.js} +1 -1
  114. package/dist/{membership-XycnxPEW.js → membership-C5JWO1FM.js} +2 -2
  115. package/dist/{money-DY_QGzd1.js → money-Blt5EM43.js} +1 -1
  116. package/dist/{number-BHthf4qF.js → number-COm3MiH8.js} +1 -1
  117. package/dist/objectid-DQTx3-ee.js +145 -0
  118. package/dist/{onboarding-BOJw54Fn.js → onboarding-BbQDJOOS.js} +36 -36
  119. package/dist/{onboardingSetup-Cf2u1tXu.js → onboardingSetup-BLISY52M.js} +2 -2
  120. package/dist/{plugins-DKQeoL_e.js → plugins-De_chCYU.js} +3 -3
  121. package/dist/{reward-D4RIYSpl.js → reward-Dl8Zoxe_.js} +1 -1
  122. package/dist/{rule-Ba-s0L_w.js → rule-D6_iss3O.js} +572 -492
  123. package/dist/style.css +1 -1
  124. package/dist/template-Cw6j1cLX.js +224 -0
  125. package/dist/{timezone-CAc8xi1h.js → timezone-CA5FwOyy.js} +1 -1
  126. package/dist/{transaction.fn-Cp2hnhyU.js → transaction.fn-DI_NeGQb.js} +2 -2
  127. package/dist/{trigger-3ebhNBX7.js → trigger-CuymoMM-.js} +9 -9
  128. package/dist/{useMarketingMaterialActions-6URv8neP.js → useMarketingMaterialActions-Bz0Kgvgd.js} +4 -4
  129. package/dist/{usePagination-C-fyMmiy.js → usePagination-yb1rupwa.js} +1 -1
  130. package/dist/{user-T-iXTrYV.js → user-QSKyFaMI.js} +1 -1
  131. package/dist/vue-i18n-B_qtODCw.js +2365 -0
  132. package/dist/{xlsx-B8OqaJfb.js → xlsx--RjkGa9A.js} +224 -224
  133. package/dist/{zod-DZkNj425.js → zod-CmPMd-h0.js} +1 -1
  134. package/package.json +8 -3
  135. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BXb7v7wc.js +0 -3493
  136. package/dist/ReviewFacebookCallback-ihTdiI8V.js +0 -238
  137. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-pdHRjCt8.js +0 -1884
  138. package/dist/Settings-D9D-mkBa.js +0 -179
  139. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-DnwMpqzf.js +0 -1265
  140. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-I5-5BV4h.js +0 -142
  141. package/dist/campaign.fn-0MNUj1fZ.js +0 -776
  142. package/dist/google-C3S8u0mT.js +0 -4
  143. package/dist/objectid-CPCAqIiC.js +0 -145
  144. package/dist/rule-builder-D0B0DPao.js +0 -102
  145. package/dist/template-B40I16Yg.js +0 -236
  146. package/dist/vue-i18n-DzsxJorb.js +0 -2365
@@ -1,5 +1,5 @@
1
- import "./index-B_BmgKrh.js";
2
- import "./index-DK9zxpDu.js";
1
+ import "./index-BaTnDV-T.js";
2
+ import "./index-RvJ5cq__.js";
3
3
  function r(e) {
4
4
  switch (e) {
5
5
  case "PROMOTION":
@@ -1,4 +1,4 @@
1
- import { c as t } from "./index-iVbjwKxc.js";
1
+ import { c as t } from "./index-Ye3qFt34.js";
2
2
  function a(r, o = !0) {
3
3
  return t.DineroFactory(r).toFormat(o);
4
4
  }
@@ -0,0 +1,51 @@
1
+ import { p as l, i } from "./plugins-De_chCYU.js";
2
+ import { _ as r } from "./lodash-CshibTzh.js";
3
+ function v(e) {
4
+ return l.confirm(
5
+ i.global.t("connect.common.duplicate.confirmMessage", { name: e }),
6
+ i.global.t("connect.common.duplicate.title"),
7
+ i.global.t("connect.common.duplicate.proceed")
8
+ );
9
+ }
10
+ const f = ["LOYALTY", "NO_REWARD"], s = {
11
+ GAME: [(e) => {
12
+ var o;
13
+ return (o = e == null ? void 0 : e.game) == null ? void 0 : o.rewards;
14
+ }],
15
+ MISSION: [
16
+ (e) => e == null ? void 0 : e.rewards,
17
+ (e) => {
18
+ var o;
19
+ return (o = e == null ? void 0 : e.mission) == null ? void 0 : o.rewards;
20
+ }
21
+ ],
22
+ REWARD_POOL: [(e) => e == null ? void 0 : e.rewards]
23
+ };
24
+ function u(e, o) {
25
+ e && e.forEach((t) => {
26
+ o.includes(t.type ?? "") || (t.collectible = null, t.type === "VOUCHER" && t.collectibleConfig && (t.collectibleConfig._id = void 0));
27
+ });
28
+ }
29
+ function d(e) {
30
+ e._id = void 0;
31
+ }
32
+ function C(e, o) {
33
+ e.campaign && (e.campaign._id = void 0, e.campaign.currentReceive = void 0, e.campaign.notifyCampaign = void 0, o || (e.campaign.collectible = void 0));
34
+ }
35
+ function R(e, o) {
36
+ e.configs && (e.configs.currentReceive = void 0, o || (e.configs._id = void 0));
37
+ }
38
+ function E(e) {
39
+ const o = s[(e == null ? void 0 : e.type) ?? ""];
40
+ o && o.forEach((t) => {
41
+ u(t(e), f);
42
+ });
43
+ }
44
+ function A(e, o = {}) {
45
+ const t = r.cloneDeep(e), { keepCollectible: n = !1 } = o, c = t.campaign;
46
+ return d(t), C(t, n), R(t, n), E(c), t;
47
+ }
48
+ export {
49
+ v as c,
50
+ A as p
51
+ };
@@ -1,4 +1,4 @@
1
- import { c as r } from "./index-iVbjwKxc.js";
1
+ import { c as r } from "./index-Ye3qFt34.js";
2
2
  function p(n) {
3
3
  if (!n)
4
4
  return null;
@@ -1,8 +1,8 @@
1
1
  var ur = Object.defineProperty;
2
2
  var ir = (S, b, h) => b in S ? ur(S, b, { enumerable: !0, configurable: !0, writable: !0, value: h }) : S[b] = h;
3
3
  var xn = (S, b, h) => ir(S, typeof b != "symbol" ? b + "" : b, h);
4
- import { u as en } from "./xlsx-B8OqaJfb.js";
5
- import { g as ar } from "./app-C06bAZj3.js";
4
+ import { u as en } from "./xlsx--RjkGa9A.js";
5
+ import { g as ar } from "./app-BG-zK89d.js";
6
6
  class fr {
7
7
  constructor() {
8
8
  xn(this, "data", []);
@@ -1,8 +1,8 @@
1
1
  var de = Object.defineProperty;
2
2
  var ve = (m, u, d) => u in m ? de(m, u, { enumerable: !0, configurable: !0, writable: !0, value: d }) : m[u] = d;
3
3
  var st = (m, u, d) => ve(m, typeof u != "symbol" ? u + "" : u, d);
4
- import { ref as ht, readonly as Ut } from "vue";
5
- import { c as lt } from "./app-C06bAZj3.js";
4
+ import { ref as ht, readonly as Rt } from "vue";
5
+ import { c as lt } from "./app-BG-zK89d.js";
6
6
  import { useCoreStore as ae } from "@feedmepos/mf-common";
7
7
  var Kt = { exports: {} };
8
8
  (function(m, u) {
@@ -64,7 +64,7 @@ var Kt = { exports: {} };
64
64
  h((i = i.apply(a, [])).next());
65
65
  });
66
66
  }
67
- function V(a, e) {
67
+ function z(a, e) {
68
68
  var t, i, n, r, o = { label: 0, sent: function() {
69
69
  if (1 & n[0]) throw n[1];
70
70
  return n[1];
@@ -188,16 +188,16 @@ var Kt = { exports: {} };
188
188
  var o = "".concat(t.getContext().identity), c = function(h) {
189
189
  var f, l, p, F;
190
190
  if (h && o === "".concat(t.getContext().identity)) {
191
- var k = h.flags, O = h.traits, j = h.identifier;
191
+ var P = h.flags, O = h.traits, j = h.identifier;
192
192
  t.isLoading = !1;
193
193
  var I = {}, A = {};
194
- O = O || [], (k = k || []).forEach(function(y) {
194
+ O = O || [], (P = P || []).forEach(function(y) {
195
195
  I[y.feature.name.toLowerCase().replace(/ /g, "_")] = { id: y.feature.id, enabled: y.enabled, value: y.feature_state_value };
196
196
  }), O.forEach(function(y) {
197
197
  A[y.trait_key.toLowerCase().replace(/ /g, "_")] = { transient: y.transient, value: y.trait_value };
198
198
  }), t.oldFlags = s({}, t.flags);
199
- var P = _(t.oldFlags, I), Q = _((f = t.evaluationContext.identity) === null || f === void 0 ? void 0 : f.traits, A);
200
- if ((j || Object.keys(A).length) && (t.evaluationContext.identity = s(s({}, t.evaluationContext.identity), { traits: A }), j && (t.evaluationContext.identity.identifier = j)), t.flags = I, t.updateStorage(), t._onChange(t.oldFlags, { isFromServer: !0, flagsChanged: P, traitsChanged: Q }, t._loadedState(null, g.SERVER)), t.datadogRum) try {
199
+ var k = _(t.oldFlags, I), Q = _((f = t.evaluationContext.identity) === null || f === void 0 ? void 0 : f.traits, A);
200
+ if ((j || Object.keys(A).length) && (t.evaluationContext.identity = s(s({}, t.evaluationContext.identity), { traits: A }), j && (t.evaluationContext.identity.identifier = j)), t.flags = I, t.updateStorage(), t._onChange(t.oldFlags, { isFromServer: !0, flagsChanged: k, traitsChanged: Q }, t._loadedState(null, g.SERVER)), t.datadogRum) try {
201
201
  if (t.datadogRum.trackTraits) {
202
202
  var W = {};
203
203
  Object.keys(((l = t.evaluationContext.identity) === null || l === void 0 ? void 0 : l.traits) || {}).map(function(y) {
@@ -292,9 +292,9 @@ var Kt = { exports: {} };
292
292
  t.evaluationContext.environment && (f.headers["X-Environment-Key"] = t.evaluationContext.environment.apiKey), n && n !== "GET" && (f.headers["Content-Type"] = "application/json; charset=utf-8"), h && Object.assign(f.headers, h), C || console.error("Flagsmith: fetch is undefined, please specify a fetch implementation into flagsmith.init to support SSR.");
293
293
  var l = "".concat((o = t.evaluationContext.identity) === null || o === void 0 ? void 0 : o.identifier);
294
294
  return C(i, f).then(function(p) {
295
- var F, k, O = "".concat((F = t.evaluationContext.identity) === null || F === void 0 ? void 0 : F.identifier);
295
+ var F, P, O = "".concat((F = t.evaluationContext.identity) === null || F === void 0 ? void 0 : F.identifier);
296
296
  if (l === O) {
297
- var j = (k = p.headers) === null || k === void 0 ? void 0 : k.get("x-flagsmith-document-updated-at");
297
+ var j = (P = p.headers) === null || P === void 0 ? void 0 : P.get("x-flagsmith-document-updated-at");
298
298
  if (j) try {
299
299
  var I = parseFloat(j);
300
300
  if (isNaN(I)) return Promise.reject("Failed to parse x-flagsmith-document-updated-at");
@@ -303,12 +303,12 @@ var Kt = { exports: {} };
303
303
  t.log(A, "Failed to parse x-flagsmith-document-updated-at", j);
304
304
  }
305
305
  return t.log("Fetch response: " + p.status + " " + (n || "GET") + 0 + i), p.text().then(function(A) {
306
- var P = A;
306
+ var k = A;
307
307
  try {
308
- P = JSON.parse(A);
308
+ k = JSON.parse(A);
309
309
  } catch {
310
310
  }
311
- return !P && p.status && (P = "API Response: ".concat(p.status)), p.status && p.status >= 200 && p.status < 300 ? P : Promise.reject(new Error(P));
311
+ return !k && p.status && (k = "API Response: ".concat(p.status)), p.status && p.status >= 200 && p.status < 300 ? k : Promise.reject(new Error(k));
312
312
  });
313
313
  }
314
314
  t.log("Received response with identity mismatch, ignoring response. Requested: ".concat(l, ", Current: ").concat(O));
@@ -327,32 +327,32 @@ var Kt = { exports: {} };
327
327
  return a.prototype.init = function(e) {
328
328
  var t, i, n;
329
329
  return T(this, void 0, void 0, function() {
330
- var r, o, c, h, f, l, p, F, k, O, j, I, A, P, Q, W, $, E, y, ft, tt, qt, X, pt, Yt, Zt, yt, Qt, mt, et, q, Wt, x = this;
331
- return V(this, function(N) {
330
+ var r, o, c, h, f, l, p, F, P, O, j, I, A, k, Q, W, $, E, y, ft, tt, Xt, q, pt, Zt, Yt, yt, Qt, mt, et, X, Wt, x = this;
331
+ return z(this, function(N) {
332
332
  switch (N.label) {
333
333
  case 0:
334
334
  r = dt(e.evaluationContext || this.evaluationContext), N.label = 1;
335
335
  case 1:
336
- if (N.trys.push([1, 13, , 14]), o = e.environmentID, c = e.api, h = c === void 0 ? Dt : c, f = e.headers, l = e.onChange, p = e.cacheFlags, F = e.datadogRum, k = e.onError, O = e.defaultFlags, j = e.fetch, I = e.preventFetch, A = e.enableLogs, P = e.enableDynatrace, Q = e.enableAnalytics, W = e.realtime, $ = e.eventSourceUrl, E = $ === void 0 ? "https://realtime.flagsmith.com/" : $, y = e.AsyncStorage, ft = e.identity, tt = e.traits, qt = e.state, X = e.cacheOptions, pt = e.angularHttpClient, Yt = e._trigger, Zt = e._triggerLoadingState, r.environment = o ? { apiKey: o } : r.environment, !r.environment || !r.environment.apiKey) throw new Error("Please provide `evaluationContext.environment` with non-empty `apiKey`");
336
+ if (N.trys.push([1, 13, , 14]), o = e.environmentID, c = e.api, h = c === void 0 ? Dt : c, f = e.headers, l = e.onChange, p = e.cacheFlags, F = e.datadogRum, P = e.onError, O = e.defaultFlags, j = e.fetch, I = e.preventFetch, A = e.enableLogs, k = e.enableDynatrace, Q = e.enableAnalytics, W = e.realtime, $ = e.eventSourceUrl, E = $ === void 0 ? "https://realtime.flagsmith.com/" : $, y = e.AsyncStorage, ft = e.identity, tt = e.traits, Xt = e.state, q = e.cacheOptions, pt = e.angularHttpClient, Zt = e._trigger, Yt = e._triggerLoadingState, r.environment = o ? { apiKey: o } : r.environment, !r.environment || !r.environment.apiKey) throw new Error("Please provide `evaluationContext.environment` with non-empty `apiKey`");
337
337
  if (r.identity = ft || tt ? { identifier: ft, traits: tt ? Object.fromEntries(Object.entries(tt).map(function(L) {
338
338
  return [L[0], { value: L[1] }];
339
- })) : {} } : r.identity, this.evaluationContext = r, this.api = h, this.headers = f, this.getFlagInterval = null, this.analyticsInterval = null, this.onChange = l, yt = "Wrong Flagsmith Configuration: preventFetch is true and no defaulFlags provided", this._trigger = Yt || this._trigger, this._triggerLoadingState = Zt || this._triggerLoadingState, this.onError = function(L) {
340
- x.setLoadingState(s(s({}, x.loadingState), { isFetching: !1, isLoading: !1, error: L })), k == null || k(L);
341
- }, this.enableLogs = A || !1, this.cacheOptions = X ? { skipAPI: !!X.skipAPI, ttl: X.ttl || 0, storageKey: X.storageKey, loadStale: !!X.loadStale } : this.cacheOptions, !this.cacheOptions.ttl && this.cacheOptions.skipAPI && console.warn("Flagsmith: you have set a cache ttl of 0 and are skipping API calls, this means the API will not be hit unless you clear local storage."), j && (C = j), this.enableAnalytics = Q || !1, this.flags = Object.assign({}, O) || {}, this.datadogRum = F || null, this.initialised = !0, this.ticks = 1e4, this.timer = this.enableLogs ? (/* @__PURE__ */ new Date()).valueOf() : null, this.cacheFlags = w !== void 0 && !!p, rt = "FLAGSMITH_EVENT_" + r.environment.apiKey, y && (w = y), W && typeof window < "u" && this.setupRealtime(E, r.environment.apiKey), Object.keys(this.flags).length && (this.loadingState = s(s({}, this.loadingState), { isLoading: !1, source: g.DEFAULT_FLAGS })), this.setState(qt), this.log("Initialising with properties", e, this), P && (typeof dtrum > "u" ? console.error("You have attempted to enable dynatrace but dtrum is undefined, please check you have the Dynatrace RUM JavaScript API installed.") : this.dtrum = dtrum), pt && (C = /* @__PURE__ */ function(L) {
342
- return function(R, U) {
343
- var B = U.headers, S = U.method, Y = U.body;
344
- return new Promise(function(z) {
339
+ })) : {} } : r.identity, this.evaluationContext = r, this.api = h, this.headers = f, this.getFlagInterval = null, this.analyticsInterval = null, this.onChange = l, yt = "Wrong Flagsmith Configuration: preventFetch is true and no defaulFlags provided", this._trigger = Zt || this._trigger, this._triggerLoadingState = Yt || this._triggerLoadingState, this.onError = function(L) {
340
+ x.setLoadingState(s(s({}, x.loadingState), { isFetching: !1, isLoading: !1, error: L })), P == null || P(L);
341
+ }, this.enableLogs = A || !1, this.cacheOptions = q ? { skipAPI: !!q.skipAPI, ttl: q.ttl || 0, storageKey: q.storageKey, loadStale: !!q.loadStale } : this.cacheOptions, !this.cacheOptions.ttl && this.cacheOptions.skipAPI && console.warn("Flagsmith: you have set a cache ttl of 0 and are skipping API calls, this means the API will not be hit unless you clear local storage."), j && (C = j), this.enableAnalytics = Q || !1, this.flags = Object.assign({}, O) || {}, this.datadogRum = F || null, this.initialised = !0, this.ticks = 1e4, this.timer = this.enableLogs ? (/* @__PURE__ */ new Date()).valueOf() : null, this.cacheFlags = w !== void 0 && !!p, rt = "FLAGSMITH_EVENT_" + r.environment.apiKey, y && (w = y), W && typeof window < "u" && this.setupRealtime(E, r.environment.apiKey), Object.keys(this.flags).length && (this.loadingState = s(s({}, this.loadingState), { isLoading: !1, source: g.DEFAULT_FLAGS })), this.setState(Xt), this.log("Initialising with properties", e, this), k && (typeof dtrum > "u" ? console.error("You have attempted to enable dynatrace but dtrum is undefined, please check you have the Dynatrace RUM JavaScript API installed.") : this.dtrum = dtrum), pt && (C = /* @__PURE__ */ function(L) {
342
+ return function(U, R) {
343
+ var B = R.headers, S = R.method, Z = R.body;
344
+ return new Promise(function(H) {
345
345
  switch (S) {
346
346
  case "GET":
347
- return L.get(R, { headers: B }).subscribe(function(J) {
348
- z({ ok: !0, text: function() {
347
+ return L.get(U, { headers: B }).subscribe(function(J) {
348
+ H({ ok: !0, text: function() {
349
349
  return Promise.resolve(J);
350
350
  } });
351
351
  });
352
352
  case "POST":
353
353
  case "PUT":
354
- return L.post(R, Y, { headers: B }).subscribe(function(J) {
355
- z({ ok: !0, text: function() {
354
+ return L.post(U, Z, { headers: B }).subscribe(function(J) {
355
+ H({ ok: !0, text: function() {
356
356
  return Promise.resolve(J);
357
357
  } });
358
358
  });
@@ -366,50 +366,50 @@ var Kt = { exports: {} };
366
366
  x.evaluationEvent = {};
367
367
  }
368
368
  x.analyticsInterval = setInterval(x.analyticsFlags, x.ticks);
369
- }), this.enableAnalytics && (this.analyticsInterval && clearInterval(this.analyticsInterval), w && this.canUseStorage && w.getItem(rt, function(L, R) {
370
- if (R && x.evaluationContext.environment) {
371
- var U = JSON.parse(R);
372
- if (U[x.evaluationContext.environment.apiKey]) {
369
+ }), this.enableAnalytics && (this.analyticsInterval && clearInterval(this.analyticsInterval), w && this.canUseStorage && w.getItem(rt, function(L, U) {
370
+ if (U && x.evaluationContext.environment) {
371
+ var R = JSON.parse(U);
372
+ if (R[x.evaluationContext.environment.apiKey]) {
373
373
  var B = x.getState();
374
- x.log("Retrieved events from cache", R), x.setState(s(s({}, B), { evaluationEvent: U[x.evaluationContext.environment.apiKey] }));
374
+ x.log("Retrieved events from cache", U), x.setState(s(s({}, B), { evaluationEvent: R[x.evaluationContext.environment.apiKey] }));
375
375
  }
376
376
  }
377
377
  })), !p) return [3, 9];
378
378
  if (!w || !this.canUseStorage) return [3, 8];
379
- Qt = function(L, R) {
379
+ Qt = function(L, U) {
380
380
  return T(x, void 0, void 0, function() {
381
- var U, B, S, Y, z, J, St, te, Ct, bt, _t, Ft, Et, xt, wt, Ot, It, At, Lt, jt, Nt, Tt, kt, Pt, ee = this;
382
- return V(this, function(H) {
383
- switch (H.label) {
381
+ var R, B, S, Z, H, J, St, te, Ct, bt, _t, Ft, Et, xt, wt, Ot, It, At, Lt, jt, Nt, Tt, Pt, kt, ee = this;
382
+ return z(this, function(V) {
383
+ switch (V.label) {
384
384
  case 0:
385
- if (!R) return [3, 7];
386
- U = null, B = null, H.label = 1;
385
+ if (!U) return [3, 7];
386
+ R = null, B = null, V.label = 1;
387
387
  case 1:
388
- return H.trys.push([1, 5, , 6]), S = JSON.parse(R), Y = !1, z = !1, S && S.api === this.api && ((bt = (Ct = S.evaluationContext) === null || Ct === void 0 ? void 0 : Ct.environment) === null || bt === void 0 ? void 0 : bt.apiKey) === ((_t = this.evaluationContext.environment) === null || _t === void 0 ? void 0 : _t.apiKey) && (J = !0, this.evaluationContext.identity && ((Et = (Ft = S.evaluationContext) === null || Ft === void 0 ? void 0 : Ft.identity) === null || Et === void 0 ? void 0 : Et.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((wt = (xt = S.evaluationContext) === null || xt === void 0 ? void 0 : xt.identity) === null || wt === void 0 ? void 0 : wt.identifier) + " to " + this.evaluationContext.identity.identifier), J = !1), this.cacheOptions.ttl && (!S.ts || (/* @__PURE__ */ new Date()).valueOf() - S.ts > this.cacheOptions.ttl) && (S.ts && !this.cacheOptions.loadStale ? (this.log("Ignoring cache, timestamp is too old ts:" + S.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - S.ts) + "ms"), J = !1) : S.ts && this.cacheOptions.loadStale && (this.log("Loading stale cache, timestamp ts:" + S.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - S.ts) + "ms"), z = !0, J = !0)), J && (Y = !0, B = _((Ot = this.evaluationContext.identity) === null || Ot === void 0 ? void 0 : Ot.traits, (At = (It = S.evaluationContext) === null || It === void 0 ? void 0 : It.identity) === null || At === void 0 ? void 0 : At.traits), U = _(this.flags, S.flags), this.setState(s(s({}, S), { evaluationContext: dt(s(s({}, S.evaluationContext), { identity: !((Lt = S.evaluationContext) === null || Lt === void 0) && Lt.identity ? s(s({}, (jt = S.evaluationContext) === null || jt === void 0 ? void 0 : jt.identity), { traits: s(s({}, ((Tt = (Nt = S.evaluationContext) === null || Nt === void 0 ? void 0 : Nt.identity) === null || Tt === void 0 ? void 0 : Tt.traits) || {}), tt || {}) }) : void 0 })) })), this.log("Retrieved flags from cache", S))), Y ? (St = !I && (!this.cacheOptions.skipAPI || z), this._onChange(null, { isFromServer: !1, flagsChanged: U, traitsChanged: B }, this._loadedState(null, g.CACHE, St)), this.oldFlags = this.flags, this.cacheOptions.skipAPI && Y && !z && this.log("Skipping API, using cache"), St && this.getFlags().catch(function(he) {
389
- var Rt;
390
- (Rt = ee.onError) === null || Rt === void 0 || Rt.call(ee, he);
388
+ return V.trys.push([1, 5, , 6]), S = JSON.parse(U), Z = !1, H = !1, S && S.api === this.api && ((bt = (Ct = S.evaluationContext) === null || Ct === void 0 ? void 0 : Ct.environment) === null || bt === void 0 ? void 0 : bt.apiKey) === ((_t = this.evaluationContext.environment) === null || _t === void 0 ? void 0 : _t.apiKey) && (J = !0, this.evaluationContext.identity && ((Et = (Ft = S.evaluationContext) === null || Ft === void 0 ? void 0 : Ft.identity) === null || Et === void 0 ? void 0 : Et.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((wt = (xt = S.evaluationContext) === null || xt === void 0 ? void 0 : xt.identity) === null || wt === void 0 ? void 0 : wt.identifier) + " to " + this.evaluationContext.identity.identifier), J = !1), this.cacheOptions.ttl && (!S.ts || (/* @__PURE__ */ new Date()).valueOf() - S.ts > this.cacheOptions.ttl) && (S.ts && !this.cacheOptions.loadStale ? (this.log("Ignoring cache, timestamp is too old ts:" + S.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - S.ts) + "ms"), J = !1) : S.ts && this.cacheOptions.loadStale && (this.log("Loading stale cache, timestamp ts:" + S.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - S.ts) + "ms"), H = !0, J = !0)), J && (Z = !0, B = _((Ot = this.evaluationContext.identity) === null || Ot === void 0 ? void 0 : Ot.traits, (At = (It = S.evaluationContext) === null || It === void 0 ? void 0 : It.identity) === null || At === void 0 ? void 0 : At.traits), R = _(this.flags, S.flags), this.setState(s(s({}, S), { evaluationContext: dt(s(s({}, S.evaluationContext), { identity: !((Lt = S.evaluationContext) === null || Lt === void 0) && Lt.identity ? s(s({}, (jt = S.evaluationContext) === null || jt === void 0 ? void 0 : jt.identity), { traits: s(s({}, ((Tt = (Nt = S.evaluationContext) === null || Nt === void 0 ? void 0 : Nt.identity) === null || Tt === void 0 ? void 0 : Tt.traits) || {}), tt || {}) }) : void 0 })) })), this.log("Retrieved flags from cache", S))), Z ? (St = !I && (!this.cacheOptions.skipAPI || H), this._onChange(null, { isFromServer: !1, flagsChanged: R, traitsChanged: B }, this._loadedState(null, g.CACHE, St)), this.oldFlags = this.flags, this.cacheOptions.skipAPI && Z && !H && this.log("Skipping API, using cache"), St && this.getFlags().catch(function(he) {
389
+ var Ut;
390
+ (Ut = ee.onError) === null || Ut === void 0 || Ut.call(ee, he);
391
391
  }), [3, 4]) : [3, 2];
392
392
  case 2:
393
393
  return I ? [3, 4] : [4, this.getFlags()];
394
394
  case 3:
395
- H.sent(), H.label = 4;
395
+ V.sent(), V.label = 4;
396
396
  case 4:
397
397
  return [3, 6];
398
398
  case 5:
399
- return te = H.sent(), this.log("Exception fetching cached logs", te), [3, 6];
399
+ return te = V.sent(), this.log("Exception fetching cached logs", te), [3, 6];
400
400
  case 6:
401
401
  return [3, 10];
402
402
  case 7:
403
403
  return I ? [3, 9] : [4, this.getFlags()];
404
404
  case 8:
405
- return H.sent(), [3, 10];
405
+ return V.sent(), [3, 10];
406
406
  case 9:
407
- if (O) this._onChange(null, { isFromServer: !1, flagsChanged: _({}, this.flags), traitsChanged: _({}, (kt = this.evaluationContext.identity) === null || kt === void 0 ? void 0 : kt.traits) }, this._loadedState(null, g.DEFAULT_FLAGS));
407
+ if (O) this._onChange(null, { isFromServer: !1, flagsChanged: _({}, this.flags), traitsChanged: _({}, (Pt = this.evaluationContext.identity) === null || Pt === void 0 ? void 0 : Pt.traits) }, this._loadedState(null, g.DEFAULT_FLAGS));
408
408
  else {
409
409
  if (!this.flags) throw new Error(yt);
410
- this._onChange(null, { isFromServer: !1, flagsChanged: _({}, this.flags), traitsChanged: _({}, (Pt = this.evaluationContext.identity) === null || Pt === void 0 ? void 0 : Pt.traits) }, this._loadedState(null, g.DEFAULT_FLAGS));
410
+ this._onChange(null, { isFromServer: !1, flagsChanged: _({}, this.flags), traitsChanged: _({}, (kt = this.evaluationContext.identity) === null || kt === void 0 ? void 0 : kt.traits) }, this._loadedState(null, g.DEFAULT_FLAGS));
411
411
  }
412
- H.label = 10;
412
+ V.label = 10;
413
413
  case 10:
414
414
  return [2];
415
415
  }
@@ -440,7 +440,7 @@ var Kt = { exports: {} };
440
440
  case 12:
441
441
  return [3, 14];
442
442
  case 13:
443
- throw q = N.sent(), this.log("Error during initialisation ", q), Wt = q instanceof Error ? q : new Error("".concat(q)), (n = this.onError) === null || n === void 0 || n.call(this, Wt), q;
443
+ throw X = N.sent(), this.log("Error during initialisation ", X), Wt = X instanceof Error ? X : new Error("".concat(X)), (n = this.onError) === null || n === void 0 || n.call(this, Wt), X;
444
444
  case 14:
445
445
  return [2];
446
446
  }
@@ -497,7 +497,7 @@ var Kt = { exports: {} };
497
497
  })) : this.log("Error, EventSource is undefined");
498
498
  }, a;
499
499
  }();
500
- function Ht(a) {
500
+ function Vt(a) {
501
501
  var e = a.fetch, t = a.AsyncStorage, i = a.eventSource;
502
502
  return new le({ fetch: e, AsyncStorage: t, eventSource: i });
503
503
  }
@@ -513,14 +513,14 @@ var Kt = { exports: {} };
513
513
  this.constructor = a;
514
514
  }
515
515
  ot(a, e), a.prototype = e === null ? Object.create(e) : (t.prototype = e.prototype, new t());
516
- }), Vt = function(a) {
516
+ }), zt = function(a) {
517
517
  var e = typeof Symbol == "function" && Symbol.iterator, t = e && a[e], i = 0;
518
518
  if (t) return t.call(a);
519
519
  if (a && typeof a.length == "number") return { next: function() {
520
520
  return a && i >= a.length && (a = void 0), { value: a && a[i++], done: !a };
521
521
  } };
522
522
  throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.");
523
- }, zt = function(a, e) {
523
+ }, Ht = function(a, e) {
524
524
  var t = typeof Symbol == "function" && a[Symbol.iterator];
525
525
  if (!t) return a;
526
526
  var i, n, r = t.call(a), o = [];
@@ -565,7 +565,7 @@ Consider loading an EventSource polyfill and making it available globally as Eve
565
565
  i.onmessage(h);
566
566
  };
567
567
  try {
568
- for (var r = Vt(Object.keys(this._listeners)), o = r.next(); !o.done; o = r.next()) {
568
+ for (var r = zt(Object.keys(this._listeners)), o = r.next(); !o.done; o = r.next()) {
569
569
  var c = o.value;
570
570
  this._eventSource.addEventListener(c, this._onevent_wrapped);
571
571
  }
@@ -594,7 +594,7 @@ Consider loading an EventSource polyfill and making it available globally as Eve
594
594
  e && e.lastEventId && (this._lastEventId = e.lastEventId);
595
595
  var n = this._listeners[e.type];
596
596
  if (n != null) try {
597
- for (var r = Vt(gt([], zt(n), !1)), o = r.next(); !o.done; o = r.next())
597
+ for (var r = zt(gt([], Ht(n), !1)), o = r.next(); !o.done; o = r.next())
598
598
  o.value.call(this, e);
599
599
  } catch (c) {
600
600
  t = { error: c };
@@ -614,7 +614,7 @@ Consider loading an EventSource polyfill and making it available globally as Eve
614
614
  }, a.prototype.addEventListener = function(e, t, i) {
615
615
  this._listeners[e] == null && (this._listeners[e] = [], this._eventSource != null && this._eventSource.addEventListener(e, this._onevent_wrapped));
616
616
  var n = this._listeners[e];
617
- n.includes(t) || (this._listeners[e] = gt(gt([], zt(n), !1), [t], !1));
617
+ n.includes(t) || (this._listeners[e] = gt(gt([], Ht(n), !1), [t], !1));
618
618
  }, a.prototype.removeEventListener = function(e, t, i) {
619
619
  var n = this._listeners[e];
620
620
  this._listeners[e] = n.filter(function(r) {
@@ -649,10 +649,10 @@ Consider loading an EventSource polyfill and making it available globally as Eve
649
649
  }, n.onerror = i, n.withCredentials = e.credentials == "include", e.headers) n.setRequestHeader(f, e.headers[f]);
650
650
  n.send(e.body || null);
651
651
  });
652
- }, Xt = Ht({ AsyncStorage: v, fetch: $t, eventSource: Mt });
653
- typeof window < "u" && (window.flagsmith = Xt), d.createFlagsmithInstance = function() {
654
- return Ht({ AsyncStorage: v, fetch: $t, eventSource: Mt });
655
- }, d.default = Xt, Object.defineProperty(d, "__esModule", { value: !0 });
652
+ }, qt = Vt({ AsyncStorage: v, fetch: $t, eventSource: Mt });
653
+ typeof window < "u" && (window.flagsmith = qt), d.createFlagsmithInstance = function() {
654
+ return Vt({ AsyncStorage: v, fetch: $t, eventSource: Mt });
655
+ }, d.default = qt, Object.defineProperty(d, "__esModule", { value: !0 });
656
656
  });
657
657
  })(Kt, Kt.exports);
658
658
  var ge = Kt.exports, fe = {
@@ -746,7 +746,7 @@ var ge = Kt.exports, fe = {
746
746
  };
747
747
  }
748
748
  async getUserFlagValue(u, d, v = null, s) {
749
- var V;
749
+ var z;
750
750
  const T = this.userContext;
751
751
  try {
752
752
  return await this.setUser(u), this.getFlagValue(d, s) ?? v;
@@ -754,7 +754,7 @@ var ge = Kt.exports, fe = {
754
754
  return console.error(`Error getting user flag value for ${d}:`, D), v;
755
755
  } finally {
756
756
  try {
757
- await ((V = this.flagsmithClient) == null ? void 0 : V.logout()), this.userContext = null, T && await this.setUser(T.identifier);
757
+ await ((z = this.flagsmithClient) == null ? void 0 : z.logout()), this.userContext = null, T && await this.setUser(T.identifier);
758
758
  } catch (D) {
759
759
  console.error("Error during cleanup:", D);
760
760
  }
@@ -763,7 +763,7 @@ var ge = Kt.exports, fe = {
763
763
  reset() {
764
764
  this.flagsmithClient = null, this.userContext = null;
765
765
  }
766
- }, st(K, "instance"), K), ye = pe.getInstance(), nt = ht(!1), ut = ht([]), Z = ht(null);
766
+ }, st(K, "instance"), K), ye = pe.getInstance(), nt = ht(!1), ut = ht([]), Y = ht(null);
767
767
  function me(m = ye) {
768
768
  const u = () => nt.value ? !0 : (console.warn("FeatureFlag is not initialized. Using default values."), !1), d = async (g, C = []) => {
769
769
  if (nt.value) {
@@ -771,16 +771,16 @@ function me(m = ye) {
771
771
  return;
772
772
  }
773
773
  try {
774
- await m.init(g, C), ut.value = await m.getFlags(), nt.value = !0, Z.value = null;
774
+ await m.init(g, C), ut.value = await m.getFlags(), nt.value = !0, Y.value = null;
775
775
  } catch (b) {
776
- console.error("Failed to initialize feature flags:", b), Z.value = b;
776
+ console.error("Failed to initialize feature flags:", b), Y.value = b;
777
777
  }
778
778
  }, v = async (g) => {
779
779
  if (u())
780
780
  try {
781
- await m.setUser(g), ut.value = await m.getFlags(), Z.value = null;
781
+ await m.setUser(g), ut.value = await m.getFlags(), Y.value = null;
782
782
  } catch (C) {
783
- console.error("Failed to set user:", C), Z.value = C;
783
+ console.error("Failed to set user:", C), Y.value = C;
784
784
  }
785
785
  }, s = async (g) => v(`${ne}-${g}`), T = (g, C, b = null) => {
786
786
  if (!u()) return b;
@@ -789,7 +789,7 @@ function me(m = ye) {
789
789
  } catch (G) {
790
790
  return console.error(`Error getting flag value for ${g}:`, G), b;
791
791
  }
792
- }, V = (g, C) => {
792
+ }, z = (g, C) => {
793
793
  if (!u()) return C ?? null;
794
794
  try {
795
795
  return m.getFlag(g) ?? C ?? null;
@@ -809,18 +809,18 @@ function me(m = ye) {
809
809
  } catch (g) {
810
810
  console.error("Error resetting feature flags:", g);
811
811
  } finally {
812
- ut.value = [], nt.value = !1, Z.value = null;
812
+ ut.value = [], nt.value = !1, Y.value = null;
813
813
  }
814
814
  };
815
815
  return {
816
- flags: Ut(ut),
817
- isInitialized: Ut(nt),
818
- error: Ut(Z),
816
+ flags: Rt(ut),
817
+ isInitialized: Rt(nt),
818
+ error: Rt(Y),
819
819
  init: d,
820
820
  setUser: v,
821
821
  setBusiness: s,
822
822
  getFlagValue: T,
823
- getFlag: V,
823
+ getFlag: z,
824
824
  getUserFlagValue: D,
825
825
  getBusinessFlagValue: it,
826
826
  reset: _
@@ -832,7 +832,7 @@ function re(m, u) {
832
832
  const d = (m.value ?? "").split(",").map((v) => v.trim().toUpperCase()).filter(Boolean);
833
833
  return !d.length || d.includes("*") ? !0 : !!u && d.includes(u.toUpperCase());
834
834
  }
835
- var Ce = { firebase: { apiKey: "AIzaSyA_isPR1-9bX7UmRiJIhsIRNNwdn6DdmW4", authDomain: "feedme-253402.firebaseapp.com", databaseURL: "https://feedme-253402.firebaseio.com", projectId: "feedme-253402", storageBucket: "image.feedme.cc", messagingSenderId: "128512026847", appId: "1:128512026847:web:7c5c8ab7e8b90502dc616a", measurementId: "G-LTKS7N2HQS" }, assetBucketUrl: "static.feedme.cc", importFilesBucketUrl: "feedme-253402.appspot.com", clientId: "d5f8840d63dbb758b6c4ee2a5e8b013d15dd25e242c457481326062b83962476", featureFlagApiKey: "6GhcttsJ9Rj9cTevcdrpin" };
835
+ var Ce = { firebase: { apiKey: "AIzaSyAj8JdCHtP0Vc5vZobCfgoLzWxPIn0WUG4", authDomain: "feedme-dev-4c3ef.firebaseapp.com", databaseURL: "https://feedme-dev-4c3ef.firebaseio.com", projectId: "feedme-dev-4c3ef", storageBucket: "feedme-dev-4c3ef.appspot.com", messagingSenderId: "458797803788", appId: "1:458797803788:web:37f2af2926a84288f0c129", measurementId: "G-J2QG09D2Q7" }, assetBucketUrl: "feedme-dev-4c3ef.appspot.com", importFilesBucketUrl: "feedme-dev-4c3ef.appspot.com", clientId: "1a362d621873497b277ea55258cc82594ba148d235257f7bd44ea2acc132d8a4", featureFlagApiKey: "MaGoXrEWuEJNpWgKTqseee" };
836
836
  const ct = {
837
837
  broadcastAppInbox: "connect_broadcast_app_inbox_countries",
838
838
  broadcastPush: "connect_broadcast_push_countries",
@@ -0,0 +1,5 @@
1
+ const c = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='%231877F2'%3e%3cpath%20d='M24%2012.073c0-6.627-5.373-12-12-12s-12%205.373-12%2012c0%205.99%204.388%2010.954%2010.125%2011.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007%201.792-4.669%204.533-4.669%201.312%200%202.686.235%202.686.235v2.953H15.83c-1.491%200-1.956.925-1.956%201.874v2.25h3.328l-.532%203.47h-2.796v8.385C19.612%2023.027%2024%2018.062%2024%2012.073z'/%3e%3c/svg%3e", l = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2048%2048'%3e%3cpath%20fill='%23EA4335'%20d='M24%209.5c3.14%200%205.95%201.08%208.17%202.86l6.08-6.08C34.46%203.1%2029.5%201%2024%201%2014.82%201%206.96%206.48%203.22%2014.44l7.08%205.5C12.08%2013.66%2017.58%209.5%2024%209.5z'/%3e%3cpath%20fill='%234285F4'%20d='M46.52%2024.5c0-1.64-.15-3.22-.42-4.74H24v8.98h12.7c-.55%202.96-2.2%205.46-4.68%207.14l7.18%205.58C43.18%2037.36%2046.52%2031.38%2046.52%2024.5z'/%3e%3cpath%20fill='%23FBBC05'%20d='M10.3%2028.56A14.56%2014.56%200%200%201%209.5%2024c0-1.58.27-3.1.76-4.52l-7.08-5.5A23.94%2023.94%200%200%200%200%2024c0%203.86.92%207.5%202.56%2010.72l7.74-6.16z'/%3e%3cpath%20fill='%2334A853'%20d='M24%2047c5.5%200%2010.12-1.82%2013.48-4.94l-7.18-5.58c-1.82%201.22-4.14%201.94-6.3%201.94-6.42%200-11.92-4.16-13.7-9.86l-7.74%206.16C6.96%2041.52%2014.82%2047%2024%2047z'/%3e%3cpath%20fill='none'%20d='M0%200h48v48H0z'/%3e%3c/svg%3e";
2
+ export {
3
+ c as f,
4
+ l as g
5
+ };
@@ -1,4 +1,4 @@
1
- import { j as l } from "./index-B_BmgKrh.js";
1
+ import { h as l } from "./index-BaTnDV-T.js";
2
2
  function u(t, e) {
3
3
  switch (t) {
4
4
  case "COIN":
@@ -1,10 +1,23 @@
1
- import { g as t, s as u, S as c, b as i } from "./index-iVbjwKxc.js";
2
- const a = (e = c.getBusinessId()) => {
1
+ import { g as t, s as u, S as o, d } from "./index-Ye3qFt34.js";
2
+ import { z as c } from "./app-BG-zK89d.js";
3
+ import { z as i } from "./index-C_H8jFYf.js";
4
+ const l = i.object({
5
+ tierCycleEnable: i.boolean()
6
+ }), a = (e = o.getBusinessId()) => {
3
7
  if (!e) throw new Error("Invalid business ID");
4
- return i(`businesses/${e}/membership`, {
8
+ return d(`businesses/${e}/membership`, {
5
9
  noIdRequired: !0
6
10
  });
7
- }, o = {
11
+ }, m = {
12
+ async migrateTierRules(e) {
13
+ const r = t(
14
+ await a().post(
15
+ "tiers/migrate",
16
+ l.parse(e)
17
+ )
18
+ );
19
+ return c.object({ migrated: c.boolean() }).parse(r);
20
+ },
8
21
  async read(e) {
9
22
  return t(await a(e).get(""));
10
23
  },
@@ -117,7 +130,7 @@ const a = (e = c.getBusinessId()) => {
117
130
  },
118
131
  async getWhatsappNumbers() {
119
132
  return t(
120
- await u(`whatsappList/${c.getBusinessId()}`).get(
133
+ await u(`whatsappList/${o.getBusinessId()}`).get(
121
134
  ""
122
135
  )
123
136
  );
@@ -149,5 +162,5 @@ const a = (e = c.getBusinessId()) => {
149
162
  }
150
163
  };
151
164
  export {
152
- o as m
165
+ m
153
166
  };
@@ -1,4 +1,4 @@
1
- import { b as c0, c as q0, g as o0 } from "./app-C06bAZj3.js";
1
+ import { b as c0, c as q0, g as o0 } from "./app-BG-zK89d.js";
2
2
  import { m as W0 } from "./moment-D7p2TMB-.js";
3
3
  var H = { exports: {} }, _ = { exports: {} };
4
4
  const d0 = /* @__PURE__ */ c0(W0);