@feedmepos/mf-connect 0.1.0-beta.76 → 0.1.0-beta.78

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 (88) hide show
  1. package/dist/{Analytic-BEX0W26t.js → Analytic-COFGqPaY.js} +11 -11
  2. package/dist/{App-B37shyio.js → App-DPIsSDoL.js} +6 -6
  3. package/dist/{AuditLogs-CffLLmgR.js → AuditLogs-BZw3BdUt.js} +9 -9
  4. package/dist/{Bin-ByblUwUe.js → Bin-BMr8cViJ.js} +8 -8
  5. package/dist/{Broadcast-C2Bgkw6V.js → Broadcast-BVLLsk8s.js} +9 -9
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-jviTok84.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BWiarXE5.js} +6 -6
  7. package/dist/{Card-CmhjJrq4.js → Card-CYEk8Xz-.js} +16 -16
  8. package/dist/{Collections-DXwp81Z5.js → Collections-CI0ltpA3.js} +115 -111
  9. package/dist/{Credit-C7nVnyLE.js → Credit-DOjneP7A.js} +9 -9
  10. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-B8OetxD5.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-DIwlWceJ.js} +40 -40
  11. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-DSEbv2th.js → EffectSheet.vue_vue_type_style_index_0_lang-BkIob-96.js} +6 -6
  12. package/dist/{Experience-Dt7eS803.js → Experience-DJ-Yv0ZW.js} +9 -9
  13. package/dist/{Game-D6Rd8EiP.js → Game-dhKJxiVz.js} +10 -10
  14. package/dist/{Index-Bwk3-hi7.js → Index-Clakr6Ox.js} +10 -10
  15. package/dist/{Marketing-D7PGcgvf.js → Marketing-TPWekqs3.js} +6 -6
  16. package/dist/{Member-xLRDSRGX.js → Member-DX9VQPR-.js} +10 -10
  17. package/dist/{MemberList-C2KTiNo8.js → MemberList-Devc8yEc.js} +29 -26
  18. package/dist/{MemberTransactions-DeSQj6Hb.js → MemberTransactions-DcRlsme8.js} +1 -1
  19. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-BXowXpx5.js → MessageInput.vue_vue_type_script_setup_true_lang-R5xLjJBo.js} +146 -144
  20. package/dist/{Mission-C_oIC_Qy.js → Mission-ag5FCZ5A.js} +10 -10
  21. package/dist/{Overview-k_S6Xw7W.js → Overview-Cl9hgjsZ.js} +18 -18
  22. package/dist/{Point-Clh-RJDJ.js → Point-Dw-UBBOW.js} +9 -9
  23. package/dist/{Promotion-Bx8nrXaK.js → Promotion-OV94bumI.js} +10 -10
  24. package/dist/{Queue-CZKA5dNa.js → Queue-pu6TTf7D.js} +10 -10
  25. package/dist/{Record-f6MIjxW-.js → Record-B5uKgYVf.js} +8 -8
  26. package/dist/{Reward-BWPTRfzF.js → Reward-DDwsuP4F.js} +15 -15
  27. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Lm3CoKbR.js → RewardGroup.vue_vue_type_script_setup_true_lang-HVTtA42N.js} +11 -11
  28. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-D--VbQVQ.js → RuleGroup.vue_vue_type_script_setup_true_lang-BMZ3efkn.js} +13 -13
  29. package/dist/{Segment-nw3f_GaH.js → Segment-DKBD-ir9.js} +219 -209
  30. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-CS50BqbP.js → SelectItems.vue_vue_type_script_setup_true_lang-DuFNjzz2.js} +2 -2
  31. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CQN3-f-u.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-epeStluk.js} +11 -11
  32. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-61JEa7bb.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-HOZtMD8m.js} +3 -3
  33. package/dist/{Setting-DvU5aYwQ.js → Setting-CF6icpzB.js} +11 -11
  34. package/dist/{Store-knOLFAwu.js → Store-jCGVEenv.js} +19 -19
  35. package/dist/{StoreRewards-DzRm9fAd.js → StoreRewards-Dvx1AslZ.js} +13 -13
  36. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DPb1uIuI.js → StoreTransactions.vue_vue_type_script_setup_true_lang-r6r020Dt.js} +19 -19
  37. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DjbIKCPW.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CmrEl3Yk.js} +1 -1
  38. package/dist/{Tier-DaS2t5vf.js → Tier-Cj7X21GD.js} +155 -149
  39. package/dist/{Title-BmWVQAVd.js → Title-DcbY1n-j.js} +19 -19
  40. package/dist/{Transaction-QQdDVX3d.js → Transaction-Bz96V3PC.js} +2 -2
  41. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-mgx3WQkZ.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-ClILt7R6.js} +6 -6
  42. package/dist/{Voucher-e3fwsfzv.js → Voucher-6MohzB7D.js} +12 -12
  43. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-9_wK8PrL.js → VoucherEditor.vue_vue_type_script_setup_true_lang-Br2TzG_z.js} +10 -10
  44. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CYegMpRN.js → ZodTextField.vue_vue_type_script_setup_true_lang-DgvvO2gO.js} +1 -1
  45. package/dist/{app-1i7mx0dZ.js → app-CIoD2R-K.js} +1 -1
  46. package/dist/{app-BN77OXgS.js → app-DV1X0r0I.js} +31 -31
  47. package/dist/app.js +1 -1
  48. package/dist/{business-DqRPnW29.js → business-DMF3Rbwd.js} +1 -1
  49. package/dist/{campaign-b9FvKigH.js → campaign-CcKeyKqS.js} +2 -2
  50. package/dist/{campaign-B-4_cJoI.js → campaign-sNDioVDM.js} +9 -9
  51. package/dist/{campaign.enum-CDVoZ8sM.js → campaign.enum-DWPLuyAA.js} +1 -1
  52. package/dist/{campaign.fn-C6FtAdXE.js → campaign.fn-CJYOhzha.js} +81 -81
  53. package/dist/{collectible.enum-CjBbYd8r.js → collectible.enum-Uu7QxmuQ.js} +1 -1
  54. package/dist/{collection.fn-DzvhTgvy.js → collection.fn-Yp14LG7x.js} +2 -2
  55. package/dist/{dto-D9PkBV2m.js → dto-zGjQ6x7R.js} +4 -4
  56. package/dist/{effect-gk-rwqTS.js → effect-D3o0cZ7X.js} +1 -1
  57. package/dist/{email-addresses-B6TJYRyi.js → email-addresses-CpWzGfK9.js} +1 -1
  58. package/dist/{export-Dz6QgXPN.js → export-BkrVFLKs.js} +3 -3
  59. package/dist/{helper-ChjpvgXI.js → helper-Cf1YE8-n.js} +1 -1
  60. package/dist/{index-BH2tnZva.js → index-B8yNbtv_.js} +1 -1
  61. package/dist/{index-PgUO1aJB.js → index-Bkve_3H5.js} +41 -39
  62. package/dist/{index-DaiMhPcB.js → index-CCOx8i3W.js} +3 -3
  63. package/dist/{index-CdRq0mem.js → index-CITShaww.js} +1 -1
  64. package/dist/{index-D1XWT8fK.js → index-COQALKlJ.js} +1167 -1167
  65. package/dist/{index-BLdXv3F2.js → index-CcbaKu7C.js} +1 -1
  66. package/dist/{index-B91yws4l.js → index-CrZYIPTH.js} +2 -2
  67. package/dist/{index-HR-s-wxL.js → index-DFcQWWVm.js} +1 -1
  68. package/dist/{index-BHRp97cP.js → index-DYfDTP1G.js} +1 -1
  69. package/dist/{index-T5VJ7LOc.js → index-DyKlplJw.js} +6 -6
  70. package/dist/{index-CXBFjuZG.js → index-DyfOQIN-.js} +1 -1
  71. package/dist/{index-kV76DTQa.js → index-F7a-_glt.js} +1 -1
  72. package/dist/{index-D81rTS6w.js → index-jSq2EeMi.js} +3 -3
  73. package/dist/{index.esm2017-Cse5Z0VX.js → index.esm2017-BRdeDr5A.js} +1 -1
  74. package/dist/{loading-CTlOzqJl.js → loading-D1Wfmkyd.js} +1 -1
  75. package/dist/{membership-BEHTbLlS.js → membership-BO_9k1RM.js} +3 -3
  76. package/dist/{money-qwQnNFuK.js → money-V3RA3X7v.js} +1 -1
  77. package/dist/{number-g3UEQ6sr.js → number-CEwwmgZz.js} +1 -1
  78. package/dist/{objectid-D3FHs3ZM.js → objectid-BUlLvAIh.js} +14 -14
  79. package/dist/{plugins-C1KEHJqD.js → plugins-BXaXmsYI.js} +2 -2
  80. package/dist/{reward-BKE2TAvZ.js → reward-D-gsY6lW.js} +1 -1
  81. package/dist/{rule-Bqmb5DjB.js → rule-DT8KRyMs.js} +3 -3
  82. package/dist/{rule-builder-Cv6CdZ_v.js → rule-builder-Blm8jQnv.js} +1 -1
  83. package/dist/{template-DNmDTslz.js → template-D6GdIov5.js} +4 -4
  84. package/dist/{trigger-BJb8Msn3.js → trigger-C_3L1xNz.js} +4 -4
  85. package/dist/{user-D2PePZtI.js → user-o8b4rvYg.js} +1 -1
  86. package/dist/{vue-i18n-DPPL08ue.js → vue-i18n-Bj7k-2AQ.js} +317 -317
  87. package/dist/{xlsx-DYWFGuKq.js → xlsx-C0KLFk50.js} +1 -1
  88. package/package.json +1 -1
