@feedmepos/mf-connect 0.1.98-beta.79 → 0.1.98-beta.80
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-BffPZGzn.js → App-DievprEi.js} +49 -49
- package/dist/{AuditLogs-D3MEmFSx.js → AuditLogs-DrdqOhZL.js} +13 -13
- package/dist/{Bin-Jw_wcgsC.js → Bin-Ci2k3z77.js} +8 -8
- package/dist/{Broadcast-DOw7z6bn.js → Broadcast-CpDMAG1o.js} +12 -12
- package/dist/{CampaignAnalytic-XXjhRtfl.js → CampaignAnalytic-uRyGaLaN.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DkWeDf14.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DtGe2Og1.js} +8 -8
- package/dist/{Card-D_rB1X9o.js → Card-tb98Kyr-.js} +23 -23
- package/dist/{Collections-Da1I5--J.js → Collections-P1S5WjnJ.js} +8 -8
- package/dist/{Credit-DJuBjxVe.js → Credit-DwK7JYf-.js} +12 -12
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-CowFIZ3q.js → DateRangeChip.vue_vue_type_script_setup_true_lang-Cyk0iIsd.js} +1 -1
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-pI1jnJn4.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-8r29jKh9.js} +35 -35
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BrBy93g0.js → EffectSheet.vue_vue_type_style_index_0_lang-BML_-v8I.js} +8 -8
- package/dist/{Experience-F4_hPy4x.js → Experience-BejtRlOj.js} +13 -13
- package/dist/{FileSaver.min-C-nhkwVc.js → FileSaver.min-C-hmBaHm.js} +1 -1
- package/dist/{Game-Cfe5gux2.js → Game-n8qL896g.js} +13 -13
- package/dist/{GiftCardSetup-CGJCg8-o.js → GiftCardSetup-Bgsfcu7N.js} +57 -57
- package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-DTHFJbl8.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-CzL68PPP.js} +7 -7
- package/dist/{Goals-WWe3kZ3W.js → Goals-BB8LJlq3.js} +4 -4
- package/dist/{Grab-Dr49Cz71.js → Grab-COq3Ujst.js} +9 -9
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-CPB7kKVu.js → ImageInput.vue_vue_type_script_setup_true_lang-BmLclEyi.js} +1 -1
- package/dist/{Index-TsViXhvK.js → Index-BdkIinaE.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-DmXKvvvk.js → LocationPicker.vue_vue_type_script_setup_true_lang-DsWv3DVb.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-BgRr2Bu5.js → LottieAnimation.vue_vue_type_script_setup_true_lang-DvOzGF8c.js} +1 -1
- package/dist/{LoyaltyDashboard-D-sVA0uB.js → LoyaltyDashboard-D4Jtpw0n.js} +15 -15
- package/dist/{MainLayout-gSvcU53G.js → MainLayout-Ca-Xm3eZ.js} +3 -3
- package/dist/{Marketing-BUsNL2jQ.js → Marketing-Cpe4s7NZ.js} +4 -4
- package/dist/{MarketingMaterialEdit-DtubIpnt.js → MarketingMaterialEdit-nTeS9VVx.js} +6 -6
- package/dist/{Member-9ng7QgMa.js → Member-DgGZ4Cdg.js} +7 -7
- package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-qOMNiTrI.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-_O3B-FIA.js} +24 -24
- package/dist/{MemberImportHistory-BsW3XNAv.js → MemberImportHistory-rdlbDVWU.js} +7 -7
- package/dist/{MemberList-DUky4ceB.js → MemberList-BC4aRJTt.js} +14 -14
- package/dist/{MemberTransactions-Bu-la_J4.js → MemberTransactions-BFfdTttp.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-BfLVofJG.js → MessageInput.vue_vue_type_script_setup_true_lang-DXajAQy9.js} +12 -12
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-CYqH-qT-.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-8xVDzdO3.js} +1 -1
- package/dist/{Mission-47XKDAIr.js → Mission-BWCNKTjU.js} +14 -14
- package/dist/{Overview-fPy87ZWK.js → Overview--Q7vzhNK.js} +4 -4
- package/dist/{Overview-SDSNOe1_.js → Overview-i02Wnyjn.js} +21 -21
- package/dist/{Point-Biql3Qi5.js → Point-CiWxqny5.js} +14 -14
- package/dist/{Promotion-CBbBWtke.js → Promotion-B0G9qfBm.js} +14 -14
- package/dist/{Queue-DJgqg-cC.js → Queue-YfwgYmzH.js} +13 -13
- package/dist/{Record-C6Uzc6pD.js → Record-CCuwrPKW.js} +9 -9
- package/dist/{Review-C2pjn38Z.js → Review-ymsfdh7Q.js} +2 -2
- package/dist/{ReviewFacebookCallback-USPINa9z.js → ReviewFacebookCallback-DyDExWvP.js} +5 -5
- package/dist/{ReviewGoogleCallback-Br_CV3Pq.js → ReviewGoogleCallback-DNyg3n2S.js} +5 -5
- package/dist/{Reward-Bl6TyJoX.js → Reward-BKIb0ezH.js} +29 -29
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-DVu2-HRI.js → RewardGroup.vue_vue_type_script_setup_true_lang-DPaaNgpr.js} +14 -14
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-DqnvglII.js → RuleGroup.vue_vue_type_script_setup_true_lang-BLFLybFn.js} +15 -15
- package/dist/{Segment-BKBNrfz8.js → Segment-D5_pp7fh.js} +26 -26
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DLskCbGj.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-BLLjIA-D.js} +15 -15
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BT3-tDl-.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BRIcZwnU.js} +4 -4
- package/dist/{Setting-BqbtEU61.js → Setting-CD78gIMU.js} +14 -14
- package/dist/{SettingAdvertisements-DoHnZG47.js → SettingAdvertisements-C2AIT4s4.js} +12 -12
- package/dist/{Settings-HlQyk7g8.js → Settings-DI_tryQV.js} +5 -5
- package/dist/{Store-uexWJZhp.js → Store-BV2JTRNZ.js} +27 -27
- package/dist/{StoreRewards-BbkTRt3c.js → StoreRewards-Bk55YXyO.js} +15 -15
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-K6q2obBY.js → StoreTransactions.vue_vue_type_script_setup_true_lang-BZZ1fqwg.js} +40 -40
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-CRfwFvlQ.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BrEzWVrH.js} +2 -2
- package/dist/{Tier-DN6l1PvI.js → Tier-CO2K30Ew.js} +27 -27
- package/dist/{Title-4w7I9PNy.js → Title-qProQh3T.js} +23 -23
- package/dist/{Transaction-BypZ5Cbs.js → Transaction-qL5L-fE_.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CVaOiG6q.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Co1BPScS.js} +6 -6
- package/dist/{Voucher-_kyZ6H17.js → Voucher-VFD1LY9Y.js} +19 -19
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DbrNDu2d.js → VoucherEditor.vue_vue_type_script_setup_true_lang-9QyTl7iq.js} +16 -16
- package/dist/WhatsappAccount-CxSGqm7H.js +325 -0
- package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-D8L6izf0.js +96 -0
- package/dist/WhatsappBot-C4Oz7Xwv.js +441 -0
- package/dist/WhatsappBotSettings-CKqaWzwE.js +136 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-B3BOd7wE.js → ZodTextField.vue_vue_type_script_setup_true_lang-Bcsi94dw.js} +2 -2
- package/dist/{app-BUdfgxte.js → app-BEYzXWZO.js} +3906 -3703
- package/dist/app.js +1 -1
- package/dist/{base.export-gSYuTgGq.js → base.export-S_82Elmg.js} +2 -2
- package/dist/{business-CjYxENvr.js → business-DH7djUl8.js} +1 -1
- package/dist/{campaign-CNYzUQiR.js → campaign-DlHDgoFX.js} +2 -2
- package/dist/{campaign-yvttY7Iz.js → campaign-k_WHxsOR.js} +8 -8
- package/dist/{campaign.fn-Bsb9ItkF.js → campaign.fn-B-4JRzft.js} +36 -36
- package/dist/{collection.fn-0klvp7AD.js → collection.fn-zQwWDzZT.js} +2 -2
- package/dist/{currency-UZt1QX64.js → currency-CQVHXBFe.js} +1 -1
- package/dist/{duplicateCampaign-CCr4vLrU.js → duplicateCampaign-YTXMbJTj.js} +2 -2
- package/dist/{effect-Dx3ZJxHs.js → effect-CQkVLHWi.js} +1 -1
- package/dist/{email-addresses-C0cqEsI0.js → email-addresses-BIoVbPGC.js} +2 -2
- package/dist/{helper-C_jOIHaL.js → helper-BCkTvF4m.js} +1 -1
- package/dist/{index-D3wRc-GN.js → index-B-bQnb0_.js} +467 -446
- package/dist/{index--qbL3r5K.js → index-BAJOC43K.js} +3 -3
- package/dist/{index-BWnVV310.js → index-BFIHEBnX.js} +3 -3
- package/dist/{index-tS9a8fVh.js → index-BJIQe3QJ.js} +1 -1
- package/dist/{index-Cb9hrU0J.js → index-BJkRTH5T.js} +1 -1
- package/dist/{index-BLn35ij4.js → index-BOJogkKQ.js} +1 -1
- package/dist/{index-9LJ75jOS.js → index-BRPajAkE.js} +7 -7
- package/dist/{index-kwMMiU8Z.js → index-BTkxgos0.js} +2 -2
- package/dist/{index-U9Y--r1N.js → index-BUP4aHq8.js} +2 -2
- package/dist/{index-DWdVixHn.js → index-BYvnqARr.js} +4 -4
- package/dist/{index-Bru3cF21.js → index-Bonq819P.js} +1 -1
- package/dist/{index-DyaRNZLw.js → index-C6mOI2Pp.js} +1 -1
- package/dist/{index-uNe9XFEK.js → index-CDIe15AY.js} +2 -2
- package/dist/{index-ChgrDBj1.js → index-CTrcdIkt.js} +2 -2
- package/dist/{index-BhP7DpQu.js → index-CpnchVe1.js} +9 -9
- package/dist/{index-Dwrv-CFH.js → index-D5AR7A5e.js} +2 -2
- package/dist/index-D7-Q86HI.js +54 -0
- package/dist/{index-D8i3eZnu.js → index-DdOj8Hew.js} +1 -1
- package/dist/{index-Dr0sT8uH.js → index-Dvqguh2B.js} +2 -2
- package/dist/{index-C4cDk-o7.js → index-hAKRfE-4.js} +1 -1
- package/dist/{index-BgECjFM0.js → index-o2Ga_qaX.js} +18 -7
- package/dist/{index.esm2017-DqDs52qt.js → index.esm2017-D0fhMMPG.js} +37 -37
- package/dist/{loading-DbSZrkUs.js → loading-C686AMVG.js} +1 -1
- package/dist/{lodash-DqWWo2-K.js → lodash-CANlWUWW.js} +1 -1
- package/dist/{member-import-CoVI5_0P.js → member-import-UzJ6ByIS.js} +1 -1
- package/dist/{membership-SQa4SZUq.js → membership-DCVzFaFy.js} +2 -2
- package/dist/{money-Cl_T-LaY.js → money-DuazwoX7.js} +1 -1
- package/dist/{number-BOrgnhwZ.js → number-B2HFiV0g.js} +1 -1
- package/dist/{objectid-CsDYQ9eX.js → objectid-Bq-oVMdP.js} +6 -6
- package/dist/{onboarding-BLU2SSrI.js → onboarding-BxvNxz-9.js} +3 -3
- package/dist/{onboardingSetup-jyeouaTv.js → onboardingSetup-CcvKmyx8.js} +2 -2
- package/dist/{plugins-t_9JTEIa.js → plugins-C39O5j42.js} +3 -3
- package/dist/{reward-BWunDF4U.js → reward-HYt-2nxt.js} +1 -1
- package/dist/{rule-DyUt0gcn.js → rule-3xNIYM7z.js} +10 -10
- package/dist/style.css +1 -1
- package/dist/{template-DNh14IvS.js → template-D37Z_b0m.js} +6 -6
- package/dist/{timezone-DpCfnolZ.js → timezone-JwnQgpaU.js} +1 -1
- package/dist/{transaction.fn-D8JhcKmt.js → transaction.fn-C5vswLI_.js} +2 -2
- package/dist/{trigger-DYyQ4d7Z.js → trigger-Bc6s2cvq.js} +5 -5
- package/dist/{useMarketingMaterialActions-BVzjD61l.js → useMarketingMaterialActions-DMGyAXcy.js} +3 -3
- package/dist/{usePagination-jqXEShKi.js → usePagination-DLOOwiiY.js} +1 -1
- package/dist/{user-Bb-YcUvV.js → user-CTIGugVF.js} +1 -1
- package/dist/{vue-i18n-Bud-ZmQ_.js → vue-i18n-Dpic36zz.js} +195 -195
- package/dist/{xlsx-NzYW6kUX.js → xlsx-CT9_1SFr.js} +379 -379
- package/dist/{zod-DK9AcJ_Q.js → zod-CGVrMcDl.js} +1 -1
- package/package.json +1 -1
- package/dist/WhatsappBot-CgLUjd8a.js +0 -604
|
@@ -2,26 +2,26 @@ import { defineComponent as le, ref as w, computed as ce, h as m, onMounted as r
|
|
|
2
2
|
import { _ as pe } from "./campaign-CpzFl8Vr.js";
|
|
3
3
|
import { useDialog as ue, components as d } from "@feedmepos/ui-library";
|
|
4
4
|
import { _ as M } from "./FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js";
|
|
5
|
-
import { c as de, p as he } from "./plugins-
|
|
5
|
+
import { c as de, p as he } from "./plugins-C39O5j42.js";
|
|
6
6
|
import { useCoreStore as ge } from "@feedmepos/mf-common";
|
|
7
|
-
import { u as fe } from "./loading-
|
|
8
|
-
import { u as ye } from "./business-
|
|
9
|
-
import { u as _e } from "./campaign-
|
|
10
|
-
import { a as Ce, b as B, c as D } from "./campaign-
|
|
11
|
-
import { c as be, p as ve } from "./duplicateCampaign-
|
|
12
|
-
import "./index-
|
|
13
|
-
import { u as He } from "./template-
|
|
14
|
-
import { _ as Se } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-
|
|
15
|
-
import { _ as ze } from "./SendVoucherSheet.vue_vue_type_script_setup_true_lang-
|
|
16
|
-
import { u as Ue } from "./vue-i18n-
|
|
17
|
-
import { T as Te } from "./trigger-
|
|
18
|
-
import { u as Ve } from "./onboardingSetup-
|
|
19
|
-
import { R as W, W as Pe, S as we } from "./index-
|
|
20
|
-
import "./index-
|
|
21
|
-
import { i as $ } from "./helper-
|
|
7
|
+
import { u as fe } from "./loading-C686AMVG.js";
|
|
8
|
+
import { u as ye } from "./business-DH7djUl8.js";
|
|
9
|
+
import { u as _e } from "./campaign-DlHDgoFX.js";
|
|
10
|
+
import { a as Ce, b as B, c as D } from "./campaign-k_WHxsOR.js";
|
|
11
|
+
import { c as be, p as ve } from "./duplicateCampaign-YTXMbJTj.js";
|
|
12
|
+
import "./index-Bonq819P.js";
|
|
13
|
+
import { u as He } from "./template-D37Z_b0m.js";
|
|
14
|
+
import { _ as Se } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-8r29jKh9.js";
|
|
15
|
+
import { _ as ze } from "./SendVoucherSheet.vue_vue_type_script_setup_true_lang-BRIcZwnU.js";
|
|
16
|
+
import { u as Ue } from "./vue-i18n-Dpic36zz.js";
|
|
17
|
+
import { T as Te } from "./trigger-Bc6s2cvq.js";
|
|
18
|
+
import { u as Ve } from "./onboardingSetup-CcvKmyx8.js";
|
|
19
|
+
import { R as W, W as Pe, S as we } from "./index-BRPajAkE.js";
|
|
20
|
+
import "./index-BTkxgos0.js";
|
|
21
|
+
import { i as $ } from "./helper-BCkTvF4m.js";
|
|
22
22
|
import { useRouter as Ne } from "vue-router";
|
|
23
|
-
import { c as C } from "./index-
|
|
24
|
-
import { R } from "./app-
|
|
23
|
+
import { c as C } from "./index-D5AR7A5e.js";
|
|
24
|
+
import { R } from "./app-BEYzXWZO.js";
|
|
25
25
|
const Ee = {
|
|
26
26
|
_id: "",
|
|
27
27
|
intention: ["REVISITING", "MEMBER_REWARD"],
|
|
@@ -364,7 +364,7 @@ const Ee = {
|
|
|
364
364
|
negated: !0
|
|
365
365
|
}
|
|
366
366
|
},
|
|
367
|
-
logic: "
|
|
367
|
+
logic: "!r_lastVisit"
|
|
368
368
|
}
|
|
369
369
|
},
|
|
370
370
|
logic: "g_user && g_schedule"
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { defineComponent as B, ref as L, resolveComponent as g, openBlock as p, createBlock as O, withCtx as y, renderSlot as J, createVNode as m, createTextVNode as U, toDisplayString as f, createElementVNode as s, unref as e, computed as N, createElementBlock as S, Fragment as w, renderList as K, normalizeClass as Q, createCommentVNode as T, resolveDynamicComponent as H } from "vue";
|
|
2
|
-
import { u as G } from "./vue-i18n-
|
|
3
|
-
import { c as j } from "./index-
|
|
4
|
-
import { g as W, F as Y } from "./index-
|
|
5
|
-
import { C as ee } from "./membership-
|
|
6
|
-
import { Z as x } from "./zod-
|
|
7
|
-
import { S as te } from "./app-
|
|
8
|
-
import { u as le } from "./business-
|
|
2
|
+
import { u as G } from "./vue-i18n-Dpic36zz.js";
|
|
3
|
+
import { c as j } from "./index-BUP4aHq8.js";
|
|
4
|
+
import { g as W, F as Y } from "./index-BTkxgos0.js";
|
|
5
|
+
import { C as ee } from "./membership-DCVzFaFy.js";
|
|
6
|
+
import { Z as x } from "./zod-CGVrMcDl.js";
|
|
7
|
+
import { S as te } from "./app-BEYzXWZO.js";
|
|
8
|
+
import { u as le } from "./business-DH7djUl8.js";
|
|
9
9
|
import { useCoreStore as oe } from "@feedmepos/mf-common";
|
|
10
|
-
import { _ as ne } from "./ZodTextField.vue_vue_type_script_setup_true_lang-
|
|
11
|
-
import { _ as ae } from "./ImageInput.vue_vue_type_script_setup_true_lang-
|
|
12
|
-
import {
|
|
13
|
-
import { _ as me } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-
|
|
14
|
-
import { i as re } from "./helper-
|
|
10
|
+
import { _ as ne } from "./ZodTextField.vue_vue_type_script_setup_true_lang-Bcsi94dw.js";
|
|
11
|
+
import { _ as ae } from "./ImageInput.vue_vue_type_script_setup_true_lang-BmLclEyi.js";
|
|
12
|
+
import { b as ie, a as se } from "./EffectSheet.vue_vue_type_style_index_0_lang-BML_-v8I.js";
|
|
13
|
+
import { _ as me } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-BrEzWVrH.js";
|
|
14
|
+
import { i as re } from "./helper-BCkTvF4m.js";
|
|
15
15
|
const ue = { class: "flex justify-end gap-8 w-full" }, ce = /* @__PURE__ */ B({
|
|
16
16
|
__name: "MenuSheet",
|
|
17
17
|
props: {
|
|
@@ -95,7 +95,7 @@ const ue = { class: "flex justify-end gap-8 w-full" }, ce = /* @__PURE__ */ B({
|
|
|
95
95
|
},
|
|
96
96
|
emits: ["update:model-value"],
|
|
97
97
|
setup(o, { emit: I }) {
|
|
98
|
-
var b,
|
|
98
|
+
var b, E, _;
|
|
99
99
|
const C = le(), { t: l } = G(), t = o, u = I, h = N(
|
|
100
100
|
() => [
|
|
101
101
|
{
|
|
@@ -135,7 +135,7 @@ const ue = { class: "flex justify-end gap-8 w-full" }, ce = /* @__PURE__ */ B({
|
|
|
135
135
|
);
|
|
136
136
|
}
|
|
137
137
|
const v = L(
|
|
138
|
-
((b = t.modelValue) == null ? void 0 : b.type) === "PROPORTIONAL" && !!((
|
|
138
|
+
((b = t.modelValue) == null ? void 0 : b.type) === "PROPORTIONAL" && !!((_ = (E = t.modelValue) == null ? void 0 : E.property) != null && _.length) || !1
|
|
139
139
|
);
|
|
140
140
|
return (a, i) => {
|
|
141
141
|
var D, $, X;
|
|
@@ -329,7 +329,7 @@ const ue = { class: "flex justify-end gap-8 w-full" }, ce = /* @__PURE__ */ B({
|
|
|
329
329
|
})
|
|
330
330
|
), u = Y, h = I;
|
|
331
331
|
return (c, n) => {
|
|
332
|
-
var b,
|
|
332
|
+
var b, E, _;
|
|
333
333
|
const P = g("FmTextarea"), v = g("FmHelperText");
|
|
334
334
|
return p(), S(w, null, [
|
|
335
335
|
m(ne, {
|
|
@@ -398,7 +398,7 @@ const ue = { class: "flex justify-end gap-8 w-full" }, ce = /* @__PURE__ */ B({
|
|
|
398
398
|
n[9] || (n[9] = s("div", { class: "fm-typo-en-title-sm-800 !mb-[-8px]" }, "Availability", -1)),
|
|
399
399
|
e(t).type === "VOUCHER" ? (p(), O(me, {
|
|
400
400
|
key: 1,
|
|
401
|
-
"model-value": ((
|
|
401
|
+
"model-value": ((_ = (E = e(t).extras) == null ? void 0 : E.targetLocation) == null ? void 0 : _.map(String)) ?? null,
|
|
402
402
|
type: "select",
|
|
403
403
|
"onUpdate:modelValue": n[5] || (n[5] = (a) => {
|
|
404
404
|
e(t).extras.targetLocation = a;
|
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
import { defineComponent as j, mergeModels as J, useModel as K, computed as R, ref as u, watch as M, onBeforeUnmount as S, resolveComponent as g, openBlock as p, createBlock as U, withCtx as E, createElementVNode as e, toDisplayString as n, unref as t, createElementBlock as x, createVNode as f, createTextVNode as T, Fragment as D, renderList as Q, createCommentVNode as A, normalizeClass as X } from "vue";
|
|
2
|
+
import { u as W } from "./vue-i18n-Dpic36zz.js";
|
|
3
|
+
import { useRoute as Y } from "vue-router";
|
|
4
|
+
import { S as z, a as P } from "./index-BUP4aHq8.js";
|
|
5
|
+
import { w as O } from "./index-D7-Q86HI.js";
|
|
6
|
+
import { u as q, _ as Z } from "./WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-D8L6izf0.js";
|
|
7
|
+
import { b as ee } from "./browser-BSAOEeIM.js";
|
|
8
|
+
import { R as te } from "./app-BEYzXWZO.js";
|
|
9
|
+
const oe = { class: "min-w-0 flex flex-col" }, ne = { class: "text-[18px] leading-[24px] font-semibold" }, ae = { class: "text-[13px] leading-[18px] text-fm-color-typo-secondary break-words" }, se = {
|
|
10
|
+
key: 0,
|
|
11
|
+
role: "status",
|
|
12
|
+
class: "py-[56px] flex flex-col items-center gap-[12px] text-[14px] text-fm-color-typo-secondary"
|
|
13
|
+
}, le = {
|
|
14
|
+
key: 1,
|
|
15
|
+
class: "py-[40px] flex flex-col items-center text-center gap-[16px]"
|
|
16
|
+
}, re = {
|
|
17
|
+
role: "alert",
|
|
18
|
+
class: "text-[14px] text-fm-color-typo-error"
|
|
19
|
+
}, ie = {
|
|
20
|
+
key: 2,
|
|
21
|
+
class: "grid grid-cols-[minmax(0,1fr)_226px] xs:grid-cols-1 gap-[32px] p-[8px] xs:p-[0px]"
|
|
22
|
+
}, ce = { class: "min-w-0 flex flex-col gap-[20px] text-[14px] leading-[20px]" }, pe = { class: "text-fm-color-typo-secondary" }, ue = { class: "flex flex-col gap-[10px]" }, de = { class: "text-[12px] leading-[16px] font-semibold uppercase tracking-[0.06em] text-fm-color-typo-secondary" }, fe = { class: "flex flex-col gap-[10px]" }, xe = { class: "flex flex-col gap-[6px]" }, me = {
|
|
23
|
+
id: "whatsapp-group-invite-link-label",
|
|
24
|
+
class: "font-medium text-fm-color-typo-secondary"
|
|
25
|
+
}, ve = { class: "flex items-center gap-[8px] border border-fm-color-neutral-gray-200 rounded-[8px] pl-[12px] pr-[4px] py-[4px]" }, he = {
|
|
26
|
+
id: "whatsapp-group-invite-link",
|
|
27
|
+
role: "textbox",
|
|
28
|
+
"aria-readonly": "true",
|
|
29
|
+
"aria-labelledby": "whatsapp-group-invite-link-label",
|
|
30
|
+
tabindex: "0",
|
|
31
|
+
class: "flex-1 min-w-0 h-[32px] overflow-x-auto overflow-y-hidden whitespace-nowrap text-[13px] leading-[32px] font-mono bg-fm-color-neutral-white rounded-[4px] focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-fm-color-primary"
|
|
32
|
+
}, ge = ["disabled"], _e = {
|
|
33
|
+
key: 0,
|
|
34
|
+
role: "status",
|
|
35
|
+
class: "sr-only"
|
|
36
|
+
}, ye = {
|
|
37
|
+
key: 1,
|
|
38
|
+
role: "alert",
|
|
39
|
+
class: "text-[12px] leading-[16px] text-fm-color-typo-error"
|
|
40
|
+
}, be = { class: "text-[12px] leading-[16px] text-fm-color-typo-secondary" }, we = { class: "flex flex-col items-center gap-[12px] w-[226px] xs:justify-self-center" }, Be = { class: "border border-fm-color-neutral-gray-100 rounded-[12px] overflow-hidden" }, ke = ["src", "alt"], $e = ["href"], Ge = /* @__PURE__ */ j({
|
|
41
|
+
__name: "WhatsappNotificationGroupDialog",
|
|
42
|
+
props: /* @__PURE__ */ J({
|
|
43
|
+
account: {}
|
|
44
|
+
}, {
|
|
45
|
+
modelValue: { type: Boolean, required: !0 },
|
|
46
|
+
modelModifiers: {}
|
|
47
|
+
}),
|
|
48
|
+
emits: ["update:modelValue"],
|
|
49
|
+
setup(N) {
|
|
50
|
+
const s = N, k = K(N, "modelValue"), { t: o } = W(), _ = R(() => z.getBusinessId() ?? ""), { name: d, phoneNumber: G } = q(() => s.account), l = u(), m = u(""), C = u(!1), v = u(""), h = u(!1), y = u(!1), b = u("");
|
|
51
|
+
let r, w;
|
|
52
|
+
function B() {
|
|
53
|
+
r == null || r.abort(), clearTimeout(w), h.value = !1, y.value = !1;
|
|
54
|
+
}
|
|
55
|
+
async function $() {
|
|
56
|
+
B();
|
|
57
|
+
const a = new AbortController();
|
|
58
|
+
r = a, C.value = !0, v.value = "", b.value = "", l.value = void 0, m.value = "";
|
|
59
|
+
try {
|
|
60
|
+
if (!_.value)
|
|
61
|
+
throw new Error(o("connect.whatsappBot.errors.selectBusiness"));
|
|
62
|
+
const c = await O.getNotificationGroup(
|
|
63
|
+
_.value,
|
|
64
|
+
s.account.clientId,
|
|
65
|
+
a.signal
|
|
66
|
+
);
|
|
67
|
+
if (a.signal.aborted) return;
|
|
68
|
+
const F = await ee.toDataURL(c.inviteLink, {
|
|
69
|
+
width: 224,
|
|
70
|
+
margin: 2,
|
|
71
|
+
errorCorrectionLevel: "M"
|
|
72
|
+
});
|
|
73
|
+
if (a.signal.aborted) return;
|
|
74
|
+
l.value = c, m.value = F;
|
|
75
|
+
} catch (c) {
|
|
76
|
+
if (a.signal.aborted) return;
|
|
77
|
+
c instanceof P && c.status === 409 ? v.value = o("connect.whatsappBot.notificationGroup.notReady") : c instanceof P && c.status === 404 ? v.value = o("connect.whatsappBot.errors.accountNotFound") : v.value = _.value ? o("connect.whatsappBot.errors.loadGroup") : o("connect.whatsappBot.errors.selectBusiness");
|
|
78
|
+
} finally {
|
|
79
|
+
a.signal.aborted || (C.value = !1);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
async function i() {
|
|
83
|
+
if (!l.value || !r || y.value) return;
|
|
84
|
+
const a = r;
|
|
85
|
+
y.value = !0, h.value = !1, b.value = "", clearTimeout(w);
|
|
86
|
+
try {
|
|
87
|
+
if (await navigator.clipboard.writeText(l.value.inviteLink), a.signal.aborted) return;
|
|
88
|
+
h.value = !0, w = setTimeout(() => {
|
|
89
|
+
h.value = !1;
|
|
90
|
+
}, 2e3);
|
|
91
|
+
} catch {
|
|
92
|
+
a.signal.aborted || (b.value = o("connect.whatsappBot.errors.copyGroupLink"));
|
|
93
|
+
} finally {
|
|
94
|
+
a.signal.aborted || (y.value = !1);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
return M(
|
|
98
|
+
[k, _, () => s.account.clientId],
|
|
99
|
+
([a]) => {
|
|
100
|
+
a ? $() : B();
|
|
101
|
+
},
|
|
102
|
+
{ immediate: !0 }
|
|
103
|
+
), S(B), (a, c) => {
|
|
104
|
+
const F = g("FmCircularProgress"), V = g("FmButton"), I = g("FmIcon"), H = g("FmDialog");
|
|
105
|
+
return p(), U(H, {
|
|
106
|
+
modelValue: k.value,
|
|
107
|
+
"onUpdate:modelValue": c[0] || (c[0] = (L) => k.value = L),
|
|
108
|
+
"min-width": "min(720px, calc(100% - 32px))",
|
|
109
|
+
"max-width": "720px",
|
|
110
|
+
"max-height": "90vh",
|
|
111
|
+
"dismiss-away": ""
|
|
112
|
+
}, {
|
|
113
|
+
"dialog-header": E(() => [
|
|
114
|
+
e("div", oe, [
|
|
115
|
+
e("h2", ne, n(t(o)("connect.whatsappBot.notificationGroup.dialogTitle")), 1),
|
|
116
|
+
e("p", ae, n(t(d)) + " · " + n(t(G)), 1)
|
|
117
|
+
])
|
|
118
|
+
]),
|
|
119
|
+
default: E(() => [
|
|
120
|
+
C.value ? (p(), x("div", se, [
|
|
121
|
+
f(F),
|
|
122
|
+
T(" " + n(t(o)("connect.whatsappBot.notificationGroup.loading")), 1)
|
|
123
|
+
])) : v.value ? (p(), x("div", le, [
|
|
124
|
+
e("p", re, n(v.value), 1),
|
|
125
|
+
f(V, {
|
|
126
|
+
label: t(o)("connect.whatsappBot.tryAgain"),
|
|
127
|
+
"prepend-icon": "refresh",
|
|
128
|
+
onClick: $
|
|
129
|
+
}, null, 8, ["label"])
|
|
130
|
+
])) : l.value ? (p(), x("div", ie, [
|
|
131
|
+
e("div", ce, [
|
|
132
|
+
e("p", pe, n(t(o)("connect.whatsappBot.notificationGroup.scanDescription")), 1),
|
|
133
|
+
e("div", ue, [
|
|
134
|
+
e("h3", de, n(t(o)("connect.whatsappBot.notificationGroup.postsTitle")), 1),
|
|
135
|
+
e("ul", fe, [
|
|
136
|
+
(p(), x(D, null, Q(["unanswered", "staffRequests", "humanRequests"], (L) => e("li", {
|
|
137
|
+
key: L,
|
|
138
|
+
class: "flex gap-[10px]"
|
|
139
|
+
}, [
|
|
140
|
+
c[1] || (c[1] = e("span", {
|
|
141
|
+
"aria-hidden": "true",
|
|
142
|
+
class: "w-[6px] h-[6px] rounded-full bg-fm-color-primary shrink-0 mt-[7px]"
|
|
143
|
+
}, null, -1)),
|
|
144
|
+
T(" " + n(t(o)(`connect.whatsappBot.notificationGroup.posts.${L}`)), 1)
|
|
145
|
+
])), 64))
|
|
146
|
+
])
|
|
147
|
+
]),
|
|
148
|
+
e("div", xe, [
|
|
149
|
+
e("span", me, n(t(o)("connect.whatsappBot.notificationGroup.inviteLink")), 1),
|
|
150
|
+
e("div", ve, [
|
|
151
|
+
e("div", he, n(l.value.inviteLink), 1),
|
|
152
|
+
e("button", {
|
|
153
|
+
type: "button",
|
|
154
|
+
disabled: y.value,
|
|
155
|
+
class: "shrink-0 h-[32px] px-[12px] rounded-[6px] bg-fm-color-neutral-gray-100 text-[13px] font-semibold hover:bg-fm-color-neutral-gray-200 disabled:opacity-50 focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-fm-color-primary",
|
|
156
|
+
onClick: i
|
|
157
|
+
}, n(t(o)(
|
|
158
|
+
`connect.whatsappBot.notificationGroup.${h.value ? "copied" : "copy"}`
|
|
159
|
+
)), 9, ge)
|
|
160
|
+
]),
|
|
161
|
+
h.value ? (p(), x("span", _e, n(t(o)("connect.whatsappBot.notificationGroup.copied")), 1)) : A("", !0),
|
|
162
|
+
b.value ? (p(), x("p", ye, n(b.value), 1)) : A("", !0),
|
|
163
|
+
e("p", be, n(t(o)("connect.whatsappBot.notificationGroup.shareNote")), 1)
|
|
164
|
+
])
|
|
165
|
+
]),
|
|
166
|
+
e("div", we, [
|
|
167
|
+
e("div", Be, [
|
|
168
|
+
e("img", {
|
|
169
|
+
src: m.value,
|
|
170
|
+
alt: t(o)("connect.whatsappBot.notificationGroup.qrAlt"),
|
|
171
|
+
width: "224",
|
|
172
|
+
height: "224"
|
|
173
|
+
}, null, 8, ke)
|
|
174
|
+
]),
|
|
175
|
+
e("a", {
|
|
176
|
+
href: l.value.inviteLink,
|
|
177
|
+
target: "_blank",
|
|
178
|
+
rel: "noopener noreferrer",
|
|
179
|
+
class: "w-full h-[40px] flex items-center justify-center gap-[6px] rounded-full bg-fm-color-primary text-fm-color-typo-white text-[14px] font-semibold no-underline hover:opacity-90 focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-fm-color-primary focus-visible:ring-offset-[2px]"
|
|
180
|
+
}, [
|
|
181
|
+
T(n(t(o)("connect.whatsappBot.notificationGroup.openWhatsapp")) + " ", 1),
|
|
182
|
+
f(I, {
|
|
183
|
+
name: "open_in_new",
|
|
184
|
+
size: "sm"
|
|
185
|
+
})
|
|
186
|
+
], 8, $e)
|
|
187
|
+
])
|
|
188
|
+
])) : A("", !0)
|
|
189
|
+
]),
|
|
190
|
+
_: 1
|
|
191
|
+
}, 8, ["modelValue"]);
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
}), Ce = { class: "px-[24px] xs:px-[12px] pt-[20px] pb-[40px] text-fm-color-typo-primary" }, Fe = { class: "w-full flex flex-col gap-[24px]" }, Ie = {
|
|
195
|
+
key: 0,
|
|
196
|
+
role: "status",
|
|
197
|
+
class: "py-[56px] flex flex-col items-center gap-[12px] text-[14px] text-fm-color-typo-secondary"
|
|
198
|
+
}, Te = {
|
|
199
|
+
key: 1,
|
|
200
|
+
class: "border border-fm-color-neutral-gray-200 rounded-[16px] px-[24px] py-[56px] flex flex-col items-center text-center gap-[16px]"
|
|
201
|
+
}, Ae = {
|
|
202
|
+
role: "alert",
|
|
203
|
+
class: "text-[14px] text-fm-color-typo-error"
|
|
204
|
+
}, Ve = { class: "flex items-center gap-[16px]" }, Le = { class: "min-w-0 flex-1 flex flex-col gap-[2px]" }, Ne = { class: "text-[24px] leading-[32px] font-semibold tracking-[-0.01em] break-words" }, Re = { class: "flex items-center gap-[10px] flex-wrap text-[14px] text-fm-color-typo-secondary" }, Ee = { class: "break-all" }, De = {
|
|
205
|
+
"aria-labelledby": "notification-group-title",
|
|
206
|
+
class: "border border-fm-color-neutral-gray-100 rounded-[16px] p-[24px] xs:p-[20px] flex items-center gap-[16px] flex-wrap"
|
|
207
|
+
}, Pe = {
|
|
208
|
+
"aria-hidden": "true",
|
|
209
|
+
class: "w-[40px] h-[40px] rounded-[8px] shrink-0 self-start bg-fm-color-primary-oats text-fm-color-primary flex items-center justify-center"
|
|
210
|
+
}, je = { class: "min-w-[240px] xs:min-w-0 flex-1 flex flex-col gap-[4px]" }, Me = {
|
|
211
|
+
id: "notification-group-title",
|
|
212
|
+
class: "text-[16px] leading-[24px] font-semibold"
|
|
213
|
+
}, Se = { class: "text-[14px] leading-[20px] text-fm-color-typo-secondary" }, Qe = /* @__PURE__ */ j({
|
|
214
|
+
__name: "WhatsappAccount",
|
|
215
|
+
setup(N) {
|
|
216
|
+
const { t: s } = W(), k = Y(), o = R(() => z.getBusinessId() ?? ""), _ = R(
|
|
217
|
+
() => typeof k.params.clientId == "string" ? k.params.clientId : ""
|
|
218
|
+
), d = u(), G = u(!0), l = u(""), m = u(!1), { name: C, phoneNumber: v, initials: h, state: y, avatarColor: b } = q(d);
|
|
219
|
+
let r, w;
|
|
220
|
+
async function B($ = !1) {
|
|
221
|
+
clearTimeout(w), r == null || r.abort();
|
|
222
|
+
const i = new AbortController();
|
|
223
|
+
r = i, $ || (G.value = !0, l.value = "");
|
|
224
|
+
try {
|
|
225
|
+
if (!o.value)
|
|
226
|
+
throw new Error(s("connect.whatsappBot.errors.selectBusiness"));
|
|
227
|
+
const a = await O.getClient(
|
|
228
|
+
o.value,
|
|
229
|
+
_.value,
|
|
230
|
+
i.signal
|
|
231
|
+
);
|
|
232
|
+
if (i.signal.aborted) return;
|
|
233
|
+
d.value = a, l.value = "";
|
|
234
|
+
} catch (a) {
|
|
235
|
+
if (i.signal.aborted) return;
|
|
236
|
+
a instanceof P && a.status === 404 ? (m.value = !1, d.value = void 0, l.value = s("connect.whatsappBot.errors.accountNotFound")) : $ || (l.value = o.value ? s("connect.whatsappBot.errors.loadAccount") : s("connect.whatsappBot.errors.selectBusiness"));
|
|
237
|
+
} finally {
|
|
238
|
+
i.signal.aborted || (G.value = !1, d.value && (w = setTimeout(() => void B(!0), 1e4)));
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
return M(
|
|
242
|
+
[o, _],
|
|
243
|
+
() => {
|
|
244
|
+
m.value = !1, d.value = void 0, B();
|
|
245
|
+
},
|
|
246
|
+
{ immediate: !0 }
|
|
247
|
+
), S(() => {
|
|
248
|
+
r == null || r.abort(), clearTimeout(w);
|
|
249
|
+
}), ($, i) => {
|
|
250
|
+
const a = g("FmIcon"), c = g("RouterLink"), F = g("FmCircularProgress"), V = g("FmButton");
|
|
251
|
+
return p(), x(D, null, [
|
|
252
|
+
e("div", Ce, [
|
|
253
|
+
e("div", Fe, [
|
|
254
|
+
f(c, {
|
|
255
|
+
to: { name: t(te)["$connect-WHATSAPP_BOT"] },
|
|
256
|
+
class: "self-start flex items-center gap-[4px] h-[32px] pl-[6px] pr-[10px] -ml-[6px] rounded-[8px] text-[14px] font-medium text-fm-color-typo-secondary no-underline hover:bg-fm-color-neutral-gray-100 hover:text-fm-color-typo-primary focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-fm-color-primary"
|
|
257
|
+
}, {
|
|
258
|
+
default: E(() => [
|
|
259
|
+
f(a, {
|
|
260
|
+
name: "chevron_left",
|
|
261
|
+
size: "sm"
|
|
262
|
+
}),
|
|
263
|
+
T(" " + n(t(s)("connect.navigation.whatsappBot")), 1)
|
|
264
|
+
]),
|
|
265
|
+
_: 1
|
|
266
|
+
}, 8, ["to"]),
|
|
267
|
+
G.value ? (p(), x("div", Ie, [
|
|
268
|
+
f(F),
|
|
269
|
+
T(" " + n(t(s)("connect.whatsappBot.loadingAccount")), 1)
|
|
270
|
+
])) : l.value ? (p(), x("div", Te, [
|
|
271
|
+
e("p", Ae, n(l.value), 1),
|
|
272
|
+
f(V, {
|
|
273
|
+
label: t(s)("connect.whatsappBot.tryAgain"),
|
|
274
|
+
"prepend-icon": "refresh",
|
|
275
|
+
onClick: i[0] || (i[0] = (I) => B())
|
|
276
|
+
}, null, 8, ["label"])
|
|
277
|
+
])) : d.value ? (p(), x(D, { key: 2 }, [
|
|
278
|
+
e("div", Ve, [
|
|
279
|
+
e("div", {
|
|
280
|
+
"aria-hidden": "true",
|
|
281
|
+
class: X(["w-[56px] h-[56px] rounded-full shrink-0 flex items-center justify-center text-[18px] font-semibold text-fm-color-typo-white", t(b)])
|
|
282
|
+
}, n(t(h)), 3),
|
|
283
|
+
e("div", Le, [
|
|
284
|
+
e("h1", Ne, n(t(C)), 1),
|
|
285
|
+
e("div", Re, [
|
|
286
|
+
e("span", Ee, n(t(v)), 1),
|
|
287
|
+
f(Z, { state: t(y) }, null, 8, ["state"])
|
|
288
|
+
])
|
|
289
|
+
])
|
|
290
|
+
]),
|
|
291
|
+
e("section", De, [
|
|
292
|
+
e("div", Pe, [
|
|
293
|
+
f(a, {
|
|
294
|
+
name: "notifications",
|
|
295
|
+
size: "md"
|
|
296
|
+
})
|
|
297
|
+
]),
|
|
298
|
+
e("div", je, [
|
|
299
|
+
e("h2", Me, n(t(s)("connect.whatsappBot.notificationGroup.title")), 1),
|
|
300
|
+
e("p", Se, n(t(s)("connect.whatsappBot.notificationGroup.description")), 1)
|
|
301
|
+
]),
|
|
302
|
+
f(V, {
|
|
303
|
+
variant: "secondary",
|
|
304
|
+
label: t(s)("connect.whatsappBot.notificationGroup.join"),
|
|
305
|
+
"prepend-icon": "group",
|
|
306
|
+
class: "shrink-0",
|
|
307
|
+
onClick: i[1] || (i[1] = (I) => m.value = !0)
|
|
308
|
+
}, null, 8, ["label"])
|
|
309
|
+
])
|
|
310
|
+
], 64)) : A("", !0)
|
|
311
|
+
])
|
|
312
|
+
]),
|
|
313
|
+
d.value ? (p(), U(Ge, {
|
|
314
|
+
key: 0,
|
|
315
|
+
modelValue: m.value,
|
|
316
|
+
"onUpdate:modelValue": i[2] || (i[2] = (I) => m.value = I),
|
|
317
|
+
account: d.value
|
|
318
|
+
}, null, 8, ["modelValue", "account"])) : A("", !0)
|
|
319
|
+
], 64);
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
});
|
|
323
|
+
export {
|
|
324
|
+
Qe as default
|
|
325
|
+
};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { computed as n, toValue as h, defineComponent as x, openBlock as w, createElementBlock as A, normalizeClass as b, createElementVNode as B, createTextVNode as _, toDisplayString as C, unref as N } from "vue";
|
|
2
|
+
import { u as f } from "./vue-i18n-Dpic36zz.js";
|
|
3
|
+
function O(a) {
|
|
4
|
+
const o = a.connectedAt !== null;
|
|
5
|
+
switch (a.status) {
|
|
6
|
+
case "connected":
|
|
7
|
+
return "connected";
|
|
8
|
+
case "disconnected":
|
|
9
|
+
return "disconnected";
|
|
10
|
+
case "connecting":
|
|
11
|
+
return o ? "connecting" : void 0;
|
|
12
|
+
case "not_found":
|
|
13
|
+
return o ? "loggedOut" : void 0;
|
|
14
|
+
case "unavailable":
|
|
15
|
+
return o ? "unavailable" : void 0;
|
|
16
|
+
case "pairing":
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
const g = [
|
|
21
|
+
"bg-fm-color-primary",
|
|
22
|
+
"bg-fm-color-secondary-plum",
|
|
23
|
+
"bg-fm-color-system-success-400"
|
|
24
|
+
];
|
|
25
|
+
function I(a) {
|
|
26
|
+
const { t: o, locale: l } = f(), t = n(() => h(a)), c = n(
|
|
27
|
+
() => {
|
|
28
|
+
var e, s, p, i, m, d;
|
|
29
|
+
return ((s = (e = t.value) == null ? void 0 : e.account) == null ? void 0 : s.businessName) || ((i = (p = t.value) == null ? void 0 : p.account) == null ? void 0 : i.name) || ((d = (m = t.value) == null ? void 0 : m.account) == null ? void 0 : d.phoneNumber) || o("connect.whatsappBot.unnamedAccount");
|
|
30
|
+
}
|
|
31
|
+
), r = n(
|
|
32
|
+
() => {
|
|
33
|
+
var e, s;
|
|
34
|
+
return ((s = (e = t.value) == null ? void 0 : e.account) == null ? void 0 : s.phoneNumber) || o("connect.whatsappBot.phoneUnavailable");
|
|
35
|
+
}
|
|
36
|
+
), u = n(
|
|
37
|
+
() => c.value.trim().split(/\s+/).slice(0, 2).map((e) => Array.from(e)[0]).join("").toLocaleUpperCase(l.value)
|
|
38
|
+
), v = n(
|
|
39
|
+
() => t.value ? O(t.value) ?? "unavailable" : "unavailable"
|
|
40
|
+
), y = n(
|
|
41
|
+
() => {
|
|
42
|
+
var e;
|
|
43
|
+
return g[parseInt(((e = t.value) == null ? void 0 : e.clientId.slice(-6)) ?? "0", 16) % g.length];
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
return { name: c, phoneNumber: r, initials: u, state: v, avatarColor: y };
|
|
47
|
+
}
|
|
48
|
+
const L = /* @__PURE__ */ x({
|
|
49
|
+
__name: "WhatsappAccountStatusLabel",
|
|
50
|
+
props: {
|
|
51
|
+
state: {}
|
|
52
|
+
},
|
|
53
|
+
setup(a) {
|
|
54
|
+
const o = a, { t: l } = f(), t = {
|
|
55
|
+
connected: {
|
|
56
|
+
label: "connect.whatsappBot.connected",
|
|
57
|
+
pill: "text-fm-color-typo-success bg-fm-color-system-success-100",
|
|
58
|
+
dot: "bg-fm-color-system-success-400"
|
|
59
|
+
},
|
|
60
|
+
connecting: {
|
|
61
|
+
label: "connect.whatsappBot.statusConnecting",
|
|
62
|
+
pill: "text-fm-color-typo-warning bg-fm-color-system-warning-100",
|
|
63
|
+
dot: "bg-fm-color-system-warning-400"
|
|
64
|
+
},
|
|
65
|
+
disconnected: {
|
|
66
|
+
label: "connect.whatsappBot.disconnected",
|
|
67
|
+
pill: "text-fm-color-typo-error bg-fm-color-system-error-100",
|
|
68
|
+
dot: "bg-fm-color-system-error-400"
|
|
69
|
+
},
|
|
70
|
+
loggedOut: {
|
|
71
|
+
label: "connect.whatsappBot.loggedOut",
|
|
72
|
+
pill: "text-fm-color-typo-error bg-fm-color-system-error-100",
|
|
73
|
+
dot: "bg-fm-color-system-error-400"
|
|
74
|
+
},
|
|
75
|
+
unavailable: {
|
|
76
|
+
label: "connect.whatsappBot.statusUnavailable",
|
|
77
|
+
pill: "text-fm-color-typo-secondary bg-fm-color-neutral-gray-100",
|
|
78
|
+
dot: "bg-fm-color-neutral-gray-400"
|
|
79
|
+
}
|
|
80
|
+
}, c = n(() => t[o.state]);
|
|
81
|
+
return (r, u) => (w(), A("span", {
|
|
82
|
+
class: b(["flex items-center gap-[6px] text-[12px] font-semibold px-[8px] py-[3px] rounded-[6px]", c.value.pill])
|
|
83
|
+
}, [
|
|
84
|
+
B("span", {
|
|
85
|
+
"aria-hidden": "true",
|
|
86
|
+
class: b(["w-[6px] h-[6px] rounded-full", c.value.dot])
|
|
87
|
+
}, null, 2),
|
|
88
|
+
_(" " + C(N(l)(c.value.label)), 1)
|
|
89
|
+
], 2));
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
export {
|
|
93
|
+
L as _,
|
|
94
|
+
I as u,
|
|
95
|
+
O as w
|
|
96
|
+
};
|