@feedmepos/mf-connect 0.1.98-beta.7 → 0.1.98-beta.72

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 (152) hide show
  1. package/dist/{App-BonFFUVJ.js → App-DpYceiwG.js} +812 -666
  2. package/dist/{AuditLogs-CaQisyMC.js → AuditLogs-CG98b2qE.js} +14 -13
  3. package/dist/{Bin-Mu8gAiHw.js → Bin-vdipv2fF.js} +8 -8
  4. package/dist/Broadcast-ChwVqheE.js +303 -0
  5. package/dist/CampaignAnalytic-4PHO849x.js +1830 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BoLZVrCU.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DmnN4pjm.js} +6 -5
  7. package/dist/Card-B6ol3PQw.js +1084 -0
  8. package/dist/{Collections-CByXxRW_.js → Collections-DodNIUr1.js} +14 -13
  9. package/dist/Credit-CJQyAZYw.js +286 -0
  10. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang--FqHJ7Ez.js +53 -0
  11. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-CA31QP-A.js +4277 -0
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BXsAX1Xa.js → EffectSheet.vue_vue_type_style_index_0_lang-DkKhdp7G.js} +35 -35
  13. package/dist/{Experience-B7J-aqPK.js → Experience-iLAKddx_.js} +112 -86
  14. package/dist/{FileSaver.min-D_F_MSZt.js → FileSaver.min-w_ExQ0py.js} +1 -1
  15. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js +138 -0
  16. package/dist/Game-DWdUbsAg.js +356 -0
  17. package/dist/GiftCardSetup-DnQ5vwxu.js +736 -0
  18. package/dist/{Grab-C45MmlD9.js → Grab-CFLRHs5w.js} +33 -32
  19. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-CPPcB3PC.js → ImageInput.vue_vue_type_script_setup_true_lang-uQJvjvTe.js} +1 -1
  20. package/dist/{Index-vQ6uP49O.js → Index-CUy4z2tS.js} +10 -10
  21. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-Cj3hN3tg.js → LocationPicker.vue_vue_type_script_setup_true_lang-hKJ41Fe_.js} +1 -1
  22. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DU9eIein.js → LottieAnimation.vue_vue_type_script_setup_true_lang-BDmtqTVC.js} +1 -1
  23. package/dist/LoyaltyDashboard-C5o7KriA.js +2865 -0
  24. package/dist/MainLayout-Dt0ywph3.js +143 -0
  25. package/dist/{Marketing-B6xMdQvW.js → Marketing-BHwxzBZ0.js} +7 -6
  26. package/dist/{MarketingMaterialEdit-0cZN4bek.js → MarketingMaterialEdit-B6k4ceGx.js} +15 -14
  27. package/dist/Member-DcPZfTj6.js +654 -0
  28. package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-CiiBrlHY.js +1279 -0
  29. package/dist/MemberImportHistory-DmPMuu1g.js +187 -0
  30. package/dist/MemberList-f9JejfNW.js +334 -0
  31. package/dist/{MemberTransactions-Bg-ziZy8.js → MemberTransactions-D1YSXeX-.js} +1 -1
  32. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-jbDJkbZh.js → MessageInput.vue_vue_type_script_setup_true_lang-freeE-DP.js} +5928 -5644
  33. package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-m7ytg0ok.js +40 -0
  34. package/dist/Mission-BaaEl5BV.js +360 -0
  35. package/dist/Overview-CviY55Gs.js +1316 -0
  36. package/dist/{Overview-nsyJGSCq.js → Overview-fx-0E3b8.js} +21 -20
  37. package/dist/Point-BfqtflbC.js +288 -0
  38. package/dist/Promotion-Be2ogRYt.js +423 -0
  39. package/dist/{Queue-Dkipt6fw.js → Queue-CLSUL-Cx.js} +14 -13
  40. package/dist/{Record-BFqx6vM-.js → Record-CpTMQT7B.js} +9 -9
  41. package/dist/Review-DzSDx7dY.js +45 -0
  42. package/dist/ReviewFacebookCallback-CvbPJADM.js +238 -0
  43. package/dist/ReviewGoogleCallback-DJlqMbh3.js +213 -0
  44. package/dist/{Reward-DjFEE7I_.js → Reward-DJOmd6Z5.js} +35 -35
  45. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BzZ6VH80.js → RewardGroup.vue_vue_type_script_setup_true_lang-DY9fYxwc.js} +14 -13
  46. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-A9jQX4jt.js → RuleGroup.vue_vue_type_script_setup_true_lang-BgYK4hpo.js} +196 -186
  47. package/dist/{Segment-BAjdUfZ6.js → Segment-G6xmeEaq.js} +275 -276
  48. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CAQPFzRH.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-C3O0biLZ.js} +37 -36
  49. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-Gkz8jhES.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CWP5sGT7.js} +4 -4
  50. package/dist/{Setting-BK7y0XC-.js → Setting-CKp441AW.js} +14 -14
  51. package/dist/{SettingAdvertisements-DfQ645xr.js → SettingAdvertisements-C4Uf-DgK.js} +12 -12
  52. package/dist/Settings-CTvMVwp6.js +230 -0
  53. package/dist/Store-Bzei6Xev.js +2612 -0
  54. package/dist/{StoreRewards-usHKOGmB.js → StoreRewards-DMQNIpF5.js} +15 -15
  55. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-mm1jbcvo.js +1329 -0
  56. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DrcWUZuR.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BspBXIO2.js} +2 -2
  57. package/dist/{Tier-BF3V430O.js → Tier-BN32RwYr.js} +2580 -754
  58. package/dist/{Title-DwPuqKfJ.js → Title-BIhgfRUI.js} +39 -37
  59. package/dist/Transaction-CPjA7IN9.js +45 -0
  60. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-DToNRTJS.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DSutMvfk.js} +26 -26
  61. package/dist/{Voucher-DnhVIl_o.js → Voucher-CGJtn9bC.js} +156 -133
  62. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-Btb3UZCn.js → VoucherEditor.vue_vue_type_script_setup_true_lang-B-IwtPvx.js} +118 -124
  63. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-EFUW9DMY.js → ZodTextField.vue_vue_type_script_setup_true_lang-Ce9xPwqA.js} +2 -2
  64. package/dist/{app-i3r-6ZVm.js → app-DAtx6aZ4.js} +45039 -37428
  65. package/dist/app.js +1 -1
  66. package/dist/base.export-BtRC4aWM.js +75 -0
  67. package/dist/{business-i0Gxk7gG.js → business-BZUIs8Ub.js} +5 -5
  68. package/dist/campaign-B6I6PuY4.js +100 -0
  69. package/dist/campaign-DKjBjV2k.js +398 -0
  70. package/dist/{campaign.enum-CbUTfxek.js → campaign.enum-BQy3e845.js} +1 -1
  71. package/dist/{campaign.fn-BjHSIDd1.js → campaign.fn--qVJ3jeH.js} +77 -77
  72. package/dist/{collectible.enum-DN7E_kHg.js → collectible.enum-vcvRFGl0.js} +1 -1
  73. package/dist/collection.fn-C3bMPBkC.js +26 -0
  74. package/dist/currency--R6VPInw.js +7 -0
  75. package/dist/{duplicateCampaign-DmdJQEIA.js → duplicateCampaign-aIsX9cCi.js} +11 -11
  76. package/dist/{effect-DM4AzeQl.js → effect-CbjmtRph.js} +1 -1
  77. package/dist/{email-addresses-BlqVJhwZ.js → email-addresses-DZKMnoKf.js} +209 -201
  78. package/dist/google-C3S8u0mT.js +4 -0
  79. package/dist/{helper-CkdISSVP.js → helper-BGqw2-RO.js} +1 -1
  80. package/dist/index-7TKoSEJ2.js +14550 -0
  81. package/dist/index-B9DM5Vuv.js +32437 -0
  82. package/dist/index-BWlfW4Kr.js +137 -0
  83. package/dist/{index-Cl8t41Sk.js → index-Bb4TieR_.js} +5 -5
  84. package/dist/{index-D6qeYVNz.js → index-BbpqZrkB.js} +1 -1
  85. package/dist/{index-4EtrCy_K.js → index-C22GPEM-.js} +4 -4
  86. package/dist/{index-FD50UHqf.js → index-CVYbfRGO.js} +105 -123
  87. package/dist/index-CVvSd60O.js +53 -0
  88. package/dist/{index-vI-ndGu_.js → index-CXL5WAH0.js} +5 -5
  89. package/dist/{index-B6xi1soU.js → index-ClP7Xy6Q.js} +1 -1
  90. package/dist/{index-BWsj6lCJ.js → index-D-P90w8K.js} +14 -14
  91. package/dist/{index-CxdLExX0.js → index-D_o9LsHU.js} +24 -9
  92. package/dist/{index-BrboOmPq.js → index-DcA0B-Y5.js} +347 -216
  93. package/dist/index-FnsjvtSo.js +901 -0
  94. package/dist/{index-DgzNGQgE.js → index-LlFZ5kxi.js} +2083 -2559
  95. package/dist/{index-CB7ytKOE.js → index-LnCoUCnx.js} +1588 -1522
  96. package/dist/index-kkhrPH6s.js +151 -0
  97. package/dist/index-v8Zv-2ko.js +72 -0
  98. package/dist/{index.esm2017-BX5CyKoc.js → index.esm2017-DO7bbE7J.js} +132 -132
  99. package/dist/{loading-DTKDhqew.js → loading-CzWOx4tE.js} +1 -1
  100. package/dist/{lodash-CCPBsqhe.js → lodash-B_gr6Ayu.js} +1 -1
  101. package/dist/member-import-BxCrd9tq.js +187 -0
  102. package/dist/membership-ILB4aB4h.js +274 -0
  103. package/dist/{money-wMK3QkZ5.js → money-CpIK1N_r.js} +1 -1
  104. package/dist/{number-DjKVlWn0.js → number-leVwmDCm.js} +1 -1
  105. package/dist/objectid-8hKuNcMN.js +145 -0
  106. package/dist/{plugins-D25PaNJk.js → plugins-DLIgnFIF.js} +13 -12
  107. package/dist/remy-Qz_pNsUS.js +13 -0
  108. package/dist/{reward-E63jqJHm.js → reward-DqT0zF01.js} +1 -1
  109. package/dist/{rule-RVvPtAnk.js → rule-DBtMGLxD.js} +335 -275
  110. package/dist/style.css +1 -1
  111. package/dist/{template-zNxOQaqe.js → template-CYKGCWY4.js} +6 -6
  112. package/dist/timezone-Brs5nrTL.js +20 -0
  113. package/dist/transaction.fn-0ZZcVp-j.js +71 -0
  114. package/dist/{trigger-BXV02FhP.js → trigger-LhNre1L9.js} +17 -17
  115. package/dist/useMarketingMaterialActions-DbDRMmhM.js +96 -0
  116. package/dist/{usePagination-BPcPhEnp.js → usePagination-DmZX0V64.js} +1 -1
  117. package/dist/{user-Bd8S7R5u.js → user-CBPsvnx9.js} +1 -1
  118. package/dist/vue-i18n-BPeSHE3c.js +2365 -0
  119. package/dist/{xlsx-_tQC9Ezf.js → xlsx-Cm3vGmLN.js} +440 -440
  120. package/dist/{zod-C1j2GLZP.js → zod-GTEcy37q.js} +1 -1
  121. package/package.json +10 -6
  122. package/dist/Broadcast-Cy-i-WOT.js +0 -266
  123. package/dist/Card-f2XOtWxp.js +0 -910
  124. package/dist/Credit-CcZF4aQS.js +0 -260
  125. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +0 -58
  126. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-C7KZ8GMx.js +0 -3377
  127. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
  128. package/dist/Game-CUW7NeVG.js +0 -330
  129. package/dist/LoyaltyDashboard-GqyUwvXz.js +0 -1082
  130. package/dist/MainLayout-R5NxIBR-.js +0 -41
  131. package/dist/Member-CC5F6Bmz.js +0 -280
  132. package/dist/MemberList-Cq4zxopX.js +0 -1601
  133. package/dist/Mission-DcCZ6tAG.js +0 -334
  134. package/dist/Point-D1vLd5hL.js +0 -262
  135. package/dist/Promotion-Cv7MW5RJ.js +0 -397
  136. package/dist/Review-CKhakUMe.js +0 -1123
  137. package/dist/ReviewFacebookCallback-xgRpXQAg.js +0 -243
  138. package/dist/ReviewGoogleCallback-Cqi_43qi.js +0 -208
  139. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-DDqK4kV1.js +0 -181
  140. package/dist/Store-uTRQ6KbC.js +0 -1996
  141. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Bb2sTsuA.js +0 -1130
  142. package/dist/Transaction-CnTEfMGU.js +0 -39
  143. package/dist/campaign-CbMlARNI.js +0 -219
  144. package/dist/campaign-f7FT91GR.js +0 -277
  145. package/dist/export-DQR-0lmK.js +0 -97
  146. package/dist/index-COrXX9MR.js +0 -52
  147. package/dist/index-CWiaP-aV.js +0 -28900
  148. package/dist/index-jVfDVEtz.js +0 -85
  149. package/dist/membership-rifuatxU.js +0 -255
  150. package/dist/objectid-DjpWkCxH.js +0 -145
  151. package/dist/useMarketingMaterialActions-5TFNqZVo.js +0 -107
  152. package/dist/vue-i18n-CgMK-TaC.js +0 -2365
