@feedmepos/mf-connect 0.1.98-beta.8 → 0.1.98-prod

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 (116) hide show
  1. package/dist/Analytic-BHDjuMfN.js +426 -0
  2. package/dist/{App-DsB2o1oB.js → App-BSSze_b9.js} +106 -118
  3. package/dist/{Bin-DMr7K8Kj.js → Bin-DfzoQbE0.js} +8 -8
  4. package/dist/{Broadcast-C9akM-TB.js → Broadcast-DsqO4SXX.js} +17 -18
  5. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CwGoEBsW.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DQ0x2VJp.js} +6 -5
  6. package/dist/{Card-DRkIYs0M.js → Card-VxbqomXV.js} +19 -19
  7. package/dist/{Collections-B0uGC2FE.js → Collections-CvD98I3M.js} +185 -197
  8. package/dist/{Credit-V5YA_hGx.js → Credit-BhM2m2L2.js} +53 -54
  9. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DvfrrjHc.js +2223 -0
  10. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-DJLxGk7W.js → EffectSheet.vue_vue_type_style_index_0_lang-CPx9U9fU.js} +6 -6
  11. package/dist/{Experience-WTWy5yY6.js → Experience-uWQRb-qf.js} +34 -35
  12. package/dist/{FileSaver.min-BlA0oZEC.js → FileSaver.min-DKNoHTvP.js} +1 -1
  13. package/dist/{Game-BwOfTCW5.js → Game-BgT3oNx7.js} +15 -16
  14. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-DNtLW0yQ.js → ImageInput.vue_vue_type_script_setup_true_lang-ClqrJbU6.js} +1 -1
  15. package/dist/{Index-m7l4insz.js → Index-D3RgVj9V.js} +10 -10
  16. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-Dsg2sWjF.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CkCpumzB.js} +1 -1
  17. package/dist/{MainLayout-Du5kZOtA.js → MainLayout-B2RiPsIR.js} +1 -1
  18. package/dist/{Marketing-C9pSIdBU.js → Marketing-FrE7k7eW.js} +4 -4
  19. package/dist/{MarketingMaterialEdit-BEF2T9LR.js → MarketingMaterialEdit-DGNjEUu-.js} +211 -214
  20. package/dist/{Member-DUV_vbPI.js → Member-CgTagUQ9.js} +20 -20
  21. package/dist/{MemberList-Ye4nOk-i.js → MemberList-CKbzsDMX.js} +51 -50
  22. package/dist/{MemberTransactions-CAut1TQb.js → MemberTransactions-CnY5cFdv.js} +1 -1
  23. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-1AuHixPC.js → MessageInput.vue_vue_type_script_setup_true_lang-DqivG_O4.js} +11 -11
  24. package/dist/{Mission-BBmCGpt8.js → Mission-BGNqy7wQ.js} +34 -35
  25. package/dist/{Overview-DOJj4XvO.js → Overview-CnpF74wa.js} +19 -19
  26. package/dist/{Point-Bzg6hi6o.js → Point-BHgIy7Bz.js} +29 -30
  27. package/dist/{Promotion-BMXIp_ef.js → Promotion-CNQvO5Lq.js} +105 -111
  28. package/dist/{Queue-55G2gtP5.js → Queue-CoPBE0UP.js} +43 -43
  29. package/dist/{Record-DNPI02c6.js → Record-BuDQ15FJ.js} +10 -10
  30. package/dist/{Reward-CnP8R2pS.js → Reward-BQlCO3Dk.js} +17 -17
  31. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BN71h9IK.js → RewardGroup.vue_vue_type_script_setup_true_lang-nhNr_T7D.js} +12 -12
  32. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-lnxwLa8o.js +1888 -0
  33. package/dist/{Segment-CxiQnnyj.js → Segment-DKFAXGzY.js} +78 -77
  34. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-C4vohf6c.js → SelectItems.vue_vue_type_script_setup_true_lang-CUR7djaM.js} +3 -3
  35. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-B1vj5f7T.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-CZ3s2W8Q.js} +12 -12
  36. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-cWx0G3nM.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BbilZk82.js} +4 -4
  37. package/dist/{Setting-jHAjccod.js → Setting-hrDZ1cQR.js} +248 -259
  38. package/dist/{SettingAdvertisements-Vt7w1WN3.js → SettingAdvertisements-CQsx4JqQ.js} +13 -13
  39. package/dist/{Store-Cu-hKmVa.js → Store-Cgmsklnt.js} +24 -24
  40. package/dist/{StoreRewards-DILeipMG.js → StoreRewards-CrPO4DKG.js} +16 -16
  41. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-yesp6BoT.js +1118 -0
  42. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-BnKybdKJ.js +142 -0
  43. package/dist/{Tier-BAZ1xuKL.js → Tier-DgKMMyKr.js} +469 -544
  44. package/dist/{Title-CcNAt47f.js → Title-BKijiEFV.js} +92 -93
  45. package/dist/{Transaction-D7DO3dKQ.js → Transaction-zHL4q_wj.js} +2 -2
  46. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-hUjQVZ_U.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DjafpVOa.js} +6 -6
  47. package/dist/{Voucher-Cq-n1CaC.js → Voucher-DW4-SD1w.js} +27 -28
  48. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-CTQDxc5l.js → VoucherEditor.vue_vue_type_script_setup_true_lang-y2wm2Bcu.js} +12 -12
  49. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DuRKA4cj.js → ZodTextField.vue_vue_type_script_setup_true_lang-BWZUE554.js} +2 -2
  50. package/dist/{app-Z-UKRG5V.js → app-B23RANXL.js} +3083 -3663
  51. package/dist/app.js +3 -4
  52. package/dist/{business-C7EF6cKC.js → business-BFU-2tpT.js} +1 -1
  53. package/dist/{campaign-DHBuP4UA.js → campaign-BEKKOWya.js} +64 -114
  54. package/dist/{campaign--MjoY1Mn.js → campaign-CwlWx58O.js} +7 -13
  55. package/dist/{campaign.enum-BNN2gLFY.js → campaign.enum-5KIiekYl.js} +2 -3
  56. package/dist/{campaign.fn-Bd34dVnx.js → campaign.fn-CyWn_KL-.js} +130 -130
  57. package/dist/{collectible.enum-DO9HdJGH.js → collectible.enum-DmmR-4Nj.js} +1 -1
  58. package/dist/collection.fn-BB1OjBHL.js +26 -0
  59. package/dist/dto-p31OYANk.js +216 -0
  60. package/dist/{effect-BcB8IlTI.js → effect-DNDXE2iM.js} +1 -1
  61. package/dist/{email-addresses-BcTeU4Sh.js → email-addresses-DXSkxrZ6.js} +2 -2
  62. package/dist/{export-CjB7qxZ9.js → export-zMj-UAnF.js} +3 -3
  63. package/dist/{helper-BSgrCJRv.js → helper-D32ml7Qv.js} +1 -1
  64. package/dist/{index-HXiYGO4_.js → index-9jgqbdnt.js} +7 -7
  65. package/dist/{index-hlyg-wxV.js → index-B2OiTtF5.js} +1 -1
  66. package/dist/{index-CoHWpylO.js → index-B9-jeiQR.js} +1281 -1518
  67. package/dist/{index-iMPtFp54.js → index-BWHk6oqv.js} +3 -3
  68. package/dist/{index-hbyCVNa7.js → index-BmmFSQPd.js} +3 -3
  69. package/dist/{index-CsoBDon4.js → index-CA09A75h.js} +1968 -1996
  70. package/dist/index-Cc15IFUt.js +55 -0
  71. package/dist/{index-BpI-BI4H.js → index-CcnOzrwY.js} +1 -1
  72. package/dist/{index-VlFWaBrg.js → index-DSGHkaP0.js} +1 -1
  73. package/dist/{index-BoYEqLif.js → index-DvHLsdIR.js} +205 -817
  74. package/dist/{index-Bf6jNZit.js → index-PrTZHXNT.js} +1 -1
  75. package/dist/{index-BIAjmMga.js → index-txVWLdtz.js} +1 -1
  76. package/dist/{index.esm2017-CM7OnEyP.js → index.esm2017-BJG8dqci.js} +209 -209
  77. package/dist/{loading-CSXr0Yqz.js → loading-DuZVM_Ow.js} +1 -1
  78. package/dist/{lodash-Bh7XKI-R.js → lodash-DqQem5rZ.js} +1 -1
  79. package/dist/{membership-CfredTm3.js → membership-CvoEzwor.js} +3 -3
  80. package/dist/{money-BZIST_m9.js → money-B9PJ_JYh.js} +1 -1
  81. package/dist/{number-DXLR2w95.js → number-GIC15kny.js} +1 -1
  82. package/dist/object-qECH92oz.js +26 -0
  83. package/dist/objectid-CtJ4pTf2.js +145 -0
  84. package/dist/{plugins-4FlbwoES.js → plugins-XAhAFHmZ.js} +95 -94
  85. package/dist/{reward-DUbl79bZ.js → reward-Dy0Z6PLL.js} +1 -1
  86. package/dist/{rule-BQUoZ4l_.js → rule-CUu9I1Ly.js} +487 -505
  87. package/dist/rule-builder-DPmaehAO.js +102 -0
  88. package/dist/style.css +1 -1
  89. package/dist/template-BHtdbnoX.js +236 -0
  90. package/dist/{index-CIBPhxlC.js → timezone-BE1YhvLN.js} +20 -21
  91. package/dist/{trigger-D5g5m6tT.js → trigger-BcHfjuiZ.js} +5 -5
  92. package/dist/{useMarketingMaterialActions-B-Jlw2Z9.js → useMarketingMaterialActions-YQq4LWOp.js} +3 -3
  93. package/dist/{usePagination-DHePBBoR.js → usePagination-B1KK2gTx.js} +1 -1
  94. package/dist/{user-C_ToSo-g.js → user-BTRRi1B3.js} +1 -1
  95. package/dist/{vue-i18n-BcYh6_51.js → vue-i18n-D8NX5Rry.js} +298 -298
  96. package/dist/{xlsx-h4G1C-xj.js → xlsx-C9LzK7Kg.js} +1 -1
  97. package/dist/{zod-CgigfJar.js → zod-D3ciRzE4.js} +1 -1
  98. package/package.json +4 -8
  99. package/dist/AuditLogs-BcfgiYnJ.js +0 -2013
  100. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +0 -58
  101. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-CYQMXARx.js +0 -3377
  102. package/dist/Grab-DmmwrGzk.js +0 -300
  103. package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-B9sJ-M20.js +0 -48
  104. package/dist/LoyaltyDashboard-CJdhYiea.js +0 -1082
  105. package/dist/Review-CYNPPxYU.js +0 -1141
  106. package/dist/ReviewFacebookCallback-0SUkKAaC.js +0 -243
  107. package/dist/ReviewGoogleCallback-BZEzx68n.js +0 -208
  108. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CtB9Ls5-.js +0 -1911
  109. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CGz6CTWA.js +0 -1130
  110. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-C7lVeybl.js +0 -7007
  111. package/dist/duplicateCampaign-2ODeDw3a.js +0 -51
  112. package/dist/index-Bm0QPucw.js +0 -67
  113. package/dist/index-Bv4MBLQ5.js +0 -52
  114. package/dist/object-BYyQ0PZp.js +0 -18
  115. package/dist/objectid-Dg4ZodlT.js +0 -145
  116. package/dist/template-BoiSG7G7.js +0 -188
