@mobilon-dev/chotto 0.3.98 → 0.3.99

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.
Files changed (211) hide show
  1. package/dist/chotto.css +1 -1
  2. package/dist/components/1_atoms/ButtonContextMenu/ButtonContextMenu.vue.js +4 -29
  3. package/dist/components/1_atoms/ButtonContextMenu/ButtonContextMenu.vue2.js +61 -42
  4. package/dist/components/1_atoms/ContactContextMenu/ContactContextMenu.vue.js +4 -47
  5. package/dist/components/1_atoms/ContactContextMenu/ContactContextMenu.vue2.js +82 -55
  6. package/dist/components/1_atoms/ContextMenu/ContextMenu.vue.js +51 -86
  7. package/dist/components/1_atoms/EmbedPreview/EmbedPreview.vue.js +4 -32
  8. package/dist/components/1_atoms/EmbedPreview/EmbedPreview.vue2.js +28 -7
  9. package/dist/components/1_atoms/EmojiGlyph/EmojiGlyph.vue.js +38 -22
  10. package/dist/components/1_atoms/EmojiGlyph/EmojiGlyph.vue2.js +2 -33
  11. package/dist/components/1_atoms/LinkPreview/LinkPreview.vue.js +4 -37
  12. package/dist/components/1_atoms/LinkPreview/LinkPreview.vue2.js +21 -7
  13. package/dist/components/1_atoms/LoadingIndicator/LoadingIndicator.vue.js +19 -30
  14. package/dist/components/1_atoms/Tooltip/Tooltip.vue.js +4 -70
  15. package/dist/components/1_atoms/Tooltip/Tooltip.vue2.js +108 -76
  16. package/dist/components/1_icons/AvatarIcon.vue.js +8 -8
  17. package/dist/components/1_icons/CheckIcon.vue.js +13 -26
  18. package/dist/components/1_icons/CloseButtonIcon.vue.js +10 -16
  19. package/dist/components/1_icons/CloseIcon.vue.js +10 -16
  20. package/dist/components/1_icons/ContactCRMIcon.vue.js +10 -16
  21. package/dist/components/1_icons/MenuIcon.vue.js +10 -16
  22. package/dist/components/1_icons/MessageStatus/ErrorStatusIcon.vue.js +3 -23
  23. package/dist/components/1_icons/MessageStatus/ErrorStatusIcon.vue2.js +21 -12
  24. package/dist/components/1_icons/MessageStatus/PendingStatusIcon.vue.js +4 -36
  25. package/dist/components/1_icons/MessageStatus/PendingStatusIcon.vue2.js +26 -11
  26. package/dist/components/1_icons/MessageStatus/ReadStatusIcon.vue.js +3 -23
  27. package/dist/components/1_icons/MessageStatus/ReadStatusIcon.vue2.js +21 -12
  28. package/dist/components/1_icons/MessageStatus/ReceivedStatusIcon.vue.js +3 -23
  29. package/dist/components/1_icons/MessageStatus/ReceivedStatusIcon.vue2.js +20 -11
  30. package/dist/components/1_icons/MessageStatus/SentStatusIcon.vue.js +4 -33
  31. package/dist/components/1_icons/MessageStatus/SentStatusIcon.vue2.js +23 -11
  32. package/dist/components/1_icons/SearchIcon.vue.js +17 -29
  33. package/dist/components/1_icons/SettingsIcon.vue.js +8 -8
  34. package/dist/components/1_icons/TelegramIcon.vue.js +20 -32
  35. package/dist/components/1_icons/WhatsAppIcon.vue.js +20 -32
  36. package/dist/components/2_blocks/CommunicationPanel/CommunicationPanel.vue.js +396 -546
  37. package/dist/components/2_blocks/CommunicationPanel/CommunicationPanelAttributeIndicator.vue.js +58 -101
  38. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelCheckIcon.vue.js +8 -14
  39. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelConfirmSpinner.vue.js +7 -7
  40. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelMaxIcon.vue.js +7 -7
  41. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelPhoneIcon.vue.js +13 -19
  42. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSMSIcon.vue.js +10 -16
  43. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuMaxIcon.vue.js +23 -35
  44. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuPhoneIcon.vue.js +20 -32
  45. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuSMSIcon.vue.js +11 -17
  46. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuTelegramIcon.vue.js +8 -8
  47. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuWhatsAppIcon.vue.js +20 -32
  48. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelTelegramIcon.vue.js +21 -33
  49. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelUnconfirmedIcon.vue.js +7 -7
  50. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelWhatsAppIcon.vue.js +8 -8
  51. package/dist/components/2_blocks/FeedFoundItem/FeedFoundItem.vue.js +4 -74
  52. package/dist/components/2_blocks/FeedFoundItem/FeedFoundItem.vue2.js +42 -8
  53. package/dist/components/2_blocks/FeedFoundObjects/FeedFoundObjects.vue.js +4 -62
  54. package/dist/components/2_blocks/FeedFoundObjects/FeedFoundObjects.vue2.js +36 -15
  55. package/dist/components/2_blocks/FeedSearch/FeedSearch.vue.js +4 -49
  56. package/dist/components/2_blocks/FeedSearch/FeedSearch.vue2.js +45 -22
  57. package/dist/components/2_chatinput_elements/ButtonCommandsSelector/ButtonCommandsSelector.vue.js +4 -36
  58. package/dist/components/2_chatinput_elements/ButtonCommandsSelector/ButtonCommandsSelector.vue2.js +37 -19
  59. package/dist/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue.js +4 -61
  60. package/dist/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue2.js +96 -79
  61. package/dist/components/2_chatinput_elements/ButtonEmojiPicker/icons/SmilesIcon.vue.js +27 -31
  62. package/dist/components/2_chatinput_elements/ButtonEmojiPicker/icons/SmilesIcon.vue2.js +2 -13
  63. package/dist/components/2_chatinput_elements/ButtonTemplateSelector/ButtonTemplateSelector.vue.js +4 -72
  64. package/dist/components/2_chatinput_elements/ButtonTemplateSelector/ButtonTemplateSelector.vue2.js +83 -47
  65. package/dist/components/2_chatinput_elements/ButtonTemplateSelector/icons/ChatTemplatesIcon.vue.js +21 -19
  66. package/dist/components/2_chatinput_elements/ButtonTemplateSelector/icons/ChatTemplatesIcon.vue2.js +2 -13
  67. package/dist/components/2_chatinput_elements/ButtonWabaTemplateSelector/ButtonWabaTemplateSelector.vue.js +51 -80
  68. package/dist/components/2_chatinput_elements/FilePreview/FilePreview.vue.js +4 -182
  69. package/dist/components/2_chatinput_elements/FilePreview/FilePreview.vue2.js +135 -25
  70. package/dist/components/2_chatinput_elements/FileUploader/FileUploader.vue.js +4 -78
  71. package/dist/components/2_chatinput_elements/FileUploader/FileUploader.vue2.js +95 -73
  72. package/dist/components/2_chatinput_elements/FileUploader/icons/FileUploaderIcon.vue.js +17 -15
  73. package/dist/components/2_chatinput_elements/FileUploader/icons/FileUploaderIcon.vue2.js +2 -13
  74. package/dist/components/2_chatinput_elements/PlaceholderComponent/PlaceholderComponent.vue.js +33 -39
  75. package/dist/components/2_chatinput_elements/StickerPicker/StickerPicker.vue.js +4 -220
  76. package/dist/components/2_chatinput_elements/StickerPicker/StickerPicker.vue2.js +256 -146
  77. package/dist/components/2_chatinput_elements/StickerPicker/icons/StickerIcon.vue.js +41 -39
  78. package/dist/components/2_chatinput_elements/StickerPicker/icons/StickerIcon.vue2.js +2 -13
  79. package/dist/components/2_chatinput_elements/TemplateSelector/TemplateSelector.vue.js +163 -233
  80. package/dist/components/2_chatinput_elements/TextFormatToolbar/TextFormatToolbar.vue.js +4 -164
  81. package/dist/components/2_chatinput_elements/TextFormatToolbar/TextFormatToolbar.vue2.js +175 -87
  82. package/dist/components/2_chatinput_elements/WABAAttachmentSection/WABAAttachmentSection.vue.js +4 -73
  83. package/dist/components/2_chatinput_elements/WABAAttachmentSection/WABAAttachmentSection.vue2.js +60 -34
  84. package/dist/components/2_chatinput_elements/WABAQuickReplyButtons/WABAQuickReplyButtons.vue.js +4 -47
  85. package/dist/components/2_chatinput_elements/WABAQuickReplyButtons/WABAQuickReplyButtons.vue2.js +23 -10
  86. package/dist/components/2_chatinput_elements/WABASeparatedQuickButtons/WABASeparatedQuickButtons.vue.js +4 -52
  87. package/dist/components/2_chatinput_elements/WABASeparatedQuickButtons/WABASeparatedQuickButtons.vue2.js +26 -8
  88. package/dist/components/2_chatinput_elements/WABATemplateSelector/WABATemplateSelector.vue.js +220 -299
  89. package/dist/components/2_chatlist_elements/ChatFilter/ChatFilter.vue.js +33 -39
  90. package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue.js +4 -306
  91. package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue2.js +311 -134
  92. package/dist/components/2_chatlist_elements/ChatItem/icons/AudioIcon.vue.js +12 -18
  93. package/dist/components/2_chatlist_elements/ChatItem/icons/FileIcon.vue.js +11 -23
  94. package/dist/components/2_chatlist_elements/ChatItem/icons/ImageIcon.vue.js +7 -7
  95. package/dist/components/2_chatlist_elements/ChatItem/icons/MissedCallIcon.vue.js +22 -34
  96. package/dist/components/2_chatlist_elements/ChatItem/icons/StickerIcon.vue.js +9 -15
  97. package/dist/components/2_chatlist_elements/ChatItem/icons/VideoIcon.vue.js +14 -26
  98. package/dist/components/2_chatlist_elements/ChatItem/icons/VoiceIcon.vue.js +7 -7
  99. package/dist/components/2_chatlist_elements/ChatTabs/ChatTabs.vue.js +24 -52
  100. package/dist/components/2_elements/AudioRecorder/AudioRecorder.vue.js +4 -84
  101. package/dist/components/2_elements/AudioRecorder/AudioRecorder.vue2.js +67 -35
  102. package/dist/components/2_elements/ChannelSelector/ChannelSelector.vue.js +38 -72
  103. package/dist/components/2_elements/ChatInfo/ChatInfo.vue.js +57 -76
  104. package/dist/components/2_elements/ChatPanel/ChatPanel.vue.js +29 -41
  105. package/dist/components/2_elements/ContactInfo/ContactInfo.vue.js +115 -176
  106. package/dist/components/2_elements/ThemeMode/ThemeMode.vue.js +27 -48
  107. package/dist/components/2_elements/UserProfile/UserProfile.vue.js +28 -58
  108. package/dist/components/2_elements/VideoRecorder/VideoRecorder.vue.js +4 -54
  109. package/dist/components/2_elements/VideoRecorder/VideoRecorder.vue2.js +39 -19
  110. package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue.js +4 -458
  111. package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue2.js +471 -160
  112. package/dist/components/2_feed_elements/BaseEditMessage/BaseEditMessage.vue.js +4 -19
  113. package/dist/components/2_feed_elements/BaseEditMessage/BaseEditMessage.vue2.js +22 -12
  114. package/dist/components/2_feed_elements/BaseReplyMessage/BaseReplyMessage.vue.js +4 -26
  115. package/dist/components/2_feed_elements/BaseReplyMessage/BaseReplyMessage.vue2.js +39 -26
  116. package/dist/components/2_feed_elements/CallMessage/CallMessage.vue.js +4 -482
  117. package/dist/components/2_feed_elements/CallMessage/CallMessage.vue2.js +448 -148
  118. package/dist/components/2_feed_elements/CallMessage/icons/IncomingCallIcon.vue.js +19 -17
  119. package/dist/components/2_feed_elements/CallMessage/icons/IncomingCallIcon.vue2.js +2 -13
  120. package/dist/components/2_feed_elements/CallMessage/icons/OutgoingCallIcon.vue.js +19 -17
  121. package/dist/components/2_feed_elements/CallMessage/icons/OutgoingCallIcon.vue2.js +2 -13
  122. package/dist/components/2_feed_elements/DateMessage/DateMessage.vue.js +4 -17
  123. package/dist/components/2_feed_elements/DateMessage/DateMessage.vue2.js +7 -7
  124. package/dist/components/2_feed_elements/DateMessageSticky/DateMessageSticky.vue.js +3 -16
  125. package/dist/components/2_feed_elements/DateMessageSticky/DateMessageSticky.vue2.js +7 -7
  126. package/dist/components/2_feed_elements/DeletedMessageContent/DeletedMessageContent.vue.js +4 -67
  127. package/dist/components/2_feed_elements/DeletedMessageContent/DeletedMessageContent.vue2.js +43 -11
  128. package/dist/components/2_feed_elements/DeletedMessageContent/icons/DeletedMessageIcon.vue.js +10 -16
  129. package/dist/components/2_feed_elements/DelimiterMessage/DelimiterMessage.vue.js +4 -60
  130. package/dist/components/2_feed_elements/DelimiterMessage/DelimiterMessage.vue2.js +53 -36
  131. package/dist/components/2_feed_elements/EditTextMessage/EditTextMessage.vue.js +4 -22
  132. package/dist/components/2_feed_elements/EditTextMessage/EditTextMessage.vue2.js +15 -8
  133. package/dist/components/2_feed_elements/FeedKeyboard/FeedKeyboard.vue.js +4 -43
  134. package/dist/components/2_feed_elements/FeedKeyboard/FeedKeyboard.vue2.js +25 -10
  135. package/dist/components/2_feed_elements/FileMessage/FileMessage.vue.js +4 -250
  136. package/dist/components/2_feed_elements/FileMessage/FileMessage.vue2.js +233 -67
  137. package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue.js +4 -315
  138. package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue2.js +319 -98
  139. package/dist/components/2_feed_elements/MessageKeyboard/MessageKeyboard.vue.js +4 -39
  140. package/dist/components/2_feed_elements/MessageKeyboard/MessageKeyboard.vue2.js +22 -12
  141. package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue.js +4 -155
  142. package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue2.js +212 -110
  143. package/dist/components/2_feed_elements/MessageReactions/icons/DeleteIcon.vue.js +20 -32
  144. package/dist/components/2_feed_elements/MessageReactions/icons/EditIcon.vue.js +20 -32
  145. package/dist/components/2_feed_elements/MessageReactions/icons/ExpandReactionsIcon.vue.js +11 -17
  146. package/dist/components/2_feed_elements/MessageReactions/icons/MessageActionsIcon.vue.js +10 -16
  147. package/dist/components/2_feed_elements/MessageReactions/icons/ReplyIcon.vue.js +11 -17
  148. package/dist/components/2_feed_elements/MessageSmsInvite/MessageSmsInvite.vue.js +4 -22
  149. package/dist/components/2_feed_elements/MessageSmsInvite/MessageSmsInvite.vue2.js +23 -17
  150. package/dist/components/2_feed_elements/MessageStatusIndicator/MessageStatusIndicator.vue.js +4 -28
  151. package/dist/components/2_feed_elements/MessageStatusIndicator/MessageStatusIndicator.vue2.js +29 -27
  152. package/dist/components/2_feed_elements/MissedCallMessage/MissedCallMessage.vue.js +4 -142
  153. package/dist/components/2_feed_elements/MissedCallMessage/MissedCallMessage.vue2.js +121 -33
  154. package/dist/components/2_feed_elements/MissedCallMessage/icons/MissedCallIcon.vue.js +22 -34
  155. package/dist/components/2_feed_elements/ReplyAudioMessage/ReplyAudioMessage.vue.js +4 -55
  156. package/dist/components/2_feed_elements/ReplyAudioMessage/ReplyAudioMessage.vue2.js +30 -8
  157. package/dist/components/2_feed_elements/ReplyCallMessage/ReplyCallMessage.vue.js +4 -47
  158. package/dist/components/2_feed_elements/ReplyCallMessage/ReplyCallMessage.vue2.js +25 -9
  159. package/dist/components/2_feed_elements/ReplyFileMessage/ReplyFileMessage.vue.js +4 -56
  160. package/dist/components/2_feed_elements/ReplyFileMessage/ReplyFileMessage.vue2.js +37 -8
  161. package/dist/components/2_feed_elements/ReplyImageMessage/ReplyImageMessage.vue.js +4 -72
  162. package/dist/components/2_feed_elements/ReplyImageMessage/ReplyImageMessage.vue2.js +59 -10
  163. package/dist/components/2_feed_elements/ReplyStickerMessage/ReplyStickerMessage.vue.js +4 -142
  164. package/dist/components/2_feed_elements/ReplyStickerMessage/ReplyStickerMessage.vue2.js +120 -36
  165. package/dist/components/2_feed_elements/ReplyTextMessage/ReplyTextMessage.vue.js +4 -49
  166. package/dist/components/2_feed_elements/ReplyTextMessage/ReplyTextMessage.vue2.js +53 -15
  167. package/dist/components/2_feed_elements/ReplyVideoMessage/ReplyVideoMessage.vue.js +4 -75
  168. package/dist/components/2_feed_elements/ReplyVideoMessage/ReplyVideoMessage.vue2.js +63 -10
  169. package/dist/components/2_feed_elements/SplashScreen/SplashScreen.vue.js +4 -18
  170. package/dist/components/2_feed_elements/SplashScreen/SplashScreen.vue2.js +17 -9
  171. package/dist/components/2_feed_elements/StickerMessage/StickerMessage.vue.js +4 -346
  172. package/dist/components/2_feed_elements/StickerMessage/StickerMessage.vue2.js +307 -73
  173. package/dist/components/2_feed_elements/SystemMessage/SystemMessage.vue.js +4 -17
  174. package/dist/components/2_feed_elements/SystemMessage/SystemMessage.vue2.js +7 -7
  175. package/dist/components/2_feed_elements/TextMessage/TextMessage.vue.js +4 -307
  176. package/dist/components/2_feed_elements/TextMessage/TextMessage.vue2.js +269 -65
  177. package/dist/components/2_feed_elements/TypingMessage/TypingMessage.vue.js +4 -37
  178. package/dist/components/2_feed_elements/TypingMessage/TypingMessage.vue2.js +21 -7
  179. package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue.js +4 -307
  180. package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue2.js +298 -76
  181. package/dist/components/2_modals/ConfirmDeleteMessage/ConfirmDeleteMessage.vue.js +4 -64
  182. package/dist/components/2_modals/ConfirmDeleteMessage/ConfirmDeleteMessage.vue3.js +45 -10
  183. package/dist/components/2_modals/CreateChat/CreateChat.vue.js +18 -35
  184. package/dist/components/2_modals/CreateChat2/CreateChat2.vue.js +92 -140
  185. package/dist/components/2_modals/CreateDialog/CreateDialog.vue.js +49 -96
  186. package/dist/components/2_modals/Modal/Modal.vue.js +50 -59
  187. package/dist/components/2_modals/ModalFullscreen/ModalFullscreen.vue.js +38 -51
  188. package/dist/components/2_modals/ModalNoFooter/ModalNoFooter.vue.js +30 -39
  189. package/dist/components/2_modals/ModalVideoRecorder/ModalVideoRecorder.vue.js +4 -155
  190. package/dist/components/2_modals/ModalVideoRecorder/ModalVideoRecorder.vue2.js +121 -49
  191. package/dist/components/2_modals/SelectUser/SelectUser.vue.js +43 -60
  192. package/dist/components/2_modals/SelectUser2/SelectUser2.vue.js +24 -41
  193. package/dist/components/3_compounds/ChatInput/ChatInput.vue.js +4 -85
  194. package/dist/components/3_compounds/ChatInput/ChatInput.vue2.js +210 -149
  195. package/dist/components/3_compounds/ChatInput/icons/SendIcon.vue.js +21 -25
  196. package/dist/components/3_compounds/ChatInput/icons/SendIcon.vue2.js +2 -13
  197. package/dist/components/3_compounds/ChatList/ChatList.vue.js +163 -253
  198. package/dist/components/3_compounds/ChatList/ChatListHeader.vue.js +32 -50
  199. package/dist/components/3_compounds/ChatList/icons/LogoIcon.vue.js +6 -6
  200. package/dist/components/3_compounds/Feed/Feed.vue.js +4 -172
  201. package/dist/components/3_compounds/Feed/Feed.vue2.js +257 -126
  202. package/dist/components/3_compounds/SideBar/SideBar.vue.js +202 -279
  203. package/dist/components/4_layouts/AdaptiveExtendedLayout/AdaptiveExtendedLayout.vue.js +36 -43
  204. package/dist/components/4_layouts/BaseLayout/BaseLayout.vue.js +5 -5
  205. package/dist/components/4_layouts/ChatWrapper/ChatWrapper.vue.js +4 -32
  206. package/dist/components/4_layouts/ChatWrapper/ChatWrapper.vue2.js +29 -7
  207. package/dist/components/4_layouts/ExtendedLayout/ExtendedLayout.vue.js +7 -7
  208. package/dist/components/4_layouts/FeedLayout/FeedLayout.vue.js +8 -8
  209. package/dist/components/5_containers/BaseContainer/BaseContainer.vue.js +18 -31
  210. package/dist/components/5_containers/FloatContainer/FloatContainer.vue.js +56 -85
  211. package/package.json +1 -1
