@mobilon-dev/chotto 0.3.91 → 0.3.92

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.
@@ -1,28 +1,28 @@
1
- import { defineComponent as _e, inject as Se, ref as A, computed as _, watch as m, nextTick as u, unref as c, onMounted as Te, onUnmounted as be, createElementBlock as k, openBlock as E, createElementVNode as h, createVNode as q, normalizeClass as B, createBlock as we, createCommentVNode as K, renderSlot as j, toDisplayString as Ie, withDirectives as Ce, withKeys as Ae, vModelText as Ee } from "vue";
2
- import { useImmediateDebouncedRef as Me } from "../../../hooks/useImmediateDebouncedRef.js";
3
- import { useMessageDraft as Fe } from "../../../hooks/useMessageDraft.js";
1
+ import { defineComponent as Te, inject as be, ref as E, computed as _, watch as p, nextTick as S, unref as u, onMounted as we, onUnmounted as Ce, createElementBlock as k, openBlock as F, createElementVNode as h, createVNode as G, normalizeClass as z, createBlock as Ae, createCommentVNode as O, renderSlot as U, toDisplayString as Ee, withDirectives as Fe, withKeys as Me, vModelText as Re } from "vue";
2
+ import { useImmediateDebouncedRef as He } from "../../../hooks/useImmediateDebouncedRef.js";
3
+ import { useMessageDraft as ke } from "../../../hooks/useMessageDraft.js";
4
4
  import "../../../hooks/useSearchModel.js";
5
5
  import "../../../hooks/useTheme.js";
6
- import { useEmojiNative as Re } from "../../../hooks/useEmojiNative.js";
6
+ import { useEmojiNative as Le } from "../../../hooks/useEmojiNative.js";
7
7
  /* empty css */
8
8
  /* empty css */
9
- import { t as S } from "../../../locale/useLocale.js";
9
+ import { t as I } from "../../../locale/useLocale.js";
10
10
  /* empty css */
11
11
  import "../../../node_modules/linkifyjs/dist/linkify.js";
12
12
  import "../../../node_modules/linkify-string/dist/linkify-string.js";
13
13
  import "../../../functions/parseMarkdown.js";
14
- import { textToAppleEmojiHtml as ke, textContainsEmoji as Le, previousGraphemeIndex as N, nextGraphemeIndex as O, snapIndexToGrapheme as Y } from "../../../functions/renderAppleEmojis.js";
15
- import { hideEditPreview as He } from "../../../hooks/messages/useStartEdit.js";
16
- import De from "./icons/SendIcon.vue.js";
17
- import Pe from "../../2_chatinput_elements/TextFormatToolbar/TextFormatToolbar.vue.js";
14
+ import { textToAppleEmojiHtml as De, textContainsEmoji as Pe, previousGraphemeIndex as Y, nextGraphemeIndex as V, snapIndexToGrapheme as $ } from "../../../functions/renderAppleEmojis.js";
15
+ import { hideEditPreview as We } from "../../../hooks/messages/useStartEdit.js";
16
+ import qe from "./icons/SendIcon.vue.js";
17
+ import Be from "../../2_chatinput_elements/TextFormatToolbar/TextFormatToolbar.vue.js";
18
18
  import ze from "../../2_chatinput_elements/FilePreview/FilePreview.vue.js";
