@feedmepos/mf-connect 0.1.38-beta.7 → 0.1.38-beta.70

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 (153) hide show
  1. package/dist/{Analytic-NNi-22sK.js → Analytic-qVhEo_im.js} +16 -16
  2. package/dist/{App-Bu14Mro_.js → App-Ixv1jrHc.js} +625 -619
  3. package/dist/AuditLogs-B2D62tMF.js +1991 -0
  4. package/dist/{Bin-CnAQA85j.js → Bin-Lj7jtS9m.js} +10 -10
  5. package/dist/Broadcast-BpP9VJsx.js +267 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DC_fReu7.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BB43gKXv.js} +6 -6
  7. package/dist/{Card-DqAGiETA.js → Card-CjArjpou.js} +144 -140
  8. package/dist/Collections-CFzUAHxz.js +540 -0
  9. package/dist/Credit-D43x-T3d.js +261 -0
  10. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +128 -0
  11. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js → DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js} +1 -1
  12. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DlgTeQLe.js +3167 -0
  13. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-9UhSzClJ.js +351 -0
  14. package/dist/Experience-BaUbRoHV.js +260 -0
  15. package/dist/{FileSaver.min-NlMItPOc.js → FileSaver.min-BO_rbswB.js} +1 -1
  16. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
  17. package/dist/Game-DaVqgPWQ.js +331 -0
  18. package/dist/GenerateMaterial-DJM8fZyl.js +589 -0
  19. package/dist/Grab-CykZDrWI.js +301 -0
  20. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js → ImageInput.vue_vue_type_script_setup_true_lang-C51yGAp9.js} +49 -48
  21. package/dist/{Index-loHkiwyo.js → Index-Do3WIIfM.js} +54 -54
  22. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js → LottieAnimation.vue_vue_type_script_setup_true_lang-BjdBaj4c.js} +1 -1
  23. package/dist/{MainLayout-B1aJoR95.js → MainLayout-DD-OlYxZ.js} +1 -1
  24. package/dist/Marketing-C9bsnUaQ.js +145 -0
  25. package/dist/MarketingMaterialEdit-CbSh8dpn.js +746 -0
  26. package/dist/{Member-BQjQQdoA.js → Member-IcVRwAAS.js} +38 -37
  27. package/dist/{MemberList-WPsEUKf_.js → MemberList-C_A4PrQN.js} +158 -159
  28. package/dist/{MemberTransactions-BtM7dugy.js → MemberTransactions-CBoaY-gv.js} +1 -1
  29. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Bl9sFIwG.js → MessageInput.vue_vue_type_script_setup_true_lang-Dx28XNPi.js} +13463 -10597
  30. package/dist/Mission-COY_uhwz.js +335 -0
  31. package/dist/{Overview-Bsf5IPOg.js → Overview-DDSz2R4K.js} +24 -25
  32. package/dist/Point-C-KEwgx4.js +263 -0
  33. package/dist/Promotion-BpW9qWzf.js +397 -0
  34. package/dist/{Queue-XFVbSuDw.js → Queue-CO32O8i6.js} +14 -15
  35. package/dist/{Record-CQzujESE.js → Record-BrT5DR9L.js} +10 -10
  36. package/dist/{Reward-Dj_h_May.js → Reward-CbrEw-If.js} +16 -16
  37. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Clxk-oYM.js → RewardGroup.vue_vue_type_script_setup_true_lang-CpNjlbjZ.js} +13 -14
  38. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BS5jsRiN.js +1912 -0
  39. package/dist/{Segment-D_DUu_Sp.js → Segment-Cu9_qwXc.js} +273 -274
  40. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-D3C2mVlv.js → SelectItems.vue_vue_type_script_setup_true_lang-BH-hzxSs.js} +23 -23
  41. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-C0vsl8oV.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DGm3gujH.js} +12 -12
  42. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-5HkJROSb.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DcUb8X-q.js} +4 -4
  43. package/dist/Setting-CQKfb5b_.js +1999 -0
  44. package/dist/SettingAdvertisements-BxR6Gl-5.js +263 -0
  45. package/dist/Store-6TUpmqAr.js +1995 -0
  46. package/dist/StoreRewards-BOThAOWU.js +534 -0
  47. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BYD229dz.js +1034 -0
  48. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-CAamZtdf.js +7005 -0
  49. package/dist/{Tier-YQsLRt06.js → Tier-MF-ad-xm.js} +561 -480
  50. package/dist/{Title-C5gxYNvh.js → Title-MkjTHBzb.js} +149 -147
  51. package/dist/{Transaction-CZ_QdIii.js → Transaction-trYJwTrc.js} +2 -2
  52. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-DqUu7wSt.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DwlNK1TC.js} +7 -7
  53. package/dist/Voucher-BD5dTdht.js +422 -0
  54. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-BhR_s48Q.js +421 -0
  55. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DCtdp-LK.js → ZodTextField.vue_vue_type_script_setup_true_lang-CcTe5TJL.js} +2 -2
  56. package/dist/app-CybjF-6Q.js +59071 -0
  57. package/dist/app.js +1 -1
  58. package/dist/{business-DZYFoAKz.js → business-2hCbD0JX.js} +11 -8
  59. package/dist/{campaign-Ca4l6UUg.js → campaign-Bv-8uM2S.js} +29 -25
  60. package/dist/campaign-h1J8NTAo.js +253 -0
  61. package/dist/campaign.enum-Dea0E4o1.js +26 -0
  62. package/dist/campaign.fn-DqxZMyu0.js +776 -0
  63. package/dist/{collectible.enum-DnIeDAB-.js → collectible.enum-DOyAoz4F.js} +1 -1
  64. package/dist/{collection.fn-mQfXEwJv.js → collection.fn-DU2HuZod.js} +2 -2
  65. package/dist/dto-CT65-FHY.js +222 -0
  66. package/dist/duplicateCampaign-YJGHvOqb.js +51 -0
  67. package/dist/effect-XZ767UQ4.js +89 -0
  68. package/dist/{email-addresses-CQYqi2rN.js → email-addresses-DSgkxSnV.js} +2 -2
  69. package/dist/{export-BsikVZw2.js → export-4gx5C9s9.js} +9 -10
  70. package/dist/{helper-n74IteBU.js → helper-HOLsJca3.js} +22 -7
  71. package/dist/index-BO7N-s4K.js +8912 -0
  72. package/dist/{index-Dt6wui_L.js → index-BfRa1sI3.js} +3 -3
  73. package/dist/index-BnCtmlvU.js +28897 -0
  74. package/dist/{index-Bg3fAg5z.js → index-C5VvGYtP.js} +1 -1
  75. package/dist/index-CSzvYzf4.js +3419 -0
  76. package/dist/{index-Do7TcKmg.js → index-CrdkPXsx.js} +4 -1
  77. package/dist/index-CuvNtC_M.js +61 -0
  78. package/dist/{index-DTErPYrT.js → index-CxE-VVlL.js} +1 -1
  79. package/dist/{index-DRrSsoqp.js → index-Djenbz3F.js} +1 -1
  80. package/dist/{index-BJ-IAF-1.js → index-IHteBJ_D.js} +1 -1
  81. package/dist/{index-BpjT8Rx0.js → index-dUhOAfj9.js} +455 -245
  82. package/dist/index-wm4nGBB_.js +30289 -0
  83. package/dist/{index-CrHCbDIs.js → index-xTrAj026.js} +3 -3
  84. package/dist/index-yViT18i_.js +36 -0
  85. package/dist/{index.esm2017-T7F54Aqa.js → index.esm2017-Wq4FUMEv.js} +185 -185
  86. package/dist/loading-D22xapd8.js +215 -0
  87. package/dist/{lodash-B5I3zXaY.js → lodash-HM6bxuWV.js} +1 -1
  88. package/dist/{membership-BRy4jMt2.js → membership-CX464ZBI.js} +3 -3
  89. package/dist/{moment-BWErdI6_.js → moment-D7p2TMB-.js} +6 -1
  90. package/dist/{money-B9Auav5u.js → money-B3cPZAZu.js} +1 -1
  91. package/dist/{number-BdhIBsUp.js → number-DT65dEZt.js} +1 -1
  92. package/dist/objectid-DZWw4iLL.js +145 -0
  93. package/dist/{campaign-162kZMje.js → plugins-D-4BlIGs.js} +784 -777
  94. package/dist/remy-D_Deb3ue.js +13 -0
  95. package/dist/{reward-UuqZUHsq.js → reward-C6B-kn0X.js} +1 -1
  96. package/dist/{rule-D158NIpm.js → rule-B94SrDX1.js} +505 -487
  97. package/dist/rule-builder-CQ3uHeX4.js +102 -0
  98. package/dist/style.css +11 -2
  99. package/dist/template-CXB2Ez2S.js +188 -0
  100. package/dist/timezone-D3NuV-rx.js +1154 -0
  101. package/dist/trigger-BsCVC_nU.js +213 -0
  102. package/dist/usePagination-BOZ0-D67.js +223 -0
  103. package/dist/user-Dxp7kluY.js +55 -0
  104. package/dist/vue-i18n-DpCWu1gI.js +2365 -0
  105. package/dist/{xlsx-Ddqi5i8p.js → xlsx-Cc2a2IL9.js} +1 -1
  106. package/dist/{zod-Bg2FbC-D.js → zod-BCSHGdXs.js} +32 -31
  107. package/package.json +14 -6
  108. package/dist/AuditLogs-Cai9CVBl.js +0 -1887
  109. package/dist/Broadcast-DskXjXn4.js +0 -227
  110. package/dist/Collections-DuaIQAk7.js +0 -465
  111. package/dist/Credit-D40Vzu2g.js +0 -222
  112. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +0 -108
  113. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BsQ4iAsV.js +0 -2185
  114. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-CDCX5B5k.js +0 -347
  115. package/dist/Experience-B9yHQPuj.js +0 -223
  116. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js +0 -114
  117. package/dist/Game-e9-Q3qmO.js +0 -278
  118. package/dist/Marketing-CipbukIV.js +0 -20073
  119. package/dist/Mission-B_DJ3Yu_.js +0 -296
  120. package/dist/Point-DMphcWjy.js +0 -226
  121. package/dist/Promotion-B33A-Jwe.js +0 -289
  122. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CGAXTOLN.js +0 -1751
  123. package/dist/Setting-CtdC4G3W.js +0 -1936
  124. package/dist/Store-DCksWACh.js +0 -1842
  125. package/dist/StoreRewards-CHWKYKet.js +0 -423
  126. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-D1TDyD6N.js +0 -1029
  127. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-D59sGO3F.js +0 -139
  128. package/dist/Voucher-BzV8yZ3o.js +0 -384
  129. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DjBj_3EF.js +0 -419
  130. package/dist/_commonjsHelpers-BkfeUUK-.js +0 -28
  131. package/dist/app-FFOpPHwj.js +0 -33357
  132. package/dist/app-az9e8Yfl.js +0 -7086
  133. package/dist/campaign.enum-DWjyDV2D.js +0 -20
  134. package/dist/campaign.fn-DWWJ74z-.js +0 -758
  135. package/dist/dto-mKZIPV4o.js +0 -214
  136. package/dist/effect-B8UexeyG.js +0 -78
  137. package/dist/index-5ShiAY8U.js +0 -8861
  138. package/dist/index-Bf6AmJwX.js +0 -32260
  139. package/dist/index-C5gjIb5d.js +0 -146
  140. package/dist/index-C9YrDtDN.js +0 -38
  141. package/dist/index-CK-MAqWE.js +0 -3120
  142. package/dist/index-CsaQJMAR.js +0 -66
  143. package/dist/index-f4MzX8IY.js +0 -30038
  144. package/dist/loading-BEAayQS-.js +0 -71
  145. package/dist/objectid-K-JVTsfA.js +0 -145
  146. package/dist/plugins-CWlRYif_.js +0 -208
  147. package/dist/remy-vue-client-Cpppk9h-.js +0 -1693
  148. package/dist/rule-builder-DNeViq0I.js +0 -89
  149. package/dist/template-B02wYF7G.js +0 -190
  150. package/dist/trigger-BDjnKHLI.js +0 -144
  151. package/dist/usePagination-BeF5K3M7.js +0 -223
  152. package/dist/user-DbP37Ohh.js +0 -54
  153. package/dist/vue-i18n-BbhkYWlk.js +0 -2365
