@feedmepos/mf-connect 0.1.98-beta.40 → 0.1.98-beta.41

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 (151) hide show
  1. package/dist/App-C6JJ9uQ8.js +4785 -0
  2. package/dist/AuditLogs-CAlgtDgx.js +2014 -0
  3. package/dist/Bin-D8jwhwER.js +166 -0
  4. package/dist/Broadcast-CP8DRfkT.js +269 -0
  5. package/dist/CampaignAnalytic-MVjYBFvu.js +1826 -0
  6. package/dist/CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DeLURz87.js +122 -0
  7. package/dist/Card-QribXJwZ.js +911 -0
  8. package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +97 -0
  9. package/dist/Collections-X9xbt43V.js +541 -0
  10. package/dist/Credit-QmbsW1eb.js +286 -0
  11. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +128 -0
  12. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +58 -0
  13. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-ClNieHSo.js +3382 -0
  14. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-CrGHTNhg.js +351 -0
  15. package/dist/Experience-CPGMg847.js +285 -0
  16. package/dist/FileSaver.min-CK67LsPG.js +74 -0
  17. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
  18. package/dist/FmTableSelection.vue_vue_type_script_setup_true_lang-DzcUc0_w.js +52 -0
  19. package/dist/Game-BrkiEFCS.js +356 -0
  20. package/dist/GiftCardSetup-DXNBHF1A.js +542 -0
  21. package/dist/Grab-BgtDzK1B.js +301 -0
  22. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-Dzv2AkKN.js +145 -0
  23. package/dist/Index-KJgzalOd.js +259 -0
  24. package/dist/JsonViewer-v8_C7l5N.js +87 -0
  25. package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-C6SBLJGQ.js +48 -0
  26. package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-Dj74lJ7b.js +18737 -0
  27. package/dist/LoyaltyDashboard-B2JpbC01.js +1345 -0
  28. package/dist/MainLayout-DlfTKHQ-.js +143 -0
  29. package/dist/Marketing-Crx_JQpi.js +236 -0
  30. package/dist/MarketingMaterialEdit-BfsdcMXJ.js +1036 -0
  31. package/dist/Member-C50Nrsko.js +281 -0
  32. package/dist/MemberList-C9uUKw1o.js +1603 -0
  33. package/dist/MemberOverview-wL_ailso.js +58 -0
  34. package/dist/MemberTransactions-DZ7zPOHX.js +45 -0
  35. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-Du_ZGsbX.js +60957 -0
  36. package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-Bg_0YlwG.js +38 -0
  37. package/dist/Mission-D_km8zi6.js +360 -0
  38. package/dist/Overview-BBieK6qQ.js +1080 -0
  39. package/dist/Overview-B_kmLOcc.js +1316 -0
  40. package/dist/Point-D0q9N7f9.js +288 -0
  41. package/dist/Promotion-DoFTy-NK.js +423 -0
  42. package/dist/Queue-Dh5sDRHW.js +261 -0
  43. package/dist/Record-0owEBKqN.js +342 -0
  44. package/dist/Review-DV2fnpOH.js +45 -0
  45. package/dist/ReviewFacebookCallback-D8mnAPzR.js +238 -0
  46. package/dist/ReviewGoogleCallback-CLzt_ox2.js +213 -0
  47. package/dist/Reward-Co20Xrss.js +442 -0
  48. package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-0qU49c47.js +150 -0
  49. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-qdvaXPhJ.js +1913 -0
  50. package/dist/Segment-7dQKeHWK.js +1017 -0
  51. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-BUVrUifO.js +181 -0
  52. package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-DDsV9TD9.js +189 -0
  53. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-DqPZpddc.js +226 -0
  54. package/dist/Setting-Bvahxs-y.js +2047 -0
  55. package/dist/SettingAdvertisements-fbXLRwfb.js +264 -0
  56. package/dist/Settings-C_HWDFN8.js +179 -0
  57. package/dist/Store-8yBKDR1b.js +2413 -0
  58. package/dist/StoreRewards-DKaJvoJs.js +540 -0
  59. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-D23XzJD7.js +1075 -0
  60. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-JaFhCK_L.js +7007 -0
  61. package/dist/Tier-CD-CjXC3.js +972 -0
  62. package/dist/Title-C_lcgye8.js +569 -0
  63. package/dist/Transaction-BvUYm-rT.js +39 -0
  64. package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-C3Yacz7K.js +130 -0
  65. package/dist/Voucher-CYaG0GLU.js +444 -0
  66. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DF2JqzRe.js +421 -0
  67. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-B4UPqSNc.js +56 -0
  68. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  69. package/dist/app-CE5hQ4Uq.js +60740 -0
  70. package/dist/app-wDQR6dpb.js +39 -0
  71. package/dist/app.js +7 -0
  72. package/dist/business-CE_4siXc.js +82 -0
  73. package/dist/campaign-BP6rvSpg.js +255 -0
  74. package/dist/campaign-CXQtKpeb.js +100 -0
  75. package/dist/campaign-CpzFl8Vr.js +4 -0
  76. package/dist/campaign.enum-Dx-Zo68Q.js +26 -0
  77. package/dist/campaign.fn-DKnBpE1N.js +776 -0
  78. package/dist/collectible.enum-Liy2wH3s.js +19 -0
  79. package/dist/collection.fn-Cg16QZSp.js +26 -0
  80. package/dist/duplicateCampaign-DbtVAGsT.js +51 -0
  81. package/dist/effect-CLI8NI4O.js +89 -0
  82. package/dist/email-addresses-DlLiZ1io.js +705 -0
  83. package/dist/export-6Hr34dBU.js +97 -0
  84. package/dist/feedme.ico +0 -0
  85. package/dist/google-C3S8u0mT.js +4 -0
  86. package/dist/helper-vkjFqj70.js +86 -0
  87. package/dist/index-BIyKgw4m.js +72 -0
  88. package/dist/index-BLQJ-rv3.js +31 -0
  89. package/dist/index-BbTIqReL.js +67 -0
  90. package/dist/index-BuMfQxMf.js +897 -0
  91. package/dist/index-C8cXXcLk.js +45 -0
  92. package/dist/index-CSVhIZSY.js +8919 -0
  93. package/dist/index-CVHacTbc.js +151 -0
  94. package/dist/index-C_H8jFYf.js +2743 -0
  95. package/dist/index-CmNsGhDf.js +2706 -0
  96. package/dist/index-CnTeeRyJ.js +53 -0
  97. package/dist/index-CuvNtC_M.js +61 -0
  98. package/dist/index-CzbNobLv.js +1139 -0
  99. package/dist/index-D06n1h1b.js +146 -0
  100. package/dist/index-D4SDAfbP.js +27550 -0
  101. package/dist/index-DVnYQ3Hs.js +85 -0
  102. package/dist/index-DcjnS5Sv.js +28900 -0
  103. package/dist/index-Dx9h0FNH.js +3 -0
  104. package/dist/index-YgP4ihQL.js +32 -0
  105. package/dist/index-kedErkLZ.js +2963 -0
  106. package/dist/index-lnQT4P3d.js +55 -0
  107. package/dist/index-vh86FiIQ.js +10 -0
  108. package/dist/index.esm2017-Jhv2lkrq.js +3069 -0
  109. package/dist/loading-NY-FPxVY.js +72 -0
  110. package/dist/lodash-BC_P6kLg.js +3678 -0
  111. package/dist/membership-BWaK-9FY.js +255 -0
  112. package/dist/moment-D7p2TMB-.js +2583 -0
  113. package/dist/money-COoh4GXK.js +15 -0
  114. package/dist/number-BX5OEXgq.js +12 -0
  115. package/dist/object-BYyQ0PZp.js +18 -0
  116. package/dist/objectId-dwaoBfJX.js +7 -0
  117. package/dist/objectid-1SUSRtmY.js +145 -0
  118. package/dist/plugins-ur-FAoye.js +1788 -0
  119. package/dist/remy-Qz_pNsUS.js +13 -0
  120. package/dist/reward-DSsylZ22.js +36 -0
  121. package/dist/rule-BM9GUd1C.js +1969 -0
  122. package/dist/rule-builder-gC9LH2AC.js +126 -0
  123. package/dist/string-Gcy5IM_H.js +32 -0
  124. package/dist/style.css +4 -0
  125. package/dist/template-CUV3AMFI.js +188 -0
  126. package/dist/tier-BJDhpH6X.js +4 -0
  127. package/dist/tiers/tier=1.png +0 -0
  128. package/dist/tiers/tier=2.png +0 -0
  129. package/dist/tiers/tier=3.png +0 -0
  130. package/dist/tiers/tier=4.png +0 -0
  131. package/dist/timezone-BFZhekOU.js +20 -0
  132. package/dist/titles/type=diamond.png +0 -0
  133. package/dist/titles/type=drinks.png +0 -0
  134. package/dist/titles/type=food.png +0 -0
  135. package/dist/titles/type=heart.png +0 -0
  136. package/dist/titles/type=medal.png +0 -0
  137. package/dist/titles/type=spend.png +0 -0
  138. package/dist/titles/type=thank-you.png +0 -0
  139. package/dist/titles/type=thumbs-up.png +0 -0
  140. package/dist/titles/type=years.png +0 -0
  141. package/dist/transaction.fn-C5MlkEIC.js +64 -0
  142. package/dist/trigger-CbjiuoSo.js +213 -0
  143. package/dist/tslib.es6-BCqqvLQ_.js +44 -0
  144. package/dist/type_drinks-D6jnpvwV.js +4 -0
  145. package/dist/useMarketingMaterialActions-BLisTieA.js +96 -0
  146. package/dist/usePagination-Caah4sJr.js +220 -0
  147. package/dist/user-BZC4P_jL.js +55 -0
  148. package/dist/vue-i18n-BYz7XAr_.js +2365 -0
  149. package/dist/xlsx-Bn7BqUFA.js +15491 -0
  150. package/dist/zod-DHH42rXG.js +91 -0
  151. package/package.json +1 -1
