@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
package/dist/app.js CHANGED
@@ -1,6 +1,7 @@
1
- import { F as e, i as r, r as o } from "./app-C06bAZj3.js";
1
+ import "vue";
2
+ import { F as e, i as o, r as p } from "./app-BG-zK89d.js";
2
3
  export {
3
4
  e as FmApp,
4
- r as i18nMessages,
5
- o as routes
5
+ o as i18nMessages,
6
+ p as routes
6
7
  };
@@ -1,8 +1,8 @@
1
1
  var w = Object.defineProperty;
2
2
  var y = (e, s, o) => s in e ? w(e, s, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[s] = o;
3
3
  var n = (e, s, o) => y(e, typeof s != "symbol" ? s + "" : s, o);
4
- import { u as x } from "./loading-CQm1DKWE.js";
5
- import { w as h, u as a } from "./xlsx-B8OqaJfb.js";
4
+ import { u as x } from "./loading-CsOSUWBd.js";
5
+ import { w as h, u as a } from "./xlsx--RjkGa9A.js";
6
6
  const t = {
7
7
  sortBy: "_id",
8
8
  descending: !1,
@@ -1,7 +1,7 @@
1
1
  import { ref as i, computed as u } from "vue";
2
2
  import { defineStore as w } from "pinia";
3
3
  import { useCoreStore as y } from "@feedmepos/mf-common";
4
- import { d as I, g as r, A as b, S, b as D } from "./index-iVbjwKxc.js";
4
+ import { a as I, g as r, A as b, S, d as D } from "./index-Ye3qFt34.js";
5
5
  const $ = {
6
6
  async readSettings(e) {
7
7
  try {
@@ -1,14 +1,14 @@
1
- import { defineStore as d } from "pinia";
2
- import { reactive as f, onMounted as b, ref as a } from "vue";
3
- import { c } from "./index-BkKu2G2c.js";
4
- import { g as i, S as I, b as g } from "./index-iVbjwKxc.js";
1
+ import { defineStore as m } from "pinia";
2
+ import { reactive as b, onMounted as f, ref as s } from "vue";
3
+ import { c } from "./index-DkMy7WpU.js";
4
+ import { g as i, S as g, d as h } from "./index-Ye3qFt34.js";
5
5
  const p = () => {
6
- const e = I.getBusinessId();
6
+ const e = g.getBusinessId();
7
7
  if (!e) throw new Error("Invalid business ID");
8
- return g(`businesses/${e}/campaigns`, {
8
+ return h(`businesses/${e}/campaigns`, {
9
9
  noIdRequired: !0
10
10
  });
11
- }, h = {
11
+ }, I = {
12
12
  async readAll() {
13
13
  return i(await p().get("templates"));
14
14
  },
@@ -17,8 +17,8 @@ const p = () => {
17
17
  await p().get(`templates/${e}`)
18
18
  );
19
19
  }
20
- }, S = d("mf-connect-campaign", () => {
21
- const e = f({
20
+ }, A = m("mf-connect-campaign", () => {
21
+ const e = b({
22
22
  promotion: [],
23
23
  voucher: [],
24
24
  broadcast: [],
@@ -27,12 +27,13 @@ const p = () => {
27
27
  credit: [],
28
28
  token: [],
29
29
  mission: [],
30
+ grab: [],
30
31
  all: []
31
32
  });
32
- b(() => {
33
+ f(() => {
33
34
  console.log("🔧 CampaignStore Installed");
34
35
  });
35
- const t = a([]), r = a([]), n = a([]);
36
+ const t = s([]), r = s([]), n = s([]);
36
37
  async function u(k) {
37
38
  const o = await c.readAll({
38
39
  limit: 1e3,
@@ -40,42 +41,47 @@ const p = () => {
40
41
  sortBy: "_id",
41
42
  descending: !0
42
43
  });
43
- Object.keys(e).forEach((s) => {
44
- e[s] = [];
45
- }), e.all = o.resources.filter((s) => s.type !== "MEMBERSHIP");
46
- for (const s of o.resources)
47
- switch (s.type) {
44
+ Object.keys(e).forEach((a) => {
45
+ e[a] = [];
46
+ }), e.all = o.resources.filter(
47
+ (a) => a.type !== "MEMBERSHIP"
48
+ );
49
+ for (const a of o.resources)
50
+ switch (a.type) {
48
51
  case "PROMOTION":
49
- e.promotion.push(s);
52
+ e.promotion.push(a);
50
53
  break;
51
54
  case "VOUCHER":
52
- e.voucher.push(s), n.value.push(s);
55
+ e.voucher.push(a), n.value.push(a);
53
56
  break;
54
57
  case "BROADCAST":
55
- ["SCHEDULE", "FEEDBACK"].includes(s.event.type) && e.broadcast.push(s);
58
+ ["SCHEDULE", "FEEDBACK"].includes(a.event.type) && e.broadcast.push(a);
56
59
  break;
57
60
  case "POINT":
58
- e.experience.push(s);
61
+ e.experience.push(a);
59
62
  break;
60
63
  case "COIN":
61
- e.point.push(s);
64
+ e.point.push(a);
62
65
  break;
63
66
  case "CREDIT":
64
- e.credit.push(s);
67
+ e.credit.push(a);
65
68
  break;
66
69
  case "GAME":
67
- e.token.push(s);
70
+ e.token.push(a);
68
71
  break;
69
72
  case "MISSION":
70
- e.mission.push(s);
73
+ e.mission.push(a);
74
+ break;
75
+ case "GRAB":
76
+ e.grab.push(a);
71
77
  break;
72
78
  }
73
79
  }
74
80
  async function l() {
75
81
  r.value = await c.readGroups();
76
82
  }
77
- async function m() {
78
- t.value = await h.readAll();
83
+ async function d() {
84
+ t.value = await I.readAll();
79
85
  }
80
86
  return {
81
87
  // State
@@ -86,9 +92,9 @@ const p = () => {
86
92
  // Actions
87
93
  read: u,
88
94
  readGroups: l,
89
- readTemplates: m
95
+ readTemplates: d
90
96
  };
91
97
  });
92
98
  export {
93
- S as u
99
+ A as u
94
100
  };
@@ -1,27 +1,27 @@
1
1
  import { h as u } from "./moment-D7p2TMB-.js";
2
- import "./index-TDCPGtW3.js";
3
- import { e as p } from "./effect-EL4V3pAu.js";
4
- import { components as f } from "@feedmepos/ui-library";
5
- import { i as b } from "./rule-builder-D0B0DPao.js";
6
- import { c as O } from "./rule-Ba-s0L_w.js";
7
- import { u as E } from "./business-D23Dt1x4.js";
8
- import { C as m } from "./campaign.fn-0MNUj1fZ.js";
9
- import { g as h, t as g } from "./index-rcfcslIC.js";
10
- import { c as d } from "./string-Gcy5IM_H.js";
11
- import { i as c } from "./plugins-DKQeoL_e.js";
12
- import { h as l } from "vue";
13
- import { F as s } from "./campaign.enum-BqekIiiN.js";
14
- const N = [
2
+ import "./index-pnM5q4c_.js";
3
+ import { e as l } from "./effect-bMGarJZ6.js";
4
+ import { components as d } from "@feedmepos/ui-library";
5
+ import { a as E } from "./index-taPHgOqE.js";
6
+ import { c as N } from "./rule-D6_iss3O.js";
7
+ import { u as I } from "./business-9_NOI2V9.js";
8
+ import { C as m } from "./campaign.fn-COkPH1QE.js";
9
+ import { g as y, t as h } from "./index-BxwJfT08.js";
10
+ import { c as C } from "./string-Gcy5IM_H.js";
11
+ import { i as f } from "./plugins-De_chCYU.js";
12
+ import { h as p } from "vue";
13
+ import { F as s } from "./campaign.enum-Dx-Zo68Q.js";
14
+ const R = [
15
15
  "APP_INBOX",
16
16
  "PUSH",
17
17
  "SMS",
18
18
  "EMAIL",
19
19
  "WHATSAPP"
20
- ], I = [...N];
21
- function F(t) {
22
- return I.includes(t);
20
+ ], S = [...R];
21
+ function j(t) {
22
+ return S.includes(t);
23
23
  }
24
- function y(t, e) {
24
+ function O(t, e) {
25
25
  return t === "APP_INBOX" ? {
26
26
  title: "",
27
27
  previewText: "",
@@ -40,17 +40,17 @@ function y(t, e) {
40
40
  variables: e
41
41
  };
42
42
  }
43
- function k(t, e, n = []) {
43
+ function V(t, e, n = []) {
44
44
  return t.channels.includes(e) ? t : {
45
45
  ...t,
46
46
  channels: [...t.channels, e],
47
47
  content: {
48
48
  ...t.content,
49
- [e]: t.content[e] ?? y(e, n)
49
+ [e]: t.content[e] ?? O(e, n)
50
50
  }
51
51
  };
52
52
  }
53
- function G(t, e) {
53
+ function X(t, e) {
54
54
  const n = { ...t.content };
55
55
  return delete n[e], {
56
56
  ...t,
@@ -58,87 +58,99 @@ function G(t, e) {
58
58
  content: n
59
59
  };
60
60
  }
61
- function j(t, e, n) {
61
+ function z(t, e, n) {
62
62
  return {
63
63
  ...t,
64
64
  content: { ...t.content, [e]: n }
65
65
  };
66
66
  }
67
- function V(t, e, n) {
67
+ function W(t, e, n) {
68
68
  const o = t.channels.indexOf(e), a = o + n;
69
69
  if (o < 0 || a < 0 || a >= t.channels.length) return t;
70
70
  const r = [...t.channels];
71
71
  return [r[o], r[a]] = [r[a], r[o]], { ...t, channels: r };
72
72
  }
73
- function X(t, e, n = []) {
73
+ function J(t, e, n = []) {
74
74
  const [o, ...a] = t.channels;
75
75
  if (o === e) return t;
76
76
  const r = {
77
77
  ...t.content,
78
- [e]: t.content[e] ?? y(e, n)
78
+ [e]: t.content[e] ?? O(e, n)
79
79
  };
80
80
  return o && delete r[o], {
81
81
  ...t,
82
- channels: [e, ...a.filter((C) => C !== e)],
82
+ channels: [e, ...a.filter((b) => b !== e)],
83
83
  content: r
84
84
  };
85
85
  }
86
- function z(t, e) {
86
+ function K(t, e) {
87
87
  if (!e) return !1;
88
88
  const n = t.content[e];
89
89
  return n ? ["title", "previewText", "content", "body"].some(
90
90
  (o) => typeof n[o] == "string" && !!n[o].trim()
91
91
  ) : !1;
92
92
  }
93
- function W(t, e) {
93
+ function q(t, e) {
94
94
  return { ...t, mode: e };
95
95
  }
96
- function J(t, e) {
96
+ function Q(t, e) {
97
97
  const n = t.content[e];
98
98
  if (!n) return !1;
99
99
  if (e === "APP_INBOX") {
100
100
  const o = n, a = (o.buttons ?? []).every(
101
- (r) => r.label.trim().length > 0 && h.safeParse(r.url ?? "").success
101
+ (r) => r.label.trim().length > 0 && y.safeParse(r.url ?? "").success
102
102
  );
103
103
  return o.title.trim().length > 0 && o.previewText.trim().length > 0 && a;
104
104
  }
105
105
  if (e === "PUSH") {
106
- const o = n, a = o.title.trim().length > 0 && o.body.trim().length > 0, r = o.destination !== "EXTERNAL" || h.safeParse(o.url ?? "").success;
106
+ const o = n, a = o.title.trim().length > 0 && o.body.trim().length > 0, r = o.destination !== "EXTERNAL" || y.safeParse(o.url ?? "").success;
107
107
  return a && r;
108
108
  }
109
109
  return n.content.trim().length > 0;
110
110
  }
111
- function R(t, e) {
111
+ function A(t, e) {
112
112
  return t.channels.map(e).join(t.mode === "fallback" ? " → " : " + ");
113
113
  }
114
- function K(t) {
114
+ function Z(t) {
115
115
  var e, n;
116
116
  if (!(!t || t.delivery)) {
117
117
  if ((n = (e = t.message) == null ? void 0 : e.content) != null && n.trim()) {
118
- t.delivery = g(t);
118
+ t.delivery = h(t);
119
119
  return;
120
120
  }
121
121
  delete t.message, t.delivery = { mode: "fallback", channels: [], content: {} };
122
122
  }
123
123
  }
124
+ const c = f.global.t;
125
+ function D() {
126
+ const t = f.global.locale;
127
+ return typeof t == "string" ? t : t.value;
128
+ }
129
+ function g(t) {
130
+ return new Intl.DateTimeFormat(D(), {
131
+ day: "2-digit",
132
+ month: "short",
133
+ year: "numeric"
134
+ }).format(new Date(t));
135
+ }
124
136
  function i(t) {
125
- return l(
137
+ return p(
126
138
  "div",
127
139
  {
128
140
  class: `${t.chipClass} gap-4 h-[22px] inline-flex items-center justify-center min-w-min px-8 rounded-md`
129
141
  },
130
142
  [
131
- l(f.FmIcon, { size: "sm", name: t.icon, outline: !0 }),
132
- l("span", { class: "fm-typo-en-body-md-600" }, t.name)
143
+ p(d.FmIcon, { size: "sm", name: t.icon, outline: !0 }),
144
+ p("span", { class: "fm-typo-en-body-md-600" }, t.name)
133
145
  ]
134
146
  );
135
147
  }
136
- const q = {
148
+ const tt = {
137
149
  [s.enum.CREDIT]: {
138
150
  chipClass: "!text-fm-color-secondary-plum !bg-[#f2ebfe]",
139
151
  icon: "local_activity",
140
152
  get name() {
141
- return c.global.t("connect.campaign.common.typeName.CREDIT");
153
+ return c("connect.campaign.common.typeName.CREDIT");
142
154
  },
143
155
  chip() {
144
156
  return i(this);
@@ -148,7 +160,7 @@ const q = {
148
160
  chipClass: "!text-fm-color-secondary-citrus !bg-fm-color-system-warning-100",
149
161
  icon: "loyalty",
150
162
  get name() {
151
- return c.global.t("connect.campaign.common.typeName.PROMOTION");
163
+ return c("connect.campaign.common.typeName.PROMOTION");
152
164
  },
153
165
  chip() {
154
166
  return i(this);
@@ -158,7 +170,7 @@ const q = {
158
170
  chipClass: "!text-fm-color-secondary-halite !bg-[#fff0f6]",
159
171
  icon: "sell",
160
172
  get name() {
161
- return c.global.t("connect.campaign.common.typeName.VOUCHER");
173
+ return c("connect.campaign.common.typeName.VOUCHER");
162
174
  },
163
175
  chip() {
164
176
  return i(this);
@@ -168,7 +180,7 @@ const q = {
168
180
  chipClass: "!text-fm-color-secondary-cocoa !bg-[#fff9e6]",
169
181
  icon: "award_star",
170
182
  get name() {
171
- return c.global.t("connect.campaign.common.typeName.POINT");
183
+ return c("connect.campaign.common.typeName.POINT");
172
184
  },
173
185
  chip() {
174
186
  return i(this);
@@ -178,7 +190,7 @@ const q = {
178
190
  chipClass: "!text-fm-color-typo-info !bg-fm-color-system-info-100",
179
191
  icon: "campaign",
180
192
  get name() {
181
- return c.global.t("connect.campaign.common.typeName.BROADCAST");
193
+ return c("connect.campaign.common.typeName.BROADCAST");
182
194
  },
183
195
  chip() {
184
196
  return i(this);
@@ -188,7 +200,7 @@ const q = {
188
200
  chipClass: "!text-fm-color-secondary-mint !bg-fm-color-system-success-100",
189
201
  icon: "database",
190
202
  get name() {
191
- return c.global.t("connect.campaign.common.typeName.GAME");
203
+ return c("connect.campaign.common.typeName.GAME");
192
204
  },
193
205
  chip() {
194
206
  return i(this);
@@ -198,7 +210,7 @@ const q = {
198
210
  chipClass: "!text-fm-color-secondary-tuna !bg-[#e3f4f9]",
199
211
  icon: "editor_choice",
200
212
  get name() {
201
- return c.global.t("connect.campaign.common.typeName.REWARD_POOL");
213
+ return c("connect.campaign.common.typeName.REWARD_POOL");
202
214
  },
203
215
  chip() {
204
216
  return i(this);
@@ -208,7 +220,7 @@ const q = {
208
220
  chipClass: "!text-fm-color-system-success-400 !bg-fm-color-system-success-100",
209
221
  icon: "monetization_on",
210
222
  get name() {
211
- return c.global.t("connect.campaign.common.typeName.COIN");
223
+ return c("connect.campaign.common.typeName.COIN");
212
224
  },
213
225
  chip() {
214
226
  return i(this);
@@ -218,106 +230,120 @@ const q = {
218
230
  chipClass: "",
219
231
  icon: "",
220
232
  get name() {
221
- return c.global.t("connect.campaign.common.typeName.MEMBERSHIP");
233
+ return c("connect.campaign.common.typeName.MEMBERSHIP");
222
234
  },
223
235
  chip() {
224
236
  return i(this);
225
237
  }
226
238
  },
227
- // TODO: confirm color
228
239
  [s.enum.MISSION]: {
229
240
  chipClass: "!text-fm-color-secondary-tuna !bg-[#e3f4f9]",
230
241
  icon: "editor_choice",
231
242
  get name() {
232
- return c.global.t("connect.campaign.common.typeName.MISSION");
243
+ return c("connect.campaign.common.typeName.MISSION");
233
244
  },
234
245
  chip() {
235
246
  return i(this);
236
247
  }
248
+ },
249
+ [s.enum.GRAB]: {
250
+ chipClass: "!text-fm-color-secondary-tuna !bg-[#e3f4f9]",
251
+ icon: "editor_choice",
252
+ name: "Grab",
253
+ chip() {
254
+ return i(this);
255
+ }
237
256
  }
238
257
  };
239
- function Q(t) {
240
- const e = P(t), n = {
258
+ function et(t) {
259
+ const e = _(t), n = {
241
260
  active: "text-fm-color-typo-success bg-fm-color-system-success-100",
242
261
  upcoming: "text-fm-color-typo-info bg-fm-color-system-info-100",
243
262
  expired: "text-fm-color-typo-error bg-fm-color-system-error-100"
244
263
  };
245
- return t.type == "VOUCHER" ? l(f.FmChip, {
264
+ return t.type == "VOUCHER" ? p(d.FmChip, {
246
265
  class: n[e],
247
- label: d.title(
248
- c.global.t(`connect.campaign.common.status.${e}`)
249
- ),
266
+ label: C.title(c(`connect.campaign.common.status.${e}`)),
250
267
  compact: !0
251
- }) : l(f.FmChip, {
268
+ }) : p(d.FmChip, {
252
269
  class: n[e],
253
- label: d.title(
254
- c.global.t(`connect.campaign.common.status.${e}`)
255
- ),
270
+ label: C.title(c(`connect.campaign.common.status.${e}`)),
256
271
  compact: !0
257
272
  });
258
273
  }
259
- function S(t) {
274
+ function nt(t) {
275
+ const e = t.timeframeOptions;
276
+ if (!e || !e.start && !e.end)
277
+ return c("connect.campaign.common.always_active");
278
+ if (!e.start && e.end)
279
+ return c("connect.campaign.common.valid_until", {
280
+ date: g(e.end)
281
+ });
282
+ const n = g(e.start), o = e.end ? g(e.end) : c("connect.campaign.common.unlimited");
283
+ return `${n} -> ${o}`;
284
+ }
285
+ function P(t) {
260
286
  if (!t || !t.start && !t.end)
261
287
  return "connect.campaign.common.always";
262
288
  const e = t.start ? u(t.start).format("DD MMM YYYY") : "From campaign creation", n = t.end ? u(t.end).format("DD MMM YYYY") : "Never ends";
263
289
  return `${e} - ${n}`;
264
290
  }
265
- function Z(t) {
291
+ function ot(t) {
266
292
  const { campaign: e } = t;
267
293
  return {
268
294
  "connect.campaign.common.campaign_name": e.name,
269
- "connect.campaign.common.campaign_period": S(
295
+ "connect.campaign.common.campaign_period": P(
270
296
  e.timeframeOptions
271
297
  ),
272
298
  get "connect.campaign.common.next_schedule_at"() {
273
- if (e.event.type != "SCHEDULE" || !e.event.rule || !b(e.event.rule))
299
+ if ((e == null ? void 0 : e.event.type) != "SCHEDULE" || !e.event.rule || !E(e.event.rule))
274
300
  return;
275
- const n = O(
301
+ const n = N(
276
302
  e.event.rule.rules.g_schedule
277
303
  );
278
304
  return n ? u(n).format("ddd, DD MMM YYYY, hh:mmA") : void 0;
279
305
  },
280
306
  get "connect.campaign.common.discount_type"() {
281
- if (e.type == "PROMOTION") return p(e.effect);
307
+ if (e.type == "PROMOTION") return l(e.effect);
282
308
  if ("configs" in t && t.configs.type == "VOUCHER")
283
- return p(t.configs.extras.effect);
309
+ return l(t.configs.extras.effect);
284
310
  },
285
311
  get "connect.campaign.broadcast.summary.delivery"() {
286
312
  if (e.type != "BROADCAST") return;
287
- const n = g(e);
313
+ const n = h(e);
288
314
  if (!(n.channels.length < 2))
289
315
  return `connect.campaign.broadcast.mode.${n.mode}.label`;
290
316
  },
291
317
  get "connect.campaign.broadcast.summary.channels"() {
292
318
  var n;
293
319
  if (e.type == "BROADCAST")
294
- return ((n = A(e)) == null ? void 0 : n.route) ?? "connect.campaign.broadcast.noChannelsSelected";
320
+ return ((n = T(e)) == null ? void 0 : n.route) ?? "connect.campaign.broadcast.noChannelsSelected";
295
321
  },
296
322
  get "connect.campaign.common.available_at"() {
297
323
  return e.targetLocation ? e.targetLocation.length > 0 ? e.targetLocation.map(
298
- (n) => E().locationItems.find((o) => o.value == n).label
324
+ (n) => I().locationItems.find((o) => o.value == n).label
299
325
  ).join(",") : "connect.campaign.common.no_location" : "connect.campaign.common.all_locations";
300
326
  }
301
327
  };
302
328
  }
303
- function P(t) {
329
+ function _(t) {
304
330
  return t.timeframeOptions && t.timeframeOptions.type == "timeframe" ? u().isBetween(
305
331
  t.timeframeOptions.start ?? u().subtract(1, "d"),
306
332
  t.timeframeOptions.end ?? u().add(1, "d")
307
333
  ) ? "active" : u().isAfter(t.timeframeOptions.end) ? "expired" : "upcoming" : "active";
308
334
  }
309
- function A(t) {
310
- const e = g(t);
335
+ function T(t) {
336
+ const e = h(t);
311
337
  if (!e.channels.length) return null;
312
- const o = R(e, (a) => c.global.t(`connect.campaign.broadcast.channel.${a}`));
338
+ const o = A(e, (a) => f.global.t(`connect.campaign.broadcast.channel.${a}`));
313
339
  return {
314
- strategy: e.channels.length > 1 ? c.global.t(
340
+ strategy: e.channels.length > 1 ? f.global.t(
315
341
  `connect.campaign.broadcast.strategy.${e.mode}`
316
342
  ) : null,
317
343
  route: o
318
344
  };
319
345
  }
320
- function tt(t) {
346
+ function at(t) {
321
347
  var e, n;
322
348
  switch (t.event.type) {
323
349
  case "BILL_COMPLETED":
@@ -329,7 +355,7 @@ function tt(t) {
329
355
  return t.earningOption.type == "FIXED" ? `Spend to get ${t.earningOption.amount} ${m.formattedType(t.type)}` : `Every ${t.earningOption.every} amount spent get ${t.earningOption.amount} ${m.formattedType(t.type)}`;
330
356
  case "VOUCHER":
331
357
  const a = (n = (e = t == null ? void 0 : t.pf_collectible) == null ? void 0 : e.extras) == null ? void 0 : n.effect;
332
- return a ? `${o} - ${p(a)}` : o;
358
+ return a ? `${o} - ${l(a)}` : o;
333
359
  default:
334
360
  return o;
335
361
  }
@@ -344,7 +370,7 @@ function tt(t) {
344
370
  case "MEMBERSHIP_JOINED":
345
371
  return `Receive ${m.formattedType(t.type)} when member joined`;
346
372
  case "MAKING_ORDER":
347
- return t.type !== "PROMOTION" ? void 0 : p(t.effect);
373
+ return t.type !== "PROMOTION" ? void 0 : l(t.effect);
348
374
  default:
349
375
  throw new Error(
350
376
  `Not implemented ${JSON.stringify({ cause: t.event.type })}`
@@ -352,22 +378,23 @@ function tt(t) {
352
378
  }
353
379
  }
354
380
  export {
355
- q as C,
356
- Q as a,
357
- tt as b,
358
- A as c,
359
- N as d,
360
- J as e,
361
- W as f,
362
- P as g,
363
- k as h,
364
- F as i,
365
- z as j,
366
- X as k,
367
- j as l,
368
- V as m,
369
- Z as n,
370
- K as o,
371
- G as r,
372
- S as s
381
+ tt as C,
382
+ _ as a,
383
+ et as b,
384
+ at as c,
385
+ T as d,
386
+ R as e,
387
+ Q as f,
388
+ nt as g,
389
+ q as h,
390
+ j as i,
391
+ V as j,
392
+ K as k,
393
+ J as l,
394
+ W as m,
395
+ z as n,
396
+ ot as o,
397
+ Z as p,
398
+ X as r,
399
+ P as s
373
400
  };
@@ -9,7 +9,8 @@ const M = E.enum([
9
9
  "COIN",
10
10
  "REWARD_POOL",
11
11
  "GAME",
12
- "MISSION"
12
+ "MISSION",
13
+ "GRAB"
13
14
  ]), O = E.enum([
14
15
  "TIME_BASED_PROMOTION",
15
16
  "GAME_PROMOTION",