@2uinc/frontend-component-xpert-chatbot 1.36.0-alpha.21 → 1.36.0-alpha.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/index.min.js +120 -120
- package/package.json +1 -1
package/dist/lib/index.min.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import yt, { createContext as Kr, useState as ce, useCallback as st, useEffect as Ne, useMemo as cn, useRef as
|
1
|
+
import yt, { createContext as Kr, useState as ce, useCallback as st, useEffect as Ne, useMemo as cn, useRef as tt, useContext as se, forwardRef as ws, createElement as Za, useLayoutEffect as O0, memo as I0, Suspense as N0, Fragment as k0, StrictMode as L0 } from "react";
|
2
2
|
import w0, { render as R0 } from "react-dom";
|
3
3
|
var Sr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
4
4
|
function Mt(e) {
|
@@ -245,13 +245,13 @@ function j0() {
|
|
245
245
|
return Ou || (Ou = 1, function(e, t) {
|
246
246
|
var n = 200, r = "__lodash_hash_undefined__", a = 800, i = 16, u = 9007199254740991, s = "[object Arguments]", l = "[object Array]", c = "[object AsyncFunction]", d = "[object Boolean]", f = "[object Date]", p = "[object Error]", h = "[object Function]", g = "[object GeneratorFunction]", m = "[object Map]", y = "[object Number]", E = "[object Null]", P = "[object Object]", M = "[object Proxy]", W = "[object RegExp]", R = "[object Set]", _ = "[object String]", N = "[object Undefined]", V = "[object WeakMap]", H = "[object ArrayBuffer]", te = "[object DataView]", Y = "[object Float32Array]", $ = "[object Float64Array]", L = "[object Int8Array]", I = "[object Int16Array]", w = "[object Int32Array]", B = "[object Uint8Array]", G = "[object Uint8ClampedArray]", j = "[object Uint16Array]", q = "[object Uint32Array]", b = /[\\^$.*+?()[\]{}|]/g, ne = /^\[object .+?Constructor\]$/, le = /^(?:0|[1-9]\d*)$/, x = {};
|
247
247
|
x[Y] = x[$] = x[L] = x[I] = x[w] = x[B] = x[G] = x[j] = x[q] = !0, x[s] = x[l] = x[H] = x[d] = x[te] = x[f] = x[p] = x[h] = x[m] = x[y] = x[P] = x[W] = x[R] = x[_] = x[V] = !1;
|
248
|
-
var
|
248
|
+
var oe = typeof Sr == "object" && Sr && Sr.Object === Object && Sr, ye = typeof self == "object" && self && self.Object === Object && self, me = oe || ye || Function("return this")(), Ae = t && !t.nodeType && t, xe = Ae && !0 && e && !e.nodeType && e, je = xe && xe.exports === Ae, ve = je && oe.process, Ze = function() {
|
249
249
|
try {
|
250
250
|
var A = xe && xe.require && xe.require("util").types;
|
251
251
|
return A || ve && ve.binding && ve.binding("util");
|
252
252
|
} catch {
|
253
253
|
}
|
254
|
-
}(), ft =
|
254
|
+
}(), ft = Ze && Ze.isTypedArray;
|
255
255
|
function It(A, k, U) {
|
256
256
|
switch (U.length) {
|
257
257
|
case 0:
|
@@ -290,7 +290,7 @@ function j0() {
|
|
290
290
|
"^" + Ht.call(ie).replace(b, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
291
291
|
), X = je ? me.Buffer : void 0, re = me.Symbol, ue = me.Uint8Array;
|
292
292
|
X && X.allocUnsafe;
|
293
|
-
var pe = Tn(Object.getPrototypeOf, Object), Re = Object.create, Xe = Nt.propertyIsEnumerable, ke = en.splice,
|
293
|
+
var pe = Tn(Object.getPrototypeOf, Object), Re = Object.create, Xe = Nt.propertyIsEnumerable, ke = en.splice, Je = re ? re.toStringTag : void 0, it = function() {
|
294
294
|
try {
|
295
295
|
var A = ca(Object, "defineProperty");
|
296
296
|
return A({}, "", {}), A;
|
@@ -459,7 +459,7 @@ function j0() {
|
|
459
459
|
}
|
460
460
|
var Kd = l0();
|
461
461
|
function _r(A) {
|
462
|
-
return A == null ? A === void 0 ? N : E :
|
462
|
+
return A == null ? A === void 0 ? N : E : Je && Je in Object(A) ? c0(A) : g0(A);
|
463
463
|
}
|
464
464
|
function du(A) {
|
465
465
|
return qn(A) && _r(A) == s;
|
@@ -570,14 +570,14 @@ function j0() {
|
|
570
570
|
return Qd(U) ? U : void 0;
|
571
571
|
}
|
572
572
|
function c0(A) {
|
573
|
-
var k = ie.call(A,
|
573
|
+
var k = ie.call(A, Je), U = A[Je];
|
574
574
|
try {
|
575
|
-
A[
|
575
|
+
A[Je] = void 0;
|
576
576
|
var ae = !0;
|
577
577
|
} catch {
|
578
578
|
}
|
579
579
|
var Te = Se.call(A);
|
580
|
-
return ae && (k ? A[
|
580
|
+
return ae && (k ? A[Je] = U : delete A[Je]), Te;
|
581
581
|
}
|
582
582
|
function d0(A) {
|
583
583
|
return typeof A.constructor == "function" && !pu(A) ? kt(pe(A)) : {};
|
@@ -1618,7 +1618,7 @@ const Zt = Kr({}), Ie = {
|
|
1618
1618
|
onFeedbackSelection: n,
|
1619
1619
|
onMessageSent: r
|
1620
1620
|
}) => {
|
1621
|
-
const a =
|
1621
|
+
const a = tt(null), { id: i } = se(Ye), [u, s] = ce(null), [l, c] = ce(!1), [d, f] = ce([]), p = st(() => {
|
1622
1622
|
s(null), c(!1), f([]), lt.remove(`${i}-conversation-history-id`);
|
1623
1623
|
}, [i, s]), g = {
|
1624
1624
|
contentRef: a,
|
@@ -1654,7 +1654,7 @@ const Iu = 991, Z0 = () => {
|
|
1654
1654
|
}, vt = {
|
1655
1655
|
LIVECHAT: "LIVECHAT",
|
1656
1656
|
XPERT: "XPERT"
|
1657
|
-
},
|
1657
|
+
}, nt = Kr({}), Us = ({
|
1658
1658
|
children: e,
|
1659
1659
|
externalLoading: t = !1,
|
1660
1660
|
externalStreaming: n = !1
|
@@ -1676,7 +1676,7 @@ const Iu = 991, Z0 = () => {
|
|
1676
1676
|
setStreaming: g,
|
1677
1677
|
setMode: y
|
1678
1678
|
};
|
1679
|
-
return /* @__PURE__ */ S.jsx(
|
1679
|
+
return /* @__PURE__ */ S.jsx(nt.Provider, { value: P, children: e });
|
1680
1680
|
};
|
1681
1681
|
Us.propTypes = {
|
1682
1682
|
children: v.element.isRequired,
|
@@ -1732,7 +1732,7 @@ function vi({
|
|
1732
1732
|
children: a,
|
1733
1733
|
...i
|
1734
1734
|
}) {
|
1735
|
-
const { isMobile: u } =
|
1735
|
+
const { isMobile: u } = se(nt);
|
1736
1736
|
return /* @__PURE__ */ S.jsx(
|
1737
1737
|
"button",
|
1738
1738
|
{
|
@@ -1766,9 +1766,9 @@ eyes follow your mouse when you hover near it.`, qs = ({
|
|
1766
1766
|
handleFloatingActionButtonClick: e = null
|
1767
1767
|
}) => {
|
1768
1768
|
var h, g, m, y;
|
1769
|
-
const { id: t, launchButton: n } =
|
1769
|
+
const { id: t, launchButton: n } = se(Ye), { isMobile: r } = se(nt), a = !lt.get(
|
1770
1770
|
`${t}-proactive-message-xpert-chatbot`
|
1771
|
-
), i =
|
1771
|
+
), i = tt(null), u = tt(!1), s = a ? (h = n == null ? void 0 : n.animatedGraduate) == null ? void 0 : h.delayMs : ((g = n == null ? void 0 : n.animatedGraduate) == null ? void 0 : g.delayMs) * 2, [l, c] = ce(!1), d = window.matchMedia(
|
1772
1772
|
`(max-width: ${tf}px)`
|
1773
1773
|
).matches;
|
1774
1774
|
Ne(() => {
|
@@ -1975,7 +1975,7 @@ const rf = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20hei
|
|
1975
1975
|
handleFloatingActionButtonClick: e = null
|
1976
1976
|
}) => {
|
1977
1977
|
var r, a;
|
1978
|
-
const { launchButton: t } =
|
1978
|
+
const { launchButton: t } = se(Ye), { isMobile: n } = se(nt);
|
1979
1979
|
return /* @__PURE__ */ S.jsx(
|
1980
1980
|
vi,
|
1981
1981
|
{
|
@@ -2440,12 +2440,12 @@ var Ru = {
|
|
2440
2440
|
* @returns {HTMLElement|undefined} The next tabbable node, if any.
|
2441
2441
|
*/
|
2442
2442
|
nextTabbableNode: function(le) {
|
2443
|
-
var x = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0,
|
2444
|
-
return
|
2443
|
+
var x = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, oe = I.indexOf(le);
|
2444
|
+
return oe < 0 ? x ? w.slice(w.indexOf(le) + 1).find(function(ye) {
|
2445
2445
|
return sn(ye);
|
2446
2446
|
}) : w.slice(0, w.indexOf(le)).reverse().find(function(ye) {
|
2447
2447
|
return sn(ye);
|
2448
|
-
}) : I[
|
2448
|
+
}) : I[oe + (x ? 1 : -1)];
|
2449
2449
|
}
|
2450
2450
|
};
|
2451
2451
|
}), u.tabbableGroups = u.containerGroups.filter(function(L) {
|
@@ -2493,12 +2493,12 @@ var Ru = {
|
|
2493
2493
|
j = Kt(I) >= 0 ? x.lastTabbableNode : x.lastDomTabbableNode;
|
2494
2494
|
} else tr(w) || (j = b.nextTabbableNode(I, !1));
|
2495
2495
|
} else {
|
2496
|
-
var
|
2496
|
+
var oe = u.tabbableGroups.findIndex(function(Ae) {
|
2497
2497
|
var xe = Ae.lastTabbableNode;
|
2498
2498
|
return I === xe;
|
2499
2499
|
});
|
2500
|
-
if (
|
2501
|
-
var ye =
|
2500
|
+
if (oe < 0 && (b.container === I || Rr(I, i.tabbableOptions) && !sn(I, i.tabbableOptions) && !b.nextTabbableNode(I)) && (oe = q), oe >= 0) {
|
2501
|
+
var ye = oe === u.tabbableGroups.length - 1 ? 0 : oe + 1, me = u.tabbableGroups[ye];
|
2502
2502
|
j = Kt(I) >= 0 ? me.firstTabbableNode : me.firstDomTabbableNode;
|
2503
2503
|
} else tr(w) || (j = b.nextTabbableNode(I));
|
2504
2504
|
}
|
@@ -3003,7 +3003,7 @@ function Js({
|
|
3003
3003
|
isMounted: n = !1,
|
3004
3004
|
style: r = {}
|
3005
3005
|
}) {
|
3006
|
-
const { isMobile: a, isNormalSize: i } =
|
3006
|
+
const { isMobile: a, isNormalSize: i } = se(nt), u = tt(null);
|
3007
3007
|
return /* @__PURE__ */ S.jsx(
|
3008
3008
|
jf,
|
3009
3009
|
{
|
@@ -3044,7 +3044,7 @@ Js.propTypes = {
|
|
3044
3044
|
className: v.string
|
3045
3045
|
};
|
3046
3046
|
function el({ children: e, isMounted: t }) {
|
3047
|
-
const { widgetMode: n } =
|
3047
|
+
const { widgetMode: n } = se(Ye);
|
3048
3048
|
return n ? /* @__PURE__ */ S.jsx(Js, { isMounted: t, children: e }) : /* @__PURE__ */ S.jsx("div", { className: "xpert_chatbot_inline", children: e });
|
3049
3049
|
}
|
3050
3050
|
el.propTypes = {
|
@@ -3052,7 +3052,7 @@ el.propTypes = {
|
|
3052
3052
|
isMounted: v.bool
|
3053
3053
|
};
|
3054
3054
|
const tl = () => {
|
3055
|
-
const { disclaimer: e } =
|
3055
|
+
const { disclaimer: e } = se(Ye), t = tt(null);
|
3056
3056
|
return Ne(() => {
|
3057
3057
|
var n;
|
3058
3058
|
(n = t == null ? void 0 : t.current) == null || n.focus();
|
@@ -4294,7 +4294,7 @@ function Li({
|
|
4294
4294
|
handleChange: a
|
4295
4295
|
}) {
|
4296
4296
|
var M;
|
4297
|
-
const i =
|
4297
|
+
const i = tt(!1), { conversationScreen: u, primaryColor: s } = se(Ye), { hasError: l, hasNewMessage: c, loading: d, streaming: f } = se(nt), [p, h] = ce(""), g = st(
|
4298
4298
|
(W) => {
|
4299
4299
|
W.preventDefault(), h(W.target.value), a && a(W);
|
4300
4300
|
},
|
@@ -4376,7 +4376,7 @@ Li.propTypes = {
|
|
4376
4376
|
handleChange: v.func
|
4377
4377
|
};
|
4378
4378
|
const ui = ({ content: e = "Please try again later." }) => {
|
4379
|
-
const t =
|
4379
|
+
const t = tt(null);
|
4380
4380
|
return Ne(() => {
|
4381
4381
|
var n;
|
4382
4382
|
(n = t.current) == null || n.scrollIntoView({
|
@@ -6345,16 +6345,16 @@ function y1(e, t, n) {
|
|
6345
6345
|
return x === 45 ? (e.consume(x), r.interrupt ? t : b) : n(x);
|
6346
6346
|
}
|
6347
6347
|
function g(x) {
|
6348
|
-
const
|
6349
|
-
return x ===
|
6348
|
+
const oe = "CDATA[";
|
6349
|
+
return x === oe.charCodeAt(s++) ? (e.consume(x), s === oe.length ? r.interrupt ? t : $ : g) : n(x);
|
6350
6350
|
}
|
6351
6351
|
function m(x) {
|
6352
6352
|
return Rt(x) ? (e.consume(x), u = String.fromCharCode(x), y) : n(x);
|
6353
6353
|
}
|
6354
6354
|
function y(x) {
|
6355
6355
|
if (x === null || x === 47 || x === 62 || _t(x)) {
|
6356
|
-
const
|
6357
|
-
return !
|
6356
|
+
const oe = x === 47, ye = u.toLowerCase();
|
6357
|
+
return !oe && !i && bo.includes(ye) ? (a = 1, r.interrupt ? t(x) : $(x)) : m1.includes(u.toLowerCase()) ? (a = 6, oe ? (e.consume(x), E) : r.interrupt ? t(x) : $(x)) : (a = 7, r.interrupt && !r.parser.lazy[r.now().line] ? n(x) : i ? P(x) : M(x));
|
6358
6358
|
}
|
6359
6359
|
return x === 45 || xt(x) ? (e.consume(x), u += String.fromCharCode(x), y) : n(x);
|
6360
6360
|
}
|
@@ -6419,8 +6419,8 @@ function y1(e, t, n) {
|
|
6419
6419
|
}
|
6420
6420
|
function j(x) {
|
6421
6421
|
if (x === 62) {
|
6422
|
-
const
|
6423
|
-
return bo.includes(
|
6422
|
+
const oe = u.toLowerCase();
|
6423
|
+
return bo.includes(oe) ? (e.consume(x), ne) : $(x);
|
6424
6424
|
}
|
6425
6425
|
return Rt(x) && u.length < 8 ? (e.consume(x), u += String.fromCharCode(x), j) : $(x);
|
6426
6426
|
}
|
@@ -7189,13 +7189,13 @@ function tm(e, t, n) {
|
|
7189
7189
|
function ne(me) {
|
7190
7190
|
return Ae;
|
7191
7191
|
function Ae(xe) {
|
7192
|
-
const je = xe !== null && me[xe], ve = xe !== null && me.null,
|
7192
|
+
const je = xe !== null && me[xe], ve = xe !== null && me.null, Ze = [
|
7193
7193
|
// To do: add more extension tests.
|
7194
7194
|
/* c8 ignore next 2 */
|
7195
7195
|
...Array.isArray(je) ? je : je ? [je] : [],
|
7196
7196
|
...Array.isArray(ve) ? ve : ve ? [ve] : []
|
7197
7197
|
];
|
7198
|
-
return le(
|
7198
|
+
return le(Ze)(xe);
|
7199
7199
|
}
|
7200
7200
|
}
|
7201
7201
|
function le(me) {
|
@@ -7210,12 +7210,12 @@ function tm(e, t, n) {
|
|
7210
7210
|
// This allows a “live binding”, which is needed for `interrupt`.
|
7211
7211
|
$ ? Object.assign(Object.create(c), $) : c,
|
7212
7212
|
l,
|
7213
|
-
|
7213
|
+
oe,
|
7214
7214
|
ye
|
7215
7215
|
)(xe);
|
7216
7216
|
}
|
7217
7217
|
}
|
7218
|
-
function
|
7218
|
+
function oe(me) {
|
7219
7219
|
return Y(q, b), w;
|
7220
7220
|
}
|
7221
7221
|
function ye(me) {
|
@@ -7481,7 +7481,7 @@ function _m(e) {
|
|
7481
7481
|
autolinkProtocol: Y,
|
7482
7482
|
autolinkEmail: Y,
|
7483
7483
|
atxHeading: s(Jt),
|
7484
|
-
blockQuote: s(
|
7484
|
+
blockQuote: s(Ze),
|
7485
7485
|
characterEscape: Y,
|
7486
7486
|
characterReference: Y,
|
7487
7487
|
codeFenced: s(ft),
|
@@ -7562,7 +7562,7 @@ function _m(e) {
|
|
7562
7562
|
referenceString: me,
|
7563
7563
|
resourceDestinationString: le,
|
7564
7564
|
resourceTitleString: x,
|
7565
|
-
resource:
|
7565
|
+
resource: oe,
|
7566
7566
|
setextHeading: d(te),
|
7567
7567
|
setextHeadingLineSequence: H,
|
7568
7568
|
setextHeadingText: V,
|
@@ -7634,10 +7634,10 @@ function _m(e) {
|
|
7634
7634
|
return X;
|
7635
7635
|
}
|
7636
7636
|
function a(F, X, re) {
|
7637
|
-
let ue = X - 1, pe = -1, Re = !1, Xe, ke,
|
7637
|
+
let ue = X - 1, pe = -1, Re = !1, Xe, ke, Je, it;
|
7638
7638
|
for (; ++ue <= re; ) {
|
7639
7639
|
const Oe = F[ue];
|
7640
|
-
if (Oe[1].type === "listUnordered" || Oe[1].type === "listOrdered" || Oe[1].type === "blockQuote" ? (Oe[0] === "enter" ? pe++ : pe--, it = void 0) : Oe[1].type === "lineEndingBlank" ? Oe[0] === "enter" && (Xe && !it && !pe && !
|
7640
|
+
if (Oe[1].type === "listUnordered" || Oe[1].type === "listOrdered" || Oe[1].type === "blockQuote" ? (Oe[0] === "enter" ? pe++ : pe--, it = void 0) : Oe[1].type === "lineEndingBlank" ? Oe[0] === "enter" && (Xe && !it && !pe && !Je && (Je = ue), it = void 0) : Oe[1].type === "linePrefix" || Oe[1].type === "listItemValue" || Oe[1].type === "listItemMarker" || Oe[1].type === "listItemPrefix" || Oe[1].type === "listItemPrefixWhitespace" || (it = void 0), !pe && Oe[0] === "enter" && Oe[1].type === "listItemPrefix" || pe === -1 && Oe[0] === "exit" && (Oe[1].type === "listUnordered" || Oe[1].type === "listOrdered")) {
|
7641
7641
|
if (Xe) {
|
7642
7642
|
let rt = ue;
|
7643
7643
|
for (ke = void 0; rt--; ) {
|
@@ -7647,7 +7647,7 @@ function _m(e) {
|
|
7647
7647
|
ke && (F[ke][1].type = "lineEndingBlank", Re = !0), ze[1].type = "lineEnding", ke = rt;
|
7648
7648
|
} else if (!(ze[1].type === "linePrefix" || ze[1].type === "blockQuotePrefix" || ze[1].type === "blockQuotePrefixWhitespace" || ze[1].type === "blockQuoteMarker" || ze[1].type === "listItemIndent")) break;
|
7649
7649
|
}
|
7650
|
-
|
7650
|
+
Je && (!ke || Je < ke) && (Xe._spread = !0), Xe.end = Object.assign(
|
7651
7651
|
{},
|
7652
7652
|
ke ? F[ke][1].start : Oe[1].end
|
7653
7653
|
), F.splice(ke || ue, 0, ["exit", Xe, Oe[2]]), ue++, re++;
|
@@ -7658,7 +7658,7 @@ function _m(e) {
|
|
7658
7658
|
start: Object.assign({}, Oe[1].start),
|
7659
7659
|
// @ts-expect-error: we’ll add `end` in a second.
|
7660
7660
|
end: void 0
|
7661
|
-
}, F.splice(ue, 0, ["enter", Xe, Oe[2]]), ue++, re++,
|
7661
|
+
}, F.splice(ue, 0, ["enter", Xe, Oe[2]]), ue++, re++, Je = void 0, it = !0);
|
7662
7662
|
}
|
7663
7663
|
}
|
7664
7664
|
return F[X][1]._spread = Re, re;
|
@@ -7839,7 +7839,7 @@ function _m(e) {
|
|
7839
7839
|
const F = this.resume(), X = this.stack[this.stack.length - 1];
|
7840
7840
|
X.title = F;
|
7841
7841
|
}
|
7842
|
-
function
|
7842
|
+
function oe() {
|
7843
7843
|
i("inReference");
|
7844
7844
|
}
|
7845
7845
|
function ye() {
|
@@ -7874,7 +7874,7 @@ function _m(e) {
|
|
7874
7874
|
const X = this.stack[this.stack.length - 1];
|
7875
7875
|
X.url = "mailto:" + this.sliceSerialize(F);
|
7876
7876
|
}
|
7877
|
-
function
|
7877
|
+
function Ze() {
|
7878
7878
|
return {
|
7879
7879
|
type: "blockquote",
|
7880
7880
|
children: []
|
@@ -19413,19 +19413,19 @@ function DT() {
|
|
19413
19413
|
return this.$d.getTime();
|
19414
19414
|
}, w.startOf = function(B, G) {
|
19415
19415
|
var j = this, q = !!Y.u(G) || G, b = Y.p(B), ne = function(je, ve) {
|
19416
|
-
var
|
19417
|
-
return q ?
|
19416
|
+
var Ze = Y.w(j.$u ? Date.UTC(j.$y, ve, je) : new Date(j.$y, ve, je), j);
|
19417
|
+
return q ? Ze : Ze.endOf(c);
|
19418
19418
|
}, le = function(je, ve) {
|
19419
19419
|
return Y.w(j.toDate()[je].apply(j.toDate("s"), (q ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ve)), j);
|
19420
|
-
}, x = this.$W,
|
19420
|
+
}, x = this.$W, oe = this.$M, ye = this.$D, me = "set" + (this.$u ? "UTC" : "");
|
19421
19421
|
switch (b) {
|
19422
19422
|
case h:
|
19423
19423
|
return q ? ne(1, 0) : ne(31, 11);
|
19424
19424
|
case f:
|
19425
|
-
return q ? ne(1,
|
19425
|
+
return q ? ne(1, oe) : ne(0, oe + 1);
|
19426
19426
|
case d:
|
19427
19427
|
var Ae = this.$locale().weekStart || 0, xe = (x < Ae ? x + 7 : x) - Ae;
|
19428
|
-
return ne(q ? ye - xe : ye + (6 - xe),
|
19428
|
+
return ne(q ? ye - xe : ye + (6 - xe), oe);
|
19429
19429
|
case c:
|
19430
19430
|
case g:
|
19431
19431
|
return le(me + "Hours", 0);
|
@@ -19454,9 +19454,9 @@ function DT() {
|
|
19454
19454
|
}, w.add = function(B, G) {
|
19455
19455
|
var j, q = this;
|
19456
19456
|
B = Number(B);
|
19457
|
-
var b = Y.p(G), ne = function(
|
19457
|
+
var b = Y.p(G), ne = function(oe) {
|
19458
19458
|
var ye = te(q);
|
19459
|
-
return Y.w(ye.date(ye.date() + Math.round(
|
19459
|
+
return Y.w(ye.date(ye.date() + Math.round(oe * B)), q);
|
19460
19460
|
};
|
19461
19461
|
if (b === f) return this.set(f, this.$M + B);
|
19462
19462
|
if (b === h) return this.set(h, this.$y + B);
|
@@ -19469,16 +19469,16 @@ function DT() {
|
|
19469
19469
|
}, w.format = function(B) {
|
19470
19470
|
var G = this, j = this.$locale();
|
19471
19471
|
if (!this.isValid()) return j.invalidDate || m;
|
19472
|
-
var q = B || "YYYY-MM-DDTHH:mm:ssZ", b = Y.z(this), ne = this.$H, le = this.$m, x = this.$M,
|
19473
|
-
return ve && (ve[
|
19472
|
+
var q = B || "YYYY-MM-DDTHH:mm:ssZ", b = Y.z(this), ne = this.$H, le = this.$m, x = this.$M, oe = j.weekdays, ye = j.months, me = j.meridiem, Ae = function(ve, Ze, ft, It) {
|
19473
|
+
return ve && (ve[Ze] || ve(G, q)) || ft[Ze].slice(0, It);
|
19474
19474
|
}, xe = function(ve) {
|
19475
19475
|
return Y.s(ne % 12 || 12, ve, "0");
|
19476
|
-
}, je = me || function(ve,
|
19476
|
+
}, je = me || function(ve, Ze, ft) {
|
19477
19477
|
var It = ve < 12 ? "AM" : "PM";
|
19478
19478
|
return ft ? It.toLowerCase() : It;
|
19479
19479
|
};
|
19480
|
-
return q.replace(E, function(ve,
|
19481
|
-
return
|
19480
|
+
return q.replace(E, function(ve, Ze) {
|
19481
|
+
return Ze || function(ft) {
|
19482
19482
|
switch (ft) {
|
19483
19483
|
case "YY":
|
19484
19484
|
return String(G.$y).slice(-2);
|
@@ -19499,11 +19499,11 @@ function DT() {
|
|
19499
19499
|
case "d":
|
19500
19500
|
return String(G.$W);
|
19501
19501
|
case "dd":
|
19502
|
-
return Ae(j.weekdaysMin, G.$W,
|
19502
|
+
return Ae(j.weekdaysMin, G.$W, oe, 2);
|
19503
19503
|
case "ddd":
|
19504
|
-
return Ae(j.weekdaysShort, G.$W,
|
19504
|
+
return Ae(j.weekdaysShort, G.$W, oe, 3);
|
19505
19505
|
case "dddd":
|
19506
|
-
return
|
19506
|
+
return oe[G.$W];
|
19507
19507
|
case "H":
|
19508
19508
|
return String(ne);
|
19509
19509
|
case "HH":
|
@@ -19535,7 +19535,7 @@ function DT() {
|
|
19535
19535
|
}, w.utcOffset = function() {
|
19536
19536
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
19537
19537
|
}, w.diff = function(B, G, j) {
|
19538
|
-
var q, b = this, ne = Y.p(G), le = te(B), x = (le.utcOffset() - this.utcOffset()) * r,
|
19538
|
+
var q, b = this, ne = Y.p(G), le = te(B), x = (le.utcOffset() - this.utcOffset()) * r, oe = this - le, ye = function() {
|
19539
19539
|
return Y.m(b, le);
|
19540
19540
|
};
|
19541
19541
|
switch (ne) {
|
@@ -19549,22 +19549,22 @@ function DT() {
|
|
19549
19549
|
q = ye() / 3;
|
19550
19550
|
break;
|
19551
19551
|
case d:
|
19552
|
-
q = (
|
19552
|
+
q = (oe - x) / 6048e5;
|
19553
19553
|
break;
|
19554
19554
|
case c:
|
19555
|
-
q = (
|
19555
|
+
q = (oe - x) / 864e5;
|
19556
19556
|
break;
|
19557
19557
|
case l:
|
19558
|
-
q =
|
19558
|
+
q = oe / a;
|
19559
19559
|
break;
|
19560
19560
|
case s:
|
19561
|
-
q =
|
19561
|
+
q = oe / r;
|
19562
19562
|
break;
|
19563
19563
|
case u:
|
19564
|
-
q =
|
19564
|
+
q = oe / n;
|
19565
19565
|
break;
|
19566
19566
|
default:
|
19567
|
-
q =
|
19567
|
+
q = oe;
|
19568
19568
|
}
|
19569
19569
|
return j ? q : Y.a(q);
|
19570
19570
|
}, w.daysInMonth = function() {
|
@@ -19655,7 +19655,7 @@ function tu({
|
|
19655
19655
|
userTrackingName: s = "clicked"
|
19656
19656
|
}) {
|
19657
19657
|
var E, P, M, W;
|
19658
|
-
const [l, c] = ce(!0), { primaryColor: d, id: f, userTracking: p, conversationScreen: h } =
|
19658
|
+
const [l, c] = ce(!0), { primaryColor: d, id: f, userTracking: p, conversationScreen: h } = se(Ye), g = st(
|
19659
19659
|
(R) => {
|
19660
19660
|
var _, N, V, H;
|
19661
19661
|
((_ = R == null ? void 0 : R.data) == null ? void 0 : _.who) === "customer" && (!(window != null && window.OnetrustActiveGroups) || (N = window == null ? void 0 : window.OnetrustActiveGroups) != null && N.includes("C0003")) && lt.set(`${f}-live-chat-open`, 1, {
|
@@ -19750,7 +19750,7 @@ tu.propTypes = {
|
|
19750
19750
|
userTrackingName: v.string
|
19751
19751
|
};
|
19752
19752
|
const id = ({ children: e, id: t, link: n }) => {
|
19753
|
-
const { contentRef: r } =
|
19753
|
+
const { contentRef: r } = se(Zt), [a, i] = ce(!1), u = tt(null), s = st(() => i(!0), []), l = st(() => i(!1), []), c = st(() => i(!0), []), d = st(() => i(!1), []), f = st(
|
19754
19754
|
(p) => {
|
19755
19755
|
p.key === "Enter" ? window.open(n, "_blank") : p.key === "Escape" && i(!1);
|
19756
19756
|
},
|
@@ -19795,11 +19795,11 @@ id.propTypes = {
|
|
19795
19795
|
children: v.element.isRequired,
|
19796
19796
|
id: v.string.isRequired
|
19797
19797
|
};
|
19798
|
-
const
|
19798
|
+
const et = [];
|
19799
19799
|
for (let e = 0; e < 256; ++e)
|
19800
|
-
|
19800
|
+
et.push((e + 256).toString(16).slice(1));
|
19801
19801
|
function BT(e, t = 0) {
|
19802
|
-
return (
|
19802
|
+
return (et[e[t + 0]] + et[e[t + 1]] + et[e[t + 2]] + et[e[t + 3]] + "-" + et[e[t + 4]] + et[e[t + 5]] + "-" + et[e[t + 6]] + et[e[t + 7]] + "-" + et[e[t + 8]] + et[e[t + 9]] + "-" + et[e[t + 10]] + et[e[t + 11]] + et[e[t + 12]] + et[e[t + 13]] + et[e[t + 14]] + et[e[t + 15]]).toLowerCase();
|
19803
19803
|
}
|
19804
19804
|
let $a;
|
19805
19805
|
const HT = new Uint8Array(16);
|
@@ -19922,23 +19922,23 @@ const zT = () => /* @__PURE__ */ S.jsx(
|
|
19922
19922
|
)
|
19923
19923
|
}
|
19924
19924
|
), od = ({ src: e, alt: t, ...n }) => {
|
19925
|
-
const
|
19925
|
+
const r = tt(null), [a, i] = ce(!1), [u, s] = ce(!1);
|
19926
19926
|
return Ne(() => {
|
19927
|
-
const
|
19928
|
-
if (!
|
19929
|
-
const
|
19930
|
-
([
|
19931
|
-
|
19927
|
+
const l = r.current;
|
19928
|
+
if (!l) return;
|
19929
|
+
const c = new IntersectionObserver(
|
19930
|
+
([d]) => {
|
19931
|
+
i(d.isIntersecting);
|
19932
19932
|
},
|
19933
19933
|
{ threshold: 0.01 }
|
19934
19934
|
);
|
19935
|
-
return
|
19936
|
-
|
19935
|
+
return c.observe(l), () => {
|
19936
|
+
c.disconnect();
|
19937
19937
|
};
|
19938
19938
|
}, []), /* @__PURE__ */ S.jsxs(
|
19939
19939
|
"div",
|
19940
19940
|
{
|
19941
|
-
ref:
|
19941
|
+
ref: r,
|
19942
19942
|
style: {
|
19943
19943
|
position: "relative",
|
19944
19944
|
display: "flex",
|
@@ -19950,15 +19950,15 @@ const zT = () => /* @__PURE__ */ S.jsx(
|
|
19950
19950
|
role: "img",
|
19951
19951
|
"aria-label": t || "Image",
|
19952
19952
|
children: [
|
19953
|
-
|
19954
|
-
|
19953
|
+
u && /* @__PURE__ */ S.jsx(zT, {}),
|
19954
|
+
a && !u && /* @__PURE__ */ S.jsx(
|
19955
19955
|
"img",
|
19956
19956
|
{
|
19957
19957
|
src: e,
|
19958
19958
|
alt: t,
|
19959
19959
|
loading: "lazy",
|
19960
19960
|
onError: () => {
|
19961
|
-
|
19961
|
+
s(!0);
|
19962
19962
|
},
|
19963
19963
|
style: {
|
19964
19964
|
maxWidth: "100%",
|
@@ -20075,7 +20075,7 @@ const WT = (e) => ({
|
|
20075
20075
|
toolCall: l
|
20076
20076
|
}) => {
|
20077
20077
|
var _;
|
20078
|
-
const { primaryColor: c, conversationScreen: d } =
|
20078
|
+
const { primaryColor: c, conversationScreen: d } = se(Ye), {
|
20079
20079
|
content: f,
|
20080
20080
|
disableFeedback: p,
|
20081
20081
|
liveAgent: h,
|
@@ -20224,7 +20224,7 @@ au.propTypes = {
|
|
20224
20224
|
};
|
20225
20225
|
au.displayName = "NotificationMessage";
|
20226
20226
|
function ld({ disableScroll: e }) {
|
20227
|
-
const t =
|
20227
|
+
const t = tt(null);
|
20228
20228
|
return Ne(() => {
|
20229
20229
|
var n;
|
20230
20230
|
e || (n = t.current) == null || n.scrollIntoView({
|
@@ -20259,7 +20259,7 @@ const oa = ({
|
|
20259
20259
|
setLiveChatOpen: i = null,
|
20260
20260
|
submitEvent: u = null
|
20261
20261
|
}) => {
|
20262
|
-
const { disableScroll: s, hasError: l, streaming: c } =
|
20262
|
+
const { disableScroll: s, hasError: l, streaming: c } = se(nt), d = tt(null), f = cn(
|
20263
20263
|
() => n.reduce((p, h) => (h.toolCalls && h.toolCalls.forEach(({ function: g, id: m }) => {
|
20264
20264
|
p[m] = g == null ? void 0 : g.name;
|
20265
20265
|
}), p), {}),
|
@@ -20324,7 +20324,7 @@ oa.propTypes = {
|
|
20324
20324
|
oa.displayName = "ConversationMessages";
|
20325
20325
|
const cd = () => {
|
20326
20326
|
var l, c, d;
|
20327
|
-
const { conversationScreen: e, id: t } =
|
20327
|
+
const { conversationScreen: e, id: t } = se(Ye), n = `${t}-maintenance-banner`, [r, a] = ce(
|
20328
20328
|
lt.get(n) === void 0
|
20329
20329
|
), i = /* @__PURE__ */ new Date(), u = new Date(
|
20330
20330
|
(l = e == null ? void 0 : e.maintenanceBanner) == null ? void 0 : l.endDateTime
|
@@ -20376,7 +20376,7 @@ const cd = () => {
|
|
20376
20376
|
cd.displayName = "MaintenanceBanner";
|
20377
20377
|
const iu = ({ onPromptClick: e }) => {
|
20378
20378
|
var s;
|
20379
|
-
const { primaryColor: t, conversationScreen: n } =
|
20379
|
+
const { primaryColor: t, conversationScreen: n } = se(Ye), { deleteConversationModal: r } = se(Zt), { loading: a, streaming: i } = se(nt), u = a || i;
|
20380
20380
|
return /* @__PURE__ */ S.jsxs("div", { style: { display: "grid", gap: ".75rem" }, children: [
|
20381
20381
|
/* @__PURE__ */ S.jsx("div", { style: { fontWeight: 700, fontSize: "0.75rem" }, children: "Some things I can help you with" }),
|
20382
20382
|
(s = n == null ? void 0 : n.prompts) == null ? void 0 : s.map((l) => {
|
@@ -20407,7 +20407,7 @@ iu.propTypes = {
|
|
20407
20407
|
};
|
20408
20408
|
iu.displayName = "PromptList";
|
20409
20409
|
const dd = ({ chatContentRef: e, messages: t }) => {
|
20410
|
-
const { loading: n, streaming: r } =
|
20410
|
+
const { loading: n, streaming: r } = se(nt), [a, i] = ce(!1), u = tt(null), s = st(() => {
|
20411
20411
|
if (!e.current) return;
|
20412
20412
|
const { scrollTop: c, scrollHeight: d, clientHeight: f } = e.current, p = c + f >= d - 10;
|
20413
20413
|
i(!p);
|
@@ -20452,7 +20452,7 @@ function fd({
|
|
20452
20452
|
submitEvent: u = null
|
20453
20453
|
}) {
|
20454
20454
|
var y, E;
|
20455
|
-
const { conversationScreen: s, disclaimer: l } =
|
20455
|
+
const { conversationScreen: s, disclaimer: l } = se(Ye), { deleteConversationModal: c, xpertMessages: d } = se(Zt), { loading: f, setMode: p, mode: h } = se(nt), g = tt(null), m = (P) => {
|
20456
20456
|
s.liveChat.useOwnChat ? p(vt.LIVECHAT) : i(P);
|
20457
20457
|
};
|
20458
20458
|
return /* @__PURE__ */ S.jsxs(S.Fragment, { children: [
|
@@ -21152,7 +21152,7 @@ function cu() {
|
|
21152
21152
|
if (p !== null && g === !0) {
|
21153
21153
|
var q, b = !1, ne = !0, le = function() {
|
21154
21154
|
return t(void 0, void 0, void 0, function() {
|
21155
|
-
var x,
|
21155
|
+
var x, oe, ye;
|
21156
21156
|
return n(this, function(me) {
|
21157
21157
|
switch (me.label) {
|
21158
21158
|
case 0:
|
@@ -21165,7 +21165,7 @@ function cu() {
|
|
21165
21165
|
}), [
|
21166
21166
|
2
|
21167
21167
|
/*return*/
|
21168
|
-
]) : (
|
21168
|
+
]) : (oe = function(Ae) {
|
21169
21169
|
b || (0, i.flushSync)(function() {
|
21170
21170
|
return E(Ae);
|
21171
21171
|
});
|
@@ -21176,7 +21176,7 @@ function cu() {
|
|
21176
21176
|
return e(e({}, xe), _.current && (je = {}, je[_.current] = Ae, je));
|
21177
21177
|
});
|
21178
21178
|
});
|
21179
|
-
}, ne && (q = (0, s.createOrJoinSocket)(N, _.current, ye, L,
|
21179
|
+
}, ne && (q = (0, s.createOrJoinSocket)(N, _.current, ye, L, oe, V, H, te, B)), [
|
21180
21180
|
2
|
21181
21181
|
/*return*/
|
21182
21182
|
]);
|
@@ -21190,8 +21190,8 @@ function cu() {
|
|
21190
21190
|
b = !0, ne = !1, $.current && ($.current = null), q == null || q(), E(null);
|
21191
21191
|
};
|
21192
21192
|
} else (p === null || g === !1) && (H.current = 0, W(function(x) {
|
21193
|
-
var
|
21194
|
-
return e(e({}, x), _.current && (
|
21193
|
+
var oe;
|
21194
|
+
return e(e({}, x), _.current && (oe = {}, oe[_.current] = u.ReadyState.CLOSED, oe));
|
21195
21195
|
}));
|
21196
21196
|
}, [p, g, w, B]), (0, a.useEffect)(function() {
|
21197
21197
|
I === u.ReadyState.OPEN && Y.current.splice(0).forEach(function(q) {
|
@@ -21344,7 +21344,7 @@ const l3 = "This conversation with a live agent has ended. Please note that a tr
|
|
21344
21344
|
CONVERSATION: "CONVERSATION",
|
21345
21345
|
FORM: "FORM"
|
21346
21346
|
}, En = Kr({}), pd = ({ children: e, liveChatPayload: t }) => {
|
21347
|
-
const { conversationScreen: n } =
|
21347
|
+
const { conversationScreen: n } = se(Ye), { pushXpertMessage: r } = se(Zt), { setHasError: a, setMode: i } = se(nt), [u, s] = ce(""), [l, c] = ce(!1), [, d] = ce(""), [f, p] = ce([]), [h, g] = ce(null), [m, y] = ce($t.FORM), [E, P] = ce(null), M = (j) => p((q) => [...q, j]), W = async (j) => {
|
21348
21348
|
const q = await s3(j.data), { conversation_id: b, event_type: ne, body: le } = q;
|
21349
21349
|
switch (ne) {
|
21350
21350
|
case "AGENT_TYPING":
|
@@ -21473,7 +21473,7 @@ pd.propTypes = {
|
|
21473
21473
|
};
|
21474
21474
|
const c3 = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20fill='%23ffffff'%20height='48'%20viewBox='0%20-960%20960%20960'%20width='48'%3e%3cpath%20d='M120-120v-300h60v198l558-558H540v-60h300v300h-60v-198L222-180h198v60H120Z'/%3e%3c/svg%3e", d3 = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20fill='%23ffffff'%20height='48'%20viewBox='0%20-960%20960%20960'%20width='48'%3e%3cpath%20d='M370-287h360v-90H370v90ZM180-120q-24%200-42-18t-18-42v-600q0-24%2018-42t42-18h600q24%200%2042%2018t18%2042v600q0%2024-18%2042t-42%2018H180Zm0-60h600v-600H180v600Zm0-600v600-600Z'/%3e%3c/svg%3e";
|
21475
21475
|
function md({ handleResizeButtonClick: e, setIsMounted: t }) {
|
21476
|
-
const { isMobile: n, isNormalSize: r } =
|
21476
|
+
const { isMobile: n, isNormalSize: r } = se(nt);
|
21477
21477
|
if (n)
|
21478
21478
|
return null;
|
21479
21479
|
const a = `${r ? "Expand" : "Shrink"} Xpert dialog width`;
|
@@ -21512,7 +21512,7 @@ function gd({
|
|
21512
21512
|
isMounted: r
|
21513
21513
|
}) {
|
21514
21514
|
var c;
|
21515
|
-
const { conversationScreen: a } =
|
21515
|
+
const { conversationScreen: a } = se(Ye), { mode: i } = se(nt), { setDeleteConversationModal: u, xpertMessages: s } = se(Zt), l = i === vt.XPERT && ((c = a == null ? void 0 : a.conversationHistory) == null ? void 0 : c.allowDeletion) && !!(s != null && s.length);
|
21516
21516
|
return /* @__PURE__ */ S.jsxs(S.Fragment, { children: [
|
21517
21517
|
l && /* @__PURE__ */ S.jsx(
|
21518
21518
|
"button",
|
@@ -21618,7 +21618,7 @@ function Ed({
|
|
21618
21618
|
onClose: r
|
21619
21619
|
}) {
|
21620
21620
|
var c, d, f, p, h, g, m, y, E, P, M, W, R, _, N;
|
21621
|
-
const { primaryColor: a, conversationScreen: i } =
|
21621
|
+
const { primaryColor: a, conversationScreen: i } = se(Ye), { isMobile: u, mode: s } = se(nt), { step: l } = se(En);
|
21622
21622
|
return Ne(() => {
|
21623
21623
|
const V = document.getElementById("header-mobile");
|
21624
21624
|
return V && (V.style.display = "none"), () => {
|
@@ -21697,7 +21697,7 @@ function f3() {
|
|
21697
21697
|
deleteConversationModal: e,
|
21698
21698
|
deleteConversationHistory: t,
|
21699
21699
|
setDeleteConversationModal: n
|
21700
|
-
} =
|
21700
|
+
} = se(Zt), { primaryColor: r } = se(Ye);
|
21701
21701
|
return e ? /* @__PURE__ */ S.jsx(
|
21702
21702
|
"div",
|
21703
21703
|
{
|
@@ -21748,7 +21748,7 @@ function f3() {
|
|
21748
21748
|
}
|
21749
21749
|
const h3 = () => {
|
21750
21750
|
var n, r, a, i, u;
|
21751
|
-
const { isMobile: e } =
|
21751
|
+
const { isMobile: e } = se(nt), { launchButton: t } = se(Ye);
|
21752
21752
|
return (n = t == null ? void 0 : t.message) != null && n.enabled ? /* @__PURE__ */ S.jsx(
|
21753
21753
|
"div",
|
21754
21754
|
{
|
@@ -21766,7 +21766,7 @@ function p3() {
|
|
21766
21766
|
}
|
21767
21767
|
function Td() {
|
21768
21768
|
var s;
|
21769
|
-
const { conversationScreen: e, primaryColor: t, widgetMode: n } =
|
21769
|
+
const { conversationScreen: e, primaryColor: t, widgetMode: n } = se(Ye), { cancelLiveChatConnection: r } = se(En), a = ((s = e == null ? void 0 : e.liveChat) == null ? void 0 : s.queueMessages) ?? [], i = n ? t : "#FFFFFF", u = n ? "#FFFFFF" : t;
|
21770
21770
|
return /* @__PURE__ */ S.jsxs("div", { className: "live-chat-connecting", style: { backgroundColor: i }, children: [
|
21771
21771
|
/* @__PURE__ */ S.jsx(p3, {}),
|
21772
21772
|
/* @__PURE__ */ S.jsx("div", { className: "live-chat-connecting-messages", style: { color: u }, children: a.length === 0 ? /* @__PURE__ */ S.jsx("p", { children: "Connecting to live agent" }) : a.map((l, c) => /* @__PURE__ */ S.jsx("p", { children: l }, `queue-message-${c}`)) }),
|
@@ -21799,7 +21799,7 @@ const Is = 500, m3 = [
|
|
21799
21799
|
}
|
21800
21800
|
];
|
21801
21801
|
function yd({ onDismiss: e }) {
|
21802
|
-
const [t, n] = ce(""), [r, a] = ce(!1), [i, u] = ce(null), { conversationScreen: s } =
|
21802
|
+
const [t, n] = ce(""), [r, a] = ce(!1), [i, u] = ce(null), { conversationScreen: s } = se(Ye), { endLiveChat: l, submitSurvey: c, terminateConversation: d } = se(En), f = () => {
|
21803
21803
|
var g;
|
21804
21804
|
d(), (g = s == null ? void 0 : s.liveChat) != null && g.useSurvey ? a(!0) : l();
|
21805
21805
|
}, p = () => {
|
@@ -21872,7 +21872,7 @@ yd.propTypes = {
|
|
21872
21872
|
onDismiss: v.func
|
21873
21873
|
};
|
21874
21874
|
function g3(e, t) {
|
21875
|
-
const [n, r] = ce(!1), a =
|
21875
|
+
const [n, r] = ce(!1), a = tt(), i = st(
|
21876
21876
|
(...u) => {
|
21877
21877
|
n || (e(...u), r(!0), clearTimeout(a.current), a.current = setTimeout(() => {
|
21878
21878
|
r(!1);
|
@@ -21891,7 +21891,7 @@ function _d() {
|
|
21891
21891
|
liveChatMessages: n,
|
21892
21892
|
sendMessage: r,
|
21893
21893
|
sendTypingEvent: a
|
21894
|
-
} =
|
21894
|
+
} = se(En), i = tt(null), [u, s] = ce(!1), l = g3(a, 5e3), c = () => {
|
21895
21895
|
l();
|
21896
21896
|
}, d = (f) => {
|
21897
21897
|
f.trim() !== "" && r(f);
|
@@ -21986,7 +21986,7 @@ const E3 = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20wid
|
|
21986
21986
|
}];
|
21987
21987
|
}, Qa = "privacy policy";
|
21988
21988
|
function Cd() {
|
21989
|
-
const { conversationScreen: e, primaryColor: t } =
|
21989
|
+
const { conversationScreen: e, primaryColor: t } = se(Ye), { startLiveChat: n } = se(En), { setMode: r } = se(nt), { form: a, formHeader: i, privacyPolicyLink: u, privacyPolicyText: s } = e.liveChat, [l, , c] = y3({}), [d, f] = ce(!1), { clearError: p, errors: h, setErrors: g } = T3(), m = cn(
|
21990
21990
|
() => (s ?? "").split(Qa, 2),
|
21991
21991
|
[s]
|
21992
21992
|
), y = () => {
|
@@ -22100,7 +22100,7 @@ function Cd() {
|
|
22100
22100
|
}
|
22101
22101
|
Cd.propTypes = {};
|
22102
22102
|
function Ad() {
|
22103
|
-
const { step: e } =
|
22103
|
+
const { step: e } = se(En);
|
22104
22104
|
return /* @__PURE__ */ S.jsxs("div", { className: "live-chat-container", children: [
|
22105
22105
|
e === $t.FORM && /* @__PURE__ */ S.jsx(Cd, {}),
|
22106
22106
|
e === $t.CONNECTING && /* @__PURE__ */ S.jsx(Td, {}),
|
@@ -22117,7 +22117,7 @@ function Sd({
|
|
22117
22117
|
style: i = {}
|
22118
22118
|
}) {
|
22119
22119
|
var g;
|
22120
|
-
const { proactiveMessage: u } =
|
22120
|
+
const { proactiveMessage: u } = se(Ye), [s, l] = ce(!0), [c, d] = ce(!1), f = s && (!(window != null && window.OnetrustActiveGroups) || ((g = window == null ? void 0 : window.OnetrustActiveGroups) == null ? void 0 : g.includes("C0003"))) && lt.get(t) === void 0;
|
22121
22121
|
Ne(() => {
|
22122
22122
|
var m;
|
22123
22123
|
(m = window == null ? void 0 : window.OneTrust) == null || m.OnConsentChanged(() => {
|
@@ -22293,14 +22293,14 @@ function xd({ submitEventExternal: e = null }) {
|
|
22293
22293
|
userTracking: s,
|
22294
22294
|
webExperimentation: l,
|
22295
22295
|
widgetMode: c
|
22296
|
-
} =
|
22296
|
+
} = se(Ye), {
|
22297
22297
|
contentRef: d,
|
22298
22298
|
onFeedbackSelection: f,
|
22299
22299
|
onMessageSent: p,
|
22300
22300
|
pushXpertMessage: h,
|
22301
22301
|
setXpertMessages: g,
|
22302
22302
|
xpertMessages: m
|
22303
|
-
} =
|
22303
|
+
} = se(Zt), {
|
22304
22304
|
isMobile: y,
|
22305
22305
|
mode: E,
|
22306
22306
|
setDisableScroll: P,
|
@@ -22309,7 +22309,7 @@ function xd({ submitEventExternal: e = null }) {
|
|
22309
22309
|
setIsNormalSize: R,
|
22310
22310
|
setLoading: _,
|
22311
22311
|
setStreaming: N
|
22312
|
-
} =
|
22312
|
+
} = se(nt), [, V] = ce(!1), [, H] = ce(!1), [te, Y] = ce(!1), [$, L] = ce(!1), [I, w] = ce(!1), B = te || !c, G = tt(null), j = tt(null), q = lt.get(`${a}-test`) === "1";
|
22313
22313
|
Ne(() => {
|
22314
22314
|
E === vt.XPERT && B && G.current && G.current.focus();
|
22315
22315
|
}, [E, B]), _3(
|
@@ -22432,7 +22432,7 @@ function xd({ submitEventExternal: e = null }) {
|
|
22432
22432
|
};
|
22433
22433
|
if (C3(l == null ? void 0 : l.experimentName), !n || l != null && l.enabled && !(l != null && l.experimentName) && !q || s != null && s.enabled && (s != null && s.prefix) && !((Nt = j == null ? void 0 : j.current) != null && Nt.track) && !e)
|
22434
22434
|
return null;
|
22435
|
-
const
|
22435
|
+
const oe = (ie, Ee) => {
|
22436
22436
|
b({
|
22437
22437
|
name: `${s.prefix}.bi.xpert.chatbot.popup.chat.message.response`,
|
22438
22438
|
payload: {
|
@@ -22471,7 +22471,7 @@ function xd({ submitEventExternal: e = null }) {
|
|
22471
22471
|
re.forEach(
|
22472
22472
|
({
|
22473
22473
|
content: ke,
|
22474
|
-
live_agent:
|
22474
|
+
live_agent: Je,
|
22475
22475
|
role: it,
|
22476
22476
|
tool_calls: Oe,
|
22477
22477
|
tool_call_id: rt
|
@@ -22479,7 +22479,7 @@ function xd({ submitEventExternal: e = null }) {
|
|
22479
22479
|
h({
|
22480
22480
|
content: ke,
|
22481
22481
|
createdAt: /* @__PURE__ */ new Date(),
|
22482
|
-
liveAgent:
|
22482
|
+
liveAgent: Je,
|
22483
22483
|
role: it,
|
22484
22484
|
toolCalls: Oe,
|
22485
22485
|
toolCallId: rt
|
@@ -22487,7 +22487,7 @@ function xd({ submitEventExternal: e = null }) {
|
|
22487
22487
|
}
|
22488
22488
|
);
|
22489
22489
|
const ue = re.filter(({ content: ke }) => !!ke), pe = ue.map((ke) => ke.content ?? "").join("");
|
22490
|
-
|
22490
|
+
oe(pe, Ee);
|
22491
22491
|
const Re = /* @__PURE__ */ new Date(), Xe = ks(JSON.stringify(qe));
|
22492
22492
|
return ye({
|
22493
22493
|
conversationByteSize: Xe,
|
@@ -22503,8 +22503,8 @@ function xd({ submitEventExternal: e = null }) {
|
|
22503
22503
|
let re = [], ue = 0;
|
22504
22504
|
const pe = /* @__PURE__ */ new Date();
|
22505
22505
|
for (; ; ) {
|
22506
|
-
const { value: ke, done:
|
22507
|
-
if (
|
22506
|
+
const { value: ke, done: Je } = await ie.read();
|
22507
|
+
if (Je) break;
|
22508
22508
|
const it = X.decode(ke, { stream: !0 });
|
22509
22509
|
try {
|
22510
22510
|
const Oe = it.match(/\[.*?\](?=\[|$)/gs), rt = JSON.parse(Oe[Oe.length - 1]).map(
|
@@ -22547,7 +22547,7 @@ function xd({ submitEventExternal: e = null }) {
|
|
22547
22547
|
}
|
22548
22548
|
}
|
22549
22549
|
const Re = ((Xe = re.find((ke) => ke.content)) == null ? void 0 : Xe.content) || "";
|
22550
|
-
return
|
22550
|
+
return oe(Re, Ee), re;
|
22551
22551
|
}, xe = async (ie, Ee, Se, qe, F) => {
|
22552
22552
|
N(!0);
|
22553
22553
|
const X = ie.body.getReader(), re = await Ae(
|
@@ -22633,7 +22633,7 @@ function xd({ submitEventExternal: e = null }) {
|
|
22633
22633
|
isTestUser: q
|
22634
22634
|
}
|
22635
22635
|
});
|
22636
|
-
},
|
22636
|
+
}, Ze = (ie) => {
|
22637
22637
|
b({
|
22638
22638
|
name: `${s.prefix}.bi.xpert.chatbot.${ie ? "normal" : "expand"}.size.button.clicked`,
|
22639
22639
|
payload: {
|
@@ -22750,7 +22750,7 @@ function xd({ submitEventExternal: e = null }) {
|
|
22750
22750
|
Ed,
|
22751
22751
|
{
|
22752
22752
|
onClose: Un,
|
22753
|
-
handleResizeButtonClick:
|
22753
|
+
handleResizeButtonClick: Ze,
|
22754
22754
|
isMounted: I,
|
22755
22755
|
setIsMounted: w
|
22756
22756
|
}
|