deep-chat-dev 9.0.201 → 9.0.203

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/deepChat.js CHANGED
@@ -204,7 +204,7 @@ ht.DEFAULT_COMPONENT_STYLE = {
204
204
  };
205
205
  var kt = ht;
206
206
  var Qe;
207
- var xt = (Qe = /*#__PURE__*/_createClass(function Qe() {
207
+ var St = (Qe = /*#__PURE__*/_createClass(function Qe() {
208
208
  _classCallCheck(this, Qe);
209
209
  }), Qe.IS_SAFARI = /^((?!chrome|android).)*safari/i.test(navigator.userAgent), Qe.IS_CHROMIUM = window.chrome, Qe);
210
210
  var N = /* @__PURE__ */function (n) {
@@ -279,7 +279,7 @@ var Ve = /*#__PURE__*/function () {
279
279
  function clear() {
280
280
  var t;
281
281
  var e = window.scrollY;
282
- this.inputElementRef.classList.contains("text-input-disabled") || (Object.assign(this.inputElementRef.style, (t = this._config.placeholder) == null ? void 0 : t.style), this.inputElementRef.textContent = "", Kt.focusEndOfInput(this.inputElementRef)), xt.IS_CHROMIUM && window.scrollTo({
282
+ this.inputElementRef.classList.contains("text-input-disabled") || (Object.assign(this.inputElementRef.style, (t = this._config.placeholder) == null ? void 0 : t.style), this.inputElementRef.textContent = "", Kt.focusEndOfInput(this.inputElementRef)), St.IS_CHROMIUM && window.scrollTo({
283
283
  top: e
284
284
  });
285
285
  }
@@ -288,7 +288,7 @@ var Ve = /*#__PURE__*/function () {
288
288
  value: function createInputElement() {
289
289
  var t, i, s, r;
290
290
  var e = document.createElement("div");
291
- return e.id = Ve.TEXT_INPUT_ID, e.classList.add("text-input-styling"), xt.IS_CHROMIUM && Ve.preventAutomaticScrollUpOnNewLine(e), typeof this._config.disabled == "boolean" && this._config.disabled === !0 ? (e.contentEditable = "false", e.classList.add("text-input-disabled")) : (e.contentEditable = "true", 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;
291
+ return e.id = Ve.TEXT_INPUT_ID, e.classList.add("text-input-styling"), St.IS_CHROMIUM && Ve.preventAutomaticScrollUpOnNewLine(e), typeof this._config.disabled == "boolean" && this._config.disabled === !0 ? (e.contentEditable = "false", e.classList.add("text-input-disabled")) : (e.contentEditable = "true", 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;
292
292
  }
293
293
  }, {
294
294
  key: "removePlaceholderStyle",
@@ -383,7 +383,7 @@ var Kt = /*#__PURE__*/function () {
383
383
  key: "focusFromParentElement",
384
384
  value: function focusFromParentElement(e) {
385
385
  var t = e.querySelector("#".concat(di.TEXT_INPUT_ID));
386
- t && (xt.IS_SAFARI && t.focus(), Kt.focusEndOfInput(t));
386
+ t && (St.IS_SAFARI && t.focus(), Kt.focusEndOfInput(t));
387
387
  }
388
388
  }]);
389
389
  }();
@@ -393,21 +393,21 @@ function Os(n) {
393
393
  function kn(n) {
394
394
  return n && JSON.stringify(n);
395
395
  }
396
- function xs(n, e, t, i) {
396
+ function Ss(n, e, t, i) {
397
397
  var s = "\n".concat(Os(e), " message: ").concat(JSON.stringify(n), " \n"),
398
398
  r = t ? "".concat(Os(e), " message after interceptor: ").concat(kn(i), " \n") : "";
399
399
  return s + r;
400
400
  }
401
401
  function Mn(n, e, t, i) {
402
- return "".concat(xs(n, e, t, i), "Make sure the ").concat(e, " message is using the Response format: https://deepchat.dev/docs/connect/#Response \nYou can also augment it using the responseInterceptor property: https://deepchat.dev/docs/interceptors#responseInterceptor");
402
+ return "".concat(Ss(n, e, t, i), "Make sure the ").concat(e, " message is using the Response format: https://deepchat.dev/docs/connect/#Response \nYou can also augment it using the responseInterceptor property: https://deepchat.dev/docs/interceptors#responseInterceptor");
403
403
  }
404
404
  function Rn(n, e, t) {
405
405
  var i = "response";
406
- return "".concat(xs(n, i, e, t), "Make sure the ").concat(i, " message is using the {text: string} format, e.g: {text: \"Model Response\"}");
406
+ return "".concat(Ss(n, i, e, t), "Make sure the ").concat(i, " message is using the {text: string} format, e.g: {text: \"Model Response\"}");
407
407
  }
408
408
  function In(n, e) {
409
409
  var t = "request";
410
- return "".concat(xs(n, t, e), "Make sure the ").concat(t, " message is using the {body: {text: string}} format, e.g: {body: {text: \"Model Response\"}}");
410
+ return "".concat(Ss(n, t, e), "Make sure the ").concat(t, " message is using the {body: {text: string}} format, e.g: {body: {text: \"Model Response\"}}");
411
411
  }
412
412
  var Ns = "Make sure the events are using {text: string} or {html: string} format.\nYou can also augment them using the responseInterceptor property: https://deepchat.dev/docs/interceptors#responseInterceptor",
413
413
  M = {
@@ -494,11 +494,11 @@ var Ri = /*#__PURE__*/function () {
494
494
  }();
495
495
  Ri.LOAD_VOICES_MS = 200;
496
496
  var bt = Ri;
497
- var le = /*#__PURE__*/function () {
498
- function le() {
499
- _classCallCheck(this, le);
497
+ var se = /*#__PURE__*/function () {
498
+ function se() {
499
+ _classCallCheck(this, se);
500
500
  }
501
- return _createClass(le, null, [{
501
+ return _createClass(se, null, [{
502
502
  key: "checkForContainerStyles",
503
503
  value: function checkForContainerStyles(e, t) {
504
504
  var i = e.containerStyle;
@@ -568,6 +568,18 @@ var le = /*#__PURE__*/function () {
568
568
  var t = e;
569
569
  t.request && (console.error("The request property in file configuration is deprecated since version 2.0.0."), console.error("Please use the connect property instead: https://deepchat.dev/docs/files"), t.connect || (t.connect = t.request));
570
570
  }
571
+ }, {
572
+ key: "processMessageStyles",
573
+ value: function processMessageStyles(e) {
574
+ if (!e) return;
575
+ var t = structuredClone(e),
576
+ i = t.loading;
577
+ return (i.outerContainer || i.innerContainer || i.bubble || i.media) && (console.error("The loading message styles are defined using LoadingMessageStyles interface since version 2.0.2."), console.error("Check it out here: https://deepchat.dev/docs/messages/styles#LoadingMessageStyles"), t.loading = {
578
+ message: {
579
+ styles: i
580
+ }
581
+ }), t;
582
+ }
571
583
  }]);
572
584
  }();
573
585
  var ut = /*#__PURE__*/function () {
@@ -671,20 +683,20 @@ var Ln = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e
671
683
  }();
672
684
  Y.CONTAINER_CLASS = "avatar-container";
673
685
  var Mt = Y;
674
- var ge = /*#__PURE__*/function () {
675
- function ge() {
676
- _classCallCheck(this, ge);
686
+ var me = /*#__PURE__*/function () {
687
+ function me() {
688
+ _classCallCheck(this, me);
677
689
  }
678
- return _createClass(ge, null, [{
690
+ return _createClass(me, null, [{
679
691
  key: "hide",
680
692
  value: function hide(e) {
681
693
  var t;
682
- (t = e.getElementsByClassName(ge.NAME_CLASS)[0].style).visibility || (t.visibility = "hidden");
694
+ (t = e.getElementsByClassName(me.NAME_CLASS)[0].style).visibility || (t.visibility = "hidden");
683
695
  }
684
696
  }, {
685
697
  key: "reveal",
686
698
  value: function reveal(e) {
687
- e.getElementsByClassName(ge.NAME_CLASS)[0].style.visibility = "";
699
+ e.getElementsByClassName(me.NAME_CLASS)[0].style.visibility = "";
688
700
  }
689
701
  }, {
690
702
  key: "getPosition",
@@ -710,20 +722,20 @@ var ge = /*#__PURE__*/function () {
710
722
  key: "createName",
711
723
  value: function createName(e, t) {
712
724
  var i = document.createElement("div");
713
- return i.classList.add(ge.NAME_CLASS), i.textContent = ge.getNameText(e, t), ge.applyStyle(i, e, t), i;
725
+ return i.classList.add(me.NAME_CLASS), i.textContent = me.getNameText(e, t), me.applyStyle(i, e, t), i;
714
726
  }
715
727
  }, {
716
728
  key: "add",
717
729
  value: function add(e, t, i) {
718
730
  var s = typeof i == "boolean" ? {} : i,
719
- r = ge.createName(t, s),
720
- o = ge.getPosition(t, s);
731
+ r = me.createName(t, s),
732
+ o = me.getPosition(t, s);
721
733
  r.classList.add(o === "left" ? "left-item-position" : "right-item-position"), e.insertAdjacentElement(o === "left" ? "beforebegin" : "afterend", r);
722
734
  }
723
735
  }]);
724
736
  }();
725
- ge.NAME_CLASS = "name";
726
- var Rt = ge;
737
+ me.NAME_CLASS = "name";
738
+ var Rt = me;
727
739
  var C = /*#__PURE__*/function () {
728
740
  function C() {
729
741
  _classCallCheck(this, C);
@@ -1060,7 +1072,7 @@ var Fe = /*#__PURE__*/function () {
1060
1072
  value: function overwrite(e, t, i, s) {
1061
1073
  var r = e.messageToElements,
1062
1074
  o = b.overwriteMessage(r, s, t, i, "html", "html-message");
1063
- return o && (o.bubbleElement.innerHTML = t, te.apply(e, o.outerContainer), le.flagHTMLUpdateClass(o.bubbleElement)), o;
1075
+ return o && (o.bubbleElement.innerHTML = t, te.apply(e, o.outerContainer), se.flagHTMLUpdateClass(o.bubbleElement)), o;
1064
1076
  }
1065
1077
  // prettier-ignore
1066
1078
  }, {
@@ -1074,7 +1086,7 @@ var Fe = /*#__PURE__*/function () {
1074
1086
  r.status = !1;
1075
1087
  }
1076
1088
  var a = Fe.createElements(e, t, i, o);
1077
- return b.fillEmptyMessageElement(a.bubbleElement, t), te.apply(e, a.outerContainer), le.flagHTMLUpdateClass(a.bubbleElement), e.applyCustomStyles(a, i, !1, (l = e.messageStyles) == null ? void 0 : l.html), o || Fe.addElement(e, a.outerContainer), a;
1089
+ return b.fillEmptyMessageElement(a.bubbleElement, t), te.apply(e, a.outerContainer), se.flagHTMLUpdateClass(a.bubbleElement), e.applyCustomStyles(a, i, !1, (l = e.messageStyles) == null ? void 0 : l.html), o || Fe.addElement(e, a.outerContainer), a;
1078
1090
  }
1079
1091
  }]);
1080
1092
  }();
@@ -1356,25 +1368,25 @@ function gn(n, e) {
1356
1368
  var it = g.getBreak = function (e, t) {
1357
1369
  return t = gn(e, t), t < e.length && e[t].type === "list_item_close" ? "" : "\n";
1358
1370
  };
1359
- function Ss() {
1371
+ function xs() {
1360
1372
  this.rules = pn({}, g), this.getBreak = g.getBreak;
1361
1373
  }
1362
- Ss.prototype.renderInline = function (n, e, t) {
1374
+ xs.prototype.renderInline = function (n, e, t) {
1363
1375
  for (var i = this.rules, s = n.length, r = 0, o = ""; s--;) o += i[n[r].type](n, r++, e, t, this);
1364
1376
  return o;
1365
1377
  };
1366
- Ss.prototype.render = function (n, e, t) {
1378
+ xs.prototype.render = function (n, e, t) {
1367
1379
  for (var i = this.rules, s = n.length, r = -1, o = ""; ++r < s;) n[r].type === "inline" ? o += this.renderInline(n[r].children, e, t) : o += i[n[r].type](n, r, e, t, this);
1368
1380
  return o;
1369
1381
  };
1370
- function se() {
1382
+ function ne() {
1371
1383
  this.__rules__ = [], this.__cache__ = null;
1372
1384
  }
1373
- se.prototype.__find__ = function (n) {
1385
+ ne.prototype.__find__ = function (n) {
1374
1386
  for (var e = this.__rules__.length, t = -1; e--;) if (this.__rules__[++t].name === n) return t;
1375
1387
  return -1;
1376
1388
  };
1377
- se.prototype.__compile__ = function () {
1389
+ ne.prototype.__compile__ = function () {
1378
1390
  var n = this,
1379
1391
  e = [""];
1380
1392
  n.__rules__.forEach(function (t) {
@@ -1387,13 +1399,13 @@ se.prototype.__compile__ = function () {
1387
1399
  });
1388
1400
  });
1389
1401
  };
1390
- se.prototype.at = function (n, e, t) {
1402
+ ne.prototype.at = function (n, e, t) {
1391
1403
  var i = this.__find__(n),
1392
1404
  s = t || {};
1393
1405
  if (i === -1) throw new Error("Parser rule not found: " + n);
1394
1406
  this.__rules__[i].fn = e, this.__rules__[i].alt = s.alt || [], this.__cache__ = null;
1395
1407
  };
1396
- se.prototype.before = function (n, e, t, i) {
1408
+ ne.prototype.before = function (n, e, t, i) {
1397
1409
  var s = this.__find__(n),
1398
1410
  r = i || {};
1399
1411
  if (s === -1) throw new Error("Parser rule not found: " + n);
@@ -1404,7 +1416,7 @@ se.prototype.before = function (n, e, t, i) {
1404
1416
  alt: r.alt || []
1405
1417
  }), this.__cache__ = null;
1406
1418
  };
1407
- se.prototype.after = function (n, e, t, i) {
1419
+ ne.prototype.after = function (n, e, t, i) {
1408
1420
  var s = this.__find__(n),
1409
1421
  r = i || {};
1410
1422
  if (s === -1) throw new Error("Parser rule not found: " + n);
@@ -1415,7 +1427,7 @@ se.prototype.after = function (n, e, t, i) {
1415
1427
  alt: r.alt || []
1416
1428
  }), this.__cache__ = null;
1417
1429
  };
1418
- se.prototype.push = function (n, e, t) {
1430
+ ne.prototype.push = function (n, e, t) {
1419
1431
  var i = t || {};
1420
1432
  this.__rules__.push({
1421
1433
  name: n,
@@ -1424,7 +1436,7 @@ se.prototype.push = function (n, e, t) {
1424
1436
  alt: i.alt || []
1425
1437
  }), this.__cache__ = null;
1426
1438
  };
1427
- se.prototype.enable = function (n, e) {
1439
+ ne.prototype.enable = function (n, e) {
1428
1440
  n = Array.isArray(n) ? n : [n], e && this.__rules__.forEach(function (t) {
1429
1441
  t.enabled = !1;
1430
1442
  }), n.forEach(function (t) {
@@ -1433,14 +1445,14 @@ se.prototype.enable = function (n, e) {
1433
1445
  this.__rules__[i].enabled = !0;
1434
1446
  }, this), this.__cache__ = null;
1435
1447
  };
1436
- se.prototype.disable = function (n) {
1448
+ ne.prototype.disable = function (n) {
1437
1449
  n = Array.isArray(n) ? n : [n], n.forEach(function (e) {
1438
1450
  var t = this.__find__(e);
1439
1451
  if (t < 0) throw new Error("Rules manager: invalid rule name " + e);
1440
1452
  this.__rules__[t].enabled = !1;
1441
1453
  }, this), this.__cache__ = null;
1442
1454
  };
1443
- se.prototype.getRules = function (n) {
1455
+ ne.prototype.getRules = function (n) {
1444
1456
  return this.__cache__ === null && this.__compile__(), this.__cache__[n] || [];
1445
1457
  };
1446
1458
  function $n(n) {
@@ -1760,7 +1772,7 @@ function ar(n) {
1760
1772
  }
1761
1773
  var Ji = [["block", $n], ["abbr", Kn], ["references", Zn], ["inline", Xn], ["footnote_tail", Yn], ["abbr2", Qn], ["replacements", nr], ["smartquotes", ar]];
1762
1774
  function En() {
1763
- this.options = {}, this.ruler = new se();
1775
+ this.options = {}, this.ruler = new ne();
1764
1776
  for (var n = 0; n < Ji.length; n++) this.ruler.push(Ji[n][0], Ji[n][1]);
1765
1777
  }
1766
1778
  En.prototype.process = function (n) {
@@ -2063,9 +2075,9 @@ function gr(n, e, t) {
2063
2075
  level: n.level
2064
2076
  }), !0);
2065
2077
  }
2066
- var xn = {};
2078
+ var Sn = {};
2067
2079
  ["article", "aside", "button", "blockquote", "body", "canvas", "caption", "col", "colgroup", "dd", "div", "dl", "dt", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "hr", "iframe", "li", "map", "object", "ol", "output", "p", "pre", "progress", "script", "section", "style", "table", "tbody", "td", "textarea", "tfoot", "th", "tr", "thead", "ul", "video"].forEach(function (n) {
2068
- xn[n] = !0;
2080
+ Sn[n] = !0;
2069
2081
  });
2070
2082
  var br = /^<([a-zA-Z]{1,15})[\s\/>]/,
2071
2083
  vr = /^<\/([a-zA-Z]{1,15})[\s>]/;
@@ -2087,7 +2099,7 @@ function Er(n, e, t, i) {
2087
2099
  if (s === 47) {
2088
2100
  if (r = n.src.slice(a, l).match(vr), !r) return !1;
2089
2101
  } else if (r = n.src.slice(a, l).match(br), !r) return !1;
2090
- if (xn[r[1].toLowerCase()] !== !0) return !1;
2102
+ if (Sn[r[1].toLowerCase()] !== !0) return !1;
2091
2103
  if (i) return !0;
2092
2104
  } else return !1;
2093
2105
  for (o = e + 1; o < n.lineMax && !n.isEmpty(o);) o++;
@@ -2103,7 +2115,7 @@ function Zi(n, e) {
2103
2115
  i = n.eMarks[e];
2104
2116
  return n.src.substr(t, i - t);
2105
2117
  }
2106
- function xr(n, e, t, i) {
2118
+ function Sr(n, e, t, i) {
2107
2119
  var s, r, o, a, l, c, d, h, u, f, m;
2108
2120
  if (e + 2 > t || (l = e + 1, n.tShift[l] < n.blkIndent) || (o = n.bMarks[l] + n.tShift[l], o >= n.eMarks[l]) || (s = n.src.charCodeAt(o), s !== 124 && s !== 45 && s !== 58) || (r = Zi(n, e + 1), !/^[-:| ]+$/.test(r)) || (c = r.split("|"), c <= 2)) return !1;
2109
2121
  for (h = [], a = 0; a < c.length; a++) {
@@ -2190,7 +2202,7 @@ function ni(n, e) {
2190
2202
  r = n.eMarks[e];
2191
2203
  return s >= r || (i = n.src.charCodeAt(s++), i !== 126 && i !== 58) || (t = n.skipSpaces(s), s === t) || t >= r ? -1 : t;
2192
2204
  }
2193
- function Sr(n, e) {
2205
+ function xr(n, e) {
2194
2206
  var t,
2195
2207
  i,
2196
2208
  s = n.level + 2;
@@ -2236,7 +2248,7 @@ function _r(n, e, t, i) {
2236
2248
  return n.tokens.push({
2237
2249
  type: "dl_close",
2238
2250
  level: --n.level
2239
- }), l[1] = d, n.line = d, y && Sr(n, c), !0;
2251
+ }), l[1] = d, n.line = d, y && xr(n, c), !0;
2240
2252
  }
2241
2253
  function wr(n, e) {
2242
2254
  var t,
@@ -2272,9 +2284,9 @@ function wr(n, e) {
2272
2284
  level: n.level
2273
2285
  })), !0;
2274
2286
  }
2275
- var ri = [["code", lr], ["fences", cr, ["paragraph", "blockquote", "list"]], ["blockquote", dr, ["paragraph", "blockquote", "list"]], ["hr", hr, ["paragraph", "blockquote", "list"]], ["list", fr, ["paragraph", "blockquote"]], ["footnote", pr, ["paragraph"]], ["heading", mr, ["paragraph", "blockquote"]], ["lheading", gr], ["htmlblock", Er, ["paragraph", "blockquote"]], ["table", xr, ["paragraph"]], ["deflist", _r, ["paragraph"]], ["paragraph", wr]];
2287
+ var ri = [["code", lr], ["fences", cr, ["paragraph", "blockquote", "list"]], ["blockquote", dr, ["paragraph", "blockquote", "list"]], ["hr", hr, ["paragraph", "blockquote", "list"]], ["list", fr, ["paragraph", "blockquote"]], ["footnote", pr, ["paragraph"]], ["heading", mr, ["paragraph", "blockquote"]], ["lheading", gr], ["htmlblock", Er, ["paragraph", "blockquote"]], ["table", Sr, ["paragraph"]], ["deflist", _r, ["paragraph"]], ["paragraph", wr]];
2276
2288
  function _s() {
2277
- this.ruler = new se();
2289
+ this.ruler = new ne();
2278
2290
  for (var n = 0; n < ri.length; n++) this.ruler.push(ri[n][0], ri[n][1], {
2279
2291
  alt: (ri[n][2] || []).slice()
2280
2292
  });
@@ -2759,7 +2771,7 @@ function uo(n, e) {
2759
2771
  }
2760
2772
  var Xi = [["text", Mr], ["newline", Rr], ["escape", Ir], ["backticks", Lr], ["del", Pr], ["ins", Or], ["mark", Nr], ["emphasis", Dr], ["sub", Br], ["sup", jr], ["links", Hr], ["footnote_inline", qr], ["footnote_ref", zr], ["autolink", Wr], ["htmltag", lo], ["entity", uo]];
2761
2773
  function Pi() {
2762
- this.ruler = new se();
2774
+ this.ruler = new ne();
2763
2775
  for (var n = 0; n < Xi.length; n++) this.ruler.push(Xi[n][0], Xi[n][1]);
2764
2776
  this.validateLink = fo;
2765
2777
  }
@@ -2913,11 +2925,11 @@ var po = {
2913
2925
  full: mo,
2914
2926
  commonmark: go
2915
2927
  };
2916
- function Sn(n, e, t) {
2928
+ function xn(n, e, t) {
2917
2929
  this.src = e, this.env = t, this.options = n.options, this.tokens = [], this.inlineMode = !1, this.inline = n.inline, this.block = n.block, this.renderer = n.renderer, this.typographer = n.typographer;
2918
2930
  }
2919
2931
  function Me(n, e) {
2920
- typeof n != "string" && (e = n, n = "default"), e && e.linkify != null && console.warn("linkify option is removed. Use linkify plugin instead:\n\nimport Remarkable from 'remarkable';\nimport linkify from 'remarkable/linkify';\nnew Remarkable().use(linkify)\n"), this.inline = new Pi(), this.block = new _s(), this.core = new En(), this.renderer = new Ss(), this.ruler = new se(), this.options = {}, this.configure(bo[n]), this.set(e || {});
2932
+ typeof n != "string" && (e = n, n = "default"), e && e.linkify != null && console.warn("linkify option is removed. Use linkify plugin instead:\n\nimport Remarkable from 'remarkable';\nimport linkify from 'remarkable/linkify';\nnew Remarkable().use(linkify)\n"), this.inline = new Pi(), this.block = new _s(), this.core = new En(), this.renderer = new xs(), this.ruler = new ne(), this.options = {}, this.configure(bo[n]), this.set(e || {});
2921
2933
  }
2922
2934
  Me.prototype.set = function (n) {
2923
2935
  pn(this.options, n);
@@ -2933,14 +2945,14 @@ Me.prototype.use = function (n, e) {
2933
2945
  return n(this, e), this;
2934
2946
  };
2935
2947
  Me.prototype.parse = function (n, e) {
2936
- var t = new Sn(this, n, e);
2948
+ var t = new xn(this, n, e);
2937
2949
  return this.core.process(t), t.tokens;
2938
2950
  };
2939
2951
  Me.prototype.render = function (n, e) {
2940
2952
  return e = e || {}, this.renderer.render(this.parse(n, e), this.options, e);
2941
2953
  };
2942
2954
  Me.prototype.parseInline = function (n, e) {
2943
- var t = new Sn(this, n, e);
2955
+ var t = new xn(this, n, e);
2944
2956
  return t.inlineMode = !0, this.core.process(t), t.tokens;
2945
2957
  };
2946
2958
  Me.prototype.renderInline = function (n, e) {
@@ -2996,11 +3008,11 @@ var jt = /*#__PURE__*/function () {
2996
3008
  }
2997
3009
  }]);
2998
3010
  }();
2999
- var xe = /*#__PURE__*/function () {
3000
- function xe() {
3001
- _classCallCheck(this, xe);
3011
+ var Se = /*#__PURE__*/function () {
3012
+ function Se() {
3013
+ _classCallCheck(this, Se);
3002
3014
  }
3003
- return _createClass(xe, null, [{
3015
+ return _createClass(Se, null, [{
3004
3016
  key: "addMessage",
3005
3017
  value:
3006
3018
  // prettier-ignore
@@ -3012,7 +3024,7 @@ var xe = /*#__PURE__*/function () {
3012
3024
  key: "wrapInLink",
3013
3025
  value: function wrapInLink(e, t, i) {
3014
3026
  var s = document.createElement("a");
3015
- return s.href = t, s.download = i || xe.DEFAULT_FILE_NAME, s.target = "_blank", s.appendChild(e), s;
3027
+ return s.href = t, s.download = i || Se.DEFAULT_FILE_NAME, s.target = "_blank", s.appendChild(e), s;
3016
3028
  }
3017
3029
  }, {
3018
3030
  key: "isNonLinkableDataUrl",
@@ -3022,7 +3034,7 @@ var xe = /*#__PURE__*/function () {
3022
3034
  }, {
3023
3035
  key: "processContent",
3024
3036
  value: function processContent(e, t, i, s) {
3025
- return !i || xe.isNonLinkableDataUrl(e, i) ? t : xe.wrapInLink(t, i, s);
3037
+ return !i || Se.isNonLinkableDataUrl(e, i) ? t : Se.wrapInLink(t, i, s);
3026
3038
  }
3027
3039
  }, {
3028
3040
  key: "waitToLoadThenScroll",
@@ -3034,11 +3046,11 @@ var xe = /*#__PURE__*/function () {
3034
3046
  }, {
3035
3047
  key: "scrollDownOnImageLoad",
3036
3048
  value: function scrollDownOnImageLoad(e, t) {
3037
- if (e.startsWith("data")) xe.waitToLoadThenScroll(t);else try {
3049
+ if (e.startsWith("data")) Se.waitToLoadThenScroll(t);else try {
3038
3050
  fetch(e, {
3039
3051
  mode: "no-cors"
3040
3052
  })["catch"](function () {})["finally"](function () {
3041
- xe.waitToLoadThenScroll(t);
3053
+ Se.waitToLoadThenScroll(t);
3042
3054
  });
3043
3055
  } catch (_unused5) {
3044
3056
  t.scrollTop = t.scrollHeight;
@@ -3076,7 +3088,7 @@ var xe = /*#__PURE__*/function () {
3076
3088
  value: function isImageFile(e) {
3077
3089
  var t = e.type,
3078
3090
  i = e.src;
3079
- return t === "image" || (i == null ? void 0 : i.startsWith("data:image")) || i && xe.isImageFileExtension(i);
3091
+ return t === "image" || (i == null ? void 0 : i.startsWith("data:image")) || i && Se.isImageFileExtension(i);
3080
3092
  }
3081
3093
  }, {
3082
3094
  key: "isImageFileExtension",
@@ -3085,8 +3097,8 @@ var xe = /*#__PURE__*/function () {
3085
3097
  }
3086
3098
  }]);
3087
3099
  }();
3088
- xe.DEFAULT_FILE_NAME = "file";
3089
- var U = xe;
3100
+ Se.DEFAULT_FILE_NAME = "file";
3101
+ var U = Se;
3090
3102
  var hi = /*#__PURE__*/function () {
3091
3103
  function hi() {
3092
3104
  _classCallCheck(this, hi);
@@ -3102,7 +3114,7 @@ var hi = /*#__PURE__*/function () {
3102
3114
  }));
3103
3115
  U.reAddFileRefToObject(t, s), (r = e.onMessage) == null || r.call(e, s), e.dispatchEvent(new CustomEvent("message", {
3104
3116
  detail: s
3105
- })), le.fireOnNewMessage(e, s);
3117
+ })), se.fireOnNewMessage(e, s);
3106
3118
  }
3107
3119
  }, {
3108
3120
  key: "onClearMessages",
@@ -3240,7 +3252,7 @@ var De = /*#__PURE__*/function () {
3240
3252
  function De(e) {
3241
3253
  var _this3 = this;
3242
3254
  _classCallCheck(this, De);
3243
- this.messageElementRefs = [], this.htmlClassUtilities = {}, this.messageToElements = [], this.textElementsToText = [], this.elementRef = De.createContainerElement(), this.messageStyles = e.messageStyles, this._remarkable = jt.createNew(), this._avatars = e.avatars, this._names = e.names, this._onMessage = hi.onMessage.bind(this, e), e.htmlClassUtilities && (this.htmlClassUtilities = e.htmlClassUtilities), setTimeout(function () {
3255
+ this.messageElementRefs = [], this.htmlClassUtilities = {}, this.messageToElements = [], this.elementRef = De.createContainerElement(), this.messageStyles = se.processMessageStyles(e.messageStyles), this._remarkable = jt.createNew(), this._avatars = e.avatars, this._names = e.names, this._onMessage = hi.onMessage.bind(this, e), e.htmlClassUtilities && (this.htmlClassUtilities = e.htmlClassUtilities), setTimeout(function () {
3244
3256
  _this3.submitUserMessage = e.submitUserMessage;
3245
3257
  });
3246
3258
  }
@@ -3249,25 +3261,18 @@ var De = /*#__PURE__*/function () {
3249
3261
  value: function addNewTextMessage(e, t, i) {
3250
3262
  var s = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
3251
3263
  if (i != null && i.status) {
3252
- var a = this.overwriteText(t, e, this.messageElementRefs);
3253
- if (a) return a;
3264
+ var o = this.overwriteText(t, e, this.messageElementRefs);
3265
+ if (o) return o;
3254
3266
  i.status = !1;
3255
3267
  }
3256
3268
  var r = s ? this.createAndPrependNewMessageElement(e, t, s) : this.createAndAppendNewMessageElement(e, t);
3257
- r.bubbleElement.classList.add("text-message"), this.applyCustomStyles(r, t, !1), b.fillEmptyMessageElement(r.bubbleElement, e);
3258
- var o = [r, e];
3259
- return b.updateRefArr(this.textElementsToText, o, s), r;
3269
+ return r.bubbleElement.classList.add("text-message"), this.applyCustomStyles(r, t, !1), b.fillEmptyMessageElement(r.bubbleElement, e), r;
3260
3270
  }
3261
3271
  }, {
3262
3272
  key: "overwriteText",
3263
3273
  value: function overwriteText(e, t, i) {
3264
3274
  var s = b.overwriteMessage(this.messageToElements, i, t, e, "text", "text-message");
3265
- if (s) {
3266
- this.renderText(s.bubbleElement, t);
3267
- var r = b.getLastTextToElement(this.textElementsToText, s);
3268
- r && (r[1] = t);
3269
- }
3270
- return s;
3275
+ return s && this.renderText(s.bubbleElement, t), s;
3271
3276
  }
3272
3277
  }, {
3273
3278
  key: "createAndAppendNewMessageElement",
@@ -3378,8 +3383,8 @@ var De = /*#__PURE__*/function () {
3378
3383
  key: "refreshTextMessages",
3379
3384
  value: function refreshTextMessages() {
3380
3385
  var _this5 = this;
3381
- this._remarkable = jt.createNew(), this.textElementsToText.forEach(function (e) {
3382
- _this5.renderText(e[0].bubbleElement, e[1]);
3386
+ this._remarkable = jt.createNew(), this.messageToElements.forEach(function (e) {
3387
+ e[0].text && _this5.renderText(e[1][0].bubbleElement, e[0].text);
3383
3388
  });
3384
3389
  }
3385
3390
  }], [{
@@ -3463,7 +3468,7 @@ var ft = /*#__PURE__*/function () {
3463
3468
  }, {
3464
3469
  key: "updateText",
3465
3470
  value: function updateText(e, t, i) {
3466
- this._message && (this._message.text = i ? e : this._message.text + e, this._messages.textElementsToText[this._messages.textElementsToText.length - 1][1] = this._message.text, this._messages.renderText(t, this._message.text));
3471
+ this._message && (this._message.text = i ? e : this._message.text + e, this._messages.renderText(t, this._message.text));
3467
3472
  }
3468
3473
  }, {
3469
3474
  key: "updateHTML",
@@ -3476,11 +3481,10 @@ var ft = /*#__PURE__*/function () {
3476
3481
  }, {
3477
3482
  key: "finaliseStreamedMessage",
3478
3483
  value: function finaliseStreamedMessage() {
3479
- var t;
3480
- var e = this._messages.textElementsToText;
3484
+ var e;
3481
3485
  if (!(this._endStreamAfterOperation || !this._message) && !(this._fileAdded && !this._elements)) {
3482
3486
  if (!this._elements) throw Error(M.NO_VALID_STREAM_EVENTS_SENT);
3483
- (t = this._elements.bubbleElement) != null && t.classList.contains(ft.MESSAGE_CLASS) && (this._streamType === "text" ? (e[e.length - 1][1] = this._message.text || "", this._messages.textToSpeech && bt.speak(this._message.text || "", this._messages.textToSpeech)) : this._streamType === "html" && this._elements && te.apply(this._messages, this._elements.outerContainer), this._elements.bubbleElement.classList.remove(ft.MESSAGE_CLASS), this._message && this._messages.sendClientUpdate(De.createMessageContent(this._message), !1), this._hasStreamEnded = !0);
3487
+ (e = this._elements.bubbleElement) != null && e.classList.contains(ft.MESSAGE_CLASS) && (this._streamType === "text" ? this._messages.textToSpeech && bt.speak(this._message.text || "", this._messages.textToSpeech) : this._streamType === "html" && this._elements && te.apply(this._messages, this._elements.outerContainer), this._elements.bubbleElement.classList.remove(ft.MESSAGE_CLASS), this._message && this._messages.sendClientUpdate(De.createMessageContent(this._message), !1), this._hasStreamEnded = !0);
3484
3488
  }
3485
3489
  }
3486
3490
  }, {
@@ -3526,7 +3530,7 @@ var ft = /*#__PURE__*/function () {
3526
3530
  }]);
3527
3531
  }();
3528
3532
  ft.MESSAGE_CLASS = "streamed-message";
3529
- var be = ft;
3533
+ var ge = ft;
3530
3534
  var $e = /*#__PURE__*/function () {
3531
3535
  function $e() {
3532
3536
  _classCallCheck(this, $e);
@@ -3692,7 +3696,7 @@ function yo(n) {
3692
3696
  i,
3693
3697
  s = !1;
3694
3698
  return function (o) {
3695
- e === void 0 ? (e = o, t = 0, i = -1) : e = xo(e, o);
3699
+ e === void 0 ? (e = o, t = 0, i = -1) : e = So(e, o);
3696
3700
  var a = e.length;
3697
3701
  var l = 0;
3698
3702
  for (; t < a;) {
@@ -3740,7 +3744,7 @@ function Eo(n, e, t) {
3740
3744
  }
3741
3745
  };
3742
3746
  }
3743
- function xo(n, e) {
3747
+ function So(n, e) {
3744
3748
  var t = new Uint8Array(n.length + e.length);
3745
3749
  return t.set(n), t.set(e, n.length), t;
3746
3750
  }
@@ -3752,7 +3756,7 @@ function $s() {
3752
3756
  retry: void 0
3753
3757
  };
3754
3758
  }
3755
- var So = function So(n, e) {
3759
+ var xo = function xo(n, e) {
3756
3760
  var t = {};
3757
3761
  for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && e.indexOf(i) < 0 && (t[i] = n[i]);
3758
3762
  if (n != null && typeof Object.getOwnPropertySymbols == "function") for (var s = 0, i = Object.getOwnPropertySymbols(n); s < i.length; s++) e.indexOf(i[s]) < 0 && Object.prototype.propertyIsEnumerable.call(n, i[s]) && (t[i[s]] = n[i[s]]);
@@ -3770,7 +3774,7 @@ function wo(n, e) {
3770
3774
  a = e.onerror,
3771
3775
  l = e.openWhenHidden,
3772
3776
  c = e.fetch,
3773
- d = So(e, ["signal", "headers", "onopen", "onmessage", "onclose", "onerror", "openWhenHidden", "fetch"]);
3777
+ d = xo(e, ["signal", "headers", "onopen", "onmessage", "onclose", "onerror", "openWhenHidden", "fetch"]);
3774
3778
  return new Promise(function (h, u) {
3775
3779
  var f = Object.assign({}, i);
3776
3780
  f.accept || (f.accept = as);
@@ -3907,13 +3911,13 @@ var A = /*#__PURE__*/function () {
3907
3911
  }
3908
3912
  return _context7.abrupt("return", Te.stream(e, a, i));
3909
3913
  case 17:
3910
- if (!(((y = e.connectSettings) == null ? void 0 : y.url) === ve.URL)) {
3914
+ if (!(((y = e.connectSettings) == null ? void 0 : y.url) === be.URL)) {
3911
3915
  _context7.next = 19;
3912
3916
  break;
3913
3917
  }
3914
- return _context7.abrupt("return", ve.requestStream(i, e.streamHandlers));
3918
+ return _context7.abrupt("return", be.requestStream(i, e.streamHandlers));
3915
3919
  case 19:
3916
- f = new be(i), m = E.fetch.bind(this, e, l, s);
3920
+ f = new ge(i), m = E.fetch.bind(this, e, l, s);
3917
3921
  return _context7.abrupt("return", (wo(((P = e.connectSettings) == null ? void 0 : P.url) || e.url || "", {
3918
3922
  method: ((G = e.connectSettings) == null ? void 0 : G.method) || "POST",
3919
3923
  headers: l,
@@ -4021,12 +4025,12 @@ var A = /*#__PURE__*/function () {
4021
4025
  }, i), !1), i.text) {
4022
4026
  t.onOpen();
4023
4027
  var r = i.text.split("");
4024
- A.populateMessages(r, new be(e), s, "text");
4028
+ A.populateMessages(r, new ge(e), s, "text");
4025
4029
  }
4026
4030
  if (i.html) {
4027
4031
  t.onOpen();
4028
4032
  var _r2 = te.splitHTML(i.html);
4029
- _r2.length === 0 && (_r2 = i.html.split("")), A.populateMessages(_r2, new be(e), s, "html");
4033
+ _r2.length === 0 && (_r2 = i.html.split("")), A.populateMessages(_r2, new ge(e), s, "html");
4030
4034
  }
4031
4035
  }
4032
4036
  // prettier-ignore
@@ -4148,7 +4152,7 @@ var We = /*#__PURE__*/function () {
4148
4152
  }]);
4149
4153
  }();
4150
4154
  We.URL = "deep-chat-demo";
4151
- var ve = We;
4155
+ var be = We;
4152
4156
  var j = /*#__PURE__*/function () {
4153
4157
  function j() {
4154
4158
  _classCallCheck(this, j);
@@ -4156,7 +4160,7 @@ var j = /*#__PURE__*/function () {
4156
4160
  return _createClass(j, null, [{
4157
4161
  key: "setup",
4158
4162
  value: function setup(e) {
4159
- e.connectSettings.url !== ve.URL && (e.permittedErrorPrefixes = ["Connection error", "Error in server message"], e.websocket = "pending");
4163
+ e.connectSettings.url !== be.URL && (e.permittedErrorPrefixes = ["Connection error", "Error in server message"], e.websocket = "pending");
4160
4164
  }
4161
4165
  }, {
4162
4166
  key: "isElementPresentInDOM",
@@ -4303,11 +4307,11 @@ var j = /*#__PURE__*/function () {
4303
4307
  return _context10.abrupt("return", r.newUserMessage.listener(a));
4304
4308
  case 14:
4305
4309
  c = s ? JSON.stringify(a) : a;
4306
- if (!(((h = e.connectSettings) == null ? void 0 : h.url) === ve.URL)) {
4310
+ if (!(((h = e.connectSettings) == null ? void 0 : h.url) === be.URL)) {
4307
4311
  _context10.next = 17;
4308
4312
  break;
4309
4313
  }
4310
- return _context10.abrupt("return", ve.request(e, i));
4314
+ return _context10.abrupt("return", be.request(e, i));
4311
4315
  case 17:
4312
4316
  r.readyState === void 0 || r.readyState !== r.OPEN ? (console.error("Connection is not open"), i.isLastMessageError() || i.addNewErrorMessage("service", "Connection error")) : (r.send(JSON.stringify(c)), e.completionsHandlers.onFinish());
4313
4317
  case 18:
@@ -4341,7 +4345,7 @@ var j = /*#__PURE__*/function () {
4341
4345
  var _i$o;
4342
4346
  var o = s.role || b.AI_ROLE,
4343
4347
  a = i[o];
4344
- 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 be(t), i[o].upsertStreamedMessage(s));
4348
+ 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 ge(t), i[o].upsertStreamedMessage(s));
4345
4349
  } else A.simulate(t, e.streamHandlers, s);
4346
4350
  }
4347
4351
  }]);
@@ -4425,7 +4429,7 @@ var Te = /*#__PURE__*/function () {
4425
4429
  var h, u;
4426
4430
  var s = !0,
4427
4431
  r = !1;
4428
- var o = new be(i),
4432
+ var o = new ge(i),
4429
4433
  a = function a() {
4430
4434
  r || !s || (e.streamHandlers.onOpen(), r = !0);
4431
4435
  },
@@ -4608,11 +4612,11 @@ var T = /*#__PURE__*/function () {
4608
4612
  }
4609
4613
  return _context16.abrupt("return", Te.request(e, o, i));
4610
4614
  case 13:
4611
- if (!(((m = e.connectSettings) == null ? void 0 : m.url) === ve.URL)) {
4615
+ if (!(((m = e.connectSettings) == null ? void 0 : m.url) === be.URL)) {
4612
4616
  _context16.next = 15;
4613
4617
  break;
4614
4618
  }
4615
- return _context16.abrupt("return", ve.request(e, i));
4619
+ return _context16.abrupt("return", be.request(e, i));
4616
4620
  case 15:
4617
4621
  d = !0;
4618
4622
  h = E.fetch.bind(this, e, a, s);
@@ -4926,7 +4930,7 @@ var pt = /*#__PURE__*/function () {
4926
4930
  value: function populateInitialHistory(e) {
4927
4931
  var _this11 = this;
4928
4932
  e.forEach(function (t) {
4929
- le.processHistoryFile(t), _this11._messages.addNewMessage(t, !0);
4933
+ se.processHistoryFile(t), _this11._messages.addNewMessage(t, !0);
4930
4934
  });
4931
4935
  }
4932
4936
  }, {
@@ -4983,7 +4987,7 @@ var pt = /*#__PURE__*/function () {
4983
4987
  while (1) switch (_context23.prev = _context23.next) {
4984
4988
  case 0:
4985
4989
  e.loadHistory && this.loadInitialHistory(e.loadHistory);
4986
- t = e.history || le.processHistory(e);
4990
+ t = e.history || se.processHistory(e);
4987
4991
  t && (this.populateInitialHistory(t), this._index += 1);
4988
4992
  case 3:
4989
4993
  case "end":
@@ -5006,11 +5010,11 @@ var pt = /*#__PURE__*/function () {
5006
5010
  }();
5007
5011
  pt.FAILED_ERROR_MESSAGE = "Failed to load history";
5008
5012
  var Ht = pt;
5009
- var St = /*#__PURE__*/function () {
5010
- function St() {
5011
- _classCallCheck(this, St);
5013
+ var xt = /*#__PURE__*/function () {
5014
+ function xt() {
5015
+ _classCallCheck(this, xt);
5012
5016
  }
5013
- return _createClass(St, null, [{
5017
+ return _createClass(xt, null, [{
5014
5018
  key: "getCharacterLimitMessages",
5015
5019
  value: function getCharacterLimitMessages(e, t) {
5016
5020
  var r;
@@ -5037,7 +5041,7 @@ var St = /*#__PURE__*/function () {
5037
5041
  }, {
5038
5042
  key: "processMessages",
5039
5043
  value: function processMessages(e, t, i) {
5040
- return t !== void 0 ? t > 0 && (e = St.getMaxMessages(e, t)) : e = [e[e.length - 1]], e = JSON.parse(JSON.stringify(e)), i === void 0 ? e : St.getCharacterLimitMessages(e, i);
5044
+ return t !== void 0 ? t > 0 && (e = xt.getMaxMessages(e, t)) : e = [e[e.length - 1]], e = JSON.parse(JSON.stringify(e)), i === void 0 ? e : xt.getCharacterLimitMessages(e, i);
5041
5045
  }
5042
5046
  }]);
5043
5047
  }();
@@ -5055,7 +5059,7 @@ var O = /*#__PURE__*/function () {
5055
5059
  files: t
5056
5060
  };
5057
5061
  if (_typeof(s) == "object") {
5058
- le.processFileConfigConnect(s);
5062
+ se.processFileConfigConnect(s);
5059
5063
  var a = s.files,
5060
5064
  l = s.connect,
5061
5065
  c = s.button;
@@ -5154,7 +5158,7 @@ var tt = /*#__PURE__*/function () {
5154
5158
  var _a$url;
5155
5159
  _classCallCheck(this, tt);
5156
5160
  var s, r, o, a, l;
5157
- this.rawBody = {}, this.validateKeyProperty = !1, this.canSendMessage = tt.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, O.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 && j.setup(this), this.stream = ((l = this.deepChat.connect) == null ? void 0 : l.stream) || le.checkForStream(this.deepChat), e.loadHistory && Ht.addErrorPrefix(this);
5161
+ this.rawBody = {}, this.validateKeyProperty = !1, this.canSendMessage = tt.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, O.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 = be.URL), this.connectSettings.websocket && j.setup(this), this.stream = ((l = this.deepChat.connect) == null ? void 0 : l.stream) || se.checkForStream(this.deepChat), e.loadHistory && Ht.addErrorPrefix(this);
5158
5162
  }
5159
5163
  return _createClass(tt, [{
5160
5164
  key: "verifyKey",
@@ -5279,7 +5283,7 @@ var tt = /*#__PURE__*/function () {
5279
5283
  }
5280
5284
  throw new Error("Request settings have not been set up");
5281
5285
  case 2:
5282
- i = St.processMessages(t.messageToElements.map(function (_ref11) {
5286
+ i = xt.processMessages(t.messageToElements.map(function (_ref11) {
5283
5287
  var _ref12 = _slicedToArray(_ref11, 1),
5284
5288
  s = _ref12[0];
5285
5289
  return s;
@@ -5318,7 +5322,7 @@ var tt = /*#__PURE__*/function () {
5318
5322
  _context29.next = 4;
5319
5323
  break;
5320
5324
  }
5321
- return _context29.abrupt("return", le.handleResponseProperty(e));
5325
+ return _context29.abrupt("return", se.handleResponseProperty(e));
5322
5326
  case 4:
5323
5327
  if (!E.validateResponseFormat(e)) {
5324
5328
  _context29.next = 6;
@@ -5434,19 +5438,19 @@ var ui = /*#__PURE__*/function () {
5434
5438
  }
5435
5439
  }]);
5436
5440
  }();
5437
- var Se = /*#__PURE__*/function (_HTMLElement) {
5441
+ var xe = /*#__PURE__*/function (_HTMLElement) {
5438
5442
  // If this is not working, try using propertyName directly
5439
- function Se() {
5443
+ function xe() {
5440
5444
  var _this14;
5441
- _classCallCheck(this, Se);
5442
- _this14 = _callSuper(this, Se), _this14._waitingToRender_ = !1, _this14._propUpdated_ = !1, Object.keys(Se._attributeToProperty_).forEach(function (e) {
5443
- var t = Se._attributeToProperty_[e];
5445
+ _classCallCheck(this, xe);
5446
+ _this14 = _callSuper(this, xe), _this14._waitingToRender_ = !1, _this14._propUpdated_ = !1, Object.keys(xe._attributeToProperty_).forEach(function (e) {
5447
+ var t = xe._attributeToProperty_[e];
5444
5448
  _this14.constructPropertyAccessors(t), _this14.hasOwnProperty(e) || _this14.constructPropertyAccessors(t, e);
5445
5449
  });
5446
5450
  return _this14;
5447
5451
  }
5448
- _inherits(Se, _HTMLElement);
5449
- return _createClass(Se, [{
5452
+ _inherits(xe, _HTMLElement);
5453
+ return _createClass(xe, [{
5450
5454
  key: "constructPropertyAccessors",
5451
5455
  value:
5452
5456
  // need to be called here as accessors need to be set for the class instance
@@ -5465,8 +5469,8 @@ var Se = /*#__PURE__*/function (_HTMLElement) {
5465
5469
  key: "attributeChangedCallback",
5466
5470
  value: function attributeChangedCallback(e, t, i) {
5467
5471
  if (t === i) return;
5468
- var s = Se._attributes_[e](i),
5469
- r = Se._attributeToProperty_[e];
5472
+ var s = xe._attributes_[e](i),
5473
+ r = xe._attributeToProperty_[e];
5470
5474
  this[r] = s;
5471
5475
  }
5472
5476
  }, {
@@ -5475,12 +5479,12 @@ var Se = /*#__PURE__*/function (_HTMLElement) {
5475
5479
  }], [{
5476
5480
  key: "observedAttributes",
5477
5481
  get: function get() {
5478
- return Object.keys(Se._attributes_) || [];
5482
+ return Object.keys(xe._attributes_) || [];
5479
5483
  }
5480
5484
  }]);
5481
5485
  }(/*#__PURE__*/_wrapNativeSuper(HTMLElement));
5482
- Se._attributes_ = {}, Se._attributeToProperty_ = {};
5483
- var ls = Se;
5486
+ xe._attributes_ = {}, xe._attributeToProperty_ = {};
5487
+ var ls = xe;
5484
5488
  var Co = "<?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",
5485
5489
  Ao = "<?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";
5486
5490
  var ie = /*#__PURE__*/function () {
@@ -6134,7 +6138,7 @@ var Ks = {
6134
6138
  this.streamHandlers.abortStream.abort = function () {
6135
6139
  i.interruptGenerate();
6136
6140
  }, this.streamHandlers.onOpen();
6137
- s = new be(e);
6141
+ s = new ge(e);
6138
6142
  _context36.next = 4;
6139
6143
  return i.generate(t, /*#__PURE__*/function () {
6140
6144
  var _ref13 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee35(r, o) {
@@ -6615,11 +6619,11 @@ var Mo = /*#__PURE__*/function (_Jt2) {
6615
6619
  }]);
6616
6620
  }(Jt);
6617
6621
  var Zt = "data:image/png;base64,";
6618
- var ye = /*#__PURE__*/function () {
6619
- function ye() {
6620
- _classCallCheck(this, ye);
6622
+ var ve = /*#__PURE__*/function () {
6623
+ function ve() {
6624
+ _classCallCheck(this, ve);
6621
6625
  }
6622
- return _createClass(ye, null, [{
6626
+ return _createClass(ve, null, [{
6623
6627
  key: "buildHeaders",
6624
6628
  value: function buildHeaders(e) {
6625
6629
  return {
@@ -6639,7 +6643,7 @@ var ye = /*#__PURE__*/function () {
6639
6643
  return {
6640
6644
  url: "https://api.stability.ai/v1/engines/list",
6641
6645
  method: "GET",
6642
- handleVerificationResult: ye.handleVerificationResult
6646
+ handleVerificationResult: ve.handleVerificationResult
6643
6647
  };
6644
6648
  }
6645
6649
  }]);
@@ -6670,7 +6674,7 @@ var mi = /*#__PURE__*/function (_Oi) {
6670
6674
  }
6671
6675
  }
6672
6676
  };
6673
- _this24 = _callSuper(this, mi, [e, ye.buildKeyVerificationDetails(), ye.buildHeaders, i, s]), _this24.url = "https://api.stability.ai/v1/generation/esrgan-v1-x2plus/image-to-image/upscale", _this24.textInputPlaceholderText = "Describe image changes", _this24.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Stability AI</b></div>\n <div style=\"width: 100%; text-align: center; margin-left: -10px; margin-top: 5px\"><b>Image to Image Upscale</b></div>\n <p>Upload an image to generate a new one with higher resolution.</p>\n <p>Click <a href=\"https://platform.stability.ai/\">here</a> for more info.</p>";
6677
+ _this24 = _callSuper(this, mi, [e, ve.buildKeyVerificationDetails(), ve.buildHeaders, i, s]), _this24.url = "https://api.stability.ai/v1/generation/esrgan-v1-x2plus/image-to-image/upscale", _this24.textInputPlaceholderText = "Describe image changes", _this24.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Stability AI</b></div>\n <div style=\"width: 100%; text-align: center; margin-left: -10px; margin-top: 5px\"><b>Image to Image Upscale</b></div>\n <p>Upload an image to generate a new one with higher resolution.</p>\n <p>Click <a href=\"https://platform.stability.ai/\">here</a> for more info.</p>";
6674
6678
  var r = (o = t == null ? void 0 : t.stabilityAI) == null ? void 0 : o.imageToImageUpscale;
6675
6679
  _typeof(r) == "object" && (r.engine_id && (_this24.url = "https://api.stability.ai/v1/generation/".concat(r.engine_id, "/image-to-image/upscale")), mi.cleanConfig(r), Object.assign(_this24.rawBody, r)), _this24.canSendMessage = mi.canSendFileMessage;
6676
6680
  return _this24;
@@ -6777,7 +6781,7 @@ var gi = /*#__PURE__*/function (_Oi2) {
6777
6781
  }
6778
6782
  }
6779
6783
  };
6780
- _this25 = _callSuper(this, gi, [e, ye.buildKeyVerificationDetails(), ye.buildHeaders, i, s]), _this25.url = "https://api.stability.ai/v1/generation/stable-diffusion-xl-1024-v1-0/image-to-image/masking", _this25._maskSource = "MASK_IMAGE_WHITE", _this25.textInputPlaceholderText = "Describe image changes", _this25.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Stability AI</b></div>\n <div style=\"width: 100%; text-align: center; margin-left: -10px; margin-top: 5px\"><b>Image to Image Masking</b></div>\n <p>Upload an image, its mask image to create a new one based on the changes you have described for the mask area.</p>\n <p>Click <a href=\"https://platform.stability.ai/\">here</a> for more info.</p>";
6784
+ _this25 = _callSuper(this, gi, [e, ve.buildKeyVerificationDetails(), ve.buildHeaders, i, s]), _this25.url = "https://api.stability.ai/v1/generation/stable-diffusion-xl-1024-v1-0/image-to-image/masking", _this25._maskSource = "MASK_IMAGE_WHITE", _this25.textInputPlaceholderText = "Describe image changes", _this25.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Stability AI</b></div>\n <div style=\"width: 100%; text-align: center; margin-left: -10px; margin-top: 5px\"><b>Image to Image Masking</b></div>\n <p>Upload an image, its mask image to create a new one based on the changes you have described for the mask area.</p>\n <p>Click <a href=\"https://platform.stability.ai/\">here</a> for more info.</p>";
6781
6785
  var r = (o = t == null ? void 0 : t.stabilityAI) == null ? void 0 : o.imageToImageMasking;
6782
6786
  _typeof(r) == "object" && (r.engine_id && (_this25.url = "https://api.stability.ai/v1/generation/".concat(r.engine_id, "/image-to-image/masking")), r.weight !== void 0 && r.weight !== null && (_this25._imageWeight = r.weight), r.mask_source !== void 0 && r.mask_source !== null && (_this25._maskSource = r.mask_source), gi.cleanConfig(r), Object.assign(_this25.rawBody, r)), _this25.canSendMessage = gi.canSendFileTextMessage;
6783
6787
  return _this25;
@@ -7146,7 +7150,7 @@ var bi = /*#__PURE__*/function (_Oi3) {
7146
7150
  }
7147
7151
  }
7148
7152
  };
7149
- _this28 = _callSuper(this, bi, [e, ye.buildKeyVerificationDetails(), ye.buildHeaders, i, s]), _this28.url = "https://api.stability.ai/v1/generation/stable-diffusion-v1-6/image-to-image", _this28.textInputPlaceholderText = "Describe image changes", _this28.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Stability AI: Image to Image</b></div>\n <p>Upload an image to create a new one with the changes you have described.</p>\n <p>Click <a href=\"https://platform.stability.ai/\">here</a> for more info.</p>";
7153
+ _this28 = _callSuper(this, bi, [e, ve.buildKeyVerificationDetails(), ve.buildHeaders, i, s]), _this28.url = "https://api.stability.ai/v1/generation/stable-diffusion-v1-6/image-to-image", _this28.textInputPlaceholderText = "Describe image changes", _this28.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Stability AI: Image to Image</b></div>\n <p>Upload an image to create a new one with the changes you have described.</p>\n <p>Click <a href=\"https://platform.stability.ai/\">here</a> for more info.</p>";
7150
7154
  var r = (o = t.stabilityAI) == null ? void 0 : o.imageToImage;
7151
7155
  _typeof(r) == "object" && (r.engine_id && (_this28.url = "https://api.stability.ai/v1/generation/".concat(r.engine_id, "/text-to-image")), r.weight !== void 0 && r.weight !== null && (_this28._imageWeight = r.weight), bi.cleanConfig(r), Object.assign(_this28.rawBody, r)), _this28.canSendMessage = bi.canSendFileTextMessage;
7152
7156
  return _this28;
@@ -7284,7 +7288,7 @@ var vi = /*#__PURE__*/function (_Oi4) {
7284
7288
  var r;
7285
7289
  var t = JSON.parse(JSON.stringify(e.directConnection)),
7286
7290
  i = t.stabilityAI;
7287
- _this29 = _callSuper(this, vi, [e, ye.buildKeyVerificationDetails(), ye.buildHeaders, i]), _this29.url = "https://api.stability.ai/v1/generation/stable-diffusion-v1-6/text-to-image", _this29.textInputPlaceholderText = "Describe an image", _this29.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Stability AI: Text to Image</b></div>\n <p>Insert text to generate an image.</p>\n <p>Click <a href=\"https://platform.stability.ai/\">here</a> for more info.</p>";
7291
+ _this29 = _callSuper(this, vi, [e, ve.buildKeyVerificationDetails(), ve.buildHeaders, i]), _this29.url = "https://api.stability.ai/v1/generation/stable-diffusion-v1-6/text-to-image", _this29.textInputPlaceholderText = "Describe an image", _this29.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Stability AI: Text to Image</b></div>\n <p>Insert text to generate an image.</p>\n <p>Click <a href=\"https://platform.stability.ai/\">here</a> for more info.</p>";
7288
7292
  var s = (r = t.stabilityAI) == null ? void 0 : r.textToImage;
7289
7293
  _typeof(s) == "object" && (s.engine_id && (_this29.url = "https://api.stability.ai/v1/generation/".concat(s.engine_id, "/text-to-image")), s.weight !== void 0 && s.weight !== null && (_this29._imageWeight = s.weight), vi.cleanConfig(s), Object.assign(_this29.rawBody, s)), _this29.canSendMessage = vi.canSendTextMessage;
7290
7294
  return _this29;
@@ -7792,7 +7796,7 @@ var ee = /*#__PURE__*/function () {
7792
7796
  }]);
7793
7797
  }();
7794
7798
  ee.FILES_WITH_TEXT_ERROR = "content with type `text` must have `text` values", ee.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.";
7795
- var Ee = ee;
7799
+ var ye = ee;
7796
7800
  var Oe = /*#__PURE__*/function (_z3) {
7797
7801
  // prettier-ignore
7798
7802
  function Oe(e, t, i, s, r, o) {
@@ -7851,7 +7855,7 @@ var Oe = /*#__PURE__*/function (_z3) {
7851
7855
  key: "processMessage",
7852
7856
  value: function processMessage(e, t) {
7853
7857
  var i = this.totalMessagesMaxCharLength || -1,
7854
- s = St.getCharacterLimitMessages(e, i)[0];
7858
+ s = xt.getCharacterLimitMessages(e, i)[0];
7855
7859
  if (t && t.length > 0) {
7856
7860
  var r = this.filesToolType;
7857
7861
  if (typeof this.filesToolType == "function") {
@@ -7939,7 +7943,7 @@ var Oe = /*#__PURE__*/function (_z3) {
7939
7943
  break;
7940
7944
  }
7941
7945
  _context71.next = 16;
7942
- return Ee.storeFiles(this, e, i, this.urlSegments.storeFiles);
7946
+ return ye.storeFiles(this, e, i, this.urlSegments.storeFiles);
7943
7947
  case 16:
7944
7948
  _context71.t1 = _context71.sent;
7945
7949
  _context71.next = 20;
@@ -8022,7 +8026,7 @@ var Oe = /*#__PURE__*/function (_z3) {
8022
8026
  _context73.next = 6;
8023
8027
  break;
8024
8028
  }
8025
- throw e.error.message.startsWith(Ee.FILES_WITH_TEXT_ERROR) ? Error("Please send text with your file(s)") : e.error.message;
8029
+ throw e.error.message.startsWith(ye.FILES_WITH_TEXT_ERROR) ? Error("Please send text with your file(s)") : e.error.message;
8026
8030
  case 6:
8027
8031
  _context73.next = 8;
8028
8032
  return this.assignThreadAndRun(e);
@@ -8106,7 +8110,7 @@ var Oe = /*#__PURE__*/function (_z3) {
8106
8110
  case 9:
8107
8111
  i = _context75.sent;
8108
8112
  case 10:
8109
- return _context75.abrupt("return", Ee.processAPIMessages(this, i, t, this.urlSegments));
8113
+ return _context75.abrupt("return", ye.processAPIMessages(this, i, t, this.urlSegments));
8110
8114
  case 11:
8111
8115
  case "end":
8112
8116
  return _context75.stop();
@@ -8207,7 +8211,7 @@ var Oe = /*#__PURE__*/function (_z3) {
8207
8211
  _context77.next = 8;
8208
8212
  break;
8209
8213
  }
8210
- throw Error(Ee.FUNCTION_TOOL_RESP_ERROR);
8214
+ throw Error(ye.FUNCTION_TOOL_RESP_ERROR);
8211
8215
  case 8:
8212
8216
  _context77.next = 10;
8213
8217
  return Promise.all(i);
@@ -8219,7 +8223,7 @@ var Oe = /*#__PURE__*/function (_z3) {
8219
8223
  _context77.next = 13;
8220
8224
  break;
8221
8225
  }
8222
- throw Error(Ee.FUNCTION_TOOL_RESP_ERROR);
8226
+ throw Error(ye.FUNCTION_TOOL_RESP_ERROR);
8223
8227
  case 13:
8224
8228
  r = s.map(function (l, c) {
8225
8229
  return {
@@ -8324,7 +8328,7 @@ var Oe = /*#__PURE__*/function (_z3) {
8324
8328
  }
8325
8329
  l = e.content.find(function (d) {
8326
8330
  return !!d.text;
8327
- }) || e.content[0], c = Ee.getFilesAndText.bind(this, this, {
8331
+ }) || e.content[0], c = ye.getFilesAndText.bind(this, this, {
8328
8332
  role: "assistant",
8329
8333
  content: e.content
8330
8334
  }, this.urlSegments, l);
@@ -8348,7 +8352,7 @@ var Oe = /*#__PURE__*/function (_z3) {
8348
8352
  break;
8349
8353
  }
8350
8354
  _context79.next = 11;
8351
- return Ee.processStreamMessages(this, e.delta.content, this.urlSegments);
8355
+ return ye.processStreamMessages(this, e.delta.content, this.urlSegments);
8352
8356
  case 11:
8353
8357
  _l = _context79.sent;
8354
8358
  return _context79.abrupt("return", {
@@ -8625,7 +8629,7 @@ var Ls = /*#__PURE__*/function () {
8625
8629
  }]);
8626
8630
  }();
8627
8631
  Ls.URL_DETAILS_ERROR_MESSAGE = "Please define the Azure URL Details. [More Information](https://deepchat.dev/docs/directConnection/Azure)";
8628
- var oe = Ls;
8632
+ var ae = Ls;
8629
8633
  var mt = /*#__PURE__*/function (_yi2) {
8630
8634
  function mt(e) {
8631
8635
  var _v$headers;
@@ -8648,17 +8652,17 @@ var mt = /*#__PURE__*/function (_yi2) {
8648
8652
  getFilesPrefix: "".concat(o, "files/"),
8649
8653
  getFilesPostfix: "/content".concat(a)
8650
8654
  };
8651
- if (_this36 = _callSuper(this, mt, [e, s == null ? void 0 : s.assistant, l, oe.buildKeyVerificationDetails(r), oe.buildHeaders, i]), _this36.permittedErrorPrefixes = [oe.URL_DETAILS_ERROR_MESSAGE], _this36.insertKeyPlaceholderText = "Azure OpenAI API Key", _this36.keyHelpUrl = "https://learn.microsoft.com/en-us/answers/questions/1193991/how-to-get-the-value-of-openai-api-key", _this36.isTextInputDisabled = !1, _typeof(s == null ? void 0 : s.assistant) == "object") {
8655
+ if (_this36 = _callSuper(this, mt, [e, s == null ? void 0 : s.assistant, l, ae.buildKeyVerificationDetails(r), ae.buildHeaders, i]), _this36.permittedErrorPrefixes = [ae.URL_DETAILS_ERROR_MESSAGE], _this36.insertKeyPlaceholderText = "Azure OpenAI API Key", _this36.keyHelpUrl = "https://learn.microsoft.com/en-us/answers/questions/1193991/how-to-get-the-value-of-openai-api-key", _this36.isTextInputDisabled = !1, _typeof(s == null ? void 0 : s.assistant) == "object") {
8652
8656
  var _ref23 = (p = (m = (f = e.directConnection) == null ? void 0 : f.azure) == null ? void 0 : m.openAI) == null ? void 0 : p.assistant,
8653
8657
  y = _ref23.function_handler,
8654
8658
  P = _ref23.files_tool_type;
8655
8659
  y && (_this36.functionHandler = y), P && (_this36.filesToolType = P);
8656
8660
  }
8657
- oe.validateURLDetails(r) ? (_v$headers = (v = _this36.connectSettings).headers) !== null && _v$headers !== void 0 ? _v$headers : v.headers = {} : (_this36.isTextInputDisabled = !0, _this36.canSendMessage = function () {
8661
+ ae.validateURLDetails(r) ? (_v$headers = (v = _this36.connectSettings).headers) !== null && _v$headers !== void 0 ? _v$headers : v.headers = {} : (_this36.isTextInputDisabled = !0, _this36.canSendMessage = function () {
8658
8662
  return !1;
8659
8663
  }, setTimeout(function () {
8660
8664
  e.addMessage({
8661
- error: oe.URL_DETAILS_ERROR_MESSAGE
8665
+ error: ae.URL_DETAILS_ERROR_MESSAGE
8662
8666
  });
8663
8667
  }));
8664
8668
  return _assertThisInitialized(_this36);
@@ -8952,11 +8956,11 @@ var de = /*#__PURE__*/function (_z6) {
8952
8956
  }(z);
8953
8957
  de.AUDIO_TRANSCRIPTIONS_URL = "https://api.openai.com/v1/audio/transcriptions", de.AUDIO_TRANSLATIONS_URL = "https://api.openai.com/v1/audio/translations", de.DEFAULT_MODEL = "whisper-1";
8954
8958
  var fs = de;
8955
- var ae = /*#__PURE__*/function () {
8956
- function ae() {
8957
- _classCallCheck(this, ae);
8959
+ var le = /*#__PURE__*/function () {
8960
+ function le() {
8961
+ _classCallCheck(this, le);
8958
8962
  }
8959
- return _createClass(ae, null, [{
8963
+ return _createClass(le, null, [{
8960
8964
  key: "buildTextToSpeechHeaders",
8961
8965
  value: function buildTextToSpeechHeaders(e, t) {
8962
8966
  return {
@@ -8990,7 +8994,7 @@ var ae = /*#__PURE__*/function () {
8990
8994
  "Ocp-Apim-Subscription-Key": "".concat(t)
8991
8995
  };
8992
8996
  },
8993
- handleVerificationResult: ae.handleSpeechVerificationResult
8997
+ handleVerificationResult: le.handleSpeechVerificationResult
8994
8998
  };
8995
8999
  }
8996
9000
  }, {
@@ -9019,7 +9023,7 @@ var ae = /*#__PURE__*/function () {
9019
9023
  "Ocp-Apim-Subscription-Key": "".concat(t)
9020
9024
  };
9021
9025
  },
9022
- handleVerificationResult: ae.handleLanguageVerificationResult
9026
+ handleVerificationResult: le.handleLanguageVerificationResult
9023
9027
  };
9024
9028
  }
9025
9029
  // prettier-ignore
@@ -9037,9 +9041,9 @@ var ae = /*#__PURE__*/function () {
9037
9041
  url: "https://api.cognitive.microsofttranslator.com/translate?api-version=3.0&to=es",
9038
9042
  method: "POST",
9039
9043
  createHeaders: function createHeaders(t) {
9040
- return ae.buildTranslationHeaders(e, t);
9044
+ return le.buildTranslationHeaders(e, t);
9041
9045
  },
9042
- handleVerificationResult: ae.handleTranslationVerificationResult
9046
+ handleVerificationResult: le.handleTranslationVerificationResult
9043
9047
  };
9044
9048
  }
9045
9049
  }, {
@@ -9058,7 +9062,7 @@ var Uo = /*#__PURE__*/function (_z7) {
9058
9062
  function Uo(e, t, i, s, r) {
9059
9063
  var _this39;
9060
9064
  _classCallCheck(this, Uo);
9061
- _this39 = _callSuper(this, Uo, [e, ae.buildLanguageKeyVerificationDetails(i), t, s, r]), _this39.insertKeyPlaceholderText = "Azure Language Subscription Key", _this39.keyHelpUrl =
9065
+ _this39 = _callSuper(this, Uo, [e, le.buildLanguageKeyVerificationDetails(i), t, s, r]), _this39.insertKeyPlaceholderText = "Azure Language Subscription Key", _this39.keyHelpUrl =
9062
9066
  // eslint-disable-next-line max-len
9063
9067
  "https://learn.microsoft.com/en-us/azure/api-management/api-management-subscriptions#create-and-manage-subscriptions-in-azure-portal", _this39.permittedErrorPrefixes = ["Access"];
9064
9068
  return _this39;
@@ -9074,7 +9078,7 @@ var Dt = /*#__PURE__*/function (_Uo) {
9074
9078
  var s, r, o, a;
9075
9079
  var t = (r = (s = e.directConnection) == null ? void 0 : s.azure) == null ? void 0 : r.summarization,
9076
9080
  i = (o = e.directConnection) == null ? void 0 : o.azure;
9077
- _this40 = _callSuper(this, Dt, [e, ae.buildSummarizationHeader, t.endpoint, i]), _this40.permittedErrorPrefixes = [Dt.ENDPOINT_ERROR_MESSAGE], _this40.url = "", _this40.textInputPlaceholderText = "Insert text to summarize", _this40.isTextInputDisabled = !1, t.endpoint ? ((_a$language = (a = _this40.rawBody).language) !== null && _a$language !== void 0 ? _a$language : a.language = "en", Object.assign(_this40.rawBody, t), _this40.url = "".concat(t.endpoint, "/language/analyze-text/jobs?api-version=2022-10-01-preview")) : (_this40.isTextInputDisabled = !0, _this40.canSendMessage = function () {
9081
+ _this40 = _callSuper(this, Dt, [e, le.buildSummarizationHeader, t.endpoint, i]), _this40.permittedErrorPrefixes = [Dt.ENDPOINT_ERROR_MESSAGE], _this40.url = "", _this40.textInputPlaceholderText = "Insert text to summarize", _this40.isTextInputDisabled = !1, t.endpoint ? ((_a$language = (a = _this40.rawBody).language) !== null && _a$language !== void 0 ? _a$language : a.language = "en", Object.assign(_this40.rawBody, t), _this40.url = "".concat(t.endpoint, "/language/analyze-text/jobs?api-version=2022-10-01-preview")) : (_this40.isTextInputDisabled = !0, _this40.canSendMessage = function () {
9078
9082
  return !1;
9079
9083
  }, setTimeout(function () {
9080
9084
  e.addMessage({
@@ -9423,7 +9427,7 @@ var _n = /*#__PURE__*/function (_z9) {
9423
9427
  function _n(e, t, i, s, r) {
9424
9428
  var _this42;
9425
9429
  _classCallCheck(this, _n);
9426
- _this42 = _callSuper(this, _n, [e, ae.buildSpeechKeyVerificationDetails(i), t, s, r]), _this42.insertKeyPlaceholderText = "Azure Speech Subscription Key", _this42.keyHelpUrl =
9430
+ _this42 = _callSuper(this, _n, [e, le.buildSpeechKeyVerificationDetails(i), t, s, r]), _this42.insertKeyPlaceholderText = "Azure Speech Subscription Key", _this42.keyHelpUrl =
9427
9431
  // eslint-disable-next-line max-len
9428
9432
  "https://learn.microsoft.com/en-us/azure/api-management/api-management-subscriptions#create-and-manage-subscriptions-in-azure-portal";
9429
9433
  return _this42;
@@ -9440,7 +9444,7 @@ var Ke = /*#__PURE__*/function (_n2) {
9440
9444
  var s, r, o, a, l, c;
9441
9445
  var t = (r = (s = e.directConnection) == null ? void 0 : s.azure) == null ? void 0 : r.textToSpeech,
9442
9446
  i = (o = e.directConnection) == null ? void 0 : o.azure;
9443
- _this43 = _callSuper(this, Ke, [e, ae.buildTextToSpeechHeaders.bind({}, (t == null ? void 0 : t.outputFormat) || "audio-16khz-128kbitrate-mono-mp3"), t.region, i]), _this43.permittedErrorPrefixes = [Ke.REGION_ERROR_MESSAGE], _this43.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(Ke.HELP_LINK, "\">here</a> for more info.\n </p>"), _this43.isTextInputDisabled = !1, _this43.url = "", t.region ? (Object.assign(_this43.rawBody, t), (_a$lang = (a = _this43.rawBody).lang) !== null && _a$lang !== void 0 ? _a$lang : a.lang = "en-US", (_l$name = (l = _this43.rawBody).name) !== null && _l$name !== void 0 ? _l$name : l.name = "en-US-JennyNeural", (_c$gender = (c = _this43.rawBody).gender) !== null && _c$gender !== void 0 ? _c$gender : c.gender = "Female", _this43.url = "https://".concat(t.region, ".tts.speech.microsoft.com/cognitiveservices/v1")) : (_this43.isTextInputDisabled = !0, _this43.canSendMessage = function () {
9447
+ _this43 = _callSuper(this, Ke, [e, le.buildTextToSpeechHeaders.bind({}, (t == null ? void 0 : t.outputFormat) || "audio-16khz-128kbitrate-mono-mp3"), t.region, i]), _this43.permittedErrorPrefixes = [Ke.REGION_ERROR_MESSAGE], _this43.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(Ke.HELP_LINK, "\">here</a> for more info.\n </p>"), _this43.isTextInputDisabled = !1, _this43.url = "", t.region ? (Object.assign(_this43.rawBody, t), (_a$lang = (a = _this43.rawBody).lang) !== null && _a$lang !== void 0 ? _a$lang : a.lang = "en-US", (_l$name = (l = _this43.rawBody).name) !== null && _l$name !== void 0 ? _l$name : l.name = "en-US-JennyNeural", (_c$gender = (c = _this43.rawBody).gender) !== null && _c$gender !== void 0 ? _c$gender : c.gender = "Female", _this43.url = "https://".concat(t.region, ".tts.speech.microsoft.com/cognitiveservices/v1")) : (_this43.isTextInputDisabled = !0, _this43.canSendMessage = function () {
9444
9448
  return !1;
9445
9449
  }, setTimeout(function () {
9446
9450
  e.addMessage({
@@ -9534,7 +9538,7 @@ var Ne = /*#__PURE__*/function (_n3) {
9534
9538
  }
9535
9539
  }
9536
9540
  };
9537
- if (_this44 = _callSuper(this, Ne, [e, ae.buildSpeechToTextHeaders, t.region, i, s]), _this44.permittedErrorPrefixes = [Ne.REGION_ERROR_MESSAGE], _this44.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(Ne.HELP_LINK, "\">here</a> for more info.\n </p>"), _this44.url = "", _this44.isTextInputDisabled = !0, _this44.textInputPlaceholderText = "Upload an audio file", !t.region) _this44.isTextInputDisabled = !0, _this44.canSendMessage = function () {
9541
+ if (_this44 = _callSuper(this, Ne, [e, le.buildSpeechToTextHeaders, t.region, i, s]), _this44.permittedErrorPrefixes = [Ne.REGION_ERROR_MESSAGE], _this44.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(Ne.HELP_LINK, "\">here</a> for more info.\n </p>"), _this44.url = "", _this44.isTextInputDisabled = !0, _this44.textInputPlaceholderText = "Upload an audio file", !t.region) _this44.isTextInputDisabled = !0, _this44.canSendMessage = function () {
9538
9542
  return !1;
9539
9543
  }, setTimeout(function () {
9540
9544
  e.addMessage({
@@ -9628,7 +9632,7 @@ var jo = /*#__PURE__*/function (_z10) {
9628
9632
  var s, r, o;
9629
9633
  var t = (r = (s = e.directConnection) == null ? void 0 : s.azure) == null ? void 0 : r.translation,
9630
9634
  i = (o = e.directConnection) == null ? void 0 : o.azure;
9631
- _this45 = _callSuper(this, jo, [e, ae.buildTranslationKeyVerificationDetails(t.region), ae.buildTranslationHeaders.bind({}, t == null ? void 0 : t.region), i]), _this45.insertKeyPlaceholderText = "Azure Translate Subscription Key", _this45.keyHelpUrl =
9635
+ _this45 = _callSuper(this, jo, [e, le.buildTranslationKeyVerificationDetails(t.region), le.buildTranslationHeaders.bind({}, t == null ? void 0 : t.region), i]), _this45.insertKeyPlaceholderText = "Azure Translate Subscription Key", _this45.keyHelpUrl =
9632
9636
  // eslint-disable-next-line max-len
9633
9637
  "https://learn.microsoft.com/en-us/azure/api-management/api-management-subscriptions#create-and-manage-subscriptions-in-azure-portal", _this45.url = "", _this45.url = "https://api.cognitive.microsofttranslator.com/translate?api-version=3.0&to=".concat(t.language || "es");
9634
9638
  return _this45;
@@ -9734,7 +9738,7 @@ var vt = /*#__PURE__*/function (_z11) {
9734
9738
  function preprocessBody(e, t) {
9735
9739
  var _i$max_tokens;
9736
9740
  var i = JSON.parse(JSON.stringify(e)),
9737
- s = St.getCharacterLimitMessages(t, this.totalMessagesMaxCharLength ? this.totalMessagesMaxCharLength - this._systemMessage.content.length : -1).map(function (r) {
9741
+ s = xt.getCharacterLimitMessages(t, this.totalMessagesMaxCharLength ? this.totalMessagesMaxCharLength - this._systemMessage.content.length : -1).map(function (r) {
9738
9742
  return {
9739
9743
  content: vt.getContent(r),
9740
9744
  role: r.role === b.USER_ROLE ? "user" : "assistant"
@@ -9985,16 +9989,16 @@ var As = /*#__PURE__*/function (_vt) {
9985
9989
  i = t.azure,
9986
9990
  s = ((a = (o = t.azure) == null ? void 0 : o.openAI) == null ? void 0 : a.urlDetails) || {},
9987
9991
  r = (c = (l = t.azure) == null ? void 0 : l.openAI) == null ? void 0 : c.chat;
9988
- if (_this48 = _callSuper(this, As, [e, oe.buildKeyVerificationDetails(s), oe.buildHeaders, i, r]), _this48.permittedErrorPrefixes = [oe.URL_DETAILS_ERROR_MESSAGE], _this48.isTextInputDisabled = !1, _typeof(r) == "object") {
9992
+ if (_this48 = _callSuper(this, As, [e, ae.buildKeyVerificationDetails(s), ae.buildHeaders, i, r]), _this48.permittedErrorPrefixes = [ae.URL_DETAILS_ERROR_MESSAGE], _this48.isTextInputDisabled = !1, _typeof(r) == "object") {
9989
9993
  var _ref25 = (u = (h = (d = e.directConnection) == null ? void 0 : d.azure) == null ? void 0 : h.openAI) == null ? void 0 : u.chat,
9990
9994
  f = _ref25.function_handler;
9991
9995
  f && (_this48._functionHandler = f);
9992
9996
  }
9993
- oe.validateURLDetails(s) ? _this48.url = As.buildURL(s) : (_this48.isTextInputDisabled = !0, _this48.canSendMessage = function () {
9997
+ ae.validateURLDetails(s) ? _this48.url = As.buildURL(s) : (_this48.isTextInputDisabled = !0, _this48.canSendMessage = function () {
9994
9998
  return !1;
9995
9999
  }, setTimeout(function () {
9996
10000
  e.addMessage({
9997
- error: oe.URL_DETAILS_ERROR_MESSAGE
10001
+ error: ae.URL_DETAILS_ERROR_MESSAGE
9998
10002
  });
9999
10003
  }));
10000
10004
  return _assertThisInitialized(_this48);
@@ -10245,11 +10249,11 @@ var Ho = /*#__PURE__*/function (_Ts3) {
10245
10249
  }()
10246
10250
  }]);
10247
10251
  }(Ts);
10248
- var xi = /*#__PURE__*/function () {
10249
- function xi() {
10250
- _classCallCheck(this, xi);
10252
+ var Si = /*#__PURE__*/function () {
10253
+ function Si() {
10254
+ _classCallCheck(this, Si);
10251
10255
  }
10252
- return _createClass(xi, null, [{
10256
+ return _createClass(Si, null, [{
10253
10257
  key: "buildHeaders",
10254
10258
  value: function buildHeaders(e) {
10255
10259
  return {
@@ -10271,7 +10275,7 @@ var xi = /*#__PURE__*/function () {
10271
10275
  return {
10272
10276
  url: "https://api.mistral.ai/v1/models",
10273
10277
  method: "GET",
10274
- handleVerificationResult: xi.handleVerificationResult
10278
+ handleVerificationResult: Si.handleVerificationResult
10275
10279
  };
10276
10280
  }
10277
10281
  }]);
@@ -10283,7 +10287,7 @@ var qo = /*#__PURE__*/function (_z13) {
10283
10287
  _classCallCheck(this, qo);
10284
10288
  var s;
10285
10289
  var i = JSON.parse(JSON.stringify(e.directConnection)).mistral;
10286
- _this51 = _callSuper(this, qo, [e, xi.buildKeyVerificationDetails(), xi.buildHeaders, i]), _this51.insertKeyPlaceholderText = "Mistral API Key", _this51.keyHelpUrl = "https://console.mistral.ai/api-keys/", _this51.url = "https://api.mistral.ai/v1/chat/completions", _this51.permittedErrorPrefixes = ["invalid"], i && (_this51.cleanConfig(i), Object.assign(_this51.rawBody, i)), (_this51$maxMessages = _this51.maxMessages) !== null && _this51$maxMessages !== void 0 ? _this51$maxMessages : _this51.maxMessages = -1, (_s$model = (s = _this51.rawBody).model) !== null && _s$model !== void 0 ? _s$model : s.model = "open-mistral-7b";
10290
+ _this51 = _callSuper(this, qo, [e, Si.buildKeyVerificationDetails(), Si.buildHeaders, i]), _this51.insertKeyPlaceholderText = "Mistral API Key", _this51.keyHelpUrl = "https://console.mistral.ai/api-keys/", _this51.url = "https://api.mistral.ai/v1/chat/completions", _this51.permittedErrorPrefixes = ["invalid"], i && (_this51.cleanConfig(i), Object.assign(_this51.rawBody, i)), (_this51$maxMessages = _this51.maxMessages) !== null && _this51$maxMessages !== void 0 ? _this51$maxMessages : _this51.maxMessages = -1, (_s$model = (s = _this51.rawBody).model) !== null && _s$model !== void 0 ? _s$model : s.model = "open-mistral-7b";
10287
10291
  return _this51;
10288
10292
  }
10289
10293
  _inherits(qo, _z13);
@@ -10423,7 +10427,7 @@ Ps.attibutes = {
10423
10427
  }
10424
10428
  };
10425
10429
  var vs = Ps;
10426
- function S(n) {
10430
+ function x(n) {
10427
10431
  return function (e, t) {
10428
10432
  Object.defineProperty(e, t, {});
10429
10433
  var i = e.constructor,
@@ -10431,21 +10435,21 @@ function S(n) {
10431
10435
  i._attributes_[s] = vs.attibutes[n], i._attributeToProperty_[s] = t;
10432
10436
  };
10433
10437
  }
10434
- var Si = /*#__PURE__*/function () {
10435
- function Si(e, t, i) {
10436
- _classCallCheck(this, Si);
10438
+ var xi = /*#__PURE__*/function () {
10439
+ function xi(e, t, i) {
10440
+ _classCallCheck(this, xi);
10437
10441
  this._isDisplayed = !1, e ? (this._elementRef = this.createIntroPanelWithChild(e, i), this._isDisplayed = !0) : t && (this._elementRef = this.createInternalIntroPanel(t, i), this._isDisplayed = !0);
10438
10442
  }
10439
- return _createClass(Si, [{
10443
+ return _createClass(xi, [{
10440
10444
  key: "createIntroPanelWithChild",
10441
10445
  value: function createIntroPanelWithChild(e, t) {
10442
- var i = Si.createIntroPanel(t);
10446
+ var i = xi.createIntroPanel(t);
10443
10447
  return e.style.display === "none" && (e.style.display = "block"), i.appendChild(e), i;
10444
10448
  }
10445
10449
  }, {
10446
10450
  key: "createInternalIntroPanel",
10447
10451
  value: function createInternalIntroPanel(e, t) {
10448
- var i = Si.createIntroPanel(t);
10452
+ var i = xi.createIntroPanel(t);
10449
10453
  return i.id = "internal-intro-panel", i.innerHTML = e, i;
10450
10454
  }
10451
10455
  }, {
@@ -10521,7 +10525,7 @@ var Le = /*#__PURE__*/function () {
10521
10525
  key: "createAudioElement",
10522
10526
  value: function createAudioElement(e, t) {
10523
10527
  var i = document.createElement("audio");
10524
- return i.src = e.src, i.classList.add("audio-player"), i.controls = !0, xt.IS_SAFARI && (i.classList.add("audio-player-safari"), i.classList.add(t === b.USER_ROLE ? "audio-player-safari-right" : "audio-player-safari-left")), i;
10528
+ return i.src = e.src, i.classList.add("audio-player"), i.controls = !0, St.IS_SAFARI && (i.classList.add("audio-player-safari"), i.classList.add(t === b.USER_ROLE ? "audio-player-safari-right" : "audio-player-safari-left")), i;
10525
10529
  }
10526
10530
  }, {
10527
10531
  key: "addNewAudioMessage",
@@ -10559,16 +10563,16 @@ var Le = /*#__PURE__*/function () {
10559
10563
  }
10560
10564
  }]);
10561
10565
  }();
10562
- var me = /*#__PURE__*/function (_De) {
10563
- function me(e, t, i) {
10566
+ var Ee = /*#__PURE__*/function (_De) {
10567
+ function Ee(e, t, i) {
10564
10568
  var _this52;
10565
- _classCallCheck(this, me);
10569
+ _classCallCheck(this, Ee);
10566
10570
  var a, l;
10567
- _this52 = _callSuper(this, me, [e]);
10571
+ _this52 = _callSuper(this, Ee, [e]);
10568
10572
  var s = t.permittedErrorPrefixes,
10569
10573
  r = t.introPanelMarkUp,
10570
10574
  o = t.demo;
10571
- _this52._errorMessageOverrides = (a = e.errorMessages) == null ? void 0 : a.overrides, _this52._onClearMessages = hi.onClearMessages.bind(_this52, e), _this52._onError = hi.onError.bind(_this52, e), _this52._displayLoadingMessage = me.getDisplayLoadingMessage(e, t), _this52._permittedErrorPrefixes = s, _this52.addSetupMessageIfNeeded(e, t) || _this52.populateIntroPanel(i, r, e.introPanelStyle), _this52.addIntroductoryMessages(e, t), new Ht(e, _this52, t), _this52._displayServiceErrorMessages = (l = e.errorMessages) == null ? void 0 : l.displayServiceErrorMessages, e.getMessages = function () {
10575
+ _this52._errorMessageOverrides = (a = e.errorMessages) == null ? void 0 : a.overrides, _this52._onClearMessages = hi.onClearMessages.bind(_this52, e), _this52._onError = hi.onError.bind(_this52, e), _this52._displayLoadingMessage = Ee.getDisplayLoadingMessage(e, t), _this52._permittedErrorPrefixes = s, _this52.addSetupMessageIfNeeded(e, t) || _this52.populateIntroPanel(i, r, e.introPanelStyle), _this52.addIntroductoryMessages(e, t), new Ht(e, _this52, t), _this52._displayServiceErrorMessages = (l = e.errorMessages) == null ? void 0 : l.displayServiceErrorMessages, e.getMessages = function () {
10572
10576
  return JSON.parse(JSON.stringify(_this52.messageToElements.map(function (_ref26) {
10573
10577
  var _ref27 = _slicedToArray(_ref26, 1),
10574
10578
  c = _ref27[0];
@@ -10583,8 +10587,8 @@ var me = /*#__PURE__*/function (_De) {
10583
10587
  });
10584
10588
  return _this52;
10585
10589
  }
10586
- _inherits(me, _De);
10587
- return _createClass(me, [{
10590
+ _inherits(Ee, _De);
10591
+ return _createClass(Ee, [{
10588
10592
  key: "prepareDemo",
10589
10593
  value: function prepareDemo(e) {
10590
10594
  _typeof(e) == "object" && (e.response && (this.customDemoResponse = e.response), e.displayErrors && (e.displayErrors["default"] && this.addNewErrorMessage("", ""), e.displayErrors.service && this.addNewErrorMessage("service", ""), e.displayErrors.speechToText && this.addNewErrorMessage("speechToText", "")), e.displayLoadingBubble && this.addLoadingMessage());
@@ -10637,7 +10641,7 @@ var me = /*#__PURE__*/function (_De) {
10637
10641
  value: function addNewMessage(e) {
10638
10642
  var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
10639
10643
  var i = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
10640
- var s = me.createMessageContent(e),
10644
+ var s = Ee.createMessageContent(e),
10641
10645
  r = {
10642
10646
  status: e.overwrite
10643
10647
  };
@@ -10669,7 +10673,7 @@ var me = /*#__PURE__*/function (_De) {
10669
10673
  value: function removeMessageOnError() {
10670
10674
  var e = this.messageElementRefs[this.messageElementRefs.length - 1],
10671
10675
  t = e == null ? void 0 : e.bubbleElement;
10672
- (t != null && t.classList.contains(be.MESSAGE_CLASS) && t.textContent === "" || me.isTemporaryElement(e)) && this.removeLastMessage();
10676
+ (t != null && t.classList.contains(ge.MESSAGE_CLASS) && t.textContent === "" || Ee.isTemporaryElement(e)) && this.removeLastMessage();
10673
10677
  }
10674
10678
  // prettier-ignore
10675
10679
  }, {
@@ -10691,13 +10695,13 @@ var me = /*#__PURE__*/function (_De) {
10691
10695
  key: "getPermittedMessage",
10692
10696
  value: function getPermittedMessage(e) {
10693
10697
  if (e) {
10694
- var t = me.extractErrorMessages(e);
10698
+ var t = Ee.extractErrorMessages(e);
10695
10699
  for (var _i13 = 0; _i13 < t.length; _i13 += 1) {
10696
10700
  var s = t[_i13];
10697
10701
  if (typeof s == "string") {
10698
10702
  if (this._displayServiceErrorMessages) return s;
10699
10703
  if (this._permittedErrorPrefixes) {
10700
- var r = me.checkPermittedErrorPrefixes(this._permittedErrorPrefixes, s);
10704
+ var r = Ee.checkPermittedErrorPrefixes(this._permittedErrorPrefixes, s);
10701
10705
  if (r) return r;
10702
10706
  }
10703
10707
  }
@@ -10730,7 +10734,7 @@ var me = /*#__PURE__*/function (_De) {
10730
10734
  }, {
10731
10735
  key: "populateIntroPanel",
10732
10736
  value: function populateIntroPanel(e, t, i) {
10733
- (e || t) && (this._introPanel = new Si(e, t, i), this._introPanel._elementRef && (te.apply(this, this._introPanel._elementRef), this.elementRef.appendChild(this._introPanel._elementRef)));
10737
+ (e || t) && (this._introPanel = new xi(e, t, i), this._introPanel._elementRef && (te.apply(this, this._introPanel._elementRef), this.elementRef.appendChild(this._introPanel._elementRef)));
10734
10738
  }
10735
10739
  }, {
10736
10740
  key: "addMultipleFiles",
@@ -10777,25 +10781,21 @@ var me = /*#__PURE__*/function (_De) {
10777
10781
  // WORK - update all message classes to use deep-chat prefix
10778
10782
  function clearMessages(e, t) {
10779
10783
  var _this$messageToElemen;
10780
- var o, a;
10781
- var i = [],
10782
- s = [];
10783
- this.messageElementRefs.forEach(function (l) {
10784
- me.isActiveElement(l.bubbleElement.classList) ? i.push(l) : l.outerContainer.remove();
10785
- }), this.textElementsToText.forEach(function (l) {
10786
- var c = l[0].bubbleElement.classList;
10787
- me.isActiveElement(c) && s.push(l);
10788
- }), Array.from(this.elementRef.children).forEach(function (l) {
10789
- var d;
10790
- var c = (d = l.children[0]) == null ? void 0 : d.children[0];
10791
- c != null && c.classList.contains("error-message-text") && l.remove();
10784
+ var r, o;
10785
+ var i = [];
10786
+ this.messageElementRefs.forEach(function (a) {
10787
+ Ee.isActiveElement(a.bubbleElement.classList) ? i.push(a) : a.outerContainer.remove();
10788
+ }), Array.from(this.elementRef.children).forEach(function (a) {
10789
+ var c;
10790
+ var l = (c = a.children[0]) == null ? void 0 : c.children[0];
10791
+ l != null && l.classList.contains("error-message-text") && a.remove();
10792
10792
  }), this.messageElementRefs = i;
10793
- var r = this.messageToElements.filter(function (l) {
10794
- return l[0].text !== void 0 || l[0].html !== void 0 ? l[1].find(function (c) {
10795
- return me.isActiveElement(c.bubbleElement.classList);
10793
+ var s = this.messageToElements.filter(function (a) {
10794
+ return a[0].text !== void 0 || a[0].html !== void 0 ? a[1].find(function (l) {
10795
+ return Ee.isActiveElement(l.bubbleElement.classList);
10796
10796
  }) : !1;
10797
10797
  });
10798
- (_this$messageToElemen = this.messageToElements).splice.apply(_this$messageToElemen, [0, this.messageToElements.length].concat(_toConsumableArray(r))), t !== !1 && ((o = this._introPanel) != null && o._elementRef && this._introPanel.display(), this.addIntroductoryMessages()), this.textElementsToText = s, (a = this._onClearMessages) == null || a.call(this), delete e.sessionId;
10798
+ (_this$messageToElemen = this.messageToElements).splice.apply(_this$messageToElemen, [0, this.messageToElements.length].concat(_toConsumableArray(s))), t !== !1 && ((r = this._introPanel) != null && r._elementRef && this._introPanel.display(), this.addIntroductoryMessages()), (o = this._onClearMessages) == null || o.call(this), delete e.sessionId;
10799
10799
  }
10800
10800
  }], [{
10801
10801
  key: "getDisplayLoadingMessage",
@@ -10816,7 +10816,7 @@ var me = /*#__PURE__*/function (_De) {
10816
10816
  }, {
10817
10817
  key: "isActiveElement",
10818
10818
  value: function isActiveElement(e) {
10819
- return e.contains(Ae.BUBBLE_CLASS) || e.contains(Ye.CLASS) || e.contains(be.MESSAGE_CLASS);
10819
+ return e.contains(Ae.BUBBLE_CLASS) || e.contains(Ye.CLASS) || e.contains(ge.MESSAGE_CLASS);
10820
10820
  }
10821
10821
  }]);
10822
10822
  }(De);
@@ -11515,11 +11515,11 @@ Object.defineProperty(Fi, "__esModule", {
11515
11515
  value: !0
11516
11516
  });
11517
11517
  Fi.EventListeners = void 0;
11518
- var re = /*#__PURE__*/function () {
11519
- function re() {
11520
- _classCallCheck(this, re);
11518
+ var oe = /*#__PURE__*/function () {
11519
+ function oe() {
11520
+ _classCallCheck(this, oe);
11521
11521
  }
11522
- return _createClass(re, null, [{
11522
+ return _createClass(oe, null, [{
11523
11523
  key: "getElementIfFocusedOnAvailable",
11524
11524
  value: function getElementIfFocusedOnAvailable(e, t) {
11525
11525
  return Array.isArray(e) ? e.find(function (i) {
@@ -11530,14 +11530,14 @@ var re = /*#__PURE__*/function () {
11530
11530
  key: "keyDownWindow",
11531
11531
  value: function keyDownWindow(e) {
11532
11532
  var _this58 = this;
11533
- e.element && re.getElementIfFocusedOnAvailable(e.element, document.activeElement) && (re.KEY_DOWN_TIMEOUT !== null && clearTimeout(re.KEY_DOWN_TIMEOUT), re.KEY_DOWN_TIMEOUT = setTimeout(function () {
11534
- re.KEY_DOWN_TIMEOUT = null, _this58.resetRecording(e);
11533
+ e.element && oe.getElementIfFocusedOnAvailable(e.element, document.activeElement) && (oe.KEY_DOWN_TIMEOUT !== null && clearTimeout(oe.KEY_DOWN_TIMEOUT), oe.KEY_DOWN_TIMEOUT = setTimeout(function () {
11534
+ oe.KEY_DOWN_TIMEOUT = null, _this58.resetRecording(e);
11535
11535
  }, 500));
11536
11536
  }
11537
11537
  }, {
11538
11538
  key: "mouseDownWindow",
11539
11539
  value: function mouseDownWindow(e, t) {
11540
- this.mouseDownElement = re.getElementIfFocusedOnAvailable(e, t.target);
11540
+ this.mouseDownElement = oe.getElementIfFocusedOnAvailable(e, t.target);
11541
11541
  }
11542
11542
  }, {
11543
11543
  key: "mouseUpWindow",
@@ -11548,7 +11548,7 @@ var re = /*#__PURE__*/function () {
11548
11548
  key: "add",
11549
11549
  value: function add(e, t) {
11550
11550
  var i = (t == null ? void 0 : t.insertInCursorLocation) === void 0 || (t == null ? void 0 : t.insertInCursorLocation);
11551
- t != null && t.element && i && (e.mouseDownEvent = re.mouseDownWindow.bind(e, t.element), document.addEventListener("mousedown", e.mouseDownEvent), e.mouseUpEvent = re.mouseUpWindow.bind(e, t), document.addEventListener("mouseup", e.mouseUpEvent), e.keyDownEvent = re.keyDownWindow.bind(e, t), document.addEventListener("keydown", e.keyDownEvent));
11551
+ t != null && t.element && i && (e.mouseDownEvent = oe.mouseDownWindow.bind(e, t.element), document.addEventListener("mousedown", e.mouseDownEvent), e.mouseUpEvent = oe.mouseUpWindow.bind(e, t), document.addEventListener("mouseup", e.mouseUpEvent), e.keyDownEvent = oe.keyDownWindow.bind(e, t), document.addEventListener("keydown", e.keyDownEvent));
11552
11552
  }
11553
11553
  }, {
11554
11554
  key: "remove",
@@ -11557,8 +11557,8 @@ var re = /*#__PURE__*/function () {
11557
11557
  }
11558
11558
  }]);
11559
11559
  }();
11560
- Fi.EventListeners = re;
11561
- re.KEY_DOWN_TIMEOUT = null;
11560
+ Fi.EventListeners = oe;
11561
+ oe.KEY_DOWN_TIMEOUT = null;
11562
11562
  var Bi = {};
11563
11563
  Object.defineProperty(Bi, "__esModule", {
11564
11564
  value: !0
@@ -11768,11 +11768,11 @@ var Xs = ti,
11768
11768
  ra = wt,
11769
11769
  Ys = at,
11770
11770
  Qs = rt;
11771
- var ne = /*#__PURE__*/function () {
11772
- function ne() {
11773
- _classCallCheck(this, ne);
11771
+ var re = /*#__PURE__*/function () {
11772
+ function re() {
11773
+ _classCallCheck(this, re);
11774
11774
  }
11775
- return _createClass(ne, null, [{
11775
+ return _createClass(re, null, [{
11776
11776
  key: "processCommand",
11777
11777
  value: function processCommand(e, t) {
11778
11778
  return (!t || !t.caseSensitive) && (e = e.toLowerCase()), (t == null ? void 0 : t.substrings) === !1 ? Qs.Text.breakupIntoWordsArr(e) : e;
@@ -11783,7 +11783,7 @@ var ne = /*#__PURE__*/function () {
11783
11783
  var t;
11784
11784
  return ((t = e.settings) === null || t === void 0 ? void 0 : t.caseSensitive) === !0 ? e : Object.keys(e).reduce(function (s, r) {
11785
11785
  var o = e[r];
11786
- return s[r] = typeof o == "string" ? ne.processCommand(o, e.settings) : o, s;
11786
+ return s[r] = typeof o == "string" ? re.processCommand(o, e.settings) : o, s;
11787
11787
  }, {});
11788
11788
  }
11789
11789
  }, {
@@ -11801,7 +11801,7 @@ var ne = /*#__PURE__*/function () {
11801
11801
  }, {
11802
11802
  key: "setText",
11803
11803
  value: function setText(e, t, i, s) {
11804
- ne.toggleCommandModeOff(e), na.Elements.isPrimitiveElement(s) ? (s.value = i, e.isTargetInShadow || Ys.Cursor.setOffsetForPrimitive(s, i.length, !0), ra.Browser.IS_SAFARI() && e.autoScroll && Xs.AutoScroll.scrollSafariPrimitiveToEnd(s)) : (s.textContent = i, e.isTargetInShadow || Ys.Cursor.focusEndOfGeneric(s), setTimeout(function () {
11804
+ re.toggleCommandModeOff(e), na.Elements.isPrimitiveElement(s) ? (s.value = i, e.isTargetInShadow || Ys.Cursor.setOffsetForPrimitive(s, i.length, !0), ra.Browser.IS_SAFARI() && e.autoScroll && Xs.AutoScroll.scrollSafariPrimitiveToEnd(s)) : (s.textContent = i, e.isTargetInShadow || Ys.Cursor.focusEndOfGeneric(s), setTimeout(function () {
11805
11805
  return Xs.AutoScroll.scrollGeneric(e, s);
11806
11806
  })), e.resetRecording(t);
11807
11807
  }
@@ -11831,38 +11831,38 @@ var ne = /*#__PURE__*/function () {
11831
11831
  if (!c || !s || !i) return;
11832
11832
  var d = ((o = c.settings) === null || o === void 0 ? void 0 : o.caseSensitive) === !0 ? t : t.toLowerCase(),
11833
11833
  h = Qs.Text.breakupIntoWordsArr(d),
11834
- u = ((a = c.settings) === null || a === void 0 ? void 0 : a.substrings) === !1 ? ne.checkIfMatchesWord : ne.checkIfMatchesSubstring;
11834
+ u = ((a = c.settings) === null || a === void 0 ? void 0 : a.substrings) === !1 ? re.checkIfMatchesWord : re.checkIfMatchesSubstring;
11835
11835
  if (c.commandMode && u(c.commandMode, d, h)) return e.setInterimColorToFinal(), setTimeout(function () {
11836
- return ne.toggleCommandModeOn(e);
11836
+ return re.toggleCommandModeOn(e);
11837
11837
  }), {
11838
11838
  doNotProcessTranscription: !1
11839
11839
  };
11840
11840
  if (!(c.commandMode && !e.isWaitingForCommand)) {
11841
- if (c.stop && u(c.stop, d, h)) return ne.toggleCommandModeOff(e), setTimeout(function () {
11841
+ if (c.stop && u(c.stop, d, h)) return re.toggleCommandModeOff(e), setTimeout(function () {
11842
11842
  return e.stop();
11843
11843
  }), {
11844
11844
  doNotProcessTranscription: !1
11845
11845
  };
11846
- if (c.pause && u(c.pause, d, h)) return ne.toggleCommandModeOff(e), e.setInterimColorToFinal(), setTimeout(function () {
11846
+ if (c.pause && u(c.pause, d, h)) return re.toggleCommandModeOff(e), e.setInterimColorToFinal(), setTimeout(function () {
11847
11847
  var f;
11848
11848
  e.isPaused = !0, (f = e.onPauseTrigger) === null || f === void 0 || f.call(e, !0);
11849
11849
  }), {
11850
11850
  doNotProcessTranscription: !1
11851
11851
  };
11852
- if (c.resume && u(c.resume, d, h)) return e.isPaused = !1, (l = e.onPauseTrigger) === null || l === void 0 || l.call(e, !1), ne.toggleCommandModeOff(e), e.resetRecording(i), {
11852
+ if (c.resume && u(c.resume, d, h)) return e.isPaused = !1, (l = e.onPauseTrigger) === null || l === void 0 || l.call(e, !1), re.toggleCommandModeOff(e), e.resetRecording(i), {
11853
11853
  doNotProcessTranscription: !0
11854
11854
  };
11855
- if (c.reset && u(c.reset, d, h)) return r !== void 0 && ne.setText(e, i, r, s), {
11855
+ if (c.reset && u(c.reset, d, h)) return r !== void 0 && re.setText(e, i, r, s), {
11856
11856
  doNotProcessTranscription: !0
11857
11857
  };
11858
- if (c.removeAllText && u(c.removeAllText, d, h)) return ne.setText(e, i, "", s), {
11858
+ if (c.removeAllText && u(c.removeAllText, d, h)) return re.setText(e, i, "", s), {
11859
11859
  doNotProcessTranscription: !0
11860
11860
  };
11861
11861
  }
11862
11862
  }
11863
11863
  }]);
11864
11864
  }();
11865
- ei.CommandUtils = ne;
11865
+ ei.CommandUtils = re;
11866
11866
  var Ui = {};
11867
11867
  Object.defineProperty(Ui, "__esModule", {
11868
11868
  value: !0
@@ -12846,7 +12846,7 @@ var Ce = /*#__PURE__*/function () {
12846
12846
  key: "createAnyFileAttachment",
12847
12847
  value: function createAnyFileAttachment(e) {
12848
12848
  var t = document.createElement("div");
12849
- t.classList.add("border-bound-attachment"), xt.IS_SAFARI && t.classList.add("border-bound-attachment-safari");
12849
+ t.classList.add("border-bound-attachment"), St.IS_SAFARI && t.classList.add("border-bound-attachment-safari");
12850
12850
  var i = document.createElement("div");
12851
12851
  i.classList.add("any-file-attachment-text");
12852
12852
  var s = document.createElement("div");
@@ -12939,7 +12939,7 @@ var va = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
12939
12939
  key: "createAudioContainer",
12940
12940
  value: function createAudioContainer() {
12941
12941
  var e = document.createElement("div");
12942
- return e.classList.add("border-bound-attachment", "audio-attachment-icon-container"), xt.IS_SAFARI && e.classList.add("border-bound-attachment-safari"), e;
12942
+ return e.classList.add("border-bound-attachment", "audio-attachment-icon-container"), St.IS_SAFARI && e.classList.add("border-bound-attachment-safari"), e;
12943
12943
  }
12944
12944
  }, {
12945
12945
  key: "addAudioElements",
@@ -13391,7 +13391,7 @@ var qe = /*#__PURE__*/function () {
13391
13391
  }, {
13392
13392
  key: "attach",
13393
13393
  value: function attach(e, t, i, s, r) {
13394
- var o = e.validateInput || le.processValidateInput(e);
13394
+ var o = e.validateInput || se.processValidateInput(e);
13395
13395
  e._validationHandler = /*#__PURE__*/function () {
13396
13396
  var _ref29 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee121(a) {
13397
13397
  var l;
@@ -13495,7 +13495,7 @@ var Ea = /*#__PURE__*/function (_Gt2) {
13495
13495
  }
13496
13496
  }]);
13497
13497
  }(Gt);
13498
- var xa = "<?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";
13498
+ var Sa = "<?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";
13499
13499
  var $ = /*#__PURE__*/function () {
13500
13500
  function $() {
13501
13501
  _classCallCheck(this, $);
@@ -13691,7 +13691,7 @@ var k = /*#__PURE__*/function (_Xt4) {
13691
13691
  return _regeneratorRuntime().wrap(function _callee123$(_context123) {
13692
13692
  while (1) switch (_context123.prev = _context123.next) {
13693
13693
  case 0:
13694
- typeof e == "string" && (e = le.processSubmitUserMessage(e));
13694
+ typeof e == "string" && (e = se.processSubmitUserMessage(e));
13695
13695
  t = {
13696
13696
  text: e.text
13697
13697
  };
@@ -13851,7 +13851,7 @@ var k = /*#__PURE__*/function (_Xt4) {
13851
13851
  }, {
13852
13852
  key: "createSubmitIconElement",
13853
13853
  value: function createSubmitIconElement() {
13854
- var e = ie.createSVGElement(xa);
13854
+ var e = ie.createSVGElement(Sa);
13855
13855
  return e.id = "submit-icon", e;
13856
13856
  }
13857
13857
  }, {
@@ -13870,7 +13870,7 @@ var k = /*#__PURE__*/function (_Xt4) {
13870
13870
  }(Xt);
13871
13871
  k.SUBMIT_CLASS = "submit-button", k.LOADING_CLASS = "loading-button", k.DISABLED_CLASS = "disabled-button";
13872
13872
  var Es = k;
13873
- var Sa = "<?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",
13873
+ var xa = "<?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",
13874
13874
  _a = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n <title>capture</title>\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",
13875
13875
  wa = "<?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>",
13876
13876
  Ta = "<?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>";
@@ -13883,7 +13883,7 @@ var Rs = /*#__PURE__*/function (_Ze) {
13883
13883
  var _this80$addButtonsAnd = _this80.addButtonsAndTheirEvents(t),
13884
13884
  r = _this80$addButtonsAnd.captureButton,
13885
13885
  o = _this80$addButtonsAnd.submitButton;
13886
- _this80._captureButton = r, _this80._submitButton = o, _this80._captureIcon = _this80._captureButton.children[0], _this80._refreshIcon = ie.createSVGElement(Sa), _this80._refreshIcon.classList.add("modal-svg-button-icon", "modal-svg-refresh-icon"), (s == null ? void 0 : s.format) === "jpeg" && (_this80._format = "image/jpeg"), s != null && s.dimensions && (_this80._dimensions = s.dimensions), _this80._contentRef.appendChild(_this80._canvas), _this80.extensionCloseCallback = _this80.stop;
13886
+ _this80._captureButton = r, _this80._submitButton = o, _this80._captureIcon = _this80._captureButton.children[0], _this80._refreshIcon = ie.createSVGElement(xa), _this80._refreshIcon.classList.add("modal-svg-button-icon", "modal-svg-refresh-icon"), (s == null ? void 0 : s.format) === "jpeg" && (_this80._format = "image/jpeg"), s != null && s.dimensions && (_this80._dimensions = s.dimensions), _this80._contentRef.appendChild(_this80._canvas), _this80.extensionCloseCallback = _this80.stop;
13887
13887
  return _this80;
13888
13888
  }
13889
13889
  _inherits(Rs, _Ze);
@@ -14115,7 +14115,7 @@ var Is = /*#__PURE__*/function () {
14115
14115
  value: function createElements(e, t, i) {
14116
14116
  var s = document.createElement("div");
14117
14117
  s.id = "chat-view";
14118
- var r = new me(e, t, i);
14118
+ var r = new Ee(e, t, i);
14119
14119
  t.websocket && j.createConnection(t, r);
14120
14120
  var o = new Ot(e, r, t, s);
14121
14121
  return J.addElements(s, r.elementRef, o.elementRef), s;
@@ -14134,11 +14134,11 @@ var ka = Object.defineProperty,
14134
14134
  for (var s = void 0, r = n.length - 1, o; r >= 0; r--) (o = n[r]) && (s = o(e, t, s) || s);
14135
14135
  return s && ka(e, t, s), s;
14136
14136
  };
14137
- var x = /*#__PURE__*/function (_ls) {
14138
- function x() {
14137
+ var S = /*#__PURE__*/function (_ls) {
14138
+ function S() {
14139
14139
  var _this85;
14140
- _classCallCheck(this, x);
14141
- _this85 = _callSuper(this, x), _this85.getMessages = function () {
14140
+ _classCallCheck(this, S);
14141
+ _this85 = _callSuper(this, S), _this85.getMessages = function () {
14142
14142
  return [];
14143
14143
  }, _this85.submitUserMessage = function () {
14144
14144
  return console.warn("submitUserMessage failed - please wait for chat view to render before calling this property.");
@@ -14153,8 +14153,8 @@ var x = /*#__PURE__*/function (_ls) {
14153
14153
  }, 20);
14154
14154
  return _this85;
14155
14155
  }
14156
- _inherits(x, _ls);
14157
- return _createClass(x, [{
14156
+ _inherits(S, _ls);
14157
+ return _createClass(S, [{
14158
14158
  key: "changeToChatView",
14159
14159
  value: function changeToChatView() {
14160
14160
  this._activeService && (this._activeService.validateKeyProperty = !1), this.onRender();
@@ -14164,7 +14164,7 @@ var x = /*#__PURE__*/function (_ls) {
14164
14164
  key: "onRender",
14165
14165
  value: function onRender() {
14166
14166
  var _this$_childElement;
14167
- ci.attemptAppendStyleSheetToHead(this.style), le.processConnect(this), (!this._activeService || this._activeService.demo) && (this._activeService = zo.create(this)), this.auxiliaryStyle && !this._auxiliaryStyleApplied && (kt.apply(this.auxiliaryStyle, this.shadowRoot), this._auxiliaryStyleApplied = !0), kt.applyDefaultStyleToComponent(this.style, this.chatStyle), le.checkForContainerStyles(this, this._elementRef), this._activeService.key && this._activeService.validateKeyProperty ? li.render(this._elementRef, this.changeToChatView.bind(this), this._activeService) : !(this._activeService instanceof z) || this._activeService.key ? ((_this$_childElement = this._childElement) !== null && _this$_childElement !== void 0 ? _this$_childElement : this._childElement = this.children[0], Is.render(this, this._elementRef, this._activeService, this._childElement)) : this._activeService instanceof z && H.render(this._elementRef, this.changeToChatView.bind(this), this._activeService), this._hasBeenRendered = !0, hi.onRender(this);
14167
+ ci.attemptAppendStyleSheetToHead(this.style), se.processConnect(this), (!this._activeService || this._activeService.demo) && (this._activeService = zo.create(this)), this.auxiliaryStyle && !this._auxiliaryStyleApplied && (kt.apply(this.auxiliaryStyle, this.shadowRoot), this._auxiliaryStyleApplied = !0), kt.applyDefaultStyleToComponent(this.style, this.chatStyle), se.checkForContainerStyles(this, this._elementRef), this._activeService.key && this._activeService.validateKeyProperty ? li.render(this._elementRef, this.changeToChatView.bind(this), this._activeService) : !(this._activeService instanceof z) || this._activeService.key ? ((_this$_childElement = this._childElement) !== null && _this$_childElement !== void 0 ? _this$_childElement : this._childElement = this.children[0], Is.render(this, this._elementRef, this._activeService, this._childElement)) : this._activeService instanceof z && H.render(this._elementRef, this.changeToChatView.bind(this), this._activeService), this._hasBeenRendered = !0, hi.onRender(this);
14168
14168
  }
14169
14169
  }, {
14170
14170
  key: "disconnectedCallback",
@@ -14173,44 +14173,44 @@ var x = /*#__PURE__*/function (_ls) {
14173
14173
  }
14174
14174
  }]);
14175
14175
  }(ls);
14176
- _([S("object")], x.prototype, "connect");
14177
- _([S("object")], x.prototype, "directConnection");
14178
- _([S("object")], x.prototype, "webModel");
14179
- _([S("object")], x.prototype, "requestBodyLimits");
14180
- _([S("function")], x.prototype, "requestInterceptor");
14181
- _([S("function")], x.prototype, "responseInterceptor");
14182
- _([S("function")], x.prototype, "validateInput");
14183
- _([S("function")], x.prototype, "loadHistory");
14184
- _([S("object")], x.prototype, "chatStyle");
14185
- _([S("object")], x.prototype, "attachmentContainerStyle");
14186
- _([S("object")], x.prototype, "dropupStyles");
14187
- _([S("object")], x.prototype, "inputAreaStyle");
14188
- _([S("object")], x.prototype, "textInput");
14189
- _([S("object")], x.prototype, "submitButtonStyles");
14190
- _([S("string")], x.prototype, "auxiliaryStyle");
14191
- _([S("array")], x.prototype, "history");
14192
- _([S("object")], x.prototype, "introMessage");
14193
- _([S("object")], x.prototype, "avatars");
14194
- _([S("object")], x.prototype, "names");
14195
- _([S("boolean")], x.prototype, "displayLoadingBubble");
14196
- _([S("object")], x.prototype, "errorMessages");
14197
- _([S("object")], x.prototype, "messageStyles");
14198
- _([S("object")], x.prototype, "textToSpeech");
14199
- _([S("object")], x.prototype, "speechToText");
14200
- _([S("object")], x.prototype, "images");
14201
- _([S("object")], x.prototype, "gifs");
14202
- _([S("object")], x.prototype, "camera");
14203
- _([S("object")], x.prototype, "audio");
14204
- _([S("object")], x.prototype, "microphone");
14205
- _([S("object")], x.prototype, "mixedFiles");
14206
- _([S("object")], x.prototype, "dragAndDrop");
14207
- _([S("object")], x.prototype, "introPanelStyle");
14208
- _([S("object")], x.prototype, "htmlClassUtilities");
14209
- _([S("function")], x.prototype, "onMessage");
14210
- _([S("function")], x.prototype, "onClearMessages");
14211
- _([S("function")], x.prototype, "onComponentRender");
14212
- _([S("function")], x.prototype, "onError");
14213
- _([S("object")], x.prototype, "demo");
14214
- _([S("object")], x.prototype, "_insertKeyViewStyles");
14215
- customElements.define("deep-chat", x);
14216
- export { x as DeepChat };
14176
+ _([x("object")], S.prototype, "connect");
14177
+ _([x("object")], S.prototype, "directConnection");
14178
+ _([x("object")], S.prototype, "webModel");
14179
+ _([x("object")], S.prototype, "requestBodyLimits");
14180
+ _([x("function")], S.prototype, "requestInterceptor");
14181
+ _([x("function")], S.prototype, "responseInterceptor");
14182
+ _([x("function")], S.prototype, "validateInput");
14183
+ _([x("function")], S.prototype, "loadHistory");
14184
+ _([x("object")], S.prototype, "chatStyle");
14185
+ _([x("object")], S.prototype, "attachmentContainerStyle");
14186
+ _([x("object")], S.prototype, "dropupStyles");
14187
+ _([x("object")], S.prototype, "inputAreaStyle");
14188
+ _([x("object")], S.prototype, "textInput");
14189
+ _([x("object")], S.prototype, "submitButtonStyles");
14190
+ _([x("string")], S.prototype, "auxiliaryStyle");
14191
+ _([x("array")], S.prototype, "history");
14192
+ _([x("object")], S.prototype, "introMessage");
14193
+ _([x("object")], S.prototype, "avatars");
14194
+ _([x("object")], S.prototype, "names");
14195
+ _([x("boolean")], S.prototype, "displayLoadingBubble");
14196
+ _([x("object")], S.prototype, "errorMessages");
14197
+ _([x("object")], S.prototype, "messageStyles");
14198
+ _([x("object")], S.prototype, "textToSpeech");
14199
+ _([x("object")], S.prototype, "speechToText");
14200
+ _([x("object")], S.prototype, "images");
14201
+ _([x("object")], S.prototype, "gifs");
14202
+ _([x("object")], S.prototype, "camera");
14203
+ _([x("object")], S.prototype, "audio");
14204
+ _([x("object")], S.prototype, "microphone");
14205
+ _([x("object")], S.prototype, "mixedFiles");
14206
+ _([x("object")], S.prototype, "dragAndDrop");
14207
+ _([x("object")], S.prototype, "introPanelStyle");
14208
+ _([x("object")], S.prototype, "htmlClassUtilities");
14209
+ _([x("function")], S.prototype, "onMessage");
14210
+ _([x("function")], S.prototype, "onClearMessages");
14211
+ _([x("function")], S.prototype, "onComponentRender");
14212
+ _([x("function")], S.prototype, "onError");
14213
+ _([x("object")], S.prototype, "demo");
14214
+ _([x("object")], S.prototype, "_insertKeyViewStyles");
14215
+ customElements.define("deep-chat", S);
14216
+ export { S as DeepChat };