19
- const Be = { class: "chat-input__container" }, We = ["id"], qe = ["id"], Ke = { class: "chat-input__inline-buttons" }, je = {
19
+ const Ke = { class: "chat-input__container" }, je = ["id"], Ne = ["id"], Ge = { class: "chat-input__inline-buttons" }, Oe = {
20
20
  key: 0,
21
21
  class: "chat-input__input chat-input__disabled-placeholder"
22
- }, Ne = {
22
+ }, Ue = {
23
23
  key: 1,
24
24
  class: "chat-input__input-wrap"
25
- }, Oe = ["innerHTML"], Ye = ["disabled", "placeholder"], Ge = ["disabled"], Ue = { class: "" }, Ve = { class: "chat-input__third-line" }, mt = /* @__PURE__ */ _e({
25
+ }, Ye = ["innerHTML"], Ve = ["disabled", "placeholder"], $e = ["disabled"], Je = { class: "" }, Qe = { class: "chat-input__third-line" }, K = 40, gt = /* @__PURE__ */ Te({
26
26
  __name: "ChatInput",
27
27
  props: {
28
28
  state: {
@@ -51,84 +51,84 @@ const Be = { class: "chat-input__container" }, We = ["id"], qe = ["id"], Ke = {
51
51
  }
52
52
  },
53
53
  emits: ["send", "typing"],
54
- setup(T, { emit: G }) {
55
- const L = G, b = Se("chatAppId"), { resetMessage: U, getMessage: o, setMessageText: M, setForceSendMessage: V, resetEdit: $, resetMessageFile: J } = Fe(b), { isNative: Q } = Re(b), i = A(), v = A(), g = A(null), w = A(!1), X = Me("", 2e3), H = _(() => {
54
+ setup(T, { emit: J }) {
55
+ const L = J, b = be("chatAppId"), { resetMessage: Q, getMessage: o, setMessageText: M, setForceSendMessage: X, resetEdit: Z, resetMessageFile: ee } = ke(b), { isNative: te } = Le(b), n = E(), m = E(), v = E(null), w = E(!1), ne = He("", 2e3), D = _(() => {
56
56
  var e;
57
57
  return (e = o().file) == null ? void 0 : e.preview;
58
- }), Z = _(
59
- () => ke(o().text || "", g.value)
60
- ), y = _(
61
- () => !Q.value && Le(o().text || "")
62
- ), d = () => {
63
- if (!v.value || !i.value) return;
64
- const e = i.value, t = v.value, n = Math.max(0, e.offsetWidth - e.clientWidth);
65
- t.style.right = n > 0 ? `${n}px` : "", t.scrollTop = e.scrollTop;
58
+ }), ie = _(
59
+ () => De(o().text || "", v.value)
60
+ ), g = _(
61
+ () => !te.value && Pe(o().text || "")
62
+ ), c = () => {
63
+ if (!m.value || !n.value) return;
64
+ const e = n.value, t = m.value, l = Math.max(0, e.offsetWidth - e.clientWidth);
65
+ t.style.right = l > 0 ? `${l}px` : "", t.scrollTop = e.scrollTop;
66
66
  };
67
- let x = 0;
68
- function D() {
69
- g.value = null;
67
+ let y = 0;
68
+ function P() {
69
+ v.value = null;
70
70
  }
71
- function ee(e = "nearest") {
72
- const t = i.value;
73
- if (!t || !y.value) return;
74
- const n = t.value, l = Y(n, t.selectionStart, e), r = Y(n, t.selectionEnd, e);
75
- (l !== t.selectionStart || r !== t.selectionEnd) && t.setSelectionRange(l, r);
71
+ function le(e = "nearest") {
72
+ const t = n.value;
73
+ if (!t || !g.value) return;
74
+ const l = t.value, i = $(l, t.selectionStart, e), r = $(l, t.selectionEnd, e);
75
+ (i !== t.selectionStart || r !== t.selectionEnd) && t.setSelectionRange(i, r);
76
76
  }
77
- function P() {
78
- ee("nearest"), p();
77
+ function W() {
78
+ le("nearest"), d();
79
79
  }
80
- function te(e) {
81
- if (!y.value || e.key !== "ArrowLeft" && e.key !== "ArrowRight" || e.altKey || e.metaKey || e.ctrlKey) return;
82
- const t = i.value;
80
+ function oe(e) {
81
+ if (!g.value || e.key !== "ArrowLeft" && e.key !== "ArrowRight" || e.altKey || e.metaKey || e.ctrlKey) return;
82
+ const t = n.value;
83
83
  if (!t) return;
84
- const n = t.value, l = t.selectionStart !== t.selectionEnd;
84
+ const l = t.value, i = t.selectionStart !== t.selectionEnd;
85
85
  if (e.shiftKey) {
86
- requestAnimationFrame(() => P());
86
+ requestAnimationFrame(() => W());
87
87
  return;
88
88
  }
89
- if (l) {
89
+ if (i) {
90
90
  e.preventDefault();
91
- const I = e.key === "ArrowLeft" ? t.selectionStart : t.selectionEnd, C = e.key === "ArrowLeft" ? N(n, I) : O(n, I);
92
- t.setSelectionRange(C, C), p();
91
+ const x = e.key === "ArrowLeft" ? t.selectionStart : t.selectionEnd, A = e.key === "ArrowLeft" ? Y(l, x) : V(l, x);
92
+ t.setSelectionRange(A, A), d();
93
93
  return;
94
94
  }
95
95
  e.preventDefault();
96
- const r = t.selectionStart, f = e.key === "ArrowLeft" ? N(n, r) : O(n, r);
97
- t.setSelectionRange(f, f), p();
96
+ const r = t.selectionStart, f = e.key === "ArrowLeft" ? Y(l, r) : V(l, r);
97
+ t.setSelectionRange(f, f), d();
98
98
  }
99
- function p() {
100
- if (!y.value) {
101
- D();
99
+ function d() {
100
+ if (!g.value) {
101
+ P();
102
102
  return;
103
103
  }
104
- x && cancelAnimationFrame(x), x = requestAnimationFrame(() => {
104
+ y && cancelAnimationFrame(y), y = requestAnimationFrame(() => {
105
105
  var f;
106
- x = 0;
107
- const e = i.value;
106
+ y = 0;
107
+ const e = n.value;
108
108
  if (!e) {
109
- D();
109
+ P();
110
110
  return;
111
111
  }
112
- const t = e.selectionStart, n = e.selectionEnd;
113
- if (t === n) {
114
- g.value !== null && (g.value = null, u(d));
112
+ const t = e.selectionStart, l = e.selectionEnd;
113
+ if (t === l) {
114
+ v.value !== null && (v.value = null, S(c));
115
115
  return;
116
116
  }
117
- const l = g.value;
118
- if (l && l.start === t && l.end === n) return;
119
- const r = ((f = v.value) == null ? void 0 : f.scrollTop) ?? 0;
120
- g.value = { start: t, end: n }, u(() => {
121
- v.value && (v.value.scrollTop = r), d();
117
+ const i = v.value;
118
+ if (i && i.start === t && i.end === l) return;
119
+ const r = ((f = m.value) == null ? void 0 : f.scrollTop) ?? 0;
120
+ v.value = { start: t, end: l }, S(() => {
121
+ m.value && (m.value.scrollTop = r), c();
122
122
  });
123
123
  });
124
124
  }
125
- function ne(e) {
126
- e.buttons && p();
125
+ function se(e) {
126
+ e.buttons && d();
127
127
  }
128
- function W() {
129
- document.activeElement === i.value && p();
128
+ function j() {
129
+ document.activeElement === n.value && d();
130
130
  }
131
- const a = T, ie = _(() => !!(a.state == "disabled" || o().text == "" && !o().file || o().isRecording)), le = _(() => {
131
+ const a = T, ae = _(() => !!(a.state == "disabled" || o().text == "" && !o().file || o().isRecording)), re = _(() => {
132
132
  var t;
133
133
  if (a.inputButtonColor)
134
134
  return a.inputButtonColor;
@@ -136,146 +136,158 @@ const Be = { class: "chat-input__container" }, We = ["id"], qe = ["id"], Ke = {
136
136
  return "#25D366";
137
137
  const e = a.selectedChannel.channelId.toLowerCase();
138
138
  return e.includes("whatsapp") || e.includes("waba") ? "#25D366" : e.includes("telegram") ? "#37AFE2" : e.includes("sms") ? "#6C757D" : e.includes("max") ? "#4B0082" : "#25D366";
139
- }), oe = _(() => {
139
+ }), ue = _(() => {
140
140
  var t;
141
141
  if (!((t = a.selectedChannel) != null && t.channelId))
142
- return S("component.ChatInput.InputPlaceholder");
142
+ return I("component.ChatInput.InputPlaceholder");
143
143
  const e = a.selectedChannel.channelId.toLowerCase();
144
- return e.includes("whatsapp") || e.includes("waba") ? S("component.ChatInput.WhatsappInputPlaceholder") : e.includes("telegram") ? S("component.ChatInput.TelegramInputPlaceholder") : e.includes("sms") ? S("component.ChatInput.SmsInputPlaceholder") : e.includes("max") ? S("component.ChatInput.MaxInputPlaceholder") : S("component.ChatInput.InputPlaceholder");
144
+ return e.includes("whatsapp") || e.includes("waba") ? I("component.ChatInput.WhatsappInputPlaceholder") : e.includes("telegram") ? I("component.ChatInput.TelegramInputPlaceholder") : e.includes("sms") ? I("component.ChatInput.SmsInputPlaceholder") : e.includes("max") ? I("component.ChatInput.MaxInputPlaceholder") : I("component.ChatInput.InputPlaceholder");
145
145
  });
146
- m(
147
- () => X.value,
146
+ p(
147
+ () => ne.value,
148
148
  () => {
149
149
  L("typing");
150
150
  }
151
- ), m(
151
+ ), p(
152
152
  () => {
153
153
  var e;
154
154
  return (e = o().edit) == null ? void 0 : e.messageId;
155
155
  },
156
156
  (e, t) => {
157
- e != null && e !== t && (w.value = !0, u(() => {
157
+ e != null && e !== t && (w.value = !0, S(() => {
158
158
  if (!w.value) return;
159
- const n = i.value;
160
- n && (F(n), w.value = !1, R(n), requestAnimationFrame(() => R(n)));
159
+ const l = n.value;
160
+ l && (C(l), w.value = !1, H(l), requestAnimationFrame(() => H(l)));
161
161
  }));
162
162
  }
163
- ), m(
163
+ ), p(
164
164
  () => a.focusOnInputArea,
165
165
  () => {
166
- a.focusOnInputArea && u(() => {
167
- const e = c(i);
166
+ a.focusOnInputArea && S(() => {
167
+ const e = u(n);
168
168
  e == null || e.focus();
169
169
  });
170
170
  },
171
171
  { immediate: !0 }
172
- ), m(
172
+ ), p(
173
173
  () => o().text,
174
174
  () => {
175
- u(() => {
176
- const e = i.value;
177
- e && (F(e), w.value && (w.value = !1, R(e), requestAnimationFrame(() => R(e))));
178
- });
175
+ const e = n.value;
176
+ e && (C(e), w.value && (w.value = !1, H(e), requestAnimationFrame(() => H(e))));
179
177
  },
180
- { immediate: !0 }
181
- ), m(
178
+ { immediate: !0, flush: "post" }
179
+ ), p(
182
180
  () => o().id,
183
181
  () => {
184
- u(() => {
185
- const e = i.value;
186
- e && F(e);
187
- });
182
+ const e = n.value;
183
+ e && (R(e), requestAnimationFrame(() => {
184
+ const t = n.value;
185
+ t && C(t);
186
+ }));
188
187
  }
189
- ), m(y, (e) => {
190
- e && u(() => {
191
- const t = i.value;
188
+ ), p(g, (e) => {
189
+ e && S(() => {
190
+ const t = n.value;
192
191
  if (!t) return;
193
- const n = t.scrollTop;
194
- F(t), t.scrollTop = n, d(), requestAnimationFrame(d);
192
+ const l = t.scrollTop;
193
+ C(t), t.scrollTop = l, c(), requestAnimationFrame(c);
195
194
  });
196
195
  });
197
- function F(e) {
198
- const t = e.scrollTop;
196
+ function R(e) {
197
+ const t = o().inputHeight;
198
+ e.style.height = (t || K) + "px", (!t || t <= K) && (e.style.overflowY = "hidden");
199
+ }
200
+ function ce(e) {
201
+ const t = parseFloat(e.style.height);
202
+ Number.isFinite(t) && (o().inputHeight = t);
203
+ }
204
+ function C(e) {
205
+ const t = o().text || "";
206
+ if (e.value !== t || e.clientWidth === 0) {
207
+ R(e);
208
+ return;
209
+ }
210
+ const l = e.scrollTop;
199
211
  e.style.height = "auto";
200
- const n = getComputedStyle(e), l = parseFloat(n.fontSize) || 16, r = parseFloat(n.lineHeight) || l * 1.4, f = 40, I = r * 11, C = e.scrollHeight, pe = o().text.split(`
212
+ const i = getComputedStyle(e), r = parseFloat(i.fontSize) || 16, f = parseFloat(i.lineHeight) || r * 1.4, x = K, A = f * 11, B = e.scrollHeight, ge = t.split(`
201
213
  `).length > 1, s = document.createElement("div");
202
- s.style.position = "absolute", s.style.visibility = "hidden", s.style.whiteSpace = "nowrap", s.style.font = n.font, s.style.fontSize = n.fontSize, s.style.fontFamily = n.fontFamily, s.style.fontWeight = n.fontWeight, s.style.letterSpacing = n.letterSpacing, s.textContent = o().text, document.body.appendChild(s);
203
- const me = s.offsetWidth;
214
+ s.style.position = "absolute", s.style.visibility = "hidden", s.style.whiteSpace = "nowrap", s.style.font = i.font, s.style.fontSize = i.fontSize, s.style.fontFamily = i.fontFamily, s.style.fontWeight = i.fontWeight, s.style.letterSpacing = i.letterSpacing, s.textContent = t, document.body.appendChild(s);
215
+ const ye = s.offsetWidth;
204
216
  document.body.removeChild(s);
205
- const he = parseFloat(n.paddingLeft) || 0, ve = parseFloat(n.paddingRight) || 0, ge = e.clientWidth - he - ve, ye = me > ge, xe = pe || ye;
206
- o().text.trim() && xe ? C <= I ? (e.style.height = C + "px", e.style.overflowY = "hidden") : (e.style.height = I + "px", e.style.overflowY = "auto", e.scrollTop = t) : (e.style.height = f + "px", e.style.overflowY = "hidden"), d(), requestAnimationFrame(d);
217
+ const xe = parseFloat(i.paddingLeft) || 0, _e = parseFloat(i.paddingRight) || 0, Se = e.clientWidth - xe - _e, Ie = ye > Se, N = ge || Ie;
218
+ if (N && B <= x + 1) {
219
+ R(e);
220
+ return;
221
+ }
222
+ t.trim() && N ? B <= A ? (e.style.height = B + "px", e.style.overflowY = "hidden") : (e.style.height = A + "px", e.style.overflowY = "auto", e.scrollTop = l) : (e.style.height = x + "px", e.style.overflowY = "hidden"), ce(e), c(), requestAnimationFrame(c);
207
223
  }
208
- function R(e) {
224
+ function H(e) {
209
225
  if (a.state === "disabled" || o().isRecording) return;
210
226
  const t = e.value.length;
211
- e.focus(), e.setSelectionRange(t, t), e.scrollTop = e.scrollHeight, d();
227
+ e.focus(), e.setSelectionRange(t, t), e.scrollTop = e.scrollHeight, c();
212
228
  }
213
- m(
229
+ p(
214
230
  () => o().forceSend,
215
231
  () => {
216
- o().forceSend && (z(), V(!1));
232
+ o().forceSend && (q(), X(!1));
217
233
  }
218
234
  );
219
- const se = (e) => {
235
+ const de = (e) => {
220
236
  const t = e.target;
221
- L("typing", t.value), p();
222
- }, ae = () => {
223
- u(() => {
224
- const e = i.value;
225
- e && (e.style.height = "40px", e.style.overflowY = "hidden");
226
- });
237
+ L("typing", t.value), d();
227
238
  };
228
- Te(() => {
229
- ae(), document.addEventListener("selectionchange", W);
230
- }), be(() => {
231
- document.removeEventListener("selectionchange", W), x && cancelAnimationFrame(x);
239
+ we(() => {
240
+ const e = n.value;
241
+ e && (R(e), C(e)), document.addEventListener("selectionchange", j);
242
+ }), Ce(() => {
243
+ document.removeEventListener("selectionchange", j), y && cancelAnimationFrame(y);
232
244
  });
233
- const re = (e) => {
245
+ const fe = (e) => {
234
246
  if (e.shiftKey) {
235
- if (i.value instanceof HTMLTextAreaElement) {
236
- let t = i.value.selectionStart;
237
- t && (i.value.setRangeText(`
238
- `, t, t, "end"), M(i.value.value));
247
+ if (n.value instanceof HTMLTextAreaElement) {
248
+ let t = n.value.selectionStart;
249
+ t && (n.value.setRangeText(`
250
+ `, t, t, "end"), M(n.value.value));
239
251
  }
240
252
  e.preventDefault();
241
253
  } else if (e.ctrlKey) {
242
- if (i.value instanceof HTMLTextAreaElement) {
243
- let t = i.value.selectionStart;
244
- t && (i.value.setRangeText(`
245
- `, t, t, "end"), M(i.value.value));
254
+ if (n.value instanceof HTMLTextAreaElement) {
255
+ let t = n.value.selectionStart;
256
+ t && (n.value.setRangeText(`
257
+ `, t, t, "end"), M(n.value.value));
246
258
  }
247
259
  e.preventDefault();
248
260
  } else
249
- e.preventDefault(), z();
250
- }, ue = (e) => {
251
- if (i.value) {
252
- const t = i.value.value;
253
- i.value.value = e.newText;
254
- const n = e.newText.length - (t.length - (e.end - e.start)), l = e.start + n;
255
- M(e.newText), u(() => {
256
- i.value && (i.value.setSelectionRange(l, l), i.value.focus());
261
+ e.preventDefault(), q();
262
+ }, pe = (e) => {
263
+ if (n.value) {
264
+ const t = n.value.value;
265
+ n.value.value = e.newText;
266
+ const l = e.newText.length - (t.length - (e.end - e.start)), i = e.start + l;
267
+ M(e.newText), S(() => {
268
+ n.value && (n.value.setSelectionRange(i, i), n.value.focus());
257
269
  });
258
270
  }
259
271
  };
260
- function ce() {
261
- J();
272
+ function he() {
273
+ ee();
262
274
  }
263
- function de() {
264
- $(), M(""), He(b), i.value && i.value.focus();
275
+ function me() {
276
+ Z(), M(""), We(b), n.value && n.value.focus();
265
277
  }
266
- function fe() {
278
+ function ve() {
267
279
  const e = o();
268
280
  return e.edit ? (e.text ?? "").trim() === (e.edit.text ?? "").trim() : !1;
269
281
  }
270
- const z = () => {
271
- var t, n;
272
- const e = A(o());
273
- if (e.value.edit && fe()) {
274
- de();
282
+ const q = () => {
283
+ var t, l;
284
+ const e = E(o());
285
+ if (e.value.edit && ve()) {
286
+ me();
275
287
  return;
276
288
  }
277
289
  if (e.value.text != "" || e.value.file) {
278
- const l = {
290
+ const i = {
279
291
  type: "",
280
292
  text: "",
281
293
  url: "",
@@ -283,78 +295,78 @@ const Be = { class: "chat-input__container" }, We = ["id"], qe = ["id"], Ke = {
283
295
  size: "",
284
296
  reply: void 0
285
297
  };
286
- e.value.file ? (l.type = "message." + e.value.file.type, l.url = e.value.file.url, l.filename = e.value.file.name, l.size = (t = e.value.file.size) == null ? void 0 : t.toString(), l.text = (n = e == null ? void 0 : e.value) == null ? void 0 : n.text.trim()) : (l.type = "message.text", l.text = e.value.text.trim()), e.value.reply && (l.reply = e.value.reply), e.value.edit && (l.edit = e.value.edit), L("send", l), U(), i.value && i.value.focus();
298
+ e.value.file ? (i.type = "message." + e.value.file.type, i.url = e.value.file.url, i.filename = e.value.file.name, i.size = (t = e.value.file.size) == null ? void 0 : t.toString(), i.text = (l = e == null ? void 0 : e.value) == null ? void 0 : l.text.trim()) : (i.type = "message.text", i.text = e.value.text.trim()), e.value.reply && (i.reply = e.value.reply), e.value.edit && (i.edit = e.value.edit), L("send", i), Q(), n.value && n.value.focus();
287
299
  }
288
300
  };
289
- return (e, t) => (E(), k("div", Be, [
301
+ return (e, t) => (F(), k("div", Ke, [
290
302
  h("div", {
291
- id: "chat-input-reply-line-" + c(b),
303
+ id: "chat-input-reply-line-" + u(b),
292
304
  class: "chat-input__reply-line"
293
- }, null, 8, We),
305
+ }, null, 8, je),
294
306
  h("div", {
295
- id: "chat-input-file-line-" + c(b),
296
- class: B(["chat-input__file-line", { "chat-input__file-line--visible": !!H.value }])
307
+ id: "chat-input-file-line-" + u(b),
308
+ class: z(["chat-input__file-line", { "chat-input__file-line--visible": !!D.value }])
297
309
  }, [
298
- H.value ? (E(), we(ze, {
310
+ D.value ? (F(), Ae(ze, {
299
311
  key: 0,
300
- "file-info": H.value,
301
- onReset: ce
302
- }, null, 8, ["file-info"])) : K("", !0)
303
- ], 10, qe),
304
- h("div", Ke, [
305
- j(e.$slots, "inline-buttons", {}, void 0, !0)
312
+ "file-info": D.value,
313
+ onReset: he
314
+ }, null, 8, ["file-info"])) : O("", !0)
315
+ ], 10, Ne),
316
+ h("div", Ge, [
317
+ U(e.$slots, "inline-buttons", {}, void 0, !0)
306
318
  ]),
307
- T.disabledPlaceholder && (T.state == "disabled" || c(o)().isRecording) ? (E(), k("div", je, Ie(T.disabledPlaceholder), 1)) : (E(), k("div", Ne, [
308
- y.value ? (E(), k("div", {
319
+ T.disabledPlaceholder && (T.state == "disabled" || u(o)().isRecording) ? (F(), k("div", Oe, Ee(T.disabledPlaceholder), 1)) : (F(), k("div", Ue, [
320
+ g.value ? (F(), k("div", {
309
321
  key: 0,
310
322
  ref_key: "refMirror",
311
- ref: v,
323
+ ref: m,
312
324
  class: "chat-input__input-mirror",
313
325
  "aria-hidden": "true",
314
- innerHTML: Z.value
315
- }, null, 8, Oe)) : K("", !0),
316
- Ce(h("textarea", {
326
+ innerHTML: ie.value
327
+ }, null, 8, Ye)) : O("", !0),
328
+ Fe(h("textarea", {
317
329
  ref_key: "refInput",
318
- ref: i,
319
- "onUpdate:modelValue": t[0] || (t[0] = (n) => c(o)().text = n),
330
+ ref: n,
331
+ "onUpdate:modelValue": t[0] || (t[0] = (l) => u(o)().text = l),
320
332
  rows: "1",
321
- disabled: T.state == "disabled" || c(o)().isRecording,
322
- class: B(["chat-input__input", { "chat-input__input--emoji-images": y.value }]),
323
- placeholder: oe.value,
333
+ disabled: T.state == "disabled" || u(o)().isRecording,
334
+ class: z(["chat-input__input", { "chat-input__input--emoji-images": g.value }]),
335
+ placeholder: ue.value,
324
336
  onKeydown: [
325
- te,
326
- Ae(re, ["enter"])
337
+ oe,
338
+ Me(fe, ["enter"])
327
339
  ],
328
- onInput: se,
329
- onScroll: d,
330
- onSelect: p,
331
- onMouseup: P,
332
- onKeyup: P,
333
- onMousemove: ne,
334
- onBlur: D
335
- }, null, 42, Ye), [
336
- [Ee, c(o)().text]
340
+ onInput: de,
341
+ onScroll: c,
342
+ onSelect: d,
343
+ onMouseup: W,
344
+ onKeyup: W,
345
+ onMousemove: se,
346
+ onBlur: P
347
+ }, null, 42, Ve), [
348
+ [Re, u(o)().text]
337
349
  ])
338
350
  ])),
339
- q(Pe, {
340
- textarea: i.value,
341
- onFormatApplied: ue
351
+ G(Be, {
352
+ textarea: n.value,
353
+ onFormatApplied: pe
342
354
  }, null, 8, ["textarea"]),
343
355
  h("button", {
344
- class: B(["chat-input__button", { "chat-input__button-disabled": ie.value }]),
345
- disabled: c(o)().isRecording,
346
- onClick: z
356
+ class: z(["chat-input__button", { "chat-input__button-disabled": ae.value }]),
357
+ disabled: u(o)().isRecording,
358
+ onClick: q
347
359
  }, [
348
- h("span", Ue, [
349
- q(c(De), { color: le.value }, null, 8, ["color"])
360
+ h("span", Je, [
361
+ G(u(qe), { color: re.value }, null, 8, ["color"])
350
362
  ])
351
- ], 10, Ge),
352
- h("div", Ve, [
353
- j(e.$slots, "buttons", {}, void 0, !0)
363
+ ], 10, $e),
364
+ h("div", Qe, [
365
+ U(e.$slots, "buttons", {}, void 0, !0)
354
366
  ])
355
367
  ]));
356
368
  }
357
369
  });
358
370
  export {
359
- mt as default
371
+ gt as default
360
372
  };