@mobilon-dev/chotto 0.3.96 → 0.3.98

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 +29 -4
  3. package/dist/components/1_atoms/ButtonContextMenu/ButtonContextMenu.vue2.js +42 -61
  4. package/dist/components/1_atoms/ContactContextMenu/ContactContextMenu.vue.js +47 -4
  5. package/dist/components/1_atoms/ContactContextMenu/ContactContextMenu.vue2.js +55 -82
  6. package/dist/components/1_atoms/ContextMenu/ContextMenu.vue.js +86 -51
  7. package/dist/components/1_atoms/EmbedPreview/EmbedPreview.vue.js +32 -4
  8. package/dist/components/1_atoms/EmbedPreview/EmbedPreview.vue2.js +7 -28
  9. package/dist/components/1_atoms/EmojiGlyph/EmojiGlyph.vue.js +22 -38
  10. package/dist/components/1_atoms/EmojiGlyph/EmojiGlyph.vue2.js +33 -2
  11. package/dist/components/1_atoms/LinkPreview/LinkPreview.vue.js +37 -4
  12. package/dist/components/1_atoms/LinkPreview/LinkPreview.vue2.js +7 -21
  13. package/dist/components/1_atoms/LoadingIndicator/LoadingIndicator.vue.js +30 -19
  14. package/dist/components/1_atoms/Tooltip/Tooltip.vue.js +70 -4
  15. package/dist/components/1_atoms/Tooltip/Tooltip.vue2.js +76 -108
  16. package/dist/components/1_icons/AvatarIcon.vue.js +8 -8
  17. package/dist/components/1_icons/CheckIcon.vue.js +26 -13
  18. package/dist/components/1_icons/CloseButtonIcon.vue.js +16 -10
  19. package/dist/components/1_icons/CloseIcon.vue.js +16 -10
  20. package/dist/components/1_icons/ContactCRMIcon.vue.js +16 -10
  21. package/dist/components/1_icons/MenuIcon.vue.js +16 -10
  22. package/dist/components/1_icons/MessageStatus/ErrorStatusIcon.vue.js +23 -3
  23. package/dist/components/1_icons/MessageStatus/ErrorStatusIcon.vue2.js +12 -21
  24. package/dist/components/1_icons/MessageStatus/PendingStatusIcon.vue.js +36 -4
  25. package/dist/components/1_icons/MessageStatus/PendingStatusIcon.vue2.js +11 -26
  26. package/dist/components/1_icons/MessageStatus/ReadStatusIcon.vue.js +23 -3
  27. package/dist/components/1_icons/MessageStatus/ReadStatusIcon.vue2.js +12 -21
  28. package/dist/components/1_icons/MessageStatus/ReceivedStatusIcon.vue.js +23 -3
  29. package/dist/components/1_icons/MessageStatus/ReceivedStatusIcon.vue2.js +11 -20
  30. package/dist/components/1_icons/MessageStatus/SentStatusIcon.vue.js +33 -4
  31. package/dist/components/1_icons/MessageStatus/SentStatusIcon.vue2.js +11 -23
  32. package/dist/components/1_icons/SearchIcon.vue.js +29 -17
  33. package/dist/components/1_icons/SettingsIcon.vue.js +8 -8
  34. package/dist/components/1_icons/TelegramIcon.vue.js +32 -20
  35. package/dist/components/1_icons/WhatsAppIcon.vue.js +32 -20
  36. package/dist/components/2_blocks/CommunicationPanel/CommunicationPanel.vue.js +546 -396
  37. package/dist/components/2_blocks/CommunicationPanel/CommunicationPanelAttributeIndicator.vue.js +101 -58
  38. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelCheckIcon.vue.js +14 -8
  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 +19 -13
  42. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSMSIcon.vue.js +16 -10
  43. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuMaxIcon.vue.js +35 -23
  44. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuPhoneIcon.vue.js +32 -20
  45. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuSMSIcon.vue.js +17 -11
  46. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuTelegramIcon.vue.js +8 -8
  47. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuWhatsAppIcon.vue.js +32 -20
  48. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelTelegramIcon.vue.js +33 -21
  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 +74 -4
  52. package/dist/components/2_blocks/FeedFoundItem/FeedFoundItem.vue2.js +8 -42
  53. package/dist/components/2_blocks/FeedFoundObjects/FeedFoundObjects.vue.js +62 -4
  54. package/dist/components/2_blocks/FeedFoundObjects/FeedFoundObjects.vue2.js +15 -36
  55. package/dist/components/2_blocks/FeedSearch/FeedSearch.vue.js +49 -4
  56. package/dist/components/2_blocks/FeedSearch/FeedSearch.vue2.js +22 -45
  57. package/dist/components/2_chatinput_elements/ButtonCommandsSelector/ButtonCommandsSelector.vue.js +36 -4
  58. package/dist/components/2_chatinput_elements/ButtonCommandsSelector/ButtonCommandsSelector.vue2.js +19 -37
  59. package/dist/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue.js +61 -4
  60. package/dist/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue2.js +79 -96
  61. package/dist/components/2_chatinput_elements/ButtonEmojiPicker/icons/SmilesIcon.vue.js +31 -27
  62. package/dist/components/2_chatinput_elements/ButtonEmojiPicker/icons/SmilesIcon.vue2.js +13 -2
  63. package/dist/components/2_chatinput_elements/ButtonTemplateSelector/ButtonTemplateSelector.vue.js +72 -4
  64. package/dist/components/2_chatinput_elements/ButtonTemplateSelector/ButtonTemplateSelector.vue2.js +47 -83
  65. package/dist/components/2_chatinput_elements/ButtonTemplateSelector/icons/ChatTemplatesIcon.vue.js +19 -21
  66. package/dist/components/2_chatinput_elements/ButtonTemplateSelector/icons/ChatTemplatesIcon.vue2.js +13 -2
  67. package/dist/components/2_chatinput_elements/ButtonWabaTemplateSelector/ButtonWabaTemplateSelector.vue.js +80 -51
  68. package/dist/components/2_chatinput_elements/FilePreview/FilePreview.vue.js +182 -4
  69. package/dist/components/2_chatinput_elements/FilePreview/FilePreview.vue2.js +25 -135
  70. package/dist/components/2_chatinput_elements/FileUploader/FileUploader.vue.js +78 -4
  71. package/dist/components/2_chatinput_elements/FileUploader/FileUploader.vue2.js +73 -95
  72. package/dist/components/2_chatinput_elements/FileUploader/icons/FileUploaderIcon.vue.js +15 -17
  73. package/dist/components/2_chatinput_elements/FileUploader/icons/FileUploaderIcon.vue2.js +13 -2
  74. package/dist/components/2_chatinput_elements/PlaceholderComponent/PlaceholderComponent.vue.js +39 -33
  75. package/dist/components/2_chatinput_elements/StickerPicker/StickerPicker.vue.js +220 -4
  76. package/dist/components/2_chatinput_elements/StickerPicker/StickerPicker.vue2.js +146 -256
  77. package/dist/components/2_chatinput_elements/StickerPicker/icons/StickerIcon.vue.js +39 -41
  78. package/dist/components/2_chatinput_elements/StickerPicker/icons/StickerIcon.vue2.js +13 -2
  79. package/dist/components/2_chatinput_elements/TemplateSelector/TemplateSelector.vue.js +233 -163
  80. package/dist/components/2_chatinput_elements/TextFormatToolbar/TextFormatToolbar.vue.js +164 -4
  81. package/dist/components/2_chatinput_elements/TextFormatToolbar/TextFormatToolbar.vue2.js +87 -175
  82. package/dist/components/2_chatinput_elements/WABAAttachmentSection/WABAAttachmentSection.vue.js +73 -4
  83. package/dist/components/2_chatinput_elements/WABAAttachmentSection/WABAAttachmentSection.vue2.js +34 -60
  84. package/dist/components/2_chatinput_elements/WABAQuickReplyButtons/WABAQuickReplyButtons.vue.js +47 -4
  85. package/dist/components/2_chatinput_elements/WABAQuickReplyButtons/WABAQuickReplyButtons.vue2.js +10 -23
  86. package/dist/components/2_chatinput_elements/WABASeparatedQuickButtons/WABASeparatedQuickButtons.vue.js +52 -4
  87. package/dist/components/2_chatinput_elements/WABASeparatedQuickButtons/WABASeparatedQuickButtons.vue2.js +8 -26
  88. package/dist/components/2_chatinput_elements/WABATemplateSelector/WABATemplateSelector.vue.js +299 -220
  89. package/dist/components/2_chatlist_elements/ChatFilter/ChatFilter.vue.js +39 -33
  90. package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue.js +306 -4
  91. package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue2.js +134 -311
  92. package/dist/components/2_chatlist_elements/ChatItem/icons/AudioIcon.vue.js +18 -12
  93. package/dist/components/2_chatlist_elements/ChatItem/icons/FileIcon.vue.js +23 -11
  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 +34 -22
  96. package/dist/components/2_chatlist_elements/ChatItem/icons/StickerIcon.vue.js +15 -9
  97. package/dist/components/2_chatlist_elements/ChatItem/icons/VideoIcon.vue.js +26 -14
  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 +52 -24
  100. package/dist/components/2_elements/AudioRecorder/AudioRecorder.vue.js +84 -4
  101. package/dist/components/2_elements/AudioRecorder/AudioRecorder.vue2.js +35 -67
  102. package/dist/components/2_elements/ChannelSelector/ChannelSelector.vue.js +72 -38
  103. package/dist/components/2_elements/ChatInfo/ChatInfo.vue.js +76 -57
  104. package/dist/components/2_elements/ChatPanel/ChatPanel.vue.js +41 -29
  105. package/dist/components/2_elements/ContactInfo/ContactInfo.vue.js +176 -115
  106. package/dist/components/2_elements/ThemeMode/ThemeMode.vue.js +48 -27
  107. package/dist/components/2_elements/UserProfile/UserProfile.vue.js +58 -28
  108. package/dist/components/2_elements/VideoRecorder/VideoRecorder.vue.js +54 -4
  109. package/dist/components/2_elements/VideoRecorder/VideoRecorder.vue2.js +19 -39
  110. package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue.js +458 -4
  111. package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue2.js +160 -471
  112. package/dist/components/2_feed_elements/BaseEditMessage/BaseEditMessage.vue.js +19 -4
  113. package/dist/components/2_feed_elements/BaseEditMessage/BaseEditMessage.vue2.js +12 -22
  114. package/dist/components/2_feed_elements/BaseReplyMessage/BaseReplyMessage.vue.js +26 -4
  115. package/dist/components/2_feed_elements/BaseReplyMessage/BaseReplyMessage.vue2.js +26 -39
  116. package/dist/components/2_feed_elements/CallMessage/CallMessage.vue.js +482 -4
  117. package/dist/components/2_feed_elements/CallMessage/CallMessage.vue2.js +148 -448
  118. package/dist/components/2_feed_elements/CallMessage/icons/IncomingCallIcon.vue.js +17 -19
  119. package/dist/components/2_feed_elements/CallMessage/icons/IncomingCallIcon.vue2.js +13 -2
  120. package/dist/components/2_feed_elements/CallMessage/icons/OutgoingCallIcon.vue.js +17 -19
  121. package/dist/components/2_feed_elements/CallMessage/icons/OutgoingCallIcon.vue2.js +13 -2
  122. package/dist/components/2_feed_elements/DateMessage/DateMessage.vue.js +17 -4
  123. package/dist/components/2_feed_elements/DateMessage/DateMessage.vue2.js +7 -7
  124. package/dist/components/2_feed_elements/DateMessageSticky/DateMessageSticky.vue.js +16 -3
  125. package/dist/components/2_feed_elements/DateMessageSticky/DateMessageSticky.vue2.js +7 -7
  126. package/dist/components/2_feed_elements/DeletedMessageContent/DeletedMessageContent.vue.js +67 -4
  127. package/dist/components/2_feed_elements/DeletedMessageContent/DeletedMessageContent.vue2.js +11 -43
  128. package/dist/components/2_feed_elements/DeletedMessageContent/icons/DeletedMessageIcon.vue.js +16 -10
  129. package/dist/components/2_feed_elements/DelimiterMessage/DelimiterMessage.vue.js +60 -4
  130. package/dist/components/2_feed_elements/DelimiterMessage/DelimiterMessage.vue2.js +36 -53
  131. package/dist/components/2_feed_elements/EditTextMessage/EditTextMessage.vue.js +22 -4
  132. package/dist/components/2_feed_elements/EditTextMessage/EditTextMessage.vue2.js +8 -15
  133. package/dist/components/2_feed_elements/FeedKeyboard/FeedKeyboard.vue.js +43 -4
  134. package/dist/components/2_feed_elements/FeedKeyboard/FeedKeyboard.vue2.js +10 -25
  135. package/dist/components/2_feed_elements/FileMessage/FileMessage.vue.js +250 -4
  136. package/dist/components/2_feed_elements/FileMessage/FileMessage.vue2.js +67 -233
  137. package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue.js +315 -4
  138. package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue2.js +98 -319
  139. package/dist/components/2_feed_elements/MessageKeyboard/MessageKeyboard.vue.js +39 -4
  140. package/dist/components/2_feed_elements/MessageKeyboard/MessageKeyboard.vue2.js +12 -22
  141. package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue.js +155 -4
  142. package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue2.js +110 -212
  143. package/dist/components/2_feed_elements/MessageReactions/icons/DeleteIcon.vue.js +32 -20
  144. package/dist/components/2_feed_elements/MessageReactions/icons/EditIcon.vue.js +32 -20
  145. package/dist/components/2_feed_elements/MessageReactions/icons/ExpandReactionsIcon.vue.js +17 -11
  146. package/dist/components/2_feed_elements/MessageReactions/icons/MessageActionsIcon.vue.js +16 -10
  147. package/dist/components/2_feed_elements/MessageReactions/icons/ReplyIcon.vue.js +17 -11
  148. package/dist/components/2_feed_elements/MessageSmsInvite/MessageSmsInvite.vue.js +22 -4
  149. package/dist/components/2_feed_elements/MessageSmsInvite/MessageSmsInvite.vue2.js +17 -23
  150. package/dist/components/2_feed_elements/MessageStatusIndicator/MessageStatusIndicator.vue.js +28 -4
  151. package/dist/components/2_feed_elements/MessageStatusIndicator/MessageStatusIndicator.vue2.js +27 -29
  152. package/dist/components/2_feed_elements/MissedCallMessage/MissedCallMessage.vue.js +142 -4
  153. package/dist/components/2_feed_elements/MissedCallMessage/MissedCallMessage.vue2.js +33 -121
  154. package/dist/components/2_feed_elements/MissedCallMessage/icons/MissedCallIcon.vue.js +34 -22
  155. package/dist/components/2_feed_elements/ReplyAudioMessage/ReplyAudioMessage.vue.js +55 -4
  156. package/dist/components/2_feed_elements/ReplyAudioMessage/ReplyAudioMessage.vue2.js +8 -30
  157. package/dist/components/2_feed_elements/ReplyCallMessage/ReplyCallMessage.vue.js +47 -4
  158. package/dist/components/2_feed_elements/ReplyCallMessage/ReplyCallMessage.vue2.js +9 -25
  159. package/dist/components/2_feed_elements/ReplyFileMessage/ReplyFileMessage.vue.js +56 -4
  160. package/dist/components/2_feed_elements/ReplyFileMessage/ReplyFileMessage.vue2.js +8 -37
  161. package/dist/components/2_feed_elements/ReplyImageMessage/ReplyImageMessage.vue.js +72 -4
  162. package/dist/components/2_feed_elements/ReplyImageMessage/ReplyImageMessage.vue2.js +10 -59
  163. package/dist/components/2_feed_elements/ReplyStickerMessage/ReplyStickerMessage.vue.js +142 -4
  164. package/dist/components/2_feed_elements/ReplyStickerMessage/ReplyStickerMessage.vue2.js +36 -120
  165. package/dist/components/2_feed_elements/ReplyTextMessage/ReplyTextMessage.vue.js +49 -4
  166. package/dist/components/2_feed_elements/ReplyTextMessage/ReplyTextMessage.vue2.js +15 -53
  167. package/dist/components/2_feed_elements/ReplyVideoMessage/ReplyVideoMessage.vue.js +75 -4
  168. package/dist/components/2_feed_elements/ReplyVideoMessage/ReplyVideoMessage.vue2.js +10 -63
  169. package/dist/components/2_feed_elements/SplashScreen/SplashScreen.vue.js +18 -4
  170. package/dist/components/2_feed_elements/SplashScreen/SplashScreen.vue2.js +9 -17
  171. package/dist/components/2_feed_elements/StickerMessage/StickerMessage.vue.js +346 -4
  172. package/dist/components/2_feed_elements/StickerMessage/StickerMessage.vue2.js +73 -307
  173. package/dist/components/2_feed_elements/SystemMessage/SystemMessage.vue.js +17 -4
  174. package/dist/components/2_feed_elements/SystemMessage/SystemMessage.vue2.js +7 -7
  175. package/dist/components/2_feed_elements/TextMessage/TextMessage.vue.js +307 -4
  176. package/dist/components/2_feed_elements/TextMessage/TextMessage.vue2.js +65 -269
  177. package/dist/components/2_feed_elements/TypingMessage/TypingMessage.vue.js +37 -4
  178. package/dist/components/2_feed_elements/TypingMessage/TypingMessage.vue2.js +7 -21
  179. package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue.js +307 -4
  180. package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue2.js +76 -298
  181. package/dist/components/2_modals/ConfirmDeleteMessage/ConfirmDeleteMessage.vue.js +64 -4
  182. package/dist/components/2_modals/ConfirmDeleteMessage/ConfirmDeleteMessage.vue3.js +10 -45
  183. package/dist/components/2_modals/CreateChat/CreateChat.vue.js +35 -18
  184. package/dist/components/2_modals/CreateChat2/CreateChat2.vue.js +140 -92
  185. package/dist/components/2_modals/CreateDialog/CreateDialog.vue.js +96 -49
  186. package/dist/components/2_modals/Modal/Modal.vue.js +59 -50
  187. package/dist/components/2_modals/ModalFullscreen/ModalFullscreen.vue.js +51 -38
  188. package/dist/components/2_modals/ModalNoFooter/ModalNoFooter.vue.js +39 -30
  189. package/dist/components/2_modals/ModalVideoRecorder/ModalVideoRecorder.vue.js +155 -4
  190. package/dist/components/2_modals/ModalVideoRecorder/ModalVideoRecorder.vue2.js +49 -121
  191. package/dist/components/2_modals/SelectUser/SelectUser.vue.js +60 -43
  192. package/dist/components/2_modals/SelectUser2/SelectUser2.vue.js +41 -24
  193. package/dist/components/3_compounds/ChatInput/ChatInput.vue.js +85 -4
  194. package/dist/components/3_compounds/ChatInput/ChatInput.vue2.js +149 -210
  195. package/dist/components/3_compounds/ChatInput/icons/SendIcon.vue.js +25 -21
  196. package/dist/components/3_compounds/ChatInput/icons/SendIcon.vue2.js +13 -2
  197. package/dist/components/3_compounds/ChatList/ChatList.vue.js +253 -163
  198. package/dist/components/3_compounds/ChatList/ChatListHeader.vue.js +50 -32
  199. package/dist/components/3_compounds/ChatList/icons/LogoIcon.vue.js +6 -6
  200. package/dist/components/3_compounds/Feed/Feed.vue.js +172 -4
  201. package/dist/components/3_compounds/Feed/Feed.vue2.js +126 -257
  202. package/dist/components/3_compounds/SideBar/SideBar.vue.js +279 -202
  203. package/dist/components/4_layouts/AdaptiveExtendedLayout/AdaptiveExtendedLayout.vue.js +43 -36
  204. package/dist/components/4_layouts/BaseLayout/BaseLayout.vue.js +5 -5
  205. package/dist/components/4_layouts/ChatWrapper/ChatWrapper.vue.js +32 -4
  206. package/dist/components/4_layouts/ChatWrapper/ChatWrapper.vue2.js +7 -29
  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 +31 -18
  210. package/dist/components/5_containers/FloatContainer/FloatContainer.vue.js +85 -56
  211. package/package.json +1 -1
