@access-ci/ui 0.20.4 → 0.20.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{access-ci-ui-react-BtB9wMf5.js → access-ci-ui-react-CP5mQzUa.js} +3 -3
- package/dist/access-ci-ui-react.js +1 -1
- package/dist/access-ci-ui-react.umd.cjs +26 -26
- package/dist/access-ci-ui.bundle.js +44 -44
- package/dist/access-ci-ui.js +1 -1
- package/dist/access-ci-ui.umd.cjs +42 -42
- package/dist/{access-qa-bot-DD6xn0ii.js → access-qa-bot-B-DSY6d4.js} +159 -157
- package/dist/{access-qa-bot-B5bdzcpP.js → access-qa-bot-CQOilD16.js} +541 -539
- package/dist/{icon-BzhlFlqK.js → icon-C5SS8za8.js} +1 -1
- package/dist/{index-BJubWi7g.js → index-BWF1UvQg.js} +3 -3
- package/dist/{resource-group-detail-DwFSj2fT.js → resource-group-detail-CM9braSw.js} +1 -1
- package/dist/{resource-group-detail-uIzXwshu.js → resource-group-detail-oHbuT_iG.js} +2 -2
- package/dist/{resource-home-D2JoGg_B.js → resource-home-C2662ZCg.js} +1 -1
- package/dist/{resource-home-dFN7d7Zu.js → resource-home-CXDZxCxK.js} +2 -2
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as oa, g as Il, a as x, j as M, T as V, b as Tl } from "./index-
|
|
1
|
+
import { r as oa, g as Il, a as x, j as M, T as V, b as Tl } from "./index-BWF1UvQg.js";
|
|
2
2
|
var bn = {}, Mn = {};
|
|
3
3
|
var Vs;
|
|
4
4
|
function Ql() {
|
|
@@ -141,7 +141,7 @@ function Ql() {
|
|
|
141
141
|
}
|
|
142
142
|
return u;
|
|
143
143
|
}
|
|
144
|
-
var D = /([A-Z])/g, y = /^ms-/,
|
|
144
|
+
var D = /([A-Z])/g, y = /^ms-/, k = Array.isArray;
|
|
145
145
|
function I(u, g) {
|
|
146
146
|
return { insertionMode: u, selectedValue: g };
|
|
147
147
|
}
|
|
@@ -301,7 +301,7 @@ function Ql() {
|
|
|
301
301
|
return u.push(">"), O(u, q, R), R;
|
|
302
302
|
case "option":
|
|
303
303
|
q = j.selectedValue, u.push(L("option"));
|
|
304
|
-
var pe = ne = null,
|
|
304
|
+
var pe = ne = null, ye = null, ke = null;
|
|
305
305
|
for (R in b) if (r.call(b, R)) {
|
|
306
306
|
var Xe = b[R];
|
|
307
307
|
if (Xe != null) switch (R) {
|
|
@@ -309,7 +309,7 @@ function Ql() {
|
|
|
309
309
|
ne = Xe;
|
|
310
310
|
break;
|
|
311
311
|
case "selected":
|
|
312
|
-
|
|
312
|
+
ye = Xe;
|
|
313
313
|
break;
|
|
314
314
|
case "dangerouslySetInnerHTML":
|
|
315
315
|
ke = Xe;
|
|
@@ -320,14 +320,14 @@ function Ql() {
|
|
|
320
320
|
Q(u, P, R, Xe);
|
|
321
321
|
}
|
|
322
322
|
}
|
|
323
|
-
if (q != null) if (b = pe !== null ? "" + pe : U(ne),
|
|
323
|
+
if (q != null) if (b = pe !== null ? "" + pe : U(ne), k(q)) {
|
|
324
324
|
for (P = 0; P < q.length; P++)
|
|
325
325
|
if ("" + q[P] === b) {
|
|
326
326
|
u.push(' selected=""');
|
|
327
327
|
break;
|
|
328
328
|
}
|
|
329
329
|
} else "" + q === b && u.push(' selected=""');
|
|
330
|
-
else
|
|
330
|
+
else ye && u.push(' selected=""');
|
|
331
331
|
return u.push(">"), O(u, ke, ne), ne;
|
|
332
332
|
case "textarea":
|
|
333
333
|
u.push(L("textarea")), ke = q = R = null;
|
|
@@ -353,7 +353,7 @@ function Ql() {
|
|
|
353
353
|
}
|
|
354
354
|
if (R === null && q !== null && (R = q), u.push(">"), ke != null) {
|
|
355
355
|
if (R != null) throw Error(t(92));
|
|
356
|
-
if (
|
|
356
|
+
if (k(ke) && 1 < ke.length) throw Error(t(93));
|
|
357
357
|
R = "" + ke;
|
|
358
358
|
}
|
|
359
359
|
return typeof R == "string" && R[0] === `
|
|
@@ -361,24 +361,24 @@ function Ql() {
|
|
|
361
361
|
`), R !== null && u.push(v("" + R)), null;
|
|
362
362
|
case "input":
|
|
363
363
|
u.push(L("input")), pe = ke = ne = R = null;
|
|
364
|
-
for (q in b) if (r.call(b, q) && (
|
|
364
|
+
for (q in b) if (r.call(b, q) && (ye = b[q], ye != null)) switch (q) {
|
|
365
365
|
case "children":
|
|
366
366
|
case "dangerouslySetInnerHTML":
|
|
367
367
|
throw Error(t(399, "input"));
|
|
368
368
|
case "defaultChecked":
|
|
369
|
-
pe =
|
|
369
|
+
pe = ye;
|
|
370
370
|
break;
|
|
371
371
|
case "defaultValue":
|
|
372
|
-
ne =
|
|
372
|
+
ne = ye;
|
|
373
373
|
break;
|
|
374
374
|
case "checked":
|
|
375
|
-
ke =
|
|
375
|
+
ke = ye;
|
|
376
376
|
break;
|
|
377
377
|
case "value":
|
|
378
|
-
R =
|
|
378
|
+
R = ye;
|
|
379
379
|
break;
|
|
380
380
|
default:
|
|
381
|
-
Q(u, P, q,
|
|
381
|
+
Q(u, P, q, ye);
|
|
382
382
|
}
|
|
383
383
|
return ke !== null ? Q(u, P, "checked", ke) : pe !== null && Q(u, P, "checked", pe), R !== null ? Q(u, P, "value", R) : ne !== null && Q(u, P, "value", ne), u.push("/>"), null;
|
|
384
384
|
case "menuitem":
|
|
@@ -468,7 +468,7 @@ function Ql() {
|
|
|
468
468
|
default:
|
|
469
469
|
if (g.indexOf("-") === -1 && typeof b.is != "string") return W(u, b, g, P);
|
|
470
470
|
u.push(L(g)), q = R = null;
|
|
471
|
-
for (
|
|
471
|
+
for (ye in b) if (r.call(b, ye) && (ne = b[ye], ne != null)) switch (ye) {
|
|
472
472
|
case "children":
|
|
473
473
|
R = ne;
|
|
474
474
|
break;
|
|
@@ -482,7 +482,7 @@ function Ql() {
|
|
|
482
482
|
case "suppressHydrationWarning":
|
|
483
483
|
break;
|
|
484
484
|
default:
|
|
485
|
-
i(
|
|
485
|
+
i(ye) && typeof ne != "function" && typeof ne != "symbol" && u.push(" ", ye, '="', v(ne), '"');
|
|
486
486
|
}
|
|
487
487
|
return u.push(">"), O(u, q, R), R;
|
|
488
488
|
}
|
|
@@ -548,13 +548,13 @@ function Ql() {
|
|
|
548
548
|
}
|
|
549
549
|
});
|
|
550
550
|
}
|
|
551
|
-
function
|
|
551
|
+
function S(u, g) {
|
|
552
552
|
return g = g === void 0 ? "" : g, { bootstrapChunks: [], startInlineScript: "<script>", placeholderPrefix: g + "P:", segmentPrefix: g + "S:", boundaryPrefix: g + "B:", idPrefix: g, nextSuspenseID: 0, sentCompleteSegmentFunction: !1, sentCompleteBoundaryFunction: !1, sentClientRenderFunction: !1, generateStaticMarkup: u };
|
|
553
553
|
}
|
|
554
554
|
function ce(u, g, b, P) {
|
|
555
555
|
return b.generateStaticMarkup ? (u.push(v(g)), !1) : (g === "" ? u = P : (P && u.push("<!-- -->"), u.push(v(g)), u = !0), u);
|
|
556
556
|
}
|
|
557
|
-
var B = Object.assign, ae = /* @__PURE__ */ Symbol.for("react.element"), fe = /* @__PURE__ */ Symbol.for("react.portal"), de = /* @__PURE__ */ Symbol.for("react.fragment"), be = /* @__PURE__ */ Symbol.for("react.strict_mode"), Oe = /* @__PURE__ */ Symbol.for("react.profiler"), Ie = /* @__PURE__ */ Symbol.for("react.provider"), nt = /* @__PURE__ */ Symbol.for("react.context"), Re = /* @__PURE__ */ Symbol.for("react.forward_ref"), je = /* @__PURE__ */ Symbol.for("react.suspense"), Je = /* @__PURE__ */ Symbol.for("react.suspense_list"), ie = /* @__PURE__ */ Symbol.for("react.memo"), oe = /* @__PURE__ */ Symbol.for("react.lazy"), Ee = /* @__PURE__ */ Symbol.for("react.scope"), we = /* @__PURE__ */ Symbol.for("react.debug_trace_mode"), Ne = /* @__PURE__ */ Symbol.for("react.legacy_hidden"),
|
|
557
|
+
var B = Object.assign, ae = /* @__PURE__ */ Symbol.for("react.element"), fe = /* @__PURE__ */ Symbol.for("react.portal"), de = /* @__PURE__ */ Symbol.for("react.fragment"), be = /* @__PURE__ */ Symbol.for("react.strict_mode"), Oe = /* @__PURE__ */ Symbol.for("react.profiler"), Ie = /* @__PURE__ */ Symbol.for("react.provider"), nt = /* @__PURE__ */ Symbol.for("react.context"), Re = /* @__PURE__ */ Symbol.for("react.forward_ref"), je = /* @__PURE__ */ Symbol.for("react.suspense"), Je = /* @__PURE__ */ Symbol.for("react.suspense_list"), ie = /* @__PURE__ */ Symbol.for("react.memo"), oe = /* @__PURE__ */ Symbol.for("react.lazy"), Ee = /* @__PURE__ */ Symbol.for("react.scope"), we = /* @__PURE__ */ Symbol.for("react.debug_trace_mode"), Ne = /* @__PURE__ */ Symbol.for("react.legacy_hidden"), Me = /* @__PURE__ */ Symbol.for("react.default_value"), Le = Symbol.iterator;
|
|
558
558
|
function Ue(u) {
|
|
559
559
|
if (u == null) return null;
|
|
560
560
|
if (typeof u == "function") return u.displayName || u.name || null;
|
|
@@ -624,14 +624,14 @@ function Ql() {
|
|
|
624
624
|
if (u.context._currentValue2 = u.parentValue, u = u.parent, u === null) throw Error(t(402));
|
|
625
625
|
u.depth === g.depth ? xe(u, g) : Gt(u, g);
|
|
626
626
|
}
|
|
627
|
-
function
|
|
627
|
+
function vt(u, g) {
|
|
628
628
|
var b = g.parent;
|
|
629
629
|
if (b === null) throw Error(t(402));
|
|
630
|
-
u.depth === b.depth ? xe(u, b) :
|
|
630
|
+
u.depth === b.depth ? xe(u, b) : vt(u, b), g.context._currentValue2 = g.value;
|
|
631
631
|
}
|
|
632
632
|
function lt(u) {
|
|
633
633
|
var g = _e;
|
|
634
|
-
g !== u && (g === null ? ht(u) : u === null ? qt(g) : g.depth === u.depth ? xe(g, u) : g.depth > u.depth ? Gt(g, u) :
|
|
634
|
+
g !== u && (g === null ? ht(u) : u === null ? qt(g) : g.depth === u.depth ? xe(g, u) : g.depth > u.depth ? Gt(g, u) : vt(g, u), _e = u);
|
|
635
635
|
}
|
|
636
636
|
var z = { isMounted: function() {
|
|
637
637
|
return !1;
|
|
@@ -670,17 +670,17 @@ function Ql() {
|
|
|
670
670
|
}
|
|
671
671
|
return { id: 1 << R | b << j | P, overflow: u };
|
|
672
672
|
}
|
|
673
|
-
var ue = Math.clz32 ? Math.clz32 :
|
|
674
|
-
function
|
|
673
|
+
var ue = Math.clz32 ? Math.clz32 : Qe, $e = Math.log, ze = Math.LN2;
|
|
674
|
+
function Qe(u) {
|
|
675
675
|
return u >>>= 0, u === 0 ? 32 : 31 - ($e(u) / ze | 0) | 0;
|
|
676
676
|
}
|
|
677
677
|
function Ke(u, g) {
|
|
678
678
|
return u === g && (u !== 0 || 1 / u === 1 / g) || u !== u && g !== g;
|
|
679
679
|
}
|
|
680
|
-
var Ve = typeof Object.is == "function" ? Object.is : Ke,
|
|
680
|
+
var Ve = typeof Object.is == "function" ? Object.is : Ke, me = null, st = null, tt = null, Te = null, Ot = !1, ut = !1, xt = 0, wt = null, gt = 0;
|
|
681
681
|
function At() {
|
|
682
|
-
if (
|
|
683
|
-
return
|
|
682
|
+
if (me === null) throw Error(t(321));
|
|
683
|
+
return me;
|
|
684
684
|
}
|
|
685
685
|
function Zt() {
|
|
686
686
|
if (0 < gt) throw Error(t(312));
|
|
@@ -690,16 +690,16 @@ function Ql() {
|
|
|
690
690
|
return Te === null ? tt === null ? (Ot = !1, tt = Te = Zt()) : (Ot = !0, Te = tt) : Te.next === null ? (Ot = !1, Te = Te.next = Zt()) : (Ot = !0, Te = Te.next), Te;
|
|
691
691
|
}
|
|
692
692
|
function cn() {
|
|
693
|
-
st =
|
|
693
|
+
st = me = null, ut = !1, tt = null, gt = 0, Te = wt = null;
|
|
694
694
|
}
|
|
695
|
-
function
|
|
695
|
+
function bt(u, g) {
|
|
696
696
|
return typeof g == "function" ? g(u) : g;
|
|
697
697
|
}
|
|
698
|
-
function
|
|
699
|
-
if (
|
|
698
|
+
function kt(u, g, b) {
|
|
699
|
+
if (me = At(), Te = $t(), Ot) {
|
|
700
700
|
var P = Te.queue;
|
|
701
|
-
if (g = P.dispatch,
|
|
702
|
-
|
|
701
|
+
if (g = P.dispatch, wt !== null && (b = wt.get(P), b !== void 0)) {
|
|
702
|
+
wt.delete(P), P = Te.memoizedState;
|
|
703
703
|
do
|
|
704
704
|
P = u(P, b.action), b = b.next;
|
|
705
705
|
while (b !== null);
|
|
@@ -707,10 +707,10 @@ function Ql() {
|
|
|
707
707
|
}
|
|
708
708
|
return [Te.memoizedState, g];
|
|
709
709
|
}
|
|
710
|
-
return u = u ===
|
|
710
|
+
return u = u === bt ? typeof g == "function" ? g() : g : b !== void 0 ? b(g) : g, Te.memoizedState = u, u = Te.queue = { last: null, dispatch: null }, u = u.dispatch = en.bind(null, me, u), [Te.memoizedState, u];
|
|
711
711
|
}
|
|
712
712
|
function Pt(u, g) {
|
|
713
|
-
if (
|
|
713
|
+
if (me = At(), Te = $t(), g = g === void 0 ? null : g, Te !== null) {
|
|
714
714
|
var b = Te.memoizedState;
|
|
715
715
|
if (b !== null && g !== null) {
|
|
716
716
|
var P = b[1];
|
|
@@ -729,7 +729,7 @@ function Ql() {
|
|
|
729
729
|
}
|
|
730
730
|
function en(u, g, b) {
|
|
731
731
|
if (25 <= gt) throw Error(t(301));
|
|
732
|
-
if (u ===
|
|
732
|
+
if (u === me) if (ut = !0, u = { action: b, next: null }, wt === null && (wt = /* @__PURE__ */ new Map()), b = wt.get(g), b === void 0) wt.set(g, u);
|
|
733
733
|
else {
|
|
734
734
|
for (g = b; g.next !== null; ) g = g.next;
|
|
735
735
|
g.next = u;
|
|
@@ -744,12 +744,12 @@ function Ql() {
|
|
|
744
744
|
return u._currentValue2;
|
|
745
745
|
}, useContext: function(u) {
|
|
746
746
|
return At(), u._currentValue2;
|
|
747
|
-
}, useMemo: Pt, useReducer:
|
|
748
|
-
|
|
747
|
+
}, useMemo: Pt, useReducer: kt, useRef: function(u) {
|
|
748
|
+
me = At(), Te = $t();
|
|
749
749
|
var g = Te.memoizedState;
|
|
750
750
|
return g === null ? (u = { current: u }, Te.memoizedState = u) : g;
|
|
751
751
|
}, useState: function(u) {
|
|
752
|
-
return
|
|
752
|
+
return kt(bt, u);
|
|
753
753
|
}, useInsertionEffect: mt, useLayoutEffect: function() {
|
|
754
754
|
}, useCallback: function(u, g) {
|
|
755
755
|
return Pt(function() {
|
|
@@ -767,7 +767,7 @@ function Ql() {
|
|
|
767
767
|
u = u.id, u = (u & ~(1 << 32 - ue(u) - 1)).toString(32) + g;
|
|
768
768
|
var b = pn;
|
|
769
769
|
if (b === null) throw Error(t(404));
|
|
770
|
-
return g =
|
|
770
|
+
return g = xt++, u = ":" + b.idPrefix + "R" + u, 0 < g && (u += "H" + g.toString(32)), u + ":";
|
|
771
771
|
}, useMutableSource: function(u, g) {
|
|
772
772
|
return At(), g(u._source);
|
|
773
773
|
}, useSyncExternalStore: function(u, g, b) {
|
|
@@ -780,14 +780,14 @@ function Ql() {
|
|
|
780
780
|
function Lt() {
|
|
781
781
|
}
|
|
782
782
|
function it(u, g, b, P, j, R, q, ne, pe) {
|
|
783
|
-
var
|
|
784
|
-
return g = { destination: null, responseState: g, progressiveChunkSize: P === void 0 ? 12800 : P, status: 0, fatalError: null, nextSegmentId: 0, allPendingTasks: 0, pendingRootTasks: 0, completedRootSegment: null, abortableTasks: ke, pingedTasks:
|
|
783
|
+
var ye = [], ke = /* @__PURE__ */ new Set();
|
|
784
|
+
return g = { destination: null, responseState: g, progressiveChunkSize: P === void 0 ? 12800 : P, status: 0, fatalError: null, nextSegmentId: 0, allPendingTasks: 0, pendingRootTasks: 0, completedRootSegment: null, abortableTasks: ke, pingedTasks: ye, clientRenderedBoundaries: [], completedBoundaries: [], partialBoundaries: [], onError: j === void 0 ? tn : j, onAllReady: Lt, onShellReady: q === void 0 ? Lt : q, onShellError: Lt, onFatalError: Lt }, b = gn(g, 0, null, b, !1, !1), b.parentFlushed = !0, u = hn(g, u, null, b, ke, Ze, null, se), ye.push(u), g;
|
|
785
785
|
}
|
|
786
786
|
function hn(u, g, b, P, j, R, q, ne) {
|
|
787
787
|
u.allPendingTasks++, b === null ? u.pendingRootTasks++ : b.pendingTasks++;
|
|
788
788
|
var pe = { node: g, ping: function() {
|
|
789
|
-
var
|
|
790
|
-
|
|
789
|
+
var ye = u.pingedTasks;
|
|
790
|
+
ye.push(pe), ye.length === 1 && Ir(u);
|
|
791
791
|
}, blockedBoundary: b, blockedSegment: P, abortSet: j, legacyContext: R, context: q, treeContext: ne };
|
|
792
792
|
return j.add(pe), pe;
|
|
793
793
|
}
|
|
@@ -803,7 +803,7 @@ function Ql() {
|
|
|
803
803
|
b(g), b = u.onFatalError, b(g), u.destination !== null ? (u.status = 2, u.destination.destroy(g)) : (u.status = 1, u.fatalError = g);
|
|
804
804
|
}
|
|
805
805
|
function Sr(u, g, b, P, j) {
|
|
806
|
-
for (
|
|
806
|
+
for (me = {}, st = g, xt = 0, u = b(P, j); ut; ) ut = !1, xt = 0, gt += 1, Te = null, u = b(P, j);
|
|
807
807
|
return cn(), u;
|
|
808
808
|
}
|
|
809
809
|
function Cr(u, g, b, P) {
|
|
@@ -816,8 +816,8 @@ function Ql() {
|
|
|
816
816
|
for (var ne in b) if (!(ne in R)) throw Error(t(108, Ue(P) || "Unknown", ne));
|
|
817
817
|
P = B({}, q, b);
|
|
818
818
|
}
|
|
819
|
-
g.legacyContext = P,
|
|
820
|
-
} else
|
|
819
|
+
g.legacyContext = P, Et(u, g, j), g.legacyContext = q;
|
|
820
|
+
} else Et(u, g, j);
|
|
821
821
|
}
|
|
822
822
|
function Pr(u, g) {
|
|
823
823
|
if (u && u.defaultProps) {
|
|
@@ -834,16 +834,16 @@ function Ql() {
|
|
|
834
834
|
R = new b(P, typeof R == "object" && R !== null ? R._currentValue2 : j), Ae(R, b, P, j), Cr(u, g, R, b);
|
|
835
835
|
} else {
|
|
836
836
|
R = zt(b, g.legacyContext), j = Sr(u, g, b, P, R);
|
|
837
|
-
var q =
|
|
837
|
+
var q = xt !== 0;
|
|
838
838
|
if (typeof j == "object" && j !== null && typeof j.render == "function" && j.$$typeof === void 0) Ae(j, b, P, R), Cr(u, g, j, b);
|
|
839
839
|
else if (q) {
|
|
840
840
|
P = g.treeContext, g.treeContext = Ce(P, 1, 0);
|
|
841
841
|
try {
|
|
842
|
-
|
|
842
|
+
Et(u, g, j);
|
|
843
843
|
} finally {
|
|
844
844
|
g.treeContext = P;
|
|
845
845
|
}
|
|
846
|
-
} else
|
|
846
|
+
} else Et(u, g, j);
|
|
847
847
|
}
|
|
848
848
|
else if (typeof b == "string") {
|
|
849
849
|
switch (j = g.blockedSegment, R = X(j.chunks, b, P, u.responseState, j.formatContext), j.lastPushedText = !1, q = j.formatContext, j.formatContext = E(q, b, P), $n(u, g, R), j.formatContext = q, b) {
|
|
@@ -874,10 +874,10 @@ function Ql() {
|
|
|
874
874
|
case be:
|
|
875
875
|
case Oe:
|
|
876
876
|
case de:
|
|
877
|
-
|
|
877
|
+
Et(u, g, P.children);
|
|
878
878
|
return;
|
|
879
879
|
case Je:
|
|
880
|
-
|
|
880
|
+
Et(u, g, P.children);
|
|
881
881
|
return;
|
|
882
882
|
case Ee:
|
|
883
883
|
throw Error(t(343));
|
|
@@ -886,16 +886,16 @@ function Ql() {
|
|
|
886
886
|
b = g.blockedBoundary, j = g.blockedSegment, R = P.fallback, P = P.children, q = /* @__PURE__ */ new Set();
|
|
887
887
|
var ne = { id: null, rootSegmentID: -1, parentFlushed: !1, pendingTasks: 0, forceClientRender: !1, completedSegments: [], byteSize: 0, fallbackAbortableTasks: q, errorDigest: null }, pe = gn(u, j.chunks.length, ne, j.formatContext, !1, !1);
|
|
888
888
|
j.children.push(pe), j.lastPushedText = !1;
|
|
889
|
-
var
|
|
890
|
-
|
|
889
|
+
var ye = gn(u, 0, null, j.formatContext, !1, !1);
|
|
890
|
+
ye.parentFlushed = !0, g.blockedBoundary = ne, g.blockedSegment = ye;
|
|
891
891
|
try {
|
|
892
892
|
if ($n(
|
|
893
893
|
u,
|
|
894
894
|
g,
|
|
895
895
|
P
|
|
896
|
-
), u.responseState.generateStaticMarkup ||
|
|
896
|
+
), u.responseState.generateStaticMarkup || ye.lastPushedText && ye.textEmbedded && ye.chunks.push("<!-- -->"), ye.status = 1, mn(ne, ye), ne.pendingTasks === 0) break e;
|
|
897
897
|
} catch (ke) {
|
|
898
|
-
|
|
898
|
+
ye.status = 4, ne.forceClientRender = !0, ne.errorDigest = Pn(u, ke);
|
|
899
899
|
} finally {
|
|
900
900
|
g.blockedBoundary = b, g.blockedSegment = j;
|
|
901
901
|
}
|
|
@@ -905,24 +905,24 @@ function Ql() {
|
|
|
905
905
|
}
|
|
906
906
|
if (typeof b == "object" && b !== null) switch (b.$$typeof) {
|
|
907
907
|
case Re:
|
|
908
|
-
if (P = Sr(u, g, b.render, P, j),
|
|
908
|
+
if (P = Sr(u, g, b.render, P, j), xt !== 0) {
|
|
909
909
|
b = g.treeContext, g.treeContext = Ce(b, 1, 0);
|
|
910
910
|
try {
|
|
911
|
-
|
|
911
|
+
Et(u, g, P);
|
|
912
912
|
} finally {
|
|
913
913
|
g.treeContext = b;
|
|
914
914
|
}
|
|
915
|
-
} else
|
|
915
|
+
} else Et(u, g, P);
|
|
916
916
|
return;
|
|
917
917
|
case ie:
|
|
918
918
|
b = b.type, P = Pr(b, P), Zn(u, g, b, P, j);
|
|
919
919
|
return;
|
|
920
920
|
case Ie:
|
|
921
|
-
if (j = P.children, b = b._context, P = P.value, R = b._currentValue2, b._currentValue2 = P, q = _e, _e = P = { parent: q, depth: q === null ? 0 : q.depth + 1, context: b, parentValue: R, value: P }, g.context = P,
|
|
922
|
-
P = u.parentValue, u.context._currentValue2 = P ===
|
|
921
|
+
if (j = P.children, b = b._context, P = P.value, R = b._currentValue2, b._currentValue2 = P, q = _e, _e = P = { parent: q, depth: q === null ? 0 : q.depth + 1, context: b, parentValue: R, value: P }, g.context = P, Et(u, g, j), u = _e, u === null) throw Error(t(403));
|
|
922
|
+
P = u.parentValue, u.context._currentValue2 = P === Me ? u.context._defaultValue : P, u = _e = u.parent, g.context = u;
|
|
923
923
|
return;
|
|
924
924
|
case nt:
|
|
925
|
-
P = P.children, P = P(b._currentValue2),
|
|
925
|
+
P = P.children, P = P(b._currentValue2), Et(u, g, P);
|
|
926
926
|
return;
|
|
927
927
|
case oe:
|
|
928
928
|
j = b._init, b = j(b._payload), P = Pr(b, P), Zn(
|
|
@@ -937,7 +937,7 @@ function Ql() {
|
|
|
937
937
|
throw Error(t(130, b == null ? b : typeof b, ""));
|
|
938
938
|
}
|
|
939
939
|
}
|
|
940
|
-
function
|
|
940
|
+
function Et(u, g, b) {
|
|
941
941
|
if (g.node = b, typeof b == "object" && b !== null) {
|
|
942
942
|
switch (b.$$typeof) {
|
|
943
943
|
case ae:
|
|
@@ -947,10 +947,10 @@ function Ql() {
|
|
|
947
947
|
throw Error(t(257));
|
|
948
948
|
case oe:
|
|
949
949
|
var P = b._init;
|
|
950
|
-
b = P(b._payload),
|
|
950
|
+
b = P(b._payload), Et(u, g, b);
|
|
951
951
|
return;
|
|
952
952
|
}
|
|
953
|
-
if (
|
|
953
|
+
if (k(b)) {
|
|
954
954
|
Dr(u, g, b);
|
|
955
955
|
return;
|
|
956
956
|
}
|
|
@@ -982,7 +982,7 @@ function Ql() {
|
|
|
982
982
|
function $n(u, g, b) {
|
|
983
983
|
var P = g.blockedSegment.formatContext, j = g.legacyContext, R = g.context;
|
|
984
984
|
try {
|
|
985
|
-
return
|
|
985
|
+
return Et(u, g, b);
|
|
986
986
|
} catch (pe) {
|
|
987
987
|
if (cn(), typeof pe == "object" && pe !== null && typeof pe.then == "function") {
|
|
988
988
|
b = pe;
|
|
@@ -1030,11 +1030,11 @@ function Ql() {
|
|
|
1030
1030
|
if (pe.status === 0) {
|
|
1031
1031
|
lt(q.context);
|
|
1032
1032
|
try {
|
|
1033
|
-
|
|
1033
|
+
Et(ne, q, q.node), ne.responseState.generateStaticMarkup || pe.lastPushedText && pe.textEmbedded && pe.chunks.push("<!-- -->"), q.abortSet.delete(q), pe.status = 1, yn(ne, q.blockedBoundary, pe);
|
|
1034
1034
|
} catch (Dt) {
|
|
1035
1035
|
if (cn(), typeof Dt == "object" && Dt !== null && typeof Dt.then == "function") {
|
|
1036
|
-
var
|
|
1037
|
-
Dt.then(
|
|
1036
|
+
var ye = q.ping;
|
|
1037
|
+
Dt.then(ye, ye);
|
|
1038
1038
|
} else {
|
|
1039
1039
|
q.abortSet.delete(q), pe.status = 4;
|
|
1040
1040
|
var ke = q.blockedBoundary, Xe = Dt, Vt = Pn(ne, Xe);
|
|
@@ -1118,11 +1118,11 @@ function Ql() {
|
|
|
1118
1118
|
for (R = 0; R < j.length; R++) {
|
|
1119
1119
|
var q = j[R];
|
|
1120
1120
|
P = g;
|
|
1121
|
-
var ne = u.responseState, pe = q.id,
|
|
1121
|
+
var ne = u.responseState, pe = q.id, ye = q.errorDigest, ke = q.errorMessage, Xe = q.errorComponentStack;
|
|
1122
1122
|
if (P.push(ne.startInlineScript), ne.sentClientRenderFunction ? P.push('$RX("') : (ne.sentClientRenderFunction = !0, P.push('function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("')), pe === null) throw Error(t(395));
|
|
1123
|
-
if (P.push(pe), P.push('"'),
|
|
1123
|
+
if (P.push(pe), P.push('"'), ye || ke || Xe) {
|
|
1124
1124
|
P.push(",");
|
|
1125
|
-
var Vt = Z(
|
|
1125
|
+
var Vt = Z(ye || "");
|
|
1126
1126
|
P.push(Vt);
|
|
1127
1127
|
}
|
|
1128
1128
|
if (ke || Xe) {
|
|
@@ -1189,20 +1189,20 @@ function Ql() {
|
|
|
1189
1189
|
function Qr() {
|
|
1190
1190
|
}
|
|
1191
1191
|
function or(u, g, b, P) {
|
|
1192
|
-
var j = !1, R = null, q = "", ne = { push: function(
|
|
1193
|
-
return
|
|
1194
|
-
}, destroy: function(
|
|
1195
|
-
j = !0, R =
|
|
1192
|
+
var j = !1, R = null, q = "", ne = { push: function(ye) {
|
|
1193
|
+
return ye !== null && (q += ye), !0;
|
|
1194
|
+
}, destroy: function(ye) {
|
|
1195
|
+
j = !0, R = ye;
|
|
1196
1196
|
} }, pe = !1;
|
|
1197
|
-
if (u = it(u,
|
|
1197
|
+
if (u = it(u, S(b, g ? g.identifierPrefix : void 0), { insertionMode: 1, selectedValue: null }, 1 / 0, Qr, void 0, function() {
|
|
1198
1198
|
pe = !0;
|
|
1199
1199
|
}), Ir(u), Tr(u, P), u.status === 1) u.status = 2, ne.destroy(u.fatalError);
|
|
1200
1200
|
else if (u.status !== 2 && u.destination === null) {
|
|
1201
1201
|
u.destination = ne;
|
|
1202
1202
|
try {
|
|
1203
1203
|
Un(u, ne);
|
|
1204
|
-
} catch (
|
|
1205
|
-
Pn(u,
|
|
1204
|
+
} catch (ye) {
|
|
1205
|
+
Pn(u, ye), Hn(u, ye);
|
|
1206
1206
|
}
|
|
1207
1207
|
}
|
|
1208
1208
|
if (j) throw R;
|
|
@@ -1260,26 +1260,26 @@ function Ml() {
|
|
|
1260
1260
|
function y(d, h, w, C, F, N, G) {
|
|
1261
1261
|
this.acceptsBooleans = h === 2 || h === 3 || h === 4, this.attributeName = C, this.attributeNamespace = F, this.mustUseProperty = w, this.propertyName = d, this.type = h, this.sanitizeURL = N, this.removeEmptyString = G;
|
|
1262
1262
|
}
|
|
1263
|
-
var
|
|
1263
|
+
var k = {};
|
|
1264
1264
|
"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(d) {
|
|
1265
|
-
|
|
1265
|
+
k[d] = new y(d, 0, !1, d, null, !1, !1);
|
|
1266
1266
|
}), [["acceptCharset", "accept-charset"], ["className", "class"], ["htmlFor", "for"], ["httpEquiv", "http-equiv"]].forEach(function(d) {
|
|
1267
1267
|
var h = d[0];
|
|
1268
|
-
|
|
1268
|
+
k[h] = new y(h, 1, !1, d[1], null, !1, !1);
|
|
1269
1269
|
}), ["contentEditable", "draggable", "spellCheck", "value"].forEach(function(d) {
|
|
1270
|
-
|
|
1270
|
+
k[d] = new y(d, 2, !1, d.toLowerCase(), null, !1, !1);
|
|
1271
1271
|
}), ["autoReverse", "externalResourcesRequired", "focusable", "preserveAlpha"].forEach(function(d) {
|
|
1272
|
-
|
|
1272
|
+
k[d] = new y(d, 2, !1, d, null, !1, !1);
|
|
1273
1273
|
}), "allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(d) {
|
|
1274
|
-
|
|
1274
|
+
k[d] = new y(d, 3, !1, d.toLowerCase(), null, !1, !1);
|
|
1275
1275
|
}), ["checked", "multiple", "muted", "selected"].forEach(function(d) {
|
|
1276
|
-
|
|
1276
|
+
k[d] = new y(d, 3, !0, d, null, !1, !1);
|
|
1277
1277
|
}), ["capture", "download"].forEach(function(d) {
|
|
1278
|
-
|
|
1278
|
+
k[d] = new y(d, 4, !1, d, null, !1, !1);
|
|
1279
1279
|
}), ["cols", "rows", "size", "span"].forEach(function(d) {
|
|
1280
|
-
|
|
1280
|
+
k[d] = new y(d, 6, !1, d, null, !1, !1);
|
|
1281
1281
|
}), ["rowSpan", "start"].forEach(function(d) {
|
|
1282
|
-
|
|
1282
|
+
k[d] = new y(d, 5, !1, d.toLowerCase(), null, !1, !1);
|
|
1283
1283
|
});
|
|
1284
1284
|
var I = /[\-:]([a-z])/g;
|
|
1285
1285
|
function E(d) {
|
|
@@ -1290,17 +1290,17 @@ function Ml() {
|
|
|
1290
1290
|
I,
|
|
1291
1291
|
E
|
|
1292
1292
|
);
|
|
1293
|
-
|
|
1293
|
+
k[h] = new y(h, 1, !1, d, null, !1, !1);
|
|
1294
1294
|
}), "xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(d) {
|
|
1295
1295
|
var h = d.replace(I, E);
|
|
1296
|
-
|
|
1296
|
+
k[h] = new y(h, 1, !1, d, "http://www.w3.org/1999/xlink", !1, !1);
|
|
1297
1297
|
}), ["xml:base", "xml:lang", "xml:space"].forEach(function(d) {
|
|
1298
1298
|
var h = d.replace(I, E);
|
|
1299
|
-
|
|
1299
|
+
k[h] = new y(h, 1, !1, d, "http://www.w3.org/XML/1998/namespace", !1, !1);
|
|
1300
1300
|
}), ["tabIndex", "crossOrigin"].forEach(function(d) {
|
|
1301
|
-
|
|
1302
|
-
}),
|
|
1303
|
-
|
|
1301
|
+
k[d] = new y(d, 1, !1, d.toLowerCase(), null, !1, !1);
|
|
1302
|
+
}), k.xlinkHref = new y("xlinkHref", 1, !1, "xlink:href", "http://www.w3.org/1999/xlink", !0, !1), ["src", "href", "action", "formAction"].forEach(function(d) {
|
|
1303
|
+
k[d] = new y(d, 1, !1, d.toLowerCase(), null, !0, !0);
|
|
1304
1304
|
});
|
|
1305
1305
|
var T = {
|
|
1306
1306
|
animationIterationCount: !0,
|
|
@@ -1396,34 +1396,34 @@ function Ml() {
|
|
|
1396
1396
|
if (F !== void 0) for (C = 0; C < F.length; C++) N.push(te, l(O(F[C])), J);
|
|
1397
1397
|
return { bootstrapChunks: N, startInlineScript: h, placeholderPrefix: A(d + "P:"), segmentPrefix: A(d + "S:"), boundaryPrefix: d + "B:", idPrefix: d, nextSuspenseID: 0, sentCompleteSegmentFunction: !1, sentCompleteBoundaryFunction: !1, sentClientRenderFunction: !1 };
|
|
1398
1398
|
}
|
|
1399
|
-
function
|
|
1399
|
+
function S(d, h) {
|
|
1400
1400
|
return { insertionMode: d, selectedValue: h };
|
|
1401
1401
|
}
|
|
1402
1402
|
function ce(d) {
|
|
1403
|
-
return
|
|
1403
|
+
return S(d === "http://www.w3.org/2000/svg" ? 2 : d === "http://www.w3.org/1998/Math/MathML" ? 3 : 0, null);
|
|
1404
1404
|
}
|
|
1405
1405
|
function B(d, h, w) {
|
|
1406
1406
|
switch (h) {
|
|
1407
1407
|
case "select":
|
|
1408
|
-
return
|
|
1408
|
+
return S(1, w.value != null ? w.value : w.defaultValue);
|
|
1409
1409
|
case "svg":
|
|
1410
|
-
return
|
|
1410
|
+
return S(2, null);
|
|
1411
1411
|
case "math":
|
|
1412
|
-
return
|
|
1412
|
+
return S(3, null);
|
|
1413
1413
|
case "foreignObject":
|
|
1414
|
-
return
|
|
1414
|
+
return S(1, null);
|
|
1415
1415
|
case "table":
|
|
1416
|
-
return
|
|
1416
|
+
return S(4, null);
|
|
1417
1417
|
case "thead":
|
|
1418
1418
|
case "tbody":
|
|
1419
1419
|
case "tfoot":
|
|
1420
|
-
return
|
|
1420
|
+
return S(5, null);
|
|
1421
1421
|
case "colgroup":
|
|
1422
|
-
return
|
|
1422
|
+
return S(7, null);
|
|
1423
1423
|
case "tr":
|
|
1424
|
-
return
|
|
1424
|
+
return S(6, null);
|
|
1425
1425
|
}
|
|
1426
|
-
return 4 <= d.insertionMode || d.insertionMode === 0 ?
|
|
1426
|
+
return 4 <= d.insertionMode || d.insertionMode === 0 ? S(1, null) : d;
|
|
1427
1427
|
}
|
|
1428
1428
|
var ae = A("<!-- -->");
|
|
1429
1429
|
function fe(d, h, w, C) {
|
|
@@ -1463,7 +1463,7 @@ function Ml() {
|
|
|
1463
1463
|
return;
|
|
1464
1464
|
}
|
|
1465
1465
|
if (!(2 < w.length) || w[0] !== "o" && w[0] !== "O" || w[1] !== "n" && w[1] !== "N") {
|
|
1466
|
-
if (h =
|
|
1466
|
+
if (h = k.hasOwnProperty(w) ? k[w] : null, h !== null) {
|
|
1467
1467
|
switch (typeof C) {
|
|
1468
1468
|
case "function":
|
|
1469
1469
|
case "symbol":
|
|
@@ -1507,7 +1507,7 @@ function Ml() {
|
|
|
1507
1507
|
h = h.__html, h != null && d.push(l("" + h));
|
|
1508
1508
|
}
|
|
1509
1509
|
}
|
|
1510
|
-
function
|
|
1510
|
+
function Me(d) {
|
|
1511
1511
|
var h = "";
|
|
1512
1512
|
return e.Children.forEach(d, function(w) {
|
|
1513
1513
|
w != null && (h += w);
|
|
@@ -1586,7 +1586,7 @@ function Ml() {
|
|
|
1586
1586
|
oe(d, C, N, Ye);
|
|
1587
1587
|
}
|
|
1588
1588
|
}
|
|
1589
|
-
if (G != null) if (w = he !== null ? "" + he :
|
|
1589
|
+
if (G != null) if (w = he !== null ? "" + he : Me(ee), H(G)) {
|
|
1590
1590
|
for (C = 0; C < G.length; C++)
|
|
1591
1591
|
if ("" + G[C] === w) {
|
|
1592
1592
|
d.push(Le);
|
|
@@ -1745,14 +1745,14 @@ function Ml() {
|
|
|
1745
1745
|
return d.push(Ee), Ne(d, G, N), N;
|
|
1746
1746
|
}
|
|
1747
1747
|
}
|
|
1748
|
-
var Gt = A("</"),
|
|
1748
|
+
var Gt = A("</"), vt = A(">"), lt = A('<template id="'), z = A('"></template>'), Ae = A("<!--$-->"), se = A('<!--$?--><template id="'), Ce = A('"></template>'), ue = A("<!--$!-->"), $e = A("<!--/$-->"), ze = A("<template"), Qe = A('"'), Ke = A(' data-dgst="');
|
|
1749
1749
|
A(' data-msg="'), A(' data-stck="');
|
|
1750
1750
|
var Ve = A("></template>");
|
|
1751
|
-
function
|
|
1751
|
+
function me(d, h, w) {
|
|
1752
1752
|
if (o(d, se), w === null) throw Error(t(395));
|
|
1753
1753
|
return o(d, w), s(d, Ce);
|
|
1754
1754
|
}
|
|
1755
|
-
var st = A('<div hidden id="'), tt = A('">'), Te = A("</div>"), Ot = A('<svg aria-hidden="true" style="display:none" id="'), ut = A('">'),
|
|
1755
|
+
var st = A('<div hidden id="'), tt = A('">'), Te = A("</div>"), Ot = A('<svg aria-hidden="true" style="display:none" id="'), ut = A('">'), xt = A("</svg>"), wt = A('<math aria-hidden="true" style="display:none" id="'), gt = A('">'), At = A("</math>"), Zt = A('<table hidden id="'), $t = A('">'), cn = A("</table>"), bt = A('<table hidden><tbody id="'), kt = A('">'), Pt = A("</tbody></table>"), en = A('<table hidden><tr id="'), Rt = A('">'), mt = A("</tr></table>"), Wt = A('<table hidden><colgroup id="'), pn = A('">'), Nt = A("</colgroup></table>");
|
|
1756
1756
|
function tn(d, h, w, C) {
|
|
1757
1757
|
switch (w.insertionMode) {
|
|
1758
1758
|
case 0:
|
|
@@ -1761,11 +1761,11 @@ function Ml() {
|
|
|
1761
1761
|
case 2:
|
|
1762
1762
|
return o(d, Ot), o(d, h.segmentPrefix), o(d, l(C.toString(16))), s(d, ut);
|
|
1763
1763
|
case 3:
|
|
1764
|
-
return o(d,
|
|
1764
|
+
return o(d, wt), o(d, h.segmentPrefix), o(d, l(C.toString(16))), s(d, gt);
|
|
1765
1765
|
case 4:
|
|
1766
1766
|
return o(d, Zt), o(d, h.segmentPrefix), o(d, l(C.toString(16))), s(d, $t);
|
|
1767
1767
|
case 5:
|
|
1768
|
-
return o(d,
|
|
1768
|
+
return o(d, bt), o(d, h.segmentPrefix), o(d, l(C.toString(16))), s(d, kt);
|
|
1769
1769
|
case 6:
|
|
1770
1770
|
return o(d, en), o(d, h.segmentPrefix), o(d, l(C.toString(16))), s(d, Rt);
|
|
1771
1771
|
case 7:
|
|
@@ -1783,7 +1783,7 @@ function Ml() {
|
|
|
1783
1783
|
case 1:
|
|
1784
1784
|
return s(d, Te);
|
|
1785
1785
|
case 2:
|
|
1786
|
-
return s(d,
|
|
1786
|
+
return s(d, xt);
|
|
1787
1787
|
case 3:
|
|
1788
1788
|
return s(d, At);
|
|
1789
1789
|
case 4:
|
|
@@ -1798,7 +1798,7 @@ function Ml() {
|
|
|
1798
1798
|
throw Error(t(397));
|
|
1799
1799
|
}
|
|
1800
1800
|
}
|
|
1801
|
-
var it = A('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("'), hn = A('$RS("'), gn = A('","'), Pn = A('")<\/script>'), Hn = A('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("'), Sr = A('$RC("'), Cr = A('","'), Pr = A('")<\/script>'), Zn = A('function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("'),
|
|
1801
|
+
var it = A('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("'), hn = A('$RS("'), gn = A('","'), Pn = A('")<\/script>'), Hn = A('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("'), Sr = A('$RC("'), Cr = A('","'), Pr = A('")<\/script>'), Zn = A('function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("'), Et = A('$RX("'), Dr = A('"'), $n = A(")<\/script>"), er = A(","), Br = /[<\u2028\u2029]/g;
|
|
1802
1802
|
function mn(d) {
|
|
1803
1803
|
return JSON.stringify(d).replace(Br, function(h) {
|
|
1804
1804
|
switch (h) {
|
|
@@ -1852,7 +1852,7 @@ function Ml() {
|
|
|
1852
1852
|
return null;
|
|
1853
1853
|
}
|
|
1854
1854
|
var pe = {};
|
|
1855
|
-
function
|
|
1855
|
+
function ye(d, h) {
|
|
1856
1856
|
if (d = d.contextTypes, !d) return pe;
|
|
1857
1857
|
var w = {}, C;
|
|
1858
1858
|
for (C in d) w[C] = h[C];
|
|
@@ -2085,11 +2085,11 @@ function Ml() {
|
|
|
2085
2085
|
}
|
|
2086
2086
|
function So(d, h, w, C, F) {
|
|
2087
2087
|
if (typeof w == "function") if (w.prototype && w.prototype.isReactComponent) {
|
|
2088
|
-
F =
|
|
2088
|
+
F = ye(w, h.legacyContext);
|
|
2089
2089
|
var N = w.contextType;
|
|
2090
2090
|
N = new w(C, typeof N == "object" && N !== null ? N._currentValue : F), Tn(N, w, C, F), Rs(d, h, N, w);
|
|
2091
2091
|
} else {
|
|
2092
|
-
N =
|
|
2092
|
+
N = ye(w, h.legacyContext), F = Os(d, h, w, C, N);
|
|
2093
2093
|
var G = ar !== 0;
|
|
2094
2094
|
if (typeof F == "object" && F !== null && typeof F.render == "function" && F.$$typeof === void 0) Tn(F, w, C, N), Rs(d, h, F, w);
|
|
2095
2095
|
else if (G) {
|
|
@@ -2120,7 +2120,7 @@ function Ml() {
|
|
|
2120
2120
|
case "wbr":
|
|
2121
2121
|
break;
|
|
2122
2122
|
default:
|
|
2123
|
-
F.chunks.push(Gt, l(w),
|
|
2123
|
+
F.chunks.push(Gt, l(w), vt);
|
|
2124
2124
|
}
|
|
2125
2125
|
F.lastPushedText = !1;
|
|
2126
2126
|
} else {
|
|
@@ -2332,12 +2332,12 @@ function Ml() {
|
|
|
2332
2332
|
function qr(d, h, w) {
|
|
2333
2333
|
var C = w.boundary;
|
|
2334
2334
|
if (C === null) return zr(d, h, w);
|
|
2335
|
-
if (C.parentFlushed = !0, C.forceClientRender) C = C.errorDigest, s(h, ue), o(h, ze), C && (o(h, Ke), o(h, l(O(C))), o(h,
|
|
2335
|
+
if (C.parentFlushed = !0, C.forceClientRender) C = C.errorDigest, s(h, ue), o(h, ze), C && (o(h, Ke), o(h, l(O(C))), o(h, Qe)), s(h, Ve), zr(d, h, w);
|
|
2336
2336
|
else if (0 < C.pendingTasks) {
|
|
2337
2337
|
C.rootSegmentID = d.nextSegmentId++, 0 < C.completedSegments.length && d.partialBoundaries.push(C);
|
|
2338
2338
|
var F = d.responseState, N = F.nextSuspenseID++;
|
|
2339
|
-
F = A(F.boundaryPrefix + N.toString(16)), C = C.id = F,
|
|
2340
|
-
} else if (C.byteSize > d.progressiveChunkSize) C.rootSegmentID = d.nextSegmentId++, d.completedBoundaries.push(C),
|
|
2339
|
+
F = A(F.boundaryPrefix + N.toString(16)), C = C.id = F, me(h, d.responseState, C), zr(d, h, w);
|
|
2340
|
+
} else if (C.byteSize > d.progressiveChunkSize) C.rootSegmentID = d.nextSegmentId++, d.completedBoundaries.push(C), me(h, d.responseState, C.id), zr(d, h, w);
|
|
2341
2341
|
else {
|
|
2342
2342
|
if (s(h, Ae), w = C.completedSegments, w.length !== 1) throw Error(t(391));
|
|
2343
2343
|
qr(d, h, w[0]);
|
|
@@ -2376,7 +2376,7 @@ function Ml() {
|
|
|
2376
2376
|
var G = F[N];
|
|
2377
2377
|
C = h;
|
|
2378
2378
|
var ee = d.responseState, he = G.id, Be = G.errorDigest, Pe = G.errorMessage, Ye = G.errorComponentStack;
|
|
2379
|
-
if (o(C, ee.startInlineScript), ee.sentClientRenderFunction ? o(C,
|
|
2379
|
+
if (o(C, ee.startInlineScript), ee.sentClientRenderFunction ? o(C, Et) : (ee.sentClientRenderFunction = !0, o(
|
|
2380
2380
|
C,
|
|
2381
2381
|
Zn
|
|
2382
2382
|
)), he === null) throw Error(t(395));
|
|
@@ -2503,8 +2503,8 @@ const et = { AUDIO_BUTTON: "audio-button", NOTIFICATION_BUTTON: "notification-bu
|
|
|
2503
2503
|
}, n];
|
|
2504
2504
|
}, ua = x.createContext({}), at = () => x.useContext(ua), Xl = ({ children: e, settings: t }) => {
|
|
2505
2505
|
var r, n, o, s, i, a;
|
|
2506
|
-
const [l, A, c] = Qt(!1), [p, f, m] = Qt(((r = t?.chatWindow) == null ? void 0 : r.defaultOpen) ?? !1), [v, D, y] = Qt(((n = t?.audio) == null ? void 0 : n.defaultToggledOn) ?? !1), [
|
|
2507
|
-
return M.jsx(ua.Provider, { value: { isBotTyping: l, setSyncedIsBotTyping: A, syncedIsBotTypingRef: c, isChatWindowOpen: p, setSyncedIsChatWindowOpen: f, syncedIsChatWindowOpenRef: m, audioToggledOn: v, setSyncedAudioToggledOn: D, syncedAudioToggledOnRef: y, voiceToggledOn:
|
|
2506
|
+
const [l, A, c] = Qt(!1), [p, f, m] = Qt(((r = t?.chatWindow) == null ? void 0 : r.defaultOpen) ?? !1), [v, D, y] = Qt(((n = t?.audio) == null ? void 0 : n.defaultToggledOn) ?? !1), [k, I, E] = Qt(((o = t?.voice) == null ? void 0 : o.defaultToggledOn) ?? !1), [T, _, Q] = Qt(((s = t?.notification) == null ? void 0 : s.defaultToggledOn) ?? !0), [O, U] = x.useState(!1), [W, H] = x.useState(!1), [K, L, X] = Qt(!1), [te, J, re] = Qt(!0), [Y, Z, S] = Qt(!1), [ce, B] = x.useState(!1), [ae, fe] = x.useState(!1), [de, be] = x.useState(0), [Oe, Ie] = x.useState(0), [nt, Re] = x.useState(!1), [je, Je] = x.useState(((i = window.visualViewport) == null ? void 0 : i.height) ?? window.innerHeight), [ie, oe] = x.useState(((a = window.visualViewport) == null ? void 0 : a.width) ?? window.innerWidth);
|
|
2507
|
+
return M.jsx(ua.Provider, { value: { isBotTyping: l, setSyncedIsBotTyping: A, syncedIsBotTypingRef: c, isChatWindowOpen: p, setSyncedIsChatWindowOpen: f, syncedIsChatWindowOpenRef: m, audioToggledOn: v, setSyncedAudioToggledOn: D, syncedAudioToggledOnRef: y, voiceToggledOn: k, setSyncedVoiceToggledOn: I, syncedVoiceToggledOnRef: E, notificationsToggledOn: T, setSyncedNotificationsToggledOn: _, syncedNotificationsToggledOnRef: Q, isLoadingChatHistory: O, setIsLoadingChatHistory: U, hasChatHistoryLoaded: W, setHasChatHistoryLoaded: H, isScrolling: K, setSyncedIsScrolling: L, syncedIsScrollingRef: X, textAreaDisabled: te, setSyncedTextAreaDisabled: J, syncedTextAreaDisabledRef: re, textAreaSensitiveMode: Y, setSyncedTextAreaSensitiveMode: Z, syncedTextAreaSensitiveModeRef: S, hasInteractedPage: ce, setHasInteractedPage: B, hasFlowStarted: ae, setHasFlowStarted: fe, unreadCount: de, setUnreadCount: be, inputLength: Oe, setInputLength: Ie, blockAllowsAttachment: nt, setBlockAllowsAttachment: Re, viewportHeight: je, setViewportHeight: Je, viewportWidth: ie, setViewportWidth: oe }, children: e });
|
|
2508
2508
|
};
|
|
2509
2509
|
var le = ((e) => (e.START_SPEAK_AUDIO = "rcb-start-speak-audio", e.TOGGLE_AUDIO = "rcb-toggle-audio", e.TOGGLE_NOTIFICATIONS = "rcb-toggle-notifications", e.TOGGLE_VOICE = "rcb-toggle-voice", e.TOGGLE_CHAT_WINDOW = "rcb-toggle-chat-window", e.PRE_INJECT_MESSAGE = "rcb-pre-inject-message", e.POST_INJECT_MESSAGE = "rcb-post-inject-message", e.START_SIMULATE_STREAM_MESSAGE = "rcb-start-simulate-stream-message", e.STOP_SIMULATE_STREAM_MESSAGE = "rcb-stop-simulate-stream-message", e.START_STREAM_MESSAGE = "rcb-start-stream-message", e.CHUNK_STREAM_MESSAGE = "rcb-chunk-stream-message", e.STOP_STREAM_MESSAGE = "rcb-stop-stream-message", e.REMOVE_MESSAGE = "rcb-remove-message", e.SAVE_CHAT_HISTORY = "rcb-save-chat-history", e.LOAD_CHAT_HISTORY = "rcb-load-chat-history", e.CHANGE_PATH = "rcb-change-path", e.SHOW_TOAST = "rcb-show-toast", e.DISMISS_TOAST = "rcb-dismiss-toast", e.USER_SUBMIT_TEXT = "rcb-user-submit-text", e.USER_UPLOAD_FILE = "rcb-user-upload-file", e.TEXT_AREA_CHANGE_VALUE = "rcb-text-area-change-value", e.PRE_LOAD_CHATBOT = "rcb-pre-load-chatbot", e.POST_LOAD_CHATBOT = "rcb-post-load-chatbot", e.PRE_PROCESS_BLOCK = "rcb-pre-process-block", e.POST_PROCESS_BLOCK = "rcb-post-process-block", e))(le || {});
|
|
2510
2510
|
const Jl = { [le.START_SPEAK_AUDIO]: !0, [le.TOGGLE_AUDIO]: !0, [le.TOGGLE_VOICE]: !0, [le.TOGGLE_NOTIFICATIONS]: !0, [le.TOGGLE_CHAT_WINDOW]: !0, [le.PRE_INJECT_MESSAGE]: !0, [le.POST_INJECT_MESSAGE]: !1, [le.PRE_LOAD_CHATBOT]: !0, [le.POST_LOAD_CHATBOT]: !1, [le.START_SIMULATE_STREAM_MESSAGE]: !0, [le.STOP_SIMULATE_STREAM_MESSAGE]: !1, [le.START_STREAM_MESSAGE]: !0, [le.CHUNK_STREAM_MESSAGE]: !0, [le.STOP_STREAM_MESSAGE]: !0, [le.REMOVE_MESSAGE]: !0, [le.SAVE_CHAT_HISTORY]: !0, [le.LOAD_CHAT_HISTORY]: !0, [le.CHANGE_PATH]: !0, [le.SHOW_TOAST]: !0, [le.DISMISS_TOAST]: !0, [le.USER_SUBMIT_TEXT]: !0, [le.USER_UPLOAD_FILE]: !0, [le.TEXT_AREA_CHANGE_VALUE]: !0, [le.PRE_PROCESS_BLOCK]: !0, [le.POST_PROCESS_BLOCK]: !0 }, Ko = async (e, t, r) => {
|
|
@@ -2530,7 +2530,7 @@ const Jl = { [le.START_SPEAK_AUDIO]: !0, [le.TOGGLE_AUDIO]: !0, [le.TOGGLE_VOICE
|
|
|
2530
2530
|
E !== p.current && ((T = e.event) != null && T.rcbToggleChatWindow && (await m(le.TOGGLE_CHAT_WINDOW, { currState: p.current, newState: !p.current })).defaultPrevented || r((_) => (_ || a(0), !_)));
|
|
2531
2531
|
}, [p]), y = x.useCallback(async (E) => {
|
|
2532
2532
|
E !== c.current && l((T) => !T);
|
|
2533
|
-
}, [c]),
|
|
2533
|
+
}, [c]), k = x.useCallback((E, T, _, Q) => (E /= Q / 2) < 1 ? _ / 2 * E * E + T : -_ / 2 * (--E * (E - 2) - 1) + T, []), I = x.useCallback((E = 0) => {
|
|
2534
2534
|
if (!f.current) return;
|
|
2535
2535
|
const T = f.current.scrollHeight - f.current.clientHeight;
|
|
2536
2536
|
if (E <= 0) return f.current.scrollTop = T, void A(!1);
|
|
@@ -2539,7 +2539,7 @@ const Jl = { [le.START_SPEAK_AUDIO]: !0, [le.TOGGLE_AUDIO]: !0, [le.TOGGLE_VOICE
|
|
|
2539
2539
|
const U = () => {
|
|
2540
2540
|
if (!f.current) return;
|
|
2541
2541
|
O += 20;
|
|
2542
|
-
const W =
|
|
2542
|
+
const W = k(O, _, Q, E);
|
|
2543
2543
|
f.current.scrollTop = W, O < E ? requestAnimationFrame(U) : A(!1);
|
|
2544
2544
|
};
|
|
2545
2545
|
U();
|
|
@@ -2585,7 +2585,7 @@ const Jl = { [le.START_SPEAK_AUDIO]: !0, [le.TOGGLE_AUDIO]: !0, [le.TOGGLE_VOICE
|
|
|
2585
2585
|
}), a && ((r = n.chatWindow) == null ? void 0 : r.showTypingIndicator) && M.jsx(rA, {}), M.jsx($l, {})] });
|
|
2586
2586
|
}, sA = ({ checkboxes: e, checkedItems: t, path: r }) => {
|
|
2587
2587
|
var n, o, s, i, a, l, A, c, p, f, m;
|
|
2588
|
-
const { settings: v } = De(), { styles: D } = He(), { paths: y } = xr(), { handleSubmitText:
|
|
2588
|
+
const { settings: v } = De(), { styles: D } = He(), { paths: y } = xr(), { handleSubmitText: k } = Xn(), [I, E] = x.useState(/* @__PURE__ */ new Set()), [T, _] = x.useState(!1), Q = { cursor: T ? `url("${(n = v.general) == null ? void 0 : n.actionDisabledIcon}"), auto` : "pointer", color: (o = v.general) == null ? void 0 : o.primaryColor, borderColor: (s = v.general) == null ? void 0 : s.primaryColor, ...D.botCheckboxRowStyle }, O = { cursor: T || I.size < e.min ? `url("${(i = v.general) == null ? void 0 : i.actionDisabledIcon}"), auto` : "pointer", color: (a = v.general) == null ? void 0 : a.primaryColor, borderColor: (l = v.general) == null ? void 0 : l.primaryColor, ...D.botCheckboxNextStyle }, U = { cursor: T ? `url("${(A = v.general) == null ? void 0 : A.actionDisabledIcon}"), auto` : "pointer", color: "transparent", ...D.botCheckMarkStyle }, W = { cursor: T ? `url("${(c = v.general) == null ? void 0 : c.actionDisabledIcon}"), auto` : "pointer", color: "#fff", borderColor: (p = v.general) == null ? void 0 : p.primaryColor, backgroundColor: (f = v.general) == null ? void 0 : f.primaryColor, ...D.botCheckMarkSelectedStyle };
|
|
2589
2589
|
return x.useEffect(() => {
|
|
2590
2590
|
y.length > 0 && y[y.length - 1] !== r && _(!e.reusable);
|
|
2591
2591
|
}, [y]), M.jsxs("div", { className: "rcb-checkbox-container " + ((m = v.botBubble) != null && m.showAvatar ? "rcb-checkbox-offset" : ""), children: [e.items.map((H) => M.jsx("div", { onMouseDown: (K) => {
|
|
@@ -2605,7 +2605,7 @@ const Jl = { [le.START_SPEAK_AUDIO]: !0, [le.TOGGLE_AUDIO]: !0, [le.TOGGLE_VOICE
|
|
|
2605
2605
|
if (H.preventDefault(), T || I.size < e.min) return;
|
|
2606
2606
|
const L = Array.from(t).join(", ");
|
|
2607
2607
|
let X;
|
|
2608
|
-
_(!e.reusable), X = e.sendOutput != null ? e.sendOutput : ((K = v.chatInput) == null ? void 0 : K.sendCheckboxOutput) ?? !0,
|
|
2608
|
+
_(!e.reusable), X = e.sendOutput != null ? e.sendOutput : ((K = v.chatInput) == null ? void 0 : K.sendCheckboxOutput) ?? !0, k(L, X);
|
|
2609
2609
|
} })] });
|
|
2610
2610
|
}, iA = async (e, t) => {
|
|
2611
2611
|
const r = e.checkboxes;
|
|
@@ -2628,12 +2628,12 @@ const Jl = { [le.START_SPEAK_AUDIO]: !0, [le.TOGGLE_AUDIO]: !0, [le.TOGGLE_VOICE
|
|
|
2628
2628
|
o instanceof Promise && (o = await o), typeof o == "string" && o.trim() !== "" && (r ? await t.simulateStreamMessage(o) : await t.injectMessage(o));
|
|
2629
2629
|
}, AA = ({ options: e, path: t }) => {
|
|
2630
2630
|
var r, n, o, s, i, a;
|
|
2631
|
-
const { settings: l } = De(), { styles: A } = He(), { paths: c } = xr(), { handleSubmitText: p } = Xn(), [f, m] = x.useState([]), [v, D] = x.useState(!1), y = { cursor: v ? `url("${(r = l.general) == null ? void 0 : r.actionDisabledIcon}"), auto` : "pointer", color: (n = l.general) == null ? void 0 : n.primaryColor, borderColor: (o = l.general) == null ? void 0 : o.primaryColor, backgroundColor: "#fff", ...A.botOptionStyle },
|
|
2631
|
+
const { settings: l } = De(), { styles: A } = He(), { paths: c } = xr(), { handleSubmitText: p } = Xn(), [f, m] = x.useState([]), [v, D] = x.useState(!1), y = { cursor: v ? `url("${(r = l.general) == null ? void 0 : r.actionDisabledIcon}"), auto` : "pointer", color: (n = l.general) == null ? void 0 : n.primaryColor, borderColor: (o = l.general) == null ? void 0 : o.primaryColor, backgroundColor: "#fff", ...A.botOptionStyle }, k = { color: "#fff", borderColor: (s = l.general) == null ? void 0 : s.primaryColor, backgroundColor: (i = l.general) == null ? void 0 : i.primaryColor, ...A.botOptionHoveredStyle };
|
|
2632
2632
|
return x.useEffect(() => {
|
|
2633
2633
|
c.length > 0 && c[c.length - 1] !== t && D(!e.reusable);
|
|
2634
2634
|
}, [c]), M.jsx("div", { className: "rcb-options-container " + ((a = l.botBubble) != null && a.showAvatar ? "rcb-options-offset" : ""), children: e.items.map((I, E) => {
|
|
2635
2635
|
const T = f[E] && !v;
|
|
2636
|
-
return M.jsx("div", { className: "rcb-options", style: T ?
|
|
2636
|
+
return M.jsx("div", { className: "rcb-options", style: T ? k : y, onMouseEnter: () => ((_) => {
|
|
2637
2637
|
m((Q) => {
|
|
2638
2638
|
const O = [...Q];
|
|
2639
2639
|
return O[_] = !0, O;
|
|
@@ -2747,8 +2747,8 @@ const vr = () => uo, Xo = (e) => {
|
|
|
2747
2747
|
if (p === "style") {
|
|
2748
2748
|
const f = c.value.split(";").filter((v) => v.trim() !== ""), m = {};
|
|
2749
2749
|
f.forEach((v) => {
|
|
2750
|
-
const [D, y] = v.split(":").map((I) => I.trim()),
|
|
2751
|
-
m[
|
|
2750
|
+
const [D, y] = v.split(":").map((I) => I.trim()), k = D.replace(/-([a-z])/g, (I, E) => E.toUpperCase());
|
|
2751
|
+
m[k] = y;
|
|
2752
2752
|
}), A[p] = m;
|
|
2753
2753
|
} else a !== "audio" && a !== "video" || p !== "controls" || c.value !== "" ? A[p] = c.value : A[p] = "true";
|
|
2754
2754
|
return A;
|
|
@@ -2782,13 +2782,13 @@ const vr = () => uo, Xo = (e) => {
|
|
|
2782
2782
|
const D = (m = e.notification) == null ? void 0 : m.sound;
|
|
2783
2783
|
l.current = new AudioContext();
|
|
2784
2784
|
const y = l.current.createGain();
|
|
2785
|
-
let
|
|
2785
|
+
let k;
|
|
2786
2786
|
if (y.gain.value = ((v = e.notification) == null ? void 0 : v.volume) ?? 0.2, A.current = y, D != null && D.startsWith("data:audio")) {
|
|
2787
2787
|
const I = atob(D.split(",")[1]), E = new ArrayBuffer(I.length), T = new Uint8Array(E);
|
|
2788
2788
|
for (let _ = 0; _ < I.length; _++) T[_] = I.charCodeAt(_);
|
|
2789
|
-
|
|
2790
|
-
} else
|
|
2791
|
-
a.current = await l.current.decodeAudioData(
|
|
2789
|
+
k = E;
|
|
2790
|
+
} else k = await (await fetch(D)).arrayBuffer();
|
|
2791
|
+
a.current = await l.current.decodeAudioData(k);
|
|
2792
2792
|
}, [e.notification]), f = x.useCallback(() => {
|
|
2793
2793
|
var m;
|
|
2794
2794
|
if ((m = e.notification) != null && m.disabled || !i.current || !n || !l.current || !a.current) return;
|
|
@@ -2833,7 +2833,7 @@ const vr = () => uo, Xo = (e) => {
|
|
|
2833
2833
|
return { audioToggledOn: t, speakAudio: i, toggleAudio: s };
|
|
2834
2834
|
}, Ln = () => {
|
|
2835
2835
|
var e, t, r;
|
|
2836
|
-
const { settings: n } = De(), { messages: o, setSyncedMessages: s, syncedMessagesRef: i } = fs(), { setSyncedIsBotTyping: a, setUnreadCount: l, syncedIsScrollingRef: A, syncedIsChatWindowOpenRef: c } = at(), { streamMessageMap: p, chatBodyRef: f, paramsInputRef: m } = ot(), { scrollToBottom: v, getIsChatBotVisible: D } = _t(), { dispatchRcbEvent: y } = Jt(), { speakAudio:
|
|
2836
|
+
const { settings: n } = De(), { messages: o, setSyncedMessages: s, syncedMessagesRef: i } = fs(), { setSyncedIsBotTyping: a, setUnreadCount: l, syncedIsScrollingRef: A, syncedIsChatWindowOpenRef: c } = at(), { streamMessageMap: p, chatBodyRef: f, paramsInputRef: m } = ot(), { scrollToBottom: v, getIsChatBotVisible: D } = _t(), { dispatchRcbEvent: y } = Jt(), { speakAudio: k } = wa(), { playNotificationSound: I } = ps(), E = x.useCallback(async (L) => {
|
|
2837
2837
|
var X, te;
|
|
2838
2838
|
if ((X = n.event) != null && X.rcbSaveChatHistory) {
|
|
2839
2839
|
const J = await y(le.SAVE_CHAT_HISTORY, { messages: L });
|
|
@@ -2844,8 +2844,8 @@ const vr = () => uo, Xo = (e) => {
|
|
|
2844
2844
|
if (ma || !Sn) return;
|
|
2845
2845
|
const re = [];
|
|
2846
2846
|
for (let Z = J.length - 1; Z >= 0; Z--) {
|
|
2847
|
-
const
|
|
2848
|
-
if (
|
|
2847
|
+
const S = J[Z];
|
|
2848
|
+
if (S.sender.toUpperCase() !== "SYSTEM" && (S.content !== "" && re.unshift(S), re.length === to)) break;
|
|
2849
2849
|
}
|
|
2850
2850
|
let Y = re.map(gA);
|
|
2851
2851
|
if (!ga && Y.length < to) {
|
|
@@ -2863,7 +2863,7 @@ const vr = () => uo, Xo = (e) => {
|
|
|
2863
2863
|
const Z = Y.sender.toUpperCase();
|
|
2864
2864
|
Z === "USER" && (re = !1), (te = n.general) != null && te.embedded && D() && (re = !1), (c.current && !A.current || X) && (re = !1), re && I(), !X && (Z !== "USER" && (J = n.chatWindow) != null && J.autoJumpToBottom || Z === "USER" || !A.current) && setTimeout(() => v(), 1);
|
|
2865
2865
|
}, [n, f, c, A, I, v, D]), _ = x.useCallback(async (L, X = "BOT", te = null) => {
|
|
2866
|
-
var J, re, Y, Z,
|
|
2866
|
+
var J, re, Y, Z, S;
|
|
2867
2867
|
if (typeof L != "string") throw new Error("Content must be of type string to simulate stream.");
|
|
2868
2868
|
X = X.toUpperCase();
|
|
2869
2869
|
let ce = xn(L, X);
|
|
@@ -2881,7 +2881,7 @@ const vr = () => uo, Xo = (e) => {
|
|
|
2881
2881
|
te && (fe = te(fe));
|
|
2882
2882
|
let de = 0;
|
|
2883
2883
|
const be = fe.length;
|
|
2884
|
-
ce.sender.toUpperCase() === "BOT" && (c.current || (Z = n.general) != null && Z.embedded) && typeof ce.content == "string" && ce.content.trim() !== "" &&
|
|
2884
|
+
ce.sender.toUpperCase() === "BOT" && (c.current || (Z = n.general) != null && Z.embedded) && typeof ce.content == "string" && ce.content.trim() !== "" && k(ce.content);
|
|
2885
2885
|
const Oe = new Promise((Ie) => {
|
|
2886
2886
|
const nt = setInterval(() => {
|
|
2887
2887
|
if (de >= be) return clearInterval(nt), void Ie();
|
|
@@ -2896,8 +2896,8 @@ const vr = () => uo, Xo = (e) => {
|
|
|
2896
2896
|
});
|
|
2897
2897
|
}, B);
|
|
2898
2898
|
});
|
|
2899
|
-
return (A.current || !c.current) && l((Ie) => Ie + 1), await Oe, E(i.current), (
|
|
2900
|
-
}, [n, y, T, i, m, a, l, c,
|
|
2899
|
+
return (A.current || !c.current) && l((Ie) => Ie + 1), await Oe, E(i.current), (S = n.event) != null && S.rcbStopSimulateStreamMessage && await y(le.STOP_SIMULATE_STREAM_MESSAGE, { message: ce }), X === "USER" && (m.current = L), ce;
|
|
2900
|
+
}, [n, y, T, i, m, a, l, c, k]), Q = x.useCallback(async (L, X = "BOT") => {
|
|
2901
2901
|
var te, J, re;
|
|
2902
2902
|
X = X.toUpperCase();
|
|
2903
2903
|
let Y = xn(L, X);
|
|
@@ -2906,8 +2906,8 @@ const vr = () => uo, Xo = (e) => {
|
|
|
2906
2906
|
if (Z.defaultPrevented) return null;
|
|
2907
2907
|
Y = Z.data.message;
|
|
2908
2908
|
}
|
|
2909
|
-
return Y.sender.toUpperCase() === "BOT" && (c.current || (J = n.general) != null && J.embedded) && typeof Y.content == "string" && Y.content.trim() !== "" &&
|
|
2910
|
-
}, [n, y, T, m, i, c,
|
|
2909
|
+
return Y.sender.toUpperCase() === "BOT" && (c.current || (J = n.general) != null && J.embedded) && typeof Y.content == "string" && Y.content.trim() !== "" && k(Y.content), (A.current || !c.current) && l((Z) => Z + 1), (re = n.event) != null && re.rcbPostInjectMessage && await y(le.POST_INJECT_MESSAGE, { message: Y }), s((Z) => [...Z, Y]), T(i.current), X === "USER" && typeof L == "string" && (m.current = L), Y;
|
|
2910
|
+
}, [n, y, T, m, i, c, k, l]), O = x.useCallback(async (L) => {
|
|
2911
2911
|
var X;
|
|
2912
2912
|
let te = i.current.find((Y) => Y.id === L), J = null, re = !1;
|
|
2913
2913
|
return te || (J = vr(), te = J.find((Y) => Y.id === L), te && (re = !0)), !te || (X = n.event) != null && X.rcbRemoveMessage && (await y(le.REMOVE_MESSAGE, { message: te })).defaultPrevented ? null : re ? (J && Xo(J.filter((Y) => Y.id !== L)), te) : (s((Y) => Y.filter((Z) => Z.id !== L)), T(i.current), l((Y) => Math.max(Y - 1, 0)), te);
|
|
@@ -2935,12 +2935,12 @@ const vr = () => uo, Xo = (e) => {
|
|
|
2935
2935
|
}, [T, i]), K = x.useCallback((L, X, te = 0) => {
|
|
2936
2936
|
var J;
|
|
2937
2937
|
const re = i.current, Y = L ? L.toUpperCase() : null, Z = [];
|
|
2938
|
-
let
|
|
2938
|
+
let S = te;
|
|
2939
2939
|
for (let ce = re.length - 1; ce >= 0; ce--) {
|
|
2940
2940
|
const B = re[ce];
|
|
2941
2941
|
if (!Y || ((J = B?.sender) == null ? void 0 : J.toUpperCase()) === Y) {
|
|
2942
|
-
if (
|
|
2943
|
-
|
|
2942
|
+
if (S > 0) {
|
|
2943
|
+
S--;
|
|
2944
2944
|
continue;
|
|
2945
2945
|
}
|
|
2946
2946
|
if (Z.push(B), X !== void 0 && Z.length === X) break;
|
|
@@ -2971,8 +2971,8 @@ const hs = () => {
|
|
|
2971
2971
|
clearTimeout(nn), nn = null, clearTimeout(no);
|
|
2972
2972
|
const D = f.results[f.results.length - 1][0].transcript;
|
|
2973
2973
|
if (s.current) {
|
|
2974
|
-
const y = (m = e.chatInput) == null ? void 0 : m.characterLimit,
|
|
2975
|
-
y != null && y >= 0 &&
|
|
2974
|
+
const y = (m = e.chatInput) == null ? void 0 : m.characterLimit, k = s.current.value + D;
|
|
2975
|
+
y != null && y >= 0 && k.length > y ? n(k.slice(0, y)) : n(k), o(s.current.value.length);
|
|
2976
2976
|
}
|
|
2977
2977
|
c && (nn = setTimeout(async () => await Io(t, s), c)), (v = e.voice) != null && v.autoSendDisabled || (no = setTimeout(r, p));
|
|
2978
2978
|
}, A.onend = () => {
|
|
@@ -3026,7 +3026,7 @@ const hs = () => {
|
|
|
3026
3026
|
var U, W, H;
|
|
3027
3027
|
(U = t.general) != null && U.embedded ? v() && ((W = c.current) == null || W.focus()) : Q !== "start" && ((H = c.current) == null || H.focus());
|
|
3028
3028
|
}, 100);
|
|
3029
|
-
}, [c, (e = t.general) == null ? void 0 : e.embedded, p, v]),
|
|
3029
|
+
}, [c, (e = t.general) == null ? void 0 : e.embedded, p, v]), k = x.useCallback(() => {
|
|
3030
3030
|
c.current && c.current.focus();
|
|
3031
3031
|
}, []), I = x.useCallback(() => {
|
|
3032
3032
|
c.current && c.current.blur();
|
|
@@ -3035,7 +3035,7 @@ const hs = () => {
|
|
|
3035
3035
|
}, [l]), _ = x.useCallback((Q) => {
|
|
3036
3036
|
Q !== A.current && a((O) => !O);
|
|
3037
3037
|
}, [A]);
|
|
3038
|
-
return { textAreaDisabled: o, setSyncedTextAreaDisabled: s, textAreaSensitiveMode: i, setSyncedTextAreaSensitiveMode: a, inputLength: r, setInputLength: n, getTextAreaValue: E, setTextAreaValue: D, updateTextAreaFocus: y, focusTextArea:
|
|
3038
|
+
return { textAreaDisabled: o, setSyncedTextAreaDisabled: s, textAreaSensitiveMode: i, setSyncedTextAreaSensitiveMode: a, inputLength: r, setInputLength: n, getTextAreaValue: E, setTextAreaValue: D, updateTextAreaFocus: y, focusTextArea: k, blurTextArea: I, toggleTextAreaDisabled: T, toggleTextAreaSensitiveMode: _ };
|
|
3039
3039
|
}, ba = x.createContext({ toasts: [], setSyncedToasts: () => {
|
|
3040
3040
|
}, syncedToastsRef: { current: [] } }), Ea = () => x.useContext(ba), SA = ({ children: e }) => {
|
|
3041
3041
|
const [t, r, n] = Qt([]);
|
|
@@ -3049,11 +3049,11 @@ const hs = () => {
|
|
|
3049
3049
|
v = so();
|
|
3050
3050
|
let y = { id: v, content: l, timeout: A };
|
|
3051
3051
|
if ((f = e.event) != null && f.rcbShowToast) {
|
|
3052
|
-
const
|
|
3053
|
-
if (
|
|
3054
|
-
y =
|
|
3052
|
+
const k = await o(le.SHOW_TOAST, { toast: y });
|
|
3053
|
+
if (k.defaultPrevented) return null;
|
|
3054
|
+
y = k.data.toast;
|
|
3055
3055
|
}
|
|
3056
|
-
return r((
|
|
3056
|
+
return r((k) => [...k.slice(1), y]), v;
|
|
3057
3057
|
}
|
|
3058
3058
|
v = so();
|
|
3059
3059
|
let D = { id: v, content: l, timeout: A };
|
|
@@ -3074,7 +3074,7 @@ const hs = () => {
|
|
|
3074
3074
|
return { showToast: s, dismissToast: i, toasts: t, replaceToasts: a };
|
|
3075
3075
|
}, fo = () => {
|
|
3076
3076
|
var e, t, r, n, o;
|
|
3077
|
-
const { settings: s } = De(), { paths: i, setSyncedPaths: a, syncedPathsRef: l } = xr(), { flowRef: A, streamMessageMap: c, paramsInputRef: p, keepVoiceOnRef: f, timeoutIdRef: m } = ot(), { setSyncedIsBotTyping: v, setSyncedTextAreaDisabled: D, setSyncedTextAreaSensitiveMode: y, blockAllowsAttachment:
|
|
3077
|
+
const { settings: s } = De(), { paths: i, setSyncedPaths: a, syncedPathsRef: l } = xr(), { flowRef: A, streamMessageMap: c, paramsInputRef: p, keepVoiceOnRef: f, timeoutIdRef: m } = ot(), { setSyncedIsBotTyping: v, setSyncedTextAreaDisabled: D, setSyncedTextAreaSensitiveMode: y, blockAllowsAttachment: k, setBlockAllowsAttachment: I } = at(), { dispatchRcbEvent: E } = Jt(), { endStreamMessage: T, injectMessage: _, removeMessage: Q, simulateStreamMessage: O, streamMessage: U } = Ln(), { showToast: W, dismissToast: H } = Kn(), { toggleChatWindow: K } = _t(), { updateTextAreaFocus: L, setTextAreaValue: X } = Fn(), { syncVoice: te } = ms(), J = x.useCallback(async (B) => {
|
|
3078
3078
|
var ae;
|
|
3079
3079
|
if ((ae = s.event) != null && ae.rcbPostProcessBlock) {
|
|
3080
3080
|
const fe = await E(le.POST_PROCESS_BLOCK, { block: B });
|
|
@@ -3093,7 +3093,7 @@ const hs = () => {
|
|
|
3093
3093
|
Ie = Re.data.block;
|
|
3094
3094
|
}
|
|
3095
3095
|
v(!0), (de = s.chatInput) != null && de.blockSpam && D(!0), y(!1);
|
|
3096
|
-
const nt = { prevPath: ae, currPath: B, goToPath:
|
|
3096
|
+
const nt = { prevPath: ae, currPath: B, goToPath: S, setTextAreaValue: X, userInput: p.current, endStreamMessage: T, injectMessage: _, removeMessage: Q, simulateStreamMessage: O, streamMessage: U, toggleChatWindow: K, showToast: W, dismissToast: H };
|
|
3097
3097
|
await (async (Re, je, Je, ie, oe, Ee, we) => {
|
|
3098
3098
|
if (!Re) throw new Error("Block is not valid.");
|
|
3099
3099
|
for (const Ne of Object.keys(Re)) switch (Ne) {
|
|
@@ -3119,7 +3119,7 @@ const hs = () => {
|
|
|
3119
3119
|
await dA(Re, je, ie, we);
|
|
3120
3120
|
}
|
|
3121
3121
|
})(Ie, nt, ((be = s.botBubble) == null ? void 0 : be.simulateStream) ?? !1, m, D, y, J), v(!1), "chatDisabled" in Ie || D((Oe = s.chatInput) == null ? void 0 : Oe.disabled), "isSensitive" in Ie || y(!1), I(typeof Ie.file == "function"), L(B), te(f.current && !Ie.chatDisabled), B !== ae && c.current.clear();
|
|
3122
|
-
}, [A, L, te, (t = s.botBubble) == null ? void 0 : t.simulateStream, (r = s.chatInput) == null ? void 0 : r.disabled, p, T, _, Q, O, U, K, W, H, f, c]), Y = x.useCallback(() => l.current.length > 0 ? l.current.at(-1) ?? null : null, []), Z = x.useCallback(() => l.current.length > 1 ? l.current.at(-2) ?? null : null, []),
|
|
3122
|
+
}, [A, L, te, (t = s.botBubble) == null ? void 0 : t.simulateStream, (r = s.chatInput) == null ? void 0 : r.disabled, p, T, _, Q, O, U, K, W, H, f, c]), Y = x.useCallback(() => l.current.length > 0 ? l.current.at(-1) ?? null : null, []), Z = x.useCallback(() => l.current.length > 1 ? l.current.at(-2) ?? null : null, []), S = x.useCallback(async (B) => {
|
|
3123
3123
|
var ae;
|
|
3124
3124
|
const fe = Y(), de = Z();
|
|
3125
3125
|
return ((ae = s.event) == null || !ae.rcbChangePath || !(await E(le.CHANGE_PATH, { currPath: fe, prevPath: de, nextPath: B })).defaultPrevented) && (a((be) => [...be, B]), await re(B, fe), !0);
|
|
@@ -3127,10 +3127,10 @@ const hs = () => {
|
|
|
3127
3127
|
const ae = typeof B == "function" ? B(l.current) : B;
|
|
3128
3128
|
a(ae);
|
|
3129
3129
|
}, [l]);
|
|
3130
|
-
return { getCurrPath: Y, getPrevPath: Z, goToPath:
|
|
3130
|
+
return { getCurrPath: Y, getPrevPath: Z, goToPath: S, blockAllowsAttachment: k, setBlockAllowsAttachment: I, paths: i, replacePaths: ce, firePostProcessBlockEvent: J };
|
|
3131
3131
|
}, Xn = () => {
|
|
3132
3132
|
var e, t, r, n;
|
|
3133
|
-
const { settings: o } = De(), { endStreamMessage: s, injectMessage: i, removeMessage: a, simulateStreamMessage: l, streamMessage: A } = Ln(), { syncedPathsRef: c } = xr(), { getCurrPath: p, getPrevPath: f, goToPath: m, firePostProcessBlockEvent: v } = fo(), { setSyncedTextAreaSensitiveMode: D, setSyncedTextAreaDisabled: y, setSyncedIsBotTyping:
|
|
3133
|
+
const { settings: o } = De(), { endStreamMessage: s, injectMessage: i, removeMessage: a, simulateStreamMessage: l, streamMessage: A } = Ln(), { syncedPathsRef: c } = xr(), { getCurrPath: p, getPrevPath: f, goToPath: m, firePostProcessBlockEvent: v } = fo(), { setSyncedTextAreaSensitiveMode: D, setSyncedTextAreaDisabled: y, setSyncedIsBotTyping: k, setBlockAllowsAttachment: I, setInputLength: E, syncedVoiceToggledOnRef: T, syncedTextAreaSensitiveModeRef: _ } = at(), { flowRef: Q, inputRef: O, keepVoiceOnRef: U, paramsInputRef: W, timeoutIdRef: H } = ot(), { showToast: K, dismissToast: L } = Kn(), { dispatchRcbEvent: X } = Jt(), { syncVoice: te } = ms(), { setTextAreaValue: J } = Fn(), { toggleChatWindow: re } = _t(), Y = x.useCallback(async (S) => {
|
|
3134
3134
|
var ce, B, ae, fe, de, be;
|
|
3135
3135
|
const Oe = p();
|
|
3136
3136
|
if (Oe && Q.current[Oe]) {
|
|
@@ -3138,27 +3138,27 @@ const hs = () => {
|
|
|
3138
3138
|
if ((ce = o?.sensitiveInput) != null && ce.hideInUserBubble) return;
|
|
3139
3139
|
if ((B = o?.sensitiveInput) != null && B.maskInUserBubble) return void ((ae = o.userBubble) != null && ae.simulateStream ? await l("*".repeat(((fe = o.sensitiveInput) == null ? void 0 : fe.asterisksCount) ?? 10), "USER") : await i("*".repeat(((de = o.sensitiveInput) == null ? void 0 : de.asterisksCount) ?? 10), "USER"));
|
|
3140
3140
|
}
|
|
3141
|
-
(be = o.userBubble) != null && be.simulateStream ? await l(
|
|
3141
|
+
(be = o.userBubble) != null && be.simulateStream ? await l(S, "USER") : await i(S, "USER");
|
|
3142
3142
|
}
|
|
3143
|
-
}, [Q, p, o, i, l, _]), Z = x.useCallback(async (
|
|
3143
|
+
}, [Q, p, o, i, l, _]), Z = x.useCallback(async (S, ce = !0) => {
|
|
3144
3144
|
var B, ae;
|
|
3145
|
-
if ((
|
|
3146
|
-
ce && await Y(
|
|
3145
|
+
if ((S = S.trim()) === "") return;
|
|
3146
|
+
ce && await Y(S), H.current && clearTimeout(H.current), O.current && (J(""), E(0));
|
|
3147
3147
|
const fe = p();
|
|
3148
3148
|
if (!fe) return;
|
|
3149
3149
|
let de = Q.current[fe];
|
|
3150
3150
|
const be = await v(de);
|
|
3151
3151
|
be && ((B = o.chatInput) != null && B.blockSpam && y(!0), U.current = T.current, te(!1), setTimeout(() => {
|
|
3152
|
-
|
|
3152
|
+
k(!0);
|
|
3153
3153
|
}, 400), D(!1), setTimeout(async () => {
|
|
3154
3154
|
var Oe;
|
|
3155
3155
|
const Ie = { prevPath: f(), currPath: p(), goToPath: m, setTextAreaValue: J, userInput: W.current, injectMessage: i, simulateStreamMessage: l, streamMessage: A, removeMessage: a, endStreamMessage: s, toggleChatWindow: re, showToast: K, dismissToast: L }, nt = c.current.length;
|
|
3156
|
-
await ha(be, Ie), c.current.length === nt && (y("chatDisabled" in de ? !!de.chatDisabled : !((Oe = o.chatInput) == null || !Oe.disabled)), pa(de, Ie, D), I(typeof de.file == "function"), te(U.current),
|
|
3156
|
+
await ha(be, Ie), c.current.length === nt && (y("chatDisabled" in de ? !!de.chatDisabled : !((Oe = o.chatInput) == null || !Oe.disabled)), pa(de, Ie, D), I(typeof de.file == "function"), te(U.current), k(!1));
|
|
3157
3157
|
}, (ae = o.chatInput) == null ? void 0 : ae.botDelay));
|
|
3158
3158
|
}, [H, (e = o.chatInput) == null ? void 0 : e.blockSpam, (t = o.chatInput) == null ? void 0 : t.botDelay, (r = o.chatInput) == null ? void 0 : r.disabled, U, T, te, Y, f, p, m, i, l, A, a, s, re, K, L, Q]);
|
|
3159
|
-
return { handleSubmitText: x.useCallback(async (
|
|
3159
|
+
return { handleSubmitText: x.useCallback(async (S, ce = !0) => {
|
|
3160
3160
|
var B, ae;
|
|
3161
|
-
|
|
3161
|
+
S = S ?? ((B = O.current) == null ? void 0 : B.value), !((ae = o.event) != null && ae.rcbUserSubmitText && (await X(le.USER_SUBMIT_TEXT, { inputText: S, sendInChat: ce })).defaultPrevented || !p()) && Z(S, ce);
|
|
3162
3162
|
}, [X, p, Z, O, (n = o.event) == null ? void 0 : n.rcbUserSubmitText]) };
|
|
3163
3163
|
}, po = () => {
|
|
3164
3164
|
var e;
|
|
@@ -3172,9 +3172,9 @@ const hs = () => {
|
|
|
3172
3172
|
}, [(e = t.device) == null ? void 0 : e.applyMobileOptimizations]);
|
|
3173
3173
|
}, CA = ({ buttons: e }) => {
|
|
3174
3174
|
var t, r, n, o, s, i, a, l, A, c, p;
|
|
3175
|
-
const f = po(), { settings: m } = De(), { styles: v } = He(), { textAreaDisabled: D, textAreaSensitiveMode: y, inputLength:
|
|
3175
|
+
const f = po(), { settings: m } = De(), { styles: v } = He(), { textAreaDisabled: D, textAreaSensitiveMode: y, inputLength: k, hasFlowStarted: I, setHasFlowStarted: E, setInputLength: T } = at(), { inputRef: _ } = ot(), [Q, O] = x.useState(!1), [U, W] = x.useState(!1), { handleSubmitText: H } = Xn(), { setTextAreaValue: K } = Fn(), L = { boxSizing: f ? "content-box" : "border-box", ...v.chatInputAreaStyle }, X = { outline: D ? "" : "none", boxShadow: D ? "" : `0 0 5px ${(t = m.general) == null ? void 0 : t.primaryColor}`, boxSizing: f ? "content-box" : "border-box", ...v.chatInputAreaStyle, ...v.chatInputAreaFocusedStyle }, te = { cursor: `url("${(r = m.general) == null ? void 0 : r.actionDisabledIcon}"), auto`, caretColor: "transparent", boxSizing: f ? "content-box" : "border-box", ...v.chatInputAreaStyle, ...v.chatInputAreaDisabledStyle }, J = { color: "#989898", ...v.characterLimitStyle }, re = { color: "#ff0000", ...v.characterLimitReachedStyle }, Y = D ? (n = m.chatInput) == null ? void 0 : n.disabledPlaceholderText : (o = m.chatInput) == null ? void 0 : o.enabledPlaceholderText, Z = () => {
|
|
3176
3176
|
D || O(!0);
|
|
3177
|
-
},
|
|
3177
|
+
}, S = () => {
|
|
3178
3178
|
O(!1);
|
|
3179
3179
|
}, ce = () => {
|
|
3180
3180
|
W(!0);
|
|
@@ -3192,7 +3192,7 @@ const hs = () => {
|
|
|
3192
3192
|
return M.jsxs("div", { "aria-label": ((s = m.ariaLabel) == null ? void 0 : s.inputTextArea) ?? "input text area", role: "textbox", onMouseDown: (de) => {
|
|
3193
3193
|
var be;
|
|
3194
3194
|
de.stopPropagation(), !I && ((be = m.general) == null ? void 0 : be.flowStartTrigger) === "ON_CHATBOT_INTERACT" && E(!0);
|
|
3195
|
-
}, style: { ...v.chatInputContainerStyle }, className: "rcb-chat-input", children: [y && (i = m.sensitiveInput) != null && i.maskInTextArea ? M.jsx("input", { ref: _, type: "password", className: "rcb-chat-input-textarea", style: D ? te : Q ? X : L, placeholder: Y, onChange: fe, onKeyDown: ae, onFocus: Z, onBlur:
|
|
3195
|
+
}, style: { ...v.chatInputContainerStyle }, className: "rcb-chat-input", children: [y && (i = m.sensitiveInput) != null && i.maskInTextArea ? M.jsx("input", { ref: _, type: "password", className: "rcb-chat-input-textarea", style: D ? te : Q ? X : L, placeholder: Y, onChange: fe, onKeyDown: ae, onFocus: Z, onBlur: S, onCompositionStart: ce, onCompositionEnd: B }) : M.jsx("textarea", { ref: _, style: D ? te : Q ? X : L, rows: 1, className: "rcb-chat-input-textarea", placeholder: Y, onChange: fe, onKeyDown: ae, onFocus: Z, onBlur: S, onCompositionStart: ce, onCompositionEnd: B }), M.jsxs(M.Fragment, { children: [e?.map((de, be) => M.jsx(x.Fragment, { children: de }, be)), ((a = m.chatInput) == null ? void 0 : a.showCharacterCount) && ((l = m.chatInput) == null ? void 0 : l.characterLimit) != null && ((A = m.chatInput) == null ? void 0 : A.characterLimit) > 0 && M.jsxs("div", { className: "rcb-chat-input-char-counter", style: k >= ((c = m.chatInput) == null ? void 0 : c.characterLimit) ? re : J, children: [k, "/", (p = m.chatInput) == null ? void 0 : p.characterLimit] })] })] });
|
|
3196
3196
|
}, PA = ({ buttons: e }) => {
|
|
3197
3197
|
var t;
|
|
3198
3198
|
const { settings: r } = De(), { styles: n } = He();
|
|
@@ -3206,19 +3206,19 @@ const hs = () => {
|
|
|
3206
3206
|
}, onMouseLeave: () => {
|
|
3207
3207
|
m(!1);
|
|
3208
3208
|
}, onClick: () => p(!0), children: [(() => {
|
|
3209
|
-
var
|
|
3210
|
-
const I = (
|
|
3209
|
+
var k;
|
|
3210
|
+
const I = (k = a.chatButton) == null ? void 0 : k.icon;
|
|
3211
3211
|
return I && typeof I != "string" ? I && M.jsx("span", { className: "rcb-toggle-icon", children: M.jsx(I, { style: y }) }) : M.jsx("span", { className: "rcb-toggle-icon", style: y });
|
|
3212
3212
|
})(), !((s = a.notification) != null && s.disabled) && ((i = a.notification) == null ? void 0 : i.showCount) && M.jsx("span", { style: { ...l.notificationBadgeStyle }, className: "rcb-badge", children: A })] }) });
|
|
3213
3213
|
}, BA = () => {
|
|
3214
3214
|
var e, t, r, n, o, s;
|
|
3215
|
-
const i = po(), { settings: a } = De(), { styles: l } = He(), { chatBodyRef: A } = ot(), { isChatWindowOpen: c, toggleChatWindow: p } = _t(), [f, m] = x.useState(!1), [v, D] = x.useState(!1), [y,
|
|
3215
|
+
const i = po(), { settings: a } = De(), { styles: l } = He(), { chatBodyRef: A } = ot(), { isChatWindowOpen: c, toggleChatWindow: p } = _t(), [f, m] = x.useState(!1), [v, D] = x.useState(!1), [y, k] = x.useState(0);
|
|
3216
3216
|
x.useEffect(() => {
|
|
3217
3217
|
var T, _, Q;
|
|
3218
3218
|
const O = (T = a.tooltip) == null ? void 0 : T.mode;
|
|
3219
3219
|
if (O === "ALWAYS") if (i) {
|
|
3220
3220
|
let U;
|
|
3221
|
-
U = c ? (((_ = A.current) == null ? void 0 : _.offsetWidth) ?? 375) - (typeof ((Q = l.chatButtonStyle) == null ? void 0 : Q.width) == "number" ? l.chatButtonStyle.width : 75) : 0,
|
|
3221
|
+
U = c ? (((_ = A.current) == null ? void 0 : _.offsetWidth) ?? 375) - (typeof ((Q = l.chatButtonStyle) == null ? void 0 : Q.width) == "number" ? l.chatButtonStyle.width : 75) : 0, k(U), m(!0);
|
|
3222
3222
|
} else m(!c);
|
|
3223
3223
|
else O === "NEVER" ? m(!1) : O === "START" ? v ? m(!1) : (D(!0), m(!0)) : O === "CLOSE" && m(!c);
|
|
3224
3224
|
}, [c, i, v, (e = l.chatButtonStyle) == null ? void 0 : e.width, (t = a.tooltip) == null ? void 0 : t.mode]);
|
|
@@ -3264,13 +3264,13 @@ const hs = () => {
|
|
|
3264
3264
|
}
|
|
3265
3265
|
}, QA = () => {
|
|
3266
3266
|
var e, t, r, n, o, s;
|
|
3267
|
-
const { settings: i } = De(), { styles: a } = He(), { injectMessage: l, simulateStreamMessage: A, streamMessage: c, removeMessage: p, endStreamMessage: f } = Ln(), { getCurrPath: m, getPrevPath: v, goToPath: D, blockAllowsAttachment: y } = fo(), { flowRef:
|
|
3267
|
+
const { settings: i } = De(), { styles: a } = He(), { injectMessage: l, simulateStreamMessage: A, streamMessage: c, removeMessage: p, endStreamMessage: f } = Ln(), { getCurrPath: m, getPrevPath: v, goToPath: D, blockAllowsAttachment: y } = fo(), { flowRef: k, inputRef: I } = ot(), E = k.current, { showToast: T, dismissToast: _ } = Kn(), { dispatchRcbEvent: Q } = Jt(), { toggleChatWindow: O } = _t(), { setTextAreaValue: U } = Fn(), { handleSubmitText: W } = Xn(), H = { cursor: `url("${(e = i.general) == null ? void 0 : e.actionDisabledIcon}"), auto`, ...a.fileAttachmentButtonStyle, ...a.fileAttachmentButtonDisabledStyle }, K = { backgroundImage: `url(${(t = i.fileAttachment) == null ? void 0 : t.icon})`, fill: "#a6a6a6", ...a.fileAttachmentIconStyle }, L = { backgroundImage: `url(${(r = i.fileAttachment) == null ? void 0 : r.icon})`, fill: "#a6a6a6", ...a.fileAttachmentIconStyle, ...a.fileAttachmentIconDisabledStyle };
|
|
3268
3268
|
return M.jsxs("label", { "aria-label": ((n = i.ariaLabel) == null ? void 0 : n.fileAttachmentButton) ?? "upload file", role: "button", className: y ? "rcb-attach-button-enabled" : "rcb-attach-button-disabled", style: y ? { ...a.fileAttachmentButtonStyle } : H, children: [M.jsx("input", { className: "rcb-attach-input", role: "file", type: "file", onChange: async (X) => {
|
|
3269
3269
|
var te, J, re, Y;
|
|
3270
3270
|
const Z = X.target.files;
|
|
3271
3271
|
if (!Z) return;
|
|
3272
|
-
const
|
|
3273
|
-
if (X.target.value = "", (te = i.event) != null && te.rcbUserUploadFile && (await Q(le.USER_UPLOAD_FILE, { files:
|
|
3272
|
+
const S = Array.from(Z);
|
|
3273
|
+
if (X.target.value = "", (te = i.event) != null && te.rcbUserUploadFile && (await Q(le.USER_UPLOAD_FILE, { files: S })).defaultPrevented) return;
|
|
3274
3274
|
const ce = m();
|
|
3275
3275
|
if (!ce) return;
|
|
3276
3276
|
const B = E[ce];
|
|
@@ -3278,12 +3278,12 @@ const hs = () => {
|
|
|
3278
3278
|
const ae = B.file;
|
|
3279
3279
|
if (ae != null) {
|
|
3280
3280
|
const fe = [];
|
|
3281
|
-
for (let de = 0; de <
|
|
3282
|
-
if (fe.push(
|
|
3283
|
-
const be = await ka(
|
|
3284
|
-
!be.fileType || !be.fileUrl || await l(M.jsx(xa, { file:
|
|
3281
|
+
for (let de = 0; de < S.length; de++) {
|
|
3282
|
+
if (fe.push(S[de].name), (J = i.fileAttachment) == null || !J.showMediaDisplay) continue;
|
|
3283
|
+
const be = await ka(S[de]);
|
|
3284
|
+
!be.fileType || !be.fileUrl || await l(M.jsx(xa, { file: S[de], fileType: be.fileType, fileUrl: be.fileUrl }), "USER");
|
|
3285
3285
|
}
|
|
3286
|
-
await W("📄 " + fe.join(", "), (re = i.fileAttachment) == null ? void 0 : re.sendFileName), await ae({ userInput: (Y = I.current) == null ? void 0 : Y.value, prevPath: v(), currPath: m(), goToPath: D, setTextAreaValue: U, injectMessage: l, simulateStreamMessage: A, streamMessage: c, removeMessage: p, endStreamMessage: f, toggleChatWindow: O, showToast: T, dismissToast: _, files:
|
|
3286
|
+
await W("📄 " + fe.join(", "), (re = i.fileAttachment) == null ? void 0 : re.sendFileName), await ae({ userInput: (Y = I.current) == null ? void 0 : Y.value, prevPath: v(), currPath: m(), goToPath: D, setTextAreaValue: U, injectMessage: l, simulateStreamMessage: A, streamMessage: c, removeMessage: p, endStreamMessage: f, toggleChatWindow: O, showToast: T, dismissToast: _, files: S });
|
|
3287
3287
|
}
|
|
3288
3288
|
}, multiple: (o = i.fileAttachment) == null ? void 0 : o.multiple, accept: (s = i.fileAttachment) == null ? void 0 : s.accept, disabled: !y }), (() => {
|
|
3289
3289
|
var X, te;
|
|
@@ -3292,7 +3292,7 @@ const hs = () => {
|
|
|
3292
3292
|
})()] });
|
|
3293
3293
|
}, MA = () => {
|
|
3294
3294
|
var e, t, r, n, o, s;
|
|
3295
|
-
const { settings: i } = De(), { styles: a } = He(), { syncedTextAreaDisabledRef: l } = at(), { inputRef: A } = ot(), { textAreaDisabled: c, setTextAreaValue: p } = Fn(), f = x.useRef(null), m = x.useRef(null), [v, D] = x.useState(!1), y = { cursor: `url("${(e = i.general) == null ? void 0 : e.actionDisabledIcon}"), auto`, ...a.emojiButtonStyle, ...a.emojiButtonDisabledStyle },
|
|
3295
|
+
const { settings: i } = De(), { styles: a } = He(), { syncedTextAreaDisabledRef: l } = at(), { inputRef: A } = ot(), { textAreaDisabled: c, setTextAreaValue: p } = Fn(), f = x.useRef(null), m = x.useRef(null), [v, D] = x.useState(!1), y = { cursor: `url("${(e = i.general) == null ? void 0 : e.actionDisabledIcon}"), auto`, ...a.emojiButtonStyle, ...a.emojiButtonDisabledStyle }, k = { backgroundImage: `url(${(t = i.emoji) == null ? void 0 : t.icon})`, fill: "#a6a6a6", ...a.emojiIconStyle }, I = { backgroundImage: `url(${(r = i.emoji) == null ? void 0 : r.icon})`, fill: "#a6a6a6", ...a.emojiIconStyle, ...a.emojiIconDisabledStyle };
|
|
3296
3296
|
return x.useEffect(() => {
|
|
3297
3297
|
const E = (_) => {
|
|
3298
3298
|
const Q = _.composedPath();
|
|
@@ -3313,7 +3313,7 @@ const hs = () => {
|
|
|
3313
3313
|
}, children: (() => {
|
|
3314
3314
|
var E, T;
|
|
3315
3315
|
const _ = c ? (E = i.emoji) == null ? void 0 : E.iconDisabled : (T = i.emoji) == null ? void 0 : T.icon;
|
|
3316
|
-
return _ && typeof _ != "string" ? _ && M.jsx("span", { className: c ? "rcb-emoji-icon-disabled" : "rcb-emoji-icon-enabled", children: M.jsx(_, { style: c ? I :
|
|
3316
|
+
return _ && typeof _ != "string" ? _ && M.jsx("span", { className: c ? "rcb-emoji-icon-disabled" : "rcb-emoji-icon-enabled", children: M.jsx(_, { style: c ? I : k }) }) : M.jsx("span", { className: c ? "rcb-emoji-icon-disabled" : "rcb-emoji-icon-enabled", style: c ? I : k });
|
|
3317
3317
|
})() }), v && M.jsx("div", { className: "rcb-emoji-button-popup", ref: f, children: (s = (o = i.emoji) == null ? void 0 : o.list) == null ? void 0 : s.map((E, T) => M.jsx("span", { className: "rcb-emoji", onMouseDown: (_) => ((Q, O) => {
|
|
3318
3318
|
Q.preventDefault(), A.current && (p(A.current.value + O), setTimeout(() => {
|
|
3319
3319
|
const U = A.current;
|
|
@@ -3369,7 +3369,7 @@ const hs = () => {
|
|
|
3369
3369
|
(K = T.voice) != null && K.sendAsAudio ? kA(Q, W) : xA(T, _, Q, O, U, H);
|
|
3370
3370
|
})(n, l, I, c, A, m, i) : gs();
|
|
3371
3371
|
}, [a]);
|
|
3372
|
-
const y = { backgroundImage: `url(${(e = n.voice) == null ? void 0 : e.icon})`, fill: "#9aa0a6", ...o.voiceIconStyle },
|
|
3372
|
+
const y = { backgroundImage: `url(${(e = n.voice) == null ? void 0 : e.icon})`, fill: "#9aa0a6", ...o.voiceIconStyle }, k = { backgroundImage: `url(${(t = n.voice) == null ? void 0 : t.iconDisabled})`, fill: "#9aa0a6", ...o.voiceIconStyle, ...o.voiceIconDisabledStyle }, I = () => {
|
|
3373
3373
|
D((T) => !T);
|
|
3374
3374
|
}, E = async () => {
|
|
3375
3375
|
const T = new Blob(m.current, { type: "audio/wav" }), _ = new File([T], "voice-input.wav", { type: "audio/wav" }), Q = await ka(_);
|
|
@@ -3380,11 +3380,11 @@ const hs = () => {
|
|
|
3380
3380
|
}, style: a && !p ? { ...o.voiceButtonStyle } : { ...o.voiceButtonStyle, ...o.voiceButtonDisabledStyle }, className: a && !p ? "rcb-voice-button-enabled" : "rcb-voice-button-disabled", children: (() => {
|
|
3381
3381
|
var T, _;
|
|
3382
3382
|
const Q = a ? (T = n.voice) == null ? void 0 : T.icon : (_ = n.voice) == null ? void 0 : _.iconDisabled;
|
|
3383
|
-
return Q && typeof Q != "string" ? Q && M.jsx("span", { className: "rcb-voice-icon " + (a && !p ? "on" : ""), children: M.jsx(Q, { style: a && !p ? y :
|
|
3383
|
+
return Q && typeof Q != "string" ? Q && M.jsx("span", { className: "rcb-voice-icon " + (a && !p ? "on" : ""), children: M.jsx(Q, { style: a && !p ? y : k }) }) : M.jsx("span", { className: "rcb-voice-icon" + (a && !p ? "-on" : ""), "data-testid": "rcb-voice-icon", style: a && !p ? y : k });
|
|
3384
3384
|
})() });
|
|
3385
3385
|
}, LA = () => {
|
|
3386
3386
|
var e, t, r, n, o, s, i, a;
|
|
3387
|
-
const { settings: l } = De(), { styles: A } = He(), { textAreaDisabled: c } = at(), [p, f] = x.useState(!1), { handleSubmitText: m } = Xn(), v = { backgroundColor: (e = l.general) == null ? void 0 : e.primaryColor, ...A.sendButtonStyle }, D = { cursor: `url("${(t = l.general) == null ? void 0 : t.actionDisabledIcon}"), auto`, backgroundColor: (r = l.general) == null ? void 0 : r.primaryColor, ...A.sendButtonStyle, ...A.sendButtonDisabledStyle }, y = { backgroundColor: (n = l.general) == null ? void 0 : n.secondaryColor, ...A.sendButtonStyle, ...A.sendButtonHoveredStyle },
|
|
3387
|
+
const { settings: l } = De(), { styles: A } = He(), { textAreaDisabled: c } = at(), [p, f] = x.useState(!1), { handleSubmitText: m } = Xn(), v = { backgroundColor: (e = l.general) == null ? void 0 : e.primaryColor, ...A.sendButtonStyle }, D = { cursor: `url("${(t = l.general) == null ? void 0 : t.actionDisabledIcon}"), auto`, backgroundColor: (r = l.general) == null ? void 0 : r.primaryColor, ...A.sendButtonStyle, ...A.sendButtonDisabledStyle }, y = { backgroundColor: (n = l.general) == null ? void 0 : n.secondaryColor, ...A.sendButtonStyle, ...A.sendButtonHoveredStyle }, k = { backgroundImage: `url(${(o = l.chatInput) == null ? void 0 : o.sendButtonIcon})`, fill: "#fff", ...A.sendIconStyle }, I = { backgroundImage: `url(${(s = l.chatInput) == null ? void 0 : s.sendButtonIcon})`, fill: "#fff", ...A.sendIconStyle, ...A.sendIconDisabledStyle }, E = { backgroundImage: `url(${(i = l.chatInput) == null ? void 0 : i.sendButtonIcon})`, fill: "#fff", ...A.sendIconStyle, ...A.sendIconHoveredStyle };
|
|
3388
3388
|
return M.jsx("div", { "aria-label": ((a = l.ariaLabel) == null ? void 0 : a.sendButton) ?? "send message", role: "button", onMouseEnter: () => {
|
|
3389
3389
|
f(!0);
|
|
3390
3390
|
}, onMouseLeave: () => {
|
|
@@ -3394,7 +3394,7 @@ const hs = () => {
|
|
|
3394
3394
|
}, style: c ? D : p ? y : v, className: "rcb-send-button", children: (() => {
|
|
3395
3395
|
var T;
|
|
3396
3396
|
const _ = (T = l.chatInput) == null ? void 0 : T.sendButtonIcon;
|
|
3397
|
-
return _ && typeof _ != "string" ? _ && M.jsx("span", { className: "rcb-send-icon", "data-testid": "rcb-send-icon", children: M.jsx(_, { style: c ? I : p ? E :
|
|
3397
|
+
return _ && typeof _ != "string" ? _ && M.jsx("span", { className: "rcb-send-icon", "data-testid": "rcb-send-icon", children: M.jsx(_, { style: c ? I : p ? E : k }) }) : M.jsx("span", { className: "rcb-send-icon", "data-testid": "rcb-send-icon", style: c ? I : p ? E : k });
|
|
3398
3398
|
})() });
|
|
3399
3399
|
}, FA = (e, t) => {
|
|
3400
3400
|
var r, n, o, s, i, a, l, A, c;
|
|
@@ -3404,8 +3404,8 @@ const hs = () => {
|
|
|
3404
3404
|
if (f[D]) return f[D];
|
|
3405
3405
|
const y = t[D];
|
|
3406
3406
|
if (typeof y == "function") {
|
|
3407
|
-
const
|
|
3408
|
-
return f[D] =
|
|
3407
|
+
const k = y();
|
|
3408
|
+
return f[D] = k, k;
|
|
3409
3409
|
}
|
|
3410
3410
|
return null;
|
|
3411
3411
|
}
|
|
@@ -3424,12 +3424,12 @@ const hs = () => {
|
|
|
3424
3424
|
if (!m || (p = e.event) != null && p.rcbLoadChatHistory && (await A(le.LOAD_CHAT_HISTORY, {})).defaultPrevented) return;
|
|
3425
3425
|
s(!0);
|
|
3426
3426
|
const v = ((f = l.current) == null ? void 0 : f.scrollHeight) ?? 0;
|
|
3427
|
-
((D, y,
|
|
3427
|
+
((D, y, k, I, E, T, _, Q, O) => {
|
|
3428
3428
|
var U;
|
|
3429
|
-
if (ga = !0,
|
|
3429
|
+
if (ga = !0, k != null) try {
|
|
3430
3430
|
const W = xn(M.jsx(hA, {}), "SYSTEM"), H = E.current.slice(1);
|
|
3431
3431
|
I([W, ...H]);
|
|
3432
|
-
const K =
|
|
3432
|
+
const K = k.map((L) => {
|
|
3433
3433
|
if (L.type === "object") {
|
|
3434
3434
|
const X = va(L.content, D, y);
|
|
3435
3435
|
return { ...L, content: X };
|
|
@@ -3464,22 +3464,22 @@ const hs = () => {
|
|
|
3464
3464
|
}, className: "rcb-view-history-button", role: "button", tabIndex: 0, children: M.jsx("p", { children: (r = n.chatHistory) == null ? void 0 : r.viewChatHistoryButtonText }) }) });
|
|
3465
3465
|
}, UA = () => {
|
|
3466
3466
|
var e, t, r, n;
|
|
3467
|
-
const o = po(), { settings: s } = De(), { replaceMessages: i } = Ln(), { isBotTyping: a, isChatWindowOpen: l, setUnreadCount: A, setSyncedIsChatWindowOpen: c, setSyncedTextAreaDisabled: p, setSyncedAudioToggledOn: f, setSyncedVoiceToggledOn: m, setSyncedIsScrolling: v, syncedIsScrollingRef: D, syncedIsChatWindowOpenRef: y } = at(), { chatBodyRef:
|
|
3467
|
+
const o = po(), { settings: s } = De(), { replaceMessages: i } = Ln(), { isBotTyping: a, isChatWindowOpen: l, setUnreadCount: A, setSyncedIsChatWindowOpen: c, setSyncedTextAreaDisabled: p, setSyncedAudioToggledOn: f, setSyncedVoiceToggledOn: m, setSyncedIsScrolling: v, syncedIsScrollingRef: D, syncedIsChatWindowOpenRef: y } = at(), { chatBodyRef: k } = ot(), { viewportHeight: I, setViewportHeight: E, setViewportWidth: T, scrollToBottom: _ } = _t(), { setUpNotifications: Q } = ps(), { handleFirstInteraction: O } = (() => {
|
|
3468
3468
|
var K;
|
|
3469
3469
|
const { settings: L } = De(), { hasInteractedPage: X, setHasInteractedPage: te, hasFlowStarted: J, setHasFlowStarted: re } = at(), Y = x.useCallback(() => {
|
|
3470
3470
|
var Z;
|
|
3471
3471
|
if (te(!0), !J && ((Z = L.general) == null ? void 0 : Z.flowStartTrigger) === "ON_PAGE_INTERACT" && re(!0), !window.SpeechSynthesisUtterance) return void console.info("Speech Synthesis API is not supported in this environment.");
|
|
3472
|
-
const
|
|
3473
|
-
|
|
3472
|
+
const S = new window.SpeechSynthesisUtterance();
|
|
3473
|
+
S.text = "", S.onend = () => {
|
|
3474
3474
|
window.removeEventListener("click", Y), window.removeEventListener("keydown", Y), window.removeEventListener("touchstart", Y);
|
|
3475
|
-
}, window.speechSynthesis.speak(
|
|
3475
|
+
}, window.speechSynthesis.speak(S);
|
|
3476
3476
|
}, [J, (K = L.general) == null ? void 0 : K.flowStartTrigger]);
|
|
3477
3477
|
return { hasInteractedPage: X, handleFirstInteraction: Y };
|
|
3478
3478
|
})(), { showChatHistory: U } = ys(), W = x.useRef(0), H = x.useRef(!1);
|
|
3479
3479
|
x.useEffect(() => (window.addEventListener("click", O), window.addEventListener("keydown", O), window.addEventListener("touchstart", O), () => {
|
|
3480
3480
|
window.removeEventListener("click", O), window.removeEventListener("keydown", O), window.removeEventListener("touchstart", O);
|
|
3481
3481
|
}), []), x.useEffect(() => {
|
|
3482
|
-
const K =
|
|
3482
|
+
const K = k.current;
|
|
3483
3483
|
if (!K) return;
|
|
3484
3484
|
const L = () => {
|
|
3485
3485
|
H.current || (H.current = !0, requestAnimationFrame(() => {
|
|
@@ -3502,7 +3502,7 @@ const hs = () => {
|
|
|
3502
3502
|
var K;
|
|
3503
3503
|
(K = s.notification) != null && K.disabled || Q();
|
|
3504
3504
|
}, [(e = s.notification) == null ? void 0 : e.disabled]), x.useEffect(() => {
|
|
3505
|
-
!D.current &&
|
|
3505
|
+
!D.current && k != null && k.current && _();
|
|
3506
3506
|
}, [a]), x.useEffect(() => {
|
|
3507
3507
|
var K, L;
|
|
3508
3508
|
if ((K = s.chatHistory) != null && K.disabled) Sn && Sn.removeItem(io);
|
|
@@ -3531,17 +3531,17 @@ const hs = () => {
|
|
|
3531
3531
|
if (o) return;
|
|
3532
3532
|
l && (E((K = window.visualViewport) == null ? void 0 : K.height), T((L = window.visualViewport) == null ? void 0 : L.width));
|
|
3533
3533
|
const J = () => window.scrollTo({ top: 0, left: 0, behavior: "auto" }), re = () => W.current = window.scrollY, Y = () => {
|
|
3534
|
-
var
|
|
3535
|
-
E((
|
|
3534
|
+
var S, ce;
|
|
3535
|
+
E((S = window.visualViewport) == null ? void 0 : S.height), T((ce = window.visualViewport) == null ? void 0 : ce.width);
|
|
3536
3536
|
}, Z = () => {
|
|
3537
|
-
var
|
|
3538
|
-
window.removeEventListener("scroll", J), window.removeEventListener("scroll", re), (
|
|
3537
|
+
var S;
|
|
3538
|
+
window.removeEventListener("scroll", J), window.removeEventListener("scroll", re), (S = window.visualViewport) == null || S.removeEventListener("resize", Y);
|
|
3539
3539
|
};
|
|
3540
3540
|
return l ? (Z(), document.body.style.position = "fixed", window.addEventListener("scroll", J), (X = window.visualViewport) == null || X.addEventListener("resize", Y)) : (document.body.style.position = "static", Z(), window.scrollTo({ top: W.current, left: 0, behavior: "auto" }), window.addEventListener("scroll", re), (te = window.visualViewport) == null || te.removeEventListener("resize", Y)), Z;
|
|
3541
3541
|
}, [l, o]);
|
|
3542
3542
|
}, zA = "https://cdn.jsdelivr.net/gh/react-chatbotify/community-themes/themes", qA = "2592000", ei = "RCB_THEME_CACHE_DATA", ti = async (e, t) => {
|
|
3543
|
-
const { id: r, version: n, baseUrl: o = zA, cacheDuration: s = qA } = t, i = n || await (async (
|
|
3544
|
-
const E = `${I}/${
|
|
3543
|
+
const { id: r, version: n, baseUrl: o = zA, cacheDuration: s = qA } = t, i = n || await (async (k, I) => {
|
|
3544
|
+
const E = `${I}/${k}/meta.json`;
|
|
3545
3545
|
try {
|
|
3546
3546
|
const T = await fetch(E);
|
|
3547
3547
|
return T.ok ? (await T.json()).version : (console.error(`Failed to fetch meta.json from ${E}`), null);
|
|
@@ -3550,19 +3550,19 @@ const hs = () => {
|
|
|
3550
3550
|
}
|
|
3551
3551
|
})(r, o);
|
|
3552
3552
|
if (!i) return console.error(`Unable to find version for theme: ${r}`), { settings: {}, inlineStyles: {}, cssStylesText: "" };
|
|
3553
|
-
const a = ((
|
|
3554
|
-
const T = localStorage.getItem(`${ei}_${
|
|
3553
|
+
const a = ((k, I, E) => {
|
|
3554
|
+
const T = localStorage.getItem(`${ei}_${k}_${I}`);
|
|
3555
3555
|
if (!T) return null;
|
|
3556
3556
|
try {
|
|
3557
3557
|
const _ = JSON.parse(T), Q = (/* @__PURE__ */ new Date()).getTime(), O = Math.floor(Q / 1e3);
|
|
3558
3558
|
return _.cacheDate + E >= O ? _ : null;
|
|
3559
3559
|
} catch (_) {
|
|
3560
|
-
return console.error(`Unable to fetch cache for ${
|
|
3560
|
+
return console.error(`Unable to fetch cache for ${k}`, _), null;
|
|
3561
3561
|
}
|
|
3562
3562
|
})(r, i, s);
|
|
3563
3563
|
if (a) {
|
|
3564
|
-
const
|
|
3565
|
-
return { settings: a.settings, inlineStyles: a.inlineStyles, cssStylesText:
|
|
3564
|
+
const k = ni(e, a.cssStylesText);
|
|
3565
|
+
return { settings: a.settings, inlineStyles: a.inlineStyles, cssStylesText: k };
|
|
3566
3566
|
}
|
|
3567
3567
|
const l = `${o}/${r}/${i}/styles.css`, A = `${o}/${r}/${i}/settings.json`, c = `${o}/${r}/${i}/styles.json`;
|
|
3568
3568
|
let p = "";
|
|
@@ -3573,9 +3573,9 @@ const hs = () => {
|
|
|
3573
3573
|
m.ok ? v = await m.json() : console.info(`Could not fetch settings.json from ${A}`);
|
|
3574
3574
|
const D = await fetch(c);
|
|
3575
3575
|
let y = {};
|
|
3576
|
-
return D.ok ? y = await D.json() : console.info(`Could not fetch styles.json from ${c}`), ((
|
|
3576
|
+
return D.ok ? y = await D.json() : console.info(`Could not fetch styles.json from ${c}`), ((k, I, E, T, _) => {
|
|
3577
3577
|
const Q = (/* @__PURE__ */ new Date()).getTime(), O = { settings: E, inlineStyles: T, cssStylesText: _, cacheDate: Math.floor(Q / 1e3) };
|
|
3578
|
-
localStorage.setItem(`${ei}_${
|
|
3578
|
+
localStorage.setItem(`${ei}_${k}_${I}`, JSON.stringify(O));
|
|
3579
3579
|
})(r, i, v, y, p), { settings: v, inlineStyles: y, cssStylesText: ni(e, p) };
|
|
3580
3580
|
}, ni = (e, t) => t.split(new RegExp("(?<=})")).map((r) => {
|
|
3581
3581
|
const n = r.trim();
|
|
@@ -3659,7 +3659,7 @@ const hs = () => {
|
|
|
3659
3659
|
var I;
|
|
3660
3660
|
(a || ((I = s.general) == null ? void 0 : I.flowStartTrigger) === "ON_LOAD") && m("start");
|
|
3661
3661
|
}, [a, (r = s.general) == null ? void 0 : r.flowStartTrigger]);
|
|
3662
|
-
const
|
|
3662
|
+
const k = x.useMemo(() => {
|
|
3663
3663
|
var I;
|
|
3664
3664
|
const E = "rcb-chatbot-global ";
|
|
3665
3665
|
return (I = s.general) != null && I.embedded ? E + "rcb-window-embedded" : f ? E + "rcb-window-open" : E + "rcb-window-close";
|
|
@@ -3670,7 +3670,7 @@ const hs = () => {
|
|
|
3670
3670
|
})() && M.jsxs("div", { onMouseDown: (I) => {
|
|
3671
3671
|
var E, T;
|
|
3672
3672
|
!a && ((E = s.general) == null ? void 0 : E.flowStartTrigger) === "ON_CHATBOT_INTERACT" && l(!0), o ? (T = A.current) == null || T.blur() : I?.preventDefault();
|
|
3673
|
-
}, className:
|
|
3673
|
+
}, className: k, children: [M.jsx(BA, {}), M.jsx(DA, {}), f && !o && !((n = s.general) != null && n.embedded) && M.jsxs(M.Fragment, { children: [M.jsx("style", { children: `
|
|
3674
3674
|
html {
|
|
3675
3675
|
overflow: hidden !important;
|
|
3676
3676
|
touch-action: none !important;
|
|
@@ -3689,10 +3689,10 @@ const hs = () => {
|
|
|
3689
3689
|
const r = x.useRef(""), n = x.useRef({}), [o, s, i] = Qt({}), [a, l, A] = Qt({}), [c, p] = x.useState(!1);
|
|
3690
3690
|
return x.useEffect(() => {
|
|
3691
3691
|
p(!0);
|
|
3692
|
-
}, []), c ? M.jsx("div", { style: { fontFamily: (t = o.general) == null ? void 0 : t.fontFamily }, children: M.jsx(Pa.Provider, { value: { loadConfig: async (f, m, v, D, y,
|
|
3692
|
+
}, []), c ? M.jsx("div", { style: { fontFamily: (t = o.general) == null ? void 0 : t.fontFamily }, children: M.jsx(Pa.Provider, { value: { loadConfig: async (f, m, v, D, y, k) => {
|
|
3693
3693
|
r.current = f, n.current = m;
|
|
3694
3694
|
const I = await GA(f, v, D, y);
|
|
3695
|
-
|
|
3695
|
+
k.current && (k.current.textContent = I.cssStylesText), s(I.settings), l(I.inlineStyles);
|
|
3696
3696
|
} }, children: M.jsx(Wl, { settings: o, setSyncedSettings: s, syncedSettingsRef: i, children: M.jsx(Vl, { styles: a, setSyncedStyles: l, syncedStylesRef: A, children: M.jsx(SA, { children: M.jsx(Kl, { botIdRef: r, flowRef: n, children: M.jsx(Zl, { children: M.jsx(Xl, { settings: o, children: M.jsx(eA, { children: e }) }) }) }) }) }) }) }) }) : null;
|
|
3697
3697
|
}, VA = ({ id: e, flow: t, settings: r, styles: n, themes: o, plugins: s, setConfigLoaded: i, styleRootRef: a }) => {
|
|
3698
3698
|
const l = x.useMemo(() => e, []), A = Da(), { flowRef: c } = ot();
|
|
@@ -3727,9 +3727,9 @@ const hs = () => {
|
|
|
3727
3727
|
window.open(t);
|
|
3728
3728
|
}, 1e3), "repeat";
|
|
3729
3729
|
} }, repeat: { transition: { duration: 3e3 }, path: "prompt_again" } }, KA = ({ id: e, flow: t, settings: r, styles: n, themes: o, plugins: s, slots: i }) => {
|
|
3730
|
-
const a = x.useMemo(() => e || "rcb-" + so(), []), l = t && Object.keys(t).length !== 0 ? t : YA, A = r || {}, c = n || {}, p = s || [], [f, m] = x.useState(!1), v = Da(), D = x.useRef(null), [y,
|
|
3730
|
+
const a = x.useMemo(() => e || "rcb-" + so(), []), l = t && Object.keys(t).length !== 0 ? t : YA, A = r || {}, c = n || {}, p = s || [], [f, m] = x.useState(!1), v = Da(), D = x.useRef(null), [y, k] = x.useState(o || []);
|
|
3731
3731
|
x.useEffect(() => {
|
|
3732
|
-
o &&
|
|
3732
|
+
o && k(o);
|
|
3733
3733
|
}, [o]);
|
|
3734
3734
|
const I = () => M.jsxs(M.Fragment, { children: [M.jsx(VA, { styleRootRef: D, id: a, flow: l, settings: A, styles: c, themes: y, plugins: p, setConfigLoaded: m }), f && M.jsx(WA, { plugins: s, slots: i })] });
|
|
3735
3735
|
return M.jsxs(v == null ? Ba : M.Fragment, { children: [M.jsx("style", { ref: D }), M.jsx("div", { id: a, children: I() })] });
|
|
@@ -3869,8 +3869,8 @@ let _a = class {
|
|
|
3869
3869
|
if (n[a.inverseName] || !this.isTagAllowed(l) || !this.canRenderChild(t, A)) return;
|
|
3870
3870
|
let c = "";
|
|
3871
3871
|
for (; o && (i = a.match(o)); ) {
|
|
3872
|
-
const { index: p, length: f, match: m, valid: v, void: D, ...y } = i,
|
|
3873
|
-
p > 0 && (c += o.slice(0, p)), v ? (c += D ? `{{{${
|
|
3872
|
+
const { index: p, length: f, match: m, valid: v, void: D, ...y } = i, k = a.propName + String(s);
|
|
3873
|
+
p > 0 && (c += o.slice(0, p)), v ? (c += D ? `{{{${k}/}}}` : `{{{${k}}}}${m}{{{/${k}}}}`, this.keyIndex += 1, s += 1, r[k] = { children: m, matcher: a, props: { ...n, ...y, key: this.keyIndex } }) : c += m, a.greedy ? (o = c + o.slice(p + f), c = "") : o = o.slice(p + (f || m.length));
|
|
3874
3874
|
}
|
|
3875
3875
|
a.greedy || (o = c + o);
|
|
3876
3876
|
}), s === 0 ? e : this.replaceTokens(o, r);
|
|
@@ -3995,11 +3995,11 @@ function Ac(e) {
|
|
|
3995
3995
|
return f || (f = i), p ? V.createElement(V.Fragment, null, f) : V.createElement(Ma, { attributes: r, className: n, tagName: c }, f);
|
|
3996
3996
|
}
|
|
3997
3997
|
function cc(e) {
|
|
3998
|
-
const { attributes: t, className: r, content: n = "", disableFilters: o = !1, disableMatchers: s = !1, emptyContent: i = null, filters: a = [], matchers: l = [], onAfterParse: A = null, onBeforeParse: c = null, tagName: p = "span", noWrap: f = !1, ...m } = e, v = s ? [] : l, D = o ? [] : a, y = c ? [c] : [],
|
|
3998
|
+
const { attributes: t, className: r, content: n = "", disableFilters: o = !1, disableMatchers: s = !1, emptyContent: i = null, filters: a = [], matchers: l = [], onAfterParse: A = null, onBeforeParse: c = null, tagName: p = "span", noWrap: f = !1, ...m } = e, v = s ? [] : l, D = o ? [] : a, y = c ? [c] : [], k = A ? [A] : [];
|
|
3999
3999
|
v.forEach((_) => {
|
|
4000
|
-
_.onBeforeParse && y.push(_.onBeforeParse.bind(_)), _.onAfterParse &&
|
|
4000
|
+
_.onBeforeParse && y.push(_.onBeforeParse.bind(_)), _.onAfterParse && k.push(_.onAfterParse.bind(_));
|
|
4001
4001
|
});
|
|
4002
|
-
const I = y.reduce((_, Q) => Q(_, e), n ?? ""), E = new _a(I, m, v, D), T =
|
|
4002
|
+
const I = y.reduce((_, Q) => Q(_, e), n ?? ""), E = new _a(I, m, v, D), T = k.reduce((_, Q) => Q(_, e), E.parse());
|
|
4003
4003
|
return V.createElement(Ac, { attributes: t, className: r, containerTagName: e.containerTagName, emptyContent: i, noWrap: f, parsedContent: T.length === 0 ? void 0 : T, tagName: p });
|
|
4004
4004
|
}
|
|
4005
4005
|
const uc = ({ children: e }) => M.jsx("div", { style: { whiteSpace: "normal" }, children: M.jsx(cc, { content: typeof e == "string" ? e : "" }) }), dc = { autoConfig: !0 }, ii = (e, t, r) => {
|
|
@@ -4150,7 +4150,7 @@ var Mo, ui, di, zn = {}, Bc = (function() {
|
|
|
4150
4150
|
`);
|
|
4151
4151
|
D = ~K ? W.length - K : D + W.length;
|
|
4152
4152
|
}
|
|
4153
|
-
function
|
|
4153
|
+
function k() {
|
|
4154
4154
|
var W = { line: v, column: D };
|
|
4155
4155
|
return function(H) {
|
|
4156
4156
|
return H.position = new I(W), _(), H;
|
|
@@ -4179,7 +4179,7 @@ var Mo, ui, di, zn = {}, Bc = (function() {
|
|
|
4179
4179
|
return W;
|
|
4180
4180
|
}
|
|
4181
4181
|
function O() {
|
|
4182
|
-
var W =
|
|
4182
|
+
var W = k();
|
|
4183
4183
|
if (f.charAt(0) == "/" && f.charAt(1) == "*") {
|
|
4184
4184
|
for (var H = 2; c != f.charAt(H) && (f.charAt(H) != "*" || f.charAt(H + 1) != "/"); ) ++H;
|
|
4185
4185
|
if (H += 2, c === f.charAt(H - 1)) return E("End of comment missing");
|
|
@@ -4188,7 +4188,7 @@ var Mo, ui, di, zn = {}, Bc = (function() {
|
|
|
4188
4188
|
}
|
|
4189
4189
|
}
|
|
4190
4190
|
function U() {
|
|
4191
|
-
var W =
|
|
4191
|
+
var W = k(), H = T(s);
|
|
4192
4192
|
if (H) {
|
|
4193
4193
|
if (O(), !T(i)) return E("property missing ':'");
|
|
4194
4194
|
var K = T(a), L = W({ type: "declaration", property: p(H[0].replace(r, c)), value: K ? p(K[0].replace(r, c)) : c });
|
|
@@ -4279,8 +4279,8 @@ function Va(e, t, r) {
|
|
|
4279
4279
|
for (D in f.properties) if (D !== "children" && bs.call(f.properties, D)) {
|
|
4280
4280
|
const y = Nc(p, D, f.properties[D]);
|
|
4281
4281
|
if (y) {
|
|
4282
|
-
const [
|
|
4283
|
-
p.tableCellAlignToStyle &&
|
|
4282
|
+
const [k, I] = y;
|
|
4283
|
+
p.tableCellAlignToStyle && k === "align" && typeof I == "string" && Oc.has(f.tagName) ? v = I : m[k] = I;
|
|
4284
4284
|
}
|
|
4285
4285
|
}
|
|
4286
4286
|
return v && ((m.style || (m.style = {}))[p.stylePropertyNameCase === "css" ? "text-align" : "textAlign"] = v), m;
|
|
@@ -4308,15 +4308,15 @@ function Va(e, t, r) {
|
|
|
4308
4308
|
D.type;
|
|
4309
4309
|
const y = D.expression;
|
|
4310
4310
|
y.type;
|
|
4311
|
-
const
|
|
4312
|
-
|
|
4311
|
+
const k = y.properties[0];
|
|
4312
|
+
k.type, Object.assign(m, p.evaluater.evaluateExpression(k.argument));
|
|
4313
4313
|
} else pr(p, f.position);
|
|
4314
4314
|
else {
|
|
4315
4315
|
const D = v.name;
|
|
4316
4316
|
let y;
|
|
4317
4317
|
if (v.value && typeof v.value == "object") if (v.value.data && v.value.data.estree && p.evaluater) {
|
|
4318
|
-
const
|
|
4319
|
-
|
|
4318
|
+
const k = v.value.data.estree.body[0];
|
|
4319
|
+
k.type, y = p.evaluater.evaluateExpression(k.expression);
|
|
4320
4320
|
} else pr(p, f.position);
|
|
4321
4321
|
else y = v.value === null || v.value;
|
|
4322
4322
|
m[D] = y;
|
|
@@ -4518,10 +4518,10 @@ function os(e) {
|
|
|
4518
4518
|
return e !== null && (e < 32 || e === 127);
|
|
4519
4519
|
}
|
|
4520
4520
|
const ss = Cn(/\d/), Gc = Cn(/[\dA-Fa-f]/), Wc = Cn(/[!-/:-@[-`{-~]/);
|
|
4521
|
-
function
|
|
4521
|
+
function ve(e) {
|
|
4522
4522
|
return e !== null && e < -2;
|
|
4523
4523
|
}
|
|
4524
|
-
function
|
|
4524
|
+
function Ct(e) {
|
|
4525
4525
|
return e !== null && (e < 0 || e === 32);
|
|
4526
4526
|
}
|
|
4527
4527
|
function Fe(e) {
|
|
@@ -4572,7 +4572,7 @@ const Kc = { tokenize: function(e) {
|
|
|
4572
4572
|
return r && (r.next = i), r = i, o(s);
|
|
4573
4573
|
}
|
|
4574
4574
|
function o(s) {
|
|
4575
|
-
return s === null ? (e.exit("chunkText"), e.exit("paragraph"), void e.consume(s)) :
|
|
4575
|
+
return s === null ? (e.exit("chunkText"), e.exit("paragraph"), void e.consume(s)) : ve(s) ? (e.consume(s), e.exit("chunkText"), n) : (e.consume(s), o);
|
|
4576
4576
|
}
|
|
4577
4577
|
} }, Xc = { tokenize: function(e) {
|
|
4578
4578
|
const t = this, r = [];
|
|
@@ -4594,7 +4594,7 @@ const Kc = { tokenize: function(e) {
|
|
|
4594
4594
|
_ = t.events[Q][1].end;
|
|
4595
4595
|
break;
|
|
4596
4596
|
}
|
|
4597
|
-
|
|
4597
|
+
k(i);
|
|
4598
4598
|
let O = T;
|
|
4599
4599
|
for (; O < t.events.length; ) t.events[O][1].end = { ..._ }, O++;
|
|
4600
4600
|
return An(t.events, Q + 1, 0, t.events.slice(T)), t.events.length = O, A(E);
|
|
@@ -4610,7 +4610,7 @@ const Kc = { tokenize: function(e) {
|
|
|
4610
4610
|
return t.containerState = {}, e.check(bi, c, p)(E);
|
|
4611
4611
|
}
|
|
4612
4612
|
function c(E) {
|
|
4613
|
-
return n && I(),
|
|
4613
|
+
return n && I(), k(i), f(E);
|
|
4614
4614
|
}
|
|
4615
4615
|
function p(E) {
|
|
4616
4616
|
return t.parser.lazy[t.now().line] = i !== r.length, s = t.now().offset, v(E);
|
|
@@ -4622,10 +4622,10 @@ const Kc = { tokenize: function(e) {
|
|
|
4622
4622
|
return i++, r.push([t.currentConstruct, t.containerState]), f(E);
|
|
4623
4623
|
}
|
|
4624
4624
|
function v(E) {
|
|
4625
|
-
return E === null ? (n && I(),
|
|
4625
|
+
return E === null ? (n && I(), k(0), void e.consume(E)) : (n = n || t.parser.flow(t.now()), e.enter("chunkFlow", { _tokenizer: n, contentType: "flow", previous: o }), D(E));
|
|
4626
4626
|
}
|
|
4627
4627
|
function D(E) {
|
|
4628
|
-
return E === null ? (y(e.exit("chunkFlow"), !0),
|
|
4628
|
+
return E === null ? (y(e.exit("chunkFlow"), !0), k(0), void e.consume(E)) : ve(E) ? (e.consume(E), y(e.exit("chunkFlow")), i = 0, t.interrupt = void 0, a) : (e.consume(E), D);
|
|
4629
4629
|
}
|
|
4630
4630
|
function y(E, T) {
|
|
4631
4631
|
const _ = t.sliceStream(E);
|
|
@@ -4641,11 +4641,11 @@ const Kc = { tokenize: function(e) {
|
|
|
4641
4641
|
}
|
|
4642
4642
|
U = !0;
|
|
4643
4643
|
}
|
|
4644
|
-
for (
|
|
4644
|
+
for (k(i), Q = O; Q < t.events.length; ) t.events[Q][1].end = { ...W }, Q++;
|
|
4645
4645
|
An(t.events, H + 1, 0, t.events.slice(O)), t.events.length = Q;
|
|
4646
4646
|
}
|
|
4647
4647
|
}
|
|
4648
|
-
function
|
|
4648
|
+
function k(E) {
|
|
4649
4649
|
let T = r.length;
|
|
4650
4650
|
for (; T-- > E; ) {
|
|
4651
4651
|
const _ = r[T];
|
|
@@ -4660,7 +4660,7 @@ const Kc = { tokenize: function(e) {
|
|
|
4660
4660
|
return We(e, e.attempt(this.parser.constructs.document, t, r), "linePrefix", this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4);
|
|
4661
4661
|
} };
|
|
4662
4662
|
function Ei(e) {
|
|
4663
|
-
return e === null ||
|
|
4663
|
+
return e === null || Ct(e) || Yc(e) ? 1 : Vc(e) ? 2 : void 0;
|
|
4664
4664
|
}
|
|
4665
4665
|
function xs(e, t, r) {
|
|
4666
4666
|
const n = [];
|
|
@@ -4737,7 +4737,7 @@ const Jc = { name: "autolink", tokenize: function(e, t, r) {
|
|
|
4737
4737
|
return Fe(o) ? We(e, n, "linePrefix")(o) : n(o);
|
|
4738
4738
|
};
|
|
4739
4739
|
function n(o) {
|
|
4740
|
-
return o === null ||
|
|
4740
|
+
return o === null || ve(o) ? t(o) : r(o);
|
|
4741
4741
|
}
|
|
4742
4742
|
} }, Xa = { continuation: { tokenize: function(e, t, r) {
|
|
4743
4743
|
const n = this;
|
|
@@ -4812,7 +4812,7 @@ const Jc = { name: "autolink", tokenize: function(e, t, r) {
|
|
|
4812
4812
|
return L === s ? (Q++, E.consume(L), H) : Q >= a ? (E.exit("codeFencedFenceSequence"), Fe(L) ? We(E, K, "whitespace")(L) : K(L)) : _(L);
|
|
4813
4813
|
}
|
|
4814
4814
|
function K(L) {
|
|
4815
|
-
return L === null ||
|
|
4815
|
+
return L === null || ve(L) ? (E.exit("codeFencedFence"), T(L)) : _(L);
|
|
4816
4816
|
}
|
|
4817
4817
|
} };
|
|
4818
4818
|
let s, i = 0, a = 0;
|
|
@@ -4826,16 +4826,16 @@ const Jc = { name: "autolink", tokenize: function(e, t, r) {
|
|
|
4826
4826
|
return E === s ? (a++, e.consume(E), l) : a < 3 ? r(E) : (e.exit("codeFencedFenceSequence"), Fe(E) ? We(e, A, "whitespace")(E) : A(E));
|
|
4827
4827
|
}
|
|
4828
4828
|
function A(E) {
|
|
4829
|
-
return E === null ||
|
|
4829
|
+
return E === null || ve(E) ? (e.exit("codeFencedFence"), n.interrupt ? t(E) : e.check(ki, m, I)(E)) : (e.enter("codeFencedFenceInfo"), e.enter("chunkString", { contentType: "string" }), c(E));
|
|
4830
4830
|
}
|
|
4831
4831
|
function c(E) {
|
|
4832
|
-
return E === null ||
|
|
4832
|
+
return E === null || ve(E) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"), A(E)) : Fe(E) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"), We(e, p, "whitespace")(E)) : E === 96 && E === s ? r(E) : (e.consume(E), c);
|
|
4833
4833
|
}
|
|
4834
4834
|
function p(E) {
|
|
4835
|
-
return E === null ||
|
|
4835
|
+
return E === null || ve(E) ? A(E) : (e.enter("codeFencedFenceMeta"), e.enter("chunkString", { contentType: "string" }), f(E));
|
|
4836
4836
|
}
|
|
4837
4837
|
function f(E) {
|
|
4838
|
-
return E === null ||
|
|
4838
|
+
return E === null || ve(E) ? (e.exit("chunkString"), e.exit("codeFencedFenceMeta"), A(E)) : E === 96 && E === s ? r(E) : (e.consume(E), f);
|
|
4839
4839
|
}
|
|
4840
4840
|
function m(E) {
|
|
4841
4841
|
return e.attempt(o, I, v)(E);
|
|
@@ -4847,10 +4847,10 @@ const Jc = { name: "autolink", tokenize: function(e, t, r) {
|
|
|
4847
4847
|
return i > 0 && Fe(E) ? We(e, y, "linePrefix", i + 1)(E) : y(E);
|
|
4848
4848
|
}
|
|
4849
4849
|
function y(E) {
|
|
4850
|
-
return E === null ||
|
|
4850
|
+
return E === null || ve(E) ? e.check(ki, m, I)(E) : (e.enter("codeFlowValue"), k(E));
|
|
4851
4851
|
}
|
|
4852
|
-
function
|
|
4853
|
-
return E === null ||
|
|
4852
|
+
function k(E) {
|
|
4853
|
+
return E === null || ve(E) ? (e.exit("codeFlowValue"), y(E)) : (e.consume(E), k);
|
|
4854
4854
|
}
|
|
4855
4855
|
function I(E) {
|
|
4856
4856
|
return e.exit("codeFenced"), t(E);
|
|
@@ -4865,10 +4865,10 @@ const Jc = { name: "autolink", tokenize: function(e, t, r) {
|
|
|
4865
4865
|
return A && A[1].type === "linePrefix" && A[2].sliceSerialize(A[1], !0).length >= 4 ? s(l) : r(l);
|
|
4866
4866
|
}
|
|
4867
4867
|
function s(l) {
|
|
4868
|
-
return l === null ? a(l) :
|
|
4868
|
+
return l === null ? a(l) : ve(l) ? e.attempt(Zc, s, a)(l) : (e.enter("codeFlowValue"), i(l));
|
|
4869
4869
|
}
|
|
4870
4870
|
function i(l) {
|
|
4871
|
-
return l === null ||
|
|
4871
|
+
return l === null || ve(l) ? (e.exit("codeFlowValue"), s(l)) : (e.consume(l), i);
|
|
4872
4872
|
}
|
|
4873
4873
|
function a(l) {
|
|
4874
4874
|
return e.exit("codeIndented"), t(l);
|
|
@@ -4877,11 +4877,11 @@ const Jc = { name: "autolink", tokenize: function(e, t, r) {
|
|
|
4877
4877
|
const n = this;
|
|
4878
4878
|
return o;
|
|
4879
4879
|
function o(i) {
|
|
4880
|
-
return n.parser.lazy[n.now().line] ? r(i) :
|
|
4880
|
+
return n.parser.lazy[n.now().line] ? r(i) : ve(i) ? (e.enter("lineEnding"), e.consume(i), e.exit("lineEnding"), o) : We(e, s, "linePrefix", 5)(i);
|
|
4881
4881
|
}
|
|
4882
4882
|
function s(i) {
|
|
4883
4883
|
const a = n.events[n.events.length - 1];
|
|
4884
|
-
return a && a[1].type === "linePrefix" && a[2].sliceSerialize(a[1], !0).length >= 4 ? t(i) :
|
|
4884
|
+
return a && a[1].type === "linePrefix" && a[2].sliceSerialize(a[1], !0).length >= 4 ? t(i) : ve(i) ? o(i) : r(i);
|
|
4885
4885
|
}
|
|
4886
4886
|
} }, $c = { name: "codeText", previous: function(e) {
|
|
4887
4887
|
return e !== 96 || this.events[this.events.length - 1][1].type === "characterEscape";
|
|
@@ -4904,10 +4904,10 @@ const Jc = { name: "autolink", tokenize: function(e, t, r) {
|
|
|
4904
4904
|
return c === 96 ? (e.consume(c), s++, i) : (e.exit("codeTextSequence"), a(c));
|
|
4905
4905
|
}
|
|
4906
4906
|
function a(c) {
|
|
4907
|
-
return c === null ? r(c) : c === 32 ? (e.enter("space"), e.consume(c), e.exit("space"), a) : c === 96 ? (o = e.enter("codeTextSequence"), n = 0, A(c)) :
|
|
4907
|
+
return c === null ? r(c) : c === 32 ? (e.enter("space"), e.consume(c), e.exit("space"), a) : c === 96 ? (o = e.enter("codeTextSequence"), n = 0, A(c)) : ve(c) ? (e.enter("lineEnding"), e.consume(c), e.exit("lineEnding"), a) : (e.enter("codeTextData"), l(c));
|
|
4908
4908
|
}
|
|
4909
4909
|
function l(c) {
|
|
4910
|
-
return c === null || c === 32 || c === 96 ||
|
|
4910
|
+
return c === null || c === 32 || c === 96 || ve(c) ? (e.exit("codeTextData"), a(c)) : (e.consume(c), l);
|
|
4911
4911
|
}
|
|
4912
4912
|
function A(c) {
|
|
4913
4913
|
return c === 96 ? (e.consume(c), n++, A) : n === s ? (e.exit("codeTextSequence"), e.exit("codeText"), t(c)) : (o.type = "codeTextData", l(c));
|
|
@@ -4995,8 +4995,8 @@ function tu(e, t) {
|
|
|
4995
4995
|
}
|
|
4996
4996
|
for (m = r; ++f < a.length; ) a[f][0] === "exit" && a[f - 1][0] === "enter" && a[f][1].type === a[f - 1][1].type && a[f][1].start.line !== a[f][1].end.line && (D = f + 1, y.push(D), m._tokenizer = void 0, m.previous = void 0, m = m.next);
|
|
4997
4997
|
for (i.events = [], m ? (m._tokenizer = void 0, m.previous = void 0) : y.pop(), f = y.length; f--; ) {
|
|
4998
|
-
const
|
|
4999
|
-
l.push([I, I +
|
|
4998
|
+
const k = a.slice(y[f], y[f + 1]), I = s.pop();
|
|
4999
|
+
l.push([I, I + k.length - 1]), e.splice(I, 2, k);
|
|
5000
5000
|
}
|
|
5001
5001
|
for (l.reverse(), f = -1; ++f < l.length; ) A[v + l[f][0]] = v + l[f][1], v += l[f][1] - l[f][0] - 1;
|
|
5002
5002
|
return A;
|
|
@@ -5009,7 +5009,7 @@ const nu = { resolve: function(e) {
|
|
|
5009
5009
|
return e.enter("content"), r = e.enter("chunkContent", { contentType: "content" }), n(i);
|
|
5010
5010
|
};
|
|
5011
5011
|
function n(i) {
|
|
5012
|
-
return i === null ? o(i) :
|
|
5012
|
+
return i === null ? o(i) : ve(i) ? e.check(ru, s, o)(i) : (e.consume(i), n);
|
|
5013
5013
|
}
|
|
5014
5014
|
function o(i) {
|
|
5015
5015
|
return e.exit("chunkContent"), e.exit("content"), t(i);
|
|
@@ -5023,7 +5023,7 @@ const nu = { resolve: function(e) {
|
|
|
5023
5023
|
return e.exit("chunkContent"), e.enter("lineEnding"), e.consume(s), e.exit("lineEnding"), We(e, o, "linePrefix");
|
|
5024
5024
|
};
|
|
5025
5025
|
function o(s) {
|
|
5026
|
-
if (s === null ||
|
|
5026
|
+
if (s === null || ve(s)) return r(s);
|
|
5027
5027
|
const i = n.events[n.events.length - 1];
|
|
5028
5028
|
return !n.parser.constructs.disable.null.includes("codeIndented") && i && i[1].type === "linePrefix" && i[2].sliceSerialize(i[1], !0).length >= 4 ? t(s) : e.interrupt(n.parser.constructs.flow, r, t)(s);
|
|
5029
5029
|
}
|
|
@@ -5038,13 +5038,13 @@ function el(e, t, r, n, o, s, i, a, l) {
|
|
|
5038
5038
|
return y === 62 ? (e.enter(s), e.consume(y), e.exit(s), e.exit(o), e.exit(n), t) : (e.enter(a), e.enter("chunkString", { contentType: "string" }), f(y));
|
|
5039
5039
|
}
|
|
5040
5040
|
function f(y) {
|
|
5041
|
-
return y === 62 ? (e.exit("chunkString"), e.exit(a), p(y)) : y === null || y === 60 ||
|
|
5041
|
+
return y === 62 ? (e.exit("chunkString"), e.exit(a), p(y)) : y === null || y === 60 || ve(y) ? r(y) : (e.consume(y), y === 92 ? m : f);
|
|
5042
5042
|
}
|
|
5043
5043
|
function m(y) {
|
|
5044
5044
|
return y === 60 || y === 62 || y === 92 ? (e.consume(y), f) : f(y);
|
|
5045
5045
|
}
|
|
5046
5046
|
function v(y) {
|
|
5047
|
-
return c || y !== null && y !== 41 && !
|
|
5047
|
+
return c || y !== null && y !== 41 && !Ct(y) ? c < A && y === 40 ? (e.consume(y), c++, v) : y === 41 ? (e.consume(y), c--, v) : y === null || y === 32 || y === 40 || os(y) ? r(y) : (e.consume(y), y === 92 ? D : v) : (e.exit("chunkString"), e.exit(a), e.exit(i), e.exit(n), t(y));
|
|
5048
5048
|
}
|
|
5049
5049
|
function D(y) {
|
|
5050
5050
|
return y === 40 || y === 41 || y === 92 ? (e.consume(y), v) : v(y);
|
|
@@ -5057,10 +5057,10 @@ function tl(e, t, r, n, o, s) {
|
|
|
5057
5057
|
return e.enter(n), e.enter(o), e.consume(f), e.exit(o), e.enter(s), A;
|
|
5058
5058
|
};
|
|
5059
5059
|
function A(f) {
|
|
5060
|
-
return l > 999 || f === null || f === 91 || f === 93 && !a || f === 94 && !l && "_hiddenFootnoteSupport" in i.parser.constructs ? r(f) : f === 93 ? (e.exit(s), e.enter(o), e.consume(f), e.exit(o), e.exit(n), t) :
|
|
5060
|
+
return l > 999 || f === null || f === 91 || f === 93 && !a || f === 94 && !l && "_hiddenFootnoteSupport" in i.parser.constructs ? r(f) : f === 93 ? (e.exit(s), e.enter(o), e.consume(f), e.exit(o), e.exit(n), t) : ve(f) ? (e.enter("lineEnding"), e.consume(f), e.exit("lineEnding"), A) : (e.enter("chunkString", { contentType: "string" }), c(f));
|
|
5061
5061
|
}
|
|
5062
5062
|
function c(f) {
|
|
5063
|
-
return f === null || f === 91 || f === 93 ||
|
|
5063
|
+
return f === null || f === 91 || f === 93 || ve(f) || l++ > 999 ? (e.exit("chunkString"), A(f)) : (e.consume(f), a || (a = !Fe(f)), f === 92 ? p : c);
|
|
5064
5064
|
}
|
|
5065
5065
|
function p(f) {
|
|
5066
5066
|
return f === 91 || f === 92 || f === 93 ? (e.consume(f), l++, c) : c(f);
|
|
@@ -5075,10 +5075,10 @@ function nl(e, t, r, n, o, s) {
|
|
|
5075
5075
|
return p === i ? (e.enter(o), e.consume(p), e.exit(o), e.exit(n), t) : (e.enter(s), l(p));
|
|
5076
5076
|
}
|
|
5077
5077
|
function l(p) {
|
|
5078
|
-
return p === i ? (e.exit(s), a(i)) : p === null ? r(p) :
|
|
5078
|
+
return p === i ? (e.exit(s), a(i)) : p === null ? r(p) : ve(p) ? (e.enter("lineEnding"), e.consume(p), e.exit("lineEnding"), We(e, l, "linePrefix")) : (e.enter("chunkString", { contentType: "string" }), A(p));
|
|
5079
5079
|
}
|
|
5080
5080
|
function A(p) {
|
|
5081
|
-
return p === i || p === null ||
|
|
5081
|
+
return p === i || p === null || ve(p) ? (e.exit("chunkString"), l(p)) : (e.consume(p), p === 92 ? c : A);
|
|
5082
5082
|
}
|
|
5083
5083
|
function c(p) {
|
|
5084
5084
|
return p === i || p === 92 ? (e.consume(p), A) : A(p);
|
|
@@ -5087,7 +5087,7 @@ function nl(e, t, r, n, o, s) {
|
|
|
5087
5087
|
function mr(e, t) {
|
|
5088
5088
|
let r;
|
|
5089
5089
|
return function n(o) {
|
|
5090
|
-
return
|
|
5090
|
+
return ve(o) ? (e.enter("lineEnding"), e.consume(o), e.exit("lineEnding"), r = !0, n) : Fe(o) ? We(e, n, r ? "linePrefix" : "lineSuffix")(o) : t(o);
|
|
5091
5091
|
};
|
|
5092
5092
|
}
|
|
5093
5093
|
const ou = { name: "definition", tokenize: function(e, t, r) {
|
|
@@ -5102,7 +5102,7 @@ const ou = { name: "definition", tokenize: function(e, t, r) {
|
|
|
5102
5102
|
return o = Yn(n.sliceSerialize(n.events[n.events.length - 1][1]).slice(1, -1)), p === 58 ? (e.enter("definitionMarker"), e.consume(p), e.exit("definitionMarker"), i) : r(p);
|
|
5103
5103
|
}
|
|
5104
5104
|
function i(p) {
|
|
5105
|
-
return
|
|
5105
|
+
return Ct(p) ? mr(e, a)(p) : a(p);
|
|
5106
5106
|
}
|
|
5107
5107
|
function a(p) {
|
|
5108
5108
|
return el(e, l, r, "definitionDestination", "definitionDestinationLiteral", "definitionDestinationLiteralMarker", "definitionDestinationRaw", "definitionDestinationString")(p);
|
|
@@ -5114,11 +5114,11 @@ const ou = { name: "definition", tokenize: function(e, t, r) {
|
|
|
5114
5114
|
return Fe(p) ? We(e, c, "whitespace")(p) : c(p);
|
|
5115
5115
|
}
|
|
5116
5116
|
function c(p) {
|
|
5117
|
-
return p === null ||
|
|
5117
|
+
return p === null || ve(p) ? (e.exit("definition"), n.parser.defined.push(o), t(p)) : r(p);
|
|
5118
5118
|
}
|
|
5119
5119
|
} }, su = { partial: !0, tokenize: function(e, t, r) {
|
|
5120
5120
|
return function(i) {
|
|
5121
|
-
return
|
|
5121
|
+
return Ct(i) ? mr(e, n)(i) : r(i);
|
|
5122
5122
|
};
|
|
5123
5123
|
function n(i) {
|
|
5124
5124
|
return nl(e, o, r, "definitionTitle", "definitionTitleMarker", "definitionTitleString")(i);
|
|
@@ -5127,14 +5127,14 @@ const ou = { name: "definition", tokenize: function(e, t, r) {
|
|
|
5127
5127
|
return Fe(i) ? We(e, s, "whitespace")(i) : s(i);
|
|
5128
5128
|
}
|
|
5129
5129
|
function s(i) {
|
|
5130
|
-
return i === null ||
|
|
5130
|
+
return i === null || ve(i) ? t(i) : r(i);
|
|
5131
5131
|
}
|
|
5132
5132
|
} }, iu = { name: "hardBreakEscape", tokenize: function(e, t, r) {
|
|
5133
5133
|
return function(o) {
|
|
5134
5134
|
return e.enter("hardBreakEscape"), e.consume(o), n;
|
|
5135
5135
|
};
|
|
5136
5136
|
function n(o) {
|
|
5137
|
-
return
|
|
5137
|
+
return ve(o) ? (e.exit("hardBreakEscape"), t(o)) : r(o);
|
|
5138
5138
|
}
|
|
5139
5139
|
} }, au = { name: "headingAtx", resolve: function(e, t) {
|
|
5140
5140
|
let r, n, o = e.length - 2, s = 3;
|
|
@@ -5147,16 +5147,16 @@ const ou = { name: "definition", tokenize: function(e, t, r) {
|
|
|
5147
5147
|
})(l);
|
|
5148
5148
|
};
|
|
5149
5149
|
function o(l) {
|
|
5150
|
-
return l === 35 && n++ < 6 ? (e.consume(l), o) : l === null ||
|
|
5150
|
+
return l === 35 && n++ < 6 ? (e.consume(l), o) : l === null || Ct(l) ? (e.exit("atxHeadingSequence"), s(l)) : r(l);
|
|
5151
5151
|
}
|
|
5152
5152
|
function s(l) {
|
|
5153
|
-
return l === 35 ? (e.enter("atxHeadingSequence"), i(l)) : l === null ||
|
|
5153
|
+
return l === 35 ? (e.enter("atxHeadingSequence"), i(l)) : l === null || ve(l) ? (e.exit("atxHeading"), t(l)) : Fe(l) ? We(e, s, "whitespace")(l) : (e.enter("atxHeadingText"), a(l));
|
|
5154
5154
|
}
|
|
5155
5155
|
function i(l) {
|
|
5156
5156
|
return l === 35 ? (e.consume(l), i) : (e.exit("atxHeadingSequence"), s(l));
|
|
5157
5157
|
}
|
|
5158
5158
|
function a(l) {
|
|
5159
|
-
return l === null || l === 35 ||
|
|
5159
|
+
return l === null || l === 35 || Ct(l) ? (e.exit("atxHeadingText"), s(l)) : (e.consume(l), a);
|
|
5160
5160
|
}
|
|
5161
5161
|
} }, lu = ["address", "article", "aside", "base", "basefont", "blockquote", "body", "caption", "center", "col", "colgroup", "dd", "details", "dialog", "dir", "div", "dl", "dt", "fieldset", "figcaption", "figure", "footer", "form", "frame", "frameset", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hr", "html", "iframe", "legend", "li", "link", "main", "menu", "menuitem", "nav", "noframes", "ol", "optgroup", "option", "p", "param", "search", "section", "summary", "table", "tbody", "td", "tfoot", "th", "thead", "title", "tr", "track", "ul"], Ci = ["pre", "script", "style", "textarea"], Au = { concrete: !0, name: "htmlFlow", resolveTo: function(e) {
|
|
5162
5162
|
let t = e.length;
|
|
@@ -5186,9 +5186,9 @@ const ou = { name: "definition", tokenize: function(e, t, r) {
|
|
|
5186
5186
|
return an(B) ? (e.consume(B), i = String.fromCharCode(B), v) : r(B);
|
|
5187
5187
|
}
|
|
5188
5188
|
function v(B) {
|
|
5189
|
-
if (B === null || B === 47 || B === 62 ||
|
|
5189
|
+
if (B === null || B === 47 || B === 62 || Ct(B)) {
|
|
5190
5190
|
const ae = B === 47, fe = i.toLowerCase();
|
|
5191
|
-
return ae || s || !Ci.includes(fe) ? lu.includes(i.toLowerCase()) ? (o = 6, ae ? (e.consume(B), D) : n.interrupt ? t(B) : H(B)) : (o = 7, n.interrupt && !n.parser.lazy[n.now().line] ? r(B) : s ? y(B) :
|
|
5191
|
+
return ae || s || !Ci.includes(fe) ? lu.includes(i.toLowerCase()) ? (o = 6, ae ? (e.consume(B), D) : n.interrupt ? t(B) : H(B)) : (o = 7, n.interrupt && !n.parser.lazy[n.now().line] ? r(B) : s ? y(B) : k(B)) : (o = 1, n.interrupt ? t(B) : H(B));
|
|
5192
5192
|
}
|
|
5193
5193
|
return B === 45 || Mt(B) ? (e.consume(B), i += String.fromCharCode(B), v) : r(B);
|
|
5194
5194
|
}
|
|
@@ -5198,35 +5198,35 @@ const ou = { name: "definition", tokenize: function(e, t, r) {
|
|
|
5198
5198
|
function y(B) {
|
|
5199
5199
|
return Fe(B) ? (e.consume(B), y) : U(B);
|
|
5200
5200
|
}
|
|
5201
|
-
function
|
|
5202
|
-
return B === 47 ? (e.consume(B), U) : B === 58 || B === 95 || an(B) ? (e.consume(B), I) : Fe(B) ? (e.consume(B),
|
|
5201
|
+
function k(B) {
|
|
5202
|
+
return B === 47 ? (e.consume(B), U) : B === 58 || B === 95 || an(B) ? (e.consume(B), I) : Fe(B) ? (e.consume(B), k) : U(B);
|
|
5203
5203
|
}
|
|
5204
5204
|
function I(B) {
|
|
5205
5205
|
return B === 45 || B === 46 || B === 58 || B === 95 || Mt(B) ? (e.consume(B), I) : E(B);
|
|
5206
5206
|
}
|
|
5207
5207
|
function E(B) {
|
|
5208
|
-
return B === 61 ? (e.consume(B), T) : Fe(B) ? (e.consume(B), E) :
|
|
5208
|
+
return B === 61 ? (e.consume(B), T) : Fe(B) ? (e.consume(B), E) : k(B);
|
|
5209
5209
|
}
|
|
5210
5210
|
function T(B) {
|
|
5211
5211
|
return B === null || B === 60 || B === 61 || B === 62 || B === 96 ? r(B) : B === 34 || B === 39 ? (e.consume(B), l = B, _) : Fe(B) ? (e.consume(B), T) : Q(B);
|
|
5212
5212
|
}
|
|
5213
5213
|
function _(B) {
|
|
5214
|
-
return B === l ? (e.consume(B), l = null, O) : B === null ||
|
|
5214
|
+
return B === l ? (e.consume(B), l = null, O) : B === null || ve(B) ? r(B) : (e.consume(B), _);
|
|
5215
5215
|
}
|
|
5216
5216
|
function Q(B) {
|
|
5217
|
-
return B === null || B === 34 || B === 39 || B === 47 || B === 60 || B === 61 || B === 62 || B === 96 ||
|
|
5217
|
+
return B === null || B === 34 || B === 39 || B === 47 || B === 60 || B === 61 || B === 62 || B === 96 || Ct(B) ? E(B) : (e.consume(B), Q);
|
|
5218
5218
|
}
|
|
5219
5219
|
function O(B) {
|
|
5220
|
-
return B === 47 || B === 62 || Fe(B) ?
|
|
5220
|
+
return B === 47 || B === 62 || Fe(B) ? k(B) : r(B);
|
|
5221
5221
|
}
|
|
5222
5222
|
function U(B) {
|
|
5223
5223
|
return B === 62 ? (e.consume(B), W) : r(B);
|
|
5224
5224
|
}
|
|
5225
5225
|
function W(B) {
|
|
5226
|
-
return B === null ||
|
|
5226
|
+
return B === null || ve(B) ? H(B) : Fe(B) ? (e.consume(B), W) : r(B);
|
|
5227
5227
|
}
|
|
5228
5228
|
function H(B) {
|
|
5229
|
-
return B === 45 && o === 2 ? (e.consume(B), te) : B === 60 && o === 1 ? (e.consume(B), J) : B === 62 && o === 4 ? (e.consume(B),
|
|
5229
|
+
return B === 45 && o === 2 ? (e.consume(B), te) : B === 60 && o === 1 ? (e.consume(B), J) : B === 62 && o === 4 ? (e.consume(B), S) : B === 63 && o === 3 ? (e.consume(B), Z) : B === 93 && o === 5 ? (e.consume(B), Y) : !ve(B) || o !== 6 && o !== 7 ? B === null || ve(B) ? (e.exit("htmlFlowData"), K(B)) : (e.consume(B), H) : (e.exit("htmlFlowData"), e.check(cu, ce, K)(B));
|
|
5230
5230
|
}
|
|
5231
5231
|
function K(B) {
|
|
5232
5232
|
return e.check(uu, L, ce)(B);
|
|
@@ -5235,7 +5235,7 @@ const ou = { name: "definition", tokenize: function(e, t, r) {
|
|
|
5235
5235
|
return e.enter("lineEnding"), e.consume(B), e.exit("lineEnding"), X;
|
|
5236
5236
|
}
|
|
5237
5237
|
function X(B) {
|
|
5238
|
-
return B === null ||
|
|
5238
|
+
return B === null || ve(B) ? K(B) : (e.enter("htmlFlowData"), H(B));
|
|
5239
5239
|
}
|
|
5240
5240
|
function te(B) {
|
|
5241
5241
|
return B === 45 ? (e.consume(B), Z) : H(B);
|
|
@@ -5246,7 +5246,7 @@ const ou = { name: "definition", tokenize: function(e, t, r) {
|
|
|
5246
5246
|
function re(B) {
|
|
5247
5247
|
if (B === 62) {
|
|
5248
5248
|
const ae = i.toLowerCase();
|
|
5249
|
-
return Ci.includes(ae) ? (e.consume(B),
|
|
5249
|
+
return Ci.includes(ae) ? (e.consume(B), S) : H(B);
|
|
5250
5250
|
}
|
|
5251
5251
|
return an(B) && i.length < 8 ? (e.consume(B), i += String.fromCharCode(B), re) : H(B);
|
|
5252
5252
|
}
|
|
@@ -5254,10 +5254,10 @@ const ou = { name: "definition", tokenize: function(e, t, r) {
|
|
|
5254
5254
|
return B === 93 ? (e.consume(B), Z) : H(B);
|
|
5255
5255
|
}
|
|
5256
5256
|
function Z(B) {
|
|
5257
|
-
return B === 62 ? (e.consume(B),
|
|
5257
|
+
return B === 62 ? (e.consume(B), S) : B === 45 && o === 2 ? (e.consume(B), Z) : H(B);
|
|
5258
5258
|
}
|
|
5259
|
-
function
|
|
5260
|
-
return B === null ||
|
|
5259
|
+
function S(B) {
|
|
5260
|
+
return B === null || ve(B) ? (e.exit("htmlFlowData"), ce(B)) : (e.consume(B), S);
|
|
5261
5261
|
}
|
|
5262
5262
|
function ce(B) {
|
|
5263
5263
|
return e.exit("htmlFlow"), t(B);
|
|
@@ -5269,7 +5269,7 @@ const ou = { name: "definition", tokenize: function(e, t, r) {
|
|
|
5269
5269
|
} }, uu = { partial: !0, tokenize: function(e, t, r) {
|
|
5270
5270
|
const n = this;
|
|
5271
5271
|
return function(s) {
|
|
5272
|
-
return
|
|
5272
|
+
return ve(s) ? (e.enter("lineEnding"), e.consume(s), e.exit("lineEnding"), o) : r(s);
|
|
5273
5273
|
};
|
|
5274
5274
|
function o(s) {
|
|
5275
5275
|
return n.parser.lazy[n.now().line] ? r(s) : t(s);
|
|
@@ -5277,92 +5277,92 @@ const ou = { name: "definition", tokenize: function(e, t, r) {
|
|
|
5277
5277
|
} }, du = { name: "htmlText", tokenize: function(e, t, r) {
|
|
5278
5278
|
const n = this;
|
|
5279
5279
|
let o, s, i;
|
|
5280
|
-
return function(
|
|
5281
|
-
return e.enter("htmlText"), e.enter("htmlTextData"), e.consume(
|
|
5280
|
+
return function(S) {
|
|
5281
|
+
return e.enter("htmlText"), e.enter("htmlTextData"), e.consume(S), a;
|
|
5282
5282
|
};
|
|
5283
|
-
function a(
|
|
5284
|
-
return
|
|
5283
|
+
function a(S) {
|
|
5284
|
+
return S === 33 ? (e.consume(S), l) : S === 47 ? (e.consume(S), T) : S === 63 ? (e.consume(S), I) : an(S) ? (e.consume(S), O) : r(S);
|
|
5285
5285
|
}
|
|
5286
|
-
function l(
|
|
5287
|
-
return
|
|
5286
|
+
function l(S) {
|
|
5287
|
+
return S === 45 ? (e.consume(S), A) : S === 91 ? (e.consume(S), s = 0, m) : an(S) ? (e.consume(S), k) : r(S);
|
|
5288
5288
|
}
|
|
5289
|
-
function A(
|
|
5290
|
-
return
|
|
5289
|
+
function A(S) {
|
|
5290
|
+
return S === 45 ? (e.consume(S), f) : r(S);
|
|
5291
5291
|
}
|
|
5292
|
-
function c(
|
|
5293
|
-
return
|
|
5292
|
+
function c(S) {
|
|
5293
|
+
return S === null ? r(S) : S === 45 ? (e.consume(S), p) : ve(S) ? (i = c, re(S)) : (e.consume(S), c);
|
|
5294
5294
|
}
|
|
5295
|
-
function p(
|
|
5296
|
-
return
|
|
5295
|
+
function p(S) {
|
|
5296
|
+
return S === 45 ? (e.consume(S), f) : c(S);
|
|
5297
5297
|
}
|
|
5298
|
-
function f(
|
|
5299
|
-
return
|
|
5298
|
+
function f(S) {
|
|
5299
|
+
return S === 62 ? J(S) : S === 45 ? p(S) : c(S);
|
|
5300
5300
|
}
|
|
5301
|
-
function m(
|
|
5302
|
-
return
|
|
5301
|
+
function m(S) {
|
|
5302
|
+
return S === "CDATA[".charCodeAt(s++) ? (e.consume(S), s === 6 ? v : m) : r(S);
|
|
5303
5303
|
}
|
|
5304
|
-
function v(
|
|
5305
|
-
return
|
|
5304
|
+
function v(S) {
|
|
5305
|
+
return S === null ? r(S) : S === 93 ? (e.consume(S), D) : ve(S) ? (i = v, re(S)) : (e.consume(S), v);
|
|
5306
5306
|
}
|
|
5307
|
-
function D(
|
|
5308
|
-
return
|
|
5307
|
+
function D(S) {
|
|
5308
|
+
return S === 93 ? (e.consume(S), y) : v(S);
|
|
5309
5309
|
}
|
|
5310
|
-
function y(
|
|
5311
|
-
return
|
|
5310
|
+
function y(S) {
|
|
5311
|
+
return S === 62 ? J(S) : S === 93 ? (e.consume(S), y) : v(S);
|
|
5312
5312
|
}
|
|
5313
|
-
function S
|
|
5314
|
-
return
|
|
5313
|
+
function k(S) {
|
|
5314
|
+
return S === null || S === 62 ? J(S) : ve(S) ? (i = k, re(S)) : (e.consume(S), k);
|
|
5315
5315
|
}
|
|
5316
|
-
function I(
|
|
5317
|
-
return
|
|
5316
|
+
function I(S) {
|
|
5317
|
+
return S === null ? r(S) : S === 63 ? (e.consume(S), E) : ve(S) ? (i = I, re(S)) : (e.consume(S), I);
|
|
5318
5318
|
}
|
|
5319
|
-
function E(
|
|
5320
|
-
return
|
|
5319
|
+
function E(S) {
|
|
5320
|
+
return S === 62 ? J(S) : I(S);
|
|
5321
5321
|
}
|
|
5322
|
-
function T(
|
|
5323
|
-
return an(
|
|
5322
|
+
function T(S) {
|
|
5323
|
+
return an(S) ? (e.consume(S), _) : r(S);
|
|
5324
5324
|
}
|
|
5325
|
-
function _(
|
|
5326
|
-
return
|
|
5325
|
+
function _(S) {
|
|
5326
|
+
return S === 45 || Mt(S) ? (e.consume(S), _) : Q(S);
|
|
5327
5327
|
}
|
|
5328
|
-
function Q(
|
|
5329
|
-
return
|
|
5328
|
+
function Q(S) {
|
|
5329
|
+
return ve(S) ? (i = Q, re(S)) : Fe(S) ? (e.consume(S), Q) : J(S);
|
|
5330
5330
|
}
|
|
5331
|
-
function O(
|
|
5332
|
-
return
|
|
5331
|
+
function O(S) {
|
|
5332
|
+
return S === 45 || Mt(S) ? (e.consume(S), O) : S === 47 || S === 62 || Ct(S) ? U(S) : r(S);
|
|
5333
5333
|
}
|
|
5334
|
-
function U(
|
|
5335
|
-
return
|
|
5334
|
+
function U(S) {
|
|
5335
|
+
return S === 47 ? (e.consume(S), J) : S === 58 || S === 95 || an(S) ? (e.consume(S), W) : ve(S) ? (i = U, re(S)) : Fe(S) ? (e.consume(S), U) : J(S);
|
|
5336
5336
|
}
|
|
5337
|
-
function W(
|
|
5338
|
-
return
|
|
5337
|
+
function W(S) {
|
|
5338
|
+
return S === 45 || S === 46 || S === 58 || S === 95 || Mt(S) ? (e.consume(S), W) : H(S);
|
|
5339
5339
|
}
|
|
5340
|
-
function H(
|
|
5341
|
-
return
|
|
5340
|
+
function H(S) {
|
|
5341
|
+
return S === 61 ? (e.consume(S), K) : ve(S) ? (i = H, re(S)) : Fe(S) ? (e.consume(S), H) : U(S);
|
|
5342
5342
|
}
|
|
5343
|
-
function K(
|
|
5344
|
-
return
|
|
5343
|
+
function K(S) {
|
|
5344
|
+
return S === null || S === 60 || S === 61 || S === 62 || S === 96 ? r(S) : S === 34 || S === 39 ? (e.consume(S), o = S, L) : ve(S) ? (i = K, re(S)) : Fe(S) ? (e.consume(S), K) : (e.consume(S), X);
|
|
5345
5345
|
}
|
|
5346
|
-
function L(
|
|
5347
|
-
return
|
|
5346
|
+
function L(S) {
|
|
5347
|
+
return S === o ? (e.consume(S), o = void 0, te) : S === null ? r(S) : ve(S) ? (i = L, re(S)) : (e.consume(S), L);
|
|
5348
5348
|
}
|
|
5349
|
-
function X(
|
|
5350
|
-
return
|
|
5349
|
+
function X(S) {
|
|
5350
|
+
return S === null || S === 34 || S === 39 || S === 60 || S === 61 || S === 96 ? r(S) : S === 47 || S === 62 || Ct(S) ? U(S) : (e.consume(S), X);
|
|
5351
5351
|
}
|
|
5352
|
-
function te(
|
|
5353
|
-
return
|
|
5352
|
+
function te(S) {
|
|
5353
|
+
return S === 47 || S === 62 || Ct(S) ? U(S) : r(S);
|
|
5354
5354
|
}
|
|
5355
|
-
function J(
|
|
5356
|
-
return
|
|
5355
|
+
function J(S) {
|
|
5356
|
+
return S === 62 ? (e.consume(S), e.exit("htmlTextData"), e.exit("htmlText"), t) : r(S);
|
|
5357
5357
|
}
|
|
5358
|
-
function re(
|
|
5359
|
-
return e.exit("htmlTextData"), e.enter("lineEnding"), e.consume(
|
|
5358
|
+
function re(S) {
|
|
5359
|
+
return e.exit("htmlTextData"), e.enter("lineEnding"), e.consume(S), e.exit("lineEnding"), Y;
|
|
5360
5360
|
}
|
|
5361
|
-
function Y(
|
|
5362
|
-
return Fe(
|
|
5361
|
+
function Y(S) {
|
|
5362
|
+
return Fe(S) ? We(e, Z, "linePrefix", n.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(S) : Z(S);
|
|
5363
5363
|
}
|
|
5364
|
-
function Z(
|
|
5365
|
-
return e.enter("htmlTextData"), i(
|
|
5364
|
+
function Z(S) {
|
|
5365
|
+
return e.enter("htmlTextData"), i(S);
|
|
5366
5366
|
}
|
|
5367
5367
|
} }, ks = { name: "labelEnd", resolveAll: function(e) {
|
|
5368
5368
|
let t = -1;
|
|
@@ -5415,13 +5415,13 @@ const ou = { name: "definition", tokenize: function(e, t, r) {
|
|
|
5415
5415
|
return e.enter("resource"), e.enter("resourceMarker"), e.consume(c), e.exit("resourceMarker"), n;
|
|
5416
5416
|
};
|
|
5417
5417
|
function n(c) {
|
|
5418
|
-
return
|
|
5418
|
+
return Ct(c) ? mr(e, o)(c) : o(c);
|
|
5419
5419
|
}
|
|
5420
5420
|
function o(c) {
|
|
5421
5421
|
return c === 41 ? A(c) : el(e, s, i, "resourceDestination", "resourceDestinationLiteral", "resourceDestinationLiteralMarker", "resourceDestinationRaw", "resourceDestinationString", 32)(c);
|
|
5422
5422
|
}
|
|
5423
5423
|
function s(c) {
|
|
5424
|
-
return
|
|
5424
|
+
return Ct(c) ? mr(e, a)(c) : A(c);
|
|
5425
5425
|
}
|
|
5426
5426
|
function i(c) {
|
|
5427
5427
|
return r(c);
|
|
@@ -5430,7 +5430,7 @@ const ou = { name: "definition", tokenize: function(e, t, r) {
|
|
|
5430
5430
|
return c === 34 || c === 39 || c === 40 ? nl(e, l, r, "resourceTitle", "resourceTitleMarker", "resourceTitleString")(c) : A(c);
|
|
5431
5431
|
}
|
|
5432
5432
|
function l(c) {
|
|
5433
|
-
return
|
|
5433
|
+
return Ct(c) ? mr(e, A)(c) : A(c);
|
|
5434
5434
|
}
|
|
5435
5435
|
function A(c) {
|
|
5436
5436
|
return c === 41 ? (e.enter("resourceMarker"), e.consume(c), e.exit("resourceMarker"), e.exit("resource"), t) : r(c);
|
|
@@ -5484,12 +5484,12 @@ const ou = { name: "definition", tokenize: function(e, t, r) {
|
|
|
5484
5484
|
})(a);
|
|
5485
5485
|
};
|
|
5486
5486
|
function s(a) {
|
|
5487
|
-
return a === n ? (e.enter("thematicBreakSequence"), i(a)) : o >= 3 && (a === null ||
|
|
5487
|
+
return a === n ? (e.enter("thematicBreakSequence"), i(a)) : o >= 3 && (a === null || ve(a)) ? (e.exit("thematicBreak"), t(a)) : r(a);
|
|
5488
5488
|
}
|
|
5489
5489
|
function i(a) {
|
|
5490
5490
|
return a === n ? (e.consume(a), o++, i) : (e.exit("thematicBreakSequence"), Fe(a) ? We(e, s, "whitespace")(a) : s(a));
|
|
5491
5491
|
}
|
|
5492
|
-
} },
|
|
5492
|
+
} }, St = { continuation: { tokenize: function(e, t, r) {
|
|
5493
5493
|
const n = this;
|
|
5494
5494
|
return n.containerState._closeFlow = void 0, e.check(Ao, function(s) {
|
|
5495
5495
|
return n.containerState.furtherBlankLines = n.containerState.furtherBlankLines || n.containerState.initialBlankLine, We(e, t, "listItemIndent", n.containerState.size + 1)(s);
|
|
@@ -5497,7 +5497,7 @@ const ou = { name: "definition", tokenize: function(e, t, r) {
|
|
|
5497
5497
|
return n.containerState.furtherBlankLines || !Fe(s) ? (n.containerState.furtherBlankLines = void 0, n.containerState.initialBlankLine = void 0, o(s)) : (n.containerState.furtherBlankLines = void 0, n.containerState.initialBlankLine = void 0, e.attempt(vu, t, o)(s));
|
|
5498
5498
|
});
|
|
5499
5499
|
function o(s) {
|
|
5500
|
-
return n.containerState._closeFlow = !0, n.interrupt = void 0, We(e, e.attempt(
|
|
5500
|
+
return n.containerState._closeFlow = !0, n.interrupt = void 0, We(e, e.attempt(St, t, r), "linePrefix", n.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(s);
|
|
5501
5501
|
}
|
|
5502
5502
|
} }, exit: function(e) {
|
|
5503
5503
|
e.exit(this.containerState.type);
|
|
@@ -5567,7 +5567,7 @@ const ou = { name: "definition", tokenize: function(e, t, r) {
|
|
|
5567
5567
|
return a === o ? (e.consume(a), s) : (e.exit("setextHeadingLineSequence"), Fe(a) ? We(e, i, "lineSuffix")(a) : i(a));
|
|
5568
5568
|
}
|
|
5569
5569
|
function i(a) {
|
|
5570
|
-
return a === null ||
|
|
5570
|
+
return a === null || ve(a) ? (e.exit("setextHeadingLine"), t(a)) : r(a);
|
|
5571
5571
|
}
|
|
5572
5572
|
} }, wu = { tokenize: function(e) {
|
|
5573
5573
|
const t = this, r = e.attempt(Ao, function(o) {
|
|
@@ -5637,7 +5637,7 @@ function ku(e, t) {
|
|
|
5637
5637
|
}
|
|
5638
5638
|
return e;
|
|
5639
5639
|
}
|
|
5640
|
-
const Su = { 42:
|
|
5640
|
+
const Su = { 42: St, 43: St, 45: St, 48: St, 49: St, 50: St, 51: St, 52: St, 53: St, 54: St, 55: St, 56: St, 57: St, 62: Xa }, Cu = { 91: ou }, Pu = { [-2]: No, [-1]: No, 32: No }, Du = { 35: au, 42: ro, 45: [Pi, ro], 60: Au, 61: Pi, 95: ro, 96: Si, 126: Si }, Bu = { 38: Za, 92: Ja }, Iu = { [-5]: Lo, [-4]: Lo, [-3]: Lo, 33: gu, 38: Za, 42: is, 60: [Jc, du], 91: mu, 92: [iu, Ja], 93: ks, 95: is, 96: $c }, Tu = { null: [is, bu] }, Qu = Object.freeze(Object.defineProperty({ __proto__: null, attentionMarkers: { null: [42, 95] }, contentInitial: Cu, disable: { null: [] }, document: Su, flow: Du, flowInitial: Pu, insideSpan: Tu, string: Bu, text: Iu }, Symbol.toStringTag, { value: "Module" }));
|
|
5641
5641
|
function Mu(e, t, r) {
|
|
5642
5642
|
let n = { _bufferIndex: -1, _index: 0, line: r && r.line || 1, column: r && r.column || 1, offset: r && r.offset || 0 };
|
|
5643
5643
|
const o = {}, s = [];
|
|
@@ -5645,7 +5645,7 @@ function Mu(e, t, r) {
|
|
|
5645
5645
|
const l = { attempt: D(function(I, E) {
|
|
5646
5646
|
y(I, E.from);
|
|
5647
5647
|
}), check: D(v), consume: function(I) {
|
|
5648
|
-
|
|
5648
|
+
ve(I) ? (n.line++, n.column = 1, n.offset += I === -3 ? 2 : 1, k()) : I !== -1 && (n.column++, n.offset++), n._bufferIndex < 0 ? n._index++ : (n._bufferIndex++, n._bufferIndex === i[n._index].length && (n._bufferIndex = -1, n._index++)), A.previous = I;
|
|
5649
5649
|
}, enter: function(I, E) {
|
|
5650
5650
|
const T = E || {};
|
|
5651
5651
|
return T.type = I, T.start = f(), A.events.push(["enter", T, A]), a.push(T), T;
|
|
@@ -5653,7 +5653,7 @@ function Mu(e, t, r) {
|
|
|
5653
5653
|
const E = a.pop();
|
|
5654
5654
|
return E.end = f(), A.events.push(["exit", E, A]), E;
|
|
5655
5655
|
}, interrupt: D(v, { interrupt: !0 }) }, A = { code: null, containerState: {}, defineSkip: function(I) {
|
|
5656
|
-
o[I.line] = I.column,
|
|
5656
|
+
o[I.line] = I.column, k();
|
|
5657
5657
|
}, events: [], now: f, parser: e, previous: null, sliceSerialize: function(I, E) {
|
|
5658
5658
|
return (function(T, _) {
|
|
5659
5659
|
let Q = -1;
|
|
@@ -5732,8 +5732,8 @@ function Mu(e, t, r) {
|
|
|
5732
5732
|
return Array.isArray(T) ? K(T) : "tokenize" in T ? K([T]) : /* @__PURE__ */ (function(J) {
|
|
5733
5733
|
return re;
|
|
5734
5734
|
function re(Y) {
|
|
5735
|
-
const Z = Y !== null && J[Y],
|
|
5736
|
-
return K([...Array.isArray(Z) ? Z : Z ? [Z] : [], ...Array.isArray(
|
|
5735
|
+
const Z = Y !== null && J[Y], S = Y !== null && J.null;
|
|
5736
|
+
return K([...Array.isArray(Z) ? Z : Z ? [Z] : [], ...Array.isArray(S) ? S : S ? [S] : []])(Y);
|
|
5737
5737
|
}
|
|
5738
5738
|
})(T);
|
|
5739
5739
|
function K(J) {
|
|
@@ -5742,10 +5742,10 @@ function Mu(e, t, r) {
|
|
|
5742
5742
|
function L(J) {
|
|
5743
5743
|
return function(re) {
|
|
5744
5744
|
return H = (function() {
|
|
5745
|
-
const Y = f(), Z = A.previous,
|
|
5745
|
+
const Y = f(), Z = A.previous, S = A.currentConstruct, ce = A.events.length, B = Array.from(a);
|
|
5746
5746
|
return { from: ce, restore: ae };
|
|
5747
5747
|
function ae() {
|
|
5748
|
-
n = Y, A.previous = Z, A.currentConstruct =
|
|
5748
|
+
n = Y, A.previous = Z, A.currentConstruct = S, A.events.length = ce, a = B, k();
|
|
5749
5749
|
}
|
|
5750
5750
|
})(), W = J, J.partial || (A.currentConstruct = J), J.name && A.parser.constructs.disable.null.includes(J.name) ? te() : J.tokenize.call(E ? Object.assign(Object.create(A), E) : A, l, X, te)(re);
|
|
5751
5751
|
};
|
|
@@ -5761,7 +5761,7 @@ function Mu(e, t, r) {
|
|
|
5761
5761
|
function y(I, E) {
|
|
5762
5762
|
I.resolveAll && !s.includes(I) && s.push(I), I.resolve && An(A.events, E, A.events.length - E, I.resolve(A.events.slice(E), A)), I.resolveTo && (A.events = I.resolveTo(A.events, A));
|
|
5763
5763
|
}
|
|
5764
|
-
function
|
|
5764
|
+
function k() {
|
|
5765
5765
|
n.line in o && n.column < 2 && (n.column = o[n.line], n.offset += o[n.line] - 1);
|
|
5766
5766
|
}
|
|
5767
5767
|
}
|
|
@@ -5777,7 +5777,7 @@ function Ou(e, t, r) {
|
|
|
5777
5777
|
const sl = {}.hasOwnProperty;
|
|
5778
5778
|
function Ru(e, t, r) {
|
|
5779
5779
|
return typeof t != "string" && (r = t, t = void 0), (function(n) {
|
|
5780
|
-
const o = { transforms: [], canContainEols: ["emphasis", "fragment", "heading", "paragraph", "strong"], enter: { autolink: l(_e), autolinkProtocol: L, autolinkEmail: L, atxHeading: l(Le), blockQuote: l(oe), characterEscape: L, characterReference: L, codeFenced: l(Ee), codeFencedFenceInfo: A, codeFencedFenceMeta: A, codeIndented: l(Ee, A), codeText: l(we, A), codeTextData: L, data: L, codeFlowValue: L, definition: l(Ne), definitionDestinationString: A, definitionLabelString: A, definitionTitleString: A, emphasis: l(
|
|
5780
|
+
const o = { transforms: [], canContainEols: ["emphasis", "fragment", "heading", "paragraph", "strong"], enter: { autolink: l(_e), autolinkProtocol: L, autolinkEmail: L, atxHeading: l(Le), blockQuote: l(oe), characterEscape: L, characterReference: L, codeFenced: l(Ee), codeFencedFenceInfo: A, codeFencedFenceMeta: A, codeIndented: l(Ee, A), codeText: l(we, A), codeTextData: L, data: L, codeFlowValue: L, definition: l(Ne), definitionDestinationString: A, definitionLabelString: A, definitionTitleString: A, emphasis: l(Me), hardBreakEscape: l(Ue), hardBreakTrailing: l(Ue), htmlFlow: l(Ze, A), htmlFlowData: L, htmlText: l(Ze, A), htmlTextData: L, image: l(zt), label: A, link: l(_e), listItem: l(qt), listItemValue: D, listOrdered: l(xe, v), listUnordered: l(xe), paragraph: l(ht), reference: Oe, referenceString: A, resourceDestinationString: A, resourceTitleString: A, setextHeading: l(Le), strong: l(Gt), thematicBreak: l(lt) }, exit: { atxHeading: p(), atxHeadingSequence: U, autolink: p(), autolinkEmail: ie, autolinkProtocol: Je, blockQuote: p(), characterEscapeValue: X, characterReferenceMarkerHexadecimal: nt, characterReferenceMarkerNumeric: nt, characterReferenceValue: Re, characterReference: je, codeFenced: p(E), codeFencedFence: I, codeFencedFenceInfo: y, codeFencedFenceMeta: k, codeFlowValue: X, codeIndented: p(T), codeText: p(Z), codeTextData: X, data: X, definition: p(), definitionDestinationString: O, definitionLabelString: _, definitionTitleString: Q, emphasis: p(), hardBreakEscape: p(J), hardBreakTrailing: p(J), htmlFlow: p(re), htmlFlowData: X, htmlText: p(Y), htmlTextData: X, image: p(ce), label: ae, labelText: B, lineEnding: te, link: p(S), listItem: p(), listOrdered: p(), listUnordered: p(), paragraph: p(), referenceString: Ie, resourceDestinationString: fe, resourceTitleString: de, resource: be, setextHeading: p(K), setextHeadingLineSequence: H, setextHeadingText: W, strong: p(), thematicBreak: p() } };
|
|
5781
5781
|
il(o, (n || {}).mdastExtensions || []);
|
|
5782
5782
|
const s = {};
|
|
5783
5783
|
return i;
|
|
@@ -5798,17 +5798,17 @@ function Ru(e, t, r) {
|
|
|
5798
5798
|
return Ae;
|
|
5799
5799
|
}
|
|
5800
5800
|
function a(z, Ae, se) {
|
|
5801
|
-
let Ce, ue, $e, ze,
|
|
5802
|
-
for (; ++
|
|
5803
|
-
const
|
|
5804
|
-
switch (
|
|
5801
|
+
let Ce, ue, $e, ze, Qe = Ae - 1, Ke = -1, Ve = !1;
|
|
5802
|
+
for (; ++Qe <= se; ) {
|
|
5803
|
+
const me = z[Qe];
|
|
5804
|
+
switch (me[1].type) {
|
|
5805
5805
|
case "listUnordered":
|
|
5806
5806
|
case "listOrdered":
|
|
5807
5807
|
case "blockQuote":
|
|
5808
|
-
|
|
5808
|
+
me[0] === "enter" ? Ke++ : Ke--, ze = void 0;
|
|
5809
5809
|
break;
|
|
5810
5810
|
case "lineEndingBlank":
|
|
5811
|
-
|
|
5811
|
+
me[0] === "enter" && (Ce && !ze && !Ke && !$e && ($e = Qe), ze = void 0);
|
|
5812
5812
|
break;
|
|
5813
5813
|
case "linePrefix":
|
|
5814
5814
|
case "listItemValue":
|
|
@@ -5819,9 +5819,9 @@ function Ru(e, t, r) {
|
|
|
5819
5819
|
default:
|
|
5820
5820
|
ze = void 0;
|
|
5821
5821
|
}
|
|
5822
|
-
if (!Ke &&
|
|
5822
|
+
if (!Ke && me[0] === "enter" && me[1].type === "listItemPrefix" || Ke === -1 && me[0] === "exit" && (me[1].type === "listUnordered" || me[1].type === "listOrdered")) {
|
|
5823
5823
|
if (Ce) {
|
|
5824
|
-
let st =
|
|
5824
|
+
let st = Qe;
|
|
5825
5825
|
for (ue = void 0; st--; ) {
|
|
5826
5826
|
const tt = z[st];
|
|
5827
5827
|
if (tt[1].type === "lineEnding" || tt[1].type === "lineEndingBlank") {
|
|
@@ -5829,11 +5829,11 @@ function Ru(e, t, r) {
|
|
|
5829
5829
|
ue && (z[ue][1].type = "lineEndingBlank", Ve = !0), tt[1].type = "lineEnding", ue = st;
|
|
5830
5830
|
} else if (tt[1].type !== "linePrefix" && tt[1].type !== "blockQuotePrefix" && tt[1].type !== "blockQuotePrefixWhitespace" && tt[1].type !== "blockQuoteMarker" && tt[1].type !== "listItemIndent") break;
|
|
5831
5831
|
}
|
|
5832
|
-
$e && (!ue || $e < ue) && (Ce._spread = !0), Ce.end = Object.assign({}, ue ? z[ue][1].start :
|
|
5832
|
+
$e && (!ue || $e < ue) && (Ce._spread = !0), Ce.end = Object.assign({}, ue ? z[ue][1].start : me[1].end), z.splice(ue || Qe, 0, ["exit", Ce, me[2]]), Qe++, se++;
|
|
5833
5833
|
}
|
|
5834
|
-
if (
|
|
5835
|
-
const st = { type: "listItem", _spread: !1, start: Object.assign({},
|
|
5836
|
-
Ce = st, z.splice(
|
|
5834
|
+
if (me[1].type === "listItemPrefix") {
|
|
5835
|
+
const st = { type: "listItem", _spread: !1, start: Object.assign({}, me[1].start), end: void 0 };
|
|
5836
|
+
Ce = st, z.splice(Qe, 0, ["enter", st, me[2]]), Qe++, se++, $e = void 0, ze = !0;
|
|
5837
5837
|
}
|
|
5838
5838
|
}
|
|
5839
5839
|
}
|
|
@@ -5877,7 +5877,7 @@ function Ru(e, t, r) {
|
|
|
5877
5877
|
const z = this.resume();
|
|
5878
5878
|
this.stack[this.stack.length - 1].lang = z;
|
|
5879
5879
|
}
|
|
5880
|
-
function
|
|
5880
|
+
function k() {
|
|
5881
5881
|
const z = this.resume();
|
|
5882
5882
|
this.stack[this.stack.length - 1].meta = z;
|
|
5883
5883
|
}
|
|
@@ -5923,7 +5923,7 @@ function Ru(e, t, r) {
|
|
|
5923
5923
|
function L(z) {
|
|
5924
5924
|
const Ae = this.stack[this.stack.length - 1].children;
|
|
5925
5925
|
let se = Ae[Ae.length - 1];
|
|
5926
|
-
(!se || se.type !== "text") && (se =
|
|
5926
|
+
(!se || se.type !== "text") && (se = vt(), se.position = { start: En(z.start), end: void 0 }, Ae.push(se)), this.stack.push(se);
|
|
5927
5927
|
}
|
|
5928
5928
|
function X(z) {
|
|
5929
5929
|
const Ae = this.stack.pop();
|
|
@@ -5950,7 +5950,7 @@ function Ru(e, t, r) {
|
|
|
5950
5950
|
const z = this.resume();
|
|
5951
5951
|
this.stack[this.stack.length - 1].value = z;
|
|
5952
5952
|
}
|
|
5953
|
-
function
|
|
5953
|
+
function S() {
|
|
5954
5954
|
const z = this.stack[this.stack.length - 1];
|
|
5955
5955
|
if (this.data.inReference) {
|
|
5956
5956
|
const Ae = this.data.referenceType || "shortcut";
|
|
@@ -6026,7 +6026,7 @@ function Ru(e, t, r) {
|
|
|
6026
6026
|
function Ne() {
|
|
6027
6027
|
return { type: "definition", identifier: "", label: null, title: null, url: "" };
|
|
6028
6028
|
}
|
|
6029
|
-
function
|
|
6029
|
+
function Me() {
|
|
6030
6030
|
return { type: "emphasis", children: [] };
|
|
6031
6031
|
}
|
|
6032
6032
|
function Le() {
|
|
@@ -6056,7 +6056,7 @@ function Ru(e, t, r) {
|
|
|
6056
6056
|
function Gt() {
|
|
6057
6057
|
return { type: "strong", children: [] };
|
|
6058
6058
|
}
|
|
6059
|
-
function
|
|
6059
|
+
function vt() {
|
|
6060
6060
|
return { type: "text", value: "" };
|
|
6061
6061
|
}
|
|
6062
6062
|
function lt() {
|
|
@@ -6452,7 +6452,7 @@ const Mi = typeof self == "object" ? self : globalThis, _i = (e) => (/* @__PURE_
|
|
|
6452
6452
|
}
|
|
6453
6453
|
case 5: {
|
|
6454
6454
|
const v = [], D = l([p, v], c);
|
|
6455
|
-
for (const [y,
|
|
6455
|
+
for (const [y, k] of c) (o || !Kr(ur(y)) && !Kr(ur(k))) && v.push([A(y), A(k)]);
|
|
6456
6456
|
return D;
|
|
6457
6457
|
}
|
|
6458
6458
|
case 6: {
|
|
@@ -6529,13 +6529,13 @@ function Vu(e, t, r, n) {
|
|
|
6529
6529
|
return f;
|
|
6530
6530
|
function f() {
|
|
6531
6531
|
let m, v, D, y = Ri;
|
|
6532
|
-
if ((!t || s(l, A, c[c.length - 1] || void 0)) && (y = (function(
|
|
6533
|
-
return Array.isArray(
|
|
6532
|
+
if ((!t || s(l, A, c[c.length - 1] || void 0)) && (y = (function(k) {
|
|
6533
|
+
return Array.isArray(k) ? k : typeof k == "number" ? [Wu, k] : k == null ? Ri : [k];
|
|
6534
6534
|
})(r(l, c)), y[0] === Ni)) return y;
|
|
6535
6535
|
if ("children" in l && l.children) {
|
|
6536
|
-
const
|
|
6537
|
-
if (
|
|
6538
|
-
const I =
|
|
6536
|
+
const k = l;
|
|
6537
|
+
if (k.children && y[0] !== "skip") for (v = (n ? k.children.length : -1) + i, D = c.concat(k); v > -1 && v < k.children.length; ) {
|
|
6538
|
+
const I = k.children[v];
|
|
6539
6539
|
if (m = a(I, v, D)(), m[0] === Ni) return m;
|
|
6540
6540
|
v = typeof m[1] == "number" ? m[1] : v + i;
|
|
6541
6541
|
}
|
|
@@ -6628,9 +6628,9 @@ function Fi(e, t) {
|
|
|
6628
6628
|
for (; ++v < i.footnoteOrder.length; ) {
|
|
6629
6629
|
const D = i.footnoteById.get(i.footnoteOrder[v]);
|
|
6630
6630
|
if (!D) continue;
|
|
6631
|
-
const y = i.all(D),
|
|
6631
|
+
const y = i.all(D), k = String(D.identifier).toUpperCase(), I = Wn(k.toLowerCase());
|
|
6632
6632
|
let E = 0;
|
|
6633
|
-
const T = [], _ = i.footnoteCounts.get(
|
|
6633
|
+
const T = [], _ = i.footnoteCounts.get(k);
|
|
6634
6634
|
for (; _ !== void 0 && ++E <= _; ) {
|
|
6635
6635
|
T.length > 0 && T.push({ type: "text", value: " " });
|
|
6636
6636
|
let U = typeof l == "string" ? l : l(v, E);
|
|
@@ -6683,8 +6683,8 @@ var Fo, Hi, td = (function() {
|
|
|
6683
6683
|
return l[A];
|
|
6684
6684
|
};
|
|
6685
6685
|
return Fo = function l() {
|
|
6686
|
-
var A, c, p, f, m, v, D = arguments[0], y = 1,
|
|
6687
|
-
for (typeof D == "boolean" && (I = D, D = arguments[1] || {}, y = 2), (D == null || typeof D != "object" && typeof D != "function") && (D = {}); y <
|
|
6686
|
+
var A, c, p, f, m, v, D = arguments[0], y = 1, k = arguments.length, I = !1;
|
|
6687
|
+
for (typeof D == "boolean" && (I = D, D = arguments[1] || {}, y = 2), (D == null || typeof D != "object" && typeof D != "function") && (D = {}); y < k; ++y) if ((A = arguments[y]) != null) for (c in A) p = a(D, c), D !== (f = a(A, c)) && (I && f && (s(f) || (m = o(f))) ? (m ? (m = !1, v = p && o(p) ? p : []) : v = p && s(p) ? p : {}, i(D, { name: c, newValue: l(I, v, f) })) : typeof f < "u" && i(D, { name: c, newValue: f }));
|
|
6688
6688
|
return D;
|
|
6689
6689
|
}, Fo;
|
|
6690
6690
|
})();
|
|
@@ -6709,19 +6709,19 @@ function nd() {
|
|
|
6709
6709
|
let f;
|
|
6710
6710
|
return m;
|
|
6711
6711
|
function m(...y) {
|
|
6712
|
-
const
|
|
6712
|
+
const k = c.length > y.length;
|
|
6713
6713
|
let I;
|
|
6714
|
-
|
|
6714
|
+
k && y.push(v);
|
|
6715
6715
|
try {
|
|
6716
6716
|
I = c.apply(this, y);
|
|
6717
6717
|
} catch (E) {
|
|
6718
|
-
if (
|
|
6718
|
+
if (k && f) throw E;
|
|
6719
6719
|
return v(E);
|
|
6720
6720
|
}
|
|
6721
|
-
|
|
6721
|
+
k || (I && I.then && typeof I.then == "function" ? I.then(D, v) : I instanceof Error ? v(I) : D(I));
|
|
6722
6722
|
}
|
|
6723
|
-
function v(y, ...
|
|
6724
|
-
f || (f = !0, p(y, ...
|
|
6723
|
+
function v(y, ...k) {
|
|
6724
|
+
f || (f = !0, p(y, ...k));
|
|
6725
6725
|
}
|
|
6726
6726
|
function D(y) {
|
|
6727
6727
|
v(null, y);
|
|
@@ -7080,21 +7080,21 @@ const Gi = [], Wi = { allowDangerousHtml: !0 }, ld = /^(https?|ircs?|mailto|xmpp
|
|
|
7080
7080
|
function cd(e) {
|
|
7081
7081
|
const t = e.allowedElements, r = e.allowElement, n = e.children || "", o = e.className, s = e.components, i = e.disallowedElements, a = e.rehypePlugins || Gi, l = e.remarkPlugins || Gi, A = e.remarkRehypeOptions ? { ...e.remarkRehypeOptions, ...Wi } : Wi, c = e.skipHtml, p = e.unwrapDisallowed, f = e.urlTransform || ud, m = ad().use(Lu).use(l).use(ed, A).use(a), v = new Al();
|
|
7082
7082
|
typeof n == "string" && (v.value = n);
|
|
7083
|
-
for (const
|
|
7083
|
+
for (const k of Ad) Object.hasOwn(e, k.from) && (k.from, k.to && k.to, k.id);
|
|
7084
7084
|
const D = m.parse(v);
|
|
7085
7085
|
let y = m.runSync(D, v);
|
|
7086
|
-
return o && (y = { type: "element", tagName: "div", properties: { className: o }, children: y.type === "root" ? y.children : [y] }), ll(y, function(
|
|
7087
|
-
if (
|
|
7088
|
-
if (
|
|
7086
|
+
return o && (y = { type: "element", tagName: "div", properties: { className: o }, children: y.type === "root" ? y.children : [y] }), ll(y, function(k, I, E) {
|
|
7087
|
+
if (k.type === "raw" && E && typeof I == "number") return c ? E.children.splice(I, 1) : E.children[I] = { type: "text", value: k.value }, I;
|
|
7088
|
+
if (k.type === "element") {
|
|
7089
7089
|
let T;
|
|
7090
|
-
for (T in Ro) if (Object.hasOwn(Ro, T) && Object.hasOwn(
|
|
7091
|
-
const _ =
|
|
7092
|
-
(Q === null || Q.includes(
|
|
7090
|
+
for (T in Ro) if (Object.hasOwn(Ro, T) && Object.hasOwn(k.properties, T)) {
|
|
7091
|
+
const _ = k.properties[T], Q = Ro[T];
|
|
7092
|
+
(Q === null || Q.includes(k.tagName)) && (k.properties[T] = f(String(_ || ""), T, k));
|
|
7093
7093
|
}
|
|
7094
7094
|
}
|
|
7095
|
-
if (
|
|
7096
|
-
let T = t ? !t.includes(
|
|
7097
|
-
if (!T && r && typeof I == "number" && (T = !r(
|
|
7095
|
+
if (k.type === "element") {
|
|
7096
|
+
let T = t ? !t.includes(k.tagName) : !!i && i.includes(k.tagName);
|
|
7097
|
+
if (!T && r && typeof I == "number" && (T = !r(k, I, E)), T && E && typeof I == "number") return p && k.children ? E.children.splice(I, 1, ...k.children) : E.children.splice(I, 1), I;
|
|
7098
7098
|
}
|
|
7099
7099
|
}), Rc(y, { Fragment: M.Fragment, components: s, ignoreInvalidStyle: !0, jsx: M.jsx, jsxs: M.jsxs, passKeys: !0, passNode: !0 });
|
|
7100
7100
|
}
|
|
@@ -7119,10 +7119,10 @@ const dd = ({ children: e }) => M.jsx("div", { style: { whiteSpace: "normal" },
|
|
|
7119
7119
|
var f;
|
|
7120
7120
|
const m = (f = p.data.message) == null ? void 0 : f.sender.toUpperCase();
|
|
7121
7121
|
((v, D, y) => {
|
|
7122
|
-
var
|
|
7122
|
+
var k;
|
|
7123
7123
|
if (typeof v.data.message.content != "string" || !v.detail.currPath) return !1;
|
|
7124
7124
|
const I = D[v.detail.currPath];
|
|
7125
|
-
return !!I && (((
|
|
7125
|
+
return !!I && (((k = I.renderMarkdown) == null ? void 0 : k.map((E) => E.toUpperCase()).includes(y)) ?? !1);
|
|
7126
7126
|
})(p, r(), m) && (p.data.message.contentWrapper = l, p.data.message.tags || (p.data.message.tags = []), p.data.message.tags.push("rcb-markdown-renderer-plugin:parsed"));
|
|
7127
7127
|
};
|
|
7128
7128
|
Ut(le.PRE_INJECT_MESSAGE, A), Ut(le.CHUNK_STREAM_MESSAGE, A), Ut(le.START_STREAM_MESSAGE, A), Ut(le.START_SIMULATE_STREAM_MESSAGE, A);
|
|
@@ -7149,10 +7149,10 @@ const dd = ({ children: e }) => M.jsx("div", { style: { whiteSpace: "normal" },
|
|
|
7149
7149
|
const v = m(f.data.inputText);
|
|
7150
7150
|
if (v != null && v.success || p.preventDefault(), !v.promptContent) return;
|
|
7151
7151
|
a === 0 && (A.current = structuredClone(n));
|
|
7152
|
-
const D = ((y,
|
|
7152
|
+
const D = ((y, k) => {
|
|
7153
7153
|
const I = y.promptType ?? "info";
|
|
7154
7154
|
let E = {};
|
|
7155
|
-
return
|
|
7155
|
+
return k.advancedStyles && (E = k.advancedStyles[I]), k.promptBaseColors && (E.toastPromptStyle = { color: k.promptBaseColors[I], borderColor: k.promptBaseColors[I] }), k.promptHoveredColors && (E.toastPromptHoveredStyle = { color: k.promptHoveredColors[I], borderColor: k.promptHoveredColors[I] }), k.textAreaHighlightColors && (y.highlightTextArea ?? !0) && (E.chatInputAreaStyle = { boxShadow: `${k.textAreaHighlightColors[I]} 0px 0px 5px` }), E;
|
|
7156
7156
|
})(v, i);
|
|
7157
7157
|
o(D), t(v.promptContent, v.promptDuration ?? 3e3), l((y) => y + 1);
|
|
7158
7158
|
}), Ut(le.USER_UPLOAD_FILE, (p) => {
|
|
@@ -7161,9 +7161,9 @@ const dd = ({ children: e }) => M.jsx("div", { style: { whiteSpace: "normal" },
|
|
|
7161
7161
|
if (!D) return console.error("No file uploaded."), void p.preventDefault();
|
|
7162
7162
|
const y = Vi(v, r(), "validateFileInput");
|
|
7163
7163
|
if (!y) return void console.error("Validator not found for file input.");
|
|
7164
|
-
const
|
|
7165
|
-
if (!
|
|
7166
|
-
console.log("Validation successful:",
|
|
7164
|
+
const k = y(D);
|
|
7165
|
+
if (!k.success) return console.error("Validation failed:", k), k.promptContent && t(k.promptContent, k.promptDuration ?? 3e3), void p.preventDefault();
|
|
7166
|
+
console.log("Validation successful:", k);
|
|
7167
7167
|
}), Ut(le.DISMISS_TOAST, () => {
|
|
7168
7168
|
l((p) => p - 1);
|
|
7169
7169
|
}), x.useEffect(() => {
|
|
@@ -7322,17 +7322,17 @@ const vd = "background: #1a5b6e; color: white; padding: 2px 6px; border-radius:
|
|
|
7322
7322
|
const [e, t] = x.useState(!1), [r, n] = x.useState([]), [o, s] = x.useState(null), [i, a] = x.useState(0), l = x.useRef(null), A = x.useRef(null), { replaceMessages: c } = kr(), { toggleTextAreaDisabled: p } = Ta(), { setSessionId: f, getSessionId: m } = Cs();
|
|
7323
7323
|
x.useEffect(() => {
|
|
7324
7324
|
var D, y;
|
|
7325
|
-
const
|
|
7325
|
+
const k = (E) => {
|
|
7326
7326
|
l.current && !l.current.contains(E.target) && A.current && !A.current.contains(E.target) && t(!1);
|
|
7327
7327
|
}, I = (y = (D = l.current) === null || D === void 0 ? void 0 : D.getRootNode()) !== null && y !== void 0 ? y : document;
|
|
7328
|
-
return e && I.addEventListener("mousedown",
|
|
7329
|
-
I.removeEventListener("mousedown",
|
|
7328
|
+
return e && I.addEventListener("mousedown", k), () => {
|
|
7329
|
+
I.removeEventListener("mousedown", k);
|
|
7330
7330
|
};
|
|
7331
7331
|
}, [e]);
|
|
7332
7332
|
const v = (D) => {
|
|
7333
7333
|
var y;
|
|
7334
|
-
const
|
|
7335
|
-
if (sn("RESTORE requested", { targetSession: D.slice(-12), currentSession:
|
|
7334
|
+
const k = m();
|
|
7335
|
+
if (sn("RESTORE requested", { targetSession: D.slice(-12), currentSession: k?.slice(-12) }), D === k) return sn("RESTORE skipped - already on this session"), void t(!1);
|
|
7336
7336
|
const I = ((_) => {
|
|
7337
7337
|
var Q;
|
|
7338
7338
|
return ((Q = wr()[_]) === null || Q === void 0 ? void 0 : Q.messages) || [];
|
|
@@ -7356,14 +7356,14 @@ const vd = "background: #1a5b6e; color: white; padding: 2px 6px; border-radius:
|
|
|
7356
7356
|
if (!e && (n((() => {
|
|
7357
7357
|
const D = wr();
|
|
7358
7358
|
return Object.entries(D).map((y) => {
|
|
7359
|
-
let [
|
|
7360
|
-
return Object.assign({ sessionId:
|
|
7361
|
-
}).sort((y,
|
|
7359
|
+
let [k, I] = y;
|
|
7360
|
+
return Object.assign({ sessionId: k }, I);
|
|
7361
|
+
}).sort((y, k) => new Date(k.startedAt).getTime() - new Date(y.startedAt).getTime());
|
|
7362
7362
|
})()), A.current)) {
|
|
7363
7363
|
const D = A.current.closest(".rcb-chat-window");
|
|
7364
7364
|
if (D) {
|
|
7365
|
-
const y = D.getBoundingClientRect(),
|
|
7366
|
-
s(y.width + 3), a(y.right -
|
|
7365
|
+
const y = D.getBoundingClientRect(), k = A.current.getBoundingClientRect();
|
|
7366
|
+
s(y.width + 3), a(y.right - k.right - 18 + 4);
|
|
7367
7367
|
}
|
|
7368
7368
|
}
|
|
7369
7369
|
t(!e);
|
|
@@ -7372,8 +7372,8 @@ const vd = "background: #1a5b6e; color: white; padding: 2px 6px; border-radius:
|
|
|
7372
7372
|
}, onMouseLeave: (y) => {
|
|
7373
7373
|
y.currentTarget.style.backgroundColor = "transparent";
|
|
7374
7374
|
} }, V.createElement("span", { style: { fontSize: "14px", color: "#333", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" } }, D.preview || "New conversation"), V.createElement("span", { style: { fontSize: "12px", color: "#888" } }, ((y) => {
|
|
7375
|
-
const
|
|
7376
|
-
return E === 0 ?
|
|
7375
|
+
const k = new Date(y), I = (/* @__PURE__ */ new Date()).getTime() - k.getTime(), E = Math.floor(I / 864e5);
|
|
7376
|
+
return E === 0 ? k.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }) : E === 1 ? "Yesterday" : E < 7 ? k.toLocaleDateString([], { weekday: "short" }) : k.toLocaleDateString([], { month: "short", day: "numeric" });
|
|
7377
7377
|
})(D.startedAt))))));
|
|
7378
7378
|
}, yl = (e) => {
|
|
7379
7379
|
var { width: t = 24, height: r = 24, color: n = "currentColor", children: o } = e, s = sa(e, ["width", "height", "color", "children"]);
|
|
@@ -7432,21 +7432,21 @@ const Md = () => {
|
|
|
7432
7432
|
const v = [...f];
|
|
7433
7433
|
return m && v.push(m), void ((D, y) => {
|
|
7434
7434
|
D.preventDefault();
|
|
7435
|
-
let
|
|
7435
|
+
let k = -1;
|
|
7436
7436
|
for (let E = 0; E < y.length; E++) if (y[E] === document.activeElement || y[E].contains(document.activeElement)) {
|
|
7437
|
-
|
|
7437
|
+
k = E;
|
|
7438
7438
|
break;
|
|
7439
7439
|
}
|
|
7440
|
-
|
|
7441
|
-
let I =
|
|
7440
|
+
k === -1 && (k = 0);
|
|
7441
|
+
let I = k;
|
|
7442
7442
|
switch (D.key) {
|
|
7443
7443
|
case "ArrowDown":
|
|
7444
7444
|
case "ArrowRight":
|
|
7445
|
-
I =
|
|
7445
|
+
I = k < y.length - 1 ? k + 1 : 0;
|
|
7446
7446
|
break;
|
|
7447
7447
|
case "ArrowUp":
|
|
7448
7448
|
case "ArrowLeft":
|
|
7449
|
-
I =
|
|
7449
|
+
I = k > 0 ? k - 1 : y.length - 1;
|
|
7450
7450
|
break;
|
|
7451
7451
|
case "Home":
|
|
7452
7452
|
I = 0;
|
|
@@ -7456,7 +7456,7 @@ const Md = () => {
|
|
|
7456
7456
|
break;
|
|
7457
7457
|
case "Enter":
|
|
7458
7458
|
case " ": {
|
|
7459
|
-
const E = y[
|
|
7459
|
+
const E = y[k], T = new MouseEvent("mousedown", { bubbles: !0, cancelable: !0, view: window });
|
|
7460
7460
|
return void E.dispatchEvent(T);
|
|
7461
7461
|
}
|
|
7462
7462
|
default:
|
|
@@ -7548,10 +7548,10 @@ const Md = () => {
|
|
|
7548
7548
|
const m = Array.from(f.querySelectorAll(".rcb-checkbox-row-container")).filter((v) => v.offsetParent !== null && v.style.display !== "none");
|
|
7549
7549
|
if (m.length > 0) {
|
|
7550
7550
|
const v = f.querySelector(".rcb-checkbox-next-button"), D = [...m];
|
|
7551
|
-
if (v && v.offsetParent !== null && D.push(v), D.forEach((y,
|
|
7552
|
-
y.setAttribute("tabindex",
|
|
7551
|
+
if (v && v.offsetParent !== null && D.push(v), D.forEach((y, k) => {
|
|
7552
|
+
y.setAttribute("tabindex", k === 0 ? "0" : "-1"), k === 0 ? y.classList.add("keyboard-focused") : y.classList.remove("keyboard-focused");
|
|
7553
7553
|
}), m.length > 1) {
|
|
7554
|
-
f.querySelectorAll(".keyboard-nav-hint").forEach((
|
|
7554
|
+
f.querySelectorAll(".keyboard-nav-hint").forEach((k) => k.remove());
|
|
7555
7555
|
const y = document.createElement("div");
|
|
7556
7556
|
y.className = "keyboard-nav-hint", y.textContent = "Use arrow keys ↕ to navigate, Enter to select/deselect, or click any option", y.style.cssText = "font-size: 12px !important; color: #666 !important; margin-bottom: 8px !important; font-style: italic !important; display: block !important;", f.insertBefore(y, f.firstChild);
|
|
7557
7557
|
}
|
|
@@ -7640,7 +7640,7 @@ const fr = (e) => {
|
|
|
7640
7640
|
}), t;
|
|
7641
7641
|
}, Od = (e) => {
|
|
7642
7642
|
let { siteKey: t, onVerify: r, onError: n, loginUrl: o } = e;
|
|
7643
|
-
const s = x.useRef(null), i = x.useRef(null), a = x.useRef(!1), l = x.useRef(null), A = x.useRef(null), [c, p] = x.useState(!1), [f, m] = x.useState(0), v = x.useRef("widget_error"), D = x.useRef(null), y = o && o !== "/login",
|
|
7643
|
+
const s = x.useRef(null), i = x.useRef(null), a = x.useRef(!1), l = x.useRef(null), A = x.useRef(null), [c, p] = x.useState(!1), [f, m] = x.useState(0), v = x.useRef("widget_error"), D = x.useRef(null), y = o && o !== "/login", k = x.useCallback(() => {
|
|
7644
7644
|
const T = window.turnstile;
|
|
7645
7645
|
if (l.current && T != null && T.remove) {
|
|
7646
7646
|
try {
|
|
@@ -7651,11 +7651,11 @@ const fr = (e) => {
|
|
|
7651
7651
|
}
|
|
7652
7652
|
}, []), I = x.useCallback(() => {
|
|
7653
7653
|
var T;
|
|
7654
|
-
|
|
7655
|
-
}, [n,
|
|
7654
|
+
k(), c ? n?.(v.current, (T = D.current) !== null && T !== void 0 ? T : void 0) : n?.("user_cancelled");
|
|
7655
|
+
}, [n, k, c]);
|
|
7656
7656
|
x.useEffect(() => () => {
|
|
7657
|
-
|
|
7658
|
-
}, [
|
|
7657
|
+
k();
|
|
7658
|
+
}, [k]), x.useEffect(() => {
|
|
7659
7659
|
var T;
|
|
7660
7660
|
return A.current = document.activeElement, (T = i.current) === null || T === void 0 || T.focus(), () => {
|
|
7661
7661
|
A.current && typeof A.current.focus == "function" && A.current.focus();
|
|
@@ -7677,15 +7677,15 @@ const fr = (e) => {
|
|
|
7677
7677
|
if (!T || !s.current) return ct("Turnstile API not available after script load"), v.current = "api_unavailable", void p(!0);
|
|
7678
7678
|
l.current = T.render(s.current, { sitekey: t, callback: (_) => {
|
|
7679
7679
|
yr("Visible challenge completed"), r(_);
|
|
7680
|
-
}, "error-callback": (_) => (ct("Turnstile challenge failed:", _), D.current = _, v.current = "widget_error",
|
|
7681
|
-
ct("Turnstile token expired"), v.current = "token_expired",
|
|
7680
|
+
}, "error-callback": (_) => (ct("Turnstile challenge failed:", _), D.current = _, v.current = "widget_error", k(), p(!0), !0), "expired-callback": () => {
|
|
7681
|
+
ct("Turnstile token expired"), v.current = "token_expired", k(), p(!0);
|
|
7682
7682
|
} });
|
|
7683
7683
|
}).catch((T) => {
|
|
7684
7684
|
ct("Failed to load Turnstile script:", T), v.current = "script_load_failed", p(!0);
|
|
7685
7685
|
}));
|
|
7686
7686
|
}, [t, r, c]);
|
|
7687
7687
|
const E = V.createElement(V.Fragment, null, V.createElement("div", { "aria-hidden": "true", style: { position: "fixed", inset: 0, background: "rgba(0, 0, 0, 0.5)", zIndex: 999998 } }), V.createElement("div", { ref: i, role: "dialog", "aria-modal": "true", "aria-labelledby": "qa-bot-turnstile-label", tabIndex: -1, style: { position: "fixed", top: "50%", left: "50%", transform: "translate(-50%, -50%)", zIndex: 999999, background: "white", padding: "24px", borderRadius: "8px", boxShadow: "0 4px 20px rgba(0, 0, 0, 0.3)", maxWidth: "90vw", fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif' } }, V.createElement("span", { id: "qa-bot-turnstile-label", className: "sr-only", style: { position: "absolute", width: "1px", height: "1px", overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap" } }, "Verification challenge"), c ? V.createElement("div", { style: { fontSize: "14px", lineHeight: "1.5", color: "#333" } }, f === 0 ? V.createElement("p", { style: { margin: "0 0 16px 0" } }, "Verification failed. You can try again", y && V.createElement(V.Fragment, null, ", or", " ", V.createElement("a", { href: o, target: "_blank", rel: "noopener noreferrer", style: { color: "var(--primaryColor, #107180)", fontWeight: "bold" } }, "log in"), " ", "to skip verification"), ".") : V.createElement(V.Fragment, null, V.createElement("p", { style: { margin: "0 0 8px 0" } }, "Verification is still not working. This can be caused by browser extensions (ad blockers, privacy tools) or VPN connections."), V.createElement("p", { style: { margin: "0 0 16px 0" } }, "Try disabling extensions, using a private/incognito window,", y && V.createElement(V.Fragment, null, " ", V.createElement("a", { href: o, target: "_blank", rel: "noopener noreferrer", style: { color: "var(--primaryColor, #107180)", fontWeight: "bold" } }, "logging in"), ","), " ", "or using a different browser.")), V.createElement("div", { style: { display: "flex", gap: "8px" } }, V.createElement("button", { type: "button", onClick: () => {
|
|
7688
|
-
|
|
7688
|
+
k(), a.current = !1, m((T) => T + 1), p(!1);
|
|
7689
7689
|
}, style: { padding: "8px 16px", background: "var(--primaryColor, #107180)", color: "white", border: "none", borderRadius: "4px", cursor: "pointer", fontSize: "14px" } }, "Try again"), V.createElement("button", { type: "button", onClick: I, style: { padding: "8px 16px", background: "#f0f0f0", color: "#333", border: "1px solid #ccc", borderRadius: "4px", cursor: "pointer", fontSize: "14px" } }, "Close"))) : V.createElement(V.Fragment, null, V.createElement("div", { ref: s, style: { borderRadius: "8px", overflow: "hidden" } }), V.createElement("button", { type: "button", onClick: I, style: { marginTop: "16px", padding: "8px 16px", background: "#f0f0f0", color: "#333", border: "1px solid #ccc", borderRadius: "4px", cursor: "pointer", fontSize: "14px" } }, "Cancel"))));
|
|
7690
7690
|
return Tl.createPortal(E, document.body);
|
|
7691
7691
|
};
|
|
@@ -7702,22 +7702,24 @@ function Rd(e) {
|
|
|
7702
7702
|
var s, i;
|
|
7703
7703
|
const [a, l] = V.useState(null), [A, c] = V.useState(0), p = t(), f = (s = Nl) !== null && s !== void 0 ? s : {}, m = f.VITE_FORCE_TURNSTILE_WIDGET === "true", v = (i = p.siteKey) !== null && i !== void 0 ? i : m ? f.VITE_TURNSTILE_SITE_KEY : null;
|
|
7704
7704
|
return v && (m || a !== v) ? V.createElement(Od, { key: A, siteKey: v, loginUrl: o, onVerify: async (D) => {
|
|
7705
|
-
|
|
7705
|
+
const y = v;
|
|
7706
|
+
p.token = D, n?.({ type: "chatbot_turnstile_completed" }), await r(D) === "needs_another_challenge" ? c((k) => k + 1) : l(y);
|
|
7706
7707
|
}, onError: (D, y) => {
|
|
7707
|
-
var
|
|
7708
|
-
|
|
7708
|
+
var k;
|
|
7709
|
+
const I = (k = p.pendingQuery) === null || k === void 0 ? void 0 : k.queryId, E = v;
|
|
7710
|
+
p.token = null, p.pendingQuery = null, p.needsChallenge = !1, p.siteKey = null, l(E), n?.({ type: "chatbot_turnstile_error", queryId: I, failureReason: D, cloudflareErrorCode: y });
|
|
7709
7711
|
} }) : null;
|
|
7710
7712
|
}
|
|
7711
7713
|
const Nd = "#1a5b6e", Ld = "#107180", Fd = "Arial, sans-serif", $i = "Q&A Bot", jd = "/chat-icon.svg", Hd = "Type your question here...", Ud = "Select an option to continue", zd = !1, qd = "Ask me a question!", ea = "/login", Gd = { general: { showHeader: !0, showFooter: !0 }, tooltip: { mode: "CLOSE" }, chatInput: { disabled: !1, characterLimit: 5e3, showCharacterCount: !1, allowNewline: !0, blockSpam: !1 }, chatWindow: { defaultOpen: !1, showScrollbar: !1 }, botBubble: { simulateStream: !0, streamSpeed: 10, showAvatar: !1 }, userBubble: { showAvatar: !1 }, notification: { disabled: !0, showCount: !1 }, audio: { disabled: !0 }, emoji: { disabled: !0 }, fileAttachment: { disabled: !0 } }, Ps = x.forwardRef((e, t) => {
|
|
7712
7714
|
var r, n, o;
|
|
7713
|
-
const { apiKey: s, qaEndpoint: i, ratingEndpoint: a, capabilitiesEndpoint: l, agentRatingEndpoint: A, welcomeMessage: c, open: p, onOpenChange: f, isLoggedIn: m, allowAnonAccess: v = !1, actingUser: D, primaryColor: y, secondaryColor:
|
|
7715
|
+
const { apiKey: s, qaEndpoint: i, ratingEndpoint: a, capabilitiesEndpoint: l, agentRatingEndpoint: A, welcomeMessage: c, open: p, onOpenChange: f, isLoggedIn: m, allowAnonAccess: v = !1, actingUser: D, primaryColor: y, secondaryColor: k, botName: I, logo: E, placeholder: T, errorMessage: _, embedded: Q, footerText: O, footerLink: U, tooltipText: W, loginUrl: H, turnstileSiteKey: K, backendId: L, resourceContext: X, customFlow: te, onAnalyticsEvent: J } = e, re = x.useRef(`bot_${Math.random().toString(36).substr(2, 9)}`);
|
|
7714
7716
|
x.useEffect(() => {
|
|
7715
7717
|
Sd();
|
|
7716
7718
|
}, []);
|
|
7717
7719
|
const Y = x.useRef(null);
|
|
7718
7720
|
Y.current === null && (Y.current = Xi(), $r("CREATED", Y.current));
|
|
7719
|
-
const Z = x.useRef(!1),
|
|
7720
|
-
const [Ee, we] = x.useState(null), [Ne,
|
|
7721
|
+
const Z = x.useRef(!1), S = x.useRef({ getSessionId: () => Y.current, isResetting: () => Z.current }), ce = x.useRef(null), B = (function(ie, oe) {
|
|
7722
|
+
const [Ee, we] = x.useState(null), [Ne, Me] = x.useState("idle"), Le = x.useRef(null), Ue = x.useRef(null), Ze = x.useRef(!0), zt = x.useCallback(() => {
|
|
7721
7723
|
const _e = window.turnstile;
|
|
7722
7724
|
if (Ue.current && _e != null && _e.remove) {
|
|
7723
7725
|
try {
|
|
@@ -7729,27 +7731,27 @@ const Nd = "#1a5b6e", Ld = "#107180", Fd = "Arial, sans-serif", $i = "Q&A Bot",
|
|
|
7729
7731
|
Le.current && (Le.current.remove(), Le.current = null);
|
|
7730
7732
|
}, []);
|
|
7731
7733
|
return x.useEffect(() => {
|
|
7732
|
-
if (Ze.current = !0, !ie) return
|
|
7733
|
-
|
|
7734
|
+
if (Ze.current = !0, !ie) return Me("idle"), void we(null);
|
|
7735
|
+
Me("loading");
|
|
7734
7736
|
const _e = document.createElement("div");
|
|
7735
7737
|
return _e.style.position = "fixed", _e.style.left = "-9999px", _e.style.top = "-9999px", _e.style.width = "0", _e.style.height = "0", _e.style.overflow = "hidden", _e.setAttribute("aria-hidden", "true"), document.body.appendChild(_e), Le.current = _e, vl().then(() => {
|
|
7736
7738
|
if (!Ze.current) return;
|
|
7737
7739
|
const xe = window.turnstile;
|
|
7738
|
-
if (!xe || !Le.current) return ct("Turnstile API not available for silent verification"),
|
|
7740
|
+
if (!xe || !Le.current) return ct("Turnstile API not available for silent verification"), Me("failed"), void (oe == null || oe({ type: "chatbot_turnstile_silent_failed", failureReason: "api_unavailable" }));
|
|
7739
7741
|
const qt = xe.render(Le.current, { sitekey: ie, execution: "render", "refresh-expired": "auto", callback: (ht) => {
|
|
7740
|
-
Ze.current && (yr("Silent verification succeeded"), we(ht),
|
|
7741
|
-
}, "error-callback": (ht) => !Ze.current || (ct("Turnstile silent verification failed:", ht), we(null),
|
|
7742
|
-
Ze.current && (yr("Token expired, awaiting refresh"), we(null),
|
|
7742
|
+
Ze.current && (yr("Silent verification succeeded"), we(ht), Me("verified"));
|
|
7743
|
+
}, "error-callback": (ht) => !Ze.current || (ct("Turnstile silent verification failed:", ht), we(null), Me("failed"), oe?.({ type: "chatbot_turnstile_silent_failed", failureReason: "widget_error", cloudflareErrorCode: ht }), !0), "expired-callback": () => {
|
|
7744
|
+
Ze.current && (yr("Token expired, awaiting refresh"), we(null), Me("loading"));
|
|
7743
7745
|
} });
|
|
7744
7746
|
Ue.current = qt;
|
|
7745
7747
|
}).catch((xe) => {
|
|
7746
|
-
Ze.current && (ct("Failed to load Turnstile script for silent verification:", xe),
|
|
7748
|
+
Ze.current && (ct("Failed to load Turnstile script for silent verification:", xe), Me("failed"), oe?.({ type: "chatbot_turnstile_silent_failed", failureReason: "script_load_failed" }));
|
|
7747
7749
|
}), () => {
|
|
7748
7750
|
Ze.current = !1, zt();
|
|
7749
7751
|
};
|
|
7750
7752
|
}, [ie, zt]), { token: Ee, status: Ne, reset: x.useCallback(() => {
|
|
7751
7753
|
const _e = window.turnstile;
|
|
7752
|
-
Ue.current && _e != null && _e.reset && (we(null),
|
|
7754
|
+
Ue.current && _e != null && _e.reset && (we(null), Me("loading"), _e.reset(Ue.current), yr("Token consumed, resetting widget for fresh token"));
|
|
7753
7755
|
}, []) };
|
|
7754
7756
|
})(K, (ie) => {
|
|
7755
7757
|
var oe;
|
|
@@ -7769,18 +7771,18 @@ const Nd = "#1a5b6e", Ld = "#107180", Fd = "Arial, sans-serif", $i = "Q&A Bot",
|
|
|
7769
7771
|
}, [Oe]);
|
|
7770
7772
|
const Ie = x.useMemo(() => {
|
|
7771
7773
|
const ie = Object.assign({}, Gd);
|
|
7772
|
-
ie.general = Object.assign(Object.assign({}, ie.general), { primaryColor: y || Nd, secondaryColor:
|
|
7774
|
+
ie.general = Object.assign(Object.assign({}, ie.general), { primaryColor: y || Nd, secondaryColor: k || Ld, fontFamily: Fd, embedded: be });
|
|
7773
7775
|
const oe = fe === !1 ? [V.createElement(Yi, { key: "login-button", loginUrl: H || ea, isHeaderButton: !0 })] : [V.createElement(Id, { key: "history-button" }), V.createElement(md, { key: "user-icon" })];
|
|
7774
7776
|
ie.header = { title: V.createElement("span", { style: { fontSize: 14, fontWeight: 500 } }, I || $i), showAvatar: !0, avatar: E || jd, buttons: [...oe, et.CLOSE_CHAT_BUTTON] }, ie.chatInput = Object.assign(Object.assign({}, ie.chatInput), { disabled: !1, enabledPlaceholderText: T || Hd, disabledPlaceholderText: _ || Ud }), ie.tooltip = Object.assign(Object.assign({}, ie.tooltip), { text: W || qd });
|
|
7775
7777
|
const Ee = O ? U ? V.createElement("a", { href: U, target: "_blank", rel: "noopener noreferrer", key: "footer-link" }, O) : V.createElement("span", { key: "footer-text" }, O) : null;
|
|
7776
7778
|
return ie.footer = { text: Ee ?? void 0, buttons: [V.createElement(Qd, { key: "new-chat-button" })] }, ie.chatWindow = Object.assign(Object.assign({}, ie.chatWindow), { defaultOpen: !!be }), ie.event = { rcbPreInjectMessage: !0, rcbPostInjectMessage: !0, rcbUserSubmitText: !0, rcbChangePath: !0, rcbToggleChatWindow: !0 }, ie;
|
|
7777
|
-
}, [y,
|
|
7779
|
+
}, [y, k, I, E, T, _, be, W, fe, H, O, U]), nt = x.useRef(null), Re = (function(ie) {
|
|
7778
7780
|
let oe = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
7779
7781
|
return x.useMemo(() => {
|
|
7780
7782
|
const Ee = (we, Ne) => {
|
|
7781
7783
|
if (ie.current) {
|
|
7782
|
-
const
|
|
7783
|
-
if (
|
|
7784
|
+
const Me = getComputedStyle(ie.current).getPropertyValue(we);
|
|
7785
|
+
if (Me && Me.trim() !== "") return Me.trim();
|
|
7784
7786
|
if (ie.current.parentElement) {
|
|
7785
7787
|
const Le = getComputedStyle(ie.current.parentElement).getPropertyValue(we);
|
|
7786
7788
|
if (Le && Le.trim() !== "") return Le.trim();
|
|
@@ -7799,8 +7801,8 @@ const Nd = "#1a5b6e", Ld = "#107180", Fd = "Arial, sans-serif", $i = "Q&A Bot",
|
|
|
7799
7801
|
let { settings: oe, themeColors: Ee } = ie;
|
|
7800
7802
|
x.useEffect(() => {
|
|
7801
7803
|
Ee && (Object.entries(Ee).forEach((we) => {
|
|
7802
|
-
let [Ne,
|
|
7803
|
-
|
|
7804
|
+
let [Ne, Me] = we;
|
|
7805
|
+
Me && document.documentElement.style.setProperty(`--${Ne}`, Me);
|
|
7804
7806
|
}), Ee.primaryColor && document.documentElement.style.setProperty("--rcb-header-background", Ee.primaryColor), Ee.secondaryColor && document.documentElement.style.setProperty("--rcb-header-background-hover", Ee.secondaryColor));
|
|
7805
7807
|
}, [Ee]), x.useEffect(() => {
|
|
7806
7808
|
var we, Ne;
|
|
@@ -7809,7 +7811,7 @@ const Nd = "#1a5b6e", Ld = "#107180", Fd = "Arial, sans-serif", $i = "Q&A Bot",
|
|
|
7809
7811
|
})({ settings: Ie, themeColors: Re });
|
|
7810
7812
|
const je = x.useMemo(() => {
|
|
7811
7813
|
const ie = ((oe) => {
|
|
7812
|
-
let { endpoint: Ee, ratingEndpoint: we, agentRatingEndpoint: Ne, apiKey:
|
|
7814
|
+
let { endpoint: Ee, ratingEndpoint: we, agentRatingEndpoint: Ne, apiKey: Me, sessionId: Le, isResetting: Ue = () => !1, isLoggedIn: Ze, allowAnonAccess: zt = !1, loginUrl: _e = "/login", trackEvent: xe, getTurnstileToken: qt, resetTurnstileToken: ht, backendId: Gt, resourceContext: vt } = oe;
|
|
7813
7815
|
if (Ze === !1 && !zt) return xe?.({ type: "chatbot_login_prompt_shown" }), { qa_loop: { message: "To ask questions, please log in first.", component: V.createElement(Yi, { loginUrl: _e }), chatDisabled: !0, path: "qa_loop" } };
|
|
7814
7816
|
let lt = null, z = null, Ae = !1;
|
|
7815
7817
|
const se = { siteKey: null, token: null, pendingQuery: null, needsChallenge: !1 };
|
|
@@ -7822,12 +7824,12 @@ const Nd = "#1a5b6e", Ld = "#107180", Fd = "Arial, sans-serif", $i = "Q&A Bot",
|
|
|
7822
7824
|
if ((!Ue || !Ue()) && ze && ze.trim() !== "") {
|
|
7823
7825
|
if (ze === "👍 Helpful" || ze === "👎 Not helpful") {
|
|
7824
7826
|
if (lt) {
|
|
7825
|
-
const
|
|
7827
|
+
const Qe = ze === "👍 Helpful", Ke = z === "agent" ? Ne : we;
|
|
7826
7828
|
if (Ke) try {
|
|
7827
7829
|
const Ve = { "Content-Type": "application/json" };
|
|
7828
|
-
|
|
7829
|
-
const
|
|
7830
|
-
|
|
7830
|
+
Me && (Ve["X-API-KEY"] = Me);
|
|
7831
|
+
const me = Le();
|
|
7832
|
+
me && (Ve["X-Session-ID"] = me, Ve["X-Query-ID"] = lt), await fetch(Ke, { method: "POST", headers: Ve, credentials: "include", body: JSON.stringify(z === "agent" ? { query_id: lt, rating: Qe ? "helpful" : "not_helpful", session_id: me } : { sessionId: me, queryId: lt, rating: Qe ? 1 : 0 }) }), xe?.({ type: "chatbot_rating_sent", queryId: lt, rating: Qe ? "helpful" : "not_helpful" });
|
|
7831
7833
|
} catch (Ve) {
|
|
7832
7834
|
ct("Error sending feedback:", Ve);
|
|
7833
7835
|
}
|
|
@@ -7835,35 +7837,35 @@ const Nd = "#1a5b6e", Ld = "#107180", Fd = "Arial, sans-serif", $i = "Q&A Bot",
|
|
|
7835
7837
|
return "Thanks for the feedback!";
|
|
7836
7838
|
}
|
|
7837
7839
|
try {
|
|
7838
|
-
const
|
|
7839
|
-
lt =
|
|
7840
|
+
const Qe = fl();
|
|
7841
|
+
lt = Qe, xe?.({ type: "chatbot_question_sent", queryId: Qe, questionLength: ze.length });
|
|
7840
7842
|
const Ke = { "Content-Type": "application/json" };
|
|
7841
|
-
|
|
7843
|
+
Me && (Ke["X-API-KEY"] = Me);
|
|
7842
7844
|
const Ve = Le();
|
|
7843
|
-
Ve && (Ke["X-Session-ID"] = Ve, Ke["X-Query-ID"] =
|
|
7844
|
-
const
|
|
7845
|
-
Ve && (
|
|
7845
|
+
Ve && (Ke["X-Session-ID"] = Ve, Ke["X-Query-ID"] = Qe), Ke["X-Origin"] = vt || "access";
|
|
7846
|
+
const me = { query: ze, question_id: Qe };
|
|
7847
|
+
Ve && (me.session_id = Ve), Gt && (me._backend = Gt), vt && (me.rp_name = vt, me.resource_context = vt);
|
|
7846
7848
|
const st = qt?.();
|
|
7847
|
-
st && (
|
|
7848
|
-
const tt = Date.now(), Te = await fetch(Ee, { method: "POST", headers: Ke, credentials: "include", body: JSON.stringify(
|
|
7849
|
+
st && (me.turnstile_token = st), $r("SENT to API", { session_id: Ve, question_id: Qe });
|
|
7850
|
+
const tt = Date.now(), Te = await fetch(Ee, { method: "POST", headers: Ke, credentials: "include", body: JSON.stringify(me) });
|
|
7849
7851
|
if (!Te.ok) throw new Error(`API returned ${Te.status}`);
|
|
7850
7852
|
if ((Te.headers.get("content-type") || "").includes("text/event-stream")) {
|
|
7851
7853
|
ht?.();
|
|
7852
7854
|
const $t = ($e = Te.body) === null || $e === void 0 ? void 0 : $e.getReader();
|
|
7853
7855
|
if (!$t) throw new Error("Response body is not readable");
|
|
7854
7856
|
const cn = new TextDecoder();
|
|
7855
|
-
let
|
|
7857
|
+
let bt = "", kt = "", Pt = !1;
|
|
7856
7858
|
try {
|
|
7857
7859
|
for (; ; ) {
|
|
7858
7860
|
const { done: Rt, value: mt } = await $t.read();
|
|
7859
7861
|
if (Rt) break;
|
|
7860
|
-
|
|
7861
|
-
let Wt =
|
|
7862
|
+
bt += cn.decode(mt, { stream: !0 });
|
|
7863
|
+
let Wt = bt.indexOf(`
|
|
7862
7864
|
|
|
7863
7865
|
`);
|
|
7864
7866
|
for (; Wt !== -1; ) {
|
|
7865
|
-
const pn =
|
|
7866
|
-
|
|
7867
|
+
const pn = bt.slice(0, Wt);
|
|
7868
|
+
bt = bt.slice(Wt + 2);
|
|
7867
7869
|
let Nt, tn = "", Lt = "";
|
|
7868
7870
|
for (const it of pn.split(`
|
|
7869
7871
|
`)) it.startsWith("event: ") ? tn = it.slice(7) : it.startsWith("data: ") && (Lt = it.slice(6));
|
|
@@ -7871,7 +7873,7 @@ const Nd = "#1a5b6e", Ld = "#107180", Fd = "Arial, sans-serif", $i = "Q&A Bot",
|
|
|
7871
7873
|
try {
|
|
7872
7874
|
Nt = JSON.parse(Lt);
|
|
7873
7875
|
} catch {
|
|
7874
|
-
pl("Failed to parse SSE data:", Lt), Wt =
|
|
7876
|
+
pl("Failed to parse SSE data:", Lt), Wt = bt.indexOf(`
|
|
7875
7877
|
|
|
7876
7878
|
`);
|
|
7877
7879
|
continue;
|
|
@@ -7880,12 +7882,12 @@ const Nd = "#1a5b6e", Ld = "#107180", Fd = "Arial, sans-serif", $i = "Q&A Bot",
|
|
|
7880
7882
|
const it = Nt.message || "Processing...";
|
|
7881
7883
|
await ue.streamMessage(`_${it}_`, "BOT"), Pt = !0;
|
|
7882
7884
|
} else if (tn === "token") {
|
|
7883
|
-
|
|
7884
|
-
const it = fr(
|
|
7885
|
+
kt += Nt.content || "";
|
|
7886
|
+
const it = fr(kt);
|
|
7885
7887
|
await ue.streamMessage(it, "BOT");
|
|
7886
7888
|
} else if (tn === "done") {
|
|
7887
7889
|
const it = Nt.metadata || {};
|
|
7888
|
-
if (z = it.rating_target || null, Ae = it.is_final_response === !0,
|
|
7890
|
+
if (z = it.rating_target || null, Ae = it.is_final_response === !0, kt) console.log("[SSE DEBUG] done: tokenContent exists, skipping streamMessage, calling endStreamMessage"), await ue.endStreamMessage("BOT");
|
|
7889
7891
|
else {
|
|
7890
7892
|
const hn = Nt.response || "";
|
|
7891
7893
|
if (hn) {
|
|
@@ -7898,10 +7900,10 @@ const Nd = "#1a5b6e", Ld = "#107180", Fd = "Arial, sans-serif", $i = "Q&A Bot",
|
|
|
7898
7900
|
const it = Nt.message || "An error occurred";
|
|
7899
7901
|
ct("SSE error event:", it), Pt ? (await ue.streamMessage(it, "BOT"), await ue.endStreamMessage("BOT")) : await ue.injectMessage(it);
|
|
7900
7902
|
}
|
|
7901
|
-
Wt =
|
|
7903
|
+
Wt = bt.indexOf(`
|
|
7902
7904
|
|
|
7903
7905
|
`);
|
|
7904
|
-
} else Wt =
|
|
7906
|
+
} else Wt = bt.indexOf(`
|
|
7905
7907
|
|
|
7906
7908
|
`);
|
|
7907
7909
|
}
|
|
@@ -7912,21 +7914,21 @@ const Nd = "#1a5b6e", Ld = "#107180", Fd = "Arial, sans-serif", $i = "Q&A Bot",
|
|
|
7912
7914
|
await ue.streamMessage("I had trouble completing the response. Please try again.", "BOT"), await ue.endStreamMessage("BOT");
|
|
7913
7915
|
}
|
|
7914
7916
|
const en = Date.now() - tt;
|
|
7915
|
-
return void (xe == null || xe({ type: "chatbot_answer_received", queryId:
|
|
7917
|
+
return void (xe == null || xe({ type: "chatbot_answer_received", queryId: Qe, responseTimeMs: en, success: !0, responseLength: kt.length }));
|
|
7916
7918
|
}
|
|
7917
7919
|
const Ot = Date.now() - tt, ut = await Te.json();
|
|
7918
|
-
if (ut.requires_turnstile) return xe?.({ type: "chatbot_turnstile_shown", queryId:
|
|
7920
|
+
if (ut.requires_turnstile) return xe?.({ type: "chatbot_turnstile_shown", queryId: Qe }), se.siteKey = ut.site_key, se.pendingQuery = { query: ze, sessionId: Ve, queryId: Qe }, se.needsChallenge = !0, "One moment — verifying your session…";
|
|
7919
7921
|
ht?.();
|
|
7920
|
-
const
|
|
7921
|
-
if (!
|
|
7922
|
-
const
|
|
7923
|
-
z =
|
|
7924
|
-
const gt = fr(
|
|
7922
|
+
const xt = ut.response || ut.answer || ut.text || ut.message;
|
|
7923
|
+
if (!xt) throw new Error("Invalid response format from API");
|
|
7924
|
+
const wt = ut.metadata || {};
|
|
7925
|
+
z = wt.rating_target || null, Ae = wt.is_final_response === !0;
|
|
7926
|
+
const gt = fr(xt), At = Nn() ? Zi(ut) : "", Zt = At ? `${gt}
|
|
7925
7927
|
|
|
7926
7928
|
${At}` : gt;
|
|
7927
|
-
return await ue.injectMessage(Zt), void (xe == null || xe({ type: "chatbot_answer_received", queryId:
|
|
7928
|
-
} catch (
|
|
7929
|
-
return ct("Error in Q&A flow:",
|
|
7929
|
+
return await ue.injectMessage(Zt), void (xe == null || xe({ type: "chatbot_answer_received", queryId: Qe, responseTimeMs: Ot, success: !0, responseLength: xt.length, hasMetadata: !!At }));
|
|
7930
|
+
} catch (Qe) {
|
|
7931
|
+
return ct("Error in Q&A flow:", Qe), xe?.({ type: "chatbot_answer_error", queryId: lt ?? void 0, errorType: Qe instanceof Error ? Qe.message : "unknown" }), "I apologize, but I'm having trouble processing your question. Please try again later.";
|
|
7930
7932
|
}
|
|
7931
7933
|
}
|
|
7932
7934
|
}, options: (ue) => Ue && Ue() || ue.userInput === "👍 Helpful" || ue.userInput === "👎 Not helpful" || se.needsChallenge ? [] : Ae && z && (z === "agent" ? Ne : we) ? ["👍 Helpful", "👎 Not helpful"] : [], renderMarkdown: ["BOT"], chatDisabled: !1, component: V.createElement(Rd, { getState: () => se, onResubmit: async (ue) => {
|
|
@@ -7934,26 +7936,26 @@ ${At}` : gt;
|
|
|
7934
7936
|
if (!se.pendingQuery || !Ce) return ct("Turnstile resubmit called without pending query or injectMessage"), "error";
|
|
7935
7937
|
try {
|
|
7936
7938
|
const ze = { "Content-Type": "application/json" };
|
|
7937
|
-
|
|
7938
|
-
const
|
|
7939
|
-
se.pendingQuery.sessionId && (
|
|
7940
|
-
const Ke = await fetch(Ee, { method: "POST", headers: ze, credentials: "include", body: JSON.stringify(
|
|
7939
|
+
Me && (ze["X-API-KEY"] = Me), se.pendingQuery.sessionId && (ze["X-Session-ID"] = se.pendingQuery.sessionId, ze["X-Query-ID"] = se.pendingQuery.queryId), ze["X-Origin"] = vt || "access";
|
|
7940
|
+
const Qe = { query: se.pendingQuery.query, question_id: se.pendingQuery.queryId, turnstile_token: ue };
|
|
7941
|
+
se.pendingQuery.sessionId && (Qe.session_id = se.pendingQuery.sessionId), Gt && (Qe._backend = Gt), vt && (Qe.rp_name = vt, Qe.resource_context = vt);
|
|
7942
|
+
const Ke = await fetch(Ee, { method: "POST", headers: ze, credentials: "include", body: JSON.stringify(Qe) }), Ve = se.pendingQuery.queryId;
|
|
7941
7943
|
if (!Ke.ok) throw new Error(`API returned ${Ke.status} after Turnstile`);
|
|
7942
7944
|
if ((Ke.headers.get("content-type") || "").includes("text/event-stream")) {
|
|
7943
|
-
const
|
|
7944
|
-
if (!
|
|
7945
|
-
const
|
|
7945
|
+
const xt = ($e = Ke.body) === null || $e === void 0 ? void 0 : $e.getReader();
|
|
7946
|
+
if (!xt) throw new Error("Response body is not readable");
|
|
7947
|
+
const wt = new TextDecoder();
|
|
7946
7948
|
let gt = "", At = "", Zt = {};
|
|
7947
7949
|
for (; ; ) {
|
|
7948
|
-
const { done: cn, value:
|
|
7950
|
+
const { done: cn, value: bt } = await xt.read();
|
|
7949
7951
|
if (cn) break;
|
|
7950
|
-
gt +=
|
|
7951
|
-
let
|
|
7952
|
+
gt += wt.decode(bt, { stream: !0 });
|
|
7953
|
+
let kt = gt.indexOf(`
|
|
7952
7954
|
|
|
7953
7955
|
`);
|
|
7954
|
-
for (;
|
|
7955
|
-
const Pt = gt.slice(0,
|
|
7956
|
-
gt = gt.slice(
|
|
7956
|
+
for (; kt !== -1; ) {
|
|
7957
|
+
const Pt = gt.slice(0, kt);
|
|
7958
|
+
gt = gt.slice(kt + 2);
|
|
7957
7959
|
let en = "", Rt = "";
|
|
7958
7960
|
for (const mt of Pt.split(`
|
|
7959
7961
|
`)) mt.startsWith("event: ") ? en = mt.slice(7) : mt.startsWith("data: ") && (Rt = mt.slice(6));
|
|
@@ -7962,7 +7964,7 @@ ${At}` : gt;
|
|
|
7962
7964
|
en === "token" ? At += mt.content || "" : en === "done" && (Zt = mt.metadata || {});
|
|
7963
7965
|
} catch {
|
|
7964
7966
|
}
|
|
7965
|
-
|
|
7967
|
+
kt = gt.indexOf(`
|
|
7966
7968
|
|
|
7967
7969
|
`);
|
|
7968
7970
|
}
|
|
@@ -7972,14 +7974,14 @@ ${At}` : gt;
|
|
|
7972
7974
|
const $t = fr(At);
|
|
7973
7975
|
return await Ce($t), xe?.({ type: "chatbot_answer_received", queryId: Ve, success: !0, responseLength: At.length }), "success";
|
|
7974
7976
|
}
|
|
7975
|
-
const
|
|
7976
|
-
if (
|
|
7977
|
+
const me = await Ke.json();
|
|
7978
|
+
if (me.requires_turnstile) return se.siteKey = me.site_key, se.token = null, await Ce("Still verifying — please complete the challenge again."), "needs_another_challenge";
|
|
7977
7979
|
se.token = null, se.pendingQuery = null, se.needsChallenge = !1, se.siteKey = null;
|
|
7978
|
-
const st =
|
|
7980
|
+
const st = me.response || me.answer || me.text || me.message;
|
|
7979
7981
|
if (!st) throw new Error("Invalid response format from API");
|
|
7980
|
-
const tt =
|
|
7982
|
+
const tt = me.metadata || {};
|
|
7981
7983
|
z = tt.rating_target || null, Ae = tt.is_final_response === !0, lt = Ve;
|
|
7982
|
-
const Te = fr(st), Ot = Nn() ? Zi(
|
|
7984
|
+
const Te = fr(st), Ot = Nn() ? Zi(me) : "", ut = Ot ? `${Te}
|
|
7983
7985
|
|
|
7984
7986
|
${Ot}` : Te;
|
|
7985
7987
|
return await Ce(ut), xe?.({ type: "chatbot_answer_received", queryId: Ve, success: !0, responseLength: st.length }), "success";
|
|
@@ -7987,7 +7989,7 @@ ${Ot}` : Te;
|
|
|
7987
7989
|
return ct("Error resubmitting after Turnstile:", ze), se.token = null, se.pendingQuery = null, se.needsChallenge = !1, se.siteKey = null, await Ce?.("I had trouble processing your question after verification. Please try again."), "error";
|
|
7988
7990
|
}
|
|
7989
7991
|
}, trackEvent: xe, loginUrl: _e }), path: "qa_loop" } };
|
|
7990
|
-
})({ endpoint: i, ratingEndpoint: a, agentRatingEndpoint: A, apiKey: s, sessionId:
|
|
7992
|
+
})({ endpoint: i, ratingEndpoint: a, agentRatingEndpoint: A, apiKey: s, sessionId: S.current.getSessionId, isResetting: S.current.isResetting, isLoggedIn: fe, allowAnonAccess: v, loginUrl: H || ea, trackEvent: Oe, getTurnstileToken: () => ae.current, resetTurnstileToken: () => B.reset(), backendId: L, resourceContext: X });
|
|
7991
7993
|
return Object.assign(Object.assign({ start: { message: c, renderMarkdown: ["BOT"], transition: { duration: 0 }, path: "qa_loop" } }, ie), te || {});
|
|
7992
7994
|
}, [s, i, a, A, c, fe, v, H, te, D, Oe, X, L]), Je = x.useMemo(() => {
|
|
7993
7995
|
return [() => pc(oe), pd(), () => hd(ie)];
|
|
@@ -8001,9 +8003,9 @@ ${Ot}` : Te;
|
|
|
8001
8003
|
we && (we.hasAttribute("tabindex") || we.setAttribute("tabindex", "0"), we.hasAttribute("data-keyboard-enabled") || (we.setAttribute("data-keyboard-enabled", "true"), we.addEventListener("keydown", (Ne) => {
|
|
8002
8004
|
if (Ne.key === "Enter" || Ne.key === " ") {
|
|
8003
8005
|
Ne.preventDefault();
|
|
8004
|
-
const
|
|
8005
|
-
if (
|
|
8006
|
-
const Ue = we[
|
|
8006
|
+
const Me = we && Object.keys(we).find((Ue) => Ue.startsWith("__reactProps"));
|
|
8007
|
+
if (Me) {
|
|
8008
|
+
const Ue = we[Me], Ze = Ue?.onMouseDown;
|
|
8007
8009
|
if (Ze && typeof Ze == "function") return void Ze(Ne);
|
|
8008
8010
|
}
|
|
8009
8011
|
const Le = new MouseEvent("mousedown", { bubbles: !0, cancelable: !0, view: window });
|
|
@@ -8016,9 +8018,9 @@ ${Ot}` : Te;
|
|
|
8016
8018
|
const ie = nt.current;
|
|
8017
8019
|
if (!ie) return;
|
|
8018
8020
|
const oe = (Ee) => {
|
|
8019
|
-
var we, Ne,
|
|
8021
|
+
var we, Ne, Me;
|
|
8020
8022
|
const Le = (Ne = (we = Ee.target).closest) === null || Ne === void 0 ? void 0 : Ne.call(we, "a");
|
|
8021
|
-
Le && Le.closest(".rcb-chat-body-container") && (Le.classList.contains("qa-bot-login-button") || Le.closest(".rcb-options-container") || Oe({ type: "chatbot_link_clicked", linkUrl: Le.href, linkText: ((
|
|
8023
|
+
Le && Le.closest(".rcb-chat-body-container") && (Le.classList.contains("qa-bot-login-button") || Le.closest(".rcb-options-container") || Oe({ type: "chatbot_link_clicked", linkUrl: Le.href, linkText: ((Me = Le.textContent) === null || Me === void 0 ? void 0 : Me.trim()) || "" }));
|
|
8022
8024
|
};
|
|
8023
8025
|
return ie.addEventListener("click", oe), () => ie.removeEventListener("click", oe);
|
|
8024
8026
|
}, [Oe]), x.useEffect(() => {
|
|
@@ -8081,7 +8083,7 @@ const Wd = () => {
|
|
|
8081
8083
|
const [i, a] = x.useState(!1), [l, A] = x.useState([]), [c, p] = x.useState(null), f = x.useRef(null), { captureScreenshot: m, isCapturing: v, isScreenCaptureAvailable: D } = Wd(), y = (Q) => {
|
|
8082
8084
|
const O = document.createElement("div");
|
|
8083
8085
|
O.setAttribute("aria-live", "assertive"), O.setAttribute("aria-atomic", "true"), O.className = "sr-only", O.textContent = Q, document.body.appendChild(O), setTimeout(() => document.body.removeChild(O), 1e3);
|
|
8084
|
-
},
|
|
8086
|
+
}, k = (Q) => {
|
|
8085
8087
|
if (!Q || Q.length === 0) return void pl("FileUploadComponent: No valid files provided to handleFiles");
|
|
8086
8088
|
let O;
|
|
8087
8089
|
try {
|
|
@@ -8111,7 +8113,7 @@ const Wd = () => {
|
|
|
8111
8113
|
Q.preventDefault(), (async () => {
|
|
8112
8114
|
try {
|
|
8113
8115
|
const O = await m();
|
|
8114
|
-
|
|
8116
|
+
k([O]), y("Screenshot captured successfully");
|
|
8115
8117
|
} catch {
|
|
8116
8118
|
y("Error capturing screenshot. Please try again.");
|
|
8117
8119
|
}
|
|
@@ -8120,7 +8122,7 @@ const Wd = () => {
|
|
|
8120
8122
|
var O;
|
|
8121
8123
|
Q.preventDefault(), Q.stopPropagation(), a(!1);
|
|
8122
8124
|
try {
|
|
8123
|
-
!((O = Q.dataTransfer) === null || O === void 0) && O.files && Q.dataTransfer.files.length > 0 &&
|
|
8125
|
+
!((O = Q.dataTransfer) === null || O === void 0) && O.files && Q.dataTransfer.files.length > 0 && k(Q.dataTransfer.files);
|
|
8124
8126
|
} catch (U) {
|
|
8125
8127
|
ct("FileUploadComponent: Error in handleDrop:", U), y("Error processing dropped files. Please try again.");
|
|
8126
8128
|
}
|
|
@@ -8129,7 +8131,7 @@ const Wd = () => {
|
|
|
8129
8131
|
}, style: { padding: "20px", border: "2px dashed #ccc", borderRadius: "8px", backgroundColor: i ? "#f0f8ff" : "#fafafa", transition: "all 0.3s ease" } }, V.createElement("input", { ref: f, type: "file", className: "file-input", onChange: (Q) => {
|
|
8130
8132
|
var O;
|
|
8131
8133
|
try {
|
|
8132
|
-
!((O = Q.target) === null || O === void 0) && O.files && Q.target.files.length > 0 &&
|
|
8134
|
+
!((O = Q.target) === null || O === void 0) && O.files && Q.target.files.length > 0 && k(Q.target.files);
|
|
8133
8135
|
} catch (U) {
|
|
8134
8136
|
ct("FileUploadComponent: Error in handleFileSelect:", U), y("Error processing selected files. Please try again.");
|
|
8135
8137
|
}
|
|
@@ -10088,7 +10090,7 @@ const bf = x.forwardRef(
|
|
|
10088
10090
|
welcome: D,
|
|
10089
10091
|
// Endpoint overrides
|
|
10090
10092
|
qaEndpoint: y,
|
|
10091
|
-
ratingEndpoint:
|
|
10093
|
+
ratingEndpoint: k,
|
|
10092
10094
|
agentEndpoint: I,
|
|
10093
10095
|
backendId: E,
|
|
10094
10096
|
// Resource scoping
|
|
@@ -10120,7 +10122,7 @@ const bf = x.forwardRef(
|
|
|
10120
10122
|
(de = (fe = U.current) == null ? void 0 : fe.addMessage) == null || de.call(fe, ae);
|
|
10121
10123
|
}
|
|
10122
10124
|
}));
|
|
10123
|
-
const Y = D || L?.welcome_message || On.WELCOME_MESSAGE, Z = x.useMemo(() => yf(), []),
|
|
10125
|
+
const Y = D || L?.welcome_message || On.WELCOME_MESSAGE, Z = x.useMemo(() => yf(), []), S = x.useCallback((ae) => {
|
|
10124
10126
|
_ && _({
|
|
10125
10127
|
...ae,
|
|
10126
10128
|
type: ae.type,
|
|
@@ -10138,21 +10140,21 @@ const bf = x.forwardRef(
|
|
|
10138
10140
|
const ae = $d({
|
|
10139
10141
|
welcome: Y,
|
|
10140
10142
|
setTicketForm: K,
|
|
10141
|
-
trackEvent:
|
|
10143
|
+
trackEvent: S
|
|
10142
10144
|
}), fe = cf({
|
|
10143
10145
|
ticketForm: {},
|
|
10144
10146
|
setTicketForm: K,
|
|
10145
10147
|
userInfo: te,
|
|
10146
|
-
trackEvent:
|
|
10148
|
+
trackEvent: S
|
|
10147
10149
|
}), de = df({
|
|
10148
10150
|
ticketForm: {},
|
|
10149
10151
|
setTicketForm: K,
|
|
10150
10152
|
userInfo: te,
|
|
10151
|
-
trackEvent:
|
|
10153
|
+
trackEvent: S
|
|
10152
10154
|
}), be = mf({
|
|
10153
10155
|
sessionId: Z,
|
|
10154
10156
|
apiKey: r,
|
|
10155
|
-
trackEvent:
|
|
10157
|
+
trackEvent: S
|
|
10156
10158
|
}), Oe = {
|
|
10157
10159
|
...ae,
|
|
10158
10160
|
...fe,
|
|
@@ -10160,7 +10162,7 @@ const bf = x.forwardRef(
|
|
|
10160
10162
|
...be
|
|
10161
10163
|
};
|
|
10162
10164
|
return Jd(Oe, { disableOnOptions: !0 });
|
|
10163
|
-
}, [Y, te, Z, r, n,
|
|
10165
|
+
}, [Y, te, Z, r, n, S, L]);
|
|
10164
10166
|
return L ? /* @__PURE__ */ M.jsx("div", { ref: W, children: /* @__PURE__ */ M.jsx(
|
|
10165
10167
|
Ps,
|
|
10166
10168
|
{
|
|
@@ -10171,7 +10173,7 @@ const bf = x.forwardRef(
|
|
|
10171
10173
|
onAnalyticsEvent: ce,
|
|
10172
10174
|
apiKey: r,
|
|
10173
10175
|
qaEndpoint: y || jt.QA_ENDPOINT,
|
|
10174
|
-
ratingEndpoint:
|
|
10176
|
+
ratingEndpoint: k || jt.RATING_ENDPOINT,
|
|
10175
10177
|
backendId: O,
|
|
10176
10178
|
botName: On.BOT_NAME,
|
|
10177
10179
|
logo: On.LOGO,
|