@feedmepos/mf-connect 0.1.115-dev → 0.1.115-prod

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/README.md +1 -66
  2. package/dist/{App-43mZfFAr.js → App-CvtSY8ZO.js} +618 -652
  3. package/dist/{Bin-CA7v180Y.js → Bin-B3gS9QVZ.js} +8 -8
  4. package/dist/{Broadcast-qmdifF2Y.js → Broadcast-DAeb-HaN.js} +21 -22
  5. package/dist/{CampaignAnalytic-xnrDxqaH.js → CampaignAnalytic-BfTaHVem.js} +7 -7
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-zjk-QdtX.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-zsei4OfG.js} +9 -9
  7. package/dist/{Card-D8icsk7L.js → Card-JFeVIwFs.js} +24 -25
  8. package/dist/{Collections--THcD-E_.js → Collections-xcDpEhIm.js} +185 -197
  9. package/dist/{Credit-JrbtVMBp.js → Credit-C9HJZjDS.js} +20 -21
  10. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-DrwKtnE5.js → DateRangeChip.vue_vue_type_script_setup_true_lang-DSqVY91w.js} +1 -1
  11. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-D_jXVE2I.js +3494 -0
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-hVgqWdD0.js → EffectSheet.vue_vue_type_style_index_0_lang-C3J0rCTt.js} +32 -32
  13. package/dist/{Experience-CFeRqBoj.js → Experience-DszS8gto.js} +31 -32
  14. package/dist/{FileSaver.min-CCXIBm58.js → FileSaver.min-CFVQKaC-.js} +1 -1
  15. package/dist/{Game-CPxq6Ex3.js → Game-DhgeN7E2.js} +18 -19
  16. package/dist/{GiftCardSetup-D0esVZDp.js → GiftCardSetup-CWm6IhrS.js} +75 -75
  17. package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-CJ1-vL-K.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-BuKADvmK.js} +7 -7
  18. package/dist/{Goals-DaKI6uXt.js → Goals-DtRVierH.js} +4 -4
  19. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BOnL0GxM.js → ImageInput.vue_vue_type_script_setup_true_lang-DlEFyu6h.js} +1 -1
  20. package/dist/{Index-2kENoaZm.js → Index-DFRcu_qE.js} +10 -10
  21. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-BtWnJKU_.js → LocationPicker.vue_vue_type_script_setup_true_lang-B3Br4Xvi.js} +1 -1
  22. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CX_Sspu5.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CjNJj3qj.js} +1 -1
  23. package/dist/{LoyaltyDashboard-CB93Fz8u.js → LoyaltyDashboard-BWHKDPzk.js} +15 -15
  24. package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-Du8fw5v_.js → MainLayout-BmpNNAiE.js} +4 -5
  25. package/dist/Marketing-BKK45Eve.js +236 -0
  26. package/dist/{remy-icon-BhUGu2NI.js → MarketingMaterialEdit-x3c_N7Gs.js} +1031 -2
  27. package/dist/{Member-B--nYyr0.js → Member-xEzrBW_p.js} +7 -7
  28. package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-BBlzO7Db.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-DRoC-I0t.js} +50 -43
  29. package/dist/{MemberImportHistory-D52Y4RTC.js → MemberImportHistory-CEQpBBF8.js} +7 -7
  30. package/dist/{MemberList-13Owa1fj.js → MemberList-CCvzkHv8.js} +105 -103
  31. package/dist/{MemberTransactions-CpXEWNbq.js → MemberTransactions-Bmh39J2W.js} +1 -1
  32. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DlELjFM0.js → MessageInput.vue_vue_type_script_setup_true_lang-D3Pmk80l.js} +14 -14
  33. package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-C_y0rM8c.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DIBKAwHP.js} +1 -1
  34. package/dist/{Mission-Ci-UzXSu.js → Mission-CpUo2Bgw.js} +21 -22
  35. package/dist/{Overview-CKxSfAGF.js → Overview-CwQqQ1Tn.js} +144 -145
  36. package/dist/{Overview-CXen9Ram.js → Overview-DcDZmDXA.js} +22 -23
  37. package/dist/{Point-CR3YOaag.js → Point-CUNQsQIx.js} +21 -22
  38. package/dist/{Promotion-tw3J4ul-.js → Promotion-Cqdim7aW.js} +131 -137
  39. package/dist/{Queue-BZGA5ZXt.js → Queue-CNBVh1UG.js} +45 -46
  40. package/dist/{Record-BTevVXnT.js → Record-BYwz4l4o.js} +9 -9
  41. package/dist/{Review-BU7c8ZF0.js → Review-CqLcZFj8.js} +2 -2
  42. package/dist/ReviewFacebookCallback-DbSCILNN.js +238 -0
  43. package/dist/{ReviewGoogleCallback-xpdPHSdg.js → ReviewGoogleCallback-Dg8R7QlO.js} +5 -5
  44. package/dist/{Reward-jlA_7cxz.js → Reward-M8GZ8eHq.js} +29 -29
  45. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-D3z_n42G.js → RewardGroup.vue_vue_type_script_setup_true_lang-BkM9-Sx-.js} +15 -16
  46. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CnaL93TF.js +1883 -0
  47. package/dist/{Segment-C1Bwm--Q.js → Segment-CrMi6xrp.js} +305 -304
  48. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-B6apgWTM.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DKH5_9db.js} +30 -31
  49. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-B7m2F9UV.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CyeAQ-hg.js} +4 -4
  50. package/dist/Setting-BnFRI0Se.js +2037 -0
  51. package/dist/{SettingAdvertisements-4XEAJzlL.js → SettingAdvertisements-Dh7v4c1D.js} +12 -12
  52. package/dist/Settings-BvT8_tkQ.js +179 -0
  53. package/dist/{Store-C56dXtc4.js → Store-CV-BmK5b.js} +30 -31
  54. package/dist/{StoreRewards-DQ1Q6WS6.js → StoreRewards-DPhSLvSZ.js} +15 -15
  55. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CDu1QySl.js +1264 -0
  56. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-Dqz6jTlH.js +142 -0
  57. package/dist/{Tier-D4CPZqw7.js → Tier-ChvYps23.js} +687 -2576
  58. package/dist/{Title-DCbwhUic.js → Title-v-Ivswr1.js} +92 -94
  59. package/dist/{Transaction-C5LrasXr.js → Transaction-CRqE1Ix0.js} +2 -2
  60. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-Cl9b4mrK.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-B0Uh9iuj.js} +26 -26
  61. package/dist/{Voucher-rrVbNZKR.js → Voucher-Bg8FOuzD.js} +19 -19
  62. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BIq227nz.js → VoucherEditor.vue_vue_type_script_setup_true_lang-HKxivQMF.js} +16 -16
  63. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-C39_95SZ.js → ZodTextField.vue_vue_type_script_setup_true_lang-8d290Dcp.js} +2 -2
  64. package/dist/{app-CgimGODl.js → app-DdNKsn2Q.js} +7107 -8874
  65. package/dist/app.js +3 -4
  66. package/dist/{base.export-D2P6HFvo.js → base.export-R97FrSQL.js} +2 -2
  67. package/dist/{business-Bu5TqSA0.js → business-Ce8vq3wQ.js} +1 -1
  68. package/dist/{campaign-zJxttSIk.js → campaign-BTllt2LH.js} +25 -31
  69. package/dist/{campaign-BFIXSgdJ.js → campaign-C19If7bW.js} +94 -121
  70. package/dist/{campaign.enum-Dx-Zo68Q.js → campaign.enum-9CCbalR4.js} +2 -3
  71. package/dist/{campaign.fn-gvjlcEfe.js → campaign.fn-B4g03h0A.js} +78 -78
  72. package/dist/{collectible.enum-Liy2wH3s.js → collectible.enum-MvqF7mSg.js} +1 -1
  73. package/dist/{collection.fn-DOm0HsSh.js → collection.fn-CR0bD33S.js} +2 -2
  74. package/dist/{currency-BpbQvbm8.js → currency-DmlguGIM.js} +1 -1
  75. package/dist/{effect-D-GtNB3n.js → effect-Dx3zfl28.js} +1 -1
  76. package/dist/{email-addresses-BKMoAtMi.js → email-addresses-De5PGOY4.js} +2 -2
  77. package/dist/{feature-flag-BJ_eyKsq.js → feature-flag-CD9V1V0h.js} +74 -74
  78. package/dist/google-C3S8u0mT.js +4 -0
  79. package/dist/{helper-CkfjBgMM.js → helper-CEiv7SaO.js} +1 -1
  80. package/dist/{index-zTvr2GR4.js → index-649OZ_e1.js} +2 -2
  81. package/dist/{index-feCrYhi6.js → index-B8meeQoD.js} +1 -1
  82. package/dist/{index-CIej31pF.js → index-B8yWVB8P.js} +3 -4
  83. package/dist/{index-BKsxIwbi.js → index-BAXKd9Gg.js} +198 -198
  84. package/dist/{index-BAtUrtqM.js → index-BDPnyro2.js} +6 -19
  85. package/dist/{index-DUAZOMVJ.js → index-BR9h5DTI.js} +1 -1
  86. package/dist/{index-DwU3fsLW.js → index-BVdYxi3l.js} +15 -29
  87. package/dist/{index-D0JK99Ko.js → index-BW6eb3n6.js} +252 -611
  88. package/dist/{index-LygS9WsG.js → index-BYI9ttxy.js} +10767 -8028
  89. package/dist/{index-BdEXUNoG.js → index-BquSqx6K.js} +4 -4
  90. package/dist/{index-BpTIulTX.js → index-CBJy9bxB.js} +1 -1
  91. package/dist/{index-B6kU3PkV.js → index-CPODug8b.js} +2613 -2700
  92. package/dist/{index-CfQuYqXn.js → index-CWUrODxL.js} +1 -1
  93. package/dist/{index-DKxN1mMS.js → index-CqOCJTeR.js} +232 -390
  94. package/dist/{index-CuREApMc.js → index-D4d3l0gw.js} +7 -8
  95. package/dist/{index-Bhl5IRXy.js → index-DT3S00_Y.js} +10 -11
  96. package/dist/{index-DqGs6RJG.js → index-IZRfmmde.js} +581 -683
  97. package/dist/{index-CQ8XFbBk.js → index-__UT3_Ey.js} +2 -2
  98. package/dist/{index-CCEXSPxk.js → index-xct3mnu8.js} +7 -7
  99. package/dist/{index.esm2017-DZi9IQPS.js → index.esm2017-AVbZ9btd.js} +177 -177
  100. package/dist/{loading-Brid2wnu.js → loading-BvHm1m3K.js} +1 -1
  101. package/dist/{lodash-C1epw3Kv.js → lodash-Dvrceo7x.js} +1 -1
  102. package/dist/{member-import-DAIxTIiu.js → member-import-c9avpiSS.js} +5 -6
  103. package/dist/{membership-BZmljFhF.js → membership-D-pZS634.js} +3 -3
  104. package/dist/{money-cLcyGcSZ.js → money-D4skwMkD.js} +1 -1
  105. package/dist/{number-C2jPLJr2.js → number-DJ6ncfT6.js} +1 -1
  106. package/dist/objectid-DEMM_jdR.js +145 -0
  107. package/dist/{onboarding-oRfy_g05.js → onboarding-t7R1d3h-.js} +25 -25
  108. package/dist/{onboardingSetup-BLD6m8HY.js → onboardingSetup-lTaJc0oT.js} +2 -2
  109. package/dist/{plugins-CUsr9vB0.js → plugins-DQNOWwRC.js} +3 -3
  110. package/dist/{reward-UOT03odb.js → reward-BK150pjm.js} +1 -1
  111. package/dist/{rule-BgJnPjkI.js → rule-COcdAnUu.js} +492 -572
  112. package/dist/rule-builder-Deufb6h_.js +102 -0
  113. package/dist/style.css +1 -1
  114. package/dist/template-DeebIqJ_.js +236 -0
  115. package/dist/{timezone-BXA4wq7Y.js → timezone-BP6UC4KL.js} +1 -1
  116. package/dist/{transaction.fn-CQ4fpRt3.js → transaction.fn-BY0hzon0.js} +2 -2
  117. package/dist/{trigger-DXJCGT0q.js → trigger-DVBjVPbN.js} +8 -8
  118. package/dist/useMarketingMaterialActions-DpQCQHFI.js +96 -0
  119. package/dist/{usePagination-Pp4okWr8.js → usePagination-QT552XyF.js} +1 -1
  120. package/dist/{user-B3gXcAIy.js → user-CmAxNc7T.js} +1 -1
  121. package/dist/vue-i18n-Cze706-f.js +2365 -0
  122. package/dist/{xlsx-CCaDUTgW.js → xlsx-DAczoc8y.js} +224 -224
  123. package/dist/{zod-CPwjOxvW.js → zod-Aj-GuVQL.js} +1 -1
  124. package/package.json +2 -6
  125. package/dist/AuditLogs-BPpdm96t.js +0 -2016
  126. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DgdAlHU7.js +0 -4442
  127. package/dist/Grab-BWzdN_cd.js +0 -301
  128. package/dist/MainLayout-DwnjGXh6.js +0 -4
  129. package/dist/Marketing-DCco__2F.js +0 -273
  130. package/dist/MarketingMaterialEdit-BbgFtrYP.js +0 -1037
  131. package/dist/ReviewFacebookCallback-BnMF6Arh.js +0 -225
  132. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CsHxqH9h.js +0 -1923
  133. package/dist/Setting-CDM4RhLW.js +0 -574
  134. package/dist/Settings-D-0tvZRr.js +0 -286
  135. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-LLD91Rz6.js +0 -1319
  136. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-Bvy4NJMd.js +0 -7007
  137. package/dist/WhatsappAccount-oJDo5zTr.js +0 -159
  138. package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-aCQCYFYq.js +0 -39
  139. package/dist/WhatsappBot-Cl64wG_F.js +0 -876
  140. package/dist/WhatsappBotLogs-D3uT4EiB.js +0 -372
  141. package/dist/WhatsappBotSettings-Cs1lLxh-.js +0 -705
  142. package/dist/WhatsappLayout-C639d2HP.js +0 -21
  143. package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DpPxWp2x.js +0 -253
  144. package/dist/browser-BSAOEeIM.js +0 -1478
  145. package/dist/duplicateCampaign-CvsvjRE9.js +0 -51
  146. package/dist/feature-flag-Bo-k5sIG.js +0 -50
  147. package/dist/google-BQK68wbe.js +0 -5
  148. package/dist/index-C-iwb2Ln.js +0 -109
  149. package/dist/index-C_H8jFYf.js +0 -2743
  150. package/dist/index-DQ8JJhxs.js +0 -74
  151. package/dist/objectid-C-wocWKI.js +0 -145
  152. package/dist/template-BZyFhr73.js +0 -188
  153. package/dist/useMarketingMaterialActions-B-Wib5ga.js +0 -125
  154. package/dist/vue-i18n-DWGiC_vs.js +0 -2365