package/dist/app.js CHANGED
@@ -1,7 +1,6 @@
1
- import "vue";
2
- import { d as e, i as o, r as p } from "./app-Z-UKRG5V.js";
1
+ import { d as e, i as r, r as o } from "./app-B23RANXL.js";
3
2
  export {
4
3
  e as FmApp,
5
- o as i18nMessages,
6
- p as routes
4
+ r as i18nMessages,
5
+ o as routes
7
6
  };
@@ -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 { a as I, g as r, A as b, S, b as D } from "./index-HXiYGO4_.js";
4
+ import { a as I, g as r, A as b, S, b as D } from "./index-9jgqbdnt.js";
5
5
  const $ = {
6
6
  async readSettings(e) {
7
7
  try {
@@ -1,49 +1,15 @@
1
- import "./index-CsoBDon4.js";
2
- import "./index-hbyCVNa7.js";
3
- import { h as s } from "./moment-D7p2TMB-.js";
4
- import "./index-CoHWpylO.js";
5
- import { e as f } from "./effect-BcB8IlTI.js";
1
+ import { h as i } from "./moment-D7p2TMB-.js";
2
+ import "./index-B9-jeiQR.js";
3
+ import { e as u } from "./effect-DNDXE2iM.js";
6
4
  import { components as l } from "@feedmepos/ui-library";
7
- import { i as h } from "./index-BoYEqLif.js";
8
- import { c as O } from "./rule-BQUoZ4l_.js";
9
- import { u as C } from "./business-C7EF6cKC.js";
10
- import { C as m } from "./campaign.fn-Bd34dVnx.js";
11
- import { c as g } from "./string-Gcy5IM_H.js";
12
- import { i as d } from "./plugins-4FlbwoES.js";
5
+ import { i as y } from "./rule-builder-DPmaehAO.js";
6
+ import { c as d } from "./rule-CUu9I1Ly.js";
7
+ import { u as h } from "./business-BFU-2tpT.js";
8
+ import { C as r } from "./campaign.fn-CyWn_KL-.js";
9
+ import { c as f } from "./string-Gcy5IM_H.js";
10
+ import { i as o } from "./plugins-XAhAFHmZ.js";
13
11
  import { h as p } from "vue";
14
- import { F as a } from "./campaign.enum-BNN2gLFY.js";
15
- function E(e) {
16
- switch (e) {
17
- case "PROMOTION":
18
- return "Promotion";
19
- case "VOUCHER":
20
- return "Voucher";
21
- case "CREDIT":
22
- return "Credit";
23
- case "POINT":
24
- return "Experience";
25
- case "COIN":
26
- return "Point";
27
- case "GAME":
28
- return "Game";
29
- default:
30
- return e;
31
- }
32
- }
33
- const G = {
34
- formattedType: E
35
- }, o = d.global.t;
36
- function I() {
37
- const e = d.global.locale;
38
- return typeof e == "string" ? e : e.value;
39
- }
40
- function u(e) {
41
- return new Intl.DateTimeFormat(I(), {
42
- day: "2-digit",
43
- month: "short",
44
- year: "numeric"
45
- }).format(new Date(e));
46
- }
12
+ import { F as a } from "./campaign.enum-5KIiekYl.js";
47
13
  function c(e) {
48
14
  return p(
49
15
  "div",
@@ -56,12 +22,12 @@ function c(e) {
56
22
  ]
57
23
  );
58
24
  }
59
- const H = {
25
+ const D = {
60
26
  [a.enum.CREDIT]: {
61
27
  chipClass: "!text-fm-color-secondary-plum !bg-[#f2ebfe]",
62
28
  icon: "local_activity",
63
29
  get name() {
64
- return o("connect.campaign.common.typeName.CREDIT");
30
+ return o.global.t("connect.campaign.common.typeName.CREDIT");
65
31
  },
66
32
  chip() {
67
33
  return c(this);
@@ -71,7 +37,7 @@ const H = {
71
37
  chipClass: "!text-fm-color-secondary-citrus !bg-fm-color-system-warning-100",
72
38
  icon: "loyalty",
73
39
  get name() {
74
- return o("connect.campaign.common.typeName.PROMOTION");
40
+ return o.global.t("connect.campaign.common.typeName.PROMOTION");
75
41
  },
76
42
  chip() {
77
43
  return c(this);
@@ -81,7 +47,7 @@ const H = {
81
47
  chipClass: "!text-fm-color-secondary-halite !bg-[#fff0f6]",
82
48
  icon: "sell",
83
49
  get name() {
84
- return o("connect.campaign.common.typeName.VOUCHER");
50
+ return o.global.t("connect.campaign.common.typeName.VOUCHER");
85
51
  },
86
52
  chip() {
87
53
  return c(this);
@@ -91,7 +57,7 @@ const H = {
91
57
  chipClass: "!text-fm-color-secondary-cocoa !bg-[#fff9e6]",
92
58
  icon: "award_star",
93
59
  get name() {
94
- return o("connect.campaign.common.typeName.POINT");
60
+ return o.global.t("connect.campaign.common.typeName.POINT");
95
61
  },
96
62
  chip() {
97
63
  return c(this);
@@ -101,7 +67,7 @@ const H = {
101
67
  chipClass: "!text-fm-color-typo-info !bg-fm-color-system-info-100",
102
68
  icon: "campaign",
103
69
  get name() {
104
- return o("connect.campaign.common.typeName.BROADCAST");
70
+ return o.global.t("connect.campaign.common.typeName.BROADCAST");
105
71
  },
106
72
  chip() {
107
73
  return c(this);
@@ -111,7 +77,7 @@ const H = {
111
77
  chipClass: "!text-fm-color-secondary-mint !bg-fm-color-system-success-100",
112
78
  icon: "database",
113
79
  get name() {
114
- return o("connect.campaign.common.typeName.GAME");
80
+ return o.global.t("connect.campaign.common.typeName.GAME");
115
81
  },
116
82
  chip() {
117
83
  return c(this);
@@ -121,7 +87,7 @@ const H = {
121
87
  chipClass: "!text-fm-color-secondary-tuna !bg-[#e3f4f9]",
122
88
  icon: "editor_choice",
123
89
  get name() {
124
- return o("connect.campaign.common.typeName.REWARD_POOL");
90
+ return o.global.t("connect.campaign.common.typeName.REWARD_POOL");
125
91
  },
126
92
  chip() {
127
93
  return c(this);
@@ -131,7 +97,7 @@ const H = {
131
97
  chipClass: "!text-fm-color-system-success-400 !bg-fm-color-system-success-100",
132
98
  icon: "monetization_on",
133
99
  get name() {
134
- return o("connect.campaign.common.typeName.COIN");
100
+ return o.global.t("connect.campaign.common.typeName.COIN");
135
101
  },
136
102
  chip() {
137
103
  return c(this);
@@ -141,125 +107,111 @@ const H = {
141
107
  chipClass: "",
142
108
  icon: "",
143
109
  get name() {
144
- return o("connect.campaign.common.typeName.MEMBERSHIP");
110
+ return o.global.t("connect.campaign.common.typeName.MEMBERSHIP");
145
111
  },
146
112
  chip() {
147
113
  return c(this);
148
114
  }
149
115
  },
116
+ // TODO: confirm color
150
117
  [a.enum.MISSION]: {
151
118
  chipClass: "!text-fm-color-secondary-tuna !bg-[#e3f4f9]",
152
119
  icon: "editor_choice",
153
120
  get name() {
154
- return o("connect.campaign.common.typeName.MISSION");
121
+ return o.global.t("connect.campaign.common.typeName.MISSION");
155
122
  },
156
123
  chip() {
157
124
  return c(this);
158
125
  }
159
- },
160
- [a.enum.GRAB]: {
161
- chipClass: "!text-fm-color-secondary-tuna !bg-[#e3f4f9]",
162
- icon: "editor_choice",
163
- name: "Grab",
164
- chip() {
165
- return c(this);
166
- }
167
126
  }
168
127
  };
169
- function U(e) {
170
- const t = R(e), r = {
128
+ function A(e) {
129
+ const t = O(e), m = {
171
130
  active: "text-fm-color-typo-success bg-fm-color-system-success-100",
172
131
  upcoming: "text-fm-color-typo-info bg-fm-color-system-info-100",
173
132
  expired: "text-fm-color-typo-error bg-fm-color-system-error-100"
174
133
  };
175
134
  return e.type == "VOUCHER" ? p(l.FmChip, {
176
- class: r[t],
177
- label: g.title(o(`connect.campaign.common.status.${t}`)),
135
+ class: m[t],
136
+ label: f.title(
137
+ o.global.t(`connect.campaign.common.status.${t}`)
138
+ ),
178
139
  compact: !0
179
140
  }) : p(l.FmChip, {
180
- class: r[t],
181
- label: g.title(o(`connect.campaign.common.status.${t}`)),
141
+ class: m[t],
142
+ label: f.title(
143
+ o.global.t(`connect.campaign.common.status.${t}`)
144
+ ),
182
145
  compact: !0
183
146
  });
184
147
  }
185
- function B(e) {
186
- const t = e.timeframeOptions;
187
- if (!t || !t.start && !t.end)
188
- return o("connect.campaign.common.always_active");
189
- if (!t.start && t.end)
190
- return o("connect.campaign.common.valid_until", {
191
- date: u(t.end)
192
- });
193
- const r = u(t.start), n = t.end ? u(t.end) : o("connect.campaign.common.unlimited");
194
- return `${r} -> ${n}`;
195
- }
196
- function F(e) {
148
+ function $(e) {
197
149
  const { campaign: t } = e;
198
- function r(n) {
150
+ function m(n) {
199
151
  if (!n || !n.start && !n.end)
200
152
  return "connect.campaign.common.always";
201
- const i = n.start ? u(n.start) : "From campaign creation", y = n.end ? u(n.end) : "Never ends";
202
- return `${i} - ${y}`;
153
+ const s = n.start ? i(n.start).format("DD MMM YYYY") : "From campaign creation", g = n.end ? i(n.end).format("DD MMM YYYY") : "Never ends";
154
+ return `${s} - ${g}`;
203
155
  }
204
156
  return {
205
157
  "connect.campaign.common.campaign_name": t.name,
206
- "connect.campaign.common.campaign_period": r(
158
+ "connect.campaign.common.campaign_period": m(
207
159
  t.timeframeOptions
208
160
  ),
209
161
  get "connect.campaign.common.next_schedule_at"() {
210
- if ((t == null ? void 0 : t.event.type) != "SCHEDULE" || !t.event.rule || !h(t.event.rule))
162
+ if (t.event.type != "SCHEDULE" || !t.event.rule || !y(t.event.rule))
211
163
  return;
212
- const n = O(
164
+ const n = d(
213
165
  t.event.rule.rules.g_schedule
214
166
  );
215
- return n ? s(n).format("ddd, DD MMM YYYY, hh:mmA") : void 0;
167
+ return n ? i(n).format("ddd, DD MMM YYYY, hh:mmA") : void 0;
216
168
  },
217
169
  get "connect.campaign.common.discount_type"() {
218
- if (t.type == "PROMOTION") return f(t.effect);
170
+ if (t.type == "PROMOTION") return u(t.effect);
219
171
  if ("configs" in e && e.configs.type == "VOUCHER")
220
- return f(e.configs.extras.effect);
172
+ return u(e.configs.extras.effect);
221
173
  },
222
174
  get "connect.campaign.common.available_at"() {
223
175
  return t.targetLocation ? t.targetLocation.length > 0 ? t.targetLocation.map(
224
- (n) => C().locationItems.find((i) => i.value == n).label
176
+ (n) => h().locationItems.find((s) => s.value == n).label
225
177
  ).join(",") : "connect.campaign.common.no_location" : "connect.campaign.common.all_locations";
226
178
  }
227
179
  };
228
180
  }
229
- function R(e) {
230
- return e.timeframeOptions && e.timeframeOptions.type == "timeframe" ? s().isBetween(
231
- e.timeframeOptions.start ?? s().subtract(1, "d"),
232
- e.timeframeOptions.end ?? s().add(1, "d")
233
- ) ? "active" : s().isAfter(e.timeframeOptions.end) ? "expired" : "upcoming" : "active";
181
+ function O(e) {
182
+ return e.timeframeOptions && e.timeframeOptions.type == "timeframe" ? i().isBetween(
183
+ e.timeframeOptions.start ?? i().subtract(1, "d"),
184
+ e.timeframeOptions.end ?? i().add(1, "d")
185
+ ) ? "active" : i().isAfter(e.timeframeOptions.end) ? "expired" : "upcoming" : "active";
234
186
  }
235
- function V(e) {
236
- var t, r;
187
+ function P(e) {
188
+ var t, m;
237
189
  switch (e.event.type) {
238
190
  case "BILL_COMPLETED":
239
- const n = `Spend to get ${m.formattedType(e.type)}`;
191
+ const n = `Spend to get ${r.formattedType(e.type)}`;
240
192
  switch (e.type) {
241
193
  case "POINT":
242
194
  case "CREDIT":
243
195
  case "COIN":
244
- return e.earningOption.type == "FIXED" ? `Spend to get ${e.earningOption.amount} ${m.formattedType(e.type)}` : `Every ${e.earningOption.every} amount spent get ${e.earningOption.amount} ${m.formattedType(e.type)}`;
196
+ return e.earningOption.type == "FIXED" ? `Spend to get ${e.earningOption.amount} ${r.formattedType(e.type)}` : `Every ${e.earningOption.every} amount spent get ${e.earningOption.amount} ${r.formattedType(e.type)}`;
245
197
  case "VOUCHER":
246
- const i = (r = (t = e == null ? void 0 : e.pf_collectible) == null ? void 0 : t.extras) == null ? void 0 : r.effect;
247
- return i ? `${n} - ${f(i)}` : n;
198
+ const s = (m = (t = e == null ? void 0 : e.pf_collectible) == null ? void 0 : t.extras) == null ? void 0 : m.effect;
199
+ return s ? `${n} - ${u(s)}` : n;
248
200
  default:
249
201
  return n;
250
202
  }
251
203
  case "FEEDBACK":
252
- return `Give feedback to receive ${m.formattedType(e.type)}`;
204
+ return `Give feedback to receive ${r.formattedType(e.type)}`;
253
205
  case "SCHEDULE":
254
- return `Receive ${m.formattedType(e.type)} on scheduled time`;
206
+ return `Receive ${r.formattedType(e.type)} on scheduled time`;
255
207
  case "SIMPLE_CLAIM":
256
208
  return "Simple claim voucher";
257
209
  case "TIER_UPGRADED":
258
- return `Receive ${m.formattedType(e.type)} when member tier upgraded`;
210
+ return `Receive ${r.formattedType(e.type)} when member tier upgraded`;
259
211
  case "MEMBERSHIP_JOINED":
260
- return `Receive ${m.formattedType(e.type)} when member joined`;
212
+ return `Receive ${r.formattedType(e.type)} when member joined`;
261
213
  case "MAKING_ORDER":
262
- return e.type !== "PROMOTION" ? void 0 : f(e.effect);
214
+ return e.type !== "PROMOTION" ? void 0 : u(e.effect);
263
215
  default:
264
216
  throw new Error(
265
217
  `Not implemented ${JSON.stringify({ cause: e.event.type })}`
@@ -267,11 +219,9 @@ function V(e) {
267
219
  }
268
220
  }
269
221
  export {
270
- H as C,
271
- R as a,
272
- U as b,
273
- V as c,
274
- G as d,
275
- F as e,
276
- B as g
222
+ D as C,
223
+ A as a,
224
+ P as b,
225
+ $ as c,
226
+ O as g
277
227
  };
@@ -1,6 +1,6 @@
1
1
  import { defineStore as w } from "pinia";
2
2
  import { reactive as I, onMounted as b, ref as o } from "vue";
3
- import { g as a, S as l, b as d } from "./index-HXiYGO4_.js";
3
+ import { g as a, S as l, b as d } from "./index-9jgqbdnt.js";
4
4
  const s = () => {
5
5
  const e = l.getBusinessId();
6
6
  if (!e) throw new Error("Invalid business ID");
@@ -145,14 +145,13 @@ const s = () => {
145
145
  credit: [],
146
146
  token: [],
147
147
  mission: [],
148
- grab: [],
149
148
  all: []
150
149
  });
151
150
  b(() => {
152
151
  console.log("🔧 CampaignStore Installed");
153
152
  });
154
153
  const t = o([]), n = o([]), c = o([]);
155
- async function m(h) {
154
+ async function m(C) {
156
155
  const i = await u.readAll({
157
156
  limit: 1e3,
158
157
  skip: 0,
@@ -161,9 +160,7 @@ const s = () => {
161
160
  });
162
161
  Object.keys(e).forEach((r) => {
163
162
  e[r] = [];
164
- }), e.all = i.resources.filter(
165
- (r) => r.type !== "MEMBERSHIP"
166
- );
163
+ }), e.all = i.resources.filter((r) => r.type !== "MEMBERSHIP");
167
164
  for (const r of i.resources)
168
165
  switch (r.type) {
169
166
  case "PROMOTION":
@@ -190,15 +187,12 @@ const s = () => {
190
187
  case "MISSION":
191
188
  e.mission.push(r);
192
189
  break;
193
- case "GRAB":
194
- e.grab.push(r);
195
- break;
196
190
  }
197
191
  }
198
- async function g() {
192
+ async function y() {
199
193
  n.value = await u.readGroups();
200
194
  }
201
- async function y() {
195
+ async function g() {
202
196
  t.value = await f.readAll();
203
197
  }
204
198
  return {
@@ -209,8 +203,8 @@ const s = () => {
209
203
  voucher: c,
210
204
  // Actions
211
205
  read: m,
212
- readGroups: g,
213
- readTemplates: y
206
+ readGroups: y,
207
+ readTemplates: g
214
208
  };
215
209
  });
216
210
  export {
@@ -1,4 +1,4 @@
1
- import { z as E } from "./index-hbyCVNa7.js";
1
+ import { z as E } from "./index-BmmFSQPd.js";
2
2
  const M = E.enum([
3
3
  "VOUCHER",
4
4
  "PROMOTION",
@@ -9,8 +9,7 @@ const M = E.enum([
9
9
  "COIN",
10
10
  "REWARD_POOL",
11
11
  "GAME",
12
- "MISSION",
13
- "GRAB"
12
+ "MISSION"
14
13
  ]), O = E.enum([
15
14
  "TIME_BASED_PROMOTION",
16
15
  "GAME_PROMOTION",