@@ -1,39 +1,39 @@
1
- import { defineComponent as ee, ref as U, resolveComponent as h, openBlock as f, createElementBlock as C, createElementVNode as s, createVNode as c, unref as t, createCommentVNode as se, createBlock as J, toDisplayString as $, normalizeClass as le, onMounted as _e, Fragment as G, renderList as Se, withCtx as A, computed as ie, isRef as Ce, createSlots as ke, h as Y, onBeforeMount as Ie } from "vue";
2
- import { _ as Me } from "./campaign-CpzFl8Vr.js";
3
- import { p as Te } from "./plugins-C1KEHJqD.js";
4
- import { u as Ee } from "./loading-CTlOzqJl.js";
1
+ import { defineComponent as ee, ref as U, resolveComponent as h, openBlock as f, createElementBlock as C, createElementVNode as l, createVNode as c, unref as t, createCommentVNode as se, createBlock as J, toDisplayString as $, normalizeClass as le, onMounted as _e, Fragment as G, renderList as Se, withCtx as A, computed as ie, isRef as Ce, createSlots as ke, h as Y, onBeforeMount as Me } from "vue";
2
+ import { _ as Te } from "./campaign-CpzFl8Vr.js";
3
+ import { p as Ie } from "./plugins-BXaXmsYI.js";
4
+ import { u as Ee } from "./loading-D1Wfmkyd.js";
5
5
  import { FmButtonVariant as ae, useSnackbar as Ae, components as X } from "@feedmepos/ui-library";
6
6
  import { u as xe, _ as we } from "./usePagination-BeF5K3M7.js";
7
- import { u as Fe } from "./vue-i18n-DPPL08ue.js";
8
- import "./index-T5VJ7LOc.js";
9
- import { i as Re, j as D, c as pe } from "./index-PgUO1aJB.js";
10
- import "./index-B91yws4l.js";
11
- import "./index-BH2tnZva.js";
12
- import "./index-D81rTS6w.js";
13
- import { w as De } from "./xlsx-DYWFGuKq.js";
14
- import { e as $e, M as Pe } from "./email-addresses-B6TJYRyi.js";
7
+ import { u as Fe } from "./vue-i18n-Bj7k-2AQ.js";
8
+ import "./index-DyKlplJw.js";
9
+ import { i as Re, j as D, c as pe } from "./index-Bkve_3H5.js";
10
+ import "./index-CrZYIPTH.js";
11
+ import "./index-B8yNbtv_.js";
12
+ import "./index-jSq2EeMi.js";
13
+ import { w as De } from "./xlsx-C0KLFk50.js";
14
+ import { e as $e, M as Pe } from "./email-addresses-CpWzGfK9.js";
15
15
  import { Z as Ne } from "./zod-Bg2FbC-D.js";
16
- import { u as Ve } from "./app-wDQR6dpb.js";
17
- import { F as me, z as Be } from "./index-D1XWT8fK.js";
18
- import { R as fe } from "./rule-builder-Cv6CdZ_v.js";
19
- import { _ as Ye } from "./ZodTextField.vue_vue_type_script_setup_true_lang-CYegMpRN.js";
20
- import { _ as Le } from "./RuleGroup.vue_vue_type_script_setup_true_lang-D--VbQVQ.js";
21
- import { u as Ue, v as ze, w as Oe } from "./index.esm2017-Cse5Z0VX.js";
16
+ import { u as Be } from "./app-wDQR6dpb.js";
17
+ import { F as me, z as Ve } from "./index-COQALKlJ.js";
18
+ import { R as fe } from "./rule-builder-Blm8jQnv.js";
19
+ import { _ as Ye } from "./ZodTextField.vue_vue_type_script_setup_true_lang-DgvvO2gO.js";
20
+ import { _ as Le } from "./RuleGroup.vue_vue_type_script_setup_true_lang-BMZ3efkn.js";
21
+ import { u as Ue, v as ze, w as Oe } from "./index.esm2017-BRdeDr5A.js";
22
22
  import { F as je } from "./FileSaver.min-NlMItPOc.js";
23
23
  import { h as H } from "./moment-BWErdI6_.js";