@@ -1,1037 +0,0 @@
1
- import { defineComponent as C, resolveComponent as b, openBlock as s, createBlock as T, withCtx as j, createElementVNode as e, createVNode as c, createElementBlock as u, unref as t, ref as M, watch as V, Fragment as B, createCommentVNode as $, withModifiers as N, Teleport as J, Transition as Q, toDisplayString as f, renderList as L, createTextVNode as q, computed as E, normalizeClass as D, onMounted as X, isRef as Y, resolveDynamicComponent as ee } from "vue";
2
- import { _ as O } from "./lodash-C1epw3Kv.js";
3
- import "./index-feCrYhi6.js";
4
- import { useRoute as G, useRouter as te } from "vue-router";
5
- import { u as I } from "./vue-i18n-DWGiC_vs.js";
6
- import { u as K, m as H } from "./useMarketingMaterialActions-B-Wib5ga.js";
7
- import { useClientEvent as Z } from "@feedmepos/mf-remy-panel";
8
- import { _ as oe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
- import { _ as ne } from "./remy-icon-BhUGu2NI.js";
10
- import { useSnackbar as ae, useDialog as se } from "@feedmepos/ui-library";
11
- import { u as le } from "./remy-Qz_pNsUS.js";
12
- import { useCoreStore as R } from "@feedmepos/mf-common";
13
- import { u as ie } from "./loading-Brid2wnu.js";
14
- import { R as A } from "./app-CgimGODl.js";
15
- const S = /* @__PURE__ */ C({
16
- __name: "ActionToolbarButton",
17
- props: {
18
- icon: {},
19
- tooltip: {}
20
- },
21
- emits: ["click"],
22
- setup(l, { emit: m }) {
23
- const d = m;
24
- return (p, i) => {
25
- const r = b("FmIcon"), o = b("FmTooltip");
26
- return s(), T(o, {
27
- content: l.tooltip,
28
- placement: "bottom",
29
- "z-index": 60,
30
- variant: "rich"
31
- }, {
32
- default: j(() => [
33
- e("button", {
34
- class: "p-2 rounded-lg bg-white/10 hover:bg-white/20 transition-colors text-white flex items-center justify-center",
35
- onClick: i[0] || (i[0] = (n) => d("click"))
36
- }, [
37
- c(r, {
38
- name: l.icon,
39
- size: "md"
40
- }, null, 8, ["name"])
41
- ])
42
- ]),
43
- _: 1
44
- }, 8, ["content"]);
45
- };
46
- }
47
- }), re = { class: "flex gap-8" }, ce = /* @__PURE__ */ C({
48
- __name: "ActionToolbar",
49
- props: {
50
- imageUrl: {}
51
- },
52
- emits: ["edit", "close"],
53
- setup(l, { emit: m }) {
54
- const d = l, p = m, { t: i } = I();
55
- async function r() {
56
- if (d.imageUrl)
57
- try {
58
- const n = await (await fetch(d.imageUrl)).blob(), v = URL.createObjectURL(n), _ = document.createElement("a");
59
- _.href = v, _.download = "marketing-material", _.click(), URL.revokeObjectURL(v);
60
- } catch {
61
- window.open(d.imageUrl, "_blank");
62
- }
63
- }
64
- return (o, n) => (s(), u("div", re, [
65
- c(S, {
66
- icon: "edit",
67
- tooltip: t(i)("connect.common.edit"),
68
- onClick: n[0] || (n[0] = (v) => p("edit"))
69
- }, null, 8, ["tooltip"]),
70
- c(S, {
71
- icon: "download",
72
- tooltip: t(i)("connect.marketing.actions.download"),
73
- onClick: r
74
- }, null, 8, ["tooltip"]),
75
- c(S, {
76
- icon: "close",
77
- tooltip: t(i)("connect.marketing.actions.close"),
78
- onClick: n[1] || (n[1] = (v) => p("close"))
79
- }, null, 8, ["tooltip"])
80
- ]));
81
- }
82
- }), me = ["src", "alt"], de = {
83
- key: 1,
84
- class: "absolute inset-0 flex items-center justify-center bg-black/40"
85
- }, ue = { class: "relative" }, pe = ["src", "alt"], ge = /* @__PURE__ */ C({
86
- __name: "Thumbnail",
87
- props: {
88
- imageUrl: {}
89
- },
90
- emits: ["edit", "update:imageUrl"],
91
- setup(l, { emit: m }) {
92
- const d = l, p = m, { t: i } = I(), r = G(), o = M(!1), n = M(d.imageUrl);
93
- V(
94
- () => d.imageUrl,
95
- (y) => {
96
- n.value = y;
97
- }
98
- );
99
- const v = M(!1);
100
- function _() {
101
- o.value = !1, p("edit", n.value);
102
- }
103
- Z(
104
- "apply-edited-banner",
105
- async ({ imageUrl: y }) => {
106
- r.query.id && (n.value = y, p("update:imageUrl", y));
107
- }
108
- );
109
- const { downloadMaterialImage: k, copyMaterialLink: h } = K();
110
- async function F() {
111
- n.value && await k(n.value);
112
- }
113
- function U() {
114
- n.value && window.open(n.value, "_blank");
115
- }
116
- async function w() {
117
- n.value && await h(n.value);
118
- }
119
- return (y, a) => {
120
- const g = b("FmButton"), x = b("FmMenuItem"), P = b("FmMenu");
121
- return s(), u(B, null, [
122
- e("div", {
123
- class: "relative group cursor-pointer rounded-xl overflow-hidden fm-shadow-light-200 w-[150px] h-[150px] bg-white",
124
- onClick: a[1] || (a[1] = (z) => o.value = !0)
125
- }, [
126
- t(n) ? (s(), u("img", {
127
- key: 0,
128
- src: t(n),
129
- alt: t(i)("connect.marketing.materialEdit.generatedMaterial"),
130
- class: "w-full h-full object-contain"
131
- }, null, 8, me)) : $("", !0),
132
- e("div", {
133
- class: "absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity",
134
- onClick: a[0] || (a[0] = N(() => {
135
- }, ["stop"]))
136
- }, [
137
- c(P, { placement: "right-start" }, {
138
- "menu-button": j(() => [
139
- c(g, {
140
- icon: "more_horiz",
141
- variant: "tertiary",
142
- class: "bg-white hover:bg-gray-100 text-black shadow-sm"
143
- })
144
- ]),
145
- default: j(() => [
146
- c(x, {
147
- icon: "open_in_new",
148
- label: t(i)("connect.marketing.actions.openInNewTab"),
149
- onClick: U
150
- }, null, 8, ["label"]),
151
- c(x, {
152
- icon: "download",
153
- label: t(i)("connect.marketing.actions.download"),
154
- onClick: F
155
- }, null, 8, ["label"]),
156
- c(x, {
157
- icon: "content_copy",
158
- label: t(i)("connect.marketing.actions.copyLink"),
159
- onClick: w
160
- }, null, 8, ["label"]),
161
- c(x, {
162
- icon: "edit",
163
- label: t(i)("connect.marketing.actions.regenerateImage"),
164
- onClick: _
165
- }, null, 8, ["label"])
166
- ]),
167
- _: 1
168
- })
169
- ]),
170
- t(v) ? (s(), u("div", de, [...a[4] || (a[4] = [
171
- e("div", { class: "w-10 h-10 rounded-full border-4 border-white/30 border-t-white animate-spin" }, null, -1)
172
- ])])) : $("", !0)
173
- ]),
174
- (s(), T(J, { to: "body" }, [
175
- c(Q, { name: "fade" }, {
176
- default: j(() => [
177
- t(o) ? (s(), u("div", {
178
- key: 0,
179
- class: "fixed inset-0 z-50 bg-black/80 flex items-center justify-center",
180
- onClick: a[3] || (a[3] = N((z) => o.value = !1, ["self"]))
181
- }, [
182
- e("div", ue, [
183
- c(ce, {
184
- class: "absolute top-0 right-0 z-10 -translate-y-full p-4",
185
- "image-url": t(n),
186
- onEdit: _,
187
- onClose: a[2] || (a[2] = (z) => o.value = !1)
188
- }, null, 8, ["image-url"]),
189
- t(n) ? (s(), u("img", {
190
- key: 0,
191
- src: t(n),
192
- alt: t(i)("connect.marketing.materialEdit.preview"),
193
- class: "max-h-[80vh] max-w-[90vw] object-contain rounded-xl"
194
- }, null, 8, pe)) : $("", !0)
195
- ])
196
- ])) : $("", !0)
197
- ]),
198
- _: 1
199
- })
200
- ]))
201
- ], 64);
202
- };
203
- }
204
- }), fe = /* @__PURE__ */ oe(ge, [["__scopeId", "data-v-6b1bb096"]]), ve = { class: "flex shrink-0" }, W = /* @__PURE__ */ C({
205
- __name: "TextActionWidget",
206
- props: {
207
- text: {}
208
- },
209
- emits: ["editWithRemy"],
210
- setup(l, { emit: m }) {
211
- const d = m, { t: p } = I(), i = ae();
212
- async function r(o) {
213
- if (o)
214
- try {
215
- await navigator.clipboard.writeText(o), i.open({ message: p("connect.marketing.actions.copied"), type: "success" });
216
- } catch {
217
- i.open({ message: p("connect.marketing.actions.failedToCopy"), type: "error" });
218
- }
219
- }
220
- return (o, n) => {
221
- const v = b("FmIcon"), _ = b("FmTooltip");
222
- return s(), u("div", ve, [
223
- c(_, {
224
- content: t(p)("connect.marketing.actions.copy"),
225
- placement: "top",
226
- "hide-arrow": !1
227
- }, {
228
- default: j(() => [
229
- e("button", {
230
- class: "p-8 rounded-full hover:bg-fm-color-neutral-gray-100 transition-all opacity-0 group-hover:opacity-100 focus:opacity-100 flex items-center justify-center",
231
- onClick: n[0] || (n[0] = (k) => r(l.text))
232
- }, [
233
- c(v, {
234
- name: "content_copy",
235
- size: "sm",
236
- color: "neutral-gray-400"
237
- })
238
- ])
239
- ]),
240
- _: 1
241
- }, 8, ["content"]),
242
- c(_, {
243
- content: t(p)("connect.marketing.actions.remyAi"),
244
- placement: "top",
245
- "hide-arrow": !1
246
- }, {
247
- default: j(() => [
248
- e("button", {
249
- class: "p-8 rounded-full hover:bg-fm-color-neutral-gray-100 transition-colors flex items-center justify-center",
250
- onClick: n[1] || (n[1] = (k) => d("editWithRemy"))
251
- }, [...n[2] || (n[2] = [
252
- e("img", {
253
- src: ne,
254
- class: "w-16 h-16 opacity-60"
255
- }, null, -1)
256
- ])])
257
- ]),
258
- _: 1
259
- }, 8, ["content"])
260
- ]);
261
- };
262
- }
263
- }), _e = { class: "border-t lg:border-t-0 lg:border-l border-fm-color-neutral-gray-100 p-24 xs:p-16" }, he = { class: "mb-24 align-middle font-['Inter'] text-[22px] font-semibold leading-[24px] tracking-[-0.015em] text-fm-color-typo-primary [leading-trim:none]" }, ye = { class: "flex flex-col gap-24" }, be = { class: "flex flex-col gap-12" }, xe = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary uppercase tracking-wide" }, ke = { class: "flex flex-col gap-8 group" }, we = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary uppercase tracking-wide" }, $e = { class: "relative [&_input]:!pr-[70px]" }, Me = { class: "absolute right-[8px] top-1/2 -translate-y-1/2 z-10" }, Ce = { class: "flex flex-col gap-8 group" }, Fe = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary uppercase tracking-wide" }, Ue = { class: "relative [&_textarea]:!pr-[70px]" }, ze = { class: "absolute right-[8px] top-[16px] z-10" }, Ie = /* @__PURE__ */ C({
264
- __name: "MarketingMaterialContentDetails",
265
- props: {
266
- marketingMaterial: {}
267
- },
268
- emits: ["update:imageUrl", "update:headline", "update:caption"],
269
- setup(l, { emit: m }) {
270
- const d = l, p = m, { t: i } = I(), r = le(), o = M(d.marketingMaterial.headline), n = M(d.marketingMaterial.caption), v = M(d.marketingMaterial.headline), _ = M(d.marketingMaterial.caption), k = M(!1), h = M(!1);
271
- V(
272
- () => d.marketingMaterial.headline,
273
- (a) => {
274
- if (k.value) {
275
- k.value = !1;
276
- return;
277
- }
278
- o.value = a, v.value = a;
279
- }
280
- ), V(
281
- () => d.marketingMaterial.caption,
282
- (a) => {
283
- if (h.value) {
284
- h.value = !1;
285
- return;
286
- }
287
- n.value = a ?? "", _.value = a;
288
- }
289
- ), Z(
290
- "apply-edited-copy",
291
- async ({ headline: a, caption: g }) => {
292
- a !== void 0 && (o.value = a, v.value = a, k.value = !0, p("update:headline", a)), g !== void 0 && (n.value = g, _.value = g, h.value = !0, p("update:caption", g));
293
- }
294
- );
295
- function F() {
296
- r.activate({
297
- command: "editMarketingBanner",
298
- prompt: "",
299
- attachments: [
300
- {
301
- value: d.marketingMaterial,
302
- key: "marketingMaterial"
303
- }
304
- ]
305
- });
306
- }
307
- function U() {
308
- r.activate({
309
- command: "editCopy",
310
- attachments: [
311
- {
312
- value: d.marketingMaterial,
313
- key: "marketingMaterial"
314
- }
315
- ]
316
- });
317
- }
318
- async function w(a) {
319
- const g = a === "headline" ? o.value : n.value, x = a === "headline" ? v.value : _.value;
320
- g !== x && (a === "headline" ? v.value = g : _.value = g);
321
- }
322
- function y(a, g) {
323
- a === "headline" ? (o.value = g, k.value = !0, p("update:headline", g)) : (n.value = g, h.value = !0, p("update:caption", g));
324
- }
325
- return (a, g) => {
326
- const x = b("FmTextField"), P = b("FmTextarea");
327
- return s(), u("section", _e, [
328
- e("h2", he, f(t(i)("connect.marketing.materialEdit.contentDetails")), 1),
329
- e("div", ye, [
330
- e("div", be, [
331
- e("p", xe, f(t(i)("connect.marketing.materialEdit.image")), 1),
332
- c(fe, {
333
- "image-url": l.marketingMaterial.imageUrl,
334
- onEdit: F,
335
- "onUpdate:imageUrl": g[0] || (g[0] = (z) => p("update:imageUrl", z))
336
- }, null, 8, ["image-url"])
337
- ]),
338
- e("div", ke, [
339
- e("p", we, f(t(i)("connect.marketing.materialEdit.headline")), 1),
340
- e("div", $e, [
341
- c(x, {
342
- "model-value": t(o),
343
- "onUpdate:modelValue": g[1] || (g[1] = (z) => y("headline", z)),
344
- onFocusChanged: g[2] || (g[2] = (z) => !z && w("headline"))
345
- }, null, 8, ["model-value"]),
346
- e("div", Me, [
347
- c(W, {
348
- text: t(o),
349
- onEditWithRemy: U
350
- }, null, 8, ["text"])
351
- ])
352
- ])
353
- ]),
354
- e("div", Ce, [
355
- e("p", Fe, f(t(i)("connect.marketing.materialEdit.caption")), 1),
356
- e("div", Ue, [
357
- c(P, {
358
- "model-value": t(n),
359
- "onUpdate:modelValue": g[3] || (g[3] = (z) => y("caption", z)),
360
- onFocusChanged: g[4] || (g[4] = (z) => !z && w("caption")),
361
- rows: "4"
362
- }, null, 8, ["model-value"]),
363
- e("div", ze, [
364
- c(W, {
365
- text: t(n),
366
- onEditWithRemy: U
367
- }, null, 8, ["text"])
368
- ])
369
- ])
370
- ])
371
- ])
372
- ]);
373
- };
374
- }
375
- }), je = { class: "flex items-center px-4" }, Ee = { class: "px-[4px] py-[6px] text-xs text-fm-color-typo-secondary" }, Te = /* @__PURE__ */ C({
376
- __name: "ActionBar",
377
- setup(l) {
378
- const m = [
379
- { icon: "thumb_up", count: "10k+" },
380
- { icon: "mode_comment", count: "128" },
381
- { icon: "share", count: "56" }
382
- ];
383
- return (d, p) => {
384
- const i = b("FmIcon");
385
- return s(), u("div", je, [
386
- (s(), u(B, null, L(m, (r) => e("button", {
387
- key: r.icon,
388
- class: "flex px-12 py-[6px] items-center justify-center text-fm-color-typo-secondary hover:bg-fm-color-neutral-gray-50 transition-colors fm-typo-en-body-sm-400"
389
- }, [
390
- c(i, {
391
- class: "px-[4px] py-[6px]",
392
- name: r.icon,
393
- size: "md",
394
- color: "neutral-gray-400",
395
- outline: ""
396
- }, null, 8, ["name"]),
397
- e("span", Ee, f(r.count), 1)
398
- ])), 64))
399
- ]);
400
- };
401
- }
402
- }), Be = { class: "max-w-[500px] mx-auto rounded-lg border border-fm-color-neutral-gray-200 fm-shadow-light-200 overflow-hidden bg-white" }, Re = { class: "flex items-center gap-12 px-16 py-12" }, Pe = { class: "w-40 h-40 rounded-full bg-fm-color-neutral-gray-200 flex items-center justify-center shrink-0 overflow-hidden" }, Ae = ["src", "alt"], Se = { class: "flex-1 min-w-0" }, Ve = { class: "fm-typo-en-body-sm-700 text-fm-color-typo-primary leading-tight font-semibold" }, Le = { class: "fm-typo-en-body-xs-400 text-fm-color-typo-secondary leading-tight text-xs flex items-center gap-4" }, Ne = {
403
- key: 0,
404
- class: "px-16 pb-12"
405
- }, De = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-primary whitespace-pre-wrap" }, Oe = { class: "w-full bg-fm-color-neutral-gray-100 overflow-hidden" }, He = ["src", "alt"], We = {
406
- key: 1,
407
- class: "aspect-square flex items-center justify-center"
408
- }, qe = { class: "px-16 py-12 bg-fm-color-neutral-gray-50 border-t border-fm-color-neutral-gray-200" }, Ge = { class: "fm-typo-en-body-sm-700 text-fm-color-typo-primary line-clamp-2" }, Ke = /* @__PURE__ */ C({
409
- __name: "FacebookPostPreview",
410
- props: {
411
- imageUrl: {},
412
- headline: {},
413
- caption: {}
414
- },
415
- setup(l) {
416
- const { t: m } = I(), { currentBusiness: d } = R();
417
- return (p, i) => {
418
- var o, n;
419
- const r = b("FmIcon");
420
- return s(), u("div", Be, [
421
- e("div", Re, [
422
- e("div", Pe, [
423
- (o = t(d)) != null && o.thumbnail ? (s(), u("img", {
424
- key: 0,
425
- src: t(d).thumbnail,
426
- class: "w-full h-full object-cover",
427
- alt: t(m)("connect.marketing.preview.businessLogo")
428
- }, null, 8, Ae)) : (s(), T(r, {
429
- key: 1,
430
- name: "storefront",
431
- size: "sm",
432
- color: "neutral-gray-400"
433
- }))
434
- ]),
435
- e("div", Se, [
436
- e("p", Ve, f(((n = t(d)) == null ? void 0 : n.name) ?? t(m)("connect.marketing.preview.yourBusiness")), 1),
437
- e("p", Le, [
438
- q(f(t(m)("connect.marketing.preview.sponsored")) + " · ", 1),
439
- c(r, {
440
- name: "public",
441
- size: "sm",
442
- color: "neutral-gray-400"
443
- })
444
- ])
445
- ]),
446
- c(r, {
447
- name: "more_horiz",
448
- size: "sm",
449
- color: "neutral-gray-400"
450
- })
451
- ]),
452
- l.caption ? (s(), u("div", Ne, [
453
- e("p", De, f(l.caption), 1)
454
- ])) : $("", !0),
455
- e("div", Oe, [
456
- l.imageUrl ? (s(), u("img", {
457
- key: 0,
458
- src: l.imageUrl,
459
- alt: t(m)("connect.marketing.preview.postImage"),
460
- class: "w-full h-auto block"
461
- }, null, 8, He)) : (s(), u("div", We, [
462
- c(r, {
463
- name: "image",
464
- size: "xl",
465
- color: "neutral-gray-300"
466
- })
467
- ]))
468
- ]),
469
- e("div", qe, [
470
- i[0] || (i[0] = e("p", { class: "fm-typo-en-body-xs-400 text-fm-color-typo-secondary uppercase tracking-wide mb-2" }, " yourbusiness.com ", -1)),
471
- e("p", Ge, f(l.headline ?? "—"), 1)
472
- ]),
473
- c(Te)
474
- ]);
475
- };
476
- }
477
- }), Ze = { class: "max-w-[300px] mx-auto rounded-2xl overflow-hidden fm-shadow-light-200 relative aspect-[9/16] bg-black" }, Je = ["src", "alt"], Qe = {
478
- key: 1,
479
- class: "absolute inset-0 flex items-center justify-center bg-fm-color-neutral-gray-800"
480
- }, Xe = { class: "absolute inset-x-0 top-0 px-12 pt-12 pb-24 bg-gradient-to-b from-black/60 to-transparent" }, Ye = { class: "flex items-center gap-8" }, et = { class: "w-32 h-32 rounded-full bg-fm-color-neutral-gray-200 shrink-0 overflow-hidden border-2 border-white" }, tt = ["src", "alt"], ot = { class: "flex-1 min-w-0" }, nt = { class: "text-white text-xs font-semibold leading-tight truncate" }, at = { class: "text-white/70 text-[10px] leading-tight" }, st = { class: "absolute inset-x-0 bottom-0 px-16 pb-24 pt-40 bg-gradient-to-t from-black/70 to-transparent" }, lt = {
481
- key: 0,
482
- class: "text-white text-xs mb-12 line-clamp-3"
483
- }, it = { class: "flex justify-center" }, rt = { class: "px-24 py-8 rounded-full bg-white text-fm-color-typo-primary text-xs font-semibold" }, ct = /* @__PURE__ */ C({
484
- __name: "FacebookStoryPreview",
485
- props: {
486
- imageUrl: {},
487
- headline: {},
488
- caption: {}
489
- },
490
- setup(l) {
491
- const { t: m } = I(), { currentBusiness: d } = R();
492
- return (p, i) => {
493
- var o, n;
494
- const r = b("FmIcon");
495
- return s(), u(B, null, [
496
- e("div", Ze, [
497
- l.imageUrl ? (s(), u("img", {
498
- key: 0,
499
- src: l.imageUrl,
500
- alt: t(m)("connect.marketing.preview.storyImage"),
501
- class: "absolute inset-0 w-full h-full object-contain"
502
- }, null, 8, Je)) : (s(), u("div", Qe, [
503
- c(r, {
504
- name: "image",
505
- size: "xl",
506
- color: "neutral-gray-500"
507
- })
508
- ])),
509
- e("div", Xe, [
510
- i[0] || (i[0] = e("div", { class: "flex gap-4 mb-10" }, [
511
- e("div", { class: "h-[2px] flex-1 rounded-full bg-white" })
512
- ], -1)),
513
- e("div", Ye, [
514
- e("div", et, [
515
- (o = t(d)) != null && o.thumbnail ? (s(), u("img", {
516
- key: 0,
517
- src: t(d).thumbnail,
518
- class: "w-full h-full object-cover",
519
- alt: t(m)("connect.marketing.preview.businessLogo")
520
- }, null, 8, tt)) : (s(), T(r, {
521
- key: 1,
522
- name: "storefront",
523
- size: "sm",
524
- color: "neutral-gray-400"
525
- }))
526
- ]),
527
- e("div", ot, [
528
- e("p", nt, f(((n = t(d)) == null ? void 0 : n.name) ?? t(m)("connect.marketing.preview.yourBusiness")), 1),
529
- e("p", at, f(t(m)("connect.marketing.preview.sponsored")), 1)
530
- ]),
531
- c(r, {
532
- name: "more_vert",
533
- size: "sm",
534
- color: "neutral-white"
535
- }),
536
- c(r, {
537
- name: "close",
538
- size: "sm",
539
- color: "neutral-white"
540
- })
541
- ])
542
- ]),
543
- e("div", st, [
544
- l.caption ? (s(), u("p", lt, f(l.caption), 1)) : $("", !0),
545
- e("div", it, [
546
- e("button", rt, f(l.headline ?? t(m)("connect.marketing.preview.learnMore")), 1)
547
- ])
548
- ])
549
- ]),
550
- i[1] || (i[1] = q(" /template> ", -1))
551
- ], 64);
552
- };
553
- }
554
- }), mt = { class: "max-w-[400px] mx-auto rounded-lg border border-fm-color-neutral-gray-200 fm-shadow-light-200 overflow-hidden bg-white" }, dt = { class: "flex items-center gap-12 px-12 py-10" }, ut = { class: "w-32 h-32 rounded-full bg-gradient-to-tr from-yellow-400 via-pink-500 to-purple-600 p-[2px] shrink-0" }, pt = { class: "w-full h-full rounded-full bg-white p-[1px] overflow-hidden" }, gt = ["src", "alt"], ft = {
555
- key: 1,
556
- class: "w-full h-full rounded-full bg-fm-color-neutral-gray-200 flex items-center justify-center"
557
- }, vt = { class: "flex-1 min-w-0" }, _t = { class: "text-sm font-semibold text-fm-color-typo-primary leading-tight truncate" }, ht = { class: "text-[10px] text-fm-color-typo-secondary leading-tight" }, yt = { class: "w-full bg-fm-color-neutral-gray-100 overflow-hidden" }, bt = ["src", "alt"], xt = {
558
- key: 1,
559
- class: "aspect-square flex items-center justify-center"
560
- }, kt = { class: "flex items-center gap-12 px-12 pt-10 pb-4" }, wt = { class: "px-12 pb-4" }, $t = { class: "text-xs font-semibold text-fm-color-typo-primary" }, Mt = {
561
- key: 0,
562
- class: "px-12 pb-12"
563
- }, Ct = { class: "text-xs text-fm-color-typo-primary" }, Ft = { class: "font-semibold mr-4" }, Ut = { class: "line-clamp-2" }, zt = /* @__PURE__ */ C({
564
- __name: "InstagramPostPreview",
565
- props: {
566
- imageUrl: {},
567
- headline: {},
568
- caption: {}
569
- },
570
- setup(l) {
571
- const { t: m } = I(), { currentBusiness: d } = R();
572
- return (p, i) => {
573
- var o, n, v;
574
- const r = b("FmIcon");
575
- return s(), u("div", mt, [
576
- e("div", dt, [
577
- e("div", ut, [
578
- e("div", pt, [
579
- (o = t(d)) != null && o.thumbnail ? (s(), u("img", {
580
- key: 0,
581
- src: t(d).thumbnail,
582
- class: "w-full h-full object-cover rounded-full",
583
- alt: t(m)("connect.marketing.preview.businessLogo")
584
- }, null, 8, gt)) : (s(), u("div", ft, [
585
- c(r, {
586
- name: "storefront",
587
- size: "sm",
588
- color: "neutral-gray-400"
589
- })
590
- ]))
591
- ])
592
- ]),
593
- e("div", vt, [
594
- e("p", _t, f(((n = t(d)) == null ? void 0 : n.name) ?? t(m)("connect.marketing.preview.yourBusiness")), 1),
595
- e("p", ht, f(t(m)("connect.marketing.preview.sponsored")), 1)
596
- ]),
597
- c(r, {
598
- name: "more_horiz",
599
- size: "sm",
600
- color: "neutral-gray-400"
601
- })
602
- ]),
603
- e("div", yt, [
604
- l.imageUrl ? (s(), u("img", {
605
- key: 0,
606
- src: l.imageUrl,
607
- alt: t(m)("connect.marketing.preview.postImage"),
608
- class: "w-full h-auto block"
609
- }, null, 8, bt)) : (s(), u("div", xt, [
610
- c(r, {
611
- name: "image",
612
- size: "xl",
613
- color: "neutral-gray-300"
614
- })
615
- ]))
616
- ]),
617
- e("div", kt, [
618
- c(r, {
619
- name: "favorite_border",
620
- size: "md",
621
- color: "neutral-gray-700"
622
- }),
623
- c(r, {
624
- name: "mode_comment",
625
- size: "md",
626
- color: "neutral-gray-700",
627
- outline: ""
628
- }),
629
- c(r, {
630
- name: "send",
631
- size: "md",
632
- color: "neutral-gray-700"
633
- }),
634
- i[0] || (i[0] = e("div", { class: "flex-1" }, null, -1)),
635
- c(r, {
636
- name: "bookmark_border",
637
- size: "md",
638
- color: "neutral-gray-700"
639
- })
640
- ]),
641
- e("div", wt, [
642
- e("p", $t, f(t(m)("connect.marketing.preview.likes", { count: "10,428" })), 1)
643
- ]),
644
- l.caption || l.headline ? (s(), u("div", Mt, [
645
- e("p", Ct, [
646
- e("span", Ft, f(((v = t(d)) == null ? void 0 : v.name) ?? t(m)("connect.marketing.preview.yourBusiness")), 1),
647
- e("span", Ut, f(l.caption ?? l.headline), 1)
648
- ])
649
- ])) : $("", !0)
650
- ]);
651
- };
652
- }
653
- }), It = { class: "max-w-[300px] mx-auto rounded-2xl overflow-hidden fm-shadow-light-200 relative aspect-[9/16] bg-black" }, jt = ["src", "alt"], Et = {
654
- key: 1,
655
- class: "absolute inset-0 flex items-center justify-center bg-fm-color-neutral-gray-800"
656
- }, Tt = { class: "absolute inset-x-0 top-0 px-12 pt-12 pb-24 bg-gradient-to-b from-black/60 to-transparent" }, Bt = { class: "flex items-center gap-8" }, Rt = { class: "w-32 h-32 rounded-full p-[2px] bg-gradient-to-tr from-yellow-400 via-pink-500 to-purple-600 shrink-0" }, Pt = { class: "w-full h-full rounded-full bg-black/30 overflow-hidden" }, At = ["src", "alt"], St = {
657
- key: 1,
658
- class: "w-full h-full flex items-center justify-center"
659
- }, Vt = { class: "flex-1 min-w-0" }, Lt = { class: "text-white text-xs font-semibold leading-tight truncate" }, Nt = { class: "text-white/70 text-[10px] leading-tight" }, Dt = { class: "absolute inset-x-0 bottom-0 px-16 pb-24 pt-40 bg-gradient-to-t from-black/70 to-transparent" }, Ot = {
660
- key: 0,
661
- class: "text-white text-xs mb-12 line-clamp-3"
662
- }, Ht = { class: "flex justify-center" }, Wt = { class: "px-24 py-8 rounded-full bg-white text-fm-color-typo-primary text-xs font-semibold" }, qt = /* @__PURE__ */ C({
663
- __name: "InstagramStoryPreview",
664
- props: {
665
- imageUrl: {},
666
- headline: {},
667
- caption: {}
668
- },
669
- setup(l) {
670
- const { t: m } = I(), { currentBusiness: d } = R();
671
- return (p, i) => {
672
- var o, n;
673
- const r = b("FmIcon");
674
- return s(), u("div", It, [
675
- l.imageUrl ? (s(), u("img", {
676
- key: 0,
677
- src: l.imageUrl,
678
- alt: t(m)("connect.marketing.preview.storyImage"),
679
- class: "absolute inset-0 w-full h-full object-contain"
680
- }, null, 8, jt)) : (s(), u("div", Et, [
681
- c(r, {
682
- name: "image",
683
- size: "xl",
684
- color: "neutral-gray-500"
685
- })
686
- ])),
687
- e("div", Tt, [
688
- i[0] || (i[0] = e("div", { class: "flex gap-4 mb-10" }, [
689
- e("div", { class: "h-[2px] flex-1 rounded-full bg-white" })
690
- ], -1)),
691
- e("div", Bt, [
692
- e("div", Rt, [
693
- e("div", Pt, [
694
- (o = t(d)) != null && o.thumbnail ? (s(), u("img", {
695
- key: 0,
696
- src: t(d).thumbnail,
697
- class: "w-full h-full object-cover",
698
- alt: t(m)("connect.marketing.preview.businessLogo")
699
- }, null, 8, At)) : (s(), u("div", St, [
700
- c(r, {
701
- name: "storefront",
702
- size: "sm",
703
- color: "neutral-gray-400"
704
- })
705
- ]))
706
- ])
707
- ]),
708
- e("div", Vt, [
709
- e("p", Lt, f(((n = t(d)) == null ? void 0 : n.name) ?? t(m)("connect.marketing.preview.yourBusiness")), 1),
710
- e("p", Nt, f(t(m)("connect.marketing.preview.sponsored")), 1)
711
- ]),
712
- c(r, {
713
- name: "more_vert",
714
- size: "sm",
715
- color: "neutral-white"
716
- }),
717
- c(r, {
718
- name: "close",
719
- size: "sm",
720
- color: "neutral-white"
721
- })
722
- ])
723
- ]),
724
- e("div", Dt, [
725
- l.caption ? (s(), u("p", Ot, f(l.caption), 1)) : $("", !0),
726
- e("div", Ht, [
727
- e("button", Wt, f(l.headline ?? t(m)("connect.marketing.preview.learnMore")), 1)
728
- ])
729
- ])
730
- ]);
731
- };
732
- }
733
- }), Gt = { class: "relative w-full" }, Kt = {
734
- key: 0,
735
- class: "flex items-center gap-12"
736
- }, Zt = ["fill"], Jt = ["d"], Qt = { class: "fm-typo-en-body-sm-700 font-semibold" }, Xt = {
737
- key: 1,
738
- class: "absolute z-30 w-full mt-8 bg-white border border-fm-color-neutral-gray-200 rounded-lg shadow-lg overflow-hidden animate-in fade-in slide-in-from-top-2 duration-200"
739
- }, Yt = { class: "max-h-[360px] overflow-y-auto py-8 px-8" }, eo = {
740
- key: 0,
741
- class: "h-1 bg-fm-color-neutral-gray-100 my-8"
742
- }, to = { class: "flex items-center gap-8 px-16 py-8" }, oo = ["fill"], no = ["d"], ao = { class: "text-xs font-bold text-fm-color-typo-secondary uppercase tracking-wider" }, so = ["onClick"], lo = { class: "flex items-center gap-8" }, io = { class: "flex items-center gap-8" }, ro = { class: "text-xs text-fm-color-neutral-gray-400 font-medium" }, co = /* @__PURE__ */ C({
743
- __name: "SocialMediaPreviewSelector",
744
- props: {
745
- modelValue: {}
746
- },
747
- emits: ["update:modelValue"],
748
- setup(l, { emit: m }) {
749
- const d = l, p = m, { t: i } = I(), r = M(!1), o = E(() => [
750
- {
751
- name: i("connect.marketing.preview.facebook"),
752
- iconColor: "#1877F2",
753
- iconPath: "M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z",
754
- options: [
755
- {
756
- label: i("connect.marketing.preview.facebookPost"),
757
- value: "facebook-post",
758
- icon: "draft",
759
- aspectRatio: "1:1"
760
- },
761
- {
762
- label: i("connect.marketing.preview.facebookStory"),
763
- value: "facebook-story",
764
- icon: "motion_play",
765
- aspectRatio: "9:16"
766
- }
767
- ]
768
- },
769
- {
770
- name: i("connect.marketing.preview.instagram"),
771
- iconColor: "#E1306C",
772
- iconPath: "M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zM12 0C8.741 0 8.333.014 7.053.072 2.695.272.273 2.69.073 7.052.014 8.333 0 8.741 0 12c0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98C8.333 23.986 8.741 24 12 24c3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98C15.668.014 15.259 0 12 0zm0 5.838a6.162 6.162 0 100 12.324 6.162 6.162 0 000-12.324zM12 16a4 4 0 110-8 4 4 0 010 8zm5.882-10.55a1.44 1.44 0 10-2.88 0 1.44 1.44 0 002.88 0z",
773
- options: [
774
- {
775
- label: i("connect.marketing.preview.instagramPost"),
776
- value: "instagram-post",
777
- icon: "draft",
778
- aspectRatio: "1:1"
779
- },
780
- {
781
- label: i("connect.marketing.preview.instagramStory"),
782
- value: "instagram-story",
783
- icon: "motion_play",
784
- aspectRatio: "9:16"
785
- }
786
- ]
787
- }
788
- ]), n = E(() => o.value.flatMap((h) => h.options)), v = E(
789
- () => n.value.find((h) => h.value === d.modelValue)
790
- ), _ = E(
791
- () => o.value.find((h) => h.options.some((F) => F.value === d.modelValue))
792
- ), k = (h) => {
793
- p("update:modelValue", h), r.value = !1;
794
- };
795
- return (h, F) => {
796
- const U = b("FmIcon");
797
- return s(), u("div", Gt, [
798
- r.value ? (s(), u("div", {
799
- key: 0,
800
- class: "fixed inset-0 z-10",
801
- onClick: F[0] || (F[0] = (w) => r.value = !1)
802
- })) : $("", !0),
803
- e("button", {
804
- type: "button",
805
- onClick: F[1] || (F[1] = (w) => r.value = !r.value),
806
- class: "relative z-20 flex items-center justify-between w-full px-16 py-12 bg-white border border-fm-color-neutral-gray-200 rounded-lg hover:border-fm-color-primary-300 focus:outline-none focus:border-fm-color-primary-500 transition-colors shadow-sm"
807
- }, [
808
- v.value && _.value ? (s(), u("div", Kt, [
809
- (s(), u("svg", {
810
- class: "w-[20px] h-[20px] shrink-0",
811
- viewBox: "0 0 24 24",
812
- fill: _.value.iconColor,
813
- xmlns: "http://www.w3.org/2000/svg"
814
- }, [
815
- e("path", {
816
- d: _.value.iconPath
817
- }, null, 8, Jt)
818
- ], 8, Zt)),
819
- e("span", Qt, f(v.value.label), 1)
820
- ])) : $("", !0),
821
- c(U, {
822
- name: "expand_more",
823
- size: "md",
824
- color: "neutral-gray-400"
825
- })
826
- ]),
827
- r.value ? (s(), u("div", Xt, [
828
- e("div", Yt, [
829
- (s(!0), u(B, null, L(o.value, (w, y) => (s(), u("div", {
830
- key: w.name,
831
- class: "flex flex-col gap-[6px]"
832
- }, [
833
- y > 0 ? (s(), u("div", eo)) : $("", !0),
834
- e("div", to, [
835
- (s(), u("svg", {
836
- class: "w-16 h-16 shrink-0",
837
- viewBox: "0 0 24 24",
838
- fill: w.iconColor,
839
- xmlns: "http://www.w3.org/2000/svg"
840
- }, [
841
- e("path", {
842
- d: w.iconPath
843
- }, null, 8, no)
844
- ], 8, oo)),
845
- e("span", ao, f(w.name), 1)
846
- ]),
847
- (s(!0), u(B, null, L(w.options, (a) => (s(), u("button", {
848
- key: a.value,
849
- onClick: (g) => k(a.value),
850
- class: D(["flex items-center justify-between w-full px-16 py-[10px] text-left transition-colors rounded-lg", [
851
- l.modelValue === a.value ? "bg-fm-color-neutral-gray-200 " : "bg-white hover:bg-fm-color-neutral-gray-100"
852
- ]])
853
- }, [
854
- e("div", lo, [
855
- c(U, {
856
- name: a.icon,
857
- size: "sm",
858
- outline: "",
859
- color: l.modelValue === a.value ? "primary-500" : "neutral-gray-500"
860
- }, null, 8, ["name", "color"]),
861
- e("span", {
862
- class: D([
863
- "fm-typo-en-body-sm-500",
864
- l.modelValue === a.value ? "text-fm-color-primary-600 font-semibold" : "text-fm-color-typo-primary"
865
- ])
866
- }, f(a.label), 3)
867
- ]),
868
- e("div", io, [
869
- e("span", ro, f(a.aspectRatio), 1)
870
- ])
871
- ], 10, so))), 128))
872
- ]))), 128))
873
- ])
874
- ])) : $("", !0)
875
- ]);
876
- };
877
- }
878
- }), mo = { class: "ml-12 flex items-center" }, uo = /* @__PURE__ */ C({
879
- __name: "MarketingMaterialPrimaryButton",
880
- props: {
881
- disabled: { type: Boolean },
882
- marketingMaterial: {}
883
- },
884
- emits: ["save"],
885
- setup(l, { emit: m }) {
886
- const d = l, { t: p } = I(), { shareMaterial: i } = K();
887
- async function r() {
888
- await i(d.marketingMaterial);
889
- }
890
- return (o, n) => {
891
- const v = b("FmButton"), _ = b("FmMenuItem"), k = b("FmMenu");
892
- return s(), u("div", mo, [
893
- c(v, {
894
- variant: "primary",
895
- disabled: l.disabled,
896
- class: "!rounded-r-none",
897
- label: t(p)("connect.common.save"),
898
- onClick: n[0] || (n[0] = (h) => o.$emit("save"))
899
- }, null, 8, ["disabled", "label"]),
900
- c(k, { placement: "bottom-end" }, {
901
- "menu-button": j(() => [
902
- c(v, {
903
- variant: "primary",
904
- icon: "arrow_drop_down",
905
- disabled: l.disabled,
906
- class: "!rounded-l-none border-l border-white/20 px-2"
907
- }, null, 8, ["disabled"])
908
- ]),
909
- default: j(() => [
910
- c(_, {
911
- label: t(p)("connect.marketing.actions.share"),
912
- disabled: !l.marketingMaterial || l.disabled,
913
- onClick: r
914
- }, null, 8, ["label", "disabled"])
915
- ]),
916
- _: 1
917
- })
918
- ]);
919
- };
920
- }
921
- }), po = { class: "mx-auto mb-24 grid max-w-[856px] grid-cols-1 lg:grid-cols-2 rounded-2xl xs:rounded-none border border-fm-color-neutral-gray-200 xs:border-none overflow-hidden" }, go = { class: "min-w-0 bg-fm-color-neutral-gray-50 xs:p-16" }, fo = { class: "mx-auto flex max-w-[560px] flex-col" }, vo = { class: "p-24 xs:p-16" }, _o = { class: "bg-fm-color-neutral-gray-100 p-24 xs:p-12" }, Eo = /* @__PURE__ */ C({
922
- __name: "MarketingMaterialEdit",
923
- setup(l) {
924
- const { t: m } = I(), d = te(), p = G(), i = se(), { minor: r } = ie, o = M(null), n = M(null), v = E(() => !o.value || !n.value ? !1 : o.value.imageUrl !== n.value.imageUrl || o.value.headline !== n.value.headline || o.value.caption !== n.value.caption), _ = {
925
- label: m("connect.common.cancel"),
926
- value: "cancel",
927
- isPrimary: !1
928
- };
929
- async function k() {
930
- v.value ? i.open({
931
- title: m("connect.campaign.common.unsaved_changes"),
932
- message: m("connect.campaign.common.unsaved_changes"),
933
- primaryActions: {
934
- text: m("connect.campaign.common.unsaved_changes_confirm"),
935
- close: !0
936
- },
937
- secondaryActions: {
938
- text: m("connect.campaign.common.unsaved_changes_cancel"),
939
- close: !1
940
- }
941
- }).onPrimary(() => {
942
- d.push({ name: A["$connect-MARKETING"] });
943
- }).onSecondary(() => {
944
- i.close();
945
- }) : d.push({ name: A["$connect-MARKETING"] });
946
- }
947
- async function h() {
948
- o.value && await r(
949
- async () => {
950
- const y = o.value._id, a = await H.updateMarketingMaterial(y, {
951
- imageUrl: o.value.imageUrl,
952
- headline: o.value.headline,
953
- caption: o.value.caption
954
- });
955
- o.value = a, n.value = O.cloneDeep(a);
956
- },
957
- {
958
- message: m("connect.marketing.materialEdit.saving"),
959
- successMessage: m("connect.marketing.materialEdit.save_success")
960
- }
961
- );
962
- }
963
- async function F(y) {
964
- y === "save" ? await h() : y === "cancel" && await k();
965
- }
966
- const U = M("facebook-post"), w = E(() => {
967
- switch (U.value) {
968
- case "facebook-story":
969
- return ct;
970
- case "instagram-post":
971
- return zt;
972
- case "instagram-story":
973
- return qt;
974
- default:
975
- return Ke;
976
- }
977
- });
978
- return X(async () => {
979
- const y = p.query.id;
980
- if (!y) {
981
- d.replace({ name: A["$connect-MARKETING"] });
982
- return;
983
- }
984
- const a = await H.getMarketingMaterial(y);
985
- o.value = a, n.value = O.cloneDeep(a);
986
- }), (y, a) => {
987
- const g = b("FmPageHead");
988
- return s(), u(B, null, [
989
- c(g, {
990
- "back-button": !0,
991
- title: t(m)("connect.marketing.materialEdit.title"),
992
- actions: [_],
993
- "onClick:back": k,
994
- "onClick:action": F
995
- }, {
996
- append: j(() => [
997
- c(uo, {
998
- "marketing-material": t(o),
999
- onSave: h
1000
- }, null, 8, ["marketing-material"])
1001
- ]),
1002
- _: 1
1003
- }, 8, ["title", "actions"]),
1004
- e("div", po, [
1005
- e("section", go, [
1006
- e("div", fo, [
1007
- e("div", vo, [
1008
- c(co, {
1009
- modelValue: t(U),
1010
- "onUpdate:modelValue": a[0] || (a[0] = (x) => Y(U) ? U.value = x : null)
1011
- }, null, 8, ["modelValue"])
1012
- ]),
1013
- e("div", _o, [
1014
- t(o) ? (s(), T(ee(t(w)), {
1015
- key: 0,
1016
- "image-url": t(o).imageUrl,
1017
- headline: t(o).headline,
1018
- caption: t(o).caption
1019
- }, null, 8, ["image-url", "headline", "caption"])) : $("", !0)
1020
- ])
1021
- ])
1022
- ]),
1023
- t(o) ? (s(), T(Ie, {
1024
- key: 0,
1025
- "marketing-material": t(o),
1026
- "onUpdate:imageUrl": a[1] || (a[1] = (x) => t(o).imageUrl = x),
1027
- "onUpdate:headline": a[2] || (a[2] = (x) => t(o).headline = x),
1028
- "onUpdate:caption": a[3] || (a[3] = (x) => t(o).caption = x)
1029
- }, null, 8, ["marketing-material"])) : $("", !0)
1030
- ])
1031
- ], 64);
1032
- };
1033
- }
1034
- });
1035
- export {
1036
- Eo as default
1037
- };