deep-chat-dev 9.0.205 → 9.0.207

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
@@ -191,7 +191,10 @@ var ft = /*#__PURE__*/function () {
191
191
  ft.DEFAULT_COMPONENT_STYLE = {
192
192
  height: "350px",
193
193
  width: "320px",
194
- border: "1px solid #cacaca",
194
+ borderTop: "1px solid #cacaca",
195
+ borderRight: "1px solid #cacaca",
196
+ borderLeft: "1px solid #cacaca",
197
+ borderBottom: "1px solid #cacaca",
195
198
  fontFamily: ui.DEFAULT_FONT_FAMILY,
196
199
  fontSize: "0.9rem",
197
200
  backgroundColor: "white",
@@ -533,7 +536,7 @@ var pt = /*#__PURE__*/function () {
533
536
  }]);
534
537
  }();
535
538
  pt.BUBBLE_CLASS = "deep-chat-loading-message-bubble", pt.DOTS_CONTAINER_CLASS = "deep-chat-loading-message-dots-container";
536
- var Le = pt;
539
+ var Pe = pt;
537
540
  var le = /*#__PURE__*/function () {
538
541
  function le() {
539
542
  _classCallCheck(this, le);
@@ -774,11 +777,11 @@ var Dn = "deep-chat-temporary-message",
774
777
  }
775
778
  },
776
779
  js = Object.keys(ls);