@@ -0,0 +1,143 @@
1
+ import { defineComponent as u, openBlock as a, createElementBlock as p, createVNode as r, unref as e, ref as b, computed as y, watch as V, resolveComponent as i, createElementVNode as o, toDisplayString as w, createTextVNode as j, createCommentVNode as m, normalizeClass as z, createBlock as x, withDirectives as N, vShow as R } from "vue";
2
+ import { _ as E, S as P } from "./LottieAnimation.vue_vue_type_script_setup_true_lang-Dj74lJ7b.js";
3
+ import { u as $ } from "./vue-i18n-BYz7XAr_.js";
4
+ import { useCoreStore as D } from "@feedmepos/mf-common";
5
+ import { A as G, a as v } from "./app-CE5hQ4Uq.js";
6
+ import { u as H } from "./remy-Qz_pNsUS.js";
7
+ import { u as k } from "./app-wDQR6dpb.js";
8
+ import { useRoute as L } from "vue-router";
9
+ const T = { class: "bg-white w-full flex min-h-[calc(100svh-56px)] items-center" }, O = /* @__PURE__ */ u({
10
+ __name: "Splash",
11
+ setup(_) {
12
+ return (t, n) => (a(), p("div", T, [
13
+ r(E, {
14
+ class: "flex-1",
15
+ json: e(P),
16
+ width: 100,
17
+ height: 100
18
+ }, null, 8, ["json"])
19
+ ]));
20
+ }
21
+ }), S = "feedme_connect_marketing_promo_bar_hidden";
22
+ function U() {
23
+ try {
24
+ return sessionStorage.getItem(S) !== null;
25
+ } catch {
26
+ return !1;
27
+ }
28
+ }
29
+ function Y() {
30
+ try {
31
+ sessionStorage.setItem(S, (/* @__PURE__ */ new Date()).toISOString());
32
+ } catch {
33
+ }
34
+ }
35
+ const q = {
36
+ key: 0,
37
+ class: "sticky top-0 z-20 flex w-full items-center gap-12 border-b border-fm-color-neutral-gray-100 bg-fm-color-system-warning-100 px-24 py-8 xs:px-12"
38
+ }, J = { class: "flex min-w-0 flex-1 flex-wrap items-center gap-8" }, K = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary" }, Q = { class: "fm-typo-en-body-md-600" }, W = { class: "flex shrink-0 items-center gap-8" }, X = ["aria-label"], Z = /* @__PURE__ */ u({
39
+ __name: "AiMarketingPromoBar",
40
+ setup(_) {
41
+ const { t } = $(), n = H(), { sessionUser: f, currentCountry: d } = D(), s = b(!1), B = y(() => {
42
+ var l;
43
+ const c = ((l = f.value) == null ? void 0 : l.permissions) ?? [];
44
+ return G(
45
+ [
46
+ {
47
+ action: v.Action.manage,
48
+ subject: v.Subject.Business.crm_marketingMaterial
49
+ }
50
+ ],
51
+ c
52
+ ).granted;
53
+ }), C = y(
54
+ () => d.value === "MY" && B.value
55
+ );
56
+ let h = !1;
57
+ V(
58
+ C,
59
+ (c) => {
60
+ h || !c || (h = !0, !U() && (s.value = !0));
61
+ },
62
+ { immediate: !0 }
63
+ );
64
+ function M() {
65
+ n.activate({
66
+ command: "generateMarketingMaterial",
67
+ fullscreen: !0,
68
+ forceNewConversation: !0
69
+ });
70
+ }
71
+ function A() {
72
+ Y(), s.value = !1;
73
+ }
74
+ return (c, l) => {
75
+ const g = i("FmIcon"), F = i("FmChip"), I = i("FmButton");
76
+ return s.value ? (a(), p("div", q, [
77
+ o("div", J, [
78
+ r(g, {
79
+ name: "stars",
80
+ size: "sm",
81
+ color: "primary"
82
+ }),
83
+ o("span", K, [
84
+ o("span", Q, w(e(t)("connect.marketing.promoBar.new")), 1),
85
+ j(" " + w(e(t)("connect.marketing.promoBar.message")), 1)
86
+ ]),
87
+ r(F, {
88
+ label: e(t)("connect.marketing.promoBar.credits"),
89
+ variant: "info",
90
+ compact: ""
91
+ }, null, 8, ["label"])
92
+ ]),
93
+ o("div", W, [
94
+ r(I, {
95
+ class: "px-16 py-2 rounded-xl",
96
+ variant: "primary",
97
+ size: "sm",
98
+ label: e(t)("connect.marketing.promoBar.cta"),
99
+ "append-icon": "arrow_forward",
100
+ onClick: M
101
+ }, null, 8, ["label"]),
102
+ o("button", {
103
+ type: "button",
104
+ class: "flex h-32 w-32 items-center justify-center",
105
+ "aria-label": e(t)("connect.marketing.promoBar.close"),
106
+ onClick: A
107
+ }, [
108
+ r(g, {
109
+ name: "close",
110
+ size: "sm",
111
+ color: "neutral-gray-400"
112
+ })
113
+ ], 8, X)
114
+ ])
115
+ ])) : m("", !0);
116
+ };
117
+ }
118
+ }), ie = /* @__PURE__ */ u({
119
+ __name: "MainLayout",
120
+ setup(_) {
121
+ const t = L(), n = b(t.query.showHeader !== "false");
122
+ return (f, d) => {
123
+ const s = i("RouterView");
124
+ return a(), p("div", {
125
+ class: z([
126
+ "bg-fm-color-neutral-white w-full xs:overflow-y-scroll",
127
+ e(n) ? "min-h-[calc(100svh-56px)] xs:h-[calc(100svh-56px)]" : "min-h-screen"
128
+ ])
129
+ }, [
130
+ e(k)().isGlobalLoading == !0 ? (a(), x(O, { key: 0 })) : m("", !0),
131
+ N(o("div", null, [
132
+ e(n) ? (a(), x(Z, { key: 0 })) : m("", !0),
133
+ r(s)
134
+ ], 512), [
135
+ [R, e(k)().isGlobalLoading == !1]
136
+ ])
137
+ ], 2);
138
+ };
139
+ }
140
+ });
141
+ export {
142
+ ie as default
143
+ };
@@ -0,0 +1,236 @@
1
+ import { defineComponent as b, resolveComponent as v, openBlock as s, createBlock as N, unref as c, ref as f, watch as R, createElementBlock as d, createVNode as i, withCtx as S, createElementVNode as n, toDisplayString as w, withModifiers as T, createStaticVNode as U, computed as L, onMounted as P, nextTick as H, onUnmounted as V, Fragment as I, renderList as B, createCommentVNode as j } from "vue";
2
+ import { _ as D } from "./campaign-CpzFl8Vr.js";
3
+ import { u as M } from "./vue-i18n-BYz7XAr_.js";
4
+ import { u as G, m as q } from "./useMarketingMaterialActions-BLisTieA.js";
5
+ import { u as O } from "./remy-Qz_pNsUS.js";
6
+ import { useRouter as z } from "vue-router";
7
+ import "./index-Dx9h0FNH.js";
8
+ import { R as K } from "./app-CE5hQ4Uq.js";
9
+ const Z = /* @__PURE__ */ b({
10
+ __name: "GenerateMaterialButton",
11
+ setup(l) {
12
+ const { t: r } = M(), u = O();
13
+ function a() {
14
+ u.activate({
15
+ command: "generateMarketingMaterial",
16
+ fullscreen: !0,
17
+ forceNewConversation: !0
18
+ });
19
+ }
20
+ return (t, e) => {
21
+ const m = v("FmButton");
22
+ return s(), N(m, {
23
+ label: c(r)("connect.marketing.emptyState.action"),
24
+ "prepend-icon": "wand_stars",
25
+ onClick: a
26
+ }, null, 8, ["label"]);
27
+ };
28
+ }
29
+ }), J = /* @__PURE__ */ b({
30
+ __name: "MarketingMaterialItemActionButton",
31
+ props: {
32
+ material: {}
33
+ },
34
+ emits: ["update:menuOpened"],
35
+ setup(l, { emit: r }) {
36
+ const u = l, a = r, { t } = M(), e = f(!1);
37
+ R(e, (x) => {
38
+ a("update:menuOpened", x);
39
+ });
40
+ const { shareMaterial: m, downloadMaterialImage: _, copyMaterialLink: p } = G();
41
+ async function C() {
42
+ e.value = !1, await m(u.material);
43
+ }
44
+ async function A() {
45
+ e.value = !1, await _(u.material.imageUrl);
46
+ }
47
+ async function h() {
48
+ e.value = !1, await p(u.material.imageUrl);
49
+ }
50
+ return (x, o) => {
51
+ const k = v("FmButton"), y = v("FmMenuItem"), F = v("FmMenu");
52
+ return s(), d("div", null, [
53
+ i(F, {
54
+ placement: "right-start",
55
+ shift: !0,
56
+ "model-value": e.value,
57
+ onMenuChanged: o[0] || (o[0] = (g) => e.value = g)
58
+ }, {
59
+ "menu-button": S(() => [
60
+ i(k, {
61
+ icon: "more_vert",
62
+ variant: "tertiary",
63
+ size: "md"
64
+ })
65
+ ]),
66
+ default: S(() => [
67
+ i(y, {
68
+ icon: "share",
69
+ label: c(t)("connect.marketing.actions.share"),
70
+ onClick: C
71
+ }, null, 8, ["label"]),
72
+ i(y, {
73
+ icon: "download",
74
+ label: c(t)("connect.marketing.actions.download"),
75
+ onClick: A
76
+ }, null, 8, ["label"]),
77
+ i(y, {
78
+ icon: "content_copy",
79
+ label: c(t)("connect.marketing.actions.copyLink"),
80
+ onClick: h
81
+ }, null, 8, ["label"])
82
+ ]),
83
+ _: 1
84
+ }, 8, ["model-value"])
85
+ ]);
86
+ };
87
+ }
88
+ }), Q = { class: "h-[205.5px] w-full overflow-hidden bg-fm-color-neutral-gray-100" }, W = ["src", "alt"], X = { class: "p-3" }, Y = { class: "flex items-start justify-between gap-2" }, ee = { class: "space-y-1 overflow-hidden" }, te = { class: "font-semibold text-sm text-gray-900 truncate" }, ne = { class: "text-xs text-gray-500 line-clamp-2" }, ae = {
89
+ key: 1,
90
+ class: "rounded-lg overflow-hidden border border-transparent fm-shadow-light-100 animate-pulse bg-white"
91
+ }, $ = /* @__PURE__ */ b({
92
+ __name: "MarketingMaterialItem",
93
+ props: {
94
+ material: {}
95
+ },
96
+ setup(l) {
97
+ const { t: r } = M(), u = z(), a = f(!1);
98
+ return (t, e) => l.material ? (s(), d("div", {
99
+ key: 0,
100
+ class: "group rounded-lg overflow-hidden cursor-pointer border border-transparent hover:border-blue-500 hover:bg-blue-50 transition-[border-color,background-color] fm-shadow-light-100 hover:fm-shadow-light-300",
101
+ onClick: e[2] || (e[2] = () => {
102
+ a.value || c(u).push({
103
+ name: c(K)["$connect-MARKETING_MATERIAL_EDIT"],
104
+ query: { id: l.material._id }
105
+ });
106
+ })
107
+ }, [
108
+ n("div", Q, [
109
+ n("img", {
110
+ src: l.material.imageUrl,
111
+ alt: c(r)("connect.marketing.title"),
112
+ class: "w-full h-full object-cover"
113
+ }, null, 8, W)
114
+ ]),
115
+ n("div", X, [
116
+ n("div", Y, [
117
+ n("div", ee, [
118
+ n("p", te, w(l.material.headline), 1),
119
+ n("p", ne, w(l.material.caption), 1)
120
+ ]),
121
+ i(J, {
122
+ material: l.material,
123
+ "onUpdate:menuOpened": e[0] || (e[0] = (m) => a.value = m),
124
+ onClick: e[1] || (e[1] = T(() => {
125
+ }, ["stop"]))
126
+ }, null, 8, ["material"])
127
+ ])
128
+ ])
129
+ ])) : (s(), d("div", ae, [...e[3] || (e[3] = [
130
+ U('<div class="h-[205.5px] w-full bg-fm-color-neutral-gray-100"></div><div class="p-3 space-y-2"><div class="h-[16px] w-3/4 rounded bg-fm-color-neutral-gray-100"></div><div class="h-12 w-full rounded bg-fm-color-neutral-gray-100"></div><div class="h-12 w-2/3 rounded bg-fm-color-neutral-gray-100"></div></div>', 2)
131
+ ])]));
132
+ }
133
+ }), oe = {
134
+ key: 0,
135
+ class: "px-24 xs:px-12 flex flex-col gap-y-16 py-24 xs:py-16"
136
+ }, le = { class: "fm-typo-en-title-sm-800 text-center" }, re = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary w-4/6 xs:w-full text-center" }, se = {
137
+ key: 1,
138
+ class: "px-24 xs:px-12 flex flex-col gap-y-24 xs:gap-y-16 pt-24 xs:pt-16"
139
+ }, ie = { class: "grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-16" }, E = 20, _e = /* @__PURE__ */ b({
140
+ __name: "Marketing",
141
+ setup(l) {
142
+ const { t: r } = M(), u = O(), a = f([]), t = f(!0), e = f(!0), m = f(null), _ = f(null);
143
+ let p = null;
144
+ const C = L(() => ({
145
+ label: r("connect.marketing.emptyState.action"),
146
+ value: "generate",
147
+ isPrimary: !0,
148
+ prependIcon: "wand_stars"
149
+ }));
150
+ function A(o) {
151
+ o === "generate" && u.activate({
152
+ command: "generateMarketingMaterial",
153
+ fullscreen: !0,
154
+ forceNewConversation: !0
155
+ });
156
+ }
157
+ async function h() {
158
+ const o = await q.listMarketingMaterials(
159
+ m.value,
160
+ E
161
+ );
162
+ a.value.push(...o.resources), m.value = o.meta.nextCursor, e.value = !!o.meta.nextCursor;
163
+ }
164
+ function x() {
165
+ p = new IntersectionObserver(
166
+ async ([o]) => {
167
+ if (!(!o.isIntersecting || !e.value || t.value)) {
168
+ t.value = !0;
169
+ try {
170
+ await h();
171
+ } catch {
172
+ } finally {
173
+ t.value = !1;
174
+ }
175
+ }
176
+ },
177
+ { rootMargin: "200px" }
178
+ ), _.value && p.observe(_.value);
179
+ }
180
+ return P(async () => {
181
+ try {
182
+ await h();
183
+ } catch {
184
+ } finally {
185
+ t.value = !1, await H(), x();
186
+ }
187
+ }), V(() => {
188
+ p == null || p.disconnect();
189
+ }), (o, k) => {
190
+ const y = v("FmPageHead"), F = v("FmCard");
191
+ return s(), d(I, null, [
192
+ i(y, {
193
+ title: c(r)("connect.marketing.title"),
194
+ actions: a.value.length > 0 ? [C.value] : [],
195
+ "onClick:action": A
196
+ }, null, 8, ["title", "actions"]),
197
+ !t.value && a.value.length === 0 ? (s(), d("div", oe, [
198
+ i(F, {
199
+ variant: "outlined",
200
+ class: "w-full justify-center items-center flex flex-col p-[24px] xs:p-16 gap-[24px] xs:gap-16"
201
+ }, {
202
+ default: S(() => [
203
+ k[0] || (k[0] = n("img", {
204
+ src: D,
205
+ class: "w-[150px]"
206
+ }, null, -1)),
207
+ n("p", le, w(c(r)("connect.marketing.emptyState.title")), 1),
208
+ n("p", re, w(c(r)("connect.marketing.emptyState.description")), 1),
209
+ i(Z)
210
+ ]),
211
+ _: 1
212
+ })
213
+ ])) : (s(), d("div", se, [
214
+ n("div", ie, [
215
+ (s(!0), d(I, null, B(a.value, (g) => (s(), N($, {
216
+ key: g._id,
217
+ material: g
218
+ }, null, 8, ["material"]))), 128)),
219
+ t.value ? (s(), d(I, { key: 0 }, B(E, (g) => i($, {
220
+ key: `skeleton-${g}`,
221
+ material: null
222
+ })), 64)) : j("", !0)
223
+ ]),
224
+ n("div", {
225
+ ref_key: "sentinel",
226
+ ref: _,
227
+ class: "h-1"
228
+ }, null, 512)
229
+ ]))
230
+ ], 64);
231
+ };
232
+ }
233
+ });
234
+ export {
235
+ _e as default
236
+ };