@feedmepos/mf-connect 0.0.39-prod → 0.1.0-beta.2

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 (101) hide show
  1. package/dist/Analytic-DSD9TsKr.js +622 -0
  2. package/dist/{App-X3fNEBF3.js → App-D8a5eW51.js} +250 -249
  3. package/dist/Broadcast-C8jgMe6g.js +223 -0
  4. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CRYS_tzZ.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-pG8WvV4I.js} +20 -20
  5. package/dist/Card-C1K7ULPo.js +825 -0
  6. package/dist/Collections-lMrdPUuM.js +453 -0
  7. package/dist/Credit-CJfU5tP4.js +220 -0
  8. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-DoZyevfa.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BYoaa_-x.js} +1042 -1011
  9. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-CzEtOmp0.js +345 -0
  10. package/dist/Experience-Bp2ki8gU.js +221 -0
  11. package/dist/Game-BpTf6ebE.js +255 -0
  12. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +144 -0
  13. package/dist/{MainLayout-DpZC6o3R.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js} +19 -53
  14. package/dist/MainLayout-B1aJoR95.js +41 -0
  15. package/dist/Marketing-BiKE2gxA.js +316 -0
  16. package/dist/Member-BSWyy32a.js +69 -0
  17. package/dist/MemberList-CHlGREyR.js +1733 -0
  18. package/dist/MemberOverview-wL_ailso.js +58 -0
  19. package/dist/{MemberTransactions-DueaXBCy.js → MemberTransactions-BzHiXCnp.js} +1 -1
  20. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-e-zWg08J.js +432 -0
  21. package/dist/Mission-8IGT3T2C.js +261 -0
  22. package/dist/Point-CbbJ6ohd.js +222 -0
  23. package/dist/Promotion-BYXCJa_S.js +247 -0
  24. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-_RX1J0Br.js → RuleGroup.vue_vue_type_script_setup_true_lang-Bruh-umZ.js} +557 -557
  25. package/dist/Segment-DXDNM0yd.js +437 -0
  26. package/dist/Setting-CLpvvZTv.js +1901 -0
  27. package/dist/Store-C6-P6bwc.js +1511 -0
  28. package/dist/StoreRewards-CUM2irXK.js +401 -0
  29. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-CLFiuO5k.js → StoreTransactions.vue_vue_type_script_setup_true_lang-JaRdmqif.js} +10 -10
  30. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-CoMQBL4P.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-DEb4OBcX.js} +1 -1
  31. package/dist/{Tier-CftEoP_R.js → Tier-DZTDxWBo.js} +481 -453
  32. package/dist/{Title-BsavXbYh.js → Title-C2Dr5ceK.js} +314 -295
  33. package/dist/Transaction-BL4mS29d.js +39 -0
  34. package/dist/Voucher-Cx0r2-df.js +490 -0
  35. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-DWuAODUF.js +56 -0
  36. package/dist/{app-BNmAx3zq.js → app-B_xuZ5HB.js} +1 -1
  37. package/dist/app-wE5HTF_Y.js +5762 -0
  38. package/dist/app.js +5 -3
  39. package/dist/{business-DGL4Ayx0.js → business-DSv8zM8C.js} +1 -1
  40. package/dist/{campaign-D94sS1kM.js → campaign-7y5qquHZ.js} +5 -3
  41. package/dist/{collection.fn-BHJ1ISqO.js → collection.fn-BxVZQAx0.js} +2 -2
  42. package/dist/dto-Ew1QwLci.js +2778 -0
  43. package/dist/{effect-CFRICzlM.js → effect-BzPh8fRI.js} +9 -9
  44. package/dist/{export-w2o9NYcy.js → export-C9tDplkA.js} +3 -3
  45. package/dist/{helper-CUDWQ8vq.js → helper-Sz7oQ0F4.js} +1 -1
  46. package/dist/{index-BGuLhEym.js → index-BQm0C3Jm.js} +3 -3
  47. package/dist/{index-BjwyxNSp.js → index-C-SOz7jt.js} +1 -1
  48. package/dist/{index-BcWJcD9f.js → index-C0lpADCo.js} +1 -1
  49. package/dist/{index-DIq2KVis.js → index-C3_4GUiI.js} +1 -1
  50. package/dist/{index-BPEV5Tzg.js → index-D-2nFLsg.js} +59 -47
  51. package/dist/{index-CFMBSL24.js → index-DBMaUGYI.js} +2 -2
  52. package/dist/{index-CpwFQFTV.js → index-DH_1nOJ_.js} +3 -3
  53. package/dist/index-Dy4pmQpt.js +29193 -0
  54. package/dist/{index-BQ6isIeo.js → index-_3qBsogG.js} +1 -1
  55. package/dist/index-gIRszcHf.js +3 -0
  56. package/dist/{index-VjUw31dN.js → index-tv4t0Pnh.js} +1 -1
  57. package/dist/{index-tZ1aqhks.js → index-z0IfdrZk.js} +319 -281
  58. package/dist/{index.esm2017-zciuPty-.js → index.esm2017-BnKJDxUo.js} +55 -55
  59. package/dist/{loading-GuXe5bYG.js → loading-Ds-yFYhc.js} +469 -460
  60. package/dist/{membership-BHWJVI3e.js → membership-DaiVw9qF.js} +3 -3
  61. package/dist/money-BHtBdZoz.js +15 -0
  62. package/dist/number-CZhcB8ef.js +12 -0
  63. package/dist/{rule-MgNa_8FF.js → rule-Cd2M6Ri2.js} +2 -2
  64. package/dist/{rule-builder-BsBCWzq_.js → rule-builder-B6og27Q1.js} +1 -1
  65. package/dist/style.css +1 -1
  66. package/dist/{template-D6k3lusq.js → template-DouRWBpv.js} +63 -63
  67. package/dist/{usePagination-JoYaROkV.js → usePagination-BeF5K3M7.js} +85 -85
  68. package/dist/vue-i18n-BTlOChXs.js +2365 -0
  69. package/dist/{xlsx-ClrA4KOh.js → xlsx-SahfXQ70.js} +517 -517
  70. package/dist/zod-Bg2FbC-D.js +90 -0
  71. package/package.json +7 -4
  72. package/dist/Analytic-DMFueUju.js +0 -620
  73. package/dist/Broadcast-YIfWIXeA.js +0 -216
  74. package/dist/Card-BIxlgQm7.js +0 -824
  75. package/dist/Collections-M6DaHM2W.js +0 -441
  76. package/dist/Credit-BtRy-xoY.js +0 -214
  77. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-D5DNTBSQ.js +0 -344
  78. package/dist/Experience-DGm1lnqj.js +0 -211
  79. package/dist/Game-B8-lG7qq.js +0 -250
  80. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js +0 -144
  81. package/dist/Marketing-DtG3AIWr.js +0 -309
  82. package/dist/Member-K443-9Vy.js +0 -92
  83. package/dist/MemberList-CYXHXFTL.js +0 -1735
  84. package/dist/MemberOverview-C2n9oJZh.js +0 -58
  85. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-Bk2HLVmt.js +0 -203
  86. package/dist/Mission-CN5umXXA.js +0 -248
  87. package/dist/Point-XAm6H2p_.js +0 -220
  88. package/dist/Promotion-DsrA4KiE.js +0 -244
  89. package/dist/Segment-CZGGHoAu.js +0 -435
  90. package/dist/Setting-BjfxLKyp.js +0 -1870
  91. package/dist/Store-D_B-vhh3.js +0 -1513
  92. package/dist/StoreRewards-BjHffUKj.js +0 -429
  93. package/dist/Transaction-CdxzoKDG.js +0 -36
  94. package/dist/Voucher-B_9Nv1Mr.js +0 -485
  95. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-3LlSDiq0.js +0 -140
  96. package/dist/app--1Ks5Hms.js +0 -2974
  97. package/dist/dto-X0Eeujxx.js +0 -1151
  98. package/dist/index-BPNG8N-w.js +0 -11
  99. package/dist/index-DWM9MWGj.js +0 -28058
  100. package/dist/money-CrttVpCp.js +0 -15
  101. package/dist/number-CIndGU4O.js +0 -12