777
- var Pe = /*#__PURE__*/function () {
778
- function Pe() {
779
- _classCallCheck(this, Pe);
780
+ var Oe = /*#__PURE__*/function () {
781
+ function Oe() {
782
+ _classCallCheck(this, Oe);
780
783
  }
781
- return _createClass(Pe, null, [{
784
+ return _createClass(Oe, null, [{
782
785
  key: "applySuggestionEvent",
783
786
  value: function applySuggestionEvent(e, t) {
784
787
  setTimeout(function () {
@@ -833,13 +836,13 @@ var Pe = /*#__PURE__*/function () {
833
836
  js.forEach(function (r) {
834
837
  var o = i.getElementsByClassName(r);
835
838
  Array.from(o || []).forEach(function (a) {
836
- var l = Pe.getProcessedStyles(t, a, r);
837
- ie.applyStylesToElement(a, l), Pe.applyEvents(a, r);
839
+ var l = Oe.getProcessedStyles(t, a, r);
840
+ ie.applyStylesToElement(a, l), Oe.applyEvents(a, r);
838
841
  });
839
842
  });
840
843
  var s = i.getElementsByClassName(Bn);
841
844
  Array.from(s).forEach(function (r) {
842
- return Pe.applySuggestionEvent(e, r);
845
+ return Oe.applySuggestionEvent(e, r);
843
846
  });
844
847
  }
845
848
  }]);
@@ -867,7 +870,7 @@ var ie = /*#__PURE__*/function () {
867
870
  value: function applyClassUtilitiesToElement(e, t) {
868
871
  var i = t.events,
869
872
  s = t.styles;
870
- i && ie.applyEventsToElement(e, i), s && !Pe.doesElementContainDeepChatClass(e) && ie.applyStylesToElement(e, s);
873
+ i && ie.applyEventsToElement(e, i), s && !Oe.doesElementContainDeepChatClass(e) && ie.applyStylesToElement(e, s);
871
874
  }
872
875
  }, {
873
876
  key: "applyCustomClassUtilities",
@@ -882,7 +885,7 @@ var ie = /*#__PURE__*/function () {
882
885
  }, {
883
886
  key: "apply",
884
887
  value: function apply(e, t) {
885
- Pe.applyDeepChatUtilities(e, e.htmlClassUtilities, t), ie.applyCustomClassUtilities(e.htmlClassUtilities, t);
888
+ Oe.applyDeepChatUtilities(e, e.htmlClassUtilities, t), ie.applyCustomClassUtilities(e.htmlClassUtilities, t);
886
889
  }
887
890
  }, {
888
891
  key: "traverseNodes",
@@ -902,11 +905,11 @@ var ie = /*#__PURE__*/function () {
902
905
  }
903
906
  }]);
904
907
  }();
905
- var Ce = /*#__PURE__*/function () {
906
- function Ce() {
907
- _classCallCheck(this, Ce);
908
+ var Te = /*#__PURE__*/function () {
909
+ function Te() {
910
+ _classCallCheck(this, Te);
908
911
  }
909
- return _createClass(Ce, null, [{
912
+ return _createClass(Te, null, [{
910
913
  key: "addElement",
911
914
  value: function addElement(e, t) {
912
915
  e.elementRef.appendChild(t), e.elementRef.scrollTop = e.elementRef.scrollHeight;
@@ -915,7 +918,7 @@ var Ce = /*#__PURE__*/function () {
915
918
  key: "createElements",
916
919
  value: function createElements(e, t, i, s) {
917
920
  var r = e.createMessageElementsOnOrientation("", i, s);
918
- return r.bubbleElement.classList.add(Ce.HTML_BUBBLE_CLASS), r.bubbleElement.innerHTML = t, r;
921
+ return r.bubbleElement.classList.add(Te.HTML_BUBBLE_CLASS), r.bubbleElement.innerHTML = t, r;
919
922
  }
920
923
  }, {
921
924
  key: "overwriteElements",
@@ -927,15 +930,15 @@ var Ce = /*#__PURE__*/function () {
927
930
  key: "overwrite",
928
931
  value: function overwrite(e, t, i, s) {
929
932
  var r = e.messageToElements,
930
- o = b.overwriteMessage(r, s, t, i, "html", Ce.HTML_BUBBLE_CLASS);
931
- return o && Ce.overwriteElements(e, t, o), o;
933
+ o = b.overwriteMessage(r, s, t, i, "html", Te.HTML_BUBBLE_CLASS);
934
+ return o && Te.overwriteElements(e, t, o), o;
932
935
  }
933
936
  }, {
934
937
  key: "create",
935
938
  value: function create(e, t, i) {
936
939
  var s = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
937
940
  var o;
938
- var r = Ce.createElements(e, t, i, s);
941
+ var r = Te.createElements(e, t, i, s);
939
942
  return b.fillEmptyMessageElement(r.bubbleElement, t), ie.apply(e, r.outerContainer), ne.flagHTMLUpdateClass(r.bubbleElement), e.applyCustomStyles(r, i, !1, (o = e.messageStyles) == null ? void 0 : o.html), r;
940
943
  }
941
944
  // prettier-ignore
@@ -948,13 +951,13 @@ var Ce = /*#__PURE__*/function () {
948
951
  if (l) return l;
949
952
  r.status = !1;
950
953
  }
951
- var a = Ce.create(e, t, i, o);
952
- return o || Ce.addElement(e, a.outerContainer), a;
954
+ var a = Te.create(e, t, i, o);
955
+ return o || Te.addElement(e, a.outerContainer), a;
953
956
  }
954
957
  }]);
955
958
  }();
956
- Ce.HTML_BUBBLE_CLASS = "html-message";
957
- var Ee = Ce;
959
+ Te.HTML_BUBBLE_CLASS = "html-message";
960
+ var Ee = Te;
958
961
  var oi;
959
962
  function bn(n) {
960
963
  return oi = oi || document.createElement("textarea"), oi.innerHTML = "&" + n + ";", oi.value;
@@ -2793,34 +2796,34 @@ var go = {
2793
2796
  function Tn(n, e, t) {
2794
2797
  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;
2795
2798
  }
2796
- function Oe(n, e) {
2799
+ function Se(n, e) {
2797
2800
  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 Bi(), this.block = new As(), this.core = new wn(), this.renderer = new Ts(), this.ruler = new re(), this.options = {}, this.configure(yo[n]), this.set(e || {});
2798
2801
  }
2799
- Oe.prototype.set = function (n) {
2802
+ Se.prototype.set = function (n) {
2800
2803
  vn(this.options, n);
2801
2804
  };
2802
- Oe.prototype.configure = function (n) {
2805
+ Se.prototype.configure = function (n) {
2803
2806
  var e = this;
2804
2807
  if (!n) throw new Error("Wrong `remarkable` preset, check name/content");
2805
2808
  n.options && e.set(n.options), n.components && Object.keys(n.components).forEach(function (t) {
2806
2809
  n.components[t].rules && e[t].ruler.enable(n.components[t].rules, !0);
2807
2810
  });
2808
2811
  };
2809
- Oe.prototype.use = function (n, e) {
2812
+ Se.prototype.use = function (n, e) {
2810
2813
  return n(this, e), this;
2811
2814
  };
2812
- Oe.prototype.parse = function (n, e) {
2815
+ Se.prototype.parse = function (n, e) {
2813
2816
  var t = new Tn(this, n, e);
2814
2817
  return this.core.process(t), t.tokens;
2815
2818
  };
2816
- Oe.prototype.render = function (n, e) {
2819
+ Se.prototype.render = function (n, e) {
2817
2820
  return e = e || {}, this.renderer.render(this.parse(n, e), this.options, e);
2818
2821
  };
2819
- Oe.prototype.parseInline = function (n, e) {
2822
+ Se.prototype.parseInline = function (n, e) {
2820
2823
  var t = new Tn(this, n, e);
2821
2824
  return t.inlineMode = !0, this.core.process(t), t.tokens;
2822
2825
  };
2823
- Oe.prototype.renderInline = function (n, e) {
2826
+ Se.prototype.renderInline = function (n, e) {
2824
2827
  return e = e || {}, this.renderer.render(this.parseInline(n, e), this.options, e);
2825
2828
  };
2826
2829
  var zt = /*#__PURE__*/function () {
@@ -2829,35 +2832,38 @@ var zt = /*#__PURE__*/function () {
2829
2832
  }
2830
2833
  return _createClass(zt, null, [{
2831
2834
  key: "instantiate",
2832
- value: function instantiate() {
2833
- var e = window.hljs;
2834
- return e ? new Oe({
2835
- highlight: function highlight(t, i) {
2836
- if (i && e.getLanguage(i)) try {
2837
- return e.highlight(i, t).value;
2838
- } catch (_unused4) {
2839
- console.error("failed to setup the highlight dependency");
2840
- }
2841
- try {
2842
- return e.highlightAuto(t).value;
2843
- } catch (_unused5) {
2844
- console.error("failed to automatically highlight messages");
2845
- }
2846
- return "";
2847
- },
2848
- html: !1,
2849
- // Enable HTML tags in source
2850
- xhtmlOut: !1,
2851
- // Use '/' to close single tags (<br />)
2852
- breaks: !0,
2853
- // Convert '\n' in paragraphs into <br>
2854
- langPrefix: "language-",
2855
- // CSS language prefix for fenced blocks
2856
- linkTarget: "_blank",
2857
- // set target to open in a new tab
2858
- typographer: !0
2859
- // Enable smartypants and other sweet transforms
2860
- }) : new Oe({
2835
+ value: function instantiate(e) {
2836
+ if (e) return new Se(e);
2837
+ if (window.hljs) {
2838
+ var t = window.hljs;
2839
+ return new Se({
2840
+ highlight: function highlight(i, s) {
2841
+ if (s && t.getLanguage(s)) try {
2842
+ return t.highlight(s, i).value;
2843
+ } catch (_unused4) {
2844
+ console.error("failed to setup the highlight dependency");
2845
+ }
2846
+ try {
2847
+ return t.highlightAuto(i).value;
2848
+ } catch (_unused5) {
2849
+ console.error("failed to automatically highlight messages");
2850
+ }
2851
+ return "";
2852
+ },
2853
+ html: !1,
2854
+ // Enable HTML tags in source
2855
+ xhtmlOut: !1,
2856
+ // Use '/' to close single tags (<br />)
2857
+ breaks: !0,
2858
+ // Convert '\n' in paragraphs into <br>
2859
+ langPrefix: "language-",
2860
+ // CSS language prefix for fenced blocks
2861
+ linkTarget: "_blank",
2862
+ // set target to open in a new tab
2863
+ typographer: !0
2864
+ // Enable smartypants and other sweet transforms
2865
+ });
2866
+ } else return new Se({
2861
2867
  breaks: !0,
2862
2868
  linkTarget: "_blank"
2863
2869
  // set target to open in a new tab
@@ -2865,11 +2871,11 @@ var zt = /*#__PURE__*/function () {
2865
2871
  }
2866
2872
  }, {
2867
2873
  key: "createNew",
2868
- value: function createNew() {
2869
- var e = zt.instantiate();
2870
- return e.inline.validateLink = function () {
2874
+ value: function createNew(e) {
2875
+ var t = zt.instantiate(e);
2876
+ return t.inline.validateLink = function () {
2871
2877
  return !0;
2872
- }, e;
2878
+ }, t;
2873
2879
  }
2874
2880
  }]);
2875
2881
  }();
@@ -2976,7 +2982,7 @@ var F = /*#__PURE__*/function () {
2976
2982
  }, {
2977
2983
  key: "apply",
2978
2984
  value: function apply(e, t, i) {
2979
- Le.setRing(t.bubbleElement, i == null ? void 0 : i.bubble), i != null && i.bubble && (i = JSON.parse(JSON.stringify(i)), delete i.bubble), e.applyCustomStyles(t, "history", !1, i);
2985
+ Pe.setRing(t.bubbleElement, i == null ? void 0 : i.bubble), i != null && i.bubble && (i = JSON.parse(JSON.stringify(i)), delete i.bubble), e.applyCustomStyles(t, "history", !1, i);
2980
2986
  }
2981
2987
  }, {
2982
2988
  key: "addLoadHistoryMessage",
@@ -3022,15 +3028,15 @@ var F = /*#__PURE__*/function () {
3022
3028
  }();
3023
3029
  F.CLASS = "loading-history-message", F.FULL_VIEW_CLASS = "loading-history-message-full-view", F.SMALL_CLASS = "loading-history-message-small";
3024
3030
  var et = F;
3025
- var Te = /*#__PURE__*/function () {
3026
- function Te(e) {
3031
+ var Ae = /*#__PURE__*/function () {
3032
+ function Ae(e) {
3027
3033
  var _this3 = this;
3028
- _classCallCheck(this, Te);
3029
- this.messageElementRefs = [], this.htmlClassUtilities = {}, this.messageToElements = [], this.elementRef = Te.createContainerElement(), this.messageStyles = ne.processMessageStyles(e.messageStyles), this._remarkable = zt.createNew(), this._avatars = e.avatars, this._names = e.names, this._onMessage = pi.onMessage.bind(this, e), e.htmlClassUtilities && (this.htmlClassUtilities = e.htmlClassUtilities), setTimeout(function () {
3034
+ _classCallCheck(this, Ae);
3035
+ this.messageElementRefs = [], this.htmlClassUtilities = {}, this.messageToElements = [], this.elementRef = Ae.createContainerElement(), this.messageStyles = ne.processMessageStyles(e.messageStyles), this._remarkable = zt.createNew(e.remarkable), this._avatars = e.avatars, this._names = e.names, this._onMessage = pi.onMessage.bind(this, e), e.htmlClassUtilities && (this.htmlClassUtilities = e.htmlClassUtilities), setTimeout(function () {
3030
3036
  _this3.submitUserMessage = e.submitUserMessage;
3031
3037
  });
3032
3038
  }
3033
- return _createClass(Te, [{
3039
+ return _createClass(Ae, [{
3034
3040
  key: "addNewTextMessage",
3035
3041
  value: function addNewTextMessage(e, t, i) {
3036
3042
  var s = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
@@ -3040,13 +3046,13 @@ var Te = /*#__PURE__*/function () {
3040
3046
  i.status = !1;
3041
3047
  }
3042
3048
  var r = s ? this.createAndPrependNewMessageElement(e, t, s) : this.createAndAppendNewMessageElement(e, t);
3043
- return r.bubbleElement.classList.add(Te.TEXT_BUBBLE_CLASS), this.applyCustomStyles(r, t, !1), b.fillEmptyMessageElement(r.bubbleElement, e), r;
3049
+ return r.bubbleElement.classList.add(Ae.TEXT_BUBBLE_CLASS), this.applyCustomStyles(r, t, !1), b.fillEmptyMessageElement(r.bubbleElement, e), r;
3044
3050
  }
3045
3051
  // prettier-ignore
3046
3052
  }, {
3047
3053
  key: "overwriteText",
3048
3054
  value: function overwriteText(e, t, i) {
3049
- var s = b.overwriteMessage(this.messageToElements, i, t, e, "text", Te.TEXT_BUBBLE_CLASS);
3055
+ var s = b.overwriteMessage(this.messageToElements, i, t, e, "text", Ae.TEXT_BUBBLE_CLASS);
3050
3056
  return s && this.renderText(s.bubbleElement, t), s;
3051
3057
  }
3052
3058
  }, {
@@ -3082,7 +3088,7 @@ var Te = /*#__PURE__*/function () {
3082
3088
  var r;
3083
3089
  (r = this._introPanel) == null || r.hide();
3084
3090
  var s = this.messageElementRefs[this.messageElementRefs.length - 1];
3085
- return et.changeFullViewToSmall(this, s), Te.isTemporaryElement(s) && (this.revealRoleElementsIfTempRemoved(s, t), s.outerContainer.remove(), this.messageElementRefs.pop()), this.createMessageElements(e, t, i);
3091
+ return et.changeFullViewToSmall(this, s), Ae.isTemporaryElement(s) && (this.revealRoleElementsIfTempRemoved(s, t), s.outerContainer.remove(), this.messageElementRefs.pop()), this.createMessageElements(e, t, i);
3086
3092
  }
3087
3093
  // this can be tested by having an ai message, then a temp ai message with html that submits new user message:
3088
3094
  // https://github.com/OvidijusParsiunas/deep-chat/issues/258
@@ -3090,7 +3096,7 @@ var Te = /*#__PURE__*/function () {
3090
3096
  }, {
3091
3097
  key: "revealRoleElementsIfTempRemoved",
3092
3098
  value: function revealRoleElementsIfTempRemoved(e, t) {
3093
- if ((this._avatars || this._names) && Pe.isElementTemporary(e)) {
3099
+ if ((this._avatars || this._names) && Oe.isElementTemporary(e)) {
3094
3100
  var i = this.messageElementRefs[this.messageElementRefs.length - 2];
3095
3101
  i && this.messageToElements.length > 0 && !e.bubbleElement.classList.contains(b.getRoleClass(t)) && b.revealRoleElements(i.innerContainer, this._avatars, this._names);
3096
3102
  }
@@ -3098,7 +3104,7 @@ var Te = /*#__PURE__*/function () {
3098
3104
  }, {
3099
3105
  key: "createElements",
3100
3106
  value: function createElements(e, t) {
3101
- var i = Te.createBaseElements(t),
3107
+ var i = Ae.createBaseElements(t),
3102
3108
  s = i.outerContainer,
3103
3109
  r = i.innerContainer,
3104
3110
  o = i.bubbleElement;
@@ -3162,10 +3168,10 @@ var Te = /*#__PURE__*/function () {
3162
3168
  // this is mostly used for enabling highlight.js to highlight code if it downloads later
3163
3169
  }, {
3164
3170
  key: "refreshTextMessages",
3165
- value: function refreshTextMessages() {
3171
+ value: function refreshTextMessages(e) {
3166
3172
  var _this5 = this;
3167
- this._remarkable = zt.createNew(), this.messageToElements.forEach(function (e) {
3168
- e[1].text && e[0].text && _this5.renderText(e[1].text.bubbleElement, e[0].text);
3173
+ this._remarkable = zt.createNew(e), this.messageToElements.forEach(function (t) {
3174
+ t[1].text && t[0].text && _this5.renderText(t[1].text.bubbleElement, t[0].text);
3169
3175
  });
3170
3176
  }
3171
3177
  }], [{
@@ -3177,7 +3183,7 @@ var Te = /*#__PURE__*/function () {
3177
3183
  }, {
3178
3184
  key: "isTemporaryElement",
3179
3185
  value: function isTemporaryElement(e) {
3180
- return Te.isLoadingMessage(e) || Pe.isElementTemporary(e);
3186
+ return Ae.isLoadingMessage(e) || Oe.isElementTemporary(e);
3181
3187
  }
3182
3188
  }, {
3183
3189
  key: "createBaseElements",
@@ -3208,12 +3214,12 @@ var Te = /*#__PURE__*/function () {
3208
3214
  }, {
3209
3215
  key: "isLoadingMessage",
3210
3216
  value: function isLoadingMessage(e) {
3211
- return e == null ? void 0 : e.bubbleElement.classList.contains(Le.BUBBLE_CLASS);
3217
+ return e == null ? void 0 : e.bubbleElement.classList.contains(Pe.BUBBLE_CLASS);
3212
3218
  }
3213
3219
  }]);
3214
3220
  }();
3215
- Te.TEXT_BUBBLE_CLASS = "text-message";
3216
- var wt = Te;
3221
+ Ae.TEXT_BUBBLE_CLASS = "text-message";
3222
+ var wt = Ae;
3217
3223
  var Eo = "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",
3218
3224
  So = "data:image/png;base64,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",
3219
3225
  Q = /*#__PURE__*/function () {
@@ -3373,7 +3379,7 @@ var w = /*#__PURE__*/function () {
3373
3379
  }, {
3374
3380
  key: "overwriteMessage",
3375
3381
  value: function overwriteMessage(e, t, i, s, r, o) {
3376
- var a = w.getLastElementsByClass(t, [w.getRoleClass(s), o], [Le.BUBBLE_CLASS]),
3382
+ var a = w.getLastElementsByClass(t, [w.getRoleClass(s), o], [Pe.BUBBLE_CLASS]),
3377
3383
  l = w.getLastMessage(e, s, r);
3378
3384
  return l && (l[r] = i), a;
3379
3385
  }
@@ -3587,7 +3593,7 @@ var mt = /*#__PURE__*/function () {
3587
3593
  }]);
3588
3594
  }();
3589
3595
  mt.MESSAGE_CLASS = "streamed-message";
3590
- var Se = mt;
3596
+ var xe = mt;
3591
3597
  var Ke = /*#__PURE__*/function () {
3592
3598
  function Ke() {
3593
3599
  _classCallCheck(this, Ke);
@@ -3966,15 +3972,15 @@ var A = /*#__PURE__*/function () {
3966
3972
  _context7.next = 17;
3967
3973
  break;
3968
3974
  }
3969
- return _context7.abrupt("return", Re.stream(e, a, i));
3975
+ return _context7.abrupt("return", Ie.stream(e, a, i));
3970
3976
  case 17:
3971
- if (!(((y = e.connectSettings) == null ? void 0 : y.url) === xe.URL)) {
3977
+ if (!(((y = e.connectSettings) == null ? void 0 : y.url) === _e.URL)) {
3972
3978
  _context7.next = 19;
3973
3979
  break;
3974
3980
  }
3975
- return _context7.abrupt("return", xe.requestStream(i, e.streamHandlers));
3981
+ return _context7.abrupt("return", _e.requestStream(i, e.streamHandlers));
3976
3982
  case 19:
3977
- f = new Se(i), m = E.fetch.bind(this, e, l, s);
3983
+ f = new xe(i), m = E.fetch.bind(this, e, l, s);
3978
3984
  return _context7.abrupt("return", (ko(((P = e.connectSettings) == null ? void 0 : P.url) || e.url || "", {
3979
3985
  method: ((V = e.connectSettings) == null ? void 0 : V.method) || "POST",
3980
3986
  headers: l,
@@ -4082,12 +4088,12 @@ var A = /*#__PURE__*/function () {
4082
4088
  }, i), !1), i.text) {
4083
4089
  t.onOpen();
4084
4090
  var r = i.text.split("");
4085
- A.populateMessages(r, new Se(e), s, "text");
4091
+ A.populateMessages(r, new xe(e), s, "text");
4086
4092
  }
4087
4093
  if (i.html) {
4088
4094
  t.onOpen();
4089
4095
  var _r2 = ie.splitHTML(i.html);
4090
- _r2.length === 0 && (_r2 = i.html.split("")), A.populateMessages(_r2, new Se(e), s, "html");
4096
+ _r2.length === 0 && (_r2 = i.html.split("")), A.populateMessages(_r2, new xe(e), s, "html");
4091
4097
  }
4092
4098
  }
4093
4099
  // prettier-ignore
@@ -4209,7 +4215,7 @@ var Je = /*#__PURE__*/function () {
4209
4215
  }]);
4210
4216
  }();
4211
4217
  Je.URL = "deep-chat-demo";
4212
- var xe = Je;
4218
+ var _e = Je;
4213
4219
  var U = /*#__PURE__*/function () {
4214
4220
  function U() {
4215
4221
  _classCallCheck(this, U);
@@ -4217,7 +4223,7 @@ var U = /*#__PURE__*/function () {
4217
4223
  return _createClass(U, null, [{
4218
4224
  key: "setup",
4219
4225
  value: function setup(e) {
4220
- e.connectSettings.url !== xe.URL && (e.permittedErrorPrefixes = ["Connection error", "Error in server message"], e.websocket = "pending");
4226
+ e.connectSettings.url !== _e.URL && (e.permittedErrorPrefixes = ["Connection error", "Error in server message"], e.websocket = "pending");
4221
4227
  }
4222
4228
  }, {
4223
4229
  key: "isElementPresentInDOM",
@@ -4232,7 +4238,7 @@ var U = /*#__PURE__*/function () {
4232
4238
  if (!U.isElementPresentInDOM(e.deepChat)) return;
4233
4239
  var i = e.connectSettings.websocket;
4234
4240
  if (i) {
4235
- if (e.connectSettings.handler) return Re.websocket(e, t);
4241
+ if (e.connectSettings.handler) return Ie.websocket(e, t);
4236
4242
  try {
4237
4243
  var s = typeof i != "boolean" ? i : void 0,
4238
4244
  r = new WebSocket(e.connectSettings.url || "", s);
@@ -4364,11 +4370,11 @@ var U = /*#__PURE__*/function () {
4364
4370
  return _context10.abrupt("return", r.newUserMessage.listener(a));
4365
4371
  case 14:
4366
4372
  c = s ? JSON.stringify(a) : a;
4367
- if (!(((h = e.connectSettings) == null ? void 0 : h.url) === xe.URL)) {
4373
+ if (!(((h = e.connectSettings) == null ? void 0 : h.url) === _e.URL)) {
4368
4374
  _context10.next = 17;
4369
4375
  break;
4370
4376
  }
4371
- return _context10.abrupt("return", xe.request(e, i));
4377
+ return _context10.abrupt("return", _e.request(e, i));
4372
4378
  case 17:
4373
4379
  r.readyState === void 0 || r.readyState !== r.OPEN ? (console.error("Connection is not open"), i.isLastMessageError() || i.addNewErrorMessage("service", "Connection error")) : (r.send(JSON.stringify(c)), e.completionsHandlers.onFinish());
4374
4380
  case 18:
@@ -4402,16 +4408,16 @@ var U = /*#__PURE__*/function () {
4402
4408
  var _i$o;
4403
4409
  var o = s.role || b.AI_ROLE,
4404
4410
  a = i[o];
4405
- 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 Se(t), i[o].upsertStreamedMessage(s));
4411
+ 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 xe(t), i[o].upsertStreamedMessage(s));
4406
4412
  } else A.simulate(t, e.streamHandlers, s);
4407
4413
  }
4408
4414
  }]);
4409
4415
  }();
4410
- var Re = /*#__PURE__*/function () {
4411
- function Re() {
4412
- _classCallCheck(this, Re);
4416
+ var Ie = /*#__PURE__*/function () {
4417
+ function Ie() {
4418
+ _classCallCheck(this, Ie);
4413
4419
  }
4414
- return _createClass(Re, null, [{
4420
+ return _createClass(Ie, null, [{
4415
4421
  key: "request",
4416
4422
  value: function () {
4417
4423
  var _request2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee12(e, t, i) {
@@ -4454,7 +4460,7 @@ var Re = /*#__PURE__*/function () {
4454
4460
  return function r(_x24) {
4455
4461
  return _ref6.apply(this, arguments);
4456
4462
  };
4457
- }(), o = Re.generateOptionalSignals();
4463
+ }(), o = Ie.generateOptionalSignals();
4458
4464
  (l = (a = e.connectSettings).handler) == null || l.call(a, t, _objectSpread(_objectSpread({}, o), {}, {
4459
4465
  onResponse: r
4460
4466
  }));
@@ -4486,12 +4492,12 @@ var Re = /*#__PURE__*/function () {
4486
4492
  var h, u;
4487
4493
  var s = !0,
4488
4494
  r = !1;
4489
- var o = new Se(i),
4495
+ var o = new xe(i),
4490
4496
  a = function a() {
4491
4497
  r || !s || (e.streamHandlers.onOpen(), r = !0);
4492
4498
  },
4493
4499
  l = function l() {
4494
- s && (Re.attemptToFinaliseStream(o, i), e.streamHandlers.onClose(), s = !1);
4500
+ s && (Ie.attemptToFinaliseStream(o, i), e.streamHandlers.onClose(), s = !1);
4495
4501
  },
4496
4502
  c = /*#__PURE__*/function () {
4497
4503
  var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee13(f) {
@@ -4528,9 +4534,9 @@ var Re = /*#__PURE__*/function () {
4528
4534
  };
4529
4535
  }();
4530
4536
  e.streamHandlers.abortStream.abort = function () {
4531
- Re.attemptToFinaliseStream(o, i), e.streamHandlers.onClose(), s = !1;
4537
+ Ie.attemptToFinaliseStream(o, i), e.streamHandlers.onClose(), s = !1;
4532
4538
  };
4533
- var d = Re.generateOptionalSignals();
4539
+ var d = Ie.generateOptionalSignals();
4534
4540
  (u = (h = e.connectSettings).handler) == null || u.call(h, t, _objectSpread(_objectSpread({}, d), {}, {
4535
4541
  onOpen: a,
4536
4542
  onResponse: c,
@@ -4595,7 +4601,7 @@ var Re = /*#__PURE__*/function () {
4595
4601
  return _ref8.apply(this, arguments);
4596
4602
  };
4597
4603
  }(),
4598
- a = Re.generateOptionalSignals();
4604
+ a = Ie.generateOptionalSignals();
4599
4605
  (c = (l = e.connectSettings).handler) == null || c.call(l, void 0, _objectSpread(_objectSpread({}, a), {}, {
4600
4606
  onOpen: s,
4601
4607
  onResponse: o,
@@ -4667,13 +4673,13 @@ var T = /*#__PURE__*/function () {
4667
4673
  _context16.next = 13;
4668
4674
  break;
4669
4675
  }
4670
- return _context16.abrupt("return", Re.request(e, o, i));
4676
+ return _context16.abrupt("return", Ie.request(e, o, i));
4671
4677
  case 13:
4672
- if (!(((m = e.connectSettings) == null ? void 0 : m.url) === xe.URL)) {
4678
+ if (!(((m = e.connectSettings) == null ? void 0 : m.url) === _e.URL)) {
4673
4679
  _context16.next = 15;
4674
4680
  break;
4675
4681
  }
4676
- return _context16.abrupt("return", xe.request(e, i));
4682
+ return _context16.abrupt("return", _e.request(e, i));
4677
4683
  case 15:
4678
4684
  d = !0;
4679
4685
  h = E.fetch.bind(this, e, a, s);
@@ -5205,7 +5211,7 @@ var O = /*#__PURE__*/function () {
5205
5211
  key: "set",
5206
5212
  value: function set(e, t, i) {
5207
5213
  O.populateDefaultFileIO(i == null ? void 0 : i.audio, ".4a,.mp3,.webm,.mp4,.mpga,.wav,.mpeg,.m4a"), O.populateDefaultFileIO(i == null ? void 0 : i.images, ".png,.jpg");
5208
- var s = zt.createNew();
5214
+ var s = zt.createNew(e.remarkable);
5209
5215
  O.processImagesConfig(t, s, e.images, i == null ? void 0 : i.images), O.processCamera(t, s, e.camera, e.images), O.processGifConfig(t, s, e.gifs, i == null ? void 0 : i.gifs), O.processAudioConfig(t, s, e.audio, i == null ? void 0 : i.audio), O.processMicrophone(t, s, e.microphone, e.audio), O.processMixedFiles(t, s, e.mixedFiles);
5210
5216
  }
5211
5217
  }]);
@@ -5215,7 +5221,7 @@ var st = /*#__PURE__*/function () {
5215
5221
  var _a$url;
5216
5222
  _classCallCheck(this, st);
5217
5223
  var s, r, o, a, l;
5218
- this.rawBody = {}, this.validateKeyProperty = !1, this.canSendMessage = st.canSendMessage, this.connectSettings = {}, this.fileTypes = {}, this.completionsHandlers = {}, this.streamHandlers = {}, this.deepChat = e, this.demo = i, Object.assign(this.rawBody, (s = e.connect) == null ? void 0 : s.additionalBodyProps), this.totalMessagesMaxCharLength = (r = e == null ? void 0 : e.requestBodyLimits) == null ? void 0 : r.totalMessagesMaxCharLength, this.maxMessages = (o = e == null ? void 0 : e.requestBodyLimits) == null ? void 0 : o.maxMessages, O.set(e, this, t), e.connect && (this.connectSettings = e.connect), this.demo && ((_a$url = (a = this.connectSettings).url) !== null && _a$url !== void 0 ? _a$url : a.url = xe.URL), this.connectSettings.websocket && U.setup(this), this.stream = ((l = this.deepChat.connect) == null ? void 0 : l.stream) || ne.checkForStream(this.deepChat), e.loadHistory && Gt.addErrorPrefix(this);
5224
+ this.rawBody = {}, this.validateKeyProperty = !1, this.canSendMessage = st.canSendMessage, this.connectSettings = {}, this.fileTypes = {}, this.completionsHandlers = {}, this.streamHandlers = {}, this.deepChat = e, this.demo = i, Object.assign(this.rawBody, (s = e.connect) == null ? void 0 : s.additionalBodyProps), this.totalMessagesMaxCharLength = (r = e == null ? void 0 : e.requestBodyLimits) == null ? void 0 : r.totalMessagesMaxCharLength, this.maxMessages = (o = e == null ? void 0 : e.requestBodyLimits) == null ? void 0 : o.maxMessages, O.set(e, this, t), e.connect && (this.connectSettings = e.connect), this.demo && ((_a$url = (a = this.connectSettings).url) !== null && _a$url !== void 0 ? _a$url : a.url = _e.URL), this.connectSettings.websocket && U.setup(this), this.stream = ((l = this.deepChat.connect) == null ? void 0 : l.stream) || ne.checkForStream(this.deepChat), e.loadHistory && Gt.addErrorPrefix(this);
5219
5225
  }
5220
5226
  return _createClass(st, [{
5221
5227
  key: "verifyKey",
@@ -5495,19 +5501,19 @@ var mi = /*#__PURE__*/function () {
5495
5501
  }
5496
5502
  }]);
5497
5503
  }();
5498
- var Ae = /*#__PURE__*/function (_HTMLElement) {
5504
+ var ke = /*#__PURE__*/function (_HTMLElement) {
5499
5505
  // If this is not working, try using propertyName directly
5500
- function Ae() {
5506
+ function ke() {
5501
5507
  var _this14;
5502
- _classCallCheck(this, Ae);
5503
- _this14 = _callSuper(this, Ae), _this14._waitingToRender_ = !1, _this14._propUpdated_ = !1, Object.keys(Ae._attributeToProperty_).forEach(function (e) {
5504
- var t = Ae._attributeToProperty_[e];
5508
+ _classCallCheck(this, ke);
5509
+ _this14 = _callSuper(this, ke), _this14._waitingToRender_ = !1, _this14._propUpdated_ = !1, Object.keys(ke._attributeToProperty_).forEach(function (e) {
5510
+ var t = ke._attributeToProperty_[e];
5505
5511
  _this14.constructPropertyAccessors(t), _this14.hasOwnProperty(e) || _this14.constructPropertyAccessors(t, e);
5506
5512
  });
5507
5513
  return _this14;
5508
5514
  }
5509
- _inherits(Ae, _HTMLElement);
5510
- return _createClass(Ae, [{
5515
+ _inherits(ke, _HTMLElement);
5516
+ return _createClass(ke, [{
5511
5517
  key: "constructPropertyAccessors",
5512
5518
  value:
5513
5519
  // need to be called here as accessors need to be set for the class instance
@@ -5526,10 +5532,8 @@ var Ae = /*#__PURE__*/function (_HTMLElement) {
5526
5532
  key: "attributeChangedCallback",
5527
5533
  value: function attributeChangedCallback(e, t, i) {
5528
5534
  if (t === i) return;
5529
- console.log("--------"), console.log(e), console.log(i);
5530
- var s = Ae._attributes_[e](i);
5531
- console.log(s);
5532
- var r = Ae._attributeToProperty_[e];
5535
+ var s = ke._attributes_[e](i),
5536
+ r = ke._attributeToProperty_[e];
5533
5537
  this[r] = s;
5534
5538
  }
5535
5539
  }, {
@@ -5538,12 +5542,12 @@ var Ae = /*#__PURE__*/function (_HTMLElement) {
5538
5542
  }], [{
5539
5543
  key: "observedAttributes",
5540
5544
  get: function get() {
5541
- return Object.keys(Ae._attributes_) || [];
5545
+ return Object.keys(ke._attributes_) || [];
5542
5546
  }
5543
5547
  }]);
5544
5548
  }(/*#__PURE__*/_wrapNativeSuper(HTMLElement));
5545
- Ae._attributes_ = {}, Ae._attributeToProperty_ = {};
5546
- var us = Ae;
5549
+ ke._attributes_ = {}, ke._attributeToProperty_ = {};
5550
+ var us = ke;
5547
5551
  var Ro = "<?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",
5548
5552
  Io = "<?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";
5549
5553
  var se = /*#__PURE__*/function () {
@@ -6197,7 +6201,7 @@ var Ys = {
6197
6201
  this.streamHandlers.abortStream.abort = function () {
6198
6202
  i.interruptGenerate();
6199
6203
  }, this.streamHandlers.onOpen();
6200
- s = new Se(e);
6204
+ s = new xe(e);
6201
6205
  _context36.next = 4;
6202
6206
  return i.generate(t, /*#__PURE__*/function () {
6203
6207
  var _ref14 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee35(r, o) {
@@ -6678,11 +6682,11 @@ var Po = /*#__PURE__*/function (_Yt2) {
6678
6682
  }]);
6679
6683
  }(Yt);
6680
6684
  var Qt = "data:image/png;base64,";
6681
- var _e = /*#__PURE__*/function () {
6682
- function _e() {
6683
- _classCallCheck(this, _e);
6685
+ var we = /*#__PURE__*/function () {
6686
+ function we() {
6687
+ _classCallCheck(this, we);
6684
6688
  }
6685
- return _createClass(_e, null, [{
6689
+ return _createClass(we, null, [{
6686
6690
  key: "buildHeaders",
6687
6691
  value: function buildHeaders(e) {
6688
6692
  return {
@@ -6702,7 +6706,7 @@ var _e = /*#__PURE__*/function () {
6702
6706
  return {
6703
6707
  url: "https://api.stability.ai/v1/engines/list",
6704
6708
  method: "GET",
6705
- handleVerificationResult: _e.handleVerificationResult
6709
+ handleVerificationResult: we.handleVerificationResult
6706
6710
  };
6707
6711
  }
6708
6712
  }]);
@@ -6733,7 +6737,7 @@ var vi = /*#__PURE__*/function (_Fi) {
6733
6737
  }
6734
6738
  }
6735
6739
  };
6736
- _this24 = _callSuper(this, vi, [e, _e.buildKeyVerificationDetails(), _e.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>";
6740
+ _this24 = _callSuper(this, vi, [e, we.buildKeyVerificationDetails(), we.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>";
6737
6741
  var r = (o = t == null ? void 0 : t.stabilityAI) == null ? void 0 : o.imageToImageUpscale;
6738
6742
  _typeof(r) == "object" && (r.engine_id && (_this24.url = "https://api.stability.ai/v1/generation/".concat(r.engine_id, "/image-to-image/upscale")), vi.cleanConfig(r), Object.assign(_this24.rawBody, r)), _this24.canSendMessage = vi.canSendFileMessage;
6739
6743
  return _this24;
@@ -6840,7 +6844,7 @@ var yi = /*#__PURE__*/function (_Fi2) {
6840
6844
  }
6841
6845
  }
6842
6846
  };
6843
- _this25 = _callSuper(this, yi, [e, _e.buildKeyVerificationDetails(), _e.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>";
6847
+ _this25 = _callSuper(this, yi, [e, we.buildKeyVerificationDetails(), we.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>";
6844
6848
  var r = (o = t == null ? void 0 : t.stabilityAI) == null ? void 0 : o.imageToImageMasking;
6845
6849
  _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), yi.cleanConfig(r), Object.assign(_this25.rawBody, r)), _this25.canSendMessage = yi.canSendFileTextMessage;
6846
6850
  return _this25;
@@ -7209,7 +7213,7 @@ var Ei = /*#__PURE__*/function (_Fi3) {
7209
7213
  }
7210
7214
  }
7211
7215
  };
7212
- _this28 = _callSuper(this, Ei, [e, _e.buildKeyVerificationDetails(), _e.buildHeaders, i, s]), _this28.url = "https://api.stability.ai/v1/generation/stable-diffusion-v1-6/image-to-image", _this28.textInputPlaceholderText = "Describe image changes", _this28.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Stability AI: Image to Image</b></div>\n <p>Upload an image to create a new one with the changes you have described.</p>\n <p>Click <a href=\"https://platform.stability.ai/\">here</a> for more info.</p>";
7216
+ _this28 = _callSuper(this, Ei, [e, we.buildKeyVerificationDetails(), we.buildHeaders, i, s]), _this28.url = "https://api.stability.ai/v1/generation/stable-diffusion-v1-6/image-to-image", _this28.textInputPlaceholderText = "Describe image changes", _this28.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Stability AI: Image to Image</b></div>\n <p>Upload an image to create a new one with the changes you have described.</p>\n <p>Click <a href=\"https://platform.stability.ai/\">here</a> for more info.</p>";
7213
7217
  var r = (o = t.stabilityAI) == null ? void 0 : o.imageToImage;
7214
7218
  _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), Ei.cleanConfig(r), Object.assign(_this28.rawBody, r)), _this28.canSendMessage = Ei.canSendFileTextMessage;
7215
7219
  return _this28;
@@ -7347,7 +7351,7 @@ var Si = /*#__PURE__*/function (_Fi4) {
7347
7351
  var r;
7348
7352
  var t = JSON.parse(JSON.stringify(e.directConnection)),
7349
7353
  i = t.stabilityAI;
7350
- _this29 = _callSuper(this, Si, [e, _e.buildKeyVerificationDetails(), _e.buildHeaders, i]), _this29.url = "https://api.stability.ai/v1/generation/stable-diffusion-v1-6/text-to-image", _this29.textInputPlaceholderText = "Describe an image", _this29.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Stability AI: Text to Image</b></div>\n <p>Insert text to generate an image.</p>\n <p>Click <a href=\"https://platform.stability.ai/\">here</a> for more info.</p>";
7354
+ _this29 = _callSuper(this, Si, [e, we.buildKeyVerificationDetails(), we.buildHeaders, i]), _this29.url = "https://api.stability.ai/v1/generation/stable-diffusion-v1-6/text-to-image", _this29.textInputPlaceholderText = "Describe an image", _this29.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Stability AI: Text to Image</b></div>\n <p>Insert text to generate an image.</p>\n <p>Click <a href=\"https://platform.stability.ai/\">here</a> for more info.</p>";
7351
7355
  var s = (r = t.stabilityAI) == null ? void 0 : r.textToImage;
7352
7356
  _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), Si.cleanConfig(s), Object.assign(_this29.rawBody, s)), _this29.canSendMessage = Si.canSendTextMessage;
7353
7357
  return _this29;
@@ -7855,7 +7859,7 @@ var te = /*#__PURE__*/function () {
7855
7859
  }]);
7856
7860
  }();
7857
7861
  te.FILES_WITH_TEXT_ERROR = "content with type `text` must have `text` values", te.FUNCTION_TOOL_RESP_ERROR = "Response must contain an array of strings for each individual function/tool_call, see https://deepchat.dev/docs/directConnection/OpenAI/#assistant-functions.";
7858
- var we = te;
7862
+ var Ce = te;
7859
7863
  var Fe = /*#__PURE__*/function (_G3) {
7860
7864
  // prettier-ignore
7861
7865
  function Fe(e, t, i, s, r, o) {
@@ -8002,7 +8006,7 @@ var Fe = /*#__PURE__*/function (_G3) {
8002
8006
  break;
8003
8007
  }
8004
8008
  _context71.next = 16;
8005
- return we.storeFiles(this, e, i, this.urlSegments.storeFiles);
8009
+ return Ce.storeFiles(this, e, i, this.urlSegments.storeFiles);
8006
8010
  case 16:
8007
8011
  _context71.t1 = _context71.sent;
8008
8012
  _context71.next = 20;
@@ -8085,7 +8089,7 @@ var Fe = /*#__PURE__*/function (_G3) {
8085
8089
  _context73.next = 6;
8086
8090
  break;
8087
8091
  }
8088
- throw e.error.message.startsWith(we.FILES_WITH_TEXT_ERROR) ? Error("Please send text with your file(s)") : e.error.message;
8092
+ throw e.error.message.startsWith(Ce.FILES_WITH_TEXT_ERROR) ? Error("Please send text with your file(s)") : e.error.message;
8089
8093
  case 6:
8090
8094
  _context73.next = 8;
8091
8095
  return this.assignThreadAndRun(e);
@@ -8169,7 +8173,7 @@ var Fe = /*#__PURE__*/function (_G3) {
8169
8173
  case 9:
8170
8174
  i = _context75.sent;
8171
8175
  case 10:
8172
- return _context75.abrupt("return", we.processAPIMessages(this, i, t, this.urlSegments));
8176
+ return _context75.abrupt("return", Ce.processAPIMessages(this, i, t, this.urlSegments));
8173
8177
  case 11:
8174
8178
  case "end":
8175
8179
  return _context75.stop();
@@ -8270,7 +8274,7 @@ var Fe = /*#__PURE__*/function (_G3) {
8270
8274
  _context77.next = 8;
8271
8275
  break;
8272
8276
  }
8273
- throw Error(we.FUNCTION_TOOL_RESP_ERROR);
8277
+ throw Error(Ce.FUNCTION_TOOL_RESP_ERROR);
8274
8278
  case 8:
8275
8279
  _context77.next = 10;
8276
8280
  return Promise.all(i);
@@ -8282,7 +8286,7 @@ var Fe = /*#__PURE__*/function (_G3) {
8282
8286
  _context77.next = 13;
8283
8287
  break;
8284
8288
  }
8285
- throw Error(we.FUNCTION_TOOL_RESP_ERROR);
8289
+ throw Error(Ce.FUNCTION_TOOL_RESP_ERROR);
8286
8290
  case 13:
8287
8291
  r = s.map(function (l, c) {
8288
8292
  return {
@@ -8387,7 +8391,7 @@ var Fe = /*#__PURE__*/function (_G3) {
8387
8391
  }
8388
8392
  l = e.content.find(function (d) {
8389
8393
  return !!d.text;
8390
- }) || e.content[0], c = we.getFilesAndText.bind(this, this, {
8394
+ }) || e.content[0], c = Ce.getFilesAndText.bind(this, this, {
8391
8395
  role: "assistant",
8392
8396
  content: e.content
8393
8397
  }, this.urlSegments, l);
@@ -8411,7 +8415,7 @@ var Fe = /*#__PURE__*/function (_G3) {
8411
8415
  break;
8412
8416
  }
8413
8417
  _context79.next = 11;
8414
- return we.processStreamMessages(this, e.delta.content, this.urlSegments);
8418
+ return Ce.processStreamMessages(this, e.delta.content, this.urlSegments);
8415
8419
  case 11:
8416
8420
  _l = _context79.sent;
8417
8421
  return _context79.abrupt("return", {
@@ -10746,7 +10750,7 @@ var de = /*#__PURE__*/function (_wt) {
10746
10750
  c = _ref31[0];
10747
10751
  return c;
10748
10752
  })));
10749
- }, e.clearMessages = _this52.clearMessages.bind(_this52, t), e.refreshMessages = _this52.refreshTextMessages.bind(_this52), e.scrollToBottom = Z.scrollToBottom.bind(_this52, _this52.elementRef), e.addMessage = function (c, d) {
10753
+ }, e.clearMessages = _this52.clearMessages.bind(_this52, t), e.refreshMessages = _this52.refreshTextMessages.bind(_this52, e.remarkable), e.scrollToBottom = Z.scrollToBottom.bind(_this52, _this52.elementRef), e.addMessage = function (c, d) {
10750
10754
  _this52.addAnyMessage(_objectSpread(_objectSpread({}, c), {}, {
10751
10755
  sendUpdate: !!d
10752
10756
  }), !d);
@@ -10817,7 +10821,7 @@ var de = /*#__PURE__*/function (_wt) {
10817
10821
  };
10818
10822
  if (!e.ignoreText && s.text !== void 0 && e.text !== null && (this.addNewTextMessage(s.text, s.role, r, i), !t && this.textToSpeech && s.role !== b.USER_ROLE && yt.speak(s.text, this.textToSpeech)), s.files && Array.isArray(s.files) && Ti.addMessages(this, s.files, s.role, i), s.html !== void 0 && s.html !== null) {
10819
10823
  var o = Ee.add(this, s.html, s.role, this.messageElementRefs, r, i);
10820
- Pe.isElementTemporary(o) && delete s.html;
10824
+ Oe.isElementTemporary(o) && delete s.html;
10821
10825
  }
10822
10826
  return this.isValidMessageContent(s) && !i && this.updateStateOnMessage(s, e.overwrite, e.sendUpdate, t), s;
10823
10827
  }
@@ -10843,7 +10847,7 @@ var de = /*#__PURE__*/function (_wt) {
10843
10847
  value: function removeMessageOnError() {
10844
10848
  var e = this.messageElementRefs[this.messageElementRefs.length - 1],
10845
10849
  t = e == null ? void 0 : e.bubbleElement;
10846
- (t != null && t.classList.contains(Se.MESSAGE_CLASS) && t.textContent === "" || de.isTemporaryElement(e)) && this.removeLastMessage();
10850
+ (t != null && t.classList.contains(xe.MESSAGE_CLASS) && t.textContent === "" || de.isTemporaryElement(e)) && this.removeLastMessage();
10847
10851
  }
10848
10852
  // prettier-ignore
10849
10853
  }, {
@@ -10888,9 +10892,9 @@ var de = /*#__PURE__*/function (_wt) {
10888
10892
  value: function addDefaultLoadingMessage() {
10889
10893
  var e = this.createMessageElements("", b.AI_ROLE),
10890
10894
  t = e.bubbleElement;
10891
- e.bubbleElement.classList.add(Le.DOTS_CONTAINER_CLASS);
10895
+ e.bubbleElement.classList.add(Pe.DOTS_CONTAINER_CLASS);
10892
10896
  var i = document.createElement("div");
10893
- return i.classList.add("loading-message-dots"), t.appendChild(i), Le.setDots(t, this.messageStyles), e;
10897
+ return i.classList.add("loading-message-dots"), t.appendChild(i), Pe.setDots(t, this.messageStyles), e;
10894
10898
  }
10895
10899
  }, {
10896
10900
  key: "addLoadingMessage",
@@ -10899,7 +10903,7 @@ var de = /*#__PURE__*/function (_wt) {
10899
10903
  if (!this._displayLoadingMessage) return;
10900
10904
  var e = (r = (s = (i = this.messageStyles) == null ? void 0 : i.loading) == null ? void 0 : s.message) == null ? void 0 : r.html,
10901
10905
  t = e ? Ee.createElements(this, e, b.AI_ROLE, !1) : this.addDefaultLoadingMessage();
10902
- this.elementRef.appendChild(t.outerContainer), t.bubbleElement.classList.add(Le.BUBBLE_CLASS), this.applyCustomStyles(t, b.AI_ROLE, !1, (l = (a = (o = this.messageStyles) == null ? void 0 : o.loading) == null ? void 0 : a.message) == null ? void 0 : l.styles), Z.scrollToBottom(this.elementRef);
10906
+ this.elementRef.appendChild(t.outerContainer), t.bubbleElement.classList.add(Pe.BUBBLE_CLASS), this.applyCustomStyles(t, b.AI_ROLE, !1, (l = (a = (o = this.messageStyles) == null ? void 0 : o.loading) == null ? void 0 : a.message) == null ? void 0 : l.styles), Z.scrollToBottom(this.elementRef);
10903
10907
  }
10904
10908
  }, {
10905
10909
  key: "populateIntroPanel",
@@ -10984,7 +10988,7 @@ var de = /*#__PURE__*/function (_wt) {
10984
10988
  }, {
10985
10989
  key: "isActiveElement",
10986
10990
  value: function isActiveElement(e) {
10987
- return e ? e.contains(Le.BUBBLE_CLASS) || e.contains(et.CLASS) || e.contains(Se.MESSAGE_CLASS) : !1;
10991
+ return e ? e.contains(Pe.BUBBLE_CLASS) || e.contains(et.CLASS) || e.contains(xe.MESSAGE_CLASS) : !1;
10988
10992
  }
10989
10993
  }]);
10990
10994
  }(wt);
@@ -12895,32 +12899,32 @@ var jt = /*#__PURE__*/function (_Wt) {
12895
12899
  }(Wt);
12896
12900
  jt.MICROPHONE_RESET_TIMEOUT_MS = 300;
12897
12901
  var Jt = jt;
12898
- var Ie = /*#__PURE__*/function () {
12902
+ var Le = /*#__PURE__*/function () {
12899
12903
  // prettier-ignore
12900
- function Ie(e, t, i, s) {
12904
+ function Le(e, t, i, s) {
12901
12905
  var _this65 = this;
12902
- _classCallCheck(this, Ie);
12906
+ _classCallCheck(this, Le);
12903
12907
  this._attachments = [], this._fileCountLimit = 99, this._acceptedFormat = "", t.maxNumberOfFiles && (this._fileCountLimit = t.maxNumberOfFiles), this._toggleContainerDisplay = i, this._fileAttachmentsContainerRef = s, t.acceptedFormats && (this._acceptedFormat = t.acceptedFormats), setTimeout(function () {
12904
12908
  _this65._validationHandler = e._validationHandler;
12905
12909
  });
12906
12910
  }
12907
- return _createClass(Ie, [{
12911
+ return _createClass(Le, [{
12908
12912
  key: "attemptAddFile",
12909
12913
  value: function attemptAddFile(e, t) {
12910
- return Ie.isFileTypeValid(e, this._acceptedFormat) ? (this.addAttachmentBasedOnType(e, t, !0), !0) : !1;
12914
+ return Le.isFileTypeValid(e, this._acceptedFormat) ? (this.addAttachmentBasedOnType(e, t, !0), !0) : !1;
12911
12915
  }
12912
12916
  }, {
12913
12917
  key: "addAttachmentBasedOnType",
12914
12918
  value: function addAttachmentBasedOnType(e, t, i) {
12915
- var s = Ie.getTypeFromBlob(e);
12919
+ var s = Le.getTypeFromBlob(e);
12916
12920
  if (s === "image") {
12917
- var r = Ie.createImageAttachment(t);
12921
+ var r = Le.createImageAttachment(t);
12918
12922
  this.addFileAttachment(e, "image", r, i);
12919
12923
  } else if (s === "audio") {
12920
12924
  var _r3 = Zt.createAudioAttachment(t);
12921
12925
  this.addFileAttachment(e, "audio", _r3, i);
12922
12926
  } else {
12923
- var _r4 = Ie.createAnyFileAttachment(e.name);
12927
+ var _r4 = Le.createAnyFileAttachment(e.name);
12924
12928
  this.addFileAttachment(e, "any", _r4, i);
12925
12929
  }
12926
12930
  }
@@ -12928,7 +12932,7 @@ var Ie = /*#__PURE__*/function () {
12928
12932
  key: "addFileAttachment",
12929
12933
  value: function addFileAttachment(e, t, i, s) {
12930
12934
  var a;
12931
- var r = Ie.createContainer(i);
12935
+ var r = Le.createContainer(i);
12932
12936
  if (this._attachments.length >= this._fileCountLimit) {
12933
12937
  var l = this._attachments[this._attachments.length - 1].removeButton;
12934
12938
  l == null || l.click();
@@ -13030,19 +13034,19 @@ var Ie = /*#__PURE__*/function () {
13030
13034
  }();
13031
13035
  var xa = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n <title>play</title>\n <path d=\"M5.92 24.096q0 1.088 0.928 1.728 0.512 0.288 1.088 0.288 0.448 0 0.896-0.224l16.16-8.064q0.48-0.256 0.8-0.736t0.288-1.088-0.288-1.056-0.8-0.736l-16.16-8.064q-0.448-0.224-0.896-0.224-0.544 0-1.088 0.288-0.928 0.608-0.928 1.728v16.16z\"></path>\n</svg>",
13032
13036
  gn = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n<title>stop</title>\n<path d=\"M5.92 24.096q0 0.832 0.576 1.408t1.44 0.608h16.128q0.832 0 1.44-0.608t0.576-1.408v-16.16q0-0.832-0.576-1.44t-1.44-0.576h-16.128q-0.832 0-1.44 0.576t-0.576 1.44v16.16z\"></path>\n</svg>",
13033
- ke = /*#__PURE__*/function (_Ie) {
13037
+ Me = /*#__PURE__*/function (_Le) {
13034
13038
  // prettier-ignore
13035
- function ke(e, t, i, s) {
13036
- _classCallCheck(this, ke);
13037
- return _callSuper(this, ke, [e, t, i, s]);
13039
+ function Me(e, t, i, s) {
13040
+ _classCallCheck(this, Me);
13041
+ return _callSuper(this, Me, [e, t, i, s]);
13038
13042
  }
13039
- _inherits(ke, _Ie);
13040
- return _createClass(ke, [{
13043
+ _inherits(Me, _Le);
13044
+ return _createClass(Me, [{
13041
13045
  key: "createTimer",
13042
13046
  value: function createTimer(e, t) {
13043
13047
  var _this66 = this;
13044
13048
  var i = 0;
13045
- var s = t !== void 0 && t < ke.TIMER_LIMIT_S ? t : ke.TIMER_LIMIT_S;
13049
+ var s = t !== void 0 && t < Me.TIMER_LIMIT_S ? t : Me.TIMER_LIMIT_S;
13046
13050
  return setInterval(function () {
13047
13051
  var a;
13048
13052
  i += 1, i === s && ((a = _this66.stopPlaceholderCallback) == null || a.call(_this66), _this66.clearTimer()), i === 600 && e.classList.add("audio-placeholder-text-4-digits");
@@ -13054,7 +13058,7 @@ var xa = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
13054
13058
  }, {
13055
13059
  key: "createPlaceholderAudioAttachment",
13056
13060
  value: function createPlaceholderAudioAttachment(e) {
13057
- var t = ke.createAudioContainer(),
13061
+ var t = Me.createAudioContainer(),
13058
13062
  i = document.createElement("div");
13059
13063
  i.classList.add("audio-placeholder-text-3-digits");
13060
13064
  var s = document.createElement("div");
@@ -13091,7 +13095,7 @@ var xa = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
13091
13095
  key: "completePlaceholderAttachment",
13092
13096
  value: function completePlaceholderAttachment(e, t) {
13093
13097
  var i = this._activePlaceholderAttachment;
13094
- i && (i.file = e, ke.addAudioElements(i.attachmentContainerElement.children[0], t), i.removeButton = this.createRemoveAttachmentButton(i), i.attachmentContainerElement.appendChild(i.removeButton), this._activePlaceholderAttachment = void 0, this.clearTimer());
13098
+ i && (i.file = e, Me.addAudioElements(i.attachmentContainerElement.children[0], t), i.removeButton = this.createRemoveAttachmentButton(i), i.attachmentContainerElement.appendChild(i.removeButton), this._activePlaceholderAttachment = void 0, this.clearTimer());
13095
13099
  }
13096
13100
  }, {
13097
13101
  key: "removePlaceholderAttachment",
@@ -13131,8 +13135,8 @@ var xa = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
13131
13135
  }, {
13132
13136
  key: "createAudioAttachment",
13133
13137
  value: function createAudioAttachment(e) {
13134
- var t = ke.createAudioContainer();
13135
- return ke.addAudioElements(t, e), t;
13138
+ var t = Me.createAudioContainer();
13139
+ return Me.addAudioElements(t, e), t;
13136
13140
  }
13137
13141
  }, {
13138
13142
  key: "stopAttachmentPlayback",
@@ -13141,9 +13145,9 @@ var xa = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
13141
13145
  (s = (i = (t = e.children[0]) == null ? void 0 : t.children) == null ? void 0 : i[0]) != null && s.classList.contains("stop-icon") && e.children[0].click();
13142
13146
  }
13143
13147
  }]);
13144
- }(Ie);
13145
- ke.TIMER_LIMIT_S = 5999;
13146
- var Zt = ke;
13148
+ }(Le);
13149
+ Me.TIMER_LIMIT_S = 5999;
13150
+ var Zt = Me;
13147
13151
  var _a = /*#__PURE__*/function () {
13148
13152
  function _a() {
13149
13153
  _classCallCheck(this, _a);
@@ -13153,7 +13157,7 @@ var _a = /*#__PURE__*/function () {
13153
13157
  value:
13154
13158
  // prettier-ignore
13155
13159
  function create(e, t, i, s, r) {
13156
- return r === "audio" ? new Zt(e, t, i, s) : new Ie(e, t, i, s);
13160
+ return r === "audio" ? new Zt(e, t, i, s) : new Le(e, t, i, s);
13157
13161
  }
13158
13162
  }]);
13159
13163
  }();
@@ -13434,15 +13438,15 @@ var Dt = /*#__PURE__*/function (_ei3) {
13434
13438
  }
13435
13439
  }]);
13436
13440
  }(ei);
13437
- var Me = /*#__PURE__*/function () {
13438
- function Me() {
13439
- _classCallCheck(this, Me);
13441
+ var Re = /*#__PURE__*/function () {
13442
+ function Re() {
13443
+ _classCallCheck(this, Re);
13440
13444
  }
13441
- return _createClass(Me, null, [{
13445
+ return _createClass(Re, null, [{
13442
13446
  key: "create",
13443
13447
  value: function create(e, t, i) {
13444
- var s = Me.createElement(i);
13445
- Me.addEvents(s, e, t), e.appendChild(s);
13448
+ var s = Re.createElement(i);
13449
+ Re.addEvents(s, e, t), e.appendChild(s);
13446
13450
  }
13447
13451
  }, {
13448
13452
  key: "createElement",
@@ -13454,13 +13458,13 @@ var Me = /*#__PURE__*/function () {
13454
13458
  key: "addEvents",
13455
13459
  value: function addEvents(e, t, i) {
13456
13460
  t.ondragenter = function (s) {
13457
- s.preventDefault(), Me.display(e);
13461
+ s.preventDefault(), Re.display(e);
13458
13462
  }, e.ondragleave = function (s) {
13459
- s.preventDefault(), Me.hide(e);
13463
+ s.preventDefault(), Re.hide(e);
13460
13464
  }, e.ondragover = function (s) {
13461
13465
  s.preventDefault();
13462
13466
  }, e.ondrop = function (s) {
13463
- s.preventDefault(), Me.uploadFile(i, s), Me.hide(e);
13467
+ s.preventDefault(), Re.uploadFile(i, s), Re.hide(e);
13464
13468
  };
13465
13469
  }
13466
13470
  }, {
@@ -13866,7 +13870,7 @@ var k = /*#__PURE__*/function (_ei4) {
13866
13870
  e.files && (t.files = Array.from(e.files).map(function (i) {
13867
13871
  return {
13868
13872
  file: i,
13869
- type: Ie.getTypeFromBlob(i)
13873
+ type: Le.getTypeFromBlob(i)
13870
13874
  };
13871
13875
  })), setTimeout(function () {
13872
13876
  return _this78.attemptSubmit(t, !0);
@@ -14234,7 +14238,7 @@ var Bt = /*#__PURE__*/function () {
14234
14238
  button: new wa(_d, t.recordAudio)
14235
14239
  };
14236
14240
  }
14237
- return Me.isEnabled(r, e.dragAndDrop) && Me.create(i, r, e.dragAndDrop), r;
14241
+ return Re.isEnabled(r, e.dragAndDrop) && Re.create(i, r, e.dragAndDrop), r;
14238
14242
  }
14239
14243
  // prettier-ignore
14240
14244
  }], [{
@@ -14374,6 +14378,7 @@ _([x("object")], S.prototype, "mixedFiles");
14374
14378
  _([x("object")], S.prototype, "dragAndDrop");
14375
14379
  _([x("object")], S.prototype, "introPanelStyle");
14376
14380
  _([x("object")], S.prototype, "htmlClassUtilities");
14381
+ _([x("object")], S.prototype, "remarkable");
14377
14382
  _([x("function")], S.prototype, "onMessage");
14378
14383
  _([x("function")], S.prototype, "onClearMessages");
14379
14384
  _([x("function")], S.prototype, "onComponentRender");