@flowengage/react-chatbot 5.0.31 → 5.0.32
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.
|
@@ -26596,21 +26596,25 @@ function HD({ src: e, name: t, imgStyle: n, initialsSpanStyle: r }) {
|
|
|
26596
26596
|
}
|
|
26597
26597
|
//#endregion
|
|
26598
26598
|
//#region src/components/MessageList.jsx
|
|
26599
|
-
function UD(e) {
|
|
26600
|
-
let
|
|
26601
|
-
|
|
26602
|
-
|
|
26603
|
-
|
|
26604
|
-
|
|
26605
|
-
|
|
26606
|
-
|
|
26607
|
-
|
|
26608
|
-
|
|
26609
|
-
|
|
26610
|
-
|
|
26611
|
-
|
|
26612
|
-
|
|
26613
|
-
|
|
26599
|
+
function UD({ chatHistory: e, isAiTyping: t, isLoading: n, isAgentTyping: r, setReplyContext: i, primaryColor: a = "#3B82F6", agentHeadshot: s = null, agentDisplayName: l = "Agent", botAvatarNode: u = null }) {
|
|
26600
|
+
let { resolvedConfig: d } = Ln(), f = p(null), [v, y] = m(null), [b, x] = m(null), S = p(e.length), C = p(!0), w = p(null), T = o((e) => {
|
|
26601
|
+
let t = e.target.closest("a[href]");
|
|
26602
|
+
if (!t) return;
|
|
26603
|
+
let n = t.getAttribute("href") || "";
|
|
26604
|
+
if (!(!n || n.startsWith("mailto:") || n.startsWith("tel:") || n.startsWith("javascript:"))) try {
|
|
26605
|
+
let t = new URL(n, window.location.href);
|
|
26606
|
+
if (t.origin !== window.location.origin) {
|
|
26607
|
+
e.preventDefault(), window.open(t.href, "_blank", "noopener,noreferrer");
|
|
26608
|
+
return;
|
|
26609
|
+
}
|
|
26610
|
+
e.preventDefault(), gr(t.href, {
|
|
26611
|
+
siteId: d?.siteId,
|
|
26612
|
+
apiBaseUrl: d?.apiBaseUrl
|
|
26613
|
+
}).then((e) => {
|
|
26614
|
+
e && xr(t.href);
|
|
26615
|
+
});
|
|
26616
|
+
} catch {}
|
|
26617
|
+
}, [d]), ee = (e) => {
|
|
26614
26618
|
if (!e) return "just now";
|
|
26615
26619
|
let t = /* @__PURE__ */ new Date(), n = new Date(e), r = Math.max(0, Math.floor((t - n) / 1e3));
|
|
26616
26620
|
if (r < 60) return "just now";
|
|
@@ -26622,19 +26626,19 @@ function WD({ chatHistory: e, isAiTyping: t, isLoading: n, isAgentTyping: r, set
|
|
|
26622
26626
|
return `${o} day${o > 1 ? "s" : ""} ago`;
|
|
26623
26627
|
};
|
|
26624
26628
|
return c(() => {
|
|
26625
|
-
if (
|
|
26626
|
-
|
|
26629
|
+
if (C.current) {
|
|
26630
|
+
C.current = !1, S.current = e.length, w.current && (w.current.scrollTop = w.current.scrollHeight);
|
|
26627
26631
|
return;
|
|
26628
26632
|
}
|
|
26629
|
-
let n = e.length >
|
|
26630
|
-
|
|
26633
|
+
let n = e.length > S.current;
|
|
26634
|
+
S.current = e.length, (n || t || r) && f.current?.scrollIntoView({ behavior: "smooth" });
|
|
26631
26635
|
}, [
|
|
26632
26636
|
e.length,
|
|
26633
26637
|
t,
|
|
26634
26638
|
n,
|
|
26635
26639
|
r
|
|
26636
26640
|
]), /* @__PURE__ */ _("div", {
|
|
26637
|
-
ref:
|
|
26641
|
+
ref: w,
|
|
26638
26642
|
style: {
|
|
26639
26643
|
flex: 1,
|
|
26640
26644
|
overflowY: "auto",
|
|
@@ -26647,7 +26651,7 @@ function WD({ chatHistory: e, isAiTyping: t, isLoading: n, isAgentTyping: r, set
|
|
|
26647
26651
|
children: [
|
|
26648
26652
|
e.map((e) => {
|
|
26649
26653
|
if (e.type === "call_recording" || typeof e.message == "string" && e.message.includes("AI chat recording")) return null;
|
|
26650
|
-
let t = e.sender === "system", n = e.sender === "user", r = e.sender === "ai" || e.sender === "bot",
|
|
26654
|
+
let t = e.sender === "system", n = e.sender === "user", r = e.sender === "ai" || e.sender === "bot", o = e.sender === "agent", c = e.isPending, d = e.type === "file" && e.metadata?.fileUrl, f = e.agent_name || e.agentName || e.metadata?.agentName || l, p = typeof e.sender_headshot == "string" && e.sender_headshot.trim() || typeof s == "string" && s.trim() || null, m = ED(e.replyToContent || e.replyContext?.message || ""), v = e.replyToSender === "user" ? "You" : e.replyToSender === "agent" ? "Agent" : e.replyToSender === "ai" || e.replyToSender === "bot" ? "AI Assistant" : "Message";
|
|
26651
26655
|
return t ? /* @__PURE__ */ g("div", {
|
|
26652
26656
|
style: {
|
|
26653
26657
|
display: "flex",
|
|
@@ -26674,7 +26678,7 @@ function WD({ chatHistory: e, isAiTyping: t, isLoading: n, isAgentTyping: r, set
|
|
|
26674
26678
|
gap: "8px",
|
|
26675
26679
|
flexDirection: "row"
|
|
26676
26680
|
},
|
|
26677
|
-
children: [!n && (r ||
|
|
26681
|
+
children: [!n && (r || o) && /* @__PURE__ */ g("div", {
|
|
26678
26682
|
style: {
|
|
26679
26683
|
width: "32px",
|
|
26680
26684
|
height: "32px",
|
|
@@ -26683,18 +26687,18 @@ function WD({ chatHistory: e, isAiTyping: t, isLoading: n, isAgentTyping: r, set
|
|
|
26683
26687
|
alignItems: "center",
|
|
26684
26688
|
justifyContent: "center",
|
|
26685
26689
|
borderRadius: "50%",
|
|
26686
|
-
background:
|
|
26687
|
-
color:
|
|
26688
|
-
boxShadow:
|
|
26690
|
+
background: o ? "#f3f4f6" : u && r ? "transparent" : "var(--flowengage-primary)",
|
|
26691
|
+
color: o ? a : "#fff",
|
|
26692
|
+
boxShadow: o ? "0 2px 8px rgba(0,0,0,0.06)" : u && r ? "none" : "0 8px 20px rgba(59,130,246,0.24)",
|
|
26689
26693
|
overflow: "hidden",
|
|
26690
|
-
border:
|
|
26694
|
+
border: o ? `1px solid ${a}22` : "none",
|
|
26691
26695
|
fontSize: "12px",
|
|
26692
26696
|
fontWeight: 800,
|
|
26693
|
-
marginTop: !
|
|
26697
|
+
marginTop: !c && (r || o) ? "22px" : "0px"
|
|
26694
26698
|
},
|
|
26695
|
-
children: r ?
|
|
26696
|
-
src:
|
|
26697
|
-
name:
|
|
26699
|
+
children: r ? u || /* @__PURE__ */ g(bD, { size: 16 }) : /* @__PURE__ */ g(HD, {
|
|
26700
|
+
src: p || "",
|
|
26701
|
+
name: f,
|
|
26698
26702
|
imgStyle: {
|
|
26699
26703
|
width: "100%",
|
|
26700
26704
|
height: "100%",
|
|
@@ -26711,7 +26715,7 @@ function WD({ chatHistory: e, isAiTyping: t, isLoading: n, isAgentTyping: r, set
|
|
|
26711
26715
|
minWidth: 0
|
|
26712
26716
|
},
|
|
26713
26717
|
children: [
|
|
26714
|
-
!
|
|
26718
|
+
!c && o && /* @__PURE__ */ _("button", {
|
|
26715
26719
|
type: "button",
|
|
26716
26720
|
onClick: () => i(e),
|
|
26717
26721
|
style: {
|
|
@@ -26747,12 +26751,12 @@ function WD({ chatHistory: e, isAiTyping: t, isLoading: n, isAgentTyping: r, set
|
|
|
26747
26751
|
color: n ? "#fff" : "#111827",
|
|
26748
26752
|
fontSize: "14px",
|
|
26749
26753
|
fontWeight: 400,
|
|
26750
|
-
opacity:
|
|
26754
|
+
opacity: c ? .55 : 1,
|
|
26751
26755
|
transition: "opacity 0.3s ease",
|
|
26752
26756
|
wordBreak: "break-word",
|
|
26753
26757
|
width: "fit-content"
|
|
26754
26758
|
},
|
|
26755
|
-
children: [
|
|
26759
|
+
children: [m && /* @__PURE__ */ _("div", {
|
|
26756
26760
|
style: {
|
|
26757
26761
|
marginBottom: "8px",
|
|
26758
26762
|
borderRadius: "14px",
|
|
@@ -26767,7 +26771,7 @@ function WD({ chatHistory: e, isAiTyping: t, isLoading: n, isAgentTyping: r, set
|
|
|
26767
26771
|
marginBottom: "2px",
|
|
26768
26772
|
fontWeight: 600
|
|
26769
26773
|
},
|
|
26770
|
-
children:
|
|
26774
|
+
children: v
|
|
26771
26775
|
}), /* @__PURE__ */ g("div", {
|
|
26772
26776
|
style: {
|
|
26773
26777
|
display: "-webkit-box",
|
|
@@ -26775,7 +26779,7 @@ function WD({ chatHistory: e, isAiTyping: t, isLoading: n, isAgentTyping: r, set
|
|
|
26775
26779
|
WebkitBoxOrient: "vertical",
|
|
26776
26780
|
overflow: "hidden"
|
|
26777
26781
|
},
|
|
26778
|
-
children:
|
|
26782
|
+
children: m
|
|
26779
26783
|
})]
|
|
26780
26784
|
}), d ? (() => {
|
|
26781
26785
|
let t = e.metadata.fileType || "", r = e.metadata.fileName || e.message || "File", i = zD(e.metadata.fileSize), a = t.startsWith("image/"), o = t === "application/pdf" ? {
|
|
@@ -26798,12 +26802,12 @@ function WD({ chatHistory: e, isAiTyping: t, isLoading: n, isAgentTyping: r, set
|
|
|
26798
26802
|
},
|
|
26799
26803
|
children: a ? /* @__PURE__ */ g("button", {
|
|
26800
26804
|
type: "button",
|
|
26801
|
-
onClick: () =>
|
|
26805
|
+
onClick: () => y({
|
|
26802
26806
|
url: e.metadata.fileUrl,
|
|
26803
26807
|
name: r
|
|
26804
26808
|
}),
|
|
26805
|
-
onMouseEnter: () =>
|
|
26806
|
-
onMouseLeave: () =>
|
|
26809
|
+
onMouseEnter: () => x(e.id),
|
|
26810
|
+
onMouseLeave: () => x(null),
|
|
26807
26811
|
style: {
|
|
26808
26812
|
display: "block",
|
|
26809
26813
|
width: "100%",
|
|
@@ -26831,7 +26835,7 @@ function WD({ chatHistory: e, isAiTyping: t, isLoading: n, isAgentTyping: r, set
|
|
|
26831
26835
|
position: "absolute",
|
|
26832
26836
|
inset: 0,
|
|
26833
26837
|
borderRadius: "10px",
|
|
26834
|
-
background:
|
|
26838
|
+
background: b === e.id ? "rgba(17,24,39,0.32)" : "rgba(17,24,39,0)",
|
|
26835
26839
|
display: "flex",
|
|
26836
26840
|
alignItems: "center",
|
|
26837
26841
|
justifyContent: "center",
|
|
@@ -26839,7 +26843,7 @@ function WD({ chatHistory: e, isAiTyping: t, isLoading: n, isAgentTyping: r, set
|
|
|
26839
26843
|
fontSize: "13px",
|
|
26840
26844
|
fontWeight: 700,
|
|
26841
26845
|
letterSpacing: "0.02em",
|
|
26842
|
-
opacity:
|
|
26846
|
+
opacity: b === e.id ? 1 : 0,
|
|
26843
26847
|
transition: "background 0.18s ease, opacity 0.18s ease",
|
|
26844
26848
|
pointerEvents: "none"
|
|
26845
26849
|
},
|
|
@@ -26951,9 +26955,9 @@ function WD({ chatHistory: e, isAiTyping: t, isLoading: n, isAgentTyping: r, set
|
|
|
26951
26955
|
})() : r ? /* @__PURE__ */ g("div", {
|
|
26952
26956
|
className: "flowengage-message-content fe-bot-message",
|
|
26953
26957
|
dangerouslySetInnerHTML: { __html: ND(e.message) },
|
|
26954
|
-
onClick:
|
|
26958
|
+
onClick: T
|
|
26955
26959
|
}) : /* @__PURE__ */ g("div", {
|
|
26956
|
-
style: { whiteSpace: n ||
|
|
26960
|
+
style: { whiteSpace: n || o ? "normal" : "pre-wrap" },
|
|
26957
26961
|
children: e.message
|
|
26958
26962
|
})]
|
|
26959
26963
|
}),
|
|
@@ -26966,7 +26970,7 @@ function WD({ chatHistory: e, isAiTyping: t, isLoading: n, isAgentTyping: r, set
|
|
|
26966
26970
|
padding: "0 4px",
|
|
26967
26971
|
alignSelf: n ? "flex-end" : "flex-start"
|
|
26968
26972
|
},
|
|
26969
|
-
children:
|
|
26973
|
+
children: c ? /* @__PURE__ */ g("span", {
|
|
26970
26974
|
style: {
|
|
26971
26975
|
fontSize: "10px",
|
|
26972
26976
|
color: "#9ca3af",
|
|
@@ -26980,7 +26984,7 @@ function WD({ chatHistory: e, isAiTyping: t, isLoading: n, isAgentTyping: r, set
|
|
|
26980
26984
|
color: "#9ca3af",
|
|
26981
26985
|
fontWeight: 500
|
|
26982
26986
|
},
|
|
26983
|
-
children:
|
|
26987
|
+
children: ee(e.timestamp || e.createdAt)
|
|
26984
26988
|
}), /* @__PURE__ */ g("span", {
|
|
26985
26989
|
style: {
|
|
26986
26990
|
fontSize: "10px",
|
|
@@ -27010,12 +27014,12 @@ function WD({ chatHistory: e, isAiTyping: t, isLoading: n, isAgentTyping: r, set
|
|
|
27010
27014
|
alignItems: "center",
|
|
27011
27015
|
justifyContent: "center",
|
|
27012
27016
|
borderRadius: "50%",
|
|
27013
|
-
background:
|
|
27017
|
+
background: u ? "transparent" : "var(--flowengage-primary)",
|
|
27014
27018
|
color: "#fff",
|
|
27015
|
-
boxShadow:
|
|
27019
|
+
boxShadow: u ? "none" : "0 8px 20px rgba(59,130,246,0.24)",
|
|
27016
27020
|
overflow: "hidden"
|
|
27017
27021
|
},
|
|
27018
|
-
children:
|
|
27022
|
+
children: u || /* @__PURE__ */ g(bD, { size: 16 })
|
|
27019
27023
|
}), /* @__PURE__ */ _("div", {
|
|
27020
27024
|
style: {
|
|
27021
27025
|
display: "flex",
|
|
@@ -27058,8 +27062,8 @@ function WD({ chatHistory: e, isAiTyping: t, isLoading: n, isAgentTyping: r, set
|
|
|
27058
27062
|
overflow: "hidden"
|
|
27059
27063
|
},
|
|
27060
27064
|
children: /* @__PURE__ */ g(HD, {
|
|
27061
|
-
src:
|
|
27062
|
-
name:
|
|
27065
|
+
src: s || "",
|
|
27066
|
+
name: l,
|
|
27063
27067
|
imgStyle: {
|
|
27064
27068
|
width: "100%",
|
|
27065
27069
|
height: "100%",
|
|
@@ -27091,10 +27095,10 @@ function WD({ chatHistory: e, isAiTyping: t, isLoading: n, isAgentTyping: r, set
|
|
|
27091
27095
|
} }, e))
|
|
27092
27096
|
})]
|
|
27093
27097
|
}),
|
|
27094
|
-
/* @__PURE__ */ g("div", { ref:
|
|
27095
|
-
|
|
27098
|
+
/* @__PURE__ */ g("div", { ref: f }),
|
|
27099
|
+
v && /* @__PURE__ */ g("button", {
|
|
27096
27100
|
type: "button",
|
|
27097
|
-
onClick: () =>
|
|
27101
|
+
onClick: () => y(null),
|
|
27098
27102
|
style: {
|
|
27099
27103
|
position: "fixed",
|
|
27100
27104
|
inset: 0,
|
|
@@ -27120,8 +27124,8 @@ function WD({ chatHistory: e, isAiTyping: t, isLoading: n, isAgentTyping: r, set
|
|
|
27120
27124
|
alignItems: "center"
|
|
27121
27125
|
},
|
|
27122
27126
|
children: [/* @__PURE__ */ g("img", {
|
|
27123
|
-
src:
|
|
27124
|
-
alt:
|
|
27127
|
+
src: v.url,
|
|
27128
|
+
alt: v.name,
|
|
27125
27129
|
style: {
|
|
27126
27130
|
width: "100%",
|
|
27127
27131
|
maxHeight: "calc(96vh - 72px)",
|
|
@@ -27142,7 +27146,7 @@ function WD({ chatHistory: e, isAiTyping: t, isLoading: n, isAgentTyping: r, set
|
|
|
27142
27146
|
textOverflow: "ellipsis",
|
|
27143
27147
|
whiteSpace: "nowrap"
|
|
27144
27148
|
},
|
|
27145
|
-
children:
|
|
27149
|
+
children: v.name
|
|
27146
27150
|
})]
|
|
27147
27151
|
})
|
|
27148
27152
|
})
|
|
@@ -27151,7 +27155,7 @@ function WD({ chatHistory: e, isAiTyping: t, isLoading: n, isAgentTyping: r, set
|
|
|
27151
27155
|
}
|
|
27152
27156
|
//#endregion
|
|
27153
27157
|
//#region src/components/ChatInput.jsx
|
|
27154
|
-
function
|
|
27158
|
+
function WD({ input: e, setInput: t, onSubmit: n, isConversationEnded: r, callUiActive: i, handleToggleVoice: a, activeScreen: o, inputDisabled: s, replyContext: c, clearReplyContext: l, requiresEmail: u, emailInput: d, setEmailInput: f, emailError: m, showVoiceToggle: v = !1, voiceEnabled: y = !0, onFileSelect: b, selectedFile: x = null, onRemoveSelectedFile: S, attachmentError: C = "", isUploadingAttachment: w = !1, inputPlaceholder: T = "Type your message" }) {
|
|
27155
27159
|
let ee = p(null), te = c?.sender === "user" ? "You" : c?.sender === "agent" ? "Agent" : "AI Assistant", ne = u ? !!d?.trim() : !!e?.trim() || !!x, re = s || w || !ne, E = !u && y && v;
|
|
27156
27160
|
return /* @__PURE__ */ _("div", {
|
|
27157
27161
|
style: {
|
|
@@ -27491,7 +27495,7 @@ function GD({ input: e, setInput: t, onSubmit: n, isConversationEnded: r, callUi
|
|
|
27491
27495
|
}
|
|
27492
27496
|
//#endregion
|
|
27493
27497
|
//#region src/components/StatusBanners.jsx
|
|
27494
|
-
function
|
|
27498
|
+
function GD({ webRTCError: e, micError: t, setMicError: n, dismissCallError: r, isRateLimited: i, rateLimitMessage: a }) {
|
|
27495
27499
|
return /* @__PURE__ */ _(h, { children: [(e || t) && /* @__PURE__ */ _("div", {
|
|
27496
27500
|
style: {
|
|
27497
27501
|
margin: "0 20px 10px",
|
|
@@ -27550,13 +27554,13 @@ function KD({ webRTCError: e, micError: t, setMicError: n, dismissCallError: r,
|
|
|
27550
27554
|
}
|
|
27551
27555
|
//#endregion
|
|
27552
27556
|
//#region src/components/AnimatedOrb.jsx
|
|
27553
|
-
var
|
|
27557
|
+
var KD = [
|
|
27554
27558
|
"#135bd8",
|
|
27555
27559
|
"#ef334b",
|
|
27556
27560
|
"#ffbd2e"
|
|
27557
27561
|
];
|
|
27558
|
-
function
|
|
27559
|
-
return !Array.isArray(e) || e.length === 0 ?
|
|
27562
|
+
function qD(e) {
|
|
27563
|
+
return !Array.isArray(e) || e.length === 0 ? KD : e.length === 1 ? [
|
|
27560
27564
|
e[0],
|
|
27561
27565
|
e[0],
|
|
27562
27566
|
e[0]
|
|
@@ -27570,14 +27574,14 @@ function JD(e) {
|
|
|
27570
27574
|
e[2]
|
|
27571
27575
|
];
|
|
27572
27576
|
}
|
|
27573
|
-
var
|
|
27577
|
+
var JD = {
|
|
27574
27578
|
idle: 3,
|
|
27575
27579
|
listening: .75,
|
|
27576
27580
|
speaking: 1.4,
|
|
27577
27581
|
muted: .75,
|
|
27578
27582
|
error: .08
|
|
27579
27583
|
};
|
|
27580
|
-
function
|
|
27584
|
+
function YD(e) {
|
|
27581
27585
|
if (!e || typeof e != "string") return [
|
|
27582
27586
|
0,
|
|
27583
27587
|
0,
|
|
@@ -27590,14 +27594,14 @@ function XD(e) {
|
|
|
27590
27594
|
parseInt(n.slice(4, 6), 16) / 255
|
|
27591
27595
|
];
|
|
27592
27596
|
}
|
|
27593
|
-
function
|
|
27597
|
+
function XD(e, t) {
|
|
27594
27598
|
if (!e || typeof e != "string") return `rgba(0,0,0,${t})`;
|
|
27595
27599
|
if (e.startsWith("rgb")) return e.replace(/[\d.]+\)$/, `${t})`);
|
|
27596
27600
|
let n = e.replace("#", ""), r = n.length === 3 ? n.split("").map((e) => e + e).join("") : n;
|
|
27597
27601
|
return `rgba(${parseInt(r.slice(0, 2), 16)},${parseInt(r.slice(2, 4), 16)},${parseInt(r.slice(4, 6), 16)},${t})`;
|
|
27598
27602
|
}
|
|
27599
|
-
var
|
|
27600
|
-
function
|
|
27603
|
+
var ZD = "\n attribute vec2 a_pos;\n varying vec2 v_uv;\n void main() {\n v_uv = a_pos * 0.5 + 0.5;\n gl_Position = vec4(a_pos, 0.0, 1.0);\n }\n", QD = "\n precision highp float;\n\n varying vec2 v_uv;\n uniform float u_time;\n uniform float u_speed;\n uniform vec3 u_c1;\n uniform vec3 u_c2;\n uniform vec3 u_c3;\n\n // ── Gradient noise ─────────────────────────────────────────────────────────\n vec2 hash2(vec2 p) {\n p = vec2(dot(p, vec2(127.1, 311.7)), dot(p, vec2(269.5, 183.3)));\n return -1.0 + 2.0 * fract(sin(p) * 43758.5453123);\n }\n float gnoise(vec2 p) {\n vec2 i = floor(p), f = fract(p);\n vec2 u = f*f*f*(f*(f*6.0-15.0)+10.0);\n return mix(\n mix(dot(hash2(i), f),\n dot(hash2(i+vec2(1,0)), f-vec2(1,0)), u.x),\n mix(dot(hash2(i+vec2(0,1)), f-vec2(0,1)),\n dot(hash2(i+vec2(1,1)), f-vec2(1,1)), u.x),\n u.y\n ) * 0.5 + 0.5;\n }\n\n // ── 3-octave FBM normalised to [0,1] — fewer octaves → larger, softer blobs\n float fbm(vec2 p) {\n float v = 0.0, a = 0.5;\n for (int i = 0; i < 3; i++) {\n v += a * gnoise(p);\n p = p * 2.1 + vec2(100.0);\n a *= 0.5;\n }\n return v / 0.875;\n }\n\n // ── Scalar hash for grain ──────────────────────────────────────────────────\n float hash1(vec2 p) {\n return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453);\n }\n\n void main() {\n vec2 uv = v_uv;\n float t = u_time * u_speed + 47.3;\n\n // ── ① Two-level domain warp — deep organic folding and swirling ───────────\n // First pass: large-scale sweep\n vec2 q = vec2(\n fbm(uv * 1.8 + vec2( t * 0.13, t * 0.11)) * 2.0 - 1.0,\n fbm(uv * 1.8 + vec2( t * 0.11 + 3.7, -t * 0.14 + 1.1)) * 2.0 - 1.0\n );\n // Second pass: warp the warp — creates curling, folding sub-currents\n vec2 r = vec2(\n fbm(uv * 1.8 + q * 0.55 + vec2( t * 0.09, t * 0.07)) * 2.0 - 1.0,\n fbm(uv * 1.8 + q * 0.55 + vec2(-t * 0.07 + 5.1, t * 0.10 + 2.3)) * 2.0 - 1.0\n );\n vec2 wp = uv + r * 0.38;\n\n // ── ② Three independent fields — each drifts inward from its source edge ──\n // Asymmetric velocities: dominant axis matches the inflow direction so the\n // noise texture visually streams inward (left→right, right→left, bottom→top).\n float f1 = fbm(wp * 0.85 + vec2(-t * 0.18, t * 0.04)); // LEFT → right\n float f2 = fbm(wp * 0.85 + vec2( t * 0.18 + 5.3, t * 0.04 + 1.7)); // RIGHT → left\n float f3 = fbm(wp * 0.85 + vec2( t * 0.04 - 3.2, -t * 0.18 + 6.4)); // BOTTOM → up\n\n // ── ③ Breathing blobs — sin pulse makes each field expand and contract ────\n float p1 = 0.88 + 0.12 * sin(t * 0.61);\n float p2 = 0.88 + 0.12 * sin(t * 0.47 + 2.09);\n float p3 = 0.88 + 0.12 * sin(t * 0.53 + 4.19);\n\n // Wide smoothstep (0.26 → 0.70) → soft, diffused blob edges that dissolve\n // gradually into each other, like dye spreading through water.\n float b1 = smoothstep(0.26, 0.70, f1 * p1);\n float b2 = smoothstep(0.26, 0.70, f2 * p2);\n float b3 = smoothstep(0.26, 0.70, f3 * p3);\n\n // ── ④ Directional origin gradients.\n // Each color owns its home edge (value = 1.0) and smoothly fades to zero\n // before reaching the opposite side. The transition windows are offset so\n // they overlap only in the center third — that overlap zone is where the\n // three colors meet and blend, while the edges stay uncontaminated.\n float d1 = 1.0 - smoothstep(0.20, 0.74, uv.x); // c1: LEFT → full at x<0.20, zero by x=0.74\n float d2 = 1.0 - smoothstep(0.20, 0.74, 1.0 - uv.x); // c2: RIGHT → full at x>0.80, zero by x=0.26\n float d3 = 1.0 - smoothstep(0.18, 0.68, uv.y); // c3: BOTTOM → full at y<0.18, zero by y=0.68\n\n float w1 = b1 * d1;\n float w2 = b2 * d2;\n float w3 = b3 * d3;\n\n // ── ⑤ Dye-mixing colour blend ──────────────────────────────────────────────\n // dyeColor is the weighted average of all active colours — exactly how dyes\n // mix in water: overlapping streams blend smoothly, no hard edges.\n float total = w1 + w2 + w3;\n vec3 dyeColor = (u_c1 * w1 + u_c2 * w2 + u_c3 * w3) / max(total, 0.001);\n\n // Boost brightness of the dye to make colors pop and seem less dull\n dyeColor *= 1.65;\n\n // Exponential coverage: cores are rich and opaque; edges dissolve into the\n // near-white base. White only shows through where dye concentration is thin.\n float coverage = 1.0 - exp(-total * 5.0);\n vec3 col = mix(vec3(1.0, 1.0, 1.0), dyeColor, coverage);\n col = clamp(col, 0.0, 1.0);\n\n // ── ⑥ Sphere shading — subtle edge vignette only, no specular ─────────────\n vec2 uvc = v_uv * 2.0 - 1.0;\n\n // ── ⑦ Subtle grain — breaks gradient banding, adds filmic texture ──────────\n float grain = hash1(v_uv * 437.3 + fract(t)) * 2.0 - 1.0;\n col += grain * 0.018;\n\n gl_FragColor = vec4(clamp(col, 0.0, 1.0), 1.0);\n }\n";
|
|
27604
|
+
function $D(e, t, n) {
|
|
27601
27605
|
let r = (t, n) => {
|
|
27602
27606
|
let r = e.createShader(t);
|
|
27603
27607
|
return e.shaderSource(r, n), e.compileShader(r), e.getShaderParameter(r, e.COMPILE_STATUS) ? r : (console.error("[AnimatedOrb shader]", e.getShaderInfoLog(r)), null);
|
|
@@ -27606,10 +27610,10 @@ function eO(e, t, n) {
|
|
|
27606
27610
|
let o = e.createProgram();
|
|
27607
27611
|
return e.attachShader(o, i), e.attachShader(o, a), e.linkProgram(o), e.getProgramParameter(o, e.LINK_STATUS) ? o : (console.error("[AnimatedOrb link]", e.getProgramInfoLog(o)), null);
|
|
27608
27612
|
}
|
|
27609
|
-
function
|
|
27610
|
-
let [s, l, u] =
|
|
27613
|
+
function eO({ size: e = 94, voiceState: t = "idle", isMuted: n = !1, colors: r, onClick: i, style: a, className: o }) {
|
|
27614
|
+
let [s, l, u] = qD(r), d = t === "speaking", f = e <= 50, m = p(null), h = p(JD[t] ?? .35);
|
|
27611
27615
|
c(() => {
|
|
27612
|
-
h.current =
|
|
27616
|
+
h.current = JD[t] ?? .35;
|
|
27613
27617
|
}, [t]), c(() => {
|
|
27614
27618
|
let t = m.current;
|
|
27615
27619
|
if (!t) return;
|
|
@@ -27626,7 +27630,7 @@ function tO({ size: e = 94, voiceState: t = "idle", isMuted: n = !1, colors: r,
|
|
|
27626
27630
|
console.warn("[AnimatedOrb] WebGL unavailable.");
|
|
27627
27631
|
return;
|
|
27628
27632
|
}
|
|
27629
|
-
let i =
|
|
27633
|
+
let i = $D(r, ZD, QD);
|
|
27630
27634
|
if (!i) {
|
|
27631
27635
|
console.error("[AnimatedOrb] WebGL program failed to compile/link");
|
|
27632
27636
|
return;
|
|
@@ -27656,7 +27660,7 @@ function tO({ size: e = 94, voiceState: t = "idle", isMuted: n = !1, colors: r,
|
|
|
27656
27660
|
c2: r.getUniformLocation(i, "u_c2"),
|
|
27657
27661
|
c3: r.getUniformLocation(i, "u_c3")
|
|
27658
27662
|
};
|
|
27659
|
-
r.uniform3fv(c.c1,
|
|
27663
|
+
r.uniform3fv(c.c1, YD(s)), r.uniform3fv(c.c2, YD(l)), r.uniform3fv(c.c3, YD(u)), r.viewport(0, 0, t.width, t.height);
|
|
27660
27664
|
let d = performance.now(), f, p = (e) => {
|
|
27661
27665
|
r.uniform1f(c.time, (e - d) / 1e3), r.uniform1f(c.speed, h.current), r.drawArrays(r.TRIANGLES, 0, 6), f = requestAnimationFrame(p);
|
|
27662
27666
|
};
|
|
@@ -27687,7 +27691,7 @@ function tO({ size: e = 94, voiceState: t = "idle", isMuted: n = !1, colors: r,
|
|
|
27687
27691
|
position: "absolute",
|
|
27688
27692
|
inset: -10,
|
|
27689
27693
|
borderRadius: "50%",
|
|
27690
|
-
background: `radial-gradient(circle, ${
|
|
27694
|
+
background: `radial-gradient(circle, ${XD(s, .18)} 0%, transparent 70%)`,
|
|
27691
27695
|
pointerEvents: "none"
|
|
27692
27696
|
},
|
|
27693
27697
|
animate: { opacity: [.3, .75] },
|
|
@@ -27765,17 +27769,17 @@ function tO({ size: e = 94, voiceState: t = "idle", isMuted: n = !1, colors: r,
|
|
|
27765
27769
|
}
|
|
27766
27770
|
//#endregion
|
|
27767
27771
|
//#region src/components/CallScreen.jsx
|
|
27768
|
-
var
|
|
27769
|
-
function
|
|
27772
|
+
var tO = "\n @keyframes fe-call-ring-pulse {\n 0% { transform: scale(1); opacity: 0.55; }\n 70% { transform: scale(1.85); opacity: 0; }\n 100% { transform: scale(1.85); opacity: 0; }\n }\n @keyframes fe-call-spin {\n to { transform: rotate(360deg); }\n }\n @keyframes fe-call-slide-up {\n from { opacity: 0; transform: translateY(24px); }\n to { opacity: 1; transform: translateY(0); }\n }\n @keyframes fe-call-fade-in {\n from { opacity: 0; }\n to { opacity: 1; }\n }\n @keyframes fe-call-bar-slide-in {\n from { opacity: 0; transform: translateY(10px) scale(0.97); }\n to { opacity: 1; transform: translateY(0) scale(1); }\n }\n @keyframes fe-call-dot-blink {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0.35; }\n }\n @keyframes fe-call-avatar-breathe {\n 0%, 100% { opacity: 0.5; transform: scale(1); }\n 50% { opacity: 0.9; transform: scale(1.12); }\n }\n";
|
|
27773
|
+
function nO(e) {
|
|
27770
27774
|
let t = (e || "").replace("#", ""), n = t.length === 3 ? t.split("").map((e) => e + e).join("") : t;
|
|
27771
27775
|
return `${parseInt(n.slice(0, 2), 16)},${parseInt(n.slice(2, 4), 16)},${parseInt(n.slice(4, 6), 16)}`;
|
|
27772
27776
|
}
|
|
27773
|
-
function
|
|
27777
|
+
function rO(e) {
|
|
27774
27778
|
if (!e || typeof e != "string") return "#1a1a1a";
|
|
27775
27779
|
let t = e.replace("#", ""), n = t.length === 3 ? t.split("").map((e) => e + e).join("") : t, r = parseInt(n.slice(0, 2), 16) / 255, i = parseInt(n.slice(2, 4), 16) / 255, a = parseInt(n.slice(4, 6), 16) / 255, o = (e) => e <= .04045 ? e / 12.92 : ((e + .055) / 1.055) ** 2.4;
|
|
27776
27780
|
return .2126 * o(r) + .7152 * o(i) + .0722 * o(a) > .179 ? "#1a1a1a" : "#ffffff";
|
|
27777
27781
|
}
|
|
27778
|
-
function
|
|
27782
|
+
function iO(e, t) {
|
|
27779
27783
|
let n = Array.isArray(e) && e.length > 0 ? e : [t || "#3B82F6"], [r, i, a] = n;
|
|
27780
27784
|
return n.length === 1 ? [
|
|
27781
27785
|
`radial-gradient(ellipse 110% 65% at 50% -5%, ${r}28 0%, transparent 68%)`,
|
|
@@ -27792,8 +27796,8 @@ function aO(e, t) {
|
|
|
27792
27796
|
"#f7f8fa"
|
|
27793
27797
|
].join(", ");
|
|
27794
27798
|
}
|
|
27795
|
-
function
|
|
27796
|
-
let i = (t || "A")[0].toUpperCase(), a =
|
|
27799
|
+
function aO({ headshot: e, name: t, size: n = 80, primaryColor: r = "#3B82F6" }) {
|
|
27800
|
+
let i = (t || "A")[0].toUpperCase(), a = rO(r), o = n > 48 ? {
|
|
27797
27801
|
boxShadow: `0 0 0 3px ${r}44`,
|
|
27798
27802
|
border: "3px solid rgba(255,255,255,0.15)"
|
|
27799
27803
|
} : { border: `1.5px solid ${r}55` };
|
|
@@ -27830,7 +27834,7 @@ function oO({ headshot: e, name: t, size: n = 80, primaryColor: r = "#3B82F6" })
|
|
|
27830
27834
|
children: i
|
|
27831
27835
|
});
|
|
27832
27836
|
}
|
|
27833
|
-
function
|
|
27837
|
+
function oO(e) {
|
|
27834
27838
|
let t = p(null), n = o(() => {
|
|
27835
27839
|
if (!t.current) return;
|
|
27836
27840
|
let { audioContext: e, oscillator: n, interval: r, toneTimeout: i } = t.current;
|
|
@@ -27877,8 +27881,8 @@ function sO(e) {
|
|
|
27877
27881
|
n
|
|
27878
27882
|
]), c(() => () => n(), [n]), n;
|
|
27879
27883
|
}
|
|
27880
|
-
function
|
|
27881
|
-
let y = a || s || "Agent", b = e ? "incoming" : n === "connecting" ? "connecting" : "ongoing", x =
|
|
27884
|
+
function sO({ incomingCall: e, activeCallId: t, callConnectionState: n, callDurationSeconds: r, isCallMuted: i, agentName: a, agentHeadshot: o, fallbackAgentName: s, acceptCall: c, rejectCall: l, endWebRTCCall: u, toggleCallMute: d, formatCallDuration: f, onMinimize: p, primaryColor: m = "#3B82F6", orbColors: h, chatHistory: v = [] }) {
|
|
27885
|
+
let y = a || s || "Agent", b = e ? "incoming" : n === "connecting" ? "connecting" : "ongoing", x = oO(!!e), S = async () => {
|
|
27882
27886
|
x(), await c();
|
|
27883
27887
|
}, C = async () => {
|
|
27884
27888
|
x(), await l();
|
|
@@ -27890,14 +27894,14 @@ function cO({ incomingCall: e, activeCallId: t, callConnectionState: n, callDura
|
|
|
27890
27894
|
flexDirection: "column",
|
|
27891
27895
|
borderRadius: "inherit",
|
|
27892
27896
|
overflow: "hidden",
|
|
27893
|
-
background:
|
|
27897
|
+
background: iO(h, m),
|
|
27894
27898
|
animation: T ? "fe-call-slide-up 0.36s cubic-bezier(0.16,1,0.3,1)" : "fe-call-fade-in 0.32s ease"
|
|
27895
27899
|
};
|
|
27896
27900
|
if (b === "incoming") {
|
|
27897
27901
|
let e = Array.isArray(h) && h.length > 0 ? h : [m];
|
|
27898
27902
|
return /* @__PURE__ */ _("div", {
|
|
27899
27903
|
style: ee,
|
|
27900
|
-
children: [/* @__PURE__ */ g("style", { children:
|
|
27904
|
+
children: [/* @__PURE__ */ g("style", { children: tO }), /* @__PURE__ */ _("div", {
|
|
27901
27905
|
style: {
|
|
27902
27906
|
flex: 1,
|
|
27903
27907
|
display: "flex",
|
|
@@ -27928,7 +27932,7 @@ function cO({ incomingCall: e, activeCallId: t, callConnectionState: n, callDura
|
|
|
27928
27932
|
width: "96px",
|
|
27929
27933
|
height: "96px",
|
|
27930
27934
|
borderRadius: "50%",
|
|
27931
|
-
background: `radial-gradient(circle, rgba(${
|
|
27935
|
+
background: `radial-gradient(circle, rgba(${nO(e[0])},0.2) 0%, transparent 70%)`,
|
|
27932
27936
|
filter: "blur(10px)",
|
|
27933
27937
|
zIndex: 0
|
|
27934
27938
|
} }),
|
|
@@ -27945,7 +27949,7 @@ function cO({ incomingCall: e, activeCallId: t, callConnectionState: n, callDura
|
|
|
27945
27949
|
animation: `fe-call-ring-pulse 2.6s cubic-bezier(0.215,0.61,0.355,1) ${t}s infinite`,
|
|
27946
27950
|
zIndex: 1
|
|
27947
27951
|
} }, n)),
|
|
27948
|
-
/* @__PURE__ */ g(
|
|
27952
|
+
/* @__PURE__ */ g(aO, {
|
|
27949
27953
|
headshot: o,
|
|
27950
27954
|
name: y,
|
|
27951
27955
|
size: 82,
|
|
@@ -28083,7 +28087,7 @@ function cO({ incomingCall: e, activeCallId: t, callConnectionState: n, callDura
|
|
|
28083
28087
|
}
|
|
28084
28088
|
return b === "connecting" ? /* @__PURE__ */ _("div", {
|
|
28085
28089
|
style: ee,
|
|
28086
|
-
children: [/* @__PURE__ */ g("style", { children:
|
|
28090
|
+
children: [/* @__PURE__ */ g("style", { children: tO }), /* @__PURE__ */ _("div", {
|
|
28087
28091
|
style: {
|
|
28088
28092
|
flex: 1,
|
|
28089
28093
|
display: "flex",
|
|
@@ -28093,7 +28097,7 @@ function cO({ incomingCall: e, activeCallId: t, callConnectionState: n, callDura
|
|
|
28093
28097
|
gap: "24px"
|
|
28094
28098
|
},
|
|
28095
28099
|
children: [
|
|
28096
|
-
/* @__PURE__ */ g(
|
|
28100
|
+
/* @__PURE__ */ g(aO, {
|
|
28097
28101
|
headshot: o,
|
|
28098
28102
|
name: y,
|
|
28099
28103
|
size: 64,
|
|
@@ -28120,7 +28124,7 @@ function cO({ incomingCall: e, activeCallId: t, callConnectionState: n, callDura
|
|
|
28120
28124
|
}) : /* @__PURE__ */ _("div", {
|
|
28121
28125
|
style: ee,
|
|
28122
28126
|
children: [
|
|
28123
|
-
/* @__PURE__ */ g("style", { children:
|
|
28127
|
+
/* @__PURE__ */ g("style", { children: tO }),
|
|
28124
28128
|
/* @__PURE__ */ _("div", {
|
|
28125
28129
|
style: {
|
|
28126
28130
|
display: "flex",
|
|
@@ -28166,7 +28170,7 @@ function cO({ incomingCall: e, activeCallId: t, callConnectionState: n, callDura
|
|
|
28166
28170
|
children: /* @__PURE__ */ g("polyline", { points: "15 18 9 12 15 6" })
|
|
28167
28171
|
})
|
|
28168
28172
|
}),
|
|
28169
|
-
/* @__PURE__ */ g(
|
|
28173
|
+
/* @__PURE__ */ g(eO, {
|
|
28170
28174
|
colors: h,
|
|
28171
28175
|
size: 36,
|
|
28172
28176
|
voiceState: w
|
|
@@ -28217,7 +28221,7 @@ function cO({ incomingCall: e, activeCallId: t, callConnectionState: n, callDura
|
|
|
28217
28221
|
gap: "16px",
|
|
28218
28222
|
padding: "0 24px 16px"
|
|
28219
28223
|
},
|
|
28220
|
-
children: [/* @__PURE__ */ g(
|
|
28224
|
+
children: [/* @__PURE__ */ g(aO, {
|
|
28221
28225
|
headshot: o,
|
|
28222
28226
|
name: y,
|
|
28223
28227
|
size: 116,
|
|
@@ -28306,9 +28310,9 @@ function cO({ incomingCall: e, activeCallId: t, callConnectionState: n, callDura
|
|
|
28306
28310
|
]
|
|
28307
28311
|
});
|
|
28308
28312
|
}
|
|
28309
|
-
function
|
|
28313
|
+
function cO({ agentName: e, agentHeadshot: t, fallbackAgentName: n, callDurationSeconds: r, isCallMuted: i, formatCallDuration: a, toggleCallMute: o, endWebRTCCall: s, onExpand: c, primaryColor: l = "#3B82F6" }) {
|
|
28310
28314
|
let u = e || n || "Agent";
|
|
28311
|
-
return /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g("style", { children:
|
|
28315
|
+
return /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g("style", { children: tO }), /* @__PURE__ */ _("div", {
|
|
28312
28316
|
role: "button",
|
|
28313
28317
|
tabIndex: 0,
|
|
28314
28318
|
onClick: c,
|
|
@@ -28365,7 +28369,7 @@ function lO({ agentName: e, agentHeadshot: t, fallbackAgentName: n, callDuration
|
|
|
28365
28369
|
borderRadius: "50%",
|
|
28366
28370
|
border: `1.5px solid ${l}55`
|
|
28367
28371
|
} }),
|
|
28368
|
-
/* @__PURE__ */ g(
|
|
28372
|
+
/* @__PURE__ */ g(aO, {
|
|
28369
28373
|
headshot: t,
|
|
28370
28374
|
name: u,
|
|
28371
28375
|
size: 38,
|
|
@@ -28485,7 +28489,7 @@ function lO({ agentName: e, agentHeadshot: t, fallbackAgentName: n, callDuration
|
|
|
28485
28489
|
}
|
|
28486
28490
|
//#endregion
|
|
28487
28491
|
//#region src/utils/voicePriorContext.js
|
|
28488
|
-
function
|
|
28492
|
+
function lO(e, t = {}) {
|
|
28489
28493
|
let n = t.maxChars ?? 4500;
|
|
28490
28494
|
if (!Array.isArray(e) || e.length === 0) return "";
|
|
28491
28495
|
let r = [];
|
|
@@ -28502,7 +28506,7 @@ function uO(e, t = {}) {
|
|
|
28502
28506
|
}
|
|
28503
28507
|
//#endregion
|
|
28504
28508
|
//#region src/utils/actionQueue.js
|
|
28505
|
-
var
|
|
28509
|
+
var uO = {
|
|
28506
28510
|
wordsSoFar: 0,
|
|
28507
28511
|
speechStartTime: 0,
|
|
28508
28512
|
isSpeaking: !1,
|
|
@@ -28511,35 +28515,35 @@ var dO = {
|
|
|
28511
28515
|
lastHighlightId: null,
|
|
28512
28516
|
isVoiceMode: !1
|
|
28513
28517
|
};
|
|
28514
|
-
function
|
|
28515
|
-
|
|
28518
|
+
function dO() {
|
|
28519
|
+
uO.timers.forEach(clearTimeout), uO.wordsSoFar = 0, uO.speechStartTime = 0, uO.isSpeaking = !1, uO.items = [], uO.timers = [], uO.lastHighlightId = null;
|
|
28516
28520
|
}
|
|
28517
28521
|
//#endregion
|
|
28518
28522
|
//#region src/utils/highlightEngine.js
|
|
28519
|
-
var
|
|
28520
|
-
function
|
|
28523
|
+
var fO = 80;
|
|
28524
|
+
function pO(e) {
|
|
28521
28525
|
requestAnimationFrame(() => {
|
|
28522
|
-
let t = e.getBoundingClientRect(), n = t.top + t.height / 2, r =
|
|
28526
|
+
let t = e.getBoundingClientRect(), n = t.top + t.height / 2, r = fO, i = r + (window.innerHeight - r) / 2, a = window.pageYOffset + n - i;
|
|
28523
28527
|
window.scrollTo({
|
|
28524
28528
|
top: Math.max(0, a),
|
|
28525
28529
|
behavior: "smooth"
|
|
28526
28530
|
});
|
|
28527
28531
|
});
|
|
28528
28532
|
}
|
|
28529
|
-
function
|
|
28533
|
+
function mO(e) {
|
|
28530
28534
|
if (!e || e.hasAttribute("data-fe-highlighted")) return;
|
|
28531
|
-
|
|
28535
|
+
hO(), e.classList?.remove("fe-highlight-section", "fe-highlight-speaking", "fe-highlight-exiting"), pO(e);
|
|
28532
28536
|
let t = e.style.cssText;
|
|
28533
28537
|
e.setAttribute("data-fe-highlighted", "true"), e.setAttribute("data-fe-orig-style", t), e.style.outline = "3px solid #2563eb", e.style.outlineOffset = "8px", e.style.background = "rgba(37, 99, 235, 0.08)", e.style.borderRadius = "8px", e.style.padding = "12px 16px", e.style.transition = "all 0.4s ease";
|
|
28534
28538
|
}
|
|
28535
|
-
function
|
|
28539
|
+
function hO() {
|
|
28536
28540
|
let e = document.querySelector("[data-fe-highlighted]");
|
|
28537
28541
|
e && (e.style.cssText = e.getAttribute("data-fe-orig-style") || "", e.removeAttribute("data-fe-highlighted"), e.removeAttribute("data-fe-orig-style"));
|
|
28538
28542
|
}
|
|
28539
28543
|
//#endregion
|
|
28540
28544
|
//#region src/utils/voiceActionVisuals.js
|
|
28541
28545
|
var Q = "fe-vv";
|
|
28542
|
-
function
|
|
28546
|
+
function gO() {
|
|
28543
28547
|
if (typeof document > "u" || document.getElementById(`${Q}-styles`)) return;
|
|
28544
28548
|
let e = `
|
|
28545
28549
|
/* ── Action toast ───────────────────────────────────────────────────────────── */
|
|
@@ -28684,14 +28688,14 @@ function _O() {
|
|
|
28684
28688
|
`, t = document.createElement("style");
|
|
28685
28689
|
t.id = `${Q}-styles`, t.textContent = e, (document.head || document.documentElement).appendChild(t);
|
|
28686
28690
|
}
|
|
28687
|
-
var
|
|
28688
|
-
function
|
|
28689
|
-
return (!
|
|
28691
|
+
var _O = null, vO = null;
|
|
28692
|
+
function yO() {
|
|
28693
|
+
return (!_O || !_O.isConnected) && (_O = document.createElement("div"), _O.id = `${Q}-toast`, document.body.appendChild(_O)), _O;
|
|
28690
28694
|
}
|
|
28691
|
-
function
|
|
28695
|
+
function bO(e, { spinner: t = !0, icon: n = null, duration: r = 0 } = {}) {
|
|
28692
28696
|
if (typeof document > "u") return;
|
|
28693
|
-
|
|
28694
|
-
let i =
|
|
28697
|
+
gO(), vO &&= (clearTimeout(vO), null);
|
|
28698
|
+
let i = yO();
|
|
28695
28699
|
if (i.innerHTML = "", n) {
|
|
28696
28700
|
let e = document.createElement("span");
|
|
28697
28701
|
e.className = `${Q}-icon`, e.textContent = n, i.appendChild(e);
|
|
@@ -28700,82 +28704,82 @@ function xO(e, { spinner: t = !0, icon: n = null, duration: r = 0 } = {}) {
|
|
|
28700
28704
|
e.className = `${Q}-spin`, i.appendChild(e);
|
|
28701
28705
|
}
|
|
28702
28706
|
let a = document.createElement("span");
|
|
28703
|
-
a.textContent = e, i.appendChild(a), i.classList.remove(`${Q}-show`), i.offsetHeight, i.classList.add(`${Q}-show`), r > 0 && (
|
|
28707
|
+
a.textContent = e, i.appendChild(a), i.classList.remove(`${Q}-show`), i.offsetHeight, i.classList.add(`${Q}-show`), r > 0 && (vO = setTimeout(() => xO(), r));
|
|
28704
28708
|
}
|
|
28705
|
-
function
|
|
28706
|
-
|
|
28707
|
-
|
|
28708
|
-
}, e) :
|
|
28709
|
+
function xO(e = 0) {
|
|
28710
|
+
_O && (e > 0 ? vO = setTimeout(() => {
|
|
28711
|
+
_O && _O.classList.remove(`${Q}-show`);
|
|
28712
|
+
}, e) : _O && _O.classList.remove(`${Q}-show`));
|
|
28709
28713
|
}
|
|
28710
|
-
var
|
|
28711
|
-
function
|
|
28712
|
-
return (!
|
|
28714
|
+
var SO = null, CO = [];
|
|
28715
|
+
function wO() {
|
|
28716
|
+
return (!SO || !SO.isConnected) && (SO = document.createElement("div"), SO.id = `${Q}-bar`, document.body.appendChild(SO)), SO;
|
|
28713
28717
|
}
|
|
28714
|
-
function
|
|
28718
|
+
function TO() {
|
|
28715
28719
|
if (typeof document > "u") return;
|
|
28716
|
-
|
|
28717
|
-
let e =
|
|
28720
|
+
gO(), CO.forEach(clearTimeout), CO = [];
|
|
28721
|
+
let e = wO();
|
|
28718
28722
|
e.style.transition = "none", e.style.width = "0%", e.classList.add(`${Q}-bar-active`), e.offsetHeight, e.style.transition = "width 0.35s ease, opacity 0.25s ease";
|
|
28719
28723
|
let t = [[80, "width 0.6s ease"], [92, "width 1.2s ease"]], n = 50;
|
|
28720
28724
|
for (let [e, r] of t) {
|
|
28721
28725
|
let t = n, i = e, a = r;
|
|
28722
|
-
|
|
28723
|
-
|
|
28726
|
+
CO.push(setTimeout(() => {
|
|
28727
|
+
SO && (SO.style.transition = a, SO.style.width = `${i}%`);
|
|
28724
28728
|
}, t)), n += 800;
|
|
28725
28729
|
}
|
|
28726
28730
|
}
|
|
28727
|
-
function
|
|
28728
|
-
|
|
28729
|
-
|
|
28730
|
-
|
|
28731
|
+
function EO() {
|
|
28732
|
+
SO && (CO.forEach(clearTimeout), CO = [], SO.style.transition = "width 0.2s ease", SO.style.width = "100%", CO.push(setTimeout(() => {
|
|
28733
|
+
SO && (SO.style.transition = "opacity 0.35s ease", SO.style.opacity = "0", CO.push(setTimeout(() => {
|
|
28734
|
+
SO && (SO.style.width = "0%", SO.classList.remove(`${Q}-bar-active`));
|
|
28731
28735
|
}, 380)));
|
|
28732
28736
|
}, 220)));
|
|
28733
28737
|
}
|
|
28734
|
-
function
|
|
28738
|
+
function DO() {
|
|
28735
28739
|
typeof document > "u" || document.querySelectorAll(`.${Q}-field-active, .${Q}-field-filled`).forEach((e) => e.classList.remove(`${Q}-field-active`, `${Q}-field-filled`));
|
|
28736
28740
|
}
|
|
28737
|
-
function
|
|
28738
|
-
!e || typeof document > "u" || (
|
|
28741
|
+
function OO(e) {
|
|
28742
|
+
!e || typeof document > "u" || (gO(), DO(), e.classList.add(`${Q}-field-active`));
|
|
28739
28743
|
}
|
|
28740
|
-
function
|
|
28744
|
+
function kO(e) {
|
|
28741
28745
|
e && (e.classList.remove(`${Q}-field-active`), e.classList.add(`${Q}-field-filled`), setTimeout(() => {
|
|
28742
28746
|
e.isConnected && e.classList.remove(`${Q}-field-filled`);
|
|
28743
28747
|
}, 1400));
|
|
28744
28748
|
}
|
|
28745
|
-
var
|
|
28749
|
+
var AO = `<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 22 22" fill="none">
|
|
28746
28750
|
<filter id="${Q}-csh">
|
|
28747
28751
|
<feDropShadow dx="1" dy="2" stdDeviation="1.5" flood-color="#00000060"/>
|
|
28748
28752
|
</filter>
|
|
28749
28753
|
<path d="M4 2L19 10.5L11 12.8L8 20L4 2Z"
|
|
28750
28754
|
fill="white" stroke="#1e1b4b" stroke-width="1.6" stroke-linejoin="round"
|
|
28751
28755
|
filter="url(#${Q}-csh)"/>
|
|
28752
|
-
</svg>`,
|
|
28753
|
-
function
|
|
28754
|
-
return (!
|
|
28756
|
+
</svg>`, jO = null, MO = !1;
|
|
28757
|
+
function NO() {
|
|
28758
|
+
return (!jO || !jO.isConnected) && (jO = document.createElement("div"), jO.id = `${Q}-cursor`, jO.innerHTML = AO, document.body.appendChild(jO), MO = !1), jO;
|
|
28755
28759
|
}
|
|
28756
|
-
async function
|
|
28760
|
+
async function PO(e) {
|
|
28757
28761
|
if (typeof document > "u" || !e) return;
|
|
28758
|
-
|
|
28762
|
+
gO();
|
|
28759
28763
|
let t;
|
|
28760
28764
|
try {
|
|
28761
28765
|
t = e.getBoundingClientRect();
|
|
28762
28766
|
} catch {
|
|
28763
28767
|
return;
|
|
28764
28768
|
}
|
|
28765
|
-
let n = t.left + Math.min(16, t.width * .2), r = t.top + Math.min(12, t.height * .25), i =
|
|
28766
|
-
|
|
28769
|
+
let n = t.left + Math.min(16, t.width * .2), r = t.top + Math.min(12, t.height * .25), i = NO();
|
|
28770
|
+
MO ||= (i.style.transition = "none", i.style.left = `${window.innerWidth / 2}px`, i.style.top = `${window.innerHeight * .4}px`, i.classList.add(`${Q}-cursor-visible`), i.offsetHeight, i.style.transition = "left 0.32s cubic-bezier(0.25,0.46,0.45,0.94), top 0.32s cubic-bezier(0.25,0.46,0.45,0.94), opacity 0.2s ease", !0), i.style.left = `${n}px`, i.style.top = `${r}px`, await RO(360);
|
|
28767
28771
|
}
|
|
28768
|
-
function
|
|
28769
|
-
|
|
28770
|
-
|
|
28772
|
+
function FO(e = !1) {
|
|
28773
|
+
jO && (e ? (jO.classList.remove(`${Q}-cursor-visible`), MO = !1) : (jO.classList.remove(`${Q}-cursor-visible`), setTimeout(() => {
|
|
28774
|
+
MO = !1;
|
|
28771
28775
|
}, 250)));
|
|
28772
28776
|
}
|
|
28773
|
-
async function
|
|
28774
|
-
|
|
28777
|
+
async function IO(e) {
|
|
28778
|
+
jO && (jO.classList.add(`${Q}-cursor-click`), await RO(280), jO.classList.remove(`${Q}-cursor-click`));
|
|
28775
28779
|
}
|
|
28776
|
-
function
|
|
28780
|
+
function LO(e) {
|
|
28777
28781
|
if (!e || typeof document > "u") return;
|
|
28778
|
-
|
|
28782
|
+
gO();
|
|
28779
28783
|
let t;
|
|
28780
28784
|
try {
|
|
28781
28785
|
t = e.getBoundingClientRect();
|
|
@@ -28801,7 +28805,7 @@ function RO(e) {
|
|
|
28801
28805
|
a.remove(), e.style.position = n, e.style.overflow = r;
|
|
28802
28806
|
}, 650);
|
|
28803
28807
|
}
|
|
28804
|
-
function
|
|
28808
|
+
function RO(e) {
|
|
28805
28809
|
return new Promise((t) => setTimeout(t, e));
|
|
28806
28810
|
}
|
|
28807
28811
|
//#endregion
|
|
@@ -28809,42 +28813,42 @@ function zO(e) {
|
|
|
28809
28813
|
function $(...e) {
|
|
28810
28814
|
Rn() && console.log("[FlowEngage:voice-tools]", ...e);
|
|
28811
28815
|
}
|
|
28812
|
-
function
|
|
28816
|
+
function zO(e) {
|
|
28813
28817
|
return new Promise((t) => setTimeout(t, e));
|
|
28814
28818
|
}
|
|
28815
|
-
var
|
|
28816
|
-
function
|
|
28819
|
+
var BO = "#flowengage-root, .flowengage-shell, .flowengage-widget-root";
|
|
28820
|
+
function VO(e) {
|
|
28817
28821
|
if (!e || typeof e.closest != "function") return !1;
|
|
28818
28822
|
try {
|
|
28819
|
-
return !!e.closest(
|
|
28823
|
+
return !!e.closest(BO);
|
|
28820
28824
|
} catch {
|
|
28821
28825
|
return !1;
|
|
28822
28826
|
}
|
|
28823
28827
|
}
|
|
28824
|
-
function
|
|
28828
|
+
function HO(e) {
|
|
28825
28829
|
try {
|
|
28826
28830
|
let t = e.ownerDocument?.defaultView;
|
|
28827
28831
|
if (t) return t.getComputedStyle(e);
|
|
28828
28832
|
} catch {}
|
|
28829
28833
|
return window.getComputedStyle(e);
|
|
28830
28834
|
}
|
|
28831
|
-
function
|
|
28835
|
+
function UO(e) {
|
|
28832
28836
|
let t = /* @__PURE__ */ new Set();
|
|
28833
28837
|
function n(r) {
|
|
28834
28838
|
if (!r || t.has(r)) return;
|
|
28835
28839
|
t.add(r), e(r);
|
|
28836
28840
|
let i = r.querySelectorAll("iframe");
|
|
28837
|
-
for (let e of i) if (!
|
|
28841
|
+
for (let e of i) if (!VO(e)) try {
|
|
28838
28842
|
let t = e.contentDocument;
|
|
28839
28843
|
t && n(t);
|
|
28840
28844
|
} catch {}
|
|
28841
28845
|
}
|
|
28842
28846
|
typeof document < "u" && n(document);
|
|
28843
28847
|
}
|
|
28844
|
-
function
|
|
28848
|
+
function WO(e) {
|
|
28845
28849
|
return e == null ? null : String(e).replace(/\u00a0/g, " ").replace(/\s*\*+\s*$/u, "").replace(/\s+/g, " ").trim();
|
|
28846
28850
|
}
|
|
28847
|
-
function
|
|
28851
|
+
function GO(e) {
|
|
28848
28852
|
let t = e.ownerDocument || document, n = e.getAttribute("aria-labelledby");
|
|
28849
28853
|
if (n) {
|
|
28850
28854
|
let e = n.trim().split(/\s+/).filter(Boolean), r = [];
|
|
@@ -28852,42 +28856,42 @@ function KO(e) {
|
|
|
28852
28856
|
let e = t.getElementById(n);
|
|
28853
28857
|
e?.textContent && r.push(e.textContent.trim());
|
|
28854
28858
|
} catch {}
|
|
28855
|
-
if (r.length) return
|
|
28859
|
+
if (r.length) return WO(r.join(" "));
|
|
28856
28860
|
}
|
|
28857
|
-
if (e.labels && e.labels.length) return
|
|
28861
|
+
if (e.labels && e.labels.length) return WO(e.labels[0].textContent);
|
|
28858
28862
|
let r = e.id;
|
|
28859
28863
|
if (r) try {
|
|
28860
28864
|
let e = t.querySelector(`label[for="${CSS.escape(r)}"]`);
|
|
28861
|
-
if (e) return
|
|
28865
|
+
if (e) return WO(e.textContent);
|
|
28862
28866
|
} catch {
|
|
28863
28867
|
let e = t.querySelector(`label[for="${r.replace(/"/g, "\\\"")}"]`);
|
|
28864
|
-
if (e) return
|
|
28868
|
+
if (e) return WO(e.textContent);
|
|
28865
28869
|
}
|
|
28866
28870
|
let i = e.previousElementSibling;
|
|
28867
28871
|
for (let e = 0; e < 6 && i; e += 1) {
|
|
28868
|
-
if (i.tagName === "LABEL") return
|
|
28872
|
+
if (i.tagName === "LABEL") return WO(i.textContent);
|
|
28869
28873
|
let e = (i.className || "").toString().toLowerCase();
|
|
28870
28874
|
if (/chakra-form__label|formlabel|field-label|form-label|mui-form-label/.test(e)) {
|
|
28871
|
-
let e =
|
|
28875
|
+
let e = WO(i.textContent);
|
|
28872
28876
|
if (e) return e;
|
|
28873
28877
|
}
|
|
28874
28878
|
i = i.previousElementSibling;
|
|
28875
28879
|
}
|
|
28876
28880
|
let a = e.parentElement;
|
|
28877
28881
|
for (let e = 0; e < 5 && a; e += 1) {
|
|
28878
|
-
if (a.tagName === "LABEL") return
|
|
28882
|
+
if (a.tagName === "LABEL") return WO(a.textContent);
|
|
28879
28883
|
let e = a.querySelector?.(":scope > label, :scope > [class*='FormLabel'], :scope > [class*='form__label']");
|
|
28880
|
-
if (e?.textContent) return
|
|
28884
|
+
if (e?.textContent) return WO(e.textContent);
|
|
28881
28885
|
a = a.parentElement;
|
|
28882
28886
|
}
|
|
28883
28887
|
let o = e.getAttribute("aria-label");
|
|
28884
|
-
return o ?
|
|
28888
|
+
return o ? WO(o) : null;
|
|
28885
28889
|
}
|
|
28886
|
-
function
|
|
28890
|
+
function KO() {
|
|
28887
28891
|
let e = [];
|
|
28888
|
-
return
|
|
28892
|
+
return UO((t) => {
|
|
28889
28893
|
e.push(...Array.from(t.querySelectorAll("input, select, textarea")).filter((e) => {
|
|
28890
|
-
if (
|
|
28894
|
+
if (VO(e)) return !1;
|
|
28891
28895
|
let t = (e.type || "").toLowerCase();
|
|
28892
28896
|
if ([
|
|
28893
28897
|
"hidden",
|
|
@@ -28896,32 +28900,32 @@ function qO() {
|
|
|
28896
28900
|
"image"
|
|
28897
28901
|
].includes(t) || e.disabled || e.readOnly) return !1;
|
|
28898
28902
|
try {
|
|
28899
|
-
let t =
|
|
28903
|
+
let t = HO(e);
|
|
28900
28904
|
if (t.display === "none" || t.visibility === "hidden") return !1;
|
|
28901
28905
|
} catch {}
|
|
28902
28906
|
return !0;
|
|
28903
28907
|
}));
|
|
28904
28908
|
}), e;
|
|
28905
28909
|
}
|
|
28906
|
-
function
|
|
28907
|
-
return
|
|
28910
|
+
function qO() {
|
|
28911
|
+
return KO().map((e, t) => ({
|
|
28908
28912
|
formIndex: 0,
|
|
28909
28913
|
fieldIndex: t,
|
|
28910
28914
|
tag: e.tagName,
|
|
28911
28915
|
type: e.type || "text",
|
|
28912
28916
|
name: e.name || null,
|
|
28913
28917
|
id: e.id || null,
|
|
28914
|
-
label:
|
|
28918
|
+
label: GO(e),
|
|
28915
28919
|
placeholder: e.placeholder || null
|
|
28916
28920
|
}));
|
|
28917
28921
|
}
|
|
28918
|
-
function
|
|
28922
|
+
function JO() {
|
|
28919
28923
|
let e = [];
|
|
28920
|
-
return
|
|
28924
|
+
return UO((t) => {
|
|
28921
28925
|
e.push(...Array.from(t.querySelectorAll("button, [role=\"button\"], input[type=\"submit\"], input[type=\"button\"]")).filter((e) => {
|
|
28922
|
-
if (
|
|
28926
|
+
if (VO(e) || e.disabled) return !1;
|
|
28923
28927
|
try {
|
|
28924
|
-
let t =
|
|
28928
|
+
let t = HO(e);
|
|
28925
28929
|
if (t.display === "none" || t.visibility === "hidden") return !1;
|
|
28926
28930
|
} catch {}
|
|
28927
28931
|
return !0;
|
|
@@ -28933,15 +28937,15 @@ function YO() {
|
|
|
28933
28937
|
type: e.type || e.tagName
|
|
28934
28938
|
}));
|
|
28935
28939
|
}
|
|
28936
|
-
function
|
|
28940
|
+
function YO(e) {
|
|
28937
28941
|
return String(e || "").toLowerCase().replace(/\u00a0/g, " ").replace(/\*/g, "").replace(/\s+/g, " ").trim();
|
|
28938
28942
|
}
|
|
28939
|
-
function
|
|
28940
|
-
let t =
|
|
28943
|
+
function XO(e) {
|
|
28944
|
+
let t = YO(e);
|
|
28941
28945
|
return t = t.replace(/\s+field\s*$/i, "").trim(), t;
|
|
28942
28946
|
}
|
|
28943
|
-
function
|
|
28944
|
-
let n =
|
|
28947
|
+
function ZO(e, t) {
|
|
28948
|
+
let n = XO(t);
|
|
28945
28949
|
if (!n) return 0;
|
|
28946
28950
|
let r = (e.name || "").toLowerCase(), i = (e.id || "").toLowerCase();
|
|
28947
28951
|
if (r === "url" && /url|website|domain|site|audit/.test(n) || (i === "url-input" || i.endsWith("-url-input")) && /url|website|domain|site|audit/.test(n)) return 100;
|
|
@@ -28949,12 +28953,12 @@ function QO(e, t) {
|
|
|
28949
28953
|
e.name,
|
|
28950
28954
|
e.id,
|
|
28951
28955
|
e.placeholder,
|
|
28952
|
-
|
|
28956
|
+
GO(e),
|
|
28953
28957
|
e.getAttribute("aria-label"),
|
|
28954
28958
|
e.getAttribute("title"),
|
|
28955
28959
|
e.getAttribute("data-testid"),
|
|
28956
28960
|
e.getAttribute("autocomplete")
|
|
28957
|
-
].filter(Boolean).map((e) =>
|
|
28961
|
+
].filter(Boolean).map((e) => YO(e)), o = 0;
|
|
28958
28962
|
for (let e of a) {
|
|
28959
28963
|
if (!e) continue;
|
|
28960
28964
|
if (e.includes(n) || n.includes(e)) {
|
|
@@ -28969,16 +28973,16 @@ function QO(e, t) {
|
|
|
28969
28973
|
}
|
|
28970
28974
|
return o;
|
|
28971
28975
|
}
|
|
28972
|
-
var
|
|
28973
|
-
function
|
|
28976
|
+
var QO = 28;
|
|
28977
|
+
function $O(e, t) {
|
|
28974
28978
|
let n = null, r = 0;
|
|
28975
28979
|
for (let i of e) {
|
|
28976
|
-
let e =
|
|
28980
|
+
let e = ZO(i, t);
|
|
28977
28981
|
e > r && (r = e, n = i);
|
|
28978
28982
|
}
|
|
28979
|
-
return !n || r <
|
|
28983
|
+
return !n || r < QO ? null : n;
|
|
28980
28984
|
}
|
|
28981
|
-
function
|
|
28985
|
+
function ek(e, t, n) {
|
|
28982
28986
|
let r = String(t || "").toLowerCase().trim(), i = String(n || "").trim();
|
|
28983
28987
|
if (!(/^https?:\/\//i.test(i) || /\.\w{2,}(\/|\s|$)/.test(i) || r.includes("url") || r.includes("website") || r.includes("domain") || r.includes("site"))) return null;
|
|
28984
28988
|
let a = null, o = 0;
|
|
@@ -28998,7 +29002,7 @@ function tk(e, t, n) {
|
|
|
28998
29002
|
t.name,
|
|
28999
29003
|
t.id,
|
|
29000
29004
|
t.placeholder,
|
|
29001
|
-
|
|
29005
|
+
GO(t),
|
|
29002
29006
|
t.getAttribute("aria-label"),
|
|
29003
29007
|
t.getAttribute("autocomplete")
|
|
29004
29008
|
].filter(Boolean).join(" ").toLowerCase();
|
|
@@ -29006,15 +29010,15 @@ function tk(e, t, n) {
|
|
|
29006
29010
|
}
|
|
29007
29011
|
return !a || o < 42 ? null : a;
|
|
29008
29012
|
}
|
|
29009
|
-
function
|
|
29013
|
+
function tk(e) {
|
|
29010
29014
|
let t = String(e ?? "").trim();
|
|
29011
29015
|
return t ? /^https?:\/\//i.test(t) ? !0 : /\.\w{2,}(\/|\s|$)/.test(t) : !1;
|
|
29012
29016
|
}
|
|
29013
|
-
function
|
|
29017
|
+
function nk(e) {
|
|
29014
29018
|
let t = String(e ?? "").toLowerCase().trim();
|
|
29015
29019
|
return t ? !!(t === "url" || t === "website" || t === "website url" || t === "website_url" || t === "enter website url" || t.includes("website") || t.includes("domain") || /(enter\s+website|site\s*url|page\s*url)/.test(t)) : !1;
|
|
29016
29020
|
}
|
|
29017
|
-
function
|
|
29021
|
+
function rk(e) {
|
|
29018
29022
|
if (!e || e.tagName !== "INPUT" && e.tagName !== "TEXTAREA") return !1;
|
|
29019
29023
|
let t = (e.type || "").toLowerCase();
|
|
29020
29024
|
return ![
|
|
@@ -29026,22 +29030,22 @@ function ik(e) {
|
|
|
29026
29030
|
"file"
|
|
29027
29031
|
].includes(t);
|
|
29028
29032
|
}
|
|
29029
|
-
function
|
|
29030
|
-
if (!
|
|
29033
|
+
function ik(e) {
|
|
29034
|
+
if (!rk(e)) return !1;
|
|
29031
29035
|
let t = (e.name || "").toLowerCase(), n = (e.id || "").toLowerCase(), r = [
|
|
29032
29036
|
e.name,
|
|
29033
29037
|
e.id,
|
|
29034
29038
|
e.placeholder,
|
|
29035
|
-
|
|
29039
|
+
GO(e),
|
|
29036
29040
|
e.getAttribute("aria-label")
|
|
29037
29041
|
].filter(Boolean).join(" ").toLowerCase();
|
|
29038
29042
|
return t === "url" || n === "url-input" || n.endsWith("-url-input") || /(website\s*url|enter\s+website|site\s*url)/.test(r) || /(website|domain)/.test(r) && /(url|site)/.test(r);
|
|
29039
29043
|
}
|
|
29040
|
-
function
|
|
29041
|
-
let r = String(t ?? ""), i = String(n ?? ""), a =
|
|
29044
|
+
function ak(e, t, n) {
|
|
29045
|
+
let r = String(t ?? ""), i = String(n ?? ""), a = ck(e, r) || $O(e, r) || ek(e, r, i);
|
|
29042
29046
|
if (!a) return [];
|
|
29043
29047
|
let o = new Set([a]);
|
|
29044
|
-
if (
|
|
29048
|
+
if (tk(i) && nk(r)) for (let t of e) t !== a && ik(t) && o.add(t);
|
|
29045
29049
|
let s = Array.from(o);
|
|
29046
29050
|
return s.sort((e, t) => {
|
|
29047
29051
|
if (e === t) return 0;
|
|
@@ -29049,7 +29053,7 @@ function ok(e, t, n) {
|
|
|
29049
29053
|
return n & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : n & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
29050
29054
|
}), s;
|
|
29051
29055
|
}
|
|
29052
|
-
function
|
|
29056
|
+
function ok(e, t) {
|
|
29053
29057
|
try {
|
|
29054
29058
|
if (!e?.getBoundingClientRect || !t?.getBoundingClientRect) return Infinity;
|
|
29055
29059
|
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = {
|
|
@@ -29064,17 +29068,17 @@ function sk(e, t) {
|
|
|
29064
29068
|
return Infinity;
|
|
29065
29069
|
}
|
|
29066
29070
|
}
|
|
29067
|
-
function
|
|
29071
|
+
function sk(e) {
|
|
29068
29072
|
if (!e || typeof e != "string") return null;
|
|
29069
29073
|
let t = null;
|
|
29070
|
-
return
|
|
29074
|
+
return UO((n) => {
|
|
29071
29075
|
try {
|
|
29072
29076
|
let r = n.getElementById(e);
|
|
29073
|
-
r && !
|
|
29077
|
+
r && !VO(r) && r.matches?.("input, select, textarea") && (t = r);
|
|
29074
29078
|
} catch {}
|
|
29075
29079
|
}), t;
|
|
29076
29080
|
}
|
|
29077
|
-
function
|
|
29081
|
+
function ck(e, t) {
|
|
29078
29082
|
let n = String(t ?? "").trim();
|
|
29079
29083
|
if (!n) return null;
|
|
29080
29084
|
let r = n.match(/^name:\s*([\w.-]+)$/i);
|
|
@@ -29084,12 +29088,12 @@ function lk(e, t) {
|
|
|
29084
29088
|
}
|
|
29085
29089
|
let i = n.match(/^id:\s*([\w.-]+)$/i);
|
|
29086
29090
|
if (i) {
|
|
29087
|
-
let e =
|
|
29091
|
+
let e = sk(i[1]);
|
|
29088
29092
|
if (e) return e;
|
|
29089
29093
|
}
|
|
29090
29094
|
let a = n.startsWith("#") ? n.slice(1) : n;
|
|
29091
29095
|
if (/^[\w-]+$/.test(a)) {
|
|
29092
|
-
let e =
|
|
29096
|
+
let e = sk(a);
|
|
29093
29097
|
if (e) return e;
|
|
29094
29098
|
}
|
|
29095
29099
|
let o = n.toLowerCase().replace(/\s+/g, " ");
|
|
@@ -29099,7 +29103,7 @@ function lk(e, t) {
|
|
|
29099
29103
|
}
|
|
29100
29104
|
return null;
|
|
29101
29105
|
}
|
|
29102
|
-
function
|
|
29106
|
+
function lk(e, t) {
|
|
29103
29107
|
let n = String(t || "").toLowerCase().trim();
|
|
29104
29108
|
if (!n) return 0;
|
|
29105
29109
|
let r = [
|
|
@@ -29115,13 +29119,13 @@ function uk(e, t) {
|
|
|
29115
29119
|
for (let e of i) r.includes(e) && (a += 1);
|
|
29116
29120
|
return a / i.length * 92;
|
|
29117
29121
|
}
|
|
29118
|
-
function
|
|
29122
|
+
function uk(e, t) {
|
|
29119
29123
|
let n = [];
|
|
29120
|
-
|
|
29124
|
+
UO((e) => {
|
|
29121
29125
|
n.push(...Array.from(e.querySelectorAll("button, [role=\"button\"], input[type=\"submit\"], input[type=\"button\"]")).filter((e) => {
|
|
29122
|
-
if (
|
|
29126
|
+
if (VO(e) || e.disabled) return !1;
|
|
29123
29127
|
try {
|
|
29124
|
-
let t =
|
|
29128
|
+
let t = HO(e);
|
|
29125
29129
|
if (t.display === "none" || t.visibility === "hidden") return !1;
|
|
29126
29130
|
} catch {}
|
|
29127
29131
|
return !0;
|
|
@@ -29129,7 +29133,7 @@ function dk(e, t) {
|
|
|
29129
29133
|
});
|
|
29130
29134
|
let r = 0, i = n.map((t) => ({
|
|
29131
29135
|
el: t,
|
|
29132
|
-
s:
|
|
29136
|
+
s: lk(t, e)
|
|
29133
29137
|
}));
|
|
29134
29138
|
for (let { s: e } of i) e > r && (r = e);
|
|
29135
29139
|
if (r < 36) return null;
|
|
@@ -29139,14 +29143,14 @@ function dk(e, t) {
|
|
|
29139
29143
|
if (o.length) {
|
|
29140
29144
|
let e = a[0], t = Infinity;
|
|
29141
29145
|
for (let n of a) for (let r of o) {
|
|
29142
|
-
let i =
|
|
29146
|
+
let i = ok(n, r);
|
|
29143
29147
|
i < t && (t = i, e = n);
|
|
29144
29148
|
}
|
|
29145
29149
|
return e;
|
|
29146
29150
|
}
|
|
29147
29151
|
return a[0];
|
|
29148
29152
|
}
|
|
29149
|
-
function
|
|
29153
|
+
function dk(e) {
|
|
29150
29154
|
if (e == null) return {};
|
|
29151
29155
|
if (typeof e == "string") {
|
|
29152
29156
|
let t = e.trim();
|
|
@@ -29159,8 +29163,8 @@ function fk(e) {
|
|
|
29159
29163
|
}
|
|
29160
29164
|
return e;
|
|
29161
29165
|
}
|
|
29162
|
-
function
|
|
29163
|
-
let t =
|
|
29166
|
+
function fk(e) {
|
|
29167
|
+
let t = dk(e);
|
|
29164
29168
|
if (Array.isArray(t) && t.length > 0) {
|
|
29165
29169
|
let e = t[0];
|
|
29166
29170
|
if (e?.field_key != null || e?.fieldKey != null) return t.map((e) => ({
|
|
@@ -29188,7 +29192,7 @@ function pk(e) {
|
|
|
29188
29192
|
value: e?.value ?? e?.Value
|
|
29189
29193
|
})) : [];
|
|
29190
29194
|
}
|
|
29191
|
-
function
|
|
29195
|
+
function pk(e) {
|
|
29192
29196
|
if (!e || typeof e != "string") return [];
|
|
29193
29197
|
let t = e.trim();
|
|
29194
29198
|
if (!t || /\b[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}\b/i.test(t)) return [];
|
|
@@ -29207,7 +29211,7 @@ function mk(e) {
|
|
|
29207
29211
|
}
|
|
29208
29212
|
return [];
|
|
29209
29213
|
}
|
|
29210
|
-
function
|
|
29214
|
+
function mk(e) {
|
|
29211
29215
|
if (!e || typeof e != "string") return [];
|
|
29212
29216
|
let t = e.trim();
|
|
29213
29217
|
if (!t) return [];
|
|
@@ -29243,17 +29247,17 @@ function hk(e) {
|
|
|
29243
29247
|
}
|
|
29244
29248
|
return n;
|
|
29245
29249
|
}
|
|
29246
|
-
function
|
|
29250
|
+
function hk(e) {
|
|
29247
29251
|
if (!e || typeof e != "object") return null;
|
|
29248
29252
|
let t = e.url ?? e.target_url ?? e.page_url ?? e.pageUrl ?? e.link ?? e.href ?? e.path;
|
|
29249
29253
|
return t == null ? null : String(t).trim() || null;
|
|
29250
29254
|
}
|
|
29251
|
-
function
|
|
29255
|
+
function gk(e) {
|
|
29252
29256
|
if (!e || typeof e != "object") return null;
|
|
29253
29257
|
let t = e.query ?? e.q ?? e.search ?? e.text ?? e.keywords;
|
|
29254
29258
|
return t == null ? null : String(t).trim() || null;
|
|
29255
29259
|
}
|
|
29256
|
-
function
|
|
29260
|
+
function _k(e, t, n) {
|
|
29257
29261
|
if (!n?.skipScroll) try {
|
|
29258
29262
|
e.scrollIntoView({
|
|
29259
29263
|
block: "center",
|
|
@@ -29308,7 +29312,7 @@ function vk(e, t, n) {
|
|
|
29308
29312
|
} catch {}
|
|
29309
29313
|
return !0;
|
|
29310
29314
|
}
|
|
29311
|
-
function
|
|
29315
|
+
function vk() {
|
|
29312
29316
|
let e = {};
|
|
29313
29317
|
document.querySelectorAll("h1, h2, h3, h4, h5, h6").forEach((t) => {
|
|
29314
29318
|
if (t.id) return;
|
|
@@ -29323,11 +29327,11 @@ function yk() {
|
|
|
29323
29327
|
e[r] = !0, t.id = r;
|
|
29324
29328
|
});
|
|
29325
29329
|
}
|
|
29326
|
-
function
|
|
29330
|
+
function yk(e) {
|
|
29327
29331
|
let t = e.siteId || null, n = (e.apiBaseUrl || "").replace(/\/$/, ""), r = typeof e.getLastUserVoiceText == "function" ? e.getLastUserVoiceText : null, i = [], a = {
|
|
29328
29332
|
flowengage_navigate: async (n) => {
|
|
29329
29333
|
$("flowengage_navigate ▶ raw parameters:", n);
|
|
29330
|
-
let i =
|
|
29334
|
+
let i = dk(n), a = hk(i), o = i.section_text ?? i.sectionText ?? i.section, s = Array.isArray(i.expected_landmarks) ? i.expected_landmarks : Array.isArray(i.expectedLandmarks) ? i.expectedLandmarks : [];
|
|
29331
29335
|
if ($("flowengage_navigate · coerced:", {
|
|
29332
29336
|
url: a,
|
|
29333
29337
|
sectionText: o,
|
|
@@ -29352,11 +29356,11 @@ function bk(e) {
|
|
|
29352
29356
|
return $("flowengage_navigate ✖ blocked", e), e;
|
|
29353
29357
|
}
|
|
29354
29358
|
try {
|
|
29355
|
-
|
|
29359
|
+
bO(`Navigating to ${a}...`, { spinner: !0 }), TO(), dO(), hO();
|
|
29356
29360
|
try {
|
|
29357
29361
|
let e = r ? r() : "";
|
|
29358
29362
|
if (e && t) {
|
|
29359
|
-
let n =
|
|
29363
|
+
let n = lO([{
|
|
29360
29364
|
sender: "user",
|
|
29361
29365
|
message: e
|
|
29362
29366
|
}]);
|
|
@@ -29379,25 +29383,25 @@ function bk(e) {
|
|
|
29379
29383
|
return "OK_NAVIGATE_RELOADING. Navigating to the page now; the voice session will resume automatically on the new page. When the session resumes, immediately introduce the new page and continue guiding the visitor — do not wait for the user to speak first.";
|
|
29380
29384
|
} catch (e) {
|
|
29381
29385
|
let t = `Navigation error: ${e?.message || String(e)}`;
|
|
29382
|
-
return $("flowengage_navigate ✖", t),
|
|
29386
|
+
return $("flowengage_navigate ✖", t), bO("Navigation failed", {
|
|
29383
29387
|
spinner: !1,
|
|
29384
29388
|
icon: "⚠️",
|
|
29385
29389
|
duration: 1800
|
|
29386
29390
|
}), t;
|
|
29387
29391
|
} finally {
|
|
29388
|
-
|
|
29392
|
+
EO(), xO(900);
|
|
29389
29393
|
}
|
|
29390
29394
|
},
|
|
29391
29395
|
flowengage_highlight: async (e) => {
|
|
29392
29396
|
$("flowengage_highlight ▶", e);
|
|
29393
|
-
let t =
|
|
29394
|
-
|
|
29397
|
+
let t = dk(e), n = t?.section_id || t?.sectionId, r = t?.section_text || t?.sectionText;
|
|
29398
|
+
vk();
|
|
29395
29399
|
let i = dr(n || null, r || null);
|
|
29396
|
-
return !i && r && (await new Promise((e) => setTimeout(e, 500)),
|
|
29400
|
+
return !i && r && (await new Promise((e) => setTimeout(e, 500)), vk(), i = dr(null, r)), i ? (mO(i), $("flowengage_highlight ✓", r || n), `OK_HIGHLIGHT: "${r || n}"`) : ($("flowengage_highlight ✖ no element for:", r || n), `Could not find "${r || n}" on the current page. Try a shorter phrase matching a visible heading.`);
|
|
29397
29401
|
},
|
|
29398
29402
|
flowengage_read_content: async (e) => {
|
|
29399
29403
|
$("flowengage_read_content ▶", e);
|
|
29400
|
-
let t =
|
|
29404
|
+
let t = dk(e), n = t?.section_text || t?.sectionText || "";
|
|
29401
29405
|
try {
|
|
29402
29406
|
let e = "";
|
|
29403
29407
|
if (n) {
|
|
@@ -29420,11 +29424,11 @@ function bk(e) {
|
|
|
29420
29424
|
},
|
|
29421
29425
|
flowengage_search: async (e) => {
|
|
29422
29426
|
$("flowengage_search ▶", e);
|
|
29423
|
-
let r =
|
|
29427
|
+
let r = gk(dk(e));
|
|
29424
29428
|
if ($("flowengage_search · query:", r, "siteId:", t, "apiBase:", n || "(empty)"), !r) return $("flowengage_search ✖ missing query"), "Missing query parameter.";
|
|
29425
29429
|
if (!t) return $("flowengage_search ✖ no siteId"), "Site is not configured for search.";
|
|
29426
29430
|
if (!n) return $("flowengage_search ✖ no api base"), "API base URL is missing; cannot search.";
|
|
29427
|
-
|
|
29431
|
+
bO(`Searching${r ? ` for "${r}"` : ""}…`, { spinner: !0 });
|
|
29428
29432
|
try {
|
|
29429
29433
|
let e = `${n}/api/site-tools/search`;
|
|
29430
29434
|
$("flowengage_search → POST", e);
|
|
@@ -29447,12 +29451,12 @@ function bk(e) {
|
|
|
29447
29451
|
let t = `Search error: ${e.message || "network"}`;
|
|
29448
29452
|
return $("flowengage_search ✖", t), t;
|
|
29449
29453
|
} finally {
|
|
29450
|
-
|
|
29454
|
+
xO(600);
|
|
29451
29455
|
}
|
|
29452
29456
|
},
|
|
29453
29457
|
flowengage_page_content: async (e) => {
|
|
29454
29458
|
$("flowengage_page_content ▶", e);
|
|
29455
|
-
let r =
|
|
29459
|
+
let r = dk(e), i = r?.url || r?.page_url || "";
|
|
29456
29460
|
if ($("flowengage_page_content · url:", i, "siteId:", t, "apiBase:", n || "(empty)"), !i) return $("flowengage_page_content ✖ missing url"), "Missing url parameter.";
|
|
29457
29461
|
if (!t) return $("flowengage_page_content ✖ no siteId"), "Site is not configured.";
|
|
29458
29462
|
if (!n) return $("flowengage_page_content ✖ no api base"), "API base URL is missing; cannot fetch page content.";
|
|
@@ -29484,7 +29488,7 @@ function bk(e) {
|
|
|
29484
29488
|
},
|
|
29485
29489
|
flowengage_end_session: async () => ($("flowengage_end_session ▶"), typeof e.requestEndSession == "function" && e.requestEndSession(), "Voice session is ending."),
|
|
29486
29490
|
flowengage_list_forms: async () => {
|
|
29487
|
-
let e =
|
|
29491
|
+
let e = qO(), t = JO();
|
|
29488
29492
|
return $("flowengage_list_forms ✓", `${e.length} field(s)`, `${t.length} button(s)`), JSON.stringify({
|
|
29489
29493
|
fields: e,
|
|
29490
29494
|
buttons: t,
|
|
@@ -29493,52 +29497,52 @@ function bk(e) {
|
|
|
29493
29497
|
},
|
|
29494
29498
|
flowengage_fill_form: async (e) => {
|
|
29495
29499
|
try {
|
|
29496
|
-
$("flowengage_fill_form ▶ raw:", e),
|
|
29497
|
-
let t =
|
|
29500
|
+
$("flowengage_fill_form ▶ raw:", e), DO();
|
|
29501
|
+
let t = fk(e);
|
|
29498
29502
|
if (!t.length && r) {
|
|
29499
|
-
let e = r(), n =
|
|
29500
|
-
n.length ? $("flowengage_fill_form · inferred URL from last user utterance (model omitted usable fields):", n) : (n =
|
|
29503
|
+
let e = r(), n = pk(e);
|
|
29504
|
+
n.length ? $("flowengage_fill_form · inferred URL from last user utterance (model omitted usable fields):", n) : (n = mk(e), n.length && $("flowengage_fill_form · inferred contact fields from last user utterance (empty tool params):", n)), n.length && (t = n);
|
|
29501
29505
|
}
|
|
29502
29506
|
if ($("flowengage_fill_form · normalized fields:", t), !t.length) return "No fields provided. Call flowengage_list_forms for field_key strings, then flowengage_fill_form with { \"fields\": [ { \"field_key\": \"<label or placeholder from list>\", \"value\": \"<user value>\" } ] }. Never use empty {}. Pass the value the user just said (email, message, name, URL) in fields.";
|
|
29503
29507
|
let n = [];
|
|
29504
29508
|
for (let e of t) {
|
|
29505
29509
|
let t = e?.field_key ?? e?.fieldKey, r = e?.value;
|
|
29506
29510
|
if (t == null || r == null) continue;
|
|
29507
|
-
|
|
29508
|
-
let a =
|
|
29511
|
+
bO(`Filling ${String(t)}...`, { spinner: !0 });
|
|
29512
|
+
let a = KO(), o = ak(a, String(t), r);
|
|
29509
29513
|
if (o.length) {
|
|
29510
|
-
for (let [e, t] of o.entries())
|
|
29514
|
+
for (let [e, t] of o.entries()) OO(t), await PO(t), _k(t, r, { skipScroll: e > 0 }), kO(t), await zO(120);
|
|
29511
29515
|
i = o, n.push(String(t));
|
|
29512
29516
|
continue;
|
|
29513
29517
|
}
|
|
29514
|
-
let s =
|
|
29515
|
-
s ||=
|
|
29518
|
+
let s = ck(a, String(t));
|
|
29519
|
+
s ||= $O(a, String(t)), s ||= ek(a, String(t), r), s && (OO(s), await PO(s), _k(s, r), kO(s), await zO(120), i = [s], n.push(String(t)));
|
|
29516
29520
|
}
|
|
29517
29521
|
if (!n.length) return $("flowengage_fill_form ✖ no matches"), "Could not match any fields. Call flowengage_list_forms and use field_key values that match placeholder, label, name, or id (e.g. Enter Website URL). Ensure the form is on the page, not the chat panel.";
|
|
29518
29522
|
let a = `OK_FILLED: ${n.join(", ")}`;
|
|
29519
|
-
return $("flowengage_fill_form ✓", a),
|
|
29523
|
+
return $("flowengage_fill_form ✓", a), bO("Form filled", {
|
|
29520
29524
|
spinner: !1,
|
|
29521
29525
|
icon: "✅",
|
|
29522
29526
|
duration: 1100
|
|
29523
29527
|
}), a;
|
|
29524
29528
|
} catch (e) {
|
|
29525
29529
|
let t = `flowengage_fill_form error: ${e?.message || String(e)}`;
|
|
29526
|
-
return $("flowengage_fill_form ✖", t),
|
|
29530
|
+
return $("flowengage_fill_form ✖", t), bO("Failed to fill form", {
|
|
29527
29531
|
spinner: !1,
|
|
29528
29532
|
icon: "⚠️",
|
|
29529
29533
|
duration: 1800
|
|
29530
29534
|
}), t;
|
|
29531
29535
|
} finally {
|
|
29532
|
-
|
|
29536
|
+
FO(), DO(), xO(700);
|
|
29533
29537
|
}
|
|
29534
29538
|
},
|
|
29535
29539
|
flowengage_click_button: async (e) => {
|
|
29536
|
-
let t =
|
|
29540
|
+
let t = dk(e), n = (t.button_text ?? t.buttonText ?? t.text ?? "").trim();
|
|
29537
29541
|
if ($("flowengage_click_button ▶", n), !n) return "Missing button_text: pass the visible label, e.g. Conduct Audit.";
|
|
29538
|
-
let r =
|
|
29542
|
+
let r = uk(n, i);
|
|
29539
29543
|
if (!r) return $("flowengage_click_button ✖ no match"), `Could not find a button matching "${n}". Call flowengage_list_forms to see button texts.`;
|
|
29540
29544
|
try {
|
|
29541
|
-
|
|
29545
|
+
bO(`Clicking ${n}...`, { spinner: !0 });
|
|
29542
29546
|
try {
|
|
29543
29547
|
r.scrollIntoView({
|
|
29544
29548
|
block: "center",
|
|
@@ -29547,22 +29551,22 @@ function bk(e) {
|
|
|
29547
29551
|
} catch {
|
|
29548
29552
|
r.scrollIntoView(!0);
|
|
29549
29553
|
}
|
|
29550
|
-
await
|
|
29554
|
+
await PO(r), r.focus?.(), await IO(r), LO(r), r.click();
|
|
29551
29555
|
let e = (r.textContent || r.value || r.getAttribute("aria-label") || "").trim().slice(0, 80) || "button", t = `OK_CLICK ${e}`;
|
|
29552
|
-
return $("flowengage_click_button ✓", t),
|
|
29556
|
+
return $("flowengage_click_button ✓", t), bO(`Clicked ${e}`, {
|
|
29553
29557
|
spinner: !1,
|
|
29554
29558
|
icon: "✅",
|
|
29555
29559
|
duration: 1200
|
|
29556
29560
|
}), t;
|
|
29557
29561
|
} catch (e) {
|
|
29558
29562
|
let t = `Click failed: ${e?.message || String(e)}`;
|
|
29559
|
-
return $("flowengage_click_button ✖", t),
|
|
29563
|
+
return $("flowengage_click_button ✖", t), bO("Click failed", {
|
|
29560
29564
|
spinner: !1,
|
|
29561
29565
|
icon: "⚠️",
|
|
29562
29566
|
duration: 1800
|
|
29563
29567
|
}), t;
|
|
29564
29568
|
} finally {
|
|
29565
|
-
|
|
29569
|
+
FO(), xO(700);
|
|
29566
29570
|
}
|
|
29567
29571
|
}
|
|
29568
29572
|
};
|
|
@@ -29579,7 +29583,7 @@ function bk(e) {
|
|
|
29579
29583
|
}
|
|
29580
29584
|
//#endregion
|
|
29581
29585
|
//#region src/utils/wrapVoiceToolsForLogging.js
|
|
29582
|
-
function
|
|
29586
|
+
function bk(e) {
|
|
29583
29587
|
return !e || typeof e != "object" ? e : Object.fromEntries(Object.entries(e).map(([e, t]) => [e, async (n) => {
|
|
29584
29588
|
let r = Rn();
|
|
29585
29589
|
r ? console.log("[FlowEngage:voice-tool] ▶", e, n) : console.info(`[FlowEngage] voice tool » ${e}`);
|
|
@@ -29596,7 +29600,7 @@ function xk(e) {
|
|
|
29596
29600
|
}
|
|
29597
29601
|
//#endregion
|
|
29598
29602
|
//#region src/components/FlowEngageWidget.jsx
|
|
29599
|
-
var
|
|
29603
|
+
var xk = {
|
|
29600
29604
|
blue: "#135bd8",
|
|
29601
29605
|
red: "#ef334b",
|
|
29602
29606
|
yellow: "#ffbd2e",
|
|
@@ -29604,7 +29608,7 @@ var Sk = {
|
|
|
29604
29608
|
highlight: "rgba(255,255,255,0.9)",
|
|
29605
29609
|
green: "#10b981"
|
|
29606
29610
|
};
|
|
29607
|
-
function
|
|
29611
|
+
function Sk(e) {
|
|
29608
29612
|
if (!Array.isArray(e) || e.length < 2) return "linear-gradient(145deg, #dce8f022 0%, #e8dff522 45%, #f5e0e022 100%), #f7f8fa";
|
|
29609
29613
|
let [t, n, r] = e;
|
|
29610
29614
|
return e.length >= 3 && r ? [
|
|
@@ -29618,12 +29622,12 @@ function Ck(e) {
|
|
|
29618
29622
|
"#f7f8fa"
|
|
29619
29623
|
].join(", ");
|
|
29620
29624
|
}
|
|
29621
|
-
function
|
|
29625
|
+
function Ck(e) {
|
|
29622
29626
|
if (!e || typeof e != "string") return "#1a1a1a";
|
|
29623
29627
|
let t = e.replace("#", ""), n = t.length === 3 ? t.split("").map((e) => e + e).join("") : t, r = parseInt(n.slice(0, 2), 16) / 255, i = parseInt(n.slice(2, 4), 16) / 255, a = parseInt(n.slice(4, 6), 16) / 255, o = (e) => e <= .04045 ? e / 12.92 : ((e + .055) / 1.055) ** 2.4;
|
|
29624
29628
|
return .2126 * o(r) + .7152 * o(i) + .0722 * o(a) > .179 ? "#1a1a1a" : "#ffffff";
|
|
29625
29629
|
}
|
|
29626
|
-
function
|
|
29630
|
+
function wk({ logo: t, style: n }) {
|
|
29627
29631
|
if (!t) return null;
|
|
29628
29632
|
if (typeof t == "string") return /* @__PURE__ */ g("img", {
|
|
29629
29633
|
src: t,
|
|
@@ -29648,7 +29652,7 @@ function Tk({ logo: t, style: n }) {
|
|
|
29648
29652
|
children: r
|
|
29649
29653
|
}) : null;
|
|
29650
29654
|
}
|
|
29651
|
-
function
|
|
29655
|
+
function Tk({ title: e }) {
|
|
29652
29656
|
return /* @__PURE__ */ g("div", {
|
|
29653
29657
|
style: {
|
|
29654
29658
|
width: "100%",
|
|
@@ -29666,18 +29670,18 @@ function Ek({ title: e }) {
|
|
|
29666
29670
|
children: String(e || "FE").split(/\s+/).filter(Boolean).slice(0, 2).map((e) => e[0]?.toUpperCase() || "").join("") || "FE"
|
|
29667
29671
|
});
|
|
29668
29672
|
}
|
|
29669
|
-
function
|
|
29673
|
+
function Ek(e, t) {
|
|
29670
29674
|
let n = (t || "").trim();
|
|
29671
29675
|
return n ? !!(/\b(let'?s|let us)\s+(end|stop|finish|wrap up|close)\s+(the\s+)?(voice\s+)?(session|call|chat)\b/i.test(n) || /\bend\s+(this\s+)?(the\s+)?(voice\s+)?(session|call|chat)\b/i.test(n) || /\b(hang\s+up|disconnect)\b/i.test(n) || /\b(that'?s all|we'?re done)\b/i.test(n) || e === "bot" && (/\b(I'?ll|I will|Let me|I can|I'?m going to)\s+(end|close)\s+(the\s+)?(voice\s+)?(session|call)\b/i.test(n) || /\b(ending|closing)\s+(the\s+)?(voice\s+)?session\b|\bvoice\s+session\s+(is\s+)?(now\s+)?(ended|over|closing)\b/i.test(n) || /\b(session|call)\s+(is\s+)?(now\s+)?(ended|over)\b/i.test(n) || /\bwe\s+can\s+end\s+(the\s+)?(session|call)?\s*(here|now)\b/i.test(n) || /\b(wrapping\s+up|signing\s+off)\b/i.test(n)) || /^(goodbye|bye|that'?s all|we'?re done|hang up|disconnect)\b/i.test(n)) : !1;
|
|
29672
29676
|
}
|
|
29673
|
-
function
|
|
29674
|
-
return /* @__PURE__ */ g(
|
|
29677
|
+
function Dk({ orbColors: e, ...t }) {
|
|
29678
|
+
return /* @__PURE__ */ g(eO, {
|
|
29675
29679
|
colors: e,
|
|
29676
29680
|
...t
|
|
29677
29681
|
});
|
|
29678
29682
|
}
|
|
29679
|
-
function
|
|
29680
|
-
let s = n ||
|
|
29683
|
+
function Ok({ copy: e, orbColors: t, primaryColor: n, onYes: r, onLater: i, isMobile: a, isClosing: o }) {
|
|
29684
|
+
let s = n || xk.green, c = Ck(s), l = a ? 72 : 94, u = /* @__PURE__ */ _("div", {
|
|
29681
29685
|
style: {
|
|
29682
29686
|
display: "flex",
|
|
29683
29687
|
alignItems: a ? "flex-end" : "center",
|
|
@@ -29798,7 +29802,7 @@ function kk({ copy: e, orbColors: t, primaryColor: n, onYes: r, onLater: i, isMo
|
|
|
29798
29802
|
delay: 0
|
|
29799
29803
|
},
|
|
29800
29804
|
style: { flexShrink: 0 },
|
|
29801
|
-
children: /* @__PURE__ */ g(
|
|
29805
|
+
children: /* @__PURE__ */ g(Dk, {
|
|
29802
29806
|
size: l,
|
|
29803
29807
|
orbColors: t
|
|
29804
29808
|
})
|
|
@@ -29830,8 +29834,8 @@ function kk({ copy: e, orbColors: t, primaryColor: n, onYes: r, onLater: i, isMo
|
|
|
29830
29834
|
children: u
|
|
29831
29835
|
})] });
|
|
29832
29836
|
}
|
|
29833
|
-
function
|
|
29834
|
-
let c = n ||
|
|
29837
|
+
function kk({ copy: e, orbColors: t, primaryColor: n, onVoice: r, onText: i, onClose: a, isMobile: o, isClosing: s }) {
|
|
29838
|
+
let c = n || xk.green, l = Ck(c);
|
|
29835
29839
|
return /* @__PURE__ */ _(Sm.div, {
|
|
29836
29840
|
initial: {
|
|
29837
29841
|
scale: 50 / 350,
|
|
@@ -29902,7 +29906,7 @@ function Ak({ copy: e, orbColors: t, primaryColor: n, onVoice: r, onText: i, onC
|
|
|
29902
29906
|
children: /* @__PURE__ */ g("polyline", { points: "6 9 12 15 18 9" })
|
|
29903
29907
|
})
|
|
29904
29908
|
}),
|
|
29905
|
-
/* @__PURE__ */ g(
|
|
29909
|
+
/* @__PURE__ */ g(Dk, {
|
|
29906
29910
|
size: 72,
|
|
29907
29911
|
orbColors: t
|
|
29908
29912
|
}),
|
|
@@ -29971,7 +29975,7 @@ function Ak({ copy: e, orbColors: t, primaryColor: n, onVoice: r, onText: i, onC
|
|
|
29971
29975
|
]
|
|
29972
29976
|
});
|
|
29973
29977
|
}
|
|
29974
|
-
function
|
|
29978
|
+
function Ak({ orbColors: e, onEnterChat: t, onEndChat: n, agentId: r, voiceId: i, siteId: a, apiBaseUrl: s, chatId: l, historyRef: u, onMessageSync: d, voiceEndCounter: f }) {
|
|
29975
29979
|
let [h, v] = m("idle"), [y, b] = m(!1), [x, S] = m(!1), C = p(null), w = p(""), T = p(async () => {}), ee = p(!1), te = p(!1), ne = p(!1), re = p(!1), E = p("minimized"), ie = p(null), ae = p(null), oe = p(null), D = p(0), se = p(!1), ce = o((e = "minimized") => {
|
|
29976
29980
|
E.current = e, re.current = !0, queueMicrotask(() => {
|
|
29977
29981
|
ee.current || (ee.current = !0, T.current?.());
|
|
@@ -30021,7 +30025,7 @@ function jk({ orbColors: e, onEnterChat: t, onEndChat: n, agentId: r, voiceId: i
|
|
|
30021
30025
|
if ((await navigator.mediaDevices.getUserMedia({ audio: !0 })).getTracks().forEach((e) => e.stop()), e) return;
|
|
30022
30026
|
u.current = [], w.current = "", ee.current = !1, ne.current = !1, re.current = !1, E.current = "minimized", wr({ onBeforeNavigate: () => {
|
|
30023
30027
|
if (a && u.current.length > 0) try {
|
|
30024
|
-
let e =
|
|
30028
|
+
let e = lO(u.current);
|
|
30025
30029
|
e && Ae(a, e);
|
|
30026
30030
|
} catch {}
|
|
30027
30031
|
if (!Xn()) {
|
|
@@ -30043,7 +30047,7 @@ function jk({ orbColors: e, onEnterChat: t, onEndChat: n, agentId: r, voiceId: i
|
|
|
30043
30047
|
}
|
|
30044
30048
|
Ne();
|
|
30045
30049
|
} });
|
|
30046
|
-
let t =
|
|
30050
|
+
let t = bk(yk({
|
|
30047
30051
|
siteId: a || null,
|
|
30048
30052
|
apiBaseUrl: s || null,
|
|
30049
30053
|
getLastUserVoiceText: () => w.current,
|
|
@@ -30102,10 +30106,10 @@ function jk({ orbColors: e, onEnterChat: t, onEndChat: n, agentId: r, voiceId: i
|
|
|
30102
30106
|
message: r,
|
|
30103
30107
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
30104
30108
|
}], a) try {
|
|
30105
|
-
let e =
|
|
30109
|
+
let e = lO(u.current);
|
|
30106
30110
|
e && Ae(a, e);
|
|
30107
30111
|
} catch {}
|
|
30108
|
-
if (
|
|
30112
|
+
if (Ek(n, r)) {
|
|
30109
30113
|
ce("minimized");
|
|
30110
30114
|
return;
|
|
30111
30115
|
}
|
|
@@ -30240,7 +30244,7 @@ function jk({ orbColors: e, onEnterChat: t, onEndChat: n, agentId: r, voiceId: i
|
|
|
30240
30244
|
},
|
|
30241
30245
|
children: "Muted"
|
|
30242
30246
|
}),
|
|
30243
|
-
/* @__PURE__ */ g(
|
|
30247
|
+
/* @__PURE__ */ g(Dk, {
|
|
30244
30248
|
size: 72,
|
|
30245
30249
|
voiceState: h,
|
|
30246
30250
|
isMuted: y,
|
|
@@ -30478,7 +30482,7 @@ function jk({ orbColors: e, onEnterChat: t, onEndChat: n, agentId: r, voiceId: i
|
|
|
30478
30482
|
]
|
|
30479
30483
|
});
|
|
30480
30484
|
}
|
|
30481
|
-
function
|
|
30485
|
+
function jk({ orbColors: e }) {
|
|
30482
30486
|
return /* @__PURE__ */ g("div", {
|
|
30483
30487
|
style: {
|
|
30484
30488
|
flexShrink: 0,
|
|
@@ -30488,13 +30492,13 @@ function Mk({ orbColors: e }) {
|
|
|
30488
30492
|
alignItems: "center",
|
|
30489
30493
|
justifyContent: "center"
|
|
30490
30494
|
},
|
|
30491
|
-
children: /* @__PURE__ */ g(
|
|
30495
|
+
children: /* @__PURE__ */ g(Dk, {
|
|
30492
30496
|
size: 36,
|
|
30493
30497
|
orbColors: e
|
|
30494
30498
|
})
|
|
30495
30499
|
});
|
|
30496
30500
|
}
|
|
30497
|
-
var
|
|
30501
|
+
var Mk = () => /* @__PURE__ */ g("div", {
|
|
30498
30502
|
style: {
|
|
30499
30503
|
display: "flex",
|
|
30500
30504
|
marginBottom: "12px",
|
|
@@ -30524,7 +30528,7 @@ var Nk = () => /* @__PURE__ */ g("div", {
|
|
|
30524
30528
|
} }, e))
|
|
30525
30529
|
})
|
|
30526
30530
|
});
|
|
30527
|
-
function
|
|
30531
|
+
function Nk({ copy: e, orbColors: t, primaryColor: n, chatBgGradient: r, logo: i, quickChatOptions: a, onQuickChatSelect: o, isMobile: s, chatHistory: l, isAiTyping: u, isAgentTyping: d, activeScreen: f, agentName: v, agentHeadshot: y, fallbackAgentName: b, input: x, setInput: S, onSubmit: C, isConversationEnded: w, isLoading: T, isRateLimited: ee, rateLimitMessage: te, selectedFile: ne, onFileSelect: re, onRemoveSelectedFile: E, attachmentError: ie, isUploadingAttachment: ae, requiresEmail: oe, emailInput: D, setEmailInput: se, emailError: ce, emailCaptureSuccess: le, replyContext: ue, setReplyContext: de, webRTCError: fe, micError: pe, setMicError: me, dismissCallError: he, activeCallId: ge, isCallMuted: _e, toggleCallMute: ve, endWebRTCCall: ye, formatCallDuration: be, callDurationSeconds: xe, isCallMinimized: Se, onExpand: Ce, onCollapse: we, onStartVoice: Te, onNewChat: Ee, onEndConversation: De, showPoweredBy: Oe, getVisitorChatHistory: ke, getVisitorChatThread: Ae, resumeChat: je, isSessionRestoring: Me, isClosing: O }) {
|
|
30528
30532
|
let Ne = l.length > 0, Pe = T || ee || w, Fe = !!ge, [Ie, Le] = m(!1), [Re, ze] = m(!1), [Be, Ve] = m([]), [He, Ue] = m(!1), [We, Ge] = m(null), [Ke, qe] = m([]), Je = p(null), Ye = async () => {
|
|
30529
30533
|
Le(!1), ze(!0), Ue(!0), Ge(null);
|
|
30530
30534
|
try {
|
|
@@ -30649,7 +30653,7 @@ function Pk({ copy: e, orbColors: t, primaryColor: n, chatBgGradient: r, logo: i
|
|
|
30649
30653
|
justifyContent: "center",
|
|
30650
30654
|
height: "40px"
|
|
30651
30655
|
},
|
|
30652
|
-
children: i ? /* @__PURE__ */ g(
|
|
30656
|
+
children: i ? /* @__PURE__ */ g(wk, {
|
|
30653
30657
|
logo: i,
|
|
30654
30658
|
style: {
|
|
30655
30659
|
height: "34px",
|
|
@@ -30662,7 +30666,7 @@ function Pk({ copy: e, orbColors: t, primaryColor: n, chatBgGradient: r, logo: i
|
|
|
30662
30666
|
height: "40px",
|
|
30663
30667
|
flexShrink: 0
|
|
30664
30668
|
},
|
|
30665
|
-
children: /* @__PURE__ */ g(
|
|
30669
|
+
children: /* @__PURE__ */ g(Tk, { title: e.chatTitle })
|
|
30666
30670
|
})
|
|
30667
30671
|
}), /* @__PURE__ */ g("div", {
|
|
30668
30672
|
style: {
|
|
@@ -30944,7 +30948,7 @@ function Pk({ copy: e, orbColors: t, primaryColor: n, chatBgGradient: r, logo: i
|
|
|
30944
30948
|
})
|
|
30945
30949
|
]
|
|
30946
30950
|
}),
|
|
30947
|
-
/* @__PURE__ */ g(
|
|
30951
|
+
/* @__PURE__ */ g(GD, {
|
|
30948
30952
|
webRTCError: fe,
|
|
30949
30953
|
micError: pe,
|
|
30950
30954
|
setMicError: me,
|
|
@@ -30952,7 +30956,7 @@ function Pk({ copy: e, orbColors: t, primaryColor: n, chatBgGradient: r, logo: i
|
|
|
30952
30956
|
isRateLimited: ee,
|
|
30953
30957
|
rateLimitMessage: te
|
|
30954
30958
|
}),
|
|
30955
|
-
Se && /* @__PURE__ */ g(
|
|
30959
|
+
Se && /* @__PURE__ */ g(cO, {
|
|
30956
30960
|
agentName: v,
|
|
30957
30961
|
agentHeadshot: y,
|
|
30958
30962
|
fallbackAgentName: b,
|
|
@@ -31144,17 +31148,17 @@ function Pk({ copy: e, orbColors: t, primaryColor: n, chatBgGradient: r, logo: i
|
|
|
31144
31148
|
children: "No previous chats found."
|
|
31145
31149
|
})
|
|
31146
31150
|
})]
|
|
31147
|
-
}) : null, Ne ? /* @__PURE__ */ g(
|
|
31151
|
+
}) : null, Ne ? /* @__PURE__ */ g(UD, {
|
|
31148
31152
|
chatHistory: l,
|
|
31149
31153
|
isAiTyping: u,
|
|
31150
31154
|
isLoading: T,
|
|
31151
31155
|
isAgentTyping: d,
|
|
31152
31156
|
setReplyContext: de,
|
|
31153
|
-
TypingDots:
|
|
31157
|
+
TypingDots: Mk,
|
|
31154
31158
|
primaryColor: n,
|
|
31155
31159
|
agentHeadshot: y,
|
|
31156
31160
|
agentDisplayName: v || b,
|
|
31157
|
-
botAvatarNode: /* @__PURE__ */ g(
|
|
31161
|
+
botAvatarNode: /* @__PURE__ */ g(jk, { orbColors: t })
|
|
31158
31162
|
}) : Me ? /* @__PURE__ */ _("div", {
|
|
31159
31163
|
style: {
|
|
31160
31164
|
flex: 1,
|
|
@@ -31195,7 +31199,7 @@ function Pk({ copy: e, orbColors: t, primaryColor: n, chatBgGradient: r, logo: i
|
|
|
31195
31199
|
padding: "28px 24px"
|
|
31196
31200
|
},
|
|
31197
31201
|
children: [
|
|
31198
|
-
/* @__PURE__ */ g(
|
|
31202
|
+
/* @__PURE__ */ g(Dk, {
|
|
31199
31203
|
size: 94,
|
|
31200
31204
|
orbColors: t
|
|
31201
31205
|
}),
|
|
@@ -31286,7 +31290,7 @@ function Pk({ copy: e, orbColors: t, primaryColor: n, chatBgGradient: r, logo: i
|
|
|
31286
31290
|
zIndex: 1,
|
|
31287
31291
|
padding: oe ? "6px 0 0" : "12px 0 0"
|
|
31288
31292
|
},
|
|
31289
|
-
children: /* @__PURE__ */ g(
|
|
31293
|
+
children: /* @__PURE__ */ g(WD, {
|
|
31290
31294
|
input: x,
|
|
31291
31295
|
setInput: S,
|
|
31292
31296
|
onSubmit: C,
|
|
@@ -31336,7 +31340,7 @@ function Pk({ copy: e, orbColors: t, primaryColor: n, chatBgGradient: r, logo: i
|
|
|
31336
31340
|
]
|
|
31337
31341
|
});
|
|
31338
31342
|
}
|
|
31339
|
-
function
|
|
31343
|
+
function Pk() {
|
|
31340
31344
|
let { status: e, runtimeConfig: t, resolvedConfig: n, chatHistory: r, isOpen: i, activeScreen: a, isHumanHandled: s, agentName: l, agentHeadshot: u, visitorEmail: h, isAgentTyping: v, isAiTyping: y, isLoading: b, isRateLimited: x, rateLimitMessage: S, isConversationEnded: C, incomingCall: w, activeCallId: T, callConnectionState: ee, callConnectedAt: te, isCallMuted: ne, webRTCError: re, language: E, chatId: ie, historyRef: ae, onMessageSync: oe, sendMessage: D, uploadChatFile: se, openWidget: ce, captureVisitorEmail: le, setVoiceMode: ue, endConversation: de, startNewChat: me, acceptCall: he, rejectCall: ge, endWebRTCCall: _e, toggleCallMute: ve, dismissCallError: ye, startTyping: be, stopTyping: xe, updateTypingDraft: Se, getVisitorChatHistory: Ce, getVisitorChatThread: we, resumeChat: Te, isSessionRestoring: Ee, openToChatCounter: De, voiceEndCounter: Oe } = Ln();
|
|
31341
31345
|
c(() => {
|
|
31342
31346
|
try {
|
|
@@ -31354,7 +31358,7 @@ function Fk() {
|
|
|
31354
31358
|
}, Fe = {
|
|
31355
31359
|
...ke.features || {},
|
|
31356
31360
|
...Ae.features || {}
|
|
31357
|
-
}, Ie = Fe.voice !== !1, Re = Array.isArray(Ne.orbColors) && Ne.orbColors.length > 0 ? Ne.orbColors : null, ze = Ne.buttonColor || Ne.primaryColor || Re?.[0] || "#3B82F6", Be = Ne.position || "bottom-right", Ve = O.fallbackAgentName || "Agent", He =
|
|
31361
|
+
}, Ie = Fe.voice !== !1, Re = Array.isArray(Ne.orbColors) && Ne.orbColors.length > 0 ? Ne.orbColors : null, ze = Ne.buttonColor || Ne.primaryColor || Re?.[0] || "#3B82F6", Be = Ne.position || "bottom-right", Ve = O.fallbackAgentName || "Agent", He = Sk(Re ?? Ne.chatBgColors), Ue = O.logo || O.logoUrl || null, We = E || "en", Ge = ke.recommendations?.[We] || [], Ke = (Ae.recommendations?.[We] ?? Ge).filter((e) => String(e?.label ?? "").trim()).map((e, t) => ({
|
|
31358
31362
|
id: e.key || `qr-${t}`,
|
|
31359
31363
|
label: e.label,
|
|
31360
31364
|
message: e.label,
|
|
@@ -31618,7 +31622,7 @@ function Fk() {
|
|
|
31618
31622
|
onWheel: (e) => e.stopPropagation(),
|
|
31619
31623
|
onTouchMove: (e) => e.stopPropagation(),
|
|
31620
31624
|
children: [
|
|
31621
|
-
A === "entry_prompt" && /* @__PURE__ */ g(
|
|
31625
|
+
A === "entry_prompt" && /* @__PURE__ */ g(Ok, {
|
|
31622
31626
|
copy: Ze,
|
|
31623
31627
|
orbColors: Re,
|
|
31624
31628
|
primaryColor: ze,
|
|
@@ -31701,13 +31705,13 @@ function Fk() {
|
|
|
31701
31705
|
children: ee === "connected" ? `${Ht(_t)} with ${nt}` : `Tap to return to ${nt}`
|
|
31702
31706
|
})]
|
|
31703
31707
|
})]
|
|
31704
|
-
}), /* @__PURE__ */ g(
|
|
31708
|
+
}), /* @__PURE__ */ g(Dk, {
|
|
31705
31709
|
size: 50,
|
|
31706
31710
|
orbColors: Re,
|
|
31707
31711
|
onClick: T && Dt ? Lt : Ie ? Kt : Jt
|
|
31708
31712
|
})]
|
|
31709
31713
|
}),
|
|
31710
|
-
A === "connection_modal" && /* @__PURE__ */ g(
|
|
31714
|
+
A === "connection_modal" && /* @__PURE__ */ g(kk, {
|
|
31711
31715
|
copy: Ze,
|
|
31712
31716
|
orbColors: Re,
|
|
31713
31717
|
primaryColor: ze,
|
|
@@ -31717,7 +31721,7 @@ function Fk() {
|
|
|
31717
31721
|
isMobile: Nt,
|
|
31718
31722
|
isClosing: kt
|
|
31719
31723
|
}),
|
|
31720
|
-
A === "voice_mode" && /* @__PURE__ */ g(
|
|
31724
|
+
A === "voice_mode" && /* @__PURE__ */ g(Ak, {
|
|
31721
31725
|
orbColors: Re,
|
|
31722
31726
|
onEnterChat: Jt,
|
|
31723
31727
|
onEndChat: Yt,
|
|
@@ -31730,7 +31734,7 @@ function Fk() {
|
|
|
31730
31734
|
onMessageSync: oe,
|
|
31731
31735
|
voiceEndCounter: Oe
|
|
31732
31736
|
}, "voice"),
|
|
31733
|
-
A === "call_screen" && /* @__PURE__ */ g(
|
|
31737
|
+
A === "call_screen" && /* @__PURE__ */ g(sO, {
|
|
31734
31738
|
incomingCall: w,
|
|
31735
31739
|
activeCallId: T,
|
|
31736
31740
|
callConnectionState: ee,
|
|
@@ -31749,7 +31753,7 @@ function Fk() {
|
|
|
31749
31753
|
orbColors: Re,
|
|
31750
31754
|
chatHistory: r
|
|
31751
31755
|
}),
|
|
31752
|
-
A === "text_chat" && /* @__PURE__ */ g(
|
|
31756
|
+
A === "text_chat" && /* @__PURE__ */ g(Nk, {
|
|
31753
31757
|
isClosing: kt,
|
|
31754
31758
|
copy: Ze,
|
|
31755
31759
|
orbColors: Re,
|
|
@@ -31814,7 +31818,7 @@ function Fk() {
|
|
|
31814
31818
|
}
|
|
31815
31819
|
//#endregion
|
|
31816
31820
|
//#region src/components/ErrorBoundary.jsx
|
|
31817
|
-
var
|
|
31821
|
+
var Fk = class extends e.Component {
|
|
31818
31822
|
constructor(e) {
|
|
31819
31823
|
super(e), this.state = { hasError: !1 };
|
|
31820
31824
|
}
|
|
@@ -31829,4 +31833,4 @@ var Ik = class extends e.Component {
|
|
|
31829
31833
|
}
|
|
31830
31834
|
};
|
|
31831
31835
|
//#endregion
|
|
31832
|
-
export {
|
|
31836
|
+
export { eO as AnimatedOrb, Fk as ErrorBoundary, Nr as FlowEngageProvider, Pk as FlowEngageWidget, Ln as useFlowEngage };
|