deep-chat-dev 9.0.264 → 9.0.265
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 +4733 -4665
- package/dist/deepChat.bundle.js +1 -1
- package/dist/deepChat.js +393 -377
- package/dist/types/messages.d.ts +0 -2
- package/dist/types/messages.d.ts.map +1 -1
- package/dist/types/stream.d.ts +1 -0
- package/dist/types/stream.d.ts.map +1 -1
- package/dist/utils/HTTP/stream.d.ts.map +1 -1
- package/dist/views/chat/messages/messages.d.ts.map +1 -1
- package/dist/views/chat/messages/stream/messageStream.d.ts +9 -1
- package/dist/views/chat/messages/stream/messageStream.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/deepChat.js
CHANGED
@@ -137,37 +137,37 @@ var I = /*#__PURE__*/function () {
|
|
137
137
|
}
|
138
138
|
}]);
|
139
139
|
}();
|
140
|
-
var
|
141
|
-
function
|
142
|
-
_classCallCheck(this,
|
140
|
+
var Je = /*#__PURE__*/function () {
|
141
|
+
function Je() {
|
142
|
+
_classCallCheck(this, Je);
|
143
143
|
}
|
144
|
-
return _createClass(
|
144
|
+
return _createClass(Je, null, [{
|
145
145
|
key: "attemptAppendStyleSheetToHead",
|
146
146
|
value: function attemptAppendStyleSheetToHead(e) {
|
147
|
-
if (e.fontFamily && e.fontFamily !==
|
147
|
+
if (e.fontFamily && e.fontFamily !== Je.DEFAULT_FONT_FAMILY) return;
|
148
148
|
var t = document.getElementsByTagName("head")[0];
|
149
149
|
if (!Array.from(t.getElementsByTagName("link")).some(function (s) {
|
150
|
-
return s.getAttribute("href") ===
|
150
|
+
return s.getAttribute("href") === Je.FONT_URL;
|
151
151
|
})) {
|
152
152
|
var s = document.createElement("link");
|
153
|
-
s.rel = "stylesheet", s.href =
|
153
|
+
s.rel = "stylesheet", s.href = Je.FONT_URL, t.appendChild(s);
|
154
154
|
}
|
155
155
|
}
|
156
156
|
}]);
|
157
157
|
}();
|
158
|
-
|
159
|
-
var bi =
|
160
|
-
var
|
161
|
-
function
|
162
|
-
_classCallCheck(this,
|
158
|
+
Je.FONT_URL = "https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap", Je.DEFAULT_FONT_FAMILY = "'Inter', sans-serif, Avenir, Helvetica, Arial";
|
159
|
+
var bi = Je;
|
160
|
+
var ht = /*#__PURE__*/function () {
|
161
|
+
function ht() {
|
162
|
+
_classCallCheck(this, ht);
|
163
163
|
}
|
164
|
-
return _createClass(
|
164
|
+
return _createClass(ht, null, [{
|
165
165
|
key: "apply",
|
166
166
|
value: function apply(e, t) {
|
167
167
|
if (t) try {
|
168
|
-
|
168
|
+
ht.applyStyleSheet(e, t);
|
169
169
|
} catch (_unused) {
|
170
|
-
|
170
|
+
ht.addStyleElement(e, t);
|
171
171
|
}
|
172
172
|
}
|
173
173
|
}, {
|
@@ -185,11 +185,11 @@ var dt = /*#__PURE__*/function () {
|
|
185
185
|
}, {
|
186
186
|
key: "applyDefaultStyleToComponent",
|
187
187
|
value: function applyDefaultStyleToComponent(e, t) {
|
188
|
-
t && I.applyToStyleIfNotDefined(e, t), I.applyToStyleIfNotDefined(e,
|
188
|
+
t && I.applyToStyleIfNotDefined(e, t), I.applyToStyleIfNotDefined(e, ht.DEFAULT_COMPONENT_STYLE);
|
189
189
|
}
|
190
190
|
}]);
|
191
191
|
}();
|
192
|
-
|
192
|
+
ht.DEFAULT_COMPONENT_STYLE = {
|
193
193
|
height: "350px",
|
194
194
|
width: "320px",
|
195
195
|
borderTop: "1px solid #cacaca",
|
@@ -206,25 +206,25 @@ dt.DEFAULT_COMPONENT_STYLE = {
|
|
206
206
|
// this is also causing the chat to squeeze when there is no space
|
207
207
|
overflow: "hidden"
|
208
208
|
};
|
209
|
-
var Ht =
|
209
|
+
var Ht = ht;
|
210
210
|
var $t = /*#__PURE__*/_createClass(function $t() {
|
211
211
|
_classCallCheck(this, $t);
|
212
212
|
});
|
213
213
|
$t.IS_SAFARI = /^((?!chrome|android).)*safari/i.test(navigator.userAgent), $t.IS_CHROMIUM = window.chrome, $t.IS_MOBILE = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);
|
214
|
-
var
|
214
|
+
var Be = $t;
|
215
215
|
var U = /* @__PURE__ */function (n) {
|
216
216
|
return n.ESCAPE = "Escape", n.ENTER = "Enter", n.TAB = "Tab", n.ARROW_UP = "ArrowUp", n.ARROW_DOWN = "ArrowDown", n.ARROW_RIGHT = "ArrowRight", n.ARROW_LEFT = "ArrowLeft", n.BACKSPACE = "Backspace", n.DELETE = "Delete", n.META = "Meta", n.CONTROL = "Control", n;
|
217
217
|
}(U || {});
|
218
|
-
var
|
219
|
-
function
|
220
|
-
_classCallCheck(this,
|
218
|
+
var Xe = /*#__PURE__*/function () {
|
219
|
+
function Xe() {
|
220
|
+
_classCallCheck(this, Xe);
|
221
221
|
}
|
222
|
-
return _createClass(
|
222
|
+
return _createClass(Xe, null, [{
|
223
223
|
key: "add",
|
224
224
|
value:
|
225
225
|
// prettier-ignore
|
226
226
|
function add(e, t, i, s) {
|
227
|
-
i !== void 0 && e.addEventListener("keydown",
|
227
|
+
i !== void 0 && e.addEventListener("keydown", Xe.onKeyDown.bind(this, i)), e.oninput = Xe.onInput.bind(this, i, s), e.addEventListener("paste", function (r) {
|
228
228
|
var o;
|
229
229
|
r.preventDefault(), (o = r.clipboardData) != null && o.files.length && t.addFilesToAnyType(Array.from(r.clipboardData.files));
|
230
230
|
});
|
@@ -235,7 +235,7 @@ var Je = /*#__PURE__*/function () {
|
|
235
235
|
key: "onKeyDown",
|
236
236
|
value: function onKeyDown(e, t) {
|
237
237
|
var s = t.target.textContent;
|
238
|
-
s && s.length >= e && !
|
238
|
+
s && s.length >= e && !Xe.PERMITTED_KEYS.has(t.key) && !Xe.isKeyCombinationPermitted(t) && t.preventDefault();
|
239
239
|
}
|
240
240
|
}, {
|
241
241
|
key: "isKeyCombinationPermitted",
|
@@ -251,8 +251,8 @@ var Je = /*#__PURE__*/function () {
|
|
251
251
|
}
|
252
252
|
}]);
|
253
253
|
}();
|
254
|
-
|
255
|
-
var Yi =
|
254
|
+
Xe.PERMITTED_KEYS = /* @__PURE__ */new Set([U.BACKSPACE, U.DELETE, U.ARROW_RIGHT, U.ARROW_LEFT, U.ARROW_DOWN, U.ARROW_UP, U.META, U.CONTROL, U.ENTER]);
|
255
|
+
var Yi = Xe;
|
256
256
|
var jn = /*#__PURE__*/function () {
|
257
257
|
function jn() {
|
258
258
|
_classCallCheck(this, jn);
|
@@ -267,25 +267,25 @@ var jn = /*#__PURE__*/function () {
|
|
267
267
|
}
|
268
268
|
}]);
|
269
269
|
}();
|
270
|
-
var
|
271
|
-
function
|
270
|
+
var Ye = /*#__PURE__*/function () {
|
271
|
+
function Ye(e, t, i) {
|
272
272
|
var _this = this;
|
273
|
-
_classCallCheck(this,
|
273
|
+
_classCallCheck(this, Ye);
|
274
274
|
var r, o;
|
275
275
|
this._isComposing = !1;
|
276
|
-
var s =
|
277
|
-
this.elementRef =
|
276
|
+
var s = Ye.processConfig(t, e.textInput);
|
277
|
+
this.elementRef = Ye.createContainerElement((r = s == null ? void 0 : s.styles) == null ? void 0 : r.container), this._config = s, this.inputElementRef = this.createInputElement(), this.elementRef.appendChild(this.inputElementRef), e.setPlaceholderText = this.setPlaceholderText.bind(this), e.setPlaceholderText(((o = this._config.placeholder) == null ? void 0 : o.text) || "Ask me anything!"), setTimeout(function () {
|
278
278
|
Yi.add(_this.inputElementRef, i, _this._config.characterLimit, e._validationHandler);
|
279
279
|
});
|
280
280
|
}
|
281
|
-
return _createClass(
|
281
|
+
return _createClass(Ye, [{
|
282
282
|
key: "clear",
|
283
283
|
value:
|
284
284
|
// this also similarly prevents scroll up
|
285
285
|
function clear() {
|
286
286
|
var t;
|
287
287
|
var e = window.scrollY;
|
288
|
-
this.inputElementRef.classList.contains("text-input-disabled") || (Object.assign(this.inputElementRef.style, (t = this._config.placeholder) == null ? void 0 : t.style), this.inputElementRef.textContent = "", ai.focusEndOfInput(this.inputElementRef)),
|
288
|
+
this.inputElementRef.classList.contains("text-input-disabled") || (Object.assign(this.inputElementRef.style, (t = this._config.placeholder) == null ? void 0 : t.style), this.inputElementRef.textContent = "", ai.focusEndOfInput(this.inputElementRef)), Be.IS_CHROMIUM && window.scrollTo({
|
289
289
|
top: e
|
290
290
|
});
|
291
291
|
}
|
@@ -294,7 +294,7 @@ var Xe = /*#__PURE__*/function () {
|
|
294
294
|
value: function createInputElement() {
|
295
295
|
var t, i, s, r;
|
296
296
|
var e = document.createElement("div");
|
297
|
-
return e.id =
|
297
|
+
return e.id = Ye.TEXT_INPUT_ID, e.classList.add("text-input-styling"), e.role = "textbox", Be.IS_CHROMIUM && Ye.preventAutomaticScrollUpOnNewLine(e), typeof this._config.disabled == "boolean" && this._config.disabled === !0 ? (e.contentEditable = "false", e.classList.add("text-input-disabled"), e.setAttribute("aria-disabled", "true")) : (e.contentEditable = "true", e.removeAttribute("aria-disabled"), this.addEventListeners(e)), Object.assign(e.style, (t = this._config.styles) == null ? void 0 : t.text), Object.assign(e.style, (i = this._config.placeholder) == null ? void 0 : i.style), (r = (s = this._config.placeholder) == null ? void 0 : s.style) != null && r.color || e.setAttribute("textcolor", ""), e;
|
298
298
|
}
|
299
299
|
}, {
|
300
300
|
key: "removePlaceholderStyle",
|
@@ -325,7 +325,7 @@ var Xe = /*#__PURE__*/function () {
|
|
325
325
|
key: "onKeydown",
|
326
326
|
value: function onKeydown(e) {
|
327
327
|
var t;
|
328
|
-
e.key === U.ENTER && !
|
328
|
+
e.key === U.ENTER && !Be.IS_MOBILE && !this._isComposing && !e.ctrlKey && !e.shiftKey && (e.preventDefault(), (t = this.submit) == null || t.call(this));
|
329
329
|
}
|
330
330
|
}, {
|
331
331
|
key: "onInput",
|
@@ -375,8 +375,8 @@ var Xe = /*#__PURE__*/function () {
|
|
375
375
|
}
|
376
376
|
}]);
|
377
377
|
}();
|
378
|
-
|
379
|
-
var vi =
|
378
|
+
Ye.TEXT_INPUT_ID = "text-input";
|
379
|
+
var vi = Ye;
|
380
380
|
var ai = /*#__PURE__*/function () {
|
381
381
|
function ai() {
|
382
382
|
_classCallCheck(this, ai);
|
@@ -393,7 +393,7 @@ var ai = /*#__PURE__*/function () {
|
|
393
393
|
key: "focusFromParentElement",
|
394
394
|
value: function focusFromParentElement(e) {
|
395
395
|
var t = e.querySelector("#".concat(vi.TEXT_INPUT_ID));
|
396
|
-
t && (
|
396
|
+
t && (Be.IS_SAFARI && t.focus(), ai.focusEndOfInput(t));
|
397
397
|
}
|
398
398
|
}]);
|
399
399
|
}();
|
@@ -511,11 +511,11 @@ var Bi = /*#__PURE__*/function () {
|
|
511
511
|
}();
|
512
512
|
Bi.LOAD_VOICES_MS = 200;
|
513
513
|
var gt = Bi;
|
514
|
-
var
|
515
|
-
function
|
516
|
-
_classCallCheck(this,
|
514
|
+
var ut = /*#__PURE__*/function () {
|
515
|
+
function ut() {
|
516
|
+
_classCallCheck(this, ut);
|
517
517
|
}
|
518
|
-
return _createClass(
|
518
|
+
return _createClass(ut, null, [{
|
519
519
|
key: "colorToHex",
|
520
520
|
value: function colorToHex(e) {
|
521
521
|
var t = document.createElement("div");
|
@@ -528,7 +528,7 @@ var ht = /*#__PURE__*/function () {
|
|
528
528
|
value: function setDots(e, t) {
|
529
529
|
var i, s, r, o;
|
530
530
|
if ((o = (r = (s = (i = t == null ? void 0 : t.loading) == null ? void 0 : i.message) == null ? void 0 : s.styles) == null ? void 0 : r.bubble) != null && o.color) {
|
531
|
-
var a =
|
531
|
+
var a = ut.colorToHex(t.loading.message.styles.bubble.color);
|
532
532
|
e.style.setProperty("--loading-message-color", a), e.style.setProperty("--loading-message-color-fade", "".concat(a, "33"));
|
533
533
|
} else e.style.setProperty("--loading-message-color", "#848484"), e.style.setProperty("--loading-message-color-fade", "#55555533");
|
534
534
|
}
|
@@ -542,15 +542,15 @@ var ht = /*#__PURE__*/function () {
|
|
542
542
|
o = _ref.margin,
|
543
543
|
a = _ref.border;
|
544
544
|
if (i) {
|
545
|
-
var l =
|
545
|
+
var l = ut.colorToHex(i);
|
546
546
|
e.style.setProperty("--loading-history-color", l);
|
547
547
|
} else e.style.setProperty("--loading-history-color", "#dbdbdb");
|
548
548
|
e.style.setProperty("--loading-history-height", r || "57px"), e.style.setProperty("--loading-history-width", s || "57px"), e.style.setProperty("--loading-history-margin", o || "7px"), e.style.setProperty("--loading-history-border", a || "6px solid");
|
549
549
|
}
|
550
550
|
}]);
|
551
551
|
}();
|
552
|
-
|
553
|
-
var
|
552
|
+
ut.BUBBLE_CLASS = "deep-chat-loading-message-bubble", ut.DOTS_CONTAINER_CLASS = "deep-chat-loading-message-dots-container";
|
553
|
+
var De = ut;
|
554
554
|
var ce = /*#__PURE__*/function () {
|
555
555
|
function ce() {
|
556
556
|
_classCallCheck(this, ce);
|
@@ -743,11 +743,11 @@ var te = /*#__PURE__*/function () {
|
|
743
743
|
}
|
744
744
|
}]);
|
745
745
|
}();
|
746
|
-
var
|
747
|
-
function
|
748
|
-
_classCallCheck(this,
|
746
|
+
var $e = /*#__PURE__*/function () {
|
747
|
+
function $e() {
|
748
|
+
_classCallCheck(this, $e);
|
749
749
|
}
|
750
|
-
return _createClass(
|
750
|
+
return _createClass($e, null, [{
|
751
751
|
key: "mouseUp",
|
752
752
|
value: function mouseUp(e, t) {
|
753
753
|
I.unsetAllCSSMouseStates(e, t), Object.assign(e.style, t["default"]), Object.assign(e.style, t.hover);
|
@@ -770,7 +770,7 @@ var Ke = /*#__PURE__*/function () {
|
|
770
770
|
}, {
|
771
771
|
key: "add",
|
772
772
|
value: function add(e, t) {
|
773
|
-
e.addEventListener("mouseenter",
|
773
|
+
e.addEventListener("mouseenter", $e.mouseEnter.bind(this, e, t)), e.addEventListener("mouseleave", $e.mouseLeave.bind(this, e, t)), e.addEventListener("mousedown", $e.mouseDown.bind(this, e, t)), e.addEventListener("mouseup", $e.mouseUp.bind(this, e, t));
|
774
774
|
}
|
775
775
|
}]);
|
776
776
|
}();
|
@@ -876,7 +876,7 @@ var X = /*#__PURE__*/function () {
|
|
876
876
|
key: "applyStylesToElement",
|
877
877
|
value: function applyStylesToElement(e, t) {
|
878
878
|
var i = I.processStateful(t);
|
879
|
-
|
879
|
+
$e.add(e, i), Object.assign(e.style, i["default"]);
|
880
880
|
}
|
881
881
|
}, {
|
882
882
|
key: "applyEventsToElement",
|
@@ -1040,7 +1040,7 @@ function Zn(n, e) {
|
|
1040
1040
|
i = En(e);
|
1041
1041
|
return e !== i ? i : e.charCodeAt(0) === 35 && Yn.test(e) && (t = e[1].toLowerCase() === "x" ? parseInt(e.slice(2), 16) : parseInt(e.slice(1), 10), _n(t)) ? Qi(t) : n;
|
1042
1042
|
}
|
1043
|
-
function
|
1043
|
+
function nt(n) {
|
1044
1044
|
return n.indexOf("&") < 0 ? n : n.replace(Xn, Zn);
|
1045
1045
|
}
|
1046
1046
|
var Qn = /[&<>"]/,
|
@@ -1062,10 +1062,10 @@ v.blockquote_open = function () {
|
|
1062
1062
|
return "<blockquote>\n";
|
1063
1063
|
};
|
1064
1064
|
v.blockquote_close = function (n, e) {
|
1065
|
-
return "</blockquote>" +
|
1065
|
+
return "</blockquote>" + ot(n, e);
|
1066
1066
|
};
|
1067
1067
|
v.code = function (n, e) {
|
1068
|
-
return n[e].block ? "<pre><code>" + ee(n[e].content) + "</code></pre>" +
|
1068
|
+
return n[e].block ? "<pre><code>" + ee(n[e].content) + "</code></pre>" + ot(n, e) : "<code>" + ee(n[e].content) + "</code>";
|
1069
1069
|
};
|
1070
1070
|
v.fence = function (n, e, t, i, s) {
|
1071
1071
|
var r = n[e],
|
@@ -1077,9 +1077,9 @@ v.fence = function (n, e, t, i, s) {
|
|
1077
1077
|
u;
|
1078
1078
|
if (r.params) {
|
1079
1079
|
if (c = r.params.split(/\s+/g), d = c.join(" "), Wn(s.rules.fence_custom, c[0])) return s.rules.fence_custom[c[0]](n, e, t, i, s);
|
1080
|
-
l = ee(
|
1080
|
+
l = ee(nt(Qt(d))), o = ' class="' + a + l + '"';
|
1081
1081
|
}
|
1082
|
-
return t.highlight ? u = t.highlight.apply(t.highlight, [r.content].concat(c)) || ee(r.content) : u = ee(r.content), "<pre><code" + o + ">" + u + "</code></pre>" +
|
1082
|
+
return t.highlight ? u = t.highlight.apply(t.highlight, [r.content].concat(c)) || ee(r.content) : u = ee(r.content), "<pre><code" + o + ">" + u + "</code></pre>" + ot(n, e);
|
1083
1083
|
};
|
1084
1084
|
v.fence_custom = {};
|
1085
1085
|
v.heading_open = function (n, e) {
|
@@ -1089,13 +1089,13 @@ v.heading_close = function (n, e) {
|
|
1089
1089
|
return "</h" + n[e].hLevel + ">\n";
|
1090
1090
|
};
|
1091
1091
|
v.hr = function (n, e, t) {
|
1092
|
-
return (t.xhtmlOut ? "<hr />" : "<hr>") +
|
1092
|
+
return (t.xhtmlOut ? "<hr />" : "<hr>") + ot(n, e);
|
1093
1093
|
};
|
1094
1094
|
v.bullet_list_open = function () {
|
1095
1095
|
return "<ul>\n";
|
1096
1096
|
};
|
1097
1097
|
v.bullet_list_close = function (n, e) {
|
1098
|
-
return "</ul>" +
|
1098
|
+
return "</ul>" + ot(n, e);
|
1099
1099
|
};
|
1100
1100
|
v.list_item_open = function () {
|
1101
1101
|
return "<li>";
|
@@ -1109,17 +1109,17 @@ v.ordered_list_open = function (n, e) {
|
|
1109
1109
|
return "<ol" + i + ">\n";
|
1110
1110
|
};
|
1111
1111
|
v.ordered_list_close = function (n, e) {
|
1112
|
-
return "</ol>" +
|
1112
|
+
return "</ol>" + ot(n, e);
|
1113
1113
|
};
|
1114
1114
|
v.paragraph_open = function (n, e) {
|
1115
1115
|
return n[e].tight ? "" : "<p>";
|
1116
1116
|
};
|
1117
1117
|
v.paragraph_close = function (n, e) {
|
1118
1118
|
var t = !(n[e].tight && e && n[e - 1].type === "inline" && !n[e - 1].content);
|
1119
|
-
return (n[e].tight ? "" : "</p>") + (t ?
|
1119
|
+
return (n[e].tight ? "" : "</p>") + (t ? ot(n, e) : "");
|
1120
1120
|
};
|
1121
1121
|
v.link_open = function (n, e, t) {
|
1122
|
-
var i = n[e].title ? ' title="' + ee(
|
1122
|
+
var i = n[e].title ? ' title="' + ee(nt(n[e].title)) + '"' : "",
|
1123
1123
|
s = t.linkTarget ? ' target="' + t.linkTarget + '"' : "";
|
1124
1124
|
return '<a href="' + ee(n[e].href) + '"' + i + s + ">";
|
1125
1125
|
};
|
@@ -1128,8 +1128,8 @@ v.link_close = function () {
|
|
1128
1128
|
};
|
1129
1129
|
v.image = function (n, e, t) {
|
1130
1130
|
var i = ' src="' + ee(n[e].src) + '"',
|
1131
|
-
s = n[e].title ? ' title="' + ee(
|
1132
|
-
r = ' alt="' + (n[e].alt ? ee(
|
1131
|
+
s = n[e].title ? ' title="' + ee(nt(n[e].title)) + '"' : "",
|
1132
|
+
r = ' alt="' + (n[e].alt ? ee(nt(Qt(n[e].alt))) : "") + '"',
|
1133
1133
|
o = t.xhtmlOut ? " /" : "";
|
1134
1134
|
return "<img" + i + r + s + o + ">";
|
1135
1135
|
};
|
@@ -1223,7 +1223,7 @@ v.htmltag = function (n, e) {
|
|
1223
1223
|
return n[e].content;
|
1224
1224
|
};
|
1225
1225
|
v.abbr_open = function (n, e) {
|
1226
|
-
return '<abbr title="' + ee(
|
1226
|
+
return '<abbr title="' + ee(nt(n[e].title)) + '">';
|
1227
1227
|
};
|
1228
1228
|
v.abbr_close = function () {
|
1229
1229
|
return "</abbr>";
|
@@ -1273,7 +1273,7 @@ v.dd_close = function () {
|
|
1273
1273
|
function xn(n, e) {
|
1274
1274
|
return ++e >= n.length - 2 ? e : n[e].type === "paragraph_open" && n[e].tight && n[e + 1].type === "inline" && n[e + 1].content.length === 0 && n[e + 2].type === "paragraph_close" && n[e + 2].tight ? xn(n, e + 2) : e;
|
1275
1275
|
}
|
1276
|
-
var
|
1276
|
+
var ot = v.getBreak = function (e, t) {
|
1277
1277
|
return t = xn(e, t), t < e.length && e[t].type === "list_item_close" ? "" : "\n";
|
1278
1278
|
};
|
1279
1279
|
function vs() {
|
@@ -1372,24 +1372,24 @@ function sr(n) {
|
|
1372
1372
|
children: []
|
1373
1373
|
}) : n.block.parse(n.src, n.options, n.env, n.tokens);
|
1374
1374
|
}
|
1375
|
-
function
|
1375
|
+
function at(n, e, t, i, s) {
|
1376
1376
|
this.src = n, this.env = i, this.options = t, this.parser = e, this.tokens = s, this.pos = 0, this.posMax = this.src.length, this.level = 0, this.pending = "", this.pendingLevel = 0, this.cache = [], this.isInLabel = !1, this.linkLevel = 0, this.linkContent = "", this.labelUnmatchedScopes = 0;
|
1377
1377
|
}
|
1378
|
-
|
1378
|
+
at.prototype.pushPending = function () {
|
1379
1379
|
this.tokens.push({
|
1380
1380
|
type: "text",
|
1381
1381
|
content: this.pending,
|
1382
1382
|
level: this.pendingLevel
|
1383
1383
|
}), this.pending = "";
|
1384
1384
|
};
|
1385
|
-
|
1385
|
+
at.prototype.push = function (n) {
|
1386
1386
|
this.pending && this.pushPending(), this.tokens.push(n), this.pendingLevel = this.level;
|
1387
1387
|
};
|
1388
|
-
|
1388
|
+
at.prototype.cacheSet = function (n, e) {
|
1389
1389
|
for (var t = this.cache.length; t <= n; t++) this.cache.push(0);
|
1390
1390
|
this.cache[n] = e;
|
1391
1391
|
};
|
1392
|
-
|
1392
|
+
at.prototype.cacheGet = function (n) {
|
1393
1393
|
return n < this.cache.length ? this.cache[n] : 0;
|
1394
1394
|
};
|
1395
1395
|
function ei(n, e) {
|
@@ -1413,7 +1413,7 @@ function ei(n, e) {
|
|
1413
1413
|
}
|
1414
1414
|
function nr(n, e, t, i) {
|
1415
1415
|
var s, r, o, a, l, c;
|
1416
|
-
if (n.charCodeAt(0) !== 42 || n.charCodeAt(1) !== 91 || n.indexOf("]:") === -1 || (s = new
|
1416
|
+
if (n.charCodeAt(0) !== 42 || n.charCodeAt(1) !== 91 || n.indexOf("]:") === -1 || (s = new at(n, e, t, i, []), r = ei(s, 1), r < 0 || n.charCodeAt(r + 1) !== 58)) return -1;
|
1417
1417
|
for (a = s.posMax, o = r + 2; o < a && s.src.charCodeAt(o) !== 10; o++);
|
1418
1418
|
return l = n.slice(2, r), c = n.slice(r + 2, o).trim(), c.length === 0 ? -1 : (i.abbreviations || (i.abbreviations = {}), _typeof(i.abbreviations[":" + l]) > "u" && (i.abbreviations[":" + l] = c), o);
|
1419
1419
|
}
|
@@ -1431,7 +1431,7 @@ function rr(n) {
|
|
1431
1431
|
}
|
1432
1432
|
}
|
1433
1433
|
function es(n) {
|
1434
|
-
var e =
|
1434
|
+
var e = nt(n);
|
1435
1435
|
try {
|
1436
1436
|
e = decodeURI(e);
|
1437
1437
|
} catch (_unused3) {}
|
@@ -1486,7 +1486,7 @@ function Tn(n) {
|
|
1486
1486
|
}
|
1487
1487
|
function or(n, e, t, i) {
|
1488
1488
|
var s, r, o, a, l, c, d, u, h;
|
1489
|
-
if (n.charCodeAt(0) !== 91 || n.indexOf("]:") === -1 || (s = new
|
1489
|
+
if (n.charCodeAt(0) !== 91 || n.indexOf("]:") === -1 || (s = new at(n, e, t, i, []), r = ei(s, 0), r < 0 || n.charCodeAt(r + 1) !== 58)) return -1;
|
1490
1490
|
for (a = s.posMax, o = r + 2; o < a && (l = s.src.charCodeAt(o), !(l !== 32 && l !== 10)); o++);
|
1491
1491
|
if (!wn(s, o)) return -1;
|
1492
1492
|
for (d = s.linkContent, o = s.pos, c = o, o = o + 1; o < a && (l = s.src.charCodeAt(o), !(l !== 32 && l !== 10)); o++);
|
@@ -1646,7 +1646,7 @@ var gr = /['"]/,
|
|
1646
1646
|
function Us(n, e) {
|
1647
1647
|
return e < 0 || e >= n.length ? !1 : !br.test(n[e]);
|
1648
1648
|
}
|
1649
|
-
function
|
1649
|
+
function dt(n, e, t) {
|
1650
1650
|
return n.substr(0, e) + t + n.substr(e + 1);
|
1651
1651
|
}
|
1652
1652
|
function vr(n) {
|
@@ -1658,12 +1658,12 @@ function vr(n) {
|
|
1658
1658
|
b.length = f + 1, i = t.content, r = 0, o = i.length;
|
1659
1659
|
e: for (; r < o && (Bs.lastIndex = r, s = Bs.exec(i), !!s);) {
|
1660
1660
|
if (l = !Us(i, s.index - 1), r = s.index + 1, m = s[0] === "'", c = !Us(i, r), !c && !l) {
|
1661
|
-
m && (t.content =
|
1661
|
+
m && (t.content = dt(t.content, s.index, Fs));
|
1662
1662
|
continue;
|
1663
1663
|
}
|
1664
1664
|
if (u = !c, h = !l, h) {
|
1665
1665
|
for (f = b.length - 1; f >= 0 && (d = b[f], !(b[f].level < a)); f--) if (d.single === m && b[f].level === a) {
|
1666
|
-
d = b[f], m ? (g[d.token].content =
|
1666
|
+
d = b[f], m ? (g[d.token].content = dt(g[d.token].content, d.pos, n.options.quotes[2]), t.content = dt(t.content, s.index, n.options.quotes[3])) : (g[d.token].content = dt(g[d.token].content, d.pos, n.options.quotes[0]), t.content = dt(t.content, s.index, n.options.quotes[1])), b.length = f;
|
1667
1667
|
continue e;
|
1668
1668
|
}
|
1669
1669
|
}
|
@@ -1672,7 +1672,7 @@ function vr(n) {
|
|
1672
1672
|
pos: s.index,
|
1673
1673
|
single: m,
|
1674
1674
|
level: a
|
1675
|
-
}) : h && m && (t.content =
|
1675
|
+
}) : h && m && (t.content = dt(t.content, s.index, Fs));
|
1676
1676
|
}
|
1677
1677
|
}
|
1678
1678
|
}
|
@@ -1687,7 +1687,7 @@ Cn.prototype.process = function (n) {
|
|
1687
1687
|
var e, t, i;
|
1688
1688
|
for (i = this.ruler.getRules(""), e = 0, t = i.length; e < t; e++) i[e](n);
|
1689
1689
|
};
|
1690
|
-
function
|
1690
|
+
function lt(n, e, t, i, s) {
|
1691
1691
|
var r, o, a, l, c, d, u;
|
1692
1692
|
for (this.src = n, this.parser = e, this.options = t, this.env = i, this.tokens = s, this.bMarks = [], this.eMarks = [], this.tShift = [], this.blkIndent = 0, this.line = 0, this.lineMax = 0, this.tight = !1, this.parentType = "root", this.ddIndent = -1, this.level = 0, this.result = "", o = this.src, d = 0, u = !1, a = l = d = 0, c = o.length; l < c; l++) {
|
1693
1693
|
if (r = o.charCodeAt(l), !u) if (r === 32) {
|
@@ -1698,27 +1698,27 @@ function at(n, e, t, i, s) {
|
|
1698
1698
|
}
|
1699
1699
|
this.bMarks.push(o.length), this.eMarks.push(o.length), this.tShift.push(0), this.lineMax = this.bMarks.length - 1;
|
1700
1700
|
}
|
1701
|
-
|
1701
|
+
lt.prototype.isEmpty = function (e) {
|
1702
1702
|
return this.bMarks[e] + this.tShift[e] >= this.eMarks[e];
|
1703
1703
|
};
|
1704
|
-
|
1704
|
+
lt.prototype.skipEmptyLines = function (e) {
|
1705
1705
|
for (var t = this.lineMax; e < t && !(this.bMarks[e] + this.tShift[e] < this.eMarks[e]); e++);
|
1706
1706
|
return e;
|
1707
1707
|
};
|
1708
|
-
|
1708
|
+
lt.prototype.skipSpaces = function (e) {
|
1709
1709
|
for (var t = this.src.length; e < t && this.src.charCodeAt(e) === 32; e++);
|
1710
1710
|
return e;
|
1711
1711
|
};
|
1712
|
-
|
1712
|
+
lt.prototype.skipChars = function (e, t) {
|
1713
1713
|
for (var i = this.src.length; e < i && this.src.charCodeAt(e) === t; e++);
|
1714
1714
|
return e;
|
1715
1715
|
};
|
1716
|
-
|
1716
|
+
lt.prototype.skipCharsBack = function (e, t, i) {
|
1717
1717
|
if (e <= i) return e;
|
1718
1718
|
for (; e > i;) if (t !== this.src.charCodeAt(--e)) return e + 1;
|
1719
1719
|
return e;
|
1720
1720
|
};
|
1721
|
-
|
1721
|
+
lt.prototype.getLines = function (e, t, i, s) {
|
1722
1722
|
var r,
|
1723
1723
|
o,
|
1724
1724
|
a,
|
@@ -1872,7 +1872,7 @@ function wr(n, e, t, i) {
|
|
1872
1872
|
b,
|
1873
1873
|
M,
|
1874
1874
|
Y,
|
1875
|
-
|
1875
|
+
qe,
|
1876
1876
|
ae,
|
1877
1877
|
Ce = !0,
|
1878
1878
|
ye,
|
@@ -1885,11 +1885,11 @@ function wr(n, e, t, i) {
|
|
1885
1885
|
for (M = n.tokens.length, g ? (d = n.bMarks[e] + n.tShift[e], m = Number(n.src.substr(d, u - d - 1)), n.tokens.push({
|
1886
1886
|
type: "ordered_list_open",
|
1887
1887
|
order: m,
|
1888
|
-
lines:
|
1888
|
+
lines: qe = [e, 0],
|
1889
1889
|
level: n.level++
|
1890
1890
|
})) : n.tokens.push({
|
1891
1891
|
type: "bullet_list_open",
|
1892
|
-
lines:
|
1892
|
+
lines: qe = [e, 0],
|
1893
1893
|
level: n.level++
|
1894
1894
|
}), s = e, Y = !1, ye = n.parser.ruler.getRules("list"); s < t && (b = n.skipSpaces(u), h = n.eMarks[s], b >= h ? f = 1 : f = b - u, f > 4 && (f = 1), f < 1 && (f = 1), r = u - n.bMarks[s] + f, n.tokens.push({
|
1895
1895
|
type: "list_item_open",
|
@@ -1912,7 +1912,7 @@ function wr(n, e, t, i) {
|
|
1912
1912
|
return n.tokens.push({
|
1913
1913
|
type: g ? "ordered_list_close" : "bullet_list_close",
|
1914
1914
|
level: --n.level
|
1915
|
-
}),
|
1915
|
+
}), qe[1] = s, n.line = s, Ce && xr(n, M), !0;
|
1916
1916
|
}
|
1917
1917
|
function Ar(n, e, t, i) {
|
1918
1918
|
var s,
|
@@ -2219,7 +2219,7 @@ ys.prototype.parse = function (n, e, t, i) {
|
|
2219
2219
|
n = n.replace(Fr, " "), n = n.replace(Br, "\n"), n.indexOf(" ") >= 0 && (n = n.replace(Dr, function (a, l) {
|
2220
2220
|
var c;
|
2221
2221
|
return n.charCodeAt(l) === 10 ? (r = l + 1, o = 0, a) : (c = " ".slice((l - r - o) % 4), o = l - r + 1, c);
|
2222
|
-
})), s = new
|
2222
|
+
})), s = new lt(n, this, e, t, i), this.tokenize(s, s.line, s.lineMax);
|
2223
2223
|
};
|
2224
2224
|
function Ur(n) {
|
2225
2225
|
switch (n) {
|
@@ -2711,13 +2711,13 @@ ji.prototype.tokenize = function (n) {
|
|
2711
2711
|
n.pending && n.pushPending();
|
2712
2712
|
};
|
2713
2713
|
ji.prototype.parse = function (n, e, t, i) {
|
2714
|
-
var s = new
|
2714
|
+
var s = new at(n, this, e, t, i);
|
2715
2715
|
this.tokenize(s);
|
2716
2716
|
};
|
2717
2717
|
function wo(n) {
|
2718
2718
|
var e = ["vbscript", "javascript", "file", "data"],
|
2719
2719
|
t = n.trim().toLowerCase();
|
2720
|
-
return t =
|
2720
|
+
return t = nt(t), !(t.indexOf(":") !== -1 && e.indexOf(t.split(":")[0]) !== -1);
|
2721
2721
|
}
|
2722
2722
|
var Ao = {
|
2723
2723
|
options: {
|
@@ -2866,14 +2866,14 @@ xe.prototype.parseInline = function (n, e) {
|
|
2866
2866
|
xe.prototype.renderInline = function (n, e) {
|
2867
2867
|
return e = e || {}, this.renderer.render(this.parseInline(n, e), this.options, e);
|
2868
2868
|
};
|
2869
|
-
var
|
2870
|
-
function
|
2871
|
-
_classCallCheck(this,
|
2869
|
+
var ft = /*#__PURE__*/function () {
|
2870
|
+
function ft() {
|
2871
|
+
_classCallCheck(this, ft);
|
2872
2872
|
}
|
2873
|
-
return _createClass(
|
2873
|
+
return _createClass(ft, null, [{
|
2874
2874
|
key: "instantiate",
|
2875
2875
|
value: function instantiate(e) {
|
2876
|
-
if (e) return new xe(_objectSpread(_objectSpread({},
|
2876
|
+
if (e) return new xe(_objectSpread(_objectSpread({}, ft.DEFAULT_PROPERTIES), e));
|
2877
2877
|
if (window.hljs) {
|
2878
2878
|
var t = window.hljs;
|
2879
2879
|
return new xe({
|
@@ -2905,24 +2905,24 @@ var ut = /*#__PURE__*/function () {
|
|
2905
2905
|
typographer: !0
|
2906
2906
|
// Enable smartypants and other sweet transforms
|
2907
2907
|
});
|
2908
|
-
} else return new xe(
|
2908
|
+
} else return new xe(ft.DEFAULT_PROPERTIES);
|
2909
2909
|
}
|
2910
2910
|
}, {
|
2911
2911
|
key: "createNew",
|
2912
2912
|
value: function createNew(e) {
|
2913
|
-
var t =
|
2913
|
+
var t = ft.instantiate(e);
|
2914
2914
|
return t.inline.validateLink = function () {
|
2915
2915
|
return !0;
|
2916
2916
|
}, t;
|
2917
2917
|
}
|
2918
2918
|
}]);
|
2919
2919
|
}();
|
2920
|
-
|
2920
|
+
ft.DEFAULT_PROPERTIES = {
|
2921
2921
|
breaks: !0,
|
2922
2922
|
linkTarget: "_blank"
|
2923
2923
|
// set target to open in a new tab
|
2924
2924
|
};
|
2925
|
-
var ti =
|
2925
|
+
var ti = ft;
|
2926
2926
|
var J = /*#__PURE__*/function () {
|
2927
2927
|
function J() {
|
2928
2928
|
_classCallCheck(this, J);
|
@@ -3026,7 +3026,7 @@ var F = /*#__PURE__*/function () {
|
|
3026
3026
|
}, {
|
3027
3027
|
key: "apply",
|
3028
3028
|
value: function apply(e, t, i) {
|
3029
|
-
|
3029
|
+
De.setRing(t.bubbleElement, i == null ? void 0 : i.bubble), i != null && i.bubble && (i = JSON.parse(JSON.stringify(i)), delete i.bubble), e.applyCustomStyles(t, "history", !1, i);
|
3030
3030
|
}
|
3031
3031
|
}, {
|
3032
3032
|
key: "addLoadHistoryMessage",
|
@@ -3078,7 +3078,7 @@ var F = /*#__PURE__*/function () {
|
|
3078
3078
|
}]);
|
3079
3079
|
}();
|
3080
3080
|
F.CLASS = "loading-history-message", F.FULL_VIEW_CLASS = "loading-history-message-full-view", F.SMALL_CLASS = "loading-history-message-small";
|
3081
|
-
var
|
3081
|
+
var Fe = F;
|
3082
3082
|
var Wt = /*#__PURE__*/function () {
|
3083
3083
|
function Wt() {
|
3084
3084
|
_classCallCheck(this, Wt);
|
@@ -3338,7 +3338,7 @@ var Z = /*#__PURE__*/function () {
|
|
3338
3338
|
var o;
|
3339
3339
|
s || (o = this._introPanel) == null || o.hide();
|
3340
3340
|
var r = this.messageElementRefs[this.messageElementRefs.length - 1];
|
3341
|
-
return
|
3341
|
+
return Fe.changeFullViewToSmall(this), !i && Z.isTemporaryElement(r) && (this.revealRoleElementsIfTempRemoved(r, t), this.removeLastMessage()), this.createMessageElements(e, t, i);
|
3342
3342
|
}
|
3343
3343
|
// this can be tested by having an ai message, then a temp ai message with html that submits new user message:
|
3344
3344
|
// https://github.com/OvidijusParsiunas/deep-chat/issues/258
|
@@ -3465,7 +3465,7 @@ var Z = /*#__PURE__*/function () {
|
|
3465
3465
|
}, {
|
3466
3466
|
key: "isLoadingMessage",
|
3467
3467
|
value: function isLoadingMessage(e) {
|
3468
|
-
return e == null ? void 0 : e.bubbleElement.classList.contains(
|
3468
|
+
return e == null ? void 0 : e.bubbleElement.classList.contains(De.BUBBLE_CLASS);
|
3469
3469
|
}
|
3470
3470
|
}]);
|
3471
3471
|
}();
|
@@ -3516,7 +3516,7 @@ var S = /*#__PURE__*/function () {
|
|
3516
3516
|
}, {
|
3517
3517
|
key: "overwriteMessage",
|
3518
3518
|
value: function overwriteMessage(e, t, i, s, r, o) {
|
3519
|
-
var a = S.getLastElementsByClass(t, [S.getRoleClass(s), o], [
|
3519
|
+
var a = S.getLastElementsByClass(t, [S.getRoleClass(s), o], [De.BUBBLE_CLASS]),
|
3520
3520
|
l = S.getLastMessage(e, s, r);
|
3521
3521
|
return l && (l[r] = i), a;
|
3522
3522
|
}
|
@@ -3688,12 +3688,12 @@ var S = /*#__PURE__*/function () {
|
|
3688
3688
|
}();
|
3689
3689
|
S.AI_ROLE = "ai", S.USER_ROLE = "user", S.ERROR_MESSAGE_TEXT_CLASS = "error-message-text", S.OUTER_CONTAINER_CLASS_ROLE_PREFIX = "deep-chat-outer-container-role-", S.EMPTY_MESSAGE_CLASS = "empty-message", S.POSITION_TOP_MESSAGE_CLASS = "deep-chat-top-message", S.POSITION_MIDDLE_MESSAGE_CLASS = "deep-chat-middle-message", S.POSITION_BOTTOM_MESSAGE_CLASS = "deep-chat-bottom-message";
|
3690
3690
|
var y = S;
|
3691
|
-
var
|
3692
|
-
function
|
3693
|
-
_classCallCheck(this,
|
3694
|
-
this._fileAdded = !1, this._streamType = "", this._hasStreamEnded = !1, this._messages = e;
|
3691
|
+
var Le = /*#__PURE__*/function () {
|
3692
|
+
function Le(e, t) {
|
3693
|
+
_classCallCheck(this, Le);
|
3694
|
+
this._fileAdded = !1, this._streamType = "", this._hasStreamEnded = !1, this._partialText = "", this._messages = e, this._partialRender = _typeof(t) == "object" ? t.partialRender : !1;
|
3695
3695
|
}
|
3696
|
-
return _createClass(
|
3696
|
+
return _createClass(Le, [{
|
3697
3697
|
key: "upsertStreamedMessage",
|
3698
3698
|
value: function upsertStreamedMessage(e) {
|
3699
3699
|
var r;
|
@@ -3712,7 +3712,7 @@ var ft = /*#__PURE__*/function () {
|
|
3712
3712
|
}, {
|
3713
3713
|
key: "setInitialState",
|
3714
3714
|
value: function setInitialState(e, t, i) {
|
3715
|
-
this._streamType = e, i !== null && i !== void 0 ? i : i = y.AI_ROLE, this._elements = e === "text" ? this._messages.addNewTextMessage(t, i) : _e.add(this._messages, t, i), this._elements && (this._elements.bubbleElement.classList.add(
|
3715
|
+
this._streamType = e, i !== null && i !== void 0 ? i : i = y.AI_ROLE, this._elements = e === "text" ? this._messages.addNewTextMessage(t, i) : _e.add(this._messages, t, i), this._elements && (this._elements.bubbleElement.classList.add(Le.MESSAGE_CLASS), this._activeMessageRole = i, this._message = _defineProperty({
|
3716
3716
|
role: this._activeMessageRole
|
3717
3717
|
}, e, t), this._messages.messageToElements.push([this._message, _defineProperty({}, e, this._elements)]));
|
3718
3718
|
}
|
@@ -3720,12 +3720,28 @@ var ft = /*#__PURE__*/function () {
|
|
3720
3720
|
key: "updateBasedOnType",
|
3721
3721
|
value: function updateBasedOnType(e, t, i) {
|
3722
3722
|
var s = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
|
3723
|
-
y.unfillEmptyMessageElement(i, e), (t === "text" ? this.updateText : this.updateHTML).bind(this)(e, i, s);
|
3723
|
+
this._partialRender || y.unfillEmptyMessageElement(i, e), (t === "text" ? this.updateText : this.updateHTML).bind(this)(e, i, s);
|
3724
3724
|
}
|
3725
3725
|
}, {
|
3726
3726
|
key: "updateText",
|
3727
3727
|
value: function updateText(e, t, i) {
|
3728
|
-
this._message && (this._message.text = i ? e : this._message.text + e, this._messages.renderText(t, this._message.text));
|
3728
|
+
this._message && (this._message.text = i ? e : this._message.text + e, this._partialRender && this.isNewPartialRenderParagraph() && this.partialRenderNewParagraph(t), this._partialBubble ? this.partialRenderBubbleUpdate(e) : this._messages.renderText(t, this._message.text));
|
3729
|
+
}
|
3730
|
+
}, {
|
3731
|
+
key: "isNewPartialRenderParagraph",
|
3732
|
+
value: function isNewPartialRenderParagraph() {
|
3733
|
+
var e, t;
|
3734
|
+
return this._partialBubble ? this._partialText && ((t = this._partialText) == null ? void 0 : t.indexOf(Le.PARTIAL_RENDER_TEXT_MARK)) > -1 : ((e = this._message) == null ? void 0 : e.text) && this._message.text.indexOf(Le.PARTIAL_RENDER_TEXT_MARK) > -1;
|
3735
|
+
}
|
3736
|
+
}, {
|
3737
|
+
key: "partialRenderNewParagraph",
|
3738
|
+
value: function partialRenderNewParagraph(e) {
|
3739
|
+
this._partialText = "", this._partialBubble = document.createElement("div"), this._partialBubble.classList.add("partial-render-message"), e.appendChild(this._partialBubble);
|
3740
|
+
}
|
3741
|
+
}, {
|
3742
|
+
key: "partialRenderBubbleUpdate",
|
3743
|
+
value: function partialRenderBubbleUpdate(e) {
|
3744
|
+
this._partialText += e, this._messages.renderText(this._partialBubble, this._partialText);
|
3729
3745
|
}
|
3730
3746
|
}, {
|
3731
3747
|
key: "updateHTML",
|
@@ -3741,7 +3757,7 @@ var ft = /*#__PURE__*/function () {
|
|
3741
3757
|
var e;
|
3742
3758
|
if (!(this._endStreamAfterOperation || !this._message) && !(this._fileAdded && !this._elements)) {
|
3743
3759
|
if (!this._elements) throw Error(k.NO_VALID_STREAM_EVENTS_SENT);
|
3744
|
-
(e = this._elements.bubbleElement) != null && e.classList.contains(
|
3760
|
+
(e = this._elements.bubbleElement) != null && e.classList.contains(Le.MESSAGE_CLASS) && (this._streamType === "text" ? this._messages.textToSpeech && gt.speak(this._message.text || "", this._messages.textToSpeech) : this._streamType === "html" && this._elements && X.apply(this._messages, this._elements.outerContainer), this._elements.bubbleElement.classList.remove(Le.MESSAGE_CLASS), this._message && this._messages.sendClientUpdate(he.createMessageContent(this._message), !1), this._hasStreamEnded = !0);
|
3745
3761
|
}
|
3746
3762
|
}
|
3747
3763
|
}, {
|
@@ -3786,13 +3802,13 @@ var ft = /*#__PURE__*/function () {
|
|
3786
3802
|
}()
|
3787
3803
|
}]);
|
3788
3804
|
}();
|
3789
|
-
|
3790
|
-
var we =
|
3791
|
-
var
|
3792
|
-
function
|
3793
|
-
_classCallCheck(this,
|
3805
|
+
Le.MESSAGE_CLASS = "streamed-message", Le.PARTIAL_RENDER_TEXT_MARK = "\n\n";
|
3806
|
+
var we = Le;
|
3807
|
+
var He = /*#__PURE__*/function () {
|
3808
|
+
function He() {
|
3809
|
+
_classCallCheck(this, He);
|
3794
3810
|
}
|
3795
|
-
return _createClass(
|
3811
|
+
return _createClass(He, null, [{
|
3796
3812
|
key: "tempRemoveContentHeader",
|
3797
3813
|
value: // need to pass stringifyBody boolean separately as binding is throwing an error for some reason
|
3798
3814
|
// prettier-ignore
|
@@ -3808,8 +3824,8 @@ var qe = /*#__PURE__*/function () {
|
|
3808
3824
|
}
|
3809
3825
|
throw new Error("Request settings have not been set up");
|
3810
3826
|
case 2:
|
3811
|
-
s = e.headers[
|
3812
|
-
delete e.headers[
|
3827
|
+
s = e.headers[He.CONTENT_TYPE];
|
3828
|
+
delete e.headers[He.CONTENT_TYPE];
|
3813
3829
|
_context3.prev = 4;
|
3814
3830
|
_context3.next = 7;
|
3815
3831
|
return t(i);
|
@@ -3820,9 +3836,9 @@ var qe = /*#__PURE__*/function () {
|
|
3820
3836
|
case 10:
|
3821
3837
|
_context3.prev = 10;
|
3822
3838
|
_context3.t0 = _context3["catch"](4);
|
3823
|
-
throw e.headers[
|
3839
|
+
throw e.headers[He.CONTENT_TYPE] = s, _context3.t0;
|
3824
3840
|
case 13:
|
3825
|
-
return _context3.abrupt("return", (e.headers[
|
3841
|
+
return _context3.abrupt("return", (e.headers[He.CONTENT_TYPE] = s, r));
|
3826
3842
|
case 14:
|
3827
3843
|
case "end":
|
3828
3844
|
return _context3.stop();
|
@@ -3966,7 +3982,7 @@ var qe = /*#__PURE__*/function () {
|
|
3966
3982
|
}
|
3967
3983
|
if (r) {
|
3968
3984
|
d = k.INVALID_RESPONSE(t, "response", !!a, l);
|
3969
|
-
|
3985
|
+
He.displayError(e, d);
|
3970
3986
|
}
|
3971
3987
|
return _context5.abrupt("return");
|
3972
3988
|
case 17:
|
@@ -3984,8 +4000,8 @@ var qe = /*#__PURE__*/function () {
|
|
3984
4000
|
}()
|
3985
4001
|
}]);
|
3986
4002
|
}();
|
3987
|
-
|
3988
|
-
var E =
|
4003
|
+
He.CONTENT_TYPE = "Content-Type";
|
4004
|
+
var E = He;
|
3989
4005
|
function Mo(_x14, _x15) {
|
3990
4006
|
return _Mo.apply(this, arguments);
|
3991
4007
|
}
|
@@ -4118,7 +4134,7 @@ function No(n, e) {
|
|
4118
4134
|
M(), u();
|
4119
4135
|
});
|
4120
4136
|
var Y = c !== null && c !== void 0 ? c : window.fetch,
|
4121
|
-
|
4137
|
+
qe = s !== null && s !== void 0 ? s : Do;
|
4122
4138
|
function ae() {
|
4123
4139
|
return _ae.apply(this, arguments);
|
4124
4140
|
}
|
@@ -4138,7 +4154,7 @@ function No(n, e) {
|
|
4138
4154
|
case 4:
|
4139
4155
|
ye = _context6.sent;
|
4140
4156
|
_context6.next = 7;
|
4141
|
-
return
|
4157
|
+
return qe(ye);
|
4142
4158
|
case 7:
|
4143
4159
|
_context6.next = 9;
|
4144
4160
|
return Mo(ye.body, ko(Lo(function (ie) {
|
@@ -4235,7 +4251,7 @@ var A = /*#__PURE__*/function () {
|
|
4235
4251
|
}
|
4236
4252
|
return _context7.abrupt("return", ve.requestStream(i, e));
|
4237
4253
|
case 15:
|
4238
|
-
d = new we(i), u = E.fetch.bind(this, e, l, s), h = {
|
4254
|
+
d = new we(i, e.stream), u = E.fetch.bind(this, e, l, s), h = {
|
4239
4255
|
method: ((g = e.connectSettings) == null ? void 0 : g.method) || "POST",
|
4240
4256
|
headers: l,
|
4241
4257
|
credentials: (b = e.connectSettings) == null ? void 0 : b.credentials,
|
@@ -4264,7 +4280,7 @@ var A = /*#__PURE__*/function () {
|
|
4264
4280
|
var u = !1;
|
4265
4281
|
fetch(((h = e.connectSettings) == null ? void 0 : h.url) || e.url || "", s).then(/*#__PURE__*/function () {
|
4266
4282
|
var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(f) {
|
4267
|
-
var b, M, m, p, g, _yield$m$read, Y,
|
4283
|
+
var b, M, m, p, g, _yield$m$read, Y, qe, ae, Ce, ye;
|
4268
4284
|
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
4269
4285
|
while (1) switch (_context8.prev = _context8.next) {
|
4270
4286
|
case 0:
|
@@ -4287,8 +4303,8 @@ var A = /*#__PURE__*/function () {
|
|
4287
4303
|
case 8:
|
4288
4304
|
_yield$m$read = _context8.sent;
|
4289
4305
|
Y = _yield$m$read.value;
|
4290
|
-
|
4291
|
-
if (!(g =
|
4306
|
+
qe = _yield$m$read.done;
|
4307
|
+
if (!(g = qe, g)) {
|
4292
4308
|
_context8.next = 15;
|
4293
4309
|
break;
|
4294
4310
|
}
|
@@ -4447,7 +4463,7 @@ var A = /*#__PURE__*/function () {
|
|
4447
4463
|
key: "simulate",
|
4448
4464
|
value: function () {
|
4449
4465
|
var _simulate = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee1(e, t, i, s) {
|
4450
|
-
var r, o, _o2, _o3;
|
4466
|
+
var r, o, _o2, a, _o3;
|
4451
4467
|
return _regeneratorRuntime().wrap(function _callee1$(_context1) {
|
4452
4468
|
while (1) switch (_context1.prev = _context1.next) {
|
4453
4469
|
case 0:
|
@@ -4483,8 +4499,8 @@ var A = /*#__PURE__*/function () {
|
|
4483
4499
|
case 10:
|
4484
4500
|
if (i.text) {
|
4485
4501
|
t.onOpen();
|
4486
|
-
_o2 = i.text.split("");
|
4487
|
-
A.populateMessages(e, _o2,
|
4502
|
+
_o2 = i.text.split(""), a = new we(e, s == null ? void 0 : s.stream);
|
4503
|
+
A.populateMessages(e, _o2, a, r, "text", 0, s);
|
4488
4504
|
}
|
4489
4505
|
if (i.html) {
|
4490
4506
|
t.onOpen();
|
@@ -4573,11 +4589,11 @@ var A = /*#__PURE__*/function () {
|
|
4573
4589
|
}
|
4574
4590
|
}]);
|
4575
4591
|
}();
|
4576
|
-
var
|
4577
|
-
function
|
4578
|
-
_classCallCheck(this,
|
4592
|
+
var Ze = /*#__PURE__*/function () {
|
4593
|
+
function Ze() {
|
4594
|
+
_classCallCheck(this, Ze);
|
4579
4595
|
}
|
4580
|
-
return _createClass(
|
4596
|
+
return _createClass(Ze, null, [{
|
4581
4597
|
key: "generateResponse",
|
4582
4598
|
value: function generateResponse(e) {
|
4583
4599
|
var t = e[e.length - 1][0];
|
@@ -4602,15 +4618,15 @@ var Ye = /*#__PURE__*/function () {
|
|
4602
4618
|
value: function getResponse(_ref6) {
|
4603
4619
|
var e = _ref6.customDemoResponse,
|
4604
4620
|
t = _ref6.messageToElements;
|
4605
|
-
return e ?
|
4606
|
-
text:
|
4621
|
+
return e ? Ze.getCustomResponse(e, t[t.length - 1][0]) : {
|
4622
|
+
text: Ze.generateResponse(t)
|
4607
4623
|
};
|
4608
4624
|
}
|
4609
4625
|
// timeout is used to simulate a timeout for a response to come back
|
4610
4626
|
}, {
|
4611
4627
|
key: "request",
|
4612
4628
|
value: function request(e, t) {
|
4613
|
-
var i =
|
4629
|
+
var i = Ze.getResponse(t);
|
4614
4630
|
setTimeout(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
|
4615
4631
|
var s, r, o;
|
4616
4632
|
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
@@ -4646,14 +4662,14 @@ var Ye = /*#__PURE__*/function () {
|
|
4646
4662
|
key: "requestStream",
|
4647
4663
|
value: function requestStream(e, t) {
|
4648
4664
|
setTimeout(function () {
|
4649
|
-
var i =
|
4665
|
+
var i = Ze.getResponse(e);
|
4650
4666
|
A.simulate(e, t.streamHandlers, i, t);
|
4651
4667
|
}, 400);
|
4652
4668
|
}
|
4653
4669
|
}]);
|
4654
4670
|
}();
|
4655
|
-
|
4656
|
-
var ve =
|
4671
|
+
Ze.URL = "deep-chat-demo";
|
4672
|
+
var ve = Ze;
|
4657
4673
|
var q = /*#__PURE__*/function () {
|
4658
4674
|
function q() {
|
4659
4675
|
_classCallCheck(this, q);
|
@@ -4856,7 +4872,7 @@ var q = /*#__PURE__*/function () {
|
|
4856
4872
|
var _i$o;
|
4857
4873
|
var o = s.role || y.AI_ROLE,
|
4858
4874
|
a = i[o];
|
4859
|
-
s.text === r || s.html === r ? (a == null || a.finaliseStreamedMessage(), delete i[o]) : ((_i$o = i[o]) !== null && _i$o !== void 0 ? _i$o : i[o] = new we(t), i[o].upsertStreamedMessage(s));
|
4875
|
+
s.text === r || s.html === r ? (a == null || a.finaliseStreamedMessage(), delete i[o]) : ((_i$o = i[o]) !== null && _i$o !== void 0 ? _i$o : i[o] = new we(t, e.stream), i[o].upsertStreamedMessage(s));
|
4860
4876
|
} else A.simulate(t, e.streamHandlers, s);
|
4861
4877
|
}
|
4862
4878
|
}]);
|
@@ -4943,7 +4959,7 @@ var be = /*#__PURE__*/function () {
|
|
4943
4959
|
var u, h;
|
4944
4960
|
var s = !0,
|
4945
4961
|
r = !1;
|
4946
|
-
var o = new we(i),
|
4962
|
+
var o = new we(i, e.stream),
|
4947
4963
|
a = function a() {
|
4948
4964
|
r || !s || (e.streamHandlers.onOpen(), r = !0);
|
4949
4965
|
},
|
@@ -5335,12 +5351,12 @@ var R = /*#__PURE__*/function () {
|
|
5335
5351
|
}
|
5336
5352
|
}]);
|
5337
5353
|
}();
|
5338
|
-
var
|
5339
|
-
function
|
5340
|
-
_classCallCheck(this,
|
5354
|
+
var ze = /*#__PURE__*/function () {
|
5355
|
+
function ze(e, t, i) {
|
5356
|
+
_classCallCheck(this, ze);
|
5341
5357
|
this._isLoading = !1, this._isPaginationComplete = !1, this._index = 0, this._messages = t, i.fetchHistory && this.fetchHistory(i.fetchHistory), e.loadHistory && this.setupLoadHistoryOnScroll(e.loadHistory), this.setupInitialHistory(e);
|
5342
5358
|
}
|
5343
|
-
return _createClass(
|
5359
|
+
return _createClass(ze, [{
|
5344
5360
|
key: "fetchHistory",
|
5345
5361
|
value: function () {
|
5346
5362
|
var _fetchHistory = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee22(e) {
|
@@ -5349,12 +5365,12 @@ var He = /*#__PURE__*/function () {
|
|
5349
5365
|
return _regeneratorRuntime().wrap(function _callee22$(_context22) {
|
5350
5366
|
while (1) switch (_context22.prev = _context22.next) {
|
5351
5367
|
case 0:
|
5352
|
-
t =
|
5368
|
+
t = Fe.addMessage(this._messages);
|
5353
5369
|
_context22.next = 3;
|
5354
5370
|
return e();
|
5355
5371
|
case 3:
|
5356
5372
|
i = _context22.sent;
|
5357
|
-
this._messages.removeMessage(t),
|
5373
|
+
this._messages.removeMessage(t), ze.displayIntroMessages(this._messages.messageElementRefs), i.forEach(function (s) {
|
5358
5374
|
return _this0._messages.addAnyMessage(s, !0);
|
5359
5375
|
}), setTimeout(function () {
|
5360
5376
|
return G.scrollToBottom(_this0._messages.elementRef);
|
@@ -5432,7 +5448,7 @@ var He = /*#__PURE__*/function () {
|
|
5432
5448
|
break;
|
5433
5449
|
}
|
5434
5450
|
_this10._isLoading = !0;
|
5435
|
-
t =
|
5451
|
+
t = Fe.addMessage(_this10._messages, !1);
|
5436
5452
|
_context23.prev = 3;
|
5437
5453
|
_context23.next = 6;
|
5438
5454
|
return e(_this10._index++);
|
@@ -5444,7 +5460,7 @@ var He = /*#__PURE__*/function () {
|
|
5444
5460
|
case 10:
|
5445
5461
|
_context23.prev = 10;
|
5446
5462
|
_context23.t0 = _context23["catch"](3);
|
5447
|
-
_this10._messages.removeMessage(t), _this10._isPaginationComplete = !0, _this10._messages.addNewErrorMessage("service",
|
5463
|
+
_this10._messages.removeMessage(t), _this10._isPaginationComplete = !0, _this10._messages.addNewErrorMessage("service", ze.FAILED_ERROR_MESSAGE, !0), console.error(_context23.t0);
|
5448
5464
|
case 13:
|
5449
5465
|
case "end":
|
5450
5466
|
return _context23.stop();
|
@@ -5480,7 +5496,7 @@ var He = /*#__PURE__*/function () {
|
|
5480
5496
|
while (1) switch (_context25.prev = _context25.next) {
|
5481
5497
|
case 0:
|
5482
5498
|
this._isLoading = !0;
|
5483
|
-
t =
|
5499
|
+
t = Fe.addMessage(this._messages);
|
5484
5500
|
_context25.prev = 2;
|
5485
5501
|
_context25.next = 5;
|
5486
5502
|
return e(this._index++);
|
@@ -5495,9 +5511,9 @@ var He = /*#__PURE__*/function () {
|
|
5495
5511
|
case 10:
|
5496
5512
|
_context25.prev = 10;
|
5497
5513
|
_context25.t0 = _context25["catch"](2);
|
5498
|
-
this._messages.removeMessage(t), this._isPaginationComplete = !0, this._messages.addNewErrorMessage("service",
|
5514
|
+
this._messages.removeMessage(t), this._isPaginationComplete = !0, this._messages.addNewErrorMessage("service", ze.FAILED_ERROR_MESSAGE, !0), console.error(_context25.t0);
|
5499
5515
|
case 13:
|
5500
|
-
|
5516
|
+
ze.displayIntroMessages(this._messages.messageElementRefs), this._isLoading = !1;
|
5501
5517
|
case 14:
|
5502
5518
|
case "end":
|
5503
5519
|
return _context25.stop();
|
@@ -5535,7 +5551,7 @@ var He = /*#__PURE__*/function () {
|
|
5535
5551
|
key: "addErrorPrefix",
|
5536
5552
|
value: function addErrorPrefix(e) {
|
5537
5553
|
var _e$permittedErrorPref;
|
5538
|
-
(_e$permittedErrorPref = e.permittedErrorPrefixes) !== null && _e$permittedErrorPref !== void 0 ? _e$permittedErrorPref : e.permittedErrorPrefixes = [], e.permittedErrorPrefixes.push(
|
5554
|
+
(_e$permittedErrorPref = e.permittedErrorPrefixes) !== null && _e$permittedErrorPref !== void 0 ? _e$permittedErrorPref : e.permittedErrorPrefixes = [], e.permittedErrorPrefixes.push(ze.FAILED_ERROR_MESSAGE);
|
5539
5555
|
}
|
5540
5556
|
}, {
|
5541
5557
|
key: "displayIntroMessages",
|
@@ -5547,8 +5563,8 @@ var He = /*#__PURE__*/function () {
|
|
5547
5563
|
}
|
5548
5564
|
}]);
|
5549
5565
|
}();
|
5550
|
-
|
5551
|
-
var ii =
|
5566
|
+
ze.FAILED_ERROR_MESSAGE = "Failed to load history";
|
5567
|
+
var ii = ze;
|
5552
5568
|
var vt = /*#__PURE__*/function () {
|
5553
5569
|
function vt() {
|
5554
5570
|
_classCallCheck(this, vt);
|
@@ -5692,14 +5708,14 @@ var B = /*#__PURE__*/function () {
|
|
5692
5708
|
}
|
5693
5709
|
}]);
|
5694
5710
|
}();
|
5695
|
-
var
|
5696
|
-
function
|
5711
|
+
var rt = /*#__PURE__*/function () {
|
5712
|
+
function rt(e, t, i) {
|
5697
5713
|
var _a$url;
|
5698
|
-
_classCallCheck(this,
|
5714
|
+
_classCallCheck(this, rt);
|
5699
5715
|
var s, r, o, a, l;
|
5700
|
-
this.rawBody = {}, this.validateKeyProperty = !1, this.canSendMessage =
|
5716
|
+
this.rawBody = {}, this.validateKeyProperty = !1, this.canSendMessage = rt.canSendMessage, this.connectSettings = {}, this.fileTypes = {}, this.completionsHandlers = {}, this.streamHandlers = {}, this.deepChat = e, this.demo = i, Object.assign(this.rawBody, (s = e.connect) == null ? void 0 : s.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, B.set(e, this, t), e.connect && (this.connectSettings = e.connect), this.demo && ((_a$url = (a = this.connectSettings).url) !== null && _a$url !== void 0 ? _a$url : a.url = ve.URL), this.connectSettings.websocket && q.setup(this), this.stream = ((l = this.deepChat.connect) == null ? void 0 : l.stream) || te.checkForStream(this.deepChat), e.loadHistory && ii.addErrorPrefix(this);
|
5701
5717
|
}
|
5702
|
-
return _createClass(
|
5718
|
+
return _createClass(rt, [{
|
5703
5719
|
key: "verifyKey",
|
5704
5720
|
value: function verifyKey(e, t) {}
|
5705
5721
|
}, {
|
@@ -5772,7 +5788,7 @@ var nt = /*#__PURE__*/function () {
|
|
5772
5788
|
return _regeneratorRuntime().wrap(function _callee29$(_context29) {
|
5773
5789
|
while (1) switch (_context29.prev = _context29.next) {
|
5774
5790
|
case 0:
|
5775
|
-
s =
|
5791
|
+
s = rt.createCustomFormDataBody(this.rawBody, t, i), r = this.connectSettings, o = this.getServiceIOByType(i[0]);
|
5776
5792
|
this.connectSettings = (o == null ? void 0 : o.connect) || this.connectSettings;
|
5777
5793
|
_context29.next = 4;
|
5778
5794
|
return this.request(s, e, !1);
|
@@ -5911,7 +5927,7 @@ var nt = /*#__PURE__*/function () {
|
|
5911
5927
|
}
|
5912
5928
|
}]);
|
5913
5929
|
}();
|
5914
|
-
var V = /*#__PURE__*/function (
|
5930
|
+
var V = /*#__PURE__*/function (_rt) {
|
5915
5931
|
// prettier-ignore
|
5916
5932
|
function V(e, t, i, s, r) {
|
5917
5933
|
var _this13;
|
@@ -5920,7 +5936,7 @@ var V = /*#__PURE__*/function (_nt) {
|
|
5920
5936
|
_this13 = _callSuper(this, V, [e, r]), _this13.insertKeyPlaceholderText = "API Key", _this13.keyHelpUrl = "", Object.assign(_this13.rawBody, (o = e.connect) == null ? void 0 : o.additionalBodyProps), _this13._keyVerificationDetails = t, _this13._buildHeadersFunc = i, s && _this13.setApiKeyProperties(s), _this13.connectSettings = _this13.buildConnectSettings(_this13.key || "", e.connect);
|
5921
5937
|
return _this13;
|
5922
5938
|
}
|
5923
|
-
_inherits(V,
|
5939
|
+
_inherits(V, _rt);
|
5924
5940
|
return _createClass(V, [{
|
5925
5941
|
key: "setApiKeyProperties",
|
5926
5942
|
value: function setApiKeyProperties(e) {
|
@@ -5957,7 +5973,7 @@ var V = /*#__PURE__*/function (_nt) {
|
|
5957
5973
|
return !0;
|
5958
5974
|
}
|
5959
5975
|
}]);
|
5960
|
-
}(
|
5976
|
+
}(rt);
|
5961
5977
|
var Si = /*#__PURE__*/function () {
|
5962
5978
|
function Si() {
|
5963
5979
|
_classCallCheck(this, Si);
|
@@ -5976,19 +5992,19 @@ var Si = /*#__PURE__*/function () {
|
|
5976
5992
|
}
|
5977
5993
|
}]);
|
5978
5994
|
}();
|
5979
|
-
var
|
5995
|
+
var Ie = /*#__PURE__*/function (_HTMLElement) {
|
5980
5996
|
// If this is not working, try using propertyName directly
|
5981
|
-
function
|
5997
|
+
function Ie() {
|
5982
5998
|
var _this14;
|
5983
|
-
_classCallCheck(this,
|
5984
|
-
_this14 = _callSuper(this,
|
5985
|
-
var t =
|
5999
|
+
_classCallCheck(this, Ie);
|
6000
|
+
_this14 = _callSuper(this, Ie), _this14._waitingToRender_ = !1, _this14._propUpdated_ = !1, Object.keys(Ie._attributeToProperty_).forEach(function (e) {
|
6001
|
+
var t = Ie._attributeToProperty_[e];
|
5986
6002
|
_this14.constructPropertyAccessors(t), _this14.hasOwnProperty(e) || _this14.constructPropertyAccessors(t, e);
|
5987
6003
|
});
|
5988
6004
|
return _this14;
|
5989
6005
|
}
|
5990
|
-
_inherits(
|
5991
|
-
return _createClass(
|
6006
|
+
_inherits(Ie, _HTMLElement);
|
6007
|
+
return _createClass(Ie, [{
|
5992
6008
|
key: "constructPropertyAccessors",
|
5993
6009
|
value:
|
5994
6010
|
// need to be called here as accessors need to be set for the class instance
|
@@ -6007,8 +6023,8 @@ var Le = /*#__PURE__*/function (_HTMLElement) {
|
|
6007
6023
|
key: "attributeChangedCallback",
|
6008
6024
|
value: function attributeChangedCallback(e, t, i) {
|
6009
6025
|
if (t === i) return;
|
6010
|
-
var s =
|
6011
|
-
r =
|
6026
|
+
var s = Ie._attributes_[e](i),
|
6027
|
+
r = Ie._attributeToProperty_[e];
|
6012
6028
|
this[r] = s;
|
6013
6029
|
}
|
6014
6030
|
}, {
|
@@ -6017,40 +6033,40 @@ var Le = /*#__PURE__*/function (_HTMLElement) {
|
|
6017
6033
|
}], [{
|
6018
6034
|
key: "observedAttributes",
|
6019
6035
|
get: function get() {
|
6020
|
-
return Object.keys(
|
6036
|
+
return Object.keys(Ie._attributes_) || [];
|
6021
6037
|
}
|
6022
6038
|
}]);
|
6023
6039
|
}(/*#__PURE__*/_wrapNativeSuper(HTMLElement));
|
6024
|
-
|
6025
|
-
var ss =
|
6040
|
+
Ie._attributes_ = {}, Ie._attributeToProperty_ = {};
|
6041
|
+
var ss = Ie;
|
6026
6042
|
var Bo = "<?xml version=\"1.0\" standalone=\"no\"?>\n<svg version=\"1.1\"\n\txmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\" xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\"\n\txmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"0.9em\" height=\"0.9em\"\n\tviewBox=\"0 0 1200 1200\" enable-background=\"new 0 0 1200 1200\">\n\t\t<path d=\"\n\t\t\tM669.727,273.516c-22.891-2.476-46.15-3.895-69.727-4.248c-103.025,0.457-209.823,25.517-310.913,73.536\n\t\t\tc-75.058,37.122-148.173,89.529-211.67,154.174C46.232,529.978,6.431,577.76,0,628.74c0.76,44.162,48.153,98.67,77.417,131.764\n\t\t\tc59.543,62.106,130.754,113.013,211.67,154.174c2.75,1.335,5.51,2.654,8.276,3.955l-75.072,131.102l102.005,60.286l551.416-960.033\n\t\t\tl-98.186-60.008L669.727,273.516z M902.563,338.995l-74.927,129.857c34.47,44.782,54.932,100.006,54.932,159.888\n\t\t\tc0,149.257-126.522,270.264-282.642,270.264c-6.749,0-13.29-0.728-19.922-1.172l-49.585,85.84c22.868,2.449,45.99,4.233,69.58,4.541\n\t\t\tc103.123-0.463,209.861-25.812,310.84-73.535c75.058-37.122,148.246-89.529,211.743-154.174\n\t\t\tc31.186-32.999,70.985-80.782,77.417-131.764c-0.76-44.161-48.153-98.669-77.417-131.763\n\t\t\tc-59.543-62.106-130.827-113.013-211.743-154.175C908.108,341.478,905.312,340.287,902.563,338.995L902.563,338.995z\n\t\t\tM599.927,358.478c6.846,0,13.638,0.274,20.361,0.732l-58.081,100.561c-81.514,16.526-142.676,85.88-142.676,168.897\n\t\t\tc0,20.854,3.841,40.819,10.913,59.325c0.008,0.021-0.008,0.053,0,0.074l-58.228,100.854\n\t\t\tc-34.551-44.823-54.932-100.229-54.932-160.182C317.285,479.484,443.808,358.477,599.927,358.478L599.927,358.478z M768.896,570.513\n\t\t\tL638.013,797.271c81.076-16.837,141.797-85.875,141.797-168.603C779.81,608.194,775.724,588.729,768.896,570.513L768.896,570.513z\"\n\t\t\t/>\n</svg>\n",
|
6027
6043
|
Fo = "<?xml version=\"1.0\" standalone=\"no\"?>\n<svg version=\"1.1\"\n\txmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\" xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\"\n\txmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"0.9em\" height=\"0.9em\"\n\tviewBox=\"0 0 1200 1200\" enable-background=\"new 0 0 1200 1200\">\n\t\t<path id=\"path6686\" inkscape:connector-curvature=\"0\" d=\"M779.843,599.925c0,95.331-80.664,172.612-180.169,172.612\n\t\t\tc-99.504,0-180.168-77.281-180.168-172.612c0-95.332,80.664-172.612,180.168-172.612\n\t\t\tC699.179,427.312,779.843,504.594,779.843,599.925z M600,240.521c-103.025,0.457-209.814,25.538-310.904,73.557\n\t\t\tc-75.058,37.122-148.206,89.496-211.702,154.141C46.208,501.218,6.431,549,0,599.981c0.76,44.161,48.13,98.669,77.394,131.763\n\t\t\tc59.543,62.106,130.786,113.018,211.702,154.179c94.271,45.751,198.616,72.092,310.904,73.557\n\t\t\tc103.123-0.464,209.888-25.834,310.866-73.557c75.058-37.122,148.243-89.534,211.74-154.179\n\t\t\tc31.185-32.999,70.962-80.782,77.394-131.763c-0.76-44.161-48.13-98.671-77.394-131.764\n\t\t\tc-59.543-62.106-130.824-112.979-211.74-154.141C816.644,268.36,712.042,242.2,600,240.521z M599.924,329.769\n\t\t\tc156.119,0,282.675,120.994,282.675,270.251c0,149.256-126.556,270.25-282.675,270.25S317.249,749.275,317.249,600.02\n\t\t\tC317.249,450.763,443.805,329.769,599.924,329.769L599.924,329.769z\"/>\n</svg>\n";
|
6028
|
-
var
|
6029
|
-
function
|
6030
|
-
_classCallCheck(this,
|
6044
|
+
var Ue = /*#__PURE__*/function () {
|
6045
|
+
function Ue() {
|
6046
|
+
_classCallCheck(this, Ue);
|
6031
6047
|
}
|
6032
|
-
return _createClass(
|
6048
|
+
return _createClass(Ue, null, [{
|
6033
6049
|
key: "createSVGElement",
|
6034
6050
|
value: function createSVGElement(e) {
|
6035
6051
|
return new DOMParser().parseFromString(e, "image/svg+xml").documentElement;
|
6036
6052
|
}
|
6037
6053
|
}]);
|
6038
6054
|
}();
|
6039
|
-
var
|
6040
|
-
function
|
6041
|
-
_classCallCheck(this,
|
6055
|
+
var Ge = /*#__PURE__*/function () {
|
6056
|
+
function Ge() {
|
6057
|
+
_classCallCheck(this, Ge);
|
6042
6058
|
}
|
6043
|
-
return _createClass(
|
6059
|
+
return _createClass(Ge, null, [{
|
6044
6060
|
key: "changeVisibility",
|
6045
6061
|
value:
|
6046
6062
|
// prettier-ignore
|
6047
6063
|
function changeVisibility(e, t, i, s) {
|
6048
|
-
s.target.id ===
|
6064
|
+
s.target.id === Ge.VISIBLE_ICON_ID ? (t.style.display = "none", i.style.display = "block", e.type = "password") : (t.style.display = "block", i.style.display = "none", e.type = "text");
|
6049
6065
|
}
|
6050
6066
|
}, {
|
6051
6067
|
key: "createIconElement",
|
6052
6068
|
value: function createIconElement(e, t) {
|
6053
|
-
var i =
|
6069
|
+
var i = Ue.createSVGElement(e);
|
6054
6070
|
return i.id = t, i.classList.add("visibility-icon"), i;
|
6055
6071
|
}
|
6056
6072
|
// prettier-ignore
|
@@ -6059,15 +6075,15 @@ var ze = /*#__PURE__*/function () {
|
|
6059
6075
|
value: function create(e) {
|
6060
6076
|
var t = document.createElement("div");
|
6061
6077
|
t.id = "visibility-icon-container";
|
6062
|
-
var i =
|
6078
|
+
var i = Ge.createIconElement(Fo, Ge.VISIBLE_ICON_ID);
|
6063
6079
|
i.style.display = "none", t.appendChild(i);
|
6064
|
-
var s =
|
6065
|
-
return t.appendChild(s), t.onclick =
|
6080
|
+
var s = Ge.createIconElement(Bo, "not-visible-icon");
|
6081
|
+
return t.appendChild(s), t.onclick = Ge.changeVisibility.bind(this, e, i, s), t;
|
6066
6082
|
}
|
6067
6083
|
}]);
|
6068
6084
|
}();
|
6069
|
-
|
6070
|
-
var ns =
|
6085
|
+
Ge.VISIBLE_ICON_ID = "visible-icon";
|
6086
|
+
var ns = Ge;
|
6071
6087
|
var K = /*#__PURE__*/function () {
|
6072
6088
|
function K() {
|
6073
6089
|
_classCallCheck(this, K);
|
@@ -6387,7 +6403,7 @@ var Ws = {
|
|
6387
6403
|
}],
|
6388
6404
|
use_web_worker: !0
|
6389
6405
|
},
|
6390
|
-
T = /*#__PURE__*/function (
|
6406
|
+
T = /*#__PURE__*/function (_rt2) {
|
6391
6407
|
function T(e) {
|
6392
6408
|
var _this15;
|
6393
6409
|
_classCallCheck(this, T);
|
@@ -6396,7 +6412,7 @@ var Ws = {
|
|
6396
6412
|
return _this15;
|
6397
6413
|
}
|
6398
6414
|
// need ref of messages object as web model exhibits unique behaviour to manipulate chat
|
6399
|
-
_inherits(T,
|
6415
|
+
_inherits(T, _rt2);
|
6400
6416
|
return _createClass(T, [{
|
6401
6417
|
key: "setUpMessages",
|
6402
6418
|
value: function setUpMessages(e) {
|
@@ -6933,7 +6949,7 @@ var Ws = {
|
|
6933
6949
|
});
|
6934
6950
|
}
|
6935
6951
|
}]);
|
6936
|
-
}(
|
6952
|
+
}(rt);
|
6937
6953
|
T.GENERIC_ERROR = "Error, please check the [troubleshooting](https://deepchat.dev/docs/webModel#troubleshooting) section of documentation for help.", T.MULTIPLE_MODELS_ERROR = "Cannot run multiple web models", T.WEB_LLM_NOT_FOUND_ERROR = "WebLLM module not found", T.DEFAULT_MODEL = "Llama-2-7b-chat-hf-q4f32_1", T.MODULE_SEARCH_LIMIT_S = 5;
|
6938
6954
|
var si = T;
|
6939
6955
|
var xi = /*#__PURE__*/function () {
|
@@ -7017,8 +7033,8 @@ var Jt = /*#__PURE__*/function (_V) {
|
|
7017
7033
|
}]);
|
7018
7034
|
}(V);
|
7019
7035
|
Jt.URL_PREFIX = "https://api-inference.huggingface.co/models/";
|
7020
|
-
var
|
7021
|
-
var li = /*#__PURE__*/function (
|
7036
|
+
var je = Jt;
|
7037
|
+
var li = /*#__PURE__*/function (_je) {
|
7022
7038
|
// prettier-ignore
|
7023
7039
|
function li(e, t, i, s, r, o) {
|
7024
7040
|
var _this22;
|
@@ -7026,7 +7042,7 @@ var li = /*#__PURE__*/function (_Ue) {
|
|
7026
7042
|
_this22 = _callSuper(this, li, [e, t, i, s, r, o]), _this22.isTextInputDisabled = !0, _this22.canSendMessage = li.canSendFile;
|
7027
7043
|
return _this22;
|
7028
7044
|
}
|
7029
|
-
_inherits(li,
|
7045
|
+
_inherits(li, _je);
|
7030
7046
|
return _createClass(li, [{
|
7031
7047
|
key: "preprocessBody",
|
7032
7048
|
value: function preprocessBody(e, t, i) {
|
@@ -7070,7 +7086,7 @@ var li = /*#__PURE__*/function (_Ue) {
|
|
7070
7086
|
return !!(t != null && t[0]);
|
7071
7087
|
}
|
7072
7088
|
}]);
|
7073
|
-
}(
|
7089
|
+
}(je);
|
7074
7090
|
var Uo = /*#__PURE__*/function (_li) {
|
7075
7091
|
// prettier-ignore
|
7076
7092
|
function Uo(e) {
|
@@ -7473,7 +7489,7 @@ var qo = /*#__PURE__*/function (_li3) {
|
|
7473
7489
|
}()
|
7474
7490
|
}]);
|
7475
7491
|
}(li);
|
7476
|
-
var Ho = /*#__PURE__*/function (
|
7492
|
+
var Ho = /*#__PURE__*/function (_je2) {
|
7477
7493
|
function Ho(e) {
|
7478
7494
|
_classCallCheck(this, Ho);
|
7479
7495
|
var s, r, o;
|
@@ -7481,7 +7497,7 @@ var Ho = /*#__PURE__*/function (_Ue2) {
|
|
7481
7497
|
i = (o = e.directConnection) == null ? void 0 : o.huggingFace;
|
7482
7498
|
return _callSuper(this, Ho, [e, "Once upon a time", "gpt2", t, i]);
|
7483
7499
|
}
|
7484
|
-
_inherits(Ho,
|
7500
|
+
_inherits(Ho, _je2);
|
7485
7501
|
return _createClass(Ho, [{
|
7486
7502
|
key: "extractResultData",
|
7487
7503
|
value: function () {
|
@@ -7511,8 +7527,8 @@ var Ho = /*#__PURE__*/function (_Ue2) {
|
|
7511
7527
|
return extractResultData;
|
7512
7528
|
}()
|
7513
7529
|
}]);
|
7514
|
-
}(
|
7515
|
-
var zo = /*#__PURE__*/function (
|
7530
|
+
}(je);
|
7531
|
+
var zo = /*#__PURE__*/function (_je3) {
|
7516
7532
|
function zo(e) {
|
7517
7533
|
var _this26;
|
7518
7534
|
_classCallCheck(this, zo);
|
@@ -7522,7 +7538,7 @@ var zo = /*#__PURE__*/function (_Ue3) {
|
|
7522
7538
|
_this26 = _callSuper(this, zo, [e, "Ask a question", "bert-large-uncased-whole-word-masking-finetuned-squad", t, i]), _this26.permittedErrorPrefixes = ["Authorization header", "Error in"], _this26._context = t.context;
|
7523
7539
|
return _this26;
|
7524
7540
|
}
|
7525
|
-
_inherits(zo,
|
7541
|
+
_inherits(zo, _je3);
|
7526
7542
|
return _createClass(zo, [{
|
7527
7543
|
key: "preprocessBody",
|
7528
7544
|
value: function preprocessBody(e, t) {
|
@@ -7565,8 +7581,8 @@ var zo = /*#__PURE__*/function (_Ue3) {
|
|
7565
7581
|
return extractResultData;
|
7566
7582
|
}()
|
7567
7583
|
}]);
|
7568
|
-
}(
|
7569
|
-
var Go = /*#__PURE__*/function (
|
7584
|
+
}(je);
|
7585
|
+
var Go = /*#__PURE__*/function (_je4) {
|
7570
7586
|
function Go(e) {
|
7571
7587
|
_classCallCheck(this, Go);
|
7572
7588
|
var s, r, o;
|
@@ -7574,7 +7590,7 @@ var Go = /*#__PURE__*/function (_Ue4) {
|
|
7574
7590
|
i = (o = e.directConnection) == null ? void 0 : o.huggingFace;
|
7575
7591
|
return _callSuper(this, Go, [e, "Insert text to summarize", "facebook/bart-large-cnn", t, i]);
|
7576
7592
|
}
|
7577
|
-
_inherits(Go,
|
7593
|
+
_inherits(Go, _je4);
|
7578
7594
|
return _createClass(Go, [{
|
7579
7595
|
key: "extractResultData",
|
7580
7596
|
value: function () {
|
@@ -7604,8 +7620,8 @@ var Go = /*#__PURE__*/function (_Ue4) {
|
|
7604
7620
|
return extractResultData;
|
7605
7621
|
}()
|
7606
7622
|
}]);
|
7607
|
-
}(
|
7608
|
-
var Vo = /*#__PURE__*/function (
|
7623
|
+
}(je);
|
7624
|
+
var Vo = /*#__PURE__*/function (_je5) {
|
7609
7625
|
function Vo(e) {
|
7610
7626
|
var _this27$maxMessages;
|
7611
7627
|
var _this27;
|
@@ -7617,7 +7633,7 @@ var Vo = /*#__PURE__*/function (_Ue5) {
|
|
7617
7633
|
return _this27;
|
7618
7634
|
}
|
7619
7635
|
// prettier-ignore
|
7620
|
-
_inherits(Vo,
|
7636
|
+
_inherits(Vo, _je5);
|
7621
7637
|
return _createClass(Vo, [{
|
7622
7638
|
key: "processMessages",
|
7623
7639
|
value: function processMessages(e) {
|
@@ -7686,7 +7702,7 @@ var Vo = /*#__PURE__*/function (_Ue5) {
|
|
7686
7702
|
return extractResultData;
|
7687
7703
|
}()
|
7688
7704
|
}]);
|
7689
|
-
}(
|
7705
|
+
}(je);
|
7690
7706
|
var Ti = /*#__PURE__*/function (_qi3) {
|
7691
7707
|
function Ti(e) {
|
7692
7708
|
var _this28;
|
@@ -7794,7 +7810,7 @@ var Ti = /*#__PURE__*/function (_qi3) {
|
|
7794
7810
|
}
|
7795
7811
|
}]);
|
7796
7812
|
}(qi);
|
7797
|
-
var Ko = /*#__PURE__*/function (
|
7813
|
+
var Ko = /*#__PURE__*/function (_je6) {
|
7798
7814
|
function Ko(e) {
|
7799
7815
|
_classCallCheck(this, Ko);
|
7800
7816
|
var s, r, o;
|
@@ -7802,7 +7818,7 @@ var Ko = /*#__PURE__*/function (_Ue6) {
|
|
7802
7818
|
i = (o = e.directConnection) == null ? void 0 : o.huggingFace;
|
7803
7819
|
return _callSuper(this, Ko, [e, "Insert text to translate", "Helsinki-NLP/opus-tatoeba-en-ja", t, i]);
|
7804
7820
|
}
|
7805
|
-
_inherits(Ko,
|
7821
|
+
_inherits(Ko, _je6);
|
7806
7822
|
return _createClass(Ko, [{
|
7807
7823
|
key: "extractResultData",
|
7808
7824
|
value: function () {
|
@@ -7832,7 +7848,7 @@ var Ko = /*#__PURE__*/function (_Ue6) {
|
|
7832
7848
|
return extractResultData;
|
7833
7849
|
}()
|
7834
7850
|
}]);
|
7835
|
-
}(
|
7851
|
+
}(je);
|
7836
7852
|
var Ci = /*#__PURE__*/function (_qi4) {
|
7837
7853
|
function Ci(e) {
|
7838
7854
|
var _this29;
|
@@ -7926,7 +7942,7 @@ var Ci = /*#__PURE__*/function (_qi4) {
|
|
7926
7942
|
}
|
7927
7943
|
}]);
|
7928
7944
|
}(qi);
|
7929
|
-
var $o = /*#__PURE__*/function (
|
7945
|
+
var $o = /*#__PURE__*/function (_je7) {
|
7930
7946
|
function $o(e) {
|
7931
7947
|
var _this30;
|
7932
7948
|
_classCallCheck(this, $o);
|
@@ -7936,7 +7952,7 @@ var $o = /*#__PURE__*/function (_Ue7) {
|
|
7936
7952
|
_this30 = _callSuper(this, $o, [e, "The goal of life is [MASK].", "bert-base-uncased", t, i]), _this30.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Hugging Face</b></div>\n <p>Insert a sentence with the word [MASK] and the model will try to fill it for you. E.g. I want [MASK].</p>\n <p>First message may take an extented amount of time to complete as the model needs to be initialized.</p>", _this30.permittedErrorPrefixes = ["Authorization header", "No mask_token"];
|
7937
7953
|
return _this30;
|
7938
7954
|
}
|
7939
|
-
_inherits($o,
|
7955
|
+
_inherits($o, _je7);
|
7940
7956
|
return _createClass($o, [{
|
7941
7957
|
key: "extractResultData",
|
7942
7958
|
value: function () {
|
@@ -7966,7 +7982,7 @@ var $o = /*#__PURE__*/function (_Ue7) {
|
|
7966
7982
|
return extractResultData;
|
7967
7983
|
}()
|
7968
7984
|
}]);
|
7969
|
-
}(
|
7985
|
+
}(je);
|
7970
7986
|
var Xt = /*#__PURE__*/function () {
|
7971
7987
|
function Xt() {
|
7972
7988
|
_classCallCheck(this, Xt);
|
@@ -8351,12 +8367,12 @@ var ne = /*#__PURE__*/function () {
|
|
8351
8367
|
}();
|
8352
8368
|
ne.FILES_WITH_TEXT_ERROR = "content with type `text` must have `text` values", ne.FUNCTION_TOOL_RESP_ERROR = "Response must contain an array of strings for each individual function/tool_call, see https://deepchat.dev/docs/directConnection/OpenAI/#assistant-functions.";
|
8353
8369
|
var Me = ne;
|
8354
|
-
var
|
8370
|
+
var Ve = /*#__PURE__*/function (_V3) {
|
8355
8371
|
// prettier-ignore
|
8356
|
-
function
|
8372
|
+
function Ve(e, t, i, s, r, o) {
|
8357
8373
|
var _this31;
|
8358
|
-
_classCallCheck(this,
|
8359
|
-
if (_this31 = _callSuper(this,
|
8374
|
+
_classCallCheck(this, Ve);
|
8375
|
+
if (_this31 = _callSuper(this, Ve, [e, s, r, o]), _this31.insertKeyPlaceholderText = "OpenAI API Key", _this31.keyHelpUrl = "https://platform.openai.com/account/api-keys", _this31.url = "", _this31.permittedErrorPrefixes = ["Incorrect", "Please send text", ii.FAILED_ERROR_MESSAGE], _this31.shouldFetchHistory = !1, _this31._searchedForThreadId = !1, _this31._config = {}, _this31._newAssistantDetails = {
|
8360
8376
|
model: "gpt-4"
|
8361
8377
|
}, _this31._waitingForStreamResponse = !1, _this31._isSSEStream = !1, _this31.urlSegments = i, _typeof(t) == "object") {
|
8362
8378
|
_this31._config = t;
|
@@ -8369,8 +8385,8 @@ var Ge = /*#__PURE__*/function (_V3) {
|
|
8369
8385
|
_this31.maxMessages = 1, _this31._isSSEStream = !!(_this31.stream && (_typeof(_this31.stream) != "object" || !_this31.stream.simulation));
|
8370
8386
|
return _this31;
|
8371
8387
|
}
|
8372
|
-
_inherits(
|
8373
|
-
return _createClass(
|
8388
|
+
_inherits(Ve, _V3);
|
8389
|
+
return _createClass(Ve, [{
|
8374
8390
|
key: "fetchHistoryFunc",
|
8375
8391
|
value: function () {
|
8376
8392
|
var _fetchHistoryFunc = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee73() {
|
@@ -8419,13 +8435,13 @@ var Ge = /*#__PURE__*/function (_V3) {
|
|
8419
8435
|
}));
|
8420
8436
|
a === "code_interpreter" || a === "file_search" || a === "images" ? r = a : (console.error("Tool type \"".concat(a, "\" is not valid")), console.error('Expected "code_interpreter" or "file_search" or "images". Going to default to "images"'));
|
8421
8437
|
}
|
8422
|
-
if (r === "file_search") return
|
8423
|
-
if (r === "code_interpreter") return
|
8438
|
+
if (r === "file_search") return Ve.processAttachmentsMessage(s, t, "file_search");
|
8439
|
+
if (r === "code_interpreter") return Ve.processAttachmentsMessage(s, t, "code_interpreter");
|
8424
8440
|
if (t.find(function (_ref21) {
|
8425
8441
|
var a = _ref21.name;
|
8426
8442
|
return !H.isImageFileExtension(a);
|
8427
8443
|
})) console.error("The uploaded files contained a non-image file"), console.error('Make sure only images can be uploaded or define a "code_interpreter" or "file_search" value in the "files_tool_type" property'), console.warn('Make sure your existing assistant supports these "tools" or specify them in the "new_assistant" property');else {
|
8428
|
-
var _a2 =
|
8444
|
+
var _a2 = Ve.processImageMessage(s, t);
|
8429
8445
|
if (_a2) return _a2;
|
8430
8446
|
}
|
8431
8447
|
}
|
@@ -8691,7 +8707,7 @@ var Ge = /*#__PURE__*/function (_V3) {
|
|
8691
8707
|
break;
|
8692
8708
|
}
|
8693
8709
|
return _context79.abrupt("return", {
|
8694
|
-
timeoutMS:
|
8710
|
+
timeoutMS: Ve.POLLING_TIMEOUT_MS
|
8695
8711
|
});
|
8696
8712
|
case 3:
|
8697
8713
|
if (!(t === "completed" && this._messages)) {
|
@@ -8804,7 +8820,7 @@ var Ge = /*#__PURE__*/function (_V3) {
|
|
8804
8820
|
}, "POST");
|
8805
8821
|
case 22:
|
8806
8822
|
return _context80.abrupt("return", {
|
8807
|
-
timeoutMS:
|
8823
|
+
timeoutMS: Ve.POLLING_TIMEOUT_MS
|
8808
8824
|
});
|
8809
8825
|
case 23:
|
8810
8826
|
case "end":
|
@@ -8999,8 +9015,8 @@ var Ge = /*#__PURE__*/function (_V3) {
|
|
8999
9015
|
}
|
9000
9016
|
}]);
|
9001
9017
|
}(V);
|
9002
|
-
|
9003
|
-
var Ri =
|
9018
|
+
Ve.POLLING_TIMEOUT_MS = 500;
|
9019
|
+
var Ri = Ve;
|
9004
9020
|
var Ss = /*#__PURE__*/function (_Ri) {
|
9005
9021
|
function Ss(e) {
|
9006
9022
|
var _a$headers, _l$OpenAIBeta;
|
@@ -9355,7 +9371,7 @@ var Ln = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n<svg height=\"1.4em\"
|
|
9355
9371
|
}, {
|
9356
9372
|
key: "tryAddSVGElement",
|
9357
9373
|
value: function tryAddSVGElement(e, t, i, s) {
|
9358
|
-
i ? e.push(
|
9374
|
+
i ? e.push(Ue.createSVGElement(i)) : i !== "" && s && e.push(t);
|
9359
9375
|
}
|
9360
9376
|
}, {
|
9361
9377
|
key: "createCustomElements",
|
@@ -9437,14 +9453,14 @@ var D = /*#__PURE__*/function () {
|
|
9437
9453
|
}
|
9438
9454
|
}]);
|
9439
9455
|
}();
|
9440
|
-
var
|
9441
|
-
function
|
9442
|
-
_classCallCheck(this,
|
9456
|
+
var ct = /*#__PURE__*/function () {
|
9457
|
+
function ct(e, t, i, s, r) {
|
9458
|
+
_classCallCheck(this, ct);
|
9443
9459
|
this._mouseState = {
|
9444
9460
|
state: "default"
|
9445
|
-
}, this.isCustom = !1, N.addAttributes(e), this.elementRef = e, this.svg =
|
9461
|
+
}, this.isCustom = !1, N.addAttributes(e), this.elementRef = e, this.svg = Ue.createSVGElement(t), this.customStyles = s, this.position = i, this.dropupText = r;
|
9446
9462
|
}
|
9447
|
-
return _createClass(
|
9463
|
+
return _createClass(ct, [{
|
9448
9464
|
key: "buttonMouseLeave",
|
9449
9465
|
value: function buttonMouseLeave(e) {
|
9450
9466
|
this._mouseState.state = "default", e && (D.unsetAllCSS(this.elementRef, e), D.setElementsCSS(this.elementRef, e, "default"));
|
@@ -9514,7 +9530,7 @@ var lt = /*#__PURE__*/function () {
|
|
9514
9530
|
}
|
9515
9531
|
}]);
|
9516
9532
|
}();
|
9517
|
-
var Fi = /*#__PURE__*/function (
|
9533
|
+
var Fi = /*#__PURE__*/function (_ct) {
|
9518
9534
|
function Fi(e) {
|
9519
9535
|
var _this37;
|
9520
9536
|
_classCallCheck(this, Fi);
|
@@ -9523,7 +9539,7 @@ var Fi = /*#__PURE__*/function (_lt) {
|
|
9523
9539
|
_this37 = _callSuper(this, Fi, [document.createElement("div"), t, void 0, e]), _this37.isActive = !1, _this37._innerElements = _this37.createInnerElementsForStates(_this37.customStyles), _this37.changeToDefault();
|
9524
9540
|
return _this37;
|
9525
9541
|
}
|
9526
|
-
_inherits(Fi,
|
9542
|
+
_inherits(Fi, _ct);
|
9527
9543
|
return _createClass(Fi, [{
|
9528
9544
|
key: "createInnerElementsForStates",
|
9529
9545
|
value: function createInnerElementsForStates(e) {
|
@@ -9561,7 +9577,7 @@ var Fi = /*#__PURE__*/function (_lt) {
|
|
9561
9577
|
this.changeState(this._innerElements.unavailable), (e = this.customStyles) != null && e.active && D.unsetAllCSS(this.elementRef, (t = this.customStyles) == null ? void 0 : t.active), (i = this.customStyles) != null && i["default"] && D.unsetAllCSS(this.elementRef, (s = this.customStyles) == null ? void 0 : s["default"]), this.reapplyStateStyle("unavailable", ["default", "active"]), this.isActive = !1;
|
9562
9578
|
}
|
9563
9579
|
}]);
|
9564
|
-
}(
|
9580
|
+
}(ct);
|
9565
9581
|
Fi.EMPTY_SVG = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"></svg>';
|
9566
9582
|
var ki = Fi;
|
9567
9583
|
var z = /*#__PURE__*/function () {
|
@@ -10988,26 +11004,26 @@ var On = /*#__PURE__*/function (_V0) {
|
|
10988
11004
|
_inherits(On, _V0);
|
10989
11005
|
return _createClass(On);
|
10990
11006
|
}(V);
|
10991
|
-
var
|
11007
|
+
var Qe = /*#__PURE__*/function (_On) {
|
10992
11008
|
// prettier-ignore
|
10993
|
-
function
|
11009
|
+
function Qe(e) {
|
10994
11010
|
var _a$lang, _l$name, _c$gender;
|
10995
11011
|
var _this49;
|
10996
|
-
_classCallCheck(this,
|
11012
|
+
_classCallCheck(this, Qe);
|
10997
11013
|
var s, r, o, a, l, c;
|
10998
11014
|
var t = (r = (s = e.directConnection) == null ? void 0 : s.azure) == null ? void 0 : r.textToSpeech,
|
10999
11015
|
i = (o = e.directConnection) == null ? void 0 : o.azure;
|
11000
|
-
_this49 = _callSuper(this,
|
11016
|
+
_this49 = _callSuper(this, Qe, [e, fe.buildTextToSpeechHeaders.bind({}, (t == null ? void 0 : t.outputFormat) || "audio-16khz-128kbitrate-mono-mp3"), t.region, i]), _this49.permittedErrorPrefixes = [Qe.REGION_ERROR_MESSAGE], _this49.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(Qe.HELP_LINK, "\">here</a> for more info.\n </p>"), _this49.isTextInputDisabled = !1, _this49.url = "", t.region ? (Object.assign(_this49.rawBody, t), (_a$lang = (a = _this49.rawBody).lang) !== null && _a$lang !== void 0 ? _a$lang : a.lang = "en-US", (_l$name = (l = _this49.rawBody).name) !== null && _l$name !== void 0 ? _l$name : l.name = "en-US-JennyNeural", (_c$gender = (c = _this49.rawBody).gender) !== null && _c$gender !== void 0 ? _c$gender : c.gender = "Female", _this49.url = "https://".concat(t.region, ".tts.speech.microsoft.com/cognitiveservices/v1")) : (_this49.isTextInputDisabled = !0, _this49.canSendMessage = function () {
|
11001
11017
|
return !1;
|
11002
11018
|
}, setTimeout(function () {
|
11003
11019
|
e.addMessage({
|
11004
|
-
error:
|
11020
|
+
error: Qe.REGION_ERROR_MESSAGE
|
11005
11021
|
});
|
11006
11022
|
}));
|
11007
11023
|
return _this49;
|
11008
11024
|
}
|
11009
|
-
_inherits(
|
11010
|
-
return _createClass(
|
11025
|
+
_inherits(Qe, _On);
|
11026
|
+
return _createClass(Qe, [{
|
11011
11027
|
key: "preprocessBody",
|
11012
11028
|
value: function preprocessBody(e, t) {
|
11013
11029
|
var i = t[t.length - 1].text;
|
@@ -11071,16 +11087,16 @@ var Ze = /*#__PURE__*/function (_On) {
|
|
11071
11087
|
}()
|
11072
11088
|
}]);
|
11073
11089
|
}(On);
|
11074
|
-
|
11090
|
+
Qe.HELP_LINK =
|
11075
11091
|
// eslint-disable-next-line max-len
|
11076
|
-
"https://learn.microsoft.com/en-GB/azure/cognitive-services/speech-service/get-started-text-to-speech?tabs=windows%2Cterminal&pivots=programming-language-rest",
|
11092
|
+
"https://learn.microsoft.com/en-GB/azure/cognitive-services/speech-service/get-started-text-to-speech?tabs=windows%2Cterminal&pivots=programming-language-rest", Qe.REGION_ERROR_MESSAGE =
|
11077
11093
|
// eslint-disable-next-line max-len
|
11078
11094
|
"Please define a region config property. [More Information](https://deepchat.dev/docs/directConnection/Azure#TextToSpeech)";
|
11079
|
-
var hs =
|
11080
|
-
var
|
11081
|
-
function
|
11095
|
+
var hs = Qe;
|
11096
|
+
var Ke = /*#__PURE__*/function (_On2) {
|
11097
|
+
function Ke(e) {
|
11082
11098
|
var _this50;
|
11083
|
-
_classCallCheck(this,
|
11099
|
+
_classCallCheck(this, Ke);
|
11084
11100
|
var r, o, a;
|
11085
11101
|
var t = (o = (r = e.directConnection) == null ? void 0 : r.azure) == null ? void 0 : o.speechToText,
|
11086
11102
|
i = (a = e.directConnection) == null ? void 0 : a.azure,
|
@@ -11091,21 +11107,21 @@ var Ve = /*#__PURE__*/function (_On2) {
|
|
11091
11107
|
}
|
11092
11108
|
}
|
11093
11109
|
};
|
11094
|
-
if (_this50 = _callSuper(this,
|
11110
|
+
if (_this50 = _callSuper(this, Ke, [e, fe.buildSpeechToTextHeaders, t.region, i, s]), _this50.permittedErrorPrefixes = [Ke.REGION_ERROR_MESSAGE], _this50.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(Ke.HELP_LINK, "\">here</a> for more info.\n </p>"), _this50.url = "", _this50.isTextInputDisabled = !0, _this50.textInputPlaceholderText = "Upload an audio file", !t.region) _this50.isTextInputDisabled = !0, _this50.canSendMessage = function () {
|
11095
11111
|
return !1;
|
11096
11112
|
}, setTimeout(function () {
|
11097
11113
|
e.addMessage({
|
11098
|
-
error:
|
11114
|
+
error: Ke.REGION_ERROR_MESSAGE
|
11099
11115
|
});
|
11100
11116
|
});else {
|
11101
|
-
_this50.canSendMessage =
|
11117
|
+
_this50.canSendMessage = Ke.canFileSendMessage;
|
11102
11118
|
var l = t.lang || "en-US";
|
11103
11119
|
_this50.url = "https://".concat(t.region, ".stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?language=").concat(l, "&format=detailed"), _this50.recordAudio = void 0;
|
11104
11120
|
}
|
11105
11121
|
return _this50;
|
11106
11122
|
}
|
11107
|
-
_inherits(
|
11108
|
-
return _createClass(
|
11123
|
+
_inherits(Ke, _On2);
|
11124
|
+
return _createClass(Ke, [{
|
11109
11125
|
key: "callServiceAPI",
|
11110
11126
|
value: function () {
|
11111
11127
|
var _callServiceAPI15 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee108(e, t, i) {
|
@@ -11171,12 +11187,12 @@ var Ve = /*#__PURE__*/function (_On2) {
|
|
11171
11187
|
}
|
11172
11188
|
}]);
|
11173
11189
|
}(On);
|
11174
|
-
|
11190
|
+
Ke.HELP_LINK =
|
11175
11191
|
// eslint-disable-next-line max-len
|
11176
|
-
"https://learn.microsoft.com/en-GB/azure/cognitive-services/speech-service/get-started-text-to-speech?tabs=windows%2Cterminal&pivots=programming-language-rest",
|
11192
|
+
"https://learn.microsoft.com/en-GB/azure/cognitive-services/speech-service/get-started-text-to-speech?tabs=windows%2Cterminal&pivots=programming-language-rest", Ke.REGION_ERROR_MESSAGE =
|
11177
11193
|
// eslint-disable-next-line max-len
|
11178
11194
|
"Please define a region config property. [More Information](https://deepchat.dev/docs/directConnection/Azure#SpeechToText)";
|
11179
|
-
var us =
|
11195
|
+
var us = Ke;
|
11180
11196
|
var Yo = /*#__PURE__*/function (_V1) {
|
11181
11197
|
// prettier-ignore
|
11182
11198
|
function Yo(e) {
|
@@ -11969,7 +11985,7 @@ var ea = /*#__PURE__*/function () {
|
|
11969
11985
|
if (t.stabilityAI) return t.stabilityAI.imageToImage ? new Ti(e) : t.stabilityAI.imageToImageUpscale ? new wi(e) : t.stabilityAI.imageToImageMasking ? new Ai(e) : new Ci(e);
|
11970
11986
|
if (t.mistral) return new Qo(e);
|
11971
11987
|
}
|
11972
|
-
return i && Object.keys(i).length > 0 && !s ? new
|
11988
|
+
return i && Object.keys(i).length > 0 && !s ? new rt(e) : new rt(e, void 0, s || !0);
|
11973
11989
|
}
|
11974
11990
|
}]);
|
11975
11991
|
}();
|
@@ -12066,7 +12082,7 @@ var ta = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n<svg version=\"1.1\"
|
|
12066
12082
|
key: "createAudioElement",
|
12067
12083
|
value: function createAudioElement(e, t) {
|
12068
12084
|
var i = document.createElement("audio");
|
12069
|
-
return i.src = e.src, i.classList.add("audio-player"), i.controls = !0,
|
12085
|
+
return i.src = e.src, i.classList.add("audio-player"), i.controls = !0, Be.IS_SAFARI && (i.classList.add("audio-player-safari"), i.classList.add(t === y.USER_ROLE ? "audio-player-safari-right" : "audio-player-safari-left")), i;
|
12070
12086
|
}
|
12071
12087
|
}, {
|
12072
12088
|
key: "createNewAudioMessage",
|
@@ -12085,7 +12101,7 @@ var ta = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n<svg version=\"1.1\"
|
|
12085
12101
|
t.classList.add("any-file-message-contents");
|
12086
12102
|
var i = document.createElement("div");
|
12087
12103
|
i.classList.add("any-file-message-icon-container");
|
12088
|
-
var s =
|
12104
|
+
var s = Ue.createSVGElement(ta);
|
12089
12105
|
s.classList.add("any-file-message-icon"), i.appendChild(s);
|
12090
12106
|
var r = document.createElement("div");
|
12091
12107
|
return r.classList.add("any-file-message-text"), r.textContent = e.name || H.DEFAULT_FILE_NAME, t.appendChild(i), t.appendChild(r), H.processContent("any", t, e.src, r.textContent);
|
@@ -12285,7 +12301,7 @@ var de = /*#__PURE__*/function (_he) {
|
|
12285
12301
|
if (_typeof(e) == "object") {
|
12286
12302
|
if (!t && e.displayLoading) {
|
12287
12303
|
var s = e.displayLoading.history;
|
12288
|
-
s != null && s.small &&
|
12304
|
+
s != null && s.small && Fe.addMessage(this, !1), s != null && s.full && Fe.addMessage(this);
|
12289
12305
|
}
|
12290
12306
|
e.displayErrors && (e.displayErrors["default"] && this.addNewErrorMessage("", ""), e.displayErrors.service && this.addNewErrorMessage("service", ""), e.displayErrors.speechToText && this.addNewErrorMessage("speechToText", "")), (i = e.displayLoading) != null && i.message && this.addLoadingMessage(), e.response && (this.customDemoResponse = e.response);
|
12291
12307
|
}
|
@@ -12366,7 +12382,7 @@ var de = /*#__PURE__*/function (_he) {
|
|
12366
12382
|
var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
12367
12383
|
var i = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
|
12368
12384
|
var o;
|
12369
|
-
|
12385
|
+
e.role !== y.USER_ROLE && ((o = this._hiddenAttachments) == null || o.removeHiddenFiles());
|
12370
12386
|
var s = de.createMessageContent(e),
|
12371
12387
|
r = {
|
12372
12388
|
status: e.overwrite
|
@@ -12443,9 +12459,9 @@ var de = /*#__PURE__*/function (_he) {
|
|
12443
12459
|
value: function addDefaultLoadingMessage() {
|
12444
12460
|
var e = this.createMessageElements("", y.AI_ROLE),
|
12445
12461
|
t = e.bubbleElement;
|
12446
|
-
e.bubbleElement.classList.add(
|
12462
|
+
e.bubbleElement.classList.add(De.DOTS_CONTAINER_CLASS);
|
12447
12463
|
var i = document.createElement("div");
|
12448
|
-
return i.classList.add("loading-message-dots"), t.appendChild(i),
|
12464
|
+
return i.classList.add("loading-message-dots"), t.appendChild(i), De.setDots(t, this.messageStyles), e;
|
12449
12465
|
}
|
12450
12466
|
}, {
|
12451
12467
|
key: "addLoadingMessage",
|
@@ -12456,7 +12472,7 @@ var de = /*#__PURE__*/function (_he) {
|
|
12456
12472
|
if (he.isLoadingMessage(t) || !e && !this._isLoadingMessageAllowed) return;
|
12457
12473
|
var i = (a = (o = (r = this.messageStyles) == null ? void 0 : r.loading) == null ? void 0 : o.message) == null ? void 0 : a.html,
|
12458
12474
|
s = i ? _e.createElements(this, i, y.AI_ROLE, !1) : this.addDefaultLoadingMessage();
|
12459
|
-
this.appendOuterContainerElemet(s.outerContainer), s.bubbleElement.classList.add(
|
12475
|
+
this.appendOuterContainerElemet(s.outerContainer), s.bubbleElement.classList.add(De.BUBBLE_CLASS), this.applyCustomStyles(s, y.AI_ROLE, !1, (d = (c = (l = this.messageStyles) == null ? void 0 : l.loading) == null ? void 0 : c.message) == null ? void 0 : d.styles), this.focusMode || G.scrollToBottom(this.elementRef);
|
12460
12476
|
}
|
12461
12477
|
}, {
|
12462
12478
|
key: "populateIntroPanel",
|
@@ -12541,7 +12557,7 @@ var de = /*#__PURE__*/function (_he) {
|
|
12541
12557
|
}, {
|
12542
12558
|
key: "isActiveElement",
|
12543
12559
|
value: function isActiveElement(e) {
|
12544
|
-
return e ? e.contains(
|
12560
|
+
return e ? e.contains(De.BUBBLE_CLASS) || e.contains(Fe.CLASS) || e.contains(we.MESSAGE_CLASS) : !1;
|
12545
12561
|
}
|
12546
12562
|
}]);
|
12547
12563
|
}(he);
|
@@ -12625,7 +12641,7 @@ var Js = ["camera", "gifs", "images", "audio", "mixedFiles", "submit", "micropho
|
|
12625
12641
|
return _createClass(Q, null, [{
|
12626
12642
|
key: "addItemEvents",
|
12627
12643
|
value: function addItemEvents(e, t, i, s) {
|
12628
|
-
|
12644
|
+
$e.add(t, s), t.addEventListener("click", function () {
|
12629
12645
|
i.click();
|
12630
12646
|
}), t.addEventListener("mouseenter", function (r) {
|
12631
12647
|
e.highlightedItem = r.target;
|
@@ -12676,7 +12692,7 @@ var Js = ["camera", "gifs", "images", "audio", "mixedFiles", "submit", "micropho
|
|
12676
12692
|
}();
|
12677
12693
|
Q.MENU_ITEM_CLASS = "dropup-menu-item", Q.TEXT_CLASS = "dropup-menu-item-text", Q.ICON_CLASS = "dropup-menu-item-icon";
|
12678
12694
|
var Ee = Q;
|
12679
|
-
var O = /*#__PURE__*/function (
|
12695
|
+
var O = /*#__PURE__*/function (_ct2) {
|
12680
12696
|
function O(e, t, i, s) {
|
12681
12697
|
var _this61;
|
12682
12698
|
_classCallCheck(this, O);
|
@@ -12686,7 +12702,7 @@ var O = /*#__PURE__*/function (_lt2) {
|
|
12686
12702
|
_this61 = _callSuper(this, O, [O.createButtonElement(), o, e == null ? void 0 : e.position, (u = e == null ? void 0 : e.styles) == null ? void 0 : u.button, r]), _this61._state = "default", _this61.isCustom = !0, _this61._innerElements = _this61.createInnerElementsForStates(_this61.customStyles), _this61._menuStyles = s, _this61._onClick = e.onClick, _this61._dropupStyles = (h = e.styles) == null ? void 0 : h.dropup, _this61.setSetState(e), _this61.addClickListener(i), _this61.changeState(e.initialState, !0);
|
12687
12703
|
return _this61;
|
12688
12704
|
}
|
12689
|
-
_inherits(O,
|
12705
|
+
_inherits(O, _ct2);
|
12690
12706
|
return _createClass(O, [{
|
12691
12707
|
key: "createInnerElementsForStates",
|
12692
12708
|
value: function createInnerElementsForStates(e) {
|
@@ -12750,7 +12766,7 @@ var O = /*#__PURE__*/function (_lt2) {
|
|
12750
12766
|
var s;
|
12751
12767
|
this.elementRef.parentElement && this._originalElementRef && this.resetDropupItem(t), this.applyDropupContentStyles(e), Object.assign(this.elementRef.style, (s = e == null ? void 0 : e.item) == null ? void 0 : s["default"]);
|
12752
12768
|
var i = I.processStateful((e == null ? void 0 : e.item) || {});
|
12753
|
-
|
12769
|
+
$e.add(this.elementRef, i), this.addClickListener();
|
12754
12770
|
}
|
12755
12771
|
}, {
|
12756
12772
|
key: "changeToDefault",
|
@@ -12820,9 +12836,9 @@ var O = /*#__PURE__*/function (_lt2) {
|
|
12820
12836
|
});
|
12821
12837
|
}
|
12822
12838
|
}]);
|
12823
|
-
}(
|
12839
|
+
}(ct);
|
12824
12840
|
O.INDICATOR_PREFIX = "custom", O.BUTTON_CLASS = "custom-button", O.DISABLED_CONTAINER_CLASS = "custom-button-container-disabled", O.DEFAULT_CONTAINER_CLASS = "custom-button-container-default", O.ACTIVE_CONTAINER_CLASS = "custom-button-container-active";
|
12825
|
-
var
|
12841
|
+
var st = O;
|
12826
12842
|
var na = "<?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 <path d=\"M16 0c-8.836 0-16 7.163-16 16s7.163 16 16 16c8.837 0 16-7.163 16-16s-7.163-16-16-16zM16 30.032c-7.72 0-14-6.312-14-14.032s6.28-14 14-14 14 6.28 14 14-6.28 14.032-14 14.032zM23 15h-6v-6c0-0.552-0.448-1-1-1s-1 0.448-1 1v6h-6c-0.552 0-1 0.448-1 1s0.448 1 1 1h6v6c0 0.552 0.448 1 1 1s1-0.448 1-1v-6h6c0.552 0 1-0.448 1-1s-0.448-1-1-1z\"></path>\n</svg>";
|
12827
12843
|
var ni = /*#__PURE__*/function () {
|
12828
12844
|
function ni() {
|
@@ -12902,20 +12918,20 @@ var As = /*#__PURE__*/function () {
|
|
12902
12918
|
}
|
12903
12919
|
}]);
|
12904
12920
|
}();
|
12905
|
-
var
|
12906
|
-
function
|
12921
|
+
var et = /*#__PURE__*/function (_ct3) {
|
12922
|
+
function et(e, t) {
|
12907
12923
|
var _this65;
|
12908
|
-
_classCallCheck(this,
|
12924
|
+
_classCallCheck(this, et);
|
12909
12925
|
var s;
|
12910
|
-
_this65 = _callSuper(this,
|
12926
|
+
_this65 = _callSuper(this, et, [et.createButtonElement(), na, void 0, {
|
12911
12927
|
styles: (s = t == null ? void 0 : t.button) == null ? void 0 : s.styles
|
12912
12928
|
}]);
|
12913
12929
|
var i = _this65.createInnerElementsForStates(_this65.customStyles);
|
12914
|
-
_this65._menu = new As(e, t == null ? void 0 : t.menu), _this65.addClickEvent(), _this65.buttonContainer =
|
12930
|
+
_this65._menu = new As(e, t == null ? void 0 : t.menu), _this65.addClickEvent(), _this65.buttonContainer = et.createButtonContainer(), _this65.changeElementsByState(i.styles), _this65.buttonContainer.appendChild(_this65.elementRef), _this65.elementRef.classList.add(et.BUTTON_ICON_CLASS), _this65.buttonContainer.appendChild(_this65._menu.elementRef), _this65.reapplyStateStyle("styles"), _this65.addContainerEvents(e);
|
12915
12931
|
return _this65;
|
12916
12932
|
}
|
12917
|
-
_inherits(
|
12918
|
-
return _createClass(
|
12933
|
+
_inherits(et, _ct3);
|
12934
|
+
return _createClass(et, [{
|
12919
12935
|
key: "createInnerElementsForStates",
|
12920
12936
|
value: function createInnerElementsForStates(e) {
|
12921
12937
|
return {
|
@@ -12938,7 +12954,7 @@ var Qe = /*#__PURE__*/function (_lt3) {
|
|
12938
12954
|
var _this66 = this;
|
12939
12955
|
e.addEventListener("click", function (t) {
|
12940
12956
|
var i = t.target.classList;
|
12941
|
-
!i.contains(
|
12957
|
+
!i.contains(et.BUTTON_ICON_CLASS) && !i.contains(st.DISABLED_CONTAINER_CLASS) && _this66._menu.close();
|
12942
12958
|
});
|
12943
12959
|
}
|
12944
12960
|
}], [{
|
@@ -12960,9 +12976,9 @@ var Qe = /*#__PURE__*/function (_lt3) {
|
|
12960
12976
|
return (i = t == null ? void 0 : t.button) != null && i.position ? (s = t == null ? void 0 : t.button) == null ? void 0 : s.position : e["outside-left"].length > 0 && e["outside-right"].length === 0 ? "outside-right" : "outside-left";
|
12961
12977
|
}
|
12962
12978
|
}]);
|
12963
|
-
}(
|
12964
|
-
|
12965
|
-
var Pi =
|
12979
|
+
}(ct);
|
12980
|
+
et.BUTTON_ICON_CLASS = "dropup-button";
|
12981
|
+
var Pi = et;
|
12966
12982
|
var $ = /*#__PURE__*/function () {
|
12967
12983
|
function $() {
|
12968
12984
|
_classCallCheck(this, $);
|
@@ -13024,7 +13040,7 @@ var $ = /*#__PURE__*/function () {
|
|
13024
13040
|
var o;
|
13025
13041
|
var r = (o = e[s]) == null ? void 0 : o.button.position;
|
13026
13042
|
r && $.setPosition(e, s, t[r]);
|
13027
|
-
}), t["inside-right"].length === 0 && e.submit && $.setPosition(e, "submit", t["inside-right"]), t["outside-right"].length === 0 && (e.submit ? $.setPosition(e, "submit", t["outside-right"]) : e.microphone ? $.setPosition(e, "microphone", t["outside-right"]) : e.camera ? $.setPosition(e, "camera", t["outside-right"]) : e["".concat(
|
13043
|
+
}), t["inside-right"].length === 0 && e.submit && $.setPosition(e, "submit", t["inside-right"]), t["outside-right"].length === 0 && (e.submit ? $.setPosition(e, "submit", t["outside-right"]) : e.microphone ? $.setPosition(e, "microphone", t["outside-right"]) : e.camera ? $.setPosition(e, "camera", t["outside-right"]) : e["".concat(st.INDICATOR_PREFIX, "1")] && $.setPosition(e, "".concat(st.INDICATOR_PREFIX, "1"), t["outside-right"])), e.submit && $.setPosition(e, "submit", t["outside-left"].length === 0 ? t["outside-left"] : t["inside-right"]), e.microphone && $.setPosition(e, "microphone", t["outside-left"].length === 0 ? t["outside-left"] : t["inside-right"]);
|
13028
13044
|
var i = Object.keys(e);
|
13029
13045
|
return i.length > 1 || t["dropup-menu"].length > 0 ? (Js.forEach(function (s) {
|
13030
13046
|
e[s] && t["dropup-menu"].push(_objectSpread(_objectSpread({}, e[s]), {}, {
|
@@ -13032,7 +13048,7 @@ var $ = /*#__PURE__*/function () {
|
|
13032
13048
|
}));
|
13033
13049
|
}), i.forEach(function (s) {
|
13034
13050
|
var r = s;
|
13035
|
-
r.startsWith(
|
13051
|
+
r.startsWith(st.INDICATOR_PREFIX) && e[r] && t["dropup-menu"].push(_objectSpread(_objectSpread({}, e[r]), {}, {
|
13036
13052
|
customType: r
|
13037
13053
|
}));
|
13038
13054
|
})) : i.length === 1 && $.setPosition(e, i[0], t["outside-right"].length === 0 ? t["outside-right"] : t["outside-left"]), t;
|
@@ -13072,14 +13088,14 @@ var ra = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 24 24\"
|
|
13072
13088
|
dropupText: "File"
|
13073
13089
|
}
|
13074
13090
|
};
|
13075
|
-
var Hi = /*#__PURE__*/function (
|
13091
|
+
var Hi = /*#__PURE__*/function (_ct4) {
|
13076
13092
|
function Hi(e) {
|
13077
13093
|
var _this67;
|
13078
13094
|
_classCallCheck(this, Hi);
|
13079
13095
|
(e == null ? void 0 : e.position) === "dropup-menu" && (e.position = "outside-right"), _this67 = _callSuper(this, Hi, [Hi.createMicrophoneElement(), Ln, e == null ? void 0 : e.position, e]), _this67.isActive = !1, _this67._innerElements = _this67.createInnerElementsForStates(_this67.customStyles), _this67.changeToDefault();
|
13080
13096
|
return _this67;
|
13081
13097
|
}
|
13082
|
-
_inherits(Hi,
|
13098
|
+
_inherits(Hi, _ct4);
|
13083
13099
|
return _createClass(Hi, [{
|
13084
13100
|
key: "createInnerElementsForStates",
|
13085
13101
|
value: function createInnerElementsForStates(e) {
|
@@ -13134,7 +13150,7 @@ var Hi = /*#__PURE__*/function (_lt4) {
|
|
13134
13150
|
return e.id = "microphone-button", e.classList.add("input-button"), e;
|
13135
13151
|
}
|
13136
13152
|
}]);
|
13137
|
-
}(
|
13153
|
+
}(ct);
|
13138
13154
|
function da(n) {
|
13139
13155
|
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n["default"] : n;
|
13140
13156
|
}
|
@@ -14553,32 +14569,32 @@ var Zt = /*#__PURE__*/function (_Hi) {
|
|
14553
14569
|
}(Hi);
|
14554
14570
|
Zt.MICROPHONE_RESET_TIMEOUT_MS = 300;
|
14555
14571
|
var ri = Zt;
|
14556
|
-
var
|
14572
|
+
var Ne = /*#__PURE__*/function () {
|
14557
14573
|
// prettier-ignore
|
14558
|
-
function
|
14574
|
+
function Ne(e, t, i, s) {
|
14559
14575
|
var _this75 = this;
|
14560
|
-
_classCallCheck(this,
|
14576
|
+
_classCallCheck(this, Ne);
|
14561
14577
|
this._attachments = [], this._fileCountLimit = 99, this._acceptedFormat = "", this._hiddenAttachments = /* @__PURE__ */new Set(), t.maxNumberOfFiles && (this._fileCountLimit = t.maxNumberOfFiles), this._toggleContainerDisplay = i, this._fileAttachmentsContainerRef = s, t.acceptedFormats && (this._acceptedFormat = t.acceptedFormats), setTimeout(function () {
|
14562
14578
|
_this75._validationHandler = e._validationHandler;
|
14563
14579
|
});
|
14564
14580
|
}
|
14565
|
-
return _createClass(
|
14581
|
+
return _createClass(Ne, [{
|
14566
14582
|
key: "attemptAddFile",
|
14567
14583
|
value: function attemptAddFile(e, t) {
|
14568
|
-
return
|
14584
|
+
return Ne.isFileTypeValid(e, this._acceptedFormat) ? (this.addAttachmentBasedOnType(e, t, !0), !0) : !1;
|
14569
14585
|
}
|
14570
14586
|
}, {
|
14571
14587
|
key: "addAttachmentBasedOnType",
|
14572
14588
|
value: function addAttachmentBasedOnType(e, t, i) {
|
14573
|
-
var s =
|
14589
|
+
var s = Ne.getTypeFromBlob(e);
|
14574
14590
|
if (s === "image") {
|
14575
|
-
var r =
|
14591
|
+
var r = Ne.createImageAttachment(t);
|
14576
14592
|
this.addFileAttachment(e, "image", r, i);
|
14577
14593
|
} else if (s === "audio") {
|
14578
14594
|
var _r3 = oi.createAudioAttachment(t);
|
14579
14595
|
this.addFileAttachment(e, "audio", _r3, i);
|
14580
14596
|
} else {
|
14581
|
-
var _r4 =
|
14597
|
+
var _r4 = Ne.createAnyFileAttachment(e.name);
|
14582
14598
|
this.addFileAttachment(e, "any", _r4, i);
|
14583
14599
|
}
|
14584
14600
|
}
|
@@ -14586,7 +14602,7 @@ var Pe = /*#__PURE__*/function () {
|
|
14586
14602
|
key: "addFileAttachment",
|
14587
14603
|
value: function addFileAttachment(e, t, i, s) {
|
14588
14604
|
var a;
|
14589
|
-
var r =
|
14605
|
+
var r = Ne.createContainer(i);
|
14590
14606
|
if (this._attachments.length >= this._fileCountLimit) {
|
14591
14607
|
var l = this._attachments[this._attachments.length - 1].removeButton;
|
14592
14608
|
l == null || l.click();
|
@@ -14691,7 +14707,7 @@ var Pe = /*#__PURE__*/function () {
|
|
14691
14707
|
key: "createAnyFileAttachment",
|
14692
14708
|
value: function createAnyFileAttachment(e) {
|
14693
14709
|
var t = document.createElement("div");
|
14694
|
-
t.classList.add("border-bound-attachment"),
|
14710
|
+
t.classList.add("border-bound-attachment"), Be.IS_SAFARI && t.classList.add("border-bound-attachment-safari");
|
14695
14711
|
var i = document.createElement("div");
|
14696
14712
|
i.classList.add("any-file-attachment-text");
|
14697
14713
|
var s = document.createElement("div");
|
@@ -14705,19 +14721,19 @@ var Pe = /*#__PURE__*/function () {
|
|
14705
14721
|
}
|
14706
14722
|
}]);
|
14707
14723
|
}();
|
14708
|
-
var
|
14724
|
+
var Oe = /*#__PURE__*/function (_Ne) {
|
14709
14725
|
// prettier-ignore
|
14710
|
-
function
|
14711
|
-
_classCallCheck(this,
|
14712
|
-
return _callSuper(this,
|
14726
|
+
function Oe(e, t, i, s) {
|
14727
|
+
_classCallCheck(this, Oe);
|
14728
|
+
return _callSuper(this, Oe, [e, t, i, s]);
|
14713
14729
|
}
|
14714
|
-
_inherits(
|
14715
|
-
return _createClass(
|
14730
|
+
_inherits(Oe, _Ne);
|
14731
|
+
return _createClass(Oe, [{
|
14716
14732
|
key: "createTimer",
|
14717
14733
|
value: function createTimer(e, t) {
|
14718
14734
|
var _this78 = this;
|
14719
14735
|
var i = 0;
|
14720
|
-
var s = t !== void 0 && t <
|
14736
|
+
var s = t !== void 0 && t < Oe.TIMER_LIMIT_S ? t : Oe.TIMER_LIMIT_S;
|
14721
14737
|
return setInterval(function () {
|
14722
14738
|
var a;
|
14723
14739
|
i += 1, i === s && ((a = _this78.stopPlaceholderCallback) == null || a.call(_this78), _this78.clearTimer()), i === 600 && e.classList.add("audio-placeholder-text-4-digits");
|
@@ -14729,12 +14745,12 @@ var Ie = /*#__PURE__*/function (_Pe) {
|
|
14729
14745
|
}, {
|
14730
14746
|
key: "createPlaceholderAudioAttachment",
|
14731
14747
|
value: function createPlaceholderAudioAttachment(e) {
|
14732
|
-
var t =
|
14748
|
+
var t = Oe.createAudioContainer(),
|
14733
14749
|
i = document.createElement("div");
|
14734
14750
|
i.classList.add("audio-placeholder-text-3-digits");
|
14735
14751
|
var s = document.createElement("div");
|
14736
14752
|
s.classList.add("file-attachment-text-container", "audio-placeholder-text-3-digits-container"), s.appendChild(i);
|
14737
|
-
var r =
|
14753
|
+
var r = Ue.createSVGElement(os);
|
14738
14754
|
return r.classList.add("attachment-icon", "stop-icon", "not-removable-attachment-icon"), i.textContent = "0:00", this._activePlaceholderTimer = this.createTimer(i, e), t.appendChild(s), this.addPlaceholderAudioAttachmentEvents(t, r, s), t;
|
14739
14755
|
}
|
14740
14756
|
}, {
|
@@ -14766,7 +14782,7 @@ var Ie = /*#__PURE__*/function (_Pe) {
|
|
14766
14782
|
key: "completePlaceholderAttachment",
|
14767
14783
|
value: function completePlaceholderAttachment(e, t) {
|
14768
14784
|
var i = this._activePlaceholderAttachment;
|
14769
|
-
i && (i.file = e,
|
14785
|
+
i && (i.file = e, Oe.addAudioElements(i.attachmentContainerElement.children[0], t), i.removeButton = this.createRemoveAttachmentButton(i), i.attachmentContainerElement.appendChild(i.removeButton), this._activePlaceholderAttachment = void 0, this.clearTimer());
|
14770
14786
|
}
|
14771
14787
|
}, {
|
14772
14788
|
key: "removePlaceholderAttachment",
|
@@ -14782,7 +14798,7 @@ var Ie = /*#__PURE__*/function (_Pe) {
|
|
14782
14798
|
key: "createAudioContainer",
|
14783
14799
|
value: function createAudioContainer() {
|
14784
14800
|
var e = document.createElement("div");
|
14785
|
-
return e.classList.add("border-bound-attachment", "audio-attachment-icon-container"),
|
14801
|
+
return e.classList.add("border-bound-attachment", "audio-attachment-icon-container"), Be.IS_SAFARI && e.classList.add("border-bound-attachment-safari"), e;
|
14786
14802
|
}
|
14787
14803
|
}, {
|
14788
14804
|
key: "addAudioElements",
|
@@ -14790,9 +14806,9 @@ var Ie = /*#__PURE__*/function (_Pe) {
|
|
14790
14806
|
var i = e.parentElement ? G.cloneElement(e) : e,
|
14791
14807
|
s = document.createElement("audio");
|
14792
14808
|
s.src = t;
|
14793
|
-
var r =
|
14809
|
+
var r = Ue.createSVGElement(In);
|
14794
14810
|
r.classList.add("attachment-icon", "play-icon");
|
14795
|
-
var o =
|
14811
|
+
var o = Ue.createSVGElement(os);
|
14796
14812
|
o.classList.add("attachment-icon", "stop-icon"), i.replaceChildren(r), s.onplay = function () {
|
14797
14813
|
i.replaceChildren(o);
|
14798
14814
|
}, s.onpause = function () {
|
@@ -14806,8 +14822,8 @@ var Ie = /*#__PURE__*/function (_Pe) {
|
|
14806
14822
|
}, {
|
14807
14823
|
key: "createAudioAttachment",
|
14808
14824
|
value: function createAudioAttachment(e) {
|
14809
|
-
var t =
|
14810
|
-
return
|
14825
|
+
var t = Oe.createAudioContainer();
|
14826
|
+
return Oe.addAudioElements(t, e), t;
|
14811
14827
|
}
|
14812
14828
|
}, {
|
14813
14829
|
key: "stopAttachmentPlayback",
|
@@ -14816,9 +14832,9 @@ var Ie = /*#__PURE__*/function (_Pe) {
|
|
14816
14832
|
(s = (i = (t = e.children[0]) == null ? void 0 : t.children) == null ? void 0 : i[0]) != null && s.classList.contains("stop-icon") && e.children[0].click();
|
14817
14833
|
}
|
14818
14834
|
}]);
|
14819
|
-
}(
|
14820
|
-
|
14821
|
-
var oi =
|
14835
|
+
}(Ne);
|
14836
|
+
Oe.TIMER_LIMIT_S = 5999;
|
14837
|
+
var oi = Oe;
|
14822
14838
|
var Ra = /*#__PURE__*/function () {
|
14823
14839
|
function Ra() {
|
14824
14840
|
_classCallCheck(this, Ra);
|
@@ -14828,7 +14844,7 @@ var Ra = /*#__PURE__*/function () {
|
|
14828
14844
|
value:
|
14829
14845
|
// prettier-ignore
|
14830
14846
|
function create(e, t, i, s, r) {
|
14831
|
-
return r === "audio" ? new oi(e, t, i, s) : new
|
14847
|
+
return r === "audio" ? new oi(e, t, i, s) : new Ne(e, t, i, s);
|
14832
14848
|
}
|
14833
14849
|
}]);
|
14834
14850
|
}();
|
@@ -15041,7 +15057,7 @@ var ge = /*#__PURE__*/function () {
|
|
15041
15057
|
value: function createSVGButton(e) {
|
15042
15058
|
var t = document.createElement("div");
|
15043
15059
|
t.classList.add("modal-button", "modal-svg-button");
|
15044
|
-
var i =
|
15060
|
+
var i = Ue.createSVGElement(e);
|
15045
15061
|
return i.classList.add("modal-svg-button-icon"), t.appendChild(i), t;
|
15046
15062
|
}
|
15047
15063
|
}, {
|
@@ -15056,8 +15072,8 @@ var ge = /*#__PURE__*/function () {
|
|
15056
15072
|
}]);
|
15057
15073
|
}();
|
15058
15074
|
ge.MODAL_CLOSE_TIMEOUT_MS = 190;
|
15059
|
-
var
|
15060
|
-
var Ni = /*#__PURE__*/function (
|
15075
|
+
var tt = ge;
|
15076
|
+
var Ni = /*#__PURE__*/function (_ct5) {
|
15061
15077
|
// prettier-ignore
|
15062
15078
|
function Ni(e, t, i, s, r, o) {
|
15063
15079
|
var _this83;
|
@@ -15070,7 +15086,7 @@ var Ni = /*#__PURE__*/function (_lt5) {
|
|
15070
15086
|
_this83._inputElement = Ni.createInputElement((m = i == null ? void 0 : i.files) == null ? void 0 : m.acceptedFormats), _this83.addClickEvent(e, i), _this83.changeElementsByState(c.styles), _this83.reapplyStateStyle("styles"), _this83._fileAttachmentsType = t, _this83._openModalOnce = ((g = (p = i.files) == null ? void 0 : p.infoModal) == null ? void 0 : g.openModalOnce) === !1 || (M = (b = i.files) == null ? void 0 : b.infoModal) == null ? void 0 : M.openModalOnce;
|
15071
15087
|
return _this83;
|
15072
15088
|
}
|
15073
|
-
_inherits(Ni,
|
15089
|
+
_inherits(Ni, _ct5);
|
15074
15090
|
return _createClass(Ni, [{
|
15075
15091
|
key: "createInnerElementsForStates",
|
15076
15092
|
value: function createInnerElementsForStates(e, t) {
|
@@ -15092,7 +15108,7 @@ var Ni = /*#__PURE__*/function (_lt5) {
|
|
15092
15108
|
key: "addClickEvent",
|
15093
15109
|
value: function addClickEvent(e, t) {
|
15094
15110
|
var i = this.triggerImportPrompt.bind(this, this._inputElement),
|
15095
|
-
s =
|
15111
|
+
s = tt.createTextModalFunc(e, t, i);
|
15096
15112
|
this.elementRef.onclick = this.click.bind(this, s);
|
15097
15113
|
}
|
15098
15114
|
}, {
|
@@ -15113,16 +15129,16 @@ var Ni = /*#__PURE__*/function (_lt5) {
|
|
15113
15129
|
return e.classList.add("input-button"), e;
|
15114
15130
|
}
|
15115
15131
|
}]);
|
15116
|
-
}(
|
15117
|
-
var
|
15118
|
-
function
|
15119
|
-
_classCallCheck(this,
|
15132
|
+
}(ct);
|
15133
|
+
var Pe = /*#__PURE__*/function () {
|
15134
|
+
function Pe() {
|
15135
|
+
_classCallCheck(this, Pe);
|
15120
15136
|
}
|
15121
|
-
return _createClass(
|
15137
|
+
return _createClass(Pe, null, [{
|
15122
15138
|
key: "create",
|
15123
15139
|
value: function create(e, t, i) {
|
15124
|
-
var s =
|
15125
|
-
|
15140
|
+
var s = Pe.createElement(i);
|
15141
|
+
Pe.addEvents(s, e, t), e.appendChild(s);
|
15126
15142
|
}
|
15127
15143
|
}, {
|
15128
15144
|
key: "createElement",
|
@@ -15134,13 +15150,13 @@ var Oe = /*#__PURE__*/function () {
|
|
15134
15150
|
key: "addEvents",
|
15135
15151
|
value: function addEvents(e, t, i) {
|
15136
15152
|
t.ondragenter = function (s) {
|
15137
|
-
s.preventDefault(),
|
15153
|
+
s.preventDefault(), Pe.display(e);
|
15138
15154
|
}, e.ondragleave = function (s) {
|
15139
|
-
s.preventDefault(),
|
15155
|
+
s.preventDefault(), Pe.hide(e);
|
15140
15156
|
}, e.ondragover = function (s) {
|
15141
15157
|
s.preventDefault();
|
15142
15158
|
}, e.ondrop = function (s) {
|
15143
|
-
s.preventDefault(),
|
15159
|
+
s.preventDefault(), Pe.uploadFile(i, s), Pe.hide(e);
|
15144
15160
|
};
|
15145
15161
|
}
|
15146
15162
|
}, {
|
@@ -15167,11 +15183,11 @@ var Oe = /*#__PURE__*/function () {
|
|
15167
15183
|
}
|
15168
15184
|
}]);
|
15169
15185
|
}();
|
15170
|
-
var
|
15171
|
-
function
|
15172
|
-
_classCallCheck(this,
|
15186
|
+
var We = /*#__PURE__*/function () {
|
15187
|
+
function We() {
|
15188
|
+
_classCallCheck(this, We);
|
15173
15189
|
}
|
15174
|
-
return _createClass(
|
15190
|
+
return _createClass(We, null, [{
|
15175
15191
|
key: "validate",
|
15176
15192
|
value:
|
15177
15193
|
// prettier-ignore
|
@@ -15195,7 +15211,7 @@ var $e = /*#__PURE__*/function () {
|
|
15195
15211
|
o = i.getAllFileData(), a = o == null ? void 0 : o.map(function (l) {
|
15196
15212
|
return l.file;
|
15197
15213
|
});
|
15198
|
-
return _context129.abrupt("return",
|
15214
|
+
return _context129.abrupt("return", We.validate(e, s, r, a));
|
15199
15215
|
case 5:
|
15200
15216
|
case "end":
|
15201
15217
|
return _context129.stop();
|
@@ -15218,7 +15234,7 @@ var $e = /*#__PURE__*/function () {
|
|
15218
15234
|
s = (r = t.files) == null ? void 0 : r.map(function (o) {
|
15219
15235
|
return o.file;
|
15220
15236
|
});
|
15221
|
-
return _context130.abrupt("return",
|
15237
|
+
return _context130.abrupt("return", We.validate(e, i, t.text, s, !0));
|
15222
15238
|
case 2:
|
15223
15239
|
case "end":
|
15224
15240
|
return _context130.stop();
|
@@ -15248,14 +15264,14 @@ var $e = /*#__PURE__*/function () {
|
|
15248
15264
|
return _regeneratorRuntime().wrap(function _callee131$(_context131) {
|
15249
15265
|
while (1) switch (_context131.prev = _context131.next) {
|
15250
15266
|
case 0:
|
15251
|
-
if (!(r.status.loadingActive || r.status.requestInProgress || t.isSubmitProgrammaticallyDisabled === !0 ||
|
15267
|
+
if (!(r.status.loadingActive || r.status.requestInProgress || t.isSubmitProgrammaticallyDisabled === !0 || !We.validateWebsocket(t, r))) {
|
15252
15268
|
_context131.next = 2;
|
15253
15269
|
break;
|
15254
15270
|
}
|
15255
15271
|
return _context131.abrupt("return", !1);
|
15256
15272
|
case 2:
|
15257
15273
|
l = o || t.canSendMessage;
|
15258
|
-
return _context131.abrupt("return", l ? a ?
|
15274
|
+
return _context131.abrupt("return", l ? a ? We.useValidationFuncProgrammatic(l, a, r) : We.useValidationFunc(l, i, s, r) : null);
|
15259
15275
|
case 4:
|
15260
15276
|
case "end":
|
15261
15277
|
return _context131.stop();
|
@@ -15346,11 +15362,11 @@ var Ma = /*#__PURE__*/function (_Hi2) {
|
|
15346
15362
|
}]);
|
15347
15363
|
}(Hi);
|
15348
15364
|
var ka = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.0//EN\" \"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd\">\n<svg xmlns=\"http://www.w3.org/2000/svg\" stroke=\"currentColor\" fill=\"none\" stroke-width=\"1\" viewBox=\"0 0 24 24\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <line x1=\"22\" y1=\"2\" x2=\"11\" y2=\"14\"></line>\n <polygon points=\"22 2 15 22 11 14 2 10 22 2\"></polygon>\n</svg>\n";
|
15349
|
-
var
|
15350
|
-
function
|
15351
|
-
_classCallCheck(this,
|
15365
|
+
var it = /*#__PURE__*/function () {
|
15366
|
+
function it() {
|
15367
|
+
_classCallCheck(this, it);
|
15352
15368
|
}
|
15353
|
-
return _createClass(
|
15369
|
+
return _createClass(it, null, [{
|
15354
15370
|
key: "resetSubmit",
|
15355
15371
|
value: function resetSubmit(e, t) {
|
15356
15372
|
t ? e.unsetCustomStateStyles(["loading", "submit"]) : e.unsetCustomStateStyles(["stop", "loading", "submit"]), e.reapplyStateStyle("submit");
|
@@ -15366,22 +15382,22 @@ var tt = /*#__PURE__*/function () {
|
|
15366
15382
|
}, {
|
15367
15383
|
key: "setUpDisabledButton",
|
15368
15384
|
value: function setUpDisabledButton(e) {
|
15369
|
-
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%)"), z.setPropertyValueIfDoesNotExist(e.disabled, ["text", "styles", "default", "color"], "grey"),
|
15385
|
+
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%)"), z.setPropertyValueIfDoesNotExist(e.disabled, ["text", "styles", "default", "color"], "grey"), it.overwriteDefaultStyleWithSubmit(e, "disabled");
|
15370
15386
|
}
|
15371
15387
|
}, {
|
15372
15388
|
key: "process",
|
15373
15389
|
value: function process(e) {
|
15374
15390
|
var t = JSON.parse(JSON.stringify(e || {}));
|
15375
|
-
return
|
15391
|
+
return it.overwriteDefaultStyleWithSubmit(t, "loading"), it.overwriteDefaultStyleWithSubmit(t, "stop"), e != null && e.alwaysEnabled || it.setUpDisabledButton(t), t;
|
15376
15392
|
}
|
15377
15393
|
}]);
|
15378
15394
|
}();
|
15379
|
-
var P = /*#__PURE__*/function (
|
15395
|
+
var P = /*#__PURE__*/function (_ct6) {
|
15380
15396
|
// prettier-ignore
|
15381
15397
|
function P(e, t, i, s, r, o) {
|
15382
15398
|
var _this88;
|
15383
15399
|
_classCallCheck(this, P);
|
15384
|
-
var a =
|
15400
|
+
var a = it.process(e.submitButtonStyles),
|
15385
15401
|
l = ka;
|
15386
15402
|
_this88 = _callSuper(this, P, [P.createButtonContainerElement(), l, a == null ? void 0 : a.position, a]), _this88._isSVGLoadingIconOverriden = !1, _this88.status = {
|
15387
15403
|
requestInProgress: !1,
|
@@ -15394,7 +15410,7 @@ var P = /*#__PURE__*/function (_lt6) {
|
|
15394
15410
|
});
|
15395
15411
|
return _this88;
|
15396
15412
|
}
|
15397
|
-
_inherits(P,
|
15413
|
+
_inherits(P, _ct6);
|
15398
15414
|
return _createClass(P, [{
|
15399
15415
|
key: "createInnerElementsForStates",
|
15400
15416
|
value: function createInnerElementsForStates() {
|
@@ -15512,7 +15528,7 @@ var P = /*#__PURE__*/function (_lt6) {
|
|
15512
15528
|
e.files && (t.files = Array.from(e.files).map(function (i) {
|
15513
15529
|
return {
|
15514
15530
|
file: i,
|
15515
|
-
type:
|
15531
|
+
type: Ne.getTypeFromBlob(i)
|
15516
15532
|
};
|
15517
15533
|
})), e.custom && (t.custom = e.custom), setTimeout(function () {
|
15518
15534
|
return _this90.attemptSubmit(t, !0);
|
@@ -15648,7 +15664,7 @@ var P = /*#__PURE__*/function (_lt6) {
|
|
15648
15664
|
key: "changeToSubmitIcon",
|
15649
15665
|
value: function changeToSubmitIcon() {
|
15650
15666
|
var _this91 = this;
|
15651
|
-
this.elementRef.classList.contains(P.SUBMIT_CLASS) || (this.elementRef.classList.remove(P.LOADING_CLASS, P.DISABLED_CLASS), N.removeAriaAttributes(this.elementRef), this.elementRef.classList.add(P.SUBMIT_CLASS), this.changeElementsByState(this._innerElements.submit),
|
15667
|
+
this.elementRef.classList.contains(P.SUBMIT_CLASS) || (this.elementRef.classList.remove(P.LOADING_CLASS, P.DISABLED_CLASS), N.removeAriaAttributes(this.elementRef), this.elementRef.classList.add(P.SUBMIT_CLASS), this.changeElementsByState(this._innerElements.submit), it.resetSubmit(this, this.status.loadingActive), this.elementRef.onclick = function () {
|
15652
15668
|
var e;
|
15653
15669
|
_this91.submitFromInput(), (e = _this91._microphoneButton) != null && e.isActive && ri.toggleSpeechAfterSubmit(_this91._microphoneButton.elementRef, !!_this91._stopSTTAfterSubmit);
|
15654
15670
|
});
|
@@ -15685,14 +15701,14 @@ var P = /*#__PURE__*/function (_lt6) {
|
|
15685
15701
|
return e.id = "stop-icon", e;
|
15686
15702
|
}
|
15687
15703
|
}]);
|
15688
|
-
}(
|
15704
|
+
}(ct);
|
15689
15705
|
P.SUBMIT_CLASS = "submit-button", P.LOADING_CLASS = "loading-button", P.DISABLED_CLASS = "disabled-button";
|
15690
15706
|
var gs = P;
|
15691
15707
|
var La = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M27.1 14.313V5.396L24.158 8.34c-2.33-2.325-5.033-3.503-8.11-3.503C9.902 4.837 4.901 9.847 4.899 16c.001 6.152 5.003 11.158 11.15 11.16 4.276 0 9.369-2.227 10.836-8.478l.028-.122h-3.23l-.022.068c-1.078 3.242-4.138 5.421-7.613 5.421a8 8 0 0 1-5.691-2.359A7.993 7.993 0 0 1 8 16.001c0-4.438 3.611-8.049 8.05-8.049 2.069 0 3.638.58 5.924 2.573l-3.792 3.789H27.1z\"/>\n</svg>\n",
|
15692
15708
|
Ia = "<?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 <path d=\"M0 16q0 3.264 1.28 6.208t3.392 5.12 5.12 3.424 6.208 1.248 6.208-1.248 5.12-3.424 3.392-5.12 1.28-6.208-1.28-6.208-3.392-5.12-5.088-3.392-6.24-1.28q-3.264 0-6.208 1.28t-5.12 3.392-3.392 5.12-1.28 6.208zM4 16q0-3.264 1.6-6.016t4.384-4.352 6.016-1.632 6.016 1.632 4.384 4.352 1.6 6.016-1.6 6.048-4.384 4.352-6.016 1.6-6.016-1.6-4.384-4.352-1.6-6.048z\"></path>\n</svg>\n",
|
15693
15709
|
Oa = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M195.2 195.2a64 64 0 0 1 90.496 0L512 421.504 738.304 195.2a64 64 0 0 1 90.496 90.496L602.496 512 828.8 738.304a64 64 0 0 1-90.496 90.496L512 602.496 285.696 828.8a64 64 0 0 1-90.496-90.496L421.504 512 195.2 285.696a64 64 0 0 1 0-90.496z\"/>\n</svg>",
|
15694
15710
|
Pa = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M4.89163 13.2687L9.16582 17.5427L18.7085 8\" stroke=\"#000000\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>";
|
15695
|
-
var Cs = /*#__PURE__*/function (
|
15711
|
+
var Cs = /*#__PURE__*/function (_tt) {
|
15696
15712
|
// prettier-ignore
|
15697
15713
|
function Cs(e, t, i, s) {
|
15698
15714
|
var _this92;
|
@@ -15701,18 +15717,18 @@ var Cs = /*#__PURE__*/function (_et) {
|
|
15701
15717
|
var _this92$addButtonsAnd = _this92.addButtonsAndTheirEvents(t),
|
15702
15718
|
r = _this92$addButtonsAnd.captureButton,
|
15703
15719
|
o = _this92$addButtonsAnd.submitButton;
|
15704
|
-
_this92._captureButton = r, _this92._submitButton = o, _this92._captureIcon = _this92._captureButton.children[0], _this92._refreshIcon =
|
15720
|
+
_this92._captureButton = r, _this92._submitButton = o, _this92._captureIcon = _this92._captureButton.children[0], _this92._refreshIcon = Ue.createSVGElement(La), _this92._refreshIcon.classList.add("modal-svg-button-icon", "modal-svg-refresh-icon"), (s == null ? void 0 : s.format) === "jpeg" && (_this92._format = "image/jpeg"), s != null && s.dimensions && (_this92._dimensions = s.dimensions), _this92._contentRef.appendChild(_this92._canvas), _this92.extensionCloseCallback = _this92.stop;
|
15705
15721
|
return _this92;
|
15706
15722
|
}
|
15707
|
-
_inherits(Cs,
|
15723
|
+
_inherits(Cs, _tt);
|
15708
15724
|
return _createClass(Cs, [{
|
15709
15725
|
key: "addButtonsAndTheirEvents",
|
15710
15726
|
value: function addButtonsAndTheirEvents(e) {
|
15711
|
-
var t =
|
15727
|
+
var t = tt.createSVGButton(Ia);
|
15712
15728
|
t.classList.add("modal-svg-camera-button"), t.children[0].classList.add("modal-svg-camera-icon");
|
15713
15729
|
var i = this.addCloseButton(Oa, !0);
|
15714
15730
|
i.classList.add("modal-svg-close-button"), i.children[0].classList.add("modal-svg-close-icon");
|
15715
|
-
var s =
|
15731
|
+
var s = tt.createSVGButton(Pa);
|
15716
15732
|
return s.classList.add("modal-svg-submit-button"), this.addButtons(t, s), this.addButtonEvents(t, i, s, e), {
|
15717
15733
|
captureButton: t,
|
15718
15734
|
submitButton: s
|
@@ -15740,7 +15756,7 @@ var Cs = /*#__PURE__*/function (_et) {
|
|
15740
15756
|
_this94._captureButton.replaceChildren(_this94._captureIcon), _this94._captureButton.classList.replace("modal-svg-refresh-button", "modal-svg-camera-button");
|
15741
15757
|
var e = _this94._canvas.getContext("2d");
|
15742
15758
|
e == null || e.clearRect(0, 0, _this94._canvas.width, _this94._canvas.height);
|
15743
|
-
},
|
15759
|
+
}, tt.MODAL_CLOSE_TIMEOUT_MS);
|
15744
15760
|
}
|
15745
15761
|
}, {
|
15746
15762
|
key: "start",
|
@@ -15804,9 +15820,9 @@ var Cs = /*#__PURE__*/function (_et) {
|
|
15804
15820
|
return r.openCameraModal.bind(r, r);
|
15805
15821
|
}
|
15806
15822
|
}]);
|
15807
|
-
}(
|
15823
|
+
}(tt);
|
15808
15824
|
var Na = "<?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 <path d=\"M29 7h-4.599l-2.401-4h-12l-2.4 4h-4.6c-1 0-3 1-3 2.969v16.031c0 1.657 1.5 3 2.792 3h26.271c1.313 0 2.938-1.406 2.938-2.968v-16.032c0-1-1-3-3-3zM30 26.032c0 0.395-0.639 0.947-0.937 0.969h-26.265c-0.232-0.019-0.797-0.47-0.797-1v-16.031c0-0.634 0.851-0.953 1-0.969h5.732l2.4-4h9.802l1.785 3.030 0.55 0.97h5.731c0.705 0 0.99 0.921 1 1v16.032zM16 10c-3.866 0-7 3.134-7 7s3.134 7 7 7 7-3.134 7-7-3.134-7-7-7zM16 22c-2.757 0-5-2.243-5-5s2.243-5 5-5 5 2.243 5 5-2.243 5-5 5z\"></path>\n</svg>";
|
15809
|
-
var Rs = /*#__PURE__*/function (
|
15825
|
+
var Rs = /*#__PURE__*/function (_ct7) {
|
15810
15826
|
function Rs(e, t, i) {
|
15811
15827
|
var _this96;
|
15812
15828
|
_classCallCheck(this, Rs);
|
@@ -15818,7 +15834,7 @@ var Rs = /*#__PURE__*/function (_lt7) {
|
|
15818
15834
|
i && _this96.addClickEvent(e, t, i.modalContainerStyle, i.files), _this96.changeElementsByState(o.styles), _this96.reapplyStateStyle("styles");
|
15819
15835
|
return _this96;
|
15820
15836
|
}
|
15821
|
-
_inherits(Rs,
|
15837
|
+
_inherits(Rs, _ct7);
|
15822
15838
|
return _createClass(Rs, [{
|
15823
15839
|
key: "createInnerElementsForStates",
|
15824
15840
|
value: function createInnerElementsForStates(e) {
|
@@ -15841,7 +15857,7 @@ var Rs = /*#__PURE__*/function (_lt7) {
|
|
15841
15857
|
return e.classList.add("input-button"), e;
|
15842
15858
|
}
|
15843
15859
|
}]);
|
15844
|
-
}(
|
15860
|
+
}(ct);
|
15845
15861
|
var Kt = /*#__PURE__*/function () {
|
15846
15862
|
function Kt(e, t, i, s) {
|
15847
15863
|
_classCallCheck(this, Kt);
|
@@ -15853,9 +15869,9 @@ var Kt = /*#__PURE__*/function () {
|
|
15853
15869
|
button: new ri(e, a, t.addNewErrorMessage.bind(t))
|
15854
15870
|
});
|
15855
15871
|
var l = new gs(e, a, t, i, o, r);
|
15856
|
-
a.submit = l.submitFromInput.bind(l),
|
15872
|
+
a.submit = l.submitFromInput.bind(l), We.attach(e, i, a, o, l), e.submitUserMessage = l.programmaticSubmit.bind(l), r.submit = {
|
15857
15873
|
button: l
|
15858
|
-
}, e.customButtons &&
|
15874
|
+
}, e.customButtons && st.add(e, r), Kt.addElements(this.elementRef, a, r, s, o, e.dropupStyles);
|
15859
15875
|
}
|
15860
15876
|
return _createClass(Kt, [{
|
15861
15877
|
key: "createFileUploadComponents",
|
@@ -15876,7 +15892,7 @@ var Kt = /*#__PURE__*/function () {
|
|
15876
15892
|
button: new Ma(_d, t.recordAudio)
|
15877
15893
|
};
|
15878
15894
|
}
|
15879
|
-
return
|
15895
|
+
return Pe.isEnabled(r, e.dragAndDrop) && Pe.create(i, r, e.dragAndDrop), r;
|
15880
15896
|
}
|
15881
15897
|
// prettier-ignore
|
15882
15898
|
}], [{
|
@@ -15938,7 +15954,7 @@ var Ms = /*#__PURE__*/function () {
|
|
15938
15954
|
}
|
15939
15955
|
}]);
|
15940
15956
|
}();
|
15941
|
-
var Da = "#validate-property-key-view{height:100%;position:relative;display:flex;justify-content:center;align-items:center;padding:8px}#loading-validate-key-property{display:inline-block;width:50px;height:50px}#loading-validate-key-property:after{content:\" \";display:block;width:38px;height:38px;margin:1px;border-radius:50%;border:5px solid #5fb2ff;border-color:#5fb2ff transparent #5fb2ff transparent;animation:loading-spinner 1.4s linear infinite}#deep-chat-openai-realtime-container{height:100%;width:100%}#deep-chat-openai-realtime-avatar-container{height:60%;width:100%;display:flex;justify-content:center;align-items:center}#deep-chat-openai-realtime-avatar{border-radius:50%;height:110px;border:1px solid rgb(215,215,215);padding:8px;-webkit-user-select:none;user-select:none;margin-top:20px}#deep-chat-openai-realtime-buttons-container{height:40%;display:flex;position:relative}.deep-chat-openai-realtime-button-container{height:100%;width:50%;display:flex;justify-content:center;align-items:center}.deep-chat-openai-realtime-button{width:70px;height:70px;border-radius:50%;display:flex;justify-content:center;align-items:center;cursor:pointer}.deep-chat-openai-realtime-button-default{background-color:#e3e3e3}.deep-chat-openai-realtime-button-default:hover{background-color:#d4d4d4}.deep-chat-openai-realtime-button-default:active{background-color:#c5c5c5}.deep-chat-openai-realtime-button-loading{opacity:.7;pointer-events:none}.deep-chat-openai-realtime-microphone-active{background-color:#ffe7e7}.deep-chat-openai-realtime-microphone-active:hover{background-color:#ffdede}.deep-chat-openai-realtime-microphone-active:active{background-color:#ffd2d2}.deep-chat-openai-realtime-microphone>*{height:30px;width:30px}.deep-chat-openai-realtime-microphone-active>*{filter:brightness(0) saturate(100%) invert(35%) sepia(60%) saturate(1360%) hue-rotate(325deg) brightness(95%) contrast(92%)}.deep-chat-openai-realtime-toggle>*{height:32px;width:32px;padding-left:3px;filter:brightness(0) saturate(100%) invert(22%) sepia(0%) saturate(4537%) hue-rotate(208deg) brightness(105%) contrast(91%)}.deep-chat-openai-realtime-button-unavailable{opacity:.45;pointer-events:none}#deep-chat-openai-realtime-error{color:red;position:absolute;top:calc(50% + 40px);left:50%;transform:translate(-50%,-50%);font-size:17px}#deep-chat-openai-realtime-loading{position:absolute;font-size:15px;top:50%;left:50%;transform:translate(-50%,-50%)}#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-key{display:inline-block;width:16px;height:16px}#loading-key: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-spinner 1.2s linear infinite}#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}@keyframes loading-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.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}.deep-chat-last-group-messages-active{height:100%}.loading-history-message-full-view{position:absolute;height:70%;width:100%;display:flex;align-items:center}.loading-history-message-small{height:20px;margin-bottom:30px}.loading-history-message-small>div>div{scale:.6}.loading-history-message{margin-top:0;width:100%;max-width:100%;display:flex;justify-content:center;background-color:unset}.loading-history{width:70px}.loading-history div{position:absolute;width:var(--loading-history-width);height:var(--loading-history-height);margin:var(--loading-history-margin);border:var(--loading-history-border);border-radius:50%;animation:loading-spinner 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:var(--loading-history-color) transparent transparent transparent}.loading-history div:nth-child(1){animation-delay:-.45s}.loading-history div:nth-child(2){animation-delay:-.3s}.loading-history div:nth-child(3){animation-delay:-.15s}.html-message{max-width:unset}.error-message-text{margin:14px auto 10px;background-color:#f4c0c0;color:#474747;text-align:center;max-width:95%}.deep-chat-loading-message-dots-container{width:1em;padding:.6em .75em .6em 1.3em}.loading-message-dots{position:relative;width:.45em;height:.45em;border-radius:5px;background-color:var(--loading-message-color);color:var(--loading-message-color);animation:loading-message-dots 1s infinite linear alternate;animation-delay:.5s}.loading-message-dots:before,.loading-message-dots:after{content:\"\";display:inline-block;position:absolute;top:0}.loading-message-dots:before{left:-.7em;width:.45em;height:.45em;border-radius:5px;background-color:var(--loading-message-color);color:var(--loading-message-color);animation:loading-message-dots 1s infinite alternate;animation-delay:0s}.loading-message-dots:after{left:.7em;width:.45em;height:.45em;border-radius:5px;background-color:var(--loading-message-color);color:var(--loading-message-color);animation:loading-message-dots 1s infinite alternate;animation-delay:1s}@keyframes loading-message-dots{0%{background-color:var(--loading-message-color)}50%,to{background-color:var(--loading-message-color-fade)}}.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{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}.role-hidden{display:none}.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:3}.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:2;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}.loading-submit-button{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:loading-submit-button 1.5s infinite linear;bottom:-.75em}@keyframes loading-submit-button{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}}.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-svg-text{padding:1px;height:1.65em;display:flex}.input-button-svg-text>svg{padding:.22rem}.input-button-svg-text>div{margin-left:2px}.input-button:hover,.input-button:focus-visible{background-color:#9c9c9c2e}.input-button:active{background-color:#9c9c9c5e}.input-button:active:not(:hover){background-color:transparent}.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;width:max-content}#custom-icon{height:100%;width:1.2em}.custom-button-container-default{color:#505050}.custom-button-container-default>.dropup-menu-item-icon{color:unset}.custom-button-container-default>svg{filter:brightness(0) saturate(100%) invert(39%) sepia(1%) saturate(0%) hue-rotate(83deg) brightness(93%) contrast(90%)}.custom-button-container-default>.dropup-menu-item-icon>svg{position:absolute;left:.2em}.custom-button-container-active{background-color:#edf7ff;color:#0285ff}.custom-button-container-active:hover,.custom-button-container-active:focus-visible{background-color:#def0ff}.custom-button-container-active:active{background-color:#d2eaff}.custom-button-container-active>svg{filter:brightness(0) saturate(100%) invert(32%) sepia(34%) saturate(4196%) hue-rotate(196deg) brightness(107%) contrast(104%)}.custom-button-container-disabled{color:#aeaeae;cursor:auto}.custom-button-container-disabled>div{pointer-events:none}.custom-button-container-disabled:hover,.custom-button-container-disabled:focus-visible{background-color:transparent}.custom-button-container-disabled:active{background-color:transparent}.custom-button-container-disabled>svg{filter:brightness(0) saturate(100%) invert(67%) sepia(0%) saturate(818%) hue-rotate(28deg) brightness(102%) contrast(100%)}#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}[contenteditable]:empty:before{content:attr(deep-chat-placeholder-text);pointer-events:none}[contenteditable][textcolor]:empty:before{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-button>*{pointer-events:none}#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:hover,.dropup-menu-item:focus-visible{background-color:#f3f3f3}.dropup-menu-item:active{background-color:#ebebeb}.dropup-menu-item:active:not(:hover){background-color:transparent}.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}.dropup-menu-item-icon>svg{bottom:0!important;top:0!important;margin-bottom:auto;margin-top:auto}#dropup-menu-item-icon-element-custom{position:absolute;pointer-events:none;width:1.21em;height:1.21em;left:.28em;filter:brightness(0) saturate(100%) invert(15%) sepia(0%) saturate(337%) hue-rotate(125deg) brightness(91%) contrast(94%)}.dropup-menu-item-text{margin-left:.56em;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}.deep-chat-web-model-button{margin-top:10px;margin-bottom:5px;margin-left:1px}:host{all:initial;display:table-cell}#container{height:inherit;width:inherit;overflow:hidden}";
|
15957
|
+
var Da = "#validate-property-key-view{height:100%;position:relative;display:flex;justify-content:center;align-items:center;padding:8px}#loading-validate-key-property{display:inline-block;width:50px;height:50px}#loading-validate-key-property:after{content:\" \";display:block;width:38px;height:38px;margin:1px;border-radius:50%;border:5px solid #5fb2ff;border-color:#5fb2ff transparent #5fb2ff transparent;animation:loading-spinner 1.4s linear infinite}#deep-chat-openai-realtime-container{height:100%;width:100%}#deep-chat-openai-realtime-avatar-container{height:60%;width:100%;display:flex;justify-content:center;align-items:center}#deep-chat-openai-realtime-avatar{border-radius:50%;height:110px;border:1px solid rgb(215,215,215);padding:8px;-webkit-user-select:none;user-select:none;margin-top:20px}#deep-chat-openai-realtime-buttons-container{height:40%;display:flex;position:relative}.deep-chat-openai-realtime-button-container{height:100%;width:50%;display:flex;justify-content:center;align-items:center}.deep-chat-openai-realtime-button{width:70px;height:70px;border-radius:50%;display:flex;justify-content:center;align-items:center;cursor:pointer}.deep-chat-openai-realtime-button-default{background-color:#e3e3e3}.deep-chat-openai-realtime-button-default:hover{background-color:#d4d4d4}.deep-chat-openai-realtime-button-default:active{background-color:#c5c5c5}.deep-chat-openai-realtime-button-loading{opacity:.7;pointer-events:none}.deep-chat-openai-realtime-microphone-active{background-color:#ffe7e7}.deep-chat-openai-realtime-microphone-active:hover{background-color:#ffdede}.deep-chat-openai-realtime-microphone-active:active{background-color:#ffd2d2}.deep-chat-openai-realtime-microphone>*{height:30px;width:30px}.deep-chat-openai-realtime-microphone-active>*{filter:brightness(0) saturate(100%) invert(35%) sepia(60%) saturate(1360%) hue-rotate(325deg) brightness(95%) contrast(92%)}.deep-chat-openai-realtime-toggle>*{height:32px;width:32px;padding-left:3px;filter:brightness(0) saturate(100%) invert(22%) sepia(0%) saturate(4537%) hue-rotate(208deg) brightness(105%) contrast(91%)}.deep-chat-openai-realtime-button-unavailable{opacity:.45;pointer-events:none}#deep-chat-openai-realtime-error{color:red;position:absolute;top:calc(50% + 40px);left:50%;transform:translate(-50%,-50%);font-size:17px}#deep-chat-openai-realtime-loading{position:absolute;font-size:15px;top:50%;left:50%;transform:translate(-50%,-50%)}#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-key{display:inline-block;width:16px;height:16px}#loading-key: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-spinner 1.2s linear infinite}#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}@keyframes loading-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.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}.deep-chat-last-group-messages-active{height:100%}.loading-history-message-full-view{position:absolute;height:70%;width:100%;display:flex;align-items:center}.loading-history-message-small{height:20px;margin-bottom:30px}.loading-history-message-small>div>div{scale:.6}.loading-history-message{margin-top:0;width:100%;max-width:100%;display:flex;justify-content:center;background-color:unset}.loading-history{width:70px}.loading-history div{position:absolute;width:var(--loading-history-width);height:var(--loading-history-height);margin:var(--loading-history-margin);border:var(--loading-history-border);border-radius:50%;animation:loading-spinner 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:var(--loading-history-color) transparent transparent transparent}.loading-history div:nth-child(1){animation-delay:-.45s}.loading-history div:nth-child(2){animation-delay:-.3s}.loading-history div:nth-child(3){animation-delay:-.15s}.html-message{max-width:unset}.error-message-text{margin:14px auto 10px;background-color:#f4c0c0;color:#474747;text-align:center;max-width:95%}.deep-chat-loading-message-dots-container{width:1em;padding:.6em .75em .6em 1.3em}.loading-message-dots{position:relative;width:.45em;height:.45em;border-radius:5px;background-color:var(--loading-message-color);color:var(--loading-message-color);animation:loading-message-dots 1s infinite linear alternate;animation-delay:.5s}.loading-message-dots:before,.loading-message-dots:after{content:\"\";display:inline-block;position:absolute;top:0}.loading-message-dots:before{left:-.7em;width:.45em;height:.45em;border-radius:5px;background-color:var(--loading-message-color);color:var(--loading-message-color);animation:loading-message-dots 1s infinite alternate;animation-delay:0s}.loading-message-dots:after{left:.7em;width:.45em;height:.45em;border-radius:5px;background-color:var(--loading-message-color);color:var(--loading-message-color);animation:loading-message-dots 1s infinite alternate;animation-delay:1s}@keyframes loading-message-dots{0%{background-color:var(--loading-message-color)}50%,to{background-color:var(--loading-message-color-fade)}}.message-bubble>p:first-child,.message-bubble>.partial-render-message>p:first-child{margin-top:0}.message-bubble>p:last-child,.message-bubble>.partial-render-message:last-child>p{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{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}.role-hidden{display:none}.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:3}.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:2;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}.loading-submit-button{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:loading-submit-button 1.5s infinite linear;bottom:-.75em}@keyframes loading-submit-button{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}}.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-svg-text{padding:1px;height:1.65em;display:flex}.input-button-svg-text>svg{padding:.22rem}.input-button-svg-text>div{margin-left:2px}.input-button:hover,.input-button:focus-visible{background-color:#9c9c9c2e}.input-button:active{background-color:#9c9c9c5e}.input-button:active:not(:hover){background-color:transparent}.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;width:max-content}#custom-icon{height:100%;width:1.2em}.custom-button-container-default{color:#505050}.custom-button-container-default>.dropup-menu-item-icon{color:unset}.custom-button-container-default>svg{filter:brightness(0) saturate(100%) invert(39%) sepia(1%) saturate(0%) hue-rotate(83deg) brightness(93%) contrast(90%)}.custom-button-container-default>.dropup-menu-item-icon>svg{position:absolute;left:.2em}.custom-button-container-active{background-color:#edf7ff;color:#0285ff}.custom-button-container-active:hover,.custom-button-container-active:focus-visible{background-color:#def0ff}.custom-button-container-active:active{background-color:#d2eaff}.custom-button-container-active>svg{filter:brightness(0) saturate(100%) invert(32%) sepia(34%) saturate(4196%) hue-rotate(196deg) brightness(107%) contrast(104%)}.custom-button-container-disabled{color:#aeaeae;cursor:auto}.custom-button-container-disabled>div{pointer-events:none}.custom-button-container-disabled:hover,.custom-button-container-disabled:focus-visible{background-color:transparent}.custom-button-container-disabled:active{background-color:transparent}.custom-button-container-disabled>svg{filter:brightness(0) saturate(100%) invert(67%) sepia(0%) saturate(818%) hue-rotate(28deg) brightness(102%) contrast(100%)}#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}[contenteditable]:empty:before{content:attr(deep-chat-placeholder-text);pointer-events:none}[contenteditable][textcolor]:empty:before{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-button>*{pointer-events:none}#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:hover,.dropup-menu-item:focus-visible{background-color:#f3f3f3}.dropup-menu-item:active{background-color:#ebebeb}.dropup-menu-item:active:not(:hover){background-color:transparent}.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}.dropup-menu-item-icon>svg{bottom:0!important;top:0!important;margin-bottom:auto;margin-top:auto}#dropup-menu-item-icon-element-custom{position:absolute;pointer-events:none;width:1.21em;height:1.21em;left:.28em;filter:brightness(0) saturate(100%) invert(15%) sepia(0%) saturate(337%) hue-rotate(125deg) brightness(91%) contrast(94%)}.dropup-menu-item-text{margin-left:.56em;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}.deep-chat-web-model-button{margin-top:10px;margin-bottom:5px;margin-left:1px}:host{all:initial;display:table-cell}#container{height:inherit;width:inherit;overflow:hidden}";
|
15942
15958
|
var Ba = Object.defineProperty,
|
15943
15959
|
w = function w(n, e, t, i) {
|
15944
15960
|
for (var s = void 0, r = n.length - 1, o; r >= 0; r--) (o = n[r]) && (s = o(e, t, s) || s);
|