deep-chat-dev 9.0.131 → 9.0.133
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/custom-elements.json +4093 -3761
- package/dist/deepChat.bundle.js +1 -1
- package/dist/deepChat.d.ts +1 -3
- package/dist/deepChat.d.ts.map +1 -1
- package/dist/deepChat.js +475 -470
- package/dist/services/serviceIO.d.ts +2 -0
- package/dist/services/serviceIO.d.ts.map +1 -1
- package/dist/services/utils/baseServiceIO.d.ts +2 -0
- package/dist/services/utils/baseServiceIO.d.ts.map +1 -1
- package/dist/types/request.d.ts +2 -0
- package/dist/types/request.d.ts.map +1 -1
- package/dist/utils/legacy/legacy.d.ts +1 -0
- package/dist/utils/legacy/legacy.d.ts.map +1 -1
- package/dist/views/chat/input/buttons/submit/submitButton.d.ts.map +1 -1
- package/dist/views/chat/input/textInput/pasteUtils.d.ts.map +1 -1
- package/dist/views/chat/messages/setupMessages.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/deepChat.js
CHANGED
@@ -135,7 +135,7 @@ var C = /*#__PURE__*/function () {
|
|
135
135
|
}]);
|
136
136
|
return C;
|
137
137
|
}();
|
138
|
-
var
|
138
|
+
var Un = /*#__PURE__*/function () {
|
139
139
|
function jt() {
|
140
140
|
_classCallCheck(this, jt);
|
141
141
|
}
|
@@ -168,7 +168,7 @@ var qn = /*#__PURE__*/function () {
|
|
168
168
|
}]);
|
169
169
|
return jt;
|
170
170
|
}();
|
171
|
-
|
171
|
+
Un.DEFAULT_COMPONENT_STYLE = {
|
172
172
|
height: "350px",
|
173
173
|
width: "320px",
|
174
174
|
border: "1px solid #cacaca",
|
@@ -182,7 +182,7 @@ qn.DEFAULT_COMPONENT_STYLE = {
|
|
182
182
|
// this is also causing the chat to squeeze when there is no space
|
183
183
|
overflow: "hidden"
|
184
184
|
};
|
185
|
-
var wi =
|
185
|
+
var wi = Un;
|
186
186
|
var R = /* @__PURE__ */function (s) {
|
187
187
|
return s.ESCAPE = "Escape", s.ENTER = "Enter", s.TAB = "Tab", s.ARROW_UP = "ArrowUp", s.ARROW_DOWN = "ArrowDown", s.ARROW_RIGHT = "ArrowRight", s.ARROW_LEFT = "ArrowLeft", s.BACKSPACE = "Backspace", s.DELETE = "Delete", s.META = "Meta", s.CONTROL = "Control", s;
|
188
188
|
}(R || {});
|
@@ -468,11 +468,11 @@ var Jn = /*#__PURE__*/function () {
|
|
468
468
|
}();
|
469
469
|
Jn.LOAD_VOICES_MS = 200;
|
470
470
|
var Ft = Jn;
|
471
|
-
var
|
472
|
-
function
|
473
|
-
_classCallCheck(this,
|
471
|
+
var Se = /*#__PURE__*/function () {
|
472
|
+
function Se() {
|
473
|
+
_classCallCheck(this, Se);
|
474
474
|
}
|
475
|
-
_createClass(
|
475
|
+
_createClass(Se, null, [{
|
476
476
|
key: "checkForContainerStyles",
|
477
477
|
value: function checkForContainerStyles(e, t) {
|
478
478
|
var i = e.containerStyle;
|
@@ -509,8 +509,14 @@ var Re = /*#__PURE__*/function () {
|
|
509
509
|
var t;
|
510
510
|
(t = e.children[0]) != null && t.classList.contains("deep-chat-update-message") && (console.error('The "deep-chat-update-message" html class is deprecated since version 1.4.4.'), console.error("Please change to using {..., overwrite: true} object: https://deepchat.dev/docs/connect#Response"));
|
511
511
|
}
|
512
|
+
}, {
|
513
|
+
key: "checkForStream",
|
514
|
+
value: function checkForStream(e) {
|
515
|
+
var t = e.stream;
|
516
|
+
if (t) return console.error("The stream property has been moved to the request object in version 1.4.12."), console.error("Please see the thew request object: https://deepchat.dev/docs/connect#request"), t;
|
517
|
+
}
|
512
518
|
}]);
|
513
|
-
return
|
519
|
+
return Se;
|
514
520
|
}();
|
515
521
|
var ks = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8c3ZnIGZpbGw9IiMwMDAwMDAiIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIAoJCXZpZXdCb3g9IjAgMCAzMiAzMiIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+Cgk8cGF0aCBkPSJNMjMsMzAuMzZIOWMtMi40MDQsMC00LjM2LTEuOTU2LTQuMzYtNC4zNlYxNWMwLTIuNDA0LDEuOTU2LTQuMzYsNC4zNi00LjM2aDMuNjU5CgkJYzAuMTY3LTEuNTY2LDEuNDE1LTIuODEzLDIuOTgxLTIuOTgxVjUuMzMzYy0xLjEzMS0wLjE3NC0yLTEuMTU0LTItMi4zMzNjMC0xLjMwMSwxLjA1OS0yLjM2LDIuMzYtMi4zNgoJCWMxLjMwMiwwLDIuMzYsMS4wNTksMi4zNiwyLjM2YzAsMS4xNzktMC44NjksMi4xNTktMiwyLjMzM1Y3LjY2YzEuNTY2LDAuMTY3LDIuODE0LDEuNDE1LDIuOTgxLDIuOTgxSDIzCgkJYzIuNDA0LDAsNC4zNiwxLjk1Niw0LjM2LDQuMzZ2MTFDMjcuMzYsMjguNDA0LDI1LjQwNCwzMC4zNiwyMywzMC4zNnogTTksMTEuMzZjLTIuMDA3LDAtMy42NCwxLjYzMy0zLjY0LDMuNjR2MTEKCQljMCwyLjAwNywxLjYzMywzLjY0LDMuNjQsMy42NGgxNGMyLjAwNywwLDMuNjQtMS42MzMsMy42NC0zLjY0VjE1YzAtMi4wMDctMS42MzMtMy42NC0zLjY0LTMuNjRIOXogTTEzLjM4NCwxMC42NGg1LjIzMQoJCUMxOC40MzksOS4zNTQsMTcuMzM0LDguMzYsMTYsOC4zNkMxNC42NjcsOC4zNiwxMy41NjEsOS4zNTQsMTMuMzg0LDEwLjY0eiBNMTYsMS4zNmMtMC45MDQsMC0xLjY0LDAuNzM2LTEuNjQsMS42NAoJCVMxNS4wOTYsNC42NCwxNiw0LjY0YzAuOTA0LDAsMS42NC0wLjczNiwxLjY0LTEuNjRTMTYuOTA0LDEuMzYsMTYsMS4zNnogTTIwLDI3LjM2aC04Yy0xLjMwMSwwLTIuMzYtMS4wNTktMi4zNi0yLjM2CgkJczEuMDU5LTIuMzYsMi4zNi0yLjM2aDhjMS4zMDIsMCwyLjM2LDEuMDU5LDIuMzYsMi4zNlMyMS4zMDIsMjcuMzYsMjAsMjcuMzZ6IE0xMiwyMy4zNmMtMC45MDQsMC0xLjY0LDAuNzM1LTEuNjQsMS42NAoJCXMwLjczNiwxLjY0LDEuNjQsMS42NGg4YzAuOTA0LDAsMS42NC0wLjczNSwxLjY0LTEuNjRzLTAuNzM1LTEuNjQtMS42NC0xLjY0SDEyeiBNMzEsMjMuODZoLTJjLTAuMTk5LDAtMC4zNi0wLjE2MS0wLjM2LTAuMzZWMTUKCQljMC0wLjE5OSwwLjE2MS0wLjM2LDAuMzYtMC4zNmgyYzAuMTk5LDAsMC4zNiwwLjE2MSwwLjM2LDAuMzZ2OC41QzMxLjM2LDIzLjY5OSwzMS4xOTksMjMuODYsMzEsMjMuODZ6IE0yOS4zNiwyMy4xNGgxLjI3OXYtNy43OAoJCUgyOS4zNlYyMy4xNHogTTMsMjMuODZIMWMtMC4xOTksMC0wLjM2LTAuMTYxLTAuMzYtMC4zNlYxNWMwLTAuMTk5LDAuMTYxLTAuMzYsMC4zNi0wLjM2aDJjMC4xOTksMCwwLjM2LDAuMTYxLDAuMzYsMC4zNnY4LjUKCQlDMy4zNiwyMy42OTksMy4xOTksMjMuODYsMywyMy44NnogTTEuMzYsMjMuMTRoMS4yOHYtNy43OEgxLjM2VjIzLjE0eiBNMjAsMjAuMzZjLTEuMzAyLDAtMi4zNi0xLjA1OS0yLjM2LTIuMzYKCQlzMS4wNTktMi4zNiwyLjM2LTIuMzZzMi4zNiwxLjA1OSwyLjM2LDIuMzZDMjIuMzYsMTkuMzAyLDIxLjMwMiwyMC4zNiwyMCwyMC4zNnogTTIwLDE2LjM2Yy0wLjkwNCwwLTEuNjQsMC43MzYtMS42NCwxLjY0CgkJczAuNzM1LDEuNjQsMS42NCwxLjY0czEuNjQtMC43MzUsMS42NC0xLjY0UzIwLjkwNCwxNi4zNiwyMCwxNi4zNnogTTEyLDIwLjM2Yy0xLjMwMSwwLTIuMzYtMS4wNTktMi4zNi0yLjM2czEuMDU5LTIuMzYsMi4zNi0yLjM2CgkJczIuMzYsMS4wNTksMi4zNiwyLjM2QzE0LjM2LDE5LjMwMiwxMy4zMDEsMjAuMzYsMTIsMjAuMzZ6IE0xMiwxNi4zNmMtMC45MDQsMC0xLjY0LDAuNzM2LTEuNjQsMS42NHMwLjczNiwxLjY0LDEuNjQsMS42NAoJCXMxLjY0LTAuNzM1LDEuNjQtMS42NFMxMi45MDQsMTYuMzYsMTIsMTYuMzZ6Ii8+Cgk8cmVjdCBzdHlsZT0iZmlsbDpub25lOyIgd2lkdGg9IjMyIiBoZWlnaHQ9IjMyIi8+Cjwvc3ZnPg==",
|
516
522
|
Is = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPoAAAD6CAMAAAC/MqoPAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////9vX18vLy/Pz86enp4+Li2tnZ1tbWzczM+fn57Ozs4N/f09LS0M/P5uXl7+/v3dzcwtncCAAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAEgAAABIAEbJaz4AAAZNSURBVHja7d3bdtsqEABQYABZSLH9/3+ZpnUsIcF5iOM6PfElNoMHMfPQdq3GmL0GkLhEUqLaUExnOtOZznSmM53pTGc605nOdKYznelMZzrTmV4LXSqllKyJDkob26xWq8Zae/iH0QoWTm9d1xur4WuypQJtTd+5dqn0VjcxzNO5/57mEBvdLo8Oron6aseWOjYOFkVvjQs3DmgyONMuht52EfztP+4hdu0i6LCO808/M8c1lE/fuPGej41uUzgdtoO/75N+2ELJ9I3b3//hPXbiMenm3pR/Jt4USgcLBIp4Bh10gqKVhvLo0klCxeSky96nKcj3siw6pJIL4XsoiQ7apyvMY/V3HHrSRioLopvEhSpTCn2TPEuwKYMOIX0tAxRBf/Hpa+lfSqBv9gi1FPsNfTrMAiVmIE/vJhz61FGnQxRIEYE4vfNYdN8Rp6MlHaHotHTn8ejekaZPAjEmyvQWdZFTtYTpXqCGJ0zvcek9Yfoel76nS0ffv1NMp1ca+pkgyfRCGind4L7OWWc605l+cxjsyhqy9AGbPpClc1/nvl5VX0c/3Alk6RU3+Am7shNZ+h6bvidLr7jBB+zKBrL0irOOudmIUDzTmf5gIP+iEuXtRuTVaEmY/oZLfyNMrzjryPc0gerMTdpVg0tvjJUU6bLPcGOoUv46SLL6Wi8yhLf06C7TUyekI0efRaaYqdFltkeNpPumRPSMDxgBYvSM035FrKAmH72hRW99PrpvSdEHkTEGUvSsK3yKVDkuJ92RohcZaehzzirPpOg+J92Tolfc4Cumx5xVXpGiZ34+ICX6W84qv5GiR5NPbiIpOv6BCoSvSkTX+eiaGP092zINvBOj4x8mSf9FqejvNo/cvpOji19ZbmviL0GPLsYMFzgzCor0+Bv/ePDvSJKOb9dJ5UlnbnEHiHgzv6cdTpJOWuc/u3FEucLDOL75xGtBiefrcwgoC9NDSH/jkH6pAuXmBqPQ9HSUPVdZBH1GGOrMXAQdYxcKZfxAoK+KKBKFLosoEoX+u4giUehz8jlcnAuhp78I46yDYNAd+QLR6K+pr+yvxdBTHyVDubQh0UfSxaHSd0lbvNkVRE87JGOtc+PQd2QLQ6fHhJkKsSh6yg13tO08JPprsgrrXWH0dJd2vH1MLPprot4eXoujpzrdhngiD40ek2y92lggPcnWa8qN1Yz0BFuvZhRl0uOfR0v4Ewuli/Bg4Qr3lArqGdndQ3UPO1EunXYwnelMZzrTmc50pjOd6UxnOtOZznSmM53pTGf6kuj6oedFKV0s3fX6sX1S3bsi6a4PD7+/YAqYeBw6pIB/4qEgOqxdSPbGiim4NRRCbzs3Jj0L4UfXtQXQVRfn5IdA/Bw7RZzurEV6EtdsLeGXkIPuA+K1UoVeA0l62zmN/LqfSSft9KkepmoRuvi3nd5uKNFB9zbbXEANqdr941XO0NJx2v2jdJenpf+/3bvn0ts16ph+sd6hX7dPo2+2cZzE02Ia43bzDHqr+2Evnhz74ZHU30ffbKOeng1/NPV30Ns1gYQnSP2P6e65Pfxc6h02XZqXQCjhJ6kPL6bFo4NrGvAU4UII4SE2P1vQuZkuOxckVfehisF1MjUddN/MZBN+kvq5uf0O/xa66gyNS9ktMWlz44rO1Z8C19i5FPdHzPamXn+F3hryPfxMr78+4F+kq22kO6Rf6fUQt+puuustyWv4rbG3l/duztFB96GYoe1cTBdXMr+nw9qVM6ZfxOvzezff0nXi/ZOndvrR6Zvpm0c3h6nhdb+5iS7tsIim/qXZD9+97/Jf+rpZ5BET1ayv0GUzLhEuhBBjIy/RdVPgndutIRt9nt7p5cKFEEJ3Z+jQFDZL+XnMDXxHB73gxn5s9Kc3d3/pFciFkN/QTSXHJpX5l66gDrkQoP6hL3xsPw39la4qOiV8tH78XeSbue6N9mvWa6J/ybpc1CT1Wnh5Qq9meP8IOKH3ddH7E/ri1iYux/SXDrXR4UiPdck/wUpU+FtPf6/orja6O9KL3l56LOvVxe5Ib2qjN0d6Vbex4ghWlU3bPqI90If66MNng680FNpbJijH6kCvaF3uMzQ3+IrpFerV4Y9dffQdN3im10ivbuImhD3Qq5u4HdZkua8znelMZ/pS4z9CPVKkxowNxgAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxNy0wMy0yN1QxNTo0NToxNSswMDowMN1xSg4AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTctMDMtMjdUMTU6NDU6MTUrMDA6MDCsLPKyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAABJRU5ErkJggg==",
|
@@ -569,13 +575,13 @@ var ks = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNv
|
|
569
575
|
Kn.CONTAINER_CLASS = "avatar-container";
|
570
576
|
var cn = Kn;
|
571
577
|
var Yn = /*#__PURE__*/function () {
|
572
|
-
function
|
573
|
-
_classCallCheck(this,
|
578
|
+
function we() {
|
579
|
+
_classCallCheck(this, we);
|
574
580
|
}
|
575
|
-
_createClass(
|
581
|
+
_createClass(we, null, [{
|
576
582
|
key: "hide",
|
577
583
|
value: function hide(e) {
|
578
|
-
e.getElementsByClassName(
|
584
|
+
e.getElementsByClassName(we.NAME_CLASS)[0].style.visibility = "hidden";
|
579
585
|
}
|
580
586
|
}, {
|
581
587
|
key: "getPosition",
|
@@ -601,26 +607,26 @@ var Yn = /*#__PURE__*/function () {
|
|
601
607
|
key: "createName",
|
602
608
|
value: function createName(e, t) {
|
603
609
|
var i = document.createElement("div");
|
604
|
-
return i.classList.add(
|
610
|
+
return i.classList.add(we.NAME_CLASS), i.textContent = we.getNameText(e, t), we.applyStyle(i, e, t), i;
|
605
611
|
}
|
606
612
|
}, {
|
607
613
|
key: "add",
|
608
614
|
value: function add(e, t, i) {
|
609
615
|
var n = typeof i == "boolean" ? {} : i,
|
610
|
-
r =
|
611
|
-
o =
|
616
|
+
r = we.createName(t, n),
|
617
|
+
o = we.getPosition(t, n);
|
612
618
|
r.classList.add(o === "left" ? "left-item-position" : "right-item-position"), e.insertAdjacentElement(o === "left" ? "beforebegin" : "afterend", r);
|
613
619
|
}
|
614
620
|
}]);
|
615
|
-
return
|
621
|
+
return we;
|
616
622
|
}();
|
617
623
|
Yn.NAME_CLASS = "name";
|
618
624
|
var dn = Yn;
|
619
625
|
var ni = /*#__PURE__*/function () {
|
620
|
-
function
|
621
|
-
_classCallCheck(this,
|
626
|
+
function Me() {
|
627
|
+
_classCallCheck(this, Me);
|
622
628
|
}
|
623
|
-
_createClass(
|
629
|
+
_createClass(Me, null, [{
|
624
630
|
key: "getLastElementsByClass",
|
625
631
|
value: function getLastElementsByClass(e, t, i) {
|
626
632
|
var _loop = function _loop() {
|
@@ -661,8 +667,8 @@ var ni = /*#__PURE__*/function () {
|
|
661
667
|
}, {
|
662
668
|
key: "overwriteMessage",
|
663
669
|
value: function overwriteMessage(e, t, i, n, r, o) {
|
664
|
-
var a =
|
665
|
-
l =
|
670
|
+
var a = Me.getLastElementsByClass(t, [Me.getRoleClass(n), o], ["loading-message-text"]),
|
671
|
+
l = Me.getLastMessage(e, n, r);
|
666
672
|
return l && (l[r] = i), a;
|
667
673
|
}
|
668
674
|
}, {
|
@@ -674,18 +680,18 @@ var ni = /*#__PURE__*/function () {
|
|
674
680
|
}, {
|
675
681
|
key: "fillEmptyMessageElement",
|
676
682
|
value: function fillEmptyMessageElement(e, t) {
|
677
|
-
t.trim().length === 0 && (e.classList.add(
|
683
|
+
t.trim().length === 0 && (e.classList.add(Me.EMPTY_MESSAGE_CLASS), e.innerHTML = '<div style="color:#00000000">.</div>');
|
678
684
|
}
|
679
685
|
}, {
|
680
686
|
key: "unfillEmptyMessageElement",
|
681
687
|
value: function unfillEmptyMessageElement(e, t) {
|
682
|
-
e.classList.contains(
|
688
|
+
e.classList.contains(Me.EMPTY_MESSAGE_CLASS) && t.trim().length > 0 && e.replaceChildren();
|
683
689
|
}
|
684
690
|
}, {
|
685
691
|
key: "getLastMessageBubbleElement",
|
686
692
|
value: function getLastMessageBubbleElement(e) {
|
687
693
|
var t, i, n;
|
688
|
-
return Array.from(((n = (i = (t =
|
694
|
+
return Array.from(((n = (i = (t = Me.getLastMessageElement(e)) == null ? void 0 : t.children) == null ? void 0 : i[0]) == null ? void 0 : n.children) || []).find(function (r) {
|
689
695
|
return r.classList.contains("message-bubble");
|
690
696
|
});
|
691
697
|
}
|
@@ -706,17 +712,17 @@ var ni = /*#__PURE__*/function () {
|
|
706
712
|
t && cn.hide(n), i && dn.hide(n);
|
707
713
|
}
|
708
714
|
}]);
|
709
|
-
return
|
715
|
+
return Me;
|
710
716
|
}();
|
711
717
|
ni.AI_ROLE = "ai";
|
712
718
|
ni.USER_ROLE = "user";
|
713
719
|
ni.EMPTY_MESSAGE_CLASS = "empty-message";
|
714
720
|
var b = ni;
|
715
|
-
var
|
716
|
-
function
|
717
|
-
_classCallCheck(this,
|
721
|
+
var Le = /*#__PURE__*/function () {
|
722
|
+
function Le() {
|
723
|
+
_classCallCheck(this, Le);
|
718
724
|
}
|
719
|
-
_createClass(
|
725
|
+
_createClass(Le, null, [{
|
720
726
|
key: "mouseUp",
|
721
727
|
value: function mouseUp(e, t) {
|
722
728
|
C.unsetAllCSSMouseStates(e, t), Object.assign(e.style, t["default"]), Object.assign(e.style, t.hover);
|
@@ -739,10 +745,10 @@ var Ie = /*#__PURE__*/function () {
|
|
739
745
|
}, {
|
740
746
|
key: "add",
|
741
747
|
value: function add(e, t) {
|
742
|
-
e.addEventListener("mouseenter",
|
748
|
+
e.addEventListener("mouseenter", Le.mouseEnter.bind(this, e, t)), e.addEventListener("mouseleave", Le.mouseLeave.bind(this, e, t)), e.addEventListener("mousedown", Le.mouseDown.bind(this, e, t)), e.addEventListener("mouseup", Le.mouseUp.bind(this, e, t));
|
743
749
|
}
|
744
750
|
}]);
|
745
|
-
return
|
751
|
+
return Le;
|
746
752
|
}();
|
747
753
|
var Ls = "deep-chat-temporary-message",
|
748
754
|
Rs = "deep-chat-suggestion-button",
|
@@ -847,7 +853,7 @@ var le = /*#__PURE__*/function () {
|
|
847
853
|
key: "applyStylesToElement",
|
848
854
|
value: function applyStylesToElement(e, t) {
|
849
855
|
var i = C.processStateful(t, {}, {});
|
850
|
-
|
856
|
+
Le.add(e, i), Object.assign(e.style, i["default"]);
|
851
857
|
}
|
852
858
|
}, {
|
853
859
|
key: "applyEventsToElement",
|
@@ -902,7 +908,7 @@ var Qe = /*#__PURE__*/function () {
|
|
902
908
|
value: function overwrite(e, t, i, n) {
|
903
909
|
var r = e.messages,
|
904
910
|
o = b.overwriteMessage(r, n, t, i, "html", "html-message");
|
905
|
-
return o && (o.bubbleElement.innerHTML = t, le.apply(e, o.outerContainer),
|
911
|
+
return o && (o.bubbleElement.innerHTML = t, le.apply(e, o.outerContainer), Se.flagHTMLUpdateClass(o.bubbleElement)), o;
|
906
912
|
}
|
907
913
|
// prettier-ignore
|
908
914
|
}, {
|
@@ -915,7 +921,7 @@ var Qe = /*#__PURE__*/function () {
|
|
915
921
|
r.status = !1;
|
916
922
|
}
|
917
923
|
var o = Qe.createElements(e, t, i);
|
918
|
-
return b.fillEmptyMessageElement(o.bubbleElement, t), le.apply(e, o.outerContainer),
|
924
|
+
return b.fillEmptyMessageElement(o.bubbleElement, t), le.apply(e, o.outerContainer), Se.flagHTMLUpdateClass(o.bubbleElement), e.applyCustomStyles(o, i, !1, (a = e.messageStyles) == null ? void 0 : a.html), Qe.addElement(e, o.outerContainer), o;
|
919
925
|
}
|
920
926
|
}]);
|
921
927
|
return Qe;
|
@@ -967,17 +973,17 @@ function Ne(s) {
|
|
967
973
|
}
|
968
974
|
var Bs = /[&<>"]/,
|
969
975
|
zs = /[&<>"]/g,
|
970
|
-
|
976
|
+
qs = {
|
971
977
|
"&": "&",
|
972
978
|
"<": "<",
|
973
979
|
">": ">",
|
974
980
|
'"': """
|
975
981
|
};
|
976
|
-
function
|
977
|
-
return
|
982
|
+
function Us(s) {
|
983
|
+
return qs[s];
|
978
984
|
}
|
979
|
-
function
|
980
|
-
return Bs.test(s) ? s.replace(zs,
|
985
|
+
function q(s) {
|
986
|
+
return Bs.test(s) ? s.replace(zs, Us) : s;
|
981
987
|
}
|
982
988
|
var g = {};
|
983
989
|
g.blockquote_open = function () {
|
@@ -987,7 +993,7 @@ g.blockquote_close = function (s, e) {
|
|
987
993
|
return "</blockquote>" + De(s, e);
|
988
994
|
};
|
989
995
|
g.code = function (s, e) {
|
990
|
-
return s[e].block ? "<pre><code>" +
|
996
|
+
return s[e].block ? "<pre><code>" + q(s[e].content) + "</code></pre>" + De(s, e) : "<code>" + q(s[e].content) + "</code>";
|
991
997
|
};
|
992
998
|
g.fence = function (s, e, t, i, n) {
|
993
999
|
var r = s[e],
|
@@ -999,9 +1005,9 @@ g.fence = function (s, e, t, i, n) {
|
|
999
1005
|
u;
|
1000
1006
|
if (r.params) {
|
1001
1007
|
if (c = r.params.split(/\s+/g), d = c.join(" "), Os(n.rules.fence_custom, c[0])) return n.rules.fence_custom[c[0]](s, e, t, i, n);
|
1002
|
-
l =
|
1008
|
+
l = q(Ne(gt(d))), o = ' class="' + a + l + '"';
|
1003
1009
|
}
|
1004
|
-
return t.highlight ? u = t.highlight.apply(t.highlight, [r.content].concat(c)) ||
|
1010
|
+
return t.highlight ? u = t.highlight.apply(t.highlight, [r.content].concat(c)) || q(r.content) : u = q(r.content), "<pre><code" + o + ">" + u + "</code></pre>" + De(s, e);
|
1005
1011
|
};
|
1006
1012
|
g.fence_custom = {};
|
1007
1013
|
g.heading_open = function (s, e) {
|
@@ -1041,17 +1047,17 @@ g.paragraph_close = function (s, e) {
|
|
1041
1047
|
return (s[e].tight ? "" : "</p>") + (t ? De(s, e) : "");
|
1042
1048
|
};
|
1043
1049
|
g.link_open = function (s, e, t) {
|
1044
|
-
var i = s[e].title ? ' title="' +
|
1050
|
+
var i = s[e].title ? ' title="' + q(Ne(s[e].title)) + '"' : "",
|
1045
1051
|
n = t.linkTarget ? ' target="' + t.linkTarget + '"' : "";
|
1046
|
-
return '<a href="' +
|
1052
|
+
return '<a href="' + q(s[e].href) + '"' + i + n + ">";
|
1047
1053
|
};
|
1048
1054
|
g.link_close = function () {
|
1049
1055
|
return "</a>";
|
1050
1056
|
};
|
1051
1057
|
g.image = function (s, e, t) {
|
1052
|
-
var i = ' src="' +
|
1053
|
-
n = s[e].title ? ' title="' +
|
1054
|
-
r = ' alt="' + (s[e].alt ?
|
1058
|
+
var i = ' src="' + q(s[e].src) + '"',
|
1059
|
+
n = s[e].title ? ' title="' + q(Ne(s[e].title)) + '"' : "",
|
1060
|
+
r = ' alt="' + (s[e].alt ? q(Ne(gt(s[e].alt))) : "") + '"',
|
1055
1061
|
o = t.xhtmlOut ? " /" : "";
|
1056
1062
|
return "<img" + i + r + n + o + ">";
|
1057
1063
|
};
|
@@ -1124,10 +1130,10 @@ g.mark_close = function () {
|
|
1124
1130
|
return "</mark>";
|
1125
1131
|
};
|
1126
1132
|
g.sub = function (s, e) {
|
1127
|
-
return "<sub>" +
|
1133
|
+
return "<sub>" + q(s[e].content) + "</sub>";
|
1128
1134
|
};
|
1129
1135
|
g.sup = function (s, e) {
|
1130
|
-
return "<sup>" +
|
1136
|
+
return "<sup>" + q(s[e].content) + "</sup>";
|
1131
1137
|
};
|
1132
1138
|
g.hardbreak = function (s, e, t) {
|
1133
1139
|
return t.xhtmlOut ? "<br />\n" : "<br>\n";
|
@@ -1136,7 +1142,7 @@ g.softbreak = function (s, e, t) {
|
|
1136
1142
|
return t.breaks ? t.xhtmlOut ? "<br />\n" : "<br>\n" : "\n";
|
1137
1143
|
};
|
1138
1144
|
g.text = function (s, e) {
|
1139
|
-
return
|
1145
|
+
return q(s[e].content);
|
1140
1146
|
};
|
1141
1147
|
g.htmlblock = function (s, e) {
|
1142
1148
|
return s[e].content;
|
@@ -1145,7 +1151,7 @@ g.htmltag = function (s, e) {
|
|
1145
1151
|
return s[e].content;
|
1146
1152
|
};
|
1147
1153
|
g.abbr_open = function (s, e) {
|
1148
|
-
return '<abbr title="' +
|
1154
|
+
return '<abbr title="' + q(Ne(s[e].title)) + '">';
|
1149
1155
|
};
|
1150
1156
|
g.abbr_close = function () {
|
1151
1157
|
return "</abbr>";
|
@@ -1451,8 +1457,8 @@ function Ks(s) {
|
|
1451
1457
|
d = 0,
|
1452
1458
|
u = !1,
|
1453
1459
|
h = {};
|
1454
|
-
if (s.env.footnotes && (s.tokens = s.tokens.filter(function (
|
1455
|
-
return
|
1460
|
+
if (s.env.footnotes && (s.tokens = s.tokens.filter(function (f) {
|
1461
|
+
return f.type === "footnote_reference_open" ? (u = !0, l = [], c = f.label, !1) : f.type === "footnote_reference_close" ? (u = !1, h[":" + c] = l, !1) : (u && l.push(f), !u);
|
1456
1462
|
}), !!s.env.footnotes.list)) {
|
1457
1463
|
for (o = s.env.footnotes.list, s.tokens.push({
|
1458
1464
|
type: "footnote_block_open",
|
@@ -1509,14 +1515,14 @@ function Ys(s) {
|
|
1509
1515
|
d,
|
1510
1516
|
u,
|
1511
1517
|
h,
|
1512
|
-
|
1518
|
+
f = s.tokens;
|
1513
1519
|
if (s.env.abbreviations) {
|
1514
1520
|
for (s.env.abbrRegExp || (h = "(^|[" + hn.split("").map(Mi).join("") + "])(" + Object.keys(s.env.abbreviations).map(function (m) {
|
1515
1521
|
return m.substr(1);
|
1516
|
-
}).sort(function (m,
|
1517
|
-
return
|
1518
|
-
}).map(Mi).join("|") + ")($|[" + hn.split("").map(Mi).join("") + "])", s.env.abbrRegExp = new RegExp(h, "g")), d = s.env.abbrRegExp, t = 0, i =
|
1519
|
-
for (n =
|
1522
|
+
}).sort(function (m, p) {
|
1523
|
+
return p.length - m.length;
|
1524
|
+
}).map(Mi).join("|") + ")($|[" + hn.split("").map(Mi).join("") + "])", s.env.abbrRegExp = new RegExp(h, "g")), d = s.env.abbrRegExp, t = 0, i = f.length; t < i; t++) if (f[t].type === "inline") {
|
1525
|
+
for (n = f[t].children, e = n.length - 1; e >= 0; e--) if (r = n[e], r.type === "text") {
|
1520
1526
|
for (l = 0, o = r.content, d.lastIndex = 0, c = r.level, a = []; u = d.exec(o);) d.lastIndex > l && a.push({
|
1521
1527
|
type: "text",
|
1522
1528
|
content: o.slice(l, u.index + u[1].length),
|
@@ -1537,7 +1543,7 @@ function Ys(s) {
|
|
1537
1543
|
type: "text",
|
1538
1544
|
content: o.slice(l),
|
1539
1545
|
level: c
|
1540
|
-
}),
|
1546
|
+
}), f[t].children = n = [].concat(n.slice(0, e), a, n.slice(e + 1)));
|
1541
1547
|
}
|
1542
1548
|
}
|
1543
1549
|
}
|
@@ -1562,9 +1568,9 @@ function tr(s) {
|
|
1562
1568
|
}
|
1563
1569
|
}
|
1564
1570
|
var ir = /['"]/,
|
1565
|
-
|
1571
|
+
fn = /['"]/g,
|
1566
1572
|
nr = /[-\s()\[\]]/,
|
1567
|
-
|
1573
|
+
pn = "’";
|
1568
1574
|
function mn(s, e) {
|
1569
1575
|
return e < 0 || e >= s.length ? !1 : !nr.test(s[e]);
|
1570
1576
|
}
|
@@ -1572,20 +1578,20 @@ function He(s, e, t) {
|
|
1572
1578
|
return s.substr(0, e) + t + s.substr(e + 1);
|
1573
1579
|
}
|
1574
1580
|
function sr(s) {
|
1575
|
-
var e, t, i, n, r, o, a, l, c, d, u, h,
|
1581
|
+
var e, t, i, n, r, o, a, l, c, d, u, h, f, m, p, x, S;
|
1576
1582
|
if (s.options.typographer) {
|
1577
|
-
for (S = [],
|
1578
|
-
for (
|
1579
|
-
for (a =
|
1580
|
-
S.length =
|
1581
|
-
e: for (; r < o && (
|
1583
|
+
for (S = [], p = s.tokens.length - 1; p >= 0; p--) if (s.tokens[p].type === "inline") {
|
1584
|
+
for (x = s.tokens[p].children, S.length = 0, e = 0; e < x.length; e++) if (t = x[e], !(t.type !== "text" || ir.test(t.text))) {
|
1585
|
+
for (a = x[e].level, f = S.length - 1; f >= 0 && !(S[f].level <= a); f--);
|
1586
|
+
S.length = f + 1, i = t.content, r = 0, o = i.length;
|
1587
|
+
e: for (; r < o && (fn.lastIndex = r, n = fn.exec(i), !!n);) {
|
1582
1588
|
if (l = !mn(i, n.index - 1), r = n.index + 1, m = n[0] === "'", c = !mn(i, r), !c && !l) {
|
1583
|
-
m && (t.content = He(t.content, n.index,
|
1589
|
+
m && (t.content = He(t.content, n.index, pn));
|
1584
1590
|
continue;
|
1585
1591
|
}
|
1586
1592
|
if (u = !c, h = !l, h) {
|
1587
|
-
for (
|
1588
|
-
d = S[
|
1593
|
+
for (f = S.length - 1; f >= 0 && (d = S[f], !(S[f].level < a)); f--) if (d.single === m && S[f].level === a) {
|
1594
|
+
d = S[f], m ? (x[d.token].content = He(x[d.token].content, d.pos, s.options.quotes[2]), t.content = He(t.content, n.index, s.options.quotes[3])) : (x[d.token].content = He(x[d.token].content, d.pos, s.options.quotes[0]), t.content = He(t.content, n.index, s.options.quotes[1])), S.length = f;
|
1589
1595
|
continue e;
|
1590
1596
|
}
|
1591
1597
|
}
|
@@ -1594,7 +1600,7 @@ function sr(s) {
|
|
1594
1600
|
pos: n.index,
|
1595
1601
|
single: m,
|
1596
1602
|
level: a
|
1597
|
-
}) : h && m && (t.content = He(t.content, n.index,
|
1603
|
+
}) : h && m && (t.content = He(t.content, n.index, pn));
|
1598
1604
|
}
|
1599
1605
|
}
|
1600
1606
|
}
|
@@ -1707,19 +1713,19 @@ function ar(s, e, t, i) {
|
|
1707
1713
|
d,
|
1708
1714
|
u,
|
1709
1715
|
h,
|
1710
|
-
|
1716
|
+
f,
|
1711
1717
|
m,
|
1712
|
-
|
1713
|
-
|
1714
|
-
if (
|
1718
|
+
p = s.bMarks[e] + s.tShift[e],
|
1719
|
+
x = s.eMarks[e];
|
1720
|
+
if (p > x || s.src.charCodeAt(p++) !== 62 || s.level >= s.options.maxNesting) return !1;
|
1715
1721
|
if (i) return !0;
|
1716
|
-
for (s.src.charCodeAt(
|
1717
|
-
if (s.src.charCodeAt(
|
1718
|
-
s.src.charCodeAt(
|
1722
|
+
for (s.src.charCodeAt(p) === 32 && p++, l = s.blkIndent, s.blkIndent = 0, a = [s.bMarks[e]], s.bMarks[e] = p, p = p < x ? s.skipSpaces(p) : p, r = p >= x, o = [s.tShift[e]], s.tShift[e] = p - s.bMarks[e], u = s.parser.ruler.getRules("blockquote"), n = e + 1; n < t && (p = s.bMarks[n] + s.tShift[n], x = s.eMarks[n], !(p >= x)); n++) {
|
1723
|
+
if (s.src.charCodeAt(p++) === 62) {
|
1724
|
+
s.src.charCodeAt(p) === 32 && p++, a.push(s.bMarks[n]), s.bMarks[n] = p, p = p < x ? s.skipSpaces(p) : p, r = p >= x, o.push(s.tShift[n]), s.tShift[n] = p - s.bMarks[n];
|
1719
1725
|
continue;
|
1720
1726
|
}
|
1721
1727
|
if (r) break;
|
1722
|
-
for (m = !1, h = 0,
|
1728
|
+
for (m = !1, h = 0, f = u.length; h < f; h++) if (u[h](s, n, t, !0)) {
|
1723
1729
|
m = !0;
|
1724
1730
|
break;
|
1725
1731
|
}
|
@@ -1787,10 +1793,10 @@ function dr(s, e, t, i) {
|
|
1787
1793
|
d,
|
1788
1794
|
u,
|
1789
1795
|
h,
|
1790
|
-
p,
|
1791
|
-
m,
|
1792
1796
|
f,
|
1793
|
-
|
1797
|
+
m,
|
1798
|
+
p,
|
1799
|
+
x,
|
1794
1800
|
S,
|
1795
1801
|
J,
|
1796
1802
|
X,
|
@@ -1801,10 +1807,10 @@ function dr(s, e, t, i) {
|
|
1801
1807
|
I,
|
1802
1808
|
Rt,
|
1803
1809
|
te;
|
1804
|
-
if ((u = bn(s, e)) >= 0)
|
1810
|
+
if ((u = bn(s, e)) >= 0) x = !0;else if ((u = gn(s, e)) >= 0) x = !1;else return !1;
|
1805
1811
|
if (s.level >= s.options.maxNesting) return !1;
|
1806
|
-
if (
|
1807
|
-
for (J = s.tokens.length,
|
1812
|
+
if (p = s.src.charCodeAt(u - 1), i) return !0;
|
1813
|
+
for (J = s.tokens.length, x ? (d = s.bMarks[e] + s.tShift[e], m = Number(s.src.substr(d, u - d - 1)), s.tokens.push({
|
1808
1814
|
type: "ordered_list_open",
|
1809
1815
|
order: m,
|
1810
1816
|
lines: O = [e, 0],
|
@@ -1813,7 +1819,7 @@ function dr(s, e, t, i) {
|
|
1813
1819
|
type: "bullet_list_open",
|
1814
1820
|
lines: O = [e, 0],
|
1815
1821
|
level: s.level++
|
1816
|
-
}), n = e, X = !1, ee = s.parser.ruler.getRules("list"); n < t && (S = s.skipSpaces(u), h = s.eMarks[n], S >= h ?
|
1822
|
+
}), n = e, X = !1, ee = s.parser.ruler.getRules("list"); n < t && (S = s.skipSpaces(u), h = s.eMarks[n], S >= h ? f = 1 : f = S - u, f > 4 && (f = 1), f < 1 && (f = 1), r = u - s.bMarks[n] + f, s.tokens.push({
|
1817
1823
|
type: "list_item_open",
|
1818
1824
|
lines: H = [e, 0],
|
1819
1825
|
level: s.level++
|
@@ -1826,13 +1832,13 @@ function dr(s, e, t, i) {
|
|
1826
1832
|
break;
|
1827
1833
|
}
|
1828
1834
|
if (te) break;
|
1829
|
-
if (
|
1835
|
+
if (x) {
|
1830
1836
|
if (u = bn(s, n), u < 0) break;
|
1831
1837
|
} else if (u = gn(s, n), u < 0) break;
|
1832
|
-
if (
|
1838
|
+
if (p !== s.src.charCodeAt(u - 1)) break;
|
1833
1839
|
}
|
1834
1840
|
return s.tokens.push({
|
1835
|
-
type:
|
1841
|
+
type: x ? "ordered_list_close" : "bullet_list_close",
|
1836
1842
|
level: --s.level
|
1837
1843
|
}), O[1] = n, s.line = n, Q && cr(s, J), !0;
|
1838
1844
|
}
|
@@ -1883,7 +1889,7 @@ function hr(s, e, t, i) {
|
|
1883
1889
|
level: s.level
|
1884
1890
|
})), !0);
|
1885
1891
|
}
|
1886
|
-
function
|
1892
|
+
function fr(s, e, t) {
|
1887
1893
|
var i,
|
1888
1894
|
n,
|
1889
1895
|
r,
|
@@ -1909,7 +1915,7 @@ var rs = {};
|
|
1909
1915
|
["article", "aside", "button", "blockquote", "body", "canvas", "caption", "col", "colgroup", "dd", "div", "dl", "dt", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "hr", "iframe", "li", "map", "object", "ol", "output", "p", "pre", "progress", "script", "section", "style", "table", "tbody", "td", "textarea", "tfoot", "th", "tr", "thead", "ul", "video"].forEach(function (s) {
|
1910
1916
|
rs[s] = !0;
|
1911
1917
|
});
|
1912
|
-
var
|
1918
|
+
var pr = /^<([a-zA-Z]{1,15})[\s\/>]/,
|
1913
1919
|
mr = /^<\/([a-zA-Z]{1,15})[\s>]/;
|
1914
1920
|
function gr(s) {
|
1915
1921
|
var e = s | 32;
|
@@ -1928,7 +1934,7 @@ function br(s, e, t, i) {
|
|
1928
1934
|
} else if (n === 47 || gr(n)) {
|
1929
1935
|
if (n === 47) {
|
1930
1936
|
if (r = s.src.slice(a, l).match(mr), !r) return !1;
|
1931
|
-
} else if (r = s.src.slice(a, l).match(
|
1937
|
+
} else if (r = s.src.slice(a, l).match(pr), !r) return !1;
|
1932
1938
|
if (rs[r[1].toLowerCase()] !== !0) return !1;
|
1933
1939
|
if (i) return !0;
|
1934
1940
|
} else return !1;
|
@@ -1946,7 +1952,7 @@ function Ci(s, e) {
|
|
1946
1952
|
return s.src.substr(t, i - t);
|
1947
1953
|
}
|
1948
1954
|
function vr(s, e, t, i) {
|
1949
|
-
var n, r, o, a, l, c, d, u, h,
|
1955
|
+
var n, r, o, a, l, c, d, u, h, f, m;
|
1950
1956
|
if (e + 2 > t || (l = e + 1, s.tShift[l] < s.blkIndent) || (o = s.bMarks[l] + s.tShift[l], o >= s.eMarks[l]) || (n = s.src.charCodeAt(o), n !== 124 && n !== 45 && n !== 58) || (r = Ci(s, e + 1), !/^[-:| ]+$/.test(r)) || (c = r.split("|"), c <= 2)) return !1;
|
1951
1957
|
for (u = [], a = 0; a < c.length; a++) {
|
1952
1958
|
if (h = c[a].trim(), !h) {
|
@@ -1960,7 +1966,7 @@ function vr(s, e, t, i) {
|
|
1960
1966
|
if (i) return !0;
|
1961
1967
|
for (s.tokens.push({
|
1962
1968
|
type: "table_open",
|
1963
|
-
lines:
|
1969
|
+
lines: f = [e, 0],
|
1964
1970
|
level: s.level++
|
1965
1971
|
}), s.tokens.push({
|
1966
1972
|
type: "thead_open",
|
@@ -2023,7 +2029,7 @@ function vr(s, e, t, i) {
|
|
2023
2029
|
}), s.tokens.push({
|
2024
2030
|
type: "table_close",
|
2025
2031
|
level: --s.level
|
2026
|
-
}),
|
2032
|
+
}), f[1] = m[1] = l, s.line = l, !0;
|
2027
2033
|
}
|
2028
2034
|
function Ot(s, e) {
|
2029
2035
|
var t,
|
@@ -2039,7 +2045,7 @@ function yr(s, e) {
|
|
2039
2045
|
for (t = e + 2, i = s.tokens.length - 2; t < i; t++) s.tokens[t].level === n && s.tokens[t].type === "paragraph_open" && (s.tokens[t + 2].tight = !0, s.tokens[t].tight = !0, t += 2);
|
2040
2046
|
}
|
2041
2047
|
function xr(s, e, t, i) {
|
2042
|
-
var n, r, o, a, l, c, d, u, h,
|
2048
|
+
var n, r, o, a, l, c, d, u, h, f, m, p, x, S;
|
2043
2049
|
if (i) return s.ddIndent < 0 ? !1 : Ot(s, e) >= 0;
|
2044
2050
|
if (d = e + 1, s.isEmpty(d) && ++d > t || s.tShift[d] < s.blkIndent || (n = Ot(s, d), n < 0) || s.level >= s.options.maxNesting) return !1;
|
2045
2051
|
c = s.tokens.length, s.tokens.push({
|
@@ -2048,7 +2054,7 @@ function xr(s, e, t, i) {
|
|
2048
2054
|
level: s.level++
|
2049
2055
|
}), o = e, r = d;
|
2050
2056
|
e: for (;;) {
|
2051
|
-
for (S = !0,
|
2057
|
+
for (S = !0, x = !1, s.tokens.push({
|
2052
2058
|
type: "dt_open",
|
2053
2059
|
lines: [o, o],
|
2054
2060
|
level: s.level++
|
@@ -2066,7 +2072,7 @@ function xr(s, e, t, i) {
|
|
2066
2072
|
type: "dd_open",
|
2067
2073
|
lines: a = [d, 0],
|
2068
2074
|
level: s.level++
|
2069
|
-
}),
|
2075
|
+
}), p = s.tight, h = s.ddIndent, u = s.blkIndent, m = s.tShift[r], f = s.parentType, s.blkIndent = s.ddIndent = s.tShift[r] + 2, s.tShift[r] = n - s.bMarks[r], s.tight = !0, s.parentType = "deflist", s.parser.tokenize(s, r, t, !0), (!s.tight || x) && (S = !1), x = s.line - r > 1 && s.isEmpty(s.line - 1), s.tShift[r] = m, s.tight = p, s.parentType = f, s.blkIndent = u, s.ddIndent = h, s.tokens.push({
|
2070
2076
|
type: "dd_close",
|
2071
2077
|
level: --s.level
|
2072
2078
|
}), a[1] = d = s.line, d >= t || s.tShift[d] < s.blkIndent) break e;
|
@@ -2114,7 +2120,7 @@ function Er(s, e) {
|
|
2114
2120
|
level: s.level
|
2115
2121
|
})), !0;
|
2116
2122
|
}
|
2117
|
-
var Pt = [["code", rr], ["fences", or, ["paragraph", "blockquote", "list"]], ["blockquote", ar, ["paragraph", "blockquote", "list"]], ["hr", lr, ["paragraph", "blockquote", "list"]], ["list", dr, ["paragraph", "blockquote"]], ["footnote", ur, ["paragraph"]], ["heading", hr, ["paragraph", "blockquote"]], ["lheading",
|
2123
|
+
var Pt = [["code", rr], ["fences", or, ["paragraph", "blockquote", "list"]], ["blockquote", ar, ["paragraph", "blockquote", "list"]], ["hr", lr, ["paragraph", "blockquote", "list"]], ["list", dr, ["paragraph", "blockquote"]], ["footnote", ur, ["paragraph"]], ["heading", hr, ["paragraph", "blockquote"]], ["lheading", fr], ["htmlblock", br, ["paragraph", "blockquote"]], ["table", vr, ["paragraph"]], ["deflist", xr, ["paragraph"]], ["paragraph", Er]];
|
2118
2124
|
function Ji() {
|
2119
2125
|
this.ruler = new W();
|
2120
2126
|
for (var s = 0; s < Pt.length; s++) this.ruler.push(Pt[s][0], Pt[s][1], {
|
@@ -2444,20 +2450,20 @@ function Fr(s, e) {
|
|
2444
2450
|
d = !1,
|
2445
2451
|
u = s.pos,
|
2446
2452
|
h = s.posMax,
|
2447
|
-
|
2448
|
-
m = s.src.charCodeAt(
|
2449
|
-
if (m === 33 && (d = !0, m = s.src.charCodeAt(++
|
2453
|
+
f = s.pos,
|
2454
|
+
m = s.src.charCodeAt(f);
|
2455
|
+
if (m === 33 && (d = !0, m = s.src.charCodeAt(++f)), m !== 91 || s.level >= s.options.maxNesting || (t = f + 1, i = bt(s, f), i < 0)) return !1;
|
2450
2456
|
if (a = i + 1, a < h && s.src.charCodeAt(a) === 40) {
|
2451
2457
|
for (a++; a < h && (c = s.src.charCodeAt(a), !(c !== 32 && c !== 10)); a++);
|
2452
2458
|
if (a >= h) return !1;
|
2453
|
-
for (
|
2454
|
-
if (a < h &&
|
2459
|
+
for (f = a, ts(s, a) ? (r = s.linkContent, a = s.pos) : r = "", f = a; a < h && (c = s.src.charCodeAt(a), !(c !== 32 && c !== 10)); a++);
|
2460
|
+
if (a < h && f !== a && is(s, a)) for (o = s.linkContent, a = s.pos; a < h && (c = s.src.charCodeAt(a), !(c !== 32 && c !== 10)); a++);else o = "";
|
2455
2461
|
if (a >= h || s.src.charCodeAt(a) !== 41) return s.pos = u, !1;
|
2456
2462
|
a++;
|
2457
2463
|
} else {
|
2458
2464
|
if (s.linkLevel > 0) return !1;
|
2459
2465
|
for (; a < h && (c = s.src.charCodeAt(a), !(c !== 32 && c !== 10)); a++);
|
2460
|
-
if (a < h && s.src.charCodeAt(a) === 91 && (
|
2466
|
+
if (a < h && s.src.charCodeAt(a) === 91 && (f = a + 1, a = bt(s, a), a >= 0 ? n = s.src.slice(f, a++) : a = f - 1), n || (_typeof(n) > "u" && (a = i + 1), n = s.src.slice(t, i)), l = s.env.references[ns(n)], !l) return s.pos = u, !1;
|
2461
2467
|
r = l.href, o = l.title;
|
2462
2468
|
}
|
2463
2469
|
return e || (s.pos = t, s.posMax = i, d ? s.push({
|
@@ -2513,8 +2519,8 @@ function zr(s, e) {
|
|
2513
2519
|
level: s.level
|
2514
2520
|
})), s.pos = i, s.posMax = o, !0);
|
2515
2521
|
}
|
2516
|
-
var
|
2517
|
-
|
2522
|
+
var qr = ["coap", "doi", "javascript", "aaa", "aaas", "about", "acap", "cap", "cid", "crid", "data", "dav", "dict", "dns", "file", "ftp", "geo", "go", "gopher", "h323", "http", "https", "iax", "icap", "im", "imap", "info", "ipp", "iris", "iris.beep", "iris.xpc", "iris.xpcs", "iris.lwz", "ldap", "mailto", "mid", "msrp", "msrps", "mtqp", "mupdate", "news", "nfs", "ni", "nih", "nntp", "opaquelocktoken", "pop", "pres", "rtsp", "service", "session", "shttp", "sieve", "sip", "sips", "sms", "snmp", "soap.beep", "soap.beeps", "tag", "tel", "telnet", "tftp", "thismessage", "tn3270", "tip", "tv", "urn", "vemmi", "ws", "wss", "xcon", "xcon-userid", "xmlrpc.beep", "xmlrpc.beeps", "xmpp", "z39.50r", "z39.50s", "adiumxtra", "afp", "afs", "aim", "apt", "attachment", "aw", "beshare", "bitcoin", "bolo", "callto", "chrome", "chrome-extension", "com-eventbrite-attendee", "content", "cvs", "dlna-playsingle", "dlna-playcontainer", "dtn", "dvb", "ed2k", "facetime", "feed", "finger", "fish", "gg", "git", "gizmoproject", "gtalk", "hcp", "icon", "ipn", "irc", "irc6", "ircs", "itms", "jar", "jms", "keyparc", "lastfm", "ldaps", "magnet", "maps", "market", "message", "mms", "ms-help", "msnim", "mumble", "mvn", "notes", "oid", "palm", "paparazzi", "platform", "proxy", "psyc", "query", "res", "resource", "rmi", "rsync", "rtmp", "secondlife", "sftp", "sgn", "skype", "smb", "soldat", "spotify", "ssh", "steam", "svn", "teamspeak", "things", "udp", "unreal", "ut2004", "ventrilo", "view-source", "webcal", "wtai", "wyciwyg", "xfire", "xri", "ymsgr"],
|
2523
|
+
Ur = /^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,
|
2518
2524
|
Hr = /^<([a-zA-Z.\-]{1,25}):([^<>\x00-\x20]*)>/;
|
2519
2525
|
function Gr(s, e) {
|
2520
2526
|
var t,
|
@@ -2523,7 +2529,7 @@ function Gr(s, e) {
|
|
2523
2529
|
r,
|
2524
2530
|
o,
|
2525
2531
|
a = s.pos;
|
2526
|
-
return s.src.charCodeAt(a) !== 60 || (t = s.src.slice(a), t.indexOf(">") < 0) ? !1 : (i = t.match(Hr), i ?
|
2532
|
+
return s.src.charCodeAt(a) !== 60 || (t = s.src.slice(a), t.indexOf(">") < 0) ? !1 : (i = t.match(Hr), i ? qr.indexOf(i[1].toLowerCase()) < 0 || (r = i[0].slice(1, -1), o = ji(r), !s.parser.validateLink(r)) ? !1 : (e || (s.push({
|
2527
2533
|
type: "link_open",
|
2528
2534
|
href: o,
|
2529
2535
|
level: s.level
|
@@ -2534,7 +2540,7 @@ function Gr(s, e) {
|
|
2534
2540
|
}), s.push({
|
2535
2541
|
type: "link_close",
|
2536
2542
|
level: s.level
|
2537
|
-
})), s.pos += i[0].length, !0) : (n = t.match(
|
2543
|
+
})), s.pos += i[0].length, !0) : (n = t.match(Ur), n ? (r = n[0].slice(1, -1), o = ji("mailto:" + r), s.parser.validateLink(o) ? (e || (s.push({
|
2538
2544
|
type: "link_open",
|
2539
2545
|
href: o,
|
2540
2546
|
level: s.level
|
@@ -2712,7 +2718,7 @@ var uo = {
|
|
2712
2718
|
inline: {}
|
2713
2719
|
}
|
2714
2720
|
},
|
2715
|
-
|
2721
|
+
fo = {
|
2716
2722
|
options: {
|
2717
2723
|
html: !0,
|
2718
2724
|
// Enable HTML tags in source
|
@@ -2750,42 +2756,42 @@ var uo = {
|
|
2750
2756
|
}
|
2751
2757
|
}
|
2752
2758
|
},
|
2753
|
-
|
2759
|
+
po = {
|
2754
2760
|
"default": uo,
|
2755
2761
|
full: ho,
|
2756
|
-
commonmark:
|
2762
|
+
commonmark: fo
|
2757
2763
|
};
|
2758
2764
|
function os(s, e, t) {
|
2759
2765
|
this.src = e, this.env = t, this.options = s.options, this.tokens = [], this.inlineMode = !1, this.inline = s.inline, this.block = s.block, this.renderer = s.renderer, this.typographer = s.typographer;
|
2760
2766
|
}
|
2761
|
-
function
|
2762
|
-
typeof s != "string" && (e = s, s = "default"), e && e.linkify != null && console.warn("linkify option is removed. Use linkify plugin instead:\n\nimport Remarkable from 'remarkable';\nimport linkify from 'remarkable/linkify';\nnew Remarkable().use(linkify)\n"), this.inline = new ri(), this.block = new Ji(), this.core = new ss(), this.renderer = new Wi(), this.ruler = new W(), this.options = {}, this.configure(
|
2767
|
+
function pe(s, e) {
|
2768
|
+
typeof s != "string" && (e = s, s = "default"), e && e.linkify != null && console.warn("linkify option is removed. Use linkify plugin instead:\n\nimport Remarkable from 'remarkable';\nimport linkify from 'remarkable/linkify';\nnew Remarkable().use(linkify)\n"), this.inline = new ri(), this.block = new Ji(), this.core = new ss(), this.renderer = new Wi(), this.ruler = new W(), this.options = {}, this.configure(po[s]), this.set(e || {});
|
2763
2769
|
}
|
2764
|
-
|
2770
|
+
pe.prototype.set = function (s) {
|
2765
2771
|
Xn(this.options, s);
|
2766
2772
|
};
|
2767
|
-
|
2773
|
+
pe.prototype.configure = function (s) {
|
2768
2774
|
var e = this;
|
2769
2775
|
if (!s) throw new Error("Wrong `remarkable` preset, check name/content");
|
2770
2776
|
s.options && e.set(s.options), s.components && Object.keys(s.components).forEach(function (t) {
|
2771
2777
|
s.components[t].rules && e[t].ruler.enable(s.components[t].rules, !0);
|
2772
2778
|
});
|
2773
2779
|
};
|
2774
|
-
|
2780
|
+
pe.prototype.use = function (s, e) {
|
2775
2781
|
return s(this, e), this;
|
2776
2782
|
};
|
2777
|
-
|
2783
|
+
pe.prototype.parse = function (s, e) {
|
2778
2784
|
var t = new os(this, s, e);
|
2779
2785
|
return this.core.process(t), t.tokens;
|
2780
2786
|
};
|
2781
|
-
|
2787
|
+
pe.prototype.render = function (s, e) {
|
2782
2788
|
return e = e || {}, this.renderer.render(this.parse(s, e), this.options, e);
|
2783
2789
|
};
|
2784
|
-
|
2790
|
+
pe.prototype.parseInline = function (s, e) {
|
2785
2791
|
var t = new os(this, s, e);
|
2786
2792
|
return t.inlineMode = !0, this.core.process(t), t.tokens;
|
2787
2793
|
};
|
2788
|
-
|
2794
|
+
pe.prototype.renderInline = function (s, e) {
|
2789
2795
|
return e = e || {}, this.renderer.render(this.parseInline(s, e), this.options, e);
|
2790
2796
|
};
|
2791
2797
|
var vt = /*#__PURE__*/function () {
|
@@ -2796,7 +2802,7 @@ var vt = /*#__PURE__*/function () {
|
|
2796
2802
|
key: "instantiate",
|
2797
2803
|
value: function instantiate() {
|
2798
2804
|
var e = window.hljs;
|
2799
|
-
return e ? new
|
2805
|
+
return e ? new pe({
|
2800
2806
|
highlight: function highlight(t, i) {
|
2801
2807
|
if (i && e.getLanguage(i)) try {
|
2802
2808
|
return e.highlight(i, t).value;
|
@@ -2822,7 +2828,7 @@ var vt = /*#__PURE__*/function () {
|
|
2822
2828
|
// set target to open in a new tab
|
2823
2829
|
typographer: !0
|
2824
2830
|
// Enable smartypants and other sweet transforms
|
2825
|
-
}) : new
|
2831
|
+
}) : new pe({
|
2826
2832
|
linkTarget: "_blank"
|
2827
2833
|
// set target to open in a new tab
|
2828
2834
|
});
|
@@ -3458,17 +3464,17 @@ function Eo(s, e) {
|
|
3458
3464
|
c = e.fetch,
|
3459
3465
|
d = yo(e, ["signal", "headers", "onopen", "onmessage", "onclose", "onerror", "openWhenHidden", "fetch"]);
|
3460
3466
|
return new Promise(function (u, h) {
|
3461
|
-
var
|
3462
|
-
|
3467
|
+
var f = Object.assign({}, i);
|
3468
|
+
f.accept || (f.accept = Fi);
|
3463
3469
|
var m;
|
3464
|
-
function
|
3470
|
+
function p() {
|
3465
3471
|
m.abort(), document.hidden || H();
|
3466
3472
|
}
|
3467
|
-
l || document.addEventListener("visibilitychange",
|
3468
|
-
var
|
3473
|
+
l || document.addEventListener("visibilitychange", p);
|
3474
|
+
var x = xo,
|
3469
3475
|
S = 0;
|
3470
3476
|
function J() {
|
3471
|
-
document.removeEventListener("visibilitychange",
|
3477
|
+
document.removeEventListener("visibilitychange", p), window.clearTimeout(S), m.abort();
|
3472
3478
|
}
|
3473
3479
|
t == null || t.addEventListener("abort", function () {
|
3474
3480
|
J(), u();
|
@@ -3488,7 +3494,7 @@ function Eo(s, e) {
|
|
3488
3494
|
_context3.prev = 1;
|
3489
3495
|
_context3.next = 4;
|
3490
3496
|
return X(s, Object.assign(Object.assign({}, d), {
|
3491
|
-
headers:
|
3497
|
+
headers: f,
|
3492
3498
|
signal: m.signal
|
3493
3499
|
}));
|
3494
3500
|
case 4:
|
@@ -3498,9 +3504,9 @@ function Eo(s, e) {
|
|
3498
3504
|
case 7:
|
3499
3505
|
_context3.next = 9;
|
3500
3506
|
return mo(ee.body, go(bo(function (I) {
|
3501
|
-
I ?
|
3507
|
+
I ? f[_n] = I : delete f[_n];
|
3502
3508
|
}, function (I) {
|
3503
|
-
|
3509
|
+
x = I;
|
3504
3510
|
}, r)));
|
3505
3511
|
case 9:
|
3506
3512
|
o == null || o();
|
@@ -3512,7 +3518,7 @@ function Eo(s, e) {
|
|
3512
3518
|
_context3.prev = 14;
|
3513
3519
|
_context3.t0 = _context3["catch"](1);
|
3514
3520
|
if (!m.signal.aborted) try {
|
3515
|
-
I = (Q = a == null ? void 0 : a(_context3.t0)) !== null && Q !== void 0 ? Q :
|
3521
|
+
I = (Q = a == null ? void 0 : a(_context3.t0)) !== null && Q !== void 0 ? Q : x;
|
3516
3522
|
window.clearTimeout(S), S = window.setTimeout(H, I);
|
3517
3523
|
} catch (I) {
|
3518
3524
|
J(), h(I);
|
@@ -3543,8 +3549,8 @@ var T = /*#__PURE__*/function () {
|
|
3543
3549
|
var _request = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(e, t, i) {
|
3544
3550
|
var n,
|
3545
3551
|
m,
|
3546
|
-
|
3547
|
-
|
3552
|
+
p,
|
3553
|
+
x,
|
3548
3554
|
S,
|
3549
3555
|
J,
|
3550
3556
|
X,
|
@@ -3558,7 +3564,7 @@ var T = /*#__PURE__*/function () {
|
|
3558
3564
|
d,
|
3559
3565
|
u,
|
3560
3566
|
h,
|
3561
|
-
|
3567
|
+
f,
|
3562
3568
|
_args6 = arguments;
|
3563
3569
|
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
3564
3570
|
while (1) switch (_context6.prev = _context6.next) {
|
@@ -3585,19 +3591,19 @@ var T = /*#__PURE__*/function () {
|
|
3585
3591
|
}
|
3586
3592
|
return _context6.abrupt("return", v.onInterceptorError(i, l, d));
|
3587
3593
|
case 14:
|
3588
|
-
if (!((
|
3594
|
+
if (!((p = e.requestSettings) != null && p.handler)) {
|
3589
3595
|
_context6.next = 16;
|
3590
3596
|
break;
|
3591
3597
|
}
|
3592
3598
|
return _context6.abrupt("return", he.stream(e, o, i));
|
3593
3599
|
case 16:
|
3594
|
-
if (!(((
|
3600
|
+
if (!(((x = e.requestSettings) == null ? void 0 : x.url) === Ee.URL)) {
|
3595
3601
|
_context6.next = 18;
|
3596
3602
|
break;
|
3597
3603
|
}
|
3598
3604
|
return _context6.abrupt("return", Ee.requestStream(i, e.streamHandlers));
|
3599
3605
|
case 18:
|
3600
|
-
h = new Oe(i),
|
3606
|
+
h = new Oe(i), f = v.fetch.bind(this, e, a, n);
|
3601
3607
|
Eo(((S = e.requestSettings) == null ? void 0 : S.url) || e.url || "", {
|
3602
3608
|
method: ((J = e.requestSettings) == null ? void 0 : J.method) || "POST",
|
3603
3609
|
headers: a,
|
@@ -3653,7 +3659,7 @@ var T = /*#__PURE__*/function () {
|
|
3653
3659
|
_context5.t0 = I;
|
3654
3660
|
case 7:
|
3655
3661
|
Rt = _context5.t0;
|
3656
|
-
(ee = e.extractResultData) == null || ee.call(e, Rt,
|
3662
|
+
(ee = e.extractResultData) == null || ee.call(e, Rt, f, o).then(function (te) {
|
3657
3663
|
e.asyncCallInProgress && te && te.text !== "" ? (T.simulate(i, e.streamHandlers, te), d(), e.asyncCallInProgress = !1) : T.upsertWFiles(i, h.upsertStreamedMessage.bind(h), h, te);
|
3658
3664
|
})["catch"](function (te) {
|
3659
3665
|
return v.displayError(i, te);
|
@@ -3803,7 +3809,7 @@ var cs = /*#__PURE__*/function () {
|
|
3803
3809
|
_context7.t0 = i;
|
3804
3810
|
case 5:
|
3805
3811
|
n = _context7.t0;
|
3806
|
-
n.error ? (t.addNewErrorMessage("service", n.error), e.completionsHandlers.onFinish()) : T.isSimulatable(e.
|
3812
|
+
n.error ? (t.addNewErrorMessage("service", n.error), e.completionsHandlers.onFinish()) : T.isSimulatable(e.stream, n) ? T.simulate(t, e.streamHandlers, n) : (t.addNewMessage(n), e.completionsHandlers.onFinish());
|
3807
3813
|
case 7:
|
3808
3814
|
case "end":
|
3809
3815
|
return _context7.stop();
|
@@ -3901,7 +3907,7 @@ var B = /*#__PURE__*/function () {
|
|
3901
3907
|
}
|
3902
3908
|
throw Error(A.INVALID_RESPONSE(l, "server", !!e.deepChat.responseInterceptor, c));
|
3903
3909
|
case 14:
|
3904
|
-
if (T.isSimulation(e.
|
3910
|
+
if (T.isSimulation(e.stream)) {
|
3905
3911
|
u = B.stream.bind(_this6, e, i, n), h = n[l.role || b.AI_ROLE];
|
3906
3912
|
T.upsertWFiles(i, u, h, d);
|
3907
3913
|
} else i.addNewMessage(d);
|
@@ -3921,7 +3927,7 @@ var B = /*#__PURE__*/function () {
|
|
3921
3927
|
return _ref2.apply(this, arguments);
|
3922
3928
|
};
|
3923
3929
|
}(), t.onclose = function () {
|
3924
|
-
console.error("Connection closed"), i.isLastMessageError() || i.addNewErrorMessage("service", "Connection error"), e.
|
3930
|
+
console.error("Connection closed"), i.isLastMessageError() || i.addNewErrorMessage("service", "Connection error"), e.stream && e.streamHandlers.abortStream.abort(), B.createConnection(e, i);
|
3925
3931
|
};
|
3926
3932
|
}
|
3927
3933
|
}, {
|
@@ -4005,7 +4011,7 @@ var B = /*#__PURE__*/function () {
|
|
4005
4011
|
key: "stream",
|
4006
4012
|
value: function stream(e, t, i, n) {
|
4007
4013
|
if (!n) return;
|
4008
|
-
var r = e.
|
4014
|
+
var r = e.stream.simulation;
|
4009
4015
|
if (typeof r == "string") {
|
4010
4016
|
var _i$o;
|
4011
4017
|
var o = n.role || b.AI_ROLE,
|
@@ -4053,7 +4059,7 @@ var he = /*#__PURE__*/function () {
|
|
4053
4059
|
_context10.t0 = c;
|
4054
4060
|
case 8:
|
4055
4061
|
d = _context10.t0;
|
4056
|
-
v.validateResponseFormat(d) ? typeof d.error == "string" ? (console.error(d.error), i.addNewErrorMessage("service", d.error), e.completionsHandlers.onFinish()) : T.isSimulatable(e.
|
4062
|
+
v.validateResponseFormat(d) ? typeof d.error == "string" ? (console.error(d.error), i.addNewErrorMessage("service", d.error), e.completionsHandlers.onFinish()) : T.isSimulatable(e.stream, d) ? T.simulate(i, e.streamHandlers, d) : (i.addNewMessage(d), e.completionsHandlers.onFinish()) : (console.error(A.INVALID_RESPONSE(c, "server", !!e.deepChat.responseInterceptor, d)), i.addNewErrorMessage("service", "Error in server message"), e.completionsHandlers.onFinish());
|
4057
4063
|
case 10:
|
4058
4064
|
case "end":
|
4059
4065
|
return _context10.stop();
|
@@ -4102,8 +4108,8 @@ var he = /*#__PURE__*/function () {
|
|
4102
4108
|
n && (he.attemptToFinaliseStream(o, i), e.streamHandlers.onClose(), n = !1);
|
4103
4109
|
},
|
4104
4110
|
c = /*#__PURE__*/function () {
|
4105
|
-
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(
|
4106
|
-
var
|
4111
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(f) {
|
4112
|
+
var p, x, m;
|
4107
4113
|
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
|
4108
4114
|
while (1) switch (_context12.prev = _context12.next) {
|
4109
4115
|
case 0:
|
@@ -4114,17 +4120,17 @@ var he = /*#__PURE__*/function () {
|
|
4114
4120
|
return _context12.abrupt("return");
|
4115
4121
|
case 2:
|
4116
4122
|
_context12.next = 4;
|
4117
|
-
return (
|
4123
|
+
return (x = (p = e.deepChat).responseInterceptor) == null ? void 0 : x.call(p, f);
|
4118
4124
|
case 4:
|
4119
4125
|
_context12.t0 = _context12.sent;
|
4120
4126
|
if (_context12.t0) {
|
4121
4127
|
_context12.next = 7;
|
4122
4128
|
break;
|
4123
4129
|
}
|
4124
|
-
_context12.t0 =
|
4130
|
+
_context12.t0 = f;
|
4125
4131
|
case 7:
|
4126
4132
|
m = _context12.t0;
|
4127
|
-
v.validateResponseFormat(m) ? m.error ? (console.error(m.error), o.finaliseStreamedMessage(), i.addNewErrorMessage("service", m.error), e.streamHandlers.onClose(), n = !1) : T.upsertWFiles(i, o.upsertStreamedMessage.bind(o), o, m) : console.error(A.INVALID_RESPONSE(
|
4133
|
+
v.validateResponseFormat(m) ? m.error ? (console.error(m.error), o.finaliseStreamedMessage(), i.addNewErrorMessage("service", m.error), e.streamHandlers.onClose(), n = !1) : T.upsertWFiles(i, o.upsertStreamedMessage.bind(o), o, m) : console.error(A.INVALID_RESPONSE(f, "server", !!e.deepChat.responseInterceptor, m));
|
4128
4134
|
case 9:
|
4129
4135
|
case "end":
|
4130
4136
|
return _context12.stop();
|
@@ -4168,7 +4174,7 @@ var he = /*#__PURE__*/function () {
|
|
4168
4174
|
},
|
4169
4175
|
o = /*#__PURE__*/function () {
|
4170
4176
|
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(d) {
|
4171
|
-
var h,
|
4177
|
+
var h, f, u, m, p;
|
4172
4178
|
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
|
4173
4179
|
while (1) switch (_context13.prev = _context13.next) {
|
4174
4180
|
case 0:
|
@@ -4179,7 +4185,7 @@ var he = /*#__PURE__*/function () {
|
|
4179
4185
|
return _context13.abrupt("return");
|
4180
4186
|
case 2:
|
4181
4187
|
_context13.next = 4;
|
4182
|
-
return (
|
4188
|
+
return (f = (h = e.deepChat).responseInterceptor) == null ? void 0 : f.call(h, d);
|
4183
4189
|
case 4:
|
4184
4190
|
_context13.t0 = _context13.sent;
|
4185
4191
|
if (_context13.t0) {
|
@@ -4189,9 +4195,9 @@ var he = /*#__PURE__*/function () {
|
|
4189
4195
|
_context13.t0 = d;
|
4190
4196
|
case 7:
|
4191
4197
|
u = _context13.t0;
|
4192
|
-
if (!v.validateResponseFormat(u)) console.error(A.INVALID_RESPONSE(d, "server", !!e.deepChat.responseInterceptor, u)), t.addNewErrorMessage("service", "Error in server message");else if (typeof u.error == "string") console.error(u.error), t.isLastMessageError() || t.addNewErrorMessage("service", u.error);else if (T.isSimulation(e.
|
4193
|
-
m = B.stream.bind(_this7, e, t, i.roleToStream),
|
4194
|
-
T.upsertWFiles(t, m,
|
4198
|
+
if (!v.validateResponseFormat(u)) console.error(A.INVALID_RESPONSE(d, "server", !!e.deepChat.responseInterceptor, u)), t.addNewErrorMessage("service", "Error in server message");else if (typeof u.error == "string") console.error(u.error), t.isLastMessageError() || t.addNewErrorMessage("service", u.error);else if (T.isSimulation(e.stream)) {
|
4199
|
+
m = B.stream.bind(_this7, e, t, i.roleToStream), p = i.roleToStream[d.role || b.AI_ROLE];
|
4200
|
+
T.upsertWFiles(t, m, p, d);
|
4195
4201
|
} else t.addNewMessage(u);
|
4196
4202
|
case 9:
|
4197
4203
|
case "end":
|
@@ -4239,7 +4245,7 @@ var w = /*#__PURE__*/function () {
|
|
4239
4245
|
var _request3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(e, t, i) {
|
4240
4246
|
var n,
|
4241
4247
|
h,
|
4242
|
-
|
4248
|
+
f,
|
4243
4249
|
m,
|
4244
4250
|
r,
|
4245
4251
|
_yield$v$processReque3,
|
@@ -4272,7 +4278,7 @@ var w = /*#__PURE__*/function () {
|
|
4272
4278
|
}
|
4273
4279
|
return _context15.abrupt("return", v.onInterceptorError(i, l, c));
|
4274
4280
|
case 11:
|
4275
|
-
if (!((
|
4281
|
+
if (!((f = e.requestSettings) != null && f.handler)) {
|
4276
4282
|
_context15.next = 13;
|
4277
4283
|
break;
|
4278
4284
|
}
|
@@ -4286,13 +4292,13 @@ var w = /*#__PURE__*/function () {
|
|
4286
4292
|
case 15:
|
4287
4293
|
d = !0;
|
4288
4294
|
u = v.fetch.bind(this, e, a, n);
|
4289
|
-
u(o).then(function (
|
4290
|
-
return d = !!
|
4291
|
-
}).then(function (
|
4292
|
-
return v.processResponseByType(
|
4295
|
+
u(o).then(function (p) {
|
4296
|
+
return d = !!p.ok, p;
|
4297
|
+
}).then(function (p) {
|
4298
|
+
return v.processResponseByType(p);
|
4293
4299
|
}).then( /*#__PURE__*/function () {
|
4294
|
-
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(
|
4295
|
-
var J, X,
|
4300
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(p) {
|
4301
|
+
var J, X, x, S;
|
4296
4302
|
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
|
4297
4303
|
while (1) switch (_context14.prev = _context14.next) {
|
4298
4304
|
case 0:
|
@@ -4303,33 +4309,33 @@ var w = /*#__PURE__*/function () {
|
|
4303
4309
|
return _context14.abrupt("return");
|
4304
4310
|
case 2:
|
4305
4311
|
_context14.next = 4;
|
4306
|
-
return (X = (J = e.deepChat).responseInterceptor) == null ? void 0 : X.call(J,
|
4312
|
+
return (X = (J = e.deepChat).responseInterceptor) == null ? void 0 : X.call(J, p);
|
4307
4313
|
case 4:
|
4308
4314
|
_context14.t0 = _context14.sent;
|
4309
4315
|
if (_context14.t0) {
|
4310
4316
|
_context14.next = 7;
|
4311
4317
|
break;
|
4312
4318
|
}
|
4313
|
-
_context14.t0 =
|
4319
|
+
_context14.t0 = p;
|
4314
4320
|
case 7:
|
4315
|
-
|
4321
|
+
x = _context14.t0;
|
4316
4322
|
_context14.next = 10;
|
4317
|
-
return e.extractResultData(
|
4323
|
+
return e.extractResultData(x, u, o);
|
4318
4324
|
case 10:
|
4319
4325
|
S = _context14.sent;
|
4320
4326
|
if (d) {
|
4321
4327
|
_context14.next = 13;
|
4322
4328
|
break;
|
4323
4329
|
}
|
4324
|
-
throw
|
4330
|
+
throw p;
|
4325
4331
|
case 13:
|
4326
4332
|
if (!(!S || _typeof(S) != "object")) {
|
4327
4333
|
_context14.next = 15;
|
4328
4334
|
break;
|
4329
4335
|
}
|
4330
|
-
throw Error(A.INVALID_RESPONSE(
|
4336
|
+
throw Error(A.INVALID_RESPONSE(p, "response", !!e.deepChat.responseInterceptor, x));
|
4331
4337
|
case 15:
|
4332
|
-
S.makingAnotherRequest || (T.isSimulatable(e.
|
4338
|
+
S.makingAnotherRequest || (T.isSimulatable(e.stream, S) ? T.simulate(i, e.streamHandlers, S) : (i.addNewMessage(S), c()));
|
4333
4339
|
case 16:
|
4334
4340
|
case "end":
|
4335
4341
|
return _context14.stop();
|
@@ -4339,8 +4345,8 @@ var w = /*#__PURE__*/function () {
|
|
4339
4345
|
return function (_x28) {
|
4340
4346
|
return _ref6.apply(this, arguments);
|
4341
4347
|
};
|
4342
|
-
}())["catch"](function (
|
4343
|
-
v.displayError(i,
|
4348
|
+
}())["catch"](function (p) {
|
4349
|
+
v.displayError(i, p), c();
|
4344
4350
|
});
|
4345
4351
|
case 18:
|
4346
4352
|
case "end":
|
@@ -4389,7 +4395,7 @@ var w = /*#__PURE__*/function () {
|
|
4389
4395
|
a = _context16.sent;
|
4390
4396
|
a.timeoutMS ? setTimeout(function () {
|
4391
4397
|
w.executePollRequest(e, t, i, n);
|
4392
|
-
}, a.timeoutMS) : T.isSimulatable(e.
|
4398
|
+
}, a.timeoutMS) : T.isSimulatable(e.stream, o) ? T.simulate(n, e.streamHandlers, a) : (n.addNewMessage(a), r());
|
4393
4399
|
case 13:
|
4394
4400
|
case "end":
|
4395
4401
|
return _context16.stop();
|
@@ -4409,9 +4415,9 @@ var w = /*#__PURE__*/function () {
|
|
4409
4415
|
value: function () {
|
4410
4416
|
var _poll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17(e, t, i) {
|
4411
4417
|
var n,
|
4412
|
-
p,
|
4413
|
-
m,
|
4414
4418
|
f,
|
4419
|
+
m,
|
4420
|
+
p,
|
4415
4421
|
r,
|
4416
4422
|
_yield$v$processReque4,
|
4417
4423
|
o,
|
@@ -4428,7 +4434,7 @@ var w = /*#__PURE__*/function () {
|
|
4428
4434
|
n = _args17.length > 3 && _args17[3] !== undefined ? _args17[3] : !0;
|
4429
4435
|
r = {
|
4430
4436
|
body: t,
|
4431
|
-
headers: (
|
4437
|
+
headers: (f = e.requestSettings) == null ? void 0 : f.headers
|
4432
4438
|
};
|
4433
4439
|
_context17.next = 4;
|
4434
4440
|
return v.processRequestInterceptor(e.deepChat, r);
|
@@ -4443,7 +4449,7 @@ var w = /*#__PURE__*/function () {
|
|
4443
4449
|
}
|
4444
4450
|
return _context17.abrupt("return", v.onInterceptorError(i, l));
|
4445
4451
|
case 10:
|
4446
|
-
c = ((m = e.requestSettings) == null ? void 0 : m.url) || e.url || "", d = ((
|
4452
|
+
c = ((m = e.requestSettings) == null ? void 0 : m.url) || e.url || "", d = ((p = e.requestSettings) == null ? void 0 : p.method) || "POST", u = n ? JSON.stringify(o) : o, h = {
|
4447
4453
|
method: d,
|
4448
4454
|
body: u,
|
4449
4455
|
headers: a
|
@@ -4628,8 +4634,8 @@ var Pe = /*#__PURE__*/function () {
|
|
4628
4634
|
function Pe(e, t, i) {
|
4629
4635
|
var _a$url;
|
4630
4636
|
_classCallCheck(this, Pe);
|
4631
|
-
var n, r, o, a;
|
4632
|
-
this.rawBody = {}, this.validateConfigKey = !1, this.canSendMessage = Pe.canSendMessage, this.requestSettings = {}, this.fileTypes = {}, this.completionsHandlers = {}, this.streamHandlers = {}, this.deepChat = e, this.demo = i, Object.assign(this.rawBody, (n = e.request) == null ? void 0 : n.additionalBodyProps), this.totalMessagesMaxCharLength = (r = e == null ? void 0 : e.requestBodyLimits) == null ? void 0 : r.totalMessagesMaxCharLength, this.maxMessages = (o = e == null ? void 0 : e.requestBodyLimits) == null ? void 0 : o.maxMessages, L.set(e, this, t), e.request && (this.requestSettings = e.request), this.demo && ((_a$url = (a = this.requestSettings).url) !== null && _a$url !== void 0 ? _a$url : a.url = Ee.URL), this.requestSettings.websocket && B.setup(this);
|
4637
|
+
var n, r, o, a, l;
|
4638
|
+
this.rawBody = {}, this.validateConfigKey = !1, this.canSendMessage = Pe.canSendMessage, this.requestSettings = {}, this.fileTypes = {}, this.completionsHandlers = {}, this.streamHandlers = {}, this.deepChat = e, this.demo = i, Object.assign(this.rawBody, (n = e.request) == null ? void 0 : n.additionalBodyProps), this.totalMessagesMaxCharLength = (r = e == null ? void 0 : e.requestBodyLimits) == null ? void 0 : r.totalMessagesMaxCharLength, this.maxMessages = (o = e == null ? void 0 : e.requestBodyLimits) == null ? void 0 : o.maxMessages, L.set(e, this, t), e.request && (this.requestSettings = e.request), this.demo && ((_a$url = (a = this.requestSettings).url) !== null && _a$url !== void 0 ? _a$url : a.url = Ee.URL), this.requestSettings.websocket && B.setup(this), this.stream = ((l = this.deepChat.request) == null ? void 0 : l.stream) || Se.checkForStream(this.deepChat);
|
4633
4639
|
}
|
4634
4640
|
_createClass(Pe, [{
|
4635
4641
|
key: "verifyKey",
|
@@ -4650,15 +4656,13 @@ var Pe = /*#__PURE__*/function () {
|
|
4650
4656
|
value: function () {
|
4651
4657
|
var _request4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(e, t) {
|
4652
4658
|
var i,
|
4653
|
-
n,
|
4654
4659
|
_args18 = arguments;
|
4655
4660
|
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
|
4656
4661
|
while (1) switch (_context18.prev = _context18.next) {
|
4657
4662
|
case 0:
|
4658
4663
|
i = _args18.length > 2 && _args18[2] !== undefined ? _args18[2] : !0;
|
4659
|
-
|
4660
|
-
|
4661
|
-
case 3:
|
4664
|
+
return _context18.abrupt("return", this.stream && !T.isSimulation(this.stream) ? T.request(this, e, t) : w.request(this, e, t, i));
|
4665
|
+
case 2:
|
4662
4666
|
case "end":
|
4663
4667
|
return _context18.stop();
|
4664
4668
|
}
|
@@ -4791,7 +4795,7 @@ var Pe = /*#__PURE__*/function () {
|
|
4791
4795
|
_context23.next = 4;
|
4792
4796
|
break;
|
4793
4797
|
}
|
4794
|
-
return _context23.abrupt("return",
|
4798
|
+
return _context23.abrupt("return", Se.handleResponseProperty(e));
|
4795
4799
|
case 4:
|
4796
4800
|
if (!v.validateResponseFormat(e)) {
|
4797
4801
|
_context23.next = 6;
|
@@ -4843,17 +4847,17 @@ var Pe = /*#__PURE__*/function () {
|
|
4843
4847
|
}]);
|
4844
4848
|
return Pe;
|
4845
4849
|
}();
|
4846
|
-
var
|
4847
|
-
_inherits(
|
4850
|
+
var U = /*#__PURE__*/function (_Pe) {
|
4851
|
+
_inherits(U, _Pe);
|
4848
4852
|
// prettier-ignore
|
4849
|
-
function
|
4853
|
+
function U(e, t, i, n, r) {
|
4850
4854
|
var _this8;
|
4851
|
-
_classCallCheck(this,
|
4855
|
+
_classCallCheck(this, U);
|
4852
4856
|
var o;
|
4853
|
-
_this8 = _callSuper(this,
|
4857
|
+
_this8 = _callSuper(this, U, [e, r]), _this8.insertKeyPlaceholderText = "API Key", _this8.keyHelpUrl = "", Object.assign(_this8.rawBody, (o = e.request) == null ? void 0 : o.additionalBodyProps), _this8.keyVerificationDetails = t, _this8.buildHeadersFunc = i, n && _this8.setApiKeyProperties(n), _this8.requestSettings = _this8.buildRequestSettings(_this8.key || "", e.request);
|
4854
4858
|
return _this8;
|
4855
4859
|
}
|
4856
|
-
_createClass(
|
4860
|
+
_createClass(U, [{
|
4857
4861
|
key: "setApiKeyProperties",
|
4858
4862
|
value: function setApiKeyProperties(e) {
|
4859
4863
|
this.key = e.key, e.validateKeyProperty && (this.validateConfigKey = e.validateKeyProperty);
|
@@ -4889,26 +4893,26 @@ var q = /*#__PURE__*/function (_Pe) {
|
|
4889
4893
|
return !0;
|
4890
4894
|
}
|
4891
4895
|
}]);
|
4892
|
-
return
|
4896
|
+
return U;
|
4893
4897
|
}(Pe);
|
4894
|
-
var
|
4895
|
-
function
|
4896
|
-
_classCallCheck(this,
|
4898
|
+
var qt = /*#__PURE__*/function () {
|
4899
|
+
function qt() {
|
4900
|
+
_classCallCheck(this, qt);
|
4897
4901
|
}
|
4898
|
-
_createClass(
|
4902
|
+
_createClass(qt, null, [{
|
4899
4903
|
key: "waitForPropertiesToBeUpdatedBeforeRender",
|
4900
4904
|
value: function waitForPropertiesToBeUpdatedBeforeRender(e) {
|
4901
4905
|
e._propUpdated_ = !1, setTimeout(function () {
|
4902
|
-
e._propUpdated_ ?
|
4906
|
+
e._propUpdated_ ? qt.waitForPropertiesToBeUpdatedBeforeRender(e) : (e._waitingToRender_ = !1, e.onRender());
|
4903
4907
|
});
|
4904
4908
|
}
|
4905
4909
|
}, {
|
4906
4910
|
key: "attemptRender",
|
4907
4911
|
value: function attemptRender(e) {
|
4908
|
-
e._propUpdated_ = !0, e._waitingToRender_ || (e._waitingToRender_ = !0,
|
4912
|
+
e._propUpdated_ = !0, e._waitingToRender_ || (e._waitingToRender_ = !0, qt.waitForPropertiesToBeUpdatedBeforeRender(e));
|
4909
4913
|
}
|
4910
4914
|
}]);
|
4911
|
-
return
|
4915
|
+
return qt;
|
4912
4916
|
}();
|
4913
4917
|
var Yi = /*#__PURE__*/function (_HTMLElement) {
|
4914
4918
|
_inherits(Je, _HTMLElement);
|
@@ -4933,7 +4937,7 @@ var Yi = /*#__PURE__*/function (_HTMLElement) {
|
|
4933
4937
|
return i;
|
4934
4938
|
},
|
4935
4939
|
set: function set(o) {
|
4936
|
-
i = o, t ? this[e] = o :
|
4940
|
+
i = o, t ? this[e] = o : qt.attemptRender(this);
|
4937
4941
|
}
|
4938
4942
|
});
|
4939
4943
|
}
|
@@ -5336,7 +5340,7 @@ var wn = {
|
|
5336
5340
|
var _this10;
|
5337
5341
|
_classCallCheck(this, M);
|
5338
5342
|
var t, i;
|
5339
|
-
_this10 = _callSuper(this, M, [e]), _this10._isModelLoaded = !1, _this10._isModelLoading = !1, _this10._loadOnFirstMessage = !1, _this10._webModel = {}, _this10.permittedErrorPrefixes = [M.MULTIPLE_MODELS_ERROR, M.WEB_LLM_NOT_FOUND_ERROR, M.GENERIC_ERROR], _this10._conversationHistory = [], _typeof(e.webModel) == "object" && (_this10._webModel = e.webModel), (t = _this10._webModel.load) != null && t.clearCache && M.clearAllCache(), _this10.findModelInWindow(e), _this10.canSendMessage = _this10.canSubmit.bind(_assertThisInitialized(_this10)), _this10._chatEl = (i = e.shadowRoot) == null ? void 0 : i.children[0], e.
|
5343
|
+
_this10 = _callSuper(this, M, [e]), _this10._isModelLoaded = !1, _this10._isModelLoading = !1, _this10._loadOnFirstMessage = !1, _this10._webModel = {}, _this10.permittedErrorPrefixes = [M.MULTIPLE_MODELS_ERROR, M.WEB_LLM_NOT_FOUND_ERROR, M.GENERIC_ERROR], _this10._conversationHistory = [], _typeof(e.webModel) == "object" && (_this10._webModel = e.webModel), (t = _this10._webModel.load) != null && t.clearCache && M.clearAllCache(), _this10.findModelInWindow(e), _this10.canSendMessage = _this10.canSubmit.bind(_assertThisInitialized(_this10)), _this10._chatEl = (i = e.shadowRoot) == null ? void 0 : i.children[0], e.history && M.setUpHistory(_this10._conversationHistory, e.history);
|
5340
5344
|
return _this10;
|
5341
5345
|
}
|
5342
5346
|
// need ref of messages object as web model exhibits unique behaviour to manipulate chat
|
@@ -5489,32 +5493,32 @@ var wn = {
|
|
5489
5493
|
value: function () {
|
5490
5494
|
var _loadModel = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee26(e, t) {
|
5491
5495
|
var _this14 = this;
|
5492
|
-
var o, a, l, c, d, u, h, i, n, r, _this$getConfig,
|
5496
|
+
var o, a, l, c, d, u, h, i, n, r, _this$getConfig, f, m, p, _f;
|
5493
5497
|
return _regeneratorRuntime().wrap(function _callee26$(_context26) {
|
5494
5498
|
while (1) switch (_context26.prev = _context26.next) {
|
5495
5499
|
case 0:
|
5496
5500
|
this.scrollToTop(), M.chat = e, this._isModelLoading = !0;
|
5497
5501
|
i = ((o = this._webModel.introMessage) == null ? void 0 : o.displayed) === !1;
|
5498
|
-
n = function n(
|
5502
|
+
n = function n(f) {
|
5499
5503
|
var m;
|
5500
5504
|
(m = _this14._messages) == null || m.addNewMessage({
|
5501
|
-
html: "<div>".concat(
|
5505
|
+
html: "<div>".concat(f.text, "</div>"),
|
5502
5506
|
overwrite: !0,
|
5503
5507
|
sendUpdate: !1
|
5504
5508
|
}), i && (setTimeout(function () {
|
5505
|
-
var
|
5506
|
-
return G.scrollToBottom((
|
5509
|
+
var p;
|
5510
|
+
return G.scrollToBottom((p = _this14._messages) == null ? void 0 : p.elementRef);
|
5507
5511
|
}), i = !1);
|
5508
5512
|
};
|
5509
5513
|
M.chat.setInitProgressCallback(n);
|
5510
5514
|
_context26.prev = 4;
|
5511
|
-
_this$getConfig = this.getConfig(),
|
5512
|
-
this._webModel.instruction && (
|
5515
|
+
_this$getConfig = this.getConfig(), f = _this$getConfig.model, m = _this$getConfig.appConfig, p = {};
|
5516
|
+
this._webModel.instruction && (p.conv_config = {
|
5513
5517
|
system: this._webModel.instruction
|
5514
5518
|
});
|
5515
|
-
this._conversationHistory.length > 0 && (
|
5519
|
+
this._conversationHistory.length > 0 && (p.conversation_history = this._conversationHistory);
|
5516
5520
|
_context26.next = 10;
|
5517
|
-
return M.chat.reload(
|
5521
|
+
return M.chat.reload(f, p, m, t);
|
5518
5522
|
case 10:
|
5519
5523
|
r = _context26.sent;
|
5520
5524
|
_context26.next = 16;
|
@@ -5525,9 +5529,9 @@ var wn = {
|
|
5525
5529
|
return _context26.abrupt("return", this.unloadChat(_context26.t0));
|
5526
5530
|
case 16:
|
5527
5531
|
if ((l = (a = this.deepChat)._validationHandler) == null || l.call(a), (c = this._webModel.introMessage) != null && c.removeAfterLoad) this._webModel.introMessage.displayed === !1 ? (u = this._messages) == null || u.removeLastMessage() : (h = this._removeIntro) == null || h.call(this);else {
|
5528
|
-
|
5532
|
+
_f = Sn.setUpAfterLoad(r, this._webModel.introMessage, this._chatEl, !!this._webModel.worker);
|
5529
5533
|
(d = this._messages) == null || d.addNewMessage({
|
5530
|
-
html:
|
5534
|
+
html: _f,
|
5531
5535
|
overwrite: !0,
|
5532
5536
|
sendUpdate: !1
|
5533
5537
|
});
|
@@ -5719,7 +5723,7 @@ var wn = {
|
|
5719
5723
|
_yield$v$processReque5 = _context32.sent;
|
5720
5724
|
r = _yield$v$processReque5.body;
|
5721
5725
|
o = _yield$v$processReque5.error;
|
5722
|
-
a = !!this.
|
5726
|
+
a = !!this.stream;
|
5723
5727
|
try {
|
5724
5728
|
if (o) v.displayError(e, new Error(o)), (a ? this.streamHandlers.onClose : this.completionsHandlers.onFinish)();else if (!r || !r.text) {
|
5725
5729
|
l = A.INVALID_MODEL_REQUEST({
|
@@ -5728,7 +5732,7 @@ var wn = {
|
|
5728
5732
|
console.error(l);
|
5729
5733
|
c = a ? this.streamHandlers.onClose : this.completionsHandlers.onFinish;
|
5730
5734
|
v.onInterceptorError(e, l, c);
|
5731
|
-
} else this.generateRespByType(e, r.text, !!this.
|
5735
|
+
} else this.generateRespByType(e, r.text, !!this.stream, i);
|
5732
5736
|
} catch (l) {
|
5733
5737
|
this.unloadChat(l);
|
5734
5738
|
}
|
@@ -5870,11 +5874,11 @@ it.WEB_LLM_NOT_FOUND_ERROR = "WebLLM module not found";
|
|
5870
5874
|
it.DEFAULT_MODEL = "Llama-2-7b-chat-hf-q4f32_1";
|
5871
5875
|
it.MODULE_SEARCH_LIMIT_S = 5;
|
5872
5876
|
var Zi = it;
|
5873
|
-
var
|
5874
|
-
function
|
5875
|
-
_classCallCheck(this,
|
5877
|
+
var Ut = /*#__PURE__*/function () {
|
5878
|
+
function Ut() {
|
5879
|
+
_classCallCheck(this, Ut);
|
5876
5880
|
}
|
5877
|
-
_createClass(
|
5881
|
+
_createClass(Ut, null, [{
|
5878
5882
|
key: "buildHeaders",
|
5879
5883
|
value: function buildHeaders(e) {
|
5880
5884
|
return {
|
@@ -5896,19 +5900,19 @@ var qt = /*#__PURE__*/function () {
|
|
5896
5900
|
return {
|
5897
5901
|
url: "https://api-inference.huggingface.co/models/gpt2",
|
5898
5902
|
method: "POST",
|
5899
|
-
handleVerificationResult:
|
5903
|
+
handleVerificationResult: Ut.handleVerificationResult
|
5900
5904
|
};
|
5901
5905
|
}
|
5902
5906
|
}]);
|
5903
|
-
return
|
5907
|
+
return Ut;
|
5904
5908
|
}();
|
5905
|
-
var us = /*#__PURE__*/function (
|
5906
|
-
_inherits(Bi,
|
5909
|
+
var us = /*#__PURE__*/function (_U) {
|
5910
|
+
_inherits(Bi, _U);
|
5907
5911
|
// prettier-ignore
|
5908
5912
|
function Bi(e, t, i, n, r, o) {
|
5909
5913
|
var _this16;
|
5910
5914
|
_classCallCheck(this, Bi);
|
5911
|
-
_this16 = _callSuper(this, Bi, [e,
|
5915
|
+
_this16 = _callSuper(this, Bi, [e, Ut.buildKeyVerificationDetails(), Ut.buildHeaders, r, o]), _this16.insertKeyPlaceholderText = "Hugging Face Token", _this16.keyHelpUrl = "https://huggingface.co/settings/tokens", _this16.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>", _this16.permittedErrorPrefixes = ["Authorization header"], _this16.url = "".concat(Bi.URL_PREFIX).concat(i), _this16.textInputPlaceholderText = t, _typeof(n) == "object" && (n.model && (_this16.url = "".concat(Bi.URL_PREFIX).concat(n.model)), n.options && (_this16.rawBody.options = n.options), n.parameters && (_this16.rawBody.parameters = n.parameters));
|
5912
5916
|
return _this16;
|
5913
5917
|
}
|
5914
5918
|
// prettier-ignore
|
@@ -5951,7 +5955,7 @@ var us = /*#__PURE__*/function (_q) {
|
|
5951
5955
|
}()
|
5952
5956
|
}]);
|
5953
5957
|
return Bi;
|
5954
|
-
}(
|
5958
|
+
}(U);
|
5955
5959
|
us.URL_PREFIX = "https://api-inference.huggingface.co/models/";
|
5956
5960
|
var Be = us;
|
5957
5961
|
var St = /*#__PURE__*/function (_Be) {
|
@@ -6140,8 +6144,8 @@ var ce = /*#__PURE__*/function () {
|
|
6140
6144
|
}]);
|
6141
6145
|
return ce;
|
6142
6146
|
}();
|
6143
|
-
var oi = /*#__PURE__*/function (
|
6144
|
-
_inherits(oi,
|
6147
|
+
var oi = /*#__PURE__*/function (_U2) {
|
6148
|
+
_inherits(oi, _U2);
|
6145
6149
|
// prettier-ignore
|
6146
6150
|
function oi(e, t, i, n, r) {
|
6147
6151
|
var _this18;
|
@@ -6150,7 +6154,7 @@ var oi = /*#__PURE__*/function (_q2) {
|
|
6150
6154
|
return _this18;
|
6151
6155
|
}
|
6152
6156
|
return _createClass(oi);
|
6153
|
-
}(
|
6157
|
+
}(U);
|
6154
6158
|
var Ht = /*#__PURE__*/function (_oi) {
|
6155
6159
|
_inherits(Ht, _oi);
|
6156
6160
|
function Ht(e) {
|
@@ -6949,8 +6953,8 @@ var Jt = /*#__PURE__*/function () {
|
|
6949
6953
|
}]);
|
6950
6954
|
return Jt;
|
6951
6955
|
}();
|
6952
|
-
var Xi = /*#__PURE__*/function (
|
6953
|
-
_inherits(Xi,
|
6956
|
+
var Xi = /*#__PURE__*/function (_U3) {
|
6957
|
+
_inherits(Xi, _U3);
|
6954
6958
|
function Xi(e, t, i, n, r) {
|
6955
6959
|
var _this26;
|
6956
6960
|
_classCallCheck(this, Xi);
|
@@ -6958,7 +6962,7 @@ var Xi = /*#__PURE__*/function (_q3) {
|
|
6958
6962
|
return _this26;
|
6959
6963
|
}
|
6960
6964
|
return _createClass(Xi);
|
6961
|
-
}(
|
6965
|
+
}(U);
|
6962
6966
|
var Do = /*#__PURE__*/function (_Xi) {
|
6963
6967
|
_inherits(Do, _Xi);
|
6964
6968
|
function Do(e) {
|
@@ -7178,8 +7182,8 @@ var N = /*#__PURE__*/function () {
|
|
7178
7182
|
}]);
|
7179
7183
|
return N;
|
7180
7184
|
}();
|
7181
|
-
var Qi = /*#__PURE__*/function (
|
7182
|
-
_inherits(zi,
|
7185
|
+
var Qi = /*#__PURE__*/function (_U4) {
|
7186
|
+
_inherits(zi, _U4);
|
7183
7187
|
function zi(e) {
|
7184
7188
|
var _o$model, _a$voice;
|
7185
7189
|
var _this27;
|
@@ -7273,30 +7277,30 @@ var Qi = /*#__PURE__*/function (_q4) {
|
|
7273
7277
|
}()
|
7274
7278
|
}]);
|
7275
7279
|
return zi;
|
7276
|
-
}(
|
7280
|
+
}(U);
|
7277
7281
|
Qi.DEFAULT_MODEL = "tts-1";
|
7278
7282
|
Qi.DEFAULT_VOIDE = "alloy";
|
7279
7283
|
var Fo = Qi;
|
7280
|
-
var ai = /*#__PURE__*/function (
|
7281
|
-
_inherits(
|
7282
|
-
function
|
7284
|
+
var ai = /*#__PURE__*/function (_U5) {
|
7285
|
+
_inherits(Te, _U5);
|
7286
|
+
function Te(e) {
|
7283
7287
|
var _o$model2;
|
7284
7288
|
var _this28;
|
7285
|
-
_classCallCheck(this,
|
7289
|
+
_classCallCheck(this, Te);
|
7286
7290
|
var r, o;
|
7287
7291
|
var t = JSON.parse(JSON.stringify(e.directConnection)),
|
7288
7292
|
i = t == null ? void 0 : t.openAI;
|
7289
|
-
_this28 = _callSuper(this,
|
7293
|
+
_this28 = _callSuper(this, Te, [e, N.buildKeyVerificationDetails(), N.buildHeaders, i, {
|
7290
7294
|
audio: {}
|
7291
|
-
}]), _this28.insertKeyPlaceholderText = "OpenAI API Key", _this28.keyHelpUrl = "https://platform.openai.com/account/api-keys", _this28.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>OpenAI : Speech To Text</b></div>\n <p><b>Upload an audio file</b> to transcribe it into text. You can optionally provide text to guide the audio\n processing.\n <p>Click <a href=\"https://platform.openai.com/docs/guides/speech-to-text\">here</a> for more info.</p>", _this28.url = "", _this28.permittedErrorPrefixes = ["Invalid"], _this28.textInputPlaceholderText = "Upload an audio file", _this28._service_url =
|
7295
|
+
}]), _this28.insertKeyPlaceholderText = "OpenAI API Key", _this28.keyHelpUrl = "https://platform.openai.com/account/api-keys", _this28.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>OpenAI : Speech To Text</b></div>\n <p><b>Upload an audio file</b> to transcribe it into text. You can optionally provide text to guide the audio\n processing.\n <p>Click <a href=\"https://platform.openai.com/docs/guides/speech-to-text\">here</a> for more info.</p>", _this28.url = "", _this28.permittedErrorPrefixes = ["Invalid"], _this28.textInputPlaceholderText = "Upload an audio file", _this28._service_url = Te.AUDIO_TRANSCRIPTIONS_URL;
|
7292
7296
|
var n = (r = t == null ? void 0 : t.openAI) == null ? void 0 : r.audio;
|
7293
|
-
_typeof(n) == "object" && (_this28.processConfig(n),
|
7297
|
+
_typeof(n) == "object" && (_this28.processConfig(n), Te.cleanConfig(n), Object.assign(_this28.rawBody, n)), (_o$model2 = (o = _this28.rawBody).model) !== null && _o$model2 !== void 0 ? _o$model2 : o.model = Te.DEFAULT_MODEL, _this28.rawBody.response_format = "json", _this28.canSendMessage = Te.canSendFileMessage;
|
7294
7298
|
return _this28;
|
7295
7299
|
}
|
7296
|
-
_createClass(
|
7300
|
+
_createClass(Te, [{
|
7297
7301
|
key: "processConfig",
|
7298
7302
|
value: function processConfig(e) {
|
7299
|
-
e != null && e.type && e.type === "translation" && (this._service_url =
|
7303
|
+
e != null && e.type && e.type === "translation" && (this._service_url = Te.AUDIO_TRANSLATIONS_URL, delete e.language);
|
7300
7304
|
}
|
7301
7305
|
}, {
|
7302
7306
|
key: "preprocessBody",
|
@@ -7328,7 +7332,7 @@ var ai = /*#__PURE__*/function (_q5) {
|
|
7328
7332
|
throw new Error("No file was added");
|
7329
7333
|
case 4:
|
7330
7334
|
this.url = this.requestSettings.url || this._service_url;
|
7331
|
-
n = this.preprocessBody(this.rawBody, t), r =
|
7335
|
+
n = this.preprocessBody(this.rawBody, t), r = Te.createFormDataBody(n, i[0]);
|
7332
7336
|
v.tempRemoveContentHeader(this.requestSettings, w.request.bind(this, this, r, e), !1);
|
7333
7337
|
case 7:
|
7334
7338
|
case "end":
|
@@ -7387,8 +7391,8 @@ var ai = /*#__PURE__*/function (_q5) {
|
|
7387
7391
|
}), i;
|
7388
7392
|
}
|
7389
7393
|
}]);
|
7390
|
-
return
|
7391
|
-
}(
|
7394
|
+
return Te;
|
7395
|
+
}(U);
|
7392
7396
|
ai.AUDIO_TRANSCRIPTIONS_URL = "https://api.openai.com/v1/audio/transcriptions";
|
7393
7397
|
ai.AUDIO_TRANSLATIONS_URL = "https://api.openai.com/v1/audio/translations";
|
7394
7398
|
ai.DEFAULT_MODEL = "whisper-1";
|
@@ -7495,8 +7499,8 @@ var Z = /*#__PURE__*/function () {
|
|
7495
7499
|
}]);
|
7496
7500
|
return Z;
|
7497
7501
|
}();
|
7498
|
-
var zo = /*#__PURE__*/function (
|
7499
|
-
_inherits(zo,
|
7502
|
+
var zo = /*#__PURE__*/function (_U6) {
|
7503
|
+
_inherits(zo, _U6);
|
7500
7504
|
// prettier-ignore
|
7501
7505
|
function zo(e, t, i, n, r) {
|
7502
7506
|
var _this29;
|
@@ -7507,20 +7511,20 @@ var zo = /*#__PURE__*/function (_q6) {
|
|
7507
7511
|
return _this29;
|
7508
7512
|
}
|
7509
7513
|
return _createClass(zo);
|
7510
|
-
}(
|
7511
|
-
var
|
7512
|
-
_inherits(
|
7513
|
-
function
|
7514
|
+
}(U);
|
7515
|
+
var qo = /*#__PURE__*/function (_zo) {
|
7516
|
+
_inherits(qo, _zo);
|
7517
|
+
function qo(e) {
|
7514
7518
|
var _a$language;
|
7515
7519
|
var _this30;
|
7516
|
-
_classCallCheck(this,
|
7520
|
+
_classCallCheck(this, qo);
|
7517
7521
|
var n, r, o, a;
|
7518
7522
|
var t = (r = (n = e.directConnection) == null ? void 0 : n.azure) == null ? void 0 : r.summarization,
|
7519
7523
|
i = (o = e.directConnection) == null ? void 0 : o.azure;
|
7520
|
-
_this30 = _callSuper(this,
|
7524
|
+
_this30 = _callSuper(this, qo, [e, Z.buildSummarizationHeader, t.endpoint, i]), _this30.url = "", _this30.textInputPlaceholderText = "Insert text to summarize", (_a$language = (a = _this30.rawBody).language) !== null && _a$language !== void 0 ? _a$language : a.language = "en", Object.assign(_this30.rawBody, t), _this30.url = "".concat(t.endpoint, "/language/analyze-text/jobs?api-version=2022-10-01-preview");
|
7521
7525
|
return _this30;
|
7522
7526
|
}
|
7523
|
-
_createClass(
|
7527
|
+
_createClass(qo, [{
|
7524
7528
|
key: "preprocessBody",
|
7525
7529
|
value: function preprocessBody(e, t) {
|
7526
7530
|
var i = t[t.length - 1].text;
|
@@ -7660,7 +7664,7 @@ var Uo = /*#__PURE__*/function (_zo) {
|
|
7660
7664
|
return extractPollResultData;
|
7661
7665
|
}()
|
7662
7666
|
}]);
|
7663
|
-
return
|
7667
|
+
return qo;
|
7664
7668
|
}(zo);
|
7665
7669
|
var ut = /*#__PURE__*/function () {
|
7666
7670
|
function ut() {
|
@@ -7768,8 +7772,8 @@ var ut = /*#__PURE__*/function () {
|
|
7768
7772
|
}]);
|
7769
7773
|
return ut;
|
7770
7774
|
}();
|
7771
|
-
var en = /*#__PURE__*/function (
|
7772
|
-
_inherits(en,
|
7775
|
+
var en = /*#__PURE__*/function (_U7) {
|
7776
|
+
_inherits(en, _U7);
|
7773
7777
|
function en(e) {
|
7774
7778
|
var _this31;
|
7775
7779
|
_classCallCheck(this, en);
|
@@ -7852,9 +7856,9 @@ var en = /*#__PURE__*/function (_q7) {
|
|
7852
7856
|
}
|
7853
7857
|
}]);
|
7854
7858
|
return en;
|
7855
|
-
}(
|
7856
|
-
var hs = /*#__PURE__*/function (
|
7857
|
-
_inherits(hs,
|
7859
|
+
}(U);
|
7860
|
+
var hs = /*#__PURE__*/function (_U8) {
|
7861
|
+
_inherits(hs, _U8);
|
7858
7862
|
// prettier-ignore
|
7859
7863
|
function hs(e, t, i, n, r) {
|
7860
7864
|
var _this32;
|
@@ -7865,21 +7869,21 @@ var hs = /*#__PURE__*/function (_q8) {
|
|
7865
7869
|
return _this32;
|
7866
7870
|
}
|
7867
7871
|
return _createClass(hs);
|
7868
|
-
}(
|
7869
|
-
var
|
7870
|
-
_inherits(
|
7872
|
+
}(U);
|
7873
|
+
var fs = /*#__PURE__*/function (_hs) {
|
7874
|
+
_inherits(ps, _hs);
|
7871
7875
|
// prettier-ignore
|
7872
|
-
function
|
7876
|
+
function ps(e) {
|
7873
7877
|
var _a$lang, _l$name, _c$gender;
|
7874
7878
|
var _this33;
|
7875
|
-
_classCallCheck(this,
|
7879
|
+
_classCallCheck(this, ps);
|
7876
7880
|
var n, r, o, a, l, c;
|
7877
7881
|
var t = (r = (n = e.directConnection) == null ? void 0 : n.azure) == null ? void 0 : r.textToSpeech,
|
7878
7882
|
i = (o = e.directConnection) == null ? void 0 : o.azure;
|
7879
|
-
_this33 = _callSuper(this,
|
7883
|
+
_this33 = _callSuper(this, ps, [e, Z.buildTextToSpeechHeaders.bind({}, (t == null ? void 0 : t.outputFormat) || "audio-16khz-128kbitrate-mono-mp3"), t.region, i]), _this33.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Azure Text To Speech</b></div>\n <p>Insert text to synthesize it to audio.\n <p>\n Click <a href=\"".concat(ps.HELP_LINK, "\">here</a> for more info.\n </p>"), _this33.url = "", Object.assign(_this33.rawBody, t), (_a$lang = (a = _this33.rawBody).lang) !== null && _a$lang !== void 0 ? _a$lang : a.lang = "en-US", (_l$name = (l = _this33.rawBody).name) !== null && _l$name !== void 0 ? _l$name : l.name = "en-US-JennyNeural", (_c$gender = (c = _this33.rawBody).gender) !== null && _c$gender !== void 0 ? _c$gender : c.gender = "Female", _this33.url = "https://".concat(t.region, ".tts.speech.microsoft.com/cognitiveservices/v1");
|
7880
7884
|
return _this33;
|
7881
7885
|
}
|
7882
|
-
_createClass(
|
7886
|
+
_createClass(ps, [{
|
7883
7887
|
key: "preprocessBody",
|
7884
7888
|
value: function preprocessBody(e, t) {
|
7885
7889
|
var i = t[t.length - 1].text;
|
@@ -7942,17 +7946,17 @@ var ps = /*#__PURE__*/function (_hs) {
|
|
7942
7946
|
return extractResultData;
|
7943
7947
|
}()
|
7944
7948
|
}]);
|
7945
|
-
return
|
7949
|
+
return ps;
|
7946
7950
|
}(hs);
|
7947
|
-
|
7951
|
+
fs.HELP_LINK =
|
7948
7952
|
// eslint-disable-next-line max-len
|
7949
7953
|
"https://learn.microsoft.com/en-GB/azure/cognitive-services/speech-service/get-started-text-to-speech?tabs=windows%2Cterminal&pivots=programming-language-rest";
|
7950
|
-
var
|
7954
|
+
var Uo = fs;
|
7951
7955
|
var ms = /*#__PURE__*/function (_hs2) {
|
7952
|
-
_inherits(
|
7953
|
-
function
|
7956
|
+
_inherits(qi, _hs2);
|
7957
|
+
function qi(e) {
|
7954
7958
|
var _this34;
|
7955
|
-
_classCallCheck(this,
|
7959
|
+
_classCallCheck(this, qi);
|
7956
7960
|
var o, a, l;
|
7957
7961
|
var t = (a = (o = e.directConnection) == null ? void 0 : o.azure) == null ? void 0 : a.speechToText,
|
7958
7962
|
i = (l = e.directConnection) == null ? void 0 : l.azure,
|
@@ -7963,12 +7967,12 @@ var ms = /*#__PURE__*/function (_hs2) {
|
|
7963
7967
|
}
|
7964
7968
|
}
|
7965
7969
|
};
|
7966
|
-
_this34 = _callSuper(this,
|
7970
|
+
_this34 = _callSuper(this, qi, [e, Z.buildSpeechToTextHeaders, t.region, i, n]), _this34.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Azure Speech To Text</b></div>\n <p><b>Upload a .wav or .ogg audio file</b> to transcribe it into text.\n <p>\n Click <a href=\"".concat(qi.HELP_LINK, "\">here</a> for more info.\n </p>"), _this34.url = "", _this34.isTextInputDisabled = !0, _this34.textInputPlaceholderText = "Upload an audio file", _this34.canSendMessage = qi.canFileSendMessage;
|
7967
7971
|
var r = t.lang || "en-US";
|
7968
7972
|
_this34.url = "https://".concat(t.region, ".stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?language=").concat(r, "&format=detailed"), _this34.recordAudio = void 0;
|
7969
7973
|
return _this34;
|
7970
7974
|
}
|
7971
|
-
_createClass(
|
7975
|
+
_createClass(qi, [{
|
7972
7976
|
key: "callServiceAPI",
|
7973
7977
|
value: function () {
|
7974
7978
|
var _callServiceAPI16 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee71(e, t, i) {
|
@@ -8033,14 +8037,14 @@ var ms = /*#__PURE__*/function (_hs2) {
|
|
8033
8037
|
return !!(t != null && t[0]);
|
8034
8038
|
}
|
8035
8039
|
}]);
|
8036
|
-
return
|
8040
|
+
return qi;
|
8037
8041
|
}(hs);
|
8038
8042
|
ms.HELP_LINK =
|
8039
8043
|
// eslint-disable-next-line max-len
|
8040
8044
|
"https://learn.microsoft.com/en-GB/azure/cognitive-services/speech-service/get-started-text-to-speech?tabs=windows%2Cterminal&pivots=programming-language-rest";
|
8041
8045
|
var Ho = ms;
|
8042
|
-
var Go = /*#__PURE__*/function (
|
8043
|
-
_inherits(Go,
|
8046
|
+
var Go = /*#__PURE__*/function (_U9) {
|
8047
|
+
_inherits(Go, _U9);
|
8044
8048
|
// prettier-ignore
|
8045
8049
|
function Go(e) {
|
8046
8050
|
var _this35;
|
@@ -8118,7 +8122,7 @@ var Go = /*#__PURE__*/function (_q9) {
|
|
8118
8122
|
}()
|
8119
8123
|
}]);
|
8120
8124
|
return Go;
|
8121
|
-
}(
|
8125
|
+
}(U);
|
8122
8126
|
var ve = /*#__PURE__*/function () {
|
8123
8127
|
function ve() {
|
8124
8128
|
_classCallCheck(this, ve);
|
@@ -8327,8 +8331,8 @@ var ve = /*#__PURE__*/function () {
|
|
8327
8331
|
}]);
|
8328
8332
|
return ve;
|
8329
8333
|
}();
|
8330
|
-
var li = /*#__PURE__*/function (
|
8331
|
-
_inherits(oe,
|
8334
|
+
var li = /*#__PURE__*/function (_U10) {
|
8335
|
+
_inherits(oe, _U10);
|
8332
8336
|
function oe(e) {
|
8333
8337
|
var _c$headers, _d$OpenAIBeta;
|
8334
8338
|
var _this36;
|
@@ -8345,8 +8349,8 @@ var li = /*#__PURE__*/function (_q10) {
|
|
8345
8349
|
var _this36$config = _this36.config,
|
8346
8350
|
u = _this36$config.new_assistant,
|
8347
8351
|
h = _this36$config.thread_id,
|
8348
|
-
|
8349
|
-
Object.assign(_this36.newAssistantDetails, u), h && (_this36.sessionId = h),
|
8352
|
+
f = _this36$config.load_thread_history;
|
8353
|
+
Object.assign(_this36.newAssistantDetails, u), h && (_this36.sessionId = h), f && (_this36.shouldFetchHistory = !0);
|
8350
8354
|
var _ref11 = (a = (o = e.directConnection) == null ? void 0 : o.openAI) == null ? void 0 : a.assistant,
|
8351
8355
|
m = _ref11.function_handler;
|
8352
8356
|
m && (_this36._functionHandler = m);
|
@@ -8782,16 +8786,16 @@ var li = /*#__PURE__*/function (_q10) {
|
|
8782
8786
|
}()
|
8783
8787
|
}]);
|
8784
8788
|
return oe;
|
8785
|
-
}(
|
8789
|
+
}(U);
|
8786
8790
|
li.THREAD_PREFIX = "https://api.openai.com/v1/threads";
|
8787
8791
|
li.NEW_ASSISTANT_URL = "https://api.openai.com/v1/assistants";
|
8788
8792
|
li.POLLING_TIMEOUT_MS = 800;
|
8789
8793
|
var Vo = li;
|
8790
|
-
var ci = /*#__PURE__*/function (
|
8791
|
-
_inherits(
|
8792
|
-
function
|
8794
|
+
var ci = /*#__PURE__*/function (_U11) {
|
8795
|
+
_inherits(Ce, _U11);
|
8796
|
+
function Ce(e) {
|
8793
8797
|
var _this39;
|
8794
|
-
_classCallCheck(this,
|
8798
|
+
_classCallCheck(this, Ce);
|
8795
8799
|
var o;
|
8796
8800
|
var t = e.directConnection,
|
8797
8801
|
i = t == null ? void 0 : t.openAI,
|
@@ -8803,7 +8807,7 @@ var ci = /*#__PURE__*/function (_q11) {
|
|
8803
8807
|
}
|
8804
8808
|
}
|
8805
8809
|
};
|
8806
|
-
_this39 = _callSuper(this,
|
8810
|
+
_this39 = _callSuper(this, Ce, [e, N.buildKeyVerificationDetails(), N.buildHeaders, i, n]), _this39.insertKeyPlaceholderText = "OpenAI API Key", _this39.keyHelpUrl = "https://platform.openai.com/account/api-keys", _this39.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>OpenAI DALL\xB7E</b></div>\n <p><b>Insert text</b> to generate an image.</p>\n <p><b>Upload 1</b> PNG image to generate its variation and optionally insert text to specify the change.</p>\n <p><b>Upload 2</b> PNG images where the second is a copy of the first with a transparent area where the edit should\n take place and text to specify the edit.</p>\n <p>Click <a href=\"https://platform.openai.com/docs/guides/images/introduction\">here</a> for more info.</p>", _this39.url = "", _this39.permittedErrorPrefixes = ["Incorrect", "Invalid input image"];
|
8807
8811
|
var r = (o = t == null ? void 0 : t.openAI) == null ? void 0 : o.images;
|
8808
8812
|
if (_this39.camera) {
|
8809
8813
|
var a = _typeof(r) == "object" && r.size ? Number.parseInt(r.size) : 1024;
|
@@ -8814,10 +8818,10 @@ var ci = /*#__PURE__*/function (_q11) {
|
|
8814
8818
|
}
|
8815
8819
|
};
|
8816
8820
|
}
|
8817
|
-
_typeof(r) == "object" && Object.assign(_this39.rawBody, r), _this39.canSendMessage =
|
8821
|
+
_typeof(r) == "object" && Object.assign(_this39.rawBody, r), _this39.canSendMessage = Ce.canFileSendMessage;
|
8818
8822
|
return _this39;
|
8819
8823
|
}
|
8820
|
-
_createClass(
|
8824
|
+
_createClass(Ce, [{
|
8821
8825
|
key: "preprocessBody",
|
8822
8826
|
value: function preprocessBody(e, t) {
|
8823
8827
|
var i = JSON.parse(JSON.stringify(e));
|
@@ -8831,10 +8835,10 @@ var ci = /*#__PURE__*/function (_q11) {
|
|
8831
8835
|
var n;
|
8832
8836
|
var r = (a = (o = t[t.length - 1]) == null ? void 0 : o.text) == null ? void 0 : a.trim();
|
8833
8837
|
if (i[1] || r && r !== "") {
|
8834
|
-
this.url =
|
8838
|
+
this.url = Ce.IMAGE_EDIT_URL;
|
8835
8839
|
var l = this.preprocessBody(this.rawBody, r);
|
8836
|
-
n =
|
8837
|
-
} else this.url =
|
8840
|
+
n = Ce.createFormDataBody(l, i[0], i[1]);
|
8841
|
+
} else this.url = Ce.IMAGE_VARIATIONS_URL, n = Ce.createFormDataBody(this.rawBody, i[0]);
|
8838
8842
|
v.tempRemoveContentHeader(this.requestSettings, w.request.bind(this, this, n, e), !1);
|
8839
8843
|
}
|
8840
8844
|
}, {
|
@@ -8865,7 +8869,7 @@ var ci = /*#__PURE__*/function (_q11) {
|
|
8865
8869
|
}
|
8866
8870
|
throw new Error("Request settings have not been set up");
|
8867
8871
|
case 8:
|
8868
|
-
this.url =
|
8872
|
+
this.url = Ce.IMAGE_GENERATION_URL;
|
8869
8873
|
r = this.preprocessBody(this.rawBody, t[t.length - 1].text);
|
8870
8874
|
w.request(this, r, e);
|
8871
8875
|
case 11:
|
@@ -8936,14 +8940,14 @@ var ci = /*#__PURE__*/function (_q11) {
|
|
8936
8940
|
}), n;
|
8937
8941
|
}
|
8938
8942
|
}]);
|
8939
|
-
return
|
8940
|
-
}(
|
8943
|
+
return Ce;
|
8944
|
+
}(U);
|
8941
8945
|
ci.IMAGE_GENERATION_URL = "https://api.openai.com/v1/images/generations";
|
8942
8946
|
ci.IMAGE_VARIATIONS_URL = "https://api.openai.com/v1/images/variations";
|
8943
8947
|
ci.IMAGE_EDIT_URL = "https://api.openai.com/v1/images/edits";
|
8944
8948
|
var Wo = ci;
|
8945
|
-
var ht = /*#__PURE__*/function (
|
8946
|
-
_inherits(ht,
|
8949
|
+
var ht = /*#__PURE__*/function (_U12) {
|
8950
|
+
_inherits(ht, _U12);
|
8947
8951
|
function ht(e) {
|
8948
8952
|
var _this40$maxMessages, _l$model;
|
8949
8953
|
var _this40;
|
@@ -8998,7 +9002,7 @@ var ht = /*#__PURE__*/function (_q12) {
|
|
8998
9002
|
}
|
8999
9003
|
throw new Error("Request settings have not been set up");
|
9000
9004
|
case 2:
|
9001
|
-
i = this.preprocessBody(this.rawBody, t), n = this.
|
9005
|
+
i = this.preprocessBody(this.rawBody, t), n = this.stream;
|
9002
9006
|
n && (_typeof(n) != "object" || !n.simulation) || i.stream ? (i.stream = !0, T.request(this, i, e)) : w.request(this, i, e);
|
9003
9007
|
case 4:
|
9004
9008
|
case "end":
|
@@ -9133,9 +9137,9 @@ var ht = /*#__PURE__*/function (_q12) {
|
|
9133
9137
|
_context94.next = 35;
|
9134
9138
|
break;
|
9135
9139
|
}
|
9136
|
-
o.forEach(function (h,
|
9137
|
-
var
|
9138
|
-
var m = (
|
9140
|
+
o.forEach(function (h, f) {
|
9141
|
+
var p;
|
9142
|
+
var m = (p = e.tool_calls) == null ? void 0 : p[f];
|
9139
9143
|
n == null || n.messages.push({
|
9140
9144
|
role: "tool",
|
9141
9145
|
tool_call_id: m == null ? void 0 : m.id,
|
@@ -9145,8 +9149,8 @@ var ht = /*#__PURE__*/function (_q12) {
|
|
9145
9149
|
}), delete n.tools, delete n.tool_choice, delete n.stream;
|
9146
9150
|
_context94.prev = 17;
|
9147
9151
|
_context94.next = 20;
|
9148
|
-
return t == null ? void 0 : t(n).then(function (
|
9149
|
-
return v.processResponseByType(
|
9152
|
+
return t == null ? void 0 : t(n).then(function (f) {
|
9153
|
+
return v.processResponseByType(f);
|
9150
9154
|
});
|
9151
9155
|
case 20:
|
9152
9156
|
_h = _context94.sent;
|
@@ -9216,7 +9220,7 @@ var ht = /*#__PURE__*/function (_q12) {
|
|
9216
9220
|
}
|
9217
9221
|
}]);
|
9218
9222
|
return ht;
|
9219
|
-
}(
|
9223
|
+
}(U);
|
9220
9224
|
var Jo = /*#__PURE__*/function (_Xi3) {
|
9221
9225
|
_inherits(Jo, _Xi3);
|
9222
9226
|
function Jo(e) {
|
@@ -9322,8 +9326,8 @@ var $o = /*#__PURE__*/function () {
|
|
9322
9326
|
if (t.huggingFace) return t.huggingFace.textGeneration ? new Io(e) : t.huggingFace.summarization ? new Ro(e) : t.huggingFace.translation ? new Oo(e) : t.huggingFace.fillMask ? new Po(e) : t.huggingFace.questionAnswer ? new Lo(e) : t.huggingFace.audioSpeechRecognition ? new ko(e) : t.huggingFace.audioClassification ? new Co(e) : t.huggingFace.imageClassification ? new Ao(e) : new No(e);
|
9323
9327
|
if (t.azure) {
|
9324
9328
|
if (t.azure.speechToText) return new Ho(e);
|
9325
|
-
if (t.azure.textToSpeech) return new
|
9326
|
-
if (t.azure.summarization) return new
|
9329
|
+
if (t.azure.textToSpeech) return new Uo(e);
|
9330
|
+
if (t.azure.summarization) return new qo(e);
|
9327
9331
|
if (t.azure.translation) return new Go(e);
|
9328
9332
|
}
|
9329
9333
|
if (t.stabilityAI) return t.stabilityAI.imageToImage ? new Vt(e) : t.stabilityAI.imageToImageUpscale ? new Ht(e) : t.stabilityAI.imageToImageMasking ? new Gt(e) : new Wt(e);
|
@@ -9334,22 +9338,22 @@ var $o = /*#__PURE__*/function () {
|
|
9334
9338
|
return $o;
|
9335
9339
|
}();
|
9336
9340
|
var gs = /*#__PURE__*/function () {
|
9337
|
-
function
|
9338
|
-
_classCallCheck(this,
|
9341
|
+
function Ui() {
|
9342
|
+
_classCallCheck(this, Ui);
|
9339
9343
|
}
|
9340
|
-
_createClass(
|
9344
|
+
_createClass(Ui, null, [{
|
9341
9345
|
key: "appendStyleSheetToHead",
|
9342
9346
|
value: function appendStyleSheetToHead() {
|
9343
9347
|
var e = document.getElementsByTagName("head")[0];
|
9344
9348
|
if (!Array.from(e.getElementsByTagName("link")).some(function (i) {
|
9345
|
-
return i.getAttribute("href") ===
|
9349
|
+
return i.getAttribute("href") === Ui.FONT_URL;
|
9346
9350
|
})) {
|
9347
9351
|
var _i12 = document.createElement("link");
|
9348
|
-
_i12.rel = "stylesheet", _i12.href =
|
9352
|
+
_i12.rel = "stylesheet", _i12.href = Ui.FONT_URL, e.appendChild(_i12);
|
9349
9353
|
}
|
9350
9354
|
}
|
9351
9355
|
}]);
|
9352
|
-
return
|
9356
|
+
return Ui;
|
9353
9357
|
}();
|
9354
9358
|
gs.FONT_URL = "https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap";
|
9355
9359
|
var Ko = gs;
|
@@ -9376,7 +9380,7 @@ bs.attibutes = {
|
|
9376
9380
|
return new Function("return ".concat(s))();
|
9377
9381
|
}
|
9378
9382
|
};
|
9379
|
-
function
|
9383
|
+
function E(s) {
|
9380
9384
|
return function (e, t) {
|
9381
9385
|
Object.defineProperty(e, t, {});
|
9382
9386
|
var i = e.constructor,
|
@@ -9457,7 +9461,10 @@ var Yo = /*#__PURE__*/function () {
|
|
9457
9461
|
if (!t.isDirectConnection()) return "Please define a valid service inside\n the [directConnection](https://deepchat.dev/docs/directConnection/#directConnection) object.";
|
9458
9462
|
var n = (i = e.directConnection.openAI) == null ? void 0 : i.chat;
|
9459
9463
|
if (_typeof(n) == "object" && n.tools && !n.function_handler) return "Please define the `function_handler` property inside the openAI [chat](https://deepchat.dev/docs/directConnection/openAI#Chat) object.";
|
9460
|
-
} else if (e.request
|
9464
|
+
} else if (e.request) {
|
9465
|
+
if (e.demo && !e.request.stream) return "When [demo](https://deepchat.dev/docs/demo) mode is enabled - the [request](https://deepchat.dev/docs/connect#Request) object can only accept the [stream](https://deepchat.dev/docs/connect#Stream) property.";
|
9466
|
+
if (!e.request.url && !e.request.handler) return "Please define a `url` or a `handler` property inside the [request](https://deepchat.dev/docs/connect#Request) object.";
|
9467
|
+
}
|
9461
9468
|
return null;
|
9462
9469
|
}
|
9463
9470
|
}]);
|
@@ -9550,7 +9557,7 @@ var be = /*#__PURE__*/function (_Ye) {
|
|
9550
9557
|
var n = t.permittedErrorPrefixes,
|
9551
9558
|
r = t.introPanelMarkUp,
|
9552
9559
|
o = t.demo;
|
9553
|
-
_this43._errorMessageOverrides = (a = e.errorMessages) == null ? void 0 : a.overrides, _this43._onClearMessages = zt.onClearMessages.bind(_assertThisInitialized(_this43), e), _this43._onError = zt.onError.bind(_assertThisInitialized(_this43), e), _this43._displayLoadingMessage = be.getDisplayLoadingMessage(e, t), _this43._permittedErrorPrefixes = n, _this43.addSetupMessageIfNeeded(e, t) || _this43.populateIntroPanel(i, r, e.introPanelStyle), _this43.addIntroductoryMessage(e, t), e.
|
9560
|
+
_this43._errorMessageOverrides = (a = e.errorMessages) == null ? void 0 : a.overrides, _this43._onClearMessages = zt.onClearMessages.bind(_assertThisInitialized(_this43), e), _this43._onError = zt.onError.bind(_assertThisInitialized(_this43), e), _this43._displayLoadingMessage = be.getDisplayLoadingMessage(e, t), _this43._permittedErrorPrefixes = n, _this43.addSetupMessageIfNeeded(e, t) || _this43.populateIntroPanel(i, r, e.introPanelStyle), _this43.addIntroductoryMessage(e, t), e.history && _this43.populateInitialMessages(e.history), _this43._displayServiceErrorMessages = (l = e.errorMessages) == null ? void 0 : l.displayServiceErrorMessages, e.getMessages = function () {
|
9554
9561
|
return JSON.parse(JSON.stringify(_this43.messages));
|
9555
9562
|
}, e.clearMessages = _this43.clearMessages.bind(_assertThisInitialized(_this43), t), e.refreshMessages = _this43.refreshTextMessages.bind(_assertThisInitialized(_this43)), e.scrollToBottom = G.scrollToBottom.bind(_assertThisInitialized(_this43), _this43.elementRef), e._addMessage = function (c, d) {
|
9556
9563
|
_this43.addNewMessage(_objectSpread(_objectSpread({}, c), {}, {
|
@@ -9600,7 +9607,7 @@ var be = /*#__PURE__*/function (_Ye) {
|
|
9600
9607
|
value: function populateInitialMessages(e) {
|
9601
9608
|
var _this44 = this;
|
9602
9609
|
e.forEach(function (t) {
|
9603
|
-
|
9610
|
+
Se.processInitialMessageFile(t), _this44.addNewMessage(t, !0);
|
9604
9611
|
}), setTimeout(function () {
|
9605
9612
|
return G.scrollToBottom(_this44.elementRef);
|
9606
9613
|
}, 0);
|
@@ -10020,14 +10027,14 @@ var yt = /*#__PURE__*/function () {
|
|
10020
10027
|
}]);
|
10021
10028
|
return yt;
|
10022
10029
|
}();
|
10023
|
-
var
|
10024
|
-
function
|
10025
|
-
_classCallCheck(this,
|
10030
|
+
var ke = /*#__PURE__*/function () {
|
10031
|
+
function ke() {
|
10032
|
+
_classCallCheck(this, ke);
|
10026
10033
|
}
|
10027
|
-
_createClass(
|
10034
|
+
_createClass(ke, null, [{
|
10028
10035
|
key: "addItemEvents",
|
10029
10036
|
value: function addItemEvents(e, t, i, n) {
|
10030
|
-
|
10037
|
+
Le.add(t, n), t.addEventListener("click", function () {
|
10031
10038
|
i.click();
|
10032
10039
|
}), t.addEventListener("mouseenter", function (r) {
|
10033
10040
|
e.highlightedItem = r.target;
|
@@ -10051,7 +10058,7 @@ var Ae = /*#__PURE__*/function () {
|
|
10051
10058
|
key: "populateItem",
|
10052
10059
|
value: function populateItem(e, t, i, n) {
|
10053
10060
|
var r = e.children[0];
|
10054
|
-
r.classList.contains("text-button") ? t.appendChild(
|
10061
|
+
r.classList.contains("text-button") ? t.appendChild(ke.createItemText(r.textContent, n == null ? void 0 : n.text)) : (t.appendChild(ke.createItemIcon(e, n == null ? void 0 : n.iconContainer)), t.appendChild(ke.createItemText(i, n == null ? void 0 : n.text)));
|
10055
10062
|
}
|
10056
10063
|
// prettier-ignore
|
10057
10064
|
}, {
|
@@ -10061,16 +10068,16 @@ var Ae = /*#__PURE__*/function () {
|
|
10061
10068
|
var n = t.elementRef,
|
10062
10069
|
r = t.dropupText,
|
10063
10070
|
o = document.createElement("div");
|
10064
|
-
Object.assign(o.style, (l = i == null ? void 0 : i.item) == null ? void 0 : l["default"]),
|
10071
|
+
Object.assign(o.style, (l = i == null ? void 0 : i.item) == null ? void 0 : l["default"]), ke.populateItem(n, o, r, i), o.classList.add("dropup-menu-item");
|
10065
10072
|
var a = C.processStateful((i == null ? void 0 : i.item) || {}, {
|
10066
10073
|
backgroundColor: "#f3f3f3"
|
10067
10074
|
}, {
|
10068
10075
|
backgroundColor: "#ebebeb"
|
10069
10076
|
});
|
10070
|
-
return
|
10077
|
+
return ke.addItemEvents(e, o, n, a), o;
|
10071
10078
|
}
|
10072
10079
|
}]);
|
10073
|
-
return
|
10080
|
+
return ke;
|
10074
10081
|
}();
|
10075
10082
|
var nn = /*#__PURE__*/function () {
|
10076
10083
|
function nn(e, t) {
|
@@ -10099,7 +10106,7 @@ var nn = /*#__PURE__*/function () {
|
|
10099
10106
|
}, {
|
10100
10107
|
key: "addItem",
|
10101
10108
|
value: function addItem(e) {
|
10102
|
-
var t =
|
10109
|
+
var t = ke.createItem(this, e, this._styles);
|
10103
10110
|
this.elementRef.appendChild(t);
|
10104
10111
|
}
|
10105
10112
|
// prettier-ignore
|
@@ -10301,32 +10308,32 @@ var ea = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 24 24\"
|
|
10301
10308
|
dropupText: "File"
|
10302
10309
|
}
|
10303
10310
|
};
|
10304
|
-
var
|
10311
|
+
var fe = /*#__PURE__*/function () {
|
10305
10312
|
// prettier-ignore
|
10306
|
-
function
|
10313
|
+
function fe(e, t, i, n) {
|
10307
10314
|
var _this49 = this;
|
10308
|
-
_classCallCheck(this,
|
10315
|
+
_classCallCheck(this, fe);
|
10309
10316
|
this._attachments = [], this._fileCountLimit = 99, this._acceptedFormat = "", t.maxNumberOfFiles && (this._fileCountLimit = t.maxNumberOfFiles), this._toggleContainerDisplay = i, this._fileAttachmentsContainerRef = n, t.acceptedFormats && (this._acceptedFormat = t.acceptedFormats), setTimeout(function () {
|
10310
10317
|
_this49._validationHandler = e._validationHandler;
|
10311
10318
|
});
|
10312
10319
|
}
|
10313
|
-
_createClass(
|
10320
|
+
_createClass(fe, [{
|
10314
10321
|
key: "attemptAddFile",
|
10315
10322
|
value: function attemptAddFile(e, t) {
|
10316
|
-
return
|
10323
|
+
return fe.isFileTypeValid(e, this._acceptedFormat) ? (this.addAttachmentBasedOnType(e, t, !0), !0) : !1;
|
10317
10324
|
}
|
10318
10325
|
}, {
|
10319
10326
|
key: "addAttachmentBasedOnType",
|
10320
10327
|
value: function addAttachmentBasedOnType(e, t, i) {
|
10321
|
-
var n =
|
10328
|
+
var n = fe.getTypeFromBlob(e);
|
10322
10329
|
if (n === "image") {
|
10323
|
-
var r =
|
10330
|
+
var r = fe.createImageAttachment(t);
|
10324
10331
|
this.addFileAttachment(e, "image", r, i);
|
10325
10332
|
} else if (n === "audio") {
|
10326
10333
|
var _r2 = Hi.createAudioAttachment(t);
|
10327
10334
|
this.addFileAttachment(e, "audio", _r2, i);
|
10328
10335
|
} else {
|
10329
|
-
var _r3 =
|
10336
|
+
var _r3 = fe.createAnyFileAttachment(e.name);
|
10330
10337
|
this.addFileAttachment(e, "any", _r3, i);
|
10331
10338
|
}
|
10332
10339
|
}
|
@@ -10334,7 +10341,7 @@ var pe = /*#__PURE__*/function () {
|
|
10334
10341
|
key: "addFileAttachment",
|
10335
10342
|
value: function addFileAttachment(e, t, i, n) {
|
10336
10343
|
var a;
|
10337
|
-
var r =
|
10344
|
+
var r = fe.createContainer(i);
|
10338
10345
|
if (this._attachments.length >= this._fileCountLimit) {
|
10339
10346
|
var l = this._attachments[this._attachments.length - 1].removeButton;
|
10340
10347
|
l == null || l.click();
|
@@ -10433,23 +10440,23 @@ var pe = /*#__PURE__*/function () {
|
|
10433
10440
|
return t.classList.add("file-attachment"), t.appendChild(e), t;
|
10434
10441
|
}
|
10435
10442
|
}]);
|
10436
|
-
return
|
10443
|
+
return fe;
|
10437
10444
|
}();
|
10438
10445
|
var ra = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n <title>play</title>\n <path d=\"M5.92 24.096q0 1.088 0.928 1.728 0.512 0.288 1.088 0.288 0.448 0 0.896-0.224l16.16-8.064q0.48-0.256 0.8-0.736t0.288-1.088-0.288-1.056-0.8-0.736l-16.16-8.064q-0.448-0.224-0.896-0.224-0.544 0-1.088 0.288-0.928 0.608-0.928 1.728v16.16z\"></path>\n</svg>",
|
10439
10446
|
Tn = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n<title>stop</title>\n<path d=\"M5.92 24.096q0 0.832 0.576 1.408t1.44 0.608h16.128q0.832 0 1.44-0.608t0.576-1.408v-16.16q0-0.832-0.576-1.44t-1.44-0.576h-16.128q-0.832 0-1.44 0.576t-0.576 1.44v16.16z\"></path>\n</svg>",
|
10440
|
-
vs = /*#__PURE__*/function (
|
10441
|
-
_inherits(
|
10447
|
+
vs = /*#__PURE__*/function (_fe) {
|
10448
|
+
_inherits(Ae, _fe);
|
10442
10449
|
// prettier-ignore
|
10443
|
-
function
|
10444
|
-
_classCallCheck(this,
|
10445
|
-
return _callSuper(this,
|
10450
|
+
function Ae(e, t, i, n) {
|
10451
|
+
_classCallCheck(this, Ae);
|
10452
|
+
return _callSuper(this, Ae, [e, t, i, n]);
|
10446
10453
|
}
|
10447
|
-
_createClass(
|
10454
|
+
_createClass(Ae, [{
|
10448
10455
|
key: "createTimer",
|
10449
10456
|
value: function createTimer(e, t) {
|
10450
10457
|
var _this50 = this;
|
10451
10458
|
var i = 0;
|
10452
|
-
var n = t !== void 0 && t <
|
10459
|
+
var n = t !== void 0 && t < Ae.TIMER_LIMIT_S ? t : Ae.TIMER_LIMIT_S;
|
10453
10460
|
return setInterval(function () {
|
10454
10461
|
var a;
|
10455
10462
|
i += 1, i === n && ((a = _this50.stopPlaceholderCallback) == null || a.call(_this50), _this50.clearTimer()), i === 600 && e.classList.add("audio-placeholder-text-4-digits");
|
@@ -10461,7 +10468,7 @@ var ra = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
|
|
10461
10468
|
}, {
|
10462
10469
|
key: "createPlaceholderAudioAttachment",
|
10463
10470
|
value: function createPlaceholderAudioAttachment(e) {
|
10464
|
-
var t =
|
10471
|
+
var t = Ae.createAudioContainer(),
|
10465
10472
|
i = document.createElement("div");
|
10466
10473
|
i.classList.add("audio-placeholder-text-3-digits");
|
10467
10474
|
var n = document.createElement("div");
|
@@ -10498,7 +10505,7 @@ var ra = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
|
|
10498
10505
|
key: "completePlaceholderAttachment",
|
10499
10506
|
value: function completePlaceholderAttachment(e, t) {
|
10500
10507
|
var i = this._activePlaceholderAttachment;
|
10501
|
-
i && (i.file = e,
|
10508
|
+
i && (i.file = e, Ae.addAudioElements(i.attachmentContainerElement.children[0], t), i.removeButton = this.createRemoveAttachmentButton(i), i.attachmentContainerElement.appendChild(i.removeButton), this._activePlaceholderAttachment = void 0, this.clearTimer());
|
10502
10509
|
}
|
10503
10510
|
}, {
|
10504
10511
|
key: "removePlaceholderAttachment",
|
@@ -10538,8 +10545,8 @@ var ra = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
|
|
10538
10545
|
}, {
|
10539
10546
|
key: "createAudioAttachment",
|
10540
10547
|
value: function createAudioAttachment(e) {
|
10541
|
-
var t =
|
10542
|
-
return
|
10548
|
+
var t = Ae.createAudioContainer();
|
10549
|
+
return Ae.addAudioElements(t, e), t;
|
10543
10550
|
}
|
10544
10551
|
}, {
|
10545
10552
|
key: "stopAttachmentPlayback",
|
@@ -10548,8 +10555,8 @@ var ra = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
|
|
10548
10555
|
(n = (i = (t = e.children[0]) == null ? void 0 : t.children) == null ? void 0 : i[0]) != null && n.classList.contains("stop-icon") && e.children[0].click();
|
10549
10556
|
}
|
10550
10557
|
}]);
|
10551
|
-
return
|
10552
|
-
}(
|
10558
|
+
return Ae;
|
10559
|
+
}(fe);
|
10553
10560
|
vs.TIMER_LIMIT_S = 5999;
|
10554
10561
|
var Hi = vs;
|
10555
10562
|
var oa = /*#__PURE__*/function () {
|
@@ -10561,7 +10568,7 @@ var oa = /*#__PURE__*/function () {
|
|
10561
10568
|
value:
|
10562
10569
|
// prettier-ignore
|
10563
10570
|
function create(e, t, i, n, r) {
|
10564
|
-
return r === "audio" ? new Hi(e, t, i, n) : new
|
10571
|
+
return r === "audio" ? new Hi(e, t, i, n) : new fe(e, t, i, n);
|
10565
10572
|
}
|
10566
10573
|
}]);
|
10567
10574
|
return oa;
|
@@ -10779,22 +10786,22 @@ var ys = /*#__PURE__*/function () {
|
|
10779
10786
|
}();
|
10780
10787
|
ys.MODAL_CLOSE_TIMEOUT_MS = 190;
|
10781
10788
|
var ct = ys;
|
10782
|
-
var
|
10783
|
-
_inherits(
|
10789
|
+
var ft = /*#__PURE__*/function (_Tt2) {
|
10790
|
+
_inherits(ft, _Tt2);
|
10784
10791
|
// prettier-ignore
|
10785
|
-
function
|
10792
|
+
function ft(e, t, i, n, r, o) {
|
10786
10793
|
var _this55;
|
10787
|
-
_classCallCheck(this,
|
10788
|
-
var l, c, d, u, h,
|
10789
|
-
_this55 = _callSuper(this,
|
10794
|
+
_classCallCheck(this, ft);
|
10795
|
+
var l, c, d, u, h, f;
|
10796
|
+
_this55 = _callSuper(this, ft, [ft.createButtonElement(), (l = i.button) == null ? void 0 : l.position, i.button, o]);
|
10790
10797
|
var a = _this55.createInnerElements(n, r, _this55._customStyles);
|
10791
|
-
_this55._inputElement =
|
10798
|
+
_this55._inputElement = ft.createInputElement((c = i == null ? void 0 : i.files) == null ? void 0 : c.acceptedFormats), _this55.addClickEvent(e, i), _this55.elementRef.replaceChildren(a.styles), _this55.reapplyStateStyle("styles"), _this55._fileAttachmentsType = t, _this55._openModalOnce = ((u = (d = i.files) == null ? void 0 : d.infoModal) == null ? void 0 : u.openModalOnce) === !1 || (f = (h = i.files) == null ? void 0 : h.infoModal) == null ? void 0 : f.openModalOnce;
|
10792
10799
|
return _this55;
|
10793
10800
|
}
|
10794
|
-
_createClass(
|
10801
|
+
_createClass(ft, [{
|
10795
10802
|
key: "createInnerElements",
|
10796
10803
|
value: function createInnerElements(e, t, i) {
|
10797
|
-
var n =
|
10804
|
+
var n = ft.createSVGIconElement(e, t);
|
10798
10805
|
return {
|
10799
10806
|
styles: this.createInnerElement(n, "styles", i)
|
10800
10807
|
};
|
@@ -10845,7 +10852,7 @@ var pt = /*#__PURE__*/function (_Tt2) {
|
|
10845
10852
|
return i.id = e, i;
|
10846
10853
|
}
|
10847
10854
|
}]);
|
10848
|
-
return
|
10855
|
+
return ft;
|
10849
10856
|
}(Tt);
|
10850
10857
|
var ue = /*#__PURE__*/function () {
|
10851
10858
|
function ue() {
|
@@ -10901,11 +10908,11 @@ var ue = /*#__PURE__*/function () {
|
|
10901
10908
|
}]);
|
10902
10909
|
return ue;
|
10903
10910
|
}();
|
10904
|
-
var
|
10905
|
-
function
|
10906
|
-
_classCallCheck(this,
|
10911
|
+
var Ie = /*#__PURE__*/function () {
|
10912
|
+
function Ie() {
|
10913
|
+
_classCallCheck(this, Ie);
|
10907
10914
|
}
|
10908
|
-
_createClass(
|
10915
|
+
_createClass(Ie, null, [{
|
10909
10916
|
key: "validate",
|
10910
10917
|
value:
|
10911
10918
|
// prettier-ignore
|
@@ -10929,7 +10936,7 @@ var ke = /*#__PURE__*/function () {
|
|
10929
10936
|
a = i.getAllFileData(), l = a == null ? void 0 : a.map(function (c) {
|
10930
10937
|
return c.file;
|
10931
10938
|
});
|
10932
|
-
return _context102.abrupt("return",
|
10939
|
+
return _context102.abrupt("return", Ie.validate(e, n, o, l));
|
10933
10940
|
case 5:
|
10934
10941
|
case "end":
|
10935
10942
|
return _context102.stop();
|
@@ -10952,7 +10959,7 @@ var ke = /*#__PURE__*/function () {
|
|
10952
10959
|
n = (r = t.files) == null ? void 0 : r.map(function (o) {
|
10953
10960
|
return o.file;
|
10954
10961
|
});
|
10955
|
-
return _context103.abrupt("return",
|
10962
|
+
return _context103.abrupt("return", Ie.validate(e, i, t.text, n, !0));
|
10956
10963
|
case 2:
|
10957
10964
|
case "end":
|
10958
10965
|
return _context103.stop();
|
@@ -10973,21 +10980,21 @@ var ke = /*#__PURE__*/function () {
|
|
10973
10980
|
}, {
|
10974
10981
|
key: "attach",
|
10975
10982
|
value: function attach(e, t, i, n, r) {
|
10976
|
-
var o = e.validateInput ||
|
10983
|
+
var o = e.validateInput || Se.processValidateInput(e);
|
10977
10984
|
e._validationHandler = /*#__PURE__*/function () {
|
10978
10985
|
var _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee104(a) {
|
10979
10986
|
var l;
|
10980
10987
|
return _regeneratorRuntime().wrap(function _callee104$(_context104) {
|
10981
10988
|
while (1) switch (_context104.prev = _context104.next) {
|
10982
10989
|
case 0:
|
10983
|
-
if (!(r.status.loadingActive || r.status.requestInProgress || t.isSubmitProgrammaticallyDisabled === !0 || !
|
10990
|
+
if (!(r.status.loadingActive || r.status.requestInProgress || t.isSubmitProgrammaticallyDisabled === !0 || !Ie.validateWebsocket(t, r))) {
|
10984
10991
|
_context104.next = 2;
|
10985
10992
|
break;
|
10986
10993
|
}
|
10987
10994
|
return _context104.abrupt("return", !1);
|
10988
10995
|
case 2:
|
10989
10996
|
l = o || t.canSendMessage;
|
10990
|
-
return _context104.abrupt("return", l ? a ?
|
10997
|
+
return _context104.abrupt("return", l ? a ? Ie.useValidationFuncProgrammatic(l, a, r) : Ie.useValidationFunc(l, i, n, r) : null);
|
10991
10998
|
case 4:
|
10992
10999
|
case "end":
|
10993
11000
|
return _context104.stop();
|
@@ -11000,7 +11007,7 @@ var ke = /*#__PURE__*/function () {
|
|
11000
11007
|
}();
|
11001
11008
|
}
|
11002
11009
|
}]);
|
11003
|
-
return
|
11010
|
+
return Ie;
|
11004
11011
|
}();
|
11005
11012
|
var aa = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n<svg height=\"1.4em\" width=\"1.4em\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n\t viewBox=\"0 0 490.9 490.9\" xml:space=\"preserve\">\n\t<g>\n\t\t<g>\n\t\t\t<path d=\"M245.5,322.9c53,0,96.2-43.2,96.2-96.2V96.2c0-53-43.2-96.2-96.2-96.2s-96.2,43.2-96.2,96.2v130.5\n\t\t\t\tC149.3,279.8,192.5,322.9,245.5,322.9z M173.8,96.2c0-39.5,32.2-71.7,71.7-71.7s71.7,32.2,71.7,71.7v130.5\n\t\t\t\tc0,39.5-32.2,71.7-71.7,71.7s-71.7-32.2-71.7-71.7V96.2z\"/>\n\t\t\t<path d=\"M94.4,214.5c-6.8,0-12.3,5.5-12.3,12.3c0,85.9,66.7,156.6,151.1,162.8v76.7h-63.9c-6.8,0-12.3,5.5-12.3,12.3\n\t\t\t\ts5.5,12.3,12.3,12.3h152.3c6.8,0,12.3-5.5,12.3-12.3s-5.5-12.3-12.3-12.3h-63.9v-76.7c84.4-6.3,151.1-76.9,151.1-162.8\n\t\t\t\tc0-6.8-5.5-12.3-12.3-12.3s-12.3,5.5-12.3,12.3c0,76.6-62.3,138.9-138.9,138.9s-138.9-62.3-138.9-138.9\n\t\t\t\tC106.6,220,101.2,214.5,94.4,214.5z\"/>\n\t\t</g>\n\t</g>\n</svg>\n";
|
11006
11013
|
var xt = /*#__PURE__*/function (_Tt3) {
|
@@ -11247,11 +11254,11 @@ var Y = /*#__PURE__*/function () {
|
|
11247
11254
|
}();
|
11248
11255
|
hi.EventListeners = Y;
|
11249
11256
|
Y.KEY_DOWN_TIMEOUT = null;
|
11250
|
-
var
|
11251
|
-
Object.defineProperty(
|
11257
|
+
var fi = {};
|
11258
|
+
Object.defineProperty(fi, "__esModule", {
|
11252
11259
|
value: !0
|
11253
11260
|
});
|
11254
|
-
|
11261
|
+
fi.PreResultUtils = void 0;
|
11255
11262
|
var ua = /*#__PURE__*/function () {
|
11256
11263
|
function ua() {
|
11257
11264
|
_classCallCheck(this, ua);
|
@@ -11267,7 +11274,7 @@ var ua = /*#__PURE__*/function () {
|
|
11267
11274
|
}]);
|
11268
11275
|
return ua;
|
11269
11276
|
}();
|
11270
|
-
|
11277
|
+
fi.PreResultUtils = ua;
|
11271
11278
|
var It = {},
|
11272
11279
|
Lt = {};
|
11273
11280
|
Object.defineProperty(Lt, "__esModule", {
|
@@ -11311,11 +11318,11 @@ var sn = /*#__PURE__*/function () {
|
|
11311
11318
|
return sn;
|
11312
11319
|
}();
|
11313
11320
|
Lt.AutoScroll = sn;
|
11314
|
-
var
|
11315
|
-
Object.defineProperty(
|
11321
|
+
var qe = {};
|
11322
|
+
Object.defineProperty(qe, "__esModule", {
|
11316
11323
|
value: !0
|
11317
11324
|
});
|
11318
|
-
|
11325
|
+
qe.Elements = void 0;
|
11319
11326
|
var ha = /*#__PURE__*/function () {
|
11320
11327
|
function ha() {
|
11321
11328
|
_classCallCheck(this, ha);
|
@@ -11363,17 +11370,17 @@ var ha = /*#__PURE__*/function () {
|
|
11363
11370
|
}]);
|
11364
11371
|
return ha;
|
11365
11372
|
}();
|
11366
|
-
|
11367
|
-
var
|
11368
|
-
Object.defineProperty(
|
11373
|
+
qe.Elements = ha;
|
11374
|
+
var Ue = {};
|
11375
|
+
Object.defineProperty(Ue, "__esModule", {
|
11369
11376
|
value: !0
|
11370
11377
|
});
|
11371
|
-
|
11372
|
-
var
|
11373
|
-
function
|
11374
|
-
_classCallCheck(this,
|
11378
|
+
Ue.Cursor = void 0;
|
11379
|
+
var pt = /*#__PURE__*/function () {
|
11380
|
+
function pt() {
|
11381
|
+
_classCallCheck(this, pt);
|
11375
11382
|
}
|
11376
|
-
_createClass(
|
11383
|
+
_createClass(pt, null, [{
|
11377
11384
|
key: "setOffsetForGeneric",
|
11378
11385
|
value: function setOffsetForGeneric(e, t) {
|
11379
11386
|
var i = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
@@ -11381,7 +11388,7 @@ var ft = /*#__PURE__*/function () {
|
|
11381
11388
|
for (var r = 0; r < e.childNodes.length; r += 1) {
|
11382
11389
|
var o = e.childNodes[r];
|
11383
11390
|
if (o.childNodes.length > 0) {
|
11384
|
-
var a =
|
11391
|
+
var a = pt.setOffsetForGeneric(o, t, i);
|
11385
11392
|
if (a === -1) return -1;
|
11386
11393
|
i += a;
|
11387
11394
|
} else if (o.textContent !== null) {
|
@@ -11409,8 +11416,8 @@ var ft = /*#__PURE__*/function () {
|
|
11409
11416
|
value: function setOffsetForSafariGeneric(e, t) {
|
11410
11417
|
var i = window.getSelection();
|
11411
11418
|
if (i) {
|
11412
|
-
var n =
|
11413
|
-
console.log(n), setTimeout(function () {}, 100),
|
11419
|
+
var n = pt.getGenericElementCursorOffset(e, i, !0);
|
11420
|
+
console.log(n), setTimeout(function () {}, 100), pt.setOffsetForGeneric(e, n + t);
|
11414
11421
|
}
|
11415
11422
|
}
|
11416
11423
|
// set to automatically scroll to cursor (scroll does not work in Safari)
|
@@ -11448,17 +11455,17 @@ var ft = /*#__PURE__*/function () {
|
|
11448
11455
|
return n;
|
11449
11456
|
}
|
11450
11457
|
}]);
|
11451
|
-
return
|
11458
|
+
return pt;
|
11452
11459
|
}();
|
11453
|
-
|
11460
|
+
Ue.Cursor = pt;
|
11454
11461
|
Object.defineProperty(It, "__esModule", {
|
11455
11462
|
value: !0
|
11456
11463
|
});
|
11457
11464
|
It.CommandUtils = void 0;
|
11458
11465
|
var An = Lt,
|
11459
|
-
|
11460
|
-
|
11461
|
-
kn =
|
11466
|
+
fa = qe,
|
11467
|
+
pa = nt,
|
11468
|
+
kn = Ue,
|
11462
11469
|
In = ze;
|
11463
11470
|
var K = /*#__PURE__*/function () {
|
11464
11471
|
function K() {
|
@@ -11493,7 +11500,7 @@ var K = /*#__PURE__*/function () {
|
|
11493
11500
|
}, {
|
11494
11501
|
key: "setText",
|
11495
11502
|
value: function setText(e, t, i, n) {
|
11496
|
-
K.toggleCommandModeOff(e),
|
11503
|
+
K.toggleCommandModeOff(e), fa.Elements.isPrimitiveElement(n) ? (n.value = i, e.isTargetInShadow || kn.Cursor.setOffsetForPrimitive(n, i.length, !0), pa.Browser.IS_SAFARI() && e.autoScroll && An.AutoScroll.scrollSafariPrimitiveToEnd(n)) : (n.textContent = i, e.isTargetInShadow || kn.Cursor.focusEndOfGeneric(n), setTimeout(function () {
|
11497
11504
|
return An.AutoScroll.scrollGeneric(e, n);
|
11498
11505
|
})), e.resetRecording(t);
|
11499
11506
|
}
|
@@ -11536,8 +11543,8 @@ var K = /*#__PURE__*/function () {
|
|
11536
11543
|
doNotProcessTranscription: !1
|
11537
11544
|
};
|
11538
11545
|
if (c.pause && h(c.pause, d, u)) return K.toggleCommandModeOff(e), e.setInterimColorToFinal(), setTimeout(function () {
|
11539
|
-
var
|
11540
|
-
e.isPaused = !0, (
|
11546
|
+
var f;
|
11547
|
+
e.isPaused = !0, (f = e.onPauseTrigger) === null || f === void 0 || f.call(e, !0);
|
11541
11548
|
}), {
|
11542
11549
|
doNotProcessTranscription: !1
|
11543
11550
|
};
|
@@ -11556,13 +11563,13 @@ var K = /*#__PURE__*/function () {
|
|
11556
11563
|
return K;
|
11557
11564
|
}();
|
11558
11565
|
It.CommandUtils = K;
|
11559
|
-
var
|
11560
|
-
Object.defineProperty(
|
11566
|
+
var pi = {};
|
11567
|
+
Object.defineProperty(pi, "__esModule", {
|
11561
11568
|
value: !0
|
11562
11569
|
});
|
11563
|
-
|
11564
|
-
var ma =
|
11565
|
-
st =
|
11570
|
+
pi.Highlight = void 0;
|
11571
|
+
var ma = qe,
|
11572
|
+
st = Ue;
|
11566
11573
|
var Kt = /*#__PURE__*/function () {
|
11567
11574
|
function Kt() {
|
11568
11575
|
_classCallCheck(this, Kt);
|
@@ -11612,14 +11619,14 @@ var Kt = /*#__PURE__*/function () {
|
|
11612
11619
|
}]);
|
11613
11620
|
return Kt;
|
11614
11621
|
}();
|
11615
|
-
|
11622
|
+
pi.Highlight = Kt;
|
11616
11623
|
var mi = {};
|
11617
11624
|
Object.defineProperty(mi, "__esModule", {
|
11618
11625
|
value: !0
|
11619
11626
|
});
|
11620
11627
|
mi.Padding = void 0;
|
11621
|
-
var ga =
|
11622
|
-
Ln =
|
11628
|
+
var ga = qe,
|
11629
|
+
Ln = Ue,
|
11623
11630
|
Ge = ze;
|
11624
11631
|
var Yt = /*#__PURE__*/function () {
|
11625
11632
|
function Yt() {
|
@@ -11685,14 +11692,14 @@ Object.defineProperty(kt, "__esModule", {
|
|
11685
11692
|
});
|
11686
11693
|
kt.Speech = void 0;
|
11687
11694
|
var Rn = hi,
|
11688
|
-
ba =
|
11695
|
+
ba = fi,
|
11689
11696
|
Nn = It,
|
11690
11697
|
Dt = Lt,
|
11691
|
-
ki =
|
11692
|
-
se =
|
11698
|
+
ki = pi,
|
11699
|
+
se = qe,
|
11693
11700
|
Ii = mi,
|
11694
11701
|
On = nt,
|
11695
|
-
Pn =
|
11702
|
+
Pn = Ue,
|
11696
11703
|
Li = ze;
|
11697
11704
|
var va = /*#__PURE__*/function () {
|
11698
11705
|
function va() {
|
@@ -12240,7 +12247,7 @@ bi.Azure = Qt;
|
|
12240
12247
|
Object.defineProperty(xs, "__esModule", {
|
12241
12248
|
value: !0
|
12242
12249
|
});
|
12243
|
-
var
|
12250
|
+
var qn = di,
|
12244
12251
|
wa = It,
|
12245
12252
|
ie = gi,
|
12246
12253
|
Ma = bi;
|
@@ -12258,12 +12265,12 @@ var Ke = /*#__PURE__*/function () {
|
|
12258
12265
|
}, {
|
12259
12266
|
key: "startWebSpeech",
|
12260
12267
|
value: function startWebSpeech(e) {
|
12261
|
-
Ke.stop() || (ie.GlobalState.service = new
|
12268
|
+
Ke.stop() || (ie.GlobalState.service = new qn.WebSpeech(), ie.GlobalState.service.start(e));
|
12262
12269
|
}
|
12263
12270
|
}, {
|
12264
12271
|
key: "isWebSpeechSupported",
|
12265
12272
|
value: function isWebSpeechSupported() {
|
12266
|
-
return !!
|
12273
|
+
return !!qn.WebSpeech.getAPI();
|
12267
12274
|
}
|
12268
12275
|
}, {
|
12269
12276
|
key: "startAzure",
|
@@ -12477,11 +12484,11 @@ var z = /*#__PURE__*/function () {
|
|
12477
12484
|
}]);
|
12478
12485
|
return z;
|
12479
12486
|
}();
|
12480
|
-
var
|
12481
|
-
function
|
12482
|
-
_classCallCheck(this,
|
12487
|
+
var Re = /*#__PURE__*/function () {
|
12488
|
+
function Re() {
|
12489
|
+
_classCallCheck(this, Re);
|
12483
12490
|
}
|
12484
|
-
_createClass(
|
12491
|
+
_createClass(Re, null, [{
|
12485
12492
|
key: "resetSubmit",
|
12486
12493
|
value: function resetSubmit(e, t) {
|
12487
12494
|
t ? e.unsetCustomStateStyles(["loading", "submit"]) : e.unsetCustomStateStyles(["stop", "loading", "submit"]), e.reapplyStateStyle("submit");
|
@@ -12497,16 +12504,16 @@ var Le = /*#__PURE__*/function () {
|
|
12497
12504
|
}, {
|
12498
12505
|
key: "setUpDisabledButton",
|
12499
12506
|
value: function setUpDisabledButton(e) {
|
12500
|
-
z.setPropertyValueIfDoesNotExist(e, ["submit", "container", "default", "backgroundColor"], ""), z.setPropertyValueIfDoesNotExist(e, ["disabled", "container", "default", "backgroundColor"], "unset"), z.setPropertyValueIfDoesNotExist(e.submit, ["svg", "styles", "default", "filter"], ""), z.setPropertyValueIfDoesNotExist(e.disabled, ["svg", "styles", "default", "filter"], "brightness(0) saturate(100%) invert(70%) sepia(0%) saturate(5564%) hue-rotate(207deg) brightness(100%) contrast(97%)"),
|
12507
|
+
z.setPropertyValueIfDoesNotExist(e, ["submit", "container", "default", "backgroundColor"], ""), z.setPropertyValueIfDoesNotExist(e, ["disabled", "container", "default", "backgroundColor"], "unset"), z.setPropertyValueIfDoesNotExist(e.submit, ["svg", "styles", "default", "filter"], ""), z.setPropertyValueIfDoesNotExist(e.disabled, ["svg", "styles", "default", "filter"], "brightness(0) saturate(100%) invert(70%) sepia(0%) saturate(5564%) hue-rotate(207deg) brightness(100%) contrast(97%)"), Re.overwriteDefaultStyleWithSubmit(e, "disabled");
|
12501
12508
|
}
|
12502
12509
|
}, {
|
12503
12510
|
key: "process",
|
12504
12511
|
value: function process(e) {
|
12505
12512
|
var t = JSON.parse(JSON.stringify(e || {}));
|
12506
|
-
return
|
12513
|
+
return Re.overwriteDefaultStyleWithSubmit(t, "loading"), Re.overwriteDefaultStyleWithSubmit(t, "stop"), e != null && e.alwaysEnabled || Re.setUpDisabledButton(t), t;
|
12507
12514
|
}
|
12508
12515
|
}]);
|
12509
|
-
return
|
12516
|
+
return Re;
|
12510
12517
|
}();
|
12511
12518
|
var Si = /*#__PURE__*/function (_Tt4) {
|
12512
12519
|
_inherits(k, _Tt4);
|
@@ -12514,7 +12521,7 @@ var Si = /*#__PURE__*/function (_Tt4) {
|
|
12514
12521
|
function k(e, t, i, n, r) {
|
12515
12522
|
var _this66;
|
12516
12523
|
_classCallCheck(this, k);
|
12517
|
-
var o =
|
12524
|
+
var o = Re.process(e.submitButtonStyles);
|
12518
12525
|
_this66 = _callSuper(this, k, [k.createButtonContainerElement(), o == null ? void 0 : o.position, o]), _this66._isSVGLoadingIconOverriden = !1, _this66.status = {
|
12519
12526
|
requestInProgress: !1,
|
12520
12527
|
loadingActive: !1
|
@@ -12568,7 +12575,7 @@ var Si = /*#__PURE__*/function (_Tt4) {
|
|
12568
12575
|
abortStream: this._abortStream,
|
12569
12576
|
stopClicked: this._stopClicked
|
12570
12577
|
};
|
12571
|
-
var t = this._serviceIO.
|
12578
|
+
var t = this._serviceIO.stream;
|
12572
12579
|
_typeof(t) == "object" && typeof t.simulation == "number" && (this._serviceIO.streamHandlers.simulationInterim = t.simulation);
|
12573
12580
|
}
|
12574
12581
|
}, {
|
@@ -12618,14 +12625,14 @@ var Si = /*#__PURE__*/function (_Tt4) {
|
|
12618
12625
|
return _regeneratorRuntime().wrap(function _callee110$(_context110) {
|
12619
12626
|
while (1) switch (_context110.prev = _context110.next) {
|
12620
12627
|
case 0:
|
12621
|
-
typeof e == "string" && (e =
|
12628
|
+
typeof e == "string" && (e = Se.processSubmitUserMessage(e));
|
12622
12629
|
t = {
|
12623
12630
|
text: e.text
|
12624
12631
|
};
|
12625
12632
|
e.files && (t.files = Array.from(e.files).map(function (i) {
|
12626
12633
|
return {
|
12627
12634
|
file: i,
|
12628
|
-
type:
|
12635
|
+
type: fe.getTypeFromBlob(i)
|
12629
12636
|
};
|
12630
12637
|
})), setTimeout(function () {
|
12631
12638
|
return _this67.attemptSubmit(t, !0);
|
@@ -12741,7 +12748,6 @@ var Si = /*#__PURE__*/function (_Tt4) {
|
|
12741
12748
|
value: function changeToStopIcon() {
|
12742
12749
|
this._serviceIO.websocket || (this.elementRef.classList.remove(k.LOADING_CLASS, k.DISABLED_CLASS, k.SUBMIT_CLASS), this.elementRef.replaceChildren(this._innerElements.stop), this.reapplyStateStyle("stop", ["loading", "submit"]), this.elementRef.onclick = this.stopStream.bind(this), this.status.loadingActive = !1);
|
12743
12750
|
}
|
12744
|
-
// WORK - animation needs to be lowered
|
12745
12751
|
}, {
|
12746
12752
|
key: "changeToLoadingIcon",
|
12747
12753
|
value: function changeToLoadingIcon() {
|
@@ -12751,7 +12757,7 @@ var Si = /*#__PURE__*/function (_Tt4) {
|
|
12751
12757
|
}, {
|
12752
12758
|
key: "changeToSubmitIcon",
|
12753
12759
|
value: function changeToSubmitIcon() {
|
12754
|
-
this.elementRef.classList.contains(k.SUBMIT_CLASS) || (this.elementRef.classList.remove(k.LOADING_CLASS, k.DISABLED_CLASS), this.elementRef.classList.add(k.SUBMIT_CLASS), this.elementRef.replaceChildren(this._innerElements.submit),
|
12760
|
+
this.elementRef.classList.contains(k.SUBMIT_CLASS) || (this.elementRef.classList.remove(k.LOADING_CLASS, k.DISABLED_CLASS), this.elementRef.classList.add(k.SUBMIT_CLASS), this.elementRef.replaceChildren(this._innerElements.submit), Re.resetSubmit(this, this.status.loadingActive), this.elementRef.onclick = this.submitFromInput.bind(this));
|
12755
12761
|
}
|
12756
12762
|
// called every time when user triggers an input via ValidationHandler - hence use class to check if not already present
|
12757
12763
|
}, {
|
@@ -12973,7 +12979,7 @@ var mt = /*#__PURE__*/function () {
|
|
12973
12979
|
button: new ei(e, r, t.addNewErrorMessage.bind(t))
|
12974
12980
|
});
|
12975
12981
|
var l = new Aa(e, r.inputElementRef, t, i, a);
|
12976
|
-
r.submit = l.submitFromInput.bind(l),
|
12982
|
+
r.submit = l.submitFromInput.bind(l), Ie.attach(e, i, r, a, l), e.submitUserMessage = l.programmaticSubmit.bind(l), o.submit = {
|
12977
12983
|
button: l
|
12978
12984
|
}, mt.addElements(this.elementRef, r, o, n, a, e.dropupStyles);
|
12979
12985
|
}
|
@@ -13017,9 +13023,9 @@ var mt = /*#__PURE__*/function () {
|
|
13017
13023
|
d = _sa$a.id,
|
13018
13024
|
u = _sa$a.svgString,
|
13019
13025
|
h = _sa$a.dropupText,
|
13020
|
-
|
13026
|
+
f = new ft(n, c, l, d, u, h);
|
13021
13027
|
r[a] = {
|
13022
|
-
button:
|
13028
|
+
button: f,
|
13023
13029
|
fileType: c
|
13024
13030
|
};
|
13025
13031
|
}
|
@@ -13060,10 +13066,10 @@ var on = /*#__PURE__*/function () {
|
|
13060
13066
|
}]);
|
13061
13067
|
return on;
|
13062
13068
|
}();
|
13063
|
-
var Oa = "#validate-property-key-view{height:100%;position:relative;display:flex;justify-content:center;align-items:center;padding:8px}#large-loading-ring{display:inline-block;width:50px;height:50px}#large-loading-ring:after{content:\" \";display:block;width:38px;height:38px;margin:1px;border-radius:50%;border:5px solid #5fb2ff;border-color:#5fb2ff transparent #5fb2ff transparent;animation:large-loading-ring 1.4s linear infinite}@keyframes large-loading-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}#insert-key-view{height:100%;position:relative}#insert-key-contents{text-align:center;position:absolute;top:44%;left:50%;transform:translate(-50%,-50%);width:82%;display:flex;max-width:700px}#insert-key-title{margin-bottom:15px}#insert-key-input-container{margin-right:2.7em;width:calc(100% - 80px)}#insert-key-input{padding:.3em 1.7em .3em .3em;border-width:1px;border-style:solid;border-radius:3px;width:100%;font-size:inherit}.insert-key-input-valid{border-color:gray}.insert-key-input-invalid{border-color:red}#visibility-icon-container{position:relative;float:right;cursor:pointer;-webkit-user-select:none;user-select:none}.visibility-icon{filter:brightness(0) saturate(100%) invert(63%) sepia(1%) saturate(9%) hue-rotate(43deg) brightness(98%) contrast(92%);position:absolute;right:-1.7em;top:-1.43em}#visible-icon{top:-1.4em}.visibility-icon:hover{filter:unset}.visibility-icon>*{pointer-events:none}#start-button{border:1px solid grey;color:#454545;border-radius:4px;width:3em;display:flex;justify-content:center;align-items:center;cursor:pointer;padding:.28em .3em;-webkit-user-select:none;user-select:none;background-color:#fff}#start-button:hover{background-color:#f2f2f2}#start-button:active{background-color:#d2d2d2}#insert-key-help-text-container{width:100%;position:absolute;margin-top:32px;margin-bottom:20px}#insert-key-help-text-contents{width:100%;position:absolute}#insert-key-input-invalid-text{display:block;margin-top:1em;margin-bottom:.5em;color:red}.insert-key-input-help-text{display:block;margin-top:16px}#loading-ring{display:inline-block;width:16px;height:16px}#loading-ring:after{content:\" \";display:block;width:11px;height:11px;margin:1px;border-radius:50%;border:2px solid #0084ff;border-color:#0084ff transparent #0084ff transparent;animation:loading-ring 1.2s linear infinite}@keyframes loading-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}#error-view{color:red;font-size:1.2em;line-height:1.3em;margin-top:-5px;text-align:center;height:100%;display:flex;justify-content:center;align-items:center;padding-left:8px;padding-right:8px}.intro-panel{position:absolute;display:flex;justify-content:center;right:0;bottom:0;left:0;margin:auto;height:fit-content;top:-2.5em}#internal-intro-panel{width:250px;height:min-content;display:block;border-radius:5px;overflow:auto;border:1px solid rgb(203,203,203);padding:10px;max-height:calc(100% - 6.8em)}#internal-intro-panel>p{margin-block-start:.8em;margin-block-end:.8em}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!\n Theme: a11y-dark\n Author: @ericwbailey\n Maintainer: @ericwbailey\n\n Based on the Tomorrow Night Eighties theme: https://github.com/isagalaev/highlight.js/blob/master/src/styles/tomorrow-night-eighties.css\n*/.hljs{background:#2b2b2b;color:#f8f8f2}.hljs-comment,.hljs-quote{color:#d4d0ab}.hljs-deletion,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#ffa07a}.hljs-built_in,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#f5ab35}.hljs-attribute{color:gold}.hljs-addition,.hljs-bullet,.hljs-string,.hljs-symbol{color:#abe338}.hljs-section,.hljs-title{color:#00e0e0}.hljs-keyword,.hljs-selector-tag{color:#dcc6e0}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}@media screen and (-ms-high-contrast: active){.hljs-addition,.hljs-attribute,.hljs-built_in,.hljs-bullet,.hljs-comment,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-quote,.hljs-string,.hljs-symbol,.hljs-type{color:highlight}.hljs-keyword,.hljs-selector-tag{font-weight:700}}#messages{overflow:auto}.outer-message-container:last-child{margin-bottom:5px}.inner-message-container{display:flex;margin-left:auto;margin-right:auto;width:calc(97.5% - 24px);max-width:100%}.message-bubble{margin-top:10px;word-wrap:break-word;width:fit-content;max-width:60%;border-radius:10px;padding:.42em .55em;height:fit-content;line-height:1.26em}.user-message-text{color:#fff;background-color:#0084ff;margin-right:0;margin-left:auto}.ai-message-text{color:#000;background-color:#e4e6eb;margin-left:0;margin-right:auto}.html-message{max-width:unset}.error-message-text{margin:14px auto 10px;background-color:#f4c0c0;color:#474747;text-align:center;max-width:95%}.loading-message-text{width:1em;padding:.6em .75em .6em 1.3em}.message-bubble>p:first-child{margin-top:0}.message-bubble>p:last-child{margin-bottom:0}pre{overflow:auto;display:block;word-break:break-all;word-wrap:break-word;border-radius:7px;background:#2b2b2b;color:#f8f8f2;margin-top:.8em;margin-bottom:.8em;padding:.6em;font-size:.9em;line-height:1.5em}.image-message{padding:0;display:flex;background-color:#ddd}.image-message>*,.image-message>*>*{width:100%;border-radius:8px;display:flex}.audio-message{width:60%;max-width:300px;height:2.2em;max-height:54px;padding:0;background-color:unset}.audio-player{width:100%;height:100%}.audio-player-safari{height:fit-content;width:40px}.audio-player-safari-left{float:left}.audio-player-safari-right{float:right}.any-file-message-bubble{padding:1px}.any-file-message-contents{display:flex}.any-file-message-icon-container{width:1.3em;min-width:1.3em;position:relative;border-radius:4px;margin-left:6px;margin-right:2px}.any-file-message-icon{background-color:#fff;border-radius:4px;position:absolute;width:1em;height:1.25em;padding:1px;margin-top:auto;margin-bottom:auto;top:0;bottom:0}.any-file-message-text{padding-top:5px;overflow-wrap:anywhere;padding-bottom:5px;padding-right:7px}.message-bubble>a{color:inherit}.left-item-position{margin-right:10px}.right-item-position{margin-left:10px}.deep-chat-web-model-button{margin-top:10px;margin-bottom:5px;margin-left:1px}.avatar{padding-top:5px;width:1.5em;height:1.5em;border-radius:1px}.avatar-container{margin-top:9px}.name{margin-top:16px;font-size:15px}#drag-and-drop{position:absolute;display:none;z-index:10;height:calc(100% - 10px);width:calc(100% - 10px);background-color:#70c6ff4d;border:5px dashed #6dafff}#file-attachment-container{position:absolute;height:3.6em;width:calc(80% - 4px);top:-2.5em;border-radius:5px;overflow:auto;text-align:left;background-color:#d7d7d73b;padding-left:4px}.file-attachment{width:2.85em;height:2.85em;display:inline-flex;margin-right:.6em;margin-bottom:.44em;margin-top:4px;position:relative;background-color:#fff;border-radius:5px}.image-attachment{width:100%;height:100%;object-fit:cover;border-radius:5px}.border-bound-attachment{width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid #c3c3c3;border-radius:5px;overflow:hidden}.border-bound-attachment-safari{width:calc(100% - 1px);height:calc(100% - 1px)}.audio-attachment-icon-container{cursor:pointer}.audio-attachment-icon-container:hover{background-color:#f8f8f8}.attachment-icon{left:0;right:0;bottom:0;top:2px;margin:auto;position:absolute;width:25px;-webkit-user-select:none;user-select:none}.not-removable-attachment-icon{top:0;right:0;bottom:0;left:0}.play-icon{filter:brightness(0) saturate(100%) invert(17%) sepia(0%) saturate(1392%) hue-rotate(67deg) brightness(98%) contrast(97%)}.stop-icon{filter:brightness(0) saturate(100%) invert(29%) sepia(90%) saturate(1228%) hue-rotate(198deg) brightness(93%) contrast(98%)}.audio-placeholder-text-3-digits{padding-left:.26rem}.audio-placeholder-text-4-digits{padding-left:.1rem}.any-file-attachment{padding:2px 0}.file-attachment-text-container{position:absolute;width:inherit;display:flex;align-items:center;height:100%;top:-1px}.audio-placeholder-text-3-digits-container{padding-top:1px;cursor:default}.any-file-attachment-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;padding-left:.13em;margin-left:auto;margin-right:auto}.remove-file-attachment-button{height:1.25em;width:1.25em;border:1px solid #cfcfcf;border-radius:25px;background-color:#fff;top:-4px;right:-5px;position:absolute;display:flex;justify-content:center;cursor:pointer;-webkit-user-select:none;user-select:none}.remove-file-attachment-button:hover{background-color:#e4e4e4}.remove-file-attachment-button:active{background-color:#d7d7d7}.x-icon{color:#4e4e4e;top:-.075em;position:relative;font-size:1.05em}.modal{display:none;flex-direction:column;align-items:center;justify-content:center;position:absolute;width:80%;max-width:420px;max-height:80%;margin:auto;top:0;right:0;bottom:0;left:0;z-index:2}.modal-content{border-top:1px solid rgb(217,217,217);border-left:1px solid rgb(217,217,217);border-right:1px solid rgb(217,217,217);border-top-left-radius:inherit;border-top-right-radius:inherit;background-color:#fff;overflow-y:auto;height:fit-content;max-height:calc(100% - 3.3em);width:100%}.modal-content>p{margin-left:1em;margin-right:1em}.modal-content>ul{margin-right:1em}.modal-button-panel{height:3.3em;border:1px solid;border-color:rgb(223,223,223) rgb(217,217,217) rgb(217,217,217);border-bottom-left-radius:inherit;border-bottom-right-radius:inherit;background-color:#fff;text-align:center;justify-content:center;display:flex;width:100%}.modal-button{min-width:2.5em;text-align:center;color:#fff;border-radius:5px;padding:.4em .4em .3em;height:1.25em;background-color:#3279b2;top:0;bottom:0;cursor:pointer;-webkit-user-select:none;user-select:none;margin:auto .31em}.modal-button:hover{background-color:#276da7}.modal-button:active{background-color:#1b5687}.modal-svg-button{padding:0 0 2px;width:2em;height:1.8em}.modal-svg-button-icon{width:100%;height:100%;filter:brightness(0) saturate(100%) invert(100%) sepia(15%) saturate(4%) hue-rotate(346deg) brightness(101%) contrast(102%)}#modal-background-panel{position:absolute;width:100%;height:100%;background-color:#00000042;z-index:1;display:none}.show-modal-background{animation:fadeInBackground .3s ease-in-out}@keyframes fadeInBackground{0%{opacity:0}to{opacity:1}}.show-modal{animation:fadeInModal .3s ease-in-out}@keyframes fadeInModal{0%{opacity:0;scale:.95}to{opacity:1;scale:1}}.hide-modal-background{animation:fadeOutBackground .2s ease-in-out}@keyframes fadeOutBackground{0%{opacity:1}to{opacity:0}}.hide-modal{animation:fadeOutModal .2s ease-in-out}@keyframes fadeOutModal{0%{opacity:1;scale:1}to{opacity:0;scale:.95}}.modal-camera-content{overflow:hidden;text-align:center;border:unset;height:100%;background-color:#2a2a2a;display:flex;justify-content:center}.camera-modal-canvas{max-width:100%;max-height:100%;margin-top:auto;margin-bottom:auto}.modal-svg-submit-button{background-color:green}.modal-svg-submit-button:hover{background-color:#007500}.modal-svg-submit-button:active{background-color:#006500}.modal-svg-submit-disabled{pointer-events:none;background-color:#747474}.modal-svg-close-button{height:1.56em;padding-top:.37em;padding-bottom:0;background-color:#c13e3e}.modal-svg-close-button:hover{background-color:#b43434}.modal-svg-close-button:active{background-color:#972929}.modal-svg-close-icon{width:80%;height:80%}.modal-svg-camera-button{height:1.6em;padding-top:.38em;padding-bottom:0}.modal-svg-camera-icon{height:76%}.modal-svg-refresh-icon{height:105%}.modal-svg-refresh-button{height:1.66em;padding-top:.11em;padding-bottom:.21em}.input-button-container{position:relative;z-index:1}.inside-right{position:absolute;right:calc(10% + .35em);bottom:.85em}.inside-left{position:absolute;left:calc(10% + .35em);bottom:.85em}.outside-left{position:absolute;right:calc(11px - .55em);bottom:.88em}.outside-right{position:absolute;left:calc(11px - .55em);bottom:.88em}#upload-images-icon{position:absolute;pointer-events:none;width:1.45em;height:1.45em;left:.11em;bottom:.08em;filter:brightness(0) saturate(100%) invert(43%) sepia(0%) saturate(740%) hue-rotate(77deg) brightness(99%) contrast(92%)}#upload-gifs-icon{position:absolute;pointer-events:none;width:1.5em;height:1.48em;left:.07em;bottom:.08em;filter:brightness(0) saturate(100%) invert(49%) sepia(0%) saturate(2586%) hue-rotate(12deg) brightness(93%) contrast(90%)}#upload-audio-icon{position:absolute;pointer-events:none;width:1.21em;height:1.21em;left:.17em;bottom:.2em;filter:brightness(0) saturate(100%) invert(15%) sepia(0%) saturate(337%) hue-rotate(125deg) brightness(91%) contrast(94%);transform:scaleX(.95)}#camera-icon{position:absolute;pointer-events:none;width:1.21em;height:1.21em;left:.23em;bottom:.2em;filter:brightness(0) saturate(100%) invert(52%) sepia(0%) saturate(161%) hue-rotate(164deg) brightness(91%) contrast(92%);transform:scaleX(.95)}#upload-mixed-files-icon{position:absolute;pointer-events:none;width:1.21em;height:1.21em;left:.25em;bottom:.2em;filter:brightness(0) saturate(100%) invert(53%) sepia(0%) saturate(36%) hue-rotate(74deg) brightness(98%) contrast(93%);transform:scaleX(.95)}#interim-text{color:gray}#microphone-button{padding-top:.5px}.outer-button-container>#microphone-button{padding-bottom:1px}#microphone-icon{position:absolute;pointer-events:none;width:1.21em;height:1.21em;left:.25em;bottom:.25em}.default-microphone-icon{filter:brightness(0) saturate(100%) invert(32%) sepia(0%) saturate(924%) hue-rotate(46deg) brightness(95%) contrast(99%)}.active-microphone-icon{filter:brightness(0) saturate(100%) invert(10%) sepia(97%) saturate(7495%) hue-rotate(0deg) brightness(101%) contrast(107%);border-radius:10px}.command-microphone-icon{filter:brightness(0) saturate(100%) invert(42%) sepia(96%) saturate(1067%) hue-rotate(77deg) brightness(99%) contrast(102%)}.unsupported-microphone{display:none}#submit-icon{height:100%;filter:brightness(0) saturate(100%) invert(32%) sepia(0%) saturate(924%) hue-rotate(46deg) brightness(95%) contrast(99%);width:1.21em}#stop-icon{background-color:#acacac;position:absolute;width:.95em;height:.95em;left:.35em;bottom:.35em;border-radius:2px}.submit-button-enlarged{scale:1.1;margin-right:.3em;margin-left:.3em}.dots-jumping{position:relative;left:calc(-9990px + .275em);width:.22em;height:.22em;border-radius:5px;background-color:#848484;color:#848484;box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484;animation:dots-jumping 1.5s infinite linear;bottom:-.7em}@keyframes dots-jumping{0%{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}16.667%{box-shadow:9990px -6px #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}33.333%{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}50%{box-shadow:9990px 0 #848484,calc(9990px + .44em) -6px 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}66.667%{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}83.333%{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) -6px 0 0 #848484}to{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}}.dots-flashing{position:relative;width:.45em;height:.45em;border-radius:5px;background-color:var(--message-dots-color);color:var(--message-dots-color);animation:dots-flashing 1s infinite linear alternate;animation-delay:.5s}.dots-flashing:before,.dots-flashing:after{content:\"\";display:inline-block;position:absolute;top:0}.dots-flashing:before{left:-.7em;width:.45em;height:.45em;border-radius:5px;background-color:var(--message-dots-color);color:var(--message-dots-color);animation:dots-flashing 1s infinite alternate;animation-delay:0s}.dots-flashing:after{left:.7em;width:.45em;height:.45em;border-radius:5px;background-color:var(--message-dots-color);color:var(--message-dots-color);animation:dots-flashing 1s infinite alternate;animation-delay:1s}@keyframes dots-flashing{0%{background-color:var(--message-dots-color)}50%,to{background-color:var(--message-dots-color-fade)}}.input-button{border-radius:4px;cursor:pointer;margin-bottom:.2em;-webkit-user-select:none;user-select:none}.input-button-svg{width:1.65em;height:1.65em}.input-button:hover{background-color:#9c9c9c2e}.input-button:active{background-color:#9c9c9c5e}.loading-button{cursor:auto}.loading-button:hover{background-color:unset}.text-button{filter:unset!important;display:flex;justify-content:center;align-items:center;margin-left:4px;margin-right:4px;height:1.6em}#text-input-container{background-color:#fff;width:80%;display:flex;border:1px solid #0000001a;border-radius:5px;margin-top:.8em;margin-bottom:.8em;box-shadow:#959da533 0 1px 12px;overflow-y:auto;max-height:200px;position:relative}.text-input-container-left-adjustment{margin-left:1.5em}.text-input-container-right-adjustment{margin-right:1.5em}.text-input-container-left-small-adjustment{margin-left:1.1em}.text-input-container-left-small-adjustment>.outside-left{right:calc(14px - .55em)}.text-input-container-right-small-adjustment{margin-right:1.1em}.text-input-container-right-small-adjustment>.outside-right{left:calc(14px - .55em)}#text-input{text-align:left;outline:none;word-wrap:break-word;line-break:auto}.text-input-styling{padding:.4em .5em;overflow:overlay;width:100%}.text-input-inner-left-adjustment{padding-left:2.2em}.text-input-inner-right-adjustment{padding-right:2em}.text-input-disabled{pointer-events:none;-webkit-user-select:none;user-select:none}.text-input-placeholder{color:gray}.outside-right>#dropup-menu,.inside-right>#dropup-menu{right:0}#dropup-icon{position:absolute;pointer-events:none;width:1.16em;height:1.2em;left:.265em;bottom:.43em;filter:brightness(0) saturate(100%) invert(54%) sepia(0%) saturate(724%) hue-rotate(6deg) brightness(92%) contrast(90%)}#dropup-menu{background-color:#fff;position:absolute;transform:translateY(-100%);border-radius:5px;z-index:1;top:-.49em;box-shadow:#0003 -1px 2px 10px,#0000001a 0 2px 4px;cursor:pointer;-webkit-user-select:none;user-select:none}.dropup-menu-item{height:1.4em;padding:.28em .84em .28em .35em;display:flex;position:relative}.dropup-menu-item:first-child{padding-top:.49em;border-top-left-radius:inherit;border-top-right-radius:inherit}.dropup-menu-item:last-child{padding-bottom:.45em;border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.dropup-menu-item-icon{width:1.39em;position:relative;margin-right:.56em}.dropup-menu-item-icon>svg{bottom:0!important;top:0!important;margin-bottom:auto;margin-top:auto}.dropup-menu-item-text{margin-top:.08em;width:max-content}#input{width:100%;display:inline-flex;text-align:center;margin-left:auto;margin-right:auto;margin-top:auto;position:relative;justify-content:center}#chat-view{height:100%;display:grid;grid-template-columns:100%}::-webkit-scrollbar{width:9px;height:9px}::-webkit-scrollbar-thumb{background-color:#d0d0d0;border-radius:5px}::-webkit-scrollbar-track{background-color:#f2f2f2}:host{all:initial;display:table-cell}#container{height:inherit;width:inherit;overflow:hidden}\n";
|
13069
|
+
var Oa = "#validate-property-key-view{height:100%;position:relative;display:flex;justify-content:center;align-items:center;padding:8px}#large-loading-ring{display:inline-block;width:50px;height:50px}#large-loading-ring:after{content:\" \";display:block;width:38px;height:38px;margin:1px;border-radius:50%;border:5px solid #5fb2ff;border-color:#5fb2ff transparent #5fb2ff transparent;animation:large-loading-ring 1.4s linear infinite}@keyframes large-loading-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}#insert-key-view{height:100%;position:relative}#insert-key-contents{text-align:center;position:absolute;top:44%;left:50%;transform:translate(-50%,-50%);width:82%;display:flex;max-width:700px}#insert-key-title{margin-bottom:15px}#insert-key-input-container{margin-right:2.7em;width:calc(100% - 80px)}#insert-key-input{padding:.3em 1.7em .3em .3em;border-width:1px;border-style:solid;border-radius:3px;width:100%;font-size:inherit}.insert-key-input-valid{border-color:gray}.insert-key-input-invalid{border-color:red}#visibility-icon-container{position:relative;float:right;cursor:pointer;-webkit-user-select:none;user-select:none}.visibility-icon{filter:brightness(0) saturate(100%) invert(63%) sepia(1%) saturate(9%) hue-rotate(43deg) brightness(98%) contrast(92%);position:absolute;right:-1.7em;top:-1.43em}#visible-icon{top:-1.4em}.visibility-icon:hover{filter:unset}.visibility-icon>*{pointer-events:none}#start-button{border:1px solid grey;color:#454545;border-radius:4px;width:3em;display:flex;justify-content:center;align-items:center;cursor:pointer;padding:.28em .3em;-webkit-user-select:none;user-select:none;background-color:#fff}#start-button:hover{background-color:#f2f2f2}#start-button:active{background-color:#d2d2d2}#insert-key-help-text-container{width:100%;position:absolute;margin-top:32px;margin-bottom:20px}#insert-key-help-text-contents{width:100%;position:absolute}#insert-key-input-invalid-text{display:block;margin-top:1em;margin-bottom:.5em;color:red}.insert-key-input-help-text{display:block;margin-top:16px}#loading-ring{display:inline-block;width:16px;height:16px}#loading-ring:after{content:\" \";display:block;width:11px;height:11px;margin:1px;border-radius:50%;border:2px solid #0084ff;border-color:#0084ff transparent #0084ff transparent;animation:loading-ring 1.2s linear infinite}@keyframes loading-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}#error-view{color:red;font-size:1.2em;line-height:1.3em;margin-top:-5px;text-align:center;height:100%;display:flex;justify-content:center;align-items:center;padding-left:8px;padding-right:8px}.intro-panel{position:absolute;display:flex;justify-content:center;right:0;bottom:0;left:0;margin:auto;height:fit-content;top:-2.5em}#internal-intro-panel{width:250px;height:min-content;display:block;border-radius:5px;overflow:auto;border:1px solid rgb(203,203,203);padding:10px;max-height:calc(100% - 6.8em)}#internal-intro-panel>p{margin-block-start:.8em;margin-block-end:.8em}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!\n Theme: a11y-dark\n Author: @ericwbailey\n Maintainer: @ericwbailey\n\n Based on the Tomorrow Night Eighties theme: https://github.com/isagalaev/highlight.js/blob/master/src/styles/tomorrow-night-eighties.css\n*/.hljs{background:#2b2b2b;color:#f8f8f2}.hljs-comment,.hljs-quote{color:#d4d0ab}.hljs-deletion,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#ffa07a}.hljs-built_in,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#f5ab35}.hljs-attribute{color:gold}.hljs-addition,.hljs-bullet,.hljs-string,.hljs-symbol{color:#abe338}.hljs-section,.hljs-title{color:#00e0e0}.hljs-keyword,.hljs-selector-tag{color:#dcc6e0}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}@media screen and (-ms-high-contrast: active){.hljs-addition,.hljs-attribute,.hljs-built_in,.hljs-bullet,.hljs-comment,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-quote,.hljs-string,.hljs-symbol,.hljs-type{color:highlight}.hljs-keyword,.hljs-selector-tag{font-weight:700}}#messages{overflow:auto}.outer-message-container:last-child{margin-bottom:5px}.inner-message-container{display:flex;margin-left:auto;margin-right:auto;width:calc(97.5% - 24px);max-width:100%}.message-bubble{margin-top:10px;word-wrap:break-word;width:fit-content;max-width:60%;border-radius:10px;padding:.42em .55em;height:fit-content;line-height:1.26em}.user-message-text{color:#fff;background-color:#0084ff;margin-right:0;margin-left:auto}.ai-message-text{color:#000;background-color:#e4e6eb;margin-left:0;margin-right:auto}.html-message{max-width:unset}.error-message-text{margin:14px auto 10px;background-color:#f4c0c0;color:#474747;text-align:center;max-width:95%}.loading-message-text{width:1em;padding:.6em .75em .6em 1.3em}.message-bubble>p:first-child{margin-top:0}.message-bubble>p:last-child{margin-bottom:0}pre{overflow:auto;display:block;word-break:break-all;word-wrap:break-word;border-radius:7px;background:#2b2b2b;color:#f8f8f2;margin-top:.8em;margin-bottom:.8em;padding:.6em;font-size:.9em;line-height:1.5em}.image-message{padding:0;display:flex;background-color:#ddd}.image-message>*,.image-message>*>*{width:100%;border-radius:8px;display:flex}.audio-message{width:60%;max-width:300px;height:2.2em;max-height:54px;padding:0;background-color:unset}.audio-player{width:100%;height:100%}.audio-player-safari{height:fit-content;width:40px}.audio-player-safari-left{float:left}.audio-player-safari-right{float:right}.any-file-message-bubble{padding:1px}.any-file-message-contents{display:flex}.any-file-message-icon-container{width:1.3em;min-width:1.3em;position:relative;border-radius:4px;margin-left:6px;margin-right:2px}.any-file-message-icon{background-color:#fff;border-radius:4px;position:absolute;width:1em;height:1.25em;padding:1px;margin-top:auto;margin-bottom:auto;top:0;bottom:0}.any-file-message-text{padding-top:5px;overflow-wrap:anywhere;padding-bottom:5px;padding-right:7px}.message-bubble>a{color:inherit}.left-item-position{margin-right:10px}.right-item-position{margin-left:10px}.deep-chat-web-model-button{margin-top:10px;margin-bottom:5px;margin-left:1px}.avatar{padding-top:5px;width:1.5em;height:1.5em;border-radius:1px}.avatar-container{margin-top:9px}.name{margin-top:16px;font-size:15px}#drag-and-drop{position:absolute;display:none;z-index:10;height:calc(100% - 10px);width:calc(100% - 10px);background-color:#70c6ff4d;border:5px dashed #6dafff}#file-attachment-container{position:absolute;height:3.6em;width:calc(80% - 4px);top:-2.5em;border-radius:5px;overflow:auto;text-align:left;background-color:#d7d7d73b;padding-left:4px}.file-attachment{width:2.85em;height:2.85em;display:inline-flex;margin-right:.6em;margin-bottom:.44em;margin-top:4px;position:relative;background-color:#fff;border-radius:5px}.image-attachment{width:100%;height:100%;object-fit:cover;border-radius:5px}.border-bound-attachment{width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid #c3c3c3;border-radius:5px;overflow:hidden}.border-bound-attachment-safari{width:calc(100% - 1px);height:calc(100% - 1px)}.audio-attachment-icon-container{cursor:pointer}.audio-attachment-icon-container:hover{background-color:#f8f8f8}.attachment-icon{left:0;right:0;bottom:0;top:2px;margin:auto;position:absolute;width:25px;-webkit-user-select:none;user-select:none}.not-removable-attachment-icon{top:0;right:0;bottom:0;left:0}.play-icon{filter:brightness(0) saturate(100%) invert(17%) sepia(0%) saturate(1392%) hue-rotate(67deg) brightness(98%) contrast(97%)}.stop-icon{filter:brightness(0) saturate(100%) invert(29%) sepia(90%) saturate(1228%) hue-rotate(198deg) brightness(93%) contrast(98%)}.audio-placeholder-text-3-digits{padding-left:.26rem}.audio-placeholder-text-4-digits{padding-left:.1rem}.any-file-attachment{padding:2px 0}.file-attachment-text-container{position:absolute;width:inherit;display:flex;align-items:center;height:100%;top:-1px}.audio-placeholder-text-3-digits-container{padding-top:1px;cursor:default}.any-file-attachment-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;padding-left:.13em;margin-left:auto;margin-right:auto}.remove-file-attachment-button{height:1.25em;width:1.25em;border:1px solid #cfcfcf;border-radius:25px;background-color:#fff;top:-4px;right:-5px;position:absolute;display:flex;justify-content:center;cursor:pointer;-webkit-user-select:none;user-select:none}.remove-file-attachment-button:hover{background-color:#e4e4e4}.remove-file-attachment-button:active{background-color:#d7d7d7}.x-icon{color:#4e4e4e;top:-.075em;position:relative;font-size:1.05em}.modal{display:none;flex-direction:column;align-items:center;justify-content:center;position:absolute;width:80%;max-width:420px;max-height:80%;margin:auto;top:0;right:0;bottom:0;left:0;z-index:2}.modal-content{border-top:1px solid rgb(217,217,217);border-left:1px solid rgb(217,217,217);border-right:1px solid rgb(217,217,217);border-top-left-radius:inherit;border-top-right-radius:inherit;background-color:#fff;overflow-y:auto;height:fit-content;max-height:calc(100% - 3.3em);width:100%}.modal-content>p{margin-left:1em;margin-right:1em}.modal-content>ul{margin-right:1em}.modal-button-panel{height:3.3em;border:1px solid;border-color:rgb(223,223,223) rgb(217,217,217) rgb(217,217,217);border-bottom-left-radius:inherit;border-bottom-right-radius:inherit;background-color:#fff;text-align:center;justify-content:center;display:flex;width:100%}.modal-button{min-width:2.5em;text-align:center;color:#fff;border-radius:5px;padding:.4em .4em .3em;height:1.25em;background-color:#3279b2;top:0;bottom:0;cursor:pointer;-webkit-user-select:none;user-select:none;margin:auto .31em}.modal-button:hover{background-color:#276da7}.modal-button:active{background-color:#1b5687}.modal-svg-button{padding:0 0 2px;width:2em;height:1.8em}.modal-svg-button-icon{width:100%;height:100%;filter:brightness(0) saturate(100%) invert(100%) sepia(15%) saturate(4%) hue-rotate(346deg) brightness(101%) contrast(102%)}#modal-background-panel{position:absolute;width:100%;height:100%;background-color:#00000042;z-index:1;display:none}.show-modal-background{animation:fadeInBackground .3s ease-in-out}@keyframes fadeInBackground{0%{opacity:0}to{opacity:1}}.show-modal{animation:fadeInModal .3s ease-in-out}@keyframes fadeInModal{0%{opacity:0;scale:.95}to{opacity:1;scale:1}}.hide-modal-background{animation:fadeOutBackground .2s ease-in-out}@keyframes fadeOutBackground{0%{opacity:1}to{opacity:0}}.hide-modal{animation:fadeOutModal .2s ease-in-out}@keyframes fadeOutModal{0%{opacity:1;scale:1}to{opacity:0;scale:.95}}.modal-camera-content{overflow:hidden;text-align:center;border:unset;height:100%;background-color:#2a2a2a;display:flex;justify-content:center}.camera-modal-canvas{max-width:100%;max-height:100%;margin-top:auto;margin-bottom:auto}.modal-svg-submit-button{background-color:green}.modal-svg-submit-button:hover{background-color:#007500}.modal-svg-submit-button:active{background-color:#006500}.modal-svg-submit-disabled{pointer-events:none;background-color:#747474}.modal-svg-close-button{height:1.56em;padding-top:.37em;padding-bottom:0;background-color:#c13e3e}.modal-svg-close-button:hover{background-color:#b43434}.modal-svg-close-button:active{background-color:#972929}.modal-svg-close-icon{width:80%;height:80%}.modal-svg-camera-button{height:1.6em;padding-top:.38em;padding-bottom:0}.modal-svg-camera-icon{height:76%}.modal-svg-refresh-icon{height:105%}.modal-svg-refresh-button{height:1.66em;padding-top:.11em;padding-bottom:.21em}.input-button-container{position:relative;z-index:1}.inside-right{position:absolute;right:calc(10% + .35em);bottom:.85em}.inside-left{position:absolute;left:calc(10% + .35em);bottom:.85em}.outside-left{position:absolute;right:calc(11px - .55em);bottom:.88em}.outside-right{position:absolute;left:calc(11px - .55em);bottom:.88em}#upload-images-icon{position:absolute;pointer-events:none;width:1.45em;height:1.45em;left:.11em;bottom:.08em;filter:brightness(0) saturate(100%) invert(43%) sepia(0%) saturate(740%) hue-rotate(77deg) brightness(99%) contrast(92%)}#upload-gifs-icon{position:absolute;pointer-events:none;width:1.5em;height:1.48em;left:.07em;bottom:.08em;filter:brightness(0) saturate(100%) invert(49%) sepia(0%) saturate(2586%) hue-rotate(12deg) brightness(93%) contrast(90%)}#upload-audio-icon{position:absolute;pointer-events:none;width:1.21em;height:1.21em;left:.17em;bottom:.2em;filter:brightness(0) saturate(100%) invert(15%) sepia(0%) saturate(337%) hue-rotate(125deg) brightness(91%) contrast(94%);transform:scaleX(.95)}#camera-icon{position:absolute;pointer-events:none;width:1.21em;height:1.21em;left:.23em;bottom:.2em;filter:brightness(0) saturate(100%) invert(52%) sepia(0%) saturate(161%) hue-rotate(164deg) brightness(91%) contrast(92%);transform:scaleX(.95)}#upload-mixed-files-icon{position:absolute;pointer-events:none;width:1.21em;height:1.21em;left:.25em;bottom:.2em;filter:brightness(0) saturate(100%) invert(53%) sepia(0%) saturate(36%) hue-rotate(74deg) brightness(98%) contrast(93%);transform:scaleX(.95)}#interim-text{color:gray}#microphone-button{padding-top:.5px}.outer-button-container>#microphone-button{padding-bottom:1px}#microphone-icon{position:absolute;pointer-events:none;width:1.21em;height:1.21em;left:.25em;bottom:.25em}.default-microphone-icon{filter:brightness(0) saturate(100%) invert(32%) sepia(0%) saturate(924%) hue-rotate(46deg) brightness(95%) contrast(99%)}.active-microphone-icon{filter:brightness(0) saturate(100%) invert(10%) sepia(97%) saturate(7495%) hue-rotate(0deg) brightness(101%) contrast(107%);border-radius:10px}.command-microphone-icon{filter:brightness(0) saturate(100%) invert(42%) sepia(96%) saturate(1067%) hue-rotate(77deg) brightness(99%) contrast(102%)}.unsupported-microphone{display:none}#submit-icon{height:100%;filter:brightness(0) saturate(100%) invert(32%) sepia(0%) saturate(924%) hue-rotate(46deg) brightness(95%) contrast(99%);width:1.21em}#stop-icon{background-color:#acacac;position:absolute;width:.95em;height:.95em;left:.35em;bottom:.35em;border-radius:2px}.submit-button-enlarged{scale:1.1;margin-right:.3em;margin-left:.3em}.dots-jumping{position:relative;left:calc(-9990px + .275em);width:.22em;height:.22em;border-radius:5px;background-color:#848484;color:#848484;box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484;animation:dots-jumping 1.5s infinite linear;bottom:-.75em}@keyframes dots-jumping{0%{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}16.667%{box-shadow:9990px -6px #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}33.333%{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}50%{box-shadow:9990px 0 #848484,calc(9990px + .44em) -6px 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}66.667%{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}83.333%{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) -6px 0 0 #848484}to{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}}.dots-flashing{position:relative;width:.45em;height:.45em;border-radius:5px;background-color:var(--message-dots-color);color:var(--message-dots-color);animation:dots-flashing 1s infinite linear alternate;animation-delay:.5s}.dots-flashing:before,.dots-flashing:after{content:\"\";display:inline-block;position:absolute;top:0}.dots-flashing:before{left:-.7em;width:.45em;height:.45em;border-radius:5px;background-color:var(--message-dots-color);color:var(--message-dots-color);animation:dots-flashing 1s infinite alternate;animation-delay:0s}.dots-flashing:after{left:.7em;width:.45em;height:.45em;border-radius:5px;background-color:var(--message-dots-color);color:var(--message-dots-color);animation:dots-flashing 1s infinite alternate;animation-delay:1s}@keyframes dots-flashing{0%{background-color:var(--message-dots-color)}50%,to{background-color:var(--message-dots-color-fade)}}.input-button{border-radius:4px;cursor:pointer;margin-bottom:.2em;-webkit-user-select:none;user-select:none}.input-button-svg{width:1.65em;height:1.65em}.input-button:hover{background-color:#9c9c9c2e}.input-button:active{background-color:#9c9c9c5e}.loading-button{cursor:auto}.loading-button:hover{background-color:unset}.text-button{filter:unset!important;display:flex;justify-content:center;align-items:center;margin-left:4px;margin-right:4px;height:1.6em}#text-input-container{background-color:#fff;width:80%;display:flex;border:1px solid #0000001a;border-radius:5px;margin-top:.8em;margin-bottom:.8em;box-shadow:#959da533 0 1px 12px;overflow-y:auto;max-height:200px;position:relative}.text-input-container-left-adjustment{margin-left:1.5em}.text-input-container-right-adjustment{margin-right:1.5em}.text-input-container-left-small-adjustment{margin-left:1.1em}.text-input-container-left-small-adjustment>.outside-left{right:calc(14px - .55em)}.text-input-container-right-small-adjustment{margin-right:1.1em}.text-input-container-right-small-adjustment>.outside-right{left:calc(14px - .55em)}#text-input{text-align:left;outline:none;word-wrap:break-word;line-break:auto}.text-input-styling{padding:.4em .5em;overflow:overlay;width:100%}.text-input-inner-left-adjustment{padding-left:2.2em}.text-input-inner-right-adjustment{padding-right:2em}.text-input-disabled{pointer-events:none;-webkit-user-select:none;user-select:none}.text-input-placeholder{color:gray}.outside-right>#dropup-menu,.inside-right>#dropup-menu{right:0}#dropup-icon{position:absolute;pointer-events:none;width:1.16em;height:1.2em;left:.265em;bottom:.43em;filter:brightness(0) saturate(100%) invert(54%) sepia(0%) saturate(724%) hue-rotate(6deg) brightness(92%) contrast(90%)}#dropup-menu{background-color:#fff;position:absolute;transform:translateY(-100%);border-radius:5px;z-index:1;top:-.49em;box-shadow:#0003 -1px 2px 10px,#0000001a 0 2px 4px;cursor:pointer;-webkit-user-select:none;user-select:none}.dropup-menu-item{height:1.4em;padding:.28em .84em .28em .35em;display:flex;position:relative}.dropup-menu-item:first-child{padding-top:.49em;border-top-left-radius:inherit;border-top-right-radius:inherit}.dropup-menu-item:last-child{padding-bottom:.45em;border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.dropup-menu-item-icon{width:1.39em;position:relative;margin-right:.56em}.dropup-menu-item-icon>svg{bottom:0!important;top:0!important;margin-bottom:auto;margin-top:auto}.dropup-menu-item-text{margin-top:.08em;width:max-content}#input{width:100%;display:inline-flex;text-align:center;margin-left:auto;margin-right:auto;margin-top:auto;position:relative;justify-content:center}#chat-view{height:100%;display:grid;grid-template-columns:100%}::-webkit-scrollbar{width:9px;height:9px}::-webkit-scrollbar-thumb{background-color:#d0d0d0;border-radius:5px}::-webkit-scrollbar-track{background-color:#f2f2f2}:host{all:initial;display:table-cell}#container{height:inherit;width:inherit;overflow:hidden}\n";
|
13064
13070
|
var Pa = Object.defineProperty,
|
13065
13071
|
Da = Object.getOwnPropertyDescriptor,
|
13066
|
-
|
13072
|
+
_ = function _(s, e, t, i) {
|
13067
13073
|
for (var n = i > 1 ? void 0 : i ? Da(e, t) : e, r = s.length - 1, o; r >= 0; r--) (o = s[r]) && (n = (i ? o(e, t, n) : o(n)) || n);
|
13068
13074
|
return i && n && Pa(e, t, n), n;
|
13069
13075
|
};
|
@@ -13097,7 +13103,7 @@ var y = /*#__PURE__*/function (_So) {
|
|
13097
13103
|
key: "onRender",
|
13098
13104
|
value: function onRender() {
|
13099
13105
|
var _this$_childElement;
|
13100
|
-
(!this._activeService || this._activeService.demo) && (this._activeService = $o.create(this)), this.auxiliaryStyle && !this._auxiliaryStyleApplied && (wi.apply(this.auxiliaryStyle, this.shadowRoot), this._auxiliaryStyleApplied = !0), wi.applyDefaultStyleToComponent(this.style, this.chatStyle),
|
13106
|
+
(!this._activeService || this._activeService.demo) && (this._activeService = $o.create(this)), this.auxiliaryStyle && !this._auxiliaryStyleApplied && (wi.apply(this.auxiliaryStyle, this.shadowRoot), this._auxiliaryStyleApplied = !0), wi.applyDefaultStyleToComponent(this.style, this.chatStyle), Se.checkForContainerStyles(this, this._elementRef), this._activeService.key && this._activeService.validateConfigKey ? Bt.render(this._elementRef, this.changeToChatView.bind(this), this._activeService) : !(this._activeService instanceof U) || this._activeService.key ? ((_this$_childElement = this._childElement) !== null && _this$_childElement !== void 0 ? _this$_childElement : this._childElement = this.children[0], on.render(this, this._elementRef, this._activeService, this._childElement)) : this._activeService instanceof U && P.render(this._elementRef, this.changeToChatView.bind(this), this._activeService), this._hasBeenRendered = !0, zt.onRender(this);
|
13101
13107
|
}
|
13102
13108
|
}, {
|
13103
13109
|
key: "disconnectedCallback",
|
@@ -13107,44 +13113,43 @@ var y = /*#__PURE__*/function (_So) {
|
|
13107
13113
|
}]);
|
13108
13114
|
return y;
|
13109
13115
|
}(So);
|
13110
|
-
|
13111
|
-
|
13112
|
-
|
13113
|
-
|
13114
|
-
|
13115
|
-
|
13116
|
-
|
13117
|
-
|
13118
|
-
|
13119
|
-
|
13120
|
-
|
13121
|
-
|
13122
|
-
|
13123
|
-
|
13124
|
-
|
13125
|
-
|
13126
|
-
|
13127
|
-
|
13128
|
-
|
13129
|
-
|
13130
|
-
|
13131
|
-
|
13132
|
-
|
13133
|
-
|
13134
|
-
|
13135
|
-
|
13136
|
-
|
13137
|
-
|
13138
|
-
|
13139
|
-
|
13140
|
-
|
13141
|
-
|
13142
|
-
|
13143
|
-
|
13144
|
-
|
13145
|
-
|
13146
|
-
|
13147
|
-
|
13148
|
-
E([x("object")], y.prototype, "_insertKeyViewStyles", 2);
|
13116
|
+
_([E("object")], y.prototype, "directConnection", 2);
|
13117
|
+
_([E("object")], y.prototype, "request", 2);
|
13118
|
+
_([E("object")], y.prototype, "webModel", 2);
|
13119
|
+
_([E("object")], y.prototype, "requestBodyLimits", 2);
|
13120
|
+
_([E("function")], y.prototype, "requestInterceptor", 2);
|
13121
|
+
_([E("function")], y.prototype, "responseInterceptor", 2);
|
13122
|
+
_([E("function")], y.prototype, "validateInput", 2);
|
13123
|
+
_([E("object")], y.prototype, "chatStyle", 2);
|
13124
|
+
_([E("object")], y.prototype, "attachmentContainerStyle", 2);
|
13125
|
+
_([E("object")], y.prototype, "dropupStyles", 2);
|
13126
|
+
_([E("object")], y.prototype, "inputAreaStyle", 2);
|
13127
|
+
_([E("object")], y.prototype, "textInput", 2);
|
13128
|
+
_([E("object")], y.prototype, "submitButtonStyles", 2);
|
13129
|
+
_([E("string")], y.prototype, "auxiliaryStyle", 2);
|
13130
|
+
_([E("array")], y.prototype, "history", 2);
|
13131
|
+
_([E("object")], y.prototype, "introMessage", 2);
|
13132
|
+
_([E("object")], y.prototype, "avatars", 2);
|
13133
|
+
_([E("object")], y.prototype, "names", 2);
|
13134
|
+
_([E("boolean")], y.prototype, "displayLoadingBubble", 2);
|
13135
|
+
_([E("object")], y.prototype, "errorMessages", 2);
|
13136
|
+
_([E("object")], y.prototype, "messageStyles", 2);
|
13137
|
+
_([E("object")], y.prototype, "textToSpeech", 2);
|
13138
|
+
_([E("object")], y.prototype, "speechToText", 2);
|
13139
|
+
_([E("object")], y.prototype, "images", 2);
|
13140
|
+
_([E("object")], y.prototype, "gifs", 2);
|
13141
|
+
_([E("object")], y.prototype, "camera", 2);
|
13142
|
+
_([E("object")], y.prototype, "audio", 2);
|
13143
|
+
_([E("object")], y.prototype, "microphone", 2);
|
13144
|
+
_([E("object")], y.prototype, "mixedFiles", 2);
|
13145
|
+
_([E("object")], y.prototype, "dragAndDrop", 2);
|
13146
|
+
_([E("object")], y.prototype, "introPanelStyle", 2);
|
13147
|
+
_([E("object")], y.prototype, "htmlClassUtilities", 2);
|
13148
|
+
_([E("function")], y.prototype, "onNewMessage", 2);
|
13149
|
+
_([E("function")], y.prototype, "onClearMessages", 2);
|
13150
|
+
_([E("function")], y.prototype, "onComponentRender", 2);
|
13151
|
+
_([E("function")], y.prototype, "onError", 2);
|
13152
|
+
_([E("object")], y.prototype, "demo", 2);
|
13153
|
+
_([E("object")], y.prototype, "_insertKeyViewStyles", 2);
|
13149
13154
|
customElements.define("deep-chat", y);
|
13150
13155
|
export { y as DeepChat };
|