@feedmepos/mf-connect 0.1.58-prod → 0.1.59-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 (129) hide show
  1. package/dist/Analytic-1heLfSqq.js +427 -0
  2. package/dist/App-BOM2IfBO.js +4630 -0
  3. package/dist/Bin-BgYzSjrq.js +166 -0
  4. package/dist/Broadcast-DHeN_79K.js +233 -0
  5. package/dist/CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DFOIbmI6.js +121 -0
  6. package/dist/Card-CuJ7bMy5.js +911 -0
  7. package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +97 -0
  8. package/dist/Collections-D1FRwIRi.js +458 -0
  9. package/dist/Credit-CeYpgCod.js +228 -0
  10. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +128 -0
  11. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-B8lOyyAc.js +2194 -0
  12. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-De2lhmbT.js +348 -0
  13. package/dist/Experience-D-tJxul7.js +229 -0
  14. package/dist/FileSaver.min-NlMItPOc.js +74 -0
  15. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
  16. package/dist/Game-BOmYWwRj.js +284 -0
  17. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-D1KQpDGg.js +144 -0
  18. package/dist/Index-CRBYEPFf.js +259 -0
  19. package/dist/JsonViewer-v8_C7l5N.js +87 -0
  20. package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js +18737 -0
  21. package/dist/MainLayout-B1aJoR95.js +41 -0
  22. package/dist/Marketing-D7WunOsO.js +319 -0
  23. package/dist/Member-iYAPEdoQ.js +279 -0
  24. package/dist/MemberList-CtR-UjtG.js +1607 -0
  25. package/dist/MemberOverview-wL_ailso.js +58 -0
  26. package/dist/MemberTransactions-BMQOdkr2.js +45 -0
  27. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-DhJlcYpw.js +60553 -0
  28. package/dist/Mission-DSBH4Di0.js +302 -0
  29. package/dist/Overview-C0KCN3fH.js +1079 -0
  30. package/dist/Point-AN7wmCXY.js +232 -0
  31. package/dist/Promotion-Cbf4W6Vh.js +289 -0
  32. package/dist/Queue-Bo_RtLpU.js +260 -0
  33. package/dist/Record-BphvsxDb.js +341 -0
  34. package/dist/Reward-CgHUAB5V.js +442 -0
  35. package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-DaBRd_Kw.js +150 -0
  36. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-C_65qxpU.js +1763 -0
  37. package/dist/Segment-Cc0D6nPj.js +882 -0
  38. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-BxUG7_bX.js +181 -0
  39. package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-bqKHjikC.js +188 -0
  40. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-DA7bevEn.js +147 -0
  41. package/dist/Setting-DjVTTqky.js +1918 -0
  42. package/dist/SettingAdvertisements-BL81KD_S.js +262 -0
  43. package/dist/Store-DqXIQ9EY.js +1842 -0
  44. package/dist/StoreRewards-xlzAHJkc.js +423 -0
  45. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-OphuWknh.js +995 -0
  46. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DGSjAbol.js +139 -0
  47. package/dist/Tier-DadaaAEc.js +895 -0
  48. package/dist/Title-BDBxQMEm.js +566 -0
  49. package/dist/Transaction-BRGCw9Va.js +39 -0
  50. package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-qe26FZBo.js +130 -0
  51. package/dist/Voucher-CtvWJfVU.js +384 -0
  52. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-dS7n6KJt.js +419 -0
  53. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-ndun9vf-.js +56 -0
  54. package/dist/_commonjsHelpers-BkfeUUK-.js +28 -0
  55. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  56. package/dist/app-9QTXPjre.js +57962 -0
  57. package/dist/app-UNZJVzly.js +7094 -0
  58. package/dist/app-wDQR6dpb.js +39 -0
  59. package/dist/app.js +6 -0
  60. package/dist/business-DtufpzhR.js +82 -0
  61. package/dist/campaign-63K4Xtsd.js +94 -0
  62. package/dist/campaign-CpzFl8Vr.js +4 -0
  63. package/dist/campaign-Dm85zK-z.js +1810 -0
  64. package/dist/campaign.enum-DBWgoidX.js +20 -0
  65. package/dist/campaign.fn-BpifzSGC.js +758 -0
  66. package/dist/collectible.enum-2_2_6r39.js +19 -0
  67. package/dist/collection.fn-B2rlSiv_.js +26 -0
  68. package/dist/dto-Df83CuN3.js +216 -0
  69. package/dist/effect-BUEqEGkq.js +78 -0
  70. package/dist/email-addresses-BUNKzO1f.js +705 -0
  71. package/dist/export-BzY3BDZJ.js +97 -0
  72. package/dist/feedme.ico +0 -0
  73. package/dist/helper-BaJdC23g.js +71 -0
  74. package/dist/index-BA5QwPCT.js +146 -0
  75. package/dist/index-BInlN52T.js +54 -0
  76. package/dist/index-BLjKPiBb.js +44 -0
  77. package/dist/index-BQTPw5fM.js +30076 -0
  78. package/dist/index-BSQCStAn.js +38 -0
  79. package/dist/index-Bzv6BHPk.js +32269 -0
  80. package/dist/index-C0XYFg_a.js +3077 -0
  81. package/dist/index-CuvNtC_M.js +61 -0
  82. package/dist/index-D_hUHpqX.js +31 -0
  83. package/dist/index-DlwtDkgr.js +32 -0
  84. package/dist/index-DrAbySpd.js +8859 -0
  85. package/dist/index-JxOM03oW.js +3 -0
  86. package/dist/index-X9YonBq5.js +76 -0
  87. package/dist/index-gvl1UKmI.js +2134 -0
  88. package/dist/index-vh86FiIQ.js +10 -0
  89. package/dist/index-zy0pOMPl.js +121 -0
  90. package/dist/index.esm2017-WVBFvkg-.js +3069 -0
  91. package/dist/loading-CKbcLJje.js +71 -0
  92. package/dist/lodash-B5I3zXaY.js +3678 -0
  93. package/dist/membership-BMv4jrI_.js +235 -0
  94. package/dist/moment-D7p2TMB-.js +2583 -0
  95. package/dist/money-iY-Nby0p.js +15 -0
  96. package/dist/number-CluL-GzZ.js +12 -0
  97. package/dist/object-qECH92oz.js +26 -0
  98. package/dist/objectId-dwaoBfJX.js +7 -0
  99. package/dist/objectid-sIFo0b00.js +145 -0
  100. package/dist/plugins-BlvUeMc1.js +208 -0
  101. package/dist/reward-CZlHuvJJ.js +36 -0
  102. package/dist/rule-DMH3fchR.js +1951 -0
  103. package/dist/rule-builder-BvBTYyZq.js +102 -0
  104. package/dist/style.css +4 -0
  105. package/dist/template-CzqV_mzm.js +190 -0
  106. package/dist/tier-BJDhpH6X.js +4 -0
  107. package/dist/tiers/tier=1.png +0 -0
  108. package/dist/tiers/tier=2.png +0 -0
  109. package/dist/tiers/tier=3.png +0 -0
  110. package/dist/tiers/tier=4.png +0 -0
  111. package/dist/timezone-Bo8HWoc4.js +1151 -0
  112. package/dist/titles/type=diamond.png +0 -0
  113. package/dist/titles/type=drinks.png +0 -0
  114. package/dist/titles/type=food.png +0 -0
  115. package/dist/titles/type=heart.png +0 -0
  116. package/dist/titles/type=medal.png +0 -0
  117. package/dist/titles/type=spend.png +0 -0
  118. package/dist/titles/type=thank-you.png +0 -0
  119. package/dist/titles/type=thumbs-up.png +0 -0
  120. package/dist/titles/type=years.png +0 -0
  121. package/dist/trigger-BGG22zoh.js +144 -0
  122. package/dist/tslib.es6-BCqqvLQ_.js +44 -0
  123. package/dist/type_drinks-D6jnpvwV.js +4 -0
  124. package/dist/usePagination-Ds-cuHop.js +223 -0
  125. package/dist/user-DesAMEEX.js +54 -0
  126. package/dist/vue-i18n-CN3WXgAO.js +2365 -0
  127. package/dist/xlsx-BKuxyTY9.js +15491 -0
  128. package/dist/zod-Bg2FbC-D.js +90 -0
  129. package/package.json +1 -1