@@ -1,19 +1,19 @@
1
- import { defineComponent as Xe, ref as y, computed as m, inject as et, watch as G, createElementBlock as r, openBlock as u, unref as i, normalizeStyle as Y, normalizeClass as w, createCommentVNode as d, createElementVNode as o, createVNode as b, withCtx as Z, createTextVNode as tt, toDisplayString as p, Fragment as q, createBlock as T, withDirectives as z, vShow as ce, vModelText as st, Transition as ve, Teleport as at, nextTick as nt } from "vue";
2
- import ot from "../../1_atoms/ContextMenu/ContextMenu.vue.js";
3
- import it from "../../1_atoms/LinkPreview/LinkPreview.vue.js";
4
- import ut from "../../1_atoms/EmbedPreview/EmbedPreview.vue.js";
5
- import lt from "../BaseReplyMessage/BaseReplyMessage.vue.js";
6
- import rt from "../MessageReactions/MessageReactions.vue.js";
7
- import ge from "../MessageStatusIndicator/MessageStatusIndicator.vue.js";
8
- import mt from "../MessageSmsInvite/MessageSmsInvite.vue.js";
9
- import dt from "../DeletedMessageContent/DeletedMessageContent.vue.js";
10
- import ct from "../../1_atoms/Tooltip/Tooltip.vue.js";
11
- import { useMessageActions as vt } from "../../../hooks/messages/useMessageActions.js";
12
- import { useMessageMenuActions as gt } from "../../../hooks/messages/useMessageMenuActions.js";
13
- import { useMessageLinks as ft } from "../../../hooks/messages/useMessageLinks.js";
14
- import { useChannelAccentColor as yt } from "../../../hooks/messages/useChannelAccentColor.js";
15
- import { useSubtextTooltip as pt } from "../../../hooks/messages/useSubtextTooltip.js";
16
- import { useStartReply as ht } from "../../../hooks/messages/useStartReply.js";
1
+ import { defineComponent as je, ref as l, computed as o, inject as Fe, watch as D, nextTick as Be } from "vue";
2
+ import Ge from "../../1_atoms/ContextMenu/ContextMenu.vue.js";
3
+ import Ye from "../../1_atoms/LinkPreview/LinkPreview.vue.js";
4
+ import He from "../../1_atoms/EmbedPreview/EmbedPreview.vue.js";
5
+ import qe from "../BaseReplyMessage/BaseReplyMessage.vue.js";
6
+ import Ve from "../MessageReactions/MessageReactions.vue.js";
7
+ import ze from "../MessageStatusIndicator/MessageStatusIndicator.vue.js";
8
+ import We from "../MessageSmsInvite/MessageSmsInvite.vue.js";
9
+ import Je from "../DeletedMessageContent/DeletedMessageContent.vue.js";
10
+ import Ke from "../../1_atoms/Tooltip/Tooltip.vue.js";
11
+ import { useMessageActions as Qe } from "../../../hooks/messages/useMessageActions.js";
12
+ import { useMessageMenuActions as Xe } from "../../../hooks/messages/useMessageMenuActions.js";
13
+ import { useMessageLinks as Ze } from "../../../hooks/messages/useMessageLinks.js";
14
+ import { useChannelAccentColor as et } from "../../../hooks/messages/useChannelAccentColor.js";
15
+ import { useSubtextTooltip as tt } from "../../../hooks/messages/useSubtextTooltip.js";
16
+ import { useStartReply as at } from "../../../hooks/messages/useStartReply.js";
17
17
  import "../../../hooks/useMessageDraft.js";
