lr-chatbot 0.48.43 → 0.48.47
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/index.js +554 -549
- package/index.js.map +1 -1
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -485,7 +485,7 @@ function A(e) {
|
|
|
485
485
|
return e;
|
|
486
486
|
}
|
|
487
487
|
function ne(e, t, n) {
|
|
488
|
-
return (t =
|
|
488
|
+
return (t = ie(t)) in e ? Object.defineProperty(e, t, {
|
|
489
489
|
value: n,
|
|
490
490
|
enumerable: !0,
|
|
491
491
|
configurable: !0,
|
|
@@ -503,20 +503,20 @@ function j(e) {
|
|
|
503
503
|
function M(e, t) {
|
|
504
504
|
if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
|
|
505
505
|
}
|
|
506
|
-
function
|
|
506
|
+
function re(e, t) {
|
|
507
507
|
for (var n = 0; n < t.length; n++) {
|
|
508
508
|
var r = t[n];
|
|
509
|
-
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e,
|
|
509
|
+
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, ie(r.key), r);
|
|
510
510
|
}
|
|
511
511
|
}
|
|
512
|
-
function
|
|
513
|
-
return t &&
|
|
512
|
+
function N(e, t, n) {
|
|
513
|
+
return t && re(e.prototype, t), n && re(e, n), Object.defineProperty(e, "prototype", { writable: !1 }), e;
|
|
514
514
|
}
|
|
515
|
-
function
|
|
516
|
-
var t =
|
|
515
|
+
function ie(e) {
|
|
516
|
+
var t = ae(e, "string");
|
|
517
517
|
return j(t) == "symbol" ? t : t + "";
|
|
518
518
|
}
|
|
519
|
-
function
|
|
519
|
+
function ae(e, t) {
|
|
520
520
|
if (j(e) != "object" || !e) return e;
|
|
521
521
|
var n = e[Symbol.toPrimitive];
|
|
522
522
|
if (n !== void 0) {
|
|
@@ -526,22 +526,22 @@ function ie(e, t) {
|
|
|
526
526
|
}
|
|
527
527
|
return (t === "string" ? String : Number)(e);
|
|
528
528
|
}
|
|
529
|
-
var
|
|
529
|
+
var oe = /*#__PURE__*/ function() {
|
|
530
530
|
function e() {
|
|
531
531
|
M(this, e);
|
|
532
532
|
}
|
|
533
|
-
return
|
|
533
|
+
return N(e, null, [{
|
|
534
534
|
key: "render",
|
|
535
535
|
value: function(e, t) {
|
|
536
536
|
var n = document.createElement("div");
|
|
537
537
|
n.id = "error-view", n.innerText = t, e.replaceChildren(n);
|
|
538
538
|
}
|
|
539
539
|
}]);
|
|
540
|
-
}(),
|
|
540
|
+
}(), se = /*#__PURE__*/ function() {
|
|
541
541
|
function e() {
|
|
542
542
|
M(this, e);
|
|
543
543
|
}
|
|
544
|
-
return
|
|
544
|
+
return N(e, null, [
|
|
545
545
|
{
|
|
546
546
|
key: "onLoad",
|
|
547
547
|
value: function(e) {
|
|
@@ -560,18 +560,18 @@ var ae = /*#__PURE__*/ function() {
|
|
|
560
560
|
value: function(t, n, r) {
|
|
561
561
|
var i = e.createElements(), a = {
|
|
562
562
|
onSuccess: n,
|
|
563
|
-
onFail:
|
|
563
|
+
onFail: oe.render.bind(this, t, "Your 'key' has failed authentication"),
|
|
564
564
|
onLoad: e.onLoad.bind(this, i)
|
|
565
565
|
};
|
|
566
566
|
r.key && r.verifyKey(r.key, a), t.replaceChildren(i);
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
569
|
]);
|
|
570
|
-
}(),
|
|
570
|
+
}(), ce = /*#__PURE__*/ function() {
|
|
571
571
|
function e() {
|
|
572
572
|
M(this, e);
|
|
573
573
|
}
|
|
574
|
-
return
|
|
574
|
+
return N(e, null, [
|
|
575
575
|
{
|
|
576
576
|
key: "unsetStyle",
|
|
577
577
|
value: function(e, t) {
|
|
@@ -636,11 +636,11 @@ var ae = /*#__PURE__*/ function() {
|
|
|
636
636
|
}
|
|
637
637
|
}
|
|
638
638
|
]);
|
|
639
|
-
}(),
|
|
639
|
+
}(), le = /*#__PURE__*/ function() {
|
|
640
640
|
function e() {
|
|
641
641
|
M(this, e);
|
|
642
642
|
}
|
|
643
|
-
return
|
|
643
|
+
return N(e, null, [{
|
|
644
644
|
key: "attemptAppendStyleSheetToHead",
|
|
645
645
|
value: function(t) {
|
|
646
646
|
if (!(t.fontFamily && t.fontFamily !== e.DEFAULT_FONT_FAMILY)) {
|
|
@@ -655,12 +655,12 @@ var ae = /*#__PURE__*/ function() {
|
|
|
655
655
|
}
|
|
656
656
|
}]);
|
|
657
657
|
}();
|
|
658
|
-
|
|
659
|
-
var
|
|
658
|
+
le.FONT_URL = "https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap", le.DEFAULT_FONT_FAMILY = "'Inter', sans-serif, Avenir, Helvetica, Arial";
|
|
659
|
+
var ue = le, de = /*#__PURE__*/ function() {
|
|
660
660
|
function e() {
|
|
661
661
|
M(this, e);
|
|
662
662
|
}
|
|
663
|
-
return
|
|
663
|
+
return N(e, null, [
|
|
664
664
|
{
|
|
665
665
|
key: "apply",
|
|
666
666
|
value: function(t, n) {
|
|
@@ -688,30 +688,30 @@ var le = ce, ue = /*#__PURE__*/ function() {
|
|
|
688
688
|
{
|
|
689
689
|
key: "applyDefaultStyleToComponent",
|
|
690
690
|
value: function(t, n) {
|
|
691
|
-
n &&
|
|
691
|
+
n && ce.applyToStyleIfNotDefined(t, n), ce.applyToStyleIfNotDefined(t, e.DEFAULT_COMPONENT_STYLE);
|
|
692
692
|
}
|
|
693
693
|
}
|
|
694
694
|
]);
|
|
695
695
|
}();
|
|
696
|
-
|
|
696
|
+
de.DEFAULT_COMPONENT_STYLE = {
|
|
697
697
|
height: "350px",
|
|
698
698
|
width: "320px",
|
|
699
699
|
border: "1px solid #cacaca",
|
|
700
|
-
fontFamily:
|
|
700
|
+
fontFamily: ue.DEFAULT_FONT_FAMILY,
|
|
701
701
|
fontSize: "0.9rem",
|
|
702
702
|
backgroundColor: "white",
|
|
703
703
|
position: "relative",
|
|
704
704
|
overflow: "hidden"
|
|
705
705
|
};
|
|
706
|
-
var
|
|
706
|
+
var fe = de, P = /* @__PURE__ */ function(e) {
|
|
707
707
|
return e.ESCAPE = "Escape", e.ENTER = "Enter", e.TAB = "Tab", e.ARROW_UP = "ArrowUp", e.ARROW_DOWN = "ArrowDown", e.ARROW_RIGHT = "ArrowRight", e.ARROW_LEFT = "ArrowLeft", e.BACKSPACE = "Backspace", e.DELETE = "Delete", e.META = "Meta", e.CONTROL = "Control", e;
|
|
708
|
-
}(
|
|
708
|
+
}(P || {}), pe, F = (pe = /*#__PURE__*/ N(function e() {
|
|
709
709
|
M(this, e);
|
|
710
|
-
}), pe.IS_SAFARI = /^((?!chrome|android).)*safari/i.test(navigator.userAgent), pe.IS_CHROMIUM = window.chrome, pe),
|
|
710
|
+
}), pe.IS_SAFARI = /^((?!chrome|android).)*safari/i.test(navigator.userAgent), pe.IS_CHROMIUM = window.chrome, pe), me = /*#__PURE__*/ function() {
|
|
711
711
|
function e() {
|
|
712
712
|
M(this, e);
|
|
713
713
|
}
|
|
714
|
-
return
|
|
714
|
+
return N(e, null, [
|
|
715
715
|
{
|
|
716
716
|
key: "add",
|
|
717
717
|
value: function(t, n, r, i) {
|
|
@@ -738,27 +738,27 @@ var de = ue, fe = /* @__PURE__ */ function(e) {
|
|
|
738
738
|
key: "onInput",
|
|
739
739
|
value: function(e, t, n) {
|
|
740
740
|
var r = n.target, i = r.textContent || "";
|
|
741
|
-
e !== void 0 && i.length > e && (r.textContent = i.substring(0, e),
|
|
741
|
+
e !== void 0 && i.length > e && (r.textContent = i.substring(0, e), ye.focusEndOfInput(r)), t?.();
|
|
742
742
|
}
|
|
743
743
|
}
|
|
744
744
|
]);
|
|
745
745
|
}();
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
746
|
+
me.PERMITTED_KEYS = /* @__PURE__ */ new Set([
|
|
747
|
+
P.BACKSPACE,
|
|
748
|
+
P.DELETE,
|
|
749
|
+
P.ARROW_RIGHT,
|
|
750
|
+
P.ARROW_LEFT,
|
|
751
|
+
P.ARROW_DOWN,
|
|
752
|
+
P.ARROW_UP,
|
|
753
|
+
P.META,
|
|
754
|
+
P.CONTROL,
|
|
755
|
+
P.ENTER
|
|
756
756
|
]);
|
|
757
|
-
var
|
|
757
|
+
var he = me, ge = /*#__PURE__*/ function() {
|
|
758
758
|
function e() {
|
|
759
759
|
M(this, e);
|
|
760
760
|
}
|
|
761
|
-
return
|
|
761
|
+
return N(e, null, [{
|
|
762
762
|
key: "sanitizePastedTextContent",
|
|
763
763
|
value: function(e) {
|
|
764
764
|
var t;
|
|
@@ -767,42 +767,42 @@ var ge = he, _e = /*#__PURE__*/ function() {
|
|
|
767
767
|
n && ((t = document.execCommand) == null || t.call(document, "insertText", !1, n));
|
|
768
768
|
}
|
|
769
769
|
}]);
|
|
770
|
-
}(),
|
|
770
|
+
}(), _e = /*#__PURE__*/ function() {
|
|
771
771
|
function e(t, n, r) {
|
|
772
772
|
var i = this;
|
|
773
773
|
M(this, e);
|
|
774
774
|
var a = e.processConfig(n, t.textInput);
|
|
775
775
|
this.elementRef = e.createContainerElement(a?.styles?.container), this.inputElementRef = this.createInputElement(a), this._config = a, this.elementRef.appendChild(this.inputElementRef), t.setPlaceholderText = this.setPlaceholderText.bind(this, t), t.setPlaceholderText(t.textInput?.placeholder?.text || "Ask me anything!"), setTimeout(function() {
|
|
776
|
-
|
|
776
|
+
he.add(i.inputElementRef, r, t.textInput?.characterLimit, t._validationHandler);
|
|
777
777
|
});
|
|
778
778
|
}
|
|
779
|
-
return
|
|
779
|
+
return N(e, [
|
|
780
780
|
{
|
|
781
781
|
key: "createInputElement",
|
|
782
782
|
value: function(t) {
|
|
783
783
|
var n = document.createElement("div");
|
|
784
|
-
return n.id = e.TEXT_INPUT_ID, n.classList.add("text-input-styling", e.PLACEHOLDER_TEXT_CLASS),
|
|
784
|
+
return n.id = e.TEXT_INPUT_ID, n.classList.add("text-input-styling", e.PLACEHOLDER_TEXT_CLASS), F.IS_CHROMIUM && e.preventAutomaticScrollUpOnNewLine(n), typeof t?.disabled == "boolean" && t.disabled === !0 ? (n.contentEditable = "false", n.classList.add("text-input-disabled")) : (n.contentEditable = "true", this.addEventListeners(n, t)), Object.assign(n.style, t?.styles?.text), Object.assign(n.style, t?.placeholder?.style), n;
|
|
785
785
|
}
|
|
786
786
|
},
|
|
787
787
|
{
|
|
788
788
|
key: "removeTextIfPlaceholder",
|
|
789
789
|
value: function() {
|
|
790
790
|
var t;
|
|
791
|
-
this.inputElementRef.classList.contains(e.PLACEHOLDER_TEXT_CLASS) && !this.inputElementRef.classList.contains("text-input-disabled") && ((t = this._config.placeholder) != null && t.style && (
|
|
791
|
+
this.inputElementRef.classList.contains(e.PLACEHOLDER_TEXT_CLASS) && !this.inputElementRef.classList.contains("text-input-disabled") && ((t = this._config.placeholder) != null && t.style && (ce.unsetStyle(this.inputElementRef, this._config.placeholder?.style), Object.assign(this.inputElementRef.style, this._config?.styles?.text)), e.clear(this.inputElementRef), this.inputElementRef.classList.remove(e.PLACEHOLDER_TEXT_CLASS));
|
|
792
792
|
}
|
|
793
793
|
},
|
|
794
794
|
{
|
|
795
795
|
key: "addEventListeners",
|
|
796
796
|
value: function(e, t) {
|
|
797
797
|
var n;
|
|
798
|
-
e.onfocus = this.onFocus.bind(this, t?.styles?.focus), (n = t?.styles) != null && n.focus && (e.onblur = this.onBlur.bind(this, t.styles.focus, t?.styles?.container)), e.addEventListener("keydown", this.onKeydown.bind(this)), e.addEventListener("paste",
|
|
798
|
+
e.onfocus = this.onFocus.bind(this, t?.styles?.focus), (n = t?.styles) != null && n.focus && (e.onblur = this.onBlur.bind(this, t.styles.focus, t?.styles?.container)), e.addEventListener("keydown", this.onKeydown.bind(this)), e.addEventListener("paste", ge.sanitizePastedTextContent);
|
|
799
799
|
}
|
|
800
800
|
},
|
|
801
801
|
{
|
|
802
802
|
key: "onFocus",
|
|
803
803
|
value: function(e) {
|
|
804
804
|
var t = this;
|
|
805
|
-
|
|
805
|
+
F.IS_SAFARI ? setTimeout(function() {
|
|
806
806
|
t.removeTextIfPlaceholder();
|
|
807
807
|
}) : this.removeTextIfPlaceholder(), Object.assign(this.elementRef.style, e);
|
|
808
808
|
}
|
|
@@ -810,14 +810,14 @@ var ge = he, _e = /*#__PURE__*/ function() {
|
|
|
810
810
|
{
|
|
811
811
|
key: "onBlur",
|
|
812
812
|
value: function(e, t) {
|
|
813
|
-
|
|
813
|
+
ce.unsetStyle(this.elementRef, e), t && Object.assign(this.elementRef.style, t);
|
|
814
814
|
}
|
|
815
815
|
},
|
|
816
816
|
{
|
|
817
817
|
key: "onKeydown",
|
|
818
818
|
value: function(e) {
|
|
819
819
|
var t;
|
|
820
|
-
e.key ===
|
|
820
|
+
e.key === P.ENTER && !e.ctrlKey && !e.shiftKey && (e.preventDefault(), (t = this.submit) == null || t.call(this));
|
|
821
821
|
}
|
|
822
822
|
},
|
|
823
823
|
{
|
|
@@ -849,7 +849,7 @@ var ge = he, _e = /*#__PURE__*/ function() {
|
|
|
849
849
|
key: "clear",
|
|
850
850
|
value: function(e) {
|
|
851
851
|
var t = window.scrollY;
|
|
852
|
-
e.classList.contains("text-input-disabled") || (e.textContent = ""),
|
|
852
|
+
e.classList.contains("text-input-disabled") || (e.textContent = ""), F.IS_CHROMIUM && window.scrollTo({ top: t });
|
|
853
853
|
}
|
|
854
854
|
},
|
|
855
855
|
{
|
|
@@ -867,12 +867,12 @@ var ge = he, _e = /*#__PURE__*/ function() {
|
|
|
867
867
|
}
|
|
868
868
|
]);
|
|
869
869
|
}();
|
|
870
|
-
|
|
871
|
-
var
|
|
870
|
+
_e.TEXT_INPUT_ID = "text-input", _e.PLACEHOLDER_TEXT_CLASS = "text-input-placeholder";
|
|
871
|
+
var ve = _e, ye = /*#__PURE__*/ function() {
|
|
872
872
|
function e() {
|
|
873
873
|
M(this, e);
|
|
874
874
|
}
|
|
875
|
-
return
|
|
875
|
+
return N(e, null, [{
|
|
876
876
|
key: "focusEndOfInput",
|
|
877
877
|
value: function(e) {
|
|
878
878
|
var t = document.createRange();
|
|
@@ -883,50 +883,50 @@ var ye = ve, be = /*#__PURE__*/ function() {
|
|
|
883
883
|
}, {
|
|
884
884
|
key: "focusFromParentElement",
|
|
885
885
|
value: function(t) {
|
|
886
|
-
var n = t.querySelector(`#${
|
|
886
|
+
var n = t.querySelector(`#${ve.TEXT_INPUT_ID}`);
|
|
887
887
|
n && e.focusEndOfInput(n);
|
|
888
888
|
}
|
|
889
889
|
}]);
|
|
890
890
|
}();
|
|
891
|
-
function
|
|
891
|
+
function be(e) {
|
|
892
892
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
893
893
|
}
|
|
894
|
-
function
|
|
894
|
+
function xe(e) {
|
|
895
895
|
return e && JSON.stringify(e);
|
|
896
896
|
}
|
|
897
|
-
function
|
|
897
|
+
function Se(e, t, n, r) {
|
|
898
898
|
return `
|
|
899
|
-
${
|
|
900
|
-
` + (n ? `${
|
|
899
|
+
${be(t)} message: ${JSON.stringify(e)}
|
|
900
|
+
` + (n ? `${be(t)} message after interceptor: ${xe(r)}
|
|
901
901
|
` : "");
|
|
902
902
|
}
|
|
903
|
-
function
|
|
904
|
-
return `${
|
|
903
|
+
function Ce(e, t, n, r) {
|
|
904
|
+
return `${Se(e, t, n, r)}Make sure the ${t} message is using the Response format: https://deepchat.dev/docs/connect/#Response
|
|
905
905
|
You can also augment it using the responseInterceptor property: https://deepchat.dev/docs/interceptors#responseInterceptor`;
|
|
906
906
|
}
|
|
907
|
-
function
|
|
907
|
+
function we(e, t, n) {
|
|
908
908
|
var r = "response";
|
|
909
|
-
return `${
|
|
909
|
+
return `${Se(e, r, t, n)}Make sure the ${r} message is using the {text: string} format, e.g: {text: "Model Response"}`;
|
|
910
910
|
}
|
|
911
|
-
function
|
|
911
|
+
function Te(e, t) {
|
|
912
912
|
var n = "request";
|
|
913
|
-
return `${
|
|
913
|
+
return `${Se(e, n, t)}Make sure the ${n} message is using the {body: {text: string}} format, e.g: {body: {text: "Model Response"}}`;
|
|
914
914
|
}
|
|
915
|
-
var
|
|
915
|
+
var Ee = "Make sure the events are using {text: string} or {html: string} format.\nYou can also augment them using the responseInterceptor property: https://deepchat.dev/docs/interceptors#responseInterceptor", De = {
|
|
916
916
|
INVALID_KEY: "Invalid API Key",
|
|
917
917
|
CONNECTION_FAILED: "Failed to connect",
|
|
918
|
-
INVALID_RESPONSE:
|
|
919
|
-
INVALID_MODEL_REQUEST:
|
|
920
|
-
INVALID_MODEL_RESPONSE:
|
|
921
|
-
INVALID_STREAM_EVENT:
|
|
918
|
+
INVALID_RESPONSE: Ce,
|
|
919
|
+
INVALID_MODEL_REQUEST: Te,
|
|
920
|
+
INVALID_MODEL_RESPONSE: we,
|
|
921
|
+
INVALID_STREAM_EVENT: Ee,
|
|
922
922
|
INVALID_STREAM_EVENT_MIX: "Cannot mix {text: string} and {html: string} responses.",
|
|
923
923
|
NO_VALID_STREAM_EVENTS_SENT: `No valid stream events were sent.
|
|
924
|
-
${
|
|
924
|
+
${Ee}`
|
|
925
925
|
}, Oe = /*#__PURE__*/ function() {
|
|
926
926
|
function e() {
|
|
927
927
|
M(this, e);
|
|
928
928
|
}
|
|
929
|
-
return
|
|
929
|
+
return N(e, null, [
|
|
930
930
|
{
|
|
931
931
|
key: "addElements",
|
|
932
932
|
value: function(e) {
|
|
@@ -968,7 +968,7 @@ var ke = Oe, Ae = /*#__PURE__*/ function() {
|
|
|
968
968
|
function e() {
|
|
969
969
|
M(this, e);
|
|
970
970
|
}
|
|
971
|
-
return
|
|
971
|
+
return N(e, null, [{
|
|
972
972
|
key: "speak",
|
|
973
973
|
value: function(e, t) {
|
|
974
974
|
if (window.SpeechSynthesisUtterance) {
|
|
@@ -997,7 +997,7 @@ var je = Ae, Me = /*#__PURE__*/ function() {
|
|
|
997
997
|
function e() {
|
|
998
998
|
M(this, e);
|
|
999
999
|
}
|
|
1000
|
-
return
|
|
1000
|
+
return N(e, null, [
|
|
1001
1001
|
{
|
|
1002
1002
|
key: "checkForContainerStyles",
|
|
1003
1003
|
value: function(e, t) {
|
|
@@ -1078,7 +1078,7 @@ var je = Ae, Me = /*#__PURE__*/ function() {
|
|
|
1078
1078
|
function e() {
|
|
1079
1079
|
M(this, e);
|
|
1080
1080
|
}
|
|
1081
|
-
return
|
|
1081
|
+
return N(e, null, [
|
|
1082
1082
|
{
|
|
1083
1083
|
key: "hide",
|
|
1084
1084
|
value: function(t) {
|
|
@@ -1134,7 +1134,7 @@ var Ie = Fe, Le = /*#__PURE__*/ function() {
|
|
|
1134
1134
|
function e() {
|
|
1135
1135
|
M(this, e);
|
|
1136
1136
|
}
|
|
1137
|
-
return
|
|
1137
|
+
return N(e, null, [
|
|
1138
1138
|
{
|
|
1139
1139
|
key: "hide",
|
|
1140
1140
|
value: function(t) {
|
|
@@ -1182,7 +1182,7 @@ var Re = Le, ze = /*#__PURE__*/ function() {
|
|
|
1182
1182
|
function e() {
|
|
1183
1183
|
M(this, e);
|
|
1184
1184
|
}
|
|
1185
|
-
return
|
|
1185
|
+
return N(e, null, [
|
|
1186
1186
|
{
|
|
1187
1187
|
key: "getLastElementsByClass",
|
|
1188
1188
|
value: function(e, t, n) {
|
|
@@ -1277,11 +1277,11 @@ var I = ze, Be = /*#__PURE__*/ function() {
|
|
|
1277
1277
|
function e() {
|
|
1278
1278
|
M(this, e);
|
|
1279
1279
|
}
|
|
1280
|
-
return
|
|
1280
|
+
return N(e, null, [
|
|
1281
1281
|
{
|
|
1282
1282
|
key: "mouseUp",
|
|
1283
1283
|
value: function(e, t) {
|
|
1284
|
-
|
|
1284
|
+
ce.unsetAllCSSMouseStates(e, t), Object.assign(e.style, t.default), Object.assign(e.style, t.hover);
|
|
1285
1285
|
}
|
|
1286
1286
|
},
|
|
1287
1287
|
{
|
|
@@ -1293,7 +1293,7 @@ var I = ze, Be = /*#__PURE__*/ function() {
|
|
|
1293
1293
|
{
|
|
1294
1294
|
key: "mouseLeave",
|
|
1295
1295
|
value: function(e, t) {
|
|
1296
|
-
|
|
1296
|
+
ce.unsetAllCSSMouseStates(e, t), Object.assign(e.style, t.default);
|
|
1297
1297
|
}
|
|
1298
1298
|
},
|
|
1299
1299
|
{
|
|
@@ -1325,7 +1325,7 @@ var I = ze, Be = /*#__PURE__*/ function() {
|
|
|
1325
1325
|
function e() {
|
|
1326
1326
|
M(this, e);
|
|
1327
1327
|
}
|
|
1328
|
-
return
|
|
1328
|
+
return N(e, null, [
|
|
1329
1329
|
{
|
|
1330
1330
|
key: "applySuggestionEvent",
|
|
1331
1331
|
value: function(e, t) {
|
|
@@ -1369,10 +1369,10 @@ var I = ze, Be = /*#__PURE__*/ function() {
|
|
|
1369
1369
|
}, []), i = Ue[n].styles;
|
|
1370
1370
|
if (i) {
|
|
1371
1371
|
var a = JSON.parse(JSON.stringify(i));
|
|
1372
|
-
a.default &&
|
|
1372
|
+
a.default && ce.overwriteDefaultWithAlreadyApplied(a, t), r.unshift(a);
|
|
1373
1373
|
}
|
|
1374
|
-
var o =
|
|
1375
|
-
return
|
|
1374
|
+
var o = ce.mergeStatefulStyles(r);
|
|
1375
|
+
return ce.processStateful(o, {}, {});
|
|
1376
1376
|
}
|
|
1377
1377
|
},
|
|
1378
1378
|
{
|
|
@@ -1396,11 +1396,11 @@ var I = ze, Be = /*#__PURE__*/ function() {
|
|
|
1396
1396
|
function e() {
|
|
1397
1397
|
M(this, e);
|
|
1398
1398
|
}
|
|
1399
|
-
return
|
|
1399
|
+
return N(e, null, [
|
|
1400
1400
|
{
|
|
1401
1401
|
key: "applyStylesToElement",
|
|
1402
1402
|
value: function(e, t) {
|
|
1403
|
-
var n =
|
|
1403
|
+
var n = ce.processStateful(t, {}, {});
|
|
1404
1404
|
Be.add(e, n), Object.assign(e.style, n.default);
|
|
1405
1405
|
}
|
|
1406
1406
|
},
|
|
@@ -1459,7 +1459,7 @@ var I = ze, Be = /*#__PURE__*/ function() {
|
|
|
1459
1459
|
function e() {
|
|
1460
1460
|
M(this, e);
|
|
1461
1461
|
}
|
|
1462
|
-
return
|
|
1462
|
+
return N(e, null, [
|
|
1463
1463
|
{
|
|
1464
1464
|
key: "addElement",
|
|
1465
1465
|
value: function(e, t) {
|
|
@@ -3098,7 +3098,7 @@ var cr = /*#__PURE__*/ function() {
|
|
|
3098
3098
|
function e() {
|
|
3099
3099
|
M(this, e);
|
|
3100
3100
|
}
|
|
3101
|
-
return
|
|
3101
|
+
return N(e, null, [{
|
|
3102
3102
|
key: "instantiate",
|
|
3103
3103
|
value: function() {
|
|
3104
3104
|
var e = window.hljs;
|
|
@@ -3140,7 +3140,7 @@ var cr = /*#__PURE__*/ function() {
|
|
|
3140
3140
|
function e() {
|
|
3141
3141
|
M(this, e);
|
|
3142
3142
|
}
|
|
3143
|
-
return
|
|
3143
|
+
return N(e, null, [
|
|
3144
3144
|
{
|
|
3145
3145
|
key: "addMessage",
|
|
3146
3146
|
value: function(e, t, n, r, i) {
|
|
@@ -3231,7 +3231,7 @@ var ur = lr, dr = /*#__PURE__*/ function() {
|
|
|
3231
3231
|
function e() {
|
|
3232
3232
|
M(this, e);
|
|
3233
3233
|
}
|
|
3234
|
-
return
|
|
3234
|
+
return N(e, null, [
|
|
3235
3235
|
{
|
|
3236
3236
|
key: "onMessage",
|
|
3237
3237
|
value: function(e, t, n) {
|
|
@@ -3269,7 +3269,7 @@ var ur = lr, dr = /*#__PURE__*/ function() {
|
|
|
3269
3269
|
function e() {
|
|
3270
3270
|
M(this, e);
|
|
3271
3271
|
}
|
|
3272
|
-
return
|
|
3272
|
+
return N(e, null, [
|
|
3273
3273
|
{
|
|
3274
3274
|
key: "applyCustomStylesToElements",
|
|
3275
3275
|
value: function(e, t, n) {
|
|
@@ -3321,7 +3321,7 @@ var ur = lr, dr = /*#__PURE__*/ function() {
|
|
|
3321
3321
|
n.submitUserMessage = t.submitUserMessage;
|
|
3322
3322
|
});
|
|
3323
3323
|
}
|
|
3324
|
-
return
|
|
3324
|
+
return N(e, [
|
|
3325
3325
|
{
|
|
3326
3326
|
key: "addNewTextMessage",
|
|
3327
3327
|
value: function(e, t, n) {
|
|
@@ -3472,16 +3472,16 @@ var ur = lr, dr = /*#__PURE__*/ function() {
|
|
|
3472
3472
|
function e(t) {
|
|
3473
3473
|
M(this, e), this._fileAdded = !1, this._streamedContent = "", this._streamType = "", this._hasStreamEnded = !1, this._messages = t;
|
|
3474
3474
|
}
|
|
3475
|
-
return
|
|
3475
|
+
return N(e, [
|
|
3476
3476
|
{
|
|
3477
3477
|
key: "upsertStreamedMessage",
|
|
3478
3478
|
value: function(e) {
|
|
3479
3479
|
if (!this._hasStreamEnded) {
|
|
3480
|
-
if (e?.text === void 0 && e?.html === void 0) return console.error(
|
|
3480
|
+
if (e?.text === void 0 && e?.html === void 0) return console.error(De.INVALID_STREAM_EVENT);
|
|
3481
3481
|
var t = e?.text || e?.html || "", n = ke.isScrollbarAtBottomOfElement(this._messages.elementRef), r = e?.text === void 0 ? "html" : "text";
|
|
3482
3482
|
if (!this._elements && this._streamedContent === "") this.setInitialState(r, t, e?.role);
|
|
3483
3483
|
else {
|
|
3484
|
-
if (this._streamType !== r) return console.error(
|
|
3484
|
+
if (this._streamType !== r) return console.error(De.INVALID_STREAM_EVENT_MIX);
|
|
3485
3485
|
this.updateBasedOnType(t, r, this._elements?.bubbleElement, e?.overwrite);
|
|
3486
3486
|
}
|
|
3487
3487
|
n && ke.scrollToBottom(this._messages.elementRef);
|
|
@@ -3522,7 +3522,7 @@ var ur = lr, dr = /*#__PURE__*/ function() {
|
|
|
3522
3522
|
value: function() {
|
|
3523
3523
|
var t, n = this._messages.textElementsToText;
|
|
3524
3524
|
if (!this._endStreamAfterOperation && !(this._fileAdded && !this._elements)) {
|
|
3525
|
-
if (!this._elements) throw Error(
|
|
3525
|
+
if (!this._elements) throw Error(De.NO_VALID_STREAM_EVENTS_SENT);
|
|
3526
3526
|
(t = this._elements.bubbleElement) != null && t.classList.contains(e.MESSAGE_CLASS) && (this._streamType === "text" ? (n[n.length - 1][1] = this._streamedContent, this._message && (this._message.text = this._streamedContent), this._messages.textToSpeech && je.speak(this._streamedContent, this._messages.textToSpeech)) : this._streamType === "html" && (this._streamedContent === e.HTML_CONTENT_PLACEHOLDER && (this._streamedContent = this._elements.bubbleElement?.innerHTML || ""), this._elements && Ke.apply(this._messages, this._elements.outerContainer), this._message && (this._message.html = this._streamedContent)), this._message && this._messages.sendClientUpdate(pr.createMessageContent(this._message), !1), this._hasStreamEnded = !0);
|
|
3527
3527
|
}
|
|
3528
3528
|
}
|
|
@@ -3566,7 +3566,7 @@ var hr = mr, gr = /*#__PURE__*/ function() {
|
|
|
3566
3566
|
function e() {
|
|
3567
3567
|
M(this, e);
|
|
3568
3568
|
}
|
|
3569
|
-
return
|
|
3569
|
+
return N(e, null, [
|
|
3570
3570
|
{
|
|
3571
3571
|
key: "tempRemoveContentHeader",
|
|
3572
3572
|
value: function() {
|
|
@@ -3832,7 +3832,7 @@ var kr = /*#__PURE__*/ function() {
|
|
|
3832
3832
|
function e() {
|
|
3833
3833
|
M(this, e);
|
|
3834
3834
|
}
|
|
3835
|
-
return
|
|
3835
|
+
return N(e, null, [
|
|
3836
3836
|
{
|
|
3837
3837
|
key: "request",
|
|
3838
3838
|
value: function() {
|
|
@@ -4016,7 +4016,7 @@ var kr = /*#__PURE__*/ function() {
|
|
|
4016
4016
|
function e() {
|
|
4017
4017
|
M(this, e);
|
|
4018
4018
|
}
|
|
4019
|
-
return
|
|
4019
|
+
return N(e, null, [
|
|
4020
4020
|
{
|
|
4021
4021
|
key: "generateResponse",
|
|
4022
4022
|
value: function(e) {
|
|
@@ -4084,7 +4084,7 @@ var jr = Ar, Mr = /*#__PURE__*/ function() {
|
|
|
4084
4084
|
function e() {
|
|
4085
4085
|
M(this, e);
|
|
4086
4086
|
}
|
|
4087
|
-
return
|
|
4087
|
+
return N(e, null, [
|
|
4088
4088
|
{
|
|
4089
4089
|
key: "setup",
|
|
4090
4090
|
value: function(e) {
|
|
@@ -4155,7 +4155,7 @@ var jr = Ar, Mr = /*#__PURE__*/ function() {
|
|
|
4155
4155
|
n.next = 14;
|
|
4156
4156
|
break;
|
|
4157
4157
|
}
|
|
4158
|
-
throw Error(
|
|
4158
|
+
throw Error(De.INVALID_RESPONSE(c, "server", !!t.deepChat.responseInterceptor, l));
|
|
4159
4159
|
case 14:
|
|
4160
4160
|
kr.isSimulation(t.stream) ? (d = e.stream.bind(i, t, r, a), f = a[c.role || I.AI_ROLE], kr.upsertWFiles(r, d, f, u)) : r.addNewMessage(u), n.next = 20;
|
|
4161
4161
|
break;
|
|
@@ -4249,7 +4249,7 @@ var jr = Ar, Mr = /*#__PURE__*/ function() {
|
|
|
4249
4249
|
function e() {
|
|
4250
4250
|
M(this, e);
|
|
4251
4251
|
}
|
|
4252
|
-
return
|
|
4252
|
+
return N(e, null, [
|
|
4253
4253
|
{
|
|
4254
4254
|
key: "request",
|
|
4255
4255
|
value: function() {
|
|
@@ -4275,7 +4275,7 @@ var jr = Ar, Mr = /*#__PURE__*/ function() {
|
|
|
4275
4275
|
break;
|
|
4276
4276
|
}
|
|
4277
4277
|
e.t0 = t;
|
|
4278
|
-
case 8: a = e.t0, R.validateResponseFormat(a) ? typeof a.error == "string" ? (console.error(a.error), i.addNewErrorMessage("service", a.error), n.completionsHandlers.onFinish()) : kr.isSimulatable(n.stream, a) ? kr.simulate(i, n.streamHandlers, a) : (i.addNewMessage(a), n.completionsHandlers.onFinish()) : (console.error(
|
|
4278
|
+
case 8: a = e.t0, R.validateResponseFormat(a) ? typeof a.error == "string" ? (console.error(a.error), i.addNewErrorMessage("service", a.error), n.completionsHandlers.onFinish()) : kr.isSimulatable(n.stream, a) ? kr.simulate(i, n.streamHandlers, a) : (i.addNewMessage(a), n.completionsHandlers.onFinish()) : (console.error(De.INVALID_RESPONSE(t, "server", !!n.deepChat.responseInterceptor, a)), i.addNewErrorMessage("service", "Error in server message"), n.completionsHandlers.onFinish());
|
|
4279
4279
|
case 10:
|
|
4280
4280
|
case "end": return e.stop();
|
|
4281
4281
|
}
|
|
@@ -4331,7 +4331,7 @@ var jr = Ar, Mr = /*#__PURE__*/ function() {
|
|
|
4331
4331
|
break;
|
|
4332
4332
|
}
|
|
4333
4333
|
e.t0 = n;
|
|
4334
|
-
case 7: a = e.t0, R.validateResponseFormat(a) ? a.error ? (console.error(a.error), c.finaliseStreamedMessage(), r.addNewErrorMessage("service", a.error), t.streamHandlers.onClose(), o = !1) : kr.upsertWFiles(r, c.upsertStreamedMessage.bind(c), c, a) : console.error(
|
|
4334
|
+
case 7: a = e.t0, R.validateResponseFormat(a) ? a.error ? (console.error(a.error), c.finaliseStreamedMessage(), r.addNewErrorMessage("service", a.error), t.streamHandlers.onClose(), o = !1) : kr.upsertWFiles(r, c.upsertStreamedMessage.bind(c), c, a) : console.error(De.INVALID_RESPONSE(n, "server", !!t.deepChat.responseInterceptor, a));
|
|
4335
4335
|
case 9:
|
|
4336
4336
|
case "end": return e.stop();
|
|
4337
4337
|
}
|
|
@@ -4384,7 +4384,7 @@ var jr = Ar, Mr = /*#__PURE__*/ function() {
|
|
|
4384
4384
|
break;
|
|
4385
4385
|
}
|
|
4386
4386
|
e.t0 = i;
|
|
4387
|
-
case 7: s = e.t0, R.validateResponseFormat(s) ? typeof s.error == "string" ? (console.error(s.error), n.isLastMessageError() || n.addNewErrorMessage("service", s.error)) : kr.isSimulation(t.stream) ? (c = Mr.stream.bind(r, t, n, o.roleToStream), l = o.roleToStream[i.role || I.AI_ROLE], kr.upsertWFiles(n, c, l, i)) : n.addNewMessage(s) : (console.error(
|
|
4387
|
+
case 7: s = e.t0, R.validateResponseFormat(s) ? typeof s.error == "string" ? (console.error(s.error), n.isLastMessageError() || n.addNewErrorMessage("service", s.error)) : kr.isSimulation(t.stream) ? (c = Mr.stream.bind(r, t, n, o.roleToStream), l = o.roleToStream[i.role || I.AI_ROLE], kr.upsertWFiles(n, c, l, i)) : n.addNewMessage(s) : (console.error(De.INVALID_RESPONSE(i, "server", !!t.deepChat.responseInterceptor, s)), n.addNewErrorMessage("service", "Error in server message"));
|
|
4388
4388
|
case 9:
|
|
4389
4389
|
case "end": return e.stop();
|
|
4390
4390
|
}
|
|
@@ -4418,7 +4418,7 @@ var jr = Ar, Mr = /*#__PURE__*/ function() {
|
|
|
4418
4418
|
function e() {
|
|
4419
4419
|
M(this, e);
|
|
4420
4420
|
}
|
|
4421
|
-
return
|
|
4421
|
+
return N(e, null, [
|
|
4422
4422
|
{
|
|
4423
4423
|
key: "request",
|
|
4424
4424
|
value: function() {
|
|
@@ -4482,7 +4482,7 @@ var jr = Ar, Mr = /*#__PURE__*/ function() {
|
|
|
4482
4482
|
e.next = 15;
|
|
4483
4483
|
break;
|
|
4484
4484
|
}
|
|
4485
|
-
throw Error(
|
|
4485
|
+
throw Error(De.INVALID_RESPONSE(n, "response", !!t.deepChat.responseInterceptor, a));
|
|
4486
4486
|
case 15: o.makingAnotherRequest || (kr.isSimulatable(t.stream, o) ? kr.simulate(r, t.streamHandlers, o) : (r.addNewMessage(o), d()));
|
|
4487
4487
|
case 16:
|
|
4488
4488
|
case "end": return e.stop();
|
|
@@ -4583,7 +4583,7 @@ var jr = Ar, Mr = /*#__PURE__*/ function() {
|
|
|
4583
4583
|
{
|
|
4584
4584
|
key: "verifyKey",
|
|
4585
4585
|
value: function(e, t, n, r, i, a, o, s, c) {
|
|
4586
|
-
if (e === "") return a(
|
|
4586
|
+
if (e === "") return a(De.INVALID_KEY);
|
|
4587
4587
|
o(), fetch(t, {
|
|
4588
4588
|
method: r,
|
|
4589
4589
|
headers: n,
|
|
@@ -4593,7 +4593,7 @@ var jr = Ar, Mr = /*#__PURE__*/ function() {
|
|
|
4593
4593
|
}).then(function(t) {
|
|
4594
4594
|
s(t, e, i, a);
|
|
4595
4595
|
}).catch(function(e) {
|
|
4596
|
-
a(
|
|
4596
|
+
a(De.CONNECTION_FAILED), console.error(e);
|
|
4597
4597
|
});
|
|
4598
4598
|
}
|
|
4599
4599
|
}
|
|
@@ -4602,7 +4602,7 @@ var jr = Ar, Mr = /*#__PURE__*/ function() {
|
|
|
4602
4602
|
function e() {
|
|
4603
4603
|
M(this, e);
|
|
4604
4604
|
}
|
|
4605
|
-
return
|
|
4605
|
+
return N(e, null, [
|
|
4606
4606
|
{
|
|
4607
4607
|
key: "getCharacterLimitMessages",
|
|
4608
4608
|
value: function(e, t) {
|
|
@@ -4634,7 +4634,7 @@ var jr = Ar, Mr = /*#__PURE__*/ function() {
|
|
|
4634
4634
|
function e() {
|
|
4635
4635
|
M(this, e);
|
|
4636
4636
|
}
|
|
4637
|
-
return
|
|
4637
|
+
return N(e, null, [
|
|
4638
4638
|
{
|
|
4639
4639
|
key: "parseConfig",
|
|
4640
4640
|
value: function(e, t, n, r) {
|
|
@@ -4724,7 +4724,7 @@ var jr = Ar, Mr = /*#__PURE__*/ function() {
|
|
|
4724
4724
|
var i;
|
|
4725
4725
|
this.rawBody = {}, this.validateKeyProperty = !1, this.canSendMessage = e.canSendMessage, this.connectSettings = {}, this.fileTypes = {}, this.completionsHandlers = {}, this.streamHandlers = {}, this.deepChat = t, this.demo = r, Object.assign(this.rawBody, t.connect?.additionalBodyProps), this.totalMessagesMaxCharLength = t?.requestBodyLimits?.totalMessagesMaxCharLength, this.maxMessages = t?.requestBodyLimits?.maxMessages, Ir.set(t, this, n), t.connect && (this.connectSettings = t.connect), this.demo && ((i = this.connectSettings).url ?? (i.url = jr.URL)), this.connectSettings.websocket && Mr.setup(this), this.stream = this.deepChat.connect?.stream || Me.checkForStream(this.deepChat);
|
|
4726
4726
|
}
|
|
4727
|
-
return
|
|
4727
|
+
return N(e, [
|
|
4728
4728
|
{
|
|
4729
4729
|
key: "verifyKey",
|
|
4730
4730
|
value: function(e, t) {}
|
|
@@ -4917,7 +4917,7 @@ var jr = Ar, Mr = /*#__PURE__*/ function() {
|
|
|
4917
4917
|
var o;
|
|
4918
4918
|
return M(this, t), o = x(this, t, [e, a]), o.insertKeyPlaceholderText = "API Key", o.keyHelpUrl = "", Object.assign(o.rawBody, e.connect?.additionalBodyProps), o.keyVerificationDetails = n, o.buildHeadersFunc = r, i && o.setApiKeyProperties(i), o.connectSettings = o.buildConnectSettings(o.key || "", e.connect), o;
|
|
4919
4919
|
}
|
|
4920
|
-
return E(t, e),
|
|
4920
|
+
return E(t, e), N(t, [
|
|
4921
4921
|
{
|
|
4922
4922
|
key: "setApiKeyProperties",
|
|
4923
4923
|
value: function(e) {
|
|
@@ -4955,7 +4955,7 @@ var jr = Ar, Mr = /*#__PURE__*/ function() {
|
|
|
4955
4955
|
function e() {
|
|
4956
4956
|
M(this, e);
|
|
4957
4957
|
}
|
|
4958
|
-
return
|
|
4958
|
+
return N(e, null, [{
|
|
4959
4959
|
key: "waitForPropertiesToBeUpdatedBeforeRender",
|
|
4960
4960
|
value: function(t) {
|
|
4961
4961
|
t._propUpdated_ = !1, setTimeout(function() {
|
|
@@ -4976,7 +4976,7 @@ var jr = Ar, Mr = /*#__PURE__*/ function() {
|
|
|
4976
4976
|
e.constructPropertyAccessors(r), e.hasOwnProperty(n) || e.constructPropertyAccessors(r, n);
|
|
4977
4977
|
}), e;
|
|
4978
4978
|
}
|
|
4979
|
-
return E(t, e),
|
|
4979
|
+
return E(t, e), N(t, [
|
|
4980
4980
|
{
|
|
4981
4981
|
key: "constructPropertyAccessors",
|
|
4982
4982
|
value: function(e, t) {
|
|
@@ -5016,7 +5016,7 @@ var Vr = Br, Hr = "<?xml version=\"1.0\" standalone=\"no\"?>\n<svg version=\"1.1
|
|
|
5016
5016
|
function e() {
|
|
5017
5017
|
M(this, e);
|
|
5018
5018
|
}
|
|
5019
|
-
return
|
|
5019
|
+
return N(e, null, [{
|
|
5020
5020
|
key: "createSVGElement",
|
|
5021
5021
|
value: function(e) {
|
|
5022
5022
|
return new DOMParser().parseFromString(e, "image/svg+xml").documentElement;
|
|
@@ -5026,7 +5026,7 @@ var Vr = Br, Hr = "<?xml version=\"1.0\" standalone=\"no\"?>\n<svg version=\"1.1
|
|
|
5026
5026
|
function e() {
|
|
5027
5027
|
M(this, e);
|
|
5028
5028
|
}
|
|
5029
|
-
return
|
|
5029
|
+
return N(e, null, [
|
|
5030
5030
|
{
|
|
5031
5031
|
key: "changeVisibility",
|
|
5032
5032
|
value: function(t, n, r, i) {
|
|
@@ -5058,7 +5058,7 @@ var Kr = Gr, qr = /*#__PURE__*/ function() {
|
|
|
5058
5058
|
function e() {
|
|
5059
5059
|
M(this, e);
|
|
5060
5060
|
}
|
|
5061
|
-
return
|
|
5061
|
+
return N(e, null, [
|
|
5062
5062
|
{
|
|
5063
5063
|
key: "createCautionText",
|
|
5064
5064
|
value: function() {
|
|
@@ -5130,7 +5130,7 @@ var Kr = Gr, qr = /*#__PURE__*/ function() {
|
|
|
5130
5130
|
onLoad: e.onLoad.bind(this, t, n)
|
|
5131
5131
|
}, s = e.verifyKey.bind(this, t, o, a);
|
|
5132
5132
|
n.onclick = s, t.onkeydown = function(e) {
|
|
5133
|
-
!t.classList.contains("loading") && e.key ===
|
|
5133
|
+
!t.classList.contains("loading") && e.key === P.ENTER && s();
|
|
5134
5134
|
};
|
|
5135
5135
|
}
|
|
5136
5136
|
},
|
|
@@ -5188,7 +5188,7 @@ var Kr = Gr, qr = /*#__PURE__*/ function() {
|
|
|
5188
5188
|
function e() {
|
|
5189
5189
|
M(this, e);
|
|
5190
5190
|
}
|
|
5191
|
-
return
|
|
5191
|
+
return N(e, null, [
|
|
5192
5192
|
{
|
|
5193
5193
|
key: "enableButtons",
|
|
5194
5194
|
value: function(t, n) {
|
|
@@ -5396,7 +5396,7 @@ var Yr = Jr, Xr = {
|
|
|
5396
5396
|
t.GENERIC_ERROR
|
|
5397
5397
|
], n._conversationHistory = [], j(e.webModel) == "object" && (n._webModel = e.webModel), (r = n._webModel.load) != null && r.clearCache && t.clearAllCache(), n.findModelInWindow(e), n.canSendMessage = n.canSubmit.bind(C(n)), n._chatEl = e.shadowRoot?.children[0], e.history && t.setUpHistory(n._conversationHistory, e.history), n;
|
|
5398
5398
|
}
|
|
5399
|
-
return E(t, e),
|
|
5399
|
+
return E(t, e), N(t, [
|
|
5400
5400
|
{
|
|
5401
5401
|
key: "setUpMessages",
|
|
5402
5402
|
value: function(e) {
|
|
@@ -5701,7 +5701,7 @@ var Yr = Jr, Xr = {
|
|
|
5701
5701
|
case 3:
|
|
5702
5702
|
a = e.sent, o = a.body, s = a.error, c = !!this.stream;
|
|
5703
5703
|
try {
|
|
5704
|
-
s ? (R.displayError(t, Error(s)), (c ? this.streamHandlers.onClose : this.completionsHandlers.onFinish)()) : !o || !o.text ? (l =
|
|
5704
|
+
s ? (R.displayError(t, Error(s)), (c ? this.streamHandlers.onClose : this.completionsHandlers.onFinish)()) : !o || !o.text ? (l = De.INVALID_MODEL_REQUEST({ body: o }, !1), console.error(l), u = c ? this.streamHandlers.onClose : this.completionsHandlers.onFinish, R.onInterceptorError(t, l, u)) : this.generateRespByType(t, o.text, !!this.stream, r);
|
|
5705
5705
|
} catch (e) {
|
|
5706
5706
|
this.unloadChat(e);
|
|
5707
5707
|
}
|
|
@@ -5798,7 +5798,7 @@ var Yr = Jr, Xr = {
|
|
|
5798
5798
|
e.next = 15;
|
|
5799
5799
|
break;
|
|
5800
5800
|
}
|
|
5801
|
-
return a =
|
|
5801
|
+
return a = De.INVALID_MODEL_RESPONSE(r, !!t.responseInterceptor, i), R.displayError(n, Error(a)), e.abrupt("return");
|
|
5802
5802
|
case 15: return e.abrupt("return", i);
|
|
5803
5803
|
case 16:
|
|
5804
5804
|
case "end": return e.stop();
|
|
@@ -5836,7 +5836,7 @@ var Qr = Zr, $r = /*#__PURE__*/ function() {
|
|
|
5836
5836
|
function e() {
|
|
5837
5837
|
M(this, e);
|
|
5838
5838
|
}
|
|
5839
|
-
return
|
|
5839
|
+
return N(e, null, [
|
|
5840
5840
|
{
|
|
5841
5841
|
key: "buildHeaders",
|
|
5842
5842
|
value: function(e) {
|
|
@@ -5850,7 +5850,7 @@ var Qr = Zr, $r = /*#__PURE__*/ function() {
|
|
|
5850
5850
|
key: "handleVerificationResult",
|
|
5851
5851
|
value: function(e, t, n, r) {
|
|
5852
5852
|
var i = e;
|
|
5853
|
-
Array.isArray(i.error) && i.error[0] === "Error in `parameters`: field required" ? n(t) : r(
|
|
5853
|
+
Array.isArray(i.error) && i.error[0] === "Error in `parameters`: field required" ? n(t) : r(De.INVALID_KEY);
|
|
5854
5854
|
}
|
|
5855
5855
|
},
|
|
5856
5856
|
{
|
|
@@ -5875,7 +5875,7 @@ var Qr = Zr, $r = /*#__PURE__*/ function() {
|
|
|
5875
5875
|
o
|
|
5876
5876
|
]), s.insertKeyPlaceholderText = "Hugging Face Token", s.keyHelpUrl = "https://huggingface.co/settings/tokens", s.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Hugging Face</b></div>\n <p>First message may take an extented amount of time to complete as the model needs to be initialized.</p>", s.permittedErrorPrefixes = ["Authorization header"], s.url = `${t.URL_PREFIX}${r}`, s.textInputPlaceholderText = n, j(i) == "object" && (i.model && (s.url = `${t.URL_PREFIX}${i.model}`), i.options && (s.rawBody.options = i.options), i.parameters && (s.rawBody.parameters = i.parameters)), s;
|
|
5877
5877
|
}
|
|
5878
|
-
return E(t, e),
|
|
5878
|
+
return E(t, e), N(t, [{
|
|
5879
5879
|
key: "preprocessBody",
|
|
5880
5880
|
value: function(e, t, n) {
|
|
5881
5881
|
var r = JSON.parse(JSON.stringify(e)), i = t[t.length - 1].text;
|
|
@@ -5920,7 +5920,7 @@ var ti = ei, ni = /*#__PURE__*/ function(e) {
|
|
|
5920
5920
|
o
|
|
5921
5921
|
]), s.isTextInputDisabled = !0, s.canSendMessage = t.canSendFile, s;
|
|
5922
5922
|
}
|
|
5923
|
-
return E(t, e),
|
|
5923
|
+
return E(t, e), N(t, [{
|
|
5924
5924
|
key: "preprocessBody",
|
|
5925
5925
|
value: function(e, t, n) {
|
|
5926
5926
|
return n[0];
|
|
@@ -5973,7 +5973,7 @@ var ti = ei, ni = /*#__PURE__*/ function(e) {
|
|
|
5973
5973
|
{ audio: {} }
|
|
5974
5974
|
]);
|
|
5975
5975
|
}
|
|
5976
|
-
return E(t, e),
|
|
5976
|
+
return E(t, e), N(t, [{
|
|
5977
5977
|
key: "extractPollResultData",
|
|
5978
5978
|
value: function() {
|
|
5979
5979
|
var e = O(/*#__PURE__*/ D().mark(function e(t) {
|
|
@@ -6016,7 +6016,7 @@ var ti = ei, ni = /*#__PURE__*/ function(e) {
|
|
|
6016
6016
|
{ images: {} }
|
|
6017
6017
|
]);
|
|
6018
6018
|
}
|
|
6019
|
-
return E(t, e),
|
|
6019
|
+
return E(t, e), N(t, [{
|
|
6020
6020
|
key: "extractPollResultData",
|
|
6021
6021
|
value: function() {
|
|
6022
6022
|
var e = O(/*#__PURE__*/ D().mark(function e(t) {
|
|
@@ -6050,7 +6050,7 @@ var ti = ei, ni = /*#__PURE__*/ function(e) {
|
|
|
6050
6050
|
function e() {
|
|
6051
6051
|
M(this, e);
|
|
6052
6052
|
}
|
|
6053
|
-
return
|
|
6053
|
+
return N(e, null, [
|
|
6054
6054
|
{
|
|
6055
6055
|
key: "buildHeaders",
|
|
6056
6056
|
value: function(e) {
|
|
@@ -6063,7 +6063,7 @@ var ti = ei, ni = /*#__PURE__*/ function(e) {
|
|
|
6063
6063
|
{
|
|
6064
6064
|
key: "handleVerificationResult",
|
|
6065
6065
|
value: function(e, t, n, r) {
|
|
6066
|
-
e.message ? r(
|
|
6066
|
+
e.message ? r(De.INVALID_KEY) : n(t);
|
|
6067
6067
|
}
|
|
6068
6068
|
},
|
|
6069
6069
|
{
|
|
@@ -6088,7 +6088,7 @@ var ti = ei, ni = /*#__PURE__*/ function(e) {
|
|
|
6088
6088
|
a
|
|
6089
6089
|
]), o.insertKeyPlaceholderText = "Stability AI API Key", o.keyHelpUrl = "https://platform.stability.ai/docs/getting-started/authentication", o.permittedErrorPrefixes = ["Incorrect", "invalid_"], o;
|
|
6090
6090
|
}
|
|
6091
|
-
return E(t, e),
|
|
6091
|
+
return E(t, e), N(t);
|
|
6092
6092
|
}(Rr), ci = /*#__PURE__*/ function(e) {
|
|
6093
6093
|
function t(e) {
|
|
6094
6094
|
var n;
|
|
@@ -6107,7 +6107,7 @@ var ti = ei, ni = /*#__PURE__*/ function(e) {
|
|
|
6107
6107
|
var a = r?.stabilityAI?.imageToImageUpscale;
|
|
6108
6108
|
return j(a) == "object" && (a.engine_id && (n.url = `https://api.stability.ai/v1/generation/${a.engine_id}/image-to-image/upscale`), t.cleanConfig(a), Object.assign(n.rawBody, a)), n.canSendMessage = t.canSendFileMessage, n;
|
|
6109
6109
|
}
|
|
6110
|
-
return E(t, e),
|
|
6110
|
+
return E(t, e), N(t, [
|
|
6111
6111
|
{
|
|
6112
6112
|
key: "createFormDataBody",
|
|
6113
6113
|
value: function(e, t) {
|
|
@@ -6206,7 +6206,7 @@ var ti = ei, ni = /*#__PURE__*/ function(e) {
|
|
|
6206
6206
|
var a = r?.stabilityAI?.imageToImageMasking;
|
|
6207
6207
|
return j(a) == "object" && (a.engine_id && (n.url = `https://api.stability.ai/v1/generation/${a.engine_id}/image-to-image/masking`), a.weight !== void 0 && a.weight !== null && (n._imageWeight = a.weight), a.mask_source !== void 0 && a.mask_source !== null && (n._maskSource = a.mask_source), t.cleanConfig(a), Object.assign(n.rawBody, a)), n.canSendMessage = t.canSendFileTextMessage, n;
|
|
6208
6208
|
}
|
|
6209
|
-
return E(t, e),
|
|
6209
|
+
return E(t, e), N(t, [
|
|
6210
6210
|
{
|
|
6211
6211
|
key: "createFormDataBody",
|
|
6212
6212
|
value: function(e, t, n, r) {
|
|
@@ -6300,7 +6300,7 @@ var ti = ei, ni = /*#__PURE__*/ function(e) {
|
|
|
6300
6300
|
{ audio: {} }
|
|
6301
6301
|
]);
|
|
6302
6302
|
}
|
|
6303
|
-
return E(t, e),
|
|
6303
|
+
return E(t, e), N(t, [{
|
|
6304
6304
|
key: "extractPollResultData",
|
|
6305
6305
|
value: function() {
|
|
6306
6306
|
var e = O(/*#__PURE__*/ D().mark(function e(t) {
|
|
@@ -6342,7 +6342,7 @@ var ti = ei, ni = /*#__PURE__*/ function(e) {
|
|
|
6342
6342
|
r
|
|
6343
6343
|
]);
|
|
6344
6344
|
}
|
|
6345
|
-
return E(t, e),
|
|
6345
|
+
return E(t, e), N(t, [{
|
|
6346
6346
|
key: "extractResultData",
|
|
6347
6347
|
value: function() {
|
|
6348
6348
|
var e = O(/*#__PURE__*/ D().mark(function e(t) {
|
|
@@ -6379,7 +6379,7 @@ var ti = ei, ni = /*#__PURE__*/ function(e) {
|
|
|
6379
6379
|
i
|
|
6380
6380
|
]), n.permittedErrorPrefixes = ["Authorization header", "Error in"], n.context = r.context, n;
|
|
6381
6381
|
}
|
|
6382
|
-
return E(t, e),
|
|
6382
|
+
return E(t, e), N(t, [{
|
|
6383
6383
|
key: "preprocessBody",
|
|
6384
6384
|
value: function(e, t) {
|
|
6385
6385
|
var n = t[t.length - 1].text;
|
|
@@ -6425,7 +6425,7 @@ var ti = ei, ni = /*#__PURE__*/ function(e) {
|
|
|
6425
6425
|
r
|
|
6426
6426
|
]);
|
|
6427
6427
|
}
|
|
6428
|
-
return E(t, e),
|
|
6428
|
+
return E(t, e), N(t, [{
|
|
6429
6429
|
key: "extractResultData",
|
|
6430
6430
|
value: function() {
|
|
6431
6431
|
var e = O(/*#__PURE__*/ D().mark(function e(t) {
|
|
@@ -6462,7 +6462,7 @@ var ti = ei, ni = /*#__PURE__*/ function(e) {
|
|
|
6462
6462
|
i
|
|
6463
6463
|
]), n.maxMessages ?? (n.maxMessages = -1), n;
|
|
6464
6464
|
}
|
|
6465
|
-
return E(t, e),
|
|
6465
|
+
return E(t, e), N(t, [
|
|
6466
6466
|
{
|
|
6467
6467
|
key: "processMessages",
|
|
6468
6468
|
value: function(e) {
|
|
@@ -6538,7 +6538,7 @@ var ti = ei, ni = /*#__PURE__*/ function(e) {
|
|
|
6538
6538
|
var a = r.stabilityAI?.imageToImage;
|
|
6539
6539
|
return j(a) == "object" && (a.engine_id && (n.url = `https://api.stability.ai/v1/generation/${a.engine_id}/text-to-image`), a.weight !== void 0 && a.weight !== null && (n._imageWeight = a.weight), t.cleanConfig(a), Object.assign(n.rawBody, a)), n.canSendMessage = t.canSendFileTextMessage, n;
|
|
6540
6540
|
}
|
|
6541
|
-
return E(t, e),
|
|
6541
|
+
return E(t, e), N(t, [
|
|
6542
6542
|
{
|
|
6543
6543
|
key: "createFormDataBody",
|
|
6544
6544
|
value: function(e, t, n) {
|
|
@@ -6631,7 +6631,7 @@ var ti = ei, ni = /*#__PURE__*/ function(e) {
|
|
|
6631
6631
|
r
|
|
6632
6632
|
]);
|
|
6633
6633
|
}
|
|
6634
|
-
return E(t, e),
|
|
6634
|
+
return E(t, e), N(t, [{
|
|
6635
6635
|
key: "extractResultData",
|
|
6636
6636
|
value: function() {
|
|
6637
6637
|
var e = O(/*#__PURE__*/ D().mark(function e(t) {
|
|
@@ -6669,7 +6669,7 @@ var ti = ei, ni = /*#__PURE__*/ function(e) {
|
|
|
6669
6669
|
var a = r.stabilityAI?.textToImage;
|
|
6670
6670
|
return j(a) == "object" && (a.engine_id && (n.url = `https://api.stability.ai/v1/generation/${a.engine_id}/text-to-image`), a.weight !== void 0 && a.weight !== null && (n._imageWeight = a.weight), t.cleanConfig(a), Object.assign(n.rawBody, a)), n.canSendMessage = t.canSendTextMessage, n;
|
|
6671
6671
|
}
|
|
6672
|
-
return E(t, e),
|
|
6672
|
+
return E(t, e), N(t, [
|
|
6673
6673
|
{
|
|
6674
6674
|
key: "preprocessBody",
|
|
6675
6675
|
value: function(e, t) {
|
|
@@ -6755,7 +6755,7 @@ var ti = ei, ni = /*#__PURE__*/ function(e) {
|
|
|
6755
6755
|
i
|
|
6756
6756
|
]), n.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Hugging Face</b></div>\n <p>Insert a sentence with the word [MASK] and the model will try to fill it for you. E.g. I want [MASK].</p>\n <p>First message may take an extented amount of time to complete as the model needs to be initialized.</p>", n.permittedErrorPrefixes = ["Authorization header", "No mask_token"], n;
|
|
6757
6757
|
}
|
|
6758
|
-
return E(t, e),
|
|
6758
|
+
return E(t, e), N(t, [{
|
|
6759
6759
|
key: "extractResultData",
|
|
6760
6760
|
value: function() {
|
|
6761
6761
|
var e = O(/*#__PURE__*/ D().mark(function e(t) {
|
|
@@ -6783,7 +6783,7 @@ var ti = ei, ni = /*#__PURE__*/ function(e) {
|
|
|
6783
6783
|
function e() {
|
|
6784
6784
|
M(this, e);
|
|
6785
6785
|
}
|
|
6786
|
-
return
|
|
6786
|
+
return N(e, null, [
|
|
6787
6787
|
{
|
|
6788
6788
|
key: "buildHeaders",
|
|
6789
6789
|
value: function(e) {
|
|
@@ -6798,7 +6798,7 @@ var ti = ei, ni = /*#__PURE__*/ function(e) {
|
|
|
6798
6798
|
key: "handleVerificationResult",
|
|
6799
6799
|
value: function(e, t, n, r) {
|
|
6800
6800
|
var i;
|
|
6801
|
-
(i = e.message) != null && i.includes("invalid request: prompt must be at least 1 token long") ? n(t) : r(
|
|
6801
|
+
(i = e.message) != null && i.includes("invalid request: prompt must be at least 1 token long") ? n(t) : r(De.INVALID_KEY);
|
|
6802
6802
|
}
|
|
6803
6803
|
},
|
|
6804
6804
|
{
|
|
@@ -6823,7 +6823,7 @@ var ti = ei, ni = /*#__PURE__*/ function(e) {
|
|
|
6823
6823
|
a
|
|
6824
6824
|
]), o.insertKeyPlaceholderText = "Cohere API Key", o.keyHelpUrl = "https://dashboard.cohere.ai/api-keys", o.permittedErrorPrefixes = ["invalid"], o.url = n, o.textInputPlaceholderText = r, i && j(i) == "object" && Object.assign(o.rawBody, i), o;
|
|
6825
6825
|
}
|
|
6826
|
-
return E(t, e),
|
|
6826
|
+
return E(t, e), N(t);
|
|
6827
6827
|
}(Rr), xi = /*#__PURE__*/ function(e) {
|
|
6828
6828
|
function t(e) {
|
|
6829
6829
|
M(this, t);
|
|
@@ -6836,7 +6836,7 @@ var ti = ei, ni = /*#__PURE__*/ function(e) {
|
|
|
6836
6836
|
r
|
|
6837
6837
|
]);
|
|
6838
6838
|
}
|
|
6839
|
-
return E(t, e),
|
|
6839
|
+
return E(t, e), N(t, [
|
|
6840
6840
|
{
|
|
6841
6841
|
key: "preprocessBody",
|
|
6842
6842
|
value: function(e, t) {
|
|
@@ -6906,7 +6906,7 @@ var ti = ei, ni = /*#__PURE__*/ function(e) {
|
|
|
6906
6906
|
r
|
|
6907
6907
|
]);
|
|
6908
6908
|
}
|
|
6909
|
-
return E(t, e),
|
|
6909
|
+
return E(t, e), N(t, [
|
|
6910
6910
|
{
|
|
6911
6911
|
key: "preprocessBody",
|
|
6912
6912
|
value: function(e, t) {
|
|
@@ -6968,7 +6968,7 @@ var ti = ei, ni = /*#__PURE__*/ function(e) {
|
|
|
6968
6968
|
function e() {
|
|
6969
6969
|
M(this, e);
|
|
6970
6970
|
}
|
|
6971
|
-
return
|
|
6971
|
+
return N(e, null, [
|
|
6972
6972
|
{
|
|
6973
6973
|
key: "buildHeaders",
|
|
6974
6974
|
value: function(e) {
|
|
@@ -6982,7 +6982,7 @@ var ti = ei, ni = /*#__PURE__*/ function(e) {
|
|
|
6982
6982
|
key: "handleVerificationResult",
|
|
6983
6983
|
value: function(e, t, n, r) {
|
|
6984
6984
|
var i = e;
|
|
6985
|
-
i.error ? i.error.code === "invalid_api_key" ? r(
|
|
6985
|
+
i.error ? i.error.code === "invalid_api_key" ? r(De.INVALID_KEY) : r(De.CONNECTION_FAILED) : n(t);
|
|
6986
6986
|
}
|
|
6987
6987
|
},
|
|
6988
6988
|
{
|
|
@@ -7038,7 +7038,7 @@ var ti = ei, ni = /*#__PURE__*/ function(e) {
|
|
|
7038
7038
|
var s = a?.openAI?.textToSpeech;
|
|
7039
7039
|
return j(s) == "object" && Object.assign(n.rawBody, s), (r = n.rawBody).model ?? (r.model = t.DEFAULT_MODEL), (i = n.rawBody).voice ?? (i.voice = t.DEFAULT_VOIDE), n.textInputPlaceholderText = "Insert text to generate audio", n.rawBody.response_format = "mp3", n;
|
|
7040
7040
|
}
|
|
7041
|
-
return E(t, e),
|
|
7041
|
+
return E(t, e), N(t, [
|
|
7042
7042
|
{
|
|
7043
7043
|
key: "preprocessBody",
|
|
7044
7044
|
value: function(e, t) {
|
|
@@ -7127,7 +7127,7 @@ var Ti = wi, Ei = /*#__PURE__*/ function(e) {
|
|
|
7127
7127
|
var o = i?.openAI?.audio;
|
|
7128
7128
|
return j(o) == "object" && (n.processConfig(o), t.cleanConfig(o), Object.assign(n.rawBody, o)), (r = n.rawBody).model ?? (r.model = t.DEFAULT_MODEL), n.rawBody.response_format = "json", n.canSendMessage = t.canSendFileMessage, n;
|
|
7129
7129
|
}
|
|
7130
|
-
return E(t, e),
|
|
7130
|
+
return E(t, e), N(t, [
|
|
7131
7131
|
{
|
|
7132
7132
|
key: "processConfig",
|
|
7133
7133
|
value: function(e) {
|
|
@@ -7225,7 +7225,7 @@ var Di = Ei, Oi = /*#__PURE__*/ function() {
|
|
|
7225
7225
|
function e() {
|
|
7226
7226
|
M(this, e);
|
|
7227
7227
|
}
|
|
7228
|
-
return
|
|
7228
|
+
return N(e, null, [
|
|
7229
7229
|
{
|
|
7230
7230
|
key: "buildTextToSpeechHeaders",
|
|
7231
7231
|
value: function(e, t) {
|
|
@@ -7248,7 +7248,7 @@ var Di = Ei, Oi = /*#__PURE__*/ function() {
|
|
|
7248
7248
|
{
|
|
7249
7249
|
key: "handleSpeechVerificationResult",
|
|
7250
7250
|
value: function(e, t, n, r) {
|
|
7251
|
-
e.error ? r(
|
|
7251
|
+
e.error ? r(De.INVALID_KEY) : n(t);
|
|
7252
7252
|
}
|
|
7253
7253
|
},
|
|
7254
7254
|
{
|
|
@@ -7276,7 +7276,7 @@ var Di = Ei, Oi = /*#__PURE__*/ function() {
|
|
|
7276
7276
|
{
|
|
7277
7277
|
key: "handleLanguageVerificationResult",
|
|
7278
7278
|
value: function(e, t, n, r) {
|
|
7279
|
-
e.error?.code === "401" ? r(
|
|
7279
|
+
e.error?.code === "401" ? r(De.INVALID_KEY) : n(t);
|
|
7280
7280
|
}
|
|
7281
7281
|
},
|
|
7282
7282
|
{
|
|
@@ -7296,7 +7296,7 @@ var Di = Ei, Oi = /*#__PURE__*/ function() {
|
|
|
7296
7296
|
key: "handleTranslationVerificationResult",
|
|
7297
7297
|
value: function(e, t, n, r) {
|
|
7298
7298
|
e.json().then(function(e) {
|
|
7299
|
-
!Array.isArray(e) && e.error.code === 401e3 ? r(
|
|
7299
|
+
!Array.isArray(e) && e.error.code === 401e3 ? r(De.INVALID_KEY) : n(t);
|
|
7300
7300
|
});
|
|
7301
7301
|
}
|
|
7302
7302
|
},
|
|
@@ -7336,7 +7336,7 @@ var Di = Ei, Oi = /*#__PURE__*/ function() {
|
|
|
7336
7336
|
a
|
|
7337
7337
|
]), n.url = "", n.textInputPlaceholderText = "Insert text to summarize", (r = n.rawBody).language ?? (r.language = "en"), Object.assign(n.rawBody, i), n.url = `${i.endpoint}/language/analyze-text/jobs?api-version=2022-10-01-preview`, n;
|
|
7338
7338
|
}
|
|
7339
|
-
return E(t, e),
|
|
7339
|
+
return E(t, e), N(t, [
|
|
7340
7340
|
{
|
|
7341
7341
|
key: "preprocessBody",
|
|
7342
7342
|
value: function(e, t) {
|
|
@@ -7468,12 +7468,12 @@ var Di = Ei, Oi = /*#__PURE__*/ function() {
|
|
|
7468
7468
|
a
|
|
7469
7469
|
]), o.insertKeyPlaceholderText = "Azure Language Subscription Key", o.keyHelpUrl = "https://learn.microsoft.com/en-us/azure/api-management/api-management-subscriptions#create-and-manage-subscriptions-in-azure-portal", o.permittedErrorPrefixes = ["Access"], o;
|
|
7470
7470
|
}
|
|
7471
|
-
return E(t, e),
|
|
7471
|
+
return E(t, e), N(t);
|
|
7472
7472
|
}(Rr)), Ai = /*#__PURE__*/ function() {
|
|
7473
7473
|
function e() {
|
|
7474
7474
|
M(this, e);
|
|
7475
7475
|
}
|
|
7476
|
-
return
|
|
7476
|
+
return N(e, null, [
|
|
7477
7477
|
{
|
|
7478
7478
|
key: "poll",
|
|
7479
7479
|
value: function() {
|
|
@@ -7542,7 +7542,7 @@ var Di = Ei, Oi = /*#__PURE__*/ function() {
|
|
|
7542
7542
|
key: "handleVerificationResult",
|
|
7543
7543
|
value: function(e, t, n, r) {
|
|
7544
7544
|
var i = e;
|
|
7545
|
-
i.error ? i.error.code === "invalid_api_key" ? r(
|
|
7545
|
+
i.error ? i.error.code === "invalid_api_key" ? r(De.INVALID_KEY) : r(De.CONNECTION_FAILED) : n(t);
|
|
7546
7546
|
}
|
|
7547
7547
|
},
|
|
7548
7548
|
{
|
|
@@ -7569,7 +7569,7 @@ var Di = Ei, Oi = /*#__PURE__*/ function() {
|
|
|
7569
7569
|
{ audio: {} }
|
|
7570
7570
|
]), n.insertKeyPlaceholderText = "AssemblyAI API Key", n.keyHelpUrl = "https://www.assemblyai.com/app/account", n.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>AssemblyAI Audio</b></div>\n <p><b>Upload an audio file</b> to transcribe it into text.\n <p>\n Click <a href=\"https://www.assemblyai.com/docs/Guides/transcribing_an_audio_file#get-started\">here</a> for more info.\n </p>", n.url = "https://api.assemblyai.com/v2/upload", n.isTextInputDisabled = !0, n.textInputPlaceholderText = "Upload an audio file", n.permittedErrorPrefixes = ["Authentication", "Invalid"], n.canSendMessage = t.canFileSendMessage, n;
|
|
7571
7571
|
}
|
|
7572
|
-
return E(t, e),
|
|
7572
|
+
return E(t, e), N(t, [{
|
|
7573
7573
|
key: "callServiceAPI",
|
|
7574
7574
|
value: function() {
|
|
7575
7575
|
var e = O(/*#__PURE__*/ D().mark(function e(t, n, r) {
|
|
@@ -7641,7 +7641,7 @@ var Di = Ei, Oi = /*#__PURE__*/ function() {
|
|
|
7641
7641
|
a
|
|
7642
7642
|
]), o.insertKeyPlaceholderText = "Azure Speech Subscription Key", o.keyHelpUrl = "https://learn.microsoft.com/en-us/azure/api-management/api-management-subscriptions#create-and-manage-subscriptions-in-azure-portal", o;
|
|
7643
7643
|
}
|
|
7644
|
-
return E(t, e),
|
|
7644
|
+
return E(t, e), N(t);
|
|
7645
7645
|
}(Rr), Ni = /*#__PURE__*/ function(e) {
|
|
7646
7646
|
function t(e) {
|
|
7647
7647
|
var n;
|
|
@@ -7659,7 +7659,7 @@ var Di = Ei, Oi = /*#__PURE__*/ function() {
|
|
|
7659
7659
|
Click <a href="${t.HELP_LINK}">here</a> for more info.
|
|
7660
7660
|
</p>`, n.url = "", Object.assign(n.rawBody, o), (r = n.rawBody).lang ?? (r.lang = "en-US"), (i = n.rawBody).name ?? (i.name = "en-US-JennyNeural"), (a = n.rawBody).gender ?? (a.gender = "Female"), n.url = `https://${o.region}.tts.speech.microsoft.com/cognitiveservices/v1`, n;
|
|
7661
7661
|
}
|
|
7662
|
-
return E(t, e),
|
|
7662
|
+
return E(t, e), N(t, [
|
|
7663
7663
|
{
|
|
7664
7664
|
key: "preprocessBody",
|
|
7665
7665
|
value: function(e, t) {
|
|
@@ -7745,7 +7745,7 @@ var Pi = Ni, Fi = /*#__PURE__*/ function(e) {
|
|
|
7745
7745
|
var a = r.lang || "en-US";
|
|
7746
7746
|
return n.url = `https://${r.region}.stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?language=${a}&format=detailed`, n.recordAudio = void 0, n;
|
|
7747
7747
|
}
|
|
7748
|
-
return E(t, e),
|
|
7748
|
+
return E(t, e), N(t, [{
|
|
7749
7749
|
key: "callServiceAPI",
|
|
7750
7750
|
value: function() {
|
|
7751
7751
|
var e = O(/*#__PURE__*/ D().mark(function e(t, n, r) {
|
|
@@ -7818,7 +7818,7 @@ var Ii = Fi, Li = /*#__PURE__*/ function(e) {
|
|
|
7818
7818
|
i
|
|
7819
7819
|
]), n.insertKeyPlaceholderText = "Azure Translate Subscription Key", n.keyHelpUrl = "https://learn.microsoft.com/en-us/azure/api-management/api-management-subscriptions#create-and-manage-subscriptions-in-azure-portal", n.url = "", n.url = `https://api.cognitive.microsofttranslator.com/translate?api-version=3.0&to=${r.language || "es"}`, n;
|
|
7820
7820
|
}
|
|
7821
|
-
return E(t, e),
|
|
7821
|
+
return E(t, e), N(t, [
|
|
7822
7822
|
{
|
|
7823
7823
|
key: "preprocessBody",
|
|
7824
7824
|
value: function(e) {
|
|
@@ -7880,7 +7880,7 @@ var Ii = Fi, Li = /*#__PURE__*/ function(e) {
|
|
|
7880
7880
|
function e() {
|
|
7881
7881
|
M(this, e);
|
|
7882
7882
|
}
|
|
7883
|
-
return
|
|
7883
|
+
return N(e, null, [
|
|
7884
7884
|
{
|
|
7885
7885
|
key: "storeFiles",
|
|
7886
7886
|
value: function() {
|
|
@@ -8168,7 +8168,7 @@ var zi = Ri, Bi = /*#__PURE__*/ function(e) {
|
|
|
8168
8168
|
} else (r = o.openAI) != null && r.assistant && (o.openAI.assistant = c);
|
|
8169
8169
|
return (i = n.connectSettings).headers ?? (i.headers = {}), (a = n.connectSettings.headers)["OpenAI-Beta"] ?? (a["OpenAI-Beta"] = "assistants=v2"), n.maxMessages = 1, n.isSSEStream = !!(n.stream && (j(n.stream) != "object" || !n.stream.simulation)), n.shouldFetchHistory && n.sessionId && (n.fetchHistory = n.fetchHistoryFunc.bind(n)), n;
|
|
8170
8170
|
}
|
|
8171
|
-
return E(t, e),
|
|
8171
|
+
return E(t, e), N(t, [
|
|
8172
8172
|
{
|
|
8173
8173
|
key: "fetchHistoryFunc",
|
|
8174
8174
|
value: function() {
|
|
@@ -8692,7 +8692,7 @@ var Vi = Bi, Hi = /*#__PURE__*/ function(e) {
|
|
|
8692
8692
|
}
|
|
8693
8693
|
return j(a) == "object" && Object.assign(n.rawBody, a), n.canSendMessage = t.canFileSendMessage, n;
|
|
8694
8694
|
}
|
|
8695
|
-
return E(t, e),
|
|
8695
|
+
return E(t, e), N(t, [
|
|
8696
8696
|
{
|
|
8697
8697
|
key: "preprocessBody",
|
|
8698
8698
|
value: function(e, t) {
|
|
@@ -8817,7 +8817,7 @@ var Ui = Hi, Wi = /*#__PURE__*/ function(e) {
|
|
|
8817
8817
|
}
|
|
8818
8818
|
return n.maxMessages ?? (n.maxMessages = -1), (r = n.rawBody).model ?? (r.model = "gpt-4o"), n;
|
|
8819
8819
|
}
|
|
8820
|
-
return E(t, e),
|
|
8820
|
+
return E(t, e), N(t, [
|
|
8821
8821
|
{
|
|
8822
8822
|
key: "cleanConfig",
|
|
8823
8823
|
value: function(e) {
|
|
@@ -9036,7 +9036,7 @@ var Ui = Hi, Wi = /*#__PURE__*/ function(e) {
|
|
|
9036
9036
|
a
|
|
9037
9037
|
]), j(i) == "object" && Object.assign(n.rawBody, i), n.maxMessages ?? (n.maxMessages = -1), n;
|
|
9038
9038
|
}
|
|
9039
|
-
return E(t, e),
|
|
9039
|
+
return E(t, e), N(t, [
|
|
9040
9040
|
{
|
|
9041
9041
|
key: "preprocessBody",
|
|
9042
9042
|
value: function(e, t) {
|
|
@@ -9105,7 +9105,7 @@ var Ui = Hi, Wi = /*#__PURE__*/ function(e) {
|
|
|
9105
9105
|
function e() {
|
|
9106
9106
|
M(this, e);
|
|
9107
9107
|
}
|
|
9108
|
-
return
|
|
9108
|
+
return N(e, null, [
|
|
9109
9109
|
{
|
|
9110
9110
|
key: "buildHeaders",
|
|
9111
9111
|
value: function(e) {
|
|
@@ -9120,7 +9120,7 @@ var Ui = Hi, Wi = /*#__PURE__*/ function(e) {
|
|
|
9120
9120
|
key: "handleVerificationResult",
|
|
9121
9121
|
value: function(e, t, n, r) {
|
|
9122
9122
|
var i;
|
|
9123
|
-
(i = e.message) != null && i.includes("invalid request: prompt must be at least 1 token long") ? n(t) : r(
|
|
9123
|
+
(i = e.message) != null && i.includes("invalid request: prompt must be at least 1 token long") ? n(t) : r(De.INVALID_KEY);
|
|
9124
9124
|
}
|
|
9125
9125
|
},
|
|
9126
9126
|
{
|
|
@@ -9146,7 +9146,7 @@ var Ui = Hi, Wi = /*#__PURE__*/ function(e) {
|
|
|
9146
9146
|
i
|
|
9147
9147
|
]), n.insertKeyPlaceholderText = "Mistral API Key", n.keyHelpUrl = "https://console.mistral.ai/api-keys/", n.url = "https://api.mistral.ai/v1/chat/completions", n.permittedErrorPrefixes = ["invalid"], i && (n.cleanConfig(i), Object.assign(n.rawBody, i)), n.maxMessages ?? (n.maxMessages = -1), (r = n.rawBody).model ?? (r.model = "open-mistral-7b"), n;
|
|
9148
9148
|
}
|
|
9149
|
-
return E(t, e),
|
|
9149
|
+
return E(t, e), N(t, [
|
|
9150
9150
|
{
|
|
9151
9151
|
key: "cleanConfig",
|
|
9152
9152
|
value: function(e) {
|
|
@@ -9221,7 +9221,7 @@ var Ui = Hi, Wi = /*#__PURE__*/ function(e) {
|
|
|
9221
9221
|
function e() {
|
|
9222
9222
|
M(this, e);
|
|
9223
9223
|
}
|
|
9224
|
-
return
|
|
9224
|
+
return N(e, null, [{
|
|
9225
9225
|
key: "create",
|
|
9226
9226
|
value: function(e) {
|
|
9227
9227
|
var t = e.directConnection, n = e.connect, r = e.demo;
|
|
@@ -9243,7 +9243,7 @@ var Ui = Hi, Wi = /*#__PURE__*/ function(e) {
|
|
|
9243
9243
|
return n && (!r || !n.stream) ? new Lr(e) : new Lr(e, void 0, r || !0);
|
|
9244
9244
|
}
|
|
9245
9245
|
}]);
|
|
9246
|
-
}(), Yi = /*#__PURE__*/
|
|
9246
|
+
}(), Yi = /*#__PURE__*/ N(function e() {
|
|
9247
9247
|
M(this, e);
|
|
9248
9248
|
});
|
|
9249
9249
|
Yi.attibutes = {
|
|
@@ -9278,7 +9278,7 @@ var Zi = /*#__PURE__*/ function() {
|
|
|
9278
9278
|
function e() {
|
|
9279
9279
|
M(this, e);
|
|
9280
9280
|
}
|
|
9281
|
-
return
|
|
9281
|
+
return N(e, null, [{
|
|
9282
9282
|
key: "colorToHex",
|
|
9283
9283
|
value: function(e) {
|
|
9284
9284
|
var t = document.createElement("div");
|
|
@@ -9300,7 +9300,7 @@ var Zi = /*#__PURE__*/ function() {
|
|
|
9300
9300
|
function e(t, n, r) {
|
|
9301
9301
|
M(this, e), this._isDisplayed = !1, t ? (this._elementRef = this.createIntroPanelWithChild(t, r), this._isDisplayed = !0) : n && (this._elementRef = this.createInternalIntroPanel(n, r), this._isDisplayed = !0);
|
|
9302
9302
|
}
|
|
9303
|
-
return
|
|
9303
|
+
return N(e, [
|
|
9304
9304
|
{
|
|
9305
9305
|
key: "createIntroPanelWithChild",
|
|
9306
9306
|
value: function(t, n) {
|
|
@@ -9338,7 +9338,7 @@ var Zi = /*#__PURE__*/ function() {
|
|
|
9338
9338
|
function e(t, n, r) {
|
|
9339
9339
|
M(this, e), this._isLoading = !1, this._isComplete = !1, this._messages = n, this.populateHistory(t), r.fetchHistory && this.fetchHistory(r.fetchHistory), t.loadHistory && this.setupLoadHistory(t, t.loadHistory);
|
|
9340
9340
|
}
|
|
9341
|
-
return
|
|
9341
|
+
return N(e, [
|
|
9342
9342
|
{
|
|
9343
9343
|
key: "loadInitialHistory",
|
|
9344
9344
|
value: function() {
|
|
@@ -9456,7 +9456,7 @@ var Zi = /*#__PURE__*/ function() {
|
|
|
9456
9456
|
function e() {
|
|
9457
9457
|
M(this, e);
|
|
9458
9458
|
}
|
|
9459
|
-
return
|
|
9459
|
+
return N(e, null, [{
|
|
9460
9460
|
key: "getText",
|
|
9461
9461
|
value: function(e, t) {
|
|
9462
9462
|
if (!e.directConnection && !e.connect && !e.webModel && !e.demo) return "Connect to any API using the [connect](https://deepchat.dev/docs/connect#connect-1) property or a popular service via [directConnection](https://deepchat.dev/docs/directConnection/#directConnection).\n Host AI entirely on your browser via a [webModel](https://deepchat.dev/docs/webModel).\n To get started checkout the [Start](https://deepchat.dev/start) page and live code [examples](https://deepchat.dev/examples/frameworks).\n To remove this message set the [demo](https://deepchat.dev/docs/demo#demo) property to true.";
|
|
@@ -9472,7 +9472,7 @@ var Zi = /*#__PURE__*/ function() {
|
|
|
9472
9472
|
function e() {
|
|
9473
9473
|
M(this, e);
|
|
9474
9474
|
}
|
|
9475
|
-
return
|
|
9475
|
+
return N(e, null, [
|
|
9476
9476
|
{
|
|
9477
9477
|
key: "createImage",
|
|
9478
9478
|
value: function(e, t, n) {
|
|
@@ -9503,7 +9503,7 @@ var Zi = /*#__PURE__*/ function() {
|
|
|
9503
9503
|
key: "createAudioElement",
|
|
9504
9504
|
value: function(e, t) {
|
|
9505
9505
|
var n = document.createElement("audio");
|
|
9506
|
-
return n.src = e.src, n.classList.add("audio-player"), n.controls = !0,
|
|
9506
|
+
return n.src = e.src, n.classList.add("audio-player"), n.controls = !0, F.IS_SAFARI && (n.classList.add("audio-player-safari"), n.classList.add(t === I.USER_ROLE ? "audio-player-safari-right" : "audio-player-safari-left")), n;
|
|
9507
9507
|
}
|
|
9508
9508
|
},
|
|
9509
9509
|
{
|
|
@@ -9555,7 +9555,7 @@ var Zi = /*#__PURE__*/ function() {
|
|
|
9555
9555
|
i.textToSpeech = e;
|
|
9556
9556
|
}), i;
|
|
9557
9557
|
}
|
|
9558
|
-
return E(t, e),
|
|
9558
|
+
return E(t, e), N(t, [
|
|
9559
9559
|
{
|
|
9560
9560
|
key: "prepareDemo",
|
|
9561
9561
|
value: function(e) {
|
|
@@ -9753,7 +9753,7 @@ var Zi = /*#__PURE__*/ function() {
|
|
|
9753
9753
|
function e() {
|
|
9754
9754
|
M(this, e);
|
|
9755
9755
|
}
|
|
9756
|
-
return
|
|
9756
|
+
return N(e, null, [
|
|
9757
9757
|
{
|
|
9758
9758
|
key: "adjustInputPadding",
|
|
9759
9759
|
value: function(e, t) {
|
|
@@ -9792,7 +9792,7 @@ var aa = ia, oa = /*#__PURE__*/ function() {
|
|
|
9792
9792
|
function e() {
|
|
9793
9793
|
M(this, e);
|
|
9794
9794
|
}
|
|
9795
|
-
return
|
|
9795
|
+
return N(e, null, [
|
|
9796
9796
|
{
|
|
9797
9797
|
key: "create",
|
|
9798
9798
|
value: function() {
|
|
@@ -9835,7 +9835,7 @@ var aa = ia, oa = /*#__PURE__*/ function() {
|
|
|
9835
9835
|
function e() {
|
|
9836
9836
|
M(this, e);
|
|
9837
9837
|
}
|
|
9838
|
-
return
|
|
9838
|
+
return N(e, null, [
|
|
9839
9839
|
{
|
|
9840
9840
|
key: "createTextElement",
|
|
9841
9841
|
value: function(e) {
|
|
@@ -9882,19 +9882,19 @@ var aa = ia, oa = /*#__PURE__*/ function() {
|
|
|
9882
9882
|
function e() {
|
|
9883
9883
|
M(this, e);
|
|
9884
9884
|
}
|
|
9885
|
-
return
|
|
9885
|
+
return N(e, null, [
|
|
9886
9886
|
{
|
|
9887
9887
|
key: "unsetAllCSS",
|
|
9888
9888
|
value: function(e, t) {
|
|
9889
9889
|
var n, r;
|
|
9890
|
-
t.container &&
|
|
9890
|
+
t.container && ce.unsetAllCSSMouseStates(e, t.container), (n = t.svg) != null && n.styles && ce.unsetAllCSSMouseStates(e.children[0], t.svg.styles), (r = t.text) != null && r.styles && ce.unsetAllCSSMouseStates(e.children[0], t.text.styles);
|
|
9891
9891
|
}
|
|
9892
9892
|
},
|
|
9893
9893
|
{
|
|
9894
9894
|
key: "unsetActionCSS",
|
|
9895
9895
|
value: function(e, t) {
|
|
9896
9896
|
var n, r;
|
|
9897
|
-
t.container &&
|
|
9897
|
+
t.container && ce.unsetActivityCSSMouseStates(e, t.container), (n = t.svg) != null && n.styles && ce.unsetActivityCSSMouseStates(e.children[0], t.svg.styles), (r = t.text) != null && r.styles && ce.unsetActivityCSSMouseStates(e.children[0], t.text.styles);
|
|
9898
9898
|
}
|
|
9899
9899
|
},
|
|
9900
9900
|
{
|
|
@@ -9914,7 +9914,7 @@ var aa = ia, oa = /*#__PURE__*/ function() {
|
|
|
9914
9914
|
function e(t, n, r, i) {
|
|
9915
9915
|
M(this, e), this._mouseState = { state: "default" }, this.elementRef = t, this._customStyles = r, this.position = n, this.dropupText = i;
|
|
9916
9916
|
}
|
|
9917
|
-
return
|
|
9917
|
+
return N(e, [
|
|
9918
9918
|
{
|
|
9919
9919
|
key: "buttonMouseLeave",
|
|
9920
9920
|
value: function(e) {
|
|
@@ -9969,7 +9969,7 @@ var aa = ia, oa = /*#__PURE__*/ function() {
|
|
|
9969
9969
|
function e() {
|
|
9970
9970
|
M(this, e);
|
|
9971
9971
|
}
|
|
9972
|
-
return
|
|
9972
|
+
return N(e, null, [{
|
|
9973
9973
|
key: "focusItemWhenOnEdge",
|
|
9974
9974
|
value: function(t, n) {
|
|
9975
9975
|
var r = n ? t.children[0] : t.children[t.children.length - 1];
|
|
@@ -9986,7 +9986,7 @@ var aa = ia, oa = /*#__PURE__*/ function() {
|
|
|
9986
9986
|
function e() {
|
|
9987
9987
|
M(this, e);
|
|
9988
9988
|
}
|
|
9989
|
-
return
|
|
9989
|
+
return N(e, null, [
|
|
9990
9990
|
{
|
|
9991
9991
|
key: "addItemEvents",
|
|
9992
9992
|
value: function(e, t, n, r) {
|
|
@@ -10025,7 +10025,7 @@ var aa = ia, oa = /*#__PURE__*/ function() {
|
|
|
10025
10025
|
value: function(t, n, r) {
|
|
10026
10026
|
var i = n.elementRef, a = n.dropupText, o = document.createElement("div");
|
|
10027
10027
|
Object.assign(o.style, r?.item?.default), e.populateItem(i, o, a, r), o.classList.add("dropup-menu-item");
|
|
10028
|
-
var s =
|
|
10028
|
+
var s = ce.processStateful(r?.item || {}, { backgroundColor: "#f3f3f3" }, { backgroundColor: "#ebebeb" });
|
|
10029
10029
|
return e.addItemEvents(t, o, i, s), o;
|
|
10030
10030
|
}
|
|
10031
10031
|
}
|
|
@@ -10037,7 +10037,7 @@ var aa = ia, oa = /*#__PURE__*/ function() {
|
|
|
10037
10037
|
return r.addWindowEvents(t);
|
|
10038
10038
|
});
|
|
10039
10039
|
}
|
|
10040
|
-
return
|
|
10040
|
+
return N(e, [
|
|
10041
10041
|
{
|
|
10042
10042
|
key: "open",
|
|
10043
10043
|
value: function() {
|
|
@@ -10079,7 +10079,7 @@ var aa = ia, oa = /*#__PURE__*/ function() {
|
|
|
10079
10079
|
key: "windowKeyDown",
|
|
10080
10080
|
value: function(e, t) {
|
|
10081
10081
|
var n, r, i;
|
|
10082
|
-
!e.isConnected && this.keyDownEvent ? window.removeEventListener("keydown", this.keyDownEvent) : this._isOpen && (t.key ===
|
|
10082
|
+
!e.isConnected && this.keyDownEvent ? window.removeEventListener("keydown", this.keyDownEvent) : this._isOpen && (t.key === P.ESCAPE ? (this.close(), (n = this.highlightedItem) == null || n.dispatchEvent(new MouseEvent("mouseleave"))) : t.key === P.ENTER ? ((r = this.highlightedItem) == null || r.click(), (i = this.highlightedItem) == null || i.dispatchEvent(new MouseEvent("mouseleave"))) : t.key === P.ARROW_DOWN ? fa.focusSiblingItem(this.highlightedItem || this.elementRef.children[this.elementRef.children.length - 1], this.elementRef, !0) : t.key === P.ARROW_UP && fa.focusSiblingItem(this.highlightedItem || this.elementRef.children[0], this.elementRef, !1));
|
|
10083
10083
|
}
|
|
10084
10084
|
}
|
|
10085
10085
|
], [{
|
|
@@ -10100,7 +10100,7 @@ var aa = ia, oa = /*#__PURE__*/ function() {
|
|
|
10100
10100
|
var i = r.createInnerElements(r._customStyles);
|
|
10101
10101
|
return r._menu = new ma(e, n?.menu), r.addClickEvent(), r.buttonContainer = t.createButtonContainer(), r.elementRef.appendChild(i.styles), r.buttonContainer.appendChild(r.elementRef), r.elementRef.classList.add("dropup-icon", "upload-file-button"), r.elementRef.children[0].id = "dropup-icon", r.buttonContainer.appendChild(r._menu.elementRef), r.reapplyStateStyle("styles"), r.addContainerEvents(e), r;
|
|
10102
10102
|
}
|
|
10103
|
-
return E(t, e),
|
|
10103
|
+
return E(t, e), N(t, [
|
|
10104
10104
|
{
|
|
10105
10105
|
key: "createInnerElements",
|
|
10106
10106
|
value: function(e) {
|
|
@@ -10167,7 +10167,7 @@ var aa = ia, oa = /*#__PURE__*/ function() {
|
|
|
10167
10167
|
function e() {
|
|
10168
10168
|
M(this, e);
|
|
10169
10169
|
}
|
|
10170
|
-
return
|
|
10170
|
+
return N(e, null, [
|
|
10171
10171
|
{
|
|
10172
10172
|
key: "addToDropup",
|
|
10173
10173
|
value: function(e, t, n, r) {
|
|
@@ -10269,7 +10269,7 @@ var aa = ia, oa = /*#__PURE__*/ function() {
|
|
|
10269
10269
|
e
|
|
10270
10270
|
]), n.isActive = !1, n._innerElements = n.createInnerElements(n._customStyles), n.changeToDefault(), n;
|
|
10271
10271
|
}
|
|
10272
|
-
return E(t, e),
|
|
10272
|
+
return E(t, e), N(t, [
|
|
10273
10273
|
{
|
|
10274
10274
|
key: "createInnerElements",
|
|
10275
10275
|
value: function(e) {
|
|
@@ -10348,7 +10348,7 @@ var Ta = /*#__PURE__*/ function() {
|
|
|
10348
10348
|
function e() {
|
|
10349
10349
|
M(this, e);
|
|
10350
10350
|
}
|
|
10351
|
-
return
|
|
10351
|
+
return N(e, null, [
|
|
10352
10352
|
{
|
|
10353
10353
|
key: "capitalize",
|
|
10354
10354
|
value: function(t) {
|
|
@@ -10383,7 +10383,7 @@ Ca.Translate = /* @__PURE__ */ function() {
|
|
|
10383
10383
|
function e() {
|
|
10384
10384
|
M(this, e);
|
|
10385
10385
|
}
|
|
10386
|
-
return
|
|
10386
|
+
return N(e, null, [{
|
|
10387
10387
|
key: "translate",
|
|
10388
10388
|
value: function(e, t) {
|
|
10389
10389
|
for (var n = Ea.Text.breakupIntoWordsArr(e), r = 0; r < n.length; r += 1) t[n[r]] && (n[r] = t[n[r]]);
|
|
@@ -10396,7 +10396,7 @@ Sa.WebSpeechTranscript = /* @__PURE__ */ function() {
|
|
|
10396
10396
|
function e() {
|
|
10397
10397
|
M(this, e);
|
|
10398
10398
|
}
|
|
10399
|
-
return
|
|
10399
|
+
return N(e, null, [{
|
|
10400
10400
|
key: "extract",
|
|
10401
10401
|
value: function(e, t, n) {
|
|
10402
10402
|
for (var r = "", i = e.resultIndex; i < e.results.length; ++i) {
|
|
@@ -10426,7 +10426,7 @@ Sa.WebSpeechTranscript = /* @__PURE__ */ function() {
|
|
|
10426
10426
|
}();
|
|
10427
10427
|
var Oa = {};
|
|
10428
10428
|
Object.defineProperty(Oa, "__esModule", { value: !0 }), Oa.Browser = void 0;
|
|
10429
|
-
var ka = /*#__PURE__*/
|
|
10429
|
+
var ka = /*#__PURE__*/ N(function e() {
|
|
10430
10430
|
M(this, e);
|
|
10431
10431
|
});
|
|
10432
10432
|
Oa.Browser = ka, ka.IS_SAFARI = function() {
|
|
@@ -10438,7 +10438,7 @@ var Ma = /*#__PURE__*/ function() {
|
|
|
10438
10438
|
function e() {
|
|
10439
10439
|
M(this, e);
|
|
10440
10440
|
}
|
|
10441
|
-
return
|
|
10441
|
+
return N(e, null, [
|
|
10442
10442
|
{
|
|
10443
10443
|
key: "getElementIfFocusedOnAvailable",
|
|
10444
10444
|
value: function(e, t) {
|
|
@@ -10489,7 +10489,7 @@ Object.defineProperty(Na, "__esModule", { value: !0 }), Na.PreResultUtils = void
|
|
|
10489
10489
|
function e() {
|
|
10490
10490
|
M(this, e);
|
|
10491
10491
|
}
|
|
10492
|
-
return
|
|
10492
|
+
return N(e, null, [{
|
|
10493
10493
|
key: "process",
|
|
10494
10494
|
value: function(e, t, n, r, i) {
|
|
10495
10495
|
var a = r?.(t, n);
|
|
@@ -10504,7 +10504,7 @@ Object.defineProperty(Fa, "__esModule", { value: !0 }), Fa.AutoScroll = void 0,
|
|
|
10504
10504
|
function e() {
|
|
10505
10505
|
M(this, e);
|
|
10506
10506
|
}
|
|
10507
|
-
return
|
|
10507
|
+
return N(e, null, [
|
|
10508
10508
|
{
|
|
10509
10509
|
key: "changeStateIfNeeded",
|
|
10510
10510
|
value: function(e, t) {
|
|
@@ -10542,7 +10542,7 @@ Object.defineProperty(Ia, "__esModule", { value: !0 }), Ia.Elements = void 0, Ia
|
|
|
10542
10542
|
function e() {
|
|
10543
10543
|
M(this, e);
|
|
10544
10544
|
}
|
|
10545
|
-
return
|
|
10545
|
+
return N(e, null, [
|
|
10546
10546
|
{
|
|
10547
10547
|
key: "isPrimitiveElement",
|
|
10548
10548
|
value: function(e) {
|
|
@@ -10596,7 +10596,7 @@ Object.defineProperty(La, "__esModule", { value: !0 }), La.Cursor = void 0, La.C
|
|
|
10596
10596
|
function e() {
|
|
10597
10597
|
M(this, e);
|
|
10598
10598
|
}
|
|
10599
|
-
return
|
|
10599
|
+
return N(e, null, [
|
|
10600
10600
|
{
|
|
10601
10601
|
key: "setOffsetForGeneric",
|
|
10602
10602
|
value: function(t, n) {
|
|
@@ -10662,7 +10662,7 @@ Pa.CommandUtils = /* @__PURE__ */ function() {
|
|
|
10662
10662
|
function e() {
|
|
10663
10663
|
M(this, e);
|
|
10664
10664
|
}
|
|
10665
|
-
return
|
|
10665
|
+
return N(e, null, [
|
|
10666
10666
|
{
|
|
10667
10667
|
key: "processCommand",
|
|
10668
10668
|
value: function(e, t) {
|
|
@@ -10749,7 +10749,7 @@ Ua.Highlight = /* @__PURE__ */ function() {
|
|
|
10749
10749
|
function e() {
|
|
10750
10750
|
M(this, e);
|
|
10751
10751
|
}
|
|
10752
|
-
return
|
|
10752
|
+
return N(e, null, [
|
|
10753
10753
|
{
|
|
10754
10754
|
key: "setStateForPrimitive",
|
|
10755
10755
|
value: function(e, t) {
|
|
@@ -10796,7 +10796,7 @@ Ka.Padding = /* @__PURE__ */ function() {
|
|
|
10796
10796
|
function e() {
|
|
10797
10797
|
M(this, e);
|
|
10798
10798
|
}
|
|
10799
|
-
return
|
|
10799
|
+
return N(e, null, [
|
|
10800
10800
|
{
|
|
10801
10801
|
key: "setStateForPrimitiveElement",
|
|
10802
10802
|
value: function(e, t) {
|
|
@@ -10853,7 +10853,7 @@ Aa.Speech = /* @__PURE__ */ function() {
|
|
|
10853
10853
|
function e() {
|
|
10854
10854
|
M(this, e), this.finalTranscript = "", this.interimSpan = to.Elements.createInterimSpan(), this.finalSpan = to.Elements.createGenericSpan(), this.scrollingSpan = to.Elements.createGenericSpan(), this.isCursorAtEnd = !1, this.spansPopulated = !1, this.startPadding = "", this.endPadding = "", this.numberOfSpacesBeforeNewText = 0, this.numberOfSpacesAfterNewText = 0, this.isHighlighted = !1, this.primitiveTextRecorded = !1, this.recognizing = !1, this._displayInterimResults = !0, this.insertInCursorLocation = !0, this.autoScroll = !0, this.isRestarting = !1, this.isPaused = !1, this.isWaitingForCommand = !1, this.isTargetInShadow = !1, this.cannotBeStopped = !1, this.resetState();
|
|
10855
10855
|
}
|
|
10856
|
-
return
|
|
10856
|
+
return N(e, [
|
|
10857
10857
|
{
|
|
10858
10858
|
key: "prepareBeforeStart",
|
|
10859
10859
|
value: function(e) {
|
|
@@ -10969,7 +10969,7 @@ xa.WebSpeech = /* @__PURE__ */ function(e) {
|
|
|
10969
10969
|
function t() {
|
|
10970
10970
|
return M(this, t), x(this, t);
|
|
10971
10971
|
}
|
|
10972
|
-
return E(t, e),
|
|
10972
|
+
return E(t, e), N(t, [
|
|
10973
10973
|
{
|
|
10974
10974
|
key: "start",
|
|
10975
10975
|
value: function(e) {
|
|
@@ -11037,7 +11037,7 @@ var lo = /*#__PURE__*/ function() {
|
|
|
11037
11037
|
function e() {
|
|
11038
11038
|
M(this, e);
|
|
11039
11039
|
}
|
|
11040
|
-
return
|
|
11040
|
+
return N(e, null, [{
|
|
11041
11041
|
key: "doubleClickDetector",
|
|
11042
11042
|
value: function() {
|
|
11043
11043
|
return e.doubleClickPending ? !0 : (e.doubleClickPending = !0, setTimeout(function() {
|
|
@@ -11052,7 +11052,7 @@ Object.defineProperty(fo, "__esModule", { value: !0 }), fo.PreventConnectionStop
|
|
|
11052
11052
|
function e() {
|
|
11053
11053
|
M(this, e);
|
|
11054
11054
|
}
|
|
11055
|
-
return
|
|
11055
|
+
return N(e, null, [{
|
|
11056
11056
|
key: "applyPrevention",
|
|
11057
11057
|
value: function(e) {
|
|
11058
11058
|
clearTimeout(e._manualConnectionStopPrevention), e.cannotBeStopped = !0, e._manualConnectionStopPrevention = setTimeout(function() {
|
|
@@ -11073,7 +11073,7 @@ po.AzureSpeechConfig = /* @__PURE__ */ function() {
|
|
|
11073
11073
|
function e() {
|
|
11074
11074
|
M(this, e);
|
|
11075
11075
|
}
|
|
11076
|
-
return
|
|
11076
|
+
return N(e, null, [
|
|
11077
11077
|
{
|
|
11078
11078
|
key: "validateOptions",
|
|
11079
11079
|
value: function(e, t) {
|
|
@@ -11141,7 +11141,7 @@ var _o = /*#__PURE__*/ function() {
|
|
|
11141
11141
|
function e() {
|
|
11142
11142
|
M(this, e);
|
|
11143
11143
|
}
|
|
11144
|
-
return
|
|
11144
|
+
return N(e, null, [{
|
|
11145
11145
|
key: "set",
|
|
11146
11146
|
value: function(e) {
|
|
11147
11147
|
e.stopTimeout = setTimeout(function() {
|
|
@@ -11163,7 +11163,7 @@ vo.AzureTranscript = /* @__PURE__ */ function() {
|
|
|
11163
11163
|
function e() {
|
|
11164
11164
|
M(this, e);
|
|
11165
11165
|
}
|
|
11166
|
-
return
|
|
11166
|
+
return N(e, null, [{
|
|
11167
11167
|
key: "extract",
|
|
11168
11168
|
value: function(e, t, n, r) {
|
|
11169
11169
|
return r && (e = yo.Translate.translate(e, r)), n ? {
|
|
@@ -11184,7 +11184,7 @@ uo.Azure = /* @__PURE__ */ function(e) {
|
|
|
11184
11184
|
var e;
|
|
11185
11185
|
return M(this, t), e = x(this, t, arguments), e._newTextPadding = "", e;
|
|
11186
11186
|
}
|
|
11187
|
-
return E(t, e),
|
|
11187
|
+
return E(t, e), N(t, [
|
|
11188
11188
|
{
|
|
11189
11189
|
key: "start",
|
|
11190
11190
|
value: function(e, t) {
|
|
@@ -11331,7 +11331,7 @@ var wo = xa, To = Pa, Eo = co, Do = uo, Oo = ba.default = /* @__PURE__ */ functi
|
|
|
11331
11331
|
function e() {
|
|
11332
11332
|
M(this, e);
|
|
11333
11333
|
}
|
|
11334
|
-
return
|
|
11334
|
+
return N(e, null, [
|
|
11335
11335
|
{
|
|
11336
11336
|
key: "toggle",
|
|
11337
11337
|
value: function(t, n) {
|
|
@@ -11376,7 +11376,7 @@ var wo = xa, To = Pa, Eo = co, Do = uo, Oo = ba.default = /* @__PURE__ */ functi
|
|
|
11376
11376
|
function e(t, n) {
|
|
11377
11377
|
M(this, e), this.silenceMS = 2e3, this.stop = !0, typeof n == "boolean" && n === !1 && (this.stop = !1), typeof t == "number" && (this.silenceMS = t);
|
|
11378
11378
|
}
|
|
11379
|
-
return
|
|
11379
|
+
return N(e, [
|
|
11380
11380
|
{
|
|
11381
11381
|
key: "setSilenceTimeout",
|
|
11382
11382
|
value: function(e, t) {
|
|
@@ -11422,7 +11422,7 @@ var wo = xa, To = Pa, Eo = co, Do = uo, Oo = ba.default = /* @__PURE__ */ functi
|
|
|
11422
11422
|
i._validationHandler = e._validationHandler;
|
|
11423
11423
|
}), i;
|
|
11424
11424
|
}
|
|
11425
|
-
return E(t, e),
|
|
11425
|
+
return E(t, e), N(t, [
|
|
11426
11426
|
{
|
|
11427
11427
|
key: "processConfiguration",
|
|
11428
11428
|
value: function(e, n) {
|
|
@@ -11519,7 +11519,7 @@ var jo = Ao, Mo = /*#__PURE__*/ function() {
|
|
|
11519
11519
|
a._validationHandler = t._validationHandler;
|
|
11520
11520
|
});
|
|
11521
11521
|
}
|
|
11522
|
-
return
|
|
11522
|
+
return N(e, [
|
|
11523
11523
|
{
|
|
11524
11524
|
key: "attemptAddFile",
|
|
11525
11525
|
value: function(t, n) {
|
|
@@ -11632,7 +11632,7 @@ var jo = Ao, Mo = /*#__PURE__*/ function() {
|
|
|
11632
11632
|
key: "createAnyFileAttachment",
|
|
11633
11633
|
value: function(e) {
|
|
11634
11634
|
var t = document.createElement("div");
|
|
11635
|
-
t.classList.add("border-bound-attachment"),
|
|
11635
|
+
t.classList.add("border-bound-attachment"), F.IS_SAFARI && t.classList.add("border-bound-attachment-safari");
|
|
11636
11636
|
var n = document.createElement("div");
|
|
11637
11637
|
n.classList.add("any-file-attachment-text");
|
|
11638
11638
|
var r = document.createElement("div");
|
|
@@ -11656,7 +11656,7 @@ var jo = Ao, Mo = /*#__PURE__*/ function() {
|
|
|
11656
11656
|
i
|
|
11657
11657
|
]);
|
|
11658
11658
|
}
|
|
11659
|
-
return E(t, e),
|
|
11659
|
+
return E(t, e), N(t, [
|
|
11660
11660
|
{
|
|
11661
11661
|
key: "createTimer",
|
|
11662
11662
|
value: function(e, n) {
|
|
@@ -11722,7 +11722,7 @@ var jo = Ao, Mo = /*#__PURE__*/ function() {
|
|
|
11722
11722
|
key: "createAudioContainer",
|
|
11723
11723
|
value: function() {
|
|
11724
11724
|
var e = document.createElement("div");
|
|
11725
|
-
return e.classList.add("border-bound-attachment", "audio-attachment-icon-container"),
|
|
11725
|
+
return e.classList.add("border-bound-attachment", "audio-attachment-icon-container"), F.IS_SAFARI && e.classList.add("border-bound-attachment-safari"), e;
|
|
11726
11726
|
}
|
|
11727
11727
|
},
|
|
11728
11728
|
{
|
|
@@ -11765,7 +11765,7 @@ var Io = Fo, Lo = /*#__PURE__*/ function() {
|
|
|
11765
11765
|
function e() {
|
|
11766
11766
|
M(this, e);
|
|
11767
11767
|
}
|
|
11768
|
-
return
|
|
11768
|
+
return N(e, null, [{
|
|
11769
11769
|
key: "create",
|
|
11770
11770
|
value: function(e, t, n, r, i) {
|
|
11771
11771
|
return i === "audio" ? new Io(e, t, n, r) : new Mo(e, t, n, r);
|
|
@@ -11777,7 +11777,7 @@ var Io = Fo, Lo = /*#__PURE__*/ function() {
|
|
|
11777
11777
|
var i = j(r) == "object" && !!r.displayFileAttachmentContainer;
|
|
11778
11778
|
this.toggleContainerDisplay(i), t.appendChild(this.elementRef), n && Object.assign(this.elementRef.style, n);
|
|
11779
11779
|
}
|
|
11780
|
-
return
|
|
11780
|
+
return N(e, [
|
|
11781
11781
|
{
|
|
11782
11782
|
key: "addType",
|
|
11783
11783
|
value: function(e, t, n) {
|
|
@@ -11873,7 +11873,7 @@ var Io = Fo, Lo = /*#__PURE__*/ function() {
|
|
|
11873
11873
|
function e(t, n, r) {
|
|
11874
11874
|
M(this, e), this._isOpen = !1, this._contentRef = e.createModalContent(n, r?.backgroundColor), this._buttonPanel = e.createButtonPanel(r?.backgroundColor), this._elementRef = e.createContainer(this._contentRef, r), this._elementRef.appendChild(this._buttonPanel), t.appendChild(this._elementRef), this._backgroundPanelRef = e.createDarkBackgroundPanel(), t.appendChild(this._backgroundPanelRef), this.addWindowEvents(t);
|
|
11875
11875
|
}
|
|
11876
|
-
return
|
|
11876
|
+
return N(e, [
|
|
11877
11877
|
{
|
|
11878
11878
|
key: "isOpen",
|
|
11879
11879
|
value: function() {
|
|
@@ -11931,7 +11931,7 @@ var Io = Fo, Lo = /*#__PURE__*/ function() {
|
|
|
11931
11931
|
key: "windowKeyDown",
|
|
11932
11932
|
value: function(e, t) {
|
|
11933
11933
|
var n, r;
|
|
11934
|
-
!e.isConnected && this.keyDownEvent ? window.removeEventListener("keydown", this.keyDownEvent) : this._isOpen && (t.key ===
|
|
11934
|
+
!e.isConnected && this.keyDownEvent ? window.removeEventListener("keydown", this.keyDownEvent) : this._isOpen && (t.key === P.ESCAPE ? (this.close(), (n = this.extensionCloseCallback) == null || n.call(this)) : t.key === P.ENTER && (this.close(), (r = this.extensionCloseCallback) == null || r.call(this)));
|
|
11935
11935
|
}
|
|
11936
11936
|
}
|
|
11937
11937
|
], [
|
|
@@ -12006,7 +12006,7 @@ var Bo = zo, Vo = /*#__PURE__*/ function(e) {
|
|
|
12006
12006
|
var d = l === "dropup-menu", f = s.createInnerElements(i, a, s._customStyles, d);
|
|
12007
12007
|
return s._inputElement = t.createInputElement(r?.files?.acceptedFormats), s.addClickEvent(e, r), s.elementRef.replaceChildren(f.styles), s.reapplyStateStyle("styles"), s._fileAttachmentsType = n, s._openModalOnce = r.files?.infoModal?.openModalOnce === !1 || (c = r.files?.infoModal) == null ? void 0 : c.openModalOnce, s;
|
|
12008
12008
|
}
|
|
12009
|
-
return E(t, e),
|
|
12009
|
+
return E(t, e), N(t, [
|
|
12010
12010
|
{
|
|
12011
12011
|
key: "createInnerElements",
|
|
12012
12012
|
value: function(e, n, r) {
|
|
@@ -12066,7 +12066,7 @@ var Bo = zo, Vo = /*#__PURE__*/ function(e) {
|
|
|
12066
12066
|
function e() {
|
|
12067
12067
|
M(this, e);
|
|
12068
12068
|
}
|
|
12069
|
-
return
|
|
12069
|
+
return N(e, null, [
|
|
12070
12070
|
{
|
|
12071
12071
|
key: "create",
|
|
12072
12072
|
value: function(t, n, r) {
|
|
@@ -12125,7 +12125,7 @@ var Bo = zo, Vo = /*#__PURE__*/ function(e) {
|
|
|
12125
12125
|
function e() {
|
|
12126
12126
|
M(this, e);
|
|
12127
12127
|
}
|
|
12128
|
-
return
|
|
12128
|
+
return N(e, null, [
|
|
12129
12129
|
{
|
|
12130
12130
|
key: "validate",
|
|
12131
12131
|
value: function(e, t, n, r, i) {
|
|
@@ -12140,7 +12140,7 @@ var Bo = zo, Vo = /*#__PURE__*/ function(e) {
|
|
|
12140
12140
|
var o, s, c, l;
|
|
12141
12141
|
return D().wrap(function(t) {
|
|
12142
12142
|
for (;;) switch (t.prev = t.next) {
|
|
12143
|
-
case 0: return o = r.inputElementRef, s = o.classList.contains(
|
|
12143
|
+
case 0: return o = r.inputElementRef, s = o.classList.contains(ve.PLACEHOLDER_TEXT_CLASS) ? "" : o.textContent, t.next = 3, i.completePlaceholders();
|
|
12144
12144
|
case 3: return c = i.getAllFileData(), l = c?.map(function(e) {
|
|
12145
12145
|
return e.file;
|
|
12146
12146
|
}), t.abrupt("return", e.validate(n, a, s, l));
|
|
@@ -12214,7 +12214,7 @@ var Bo = zo, Vo = /*#__PURE__*/ function(e) {
|
|
|
12214
12214
|
function e() {
|
|
12215
12215
|
M(this, e);
|
|
12216
12216
|
}
|
|
12217
|
-
return
|
|
12217
|
+
return N(e, null, [{
|
|
12218
12218
|
key: "getFileName",
|
|
12219
12219
|
value: function(e, t) {
|
|
12220
12220
|
var n = /* @__PURE__ */ new Date();
|
|
@@ -12226,7 +12226,7 @@ var Bo = zo, Vo = /*#__PURE__*/ function(e) {
|
|
|
12226
12226
|
var r;
|
|
12227
12227
|
return M(this, t), r = x(this, t, [n.button]), r._waitingForBrowserApproval = !1, r._audioType = e, r._extension = n.files?.format || "mp3", r._maxDurationSeconds = n.files?.maxDurationSeconds, r.elementRef.onclick = r.buttonClick.bind(C(r)), r;
|
|
12228
12228
|
}
|
|
12229
|
-
return E(t, e),
|
|
12229
|
+
return E(t, e), N(t, [
|
|
12230
12230
|
{
|
|
12231
12231
|
key: "buttonClick",
|
|
12232
12232
|
value: function() {
|
|
@@ -12276,7 +12276,7 @@ var Bo = zo, Vo = /*#__PURE__*/ function(e) {
|
|
|
12276
12276
|
function e() {
|
|
12277
12277
|
M(this, e);
|
|
12278
12278
|
}
|
|
12279
|
-
return
|
|
12279
|
+
return N(e, null, [
|
|
12280
12280
|
{
|
|
12281
12281
|
key: "setPropertyValueIfDoesNotExist",
|
|
12282
12282
|
value: function(t, n, r) {
|
|
@@ -12313,7 +12313,7 @@ var Bo = zo, Vo = /*#__PURE__*/ function(e) {
|
|
|
12313
12313
|
function e() {
|
|
12314
12314
|
M(this, e);
|
|
12315
12315
|
}
|
|
12316
|
-
return
|
|
12316
|
+
return N(e, null, [
|
|
12317
12317
|
{
|
|
12318
12318
|
key: "resetSubmit",
|
|
12319
12319
|
value: function(e, t) {
|
|
@@ -12392,7 +12392,7 @@ var Bo = zo, Vo = /*#__PURE__*/ function(e) {
|
|
|
12392
12392
|
s._validationHandler = e._validationHandler, s.assignHandlers(s._validationHandler), (t = s._validationHandler) == null || t.call(C(s));
|
|
12393
12393
|
}), s;
|
|
12394
12394
|
}
|
|
12395
|
-
return E(t, e),
|
|
12395
|
+
return E(t, e), N(t, [
|
|
12396
12396
|
{
|
|
12397
12397
|
key: "createInnerElements",
|
|
12398
12398
|
value: function() {
|
|
@@ -12467,7 +12467,7 @@ var Bo = zo, Vo = /*#__PURE__*/ function(e) {
|
|
|
12467
12467
|
return D().wrap(function(e) {
|
|
12468
12468
|
for (;;) switch (e.prev = e.next) {
|
|
12469
12469
|
case 0: return e.next = 2, this._fileAttachments.completePlaceholders();
|
|
12470
|
-
case 2: t = this._fileAttachments.getAllFileData(), this._inputElementRef.classList.contains(
|
|
12470
|
+
case 2: t = this._fileAttachments.getAllFileData(), this._inputElementRef.classList.contains(ve.PLACEHOLDER_TEXT_CLASS) ? this.attemptSubmit({
|
|
12471
12471
|
text: "",
|
|
12472
12472
|
files: t
|
|
12473
12473
|
}) : (n = this._inputElementRef.innerText.trim(), this.attemptSubmit({
|
|
@@ -12526,7 +12526,7 @@ var Bo = zo, Vo = /*#__PURE__*/ function(e) {
|
|
|
12526
12526
|
}
|
|
12527
12527
|
return e.abrupt("return");
|
|
12528
12528
|
case 7: return this.changeToLoadingIcon(), e.next = 10, this.addNewMessage(t);
|
|
12529
|
-
case 10: return this._serviceIO.isWebModel() || this._messages.addLoadingMessage(),
|
|
12529
|
+
case 10: return this._serviceIO.isWebModel() || this._messages.addLoadingMessage(), ve.clear(this._inputElementRef), i = t.files?.map(function(e) {
|
|
12530
12530
|
return e.file;
|
|
12531
12531
|
}), a = {
|
|
12532
12532
|
text: t.text === "" ? void 0 : t.text,
|
|
@@ -12656,7 +12656,7 @@ var Xo = Yo, Zo = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0
|
|
|
12656
12656
|
var o = a.addButtonsAndTheirEvents(n), s = o.captureButton, c = o.submitButton;
|
|
12657
12657
|
return a._captureButton = s, a._submitButton = c, a._captureIcon = a._captureButton.children[0], a._refreshIcon = Wr.createSVGElement(Zo), a._refreshIcon.classList.add("modal-svg-button-icon", "modal-svg-refresh-icon"), i?.format === "jpeg" && (a._format = "image/jpeg"), i != null && i.dimensions && (a._dimensions = i.dimensions), a._contentRef.appendChild(a._canvas), a.extensionCloseCallback = a.stop, a;
|
|
12658
12658
|
}
|
|
12659
|
-
return E(t, e),
|
|
12659
|
+
return E(t, e), N(t, [
|
|
12660
12660
|
{
|
|
12661
12661
|
key: "addButtonsAndTheirEvents",
|
|
12662
12662
|
value: function(e) {
|
|
@@ -12756,7 +12756,7 @@ var Xo = Yo, Zo = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0
|
|
|
12756
12756
|
var s = i.createInnerElements(i._customStyles, a === "dropup-menu");
|
|
12757
12757
|
return r && i.addClickEvent(e, n, r.modalContainerStyle, r.files), i.elementRef.classList.add("upload-file-button"), i.elementRef.appendChild(s.styles), i.reapplyStateStyle("styles"), i;
|
|
12758
12758
|
}
|
|
12759
|
-
return E(t, e),
|
|
12759
|
+
return E(t, e), N(t, [{
|
|
12760
12760
|
key: "createInnerElements",
|
|
12761
12761
|
value: function(e) {
|
|
12762
12762
|
var n = arguments.length > 1 && arguments[1] !== void 0 && arguments[1];
|
|
@@ -12784,12 +12784,12 @@ var Xo = Yo, Zo = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0
|
|
|
12784
12784
|
}(da), is = /*#__PURE__*/ function() {
|
|
12785
12785
|
function e(t, n, r, i) {
|
|
12786
12786
|
M(this, e), this.elementRef = e.createPanelElement(t.inputAreaStyle);
|
|
12787
|
-
var a = {}, o = this.createFileUploadComponents(t, r, i, a), s = new
|
|
12787
|
+
var a = {}, o = this.createFileUploadComponents(t, r, i, a), s = new ve(t, r, o);
|
|
12788
12788
|
t.speechToText && !a.microphone && (a.microphone = { button: new jo(t, s, n.addNewErrorMessage.bind(n)) });
|
|
12789
12789
|
var c = new Xo(t, s.inputElementRef, n, r, o, a);
|
|
12790
12790
|
s.submit = c.submitFromInput.bind(c), Uo.attach(t, r, s, o, c), t.submitUserMessage = c.programmaticSubmit.bind(c), a.submit = { button: c }, e.addElements(this.elementRef, s, a, i, o, t.dropupStyles);
|
|
12791
12791
|
}
|
|
12792
|
-
return
|
|
12792
|
+
return N(e, [{
|
|
12793
12793
|
key: "createFileUploadComponents",
|
|
12794
12794
|
value: function(t, n, r, i) {
|
|
12795
12795
|
var a, o, s = new Ro(this.elementRef, t.attachmentContainerStyle, n.demo);
|
|
@@ -12831,7 +12831,7 @@ var Xo = Yo, Zo = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0
|
|
|
12831
12831
|
function e() {
|
|
12832
12832
|
M(this, e);
|
|
12833
12833
|
}
|
|
12834
|
-
return
|
|
12834
|
+
return N(e, null, [{
|
|
12835
12835
|
key: "createElements",
|
|
12836
12836
|
value: function(e, t, n) {
|
|
12837
12837
|
var r = document.createElement("div");
|
|
@@ -12861,12 +12861,12 @@ var Xo = Yo, Zo = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0
|
|
|
12861
12861
|
}, e.addMessage = function() {
|
|
12862
12862
|
return console.warn("addMessage failed - please wait for chat view to render before calling this property.");
|
|
12863
12863
|
}, e.focusInput = function() {
|
|
12864
|
-
return
|
|
12865
|
-
}, e.refreshMessages = function() {}, e.clearMessages = function() {}, e.scrollToBottom = function() {}, e.disableSubmitButton = function() {}, e.setPlaceholderText = function() {}, e._hasBeenRendered = !1, e._auxiliaryStyleApplied = !1, e._elementRef = document.createElement("div"), e._elementRef.id = "container", e.attachShadow({ mode: "open" }).appendChild(e._elementRef),
|
|
12864
|
+
return ye.focusFromParentElement(e._elementRef);
|
|
12865
|
+
}, e.refreshMessages = function() {}, e.clearMessages = function() {}, e.scrollToBottom = function() {}, e.disableSubmitButton = function() {}, e.setPlaceholderText = function() {}, e._hasBeenRendered = !1, e._auxiliaryStyleApplied = !1, e._elementRef = document.createElement("div"), e._elementRef.id = "container", e.attachShadow({ mode: "open" }).appendChild(e._elementRef), fe.apply(os, e.shadowRoot), setTimeout(function() {
|
|
12866
12866
|
e._hasBeenRendered || e.onRender();
|
|
12867
12867
|
}, 20), e;
|
|
12868
12868
|
}
|
|
12869
|
-
return E(t, e),
|
|
12869
|
+
return E(t, e), N(t, [
|
|
12870
12870
|
{
|
|
12871
12871
|
key: "changeToChatView",
|
|
12872
12872
|
value: function() {
|
|
@@ -12876,7 +12876,7 @@ var Xo = Yo, Zo = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0
|
|
|
12876
12876
|
{
|
|
12877
12877
|
key: "onRender",
|
|
12878
12878
|
value: function() {
|
|
12879
|
-
|
|
12879
|
+
ue.attemptAppendStyleSheetToHead(this.style), Me.processConnect(this), (!this._activeService || this._activeService.demo) && (this._activeService = Ji.create(this)), this.auxiliaryStyle && !this._auxiliaryStyleApplied && (fe.apply(this.auxiliaryStyle, this.shadowRoot), this._auxiliaryStyleApplied = !0), fe.applyDefaultStyleToComponent(this.style, this.chatStyle), Me.checkForContainerStyles(this, this._elementRef), this._activeService.key && this._activeService.validateKeyProperty ? se.render(this._elementRef, this.changeToChatView.bind(this), this._activeService) : !(this._activeService instanceof Rr) || this._activeService.key ? (this._childElement ??= this.children[0], as.render(this, this._elementRef, this._activeService, this._childElement)) : this._activeService instanceof Rr && qr.render(this._elementRef, this.changeToChatView.bind(this), this._activeService), this._hasBeenRendered = !0, dr.onRender(this);
|
|
12880
12880
|
}
|
|
12881
12881
|
},
|
|
12882
12882
|
{
|
|
@@ -15347,21 +15347,21 @@ var pu = {}, mu = function(e) {
|
|
|
15347
15347
|
var j = (t.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && te ? void 0 : h, M = k && ne !== h && this.options.updateMissing;
|
|
15348
15348
|
if (te || D || M) {
|
|
15349
15349
|
if (this.logger.log(M ? "updateKey" : "missingKey", d, u, c, M ? ne : h), o) {
|
|
15350
|
-
var
|
|
15351
|
-
|
|
15350
|
+
var re = this.resolve(c, uu(uu({}, t), {}, { keySeparator: !1 }));
|
|
15351
|
+
re && re.res && this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.");
|
|
15352
15352
|
}
|
|
15353
|
-
var
|
|
15354
|
-
if (this.options.saveMissingTo === "fallback" &&
|
|
15355
|
-
else this.options.saveMissingTo === "all" ?
|
|
15356
|
-
var
|
|
15353
|
+
var N = [], ie = this.languageUtils.getFallbackCodes(this.options.fallbackLng, t.lng || this.language);
|
|
15354
|
+
if (this.options.saveMissingTo === "fallback" && ie && ie[0]) for (var ae = 0; ae < ie.length; ae++) N.push(ie[ae]);
|
|
15355
|
+
else this.options.saveMissingTo === "all" ? N = this.languageUtils.toResolveHierarchy(t.lng || this.language) : N.push(t.lng || this.language);
|
|
15356
|
+
var oe = function(e, n, r) {
|
|
15357
15357
|
var a = k && r !== h ? r : j;
|
|
15358
15358
|
i.options.missingKeyHandler ? i.options.missingKeyHandler(e, u, n, a, M, t) : i.backendConnector && i.backendConnector.saveMissing && i.backendConnector.saveMissing(e, u, n, a, M, t), i.emit("missingKey", e, u, n, h);
|
|
15359
15359
|
};
|
|
15360
|
-
this.options.saveMissing && (this.options.saveMissingPlurals && O ?
|
|
15360
|
+
this.options.saveMissing && (this.options.saveMissingPlurals && O ? N.forEach(function(e) {
|
|
15361
15361
|
i.pluralResolver.getSuffixes(e, t).forEach(function(n) {
|
|
15362
|
-
|
|
15362
|
+
oe([e], c + n, t[`defaultValue${n}`] || ne);
|
|
15363
15363
|
});
|
|
15364
|
-
}) :
|
|
15364
|
+
}) : oe(N, c, ne));
|
|
15365
15365
|
}
|
|
15366
15366
|
h = this.extendTranslation(h, e, t, m, r), te && h === c && this.options.appendNamespaceToMissingKey && (h = `${u}:${c}`), (te || D) && this.options.parseMissingKeyHandler && (h = this.options.compatibilityAPI === "v1" ? this.options.parseMissingKeyHandler(h) : this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${u}:${c}` : c, D ? h : void 0));
|
|
15367
15367
|
}
|
|
@@ -19243,39 +19243,39 @@ var rh = "1.18.0", ih = 65536, { isFunction: ah } = Y, oh = (e) => encodeURIComp
|
|
|
19243
19243
|
} else if (d && !c && u && n !== "get" && n !== "head") s = _(s);
|
|
19244
19244
|
else if (d && c && !f && n !== "get" && n !== "head") throw new X("Stream request bodies are not supported by the current fetch implementation", X.ERR_NOT_SUPPORT, e, k);
|
|
19245
19245
|
Y.isString(S) || (S = S ? "include" : "omit");
|
|
19246
|
-
let
|
|
19246
|
+
let re = c && "credentials" in a.prototype;
|
|
19247
19247
|
if (Y.isFormData(s)) {
|
|
19248
19248
|
let e = x.getContentType();
|
|
19249
19249
|
e && /^multipart\/form-data/i.test(e) && !/boundary=/i.test(e) && x.delete("content-type");
|
|
19250
19250
|
}
|
|
19251
19251
|
x.set("User-Agent", "axios/" + rh, !1);
|
|
19252
|
-
let
|
|
19252
|
+
let N = {
|
|
19253
19253
|
...C,
|
|
19254
19254
|
signal: O,
|
|
19255
19255
|
method: n.toUpperCase(),
|
|
19256
19256
|
headers: Np(x.normalize()),
|
|
19257
19257
|
body: s,
|
|
19258
19258
|
duplex: "half",
|
|
19259
|
-
credentials:
|
|
19259
|
+
credentials: re ? S : void 0
|
|
19260
19260
|
};
|
|
19261
|
-
k = c && new a(t,
|
|
19262
|
-
let
|
|
19261
|
+
k = c && new a(t, N);
|
|
19262
|
+
let ie = await (c ? te(k, C) : te(t, N)), ae = Hp.from(ie.headers);
|
|
19263
19263
|
if (E) {
|
|
19264
|
-
let t = Y.toFiniteNumber(
|
|
19264
|
+
let t = Y.toFiniteNumber(ae.getContentLength());
|
|
19265
19265
|
if (t != null && t > w) throw new X("maxContentLength size of " + w + " exceeded", X.ERR_BAD_RESPONSE, e, k);
|
|
19266
19266
|
}
|
|
19267
|
-
let
|
|
19268
|
-
if (p &&
|
|
19267
|
+
let oe = p && (b === "stream" || b === "response");
|
|
19268
|
+
if (p && ie.body && (v || E || oe && A)) {
|
|
19269
19269
|
let t = {};
|
|
19270
19270
|
[
|
|
19271
19271
|
"status",
|
|
19272
19272
|
"statusText",
|
|
19273
19273
|
"headers"
|
|
19274
19274
|
].forEach((e) => {
|
|
19275
|
-
t[e] =
|
|
19275
|
+
t[e] = ie[e];
|
|
19276
19276
|
});
|
|
19277
|
-
let n = Y.toFiniteNumber(
|
|
19278
|
-
|
|
19277
|
+
let n = Y.toFiniteNumber(ae.getContentLength()), [r, i] = v && Am(n, km(jm(v), !0)) || [], a = 0;
|
|
19278
|
+
ie = new o($m(ie.body, ih, (t) => {
|
|
19279
19279
|
if (E && (a = t, a > w)) throw new X("maxContentLength size of " + w + " exceeded", X.ERR_BAD_RESPONSE, e, k);
|
|
19280
19280
|
r && r(t);
|
|
19281
19281
|
}, () => {
|
|
@@ -19283,17 +19283,17 @@ var rh = "1.18.0", ih = 65536, { isFunction: ah } = Y, oh = (e) => encodeURIComp
|
|
|
19283
19283
|
}), t);
|
|
19284
19284
|
}
|
|
19285
19285
|
b ||= "text";
|
|
19286
|
-
let
|
|
19287
|
-
if (E && !p && !
|
|
19286
|
+
let se = await m[Y.findKey(m, b) || "text"](ie, e);
|
|
19287
|
+
if (E && !p && !oe) {
|
|
19288
19288
|
let t;
|
|
19289
|
-
if (
|
|
19289
|
+
if (se != null && (typeof se.byteLength == "number" ? t = se.byteLength : typeof se.size == "number" ? t = se.size : typeof se == "string" && (t = typeof r == "function" ? new r().encode(se).byteLength : se.length)), typeof t == "number" && t > w) throw new X("maxContentLength size of " + w + " exceeded", X.ERR_BAD_RESPONSE, e, k);
|
|
19290
19290
|
}
|
|
19291
|
-
return !
|
|
19291
|
+
return !oe && A && A(), await new Promise((t, n) => {
|
|
19292
19292
|
Tm(t, n, {
|
|
19293
|
-
data:
|
|
19294
|
-
headers: Hp.from(
|
|
19295
|
-
status:
|
|
19296
|
-
statusText:
|
|
19293
|
+
data: se,
|
|
19294
|
+
headers: Hp.from(ie.headers),
|
|
19295
|
+
status: ie.status,
|
|
19296
|
+
statusText: ie.statusText,
|
|
19297
19297
|
config: e,
|
|
19298
19298
|
request: k
|
|
19299
19299
|
});
|
|
@@ -20661,28 +20661,28 @@ var l_ = /* @__PURE__ */ s(((e, t) => {
|
|
|
20661
20661
|
}
|
|
20662
20662
|
return v.call(t, n, "$&_");
|
|
20663
20663
|
}
|
|
20664
|
-
var j = u_(), M = j.custom,
|
|
20664
|
+
var j = u_(), M = j.custom, re = F(M) ? M : null, N = {
|
|
20665
20665
|
__proto__: null,
|
|
20666
20666
|
double: "\"",
|
|
20667
20667
|
single: "'"
|
|
20668
|
-
},
|
|
20668
|
+
}, ie = {
|
|
20669
20669
|
__proto__: null,
|
|
20670
20670
|
double: /(["\\])/g,
|
|
20671
20671
|
single: /(['\\])/g
|
|
20672
20672
|
};
|
|
20673
20673
|
t.exports = function e(t, n, r, o) {
|
|
20674
20674
|
var s = n || {};
|
|
20675
|
-
if (
|
|
20676
|
-
if (
|
|
20677
|
-
var u = !
|
|
20675
|
+
if (ge(s, "quoteStyle") && !ge(N, s.quoteStyle)) throw TypeError("option \"quoteStyle\" must be \"single\" or \"double\"");
|
|
20676
|
+
if (ge(s, "maxStringLength") && (typeof s.maxStringLength == "number" ? s.maxStringLength < 0 && s.maxStringLength !== Infinity : s.maxStringLength !== null)) throw TypeError("option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`");
|
|
20677
|
+
var u = !ge(s, "customInspect") || s.customInspect;
|
|
20678
20678
|
if (typeof u != "boolean" && u !== "symbol") throw TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
|
|
20679
|
-
if (
|
|
20680
|
-
if (
|
|
20679
|
+
if (ge(s, "indent") && s.indent !== null && s.indent !== " " && !(parseInt(s.indent, 10) === s.indent && s.indent > 0)) throw TypeError("option \"indent\" must be \"\\t\", an integer > 0, or `null`");
|
|
20680
|
+
if (ge(s, "numericSeparator") && typeof s.numericSeparator != "boolean") throw TypeError("option \"numericSeparator\", if provided, must be `true` or `false`");
|
|
20681
20681
|
var d = s.numericSeparator;
|
|
20682
20682
|
if (t === void 0) return "undefined";
|
|
20683
20683
|
if (t === null) return "null";
|
|
20684
20684
|
if (typeof t == "boolean") return t ? "true" : "false";
|
|
20685
|
-
if (typeof t == "string") return
|
|
20685
|
+
if (typeof t == "string") return Ee(t, s);
|
|
20686
20686
|
if (typeof t == "number") {
|
|
20687
20687
|
if (t === 0) return Infinity / t > 0 ? "0" : "-0";
|
|
20688
20688
|
var f = String(t);
|
|
@@ -20693,101 +20693,101 @@ var l_ = /* @__PURE__ */ s(((e, t) => {
|
|
|
20693
20693
|
return d ? ne(t, m) : m;
|
|
20694
20694
|
}
|
|
20695
20695
|
var h = s.depth === void 0 ? 5 : s.depth;
|
|
20696
|
-
if (r === void 0 && (r = 0), r >= h && h > 0 && typeof t == "object") return
|
|
20696
|
+
if (r === void 0 && (r = 0), r >= h && h > 0 && typeof t == "object") return ce(t) ? "[Array]" : "[Object]";
|
|
20697
20697
|
var g = Me(s, r);
|
|
20698
20698
|
if (o === void 0) o = [];
|
|
20699
|
-
else if (
|
|
20699
|
+
else if (ye(o, t) >= 0) return "[Circular]";
|
|
20700
20700
|
function y(t, n, i) {
|
|
20701
20701
|
if (n && (o = w.call(o), o.push(n)), i) {
|
|
20702
20702
|
var a = { depth: s.depth };
|
|
20703
|
-
return
|
|
20703
|
+
return ge(s, "quoteStyle") && (a.quoteStyle = s.quoteStyle), e(t, a, r + 1, o);
|
|
20704
20704
|
}
|
|
20705
20705
|
return e(t, s, r + 1, o);
|
|
20706
20706
|
}
|
|
20707
|
-
if (typeof t == "function" && !
|
|
20708
|
-
var x =
|
|
20707
|
+
if (typeof t == "function" && !ue(t)) {
|
|
20708
|
+
var x = ve(t), T = Pe(t, y);
|
|
20709
20709
|
return "[Function" + (x ? ": " + x : " (anonymous)") + "]" + (T.length > 0 ? " { " + C.call(T, ", ") + " }" : "");
|
|
20710
20710
|
}
|
|
20711
|
-
if (
|
|
20711
|
+
if (F(t)) {
|
|
20712
20712
|
var ee = te ? v.call(String(t), /^(Symbol\(.*\))_[^)]*$/, "$1") : D.call(t);
|
|
20713
20713
|
return typeof t == "object" && !te ? Oe(ee) : ee;
|
|
20714
20714
|
}
|
|
20715
|
-
if (
|
|
20716
|
-
for (var M = "<" + b.call(String(t.nodeName)),
|
|
20715
|
+
if (Te(t)) {
|
|
20716
|
+
for (var M = "<" + b.call(String(t.nodeName)), ie = t.attributes || [], se = 0; se < ie.length; se++) M += " " + ie[se].name + "=" + ae(oe(ie[se].value), "double", s);
|
|
20717
20717
|
return M += ">", t.childNodes && t.childNodes.length && (M += "..."), M += "</" + b.call(String(t.nodeName)) + ">", M;
|
|
20718
20718
|
}
|
|
20719
|
-
if (
|
|
20719
|
+
if (ce(t)) {
|
|
20720
20720
|
if (t.length === 0) return "[]";
|
|
20721
|
-
var
|
|
20722
|
-
return g && !je(
|
|
20721
|
+
var he = Pe(t, y);
|
|
20722
|
+
return g && !je(he) ? "[" + Ne(he, g) + "]" : "[ " + C.call(he, ", ") + " ]";
|
|
20723
20723
|
}
|
|
20724
|
-
if (
|
|
20725
|
-
var
|
|
20726
|
-
return !("cause" in Error.prototype) && "cause" in t && !k.call(t, "cause") ? "{ [" + String(t) + "] " + C.call(S.call("[cause]: " + y(t.cause),
|
|
20724
|
+
if (de(t)) {
|
|
20725
|
+
var De = Pe(t, y);
|
|
20726
|
+
return !("cause" in Error.prototype) && "cause" in t && !k.call(t, "cause") ? "{ [" + String(t) + "] " + C.call(S.call("[cause]: " + y(t.cause), De), ", ") + " }" : De.length === 0 ? "[" + String(t) + "]" : "{ [" + String(t) + "] " + C.call(De, ", ") + " }";
|
|
20727
20727
|
}
|
|
20728
20728
|
if (typeof t == "object" && u) {
|
|
20729
|
-
if (
|
|
20729
|
+
if (re && typeof t[re] == "function" && j) return j(t, { depth: h - r });
|
|
20730
20730
|
if (u !== "symbol" && typeof t.inspect == "function") return t.inspect();
|
|
20731
20731
|
}
|
|
20732
|
-
if (
|
|
20732
|
+
if (be(t)) {
|
|
20733
20733
|
var Fe = [];
|
|
20734
20734
|
return a && a.call(t, function(e, n) {
|
|
20735
20735
|
Fe.push(y(n, t, !0) + " => " + y(e, t));
|
|
20736
20736
|
}), Ae("Map", i.call(t), Fe, g);
|
|
20737
20737
|
}
|
|
20738
|
-
if (
|
|
20738
|
+
if (Ce(t)) {
|
|
20739
20739
|
var Ie = [];
|
|
20740
20740
|
return l && l.call(t, function(e) {
|
|
20741
20741
|
Ie.push(y(e, t));
|
|
20742
20742
|
}), Ae("Set", c.call(t), Ie, g);
|
|
20743
20743
|
}
|
|
20744
|
-
if (
|
|
20745
|
-
if (
|
|
20746
|
-
if (
|
|
20747
|
-
if (
|
|
20748
|
-
if (
|
|
20744
|
+
if (xe(t)) return ke("WeakMap");
|
|
20745
|
+
if (we(t)) return ke("WeakSet");
|
|
20746
|
+
if (Se(t)) return ke("WeakRef");
|
|
20747
|
+
if (P(t)) return Oe(y(Number(t)));
|
|
20748
|
+
if (me(t)) return Oe(y(E.call(t)));
|
|
20749
20749
|
if (pe(t)) return Oe(p.call(t));
|
|
20750
|
-
if (
|
|
20750
|
+
if (fe(t)) return Oe(y(String(t)));
|
|
20751
20751
|
if (typeof window < "u" && t === window) return "{ [object Window] }";
|
|
20752
20752
|
if (typeof globalThis < "u" && t === globalThis || typeof global < "u" && t === global) return "{ [object globalThis] }";
|
|
20753
|
-
if (!
|
|
20754
|
-
var Le = Pe(t, y), Re = A ? A(t) === Object.prototype : t instanceof Object || t.constructor === Object, ze = t instanceof Object ? "" : "null prototype", I = !Re && O && Object(t) === t && O in t ? _.call(
|
|
20753
|
+
if (!le(t) && !ue(t)) {
|
|
20754
|
+
var Le = Pe(t, y), Re = A ? A(t) === Object.prototype : t instanceof Object || t.constructor === Object, ze = t instanceof Object ? "" : "null prototype", I = !Re && O && Object(t) === t && O in t ? _.call(_e(t), 8, -1) : ze ? "Object" : "", Be = (Re || typeof t.constructor != "function" ? "" : t.constructor.name ? t.constructor.name + " " : "") + (I || ze ? "[" + C.call(S.call([], I || [], ze || []), ": ") + "] " : "");
|
|
20755
20755
|
return Le.length === 0 ? Be + "{}" : g ? Be + "{" + Ne(Le, g) + "}" : Be + "{ " + C.call(Le, ", ") + " }";
|
|
20756
20756
|
}
|
|
20757
20757
|
return String(t);
|
|
20758
20758
|
};
|
|
20759
|
-
function
|
|
20760
|
-
var r =
|
|
20759
|
+
function ae(e, t, n) {
|
|
20760
|
+
var r = N[n.quoteStyle || t];
|
|
20761
20761
|
return r + e + r;
|
|
20762
20762
|
}
|
|
20763
|
-
function ae(e) {
|
|
20764
|
-
return v.call(String(e), /"/g, """);
|
|
20765
|
-
}
|
|
20766
20763
|
function oe(e) {
|
|
20767
|
-
return
|
|
20764
|
+
return v.call(String(e), /"/g, """);
|
|
20768
20765
|
}
|
|
20769
20766
|
function se(e) {
|
|
20770
|
-
return
|
|
20767
|
+
return !O || !(typeof e == "object" && (O in e || e[O] !== void 0));
|
|
20771
20768
|
}
|
|
20772
20769
|
function ce(e) {
|
|
20773
|
-
return
|
|
20770
|
+
return _e(e) === "[object Array]" && se(e);
|
|
20774
20771
|
}
|
|
20775
20772
|
function le(e) {
|
|
20776
|
-
return
|
|
20773
|
+
return _e(e) === "[object Date]" && se(e);
|
|
20777
20774
|
}
|
|
20778
20775
|
function ue(e) {
|
|
20779
|
-
return
|
|
20776
|
+
return _e(e) === "[object RegExp]" && se(e);
|
|
20780
20777
|
}
|
|
20781
20778
|
function de(e) {
|
|
20782
|
-
return
|
|
20779
|
+
return _e(e) === "[object Error]" && se(e);
|
|
20783
20780
|
}
|
|
20784
20781
|
function fe(e) {
|
|
20785
|
-
return
|
|
20782
|
+
return _e(e) === "[object String]" && se(e);
|
|
20783
|
+
}
|
|
20784
|
+
function P(e) {
|
|
20785
|
+
return _e(e) === "[object Number]" && se(e);
|
|
20786
20786
|
}
|
|
20787
20787
|
function pe(e) {
|
|
20788
|
-
return
|
|
20788
|
+
return _e(e) === "[object Boolean]" && se(e);
|
|
20789
20789
|
}
|
|
20790
|
-
function
|
|
20790
|
+
function F(e) {
|
|
20791
20791
|
if (te) return e && typeof e == "object" && e instanceof Symbol;
|
|
20792
20792
|
if (typeof e == "symbol") return !0;
|
|
20793
20793
|
if (!e || typeof e != "object" || !D) return !1;
|
|
@@ -20796,33 +20796,33 @@ var l_ = /* @__PURE__ */ s(((e, t) => {
|
|
|
20796
20796
|
} catch {}
|
|
20797
20797
|
return !1;
|
|
20798
20798
|
}
|
|
20799
|
-
function
|
|
20799
|
+
function me(e) {
|
|
20800
20800
|
if (!e || typeof e != "object" || !E) return !1;
|
|
20801
20801
|
try {
|
|
20802
20802
|
return E.call(e), !0;
|
|
20803
20803
|
} catch {}
|
|
20804
20804
|
return !1;
|
|
20805
20805
|
}
|
|
20806
|
-
var
|
|
20806
|
+
var he = Object.prototype.hasOwnProperty || function(e) {
|
|
20807
20807
|
return e in this;
|
|
20808
20808
|
};
|
|
20809
|
-
function
|
|
20810
|
-
return
|
|
20809
|
+
function ge(e, t) {
|
|
20810
|
+
return he.call(e, t);
|
|
20811
20811
|
}
|
|
20812
|
-
function
|
|
20812
|
+
function _e(e) {
|
|
20813
20813
|
return m.call(e);
|
|
20814
20814
|
}
|
|
20815
|
-
function
|
|
20815
|
+
function ve(e) {
|
|
20816
20816
|
if (e.name) return e.name;
|
|
20817
20817
|
var t = g.call(h.call(e), /^function\s*([\w$]+)/);
|
|
20818
20818
|
return t ? t[1] : null;
|
|
20819
20819
|
}
|
|
20820
|
-
function
|
|
20820
|
+
function ye(e, t) {
|
|
20821
20821
|
if (e.indexOf) return e.indexOf(t);
|
|
20822
20822
|
for (var n = 0, r = e.length; n < r; n++) if (e[n] === t) return n;
|
|
20823
20823
|
return -1;
|
|
20824
20824
|
}
|
|
20825
|
-
function
|
|
20825
|
+
function be(e) {
|
|
20826
20826
|
if (!i || !e || typeof e != "object") return !1;
|
|
20827
20827
|
try {
|
|
20828
20828
|
i.call(e);
|
|
@@ -20835,7 +20835,7 @@ var l_ = /* @__PURE__ */ s(((e, t) => {
|
|
|
20835
20835
|
} catch {}
|
|
20836
20836
|
return !1;
|
|
20837
20837
|
}
|
|
20838
|
-
function
|
|
20838
|
+
function xe(e) {
|
|
20839
20839
|
if (!u || !e || typeof e != "object") return !1;
|
|
20840
20840
|
try {
|
|
20841
20841
|
u.call(e, u);
|
|
@@ -20848,14 +20848,14 @@ var l_ = /* @__PURE__ */ s(((e, t) => {
|
|
|
20848
20848
|
} catch {}
|
|
20849
20849
|
return !1;
|
|
20850
20850
|
}
|
|
20851
|
-
function
|
|
20851
|
+
function Se(e) {
|
|
20852
20852
|
if (!f || !e || typeof e != "object") return !1;
|
|
20853
20853
|
try {
|
|
20854
20854
|
return f.call(e), !0;
|
|
20855
20855
|
} catch {}
|
|
20856
20856
|
return !1;
|
|
20857
20857
|
}
|
|
20858
|
-
function
|
|
20858
|
+
function Ce(e) {
|
|
20859
20859
|
if (!c || !e || typeof e != "object") return !1;
|
|
20860
20860
|
try {
|
|
20861
20861
|
c.call(e);
|
|
@@ -20868,7 +20868,7 @@ var l_ = /* @__PURE__ */ s(((e, t) => {
|
|
|
20868
20868
|
} catch {}
|
|
20869
20869
|
return !1;
|
|
20870
20870
|
}
|
|
20871
|
-
function
|
|
20871
|
+
function we(e) {
|
|
20872
20872
|
if (!d || !e || typeof e != "object") return !1;
|
|
20873
20873
|
try {
|
|
20874
20874
|
d.call(e, d);
|
|
@@ -20881,18 +20881,18 @@ var l_ = /* @__PURE__ */ s(((e, t) => {
|
|
|
20881
20881
|
} catch {}
|
|
20882
20882
|
return !1;
|
|
20883
20883
|
}
|
|
20884
|
-
function
|
|
20884
|
+
function Te(e) {
|
|
20885
20885
|
return !e || typeof e != "object" ? !1 : typeof HTMLElement < "u" && e instanceof HTMLElement || typeof e.nodeName == "string" && typeof e.getAttribute == "function";
|
|
20886
20886
|
}
|
|
20887
|
-
function
|
|
20887
|
+
function Ee(e, t) {
|
|
20888
20888
|
if (e.length > t.maxStringLength) {
|
|
20889
20889
|
var n = e.length - t.maxStringLength, r = "... " + n + " more character" + (n > 1 ? "s" : "");
|
|
20890
|
-
return
|
|
20890
|
+
return Ee(_.call(e, 0, t.maxStringLength), t) + r;
|
|
20891
20891
|
}
|
|
20892
|
-
var i =
|
|
20893
|
-
return i.lastIndex = 0,
|
|
20892
|
+
var i = ie[t.quoteStyle || "single"];
|
|
20893
|
+
return i.lastIndex = 0, ae(v.call(v.call(e, i, "\\$1"), /[\x00-\x1f]/g, De), "single", t);
|
|
20894
20894
|
}
|
|
20895
|
-
function
|
|
20895
|
+
function De(e) {
|
|
20896
20896
|
var t = e.charCodeAt(0), n = {
|
|
20897
20897
|
8: "b",
|
|
20898
20898
|
9: "t",
|
|
@@ -20913,7 +20913,7 @@ var l_ = /* @__PURE__ */ s(((e, t) => {
|
|
|
20913
20913
|
return e + " (" + t + ") {" + i + "}";
|
|
20914
20914
|
}
|
|
20915
20915
|
function je(e) {
|
|
20916
|
-
for (var t = 0; t < e.length; t++) if (
|
|
20916
|
+
for (var t = 0; t < e.length; t++) if (ye(e[t], "\n") >= 0) return !1;
|
|
20917
20917
|
return !0;
|
|
20918
20918
|
}
|
|
20919
20919
|
function Me(e, t) {
|
|
@@ -20932,17 +20932,17 @@ var l_ = /* @__PURE__ */ s(((e, t) => {
|
|
|
20932
20932
|
return n + C.call(e, "," + n) + "\n" + t.prev;
|
|
20933
20933
|
}
|
|
20934
20934
|
function Pe(e, t) {
|
|
20935
|
-
var n =
|
|
20935
|
+
var n = ce(e), r = [];
|
|
20936
20936
|
if (n) {
|
|
20937
20937
|
r.length = e.length;
|
|
20938
|
-
for (var i = 0; i < e.length; i++) r[i] =
|
|
20938
|
+
for (var i = 0; i < e.length; i++) r[i] = ge(e, i) ? t(e[i], e) : "";
|
|
20939
20939
|
}
|
|
20940
20940
|
var a = typeof ee == "function" ? ee(e) : [], o;
|
|
20941
20941
|
if (te) {
|
|
20942
20942
|
o = {};
|
|
20943
20943
|
for (var s = 0; s < a.length; s++) o["$" + a[s]] = a[s];
|
|
20944
20944
|
}
|
|
20945
|
-
for (var c in e)
|
|
20945
|
+
for (var c in e) ge(e, c) && (n && String(Number(c)) === c && c < e.length || te && o["$" + c] instanceof Symbol || (x.call(/[^\w$]/, c) ? r.push(t(c, e) + ": " + t(e[c], e)) : r.push(c + ": " + t(e[c], e))));
|
|
20946
20946
|
if (typeof ee == "function") for (var l = 0; l < a.length; l++) k.call(e, a[l]) && r.push("[" + t(a[l]) + "]: " + t(e[a[l]], e));
|
|
20947
20947
|
return r;
|
|
20948
20948
|
}
|
|
@@ -21343,17 +21343,17 @@ var l_ = /* @__PURE__ */ s(((e, t) => {
|
|
|
21343
21343
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
21344
21344
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
21345
21345
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
21346
|
-
}, M = I_(),
|
|
21347
|
-
var t =
|
|
21346
|
+
}, M = I_(), re = W_(), N = M.call(te, Array.prototype.concat), ie = M.call(D, Array.prototype.splice), ae = M.call(te, String.prototype.replace), oe = M.call(te, String.prototype.slice), se = M.call(te, RegExp.prototype.exec), ce = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, le = /\\(\\)?/g, ue = function(e) {
|
|
21347
|
+
var t = oe(e, 0, 1), n = oe(e, -1);
|
|
21348
21348
|
if (t === "%" && n !== "%") throw new c("invalid intrinsic syntax, expected closing `%`");
|
|
21349
21349
|
if (n === "%" && t !== "%") throw new c("invalid intrinsic syntax, expected opening `%`");
|
|
21350
21350
|
var r = [];
|
|
21351
|
-
return
|
|
21352
|
-
r[r.length] = n ?
|
|
21351
|
+
return ae(e, ce, function(e, t, n, i) {
|
|
21352
|
+
r[r.length] = n ? ae(i, le, "$1") : t || e;
|
|
21353
21353
|
}), r;
|
|
21354
|
-
},
|
|
21354
|
+
}, de = function(e, t) {
|
|
21355
21355
|
var n = e, r;
|
|
21356
|
-
if (
|
|
21356
|
+
if (re(j, n) && (r = j[n], n = "%" + r[0] + "%"), re(A, n)) {
|
|
21357
21357
|
var i = A[n];
|
|
21358
21358
|
if (i === O && (i = ne(n)), i === void 0 && !t) throw new l("intrinsic " + e + " exists, but is not available. Please file an issue!");
|
|
21359
21359
|
return {
|
|
@@ -21367,13 +21367,13 @@ var l_ = /* @__PURE__ */ s(((e, t) => {
|
|
|
21367
21367
|
t.exports = function(e, t) {
|
|
21368
21368
|
if (typeof e != "string" || e.length === 0) throw new l("intrinsic name must be a non-empty string");
|
|
21369
21369
|
if (arguments.length > 1 && typeof t != "boolean") throw new l("\"allowMissing\" argument must be a boolean");
|
|
21370
|
-
if (
|
|
21371
|
-
var n =
|
|
21372
|
-
u && (r = u[0],
|
|
21370
|
+
if (se(/^%?[^%]*%?$/, e) === null) throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
21371
|
+
var n = ue(e), r = n.length > 0 ? n[0] : "", i = de("%" + r + "%", t), a = i.name, o = i.value, s = !1, u = i.alias;
|
|
21372
|
+
u && (r = u[0], ie(n, N([0, 1], u)));
|
|
21373
21373
|
for (var d = 1, f = !0; d < n.length; d += 1) {
|
|
21374
|
-
var p = n[d], m =
|
|
21374
|
+
var p = n[d], m = oe(p, 0, 1), h = oe(p, -1);
|
|
21375
21375
|
if ((m === "\"" || m === "'" || m === "`" || h === "\"" || h === "'" || h === "`") && m !== h) throw new c("property names with quotes must have matching quotes");
|
|
21376
|
-
if ((p === "constructor" || !f) && (s = !0), r += "." + p, a = "%" + r + "%",
|
|
21376
|
+
if ((p === "constructor" || !f) && (s = !0), r += "." + p, a = "%" + r + "%", re(A, a)) o = A[a];
|
|
21377
21377
|
else if (o != null) {
|
|
21378
21378
|
if (!(p in o)) {
|
|
21379
21379
|
if (!t) throw new l("base intrinsic for " + e + " exists, but the property is not available.");
|
|
@@ -21382,7 +21382,7 @@ var l_ = /* @__PURE__ */ s(((e, t) => {
|
|
|
21382
21382
|
if (b && d + 1 >= n.length) {
|
|
21383
21383
|
var g = b(o, p);
|
|
21384
21384
|
f = !!g, o = f && "get" in g && !("originalValue" in g.get) ? g.get : o[p];
|
|
21385
|
-
} else f =
|
|
21385
|
+
} else f = re(o, p), o = o[p];
|
|
21386
21386
|
f && !s && (A[a] = o);
|
|
21387
21387
|
}
|
|
21388
21388
|
}
|
|
@@ -21704,13 +21704,13 @@ var l_ = /* @__PURE__ */ s(((e, t) => {
|
|
|
21704
21704
|
}
|
|
21705
21705
|
var j = h ? String(i).replace(/\./g, "%2E") : String(i), M = o && s(E) && E.length === 1 ? j + "[]" : j;
|
|
21706
21706
|
if (c && s(E) && E.length === 0) return M + "[]";
|
|
21707
|
-
for (var
|
|
21708
|
-
var
|
|
21709
|
-
if (!(d &&
|
|
21710
|
-
var
|
|
21707
|
+
for (var re = 0; re < A.length; ++re) {
|
|
21708
|
+
var N = A[re], ie = typeof N == "object" && N && N.value !== void 0 ? N.value : E[N];
|
|
21709
|
+
if (!(d && ie === null)) {
|
|
21710
|
+
var ae = y && h ? String(N).replace(/\./g, "%2E") : String(N), oe = s(E) ? typeof a == "function" ? a(M, ae) : M : M + (y ? "." + ae : "[" + ae + "]");
|
|
21711
21711
|
T.set(t, D);
|
|
21712
|
-
var
|
|
21713
|
-
|
|
21712
|
+
var se = n();
|
|
21713
|
+
se.set(m, T), l(k, e(ie, oe, a, o, c, u, d, h, a === "comma" && C && s(E) ? null : g, _, v, y, b, x, S, C, w, se));
|
|
21714
21714
|
}
|
|
21715
21715
|
}
|
|
21716
21716
|
return k;
|
|
@@ -23013,7 +23013,7 @@ var Ay = Js`
|
|
|
23013
23013
|
};
|
|
23014
23014
|
J([gy({ context: by }), q("design:type", Object)], jy.prototype, "messageContext", void 0), J([dl(), q("design:type", Object)], jy.prototype, "score", void 0), J([K({ type: String }), q("design:type", Object)], jy.prototype, "label", void 0), J([dl(), q("design:type", Object)], jy.prototype, "rating", void 0), J([dl(), q("design:type", Object)], jy.prototype, "feedback", void 0), jy = J([cl("lr-chatbot-conversation-rating")], jy);
|
|
23015
23015
|
//#endregion
|
|
23016
|
-
//#region ../../../../../node_modules/.pnpm/dompurify@3.4.
|
|
23016
|
+
//#region ../../../../../node_modules/.pnpm/dompurify@3.4.13/node_modules/dompurify/dist/purify.es.mjs
|
|
23017
23017
|
function My(e, t) {
|
|
23018
23018
|
(t == null || t > e.length) && (t = e.length);
|
|
23019
23019
|
for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
|
|
@@ -23266,43 +23266,43 @@ var Sb = Uy(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.b
|
|
|
23266
23266
|
};
|
|
23267
23267
|
function Qb() {
|
|
23268
23268
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Jb(), t = (e) => Qb(e);
|
|
23269
|
-
if (t.version = "3.4.
|
|
23269
|
+
if (t.version = "3.4.13", t.removed = [], !e || !e.document || e.document.nodeType !== qb.document || !e.Element) return t.isSupported = !1, t;
|
|
23270
23270
|
let n = e.document, r = n, i = r.currentScript;
|
|
23271
23271
|
e.DocumentFragment;
|
|
23272
23272
|
let a = e.HTMLTemplateElement, o = e.Node, s = e.Element, c = e.NodeFilter;
|
|
23273
23273
|
e.NamedNodeMap === void 0 && (e.NamedNodeMap || e.MozNamedAttrMap), e.HTMLFormElement;
|
|
23274
|
-
let l = e.DOMParser, u = e.trustedTypes, d = s.prototype, f = bb(d, "cloneNode"), p = bb(d, "remove"), m = bb(d, "nextSibling"), h = bb(d, "childNodes"), g = bb(d, "parentNode"), _ = bb(d, "shadowRoot"), v = bb(d, "attributes"), y = o && o.prototype ? bb(o.prototype, "nodeType") : null, b = o && o.prototype ? bb(o.prototype, "nodeName") : null;
|
|
23274
|
+
let l = e.DOMParser, u = e.trustedTypes, d = s.prototype, f = bb(d, "cloneNode"), p = bb(d, "remove"), m = bb(d, "nextSibling"), h = bb(d, "childNodes"), g = bb(d, "parentNode"), _ = bb(d, "shadowRoot"), v = bb(d, "attributes"), y = o && o.prototype ? bb(o.prototype, "nodeType") : null, b = o && o.prototype ? bb(o.prototype, "nodeName") : null, x = o && o.prototype ? bb(o.prototype, "ownerDocument") : null;
|
|
23275
23275
|
if (typeof a == "function") {
|
|
23276
23276
|
let e = n.createElement("template");
|
|
23277
23277
|
e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
|
|
23278
23278
|
}
|
|
23279
|
-
let
|
|
23280
|
-
if (
|
|
23281
|
-
},
|
|
23282
|
-
|
|
23279
|
+
let S, C = "", w, T = !1, E = 0, ee = function() {
|
|
23280
|
+
if (E > 0) throw mb("A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the \"DOMPurify and Trusted Types\" section of the README.");
|
|
23281
|
+
}, D = function(e) {
|
|
23282
|
+
ee(), E++;
|
|
23283
23283
|
try {
|
|
23284
|
-
return
|
|
23284
|
+
return S.createHTML(e);
|
|
23285
23285
|
} finally {
|
|
23286
|
-
|
|
23286
|
+
E--;
|
|
23287
23287
|
}
|
|
23288
|
-
},
|
|
23289
|
-
|
|
23288
|
+
}, te = function(e) {
|
|
23289
|
+
ee(), E++;
|
|
23290
23290
|
try {
|
|
23291
|
-
return
|
|
23291
|
+
return S.createScriptURL(e);
|
|
23292
23292
|
} finally {
|
|
23293
|
-
|
|
23293
|
+
E--;
|
|
23294
23294
|
}
|
|
23295
|
-
},
|
|
23296
|
-
return
|
|
23297
|
-
},
|
|
23298
|
-
t.isSupported = typeof Ry == "function" && typeof g == "function" &&
|
|
23299
|
-
let
|
|
23295
|
+
}, O = function() {
|
|
23296
|
+
return T ||= (w = Yb(u, i), !0), w;
|
|
23297
|
+
}, k = n, A = k.implementation, ne = k.createNodeIterator, j = k.createDocumentFragment, M = k.getElementsByTagName, re = r.importNode, N = Xb();
|
|
23298
|
+
t.isSupported = typeof Ry == "function" && typeof g == "function" && A && A.createHTMLDocument !== void 0;
|
|
23299
|
+
let ie = Nb, ae = Pb, oe = Fb, se = Ib, ce = Lb, le = zb, ue = Bb, de = Hb, fe = Rb, P = null, pe = $({}, [
|
|
23300
23300
|
...Sb,
|
|
23301
23301
|
...Cb,
|
|
23302
23302
|
...wb,
|
|
23303
23303
|
...Eb,
|
|
23304
23304
|
...Ob
|
|
23305
|
-
]),
|
|
23305
|
+
]), F = null, me = $({}, [
|
|
23306
23306
|
...kb,
|
|
23307
23307
|
...Ab,
|
|
23308
23308
|
...jb,
|
|
@@ -23339,14 +23339,14 @@ function Qb() {
|
|
|
23339
23339
|
enumerable: !0,
|
|
23340
23340
|
value: null
|
|
23341
23341
|
}
|
|
23342
|
-
})), ye = !0, be = !0, xe = !1, Se = !0, Ce = !1, we = !0, Te = !1, Ee = !1, De = null,
|
|
23342
|
+
})), ye = !0, be = !0, xe = !1, Se = !0, Ce = !1, we = !0, Te = !1, Ee = !1, De = null, Oe = null, ke = !1, Ae = !1, je = !1, Me = !1, Ne = !0, Pe = !1, Fe = "user-content-", Ie = !0, Le = !1, Re = {}, ze = null, I = $({}, /* @__PURE__ */ "annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp".split(".")), Be = null, Ve = $({}, [
|
|
23343
23343
|
"audio",
|
|
23344
23344
|
"video",
|
|
23345
23345
|
"img",
|
|
23346
23346
|
"source",
|
|
23347
23347
|
"image",
|
|
23348
23348
|
"track"
|
|
23349
|
-
]),
|
|
23349
|
+
]), He = null, Ue = $({}, [
|
|
23350
23350
|
"alt",
|
|
23351
23351
|
"class",
|
|
23352
23352
|
"for",
|
|
@@ -23361,78 +23361,78 @@ function Qb() {
|
|
|
23361
23361
|
"value",
|
|
23362
23362
|
"style",
|
|
23363
23363
|
"xmlns"
|
|
23364
|
-
]),
|
|
23365
|
-
Ue,
|
|
23364
|
+
]), We = "http://www.w3.org/1998/Math/MathML", Ge = "http://www.w3.org/2000/svg", Ke = "http://www.w3.org/1999/xhtml", qe = Ke, Je = !1, Ye = null, Xe = $({}, [
|
|
23366
23365
|
We,
|
|
23367
|
-
Ge
|
|
23368
|
-
|
|
23366
|
+
Ge,
|
|
23367
|
+
Ke
|
|
23368
|
+
], nb), Ze = Uy([
|
|
23369
23369
|
"mi",
|
|
23370
23370
|
"mo",
|
|
23371
23371
|
"mn",
|
|
23372
23372
|
"ms",
|
|
23373
23373
|
"mtext"
|
|
23374
|
-
]),
|
|
23374
|
+
]), Qe = $({}, Ze), $e = Uy(["annotation-xml"]), et = $({}, $e), tt = $({}, [
|
|
23375
23375
|
"title",
|
|
23376
23376
|
"style",
|
|
23377
23377
|
"font",
|
|
23378
23378
|
"a",
|
|
23379
23379
|
"script"
|
|
23380
|
-
]),
|
|
23380
|
+
]), nt = null, rt = ["application/xhtml+xml", "text/html"], it = null, at = null, ot = n.createElement("form"), st = function(e) {
|
|
23381
23381
|
return e instanceof RegExp || e instanceof Function;
|
|
23382
|
-
},
|
|
23382
|
+
}, ct = function() {
|
|
23383
23383
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
23384
|
-
if (
|
|
23385
|
-
(!e || typeof e != "object") && (e = {}), e = vb(e),
|
|
23386
|
-
transform:
|
|
23387
|
-
base:
|
|
23388
|
-
}),
|
|
23389
|
-
transform:
|
|
23390
|
-
base:
|
|
23391
|
-
}),
|
|
23384
|
+
if (at && at === e) return;
|
|
23385
|
+
(!e || typeof e != "object") && (e = {}), e = vb(e), nt = rt.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, it = nt === "application/xhtml+xml" ? nb : tb, P = Zb(e, "ALLOWED_TAGS", pe, { transform: it }), F = Zb(e, "ALLOWED_ATTR", me, { transform: it }), Ye = Zb(e, "ALLOWED_NAMESPACES", Xe, { transform: nb }), He = Zb(e, "ADD_URI_SAFE_ATTR", Ue, {
|
|
23386
|
+
transform: it,
|
|
23387
|
+
base: Ue
|
|
23388
|
+
}), Be = Zb(e, "ADD_DATA_URI_TAGS", Ve, {
|
|
23389
|
+
transform: it,
|
|
23390
|
+
base: Ve
|
|
23391
|
+
}), ze = Zb(e, "FORBID_CONTENTS", I, { transform: it }), ge = Zb(e, "FORBID_TAGS", vb({}), { transform: it }), _e = Zb(e, "FORBID_ATTR", vb({}), { transform: it }), Re = db(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? vb(e.USE_PROFILES) : e.USE_PROFILES : !1, ye = e.ALLOW_ARIA_ATTR !== !1, be = e.ALLOW_DATA_ATTR !== !1, xe = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Se = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Ce = e.SAFE_FOR_TEMPLATES || !1, we = e.SAFE_FOR_XML !== !1, Te = e.WHOLE_DOCUMENT || !1, Ae = e.RETURN_DOM || !1, je = e.RETURN_DOM_FRAGMENT || !1, Me = e.RETURN_TRUSTED_TYPE || !1, ke = e.FORCE_BODY || !1, Ne = e.SANITIZE_DOM !== !1, Pe = e.SANITIZE_NAMED_PROPS || !1, Ie = e.KEEP_CONTENT !== !1, Le = e.IN_PLACE || !1, fe = xb(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Rb, qe = typeof e.NAMESPACE == "string" ? e.NAMESPACE : Ke, Qe = db(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? vb(e.MATHML_TEXT_INTEGRATION_POINTS) : $({}, Ze), et = db(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? vb(e.HTML_INTEGRATION_POINTS) : $({}, $e);
|
|
23392
23392
|
let t = db(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? vb(e.CUSTOM_ELEMENT_HANDLING) : Gy(null);
|
|
23393
|
-
if (he = Gy(null), db(t, "tagNameCheck") &&
|
|
23393
|
+
if (he = Gy(null), db(t, "tagNameCheck") && st(t.tagNameCheck) && (he.tagNameCheck = t.tagNameCheck), db(t, "attributeNameCheck") && st(t.attributeNameCheck) && (he.attributeNameCheck = t.attributeNameCheck), db(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (he.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), Wy(he), Ce && (be = !1), je && (Ae = !0), Re && (P = $({}, Ob), F = Gy(null), Re.html === !0 && ($(P, Sb), $(F, kb)), Re.svg === !0 && ($(P, Cb), $(F, Ab), $(F, Mb)), Re.svgFilters === !0 && ($(P, wb), $(F, Ab), $(F, Mb)), Re.mathMl === !0 && ($(P, Eb), $(F, jb), $(F, Mb))), ve.tagCheck = null, ve.attributeCheck = null, db(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? ve.tagCheck = e.ADD_TAGS : eb(e.ADD_TAGS) && (P === pe && (P = vb(P)), $(P, e.ADD_TAGS, it))), db(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? ve.attributeCheck = e.ADD_ATTR : eb(e.ADD_ATTR) && (F === me && (F = vb(F)), $(F, e.ADD_ATTR, it))), db(e, "ADD_URI_SAFE_ATTR") && eb(e.ADD_URI_SAFE_ATTR) && $(He, e.ADD_URI_SAFE_ATTR, it), db(e, "FORBID_CONTENTS") && eb(e.FORBID_CONTENTS) && (ze === I && (ze = vb(ze)), $(ze, e.FORBID_CONTENTS, it)), db(e, "ADD_FORBID_CONTENTS") && eb(e.ADD_FORBID_CONTENTS) && (ze === I && (ze = vb(ze)), $(ze, e.ADD_FORBID_CONTENTS, it)), Ie && (P["#text"] = !0), Te && $(P, [
|
|
23394
23394
|
"html",
|
|
23395
23395
|
"head",
|
|
23396
23396
|
"body"
|
|
23397
|
-
]),
|
|
23397
|
+
]), P.table && ($(P, ["tbody"]), delete ge.tbody), e.TRUSTED_TYPES_POLICY) {
|
|
23398
23398
|
if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw mb("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
|
|
23399
23399
|
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw mb("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
|
|
23400
|
-
let t =
|
|
23401
|
-
|
|
23400
|
+
let t = S;
|
|
23401
|
+
S = e.TRUSTED_TYPES_POLICY;
|
|
23402
23402
|
try {
|
|
23403
|
-
|
|
23403
|
+
C = D("");
|
|
23404
23404
|
} catch (e) {
|
|
23405
|
-
throw
|
|
23405
|
+
throw S = t, e;
|
|
23406
23406
|
}
|
|
23407
|
-
} else e.TRUSTED_TYPES_POLICY === null ? (
|
|
23408
|
-
Uy && Uy(e),
|
|
23409
|
-
},
|
|
23407
|
+
} else e.TRUSTED_TYPES_POLICY === null ? (S = void 0, C = "") : (S === void 0 && (S = O()), S && typeof C == "string" && (C = D("")));
|
|
23408
|
+
Uy && Uy(e), at = e;
|
|
23409
|
+
}, lt = $({}, [
|
|
23410
23410
|
...Cb,
|
|
23411
23411
|
...wb,
|
|
23412
23412
|
...Tb
|
|
23413
|
-
]),
|
|
23414
|
-
return t.namespaceURI ===
|
|
23415
|
-
}, dt = function(e, t, n) {
|
|
23416
|
-
return t.namespaceURI === Ge ? e === "math" : t.namespaceURI === We ? e === "math" && $e[n] : !!lt[e];
|
|
23413
|
+
]), ut = $({}, [...Eb, ...Db]), dt = function(e, t, n) {
|
|
23414
|
+
return t.namespaceURI === Ke ? e === "svg" : t.namespaceURI === We ? e === "svg" && (n === "annotation-xml" || Qe[n]) : !!lt[e];
|
|
23417
23415
|
}, L = function(e, t, n) {
|
|
23418
|
-
return t.namespaceURI ===
|
|
23419
|
-
}, ft = function(e) {
|
|
23416
|
+
return t.namespaceURI === Ke ? e === "math" : t.namespaceURI === Ge ? e === "math" && et[n] : !!ut[e];
|
|
23417
|
+
}, ft = function(e, t, n) {
|
|
23418
|
+
return t.namespaceURI === Ge && !et[n] || t.namespaceURI === We && !Qe[n] ? !1 : !ut[e] && (tt[e] || !lt[e]);
|
|
23419
|
+
}, pt = function(e) {
|
|
23420
23420
|
let t = g(e);
|
|
23421
23421
|
(!t || !t.tagName) && (t = {
|
|
23422
|
-
namespaceURI:
|
|
23422
|
+
namespaceURI: qe,
|
|
23423
23423
|
tagName: "template"
|
|
23424
23424
|
});
|
|
23425
23425
|
let n = tb(e.tagName), r = tb(t.tagName);
|
|
23426
|
-
return
|
|
23427
|
-
},
|
|
23426
|
+
return Ye[e.namespaceURI] ? e.namespaceURI === Ge ? dt(n, t, r) : e.namespaceURI === We ? L(n, t, r) : e.namespaceURI === Ke ? ft(n, t, r) : !!(nt === "application/xhtml+xml" && Ye[e.namespaceURI]) : !1;
|
|
23427
|
+
}, mt = function(e) {
|
|
23428
23428
|
Qy(t.removed, { element: e });
|
|
23429
23429
|
try {
|
|
23430
23430
|
g(e).removeChild(e);
|
|
23431
23431
|
} catch {
|
|
23432
23432
|
if (p(e), !g(e)) throw mb("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
|
|
23433
23433
|
}
|
|
23434
|
-
},
|
|
23435
|
-
|
|
23434
|
+
}, ht = function(e) {
|
|
23435
|
+
vt(e);
|
|
23436
23436
|
let t = h(e);
|
|
23437
23437
|
if (t) {
|
|
23438
23438
|
let e = [];
|
|
@@ -23451,7 +23451,7 @@ function Qb() {
|
|
|
23451
23451
|
e.removeAttribute(i);
|
|
23452
23452
|
} catch {}
|
|
23453
23453
|
}
|
|
23454
|
-
},
|
|
23454
|
+
}, gt = function(e, n) {
|
|
23455
23455
|
try {
|
|
23456
23456
|
Qy(t.removed, {
|
|
23457
23457
|
attribute: n.getAttributeNode(e),
|
|
@@ -23463,29 +23463,29 @@ function Qb() {
|
|
|
23463
23463
|
from: n
|
|
23464
23464
|
});
|
|
23465
23465
|
}
|
|
23466
|
-
if (n.removeAttribute(e), e === "is") if (
|
|
23467
|
-
|
|
23466
|
+
if (n.removeAttribute(e), e === "is") if (Ae || je) try {
|
|
23467
|
+
mt(n);
|
|
23468
23468
|
} catch {}
|
|
23469
23469
|
else try {
|
|
23470
23470
|
n.setAttribute(e, "");
|
|
23471
23471
|
} catch {}
|
|
23472
|
-
},
|
|
23472
|
+
}, _t = function(e) {
|
|
23473
23473
|
let t = v(e);
|
|
23474
23474
|
if (t) for (let n = t.length - 1; n >= 0; --n) {
|
|
23475
23475
|
let r = t[n], i = r && r.name;
|
|
23476
|
-
if (!(typeof i != "string" ||
|
|
23476
|
+
if (!(typeof i != "string" || F[it(i)])) try {
|
|
23477
23477
|
e.removeAttribute(i);
|
|
23478
23478
|
} catch {}
|
|
23479
23479
|
}
|
|
23480
|
-
},
|
|
23480
|
+
}, vt = function(e) {
|
|
23481
23481
|
let t = [e];
|
|
23482
23482
|
for (; t.length > 0;) {
|
|
23483
23483
|
let e = t.pop();
|
|
23484
|
-
(y ? y(e) : e.nodeType) === qb.element &&
|
|
23484
|
+
(y ? y(e) : e.nodeType) === qb.element && _t(e);
|
|
23485
23485
|
let n = h(e);
|
|
23486
23486
|
if (n) for (let e = n.length - 1; e >= 0; --e) t.push(n[e]);
|
|
23487
23487
|
}
|
|
23488
|
-
},
|
|
23488
|
+
}, yt = function(e) {
|
|
23489
23489
|
if (!we) return;
|
|
23490
23490
|
let t = [e];
|
|
23491
23491
|
for (; t.length > 0;) {
|
|
@@ -23497,7 +23497,7 @@ function Qb() {
|
|
|
23497
23497
|
continue;
|
|
23498
23498
|
}
|
|
23499
23499
|
if (n === qb.element) {
|
|
23500
|
-
let t = e, n =
|
|
23500
|
+
let t = e, n = it(b ? b(e) : e.nodeName);
|
|
23501
23501
|
try {
|
|
23502
23502
|
t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") && n !== "label" && n !== "output" && t.removeAttribute("for");
|
|
23503
23503
|
} catch {}
|
|
@@ -23505,49 +23505,50 @@ function Qb() {
|
|
|
23505
23505
|
let r = h(e);
|
|
23506
23506
|
if (r) for (let e = r.length - 1; e >= 0; --e) t.push(r[e]);
|
|
23507
23507
|
}
|
|
23508
|
-
},
|
|
23508
|
+
}, bt = function(e) {
|
|
23509
23509
|
let t = null, r = null;
|
|
23510
|
-
if (
|
|
23510
|
+
if (ke) e = "<remove></remove>" + e;
|
|
23511
23511
|
else {
|
|
23512
23512
|
let t = rb(e, /^[\r\n\t ]+/);
|
|
23513
23513
|
r = t && t[0];
|
|
23514
23514
|
}
|
|
23515
|
-
|
|
23516
|
-
let i =
|
|
23517
|
-
if (
|
|
23518
|
-
t = new l().parseFromString(i,
|
|
23515
|
+
nt === "application/xhtml+xml" && qe === Ke && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
|
|
23516
|
+
let i = S ? D(e) : e;
|
|
23517
|
+
if (qe === Ke) try {
|
|
23518
|
+
t = new l().parseFromString(i, nt);
|
|
23519
23519
|
} catch {}
|
|
23520
23520
|
if (!t || !t.documentElement) {
|
|
23521
|
-
t =
|
|
23521
|
+
t = A.createDocument(qe, "template", null);
|
|
23522
23522
|
try {
|
|
23523
|
-
t.documentElement.innerHTML =
|
|
23523
|
+
t.documentElement.innerHTML = Je ? C : i;
|
|
23524
23524
|
} catch {}
|
|
23525
23525
|
}
|
|
23526
23526
|
let a = t.body || t.documentElement;
|
|
23527
|
-
return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null),
|
|
23528
|
-
}, bt = function(e) {
|
|
23529
|
-
return A.call(e.ownerDocument || e, e, c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION, null);
|
|
23527
|
+
return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), qe === Ke ? M.call(t, Te ? "html" : "body")[0] : Te ? t.documentElement : a;
|
|
23530
23528
|
}, xt = function(e) {
|
|
23531
|
-
|
|
23529
|
+
let t = x ? x(e) : e.ownerDocument;
|
|
23530
|
+
return ne.call(t || e, e, c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION, null);
|
|
23532
23531
|
}, St = function(e) {
|
|
23532
|
+
return e = ib(e, ie, " "), e = ib(e, ae, " "), e = ib(e, oe, " "), e;
|
|
23533
|
+
}, Ct = function(e) {
|
|
23533
23534
|
e.normalize();
|
|
23534
|
-
let t =
|
|
23535
|
-
for (;
|
|
23536
|
-
let
|
|
23537
|
-
|
|
23538
|
-
|
|
23535
|
+
let t = x ? x(e) : e.ownerDocument, n = ne.call(t || e, e, c.SHOW_TEXT | c.SHOW_COMMENT | c.SHOW_CDATA_SECTION | c.SHOW_PROCESSING_INSTRUCTION, null), r = n.nextNode();
|
|
23536
|
+
for (; r;) r.data = St(r.data), r = n.nextNode();
|
|
23537
|
+
let i = e.querySelectorAll?.call(e, "template");
|
|
23538
|
+
i && Yy(i, (e) => {
|
|
23539
|
+
Tt(e.content) && Ct(e.content);
|
|
23539
23540
|
});
|
|
23540
|
-
}, Ct = function(e) {
|
|
23541
|
-
let t = b ? b(e) : null;
|
|
23542
|
-
return typeof t != "string" || rt(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== v(e) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== y(e) || e.childNodes !== h(e);
|
|
23543
23541
|
}, wt = function(e) {
|
|
23542
|
+
let t = b ? b(e) : null;
|
|
23543
|
+
return typeof t != "string" || it(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== v(e) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== y(e) || e.childNodes !== h(e);
|
|
23544
|
+
}, Tt = function(e) {
|
|
23544
23545
|
if (!y || typeof e != "object" || !e) return !1;
|
|
23545
23546
|
try {
|
|
23546
23547
|
return y(e) === qb.documentFragment;
|
|
23547
23548
|
} catch {
|
|
23548
23549
|
return !1;
|
|
23549
23550
|
}
|
|
23550
|
-
},
|
|
23551
|
+
}, Et = function(e) {
|
|
23551
23552
|
if (!y || typeof e != "object" || !e) return !1;
|
|
23552
23553
|
try {
|
|
23553
23554
|
return typeof y(e) == "number";
|
|
@@ -23555,55 +23556,57 @@ function Qb() {
|
|
|
23555
23556
|
return !1;
|
|
23556
23557
|
}
|
|
23557
23558
|
};
|
|
23558
|
-
function
|
|
23559
|
+
function Dt(e, n, r) {
|
|
23559
23560
|
e.length !== 0 && Yy(e, (e) => {
|
|
23560
|
-
e.call(t, n, r,
|
|
23561
|
+
e.call(t, n, r, at);
|
|
23561
23562
|
});
|
|
23562
23563
|
}
|
|
23563
|
-
let
|
|
23564
|
-
return !!(we && e.hasChildNodes() && !
|
|
23565
|
-
},
|
|
23566
|
-
if (!ge[t] &&
|
|
23567
|
-
if (
|
|
23568
|
-
let t = g(e),
|
|
23569
|
-
if (
|
|
23570
|
-
let
|
|
23571
|
-
for (let
|
|
23572
|
-
let
|
|
23573
|
-
t.insertBefore(
|
|
23564
|
+
let Ot = function(e, t) {
|
|
23565
|
+
return !!(we && e.hasChildNodes() && !Et(e.firstElementChild) && pb(Ub, e.textContent) && pb(Ub, e.innerHTML) || we && e.namespaceURI === Ke && t === "style" && Et(e.firstElementChild) || e.nodeType === qb.processingInstruction || we && e.nodeType === qb.comment && pb(Wb, e.data));
|
|
23566
|
+
}, kt = function(e, t, n) {
|
|
23567
|
+
if (!ge[t] && Pt(t) && (he.tagNameCheck instanceof RegExp && pb(he.tagNameCheck, t) || he.tagNameCheck instanceof Function && he.tagNameCheck(t))) return !1;
|
|
23568
|
+
if (Ie && !ze[t]) {
|
|
23569
|
+
let t = g(e), r = h(e);
|
|
23570
|
+
if (r && t) {
|
|
23571
|
+
let i = r.length;
|
|
23572
|
+
for (let a = i - 1; a >= 0; --a) {
|
|
23573
|
+
let i = e === n ? f(r[a], !0) : r[a];
|
|
23574
|
+
t.insertBefore(i, m(e));
|
|
23574
23575
|
}
|
|
23575
23576
|
}
|
|
23576
23577
|
}
|
|
23577
|
-
return
|
|
23578
|
-
},
|
|
23579
|
-
|
|
23580
|
-
|
|
23581
|
-
|
|
23582
|
-
if (
|
|
23578
|
+
return mt(e), !0;
|
|
23579
|
+
}, At = function(e, t, n, r) {
|
|
23580
|
+
return e.length === 0 ? t : t === n || t === r ? vb(t) : t;
|
|
23581
|
+
}, jt = function(e, n) {
|
|
23582
|
+
if (Dt(N.beforeSanitizeElements, e, null), e !== n && g(e) === null) return Le && vt(e), !0;
|
|
23583
|
+
if (wt(e)) return mt(e), !0;
|
|
23584
|
+
let r = it(b ? b(e) : e.nodeName);
|
|
23585
|
+
if (P = At(N.uponSanitizeElement, P, pe, De), Dt(N.uponSanitizeElement, e, {
|
|
23583
23586
|
tagName: r,
|
|
23584
|
-
allowedTags:
|
|
23585
|
-
}), e !== n && g(e) === null) return !0;
|
|
23586
|
-
if (
|
|
23587
|
-
if (ge[r] || !(ve.tagCheck instanceof Function && ve.tagCheck(r)) && !
|
|
23588
|
-
let t =
|
|
23589
|
-
return t === !1 &&
|
|
23590
|
-
}
|
|
23591
|
-
if ((y ? y(e) : e.nodeType) === qb.element && !
|
|
23587
|
+
allowedTags: P
|
|
23588
|
+
}), e !== n && g(e) === null) return Le && vt(e), !0;
|
|
23589
|
+
if (Ot(e, r)) return mt(e), !0;
|
|
23590
|
+
if (ge[r] || !(ve.tagCheck instanceof Function && ve.tagCheck(r)) && !P[r]) {
|
|
23591
|
+
let t = kt(e, r, n);
|
|
23592
|
+
return t === !1 && Dt(N.afterSanitizeElements, e, null), t;
|
|
23593
|
+
}
|
|
23594
|
+
if ((y ? y(e) : e.nodeType) === qb.element && !pt(e) || (r === "noscript" || r === "noembed" || r === "noframes") && pb(Gb, e.innerHTML)) return mt(e), !0;
|
|
23592
23595
|
if (Ce && e.nodeType === qb.text) {
|
|
23593
|
-
let n =
|
|
23596
|
+
let n = St(e.textContent);
|
|
23594
23597
|
e.textContent !== n && (Qy(t.removed, { element: e.cloneNode() }), e.textContent = n);
|
|
23595
23598
|
}
|
|
23596
|
-
return
|
|
23597
|
-
},
|
|
23598
|
-
if (_e[t] || we && t === "patchsrc" || we && t === "for" && e !== "label" && e !== "output" ||
|
|
23599
|
-
let i =
|
|
23600
|
-
if (!(be && pb(
|
|
23599
|
+
return Dt(N.afterSanitizeElements, e, null), !1;
|
|
23600
|
+
}, Mt = function(e, t, r) {
|
|
23601
|
+
if (_e[t] || we && t === "patchsrc" || we && t === "for" && e !== "label" && e !== "output" || Ne && (t === "id" || t === "name") && (r in n || r in ot)) return !1;
|
|
23602
|
+
let i = F[t] || ve.attributeCheck instanceof Function && ve.attributeCheck(t, e);
|
|
23603
|
+
if (!(be && pb(se, t)) && !(ye && pb(ce, t))) {
|
|
23601
23604
|
if (!i) {
|
|
23602
|
-
if (!(
|
|
23603
|
-
} else if (!
|
|
23605
|
+
if (!(Pt(e) && (he.tagNameCheck instanceof RegExp && pb(he.tagNameCheck, e) || he.tagNameCheck instanceof Function && he.tagNameCheck(e)) && (he.attributeNameCheck instanceof RegExp && pb(he.attributeNameCheck, t) || he.attributeNameCheck instanceof Function && he.attributeNameCheck(t, e)) || t === "is" && he.allowCustomizedBuiltInElements && (he.tagNameCheck instanceof RegExp && pb(he.tagNameCheck, r) || he.tagNameCheck instanceof Function && he.tagNameCheck(r)))) return !1;
|
|
23606
|
+
} else if (!He[t] && !pb(fe, ib(r, ue, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && ab(r, "data:") === 0 && Be[e]) && !(xe && !pb(le, ib(r, ue, ""))) && r) return !1;
|
|
23604
23607
|
}
|
|
23605
23608
|
return !0;
|
|
23606
|
-
},
|
|
23609
|
+
}, Nt = $({}, [
|
|
23607
23610
|
"annotation-xml",
|
|
23608
23611
|
"color-profile",
|
|
23609
23612
|
"font-face",
|
|
@@ -23612,66 +23615,67 @@ function Qb() {
|
|
|
23612
23615
|
"font-face-src",
|
|
23613
23616
|
"font-face-uri",
|
|
23614
23617
|
"missing-glyph"
|
|
23615
|
-
]),
|
|
23616
|
-
return !
|
|
23617
|
-
},
|
|
23618
|
-
if (
|
|
23619
|
-
case "TrustedHTML": return
|
|
23620
|
-
case "TrustedScriptURL": return
|
|
23618
|
+
]), Pt = function(e) {
|
|
23619
|
+
return !Nt[tb(e)] && pb(de, e);
|
|
23620
|
+
}, Ft = function(e, t, n, r) {
|
|
23621
|
+
if (S && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
|
|
23622
|
+
case "TrustedHTML": return D(r);
|
|
23623
|
+
case "TrustedScriptURL": return te(r);
|
|
23621
23624
|
}
|
|
23622
23625
|
return r;
|
|
23623
|
-
},
|
|
23626
|
+
}, It = function(e, n, r, i) {
|
|
23624
23627
|
try {
|
|
23625
|
-
r ? e.setAttributeNS(r, n, i) : e.setAttribute(n, i),
|
|
23628
|
+
r ? e.setAttributeNS(r, n, i) : e.setAttribute(n, i), wt(e) ? mt(e) : Zy(t.removed);
|
|
23626
23629
|
} catch {
|
|
23627
|
-
|
|
23630
|
+
gt(n, e);
|
|
23628
23631
|
}
|
|
23629
|
-
},
|
|
23630
|
-
|
|
23632
|
+
}, Lt = function(e) {
|
|
23633
|
+
Dt(N.beforeSanitizeAttributes, e, null);
|
|
23631
23634
|
let t = e.attributes;
|
|
23632
|
-
if (!t ||
|
|
23635
|
+
if (!t || wt(e)) return;
|
|
23636
|
+
F = At(N.uponSanitizeAttribute, F, me, Oe);
|
|
23633
23637
|
let n = {
|
|
23634
23638
|
attrName: "",
|
|
23635
23639
|
attrValue: "",
|
|
23636
23640
|
keepAttr: !0,
|
|
23637
|
-
allowedAttributes:
|
|
23641
|
+
allowedAttributes: F,
|
|
23638
23642
|
forceKeepAttr: void 0
|
|
23639
|
-
}, r = t.length, i =
|
|
23643
|
+
}, r = t.length, i = it(e.nodeName);
|
|
23640
23644
|
for (; r--;) {
|
|
23641
|
-
let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, l =
|
|
23642
|
-
if (n.attrName = l, n.attrValue = d, n.keepAttr = !0, n.forceKeepAttr = void 0,
|
|
23643
|
-
|
|
23645
|
+
let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, l = it(o), u = c, d = o === "value" ? u : ob(u);
|
|
23646
|
+
if (n.attrName = l, n.attrValue = d, n.keepAttr = !0, n.forceKeepAttr = void 0, Dt(N.uponSanitizeAttribute, e, n), d = n.attrValue, Pe && (l === "id" || l === "name") && ab(d, Fe) !== 0 && (gt(o, e), d = Fe + d), we && pb(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, d)) {
|
|
23647
|
+
gt(o, e);
|
|
23644
23648
|
continue;
|
|
23645
23649
|
}
|
|
23646
23650
|
if (l === "attributename" && rb(d, "href")) {
|
|
23647
|
-
|
|
23651
|
+
gt(o, e);
|
|
23648
23652
|
continue;
|
|
23649
23653
|
}
|
|
23650
23654
|
if (!n.forceKeepAttr) {
|
|
23651
23655
|
if (!n.keepAttr) {
|
|
23652
|
-
|
|
23656
|
+
gt(o, e);
|
|
23653
23657
|
continue;
|
|
23654
23658
|
}
|
|
23655
23659
|
if (!Se && pb(Kb, d)) {
|
|
23656
|
-
|
|
23660
|
+
gt(o, e);
|
|
23657
23661
|
continue;
|
|
23658
23662
|
}
|
|
23659
|
-
if (Ce && (d =
|
|
23660
|
-
|
|
23663
|
+
if (Ce && (d = St(d)), !Mt(i, l, d)) {
|
|
23664
|
+
gt(o, e);
|
|
23661
23665
|
continue;
|
|
23662
23666
|
}
|
|
23663
|
-
d =
|
|
23667
|
+
d = Ft(i, l, s, d), d !== u && It(e, o, s, d);
|
|
23664
23668
|
}
|
|
23665
23669
|
}
|
|
23666
|
-
|
|
23667
|
-
},
|
|
23668
|
-
let t = null, n =
|
|
23669
|
-
for (
|
|
23670
|
+
Dt(N.afterSanitizeAttributes, e, null);
|
|
23671
|
+
}, Rt = function(e) {
|
|
23672
|
+
let t = null, n = xt(e);
|
|
23673
|
+
for (Dt(N.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (Dt(N.uponSanitizeShadowNode, t, null), jt(t, e), Lt(t), Tt(t.content) && Rt(t.content), (y ? y(t) : t.nodeType) === qb.element) {
|
|
23670
23674
|
let e = _(t);
|
|
23671
|
-
|
|
23675
|
+
Tt(e) && (zt(e), Rt(e));
|
|
23672
23676
|
}
|
|
23673
|
-
|
|
23674
|
-
},
|
|
23677
|
+
Dt(N.afterSanitizeShadowDOM, e, null);
|
|
23678
|
+
}, zt = function(e) {
|
|
23675
23679
|
let t = [{
|
|
23676
23680
|
node: e,
|
|
23677
23681
|
shadow: null
|
|
@@ -23679,7 +23683,7 @@ function Qb() {
|
|
|
23679
23683
|
for (; t.length > 0;) {
|
|
23680
23684
|
let e = t.pop();
|
|
23681
23685
|
if (e.shadow) {
|
|
23682
|
-
|
|
23686
|
+
Rt(e.shadow);
|
|
23683
23687
|
continue;
|
|
23684
23688
|
}
|
|
23685
23689
|
let n = e.node, r = (y ? y(n) : n.nodeType) === qb.element, i = h(n);
|
|
@@ -23689,9 +23693,9 @@ function Qb() {
|
|
|
23689
23693
|
});
|
|
23690
23694
|
if (r) {
|
|
23691
23695
|
let e = b ? b(n) : null;
|
|
23692
|
-
if (typeof e == "string" &&
|
|
23696
|
+
if (typeof e == "string" && it(e) === "template") {
|
|
23693
23697
|
let e = n.content;
|
|
23694
|
-
|
|
23698
|
+
Tt(e) && t.push({
|
|
23695
23699
|
node: e,
|
|
23696
23700
|
shadow: null
|
|
23697
23701
|
});
|
|
@@ -23699,7 +23703,7 @@ function Qb() {
|
|
|
23699
23703
|
}
|
|
23700
23704
|
if (r) {
|
|
23701
23705
|
let e = _(n);
|
|
23702
|
-
|
|
23706
|
+
Tt(e) && t.push({
|
|
23703
23707
|
node: null,
|
|
23704
23708
|
shadow: e
|
|
23705
23709
|
}, {
|
|
@@ -23711,56 +23715,57 @@ function Qb() {
|
|
|
23711
23715
|
};
|
|
23712
23716
|
return t.sanitize = function(e) {
|
|
23713
23717
|
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, o = null, s = null;
|
|
23714
|
-
if (
|
|
23718
|
+
if (Je = !e, Je && (e = "<!-->"), typeof e != "string" && !Et(e) && (e = yb(e), typeof e != "string")) throw mb("dirty is not a string, aborting");
|
|
23715
23719
|
if (!t.isSupported) return e;
|
|
23716
|
-
Ee ? (
|
|
23717
|
-
let c =
|
|
23720
|
+
Ee ? (P = De, F = Oe) : ct(n), (N.uponSanitizeElement.length > 0 || N.uponSanitizeAttribute.length > 0) && (P = vb(P)), N.uponSanitizeAttribute.length > 0 && (F = vb(F)), t.removed = [];
|
|
23721
|
+
let c = Le && typeof e != "string" && Et(e);
|
|
23718
23722
|
if (c) {
|
|
23719
|
-
|
|
23723
|
+
yt(e);
|
|
23720
23724
|
let t = b ? b(e) : e.nodeName;
|
|
23721
23725
|
if (typeof t == "string") {
|
|
23722
|
-
let n =
|
|
23723
|
-
if (!
|
|
23726
|
+
let n = it(t);
|
|
23727
|
+
if (!P[n] || ge[n]) throw ht(e), mb("root node is forbidden and cannot be sanitized in-place");
|
|
23724
23728
|
}
|
|
23725
|
-
if (
|
|
23729
|
+
if (wt(e)) throw ht(e), mb("root node is clobbered and cannot be sanitized in-place");
|
|
23726
23730
|
try {
|
|
23727
|
-
|
|
23731
|
+
zt(e);
|
|
23728
23732
|
} catch (t) {
|
|
23729
|
-
throw
|
|
23733
|
+
throw ht(e), t;
|
|
23730
23734
|
}
|
|
23731
|
-
} else if (
|
|
23735
|
+
} else if (Et(e)) i = bt("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === qb.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), zt(a);
|
|
23732
23736
|
else {
|
|
23733
|
-
if (!
|
|
23734
|
-
if (i =
|
|
23737
|
+
if (!Ae && !Ce && !Te && e.indexOf("<") === -1) return S && Me ? D(e) : e;
|
|
23738
|
+
if (i = bt(e), !i) return Ae ? null : Me ? C : "";
|
|
23735
23739
|
}
|
|
23736
|
-
i &&
|
|
23737
|
-
let l = c ? e : i
|
|
23740
|
+
i && ke && mt(i.firstChild);
|
|
23741
|
+
let l = c ? e : i;
|
|
23738
23742
|
try {
|
|
23739
|
-
|
|
23743
|
+
let e = xt(l);
|
|
23744
|
+
for (; o = e.nextNode();) jt(o, l), Lt(o), Tt(o.content) && Rt(o.content);
|
|
23740
23745
|
} catch (n) {
|
|
23741
|
-
throw c && (
|
|
23742
|
-
e.element &&
|
|
23746
|
+
throw c && (ht(e), Yy(t.removed, (e) => {
|
|
23747
|
+
e.element && vt(e.element);
|
|
23743
23748
|
})), n;
|
|
23744
23749
|
}
|
|
23745
23750
|
if (c) return Yy(t.removed, (e) => {
|
|
23746
|
-
e.element &&
|
|
23747
|
-
}), Ce &&
|
|
23748
|
-
if (
|
|
23749
|
-
if (Ce &&
|
|
23751
|
+
e.element && vt(e.element);
|
|
23752
|
+
}), Ce && Ct(e), e;
|
|
23753
|
+
if (Ae) {
|
|
23754
|
+
if (Ce && Ct(i), je) for (s = j.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
|
|
23750
23755
|
else s = i;
|
|
23751
|
-
return (
|
|
23756
|
+
return (F.shadowroot || F.shadowrootmode) && (s = re.call(r, s, !0)), s;
|
|
23752
23757
|
}
|
|
23753
|
-
let
|
|
23754
|
-
return Te &&
|
|
23758
|
+
let u = Te ? i.outerHTML : i.innerHTML;
|
|
23759
|
+
return Te && P["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && pb(Vb, i.ownerDocument.doctype.name) && (u = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + u), Ce && (u = St(u)), S && Me ? D(u) : u;
|
|
23755
23760
|
}, t.setConfig = function() {
|
|
23756
23761
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
23757
|
-
|
|
23762
|
+
ct(e), Ee = !0, De = P, Oe = F;
|
|
23758
23763
|
}, t.clearConfig = function() {
|
|
23759
|
-
|
|
23764
|
+
at = null, Ee = !1, De = null, Oe = null, S = w, C = "";
|
|
23760
23765
|
}, t.isValidAttribute = function(e, t, n) {
|
|
23761
|
-
|
|
23762
|
-
let r =
|
|
23763
|
-
return
|
|
23766
|
+
at || ct({});
|
|
23767
|
+
let r = it(e), i = it(t);
|
|
23768
|
+
return Mt(r, i, n);
|
|
23764
23769
|
}, t.addHook = function(e, t) {
|
|
23765
23770
|
typeof t == "function" && db(N, e) && Qy(N[e], t);
|
|
23766
23771
|
}, t.removeHook = function(e, t) {
|
|
@@ -24071,7 +24076,7 @@ var Dx = "lr.chatbot.broadcast_channel." + document.location.hostname, Ox = "lr.
|
|
|
24071
24076
|
}), this.#e = "/bff", this.#t = !1, this.#n = !1, this.#r = !1, this.#i = !1, this._closeClickCount = 0, this._isConversationDone = !1, this._shouldEndConversation = !1, this._broadcastController = new ty(this, Dx), this._conversationHistoryTask = this.createConversationHistoryTask(), this.registerBroadcastMessages();
|
|
24072
24077
|
}
|
|
24073
24078
|
getVersion() {
|
|
24074
|
-
return "LR Chatbot - v.0.48.
|
|
24079
|
+
return "LR Chatbot - v.0.48.47";
|
|
24075
24080
|
}
|
|
24076
24081
|
async connectedCallback() {
|
|
24077
24082
|
super.connectedCallback(), this._conversationHistoryTask.run();
|