@botonic/webchat-react 2.34.1 → 2.35.0-alpha.0
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/CHANGELOG.md +4 -0
- package/CLAUDE.md +8 -8
- package/index.d.ts +1 -0
- package/index.js +45 -44
- package/package.json +3 -3
- package/styles.css +173 -170
- package/trigger.js +14 -14
- package/{webchat-app-BfcNIC8B.js → webchat-app-BrBET32o.js} +95 -95
package/trigger.js
CHANGED
|
@@ -20,7 +20,7 @@ function Ie() {
|
|
|
20
20
|
}
|
|
21
21
|
);
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function We() {
|
|
24
24
|
return /* @__PURE__ */ n(
|
|
25
25
|
"svg",
|
|
26
26
|
{
|
|
@@ -39,8 +39,8 @@ function Ne() {
|
|
|
39
39
|
}
|
|
40
40
|
);
|
|
41
41
|
}
|
|
42
|
-
const
|
|
43
|
-
() => import("./webchat-app-
|
|
42
|
+
const Ne = ie(
|
|
43
|
+
() => import("./webchat-app-BrBET32o.js").then((p) => p.U).then((p) => ({ default: p.WebchatApp }))
|
|
44
44
|
);
|
|
45
45
|
function Me(p, m) {
|
|
46
46
|
const {
|
|
@@ -55,18 +55,18 @@ function Me(p, m) {
|
|
|
55
55
|
loader: y,
|
|
56
56
|
proactiveMessage: C,
|
|
57
57
|
proactiveDelay: H = 5
|
|
58
|
-
} = p, [w, A] = l(!1), [d, b] = l(!1), [T, I] = l(0), [r,
|
|
59
|
-
|
|
58
|
+
} = p, [w, A] = l(!1), [d, b] = l(!1), [T, I] = l(0), [r, W] = l(!1), [t, ae] = l(null), [j, ce] = l(!1), [R, N] = l("appearing"), [le, q] = l(!1), [P, Y] = l(!1), [ue, M] = l(!1), [pe, de] = l(0), F = i(!1), K = i(null), U = i(!1), Q = i(!1), O = i(0), Z = i(!1), B = i(0), J = i({ x: 0, y: 0 }), X = i({ x: 0, y: 0 }), a = i(null), c = i(null), _ = i(!1), G = i(!1);
|
|
59
|
+
Q.current || (Q.current = !0, Pe()), u(() => {
|
|
60
60
|
G.current = P;
|
|
61
61
|
}, [P]), u(() => {
|
|
62
62
|
Z.current = r;
|
|
63
63
|
}, [r]);
|
|
64
64
|
const ge = ye(
|
|
65
|
-
() => y ? ie(y) :
|
|
65
|
+
() => y ? ie(y) : Ne,
|
|
66
66
|
[y]
|
|
67
67
|
), he = h(
|
|
68
68
|
(e) => {
|
|
69
|
-
e.target === e.currentTarget && R !== null &&
|
|
69
|
+
e.target === e.currentTarget && R !== null && N(null);
|
|
70
70
|
},
|
|
71
71
|
[R]
|
|
72
72
|
);
|
|
@@ -74,31 +74,31 @@ function Me(p, m) {
|
|
|
74
74
|
if (!t) return;
|
|
75
75
|
const e = t.machine.subscribe((s) => {
|
|
76
76
|
const v = s.context.isOpen ?? !1, g = s.context.messageActors?.size ?? 0;
|
|
77
|
-
ce(s.context.connectionStatus === "connected"),
|
|
77
|
+
ce(s.context.connectionStatus === "connected"), W(v), v ? (q(!1), O.current = g) : (g > O.current && q(!0), O.current = g);
|
|
78
78
|
});
|
|
79
79
|
return () => e.unsubscribe();
|
|
80
80
|
}, [t]), u(() => {
|
|
81
81
|
const e = F.current, s = t !== null && K.current === null;
|
|
82
82
|
if (F.current = r, K.current = t, !!t) {
|
|
83
83
|
if (s && r) {
|
|
84
|
-
|
|
84
|
+
N("opening");
|
|
85
85
|
return;
|
|
86
86
|
}
|
|
87
|
-
e === !1 && r ?
|
|
87
|
+
e === !1 && r ? N("opening") : e === !0 && !r && N("closing");
|
|
88
88
|
}
|
|
89
89
|
}, [r, t]);
|
|
90
90
|
const me = h((e) => {
|
|
91
91
|
ae(e), xe(e);
|
|
92
92
|
}, []);
|
|
93
93
|
u(() => {
|
|
94
|
-
!t || !j ||
|
|
94
|
+
!t || !j || U.current || (U.current = !0, Ae(), E?.(t));
|
|
95
95
|
}, [t, j, E]);
|
|
96
96
|
const k = h(() => {
|
|
97
|
-
d && (b(!1), I((e) => e + 1)), w ? t ? t.open() :
|
|
97
|
+
d && (b(!1), I((e) => e + 1)), w ? t ? t.open() : W(!0) : (A(!0), W(!0));
|
|
98
98
|
}, [d, w, t]), fe = h(() => {
|
|
99
99
|
t ? r ? t.close() : t.open() : k();
|
|
100
100
|
}, [t, r, k]), $ = h(() => {
|
|
101
|
-
b(!1), I((e) => e + 1), A(!0),
|
|
101
|
+
b(!1), I((e) => e + 1), A(!0), W(!0);
|
|
102
102
|
}, []), we = h((e) => {
|
|
103
103
|
console.error("Failed to load webchat:", e), b(!0);
|
|
104
104
|
}, []);
|
|
@@ -269,7 +269,7 @@ function Be(p) {
|
|
|
269
269
|
isPopupDismissing: d,
|
|
270
270
|
proactiveMessage: b,
|
|
271
271
|
onPopupAnimationEnd: T
|
|
272
|
-
} = Me(p, m), I = f ? /* @__PURE__ */ n(
|
|
272
|
+
} = Me(p, m), I = f ? /* @__PURE__ */ n(We, {}) : /* @__PURE__ */ n(Ie, {});
|
|
273
273
|
return /* @__PURE__ */ ne(Le, { children: [
|
|
274
274
|
(A || d) && b && /* @__PURE__ */ n(
|
|
275
275
|
"div",
|
|
@@ -285,7 +285,7 @@ function Pn() {
|
|
|
285
285
|
}
|
|
286
286
|
);
|
|
287
287
|
}
|
|
288
|
-
const Bn = "dialog-module__base___K18e8", kn = "dialog-module__success___z5NAQ", On = "dialog-module__error___Q46VR", Dn = "dialog-module__loading___21312", Vn = "dialog-module__actions___xFizf", Wn = "dialog-module__closing___qgRFX", zn = "dialog-module__iconContainer___8lOJ3", Fn = "dialog-module__spinner___jL0bN",
|
|
288
|
+
const Bn = "dialog-module__base___K18e8", kn = "dialog-module__success___z5NAQ", On = "dialog-module__error___Q46VR", Dn = "dialog-module__loading___21312", Vn = "dialog-module__actions___xFizf", Wn = "dialog-module__closing___qgRFX", zn = "dialog-module__iconContainer___8lOJ3", Fn = "dialog-module__spinner___jL0bN", Un = "dialog-module__textContent___t6Tqt", Hn = "dialog-module__title___jr3if", $n = "dialog-module__subtitle___K1uUB", Z = {
|
|
289
289
|
base: Bn,
|
|
290
290
|
success: kn,
|
|
291
291
|
error: On,
|
|
@@ -294,8 +294,8 @@ const Bn = "dialog-module__base___K18e8", kn = "dialog-module__success___z5NAQ",
|
|
|
294
294
|
closing: Wn,
|
|
295
295
|
iconContainer: zn,
|
|
296
296
|
spinner: Fn,
|
|
297
|
-
textContent:
|
|
298
|
-
title:
|
|
297
|
+
textContent: Un,
|
|
298
|
+
title: Hn,
|
|
299
299
|
subtitle: $n
|
|
300
300
|
}, Gn = j(Z.base, {
|
|
301
301
|
variants: {
|
|
@@ -1132,10 +1132,10 @@ function Fo({
|
|
|
1132
1132
|
}
|
|
1133
1133
|
);
|
|
1134
1134
|
}
|
|
1135
|
-
function
|
|
1135
|
+
function Uo() {
|
|
1136
1136
|
return /* @__PURE__ */ t("svg", { ..._e, children: /* @__PURE__ */ t("path", { d: "M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z" }) });
|
|
1137
1137
|
}
|
|
1138
|
-
function
|
|
1138
|
+
function Ho({
|
|
1139
1139
|
onClose: e,
|
|
1140
1140
|
children: n
|
|
1141
1141
|
}) {
|
|
@@ -1143,7 +1143,7 @@ function Uo({
|
|
|
1143
1143
|
return /* @__PURE__ */ t(
|
|
1144
1144
|
tt,
|
|
1145
1145
|
{
|
|
1146
|
-
icon: /* @__PURE__ */ t(
|
|
1146
|
+
icon: /* @__PURE__ */ t(Uo, {}),
|
|
1147
1147
|
onPress: () => {
|
|
1148
1148
|
a.resetConversation(), e?.();
|
|
1149
1149
|
},
|
|
@@ -1881,14 +1881,14 @@ function Da(e, n) {
|
|
|
1881
1881
|
m && (s(Ye), d());
|
|
1882
1882
|
}, [m, s, d]), Fe = b(() => {
|
|
1883
1883
|
i(Ye), u();
|
|
1884
|
-
}, [i, u]),
|
|
1884
|
+
}, [i, u]), Ue = b(() => {
|
|
1885
1885
|
i(Ye), i(fe), c();
|
|
1886
1886
|
}, [i, c]), he = b(
|
|
1887
1887
|
(O) => {
|
|
1888
1888
|
!v.current || M === 0 || (v.current.currentTime = O * M, W(Math.round(v.current.currentTime)));
|
|
1889
1889
|
},
|
|
1890
1890
|
[M]
|
|
1891
|
-
),
|
|
1891
|
+
), He = b(() => {
|
|
1892
1892
|
v.current?.pause(), i(fe), l && ka(l).then((O) => {
|
|
1893
1893
|
const Qe = nt.createAudio({
|
|
1894
1894
|
attachmentContent: O,
|
|
@@ -1909,7 +1909,7 @@ function Da(e, n) {
|
|
|
1909
1909
|
isRecording: qe,
|
|
1910
1910
|
handleMicrophoneClick: ze,
|
|
1911
1911
|
handleConfirmRecording: Fe,
|
|
1912
|
-
handleSendRecording:
|
|
1912
|
+
handleSendRecording: He,
|
|
1913
1913
|
overlayProps: {
|
|
1914
1914
|
showControls: $e,
|
|
1915
1915
|
recordingControlsClassName: je,
|
|
@@ -1922,7 +1922,7 @@ function Da(e, n) {
|
|
|
1922
1922
|
isPreview: ee,
|
|
1923
1923
|
handlePlayPause: We,
|
|
1924
1924
|
handleSeekPreview: he,
|
|
1925
|
-
handleCancelRecording:
|
|
1925
|
+
handleCancelRecording: Ue,
|
|
1926
1926
|
timerDisplay: Y,
|
|
1927
1927
|
objectUrl: L,
|
|
1928
1928
|
audioRef: v,
|
|
@@ -1977,12 +1977,12 @@ function Fa() {
|
|
|
1977
1977
|
function pt() {
|
|
1978
1978
|
return /* @__PURE__ */ t("svg", { ..._e, children: /* @__PURE__ */ t("path", { d: "M57.6 35.8C23.1 20.6-11.3 57.4 6.1 90.9l63 121.2c4.4 8.4 12.6 14.1 22 15.3L266 249.3c3.4 .4 6 3.3 6 6.7s-2.6 6.3-6 6.7L91.1 284.6c-9.4 1.2-17.6 6.9-22 15.3L6.1 421.1c-17.4 33.5 17 70.2 51.6 55.1L492.9 285.3c25.5-11.2 25.5-47.4 0-58.6L57.6 35.8z" }) });
|
|
1979
1979
|
}
|
|
1980
|
-
const
|
|
1980
|
+
const Ua = "webchat-input-module__base___TZXU7", Ha = "webchat-input-module__branding___ReLzJ", R = {
|
|
1981
1981
|
default: "webchat-input-module__default___tHS5e",
|
|
1982
|
-
base:
|
|
1982
|
+
base: Ua,
|
|
1983
1983
|
"input-form": "webchat-input-module__input-form___GnKc7",
|
|
1984
1984
|
"input-row": "webchat-input-module__input-row___uqTs6",
|
|
1985
|
-
branding:
|
|
1985
|
+
branding: Ha,
|
|
1986
1986
|
"input-form--active": "webchat-input-module__input-form--active___ZioHn",
|
|
1987
1987
|
"input-field": "webchat-input-module__input-field___c4r26",
|
|
1988
1988
|
"primary-action-base": "webchat-input-module__primary-action-base___UfC2U",
|
|
@@ -2045,7 +2045,7 @@ function Ga(e, n, a) {
|
|
|
2045
2045
|
handleMicrophoneClick: We,
|
|
2046
2046
|
handleConfirmRecording: ze,
|
|
2047
2047
|
handleSendRecording: Fe,
|
|
2048
|
-
overlayProps:
|
|
2048
|
+
overlayProps: Ue
|
|
2049
2049
|
} = Da(n), he = b(() => {
|
|
2050
2050
|
if (!T || y) return;
|
|
2051
2051
|
const te = v.current.trim();
|
|
@@ -2058,7 +2058,7 @@ function Ga(e, n, a) {
|
|
|
2058
2058
|
});
|
|
2059
2059
|
m?.(), o.sendMessage(Me), v.current = "", p("");
|
|
2060
2060
|
}
|
|
2061
|
-
}, [o, T, y, m]),
|
|
2061
|
+
}, [o, T, y, m]), He = b(
|
|
2062
2062
|
(te) => {
|
|
2063
2063
|
te.preventDefault(), M && X(), he();
|
|
2064
2064
|
},
|
|
@@ -2088,7 +2088,7 @@ function Ga(e, n, a) {
|
|
|
2088
2088
|
// Form state and handlers
|
|
2089
2089
|
inputValue: C,
|
|
2090
2090
|
hasText: A,
|
|
2091
|
-
handleSubmit:
|
|
2091
|
+
handleSubmit: He,
|
|
2092
2092
|
onEmojiClick: d,
|
|
2093
2093
|
onAttachmentClick: Jt,
|
|
2094
2094
|
// Attachment preview
|
|
@@ -2117,7 +2117,7 @@ function Ga(e, n, a) {
|
|
|
2117
2117
|
inputBehavior: L,
|
|
2118
2118
|
showBranding: l,
|
|
2119
2119
|
// Audio overlay (passed to AudioInput)
|
|
2120
|
-
overlayProps:
|
|
2120
|
+
overlayProps: Ue,
|
|
2121
2121
|
hideBaseContent: ie,
|
|
2122
2122
|
audioRecordingAvailable: J,
|
|
2123
2123
|
// Primary action button
|
|
@@ -2594,7 +2594,6 @@ function rt(e) {
|
|
|
2594
2594
|
isContinuation: u,
|
|
2595
2595
|
hasActions: c,
|
|
2596
2596
|
isFullWidth: m,
|
|
2597
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2598
2597
|
children: g,
|
|
2599
2598
|
// Consume unknown props without forwarding them to child components
|
|
2600
2599
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -2696,7 +2695,7 @@ const de = G(
|
|
|
2696
2695
|
waveformPlaceholder: zs,
|
|
2697
2696
|
timer: Fs
|
|
2698
2697
|
};
|
|
2699
|
-
function
|
|
2698
|
+
function Us({
|
|
2700
2699
|
src: e,
|
|
2701
2700
|
messageId: n,
|
|
2702
2701
|
onAudioLoad: a,
|
|
@@ -2756,7 +2755,7 @@ function Hs({
|
|
|
2756
2755
|
}
|
|
2757
2756
|
};
|
|
2758
2757
|
}
|
|
2759
|
-
const
|
|
2758
|
+
const Ut = G(
|
|
2760
2759
|
({
|
|
2761
2760
|
src: e,
|
|
2762
2761
|
messageId: n,
|
|
@@ -2778,7 +2777,7 @@ const Ht = G(
|
|
|
2778
2777
|
handleSeek: p,
|
|
2779
2778
|
audioProps: v,
|
|
2780
2779
|
playButtonProps: L
|
|
2781
|
-
} =
|
|
2780
|
+
} = Us({
|
|
2782
2781
|
src: e,
|
|
2783
2782
|
messageId: n,
|
|
2784
2783
|
onAudioLoad: o,
|
|
@@ -2830,9 +2829,9 @@ const Ht = G(
|
|
|
2830
2829
|
);
|
|
2831
2830
|
}
|
|
2832
2831
|
);
|
|
2833
|
-
|
|
2834
|
-
const
|
|
2835
|
-
markdownText:
|
|
2832
|
+
Ut.displayName = "AudioMessage";
|
|
2833
|
+
const Hs = "markdown-text-module__markdownText___UbIHM", $s = {
|
|
2834
|
+
markdownText: Hs
|
|
2836
2835
|
}, it = ({
|
|
2837
2836
|
text: e,
|
|
2838
2837
|
className: n
|
|
@@ -2899,7 +2898,7 @@ const qs = "quick-reply-module__quickReply___XdDLW", Ks = "quick-reply-module__s
|
|
|
2899
2898
|
function Zs(e) {
|
|
2900
2899
|
return "type" in e ? e.type === hn.WebUrl || !!e.webview : !1;
|
|
2901
2900
|
}
|
|
2902
|
-
const
|
|
2901
|
+
const Ht = G(
|
|
2903
2902
|
({
|
|
2904
2903
|
text: e,
|
|
2905
2904
|
disabled: n = !1,
|
|
@@ -2954,7 +2953,7 @@ const Ut = G(
|
|
|
2954
2953
|
"data-webchat-message-actions": !0,
|
|
2955
2954
|
style: { gridTemplateColumns: `repeat(${l}, 1fr)` },
|
|
2956
2955
|
children: n.map((c, m) => /* @__PURE__ */ t(
|
|
2957
|
-
|
|
2956
|
+
Ht,
|
|
2958
2957
|
{
|
|
2959
2958
|
text: c.text,
|
|
2960
2959
|
disabled: c.disabled,
|
|
@@ -2977,7 +2976,7 @@ const Ut = G(
|
|
|
2977
2976
|
}
|
|
2978
2977
|
);
|
|
2979
2978
|
}
|
|
2980
|
-
), er = "carousel-message-module__carouselMessageBase___yV-Nd", tr = "carousel-message-module__buttonContainer___lPydV", nr = "carousel-message-module__carouselWrapper___OaVVz", or = "carousel-message-module__carouselSlider___qtpjn", ar = "carousel-message-module__carouselCard___5GhQQ", sr = "carousel-message-module__imageContainer___-NYcV", rr = "carousel-message-module__elementImage___TEjVf", ir = "carousel-message-module__elementContent___fQqqZ", lr = "carousel-message-module__elementTitle___sUPzb", cr = "carousel-message-module__elementSubtitle___7yW9w", dr = "carousel-message-module__arrowLayer___-lMZC", ur = "carousel-message-module__arrowButton___EkObr", mr = "carousel-message-module__prevArrow___YcQdm", _r = "carousel-message-module__nextArrow___ndT0K",
|
|
2979
|
+
), er = "carousel-message-module__carouselMessageBase___yV-Nd", tr = "carousel-message-module__buttonContainer___lPydV", nr = "carousel-message-module__carouselWrapper___OaVVz", or = "carousel-message-module__carouselSlider___qtpjn", ar = "carousel-message-module__carouselCard___5GhQQ", sr = "carousel-message-module__imageContainer___-NYcV", rr = "carousel-message-module__elementImage___TEjVf", ir = "carousel-message-module__elementContent___fQqqZ", lr = "carousel-message-module__elementTitle___sUPzb", cr = "carousel-message-module__elementSubtitle___7yW9w", dr = "carousel-message-module__arrowLayer___-lMZC", ur = "carousel-message-module__arrowButton___EkObr", mr = "carousel-message-module__prevArrow___YcQdm", _r = "carousel-message-module__nextArrow___ndT0K", U = {
|
|
2981
2980
|
carouselMessageBase: er,
|
|
2982
2981
|
buttonContainer: tr,
|
|
2983
2982
|
carouselWrapper: nr,
|
|
@@ -3118,35 +3117,35 @@ const $t = G(
|
|
|
3118
3117
|
de,
|
|
3119
3118
|
{
|
|
3120
3119
|
ref: i,
|
|
3121
|
-
className: P(
|
|
3120
|
+
className: P(U.carouselMessageBase, o),
|
|
3122
3121
|
isFullWidth: !0,
|
|
3123
3122
|
...s,
|
|
3124
|
-
children: /* @__PURE__ */ f("div", { ...r, className:
|
|
3125
|
-
/* @__PURE__ */ t("div", { ...l, className:
|
|
3123
|
+
children: /* @__PURE__ */ f("div", { ...r, className: U.carouselWrapper, children: [
|
|
3124
|
+
/* @__PURE__ */ t("div", { ...l, className: U.carouselSlider, children: e.map((g, C) => /* @__PURE__ */ f(
|
|
3126
3125
|
"div",
|
|
3127
3126
|
{
|
|
3128
3127
|
...h(C),
|
|
3129
|
-
className:
|
|
3128
|
+
className: U.carouselCard,
|
|
3130
3129
|
children: [
|
|
3131
|
-
/* @__PURE__ */ t("div", { className:
|
|
3130
|
+
/* @__PURE__ */ t("div", { className: U.imageContainer, children: /* @__PURE__ */ t(
|
|
3132
3131
|
"img",
|
|
3133
3132
|
{
|
|
3134
3133
|
src: g.image,
|
|
3135
3134
|
alt: g.title,
|
|
3136
|
-
className:
|
|
3135
|
+
className: U.elementImage,
|
|
3137
3136
|
..._(C)
|
|
3138
3137
|
}
|
|
3139
3138
|
) }),
|
|
3140
|
-
/* @__PURE__ */ f("div", { className:
|
|
3141
|
-
/* @__PURE__ */ t("h3", { className:
|
|
3142
|
-
g.subtitle && /* @__PURE__ */ t("p", { className:
|
|
3139
|
+
/* @__PURE__ */ f("div", { className: U.elementContent, children: [
|
|
3140
|
+
/* @__PURE__ */ t("h3", { className: U.elementTitle, children: g.title }),
|
|
3141
|
+
g.subtitle && /* @__PURE__ */ t("p", { className: U.elementSubtitle, children: g.subtitle })
|
|
3143
3142
|
] }),
|
|
3144
3143
|
g.buttons.map((p, v) => /* @__PURE__ */ t(
|
|
3145
3144
|
"div",
|
|
3146
3145
|
{
|
|
3147
|
-
className:
|
|
3146
|
+
className: U.buttonContainer,
|
|
3148
3147
|
children: /* @__PURE__ */ t(
|
|
3149
|
-
|
|
3148
|
+
Ht,
|
|
3150
3149
|
{
|
|
3151
3150
|
text: p.title,
|
|
3152
3151
|
button: p,
|
|
@@ -3161,13 +3160,13 @@ const $t = G(
|
|
|
3161
3160
|
},
|
|
3162
3161
|
g.id
|
|
3163
3162
|
)) }),
|
|
3164
|
-
e.length > 1 && /* @__PURE__ */ f("div", { className:
|
|
3163
|
+
e.length > 1 && /* @__PURE__ */ f("div", { className: U.arrowLayer, children: [
|
|
3165
3164
|
m.canScrollPrev && /* @__PURE__ */ t(
|
|
3166
3165
|
"button",
|
|
3167
3166
|
{
|
|
3168
3167
|
...d,
|
|
3169
3168
|
type: "button",
|
|
3170
|
-
className: P(
|
|
3169
|
+
className: P(U.arrowButton, U.prevArrow),
|
|
3171
3170
|
children: /* @__PURE__ */ t(hr, {})
|
|
3172
3171
|
}
|
|
3173
3172
|
),
|
|
@@ -3176,7 +3175,7 @@ const $t = G(
|
|
|
3176
3175
|
{
|
|
3177
3176
|
...u,
|
|
3178
3177
|
type: "button",
|
|
3179
|
-
className: P(
|
|
3178
|
+
className: P(U.arrowButton, U.nextArrow),
|
|
3180
3179
|
children: /* @__PURE__ */ t(gr, {})
|
|
3181
3180
|
}
|
|
3182
3181
|
)
|
|
@@ -3444,10 +3443,10 @@ const Mr = "location-message-module__locationMessageBase___rY3d-", Ar = "locatio
|
|
|
3444
3443
|
d: "M287.9 0c9.2 0 17.6 5.2 21.6 13.5l68.6 141.3 153.2 22.6c9 1.3 16.5 7.6 19.3 16.3s.5 18.1-5.9 24.5L433.6 328.4l26.2 155.6c1.5 9-2.2 18.1-9.7 23.5s-17.3 6-25.3 1.7l-137-73.2L151 509.1c-8.1 4.3-17.9 3.7-25.3-1.7s-11.2-14.5-9.7-23.5l26.2-155.6L31.1 218.2c-6.5-6.4-8.7-15.9-5.9-24.5s10.3-14.9 19.3-16.3l153.2-22.6L266.3 13.5C270.4 5.2 278.7 0 287.9 0zm0 79L235.4 187.2c-3.5 7.1-10.2 12.1-18.1 13.3L99 217.9 184.9 303c5.5 5.5 8.1 13.3 6.8 21L171.4 443.7l105.2-56.2c7.1-3.8 15.6-3.8 22.6 0l105.2 56.2L384.2 324.1c-1.3-7.7 1.2-15.5 6.8-21l85.9-85.1L358.6 200.5c-7.8-1.2-14.6-6.1-18.1-13.3L287.9 79z",
|
|
3445
3444
|
fill: "currentColor"
|
|
3446
3445
|
}
|
|
3447
|
-
) }), Fr = "rating-message-module__ratingBubble___7wyHy",
|
|
3446
|
+
) }), Fr = "rating-message-module__ratingBubble___7wyHy", Ur = "rating-message-module__container___dtkEH", Hr = "rating-message-module__titleBlock___V-gUi", $r = "rating-message-module__title___nox04", Gr = "rating-message-module__subtitle___HvR5A", qr = "rating-message-module__starsBlock___p7KFf", Kr = "rating-message-module__starsRow___0okuD", jr = "rating-message-module__ratingIconWrap___c8yQW", Qr = "rating-message-module__starButton___jEIj0", Zr = "rating-message-module__smileyButton___W-mdc", Yr = "rating-message-module__submitButton___fzRTp", H = {
|
|
3448
3447
|
ratingBubble: Fr,
|
|
3449
|
-
container:
|
|
3450
|
-
titleBlock:
|
|
3448
|
+
container: Ur,
|
|
3449
|
+
titleBlock: Hr,
|
|
3451
3450
|
title: $r,
|
|
3452
3451
|
subtitle: Gr,
|
|
3453
3452
|
starsBlock: qr,
|
|
@@ -3524,13 +3523,13 @@ const ti = [
|
|
|
3524
3523
|
{
|
|
3525
3524
|
variant: "bot",
|
|
3526
3525
|
...g,
|
|
3527
|
-
bubbleClassName:
|
|
3528
|
-
children: /* @__PURE__ */ f("div", { className:
|
|
3529
|
-
/* @__PURE__ */ f("div", { className:
|
|
3530
|
-
/* @__PURE__ */ t("p", { className:
|
|
3531
|
-
c && /* @__PURE__ */ t(it, { text: c, className:
|
|
3526
|
+
bubbleClassName: H.ratingBubble,
|
|
3527
|
+
children: /* @__PURE__ */ f("div", { className: H.container, children: [
|
|
3528
|
+
/* @__PURE__ */ f("div", { className: H.titleBlock, children: [
|
|
3529
|
+
/* @__PURE__ */ t("p", { className: H.title, children: u }),
|
|
3530
|
+
c && /* @__PURE__ */ t(it, { text: c, className: H.subtitle })
|
|
3532
3531
|
] }),
|
|
3533
|
-
/* @__PURE__ */ t("div", { className:
|
|
3532
|
+
/* @__PURE__ */ t("div", { className: H.starsBlock, children: /* @__PURE__ */ t("div", { className: H.starsRow, "data-rating-type": C, children: v.map((L) => {
|
|
3534
3533
|
const T = s !== void 0 && L <= s || s === void 0 && i !== void 0 && L <= i, y = T ? oi : ni, A = ti[L - 1];
|
|
3535
3534
|
return p ? /* @__PURE__ */ t(
|
|
3536
3535
|
"button",
|
|
@@ -3538,13 +3537,13 @@ const ti = [
|
|
|
3538
3537
|
type: "button",
|
|
3539
3538
|
"aria-label": `Rate ${L} out of 5`,
|
|
3540
3539
|
className: P(
|
|
3541
|
-
|
|
3542
|
-
r &&
|
|
3540
|
+
H.smileyButton,
|
|
3541
|
+
r && H["is-submitted"]
|
|
3543
3542
|
),
|
|
3544
3543
|
onClick: () => h(L),
|
|
3545
3544
|
onMouseEnter: () => _(L),
|
|
3546
3545
|
onMouseLeave: () => _(void 0),
|
|
3547
|
-
children: /* @__PURE__ */ t("span", { className:
|
|
3546
|
+
children: /* @__PURE__ */ t("span", { className: H.ratingIconWrap, "aria-hidden": !0, children: /* @__PURE__ */ t(A, { color: y, selected: T }) })
|
|
3548
3547
|
},
|
|
3549
3548
|
L
|
|
3550
3549
|
) : /* @__PURE__ */ t(
|
|
@@ -3553,13 +3552,13 @@ const ti = [
|
|
|
3553
3552
|
type: "button",
|
|
3554
3553
|
"aria-label": `Rate ${L} out of 5`,
|
|
3555
3554
|
className: P(
|
|
3556
|
-
|
|
3557
|
-
r &&
|
|
3555
|
+
H.starButton,
|
|
3556
|
+
r && H["is-submitted"]
|
|
3558
3557
|
),
|
|
3559
3558
|
onClick: () => h(L),
|
|
3560
3559
|
onMouseEnter: () => _(L),
|
|
3561
3560
|
onMouseLeave: () => _(void 0),
|
|
3562
|
-
children: /* @__PURE__ */ t("span", { className:
|
|
3561
|
+
children: /* @__PURE__ */ t("span", { className: H.ratingIconWrap, "aria-hidden": !0, children: /* @__PURE__ */ t(zr, { color: y, selected: T }) })
|
|
3563
3562
|
},
|
|
3564
3563
|
L
|
|
3565
3564
|
);
|
|
@@ -3572,8 +3571,8 @@ const ti = [
|
|
|
3572
3571
|
disabled: s === void 0 || l,
|
|
3573
3572
|
"aria-label": m,
|
|
3574
3573
|
className: P(
|
|
3575
|
-
|
|
3576
|
-
s !== void 0 && !l &&
|
|
3574
|
+
H.submitButton,
|
|
3575
|
+
s !== void 0 && !l && H["is-active"]
|
|
3577
3576
|
),
|
|
3578
3577
|
children: l ? "..." : m
|
|
3579
3578
|
}
|
|
@@ -4039,7 +4038,7 @@ const Wi = ({ tools: e, onSeeToolDetails: n }) => e.length ? /* @__PURE__ */ f("
|
|
|
4039
4038
|
`${a.tool_name}-${o}`
|
|
4040
4039
|
))
|
|
4041
4040
|
] }) : null, zi = "retrieve_knowledge", Fi = "transfer_to_";
|
|
4042
|
-
function
|
|
4041
|
+
function Ui(e, n = !1) {
|
|
4043
4042
|
const a = {
|
|
4044
4043
|
retrieveKnowledgeTools: [],
|
|
4045
4044
|
otherTools: [],
|
|
@@ -4056,7 +4055,7 @@ function Hi(e, n = !1) {
|
|
|
4056
4055
|
}
|
|
4057
4056
|
return a;
|
|
4058
4057
|
}
|
|
4059
|
-
const
|
|
4058
|
+
const Hi = ({
|
|
4060
4059
|
tools_executed: e,
|
|
4061
4060
|
input_guardrails_triggered: n,
|
|
4062
4061
|
output_guardrails_triggered: a,
|
|
@@ -4066,7 +4065,7 @@ const Ui = ({
|
|
|
4066
4065
|
previewUtils: r
|
|
4067
4066
|
}) => {
|
|
4068
4067
|
const { otherTools: l, allSourcesIds: h, allChunksIds: _, query: d } = ce(
|
|
4069
|
-
() =>
|
|
4068
|
+
() => Ui(e),
|
|
4070
4069
|
[e]
|
|
4071
4070
|
), {
|
|
4072
4071
|
sources: u,
|
|
@@ -4143,7 +4142,7 @@ const Ui = ({
|
|
|
4143
4142
|
e.flow_node_content_id
|
|
4144
4143
|
] })
|
|
4145
4144
|
] }),
|
|
4146
|
-
component:
|
|
4145
|
+
component: Hi,
|
|
4147
4146
|
icon: /* @__PURE__ */ t(Qt, {}),
|
|
4148
4147
|
collapsible: !0
|
|
4149
4148
|
});
|
|
@@ -4910,7 +4909,7 @@ const Nl = ({
|
|
|
4910
4909
|
return /* @__PURE__ */ t(ii, { ...l, text: r.data.text }, d);
|
|
4911
4910
|
if (r.isAudio())
|
|
4912
4911
|
return /* @__PURE__ */ t(
|
|
4913
|
-
|
|
4912
|
+
Ut,
|
|
4914
4913
|
{
|
|
4915
4914
|
...l,
|
|
4916
4915
|
src: r.data.attachment_url ?? r.data.attachment_content ?? "",
|
|
@@ -5330,7 +5329,7 @@ function zl({
|
|
|
5330
5329
|
trigger: /* @__PURE__ */ t(Pt, { "aria-label": "Open menu" }),
|
|
5331
5330
|
placement: "bottom right",
|
|
5332
5331
|
children: ({ close: v }) => /* @__PURE__ */ f(on, { children: [
|
|
5333
|
-
/* @__PURE__ */ t(
|
|
5332
|
+
/* @__PURE__ */ t(Ho, { onClose: v }),
|
|
5334
5333
|
/* @__PURE__ */ t(Fo, { onClose: v }),
|
|
5335
5334
|
/* @__PURE__ */ t(Xo, {}),
|
|
5336
5335
|
/* @__PURE__ */ t(Zo, { onClose: v })
|
|
@@ -5397,51 +5396,52 @@ const ec = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
5397
5396
|
WebchatApp: Fl
|
|
5398
5397
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5399
5398
|
export {
|
|
5400
|
-
|
|
5399
|
+
Oe as A,
|
|
5401
5400
|
xn as B,
|
|
5402
5401
|
Do as C,
|
|
5403
5402
|
Nn as D,
|
|
5404
|
-
|
|
5405
|
-
|
|
5406
|
-
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
-
|
|
5411
|
-
|
|
5403
|
+
ho as E,
|
|
5404
|
+
Xr as F,
|
|
5405
|
+
So as G,
|
|
5406
|
+
q as H,
|
|
5407
|
+
xo as I,
|
|
5408
|
+
Tn as J,
|
|
5409
|
+
Ga as K,
|
|
5410
|
+
Al as L,
|
|
5412
5411
|
it as M,
|
|
5413
|
-
|
|
5412
|
+
yn as N,
|
|
5414
5413
|
yo as O,
|
|
5415
5414
|
yl as P,
|
|
5416
|
-
|
|
5415
|
+
Ht as Q,
|
|
5417
5416
|
ai as R,
|
|
5418
5417
|
Ll as S,
|
|
5419
5418
|
as as T,
|
|
5419
|
+
ec as U,
|
|
5420
5420
|
Fl as W,
|
|
5421
5421
|
qn as a,
|
|
5422
5422
|
It as b,
|
|
5423
5423
|
jn as c,
|
|
5424
5424
|
Fo as d,
|
|
5425
|
-
|
|
5425
|
+
Ho as e,
|
|
5426
5426
|
Zo as f,
|
|
5427
5427
|
Xo as g,
|
|
5428
|
-
|
|
5429
|
-
|
|
5430
|
-
|
|
5431
|
-
|
|
5432
|
-
|
|
5433
|
-
|
|
5434
|
-
|
|
5435
|
-
|
|
5436
|
-
|
|
5437
|
-
|
|
5438
|
-
|
|
5439
|
-
|
|
5440
|
-
|
|
5441
|
-
|
|
5442
|
-
|
|
5443
|
-
|
|
5444
|
-
|
|
5445
|
-
|
|
5446
|
-
|
|
5428
|
+
bn as h,
|
|
5429
|
+
Pt as i,
|
|
5430
|
+
de as j,
|
|
5431
|
+
st as k,
|
|
5432
|
+
Nl as l,
|
|
5433
|
+
ro as m,
|
|
5434
|
+
Rt as n,
|
|
5435
|
+
Jn as o,
|
|
5436
|
+
fo as p,
|
|
5437
|
+
so as q,
|
|
5438
|
+
Ao as r,
|
|
5439
|
+
Wo as s,
|
|
5440
|
+
Ka as t,
|
|
5441
|
+
Wl as u,
|
|
5442
|
+
Sn as v,
|
|
5443
|
+
Ze as w,
|
|
5444
|
+
Mn as x,
|
|
5445
|
+
xt as y,
|
|
5446
|
+
bo as z
|
|
5447
5447
|
};
|