deep-chat-dev 9.0.276 → 9.0.278

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
@@ -252,7 +252,7 @@ var Xe = /*#__PURE__*/function () {
252
252
  }]);
253
253
  }();
254
254
  Xe.PERMITTED_KEYS = /* @__PURE__ */new Set([U.BACKSPACE, U.DELETE, U.ARROW_RIGHT, U.ARROW_LEFT, U.ARROW_DOWN, U.ARROW_UP, U.META, U.CONTROL, U.ENTER]);
255
- var Qi = Xe;
255
+ var es = Xe;
256
256
  var qn = /*#__PURE__*/function () {
257
257
  function qn() {
258
258
  _classCallCheck(this, qn);
@@ -275,7 +275,7 @@ var Ye = /*#__PURE__*/function () {
275
275
  this._isComposing = !1;
276
276
  var s = Ye.processConfig(t, e.textInput);
277
277
  this.elementRef = Ye.createContainerElement((r = s == null ? void 0 : s.styles) == null ? void 0 : r.container), this._config = s, this.inputElementRef = this.createInputElement(), this.elementRef.appendChild(this.inputElementRef), e.setPlaceholderText = this.setPlaceholderText.bind(this), e.setPlaceholderText(((o = this._config.placeholder) == null ? void 0 : o.text) || "Ask me anything!"), setTimeout(function () {
278
- Qi.add(_this.inputElementRef, i, _this._config.characterLimit, e._validationHandler), _this._onInput = t.onInput;
278
+ es.add(_this.inputElementRef, i, _this._config.characterLimit, e._validationHandler), _this._onInput = t.onInput;
279
279
  });
280
280
  }
281
281
  return _createClass(Ye, [{
@@ -403,21 +403,21 @@ function Ns(n) {
403
403
  function zn(n) {
404
404
  return n && JSON.stringify(n);
405
405
  }
406
- function ys(n, e, t, i) {
406
+ function Es(n, e, t, i) {
407
407
  var s = "\n".concat(Ns(e), " message: ").concat(JSON.stringify(n), " \n"),
408
408
  r = t ? "".concat(Ns(e), " message after interceptor: ").concat(zn(i), " \n") : "";
409
409
  return s + r;
410
410
  }
411
411
  function Gn(n, e, t, i) {
412
- return "".concat(ys(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");
412
+ return "".concat(Es(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");
413
413
  }
414
414
  function Vn(n, e, t) {
415
415
  var i = "response";
416
- return "".concat(ys(n, i, e, t), "Make sure the ").concat(i, " message is using the {text: string} format, e.g: {text: \"Model Response\"}");
416
+ return "".concat(Es(n, i, e, t), "Make sure the ").concat(i, " message is using the {text: string} format, e.g: {text: \"Model Response\"}");
417
417
  }
418
418
  function Kn(n, e) {
419
419
  var t = "request";
420
- return "".concat(ys(n, t, e), "Make sure the ").concat(t, " message is using the {body: {text: string}} format, e.g: {body: {text: \"Model Response\"}}");
420
+ return "".concat(Es(n, t, e), "Make sure the ").concat(t, " message is using the {body: {text: string}} format, e.g: {body: {text: \"Model Response\"}}");
421
421
  }
422
422
  var Ds = "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",
423
423
  k = {
@@ -432,11 +432,11 @@ var Ds = "Make sure the events are using {text: string} or {html: string} format
432
432
  NO_VALID_STREAM_EVENTS_SENT: "No valid stream events were sent.\n".concat(Ds),
433
433
  READABLE_STREAM_CONNECTION_ERROR: "Readable Stream connection error."
434
434
  },
435
- Bi = /*#__PURE__*/function () {
436
- function Bi() {
437
- _classCallCheck(this, Bi);
435
+ Fi = /*#__PURE__*/function () {
436
+ function Fi() {
437
+ _classCallCheck(this, Fi);
438
438
  }
439
- return _createClass(Bi, null, [{
439
+ return _createClass(Fi, null, [{
440
440
  key: "addElements",
441
441
  value: function addElements(e) {
442
442
  for (var _len = arguments.length, t = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
@@ -453,7 +453,7 @@ var Ds = "Make sure the events are using {text: string} or {html: string} format
453
453
  i = e.clientHeight,
454
454
  s = e.scrollTop,
455
455
  r = t - i;
456
- return s >= r - Bi.CODE_SNIPPET_GENERATION_JUMP;
456
+ return s >= r - Fi.CODE_SNIPPET_GENERATION_JUMP;
457
457
  }
458
458
  }, {
459
459
  key: "cloneElement",
@@ -478,13 +478,13 @@ var Ds = "Make sure the events are using {text: string} or {html: string} format
478
478
  }
479
479
  }]);
480
480
  }();
481
- Bi.CODE_SNIPPET_GENERATION_JUMP = 0.5;
482
- var V = Bi;
483
- var Fi = /*#__PURE__*/function () {
484
- function Fi() {
485
- _classCallCheck(this, Fi);
481
+ Fi.CODE_SNIPPET_GENERATION_JUMP = 0.5;
482
+ var V = Fi;
483
+ var Ui = /*#__PURE__*/function () {
484
+ function Ui() {
485
+ _classCallCheck(this, Ui);
486
486
  }
487
- return _createClass(Fi, null, [{
487
+ return _createClass(Ui, null, [{
488
488
  key: "speak",
489
489
  value: function speak(e, t) {
490
490
  if (window.SpeechSynthesisUtterance) {
@@ -505,12 +505,12 @@ var Fi = /*#__PURE__*/function () {
505
505
  s && (i.voice = s);
506
506
  }
507
507
  t(i);
508
- }, Fi.LOAD_VOICES_MS);
508
+ }, Ui.LOAD_VOICES_MS);
509
509
  }
510
510
  }]);
511
511
  }();
512
- Fi.LOAD_VOICES_MS = 200;
513
- var bt = Fi;
512
+ Ui.LOAD_VOICES_MS = 200;
513
+ var bt = Ui;
514
514
  var ft = /*#__PURE__*/function () {
515
515
  function ft() {
516
516
  _classCallCheck(this, ft);
@@ -776,7 +776,7 @@ var We = /*#__PURE__*/function () {
776
776
  }();
777
777
  var Wn = "deep-chat-temporary-message",
778
778
  $n = "deep-chat-suggestion-button",
779
- es = {
779
+ ts = {
780
780
  "deep-chat-button": {
781
781
  styles: {
782
782
  "default": {
@@ -797,7 +797,7 @@ var Wn = "deep-chat-temporary-message",
797
797
  }
798
798
  }
799
799
  },
800
- Bs = Object.keys(es);
800
+ Bs = Object.keys(ts);
801
801
  var _e = /*#__PURE__*/function () {
802
802
  function _e() {
803
803
  _classCallCheck(this, _e);
@@ -830,7 +830,7 @@ var _e = /*#__PURE__*/function () {
830
830
  }, {
831
831
  key: "applyEvents",
832
832
  value: function applyEvents(e, t) {
833
- var i = es[t].events;
833
+ var i = ts[t].events;
834
834
  Object.keys(i || []).forEach(function (s) {
835
835
  e.addEventListener(s, i == null ? void 0 : i[s]);
836
836
  });
@@ -843,7 +843,7 @@ var _e = /*#__PURE__*/function () {
843
843
  var c = (d = e[l]) == null ? void 0 : d.styles;
844
844
  return c && e[l].styles && a.push(c), a;
845
845
  }, []),
846
- r = es[i].styles;
846
+ r = ts[i].styles;
847
847
  if (r) {
848
848
  var a = JSON.parse(JSON.stringify(r));
849
849
  a["default"] && I.overwriteDefaultWithAlreadyApplied(a, t), s.unshift(a);
@@ -1021,10 +1021,10 @@ var Yn = /\\([\\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;
1021
1021
  function Qt(n) {
1022
1022
  return n.indexOf("\\") < 0 ? n : n.replace(Yn, "$1");
1023
1023
  }
1024
- function An(n) {
1024
+ function wn(n) {
1025
1025
  return !(n >= 55296 && n <= 57343 || n >= 64976 && n <= 65007 || (n & 65535) === 65535 || (n & 65535) === 65534 || n >= 0 && n <= 8 || n === 11 || n >= 14 && n <= 31 || n >= 127 && n <= 159 || n > 1114111);
1026
1026
  }
1027
- function ts(n) {
1027
+ function is(n) {
1028
1028
  if (n > 65535) {
1029
1029
  n -= 65536;
1030
1030
  var e = 55296 + (n >> 10),
@@ -1038,7 +1038,7 @@ var Zn = /&([a-z#][a-z0-9]{1,31});/gi,
1038
1038
  function er(n, e) {
1039
1039
  var t = 0,
1040
1040
  i = _n(e);
1041
- return e !== i ? i : e.charCodeAt(0) === 35 && Qn.test(e) && (t = e[1].toLowerCase() === "x" ? parseInt(e.slice(2), 16) : parseInt(e.slice(1), 10), An(t)) ? ts(t) : n;
1041
+ return e !== i ? i : e.charCodeAt(0) === 35 && Qn.test(e) && (t = e[1].toLowerCase() === "x" ? parseInt(e.slice(2), 16) : parseInt(e.slice(1), 10), wn(t)) ? is(t) : n;
1042
1042
  }
1043
1043
  function nt(n) {
1044
1044
  return n.indexOf("&") < 0 ? n : n.replace(Zn, er);
@@ -1270,20 +1270,20 @@ v.dt_close = function () {
1270
1270
  v.dd_close = function () {
1271
1271
  return "</dd>\n";
1272
1272
  };
1273
- function wn(n, e) {
1274
- return ++e >= n.length - 2 ? e : n[e].type === "paragraph_open" && n[e].tight && n[e + 1].type === "inline" && n[e + 1].content.length === 0 && n[e + 2].type === "paragraph_close" && n[e + 2].tight ? wn(n, e + 2) : e;
1273
+ function An(n, e) {
1274
+ return ++e >= n.length - 2 ? e : n[e].type === "paragraph_open" && n[e].tight && n[e + 1].type === "inline" && n[e + 1].content.length === 0 && n[e + 2].type === "paragraph_close" && n[e + 2].tight ? An(n, e + 2) : e;
1275
1275
  }
1276
1276
  var ot = v.getBreak = function (e, t) {
1277
- return t = wn(e, t), t < e.length && e[t].type === "list_item_close" ? "" : "\n";
1277
+ return t = An(e, t), t < e.length && e[t].type === "list_item_close" ? "" : "\n";
1278
1278
  };
1279
- function Es() {
1279
+ function Ss() {
1280
1280
  this.rules = xn({}, v), this.getBreak = v.getBreak;
1281
1281
  }
1282
- Es.prototype.renderInline = function (n, e, t) {
1282
+ Ss.prototype.renderInline = function (n, e, t) {
1283
1283
  for (var i = this.rules, s = n.length, r = 0, o = ""; s--;) o += i[n[r].type](n, r++, e, t, this);
1284
1284
  return o;
1285
1285
  };
1286
- Es.prototype.render = function (n, e, t) {
1286
+ Ss.prototype.render = function (n, e, t) {
1287
1287
  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);
1288
1288
  return o;
1289
1289
  };
@@ -1430,7 +1430,7 @@ function ar(n) {
1430
1430
  }
1431
1431
  }
1432
1432
  }
1433
- function is(n) {
1433
+ function ss(n) {
1434
1434
  var e = nt(n);
1435
1435
  try {
1436
1436
  e = decodeURI(e);
@@ -1446,7 +1446,7 @@ function Tn(n, e) {
1446
1446
  if (n.src.charCodeAt(e) === 60) {
1447
1447
  for (e++; e < o;) {
1448
1448
  if (t = n.src.charCodeAt(e), t === 10) return !1;
1449
- if (t === 62) return s = is(Qt(n.src.slice(r + 1, e))), n.parser.validateLink(s) ? (n.pos = e + 1, n.linkContent = s, !0) : !1;
1449
+ if (t === 62) return s = ss(Qt(n.src.slice(r + 1, e))), n.parser.validateLink(s) ? (n.pos = e + 1, n.linkContent = s, !0) : !1;
1450
1450
  if (t === 92 && e + 1 < o) {
1451
1451
  e += 2;
1452
1452
  continue;
@@ -1571,7 +1571,7 @@ function hr(n) {
1571
1571
  }
1572
1572
  }
1573
1573
  var Fs = " \n()[]'\".,!?-";
1574
- function Ji(n) {
1574
+ function Xi(n) {
1575
1575
  return n.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g, "\\$1");
1576
1576
  }
1577
1577
  function ur(n) {
@@ -1589,11 +1589,11 @@ function ur(n) {
1589
1589
  h,
1590
1590
  f = n.tokens;
1591
1591
  if (n.env.abbreviations) {
1592
- for (n.env.abbrRegExp || (h = "(^|[" + Fs.split("").map(Ji).join("") + "])(" + Object.keys(n.env.abbreviations).map(function (m) {
1592
+ for (n.env.abbrRegExp || (h = "(^|[" + Fs.split("").map(Xi).join("") + "])(" + Object.keys(n.env.abbreviations).map(function (m) {
1593
1593
  return m.substr(1);
1594
1594
  }).sort(function (m, p) {
1595
1595
  return p.length - m.length;
1596
- }).map(Ji).join("|") + ")($|[" + Fs.split("").map(Ji).join("") + "])", n.env.abbrRegExp = new RegExp(h, "g")), d = n.env.abbrRegExp, t = 0, i = f.length; t < i; t++) if (f[t].type === "inline") {
1596
+ }).map(Xi).join("|") + ")($|[" + Fs.split("").map(Xi).join("") + "])", n.env.abbrRegExp = new RegExp(h, "g")), d = n.env.abbrRegExp, t = 0, i = f.length; t < i; t++) if (f[t].type === "inline") {
1597
1597
  for (s = f[t].children, e = s.length - 1; e >= 0; e--) if (r = s[e], r.type === "text") {
1598
1598
  for (l = 0, o = r.content, d.lastIndex = 0, c = r.level, a = []; u = d.exec(o);) d.lastIndex > l && a.push({
1599
1599
  type: "text",
@@ -1678,10 +1678,10 @@ function Er(n) {
1678
1678
  }
1679
1679
  }
1680
1680
  }
1681
- var Xi = [["block", rr], ["abbr", ar], ["references", cr], ["inline", dr], ["footnote_tail", hr], ["abbr2", ur], ["replacements", br], ["smartquotes", Er]];
1681
+ var Yi = [["block", rr], ["abbr", ar], ["references", cr], ["inline", dr], ["footnote_tail", hr], ["abbr2", ur], ["replacements", br], ["smartquotes", Er]];
1682
1682
  function Mn() {
1683
1683
  this.options = {}, this.ruler = new oe();
1684
- for (var n = 0; n < Xi.length; n++) this.ruler.push(Xi[n][0], Xi[n][1]);
1684
+ for (var n = 0; n < Yi.length; n++) this.ruler.push(Yi[n][0], Yi[n][1]);
1685
1685
  }
1686
1686
  Mn.prototype.process = function (n) {
1687
1687
  var e, t, i;
@@ -1814,7 +1814,7 @@ function xr(n, e, t, i) {
1814
1814
  }), n.parentType = c, d[1] = n.line, h = 0; h < o.length; h++) n.bMarks[h + e] = a[h], n.tShift[h + e] = o[h];
1815
1815
  return n.blkIndent = l, !0;
1816
1816
  }
1817
- function Ar(n, e, t, i) {
1817
+ function wr(n, e, t, i) {
1818
1818
  var s,
1819
1819
  r,
1820
1820
  o,
@@ -1849,7 +1849,7 @@ function zs(n, e) {
1849
1849
  }
1850
1850
  return i < s && n.src.charCodeAt(i) !== 32 ? -1 : i;
1851
1851
  }
1852
- function wr(n, e) {
1852
+ function Ar(n, e) {
1853
1853
  var t,
1854
1854
  i,
1855
1855
  s = n.level + 2;
@@ -1878,7 +1878,7 @@ function Tr(n, e, t, i) {
1878
1878
  Ee,
1879
1879
  ie,
1880
1880
  Ps,
1881
- $i;
1881
+ Ji;
1882
1882
  if ((u = zs(n, e)) >= 0) g = !0;else if ((u = qs(n, e)) >= 0) g = !1;else return !1;
1883
1883
  if (n.level >= n.options.maxNesting) return !1;
1884
1884
  if (p = n.src.charCodeAt(u - 1), i) return !0;
@@ -1899,11 +1899,11 @@ function Tr(n, e, t, i) {
1899
1899
  type: "list_item_close",
1900
1900
  level: --n.level
1901
1901
  }), s = e = n.line, ae[1] = s, b = n.bMarks[e], !(s >= t || n.isEmpty(s) || n.tShift[s] < n.blkIndent));) {
1902
- for ($i = !1, ie = 0, Ps = Ee.length; ie < Ps; ie++) if (Ee[ie](n, s, t, !0)) {
1903
- $i = !0;
1902
+ for (Ji = !1, ie = 0, Ps = Ee.length; ie < Ps; ie++) if (Ee[ie](n, s, t, !0)) {
1903
+ Ji = !0;
1904
1904
  break;
1905
1905
  }
1906
- if ($i) break;
1906
+ if (Ji) break;
1907
1907
  if (g) {
1908
1908
  if (u = zs(n, s), u < 0) break;
1909
1909
  } else if (u = qs(n, s), u < 0) break;
@@ -1912,7 +1912,7 @@ function Tr(n, e, t, i) {
1912
1912
  return n.tokens.push({
1913
1913
  type: g ? "ordered_list_close" : "bullet_list_close",
1914
1914
  level: --n.level
1915
- }), He[1] = s, n.line = s, Re && wr(n, M), !0;
1915
+ }), He[1] = s, n.line = s, Re && Ar(n, M), !0;
1916
1916
  }
1917
1917
  function Cr(n, e, t, i) {
1918
1918
  var s,
@@ -2018,14 +2018,14 @@ function Or(n, e, t, i) {
2018
2018
  content: n.getLines(e, o, 0, !0)
2019
2019
  }), !0;
2020
2020
  }
2021
- function Yi(n, e) {
2021
+ function Zi(n, e) {
2022
2022
  var t = n.bMarks[e] + n.blkIndent,
2023
2023
  i = n.eMarks[e];
2024
2024
  return n.src.substr(t, i - t);
2025
2025
  }
2026
2026
  function Pr(n, e, t, i) {
2027
2027
  var s, r, o, a, l, c, d, u, h, f, m;
2028
- 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 = Yi(n, e + 1), !/^[-:| ]+$/.test(r)) || (c = r.split("|"), c <= 2)) return !1;
2028
+ 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;
2029
2029
  for (u = [], a = 0; a < c.length; a++) {
2030
2030
  if (h = c[a].trim(), !h) {
2031
2031
  if (a === 0 || a === c.length - 1) continue;
@@ -2034,7 +2034,7 @@ function Pr(n, e, t, i) {
2034
2034
  if (!/^:?-+:?$/.test(h)) return !1;
2035
2035
  h.charCodeAt(h.length - 1) === 58 ? u.push(h.charCodeAt(0) === 58 ? "center" : "right") : h.charCodeAt(0) === 58 ? u.push("left") : u.push("");
2036
2036
  }
2037
- if (r = Yi(n, e).trim(), r.indexOf("|") === -1 || (c = r.replace(/^\||\|$/g, "").split("|"), u.length !== c.length)) return !1;
2037
+ if (r = Zi(n, e).trim(), r.indexOf("|") === -1 || (c = r.replace(/^\||\|$/g, "").split("|"), u.length !== c.length)) return !1;
2038
2038
  if (i) return !0;
2039
2039
  for (n.tokens.push({
2040
2040
  type: "table_open",
@@ -2073,7 +2073,7 @@ function Pr(n, e, t, i) {
2073
2073
  type: "tbody_open",
2074
2074
  lines: m = [e + 2, 0],
2075
2075
  level: n.level++
2076
- }), l = e + 2; l < t && !(n.tShift[l] < n.blkIndent || (r = Yi(n, l).trim(), r.indexOf("|") === -1)); l++) {
2076
+ }), l = e + 2; l < t && !(n.tShift[l] < n.blkIndent || (r = Zi(n, l).trim(), r.indexOf("|") === -1)); l++) {
2077
2077
  for (c = r.replace(/^\||\|$/g, "").split("|"), n.tokens.push({
2078
2078
  type: "tr_open",
2079
2079
  level: n.level++
@@ -2192,14 +2192,14 @@ function Br(n, e) {
2192
2192
  level: n.level
2193
2193
  })), !0;
2194
2194
  }
2195
- var pi = [["code", Sr], ["fences", _r, ["paragraph", "blockquote", "list"]], ["blockquote", xr, ["paragraph", "blockquote", "list"]], ["hr", Ar, ["paragraph", "blockquote", "list"]], ["list", Tr, ["paragraph", "blockquote"]], ["footnote", Cr, ["paragraph"]], ["heading", Rr, ["paragraph", "blockquote"]], ["lheading", Mr], ["htmlblock", Or, ["paragraph", "blockquote"]], ["table", Pr, ["paragraph"]], ["deflist", Dr, ["paragraph"]], ["paragraph", Br]];
2196
- function Ss() {
2195
+ var pi = [["code", Sr], ["fences", _r, ["paragraph", "blockquote", "list"]], ["blockquote", xr, ["paragraph", "blockquote", "list"]], ["hr", wr, ["paragraph", "blockquote", "list"]], ["list", Tr, ["paragraph", "blockquote"]], ["footnote", Cr, ["paragraph"]], ["heading", Rr, ["paragraph", "blockquote"]], ["lheading", Mr], ["htmlblock", Or, ["paragraph", "blockquote"]], ["table", Pr, ["paragraph"]], ["deflist", Dr, ["paragraph"]], ["paragraph", Br]];
2196
+ function _s() {
2197
2197
  this.ruler = new oe();
2198
2198
  for (var n = 0; n < pi.length; n++) this.ruler.push(pi[n][0], pi[n][1], {
2199
2199
  alt: (pi[n][2] || []).slice()
2200
2200
  });
2201
2201
  }
2202
- Ss.prototype.tokenize = function (n, e, t) {
2202
+ _s.prototype.tokenize = function (n, e, t) {
2203
2203
  for (var i = this.ruler.getRules(""), s = i.length, r = e, o = !1, a, l; r < t && (n.line = r = n.skipEmptyLines(r), !(r >= t || n.tShift[r] < n.blkIndent));) {
2204
2204
  for (l = 0; l < s && (a = i[l](n, r, t, !1), !a); l++);
2205
2205
  if (n.tight = !o, n.isEmpty(n.line - 1) && (o = !0), r = n.line, r < t && n.isEmpty(r)) {
@@ -2211,7 +2211,7 @@ Ss.prototype.tokenize = function (n, e, t) {
2211
2211
  var Fr = /[\n\t]/g,
2212
2212
  Ur = /\r[\n\u0085]|[\u2424\u2028\u0085]/g,
2213
2213
  jr = /\u00a0/g;
2214
- Ss.prototype.parse = function (n, e, t, i) {
2214
+ _s.prototype.parse = function (n, e, t, i) {
2215
2215
  var s,
2216
2216
  r = 0,
2217
2217
  o = 0;
@@ -2279,10 +2279,10 @@ function zr(n, e) {
2279
2279
  for (s++; s < i && n.src.charCodeAt(s) === 32;) s++;
2280
2280
  return n.pos = s, !0;
2281
2281
  }
2282
- var _s = [];
2283
- for (var Gs = 0; Gs < 256; Gs++) _s.push(0);
2282
+ var xs = [];
2283
+ for (var Gs = 0; Gs < 256; Gs++) xs.push(0);
2284
2284
  "\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function (n) {
2285
- _s[n.charCodeAt(0)] = 1;
2285
+ xs[n.charCodeAt(0)] = 1;
2286
2286
  });
2287
2287
  function Gr(n, e) {
2288
2288
  var t,
@@ -2290,7 +2290,7 @@ function Gr(n, e) {
2290
2290
  s = n.posMax;
2291
2291
  if (n.src.charCodeAt(i) !== 92) return !1;
2292
2292
  if (i++, i < s) {
2293
- if (t = n.src.charCodeAt(i), t < 256 && _s[t] !== 0) return e || (n.pending += n.src[i]), n.pos += 2, !0;
2293
+ if (t = n.src.charCodeAt(i), t < 256 && xs[t] !== 0) return e || (n.pending += n.src[i]), n.pos += 2, !0;
2294
2294
  if (t === 10) {
2295
2295
  for (e || n.push({
2296
2296
  type: "hardbreak",
@@ -2601,7 +2601,7 @@ function oo(n, e) {
2601
2601
  r,
2602
2602
  o,
2603
2603
  a = n.pos;
2604
- return n.src.charCodeAt(a) !== 60 || (t = n.src.slice(a), t.indexOf(">") < 0) ? !1 : (i = t.match(ro), i ? so.indexOf(i[1].toLowerCase()) < 0 || (r = i[0].slice(1, -1), o = is(r), !n.parser.validateLink(r)) ? !1 : (e || (n.push({
2604
+ return n.src.charCodeAt(a) !== 60 || (t = n.src.slice(a), t.indexOf(">") < 0) ? !1 : (i = t.match(ro), i ? so.indexOf(i[1].toLowerCase()) < 0 || (r = i[0].slice(1, -1), o = ss(r), !n.parser.validateLink(r)) ? !1 : (e || (n.push({
2605
2605
  type: "link_open",
2606
2606
  href: o,
2607
2607
  level: n.level
@@ -2612,7 +2612,7 @@ function oo(n, e) {
2612
2612
  }), n.push({
2613
2613
  type: "link_close",
2614
2614
  level: n.level
2615
- })), n.pos += i[0].length, !0) : (s = t.match(no), s ? (r = s[0].slice(1, -1), o = is("mailto:" + r), n.parser.validateLink(o) ? (e || (n.push({
2615
+ })), n.pos += i[0].length, !0) : (s = t.match(no), s ? (r = s[0].slice(1, -1), o = ss("mailto:" + r), n.parser.validateLink(o) ? (e || (n.push({
2616
2616
  type: "link_open",
2617
2617
  href: o,
2618
2618
  level: n.level
@@ -2625,7 +2625,7 @@ function oo(n, e) {
2625
2625
  level: n.level
2626
2626
  })), n.pos += s[0].length, !0) : !1) : !1));
2627
2627
  }
2628
- function Hi(n, e) {
2628
+ function qi(n, e) {
2629
2629
  return n = n.source, e = e || "", function t(i, s) {
2630
2630
  return i ? (s = s.source || s, n = n.replace(i, s), t) : new RegExp(n, e);
2631
2631
  };
@@ -2634,15 +2634,15 @@ var ao = /[a-zA-Z_:][a-zA-Z0-9:._-]*/,
2634
2634
  lo = /[^"'=<>`\x00-\x20]+/,
2635
2635
  co = /'[^']*'/,
2636
2636
  ho = /"[^"]*"/,
2637
- uo = Hi(/(?:unquoted|single_quoted|double_quoted)/)("unquoted", lo)("single_quoted", co)("double_quoted", ho)(),
2638
- fo = Hi(/(?:\s+attr_name(?:\s*=\s*attr_value)?)/)("attr_name", ao)("attr_value", uo)(),
2639
- po = Hi(/<[A-Za-z][A-Za-z0-9]*attribute*\s*\/?>/)("attribute", fo)(),
2637
+ uo = qi(/(?:unquoted|single_quoted|double_quoted)/)("unquoted", lo)("single_quoted", co)("double_quoted", ho)(),
2638
+ fo = qi(/(?:\s+attr_name(?:\s*=\s*attr_value)?)/)("attr_name", ao)("attr_value", uo)(),
2639
+ po = qi(/<[A-Za-z][A-Za-z0-9]*attribute*\s*\/?>/)("attribute", fo)(),
2640
2640
  mo = /<\/[A-Za-z][A-Za-z0-9]*\s*>/,
2641
2641
  go = /<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->/,
2642
2642
  bo = /<[?].*?[?]>/,
2643
2643
  vo = /<![A-Z]+\s+[^>]*>/,
2644
2644
  yo = /<!\[CDATA\[[\s\S]*?\]\]>/,
2645
- Eo = Hi(/^(?:open_tag|close_tag|comment|processing|declaration|cdata)/)("open_tag", po)("close_tag", mo)("comment", go)("processing", bo)("declaration", vo)("cdata", yo)();
2645
+ Eo = qi(/^(?:open_tag|close_tag|comment|processing|declaration|cdata)/)("open_tag", po)("close_tag", mo)("comment", go)("processing", bo)("declaration", vo)("cdata", yo)();
2646
2646
  function So(n) {
2647
2647
  var e = n | 32;
2648
2648
  return e >= 97 && e <= 122;
@@ -2659,8 +2659,8 @@ function _o(n, e) {
2659
2659
  }), n.pos += i[0].length, !0);
2660
2660
  }
2661
2661
  var xo = /^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,
2662
- Ao = /^&([a-z][a-z0-9]{1,31});/i;
2663
- function wo(n, e) {
2662
+ wo = /^&([a-z][a-z0-9]{1,31});/i;
2663
+ function Ao(n, e) {
2664
2664
  var t,
2665
2665
  i,
2666
2666
  s,
@@ -2669,21 +2669,21 @@ function wo(n, e) {
2669
2669
  if (n.src.charCodeAt(r) !== 38) return !1;
2670
2670
  if (r + 1 < o) {
2671
2671
  if (t = n.src.charCodeAt(r + 1), t === 35) {
2672
- if (s = n.src.slice(r).match(xo), s) return e || (i = s[1][0].toLowerCase() === "x" ? parseInt(s[1].slice(1), 16) : parseInt(s[1], 10), n.pending += An(i) ? ts(i) : ts(65533)), n.pos += s[0].length, !0;
2673
- } else if (s = n.src.slice(r).match(Ao), s) {
2672
+ if (s = n.src.slice(r).match(xo), s) return e || (i = s[1][0].toLowerCase() === "x" ? parseInt(s[1].slice(1), 16) : parseInt(s[1], 10), n.pending += wn(i) ? is(i) : is(65533)), n.pos += s[0].length, !0;
2673
+ } else if (s = n.src.slice(r).match(wo), s) {
2674
2674
  var a = _n(s[1]);
2675
2675
  if (s[1] !== a) return e || (n.pending += a), n.pos += s[0].length, !0;
2676
2676
  }
2677
2677
  }
2678
2678
  return e || (n.pending += "&"), n.pos++, !0;
2679
2679
  }
2680
- var Zi = [["text", qr], ["newline", zr], ["escape", Gr], ["backticks", Vr], ["del", Kr], ["ins", Wr], ["mark", $r], ["emphasis", Jr], ["sub", Yr], ["sup", Qr], ["links", eo], ["footnote_inline", to], ["footnote_ref", io], ["autolink", oo], ["htmltag", _o], ["entity", wo]];
2681
- function qi() {
2680
+ var Qi = [["text", qr], ["newline", zr], ["escape", Gr], ["backticks", Vr], ["del", Kr], ["ins", Wr], ["mark", $r], ["emphasis", Jr], ["sub", Yr], ["sup", Qr], ["links", eo], ["footnote_inline", to], ["footnote_ref", io], ["autolink", oo], ["htmltag", _o], ["entity", Ao]];
2681
+ function zi() {
2682
2682
  this.ruler = new oe();
2683
- for (var n = 0; n < Zi.length; n++) this.ruler.push(Zi[n][0], Zi[n][1]);
2683
+ for (var n = 0; n < Qi.length; n++) this.ruler.push(Qi[n][0], Qi[n][1]);
2684
2684
  this.validateLink = To;
2685
2685
  }
2686
- qi.prototype.skipToken = function (n) {
2686
+ zi.prototype.skipToken = function (n) {
2687
2687
  var e = this.ruler.getRules(""),
2688
2688
  t = e.length,
2689
2689
  i = n.pos,
@@ -2699,7 +2699,7 @@ qi.prototype.skipToken = function (n) {
2699
2699
  }
2700
2700
  n.pos++, n.cacheSet(i, n.pos);
2701
2701
  };
2702
- qi.prototype.tokenize = function (n) {
2702
+ zi.prototype.tokenize = function (n) {
2703
2703
  for (var e = this.ruler.getRules(""), t = e.length, i = n.posMax, s, r; n.pos < i;) {
2704
2704
  for (r = 0; r < t && (s = e[r](n, !1), !s); r++);
2705
2705
  if (s) {
@@ -2710,7 +2710,7 @@ qi.prototype.tokenize = function (n) {
2710
2710
  }
2711
2711
  n.pending && n.pushPending();
2712
2712
  };
2713
- qi.prototype.parse = function (n, e, t, i) {
2713
+ zi.prototype.parse = function (n, e, t, i) {
2714
2714
  var s = new at(n, this, e, t, i);
2715
2715
  this.tokenize(s);
2716
2716
  };
@@ -2836,34 +2836,34 @@ var Co = {
2836
2836
  function Ln(n, e, t) {
2837
2837
  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;
2838
2838
  }
2839
- function Ae(n, e) {
2840
- 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 qi(), this.block = new Ss(), this.core = new Mn(), this.renderer = new Es(), this.ruler = new oe(), this.options = {}, this.configure(ko[n]), this.set(e || {});
2839
+ function we(n, e) {
2840
+ 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 zi(), this.block = new _s(), this.core = new Mn(), this.renderer = new Ss(), this.ruler = new oe(), this.options = {}, this.configure(ko[n]), this.set(e || {});
2841
2841
  }
2842
- Ae.prototype.set = function (n) {
2842
+ we.prototype.set = function (n) {
2843
2843
  xn(this.options, n);
2844
2844
  };
2845
- Ae.prototype.configure = function (n) {
2845
+ we.prototype.configure = function (n) {
2846
2846
  var e = this;
2847
2847
  if (!n) throw new Error("Wrong `remarkable` preset, check name/content");
2848
2848
  n.options && e.set(n.options), n.components && Object.keys(n.components).forEach(function (t) {
2849
2849
  n.components[t].rules && e[t].ruler.enable(n.components[t].rules, !0);
2850
2850
  });
2851
2851
  };
2852
- Ae.prototype.use = function (n, e) {
2852
+ we.prototype.use = function (n, e) {
2853
2853
  return n(this, e), this;
2854
2854
  };
2855
- Ae.prototype.parse = function (n, e) {
2855
+ we.prototype.parse = function (n, e) {
2856
2856
  var t = new Ln(this, n, e);
2857
2857
  return this.core.process(t), t.tokens;
2858
2858
  };
2859
- Ae.prototype.render = function (n, e) {
2859
+ we.prototype.render = function (n, e) {
2860
2860
  return e = e || {}, this.renderer.render(this.parse(n, e), this.options, e);
2861
2861
  };
2862
- Ae.prototype.parseInline = function (n, e) {
2862
+ we.prototype.parseInline = function (n, e) {
2863
2863
  var t = new Ln(this, n, e);
2864
2864
  return t.inlineMode = !0, this.core.process(t), t.tokens;
2865
2865
  };
2866
- Ae.prototype.renderInline = function (n, e) {
2866
+ we.prototype.renderInline = function (n, e) {
2867
2867
  return e = e || {}, this.renderer.render(this.parseInline(n, e), this.options, e);
2868
2868
  };
2869
2869
  var pt = /*#__PURE__*/function () {
@@ -2873,10 +2873,10 @@ var pt = /*#__PURE__*/function () {
2873
2873
  return _createClass(pt, null, [{
2874
2874
  key: "instantiate",
2875
2875
  value: function instantiate(e) {
2876
- if (e) return new Ae(_objectSpread(_objectSpread({}, pt.DEFAULT_PROPERTIES), e));
2876
+ if (e) return new we(_objectSpread(_objectSpread({}, pt.DEFAULT_PROPERTIES), e));
2877
2877
  if (window.hljs) {
2878
2878
  var t = window.hljs;
2879
- return new Ae({
2879
+ return new we({
2880
2880
  highlight: function highlight(i, s) {
2881
2881
  if (s && t.getLanguage(s)) try {
2882
2882
  return t.highlight(i, {
@@ -2905,7 +2905,7 @@ var pt = /*#__PURE__*/function () {
2905
2905
  typographer: !0
2906
2906
  // Enable smartypants and other sweet transforms
2907
2907
  });
2908
- } else return new Ae(pt.DEFAULT_PROPERTIES);
2908
+ } else return new we(pt.DEFAULT_PROPERTIES);
2909
2909
  }
2910
2910
  }, {
2911
2911
  key: "createNew",
@@ -2923,6 +2923,30 @@ pt.DEFAULT_PROPERTIES = {
2923
2923
  // set target to open in a new tab
2924
2924
  };
2925
2925
  var ti = pt;
2926
+ var Lo = /*#__PURE__*/function () {
2927
+ function Lo(e) {
2928
+ _classCallCheck(this, Lo);
2929
+ this.storageKey = "deep-chat-storage", this.maxMessages = 1e3, _typeof(e) == "object" && (e.key && (this.storageKey = e.key), e.maxMessages && (this.maxMessages = e.maxMessages), e.clear = this.clear.bind(this));
2930
+ }
2931
+ return _createClass(Lo, [{
2932
+ key: "get",
2933
+ value: function get() {
2934
+ var e = localStorage.getItem(this.storageKey);
2935
+ return e ? JSON.parse(e) : [];
2936
+ }
2937
+ }, {
2938
+ key: "addMessages",
2939
+ value: function addMessages(e) {
2940
+ var t = e.slice(e.length - this.maxMessages, e.length);
2941
+ localStorage.setItem(this.storageKey, JSON.stringify(t));
2942
+ }
2943
+ }, {
2944
+ key: "clear",
2945
+ value: function clear() {
2946
+ localStorage.removeItem(this.storageKey);
2947
+ }
2948
+ }]);
2949
+ }();
2926
2950
  var X = /*#__PURE__*/function () {
2927
2951
  function X() {
2928
2952
  _classCallCheck(this, X);
@@ -3140,7 +3164,7 @@ var $t = /*#__PURE__*/function () {
3140
3164
  $t.DEFAULT_FADE_MS = 500;
3141
3165
  var Ei = $t;
3142
3166
  var Ws = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3csvg%20fill='%23000000'%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%2032%2032'%20xml:space='preserve'%3e%3cpath%20d='M23,30.36H9c-2.404,0-4.36-1.956-4.36-4.36V15c0-2.404,1.956-4.36,4.36-4.36h3.659%20c0.167-1.566,1.415-2.813,2.981-2.981V5.333c-1.131-0.174-2-1.154-2-2.333c0-1.301,1.059-2.36,2.36-2.36%20c1.302,0,2.36,1.059,2.36,2.36c0,1.179-0.869,2.159-2,2.333V7.66c1.566,0.167,2.814,1.415,2.981,2.981H23%20c2.404,0,4.36,1.956,4.36,4.36v11C27.36,28.404,25.404,30.36,23,30.36z%20M9,11.36c-2.007,0-3.64,1.633-3.64,3.64v11%20c0,2.007,1.633,3.64,3.64,3.64h14c2.007,0,3.64-1.633,3.64-3.64V15c0-2.007-1.633-3.64-3.64-3.64H9z%20M13.384,10.64h5.231%20C18.439,9.354,17.334,8.36,16,8.36C14.667,8.36,13.561,9.354,13.384,10.64z%20M16,1.36c-0.904,0-1.64,0.736-1.64,1.64%20S15.096,4.64,16,4.64c0.904,0,1.64-0.736,1.64-1.64S16.904,1.36,16,1.36z%20M20,27.36h-8c-1.301,0-2.36-1.059-2.36-2.36%20s1.059-2.36,2.36-2.36h8c1.302,0,2.36,1.059,2.36,2.36S21.302,27.36,20,27.36z%20M12,23.36c-0.904,0-1.64,0.735-1.64,1.64%20s0.736,1.64,1.64,1.64h8c0.904,0,1.64-0.735,1.64-1.64s-0.735-1.64-1.64-1.64H12z%20M31,23.86h-2c-0.199,0-0.36-0.161-0.36-0.36V15%20c0-0.199,0.161-0.36,0.36-0.36h2c0.199,0,0.36,0.161,0.36,0.36v8.5C31.36,23.699,31.199,23.86,31,23.86z%20M29.36,23.14h1.279v-7.78%20H29.36V23.14z%20M3,23.86H1c-0.199,0-0.36-0.161-0.36-0.36V15c0-0.199,0.161-0.36,0.36-0.36h2c0.199,0,0.36,0.161,0.36,0.36v8.5%20C3.36,23.699,3.199,23.86,3,23.86z%20M1.36,23.14h1.28v-7.78H1.36V23.14z%20M20,20.36c-1.302,0-2.36-1.059-2.36-2.36%20s1.059-2.36,2.36-2.36s2.36,1.059,2.36,2.36C22.36,19.302,21.302,20.36,20,20.36z%20M20,16.36c-0.904,0-1.64,0.736-1.64,1.64%20s0.735,1.64,1.64,1.64s1.64-0.735,1.64-1.64S20.904,16.36,20,16.36z%20M12,20.36c-1.301,0-2.36-1.059-2.36-2.36s1.059-2.36,2.36-2.36%20s2.36,1.059,2.36,2.36C14.36,19.302,13.301,20.36,12,20.36z%20M12,16.36c-0.904,0-1.64,0.736-1.64,1.64s0.736,1.64,1.64,1.64%20s1.64-0.735,1.64-1.64S12.904,16.36,12,16.36z'/%3e%3crect%20style='fill:none;'%20width='32'%20height='32'/%3e%3c/svg%3e",
3143
- ss = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPoAAAD6CAMAAAC/MqoPAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////9vX18vLy/Pz86enp4+Li2tnZ1tbWzczM+fn57Ozs4N/f09LS0M/P5uXl7+/v3dzcwtncCAAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAEgAAABIAEbJaz4AAAZNSURBVHja7d3bdtsqEABQYABZSLH9/3+ZpnUsIcF5iOM6PfElNoMHMfPQdq3GmL0GkLhEUqLaUExnOtOZznSmM53pTGc605nOdKYznelMZzrTmV4LXSqllKyJDkob26xWq8Zae/iH0QoWTm9d1xur4WuypQJtTd+5dqn0VjcxzNO5/57mEBvdLo8Oron6aseWOjYOFkVvjQs3DmgyONMuht52EfztP+4hdu0i6LCO808/M8c1lE/fuPGej41uUzgdtoO/75N+2ELJ9I3b3//hPXbiMenm3pR/Jt4USgcLBIp4Bh10gqKVhvLo0klCxeSky96nKcj3siw6pJIL4XsoiQ7apyvMY/V3HHrSRioLopvEhSpTCn2TPEuwKYMOIX0tAxRBf/Hpa+lfSqBv9gi1FPsNfTrMAiVmIE/vJhz61FGnQxRIEYE4vfNYdN8Rp6MlHaHotHTn8ejekaZPAjEmyvQWdZFTtYTpXqCGJ0zvcek9Yfoel76nS0ffv1NMp1ca+pkgyfRCGind4L7OWWc605l+cxjsyhqy9AGbPpClc1/nvl5VX0c/3Alk6RU3+Am7shNZ+h6bvidLr7jBB+zKBrL0irOOudmIUDzTmf5gIP+iEuXtRuTVaEmY/oZLfyNMrzjryPc0gerMTdpVg0tvjJUU6bLPcGOoUv46SLL6Wi8yhLf06C7TUyekI0efRaaYqdFltkeNpPumRPSMDxgBYvSM035FrKAmH72hRW99PrpvSdEHkTEGUvSsK3yKVDkuJ92RohcZaehzzirPpOg+J92Tolfc4Cumx5xVXpGiZ34+ICX6W84qv5GiR5NPbiIpOv6BCoSvSkTX+eiaGP092zINvBOj4x8mSf9FqejvNo/cvpOji19ZbmviL0GPLsYMFzgzCor0+Bv/ePDvSJKOb9dJ5UlnbnEHiHgzv6cdTpJOWuc/u3FEucLDOL75xGtBiefrcwgoC9NDSH/jkH6pAuXmBqPQ9HSUPVdZBH1GGOrMXAQdYxcKZfxAoK+KKBKFLosoEoX+u4giUehz8jlcnAuhp78I46yDYNAd+QLR6K+pr+yvxdBTHyVDubQh0UfSxaHSd0lbvNkVRE87JGOtc+PQd2QLQ6fHhJkKsSh6yg13tO08JPprsgrrXWH0dJd2vH1MLPprot4eXoujpzrdhngiD40ek2y92lggPcnWa8qN1Yz0BFuvZhRl0uOfR0v4Ewuli/Bg4Qr3lArqGdndQ3UPO1EunXYwnelMZzrTmc50pjOd6UxnOtOZznSmM53pTGf6kuj6oedFKV0s3fX6sX1S3bsi6a4PD7+/YAqYeBw6pIB/4qEgOqxdSPbGiim4NRRCbzs3Jj0L4UfXtQXQVRfn5IdA/Bw7RZzurEV6EtdsLeGXkIPuA+K1UoVeA0l62zmN/LqfSSft9KkepmoRuvi3nd5uKNFB9zbbXEANqdr941XO0NJx2v2jdJenpf+/3bvn0ts16ph+sd6hX7dPo2+2cZzE02Ia43bzDHqr+2Evnhz74ZHU30ffbKOeng1/NPV30Ns1gYQnSP2P6e65Pfxc6h02XZqXQCjhJ6kPL6bFo4NrGvAU4UII4SE2P1vQuZkuOxckVfehisF1MjUddN/MZBN+kvq5uf0O/xa66gyNS9ktMWlz44rO1Z8C19i5FPdHzPamXn+F3hryPfxMr78+4F+kq22kO6Rf6fUQt+puuustyWv4rbG3l/duztFB96GYoe1cTBdXMr+nw9qVM6ZfxOvzezff0nXi/ZOndvrR6Zvpm0c3h6nhdb+5iS7tsIim/qXZD9+97/Jf+rpZ5BET1ayv0GUzLhEuhBBjIy/RdVPgndutIRt9nt7p5cKFEEJ3Z+jQFDZL+XnMDXxHB73gxn5s9Kc3d3/pFciFkN/QTSXHJpX5l66gDrkQoP6hL3xsPw39la4qOiV8tH78XeSbue6N9mvWa6J/ybpc1CT1Wnh5Qq9meP8IOKH3ddH7E/ri1iYux/SXDrXR4UiPdck/wUpU+FtPf6/orja6O9KL3l56LOvVxe5Ib2qjN0d6Vbex4ghWlU3bPqI90If66MNng680FNpbJijH6kCvaF3uMzQ3+IrpFerV4Y9dffQdN3im10ivbuImhD3Qq5u4HdZkua8znelMZ/pS4z9CPVKkxowNxgAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxNy0wMy0yN1QxNTo0NToxNSswMDowMN1xSg4AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTctMDMtMjdUMTU6NDU6MTUrMDA6MDCsLPKyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAABJRU5ErkJggg==";
3167
+ ns = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPoAAAD6CAMAAAC/MqoPAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////9vX18vLy/Pz86enp4+Li2tnZ1tbWzczM+fn57Ozs4N/f09LS0M/P5uXl7+/v3dzcwtncCAAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAEgAAABIAEbJaz4AAAZNSURBVHja7d3bdtsqEABQYABZSLH9/3+ZpnUsIcF5iOM6PfElNoMHMfPQdq3GmL0GkLhEUqLaUExnOtOZznSmM53pTGc605nOdKYznelMZzrTmV4LXSqllKyJDkob26xWq8Zae/iH0QoWTm9d1xur4WuypQJtTd+5dqn0VjcxzNO5/57mEBvdLo8Oron6aseWOjYOFkVvjQs3DmgyONMuht52EfztP+4hdu0i6LCO808/M8c1lE/fuPGej41uUzgdtoO/75N+2ELJ9I3b3//hPXbiMenm3pR/Jt4USgcLBIp4Bh10gqKVhvLo0klCxeSky96nKcj3siw6pJIL4XsoiQ7apyvMY/V3HHrSRioLopvEhSpTCn2TPEuwKYMOIX0tAxRBf/Hpa+lfSqBv9gi1FPsNfTrMAiVmIE/vJhz61FGnQxRIEYE4vfNYdN8Rp6MlHaHotHTn8ejekaZPAjEmyvQWdZFTtYTpXqCGJ0zvcek9Yfoel76nS0ffv1NMp1ca+pkgyfRCGind4L7OWWc605l+cxjsyhqy9AGbPpClc1/nvl5VX0c/3Alk6RU3+Am7shNZ+h6bvidLr7jBB+zKBrL0irOOudmIUDzTmf5gIP+iEuXtRuTVaEmY/oZLfyNMrzjryPc0gerMTdpVg0tvjJUU6bLPcGOoUv46SLL6Wi8yhLf06C7TUyekI0efRaaYqdFltkeNpPumRPSMDxgBYvSM035FrKAmH72hRW99PrpvSdEHkTEGUvSsK3yKVDkuJ92RohcZaehzzirPpOg+J92Tolfc4Cumx5xVXpGiZ34+ICX6W84qv5GiR5NPbiIpOv6BCoSvSkTX+eiaGP092zINvBOj4x8mSf9FqejvNo/cvpOji19ZbmviL0GPLsYMFzgzCor0+Bv/ePDvSJKOb9dJ5UlnbnEHiHgzv6cdTpJOWuc/u3FEucLDOL75xGtBiefrcwgoC9NDSH/jkH6pAuXmBqPQ9HSUPVdZBH1GGOrMXAQdYxcKZfxAoK+KKBKFLosoEoX+u4giUehz8jlcnAuhp78I46yDYNAd+QLR6K+pr+yvxdBTHyVDubQh0UfSxaHSd0lbvNkVRE87JGOtc+PQd2QLQ6fHhJkKsSh6yg13tO08JPprsgrrXWH0dJd2vH1MLPprot4eXoujpzrdhngiD40ek2y92lggPcnWa8qN1Yz0BFuvZhRl0uOfR0v4Ewuli/Bg4Qr3lArqGdndQ3UPO1EunXYwnelMZzrTmc50pjOd6UxnOtOZznSmM53pTGf6kuj6oedFKV0s3fX6sX1S3bsi6a4PD7+/YAqYeBw6pIB/4qEgOqxdSPbGiim4NRRCbzs3Jj0L4UfXtQXQVRfn5IdA/Bw7RZzurEV6EtdsLeGXkIPuA+K1UoVeA0l62zmN/LqfSSft9KkepmoRuvi3nd5uKNFB9zbbXEANqdr941XO0NJx2v2jdJenpf+/3bvn0ts16ph+sd6hX7dPo2+2cZzE02Ia43bzDHqr+2Evnhz74ZHU30ffbKOeng1/NPV30Ns1gYQnSP2P6e65Pfxc6h02XZqXQCjhJ6kPL6bFo4NrGvAU4UII4SE2P1vQuZkuOxckVfehisF1MjUddN/MZBN+kvq5uf0O/xa66gyNS9ktMWlz44rO1Z8C19i5FPdHzPamXn+F3hryPfxMr78+4F+kq22kO6Rf6fUQt+puuustyWv4rbG3l/duztFB96GYoe1cTBdXMr+nw9qVM6ZfxOvzezff0nXi/ZOndvrR6Zvpm0c3h6nhdb+5iS7tsIim/qXZD9+97/Jf+rpZ5BET1ayv0GUzLhEuhBBjIy/RdVPgndutIRt9nt7p5cKFEEJ3Z+jQFDZL+XnMDXxHB73gxn5s9Kc3d3/pFciFkN/QTSXHJpX5l66gDrkQoP6hL3xsPw39la4qOiV8tH78XeSbue6N9mvWa6J/ybpc1CT1Wnh5Qq9meP8IOKH3ddH7E/ri1iYux/SXDrXR4UiPdck/wUpU+FtPf6/orja6O9KL3l56LOvVxe5Ib2qjN0d6Vbex4ghWlU3bPqI90If66MNng680FNpbJijH6kCvaF3uMzQ3+IrpFerV4Y9dffQdN3im10ivbuImhD3Qq5u4HdZkua8znelMZ/pS4z9CPVKkxowNxgAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxNy0wMy0yN1QxNTo0NToxNSswMDowMN1xSg4AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTctMDMtMjdUMTU6NDU6MTUrMDA6MDCsLPKyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAABJRU5ErkJggg==";
3144
3168
  var In = /*#__PURE__*/function () {
3145
3169
  function In(e) {
3146
3170
  _classCallCheck(this, In);
@@ -3185,7 +3209,7 @@ var Me = /*#__PURE__*/function (_In) {
3185
3209
  value: function createAvatar(e, t) {
3186
3210
  var r, o, a, l, c;
3187
3211
  var i = document.createElement("img");
3188
- e === y.USER_ROLE ? (i.src = ((r = t == null ? void 0 : t.user) == null ? void 0 : r.src) || ((o = t == null ? void 0 : t["default"]) == null ? void 0 : o.src) || ss, i.onerror = Me.errorFallback.bind(this, ss)) : (i.src = ((a = t == null ? void 0 : t[e]) == null ? void 0 : a.src) || ((l = t == null ? void 0 : t.ai) == null ? void 0 : l.src) || ((c = t == null ? void 0 : t["default"]) == null ? void 0 : c.src) || Ws, i.onerror = Me.errorFallback.bind(this, Ws)), i.classList.add("avatar"), i.alt = "".concat(e, " avatar");
3212
+ e === y.USER_ROLE ? (i.src = ((r = t == null ? void 0 : t.user) == null ? void 0 : r.src) || ((o = t == null ? void 0 : t["default"]) == null ? void 0 : o.src) || ns, i.onerror = Me.errorFallback.bind(this, ns)) : (i.src = ((a = t == null ? void 0 : t[e]) == null ? void 0 : a.src) || ((l = t == null ? void 0 : t.ai) == null ? void 0 : l.src) || ((c = t == null ? void 0 : t["default"]) == null ? void 0 : c.src) || Ws, i.onerror = Me.errorFallback.bind(this, Ws)), i.classList.add("avatar"), i.alt = "".concat(e, " avatar");
3189
3213
  var s = document.createElement("div");
3190
3214
  return s.classList.add(this.className), s.appendChild(i), t && Me.applyCustomStyles(s, i, t, e), s;
3191
3215
  }
@@ -3267,7 +3291,7 @@ var Z = /*#__PURE__*/function () {
3267
3291
  var _this5 = this;
3268
3292
  _classCallCheck(this, Z);
3269
3293
  var t;
3270
- this.messageElementRefs = [], this.htmlClassUtilities = {}, this.messageToElements = [], this.elementRef = Z.createContainerElement(), this.messageStyles = te.processMessageStyles(e.messageStyles), this._remarkable = ti.createNew(e.remarkable), e.avatars && (this.avatar = new Me(e.avatars)), e.names && (this.name = new Gt(e.names)), this._onMessage = ii.onMessage.bind(this, e), e.htmlClassUtilities && (this.htmlClassUtilities = e.htmlClassUtilities), this.focusMode = e.focusMode, this.focusMode || (this._lastGroupMessagesElement = document.createElement("div")), typeof this.focusMode != "boolean" && (t = this.focusMode) != null && t.fade && Ei.setFade(this.elementRef, this.focusMode.fade), setTimeout(function () {
3294
+ this.messageElementRefs = [], this.htmlClassUtilities = {}, this.messageToElements = [], this.elementRef = Z.createContainerElement(), this.messageStyles = te.processMessageStyles(e.messageStyles), this._remarkable = ti.createNew(e.remarkable), e.avatars && (this.avatar = new Me(e.avatars)), e.names && (this.name = new Gt(e.names)), e.browserStorage && (this.browserStorage = new Lo(e.browserStorage)), this._onMessage = ii.onMessage.bind(this, e), e.htmlClassUtilities && (this.htmlClassUtilities = e.htmlClassUtilities), this.focusMode = e.focusMode, this.focusMode || (this._lastGroupMessagesElement = document.createElement("div")), typeof this.focusMode != "boolean" && (t = this.focusMode) != null && t.fade && Ei.setFade(this.elementRef, this.focusMode.fade), setTimeout(function () {
3271
3295
  _this5.submitUserMessage = e.submitUserMessage;
3272
3296
  });
3273
3297
  }
@@ -3729,13 +3753,17 @@ var pe = /*#__PURE__*/function () {
3729
3753
  }, {
3730
3754
  key: "setInitialState",
3731
3755
  value: function setInitialState(e, t, i) {
3732
- var o, a;
3756
+ var o, a, l;
3733
3757
  this._streamType = e, i !== null && i !== void 0 ? i : i = y.AI_ROLE;
3734
3758
  var s = ((o = this._customWrappers) == null ? void 0 : o[i]) || ((a = this._customWrappers) == null ? void 0 : a["default"]),
3735
3759
  r = s ? "" : t;
3736
3760
  this._elements = e === "text" ? this._messages.addNewTextMessage(r, i) : xe.add(this._messages, r, i), this._elements && (this._elements.bubbleElement.classList.add(pe.MESSAGE_CLASS), this._activeMessageRole = i, this._message = _defineProperty({
3737
3761
  role: this._activeMessageRole
3738
- }, e, r), this._messages.messageToElements.push([this._message, _defineProperty({}, e, this._elements)]), s && this.setTargetWrapperIfNeeded(this._elements, t, this._streamType, s));
3762
+ }, e, r), this._messages.messageToElements.push([this._message, _defineProperty({}, e, this._elements)]), (l = this._messages.browserStorage) == null || l.addMessages(this._messages.messageToElements.map(function (_ref5) {
3763
+ var _ref6 = _slicedToArray(_ref5, 1),
3764
+ c = _ref6[0];
3765
+ return c;
3766
+ })), s && this.setTargetWrapperIfNeeded(this._elements, t, this._streamType, s));
3739
3767
  }
3740
3768
  }, {
3741
3769
  key: "setTargetWrapperIfNeeded",
@@ -3753,13 +3781,13 @@ var pe = /*#__PURE__*/function () {
3753
3781
  }, {
3754
3782
  key: "updateText",
3755
3783
  value: function updateText(e, t, i) {
3756
- this._message && (this._message.text = i ? e : this._message.text + e, this._partialRender && this.isNewPartialRenderParagraph() && this.partialRenderNewParagraph(t), this._partialBubble ? this.partialRenderBubbleUpdate(e) : this._messages.renderText(t, this._message.text));
3784
+ this._message && (this._message.text = i ? e : this._message.text + e, this._partialRender && this.isNewPartialRenderParagraph(t, i) && this.partialRenderNewParagraph(t), this._partialBubble ? this.partialRenderBubbleUpdate(e) : this._messages.renderText(t, this._message.text));
3757
3785
  }
3758
3786
  }, {
3759
3787
  key: "isNewPartialRenderParagraph",
3760
- value: function isNewPartialRenderParagraph() {
3761
- var e, t;
3762
- return this._partialBubble ? this._partialText && ((t = this._partialText) == null ? void 0 : t.indexOf(pe.PARTIAL_RENDER_TEXT_MARK)) > -1 : ((e = this._message) == null ? void 0 : e.text) && this._message.text.indexOf(pe.PARTIAL_RENDER_TEXT_MARK) > -1;
3788
+ value: function isNewPartialRenderParagraph(e, t) {
3789
+ var i, s;
3790
+ return t ? (e.innerHTML = "", !0) : this._partialBubble ? this._partialText && ((s = this._partialText) == null ? void 0 : s.indexOf(pe.PARTIAL_RENDER_TEXT_MARK)) > -1 : ((i = this._message) == null ? void 0 : i.text) && this._message.text.indexOf(pe.PARTIAL_RENDER_TEXT_MARK) > -1;
3763
3791
  }
3764
3792
  }, {
3765
3793
  key: "partialRenderNewParagraph",
@@ -3831,7 +3859,7 @@ var pe = /*#__PURE__*/function () {
3831
3859
  }]);
3832
3860
  }();
3833
3861
  pe.MESSAGE_CLASS = "streamed-message", pe.PARTIAL_RENDER_TEXT_MARK = "\n\n", pe.TARGET_WRAPPER_CLASS = "stream-wrapper";
3834
- var we = pe;
3862
+ var Ae = pe;
3835
3863
  var qe = /*#__PURE__*/function () {
3836
3864
  function qe() {
3837
3865
  _classCallCheck(this, qe);
@@ -4030,11 +4058,11 @@ var qe = /*#__PURE__*/function () {
4030
4058
  }();
4031
4059
  qe.CONTENT_TYPE = "Content-Type";
4032
4060
  var E = qe;
4033
- function Lo(_x14, _x15) {
4034
- return _Lo.apply(this, arguments);
4061
+ function Io(_x14, _x15) {
4062
+ return _Io.apply(this, arguments);
4035
4063
  }
4036
- function _Lo() {
4037
- _Lo = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee136(n, e) {
4064
+ function _Io() {
4065
+ _Io = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee136(n, e) {
4038
4066
  var t, i;
4039
4067
  return _regeneratorRuntime().wrap(function _callee136$(_context136) {
4040
4068
  while (1) switch (_context136.prev = _context136.next) {
@@ -4058,15 +4086,15 @@ function _Lo() {
4058
4086
  }
4059
4087
  }, _callee136);
4060
4088
  }));
4061
- return _Lo.apply(this, arguments);
4089
+ return _Io.apply(this, arguments);
4062
4090
  }
4063
- function Io(n) {
4091
+ function Oo(n) {
4064
4092
  var e,
4065
4093
  t,
4066
4094
  i,
4067
4095
  s = !1;
4068
4096
  return function (o) {
4069
- e === void 0 ? (e = o, t = 0, i = -1) : e = Po(e, o);
4097
+ e === void 0 ? (e = o, t = 0, i = -1) : e = No(e, o);
4070
4098
  var a = e.length;
4071
4099
  var l = 0;
4072
4100
  for (; t < a;) {
@@ -4088,7 +4116,7 @@ function Io(n) {
4088
4116
  l === a ? e = void 0 : l !== 0 && (e = e.subarray(l), t -= l);
4089
4117
  };
4090
4118
  }
4091
- function Oo(n, e, t) {
4119
+ function Po(n, e, t) {
4092
4120
  var i = $s();
4093
4121
  var s = new TextDecoder();
4094
4122
  return function (o, a) {
@@ -4114,7 +4142,7 @@ function Oo(n, e, t) {
4114
4142
  }
4115
4143
  };
4116
4144
  }
4117
- function Po(n, e) {
4145
+ function No(n, e) {
4118
4146
  var t = new Uint8Array(n.length + e.length);
4119
4147
  return t.set(n), t.set(e, n.length), t;
4120
4148
  }
@@ -4126,16 +4154,16 @@ function $s() {
4126
4154
  retry: void 0
4127
4155
  };
4128
4156
  }
4129
- var No = function No(n, e) {
4157
+ var Do = function Do(n, e) {
4130
4158
  var t = {};
4131
4159
  for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && e.indexOf(i) < 0 && (t[i] = n[i]);
4132
4160
  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]]);
4133
4161
  return t;
4134
4162
  };
4135
- var ns = "text/event-stream",
4136
- Do = 1e3,
4163
+ var rs = "text/event-stream",
4164
+ Bo = 1e3,
4137
4165
  Js = "last-event-id";
4138
- function Bo(n, e) {
4166
+ function Fo(n, e) {
4139
4167
  var t = e.signal,
4140
4168
  i = e.headers,
4141
4169
  s = e.onopen,
@@ -4144,16 +4172,16 @@ function Bo(n, e) {
4144
4172
  a = e.onerror,
4145
4173
  l = e.openWhenHidden,
4146
4174
  c = e.fetch,
4147
- d = No(e, ["signal", "headers", "onopen", "onmessage", "onclose", "onerror", "openWhenHidden", "fetch"]);
4175
+ d = Do(e, ["signal", "headers", "onopen", "onmessage", "onclose", "onerror", "openWhenHidden", "fetch"]);
4148
4176
  return new Promise(function (u, h) {
4149
4177
  var f = Object.assign({}, i);
4150
- f.accept || (f.accept = ns);
4178
+ f.accept || (f.accept = rs);
4151
4179
  var m;
4152
4180
  function p() {
4153
4181
  m.abort(), document.hidden || ae();
4154
4182
  }
4155
4183
  l || document.addEventListener("visibilitychange", p);
4156
- var g = Do,
4184
+ var g = Bo,
4157
4185
  b = 0;
4158
4186
  function M() {
4159
4187
  document.removeEventListener("visibilitychange", p), window.clearTimeout(b), m.abort();
@@ -4162,7 +4190,7 @@ function Bo(n, e) {
4162
4190
  M(), u();
4163
4191
  });
4164
4192
  var Y = c !== null && c !== void 0 ? c : window.fetch,
4165
- He = s !== null && s !== void 0 ? s : Fo;
4193
+ He = s !== null && s !== void 0 ? s : Uo;
4166
4194
  function ae() {
4167
4195
  return _ae.apply(this, arguments);
4168
4196
  }
@@ -4185,7 +4213,7 @@ function Bo(n, e) {
4185
4213
  return He(Ee);
4186
4214
  case 7:
4187
4215
  _context6.next = 9;
4188
- return Lo(Ee.body, Io(Oo(function (ie) {
4216
+ return Io(Ee.body, Oo(Po(function (ie) {
4189
4217
  ie ? f[Js] = ie : delete f[Js];
4190
4218
  }, function (ie) {
4191
4219
  g = ie;
@@ -4216,15 +4244,15 @@ function Bo(n, e) {
4216
4244
  ae();
4217
4245
  });
4218
4246
  }
4219
- function Fo(n) {
4247
+ function Uo(n) {
4220
4248
  var e = n.headers.get("content-type");
4221
- if (!(e != null && e.startsWith(ns))) throw new Error("Expected content-type to be ".concat(ns, ", Actual: ").concat(e));
4249
+ if (!(e != null && e.startsWith(rs))) throw new Error("Expected content-type to be ".concat(rs, ", Actual: ").concat(e));
4222
4250
  }
4223
- var w = /*#__PURE__*/function () {
4224
- function w() {
4225
- _classCallCheck(this, w);
4251
+ var A = /*#__PURE__*/function () {
4252
+ function A() {
4253
+ _classCallCheck(this, A);
4226
4254
  }
4227
- return _createClass(w, null, [{
4255
+ return _createClass(A, null, [{
4228
4256
  key: "request",
4229
4257
  value: // prettier-ignore
4230
4258
  function () {
@@ -4279,13 +4307,13 @@ var w = /*#__PURE__*/function () {
4279
4307
  }
4280
4308
  return _context7.abrupt("return", ye.requestStream(i, e));
4281
4309
  case 15:
4282
- d = new we(i, e.stream), u = E.fetch.bind(this, e, l, s), h = {
4310
+ d = new Ae(i, e.stream), u = E.fetch.bind(this, e, l, s), h = {
4283
4311
  method: ((g = e.connectSettings) == null ? void 0 : g.method) || "POST",
4284
4312
  headers: l,
4285
4313
  credentials: (b = e.connectSettings) == null ? void 0 : b.credentials,
4286
4314
  body: s ? JSON.stringify(a) : a
4287
4315
  };
4288
- return _context7.abrupt("return", (_typeof(e.stream) == "object" && e.stream.readable ? w.handleReadableStream(e, i, d, h, r, u, a) : w.handleEventStream(e, i, d, h, r, u, a), d));
4316
+ return _context7.abrupt("return", (_typeof(e.stream) == "object" && e.stream.readable ? A.handleReadableStream(e, i, d, h, r, u, a) : A.handleEventStream(e, i, d, h, r, u, a), d));
4289
4317
  case 17:
4290
4318
  case "end":
4291
4319
  return _context7.stop();
@@ -4307,7 +4335,7 @@ var w = /*#__PURE__*/function () {
4307
4335
  d = _e$streamHandlers.abortStream;
4308
4336
  var u = !1;
4309
4337
  fetch(((h = e.connectSettings) == null ? void 0 : h.url) || e.url || "", s).then(/*#__PURE__*/function () {
4310
- var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(f) {
4338
+ var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(f) {
4311
4339
  var b, M, m, p, g, _yield$m$read, Y, He, ae, Re, Ee;
4312
4340
  return _regeneratorRuntime().wrap(function _callee8$(_context8) {
4313
4341
  while (1) switch (_context8.prev = _context8.next) {
@@ -4336,7 +4364,7 @@ var w = /*#__PURE__*/function () {
4336
4364
  _context8.next = 15;
4337
4365
  break;
4338
4366
  }
4339
- w.handleClose(e, i, c, r);
4367
+ A.handleClose(e, i, c, r);
4340
4368
  _context8.next = 24;
4341
4369
  break;
4342
4370
  case 15:
@@ -4357,7 +4385,7 @@ var w = /*#__PURE__*/function () {
4357
4385
  Ee = _typeof(Re) == "object" ? Re : {
4358
4386
  text: ae
4359
4387
  };
4360
- w.handleMessage(e, t, i, c, Ee, o, a);
4388
+ A.handleMessage(e, t, i, c, Ee, o, a);
4361
4389
  case 24:
4362
4390
  _context8.next = 5;
4363
4391
  break;
@@ -4368,10 +4396,10 @@ var w = /*#__PURE__*/function () {
4368
4396
  }, _callee8);
4369
4397
  }));
4370
4398
  return function (_x19) {
4371
- return _ref5.apply(this, arguments);
4399
+ return _ref7.apply(this, arguments);
4372
4400
  };
4373
4401
  }())["catch"](function (f) {
4374
- w.handleError(e, t, f);
4402
+ A.handleError(e, t, f);
4375
4403
  }), d.abort = function () {
4376
4404
  u = !0;
4377
4405
  };
@@ -4385,7 +4413,7 @@ var w = /*#__PURE__*/function () {
4385
4413
  l = _e$streamHandlers2.onOpen,
4386
4414
  c = _e$streamHandlers2.onClose,
4387
4415
  d = _e$streamHandlers2.abortStream;
4388
- Bo(((u = e.connectSettings) == null ? void 0 : u.url) || e.url || "", _objectSpread(_objectSpread({}, s), {}, {
4416
+ Fo(((u = e.connectSettings) == null ? void 0 : u.url) || e.url || "", _objectSpread(_objectSpread({}, s), {}, {
4389
4417
  openWhenHidden: !0,
4390
4418
  // keep stream open when browser tab not open
4391
4419
  onopen: function onopen(h) {
@@ -4436,7 +4464,7 @@ var w = /*#__PURE__*/function () {
4436
4464
  _context0.t0 = p;
4437
4465
  case 7:
4438
4466
  g = _context0.t0;
4439
- w.handleMessage(e, t, i, c, g, o, a);
4467
+ A.handleMessage(e, t, i, c, g, o, a);
4440
4468
  case 9:
4441
4469
  case "end":
4442
4470
  return _context0.stop();
@@ -4448,11 +4476,11 @@ var w = /*#__PURE__*/function () {
4448
4476
  throw c(), h;
4449
4477
  },
4450
4478
  onclose: function onclose() {
4451
- w.handleClose(e, i, c, r);
4479
+ A.handleClose(e, i, c, r);
4452
4480
  },
4453
4481
  signal: d.signal
4454
4482
  }))["catch"](function (h) {
4455
- w.handleError(e, t, h);
4483
+ A.handleError(e, t, h);
4456
4484
  });
4457
4485
  }
4458
4486
  //prettier-ignore
@@ -4461,7 +4489,7 @@ var w = /*#__PURE__*/function () {
4461
4489
  value: function handleMessage(e, t, i, s, r, o, a) {
4462
4490
  var l;
4463
4491
  (l = e.extractResultData) == null || l.call(e, r, o, a).then(function (c) {
4464
- e.asyncCallInProgress && c && c.text !== "" ? (w.simulate(t, e.streamHandlers, c), s(), e.asyncCallInProgress = !1) : w.upsertWFiles(t, i.upsertStreamedMessage.bind(i), i, c);
4492
+ e.asyncCallInProgress && c && c.text !== "" ? (A.simulate(t, e.streamHandlers, c), s(), e.asyncCallInProgress = !1) : A.upsertWFiles(t, i.upsertStreamedMessage.bind(i), i, c);
4465
4493
  })["catch"](function (c) {
4466
4494
  return E.displayError(t, c);
4467
4495
  });
@@ -4527,15 +4555,15 @@ var w = /*#__PURE__*/function () {
4527
4555
  case 10:
4528
4556
  if (i.text) {
4529
4557
  t.onOpen();
4530
- _o2 = i.text.split(""), a = new we(e, s == null ? void 0 : s.stream);
4531
- w.populateMessages(e, _o2, a, r, "text", 0, s);
4558
+ _o2 = i.text.split(""), a = new Ae(e, s == null ? void 0 : s.stream);
4559
+ A.populateMessages(e, _o2, a, r, "text", 0, s);
4532
4560
  }
4533
4561
  if (i.html) {
4534
4562
  t.onOpen();
4535
4563
  _o3 = G.splitHTML(i.html);
4536
4564
  _o3.length === 0 && (_o3 = i.html.split(""));
4537
- _a2 = new we(e, s == null ? void 0 : s.stream);
4538
- w.populateMessages(e, _o3, _a2, r, "html", 0, s);
4565
+ _a2 = new Ae(e, s == null ? void 0 : s.stream);
4566
+ A.populateMessages(e, _o3, _a2, r, "html", 0, s);
4539
4567
  }
4540
4568
  i.error && (E.displayError(e, i.error), t.onClose());
4541
4569
  case 13:
@@ -4569,12 +4597,12 @@ var w = /*#__PURE__*/function () {
4569
4597
  });
4570
4598
  case 4:
4571
4599
  c = _context10.sent;
4572
- w.upsertWFiles(e, i.upsertStreamedMessage.bind(i), i, c);
4600
+ A.upsertWFiles(e, i.upsertStreamedMessage.bind(i), i, c);
4573
4601
  d = setTimeout(function () {
4574
- w.populateMessages(e, t, i, s, r, o + 1, a);
4602
+ A.populateMessages(e, t, i, s, r, o + 1, a);
4575
4603
  }, s.simulationInterim || 6);
4576
4604
  s.abortStream.abort = function () {
4577
- w.abort(d, i, s.onClose);
4605
+ A.abort(d, i, s.onClose);
4578
4606
  };
4579
4607
  _context10.next = 11;
4580
4608
  break;
@@ -4599,7 +4627,7 @@ var w = /*#__PURE__*/function () {
4599
4627
  }, {
4600
4628
  key: "isSimulatable",
4601
4629
  value: function isSimulatable(e, t) {
4602
- return w.isSimulation(e) && t && (t.text || t.html);
4630
+ return A.isSimulation(e) && t && (t.text || t.html);
4603
4631
  }
4604
4632
  }, {
4605
4633
  key: "abort",
@@ -4645,9 +4673,9 @@ var Ze = /*#__PURE__*/function () {
4645
4673
  }
4646
4674
  }, {
4647
4675
  key: "getResponse",
4648
- value: function getResponse(_ref6) {
4649
- var e = _ref6.customDemoResponse,
4650
- t = _ref6.messageToElements;
4676
+ value: function getResponse(_ref8) {
4677
+ var e = _ref8.customDemoResponse,
4678
+ t = _ref8.messageToElements;
4651
4679
  return e ? Ze.getCustomResponse(e, t[t.length - 1][0]) : {
4652
4680
  text: Ze.generateResponse(t)
4653
4681
  };
@@ -4677,7 +4705,7 @@ var Ze = /*#__PURE__*/function () {
4677
4705
  r = Array.isArray(s) ? s : [s], o = r.find(function (a) {
4678
4706
  return typeof a.error == "string";
4679
4707
  });
4680
- o ? (t.addNewErrorMessage("service", o.error), e.completionsHandlers.onFinish()) : w.isSimulatable(e.stream, s) ? w.simulate(t, e.streamHandlers, s) : (r.forEach(function (a) {
4708
+ o ? (t.addNewErrorMessage("service", o.error), e.completionsHandlers.onFinish()) : A.isSimulatable(e.stream, s) ? A.simulate(t, e.streamHandlers, s) : (r.forEach(function (a) {
4681
4709
  return t.addNewMessage(a);
4682
4710
  }), e.completionsHandlers.onFinish());
4683
4711
  case 7:
@@ -4693,7 +4721,7 @@ var Ze = /*#__PURE__*/function () {
4693
4721
  value: function requestStream(e, t) {
4694
4722
  setTimeout(function () {
4695
4723
  var i = Ze.getResponse(e);
4696
- w.simulate(e, t.streamHandlers, i, t);
4724
+ A.simulate(e, t.streamHandlers, i, t);
4697
4725
  }, 400);
4698
4726
  }
4699
4727
  }]);
@@ -4751,7 +4779,7 @@ var q = /*#__PURE__*/function () {
4751
4779
  var _this8 = this;
4752
4780
  var s = {};
4753
4781
  t.onmessage = /*#__PURE__*/function () {
4754
- var _ref8 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee12(r) {
4782
+ var _ref0 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee12(r) {
4755
4783
  var o, a, l, c, _l, _c;
4756
4784
  return _regeneratorRuntime().wrap(function _callee12$(_context12) {
4757
4785
  while (1) switch (_context12.prev = _context12.next) {
@@ -4775,12 +4803,12 @@ var q = /*#__PURE__*/function () {
4775
4803
  }
4776
4804
  throw Error(k.INVALID_RESPONSE(o, "server", !!e.deepChat.responseInterceptor, a));
4777
4805
  case 8:
4778
- if (!w.isSimulation(e.stream)) {
4806
+ if (!A.isSimulation(e.stream)) {
4779
4807
  _context12.next = 13;
4780
4808
  break;
4781
4809
  }
4782
4810
  l = q.stream.bind(_this8, e, i, s), c = s[o.role || y.AI_ROLE];
4783
- w.upsertWFiles(i, l, c, a);
4811
+ A.upsertWFiles(i, l, c, a);
4784
4812
  _context12.next = 17;
4785
4813
  break;
4786
4814
  case 13:
@@ -4810,7 +4838,7 @@ var q = /*#__PURE__*/function () {
4810
4838
  }, _callee12, null, [[1, 19]]);
4811
4839
  }));
4812
4840
  return function (_x31) {
4813
- return _ref8.apply(this, arguments);
4841
+ return _ref0.apply(this, arguments);
4814
4842
  };
4815
4843
  }(), t.onclose = function () {
4816
4844
  console.error("Connection closed"), i.isLastMessageError() || i.addNewErrorMessage("service", "Connection error"), e.stream && e.streamHandlers.abortStream.abort(), q.createConnection(e, i);
@@ -4902,8 +4930,8 @@ var q = /*#__PURE__*/function () {
4902
4930
  var _i$o;
4903
4931
  var o = s.role || y.AI_ROLE,
4904
4932
  a = i[o];
4905
- s.text === r || s.html === r ? (a == null || a.finaliseStreamedMessage(), delete i[o]) : ((_i$o = i[o]) !== null && _i$o !== void 0 ? _i$o : i[o] = new we(t, e.stream), i[o].upsertStreamedMessage(s));
4906
- } else w.simulate(t, e.streamHandlers, s);
4933
+ 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 Ae(t, e.stream), i[o].upsertStreamedMessage(s));
4934
+ } else A.simulate(t, e.streamHandlers, s);
4907
4935
  }
4908
4936
  }]);
4909
4937
  }();
@@ -4921,7 +4949,7 @@ var ve = /*#__PURE__*/function () {
4921
4949
  case 0:
4922
4950
  s = !0;
4923
4951
  r = /*#__PURE__*/function () {
4924
- var _ref9 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee14(c) {
4952
+ var _ref1 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee14(c) {
4925
4953
  var d, u, h;
4926
4954
  return _regeneratorRuntime().wrap(function _callee14$(_context14) {
4927
4955
  while (1) switch (_context14.prev = _context14.next) {
@@ -4944,7 +4972,7 @@ var ve = /*#__PURE__*/function () {
4944
4972
  u = Array.isArray(d) ? d : [d], h = u.find(function (f) {
4945
4973
  return typeof f.error == "string";
4946
4974
  });
4947
- h ? (console.error(h.error), i.addNewErrorMessage("service", h.error), e.completionsHandlers.onFinish()) : w.isSimulatable(e.stream, d) ? w.simulate(i, e.streamHandlers, d) : (u.forEach(function (f) {
4975
+ h ? (console.error(h.error), i.addNewErrorMessage("service", h.error), e.completionsHandlers.onFinish()) : A.isSimulatable(e.stream, d) ? A.simulate(i, e.streamHandlers, d) : (u.forEach(function (f) {
4948
4976
  return i.addNewMessage(f);
4949
4977
  }), e.completionsHandlers.onFinish());
4950
4978
  }
@@ -4955,7 +4983,7 @@ var ve = /*#__PURE__*/function () {
4955
4983
  }, _callee14);
4956
4984
  }));
4957
4985
  return function r(_x38) {
4958
- return _ref9.apply(this, arguments);
4986
+ return _ref1.apply(this, arguments);
4959
4987
  };
4960
4988
  }(), o = ve.generateOptionalSignals();
4961
4989
  (l = (a = e.connectSettings).handler) == null || l.call(a, t, _objectSpread(_objectSpread({}, o), {}, {
@@ -4989,7 +5017,7 @@ var ve = /*#__PURE__*/function () {
4989
5017
  var u, h;
4990
5018
  var s = !0,
4991
5019
  r = !1;
4992
- var o = new we(i, e.stream),
5020
+ var o = new Ae(i, e.stream),
4993
5021
  a = function a() {
4994
5022
  r || !s || (e.streamHandlers.onOpen(), r = !0);
4995
5023
  },
@@ -4997,7 +5025,7 @@ var ve = /*#__PURE__*/function () {
4997
5025
  s && (ve.attemptToFinaliseStream(o, i), e.streamHandlers.onClose(), s = !1);
4998
5026
  },
4999
5027
  c = /*#__PURE__*/function () {
5000
- var _ref0 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee16(f) {
5028
+ var _ref10 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee16(f) {
5001
5029
  var m, p;
5002
5030
  return _regeneratorRuntime().wrap(function _callee16$(_context16) {
5003
5031
  while (1) switch (_context16.prev = _context16.next) {
@@ -5015,7 +5043,7 @@ var ve = /*#__PURE__*/function () {
5015
5043
  });
5016
5044
  case 4:
5017
5045
  m = _context16.sent;
5018
- if (m) m.error ? (ve.streamError(m.error, o, e, i), s = !1) : w.upsertWFiles(i, o.upsertStreamedMessage.bind(o), o, m);else {
5046
+ if (m) m.error ? (ve.streamError(m.error, o, e, i), s = !1) : A.upsertWFiles(i, o.upsertStreamedMessage.bind(o), o, m);else {
5019
5047
  p = k.INVALID_RESPONSE(f, "server", !!e.deepChat.responseInterceptor, m);
5020
5048
  ve.streamError(p, o, e, i), s = !1;
5021
5049
  }
@@ -5026,7 +5054,7 @@ var ve = /*#__PURE__*/function () {
5026
5054
  }, _callee16);
5027
5055
  }));
5028
5056
  return function c(_x39) {
5029
- return _ref0.apply(this, arguments);
5057
+ return _ref10.apply(this, arguments);
5030
5058
  };
5031
5059
  }();
5032
5060
  e.streamHandlers.abortStream.abort = function () {
@@ -5066,7 +5094,7 @@ var ve = /*#__PURE__*/function () {
5066
5094
  i.isOpen = !1;
5067
5095
  },
5068
5096
  o = /*#__PURE__*/function () {
5069
- var _ref1 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee17(d) {
5097
+ var _ref11 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee17(d) {
5070
5098
  var u, h, f, m, p, g;
5071
5099
  return _regeneratorRuntime().wrap(function _callee17$(_context17) {
5072
5100
  while (1) switch (_context17.prev = _context17.next) {
@@ -5088,9 +5116,9 @@ var ve = /*#__PURE__*/function () {
5088
5116
  h = Array.isArray(u) ? u : [u], f = h.find(function (m) {
5089
5117
  return typeof m.error == "string";
5090
5118
  });
5091
- if (f) console.error(f.error), t.isLastMessageError() || t.addNewErrorMessage("service", f.error);else if (w.isSimulation(e.stream)) {
5119
+ if (f) console.error(f.error), t.isLastMessageError() || t.addNewErrorMessage("service", f.error);else if (A.isSimulation(e.stream)) {
5092
5120
  m = u, p = q.stream.bind(_this9, e, t, i.roleToStream), g = i.roleToStream[m.role || y.AI_ROLE];
5093
- w.upsertWFiles(t, p, g, m);
5121
+ A.upsertWFiles(t, p, g, m);
5094
5122
  } else h.forEach(function (m) {
5095
5123
  return t.addNewMessage(m);
5096
5124
  });
@@ -5102,7 +5130,7 @@ var ve = /*#__PURE__*/function () {
5102
5130
  }, _callee17);
5103
5131
  }));
5104
5132
  return function o(_x40) {
5105
- return _ref1.apply(this, arguments);
5133
+ return _ref11.apply(this, arguments);
5106
5134
  };
5107
5135
  }(),
5108
5136
  a = ve.generateOptionalSignals();
@@ -5192,7 +5220,7 @@ var R = /*#__PURE__*/function () {
5192
5220
  }).then(function (p) {
5193
5221
  return E.processResponseByType(p);
5194
5222
  }).then(/*#__PURE__*/function () {
5195
- var _ref10 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee18(p) {
5223
+ var _ref12 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee18(p) {
5196
5224
  var M, Y, g, b;
5197
5225
  return _regeneratorRuntime().wrap(function _callee18$(_context18) {
5198
5226
  while (1) switch (_context18.prev = _context18.next) {
@@ -5230,7 +5258,7 @@ var R = /*#__PURE__*/function () {
5230
5258
  }
5231
5259
  throw Error(k.INVALID_RESPONSE(p, "response", !!e.deepChat.responseInterceptor, g));
5232
5260
  case 15:
5233
- b.makingAnotherRequest || (w.isSimulatable(e.stream, b) ? w.simulate(i, e.streamHandlers, b) : ((Array.isArray(b) ? b : [b]).forEach(function (ae) {
5261
+ b.makingAnotherRequest || (A.isSimulatable(e.stream, b) ? A.simulate(i, e.streamHandlers, b) : ((Array.isArray(b) ? b : [b]).forEach(function (ae) {
5234
5262
  return i.addNewMessage(ae);
5235
5263
  }), c()));
5236
5264
  case 16:
@@ -5240,7 +5268,7 @@ var R = /*#__PURE__*/function () {
5240
5268
  }, _callee18);
5241
5269
  }));
5242
5270
  return function (_x44) {
5243
- return _ref10.apply(this, arguments);
5271
+ return _ref12.apply(this, arguments);
5244
5272
  };
5245
5273
  }())["catch"](function (p) {
5246
5274
  E.displayError(i, p), c();
@@ -5263,7 +5291,7 @@ var R = /*#__PURE__*/function () {
5263
5291
  fetch(t, i).then(function (o) {
5264
5292
  return o.json();
5265
5293
  }).then(/*#__PURE__*/function () {
5266
- var _ref11 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee20(o) {
5294
+ var _ref13 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee20(o) {
5267
5295
  var l, c, a;
5268
5296
  return _regeneratorRuntime().wrap(function _callee20$(_context20) {
5269
5297
  while (1) switch (_context20.prev = _context20.next) {
@@ -5292,7 +5320,7 @@ var R = /*#__PURE__*/function () {
5292
5320
  a = _context20.sent;
5293
5321
  a.timeoutMS ? setTimeout(function () {
5294
5322
  R.executePollRequest(e, t, i, s);
5295
- }, a.timeoutMS) : w.isSimulatable(e.stream, a) ? w.simulate(s, e.streamHandlers, a) : (s.addNewMessage(a), r());
5323
+ }, a.timeoutMS) : A.isSimulatable(e.stream, a) ? A.simulate(s, e.streamHandlers, a) : (s.addNewMessage(a), r());
5296
5324
  case 13:
5297
5325
  case "end":
5298
5326
  return _context20.stop();
@@ -5300,7 +5328,7 @@ var R = /*#__PURE__*/function () {
5300
5328
  }, _callee20);
5301
5329
  }));
5302
5330
  return function (_x45) {
5303
- return _ref11.apply(this, arguments);
5331
+ return _ref13.apply(this, arguments);
5304
5332
  };
5305
5333
  }())["catch"](function (o) {
5306
5334
  E.displayError(s, o), r();
@@ -5559,12 +5587,12 @@ var ze = /*#__PURE__*/function () {
5559
5587
  key: "setupInitialHistory",
5560
5588
  value: function () {
5561
5589
  var _setupInitialHistory = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee26(e) {
5562
- var t;
5590
+ var i, t;
5563
5591
  return _regeneratorRuntime().wrap(function _callee26$(_context26) {
5564
5592
  while (1) switch (_context26.prev = _context26.next) {
5565
5593
  case 0:
5566
5594
  e.loadHistory && this.loadInitialHistory(e.loadHistory);
5567
- t = e.history || te.processHistory(e);
5595
+ t = e.history || te.processHistory(e) || ((i = this._messages.browserStorage) == null ? void 0 : i.get());
5568
5596
  t && (this.populateInitialHistory(t), this._index += 1);
5569
5597
  case 3:
5570
5598
  case "end":
@@ -5769,7 +5797,7 @@ var rt = /*#__PURE__*/function () {
5769
5797
  while (1) switch (_context27.prev = _context27.next) {
5770
5798
  case 0:
5771
5799
  i = _args27.length > 2 && _args27[2] !== undefined ? _args27[2] : !0;
5772
- return _context27.abrupt("return", this.stream && !w.isSimulation(this.stream) ? w.request(this, e, t, i) : R.request(this, e, t, i));
5800
+ return _context27.abrupt("return", this.stream && !A.isSimulation(this.stream) ? A.request(this, e, t, i) : R.request(this, e, t, i));
5773
5801
  case 2:
5774
5802
  case "end":
5775
5803
  return _context27.stop();
@@ -5858,7 +5886,7 @@ var rt = /*#__PURE__*/function () {
5858
5886
  key: "callAPI",
5859
5887
  value: function () {
5860
5888
  var _callAPI = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee31(e, t) {
5861
- var i, s;
5889
+ var s, i, r;
5862
5890
  return _regeneratorRuntime().wrap(function _callee31$(_context31) {
5863
5891
  while (1) switch (_context31.prev = _context31.next) {
5864
5892
  case 0:
@@ -5868,16 +5896,16 @@ var rt = /*#__PURE__*/function () {
5868
5896
  }
5869
5897
  throw new Error("Request settings have not been set up");
5870
5898
  case 2:
5871
- i = yt.processMessages(t.messageToElements.map(function (_ref13) {
5872
- var _ref14 = _slicedToArray(_ref13, 1),
5873
- s = _ref14[0];
5874
- return s;
5899
+ i = yt.processMessages(t.messageToElements.map(function (_ref15) {
5900
+ var _ref16 = _slicedToArray(_ref15, 1),
5901
+ r = _ref16[0];
5902
+ return r;
5875
5903
  }), this.maxMessages, this.totalMessagesMaxCharLength);
5876
5904
  if (this.connectSettings.websocket && (!this.connectSettings.handler || this.connectSettings.url !== ye.URL)) {
5877
- s = _objectSpread({
5905
+ r = _objectSpread({
5878
5906
  messages: i
5879
5907
  }, this.rawBody);
5880
- q.sendWebsocket(this, s, t, !1);
5908
+ e.files && (s = this.getServiceIOByType(e.files[0])) != null && s.connect ? this.callApiWithFiles(t, i, e.files) : q.sendWebsocket(this, r, t, !1);
5881
5909
  } else this.callServiceAPI(t, i, e.files);
5882
5910
  case 4:
5883
5911
  case "end":
@@ -6068,9 +6096,9 @@ var Ie = /*#__PURE__*/function (_HTMLElement) {
6068
6096
  }]);
6069
6097
  }(/*#__PURE__*/_wrapNativeSuper(HTMLElement));
6070
6098
  Ie._attributes_ = {}, Ie._attributeToProperty_ = {};
6071
- var rs = Ie;
6072
- var Uo = "<?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",
6073
- jo = "<?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";
6099
+ var os = Ie;
6100
+ var jo = "<?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",
6101
+ Ho = "<?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";
6074
6102
  var Ue = /*#__PURE__*/function () {
6075
6103
  function Ue() {
6076
6104
  _classCallCheck(this, Ue);
@@ -6105,15 +6133,15 @@ var Ge = /*#__PURE__*/function () {
6105
6133
  value: function create(e) {
6106
6134
  var t = document.createElement("div");
6107
6135
  t.id = "visibility-icon-container";
6108
- var i = Ge.createIconElement(jo, Ge.VISIBLE_ICON_ID);
6136
+ var i = Ge.createIconElement(Ho, Ge.VISIBLE_ICON_ID);
6109
6137
  i.style.display = "none", t.appendChild(i);
6110
- var s = Ge.createIconElement(Uo, "not-visible-icon");
6138
+ var s = Ge.createIconElement(jo, "not-visible-icon");
6111
6139
  return t.appendChild(s), t.onclick = Ge.changeVisibility.bind(this, e, i, s), t;
6112
6140
  }
6113
6141
  }]);
6114
6142
  }();
6115
6143
  Ge.VISIBLE_ICON_ID = "visible-icon";
6116
- var os = Ge;
6144
+ var as = Ge;
6117
6145
  var W = /*#__PURE__*/function () {
6118
6146
  function W() {
6119
6147
  _classCallCheck(this, W);
@@ -6217,7 +6245,7 @@ var W = /*#__PURE__*/function () {
6217
6245
  i.id = "insert-key-contents";
6218
6246
  var s = W.createInput(t.insertKeyPlaceholderText),
6219
6247
  r = s.children[0],
6220
- o = os.create(r);
6248
+ o = as.create(r);
6221
6249
  s.appendChild(o), i.appendChild(s);
6222
6250
  var a = W.createStartButton(),
6223
6251
  _W$createHelpTextCont = W.createHelpTextContainer(t.keyHelpUrl, (d = t.deepChat._insertKeyViewStyles) == null ? void 0 : d.displayCautionText),
@@ -6724,10 +6752,10 @@ var Xs = {
6724
6752
  this.streamHandlers.abortStream.abort = function () {
6725
6753
  i.interruptGenerate();
6726
6754
  }, this.streamHandlers.onOpen();
6727
- s = new we(e);
6755
+ s = new Ae(e);
6728
6756
  _context39.next = 4;
6729
6757
  return i.generate(t, /*#__PURE__*/function () {
6730
- var _ref15 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee38(r, o) {
6758
+ var _ref17 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee38(r, o) {
6731
6759
  var a;
6732
6760
  return _regeneratorRuntime().wrap(function _callee38$(_context38) {
6733
6761
  while (1) switch (_context38.prev = _context38.next) {
@@ -6749,7 +6777,7 @@ var Xs = {
6749
6777
  }, _callee38);
6750
6778
  }));
6751
6779
  return function (_x77, _x78) {
6752
- return _ref15.apply(this, arguments);
6780
+ return _ref17.apply(this, arguments);
6753
6781
  };
6754
6782
  }());
6755
6783
  case 4:
@@ -7117,19 +7145,19 @@ var ci = /*#__PURE__*/function (_je) {
7117
7145
  }
7118
7146
  }]);
7119
7147
  }(je);
7120
- var Ho = /*#__PURE__*/function (_ci) {
7148
+ var qo = /*#__PURE__*/function (_ci) {
7121
7149
  // prettier-ignore
7122
- function Ho(e) {
7123
- _classCallCheck(this, Ho);
7150
+ function qo(e) {
7151
+ _classCallCheck(this, qo);
7124
7152
  var s, r, o;
7125
7153
  var t = (r = (s = e.directConnection) == null ? void 0 : s.huggingFace) == null ? void 0 : r.audioClassification,
7126
7154
  i = (o = e.directConnection) == null ? void 0 : o.huggingFace;
7127
- return _callSuper(this, Ho, [e, "Attach an audio file", "ehcalabres/wav2vec2-lg-xlsr-en-speech-emotion-recognition", t, i, {
7155
+ return _callSuper(this, qo, [e, "Attach an audio file", "ehcalabres/wav2vec2-lg-xlsr-en-speech-emotion-recognition", t, i, {
7128
7156
  audio: {}
7129
7157
  }]);
7130
7158
  }
7131
- _inherits(Ho, _ci);
7132
- return _createClass(Ho, [{
7159
+ _inherits(qo, _ci);
7160
+ return _createClass(qo, [{
7133
7161
  key: "extractPollResultData",
7134
7162
  value: function () {
7135
7163
  var _extractPollResultData = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee46(e) {
@@ -7167,18 +7195,18 @@ var Ho = /*#__PURE__*/function (_ci) {
7167
7195
  }()
7168
7196
  }]);
7169
7197
  }(ci);
7170
- var qo = /*#__PURE__*/function (_ci2) {
7171
- function qo(e) {
7172
- _classCallCheck(this, qo);
7198
+ var zo = /*#__PURE__*/function (_ci2) {
7199
+ function zo(e) {
7200
+ _classCallCheck(this, zo);
7173
7201
  var s, r, o;
7174
7202
  var t = (r = (s = e.directConnection) == null ? void 0 : s.huggingFace) == null ? void 0 : r.imageClassification,
7175
7203
  i = (o = e.directConnection) == null ? void 0 : o.huggingFace;
7176
- return _callSuper(this, qo, [e, "Attach an image file", "google/vit-base-patch16-224", t, i, {
7204
+ return _callSuper(this, zo, [e, "Attach an image file", "google/vit-base-patch16-224", t, i, {
7177
7205
  images: {}
7178
7206
  }]);
7179
7207
  }
7180
- _inherits(qo, _ci2);
7181
- return _createClass(qo, [{
7208
+ _inherits(zo, _ci2);
7209
+ return _createClass(zo, [{
7182
7210
  key: "extractPollResultData",
7183
7211
  value: function () {
7184
7212
  var _extractPollResultData2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee47(e) {
@@ -7246,21 +7274,21 @@ var Ce = /*#__PURE__*/function () {
7246
7274
  }
7247
7275
  }]);
7248
7276
  }();
7249
- var zi = /*#__PURE__*/function (_K2) {
7277
+ var Gi = /*#__PURE__*/function (_K2) {
7250
7278
  // prettier-ignore
7251
- function zi(e, t, i, s, r) {
7279
+ function Gi(e, t, i, s, r) {
7252
7280
  var _this23;
7253
- _classCallCheck(this, zi);
7254
- _this23 = _callSuper(this, zi, [e, t, i, s, r]), _this23.insertKeyPlaceholderText = "Stability AI API Key", _this23.keyHelpUrl = "https://platform.stability.ai/docs/getting-started/authentication", _this23.permittedErrorPrefixes = ["Incorrect", "invalid_"];
7281
+ _classCallCheck(this, Gi);
7282
+ _this23 = _callSuper(this, Gi, [e, t, i, s, r]), _this23.insertKeyPlaceholderText = "Stability AI API Key", _this23.keyHelpUrl = "https://platform.stability.ai/docs/getting-started/authentication", _this23.permittedErrorPrefixes = ["Incorrect", "invalid_"];
7255
7283
  return _this23;
7256
7284
  }
7257
- _inherits(zi, _K2);
7258
- return _createClass(zi);
7285
+ _inherits(Gi, _K2);
7286
+ return _createClass(Gi);
7259
7287
  }(K);
7260
- var Ai = /*#__PURE__*/function (_zi) {
7261
- function Ai(e) {
7288
+ var wi = /*#__PURE__*/function (_Gi) {
7289
+ function wi(e) {
7262
7290
  var _this24;
7263
- _classCallCheck(this, Ai);
7291
+ _classCallCheck(this, wi);
7264
7292
  var o;
7265
7293
  var t = JSON.parse(JSON.stringify(e.directConnection)),
7266
7294
  i = t == null ? void 0 : t.stabilityAI,
@@ -7272,13 +7300,13 @@ var Ai = /*#__PURE__*/function (_zi) {
7272
7300
  }
7273
7301
  }
7274
7302
  };
7275
- _this24 = _callSuper(this, Ai, [e, Ce.buildKeyVerificationDetails(), Ce.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>";
7303
+ _this24 = _callSuper(this, wi, [e, Ce.buildKeyVerificationDetails(), Ce.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>";
7276
7304
  var r = (o = t == null ? void 0 : t.stabilityAI) == null ? void 0 : o.imageToImageUpscale;
7277
- _typeof(r) == "object" && (r.engine_id && (_this24.url = "https://api.stability.ai/v1/generation/".concat(r.engine_id, "/image-to-image/upscale")), Ai.cleanConfig(r), Object.assign(_this24.rawBody, r)), _this24.canSendMessage = Ai.canSendFileMessage;
7305
+ _typeof(r) == "object" && (r.engine_id && (_this24.url = "https://api.stability.ai/v1/generation/".concat(r.engine_id, "/image-to-image/upscale")), wi.cleanConfig(r), Object.assign(_this24.rawBody, r)), _this24.canSendMessage = wi.canSendFileMessage;
7278
7306
  return _this24;
7279
7307
  }
7280
- _inherits(Ai, _zi);
7281
- return _createClass(Ai, [{
7308
+ _inherits(wi, _Gi);
7309
+ return _createClass(wi, [{
7282
7310
  key: "createFormDataBody",
7283
7311
  value: function createFormDataBody(e, t) {
7284
7312
  var i = new FormData();
@@ -7363,11 +7391,11 @@ var Ai = /*#__PURE__*/function (_zi) {
7363
7391
  return !!(t != null && t[0]);
7364
7392
  }
7365
7393
  }]);
7366
- }(zi);
7367
- var wi = /*#__PURE__*/function (_zi2) {
7368
- function wi(e) {
7394
+ }(Gi);
7395
+ var Ai = /*#__PURE__*/function (_Gi2) {
7396
+ function Ai(e) {
7369
7397
  var _this25;
7370
- _classCallCheck(this, wi);
7398
+ _classCallCheck(this, Ai);
7371
7399
  var o;
7372
7400
  var t = JSON.parse(JSON.stringify(e.directConnection)),
7373
7401
  i = t == null ? void 0 : t.stabilityAI,
@@ -7379,13 +7407,13 @@ var wi = /*#__PURE__*/function (_zi2) {
7379
7407
  }
7380
7408
  }
7381
7409
  };
7382
- _this25 = _callSuper(this, wi, [e, Ce.buildKeyVerificationDetails(), Ce.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>";
7410
+ _this25 = _callSuper(this, Ai, [e, Ce.buildKeyVerificationDetails(), Ce.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>";
7383
7411
  var r = (o = t == null ? void 0 : t.stabilityAI) == null ? void 0 : o.imageToImageMasking;
7384
- _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), wi.cleanConfig(r), Object.assign(_this25.rawBody, r)), _this25.canSendMessage = wi.canSendFileTextMessage;
7412
+ _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), Ai.cleanConfig(r), Object.assign(_this25.rawBody, r)), _this25.canSendMessage = Ai.canSendFileTextMessage;
7385
7413
  return _this25;
7386
7414
  }
7387
- _inherits(wi, _zi2);
7388
- return _createClass(wi, [{
7415
+ _inherits(Ai, _Gi2);
7416
+ return _createClass(Ai, [{
7389
7417
  key: "createFormDataBody",
7390
7418
  value: function createFormDataBody(e, t, i, s) {
7391
7419
  var r = new FormData();
@@ -7470,19 +7498,19 @@ var wi = /*#__PURE__*/function (_zi2) {
7470
7498
  return !!(t != null && t[0]) && !!(e && e.trim() !== "");
7471
7499
  }
7472
7500
  }]);
7473
- }(zi);
7474
- var zo = /*#__PURE__*/function (_ci3) {
7475
- function zo(e) {
7476
- _classCallCheck(this, zo);
7501
+ }(Gi);
7502
+ var Go = /*#__PURE__*/function (_ci3) {
7503
+ function Go(e) {
7504
+ _classCallCheck(this, Go);
7477
7505
  var s, r, o;
7478
7506
  var t = (r = (s = e.directConnection) == null ? void 0 : s.huggingFace) == null ? void 0 : r.audioSpeechRecognition,
7479
7507
  i = (o = e.directConnection) == null ? void 0 : o.huggingFace;
7480
- return _callSuper(this, zo, [e, "Attach an audio file", "facebook/wav2vec2-large-960h-lv60-self", t, i, {
7508
+ return _callSuper(this, Go, [e, "Attach an audio file", "facebook/wav2vec2-large-960h-lv60-self", t, i, {
7481
7509
  audio: {}
7482
7510
  }]);
7483
7511
  }
7484
- _inherits(zo, _ci3);
7485
- return _createClass(zo, [{
7512
+ _inherits(Go, _ci3);
7513
+ return _createClass(Go, [{
7486
7514
  key: "extractPollResultData",
7487
7515
  value: function () {
7488
7516
  var _extractPollResultData3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee52(e) {
@@ -7519,16 +7547,16 @@ var zo = /*#__PURE__*/function (_ci3) {
7519
7547
  }()
7520
7548
  }]);
7521
7549
  }(ci);
7522
- var Go = /*#__PURE__*/function (_je2) {
7523
- function Go(e) {
7524
- _classCallCheck(this, Go);
7550
+ var Vo = /*#__PURE__*/function (_je2) {
7551
+ function Vo(e) {
7552
+ _classCallCheck(this, Vo);
7525
7553
  var s, r, o;
7526
7554
  var t = (r = (s = e.directConnection) == null ? void 0 : s.huggingFace) == null ? void 0 : r.textGeneration,
7527
7555
  i = (o = e.directConnection) == null ? void 0 : o.huggingFace;
7528
- return _callSuper(this, Go, [e, "Once upon a time", "gpt2", t, i]);
7556
+ return _callSuper(this, Vo, [e, "Once upon a time", "gpt2", t, i]);
7529
7557
  }
7530
- _inherits(Go, _je2);
7531
- return _createClass(Go, [{
7558
+ _inherits(Vo, _je2);
7559
+ return _createClass(Vo, [{
7532
7560
  key: "extractResultData",
7533
7561
  value: function () {
7534
7562
  var _extractResultData4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee53(e) {
@@ -7558,18 +7586,18 @@ var Go = /*#__PURE__*/function (_je2) {
7558
7586
  }()
7559
7587
  }]);
7560
7588
  }(je);
7561
- var Vo = /*#__PURE__*/function (_je3) {
7562
- function Vo(e) {
7589
+ var Ko = /*#__PURE__*/function (_je3) {
7590
+ function Ko(e) {
7563
7591
  var _this26;
7564
- _classCallCheck(this, Vo);
7592
+ _classCallCheck(this, Ko);
7565
7593
  var s, r, o;
7566
7594
  var t = (r = (s = e.directConnection) == null ? void 0 : s.huggingFace) == null ? void 0 : r.questionAnswer,
7567
7595
  i = (o = e.directConnection) == null ? void 0 : o.huggingFace;
7568
- _this26 = _callSuper(this, Vo, [e, "Ask a question", "bert-large-uncased-whole-word-masking-finetuned-squad", t, i]), _this26.permittedErrorPrefixes = ["Authorization header", "Error in"], _this26._context = t.context;
7596
+ _this26 = _callSuper(this, Ko, [e, "Ask a question", "bert-large-uncased-whole-word-masking-finetuned-squad", t, i]), _this26.permittedErrorPrefixes = ["Authorization header", "Error in"], _this26._context = t.context;
7569
7597
  return _this26;
7570
7598
  }
7571
- _inherits(Vo, _je3);
7572
- return _createClass(Vo, [{
7599
+ _inherits(Ko, _je3);
7600
+ return _createClass(Ko, [{
7573
7601
  key: "preprocessBody",
7574
7602
  value: function preprocessBody(e, t) {
7575
7603
  var i = t[t.length - 1].text;
@@ -7612,16 +7640,16 @@ var Vo = /*#__PURE__*/function (_je3) {
7612
7640
  }()
7613
7641
  }]);
7614
7642
  }(je);
7615
- var Ko = /*#__PURE__*/function (_je4) {
7616
- function Ko(e) {
7617
- _classCallCheck(this, Ko);
7643
+ var Wo = /*#__PURE__*/function (_je4) {
7644
+ function Wo(e) {
7645
+ _classCallCheck(this, Wo);
7618
7646
  var s, r, o;
7619
7647
  var t = (r = (s = e.directConnection) == null ? void 0 : s.huggingFace) == null ? void 0 : r.summarization,
7620
7648
  i = (o = e.directConnection) == null ? void 0 : o.huggingFace;
7621
- return _callSuper(this, Ko, [e, "Insert text to summarize", "facebook/bart-large-cnn", t, i]);
7649
+ return _callSuper(this, Wo, [e, "Insert text to summarize", "facebook/bart-large-cnn", t, i]);
7622
7650
  }
7623
- _inherits(Ko, _je4);
7624
- return _createClass(Ko, [{
7651
+ _inherits(Wo, _je4);
7652
+ return _createClass(Wo, [{
7625
7653
  key: "extractResultData",
7626
7654
  value: function () {
7627
7655
  var _extractResultData6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee55(e) {
@@ -7651,20 +7679,20 @@ var Ko = /*#__PURE__*/function (_je4) {
7651
7679
  }()
7652
7680
  }]);
7653
7681
  }(je);
7654
- var Wo = /*#__PURE__*/function (_je5) {
7655
- function Wo(e) {
7682
+ var $o = /*#__PURE__*/function (_je5) {
7683
+ function $o(e) {
7656
7684
  var _this27$maxMessages;
7657
7685
  var _this27;
7658
- _classCallCheck(this, Wo);
7686
+ _classCallCheck(this, $o);
7659
7687
  var s, r, o;
7660
7688
  var t = (r = (s = e.directConnection) == null ? void 0 : s.huggingFace) == null ? void 0 : r.conversation,
7661
7689
  i = (o = e.directConnection) == null ? void 0 : o.huggingFace;
7662
- _this27 = _callSuper(this, Wo, [e, "Ask me anything!", "facebook/blenderbot-400M-distill", t, i]), (_this27$maxMessages = _this27.maxMessages) !== null && _this27$maxMessages !== void 0 ? _this27$maxMessages : _this27.maxMessages = -1;
7690
+ _this27 = _callSuper(this, $o, [e, "Ask me anything!", "facebook/blenderbot-400M-distill", t, i]), (_this27$maxMessages = _this27.maxMessages) !== null && _this27$maxMessages !== void 0 ? _this27$maxMessages : _this27.maxMessages = -1;
7663
7691
  return _this27;
7664
7692
  }
7665
7693
  // prettier-ignore
7666
- _inherits(Wo, _je5);
7667
- return _createClass(Wo, [{
7694
+ _inherits($o, _je5);
7695
+ return _createClass($o, [{
7668
7696
  key: "processMessages",
7669
7697
  value: function processMessages(e) {
7670
7698
  var t = e.filter(function (a) {
@@ -7733,7 +7761,7 @@ var Wo = /*#__PURE__*/function (_je5) {
7733
7761
  }()
7734
7762
  }]);
7735
7763
  }(je);
7736
- var Ti = /*#__PURE__*/function (_zi3) {
7764
+ var Ti = /*#__PURE__*/function (_Gi3) {
7737
7765
  function Ti(e) {
7738
7766
  var _this28;
7739
7767
  _classCallCheck(this, Ti);
@@ -7753,7 +7781,7 @@ var Ti = /*#__PURE__*/function (_zi3) {
7753
7781
  _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), Ti.cleanConfig(r), Object.assign(_this28.rawBody, r)), _this28.canSendMessage = Ti.canSendFileTextMessage;
7754
7782
  return _this28;
7755
7783
  }
7756
- _inherits(Ti, _zi3);
7784
+ _inherits(Ti, _Gi3);
7757
7785
  return _createClass(Ti, [{
7758
7786
  key: "createFormDataBody",
7759
7787
  value: function createFormDataBody(e, t, i) {
@@ -7839,17 +7867,17 @@ var Ti = /*#__PURE__*/function (_zi3) {
7839
7867
  return !!(t != null && t[0]) && !!(e && e.trim() !== "");
7840
7868
  }
7841
7869
  }]);
7842
- }(zi);
7843
- var $o = /*#__PURE__*/function (_je6) {
7844
- function $o(e) {
7845
- _classCallCheck(this, $o);
7870
+ }(Gi);
7871
+ var Jo = /*#__PURE__*/function (_je6) {
7872
+ function Jo(e) {
7873
+ _classCallCheck(this, Jo);
7846
7874
  var s, r, o;
7847
7875
  var t = (r = (s = e.directConnection) == null ? void 0 : s.huggingFace) == null ? void 0 : r.translation,
7848
7876
  i = (o = e.directConnection) == null ? void 0 : o.huggingFace;
7849
- return _callSuper(this, $o, [e, "Insert text to translate", "Helsinki-NLP/opus-tatoeba-en-ja", t, i]);
7877
+ return _callSuper(this, Jo, [e, "Insert text to translate", "Helsinki-NLP/opus-tatoeba-en-ja", t, i]);
7850
7878
  }
7851
- _inherits($o, _je6);
7852
- return _createClass($o, [{
7879
+ _inherits(Jo, _je6);
7880
+ return _createClass(Jo, [{
7853
7881
  key: "extractResultData",
7854
7882
  value: function () {
7855
7883
  var _extractResultData9 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee59(e) {
@@ -7879,7 +7907,7 @@ var $o = /*#__PURE__*/function (_je6) {
7879
7907
  }()
7880
7908
  }]);
7881
7909
  }(je);
7882
- var Ci = /*#__PURE__*/function (_zi4) {
7910
+ var Ci = /*#__PURE__*/function (_Gi4) {
7883
7911
  function Ci(e) {
7884
7912
  var _this29;
7885
7913
  _classCallCheck(this, Ci);
@@ -7891,7 +7919,7 @@ var Ci = /*#__PURE__*/function (_zi4) {
7891
7919
  _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), Ci.cleanConfig(s), Object.assign(_this29.rawBody, s)), _this29.canSendMessage = Ci.canSendTextMessage;
7892
7920
  return _this29;
7893
7921
  }
7894
- _inherits(Ci, _zi4);
7922
+ _inherits(Ci, _Gi4);
7895
7923
  return _createClass(Ci, [{
7896
7924
  key: "preprocessBody",
7897
7925
  value: function preprocessBody(e, t) {
@@ -7971,19 +7999,19 @@ var Ci = /*#__PURE__*/function (_zi4) {
7971
7999
  return !!(e && e.trim() !== "");
7972
8000
  }
7973
8001
  }]);
7974
- }(zi);
7975
- var Jo = /*#__PURE__*/function (_je7) {
7976
- function Jo(e) {
8002
+ }(Gi);
8003
+ var Xo = /*#__PURE__*/function (_je7) {
8004
+ function Xo(e) {
7977
8005
  var _this30;
7978
- _classCallCheck(this, Jo);
8006
+ _classCallCheck(this, Xo);
7979
8007
  var s, r, o;
7980
8008
  var t = (r = (s = e.directConnection) == null ? void 0 : s.huggingFace) == null ? void 0 : r.fillMask,
7981
8009
  i = (o = e.directConnection) == null ? void 0 : o.huggingFace;
7982
- _this30 = _callSuper(this, Jo, [e, "The goal of life is [MASK].", "bert-base-uncased", t, i]), _this30.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Hugging Face</b></div>\n <p>Insert a sentence with the word [MASK] and the model will try to fill it for you. E.g. I want [MASK].</p>\n <p>First message may take an extented amount of time to complete as the model needs to be initialized.</p>", _this30.permittedErrorPrefixes = ["Authorization header", "No mask_token"];
8010
+ _this30 = _callSuper(this, Xo, [e, "The goal of life is [MASK].", "bert-base-uncased", t, i]), _this30.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Hugging Face</b></div>\n <p>Insert a sentence with the word [MASK] and the model will try to fill it for you. E.g. I want [MASK].</p>\n <p>First message may take an extented amount of time to complete as the model needs to be initialized.</p>", _this30.permittedErrorPrefixes = ["Authorization header", "No mask_token"];
7983
8011
  return _this30;
7984
8012
  }
7985
- _inherits(Jo, _je7);
7986
- return _createClass(Jo, [{
8013
+ _inherits(Xo, _je7);
8014
+ return _createClass(Xo, [{
7987
8015
  key: "extractResultData",
7988
8016
  value: function () {
7989
8017
  var _extractResultData1 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee62(e) {
@@ -8105,7 +8133,7 @@ var ne = /*#__PURE__*/function () {
8105
8133
  o = r[E.CONTENT_TYPE];
8106
8134
  delete r[E.CONTENT_TYPE];
8107
8135
  a = i.map(/*#__PURE__*/function () {
8108
- var _ref16 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee64(l) {
8136
+ var _ref18 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee64(l) {
8109
8137
  var c;
8110
8138
  return _regeneratorRuntime().wrap(function _callee64$(_context64) {
8111
8139
  while (1) switch (_context64.prev = _context64.next) {
@@ -8121,7 +8149,7 @@ var ne = /*#__PURE__*/function () {
8121
8149
  }, _callee64);
8122
8150
  }));
8123
8151
  return function (_x128) {
8124
- return _ref16.apply(this, arguments);
8152
+ return _ref18.apply(this, arguments);
8125
8153
  };
8126
8154
  }());
8127
8155
  _context65.prev = 7;
@@ -8164,8 +8192,8 @@ var ne = /*#__PURE__*/function () {
8164
8192
  return _regeneratorRuntime().wrap(function _callee66$(_context66) {
8165
8193
  while (1) switch (_context66.prev = _context66.next) {
8166
8194
  case 0:
8167
- r = t.map(function (_ref17) {
8168
- var l = _ref17.fileId;
8195
+ r = t.map(function (_ref19) {
8196
+ var l = _ref19.fileId;
8169
8197
  return e.url = "".concat(i).concat(l).concat(s), new Promise(function (c) {
8170
8198
  c(L.directFetch(e, void 0, "GET", !1));
8171
8199
  });
@@ -8315,7 +8343,7 @@ var ne = /*#__PURE__*/function () {
8315
8343
  value: function parseMessages(e, t, i) {
8316
8344
  var s = [];
8317
8345
  return t.forEach(/*#__PURE__*/function () {
8318
- var _ref18 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee70(r) {
8346
+ var _ref20 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee70(r) {
8319
8347
  return _regeneratorRuntime().wrap(function _callee70$(_context70) {
8320
8348
  while (1) switch (_context70.prev = _context70.next) {
8321
8349
  case 0:
@@ -8324,7 +8352,7 @@ var ne = /*#__PURE__*/function () {
8324
8352
  }).sort(function (o) {
8325
8353
  return o.text ? -1 : o.image_file ? 1 : 0;
8326
8354
  }).forEach(/*#__PURE__*/function () {
8327
- var _ref19 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee69(o) {
8355
+ var _ref21 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee69(o) {
8328
8356
  return _regeneratorRuntime().wrap(function _callee69$(_context69) {
8329
8357
  while (1) switch (_context69.prev = _context69.next) {
8330
8358
  case 0:
@@ -8336,7 +8364,7 @@ var ne = /*#__PURE__*/function () {
8336
8364
  }, _callee69);
8337
8365
  }));
8338
8366
  return function (_x143) {
8339
- return _ref19.apply(this, arguments);
8367
+ return _ref21.apply(this, arguments);
8340
8368
  };
8341
8369
  }());
8342
8370
  case 1:
@@ -8346,7 +8374,7 @@ var ne = /*#__PURE__*/function () {
8346
8374
  }, _callee70);
8347
8375
  }));
8348
8376
  return function (_x142) {
8349
- return _ref18.apply(this, arguments);
8377
+ return _ref20.apply(this, arguments);
8350
8378
  };
8351
8379
  }()), Promise.all(s);
8352
8380
  }
@@ -8459,16 +8487,16 @@ var Ve = /*#__PURE__*/function (_K3) {
8459
8487
  if (t && t.length > 0) {
8460
8488
  var r = this.filesToolType;
8461
8489
  if (typeof this.filesToolType == "function") {
8462
- var a = this.filesToolType(t.map(function (_ref20) {
8463
- var l = _ref20.name;
8490
+ var a = this.filesToolType(t.map(function (_ref22) {
8491
+ var l = _ref22.name;
8464
8492
  return l;
8465
8493
  }));
8466
8494
  a === "code_interpreter" || a === "file_search" || a === "images" ? r = a : (console.error("Tool type \"".concat(a, "\" is not valid")), console.error('Expected "code_interpreter" or "file_search" or "images". Going to default to "images"'));
8467
8495
  }
8468
8496
  if (r === "file_search") return Ve.processAttachmentsMessage(s, t, "file_search");
8469
8497
  if (r === "code_interpreter") return Ve.processAttachmentsMessage(s, t, "code_interpreter");
8470
- if (t.find(function (_ref21) {
8471
- var a = _ref21.name;
8498
+ if (t.find(function (_ref23) {
8499
+ var a = _ref23.name;
8472
8500
  return !H.isImageFileExtension(a);
8473
8501
  })) console.error("The uploaded files contained a non-image file"), console.error('Make sure only images can be uploaded or define a "code_interpreter" or "file_search" value in the "files_tool_type" property'), console.warn('Make sure your existing assistant supports these "tools" or specify them in the "new_assistant" property');else {
8474
8502
  var _a3 = Ve.processImageMessage(s, t);
@@ -8597,9 +8625,9 @@ var Ve = /*#__PURE__*/function (_K3) {
8597
8625
  }, {
8598
8626
  key: "searchPreviousMessagesForThreadId",
8599
8627
  value: function searchPreviousMessagesForThreadId(e) {
8600
- var t = e.find(function (_ref22) {
8601
- var _ref23 = _slicedToArray(_ref22, 1),
8602
- i = _ref23[0];
8628
+ var t = e.find(function (_ref24) {
8629
+ var _ref25 = _slicedToArray(_ref24, 1),
8630
+ i = _ref25[0];
8603
8631
  return i._sessionId;
8604
8632
  });
8605
8633
  t && (this.sessionId = t[0]._sessionId), this._searchedForThreadId = !0;
@@ -8989,7 +9017,7 @@ var Ve = /*#__PURE__*/function (_K3) {
8989
9017
  e.stream = !0;
8990
9018
  this._waitingForStreamResponse = !0;
8991
9019
  _context83.next = 4;
8992
- return w.request(this, e, this._messages, !0, !0);
9020
+ return A.request(this, e, this._messages, !0, !0);
8993
9021
  case 4:
8994
9022
  this._messageStream = _context83.sent;
8995
9023
  case 5:
@@ -9047,26 +9075,26 @@ var Ve = /*#__PURE__*/function (_K3) {
9047
9075
  }(K);
9048
9076
  Ve.POLLING_TIMEOUT_MS = 500;
9049
9077
  var Ri = Ve;
9050
- var xs = /*#__PURE__*/function (_Ri) {
9051
- function xs(e) {
9078
+ var ws = /*#__PURE__*/function (_Ri) {
9079
+ function ws(e) {
9052
9080
  var _a$headers, _l$OpenAIBeta;
9053
9081
  var _this34;
9054
- _classCallCheck(this, xs);
9082
+ _classCallCheck(this, ws);
9055
9083
  var o, a, l, c, d;
9056
9084
  var t = JSON.parse(JSON.stringify(e.directConnection)),
9057
9085
  i = t.openAI,
9058
9086
  s = (o = t.openAI) == null ? void 0 : o.assistant,
9059
- r = xs.buildUrlSegments(s);
9060
- if (_this34 = _callSuper(this, xs, [e, s, r, L.buildKeyVerificationDetails(), L.buildHeaders, i]), (_a$headers = (a = _this34.connectSettings).headers) !== null && _a$headers !== void 0 ? _a$headers : a.headers = {}, (_l$OpenAIBeta = (l = _this34.connectSettings.headers)["OpenAI-Beta"]) !== null && _l$OpenAIBeta !== void 0 ? _l$OpenAIBeta : l["OpenAI-Beta"] = "assistants=v2", _this34.shouldFetchHistory && _this34.sessionId && (_this34.fetchHistory = _this34.fetchHistoryFunc.bind(_assertThisInitialized(_this34))), _typeof(s) == "object") {
9061
- var _ref24 = (d = (c = e.directConnection) == null ? void 0 : c.openAI) == null ? void 0 : d.assistant,
9062
- u = _ref24.function_handler,
9063
- h = _ref24.files_tool_type;
9087
+ r = ws.buildUrlSegments(s);
9088
+ if (_this34 = _callSuper(this, ws, [e, s, r, L.buildKeyVerificationDetails(), L.buildHeaders, i]), (_a$headers = (a = _this34.connectSettings).headers) !== null && _a$headers !== void 0 ? _a$headers : a.headers = {}, (_l$OpenAIBeta = (l = _this34.connectSettings.headers)["OpenAI-Beta"]) !== null && _l$OpenAIBeta !== void 0 ? _l$OpenAIBeta : l["OpenAI-Beta"] = "assistants=v2", _this34.shouldFetchHistory && _this34.sessionId && (_this34.fetchHistory = _this34.fetchHistoryFunc.bind(_assertThisInitialized(_this34))), _typeof(s) == "object") {
9089
+ var _ref26 = (d = (c = e.directConnection) == null ? void 0 : c.openAI) == null ? void 0 : d.assistant,
9090
+ u = _ref26.function_handler,
9091
+ h = _ref26.files_tool_type;
9064
9092
  u && (_this34.functionHandler = u), h && (_this34.filesToolType = h);
9065
9093
  }
9066
9094
  return _this34;
9067
9095
  }
9068
- _inherits(xs, _Ri);
9069
- return _createClass(xs, null, [{
9096
+ _inherits(ws, _Ri);
9097
+ return _createClass(ws, null, [{
9070
9098
  key: "buildUrlSegments",
9071
9099
  value: function buildUrlSegments(e) {
9072
9100
  var t = _typeof(e) == "object" && e.custom_base_url || "https://api.openai.com/v1";
@@ -9127,16 +9155,16 @@ var As = /*#__PURE__*/function (_K4) {
9127
9155
  _inherits(As, _K4);
9128
9156
  return _createClass(As);
9129
9157
  }(K);
9130
- var Xo = /*#__PURE__*/function (_As) {
9131
- function Xo(e) {
9132
- _classCallCheck(this, Xo);
9158
+ var Yo = /*#__PURE__*/function (_As) {
9159
+ function Yo(e) {
9160
+ _classCallCheck(this, Yo);
9133
9161
  var s, r, o;
9134
9162
  var t = (r = (s = e.directConnection) == null ? void 0 : s.cohere) == null ? void 0 : r.textGeneration,
9135
9163
  i = (o = e.directConnection) == null ? void 0 : o.cohere;
9136
- return _callSuper(this, Xo, [e, "https://api.cohere.ai/v1/generate", "Once upon a time", t, i]);
9164
+ return _callSuper(this, Yo, [e, "https://api.cohere.ai/v1/generate", "Once upon a time", t, i]);
9137
9165
  }
9138
- _inherits(Xo, _As);
9139
- return _createClass(Xo, [{
9166
+ _inherits(Yo, _As);
9167
+ return _createClass(Yo, [{
9140
9168
  key: "preprocessBody",
9141
9169
  value: function preprocessBody(e, t) {
9142
9170
  var i = JSON.parse(JSON.stringify(e)),
@@ -9258,9 +9286,9 @@ var mt = /*#__PURE__*/function (_Ri2) {
9258
9286
  getFilesPostfix: "/content".concat(a)
9259
9287
  };
9260
9288
  if (_this36 = _callSuper(this, mt, [e, s == null ? void 0 : s.assistant, l, ue.buildKeyVerificationDetails(r), ue.buildHeaders, i]), _this36.permittedErrorPrefixes = [ue.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") {
9261
- var _ref25 = (p = (m = (f = e.directConnection) == null ? void 0 : f.azure) == null ? void 0 : m.openAI) == null ? void 0 : p.assistant,
9262
- b = _ref25.function_handler,
9263
- M = _ref25.files_tool_type;
9289
+ var _ref27 = (p = (m = (f = e.directConnection) == null ? void 0 : f.azure) == null ? void 0 : m.openAI) == null ? void 0 : p.assistant,
9290
+ b = _ref27.function_handler,
9291
+ M = _ref27.files_tool_type;
9264
9292
  b && (_this36.functionHandler = b), M && (_this36.filesToolType = M);
9265
9293
  }
9266
9294
  ue.validateURLDetails(r) ? (_g$headers = (g = _this36.connectSettings).headers) !== null && _g$headers !== void 0 ? _g$headers : g.headers = {} : (_this36.isTextInputDisabled = !0, _this36.canSendMessage = function () {
@@ -9276,17 +9304,17 @@ var mt = /*#__PURE__*/function (_Ri2) {
9276
9304
  return _createClass(mt);
9277
9305
  }(Ri);
9278
9306
  mt.THREAD_RESOURCE = "threads", mt.NEW_ASSISTANT_RESOURCE = "assistants";
9279
- var as = mt;
9280
- var Yo = /*#__PURE__*/function (_As2) {
9281
- function Yo(e) {
9282
- _classCallCheck(this, Yo);
9307
+ var ls = mt;
9308
+ var Zo = /*#__PURE__*/function (_As2) {
9309
+ function Zo(e) {
9310
+ _classCallCheck(this, Zo);
9283
9311
  var s, r, o;
9284
9312
  var t = (r = (s = e.directConnection) == null ? void 0 : s.cohere) == null ? void 0 : r.summarization,
9285
9313
  i = (o = e.directConnection) == null ? void 0 : o.cohere;
9286
- return _callSuper(this, Yo, [e, "https://api.cohere.ai/v1/summarize", "Insert text to summarize", t, i]);
9314
+ return _callSuper(this, Zo, [e, "https://api.cohere.ai/v1/summarize", "Insert text to summarize", t, i]);
9287
9315
  }
9288
- _inherits(Yo, _As2);
9289
- return _createClass(Yo, [{
9316
+ _inherits(Zo, _As2);
9317
+ return _createClass(Zo, [{
9290
9318
  key: "preprocessBody",
9291
9319
  value: function preprocessBody(e, t) {
9292
9320
  var i = JSON.parse(JSON.stringify(e)),
@@ -9484,21 +9512,33 @@ var D = /*#__PURE__*/function () {
9484
9512
  }]);
9485
9513
  }();
9486
9514
  var ct = /*#__PURE__*/function () {
9487
- function ct(e, t, i, s, r) {
9515
+ // prettier-ignore
9516
+ function ct(e, t, i, s, r, o) {
9488
9517
  _classCallCheck(this, ct);
9489
9518
  this._mouseState = {
9490
9519
  state: "default"
9491
- }, this.isCustom = !1, N.addAttributes(e), this.elementRef = e, this.svg = Ue.createSVGElement(t), this.customStyles = s, this.position = i, this.dropupText = r;
9520
+ }, this.isCustom = !1, N.addAttributes(e), this.elementRef = e, this.svg = Ue.createSVGElement(t), this.customStyles = r, this.position = i, this.tooltip = s, this.dropupText = o;
9492
9521
  }
9493
9522
  return _createClass(ct, [{
9494
9523
  key: "buttonMouseLeave",
9495
9524
  value: function buttonMouseLeave(e) {
9496
- this._mouseState.state = "default", e && (D.unsetAllCSS(this.elementRef, e), D.setElementsCSS(this.elementRef, e, "default"));
9525
+ this._mouseState.state = "default", this.activeTooltipElement && (this.pendingTooltip && clearTimeout(this.pendingTooltip), this.activeTooltipElement instanceof HTMLElement && (this.activeTooltipElement.style.visibility = "hidden")), e && (D.unsetAllCSS(this.elementRef, e), D.setElementsCSS(this.elementRef, e, "default"));
9526
+ }
9527
+ }, {
9528
+ key: "traverseParentUntilShadowDom",
9529
+ value: function traverseParentUntilShadowDom(e) {
9530
+ var t = e;
9531
+ for (; t.parentElement;) t = t.parentElement;
9532
+ return t;
9497
9533
  }
9498
9534
  }, {
9499
9535
  key: "buttonMouseEnter",
9500
9536
  value: function buttonMouseEnter(e) {
9501
- this._mouseState.state = "hover", e && D.setElementsCSS(this.elementRef, e, "hover");
9537
+ var _this37 = this;
9538
+ var t;
9539
+ this._mouseState.state = "hover", this.activeTooltipElement = this.traverseParentUntilShadowDom(this.elementRef).nextSibling, this.tooltip && (this.pendingTooltip = setTimeout(function () {
9540
+ _this37.activeTooltipElement instanceof HTMLElement && (_this37.activeTooltipElement.style.visibility = "visible", _this37.activeTooltipElement.style.top = "".concat(_this37.elementRef.getBoundingClientRect().top - 30, "px"), _this37.activeTooltipElement.style.left = "".concat(_this37.elementRef.getBoundingClientRect().left - 69, "px"), console.log(_this37.activeTooltipElement.getBoundingClientRect().right));
9541
+ }, ((t = this.tooltip) == null ? void 0 : t.timeout) || 0)), e && D.setElementsCSS(this.elementRef, e, "hover");
9502
9542
  }
9503
9543
  }, {
9504
9544
  key: "buttonMouseUp",
@@ -9560,17 +9600,17 @@ var ct = /*#__PURE__*/function () {
9560
9600
  }
9561
9601
  }]);
9562
9602
  }();
9563
- var Ui = /*#__PURE__*/function (_ct) {
9564
- function Ui(e) {
9565
- var _this37;
9566
- _classCallCheck(this, Ui);
9603
+ var ji = /*#__PURE__*/function (_ct) {
9604
+ function ji(e) {
9605
+ var _this38;
9606
+ _classCallCheck(this, ji);
9567
9607
  var i, s;
9568
- var t = ((s = (i = e == null ? void 0 : e["default"]) == null ? void 0 : i.svg) == null ? void 0 : s.content) || Ui.EMPTY_SVG;
9569
- _this37 = _callSuper(this, Ui, [document.createElement("div"), t, void 0, e]), _this37.isActive = !1, _this37._innerElements = _this37.createInnerElementsForStates(_this37.customStyles), _this37.changeToDefault();
9570
- return _this37;
9608
+ var t = ((s = (i = e == null ? void 0 : e["default"]) == null ? void 0 : i.svg) == null ? void 0 : s.content) || ji.EMPTY_SVG;
9609
+ _this38 = _callSuper(this, ji, [document.createElement("div"), t, void 0, void 0, e]), _this38.isActive = !1, _this38._innerElements = _this38.createInnerElementsForStates(_this38.customStyles), _this38.changeToDefault();
9610
+ return _this38;
9571
9611
  }
9572
- _inherits(Ui, _ct);
9573
- return _createClass(Ui, [{
9612
+ _inherits(ji, _ct);
9613
+ return _createClass(ji, [{
9574
9614
  key: "createInnerElementsForStates",
9575
9615
  value: function createInnerElementsForStates(e) {
9576
9616
  return {
@@ -9608,8 +9648,8 @@ var Ui = /*#__PURE__*/function (_ct) {
9608
9648
  }
9609
9649
  }]);
9610
9650
  }(ct);
9611
- Ui.EMPTY_SVG = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"></svg>';
9612
- var ki = Ui;
9651
+ ji.EMPTY_SVG = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"></svg>';
9652
+ var ki = ji;
9613
9653
  var z = /*#__PURE__*/function () {
9614
9654
  function z() {
9615
9655
  _classCallCheck(this, z);
@@ -9662,34 +9702,34 @@ var z = /*#__PURE__*/function () {
9662
9702
  }
9663
9703
  }]);
9664
9704
  }();
9665
- var ji = /*#__PURE__*/_createClass(function ji() {
9666
- _classCallCheck(this, ji);
9705
+ var Hi = /*#__PURE__*/_createClass(function Hi() {
9706
+ _classCallCheck(this, Hi);
9667
9707
  });
9668
- ji.SESSION_STARTED = "sts-session-started", ji.SESSION_STOPPED = "sts-session-stopped";
9669
- var Li = ji;
9708
+ Hi.SESSION_STARTED = "sts-session-started", Hi.SESSION_STOPPED = "sts-session-stopped";
9709
+ var Li = Hi;
9670
9710
  var Pn = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M5.92 24.096q0 1.088 0.928 1.728 0.512 0.288 1.088 0.288 0.448 0 0.896-0.224l16.16-8.064q0.48-0.256 0.8-0.736t0.288-1.088-0.288-1.056-0.8-0.736l-16.16-8.064q-0.448-0.224-0.896-0.224-0.544 0-1.088 0.288-0.928 0.608-0.928 1.728v16.16z\"></path>\n</svg>",
9671
- ls = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M5.92 24.096q0 0.832 0.576 1.408t1.44 0.608h16.128q0.832 0 1.44-0.608t0.576-1.408v-16.16q0-0.832-0.576-1.44t-1.44-0.576h-16.128q-0.832 0-1.44 0.576t-0.576 1.44v16.16z\"></path>\n</svg>",
9711
+ cs = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M5.92 24.096q0 0.832 0.576 1.408t1.44 0.608h16.128q0.832 0 1.44-0.608t0.576-1.408v-16.16q0-0.832-0.576-1.44t-1.44-0.576h-16.128q-0.832 0-1.44 0.576t-0.576 1.44v16.16z\"></path>\n</svg>",
9672
9712
  C = /*#__PURE__*/function (_K5) {
9673
9713
  function C(e) {
9674
9714
  var _l$model;
9675
- var _this38;
9715
+ var _this39;
9676
9716
  _classCallCheck(this, C);
9677
9717
  var r, o, a, l;
9678
9718
  var t = JSON.parse(JSON.stringify(e.directConnection)),
9679
9719
  i = C.getKey(e);
9680
- _this38 = _callSuper(this, C, [e, L.buildKeyVerificationDetails(), L.buildHeaders, {
9720
+ _this39 = _callSuper(this, C, [e, L.buildKeyVerificationDetails(), L.buildHeaders, {
9681
9721
  key: i
9682
- }]), _this38.insertKeyPlaceholderText = "OpenAI API Key", _this38.keyHelpUrl = "https://platform.openai.com/account/api-keys", _this38._microphoneButton = null, _this38._toggleButton = null, _this38._errorElement = null, _this38._loadingElement = null, _this38._pc = null, _this38._mediaStream = null, _this38._isMuted = !1;
9722
+ }]), _this39.insertKeyPlaceholderText = "OpenAI API Key", _this39.keyHelpUrl = "https://platform.openai.com/account/api-keys", _this39._microphoneButton = null, _this39._toggleButton = null, _this39._errorElement = null, _this39._loadingElement = null, _this39._pc = null, _this39._mediaStream = null, _this39._isMuted = !1;
9683
9723
  var s = (r = t.openAI) == null ? void 0 : r.realtime;
9684
9724
  if (_typeof(s) == "object") {
9685
- _this38._avatarConfig = s.avatar, _this38._ephemeralKey = s.ephemeralKey, _this38._errorConfig = s.error, _this38._loadingConfig = s.loading, Object.assign(_this38.rawBody, s.config);
9725
+ _this39._avatarConfig = s.avatar, _this39._ephemeralKey = s.ephemeralKey, _this39._errorConfig = s.error, _this39._loadingConfig = s.loading, Object.assign(_this39.rawBody, s.config);
9686
9726
  var c = (a = (o = e.directConnection) == null ? void 0 : o.openAI) == null ? void 0 : a.realtime,
9687
- _ref26 = c.config || {},
9688
- d = _ref26.function_handler;
9689
- d && (_this38._functionHandler = d), _this38._events = s.events, c.methods = _this38.generateMethods();
9727
+ _ref28 = c.config || {},
9728
+ d = _ref28.function_handler;
9729
+ d && (_this39._functionHandler = d), _this39._events = s.events, c.methods = _this39.generateMethods();
9690
9730
  }
9691
- (_l$model = (l = _this38.rawBody).model) !== null && _l$model !== void 0 ? _l$model : l.model = "gpt-4o-realtime-preview-2024-12-17", _this38._avatarConfig = C.buildAvatarConfig(s), _this38._buttonsConfig = C.buildButtonsConfig(s), _this38._avatarEl = C.createAvatar(_this38._avatarConfig), _this38._containerEl = _this38.createContainer(), _this38._deepChat = e;
9692
- return _this38;
9731
+ (_l$model = (l = _this39.rawBody).model) !== null && _l$model !== void 0 ? _l$model : l.model = "gpt-4o-realtime-preview-2024-12-17", _this39._avatarConfig = C.buildAvatarConfig(s), _this39._buttonsConfig = C.buildButtonsConfig(s), _this39._avatarEl = C.createAvatar(_this39._avatarConfig), _this39._containerEl = _this39.createContainer(), _this39._deepChat = e;
9732
+ return _this39;
9693
9733
  }
9694
9734
  _inherits(C, _K5);
9695
9735
  return _createClass(C, [{
@@ -9850,11 +9890,11 @@ var Pn = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
9850
9890
  }, {
9851
9891
  key: "generateMethods",
9852
9892
  value: function generateMethods() {
9853
- var _this39 = this;
9893
+ var _this40 = this;
9854
9894
  return {
9855
9895
  updateConfig: function updateConfig(e) {
9856
9896
  var t;
9857
- (t = _this39._dc) == null || t.send(JSON.stringify({
9897
+ (t = _this40._dc) == null || t.send(JSON.stringify({
9858
9898
  type: "session.update",
9859
9899
  session: e
9860
9900
  }));
@@ -9869,7 +9909,7 @@ var Pn = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
9869
9909
  text: e
9870
9910
  }]
9871
9911
  };
9872
- _this39.sendMessage(r);
9912
+ _this40.sendMessage(r);
9873
9913
  }
9874
9914
  };
9875
9915
  }
@@ -9900,11 +9940,11 @@ var Pn = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
9900
9940
  }, {
9901
9941
  key: "createMicophoneButton",
9902
9942
  value: function createMicophoneButton() {
9903
- var _this40 = this;
9943
+ var _this41 = this;
9904
9944
  var t;
9905
9945
  var e = new ki((t = this._buttonsConfig) == null ? void 0 : t.microphone);
9906
9946
  return e.elementRef.classList.add(C.BUTTON_DEFAULT, "deep-chat-openai-realtime-microphone"), e.elementRef.onclick = function () {
9907
- e.isActive ? (_this40.toggleMicorphone(!0), e.elementRef.classList.replace(C.MICROPHONE_ACTIVE, C.BUTTON_DEFAULT), e.changeToDefault(), _this40._isMuted = !1) : (_this40.toggleMicorphone(!1), e.elementRef.classList.replace(C.BUTTON_DEFAULT, C.MICROPHONE_ACTIVE), N.removeAriaAttributes(e.elementRef), e.changeToActive(), _this40._isMuted = !0);
9947
+ e.isActive ? (_this41.toggleMicorphone(!0), e.elementRef.classList.replace(C.MICROPHONE_ACTIVE, C.BUTTON_DEFAULT), e.changeToDefault(), _this41._isMuted = !1) : (_this41.toggleMicorphone(!1), e.elementRef.classList.replace(C.BUTTON_DEFAULT, C.MICROPHONE_ACTIVE), N.removeAriaAttributes(e.elementRef), e.changeToActive(), _this41._isMuted = !0);
9908
9948
  }, e;
9909
9949
  }
9910
9950
  }, {
@@ -9918,7 +9958,7 @@ var Pn = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
9918
9958
  }, {
9919
9959
  key: "createToggleButton",
9920
9960
  value: function createToggleButton() {
9921
- var _this41 = this;
9961
+ var _this42 = this;
9922
9962
  var t;
9923
9963
  var e = new ki((t = this._buttonsConfig) == null ? void 0 : t.toggle);
9924
9964
  return e.elementRef.classList.add(C.BUTTON_DEFAULT, "deep-chat-openai-realtime-toggle"), e.elementRef.onclick = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee91() {
@@ -9930,52 +9970,52 @@ var Pn = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
9930
9970
  _context91.next = 4;
9931
9971
  break;
9932
9972
  }
9933
- e.changeToDefault(), _this41.stop();
9973
+ e.changeToDefault(), _this42.stop();
9934
9974
  _context91.next = 30;
9935
9975
  break;
9936
9976
  case 4:
9937
9977
  _context91.prev = 4;
9938
- if (!_this41._ephemeralKey) {
9978
+ if (!_this42._ephemeralKey) {
9939
9979
  _context91.next = 11;
9940
9980
  break;
9941
9981
  }
9942
- _this41.displayLoading();
9982
+ _this42.displayLoading();
9943
9983
  _context91.next = 9;
9944
- return _this41.init(_this41._ephemeralKey);
9984
+ return _this42.init(_this42._ephemeralKey);
9945
9985
  case 9:
9946
9986
  _context91.next = 25;
9947
9987
  break;
9948
9988
  case 11:
9949
- if (!_this41._retrievingEphemeralKey) {
9989
+ if (!_this42._retrievingEphemeralKey) {
9950
9990
  _context91.next = 22;
9951
9991
  break;
9952
9992
  }
9953
- _this41.displayLoading();
9993
+ _this42.displayLoading();
9954
9994
  _context91.next = 15;
9955
- return _this41._retrievingEphemeralKey;
9995
+ return _this42._retrievingEphemeralKey;
9956
9996
  case 15:
9957
9997
  s = _context91.sent;
9958
- _context91.t0 = (i = _this41._toggleButton) != null && i.isActive;
9998
+ _context91.t0 = (i = _this42._toggleButton) != null && i.isActive;
9959
9999
  if (!_context91.t0) {
9960
10000
  _context91.next = 20;
9961
10001
  break;
9962
10002
  }
9963
10003
  _context91.next = 20;
9964
- return _this41.init(s);
10004
+ return _this42.init(s);
9965
10005
  case 20:
9966
10006
  _context91.next = 25;
9967
10007
  break;
9968
10008
  case 22:
9969
- _this41.displayLoading();
10009
+ _this42.displayLoading();
9970
10010
  _context91.next = 25;
9971
- return _this41.fetchEphemeralKey(!0);
10011
+ return _this42.fetchEphemeralKey(!0);
9972
10012
  case 25:
9973
10013
  _context91.next = 30;
9974
10014
  break;
9975
10015
  case 27:
9976
10016
  _context91.prev = 27;
9977
10017
  _context91.t1 = _context91["catch"](4);
9978
- console.error("Failed to start conversation:", _context91.t1), _this41.displayError(), _this41.hideLoading();
10018
+ console.error("Failed to start conversation:", _context91.t1), _this42.displayError(), _this42.hideLoading();
9979
10019
  case 30:
9980
10020
  case "end":
9981
10021
  return _context91.stop();
@@ -9987,7 +10027,7 @@ var Pn = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
9987
10027
  key: "init",
9988
10028
  value: function () {
9989
10029
  var _init2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee94(e) {
9990
- var _this42 = this;
10030
+ var _this43 = this;
9991
10031
  var t, i, s, r, o, a, l, c;
9992
10032
  return _regeneratorRuntime().wrap(function _callee94$(_context94) {
9993
10033
  while (1) switch (_context94.prev = _context94.next) {
@@ -10000,7 +10040,7 @@ var Pn = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
10000
10040
  r.fftSize = 256;
10001
10041
  o = new Uint8Array(r.frequencyBinCount);
10002
10042
  this._pc.ontrack = /*#__PURE__*/function () {
10003
- var _ref28 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee92(a) {
10043
+ var _ref30 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee92(a) {
10004
10044
  var l;
10005
10045
  return _regeneratorRuntime().wrap(function _callee92$(_context92) {
10006
10046
  while (1) switch (_context92.prev = _context92.next) {
@@ -10020,11 +10060,11 @@ var Pn = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
10020
10060
  return s.resume();
10021
10061
  case 7:
10022
10062
  l.connect(r);
10023
- _this42.monitorFrequencies(r, o);
10063
+ _this43.monitorFrequencies(r, o);
10024
10064
  _context92.next = 12;
10025
10065
  break;
10026
10066
  case 11:
10027
- console.error("No streams found in the ontrack event."), _this42.displayError();
10067
+ console.error("No streams found in the ontrack event."), _this43.displayError();
10028
10068
  case 12:
10029
10069
  case "end":
10030
10070
  return _context92.stop();
@@ -10032,7 +10072,7 @@ var Pn = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
10032
10072
  }, _callee92);
10033
10073
  }));
10034
10074
  return function (_x171) {
10035
- return _ref28.apply(this, arguments);
10075
+ return _ref30.apply(this, arguments);
10036
10076
  };
10037
10077
  }();
10038
10078
  _context94.next = 10;
@@ -10040,14 +10080,14 @@ var Pn = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
10040
10080
  audio: !0
10041
10081
  }).then(function (a) {
10042
10082
  var l;
10043
- t === _this42._pc && (_this42._mediaStream = a, (l = _this42._pc) == null || l.addTrack(_this42._mediaStream.getTracks()[0]), _this42._isMuted && _this42.toggleMicorphone(!1));
10083
+ t === _this43._pc && (_this43._mediaStream = a, (l = _this43._pc) == null || l.addTrack(_this43._mediaStream.getTracks()[0]), _this43._isMuted && _this43.toggleMicorphone(!1));
10044
10084
  })["catch"](function (a) {
10045
- console.error("Error accessing microphone:", a), _this42.displayError();
10085
+ console.error("Error accessing microphone:", a), _this43.displayError();
10046
10086
  });
10047
10087
  case 10:
10048
10088
  this._dc = this._pc.createDataChannel("oai-events");
10049
10089
  this._dc.addEventListener("message", /*#__PURE__*/function () {
10050
- var _ref29 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee93(a) {
10090
+ var _ref31 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee93(a) {
10051
10091
  var c, d, u, l, f, m, p;
10052
10092
  return _regeneratorRuntime().wrap(function _callee93$(_context93) {
10053
10093
  while (1) switch (_context93.prev = _context93.next) {
@@ -10057,7 +10097,7 @@ var Pn = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
10057
10097
  _context93.next = 5;
10058
10098
  break;
10059
10099
  }
10060
- _this42.removeUnavailable(), _this42._toggleButton && (N.removeAriaAttributes(_this42._toggleButton.elementRef), _this42._toggleButton.changeToActive()), (d = (c = _this42._events) == null ? void 0 : c.started) == null || d.call(c), _this42._deepChat.dispatchEvent(new CustomEvent(Li.SESSION_STARTED)), _this42.hideLoading();
10100
+ _this43.removeUnavailable(), _this43._toggleButton && (N.removeAriaAttributes(_this43._toggleButton.elementRef), _this43._toggleButton.changeToActive()), (d = (c = _this43._events) == null ? void 0 : c.started) == null || d.call(c), _this43._deepChat.dispatchEvent(new CustomEvent(Li.SESSION_STARTED)), _this43.hideLoading();
10061
10101
  _context93.next = 20;
10062
10102
  break;
10063
10103
  case 5:
@@ -10073,19 +10113,19 @@ var Pn = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
10073
10113
  m = f.name, p = f.call_id;
10074
10114
  _context93.prev = 9;
10075
10115
  _context93.next = 12;
10076
- return _this42.handleTool(m, f.arguments, p);
10116
+ return _this43.handleTool(m, f.arguments, p);
10077
10117
  case 12:
10078
10118
  _context93.next = 17;
10079
10119
  break;
10080
10120
  case 14:
10081
10121
  _context93.prev = 14;
10082
10122
  _context93.t0 = _context93["catch"](9);
10083
- _this42.stopOnError(_context93.t0);
10123
+ _this43.stopOnError(_context93.t0);
10084
10124
  case 17:
10085
10125
  _context93.next = 20;
10086
10126
  break;
10087
10127
  case 19:
10088
- l.type === "error" ? _this42.stopOnError(l.error.message) : l.type === "invalid_request_error" ? _this42.stopOnError(l.message) : l.type;
10128
+ l.type === "error" ? _this43.stopOnError(l.error.message) : l.type === "invalid_request_error" ? _this43.stopOnError(l.message) : l.type;
10089
10129
  case 20:
10090
10130
  case "end":
10091
10131
  return _context93.stop();
@@ -10093,7 +10133,7 @@ var Pn = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
10093
10133
  }, _callee93, null, [[9, 14]]);
10094
10134
  }));
10095
10135
  return function (_x172) {
10096
- return _ref29.apply(this, arguments);
10136
+ return _ref31.apply(this, arguments);
10097
10137
  };
10098
10138
  }());
10099
10139
  _context94.prev = 12;
@@ -10179,7 +10219,7 @@ var Pn = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
10179
10219
  }, {
10180
10220
  key: "monitorFrequencies",
10181
10221
  value: function monitorFrequencies(e, t) {
10182
- var _this43 = this;
10222
+ var _this44 = this;
10183
10223
  var i = function (_i3) {
10184
10224
  function i() {
10185
10225
  return _i3.apply(this, arguments);
@@ -10197,8 +10237,8 @@ var Pn = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
10197
10237
  r = t.length * 255,
10198
10238
  o = s / r * 100,
10199
10239
  a = 1,
10200
- l = a + o / 100 * (((c = _this43._avatarConfig) == null ? void 0 : c.maxScale) - a);
10201
- _this43._avatarEl.style.transform = "scale(".concat(l, ")"), requestAnimationFrame(i);
10240
+ l = a + o / 100 * (((c = _this44._avatarConfig) == null ? void 0 : c.maxScale) - a);
10241
+ _this44._avatarEl.style.transform = "scale(".concat(l, ")"), requestAnimationFrame(i);
10202
10242
  });
10203
10243
  i();
10204
10244
  }
@@ -10350,14 +10390,14 @@ var Pn = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
10350
10390
  var _t$microphone, _o$default, _a$svg, _l$content, _t$toggle, _h$default, _f$svg, _m$content, _p$active, _g$svg, _b$content;
10351
10391
  var i, s, r, o, a, l, c, d, u, h, f, m, p, g, b;
10352
10392
  var t = _typeof(e) == "object" && e.buttons ? JSON.parse(JSON.stringify(e.buttons)) : {};
10353
- return (r = (s = (i = t.microphone) == null ? void 0 : i["default"]) == null ? void 0 : s.text) != null && r.content || ((_t$microphone = t.microphone) !== null && _t$microphone !== void 0 ? _t$microphone : t.microphone = {}, (_o$default = (o = t.microphone)["default"]) !== null && _o$default !== void 0 ? _o$default : o["default"] = {}, (_a$svg = (a = t.microphone["default"]).svg) !== null && _a$svg !== void 0 ? _a$svg : a.svg = {}, (_l$content = (l = t.microphone["default"].svg).content) !== null && _l$content !== void 0 ? _l$content : l.content = On), (u = (d = (c = t.toggle) == null ? void 0 : c["default"]) == null ? void 0 : d.text) != null && u.content || ((_t$toggle = t.toggle) !== null && _t$toggle !== void 0 ? _t$toggle : t.toggle = {}, (_h$default = (h = t.toggle)["default"]) !== null && _h$default !== void 0 ? _h$default : h["default"] = {}, (_f$svg = (f = t.toggle["default"]).svg) !== null && _f$svg !== void 0 ? _f$svg : f.svg = {}, (_m$content = (m = t.toggle["default"].svg).content) !== null && _m$content !== void 0 ? _m$content : m.content = Pn, (_p$active = (p = t.toggle).active) !== null && _p$active !== void 0 ? _p$active : p.active = {}, (_g$svg = (g = t.toggle.active).svg) !== null && _g$svg !== void 0 ? _g$svg : g.svg = {}, (_b$content = (b = t.toggle.active.svg).content) !== null && _b$content !== void 0 ? _b$content : b.content = ls), t;
10393
+ return (r = (s = (i = t.microphone) == null ? void 0 : i["default"]) == null ? void 0 : s.text) != null && r.content || ((_t$microphone = t.microphone) !== null && _t$microphone !== void 0 ? _t$microphone : t.microphone = {}, (_o$default = (o = t.microphone)["default"]) !== null && _o$default !== void 0 ? _o$default : o["default"] = {}, (_a$svg = (a = t.microphone["default"]).svg) !== null && _a$svg !== void 0 ? _a$svg : a.svg = {}, (_l$content = (l = t.microphone["default"].svg).content) !== null && _l$content !== void 0 ? _l$content : l.content = On), (u = (d = (c = t.toggle) == null ? void 0 : c["default"]) == null ? void 0 : d.text) != null && u.content || ((_t$toggle = t.toggle) !== null && _t$toggle !== void 0 ? _t$toggle : t.toggle = {}, (_h$default = (h = t.toggle)["default"]) !== null && _h$default !== void 0 ? _h$default : h["default"] = {}, (_f$svg = (f = t.toggle["default"]).svg) !== null && _f$svg !== void 0 ? _f$svg : f.svg = {}, (_m$content = (m = t.toggle["default"].svg).content) !== null && _m$content !== void 0 ? _m$content : m.content = Pn, (_p$active = (p = t.toggle).active) !== null && _p$active !== void 0 ? _p$active : p.active = {}, (_g$svg = (g = t.toggle.active).svg) !== null && _g$svg !== void 0 ? _g$svg : g.svg = {}, (_b$content = (b = t.toggle.active.svg).content) !== null && _b$content !== void 0 ? _b$content : b.content = cs), t;
10354
10394
  }
10355
10395
  }, {
10356
10396
  key: "createAvatar",
10357
10397
  value: function createAvatar(e) {
10358
10398
  var i;
10359
10399
  var t = document.createElement("img");
10360
- return t.id = "deep-chat-openai-realtime-avatar", Object.assign(t.style, (i = e == null ? void 0 : e.styles) == null ? void 0 : i.image), t.src = (e == null ? void 0 : e.src) || ss, t;
10400
+ return t.id = "deep-chat-openai-realtime-avatar", Object.assign(t.style, (i = e == null ? void 0 : e.styles) == null ? void 0 : i.image), t.src = (e == null ? void 0 : e.src) || ns, t;
10361
10401
  }
10362
10402
  }, {
10363
10403
  key: "createButtonContainer",
@@ -10383,19 +10423,19 @@ var Pn = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
10383
10423
  }]);
10384
10424
  }(K);
10385
10425
  C.BUTTON_DEFAULT = "deep-chat-openai-realtime-button-default", C.BUTTON_LOADING = "deep-chat-openai-realtime-button-loading", C.MICROPHONE_ACTIVE = "deep-chat-openai-realtime-microphone-active", C.UNAVAILABLE = "deep-chat-openai-realtime-button-unavailable";
10386
- var cs = C;
10426
+ var ds = C;
10387
10427
  var gt = /*#__PURE__*/function (_K6) {
10388
10428
  function gt(e) {
10389
10429
  var _o$model, _a$voice;
10390
- var _this44;
10430
+ var _this45;
10391
10431
  _classCallCheck(this, gt);
10392
10432
  var r, o, a;
10393
10433
  var t = JSON.parse(JSON.stringify(e.directConnection)),
10394
10434
  i = t == null ? void 0 : t.openAI;
10395
- _this44 = _callSuper(this, gt, [e, L.buildKeyVerificationDetails(), L.buildHeaders, i]), _this44.insertKeyPlaceholderText = "OpenAI API Key", _this44.keyHelpUrl = "https://platform.openai.com/account/api-keys", _this44.url = "https://api.openai.com/v1/audio/speech", _this44.permittedErrorPrefixes = ["Invalid"], _this44.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>OpenAI : Text To Speech</b></div>\n <p>Generate an audio file based on your text input.</p>\n <p>Click <a href=\"https://platform.openai.com/docs/guides/text-to-speech\">here</a> for more information.</p>";
10435
+ _this45 = _callSuper(this, gt, [e, L.buildKeyVerificationDetails(), L.buildHeaders, i]), _this45.insertKeyPlaceholderText = "OpenAI API Key", _this45.keyHelpUrl = "https://platform.openai.com/account/api-keys", _this45.url = "https://api.openai.com/v1/audio/speech", _this45.permittedErrorPrefixes = ["Invalid"], _this45.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>OpenAI : Text To Speech</b></div>\n <p>Generate an audio file based on your text input.</p>\n <p>Click <a href=\"https://platform.openai.com/docs/guides/text-to-speech\">here</a> for more information.</p>";
10396
10436
  var s = (r = t == null ? void 0 : t.openAI) == null ? void 0 : r.textToSpeech;
10397
- _typeof(s) == "object" && Object.assign(_this44.rawBody, s), (_o$model = (o = _this44.rawBody).model) !== null && _o$model !== void 0 ? _o$model : o.model = gt.DEFAULT_MODEL, (_a$voice = (a = _this44.rawBody).voice) !== null && _a$voice !== void 0 ? _a$voice : a.voice = gt.DEFAULT_VOIDE, _this44.textInputPlaceholderText = "Insert text to generate audio", _this44.rawBody.response_format = "mp3";
10398
- return _this44;
10437
+ _typeof(s) == "object" && Object.assign(_this45.rawBody, s), (_o$model = (o = _this45.rawBody).model) !== null && _o$model !== void 0 ? _o$model : o.model = gt.DEFAULT_MODEL, (_a$voice = (a = _this45.rawBody).voice) !== null && _a$voice !== void 0 ? _a$voice : a.voice = gt.DEFAULT_VOIDE, _this45.textInputPlaceholderText = "Insert text to generate audio", _this45.rawBody.response_format = "mp3";
10438
+ return _this45;
10399
10439
  }
10400
10440
  _inherits(gt, _K6);
10401
10441
  return _createClass(gt, [{
@@ -10480,21 +10520,21 @@ var gt = /*#__PURE__*/function (_K6) {
10480
10520
  }]);
10481
10521
  }(K);
10482
10522
  gt.DEFAULT_MODEL = "tts-1", gt.DEFAULT_VOIDE = "alloy";
10483
- var ds = gt;
10523
+ var hs = gt;
10484
10524
  var me = /*#__PURE__*/function (_K7) {
10485
10525
  function me(e) {
10486
10526
  var _o$model2;
10487
- var _this45;
10527
+ var _this46;
10488
10528
  _classCallCheck(this, me);
10489
10529
  var r, o;
10490
10530
  var t = JSON.parse(JSON.stringify(e.directConnection)),
10491
10531
  i = t == null ? void 0 : t.openAI;
10492
- _this45 = _callSuper(this, me, [e, L.buildKeyVerificationDetails(), L.buildHeaders, i, {
10532
+ _this46 = _callSuper(this, me, [e, L.buildKeyVerificationDetails(), L.buildHeaders, i, {
10493
10533
  audio: {}
10494
- }]), _this45.insertKeyPlaceholderText = "OpenAI API Key", _this45.keyHelpUrl = "https://platform.openai.com/account/api-keys", _this45.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>OpenAI : Speech To Text</b></div>\n <p><b>Upload an audio file</b> to transcribe it into text. You can optionally provide text to guide the audio\n processing.\n <p>Click <a href=\"https://platform.openai.com/docs/guides/speech-to-text\">here</a> for more info.</p>", _this45.url = "", _this45.permittedErrorPrefixes = ["Invalid"], _this45.textInputPlaceholderText = "Upload an audio file", _this45._service_url = me.AUDIO_TRANSCRIPTIONS_URL;
10534
+ }]), _this46.insertKeyPlaceholderText = "OpenAI API Key", _this46.keyHelpUrl = "https://platform.openai.com/account/api-keys", _this46.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>OpenAI : Speech To Text</b></div>\n <p><b>Upload an audio file</b> to transcribe it into text. You can optionally provide text to guide the audio\n processing.\n <p>Click <a href=\"https://platform.openai.com/docs/guides/speech-to-text\">here</a> for more info.</p>", _this46.url = "", _this46.permittedErrorPrefixes = ["Invalid"], _this46.textInputPlaceholderText = "Upload an audio file", _this46._service_url = me.AUDIO_TRANSCRIPTIONS_URL;
10495
10535
  var s = (r = t == null ? void 0 : t.openAI) == null ? void 0 : r.audio;
10496
- _typeof(s) == "object" && (_this45.processConfig(s), me.cleanConfig(s), Object.assign(_this45.rawBody, s)), (_o$model2 = (o = _this45.rawBody).model) !== null && _o$model2 !== void 0 ? _o$model2 : o.model = me.DEFAULT_MODEL, _this45.rawBody.response_format = "json", _this45.canSendMessage = me.canSendFileMessage;
10497
- return _this45;
10536
+ _typeof(s) == "object" && (_this46.processConfig(s), me.cleanConfig(s), Object.assign(_this46.rawBody, s)), (_o$model2 = (o = _this46.rawBody).model) !== null && _o$model2 !== void 0 ? _o$model2 : o.model = me.DEFAULT_MODEL, _this46.rawBody.response_format = "json", _this46.canSendMessage = me.canSendFileMessage;
10537
+ return _this46;
10498
10538
  }
10499
10539
  _inherits(me, _K7);
10500
10540
  return _createClass(me, [{
@@ -10593,7 +10633,7 @@ var me = /*#__PURE__*/function (_K7) {
10593
10633
  }]);
10594
10634
  }(K);
10595
10635
  me.AUDIO_TRANSCRIPTIONS_URL = "https://api.openai.com/v1/audio/transcriptions", me.AUDIO_TRANSLATIONS_URL = "https://api.openai.com/v1/audio/translations", me.DEFAULT_MODEL = "whisper-1";
10596
- var hs = me;
10636
+ var us = me;
10597
10637
  var fe = /*#__PURE__*/function () {
10598
10638
  function fe() {
10599
10639
  _classCallCheck(this, fe);
@@ -10695,37 +10735,37 @@ var fe = /*#__PURE__*/function () {
10695
10735
  }
10696
10736
  }]);
10697
10737
  }();
10698
- var Zo = /*#__PURE__*/function (_K8) {
10738
+ var Qo = /*#__PURE__*/function (_K8) {
10699
10739
  // prettier-ignore
10700
- function Zo(e, t, i, s, r) {
10701
- var _this46;
10702
- _classCallCheck(this, Zo);
10703
- _this46 = _callSuper(this, Zo, [e, fe.buildLanguageKeyVerificationDetails(i), t, s, r]), _this46.insertKeyPlaceholderText = "Azure Language Subscription Key", _this46.keyHelpUrl =
10740
+ function Qo(e, t, i, s, r) {
10741
+ var _this47;
10742
+ _classCallCheck(this, Qo);
10743
+ _this47 = _callSuper(this, Qo, [e, fe.buildLanguageKeyVerificationDetails(i), t, s, r]), _this47.insertKeyPlaceholderText = "Azure Language Subscription Key", _this47.keyHelpUrl =
10704
10744
  // eslint-disable-next-line max-len
10705
- "https://learn.microsoft.com/en-us/azure/api-management/api-management-subscriptions#create-and-manage-subscriptions-in-azure-portal", _this46.permittedErrorPrefixes = ["Access"];
10706
- return _this46;
10745
+ "https://learn.microsoft.com/en-us/azure/api-management/api-management-subscriptions#create-and-manage-subscriptions-in-azure-portal", _this47.permittedErrorPrefixes = ["Access"];
10746
+ return _this47;
10707
10747
  }
10708
- _inherits(Zo, _K8);
10709
- return _createClass(Zo);
10748
+ _inherits(Qo, _K8);
10749
+ return _createClass(Qo);
10710
10750
  }(K);
10711
- var Yt = /*#__PURE__*/function (_Zo) {
10751
+ var Yt = /*#__PURE__*/function (_Qo) {
10712
10752
  function Yt(e) {
10713
10753
  var _a$language;
10714
- var _this47;
10754
+ var _this48;
10715
10755
  _classCallCheck(this, Yt);
10716
10756
  var s, r, o, a;
10717
10757
  var t = (r = (s = e.directConnection) == null ? void 0 : s.azure) == null ? void 0 : r.summarization,
10718
10758
  i = (o = e.directConnection) == null ? void 0 : o.azure;
10719
- _this47 = _callSuper(this, Yt, [e, fe.buildSummarizationHeader, t.endpoint, i]), _this47.permittedErrorPrefixes = [Yt.ENDPOINT_ERROR_MESSAGE], _this47.url = "", _this47.textInputPlaceholderText = "Insert text to summarize", _this47.isTextInputDisabled = !1, t.endpoint ? ((_a$language = (a = _this47.rawBody).language) !== null && _a$language !== void 0 ? _a$language : a.language = "en", Object.assign(_this47.rawBody, t), _this47.url = "".concat(t.endpoint, "/language/analyze-text/jobs?api-version=2022-10-01-preview")) : (_this47.isTextInputDisabled = !0, _this47.canSendMessage = function () {
10759
+ _this48 = _callSuper(this, Yt, [e, fe.buildSummarizationHeader, t.endpoint, i]), _this48.permittedErrorPrefixes = [Yt.ENDPOINT_ERROR_MESSAGE], _this48.url = "", _this48.textInputPlaceholderText = "Insert text to summarize", _this48.isTextInputDisabled = !1, t.endpoint ? ((_a$language = (a = _this48.rawBody).language) !== null && _a$language !== void 0 ? _a$language : a.language = "en", Object.assign(_this48.rawBody, t), _this48.url = "".concat(t.endpoint, "/language/analyze-text/jobs?api-version=2022-10-01-preview")) : (_this48.isTextInputDisabled = !0, _this48.canSendMessage = function () {
10720
10760
  return !1;
10721
10761
  }, setTimeout(function () {
10722
10762
  e.addMessage({
10723
10763
  error: Yt.ENDPOINT_ERROR_MESSAGE
10724
10764
  });
10725
10765
  }));
10726
- return _this47;
10766
+ return _this48;
10727
10767
  }
10728
- _inherits(Yt, _Zo);
10768
+ _inherits(Yt, _Qo);
10729
10769
  return _createClass(Yt, [{
10730
10770
  key: "preprocessBody",
10731
10771
  value: function preprocessBody(e, t) {
@@ -10866,11 +10906,11 @@ var Yt = /*#__PURE__*/function (_Zo) {
10866
10906
  return extractPollResultData;
10867
10907
  }()
10868
10908
  }]);
10869
- }(Zo);
10909
+ }(Qo);
10870
10910
  Yt.ENDPOINT_ERROR_MESSAGE =
10871
10911
  // eslint-disable-next-line max-len
10872
10912
  "Please define the azure endpoint. [More Information](https://deepchat.dev/docs/directConnection/Azure#Summarization)";
10873
- var us = Yt;
10913
+ var fs = Yt;
10874
10914
  var Kt = /*#__PURE__*/function () {
10875
10915
  function Kt() {
10876
10916
  _classCallCheck(this, Kt);
@@ -10976,19 +11016,19 @@ var Kt = /*#__PURE__*/function () {
10976
11016
  }
10977
11017
  }]);
10978
11018
  }();
10979
- var ws = /*#__PURE__*/function (_K9) {
10980
- function ws(e) {
10981
- var _this48;
10982
- _classCallCheck(this, ws);
11019
+ var Ts = /*#__PURE__*/function (_K9) {
11020
+ function Ts(e) {
11021
+ var _this49;
11022
+ _classCallCheck(this, Ts);
10983
11023
  var i;
10984
11024
  var t = (i = e.directConnection) == null ? void 0 : i.assemblyAI;
10985
- _this48 = _callSuper(this, ws, [e, Kt.buildKeyVerificationDetails(), Kt.buildHeaders, t, {
11025
+ _this49 = _callSuper(this, Ts, [e, Kt.buildKeyVerificationDetails(), Kt.buildHeaders, t, {
10986
11026
  audio: {}
10987
- }]), _this48.insertKeyPlaceholderText = "AssemblyAI API Key", _this48.keyHelpUrl = "https://www.assemblyai.com/app/account", _this48.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>AssemblyAI Audio</b></div>\n <p><b>Upload an audio file</b> to transcribe it into text.\n <p>\n Click <a href=\"https://www.assemblyai.com/docs/Guides/transcribing_an_audio_file#get-started\">here</a> for more info.\n </p>", _this48.url = "https://api.assemblyai.com/v2/upload", _this48.isTextInputDisabled = !0, _this48.textInputPlaceholderText = "Upload an audio file", _this48.permittedErrorPrefixes = ["Authentication", "Invalid"], _this48.canSendMessage = ws.canFileSendMessage;
10988
- return _this48;
11027
+ }]), _this49.insertKeyPlaceholderText = "AssemblyAI API Key", _this49.keyHelpUrl = "https://www.assemblyai.com/app/account", _this49.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>AssemblyAI Audio</b></div>\n <p><b>Upload an audio file</b> to transcribe it into text.\n <p>\n Click <a href=\"https://www.assemblyai.com/docs/Guides/transcribing_an_audio_file#get-started\">here</a> for more info.\n </p>", _this49.url = "https://api.assemblyai.com/v2/upload", _this49.isTextInputDisabled = !0, _this49.textInputPlaceholderText = "Upload an audio file", _this49.permittedErrorPrefixes = ["Authentication", "Invalid"], _this49.canSendMessage = Ts.canFileSendMessage;
11028
+ return _this49;
10989
11029
  }
10990
- _inherits(ws, _K9);
10991
- return _createClass(ws, [{
11030
+ _inherits(Ts, _K9);
11031
+ return _createClass(Ts, [{
10992
11032
  key: "callServiceAPI",
10993
11033
  value: function () {
10994
11034
  var _callServiceAPI13 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee104(e, t, i) {
@@ -11063,12 +11103,12 @@ var ws = /*#__PURE__*/function (_K9) {
11063
11103
  var Nn = /*#__PURE__*/function (_K0) {
11064
11104
  // prettier-ignore
11065
11105
  function Nn(e, t, i, s, r) {
11066
- var _this49;
11106
+ var _this50;
11067
11107
  _classCallCheck(this, Nn);
11068
- _this49 = _callSuper(this, Nn, [e, fe.buildSpeechKeyVerificationDetails(i), t, s, r]), _this49.insertKeyPlaceholderText = "Azure Speech Subscription Key", _this49.keyHelpUrl =
11108
+ _this50 = _callSuper(this, Nn, [e, fe.buildSpeechKeyVerificationDetails(i), t, s, r]), _this50.insertKeyPlaceholderText = "Azure Speech Subscription Key", _this50.keyHelpUrl =
11069
11109
  // eslint-disable-next-line max-len
11070
11110
  "https://learn.microsoft.com/en-us/azure/api-management/api-management-subscriptions#create-and-manage-subscriptions-in-azure-portal";
11071
- return _this49;
11111
+ return _this50;
11072
11112
  }
11073
11113
  _inherits(Nn, _K0);
11074
11114
  return _createClass(Nn);
@@ -11077,19 +11117,19 @@ var Qe = /*#__PURE__*/function (_Nn) {
11077
11117
  // prettier-ignore
11078
11118
  function Qe(e) {
11079
11119
  var _a$lang, _l$name, _c$gender;
11080
- var _this50;
11120
+ var _this51;
11081
11121
  _classCallCheck(this, Qe);
11082
11122
  var s, r, o, a, l, c;
11083
11123
  var t = (r = (s = e.directConnection) == null ? void 0 : s.azure) == null ? void 0 : r.textToSpeech,
11084
11124
  i = (o = e.directConnection) == null ? void 0 : o.azure;
11085
- _this50 = _callSuper(this, Qe, [e, fe.buildTextToSpeechHeaders.bind({}, (t == null ? void 0 : t.outputFormat) || "audio-16khz-128kbitrate-mono-mp3"), t.region, i]), _this50.permittedErrorPrefixes = [Qe.REGION_ERROR_MESSAGE], _this50.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Azure Text To Speech</b></div>\n <p>Insert text to synthesize it to audio.\n <p>\n Click <a href=\"".concat(Qe.HELP_LINK, "\">here</a> for more info.\n </p>"), _this50.isTextInputDisabled = !1, _this50.url = "", t.region ? (Object.assign(_this50.rawBody, t), (_a$lang = (a = _this50.rawBody).lang) !== null && _a$lang !== void 0 ? _a$lang : a.lang = "en-US", (_l$name = (l = _this50.rawBody).name) !== null && _l$name !== void 0 ? _l$name : l.name = "en-US-JennyNeural", (_c$gender = (c = _this50.rawBody).gender) !== null && _c$gender !== void 0 ? _c$gender : c.gender = "Female", _this50.url = "https://".concat(t.region, ".tts.speech.microsoft.com/cognitiveservices/v1")) : (_this50.isTextInputDisabled = !0, _this50.canSendMessage = function () {
11125
+ _this51 = _callSuper(this, Qe, [e, fe.buildTextToSpeechHeaders.bind({}, (t == null ? void 0 : t.outputFormat) || "audio-16khz-128kbitrate-mono-mp3"), t.region, i]), _this51.permittedErrorPrefixes = [Qe.REGION_ERROR_MESSAGE], _this51.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Azure Text To Speech</b></div>\n <p>Insert text to synthesize it to audio.\n <p>\n Click <a href=\"".concat(Qe.HELP_LINK, "\">here</a> for more info.\n </p>"), _this51.isTextInputDisabled = !1, _this51.url = "", t.region ? (Object.assign(_this51.rawBody, t), (_a$lang = (a = _this51.rawBody).lang) !== null && _a$lang !== void 0 ? _a$lang : a.lang = "en-US", (_l$name = (l = _this51.rawBody).name) !== null && _l$name !== void 0 ? _l$name : l.name = "en-US-JennyNeural", (_c$gender = (c = _this51.rawBody).gender) !== null && _c$gender !== void 0 ? _c$gender : c.gender = "Female", _this51.url = "https://".concat(t.region, ".tts.speech.microsoft.com/cognitiveservices/v1")) : (_this51.isTextInputDisabled = !0, _this51.canSendMessage = function () {
11086
11126
  return !1;
11087
11127
  }, setTimeout(function () {
11088
11128
  e.addMessage({
11089
11129
  error: Qe.REGION_ERROR_MESSAGE
11090
11130
  });
11091
11131
  }));
11092
- return _this50;
11132
+ return _this51;
11093
11133
  }
11094
11134
  _inherits(Qe, _Nn);
11095
11135
  return _createClass(Qe, [{
@@ -11161,10 +11201,10 @@ Qe.HELP_LINK =
11161
11201
  "https://learn.microsoft.com/en-GB/azure/cognitive-services/speech-service/get-started-text-to-speech?tabs=windows%2Cterminal&pivots=programming-language-rest", Qe.REGION_ERROR_MESSAGE =
11162
11202
  // eslint-disable-next-line max-len
11163
11203
  "Please define a region config property. [More Information](https://deepchat.dev/docs/directConnection/Azure#TextToSpeech)";
11164
- var fs = Qe;
11204
+ var ps = Qe;
11165
11205
  var Ke = /*#__PURE__*/function (_Nn2) {
11166
11206
  function Ke(e) {
11167
- var _this51;
11207
+ var _this52;
11168
11208
  _classCallCheck(this, Ke);
11169
11209
  var r, o, a;
11170
11210
  var t = (o = (r = e.directConnection) == null ? void 0 : r.azure) == null ? void 0 : o.speechToText,
@@ -11176,18 +11216,18 @@ var Ke = /*#__PURE__*/function (_Nn2) {
11176
11216
  }
11177
11217
  }
11178
11218
  };
11179
- if (_this51 = _callSuper(this, Ke, [e, fe.buildSpeechToTextHeaders, t.region, i, s]), _this51.permittedErrorPrefixes = [Ke.REGION_ERROR_MESSAGE], _this51.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Azure Speech To Text</b></div>\n <p><b>Upload a .wav or .ogg audio file</b> to transcribe it into text.\n <p>\n Click <a href=\"".concat(Ke.HELP_LINK, "\">here</a> for more info.\n </p>"), _this51.url = "", _this51.isTextInputDisabled = !0, _this51.textInputPlaceholderText = "Upload an audio file", !t.region) _this51.isTextInputDisabled = !0, _this51.canSendMessage = function () {
11219
+ if (_this52 = _callSuper(this, Ke, [e, fe.buildSpeechToTextHeaders, t.region, i, s]), _this52.permittedErrorPrefixes = [Ke.REGION_ERROR_MESSAGE], _this52.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Azure Speech To Text</b></div>\n <p><b>Upload a .wav or .ogg audio file</b> to transcribe it into text.\n <p>\n Click <a href=\"".concat(Ke.HELP_LINK, "\">here</a> for more info.\n </p>"), _this52.url = "", _this52.isTextInputDisabled = !0, _this52.textInputPlaceholderText = "Upload an audio file", !t.region) _this52.isTextInputDisabled = !0, _this52.canSendMessage = function () {
11180
11220
  return !1;
11181
11221
  }, setTimeout(function () {
11182
11222
  e.addMessage({
11183
11223
  error: Ke.REGION_ERROR_MESSAGE
11184
11224
  });
11185
11225
  });else {
11186
- _this51.canSendMessage = Ke.canFileSendMessage;
11226
+ _this52.canSendMessage = Ke.canFileSendMessage;
11187
11227
  var l = t.lang || "en-US";
11188
- _this51.url = "https://".concat(t.region, ".stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?language=").concat(l, "&format=detailed"), _this51.recordAudio = void 0;
11228
+ _this52.url = "https://".concat(t.region, ".stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?language=").concat(l, "&format=detailed"), _this52.recordAudio = void 0;
11189
11229
  }
11190
- return _this51;
11230
+ return _this52;
11191
11231
  }
11192
11232
  _inherits(Ke, _Nn2);
11193
11233
  return _createClass(Ke, [{
@@ -11261,22 +11301,22 @@ Ke.HELP_LINK =
11261
11301
  "https://learn.microsoft.com/en-GB/azure/cognitive-services/speech-service/get-started-text-to-speech?tabs=windows%2Cterminal&pivots=programming-language-rest", Ke.REGION_ERROR_MESSAGE =
11262
11302
  // eslint-disable-next-line max-len
11263
11303
  "Please define a region config property. [More Information](https://deepchat.dev/docs/directConnection/Azure#SpeechToText)";
11264
- var ps = Ke;
11265
- var Qo = /*#__PURE__*/function (_K1) {
11304
+ var ms = Ke;
11305
+ var ea = /*#__PURE__*/function (_K1) {
11266
11306
  // prettier-ignore
11267
- function Qo(e) {
11268
- var _this52;
11269
- _classCallCheck(this, Qo);
11307
+ function ea(e) {
11308
+ var _this53;
11309
+ _classCallCheck(this, ea);
11270
11310
  var s, r, o;
11271
11311
  var t = (r = (s = e.directConnection) == null ? void 0 : s.azure) == null ? void 0 : r.translation,
11272
11312
  i = (o = e.directConnection) == null ? void 0 : o.azure;
11273
- _this52 = _callSuper(this, Qo, [e, fe.buildTranslationKeyVerificationDetails(t.region), fe.buildTranslationHeaders.bind({}, t == null ? void 0 : t.region), i]), _this52.insertKeyPlaceholderText = "Azure Translate Subscription Key", _this52.keyHelpUrl =
11313
+ _this53 = _callSuper(this, ea, [e, fe.buildTranslationKeyVerificationDetails(t.region), fe.buildTranslationHeaders.bind({}, t == null ? void 0 : t.region), i]), _this53.insertKeyPlaceholderText = "Azure Translate Subscription Key", _this53.keyHelpUrl =
11274
11314
  // eslint-disable-next-line max-len
11275
- "https://learn.microsoft.com/en-us/azure/api-management/api-management-subscriptions#create-and-manage-subscriptions-in-azure-portal", _this52.url = "", _this52.url = "https://api.cognitive.microsofttranslator.com/translate?api-version=3.0&to=".concat(t.language || "es");
11276
- return _this52;
11315
+ "https://learn.microsoft.com/en-us/azure/api-management/api-management-subscriptions#create-and-manage-subscriptions-in-azure-portal", _this53.url = "", _this53.url = "https://api.cognitive.microsofttranslator.com/translate?api-version=3.0&to=".concat(t.language || "es");
11316
+ return _this53;
11277
11317
  }
11278
- _inherits(Qo, _K1);
11279
- return _createClass(Qo, [{
11318
+ _inherits(ea, _K1);
11319
+ return _createClass(ea, [{
11280
11320
  key: "preprocessBody",
11281
11321
  value: function preprocessBody(e) {
11282
11322
  var t = e[e.length - 1].text;
@@ -11342,25 +11382,26 @@ var Qo = /*#__PURE__*/function (_K1) {
11342
11382
  }]);
11343
11383
  }(K);
11344
11384
  var vt = /*#__PURE__*/function (_K10) {
11385
+ // https://platform.openai.com/docs/models/gpt-4o-audio-preview
11345
11386
  // prettier-ignore
11346
11387
  function vt(e, t, i, s, r) {
11347
- var _this53$maxMessages, _p$model;
11348
- var _this53;
11388
+ var _this54$maxMessages, _p$model;
11389
+ var _this54;
11349
11390
  _classCallCheck(this, vt);
11350
11391
  var u, h, f, m, p;
11351
11392
  var o = JSON.parse(JSON.stringify(e.directConnection)),
11352
11393
  a = t || L.buildKeyVerificationDetails(),
11353
11394
  l = i || L.buildHeaders,
11354
11395
  c = s || o.openAI;
11355
- _this53 = _callSuper(this, vt, [e, a, l, c]), _this53.insertKeyPlaceholderText = "OpenAI API Key", _this53.keyHelpUrl = "https://platform.openai.com/account/api-keys", _this53.url = "https://api.openai.com/v1/chat/completions", _this53.permittedErrorPrefixes = ["Incorrect"], _this53.asyncCallInProgress = !1, _this53._systemMessage = vt.generateSystemMessage("You are a helpful assistant.");
11396
+ _this54 = _callSuper(this, vt, [e, a, l, c]), _this54.insertKeyPlaceholderText = "OpenAI API Key", _this54.keyHelpUrl = "https://platform.openai.com/account/api-keys", _this54.url = "https://api.openai.com/v1/chat/completions", _this54.permittedErrorPrefixes = ["Incorrect"], _this54.asyncCallInProgress = !1, _this54._systemMessage = vt.generateSystemMessage("You are a helpful assistant.");
11356
11397
  var d = r || ((u = o.openAI) == null ? void 0 : u.chat);
11357
11398
  if (_typeof(d) == "object") {
11358
- d.system_prompt && (_this53._systemMessage = vt.generateSystemMessage(d.system_prompt));
11399
+ d.system_prompt && (_this54._systemMessage = vt.generateSystemMessage(d.system_prompt));
11359
11400
  var g = (m = (f = (h = e.directConnection) == null ? void 0 : h.openAI) == null ? void 0 : f.chat) == null ? void 0 : m.function_handler;
11360
- g && (_this53._functionHandler = g), _this53.cleanConfig(d), Object.assign(_this53.rawBody, d);
11401
+ g && (_this54._functionHandler = g), _this54.cleanConfig(d), Object.assign(_this54.rawBody, d);
11361
11402
  }
11362
- (_this53$maxMessages = _this53.maxMessages) !== null && _this53$maxMessages !== void 0 ? _this53$maxMessages : _this53.maxMessages = -1, (_p$model = (p = _this53.rawBody).model) !== null && _p$model !== void 0 ? _p$model : p.model = "gpt-4o";
11363
- return _this53;
11403
+ (_this54$maxMessages = _this54.maxMessages) !== null && _this54$maxMessages !== void 0 ? _this54$maxMessages : _this54.maxMessages = -1, (_p$model = (p = _this54.rawBody).model) !== null && _p$model !== void 0 ? _p$model : p.model = "gpt-4o";
11404
+ return _this54;
11364
11405
  }
11365
11406
  _inherits(vt, _K10);
11366
11407
  return _createClass(vt, [{
@@ -11400,7 +11441,7 @@ var vt = /*#__PURE__*/function (_K10) {
11400
11441
  throw new Error("Request settings have not been set up");
11401
11442
  case 2:
11402
11443
  i = this.preprocessBody(this.rawBody, t), s = this.stream;
11403
- s && (_typeof(s) != "object" || !s.simulation) || i.stream ? (i.stream = !0, w.request(this, i, e)) : R.request(this, i, e);
11444
+ s && (_typeof(s) != "object" || !s.simulation) || i.stream ? (i.stream = !0, A.request(this, i, e)) : R.request(this, i, e);
11404
11445
  case 4:
11405
11446
  case "end":
11406
11447
  return _context112.stop();
@@ -11446,7 +11487,7 @@ var vt = /*#__PURE__*/function (_K10) {
11446
11487
  key: "extractStreamResult",
11447
11488
  value: function () {
11448
11489
  var _extractStreamResult = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee114(e, t, i) {
11449
- var _this54 = this;
11490
+ var _this55 = this;
11450
11491
  var s, r, o;
11451
11492
  return _regeneratorRuntime().wrap(function _callee114$(_context114) {
11452
11493
  while (1) switch (_context114.prev = _context114.next) {
@@ -11463,7 +11504,7 @@ var vt = /*#__PURE__*/function (_K10) {
11463
11504
  return _context114.abrupt("return", (this._streamToolCalls = void 0, this.handleTools(o, t, i)));
11464
11505
  case 7:
11465
11506
  s != null && s.tool_calls && (this._streamToolCalls ? s.tool_calls.forEach(function (o, a) {
11466
- _this54._streamToolCalls && (_this54._streamToolCalls[a]["function"].arguments += o["function"].arguments);
11507
+ _this55._streamToolCalls && (_this55._streamToolCalls[a]["function"].arguments += o["function"].arguments);
11467
11508
  }) : this._streamToolCalls = s.tool_calls);
11468
11509
  case 8:
11469
11510
  return _context114.abrupt("return", {
@@ -11545,8 +11586,8 @@ var vt = /*#__PURE__*/function (_K10) {
11545
11586
  tool_calls: e.tool_calls,
11546
11587
  role: "assistant",
11547
11588
  content: null
11548
- }), !a.find(function (_ref30) {
11549
- var f = _ref30.response;
11589
+ }), !a.find(function (_ref32) {
11590
+ var f = _ref32.response;
11550
11591
  return typeof f != "string";
11551
11592
  }) && r.length === a.length)) {
11552
11593
  _context115.next = 43;
@@ -11635,31 +11676,31 @@ var vt = /*#__PURE__*/function (_K10) {
11635
11676
  }
11636
11677
  }]);
11637
11678
  }(K);
11638
- var Ts = /*#__PURE__*/function (_vt) {
11639
- function Ts(e) {
11640
- var _this55;
11641
- _classCallCheck(this, Ts);
11679
+ var Cs = /*#__PURE__*/function (_vt) {
11680
+ function Cs(e) {
11681
+ var _this56;
11682
+ _classCallCheck(this, Cs);
11642
11683
  var o, a, l, c, d, u, h;
11643
11684
  var t = JSON.parse(JSON.stringify(e.directConnection)),
11644
11685
  i = t.azure,
11645
11686
  s = ((a = (o = t.azure) == null ? void 0 : o.openAI) == null ? void 0 : a.urlDetails) || {},
11646
11687
  r = (c = (l = t.azure) == null ? void 0 : l.openAI) == null ? void 0 : c.chat;
11647
- if (_this55 = _callSuper(this, Ts, [e, ue.buildKeyVerificationDetails(s), ue.buildHeaders, i, r]), _this55.permittedErrorPrefixes = [ue.URL_DETAILS_ERROR_MESSAGE], _this55.isTextInputDisabled = !1, _typeof(r) == "object") {
11648
- var _ref31 = (h = (u = (d = e.directConnection) == null ? void 0 : d.azure) == null ? void 0 : u.openAI) == null ? void 0 : h.chat,
11649
- f = _ref31.function_handler;
11650
- f && (_this55._functionHandler = f);
11688
+ if (_this56 = _callSuper(this, Cs, [e, ue.buildKeyVerificationDetails(s), ue.buildHeaders, i, r]), _this56.permittedErrorPrefixes = [ue.URL_DETAILS_ERROR_MESSAGE], _this56.isTextInputDisabled = !1, _typeof(r) == "object") {
11689
+ var _ref33 = (h = (u = (d = e.directConnection) == null ? void 0 : d.azure) == null ? void 0 : u.openAI) == null ? void 0 : h.chat,
11690
+ f = _ref33.function_handler;
11691
+ f && (_this56._functionHandler = f);
11651
11692
  }
11652
- ue.validateURLDetails(s) ? _this55.url = Ts.buildURL(s) : (_this55.isTextInputDisabled = !0, _this55.canSendMessage = function () {
11693
+ ue.validateURLDetails(s) ? _this56.url = Cs.buildURL(s) : (_this56.isTextInputDisabled = !0, _this56.canSendMessage = function () {
11653
11694
  return !1;
11654
11695
  }, setTimeout(function () {
11655
11696
  e.addMessage({
11656
11697
  error: ue.URL_DETAILS_ERROR_MESSAGE
11657
11698
  });
11658
11699
  }));
11659
- return _this55;
11700
+ return _this56;
11660
11701
  }
11661
- _inherits(Ts, _vt);
11662
- return _createClass(Ts, null, [{
11702
+ _inherits(Cs, _vt);
11703
+ return _createClass(Cs, null, [{
11663
11704
  key: "buildURL",
11664
11705
  value: function buildURL(e) {
11665
11706
  var t = e.endpoint,
@@ -11671,7 +11712,7 @@ var Ts = /*#__PURE__*/function (_vt) {
11671
11712
  }(vt);
11672
11713
  var ge = /*#__PURE__*/function (_K11) {
11673
11714
  function ge(e) {
11674
- var _this56;
11715
+ var _this57;
11675
11716
  _classCallCheck(this, ge);
11676
11717
  var o;
11677
11718
  var t = e.directConnection,
@@ -11684,19 +11725,19 @@ var ge = /*#__PURE__*/function (_K11) {
11684
11725
  }
11685
11726
  }
11686
11727
  };
11687
- _this56 = _callSuper(this, ge, [e, L.buildKeyVerificationDetails(), L.buildHeaders, i, s]), _this56.insertKeyPlaceholderText = "OpenAI API Key", _this56.keyHelpUrl = "https://platform.openai.com/account/api-keys", _this56.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>OpenAI DALL\xB7E</b></div>\n <p><b>Insert text</b> to generate an image.</p>\n <p><b>Upload 1</b> PNG image to generate its variation and optionally insert text to specify the change.</p>\n <p><b>Upload 2</b> PNG images where the second is a copy of the first with a transparent area where the edit should\n take place and text to specify the edit.</p>\n <p>Click <a href=\"https://platform.openai.com/docs/guides/images/introduction\">here</a> for more info.</p>", _this56.url = "", _this56.permittedErrorPrefixes = ["Incorrect", "Invalid input image"];
11728
+ _this57 = _callSuper(this, ge, [e, L.buildKeyVerificationDetails(), L.buildHeaders, i, s]), _this57.insertKeyPlaceholderText = "OpenAI API Key", _this57.keyHelpUrl = "https://platform.openai.com/account/api-keys", _this57.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>OpenAI DALL\xB7E</b></div>\n <p><b>Insert text</b> to generate an image.</p>\n <p><b>Upload 1</b> PNG image to generate its variation and optionally insert text to specify the change.</p>\n <p><b>Upload 2</b> PNG images where the second is a copy of the first with a transparent area where the edit should\n take place and text to specify the edit.</p>\n <p>Click <a href=\"https://platform.openai.com/docs/guides/images/introduction\">here</a> for more info.</p>", _this57.url = "", _this57.permittedErrorPrefixes = ["Incorrect", "Invalid input image"];
11688
11729
  var r = (o = t == null ? void 0 : t.openAI) == null ? void 0 : o.images;
11689
- if (_this56.camera) {
11730
+ if (_this57.camera) {
11690
11731
  var a = _typeof(r) == "object" && r.size ? Number.parseInt(r.size) : 1024;
11691
- _this56.camera.files = {
11732
+ _this57.camera.files = {
11692
11733
  dimensions: {
11693
11734
  width: a,
11694
11735
  height: a
11695
11736
  }
11696
11737
  };
11697
11738
  }
11698
- _typeof(r) == "object" && Object.assign(_this56.rawBody, r), _this56.canSendMessage = ge.canFileSendMessage;
11699
- return _this56;
11739
+ _typeof(r) == "object" && Object.assign(_this57.rawBody, r), _this57.canSendMessage = ge.canFileSendMessage;
11740
+ return _this57;
11700
11741
  }
11701
11742
  _inherits(ge, _K11);
11702
11743
  return _createClass(ge, [{
@@ -11820,21 +11861,21 @@ var ge = /*#__PURE__*/function (_K11) {
11820
11861
  }]);
11821
11862
  }(K);
11822
11863
  ge.IMAGE_GENERATION_URL = "https://api.openai.com/v1/images/generations", ge.IMAGE_VARIATIONS_URL = "https://api.openai.com/v1/images/variations", ge.IMAGE_EDIT_URL = "https://api.openai.com/v1/images/edits";
11823
- var ms = ge;
11824
- var ea = /*#__PURE__*/function (_As3) {
11825
- function ea(e) {
11826
- var _this57$maxMessages;
11827
- var _this57;
11828
- _classCallCheck(this, ea);
11864
+ var gs = ge;
11865
+ var ta = /*#__PURE__*/function (_As3) {
11866
+ function ta(e) {
11867
+ var _this58$maxMessages;
11868
+ var _this58;
11869
+ _classCallCheck(this, ta);
11829
11870
  var r;
11830
11871
  var t = JSON.parse(JSON.stringify(e.directConnection)),
11831
11872
  i = (r = t.cohere) == null ? void 0 : r.chat,
11832
11873
  s = t.cohere;
11833
- _this57 = _callSuper(this, ea, [e, "https://api.cohere.ai/v1/chat", "Ask me anything!", i, s]), _typeof(i) == "object" && Object.assign(_this57.rawBody, i), (_this57$maxMessages = _this57.maxMessages) !== null && _this57$maxMessages !== void 0 ? _this57$maxMessages : _this57.maxMessages = -1;
11834
- return _this57;
11874
+ _this58 = _callSuper(this, ta, [e, "https://api.cohere.ai/v1/chat", "Ask me anything!", i, s]), _typeof(i) == "object" && Object.assign(_this58.rawBody, i), (_this58$maxMessages = _this58.maxMessages) !== null && _this58$maxMessages !== void 0 ? _this58$maxMessages : _this58.maxMessages = -1;
11875
+ return _this58;
11835
11876
  }
11836
- _inherits(ea, _As3);
11837
- return _createClass(ea, [{
11877
+ _inherits(ta, _As3);
11878
+ return _createClass(ta, [{
11838
11879
  key: "preprocessBody",
11839
11880
  value: function preprocessBody(e, t) {
11840
11881
  var i = JSON.parse(JSON.stringify(e)),
@@ -11935,18 +11976,18 @@ var Ii = /*#__PURE__*/function () {
11935
11976
  }
11936
11977
  }]);
11937
11978
  }();
11938
- var ta = /*#__PURE__*/function (_K12) {
11939
- function ta(e) {
11940
- var _this58$maxMessages, _s$model;
11941
- var _this58;
11942
- _classCallCheck(this, ta);
11979
+ var ia = /*#__PURE__*/function (_K12) {
11980
+ function ia(e) {
11981
+ var _this59$maxMessages, _s$model;
11982
+ var _this59;
11983
+ _classCallCheck(this, ia);
11943
11984
  var s;
11944
11985
  var i = JSON.parse(JSON.stringify(e.directConnection)).mistral;
11945
- _this58 = _callSuper(this, ta, [e, Ii.buildKeyVerificationDetails(), Ii.buildHeaders, i]), _this58.insertKeyPlaceholderText = "Mistral API Key", _this58.keyHelpUrl = "https://console.mistral.ai/api-keys/", _this58.url = "https://api.mistral.ai/v1/chat/completions", _this58.permittedErrorPrefixes = ["invalid"], i && (_this58.cleanConfig(i), Object.assign(_this58.rawBody, i)), (_this58$maxMessages = _this58.maxMessages) !== null && _this58$maxMessages !== void 0 ? _this58$maxMessages : _this58.maxMessages = -1, (_s$model = (s = _this58.rawBody).model) !== null && _s$model !== void 0 ? _s$model : s.model = "open-mistral-7b";
11946
- return _this58;
11986
+ _this59 = _callSuper(this, ia, [e, Ii.buildKeyVerificationDetails(), Ii.buildHeaders, i]), _this59.insertKeyPlaceholderText = "Mistral API Key", _this59.keyHelpUrl = "https://console.mistral.ai/api-keys/", _this59.url = "https://api.mistral.ai/v1/chat/completions", _this59.permittedErrorPrefixes = ["invalid"], i && (_this59.cleanConfig(i), Object.assign(_this59.rawBody, i)), (_this59$maxMessages = _this59.maxMessages) !== null && _this59$maxMessages !== void 0 ? _this59$maxMessages : _this59.maxMessages = -1, (_s$model = (s = _this59.rawBody).model) !== null && _s$model !== void 0 ? _s$model : s.model = "open-mistral-7b";
11987
+ return _this59;
11947
11988
  }
11948
- _inherits(ta, _K12);
11949
- return _createClass(ta, [{
11989
+ _inherits(ia, _K12);
11990
+ return _createClass(ia, [{
11950
11991
  key: "cleanConfig",
11951
11992
  value: function cleanConfig(e) {
11952
11993
  delete e.key;
@@ -12022,11 +12063,11 @@ var ta = /*#__PURE__*/function (_K12) {
12022
12063
  }()
12023
12064
  }]);
12024
12065
  }(K);
12025
- var ia = /*#__PURE__*/function () {
12026
- function ia() {
12027
- _classCallCheck(this, ia);
12066
+ var sa = /*#__PURE__*/function () {
12067
+ function sa() {
12068
+ _classCallCheck(this, sa);
12028
12069
  }
12029
- return _createClass(ia, null, [{
12070
+ return _createClass(sa, null, [{
12030
12071
  key: "create",
12031
12072
  value:
12032
12073
  // this should only be called when no _activeService is set or is demo as otherwise we don't want to reconnect
@@ -12037,22 +12078,22 @@ var ia = /*#__PURE__*/function () {
12037
12078
  r = e.webModel;
12038
12079
  if (r) return new ni(e);
12039
12080
  if (t) {
12040
- if (t.openAI) return t.openAI.images ? new ms(e) : t.openAI.speechToText ? new hs(e) : t.openAI.textToSpeech ? new ds(e) : t.openAI.assistant ? new xs(e) : t.openAI.realtime ? new cs(e) : new vt(e);
12041
- if (t.assemblyAI) return new ws(e);
12042
- if (t.cohere) return t.cohere.textGeneration ? new Xo(e) : t.cohere.summarization ? new Yo(e) : new ea(e);
12043
- if (t.huggingFace) return t.huggingFace.textGeneration ? new Go(e) : t.huggingFace.summarization ? new Ko(e) : t.huggingFace.translation ? new $o(e) : t.huggingFace.fillMask ? new Jo(e) : t.huggingFace.questionAnswer ? new Vo(e) : t.huggingFace.audioSpeechRecognition ? new zo(e) : t.huggingFace.audioClassification ? new Ho(e) : t.huggingFace.imageClassification ? new qo(e) : new Wo(e);
12081
+ if (t.openAI) return t.openAI.images ? new gs(e) : t.openAI.speechToText ? new us(e) : t.openAI.textToSpeech ? new hs(e) : t.openAI.assistant ? new ws(e) : t.openAI.realtime ? new ds(e) : new vt(e);
12082
+ if (t.assemblyAI) return new Ts(e);
12083
+ if (t.cohere) return t.cohere.textGeneration ? new Yo(e) : t.cohere.summarization ? new Zo(e) : new ta(e);
12084
+ if (t.huggingFace) return t.huggingFace.textGeneration ? new Vo(e) : t.huggingFace.summarization ? new Wo(e) : t.huggingFace.translation ? new Jo(e) : t.huggingFace.fillMask ? new Xo(e) : t.huggingFace.questionAnswer ? new Ko(e) : t.huggingFace.audioSpeechRecognition ? new Go(e) : t.huggingFace.audioClassification ? new qo(e) : t.huggingFace.imageClassification ? new zo(e) : new $o(e);
12044
12085
  if (t.azure) {
12045
12086
  if (t.azure.openAI) {
12046
- if (t.azure.openAI.chat) return new Ts(e);
12047
- if (t.azure.openAI.assistant) return new as(e);
12087
+ if (t.azure.openAI.chat) return new Cs(e);
12088
+ if (t.azure.openAI.assistant) return new ls(e);
12048
12089
  }
12049
- if (t.azure.speechToText) return new ps(e);
12050
- if (t.azure.textToSpeech) return new fs(e);
12051
- if (t.azure.summarization) return new us(e);
12052
- if (t.azure.translation) return new Qo(e);
12090
+ if (t.azure.speechToText) return new ms(e);
12091
+ if (t.azure.textToSpeech) return new ps(e);
12092
+ if (t.azure.summarization) return new fs(e);
12093
+ if (t.azure.translation) return new ea(e);
12053
12094
  }
12054
- if (t.stabilityAI) return t.stabilityAI.imageToImage ? new Ti(e) : t.stabilityAI.imageToImageUpscale ? new Ai(e) : t.stabilityAI.imageToImageMasking ? new wi(e) : new Ci(e);
12055
- if (t.mistral) return new ta(e);
12095
+ if (t.stabilityAI) return t.stabilityAI.imageToImage ? new Ti(e) : t.stabilityAI.imageToImageUpscale ? new wi(e) : t.stabilityAI.imageToImageMasking ? new Ai(e) : new Ci(e);
12096
+ if (t.mistral) return new ia(e);
12056
12097
  }
12057
12098
  return i && Object.keys(i).length > 0 && !s ? new rt(e) : new rt(e, void 0, s || !0);
12058
12099
  }
@@ -12081,13 +12122,13 @@ Os.attibutes = {
12081
12122
  return new Function("return ".concat(e))();
12082
12123
  }
12083
12124
  };
12084
- var gs = Os;
12125
+ var bs = Os;
12085
12126
  function x(n) {
12086
12127
  return function (e, t) {
12087
12128
  Object.defineProperty(e, t, {});
12088
12129
  var i = e.constructor,
12089
12130
  s = t.toLocaleLowerCase();
12090
- i._attributes_[s] = gs.attibutes[n], i._attributeToProperty_[s] = t;
12131
+ i._attributes_[s] = bs.attibutes[n], i._attributeToProperty_[s] = t;
12091
12132
  };
12092
12133
  }
12093
12134
  var Oi = /*#__PURE__*/function () {
@@ -12125,7 +12166,7 @@ var Oi = /*#__PURE__*/function () {
12125
12166
  }
12126
12167
  }]);
12127
12168
  }();
12128
- var sa = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" \n\t viewBox=\"50 30 420 450\" xml:space=\"preserve\">\n<g filter=\"brightness(0) saturate(100%) invert(16%) sepia(0%) saturate(1942%) hue-rotate(215deg) brightness(99%) contrast(93%)\">\n\t<g>\n\t\t<path d=\"M447.933,103.629c-0.034-3.076-1.224-6.09-3.485-8.352L352.683,3.511c-0.004-0.004-0.007-0.005-0.011-0.008\n\t\t\tC350.505,1.338,347.511,0,344.206,0H89.278C75.361,0,64.04,11.32,64.04,25.237v461.525c0,13.916,11.32,25.237,25.237,25.237\n\t\t\th333.444c13.916,0,25.237-11.32,25.237-25.237V103.753C447.96,103.709,447.937,103.672,447.933,103.629z M356.194,40.931\n\t\t\tl50.834,50.834h-49.572c-0.695,0-1.262-0.567-1.262-1.262V40.931z M423.983,486.763c0,0.695-0.566,1.261-1.261,1.261H89.278\n\t\t\tc-0.695,0-1.261-0.566-1.261-1.261V25.237c0-0.695,0.566-1.261,1.261-1.261h242.94v66.527c0,13.916,11.322,25.239,25.239,25.239\n\t\t\th66.527V486.763z\"/>\n\t</g>\n</g>\n<g>\n\t<g>\n\t\t<path d=\"M362.088,164.014H149.912c-6.62,0-11.988,5.367-11.988,11.988c0,6.62,5.368,11.988,11.988,11.988h212.175\n\t\t\tc6.62,0,11.988-5.368,11.988-11.988C374.076,169.381,368.707,164.014,362.088,164.014z\"/>\n\t</g>\n</g>\n<g>\n\t<g>\n\t\t<path d=\"M362.088,236.353H149.912c-6.62,0-11.988,5.368-11.988,11.988c0,6.62,5.368,11.988,11.988,11.988h212.175\n\t\t\tc6.62,0,11.988-5.368,11.988-11.988C374.076,241.721,368.707,236.353,362.088,236.353z\"/>\n\t</g>\n</g>\n<g>\n\t<g>\n\t\t<path d=\"M362.088,308.691H149.912c-6.62,0-11.988,5.368-11.988,11.988c0,6.621,5.368,11.988,11.988,11.988h212.175\n\t\t\tc6.62,0,11.988-5.367,11.988-11.988C374.076,314.06,368.707,308.691,362.088,308.691z\"/>\n\t</g>\n</g>\n<g>\n\t<g>\n\t\t<path d=\"M256,381.031H149.912c-6.62,0-11.988,5.368-11.988,11.988c0,6.621,5.368,11.988,11.988,11.988H256\n\t\t\tc6.62,0,11.988-5.367,11.988-11.988C267.988,386.398,262.62,381.031,256,381.031z\"/>\n\t</g>\n</g>\n</svg>",
12169
+ var na = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" \n\t viewBox=\"50 30 420 450\" xml:space=\"preserve\">\n<g filter=\"brightness(0) saturate(100%) invert(16%) sepia(0%) saturate(1942%) hue-rotate(215deg) brightness(99%) contrast(93%)\">\n\t<g>\n\t\t<path d=\"M447.933,103.629c-0.034-3.076-1.224-6.09-3.485-8.352L352.683,3.511c-0.004-0.004-0.007-0.005-0.011-0.008\n\t\t\tC350.505,1.338,347.511,0,344.206,0H89.278C75.361,0,64.04,11.32,64.04,25.237v461.525c0,13.916,11.32,25.237,25.237,25.237\n\t\t\th333.444c13.916,0,25.237-11.32,25.237-25.237V103.753C447.96,103.709,447.937,103.672,447.933,103.629z M356.194,40.931\n\t\t\tl50.834,50.834h-49.572c-0.695,0-1.262-0.567-1.262-1.262V40.931z M423.983,486.763c0,0.695-0.566,1.261-1.261,1.261H89.278\n\t\t\tc-0.695,0-1.261-0.566-1.261-1.261V25.237c0-0.695,0.566-1.261,1.261-1.261h242.94v66.527c0,13.916,11.322,25.239,25.239,25.239\n\t\t\th66.527V486.763z\"/>\n\t</g>\n</g>\n<g>\n\t<g>\n\t\t<path d=\"M362.088,164.014H149.912c-6.62,0-11.988,5.367-11.988,11.988c0,6.62,5.368,11.988,11.988,11.988h212.175\n\t\t\tc6.62,0,11.988-5.368,11.988-11.988C374.076,169.381,368.707,164.014,362.088,164.014z\"/>\n\t</g>\n</g>\n<g>\n\t<g>\n\t\t<path d=\"M362.088,236.353H149.912c-6.62,0-11.988,5.368-11.988,11.988c0,6.62,5.368,11.988,11.988,11.988h212.175\n\t\t\tc6.62,0,11.988-5.368,11.988-11.988C374.076,241.721,368.707,236.353,362.088,236.353z\"/>\n\t</g>\n</g>\n<g>\n\t<g>\n\t\t<path d=\"M362.088,308.691H149.912c-6.62,0-11.988,5.368-11.988,11.988c0,6.621,5.368,11.988,11.988,11.988h212.175\n\t\t\tc6.62,0,11.988-5.367,11.988-11.988C374.076,314.06,368.707,308.691,362.088,308.691z\"/>\n\t</g>\n</g>\n<g>\n\t<g>\n\t\t<path d=\"M256,381.031H149.912c-6.62,0-11.988,5.368-11.988,11.988c0,6.621,5.368,11.988,11.988,11.988H256\n\t\t\tc6.62,0,11.988-5.367,11.988-11.988C267.988,386.398,262.62,381.031,256,381.031z\"/>\n\t</g>\n</g>\n</svg>",
12129
12170
  J = /*#__PURE__*/function () {
12130
12171
  function J() {
12131
12172
  _classCallCheck(this, J);
@@ -12170,7 +12211,7 @@ var sa = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n<svg version=\"1.1\"
12170
12211
  t.classList.add("any-file-message-contents");
12171
12212
  var i = document.createElement("div");
12172
12213
  i.classList.add("any-file-message-icon-container");
12173
- var s = Ue.createSVGElement(sa);
12214
+ var s = Ue.createSVGElement(na);
12174
12215
  s.classList.add("any-file-message-icon"), i.appendChild(s);
12175
12216
  var r = document.createElement("div");
12176
12217
  return r.classList.add("any-file-message-text"), r.textContent = e.name || H.DEFAULT_FILE_NAME, t.appendChild(i), t.appendChild(r), H.processContent("any", t, e.src, r.textContent);
@@ -12197,9 +12238,9 @@ var sa = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n<svg version=\"1.1\"
12197
12238
  }, {
12198
12239
  key: "addMessages",
12199
12240
  value: function addMessages(e, t, i, s) {
12200
- J.createMessages(e, t, i, s).forEach(function (_ref32) {
12201
- var o = _ref32.type,
12202
- a = _ref32.elements;
12241
+ J.createMessages(e, t, i, s).forEach(function (_ref34) {
12242
+ var o = _ref34.type,
12243
+ a = _ref34.elements;
12203
12244
  H.addMessage(e, a, o, i, s);
12204
12245
  });
12205
12246
  }
@@ -12265,13 +12306,13 @@ var le = /*#__PURE__*/function () {
12265
12306
  });
12266
12307
  a && (c += 1);
12267
12308
  var d = (o == null ? void 0 : o.outerContainer) || (a == null ? void 0 : a.outerContainer.nextSibling);
12268
- r.forEach(function (_ref33, p) {
12269
- var f = _ref33.type,
12270
- m = _ref33.elements;
12309
+ r.forEach(function (_ref35, p) {
12310
+ var f = _ref35.type,
12311
+ m = _ref35.elements;
12271
12312
  var g;
12272
12313
  H.setElementProps(e, m, f, s), (g = d.parentElement) == null || g.insertBefore(m.outerContainer, d), e.messageElementRefs.splice(e.messageElementRefs.length - 1, 1), e.messageElementRefs.splice(c + p, 0, m);
12273
- }), le.removeFilesMessages(e, t), t[1].files = r.map(function (_ref34) {
12274
- var f = _ref34.elements;
12314
+ }), le.removeFilesMessages(e, t), t[1].files = r.map(function (_ref36) {
12315
+ var f = _ref36.elements;
12275
12316
  return f;
12276
12317
  }), t[0].files = i;
12277
12318
  }
@@ -12312,11 +12353,11 @@ var le = /*#__PURE__*/function () {
12312
12353
  }
12313
12354
  }]);
12314
12355
  }();
12315
- var na = /*#__PURE__*/function () {
12316
- function na() {
12317
- _classCallCheck(this, na);
12356
+ var ra = /*#__PURE__*/function () {
12357
+ function ra() {
12358
+ _classCallCheck(this, ra);
12318
12359
  }
12319
- return _createClass(na, null, [{
12360
+ return _createClass(ra, null, [{
12320
12361
  key: "getText",
12321
12362
  value: function getText(e, t) {
12322
12363
  var i;
@@ -12332,29 +12373,29 @@ var na = /*#__PURE__*/function () {
12332
12373
  }();
12333
12374
  var de = /*#__PURE__*/function (_he) {
12334
12375
  function de(e, t, i) {
12335
- var _this59;
12376
+ var _this60;
12336
12377
  _classCallCheck(this, de);
12337
12378
  var a, l;
12338
- _this59 = _callSuper(this, de, [e]);
12379
+ _this60 = _callSuper(this, de, [e]);
12339
12380
  var s = t.permittedErrorPrefixes,
12340
12381
  r = t.introPanelMarkUp,
12341
12382
  o = t.demo;
12342
- _this59._errorMessageOverrides = (a = e.errorMessages) == null ? void 0 : a.overrides, _this59._onClearMessages = ii.onClearMessages.bind(_this59, e), _this59._onError = ii.onError.bind(_this59, e), _this59._isLoadingMessageAllowed = de.getDefaultDisplayLoadingMessage(e, t), _typeof(e.displayLoadingBubble) == "object" && e.displayLoadingBubble.toggle && (e.displayLoadingBubble.toggle = _this59.setLoadingToggle.bind(_this59)), _this59._permittedErrorPrefixes = s, _this59.addSetupMessageIfNeeded(e, t) || _this59.populateIntroPanel(i, r, e.introPanelStyle), o && _this59.prepareDemo(te.processDemo(o), e.loadHistory), _this59.addIntroductoryMessages(e, t), new si(e, _this59, t), _this59._displayServiceErrorMessages = (l = e.errorMessages) == null ? void 0 : l.displayServiceErrorMessages, e.getMessages = function () {
12343
- return y.deepCloneMessagesWithReferences(_this59.messageToElements.map(function (_ref35) {
12344
- var _ref36 = _slicedToArray(_ref35, 1),
12345
- c = _ref36[0];
12383
+ _this60._errorMessageOverrides = (a = e.errorMessages) == null ? void 0 : a.overrides, _this60._onClearMessages = ii.onClearMessages.bind(_this60, e), _this60._onError = ii.onError.bind(_this60, e), _this60._isLoadingMessageAllowed = de.getDefaultDisplayLoadingMessage(e, t), _typeof(e.displayLoadingBubble) == "object" && e.displayLoadingBubble.toggle && (e.displayLoadingBubble.toggle = _this60.setLoadingToggle.bind(_this60)), _this60._permittedErrorPrefixes = s, _this60.addSetupMessageIfNeeded(e, t) || _this60.populateIntroPanel(i, r, e.introPanelStyle), o && _this60.prepareDemo(te.processDemo(o), e.loadHistory), _this60.addIntroductoryMessages(e, t), new si(e, _this60, t), _this60._displayServiceErrorMessages = (l = e.errorMessages) == null ? void 0 : l.displayServiceErrorMessages, e.getMessages = function () {
12384
+ return y.deepCloneMessagesWithReferences(_this60.messageToElements.map(function (_ref37) {
12385
+ var _ref38 = _slicedToArray(_ref37, 1),
12386
+ c = _ref38[0];
12346
12387
  return c;
12347
12388
  }));
12348
- }, e.clearMessages = _this59.clearMessages.bind(_this59, t), e.refreshMessages = _this59.refreshTextMessages.bind(_this59, e.remarkable), e.scrollToBottom = V.scrollToBottom.bind(_this59, _this59.elementRef), e.addMessage = function (c, d) {
12349
- _this59.addAnyMessage(_objectSpread(_objectSpread({}, c), {}, {
12389
+ }, e.clearMessages = _this60.clearMessages.bind(_this60, t), e.refreshMessages = _this60.refreshTextMessages.bind(_this60, e.remarkable), e.scrollToBottom = V.scrollToBottom.bind(_this60, _this60.elementRef), e.addMessage = function (c, d) {
12390
+ _this60.addAnyMessage(_objectSpread(_objectSpread({}, c), {}, {
12350
12391
  sendUpdate: !!d
12351
12392
  }), !d);
12352
12393
  }, e.updateMessage = function (c, d) {
12353
- return le.update(_this59, c, d);
12354
- }, t.isWebModel() && t.setUpMessages(_this59), e.textToSpeech && bt.processConfig(e.textToSpeech, function (c) {
12355
- _this59.textToSpeech = c;
12394
+ return le.update(_this60, c, d);
12395
+ }, t.isWebModel() && t.setUpMessages(_this60), e.textToSpeech && bt.processConfig(e.textToSpeech, function (c) {
12396
+ _this60.textToSpeech = c;
12356
12397
  });
12357
- return _this59;
12398
+ return _this60;
12358
12399
  }
12359
12400
  _inherits(de, _he);
12360
12401
  return _createClass(de, [{
@@ -12378,7 +12419,7 @@ var de = /*#__PURE__*/function (_he) {
12378
12419
  }, {
12379
12420
  key: "addSetupMessageIfNeeded",
12380
12421
  value: function addSetupMessageIfNeeded(e, t) {
12381
- var i = na.getText(e, t);
12422
+ var i = ra.getText(e, t);
12382
12423
  if (i) {
12383
12424
  var s = this.createAndAppendNewMessageElement(i, y.AI_ROLE);
12384
12425
  this.applyCustomStyles(s, y.AI_ROLE, !1);
@@ -12389,17 +12430,17 @@ var de = /*#__PURE__*/function (_he) {
12389
12430
  }, {
12390
12431
  key: "addIntroductoryMessages",
12391
12432
  value: function addIntroductoryMessages(e, t) {
12392
- var _this60 = this;
12433
+ var _this61 = this;
12393
12434
  e != null && e.shadowRoot && (this._introMessage = e.introMessage);
12394
12435
  var i = this._introMessage;
12395
12436
  t != null && t.isWebModel() && (i !== null && i !== void 0 ? i : i = t.getIntroMessage(i));
12396
12437
  var s = !(e != null && e.history) && !!(e != null && e.loadHistory || t != null && t.fetchHistory);
12397
12438
  i && (Array.isArray(i) ? i.forEach(function (r, o) {
12398
12439
  if (o !== 0) {
12399
- var a = _this60.messageElementRefs[_this60.messageElementRefs.length - 1].innerContainer;
12400
- y.hideRoleElements(a, _this60.avatar, _this60.name);
12440
+ var a = _this61.messageElementRefs[_this61.messageElementRefs.length - 1].innerContainer;
12441
+ y.hideRoleElements(a, _this61.avatar, _this61.name);
12401
12442
  }
12402
- _this60.addIntroductoryMessage(r, s);
12443
+ _this61.addIntroductoryMessage(r, s);
12403
12444
  }) : this.addIntroductoryMessage(i, s));
12404
12445
  }
12405
12446
  }, {
@@ -12450,13 +12491,17 @@ var de = /*#__PURE__*/function (_he) {
12450
12491
  value: function addNewMessage(e) {
12451
12492
  var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
12452
12493
  var i = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
12453
- var o;
12494
+ var o, a;
12454
12495
  e.role !== y.USER_ROLE && ((o = this._hiddenAttachments) == null || o.removeHiddenFiles());
12455
12496
  var s = de.createMessageContent(e),
12456
12497
  r = {
12457
12498
  status: e.overwrite
12458
12499
  };
12459
- return i ? (this.tryAddHTMLMessage(s, r, i), this.tryAddFileMessages(s, i), this.tryAddTextMessage(s, r, e, t, i)) : (this.tryAddTextMessage(s, r, e, t, i), this.tryAddFileMessages(s, i), this.tryAddHTMLMessage(s, r, i)), this.isValidMessageContent(s) && !i && this.updateStateOnMessage(s, e.overwrite, e.sendUpdate, t), s;
12500
+ return i ? (this.tryAddHTMLMessage(s, r, i), this.tryAddFileMessages(s, i), this.tryAddTextMessage(s, r, e, t, i)) : (this.tryAddTextMessage(s, r, e, t, i), this.tryAddFileMessages(s, i), this.tryAddHTMLMessage(s, r, i)), this.isValidMessageContent(s) && !i && (this.updateStateOnMessage(s, e.overwrite, e.sendUpdate, t), t || (a = this.browserStorage) == null || a.addMessages(this.messageToElements.map(function (_ref39) {
12501
+ var _ref40 = _slicedToArray(_ref39, 1),
12502
+ l = _ref40[0];
12503
+ return l;
12504
+ }))), s;
12460
12505
  }
12461
12506
  }, {
12462
12507
  key: "isValidMessageContent",
@@ -12480,13 +12525,13 @@ var de = /*#__PURE__*/function (_he) {
12480
12525
  value: function removeMessageOnError() {
12481
12526
  var e = this.messageElementRefs[this.messageElementRefs.length - 1],
12482
12527
  t = e == null ? void 0 : e.bubbleElement;
12483
- (t != null && t.classList.contains(we.MESSAGE_CLASS) && t.textContent === "" || de.isTemporaryElement(e)) && this.removeLastMessage();
12528
+ (t != null && t.classList.contains(Ae.MESSAGE_CLASS) && t.textContent === "" || de.isTemporaryElement(e)) && this.removeLastMessage();
12484
12529
  }
12485
12530
  // prettier-ignore
12486
12531
  }, {
12487
12532
  key: "addNewErrorMessage",
12488
12533
  value: function addNewErrorMessage(e, t) {
12489
- var _this61 = this;
12534
+ var _this62 = this;
12490
12535
  var i = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
12491
12536
  var c, d, u, h, f, m;
12492
12537
  (c = this._hiddenAttachments) == null || c.readdHiddenFiles(), this.removeMessageOnError();
@@ -12498,7 +12543,7 @@ var de = /*#__PURE__*/function (_he) {
12498
12543
  o.classList.add(y.ERROR_MESSAGE_TEXT_CLASS), this.renderText(o, s);
12499
12544
  var l = X.extractParticularSharedStyles(["fontSize", "fontFamily"], (h = this.messageStyles) == null ? void 0 : h["default"]);
12500
12545
  X.applyCustomStylesToElements(r, !1, l), X.applyCustomStylesToElements(r, !1, (f = this.messageStyles) == null ? void 0 : f.error), i || this.appendOuterContainerElemet(a), this.textToSpeech && bt.speak(s, this.textToSpeech), (m = this._onError) == null || m.call(this, s), setTimeout(function () {
12501
- return V.scrollToBottom(_this61.elementRef);
12546
+ return V.scrollToBottom(_this62.elementRef);
12502
12547
  });
12503
12548
  }
12504
12549
  }, {
@@ -12593,25 +12638,25 @@ var de = /*#__PURE__*/function (_he) {
12593
12638
  // WORK - update all message classes to use deep-chat prefix
12594
12639
  function clearMessages(e, t) {
12595
12640
  var _this$messageToElemen;
12596
- var r, o;
12641
+ var r, o, a;
12597
12642
  var i = [];
12598
- this.messageElementRefs.forEach(function (a) {
12599
- de.isActiveElement(a.bubbleElement.classList) ? i.push(a) : a.outerContainer.remove();
12600
- }), Array.from(this.elementRef.children).forEach(function (a) {
12601
- var c;
12602
- var l = (c = a.children[0]) == null ? void 0 : c.children[0];
12603
- l != null && l.classList.contains(y.ERROR_MESSAGE_TEXT_CLASS) && a.remove();
12643
+ this.messageElementRefs.forEach(function (l) {
12644
+ de.isActiveElement(l.bubbleElement.classList) ? i.push(l) : l.outerContainer.remove();
12645
+ }), Array.from(this.elementRef.children).forEach(function (l) {
12646
+ var d;
12647
+ var c = (d = l.children[0]) == null ? void 0 : d.children[0];
12648
+ c != null && c.classList.contains(y.ERROR_MESSAGE_TEXT_CLASS) && l.remove();
12604
12649
  }), this.messageElementRefs = i;
12605
- var s = this.messageToElements.filter(function (a) {
12606
- return a[1].text && de.isActiveElement(a[1].text.bubbleElement.classList) || a[1].html && de.isActiveElement(a[1].html.bubbleElement.classList);
12650
+ var s = this.messageToElements.filter(function (l) {
12651
+ return l[1].text && de.isActiveElement(l[1].text.bubbleElement.classList) || l[1].html && de.isActiveElement(l[1].html.bubbleElement.classList);
12607
12652
  });
12608
- (_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;
12653
+ (_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.browserStorage) == null || o.clear(), (a = this._onClearMessages) == null || a.call(this), delete e.sessionId;
12609
12654
  }
12610
12655
  }], [{
12611
12656
  key: "getDefaultDisplayLoadingMessage",
12612
12657
  value: function getDefaultDisplayLoadingMessage(e, t) {
12613
- var _ref37;
12614
- return t.websocket ? !!e.displayLoadingBubble : (_ref37 = _typeof(e.displayLoadingBubble) == "object" || e.displayLoadingBubble) !== null && _ref37 !== void 0 ? _ref37 : !0;
12658
+ var _ref41;
12659
+ return t.websocket ? !!e.displayLoadingBubble : (_ref41 = _typeof(e.displayLoadingBubble) == "object" || e.displayLoadingBubble) !== null && _ref41 !== void 0 ? _ref41 : !0;
12615
12660
  }
12616
12661
  }, {
12617
12662
  key: "checkPermittedErrorPrefixes",
@@ -12626,7 +12671,7 @@ var de = /*#__PURE__*/function (_he) {
12626
12671
  }, {
12627
12672
  key: "isActiveElement",
12628
12673
  value: function isActiveElement(e) {
12629
- return e ? e.contains(De.BUBBLE_CLASS) || e.contains(Fe.CLASS) || e.contains(we.MESSAGE_CLASS) : !1;
12674
+ return e ? e.contains(De.BUBBLE_CLASS) || e.contains(Fe.CLASS) || e.contains(Ae.MESSAGE_CLASS) : !1;
12630
12675
  }
12631
12676
  }]);
12632
12677
  }(he);
@@ -12667,7 +12712,7 @@ var j = /*#__PURE__*/function () {
12667
12712
  }]);
12668
12713
  }();
12669
12714
  j.INPUT_OUTSIDE_LEFT_ADJUSTMENT_CLASS = "text-input-container-left-adjustment", j.INPUT_OUTSIDE_RIGHT_ADJUSTMENT_CLASS = "text-input-container-right-adjustment", j.INPUT_OUTSIDE_LEFT_SMALL_ADJUSTMENT_CLASS = "text-input-container-left-small-adjustment", j.INPUT_OUTSIDE_RIGHT_SMALL_ADJUSTMENT_CLASS = "text-input-container-right-small-adjustment";
12670
- var bs = j;
12715
+ var vs = j;
12671
12716
  var Et = /*#__PURE__*/function () {
12672
12717
  function Et() {
12673
12718
  _classCallCheck(this, Et);
@@ -12702,7 +12747,7 @@ var Et = /*#__PURE__*/function () {
12702
12747
  }]);
12703
12748
  }();
12704
12749
  var Ys = ["camera", "gifs", "images", "audio", "mixedFiles", "submit", "microphone"],
12705
- ra = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 22 22\" fill=\"none\">\n <rect x=\"2.5\" y=\"2.5\" width=\"17\" height=\"17\" rx=\"2\" stroke=\"#000000\" stroke-width=\"1.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n",
12750
+ oa = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 22 22\" fill=\"none\">\n <rect x=\"2.5\" y=\"2.5\" width=\"17\" height=\"17\" rx=\"2\" stroke=\"#000000\" stroke-width=\"1.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n",
12706
12751
  Q = /*#__PURE__*/function () {
12707
12752
  function Q() {
12708
12753
  _classCallCheck(this, Q);
@@ -12762,14 +12807,15 @@ var Ys = ["camera", "gifs", "images", "audio", "mixedFiles", "submit", "micropho
12762
12807
  Q.MENU_ITEM_CLASS = "dropup-menu-item", Q.TEXT_CLASS = "dropup-menu-item-text", Q.ICON_CLASS = "dropup-menu-item-icon";
12763
12808
  var Se = Q;
12764
12809
  var O = /*#__PURE__*/function (_ct2) {
12810
+ // prettier-ignore
12765
12811
  function O(e, t, i, s) {
12766
- var _this62;
12812
+ var _this63;
12767
12813
  _classCallCheck(this, O);
12768
12814
  var a, l, c, d, u, h;
12769
12815
  var r = ((d = (c = (l = (a = e == null ? void 0 : e.styles) == null ? void 0 : a.button) == null ? void 0 : l["default"]) == null ? void 0 : c.text) == null ? void 0 : d.content) || "Custom ".concat(t),
12770
- o = ra;
12771
- _this62 = _callSuper(this, O, [O.createButtonElement(), o, e == null ? void 0 : e.position, (u = e == null ? void 0 : e.styles) == null ? void 0 : u.button, r]), _this62._state = "default", _this62.isCustom = !0, _this62._innerElements = _this62.createInnerElementsForStates(_this62.customStyles), _this62._menuStyles = s, _this62._onClick = e.onClick, _this62._dropupStyles = (h = e.styles) == null ? void 0 : h.dropup, _this62.setSetState(e), _this62.addClickListener(i), _this62.changeState(e.initialState, !0);
12772
- return _this62;
12816
+ o = oa;
12817
+ _this63 = _callSuper(this, O, [O.createButtonElement(), o, e == null ? void 0 : e.position, void 0, (u = e == null ? void 0 : e.styles) == null ? void 0 : u.button, r]), _this63._state = "default", _this63.isCustom = !0, _this63._innerElements = _this63.createInnerElementsForStates(_this63.customStyles), _this63._menuStyles = s, _this63._onClick = e.onClick, _this63._dropupStyles = (h = e.styles) == null ? void 0 : h.dropup, _this63.setSetState(e), _this63.addClickListener(i), _this63.changeState(e.initialState, !0);
12818
+ return _this63;
12773
12819
  }
12774
12820
  _inherits(O, _ct2);
12775
12821
  return _createClass(O, [{
@@ -12786,19 +12832,19 @@ var O = /*#__PURE__*/function (_ct2) {
12786
12832
  }, {
12787
12833
  key: "setSetState",
12788
12834
  value: function setSetState(e) {
12789
- var _this63 = this;
12835
+ var _this64 = this;
12790
12836
  e.setState = function (t) {
12791
- t === "default" && _this63.changeToDefault(), t === "active" && _this63.changeToActive(), t === "disabled" && _this63.changeToDisabled();
12837
+ t === "default" && _this64.changeToDefault(), t === "active" && _this64.changeToActive(), t === "disabled" && _this64.changeToDisabled();
12792
12838
  };
12793
12839
  }
12794
12840
  }, {
12795
12841
  key: "addClickListener",
12796
12842
  value: function addClickListener(e) {
12797
- var _this64 = this;
12843
+ var _this65 = this;
12798
12844
  this.elementRef.addEventListener("click", function () {
12799
12845
  var i;
12800
- var t = (i = _this64._onClick) == null ? void 0 : i.call(_this64, _this64._state);
12801
- e == null || e(), (t === "default" || t === "active" || t === "disabled") && _this64.changeState(t);
12846
+ var t = (i = _this65._onClick) == null ? void 0 : i.call(_this65, _this65._state);
12847
+ e == null || e(), (t === "default" || t === "active" || t === "disabled") && _this65.changeState(t);
12802
12848
  });
12803
12849
  }
12804
12850
  }, {
@@ -12908,7 +12954,7 @@ var O = /*#__PURE__*/function (_ct2) {
12908
12954
  }(ct);
12909
12955
  O.INDICATOR_PREFIX = "custom", O.BUTTON_CLASS = "custom-button", O.DISABLED_CONTAINER_CLASS = "custom-button-container-disabled", O.DEFAULT_CONTAINER_CLASS = "custom-button-container-default", O.ACTIVE_CONTAINER_CLASS = "custom-button-container-active";
12910
12956
  var st = O;
12911
- var oa = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M16 0c-8.836 0-16 7.163-16 16s7.163 16 16 16c8.837 0 16-7.163 16-16s-7.163-16-16-16zM16 30.032c-7.72 0-14-6.312-14-14.032s6.28-14 14-14 14 6.28 14 14-6.28 14.032-14 14.032zM23 15h-6v-6c0-0.552-0.448-1-1-1s-1 0.448-1 1v6h-6c-0.552 0-1 0.448-1 1s0.448 1 1 1h6v6c0 0.552 0.448 1 1 1s1-0.448 1-1v-6h6c0.552 0 1-0.448 1-1s-0.448-1-1-1z\"></path>\n</svg>";
12957
+ var aa = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M16 0c-8.836 0-16 7.163-16 16s7.163 16 16 16c8.837 0 16-7.163 16-16s-7.163-16-16-16zM16 30.032c-7.72 0-14-6.312-14-14.032s6.28-14 14-14 14 6.28 14 14-6.28 14.032-14 14.032zM23 15h-6v-6c0-0.552-0.448-1-1-1s-1 0.448-1 1v6h-6c-0.552 0-1 0.448-1 1s0.448 1 1 1h6v6c0 0.552 0.448 1 1 1s1-0.448 1-1v-6h6c0.552 0 1-0.448 1-1s-0.448-1-1-1z\"></path>\n</svg>";
12912
12958
  var ri = /*#__PURE__*/function () {
12913
12959
  function ri() {
12914
12960
  _classCallCheck(this, ri);
@@ -12930,16 +12976,16 @@ var ri = /*#__PURE__*/function () {
12930
12976
  }
12931
12977
  }]);
12932
12978
  }();
12933
- var Cs = /*#__PURE__*/function () {
12934
- function Cs(e, t) {
12935
- var _this65 = this;
12936
- _classCallCheck(this, Cs);
12979
+ var Rs = /*#__PURE__*/function () {
12980
+ function Rs(e, t) {
12981
+ var _this66 = this;
12982
+ _classCallCheck(this, Rs);
12937
12983
  var i;
12938
- this._isOpen = !0, this._styles = t, this.elementRef = Cs.createElement((i = this._styles) == null ? void 0 : i.container), this.close(), setTimeout(function () {
12939
- return _this65.addWindowEvents(e);
12984
+ this._isOpen = !0, this._styles = t, this.elementRef = Rs.createElement((i = this._styles) == null ? void 0 : i.container), this.close(), setTimeout(function () {
12985
+ return _this66.addWindowEvents(e);
12940
12986
  });
12941
12987
  }
12942
- return _createClass(Cs, [{
12988
+ return _createClass(Rs, [{
12943
12989
  key: "open",
12944
12990
  value: function open() {
12945
12991
  this.elementRef.style.display = "block", this._isOpen = !0;
@@ -12989,15 +13035,15 @@ var Cs = /*#__PURE__*/function () {
12989
13035
  }();
12990
13036
  var et = /*#__PURE__*/function (_ct3) {
12991
13037
  function et(e, t) {
12992
- var _this66;
13038
+ var _this67;
12993
13039
  _classCallCheck(this, et);
12994
13040
  var s;
12995
- _this66 = _callSuper(this, et, [et.createButtonElement(), oa, void 0, {
13041
+ _this67 = _callSuper(this, et, [et.createButtonElement(), aa, void 0, void 0, {
12996
13042
  styles: (s = t == null ? void 0 : t.button) == null ? void 0 : s.styles
12997
13043
  }]);
12998
- var i = _this66.createInnerElementsForStates(_this66.customStyles);
12999
- _this66._menu = new Cs(e, t == null ? void 0 : t.menu), _this66.addClickEvent(), _this66.buttonContainer = et.createButtonContainer(), _this66.changeElementsByState(i.styles), _this66.buttonContainer.appendChild(_this66.elementRef), _this66.elementRef.classList.add(et.BUTTON_ICON_CLASS), _this66.buttonContainer.appendChild(_this66._menu.elementRef), _this66.reapplyStateStyle("styles"), _this66.addContainerEvents(e);
13000
- return _this66;
13044
+ var i = _this67.createInnerElementsForStates(_this67.customStyles);
13045
+ _this67._menu = new Rs(e, t == null ? void 0 : t.menu), _this67.addClickEvent(), _this67.buttonContainer = et.createButtonContainer(), _this67.changeElementsByState(i.styles), _this67.buttonContainer.appendChild(_this67.elementRef), _this67.elementRef.classList.add(et.BUTTON_ICON_CLASS), _this67.buttonContainer.appendChild(_this67._menu.elementRef), _this67.reapplyStateStyle("styles"), _this67.addContainerEvents(e);
13046
+ return _this67;
13001
13047
  }
13002
13048
  _inherits(et, _ct3);
13003
13049
  return _createClass(et, [{
@@ -13020,10 +13066,10 @@ var et = /*#__PURE__*/function (_ct3) {
13020
13066
  }, {
13021
13067
  key: "addContainerEvents",
13022
13068
  value: function addContainerEvents(e) {
13023
- var _this67 = this;
13069
+ var _this68 = this;
13024
13070
  e.addEventListener("click", function (t) {
13025
13071
  var i = t.target.classList;
13026
- !i.contains(et.BUTTON_ICON_CLASS) && !i.contains(st.DISABLED_CONTAINER_CLASS) && _this67._menu.close();
13072
+ !i.contains(et.BUTTON_ICON_CLASS) && !i.contains(st.DISABLED_CONTAINER_CLASS) && _this68._menu.close();
13027
13073
  });
13028
13074
  }
13029
13075
  }], [{
@@ -13064,8 +13110,8 @@ var $ = /*#__PURE__*/function () {
13064
13110
  }),
13065
13111
  c = t["dropup-menu"][l];
13066
13112
  c && (r.addItem(c.button), t["dropup-menu"].splice(l, 1));
13067
- }), t["dropup-menu"].forEach(function (_ref38) {
13068
- var a = _ref38.button;
13113
+ }), t["dropup-menu"].forEach(function (_ref42) {
13114
+ var a = _ref42.button;
13069
13115
  return r.addItem(a);
13070
13116
  });
13071
13117
  var o = Ni.getPosition(t, s);
@@ -13131,41 +13177,41 @@ var $ = /*#__PURE__*/function () {
13131
13177
  }
13132
13178
  }]);
13133
13179
  }();
13134
- var aa = "<?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=\"M20 10.9696L11.9628 18.5497C10.9782 19.4783 9.64274 20 8.25028 20C6.85782 20 5.52239 19.4783 4.53777 18.5497C3.55315 17.6211 3 16.3616 3 15.0483C3 13.7351 3.55315 12.4756 4.53777 11.547L12.575 3.96687C13.2314 3.34779 14.1217 3 15.05 3C15.9783 3 16.8686 3.34779 17.525 3.96687C18.1814 4.58595 18.5502 5.4256 18.5502 6.30111C18.5502 7.17662 18.1814 8.01628 17.525 8.63535L9.47904 16.2154C9.15083 16.525 8.70569 16.6989 8.24154 16.6989C7.77738 16.6989 7.33224 16.525 7.00403 16.2154C6.67583 15.9059 6.49144 15.4861 6.49144 15.0483C6.49144 14.6106 6.67583 14.1907 7.00403 13.8812L14.429 6.88674\" stroke=\"#000000\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>",
13135
- la = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M20,15.2928932 L20,5.5 C20,4.67157288 19.3284271,4 18.5,4 L5.5,4 C4.67157288,4 4,4.67157288 4,5.5 L4,12.2928932 L7.14644661,9.14644661 C7.34170876,8.95118446 7.65829124,8.95118446 7.85355339,9.14644661 L13.5,14.7928932 L16.1464466,12.1464466 C16.3417088,11.9511845 16.6582912,11.9511845 16.8535534,12.1464466 L20,15.2928932 Z M20,16.7071068 L16.5,13.2071068 L13.8535534,15.8535534 C13.6582912,16.0488155 13.3417088,16.0488155 13.1464466,15.8535534 L7.5,10.2071068 L4,13.7071068 L4,18.5 C4,19.3284271 4.67157288,20 5.5,20 L18.5,20 C19.3284271,20 20,19.3284271 20,18.5 L20,16.7071068 Z M3,5.5 C3,4.11928813 4.11928813,3 5.5,3 L18.5,3 C19.8807119,3 21,4.11928813 21,5.5 L21,18.5 C21,19.8807119 19.8807119,21 18.5,21 L5.5,21 C4.11928813,21 3,19.8807119 3,18.5 L3,5.5 Z M15,6 L17,6 C17.5522847,6 18,6.44771525 18,7 L18,9 C18,9.55228475 17.5522847,10 17,10 L15,10 C14.4477153,10 14,9.55228475 14,9 L14,7 C14,6.44771525 14.4477153,6 15,6 Z M15,7 L15,9 L17,9 L17,7 L15,7 Z\"/>\n</svg>\n",
13136
- ca = "<svg version=\"1.1\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"-49.49 -49.49 593.87 593.87\" stroke-width=\"3.95908\" transform=\"rotate(0)\">\n <g stroke-width=\"0\"></g>\n <g stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"0.98977\"></g>\n <g>\n <g>\n <g>\n <path d=\"M163.205,76.413v293.301c-3.434-3.058-7.241-5.867-11.486-8.339c-21.38-12.452-49.663-15.298-77.567-7.846 c-49.038,13.096-80.904,54.519-71.038,92.337c4.019,15.404,14.188,28.221,29.404,37.087c13.553,7.894,29.87,11.933,47.115,11.933 c9.962,0,20.231-1.356,30.447-4.087c42.74-11.406,72.411-44.344,72.807-77.654h0.011v-0.162c0.002-0.166,0-0.331,0-0.496V187.072 l290.971-67.3v178.082c-3.433-3.055-7.238-5.863-11.481-8.334c-21.385-12.452-49.654-15.308-77.567-7.846 c-49.038,13.087-80.904,54.519-71.038,92.356c4.019,15.385,14.183,28.212,29.404,37.067c13.548,7.894,29.875,11.933,47.115,11.933 c9.962,0,20.231-1.356,30.452-4.087c42.74-11.413,72.411-44.346,72.804-77.654h0.004v-0.065c0.003-0.236,0.001-0.469,0-0.704V0 L163.205,76.413z M104.999,471.779c-22.543,6.038-45.942,3.846-62.572-5.846c-10.587-6.163-17.591-14.817-20.255-25.038 c-7.144-27.375,18.452-58.029,57.062-68.346c8.409-2.25,16.938-3.346,25.188-3.346c13.87,0,26.962,3.115,37.389,9.192 c10.587,6.163,17.591,14.817,20.255,25.029c0.809,3.102,1.142,6.248,1.139,9.4v0.321h0.014 C162.99,437.714,139.082,462.678,104.999,471.779z M182.898,166.853V92.067l290.971-67.298v74.784L182.898,166.853z M415.677,399.923c-22.558,6.038-45.942,3.837-62.587-5.846c-10.587-6.163-17.587-14.817-20.25-25.019 c-7.144-27.385,18.452-58.058,57.058-68.365c8.414-2.25,16.942-3.346,25.192-3.346c13.875,0,26.962,3.115,37.385,9.192 c10.596,6.163,17.596,14.817,20.26,25.029v0.01c0.796,3.05,1.124,6.144,1.135,9.244v0.468h0.02 C473.668,365.851,449.763,390.814,415.677,399.923z\">\n </path>\n </g>\n </g>\n </g>\n</svg>",
13137
- da = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" viewBox=\"0 0 5.9266752 5.6408391\" height=\"21.31971\" width=\"22.4\">\n <g>\n <path d=\"m 5.2564627,1.548212 c -3.1136005,-0.4796804 -1.5568006,-0.2398402 0,0 z M 2.0001198,2.0922063 c 0.1556781,0 0.2657489,0.020893 0.3917849,0.080366 0.081154,0.038347 0.1153492,0.134065 0.076377,0.2138602 -0.038973,0.07979 -0.1363527,0.1134129 -0.2175069,0.075091 -0.078199,-0.036919 -0.1407455,-0.048792 -0.250655,-0.048792 -0.2260486,0 -0.3921482,0.2042182 -0.3921482,0.4801409 0,0.2761822 0.1663188,0.4810688 0.3921482,0.4810688 0.1117901,0 0.2064255,-0.046133 0.255659,-0.1284198 l 0.00162,-0.00389 V 3.0534032 l -0.098011,1.75e-4 c -0.081844,0 -0.1495979,-0.059305 -0.1612403,-0.1365887 l -0.00175,-0.023683 c 0,-0.08047 0.060311,-0.1470874 0.1389194,-0.1585331 l 0.024085,-0.00195 h 0.2612303 c 0.081842,0 0.149598,0.059305 0.1612404,0.1365891 l 0.00175,0.023683 -3.398e-4,0.3968809 v 0 l -0.00168,0.014211 v 0 l -0.00553,0.023034 v 0 l -0.00532,0.014145 c -0.098178,0.22826 -0.3236506,0.3528713 -0.5706303,0.3528713 -0.4240855,0 -0.7181621,-0.3622714 -0.7181621,-0.8016063 0,-0.4391857 0.2940275,-0.8006848 0.7181621,-0.8006848 z m 1.2034759,0.031275 c 0.081843,0 0.1495977,0.059305 0.1612403,0.1365891 l 0.00175,0.023683 v 1.2211775 c 0,0.088516 -0.07298,0.1602721 -0.1630073,0.1602721 -0.081841,0 -0.1495972,-0.059305 -0.1612397,-0.1365892 L 3.040589,3.5049308 V 2.2837527 c 0,-0.088516 0.07298,-0.1602721 0.1630067,-0.1602714 z m 0.7813442,0 0.5209469,0.00195 c 0.090025,3.048e-4 0.1627543,0.072306 0.1624458,0.1608234 -2.809e-4,0.08047 -0.06083,0.1468798 -0.1394772,0.158066 l -0.024092,0.00195 -0.3575326,-0.0013 v 0.4497782 l 0.2928918,2.27e-4 c 0.081842,0 0.1495979,0.059305 0.1612403,0.136589 l 0.00175,0.023683 c 0,0.080469 -0.06031,0.1470871 -0.1389193,0.1585393 l -0.024092,0.00195 -0.2928919,-2.336e-4 1.563e-4,0.2860316 c 0,0.080471 -0.06031,0.1470873 -0.1389193,0.1585395 l -0.024085,0.00195 c -0.081843,0 -0.1495979,-0.059305 -0.1612403,-0.1365826 l -0.00175,-0.023691 V 2.2841354 c 2.798e-4,-0.08047 0.060829,-0.1468797 0.1394758,-0.1580594 z\"/>\n <path d=\"m 5.0894191,1.0943261 c 0,-0.21918999 -0.177687,-0.39686999 -0.396876,-0.39686999 h -3.43959 c -0.2191879,0 -0.391262,0.1777519 -0.3968759,0.39686999 l -0.027082,3.4379266 c 0.040152,0.2939927 0.4235456,0.409415 0.4235456,0.409415 l 3.4785583,-0.00851 c 0,0 0.3008506,-0.1402998 0.3236271,-0.4201576 0.042911,-0.5272495 0.034693,-1.6106146 0.034693,-3.4186761 z m -4.49792494,0 c 0,-0.36530999 0.29614504,-0.66145999 0.66145894,-0.66145999 h 3.43959 c 0.365314,0 0.66146,0.29615 0.66146,0.66145999 v 3.43959 c 0,0.36532 -0.296146,0.66146 -0.66146,0.66146 h -3.43959 c -0.3653139,0 -0.66145894,-0.29614 -0.66145894,-0.66146 z\"/>\n </g>\n</svg>\n",
13138
- ha = {
13180
+ var la = "<?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=\"M20 10.9696L11.9628 18.5497C10.9782 19.4783 9.64274 20 8.25028 20C6.85782 20 5.52239 19.4783 4.53777 18.5497C3.55315 17.6211 3 16.3616 3 15.0483C3 13.7351 3.55315 12.4756 4.53777 11.547L12.575 3.96687C13.2314 3.34779 14.1217 3 15.05 3C15.9783 3 16.8686 3.34779 17.525 3.96687C18.1814 4.58595 18.5502 5.4256 18.5502 6.30111C18.5502 7.17662 18.1814 8.01628 17.525 8.63535L9.47904 16.2154C9.15083 16.525 8.70569 16.6989 8.24154 16.6989C7.77738 16.6989 7.33224 16.525 7.00403 16.2154C6.67583 15.9059 6.49144 15.4861 6.49144 15.0483C6.49144 14.6106 6.67583 14.1907 7.00403 13.8812L14.429 6.88674\" stroke=\"#000000\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>",
13181
+ ca = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M20,15.2928932 L20,5.5 C20,4.67157288 19.3284271,4 18.5,4 L5.5,4 C4.67157288,4 4,4.67157288 4,5.5 L4,12.2928932 L7.14644661,9.14644661 C7.34170876,8.95118446 7.65829124,8.95118446 7.85355339,9.14644661 L13.5,14.7928932 L16.1464466,12.1464466 C16.3417088,11.9511845 16.6582912,11.9511845 16.8535534,12.1464466 L20,15.2928932 Z M20,16.7071068 L16.5,13.2071068 L13.8535534,15.8535534 C13.6582912,16.0488155 13.3417088,16.0488155 13.1464466,15.8535534 L7.5,10.2071068 L4,13.7071068 L4,18.5 C4,19.3284271 4.67157288,20 5.5,20 L18.5,20 C19.3284271,20 20,19.3284271 20,18.5 L20,16.7071068 Z M3,5.5 C3,4.11928813 4.11928813,3 5.5,3 L18.5,3 C19.8807119,3 21,4.11928813 21,5.5 L21,18.5 C21,19.8807119 19.8807119,21 18.5,21 L5.5,21 C4.11928813,21 3,19.8807119 3,18.5 L3,5.5 Z M15,6 L17,6 C17.5522847,6 18,6.44771525 18,7 L18,9 C18,9.55228475 17.5522847,10 17,10 L15,10 C14.4477153,10 14,9.55228475 14,9 L14,7 C14,6.44771525 14.4477153,6 15,6 Z M15,7 L15,9 L17,9 L17,7 L15,7 Z\"/>\n</svg>\n",
13182
+ da = "<svg version=\"1.1\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"-49.49 -49.49 593.87 593.87\" stroke-width=\"3.95908\" transform=\"rotate(0)\">\n <g stroke-width=\"0\"></g>\n <g stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"0.98977\"></g>\n <g>\n <g>\n <g>\n <path d=\"M163.205,76.413v293.301c-3.434-3.058-7.241-5.867-11.486-8.339c-21.38-12.452-49.663-15.298-77.567-7.846 c-49.038,13.096-80.904,54.519-71.038,92.337c4.019,15.404,14.188,28.221,29.404,37.087c13.553,7.894,29.87,11.933,47.115,11.933 c9.962,0,20.231-1.356,30.447-4.087c42.74-11.406,72.411-44.344,72.807-77.654h0.011v-0.162c0.002-0.166,0-0.331,0-0.496V187.072 l290.971-67.3v178.082c-3.433-3.055-7.238-5.863-11.481-8.334c-21.385-12.452-49.654-15.308-77.567-7.846 c-49.038,13.087-80.904,54.519-71.038,92.356c4.019,15.385,14.183,28.212,29.404,37.067c13.548,7.894,29.875,11.933,47.115,11.933 c9.962,0,20.231-1.356,30.452-4.087c42.74-11.413,72.411-44.346,72.804-77.654h0.004v-0.065c0.003-0.236,0.001-0.469,0-0.704V0 L163.205,76.413z M104.999,471.779c-22.543,6.038-45.942,3.846-62.572-5.846c-10.587-6.163-17.591-14.817-20.255-25.038 c-7.144-27.375,18.452-58.029,57.062-68.346c8.409-2.25,16.938-3.346,25.188-3.346c13.87,0,26.962,3.115,37.389,9.192 c10.587,6.163,17.591,14.817,20.255,25.029c0.809,3.102,1.142,6.248,1.139,9.4v0.321h0.014 C162.99,437.714,139.082,462.678,104.999,471.779z M182.898,166.853V92.067l290.971-67.298v74.784L182.898,166.853z M415.677,399.923c-22.558,6.038-45.942,3.837-62.587-5.846c-10.587-6.163-17.587-14.817-20.25-25.019 c-7.144-27.385,18.452-58.058,57.058-68.365c8.414-2.25,16.942-3.346,25.192-3.346c13.875,0,26.962,3.115,37.385,9.192 c10.596,6.163,17.596,14.817,20.26,25.029v0.01c0.796,3.05,1.124,6.144,1.135,9.244v0.468h0.02 C473.668,365.851,449.763,390.814,415.677,399.923z\">\n </path>\n </g>\n </g>\n </g>\n</svg>",
13183
+ ha = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" viewBox=\"0 0 5.9266752 5.6408391\" height=\"21.31971\" width=\"22.4\">\n <g>\n <path d=\"m 5.2564627,1.548212 c -3.1136005,-0.4796804 -1.5568006,-0.2398402 0,0 z M 2.0001198,2.0922063 c 0.1556781,0 0.2657489,0.020893 0.3917849,0.080366 0.081154,0.038347 0.1153492,0.134065 0.076377,0.2138602 -0.038973,0.07979 -0.1363527,0.1134129 -0.2175069,0.075091 -0.078199,-0.036919 -0.1407455,-0.048792 -0.250655,-0.048792 -0.2260486,0 -0.3921482,0.2042182 -0.3921482,0.4801409 0,0.2761822 0.1663188,0.4810688 0.3921482,0.4810688 0.1117901,0 0.2064255,-0.046133 0.255659,-0.1284198 l 0.00162,-0.00389 V 3.0534032 l -0.098011,1.75e-4 c -0.081844,0 -0.1495979,-0.059305 -0.1612403,-0.1365887 l -0.00175,-0.023683 c 0,-0.08047 0.060311,-0.1470874 0.1389194,-0.1585331 l 0.024085,-0.00195 h 0.2612303 c 0.081842,0 0.149598,0.059305 0.1612404,0.1365891 l 0.00175,0.023683 -3.398e-4,0.3968809 v 0 l -0.00168,0.014211 v 0 l -0.00553,0.023034 v 0 l -0.00532,0.014145 c -0.098178,0.22826 -0.3236506,0.3528713 -0.5706303,0.3528713 -0.4240855,0 -0.7181621,-0.3622714 -0.7181621,-0.8016063 0,-0.4391857 0.2940275,-0.8006848 0.7181621,-0.8006848 z m 1.2034759,0.031275 c 0.081843,0 0.1495977,0.059305 0.1612403,0.1365891 l 0.00175,0.023683 v 1.2211775 c 0,0.088516 -0.07298,0.1602721 -0.1630073,0.1602721 -0.081841,0 -0.1495972,-0.059305 -0.1612397,-0.1365892 L 3.040589,3.5049308 V 2.2837527 c 0,-0.088516 0.07298,-0.1602721 0.1630067,-0.1602714 z m 0.7813442,0 0.5209469,0.00195 c 0.090025,3.048e-4 0.1627543,0.072306 0.1624458,0.1608234 -2.809e-4,0.08047 -0.06083,0.1468798 -0.1394772,0.158066 l -0.024092,0.00195 -0.3575326,-0.0013 v 0.4497782 l 0.2928918,2.27e-4 c 0.081842,0 0.1495979,0.059305 0.1612403,0.136589 l 0.00175,0.023683 c 0,0.080469 -0.06031,0.1470871 -0.1389193,0.1585393 l -0.024092,0.00195 -0.2928919,-2.336e-4 1.563e-4,0.2860316 c 0,0.080471 -0.06031,0.1470873 -0.1389193,0.1585395 l -0.024085,0.00195 c -0.081843,0 -0.1495979,-0.059305 -0.1612403,-0.1365826 l -0.00175,-0.023691 V 2.2841354 c 2.798e-4,-0.08047 0.060829,-0.1468797 0.1394758,-0.1580594 z\"/>\n <path d=\"m 5.0894191,1.0943261 c 0,-0.21918999 -0.177687,-0.39686999 -0.396876,-0.39686999 h -3.43959 c -0.2191879,0 -0.391262,0.1777519 -0.3968759,0.39686999 l -0.027082,3.4379266 c 0.040152,0.2939927 0.4235456,0.409415 0.4235456,0.409415 l 3.4785583,-0.00851 c 0,0 0.3008506,-0.1402998 0.3236271,-0.4201576 0.042911,-0.5272495 0.034693,-1.6106146 0.034693,-3.4186761 z m -4.49792494,0 c 0,-0.36530999 0.29614504,-0.66145999 0.66145894,-0.66145999 h 3.43959 c 0.365314,0 0.66146,0.29615 0.66146,0.66145999 v 3.43959 c 0,0.36532 -0.296146,0.66146 -0.66146,0.66146 h -3.43959 c -0.3653139,0 -0.66145894,-0.29614 -0.66145894,-0.66146 z\"/>\n </g>\n</svg>\n",
13184
+ ua = {
13139
13185
  images: {
13140
13186
  id: "upload-images-icon",
13141
- svgString: la,
13187
+ svgString: ca,
13142
13188
  dropupText: "Image"
13143
13189
  },
13144
13190
  gifs: {
13145
13191
  id: "upload-gifs-icon",
13146
- svgString: da,
13192
+ svgString: ha,
13147
13193
  dropupText: "GIF"
13148
13194
  },
13149
13195
  audio: {
13150
13196
  id: "upload-audio-icon",
13151
- svgString: ca,
13197
+ svgString: da,
13152
13198
  dropupText: "Audio"
13153
13199
  },
13154
13200
  mixedFiles: {
13155
13201
  id: "upload-mixed-files-icon",
13156
- svgString: aa,
13202
+ svgString: la,
13157
13203
  dropupText: "File"
13158
13204
  }
13159
13205
  };
13160
- var Gi = /*#__PURE__*/function (_ct4) {
13161
- function Gi(e) {
13162
- var _this68;
13163
- _classCallCheck(this, Gi);
13164
- (e == null ? void 0 : e.position) === "dropup-menu" && (e.position = "outside-right"), _this68 = _callSuper(this, Gi, [Gi.createMicrophoneElement(), On, e == null ? void 0 : e.position, e]), _this68.isActive = !1, _this68._innerElements = _this68.createInnerElementsForStates(_this68.customStyles), _this68.changeToDefault();
13165
- return _this68;
13166
- }
13167
- _inherits(Gi, _ct4);
13168
- return _createClass(Gi, [{
13206
+ var Vi = /*#__PURE__*/function (_ct4) {
13207
+ function Vi(e) {
13208
+ var _this69;
13209
+ _classCallCheck(this, Vi);
13210
+ (e == null ? void 0 : e.position) === "dropup-menu" && (e.position = "outside-right"), _this69 = _callSuper(this, Vi, [Vi.createMicrophoneElement(), On, e == null ? void 0 : e.position, void 0, e]), _this69.isActive = !1, _this69._innerElements = _this69.createInnerElementsForStates(_this69.customStyles), _this69.changeToDefault();
13211
+ return _this69;
13212
+ }
13213
+ _inherits(Vi, _ct4);
13214
+ return _createClass(Vi, [{
13169
13215
  key: "createInnerElementsForStates",
13170
13216
  value: function createInnerElementsForStates(e) {
13171
13217
  var t = "microphone-icon";
@@ -13220,20 +13266,20 @@ var Gi = /*#__PURE__*/function (_ct4) {
13220
13266
  }
13221
13267
  }]);
13222
13268
  }(ct);
13223
- function ua(n) {
13269
+ function fa(n) {
13224
13270
  return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n["default"] : n;
13225
13271
  }
13226
13272
  var mi = {},
13227
13273
  St = {},
13228
13274
  _t = {},
13229
13275
  xt = {},
13230
- At = {},
13276
+ wt = {},
13231
13277
  Zs;
13232
- function Vi() {
13233
- if (Zs) return At;
13234
- Zs = 1, Object.defineProperty(At, "__esModule", {
13278
+ function Ki() {
13279
+ if (Zs) return wt;
13280
+ Zs = 1, Object.defineProperty(wt, "__esModule", {
13235
13281
  value: !0
13236
- }), At.Text = void 0;
13282
+ }), wt.Text = void 0;
13237
13283
  var n = /*#__PURE__*/function () {
13238
13284
  function n() {
13239
13285
  _classCallCheck(this, n);
@@ -13262,7 +13308,7 @@ function Vi() {
13262
13308
  }
13263
13309
  }]);
13264
13310
  }();
13265
- return At.Text = n, n.FIRST_CHAR_REGEX = /\S/, n.DOUBLE_LINE = /\n\n/g, n.ONE_LINE = /\n/g, At;
13311
+ return wt.Text = n, n.FIRST_CHAR_REGEX = /\S/, n.DOUBLE_LINE = /\n\n/g, n.ONE_LINE = /\n/g, wt;
13266
13312
  }
13267
13313
  var Qs;
13268
13314
  function Dn() {
@@ -13270,7 +13316,7 @@ function Dn() {
13270
13316
  Qs = 1, Object.defineProperty(xt, "__esModule", {
13271
13317
  value: !0
13272
13318
  }), xt.Translate = void 0;
13273
- var n = Vi();
13319
+ var n = Ki();
13274
13320
  var e = /*#__PURE__*/function () {
13275
13321
  function e() {
13276
13322
  _classCallCheck(this, e);
@@ -13287,7 +13333,7 @@ function Dn() {
13287
13333
  return xt.Translate = e, xt;
13288
13334
  }
13289
13335
  var en;
13290
- function fa() {
13336
+ function pa() {
13291
13337
  if (en) return _t;
13292
13338
  en = 1, Object.defineProperty(_t, "__esModule", {
13293
13339
  value: !0
@@ -13330,24 +13376,24 @@ function fa() {
13330
13376
  }();
13331
13377
  return _t.WebSpeechTranscript = e, _t;
13332
13378
  }
13333
- var wt = {},
13379
+ var At = {},
13334
13380
  tn;
13335
- function Rs() {
13336
- if (tn) return wt;
13337
- tn = 1, Object.defineProperty(wt, "__esModule", {
13381
+ function Ms() {
13382
+ if (tn) return At;
13383
+ tn = 1, Object.defineProperty(At, "__esModule", {
13338
13384
  value: !0
13339
- }), wt.Browser = void 0;
13385
+ }), At.Browser = void 0;
13340
13386
  var n = /*#__PURE__*/_createClass(function n() {
13341
13387
  _classCallCheck(this, n);
13342
13388
  });
13343
- return wt.Browser = n, n.IS_SAFARI = function () {
13389
+ return At.Browser = n, n.IS_SAFARI = function () {
13344
13390
  return n._IS_SAFARI === void 0 && (n._IS_SAFARI = /^((?!chrome|android).)*safari/i.test(navigator.userAgent)), n._IS_SAFARI;
13345
- }, wt;
13391
+ }, At;
13346
13392
  }
13347
13393
  var Tt = {},
13348
13394
  Ct = {},
13349
13395
  sn;
13350
- function pa() {
13396
+ function ma() {
13351
13397
  if (sn) return Ct;
13352
13398
  sn = 1, Object.defineProperty(Ct, "__esModule", {
13353
13399
  value: !0
@@ -13366,9 +13412,9 @@ function pa() {
13366
13412
  }, {
13367
13413
  key: "keyDownWindow",
13368
13414
  value: function keyDownWindow(t) {
13369
- var _this69 = this;
13415
+ var _this70 = this;
13370
13416
  t.element && n.getElementIfFocusedOnAvailable(t.element, document.activeElement) && (n.KEY_DOWN_TIMEOUT !== null && clearTimeout(n.KEY_DOWN_TIMEOUT), n.KEY_DOWN_TIMEOUT = setTimeout(function () {
13371
- n.KEY_DOWN_TIMEOUT = null, _this69.resetRecording(t);
13417
+ n.KEY_DOWN_TIMEOUT = null, _this70.resetRecording(t);
13372
13418
  }, 500));
13373
13419
  }
13374
13420
  }, {
@@ -13398,7 +13444,7 @@ function pa() {
13398
13444
  }
13399
13445
  var Rt = {},
13400
13446
  nn;
13401
- function ma() {
13447
+ function ga() {
13402
13448
  if (nn) return Rt;
13403
13449
  nn = 1, Object.defineProperty(Rt, "__esModule", {
13404
13450
  value: !0
@@ -13466,7 +13512,7 @@ function Bn() {
13466
13512
  }
13467
13513
  var Lt = {},
13468
13514
  on;
13469
- function Ki() {
13515
+ function Wi() {
13470
13516
  if (on) return Lt;
13471
13517
  on = 1, Object.defineProperty(Lt, "__esModule", {
13472
13518
  value: !0
@@ -13521,7 +13567,7 @@ function Ki() {
13521
13567
  }
13522
13568
  var It = {},
13523
13569
  an;
13524
- function Wi() {
13570
+ function $i() {
13525
13571
  if (an) return It;
13526
13572
  an = 1, Object.defineProperty(It, "__esModule", {
13527
13573
  value: !0
@@ -13615,10 +13661,10 @@ function Fn() {
13615
13661
  value: !0
13616
13662
  }), Mt.CommandUtils = void 0;
13617
13663
  var n = Bn(),
13618
- e = Ki(),
13619
- t = Rs(),
13620
- i = Wi(),
13621
- s = Vi();
13664
+ e = Wi(),
13665
+ t = Ms(),
13666
+ i = $i(),
13667
+ s = Ki();
13622
13668
  var r = /*#__PURE__*/function () {
13623
13669
  function r() {
13624
13670
  _classCallCheck(this, r);
@@ -13717,13 +13763,13 @@ function Fn() {
13717
13763
  }
13718
13764
  var Ot = {},
13719
13765
  cn;
13720
- function ga() {
13766
+ function ba() {
13721
13767
  if (cn) return Ot;
13722
13768
  cn = 1, Object.defineProperty(Ot, "__esModule", {
13723
13769
  value: !0
13724
13770
  }), Ot.Highlight = void 0;
13725
- var n = Ki(),
13726
- e = Wi();
13771
+ var n = Wi(),
13772
+ e = $i();
13727
13773
  var t = /*#__PURE__*/function () {
13728
13774
  function t() {
13729
13775
  _classCallCheck(this, t);
@@ -13776,14 +13822,14 @@ function ga() {
13776
13822
  }
13777
13823
  var Pt = {},
13778
13824
  dn;
13779
- function ba() {
13825
+ function va() {
13780
13826
  if (dn) return Pt;
13781
13827
  dn = 1, Object.defineProperty(Pt, "__esModule", {
13782
13828
  value: !0
13783
13829
  }), Pt.Padding = void 0;
13784
- var n = Ki(),
13785
- e = Wi(),
13786
- t = Vi();
13830
+ var n = Wi(),
13831
+ e = $i(),
13832
+ t = Ki();
13787
13833
  var i = /*#__PURE__*/function () {
13788
13834
  function i() {
13789
13835
  _classCallCheck(this, i);
@@ -13849,16 +13895,16 @@ function Un() {
13849
13895
  hn = 1, Object.defineProperty(Tt, "__esModule", {
13850
13896
  value: !0
13851
13897
  }), Tt.Speech = void 0;
13852
- var n = pa(),
13853
- e = ma(),
13898
+ var n = ma(),
13899
+ e = ga(),
13854
13900
  t = Fn(),
13855
13901
  i = Bn(),
13856
- s = ga(),
13857
- r = Ki(),
13858
- o = ba(),
13859
- a = Rs(),
13860
- l = Wi(),
13861
- c = Vi();
13902
+ s = ba(),
13903
+ r = Wi(),
13904
+ o = va(),
13905
+ a = Ms(),
13906
+ l = $i(),
13907
+ c = Ki();
13862
13908
  var d = /*#__PURE__*/function () {
13863
13909
  function d() {
13864
13910
  _classCallCheck(this, d);
@@ -13970,13 +14016,13 @@ function Un() {
13970
14016
  return Tt.Speech = d, Tt;
13971
14017
  }
13972
14018
  var un;
13973
- function va() {
14019
+ function ya() {
13974
14020
  if (un) return St;
13975
14021
  un = 1, Object.defineProperty(St, "__esModule", {
13976
14022
  value: !0
13977
14023
  }), St.WebSpeech = void 0;
13978
- var n = fa(),
13979
- e = Rs(),
14024
+ var n = pa(),
14025
+ e = Ms(),
13980
14026
  t = Un();
13981
14027
  var i = /*#__PURE__*/function (_t$Speech) {
13982
14028
  function i() {
@@ -14005,22 +14051,22 @@ function va() {
14005
14051
  }, {
14006
14052
  key: "setEvents",
14007
14053
  value: function setEvents() {
14008
- var _this70 = this;
14054
+ var _this71 = this;
14009
14055
  this._service && (this._service.onstart = function () {
14010
- _this70.setStateOnStart();
14056
+ _this71.setStateOnStart();
14011
14057
  }, this._service.onerror = function (r) {
14012
- e.Browser.IS_SAFARI() && r.message === "Another request is started" || r.error === "aborted" && _this70.isRestarting || r.error !== "no-speech" && _this70.error(r.message || r.error);
14058
+ e.Browser.IS_SAFARI() && r.message === "Another request is started" || r.error === "aborted" && _this71.isRestarting || r.error !== "no-speech" && _this71.error(r.message || r.error);
14013
14059
  }, this._service.onaudioend = function () {
14014
- _this70.setStateOnStop();
14060
+ _this71.setStateOnStop();
14015
14061
  }, this._service.onend = function () {
14016
- _this70._stopping = !1;
14062
+ _this71._stopping = !1;
14017
14063
  }, this._service.onresult = function (r) {
14018
- if (_typeof(r.results) > "u" && _this70._service) _this70._service.onend = null, _this70._service.stop();else if (_this70._extractText && !_this70._stopping) {
14019
- var _this70$_extractText = _this70._extractText(r, _this70.finalTranscript, _this70._translations),
14020
- o = _this70$_extractText.interimTranscript,
14021
- a = _this70$_extractText.finalTranscript,
14022
- l = _this70$_extractText.newText;
14023
- _this70.updateElements(o, a, l);
14064
+ if (_typeof(r.results) > "u" && _this71._service) _this71._service.onend = null, _this71._service.stop();else if (_this71._extractText && !_this71._stopping) {
14065
+ var _this71$_extractText = _this71._extractText(r, _this71.finalTranscript, _this71._translations),
14066
+ o = _this71$_extractText.interimTranscript,
14067
+ a = _this71$_extractText.finalTranscript,
14068
+ l = _this71$_extractText.newText;
14069
+ _this71.updateElements(o, a, l);
14024
14070
  }
14025
14071
  });
14026
14072
  }
@@ -14046,7 +14092,7 @@ function va() {
14046
14092
  }
14047
14093
  var Nt = {},
14048
14094
  fn;
14049
- function ya() {
14095
+ function Ea() {
14050
14096
  if (fn) return Nt;
14051
14097
  fn = 1, Object.defineProperty(Nt, "__esModule", {
14052
14098
  value: !0
@@ -14069,7 +14115,7 @@ function ya() {
14069
14115
  var Dt = {},
14070
14116
  Bt = {},
14071
14117
  pn;
14072
- function Ea() {
14118
+ function Sa() {
14073
14119
  if (pn) return Bt;
14074
14120
  pn = 1, Object.defineProperty(Bt, "__esModule", {
14075
14121
  value: !0
@@ -14097,18 +14143,18 @@ function Ea() {
14097
14143
  var Ft = {},
14098
14144
  Ut = {},
14099
14145
  mn;
14100
- function Sa() {
14146
+ function _a() {
14101
14147
  return mn || (mn = 1, Object.defineProperty(Ut, "__esModule", {
14102
14148
  value: !0
14103
14149
  }), Ut.README_URL = void 0, Ut.README_URL = "https://github.com/OvidijusParsiunas/speech-to-element"), Ut;
14104
14150
  }
14105
14151
  var gn;
14106
- function _a() {
14152
+ function xa() {
14107
14153
  if (gn) return Ft;
14108
14154
  gn = 1, Object.defineProperty(Ft, "__esModule", {
14109
14155
  value: !0
14110
14156
  }), Ft.AzureSpeechConfig = void 0;
14111
- var n = Sa();
14157
+ var n = _a();
14112
14158
  var e = /*#__PURE__*/function () {
14113
14159
  function e() {
14114
14160
  _classCallCheck(this, e);
@@ -14180,7 +14226,7 @@ function _a() {
14180
14226
  }
14181
14227
  var jt = {},
14182
14228
  bn;
14183
- function xa() {
14229
+ function wa() {
14184
14230
  if (bn) return jt;
14185
14231
  bn = 1, Object.defineProperty(jt, "__esModule", {
14186
14232
  value: !0
@@ -14232,7 +14278,7 @@ function Aa() {
14232
14278
  }
14233
14279
  var qt = {},
14234
14280
  yn;
14235
- function wa() {
14281
+ function Ta() {
14236
14282
  if (yn) return qt;
14237
14283
  yn = 1, Object.defineProperty(qt, "__esModule", {
14238
14284
  value: !0
@@ -14262,23 +14308,23 @@ function wa() {
14262
14308
  return qt.AzureTranscript = e, qt;
14263
14309
  }
14264
14310
  var En;
14265
- function Ta() {
14311
+ function Ca() {
14266
14312
  if (En) return Dt;
14267
14313
  En = 1, Object.defineProperty(Dt, "__esModule", {
14268
14314
  value: !0
14269
14315
  }), Dt.Azure = void 0;
14270
- var n = Ea(),
14271
- e = _a(),
14272
- t = xa(),
14316
+ var n = Sa(),
14317
+ e = xa(),
14318
+ t = wa(),
14273
14319
  i = Aa(),
14274
- s = wa(),
14320
+ s = Ta(),
14275
14321
  r = Un();
14276
14322
  var o = /*#__PURE__*/function (_r$Speech) {
14277
14323
  function o() {
14278
- var _this71;
14324
+ var _this72;
14279
14325
  _classCallCheck(this, o);
14280
- _this71 = _callSuper(this, o, arguments), _this71._newTextPadding = "";
14281
- return _this71;
14326
+ _this72 = _callSuper(this, o, arguments), _this72._newTextPadding = "";
14327
+ return _this72;
14282
14328
  }
14283
14329
  _inherits(o, _r$Speech);
14284
14330
  return _createClass(o, [{
@@ -14405,12 +14451,12 @@ function Ta() {
14405
14451
  }, {
14406
14452
  key: "retrieveTokenInterval",
14407
14453
  value: function retrieveTokenInterval(l) {
14408
- var _this72 = this;
14454
+ var _this73 = this;
14409
14455
  this._retrieveTokenInterval = setInterval(function () {
14410
14456
  l == null || l().then(function (c) {
14411
- _this72._service && (_this72._service.authorizationToken = (c == null ? void 0 : c.trim()) || "");
14457
+ _this73._service && (_this73._service.authorizationToken = (c == null ? void 0 : c.trim()) || "");
14412
14458
  })["catch"](function (c) {
14413
- _this72.error(c);
14459
+ _this73.error(c);
14414
14460
  });
14415
14461
  }, 1e4);
14416
14462
  }
@@ -14440,15 +14486,15 @@ function Ta() {
14440
14486
  return Dt.Azure = o, Dt;
14441
14487
  }
14442
14488
  var Sn;
14443
- function Ca() {
14489
+ function Ra() {
14444
14490
  if (Sn) return mi;
14445
14491
  Sn = 1, Object.defineProperty(mi, "__esModule", {
14446
14492
  value: !0
14447
14493
  });
14448
- var n = va(),
14494
+ var n = ya(),
14449
14495
  e = Fn(),
14450
- t = ya(),
14451
- i = Ta();
14496
+ t = Ea(),
14497
+ i = Ca();
14452
14498
  var s = /*#__PURE__*/function () {
14453
14499
  function s() {
14454
14500
  _classCallCheck(this, s);
@@ -14491,20 +14537,20 @@ function Ca() {
14491
14537
  }();
14492
14538
  return mi["default"] = s, mi;
14493
14539
  }
14494
- var Ra = Ca();
14495
- var gi = /* @__PURE__ */ua(Ra);
14496
- var Ma = /*#__PURE__*/function () {
14497
- function Ma(e, t) {
14498
- _classCallCheck(this, Ma);
14540
+ var Ma = Ra();
14541
+ var gi = /* @__PURE__ */fa(Ma);
14542
+ var ka = /*#__PURE__*/function () {
14543
+ function ka(e, t) {
14544
+ _classCallCheck(this, ka);
14499
14545
  this._silenceMS = 2e3, this._stop = !0, typeof t == "boolean" && t === !1 && (this._stop = !1), typeof e == "number" && (this._silenceMS = e);
14500
14546
  }
14501
- return _createClass(Ma, [{
14547
+ return _createClass(ka, [{
14502
14548
  key: "setSilenceTimeout",
14503
14549
  value: function setSilenceTimeout(e, t) {
14504
- var _this73 = this;
14550
+ var _this74 = this;
14505
14551
  this._silenceTimeout = setTimeout(function () {
14506
14552
  var i;
14507
- (i = e.submit) == null || i.call(e), gi.stop(), _this73._stop || setTimeout(t, oi.MICROPHONE_RESET_TIMEOUT_MS);
14553
+ (i = e.submit) == null || i.call(e), gi.stop(), _this74._stop || setTimeout(t, oi.MICROPHONE_RESET_TIMEOUT_MS);
14508
14554
  }, this._silenceMS);
14509
14555
  }
14510
14556
  }, {
@@ -14524,26 +14570,26 @@ var Ma = /*#__PURE__*/function () {
14524
14570
  }
14525
14571
  }]);
14526
14572
  }();
14527
- var Zt = /*#__PURE__*/function (_Gi) {
14573
+ var Zt = /*#__PURE__*/function (_Vi) {
14528
14574
  function Zt(e, t, i) {
14529
- var _this74;
14575
+ var _this75;
14530
14576
  _classCallCheck(this, Zt);
14531
14577
  var s = _typeof(e.speechToText) == "object" ? e.speechToText : {};
14532
- _this74 = _callSuper(this, Zt, [s == null ? void 0 : s.button]);
14533
- var _this74$processConfig = _this74.processConfiguration(t, e.speechToText),
14534
- r = _this74$processConfig.serviceName,
14535
- o = _this74$processConfig.processedConfig;
14536
- if (_this74._addErrorMessage = i, r === "webspeech" && !gi.isWebSpeechSupported()) _this74.changeToUnsupported();else {
14578
+ _this75 = _callSuper(this, Zt, [s == null ? void 0 : s.button]);
14579
+ var _this75$processConfig = _this75.processConfiguration(t, e.speechToText),
14580
+ r = _this75$processConfig.serviceName,
14581
+ o = _this75$processConfig.processedConfig;
14582
+ if (_this75._addErrorMessage = i, r === "webspeech" && !gi.isWebSpeechSupported()) _this75.changeToUnsupported();else {
14537
14583
  var a = !e.textInput || !e.textInput.disabled;
14538
- _this74.elementRef.onclick = _this74.buttonClick.bind(_this74, t, a, r, o);
14584
+ _this75.elementRef.onclick = _this75.buttonClick.bind(_this75, t, a, r, o);
14539
14585
  }
14540
14586
  setTimeout(function () {
14541
- _this74._validationHandler = e._validationHandler;
14587
+ _this75._validationHandler = e._validationHandler;
14542
14588
  });
14543
- return _this74;
14589
+ return _this75;
14544
14590
  }
14545
14591
  // prettier-ignore
14546
- _inherits(Zt, _Gi);
14592
+ _inherits(Zt, _Vi);
14547
14593
  return _createClass(Zt, [{
14548
14594
  key: "processConfiguration",
14549
14595
  value: function processConfiguration(e, t) {
@@ -14568,7 +14614,7 @@ var Zt = /*#__PURE__*/function (_Gi) {
14568
14614
  restart: !0,
14569
14615
  removeNewText: !0
14570
14616
  }) : null;
14571
- }), i.submitAfterSilence && (this._silenceSubmit = new Ma(i.submitAfterSilence, i.stopAfterSubmit)), {
14617
+ }), i.submitAfterSilence && (this._silenceSubmit = new ka(i.submitAfterSilence, i.stopAfterSubmit)), {
14572
14618
  serviceName: Zt.getServiceName(i),
14573
14619
  processedConfig: o
14574
14620
  };
@@ -14576,26 +14622,26 @@ var Zt = /*#__PURE__*/function (_Gi) {
14576
14622
  }, {
14577
14623
  key: "buttonClick",
14578
14624
  value: function buttonClick(e, t, i, s) {
14579
- var _this75 = this;
14625
+ var _this76 = this;
14580
14626
  var r = s == null ? void 0 : s.events;
14581
14627
  e.removePlaceholderStyle(), gi.toggle(i, _objectSpread({
14582
14628
  insertInCursorLocation: !1,
14583
14629
  element: t ? e.inputElementRef : void 0,
14584
14630
  onError: function onError() {
14585
14631
  var o;
14586
- _this75.onError(), (o = _this75._silenceSubmit) == null || o.clearSilenceTimeout();
14632
+ _this76.onError(), (o = _this76._silenceSubmit) == null || o.clearSilenceTimeout();
14587
14633
  },
14588
14634
  onStart: function onStart() {
14589
14635
  var o;
14590
- _this75.changeToActive(), (o = r == null ? void 0 : r.onStart) == null || o.call(r);
14636
+ _this76.changeToActive(), (o = r == null ? void 0 : r.onStart) == null || o.call(r);
14591
14637
  },
14592
14638
  onStop: function onStop() {
14593
14639
  var o, a, l;
14594
- (o = _this75._validationHandler) == null || o.call(_this75), (a = _this75._silenceSubmit) == null || a.clearSilenceTimeout(), _this75.changeToDefault(), (l = r == null ? void 0 : r.onStop) == null || l.call(r);
14640
+ (o = _this76._validationHandler) == null || o.call(_this76), (a = _this76._silenceSubmit) == null || a.clearSilenceTimeout(), _this76.changeToDefault(), (l = r == null ? void 0 : r.onStop) == null || l.call(r);
14595
14641
  },
14596
14642
  onPauseTrigger: function onPauseTrigger(o) {
14597
14643
  var a, l;
14598
- (a = _this75._silenceSubmit) == null || a.onPause(o, e, _this75.elementRef.onclick), (l = r == null ? void 0 : r.onPauseTrigger) == null || l.call(r, o);
14644
+ (a = _this76._silenceSubmit) == null || a.onPause(o, e, _this76.elementRef.onclick), (l = r == null ? void 0 : r.onPauseTrigger) == null || l.call(r, o);
14599
14645
  },
14600
14646
  onPreResult: function onPreResult(o, a) {
14601
14647
  var l;
@@ -14603,11 +14649,11 @@ var Zt = /*#__PURE__*/function (_Gi) {
14603
14649
  },
14604
14650
  onResult: function onResult(o, a) {
14605
14651
  var l, c, d;
14606
- a && ((l = _this75._validationHandler) == null || l.call(_this75)), (c = _this75._silenceSubmit) == null || c.resetSilenceTimeout(e, _this75.elementRef.onclick), (d = r == null ? void 0 : r.onResult) == null || d.call(r, o, a);
14652
+ a && ((l = _this76._validationHandler) == null || l.call(_this76)), (c = _this76._silenceSubmit) == null || c.resetSilenceTimeout(e, _this76.elementRef.onclick), (d = r == null ? void 0 : r.onResult) == null || d.call(r, o, a);
14607
14653
  },
14608
14654
  onCommandModeTrigger: function onCommandModeTrigger(o) {
14609
14655
  var a;
14610
- _this75.onCommandModeTrigger(o), (a = r == null ? void 0 : r.onCommandModeTrigger) == null || a.call(r, o);
14656
+ _this76.onCommandModeTrigger(o), (a = r == null ? void 0 : r.onCommandModeTrigger) == null || a.call(r, o);
14611
14657
  }
14612
14658
  }, s));
14613
14659
  }
@@ -14635,16 +14681,16 @@ var Zt = /*#__PURE__*/function (_Gi) {
14635
14681
  }, Zt.MICROPHONE_RESET_TIMEOUT_MS);
14636
14682
  }
14637
14683
  }]);
14638
- }(Gi);
14684
+ }(Vi);
14639
14685
  Zt.MICROPHONE_RESET_TIMEOUT_MS = 300;
14640
14686
  var oi = Zt;
14641
14687
  var Ne = /*#__PURE__*/function () {
14642
14688
  // prettier-ignore
14643
14689
  function Ne(e, t, i, s, r) {
14644
- var _this76 = this;
14690
+ var _this77 = this;
14645
14691
  _classCallCheck(this, Ne);
14646
14692
  this._attachments = [], this._fileCountLimit = 99, this._acceptedFormat = "", this._hiddenAttachments = /* @__PURE__ */new Set(), i.maxNumberOfFiles && (this._fileCountLimit = i.maxNumberOfFiles), this._toggleContainerDisplay = s, this._fileAttachmentsContainerRef = r, i.acceptedFormats && (this._acceptedFormat = i.acceptedFormats), setTimeout(function () {
14647
- _this76._validationHandler = e._validationHandler, _this76._onInput = t.onInput;
14693
+ _this77._validationHandler = e._validationHandler, _this77._onInput = t.onInput;
14648
14694
  });
14649
14695
  }
14650
14696
  return _createClass(Ne, [{
@@ -14718,12 +14764,12 @@ var Ne = /*#__PURE__*/function () {
14718
14764
  }, {
14719
14765
  key: "hideAttachments",
14720
14766
  value: function hideAttachments() {
14721
- var _this77 = this;
14767
+ var _this78 = this;
14722
14768
  this._hiddenAttachments.clear(), this._attachments.forEach(function (e) {
14723
14769
  setTimeout(function () {
14724
14770
  var t;
14725
14771
  return (t = e.removeButton) == null ? void 0 : t.click();
14726
- }), _this77._hiddenAttachments.add(e);
14772
+ }), _this78._hiddenAttachments.add(e);
14727
14773
  });
14728
14774
  }
14729
14775
  }, {
@@ -14739,10 +14785,10 @@ var Ne = /*#__PURE__*/function () {
14739
14785
  }, {
14740
14786
  key: "readdAttachments",
14741
14787
  value: function readdAttachments() {
14742
- var _this78 = this;
14788
+ var _this79 = this;
14743
14789
  var e;
14744
14790
  Array.from(this._hiddenAttachments).forEach(function (t) {
14745
- _this78._fileAttachmentsContainerRef.appendChild(t.attachmentContainerElement), _this78._attachments.push(t);
14791
+ _this79._fileAttachmentsContainerRef.appendChild(t.attachmentContainerElement), _this79._attachments.push(t);
14746
14792
  }), (e = this._onInput) == null || e.call(this, !1), this._hiddenAttachments.clear();
14747
14793
  }
14748
14794
  }], [{
@@ -14803,12 +14849,12 @@ var Oe = /*#__PURE__*/function (_Ne) {
14803
14849
  return _createClass(Oe, [{
14804
14850
  key: "createTimer",
14805
14851
  value: function createTimer(e, t) {
14806
- var _this79 = this;
14852
+ var _this80 = this;
14807
14853
  var i = 0;
14808
14854
  var s = t !== void 0 && t < Oe.TIMER_LIMIT_S ? t : Oe.TIMER_LIMIT_S;
14809
14855
  return setInterval(function () {
14810
14856
  var a;
14811
- i += 1, i === s && ((a = _this79.stopPlaceholderCallback) == null || a.call(_this79), _this79.clearTimer()), i === 600 && e.classList.add("audio-placeholder-text-4-digits");
14857
+ i += 1, i === s && ((a = _this80.stopPlaceholderCallback) == null || a.call(_this80), _this80.clearTimer()), i === 600 && e.classList.add("audio-placeholder-text-4-digits");
14812
14858
  var r = Math.floor(i / 60),
14813
14859
  o = (i % 60).toString().padStart(2, "0");
14814
14860
  e.textContent = "".concat(r, ":").concat(o);
@@ -14822,13 +14868,13 @@ var Oe = /*#__PURE__*/function (_Ne) {
14822
14868
  i.classList.add("audio-placeholder-text-3-digits");
14823
14869
  var s = document.createElement("div");
14824
14870
  s.classList.add("file-attachment-text-container", "audio-placeholder-text-3-digits-container"), s.appendChild(i);
14825
- var r = Ue.createSVGElement(ls);
14871
+ var r = Ue.createSVGElement(cs);
14826
14872
  return r.classList.add("attachment-icon", "stop-icon", "not-removable-attachment-icon"), i.textContent = "0:00", this._activePlaceholderTimer = this.createTimer(i, e), t.appendChild(s), this.addPlaceholderAudioAttachmentEvents(t, r, s), t;
14827
14873
  }
14828
14874
  }, {
14829
14875
  key: "addPlaceholderAudioAttachmentEvents",
14830
14876
  value: function addPlaceholderAudioAttachmentEvents(e, t, i) {
14831
- var _this80 = this;
14877
+ var _this81 = this;
14832
14878
  var s = function s() {
14833
14879
  return e.replaceChildren(t);
14834
14880
  };
@@ -14839,7 +14885,7 @@ var Oe = /*#__PURE__*/function (_Ne) {
14839
14885
  e.addEventListener("mouseleave", r);
14840
14886
  var o = function o() {
14841
14887
  var a;
14842
- return (a = _this80.stopPlaceholderCallback) == null ? void 0 : a.call(_this80);
14888
+ return (a = _this81.stopPlaceholderCallback) == null ? void 0 : a.call(_this81);
14843
14889
  };
14844
14890
  e.addEventListener("click", o);
14845
14891
  }
@@ -14880,7 +14926,7 @@ var Oe = /*#__PURE__*/function (_Ne) {
14880
14926
  s.src = t;
14881
14927
  var r = Ue.createSVGElement(Pn);
14882
14928
  r.classList.add("attachment-icon", "play-icon");
14883
- var o = Ue.createSVGElement(ls);
14929
+ var o = Ue.createSVGElement(cs);
14884
14930
  o.classList.add("attachment-icon", "stop-icon"), i.replaceChildren(r), s.onplay = function () {
14885
14931
  i.replaceChildren(o);
14886
14932
  }, s.onpause = function () {
@@ -14907,11 +14953,11 @@ var Oe = /*#__PURE__*/function (_Ne) {
14907
14953
  }(Ne);
14908
14954
  Oe.TIMER_LIMIT_S = 5999;
14909
14955
  var ai = Oe;
14910
- var ka = /*#__PURE__*/function () {
14911
- function ka() {
14912
- _classCallCheck(this, ka);
14956
+ var La = /*#__PURE__*/function () {
14957
+ function La() {
14958
+ _classCallCheck(this, La);
14913
14959
  }
14914
- return _createClass(ka, null, [{
14960
+ return _createClass(La, null, [{
14915
14961
  key: "create",
14916
14962
  value:
14917
14963
  // prettier-ignore
@@ -14931,7 +14977,7 @@ var hi = /*#__PURE__*/function () {
14931
14977
  return _createClass(hi, [{
14932
14978
  key: "addType",
14933
14979
  value: function addType(e, t, i, s) {
14934
- var r = ka.create(e, t, i, this.toggleContainerDisplay.bind(this), this.elementRef, s);
14980
+ var r = La.create(e, t, i, this.toggleContainerDisplay.bind(this), this.elementRef, s);
14935
14981
  return this._fileAttachmentsTypes.push(r), r;
14936
14982
  }
14937
14983
  }, {
@@ -14962,7 +15008,7 @@ var hi = /*#__PURE__*/function () {
14962
15008
  case 0:
14963
15009
  _context128.next = 2;
14964
15010
  return Promise.all(this._fileAttachmentsTypes.map(/*#__PURE__*/function () {
14965
- var _ref39 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee127(e) {
15011
+ var _ref43 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee127(e) {
14966
15012
  var t;
14967
15013
  return _regeneratorRuntime().wrap(function _callee127$(_context127) {
14968
15014
  while (1) switch (_context127.prev = _context127.next) {
@@ -14975,7 +15021,7 @@ var hi = /*#__PURE__*/function () {
14975
15021
  }, _callee127);
14976
15022
  }));
14977
15023
  return function (_x232) {
14978
- return _ref39.apply(this, arguments);
15024
+ return _ref43.apply(this, arguments);
14979
15025
  };
14980
15026
  }()));
14981
15027
  case 2:
@@ -15045,20 +15091,20 @@ var be = /*#__PURE__*/function () {
15045
15091
  }, {
15046
15092
  key: "addButtons",
15047
15093
  value: function addButtons() {
15048
- var _this81 = this;
15094
+ var _this82 = this;
15049
15095
  for (var _len2 = arguments.length, e = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
15050
15096
  e[_key2] = arguments[_key2];
15051
15097
  }
15052
15098
  e.forEach(function (t) {
15053
- N.addAttributes(t), _this81._buttonPanel.appendChild(t);
15099
+ N.addAttributes(t), _this82._buttonPanel.appendChild(t);
15054
15100
  });
15055
15101
  }
15056
15102
  }, {
15057
15103
  key: "close",
15058
15104
  value: function close() {
15059
- var _this82 = this;
15105
+ var _this83 = this;
15060
15106
  this._elementRef.classList.remove("show-modal"), this._elementRef.classList.add("hide-modal"), this._backgroundPanelRef.classList.remove("show-modal-background"), this._backgroundPanelRef.classList.add("hide-modal-background"), this._isOpen = !1, setTimeout(function () {
15061
- _this82._elementRef.style.display = "none", _this82._backgroundPanelRef.style.display = "none";
15107
+ _this83._elementRef.style.display = "none", _this83._backgroundPanelRef.style.display = "none";
15062
15108
  }, be.MODAL_CLOSE_TIMEOUT_MS);
15063
15109
  }
15064
15110
  }, {
@@ -15074,10 +15120,10 @@ var be = /*#__PURE__*/function () {
15074
15120
  }, {
15075
15121
  key: "addCloseButton",
15076
15122
  value: function addCloseButton(e, t, i) {
15077
- var _this83 = this;
15123
+ var _this84 = this;
15078
15124
  var s = t ? be.createSVGButton(e) : be.createTextButton(e);
15079
15125
  return this.addButtons(s), s.onclick = function () {
15080
- _this83.close(), setTimeout(function () {
15126
+ _this84.close(), setTimeout(function () {
15081
15127
  i == null || i();
15082
15128
  }, 140);
15083
15129
  }, s;
@@ -15148,15 +15194,15 @@ var tt = be;
15148
15194
  var Di = /*#__PURE__*/function (_ct5) {
15149
15195
  // prettier-ignore
15150
15196
  function Di(e, t, i, s, r, o) {
15151
- var _this84;
15197
+ var _this85;
15152
15198
  _classCallCheck(this, Di);
15153
15199
  var d, u, h, f, m, p, g, b, M;
15154
15200
  var a = (d = i == null ? void 0 : i.button) == null ? void 0 : d.position,
15155
15201
  l = ((f = (h = (u = i == null ? void 0 : i.button) == null ? void 0 : u.styles) == null ? void 0 : h.text) == null ? void 0 : f.content) || o;
15156
- _this84 = _callSuper(this, Di, [Di.createButtonElement(), r, a, i.button, l]);
15157
- var c = _this84.createInnerElementsForStates(s, _this84.customStyles);
15158
- _this84._inputElement = Di.createInputElement((m = i == null ? void 0 : i.files) == null ? void 0 : m.acceptedFormats), _this84.addClickEvent(e, i), _this84.changeElementsByState(c.styles), _this84.reapplyStateStyle("styles"), _this84._fileAttachmentsType = t, _this84._openModalOnce = ((g = (p = i.files) == null ? void 0 : p.infoModal) == null ? void 0 : g.openModalOnce) === !1 || (M = (b = i.files) == null ? void 0 : b.infoModal) == null ? void 0 : M.openModalOnce;
15159
- return _this84;
15202
+ _this85 = _callSuper(this, Di, [Di.createButtonElement(), r, a, void 0, i.button, l]);
15203
+ var c = _this85.createInnerElementsForStates(s, _this85.customStyles);
15204
+ _this85._inputElement = Di.createInputElement((m = i == null ? void 0 : i.files) == null ? void 0 : m.acceptedFormats), _this85.addClickEvent(e, i), _this85.changeElementsByState(c.styles), _this85.reapplyStateStyle("styles"), _this85._fileAttachmentsType = t, _this85._openModalOnce = ((g = (p = i.files) == null ? void 0 : p.infoModal) == null ? void 0 : g.openModalOnce) === !1 || (M = (b = i.files) == null ? void 0 : b.infoModal) == null ? void 0 : M.openModalOnce;
15205
+ return _this85;
15160
15206
  }
15161
15207
  _inherits(Di, _ct5);
15162
15208
  return _createClass(Di, [{
@@ -15331,7 +15377,7 @@ var $e = /*#__PURE__*/function () {
15331
15377
  value: function attach(e, t, i, s, r) {
15332
15378
  var o = e.validateInput || te.processValidateInput(e);
15333
15379
  e._validationHandler = /*#__PURE__*/function () {
15334
- var _ref40 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee131(a) {
15380
+ var _ref44 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee131(a) {
15335
15381
  var l;
15336
15382
  return _regeneratorRuntime().wrap(function _callee131$(_context131) {
15337
15383
  while (1) switch (_context131.prev = _context131.next) {
@@ -15351,7 +15397,7 @@ var $e = /*#__PURE__*/function () {
15351
15397
  }, _callee131);
15352
15398
  }));
15353
15399
  return function (_x240) {
15354
- return _ref40.apply(this, arguments);
15400
+ return _ref44.apply(this, arguments);
15355
15401
  };
15356
15402
  }();
15357
15403
  }
@@ -15372,16 +15418,16 @@ var jn = /*#__PURE__*/function () {
15372
15418
  }
15373
15419
  }]);
15374
15420
  }();
15375
- var La = /*#__PURE__*/function (_Gi2) {
15376
- function La(e, t) {
15377
- var _this85;
15378
- _classCallCheck(this, La);
15421
+ var Ia = /*#__PURE__*/function (_Vi2) {
15422
+ function Ia(e, t) {
15423
+ var _this86;
15424
+ _classCallCheck(this, Ia);
15379
15425
  var i, s;
15380
- _this85 = _callSuper(this, La, [t.button]), _this85._waitingForBrowserApproval = !1, _this85._audioType = e, _this85._extension = ((i = t.files) == null ? void 0 : i.format) || "mp3", _this85._maxDurationSeconds = (s = t.files) == null ? void 0 : s.maxDurationSeconds, _this85.elementRef.onclick = _this85.buttonClick.bind(_assertThisInitialized(_this85));
15381
- return _this85;
15426
+ _this86 = _callSuper(this, Ia, [t.button]), _this86._waitingForBrowserApproval = !1, _this86._audioType = e, _this86._extension = ((i = t.files) == null ? void 0 : i.format) || "mp3", _this86._maxDurationSeconds = (s = t.files) == null ? void 0 : s.maxDurationSeconds, _this86.elementRef.onclick = _this86.buttonClick.bind(_assertThisInitialized(_this86));
15427
+ return _this86;
15382
15428
  }
15383
- _inherits(La, _Gi2);
15384
- return _createClass(La, [{
15429
+ _inherits(Ia, _Vi2);
15430
+ return _createClass(Ia, [{
15385
15431
  key: "buttonClick",
15386
15432
  value: function buttonClick() {
15387
15433
  this._waitingForBrowserApproval || (this.isActive ? this.stop() : (this._waitingForBrowserApproval = !0, this.record()));
@@ -15389,10 +15435,10 @@ var La = /*#__PURE__*/function (_Gi2) {
15389
15435
  }, {
15390
15436
  key: "stop",
15391
15437
  value: function stop() {
15392
- var _this86 = this;
15438
+ var _this87 = this;
15393
15439
  return new Promise(function (e) {
15394
15440
  var t, i;
15395
- _this86.changeToDefault(), (t = _this86._mediaRecorder) == null || t.stop(), (i = _this86._mediaStream) == null || i.getTracks().forEach(function (s) {
15441
+ _this87.changeToDefault(), (t = _this87._mediaRecorder) == null || t.stop(), (i = _this87._mediaStream) == null || i.getTracks().forEach(function (s) {
15396
15442
  return s.stop();
15397
15443
  }), setTimeout(function () {
15398
15444
  e();
@@ -15402,23 +15448,23 @@ var La = /*#__PURE__*/function (_Gi2) {
15402
15448
  }, {
15403
15449
  key: "record",
15404
15450
  value: function record() {
15405
- var _this87 = this;
15451
+ var _this88 = this;
15406
15452
  navigator.mediaDevices.getUserMedia({
15407
15453
  audio: !0
15408
15454
  }).then(function (e) {
15409
- _this87.changeToActive(), _this87._mediaRecorder = new MediaRecorder(e), _this87._audioType.addPlaceholderAttachment(_this87.stop.bind(_this87), _this87._maxDurationSeconds), _this87._mediaStream = e, _this87._mediaRecorder.addEventListener("dataavailable", function (t) {
15410
- _this87.createFile(t);
15411
- }), _this87._mediaRecorder.start();
15455
+ _this88.changeToActive(), _this88._mediaRecorder = new MediaRecorder(e), _this88._audioType.addPlaceholderAttachment(_this88.stop.bind(_this88), _this88._maxDurationSeconds), _this88._mediaStream = e, _this88._mediaRecorder.addEventListener("dataavailable", function (t) {
15456
+ _this88.createFile(t);
15457
+ }), _this88._mediaRecorder.start();
15412
15458
  })["catch"](function (e) {
15413
- console.error(e), _this87.stop();
15459
+ console.error(e), _this88.stop();
15414
15460
  })["finally"](function () {
15415
- _this87._waitingForBrowserApproval = !1;
15461
+ _this88._waitingForBrowserApproval = !1;
15416
15462
  });
15417
15463
  }
15418
15464
  }, {
15419
15465
  key: "createFile",
15420
15466
  value: function createFile(e) {
15421
- var _this88 = this;
15467
+ var _this89 = this;
15422
15468
  var t = new Blob([e.data], {
15423
15469
  type: "audio/".concat(this._extension)
15424
15470
  }),
@@ -15428,12 +15474,12 @@ var La = /*#__PURE__*/function (_Gi2) {
15428
15474
  }),
15429
15475
  r = new FileReader();
15430
15476
  r.readAsDataURL(s), r.onload = function (o) {
15431
- _this88._audioType.completePlaceholderAttachment(s, o.target.result);
15477
+ _this89._audioType.completePlaceholderAttachment(s, o.target.result);
15432
15478
  };
15433
15479
  }
15434
15480
  }]);
15435
- }(Gi);
15436
- var Ia = "<?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";
15481
+ }(Vi);
15482
+ var Oa = "<?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";
15437
15483
  var it = /*#__PURE__*/function () {
15438
15484
  function it() {
15439
15485
  _classCallCheck(this, it);
@@ -15467,20 +15513,20 @@ var it = /*#__PURE__*/function () {
15467
15513
  var P = /*#__PURE__*/function (_ct6) {
15468
15514
  // prettier-ignore
15469
15515
  function P(e, t, i, s, r, o) {
15470
- var _this89;
15516
+ var _this90;
15471
15517
  _classCallCheck(this, P);
15472
15518
  var a = it.process(e.submitButtonStyles),
15473
- l = Ia;
15474
- _this89 = _callSuper(this, P, [P.createButtonContainerElement(), l, a == null ? void 0 : a.position, a]), _this89._isSVGLoadingIconOverriden = !1, _this89.status = {
15519
+ l = Oa;
15520
+ _this90 = _callSuper(this, P, [P.createButtonContainerElement(), l, a == null ? void 0 : a.position, void 0, a]), _this90._isSVGLoadingIconOverriden = !1, _this90.status = {
15475
15521
  requestInProgress: !1,
15476
15522
  loadingActive: !1
15477
- }, _this89._messages = i, _this89._textInput = t, _this89._fileAttachments = r, _this89._innerElements = _this89.createInnerElementsForStates(), _this89._abortStream = new AbortController(), _this89._stopClicked = {
15523
+ }, _this90._messages = i, _this90._textInput = t, _this90._fileAttachments = r, _this90._innerElements = _this90.createInnerElementsForStates(), _this90._abortStream = new AbortController(), _this90._stopClicked = {
15478
15524
  listener: function listener() {}
15479
- }, _this89._serviceIO = s, _this89._alwaysEnabled = !!(a != null && a.alwaysEnabled), e.disableSubmitButton = _this89.disableSubmitButton.bind(_assertThisInitialized(_this89), s), _this89.attemptOverwriteLoadingStyle(e), o.microphone && _this89.setUpSpeechToText(o.microphone.button, e.speechToText), setTimeout(function () {
15525
+ }, _this90._serviceIO = s, _this90._alwaysEnabled = !!(a != null && a.alwaysEnabled), e.disableSubmitButton = _this90.disableSubmitButton.bind(_assertThisInitialized(_this90), s), _this90.attemptOverwriteLoadingStyle(e), o.microphone && _this90.setUpSpeechToText(o.microphone.button, e.speechToText), setTimeout(function () {
15480
15526
  var c;
15481
- _this89._validationHandler = e._validationHandler, _this89.assignHandlers(_this89._validationHandler), (c = _this89._validationHandler) == null || c.call(_assertThisInitialized(_this89));
15527
+ _this90._validationHandler = e._validationHandler, _this90.assignHandlers(_this90._validationHandler), (c = _this90._validationHandler) == null || c.call(_assertThisInitialized(_this90));
15482
15528
  });
15483
- return _this89;
15529
+ return _this90;
15484
15530
  }
15485
15531
  _inherits(P, _ct6);
15486
15532
  return _createClass(P, [{
@@ -15500,7 +15546,7 @@ var P = /*#__PURE__*/function (_ct6) {
15500
15546
  }, {
15501
15547
  key: "createCustomElements",
15502
15548
  value: function createCustomElements() {
15503
- var _this90 = this;
15549
+ var _this91 = this;
15504
15550
  var e = Te.createCustomElements("submit", this.svg, this.customStyles),
15505
15551
  t = {
15506
15552
  loading: void 0,
@@ -15508,7 +15554,7 @@ var P = /*#__PURE__*/function (_ct6) {
15508
15554
  };
15509
15555
  return Object.keys(t).forEach(function (i) {
15510
15556
  var s = i,
15511
- r = Te.createCustomElements(s, _this90.svg, _this90.customStyles);
15557
+ r = Te.createCustomElements(s, _this91.svg, _this91.customStyles);
15512
15558
  r && (t[s] = r);
15513
15559
  }), t.submit = e || this.buildDefaultIconElement("submit-icon"), t;
15514
15560
  }
@@ -15588,7 +15634,7 @@ var P = /*#__PURE__*/function (_ct6) {
15588
15634
  key: "programmaticSubmit",
15589
15635
  value: function () {
15590
15636
  var _programmaticSubmit = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee133(e) {
15591
- var _this91 = this;
15637
+ var _this92 = this;
15592
15638
  var t;
15593
15639
  return _regeneratorRuntime().wrap(function _callee133$(_context133) {
15594
15640
  while (1) switch (_context133.prev = _context133.next) {
@@ -15603,7 +15649,7 @@ var P = /*#__PURE__*/function (_ct6) {
15603
15649
  type: Ne.getTypeFromBlob(i)
15604
15650
  };
15605
15651
  })), e.custom && (t.custom = e.custom), setTimeout(function () {
15606
- return _this91.attemptSubmit(t, !0);
15652
+ return _this92.attemptSubmit(t, !0);
15607
15653
  });
15608
15654
  case 3:
15609
15655
  case "end":
@@ -15681,12 +15727,12 @@ var P = /*#__PURE__*/function (_ct6) {
15681
15727
  }, {
15682
15728
  key: "addNewMessage",
15683
15729
  value: function () {
15684
- var _addNewMessage = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee135(_ref41) {
15730
+ var _addNewMessage = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee135(_ref45) {
15685
15731
  var e, t, i, s;
15686
15732
  return _regeneratorRuntime().wrap(function _callee135$(_context135) {
15687
15733
  while (1) switch (_context135.prev = _context135.next) {
15688
15734
  case 0:
15689
- e = _ref41.text, t = _ref41.files, i = _ref41.custom;
15735
+ e = _ref45.text, t = _ref45.files, i = _ref45.custom;
15690
15736
  s = {
15691
15737
  role: y.USER_ROLE,
15692
15738
  custom: i
@@ -15735,10 +15781,10 @@ var P = /*#__PURE__*/function (_ct6) {
15735
15781
  }, {
15736
15782
  key: "changeToSubmitIcon",
15737
15783
  value: function changeToSubmitIcon() {
15738
- var _this92 = this;
15784
+ var _this93 = this;
15739
15785
  this.elementRef.classList.contains(P.SUBMIT_CLASS) || (this.elementRef.classList.remove(P.LOADING_CLASS, P.DISABLED_CLASS), N.removeAriaAttributes(this.elementRef), this.elementRef.classList.add(P.SUBMIT_CLASS), this.changeElementsByState(this._innerElements.submit), it.resetSubmit(this, this.status.loadingActive), this.elementRef.onclick = function () {
15740
15786
  var e;
15741
- _this92.submitFromInput(), (e = _this92._microphoneButton) != null && e.isActive && oi.toggleSpeechAfterSubmit(_this92._microphoneButton.elementRef, !!_this92._stopSTTAfterSubmit);
15787
+ _this93.submitFromInput(), (e = _this93._microphoneButton) != null && e.isActive && oi.toggleSpeechAfterSubmit(_this93._microphoneButton.elementRef, !!_this93._stopSTTAfterSubmit);
15742
15788
  });
15743
15789
  }
15744
15790
  // called every time when user triggers an input via ValidationHandler - hence use class to check if not already present
@@ -15775,32 +15821,32 @@ var P = /*#__PURE__*/function (_ct6) {
15775
15821
  }]);
15776
15822
  }(ct);
15777
15823
  P.SUBMIT_CLASS = "submit-button", P.LOADING_CLASS = "loading-button", P.DISABLED_CLASS = "disabled-button";
15778
- var vs = P;
15779
- var Oa = "<?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",
15780
- Pa = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M0 16q0 3.264 1.28 6.208t3.392 5.12 5.12 3.424 6.208 1.248 6.208-1.248 5.12-3.424 3.392-5.12 1.28-6.208-1.28-6.208-3.392-5.12-5.088-3.392-6.24-1.28q-3.264 0-6.208 1.28t-5.12 3.392-3.392 5.12-1.28 6.208zM4 16q0-3.264 1.6-6.016t4.384-4.352 6.016-1.632 6.016 1.632 4.384 4.352 1.6 6.016-1.6 6.048-4.384 4.352-6.016 1.6-6.016-1.6-4.384-4.352-1.6-6.048z\"></path>\n</svg>\n",
15781
- Na = "<?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>",
15782
- Da = "<?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>";
15783
- var Ms = /*#__PURE__*/function (_tt) {
15824
+ var ys = P;
15825
+ var Pa = "<?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",
15826
+ Na = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"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",
15827
+ Da = "<?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>",
15828
+ Ba = "<?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>";
15829
+ var ks = /*#__PURE__*/function (_tt) {
15784
15830
  // prettier-ignore
15785
- function Ms(e, t, i, s) {
15786
- var _this93;
15787
- _classCallCheck(this, Ms);
15788
- _this93 = _callSuper(this, Ms, [e, ["modal-content", "modal-camera-content"], i]), _this93._stopped = !1, _this93._format = "image/png", _this93._canvas = document.createElement("canvas"), _this93._canvas.classList.add("camera-modal-canvas");
15789
- var _this93$addButtonsAnd = _this93.addButtonsAndTheirEvents(t),
15790
- r = _this93$addButtonsAnd.captureButton,
15791
- o = _this93$addButtonsAnd.submitButton;
15792
- _this93._captureButton = r, _this93._submitButton = o, _this93._captureIcon = _this93._captureButton.children[0], _this93._refreshIcon = Ue.createSVGElement(Oa), _this93._refreshIcon.classList.add("modal-svg-button-icon", "modal-svg-refresh-icon"), (s == null ? void 0 : s.format) === "jpeg" && (_this93._format = "image/jpeg"), s != null && s.dimensions && (_this93._dimensions = s.dimensions), _this93._contentRef.appendChild(_this93._canvas), _this93.extensionCloseCallback = _this93.stop;
15793
- return _this93;
15794
- }
15795
- _inherits(Ms, _tt);
15796
- return _createClass(Ms, [{
15831
+ function ks(e, t, i, s) {
15832
+ var _this94;
15833
+ _classCallCheck(this, ks);
15834
+ _this94 = _callSuper(this, ks, [e, ["modal-content", "modal-camera-content"], i]), _this94._stopped = !1, _this94._format = "image/png", _this94._canvas = document.createElement("canvas"), _this94._canvas.classList.add("camera-modal-canvas");
15835
+ var _this94$addButtonsAnd = _this94.addButtonsAndTheirEvents(t),
15836
+ r = _this94$addButtonsAnd.captureButton,
15837
+ o = _this94$addButtonsAnd.submitButton;
15838
+ _this94._captureButton = r, _this94._submitButton = o, _this94._captureIcon = _this94._captureButton.children[0], _this94._refreshIcon = Ue.createSVGElement(Pa), _this94._refreshIcon.classList.add("modal-svg-button-icon", "modal-svg-refresh-icon"), (s == null ? void 0 : s.format) === "jpeg" && (_this94._format = "image/jpeg"), s != null && s.dimensions && (_this94._dimensions = s.dimensions), _this94._contentRef.appendChild(_this94._canvas), _this94.extensionCloseCallback = _this94.stop;
15839
+ return _this94;
15840
+ }
15841
+ _inherits(ks, _tt);
15842
+ return _createClass(ks, [{
15797
15843
  key: "addButtonsAndTheirEvents",
15798
15844
  value: function addButtonsAndTheirEvents(e) {
15799
- var t = tt.createSVGButton(Pa);
15845
+ var t = tt.createSVGButton(Na);
15800
15846
  t.classList.add("modal-svg-camera-button"), t.children[0].classList.add("modal-svg-camera-icon");
15801
- var i = this.addCloseButton(Na, !0);
15847
+ var i = this.addCloseButton(Da, !0);
15802
15848
  i.classList.add("modal-svg-close-button"), i.children[0].classList.add("modal-svg-close-icon");
15803
- var s = tt.createSVGButton(Da);
15849
+ var s = tt.createSVGButton(Ba);
15804
15850
  return s.classList.add("modal-svg-submit-button"), this.addButtons(t, s), this.addButtonEvents(t, i, s, e), {
15805
15851
  captureButton: t,
15806
15852
  submitButton: s
@@ -15810,38 +15856,38 @@ var Ms = /*#__PURE__*/function (_tt) {
15810
15856
  }, {
15811
15857
  key: "addButtonEvents",
15812
15858
  value: function addButtonEvents(e, t, i, s) {
15813
- var _this94 = this;
15859
+ var _this95 = this;
15814
15860
  e.onclick = function () {
15815
- _this94.capture();
15861
+ _this95.capture();
15816
15862
  }, t.addEventListener("click", this.stop.bind(this)), i.onclick = function () {
15817
- var r = _this94.getFile();
15818
- r && hi.addFilesToType([r], [s]), _this94.stop(), _this94.close();
15863
+ var r = _this95.getFile();
15864
+ r && hi.addFilesToType([r], [s]), _this95.stop(), _this95.close();
15819
15865
  };
15820
15866
  }
15821
15867
  }, {
15822
15868
  key: "stop",
15823
15869
  value: function stop() {
15824
- var _this95 = this;
15870
+ var _this96 = this;
15825
15871
  this._mediaStream && this._mediaStream.getTracks().forEach(function (e) {
15826
15872
  return e.stop();
15827
15873
  }), this._stopped = !0, setTimeout(function () {
15828
- _this95._captureButton.replaceChildren(_this95._captureIcon), _this95._captureButton.classList.replace("modal-svg-refresh-button", "modal-svg-camera-button");
15829
- var e = _this95._canvas.getContext("2d");
15830
- e == null || e.clearRect(0, 0, _this95._canvas.width, _this95._canvas.height);
15874
+ _this96._captureButton.replaceChildren(_this96._captureIcon), _this96._captureButton.classList.replace("modal-svg-refresh-button", "modal-svg-camera-button");
15875
+ var e = _this96._canvas.getContext("2d");
15876
+ e == null || e.clearRect(0, 0, _this96._canvas.width, _this96._canvas.height);
15831
15877
  }, tt.MODAL_CLOSE_TIMEOUT_MS);
15832
15878
  }
15833
15879
  }, {
15834
15880
  key: "start",
15835
15881
  value: function start() {
15836
- var _this96 = this;
15882
+ var _this97 = this;
15837
15883
  this._dataURL = void 0, this._submitButton.classList.add("modal-svg-submit-disabled"), this._stopped = !1, navigator.mediaDevices.getUserMedia({
15838
15884
  video: this._dimensions || !0
15839
15885
  }).then(function (e) {
15840
- if (_this96._mediaStream = e, !_this96.isOpen()) return _this96.stop();
15886
+ if (_this97._mediaStream = e, !_this97.isOpen()) return _this97.stop();
15841
15887
  var t = document.createElement("video");
15842
- t.srcObject = e, t.play(), requestAnimationFrame(_this96.updateCanvas.bind(_this96, t, _this96._canvas));
15888
+ t.srcObject = e, t.play(), requestAnimationFrame(_this97.updateCanvas.bind(_this97, t, _this97._canvas));
15843
15889
  })["catch"](function (e) {
15844
- console.error(e), _this96.stop(), _this96.close();
15890
+ console.error(e), _this97.stop(), _this97.close();
15845
15891
  });
15846
15892
  }
15847
15893
  }, {
@@ -15888,26 +15934,28 @@ var Ms = /*#__PURE__*/function (_tt) {
15888
15934
  }], [{
15889
15935
  key: "createCameraModalFunc",
15890
15936
  value: function createCameraModalFunc(e, t, i, s) {
15891
- var r = new Ms(e, t, i, s);
15937
+ var r = new ks(e, t, i, s);
15892
15938
  return r.openCameraModal.bind(r, r);
15893
15939
  }
15894
15940
  }]);
15895
15941
  }(tt);
15896
- var Ba = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M29 7h-4.599l-2.401-4h-12l-2.4 4h-4.6c-1 0-3 1-3 2.969v16.031c0 1.657 1.5 3 2.792 3h26.271c1.313 0 2.938-1.406 2.938-2.968v-16.032c0-1-1-3-3-3zM30 26.032c0 0.395-0.639 0.947-0.937 0.969h-26.265c-0.232-0.019-0.797-0.47-0.797-1v-16.031c0-0.634 0.851-0.953 1-0.969h5.732l2.4-4h9.802l1.785 3.030 0.55 0.97h5.731c0.705 0 0.99 0.921 1 1v16.032zM16 10c-3.866 0-7 3.134-7 7s3.134 7 7 7 7-3.134 7-7-3.134-7-7-7zM16 22c-2.757 0-5-2.243-5-5s2.243-5 5-5 5 2.243 5 5-2.243 5-5 5z\"></path>\n</svg>";
15897
- var ks = /*#__PURE__*/function (_ct7) {
15898
- function ks(e, t, i) {
15899
- var _this97;
15900
- _classCallCheck(this, ks);
15901
- var a, l, c, d;
15902
- var s = (a = i == null ? void 0 : i.button) == null ? void 0 : a.position,
15903
- r = ((d = (c = (l = i == null ? void 0 : i.button) == null ? void 0 : l.styles) == null ? void 0 : c.text) == null ? void 0 : d.content) || "Photo";
15904
- _this97 = _callSuper(this, ks, [ks.createButtonElement(), Ba, s, (i == null ? void 0 : i.button) || {}, r]);
15905
- var o = _this97.createInnerElementsForStates(_this97.customStyles);
15906
- i && _this97.addClickEvent(e, t, i.modalContainerStyle, i.files), _this97.changeElementsByState(o.styles), _this97.reapplyStateStyle("styles");
15907
- return _this97;
15908
- }
15909
- _inherits(ks, _ct7);
15910
- return _createClass(ks, [{
15942
+ var Fa = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M29 7h-4.599l-2.401-4h-12l-2.4 4h-4.6c-1 0-3 1-3 2.969v16.031c0 1.657 1.5 3 2.792 3h26.271c1.313 0 2.938-1.406 2.938-2.968v-16.032c0-1-1-3-3-3zM30 26.032c0 0.395-0.639 0.947-0.937 0.969h-26.265c-0.232-0.019-0.797-0.47-0.797-1v-16.031c0-0.634 0.851-0.953 1-0.969h5.732l2.4-4h9.802l1.785 3.030 0.55 0.97h5.731c0.705 0 0.99 0.921 1 1v16.032zM16 10c-3.866 0-7 3.134-7 7s3.134 7 7 7 7-3.134 7-7-3.134-7-7-7zM16 22c-2.757 0-5-2.243-5-5s2.243-5 5-5 5 2.243 5 5-2.243 5-5 5z\"></path>\n</svg>";
15943
+ var Bi = /*#__PURE__*/function (_ct7) {
15944
+ function Bi(e, t, i) {
15945
+ var _this98;
15946
+ _classCallCheck(this, Bi);
15947
+ var c, d, u, h, f, m;
15948
+ var s = (c = i == null ? void 0 : i.button) == null ? void 0 : c.position,
15949
+ r = ((h = (u = (d = i == null ? void 0 : i.button) == null ? void 0 : d.styles) == null ? void 0 : u.text) == null ? void 0 : h.content) || "Photo",
15950
+ o = Bi.createTooltip((f = i == null ? void 0 : i.button) == null ? void 0 : f.tooltip),
15951
+ a = ((m = i == null ? void 0 : i.button) == null ? void 0 : m.styles) || {};
15952
+ _this98 = _callSuper(this, Bi, [Bi.createButtonElement(), Fa, s, o, a, r]);
15953
+ var l = _this98.createInnerElementsForStates(_this98.customStyles);
15954
+ i && _this98.addClickEvent(e, t, i.modalContainerStyle, i.files), _this98.changeElementsByState(l.styles), _this98.reapplyStateStyle("styles");
15955
+ return _this98;
15956
+ }
15957
+ _inherits(Bi, _ct7);
15958
+ return _createClass(Bi, [{
15911
15959
  key: "createInnerElementsForStates",
15912
15960
  value: function createInnerElementsForStates(e) {
15913
15961
  return {
@@ -15919,10 +15967,22 @@ var ks = /*#__PURE__*/function (_ct7) {
15919
15967
  value:
15920
15968
  // prettier-ignore
15921
15969
  function addClickEvent(e, t, i, s) {
15922
- var r = Ms.createCameraModalFunc(e, t, i, s);
15970
+ var r = ks.createCameraModalFunc(e, t, i, s);
15923
15971
  this.elementRef.onclick = r;
15924
15972
  }
15925
15973
  }], [{
15974
+ key: "createTooltip",
15975
+ value: function createTooltip(e) {
15976
+ if (e) return typeof e == "boolean" ? {
15977
+ text: "Camera",
15978
+ position: "bottom"
15979
+ } : {
15980
+ text: e.text || "Camera",
15981
+ position: e.position || "bottom",
15982
+ timeout: e.timeout || 0
15983
+ };
15984
+ }
15985
+ }, {
15926
15986
  key: "createButtonElement",
15927
15987
  value: function createButtonElement() {
15928
15988
  var e = document.createElement("div");
@@ -15940,7 +16000,7 @@ var ht = /*#__PURE__*/function () {
15940
16000
  e.speechToText && !r.microphone && (r.microphone = {
15941
16001
  button: new oi(e, a, t.addNewErrorMessage.bind(t))
15942
16002
  });
15943
- var l = new vs(e, a, t, i, o, r);
16003
+ var l = new ys(e, a, t, i, o, r);
15944
16004
  a.submit = l.submitFromInput.bind(l), $e.attach(e, i, a, o, l), e.submitUserMessage = l.programmaticSubmit.bind(l), r.submit = {
15945
16005
  button: l
15946
16006
  }, e.customButtons && st.add(e, r), ht.addElements(this.elementRef, a, r, s, o, e.dropupStyles), ht.assignOnInput(e, i, o, a);
@@ -15955,13 +16015,13 @@ var ht = /*#__PURE__*/function () {
15955
16015
  if (ht.createUploadButtons(e, t, t.fileTypes || {}, r, i, s), (o = t.camera) != null && o.files) {
15956
16016
  var d = ((a = s.images) == null ? void 0 : a.fileType) || r.addType(e, t, t.camera.files, "images");
15957
16017
  s.camera = {
15958
- button: new ks(i, d, t.camera)
16018
+ button: new Bi(i, d, t.camera)
15959
16019
  };
15960
16020
  }
15961
16021
  if ((l = t.recordAudio) != null && l.files) {
15962
16022
  var _d = ((c = s.audio) == null ? void 0 : c.fileType) || r.addType(e, t, t.recordAudio.files, "audio");
15963
16023
  s.microphone = {
15964
- button: new La(_d, t.recordAudio)
16024
+ button: new Ia(_d, t.recordAudio)
15965
16025
  };
15966
16026
  }
15967
16027
  return Pe.isEnabled(r, e.dragAndDrop) && Pe.create(i, r, e.dragAndDrop), r;
@@ -15981,10 +16041,10 @@ var ht = /*#__PURE__*/function () {
15981
16041
  c = i[l];
15982
16042
  if (c.files) {
15983
16043
  var d = s.addType(e, t, c.files, l),
15984
- _ha$l = ha[l],
15985
- u = _ha$l.id,
15986
- h = _ha$l.svgString,
15987
- f = _ha$l.dropupText,
16044
+ _ua$l = ua[l],
16045
+ u = _ua$l.id,
16046
+ h = _ua$l.svgString,
16047
+ f = _ua$l.dropupText,
15988
16048
  m = new Di(r, d, c, u, h, f);
15989
16049
  o[l] = {
15990
16050
  button: m,
@@ -16000,7 +16060,7 @@ var ht = /*#__PURE__*/function () {
16000
16060
  V.addElements(e, t.elementRef);
16001
16061
  var a = Et.create(),
16002
16062
  l = $.addButtons(a, i, s, o);
16003
- bs.set(t.inputElementRef, a, r.elementRef, l), Et.add(e, a);
16063
+ vs.set(t.inputElementRef, a, r.elementRef, l), Et.add(e, a);
16004
16064
  }
16005
16065
  }, {
16006
16066
  key: "assignOnInput",
@@ -16041,32 +16101,32 @@ var Ls = /*#__PURE__*/function () {
16041
16101
  }
16042
16102
  }]);
16043
16103
  }();
16044
- var Fa = "#validate-property-key-view{height:100%;position:relative;display:flex;justify-content:center;align-items:center;padding:8px}#loading-validate-key-property{display:inline-block;width:50px;height:50px}#loading-validate-key-property:after{content:\" \";display:block;width:38px;height:38px;margin:1px;border-radius:50%;border:5px solid #5fb2ff;border-color:#5fb2ff transparent #5fb2ff transparent;animation:loading-spinner 1.4s linear infinite}#deep-chat-openai-realtime-container{height:100%;width:100%}#deep-chat-openai-realtime-avatar-container{height:60%;width:100%;display:flex;justify-content:center;align-items:center}#deep-chat-openai-realtime-avatar{border-radius:50%;height:110px;border:1px solid rgb(215,215,215);padding:8px;-webkit-user-select:none;user-select:none;margin-top:20px}#deep-chat-openai-realtime-buttons-container{height:40%;display:flex;position:relative}.deep-chat-openai-realtime-button-container{height:100%;width:50%;display:flex;justify-content:center;align-items:center}.deep-chat-openai-realtime-button{width:70px;height:70px;border-radius:50%;display:flex;justify-content:center;align-items:center;cursor:pointer}.deep-chat-openai-realtime-button-default{background-color:#e3e3e3}.deep-chat-openai-realtime-button-default:hover{background-color:#d4d4d4}.deep-chat-openai-realtime-button-default:active{background-color:#c5c5c5}.deep-chat-openai-realtime-button-loading{opacity:.7;pointer-events:none}.deep-chat-openai-realtime-microphone-active{background-color:#ffe7e7}.deep-chat-openai-realtime-microphone-active:hover{background-color:#ffdede}.deep-chat-openai-realtime-microphone-active:active{background-color:#ffd2d2}.deep-chat-openai-realtime-microphone>*{height:30px;width:30px}.deep-chat-openai-realtime-microphone-active>*{filter:brightness(0) saturate(100%) invert(35%) sepia(60%) saturate(1360%) hue-rotate(325deg) brightness(95%) contrast(92%)}.deep-chat-openai-realtime-toggle>*{height:32px;width:32px;padding-left:3px;filter:brightness(0) saturate(100%) invert(22%) sepia(0%) saturate(4537%) hue-rotate(208deg) brightness(105%) contrast(91%)}.deep-chat-openai-realtime-button-unavailable{opacity:.45;pointer-events:none}#deep-chat-openai-realtime-error{color:red;position:absolute;top:calc(50% + 40px);left:50%;transform:translate(-50%,-50%);font-size:17px}#deep-chat-openai-realtime-loading{position:absolute;font-size:15px;top:50%;left:50%;transform:translate(-50%,-50%)}#insert-key-view{height:100%;position:relative}#insert-key-contents{text-align:center;position:absolute;top:44%;left:50%;transform:translate(-50%,-50%);width:82%;display:flex;max-width:700px}#insert-key-title{margin-bottom:15px}#insert-key-input-container{margin-right:2.7em;width:calc(100% - 80px)}#insert-key-input{padding:.3em 1.7em .3em .3em;border-width:1px;border-style:solid;border-radius:3px;width:100%;font-size:inherit}.insert-key-input-valid{border-color:gray}.insert-key-input-invalid{border-color:red}#visibility-icon-container{position:relative;float:right;cursor:pointer;-webkit-user-select:none;user-select:none}.visibility-icon{filter:brightness(0) saturate(100%) invert(63%) sepia(1%) saturate(9%) hue-rotate(43deg) brightness(98%) contrast(92%);position:absolute;right:-1.7em;top:-1.43em}#visible-icon{top:-1.4em}.visibility-icon:hover{filter:unset}.visibility-icon>*{pointer-events:none}#start-button{border:1px solid grey;color:#454545;border-radius:4px;width:3em;display:flex;justify-content:center;align-items:center;cursor:pointer;padding:.28em .3em;-webkit-user-select:none;user-select:none;background-color:#fff}#start-button:hover{background-color:#f2f2f2}#start-button:active{background-color:#d2d2d2}#insert-key-help-text-container{width:100%;position:absolute;margin-top:32px;margin-bottom:20px}#insert-key-help-text-contents{width:100%;position:absolute}#insert-key-input-invalid-text{display:block;margin-top:1em;margin-bottom:.5em;color:red}.insert-key-input-help-text{display:block;margin-top:16px}#loading-key{display:inline-block;width:16px;height:16px}#loading-key:after{content:\" \";display:block;width:11px;height:11px;margin:1px;border-radius:50%;border:2px solid #0084ff;border-color:#0084ff transparent #0084ff transparent;animation:loading-spinner 1.2s linear infinite}#error-view{color:red;font-size:1.2em;line-height:1.3em;margin-top:-5px;text-align:center;height:100%;display:flex;justify-content:center;align-items:center;padding-left:8px;padding-right:8px}@keyframes loading-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.intro-panel{position:absolute;display:flex;justify-content:center;right:0;bottom:0;left:0;margin:auto;height:fit-content;top:-2.5em}#internal-intro-panel{width:250px;height:min-content;display:block;border-radius:5px;overflow:auto;border:1px solid rgb(203,203,203);padding:10px;max-height:calc(100% - 6.8em)}#internal-intro-panel>p{margin-block-start:.8em;margin-block-end:.8em}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!\n Theme: a11y-dark\n Author: @ericwbailey\n Maintainer: @ericwbailey\n\n Based on the Tomorrow Night Eighties theme: https://github.com/isagalaev/highlight.js/blob/master/src/styles/tomorrow-night-eighties.css\n*/.hljs{background:#2b2b2b;color:#f8f8f2}.hljs-comment,.hljs-quote{color:#d4d0ab}.hljs-deletion,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#ffa07a}.hljs-built_in,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#f5ab35}.hljs-attribute{color:gold}.hljs-addition,.hljs-bullet,.hljs-string,.hljs-symbol{color:#abe338}.hljs-section,.hljs-title{color:#00e0e0}.hljs-keyword,.hljs-selector-tag{color:#dcc6e0}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}@media screen and (-ms-high-contrast: active){.hljs-addition,.hljs-attribute,.hljs-built_in,.hljs-bullet,.hljs-comment,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-quote,.hljs-string,.hljs-symbol,.hljs-type{color:highlight}.hljs-keyword,.hljs-selector-tag{font-weight:700}}#messages{overflow:auto}.outer-message-container:last-child{margin-bottom:5px}.inner-message-container{display:flex;margin-left:auto;margin-right:auto;width:calc(97.5% - 24px);max-width:100%}.message-bubble{margin-top:10px;word-wrap:break-word;width:fit-content;max-width:60%;border-radius:10px;padding:.42em .55em;height:fit-content;line-height:1.26em}.user-message-text{color:#fff;background-color:#0084ff;margin-right:0;margin-left:auto}.ai-message-text{color:#000;background-color:#e4e6eb;margin-left:0;margin-right:auto}.deep-chat-last-group-messages-active{height:100%}.loading-history-message-full-view{position:absolute;height:70%;width:100%;display:flex;align-items:center}.loading-history-message-small{height:20px;margin-bottom:30px}.loading-history-message-small>div>div{scale:.6}.loading-history-message{margin-top:0;width:100%;max-width:100%;display:flex;justify-content:center;background-color:unset}.loading-history{width:70px}.loading-history div{position:absolute;width:var(--loading-history-width);height:var(--loading-history-height);margin:var(--loading-history-margin);border:var(--loading-history-border);border-radius:50%;animation:loading-spinner 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:var(--loading-history-color) transparent transparent transparent}.loading-history div:nth-child(1){animation-delay:-.45s}.loading-history div:nth-child(2){animation-delay:-.3s}.loading-history div:nth-child(3){animation-delay:-.15s}.html-message{max-width:unset}.error-message-text{margin:14px auto 10px;background-color:#f4c0c0;color:#474747;text-align:center;max-width:95%}.deep-chat-loading-message-dots-container{width:1em;padding:.6em .75em .6em 1.3em}.loading-message-dots{position:relative;width:.45em;height:.45em;border-radius:5px;background-color:var(--loading-message-color);color:var(--loading-message-color);animation:loading-message-dots 1s infinite linear alternate;animation-delay:.5s}.loading-message-dots:before,.loading-message-dots:after{content:\"\";display:inline-block;position:absolute;top:0}.loading-message-dots:before{left:-.7em;width:.45em;height:.45em;border-radius:5px;background-color:var(--loading-message-color);color:var(--loading-message-color);animation:loading-message-dots 1s infinite alternate;animation-delay:0s}.loading-message-dots:after{left:.7em;width:.45em;height:.45em;border-radius:5px;background-color:var(--loading-message-color);color:var(--loading-message-color);animation:loading-message-dots 1s infinite alternate;animation-delay:1s}@keyframes loading-message-dots{0%{background-color:var(--loading-message-color)}50%,to{background-color:var(--loading-message-color-fade)}}.message-bubble>p:first-child,.message-bubble>.partial-render-message>p:first-child,.stream-wrapper>p:first-child{margin-top:0}.message-bubble>p:last-child,.message-bubble>.partial-render-message:last-child>p,.stream-wrapper>p:last-child{margin-bottom:0}pre{overflow:auto;display:block;word-break:break-all;word-wrap:break-word;border-radius:7px;background:#2b2b2b;color:#f8f8f2;margin-top:.8em;margin-bottom:.8em;padding:.6em;font-size:.9em;line-height:1.5em}.image-message{padding:0;display:flex;background-color:#ddd}.image-message>*,.image-message>*>*{width:100%;border-radius:8px;display:flex}.audio-message{width:60%;max-width:300px;height:2.2em;max-height:54px;padding:0;background-color:unset}.audio-player{width:100%;height:100%}.audio-player-safari{height:fit-content;width:40px}.audio-player-safari-left{float:left}.audio-player-safari-right{float:right}.any-file-message{padding:1px}.any-file-message-contents{display:flex}.any-file-message-icon-container{width:1.3em;min-width:1.3em;position:relative;border-radius:4px;margin-left:6px;margin-right:2px}.any-file-message-icon{background-color:#fff;border-radius:4px;position:absolute;width:1em;height:1.25em;padding:1px;margin-top:auto;margin-bottom:auto;top:0;bottom:0}.any-file-message-text{padding-top:5px;overflow-wrap:anywhere;padding-bottom:5px;padding-right:7px}.message-bubble>a{color:inherit}.left-item-position{margin-right:10px}.right-item-position{margin-left:10px}.role-hidden{display:none}.avatar{padding-top:5px;width:1.5em;height:1.5em;border-radius:1px}.avatar-container{margin-top:9px}.name{margin-top:16px;font-size:15px}#drag-and-drop{position:absolute;display:none;z-index:10;height:calc(100% - 10px);width:calc(100% - 10px);background-color:#70c6ff4d;border:5px dashed #6dafff}#file-attachment-container{position:absolute;height:3.6em;width:calc(80% - 4px);top:-2.5em;border-radius:5px;overflow:auto;text-align:left;background-color:#d7d7d73b;padding-left:4px}.file-attachment{width:2.85em;height:2.85em;display:inline-flex;margin-right:.6em;margin-bottom:.44em;margin-top:4px;position:relative;background-color:#fff;border-radius:5px}.image-attachment{width:100%;height:100%;object-fit:cover;border-radius:5px}.border-bound-attachment{width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid #c3c3c3;border-radius:5px;overflow:hidden}.border-bound-attachment-safari{width:calc(100% - 1px);height:calc(100% - 1px)}.audio-attachment-icon-container{cursor:pointer}.audio-attachment-icon-container:hover{background-color:#f8f8f8}.attachment-icon{left:0;right:0;bottom:0;top:2px;margin:auto;position:absolute;width:25px;-webkit-user-select:none;user-select:none}.not-removable-attachment-icon{top:0;right:0;bottom:0;left:0}.play-icon{filter:brightness(0) saturate(100%) invert(17%) sepia(0%) saturate(1392%) hue-rotate(67deg) brightness(98%) contrast(97%)}.stop-icon{filter:brightness(0) saturate(100%) invert(29%) sepia(90%) saturate(1228%) hue-rotate(198deg) brightness(93%) contrast(98%)}.audio-placeholder-text-3-digits{padding-left:.26rem}.audio-placeholder-text-4-digits{padding-left:.1rem}.any-file-attachment{padding:2px 0}.file-attachment-text-container{position:absolute;width:inherit;display:flex;align-items:center;height:100%;top:-1px}.audio-placeholder-text-3-digits-container{padding-top:1px;cursor:default}.any-file-attachment-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;padding-left:.13em;margin-left:auto;margin-right:auto}.remove-file-attachment-button{height:1.25em;width:1.25em;border:1px solid #cfcfcf;border-radius:25px;background-color:#fff;top:-4px;right:-5px;position:absolute;display:flex;justify-content:center;cursor:pointer;-webkit-user-select:none;user-select:none}.remove-file-attachment-button:hover{background-color:#e4e4e4}.remove-file-attachment-button:active{background-color:#d7d7d7}.x-icon{color:#4e4e4e;top:-.075em;position:relative;font-size:1.05em}.modal{display:none;flex-direction:column;align-items:center;justify-content:center;position:absolute;width:80%;max-width:420px;max-height:80%;margin:auto;top:0;right:0;bottom:0;left:0;z-index:3}.modal-content{border-top:1px solid rgb(217,217,217);border-left:1px solid rgb(217,217,217);border-right:1px solid rgb(217,217,217);border-top-left-radius:inherit;border-top-right-radius:inherit;background-color:#fff;overflow-y:auto;height:fit-content;max-height:calc(100% - 3.3em);width:100%}.modal-content>p{margin-left:1em;margin-right:1em}.modal-content>ul{margin-right:1em}.modal-button-panel{height:3.3em;border:1px solid;border-color:rgb(223,223,223) rgb(217,217,217) rgb(217,217,217);border-bottom-left-radius:inherit;border-bottom-right-radius:inherit;background-color:#fff;text-align:center;justify-content:center;display:flex;width:100%}.modal-button{min-width:2.5em;text-align:center;color:#fff;border-radius:5px;padding:.4em .4em .3em;height:1.25em;background-color:#3279b2;top:0;bottom:0;cursor:pointer;-webkit-user-select:none;user-select:none;margin:auto .31em}.modal-button:hover{background-color:#276da7}.modal-button:active{background-color:#1b5687}.modal-svg-button{padding:0 0 2px;width:2em;height:1.8em}.modal-svg-button-icon{width:100%;height:100%;filter:brightness(0) saturate(100%) invert(100%) sepia(15%) saturate(4%) hue-rotate(346deg) brightness(101%) contrast(102%)}#modal-background-panel{position:absolute;width:100%;height:100%;background-color:#00000042;z-index:2;display:none}.show-modal-background{animation:fadeInBackground .3s ease-in-out}@keyframes fadeInBackground{0%{opacity:0}to{opacity:1}}.show-modal{animation:fadeInModal .3s ease-in-out}@keyframes fadeInModal{0%{opacity:0;scale:.95}to{opacity:1;scale:1}}.hide-modal-background{animation:fadeOutBackground .2s ease-in-out}@keyframes fadeOutBackground{0%{opacity:1}to{opacity:0}}.hide-modal{animation:fadeOutModal .2s ease-in-out}@keyframes fadeOutModal{0%{opacity:1;scale:1}to{opacity:0;scale:.95}}.modal-camera-content{overflow:hidden;text-align:center;border:unset;height:100%;background-color:#2a2a2a;display:flex;justify-content:center}.camera-modal-canvas{max-width:100%;max-height:100%;margin-top:auto;margin-bottom:auto}.modal-svg-submit-button{background-color:green}.modal-svg-submit-button:hover{background-color:#007500}.modal-svg-submit-button:active{background-color:#006500}.modal-svg-submit-disabled{pointer-events:none;background-color:#747474}.modal-svg-close-button{height:1.56em;padding-top:.37em;padding-bottom:0;background-color:#c13e3e}.modal-svg-close-button:hover{background-color:#b43434}.modal-svg-close-button:active{background-color:#972929}.modal-svg-close-icon{width:80%;height:80%}.modal-svg-camera-button{height:1.6em;padding-top:.38em;padding-bottom:0}.modal-svg-camera-icon{height:76%}.modal-svg-refresh-icon{height:105%}.modal-svg-refresh-button{height:1.66em;padding-top:.11em;padding-bottom:.21em}.input-button-container{position:relative;z-index:1}.inside-right{position:absolute;right:calc(10% + .35em);bottom:.85em}.inside-left{position:absolute;left:calc(10% + .35em);bottom:.85em}.outside-left{position:absolute;right:calc(11px - .55em);bottom:.88em}.outside-right{position:absolute;left:calc(11px - .55em);bottom:.88em}#upload-images-icon{position:absolute;pointer-events:none;width:1.45em;height:1.45em;left:.11em;bottom:.08em;filter:brightness(0) saturate(100%) invert(43%) sepia(0%) saturate(740%) hue-rotate(77deg) brightness(99%) contrast(92%)}#upload-gifs-icon{position:absolute;pointer-events:none;width:1.5em;height:1.48em;left:.07em;bottom:.08em;filter:brightness(0) saturate(100%) invert(49%) sepia(0%) saturate(2586%) hue-rotate(12deg) brightness(93%) contrast(90%)}#upload-audio-icon{position:absolute;pointer-events:none;width:1.21em;height:1.21em;left:.17em;bottom:.2em;filter:brightness(0) saturate(100%) invert(15%) sepia(0%) saturate(337%) hue-rotate(125deg) brightness(91%) contrast(94%);transform:scaleX(.95)}#camera-icon{position:absolute;pointer-events:none;width:1.21em;height:1.21em;left:.23em;bottom:.2em;filter:brightness(0) saturate(100%) invert(52%) sepia(0%) saturate(161%) hue-rotate(164deg) brightness(91%) contrast(92%);transform:scaleX(.95)}#upload-mixed-files-icon{position:absolute;pointer-events:none;width:1.21em;height:1.21em;left:.25em;bottom:.2em;filter:brightness(0) saturate(100%) invert(53%) sepia(0%) saturate(36%) hue-rotate(74deg) brightness(98%) contrast(93%);transform:scaleX(.95)}#interim-text{color:gray}#microphone-button{padding-top:.5px}.outer-button-container>#microphone-button{padding-bottom:1px}#microphone-icon{position:absolute;pointer-events:none;width:1.21em;height:1.21em;left:.25em;bottom:.25em}.default-microphone-icon{filter:brightness(0) saturate(100%) invert(32%) sepia(0%) saturate(924%) hue-rotate(46deg) brightness(95%) contrast(99%)}.active-microphone-icon{filter:brightness(0) saturate(100%) invert(10%) sepia(97%) saturate(7495%) hue-rotate(0deg) brightness(101%) contrast(107%);border-radius:10px}.command-microphone-icon{filter:brightness(0) saturate(100%) invert(42%) sepia(96%) saturate(1067%) hue-rotate(77deg) brightness(99%) contrast(102%)}.unsupported-microphone{display:none}#submit-icon{height:100%;filter:brightness(0) saturate(100%) invert(32%) sepia(0%) saturate(924%) hue-rotate(46deg) brightness(95%) contrast(99%);width:1.21em}#stop-icon{background-color:#acacac;position:absolute;width:.95em;height:.95em;left:.35em;bottom:.35em;border-radius:2px}.submit-button-enlarged{scale:1.1;margin-right:.3em;margin-left:.3em}.loading-submit-button{position:relative;left:calc(-9990px + .275em);width:.22em;height:.22em;border-radius:5px;background-color:#848484;color:#848484;box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484;animation:loading-submit-button 1.5s infinite linear;bottom:-.75em}@keyframes loading-submit-button{0%{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}16.667%{box-shadow:9990px -6px #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}33.333%{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}50%{box-shadow:9990px 0 #848484,calc(9990px + .44em) -6px 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}66.667%{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}83.333%{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) -6px 0 0 #848484}to{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}}.input-button{border-radius:4px;cursor:pointer;margin-bottom:.2em;-webkit-user-select:none;user-select:none}.input-button-svg{width:1.65em;height:1.65em}.input-button-svg-text{padding:1px;height:1.65em;display:flex}.input-button-svg-text>svg{padding:.22rem}.input-button-svg-text>div{margin-left:2px}.input-button:hover,.input-button:focus-visible{background-color:#9c9c9c2e}.input-button:active{background-color:#9c9c9c5e}.input-button:active:not(:hover){background-color:transparent}.loading-button{cursor:auto}.loading-button:hover{background-color:unset}.text-button{filter:unset!important;display:flex;justify-content:center;align-items:center;margin-left:4px;margin-right:4px;height:1.6em;width:max-content}#custom-icon{height:100%;width:1.2em}.custom-button-container-default{color:#505050}.custom-button-container-default>.dropup-menu-item-icon{color:unset}.custom-button-container-default>svg{filter:brightness(0) saturate(100%) invert(39%) sepia(1%) saturate(0%) hue-rotate(83deg) brightness(93%) contrast(90%)}.custom-button-container-default>.dropup-menu-item-icon>svg{position:absolute;left:.2em}.custom-button-container-active{background-color:#edf7ff;color:#0285ff}.custom-button-container-active:hover,.custom-button-container-active:focus-visible{background-color:#def0ff}.custom-button-container-active:active{background-color:#d2eaff}.custom-button-container-active>svg{filter:brightness(0) saturate(100%) invert(32%) sepia(34%) saturate(4196%) hue-rotate(196deg) brightness(107%) contrast(104%)}.custom-button-container-disabled{color:#aeaeae;cursor:auto}.custom-button-container-disabled>div{pointer-events:none}.custom-button-container-disabled:hover,.custom-button-container-disabled:focus-visible{background-color:transparent}.custom-button-container-disabled:active{background-color:transparent}.custom-button-container-disabled>svg{filter:brightness(0) saturate(100%) invert(67%) sepia(0%) saturate(818%) hue-rotate(28deg) brightness(102%) contrast(100%)}#text-input-container{background-color:#fff;width:80%;display:flex;border:1px solid #0000001a;border-radius:5px;margin-top:.8em;margin-bottom:.8em;box-shadow:#959da533 0 1px 12px;overflow-y:auto;max-height:200px;position:relative}.text-input-container-left-adjustment{margin-left:1.5em}.text-input-container-right-adjustment{margin-right:1.5em}.text-input-container-left-small-adjustment{margin-left:1.1em}.text-input-container-left-small-adjustment>.outside-left{right:calc(14px - .55em)}.text-input-container-right-small-adjustment{margin-right:1.1em}.text-input-container-right-small-adjustment>.outside-right{left:calc(14px - .55em)}#text-input{text-align:left;outline:none;word-wrap:break-word;line-break:auto}.text-input-styling{padding:.4em .5em;overflow:overlay;width:100%}.text-input-inner-left-adjustment{padding-left:2.2em}.text-input-inner-right-adjustment{padding-right:2em}.text-input-disabled{pointer-events:none;-webkit-user-select:none;user-select:none}[contenteditable]:empty:before{content:attr(deep-chat-placeholder-text);pointer-events:none}[contenteditable][textcolor]:empty:before{color:gray}.outside-right>#dropup-menu,.inside-right>#dropup-menu{right:0}#dropup-icon{position:absolute;pointer-events:none;width:1.16em;height:1.2em;left:.265em;bottom:.43em;filter:brightness(0) saturate(100%) invert(54%) sepia(0%) saturate(724%) hue-rotate(6deg) brightness(92%) contrast(90%)}.dropup-button>*{pointer-events:none}#dropup-menu{background-color:#fff;position:absolute;transform:translateY(-100%);border-radius:5px;z-index:1;top:-.49em;box-shadow:#0003 -1px 2px 10px,#0000001a 0 2px 4px;cursor:pointer;-webkit-user-select:none;user-select:none}.dropup-menu-item{height:1.4em;padding:.28em .84em .28em .35em;display:flex;position:relative}.dropup-menu-item:hover,.dropup-menu-item:focus-visible{background-color:#f3f3f3}.dropup-menu-item:active{background-color:#ebebeb}.dropup-menu-item:active:not(:hover){background-color:transparent}.dropup-menu-item:first-child{padding-top:.49em;border-top-left-radius:inherit;border-top-right-radius:inherit}.dropup-menu-item:last-child{padding-bottom:.45em;border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.dropup-menu-item-icon{width:1.39em;position:relative}.dropup-menu-item-icon>svg{bottom:0!important;top:0!important;margin-bottom:auto;margin-top:auto}#dropup-menu-item-icon-element-custom{position:absolute;pointer-events:none;width:1.21em;height:1.21em;left:.28em;filter:brightness(0) saturate(100%) invert(15%) sepia(0%) saturate(337%) hue-rotate(125deg) brightness(91%) contrast(94%)}.dropup-menu-item-text{margin-left:.56em;margin-top:.08em;width:max-content}#input{width:100%;display:inline-flex;text-align:center;margin-left:auto;margin-right:auto;margin-top:auto;position:relative;justify-content:center}#chat-view{height:100%;display:grid;grid-template-columns:100%}::-webkit-scrollbar{width:9px;height:9px}::-webkit-scrollbar-thumb{background-color:#d0d0d0;border-radius:5px}::-webkit-scrollbar-track{background-color:#f2f2f2}.deep-chat-web-model-button{margin-top:10px;margin-bottom:5px;margin-left:1px}:host{all:initial;display:table-cell}#container{height:inherit;width:inherit;overflow:hidden}";
16045
- var Ua = Object.defineProperty,
16046
- A = function A(n, e, t, i) {
16104
+ var Ua = "#validate-property-key-view{height:100%;position:relative;display:flex;justify-content:center;align-items:center;padding:8px}#loading-validate-key-property{display:inline-block;width:50px;height:50px}#loading-validate-key-property:after{content:\" \";display:block;width:38px;height:38px;margin:1px;border-radius:50%;border:5px solid #5fb2ff;border-color:#5fb2ff transparent #5fb2ff transparent;animation:loading-spinner 1.4s linear infinite}#deep-chat-openai-realtime-container{height:100%;width:100%}#deep-chat-openai-realtime-avatar-container{height:60%;width:100%;display:flex;justify-content:center;align-items:center}#deep-chat-openai-realtime-avatar{border-radius:50%;height:110px;border:1px solid rgb(215,215,215);padding:8px;-webkit-user-select:none;user-select:none;margin-top:20px}#deep-chat-openai-realtime-buttons-container{height:40%;display:flex;position:relative}.deep-chat-openai-realtime-button-container{height:100%;width:50%;display:flex;justify-content:center;align-items:center}.deep-chat-openai-realtime-button{width:70px;height:70px;border-radius:50%;display:flex;justify-content:center;align-items:center;cursor:pointer}.deep-chat-openai-realtime-button-default{background-color:#e3e3e3}.deep-chat-openai-realtime-button-default:hover{background-color:#d4d4d4}.deep-chat-openai-realtime-button-default:active{background-color:#c5c5c5}.deep-chat-openai-realtime-button-loading{opacity:.7;pointer-events:none}.deep-chat-openai-realtime-microphone-active{background-color:#ffe7e7}.deep-chat-openai-realtime-microphone-active:hover{background-color:#ffdede}.deep-chat-openai-realtime-microphone-active:active{background-color:#ffd2d2}.deep-chat-openai-realtime-microphone>*{height:30px;width:30px}.deep-chat-openai-realtime-microphone-active>*{filter:brightness(0) saturate(100%) invert(35%) sepia(60%) saturate(1360%) hue-rotate(325deg) brightness(95%) contrast(92%)}.deep-chat-openai-realtime-toggle>*{height:32px;width:32px;padding-left:3px;filter:brightness(0) saturate(100%) invert(22%) sepia(0%) saturate(4537%) hue-rotate(208deg) brightness(105%) contrast(91%)}.deep-chat-openai-realtime-button-unavailable{opacity:.45;pointer-events:none}#deep-chat-openai-realtime-error{color:red;position:absolute;top:calc(50% + 40px);left:50%;transform:translate(-50%,-50%);font-size:17px}#deep-chat-openai-realtime-loading{position:absolute;font-size:15px;top:50%;left:50%;transform:translate(-50%,-50%)}#insert-key-view{height:100%;position:relative}#insert-key-contents{text-align:center;position:absolute;top:44%;left:50%;transform:translate(-50%,-50%);width:82%;display:flex;max-width:700px}#insert-key-title{margin-bottom:15px}#insert-key-input-container{margin-right:2.7em;width:calc(100% - 80px)}#insert-key-input{padding:.3em 1.7em .3em .3em;border-width:1px;border-style:solid;border-radius:3px;width:100%;font-size:inherit}.insert-key-input-valid{border-color:gray}.insert-key-input-invalid{border-color:red}#visibility-icon-container{position:relative;float:right;cursor:pointer;-webkit-user-select:none;user-select:none}.visibility-icon{filter:brightness(0) saturate(100%) invert(63%) sepia(1%) saturate(9%) hue-rotate(43deg) brightness(98%) contrast(92%);position:absolute;right:-1.7em;top:-1.43em}#visible-icon{top:-1.4em}.visibility-icon:hover{filter:unset}.visibility-icon>*{pointer-events:none}#start-button{border:1px solid grey;color:#454545;border-radius:4px;width:3em;display:flex;justify-content:center;align-items:center;cursor:pointer;padding:.28em .3em;-webkit-user-select:none;user-select:none;background-color:#fff}#start-button:hover{background-color:#f2f2f2}#start-button:active{background-color:#d2d2d2}#insert-key-help-text-container{width:100%;position:absolute;margin-top:32px;margin-bottom:20px}#insert-key-help-text-contents{width:100%;position:absolute}#insert-key-input-invalid-text{display:block;margin-top:1em;margin-bottom:.5em;color:red}.insert-key-input-help-text{display:block;margin-top:16px}#loading-key{display:inline-block;width:16px;height:16px}#loading-key:after{content:\" \";display:block;width:11px;height:11px;margin:1px;border-radius:50%;border:2px solid #0084ff;border-color:#0084ff transparent #0084ff transparent;animation:loading-spinner 1.2s linear infinite}#error-view{color:red;font-size:1.2em;line-height:1.3em;margin-top:-5px;text-align:center;height:100%;display:flex;justify-content:center;align-items:center;padding-left:8px;padding-right:8px}@keyframes loading-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.intro-panel{position:absolute;display:flex;justify-content:center;right:0;bottom:0;left:0;margin:auto;height:fit-content;top:-2.5em}#internal-intro-panel{width:250px;height:min-content;display:block;border-radius:5px;overflow:auto;border:1px solid rgb(203,203,203);padding:10px;max-height:calc(100% - 6.8em)}#internal-intro-panel>p{margin-block-start:.8em;margin-block-end:.8em}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!\n Theme: a11y-dark\n Author: @ericwbailey\n Maintainer: @ericwbailey\n\n Based on the Tomorrow Night Eighties theme: https://github.com/isagalaev/highlight.js/blob/master/src/styles/tomorrow-night-eighties.css\n*/.hljs{background:#2b2b2b;color:#f8f8f2}.hljs-comment,.hljs-quote{color:#d4d0ab}.hljs-deletion,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#ffa07a}.hljs-built_in,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#f5ab35}.hljs-attribute{color:gold}.hljs-addition,.hljs-bullet,.hljs-string,.hljs-symbol{color:#abe338}.hljs-section,.hljs-title{color:#00e0e0}.hljs-keyword,.hljs-selector-tag{color:#dcc6e0}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}@media screen and (-ms-high-contrast: active){.hljs-addition,.hljs-attribute,.hljs-built_in,.hljs-bullet,.hljs-comment,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-quote,.hljs-string,.hljs-symbol,.hljs-type{color:highlight}.hljs-keyword,.hljs-selector-tag{font-weight:700}}#messages{overflow:auto}.outer-message-container:last-child{margin-bottom:5px}.inner-message-container{display:flex;margin-left:auto;margin-right:auto;width:calc(97.5% - 24px);max-width:100%}.message-bubble{margin-top:10px;word-wrap:break-word;width:fit-content;max-width:60%;border-radius:10px;padding:.42em .55em;height:fit-content;line-height:1.26em}.user-message-text{color:#fff;background-color:#0084ff;margin-right:0;margin-left:auto}.ai-message-text{color:#000;background-color:#e4e6eb;margin-left:0;margin-right:auto}.deep-chat-last-group-messages-active{height:100%}.loading-history-message-full-view{position:absolute;height:70%;width:100%;display:flex;align-items:center}.loading-history-message-small{height:20px;margin-bottom:30px}.loading-history-message-small>div>div{scale:.6}.loading-history-message{margin-top:0;width:100%;max-width:100%;display:flex;justify-content:center;background-color:unset}.loading-history{width:70px}.loading-history div{position:absolute;width:var(--loading-history-width);height:var(--loading-history-height);margin:var(--loading-history-margin);border:var(--loading-history-border);border-radius:50%;animation:loading-spinner 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:var(--loading-history-color) transparent transparent transparent}.loading-history div:nth-child(1){animation-delay:-.45s}.loading-history div:nth-child(2){animation-delay:-.3s}.loading-history div:nth-child(3){animation-delay:-.15s}.html-message{max-width:unset}.error-message-text{margin:14px auto 10px;background-color:#f4c0c0;color:#474747;text-align:center;max-width:95%}.deep-chat-loading-message-dots-container{width:1em;padding:.6em .75em .6em 1.3em}.loading-message-dots{position:relative;width:.45em;height:.45em;border-radius:5px;background-color:var(--loading-message-color);color:var(--loading-message-color);animation:loading-message-dots 1s infinite linear alternate;animation-delay:.5s}.loading-message-dots:before,.loading-message-dots:after{content:\"\";display:inline-block;position:absolute;top:0}.loading-message-dots:before{left:-.7em;width:.45em;height:.45em;border-radius:5px;background-color:var(--loading-message-color);color:var(--loading-message-color);animation:loading-message-dots 1s infinite alternate;animation-delay:0s}.loading-message-dots:after{left:.7em;width:.45em;height:.45em;border-radius:5px;background-color:var(--loading-message-color);color:var(--loading-message-color);animation:loading-message-dots 1s infinite alternate;animation-delay:1s}@keyframes loading-message-dots{0%{background-color:var(--loading-message-color)}50%,to{background-color:var(--loading-message-color-fade)}}.message-bubble>p:first-child,.message-bubble>.partial-render-message>p:first-child,.stream-wrapper>p:first-child{margin-top:0}.message-bubble>p:last-child,.message-bubble>.partial-render-message:last-child>p,.stream-wrapper>p:last-child{margin-bottom:0}pre{overflow:auto;display:block;word-break:break-all;word-wrap:break-word;border-radius:7px;background:#2b2b2b;color:#f8f8f2;margin-top:.8em;margin-bottom:.8em;padding:.6em;font-size:.9em;line-height:1.5em}.image-message{padding:0;display:flex;background-color:#ddd}.image-message>*,.image-message>*>*{width:100%;border-radius:8px;display:flex}.audio-message{width:60%;max-width:300px;height:2.2em;max-height:54px;padding:0;background-color:unset}.audio-player{width:100%;height:100%}.audio-player-safari{height:fit-content;width:40px}.audio-player-safari-left{float:left}.audio-player-safari-right{float:right}.any-file-message{padding:1px}.any-file-message-contents{display:flex}.any-file-message-icon-container{width:1.3em;min-width:1.3em;position:relative;border-radius:4px;margin-left:6px;margin-right:2px}.any-file-message-icon{background-color:#fff;border-radius:4px;position:absolute;width:1em;height:1.25em;padding:1px;margin-top:auto;margin-bottom:auto;top:0;bottom:0}.any-file-message-text{padding-top:5px;overflow-wrap:anywhere;padding-bottom:5px;padding-right:7px}.message-bubble>a{color:inherit}.left-item-position{margin-right:10px}.right-item-position{margin-left:10px}.role-hidden{display:none}.avatar{padding-top:5px;width:1.5em;height:1.5em;border-radius:1px}.avatar-container{margin-top:9px}.name{margin-top:16px;font-size:15px}#drag-and-drop{position:absolute;display:none;z-index:10;height:calc(100% - 10px);width:calc(100% - 10px);background-color:#70c6ff4d;border:5px dashed #6dafff}#file-attachment-container{position:absolute;height:3.6em;width:calc(80% - 4px);top:-2.5em;border-radius:5px;overflow:auto;text-align:left;background-color:#d7d7d73b;padding-left:4px}.file-attachment{width:2.85em;height:2.85em;display:inline-flex;margin-right:.6em;margin-bottom:.44em;margin-top:4px;position:relative;background-color:#fff;border-radius:5px}.image-attachment{width:100%;height:100%;object-fit:cover;border-radius:5px}.border-bound-attachment{width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid #c3c3c3;border-radius:5px;overflow:hidden}.border-bound-attachment-safari{width:calc(100% - 1px);height:calc(100% - 1px)}.audio-attachment-icon-container{cursor:pointer}.audio-attachment-icon-container:hover{background-color:#f8f8f8}.attachment-icon{left:0;right:0;bottom:0;top:2px;margin:auto;position:absolute;width:25px;-webkit-user-select:none;user-select:none}.not-removable-attachment-icon{top:0;right:0;bottom:0;left:0}.play-icon{filter:brightness(0) saturate(100%) invert(17%) sepia(0%) saturate(1392%) hue-rotate(67deg) brightness(98%) contrast(97%)}.stop-icon{filter:brightness(0) saturate(100%) invert(29%) sepia(90%) saturate(1228%) hue-rotate(198deg) brightness(93%) contrast(98%)}.audio-placeholder-text-3-digits{padding-left:.26rem}.audio-placeholder-text-4-digits{padding-left:.1rem}.any-file-attachment{padding:2px 0}.file-attachment-text-container{position:absolute;width:inherit;display:flex;align-items:center;height:100%;top:-1px}.audio-placeholder-text-3-digits-container{padding-top:1px;cursor:default}.any-file-attachment-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;padding-left:.13em;margin-left:auto;margin-right:auto}.remove-file-attachment-button{height:1.25em;width:1.25em;border:1px solid #cfcfcf;border-radius:25px;background-color:#fff;top:-4px;right:-5px;position:absolute;display:flex;justify-content:center;cursor:pointer;-webkit-user-select:none;user-select:none}.remove-file-attachment-button:hover{background-color:#e4e4e4}.remove-file-attachment-button:active{background-color:#d7d7d7}.x-icon{color:#4e4e4e;top:-.075em;position:relative;font-size:1.05em}.modal{display:none;flex-direction:column;align-items:center;justify-content:center;position:absolute;width:80%;max-width:420px;max-height:80%;margin:auto;top:0;right:0;bottom:0;left:0;z-index:3}.modal-content{border-top:1px solid rgb(217,217,217);border-left:1px solid rgb(217,217,217);border-right:1px solid rgb(217,217,217);border-top-left-radius:inherit;border-top-right-radius:inherit;background-color:#fff;overflow-y:auto;height:fit-content;max-height:calc(100% - 3.3em);width:100%}.modal-content>p{margin-left:1em;margin-right:1em}.modal-content>ul{margin-right:1em}.modal-button-panel{height:3.3em;border:1px solid;border-color:rgb(223,223,223) rgb(217,217,217) rgb(217,217,217);border-bottom-left-radius:inherit;border-bottom-right-radius:inherit;background-color:#fff;text-align:center;justify-content:center;display:flex;width:100%}.modal-button{min-width:2.5em;text-align:center;color:#fff;border-radius:5px;padding:.4em .4em .3em;height:1.25em;background-color:#3279b2;top:0;bottom:0;cursor:pointer;-webkit-user-select:none;user-select:none;margin:auto .31em}.modal-button:hover{background-color:#276da7}.modal-button:active{background-color:#1b5687}.modal-svg-button{padding:0 0 2px;width:2em;height:1.8em}.modal-svg-button-icon{width:100%;height:100%;filter:brightness(0) saturate(100%) invert(100%) sepia(15%) saturate(4%) hue-rotate(346deg) brightness(101%) contrast(102%)}#modal-background-panel{position:absolute;width:100%;height:100%;background-color:#00000042;z-index:2;display:none}.show-modal-background{animation:fadeInBackground .3s ease-in-out}@keyframes fadeInBackground{0%{opacity:0}to{opacity:1}}.show-modal{animation:fadeInModal .3s ease-in-out}@keyframes fadeInModal{0%{opacity:0;scale:.95}to{opacity:1;scale:1}}.hide-modal-background{animation:fadeOutBackground .2s ease-in-out}@keyframes fadeOutBackground{0%{opacity:1}to{opacity:0}}.hide-modal{animation:fadeOutModal .2s ease-in-out}@keyframes fadeOutModal{0%{opacity:1;scale:1}to{opacity:0;scale:.95}}.modal-camera-content{overflow:hidden;text-align:center;border:unset;height:100%;background-color:#2a2a2a;display:flex;justify-content:center}.camera-modal-canvas{max-width:100%;max-height:100%;margin-top:auto;margin-bottom:auto}.modal-svg-submit-button{background-color:green}.modal-svg-submit-button:hover{background-color:#007500}.modal-svg-submit-button:active{background-color:#006500}.modal-svg-submit-disabled{pointer-events:none;background-color:#747474}.modal-svg-close-button{height:1.56em;padding-top:.37em;padding-bottom:0;background-color:#c13e3e}.modal-svg-close-button:hover{background-color:#b43434}.modal-svg-close-button:active{background-color:#972929}.modal-svg-close-icon{width:80%;height:80%}.modal-svg-camera-button{height:1.6em;padding-top:.38em;padding-bottom:0}.modal-svg-camera-icon{height:76%}.modal-svg-refresh-icon{height:105%}.modal-svg-refresh-button{height:1.66em;padding-top:.11em;padding-bottom:.21em}.input-button-container{position:relative;z-index:1}.inside-right{position:absolute;right:calc(10% + .35em);bottom:.85em}.inside-left{position:absolute;left:calc(10% + .35em);bottom:.85em}.outside-left{position:absolute;right:calc(11px - .55em);bottom:.88em}.outside-right{position:absolute;left:calc(11px - .55em);bottom:.88em}#upload-images-icon{position:absolute;pointer-events:none;width:1.45em;height:1.45em;left:.11em;bottom:.08em;filter:brightness(0) saturate(100%) invert(43%) sepia(0%) saturate(740%) hue-rotate(77deg) brightness(99%) contrast(92%)}#upload-gifs-icon{position:absolute;pointer-events:none;width:1.5em;height:1.48em;left:.07em;bottom:.08em;filter:brightness(0) saturate(100%) invert(49%) sepia(0%) saturate(2586%) hue-rotate(12deg) brightness(93%) contrast(90%)}#upload-audio-icon{position:absolute;pointer-events:none;width:1.21em;height:1.21em;left:.17em;bottom:.2em;filter:brightness(0) saturate(100%) invert(15%) sepia(0%) saturate(337%) hue-rotate(125deg) brightness(91%) contrast(94%);transform:scaleX(.95)}#camera-icon{position:absolute;pointer-events:none;width:1.21em;height:1.21em;left:.23em;bottom:.2em;filter:brightness(0) saturate(100%) invert(52%) sepia(0%) saturate(161%) hue-rotate(164deg) brightness(91%) contrast(92%);transform:scaleX(.95)}#upload-mixed-files-icon{position:absolute;pointer-events:none;width:1.21em;height:1.21em;left:.25em;bottom:.2em;filter:brightness(0) saturate(100%) invert(53%) sepia(0%) saturate(36%) hue-rotate(74deg) brightness(98%) contrast(93%);transform:scaleX(.95)}#interim-text{color:gray}#microphone-button{padding-top:.5px}.outer-button-container>#microphone-button{padding-bottom:1px}#microphone-icon{position:absolute;pointer-events:none;width:1.21em;height:1.21em;left:.25em;bottom:.25em}.default-microphone-icon{filter:brightness(0) saturate(100%) invert(32%) sepia(0%) saturate(924%) hue-rotate(46deg) brightness(95%) contrast(99%)}.active-microphone-icon{filter:brightness(0) saturate(100%) invert(10%) sepia(97%) saturate(7495%) hue-rotate(0deg) brightness(101%) contrast(107%);border-radius:10px}.command-microphone-icon{filter:brightness(0) saturate(100%) invert(42%) sepia(96%) saturate(1067%) hue-rotate(77deg) brightness(99%) contrast(102%)}.unsupported-microphone{display:none}#submit-icon{height:100%;filter:brightness(0) saturate(100%) invert(32%) sepia(0%) saturate(924%) hue-rotate(46deg) brightness(95%) contrast(99%);width:1.21em}#stop-icon{background-color:#acacac;position:absolute;width:.95em;height:.95em;left:.35em;bottom:.35em;border-radius:2px}.submit-button-enlarged{scale:1.1;margin-right:.3em;margin-left:.3em}.loading-submit-button{position:relative;left:calc(-9990px + .275em);width:.22em;height:.22em;border-radius:5px;background-color:#848484;color:#848484;box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484;animation:loading-submit-button 1.5s infinite linear;bottom:-.75em}@keyframes loading-submit-button{0%{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}16.667%{box-shadow:9990px -6px #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}33.333%{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}50%{box-shadow:9990px 0 #848484,calc(9990px + .44em) -6px 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}66.667%{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}83.333%{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) -6px 0 0 #848484}to{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}}.input-button{border-radius:4px;cursor:pointer;margin-bottom:.2em;-webkit-user-select:none;user-select:none}.input-button-svg{width:1.65em;height:1.65em}.input-button-svg-text{padding:1px;height:1.65em;display:flex}.input-button-svg-text>svg{padding:.22rem}.input-button-svg-text>div{margin-left:2px}.input-button:hover,.input-button:focus-visible{background-color:#9c9c9c2e}.input-button:active{background-color:#9c9c9c5e}.input-button:active:not(:hover){background-color:transparent}.loading-button{cursor:auto}.loading-button:hover{background-color:unset}.text-button{filter:unset!important;display:flex;justify-content:center;align-items:center;margin-left:4px;margin-right:4px;height:1.6em;width:max-content}#custom-icon{height:100%;width:1.2em}.custom-button-container-default{color:#505050}.custom-button-container-default>.dropup-menu-item-icon{color:unset}.custom-button-container-default>svg{filter:brightness(0) saturate(100%) invert(39%) sepia(1%) saturate(0%) hue-rotate(83deg) brightness(93%) contrast(90%)}.custom-button-container-default>.dropup-menu-item-icon>svg{position:absolute;left:.2em}.custom-button-container-active{background-color:#edf7ff;color:#0285ff}.custom-button-container-active:hover,.custom-button-container-active:focus-visible{background-color:#def0ff}.custom-button-container-active:active{background-color:#d2eaff}.custom-button-container-active>svg{filter:brightness(0) saturate(100%) invert(32%) sepia(34%) saturate(4196%) hue-rotate(196deg) brightness(107%) contrast(104%)}.custom-button-container-disabled{color:#aeaeae;cursor:auto}.custom-button-container-disabled>div{pointer-events:none}.custom-button-container-disabled:hover,.custom-button-container-disabled:focus-visible{background-color:transparent}.custom-button-container-disabled:active{background-color:transparent}.custom-button-container-disabled>svg{filter:brightness(0) saturate(100%) invert(67%) sepia(0%) saturate(818%) hue-rotate(28deg) brightness(102%) contrast(100%)}#text-input-container{background-color:#fff;width:80%;display:flex;border:1px solid #0000001a;border-radius:5px;margin-top:.8em;margin-bottom:.8em;box-shadow:#959da533 0 1px 12px;overflow-y:auto;max-height:200px;position:relative}.text-input-container-left-adjustment{margin-left:1.5em}.text-input-container-right-adjustment{margin-right:1.5em}.text-input-container-left-small-adjustment{margin-left:1.1em}.text-input-container-left-small-adjustment>.outside-left{right:calc(14px - .55em)}.text-input-container-right-small-adjustment{margin-right:1.1em}.text-input-container-right-small-adjustment>.outside-right{left:calc(14px - .55em)}#text-input{text-align:left;outline:none;word-wrap:break-word;line-break:auto}.text-input-styling{padding:.4em .5em;overflow:overlay;width:100%}.text-input-inner-left-adjustment{padding-left:2.2em}.text-input-inner-right-adjustment{padding-right:2em}.text-input-disabled{pointer-events:none;-webkit-user-select:none;user-select:none}[contenteditable]:empty:before{content:attr(deep-chat-placeholder-text);pointer-events:none}[contenteditable][textcolor]:empty:before{color:gray}.outside-right>#dropup-menu,.inside-right>#dropup-menu{right:0}#dropup-icon{position:absolute;pointer-events:none;width:1.16em;height:1.2em;left:.265em;bottom:.43em;filter:brightness(0) saturate(100%) invert(54%) sepia(0%) saturate(724%) hue-rotate(6deg) brightness(92%) contrast(90%)}.dropup-button>*{pointer-events:none}#dropup-menu{background-color:#fff;position:absolute;transform:translateY(-100%);border-radius:5px;z-index:1;top:-.49em;box-shadow:#0003 -1px 2px 10px,#0000001a 0 2px 4px;cursor:pointer;-webkit-user-select:none;user-select:none}.dropup-menu-item{height:1.4em;padding:.28em .84em .28em .35em;display:flex;position:relative}.dropup-menu-item:hover,.dropup-menu-item:focus-visible{background-color:#f3f3f3}.dropup-menu-item:active{background-color:#ebebeb}.dropup-menu-item:active:not(:hover){background-color:transparent}.dropup-menu-item:first-child{padding-top:.49em;border-top-left-radius:inherit;border-top-right-radius:inherit}.dropup-menu-item:last-child{padding-bottom:.45em;border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.dropup-menu-item-icon{width:1.39em;position:relative}.dropup-menu-item-icon>svg{bottom:0!important;top:0!important;margin-bottom:auto;margin-top:auto}#dropup-menu-item-icon-element-custom{position:absolute;pointer-events:none;width:1.21em;height:1.21em;left:.28em;filter:brightness(0) saturate(100%) invert(15%) sepia(0%) saturate(337%) hue-rotate(125deg) brightness(91%) contrast(94%)}.dropup-menu-item-text{margin-left:.56em;margin-top:.08em;width:max-content}#input{width:100%;display:inline-flex;text-align:center;margin-left:auto;margin-right:auto;margin-top:auto;position:relative;justify-content:center}#chat-view{height:100%;display:grid;grid-template-columns:100%}::-webkit-scrollbar{width:9px;height:9px}::-webkit-scrollbar-thumb{background-color:#d0d0d0;border-radius:5px}::-webkit-scrollbar-track{background-color:#f2f2f2}.deep-chat-web-model-button{margin-top:10px;margin-bottom:5px;margin-left:1px}:host{all:initial;display:table-cell}#container{height:inherit;width:inherit;overflow:hidden}.tooltip{position:absolute;visibility:hidden}.tooltip-top{top:0;width:100px;height:20px;background-color:#333}.tooltip-text{color:#fff}";
16105
+ var ja = Object.defineProperty,
16106
+ w = function w(n, e, t, i) {
16047
16107
  for (var s = void 0, r = n.length - 1, o; r >= 0; r--) (o = n[r]) && (s = o(e, t, s) || s);
16048
- return s && Ua(e, t, s), s;
16108
+ return s && ja(e, t, s), s;
16049
16109
  };
16050
- var _ = /*#__PURE__*/function (_rs) {
16110
+ var _ = /*#__PURE__*/function (_os) {
16051
16111
  function _() {
16052
- var _this98;
16112
+ var _this99;
16053
16113
  _classCallCheck(this, _);
16054
- _this98 = _callSuper(this, _), _this98.getMessages = function () {
16114
+ _this99 = _callSuper(this, _), _this99.getMessages = function () {
16055
16115
  return [];
16056
- }, _this98.submitUserMessage = function () {
16116
+ }, _this99.submitUserMessage = function () {
16057
16117
  return console.warn("submitUserMessage failed - please wait for chat view to render before calling this property.");
16058
- }, _this98.addMessage = function () {
16118
+ }, _this99.addMessage = function () {
16059
16119
  return console.warn("addMessage failed - please wait for chat view to render before calling this property.");
16060
- }, _this98.updateMessage = function () {}, _this98.clearMessages = function () {}, _this98.focusInput = function () {
16061
- return li.focusFromParentElement(_this98._elementRef);
16062
- }, _this98.refreshMessages = function () {}, _this98.scrollToBottom = function () {}, _this98.disableSubmitButton = function () {}, _this98.setPlaceholderText = function () {}, _this98._hasBeenRendered = !1, _this98._auxiliaryStyleApplied = !1, _this98._elementRef = document.createElement("div"), _this98._elementRef.id = "container", _this98.attachShadow({
16120
+ }, _this99.updateMessage = function () {}, _this99.clearMessages = function () {}, _this99.focusInput = function () {
16121
+ return li.focusFromParentElement(_this99._elementRef);
16122
+ }, _this99.refreshMessages = function () {}, _this99.scrollToBottom = function () {}, _this99.disableSubmitButton = function () {}, _this99.setPlaceholderText = function () {}, _this99._hasBeenRendered = !1, _this99._auxiliaryStyleApplied = !1, _this99._elementRef = document.createElement("div"), _this99._elementRef.id = "container", _this99.attachShadow({
16063
16123
  mode: "open"
16064
- }).appendChild(_this98._elementRef), zt.apply(Fa, _this98.shadowRoot), setTimeout(function () {
16065
- _this98._hasBeenRendered || _this98.onRender();
16124
+ }).appendChild(_this99._elementRef), zt.apply(Ua, _this99.shadowRoot), setTimeout(function () {
16125
+ _this99._hasBeenRendered || _this99.onRender();
16066
16126
  }, 20);
16067
- return _this98;
16127
+ return _this99;
16068
16128
  }
16069
- _inherits(_, _rs);
16129
+ _inherits(_, _os);
16070
16130
  return _createClass(_, [{
16071
16131
  key: "changeToChatView",
16072
16132
  value: function changeToChatView() {
@@ -16077,7 +16137,7 @@ var _ = /*#__PURE__*/function (_rs) {
16077
16137
  key: "onRender",
16078
16138
  value: function onRender() {
16079
16139
  var _this$_childElement;
16080
- vi.attemptAppendStyleSheetToHead(this.style), te.processConnect(this), (!this._activeService || this._activeService.demo) && (this._activeService = ia.create(this)), this.auxiliaryStyle && !this._auxiliaryStyleApplied && (zt.apply(this.auxiliaryStyle, this.shadowRoot), this._auxiliaryStyleApplied = !0), zt.applyDefaultStyleToComponent(this.style, this.chatStyle), te.checkForContainerStyles(this, this._elementRef), this._activeService.key && this._activeService.validateKeyProperty ? bi.render(this._elementRef, this.changeToChatView.bind(this), this._activeService) : !(this._activeService instanceof K) || this._activeService.key ? ((_this$_childElement = this._childElement) !== null && _this$_childElement !== void 0 ? _this$_childElement : this._childElement = this.children[0], Ls.render(this, this._elementRef, this._activeService, this._childElement)) : this._activeService instanceof K && W.render(this._elementRef, this.changeToChatView.bind(this), this._activeService), this._hasBeenRendered || ii.onRender(this), this._hasBeenRendered = !0;
16140
+ vi.attemptAppendStyleSheetToHead(this.style), te.processConnect(this), (!this._activeService || this._activeService.demo) && (this._activeService = sa.create(this)), this.auxiliaryStyle && !this._auxiliaryStyleApplied && (zt.apply(this.auxiliaryStyle, this.shadowRoot), this._auxiliaryStyleApplied = !0), zt.applyDefaultStyleToComponent(this.style, this.chatStyle), te.checkForContainerStyles(this, this._elementRef), this._activeService.key && this._activeService.validateKeyProperty ? bi.render(this._elementRef, this.changeToChatView.bind(this), this._activeService) : !(this._activeService instanceof K) || this._activeService.key ? ((_this$_childElement = this._childElement) !== null && _this$_childElement !== void 0 ? _this$_childElement : this._childElement = this.children[0], Ls.render(this, this._elementRef, this._activeService, this._childElement)) : this._activeService instanceof K && W.render(this._elementRef, this.changeToChatView.bind(this), this._activeService), this._hasBeenRendered || ii.onRender(this), this._hasBeenRendered = !0;
16081
16141
  }
16082
16142
  }, {
16083
16143
  key: "disconnectedCallback",
@@ -16085,49 +16145,50 @@ var _ = /*#__PURE__*/function (_rs) {
16085
16145
  ni.chat = void 0;
16086
16146
  }
16087
16147
  }]);
16088
- }(rs);
16089
- A([x("object")], _.prototype, "connect");
16090
- A([x("object")], _.prototype, "directConnection");
16091
- A([x("object")], _.prototype, "webModel");
16092
- A([x("object")], _.prototype, "requestBodyLimits");
16093
- A([x("function")], _.prototype, "requestInterceptor");
16094
- A([x("function")], _.prototype, "responseInterceptor");
16095
- A([x("function")], _.prototype, "validateInput");
16096
- A([x("function")], _.prototype, "loadHistory");
16097
- A([x("object")], _.prototype, "chatStyle");
16098
- A([x("object")], _.prototype, "attachmentContainerStyle");
16099
- A([x("object")], _.prototype, "dropupStyles");
16100
- A([x("object")], _.prototype, "inputAreaStyle");
16101
- A([x("object")], _.prototype, "textInput");
16102
- A([x("object")], _.prototype, "submitButtonStyles");
16103
- A([x("object")], _.prototype, "customButtons");
16104
- A([x("string")], _.prototype, "auxiliaryStyle");
16105
- A([x("array")], _.prototype, "history");
16106
- A([x("object")], _.prototype, "introMessage");
16107
- A([x("object")], _.prototype, "avatars");
16108
- A([x("object")], _.prototype, "names");
16109
- A([x("object")], _.prototype, "displayLoadingBubble");
16110
- A([x("object")], _.prototype, "errorMessages");
16111
- A([x("object")], _.prototype, "messageStyles");
16112
- A([x("object")], _.prototype, "textToSpeech");
16113
- A([x("object")], _.prototype, "speechToText");
16114
- A([x("object")], _.prototype, "images");
16115
- A([x("object")], _.prototype, "gifs");
16116
- A([x("object")], _.prototype, "camera");
16117
- A([x("object")], _.prototype, "audio");
16118
- A([x("object")], _.prototype, "microphone");
16119
- A([x("object")], _.prototype, "mixedFiles");
16120
- A([x("object")], _.prototype, "dragAndDrop");
16121
- A([x("object")], _.prototype, "introPanelStyle");
16122
- A([x("object")], _.prototype, "htmlClassUtilities");
16123
- A([x("object")], _.prototype, "remarkable");
16124
- A([x("object")], _.prototype, "focusMode");
16125
- A([x("function")], _.prototype, "onMessage");
16126
- A([x("function")], _.prototype, "onClearMessages");
16127
- A([x("function")], _.prototype, "onComponentRender");
16128
- A([x("function")], _.prototype, "onInput");
16129
- A([x("function")], _.prototype, "onError");
16130
- A([x("object")], _.prototype, "demo");
16131
- A([x("object")], _.prototype, "_insertKeyViewStyles");
16148
+ }(os);
16149
+ w([x("object")], _.prototype, "connect");
16150
+ w([x("object")], _.prototype, "directConnection");
16151
+ w([x("object")], _.prototype, "webModel");
16152
+ w([x("object")], _.prototype, "requestBodyLimits");
16153
+ w([x("function")], _.prototype, "requestInterceptor");
16154
+ w([x("function")], _.prototype, "responseInterceptor");
16155
+ w([x("function")], _.prototype, "validateInput");
16156
+ w([x("function")], _.prototype, "loadHistory");
16157
+ w([x("object")], _.prototype, "chatStyle");
16158
+ w([x("object")], _.prototype, "attachmentContainerStyle");
16159
+ w([x("object")], _.prototype, "dropupStyles");
16160
+ w([x("object")], _.prototype, "inputAreaStyle");
16161
+ w([x("object")], _.prototype, "textInput");
16162
+ w([x("object")], _.prototype, "submitButtonStyles");
16163
+ w([x("object")], _.prototype, "customButtons");
16164
+ w([x("string")], _.prototype, "auxiliaryStyle");
16165
+ w([x("array")], _.prototype, "history");
16166
+ w([x("object")], _.prototype, "browserStorage");
16167
+ w([x("object")], _.prototype, "introMessage");
16168
+ w([x("object")], _.prototype, "avatars");
16169
+ w([x("object")], _.prototype, "names");
16170
+ w([x("object")], _.prototype, "displayLoadingBubble");
16171
+ w([x("object")], _.prototype, "errorMessages");
16172
+ w([x("object")], _.prototype, "messageStyles");
16173
+ w([x("object")], _.prototype, "textToSpeech");
16174
+ w([x("object")], _.prototype, "speechToText");
16175
+ w([x("object")], _.prototype, "images");
16176
+ w([x("object")], _.prototype, "gifs");
16177
+ w([x("object")], _.prototype, "camera");
16178
+ w([x("object")], _.prototype, "audio");
16179
+ w([x("object")], _.prototype, "microphone");
16180
+ w([x("object")], _.prototype, "mixedFiles");
16181
+ w([x("object")], _.prototype, "dragAndDrop");
16182
+ w([x("object")], _.prototype, "introPanelStyle");
16183
+ w([x("object")], _.prototype, "htmlClassUtilities");
16184
+ w([x("object")], _.prototype, "remarkable");
16185
+ w([x("object")], _.prototype, "focusMode");
16186
+ w([x("function")], _.prototype, "onMessage");
16187
+ w([x("function")], _.prototype, "onClearMessages");
16188
+ w([x("function")], _.prototype, "onComponentRender");
16189
+ w([x("function")], _.prototype, "onInput");
16190
+ w([x("function")], _.prototype, "onError");
16191
+ w([x("object")], _.prototype, "demo");
16192
+ w([x("object")], _.prototype, "_insertKeyViewStyles");
16132
16193
  customElements.define("deep-chat", _);
16133
16194
  export { _ as DeepChat };