@mobilon-dev/chotto 0.3.91 → 0.3.93

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