@2uinc/frontend-component-xpert-chatbot 1.40.28-beta.2 → 1.40.29-alpha.1

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.
Files changed (2) hide show
  1. package/dist/lib/index.min.js +636 -625
  2. package/package.json +1 -1
@@ -106,8 +106,8 @@ La.exports;
106
106
  var a0;
107
107
  function H2() {
108
108
  return a0 || (a0 = 1, (function(e, t) {
109
- var n = 200, r = "__lodash_hash_undefined__", a = 800, i = 16, s = 9007199254740991, o = "[object Arguments]", u = "[object Array]", l = "[object AsyncFunction]", c = "[object Boolean]", h = "[object Date]", p = "[object Error]", m = "[object Function]", y = "[object GeneratorFunction]", b = "[object Map]", E = "[object Number]", v = "[object Null]", I = "[object Object]", B = "[object Proxy]", Y = "[object RegExp]", F = "[object Set]", A = "[object String]", z = "[object Undefined]", Q = "[object WeakMap]", J = "[object ArrayBuffer]", ne = "[object DataView]", $ = "[object Float32Array]", K = "[object Float64Array]", te = "[object Int8Array]", N = "[object Int16Array]", O = "[object Int32Array]", H = "[object Uint8Array]", X = "[object Uint8ClampedArray]", q = "[object Uint16Array]", W = "[object Uint32Array]", w = /[\\^$.*+?()[\]{}|]/g, ae = /^\[object .+?Constructor\]$/, ge = /^(?:0|[1-9]\d*)$/, k = {};
110
- k[$] = k[K] = k[te] = k[N] = k[O] = k[H] = k[X] = k[q] = k[W] = !0, k[o] = k[u] = k[J] = k[c] = k[ne] = k[h] = k[p] = k[m] = k[b] = k[E] = k[I] = k[Y] = k[F] = k[A] = k[Q] = !1;
109
+ var n = 200, r = "__lodash_hash_undefined__", a = 800, i = 16, s = 9007199254740991, o = "[object Arguments]", u = "[object Array]", l = "[object AsyncFunction]", c = "[object Boolean]", h = "[object Date]", p = "[object Error]", m = "[object Function]", y = "[object GeneratorFunction]", b = "[object Map]", E = "[object Number]", v = "[object Null]", I = "[object Object]", B = "[object Proxy]", Y = "[object RegExp]", F = "[object Set]", A = "[object String]", z = "[object Undefined]", K = "[object WeakMap]", J = "[object ArrayBuffer]", ne = "[object DataView]", q = "[object Float32Array]", Q = "[object Float64Array]", te = "[object Int8Array]", N = "[object Int16Array]", O = "[object Int32Array]", H = "[object Uint8Array]", X = "[object Uint8ClampedArray]", $ = "[object Uint16Array]", W = "[object Uint32Array]", w = /[\\^$.*+?()[\]{}|]/g, ae = /^\[object .+?Constructor\]$/, ge = /^(?:0|[1-9]\d*)$/, k = {};
110
+ k[q] = k[Q] = k[te] = k[N] = k[O] = k[H] = k[X] = k[$] = k[W] = !0, k[o] = k[u] = k[J] = k[c] = k[ne] = k[h] = k[p] = k[m] = k[b] = k[E] = k[I] = k[Y] = k[F] = k[A] = k[K] = !1;
111
111
  var ve = typeof di == "object" && di && di.Object === Object && di, ke = typeof self == "object" && self && self.Object === Object && self, Le = ve || ke || Function("return this")(), Re = t && !t.nodeType && t, Ge = Re && !0 && e && !e.nodeType && e, Ve = Ge && Ge.exports === Re, et = Ve && ve.process, pt = (function() {
112
112
  try {
113
113
  var R = Ge && Ge.require && Ge.require("util").types;
@@ -1368,7 +1368,7 @@ const T = /* @__PURE__ */ ir($2), Y2 = {
1368
1368
  startDate: T.string,
1369
1369
  endDate: T.string,
1370
1370
  questions: T.arrayOf(t4)
1371
- }), r4 = "https://xpert-api-services.stg.ai.2u.com/", f1 = ({
1371
+ }), r4 = "https://chatbot-frontend.prod.ai.2u.com/xpert-api/", f1 = ({
1372
1372
  children: e,
1373
1373
  clientId: t = null,
1374
1374
  clientConfigurationApiBaseUrl: n = r4,
@@ -1558,7 +1558,7 @@ const u0 = 991, a4 = () => {
1558
1558
  externalStreaming: r = !1,
1559
1559
  externalTriggerSurvey: a = !1
1560
1560
  }) => {
1561
- const [i, s] = Ee(!1), [o, u] = Ee(!1), [l, c] = Ee(!1), [h, p] = Ee(!0), [m, y] = Ee(!1), [b, E] = Ee(!1), [v, I] = Ee(!1), [B, Y] = Ee(!1), [F, A] = Ee(Cn.XPERT), z = a4(), Q = {
1561
+ const [i, s] = Ee(!1), [o, u] = Ee(!1), [l, c] = Ee(!1), [h, p] = Ee(!0), [m, y] = Ee(!1), [b, E] = Ee(!1), [v, I] = Ee(!1), [B, Y] = Ee(!1), [F, A] = Ee(Cn.XPERT), z = a4(), K = {
1562
1562
  disabledScroll: i,
1563
1563
  externalTriggerSurvey: a,
1564
1564
  externalStreaming: r,
@@ -1582,7 +1582,7 @@ const u0 = 991, a4 = () => {
1582
1582
  setStreaming: Y,
1583
1583
  setMode: A
1584
1584
  };
1585
- return /* @__PURE__ */ S.jsx(jt.Provider, { value: Q, children: e });
1585
+ return /* @__PURE__ */ S.jsx(jt.Provider, { value: K, children: e });
1586
1586
  };
1587
1587
  m1.propTypes = {
1588
1588
  children: T.element.isRequired,
@@ -1640,18 +1640,18 @@ const Ni = "--- SWITCHED TO SURVEY MODE ---", p1 = "--- EXITED SURVEY MODE. ---"
1640
1640
  const a = Je(null), i = Je(null), { id: s } = Ie(At), { setLoading: o, setStreaming: u } = Ie(jt), [l, c] = Ee(null), [h, p] = Ee(!1), [m, y] = Ee([]), [b, E] = Ee([]), v = Wt(() => {
1641
1641
  c(null), p(!1), y([]), E([]), Jt.remove(`${s}-conversation-history-id`);
1642
1642
  }, [s, c]), I = (A) => {
1643
- if (y(($) => [...$, A]), t == null)
1643
+ if (y((q) => [...q, A]), t == null)
1644
1644
  return;
1645
1645
  const z = A?.content;
1646
1646
  if (typeof z != "string")
1647
1647
  return;
1648
- const Q = z.trimStart();
1649
- if (!i4.includes(Q))
1648
+ const K = z.trimStart();
1649
+ if (!i4.includes(K))
1650
1650
  return;
1651
1651
  const ne = Array.isArray(t) ? t.length : 0;
1652
- E(($) => {
1653
- const K = $[$.length - 1]?.message;
1654
- return K?.role === A?.role && K?.content === A?.content ? $ : [...$, { insertionPoint: ne, message: A }];
1652
+ E((q) => {
1653
+ const Q = q[q.length - 1]?.message;
1654
+ return Q?.role === A?.role && Q?.content === A?.content ? q : [...q, { insertionPoint: ne, message: A }];
1655
1655
  });
1656
1656
  }, B = Gt(() => {
1657
1657
  if (t == null)
@@ -1659,22 +1659,22 @@ const Ni = "--- SWITCHED TO SURVEY MODE ---", p1 = "--- EXITED SURVEY MODE. ---"
1659
1659
  const A = Array.isArray(t) ? t : [];
1660
1660
  if (!b.length)
1661
1661
  return A;
1662
- const z = ($) => `${$?.role ?? ""}::${$?.content ?? ""}`, Q = new Set(A.map(z)), J = /* @__PURE__ */ new Map();
1663
- for (const { insertionPoint: $, message: K } of b) {
1664
- if (typeof K?.content != "string") continue;
1665
- const N = z(K);
1666
- if (Q.has(N)) continue;
1667
- Q.add(N);
1662
+ const z = (q) => `${q?.role ?? ""}::${q?.content ?? ""}`, K = new Set(A.map(z)), J = /* @__PURE__ */ new Map();
1663
+ for (const { insertionPoint: q, message: Q } of b) {
1664
+ if (typeof Q?.content != "string") continue;
1665
+ const N = z(Q);
1666
+ if (K.has(N)) continue;
1667
+ K.add(N);
1668
1668
  const O = Math.min(
1669
- Math.max(0, $ ?? A.length),
1669
+ Math.max(0, q ?? A.length),
1670
1670
  A.length
1671
1671
  ), H = J.get(O) ?? [];
1672
- H.push(K), J.set(O, H);
1672
+ H.push(Q), J.set(O, H);
1673
1673
  }
1674
1674
  const ne = [];
1675
- for (let $ = 0; $ <= A.length; $ += 1) {
1676
- const K = J.get($);
1677
- K?.length && ne.push(...K), $ < A.length && ne.push(A[$]);
1675
+ for (let q = 0; q <= A.length; q += 1) {
1676
+ const Q = J.get(q);
1677
+ Q?.length && ne.push(...Q), q < A.length && ne.push(A[q]);
1678
1678
  }
1679
1679
  return ne;
1680
1680
  }, [t, b, m]), F = {
@@ -2450,13 +2450,13 @@ var Jn = {
2450
2450
  }, l = function(N, O) {
2451
2451
  var H = typeof O?.composedPath == "function" ? O.composedPath() : void 0;
2452
2452
  return s.containerGroups.findIndex(function(X) {
2453
- var q = X.container, W = X.tabbableNodes;
2454
- return q.contains(N) || H?.includes(q) || W.find(function(w) {
2453
+ var $ = X.container, W = X.tabbableNodes;
2454
+ return $.contains(N) || H?.includes($) || W.find(function(w) {
2455
2455
  return w === N;
2456
2456
  });
2457
2457
  });
2458
2458
  }, c = function(N) {
2459
- var O = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, H = O.hasFallback, X = H === void 0 ? !1 : H, q = O.params, W = q === void 0 ? [] : q, w = i[N];
2459
+ var O = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, H = O.hasFallback, X = H === void 0 ? !1 : H, $ = O.params, W = $ === void 0 ? [] : $, w = i[N];
2460
2460
  if (typeof w == "function" && (w = w.apply(void 0, L4(W))), w === !0 && (w = void 0), !w) {
2461
2461
  if (w === void 0 || w === !1)
2462
2462
  return w;
@@ -2492,7 +2492,7 @@ var Jn = {
2492
2492
  return N;
2493
2493
  }, p = function() {
2494
2494
  if (s.containerGroups = s.containers.map(function(N) {
2495
- var O = w4(N, i.tabbableOptions), H = A4(N, i.tabbableOptions), X = O.length > 0 ? O[0] : void 0, q = O.length > 0 ? O[O.length - 1] : void 0, W = H.find(function(ge) {
2495
+ var O = w4(N, i.tabbableOptions), H = A4(N, i.tabbableOptions), X = O.length > 0 ? O[0] : void 0, $ = O.length > 0 ? O[O.length - 1] : void 0, W = H.find(function(ge) {
2496
2496
  return Wr(ge);
2497
2497
  }), w = H.slice().reverse().find(function(ge) {
2498
2498
  return Wr(ge);
@@ -2508,7 +2508,7 @@ var Jn = {
2508
2508
  /** First tabbable node in container, __tabindex__ order; `undefined` if none. */
2509
2509
  firstTabbableNode: X,
2510
2510
  /** Last tabbable node in container, __tabindex__ order; `undefined` if none. */
2511
- lastTabbableNode: q,
2511
+ lastTabbableNode: $,
2512
2512
  // NOTE: DOM order is NOT NECESSARILY "document position" order, but figuring that out
2513
2513
  // would require more than just https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition
2514
2514
  // because that API doesn't work with Shadow DOM as well as it should (@see
@@ -2565,14 +2565,14 @@ var Jn = {
2565
2565
  });
2566
2566
  return O || (O === !1 ? !1 : N);
2567
2567
  }, E = function(N) {
2568
- var O = N.target, H = N.event, X = N.isBackward, q = X === void 0 ? !1 : X;
2568
+ var O = N.target, H = N.event, X = N.isBackward, $ = X === void 0 ? !1 : X;
2569
2569
  O = O || fi(H), p();
2570
2570
  var W = null;
2571
2571
  if (s.tabbableGroups.length > 0) {
2572
2572
  var w = l(O, H), ae = w >= 0 ? s.containerGroups[w] : void 0;
2573
2573
  if (w < 0)
2574
- q ? W = s.tabbableGroups[s.tabbableGroups.length - 1].lastTabbableNode : W = s.tabbableGroups[0].firstTabbableNode;
2575
- else if (q) {
2574
+ $ ? W = s.tabbableGroups[s.tabbableGroups.length - 1].lastTabbableNode : W = s.tabbableGroups[0].firstTabbableNode;
2575
+ else if ($) {
2576
2576
  var ge = s.tabbableGroups.findIndex(function(Ge) {
2577
2577
  var Ve = Ge.firstTabbableNode;
2578
2578
  return O === Ve;
@@ -2617,7 +2617,7 @@ var Jn = {
2617
2617
  H && (s.mostRecentlyFocusedNode = O);
2618
2618
  else {
2619
2619
  N.stopImmediatePropagation();
2620
- var X, q = !0;
2620
+ var X, $ = !0;
2621
2621
  if (s.mostRecentlyFocusedNode)
2622
2622
  if (Ir(s.mostRecentlyFocusedNode) > 0) {
2623
2623
  var W = l(s.mostRecentlyFocusedNode), w = s.containerGroups[W].tabbableNodes;
@@ -2625,17 +2625,17 @@ var Jn = {
2625
2625
  var ae = w.findIndex(function(ge) {
2626
2626
  return ge === s.mostRecentlyFocusedNode;
2627
2627
  });
2628
- ae >= 0 && (i.isKeyForward(s.recentNavEvent) ? ae + 1 < w.length && (X = w[ae + 1], q = !1) : ae - 1 >= 0 && (X = w[ae - 1], q = !1));
2628
+ ae >= 0 && (i.isKeyForward(s.recentNavEvent) ? ae + 1 < w.length && (X = w[ae + 1], $ = !1) : ae - 1 >= 0 && (X = w[ae - 1], $ = !1));
2629
2629
  }
2630
2630
  } else
2631
2631
  s.containerGroups.some(function(ge) {
2632
2632
  return ge.tabbableNodes.some(function(k) {
2633
2633
  return Ir(k) > 0;
2634
2634
  });
2635
- }) || (q = !1);
2635
+ }) || ($ = !1);
2636
2636
  else
2637
- q = !1;
2638
- q && (X = E({
2637
+ $ = !1;
2638
+ $ && (X = E({
2639
2639
  // move FROM the MRU node, not event-related node (which will be the node that is
2640
2640
  // outside the trap causing the focus escape we're trying to fix)
2641
2641
  target: s.mostRecentlyFocusedNode,
@@ -2675,12 +2675,12 @@ var Jn = {
2675
2675
  capture: !0,
2676
2676
  passive: !1
2677
2677
  }), r.addEventListener("keydown", F), o;
2678
- }, Q = function(N) {
2678
+ }, K = function(N) {
2679
2679
  s.active && !s.paused && o._setSubtreeIsolation(!1), s.adjacentElements.clear(), s.alreadySilent.clear();
2680
- var O = /* @__PURE__ */ new Set(), H = /* @__PURE__ */ new Set(), X = d0(N), q;
2680
+ var O = /* @__PURE__ */ new Set(), H = /* @__PURE__ */ new Set(), X = d0(N), $;
2681
2681
  try {
2682
- for (X.s(); !(q = X.n()).done; ) {
2683
- var W = q.value;
2682
+ for (X.s(); !($ = X.n()).done; ) {
2683
+ var W = $.value;
2684
2684
  O.add(W);
2685
2685
  for (var w = typeof ShadowRoot < "u" && W.getRootNode() instanceof ShadowRoot, ae = W; ae; ) {
2686
2686
  O.add(ae);
@@ -2714,14 +2714,14 @@ var Jn = {
2714
2714
  }, ne = function(N) {
2715
2715
  var O = N.some(function(H) {
2716
2716
  var X = Array.from(H.removedNodes);
2717
- return X.some(function(q) {
2718
- return q === s.mostRecentlyFocusedNode;
2717
+ return X.some(function($) {
2718
+ return $ === s.mostRecentlyFocusedNode;
2719
2719
  });
2720
2720
  });
2721
2721
  O && y(h());
2722
- }, $ = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(ne) : void 0, K = function() {
2723
- $ && ($.disconnect(), s.active && !s.paused && s.containers.map(function(N) {
2724
- $.observe(N, {
2722
+ }, q = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(ne) : void 0, Q = function() {
2723
+ q && (q.disconnect(), s.active && !s.paused && s.containers.map(function(N) {
2724
+ q.observe(N, {
2725
2725
  subtree: !0,
2726
2726
  childList: !0
2727
2727
  });
@@ -2737,23 +2737,23 @@ var Jn = {
2737
2737
  activate: function(N) {
2738
2738
  if (s.active)
2739
2739
  return this;
2740
- var O = u(N, "onActivate"), H = u(N, "onPostActivate"), X = u(N, "checkCanFocusTrap"), q = Jn.getActiveTrap(a), W = !1;
2741
- if (q && !q.paused) {
2740
+ var O = u(N, "onActivate"), H = u(N, "onPostActivate"), X = u(N, "checkCanFocusTrap"), $ = Jn.getActiveTrap(a), W = !1;
2741
+ if ($ && !$.paused) {
2742
2742
  var w;
2743
- (w = q._setSubtreeIsolation) === null || w === void 0 || w.call(q, !1), W = !0;
2743
+ (w = $._setSubtreeIsolation) === null || w === void 0 || w.call($, !1), W = !0;
2744
2744
  }
2745
2745
  try {
2746
2746
  X || p(), s.active = !0, s.paused = !1, s.nodeFocusedBeforeActivation = m(r), O?.();
2747
2747
  var ae = function() {
2748
- X && p(), z(), K(), i.isolateSubtrees && o._setSubtreeIsolation(!0), H?.();
2748
+ X && p(), z(), Q(), i.isolateSubtrees && o._setSubtreeIsolation(!0), H?.();
2749
2749
  };
2750
2750
  if (X)
2751
2751
  return X(s.containers.concat()).then(ae, ae), this;
2752
2752
  ae();
2753
2753
  } catch (k) {
2754
- if (q === Jn.getActiveTrap(a) && W) {
2754
+ if ($ === Jn.getActiveTrap(a) && W) {
2755
2755
  var ge;
2756
- (ge = q._setSubtreeIsolation) === null || ge === void 0 || ge.call(q, !0);
2756
+ (ge = $._setSubtreeIsolation) === null || ge === void 0 || ge.call($, !0);
2757
2757
  }
2758
2758
  throw k;
2759
2759
  }
@@ -2767,15 +2767,15 @@ var Jn = {
2767
2767
  onPostDeactivate: i.onPostDeactivate,
2768
2768
  checkCanReturnFocus: i.checkCanReturnFocus
2769
2769
  }, N);
2770
- clearTimeout(s.delayInitialFocusTimer), s.delayInitialFocusTimer = void 0, s.paused || o._setSubtreeIsolation(!1), s.alreadySilent.clear(), J(), s.active = !1, s.paused = !1, K(), Jn.deactivateTrap(a, o);
2771
- var H = u(O, "onDeactivate"), X = u(O, "onPostDeactivate"), q = u(O, "checkCanReturnFocus"), W = u(O, "returnFocus", "returnFocusOnDeactivate");
2770
+ clearTimeout(s.delayInitialFocusTimer), s.delayInitialFocusTimer = void 0, s.paused || o._setSubtreeIsolation(!1), s.alreadySilent.clear(), J(), s.active = !1, s.paused = !1, Q(), Jn.deactivateTrap(a, o);
2771
+ var H = u(O, "onDeactivate"), X = u(O, "onPostDeactivate"), $ = u(O, "checkCanReturnFocus"), W = u(O, "returnFocus", "returnFocusOnDeactivate");
2772
2772
  H?.();
2773
2773
  var w = function() {
2774
2774
  m0(function() {
2775
2775
  W && y(b(s.nodeFocusedBeforeActivation)), X?.();
2776
2776
  });
2777
2777
  };
2778
- return W && q ? (q(b(s.nodeFocusedBeforeActivation)).then(w, w), this) : (w(), this);
2778
+ return W && $ ? ($(b(s.nodeFocusedBeforeActivation)).then(w, w), this) : (w(), this);
2779
2779
  },
2780
2780
  pause: function(N) {
2781
2781
  return s.active ? (s.manuallyPaused = !0, this._setPausedState(!0, N)) : this;
@@ -2787,7 +2787,7 @@ var Jn = {
2787
2787
  var O = [].concat(N).filter(Boolean);
2788
2788
  return s.containers = O.map(function(H) {
2789
2789
  return typeof H == "string" ? r.querySelector(H) : H;
2790
- }), i.isolateSubtrees && Q(s.containers), s.active && (p(), i.isolateSubtrees && !s.paused && o._setSubtreeIsolation(!0)), K(), this;
2790
+ }), i.isolateSubtrees && K(s.containers), s.active && (p(), i.isolateSubtrees && !s.paused && o._setSubtreeIsolation(!0)), Q(), this;
2791
2791
  }
2792
2792
  }, Object.defineProperties(o, {
2793
2793
  _isManuallyPaused: {
@@ -2801,10 +2801,10 @@ var Jn = {
2801
2801
  return this;
2802
2802
  if (s.paused = N, N) {
2803
2803
  var H = u(O, "onPause"), X = u(O, "onPostPause");
2804
- H?.(), J(), K(), o._setSubtreeIsolation(!1), X?.();
2804
+ H?.(), J(), Q(), o._setSubtreeIsolation(!1), X?.();
2805
2805
  } else {
2806
- var q = u(O, "onUnpause"), W = u(O, "onPostUnpause");
2807
- q?.(), o._setSubtreeIsolation(!0), p(), z(), K(), W?.();
2806
+ var $ = u(O, "onUnpause"), W = u(O, "onPostUnpause");
2807
+ $?.(), o._setSubtreeIsolation(!0), p(), z(), Q(), W?.();
2808
2808
  }
2809
2809
  return this;
2810
2810
  }
@@ -3431,7 +3431,7 @@ function E3(e, t, n, r) {
3431
3431
  A.status === "pending" && (A.status = "aborted");
3432
3432
  }), p = [];
3433
3433
  }
3434
- function Y(A, z, Q) {
3434
+ function Y(A, z, K) {
3435
3435
  const J = z !== "success";
3436
3436
  switch (p = p.filter((ne) => ne !== A), u) {
3437
3437
  case "pending":
@@ -3443,11 +3443,11 @@ function E3(e, t, n, r) {
3443
3443
  return;
3444
3444
  }
3445
3445
  if (z === "abort") {
3446
- c = Q, I();
3446
+ c = K, I();
3447
3447
  return;
3448
3448
  }
3449
3449
  if (J) {
3450
- c = Q, p.length || (s.length ? F() : I());
3450
+ c = K, p.length || (s.length ? F() : I());
3451
3451
  return;
3452
3452
  }
3453
3453
  if (y(), B(), !e.random) {
@@ -3455,7 +3455,7 @@ function E3(e, t, n, r) {
3455
3455
  ne !== -1 && ne !== e.index && (e.index = ne);
3456
3456
  }
3457
3457
  u = "completed", m.forEach((ne) => {
3458
- ne(Q);
3458
+ ne(K);
3459
3459
  });
3460
3460
  }
3461
3461
  function F() {
@@ -3475,8 +3475,8 @@ function E3(e, t, n, r) {
3475
3475
  const z = {
3476
3476
  status: "pending",
3477
3477
  resource: A,
3478
- callback: (Q, J) => {
3479
- Y(z, Q, J);
3478
+ callback: (K, J) => {
3479
+ Y(z, K, J);
3480
3480
  }
3481
3481
  };
3482
3482
  p.push(z), l++, h = setTimeout(F, e.rotate), n(A, t, z.callback);
@@ -3999,20 +3999,20 @@ function is({
3999
3999
  internalStreaming: E,
4000
4000
  externalStreaming: v
4001
4001
  } = Ie(jt), [I, B] = Ee(""), Y = i !== void 0, F = Y ? i : I, A = Wt(
4002
- ($) => {
4003
- $.preventDefault(), Y || B($.target.value), a && a($);
4002
+ (q) => {
4003
+ q.preventDefault(), Y || B(q.target.value), a && a(q);
4004
4004
  },
4005
4005
  [a, Y]
4006
4006
  ), z = () => {
4007
4007
  Y || B(""), r.current && (r.current.style.height = "auto");
4008
- }, Q = e || m || y || b;
4008
+ }, K = e || m || y || b;
4009
4009
  _e(() => {
4010
- s.current && !Q && r.current?.focus(), s.current = Q;
4011
- }, [Q, r]), _e(() => {
4010
+ s.current && !K && r.current?.focus(), s.current = K;
4011
+ }, [K, r]), _e(() => {
4012
4012
  (h || p) && r.current?.focus();
4013
4013
  }, [p, h, r]);
4014
- const J = ($) => {
4015
- $.key === "Enter" && F.trim() === "" || $.key === "Enter" && !$.shiftKey && ($.preventDefault(), t(F), z());
4014
+ const J = (q) => {
4015
+ q.key === "Enter" && F.trim() === "" || q.key === "Enter" && !q.shiftKey && (q.preventDefault(), t(F), z());
4016
4016
  }, ne = () => {
4017
4017
  r.current && (r.current.style.height = "auto", r.current.style.height = `${Math.min(
4018
4018
  r.current?.scrollHeight,
@@ -4024,7 +4024,7 @@ function is({
4024
4024
  "textarea",
4025
4025
  {
4026
4026
  "data-testid": "ConversationInput",
4027
- disabled: Q,
4027
+ disabled: K,
4028
4028
  value: F,
4029
4029
  ref: r,
4030
4030
  onInput: ne,
@@ -4056,8 +4056,8 @@ function is({
4056
4056
  {
4057
4057
  "data-testid": "Stop",
4058
4058
  className: "xpert-chatbot-popup__input--stop-btn",
4059
- onClick: ($) => {
4060
- $.preventDefault(), l();
4059
+ onClick: (q) => {
4060
+ q.preventDefault(), l();
4061
4061
  },
4062
4062
  "aria-label": "Stop streaming",
4063
4063
  children: /* @__PURE__ */ S.jsx(Dn, { icon: "material-symbols:stop", style: { fontSize: "1.75rem" } })
@@ -4066,10 +4066,10 @@ function is({
4066
4066
  "button",
4067
4067
  {
4068
4068
  "data-testid": "Send",
4069
- disabled: Q,
4069
+ disabled: K,
4070
4070
  className: "xpert-chatbot-popup__input--send-btn",
4071
- onClick: ($) => {
4072
- $.preventDefault(), t(F), z();
4071
+ onClick: (q) => {
4072
+ q.preventDefault(), t(F), z();
4073
4073
  },
4074
4074
  "aria-label": "Send message",
4075
4075
  children: /* @__PURE__ */ S.jsx(Dn, { icon: "material-symbols:send", style: { fontSize: "1.75rem" } })
@@ -4763,8 +4763,8 @@ function Z1() {
4763
4763
  F(A);
4764
4764
  else if (typeof A == "object")
4765
4765
  if (Array.isArray(A)) {
4766
- const [z, ...Q] = A;
4767
- F(z, ...Q);
4766
+ const [z, ...K] = A;
4767
+ F(z, ...K);
4768
4768
  } else
4769
4769
  B(A);
4770
4770
  else
@@ -4777,17 +4777,17 @@ function Z1() {
4777
4777
  let z = -1;
4778
4778
  if (A != null) if (Array.isArray(A))
4779
4779
  for (; ++z < A.length; ) {
4780
- const Q = A[z];
4781
- I(Q);
4780
+ const K = A[z];
4781
+ I(K);
4782
4782
  }
4783
4783
  else
4784
4784
  throw new TypeError("Expected a list of plugins, not `" + A + "`");
4785
4785
  }
4786
4786
  function F(A, z) {
4787
- let Q = -1, J;
4788
- for (; ++Q < t.length; )
4789
- if (t[Q][0] === A) {
4790
- J = t[Q];
4787
+ let K = -1, J;
4788
+ for (; ++K < t.length; )
4789
+ if (t[K][0] === A) {
4790
+ J = t[K];
4791
4791
  break;
4792
4792
  }
4793
4793
  J ? (Qo(J[1]) && Qo(z) && (z = R0(!0, J[1], z)), J[1] = z) : t.push([...arguments]);
@@ -4809,8 +4809,8 @@ function Z1() {
4809
4809
  I(null, v);
4810
4810
  function I(B, Y) {
4811
4811
  e.run(b, Aa(E), F);
4812
- function F(A, z, Q) {
4813
- z = z || b, A ? Y(A) : B ? B(z) : v(null, z, Q);
4812
+ function F(A, z, K) {
4813
+ z = z || b, A ? Y(A) : B ? B(z) : v(null, z, K);
4814
4814
  }
4815
4815
  }
4816
4816
  }
@@ -4827,12 +4827,12 @@ function Z1() {
4827
4827
  v(null, E);
4828
4828
  function v(I, B) {
4829
4829
  const Y = Aa(b);
4830
- i.run(i.parse(Y), Y, (A, z, Q) => {
4831
- if (A || !z || !Q)
4830
+ i.run(i.parse(Y), Y, (A, z, K) => {
4831
+ if (A || !z || !K)
4832
4832
  F(A);
4833
4833
  else {
4834
- const J = i.stringify(z, Q);
4835
- J == null || (l6(J) ? Q.value = J : Q.result = J), F(A, Q);
4834
+ const J = i.stringify(z, K);
4835
+ J == null || (l6(J) ? K.value = J : K.result = J), F(A, K);
4836
4836
  }
4837
4837
  });
4838
4838
  function F(A, z) {
@@ -5126,11 +5126,11 @@ function v6(e) {
5126
5126
  )
5127
5127
  return;
5128
5128
  const z = t.events.length;
5129
- let Q = z, J, ne;
5130
- for (; Q--; )
5131
- if (t.events[Q][0] === "exit" && t.events[Q][1].type === "chunkFlow") {
5129
+ let K = z, J, ne;
5130
+ for (; K--; )
5131
+ if (t.events[K][0] === "exit" && t.events[K][1].type === "chunkFlow") {
5132
5132
  if (J) {
5133
- ne = t.events[Q][1].end;
5133
+ ne = t.events[K][1].end;
5134
5134
  break;
5135
5135
  }
5136
5136
  J = !0;
@@ -5139,7 +5139,7 @@ function v6(e) {
5139
5139
  t.events[A][1].end = Object.assign({}, ne), A++;
5140
5140
  jn(
5141
5141
  t.events,
5142
- Q + 1,
5142
+ K + 1,
5143
5143
  0,
5144
5144
  t.events.slice(z)
5145
5145
  ), t.events.length = A;
@@ -5498,28 +5498,28 @@ function H6(e, t, n) {
5498
5498
  function Y(A) {
5499
5499
  return e.exit("codeFenced"), t(A);
5500
5500
  }
5501
- function F(A, z, Q) {
5501
+ function F(A, z, K) {
5502
5502
  let J = 0;
5503
5503
  return ne;
5504
5504
  function ne(O) {
5505
- return A.enter("lineEnding"), A.consume(O), A.exit("lineEnding"), $;
5505
+ return A.enter("lineEnding"), A.consume(O), A.exit("lineEnding"), q;
5506
5506
  }
5507
- function $(O) {
5507
+ function q(O) {
5508
5508
  return A.enter("codeFencedFence"), ft(O) ? ut(
5509
5509
  A,
5510
- K,
5510
+ Q,
5511
5511
  "linePrefix",
5512
5512
  r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
5513
- )(O) : K(O);
5513
+ )(O) : Q(O);
5514
5514
  }
5515
- function K(O) {
5516
- return O === o ? (A.enter("codeFencedFenceSequence"), te(O)) : Q(O);
5515
+ function Q(O) {
5516
+ return O === o ? (A.enter("codeFencedFenceSequence"), te(O)) : K(O);
5517
5517
  }
5518
5518
  function te(O) {
5519
- return O === o ? (J++, A.consume(O), te) : J >= s ? (A.exit("codeFencedFenceSequence"), ft(O) ? ut(A, N, "whitespace")(O) : N(O)) : Q(O);
5519
+ return O === o ? (J++, A.consume(O), te) : J >= s ? (A.exit("codeFencedFenceSequence"), ft(O) ? ut(A, N, "whitespace")(O) : N(O)) : K(O);
5520
5520
  }
5521
5521
  function N(O) {
5522
- return O === null || Ze(O) ? (A.exit("codeFencedFence"), z(O)) : Q(O);
5522
+ return O === null || Ze(O) ? (A.exit("codeFencedFence"), z(O)) : K(O);
5523
5523
  }
5524
5524
  }
5525
5525
  }
@@ -6054,7 +6054,7 @@ function vg(e, t, n) {
6054
6054
  }
6055
6055
  function y(k) {
6056
6056
  const ve = "CDATA[";
6057
- return k === ve.charCodeAt(o++) ? (e.consume(k), o === ve.length ? r.interrupt ? t : K : y) : n(k);
6057
+ return k === ve.charCodeAt(o++) ? (e.consume(k), o === ve.length ? r.interrupt ? t : Q : y) : n(k);
6058
6058
  }
6059
6059
  function b(k) {
6060
6060
  return Hn(k) ? (e.consume(k), s = String.fromCharCode(k), E) : n(k);
@@ -6062,12 +6062,12 @@ function vg(e, t, n) {
6062
6062
  function E(k) {
6063
6063
  if (k === null || k === 47 || k === 62 || wn(k)) {
6064
6064
  const ve = k === 47, ke = s.toLowerCase();
6065
- return !ve && !i && X0.includes(ke) ? (a = 1, r.interrupt ? t(k) : K(k)) : mg.includes(s.toLowerCase()) ? (a = 6, ve ? (e.consume(k), v) : r.interrupt ? t(k) : K(k)) : (a = 7, r.interrupt && !r.parser.lazy[r.now().line] ? n(k) : i ? I(k) : B(k));
6065
+ return !ve && !i && X0.includes(ke) ? (a = 1, r.interrupt ? t(k) : Q(k)) : mg.includes(s.toLowerCase()) ? (a = 6, ve ? (e.consume(k), v) : r.interrupt ? t(k) : Q(k)) : (a = 7, r.interrupt && !r.parser.lazy[r.now().line] ? n(k) : i ? I(k) : B(k));
6066
6066
  }
6067
6067
  return k === 45 || Rn(k) ? (e.consume(k), s += String.fromCharCode(k), E) : n(k);
6068
6068
  }
6069
6069
  function v(k) {
6070
- return k === 62 ? (e.consume(k), r.interrupt ? t : K) : n(k);
6070
+ return k === 62 ? (e.consume(k), r.interrupt ? t : Q) : n(k);
6071
6071
  }
6072
6072
  function I(k) {
6073
6073
  return ft(k) ? (e.consume(k), I) : ne(k);
@@ -6082,29 +6082,29 @@ function vg(e, t, n) {
6082
6082
  return k === 61 ? (e.consume(k), A) : ft(k) ? (e.consume(k), F) : B(k);
6083
6083
  }
6084
6084
  function A(k) {
6085
- return k === null || k === 60 || k === 61 || k === 62 || k === 96 ? n(k) : k === 34 || k === 39 ? (e.consume(k), u = k, z) : ft(k) ? (e.consume(k), A) : Q(k);
6085
+ return k === null || k === 60 || k === 61 || k === 62 || k === 96 ? n(k) : k === 34 || k === 39 ? (e.consume(k), u = k, z) : ft(k) ? (e.consume(k), A) : K(k);
6086
6086
  }
6087
6087
  function z(k) {
6088
6088
  return k === u ? (e.consume(k), u = null, J) : k === null || Ze(k) ? n(k) : (e.consume(k), z);
6089
6089
  }
6090
- function Q(k) {
6091
- return k === null || k === 34 || k === 39 || k === 47 || k === 60 || k === 61 || k === 62 || k === 96 || wn(k) ? F(k) : (e.consume(k), Q);
6090
+ function K(k) {
6091
+ return k === null || k === 34 || k === 39 || k === 47 || k === 60 || k === 61 || k === 62 || k === 96 || wn(k) ? F(k) : (e.consume(k), K);
6092
6092
  }
6093
6093
  function J(k) {
6094
6094
  return k === 47 || k === 62 || ft(k) ? B(k) : n(k);
6095
6095
  }
6096
6096
  function ne(k) {
6097
- return k === 62 ? (e.consume(k), $) : n(k);
6097
+ return k === 62 ? (e.consume(k), q) : n(k);
6098
6098
  }
6099
- function $(k) {
6100
- return k === null || Ze(k) ? K(k) : ft(k) ? (e.consume(k), $) : n(k);
6099
+ function q(k) {
6100
+ return k === null || Ze(k) ? Q(k) : ft(k) ? (e.consume(k), q) : n(k);
6101
6101
  }
6102
- function K(k) {
6102
+ function Q(k) {
6103
6103
  return k === 45 && a === 2 ? (e.consume(k), H) : k === 60 && a === 1 ? (e.consume(k), X) : k === 62 && a === 4 ? (e.consume(k), ae) : k === 63 && a === 3 ? (e.consume(k), w) : k === 93 && a === 5 ? (e.consume(k), W) : Ze(k) && (a === 6 || a === 7) ? (e.exit("htmlFlowData"), e.check(
6104
6104
  gg,
6105
6105
  ge,
6106
6106
  te
6107
- )(k)) : k === null || Ze(k) ? (e.exit("htmlFlowData"), te(k)) : (e.consume(k), K);
6107
+ )(k)) : k === null || Ze(k) ? (e.exit("htmlFlowData"), te(k)) : (e.consume(k), Q);
6108
6108
  }
6109
6109
  function te(k) {
6110
6110
  return e.check(
@@ -6117,26 +6117,26 @@ function vg(e, t, n) {
6117
6117
  return e.enter("lineEnding"), e.consume(k), e.exit("lineEnding"), O;
6118
6118
  }
6119
6119
  function O(k) {
6120
- return k === null || Ze(k) ? te(k) : (e.enter("htmlFlowData"), K(k));
6120
+ return k === null || Ze(k) ? te(k) : (e.enter("htmlFlowData"), Q(k));
6121
6121
  }
6122
6122
  function H(k) {
6123
- return k === 45 ? (e.consume(k), w) : K(k);
6123
+ return k === 45 ? (e.consume(k), w) : Q(k);
6124
6124
  }
6125
6125
  function X(k) {
6126
- return k === 47 ? (e.consume(k), s = "", q) : K(k);
6126
+ return k === 47 ? (e.consume(k), s = "", $) : Q(k);
6127
6127
  }
6128
- function q(k) {
6128
+ function $(k) {
6129
6129
  if (k === 62) {
6130
6130
  const ve = s.toLowerCase();
6131
- return X0.includes(ve) ? (e.consume(k), ae) : K(k);
6131
+ return X0.includes(ve) ? (e.consume(k), ae) : Q(k);
6132
6132
  }
6133
- return Hn(k) && s.length < 8 ? (e.consume(k), s += String.fromCharCode(k), q) : K(k);
6133
+ return Hn(k) && s.length < 8 ? (e.consume(k), s += String.fromCharCode(k), $) : Q(k);
6134
6134
  }
6135
6135
  function W(k) {
6136
- return k === 93 ? (e.consume(k), w) : K(k);
6136
+ return k === 93 ? (e.consume(k), w) : Q(k);
6137
6137
  }
6138
6138
  function w(k) {
6139
- return k === 62 ? (e.consume(k), ae) : k === 45 && a === 2 ? (e.consume(k), w) : K(k);
6139
+ return k === 62 ? (e.consume(k), ae) : k === 45 && a === 2 ? (e.consume(k), w) : Q(k);
6140
6140
  }
6141
6141
  function ae(k) {
6142
6142
  return k === null || Ze(k) ? (e.exit("htmlFlowData"), ge(k)) : (e.consume(k), ae);
@@ -6173,7 +6173,7 @@ function Sg(e, t, n) {
6173
6173
  return e.enter("htmlText"), e.enter("htmlTextData"), e.consume(w), u;
6174
6174
  }
6175
6175
  function u(w) {
6176
- return w === 33 ? (e.consume(w), l) : w === 47 ? (e.consume(w), F) : w === 63 ? (e.consume(w), B) : Hn(w) ? (e.consume(w), Q) : n(w);
6176
+ return w === 33 ? (e.consume(w), l) : w === 47 ? (e.consume(w), F) : w === 63 ? (e.consume(w), B) : Hn(w) ? (e.consume(w), K) : n(w);
6177
6177
  }
6178
6178
  function l(w) {
6179
6179
  return w === 45 ? (e.consume(w), c) : w === 91 ? (e.consume(w), i = 0, y) : Hn(w) ? (e.consume(w), I) : n(w);
@@ -6221,20 +6221,20 @@ function Sg(e, t, n) {
6221
6221
  function z(w) {
6222
6222
  return Ze(w) ? (s = z, X(w)) : ft(w) ? (e.consume(w), z) : H(w);
6223
6223
  }
6224
- function Q(w) {
6225
- return w === 45 || Rn(w) ? (e.consume(w), Q) : w === 47 || w === 62 || wn(w) ? J(w) : n(w);
6224
+ function K(w) {
6225
+ return w === 45 || Rn(w) ? (e.consume(w), K) : w === 47 || w === 62 || wn(w) ? J(w) : n(w);
6226
6226
  }
6227
6227
  function J(w) {
6228
6228
  return w === 47 ? (e.consume(w), H) : w === 58 || w === 95 || Hn(w) ? (e.consume(w), ne) : Ze(w) ? (s = J, X(w)) : ft(w) ? (e.consume(w), J) : H(w);
6229
6229
  }
6230
6230
  function ne(w) {
6231
- return w === 45 || w === 46 || w === 58 || w === 95 || Rn(w) ? (e.consume(w), ne) : $(w);
6231
+ return w === 45 || w === 46 || w === 58 || w === 95 || Rn(w) ? (e.consume(w), ne) : q(w);
6232
6232
  }
6233
- function $(w) {
6234
- return w === 61 ? (e.consume(w), K) : Ze(w) ? (s = $, X(w)) : ft(w) ? (e.consume(w), $) : J(w);
6233
+ function q(w) {
6234
+ return w === 61 ? (e.consume(w), Q) : Ze(w) ? (s = q, X(w)) : ft(w) ? (e.consume(w), q) : J(w);
6235
6235
  }
6236
- function K(w) {
6237
- return w === null || w === 60 || w === 61 || w === 62 || w === 96 ? n(w) : w === 34 || w === 39 ? (e.consume(w), a = w, te) : Ze(w) ? (s = K, X(w)) : ft(w) ? (e.consume(w), K) : (e.consume(w), N);
6236
+ function Q(w) {
6237
+ return w === null || w === 60 || w === 61 || w === 62 || w === 96 ? n(w) : w === 34 || w === 39 ? (e.consume(w), a = w, te) : Ze(w) ? (s = Q, X(w)) : ft(w) ? (e.consume(w), Q) : (e.consume(w), N);
6238
6238
  }
6239
6239
  function te(w) {
6240
6240
  return w === a ? (e.consume(w), a = void 0, O) : w === null ? n(w) : Ze(w) ? (s = te, X(w)) : (e.consume(w), te);
@@ -6249,9 +6249,9 @@ function Sg(e, t, n) {
6249
6249
  return w === 62 ? (e.consume(w), e.exit("htmlTextData"), e.exit("htmlText"), t) : n(w);
6250
6250
  }
6251
6251
  function X(w) {
6252
- return e.exit("htmlTextData"), e.enter("lineEnding"), e.consume(w), e.exit("lineEnding"), q;
6252
+ return e.exit("htmlTextData"), e.enter("lineEnding"), e.consume(w), e.exit("lineEnding"), $;
6253
6253
  }
6254
- function q(w) {
6254
+ function $(w) {
6255
6255
  return ft(w) ? ut(
6256
6256
  e,
6257
6257
  W,
@@ -6833,63 +6833,63 @@ function e5(e, t, n) {
6833
6833
  };
6834
6834
  let c = t.tokenize.call(l, u);
6835
6835
  return t.resolveAll && i.push(t), l;
6836
- function h($) {
6837
- return s = En(s, $), E(), s[s.length - 1] !== null ? [] : (Q(t, 0), l.events = Xu(i, l.events, l), l.events);
6836
+ function h(q) {
6837
+ return s = En(s, q), E(), s[s.length - 1] !== null ? [] : (K(t, 0), l.events = Xu(i, l.events, l), l.events);
6838
6838
  }
6839
- function p($, K) {
6840
- return n5(m($), K);
6839
+ function p(q, Q) {
6840
+ return n5(m(q), Q);
6841
6841
  }
6842
- function m($) {
6843
- return t5(s, $);
6842
+ function m(q) {
6843
+ return t5(s, q);
6844
6844
  }
6845
6845
  function y() {
6846
- const { line: $, column: K, offset: te, _index: N, _bufferIndex: O } = r;
6846
+ const { line: q, column: Q, offset: te, _index: N, _bufferIndex: O } = r;
6847
6847
  return {
6848
- line: $,
6849
- column: K,
6848
+ line: q,
6849
+ column: Q,
6850
6850
  offset: te,
6851
6851
  _index: N,
6852
6852
  _bufferIndex: O
6853
6853
  };
6854
6854
  }
6855
- function b($) {
6856
- a[$.line] = $.column, ne();
6855
+ function b(q) {
6856
+ a[q.line] = q.column, ne();
6857
6857
  }
6858
6858
  function E() {
6859
- let $;
6859
+ let q;
6860
6860
  for (; r._index < s.length; ) {
6861
- const K = s[r._index];
6862
- if (typeof K == "string")
6863
- for ($ = r._index, r._bufferIndex < 0 && (r._bufferIndex = 0); r._index === $ && r._bufferIndex < K.length; )
6864
- v(K.charCodeAt(r._bufferIndex));
6861
+ const Q = s[r._index];
6862
+ if (typeof Q == "string")
6863
+ for (q = r._index, r._bufferIndex < 0 && (r._bufferIndex = 0); r._index === q && r._bufferIndex < Q.length; )
6864
+ v(Q.charCodeAt(r._bufferIndex));
6865
6865
  else
6866
- v(K);
6866
+ v(Q);
6867
6867
  }
6868
6868
  }
6869
- function v($) {
6870
- c = c($);
6869
+ function v(q) {
6870
+ c = c(q);
6871
6871
  }
6872
- function I($) {
6873
- Wu($) ? (r.line++, r.column = 1, r.offset += $ === -3 ? 2 : 1, ne()) : $ !== -1 && (r.column++, r.offset++), r._bufferIndex < 0 ? r._index++ : (r._bufferIndex++, r._bufferIndex === s[r._index].length && (r._bufferIndex = -1, r._index++)), l.previous = $;
6872
+ function I(q) {
6873
+ Wu(q) ? (r.line++, r.column = 1, r.offset += q === -3 ? 2 : 1, ne()) : q !== -1 && (r.column++, r.offset++), r._bufferIndex < 0 ? r._index++ : (r._bufferIndex++, r._bufferIndex === s[r._index].length && (r._bufferIndex = -1, r._index++)), l.previous = q;
6874
6874
  }
6875
- function B($, K) {
6876
- const te = K || {};
6877
- return te.type = $, te.start = y(), l.events.push(["enter", te, l]), o.push(te), te;
6875
+ function B(q, Q) {
6876
+ const te = Q || {};
6877
+ return te.type = q, te.start = y(), l.events.push(["enter", te, l]), o.push(te), te;
6878
6878
  }
6879
- function Y($) {
6880
- const K = o.pop();
6881
- return K.end = y(), l.events.push(["exit", K, l]), K;
6879
+ function Y(q) {
6880
+ const Q = o.pop();
6881
+ return Q.end = y(), l.events.push(["exit", Q, l]), Q;
6882
6882
  }
6883
- function F($, K) {
6884
- Q($, K.from);
6883
+ function F(q, Q) {
6884
+ K(q, Q.from);
6885
6885
  }
6886
- function A($, K) {
6887
- K.restore();
6886
+ function A(q, Q) {
6887
+ Q.restore();
6888
6888
  }
6889
- function z($, K) {
6889
+ function z(q, Q) {
6890
6890
  return te;
6891
6891
  function te(N, O, H) {
6892
- let X, q, W, w;
6892
+ let X, $, W, w;
6893
6893
  return Array.isArray(N) ? ge(N) : "tokenize" in N ? (
6894
6894
  // @ts-expect-error Looks like a construct.
6895
6895
  ge([N])
@@ -6907,7 +6907,7 @@ function e5(e, t, n) {
6907
6907
  }
6908
6908
  }
6909
6909
  function ge(Le) {
6910
- return X = Le, q = 0, Le.length === 0 ? H : k(Le[q]);
6910
+ return X = Le, $ = 0, Le.length === 0 ? H : k(Le[$]);
6911
6911
  }
6912
6912
  function k(Le) {
6913
6913
  return Re;
@@ -6916,7 +6916,7 @@ function e5(e, t, n) {
6916
6916
  // If we do have fields, create an object w/ `context` as its
6917
6917
  // prototype.
6918
6918
  // This allows a “live binding”, which is needed for `interrupt`.
6919
- K ? Object.assign(Object.create(l), K) : l,
6919
+ Q ? Object.assign(Object.create(l), Q) : l,
6920
6920
  u,
6921
6921
  ve,
6922
6922
  ke
@@ -6924,29 +6924,29 @@ function e5(e, t, n) {
6924
6924
  }
6925
6925
  }
6926
6926
  function ve(Le) {
6927
- return $(W, w), O;
6927
+ return q(W, w), O;
6928
6928
  }
6929
6929
  function ke(Le) {
6930
- return w.restore(), ++q < X.length ? k(X[q]) : H;
6930
+ return w.restore(), ++$ < X.length ? k(X[$]) : H;
6931
6931
  }
6932
6932
  }
6933
6933
  }
6934
- function Q($, K) {
6935
- $.resolveAll && !i.includes($) && i.push($), $.resolve && jn(
6934
+ function K(q, Q) {
6935
+ q.resolveAll && !i.includes(q) && i.push(q), q.resolve && jn(
6936
6936
  l.events,
6937
- K,
6938
- l.events.length - K,
6939
- $.resolve(l.events.slice(K), l)
6940
- ), $.resolveTo && (l.events = $.resolveTo(l.events, l));
6937
+ Q,
6938
+ l.events.length - Q,
6939
+ q.resolve(l.events.slice(Q), l)
6940
+ ), q.resolveTo && (l.events = q.resolveTo(l.events, l));
6941
6941
  }
6942
6942
  function J() {
6943
- const $ = y(), K = l.previous, te = l.currentConstruct, N = l.events.length, O = Array.from(o);
6943
+ const q = y(), Q = l.previous, te = l.currentConstruct, N = l.events.length, O = Array.from(o);
6944
6944
  return {
6945
6945
  restore: H,
6946
6946
  from: N
6947
6947
  };
6948
6948
  function H() {
6949
- r = $, l.previous = K, l.currentConstruct = te, l.events.length = N, o = O, ne();
6949
+ r = q, l.previous = Q, l.currentConstruct = te, l.events.length = N, o = O, ne();
6950
6950
  }
6951
6951
  }
6952
6952
  function ne() {
@@ -7186,20 +7186,20 @@ function T5(e) {
7186
7186
  canContainEols: ["emphasis", "fragment", "heading", "paragraph", "strong"],
7187
7187
  enter: {
7188
7188
  autolink: o(rt),
7189
- autolinkProtocol: $,
7190
- autolinkEmail: $,
7189
+ autolinkProtocol: q,
7190
+ autolinkEmail: q,
7191
7191
  atxHeading: o(Nn),
7192
7192
  blockQuote: o(pt),
7193
- characterEscape: $,
7194
- characterReference: $,
7193
+ characterEscape: q,
7194
+ characterReference: q,
7195
7195
  codeFenced: o(_t),
7196
7196
  codeFencedFenceInfo: u,
7197
7197
  codeFencedFenceMeta: u,
7198
7198
  codeIndented: o(_t, u),
7199
7199
  codeText: o(Nt, u),
7200
- codeTextData: $,
7201
- data: $,
7202
- codeFlowValue: $,
7200
+ codeTextData: q,
7201
+ data: q,
7202
+ codeFlowValue: q,
7203
7203
  definition: o(ln),
7204
7204
  definitionDestinationString: u,
7205
7205
  definitionLabelString: u,
@@ -7208,9 +7208,9 @@ function T5(e) {
7208
7208
  hardBreakEscape: o(On),
7209
7209
  hardBreakTrailing: o(On),
7210
7210
  htmlFlow: o(be, u),
7211
- htmlFlowData: $,
7211
+ htmlFlowData: q,
7212
7212
  htmlText: o(be, u),
7213
- htmlTextData: $,
7213
+ htmlTextData: q,
7214
7214
  image: o(We),
7215
7215
  label: u,
7216
7216
  link: o(rt),
@@ -7234,7 +7234,7 @@ function T5(e) {
7234
7234
  autolinkEmail: et,
7235
7235
  autolinkProtocol: Ve,
7236
7236
  blockQuote: c(),
7237
- characterEscapeValue: K,
7237
+ characterEscapeValue: Q,
7238
7238
  characterReferenceMarkerHexadecimal: Re,
7239
7239
  characterReferenceMarkerNumeric: Re,
7240
7240
  characterReferenceValue: Ge,
@@ -7242,11 +7242,11 @@ function T5(e) {
7242
7242
  codeFencedFence: v,
7243
7243
  codeFencedFenceInfo: b,
7244
7244
  codeFencedFenceMeta: E,
7245
- codeFlowValue: K,
7245
+ codeFlowValue: Q,
7246
7246
  codeIndented: c(B),
7247
7247
  codeText: c(X),
7248
- codeTextData: K,
7249
- data: K,
7248
+ codeTextData: Q,
7249
+ data: Q,
7250
7250
  definition: c(),
7251
7251
  definitionDestinationString: A,
7252
7252
  definitionLabelString: Y,
@@ -7255,14 +7255,14 @@ function T5(e) {
7255
7255
  hardBreakEscape: c(N),
7256
7256
  hardBreakTrailing: c(N),
7257
7257
  htmlFlow: c(O),
7258
- htmlFlowData: K,
7258
+ htmlFlowData: Q,
7259
7259
  htmlText: c(H),
7260
- htmlTextData: K,
7260
+ htmlTextData: Q,
7261
7261
  image: c(W),
7262
7262
  label: ae,
7263
7263
  labelText: w,
7264
7264
  lineEnding: te,
7265
- link: c(q),
7265
+ link: c($),
7266
7266
  listItem: c(),
7267
7267
  listOrdered: c(),
7268
7268
  listUnordered: c(),
@@ -7273,7 +7273,7 @@ function T5(e) {
7273
7273
  resource: ve,
7274
7274
  setextHeading: c(ne),
7275
7275
  setextHeadingLineSequence: J,
7276
- setextHeadingText: Q,
7276
+ setextHeadingText: K,
7277
7277
  strong: c(),
7278
7278
  thematicBreak: c()
7279
7279
  }
@@ -7464,7 +7464,7 @@ function T5(e) {
7464
7464
  re.depth = ye;
7465
7465
  }
7466
7466
  }
7467
- function Q() {
7467
+ function K() {
7468
7468
  i("setextHeadingSlurpLineEnding", !0);
7469
7469
  }
7470
7470
  function J(V) {
@@ -7474,14 +7474,14 @@ function T5(e) {
7474
7474
  function ne() {
7475
7475
  i("setextHeadingSlurpLineEnding");
7476
7476
  }
7477
- function $(V) {
7477
+ function q(V) {
7478
7478
  const re = this.stack[this.stack.length - 1];
7479
7479
  let ye = re.children[re.children.length - 1];
7480
7480
  (!ye || ye.type !== "text") && (ye = Be(), ye.position = {
7481
7481
  start: lr(V.start)
7482
7482
  }, re.children.push(ye)), this.stack.push(ye);
7483
7483
  }
7484
- function K(V) {
7484
+ function Q(V) {
7485
7485
  const re = this.stack.pop();
7486
7486
  re.value += this.sliceSerialize(V), re.position.end = lr(V.end);
7487
7487
  }
@@ -7492,7 +7492,7 @@ function T5(e) {
7492
7492
  ye.position.end = lr(V.end), i("atHardBreak");
7493
7493
  return;
7494
7494
  }
7495
- !s("setextHeadingSlurpLineEnding") && t.canContainEols.includes(re.type) && ($.call(this, V), K.call(this, V));
7495
+ !s("setextHeadingSlurpLineEnding") && t.canContainEols.includes(re.type) && (q.call(this, V), Q.call(this, V));
7496
7496
  }
7497
7497
  function N() {
7498
7498
  i("atHardBreak", !0);
@@ -7509,7 +7509,7 @@ function T5(e) {
7509
7509
  const V = this.resume(), re = this.stack[this.stack.length - 1];
7510
7510
  re.value = V;
7511
7511
  }
7512
- function q() {
7512
+ function $() {
7513
7513
  const V = this.stack[this.stack.length - 1];
7514
7514
  if (s("inReference")) {
7515
7515
  const re = s("referenceType") || "shortcut";
@@ -7573,12 +7573,12 @@ function T5(e) {
7573
7573
  $e.value += Ae, $e.position.end = lr(V.end);
7574
7574
  }
7575
7575
  function Ve(V) {
7576
- K.call(this, V);
7576
+ Q.call(this, V);
7577
7577
  const re = this.stack[this.stack.length - 1];
7578
7578
  re.url = this.sliceSerialize(V);
7579
7579
  }
7580
7580
  function et(V) {
7581
- K.call(this, V);
7581
+ Q.call(this, V);
7582
7582
  const re = this.stack[this.stack.length - 1];
7583
7583
  re.url = "mailto:" + this.sliceSerialize(V);
7584
7584
  }
@@ -9812,7 +9812,7 @@ function Rb() {
9812
9812
  function Y() {
9813
9813
  var te = { line: v, column: I };
9814
9814
  return function(N) {
9815
- return N.position = new F(te), Q(), N;
9815
+ return N.position = new F(te), K(), N;
9816
9816
  };
9817
9817
  }
9818
9818
  function F(te) {
@@ -9832,7 +9832,7 @@ function Rb() {
9832
9832
  return B(O), b = b.slice(O.length), N;
9833
9833
  }
9834
9834
  }
9835
- function Q() {
9835
+ function K() {
9836
9836
  z(n);
9837
9837
  }
9838
9838
  function J(te) {
@@ -9855,7 +9855,7 @@ function Rb() {
9855
9855
  });
9856
9856
  }
9857
9857
  }
9858
- function $() {
9858
+ function q() {
9859
9859
  var te = Y(), N = z(r);
9860
9860
  if (N) {
9861
9861
  if (ne(), !z(a)) return A("property missing ':'");
@@ -9867,14 +9867,14 @@ function Rb() {
9867
9867
  return z(s), H;
9868
9868
  }
9869
9869
  }
9870
- function K() {
9870
+ function Q() {
9871
9871
  var te = [];
9872
9872
  J(te);
9873
- for (var N; N = $(); )
9873
+ for (var N; N = q(); )
9874
9874
  N !== !1 && (te.push(N), J(te));
9875
9875
  return te;
9876
9876
  }
9877
- return Q(), K();
9877
+ return K(), Q();
9878
9878
  };
9879
9879
  function y(b) {
9880
9880
  return b ? b.replace(o, h) : h;
@@ -24836,8 +24836,8 @@ var xu = {
24836
24836
  var z = xi("textrm", l, c);
24837
24837
  return Zt(i, z, a, n, s.concat(l, c));
24838
24838
  } else {
24839
- var Q = xi(F, l, c);
24840
- return Zt(i, Q, a, n, s.concat(Q, l, c));
24839
+ var K = xi(F, l, c);
24840
+ return Zt(i, K, a, n, s.concat(K, l, c));
24841
24841
  }
24842
24842
  } else
24843
24843
  throw new Error("unexpected type: " + r + " in makeOrd");
@@ -24950,8 +24950,8 @@ var xu = {
24950
24950
  if (h < 0) {
24951
24951
  var A = oe([], []), z = oe(["vlist"], [A]);
24952
24952
  z.style.height = pe(-h);
24953
- var Q = oe(["vlist-s"], [new yn("​")]);
24954
- F = [oe(["vlist-r"], [Y, Q]), oe(["vlist-r"], [z])];
24953
+ var K = oe(["vlist-s"], [new yn("​")]);
24954
+ F = [oe(["vlist-r"], [Y, K]), oe(["vlist-r"], [z])];
24955
24955
  } else
24956
24956
  F = [oe(["vlist-r"], [Y])];
24957
24957
  var J = oe(["vlist-t"], F);
@@ -25879,32 +25879,32 @@ var gm = function(t) {
25879
25879
  var E = [], v = pT[u];
25880
25880
  if (!v)
25881
25881
  throw new Error('No SVG data for "' + u + '".');
25882
- var [I, B, Y] = v, F = Y / 1e3, A = I.length, z, Q;
25882
+ var [I, B, Y] = v, F = Y / 1e3, A = I.length, z, K;
25883
25883
  if (A === 1) {
25884
25884
  if (v.length !== 4)
25885
25885
  throw new Error('Expected 4-tuple for single-path SVG data "' + u + '".');
25886
- z = ["hide-tail"], Q = [v[3]];
25886
+ z = ["hide-tail"], K = [v[3]];
25887
25887
  } else if (A === 2)
25888
- z = ["halfarrow-left", "halfarrow-right"], Q = ["xMinYMin", "xMaxYMin"];
25888
+ z = ["halfarrow-left", "halfarrow-right"], K = ["xMinYMin", "xMaxYMin"];
25889
25889
  else if (A === 3)
25890
- z = ["brace-left", "brace-center", "brace-right"], Q = ["xMinYMin", "xMidYMin", "xMaxYMin"];
25890
+ z = ["brace-left", "brace-center", "brace-right"], K = ["xMinYMin", "xMidYMin", "xMaxYMin"];
25891
25891
  else
25892
25892
  throw new Error(`Correct katexImagesData or update code here to support
25893
25893
  ` + A + " children.");
25894
25894
  for (var J = 0; J < A; J++) {
25895
- var ne = new br(I[J]), $ = new ar([ne], {
25895
+ var ne = new br(I[J]), q = new ar([ne], {
25896
25896
  width: "400em",
25897
25897
  height: pe(F),
25898
25898
  viewBox: "0 0 " + o + " " + Y,
25899
- preserveAspectRatio: Q[J] + " slice"
25900
- }), K = yr([z[J]], [$], n);
25899
+ preserveAspectRatio: K[J] + " slice"
25900
+ }), Q = yr([z[J]], [q], n);
25901
25901
  if (A === 1)
25902
25902
  return {
25903
- span: K,
25903
+ span: Q,
25904
25904
  minWidth: B,
25905
25905
  height: F
25906
25906
  };
25907
- K.style.height = pe(F), E.push(K);
25907
+ Q.style.height = pe(F), E.push(Q);
25908
25908
  }
25909
25909
  return {
25910
25910
  span: oe(["stretchy"], E, n),
@@ -26846,33 +26846,33 @@ var Da = function(t, n, r) {
26846
26846
  var A = Da(u, m, i);
26847
26847
  Y = A.height + A.depth, F = 2;
26848
26848
  }
26849
- var z = b + B + Y, Q = Math.max(0, Math.ceil((n - z) / (F * v))), J = z + Q * F * v, ne = a.fontMetrics().axisHeight;
26849
+ var z = b + B + Y, K = Math.max(0, Math.ceil((n - z) / (F * v))), J = z + K * F * v, ne = a.fontMetrics().axisHeight;
26850
26850
  r && (ne *= a.sizeMultiplier);
26851
- var $ = J / 2 - ne, K = [];
26851
+ var q = J / 2 - ne, Q = [];
26852
26852
  if (h.length > 0) {
26853
- var te = J - b - B, N = Math.round(J * 1e3), O = F9(h, Math.round(te * 1e3)), H = new br(h, O), X = pe(p / 1e3), q = pe(N / 1e3), W = new ar([H], {
26853
+ var te = J - b - B, N = Math.round(J * 1e3), O = F9(h, Math.round(te * 1e3)), H = new br(h, O), X = pe(p / 1e3), $ = pe(N / 1e3), W = new ar([H], {
26854
26854
  width: X,
26855
- height: q,
26855
+ height: $,
26856
26856
  viewBox: "0 0 " + p + " " + N
26857
26857
  }), w = yr([], [W], a);
26858
- w.height = N / 1e3, w.style.width = X, w.style.height = q, K.push({
26858
+ w.height = N / 1e3, w.style.width = X, w.style.height = $, Q.push({
26859
26859
  type: "elem",
26860
26860
  elem: w
26861
26861
  });
26862
26862
  } else {
26863
- if (K.push(xo(c, m, i)), K.push(wi), u === null) {
26863
+ if (Q.push(xo(c, m, i)), Q.push(wi), u === null) {
26864
26864
  var ae = J - b - B + 2 * Lu;
26865
- K.push(So(l, ae, a));
26865
+ Q.push(So(l, ae, a));
26866
26866
  } else {
26867
26867
  var ge = (J - b - B - Y) / 2 + 2 * Lu;
26868
- K.push(So(l, ge, a)), K.push(wi), K.push(xo(u, m, i)), K.push(wi), K.push(So(l, ge, a));
26868
+ Q.push(So(l, ge, a)), Q.push(wi), Q.push(xo(u, m, i)), Q.push(wi), Q.push(So(l, ge, a));
26869
26869
  }
26870
- K.push(wi), K.push(xo(o, m, i));
26870
+ Q.push(wi), Q.push(xo(o, m, i));
26871
26871
  }
26872
26872
  var k = a.havingBaseStyle(ze.TEXT), ve = it({
26873
26873
  positionType: "bottom",
26874
- positionData: $,
26875
- children: K
26874
+ positionData: q,
26875
+ children: Q
26876
26876
  });
26877
26877
  return _l(oe(["delimsizing", "mult"], [ve], k), ze.TEXT, a, s);
26878
26878
  }, Co = 80, wo = 0.08, Ao = function(t, n, r, a, i) {
@@ -27584,8 +27584,8 @@ function Er(e, t, n) {
27584
27584
  break;
27585
27585
  } else if (z === "\\\\") {
27586
27586
  e.consume();
27587
- var Q = void 0;
27588
- e.gullet.future().text !== " " && (Q = e.parseSizeGroup(!0)), E.push(Q ? Q.value : null), Y(), v.push(yd(e)), y = [], b.push(y), B();
27587
+ var K = void 0;
27588
+ e.gullet.future().text !== " " && (K = e.parseSizeGroup(!0)), E.push(K ? K.value : null), Y(), v.push(yd(e)), y = [], b.push(y), B();
27589
27589
  } else
27590
27590
  throw new he("Expected & or \\\\ or \\cr or \\end", e.nextToken);
27591
27591
  }
@@ -27631,7 +27631,7 @@ var $n = function(t, n) {
27631
27631
  for (Y(s[0]), r = 0; r < t.body.length; ++r) {
27632
27632
  var F = t.body[r], A = v, z = I;
27633
27633
  o < F.length && (o = F.length);
27634
- var Q = {
27634
+ var K = {
27635
27635
  cells: new Array(F.length),
27636
27636
  height: 0,
27637
27637
  depth: 0,
@@ -27639,16 +27639,16 @@ var $n = function(t, n) {
27639
27639
  };
27640
27640
  for (a = 0; a < F.length; ++a) {
27641
27641
  var J = st(F[a], n);
27642
- z < J.depth && (z = J.depth), A < J.height && (A = J.height), Q.cells[a] = J;
27642
+ z < J.depth && (z = J.depth), A < J.height && (A = J.height), K.cells[a] = J;
27643
27643
  }
27644
- var ne = t.rowGaps[r], $ = 0;
27645
- ne && ($ = wt(ne, n), $ > 0 && ($ += I, z < $ && (z = $), $ = 0)), t.addJot && r < t.body.length - 1 && (z += b), Q.height = A, Q.depth = z, B += A, Q.pos = B, B += z + $, u[r] = Q, Y(s[r + 1]);
27644
+ var ne = t.rowGaps[r], q = 0;
27645
+ ne && (q = wt(ne, n), q > 0 && (q += I, z < q && (z = q), q = 0)), t.addJot && r < t.body.length - 1 && (z += b), K.height = A, K.depth = z, B += A, K.pos = B, B += z + q, u[r] = K, Y(s[r + 1]);
27646
27646
  }
27647
- var K = B / 2 + n.fontMetrics().axisHeight, te = t.cols || [], N = [], O, H, X = [];
27647
+ var Q = B / 2 + n.fontMetrics().axisHeight, te = t.cols || [], N = [], O, H, X = [];
27648
27648
  if (t.tags && t.tags.some((re) => re))
27649
27649
  for (r = 0; r < i; ++r) {
27650
- var q = u[r], W = q.pos - K, w = t.tags[r], ae = void 0;
27651
- w === !0 ? ae = oe(["eqn-num"], [], n) : w === !1 ? ae = oe([], [], n) : ae = oe([], zt(w, n, !0), n), ae.depth = q.depth, ae.height = q.height, X.push({
27650
+ var $ = u[r], W = $.pos - Q, w = t.tags[r], ae = void 0;
27651
+ w === !0 ? ae = oe(["eqn-num"], [], n) : w === !1 ? ae = oe([], [], n) : ae = oe([], zt(w, n, !0), n), ae.depth = $.depth, ae.height = $.height, X.push({
27652
27652
  type: "elem",
27653
27653
  elem: ae,
27654
27654
  shift: W
@@ -27666,7 +27666,7 @@ var $n = function(t, n) {
27666
27666
  if (ve || (O = oe(["arraycolsep"], []), O.style.width = pe(n.fontMetrics().doubleRuleSep), N.push(O)), k.separator === "|" || k.separator === ":") {
27667
27667
  var Le = k.separator === "|" ? "solid" : "dashed", Re = oe(["vertical-separator"], [], n);
27668
27668
  Re.style.height = pe(B), Re.style.borderRightWidth = pe(c), Re.style.borderRightStyle = Le, Re.style.margin = "0 " + pe(-c / 2);
27669
- var Ge = B - K;
27669
+ var Ge = B - Q;
27670
27670
  Ge && (Re.style.verticalAlign = pe(-Ge)), N.push(Re);
27671
27671
  } else
27672
27672
  throw new he("Invalid separator type: " + k.separator);
@@ -27682,7 +27682,7 @@ var $n = function(t, n) {
27682
27682
  for (r = 0; r < i; ++r) {
27683
27683
  var Nt = u[r], ln = Nt.cells[a];
27684
27684
  if (ln) {
27685
- var In = Nt.pos - K;
27685
+ var In = Nt.pos - Q;
27686
27686
  ln.depth = Nt.depth, ln.height = Nt.height, _t.push({
27687
27687
  type: "elem",
27688
27688
  elem: ln,
@@ -27707,7 +27707,7 @@ var $n = function(t, n) {
27707
27707
  elem: rt,
27708
27708
  shift: 0
27709
27709
  }]; l.length > 0; ) {
27710
- var Pe = l.pop(), Be = Pe.pos - K;
27710
+ var Pe = l.pop(), Be = Pe.pos - Q;
27711
27711
  Pe.isDashed ? De.push({
27712
27712
  type: "elem",
27713
27713
  elem: we,
@@ -27757,11 +27757,11 @@ var $n = function(t, n) {
27757
27757
  A += z % 2 ? "0em " : "1em ";
27758
27758
  c.setAttribute("columnspacing", A.trim());
27759
27759
  } else t.colSeparationType === "alignat" || t.colSeparationType === "gather" ? c.setAttribute("columnspacing", "0em") : t.colSeparationType === "small" ? c.setAttribute("columnspacing", "0.2778em") : t.colSeparationType === "CD" ? c.setAttribute("columnspacing", "0.5em") : c.setAttribute("columnspacing", "1em");
27760
- var Q = "", J = t.hLinesBeforeRow;
27760
+ var K = "", J = t.hLinesBeforeRow;
27761
27761
  p += J[0].length > 0 ? "left " : "", p += J[J.length - 1].length > 0 ? "right " : "";
27762
27762
  for (var ne = 1; ne < J.length - 1; ne++)
27763
- Q += J[ne].length === 0 ? "none " : J[ne][0] ? "dashed " : "solid ";
27764
- return /[sd]/.test(Q) && c.setAttribute("rowlines", Q.trim()), p !== "" && (c = new fe("menclose", [c]), c.setAttribute("notation", p.trim())), t.arraystretch && t.arraystretch < 1 && (c = new fe("mstyle", [c]), c.setAttribute("scriptlevel", "1")), c;
27763
+ K += J[ne].length === 0 ? "none " : J[ne][0] ? "dashed " : "solid ";
27764
+ return /[sd]/.test(K) && c.setAttribute("rowlines", K.trim()), p !== "" && (c = new fe("menclose", [c]), c.setAttribute("notation", p.trim())), t.arraystretch && t.arraystretch < 1 && (c = new fe("mstyle", [c]), c.setAttribute("scriptlevel", "1")), c;
27765
27765
  }, Pm = function(t, n) {
27766
27766
  t.envName.includes("ed") || As(t);
27767
27767
  var r = [], a = t.envName.includes("at") ? "alignat" : "align", i = t.envName === "split", s = Er(t.parser, {
@@ -29836,8 +29836,8 @@ $r({
29836
29836
  var A = l.defaultRuleThickness, z = 4 * A;
29837
29837
  if (c - o.depth - (u.height - h) < z) {
29838
29838
  h = z - (c - o.depth) + u.height;
29839
- var Q = 0.8 * l.xHeight - (c - o.depth);
29840
- Q > 0 && (c += Q, h -= Q);
29839
+ var K = 0.8 * l.xHeight - (c - o.depth);
29840
+ K > 0 && (c += K, h -= K);
29841
29841
  }
29842
29842
  var J = [{
29843
29843
  type: "elem",
@@ -29880,8 +29880,8 @@ $r({
29880
29880
  });
29881
29881
  else
29882
29882
  throw new Error("supsub must have either sup or sub.");
29883
- var $ = Iu(s, "right") || "mord";
29884
- return oe([$], [s, oe(["msupsub"], [F])], t);
29883
+ var q = Iu(s, "right") || "mord";
29884
+ return oe([q], [s, oe(["msupsub"], [F])], t);
29885
29885
  },
29886
29886
  mathmlBuilder(e, t) {
29887
29887
  var n = !1, r, a;
@@ -32511,9 +32511,9 @@ function mE(e, t, n) {
32511
32511
  return I.enter("mathFlowFence"), I.enter("mathFlowFenceSequence"), z(J);
32512
32512
  }
32513
32513
  function z(J) {
32514
- return J === 36 ? (F++, I.consume(J), z) : F < s ? Y(J) : (I.exit("mathFlowFenceSequence"), ut(I, Q, "whitespace")(J));
32514
+ return J === 36 ? (F++, I.consume(J), z) : F < s ? Y(J) : (I.exit("mathFlowFenceSequence"), ut(I, K, "whitespace")(J));
32515
32515
  }
32516
- function Q(J) {
32516
+ function K(J) {
32517
32517
  return J === null || Or(J) ? (I.exit("mathFlowFence"), B(J)) : Y(J);
32518
32518
  }
32519
32519
  }
@@ -32822,12 +32822,12 @@ function IE() {
32822
32822
  var X = String(N);
32823
32823
  return !X || X.length >= O ? N : "" + Array(O + 1 - X.length).join(H) + N;
32824
32824
  }, Y = { s: B, z: function(N) {
32825
- var O = -N.utcOffset(), H = Math.abs(O), X = Math.floor(H / 60), q = H % 60;
32826
- return (O <= 0 ? "+" : "-") + B(X, 2, "0") + ":" + B(q, 2, "0");
32825
+ var O = -N.utcOffset(), H = Math.abs(O), X = Math.floor(H / 60), $ = H % 60;
32826
+ return (O <= 0 ? "+" : "-") + B(X, 2, "0") + ":" + B($, 2, "0");
32827
32827
  }, m: function N(O, H) {
32828
32828
  if (O.date() < H.date()) return -N(H, O);
32829
- var X = 12 * (H.year() - O.year()) + (H.month() - O.month()), q = O.clone().add(X, h), W = H - q < 0, w = O.clone().add(X + (W ? -1 : 1), h);
32830
- return +(-(X + (H - q) / (W ? q - w : w - q)) || 0);
32829
+ var X = 12 * (H.year() - O.year()) + (H.month() - O.month()), $ = O.clone().add(X, h), W = H - $ < 0, w = O.clone().add(X + (W ? -1 : 1), h);
32830
+ return +(-(X + (H - $) / (W ? $ - w : w - $)) || 0);
32831
32831
  }, a: function(N) {
32832
32832
  return N < 0 ? Math.ceil(N) || 0 : Math.floor(N);
32833
32833
  }, p: function(N) {
@@ -32836,75 +32836,75 @@ function IE() {
32836
32836
  return N === void 0;
32837
32837
  } }, F = "en", A = {};
32838
32838
  A[F] = I;
32839
- var z = "$isDayjsObject", Q = function(N) {
32840
- return N instanceof K || !(!N || !N[z]);
32839
+ var z = "$isDayjsObject", K = function(N) {
32840
+ return N instanceof Q || !(!N || !N[z]);
32841
32841
  }, J = function N(O, H, X) {
32842
- var q;
32842
+ var $;
32843
32843
  if (!O) return F;
32844
32844
  if (typeof O == "string") {
32845
32845
  var W = O.toLowerCase();
32846
- A[W] && (q = W), H && (A[W] = H, q = W);
32846
+ A[W] && ($ = W), H && (A[W] = H, $ = W);
32847
32847
  var w = O.split("-");
32848
- if (!q && w.length > 1) return N(w[0]);
32848
+ if (!$ && w.length > 1) return N(w[0]);
32849
32849
  } else {
32850
32850
  var ae = O.name;
32851
- A[ae] = O, q = ae;
32851
+ A[ae] = O, $ = ae;
32852
32852
  }
32853
- return !X && q && (F = q), q || !X && F;
32853
+ return !X && $ && (F = $), $ || !X && F;
32854
32854
  }, ne = function(N, O) {
32855
- if (Q(N)) return N.clone();
32855
+ if (K(N)) return N.clone();
32856
32856
  var H = typeof O == "object" ? O : {};
32857
- return H.date = N, H.args = arguments, new K(H);
32858
- }, $ = Y;
32859
- $.l = J, $.i = Q, $.w = function(N, O) {
32857
+ return H.date = N, H.args = arguments, new Q(H);
32858
+ }, q = Y;
32859
+ q.l = J, q.i = K, q.w = function(N, O) {
32860
32860
  return ne(N, { locale: O.$L, utc: O.$u, x: O.$x, $offset: O.$offset });
32861
32861
  };
32862
- var K = (function() {
32862
+ var Q = (function() {
32863
32863
  function N(H) {
32864
32864
  this.$L = J(H.locale, null, !0), this.parse(H), this.$x = this.$x || H.x || {}, this[z] = !0;
32865
32865
  }
32866
32866
  var O = N.prototype;
32867
32867
  return O.parse = function(H) {
32868
32868
  this.$d = (function(X) {
32869
- var q = X.date, W = X.utc;
32870
- if (q === null) return /* @__PURE__ */ new Date(NaN);
32871
- if ($.u(q)) return /* @__PURE__ */ new Date();
32872
- if (q instanceof Date) return new Date(q);
32873
- if (typeof q == "string" && !/Z$/i.test(q)) {
32874
- var w = q.match(E);
32869
+ var $ = X.date, W = X.utc;
32870
+ if ($ === null) return /* @__PURE__ */ new Date(NaN);
32871
+ if (q.u($)) return /* @__PURE__ */ new Date();
32872
+ if ($ instanceof Date) return new Date($);
32873
+ if (typeof $ == "string" && !/Z$/i.test($)) {
32874
+ var w = $.match(E);
32875
32875
  if (w) {
32876
32876
  var ae = w[2] - 1 || 0, ge = (w[7] || "0").substring(0, 3);
32877
32877
  return W ? new Date(Date.UTC(w[1], ae, w[3] || 1, w[4] || 0, w[5] || 0, w[6] || 0, ge)) : new Date(w[1], ae, w[3] || 1, w[4] || 0, w[5] || 0, w[6] || 0, ge);
32878
32878
  }
32879
32879
  }
32880
- return new Date(q);
32880
+ return new Date($);
32881
32881
  })(H), this.init();
32882
32882
  }, O.init = function() {
32883
32883
  var H = this.$d;
32884
32884
  this.$y = H.getFullYear(), this.$M = H.getMonth(), this.$D = H.getDate(), this.$W = H.getDay(), this.$H = H.getHours(), this.$m = H.getMinutes(), this.$s = H.getSeconds(), this.$ms = H.getMilliseconds();
32885
32885
  }, O.$utils = function() {
32886
- return $;
32886
+ return q;
32887
32887
  }, O.isValid = function() {
32888
32888
  return this.$d.toString() !== b;
32889
32889
  }, O.isSame = function(H, X) {
32890
- var q = ne(H);
32891
- return this.startOf(X) <= q && q <= this.endOf(X);
32890
+ var $ = ne(H);
32891
+ return this.startOf(X) <= $ && $ <= this.endOf(X);
32892
32892
  }, O.isAfter = function(H, X) {
32893
32893
  return ne(H) < this.startOf(X);
32894
32894
  }, O.isBefore = function(H, X) {
32895
32895
  return this.endOf(X) < ne(H);
32896
- }, O.$g = function(H, X, q) {
32897
- return $.u(H) ? this[X] : this.set(q, H);
32896
+ }, O.$g = function(H, X, $) {
32897
+ return q.u(H) ? this[X] : this.set($, H);
32898
32898
  }, O.unix = function() {
32899
32899
  return Math.floor(this.valueOf() / 1e3);
32900
32900
  }, O.valueOf = function() {
32901
32901
  return this.$d.getTime();
32902
32902
  }, O.startOf = function(H, X) {
32903
- var q = this, W = !!$.u(X) || X, w = $.p(H), ae = function(Ve, et) {
32904
- var pt = $.w(q.$u ? Date.UTC(q.$y, et, Ve) : new Date(q.$y, et, Ve), q);
32903
+ var $ = this, W = !!q.u(X) || X, w = q.p(H), ae = function(Ve, et) {
32904
+ var pt = q.w($.$u ? Date.UTC($.$y, et, Ve) : new Date($.$y, et, Ve), $);
32905
32905
  return W ? pt : pt.endOf(l);
32906
32906
  }, ge = function(Ve, et) {
32907
- return $.w(q.toDate()[Ve].apply(q.toDate("s"), (W ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(et)), q);
32907
+ return q.w($.toDate()[Ve].apply($.toDate("s"), (W ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(et)), $);
32908
32908
  }, k = this.$W, ve = this.$M, ke = this.$D, Le = "set" + (this.$u ? "UTC" : "");
32909
32909
  switch (w) {
32910
32910
  case m:
@@ -32929,7 +32929,7 @@ function IE() {
32929
32929
  }, O.endOf = function(H) {
32930
32930
  return this.startOf(H, !1);
32931
32931
  }, O.$set = function(H, X) {
32932
- var q, W = $.p(H), w = "set" + (this.$u ? "UTC" : ""), ae = (q = {}, q[l] = w + "Date", q[y] = w + "Date", q[h] = w + "Month", q[m] = w + "FullYear", q[u] = w + "Hours", q[o] = w + "Minutes", q[s] = w + "Seconds", q[i] = w + "Milliseconds", q)[W], ge = W === l ? this.$D + (X - this.$W) : X;
32932
+ var $, W = q.p(H), w = "set" + (this.$u ? "UTC" : ""), ae = ($ = {}, $[l] = w + "Date", $[y] = w + "Date", $[h] = w + "Month", $[m] = w + "FullYear", $[u] = w + "Hours", $[o] = w + "Minutes", $[s] = w + "Seconds", $[i] = w + "Milliseconds", $)[W], ge = W === l ? this.$D + (X - this.$W) : X;
32933
32933
  if (W === h || W === m) {
32934
32934
  var k = this.clone().set(y, 1);
32935
32935
  k.$d[ae](ge), k.init(), this.$d = k.set(y, Math.min(this.$D, k.daysInMonth())).$d;
@@ -32938,29 +32938,29 @@ function IE() {
32938
32938
  }, O.set = function(H, X) {
32939
32939
  return this.clone().$set(H, X);
32940
32940
  }, O.get = function(H) {
32941
- return this[$.p(H)]();
32941
+ return this[q.p(H)]();
32942
32942
  }, O.add = function(H, X) {
32943
- var q, W = this;
32943
+ var $, W = this;
32944
32944
  H = Number(H);
32945
- var w = $.p(X), ae = function(ve) {
32945
+ var w = q.p(X), ae = function(ve) {
32946
32946
  var ke = ne(W);
32947
- return $.w(ke.date(ke.date() + Math.round(ve * H)), W);
32947
+ return q.w(ke.date(ke.date() + Math.round(ve * H)), W);
32948
32948
  };
32949
32949
  if (w === h) return this.set(h, this.$M + H);
32950
32950
  if (w === m) return this.set(m, this.$y + H);
32951
32951
  if (w === l) return ae(1);
32952
32952
  if (w === c) return ae(7);
32953
- var ge = (q = {}, q[o] = r, q[u] = a, q[s] = n, q)[w] || 1, k = this.$d.getTime() + H * ge;
32954
- return $.w(k, this);
32953
+ var ge = ($ = {}, $[o] = r, $[u] = a, $[s] = n, $)[w] || 1, k = this.$d.getTime() + H * ge;
32954
+ return q.w(k, this);
32955
32955
  }, O.subtract = function(H, X) {
32956
32956
  return this.add(-1 * H, X);
32957
32957
  }, O.format = function(H) {
32958
- var X = this, q = this.$locale();
32959
- if (!this.isValid()) return q.invalidDate || b;
32960
- var W = H || "YYYY-MM-DDTHH:mm:ssZ", w = $.z(this), ae = this.$H, ge = this.$m, k = this.$M, ve = q.weekdays, ke = q.months, Le = q.meridiem, Re = function(et, pt, _t, Nt) {
32958
+ var X = this, $ = this.$locale();
32959
+ if (!this.isValid()) return $.invalidDate || b;
32960
+ var W = H || "YYYY-MM-DDTHH:mm:ssZ", w = q.z(this), ae = this.$H, ge = this.$m, k = this.$M, ve = $.weekdays, ke = $.months, Le = $.meridiem, Re = function(et, pt, _t, Nt) {
32961
32961
  return et && (et[pt] || et(X, W)) || _t[pt].slice(0, Nt);
32962
32962
  }, Ge = function(et) {
32963
- return $.s(ae % 12 || 12, et, "0");
32963
+ return q.s(ae % 12 || 12, et, "0");
32964
32964
  }, Ve = Le || function(et, pt, _t) {
32965
32965
  var Nt = et < 12 ? "AM" : "PM";
32966
32966
  return _t ? Nt.toLowerCase() : Nt;
@@ -32971,31 +32971,31 @@ function IE() {
32971
32971
  case "YY":
32972
32972
  return String(X.$y).slice(-2);
32973
32973
  case "YYYY":
32974
- return $.s(X.$y, 4, "0");
32974
+ return q.s(X.$y, 4, "0");
32975
32975
  case "M":
32976
32976
  return k + 1;
32977
32977
  case "MM":
32978
- return $.s(k + 1, 2, "0");
32978
+ return q.s(k + 1, 2, "0");
32979
32979
  case "MMM":
32980
- return Re(q.monthsShort, k, ke, 3);
32980
+ return Re($.monthsShort, k, ke, 3);
32981
32981
  case "MMMM":
32982
32982
  return Re(ke, k);
32983
32983
  case "D":
32984
32984
  return X.$D;
32985
32985
  case "DD":
32986
- return $.s(X.$D, 2, "0");
32986
+ return q.s(X.$D, 2, "0");
32987
32987
  case "d":
32988
32988
  return String(X.$W);
32989
32989
  case "dd":
32990
- return Re(q.weekdaysMin, X.$W, ve, 2);
32990
+ return Re($.weekdaysMin, X.$W, ve, 2);
32991
32991
  case "ddd":
32992
- return Re(q.weekdaysShort, X.$W, ve, 3);
32992
+ return Re($.weekdaysShort, X.$W, ve, 3);
32993
32993
  case "dddd":
32994
32994
  return ve[X.$W];
32995
32995
  case "H":
32996
32996
  return String(ae);
32997
32997
  case "HH":
32998
- return $.s(ae, 2, "0");
32998
+ return q.s(ae, 2, "0");
32999
32999
  case "h":
33000
33000
  return Ge(1);
33001
33001
  case "hh":
@@ -33007,13 +33007,13 @@ function IE() {
33007
33007
  case "m":
33008
33008
  return String(ge);
33009
33009
  case "mm":
33010
- return $.s(ge, 2, "0");
33010
+ return q.s(ge, 2, "0");
33011
33011
  case "s":
33012
33012
  return String(X.$s);
33013
33013
  case "ss":
33014
- return $.s(X.$s, 2, "0");
33014
+ return q.s(X.$s, 2, "0");
33015
33015
  case "SSS":
33016
- return $.s(X.$ms, 3, "0");
33016
+ return q.s(X.$ms, 3, "0");
33017
33017
  case "Z":
33018
33018
  return w;
33019
33019
  }
@@ -33022,9 +33022,9 @@ function IE() {
33022
33022
  }));
33023
33023
  }, O.utcOffset = function() {
33024
33024
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
33025
- }, O.diff = function(H, X, q) {
33026
- var W, w = this, ae = $.p(X), ge = ne(H), k = (ge.utcOffset() - this.utcOffset()) * r, ve = this - ge, ke = function() {
33027
- return $.m(w, ge);
33025
+ }, O.diff = function(H, X, $) {
33026
+ var W, w = this, ae = q.p(X), ge = ne(H), k = (ge.utcOffset() - this.utcOffset()) * r, ve = this - ge, ke = function() {
33027
+ return q.m(w, ge);
33028
33028
  };
33029
33029
  switch (ae) {
33030
33030
  case m:
@@ -33054,17 +33054,17 @@ function IE() {
33054
33054
  default:
33055
33055
  W = ve;
33056
33056
  }
33057
- return q ? W : $.a(W);
33057
+ return $ ? W : q.a(W);
33058
33058
  }, O.daysInMonth = function() {
33059
33059
  return this.endOf(h).$D;
33060
33060
  }, O.$locale = function() {
33061
33061
  return A[this.$L];
33062
33062
  }, O.locale = function(H, X) {
33063
33063
  if (!H) return this.$L;
33064
- var q = this.clone(), W = J(H, X, !0);
33065
- return W && (q.$L = W), q;
33064
+ var $ = this.clone(), W = J(H, X, !0);
33065
+ return W && ($.$L = W), $;
33066
33066
  }, O.clone = function() {
33067
- return $.w(this.$d, this);
33067
+ return q.w(this.$d, this);
33068
33068
  }, O.toDate = function() {
33069
33069
  return new Date(this.valueOf());
33070
33070
  }, O.toJSON = function() {
@@ -33074,14 +33074,14 @@ function IE() {
33074
33074
  }, O.toString = function() {
33075
33075
  return this.$d.toUTCString();
33076
33076
  }, N;
33077
- })(), te = K.prototype;
33077
+ })(), te = Q.prototype;
33078
33078
  return ne.prototype = te, [["$ms", i], ["$s", s], ["$m", o], ["$H", u], ["$W", l], ["$M", h], ["$y", m], ["$D", y]].forEach((function(N) {
33079
33079
  te[N[1]] = function(O) {
33080
33080
  return this.$g(O, N[0], N[1]);
33081
33081
  };
33082
33082
  })), ne.extend = function(N, O) {
33083
- return N.$i || (N(O, K, ne), N.$i = !0), ne;
33084
- }, ne.locale = J, ne.isDayjs = Q, ne.unix = function(N) {
33083
+ return N.$i || (N(O, Q, ne), N.$i = !0), ne;
33084
+ }, ne.locale = J, ne.isDayjs = K, ne.unix = function(N) {
33085
33085
  return ne(1e3 * N);
33086
33086
  }, ne.en = A[F], ne.Ls = A, ne.p = {}, ne;
33087
33087
  }));
@@ -33448,61 +33448,62 @@ function ts({
33448
33448
  conversationHistoryId: t = null,
33449
33449
  disabled: n = !1,
33450
33450
  getCopyText: r,
33451
- isVisible: a = !0,
33452
- isTestUser: i = !1,
33453
- submitEvent: s = null,
33454
- clientId: o = null
33451
+ isLongMessage: a = !1,
33452
+ isVisible: i = !0,
33453
+ isTestUser: s = !1,
33454
+ submitEvent: o = null,
33455
+ clientId: u = null
33455
33456
  }) {
33456
- const [u, l] = Ee(!1), [c, h] = Ee(!1), p = Je(null), [m] = Ee(
33457
+ const [l, c] = Ee(!1), [h, p] = Ee(!1), m = Je(null), [y] = Ee(
33457
33458
  () => Math.random().toString(36).slice(2, 10)
33458
- ), y = `${qE}-${t ?? "no-conversation-id"}-${m}`, b = !n && a, E = b && c, v = ep(e), I = u ? "Copied!" : v.tooltip, B = e === "message" ? "Message Copied!" : "Response Copied!", Y = $E({ disabled: n, isCopied: u, copyKind: e });
33459
+ ), b = `${qE}-${t ?? "no-conversation-id"}-${y}`, E = !n && i, v = E && h, I = ep(e), B = l ? "Copied!" : I.tooltip, Y = e === "message" ? "Message Copied!" : "Response Copied!", F = $E({ disabled: n, isCopied: l, copyKind: e });
33459
33460
  _e(
33460
33461
  () => () => {
33461
- p.current && window.clearTimeout(p.current);
33462
+ m.current && window.clearTimeout(m.current);
33462
33463
  },
33463
33464
  []
33464
33465
  );
33465
- const F = () => {
33466
- p.current && window.clearTimeout(p.current), p.current = window.setTimeout(() => {
33467
- l(!1), h(!1);
33466
+ const A = () => {
33467
+ m.current && window.clearTimeout(m.current), m.current = window.setTimeout(() => {
33468
+ c(!1), p(!1);
33468
33469
  }, jE);
33469
- }, A = async () => {
33470
- if (n || !a) return;
33471
- const z = r?.()?.trim();
33472
- if (!z) return;
33473
- const Q = t ?? (o ? gn(o) : null);
33474
- await YE(z) && (s?.({
33470
+ }, z = async () => {
33471
+ if (n || !i) return;
33472
+ const K = r?.()?.trim();
33473
+ if (!K) return;
33474
+ const J = t ?? (u ? gn(u) : null);
33475
+ await YE(K) && (o?.({
33475
33476
  name: "xpert.chatbot.popup.chat.message.copied",
33476
33477
  payload: {
33477
- [e === "message" ? "message" : "apiResponseMessage"]: z,
33478
+ [e === "message" ? "message" : "apiResponseMessage"]: K,
33478
33479
  category: "2u",
33479
33480
  label: "xpert-chatbot",
33480
- isTestUser: i,
33481
- clientId: o,
33482
- conversationHistoryId: Q
33481
+ isTestUser: s,
33482
+ clientId: u,
33483
+ conversationHistoryId: J
33483
33484
  }
33484
- }), l(!0), h(!0), F());
33485
+ }), c(!0), p(!0), A());
33485
33486
  };
33486
33487
  return /* @__PURE__ */ S.jsx(
33487
33488
  "div",
33488
33489
  {
33489
33490
  className: `xpert-chatbot-response-copy${e === "message" ? " xpert-chatbot-response-copy--message" : ""}`,
33490
- "data-visible": a,
33491
+ "data-visible": i,
33491
33492
  children: /* @__PURE__ */ S.jsxs(
33492
33493
  "div",
33493
33494
  {
33494
33495
  className: "xpert-chatbot-response-copy__button-wrap",
33495
- onBlur: (z) => {
33496
- !z.currentTarget.contains(z.relatedTarget) && !u && h(!1);
33496
+ onBlur: (K) => {
33497
+ !K.currentTarget.contains(K.relatedTarget) && !l && p(!1);
33497
33498
  },
33498
33499
  onFocus: () => {
33499
- b && !u && h(!0);
33500
+ E && !l && p(!0);
33500
33501
  },
33501
33502
  onMouseEnter: () => {
33502
- b && !u && h(!0);
33503
+ E && !l && p(!0);
33503
33504
  },
33504
33505
  onMouseLeave: () => {
33505
- b && !u && h(!1);
33506
+ E && !l && p(!1);
33506
33507
  },
33507
33508
  children: [
33508
33509
  /* @__PURE__ */ S.jsx(
@@ -33510,20 +33511,20 @@ function ts({
33510
33511
  {
33511
33512
  type: "button",
33512
33513
  className: "xpert-chatbot-response-copy__button",
33513
- "aria-describedby": E ? y : void 0,
33514
- "aria-label": Y,
33515
- "aria-disabled": n || !a,
33516
- "aria-hidden": !a,
33517
- "data-copied": u,
33518
- "data-visible": a,
33519
- disabled: n || !a,
33520
- tabIndex: a ? 0 : -1,
33521
- onClick: A,
33514
+ "aria-describedby": v ? b : void 0,
33515
+ "aria-label": F,
33516
+ "aria-disabled": n || !i,
33517
+ "aria-hidden": !i,
33518
+ "data-copied": l,
33519
+ "data-visible": i,
33520
+ disabled: n || !i,
33521
+ tabIndex: i ? 0 : -1,
33522
+ onClick: z,
33522
33523
  children: /* @__PURE__ */ S.jsx(
33523
33524
  Dn,
33524
33525
  {
33525
- "data-testid": u ? "copied-check-icon" : "copy-response-icon",
33526
- icon: u ? "material-symbols:check-rounded" : "material-symbols:content-copy-outline-rounded"
33526
+ "data-testid": l ? "copied-check-icon" : "copy-response-icon",
33527
+ icon: l ? "material-symbols:check-rounded" : "material-symbols:content-copy-outline-rounded"
33527
33528
  }
33528
33529
  )
33529
33530
  }
@@ -33531,12 +33532,12 @@ function ts({
33531
33532
  /* @__PURE__ */ S.jsx(
33532
33533
  "span",
33533
33534
  {
33534
- id: y,
33535
+ id: b,
33535
33536
  role: "tooltip",
33536
- className: `xpert-chatbot-response-copy__tooltip${e === "message" ? " xpert-chatbot-response-copy__tooltip--below-left" : ""}`,
33537
- "aria-hidden": !E,
33538
- "data-visible": E,
33539
- children: I
33537
+ className: `xpert-chatbot-response-copy__tooltip${e === "message" && !a ? " xpert-chatbot-response-copy__tooltip--below-left" : ""}`,
33538
+ "aria-hidden": !v,
33539
+ "data-visible": v,
33540
+ children: B
33540
33541
  }
33541
33542
  ),
33542
33543
  /* @__PURE__ */ S.jsx(
@@ -33546,7 +33547,7 @@ function ts({
33546
33547
  role: "status",
33547
33548
  "aria-live": "polite",
33548
33549
  "aria-atomic": "true",
33549
- children: u ? B : ""
33550
+ children: l ? Y : ""
33550
33551
  }
33551
33552
  )
33552
33553
  ]
@@ -33564,6 +33565,7 @@ ts.propTypes = {
33564
33565
  ]),
33565
33566
  disabled: T.bool,
33566
33567
  getCopyText: T.func.isRequired,
33568
+ isLongMessage: T.bool,
33567
33569
  isVisible: T.bool,
33568
33570
  isTestUser: T.bool,
33569
33571
  submitEvent: T.func
@@ -33602,13 +33604,21 @@ const VE = (e) => ({
33602
33604
  }
33603
33605
  if (typeof e == "string") return e.trim() || void 0;
33604
33606
  }, WE = (e) => {
33605
- const n = new DOMParser().parseFromString(e, "text/html");
33606
- let r = 1;
33607
- const a = (i) => {
33608
- i.tagName === "DOCUMENT-SOURCE" && i.setAttribute("data-index", r++), Array.from(i.children).forEach(a);
33607
+ if (typeof e != "string")
33608
+ return "";
33609
+ const t = e.replace(/<!doctype[^>]*>/gi, "").replace(/<\/?(html|head|body)\b[^>]*>/gi, "").replace(/<\/?(script|style|noscript)\b[^>]*>/gi, ""), n = new DOMParser();
33610
+ let r;
33611
+ try {
33612
+ r = n.parseFromString(t, "text/html");
33613
+ } catch {
33614
+ return t;
33615
+ }
33616
+ let a = 1;
33617
+ const i = (s) => {
33618
+ s.tagName === "DOCUMENT-SOURCE" && s.setAttribute("data-index", a++), Array.from(s.children).forEach(i);
33609
33619
  };
33610
- return Array.from(n.body.children).forEach(a), n.body.innerHTML;
33611
- }, XE = "Sure, I can get you to someone who can help.", KE = (e, t) => ({
33620
+ return Array.from(r.body.children).forEach(i), r.body.innerHTML;
33621
+ }, XE = (e = "") => typeof e != "string" ? !1 : /<!doctype|<\/?(?:html|head|body)\b/i.test(e), KE = "Sure, I can get you to someone who can help.", QE = (e, t) => ({
33612
33622
  agent: {
33613
33623
  bubbleClassName: "xpert-chatbot-popup__bubble--assistant",
33614
33624
  bubbleStyle: {},
@@ -33636,7 +33646,7 @@ const VE = (e) => ({
33636
33646
  innerStyle: { justifyContent: "flex-end" },
33637
33647
  sectionAriaLabel: "The user said"
33638
33648
  }
33639
- }), QE = (e, t) => {
33649
+ }), ZE = (e, t) => {
33640
33650
  if (!e) return e;
33641
33651
  try {
33642
33652
  const n = new URL(e, window.location.origin);
@@ -33644,10 +33654,10 @@ const VE = (e) => ({
33644
33654
  } catch {
33645
33655
  return e;
33646
33656
  }
33647
- }, Bu = (e) => Array.isArray(e) ? e.some(Bu) : Uo(e) ? e.type === "img" || e.type === Pl ? !0 : Bu(e.props?.children) : !1, np = (e) => e ? e.tagName === "img" ? !0 : (e.children ?? []).some(np) : !1, ZE = (e, t, n, r) => ({
33657
+ }, Bu = (e) => Array.isArray(e) ? e.some(Bu) : Uo(e) ? e.type === "img" || e.type === Pl ? !0 : Bu(e.props?.children) : !1, np = (e) => e ? e.tagName === "img" ? !0 : (e.children ?? []).some(np) : !1, JE = (e, t, n, r) => ({
33648
33658
  img: ({ src: a, alt: i }) => /* @__PURE__ */ S.jsx(O2, { fallback: /* @__PURE__ */ S.jsx("div", { children: "Loading image..." }), children: /* @__PURE__ */ S.jsx(Pl, { src: a, alt: i }) }),
33649
33659
  a: ({ children: a, href: i, ...s }) => {
33650
- const o = r ? QE(i, n) : i, u = (l) => {
33660
+ const o = r ? ZE(i, n) : i, u = (l) => {
33651
33661
  const c = l?.type === "keydown", h = typeof l?.button != "number" || l.button === 0;
33652
33662
  if (!(!c && !h) && (l?.preventDefault?.(), l?.currentTarget?.dataset && (l.currentTarget.dataset.xpertLinkOpened = "1"), e?.(l, o), o))
33653
33663
  try {
@@ -33717,13 +33727,13 @@ const VE = (e) => ({
33717
33727
  liveAgent: b,
33718
33728
  role: E = Ne.ASSISTANT,
33719
33729
  timestamp: v
33720
- } = t ?? {}, I = Je(null), [B, Y] = Ee(!1), F = E === Ne.TOOL ? Ne.ASSISTANT : E, A = b || u === y1.ESCALATE_TO_AN_AGENT, z = !A && !!m, Q = r && z && [Ne.AGENT, Ne.ASSISTANT].includes(F), J = r && z && F === Ne.USER, ne = Gt(
33721
- () => KE(
33730
+ } = t ?? {}, I = Je(null), [B, Y] = Ee(!1), F = E === Ne.TOOL ? Ne.ASSISTANT : E, A = b || u === y1.ESCALATE_TO_AN_AGENT, z = !A && !!m, K = r && z && [Ne.AGENT, Ne.ASSISTANT].includes(F), J = r && z && F === Ne.USER, ne = Gt(
33731
+ () => QE(
33722
33732
  l,
33723
33733
  c?.userMessageBubble?.style
33724
33734
  ),
33725
33735
  [l, c?.userMessageBubble?.style]
33726
- ), $ = Gt(
33736
+ ), q = Gt(
33727
33737
  () => VE(u)(m),
33728
33738
  [m, u]
33729
33739
  );
@@ -33744,25 +33754,25 @@ const VE = (e) => ({
33744
33754
  return;
33745
33755
  }
33746
33756
  typeof te.scrollIntoView == "function" && te.scrollIntoView({ block: "end" });
33747
- }, [a, n, $]);
33748
- const K = Gt(() => {
33757
+ }, [a, n, q]);
33758
+ const Q = Gt(() => {
33749
33759
  if (!z) return null;
33750
33760
  if (F === Ne.USER)
33751
- return $;
33752
- const te = WE($), N = F === Ne.AGENT || F === Ne.ASSISTANT;
33761
+ return q;
33762
+ const te = WE(q), N = !XE(q), O = F === Ne.AGENT || F === Ne.ASSISTANT;
33753
33763
  return /* @__PURE__ */ S.jsx(
33754
33764
  rl,
33755
33765
  {
33756
- components: ZE(
33766
+ components: JE(
33757
33767
  i,
33758
33768
  ne[F].bubbleStyle,
33759
33769
  h,
33760
- N
33770
+ O
33761
33771
  ),
33762
33772
  linkTarget: "_blank",
33763
33773
  remarkPlugins: [[_E, {}]],
33764
33774
  rehypePlugins: [
33765
- Uv,
33775
+ ...N ? [Uv] : [],
33766
33776
  [
33767
33777
  hE,
33768
33778
  {
@@ -33776,7 +33786,7 @@ const VE = (e) => ({
33776
33786
  );
33777
33787
  }, [
33778
33788
  z,
33779
- $,
33789
+ q,
33780
33790
  i,
33781
33791
  ne,
33782
33792
  F,
@@ -33826,9 +33836,9 @@ const VE = (e) => ({
33826
33836
  className: ne[F].bubbleClassName,
33827
33837
  style: ne[F].bubbleStyle,
33828
33838
  children: [
33829
- /* @__PURE__ */ S.jsx("div", { ref: I, children: K }),
33839
+ /* @__PURE__ */ S.jsx("div", { ref: I, children: Q }),
33830
33840
  A && /* @__PURE__ */ S.jsxs(S.Fragment, { children: [
33831
- /* @__PURE__ */ S.jsx("div", { children: XE }),
33841
+ /* @__PURE__ */ S.jsx("div", { children: KE }),
33832
33842
  /* @__PURE__ */ S.jsx(
33833
33843
  Dl,
33834
33844
  {
@@ -33856,14 +33866,14 @@ const VE = (e) => ({
33856
33866
  ]
33857
33867
  }
33858
33868
  ),
33859
- Q && /* @__PURE__ */ S.jsx(
33869
+ K && /* @__PURE__ */ S.jsx(
33860
33870
  ts,
33861
33871
  {
33862
33872
  clientId: h,
33863
33873
  copyKind: "response",
33864
33874
  conversationHistoryId: y,
33865
33875
  disabled: a,
33866
- getCopyText: () => $ || "",
33876
+ getCopyText: () => q || "",
33867
33877
  isTestUser: e,
33868
33878
  submitEvent: o
33869
33879
  }
@@ -33875,7 +33885,8 @@ const VE = (e) => ({
33875
33885
  copyKind: "message",
33876
33886
  conversationHistoryId: y,
33877
33887
  disabled: a,
33878
- getCopyText: () => $ || "",
33888
+ getCopyText: () => q || "",
33889
+ isLongMessage: (q?.length ?? 0) > 15,
33879
33890
  isVisible: p || B,
33880
33891
  isTestUser: e,
33881
33892
  submitEvent: o
@@ -34130,12 +34141,12 @@ si.defaultProps = {
34130
34141
  loadingHistory: !1
34131
34142
  };
34132
34143
  si.displayName = "ConversationMessages";
34133
- const JE = "https://code.jquery.com/jquery-3.7.1.min.js", ex = "https://prospect-form-plugin.2u.com/cask-latest/lead.form.plugin.js?ver=1.0", tx = "https://onlinelaw.wcl.american.edu/wp-content/themes/twoyou/dist/static/scripts/taxi.js?m=1776347786j", nx = "https://tmq.prod.2u.com/v1/tmq", rx = "mls_base_page", ax = "Get Admissions and Tuition Information", ix = "#005099", sx = "Answer a few quick questions to determine if program is a good fit for you.", ox = "No GRE or LSAT Scores Required.", ux = "Taxi form configuration is missing required values", lx = {
34144
+ const ex = "https://code.jquery.com/jquery-3.7.1.min.js", tx = "https://prospect-form-plugin.2u.com/cask-latest/lead.form.plugin.js?ver=1.0", nx = "https://onlinelaw.wcl.american.edu/wp-content/themes/twoyou/dist/static/scripts/taxi.js?m=1776347786j", rx = "https://tmq.prod.2u.com/v1/tmq", ax = "mls_base_page", ix = "Get Admissions and Tuition Information", sx = "#005099", ox = "Answer a few quick questions to determine if program is a good fit for you.", ux = "No GRE or LSAT Scores Required.", lx = "Taxi form configuration is missing required values", cx = {
34134
34145
  loading: "Loading..."
34135
- }, cx = [
34146
+ }, dx = [
34136
34147
  "https://whitelabel.2u.com/cdn/v1/d52ded4d-f92c-43a8-985b-4b0724be74b2/marketing/whitelabel.fonts.min.css?ver=1.0",
34137
34148
  "https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&family=Open+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400;1,500;1,600;1,700;1,800&display=swap"
34138
- ], dx = {
34149
+ ], hx = {
34139
34150
  "--var-color-theme-dark": "#0f2846",
34140
34151
  "--var-color-theme-light": "#c4122e",
34141
34152
  "--var-color-theme-cta": "#005099",
@@ -34151,7 +34162,7 @@ const JE = "https://code.jquery.com/jquery-3.7.1.min.js", ex = "https://prospect
34151
34162
  "--var-paragraph-font-family": "Source Serif Pro",
34152
34163
  "--var-h3-font-size": "28px",
34153
34164
  "--var-h3-font-family": "GT Walsheim"
34154
- }, hx = (e) => {
34165
+ }, fx = (e) => {
34155
34166
  if (typeof document > "u" || document.querySelector(`link[href="${e}"]`)) return;
34156
34167
  const t = document.createElement("link");
34157
34168
  t.rel = "stylesheet", t.href = e, t.dataset.xpertTaxiAsset = "true", document.head.appendChild(t);
@@ -34168,10 +34179,10 @@ const JE = "https://code.jquery.com/jquery-3.7.1.min.js", ex = "https://prospect
34168
34179
  a.dataset.loaded = "true", n(a);
34169
34180
  }), a.addEventListener("error", r, { once: !0 }), document.body.appendChild(a);
34170
34181
  });
34171
- }, zd = (e) => e instanceof Error ? e.message : "Unknown Taxi form error", fx = (e) => !e || typeof e != "object" ? null : e, mx = (e) => `${e}-taxi-lead-form-template`, px = ({ formId: e, prospectFormGrouping: t }) => `${t}-${e}`, gx = ({ formId: e, prospectFormGrouping: t }) => `https://prospect-form-packages.2u.com/${t}/${e}-multi.json`, bx = ({ clientId: e, taxiPackageKey: t }) => ({
34182
+ }, zd = (e) => e instanceof Error ? e.message : "Unknown Taxi form error", mx = (e) => !e || typeof e != "object" ? null : e, px = (e) => `${e}-taxi-lead-form-template`, gx = ({ formId: e, prospectFormGrouping: t }) => `${t}-${e}`, bx = ({ formId: e, prospectFormGrouping: t }) => `https://prospect-form-packages.2u.com/${t}/${e}-multi.json`, yx = ({ clientId: e, taxiPackageKey: t }) => ({
34172
34183
  short: `${t}-hp-taxi-lead-form-package-${e}`,
34173
34184
  full: `${t}-full-taxi-lead-form-package-${e}`
34174
- }), yx = ({ clientId: e, taxiPackageKey: t }) => `${window.mkTaxiPackageId(!1, t)}-${e}`, vx = ({ formId: e, prospectFormGrouping: t }) => ({
34185
+ }), vx = ({ clientId: e, taxiPackageKey: t }) => `${window.mkTaxiPackageId(!1, t)}-${e}`, Tx = ({ formId: e, prospectFormGrouping: t }) => ({
34175
34186
  formId: `form-id-${e}`,
34176
34187
  prospectFormGrouping: t,
34177
34188
  thankYouURL: {
@@ -34180,10 +34191,10 @@ const JE = "https://code.jquery.com/jquery-3.7.1.min.js", ex = "https://prospect
34180
34191
  },
34181
34192
  splashCreative: {
34182
34193
  valid: !0,
34183
- value: rx
34194
+ value: ax
34184
34195
  },
34185
34196
  env: "prod"
34186
- }), Tx = ({
34197
+ }), Ex = ({
34187
34198
  clientId: e,
34188
34199
  resolvedMountPointId: t,
34189
34200
  taxiPackageKey: n,
@@ -34192,13 +34203,13 @@ const JE = "https://code.jquery.com/jquery-3.7.1.min.js", ex = "https://prospect
34192
34203
  idPrefix: e,
34193
34204
  mountPoint: t,
34194
34205
  template: r,
34195
- packageFrom: yx({ clientId: e, taxiPackageKey: n })
34196
- }), Ex = async (e) => {
34197
- await Lo(JE);
34206
+ packageFrom: vx({ clientId: e, taxiPackageKey: n })
34207
+ }), xx = async (e) => {
34208
+ await Lo(ex);
34198
34209
  const [t] = await Promise.all([
34199
34210
  fetch(e),
34200
- Lo(ex),
34201
- Lo(tx)
34211
+ Lo(tx),
34212
+ Lo(nx)
34202
34213
  ]);
34203
34214
  if (!t.ok)
34204
34215
  throw new Error(`Taxi package request failed with ${t.status}`);
@@ -34207,7 +34218,7 @@ const JE = "https://code.jquery.com/jquery-3.7.1.min.js", ex = "https://prospect
34207
34218
  short: n[0],
34208
34219
  full: n[1]
34209
34220
  };
34210
- }, xx = (e, t) => e === "error" ? `Taxi form failed to load: ${t}` : lx[e] ?? null, jd = (e) => typeof e != "string" ? !1 : e.includes(nx), qd = (e) => {
34221
+ }, Sx = (e, t) => e === "error" ? `Taxi form failed to load: ${t}` : cx[e] ?? null, jd = (e) => typeof e != "string" ? !1 : e.includes(rx), qd = (e) => {
34211
34222
  if (typeof e == "string") return e;
34212
34223
  if (e == null) return "";
34213
34224
  try {
@@ -34248,11 +34259,11 @@ const JE = "https://code.jquery.com/jquery-3.7.1.min.js", ex = "https://prospect
34248
34259
  {
34249
34260
  id: `${e}-title`,
34250
34261
  className: "h3",
34251
- style: { color: ix },
34252
- children: ax
34262
+ style: { color: sx },
34263
+ children: ix
34253
34264
  }
34254
34265
  ),
34255
- /* @__PURE__ */ S.jsx("p", { id: `${e}-intro_text`, className: "u--margin-bottom-2", children: sx })
34266
+ /* @__PURE__ */ S.jsx("p", { id: `${e}-intro_text`, className: "u--margin-bottom-2", children: ox })
34256
34267
  ] }),
34257
34268
  /* @__PURE__ */ S.jsx("div", { id: `${e}-lead-form-progress-bar-mount-point` })
34258
34269
  ] }),
@@ -34270,7 +34281,7 @@ const JE = "https://code.jquery.com/jquery-3.7.1.min.js", ex = "https://prospect
34270
34281
  ),
34271
34282
  /* @__PURE__ */ S.jsx("div", { id: `${e}-lead-form-footer-mount-point` })
34272
34283
  ] }),
34273
- /* @__PURE__ */ S.jsx("p", { className: "taxi-form---footer-text", children: ox })
34284
+ /* @__PURE__ */ S.jsx("p", { className: "taxi-form---footer-text", children: ux })
34274
34285
  ]
34275
34286
  }
34276
34287
  )
@@ -34282,26 +34293,26 @@ const JE = "https://code.jquery.com/jquery-3.7.1.min.js", ex = "https://prospect
34282
34293
  onSubmitted: r = null,
34283
34294
  taxiForm: a = null
34284
34295
  }) => {
34285
- const i = fx(a), s = i?.clientId ?? null, o = i?.prospectFormGrouping ?? null, u = i?.formId ?? null, l = !!(s && o && u), c = s ?? "unconfigured-client", h = l ? px({ formId: u, prospectFormGrouping: o }) : null, p = l ? gx({ formId: u, prospectFormGrouping: o }) : null, [m, y] = Ee("idle"), [b, E] = Ee(null), [v, I] = Ee(null), B = Je(null), Y = Je(!1), F = e ?? `form-id-${c}`, A = h ? bx({ clientId: c, taxiPackageKey: h }) : {
34296
+ const i = mx(a), s = i?.clientId ?? null, o = i?.prospectFormGrouping ?? null, u = i?.formId ?? null, l = !!(s && o && u), c = s ?? "unconfigured-client", h = l ? gx({ formId: u, prospectFormGrouping: o }) : null, p = l ? bx({ formId: u, prospectFormGrouping: o }) : null, [m, y] = Ee("idle"), [b, E] = Ee(null), [v, I] = Ee(null), B = Je(null), Y = Je(!1), F = e ?? `form-id-${c}`, A = h ? yx({ clientId: c, taxiPackageKey: h }) : {
34286
34297
  short: `taxi-form-missing-short-package-${c}`,
34287
34298
  full: `taxi-form-missing-full-package-${c}`
34288
- }, z = mx(c), Q = xx(m, b), J = Je(!1), ne = Je(!1), $ = Wt(() => {
34299
+ }, z = px(c), K = Sx(m, b), J = Je(!1), ne = Je(!1), q = Wt(() => {
34289
34300
  ne.current || J.current || (J.current = !0, n?.());
34290
- }, [n]), K = Wt(() => {
34301
+ }, [n]), Q = Wt(() => {
34291
34302
  ne.current || (ne.current = !0, J.current = !1, r?.());
34292
34303
  }, [r]);
34293
34304
  return _e(() => {
34294
- cx.forEach(hx);
34305
+ dx.forEach(fx);
34295
34306
  }, []), _e(() => {
34296
34307
  let N = !1;
34297
34308
  return (async () => {
34298
34309
  if (!l || !p) {
34299
- E(ux), y("error");
34310
+ E(lx), y("error");
34300
34311
  return;
34301
34312
  }
34302
34313
  try {
34303
34314
  y("loading"), E(null);
34304
- const H = await Ex(p);
34315
+ const H = await xx(p);
34305
34316
  if (N) return;
34306
34317
  I(H);
34307
34318
  } catch (H) {
@@ -34317,29 +34328,29 @@ const JE = "https://code.jquery.com/jquery-3.7.1.min.js", ex = "https://prospect
34317
34328
  const N = window.fetch;
34318
34329
  if (typeof N == "function")
34319
34330
  return window.fetch = async (...O) => {
34320
- const [H, X] = O, q = typeof H == "string" ? H : H?.url;
34321
- if (jd(q)) {
34322
- $();
34331
+ const [H, X] = O, $ = typeof H == "string" ? H : H?.url;
34332
+ if (jd($)) {
34333
+ q();
34323
34334
  const W = qd(X?.body);
34324
- $d(W) && K();
34335
+ $d(W) && Q();
34325
34336
  }
34326
34337
  return N(...O);
34327
34338
  }, () => {
34328
34339
  window.fetch = N;
34329
34340
  };
34330
- }, [$, K]), _e(() => {
34341
+ }, [q, Q]), _e(() => {
34331
34342
  if (typeof window > "u") return;
34332
34343
  const N = window.XMLHttpRequest?.prototype?.open, O = window.XMLHttpRequest?.prototype?.send;
34333
34344
  if (!(typeof N != "function" || typeof O != "function"))
34334
34345
  return window.XMLHttpRequest.prototype.open = function(...X) {
34335
34346
  return this.__xpertRequestUrl = X[1], N.apply(this, X);
34336
34347
  }, window.XMLHttpRequest.prototype.send = function(...X) {
34337
- const q = qd(X[0]);
34338
- return jd(this.__xpertRequestUrl) && ($(), $d(q) && K()), O.apply(this, X);
34348
+ const $ = qd(X[0]);
34349
+ return jd(this.__xpertRequestUrl) && (q(), $d($) && Q()), O.apply(this, X);
34339
34350
  }, () => {
34340
34351
  window.XMLHttpRequest.prototype.open = N, window.XMLHttpRequest.prototype.send = O;
34341
34352
  };
34342
- }, [$, K]), _e(() => {
34353
+ }, [q, Q]), _e(() => {
34343
34354
  if (!v || !l || !h || Y.current)
34344
34355
  return;
34345
34356
  let N = !1, O;
@@ -34356,16 +34367,16 @@ const JE = "https://code.jquery.com/jquery-3.7.1.min.js", ex = "https://prospect
34356
34367
  childList: !0,
34357
34368
  subtree: !0
34358
34369
  }), Y.current = !0, window.setupTaxiForm(
34359
- vx({ formId: u, prospectFormGrouping: o }),
34360
- Tx({
34370
+ Tx({ formId: u, prospectFormGrouping: o }),
34371
+ Ex({
34361
34372
  clientId: c,
34362
34373
  resolvedMountPointId: F,
34363
34374
  taxiPackageKey: h,
34364
34375
  templateId: z
34365
34376
  })
34366
34377
  ), H.childElementCount && y("ready");
34367
- } catch (q) {
34368
- N || (E(zd(q)), y("error"));
34378
+ } catch ($) {
34379
+ N || (E(zd($)), y("error"));
34369
34380
  }
34370
34381
  })(), () => {
34371
34382
  N = !0, O?.disconnect();
@@ -34383,25 +34394,25 @@ const JE = "https://code.jquery.com/jquery-3.7.1.min.js", ex = "https://prospect
34383
34394
  const N = B.current;
34384
34395
  if (!N) return;
34385
34396
  const O = (X) => {
34386
- const q = X.target;
34387
- q instanceof Element && (q.closest(
34397
+ const $ = X.target;
34398
+ $ instanceof Element && ($.closest(
34388
34399
  'input, select, textarea, .checkbox .label, .radio .label, .lead-form-next-step, [id$="lead-form-next-action-button"]'
34389
- ) && $(), q.closest(
34400
+ ) && q(), $.closest(
34390
34401
  '[id$="lead-form-submit-action-button"], button[type="submit"]'
34391
- ) && K());
34402
+ ) && Q());
34392
34403
  }, H = (X) => {
34393
34404
  X.preventDefault();
34394
34405
  };
34395
34406
  return N.addEventListener("input", O, !0), N.addEventListener("change", O, !0), N.addEventListener("click", O, !0), N.addEventListener("submit", H, !0), () => {
34396
34407
  N.removeEventListener("input", O, !0), N.removeEventListener("change", O, !0), N.removeEventListener("click", O, !0), N.removeEventListener("submit", H, !0);
34397
34408
  };
34398
- }, [$, K, v]), /* @__PURE__ */ S.jsxs("section", { className: "xpert-taxi-form", "aria-label": "Taxi Form", children: [
34399
- Q && /* @__PURE__ */ S.jsx("div", { className: "xpert-taxi-form__status", "data-state": m, children: Q }),
34409
+ }, [q, Q, v]), /* @__PURE__ */ S.jsxs("section", { className: "xpert-taxi-form", "aria-label": "Taxi Form", children: [
34410
+ K && /* @__PURE__ */ S.jsx("div", { className: "xpert-taxi-form__status", "data-state": m, children: K }),
34400
34411
  /* @__PURE__ */ S.jsx(
34401
34412
  "div",
34402
34413
  {
34403
34414
  className: "xpert-taxi-form__canvas hero-plp-form",
34404
- style: dx,
34415
+ style: hx,
34405
34416
  children: /* @__PURE__ */ S.jsx("div", { className: "container leadFormWrapper leadFormWrapper--plp", children: /* @__PURE__ */ S.jsx("div", { className: "leadform", children: /* @__PURE__ */ S.jsxs(
34406
34417
  "div",
34407
34418
  {
@@ -34561,37 +34572,37 @@ up.propTypes = {
34561
34572
  color: T.string
34562
34573
  }).isRequired
34563
34574
  };
34564
- const lp = "xpert_lead_capture_state", Sx = 3600 * 24 * 30, Cx = (e) => {
34575
+ const lp = "xpert_lead_capture_state", Cx = 3600 * 24 * 30, wx = (e) => {
34565
34576
  if (typeof document > "u") return null;
34566
34577
  const t = document.cookie ? document.cookie.split("; ") : [], n = `${e}=`, r = t.find((a) => a.startsWith(n));
34567
34578
  return r ? r.slice(n.length) : null;
34568
- }, wx = () => {
34569
- const e = Cx(lp);
34579
+ }, Ax = () => {
34580
+ const e = wx(lp);
34570
34581
  if (!e) return null;
34571
34582
  try {
34572
34583
  return JSON.parse(decodeURIComponent(e));
34573
34584
  } catch {
34574
34585
  return null;
34575
34586
  }
34576
- }, Ax = (e) => {
34587
+ }, _x = (e) => {
34577
34588
  typeof document > "u" || (document.cookie = `${lp}=${encodeURIComponent(
34578
34589
  JSON.stringify(e)
34579
- )}; path=/; max-age=${Sx}; SameSite=Lax`);
34580
- }, _x = ({
34590
+ )}; path=/; max-age=${Cx}; SameSite=Lax`);
34591
+ }, kx = ({
34581
34592
  clientId: e,
34582
34593
  started: t,
34583
34594
  submitted: n,
34584
34595
  insertIndex: r = null
34585
34596
  }) => {
34586
- Ax({
34597
+ _x({
34587
34598
  clientId: e,
34588
34599
  started: t,
34589
34600
  submitted: n,
34590
34601
  insertIndex: r,
34591
34602
  updatedAt: Date.now()
34592
34603
  });
34593
- }, kx = ({ clientId: e, messageCount: t }) => {
34594
- const n = wx();
34604
+ }, Ix = ({ clientId: e, messageCount: t }) => {
34605
+ const n = Ax();
34595
34606
  if (!n)
34596
34607
  return { shouldRestore: !1, insertIndex: t };
34597
34608
  if (!((!n.clientId || n.clientId === e) && n.started && !n.submitted))
@@ -34607,7 +34618,7 @@ const lp = "xpert_lead_capture_state", Sx = 3600 * 24 * 30, Cx = (e) => {
34607
34618
  nextStepButtonBackgroundColor: "#000000",
34608
34619
  tooltipBackgroundColor: "#F5F5F5",
34609
34620
  tooltipTextColor: "#374151"
34610
- }, Ix = ({
34621
+ }, Nx = ({
34611
34622
  clientId: e,
34612
34623
  conversationScreen: t,
34613
34624
  isSurveyOverlayActive: n,
@@ -34637,14 +34648,14 @@ const lp = "xpert_lead_capture_state", Sx = 3600 * 24 * 30, Cx = (e) => {
34637
34648
  backgroundColor: b.tooltipAccentColor
34638
34649
  }, Y = ({
34639
34650
  started: ne,
34640
- submitted: $,
34641
- insertIndex: K = null
34651
+ submitted: q,
34652
+ insertIndex: Q = null
34642
34653
  }) => {
34643
- _x({
34654
+ kx({
34644
34655
  clientId: e,
34645
34656
  started: ne,
34646
- submitted: $,
34647
- insertIndex: K
34657
+ submitted: q,
34658
+ insertIndex: Q
34648
34659
  });
34649
34660
  }, F = !n && m && i, A = Math.min(
34650
34661
  o ?? r,
@@ -34663,7 +34674,7 @@ const lp = "xpert_lead_capture_state", Sx = 3600 * 24 * 30, Cx = (e) => {
34663
34674
  submitted: !1,
34664
34675
  insertIndex: r
34665
34676
  });
34666
- }, Q = () => {
34677
+ }, K = () => {
34667
34678
  Y({
34668
34679
  started: !0,
34669
34680
  submitted: !1,
@@ -34690,16 +34701,16 @@ const lp = "xpert_lead_capture_state", Sx = 3600 * 24 * 30, Cx = (e) => {
34690
34701
  };
34691
34702
  }, [y, h?.tooltipText]), _e(() => {
34692
34703
  if (!m || !y) return;
34693
- const { shouldRestore: ne, insertIndex: $ } = kx({
34704
+ const { shouldRestore: ne, insertIndex: q } = Ix({
34694
34705
  clientId: e,
34695
34706
  messageCount: r
34696
34707
  });
34697
34708
  if (!ne) return;
34698
- const K = setTimeout(() => {
34699
- u($), s(!0);
34709
+ const Q = setTimeout(() => {
34710
+ u(q), s(!0);
34700
34711
  }, 0);
34701
34712
  return () => {
34702
- clearTimeout(K);
34713
+ clearTimeout(Q);
34703
34714
  };
34704
34715
  }, [
34705
34716
  e,
@@ -34718,7 +34729,7 @@ const lp = "xpert_lead_capture_state", Sx = 3600 * 24 * 30, Cx = (e) => {
34718
34729
  shouldShowLeadCaptureForm: F,
34719
34730
  resolvedLeadCaptureInsertIndex: A,
34720
34731
  toggleLeadCapture: z,
34721
- markLeadCaptureStarted: Q,
34732
+ markLeadCaptureStarted: K,
34722
34733
  markLeadCaptureSubmitted: J,
34723
34734
  leadCaptureOpen: i
34724
34735
  };
@@ -34837,8 +34848,8 @@ dp.propTypes = {
34837
34848
  }).isRequired,
34838
34849
  messages: T.array.isRequired
34839
34850
  };
34840
- const Nx = 100, Vd = { id: "skip", label: "Skip" };
34841
- function Ox(e) {
34851
+ const Ox = 100, Vd = { id: "skip", label: "Skip" };
34852
+ function Lx(e) {
34842
34853
  const t = e.match(/\S+\s*/g);
34843
34854
  return t?.length ? t : [e];
34844
34855
  }
@@ -34860,7 +34871,7 @@ function ks({
34860
34871
  onSelect: y
34861
34872
  }) {
34862
34873
  const b = m === "text", E = m === "ranking", v = !!h?.trim(), I = v ? `${c} - ${h}` : c, B = Gt(
34863
- () => Ox(I),
34874
+ () => Lx(I),
34864
34875
  [I]
34865
34876
  ), [Y, F] = Ee({
34866
34877
  prompt: I,
@@ -34875,18 +34886,18 @@ function ks({
34875
34886
  prompt: I,
34876
34887
  visibleTokenCount: W
34877
34888
  }), W >= B.length && window.clearInterval(w);
34878
- }, Nx);
34889
+ }, Ox);
34879
34890
  return () => {
34880
34891
  window.clearInterval(w);
34881
34892
  };
34882
34893
  }, [I, B]);
34883
- const A = Y.prompt === I ? Y.visibleTokenCount : 0, z = B.slice(0, A).join(""), Q = c.length, J = z.slice(0, Q).trimEnd(), ne = v ? z.slice(Q).replace(/^\s*-\s*/, "") : "", $ = A < B.length, K = Math.max(1, i ?? 1), te = `survey-question-${u}`, N = `${te}-label`, O = `${te}-row`, H = `${te}-options-label`, X = `${te}-free-text-hint`, q = v ? `${N} ${O}` : N;
34894
+ const A = Y.prompt === I ? Y.visibleTokenCount : 0, z = B.slice(0, A).join(""), K = c.length, J = z.slice(0, K).trimEnd(), ne = v ? z.slice(K).replace(/^\s*-\s*/, "") : "", q = A < B.length, Q = Math.max(1, i ?? 1), te = `survey-question-${u}`, N = `${te}-label`, O = `${te}-row`, H = `${te}-options-label`, X = `${te}-free-text-hint`, $ = v ? `${N} ${O}` : N;
34884
34895
  return /* @__PURE__ */ S.jsxs(
34885
34896
  "section",
34886
34897
  {
34887
34898
  className: "xpert_chatbot__survey-card",
34888
34899
  "aria-label": "Survey question",
34889
- "aria-labelledby": q,
34900
+ "aria-labelledby": $,
34890
34901
  children: [
34891
34902
  /* @__PURE__ */ S.jsxs("div", { className: "xpert_chatbot__survey-card__actions", children: [
34892
34903
  /* @__PURE__ */ S.jsx(
@@ -34899,7 +34910,7 @@ function ks({
34899
34910
  children: "Previous Question"
34900
34911
  }
34901
34912
  ),
34902
- !$ && E && r ? /* @__PURE__ */ S.jsx(
34913
+ !q && E && r ? /* @__PURE__ */ S.jsx(
34903
34914
  "button",
34904
34915
  {
34905
34916
  type: "button",
@@ -34908,7 +34919,7 @@ function ks({
34908
34919
  children: "Next Question"
34909
34920
  }
34910
34921
  ) : null,
34911
- !$ && a ? /* @__PURE__ */ S.jsx(
34922
+ !q && a ? /* @__PURE__ */ S.jsx(
34912
34923
  "button",
34913
34924
  {
34914
34925
  type: "button",
@@ -34923,7 +34934,7 @@ function ks({
34923
34934
  {
34924
34935
  className: "xpert_chatbot__survey-card__prompt",
34925
34936
  "aria-live": "polite",
34926
- "aria-busy": $,
34937
+ "aria-busy": q,
34927
34938
  children: [
34928
34939
  /* @__PURE__ */ S.jsx(
34929
34940
  "span",
@@ -34944,7 +34955,7 @@ function ks({
34944
34955
  ]
34945
34956
  }
34946
34957
  ),
34947
- !$ && b ? /* @__PURE__ */ S.jsx(
34958
+ !q && b ? /* @__PURE__ */ S.jsx(
34948
34959
  "div",
34949
34960
  {
34950
34961
  className: "xpert_chatbot__survey-card__options",
@@ -34960,7 +34971,7 @@ function ks({
34960
34971
  )
34961
34972
  }
34962
34973
  ) : null,
34963
- !$ && !b ? /* @__PURE__ */ S.jsxs(
34974
+ !q && !b ? /* @__PURE__ */ S.jsxs(
34964
34975
  "fieldset",
34965
34976
  {
34966
34977
  className: "xpert_chatbot__survey-card__options",
@@ -35003,7 +35014,7 @@ function ks({
35003
35014
  role: "group",
35004
35015
  "aria-label": `Ranks for ${W.label}`,
35005
35016
  style: { display: "flex", gap: "0.4rem" },
35006
- children: Array.from({ length: K }, (ae, ge) => {
35017
+ children: Array.from({ length: Q }, (ae, ge) => {
35007
35018
  const k = ge + 1, ve = e?.[W.id] === k;
35008
35019
  return /* @__PURE__ */ S.jsx(
35009
35020
  "button",
@@ -35089,8 +35100,8 @@ ks.defaultProps = {
35089
35100
  type: void 0
35090
35101
  };
35091
35102
  ks.displayName = "SurveyQuestionCard";
35092
- const Lx = 100, Rx = "You have selected the End-of-Term Survey. This is a brief, voluntary survey to help us improve Xpert.";
35093
- function Dx(e) {
35103
+ const Rx = 100, Dx = "You have selected the End-of-Term Survey. This is a brief, voluntary survey to help us improve Xpert.";
35104
+ function Mx(e) {
35094
35105
  const t = e ?? "", n = t.match(/\S+\s*/g);
35095
35106
  return n?.length ? n : [t];
35096
35107
  }
@@ -35117,10 +35128,10 @@ function Ul({
35117
35128
  surveyStepIndex: B,
35118
35129
  triggerSurveyPrompt: Y
35119
35130
  }) {
35120
- const F = h ?? Rx, A = Gt(
35121
- () => Dx(F),
35131
+ const F = h ?? Dx, A = Gt(
35132
+ () => Mx(F),
35122
35133
  [F]
35123
- ), [z, Q] = Ee({
35134
+ ), [z, K] = Ee({
35124
35135
  streamKey: null,
35125
35136
  visibleTokenCount: 0
35126
35137
  });
@@ -35129,16 +35140,16 @@ function Ul({
35129
35140
  return;
35130
35141
  let te = 0;
35131
35142
  const N = `${y}:${I}:${o}`, O = window.setInterval(() => {
35132
- te += 1, Q({
35143
+ te += 1, K({
35133
35144
  streamKey: N,
35134
35145
  visibleTokenCount: te
35135
35146
  }), te >= A.length && window.clearInterval(O);
35136
- }, Lx);
35147
+ }, Rx);
35137
35148
  return () => {
35138
35149
  window.clearInterval(O);
35139
35150
  };
35140
35151
  }, [A, o, y, I]);
35141
- const J = `${y}:${I}:${o}`, ne = z.streamKey === J ? z.visibleTokenCount : 0, $ = A.slice(0, ne).join(""), K = y && I && !o && ne < A.length;
35152
+ const J = `${y}:${I}:${o}`, ne = z.streamKey === J ? z.visibleTokenCount : 0, q = A.slice(0, ne).join(""), Q = y && I && !o && ne < A.length;
35142
35153
  return /* @__PURE__ */ S.jsxs(S.Fragment, { children: [
35143
35154
  !o && y && !b && /* @__PURE__ */ S.jsx("div", { style: { margin: "0.75rem 0" }, children: /* @__PURE__ */ S.jsx(
35144
35155
  "button",
@@ -35162,11 +35173,11 @@ function Ul({
35162
35173
  className: "xpert_chatbot__survey-callout",
35163
35174
  style: { color: "#3f2c00" },
35164
35175
  "aria-live": "polite",
35165
- "aria-busy": K,
35166
- children: $
35176
+ "aria-busy": Q,
35177
+ children: q
35167
35178
  }
35168
35179
  ),
35169
- !K && /* @__PURE__ */ S.jsxs(
35180
+ !Q && /* @__PURE__ */ S.jsxs(
35170
35181
  "div",
35171
35182
  {
35172
35183
  style: { display: "flex", gap: "0.75rem", marginTop: "0.75rem" },
@@ -35414,7 +35425,7 @@ Is.defaultProps = {
35414
35425
  totalSteps: 1
35415
35426
  };
35416
35427
  Is.displayName = "SurveyModeBanner";
35417
- function Mx({
35428
+ function Px({
35418
35429
  chatContentRef: e,
35419
35430
  isSurveyMode: t,
35420
35431
  messageCount: n,
@@ -35445,7 +35456,7 @@ function hp(e, t, n = 0) {
35445
35456
  function Ns(e) {
35446
35457
  return typeof e != "string" ? null : e.trim() || null;
35447
35458
  }
35448
- function Px(e) {
35459
+ function Bx(e) {
35449
35460
  if (!e || typeof e != "object")
35450
35461
  return null;
35451
35462
  const t = Ns(e.id), n = `${e.label ?? ""}`.trim();
@@ -35455,7 +35466,7 @@ function Px(e) {
35455
35466
  label: n
35456
35467
  };
35457
35468
  }
35458
- function Bx(e) {
35469
+ function Fx(e) {
35459
35470
  if (!e || typeof e != "object")
35460
35471
  return null;
35461
35472
  const t = Ns(e.id), n = `${e.label ?? ""}`.trim();
@@ -35464,7 +35475,7 @@ function Bx(e) {
35464
35475
  label: n
35465
35476
  };
35466
35477
  }
35467
- function Fx(e, t) {
35478
+ function Hx(e, t) {
35468
35479
  if (!e || typeof e != "object")
35469
35480
  return [];
35470
35481
  const n = Ns(e.id), a = `${e.label ?? ""}`.trim() || (n ? `Question ${n}` : "");
@@ -35474,9 +35485,9 @@ function Fx(e, t) {
35474
35485
  e.id ?? a,
35475
35486
  "question",
35476
35487
  t
35477
- ), o = (e.options ?? []).map(Px).filter(Boolean);
35488
+ ), o = (e.options ?? []).map(Bx).filter(Boolean);
35478
35489
  if (i === "matrix")
35479
- return (Array.isArray(e.rows) ? e.rows.map((l) => Bx(l)).filter(Boolean) : []).map((l) => ({
35490
+ return (Array.isArray(e.rows) ? e.rows.map((l) => Fx(l)).filter(Boolean) : []).map((l) => ({
35480
35491
  id: l.id,
35481
35492
  label: a,
35482
35493
  type: "singleSelect",
@@ -35523,7 +35534,7 @@ function zu(e) {
35523
35534
  if (!e || typeof e != "object")
35524
35535
  return null;
35525
35536
  const t = (e.questions ?? []).flatMap(
35526
- (r, a) => Fx(r, a)
35537
+ (r, a) => Hx(r, a)
35527
35538
  ).filter(Boolean);
35528
35539
  if (t.length === 0)
35529
35540
  return null;
@@ -35550,7 +35561,7 @@ function Gd(e, t) {
35550
35561
  label: e?.options?.find((a) => a.id === n)?.label ?? n
35551
35562
  })).sort((n, r) => n.rank - r.rank).slice(0, ju(e));
35552
35563
  }
35553
- function Hx({
35564
+ function Ux({
35554
35565
  chatApi: e = null,
35555
35566
  chatApiEndpoint: t = null
35556
35567
  } = {}) {
@@ -35565,10 +35576,10 @@ function Hx({
35565
35576
  }
35566
35577
  return null;
35567
35578
  }
35568
- function Ux(e) {
35579
+ function zx(e) {
35569
35580
  return Array.isArray(e) ? e.filter(Boolean) : e && typeof e == "object" ? [e] : [];
35570
35581
  }
35571
- function zx(e, t = /* @__PURE__ */ new Date()) {
35582
+ function jx(e, t = /* @__PURE__ */ new Date()) {
35572
35583
  const { startDate: n, endDate: r } = e ?? {};
35573
35584
  if (n) {
35574
35585
  const a = new Date(n);
@@ -35584,24 +35595,24 @@ function zx(e, t = /* @__PURE__ */ new Date()) {
35584
35595
  }
35585
35596
  function fp(e, t = {}) {
35586
35597
  const { now: n = /* @__PURE__ */ new Date() } = t;
35587
- return Ux(e).find(
35588
- (r) => zx(r, n)
35598
+ return zx(e).find(
35599
+ (r) => jx(r, n)
35589
35600
  ) ?? null;
35590
35601
  }
35591
- function jx(e) {
35602
+ function qx(e) {
35592
35603
  if (e?.questions?.length)
35593
35604
  return zu(e);
35594
35605
  const t = e?.conversationScreen?.surveys ?? e?.conversationScreen?.survey, n = fp(t);
35595
35606
  return n?.questions?.length ? zu(n) : null;
35596
35607
  }
35597
- function qx() {
35608
+ function $x() {
35598
35609
  try {
35599
35610
  return window?.analytics?.user?.()?.id?.() ?? null;
35600
35611
  } catch {
35601
35612
  return null;
35602
35613
  }
35603
35614
  }
35604
- function $x(e, t) {
35615
+ function Yx(e, t) {
35605
35616
  if (!t || t <= 0) return 0;
35606
35617
  const n = e / t;
35607
35618
  return Number.isNaN(n) || !Number.isFinite(n) ? 0 : Math.max(0, Math.min(100, Math.round(n * 100)));
@@ -35625,7 +35636,7 @@ function _i({
35625
35636
  last_answered_at: a ?? null,
35626
35637
  completed_at: i ?? null,
35627
35638
  current_question_id: s ?? null,
35628
- progress_percent: $x(
35639
+ progress_percent: Yx(
35629
35640
  u ?? 0,
35630
35641
  o ?? 0
35631
35642
  ),
@@ -35633,7 +35644,7 @@ function _i({
35633
35644
  answered_questions: u ?? 0
35634
35645
  };
35635
35646
  }
35636
- function Yx({
35647
+ function Vx({
35637
35648
  questionId: e,
35638
35649
  rowId: t,
35639
35650
  answerType: n,
@@ -35650,7 +35661,7 @@ function Yx({
35650
35661
  answered_at: i ?? null
35651
35662
  };
35652
35663
  }
35653
- function Vx(e, t) {
35664
+ function Gx(e, t) {
35654
35665
  return !e || typeof e != "object" || !t ? e : {
35655
35666
  ...e,
35656
35667
  answer: t
@@ -35668,7 +35679,7 @@ async function ki({
35668
35679
  try {
35669
35680
  const o = n?.endpoint ?? r;
35670
35681
  if (!o) return;
35671
- const u = n?.messagesKey ?? "messages", l = n?.payloadParams ?? {}, c = qx(), h = a && i ? gn(a) : null, p = e && typeof e == "object" ? (({ conversation_id: y, ...b }) => b)(
35682
+ const u = n?.messagesKey ?? "messages", l = n?.payloadParams ?? {}, c = $x(), h = a && i ? gn(a) : null, p = e && typeof e == "object" ? (({ conversation_id: y, ...b }) => b)(
35672
35683
  e
35673
35684
  ) : e, m = {
35674
35685
  [u]: Array.isArray(t) ? t : [],
@@ -35700,7 +35711,7 @@ async function ki({
35700
35711
  } catch {
35701
35712
  }
35702
35713
  }
35703
- async function Gx(e) {
35714
+ async function Wx(e) {
35704
35715
  if (!e?.ok)
35705
35716
  throw new Error("Failed to load survey");
35706
35717
  if (!e.body)
@@ -35714,7 +35725,7 @@ async function Gx(e) {
35714
35725
  }
35715
35726
  return JSON.parse(r);
35716
35727
  }
35717
- function Wx({
35728
+ function Xx({
35718
35729
  chatApi: e = null,
35719
35730
  chatApiEndpoint: t,
35720
35731
  clientId: n,
@@ -35727,14 +35738,14 @@ function Wx({
35727
35738
  }) {
35728
35739
  const [l, c] = Ee(!1), [h, p] = Ee(!1), [m, y] = Ee(0), [b, E] = Ee(null), [v, I] = Ee(
35729
35740
  {}
35730
- ), [B, Y] = Ee({}), [F, A] = Ee(!1), [z, Q] = Ee(null), J = r?.surveys ?? r?.survey, ne = Gt(
35741
+ ), [B, Y] = Ee({}), [F, A] = Ee(!1), [z, K] = Ee(null), J = r?.surveys ?? r?.survey, ne = Gt(
35731
35742
  () => fp(J),
35732
35743
  [J]
35733
- ), $ = ne?.enabled === !0, K = ne?.externalTrigger === !0, te = r?.conversationHistory?.enabled === !0, N = Je(l);
35744
+ ), q = ne?.enabled === !0, Q = ne?.externalTrigger === !0, te = r?.conversationHistory?.enabled === !0, N = Je(l);
35734
35745
  _e(() => {
35735
35746
  N.current = l;
35736
35747
  }, [l]);
35737
- const O = Je(null), H = Je(null), X = Je(null), q = Gt(() => l ? b?.questions?.[m] ?? null : null, [l, b, m]), W = !!q && q?.type !== "text", w = Gt(() => q?.type !== "ranking" ? {} : B?.[q?.id] ?? {}, [q, B]), ae = Gt(() => q?.id ? v?.[q.id] ?? null : null, [q, v]), ge = q?.type === "text" ? ae?.answerText ?? "" : "", k = Gt(() => q?.type !== "ranking" ? !1 : Gd(q, w).length >= ju(q), [w, q]), ve = Gt(() => Array.isArray(u) ? u.map((be) => ({
35748
+ const O = Je(null), H = Je(null), X = Je(null), $ = Gt(() => l ? b?.questions?.[m] ?? null : null, [l, b, m]), W = !!$ && $?.type !== "text", w = Gt(() => $?.type !== "ranking" ? {} : B?.[$?.id] ?? {}, [$, B]), ae = Gt(() => $?.id ? v?.[$.id] ?? null : null, [$, v]), ge = $?.type === "text" ? ae?.answerText ?? "" : "", k = Gt(() => $?.type !== "ranking" ? !1 : Gd($, w).length >= ju($), [w, $]), ve = Gt(() => Array.isArray(u) ? u.map((be) => ({
35738
35749
  role: be.role,
35739
35750
  content: be.content,
35740
35751
  ...be.toolCalls && { tool_calls: be.toolCalls },
@@ -35765,14 +35776,14 @@ function Wx({
35765
35776
  }), p(!0);
35766
35777
  };
35767
35778
  _e(() => {
35768
- if (K && $ && a && !N.current) {
35779
+ if (Q && q && a && !N.current) {
35769
35780
  if (typeof a == "number") {
35770
35781
  if (Ge.current === a) return;
35771
35782
  Ge.current = a;
35772
35783
  }
35773
35784
  Ve("external");
35774
35785
  }
35775
- }, [a, $, K]);
35786
+ }, [a, q, Q]);
35776
35787
  const et = (be = !0, We = {}) => {
35777
35788
  const { skipTelemetryPost: rt = !1, surveyResponseOverride: Se = null } = We ?? {}, we = b?.id ?? "end_of_term_survey", De = n && te ? gn(n) : null, Pe = b?.questions?.length ?? 0, Be = Math.max(
35778
35789
  0,
@@ -35784,7 +35795,7 @@ function Wx({
35784
35795
  startedAt: O.current,
35785
35796
  lastAnsweredAt: H.current,
35786
35797
  completedAt: V,
35787
- currentQuestionId: q?.id ?? null,
35798
+ currentQuestionId: $?.id ?? null,
35788
35799
  totalQuestions: Pe,
35789
35800
  answeredQuestions: be ? Pe : Be
35790
35801
  });
@@ -35796,7 +35807,7 @@ function Wx({
35796
35807
  clientId: n,
35797
35808
  conversationHistoryEnabled: te,
35798
35809
  onMessageSent: s
35799
- }), c(!1), p(!1), y(0), E(null), I({}), Y({}), A(!1), Q(null), O.current = null, H.current = null;
35810
+ }), c(!1), p(!1), y(0), E(null), I({}), Y({}), A(!1), K(null), O.current = null, H.current = null;
35800
35811
  const ye = be || je ? g1 : p1;
35801
35812
  typeof o == "function" && (ke({
35802
35813
  role: Ne.INFO,
@@ -35806,7 +35817,7 @@ function Wx({
35806
35817
  content: b1
35807
35818
  }));
35808
35819
  }, pt = async () => {
35809
- Q(null), A(!0);
35820
+ K(null), A(!0);
35810
35821
  try {
35811
35822
  const be = ne;
35812
35823
  if (be?.questions?.length) {
@@ -35844,7 +35855,7 @@ function Wx({
35844
35855
  }
35845
35856
  if (!n)
35846
35857
  throw new Error("Survey client id is required to load survey config");
35847
- const We = Hx({
35858
+ const We = Ux({
35848
35859
  chatApi: e,
35849
35860
  chatApiEndpoint: t
35850
35861
  });
@@ -35856,7 +35867,7 @@ function Wx({
35856
35867
  method: "GET",
35857
35868
  headers: { "Content-Type": "application/json" }
35858
35869
  }
35859
- ), Se = await Gx(rt), we = jx(Se);
35870
+ ), Se = await Wx(rt), we = qx(Se);
35860
35871
  if (!we)
35861
35872
  throw new Error(
35862
35873
  "Survey definition missing in conversationScreen.surveys array"
@@ -35889,7 +35900,7 @@ function Wx({
35889
35900
  onMessageSent: s
35890
35901
  }), Le(), p(!1), c(!0), y(0), I({}), Y({});
35891
35902
  } catch (be) {
35892
- Q(be);
35903
+ K(be);
35893
35904
  } finally {
35894
35905
  A(!1);
35895
35906
  }
@@ -35913,14 +35924,14 @@ function Wx({
35913
35924
  currentQuestionId: be.id,
35914
35925
  totalQuestions: Be,
35915
35926
  answeredQuestions: re ? Be : je
35916
- }), $e = Yx({
35927
+ }), $e = Vx({
35917
35928
  questionId: (rt ?? be?.answerType ?? be?.type ?? null) === "matrix" ? be.parentQuestionId ?? be.id : be.id,
35918
35929
  rowId: (rt ?? be?.answerType ?? be?.type ?? null) === "matrix" ? be.id : null,
35919
35930
  answerType: rt ?? be?.answerType ?? be?.type ?? null,
35920
35931
  selectedOptionId: We,
35921
35932
  text: Se,
35922
35933
  answeredAt: we
35923
- }), xt = Vx(
35934
+ }), xt = Gx(
35924
35935
  Ae,
35925
35936
  $e
35926
35937
  );
@@ -35941,7 +35952,7 @@ function Wx({
35941
35952
  }
35942
35953
  y(V);
35943
35954
  }, Nt = (be) => {
35944
- const We = q;
35955
+ const We = $;
35945
35956
  if (!We) return;
35946
35957
  const rt = (/* @__PURE__ */ new Date()).toISOString();
35947
35958
  if (H.current = rt, We.type === "ranking") {
@@ -35972,11 +35983,11 @@ function Wx({
35972
35983
  };
35973
35984
  return {
35974
35985
  activeSurveyAnswer: ae,
35975
- activeSurveyQuestion: q,
35986
+ activeSurveyQuestion: $,
35976
35987
  activeSurveyInputValue: ge,
35977
35988
  exitSurvey: et,
35978
35989
  goToNextSurveyQuestion: () => {
35979
- const be = q;
35990
+ const be = $;
35980
35991
  if (be?.type !== "ranking") return;
35981
35992
  const We = Gd(
35982
35993
  be,
@@ -35998,7 +36009,7 @@ function Wx({
35998
36009
  y((be) => Math.max(be - 1, 0));
35999
36010
  },
36000
36011
  handleSendRouted: (be) => {
36001
- if (l && q?.type === "text") {
36012
+ if (l && $?.type === "text") {
36002
36013
  const We = (be ?? "").trim();
36003
36014
  if (!We) return;
36004
36015
  Nt({ id: "free_text", label: We });
@@ -36007,7 +36018,7 @@ function Wx({
36007
36018
  i(be);
36008
36019
  },
36009
36020
  handleSurveyInputChange: (be) => {
36010
- const We = q;
36021
+ const We = $;
36011
36022
  We?.type === "text" && I((rt) => ({
36012
36023
  ...rt,
36013
36024
  [We.id]: {
@@ -36021,8 +36032,8 @@ function Wx({
36021
36032
  selectedSurveyConfiguration: ne,
36022
36033
  startSurvey: pt,
36023
36034
  surveyDefinition: b,
36024
- surveyEnabled: $,
36025
- surveyExternalTrigger: K,
36035
+ surveyEnabled: q,
36036
+ surveyExternalTrigger: Q,
36026
36037
  surveyInputActive: W,
36027
36038
  activeRankingSelections: w,
36028
36039
  canSubmitActiveRankingQuestion: k,
@@ -36031,7 +36042,7 @@ function Wx({
36031
36042
  surveyPromptSelected: h,
36032
36043
  surveyStepIndex: m,
36033
36044
  triggerSurveyPrompt: Ve,
36034
- setSurveyLoadError: Q,
36045
+ setSurveyLoadError: K,
36035
36046
  setSurveyLoading: A,
36036
36047
  setSurveyPromptSelected: p
36037
36048
  };
@@ -36055,15 +36066,15 @@ function mp({
36055
36066
  loadingHistory: I,
36056
36067
  externalTriggerSurvey: B,
36057
36068
  setLeadCaptureFormActive: Y
36058
- } = Ie(jt), F = Je(null), A = Je(null), z = Je(null), Q = Je(null), [J, ne] = Ee(!1), {
36059
- activeSurveyAnswer: $,
36060
- activeSurveyQuestion: K,
36069
+ } = Ie(jt), F = Je(null), A = Je(null), z = Je(null), K = Je(null), [J, ne] = Ee(!1), {
36070
+ activeSurveyAnswer: q,
36071
+ activeSurveyQuestion: Q,
36061
36072
  activeRankingSelections: te,
36062
36073
  canSubmitActiveRankingQuestion: N,
36063
36074
  exitSurvey: O,
36064
36075
  goToNextSurveyQuestion: H,
36065
36076
  goToPreviousSurveyQuestion: X,
36066
- handleSendRouted: q,
36077
+ handleSendRouted: $,
36067
36078
  handleSurveyInputChange: W,
36068
36079
  handleSurveyOptionSelect: w,
36069
36080
  isSurveyMode: ae,
@@ -36082,7 +36093,7 @@ function mp({
36082
36093
  setSurveyLoadError: ln,
36083
36094
  setSurveyLoading: In,
36084
36095
  setSurveyPromptSelected: Nn
36085
- } = Wx({
36096
+ } = Xx({
36086
36097
  chatApi: i,
36087
36098
  chatApiEndpoint: i?.endpoint,
36088
36099
  clientId: u,
@@ -36095,13 +36106,13 @@ function mp({
36095
36106
  }), On = (Xe) => {
36096
36107
  s.liveChat.useOwnChat ? E(Cn.LIVECHAT) : r(Xe);
36097
36108
  };
36098
- Mx({
36109
+ Px({
36099
36110
  chatContentRef: F,
36100
36111
  isSurveyMode: ae,
36101
36112
  messageCount: y,
36102
36113
  surveyPromptSelected: pt
36103
36114
  });
36104
- const be = ae || pt, We = ae && K?.type === "text", {
36115
+ const be = ae || pt, We = ae && Q?.type === "text", {
36105
36116
  leadCaptureButtonStyle: rt,
36106
36117
  leadCaptureLaunchButtonEnabled: Se,
36107
36118
  leadCaptureStateTooltip: we,
@@ -36114,7 +36125,7 @@ function mp({
36114
36125
  resolvedLeadCaptureStyle: ye,
36115
36126
  shouldShowLeadCaptureForm: Ae,
36116
36127
  showLeadCaptureTooltip: $e
36117
- } = Ix({
36128
+ } = Nx({
36118
36129
  clientId: u,
36119
36130
  conversationScreen: s,
36120
36131
  isSurveyOverlayActive: be,
@@ -36238,8 +36249,8 @@ function mp({
36238
36249
  /* @__PURE__ */ S.jsx(
36239
36250
  Ul,
36240
36251
  {
36241
- activeSurveyAnswer: $,
36242
- activeSurveyQuestion: K,
36252
+ activeSurveyAnswer: q,
36253
+ activeSurveyQuestion: Q,
36243
36254
  activeRankingSelections: te,
36244
36255
  canSubmitActiveRankingQuestion: N,
36245
36256
  goToNextSurveyQuestion: H,
@@ -36302,7 +36313,7 @@ function mp({
36302
36313
  {
36303
36314
  disabled: b || I || c || Ge || Ae,
36304
36315
  handleChange: We ? W : void 0,
36305
- handleSend: q,
36316
+ handleSend: $,
36306
36317
  inputRef: t,
36307
36318
  value: We ? Re : void 0
36308
36319
  }
@@ -36391,7 +36402,7 @@ function mp({
36391
36402
  "aria-describedby": "lead-capture-exit-confirm-desc",
36392
36403
  tabIndex: -1,
36393
36404
  onKeyDown: (Xe) => {
36394
- Xe.key === "Tab" && (Xe.preventDefault(), document.activeElement === z.current ? Q.current?.focus() : z.current?.focus());
36405
+ Xe.key === "Tab" && (Xe.preventDefault(), document.activeElement === z.current ? K.current?.focus() : z.current?.focus());
36395
36406
  },
36396
36407
  style: {
36397
36408
  position: "absolute",
@@ -36457,7 +36468,7 @@ function mp({
36457
36468
  /* @__PURE__ */ S.jsx(
36458
36469
  "button",
36459
36470
  {
36460
- ref: Q,
36471
+ ref: K,
36461
36472
  type: "button",
36462
36473
  className: "xpert_chatbot__exit-confirm-button danger",
36463
36474
  onClick: () => {
@@ -36638,7 +36649,7 @@ function $l() {
36638
36649
  return Oa;
36639
36650
  }
36640
36651
  var e1;
36641
- function Xx() {
36652
+ function Kx() {
36642
36653
  if (e1) return Ar;
36643
36654
  e1 = 1;
36644
36655
  var e = Ar && Ar.__assign || function() {
@@ -36708,7 +36719,7 @@ function Xx() {
36708
36719
  return Ar.attachListeners = l, Ar;
36709
36720
  }
36710
36721
  var _r = {}, t1;
36711
- function Kx() {
36722
+ function Qx() {
36712
36723
  if (t1) return _r;
36713
36724
  t1 = 1;
36714
36725
  var e = _r && _r.__assign || function() {
@@ -36770,10 +36781,10 @@ function Kx() {
36770
36781
  return _r.attachSharedListeners = c, _r;
36771
36782
  }
36772
36783
  var n1;
36773
- function Qx() {
36784
+ function Zx() {
36774
36785
  if (n1) return Na;
36775
36786
  n1 = 1, Object.defineProperty(Na, "__esModule", { value: !0 }), Na.createOrJoinSocket = void 0;
36776
- var e = zl(), t = Vn(), n = Xx(), r = Kx(), a = ql(), i = function(o, u, l, c, h) {
36787
+ var e = zl(), t = Vn(), n = Kx(), r = Qx(), a = ql(), i = function(o, u, l, c, h) {
36777
36788
  return function() {
36778
36789
  if ((0, a.removeSubscriber)(o, u), !(0, a.hasSubscribers)(o)) {
36779
36790
  try {
@@ -36813,7 +36824,7 @@ function Qx() {
36813
36824
  return Na.createOrJoinSocket = s, Na;
36814
36825
  }
36815
36826
  var Kn = {}, r1;
36816
- function Zx() {
36827
+ function Jx() {
36817
36828
  return r1 || (r1 = 1, (function(e) {
36818
36829
  var t = Kn && Kn.__awaiter || function(u, l, c, h) {
36819
36830
  function p(m) {
@@ -36950,7 +36961,7 @@ function Zx() {
36950
36961
  })(Kn)), Kn;
36951
36962
  }
36952
36963
  var Bo = {}, a1;
36953
- function Jx() {
36964
+ function eS() {
36954
36965
  return a1 || (a1 = 1, (function(e) {
36955
36966
  Object.defineProperty(e, "__esModule", { value: !0 }), e.websocketWrapper = void 0;
36956
36967
  var t = function(n, r) {
@@ -37069,7 +37080,7 @@ function Yl() {
37069
37080
  return p && p.__esModule ? p : { default: p };
37070
37081
  };
37071
37082
  Object.defineProperty(dn, "__esModule", { value: !0 }), dn.useWebSocket = void 0;
37072
- var a = nr, i = D2, s = Vn(), o = Qx(), u = Zx(), l = r(Jx()), c = $l(), h = function(p, m, y) {
37083
+ var a = nr, i = D2, s = Vn(), o = Zx(), u = Jx(), l = r(eS()), c = $l(), h = function(p, m, y) {
37073
37084
  m === void 0 && (m = s.DEFAULT_OPTIONS), y === void 0 && (y = !0);
37074
37085
  var b = (0, a.useState)(null), E = b[0], v = b[1], I = (0, a.useState)({}), B = I[0], Y = I[1], F = (0, a.useMemo)(function() {
37075
37086
  if (!m.disableJson && E)
@@ -37079,8 +37090,8 @@ function Yl() {
37079
37090
  return s.UNPARSABLE_JSON_OBJECT;
37080
37091
  }
37081
37092
  return null;
37082
- }, [E, m.disableJson]), A = (0, a.useRef)(null), z = (0, a.useRef)(null), Q = (0, a.useRef)(function() {
37083
- }), J = (0, a.useRef)(0), ne = (0, a.useRef)(Date.now()), $ = (0, a.useRef)([]), K = (0, a.useRef)(null), te = (0, a.useRef)(m);
37093
+ }, [E, m.disableJson]), A = (0, a.useRef)(null), z = (0, a.useRef)(null), K = (0, a.useRef)(function() {
37094
+ }), J = (0, a.useRef)(0), ne = (0, a.useRef)(Date.now()), q = (0, a.useRef)([]), Q = (0, a.useRef)(null), te = (0, a.useRef)(m);
37084
37095
  te.current = m;
37085
37096
  var N = A.current && B[A.current] !== void 0 ? B[A.current] : p !== null && y === !0 ? s.ReadyState.CONNECTING : s.ReadyState.UNINSTANTIATED, O = m.queryParams ? JSON.stringify(m.queryParams) : null, H = (0, a.useCallback)(function(W, w) {
37086
37097
  var ae;
@@ -37088,11 +37099,11 @@ function Yl() {
37088
37099
  console.warn("Unable to send a message from an eventSource");
37089
37100
  return;
37090
37101
  }
37091
- ((ae = z.current) === null || ae === void 0 ? void 0 : ae.readyState) === s.ReadyState.OPEN ? ((0, c.assertIsWebSocket)(z.current, te.current.skipAssert), z.current.send(W)) : w && $.current.push(W);
37102
+ ((ae = z.current) === null || ae === void 0 ? void 0 : ae.readyState) === s.ReadyState.OPEN ? ((0, c.assertIsWebSocket)(z.current, te.current.skipAssert), z.current.send(W)) : w && q.current.push(W);
37092
37103
  }, []), X = (0, a.useCallback)(function(W, w) {
37093
37104
  w === void 0 && (w = !0), H(JSON.stringify(W), w);
37094
- }, [H]), q = (0, a.useCallback)(function() {
37095
- return te.current.share !== !0 || s.isEventSourceSupported && z.current instanceof EventSource ? z.current : (K.current === null && z.current && ((0, c.assertIsWebSocket)(z.current, te.current.skipAssert), K.current = (0, l.default)(z.current, Q)), K.current);
37105
+ }, [H]), $ = (0, a.useCallback)(function() {
37106
+ return te.current.share !== !0 || s.isEventSourceSupported && z.current instanceof EventSource ? z.current : (Q.current === null && z.current && ((0, c.assertIsWebSocket)(z.current, te.current.skipAssert), Q.current = (0, l.default)(z.current, K)), Q.current);
37096
37107
  }, []);
37097
37108
  return (0, a.useEffect)(function() {
37098
37109
  if (p !== null && y === !0) {
@@ -37122,7 +37133,7 @@ function Yl() {
37122
37133
  return e(e({}, Ge), A.current && (Ve = {}, Ve[A.current] = Re, Ve));
37123
37134
  });
37124
37135
  });
37125
- }, ae && (W = (0, o.createOrJoinSocket)(z, A.current, ke, te, ve, Q, J, ne, H)), [
37136
+ }, ae && (W = (0, o.createOrJoinSocket)(z, A.current, ke, te, ve, K, J, ne, H)), [
37126
37137
  2
37127
37138
  /*return*/
37128
37139
  ]);
@@ -37130,17 +37141,17 @@ function Yl() {
37130
37141
  });
37131
37142
  });
37132
37143
  };
37133
- return Q.current = function() {
37134
- w || (K.current && (K.current = null), W?.(), ge());
37144
+ return K.current = function() {
37145
+ w || (Q.current && (Q.current = null), W?.(), ge());
37135
37146
  }, ge(), function() {
37136
- w = !0, ae = !1, K.current && (K.current = null), W?.(), v(null);
37147
+ w = !0, ae = !1, Q.current && (Q.current = null), W?.(), v(null);
37137
37148
  };
37138
37149
  } else (p === null || y === !1) && (J.current = 0, Y(function(k) {
37139
37150
  var ve;
37140
37151
  return e(e({}, k), A.current && (ve = {}, ve[A.current] = s.ReadyState.CLOSED, ve));
37141
37152
  }));
37142
37153
  }, [p, y, O, H]), (0, a.useEffect)(function() {
37143
- N === s.ReadyState.OPEN && $.current.splice(0).forEach(function(W) {
37154
+ N === s.ReadyState.OPEN && q.current.splice(0).forEach(function(W) {
37144
37155
  H(W);
37145
37156
  });
37146
37157
  }, [N]), {
@@ -37149,13 +37160,13 @@ function Yl() {
37149
37160
  lastMessage: E,
37150
37161
  lastJsonMessage: F,
37151
37162
  readyState: N,
37152
- getWebSocket: q
37163
+ getWebSocket: $
37153
37164
  };
37154
37165
  };
37155
37166
  return dn.useWebSocket = h, dn;
37156
37167
  }
37157
37168
  var kr = {}, s1;
37158
- function eS() {
37169
+ function tS() {
37159
37170
  if (s1) return kr;
37160
37171
  s1 = 1;
37161
37172
  var e = kr && kr.__assign || function() {
@@ -37201,7 +37212,7 @@ function eS() {
37201
37212
  return kr.useSocketIO = s, kr;
37202
37213
  }
37203
37214
  var Qn = {}, o1;
37204
- function tS() {
37215
+ function nS() {
37205
37216
  if (o1) return Qn;
37206
37217
  o1 = 1;
37207
37218
  var e = Qn && Qn.__assign || function() {
@@ -37244,14 +37255,14 @@ function tS() {
37244
37255
  return Qn.useEventSource = i, Qn;
37245
37256
  }
37246
37257
  var u1;
37247
- function nS() {
37258
+ function rS() {
37248
37259
  return u1 || (u1 = 1, (function(e) {
37249
37260
  Object.defineProperty(e, "__esModule", { value: !0 }), e.resetGlobalState = e.useEventSource = e.ReadyState = e.useSocketIO = e.default = void 0;
37250
37261
  var t = Yl();
37251
37262
  Object.defineProperty(e, "default", { enumerable: !0, get: function() {
37252
37263
  return t.useWebSocket;
37253
37264
  } });
37254
- var n = eS();
37265
+ var n = tS();
37255
37266
  Object.defineProperty(e, "useSocketIO", { enumerable: !0, get: function() {
37256
37267
  return n.useSocketIO;
37257
37268
  } });
@@ -37259,7 +37270,7 @@ function nS() {
37259
37270
  Object.defineProperty(e, "ReadyState", { enumerable: !0, get: function() {
37260
37271
  return r.ReadyState;
37261
37272
  } });
37262
- var a = tS();
37273
+ var a = nS();
37263
37274
  Object.defineProperty(e, "useEventSource", { enumerable: !0, get: function() {
37264
37275
  return a.useEventSource;
37265
37276
  } });
@@ -37269,9 +37280,9 @@ function nS() {
37269
37280
  } });
37270
37281
  })(Ro)), Ro;
37271
37282
  }
37272
- var rS = nS();
37273
- const aS = /* @__PURE__ */ ir(rS);
37274
- async function iS(e) {
37283
+ var aS = rS();
37284
+ const iS = /* @__PURE__ */ ir(aS);
37285
+ async function sS(e) {
37275
37286
  const t = await new Blob([e], { type: "application/json" });
37276
37287
  return new Promise((n, r) => {
37277
37288
  const a = new FileReader();
@@ -37285,30 +37296,30 @@ async function iS(e) {
37285
37296
  }, a.readAsText(t);
37286
37297
  });
37287
37298
  }
37288
- const sS = "This conversation with a live agent has ended. Please note that a transcript of this chat will be emailed to you. Feel free to continue chatting with Xpert.", tr = {
37299
+ const oS = "This conversation with a live agent has ended. Please note that a transcript of this chat will be emailed to you. Feel free to continue chatting with Xpert.", tr = {
37289
37300
  CONNECTING: "CONNECTING",
37290
37301
  CONVERSATION: "CONVERSATION",
37291
37302
  FORM: "FORM"
37292
37303
  }, Yr = ns({}), gp = ({ children: e, liveChatPayload: t }) => {
37293
- const { conversationScreen: n } = Ie(At), { pushXpertMessage: r } = Ie(Tr), { setHasError: a, setMode: i } = Ie(jt), [s, o] = Ee(""), [u, l] = Ee(!1), [, c] = Ee(""), [h, p] = Ee([]), [m, y] = Ee(null), [b, E] = Ee(tr.FORM), [v, I] = Ee(null), B = (q) => p((W) => [...W, q]), Y = async (q) => {
37294
- const W = await iS(q.data), { conversation_id: w, event_type: ae, body: ge } = W;
37304
+ const { conversationScreen: n } = Ie(At), { pushXpertMessage: r } = Ie(Tr), { setHasError: a, setMode: i } = Ie(jt), [s, o] = Ee(""), [u, l] = Ee(!1), [, c] = Ee(""), [h, p] = Ee([]), [m, y] = Ee(null), [b, E] = Ee(tr.FORM), [v, I] = Ee(null), B = ($) => p((W) => [...W, $]), Y = async ($) => {
37305
+ const W = await sS($.data), { conversation_id: w, event_type: ae, body: ge } = W;
37295
37306
  switch (ae) {
37296
37307
  case "AGENT_TYPING":
37297
37308
  return ne();
37298
37309
  case "CONVERSATION_ACCEPTED":
37299
- return $(ge);
37310
+ return q(ge);
37300
37311
  case "CONVERSATION_CREATED":
37301
37312
  return c(w);
37302
37313
  case "CONVERSATION_ERROR":
37303
37314
  return;
37304
37315
  case "CONVERSATION_TERMINATED":
37305
- return Q();
37316
+ return K();
37306
37317
  case "CONVERSATION_TRANSFERRED_TO_GROUP":
37307
37318
  return;
37308
37319
  case "CONVERSATION_TRANSFERRED_TO_AGENT":
37309
37320
  return;
37310
37321
  case "MESSAGE_ADDED":
37311
- return K(ge);
37322
+ return Q(ge);
37312
37323
  case "PARTICIPANT_JOINED":
37313
37324
  return;
37314
37325
  case "PARTICIPANT_LEFT":
@@ -37316,35 +37327,35 @@ const sS = "This conversation with a live agent has ended. Please note that a tr
37316
37327
  default:
37317
37328
  return;
37318
37329
  }
37319
- }, { sendJsonMessage: F } = aS(m, {
37330
+ }, { sendJsonMessage: F } = iS(m, {
37320
37331
  onMessage: Y
37321
37332
  }), A = () => {
37322
37333
  E(tr.FORM);
37323
- const q = n?.liveChat?.form;
37324
- (!q || q.length === 0) && i(Cn.XPERT);
37334
+ const $ = n?.liveChat?.form;
37335
+ (!$ || $.length === 0) && i(Cn.XPERT);
37325
37336
  }, z = () => {
37326
37337
  F({
37327
37338
  action: "sendmessage",
37328
37339
  event: "TERMINATE_CONVERSATION"
37329
37340
  });
37330
- }, Q = () => {
37341
+ }, K = () => {
37331
37342
  r({
37332
- content: sS,
37343
+ content: oS,
37333
37344
  role: Ne.INFO
37334
37345
  }), J();
37335
37346
  }, J = () => {
37336
37347
  c(""), y(null), E(tr.FORM), i(Cn.XPERT);
37337
37348
  }, ne = () => {
37338
37349
  v && clearTimeout(v), l(!0);
37339
- const q = setTimeout(() => {
37350
+ const $ = setTimeout(() => {
37340
37351
  l(!1);
37341
37352
  }, 5e3);
37342
- I(q);
37343
- }, $ = (q) => {
37344
- const { displayName: W } = q;
37353
+ I($);
37354
+ }, q = ($) => {
37355
+ const { displayName: W } = $;
37345
37356
  p([]), o(W ?? "An agent"), E(tr.CONVERSATION);
37346
- }, K = (q) => {
37347
- const { messageId: W, text: w, timestamp: ae } = q;
37357
+ }, Q = ($) => {
37358
+ const { messageId: W, text: w, timestamp: ae } = $;
37348
37359
  B({
37349
37360
  content: w ?? "",
37350
37361
  id: W ?? "",
@@ -37364,19 +37375,19 @@ const sS = "This conversation with a live agent has ended. Please note that a tr
37364
37375
  agentName: s,
37365
37376
  agentTyping: u,
37366
37377
  cancelLiveChatConnection: A,
37367
- endLiveChat: Q,
37378
+ endLiveChat: K,
37368
37379
  liveChatMessages: h,
37369
37380
  pushLiveChatMessage: B,
37370
- sendMessage: (q) => {
37381
+ sendMessage: ($) => {
37371
37382
  B({
37372
- content: q,
37383
+ content: $,
37373
37384
  id: "",
37374
37385
  role: Ne.USER,
37375
37386
  timestamp: /* @__PURE__ */ new Date()
37376
37387
  }), F({
37377
37388
  action: "sendmessage",
37378
37389
  event: "OUTGOING_MESSAGE",
37379
- message: q
37390
+ message: $
37380
37391
  });
37381
37392
  },
37382
37393
  sendTypingEvent: async () => {
@@ -37388,10 +37399,10 @@ const sS = "This conversation with a live agent has ended. Please note that a tr
37388
37399
  setLiveChatMessages: p,
37389
37400
  step: b,
37390
37401
  setStep: E,
37391
- startLiveChat: (q) => {
37402
+ startLiveChat: ($) => {
37392
37403
  try {
37393
37404
  E(tr.CONNECTING);
37394
- const W = new URLSearchParams({ ...t, ...q });
37405
+ const W = new URLSearchParams({ ...t, ...$ });
37395
37406
  W.append("url", window.location.href), y(
37396
37407
  `${n?.liveChat?.socketUrl}?${W.toString()}`
37397
37408
  );
@@ -37405,7 +37416,7 @@ const sS = "This conversation with a live agent has ended. Please note that a tr
37405
37416
  icon: "check",
37406
37417
  iconColor: "#30A171",
37407
37418
  role: Ne.NOTIFICATION
37408
- }), Q();
37419
+ }), K();
37409
37420
  },
37410
37421
  terminateConversation: z
37411
37422
  };
@@ -37415,7 +37426,7 @@ gp.propTypes = {
37415
37426
  children: T.element.isRequired,
37416
37427
  liveChatPayload: T.object
37417
37428
  };
37418
- const oS = "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", uS = "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";
37429
+ const uS = "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", lS = "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";
37419
37430
  function bp({ handleResizeButtonClick: e, setIsMounted: t }) {
37420
37431
  const { isMobile: n, isNormalSize: r, leadCaptureFormActive: a } = Ie(jt);
37421
37432
  if (n || a)
@@ -37438,7 +37449,7 @@ function bp({ handleResizeButtonClick: e, setIsMounted: t }) {
37438
37449
  alt: i,
37439
37450
  "aria-hidden": !0,
37440
37451
  height: "24px",
37441
- src: r ? oS : uS,
37452
+ src: r ? uS : lS,
37442
37453
  width: "24px"
37443
37454
  }
37444
37455
  )
@@ -37634,7 +37645,7 @@ Tp.propTypes = {
37634
37645
  setIsMounted: T.func.isRequired,
37635
37646
  onClose: T.func.isRequired
37636
37647
  };
37637
- function lS() {
37648
+ function cS() {
37638
37649
  const {
37639
37650
  deleteConversationModal: e,
37640
37651
  deleteConversationHistory: t,
@@ -37688,7 +37699,7 @@ function lS() {
37688
37699
  }
37689
37700
  ) : null;
37690
37701
  }
37691
- const cS = () => {
37702
+ const dS = () => {
37692
37703
  const { isMobile: e } = Ie(jt), { launchButton: t } = Ie(At);
37693
37704
  return t?.message?.enabled ? /* @__PURE__ */ S.jsx(
37694
37705
  "div",
@@ -37702,13 +37713,13 @@ const cS = () => {
37702
37713
  }
37703
37714
  ) : null;
37704
37715
  };
37705
- function dS() {
37716
+ function hS() {
37706
37717
  return /* @__PURE__ */ S.jsx("div", { className: "spinner" });
37707
37718
  }
37708
37719
  function Ep() {
37709
37720
  const { conversationScreen: e, primaryColor: t, widgetMode: n } = Ie(At), { cancelLiveChatConnection: r } = Ie(Yr), a = e?.liveChat?.queueMessages ?? [], i = n ? t : "#FFFFFF", s = n ? "#FFFFFF" : t;
37710
37721
  return /* @__PURE__ */ S.jsxs("div", { className: "live-chat-connecting", style: { backgroundColor: i }, children: [
37711
- /* @__PURE__ */ S.jsx(dS, {}),
37722
+ /* @__PURE__ */ S.jsx(hS, {}),
37712
37723
  /* @__PURE__ */ S.jsx("div", { className: "live-chat-connecting-messages", style: { color: s }, children: a.length === 0 ? /* @__PURE__ */ S.jsx("p", { children: "Connecting to live agent" }) : a.map((o, u) => /* @__PURE__ */ S.jsx("p", { children: o }, `queue-message-${u}`)) }),
37713
37724
  /* @__PURE__ */ S.jsx(
37714
37725
  "button",
@@ -37721,7 +37732,7 @@ function Ep() {
37721
37732
  ] });
37722
37733
  }
37723
37734
  Ep.propTypes = {};
37724
- const l1 = 500, hS = [
37735
+ const l1 = 500, fS = [
37725
37736
  {
37726
37737
  key: "great",
37727
37738
  icon: "😀",
@@ -37759,7 +37770,7 @@ function xp({ onDismiss: e }) {
37759
37770
  ] }),
37760
37771
  r && /* @__PURE__ */ S.jsxs(S.Fragment, { children: [
37761
37772
  /* @__PURE__ */ S.jsx("p", { children: "Before you go, let me know how I did:" }),
37762
- /* @__PURE__ */ S.jsx("div", { className: "livechat-end-confirmation-container__icon-button-container", children: hS.map(({ key: y, icon: b, text: E }) => {
37773
+ /* @__PURE__ */ S.jsx("div", { className: "livechat-end-confirmation-container__icon-button-container", children: fS.map(({ key: y, icon: b, text: E }) => {
37763
37774
  const v = y === i, I = v ? { backgroundColor: "#E7E4DB", borderColor: "#767676" } : {};
37764
37775
  return /* @__PURE__ */ S.jsxs(
37765
37776
  "button",
@@ -37810,7 +37821,7 @@ function xp({ onDismiss: e }) {
37810
37821
  xp.propTypes = {
37811
37822
  onDismiss: T.func
37812
37823
  };
37813
- function fS(e, t) {
37824
+ function mS(e, t) {
37814
37825
  const [n, r] = Ee(!1), a = Je(), i = Wt(
37815
37826
  (...s) => {
37816
37827
  n || (e(...s), r(!0), clearTimeout(a.current), a.current = setTimeout(() => {
@@ -37830,7 +37841,7 @@ function Sp() {
37830
37841
  liveChatMessages: n,
37831
37842
  sendMessage: r,
37832
37843
  sendTypingEvent: a
37833
- } = Ie(Yr), i = Je(null), [s, o] = Ee(!1), u = fS(a, 5e3), l = () => {
37844
+ } = Ie(Yr), i = Je(null), [s, o] = Ee(!1), u = mS(a, 5e3), l = () => {
37834
37845
  u();
37835
37846
  }, c = (h) => {
37836
37847
  h.trim() !== "" && r(h);
@@ -37892,7 +37903,7 @@ function Sp() {
37892
37903
  ] });
37893
37904
  }
37894
37905
  Sp.propTypes = {};
37895
- function mS(e) {
37906
+ function pS(e) {
37896
37907
  const t = /^[-!#$%&'*+/0-9=?A-Z^_a-z{|}~](\.?[-!#$%&'*+/0-9=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-*\.?[a-zA-Z0-9])*\.[a-zA-Z](-?[a-zA-Z0-9])+$/;
37897
37908
  if (!e || e.length > 254 || !t.test(e)) return !1;
37898
37909
  var r = e.split("@");
@@ -37900,7 +37911,7 @@ function mS(e) {
37900
37911
  return i.length > 63;
37901
37912
  }));
37902
37913
  }
37903
- const pS = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20role='img'%20focusable='false'%20aria-hidden='true'%3e%3cpath%20d='M19%2019H5V5h7V3H3v18h18v-9h-2v7zM14%203v2h3.59l-9.83%209.83%201.41%201.41L19%206.41V10h2V3h-7z'%20fill='currentColor'%3e%3c/path%3e%3c/svg%3e", gS = () => {
37914
+ const gS = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20role='img'%20focusable='false'%20aria-hidden='true'%3e%3cpath%20d='M19%2019H5V5h7V3H3v18h18v-9h-2v7zM14%203v2h3.59l-9.83%209.83%201.41%201.41L19%206.41V10h2V3h-7z'%20fill='currentColor'%3e%3c/path%3e%3c/svg%3e", bS = () => {
37904
37915
  const [e, t] = Ee({});
37905
37916
  return {
37906
37917
  clearError: (i) => {
@@ -37916,7 +37927,7 @@ const pS = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20wid
37916
37927
  },
37917
37928
  setErrors: t
37918
37929
  };
37919
- }, bS = (e) => {
37930
+ }, yS = (e) => {
37920
37931
  const [t, n] = Ee(e);
37921
37932
  return [t, n, (i, s) => {
37922
37933
  n((o) => ({ ...o, [i]: s }));
@@ -37925,7 +37936,7 @@ const pS = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20wid
37925
37936
  }];
37926
37937
  }, Fo = "privacy policy";
37927
37938
  function Cp() {
37928
- const { conversationScreen: e, primaryColor: t } = Ie(At), { startLiveChat: n } = Ie(Yr), { setMode: r } = Ie(jt), { form: a, formHeader: i, privacyPolicyLink: s, privacyPolicyText: o } = e.liveChat, [u, , l] = bS({}), [c, h] = Ee(!1), { clearError: p, errors: m, setErrors: y } = gS(), b = Gt(
37939
+ const { conversationScreen: e, primaryColor: t } = Ie(At), { startLiveChat: n } = Ie(Yr), { setMode: r } = Ie(jt), { form: a, formHeader: i, privacyPolicyLink: s, privacyPolicyText: o } = e.liveChat, [u, , l] = yS({}), [c, h] = Ee(!1), { clearError: p, errors: m, setErrors: y } = bS(), b = Gt(
37929
37940
  () => (o ?? "").split(Fo, 2),
37930
37941
  [o]
37931
37942
  ), E = () => {
@@ -37943,14 +37954,14 @@ function Cp() {
37943
37954
  }, [a, n]);
37944
37955
  const Y = () => {
37945
37956
  const F = a.reduce((A, z) => {
37946
- const { key: Q, validations: J = [] } = z, ne = u[Q];
37947
- if (!ne) return { ...A, [Q]: "Required" };
37957
+ const { key: K, validations: J = [] } = z, ne = u[K];
37958
+ if (!ne) return { ...A, [K]: "Required" };
37948
37959
  if (J?.length > 0)
37949
- for (const $ of J)
37950
- switch ($) {
37960
+ for (const q of J)
37961
+ switch (q) {
37951
37962
  case "email": {
37952
- if (!mS(ne))
37953
- return { ...A, [Q]: "Should be email" };
37963
+ if (!pS(ne))
37964
+ return { ...A, [K]: "Should be email" };
37954
37965
  break;
37955
37966
  }
37956
37967
  }
@@ -37994,7 +38005,7 @@ function Cp() {
37994
38005
  {
37995
38006
  alt: "open in new",
37996
38007
  "aria-hidden": "true",
37997
- src: pS
38008
+ src: gS
37998
38009
  }
37999
38010
  )
38000
38011
  ]
@@ -38128,7 +38139,7 @@ Ap.propTypes = {
38128
38139
  showMessage: T.bool,
38129
38140
  style: T.shape()
38130
38141
  };
38131
- function yS(e, t, n) {
38142
+ function vS(e, t, n) {
38132
38143
  const r = Wt(
38133
38144
  (a) => {
38134
38145
  const { data: i } = a || {}, { chatState: s, show: o, type: u } = i || {};
@@ -38158,7 +38169,7 @@ function yS(e, t, n) {
38158
38169
  };
38159
38170
  }, [e, t]);
38160
38171
  }
38161
- function vS(e) {
38172
+ function TS(e) {
38162
38173
  const [t, n] = Ee(null);
38163
38174
  return _e(() => {
38164
38175
  try {
@@ -38177,7 +38188,7 @@ function vS(e) {
38177
38188
  };
38178
38189
  }, [e]), t;
38179
38190
  }
38180
- function TS(e) {
38191
+ function ES(e) {
38181
38192
  _e(() => {
38182
38193
  const t = () => document.visibilityState === "visible" && e();
38183
38194
  return document.addEventListener("visibilitychange", t), () => {
@@ -38185,7 +38196,7 @@ function TS(e) {
38185
38196
  };
38186
38197
  }, [e]);
38187
38198
  }
38188
- function ES({
38199
+ function xS({
38189
38200
  abortControllerRef: e,
38190
38201
  buildChatRequestBody: t,
38191
38202
  chatApi: n,
@@ -38260,7 +38271,7 @@ function ES({
38260
38271
  B();
38261
38272
  }, [B]);
38262
38273
  }
38263
- function xS({
38274
+ function SS({
38264
38275
  configurationLoaded: e,
38265
38276
  userTracking: t,
38266
38277
  widgetMode: n,
@@ -38300,12 +38311,12 @@ function c1(e, t) {
38300
38311
  );
38301
38312
  return (t.getTime() - e.getTime()) / 1e3;
38302
38313
  }
38303
- function SS(e) {
38314
+ function CS(e) {
38304
38315
  if (!e) return 0;
38305
38316
  const t = /\[(.+)\]\(([^ ]+)( "(.+)")?\)/gm;
38306
38317
  return e.match(t)?.length || 0;
38307
38318
  }
38308
- const CS = 100, wS = (e = CS) => new Promise((t) => setTimeout(t, e));
38319
+ const wS = 100, AS = (e = wS) => new Promise((t) => setTimeout(t, e));
38309
38320
  function _p({ submitEventExternal: e = null }) {
38310
38321
  const {
38311
38322
  chatApi: t,
@@ -38333,10 +38344,10 @@ function _p({ submitEventExternal: e = null }) {
38333
38344
  setHasError: F,
38334
38345
  setHasNewMessage: A,
38335
38346
  setIsNormalSize: z,
38336
- setLoading: Q,
38347
+ setLoading: K,
38337
38348
  setLoadingHistory: J,
38338
38349
  setStreaming: ne
38339
- } = Ie(jt), [, $] = Ee(!1), [, K] = Ee(!1), [te, N] = Ee(!1), [O, H] = Ee(!1), [X, q] = Ee(!1), [W, w] = Ee(!0), ae = te || !c, ge = Je(null), k = Je(null), ve = Jt.get(`${i}-test`) === "1", ke = !!r && a?.startMode === "guided", Le = Wt(
38350
+ } = Ie(jt), [, q] = Ee(!1), [, Q] = Ee(!1), [te, N] = Ee(!1), [O, H] = Ee(!1), [X, $] = Ee(!1), [W, w] = Ee(!0), ae = te || !c, ge = Je(null), k = Je(null), ve = Jt.get(`${i}-test`) === "1", ke = !!r && a?.startMode === "guided", Le = Wt(
38340
38351
  ({ messageList: Se, conversationHistoryId: we }) => {
38341
38352
  if (!t?.messagesKey)
38342
38353
  return {};
@@ -38369,11 +38380,11 @@ function _p({ submitEventExternal: e = null }) {
38369
38380
  }
38370
38381
  }, [p]), _e(() => {
38371
38382
  B === Cn.XPERT && ae && ge.current && ge.current.focus();
38372
- }, [B, ae]), yS(
38383
+ }, [B, ae]), vS(
38373
38384
  a?.liveChat?.enabled,
38374
38385
  O,
38375
38386
  H
38376
- ), xS({
38387
+ ), SS({
38377
38388
  configurationLoaded: n,
38378
38389
  userTracking: u,
38379
38390
  widgetMode: c,
@@ -38405,7 +38416,7 @@ function _p({ submitEventExternal: e = null }) {
38405
38416
  payload: {
38406
38417
  category: "2u",
38407
38418
  label: "xpert-chatbot",
38408
- linkCount: SS(Se),
38419
+ linkCount: CS(Se),
38409
38420
  apiResponseMessage: Se,
38410
38421
  isTestUser: ve,
38411
38422
  conversationHistoryId: we,
@@ -38501,7 +38512,7 @@ function _p({ submitEventExternal: e = null }) {
38501
38512
  J(!1), w(!0);
38502
38513
  }
38503
38514
  }, pt = a?.conversationHistory?.enabled && ae && !O;
38504
- if (TS(
38515
+ if (ES(
38505
38516
  () => pt && et()
38506
38517
  ), _e(() => {
38507
38518
  const Se = !!Jt.get(`${i}-conversation-history-id`);
@@ -38512,7 +38523,7 @@ function _p({ submitEventExternal: e = null }) {
38512
38523
  let Se, we;
38513
38524
  if (n)
38514
38525
  return u?.enabled && (Se = setInterval(() => {
38515
- (window.analytics?.track || e) && (k.current = window.analytics, clearInterval(Se), clearTimeout(we), $(!0));
38526
+ (window.analytics?.track || e) && (k.current = window.analytics, clearInterval(Se), clearTimeout(we), q(!0));
38516
38527
  }, 1e3), we = setTimeout(() => {
38517
38528
  clearInterval(Se);
38518
38529
  }, 6e4)), () => {
@@ -38521,7 +38532,7 @@ function _p({ submitEventExternal: e = null }) {
38521
38532
  }, [n, e, u?.enabled]), _e(() => {
38522
38533
  let Se, we;
38523
38534
  const De = () => {
38524
- l?.enabled && window.optimizely && window.experiments && (clearInterval(Se), clearTimeout(we), K(!0));
38535
+ l?.enabled && window.optimizely && window.experiments && (clearInterval(Se), clearTimeout(we), Q(!0));
38525
38536
  };
38526
38537
  if (n)
38527
38538
  return Se = setInterval(De, 1e3), we = setTimeout(() => {
@@ -38533,7 +38544,7 @@ function _p({ submitEventExternal: e = null }) {
38533
38544
  n,
38534
38545
  l?.enabled,
38535
38546
  l?.experimentName
38536
- ]), vS(l?.experimentName), ES({
38547
+ ]), TS(l?.experimentName), xS({
38537
38548
  abortControllerRef: p,
38538
38549
  buildChatRequestBody: Le,
38539
38550
  chatApi: t,
@@ -38548,7 +38559,7 @@ function _p({ submitEventExternal: e = null }) {
38548
38559
  setDisableScroll: Y,
38549
38560
  setHasError: F,
38550
38561
  setHasNewMessage: A,
38551
- setLoading: Q,
38562
+ setLoading: K,
38552
38563
  xpertMessages: E
38553
38564
  }), !n || l?.enabled && !l?.experimentName && !ve || u?.enabled && !k?.current?.track && !e)
38554
38565
  return null;
@@ -38589,7 +38600,7 @@ function _p({ submitEventExternal: e = null }) {
38589
38600
  }), V++;
38590
38601
  ye = c1(De, /* @__PURE__ */ new Date());
38591
38602
  }
38592
- if (Ae || (await wS(), Ae)) break;
38603
+ if (Ae || (await AS(), Ae)) break;
38593
38604
  b((Lt) => {
38594
38605
  const St = [...Lt];
38595
38606
  return St.splice(
@@ -38642,7 +38653,7 @@ function _p({ submitEventExternal: e = null }) {
38642
38653
  clientId: i,
38643
38654
  conversationHistoryId: gn(i)
38644
38655
  }
38645
- }), Q(!0);
38656
+ }), K(!0);
38646
38657
  let Pe = null;
38647
38658
  (a?.conversationHistory?.enabled || ke) && (Pe = gn(i));
38648
38659
  const Be = [
@@ -38677,7 +38688,7 @@ function _p({ submitEventExternal: e = null }) {
38677
38688
  },
38678
38689
  ...V && { external_id: V }
38679
38690
  }
38680
- }), Y(!1), A(!0), Q(!1);
38691
+ }), Y(!1), A(!0), K(!1);
38681
38692
  return;
38682
38693
  }
38683
38694
  y({ role: Ne.USER, content: Se }), p.current = new AbortController();
@@ -38694,7 +38705,7 @@ function _p({ submitEventExternal: e = null }) {
38694
38705
  });
38695
38706
  if (!je.ok)
38696
38707
  throw new Error(`HTTPError: ${je.status} ${je.statusText}`);
38697
- Q(!1), t.payloadParams?.stream ? await Nt(
38708
+ K(!1), t.payloadParams?.stream ? await Nt(
38698
38709
  je,
38699
38710
  Pe,
38700
38711
  Se,
@@ -38710,7 +38721,7 @@ function _p({ submitEventExternal: e = null }) {
38710
38721
  } catch (we) {
38711
38722
  if (we.name === "AbortError")
38712
38723
  return;
38713
- Q(!1), F(!0), console.error(we);
38724
+ K(!1), F(!0), console.error(we);
38714
38725
  }
38715
38726
  }, In = () => {
38716
38727
  H(!1), N(!0), z(!0), et();
@@ -38719,7 +38730,7 @@ function _p({ submitEventExternal: e = null }) {
38719
38730
  }, On = () => {
38720
38731
  N(!0), z(!0), et();
38721
38732
  }, be = () => {
38722
- N(!1), q(!1);
38733
+ N(!1), $(!1);
38723
38734
  }, We = s?.animatedGraduate?.enabled, rt = o?.enabled ? v ? o?.style?.mobile : o?.style : null;
38724
38735
  return (
38725
38736
  // do not remove this class as it's needed to turn off chatbot
@@ -38769,7 +38780,7 @@ function _p({ submitEventExternal: e = null }) {
38769
38780
  handleFloatingActionButtonClick: In
38770
38781
  }
38771
38782
  ),
38772
- c && /* @__PURE__ */ S.jsx(cS, {}),
38783
+ c && /* @__PURE__ */ S.jsx(dS, {}),
38773
38784
  ae && !O && /* @__PURE__ */ S.jsx(D1, { isMounted: X, children: /* @__PURE__ */ S.jsx(
38774
38785
  "div",
38775
38786
  {
@@ -38782,10 +38793,10 @@ function _p({ submitEventExternal: e = null }) {
38782
38793
  onClose: be,
38783
38794
  handleResizeButtonClick: Nn,
38784
38795
  isMounted: X,
38785
- setIsMounted: q
38796
+ setIsMounted: $
38786
38797
  }
38787
38798
  ),
38788
- /* @__PURE__ */ S.jsx(lS, {}),
38799
+ /* @__PURE__ */ S.jsx(cS, {}),
38789
38800
  B === Cn.XPERT && /* @__PURE__ */ S.jsx(
38790
38801
  mp,
38791
38802
  {
@@ -38917,7 +38928,7 @@ Ip.propTypes = {
38917
38928
  xpertKey: T.string,
38918
38929
  widgetMode: T.bool
38919
38930
  };
38920
- function AS() {
38931
+ function _S() {
38921
38932
  let e = document.getElementById("xpert-chatbot-container");
38922
38933
  e || (e = document.createElement("div"), e.setAttribute("id", "xpert-chatbot-container"), document.body.appendChild(e), M2(
38923
38934
  /* @__PURE__ */ S.jsx(R2, { children: /* @__PURE__ */ S.jsx(
@@ -38933,7 +38944,7 @@ function AS() {
38933
38944
  ));
38934
38945
  }
38935
38946
  window.XpertChatbotFrontend = window.XpertChatbotFrontend || {};
38936
- window.XpertChatbotFrontend.mount = AS;
38947
+ window.XpertChatbotFrontend.mount = _S;
38937
38948
  window.process = window.process || {};
38938
38949
  window.process.env = { ...window.process.env, NODE_ENV: "production" };
38939
38950
  export {