18
18
  import "../../../hooks/useSearchModel.js";
19
19
  import "../../../hooks/useTheme.js";
@@ -22,36 +22,12 @@ import "../../../hooks/useEmojiNative.js";
22
22
  /* empty css */
23
23
  import "../../../locale/useLocale.js";
24
24
  /* empty css */
25
- import { buildReplyPayload as fe } from "../../../hooks/messages/buildReplyPayload.js";
26
- import { getStatus as bt, getStatusTitle as Ct } from "../../../functions/getStatusMessage.js";
27
- import { getMessageClass as wt } from "../../../functions/getMessageClass.js";
28
- import { createReactionHandlers as xt } from "../../../functions/createReactionHandlers.js";
25
+ import { buildReplyPayload as W } from "../../../hooks/messages/buildReplyPayload.js";
26
+ import { getStatus as nt, getStatusTitle as st } from "../../../functions/getStatusMessage.js";
27
+ import { getMessageClass as ot } from "../../../functions/getMessageClass.js";
28
+ import { createReactionHandlers as rt } from "../../../functions/createReactionHandlers.js";
29
29
  import "../../../functions/parseMarkdown.js";
30
- const Mt = ["messageId"], kt = ["src"], Rt = {
31
- key: 1,
32
- class: "audio-message__subtext"
33
- }, Tt = { class: "audio-message__footer" }, St = { class: "audio-message__info-container" }, Nt = {
34
- key: 0,
35
- class: "audio-message__time"
36
- }, _t = { class: "audio-message__audio-container" }, It = ["src"], Et = { class: "audio-message__progress-wrapper" }, At = ["max"], Ot = { class: "audio-message__speed-btn-container" }, Ft = { class: "audio-message__player-controls" }, Lt = { class: "audio-message__current-time" }, Dt = { class: "audio-message__duration" }, Pt = {
37
- key: 1,
38
- class: "audio-message__text-container"
39
- }, Ut = ["innerHTML"], Vt = { class: "audio-message__footer" }, $t = { class: "audio-message__info-container" }, Bt = {
40
- key: 0,
41
- class: "audio-message__actions"
42
- }, Ht = { class: "audio-message__time" }, jt = {
43
- key: 0,
44
- class: "audio-message__expand-panel"
45
- }, Gt = { class: "audio-message__expand-inner" }, Yt = {
46
- key: 0,
47
- class: "audio-message__expand-placeholder"
48
- }, Zt = ["innerHTML"], qt = {
49
- key: 1,
50
- class: "audio-message__expand-plain"
51
- }, zt = {
52
- key: 0,
53
- class: "audio-message__expand-placeholder"
54
- }, Wt = ["innerHTML"], Jt = { class: "audio-message__expand-close-wrap" }, Kt = "RECOGNITION_READY", Qt = "SUMMARY_READY", _s = /* @__PURE__ */ Xe({
30
+ const J = "RECOGNITION_READY", K = "SUMMARY_READY", jt = /* @__PURE__ */ je({
55
31
  __name: "AudioMessage",
56
32
  props: {
57
33
  message: {
@@ -73,7 +49,7 @@ const Mt = ["messageId"], kt = ["src"], Rt = {
73
49
  reactionsMode: {
74
50
  type: String,
75
51
  default: "single",
76
- validator: (s) => ["single", "multi"].includes(s)
52
+ validator: (N) => ["single", "multi"].includes(N)
77
53
  },
78
54
  currentUserId: {
79
55
  type: [String, Number],
@@ -95,8 +71,9 @@ const Mt = ["messageId"], kt = ["src"], Rt = {
95
71
  }
96
72
  },
97
73
  emits: ["action", "reply", "sms-invite"],
98
- setup(s, { emit: ye }) {
99
- const l = s, L = y([
74
+ setup(N, { expose: Q, emit: X }) {
75
+ Q();
76
+ const n = N, R = l([
100
77
  {
101
78
  text: "1.0x",
102
79
  speed: 1
@@ -113,92 +90,92 @@ const Mt = ["messageId"], kt = ["src"], Rt = {
113
90
  text: "2.0x",
114
91
  speed: 2
115
92
  }
116
- ]), D = y(0), P = m(() => L.value[D.value] ?? L.value[0]), pe = () => {
117
- D.value = (D.value + 1) % L.value.length, a.value && (a.value.playbackRate = P.value.speed);
118
- }, k = ye, { menuActions: S } = gt(() => l.message), he = et("chatAppId"), { startReply: be } = ht(he || ""), a = y(null), x = y(void 0), c = y(!1), h = y(0), g = y(0), C = y(!1), U = m(() => {
119
- var t, n;
120
- const e = l.message;
121
- return e.url || (typeof ((t = e.meta) == null ? void 0 : t.url) == "string" ? e.meta.url : void 0) || ((n = e.data) == null ? void 0 : n.url);
122
- }), V = (e) => {
93
+ ]), S = l(0), I = o(() => R.value[S.value] ?? R.value[0]), Z = () => {
94
+ S.value = (S.value + 1) % R.value.length, t.value && (t.value.playbackRate = I.value.speed);
95
+ }, d = X, { menuActions: ee } = Xe(() => n.message), P = Fe("chatAppId"), { startReply: U } = at(P || ""), t = l(null), p = l(void 0), u = l(!1), c = l(0), i = l(0), v = l(!1), x = o(() => {
96
+ var a, s;
97
+ const e = n.message;
98
+ return e.url || (typeof ((a = e.meta) == null ? void 0 : a.url) == "string" ? e.meta.url : void 0) || ((s = e.data) == null ? void 0 : s.url);
99
+ }), M = (e) => {
123
100
  if (e == null) return;
124
101
  if (typeof e == "number")
125
102
  return !Number.isFinite(e) || e < 0 ? void 0 : Math.floor(e);
126
- const t = String(e).trim();
127
- if (!t) return;
128
- if (/^\d+$/.test(t)) {
129
- const v = Number(t);
130
- return Number.isFinite(v) && v >= 0 ? Math.floor(v) : void 0;
103
+ const a = String(e).trim();
104
+ if (!a) return;
105
+ if (/^\d+$/.test(a)) {
106
+ const r = Number(a);
107
+ return Number.isFinite(r) && r >= 0 ? Math.floor(r) : void 0;
131
108
  }
132
- const n = t.match(/^(\d+):([0-5]\d):([0-5]\d)$/);
133
- if (n) {
134
- const v = Number(n[1]), H = Number(n[2]), j = Number(n[3]);
135
- return v * 3600 + H * 60 + j;
109
+ const s = a.match(/^(\d+):([0-5]\d):([0-5]\d)$/);
110
+ if (s) {
111
+ const r = Number(s[1]), C = Number(s[2]), k = Number(s[3]);
112
+ return r * 3600 + C * 60 + k;
136
113
  }
137
- const M = t.match(/^(\d+):([0-5]\d)$/);
138
- if (M) return Number(M[1]) * 60 + Number(M[2]);
139
- }, W = () => {
140
- c.value = !1, g.value = 0, h.value = V(l.message.duration) ?? 0, C.value = !1;
114
+ const f = a.match(/^(\d+):([0-5]\d)$/);
115
+ if (f) return Number(f[1]) * 60 + Number(f[2]);
116
+ }, A = () => {
117
+ u.value = !1, i.value = 0, c.value = M(n.message.duration) ?? 0, v.value = !1;
141
118
  };
142
- W(), G(
143
- () => U.value,
144
- (e, t) => {
145
- e !== t && (W(), x.value = void 0, a.value && (a.value.pause(), a.value.currentTime = 0, a.value.removeAttribute("src"), a.value.load()));
119
+ A(), D(
120
+ () => x.value,
121
+ (e, a) => {
122
+ e !== a && (A(), p.value = void 0, t.value && (t.value.pause(), t.value.currentTime = 0, t.value.removeAttribute("src"), t.value.load()));
146
123
  }
147
- ), G(
148
- () => l.message.duration,
124
+ ), D(
125
+ () => n.message.duration,
149
126
  () => {
150
- x.value === void 0 && (h.value = V(l.message.duration) ?? 0);
127
+ p.value === void 0 && (c.value = M(n.message.duration) ?? 0);
151
128
  }
152
129
  );
153
130
  const {
154
- isOpenMenu: Ce,
155
- buttonMenuVisible: we,
156
- menuAnchorRef: xe,
157
- menuRef: Me,
158
- menuStyle: ke,
159
- menuTheme: Re,
160
- showMenu: J,
161
- hideMenu: $,
162
- openMenu: Te,
163
- toggleMenu: K,
164
- onMenuMouseEnter: Se,
165
- onMenuMouseLeave: Ne,
166
- clickAction: _e,
167
- viewsAction: Q,
168
- handleClickReplied: Ie
169
- } = vt(l.message, k, {
170
- onReply: () => be(fe(l.message, "message.audio"))
171
- }), f = y(null), N = y({ text: !1, summary: !1 }), _ = m(() => {
172
- var n;
173
- const e = l.message, t = e.transcript ?? ((n = e.meta) == null ? void 0 : n.transcript);
174
- return !t || typeof t != "object" ? null : t;
175
- }), I = m(() => {
176
- var n;
177
- const e = l.message, t = e.summary ?? ((n = e.meta) == null ? void 0 : n.summary);
178
- return !t || typeof t != "object" ? null : t;
179
- }), X = m(() => {
180
- var t;
181
- const e = (t = _.value) == null ? void 0 : t.html;
131
+ isOpenMenu: te,
132
+ buttonMenuVisible: ae,
133
+ menuAnchorRef: ne,
134
+ menuRef: se,
135
+ menuStyle: oe,
136
+ menuTheme: re,
137
+ showMenu: ue,
138
+ hideMenu: L,
139
+ openMenu: ie,
140
+ toggleMenu: le,
141
+ onMenuMouseEnter: ce,
142
+ onMenuMouseLeave: me,
143
+ clickAction: $,
144
+ viewsAction: de,
145
+ handleClickReplied: pe
146
+ } = Qe(n.message, d, {
147
+ onReply: () => U(W(n.message, "message.audio"))
148
+ }), m = l(null), g = l({ text: !1, summary: !1 }), y = o(() => {
149
+ var s;
150
+ const e = n.message, a = e.transcript ?? ((s = e.meta) == null ? void 0 : s.transcript);
151
+ return !a || typeof a != "object" ? null : a;
152
+ }), h = o(() => {
153
+ var s;
154
+ const e = n.message, a = e.summary ?? ((s = e.meta) == null ? void 0 : s.summary);
155
+ return !a || typeof a != "object" ? null : a;
156
+ }), j = o(() => {
157
+ var a;
158
+ const e = (a = y.value) == null ? void 0 : a.html;
182
159
  return typeof e != "string" ? "" : e.trim();
183
- }), ee = m(() => {
160
+ }), F = o(() => {
184
161
  var e;
185
- return ((e = _.value) == null ? void 0 : e.status) === Kt && X.value.length > 0;
186
- }), te = m(() => {
187
- var t;
188
- const e = (t = I.value) == null ? void 0 : t.html;
162
+ return ((e = y.value) == null ? void 0 : e.status) === J && j.value.length > 0;
163
+ }), B = o(() => {
164
+ var a;
165
+ const e = (a = h.value) == null ? void 0 : a.html;
189
166
  return typeof e != "string" ? "" : e.trim();
190
- }), se = m(() => {
167
+ }), G = o(() => {
191
168
  var e;
192
- return ((e = I.value) == null ? void 0 : e.status) === Qt && te.value.length > 0;
193
- }), E = m(() => {
169
+ return ((e = h.value) == null ? void 0 : e.status) === K && B.value.length > 0;
170
+ }), E = o(() => {
194
171
  var e;
195
- return !!((e = _.value) != null && e.status);
196
- }), A = m(() => {
172
+ return !!((e = y.value) != null && e.status);
173
+ }), O = o(() => {
197
174
  var e;
198
- return !!((e = I.value) != null && e.status);
199
- }), Ee = m(() => f.value === "text" ? E.value : f.value === "summary" ? A.value : !1), Ae = m(() => {
175
+ return !!((e = h.value) != null && e.status);
176
+ }), ve = o(() => m.value === "text" ? E.value : m.value === "summary" ? O.value : !1), fe = o(() => {
200
177
  var e;
201
- switch ((e = _.value) == null ? void 0 : e.status) {
178
+ switch ((e = y.value) == null ? void 0 : e.status) {
202
179
  case "RECOGNITION_PLANNED":
203
180
  return "Распознаем сообщение, пожалуйста подождите...";
204
181
  case "RECOGNITION_ERROR":
@@ -208,9 +185,9 @@ const Mt = ["messageId"], kt = ["src"], Rt = {
208
185
  default:
209
186
  return "Текст сообщения недоступен";
210
187
  }
211
- }), Oe = m(() => {
188
+ }), ge = o(() => {
212
189
  var e;
213
- switch ((e = I.value) == null ? void 0 : e.status) {
190
+ switch ((e = h.value) == null ? void 0 : e.status) {
214
191
  case "SUMMARY_PLANNED":
215
192
  return "Формируем резюме, пожалуйста подождите...";
216
193
  case "SUMMARY_ERROR":
@@ -220,19 +197,19 @@ const Mt = ["messageId"], kt = ["src"], Rt = {
220
197
  default:
221
198
  return "Резюме недоступно";
222
199
  }
223
- }), Fe = async () => {
224
- var t, n, M;
225
- const e = U.value;
200
+ }), Y = async () => {
201
+ var a, s, f;
202
+ const e = x.value;
226
203
  if (e)
227
204
  try {
228
- const v = await fetch(e, {
205
+ const r = await fetch(e, {
229
206
  headers: {
230
207
  Accept: "audio/*"
231
208
  }
232
209
  });
233
- if (!v.ok)
234
- throw new Error(`HTTP error! status: ${v.status}`);
235
- const H = v.headers.get("content-type") || "", j = await v.blob(), O = ((n = (t = e.split(".").pop()) == null ? void 0 : t.split("?")[0]) == null ? void 0 : n.toLowerCase()) || "", Ke = {
210
+ if (!r.ok)
211
+ throw new Error(`HTTP error! status: ${r.status}`);
212
+ const C = r.headers.get("content-type") || "", k = await r.blob(), T = ((s = (a = e.split(".").pop()) == null ? void 0 : a.split("?")[0]) == null ? void 0 : s.toLowerCase()) || "", Le = {
236
213
  "audio/mpeg": "mp3",
237
214
  "audio/mp3": "mp3",
238
215
  "audio/wav": "wav",
@@ -243,368 +220,80 @@ const Mt = ["messageId"], kt = ["src"], Rt = {
243
220
  "audio/flac": "flac",
244
221
  "audio/m4a": "m4a",
245
222
  "audio/x-m4a": "m4a",
246
- "application/octet-stream": O || "mp3"
247
- }, re = O && ["mp3", "wav", "ogg", "webm", "aac", "flac", "m4a"].includes(O) ? O : Ke[H] || "mp3", me = e.split("/"), F = decodeURIComponent(((M = me[me.length - 1]) == null ? void 0 : M.split("?")[0]) || ""), Qe = F ? F.includes(".") ? F : `${F}.${re}` : `audio-${l.message.messageId}.${re}`, de = window.URL.createObjectURL(j), R = document.createElement("a");
248
- R.href = de, R.download = Qe, document.body.appendChild(R), R.click(), document.body.removeChild(R), window.URL.revokeObjectURL(de);
249
- } catch (v) {
250
- console.error("Ошибка при скачивании аудио:", v), e && window.open(e, "_blank");
223
+ "application/octet-stream": T || "mp3"
224
+ }, q = T && ["mp3", "wav", "ogg", "webm", "aac", "flac", "m4a"].includes(T) ? T : Le[C] || "mp3", V = e.split("/"), w = decodeURIComponent(((f = V[V.length - 1]) == null ? void 0 : f.split("?")[0]) || ""), $e = w ? w.includes(".") ? w : `${w}.${q}` : `audio-${n.message.messageId}.${q}`, z = window.URL.createObjectURL(k), b = document.createElement("a");
225
+ b.href = z, b.download = $e, document.body.appendChild(b), b.click(), document.body.removeChild(b), window.URL.revokeObjectURL(z);
226
+ } catch (r) {
227
+ console.error("Ошибка при скачивании аудио:", r), e && window.open(e, "_blank");
251
228
  }
252
- }, Le = (e) => {
253
- e.action === "download" ? (Fe(), $()) : _e(e);
254
- }, { linkedHtml: De, inNewWindow: ae } = ft(() => l.message.text), ne = m(() => bt(l.message.status)), oe = m(() => Ct(l.message.status, l.message.statusMsg)), { bubbleStyle: Pe } = yt(
255
- m(() => l.message),
229
+ }, ye = (e) => {
230
+ e.action === "download" ? (Y(), L()) : $(e);
231
+ }, { linkedHtml: he, inNewWindow: be } = Ze(() => n.message.text), Re = o(() => nt(n.message.status)), Se = o(() => st(n.message.status, n.message.statusMsg)), { bubbleStyle: xe } = et(
232
+ o(() => n.message),
256
233
  { cssVariable: "--chotto-audiomessage-right-background-color", position: "right" }
257
- ), ie = async () => {
258
- const e = U.value;
259
- if (!(!a.value || !e))
260
- if (c.value)
261
- a.value.pause(), c.value = !1;
234
+ ), Me = async () => {
235
+ const e = x.value;
236
+ if (!(!t.value || !e))
237
+ if (u.value)
238
+ t.value.pause(), u.value = !1;
262
239
  else
263
240
  try {
264
- x.value || (x.value = e, await nt(), a.value.load()), await a.value.play(), c.value = !0;
265
- } catch (t) {
266
- console.error("Не удалось воспроизвести аудио", t), c.value = !1;
241
+ p.value || (p.value = e, await Be(), t.value.load()), await t.value.play(), u.value = !0;
242
+ } catch (a) {
243
+ console.error("Не удалось воспроизвести аудио", a), u.value = !1;
267
244
  }
268
- }, ue = (e) => {
269
- const t = Math.floor(e / 60), n = Math.floor(e % 60);
270
- return `${t.toString().padStart(2, "0")}:${n.toString().padStart(2, "0")}`;
271
- }, Ue = m(() => ue(g.value));
272
- G(
273
- () => g.value,
245
+ }, _ = (e) => {
246
+ const a = Math.floor(e / 60), s = Math.floor(e % 60);
247
+ return `${a.toString().padStart(2, "0")}:${s.toString().padStart(2, "0")}`;
248
+ }, Te = o(() => _(i.value));
249
+ D(
250
+ () => i.value,
274
251
  () => {
275
- a.value && C.value && (a.value.duration != 1 / 0 && !Number.isNaN(a.value.duration) && (a.value.currentTime = g.value), Math.abs(g.value - h.value) < 0.1 && (c.value = !1));
252
+ t.value && v.value && (t.value.duration != 1 / 0 && !Number.isNaN(t.value.duration) && (t.value.currentTime = i.value), Math.abs(i.value - c.value) < 0.1 && (u.value = !1));
276
253
  }
277
254
  );
278
- const le = () => {
279
- a.value && C.value && a.value.duration != 1 / 0 && !Number.isNaN(a.value.duration) && (a.value.currentTime = g.value), C.value = !1;
280
- }, Ve = m(() => ue(h.value)), $e = () => {
281
- if (!a.value) return;
282
- const e = a.value;
283
- if (g.value = e.currentTime || 0, e.duration === 1 / 0 || Number.isNaN(e.duration)) {
255
+ const we = () => {
256
+ t.value && v.value && t.value.duration != 1 / 0 && !Number.isNaN(t.value.duration) && (t.value.currentTime = i.value), v.value = !1;
257
+ }, Ne = o(() => _(c.value)), Ie = () => {
258
+ if (!t.value) return;
259
+ const e = t.value;
260
+ if (i.value = e.currentTime || 0, e.duration === 1 / 0 || Number.isNaN(e.duration)) {
284
261
  e.currentTime = 1e101;
285
- const t = () => {
286
- a.value && (h.value = a.value.duration || 0, g.value = 0, a.value.currentTime = 0);
262
+ const a = () => {
263
+ t.value && (c.value = t.value.duration || 0, i.value = 0, t.value.currentTime = 0);
287
264
  };
288
- e.addEventListener("timeupdate", t, { once: !0 });
265
+ e.addEventListener("timeupdate", a, { once: !0 });
289
266
  } else
290
- h.value = e.duration || 0;
291
- e.playbackRate = P.value.speed;
292
- }, Be = () => {
293
- a.value && (C.value || (g.value = a.value.currentTime), a.value.ended && c.value && (c.value = !1));
294
- }, He = () => {
295
- c.value = !1;
296
- }, je = () => {
297
- console.error("Не удалось загрузить аудио"), c.value = !1, x.value = void 0, a.value && (a.value.pause(), a.value.currentTime = 0, a.value.removeAttribute("src"), a.value.load()), h.value = V(l.message.duration) ?? 0;
267
+ c.value = e.duration || 0;
268
+ e.playbackRate = I.value.speed;
269
+ }, Ae = () => {
270
+ t.value && (v.value || (i.value = t.value.currentTime), t.value.ended && u.value && (u.value = !1));
271
+ }, Ee = () => {
272
+ u.value = !1;
273
+ }, Oe = () => {
274
+ console.error("Не удалось загрузить аудио"), u.value = !1, p.value = void 0, t.value && (t.value.pause(), t.value.currentTime = 0, t.value.removeAttribute("src"), t.value.load()), c.value = M(n.message.duration) ?? 0;
298
275
  };
299
- function B(e) {
300
- return wt(e.position, "audio-message");
276
+ function _e(e) {
277
+ return ot(e.position, "audio-message");
301
278
  }
302
- const { onToggleReaction: Ge, onAddReaction: Ye, onRemoveReaction: Ze } = xt(k), qe = pt(() => l.message, () => l.subtextTooltipData);
303
- function ze() {
304
- k("sms-invite", l.message);
279
+ const { onToggleReaction: Ce, onAddReaction: ke, onRemoveReaction: De } = rt(d), Pe = tt(() => n.message, () => n.subtextTooltipData);
280
+ function Ue() {
281
+ d("sms-invite", n.message);
305
282
  }
306
- const We = () => {
283
+ const H = { props: n, speed: R, speedIndex: S, currentSpeed: I, cycleSpeed: Z, emit: d, menuActions: ee, chatAppId: P, startReply: U, player: t, lazyAudioSrc: p, isPlaying: u, audioDuration: c, currentTime: i, isSeeking: v, audioSrc: x, parseMessageDurationToSeconds: M, resetAudioState: A, isOpenMenu: te, buttonMenuVisible: ae, menuAnchorRef: ne, menuRef: se, menuStyle: oe, menuTheme: re, showMenu: ue, hideMenu: L, openMenu: ie, toggleMenu: le, onMenuMouseEnter: ce, onMenuMouseLeave: me, clickAction: $, viewsAction: de, handleClickReplied: pe, expandedPanel: m, requestedOnDemand: g, recognitionReadyStatus: J, summaryReadyStatus: K, transcriptData: y, summaryData: h, transcriptHtml: j, isTranscriptReady: F, summaryHtml: B, isSummaryReady: G, hasTextOption: E, hasSummaryOption: O, isExpandedPanelVisible: ve, transcriptPlaceholderText: fe, summaryPlaceholderText: ge, downloadAudio: Y, handleActionClick: ye, linkedHtml: he, inNewWindow: be, status: Re, statusTitle: Se, rightBubbleStyle: xe, togglePlayPause: Me, formatTime: _, formatCurrentTime: Te, handleSeekEnd: we, formatDuration: Ne, handleLoadedMetadata: Ie, handleTimeUpdate: Ae, handleEnded: Ee, handleAudioError: Oe, getClass: _e, onToggleReaction: Ce, onAddReaction: ke, onRemoveReaction: De, channelInfo: Pe, handleSmsInvite: Ue, handleText: () => {
307
284
  if (!E.value) return;
308
- const e = f.value === "text" ? null : "text";
309
- f.value = e, e === "text" && !ee.value && !N.value.text && (N.value.text = !0, k("action", { action: "fetchTranscript", messageId: l.message.messageId }));
310
- }, Je = () => {
311
- if (!A.value) return;
312
- const e = f.value === "summary" ? null : "summary";
313
- f.value = e, e === "summary" && !se.value && !N.value.summary && (N.value.summary = !0, k("action", { action: "fetchSummary", messageId: l.message.messageId }));
314
- };
315
- return (e, t) => (u(), r("div", {
316
- ref_key: "menuAnchorRef",
317
- ref: xe,
318
- class: w(["audio-message", [
319
- B(s.message),
320
- s.applyStyle(s.message)
321
- ]]),
322
- messageId: s.message.messageId,
323
- style: Y(i(Pe)),
324
- onMouseleave: t[8] || (t[8] = //@ts-ignore
325
- (...n) => i($) && i($)(...n))
326
- }, [
327
- s.message.avatar && s.isFirstInSeries ? (u(), r("img", {
328
- key: 0,
329
- class: "audio-message__avatar",
330
- src: s.message.avatar,
331
- height: "32",
332
- width: "32",
333
- style: Y({ gridRow: s.message.subText ? "2" : "1" })
334
- }, null, 12, kt)) : d("", !0),
335
- s.message.subText && s.isFirstInSeries ? (u(), r("p", Rt, [
336
- b(ct, {
337
- text: i(qe),
338
- position: s.message.position === "left" ? "right" : "left",
339
- offset: 8
340
- }, {
341
- default: Z(() => [
342
- tt(p(s.message.subText), 1)
343
- ]),
344
- _: 1
345
- }, 8, ["text", "position"])
346
- ])) : d("", !0),
347
- o("div", {
348
- class: w(["audio-message__content", { "is-first": s.isFirstInSeries, "with-avatar-indent": !s.isFirstInSeries && s.message.avatar }]),
349
- onMouseenter: t[7] || (t[7] = //@ts-ignore
350
- (...n) => i(J) && i(J)(...n))
351
- }, [
352
- t[13] || (t[13] = o("div", {
353
- class: "audio-message__bottom-shadow",
354
- "aria-hidden": "true"
355
- }, null, -1)),
356
- s.message.deleted ? (u(), r(q, { key: 0 }, [
357
- b(dt),
358
- o("div", Tt, [
359
- o("div", St, [
360
- s.message.time ? (u(), r("span", Nt, p(s.message.time), 1)) : d("", !0),
361
- b(ge, {
362
- "base-class": "audio-message",
363
- "message-class": B(s.message),
364
- "message-status": s.message.status,
365
- "status-class": ne.value,
366
- "status-title": oe.value
367
- }, null, 8, ["message-class", "message-status", "status-class", "status-title"])
368
- ])
369
- ])
370
- ], 64)) : (u(), r(q, { key: 1 }, [
371
- s.message.reply ? (u(), T(lt, {
372
- key: 0,
373
- style: { "grid-column": "1/3" },
374
- message: s.message.reply,
375
- class: w(s.message.position),
376
- onReply: i(Ie)
377
- }, null, 8, ["message", "class", "onReply"])) : d("", !0),
378
- o("div", _t, [
379
- o("audio", {
380
- ref_key: "player",
381
- ref: a,
382
- src: x.value,
383
- type: "audio/webm",
384
- onLoadedmetadata: $e,
385
- onTimeupdate: Be,
386
- onEnded: He,
387
- onError: je
388
- }, null, 40, It),
389
- z(o("button", {
390
- class: "audio-message__play",
391
- onClick: ie
392
- }, [...t[9] || (t[9] = [
393
- o("div", { class: "audio-message__play-icon" }, [
394
- o("svg", {
395
- width: "20",
396
- height: "23",
397
- viewBox: "0 0 20 23",
398
- fill: "none",
399
- xmlns: "http://www.w3.org/2000/svg"
400
- }, [
401
- o("path", {
402
- d: "M18.99 12.9934L3.0825 22.2234C1.7325 23.0059 0 22.0584 0 20.4809V2.02087C0 0.44587 1.73 -0.50413 3.0825 0.28087L18.99 9.51087C19.2971 9.68618 19.5524 9.93959 19.7299 10.2454C19.9075 10.5512 20.001 10.8985 20.001 11.2521C20.001 11.6057 19.9075 11.953 19.7299 12.2589C19.5524 12.5647 19.2971 12.8181 18.99 12.9934Z",
403
- fill: "#5F5F5F"
404
- })
405
- ])
406
- ], -1)
407
- ])], 512), [
408
- [ce, !c.value]
409
- ]),
410
- z(o("button", {
411
- class: "audio-message__pause",
412
- onClick: ie
413
- }, [...t[10] || (t[10] = [
414
- o("div", { class: "audio-message__pause-icon" }, [
415
- o("svg", {
416
- width: "20",
417
- height: "23",
418
- viewBox: "0 0 20 23",
419
- fill: "none",
420
- xmlns: "http://www.w3.org/2000/svg"
421
- }, [
422
- o("path", {
423
- d: "M3.75 0C4.74456 0 5.69839 0.395088 6.40165 1.09835C7.10491 1.80161 7.5 2.75544 7.5 3.75V18.75C7.5 19.7446 7.10491 20.6984 6.40165 21.4017C5.69839 22.1049 4.74456 22.5 3.75 22.5C2.75544 22.5 1.80161 22.1049 1.09835 21.4017C0.395088 20.6984 2.09588e-08 19.7446 0 18.75V3.75C0 2.75544 0.395088 1.80161 1.09835 1.09835C1.80161 0.395088 2.75544 0 3.75 0ZM16.25 0C17.2446 0 18.1984 0.395088 18.9017 1.09835C19.6049 1.80161 20 2.75544 20 3.75V18.75C20 19.7446 19.6049 20.6984 18.9017 21.4017C18.1984 22.1049 17.2446 22.5 16.25 22.5C15.2554 22.5 14.3016 22.1049 13.5983 21.4017C12.8951 20.6984 12.5 19.7446 12.5 18.75V3.75C12.5 2.75544 12.8951 1.80161 13.5983 1.09835C14.3016 0.395088 15.2554 0 16.25 0Z",
424
- fill: "#5F5F5F"
425
- })
426
- ])
427
- ], -1)
428
- ])], 512), [
429
- [ce, c.value]
430
- ]),
431
- o("div", Et, [
432
- z(o("input", {
433
- "onUpdate:modelValue": t[0] || (t[0] = (n) => g.value = n),
434
- class: "audio-message__progress-bar-container",
435
- type: "range",
436
- min: 0,
437
- max: h.value,
438
- step: "0.1",
439
- onMousedown: t[1] || (t[1] = (n) => C.value = !0),
440
- onMouseup: le,
441
- onTouchstartPassive: t[2] || (t[2] = (n) => C.value = !0),
442
- onTouchendPassive: le
443
- }, null, 40, At), [
444
- [st, g.value]
445
- ]),
446
- o("div", Ot, [
447
- o("button", {
448
- type: "button",
449
- class: "audio-message__speed-btn",
450
- onClick: pe
451
- }, p(P.value.text), 1)
452
- ])
453
- ]),
454
- o("div", Ft, [
455
- o("p", Lt, p(Ue.value), 1),
456
- o("p", Dt, p(Ve.value), 1)
457
- ])
458
- ]),
459
- s.message.text ? (u(), r("div", Pt, [
460
- o("p", {
461
- onClick: t[3] || (t[3] = //@ts-ignore
462
- (...n) => i(ae) && i(ae)(...n)),
463
- innerHTML: i(De)
464
- }, null, 8, Ut)
465
- ])) : d("", !0),
466
- s.message.linkPreview ? (u(), T(it, {
467
- key: 2,
468
- class: w(["audio-message__link-preview", s.message.position]),
469
- "link-preview": s.message.linkPreview
470
- }, null, 8, ["class", "link-preview"])) : d("", !0),
471
- s.message.embed ? (u(), T(ut, {
472
- key: 3,
473
- class: w(s.message.position),
474
- embed: s.message.embed
475
- }, null, 8, ["class", "embed"])) : d("", !0),
476
- o("div", Vt, [
477
- b(rt, {
478
- reactions: s.message.reactions,
479
- "message-id": s.message.messageId,
480
- reply: i(fe)(s.message, "message.audio"),
481
- enabled: s.reactionsEnabled,
482
- mode: s.reactionsMode,
483
- "current-user-id": s.currentUserId,
484
- "reaction-user-names": s.reactionUserNames,
485
- "menu-enabled": i(S).length > 0,
486
- onToggleReaction: i(Ge),
487
- onAddReaction: i(Ye),
488
- onRemoveReaction: i(Ze),
489
- onMenu: i(Te)
490
- }, null, 8, ["reactions", "message-id", "reply", "enabled", "mode", "current-user-id", "reaction-user-names", "menu-enabled", "onToggleReaction", "onAddReaction", "onRemoveReaction", "onMenu"]),
491
- o("div", $t, [
492
- E.value || A.value ? (u(), r("div", Bt, [
493
- E.value ? (u(), r("button", {
494
- key: 0,
495
- class: w([
496
- "audio-message__action-button",
497
- { "audio-message__action-button--active": f.value === "text" }
498
- ]),
499
- type: "button",
500
- onClick: We
501
- }, " Текст ", 2)) : d("", !0),
502
- A.value ? (u(), r("button", {
503
- key: 1,
504
- class: w([
505
- "audio-message__action-button",
506
- { "audio-message__action-button--active": f.value === "summary" }
507
- ]),
508
- type: "button",
509
- onClick: Je
510
- }, " Резюме ", 2)) : d("", !0)
511
- ])) : d("", !0),
512
- s.message.views ? (u(), r("div", {
513
- key: 1,
514
- class: "audio-message__views",
515
- onClick: t[4] || (t[4] = //@ts-ignore
516
- (...n) => i(Q) && i(Q)(...n))
517
- }, [
518
- t[11] || (t[11] = o("span", { class: "pi pi-eye" }, null, -1)),
519
- o("p", null, p(s.message.views), 1)
520
- ])) : d("", !0),
521
- o("span", Ht, p(s.message.time), 1),
522
- b(ge, {
523
- "base-class": "audio-message",
524
- "message-class": B(s.message),
525
- "message-status": s.message.status,
526
- "status-class": ne.value,
527
- "status-title": oe.value
528
- }, null, 8, ["message-class", "message-status", "status-class", "status-title"])
529
- ])
530
- ]),
531
- b(ve, { name: "audio-message-expand" }, {
532
- default: Z(() => [
533
- Ee.value ? (u(), r("div", jt, [
534
- o("div", Gt, [
535
- f.value === "text" ? (u(), r(q, { key: 0 }, [
536
- ee.value ? (u(), r("p", {
537
- key: 1,
538
- class: "audio-message__expand-plain",
539
- innerHTML: X.value
540
- }, null, 8, Zt)) : (u(), r("p", Yt, p(Ae.value), 1))
541
- ], 64)) : (u(), r("p", qt, [
542
- se.value ? (u(), r("span", {
543
- key: 1,
544
- innerHTML: te.value
545
- }, null, 8, Wt)) : (u(), r("span", zt, p(Oe.value), 1))
546
- ]))
547
- ]),
548
- o("div", Jt, [
549
- o("button", {
550
- type: "button",
551
- class: "audio-message__expand-close",
552
- onClick: t[5] || (t[5] = (n) => f.value = null)
553
- }, " Закрыть ")
554
- ])
555
- ])) : d("", !0)
556
- ]),
557
- _: 1
558
- }),
559
- b(mt, {
560
- status: s.message.status,
561
- "has-messenger-account": s.message.hasMessengerAccount,
562
- channel: s.channel,
563
- onSmsInvite: ze
564
- }, null, 8, ["status", "has-messenger-account", "channel"]),
565
- i(we) && i(S).length && !s.reactionsEnabled ? (u(), r("button", {
566
- key: 4,
567
- class: "audio-message__menu-button",
568
- onClick: t[6] || (t[6] = //@ts-ignore
569
- (...n) => i(K) && i(K)(...n))
570
- }, [...t[12] || (t[12] = [
571
- o("svg", {
572
- width: "4",
573
- height: "17",
574
- viewBox: "0 0 4 17",
575
- fill: "none",
576
- xmlns: "http://www.w3.org/2000/svg"
577
- }, [
578
- o("path", {
579
- d: "M3.75 14.375C3.75 14.8723 3.55246 15.3492 3.20083 15.7008C2.84919 16.0525 2.37228 16.25 1.875 16.25C1.37772 16.25 0.900805 16.0525 0.549175 15.7008C0.197544 15.3492 0 14.8723 0 14.375C0 13.8777 0.197544 13.4008 0.549175 13.0492C0.900805 12.6975 1.37772 12.5 1.875 12.5C2.37228 12.5 2.84919 12.6975 3.20083 13.0492C3.55246 13.4008 3.75 13.8777 3.75 14.375ZM3.75 8.125C3.75 8.62228 3.55246 9.09919 3.20083 9.45083C2.84919 9.80246 2.37228 10 1.875 10C1.37772 10 0.900805 9.80246 0.549175 9.45083C0.197544 9.09919 0 8.62228 0 8.125C0 7.62772 0.197544 7.15081 0.549175 6.79917C0.900805 6.44754 1.37772 6.25 1.875 6.25C2.37228 6.25 2.84919 6.44754 3.20083 6.79917C3.55246 7.15081 3.75 7.62772 3.75 8.125ZM3.75 1.875C3.75 2.37228 3.55246 2.84919 3.20083 3.20083C2.84919 3.55246 2.37228 3.75 1.875 3.75C1.37772 3.75 0.900805 3.55246 0.549175 3.20083C0.197544 2.84919 0 2.37228 0 1.875C0 1.37772 0.197544 0.900806 0.549175 0.549175C0.900805 0.197544 1.37772 0 1.875 0C2.37228 0 2.84919 0.197544 3.20083 0.549175C3.55246 0.900806 3.75 1.37772 3.75 1.875Z",
580
- fill: "#5F5F5F"
581
- })
582
- ], -1)
583
- ])])) : d("", !0),
584
- (u(), T(at, { to: "body" }, [
585
- b(ve, null, {
586
- default: Z(() => [
587
- i(Ce) && i(S).length ? (u(), T(ot, {
588
- key: 0,
589
- ref_key: "menuRef",
590
- ref: Me,
591
- class: "audio-message__context-menu message-actions-menu",
592
- style: Y(i(ke)),
593
- "data-theme": i(Re),
594
- actions: i(S),
595
- onClick: Le,
596
- onMouseenter: i(Se),
597
- onMouseleave: i(Ne)
598
- }, null, 8, ["style", "data-theme", "actions", "onMouseenter", "onMouseleave"])) : d("", !0)
599
- ]),
600
- _: 1
601
- })
602
- ]))
603
- ], 64))
604
- ], 34)
605
- ], 46, Mt));
285
+ const e = m.value === "text" ? null : "text";
286
+ m.value = e, e === "text" && !F.value && !g.value.text && (g.value.text = !0, d("action", { action: "fetchTranscript", messageId: n.message.messageId }));
287
+ }, handleSummary: () => {
288
+ if (!O.value) return;
289
+ const e = m.value === "summary" ? null : "summary";
290
+ m.value = e, e === "summary" && !G.value && !g.value.summary && (g.value.summary = !0, d("action", { action: "fetchSummary", messageId: n.message.messageId }));
291
+ }, ContextMenu: Ge, LinkPreview: Ye, EmbedPreview: He, BaseReplyMessage: qe, MessageReactions: Ve, MessageStatusIndicator: ze, MessageSmsInvite: We, DeletedMessageContent: Je, Tooltip: Ke, get buildReplyPayload() {
292
+ return W;
293
+ } };
294
+ return Object.defineProperty(H, "__isScriptSetup", { enumerable: !1, value: !0 }), H;
606
295
  }
607
296
  });
608
297
  export {
609
- _s as default
298
+ jt as default
610
299
  };