@feedmepos/mf-connect 0.1.98-beta.2 → 0.1.98-beta.21
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.
- package/dist/{App-BWBeJksP.js → App-B3f8GWoR.js} +794 -654
- package/dist/{AuditLogs-CWVUX5o0.js → AuditLogs-LRHzzpqj.js} +9 -9
- package/dist/{Bin-jXmZpGfg.js → Bin-Y761Ua4-.js} +8 -8
- package/dist/{Broadcast-C76pTADb.js → Broadcast-CdRuG42N.js} +38 -36
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-9kfq8OXE.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CsULDH9l.js} +5 -5
- package/dist/{Card-qXn83BYu.js → Card-GZ3ZLnBl.js} +18 -18
- package/dist/{Collections-DGXUQSbz.js → Collections-B59fL-oS.js} +7 -7
- package/dist/{Credit-CpmrPZx9.js → Credit-DJxzXBam.js} +48 -48
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-DAnw5TFZ.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-C3d8frgZ.js} +30 -30
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BCAotF0P.js → EffectSheet.vue_vue_type_style_index_0_lang-DKUFvacX.js} +6 -6
- package/dist/{Experience-CuOq7hd3.js → Experience-lzpvYFPP.js} +9 -9
- package/dist/{FileSaver.min-Cjv6SzrG.js → FileSaver.min-BXoEv5ve.js} +1 -1
- package/dist/{Game-D0KfLD-b.js → Game-KCxIpXEC.js} +10 -10
- package/dist/{Grab-L1h7bHD7.js → Grab-BQgS104D.js} +8 -8
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-DMAaHxzm.js → ImageInput.vue_vue_type_script_setup_true_lang-Cz9iB9ox.js} +1 -1
- package/dist/{Index-DxwMHEV3.js → Index-B5UTBbUy.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-i9-B25xO.js → LocationPicker.vue_vue_type_script_setup_true_lang-CLLhy4-v.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-D84v7zC_.js → LottieAnimation.vue_vue_type_script_setup_true_lang-BiIqs4zW.js} +1 -1
- package/dist/{LoyaltyDashboard-B5wg1EUC.js → LoyaltyDashboard-DPHWpaNJ.js} +4 -4
- package/dist/{MainLayout-Cgi3Z3EM.js → MainLayout-AvQ4_-oT.js} +1 -1
- package/dist/{Marketing-Cl5OSBI1.js → Marketing-Bn1ygF8d.js} +4 -4
- package/dist/{MarketingMaterialEdit-CzYTbdJd.js → MarketingMaterialEdit-Cw-VPVqE.js} +6 -6
- package/dist/{Member-D29x5Cic.js → Member-CpEXFHIF.js} +11 -11
- package/dist/{MemberList-DDPe6Ymr.js → MemberList-gSEw_idJ.js} +25 -25
- package/dist/{MemberTransactions-3mboVWAx.js → MemberTransactions-DEMzj9-y.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-C2HlA9O8.js → MessageInput.vue_vue_type_script_setup_true_lang-B4Y5KPpw.js} +5737 -5552
- package/dist/{Mission-CMPc4NLe.js → Mission-DMtpauNQ.js} +10 -10
- package/dist/Overview-CMudFYOc.js +969 -0
- package/dist/{Overview-sJ2kuP4U.js → Overview-DjNcF88f.js} +18 -18
- package/dist/{Point-BBP4UEhf.js → Point-CgdTrgXc.js} +9 -9
- package/dist/{Promotion-Bt0RLGsd.js → Promotion-DDQodFDb.js} +10 -10
- package/dist/{Queue-CzVsoIDM.js → Queue-BjoAJoVe.js} +14 -14
- package/dist/{Record-CAoGgaxo.js → Record-CfZFuwy_.js} +9 -9
- package/dist/Review-pIAxbjVU.js +45 -0
- package/dist/ReviewFacebookCallback-BRW4T-5-.js +238 -0
- package/dist/ReviewGoogleCallback-B-6EojXR.js +213 -0
- package/dist/{Reward-CrpFlr0a.js → Reward-_pdE2XZp.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-DW-WFNI6.js → RewardGroup.vue_vue_type_script_setup_true_lang-S5dh0IGc.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-DlcsO8fk.js → RuleGroup.vue_vue_type_script_setup_true_lang-C9B7NmF0.js} +13 -13
- package/dist/{Segment-Cy-QwYQQ.js → Segment-B1EMe-LZ.js} +23 -23
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-ovvxxcrQ.js → SelectItems.vue_vue_type_script_setup_true_lang-DAmjk8b3.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-D69bJtyd.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-C7sgPf8l.js} +12 -12
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-DQyoPZ_6.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DVYTZr_E.js} +4 -4
- package/dist/{Setting-DEQIJ4fY.js → Setting-CQQ6zacB.js} +14 -14
- package/dist/{SettingAdvertisements-NuwjCPLN.js → SettingAdvertisements-9Wl9VWbM.js} +12 -12
- package/dist/Settings-Bvj2ChDR.js +228 -0
- package/dist/{Store-Cw2J_ecA.js → Store-BdUZ22g6.js} +21 -21
- package/dist/{StoreRewards-BK5rDAaK.js → StoreRewards-DsUS_Lu1.js} +15 -15
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-B3jwaYHX.js → StoreTransactions.vue_vue_type_script_setup_true_lang-Zw-lIDCN.js} +190 -187
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-D_OdWctk.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BECp3eqQ.js} +2 -2
- package/dist/{Tier-CwZ40RYc.js → Tier-2-mJ3SNK.js} +22 -22
- package/dist/{Title-DU7KmsK2.js → Title-BjeEDjxl.js} +19 -19
- package/dist/{Transaction-Uh5Ozt93.js → Transaction--U_kJKec.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BtnUNkcS.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BkLyvjA5.js} +6 -6
- package/dist/{Voucher-BF6ARaRe.js → Voucher-INa3N_6V.js} +13 -13
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-C7msPJdi.js → VoucherEditor.vue_vue_type_script_setup_true_lang-4Quzmc7-.js} +12 -12
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BrR2WA1K.js → ZodTextField.vue_vue_type_script_setup_true_lang-CPCnBExY.js} +2 -2
- package/dist/{app-DlECkPwT.js → app-Dlqr-LX4.js} +1551 -1223
- package/dist/app.js +1 -1
- package/dist/{business-BSe9C-xG.js → business-DWrfGEe_.js} +1 -1
- package/dist/{campaign-BNS2RxKc.js → campaign-DtNt-BqN.js} +10 -10
- package/dist/{campaign-CXw3jpdr.js → campaign-un9Ji1KF.js} +1 -1
- package/dist/{campaign.enum-CnMa2Tia.js → campaign.enum-B9-ZpK0C.js} +1 -1
- package/dist/{campaign.fn-CNOinW8t.js → campaign.fn-COxaWmi_.js} +93 -93
- package/dist/{collectible.enum-BIvEz79q.js → collectible.enum-CF0VF-r7.js} +1 -1
- package/dist/{duplicateCampaign-Co2TdbrL.js → duplicateCampaign-8ciT68QF.js} +2 -2
- package/dist/{effect-Bt8PE3-M.js → effect-CaSn-84h.js} +1 -1
- package/dist/{email-addresses-Dh95ALqP.js → email-addresses-BiMQ8xIx.js} +2 -2
- package/dist/{export-DIIgAwP7.js → export-BwBNgCo5.js} +3 -3
- package/dist/google-BQK68wbe.js +5 -0
- package/dist/{helper-8zEdQ9jm.js → helper-CajV_0CM.js} +1 -1
- package/dist/{index-BP5qSDQw.js → index-B0ohh62P.js} +216 -194
- package/dist/{index-VS1hWlhk.js → index-B6ldAC8Y.js} +1 -1
- package/dist/{index-rwlkBKrS.js → index-B6tm_U_M.js} +3 -3
- package/dist/{index-Bqxe3Gbq.js → index-BP5rdioN.js} +3 -3
- package/dist/{index-ZKJoXi1-.js → index-Bqcfsd4p.js} +3 -3
- package/dist/{index-DDp0nMys.js → index-CQIciFrH.js} +1 -1
- package/dist/{index-DdCPfF8x.js → index-CQj9BQlQ.js} +2 -2
- package/dist/{index-BAlFstx4.js → index-CjW6Mj-1.js} +1 -1
- package/dist/{index-SsUBL4IR.js → index-D1--K-QL.js} +1 -1
- package/dist/{index-CfxDirFl.js → index-D1vhLY7l.js} +1 -1
- package/dist/{index-CWypTyOP.js → index-D90p28Hr.js} +31 -37
- package/dist/{index-0BNEvaYc.js → index-DBUTFa2h.js} +2 -2
- package/dist/{index-DW4-mTTG.js → index-DWBKko92.js} +26 -17
- package/dist/{index-IPOrNVQw.js → index-J8pSZ3WO.js} +1 -1
- package/dist/{index.esm2017-CgR02aQB.js → index.esm2017-QlPanYiW.js} +105 -105
- package/dist/{loading-CxY9qhzD.js → loading-CqqkzWSm.js} +1 -1
- package/dist/{lodash-CELsN1M_.js → lodash-DmbW2QhA.js} +1 -1
- package/dist/{membership-BoQMuerb.js → membership-Dcwyu-rr.js} +3 -3
- package/dist/{money-CH913hGN.js → money-DWr1gi--.js} +1 -1
- package/dist/{number-CO-WbLdr.js → number-CHhHAd1q.js} +1 -1
- package/dist/objectid-BsiuHVH8.js +145 -0
- package/dist/{plugins-YK45gSb1.js → plugins-BxmMI8fo.js} +3 -3
- package/dist/{reward-3aFPahH6.js → reward-DX0FjsNT.js} +1 -1
- package/dist/{rule-DC9my0Vg.js → rule-DDLcqiHH.js} +3 -3
- package/dist/{template-tDq12e1p.js → template-C0lF82yv.js} +6 -6
- package/dist/{trigger-DoPHRgKt.js → trigger-CsJcg_RY.js} +5 -5
- package/dist/{useMarketingMaterialActions-CEd6ODsz.js → useMarketingMaterialActions-B0iV6YzB.js} +3 -3
- package/dist/{usePagination-C8FUj5q_.js → usePagination-4EISkyGW.js} +1 -1
- package/dist/{user-Dhlhrnf8.js → user-DZuSeqRY.js} +1 -1
- package/dist/{vue-i18n-B-92uhPn.js → vue-i18n-BKcwYlp1.js} +252 -252
- package/dist/{xlsx-Dmxne1eM.js → xlsx-C-7dia55.js} +1 -1
- package/dist/{zod-Dcdy9Dm3.js → zod-DPxXVSRw.js} +1 -1
- package/package.json +3 -3
- package/dist/Review-CVBJlwGK.js +0 -959
- package/dist/ReviewFacebookCallback-RGWdxXYf.js +0 -243
- package/dist/ReviewGoogleCallback-L7_Jjbkx.js +0 -208
- package/dist/objectid-BM2Ygj-U.js +0 -145
|
@@ -1,243 +0,0 @@
|
|
|
1
|
-
import { defineComponent as S, computed as T, openBlock as d, createElementBlock as g, normalizeClass as z, createElementVNode as m, createBlock as C, unref as e, toDisplayString as k, createCommentVNode as $, createVNode as v, onMounted as B, ref as P, Fragment as E, renderList as N, resolveComponent as R, isRef as U } from "vue";
|
|
2
|
-
import { u as M } from "./vue-i18n-B-92uhPn.js";
|
|
3
|
-
import { components as x } from "@feedmepos/ui-library";
|
|
4
|
-
import { r as L } from "./index-DW4-mTTG.js";
|
|
5
|
-
import { u as V } from "./business-BSe9C-xG.js";
|
|
6
|
-
import { _ as A } from "./LocationPicker.vue_vue_type_script_setup_true_lang-i9-B25xO.js";
|
|
7
|
-
import { useRouter as H } from "vue-router";
|
|
8
|
-
const D = ["src"], q = { class: "fm-typo-en-body-md-600 flex-1 truncate" }, G = {
|
|
9
|
-
key: 2,
|
|
10
|
-
class: "fm-typo-en-body-sm-400 text-fm-color-primary-500 shrink-0"
|
|
11
|
-
}, J = /* @__PURE__ */ S({
|
|
12
|
-
__name: "FacebookPageConfig",
|
|
13
|
-
props: {
|
|
14
|
-
page: {},
|
|
15
|
-
expanded: { type: Boolean },
|
|
16
|
-
availableLocations: {}
|
|
17
|
-
},
|
|
18
|
-
emits: ["toggleExpand", "toggleLocation"],
|
|
19
|
-
setup(c, { emit: n }) {
|
|
20
|
-
const b = c, i = n, { t: h } = M(), f = T(
|
|
21
|
-
() => b.page.locations.map((_) => _._id)
|
|
22
|
-
);
|
|
23
|
-
return (_, l) => (d(), g("div", {
|
|
24
|
-
class: z([
|
|
25
|
-
"rounded-lg border overflow-hidden transition-colors",
|
|
26
|
-
c.expanded ? "border-fm-color-primary-500" : "border-fm-color-neutral-gray-200"
|
|
27
|
-
])
|
|
28
|
-
}, [
|
|
29
|
-
m("button", {
|
|
30
|
-
class: "w-full flex items-center gap-12 p-16 bg-white text-left hover:bg-fm-color-neutral-gray-50 transition-colors",
|
|
31
|
-
onClick: l[0] || (l[0] = (w) => i("toggleExpand"))
|
|
32
|
-
}, [
|
|
33
|
-
c.page.pageProfileImageUrl ? (d(), g("img", {
|
|
34
|
-
key: 0,
|
|
35
|
-
src: c.page.pageProfileImageUrl,
|
|
36
|
-
class: "w-32 h-32 rounded-full shrink-0 object-cover"
|
|
37
|
-
}, null, 8, D)) : (d(), C(e(x).FmIcon, {
|
|
38
|
-
key: 1,
|
|
39
|
-
name: "thumb_up",
|
|
40
|
-
class: "text-fm-color-neutral-gray-400 shrink-0"
|
|
41
|
-
})),
|
|
42
|
-
m("span", q, k(c.page.pageName), 1),
|
|
43
|
-
c.page.locations.length > 0 ? (d(), g("span", G, k(e(h)("connect.review.locationsSelected", c.page.locations.length)), 1)) : $("", !0),
|
|
44
|
-
v(e(x).FmIcon, {
|
|
45
|
-
name: c.expanded ? "expand_less" : "expand_more",
|
|
46
|
-
class: "text-fm-color-neutral-gray-400 shrink-0"
|
|
47
|
-
}, null, 8, ["name"])
|
|
48
|
-
]),
|
|
49
|
-
c.expanded ? (d(), C(A, {
|
|
50
|
-
key: 0,
|
|
51
|
-
locations: c.availableLocations,
|
|
52
|
-
"selected-ids": e(f),
|
|
53
|
-
onToggle: l[1] || (l[1] = (w) => i("toggleLocation", w))
|
|
54
|
-
}, null, 8, ["locations", "selected-ids"])) : $("", !0)
|
|
55
|
-
], 2));
|
|
56
|
-
}
|
|
57
|
-
}), K = { class: "flex flex-col gap-8" }, O = /* @__PURE__ */ S({
|
|
58
|
-
__name: "FacebookPageLocationMapping",
|
|
59
|
-
props: {
|
|
60
|
-
pages: {}
|
|
61
|
-
},
|
|
62
|
-
emits: ["update:pages"],
|
|
63
|
-
setup(c, { emit: n }) {
|
|
64
|
-
const b = c, i = V();
|
|
65
|
-
B(() => i.readLocations());
|
|
66
|
-
const h = n, f = P(null), _ = T(() => {
|
|
67
|
-
const r = /* @__PURE__ */ new Set();
|
|
68
|
-
for (const p of b.pages)
|
|
69
|
-
p.locations.forEach((a) => r.add(a._id));
|
|
70
|
-
return r;
|
|
71
|
-
});
|
|
72
|
-
function l(r) {
|
|
73
|
-
const p = new Set(r.locations.map((a) => a._id));
|
|
74
|
-
return i.locations.filter((a) => {
|
|
75
|
-
const t = a._id.toString();
|
|
76
|
-
return !_.value.has(t) || p.has(t);
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
function w(r, p) {
|
|
80
|
-
const a = p._id.toString(), t = b.pages.map((o) => {
|
|
81
|
-
if (o.facebookPageId !== r) return o;
|
|
82
|
-
const u = o.locations.some(
|
|
83
|
-
(s) => s._id === a
|
|
84
|
-
);
|
|
85
|
-
return {
|
|
86
|
-
...o,
|
|
87
|
-
locations: u ? o.locations.filter((s) => s._id !== a) : [
|
|
88
|
-
...o.locations,
|
|
89
|
-
{
|
|
90
|
-
_id: a,
|
|
91
|
-
name: p.name
|
|
92
|
-
}
|
|
93
|
-
]
|
|
94
|
-
};
|
|
95
|
-
});
|
|
96
|
-
h("update:pages", t);
|
|
97
|
-
}
|
|
98
|
-
function I(r) {
|
|
99
|
-
f.value = f.value === r ? null : r;
|
|
100
|
-
}
|
|
101
|
-
return (r, p) => (d(), g("div", K, [
|
|
102
|
-
(d(!0), g(E, null, N(c.pages, (a) => (d(), C(J, {
|
|
103
|
-
key: a.facebookPageId,
|
|
104
|
-
page: a,
|
|
105
|
-
expanded: e(f) === a.facebookPageId,
|
|
106
|
-
"available-locations": l(a),
|
|
107
|
-
onToggleExpand: (t) => I(a.facebookPageId),
|
|
108
|
-
onToggleLocation: (t) => w(a.facebookPageId, t)
|
|
109
|
-
}, null, 8, ["page", "expanded", "available-locations", "onToggleExpand", "onToggleLocation"]))), 128))
|
|
110
|
-
]));
|
|
111
|
-
}
|
|
112
|
-
}), Q = { class: "flex flex-col min-h-full gap-16 p-24" }, W = {
|
|
113
|
-
key: 0,
|
|
114
|
-
class: "flex flex-col items-center justify-center flex-1 gap-16"
|
|
115
|
-
}, X = { class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400" }, Y = {
|
|
116
|
-
key: 1,
|
|
117
|
-
class: "flex flex-col items-center justify-center flex-1 gap-16"
|
|
118
|
-
}, Z = { class: "fm-typo-en-body-lg-600" }, ee = { class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400" }, oe = {
|
|
119
|
-
key: 2,
|
|
120
|
-
class: "flex flex-col items-center justify-center flex-1 gap-16"
|
|
121
|
-
}, te = { class: "fm-typo-en-body-lg-600" }, ne = { class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400" }, ae = { class: "fm-typo-en-body-lg-600" }, se = { class: "flex gap-8 justify-end mt-auto pt-8" }, ge = /* @__PURE__ */ S({
|
|
122
|
-
__name: "ReviewFacebookCallback",
|
|
123
|
-
setup(c) {
|
|
124
|
-
const { t: n } = M(), b = H(), i = P([]), h = P(!1), f = P(!1), _ = P(!1), l = P(null), w = T(
|
|
125
|
-
() => i.value.some((t) => t.locations.length > 0)
|
|
126
|
-
);
|
|
127
|
-
function I(t, o) {
|
|
128
|
-
const u = new Map(
|
|
129
|
-
o.map((s) => [s.facebookPageId, s])
|
|
130
|
-
);
|
|
131
|
-
return t.map((s) => {
|
|
132
|
-
var y;
|
|
133
|
-
return {
|
|
134
|
-
...s,
|
|
135
|
-
locations: ((y = u.get(s.facebookPageId)) == null ? void 0 : y.locations) ?? []
|
|
136
|
-
};
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
function r(t, o) {
|
|
140
|
-
return t instanceof Error ? t.message : o;
|
|
141
|
-
}
|
|
142
|
-
async function p() {
|
|
143
|
-
var s;
|
|
144
|
-
const t = window.location.hash;
|
|
145
|
-
if (!t) {
|
|
146
|
-
l.value = n("connect.review.noToken");
|
|
147
|
-
return;
|
|
148
|
-
}
|
|
149
|
-
const u = new URLSearchParams(t.slice(1)).get("access_token");
|
|
150
|
-
if (!u) {
|
|
151
|
-
l.value = n("connect.review.noToken");
|
|
152
|
-
return;
|
|
153
|
-
}
|
|
154
|
-
h.value = !0;
|
|
155
|
-
try {
|
|
156
|
-
const y = await L.getSource(), j = ((s = y == null ? void 0 : y.facebook) == null ? void 0 : s.pages) ?? [], F = await L.connectFacebook(u);
|
|
157
|
-
i.value = I((F == null ? void 0 : F.pages) ?? [], j), i.value.length === 0 && (l.value = n("connect.review.facebook.noPages"));
|
|
158
|
-
} catch (y) {
|
|
159
|
-
l.value = r(y, n("connect.review.facebook.failed"));
|
|
160
|
-
} finally {
|
|
161
|
-
h.value = !1;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
async function a() {
|
|
165
|
-
const t = i.value.filter((o) => o.locations.length > 0).map((o) => ({
|
|
166
|
-
facebookPageId: o.facebookPageId,
|
|
167
|
-
locationIds: o.locations.map((u) => u._id)
|
|
168
|
-
}));
|
|
169
|
-
if (t.length === 0) {
|
|
170
|
-
l.value = n("connect.review.noMappings");
|
|
171
|
-
return;
|
|
172
|
-
}
|
|
173
|
-
f.value = !0;
|
|
174
|
-
try {
|
|
175
|
-
await L.updateFacebookPages(t), _.value = !0, setTimeout(() => b.replace("/review"), 2e3);
|
|
176
|
-
} catch (o) {
|
|
177
|
-
l.value = r(o, n("connect.review.facebook.failed"));
|
|
178
|
-
} finally {
|
|
179
|
-
f.value = !1;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
return B(p), (t, o) => {
|
|
183
|
-
const u = R("FmPageHead");
|
|
184
|
-
return d(), g(E, null, [
|
|
185
|
-
v(u, {
|
|
186
|
-
title: e(n)("connect.navigation.review")
|
|
187
|
-
}, null, 8, ["title"]),
|
|
188
|
-
m("div", Q, [
|
|
189
|
-
e(h) ? (d(), g("div", W, [
|
|
190
|
-
v(e(x).FmIcon, {
|
|
191
|
-
name: "sync",
|
|
192
|
-
size: "xl",
|
|
193
|
-
class: "animate-spin text-fm-color-neutral-gray-400"
|
|
194
|
-
}),
|
|
195
|
-
m("p", X, k(e(n)("connect.review.facebook.fetching")), 1)
|
|
196
|
-
])) : e(_) ? (d(), g("div", Y, [
|
|
197
|
-
v(e(x).FmIcon, {
|
|
198
|
-
name: "check_circle",
|
|
199
|
-
size: "xl",
|
|
200
|
-
class: "text-fm-color-typo-success"
|
|
201
|
-
}),
|
|
202
|
-
m("p", Z, k(e(n)("connect.review.facebook.success")), 1),
|
|
203
|
-
m("p", ee, k(e(n)("connect.review.redirecting")), 1)
|
|
204
|
-
])) : e(l) ? (d(), g("div", oe, [
|
|
205
|
-
v(e(x).FmIcon, {
|
|
206
|
-
name: "error",
|
|
207
|
-
size: "xl",
|
|
208
|
-
class: "text-fm-color-system-error-500"
|
|
209
|
-
}),
|
|
210
|
-
m("p", te, k(e(n)("connect.review.errorTitle")), 1),
|
|
211
|
-
m("p", ne, k(e(l)), 1),
|
|
212
|
-
v(e(x).FmButton, {
|
|
213
|
-
label: e(n)("connect.review.goBack"),
|
|
214
|
-
onClick: o[0] || (o[0] = (s) => e(b).replace("/review"))
|
|
215
|
-
}, null, 8, ["label"])
|
|
216
|
-
])) : e(i).length > 0 ? (d(), g(E, { key: 3 }, [
|
|
217
|
-
m("p", ae, k(e(n)("connect.review.facebook.selectPage")), 1),
|
|
218
|
-
v(O, {
|
|
219
|
-
pages: e(i),
|
|
220
|
-
"onUpdate:pages": o[1] || (o[1] = (s) => U(i) ? i.value = s : null)
|
|
221
|
-
}, null, 8, ["pages"]),
|
|
222
|
-
m("div", se, [
|
|
223
|
-
v(e(x).FmButton, {
|
|
224
|
-
variant: "outlined",
|
|
225
|
-
label: e(n)("connect.review.cancel"),
|
|
226
|
-
onClick: o[2] || (o[2] = (s) => e(b).replace("/review"))
|
|
227
|
-
}, null, 8, ["label"]),
|
|
228
|
-
v(e(x).FmButton, {
|
|
229
|
-
label: e(n)("connect.review.connect"),
|
|
230
|
-
disabled: !e(w),
|
|
231
|
-
loading: e(f),
|
|
232
|
-
onClick: a
|
|
233
|
-
}, null, 8, ["label", "disabled", "loading"])
|
|
234
|
-
])
|
|
235
|
-
], 64)) : $("", !0)
|
|
236
|
-
])
|
|
237
|
-
], 64);
|
|
238
|
-
};
|
|
239
|
-
}
|
|
240
|
-
});
|
|
241
|
-
export {
|
|
242
|
-
ge as default
|
|
243
|
-
};
|
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
import { defineComponent as S, onMounted as B, ref as h, computed as T, openBlock as d, createElementBlock as v, Fragment as F, renderList as z, normalizeClass as G, unref as e, createElementVNode as m, createVNode as u, toDisplayString as y, createCommentVNode as $, createBlock as P, resolveComponent as R, isRef as U } from "vue";
|
|
2
|
-
import { u as V } from "./vue-i18n-B-92uhPn.js";
|
|
3
|
-
import { components as _ } from "@feedmepos/ui-library";
|
|
4
|
-
import { r as C } from "./index-DW4-mTTG.js";
|
|
5
|
-
import { u as A } from "./business-BSe9C-xG.js";
|
|
6
|
-
import { _ as H } from "./LocationPicker.vue_vue_type_script_setup_true_lang-i9-B25xO.js";
|
|
7
|
-
import { useRouter as D } from "vue-router";
|
|
8
|
-
const q = { class: "flex flex-col gap-8" }, J = ["onClick"], K = { class: "fm-typo-en-body-md-600 flex-1 truncate" }, O = {
|
|
9
|
-
key: 0,
|
|
10
|
-
class: "fm-typo-en-body-sm-400 text-fm-color-primary-500 shrink-0"
|
|
11
|
-
}, Q = /* @__PURE__ */ S({
|
|
12
|
-
__name: "GoogleLocationMapping",
|
|
13
|
-
props: {
|
|
14
|
-
locations: {}
|
|
15
|
-
},
|
|
16
|
-
emits: ["update:locations"],
|
|
17
|
-
setup(N, { emit: a }) {
|
|
18
|
-
const x = N, i = a, w = A();
|
|
19
|
-
B(() => w.readLocations());
|
|
20
|
-
const g = h(null), b = T(() => {
|
|
21
|
-
const s = /* @__PURE__ */ new Set();
|
|
22
|
-
for (const r of x.locations)
|
|
23
|
-
r.locationId && s.add(r.locationId);
|
|
24
|
-
return s;
|
|
25
|
-
});
|
|
26
|
-
function f(s) {
|
|
27
|
-
return w.locations.filter((r) => {
|
|
28
|
-
const t = r._id.toString();
|
|
29
|
-
return !b.value.has(t) || s.locationId === t;
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
function k(s, r) {
|
|
33
|
-
const t = r._id.toString(), n = x.locations.map((o) => {
|
|
34
|
-
if (o.googleLocationName !== s) return o;
|
|
35
|
-
const p = o.locationId === t;
|
|
36
|
-
return {
|
|
37
|
-
...o,
|
|
38
|
-
locationId: p ? null : t,
|
|
39
|
-
locationName: p ? null : r.name
|
|
40
|
-
};
|
|
41
|
-
});
|
|
42
|
-
i("update:locations", n);
|
|
43
|
-
}
|
|
44
|
-
function L(s) {
|
|
45
|
-
g.value = g.value === s ? null : s;
|
|
46
|
-
}
|
|
47
|
-
return (s, r) => (d(), v("div", q, [
|
|
48
|
-
(d(!0), v(F, null, z(N.locations, (t) => (d(), v("div", {
|
|
49
|
-
key: t.googleLocationName,
|
|
50
|
-
class: G([
|
|
51
|
-
"rounded-lg border overflow-hidden transition-colors",
|
|
52
|
-
e(g) === t.googleLocationName ? "border-fm-color-primary-500" : "border-fm-color-neutral-gray-200"
|
|
53
|
-
])
|
|
54
|
-
}, [
|
|
55
|
-
m("button", {
|
|
56
|
-
class: "w-full flex items-center gap-12 p-16 bg-white text-left hover:bg-fm-color-neutral-gray-50 transition-colors",
|
|
57
|
-
onClick: (n) => L(t.googleLocationName)
|
|
58
|
-
}, [
|
|
59
|
-
u(e(_).FmIcon, {
|
|
60
|
-
name: "storefront",
|
|
61
|
-
class: "text-fm-color-neutral-gray-400 shrink-0"
|
|
62
|
-
}),
|
|
63
|
-
m("span", K, y(t.displayName || t.googleLocationName), 1),
|
|
64
|
-
t.locationName ? (d(), v("span", O, y(t.locationName), 1)) : $("", !0),
|
|
65
|
-
u(e(_).FmIcon, {
|
|
66
|
-
name: e(g) === t.googleLocationName ? "expand_less" : "expand_more",
|
|
67
|
-
class: "text-fm-color-neutral-gray-400 shrink-0"
|
|
68
|
-
}, null, 8, ["name"])
|
|
69
|
-
], 8, J),
|
|
70
|
-
e(g) === t.googleLocationName ? (d(), P(H, {
|
|
71
|
-
key: 0,
|
|
72
|
-
locations: f(t),
|
|
73
|
-
"selected-ids": t.locationId ? [t.locationId] : [],
|
|
74
|
-
onToggle: (n) => k(t.googleLocationName, n)
|
|
75
|
-
}, null, 8, ["locations", "selected-ids", "onToggle"])) : $("", !0)
|
|
76
|
-
], 2))), 128))
|
|
77
|
-
]));
|
|
78
|
-
}
|
|
79
|
-
}), W = { class: "flex flex-col min-h-full gap-16 p-24" }, X = {
|
|
80
|
-
key: 0,
|
|
81
|
-
class: "flex flex-col items-center justify-center flex-1 gap-16"
|
|
82
|
-
}, Y = { class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400" }, Z = {
|
|
83
|
-
key: 1,
|
|
84
|
-
class: "flex flex-col items-center justify-center flex-1 gap-16"
|
|
85
|
-
}, ee = { class: "fm-typo-en-body-lg-600" }, oe = { class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400" }, te = {
|
|
86
|
-
key: 2,
|
|
87
|
-
class: "flex flex-col items-center justify-center flex-1 gap-16"
|
|
88
|
-
}, ne = { class: "fm-typo-en-body-lg-600" }, ae = { class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400" }, le = { class: "fm-typo-en-body-lg-600" }, se = { class: "flex gap-8 justify-end mt-auto pt-8" }, fe = /* @__PURE__ */ S({
|
|
89
|
-
__name: "ReviewGoogleCallback",
|
|
90
|
-
setup(N) {
|
|
91
|
-
const { t: a } = V(), x = D(), i = h([]), w = h(!1), g = h(!1), b = h(!1), f = h(null), k = T(
|
|
92
|
-
() => i.value.some((n) => n.locationId !== null)
|
|
93
|
-
);
|
|
94
|
-
function L(n, o) {
|
|
95
|
-
return n instanceof Error ? n.message : o;
|
|
96
|
-
}
|
|
97
|
-
function s(n, o) {
|
|
98
|
-
const p = new Map(
|
|
99
|
-
o.map((l) => [l.googleLocationName, l.location])
|
|
100
|
-
);
|
|
101
|
-
return n.map((l) => {
|
|
102
|
-
const c = p.get(l.googleLocationName) ?? null;
|
|
103
|
-
return {
|
|
104
|
-
googleLocationName: l.googleLocationName,
|
|
105
|
-
displayName: l.displayName,
|
|
106
|
-
locationId: (c == null ? void 0 : c._id) ?? null,
|
|
107
|
-
locationName: (c == null ? void 0 : c.name) ?? null
|
|
108
|
-
};
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
async function r() {
|
|
112
|
-
var l;
|
|
113
|
-
const n = new URLSearchParams(window.location.search), o = n.get("code"), p = n.get("state");
|
|
114
|
-
if (!o || !p) {
|
|
115
|
-
f.value = a("connect.review.noToken");
|
|
116
|
-
return;
|
|
117
|
-
}
|
|
118
|
-
w.value = !0;
|
|
119
|
-
try {
|
|
120
|
-
const c = await C.getSource(), E = ((l = c == null ? void 0 : c.google) == null ? void 0 : l.locations) ?? [], M = window.location.pathname.replace(/\/review(?:\/.*)?$/, ""), j = `${window.location.origin}${M}/review/google/callback`, I = await C.connectGoogle(o, j, p);
|
|
121
|
-
i.value = s((I == null ? void 0 : I.locations) ?? [], E), i.value.length === 0 && (f.value = a("connect.review.google.noLocations"));
|
|
122
|
-
} catch (c) {
|
|
123
|
-
f.value = L(c, a("connect.review.google.failed"));
|
|
124
|
-
} finally {
|
|
125
|
-
w.value = !1;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
async function t() {
|
|
129
|
-
const n = i.value.map((o) => ({
|
|
130
|
-
googleLocationName: o.googleLocationName,
|
|
131
|
-
displayName: o.displayName,
|
|
132
|
-
locationId: o.locationId
|
|
133
|
-
}));
|
|
134
|
-
if (n.length === 0) {
|
|
135
|
-
f.value = a("connect.review.noMappings");
|
|
136
|
-
return;
|
|
137
|
-
}
|
|
138
|
-
g.value = !0;
|
|
139
|
-
try {
|
|
140
|
-
await C.updateGoogleLocations(n), b.value = !0, setTimeout(() => x.replace("/review"), 2e3);
|
|
141
|
-
} catch (o) {
|
|
142
|
-
f.value = L(o, a("connect.review.google.failed"));
|
|
143
|
-
} finally {
|
|
144
|
-
g.value = !1;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
return B(r), (n, o) => {
|
|
148
|
-
const p = R("FmPageHead");
|
|
149
|
-
return d(), v(F, null, [
|
|
150
|
-
u(p, {
|
|
151
|
-
title: e(a)("connect.navigation.review")
|
|
152
|
-
}, null, 8, ["title"]),
|
|
153
|
-
m("div", W, [
|
|
154
|
-
e(w) ? (d(), v("div", X, [
|
|
155
|
-
u(e(_).FmIcon, {
|
|
156
|
-
name: "sync",
|
|
157
|
-
size: "xl",
|
|
158
|
-
class: "animate-spin text-fm-color-neutral-gray-400"
|
|
159
|
-
}),
|
|
160
|
-
m("p", Y, y(e(a)("connect.review.google.fetching")), 1)
|
|
161
|
-
])) : e(b) ? (d(), v("div", Z, [
|
|
162
|
-
u(e(_).FmIcon, {
|
|
163
|
-
name: "check_circle",
|
|
164
|
-
size: "xl",
|
|
165
|
-
class: "text-fm-color-typo-success"
|
|
166
|
-
}),
|
|
167
|
-
m("p", ee, y(e(a)("connect.review.google.success")), 1),
|
|
168
|
-
m("p", oe, y(e(a)("connect.review.redirecting")), 1)
|
|
169
|
-
])) : e(f) ? (d(), v("div", te, [
|
|
170
|
-
u(e(_).FmIcon, {
|
|
171
|
-
name: "error",
|
|
172
|
-
size: "xl",
|
|
173
|
-
class: "text-fm-color-system-error-500"
|
|
174
|
-
}),
|
|
175
|
-
m("p", ne, y(e(a)("connect.review.errorTitle")), 1),
|
|
176
|
-
m("p", ae, y(e(f)), 1),
|
|
177
|
-
u(e(_).FmButton, {
|
|
178
|
-
label: e(a)("connect.review.goBack"),
|
|
179
|
-
onClick: o[0] || (o[0] = (l) => e(x).replace("/review"))
|
|
180
|
-
}, null, 8, ["label"])
|
|
181
|
-
])) : e(i).length > 0 ? (d(), v(F, { key: 3 }, [
|
|
182
|
-
m("p", le, y(e(a)("connect.review.google.selectLocation")), 1),
|
|
183
|
-
u(Q, {
|
|
184
|
-
locations: e(i),
|
|
185
|
-
"onUpdate:locations": o[1] || (o[1] = (l) => U(i) ? i.value = l : null)
|
|
186
|
-
}, null, 8, ["locations"]),
|
|
187
|
-
m("div", se, [
|
|
188
|
-
u(e(_).FmButton, {
|
|
189
|
-
variant: "outlined",
|
|
190
|
-
label: e(a)("connect.review.cancel"),
|
|
191
|
-
onClick: o[2] || (o[2] = (l) => e(x).replace("/review"))
|
|
192
|
-
}, null, 8, ["label"]),
|
|
193
|
-
u(e(_).FmButton, {
|
|
194
|
-
label: e(a)("connect.review.connect"),
|
|
195
|
-
disabled: !e(k),
|
|
196
|
-
loading: e(g),
|
|
197
|
-
onClick: t
|
|
198
|
-
}, null, 8, ["label", "disabled", "loading"])
|
|
199
|
-
])
|
|
200
|
-
], 64)) : $("", !0)
|
|
201
|
-
])
|
|
202
|
-
], 64);
|
|
203
|
-
};
|
|
204
|
-
}
|
|
205
|
-
});
|
|
206
|
-
export {
|
|
207
|
-
fe as default
|
|
208
|
-
};
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import { g as l } from "./app-DlECkPwT.js";
|
|
2
|
-
var o = { env: { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_623d67ab-3eb4-4e0c-85d2-436b4f139d30", npm_package_dependencies_zod: "3.22.4", npm_package_devDependencies__types_node: "^18.19.41", DOTNET_NOLOGO: "1", npm_package_dependencies__feedmepos_remy_vue_client: "0.2.0-beta.14", npm_package_dependencies_pinia: "^2.1.7", npm_package_dependencies_vite_plugin_vue_devtools: "^7.6.4", npm_package_devDependencies_vitest: "^2.1.9", USER: "runner", npm_config_user_agent: "pnpm/9.15.9 npm/? node/v20.20.2 linux x64", CI: "true", npm_package_dependencies_vue: "^3.5.13", USE_BAZEL_FALLBACK_VERSION: "silent:", RUNNER_ENVIRONMENT: "github-hosted", GITHUB_ENV: "/home/runner/work/_temp/_runner_file_commands/set_env_623d67ab-3eb4-4e0c-85d2-436b4f139d30", PIPX_HOME: "/opt/pipx", npm_package_devDependencies_vite: "^5.3.4", npm_node_execpath: "/opt/hostedtoolcache/node/20.20.2/x64/bin/node", JAVA_HOME_8_X64: "/usr/lib/jvm/temurin-8-jdk-amd64", SHLVL: "1", HCA_CLOUD_PROVIDER: "azure", npm_package_files_0: "dist", HOME: "/home/runner", npm_package_dependencies_moment_timezone: "^0.6.0", RUNNER_TEMP: "/home/runner/work/_temp", GITHUB_EVENT_PATH: "/home/runner/work/_temp/_github_workflow/event.json", npm_package_scripts_build_mf_dev: "vite build --mode fmmf", npm_package_dependencies__types_qrcode: "^1.5.5", JAVA_HOME_11_X64: "/usr/lib/jvm/temurin-11-jdk-amd64", PIPX_BIN_DIR: "/opt/pipx_bin", GITHUB_REPOSITORY_OWNER: "feedmepos", npm_package_scripts_build_mf_prod: "vite build --mode fmmf:prod", npm_package_dependencies_change_case: "^5.4.4", NODE_OPTIONS: "--max-old-space-size=8096", GRADLE_HOME: "/usr/share/gradle-9.6.1", ANDROID_NDK_LATEST_HOME: "/usr/local/lib/android/sdk/ndk/29.0.14206865", JAVA_HOME_21_X64: "/usr/lib/jvm/temurin-21-jdk-amd64", GITHUB_RETENTION_DAYS: "90", npm_package_dependencies__feedmepos_mf_common: "1.29.23", npm_package_dependencies_fabric: "^5.5.1", npm_package_dependencies_ua_parser_js: "^2.0.3", npm_package_dependencies_zod_i18n_map: "2.27.0", GITHUB_REPOSITORY_OWNER_ID: "54831515", POWERSHELL_DISTRIBUTION_CHANNEL: "GitHub-Actions-Linux", AZURE_EXTENSION_DIR: "/opt/az/azcliextensions", GITHUB_HEAD_REF: "", npm_package_devDependencies__types_file_saver: "^2.0.7", SYSTEMD_EXEC_PID: "1771", ACTIONS_ORCHESTRATION_ID: "923ca6bf-5e93-4eab-96ac-e748a4e45463.deploy.__default", npm_package_dependencies__feedmepos_ui_library: "1.10.8", npm_package_dependencies_dayjs: "^1.11.12", npm_package_dependencies_dotenv: "^16.4.5", npm_package_dependencies_moment: "^2.30.1", GITHUB_GRAPHQL_URL: "https://api.github.com/graphql", npm_package_scripts_build_only_dev: "pnpm build:mf:dev", npm_package_dependencies__tailwindcss_typography: "^0.5.16", npm_package_dependencies_i18next: "24.2.1", npm_package_devDependencies_tailwindcss: "^3.4.6", npm_package_devDependencies_typescript: "^5.5.3", JAVA_HOME_25_X64: "/usr/lib/jvm/temurin-25-jdk-amd64", NVM_DIR: "/home/runner/.nvm", npm_package_scripts_build_dev: "cross-env NODE_OPTIONS=--max-old-space-size=4096 vite build --mode development", npm_package_scripts_build_only_prod: "pnpm build:mf:prod", npm_package_dependencies_xlsx: "^0.18.5", npm_package_devDependencies_vue_tsc: "^2.0.26", DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1", JAVA_HOME_17_X64: "/usr/lib/jvm/temurin-17-jdk-amd64", ImageVersion: "20260705.232.1", npm_package_scripts_dev: "vite", npm_package_scripts_build_prod: "cross-env NODE_OPTIONS=--max-old-space-size=4096 vite build --mode production", npm_package_dependencies__feedmepos_custom_attributes: "0.0.1-rc.4", npm_package_dependencies_unplugin_auto_import: "^0.17.8", LOGNAME: "runner", RUNNER_OS: "Linux", GITHUB_API_URL: "https://api.github.com", STORE_PATH: "/home/runner/setup-pnpm/node_modules/.bin/store/v3", SWIFT_PATH: "/usr/share/swift/usr/bin", npm_package_type: "module", npm_package_dependencies__vueuse_core: "^14.1.0", CHROMEWEBDRIVER: "/usr/local/share/chromedriver-linux64", JOURNAL_STREAM: "9:14949", GITHUB_WORKFLOW: "[CD:dev] connect-portal (mf-connect)", _: "/home/runner/setup-pnpm/node_modules/.bin/pnpm", npm_package_module: "./dist/app.js", npm_package_devDependencies_autoprefixer: "^10.4.19", MEMORY_PRESSURE_WATCH: "/sys/fs/cgroup/system.slice/hosted-compute-agent.service/memory.pressure", GOROOT_1_24_X64: "/opt/hostedtoolcache/go/1.24.13/x64", npm_package_devDependencies__types_uuid: "^9.0.8", npm_package_devDependencies_unlayer_types: "^1.157.0", npm_config_registry: "https://registry.npmjs.org/", ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE: "/opt/actionarchivecache", GOROOT_1_25_X64: "/opt/hostedtoolcache/go/1.25.11/x64", GITHUB_RUN_ID: "29468355302", npm_package_dependencies_bson_objectid: "^2.0.4", npm_package_devDependencies__types_lodash: "^4.17.7", GITHUB_REF_TYPE: "branch", BOOTSTRAP_HASKELL_NONINTERACTIVE: "1", GITHUB_WORKFLOW_SHA: "2ecf7139ab053e6ae0ee113bc39ffd815e84b9ef", GOROOT_1_26_X64: "/opt/hostedtoolcache/go/1.26.4/x64", GITHUB_BASE_REF: "", ImageOS: "ubuntu24", npm_package_exports___import: "./dist/app.js", npm_package_dependencies__ckeditor_ckeditor5_vue: "^7.3.0", npm_package_devDependencies__vitejs_plugin_vue: "^5.0.5", GITHUB_WORKFLOW_REF: "feedmepos/marketing-services/.github/workflows/[DEV] deploy-mf-connect.yml@refs/heads/dev", GITHUB_ACTION_REPOSITORY: "", ENABLE_RUNNER_TRACING: "true", npm_package_dependencies_axios: "^1.7.2", npm_config_node_gyp: "/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js", PATH: "/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/setup-pnpm/node_modules/.bin:/opt/hostedtoolcache/node/20.20.2/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin", ANT_HOME: "/usr/share/ant", DOTNET_MULTILEVEL_LOOKUP: "0", RUNNER_TRACKING_ID: "github_d8c2c881-12ef-4110-a2fe-9e57f2c3d03a", INVOCATION_ID: "78e6ea5d67204c6eb03ce397a4f07463", RUNNER_TOOL_CACHE: "/opt/hostedtoolcache", NODE: "/opt/hostedtoolcache/node/20.20.2/x64/bin/node", npm_package_name: "@feedmepos/mf-connect", npm_package_scripts_deploy_dev: "pnpm run build-only:dev && pnpm publish --no-git-checks .", npm_package_dependencies_cross_env: "^7.0.3", npm_package_dependencies_file_saver: "^2.0.5", GITHUB_ACTION: "__run_5", GITHUB_RUN_NUMBER: "259", GITHUB_TRIGGERING_ACTOR: "yyueniao", RUNNER_ARCH: "X64", XDG_RUNTIME_DIR: "/run/user/1001", AGENT_TOOLSDIRECTORY: "/opt/hostedtoolcache", npm_package_scripts_deploy_prod: "pnpm run build-only:prod && pnpm publish --no-git-checks .", npm_config_frozen_lockfile: "", LANG: "C.UTF-8", VCPKG_INSTALLATION_ROOT: "/usr/local/share/vcpkg", npm_package_dependencies__feedmepos_mf_core_ui: "1.0.25", CONDA: "/usr/share/miniconda", RUNNER_NAME: "GitHub Actions 1000090100", XDG_CONFIG_HOME: "/home/runner/.config", GITHUB_REF_NAME: "dev", GITHUB_REPOSITORY: "feedmepos/marketing-services", npm_package_scripts_build_dts: "vue-tsc --declaration --noEmit false --emitDeclarationOnly -p tsconfig.json --outDir ./dist && mv ./dist/src/* dist", npm_package_scripts_build_types: "vue-tsc --declaration --emitDeclarationOnly -p tsconfig.json --outDir dist --composite false", npm_package_dependencies__feedmepos_core: "2.15.21", npm_lifecycle_script: "vite build --mode fmmf", ANDROID_NDK_ROOT: "/usr/local/lib/android/sdk/ndk/27.3.13750724", GITHUB_ACTION_REF: "", DEBIAN_FRONTEND: "noninteractive", npm_package_scripts_test: "vitest run", npm_package_dependencies_rrule: "^2.8.1", npm_package_dependencies_vue3_lottie: "^3.3.0", SHELL: "/bin/bash", GITHUB_REPOSITORY_ID: "615151795", GITHUB_ACTIONS: "true", NODE_PATH: "/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.pnpm/vite@5.3.4_@types+node@18.19.41/node_modules/vite/bin/node_modules:/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.pnpm/vite@5.3.4_@types+node@18.19.41/node_modules/vite/node_modules:/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.pnpm/vite@5.3.4_@types+node@18.19.41/node_modules:/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules", npm_package_version: "0.1.98-beta.2", npm_package_dependencies__feedmepos_hrm_permission: "1.0.14", npm_package_dependencies_ckeditor5: "^44.3.0", npm_lifecycle_event: "build:mf:dev", GITHUB_REF_PROTECTED: "false", npm_package_scripts_build: "vue-tsc && vite build", npm_package_dependencies_uuid: "^10.0.0", npm_package_dependencies_vue_i18n: "10.0.5", GITHUB_WORKSPACE: "/home/runner/work/marketing-services/marketing-services", ACCEPT_EULA: "Y", GITHUB_JOB: "deploy", npm_package_dependencies_lodash: "^4.17.21", GITHUB_SHA: "2ecf7139ab053e6ae0ee113bc39ffd815e84b9ef", GITHUB_RUN_ATTEMPT: "1", npm_package_exports___style: "./dist/style.css", npm_package_dependencies__ckeditor_ckeditor5_build_classic: "^44.3.0", npm_package_dependencies_vue_router: "^4.4.0", ACTIONS_RUNNER_RETURN_JOB_RESULT_FOR_HOSTED: "1", GITHUB_REF: "refs/heads/dev", GITHUB_ACTOR: "yyueniao", ANDROID_SDK_ROOT: "/usr/local/lib/android/sdk", npm_package_license: "UNLICENSED", npm_package_dependencies_email_addresses: "^5.0.0", npm_package_scripts_test_watch: "vitest", npm_package_dependencies_firebase: "^10.12.4", npm_package_dependencies_qrcode: "^1.5.3", GITHUB_PATH: "/home/runner/work/_temp/_runner_file_commands/add_path_623d67ab-3eb4-4e0c-85d2-436b4f139d30", JAVA_HOME: "/usr/lib/jvm/temurin-17-jdk-amd64", PWD: "/home/runner/work/marketing-services/marketing-services/packages/connect", GITHUB_ACTOR_ID: "91043129", RUNNER_WORKSPACE: "/home/runner/work/marketing-services", npm_execpath: "/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/pnpm.cjs", HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS: "3650", GITHUB_EVENT_NAME: "push", HOMEBREW_NO_AUTO_UPDATE: "1", ANDROID_HOME: "/usr/local/lib/android/sdk", GITHUB_SERVER_URL: "https://github.com", GECKOWEBDRIVER: "/usr/local/share/gecko_driver", GHCUP_INSTALL_BASE_PREFIX: "/usr/local", GITHUB_OUTPUT: "/home/runner/work/_temp/_runner_file_commands/set_output_623d67ab-3eb4-4e0c-85d2-436b4f139d30", npm_package_exports___types: "./dist/packages/connect/src/app.d.ts", EDGEWEBDRIVER: "/usr/local/share/edge_driver", PNPM_SCRIPT_SRC_DIR: "/home/runner/work/marketing-services/marketing-services/packages/connect", npm_package_devDependencies_postcss: "^8.4.39", npm_command: "run-script", ANDROID_NDK: "/usr/local/lib/android/sdk/ndk/27.3.13750724", SGX_AESM_ADDR: "1", PSModulePath: "/root/.local/share/powershell/Modules:/usr/local/share/powershell/Modules:/opt/microsoft/powershell/7/Modules:/usr/share/az_15.6.1", CHROME_BIN: "/usr/bin/google-chrome", npm_package_scripts_preview: "vite preview", SELENIUM_JAR_PATH: "/usr/share/java/selenium-server.jar", MEMORY_PRESSURE_WRITE: "c29tZSAyMDAwMDAgMjAwMDAwMAA=", PNPM_HOME: "/home/runner/setup-pnpm/node_modules/.bin", npm_package_dependencies__feedmepos_menu: "1.0.34", ANDROID_NDK_HOME: "/usr/local/lib/android/sdk/ndk/27.3.13750724", GITHUB_STEP_SUMMARY: "/home/runner/work/_temp/_runner_file_commands/step_summary_623d67ab-3eb4-4e0c-85d2-436b4f139d30", INIT_CWD: "/home/runner/work/marketing-services/marketing-services/packages/connect", npm_package_dependencies__feedmepos_mf_remy_panel: "0.15.0", NODE_ENV: "production", FEEDME_NAMESPACE: "dev", FIREBASE_API_KEY: "AIzaSyAj8JdCHtP0Vc5vZobCfgoLzWxPIn0WUG4", FIREBASE_AUTH_DOMAIN: "feedme-dev-4c3ef.firebaseapp.com", FIREBASE_DATABASE_URL: "https://feedme-dev-4c3ef.firebaseio.com", FIREBASE_PROJECT_ID: "feedme-dev-4c3ef", FIREBASE_STORAGE_BUCKET: "feedme-dev-4c3ef.appspot.com", FIREBASE_MESSAGING_SENDER_ID: "458797803788", FIREBASE_APP_ID: "1:458797803788:web:37f2af2926a84288f0c129", FIREBASE_MEASUREMENT_ID: "G-J2QG09D2Q7", ASSET_STORAGE_BUCKET: "feedme-dev-4c3ef.appspot.com", IMPORT_FILES_STORAGE_BUCKET: "feedme-dev-4c3ef.appspot.com", AUTH_URL: "https://portal-v2-dev.feedmeapi.com/", SLACK_WEBHOOK_URL: "https://hooks.slack.com/services/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", MEMBER_APP_URL: "feedmedev.vip", CRM_APP_URL: "crm.feedmedev.cc", MARKETING_V1_PORTAL: "https://marketing-v1.feedmedev.cc", CLIENT_ID: "1a362d621873497b277ea55258cc82594ba148d235257f7bd44ea2acc132d8a4", PAYMENT_PORTAL_URL: "https://portal.feedmedev.cc/payment/payout-account", LICENSE_PORTAL_URL: "https://license.feedmedev.cc/", VOUCHER_APP_URL: "https://voucher.feedmedev.cc/" } }, i = Math.floor(Math.random() * 16777215), a = n.index = parseInt(Math.random() * 16777215, 10), d = (typeof o > "u" || typeof o.pid != "number" ? Math.floor(Math.random() * 1e5) : o.pid) % 65535, c = (() => {
|
|
3
|
-
try {
|
|
4
|
-
return _Buffer;
|
|
5
|
-
} catch {
|
|
6
|
-
try {
|
|
7
|
-
return Buffer;
|
|
8
|
-
} catch {
|
|
9
|
-
return null;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
})(), r = function(e) {
|
|
13
|
-
return !!(e != null && e.constructor && typeof e.constructor.isBuffer == "function" && e.constructor.isBuffer(e));
|
|
14
|
-
}, u = [];
|
|
15
|
-
for (var p = 0; p < 256; p++)
|
|
16
|
-
u[p] = (p <= 15 ? "0" : "") + p.toString(16);
|
|
17
|
-
var m = new RegExp("^[0-9a-fA-F]{24}$"), s = [];
|
|
18
|
-
p = 0;
|
|
19
|
-
for (; p < 10; ) s[48 + p] = p++;
|
|
20
|
-
for (; p < 16; ) s[55 + p] = s[87 + p] = p++;
|
|
21
|
-
function n(e) {
|
|
22
|
-
if (!(this instanceof n)) return new n(e);
|
|
23
|
-
if (e && (e instanceof n || e._bsontype === "ObjectID"))
|
|
24
|
-
return e;
|
|
25
|
-
if (this._bsontype = "ObjectID", e == null || typeof e == "number") {
|
|
26
|
-
this.id = this.generate(e);
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
var _ = n.isValid(e);
|
|
30
|
-
if (!_ && e != null)
|
|
31
|
-
throw new Error(
|
|
32
|
-
"Argument passed in must be a single String of 12 bytes or a string of 24 hex characters"
|
|
33
|
-
);
|
|
34
|
-
if (_ && typeof e == "string" && e.length === 24)
|
|
35
|
-
return n.createFromHexString(e);
|
|
36
|
-
if (e != null && e.length === 12)
|
|
37
|
-
this.id = e;
|
|
38
|
-
else {
|
|
39
|
-
if (e != null && typeof e.toHexString == "function")
|
|
40
|
-
return e;
|
|
41
|
-
throw new Error(
|
|
42
|
-
"Argument passed in must be a single String of 12 bytes or a string of 24 hex characters"
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
var g = n;
|
|
47
|
-
n.default = n;
|
|
48
|
-
n.createFromTime = function(e) {
|
|
49
|
-
return e = parseInt(e, 10) % 4294967295, new n(f(8, e) + "0000000000000000");
|
|
50
|
-
};
|
|
51
|
-
n.createFromHexString = function(e) {
|
|
52
|
-
if (typeof e > "u" || e != null && e.length !== 24)
|
|
53
|
-
throw new Error(
|
|
54
|
-
"Argument passed in must be a single String of 12 bytes or a string of 24 hex characters"
|
|
55
|
-
);
|
|
56
|
-
for (var _ = "", t = 0; t < 24; )
|
|
57
|
-
_ += String.fromCharCode(s[e.charCodeAt(t++)] << 4 | s[e.charCodeAt(t++)]);
|
|
58
|
-
return new n(_);
|
|
59
|
-
};
|
|
60
|
-
n.isValid = function(e) {
|
|
61
|
-
return e == null ? !1 : typeof e == "number" ? !0 : typeof e == "string" ? e.length === 12 || e.length === 24 && m.test(e) : e instanceof n ? !0 : r(e) ? n.isValid(e.toString("hex")) : typeof e.toHexString == "function" && c && (e.id instanceof c || typeof e.id == "string") ? e.id.length === 12 || e.id.length === 24 && m.test(e.id) : !1;
|
|
62
|
-
};
|
|
63
|
-
n.prototype = {
|
|
64
|
-
constructor: n,
|
|
65
|
-
/**
|
|
66
|
-
* Return the ObjectID id as a 24 byte hex string representation
|
|
67
|
-
*
|
|
68
|
-
* @return {String} return the 24 byte hex string representation.
|
|
69
|
-
* @api public
|
|
70
|
-
*/
|
|
71
|
-
toHexString: function() {
|
|
72
|
-
if (!this.id || !this.id.length)
|
|
73
|
-
throw new Error(
|
|
74
|
-
"invalid ObjectId, ObjectId.id must be either a string or a Buffer, but is [" + JSON.stringify(this.id) + "]"
|
|
75
|
-
);
|
|
76
|
-
if (this.id.length === 24)
|
|
77
|
-
return this.id;
|
|
78
|
-
if (r(this.id))
|
|
79
|
-
return this.id.toString("hex");
|
|
80
|
-
for (var e = "", _ = 0; _ < this.id.length; _++)
|
|
81
|
-
e += u[this.id.charCodeAt(_)];
|
|
82
|
-
return e;
|
|
83
|
-
},
|
|
84
|
-
/**
|
|
85
|
-
* Compares the equality of this ObjectID with `otherID`.
|
|
86
|
-
*
|
|
87
|
-
* @param {Object} otherId ObjectID instance to compare against.
|
|
88
|
-
* @return {Boolean} the result of comparing two ObjectID's
|
|
89
|
-
* @api public
|
|
90
|
-
*/
|
|
91
|
-
equals: function(e) {
|
|
92
|
-
return e instanceof n ? this.toString() === e.toString() : typeof e == "string" && n.isValid(e) && e.length === 12 && r(this.id) ? e === this.id.toString("binary") : typeof e == "string" && n.isValid(e) && e.length === 24 ? e.toLowerCase() === this.toHexString() : typeof e == "string" && n.isValid(e) && e.length === 12 ? e === this.id : e != null && (e instanceof n || e.toHexString) ? e.toHexString() === this.toHexString() : !1;
|
|
93
|
-
},
|
|
94
|
-
/**
|
|
95
|
-
* Returns the generation date (accurate up to the second) that this ID was generated.
|
|
96
|
-
*
|
|
97
|
-
* @return {Date} the generation date
|
|
98
|
-
* @api public
|
|
99
|
-
*/
|
|
100
|
-
getTimestamp: function() {
|
|
101
|
-
var e = /* @__PURE__ */ new Date(), _;
|
|
102
|
-
return r(this.id) ? _ = this.id[3] | this.id[2] << 8 | this.id[1] << 16 | this.id[0] << 24 : _ = this.id.charCodeAt(3) | this.id.charCodeAt(2) << 8 | this.id.charCodeAt(1) << 16 | this.id.charCodeAt(0) << 24, e.setTime(Math.floor(_) * 1e3), e;
|
|
103
|
-
},
|
|
104
|
-
/**
|
|
105
|
-
* Generate a 12 byte id buffer used in ObjectID's
|
|
106
|
-
*
|
|
107
|
-
* @method
|
|
108
|
-
* @param {number} [time] optional parameter allowing to pass in a second based timestamp.
|
|
109
|
-
* @return {string} return the 12 byte id buffer string.
|
|
110
|
-
*/
|
|
111
|
-
generate: function(e) {
|
|
112
|
-
typeof e != "number" && (e = ~~(Date.now() / 1e3)), e = parseInt(e, 10) % 4294967295;
|
|
113
|
-
var _ = E();
|
|
114
|
-
return String.fromCharCode(
|
|
115
|
-
e >> 24 & 255,
|
|
116
|
-
e >> 16 & 255,
|
|
117
|
-
e >> 8 & 255,
|
|
118
|
-
e & 255,
|
|
119
|
-
i >> 16 & 255,
|
|
120
|
-
i >> 8 & 255,
|
|
121
|
-
i & 255,
|
|
122
|
-
d >> 8 & 255,
|
|
123
|
-
d & 255,
|
|
124
|
-
_ >> 16 & 255,
|
|
125
|
-
_ >> 8 & 255,
|
|
126
|
-
_ & 255
|
|
127
|
-
);
|
|
128
|
-
}
|
|
129
|
-
};
|
|
130
|
-
function E() {
|
|
131
|
-
return a = (a + 1) % 16777215;
|
|
132
|
-
}
|
|
133
|
-
function f(e, _) {
|
|
134
|
-
return _ = _.toString(16), _.length === e ? _ : "00000000".substring(_.length, e) + _;
|
|
135
|
-
}
|
|
136
|
-
var h = Symbol && Symbol.for && Symbol.for("nodejs.util.inspect.custom") || "inspect";
|
|
137
|
-
n.prototype[h] = function() {
|
|
138
|
-
return "ObjectID(" + this + ")";
|
|
139
|
-
};
|
|
140
|
-
n.prototype.toJSON = n.prototype.toHexString;
|
|
141
|
-
n.prototype.toString = n.prototype.toHexString;
|
|
142
|
-
const k = /* @__PURE__ */ l(g);
|
|
143
|
-
export {
|
|
144
|
-
k as O
|
|
145
|
-
};
|