@@ -1,88 +1,7 @@
1
- import h from "./ChatInput.vue2.js";
2
- import { createElementBlock as o, openBlock as i, createElementVNode as t, createVNode as d, normalizeClass as l, createBlock as p, createCommentVNode as c, renderSlot as s, toDisplayString as u, withDirectives as m, withKeys as f, vModelText as v } from "vue";
1
+ import t from "./ChatInput.vue2.js";
3
2
  /* empty css */
4
- import b from "../../../_virtual/_plugin-vue_export-helper.js";
5
- const g = { class: "chat-input__container" }, M = ["id"], y = ["id"], I = { class: "chat-input__inline-buttons" }, S = {
6
- key: 0,
7
- class: "chat-input__input chat-input__disabled-placeholder"
8
- }, w = {
9
- key: 1,
10
- class: "chat-input__input-wrap"
11
- }, k = ["innerHTML"], C = ["disabled", "placeholder"], x = ["disabled"], P = { class: "" }, A = { class: "chat-input__third-line" };
12
- function T(a, r, n, e, j, B) {
13
- return i(), o("div", g, [
14
- t("div", {
15
- id: "chat-input-reply-line-" + e.chatAppId,
16
- class: "chat-input__reply-line"
17
- }, null, 8, M),
18
- t("div", {
19
- id: "chat-input-file-line-" + e.chatAppId,
20
- class: l(["chat-input__file-line", { "chat-input__file-line--visible": !!e.filePreview }])
21
- }, [
22
- e.filePreview ? (i(), p(e.FilePreview, {
23
- key: 0,
24
- "file-info": e.filePreview,
25
- onReset: e.resetSelectedFile
26
- }, null, 8, ["file-info"])) : c("v-if", !0)
27
- ], 10, y),
28
- t("div", I, [
29
- s(a.$slots, "inline-buttons", {}, void 0, !0)
30
- ]),
31
- n.disabledPlaceholder && (n.state == "disabled" || e.getMessage().isRecording) ? (i(), o(
32
- "div",
33
- S,
34
- u(n.disabledPlaceholder),
35
- 1
36
- /* TEXT */
37
- )) : (i(), o("div", w, [
38
- e.useEmojiMirror ? (i(), o("div", {
39
- key: 0,
40
- ref: "refMirror",
41
- class: "chat-input__input-mirror",
42
- "aria-hidden": "true",
43
- innerHTML: e.emojiMirrorHtml
44
- }, null, 8, k)) : c("v-if", !0),
45
- m(t("textarea", {
46
- ref: "refInput",
47
- "onUpdate:modelValue": r[0] || (r[0] = (_) => e.getMessage().text = _),
48
- rows: "1",
49
- disabled: n.state == "disabled" || e.getMessage().isRecording,
50
- class: l(["chat-input__input", { "chat-input__input--emoji-images": e.useEmojiMirror }]),
51
- placeholder: e.inputPlaceholder,
52
- onKeydown: [
53
- e.onInputKeydown,
54
- f(e.keyEnter, ["enter"])
55
- ],
56
- onInput: e.sendTyping,
57
- onScroll: e.syncMirrorScroll,
58
- onSelect: e.updateSelectionState,
59
- onMouseup: e.snapCaretAndUpdateSelection,
60
- onKeyup: e.snapCaretAndUpdateSelection,
61
- onMousemove: e.onInputMouseMove,
62
- onBlur: e.clearSelectionHighlight
63
- }, null, 42, C), [
64
- [v, e.getMessage().text]
65
- ])
66
- ])),
67
- d(e.TextFormatToolbar, {
68
- textarea: e.refInput,
69
- onFormatApplied: e.handleFormatApplied
70
- }, null, 8, ["textarea"]),
71
- t("button", {
72
- class: l(["chat-input__button", { "chat-input__button-disabled": e.disabledSendButton }]),
73
- disabled: e.getMessage().isRecording,
74
- onClick: e.sendMessage
75
- }, [
76
- t("span", P, [
77
- d(e.SendIcon, { color: e.sendIconColor }, null, 8, ["color"])
78
- ])
79
- ], 10, x),
80
- t("div", A, [
81
- s(a.$slots, "buttons", {}, void 0, !0)
82
- ])
83
- ]);
84
- }
85
- const R = /* @__PURE__ */ b(h, [["render", T], ["__scopeId", "data-v-c1d61267"], ["__file", "/var/store/dev-space/repos-projects/chotto/chotto/src/components/3_compounds/ChatInput/ChatInput.vue"]]);
3
+ import o from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-9ff21b69"]]);
86
5
  export {
87
- R as default
6
+ a as default
88
7
  };