@@ -0,0 +1,58 @@
1
+ import { defineComponent as c, resolveComponent as r, openBlock as s, createElementBlock as n, Fragment as a, createElementVNode as e, createVNode as v, withCtx as p, renderList as u, normalizeClass as y, toDisplayString as l, createCommentVNode as _ } from "vue";
2
+ const b = { class: "bg-gradient-to-r from-orange-200 p-24 to-blue-200 via-pink-100 mx-[-24px]" }, g = { class: "grid grid-cols-6 xs:grid-cols-2 gap-4 divide-x xs:divide-x-0" }, x = { class: "fm-typo-body-md-400 fm-typo-en-body-md-400 mb-2 text-fm-color-typo-secondary" }, f = { class: "fm-typo-en-title-sm-800" }, w = /* @__PURE__ */ c({
3
+ __name: "MemberOverview",
4
+ setup(k) {
5
+ const m = [
6
+ {
7
+ key: "Total member",
8
+ value: 4
9
+ },
10
+ {
11
+ key: "New member",
12
+ value: 2
13
+ },
14
+ {
15
+ key: "Member average spend",
16
+ value: 100
17
+ },
18
+ {
19
+ key: "Average visit time",
20
+ value: 567
21
+ },
22
+ {
23
+ key: "Member growth",
24
+ value: "100%"
25
+ },
26
+ { key: "Inactive member", value: 0 }
27
+ ];
28
+ return (C, o) => {
29
+ const i = r("FmCard");
30
+ return r("FmButton"), s(), n(a, null, [
31
+ e("div", b, [
32
+ v(i, {
33
+ variant: "outlined",
34
+ class: "flex flex-col gap-16 p-16"
35
+ }, {
36
+ default: p(() => [
37
+ o[0] || (o[0] = e("div", { class: "fm-typo-en-body-lg-600" }, "Member overview", -1)),
38
+ e("div", g, [
39
+ (s(), n(a, null, u(m, (t, d) => e("div", {
40
+ key: t.key,
41
+ class: y(["px-8", { "xs:!border-r": d % 2 == 0 }])
42
+ }, [
43
+ e("div", x, l(t.key), 1),
44
+ e("div", f, l(t.value), 1)
45
+ ], 2)), 64))
46
+ ])
47
+ ]),
48
+ _: 1
49
+ })
50
+ ]),
51
+ _("", !0)
52
+ ], 64);
53
+ };
54
+ }
55
+ });
56
+ export {
57
+ w as default
58
+ };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as i, ref as p, resolveComponent as _, openBlock as l, createElementBlock as d, createVNode as f, unref as e, createBlock as r, createCommentVNode as v } from "vue";
2
- import { _ as b, a as k } from "./StoreTransactions.vue_vue_type_script_setup_true_lang-CLFiuO5k.js";
2
+ import { _ as b, a as k } from "./StoreTransactions.vue_vue_type_script_setup_true_lang-JaRdmqif.js";
3
3
  import { useRouter as x } from "vue-router";