@@ -0,0 +1,138 @@
1
+ import { defineComponent as I, ref as i, computed as g, onMounted as j, resolveComponent as r, openBlock as c, createBlock as d, unref as o, withCtx as p, createVNode as b, normalizeClass as f, createCommentVNode as k, createElementVNode as B, toDisplayString as F, isRef as M, createElementBlock as O, Fragment as A, renderList as z } from "vue";
2
+ const N = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, E = /* @__PURE__ */ I({
3
+ __name: "FilterChip",
4
+ props: {
5
+ modelValue: {
6
+ type: Array,
7
+ required: !1
8
+ },
9
+ label: {
10
+ type: String,
11
+ required: !1,
12
+ default: ""
13
+ },
14
+ showItemLabel: {
15
+ type: Boolean,
16
+ default: !1
17
+ },
18
+ placement: {
19
+ type: String,
20
+ required: !1,
21
+ default: "bottom-end"
22
+ },
23
+ class: {
24
+ type: String,
25
+ required: !1
26
+ },
27
+ disabled: {
28
+ type: Boolean,
29
+ required: !1
30
+ },
31
+ items: {
32
+ type: Array,
33
+ required: !0
34
+ },
35
+ icon: {
36
+ type: String,
37
+ required: !1
38
+ },
39
+ searchable: {
40
+ type: Boolean,
41
+ required: !1,
42
+ default: !0
43
+ },
44
+ allLabel: {
45
+ type: String,
46
+ default: "All"
47
+ },
48
+ selectedLabel: {
49
+ type: String,
50
+ default: "{count} selected"
51
+ },
52
+ searchPlaceholder: {
53
+ type: String,
54
+ default: "Search locations"
55
+ }
56
+ },
57
+ emits: ["update:model-value"],
58
+ setup(u, { emit: C }) {
59
+ const e = u, v = C, m = i(!1), t = i({}), s = i(""), V = g(() => {
60
+ const l = Object.keys(t.value).length;
61
+ return !t.value || Object.keys(t.value).length == e.items.length || l === 0 ? e.allLabel : e.selectedLabel.replace("{count}", String(l));
62
+ });
63
+ function w(l) {
64
+ t.value[l] ? delete t.value[l] : t.value[l] = !0, v("update:model-value", Object.keys(t.value));
65
+ }
66
+ function L() {
67
+ Object.keys(t.value).length > 0 ? t.value = {} : t.value = e.items.reduce((l, n) => (l[n.value] = !0, l), {}), v("update:model-value", Object.keys(t.value));
68
+ }
69
+ const S = g(() => s.value && s.value.length > 0 ? e.items.filter(
70
+ (l) => l.label.toLowerCase().includes(s.value.trim().toLowerCase())
71
+ ) : e.items);
72
+ return j(() => {
73
+ t.value = e.modelValue.reduce((l, n) => (l[n] = !0, l), {}), e.modelValue.length == 0;
74
+ }), (l, n) => {
75
+ const y = r("FmIcon"), _ = r("FmChip"), x = r("FmTextField"), h = r("FmMenuItem"), q = r("FmMenu");
76
+ return c(), d(q, {
77
+ placement: u.placement || "bottom-end",
78
+ disabled: u.disabled == !0,
79
+ "model-value": o(m),
80
+ onMenuChanged: n[1] || (n[1] = (a) => m.value = a),
81
+ "close-on-click": !1
82
+ }, {
83
+ "menu-button": p(() => [
84
+ b(_, {
85
+ label: u.label,
86
+ class: f(e.class || "text-fm-color-neutral-gray-400 cursor-pointer")
87
+ }, {
88
+ default: p(() => [
89
+ e.icon ? (c(), d(y, {
90
+ key: 0,
91
+ name: e.icon,
92
+ class: f(e.class),
93
+ outline: "",
94
+ size: "sm"
95
+ }, null, 8, ["name", "class"])) : k("", !0),
96
+ B("div", N, F(e.label) + " " + F(u.showItemLabel ? o(V) : ""), 1),
97
+ b(y, {
98
+ name: o(m) ? "keyboard_arrow_up" : "keyboard_arrow_down",
99
+ class: f(e.class),
100
+ outline: "",
101
+ size: "sm"
102
+ }, null, 8, ["name", "class"])
103
+ ]),
104
+ _: 1
105
+ }, 8, ["label", "class"])
106
+ ]),
107
+ default: p(() => [
108
+ u.searchable ? (c(), d(x, {
109
+ key: 0,
110
+ modelValue: o(s),
111
+ "onUpdate:modelValue": n[0] || (n[0] = (a) => M(s) ? s.value = a : null),
112
+ placeholder: e.searchPlaceholder,
113
+ class: "my-8"
114
+ }, null, 8, ["modelValue", "placeholder"])) : k("", !0),
115
+ b(h, {
116
+ "model-value": Object.keys(o(t)).length === e.items.length,
117
+ label: e.allLabel,
118
+ "has-checkbox": !0,
119
+ indeterminate: !0,
120
+ onClick: L
121
+ }, null, 8, ["model-value", "label"]),
122
+ (c(!0), O(A, null, z(o(S) ?? [], (a) => (c(), d(h, {
123
+ key: a.value,
124
+ value: a.value,
125
+ label: a.label,
126
+ "has-checkbox": !0,
127
+ "model-value": o(t)[a.value],
128
+ "onUpdate:modelValue": (T) => w(a.value)
129
+ }, null, 8, ["value", "label", "model-value", "onUpdate:modelValue"]))), 128))
130
+ ]),
131
+ _: 1
132
+ }, 8, ["placement", "disabled", "model-value"]);
133
+ };
134
+ }
135
+ });
136
+ export {
137
+ E as _
138
+ };
@@ -0,0 +1,356 @@
1
+ import { defineComponent as J, ref as A, computed as Q, onMounted as X, resolveComponent as m, openBlock as f, createElementBlock as P, Fragment as R, createVNode as r, unref as o, withCtx as b, createElementVNode as n, toDisplayString as g, renderList as Z, createBlock as V, resolveDynamicComponent as ee, h as l } from "vue";
2
+ import { _ as te } from "./campaign-CpzFl8Vr.js";
3
+ import { useDialog as oe, components as y } from "@feedmepos/ui-library";
4
+ import { c as ae, p as ne } from "./plugins-DLIgnFIF.js";
5
+ import { u as ie } from "./loading-CzWOx4tE.js";
6
+ import { u as re } from "./business-BZUIs8Ub.js";
7
+ import { u as se } from "./campaign-B6I6PuY4.js";
8
+ import { b as T, c as U, a as le } from "./campaign-DKjBjV2k.js";
9
+ import { c as ce, p as me } from "./duplicateCampaign-aIsX9cCi.js";
10
+ import { _ as de } from "./FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js";
11
+ import { _ as ue } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-CA31QP-A.js";
12
+ import { u as pe } from "./template-CYKGCWY4.js";
13
+ import { u as fe } from "./vue-i18n-BPeSHE3c.js";
14
+ import { _ as ge } from "./SendCollectionSheet.vue_vue_type_script_setup_true_lang-C3O0biLZ.js";
15
+ import "./index-BbpqZrkB.js";
16
+ import { useRouter as ye } from "vue-router";
17
+ import { c as h } from "./index-kkhrPH6s.js";
18
+ import { R as _e } from "./app-DAtx6aZ4.js";
19
+ const he = { class: "flex items-center" }, we = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, Ce = { class: "px-24 flex flex-col gap-y-16" }, ve = { class: "flex items-center justify-between w-full" }, xe = { class: "flex gap-8 overflow-x-auto" }, be = { class: "space-y-8" }, ke = { class: "flex w-full gap-4 items-center" }, Fe = { class: "space-y-4" }, Se = { class: "fm-typo-en-body-lg-600" }, Ae = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Re = { class: "flex items-center gap-8" }, Ve = { class: "flex flex-col gap-16 text-center" }, Le = { class: "fm-typo-en-title-sm-800" }, Be = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Xe = /* @__PURE__ */ J({
20
+ __name: "Game",
21
+ setup(Ee) {
22
+ const { t: d } = fe(), D = ye(), I = {
23
+ label: d("connect.program.common.actions.create", {
24
+ type: d("connect.program.game.title").toLowerCase()
25
+ }),
26
+ value: "create",
27
+ isPrimary: !0,
28
+ prependIcon: "add"
29
+ }, L = oe(), K = pe("GAME", L), w = re(), u = se(), { global: j, minor: B } = ie, c = A({
30
+ searchKey: "",
31
+ location: []
32
+ });
33
+ function N(e) {
34
+ const t = c.value.location;
35
+ return !t || t.length === 0 || !e.targetLocation ? !0 : Array.isArray(t) ? t.some((s) => {
36
+ var i;
37
+ return (i = e == null ? void 0 : e.targetLocation) == null ? void 0 : i.includes(s);
38
+ }) : e.targetLocation.includes(t);
39
+ }
40
+ const C = Q(
41
+ () => u.campaigns.token.filter((e) => N(e))
42
+ ), O = [
43
+ {
44
+ header: "Program title",
45
+ accessorKey: "name",
46
+ // accessorFn: (v) => v.name,
47
+ cell(e) {
48
+ return l("div", { class: "flex items-center justify-between gap-4" }, [
49
+ l("div", { class: "flex items-center" }, [
50
+ l(
51
+ y.FmTooltip,
52
+ {
53
+ content: e.row.original._id,
54
+ onClick: (t) => {
55
+ t.stopPropagation(), ae(e.row.original._id);
56
+ }
57
+ },
58
+ [
59
+ l(y.FmIcon, {
60
+ name: "info",
61
+ outline: !0,
62
+ size: "sm"
63
+ })
64
+ ]
65
+ )
66
+ ]),
67
+ l("div", { class: "flex-1" }, e.row.original.name)
68
+ ]);
69
+ }
70
+ },
71
+ {
72
+ header: "Status",
73
+ accessorFn: (e) => le(e),
74
+ cell(e) {
75
+ return T(e.row.original);
76
+ }
77
+ },
78
+ {
79
+ header: "Summary",
80
+ accessorFn: (e) => U(e)
81
+ //v.effect,
82
+ },
83
+ {
84
+ header: "Token received",
85
+ accessorFn: (e) => {
86
+ var t;
87
+ return ((t = e == null ? void 0 : e.pf_collectible) == null ? void 0 : t.currentReceive) ?? 0;
88
+ }
89
+ },
90
+ {
91
+ header: "Actions",
92
+ cell(e) {
93
+ return l("div", { class: "flex items-center gap-8" }, [
94
+ l(y.FmButton, {
95
+ variant: "tertiary",
96
+ icon: "insights",
97
+ iconColor: "neutral-gray-400",
98
+ onClick: async (t) => {
99
+ t.stopPropagation(), await G(e.row.original);
100
+ }
101
+ }),
102
+ l(y.FmButton, {
103
+ variant: "tertiary",
104
+ icon: "content_copy",
105
+ iconColor: "neutral-gray-400",
106
+ onClick: async (t) => {
107
+ t.stopPropagation(), await $(e.row.original);
108
+ }
109
+ }),
110
+ l(y.FmButton, {
111
+ variant: "tertiary",
112
+ icon: "send",
113
+ iconColor: "neutral-gray-400",
114
+ onClick: (t) => {
115
+ t.stopPropagation(), q(e.row.original);
116
+ }
117
+ }),
118
+ l(y.FmButton, {
119
+ variant: "tertiary",
120
+ icon: "delete",
121
+ iconColor: "neutral-gray-400",
122
+ onClick: (t) => {
123
+ t.stopPropagation(), M(e.row.original);
124
+ }
125
+ })
126
+ ]);
127
+ }
128
+ }
129
+ ], k = A(), E = A();
130
+ async function M(e) {
131
+ await ne.remove(`Are you sure you want to remove ${e.name}?`) && await B(
132
+ async () => {
133
+ await h.delete(e._id), await u.read("GAME");
134
+ },
135
+ {
136
+ message: `Removing ${e.name}`,
137
+ successMessage: `Removed ${e.name} successfully`
138
+ }
139
+ );
140
+ }
141
+ async function v(e) {
142
+ e ? await t() : K.open(async (s) => {
143
+ await t(s);
144
+ });
145
+ async function t(s) {
146
+ var i;
147
+ (i = k.value) == null || i.showSheet(
148
+ !0,
149
+ "GAME",
150
+ e ? await h.readById(e._id) : void 0,
151
+ s
152
+ );
153
+ }
154
+ }
155
+ async function $(e) {
156
+ var i;
157
+ if (!await ce(e.name))
158
+ return;
159
+ const t = await h.readById(e._id), s = me(t);
160
+ (i = k.value) == null || i.showSheet(
161
+ !0,
162
+ "GAME",
163
+ s,
164
+ t.template
165
+ );
166
+ }
167
+ async function H(e) {
168
+ var t, s, i;
169
+ e.campaign._id && ((i = (s = (t = e.campaign) == null ? void 0 : t.game) == null ? void 0 : s.rewards) != null && i.some(
170
+ (p) => p.type === "VOUCHER"
171
+ )) && await new Promise((p) => {
172
+ L.open({
173
+ title: "Confirmation",
174
+ message: "This will change all future vouchers? Would you like to update previous claimed vouchers expiry date and discount?",
175
+ primaryActions: { text: "Update all", close: !0 },
176
+ secondaryActions: { text: "Update future only", close: !0 }
177
+ }).onPrimary(async () => {
178
+ e.updateCollections = !0, p();
179
+ }).onSecondary(async () => {
180
+ p();
181
+ });
182
+ }), await B(
183
+ async () => {
184
+ e.campaign._id ? await h.update(e.campaign._id, e) : await h.create(e), await u.read("GAME");
185
+ },
186
+ {
187
+ message: `${e.campaign._id ? "Updating" : "Creating"} game program`,
188
+ successMessage: `Game program ${e.campaign._id ? "updated" : "created"} successfully`
189
+ }
190
+ );
191
+ }
192
+ function q(e) {
193
+ var t;
194
+ (t = E.value) == null || t.showSheet({
195
+ campaign: e
196
+ });
197
+ }
198
+ async function G(e) {
199
+ await D.push({
200
+ name: _e["$connect-PROGRAM_GAME_ANALYTIC"],
201
+ params: { id: e._id }
202
+ });
203
+ }
204
+ return X(async () => {
205
+ await j(async () => {
206
+ await u.read("GAME"), await w.readPremium();
207
+ });
208
+ }), (e, t) => {
209
+ const s = m("FmPill"), i = m("FmPageHead"), F = m("FmSearch"), p = m("FmTable"), x = m("FmButton"), z = m("FmListItem"), W = m("FmList"), Y = m("FmCard");
210
+ return f(), P(R, null, [
211
+ r(i, {
212
+ actions: o(C).length > 0 && o(w).isPremium ? [I] : [],
213
+ "onClick:action": t[0] || (t[0] = () => v())
214
+ }, {
215
+ title: b(() => [
216
+ n("div", he, [
217
+ n("span", we, g(o(d)("connect.program.game.title")), 1),
218
+ r(s, { variant: "premium" })
219
+ ])
220
+ ]),
221
+ _: 1
222
+ }, 8, ["actions"]),
223
+ n("div", Ce, [
224
+ r(F, {
225
+ modelValue: o(c).searchKey,
226
+ "onUpdate:modelValue": t[1] || (t[1] = (a) => o(c).searchKey = a),
227
+ class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
228
+ placeholder: "search",
229
+ collapsible: ""
230
+ }, null, 8, ["modelValue"]),
231
+ o(u).campaigns.token && o(u).campaigns.token.length > 0 ? (f(), P(R, { key: 0 }, [
232
+ n("div", ve, [
233
+ n("div", xe, [
234
+ r(de, {
235
+ label: `${o(d)("connect.common.location")}: `,
236
+ "right-icon": "keyboard_arrow_down",
237
+ modelValue: o(c).location,
238
+ "onUpdate:modelValue": t[2] || (t[2] = (a) => o(c).location = a),
239
+ icon: "storefront",
240
+ "show-item-label": !0,
241
+ items: o(w).locationOptions
242
+ }, null, 8, ["label", "modelValue", "items"])
243
+ ]),
244
+ r(F, {
245
+ modelValue: o(c).searchKey,
246
+ "onUpdate:modelValue": t[3] || (t[3] = (a) => o(c).searchKey = a),
247
+ class: "xs:hidden sm:hidden",
248
+ placeholder: "search",
249
+ collapsible: ""
250
+ }, null, 8, ["modelValue"])
251
+ ]),
252
+ r(p, {
253
+ class: "xs:hidden sm:hidden",
254
+ "row-data": o(C),
255
+ "column-defs": O,
256
+ "search-value": o(c).searchKey,
257
+ "column-filter": [],
258
+ onRowClick: t[4] || (t[4] = (a) => v(a.original)),
259
+ "hide-footer": o(C).length < 10
260
+ }, null, 8, ["row-data", "search-value", "hide-footer"]),
261
+ r(W, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
262
+ default: b(() => [
263
+ (f(!0), P(R, null, Z(o(C).filter(
264
+ (a) => a.name.toLowerCase().includes(o(c).searchKey.toLowerCase())
265
+ ), (a) => (f(), V(z, {
266
+ key: a._id.toString(),
267
+ onClick: (S) => v(a),
268
+ class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
269
+ }, {
270
+ default: b(() => {
271
+ var S;
272
+ return [
273
+ n("div", be, [
274
+ n("div", ke, [
275
+ (f(), V(ee(o(T)(a))))
276
+ ]),
277
+ n("div", Fe, [
278
+ n("div", Se, g(a.name), 1),
279
+ n("div", Ae, g(o(U)(a)), 1)
280
+ ]),
281
+ n("div", Pe, g(o(d)("connect.program.game.token_received", {
282
+ count: ((S = a.pf_collectible) == null ? void 0 : S.currentReceive) ?? 0
283
+ })), 1)
284
+ ]),
285
+ n("div", Re, [
286
+ r(x, {
287
+ icon: "insights",
288
+ "icon-color": "neutral-gray-400",
289
+ variant: "tertiary",
290
+ onClick: async (_) => {
291
+ _.stopPropagation(), await G(a);
292
+ }
293
+ }, null, 8, ["onClick"]),
294
+ r(x, {
295
+ icon: "content_copy",
296
+ "icon-color": "neutral-gray-400",
297
+ variant: "tertiary",
298
+ onClick: async (_) => {
299
+ _.stopPropagation(), await $(a);
300
+ }
301
+ }, null, 8, ["onClick"]),
302
+ r(x, {
303
+ icon: "delete",
304
+ "icon-color": "neutral-gray-400",
305
+ variant: "tertiary",
306
+ onClick: (_) => (_.stopPropagation(), M(a))
307
+ }, null, 8, ["onClick"])
308
+ ])
309
+ ];
310
+ }),
311
+ _: 2
312
+ }, 1032, ["onClick"]))), 128))
313
+ ]),
314
+ _: 1
315
+ })
316
+ ], 64)) : (f(), V(Y, {
317
+ key: 1,
318
+ variant: "outlined",
319
+ class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
320
+ }, {
321
+ default: b(() => [
322
+ t[6] || (t[6] = n("img", {
323
+ src: te,
324
+ class: "aspect-square w-[150px]"
325
+ }, null, -1)),
326
+ n("div", Ve, [
327
+ n("div", Le, g(o(d)("connect.program.game.empty_state.title")), 1),
328
+ n("div", Be, g(o(d)("connect.program.game.empty_state.description")), 1)
329
+ ]),
330
+ r(x, {
331
+ variant: "primary",
332
+ label: "Create game program",
333
+ icon: "add",
334
+ disabled: !o(w).isPremium,
335
+ onClick: t[5] || (t[5] = (a) => v())
336
+ }, null, 8, ["disabled"])
337
+ ]),
338
+ _: 1
339
+ })),
340
+ r(ue, {
341
+ ref_key: "sheetRef",
342
+ ref: k,
343
+ "onSubmit:modelValue": H
344
+ }, null, 512),
345
+ r(ge, {
346
+ ref_key: "sendCollectionSheetRef",
347
+ ref: E
348
+ }, null, 512)
349
+ ])
350
+ ], 64);
351
+ };
352
+ }
353
+ });
354
+ export {
355
+ Xe as default
356
+ };