24
- import { s as N, u as qe } from "./membership-BEHTbLlS.js";
24
+ import { s as N, u as qe } from "./membership-BO_9k1RM.js";
25
25
  import { o as He } from "./objectId-dwaoBfJX.js";
26
- import { u as he } from "./business-DqRPnW29.js";
27
- import { f as Ge } from "./number-g3UEQ6sr.js";
28
- import { t as Je } from "./money-qwQnNFuK.js";
29
- import "./index-BHRp97cP.js";
26
+ import { u as he } from "./business-DMF3Rbwd.js";
27
+ import { f as Ge } from "./number-CEwwmgZz.js";
28
+ import { t as Je } from "./money-V3RA3X7v.js";
29
+ import "./index-DYfDTP1G.js";
30
30
  import { useRouter as Qe } from "vue-router";
31
- import { m as ge } from "./index-CdRq0mem.js";
32
- import { R as ye } from "./app-BN77OXgS.js";
31
+ import { m as ye } from "./index-CITShaww.js";
32
+ import { R as ge } from "./app-DV1X0r0I.js";
33
33
  const We = Re.extend({
34
34
  _id: me.optional(),
35
35
  business: me.optional(),
36
- file: Be.any().nullish()
36
+ file: Ve.any().nullish()
37
37
  }), Ze = { class: "flex flex-col space-y-16" }, Ke = {
38
38
  key: 0,
39
39
  class: /* @__PURE__ */ le([
@@ -56,70 +56,70 @@ const We = Re.extend({
56
56
  },
57
57
  emits: ["update:file"],
58
58
  setup(e, { emit: v }) {
59
- const _ = e, w = v, { t: u } = Fe(), g = U(null), m = U(null), F = ["Id"];
60
- async function n() {
59
+ const _ = e, w = v, { t: p } = Fe(), y = U(null), m = U(null), F = ["Id"];
60
+ async function s() {
61
61
  if (_.importFile)
62
62
  try {
63
- const p = Ue(), S = ze(p, _.importFile), x = await Oe(S);
63
+ const u = Ue(), S = ze(u, _.importFile), x = await Oe(S);
64
64
  window.open(x, "_blank");
65
- } catch (p) {
66
- console.log(p);
65
+ } catch (u) {
66
+ console.log(u);
67
67
  }
68
68
  }
69
- async function l() {
70
- const p = new Blob([F.join(",")], {
69
+ async function n() {
70
+ const u = new Blob([F.join(",")], {
71
71
  type: "text/csv;charset=utf-8;"
72
72
  });
73
- je.saveAs(p, "ImportSegmentTemplate.csv");
73
+ je.saveAs(u, "ImportSegmentTemplate.csv");
74
74
  }
75
- function r(p) {
76
- g.value = p, w("update:file", g.value);
75
+ function r(u) {
76
+ y.value = u, w("update:file", y.value);
77
77
  }
78
- function b(p) {
79
- var x, T;
80
- const S = ((T = (x = p.target) == null ? void 0 : x.files) == null ? void 0 : T[0]) ?? null;
78
+ function b(u) {
79
+ var x, I;
80
+ const S = ((I = (x = u.target) == null ? void 0 : x.files) == null ? void 0 : I[0]) ?? null;
81
81
  r(S);
82
82
  }
83
- return (p, S) => {
84
- const x = h("FmButton"), T = h("FmDropField");
83
+ return (u, S) => {
84
+ const x = h("FmButton"), I = h("FmDropField");
85
85
  return f(), C("div", Ze, [
86
- S[2] || (S[2] = s("div", { class: "fm-typo-en-title-sm-800" }, "Upload File", -1)),
87
- p.importFile ? (f(), C("div", Ke, [
86
+ S[2] || (S[2] = l("div", { class: "fm-typo-en-title-sm-800" }, "Upload File", -1)),
87
+ u.importFile ? (f(), C("div", Ke, [
88
88
  c(x, {
89
- label: t(u)("View uploaded file"),
89
+ label: t(p)("View uploaded file"),
90
90
  variant: t(ae).Plain,
91
91
  icon: "file_present",
92
- onClick: n
92
+ onClick: s
93
93
  }, null, 8, ["label", "variant"])
94
94
  ])) : se("", !0),
95
- s("div", null, [
95
+ l("div", null, [
96
96
  c(x, {
97
97
  class: "ml-auto",
98
98
  variant: "tertiary",
99
99
  icon: "download",
100
100
  label: "Download Template",
101
- onClick: l
101
+ onClick: n
102
102
  }),
103
- g.value ? (f(), C("div", Xe, [
103
+ y.value ? (f(), C("div", Xe, [
104
104
  c(x, {
105
105
  variant: t(ae).Tertiary,
106
106
  "prepend-icon": "attach_file"
107
107
  }, null, 8, ["variant"]),
108
- s("p", et, $(g.value.name), 1),
109
- s("label", {
108
+ l("p", et, $(y.value.name), 1),
109
+ l("label", {
110
110
  ref_key: "fileLabelRef",
111
111
  ref: m,
112
112
  htmlFor: "file"
113
113
  }, [
114
114
  c(x, {
115
115
  variant: t(ae).Plain,
116
- label: t(u)("Replace File"),
116
+ label: t(p)("Replace File"),
117
117
  onClick: S[1] || (S[1] = () => {
118
118
  var E;
119
119
  return (E = m.value) == null ? void 0 : E.click();
120
120
  })
121
121
  }, null, 8, ["variant", "label"]),
122
- s("input", {
122
+ l("input", {
123
123
  id: "file",
124
124
  accept: ".csv",
125
125
  class: "hidden",
@@ -128,7 +128,7 @@ const We = Re.extend({
128
128
  onChange: b
129
129
  }, null, 32)
130
130
  ], 512)
131
- ])) : (f(), J(T, {
131
+ ])) : (f(), J(I, {
132
132
  key: 0,
133
133
  onFileUpload: S[0] || (S[0] = (E) => r(E)),
134
134
  accept: ".csv",
@@ -148,54 +148,64 @@ const We = Re.extend({
148
148
  const v = e, _ = [
149
149
  {
150
150
  header: "Name",
151
- accessorFn: (l) => l.name
151
+ accessorFn: (n) => n.name
152
152
  },
153
153
  {
154
154
  header: "Id",
155
- accessorFn: (l) => l._id
155
+ accessorFn: (n) => n._id
156
156
  },
157
157
  {
158
158
  header: "Customer Since",
159
- accessorFn: (l) => H(He(l._id.toString())).format("DD MMM YYYY")
159
+ accessorFn: (n) => H(He(n._id.toString())).format("DD MMM YYYY")
160
160
  },
161
161
  {
162
162
  header: "Phone",
163
- accessorFn: (l) => l.phoneNumber
163
+ accessorFn: (n) => n.phoneNumber
164
164
  },
165
165
  {
166
166
  header: "Birthday",
167
- accessorFn: (l) => H(l.birthday).format("DD MMM YYYY")
167
+ accessorFn: (n) => H(n.birthday).format("DD MMM YYYY")
168
168
  },
169
169
  {
170
170
  header: "Last Visit",
171
- accessorFn: (l) => H(l.stats.lastVisit).format("DD MMM YYYY")
171
+ accessorFn: (n) => H(n.stats.lastVisit).format("DD MMM YYYY")
172
172
  }
173
- ], w = async (l) => v.segment._id ? await N.paginateSegmentUsers(v.segment._id, {
174
- limit: u.value.pageSize,
175
- skip: l.pageIndex ?? 0,
176
- sortBy: "_id",
177
- search: l.searchValue,
178
- descending: !0
179
- }) : { resources: [], meta: { totalResources: 0, totalPages: 0 } }, { tableMeta: u, rowData: g, onSort: m, debouncedFetchData: F, onSearch: n } = xe(w);
173
+ ];
174
+ async function w(n) {
175
+ return v.segment._id ? (console.log(n), await N.paginateSegmentUsers(
176
+ v.segment._id,
177
+ n
178
+ )) : {
179
+ resources: [],
180
+ meta: {
181
+ totalResources: 0,
182
+ totalPages: 0,
183
+ skip: n.skip,
184
+ limit: n.limit,
185
+ sortBy: n.sortBy
186
+ }
187
+ };
188
+ }
189
+ const { tableMeta: p, rowData: y, onSort: m, debouncedFetchData: F, onSearch: s } = xe(w);
180
190
  return _e(async () => {
181
191
  await F();
182
- }), (l, r) => (f(), C("div", ot, [
183
- s("div", at, $(v.title), 1),
184
- s("div", nt, [
185
- s("div", st, $(l.segment.members.length), 1),
186
- s("div", lt, [
187
- r[1] || (r[1] = s("div", null, "contacts in your segment", -1)),
188
- s("div", null, "as of " + $(t(H)(l.segment.lastUpdated).format("DD MMM YYYY")), 1)
192
+ }), (n, r) => (f(), C("div", ot, [
193
+ l("div", at, $(v.title), 1),
194
+ l("div", nt, [
195
+ l("div", st, $(n.segment.members.length), 1),
196
+ l("div", lt, [
197
+ r[1] || (r[1] = l("div", null, "contacts in your segment", -1)),
198
+ l("div", null, "as of " + $(t(H)(n.segment.lastUpdated).format("DD MMM YYYY")), 1)
189
199
  ])
190
200
  ]),
191
201
  c(we, {
192
- loading: t(u).isLoading,
193
- "row-data": t(g),
194
- "row-count": t(u).totalRows,
202
+ loading: t(p).isLoading,
203
+ "row-data": t(y),
204
+ "row-count": t(p).totalRows,
195
205
  "column-defs": _,
196
- "page-size": t(u).pageSize,
197
- "page-count": t(u).pageCount,
198
- "page-index": t(u).pageIndex,
206
+ "page-size": t(p).pageSize,
207
+ "page-count": t(p).pageCount,
208
+ "page-index": t(p).pageIndex,
199
209
  onSortChange: t(m),
200
210
  onPageChange: r[0] || (r[0] = (b) => t(F)({ pageSize: b.pageSize, pageIndex: b.pageIndex }))
201
211
  }, null, 8, ["loading", "row-data", "row-count", "page-size", "page-count", "page-index", "onSortChange"])
@@ -209,7 +219,7 @@ const We = Re.extend({
209
219
  },
210
220
  emits: ["update:model-value"],
211
221
  setup(e, { emit: v }) {
212
- const _ = e, w = v, u = [
222
+ const _ = e, w = v, p = [
213
223
  {
214
224
  label: "Dynamic",
215
225
  sublabel: "Segment statistics are based on rules configured and will be recalculated automatically when rule changes.",
@@ -221,31 +231,31 @@ const We = Re.extend({
221
231
  value: D.enum.STATIC
222
232
  }
223
233
  ];
224
- function g(m) {
234
+ function y(m) {
225
235
  m !== _.modelValue && w("update:model-value", m);
226
236
  }
227
237
  return (m, F) => {
228
- const n = h("FmCard"), l = h("FmHelperText");
238
+ const s = h("FmCard"), n = h("FmHelperText");
229
239
  return f(), C("div", rt, [
230
- s("div", ct, [
231
- (f(), C(G, null, Se(u, (r) => c(n, {
240
+ l("div", ct, [
241
+ (f(), C(G, null, Se(p, (r) => c(s, {
232
242
  variant: "outlined",
233
243
  class: le(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-2", {
234
- "col-span-2": u.length == 1,
244
+ "col-span-2": p.length == 1,
235
245
  "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": m.modelValue === r.value,
236
246
  "hover:bg-fm-color-opacity-sm": m.modelValue !== r.value
237
247
  }]),
238
- onClick: (b) => g(r.value),
248
+ onClick: (b) => y(r.value),
239
249
  key: r.value
240
250
  }, {
241
251
  default: A(() => [
242
- s("div", dt, $(r.label), 1),
243
- s("div", ut, $(r.sublabel), 1)
252
+ l("div", dt, $(r.label), 1),
253
+ l("div", ut, $(r.sublabel), 1)
244
254
  ]),
245
255
  _: 2
246
256
  }, 1032, ["class", "onClick"])), 64))
247
257
  ]),
248
- m.errorText ? (f(), J(l, {
258
+ m.errorText ? (f(), J(n, {
249
259
  key: 0,
250
260
  class: "!mt-4",
251
261
  text: m.errorText,
@@ -257,7 +267,7 @@ const We = Re.extend({
257
267
  }), mt = { class: "flex items-center gap-x-8" }, ft = {
258
268
  key: 0,
259
269
  class: "space-y-16 pr-12"
260
- }, gt = { class: "flex flex-col space-y-16" }, yt = {
270
+ }, yt = { class: "flex flex-col space-y-16" }, gt = {
261
271
  key: 0,
262
272
  class: "flex flex-col space-y-16"
263
273
  }, vt = {
@@ -270,37 +280,37 @@ const We = Re.extend({
270
280
  __name: "SegmentSheet",
271
281
  emits: ["update:model-value"],
272
282
  setup(e, { expose: v, emit: _ }) {
273
- const w = Ve(), u = U(!1), g = U(!1), m = {
283
+ const w = Be(), p = U(!1), y = U(!1), m = {
274
284
  name: "",
275
285
  isActive: !0,
276
286
  type: D.enum.DYNAMIC,
277
287
  rule: fe.scaffoldGroup(),
278
288
  members: []
279
- }, F = We, n = U(m), l = ie(() => {
280
- const y = F.safeParse(n.value);
281
- return y.success ? [] : y.error.errors;
289
+ }, F = We, s = U(m), n = ie(() => {
290
+ const g = F.safeParse(s.value);
291
+ return g.success ? [] : g.error.errors;
282
292
  });
283
- function r(y) {
284
- u.value = !0, g.value = !1, y ? n.value = {
285
- ...y,
286
- isActive: y.isActive !== !1,
287
- type: y.type ?? (y.importFile ? D.enum.STATIC : D.enum.DYNAMIC)
288
- } : n.value = { ...m };
293
+ function r(g) {
294
+ p.value = !0, y.value = !1, g ? s.value = {
295
+ ...g,
296
+ isActive: g.isActive !== !1,
297
+ type: g.type ?? (g.importFile ? D.enum.STATIC : D.enum.DYNAMIC)
298
+ } : s.value = { ...m };
289
299
  }
290
300
  function b() {
291
- u.value = !1;
301
+ p.value = !1;
292
302
  }
293
- async function p() {
294
- F.safeParse(n.value).success && (g.value = !0);
303
+ async function u() {
304
+ F.safeParse(s.value).success && (y.value = !0);
295
305
  }
296
306
  function S() {
297
- g.value = !1;
307
+ y.value = !1;
298
308
  }
299
309
  async function x() {
300
- n.value.type === D.enum.STATIC ? (n.value.rule = fe.scaffoldGroup(), n.value.isActive = !1) : n.value.file = void 0, E("update:model-value", n.value);
310
+ s.value.type === D.enum.STATIC ? (s.value.rule = fe.scaffoldGroup(), s.value.isActive = !1) : s.value.file = void 0, E("update:model-value", s.value);
301
311
  }
302
- async function T(y) {
303
- n.value.type = y;
312
+ async function I(g) {
313
+ s.value.type = g;
304
314
  }
305
315
  _e(async () => {
306
316
  });
@@ -308,24 +318,24 @@ const We = Re.extend({
308
318
  return v({
309
319
  showSheet: r,
310
320
  hideSheet: b
311
- }), (y, i) => {
321
+ }), (g, i) => {
312
322
  const R = h("FmButton"), z = h("FmSwitch"), a = h("FmSideSheet");
313
323
  return f(), J(a, {
314
- modelValue: t(u),
315
- "onUpdate:modelValue": i[8] || (i[8] = (o) => Ce(u) ? u.value = o : null),
324
+ modelValue: t(p),
325
+ "onUpdate:modelValue": i[8] || (i[8] = (o) => Ce(p) ? p.value = o : null),
316
326
  header: "Add segment",
317
327
  "dismiss-away": "",
318
328
  "close-button": !0,
319
329
  "max-width": 1100
320
330
  }, ke({
321
331
  "side-sheet-footer": A(() => [
322
- s("div", St, [
323
- t(g) || t(n).type === t(D).enum.STATIC ? (f(), C(G, { key: 0 }, [
332
+ l("div", St, [
333
+ t(y) || t(s).type === t(D).enum.STATIC ? (f(), C(G, { key: 0 }, [
324
334
  c(R, {
325
335
  label: "Save Segment",
326
336
  onClick: x,
327
337
  loading: t(w).isLoading,
328
- disabled: t(l).length > 0 || t(w).isLoading
338
+ disabled: t(n).length > 0 || t(w).isLoading
329
339
  }, null, 8, ["loading", "disabled"]),
330
340
  c(R, {
331
341
  label: "Cancel",
@@ -335,8 +345,8 @@ const We = Re.extend({
335
345
  ], 64)) : (f(), C(G, { key: 1 }, [
336
346
  c(R, {
337
347
  label: "Review Segment",
338
- disabled: t(l).length > 0 || t(w).isLoading,
339
- onClick: p
348
+ disabled: t(n).length > 0 || t(w).isLoading,
349
+ onClick: u
340
350
  }, null, 8, ["disabled"]),
341
351
  c(R, {
342
352
  label: "Cancel",
@@ -349,49 +359,49 @@ const We = Re.extend({
349
359
  default: A(() => {
350
360
  var o;
351
361
  return [
352
- t(g) ? (f(), J(it, {
362
+ t(y) ? (f(), J(it, {
353
363
  key: 1,
354
- title: t(n).name,
355
- segment: t(n)
364
+ title: t(s).name,
365
+ segment: t(s)
356
366
  }, null, 8, ["title", "segment"])) : (f(), C("div", ft, [
357
367
  c(Ye, {
358
- modelValue: t(n).name,
359
- "onUpdate:modelValue": i[1] || (i[1] = (d) => t(n).name = d),
368
+ modelValue: t(s).name,
369
+ "onUpdate:modelValue": i[1] || (i[1] = (d) => t(s).name = d),
360
370
  label: "Segment title",
361
371
  schema: t(Ne).typeAtPath(t(F), "name")
362
372
  }, null, 8, ["modelValue", "schema"]),
363
- s("div", gt, [
364
- i[10] || (i[10] = s("div", { class: "fm-typo-en-title-sm-800" }, "Segment Type", -1)),
373
+ l("div", yt, [
374
+ i[10] || (i[10] = l("div", { class: "fm-typo-en-title-sm-800" }, "Segment Type", -1)),
365
375
  c(pt, {
366
- "model-value": t(n).type,
376
+ "model-value": t(s).type,
367
377
  "onUpdate:modelValue": i[2] || (i[2] = (d) => {
368
- T(d);
378
+ I(d);
369
379
  })
370
380
  }, null, 8, ["model-value"])
371
381
  ]),
372
- t(n).type === t(D).enum.DYNAMIC ? (f(), C("div", yt, [
373
- i[11] || (i[11] = s("div", { class: "fm-typo-en-title-sm-800" }, "Segment Filter", -1)),
382
+ t(s).type === t(D).enum.DYNAMIC ? (f(), C("div", gt, [
383
+ i[11] || (i[11] = l("div", { class: "fm-typo-en-title-sm-800" }, "Segment Filter", -1)),
374
384
  c(Le, {
375
385
  "trigger-type": "MEMBERSHIP_JOINED",
376
386
  includeOnly: "user",
377
- "model-value": (o = t(n)) == null ? void 0 : o.rule,
387
+ "model-value": (o = t(s)) == null ? void 0 : o.rule,
378
388
  "onUpdate:modelValue": i[3] || (i[3] = (d) => {
379
- t(n).rule = d;
389
+ t(s).rule = d;
380
390
  })
381
391
  }, null, 8, ["model-value"])
382
392
  ])) : (f(), C("div", vt, [
383
393
  c(tt, {
384
- importFile: t(n).importFile,
394
+ importFile: t(s).importFile,
385
395
  "onUpdate:file": i[4] || (i[4] = (d) => {
386
- t(n).file = d;
396
+ t(s).file = d;
387
397
  })
388
398
  }, null, 8, ["importFile"])
389
399
  ])),
390
- t(n).type === t(D).enum.DYNAMIC ? (f(), C("div", _t, [
391
- i[12] || (i[12] = s("div", { class: "fm-typo-en-title-sm-800" }, "Segment Status", -1)),
400
+ t(s).type === t(D).enum.DYNAMIC ? (f(), C("div", _t, [
401
+ i[12] || (i[12] = l("div", { class: "fm-typo-en-title-sm-800" }, "Segment Status", -1)),
392
402
  c(z, {
393
- "model-value": t(n).isActive ?? !0,
394
- "onUpdate:modelValue": i[5] || (i[5] = (d) => t(n).isActive = d),
403
+ "model-value": t(s).isActive ?? !0,
404
+ "onUpdate:modelValue": i[5] || (i[5] = (d) => t(s).isActive = d),
395
405
  label: "Active",
396
406
  sublabel: "When enabled, this will recalculate the segment statistics daily.",
397
407
  "label-placement": "right"
@@ -402,16 +412,16 @@ const We = Re.extend({
402
412
  }),
403
413
  _: 2
404
414
  }, [
405
- t(g) ? {
415
+ t(y) ? {
406
416
  name: "side-sheet-header",
407
417
  fn: A(() => [
408
- s("div", mt, [
418
+ l("div", mt, [
409
419
  c(R, {
410
420
  icon: "arrow_back",
411
421
  variant: "tertiary",
412
- onClick: i[0] || (i[0] = (o) => g.value = !1)
422
+ onClick: i[0] || (i[0] = (o) => y.value = !1)
413
423
  }),
414
- i[9] || (i[9] = s("div", null, "Review segment", -1))
424
+ i[9] || (i[9] = l("div", null, "Review segment", -1))
415
425
  ])
416
426
  ]),
417
427
  key: "0"
@@ -426,34 +436,34 @@ function ne(e) {
426
436
  }
427
437
  const Ft = {
428
438
  mapMemberExportRow: (e) => {
429
- var l, r, b, p, S, x, T, E, y, i, R, z, a, o, d, P, M, V, B, O, j, q, te, k, Q, re, ce, de;
430
- const v = ie(() => wt.locations.map((I) => ({
431
- label: I.name,
432
- value: I._id
433
- }))), _ = (l = $e.parseOneAddress(
439
+ var n, r, b, u, S, x, I, E, g, i, R, z, a, o, d, P, T, B, V, O, j, q, te, k, Q, re, ce, de;
440
+ const v = ie(() => wt.locations.map((M) => ({
441
+ label: M.name,
442
+ value: M._id
443
+ }))), _ = (n = $e.parseOneAddress(
434
444
  e == null ? void 0 : e.email
435
- )) != null && l.domain.includes("feedmepos.com") ? void 0 : e.email, w = (b = ((r = e == null ? void 0 : e.collection) == null ? void 0 : r.TITLE) || []) == null ? void 0 : b.reduce(
436
- (I, L) => {
445
+ )) != null && n.domain.includes("feedmepos.com") ? void 0 : e.email, w = (b = ((r = e == null ? void 0 : e.collection) == null ? void 0 : r.TITLE) || []) == null ? void 0 : b.reduce(
446
+ (M, L) => {
437
447
  var Z, K;
438
448
  const W = (K = (Z = ve.sortedTitles) == null ? void 0 : Z.find(
439
449
  (oe) => oe._id === L.collectible
440
450
  )) == null ? void 0 : K.name;
441
- return !W || L.balance <= 0 || I.push(W), I;
451
+ return !W || L.balance <= 0 || M.push(W), M;
442
452
  },
443
453
  []
444
- ), u = (ve.sortedTitles || []).reduce(
445
- (I, L) => {
454
+ ), p = (ve.sortedTitles || []).reduce(
455
+ (M, L) => {
446
456
  var Z, K, oe, ue;
447
457
  const W = (ue = (oe = (K = (((Z = e == null ? void 0 : e.collection) == null ? void 0 : Z.TITLE) || []).find(
448
458
  (be) => be.collectible === L._id
449
459
  )) == null ? void 0 : K.expiryBalance) == null ? void 0 : oe[0]) == null ? void 0 : ue.expiredAt;
450
- return I[L.name] = W ? H(W).format("DD/MM/YYYY") : "", I;
460
+ return M[L.name] = W ? H(W).format("DD/MM/YYYY") : "", M;
451
461
  },
452
462
  {}
453
- ), g = ((x = (S = (p = e.collection) == null ? void 0 : p.CREDIT) == null ? void 0 : S.at(0)) == null ? void 0 : x.balance) || 0, m = ((i = (y = (E = (T = e.collection) == null ? void 0 : T.CREDIT) == null ? void 0 : E.at(0)) == null ? void 0 : y.expiryBalance) == null ? void 0 : i.reduce(
454
- (I, L) => I + L.amount,
463
+ ), y = ((x = (S = (u = e.collection) == null ? void 0 : u.CREDIT) == null ? void 0 : S.at(0)) == null ? void 0 : x.balance) || 0, m = ((i = (g = (E = (I = e.collection) == null ? void 0 : I.CREDIT) == null ? void 0 : E.at(0)) == null ? void 0 : g.expiryBalance) == null ? void 0 : i.reduce(
464
+ (M, L) => M + L.amount,
455
465
  0
456
- )) || 0, F = Ge(g, 2);
466
+ )) || 0, F = Ge(y, 2);
457
467
  return {
458
468
  ID: e._id.toString(),
459
469
  Name: ((R = e.name) == null ? void 0 : R.trim()) || "",
@@ -466,11 +476,11 @@ const Ft = {
466
476
  FreeCredit: Number(m.toFixed(2)),
467
477
  TotalCredit: Number(F),
468
478
  Exp: e != null && e.collection ? ((d = (o = (a = e.collection) == null ? void 0 : a.POINT) == null ? void 0 : o.at(0)) == null ? void 0 : d.balance) ?? 0 : 0,
469
- Point: e != null && e.collection ? ((V = (M = (P = e.collection) == null ? void 0 : P.COIN) == null ? void 0 : M.at(0)) == null ? void 0 : V.balance) ?? 0 : 0,
470
- Level: e != null && e.collection ? ((j = (O = (B = e.collection) == null ? void 0 : B.TIER) == null ? void 0 : O.at(0)) == null ? void 0 : j.balance) ?? 0 : 0,
479
+ Point: e != null && e.collection ? ((B = (T = (P = e.collection) == null ? void 0 : P.COIN) == null ? void 0 : T.at(0)) == null ? void 0 : B.balance) ?? 0 : 0,
480
+ Level: e != null && e.collection ? ((j = (O = (V = e.collection) == null ? void 0 : V.TIER) == null ? void 0 : O.at(0)) == null ? void 0 : j.balance) ?? 0 : 0,
471
481
  Tier: e != null && e.collection ? ((k = (te = (q = e.collection) == null ? void 0 : q.TIER) == null ? void 0 : te.at(0)) == null ? void 0 : k.balance) ?? 0 : 0,
472
482
  Titles: w.join(","),
473
- ...u,
483
+ ...p,
474
484
  TotalTransaction: e.stats.visitCount,
475
485
  AvgSpent: Je(Number(e.stats.avgBillSize || 0)).toFormat(
476
486
  !1
@@ -481,16 +491,16 @@ const Ft = {
481
491
  LastSeasonTierEarned: ((re = e.stats) == null ? void 0 : re.lastSeasonTierEarned) || 0,
482
492
  LastSeasonPointEarned: ((ce = e.stats) == null ? void 0 : ce.lastSeasonPointEarned) || 0,
483
493
  JoinedAt: ne(e.joinAt || void 0),
484
- JoinedAtLocation: e.location && ((de = v.value.find((I) => I.value == e.location)) == null ? void 0 : de.label) || "-",
494
+ JoinedAtLocation: e.location && ((de = v.value.find((M) => M.value == e.location)) == null ? void 0 : de.label) || "-",
485
495
  VisitFrequency: `${Number(
486
496
  Math.ceil(e.stats.avgVisitFrequency).toFixed(0)
487
497
  )}`
488
498
  };
489
499
  }
490
- }, ht = { class: "flex items-center" }, bt = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, Ct = { class: "px-24 flex flex-col gap-y-16" }, kt = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, It = { class: "fm-typo-en-body-md-600" }, Mt = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, io = /* @__PURE__ */ ee({
500
+ }, ht = { class: "flex items-center" }, bt = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, Ct = { class: "px-24 flex flex-col gap-y-16" }, kt = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, Mt = { class: "fm-typo-en-body-md-600" }, Tt = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, io = /* @__PURE__ */ ee({
491
501
  __name: "Segment",
492
502
  setup(e) {
493
- const { minor: v } = Ee, { t: _ } = Fe(), w = he(), { mapMemberExportRow: u } = Ft, g = Ae(), m = Qe(), F = U(0), n = [
503
+ const { minor: v } = Ee, { t: _ } = Fe(), w = he(), { mapMemberExportRow: p } = Ft, y = Ae(), m = Qe(), F = U(0), s = [
494
504
  {
495
505
  header: _("connect.loyalty.segment.table.name"),
496
506
  accessorFn: (a) => a.name
@@ -541,7 +551,7 @@ const Ft = {
541
551
  X.FmMenuItem,
542
552
  {
543
553
  onClick: async (o) => {
544
- o.stopPropagation(), T(a.row.original);
554
+ o.stopPropagation(), I(a.row.original);
545
555
  }
546
556
  },
547
557
  {
@@ -577,21 +587,21 @@ const Ft = {
577
587
  ]);
578
588
  }
579
589
  }
580
- ], l = U(null), { tableMeta: r, rowData: b, debouncedFetchData: p } = xe(
590
+ ], n = U(null), { tableMeta: r, rowData: b, debouncedFetchData: u } = xe(
581
591
  N.readAll
582
592
  );
583
593
  async function S() {
584
594
  await v(
585
595
  async () => {
586
- await N.refreshSegments(), await p({ pageSize: 10, pageIndex: 0 });
596
+ await N.refreshSegments(), await u({ pageSize: 10, pageIndex: 0 });
587
597
  },
588
598
  { message: "Refreshing segmentations" }
589
599
  );
590
600
  }
591
601
  async function x(a) {
592
- await Te.remove(`Are you sure you want to remove ${a.name}?`) && await v(
602
+ await Ie.remove(`Are you sure you want to remove ${a.name}?`) && await v(
593
603
  async () => {
594
- await N.delete(a._id), await p({ pageSize: 10, pageIndex: 0 });
604
+ await N.delete(a._id), await u({ pageSize: 10, pageIndex: 0 });
595
605
  },
596
606
  {
597
607
  message: `Removing ${a.name}`,
@@ -599,34 +609,34 @@ const Ft = {
599
609
  }
600
610
  );
601
611
  }
602
- async function T(a) {
612
+ async function I(a) {
603
613
  const o = {
604
614
  sortBy: "_id",
605
615
  descending: !1,
606
616
  rowsPerPage: 1e3,
607
617
  page: 1,
608
618
  rowsNumber: 0
609
- }, d = new Pe(), P = (await ge.read({
619
+ }, d = new Pe(), P = (await ye.read({
610
620
  limit: 1,
611
621
  skip: 0,
612
622
  sortBy: o.sortBy,
613
623
  descending: o.descending
614
- })).meta.totalResources ?? 0, M = o.rowsPerPage;
624
+ })).meta.totalResources ?? 0, T = o.rowsPerPage;
615
625
  await v(
616
626
  async () => {
617
- for (let V = 0; V < P; V += M) {
618
- const B = {
627
+ for (let B = 0; B < P; B += T) {
628
+ const V = {
619
629
  ...o,
620
- limit: M,
630
+ limit: T,
621
631
  skip: o.page - 1,
622
632
  sortBy: o.sortBy,
623
633
  descending: o.descending
624
634
  }, O = await N.paginateSegmentUsers(
625
635
  a._id,
626
- B
636
+ V
627
637
  );
628
638
  for (const j of O.resources) {
629
- const q = u(j);
639
+ const q = p(j);
630
640
  d.addRecord(q);
631
641
  }
632
642
  o.page++;
@@ -654,29 +664,29 @@ const Ft = {
654
664
  if (a.type === D.enum.STATIC) {
655
665
  const d = new FormData();
656
666
  if (d.append("file", a.file), a._id) {
657
- const { members: P, _id: M, file: V, ...B } = a;
658
- d.append("segment", JSON.stringify(B)), await N.updateStatic(a._id, d);
667
+ const { members: P, _id: T, file: B, ...V } = a;
668
+ d.append("segment", JSON.stringify(V)), await N.updateStatic(a._id, d);
659
669
  } else {
660
- const { file: P, ...M } = a;
661
- d.append("segment", JSON.stringify(M)), await N.createStatic(d);
670
+ const { file: P, ...T } = a;
671
+ d.append("segment", JSON.stringify(T)), await N.createStatic(d);
662
672
  }
663
- a.file && g.open({
673
+ a.file && y.open({
664
674
  type: "info",
665
675
  title: "Import begins soon. Check Queue for updates.",
666
676
  action: "View",
667
677
  onAction: async () => {
668
678
  await m.push({
669
- name: ye["$connect-QUEUE"],
679
+ name: ge["$connect-QUEUE"],
670
680
  query: { type: [pe.enum.SEGMENTATION_IMPORTED] }
671
681
  });
672
682
  }
673
683
  });
674
684
  } else if (a._id) {
675
- const { members: d, _id: P, ...M } = a;
676
- await N.update(a._id, M);
685
+ const { members: d, _id: P, ...T } = a;
686
+ await N.update(a._id, T);
677
687
  } else
678
688
  await N.create(a);
679
- await p({ pageSize: 10, pageIndex: 0 }), (o = l.value) == null || o.hideSheet();
689
+ await u({ pageSize: 10, pageIndex: 0 }), (o = n.value) == null || o.hideSheet();
680
690
  },
681
691
  {
682
692
  message: "Saving segment",
@@ -684,9 +694,9 @@ const Ft = {
684
694
  }
685
695
  );
686
696
  }
687
- function y(a) {
697
+ function g(a) {
688
698
  var o;
689
- (o = l.value) == null || o.showSheet(a);
699
+ (o = n.value) == null || o.showSheet(a);
690
700
  }
691
701
  const i = {
692
702
  label: _("connect.navigation.queue"),
@@ -710,30 +720,30 @@ const Ft = {
710
720
  function z(a) {
711
721
  switch (a) {
712
722
  case "add":
713
- y();
723
+ g();
714
724
  break;
715
725
  case "refresh":
716
726
  S();
717
727
  break;
718
728
  case "queue":
719
729
  m.push({
720
- name: ye["$connect-QUEUE"],
730
+ name: ge["$connect-QUEUE"],
721
731
  query: { type: [pe.enum.SEGMENTATION_IMPORTED] }
722
732
  });
723
733
  break;
724
734
  }
725
735
  }
726
- return Ie(async () => {
727
- const { meta: a } = await ge.read({
736
+ return Me(async () => {
737
+ const { meta: a } = await ye.read({
728
738
  limit: 1,
729
739
  skip: 0,
730
740
  sortBy: "_id",
731
741
  search: void 0,
732
742
  descending: !1
733
743
  });
734
- F.value = a.totalResources ?? 0, await p({ pageSize: 10, pageIndex: 0 }), await w.readPremium(), await w.readLocations();
744
+ F.value = a.totalResources ?? 0, await u({ pageSize: 10, pageIndex: 0 }), await w.readPremium(), await w.readLocations();
735
745
  }), (a, o) => {
736
- const d = h("FmPill"), P = h("FmPageHead"), M = h("FmIcon"), V = h("FmMenuItem"), B = h("FmMenu"), O = h("FmListItem"), j = h("FmList"), q = h("FmButton"), te = h("FmCard");
746
+ const d = h("FmPill"), P = h("FmPageHead"), T = h("FmIcon"), B = h("FmMenuItem"), V = h("FmMenu"), O = h("FmListItem"), j = h("FmList"), q = h("FmButton"), te = h("FmCard");
737
747
  return f(), C(G, null, [
738
748
  c(P, {
739
749
  title: "Segments",
@@ -741,50 +751,50 @@ const Ft = {
741
751
  "onClick:action": o[0] || (o[0] = (k) => z(k))
742
752
  }, {
743
753
  title: A(() => [
744
- s("div", ht, [
745
- s("span", bt, $(t(_)("connect.loyalty.segment.title")), 1),
754
+ l("div", ht, [
755
+ l("span", bt, $(t(_)("connect.loyalty.segment.title")), 1),
746
756
  c(d, { variant: "premium" })
747
757
  ])
748
758
  ]),
749
759
  _: 1
750
760
  }, 8, ["actions"]),
751
- s("div", Ct, [
761
+ l("div", Ct, [
752
762
  t(b).length > 0 || t(r).searchValue || t(r).isLoading ? (f(), C(G, { key: 0 }, [
753
763
  c(we, {
754
764
  loading: t(r).isLoading,
755
765
  "row-data": t(b),
756
766
  "row-count": t(r).totalRows,
757
- "column-defs": n,
767
+ "column-defs": s,
758
768
  "shrink-at": !1,
759
769
  "page-count": t(r).pageCount,
760
770
  "page-index": t(r).pageIndex,
761
771
  "page-size": t(r).pageSize,
762
772
  onRowClick: o[1] || (o[1] = (k) => {
763
- y(k.original);
773
+ g(k.original);
764
774
  }),
765
- onPageChange: t(p)
775
+ onPageChange: t(u)
766
776
  }, null, 8, ["loading", "row-data", "row-count", "page-count", "page-index", "page-size", "onPageChange"]),
767
777
  c(j, { class: "w-full hidden xs:block" }, {
768
778
  default: A(() => [
769
779
  (f(!0), C(G, null, Se(t(b), (k) => (f(), J(O, {
770
780
  key: k._id.toString(),
771
781
  tag: "label",
772
- onClick: (Q) => y(k)
782
+ onClick: (Q) => g(k)
773
783
  }, {
774
784
  default: A(() => [
775
- s("div", null, [
776
- s("div", kt, $((k.memberCount ?? 0).toLocaleString()) + " total customers ", 1),
777
- s("div", It, $(k.name), 1),
778
- s("div", Mt, $(((k.memberCount ?? 0) * 100 / t(F)).toFixed(2)) + "% of customers ", 1)
785
+ l("div", null, [
786
+ l("div", kt, $((k.memberCount ?? 0).toLocaleString()) + " total customers ", 1),
787
+ l("div", Mt, $(k.name), 1),
788
+ l("div", Tt, $(((k.memberCount ?? 0) * 100 / t(F)).toFixed(2)) + "% of customers ", 1)
779
789
  ])
780
790
  ]),
781
791
  append: A(() => [
782
- c(B, { "stop-click-propagation": !0 }, {
792
+ c(V, { "stop-click-propagation": !0 }, {
783
793
  "menu-button": A(() => [
784
- c(M, { name: "more_vert" })
794
+ c(T, { name: "more_vert" })
785
795
  ]),
786
796
  default: A(() => [
787
- c(V, {
797
+ c(B, {
788
798
  class: "text-fm-color-typo-error fm-typo-en-body-md-400",
789
799
  label: "Remove",
790
800
  "onUpdate:modelValue": (Q) => Q && x(k)
@@ -804,27 +814,27 @@ const Ft = {
804
814
  class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
805
815
  }, {
806
816
  default: A(() => [
807
- o[3] || (o[3] = s("img", {
808
- src: Me,
817
+ o[3] || (o[3] = l("img", {
818
+ src: Te,
809
819
  class: "aspect-square w-[150px]"
810
820
  }, null, -1)),
811
- o[4] || (o[4] = s("div", { class: "flex flex-col gap-16 text-center" }, [
812
- s("div", { class: "fm-typo-en-title-sm-800" }, "Create customer segments"),
813
- s("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Segments allow you to categorize your customers based on various criteria, enabling targeted marketing and personalized experiences. ")
821
+ o[4] || (o[4] = l("div", { class: "flex flex-col gap-16 text-center" }, [
822
+ l("div", { class: "fm-typo-en-title-sm-800" }, "Create customer segments"),
823
+ l("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Segments allow you to categorize your customers based on various criteria, enabling targeted marketing and personalized experiences. ")
814
824
  ], -1)),
815
825
  c(q, {
816
826
  variant: "primary",
817
827
  label: "Create segment",
818
828
  disabled: !t(w).isPremium,
819
829
  icon: "add",
820
- onClick: o[2] || (o[2] = (k) => y())
830
+ onClick: o[2] || (o[2] = (k) => g())
821
831
  }, null, 8, ["disabled"])
822
832
  ]),
823
833
  _: 1
824
834
  })),
825
835
  c(xt, {
826
836
  ref_key: "sheetRef",
827
- ref: l,
837
+ ref: n,
828
838
  "onUpdate:modelValue": E
829
839
  }, null, 512)
830
840
  ])