@@ -0,0 +1,129 @@
1
+ import { defineComponent as j, ref as i, computed as g, onMounted as B, resolveComponent as r, openBlock as m, createBlock as c, unref as o, withCtx as p, createVNode as v, normalizeClass as f, createCommentVNode as k, createElementVNode as L, toDisplayString as F, isRef as M, createElementBlock as O, Fragment as A, renderList as N } from "vue";
2
+ const z = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, E = /* @__PURE__ */ j({
3
+ __name: "FilterChip",
4
+ props: {
5
+ modelValue: {
6
+ type: Array,
7
+ required: !1
8
+ },
9
+ label: {
10
+ type: String,
11
+ required: !1,
12
+ default: ""
13
+ },
14
+ showItemLabel: {
15
+ type: Boolean,
16
+ default: !1
17
+ },
18
+ placement: {
19
+ type: String,
20
+ required: !1,
21
+ default: "bottom-end"
22
+ },
23
+ class: {
24
+ type: String,
25
+ required: !1
26
+ },
27
+ disabled: {
28
+ type: Boolean,
29
+ required: !1
30
+ },
31
+ items: {
32
+ type: Array,
33
+ required: !0
34
+ },
35
+ icon: {
36
+ type: String,
37
+ required: !1
38
+ },
39
+ searchable: {
40
+ type: Boolean,
41
+ required: !1,
42
+ default: !0
43
+ }
44
+ },
45
+ emits: ["update:model-value"],
46
+ setup(u, { emit: C }) {
47
+ const t = u, b = C, d = i(!1), l = i({}), s = i(""), V = g(() => {
48
+ const e = Object.keys(l.value).length;
49
+ return !l.value || Object.keys(l.value).length == t.items.length || e === 0 ? "All" : `${e > 0 ? e : "None"} selected`;
50
+ });
51
+ function w(e) {
52
+ l.value[e] ? delete l.value[e] : l.value[e] = !0, b("update:model-value", Object.keys(l.value));
53
+ }
54
+ function _() {
55
+ Object.keys(l.value).length > 0 ? l.value = {} : l.value = t.items.reduce((e, n) => (e[n.value] = !0, e), {}), b("update:model-value", Object.keys(l.value));
56
+ }
57
+ const x = g(() => s.value && s.value.length > 0 ? t.items.filter(
58
+ (e) => e.label.toLowerCase().includes(s.value.trim().toLowerCase())
59
+ ) : t.items);
60
+ return B(() => {
61
+ l.value = t.modelValue.reduce(
62
+ (e, n) => (e[n] = !0, e),
63
+ {}
64
+ ), t.modelValue.length == 0;
65
+ }), (e, n) => {
66
+ const y = r("FmIcon"), q = r("FmChip"), I = r("FmTextField"), h = r("FmMenuItem"), S = r("FmMenu");
67
+ return m(), c(S, {
68
+ placement: u.placement || "bottom-end",
69
+ disabled: u.disabled == !0,
70
+ "model-value": o(d),
71
+ onMenuChanged: n[1] || (n[1] = (a) => d.value = a),
72
+ "close-on-click": !1
73
+ }, {
74
+ "menu-button": p(() => [
75
+ v(q, {
76
+ label: u.label,
77
+ class: f(t.class || "text-fm-color-neutral-gray-400 cursor-pointer")
78
+ }, {
79
+ default: p(() => [
80
+ t.icon ? (m(), c(y, {
81
+ key: 0,
82
+ name: t.icon,
83
+ class: f(t.class),
84
+ outline: "",
85
+ size: "sm"
86
+ }, null, 8, ["name", "class"])) : k("", !0),
87
+ L("div", z, F(t.label) + " " + F(u.showItemLabel ? o(V) : ""), 1),
88
+ v(y, {
89
+ name: o(d) ? "keyboard_arrow_up" : "keyboard_arrow_down",
90
+ class: f(t.class),
91
+ outline: "",
92
+ size: "sm"
93
+ }, null, 8, ["name", "class"])
94
+ ]),
95
+ _: 1
96
+ }, 8, ["label", "class"])
97
+ ]),
98
+ default: p(() => [
99
+ u.searchable ? (m(), c(I, {
100
+ key: 0,
101
+ modelValue: o(s),
102
+ "onUpdate:modelValue": n[0] || (n[0] = (a) => M(s) ? s.value = a : null),
103
+ placeholder: "Search locations",
104
+ class: "my-8"
105
+ }, null, 8, ["modelValue"])) : k("", !0),
106
+ v(h, {
107
+ "model-value": Object.keys(o(l)).length === t.items.length,
108
+ label: "All",
109
+ "has-checkbox": !0,
110
+ indeterminate: !0,
111
+ onClick: _
112
+ }, null, 8, ["model-value"]),
113
+ (m(!0), O(A, null, N(o(x) ?? [], (a) => (m(), c(h, {
114
+ key: a.value,
115
+ value: a.value,
116
+ label: a.label,
117
+ "has-checkbox": !0,
118
+ "model-value": o(l)[a.value],
119
+ "onUpdate:modelValue": (T) => w(a.value)
120
+ }, null, 8, ["value", "label", "model-value", "onUpdate:modelValue"]))), 128))
121
+ ]),
122
+ _: 1
123
+ }, 8, ["placement", "disabled", "model-value"]);
124
+ };
125
+ }
126
+ });
127
+ export {
128
+ E as _
129
+ };
@@ -0,0 +1,284 @@
1
+ import { defineComponent as q, ref as v, computed as z, onMounted as O, resolveComponent as r, openBlock as f, createElementBlock as C, Fragment as b, createVNode as s, unref as o, withCtx as h, createElementVNode as n, toDisplayString as u, renderList as J, createBlock as k, resolveDynamicComponent as Q, h as l } from "vue";
2
+ import { _ as W } from "./campaign-CpzFl8Vr.js";
3
+ import { useDialog as X, components as w } from "@feedmepos/ui-library";
4
+ import { a as Y, p as Z } from "./plugins-BlvUeMc1.js";
5
+ import { u as ee } from "./loading-CKbcLJje.js";
6
+ import { u as te } from "./business-DtufpzhR.js";
7
+ import { u as oe } from "./campaign-63K4Xtsd.js";
8
+ import { a as $, b as R, g as ae } from "./campaign-Dm85zK-z.js";
9
+ import { _ as ne } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
10
+ import { _ as se } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-B8lOyyAc.js";
11
+ import { u as ie } from "./template-CzqV_mzm.js";
12
+ import { u as re } from "./vue-i18n-CN3WXgAO.js";
13
+ import { _ as le } from "./SendCollectionSheet.vue_vue_type_script_setup_true_lang-bqKHjikC.js";
14
+ import { c as x } from "./index-zy0pOMPl.js";
15
+ const ce = { class: "flex items-center" }, me = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, de = { class: "px-24 flex flex-col gap-y-16" }, ue = { class: "flex items-center justify-between w-full" }, pe = { class: "flex gap-8 overflow-x-auto" }, fe = { class: "space-y-8" }, ge = { class: "flex w-full gap-4 items-center" }, ye = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _e = { class: "space-y-4" }, he = { class: "fm-typo-en-body-lg-600" }, we = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, xe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ve = { class: "flex flex-col gap-16 text-center" }, Ce = { class: "fm-typo-en-title-sm-800" }, be = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Te = /* @__PURE__ */ q({
16
+ __name: "Game",
17
+ setup(ke) {
18
+ const { t: c } = re(), E = {
19
+ label: c("connect.program.common.actions.create", {
20
+ type: c("connect.program.game.title").toLowerCase()
21
+ }),
22
+ value: "create",
23
+ isPrimary: !0,
24
+ prependIcon: "add"
25
+ }, K = ie("GAME", X()), g = te(), p = oe(), { global: M, minor: F } = ee, i = v({
26
+ searchKey: "",
27
+ location: []
28
+ });
29
+ function G(e) {
30
+ const t = i.value.location;
31
+ return !t || t.length === 0 || !e.targetLocation ? !0 : Array.isArray(t) ? t.some((m) => {
32
+ var d;
33
+ return (d = e == null ? void 0 : e.targetLocation) == null ? void 0 : d.includes(m);
34
+ }) : e.targetLocation.includes(t);
35
+ }
36
+ const y = z(
37
+ () => p.campaigns.token.filter((e) => G(e))
38
+ ), I = [
39
+ {
40
+ header: "Program title",
41
+ accessorKey: "name",
42
+ // accessorFn: (v) => v.name,
43
+ cell(e) {
44
+ return l("div", { class: "flex items-center justify-between gap-4" }, [
45
+ l("div", { class: "flex items-center" }, [
46
+ l(
47
+ w.FmTooltip,
48
+ {
49
+ content: e.row.original._id,
50
+ onClick: (t) => {
51
+ t.stopPropagation(), Y(e.row.original._id);
52
+ }
53
+ },
54
+ [
55
+ l(w.FmIcon, {
56
+ name: "info",
57
+ outline: !0,
58
+ size: "sm"
59
+ })
60
+ ]
61
+ )
62
+ ]),
63
+ l("div", { class: "flex-1" }, e.row.original.name)
64
+ ]);
65
+ }
66
+ },
67
+ {
68
+ header: "Status",
69
+ accessorFn: (e) => ae(e),
70
+ cell(e) {
71
+ return $(e.row.original);
72
+ }
73
+ },
74
+ {
75
+ header: "Summary",
76
+ accessorFn: (e) => R(e)
77
+ //v.effect,
78
+ },
79
+ {
80
+ header: "Token received",
81
+ accessorFn: (e) => {
82
+ var t;
83
+ return ((t = e == null ? void 0 : e.pf_collectible) == null ? void 0 : t.currentReceive) ?? 0;
84
+ }
85
+ },
86
+ {
87
+ header: "Actions",
88
+ cell(e) {
89
+ return l("div", { class: "flex items-center gap-8" }, [
90
+ l(w.FmButton, {
91
+ variant: "tertiary",
92
+ icon: "send",
93
+ iconColor: "neutral-gray-400",
94
+ onClick: (t) => {
95
+ t.stopPropagation(), U(e.row.original);
96
+ }
97
+ }),
98
+ l(w.FmButton, {
99
+ variant: "tertiary",
100
+ icon: "delete",
101
+ iconColor: "neutral-gray-400",
102
+ onClick: (t) => {
103
+ t.stopPropagation(), P(e.row.original);
104
+ }
105
+ })
106
+ ]);
107
+ }
108
+ }
109
+ ], S = v(), L = v();
110
+ async function P(e) {
111
+ await Z.remove(`Are you sure you want to remove ${e.name}?`) && await F(
112
+ async () => {
113
+ await x.delete(e._id), await p.read("GAME");
114
+ },
115
+ {
116
+ message: `Removing ${e.name}`,
117
+ successMessage: `Removed ${e.name} successfully`
118
+ }
119
+ );
120
+ }
121
+ async function _(e) {
122
+ e ? await t() : K.open(async (m) => {
123
+ await t(m);
124
+ });
125
+ async function t(m) {
126
+ var d;
127
+ (d = S.value) == null || d.showSheet(
128
+ !0,
129
+ "GAME",
130
+ e ? await x.readById(e._id) : void 0,
131
+ m
132
+ );
133
+ }
134
+ }
135
+ async function T(e) {
136
+ await F(
137
+ async () => {
138
+ e.campaign._id ? await x.update(e.campaign._id, e) : await x.create(e), await p.read("GAME");
139
+ },
140
+ {
141
+ message: `${e.campaign._id ? "Updating" : "Creating"} game program`,
142
+ successMessage: `Game program ${e.campaign._id ? "updated" : "created"} successfully`
143
+ }
144
+ );
145
+ }
146
+ function U(e) {
147
+ var t;
148
+ (t = L.value) == null || t.showSheet({
149
+ campaign: e
150
+ });
151
+ }
152
+ return O(async () => {
153
+ await M(async () => {
154
+ await p.read("GAME"), await g.readPremium();
155
+ });
156
+ }), (e, t) => {
157
+ const m = r("FmPill"), d = r("FmPageHead"), V = r("FmSearch"), j = r("FmTable"), A = r("FmButton"), D = r("FmListItem"), H = r("FmList"), N = r("FmCard");
158
+ return f(), C(b, null, [
159
+ s(d, {
160
+ actions: o(y).length > 0 && o(g).isPremium ? [E] : [],
161
+ "onClick:action": t[0] || (t[0] = () => _())
162
+ }, {
163
+ title: h(() => [
164
+ n("div", ce, [
165
+ n("span", me, u(o(c)("connect.program.game.title")), 1),
166
+ s(m, { variant: "premium" })
167
+ ])
168
+ ]),
169
+ _: 1
170
+ }, 8, ["actions"]),
171
+ n("div", de, [
172
+ s(V, {
173
+ modelValue: o(i).searchKey,
174
+ "onUpdate:modelValue": t[1] || (t[1] = (a) => o(i).searchKey = a),
175
+ class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
176
+ placeholder: "search",
177
+ collapsible: ""
178
+ }, null, 8, ["modelValue"]),
179
+ o(p).campaigns.token && o(p).campaigns.token.length > 0 ? (f(), C(b, { key: 0 }, [
180
+ n("div", ue, [
181
+ n("div", pe, [
182
+ s(ne, {
183
+ label: `${o(c)("connect.common.location")}: `,
184
+ "right-icon": "keyboard_arrow_down",
185
+ modelValue: o(i).location,
186
+ "onUpdate:modelValue": t[2] || (t[2] = (a) => o(i).location = a),
187
+ icon: "storefront",
188
+ "show-item-label": !0,
189
+ items: o(g).locationOptions
190
+ }, null, 8, ["label", "modelValue", "items"])
191
+ ]),
192
+ s(V, {
193
+ modelValue: o(i).searchKey,
194
+ "onUpdate:modelValue": t[3] || (t[3] = (a) => o(i).searchKey = a),
195
+ class: "xs:hidden",
196
+ placeholder: "search",
197
+ collapsible: ""
198
+ }, null, 8, ["modelValue"])
199
+ ]),
200
+ s(j, {
201
+ class: "xs:hidden",
202
+ "row-data": o(y),
203
+ "column-defs": I,
204
+ "search-value": o(i).searchKey,
205
+ "column-filter": [],
206
+ onRowClick: t[4] || (t[4] = (a) => _(a.original)),
207
+ "hide-footer": o(y).length < 10
208
+ }, null, 8, ["row-data", "search-value", "hide-footer"]),
209
+ s(H, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
210
+ default: h(() => [
211
+ (f(!0), C(b, null, J(o(y).filter(
212
+ (a) => a.name.toLowerCase().includes(o(i).searchKey.toLowerCase())
213
+ ), (a) => (f(), k(D, {
214
+ key: a._id.toString(),
215
+ onClick: (B) => _(a),
216
+ class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
217
+ }, {
218
+ default: h(() => [
219
+ n("div", fe, [
220
+ n("div", ge, [
221
+ (f(), k(Q(o($)(a)))),
222
+ n("div", ye, u(a.currentReceive ?? 0) + " used ", 1)
223
+ ]),
224
+ n("div", _e, [
225
+ n("div", he, u(a.name), 1),
226
+ n("div", we, u(o(R)(a)), 1)
227
+ ]),
228
+ n("div", xe, u(o(c)("connect.program.game.token_received", {
229
+ count: a.currentReceive ?? 0
230
+ })), 1)
231
+ ]),
232
+ s(A, {
233
+ icon: "delete",
234
+ "icon-color": "neutral-gray-400",
235
+ variant: "tertiary",
236
+ onClick: (B) => (B.stopPropagation(), P(a))
237
+ }, null, 8, ["onClick"])
238
+ ]),
239
+ _: 2
240
+ }, 1032, ["onClick"]))), 128))
241
+ ]),
242
+ _: 1
243
+ })
244
+ ], 64)) : (f(), k(N, {
245
+ key: 1,
246
+ variant: "outlined",
247
+ class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
248
+ }, {
249
+ default: h(() => [
250
+ t[6] || (t[6] = n("img", {
251
+ src: W,
252
+ class: "aspect-square w-[150px]"
253
+ }, null, -1)),
254
+ n("div", ve, [
255
+ n("div", Ce, u(o(c)("connect.program.game.empty_state.title")), 1),
256
+ n("div", be, u(o(c)("connect.program.game.empty_state.description")), 1)
257
+ ]),
258
+ s(A, {
259
+ variant: "primary",
260
+ label: "Create game program",
261
+ icon: "add",
262
+ disabled: !o(g).isPremium,
263
+ onClick: t[5] || (t[5] = (a) => _())
264
+ }, null, 8, ["disabled"])
265
+ ]),
266
+ _: 1
267
+ })),
268
+ s(se, {
269
+ ref_key: "sheetRef",
270
+ ref: S,
271
+ "onSubmit:modelValue": T
272
+ }, null, 512),
273
+ s(le, {
274
+ ref_key: "sendCollectionSheetRef",
275
+ ref: L
276
+ }, null, 512)
277
+ ])
278
+ ], 64);
279
+ };
280
+ }
281
+ });
282
+ export {
283
+ Te as default
284
+ };
@@ -0,0 +1,144 @@
1
+ import { openBlock as l, createElementBlock as o, createElementVNode as i, defineComponent as C, ref as v, onMounted as $, resolveComponent as f, renderSlot as b, toDisplayString as r, createCommentVNode as x, normalizeStyle as R, unref as s, Fragment as h, createVNode as w, withCtx as g, createTextVNode as p, normalizeClass as V, createBlock as F } from "vue";
2
+ import { _ as z } from "./_plugin-vue_export-helper-CHgC5LLL.js";
3
+ const H = {}, N = { class: "animate-pulse flex space-x-4 bg-gray-300 dark:bg-gray-700 items-center justify-center rounded w-full h-full" };
4
+ function A(e, d) {
5
+ return l(), o("div", N, [...d[0] || (d[0] = [
6
+ i("svg", {
7
+ class: "dark:text-gray-600 h-10 text-gray-200 w-10",
8
+ "aria-hidden": "true",
9
+ xmlns: "http://www.w3.org/2000/svg",
10
+ fill: "currentColor",
11
+ viewBox: "0 0 20 18"
12
+ }, [
13
+ i("path", { d: "M18 0H2a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2Zm-5.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Zm4.376 10.481A1 1 0 0 1 16 15H4a1 1 0 0 1-.895-1.447l3.5-7A1 1 0 0 1 7.468 6a.965.965 0 0 1 .9.5l2.775 4.757 1.546-1.887a1 1 0 0 1 1.618.1l2.541 4a1 1 0 0 1 .028 1.011Z" })
14
+ ], -1)
15
+ ])]);
16
+ }
17
+ const D = /* @__PURE__ */ z(H, [["render", A]]), I = { class: "max-w-full max-h-[400px] space-y-4" }, L = { key: 0 }, T = { class: "text-fm-color-typo-secondary fm-typo-en-body-sm-400" }, U = {
18
+ key: 1,
19
+ class: "h-full w-full relative bg-fm-color-neutral-white p-12 border-2 border-dashed border-fm-color-neutral-gray-300 rounded-md flex flex-col items-center justify-center gap-8 hover:border-fm-color-neutral-gray-400"
20
+ }, Z = ["src"], _ = ["src"], E = { class: "absolute right-0 top-0" }, O = /* @__PURE__ */ C({
21
+ __name: "ImageInput",
22
+ props: {
23
+ required: {
24
+ type: Boolean,
25
+ default: () => !1
26
+ },
27
+ disabled: {
28
+ type: Boolean,
29
+ default: () => !1
30
+ },
31
+ thumbnail: {
32
+ type: String,
33
+ default: () => {
34
+ }
35
+ },
36
+ file: {
37
+ type: File,
38
+ default: () => {
39
+ }
40
+ },
41
+ label: {
42
+ type: String,
43
+ default: () => {
44
+ }
45
+ },
46
+ aspectRatio: {
47
+ type: String,
48
+ default: "2/3"
49
+ },
50
+ imageFit: {
51
+ type: String,
52
+ default: "contain"
53
+ },
54
+ accept: {
55
+ type: String,
56
+ default: ".png, .jpg, .jpeg, .webm"
57
+ },
58
+ recommendedSize: {
59
+ type: String,
60
+ default: "Recommended: 950px x 600px"
61
+ },
62
+ deleteButton: {
63
+ type: Boolean,
64
+ default: !0
65
+ }
66
+ },
67
+ emits: ["update:file"],
68
+ setup(e, { emit: d }) {
69
+ const c = e, a = v({
70
+ loading: !1,
71
+ imgsrc: c.thumbnail
72
+ }), m = v(!1), y = d;
73
+ async function u(t) {
74
+ return t == null ? (a.value.imgsrc = void 0, y("update:file", null)) : (m.value = !!t.type.startsWith("video/"), a.value.loading = !0, a.value.imgsrc = URL.createObjectURL(t), a.value.loading = !1, y("update:file", t));
75
+ }
76
+ return $(() => {
77
+ var t;
78
+ c.file && u(c.file), (t = c.thumbnail) != null && t.includes("mp4") && (m.value = !0);
79
+ }), (t, n) => {
80
+ const k = f("FmDropField"), S = f("FmHelperText"), B = f("FmButton");
81
+ return l(), o("div", I, [
82
+ b(t.$slots, "label", {}, () => [
83
+ e.label ? (l(), o("div", L, r(e.label), 1)) : x("", !0)
84
+ ]),
85
+ i("div", {
86
+ style: R({ "aspect-ratio": e.aspectRatio }),
87
+ class: "flex flex-col max-h-full max-w-full"
88
+ }, [
89
+ s(a).loading ? (l(), F(D, { key: 1 })) : (l(), o(h, { key: 0 }, [
90
+ s(a).imgsrc ? (l(), o("div", U, [
91
+ s(m) ? (l(), o("video", {
92
+ key: 1,
93
+ src: s(a).imgsrc || e.thumbnail,
94
+ class: "w-full h-full",
95
+ controls: ""
96
+ }, null, 8, _)) : (l(), o("img", {
97
+ key: 0,
98
+ class: V([`object-${e.imageFit}`, "w-full h-full"]),
99
+ src: s(a).imgsrc || e.thumbnail
100
+ }, null, 10, Z)),
101
+ i("div", E, [
102
+ b(t.$slots, "delete-button"),
103
+ e.deleteButton ? (l(), F(B, {
104
+ key: 0,
105
+ class: "!text-neutral-50 !bg-neutral-700",
106
+ icon: "delete",
107
+ variant: "tertiary",
108
+ disabled: e.disabled,
109
+ onClick: n[1] || (n[1] = (j) => u(null))
110
+ }, null, 8, ["disabled"])) : x("", !0)
111
+ ])
112
+ ])) : (l(), o(h, { key: 0 }, [
113
+ w(k, {
114
+ class: "flex-1 hihiha",
115
+ accept: e.accept,
116
+ disabled: e.disabled,
117
+ onFileUpload: u,
118
+ onFileRejected: n[0] || (n[0] = (j) => u(null))
119
+ }, {
120
+ label: g(() => [...n[2] || (n[2] = [
121
+ p(r(void 0), -1)
122
+ ])]),
123
+ "helper-text": g(() => [...n[3] || (n[3] = [
124
+ p(r(void 0), -1)
125
+ ])]),
126
+ "accept-text": g(() => [
127
+ i("div", T, [
128
+ i("div", null, "(" + r(e.recommendedSize) + ")", 1),
129
+ p(" Accepts " + r(e.accept), 1)
130
+ ])
131
+ ]),
132
+ _: 1
133
+ }, 8, ["accept", "disabled"]),
134
+ w(S, { text: "" })
135
+ ], 64))
136
+ ], 64))
137
+ ], 4)
138
+ ]);
139
+ };
140
+ }
141
+ });
142
+ export {
143
+ O as _
144
+ };