@@ -1,9 +1,9 @@
1
- import { defineComponent as ye, inject as xe, watch as f, ref as F, computed as x, nextTick as S, unref as Se, onMounted as Ie, onUnmounted as Te } from "vue";
2
- import { useImmediateDebouncedRef as we } from "../../../hooks/useImmediateDebouncedRef.js";
3
- import { useMessageDraft as Ce, commitChatDraftToList as Ae } 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 Ee } from "../../../hooks/useEmojiNative.js";
6
+ import { useEmojiNative as Pe } from "../../../hooks/useEmojiNative.js";
7
7
  /* empty css */
8
8
  /* empty css */
9
9
  import { t as I } from "../../../locale/useLocale.js";
@@ -11,12 +11,18 @@ import { t as I } from "../../../locale/useLocale.js";
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 Fe, textContainsEmoji as be, snapIndexToGrapheme as J, previousGraphemeIndex as Q, nextGraphemeIndex as V } from "../../../functions/renderAppleEmojis.js";
15
- import { hideEditPreview as Me } from "../../../hooks/messages/useStartEdit.js";
16
- import Re from "./icons/SendIcon.vue.js";
17
- import He from "../../2_chatinput_elements/TextFormatToolbar/TextFormatToolbar.vue.js";
18
- import De from "../../2_chatinput_elements/FilePreview/FilePreview.vue.js";
19
- const H = 40, Xe = /* @__PURE__ */ ye({
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
+ key: 0,
21
+ class: "chat-input__input chat-input__disabled-placeholder"
22
+ }, Ve = {
23
+ key: 1,
24
+ class: "chat-input__input-wrap"
25
+ }, $e = ["innerHTML"], Je = ["disabled", "placeholder"], Qe = ["disabled"], Xe = { class: "" }, Ze = { class: "chat-input__third-line" }, K = 40, xt = /* @__PURE__ */ be({
20
26
  __name: "ChatInput",
21
27
  props: {
22
28
  state: {
@@ -45,252 +51,251 @@ const H = 40, Xe = /* @__PURE__ */ ye({
45
51
  }
46
52
  },
47
53
  emits: ["send", "typing"],
48
- setup(X, { expose: Z, emit: ee }) {
49
- Z();
50
- const b = ee, M = xe("chatAppId"), { resetMessage: _, getMessage: l, setMessageText: T, setForceSendMessage: q, resetEdit: j, resetMessageFile: z } = Ce(M), { isNative: k } = Ee(M);
51
- let R = l().id;
52
- f(
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(
53
58
  () => l().id,
54
59
  (e) => {
55
- R = e;
60
+ j = e;
56
61
  }
57
62
  );
58
- const n = F(), h = F(), d = F(null), v = F(!1), B = we("", 2e3), te = x(() => {
63
+ const n = E(), m = E(), v = E(null), w = E(!1), ie = ke("", 2e3), D = _(() => {
59
64
  var e;
60
65
  return (e = l().file) == null ? void 0 : e.preview;
61
- }), ne = x(
62
- () => Fe(l().text || "", d.value)
63
- ), w = x(
64
- () => !k.value && be(l().text || "")
65
- ), u = () => {
66
- if (!h.value || !n.value) return;
67
- const e = n.value, t = h.value, i = Math.max(0, e.offsetWidth - e.clientWidth);
68
- t.style.right = i > 0 ? `${i}px` : "", t.scrollTop = e.scrollTop;
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;
69
74
  };
70
- let c = 0;
71
- function D() {
72
- d.value = null;
75
+ let y = 0;
76
+ function P() {
77
+ v.value = null;
73
78
  }
74
- function K(e = "nearest") {
79
+ function le(e = "nearest") {
75
80
  const t = n.value;
76
- if (!t || !w.value) return;
77
- const i = t.value, o = J(i, t.selectionStart, e), a = J(i, t.selectionEnd, e);
78
- (o !== t.selectionStart || a !== t.selectionEnd) && t.setSelectionRange(o, a);
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);
79
84
  }
80
- function O() {
81
- K("nearest"), p();
85
+ function W() {
86
+ le("nearest"), f();
82
87
  }
83
- function oe(e) {
84
- if (!w.value || e.key !== "ArrowLeft" && e.key !== "ArrowRight" || e.altKey || e.metaKey || e.ctrlKey) return;
88
+ function se(e) {
89
+ if (!g.value || e.key !== "ArrowLeft" && e.key !== "ArrowRight" || e.altKey || e.metaKey || e.ctrlKey) return;
85
90
  const t = n.value;
86
91
  if (!t) return;
87
- const i = t.value, o = t.selectionStart !== t.selectionEnd;
92
+ const o = t.value, i = t.selectionStart !== t.selectionEnd;
88
93
  if (e.shiftKey) {
89
- requestAnimationFrame(() => O());
94
+ requestAnimationFrame(() => W());
90
95
  return;
91
96
  }
92
- if (o) {
97
+ if (i) {
93
98
  e.preventDefault();
94
- const y = e.key === "ArrowLeft" ? t.selectionStart : t.selectionEnd, E = e.key === "ArrowLeft" ? Q(i, y) : V(i, y);
95
- t.setSelectionRange(E, E), 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();
96
101
  return;
97
102
  }
98
103
  e.preventDefault();
99
- const a = t.selectionStart, m = e.key === "ArrowLeft" ? Q(i, a) : V(i, a);
100
- t.setSelectionRange(m, m), p();
104
+ const r = t.selectionStart, p = e.key === "ArrowLeft" ? V(o, r) : $(o, r);
105
+ t.setSelectionRange(p, p), f();
101
106
  }
102
- function p() {
103
- if (!w.value) {
104
- D();
107
+ function f() {
108
+ if (!g.value) {
109
+ P();
105
110
  return;
106
111
  }
107
- c && cancelAnimationFrame(c), c = requestAnimationFrame(() => {
108
- var m;
109
- c = 0;
112
+ y && cancelAnimationFrame(y), y = requestAnimationFrame(() => {
113
+ var p;
114
+ y = 0;
110
115
  const e = n.value;
111
116
  if (!e) {
112
- D();
117
+ P();
113
118
  return;
114
119
  }
115
- const t = e.selectionStart, i = e.selectionEnd;
116
- if (t === i) {
117
- d.value !== null && (d.value = null, S(u));
120
+ const t = e.selectionStart, o = e.selectionEnd;
121
+ if (t === o) {
122
+ v.value !== null && (v.value = null, S(c));
118
123
  return;
119
124
  }
120
- const o = d.value;
121
- if (o && o.start === t && o.end === i) return;
122
- const a = ((m = h.value) == null ? void 0 : m.scrollTop) ?? 0;
123
- d.value = { start: t, end: i }, S(() => {
124
- h.value && (h.value.scrollTop = a), u();
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();
125
130
  });
126
131
  });
127
132
  }
128
- function ie(e) {
129
- e.buttons && p();
133
+ function ae(e) {
134
+ e.buttons && f();
130
135
  }
131
- function L() {
132
- document.activeElement === n.value && p();
136
+ function N() {
137
+ document.activeElement === n.value && f();
133
138
  }
134
- const s = X, le = x(() => !!(s.state == "disabled" || l().text == "" && !l().file || l().isRecording)), re = x(() => {
139
+ const a = T, re = _(() => !!(a.state == "disabled" || l().text == "" && !l().file || l().isRecording)), ue = _(() => {
135
140
  var t;
136
- if (s.inputButtonColor)
137
- return s.inputButtonColor;
138
- if (!((t = s.selectedChannel) != null && t.channelId))
141
+ if (a.inputButtonColor)
142
+ return a.inputButtonColor;
143
+ if (!((t = a.selectedChannel) != null && t.channelId))
139
144
  return "#25D366";
140
- const e = s.selectedChannel.channelId.toLowerCase();
145
+ const e = a.selectedChannel.channelId.toLowerCase();
141
146
  return e.includes("whatsapp") || e.includes("waba") ? "#25D366" : e.includes("telegram") ? "#37AFE2" : e.includes("sms") ? "#6C757D" : e.includes("max") ? "#4B0082" : "#25D366";
142
- }), se = x(() => {
147
+ }), ce = _(() => {
143
148
  var t;
144
- if (!((t = s.selectedChannel) != null && t.channelId))
149
+ if (!((t = a.selectedChannel) != null && t.channelId))
145
150
  return I("component.ChatInput.InputPlaceholder");
146
- const e = s.selectedChannel.channelId.toLowerCase();
151
+ const e = a.selectedChannel.channelId.toLowerCase();
147
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");
148
153
  });
149
- f(
150
- () => B.value,
154
+ d(
155
+ () => ie.value,
151
156
  () => {
152
- b("typing");
157
+ L("typing");
153
158
  }
154
- ), f(
159
+ ), d(
155
160
  () => {
156
161
  var e;
157
162
  return (e = l().edit) == null ? void 0 : e.messageId;
158
163
  },
159
164
  (e, t) => {
160
- e != null && e !== t && (v.value = !0, S(() => {
161
- if (!v.value) return;
162
- const i = n.value;
163
- i && (g(i), v.value = !1, A(i), requestAnimationFrame(() => A(i)));
165
+ e != null && e !== t && (w.value = !0, S(() => {
166
+ if (!w.value) return;
167
+ const o = n.value;
168
+ o && (C(o), w.value = !1, H(o), requestAnimationFrame(() => H(o)));
164
169
  }));
165
170
  }
166
- ), f(
167
- () => s.focusOnInputArea,
171
+ ), d(
172
+ () => a.focusOnInputArea,
168
173
  () => {
169
- s.focusOnInputArea && S(() => {
170
- const e = Se(n);
174
+ a.focusOnInputArea && S(() => {
175
+ const e = u(n);
171
176
  e == null || e.focus();
172
177
  });
173
178
  },
174
179
  { immediate: !0 }
175
- ), f(
180
+ ), d(
176
181
  () => l().text,
177
182
  () => {
178
183
  const e = n.value;
179
- e && (g(e), v.value && (v.value = !1, A(e), requestAnimationFrame(() => A(e))));
184
+ e && (C(e), w.value && (w.value = !1, H(e), requestAnimationFrame(() => H(e))));
180
185
  },
181
186
  { immediate: !0, flush: "post" }
182
- ), f(
187
+ ), d(
183
188
  () => l().id,
184
189
  () => {
185
190
  const e = n.value;
186
- e && (C(e), requestAnimationFrame(() => {
191
+ e && (R(e), requestAnimationFrame(() => {
187
192
  const t = n.value;
188
- t && g(t);
193
+ t && C(t);
189
194
  }));
190
195
  }
191
- ), f(w, (e) => {
196
+ ), d(g, (e) => {
192
197
  e && S(() => {
193
198
  const t = n.value;
194
199
  if (!t) return;
195
- const i = t.scrollTop;
196
- g(t), t.scrollTop = i, u(), requestAnimationFrame(u);
200
+ const o = t.scrollTop;
201
+ C(t), t.scrollTop = o, c(), requestAnimationFrame(c);
197
202
  });
198
203
  });
199
- function C(e) {
204
+ function R(e) {
200
205
  const t = l().inputHeight;
201
- e.style.height = (t || H) + "px", (!t || t <= H) && (e.style.overflowY = "hidden");
206
+ e.style.height = (t || K) + "px", (!t || t <= K) && (e.style.overflowY = "hidden");
202
207
  }
203
- function G(e) {
208
+ function de(e) {
204
209
  const t = parseFloat(e.style.height);
205
210
  Number.isFinite(t) && (l().inputHeight = t);
206
211
  }
207
- function g(e) {
212
+ function C(e) {
208
213
  const t = l().text || "";
209
214
  if (e.value !== t || e.clientWidth === 0) {
210
- C(e);
215
+ R(e);
211
216
  return;
212
217
  }
213
- const i = e.scrollTop;
218
+ const o = e.scrollTop;
214
219
  e.style.height = "auto";
215
- const o = getComputedStyle(e), a = parseFloat(o.fontSize) || 16, m = parseFloat(o.lineHeight) || a * 1.4, y = H, E = m * 11, W = e.scrollHeight, de = t.split(`
216
- `).length > 1, r = document.createElement("div");
217
- r.style.position = "absolute", r.style.visibility = "hidden", r.style.whiteSpace = "nowrap", r.style.font = o.font, r.style.fontSize = o.fontSize, r.style.fontFamily = o.fontFamily, r.style.fontWeight = o.fontWeight, r.style.letterSpacing = o.letterSpacing, r.textContent = t, document.body.appendChild(r);
218
- const pe = r.offsetWidth;
219
- document.body.removeChild(r);
220
- const me = parseFloat(o.paddingLeft) || 0, he = parseFloat(o.paddingRight) || 0, ve = e.clientWidth - me - he, ge = pe > ve, $ = de || ge;
221
- if ($ && W <= y + 1) {
222
- C(e);
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(`
221
+ `).length > 1, s = document.createElement("div");
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;
224
+ document.body.removeChild(s);
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);
223
228
  return;
224
229
  }
225
- t.trim() && $ ? W <= E ? (e.style.height = W + "px", e.style.overflowY = "hidden") : (e.style.height = E + "px", e.style.overflowY = "auto", e.scrollTop = i) : (e.style.height = y + "px", e.style.overflowY = "hidden"), G(e), u(), requestAnimationFrame(u);
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);
226
231
  }
227
- function A(e) {
228
- if (s.state === "disabled" || l().isRecording) return;
232
+ function H(e) {
233
+ if (a.state === "disabled" || l().isRecording) return;
229
234
  const t = e.value.length;
230
- e.focus(), e.setSelectionRange(t, t), e.scrollTop = e.scrollHeight, u();
235
+ e.focus(), e.setSelectionRange(t, t), e.scrollTop = e.scrollHeight, c();
231
236
  }
232
- f(
237
+ d(
233
238
  () => l().forceSend,
234
239
  () => {
235
- l().forceSend && (P(), q(!1));
240
+ l().forceSend && (q(), Z(!1));
236
241
  }
237
242
  );
238
- const ae = (e) => {
243
+ const fe = (e) => {
239
244
  const t = e.target;
240
- b("typing", t.value), p();
245
+ L("typing", t.value), f();
241
246
  };
242
- Ie(() => {
247
+ Ce(() => {
243
248
  const e = n.value;
244
- e && (C(e), g(e)), document.addEventListener("selectionchange", L);
245
- }), Te(() => {
246
- Ae(R), document.removeEventListener("selectionchange", L), c && cancelAnimationFrame(c);
249
+ e && (R(e), C(e)), document.addEventListener("selectionchange", N);
250
+ }), Ae(() => {
251
+ De(j), document.removeEventListener("selectionchange", N), y && cancelAnimationFrame(y);
247
252
  });
248
- const ue = (e) => {
253
+ const pe = (e) => {
249
254
  if (e.shiftKey) {
250
255
  if (n.value instanceof HTMLTextAreaElement) {
251
256
  let t = n.value.selectionStart;
252
257
  t && (n.value.setRangeText(`
253
- `, t, t, "end"), T(n.value.value));
258
+ `, t, t, "end"), M(n.value.value));
254
259
  }
255
260
  e.preventDefault();
256
261
  } else if (e.ctrlKey) {
257
262
  if (n.value instanceof HTMLTextAreaElement) {
258
263
  let t = n.value.selectionStart;
259
264
  t && (n.value.setRangeText(`
260
- `, t, t, "end"), T(n.value.value));
265
+ `, t, t, "end"), M(n.value.value));
261
266
  }
262
267
  e.preventDefault();
263
268
  } else
264
- e.preventDefault(), P();
265
- }, ce = (e) => {
269
+ e.preventDefault(), q();
270
+ }, he = (e) => {
266
271
  if (n.value) {
267
272
  const t = n.value.value;
268
273
  n.value.value = e.newText;
269
- const i = e.newText.length - (t.length - (e.end - e.start)), o = e.start + i;
270
- T(e.newText), S(() => {
271
- n.value && (n.value.setSelectionRange(o, o), n.value.focus());
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());
272
277
  });
273
278
  }
274
279
  };
275
- function fe() {
276
- z();
280
+ function me() {
281
+ te();
277
282
  }
278
- function N() {
279
- j(), T(""), Me(M), n.value && n.value.focus();
283
+ function ve() {
284
+ ee(), M(""), Be(b), n.value && n.value.focus();
280
285
  }
281
- function Y() {
286
+ function ge() {
282
287
  const e = l();
283
288
  return e.edit ? (e.text ?? "").trim() === (e.edit.text ?? "").trim() : !1;
284
289
  }
285
- const P = () => {
286
- var t, i;
287
- const e = F(l());
288
- if (e.value.edit && Y()) {
289
- N();
290
+ const q = () => {
291
+ var t, o;
292
+ const e = E(l());
293
+ if (e.value.edit && ge()) {
294
+ ve();
290
295
  return;
291
296
  }
292
297
  if (e.value.text != "" || e.value.file) {
293
- const o = {
298
+ const i = {
294
299
  type: "",
295
300
  text: "",
296
301
  url: "",
@@ -298,22 +303,78 @@ const H = 40, Xe = /* @__PURE__ */ ye({
298
303
  size: "",
299
304
  reply: void 0
300
305
  };
301
- e.value.file ? (o.type = "message." + e.value.file.type, o.url = e.value.file.url, o.filename = e.value.file.name, o.size = (t = e.value.file.size) == null ? void 0 : t.toString(), o.text = (i = e == null ? void 0 : e.value) == null ? void 0 : i.text.trim()) : (o.type = "message.text", o.text = e.value.text.trim()), e.value.reply && (o.reply = e.value.reply), e.value.edit && (o.edit = e.value.edit), b("send", o), _(), n.value && n.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();
302
307
  }
303
- }, U = { emit: b, chatAppId: M, resetMessage: _, getMessage: l, setMessageText: T, setForceSendMessage: q, resetEdit: j, resetMessageFile: z, isNative: k, get ownedDraftId() {
304
- return R;
305
- }, set ownedDraftId(e) {
306
- R = e;
307
- }, refInput: n, refMirror: h, selectionRange: d, focusAtEndAfterResize: v, typing: B, filePreview: te, emojiMirrorHtml: ne, useEmojiMirror: w, syncMirrorScroll: u, get selectionSyncRaf() {
308
- return c;
309
- }, set selectionSyncRaf(e) {
310
- c = e;
311
- }, clearSelectionHighlight: D, snapTextareaCaret: K, snapCaretAndUpdateSelection: O, onInputKeydown: oe, updateSelectionState: p, onInputMouseMove: ie, onDocumentSelectionChange: L, props: s, disabledSendButton: le, sendIconColor: re, inputPlaceholder: se, INPUT_MIN_HEIGHT: H, applySavedInputHeight: C, persistInputHeight: G, resizeTextarea: g, applyFocusAtEnd: A, sendTyping: ae, keyEnter: ue, handleFormatApplied: ce, resetSelectedFile: fe, cancelEditMode: N, isEditTextUnchanged: Y, sendMessage: P, get SendIcon() {
312
- return Re;
313
- }, TextFormatToolbar: He, FilePreview: De };
314
- return Object.defineProperty(U, "__isScriptSetup", { enumerable: !1, value: !0 }), U;
308
+ };
309
+ return (e, t) => (F(), k("div", Ne, [
310
+ h("div", {
311
+ id: "chat-input-reply-line-" + u(b),
312
+ class: "chat-input__reply-line"
313
+ }, null, 8, Ge),
314
+ h("div", {
315
+ id: "chat-input-file-line-" + u(b),
316
+ class: z(["chat-input__file-line", { "chat-input__file-line--visible": !!D.value }])
317
+ }, [
318
+ D.value ? (F(), Ee(je, {
319
+ key: 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)
326
+ ]),
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", {
329
+ key: 0,
330
+ ref_key: "refMirror",
331
+ ref: m,
332
+ class: "chat-input__input-mirror",
333
+ "aria-hidden": "true",
334
+ innerHTML: oe.value
335
+ }, null, 8, $e)) : U("", !0),
336
+ Me(h("textarea", {
337
+ ref_key: "refInput",
338
+ ref: n,
339
+ "onUpdate:modelValue": t[0] || (t[0] = (o) => u(l)().text = o),
340
+ rows: "1",
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,
344
+ onKeydown: [
345
+ se,
346
+ Re(pe, ["enter"])
347
+ ],
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]
357
+ ])
358
+ ])),
359
+ O(Ke, {
360
+ textarea: n.value,
361
+ onFormatApplied: he
362
+ }, null, 8, ["textarea"]),
363
+ h("button", {
364
+ class: z(["chat-input__button", { "chat-input__button-disabled": re.value }]),
365
+ disabled: u(l)().isRecording,
366
+ onClick: q
367
+ }, [
368
+ h("span", Xe, [
369
+ O(u(ze), { color: ue.value }, null, 8, ["color"])
370
+ ])
371
+ ], 10, Qe),
372
+ h("div", Ze, [
373
+ Y(e.$slots, "buttons", {}, void 0, !0)
374
+ ])
375
+ ]));
315
376
  }
316
377
  });
317
378
  export {
318
- Xe as default
379
+ xt as default
319
380
  };