4
4
  const C = { class: "flex flex-col gap-y-32 pb-24" }, N = /* @__PURE__ */ i({
5
5
  __name: "MemberTransactions",
@@ -0,0 +1,432 @@
1
+ import { defineComponent as M, shallowRef as R, openBlock as p, createElementBlock as _, normalizeStyle as O, ref as V, resolveComponent as g, createBlock as E, unref as s, isRef as N, withCtx as x, createVNode as h, createElementVNode as v, createCommentVNode as B, withDirectives as D, vShow as A, computed as q, onMounted as J, Fragment as U, createTextVNode as P, toDisplayString as z, renderList as G } from "vue";
2
+ import { p as K } from "./loading-Ds-yFYhc.js";
3
+ import { r as W } from "./index-D-2nFLsg.js";
4
+ import { _ as Z } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
+ import { _ as Q, S as X } from "./LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js";
6
+ import { c as Y } from "./object-qECH92oz.js";
7
+ const ee = {
8
+ "user.name": {
9
+ name: "User name"
10
+ },
11
+ "user.birthday": {
12
+ name: "Birthday"
13
+ },
14
+ "user.joinAt": {
15
+ name: "Join at"
16
+ },
17
+ "user.expiringVouchers.days7": {
18
+ name: "Expiring vouchers in 7 days"
19
+ },
20
+ "user.expiringVouchers.days30": {
21
+ name: "Expiring vouchers in 30 days"
22
+ },
23
+ "user.expiringVouchers.days90": {
24
+ name: "Expiring vouchers in 90 days"
25
+ },
26
+ "user.tier": {
27
+ name: "User tier"
28
+ },
29
+ "user.point": {
30
+ name: "User experience"
31
+ },
32
+ "transaction.amount": {
33
+ name: "Reward amount"
34
+ },
35
+ "collectible.name": {
36
+ name: "Reward name"
37
+ }
38
+ }, te = "https://editor.unlayer.com/embed.js?2", T = [];
39
+ let H = !1;
40
+ const ne = (e) => {
41
+ const n = document.querySelectorAll("script");
42
+ let a = !1;
43
+ return n.forEach((u) => {
44
+ u.src.includes(e) && (a = !0);
45
+ }), a;
46
+ }, ae = (e) => {
47
+ T.push(e);
48
+ }, L = () => {
49
+ if (H) {
50
+ let e;
51
+ for (; e = T.shift(); )
52
+ e();
53
+ }
54
+ }, ie = (e, n = te) => {
55
+ if (ae(e), ne(n))
56
+ L();
57
+ else {
58
+ const a = document.createElement("script");
59
+ a.setAttribute("src", n), a.onload = () => {
60
+ H = !0, L();
61
+ }, document.head.appendChild(a);
62
+ }
63
+ };
64
+ let oe = 0;
65
+ const le = M({
66
+ name: "EmailEditor",
67
+ props: {
68
+ editorId: String,
69
+ minHeight: {
70
+ type: String,
71
+ default: "500px"
72
+ },
73
+ options: Object,
74
+ scriptUrl: String,
75
+ /**
76
+ * @Deprecated Props: Use `options.appearance` instead
77
+ */
78
+ appearance: Object,
79
+ /**
80
+ * @Deprecated Props: Use `options.locale` instead
81
+ */
82
+ locale: String,
83
+ /**
84
+ * @Deprecated Props: Use `options.projectId` instead
85
+ */
86
+ projectId: Number,
87
+ /**
88
+ * @Deprecated Props: Use `options.tools` instead
89
+ */
90
+ tools: Object
91
+ },
92
+ computed: {
93
+ id() {
94
+ return this.editorId || `editor-${++oe}`;
95
+ }
96
+ },
97
+ setup() {
98
+ return {
99
+ editor: R(null)
100
+ // Makes editor available to the template
101
+ };
102
+ },
103
+ mounted() {
104
+ this.$emit("load"), ie(this.loadEditor.bind(this), this.scriptUrl);
105
+ },
106
+ methods: {
107
+ loadEditor() {
108
+ const e = this.options || {};
109
+ this.appearance && (e.appearance = this.appearance), this.locale && (e.locale = this.locale), this.projectId && (e.projectId = this.projectId), this.tools && (e.tools = this.tools), this.editor = unlayer.createEditor({
110
+ ...e,
111
+ id: this.id
112
+ }), this.editor.addEventListener("editor:ready", () => {
113
+ this.$emit("ready");
114
+ });
115
+ },
116
+ /**
117
+ * @deprecated This method will be removed in the next major release. Use `editor.exportHtml` instead.
118
+ */
119
+ exportHtml(e) {
120
+ var n;
121
+ (n = this.editor) == null || n.exportHtml(e);
122
+ },
123
+ /**
124
+ * @deprecated This method will be removed in the next major release. Use `editor.loadDesign` instead.
125
+ */
126
+ loadDesign(e) {
127
+ var n;
128
+ (n = this.editor) == null || n.loadDesign(e);
129
+ },
130
+ /**
131
+ * @deprecated This method will be removed in the next major release. Use `editor.saveDesign` instead.
132
+ */
133
+ saveDesign(e) {
134
+ var n;
135
+ (n = this.editor) == null || n.saveDesign(e);
136
+ }
137
+ }
138
+ }), se = ["id"];
139
+ function re(e, n, a, u, y, r) {
140
+ return p(), _("div", {
141
+ id: e.id,
142
+ class: "unlayer-editor",
143
+ style: O({ minHeight: e.minHeight })
144
+ }, null, 12, se);
145
+ }
146
+ const de = /* @__PURE__ */ Z(le, [["render", re], ["__scopeId", "data-v-a9a2bb94"]]), ue = { class: "h-full flex flex-col" }, ce = { class: "flex items-center gap-8" }, me = /* @__PURE__ */ M({
147
+ __name: "EmailEditorSheet",
148
+ props: {
149
+ design: {
150
+ type: Object,
151
+ required: !1
152
+ },
153
+ title: {
154
+ type: String,
155
+ required: !1
156
+ }
157
+ },
158
+ emits: ["update:design"],
159
+ setup(e, { expose: n, emit: a }) {
160
+ const u = V(!1), y = V(null), r = V(!1), b = e, f = V({
161
+ html: "",
162
+ design: b.design,
163
+ title: b.title || ""
164
+ });
165
+ function o(l) {
166
+ u.value = l;
167
+ }
168
+ const t = a;
169
+ function m() {
170
+ y.value && (y.value.exportHtml((l) => {
171
+ f.value = {
172
+ html: l.html,
173
+ design: l.design,
174
+ title: f.value.title
175
+ }, t("update:design", f.value);
176
+ }), o(!1));
177
+ }
178
+ return n({
179
+ showSheet: o
180
+ }), (l, i) => {
181
+ const S = g("FmButton"), j = g("FmTextField"), w = g("FmSideSheet");
182
+ return p(), E(w, {
183
+ modelValue: s(u),
184
+ "onUpdate:modelValue": i[4] || (i[4] = (d) => N(u) ? u.value = d : null),
185
+ header: "Email editor",
186
+ "max-width": 1280
187
+ }, {
188
+ "side-sheet-button": x(() => [
189
+ h(S, {
190
+ label: "Edit email",
191
+ variant: "tertiary",
192
+ icon: "edit"
193
+ })
194
+ ]),
195
+ default: x(() => [
196
+ v("div", ue, [
197
+ s(r) ? B("", !0) : (p(), E(Q, {
198
+ key: 0,
199
+ class: "flex-1",
200
+ json: s(X),
201
+ width: 100,
202
+ height: 100
203
+ }, null, 8, ["json"])),
204
+ D(h(j, {
205
+ label: "Email title",
206
+ modelValue: s(f).title,
207
+ "onUpdate:modelValue": i[0] || (i[0] = (d) => s(f).title = d)
208
+ }, null, 8, ["modelValue"]), [
209
+ [A, s(r)]
210
+ ]),
211
+ D(h(de, {
212
+ class: "flex-1",
213
+ ref_key: "editorRef",
214
+ ref: y,
215
+ onLoad: i[1] || (i[1] = (d) => r.value = !1),
216
+ onReady: i[2] || (i[2] = () => {
217
+ var d;
218
+ r.value = !0, b.design && ((d = s(y)) == null || d.loadDesign(s(Y)(b.design)));
219
+ })
220
+ }, null, 512), [
221
+ [A, s(r)]
222
+ ])
223
+ ])
224
+ ]),
225
+ "side-sheet-footer": x(() => [
226
+ v("div", ce, [
227
+ h(S, {
228
+ variant: "primary",
229
+ label: "Confirm",
230
+ onClick: m
231
+ }),
232
+ h(S, {
233
+ variant: "tertiary",
234
+ label: "Cancel",
235
+ onClick: i[3] || (i[3] = (d) => o(!1))
236
+ })
237
+ ])
238
+ ]),
239
+ _: 1
240
+ }, 8, ["modelValue"]);
241
+ };
242
+ }
243
+ }), pe = { class: "space-y-4" }, he = { class: "flex items-center gap-8 justify-between" }, fe = { class: "relative" }, ge = { class: "absolute bottom-[24px] right-[4px]" }, we = /* @__PURE__ */ M({
244
+ __name: "MessageInput",
245
+ props: {
246
+ allowEmail: {
247
+ type: Boolean,
248
+ default: !1
249
+ },
250
+ modelValue: {
251
+ type: Object
252
+ },
253
+ triggerType: {
254
+ type: String,
255
+ default: () => "SCHEDULE"
256
+ },
257
+ helperText: {
258
+ type: String
259
+ },
260
+ helperState: {
261
+ type: String
262
+ },
263
+ variables: {
264
+ type: Object,
265
+ default: () => [
266
+ "user.name",
267
+ "user.birthday",
268
+ "user.joinAt",
269
+ "user.expiringVouchers.days7",
270
+ "user.expiringVouchers.days30",
271
+ "user.expiringVouchers.days90",
272
+ "user.tier",
273
+ "user.point",
274
+ "transaction.amount",
275
+ "collectible.name"
276
+ ]
277
+ },
278
+ placeholder: {
279
+ type: String
280
+ }
281
+ },
282
+ emits: ["update:model-value"],
283
+ setup(e, { emit: n }) {
284
+ const a = e, u = n;
285
+ function y() {
286
+ var m;
287
+ const o = {
288
+ user: {
289
+ name: "John Doe",
290
+ tier: 1,
291
+ point: 1283,
292
+ birthday: (/* @__PURE__ */ new Date("2000-10-02T16:00:00.000Z")).toLocaleDateString(),
293
+ joinAt: (/* @__PURE__ */ new Date("2024-06-14")).toLocaleDateString(),
294
+ expiringVouchers: { days7: 3, days30: 5, days90: 5 }
295
+ },
296
+ transaction: {
297
+ amount: 3
298
+ },
299
+ collectible: {
300
+ name: "RM10 Voucher"
301
+ }
302
+ }, t = W(
303
+ ((m = a.modelValue) == null ? void 0 : m.content) ?? "",
304
+ o
305
+ );
306
+ K.confirm(t, "Preview message", "OK");
307
+ }
308
+ function r(o, t = "SMS") {
309
+ u("update:model-value", {
310
+ channel: t,
311
+ content: t == "SMS" ? o : o.html,
312
+ design: t == "EMAIL" ? o.design : void 0,
313
+ language: "en",
314
+ title: t == "EMAIL" ? o.title : void 0,
315
+ variables: a.variables
316
+ });
317
+ }
318
+ const b = V(a.helperState || "none"), f = q(() => {
319
+ var m;
320
+ const o = ((m = a.modelValue) == null ? void 0 : m.content.replace(/{{([^}]+)}}/g, (l, i) => {
321
+ switch (i) {
322
+ case "user.name":
323
+ return "1234567890";
324
+ case "user.tier":
325
+ return "1";
326
+ case "user.point":
327
+ return "1000";
328
+ case "user.birthday":
329
+ return "01/01/2024";
330
+ case "user.joinAt":
331
+ return "01/01/2024";
332
+ case "user.expiringVouchers.days7":
333
+ case "user.expiringVouchers.days30":
334
+ case "user.expiringVouchers.days90":
335
+ return "5";
336
+ case "transaction.amount":
337
+ return "100";
338
+ case "collectible.name":
339
+ return "Voucher";
340
+ default:
341
+ return "...";
342
+ }
343
+ })) || "";
344
+ let t = 0;
345
+ for (let l = 0; l < o.length; l++) {
346
+ const i = o.charAt(l);
347
+ /[\u4e00-\u9fff\u3040-\u30ff\u3400-\u4dbf]/.test(i) || /[{}\\~\[\]|\^€]/.test(i) ? t += 2 : t += 1;
348
+ }
349
+ return `Character used: ${t} ≈ ${Math.ceil(t / 160)} SMS (Every 160 characters will be sent as 1 SMS)`;
350
+ });
351
+ return J(() => {
352
+ u("update:model-value", {
353
+ ...a.modelValue,
354
+ variables: a.variables
355
+ }), a.modelValue || r("");
356
+ }), (o, t) => {
357
+ var w, d, F, $, k;
358
+ const m = g("FmButtonGroup"), l = g("FmButton"), i = g("FmTextarea"), S = g("FmMenuItem"), j = g("FmMenu");
359
+ return p(), _("div", pe, [
360
+ e.allowEmail ? (p(), E(m, {
361
+ key: 0,
362
+ items: [{ label: "SMS" }, { label: "EMAIL" }],
363
+ "model-value": { label: (w = e.modelValue) == null ? void 0 : w.channel },
364
+ "onUpdate:modelValue": t[0] || (t[0] = (c) => r("", c.label))
365
+ }, null, 8, ["model-value"])) : B("", !0),
366
+ ((d = e.modelValue) == null ? void 0 : d.channel) == "EMAIL" ? (p(), E(me, {
367
+ key: 1,
368
+ design: (F = e.modelValue) == null ? void 0 : F.design,
369
+ title: (($ = e.modelValue) == null ? void 0 : $.title) || void 0,
370
+ "onUpdate:design": t[1] || (t[1] = (c) => {
371
+ r(c, "EMAIL");
372
+ })
373
+ }, null, 8, ["design", "title"])) : (p(), _(U, { key: 2 }, [
374
+ v("div", he, [
375
+ t[2] || (t[2] = v("div", { class: "fm-typo-en-body-lg-400" }, "Add message", -1)),
376
+ h(l, {
377
+ icon: "visibility",
378
+ label: "Preview message",
379
+ variant: "plain",
380
+ onClick: y
381
+ })
382
+ ]),
383
+ v("div", fe, [
384
+ h(i, {
385
+ "model-value": (k = e.modelValue) == null ? void 0 : k.content,
386
+ "onUpdate:modelValue": r,
387
+ "show-word-count": !0,
388
+ placeholder: e.placeholder,
389
+ "helper-state": s(b) || "none",
390
+ "helper-text": s(f)
391
+ }, {
392
+ "helper-text": x(() => [
393
+ P(z(s(f)), 1)
394
+ ]),
395
+ _: 1
396
+ }, 8, ["model-value", "placeholder", "helper-state", "helper-text"]),
397
+ v("div", ge, [
398
+ h(j, { placement: "left-end" }, {
399
+ "menu-button": x(() => [
400
+ h(l, {
401
+ icon: "add",
402
+ variant: "tertiary",
403
+ size: "md"
404
+ })
405
+ ]),
406
+ default: x(() => [
407
+ (p(!0), _(U, null, G(e.variables.filter(
408
+ (c) => e.triggerType == "SCHEDULE" ? !c.startsWith("transaction.") : !0
409
+ ), (c) => {
410
+ var C;
411
+ return p(), E(S, {
412
+ key: c,
413
+ label: ((C = s(ee)[c]) == null ? void 0 : C.name) || c,
414
+ onClick: (ye) => {
415
+ var I;
416
+ return r(((I = e.modelValue) == null ? void 0 : I.content) + `{{${c}}}`);
417
+ }
418
+ }, null, 8, ["label", "onClick"]);
419
+ }), 128))
420
+ ]),
421
+ _: 1
422
+ })
423
+ ])
424
+ ])
425
+ ], 64))
426
+ ]);
427
+ };
428
+ }
429
+ });
430
+ export {
431
+ we as _
432
+ };