@@ -1,4 +1,4 @@
1
- import { z as e } from "./index-Bf6AmJwX.js";
1
+ import { z as e } from "./index-wm4nGBB_.js";
2
2
  const E = e.enum([
3
3
  "VOUCHER",
4
4
  "CREDIT",
@@ -1,5 +1,5 @@
1
- import "./index-5ShiAY8U.js";
2
- import "./index-Bf6AmJwX.js";
1
+ import "./index-BO7N-s4K.js";
2
+ import "./index-wm4nGBB_.js";
3
3
  function r(e) {
4
4
  switch (e) {
5
5
  case "PROMOTION":
@@ -0,0 +1,222 @@
1
+ import { F as o, z as a } from "./index-wm4nGBB_.js";
2
+ import { s as R, a as r, t as h } from "./index-CSzvYzf4.js";
3
+ import { F as u } from "./index-BO7N-s4K.js";
4
+ import { i as f, R as d } from "./rule-builder-CQ3uHeX4.js";
5
+ function A(n, e) {
6
+ var p, l;
7
+ if (console.log(n, e), !n) return;
8
+ const t = n.campaign;
9
+ if (!t) return;
10
+ const i = t.event.rule;
11
+ if (!i || !f(i)) {
12
+ e.addIssue({
13
+ code: "custom",
14
+ path: ["campaign", "event", "rule"],
15
+ params: {
16
+ i18n: "connectZodCustom:campaign.rule_required",
17
+ type: t.event.type
18
+ }
19
+ });
20
+ return;
21
+ }
22
+ switch (t.type) {
23
+ case "MISSION": {
24
+ t.earningOption.amount > t.mission.end && e.addIssue({
25
+ code: "custom",
26
+ path: ["campaign", "earningOption"],
27
+ params: {
28
+ i18n: "connectZodCustom:campaign.earning_amount_exceed",
29
+ max: t.mission.end
30
+ }
31
+ });
32
+ break;
33
+ }
34
+ case "CREDIT": {
35
+ const c = (p = t.config) == null ? void 0 : p.validityOption;
36
+ (!c || ["validForDay", "validBefore"].every((g) => c[g] == null)) && e.addIssue({
37
+ code: "custom",
38
+ path: ["campaign", "config", "validityOption"],
39
+ params: {
40
+ i18n: "connectZodCustom:campaign.credit_validity_required"
41
+ }
42
+ });
43
+ }
44
+ }
45
+ switch (t.event.type) {
46
+ case "BILL_COMPLETED":
47
+ t.type === "MISSION" && t.rewards.length && (t.rewards.forEach((c, m) => {
48
+ (c.threshold < 0 || c.threshold > t.mission.end) && e.addIssue({
49
+ code: "custom",
50
+ path: ["campaign", "rewards", m, "threshold"],
51
+ params: {
52
+ i18n: "connectZodCustom:campaign.reward_threshold_range"
53
+ }
54
+ });
55
+ }), (l = t.config) != null && l.validityOption.followFirstReceive || e.addIssue({
56
+ code: "custom",
57
+ path: ["campaign", "config", "validityOption"],
58
+ params: {
59
+ i18n: "connectZodCustom:campaign.mission_first_receive"
60
+ }
61
+ }));
62
+ break;
63
+ case "SCHEDULE": {
64
+ if (!i.rules.g_schedule) {
65
+ e.addIssue({
66
+ code: "custom",
67
+ path: ["campaign", "event", "rule"],
68
+ params: {
69
+ i18n: "connectZodCustom:campaign.schedule_period_required"
70
+ },
71
+ fatal: !0
72
+ });
73
+ return;
74
+ }
75
+ const c = d.getRules(
76
+ i.rules.g_schedule
77
+ ), m = [
78
+ {
79
+ property: "trigger.date",
80
+ operator: ["_isOnDate", "_rrule"]
81
+ },
82
+ {
83
+ property: "trigger.time",
84
+ operator: ["_isOnTime"]
85
+ }
86
+ ];
87
+ m.length == c.length && m.every((O) => c.some((C) => {
88
+ const I = d.simplify(C);
89
+ return I.property === O.property && O.operator.includes(I.operator);
90
+ })) || e.addIssue({
91
+ code: "custom",
92
+ path: ["campaign", "event", "rule"],
93
+ params: {
94
+ i18n: "connectZodCustom:campaign.active_period_invalid"
95
+ }
96
+ });
97
+ break;
98
+ }
99
+ default: {
100
+ "earningOption" in t && t.earningOption.type != "FIXED" && e.addIssue({
101
+ code: "custom",
102
+ path: ["campaign", "earningOption"],
103
+ params: {
104
+ i18n: "connectZodCustom:campaign.fixed_earning_required"
105
+ }
106
+ });
107
+ break;
108
+ }
109
+ }
110
+ }
111
+ function N(n) {
112
+ var t;
113
+ if (n.campaign.type === "VOUCHER" && "configs" in n) {
114
+ const i = n.configs;
115
+ i.extras.targetLocation = n.campaign.targetLocation;
116
+ const p = Math.max(
117
+ n.campaign.earningOption.amount,
118
+ i.options.maxUse ?? 1
119
+ );
120
+ n.campaign.earningOption.amount = p, i.options.maxUse = p, n.campaign.earningOption = {
121
+ type: "FIXED",
122
+ amount: 1
123
+ };
124
+ }
125
+ if (n.campaign.type == "MISSION" && "configs" in n) {
126
+ const i = n.configs;
127
+ i.options.validityOption = (t = n.campaign.config) == null ? void 0 : t.validityOption;
128
+ }
129
+ const e = n.campaign.event;
130
+ return e.type != "BILL_COMPLETED" && e.rule && f(e.rule) && (e.rule = d.removeEntry(e.rule, "g_bill"), n.campaign.event = e), n;
131
+ }
132
+ function s(n) {
133
+ const e = h.optionsMap.get(n).extend({
134
+ _id: o.optional(),
135
+ collectible: a.string().nullish()
136
+ });
137
+ switch (n) {
138
+ case "VOUCHER":
139
+ return a.object({
140
+ campaign: e,
141
+ templateId: o,
142
+ configs: u,
143
+ updateCollections: a.boolean().optional(),
144
+ code: a.string().optional()
145
+ });
146
+ case "PROMOTION":
147
+ return a.object({
148
+ campaign: e,
149
+ templateId: o
150
+ });
151
+ case "POINT":
152
+ return a.object({
153
+ campaign: e,
154
+ templateId: o
155
+ });
156
+ case "CREDIT":
157
+ return a.object({
158
+ campaign: e,
159
+ templateId: o
160
+ });
161
+ case "BROADCAST":
162
+ return a.object({
163
+ campaign: e,
164
+ templateId: o
165
+ });
166
+ case "COIN":
167
+ return a.object({
168
+ campaign: e,
169
+ templateId: o
170
+ });
171
+ case "REWARD_POOL":
172
+ return a.object({
173
+ campaign: e,
174
+ templateId: o,
175
+ updateCollections: a.boolean().optional()
176
+ });
177
+ case "GAME":
178
+ return a.object({
179
+ campaign: e,
180
+ configs: u,
181
+ templateId: o,
182
+ updateCollections: a.boolean().optional()
183
+ });
184
+ case "MISSION":
185
+ return a.object({
186
+ campaign: e,
187
+ configs: u,
188
+ templateId: o,
189
+ updateCollections: a.boolean().optional()
190
+ });
191
+ case "GRAB":
192
+ return a.object({
193
+ campaign: e,
194
+ templateId: o
195
+ });
196
+ default:
197
+ throw new Error("Not implemented");
198
+ }
199
+ }
200
+ const D = R.extend({
201
+ _id: o.optional(),
202
+ name: a.string().min(1).max(300),
203
+ business: o.optional(),
204
+ campaigns: a.array(o).optional()
205
+ }), T = {
206
+ [r.enum.VOUCHER]: s("VOUCHER"),
207
+ [r.enum.PROMOTION]: s("PROMOTION"),
208
+ [r.enum.POINT]: s("POINT"),
209
+ [r.enum.CREDIT]: s("CREDIT"),
210
+ [r.enum.BROADCAST]: s("BROADCAST"),
211
+ [r.enum.COIN]: s("COIN"),
212
+ [r.enum.REWARD_POOL]: s("REWARD_POOL"),
213
+ [r.enum.GAME]: s("GAME"),
214
+ [r.enum.MISSION]: s("MISSION"),
215
+ [r.enum.GRAB]: s("GRAB")
216
+ };
217
+ export {
218
+ T as C,
219
+ D as F,
220
+ N as a,
221
+ A as c
222
+ };
@@ -0,0 +1,51 @@
1
+ import { p as l, i } from "./plugins-D-4BlIGs.js";
2
+ import { _ as r } from "./lodash-HM6bxuWV.js";
3
+ function A(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 R(e, o) {
33
+ e.campaign && (e.campaign._id = void 0, e.campaign.currentReceive = void 0, o || (e.campaign.collectible = void 0));
34
+ }
35
+ function C(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 v(e, o = {}) {
45
+ const t = r.cloneDeep(e), { keepCollectible: c = !1 } = o, n = t.campaign;
46
+ return d(t), R(t, c), C(t, c), E(n), t;
47
+ }
48
+ export {
49
+ A as c,
50
+ v as p
51
+ };
@@ -0,0 +1,89 @@
1
+ import { c as r } from "./index-BnCtmlvU.js";
2
+ function p(n) {
3
+ if (!n)
4
+ return null;
5
+ const o = r.Config.getCountry().currency.symbol;
6
+ function s(t) {
7
+ if (t.options.target === "ITEM" && t.options.strategy.type === "PRICE_CHANGE")
8
+ return null;
9
+ const e = r.Dinero.fromFdoDecimal({ decimal: t.adjustment.amount });
10
+ switch (t.adjustment.type) {
11
+ case "BY_PERCENTAGE":
12
+ return `${e.toObject().amount}% discount`;
13
+ case "BY_AMOUNT":
14
+ return `${o}${e.toUnit()} discount`;
15
+ case "TO_AMOUNT":
16
+ return `to ${o}${e.toUnit()}`;
17
+ }
18
+ }
19
+ function u(t) {
20
+ switch (t.options.target) {
21
+ case "BILL":
22
+ return "Bill Discount";
23
+ case "ITEM":
24
+ if (t.options.strategy.type === "PRICE_CHANGE") {
25
+ const e = t.options.strategy.key;
26
+ return e ? `Use ${e} price` : "Use different price";
27
+ } else {
28
+ if (t.options.strategy.type === "SIMPLE")
29
+ return "Item Discount";
30
+ if (t.options.strategy.type === "BUY_X_GET_Y")
31
+ return "Buy X Get Y (same product set)";
32
+ if (t.options.strategy.type === "BUY_X_GET_Y_V2")
33
+ return "Buy X Get Y (mixed product set)";
34
+ if (t.options.strategy.type === "BUY_X_ITEM_A_GET_Y_ITEM_B")
35
+ return "Buy X Get Y (different product set)";
36
+ if (t.options.strategy.type === "COMBO")
37
+ return "Combo";
38
+ }
39
+ break;
40
+ case "PAYMENT":
41
+ return "Payment";
42
+ default:
43
+ throw new Error("Invalid effect target");
44
+ }
45
+ }
46
+ function a(t) {
47
+ return t.options.target === "ITEM" && t.options.strategy.type === "PRICE_CHANGE" ? "Requires POS 7.12.18 or above" : null;
48
+ }
49
+ function c(t) {
50
+ if (t.options.target === "BILL" || t.options.target === "PAYMENT") {
51
+ const e = r.Dinero.fromFdoDecimal({
52
+ decimal: t.options.minPurchase
53
+ });
54
+ return e.toUnit() > 0 ? `min spend ${o}${e.toUnit()}` : "no min spend";
55
+ }
56
+ if (t.options.target === "ITEM" && t.options.minPurchase) {
57
+ const e = r.Dinero.fromFdoDecimal({
58
+ decimal: t.options.minPurchase
59
+ });
60
+ return e.toUnit() > 0 ? `min spend ${o}${e.toUnit()}` : "no min spend";
61
+ }
62
+ return "no min spend";
63
+ }
64
+ function m(t) {
65
+ var e;
66
+ if (((e = t.adjustmentRule) == null ? void 0 : e.type) == "CAPPED_AT") {
67
+ const i = r.Dinero.fromFdoDecimal({
68
+ decimal: t.adjustmentRule.amount
69
+ }).toPositive();
70
+ return i.toUnit() > 0 ? `cap at ${o}${i.toUnit()}` : null;
71
+ }
72
+ return null;
73
+ }
74
+ return {
75
+ type: u(n),
76
+ adjustment: s(n),
77
+ requirements: c(n),
78
+ maxCap: m(n),
79
+ posHint: a(n)
80
+ };
81
+ }
82
+ function l(n) {
83
+ const o = p(n);
84
+ return !n || !o ? null : Object.values(o).filter(Boolean).join(" | ");
85
+ }
86
+ export {
87
+ l as e,
88
+ p as s
89
+ };
@@ -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 pn = (S, b, h) => ir(S, typeof b != "symbol" ? b + "" : b, h);
4
- import { u as V } from "./xlsx-Ddqi5i8p.js";
5
- import { g as ar } from "./_commonjsHelpers-BkfeUUK-.js";
4
+ import { u as V } from "./xlsx-Cc2a2IL9.js";
5
+ import { g as ar } from "./app-CybjF-6Q.js";
6
6
  class fr {
7
7
  constructor() {
8
8
  pn(this, "data", []);
@@ -1,10 +1,9 @@
1
1
  var g = Object.defineProperty;
2
2
  var b = (s, e, o) => e in s ? g(s, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : s[e] = o;
3
3
  var d = (s, e, o) => b(s, typeof e != "symbol" ? e + "" : e, o);
4
- import { u as a, w as f } from "./xlsx-Ddqi5i8p.js";
5
- import { u as h } from "./loading-BEAayQS-.js";
6
- import { h as x } from "./moment-BWErdI6_.js";
7
- import { m as w } from "./index-C5gjIb5d.js";
4
+ import { u as a, w as h } from "./xlsx-Cc2a2IL9.js";
5
+ import { m as x, u as f } from "./loading-D22xapd8.js";
6
+ import { h as w } from "./moment-D7p2TMB-.js";
8
7
  class y {
9
8
  constructor() {
10
9
  d(this, "records", []);
@@ -28,7 +27,7 @@ const r = {
28
27
  rowsPerPage: 1e3,
29
28
  page: 1,
30
29
  rowsNumber: 0
31
- }, { minor: _ } = h;
30
+ }, { minor: _ } = f;
32
31
  async function S({
33
32
  exporter: s,
34
33
  readFunction: e,
@@ -57,7 +56,7 @@ async function S({
57
56
  }
58
57
  r.page++;
59
58
  }
60
- await f(
59
+ await h(
61
60
  s.buildExcel(),
62
61
  `${t}-${(/* @__PURE__ */ new Date()).toISOString()}.xlsx`,
63
62
  {
@@ -73,17 +72,17 @@ async function S({
73
72
  }
74
73
  );
75
74
  }
76
- async function E() {
75
+ async function C() {
77
76
  return S({
78
77
  exporter: new k(),
79
- readFunction: w.readCards,
78
+ readFunction: x.readCards,
80
79
  transformRecord: (s) => {
81
80
  var e, o;
82
81
  return {
83
82
  CardNumber: s.serialNumber || "",
84
83
  MemberId: ((e = s.pf_member) == null ? void 0 : e._id.toString()) || "",
85
84
  Phone: ((o = s.pf_member) == null ? void 0 : o.phoneNumber) || "",
86
- RedeemedAt: s.redeemedAt ? x(s.redeemedAt).format("DD/MM/YYYY") : ""
85
+ RedeemedAt: s.redeemedAt ? w(s.redeemedAt).format("DD/MM/YYYY") : ""
87
86
  };
88
87
  },
89
88
  filename: "cards"
@@ -92,6 +91,6 @@ async function E() {
92
91
  export {
93
92
  y as B,
94
93
  k as C,
95
- E as a,
94
+ C as a,
96
95
  S as e
97
96
  };
@@ -1,5 +1,5 @@
1
- import { o as i } from "./index-5ShiAY8U.js";
2
- function o(t, e) {
1
+ import { k as l } from "./index-BO7N-s4K.js";
2
+ function u(t, e) {
3
3
  switch (t) {
4
4
  case "COIN":
5
5
  case "CREDIT":
@@ -61,11 +61,26 @@ function o(t, e) {
61
61
  throw new Error("Invalid collectible type");
62
62
  }
63
63
  }
64
- function u(t) {
65
- const { validAfter: e, validBefore: a } = t, { validForDay: s } = t, n = i(e).toDate(), r = i(a).toDate();
66
- return e && a ? `${n.toLocaleDateString()} - ${r.toLocaleDateString()}` : e ? `Starts from ${n.toLocaleDateString()}` : a ? `Ends at ${r.toLocaleDateString()}` : s != null ? `Expires in ${s || "the same"} day${s > 1 ? "s" : ""} after claim` : "Always valid";
64
+ function c(t) {
65
+ const { validAfter: e, validBefore: s } = t, { validForDay: a } = t, n = l(e).toDate(), r = l(s).toDate();
66
+ return e && s ? `${n.toLocaleDateString()} - ${r.toLocaleDateString()}` : e ? `Starts from ${n.toLocaleDateString()}` : s ? `Ends at ${r.toLocaleDateString()}` : a != null ? `Expires in ${a || "the same"} day${a > 1 ? "s" : ""} after claim` : "Always valid";
67
67
  }
68
+ function i(t, e, s, a = !0) {
69
+ if (!t) return a;
70
+ const n = t[e];
71
+ return n ? n[s] ?? a : a;
72
+ }
73
+ function E(t, e) {
74
+ return t ? i(t, e, "selectable", !1) : e === "STORE_BUNDLE:DEFAULT";
75
+ }
76
+ const b = {
77
+ "STORE_BUNDLE:DEFAULT": { selectable: !1 },
78
+ "STORE_BUNDLE:FEEDVIBE": { selectable: !0, editable: !1, deletable: !1 }
79
+ };
68
80
  export {
69
- o as i,
70
- u as t
81
+ b as F,
82
+ E as a,
83
+ i as h,
84
+ u as i,
85
+ c as t
71
86
  };