stream-chat-react 14.11.1 → 14.12.0

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 (1102) hide show
  1. package/dist/cjs/{NotificationList.6abbee1c.js → NotificationList.4ce251ea.js} +127 -34
  2. package/dist/cjs/NotificationList.4ce251ea.js.map +1 -0
  3. package/dist/cjs/{ReactPlayerWrapper.a94a0cd1.js → ReactPlayerWrapper.7cc7b0d8.js} +4 -4
  4. package/dist/cjs/{ReactPlayerWrapper.a94a0cd1.js.map → ReactPlayerWrapper.7cc7b0d8.js.map} +1 -1
  5. package/dist/cjs/channel-detail.js +2 -2
  6. package/dist/cjs/emojis.js +2 -2
  7. package/dist/cjs/index.js +232 -55
  8. package/dist/cjs/index.js.map +1 -1
  9. package/dist/cjs/{useChannelHeaderOnlineStatus.7e17671e.js → useChannelHeaderOnlineStatus.64c443f5.js} +2 -2
  10. package/dist/cjs/{useChannelHeaderOnlineStatus.7e17671e.js.map → useChannelHeaderOnlineStatus.64c443f5.js.map} +1 -1
  11. package/dist/cjs/{useInertWhenHidden.22151beb.js → useInertWhenHidden.1a2a6a2b.js} +200 -53
  12. package/dist/cjs/useInertWhenHidden.1a2a6a2b.js.map +1 -0
  13. package/dist/css/index.css +71 -12
  14. package/dist/css/index.css.map +1 -1
  15. package/dist/es/_virtual/_rolldown/runtime.mjs +13 -0
  16. package/dist/es/a11y/a11yUtils.mjs +42 -0
  17. package/dist/es/a11y/a11yUtils.mjs.map +1 -0
  18. package/dist/es/a11y/accessibleLabel.mjs +27 -0
  19. package/dist/es/a11y/accessibleLabel.mjs.map +1 -0
  20. package/dist/es/a11y/hooks/useAriaIdentifiers.mjs +25 -0
  21. package/dist/es/a11y/hooks/useAriaIdentifiers.mjs.map +1 -0
  22. package/dist/es/a11y/hooks/useListboxKeyboardNavigation.mjs +85 -0
  23. package/dist/es/a11y/hooks/useListboxKeyboardNavigation.mjs.map +1 -0
  24. package/dist/es/a11y/hooks/useResolvedModalAriaProps.mjs +32 -0
  25. package/dist/es/a11y/hooks/useResolvedModalAriaProps.mjs.map +1 -0
  26. package/dist/es/a11y/hooks/useVirtualizedListboxKeyboardNavigation.mjs +68 -0
  27. package/dist/es/a11y/hooks/useVirtualizedListboxKeyboardNavigation.mjs.map +1 -0
  28. package/dist/es/channel-detail.mjs +29 -3020
  29. package/dist/es/components/AIStateIndicator/AIStateIndicator.mjs +26 -0
  30. package/dist/es/components/AIStateIndicator/AIStateIndicator.mjs.map +1 -0
  31. package/dist/es/components/AIStateIndicator/hooks/useAIState.mjs +44 -0
  32. package/dist/es/components/AIStateIndicator/hooks/useAIState.mjs.map +1 -0
  33. package/dist/es/components/Accessibility/AriaLiveAnnouncerProvider.mjs +144 -0
  34. package/dist/es/components/Accessibility/AriaLiveAnnouncerProvider.mjs.map +1 -0
  35. package/dist/es/components/Accessibility/AriaLiveOutlet.mjs +58 -0
  36. package/dist/es/components/Accessibility/AriaLiveOutlet.mjs.map +1 -0
  37. package/dist/es/components/Accessibility/AriaLiveOutletContext.mjs +8 -0
  38. package/dist/es/components/Accessibility/AriaLiveOutletContext.mjs.map +1 -0
  39. package/dist/es/components/Accessibility/NotificationAnnouncer.mjs +87 -0
  40. package/dist/es/components/Accessibility/NotificationAnnouncer.mjs.map +1 -0
  41. package/dist/es/components/Accessibility/hooks/useAudioPlaybackChangeAnnouncements.mjs +20 -0
  42. package/dist/es/components/Accessibility/hooks/useAudioPlaybackChangeAnnouncements.mjs.map +1 -0
  43. package/dist/es/components/Accessibility/hooks/useFocusReturn.mjs +37 -0
  44. package/dist/es/components/Accessibility/hooks/useFocusReturn.mjs.map +1 -0
  45. package/dist/es/components/Accessibility/hooks/useIncomingMessageAnnouncements.mjs +84 -0
  46. package/dist/es/components/Accessibility/hooks/useIncomingMessageAnnouncements.mjs.map +1 -0
  47. package/dist/es/components/Accessibility/hooks/useInertWhenHidden.mjs +85 -0
  48. package/dist/es/components/Accessibility/hooks/useInertWhenHidden.mjs.map +1 -0
  49. package/dist/es/components/Accessibility/hooks/useInteractionAnnouncements.mjs +155 -0
  50. package/dist/es/components/Accessibility/hooks/useInteractionAnnouncements.mjs.map +1 -0
  51. package/dist/es/components/Accessibility/scheduling/useAnnouncementQueue.mjs +43 -0
  52. package/dist/es/components/Accessibility/scheduling/useAnnouncementQueue.mjs.map +1 -0
  53. package/dist/es/components/Accessibility/scheduling/useDebouncedAnnounce.mjs +78 -0
  54. package/dist/es/components/Accessibility/scheduling/useDebouncedAnnounce.mjs.map +1 -0
  55. package/dist/es/components/Accessibility/scheduling/useSettledAnnouncement.mjs +90 -0
  56. package/dist/es/components/Accessibility/scheduling/useSettledAnnouncement.mjs.map +1 -0
  57. package/dist/es/components/Accessibility/useAriaLiveAnnouncer.mjs +16 -0
  58. package/dist/es/components/Accessibility/useAriaLiveAnnouncer.mjs.map +1 -0
  59. package/dist/es/components/Attachment/Attachment.mjs +74 -0
  60. package/dist/es/components/Attachment/Attachment.mjs.map +1 -0
  61. package/dist/es/components/Attachment/AttachmentActions.mjs +109 -0
  62. package/dist/es/components/Attachment/AttachmentActions.mjs.map +1 -0
  63. package/dist/es/components/Attachment/AttachmentContainer.mjs +265 -0
  64. package/dist/es/components/Attachment/AttachmentContainer.mjs.map +1 -0
  65. package/dist/es/components/Attachment/Audio.mjs +104 -0
  66. package/dist/es/components/Attachment/Audio.mjs.map +1 -0
  67. package/dist/es/components/Attachment/FileAttachment.mjs +47 -0
  68. package/dist/es/components/Attachment/FileAttachment.mjs.map +1 -0
  69. package/dist/es/components/Attachment/Geolocation.mjs +77 -0
  70. package/dist/es/components/Attachment/Geolocation.mjs.map +1 -0
  71. package/dist/es/components/Attachment/Giphy.mjs +62 -0
  72. package/dist/es/components/Attachment/Giphy.mjs.map +1 -0
  73. package/dist/es/components/Attachment/Image.mjs +19 -0
  74. package/dist/es/components/Attachment/Image.mjs.map +1 -0
  75. package/dist/es/components/Attachment/LinkPreview/Card.mjs +93 -0
  76. package/dist/es/components/Attachment/LinkPreview/Card.mjs.map +1 -0
  77. package/dist/es/components/Attachment/LinkPreview/UnableToRenderCard.mjs +22 -0
  78. package/dist/es/components/Attachment/LinkPreview/UnableToRenderCard.mjs.map +1 -0
  79. package/dist/es/components/Attachment/ModalGallery.mjs +166 -0
  80. package/dist/es/components/Attachment/ModalGallery.mjs.map +1 -0
  81. package/dist/es/components/Attachment/UnsupportedAttachment.mjs +25 -0
  82. package/dist/es/components/Attachment/UnsupportedAttachment.mjs.map +1 -0
  83. package/dist/es/components/Attachment/VideoAttachment.mjs +56 -0
  84. package/dist/es/components/Attachment/VideoAttachment.mjs.map +1 -0
  85. package/dist/es/components/Attachment/VisibilityDisclaimer.mjs +17 -0
  86. package/dist/es/components/Attachment/VisibilityDisclaimer.mjs.map +1 -0
  87. package/dist/es/components/Attachment/VoiceRecording.mjs +134 -0
  88. package/dist/es/components/Attachment/VoiceRecording.mjs.map +1 -0
  89. package/dist/es/components/Attachment/attachment-sizing.mjs +73 -0
  90. package/dist/es/components/Attachment/attachment-sizing.mjs.map +1 -0
  91. package/dist/es/components/Attachment/audioSampling.mjs +74 -0
  92. package/dist/es/components/Attachment/audioSampling.mjs.map +1 -0
  93. package/dist/es/components/Attachment/components/AttachmentUploadProgressIndicator.mjs +38 -0
  94. package/dist/es/components/Attachment/components/AttachmentUploadProgressIndicator.mjs.map +1 -0
  95. package/dist/es/components/Attachment/components/DownloadButton.mjs +35 -0
  96. package/dist/es/components/Attachment/components/DownloadButton.mjs.map +1 -0
  97. package/dist/es/components/Attachment/components/FileSizeIndicator.mjs +17 -0
  98. package/dist/es/components/Attachment/components/FileSizeIndicator.mjs.map +1 -0
  99. package/dist/es/components/Attachment/giphyAccessibility.mjs +15 -0
  100. package/dist/es/components/Attachment/giphyAccessibility.mjs.map +1 -0
  101. package/dist/es/components/Attachment/hooks/useAttachmentUploadState.mjs +106 -0
  102. package/dist/es/components/Attachment/hooks/useAttachmentUploadState.mjs.map +1 -0
  103. package/dist/es/components/Attachment/hooks/useLocalVideoDimensions.mjs +79 -0
  104. package/dist/es/components/Attachment/hooks/useLocalVideoDimensions.mjs.map +1 -0
  105. package/dist/es/components/Attachment/icons.mjs +13 -0
  106. package/dist/es/components/Attachment/icons.mjs.map +1 -0
  107. package/dist/es/components/Attachment/utils.mjs +41 -0
  108. package/dist/es/components/Attachment/utils.mjs.map +1 -0
  109. package/dist/es/components/AudioPlayback/AudioPlayer.mjs +457 -0
  110. package/dist/es/components/AudioPlayback/AudioPlayer.mjs.map +1 -0
  111. package/dist/es/components/AudioPlayback/AudioPlayerPool.mjs +109 -0
  112. package/dist/es/components/AudioPlayback/AudioPlayerPool.mjs.map +1 -0
  113. package/dist/es/components/AudioPlayback/WithAudioPlayback.mjs +72 -0
  114. package/dist/es/components/AudioPlayback/WithAudioPlayback.mjs.map +1 -0
  115. package/dist/es/components/AudioPlayback/components/DurationDisplay.mjs +33 -0
  116. package/dist/es/components/AudioPlayback/components/DurationDisplay.mjs.map +1 -0
  117. package/dist/es/components/AudioPlayback/components/PlaybackRateButton.mjs +15 -0
  118. package/dist/es/components/AudioPlayback/components/PlaybackRateButton.mjs.map +1 -0
  119. package/dist/es/components/AudioPlayback/components/ProgressBar.mjs +56 -0
  120. package/dist/es/components/AudioPlayback/components/ProgressBar.mjs.map +1 -0
  121. package/dist/es/components/AudioPlayback/components/WaveProgressBar.mjs +107 -0
  122. package/dist/es/components/AudioPlayback/components/WaveProgressBar.mjs.map +1 -0
  123. package/dist/es/components/AudioPlayback/components/formatTime.mjs +14 -0
  124. package/dist/es/components/AudioPlayback/components/formatTime.mjs.map +1 -0
  125. package/dist/es/components/AudioPlayback/components/keyboardSeek.mjs +36 -0
  126. package/dist/es/components/AudioPlayback/components/keyboardSeek.mjs.map +1 -0
  127. package/dist/es/components/AudioPlayback/components/progressBarA11y.mjs +19 -0
  128. package/dist/es/components/AudioPlayback/components/progressBarA11y.mjs.map +1 -0
  129. package/dist/es/components/AudioPlayback/components/useInteractiveProgressBar.mjs +77 -0
  130. package/dist/es/components/AudioPlayback/components/useInteractiveProgressBar.mjs.map +1 -0
  131. package/dist/es/components/AudioPlayback/plugins/AudioPlayerNotificationsPlugin.mjs +33 -0
  132. package/dist/es/components/AudioPlayback/plugins/AudioPlayerNotificationsPlugin.mjs.map +1 -0
  133. package/dist/es/components/Avatar/Avatar.mjs +62 -0
  134. package/dist/es/components/Avatar/Avatar.mjs.map +1 -0
  135. package/dist/es/components/Avatar/AvatarStack.mjs +32 -0
  136. package/dist/es/components/Avatar/AvatarStack.mjs.map +1 -0
  137. package/dist/es/components/Avatar/ChannelAvatar.mjs +25 -0
  138. package/dist/es/components/Avatar/ChannelAvatar.mjs.map +1 -0
  139. package/dist/es/components/Avatar/GroupAvatar.mjs +53 -0
  140. package/dist/es/components/Avatar/GroupAvatar.mjs.map +1 -0
  141. package/dist/es/components/Avatar/utils.mjs +10 -0
  142. package/dist/es/components/Avatar/utils.mjs.map +1 -0
  143. package/dist/es/components/Badge/Badge.mjs +28 -0
  144. package/dist/es/components/Badge/Badge.mjs.map +1 -0
  145. package/dist/es/components/Badge/MediaBadge.mjs +20 -0
  146. package/dist/es/components/Badge/MediaBadge.mjs.map +1 -0
  147. package/dist/es/components/BaseImage/BaseImage.mjs +35 -0
  148. package/dist/es/components/BaseImage/BaseImage.mjs.map +1 -0
  149. package/dist/es/components/BaseImage/ImagePlaceholder.mjs +21 -0
  150. package/dist/es/components/BaseImage/ImagePlaceholder.mjs.map +1 -0
  151. package/dist/es/components/BaseImage/toBaseImageDescriptors.mjs +57 -0
  152. package/dist/es/components/BaseImage/toBaseImageDescriptors.mjs.map +1 -0
  153. package/dist/es/components/Button/Button.mjs +36 -0
  154. package/dist/es/components/Button/Button.mjs.map +1 -0
  155. package/dist/es/components/Button/PlayButton.mjs +26 -0
  156. package/dist/es/components/Button/PlayButton.mjs.map +1 -0
  157. package/dist/es/components/Channel/Channel.mjs +752 -0
  158. package/dist/es/components/Channel/Channel.mjs.map +1 -0
  159. package/dist/es/components/Channel/channelState.mjs +195 -0
  160. package/dist/es/components/Channel/channelState.mjs.map +1 -0
  161. package/dist/es/components/Channel/constants.mjs +6 -0
  162. package/dist/es/components/Channel/constants.mjs.map +1 -0
  163. package/dist/es/components/Channel/hooks/useChannelContainerClasses.mjs +20 -0
  164. package/dist/es/components/Channel/hooks/useChannelContainerClasses.mjs.map +1 -0
  165. package/dist/es/components/Channel/hooks/useCreateChannelStateContext.mjs +86 -0
  166. package/dist/es/components/Channel/hooks/useCreateChannelStateContext.mjs.map +1 -0
  167. package/dist/es/components/Channel/hooks/useCreateTypingContext.mjs +10 -0
  168. package/dist/es/components/Channel/hooks/useCreateTypingContext.mjs.map +1 -0
  169. package/dist/es/components/Channel/hooks/useEditMessageHandler.mjs +13 -0
  170. package/dist/es/components/Channel/hooks/useEditMessageHandler.mjs.map +1 -0
  171. package/dist/es/components/Channel/hooks/useIsMounted.mjs +16 -0
  172. package/dist/es/components/Channel/hooks/useIsMounted.mjs.map +1 -0
  173. package/dist/es/components/Channel/hooks/useMentionsHandlers.mjs +18 -0
  174. package/dist/es/components/Channel/hooks/useMentionsHandlers.mjs.map +1 -0
  175. package/dist/es/components/Channel/utils.mjs +156 -0
  176. package/dist/es/components/Channel/utils.mjs.map +1 -0
  177. package/dist/es/components/ChannelHeader/ChannelHeader.mjs +70 -0
  178. package/dist/es/components/ChannelHeader/ChannelHeader.mjs.map +1 -0
  179. package/dist/es/components/ChannelHeader/hooks/useChannelHasMembersOnline.mjs +51 -0
  180. package/dist/es/components/ChannelHeader/hooks/useChannelHasMembersOnline.mjs.map +1 -0
  181. package/dist/es/components/ChannelHeader/hooks/useChannelHeaderOnlineStatus.mjs +33 -0
  182. package/dist/es/components/ChannelHeader/hooks/useChannelHeaderOnlineStatus.mjs.map +1 -0
  183. package/dist/es/components/ChannelList/ChannelList.mjs +143 -0
  184. package/dist/es/components/ChannelList/ChannelList.mjs.map +1 -0
  185. package/dist/es/components/ChannelList/ChannelListHeader.mjs +22 -0
  186. package/dist/es/components/ChannelList/ChannelListHeader.mjs.map +1 -0
  187. package/dist/es/components/ChannelList/ChannelListUI.mjs +35 -0
  188. package/dist/es/components/ChannelList/ChannelListUI.mjs.map +1 -0
  189. package/dist/es/components/ChannelList/hooks/useChannelListKeyboardNavigation.mjs +82 -0
  190. package/dist/es/components/ChannelList/hooks/useChannelListKeyboardNavigation.mjs.map +1 -0
  191. package/dist/es/components/ChannelList/hooks/useChannelListShape.mjs +310 -0
  192. package/dist/es/components/ChannelList/hooks/useChannelListShape.mjs.map +1 -0
  193. package/dist/es/components/ChannelList/hooks/useChannelMembersState.mjs +23 -0
  194. package/dist/es/components/ChannelList/hooks/useChannelMembersState.mjs.map +1 -0
  195. package/dist/es/components/ChannelList/hooks/useChannelMembershipState.mjs +15 -0
  196. package/dist/es/components/ChannelList/hooks/useChannelMembershipState.mjs.map +1 -0
  197. package/dist/es/components/ChannelList/hooks/useConnectionRecoveredListener.mjs +19 -0
  198. package/dist/es/components/ChannelList/hooks/useConnectionRecoveredListener.mjs.map +1 -0
  199. package/dist/es/components/ChannelList/hooks/usePaginatedChannels.mjs +110 -0
  200. package/dist/es/components/ChannelList/hooks/usePaginatedChannels.mjs.map +1 -0
  201. package/dist/es/components/ChannelList/hooks/useSelectedChannelState.mjs +24 -0
  202. package/dist/es/components/ChannelList/hooks/useSelectedChannelState.mjs.map +1 -0
  203. package/dist/es/components/ChannelList/utils.mjs +86 -0
  204. package/dist/es/components/ChannelList/utils.mjs.map +1 -0
  205. package/dist/es/components/ChannelListItem/ChannelListItem.mjs +116 -0
  206. package/dist/es/components/ChannelListItem/ChannelListItem.mjs.map +1 -0
  207. package/dist/es/components/ChannelListItem/ChannelListItemActionButtons.defaults.mjs +432 -0
  208. package/dist/es/components/ChannelListItem/ChannelListItemActionButtons.defaults.mjs.map +1 -0
  209. package/dist/es/components/ChannelListItem/ChannelListItemActionButtons.mjs +67 -0
  210. package/dist/es/components/ChannelListItem/ChannelListItemActionButtons.mjs.map +1 -0
  211. package/dist/es/components/ChannelListItem/ChannelListItemTimestamp.mjs +30 -0
  212. package/dist/es/components/ChannelListItem/ChannelListItemTimestamp.mjs.map +1 -0
  213. package/dist/es/components/ChannelListItem/ChannelListItemUI.mjs +118 -0
  214. package/dist/es/components/ChannelListItem/ChannelListItemUI.mjs.map +1 -0
  215. package/dist/es/components/ChannelListItem/hooks/useChannelDisplayName.mjs +56 -0
  216. package/dist/es/components/ChannelListItem/hooks/useChannelDisplayName.mjs.map +1 -0
  217. package/dist/es/components/ChannelListItem/hooks/useChannelPreviewInfo.mjs +51 -0
  218. package/dist/es/components/ChannelListItem/hooks/useChannelPreviewInfo.mjs.map +1 -0
  219. package/dist/es/components/ChannelListItem/hooks/useIsChannelMuted.mjs +33 -0
  220. package/dist/es/components/ChannelListItem/hooks/useIsChannelMuted.mjs.map +1 -0
  221. package/dist/es/components/ChannelListItem/hooks/useIsUserMuted.mjs +11 -0
  222. package/dist/es/components/ChannelListItem/hooks/useIsUserMuted.mjs.map +1 -0
  223. package/dist/es/components/ChannelListItem/hooks/useMessageDeliveryStatus.mjs +68 -0
  224. package/dist/es/components/ChannelListItem/hooks/useMessageDeliveryStatus.mjs.map +1 -0
  225. package/dist/es/components/ChannelListItem/utils.a11y.mjs +121 -0
  226. package/dist/es/components/ChannelListItem/utils.a11y.mjs.map +1 -0
  227. package/dist/es/components/ChannelListItem/utils.mjs +195 -0
  228. package/dist/es/components/ChannelListItem/utils.mjs.map +1 -0
  229. package/dist/es/components/Chat/Chat.mjs +88 -0
  230. package/dist/es/components/Chat/Chat.mjs.map +1 -0
  231. package/dist/es/components/Chat/hooks/useChannelsQueryState.mjs +16 -0
  232. package/dist/es/components/Chat/hooks/useChannelsQueryState.mjs.map +1 -0
  233. package/dist/es/components/Chat/hooks/useChat.mjs +86 -0
  234. package/dist/es/components/Chat/hooks/useChat.mjs.map +1 -0
  235. package/dist/es/components/Chat/hooks/useCreateChatClient.mjs +36 -0
  236. package/dist/es/components/Chat/hooks/useCreateChatClient.mjs.map +1 -0
  237. package/dist/es/components/Chat/hooks/useCreateChatContext.mjs +38 -0
  238. package/dist/es/components/Chat/hooks/useCreateChatContext.mjs.map +1 -0
  239. package/dist/es/components/Chat/hooks/useReportLostConnectionSystemNotification.mjs +51 -0
  240. package/dist/es/components/Chat/hooks/useReportLostConnectionSystemNotification.mjs.map +1 -0
  241. package/dist/es/components/Chat/hooks/useSplitActionSet.mjs +21 -0
  242. package/dist/es/components/Chat/hooks/useSplitActionSet.mjs.map +1 -0
  243. package/dist/es/components/ChatView/ChatView.a11y.utility.mjs +13 -0
  244. package/dist/es/components/ChatView/ChatView.a11y.utility.mjs.map +1 -0
  245. package/dist/es/components/ChatView/ChatView.mjs +224 -0
  246. package/dist/es/components/ChatView/ChatView.mjs.map +1 -0
  247. package/dist/es/components/DateSeparator/DateSeparator.mjs +36 -0
  248. package/dist/es/components/DateSeparator/DateSeparator.mjs.map +1 -0
  249. package/dist/es/components/Dialog/components/Alert.mjs +53 -0
  250. package/dist/es/components/Dialog/components/Alert.mjs.map +1 -0
  251. package/dist/es/components/Dialog/components/Callout.mjs +57 -0
  252. package/dist/es/components/Dialog/components/Callout.mjs.map +1 -0
  253. package/dist/es/components/Dialog/components/ContextMenu.mjs +550 -0
  254. package/dist/es/components/Dialog/components/ContextMenu.mjs.map +1 -0
  255. package/dist/es/components/Dialog/components/Prompt.mjs +112 -0
  256. package/dist/es/components/Dialog/components/Prompt.mjs.map +1 -0
  257. package/dist/es/components/Dialog/components/Viewer.mjs +100 -0
  258. package/dist/es/components/Dialog/components/Viewer.mjs.map +1 -0
  259. package/dist/es/components/Dialog/hooks/useDialog.mjs +53 -0
  260. package/dist/es/components/Dialog/hooks/useDialog.mjs.map +1 -0
  261. package/dist/es/components/Dialog/hooks/usePopoverPosition.mjs +49 -0
  262. package/dist/es/components/Dialog/hooks/usePopoverPosition.mjs.map +1 -0
  263. package/dist/es/components/Dialog/service/DialogAnchor.mjs +175 -0
  264. package/dist/es/components/Dialog/service/DialogAnchor.mjs.map +1 -0
  265. package/dist/es/components/Dialog/service/DialogManager.mjs +169 -0
  266. package/dist/es/components/Dialog/service/DialogManager.mjs.map +1 -0
  267. package/dist/es/components/Dialog/service/DialogPortal.mjs +63 -0
  268. package/dist/es/components/Dialog/service/DialogPortal.mjs.map +1 -0
  269. package/dist/es/components/DragAndDrop/DragAndDropContainer.mjs +90 -0
  270. package/dist/es/components/DragAndDrop/DragAndDropContainer.mjs.map +1 -0
  271. package/dist/es/components/EmptyStateIndicator/EmptyStateIndicator.mjs +38 -0
  272. package/dist/es/components/EmptyStateIndicator/EmptyStateIndicator.mjs.map +1 -0
  273. package/dist/es/components/EventComponent/EventComponent.mjs +27 -0
  274. package/dist/es/components/EventComponent/EventComponent.mjs.map +1 -0
  275. package/dist/es/components/FileIcon/FileIcon.mjs +43 -0
  276. package/dist/es/components/FileIcon/FileIcon.mjs.map +1 -0
  277. package/dist/es/components/FileIcon/FileIconSet.mjs +407 -0
  278. package/dist/es/components/FileIcon/FileIconSet.mjs.map +1 -0
  279. package/dist/es/components/FileIcon/iconMap.mjs +41 -0
  280. package/dist/es/components/FileIcon/iconMap.mjs.map +1 -0
  281. package/dist/es/components/FileIcon/mimeTypes.mjs +242 -0
  282. package/dist/es/components/FileIcon/mimeTypes.mjs.map +1 -0
  283. package/dist/es/components/Form/Checkbox.mjs +15 -0
  284. package/dist/es/components/Form/Checkbox.mjs.map +1 -0
  285. package/dist/es/components/Form/Dropdown.mjs +132 -0
  286. package/dist/es/components/Form/Dropdown.mjs.map +1 -0
  287. package/dist/es/components/Form/FieldError.mjs +13 -0
  288. package/dist/es/components/Form/FieldError.mjs.map +1 -0
  289. package/dist/es/components/Form/NumericInput.mjs +125 -0
  290. package/dist/es/components/Form/NumericInput.mjs.map +1 -0
  291. package/dist/es/components/Form/SwitchField.mjs +103 -0
  292. package/dist/es/components/Form/SwitchField.mjs.map +1 -0
  293. package/dist/es/components/Form/TextInput.mjs +113 -0
  294. package/dist/es/components/Form/TextInput.mjs.map +1 -0
  295. package/dist/es/components/Form/TextInputFieldSet.mjs +21 -0
  296. package/dist/es/components/Form/TextInputFieldSet.mjs.map +1 -0
  297. package/dist/es/components/Form/hooks/useFormState.mjs +54 -0
  298. package/dist/es/components/Form/hooks/useFormState.mjs.map +1 -0
  299. package/dist/es/components/Gallery/Gallery.mjs +60 -0
  300. package/dist/es/components/Gallery/Gallery.mjs.map +1 -0
  301. package/dist/es/components/Gallery/GalleryContext.mjs +21 -0
  302. package/dist/es/components/Gallery/GalleryContext.mjs.map +1 -0
  303. package/dist/es/components/Gallery/GalleryHeader.mjs +65 -0
  304. package/dist/es/components/Gallery/GalleryHeader.mjs.map +1 -0
  305. package/dist/es/components/Gallery/GalleryUI.mjs +206 -0
  306. package/dist/es/components/Gallery/GalleryUI.mjs.map +1 -0
  307. package/dist/es/components/Icons/BaseIcon.mjs +20 -0
  308. package/dist/es/components/Icons/BaseIcon.mjs.map +1 -0
  309. package/dist/es/components/Icons/createIcon.mjs +23 -0
  310. package/dist/es/components/Icons/createIcon.mjs.map +1 -0
  311. package/dist/es/components/Icons/icons.mjs +802 -0
  312. package/dist/es/components/Icons/icons.mjs.map +1 -0
  313. package/dist/es/components/InfiniteScrollPaginator/InfiniteScroll.mjs +81 -0
  314. package/dist/es/components/InfiniteScrollPaginator/InfiniteScroll.mjs.map +1 -0
  315. package/dist/es/components/InfiniteScrollPaginator/InfiniteScrollPaginator.mjs +73 -0
  316. package/dist/es/components/InfiniteScrollPaginator/InfiniteScrollPaginator.mjs.map +1 -0
  317. package/dist/es/components/InfiniteScrollPaginator/hooks/useCursorPaginator.mjs +47 -0
  318. package/dist/es/components/InfiniteScrollPaginator/hooks/useCursorPaginator.mjs.map +1 -0
  319. package/dist/es/components/ListItemLayout/ListItemLayout.mjs +62 -0
  320. package/dist/es/components/ListItemLayout/ListItemLayout.mjs.map +1 -0
  321. package/dist/es/components/LoadMore/LoadMoreButton.mjs +28 -0
  322. package/dist/es/components/LoadMore/LoadMoreButton.mjs.map +1 -0
  323. package/dist/es/components/LoadMore/LoadMorePaginator.mjs +20 -0
  324. package/dist/es/components/LoadMore/LoadMorePaginator.mjs.map +1 -0
  325. package/dist/es/components/Loading/AttachmentUploadedSizeIndicator.mjs +33 -0
  326. package/dist/es/components/Loading/AttachmentUploadedSizeIndicator.mjs.map +1 -0
  327. package/dist/es/components/Loading/LoadingChannel.mjs +59 -0
  328. package/dist/es/components/Loading/LoadingChannel.mjs.map +1 -0
  329. package/dist/es/components/Loading/LoadingChannels.mjs +28 -0
  330. package/dist/es/components/Loading/LoadingChannels.mjs.map +1 -0
  331. package/dist/es/components/Loading/LoadingErrorIndicator.mjs +17 -0
  332. package/dist/es/components/Loading/LoadingErrorIndicator.mjs.map +1 -0
  333. package/dist/es/components/Loading/LoadingIndicator.mjs +15 -0
  334. package/dist/es/components/Loading/LoadingIndicator.mjs.map +1 -0
  335. package/dist/es/components/Loading/UploadProgressIndicator.mjs +15 -0
  336. package/dist/es/components/Loading/UploadProgressIndicator.mjs.map +1 -0
  337. package/dist/es/components/Loading/UploadedSizeIndicator.mjs +22 -0
  338. package/dist/es/components/Loading/UploadedSizeIndicator.mjs.map +1 -0
  339. package/dist/es/components/Loading/progress-indicators.mjs +50 -0
  340. package/dist/es/components/Loading/progress-indicators.mjs.map +1 -0
  341. package/dist/es/components/Location/ShareLocationDialog.mjs +206 -0
  342. package/dist/es/components/Location/ShareLocationDialog.mjs.map +1 -0
  343. package/dist/es/components/Location/hooks/useLiveLocationSharingManager.mjs +57 -0
  344. package/dist/es/components/Location/hooks/useLiveLocationSharingManager.mjs.map +1 -0
  345. package/dist/es/components/MediaRecorder/AudioRecorder/AudioRecorder.mjs +32 -0
  346. package/dist/es/components/MediaRecorder/AudioRecorder/AudioRecorder.mjs.map +1 -0
  347. package/dist/es/components/MediaRecorder/AudioRecorder/AudioRecorderRecordingControls.mjs +77 -0
  348. package/dist/es/components/MediaRecorder/AudioRecorder/AudioRecorderRecordingControls.mjs.map +1 -0
  349. package/dist/es/components/MediaRecorder/AudioRecorder/AudioRecordingButtonWithNotification.mjs +58 -0
  350. package/dist/es/components/MediaRecorder/AudioRecorder/AudioRecordingButtonWithNotification.mjs.map +1 -0
  351. package/dist/es/components/MediaRecorder/AudioRecorder/AudioRecordingPlayback.mjs +71 -0
  352. package/dist/es/components/MediaRecorder/AudioRecorder/AudioRecordingPlayback.mjs.map +1 -0
  353. package/dist/es/components/MediaRecorder/AudioRecorder/AudioRecordingPreview.mjs +65 -0
  354. package/dist/es/components/MediaRecorder/AudioRecorder/AudioRecordingPreview.mjs.map +1 -0
  355. package/dist/es/components/MediaRecorder/AudioRecorder/RecordingTimer.mjs +13 -0
  356. package/dist/es/components/MediaRecorder/AudioRecorder/RecordingTimer.mjs.map +1 -0
  357. package/dist/es/components/MediaRecorder/AudioRecorder/hooks/useTimeElapsed.mjs +40 -0
  358. package/dist/es/components/MediaRecorder/AudioRecorder/hooks/useTimeElapsed.mjs.map +1 -0
  359. package/dist/es/components/MediaRecorder/AudioRecorder/recordingStateIdentity.mjs +8 -0
  360. package/dist/es/components/MediaRecorder/AudioRecorder/recordingStateIdentity.mjs.map +1 -0
  361. package/dist/es/components/MediaRecorder/RecordingPermissionDeniedNotification.mjs +31 -0
  362. package/dist/es/components/MediaRecorder/RecordingPermissionDeniedNotification.mjs.map +1 -0
  363. package/dist/es/components/MediaRecorder/classes/AmplitudeRecorder.mjs +75 -0
  364. package/dist/es/components/MediaRecorder/classes/AmplitudeRecorder.mjs.map +1 -0
  365. package/dist/es/components/MediaRecorder/classes/BrowserPermission.mjs +62 -0
  366. package/dist/es/components/MediaRecorder/classes/BrowserPermission.mjs.map +1 -0
  367. package/dist/es/components/MediaRecorder/classes/MediaRecorderController.mjs +237 -0
  368. package/dist/es/components/MediaRecorder/classes/MediaRecorderController.mjs.map +1 -0
  369. package/dist/es/components/MediaRecorder/hooks/useMediaRecorder.mjs +79 -0
  370. package/dist/es/components/MediaRecorder/hooks/useMediaRecorder.mjs.map +1 -0
  371. package/dist/es/components/MediaRecorder/observable/BehaviorSubject.mjs +27 -0
  372. package/dist/es/components/MediaRecorder/observable/BehaviorSubject.mjs.map +1 -0
  373. package/dist/es/components/MediaRecorder/observable/Observable.mjs +23 -0
  374. package/dist/es/components/MediaRecorder/observable/Observable.mjs.map +1 -0
  375. package/dist/es/components/MediaRecorder/observable/Observer.mjs +8 -0
  376. package/dist/es/components/MediaRecorder/observable/Observer.mjs.map +1 -0
  377. package/dist/es/components/MediaRecorder/observable/Subject.mjs +54 -0
  378. package/dist/es/components/MediaRecorder/observable/Subject.mjs.map +1 -0
  379. package/dist/es/components/MediaRecorder/observable/Subscription.mjs +15 -0
  380. package/dist/es/components/MediaRecorder/observable/Subscription.mjs.map +1 -0
  381. package/dist/es/components/MediaRecorder/transcode/audioProcessing.mjs +34 -0
  382. package/dist/es/components/MediaRecorder/transcode/audioProcessing.mjs.map +1 -0
  383. package/dist/es/components/MediaRecorder/transcode/index.mjs +12 -0
  384. package/dist/es/components/MediaRecorder/transcode/index.mjs.map +1 -0
  385. package/dist/es/components/MediaRecorder/transcode/wav.mjs +99 -0
  386. package/dist/es/components/MediaRecorder/transcode/wav.mjs.map +1 -0
  387. package/dist/es/components/Message/Message.mjs +154 -0
  388. package/dist/es/components/Message/Message.mjs.map +1 -0
  389. package/dist/es/components/Message/MessageAlsoSentInChannelIndicator.mjs +79 -0
  390. package/dist/es/components/Message/MessageAlsoSentInChannelIndicator.mjs.map +1 -0
  391. package/dist/es/components/Message/MessageBlocked.mjs +27 -0
  392. package/dist/es/components/Message/MessageBlocked.mjs.map +1 -0
  393. package/dist/es/components/Message/MessageBubble.mjs +12 -0
  394. package/dist/es/components/Message/MessageBubble.mjs.map +1 -0
  395. package/dist/es/components/Message/MessageDeletedBubble.mjs +21 -0
  396. package/dist/es/components/Message/MessageDeletedBubble.mjs.map +1 -0
  397. package/dist/es/components/Message/MessageEditedIndicator.mjs +41 -0
  398. package/dist/es/components/Message/MessageEditedIndicator.mjs.map +1 -0
  399. package/dist/es/components/Message/MessageRepliesCountButton.mjs +37 -0
  400. package/dist/es/components/Message/MessageRepliesCountButton.mjs.map +1 -0
  401. package/dist/es/components/Message/MessageStatus.mjs +85 -0
  402. package/dist/es/components/Message/MessageStatus.mjs.map +1 -0
  403. package/dist/es/components/Message/MessageText.mjs +101 -0
  404. package/dist/es/components/Message/MessageText.mjs.map +1 -0
  405. package/dist/es/components/Message/MessageTimestamp.mjs +20 -0
  406. package/dist/es/components/Message/MessageTimestamp.mjs.map +1 -0
  407. package/dist/es/components/Message/MessageTranslationIndicator.mjs +53 -0
  408. package/dist/es/components/Message/MessageTranslationIndicator.mjs.map +1 -0
  409. package/dist/es/components/Message/MessageUI.mjs +185 -0
  410. package/dist/es/components/Message/MessageUI.mjs.map +1 -0
  411. package/dist/es/components/Message/PinIndicator.mjs +34 -0
  412. package/dist/es/components/Message/PinIndicator.mjs.map +1 -0
  413. package/dist/es/components/Message/QuotedMessage.mjs +26 -0
  414. package/dist/es/components/Message/QuotedMessage.mjs.map +1 -0
  415. package/dist/es/components/Message/ReminderNotification.mjs +57 -0
  416. package/dist/es/components/Message/ReminderNotification.mjs.map +1 -0
  417. package/dist/es/components/Message/StreamedMessageText.mjs +35 -0
  418. package/dist/es/components/Message/StreamedMessageText.mjs.map +1 -0
  419. package/dist/es/components/Message/Timestamp.mjs +41 -0
  420. package/dist/es/components/Message/Timestamp.mjs.map +1 -0
  421. package/dist/es/components/Message/emojiRegex.mjs +20 -0
  422. package/dist/es/components/Message/emojiRegex.mjs.map +1 -0
  423. package/dist/es/components/Message/hooks/useActionHandler.mjs +30 -0
  424. package/dist/es/components/Message/hooks/useActionHandler.mjs.map +1 -0
  425. package/dist/es/components/Message/hooks/useDeleteHandler.mjs +21 -0
  426. package/dist/es/components/Message/hooks/useDeleteHandler.mjs.map +1 -0
  427. package/dist/es/components/Message/hooks/useFlagHandler.mjs +20 -0
  428. package/dist/es/components/Message/hooks/useFlagHandler.mjs.map +1 -0
  429. package/dist/es/components/Message/hooks/useMarkUnreadHandler.mjs +17 -0
  430. package/dist/es/components/Message/hooks/useMarkUnreadHandler.mjs.map +1 -0
  431. package/dist/es/components/Message/hooks/useMentionsHandler.mjs +22 -0
  432. package/dist/es/components/Message/hooks/useMentionsHandler.mjs.map +1 -0
  433. package/dist/es/components/Message/hooks/useMessageReminder.mjs +14 -0
  434. package/dist/es/components/Message/hooks/useMessageReminder.mjs.map +1 -0
  435. package/dist/es/components/Message/hooks/useMessageTextStreaming.mjs +48 -0
  436. package/dist/es/components/Message/hooks/useMessageTextStreaming.mjs.map +1 -0
  437. package/dist/es/components/Message/hooks/useMuteHandler.mjs +24 -0
  438. package/dist/es/components/Message/hooks/useMuteHandler.mjs.map +1 -0
  439. package/dist/es/components/Message/hooks/useOpenThreadHandler.mjs +17 -0
  440. package/dist/es/components/Message/hooks/useOpenThreadHandler.mjs.map +1 -0
  441. package/dist/es/components/Message/hooks/usePinHandler.mjs +45 -0
  442. package/dist/es/components/Message/hooks/usePinHandler.mjs.map +1 -0
  443. package/dist/es/components/Message/hooks/useReactionHandler.mjs +90 -0
  444. package/dist/es/components/Message/hooks/useReactionHandler.mjs.map +1 -0
  445. package/dist/es/components/Message/hooks/useReactionsFetcher.mjs +28 -0
  446. package/dist/es/components/Message/hooks/useReactionsFetcher.mjs.map +1 -0
  447. package/dist/es/components/Message/hooks/useRetryHandler.mjs +13 -0
  448. package/dist/es/components/Message/hooks/useRetryHandler.mjs.map +1 -0
  449. package/dist/es/components/Message/hooks/useUserHandler.mjs +15 -0
  450. package/dist/es/components/Message/hooks/useUserHandler.mjs.map +1 -0
  451. package/dist/es/components/Message/hooks/useUserRole.mjs +47 -0
  452. package/dist/es/components/Message/hooks/useUserRole.mjs.map +1 -0
  453. package/dist/es/components/Message/renderText/componentRenderers/Anchor.mjs +20 -0
  454. package/dist/es/components/Message/renderText/componentRenderers/Anchor.mjs.map +1 -0
  455. package/dist/es/components/Message/renderText/componentRenderers/Emoji.mjs +12 -0
  456. package/dist/es/components/Message/renderText/componentRenderers/Emoji.mjs.map +1 -0
  457. package/dist/es/components/Message/renderText/componentRenderers/Mention.mjs +14 -0
  458. package/dist/es/components/Message/renderText/componentRenderers/Mention.mjs.map +1 -0
  459. package/dist/es/components/Message/renderText/regex.mjs +22 -0
  460. package/dist/es/components/Message/renderText/regex.mjs.map +1 -0
  461. package/dist/es/components/Message/renderText/rehypePlugins/emojiMarkdownPlugin.mjs +16 -0
  462. package/dist/es/components/Message/renderText/rehypePlugins/emojiMarkdownPlugin.mjs.map +1 -0
  463. package/dist/es/components/Message/renderText/rehypePlugins/mentionsMarkdownPlugin.mjs +111 -0
  464. package/dist/es/components/Message/renderText/rehypePlugins/mentionsMarkdownPlugin.mjs.map +1 -0
  465. package/dist/es/components/Message/renderText/remarkPlugins/htmlToTextPlugin.mjs +14 -0
  466. package/dist/es/components/Message/renderText/remarkPlugins/htmlToTextPlugin.mjs.map +1 -0
  467. package/dist/es/components/Message/renderText/remarkPlugins/imageToLink.mjs +33 -0
  468. package/dist/es/components/Message/renderText/remarkPlugins/imageToLink.mjs.map +1 -0
  469. package/dist/es/components/Message/renderText/remarkPlugins/keepLineBreaksPlugin.mjs +44 -0
  470. package/dist/es/components/Message/renderText/remarkPlugins/keepLineBreaksPlugin.mjs.map +1 -0
  471. package/dist/es/components/Message/renderText/remarkPlugins/plusPlusToEmphasis.mjs +68 -0
  472. package/dist/es/components/Message/renderText/remarkPlugins/plusPlusToEmphasis.mjs.map +1 -0
  473. package/dist/es/components/Message/renderText/remarkPlugins/remarkIgnoreMarkdown.mjs +19 -0
  474. package/dist/es/components/Message/renderText/remarkPlugins/remarkIgnoreMarkdown.mjs.map +1 -0
  475. package/dist/es/components/Message/renderText/renderText.mjs +131 -0
  476. package/dist/es/components/Message/renderText/renderText.mjs.map +1 -0
  477. package/dist/es/components/Message/utils.mjs +151 -0
  478. package/dist/es/components/Message/utils.mjs.map +1 -0
  479. package/dist/es/components/MessageActions/DeleteMessageAlert.mjs +43 -0
  480. package/dist/es/components/MessageActions/DeleteMessageAlert.mjs.map +1 -0
  481. package/dist/es/components/MessageActions/DownloadSubmenu.mjs +52 -0
  482. package/dist/es/components/MessageActions/DownloadSubmenu.mjs.map +1 -0
  483. package/dist/es/components/MessageActions/MessageActions.defaults.mjs +644 -0
  484. package/dist/es/components/MessageActions/MessageActions.defaults.mjs.map +1 -0
  485. package/dist/es/components/MessageActions/MessageActions.mjs +61 -0
  486. package/dist/es/components/MessageActions/MessageActions.mjs.map +1 -0
  487. package/dist/es/components/MessageActions/QuickMessageActionButton.mjs +20 -0
  488. package/dist/es/components/MessageActions/QuickMessageActionButton.mjs.map +1 -0
  489. package/dist/es/components/MessageActions/RemindMeSubmenu.mjs +71 -0
  490. package/dist/es/components/MessageActions/RemindMeSubmenu.mjs.map +1 -0
  491. package/dist/es/components/MessageActions/downloadUtils.mjs +65 -0
  492. package/dist/es/components/MessageActions/downloadUtils.mjs.map +1 -0
  493. package/dist/es/components/MessageActions/hooks/useBaseMessageActionSetFilter.mjs +64 -0
  494. package/dist/es/components/MessageActions/hooks/useBaseMessageActionSetFilter.mjs.map +1 -0
  495. package/dist/es/components/MessageBounce/MessageBounceModal.mjs +18 -0
  496. package/dist/es/components/MessageBounce/MessageBounceModal.mjs.map +1 -0
  497. package/dist/es/components/MessageBounce/MessageBouncePrompt.mjs +67 -0
  498. package/dist/es/components/MessageBounce/MessageBouncePrompt.mjs.map +1 -0
  499. package/dist/es/components/MessageComposer/AttachmentPreviewList/AttachmentPreviewList.mjs +91 -0
  500. package/dist/es/components/MessageComposer/AttachmentPreviewList/AttachmentPreviewList.mjs.map +1 -0
  501. package/dist/es/components/MessageComposer/AttachmentPreviewList/AudioAttachmentPreview.mjs +131 -0
  502. package/dist/es/components/MessageComposer/AttachmentPreviewList/AudioAttachmentPreview.mjs.map +1 -0
  503. package/dist/es/components/MessageComposer/AttachmentPreviewList/FileAttachmentPreview.mjs +82 -0
  504. package/dist/es/components/MessageComposer/AttachmentPreviewList/FileAttachmentPreview.mjs.map +1 -0
  505. package/dist/es/components/MessageComposer/AttachmentPreviewList/GeolocationPreview.mjs +53 -0
  506. package/dist/es/components/MessageComposer/AttachmentPreviewList/GeolocationPreview.mjs.map +1 -0
  507. package/dist/es/components/MessageComposer/AttachmentPreviewList/MediaAttachmentPreview.mjs +97 -0
  508. package/dist/es/components/MessageComposer/AttachmentPreviewList/MediaAttachmentPreview.mjs.map +1 -0
  509. package/dist/es/components/MessageComposer/AttachmentPreviewList/UnsupportedAttachmentPreview.mjs +36 -0
  510. package/dist/es/components/MessageComposer/AttachmentPreviewList/UnsupportedAttachmentPreview.mjs.map +1 -0
  511. package/dist/es/components/MessageComposer/AttachmentPreviewList/VoiceRecordingPreviewSlot.mjs +29 -0
  512. package/dist/es/components/MessageComposer/AttachmentPreviewList/VoiceRecordingPreviewSlot.mjs.map +1 -0
  513. package/dist/es/components/MessageComposer/AttachmentPreviewList/utils/AttachmentPreviewRoot.mjs +53 -0
  514. package/dist/es/components/MessageComposer/AttachmentPreviewList/utils/AttachmentPreviewRoot.mjs.map +1 -0
  515. package/dist/es/components/MessageComposer/AttachmentSelector/AttachmentSelector.mjs +308 -0
  516. package/dist/es/components/MessageComposer/AttachmentSelector/AttachmentSelector.mjs.map +1 -0
  517. package/dist/es/components/MessageComposer/AttachmentSelector/CommandsMenu.mjs +104 -0
  518. package/dist/es/components/MessageComposer/AttachmentSelector/CommandsMenu.mjs.map +1 -0
  519. package/dist/es/components/MessageComposer/CommandChip.mjs +37 -0
  520. package/dist/es/components/MessageComposer/CommandChip.mjs.map +1 -0
  521. package/dist/es/components/MessageComposer/CooldownTimer.mjs +15 -0
  522. package/dist/es/components/MessageComposer/CooldownTimer.mjs.map +1 -0
  523. package/dist/es/components/MessageComposer/EditedMessagePreview.mjs +17 -0
  524. package/dist/es/components/MessageComposer/EditedMessagePreview.mjs.map +1 -0
  525. package/dist/es/components/MessageComposer/LinkPreviewList.mjs +78 -0
  526. package/dist/es/components/MessageComposer/LinkPreviewList.mjs.map +1 -0
  527. package/dist/es/components/MessageComposer/MessageComposer.mjs +66 -0
  528. package/dist/es/components/MessageComposer/MessageComposer.mjs.map +1 -0
  529. package/dist/es/components/MessageComposer/MessageComposerActions.mjs +71 -0
  530. package/dist/es/components/MessageComposer/MessageComposerActions.mjs.map +1 -0
  531. package/dist/es/components/MessageComposer/MessageComposerUI.mjs +100 -0
  532. package/dist/es/components/MessageComposer/MessageComposerUI.mjs.map +1 -0
  533. package/dist/es/components/MessageComposer/QuotedMessageIndicator.mjs +9 -0
  534. package/dist/es/components/MessageComposer/QuotedMessageIndicator.mjs.map +1 -0
  535. package/dist/es/components/MessageComposer/QuotedMessagePreview.mjs +325 -0
  536. package/dist/es/components/MessageComposer/QuotedMessagePreview.mjs.map +1 -0
  537. package/dist/es/components/MessageComposer/RemoveAttachmentPreviewButton.mjs +25 -0
  538. package/dist/es/components/MessageComposer/RemoveAttachmentPreviewButton.mjs.map +1 -0
  539. package/dist/es/components/MessageComposer/SendButton.mjs +29 -0
  540. package/dist/es/components/MessageComposer/SendButton.mjs.map +1 -0
  541. package/dist/es/components/MessageComposer/SendToChannelCheckbox.mjs +51 -0
  542. package/dist/es/components/MessageComposer/SendToChannelCheckbox.mjs.map +1 -0
  543. package/dist/es/components/MessageComposer/StopAIGenerationButton.mjs +18 -0
  544. package/dist/es/components/MessageComposer/StopAIGenerationButton.mjs.map +1 -0
  545. package/dist/es/components/MessageComposer/WithDragAndDropUpload.mjs +109 -0
  546. package/dist/es/components/MessageComposer/WithDragAndDropUpload.mjs.map +1 -0
  547. package/dist/es/components/MessageComposer/hooks/useAttachmentManagerState.mjs +24 -0
  548. package/dist/es/components/MessageComposer/hooks/useAttachmentManagerState.mjs.map +1 -0
  549. package/dist/es/components/MessageComposer/hooks/useAttachmentsForPreview.mjs +21 -0
  550. package/dist/es/components/MessageComposer/hooks/useAttachmentsForPreview.mjs.map +1 -0
  551. package/dist/es/components/MessageComposer/hooks/useCanCreatePoll.mjs +15 -0
  552. package/dist/es/components/MessageComposer/hooks/useCanCreatePoll.mjs.map +1 -0
  553. package/dist/es/components/MessageComposer/hooks/useCooldownRemaining.mjs +19 -0
  554. package/dist/es/components/MessageComposer/hooks/useCooldownRemaining.mjs.map +1 -0
  555. package/dist/es/components/MessageComposer/hooks/useCreateMessageComposerContext.mjs +35 -0
  556. package/dist/es/components/MessageComposer/hooks/useCreateMessageComposerContext.mjs.map +1 -0
  557. package/dist/es/components/MessageComposer/hooks/useIsCooldownActive.mjs +12 -0
  558. package/dist/es/components/MessageComposer/hooks/useIsCooldownActive.mjs.map +1 -0
  559. package/dist/es/components/MessageComposer/hooks/useMessageComposerBindings.mjs +27 -0
  560. package/dist/es/components/MessageComposer/hooks/useMessageComposerBindings.mjs.map +1 -0
  561. package/dist/es/components/MessageComposer/hooks/useMessageComposerCommands.mjs +27 -0
  562. package/dist/es/components/MessageComposer/hooks/useMessageComposerCommands.mjs.map +1 -0
  563. package/dist/es/components/MessageComposer/hooks/useMessageComposerController.mjs +56 -0
  564. package/dist/es/components/MessageComposer/hooks/useMessageComposerController.mjs.map +1 -0
  565. package/dist/es/components/MessageComposer/hooks/useMessageComposerHasSendableData.mjs +13 -0
  566. package/dist/es/components/MessageComposer/hooks/useMessageComposerHasSendableData.mjs.map +1 -0
  567. package/dist/es/components/MessageComposer/hooks/useMessageContentIsEmpty.mjs +13 -0
  568. package/dist/es/components/MessageComposer/hooks/useMessageContentIsEmpty.mjs.map +1 -0
  569. package/dist/es/components/MessageComposer/hooks/usePasteHandler.mjs +34 -0
  570. package/dist/es/components/MessageComposer/hooks/usePasteHandler.mjs.map +1 -0
  571. package/dist/es/components/MessageComposer/hooks/useSubmitHandler.mjs +98 -0
  572. package/dist/es/components/MessageComposer/hooks/useSubmitHandler.mjs.map +1 -0
  573. package/dist/es/components/MessageComposer/hooks/useTextareaRef.mjs +14 -0
  574. package/dist/es/components/MessageComposer/hooks/useTextareaRef.mjs.map +1 -0
  575. package/dist/es/components/MessageComposer/hooks/utils.mjs +16 -0
  576. package/dist/es/components/MessageComposer/hooks/utils.mjs.map +1 -0
  577. package/dist/es/components/MessageComposer/icons.mjs +62 -0
  578. package/dist/es/components/MessageComposer/icons.mjs.map +1 -0
  579. package/dist/es/components/MessageComposer/preEditSnapshot.mjs +45 -0
  580. package/dist/es/components/MessageComposer/preEditSnapshot.mjs.map +1 -0
  581. package/dist/es/components/MessageList/FloatingDateSeparator.mjs +46 -0
  582. package/dist/es/components/MessageList/FloatingDateSeparator.mjs.map +1 -0
  583. package/dist/es/components/MessageList/GiphyPreviewMessage.mjs +15 -0
  584. package/dist/es/components/MessageList/GiphyPreviewMessage.mjs.map +1 -0
  585. package/dist/es/components/MessageList/MessageList.mjs +329 -0
  586. package/dist/es/components/MessageList/MessageList.mjs.map +1 -0
  587. package/dist/es/components/MessageList/MessageListMainPanel.mjs +12 -0
  588. package/dist/es/components/MessageList/MessageListMainPanel.mjs.map +1 -0
  589. package/dist/es/components/MessageList/NewMessageNotification.mjs +32 -0
  590. package/dist/es/components/MessageList/NewMessageNotification.mjs.map +1 -0
  591. package/dist/es/components/MessageList/ScrollToLatestMessageButton.mjs +78 -0
  592. package/dist/es/components/MessageList/ScrollToLatestMessageButton.mjs.map +1 -0
  593. package/dist/es/components/MessageList/UnreadMessagesNotification.mjs +33 -0
  594. package/dist/es/components/MessageList/UnreadMessagesNotification.mjs.map +1 -0
  595. package/dist/es/components/MessageList/UnreadMessagesSeparator.mjs +33 -0
  596. package/dist/es/components/MessageList/UnreadMessagesSeparator.mjs.map +1 -0
  597. package/dist/es/components/MessageList/VirtualizedMessageList.mjs +339 -0
  598. package/dist/es/components/MessageList/VirtualizedMessageList.mjs.map +1 -0
  599. package/dist/es/components/MessageList/VirtualizedMessageListComponents.mjs +93 -0
  600. package/dist/es/components/MessageList/VirtualizedMessageListComponents.mjs.map +1 -0
  601. package/dist/es/components/MessageList/hooks/MessageList/useEnrichedMessages.mjs +39 -0
  602. package/dist/es/components/MessageList/hooks/MessageList/useEnrichedMessages.mjs.map +1 -0
  603. package/dist/es/components/MessageList/hooks/MessageList/useFloatingDateSeparatorMessageList.mjs +78 -0
  604. package/dist/es/components/MessageList/hooks/MessageList/useFloatingDateSeparatorMessageList.mjs.map +1 -0
  605. package/dist/es/components/MessageList/hooks/MessageList/useMessageListElements.mjs +58 -0
  606. package/dist/es/components/MessageList/hooks/MessageList/useMessageListElements.mjs.map +1 -0
  607. package/dist/es/components/MessageList/hooks/MessageList/useMessageListScrollManager.mjs +141 -0
  608. package/dist/es/components/MessageList/hooks/MessageList/useMessageListScrollManager.mjs.map +1 -0
  609. package/dist/es/components/MessageList/hooks/MessageList/useScrollLocationLogic.mjs +275 -0
  610. package/dist/es/components/MessageList/hooks/MessageList/useScrollLocationLogic.mjs.map +1 -0
  611. package/dist/es/components/MessageList/hooks/MessageList/useUnreadMessagesNotification.mjs +81 -0
  612. package/dist/es/components/MessageList/hooks/MessageList/useUnreadMessagesNotification.mjs.map +1 -0
  613. package/dist/es/components/MessageList/hooks/VirtualizedMessageList/useFloatingDateSeparator.mjs +69 -0
  614. package/dist/es/components/MessageList/hooks/VirtualizedMessageList/useFloatingDateSeparator.mjs.map +1 -0
  615. package/dist/es/components/MessageList/hooks/VirtualizedMessageList/useGiphyPreview.mjs +24 -0
  616. package/dist/es/components/MessageList/hooks/VirtualizedMessageList/useGiphyPreview.mjs.map +1 -0
  617. package/dist/es/components/MessageList/hooks/VirtualizedMessageList/useMessageSetKey.mjs +18 -0
  618. package/dist/es/components/MessageList/hooks/VirtualizedMessageList/useMessageSetKey.mjs.map +1 -0
  619. package/dist/es/components/MessageList/hooks/VirtualizedMessageList/useNewMessageNotification.mjs +41 -0
  620. package/dist/es/components/MessageList/hooks/VirtualizedMessageList/useNewMessageNotification.mjs.map +1 -0
  621. package/dist/es/components/MessageList/hooks/VirtualizedMessageList/usePrependMessagesCount.mjs +41 -0
  622. package/dist/es/components/MessageList/hooks/VirtualizedMessageList/usePrependMessagesCount.mjs.map +1 -0
  623. package/dist/es/components/MessageList/hooks/VirtualizedMessageList/useScrollToBottomOnNewMessage.mjs +33 -0
  624. package/dist/es/components/MessageList/hooks/VirtualizedMessageList/useScrollToBottomOnNewMessage.mjs.map +1 -0
  625. package/dist/es/components/MessageList/hooks/VirtualizedMessageList/useShouldForceScrollToBottom.mjs +27 -0
  626. package/dist/es/components/MessageList/hooks/VirtualizedMessageList/useShouldForceScrollToBottom.mjs.map +1 -0
  627. package/dist/es/components/MessageList/hooks/VirtualizedMessageList/useUnreadMessagesNotificationVirtualized.mjs +43 -0
  628. package/dist/es/components/MessageList/hooks/VirtualizedMessageList/useUnreadMessagesNotificationVirtualized.mjs.map +1 -0
  629. package/dist/es/components/MessageList/hooks/useLastDeliveredData.mjs +43 -0
  630. package/dist/es/components/MessageList/hooks/useLastDeliveredData.mjs.map +1 -0
  631. package/dist/es/components/MessageList/hooks/useLastOwnMessage.mjs +8 -0
  632. package/dist/es/components/MessageList/hooks/useLastOwnMessage.mjs.map +1 -0
  633. package/dist/es/components/MessageList/hooks/useLastReadData.mjs +28 -0
  634. package/dist/es/components/MessageList/hooks/useLastReadData.mjs.map +1 -0
  635. package/dist/es/components/MessageList/hooks/useMarkRead.mjs +75 -0
  636. package/dist/es/components/MessageList/hooks/useMarkRead.mjs.map +1 -0
  637. package/dist/es/components/MessageList/hooks/useReducedMotionPreference.mjs +23 -0
  638. package/dist/es/components/MessageList/hooks/useReducedMotionPreference.mjs.map +1 -0
  639. package/dist/es/components/MessageList/renderMessages.mjs +76 -0
  640. package/dist/es/components/MessageList/renderMessages.mjs.map +1 -0
  641. package/dist/es/components/MessageList/utils.mjs +155 -0
  642. package/dist/es/components/MessageList/utils.mjs.map +1 -0
  643. package/dist/es/components/Modal/GlobalModal.mjs +157 -0
  644. package/dist/es/components/Modal/GlobalModal.mjs.map +1 -0
  645. package/dist/es/components/Notifications/Notification.mjs +91 -0
  646. package/dist/es/components/Notifications/Notification.mjs.map +1 -0
  647. package/dist/es/components/Notifications/NotificationConfigurationContext.mjs +19 -0
  648. package/dist/es/components/Notifications/NotificationConfigurationContext.mjs.map +1 -0
  649. package/dist/es/components/Notifications/NotificationList.mjs +314 -0
  650. package/dist/es/components/Notifications/NotificationList.mjs.map +1 -0
  651. package/dist/es/components/Notifications/hooks/useNotificationApi.mjs +107 -0
  652. package/dist/es/components/Notifications/hooks/useNotificationApi.mjs.map +1 -0
  653. package/dist/es/components/Notifications/hooks/useNotificationTarget.mjs +25 -0
  654. package/dist/es/components/Notifications/hooks/useNotificationTarget.mjs.map +1 -0
  655. package/dist/es/components/Notifications/hooks/useNotifications.mjs +39 -0
  656. package/dist/es/components/Notifications/hooks/useNotifications.mjs.map +1 -0
  657. package/dist/es/components/Notifications/hooks/useSystemNotifications.mjs +22 -0
  658. package/dist/es/components/Notifications/hooks/useSystemNotifications.mjs.map +1 -0
  659. package/dist/es/components/Notifications/notificationTarget.mjs +38 -0
  660. package/dist/es/components/Notifications/notificationTarget.mjs.map +1 -0
  661. package/dist/es/components/Poll/Poll.mjs +18 -0
  662. package/dist/es/components/Poll/Poll.mjs.map +1 -0
  663. package/dist/es/components/Poll/PollActions/AddCommentPrompt.mjs +79 -0
  664. package/dist/es/components/Poll/PollActions/AddCommentPrompt.mjs.map +1 -0
  665. package/dist/es/components/Poll/PollActions/EndPollAlert.mjs +61 -0
  666. package/dist/es/components/Poll/PollActions/EndPollAlert.mjs.map +1 -0
  667. package/dist/es/components/Poll/PollActions/PollAction.mjs +27 -0
  668. package/dist/es/components/Poll/PollActions/PollAction.mjs.map +1 -0
  669. package/dist/es/components/Poll/PollActions/PollActions.mjs +92 -0
  670. package/dist/es/components/Poll/PollActions/PollActions.mjs.map +1 -0
  671. package/dist/es/components/Poll/PollActions/PollAnswerList.mjs +70 -0
  672. package/dist/es/components/Poll/PollActions/PollAnswerList.mjs.map +1 -0
  673. package/dist/es/components/Poll/PollActions/PollOptionsFullList.mjs +32 -0
  674. package/dist/es/components/Poll/PollActions/PollOptionsFullList.mjs.map +1 -0
  675. package/dist/es/components/Poll/PollActions/PollQuestion.mjs +20 -0
  676. package/dist/es/components/Poll/PollActions/PollQuestion.mjs.map +1 -0
  677. package/dist/es/components/Poll/PollActions/PollResults/PollOptionWithVotes.mjs +49 -0
  678. package/dist/es/components/Poll/PollActions/PollResults/PollOptionWithVotes.mjs.map +1 -0
  679. package/dist/es/components/Poll/PollActions/PollResults/PollOptionWithVotesHeader.mjs +44 -0
  680. package/dist/es/components/Poll/PollActions/PollResults/PollOptionWithVotesHeader.mjs.map +1 -0
  681. package/dist/es/components/Poll/PollActions/PollResults/PollOptionWithVotesList.mjs +39 -0
  682. package/dist/es/components/Poll/PollActions/PollResults/PollOptionWithVotesList.mjs.map +1 -0
  683. package/dist/es/components/Poll/PollActions/PollResults/PollResults.mjs +75 -0
  684. package/dist/es/components/Poll/PollActions/PollResults/PollResults.mjs.map +1 -0
  685. package/dist/es/components/Poll/PollActions/SuggestPollOptionPrompt.mjs +79 -0
  686. package/dist/es/components/Poll/PollActions/SuggestPollOptionPrompt.mjs.map +1 -0
  687. package/dist/es/components/Poll/PollContent.mjs +28 -0
  688. package/dist/es/components/Poll/PollContent.mjs.map +1 -0
  689. package/dist/es/components/Poll/PollCreationDialog/MultipleAnswersField.mjs +84 -0
  690. package/dist/es/components/Poll/PollCreationDialog/MultipleAnswersField.mjs.map +1 -0
  691. package/dist/es/components/Poll/PollCreationDialog/NameField.mjs +41 -0
  692. package/dist/es/components/Poll/PollCreationDialog/NameField.mjs.map +1 -0
  693. package/dist/es/components/Poll/PollCreationDialog/OptionFieldSet.mjs +193 -0
  694. package/dist/es/components/Poll/PollCreationDialog/OptionFieldSet.mjs.map +1 -0
  695. package/dist/es/components/Poll/PollCreationDialog/PollCreationDialog.mjs +78 -0
  696. package/dist/es/components/Poll/PollCreationDialog/PollCreationDialog.mjs.map +1 -0
  697. package/dist/es/components/Poll/PollCreationDialog/PollCreationDialogControls.mjs +62 -0
  698. package/dist/es/components/Poll/PollCreationDialog/PollCreationDialogControls.mjs.map +1 -0
  699. package/dist/es/components/Poll/PollCreationDialog/PollOptionReorderHandle.mjs +79 -0
  700. package/dist/es/components/Poll/PollCreationDialog/PollOptionReorderHandle.mjs.map +1 -0
  701. package/dist/es/components/Poll/PollHeader.mjs +46 -0
  702. package/dist/es/components/Poll/PollHeader.mjs.map +1 -0
  703. package/dist/es/components/Poll/PollOptionList.mjs +41 -0
  704. package/dist/es/components/Poll/PollOptionList.mjs.map +1 -0
  705. package/dist/es/components/Poll/PollOptionSelector.mjs +99 -0
  706. package/dist/es/components/Poll/PollOptionSelector.mjs.map +1 -0
  707. package/dist/es/components/Poll/PollVote.mjs +59 -0
  708. package/dist/es/components/Poll/PollVote.mjs.map +1 -0
  709. package/dist/es/components/Poll/hooks/useManagePollVotesRealtime.mjs +36 -0
  710. package/dist/es/components/Poll/hooks/useManagePollVotesRealtime.mjs.map +1 -0
  711. package/dist/es/components/Poll/hooks/usePollAnswerPagination.mjs +44 -0
  712. package/dist/es/components/Poll/hooks/usePollAnswerPagination.mjs.map +1 -0
  713. package/dist/es/components/Poll/hooks/usePollOptionVotesPagination.mjs +44 -0
  714. package/dist/es/components/Poll/hooks/usePollOptionVotesPagination.mjs.map +1 -0
  715. package/dist/es/components/Portal/Portal.mjs +17 -0
  716. package/dist/es/components/Portal/Portal.mjs.map +1 -0
  717. package/dist/es/components/ReactFileUtilities/UploadButton.mjs +54 -0
  718. package/dist/es/components/ReactFileUtilities/UploadButton.mjs.map +1 -0
  719. package/dist/es/{audioProcessing.766ca76c.mjs → components/ReactFileUtilities/utils.mjs} +2 -32
  720. package/dist/es/components/ReactFileUtilities/utils.mjs.map +1 -0
  721. package/dist/es/components/Reactions/MessageReactions.mjs +150 -0
  722. package/dist/es/components/Reactions/MessageReactions.mjs.map +1 -0
  723. package/dist/es/components/Reactions/MessageReactionsDetail.mjs +150 -0
  724. package/dist/es/components/Reactions/MessageReactionsDetail.mjs.map +1 -0
  725. package/dist/es/components/Reactions/ReactionSelector.mjs +140 -0
  726. package/dist/es/components/Reactions/ReactionSelector.mjs.map +1 -0
  727. package/dist/es/components/Reactions/ReactionSelectorWithButton.mjs +51 -0
  728. package/dist/es/components/Reactions/ReactionSelectorWithButton.mjs.map +1 -0
  729. package/dist/es/components/Reactions/SpriteImage.mjs +34 -0
  730. package/dist/es/components/Reactions/SpriteImage.mjs.map +1 -0
  731. package/dist/es/components/Reactions/hooks/useFetchReactions.mjs +61 -0
  732. package/dist/es/components/Reactions/hooks/useFetchReactions.mjs.map +1 -0
  733. package/dist/es/components/Reactions/hooks/useProcessReactions.mjs +82 -0
  734. package/dist/es/components/Reactions/hooks/useProcessReactions.mjs.map +1 -0
  735. package/dist/es/components/Reactions/reactionOptions.mjs +79 -0
  736. package/dist/es/components/Reactions/reactionOptions.mjs.map +1 -0
  737. package/dist/es/components/Reactions/utils/utils.mjs +13 -0
  738. package/dist/es/components/Reactions/utils/utils.mjs.map +1 -0
  739. package/dist/es/components/SafeAnchor/SafeAnchor.mjs +21 -0
  740. package/dist/es/components/SafeAnchor/SafeAnchor.mjs.map +1 -0
  741. package/dist/es/components/Search/Search.mjs +40 -0
  742. package/dist/es/components/Search/Search.mjs.map +1 -0
  743. package/dist/es/components/Search/SearchBar/SearchBar.mjs +113 -0
  744. package/dist/es/components/Search/SearchBar/SearchBar.mjs.map +1 -0
  745. package/dist/es/components/Search/SearchContext.mjs +18 -0
  746. package/dist/es/components/Search/SearchContext.mjs.map +1 -0
  747. package/dist/es/components/Search/SearchResults/SearchResultItem.mjs +113 -0
  748. package/dist/es/components/Search/SearchResults/SearchResultItem.mjs.map +1 -0
  749. package/dist/es/components/Search/SearchResults/SearchResults.mjs +37 -0
  750. package/dist/es/components/Search/SearchResults/SearchResults.mjs.map +1 -0
  751. package/dist/es/components/Search/SearchResults/SearchResultsHeader.mjs +54 -0
  752. package/dist/es/components/Search/SearchResults/SearchResultsHeader.mjs.map +1 -0
  753. package/dist/es/components/Search/SearchResults/SearchResultsPresearch.mjs +15 -0
  754. package/dist/es/components/Search/SearchResults/SearchResultsPresearch.mjs.map +1 -0
  755. package/dist/es/components/Search/SearchResults/SearchSourceResultList.mjs +31 -0
  756. package/dist/es/components/Search/SearchResults/SearchSourceResultList.mjs.map +1 -0
  757. package/dist/es/components/Search/SearchResults/SearchSourceResultListFooter.mjs +31 -0
  758. package/dist/es/components/Search/SearchResults/SearchSourceResultListFooter.mjs.map +1 -0
  759. package/dist/es/components/Search/SearchResults/SearchSourceResults.mjs +30 -0
  760. package/dist/es/components/Search/SearchResults/SearchSourceResults.mjs.map +1 -0
  761. package/dist/es/components/Search/SearchResults/SearchSourceResultsEmpty.mjs +15 -0
  762. package/dist/es/components/Search/SearchResults/SearchSourceResultsEmpty.mjs.map +1 -0
  763. package/dist/es/components/Search/SearchResults/SearchSourceResultsHeader.mjs +6 -0
  764. package/dist/es/components/Search/SearchResults/SearchSourceResultsHeader.mjs.map +1 -0
  765. package/dist/es/components/Search/SearchResults/SearchSourceResultsLoadingIndicator.mjs +18 -0
  766. package/dist/es/components/Search/SearchResults/SearchSourceResultsLoadingIndicator.mjs.map +1 -0
  767. package/dist/es/components/Search/SearchSourceResultsContext.mjs +18 -0
  768. package/dist/es/components/Search/SearchSourceResultsContext.mjs.map +1 -0
  769. package/dist/es/components/Search/hooks/useAnnounceSearchResultCount.mjs +57 -0
  770. package/dist/es/components/Search/hooks/useAnnounceSearchResultCount.mjs.map +1 -0
  771. package/dist/es/components/Search/hooks/useSearchFocusedMessage.mjs +13 -0
  772. package/dist/es/components/Search/hooks/useSearchFocusedMessage.mjs.map +1 -0
  773. package/dist/es/components/Search/hooks/useSearchQueriesInProgress.mjs +24 -0
  774. package/dist/es/components/Search/hooks/useSearchQueriesInProgress.mjs.map +1 -0
  775. package/dist/es/components/Search/hooks/useSearchResultsKeyboardNavigation.mjs +28 -0
  776. package/dist/es/components/Search/hooks/useSearchResultsKeyboardNavigation.mjs.map +1 -0
  777. package/dist/es/components/SkipNavigation/SkipNavigation.mjs +64 -0
  778. package/dist/es/components/SkipNavigation/SkipNavigation.mjs.map +1 -0
  779. package/dist/es/components/SummarizedMessagePreview/SummarizedMessagePreview.mjs +55 -0
  780. package/dist/es/components/SummarizedMessagePreview/SummarizedMessagePreview.mjs.map +1 -0
  781. package/dist/es/components/SummarizedMessagePreview/hooks/useLatestMessagePreview.mjs +116 -0
  782. package/dist/es/components/SummarizedMessagePreview/hooks/useLatestMessagePreview.mjs.map +1 -0
  783. package/dist/es/components/TextareaComposer/SuggestionList/CommandItem.mjs +26 -0
  784. package/dist/es/components/TextareaComposer/SuggestionList/CommandItem.mjs.map +1 -0
  785. package/dist/es/components/TextareaComposer/SuggestionList/EmoticonItem.mjs +26 -0
  786. package/dist/es/components/TextareaComposer/SuggestionList/EmoticonItem.mjs.map +1 -0
  787. package/dist/es/components/TextareaComposer/SuggestionList/MentionItem/BroadcastMentionItem.mjs +32 -0
  788. package/dist/es/components/TextareaComposer/SuggestionList/MentionItem/BroadcastMentionItem.mjs.map +1 -0
  789. package/dist/es/components/TextareaComposer/SuggestionList/MentionItem/MentionItem.mjs +39 -0
  790. package/dist/es/components/TextareaComposer/SuggestionList/MentionItem/MentionItem.mjs.map +1 -0
  791. package/dist/es/components/TextareaComposer/SuggestionList/MentionItem/MentionSuggestionTitle.mjs +7 -0
  792. package/dist/es/components/TextareaComposer/SuggestionList/MentionItem/MentionSuggestionTitle.mjs.map +1 -0
  793. package/dist/es/components/TextareaComposer/SuggestionList/MentionItem/RoleItem.mjs +34 -0
  794. package/dist/es/components/TextareaComposer/SuggestionList/MentionItem/RoleItem.mjs.map +1 -0
  795. package/dist/es/components/TextareaComposer/SuggestionList/MentionItem/SpecialMentionItem.mjs +6 -0
  796. package/dist/es/components/TextareaComposer/SuggestionList/MentionItem/SpecialMentionItem.mjs.map +1 -0
  797. package/dist/es/components/TextareaComposer/SuggestionList/MentionItem/UserGroupItem.mjs +31 -0
  798. package/dist/es/components/TextareaComposer/SuggestionList/MentionItem/UserGroupItem.mjs.map +1 -0
  799. package/dist/es/components/TextareaComposer/SuggestionList/MentionItem/UserItem.mjs +50 -0
  800. package/dist/es/components/TextareaComposer/SuggestionList/MentionItem/UserItem.mjs.map +1 -0
  801. package/dist/es/components/TextareaComposer/SuggestionList/SuggestionList.mjs +198 -0
  802. package/dist/es/components/TextareaComposer/SuggestionList/SuggestionList.mjs.map +1 -0
  803. package/dist/es/components/TextareaComposer/SuggestionList/SuggestionListItem.mjs +46 -0
  804. package/dist/es/components/TextareaComposer/SuggestionList/SuggestionListItem.mjs.map +1 -0
  805. package/dist/es/components/TextareaComposer/SuggestionList/TokenizedSuggestionParts.mjs +30 -0
  806. package/dist/es/components/TextareaComposer/SuggestionList/TokenizedSuggestionParts.mjs.map +1 -0
  807. package/dist/es/components/TextareaComposer/TextareaComposer.mjs +288 -0
  808. package/dist/es/components/TextareaComposer/TextareaComposer.mjs.map +1 -0
  809. package/dist/es/components/TextareaComposer/hooks/useTextareaPlaceholder.mjs +30 -0
  810. package/dist/es/components/TextareaComposer/hooks/useTextareaPlaceholder.mjs.map +1 -0
  811. package/dist/es/components/Thread/LegacyThreadContext.mjs +8 -0
  812. package/dist/es/components/Thread/LegacyThreadContext.mjs.map +1 -0
  813. package/dist/es/components/Thread/Thread.mjs +106 -0
  814. package/dist/es/components/Thread/Thread.mjs.map +1 -0
  815. package/dist/es/components/Thread/ThreadHead.mjs +26 -0
  816. package/dist/es/components/Thread/ThreadHead.mjs.map +1 -0
  817. package/dist/es/components/Thread/ThreadHeader.mjs +88 -0
  818. package/dist/es/components/Thread/ThreadHeader.mjs.map +1 -0
  819. package/dist/es/components/Thread/ThreadStart.mjs +24 -0
  820. package/dist/es/components/Thread/ThreadStart.mjs.map +1 -0
  821. package/dist/es/components/Threads/ThreadContext.mjs +17 -0
  822. package/dist/es/components/Threads/ThreadContext.mjs.map +1 -0
  823. package/dist/es/components/Threads/ThreadList/ThreadList.mjs +120 -0
  824. package/dist/es/components/Threads/ThreadList/ThreadList.mjs.map +1 -0
  825. package/dist/es/components/Threads/ThreadList/ThreadListEmptyPlaceholder.mjs +17 -0
  826. package/dist/es/components/Threads/ThreadList/ThreadListEmptyPlaceholder.mjs.map +1 -0
  827. package/dist/es/components/Threads/ThreadList/ThreadListHeader.mjs +22 -0
  828. package/dist/es/components/Threads/ThreadList/ThreadListHeader.mjs.map +1 -0
  829. package/dist/es/components/Threads/ThreadList/ThreadListItem.mjs +18 -0
  830. package/dist/es/components/Threads/ThreadList/ThreadListItem.mjs.map +1 -0
  831. package/dist/es/components/Threads/ThreadList/ThreadListItemUI.mjs +160 -0
  832. package/dist/es/components/Threads/ThreadList/ThreadListItemUI.mjs.map +1 -0
  833. package/dist/es/components/Threads/ThreadList/ThreadListLoadingIndicator.mjs +22 -0
  834. package/dist/es/components/Threads/ThreadList/ThreadListLoadingIndicator.mjs.map +1 -0
  835. package/dist/es/components/Threads/ThreadList/ThreadListUnseenThreadsBanner.mjs +30 -0
  836. package/dist/es/components/Threads/ThreadList/ThreadListUnseenThreadsBanner.mjs.map +1 -0
  837. package/dist/es/components/Threads/ThreadList/utils.a11y.mjs +86 -0
  838. package/dist/es/components/Threads/ThreadList/utils.a11y.mjs.map +1 -0
  839. package/dist/es/components/Threads/UnreadCountBadge.mjs +16 -0
  840. package/dist/es/components/Threads/UnreadCountBadge.mjs.map +1 -0
  841. package/dist/es/components/Tooltip/Tooltip.mjs +39 -0
  842. package/dist/es/components/Tooltip/Tooltip.mjs.map +1 -0
  843. package/dist/es/components/Tooltip/hooks/useEnterLeaveHandlers.mjs +20 -0
  844. package/dist/es/components/Tooltip/hooks/useEnterLeaveHandlers.mjs.map +1 -0
  845. package/dist/es/components/TypingIndicator/TypingIndicator.mjs +79 -0
  846. package/dist/es/components/TypingIndicator/TypingIndicator.mjs.map +1 -0
  847. package/dist/es/components/TypingIndicator/TypingIndicatorDots.mjs +33 -0
  848. package/dist/es/components/TypingIndicator/TypingIndicatorDots.mjs.map +1 -0
  849. package/dist/es/components/TypingIndicator/TypingIndicatorHeader.mjs +44 -0
  850. package/dist/es/components/TypingIndicator/TypingIndicatorHeader.mjs.map +1 -0
  851. package/dist/es/components/TypingIndicator/hooks/useDebouncedTypingActive.mjs +53 -0
  852. package/dist/es/components/TypingIndicator/hooks/useDebouncedTypingActive.mjs.map +1 -0
  853. package/dist/es/components/TypingIndicator/utils/getTypingStatusMessage.mjs +15 -0
  854. package/dist/es/components/TypingIndicator/utils/getTypingStatusMessage.mjs.map +1 -0
  855. package/dist/es/components/UtilityComponents/ErrorBoundary.mjs +22 -0
  856. package/dist/es/components/UtilityComponents/ErrorBoundary.mjs.map +1 -0
  857. package/dist/es/components/UtilityComponents/NullComponent.mjs +6 -0
  858. package/dist/es/components/UtilityComponents/NullComponent.mjs.map +1 -0
  859. package/dist/es/components/UtilityComponents/hooks/useMutationObserver.mjs +45 -0
  860. package/dist/es/components/UtilityComponents/hooks/useMutationObserver.mjs.map +1 -0
  861. package/dist/es/components/UtilityComponents/useStableId.mjs +20 -0
  862. package/dist/es/components/UtilityComponents/useStableId.mjs.map +1 -0
  863. package/dist/es/{ReactPlayerWrapper.d2ae5941.mjs → components/VideoPlayer/ReactPlayerWrapper.mjs} +3 -3
  864. package/dist/es/components/VideoPlayer/ReactPlayerWrapper.mjs.map +1 -0
  865. package/dist/es/components/VideoPlayer/VideoPlayer.mjs +30 -0
  866. package/dist/es/components/VideoPlayer/VideoPlayer.mjs.map +1 -0
  867. package/dist/es/components/VideoPlayer/VideoThumbnail.mjs +35 -0
  868. package/dist/es/components/VideoPlayer/VideoThumbnail.mjs.map +1 -0
  869. package/dist/es/components/VisuallyHidden/VisuallyHidden.mjs +29 -0
  870. package/dist/es/components/VisuallyHidden/VisuallyHidden.mjs.map +1 -0
  871. package/dist/es/components/Window/Window.mjs +21 -0
  872. package/dist/es/components/Window/Window.mjs.map +1 -0
  873. package/dist/es/constants/messageTypes.mjs +9 -0
  874. package/dist/es/constants/messageTypes.mjs.map +1 -0
  875. package/dist/es/context/AttachmentSelectorContext.mjs +13 -0
  876. package/dist/es/context/AttachmentSelectorContext.mjs.map +1 -0
  877. package/dist/es/context/ChannelActionContext.mjs +20 -0
  878. package/dist/es/context/ChannelActionContext.mjs.map +1 -0
  879. package/dist/es/context/ChannelListContext.mjs +20 -0
  880. package/dist/es/context/ChannelListContext.mjs.map +1 -0
  881. package/dist/es/context/ChannelStateContext.mjs +24 -0
  882. package/dist/es/context/ChannelStateContext.mjs.map +1 -0
  883. package/dist/es/context/ChatContext.mjs +20 -0
  884. package/dist/es/context/ChatContext.mjs.map +1 -0
  885. package/dist/es/context/ComponentContext.mjs +13 -0
  886. package/dist/es/context/ComponentContext.mjs.map +1 -0
  887. package/dist/es/context/DialogManagerContext.mjs +119 -0
  888. package/dist/es/context/DialogManagerContext.mjs.map +1 -0
  889. package/dist/es/context/MessageBounceContext.mjs +53 -0
  890. package/dist/es/context/MessageBounceContext.mjs.map +1 -0
  891. package/dist/es/context/MessageComposerContext.mjs +17 -0
  892. package/dist/es/context/MessageComposerContext.mjs.map +1 -0
  893. package/dist/es/context/MessageContext.mjs +17 -0
  894. package/dist/es/context/MessageContext.mjs.map +1 -0
  895. package/dist/es/context/MessageListContext.mjs +23 -0
  896. package/dist/es/context/MessageListContext.mjs.map +1 -0
  897. package/dist/es/context/MessageTranslationViewContext.mjs +76 -0
  898. package/dist/es/context/MessageTranslationViewContext.mjs.map +1 -0
  899. package/dist/es/context/ModalContext.mjs +20 -0
  900. package/dist/es/context/ModalContext.mjs.map +1 -0
  901. package/dist/es/context/PollContext.mjs +15 -0
  902. package/dist/es/context/PollContext.mjs.map +1 -0
  903. package/dist/es/context/TranslationContext.mjs +30 -0
  904. package/dist/es/context/TranslationContext.mjs.map +1 -0
  905. package/dist/es/context/TypingContext.mjs +20 -0
  906. package/dist/es/context/TypingContext.mjs.map +1 -0
  907. package/dist/es/context/VirtualizedMessageListContext.mjs +16 -0
  908. package/dist/es/context/VirtualizedMessageListContext.mjs.map +1 -0
  909. package/dist/es/context/WithComponents.mjs +23 -0
  910. package/dist/es/context/WithComponents.mjs.map +1 -0
  911. package/dist/es/context/useComponentContextIcons.mjs +31 -0
  912. package/dist/es/context/useComponentContextIcons.mjs.map +1 -0
  913. package/dist/es/emojis.mjs +2 -229
  914. package/dist/es/i18n/Streami18n.mjs +545 -0
  915. package/dist/es/i18n/Streami18n.mjs.map +1 -0
  916. package/dist/es/i18n/TranslationBuilder/TranslationBuilder.mjs +86 -0
  917. package/dist/es/i18n/TranslationBuilder/TranslationBuilder.mjs.map +1 -0
  918. package/dist/es/i18n/TranslationBuilder/notifications/NotificationTranslationTopic.mjs +51 -0
  919. package/dist/es/i18n/TranslationBuilder/notifications/NotificationTranslationTopic.mjs.map +1 -0
  920. package/dist/es/i18n/TranslationBuilder/notifications/translators.mjs +47 -0
  921. package/dist/es/i18n/TranslationBuilder/notifications/translators.mjs.map +1 -0
  922. package/dist/es/i18n/TranslationBuilder/notifications/translatorsByNotificationType.mjs +24 -0
  923. package/dist/es/i18n/TranslationBuilder/notifications/translatorsByNotificationType.mjs.map +1 -0
  924. package/dist/es/i18n/de.mjs +782 -0
  925. package/dist/es/i18n/de.mjs.map +1 -0
  926. package/dist/es/i18n/en.mjs +779 -0
  927. package/dist/es/i18n/en.mjs.map +1 -0
  928. package/dist/es/i18n/es.mjs +821 -0
  929. package/dist/es/i18n/es.mjs.map +1 -0
  930. package/dist/es/i18n/fr.mjs +822 -0
  931. package/dist/es/i18n/fr.mjs.map +1 -0
  932. package/dist/es/i18n/hi.mjs +786 -0
  933. package/dist/es/i18n/hi.mjs.map +1 -0
  934. package/dist/es/i18n/it.mjs +821 -0
  935. package/dist/es/i18n/it.mjs.map +1 -0
  936. package/dist/es/i18n/ja.mjs +760 -0
  937. package/dist/es/i18n/ja.mjs.map +1 -0
  938. package/dist/es/i18n/ko.mjs +760 -0
  939. package/dist/es/i18n/ko.mjs.map +1 -0
  940. package/dist/es/i18n/nl.mjs +786 -0
  941. package/dist/es/i18n/nl.mjs.map +1 -0
  942. package/dist/es/i18n/pt.mjs +819 -0
  943. package/dist/es/i18n/pt.mjs.map +1 -0
  944. package/dist/es/i18n/ru.mjs +868 -0
  945. package/dist/es/i18n/ru.mjs.map +1 -0
  946. package/dist/es/i18n/tr.mjs +781 -0
  947. package/dist/es/i18n/tr.mjs.map +1 -0
  948. package/dist/es/i18n/utils.mjs +132 -0
  949. package/dist/es/i18n/utils.mjs.map +1 -0
  950. package/dist/es/index.mjs +323 -20870
  951. package/dist/es/mp3-encoder.mjs +1 -1
  952. package/dist/es/plugins/ChannelDetail/AvatarWithChannelDetail.mjs +40 -0
  953. package/dist/es/plugins/ChannelDetail/AvatarWithChannelDetail.mjs.map +1 -0
  954. package/dist/es/plugins/ChannelDetail/ChannelDetail.mjs +105 -0
  955. package/dist/es/plugins/ChannelDetail/ChannelDetail.mjs.map +1 -0
  956. package/dist/es/plugins/ChannelDetail/ChannelDetailContext.mjs +20 -0
  957. package/dist/es/plugins/ChannelDetail/ChannelDetailContext.mjs.map +1 -0
  958. package/dist/es/plugins/ChannelDetail/ChannelDetailEmptyList.mjs +14 -0
  959. package/dist/es/plugins/ChannelDetail/ChannelDetailEmptyList.mjs.map +1 -0
  960. package/dist/es/plugins/ChannelDetail/ChannelDetailListLoadingIndicator.mjs +20 -0
  961. package/dist/es/plugins/ChannelDetail/ChannelDetailListLoadingIndicator.mjs.map +1 -0
  962. package/dist/es/plugins/ChannelDetail/ChannelDetailNavButton.mjs +26 -0
  963. package/dist/es/plugins/ChannelDetail/ChannelDetailNavButton.mjs.map +1 -0
  964. package/dist/es/plugins/ChannelDetail/ChannelDetailSearchInput.mjs +35 -0
  965. package/dist/es/plugins/ChannelDetail/ChannelDetailSearchInput.mjs.map +1 -0
  966. package/dist/es/plugins/ChannelDetail/SectionNavigator/SectionNavigator.mjs +164 -0
  967. package/dist/es/plugins/ChannelDetail/SectionNavigator/SectionNavigator.mjs.map +1 -0
  968. package/dist/es/plugins/ChannelDetail/SectionNavigator/SectionNavigatorHeader.mjs +50 -0
  969. package/dist/es/plugins/ChannelDetail/SectionNavigator/SectionNavigatorHeader.mjs.map +1 -0
  970. package/dist/es/plugins/ChannelDetail/Views/ChannelFilesView/ChannelFilesEmptyList.mjs +25 -0
  971. package/dist/es/plugins/ChannelDetail/Views/ChannelFilesView/ChannelFilesEmptyList.mjs.map +1 -0
  972. package/dist/es/plugins/ChannelDetail/Views/ChannelFilesView/ChannelFilesView.mjs +130 -0
  973. package/dist/es/plugins/ChannelDetail/Views/ChannelFilesView/ChannelFilesView.mjs.map +1 -0
  974. package/dist/es/plugins/ChannelDetail/Views/ChannelFilesView/ChannelFilesView.utils.mjs +63 -0
  975. package/dist/es/plugins/ChannelDetail/Views/ChannelFilesView/ChannelFilesView.utils.mjs.map +1 -0
  976. package/dist/es/plugins/ChannelDetail/Views/ChannelFilesView/useChannelFilesSearch.mjs +47 -0
  977. package/dist/es/plugins/ChannelDetail/Views/ChannelFilesView/useChannelFilesSearch.mjs.map +1 -0
  978. package/dist/es/plugins/ChannelDetail/Views/ChannelManagementView/ChannelManagementActions.defaults.mjs +568 -0
  979. package/dist/es/plugins/ChannelDetail/Views/ChannelManagementView/ChannelManagementActions.defaults.mjs.map +1 -0
  980. package/dist/es/plugins/ChannelDetail/Views/ChannelManagementView/ChannelManagementView.mjs +324 -0
  981. package/dist/es/plugins/ChannelDetail/Views/ChannelManagementView/ChannelManagementView.mjs.map +1 -0
  982. package/dist/es/plugins/ChannelDetail/Views/ChannelMediaView/ChannelMediaEmptyList.mjs +25 -0
  983. package/dist/es/plugins/ChannelDetail/Views/ChannelMediaView/ChannelMediaEmptyList.mjs.map +1 -0
  984. package/dist/es/plugins/ChannelDetail/Views/ChannelMediaView/ChannelMediaView.mjs +215 -0
  985. package/dist/es/plugins/ChannelDetail/Views/ChannelMediaView/ChannelMediaView.mjs.map +1 -0
  986. package/dist/es/plugins/ChannelDetail/Views/ChannelMediaView/ChannelMediaView.utils.mjs +37 -0
  987. package/dist/es/plugins/ChannelDetail/Views/ChannelMediaView/ChannelMediaView.utils.mjs.map +1 -0
  988. package/dist/es/plugins/ChannelDetail/Views/ChannelMediaView/useChannelMediaSearch.mjs +47 -0
  989. package/dist/es/plugins/ChannelDetail/Views/ChannelMediaView/useChannelMediaSearch.mjs.map +1 -0
  990. package/dist/es/plugins/ChannelDetail/Views/ChannelMemberDetailView/ChannelMemberActions.defaults.mjs +451 -0
  991. package/dist/es/plugins/ChannelDetail/Views/ChannelMemberDetailView/ChannelMemberActions.defaults.mjs.map +1 -0
  992. package/dist/es/plugins/ChannelDetail/Views/ChannelMemberDetailView/ChannelMemberDetail.mjs +76 -0
  993. package/dist/es/plugins/ChannelDetail/Views/ChannelMemberDetailView/ChannelMemberDetail.mjs.map +1 -0
  994. package/dist/es/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersAddView.mjs +182 -0
  995. package/dist/es/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersAddView.mjs.map +1 -0
  996. package/dist/es/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersBrowseView.mjs +110 -0
  997. package/dist/es/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersBrowseView.mjs.map +1 -0
  998. package/dist/es/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersHeaderActions.defaults.mjs +120 -0
  999. package/dist/es/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersHeaderActions.defaults.mjs.map +1 -0
  1000. package/dist/es/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersView.mjs +91 -0
  1001. package/dist/es/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersView.mjs.map +1 -0
  1002. package/dist/es/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersView.utils.mjs +11 -0
  1003. package/dist/es/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersView.utils.mjs.map +1 -0
  1004. package/dist/es/plugins/ChannelDetail/Views/ChannelMembersView/useChannelMemberCount.mjs +22 -0
  1005. package/dist/es/plugins/ChannelDetail/Views/ChannelMembersView/useChannelMemberCount.mjs.map +1 -0
  1006. package/dist/es/plugins/ChannelDetail/Views/ChannelMembersView/useChannelMemberIds.mjs +23 -0
  1007. package/dist/es/plugins/ChannelDetail/Views/ChannelMembersView/useChannelMemberIds.mjs.map +1 -0
  1008. package/dist/es/plugins/ChannelDetail/Views/ChannelMembersView/useChannelMembersSearch.mjs +52 -0
  1009. package/dist/es/plugins/ChannelDetail/Views/ChannelMembersView/useChannelMembersSearch.mjs.map +1 -0
  1010. package/dist/es/plugins/ChannelDetail/Views/PinnedMessagesView/PinnedMessagesEmptyList.mjs +25 -0
  1011. package/dist/es/plugins/ChannelDetail/Views/PinnedMessagesView/PinnedMessagesEmptyList.mjs.map +1 -0
  1012. package/dist/es/plugins/ChannelDetail/Views/PinnedMessagesView/PinnedMessagesView.mjs +140 -0
  1013. package/dist/es/plugins/ChannelDetail/Views/PinnedMessagesView/PinnedMessagesView.mjs.map +1 -0
  1014. package/dist/es/plugins/ChannelDetail/Views/PinnedMessagesView/usePinnedMessagesCount.mjs +24 -0
  1015. package/dist/es/plugins/ChannelDetail/Views/PinnedMessagesView/usePinnedMessagesCount.mjs.map +1 -0
  1016. package/dist/es/plugins/ChannelDetail/Views/PinnedMessagesView/usePinnedMessagesSearch.mjs +68 -0
  1017. package/dist/es/plugins/ChannelDetail/Views/PinnedMessagesView/usePinnedMessagesSearch.mjs.map +1 -0
  1018. package/dist/es/plugins/ChannelDetail/VirtualizedList/VirtualizedList.mjs +42 -0
  1019. package/dist/es/plugins/ChannelDetail/VirtualizedList/VirtualizedList.mjs.map +1 -0
  1020. package/dist/es/plugins/Emojis/EmojiPicker.mjs +95 -0
  1021. package/dist/es/plugins/Emojis/EmojiPicker.mjs.map +1 -0
  1022. package/dist/es/plugins/Emojis/Picker.mjs +23 -0
  1023. package/dist/es/plugins/Emojis/Picker.mjs.map +1 -0
  1024. package/dist/es/plugins/Emojis/middleware/textComposerEmojiMiddleware.mjs +126 -0
  1025. package/dist/es/plugins/Emojis/middleware/textComposerEmojiMiddleware.mjs.map +1 -0
  1026. package/dist/es/store/hooks/useStateStore.mjs +32 -0
  1027. package/dist/es/store/hooks/useStateStore.mjs.map +1 -0
  1028. package/dist/es/utils/findReverse.mjs +8 -0
  1029. package/dist/es/utils/findReverse.mjs.map +1 -0
  1030. package/dist/es/utils/getChannel.mjs +38 -0
  1031. package/dist/es/utils/getChannel.mjs.map +1 -0
  1032. package/dist/es/utils/getChannelConfig.mjs +11 -0
  1033. package/dist/es/utils/getChannelConfig.mjs.map +1 -0
  1034. package/dist/es/utils/getTextareaCaretRect.mjs +45 -0
  1035. package/dist/es/utils/getTextareaCaretRect.mjs.map +1 -0
  1036. package/dist/es/utils/getWholeChar.mjs +20 -0
  1037. package/dist/es/utils/getWholeChar.mjs.map +1 -0
  1038. package/dist/es/utils/isDmChannel.mjs +9 -0
  1039. package/dist/es/utils/isDmChannel.mjs.map +1 -0
  1040. package/dist/es/utils/mergeDeep.mjs +8 -0
  1041. package/dist/es/utils/mergeDeep.mjs.map +1 -0
  1042. package/dist/es/utils/useStableCallback.mjs +34 -0
  1043. package/dist/es/utils/useStableCallback.mjs.map +1 -0
  1044. package/dist/types/components/Attachment/AttachmentContainer.d.ts.map +1 -1
  1045. package/dist/types/components/Attachment/Audio.d.ts.map +1 -1
  1046. package/dist/types/components/Attachment/FileAttachment.d.ts.map +1 -1
  1047. package/dist/types/components/Attachment/VideoAttachment.d.ts.map +1 -1
  1048. package/dist/types/components/Attachment/VoiceRecording.d.ts.map +1 -1
  1049. package/dist/types/components/Attachment/components/AttachmentUploadProgressIndicator.d.ts +32 -0
  1050. package/dist/types/components/Attachment/components/AttachmentUploadProgressIndicator.d.ts.map +1 -0
  1051. package/dist/types/components/Attachment/components/index.d.ts +1 -0
  1052. package/dist/types/components/Attachment/components/index.d.ts.map +1 -1
  1053. package/dist/types/components/Attachment/hooks/useAttachmentUploadState.d.ts +89 -0
  1054. package/dist/types/components/Attachment/hooks/useAttachmentUploadState.d.ts.map +1 -0
  1055. package/dist/types/components/Attachment/hooks/useLocalVideoDimensions.d.ts +16 -0
  1056. package/dist/types/components/Attachment/hooks/useLocalVideoDimensions.d.ts.map +1 -0
  1057. package/dist/types/components/Attachment/index.d.ts +1 -0
  1058. package/dist/types/components/Attachment/index.d.ts.map +1 -1
  1059. package/dist/types/components/Channel/Channel.d.ts.map +1 -1
  1060. package/dist/types/components/Channel/utils.d.ts +25 -3
  1061. package/dist/types/components/Channel/utils.d.ts.map +1 -1
  1062. package/dist/types/components/Dialog/service/DialogAnchor.d.ts +8 -1
  1063. package/dist/types/components/Dialog/service/DialogAnchor.d.ts.map +1 -1
  1064. package/dist/types/components/Loading/AttachmentUploadedSizeIndicator.d.ts +20 -0
  1065. package/dist/types/components/Loading/AttachmentUploadedSizeIndicator.d.ts.map +1 -0
  1066. package/dist/types/components/Loading/UploadProgressIndicator.d.ts +7 -1
  1067. package/dist/types/components/Loading/UploadProgressIndicator.d.ts.map +1 -1
  1068. package/dist/types/components/Loading/index.d.ts +1 -0
  1069. package/dist/types/components/Loading/index.d.ts.map +1 -1
  1070. package/dist/types/components/Message/MessageStatus.d.ts.map +1 -1
  1071. package/dist/types/components/MessageComposer/AttachmentPreviewList/AudioAttachmentPreview.d.ts.map +1 -1
  1072. package/dist/types/components/MessageComposer/AttachmentPreviewList/FileAttachmentPreview.d.ts.map +1 -1
  1073. package/dist/types/components/MessageComposer/AttachmentPreviewList/MediaAttachmentPreview.d.ts.map +1 -1
  1074. package/dist/types/components/MessageComposer/RemoveAttachmentPreviewButton.d.ts.map +1 -1
  1075. package/dist/types/components/MessageComposer/hooks/useMessageComposerHasSendableData.d.ts.map +1 -1
  1076. package/dist/types/components/MessageComposer/hooks/useSubmitHandler.d.ts.map +1 -1
  1077. package/dist/types/components/MessageComposer/hooks/utils.d.ts.map +1 -1
  1078. package/dist/types/components/TextareaComposer/TextareaComposer.d.ts.map +1 -1
  1079. package/dist/types/components/VideoPlayer/ReactPlayerWrapper.d.ts +1 -1
  1080. package/dist/types/components/VideoPlayer/ReactPlayerWrapper.d.ts.map +1 -1
  1081. package/dist/types/components/VideoPlayer/VideoPlayer.d.ts +7 -1
  1082. package/dist/types/components/VideoPlayer/VideoPlayer.d.ts.map +1 -1
  1083. package/dist/types/context/ComponentContext.d.ts +3 -0
  1084. package/dist/types/context/ComponentContext.d.ts.map +1 -1
  1085. package/dist/types/i18n/Streami18n.d.ts +1 -0
  1086. package/dist/types/i18n/Streami18n.d.ts.map +1 -1
  1087. package/package.json +5 -9
  1088. package/dist/cjs/NotificationList.6abbee1c.js.map +0 -1
  1089. package/dist/cjs/useInertWhenHidden.22151beb.js.map +0 -1
  1090. package/dist/es/NotificationList.db01a56d.mjs +0 -7703
  1091. package/dist/es/NotificationList.db01a56d.mjs.map +0 -1
  1092. package/dist/es/ReactPlayerWrapper.d2ae5941.mjs.map +0 -1
  1093. package/dist/es/audioProcessing.766ca76c.mjs.map +0 -1
  1094. package/dist/es/channel-detail.mjs.map +0 -1
  1095. package/dist/es/emojis.mjs.map +0 -1
  1096. package/dist/es/index.mjs.map +0 -1
  1097. package/dist/es/useChannelHeaderOnlineStatus.a9357343.mjs +0 -771
  1098. package/dist/es/useChannelHeaderOnlineStatus.a9357343.mjs.map +0 -1
  1099. package/dist/es/useInertWhenHidden.3d5fbdba.mjs +0 -5765
  1100. package/dist/es/useInertWhenHidden.3d5fbdba.mjs.map +0 -1
  1101. package/dist/types/components/MessageComposer/AttachmentPreviewList/AttachmentUploadedSizeIndicator.d.ts +0 -14
  1102. package/dist/types/components/MessageComposer/AttachmentPreviewList/AttachmentUploadedSizeIndicator.d.ts.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NotificationList.4ce251ea.js","names":[],"sources":["../../src/context/ChannelActionContext.tsx","../../src/context/ChannelListContext.tsx","../../src/context/ChannelStateContext.tsx","../../src/context/ChatContext.tsx","../../src/context/ComponentContext.tsx","../../src/components/Icons/BaseIcon.tsx","../../src/components/Icons/createIcon.tsx","../../src/components/Icons/icons.tsx","../../src/context/useComponentContextIcons.ts","../../src/components/Dialog/service/DialogManager.ts","../../src/store/hooks/useStateStore.ts","../../src/components/Dialog/hooks/useDialog.ts","../../src/components/Portal/Portal.ts","../../src/components/Dialog/service/DialogPortal.tsx","../../src/context/DialogManagerContext.tsx","../../src/context/MessageContext.tsx","../../src/context/ModalContext.tsx","../../src/i18n/utils.ts","../../src/context/TranslationContext.tsx","../../src/context/TypingContext.tsx","../../src/components/Accessibility/AriaLiveOutletContext.ts","../../src/components/Accessibility/useAriaLiveAnnouncer.ts","../../src/components/VisuallyHidden/VisuallyHidden.tsx","../../src/components/Accessibility/AriaLiveOutlet.tsx","../../src/components/Accessibility/scheduling/useDebouncedAnnounce.ts","../../src/components/Notifications/NotificationConfigurationContext.tsx","../../src/components/Notifications/notificationTarget.ts","../../src/components/Notifications/hooks/useNotifications.ts","../../src/components/UtilityComponents/useStableId.ts","../../src/components/Button/Button.tsx","../../src/components/EmptyStateIndicator/EmptyStateIndicator.tsx","../../src/components/Channel/channelState.ts","../../src/components/Channel/hooks/useCreateChannelStateContext.ts","../../src/components/Channel/hooks/useCreateTypingContext.ts","../../src/components/Channel/hooks/useEditMessageHandler.ts","../../src/components/Channel/hooks/useIsMounted.ts","../../src/components/Channel/hooks/useMentionsHandlers.ts","../../src/components/MessageComposer/hooks/utils.ts","../../src/components/Attachment/components/FileSizeIndicator.tsx","../../src/components/Loading/LoadingChannel.tsx","../../src/components/Loading/LoadingErrorIndicator.tsx","../../src/components/Loading/LoadingIndicator.tsx","../../src/components/Channel/constants.ts","../../src/components/Message/emojiRegex.ts","../../src/components/Message/utils.tsx","../../src/a11y/hooks/useAriaIdentifiers.ts","../../src/components/Dialog/hooks/usePopoverPosition.ts","../../src/components/Dialog/service/DialogAnchor.tsx","../../src/components/Avatar/Avatar.tsx","../../src/a11y/a11yUtils.ts","../../src/components/Dialog/components/ContextMenu.tsx","../../src/components/Dialog/components/Prompt.tsx","../../src/a11y/hooks/useResolvedModalAriaProps.ts","../../src/components/Modal/GlobalModal.tsx","../../src/components/Thread/LegacyThreadContext.ts","../../src/components/Avatar/utils.ts","../../src/components/Message/Timestamp.tsx","../../src/components/Message/MessageTimestamp.tsx","../../src/components/Attachment/components/DownloadButton.tsx","../../src/components/AudioPlayback/AudioPlayer.ts","../../src/components/AudioPlayback/AudioPlayerPool.ts","../../src/components/AudioPlayback/plugins/AudioPlayerNotificationsPlugin.ts","../../src/components/Accessibility/hooks/useInteractionAnnouncements.ts","../../src/components/Accessibility/hooks/useAudioPlaybackChangeAnnouncements.ts","../../src/components/AudioPlayback/WithAudioPlayback.tsx","../../src/components/FileIcon/FileIconSet.tsx","../../src/components/FileIcon/mimeTypes.ts","../../src/components/FileIcon/iconMap.ts","../../src/components/FileIcon/FileIcon.tsx","../../src/components/AudioPlayback/components/formatTime.ts","../../src/components/BaseImage/ImagePlaceholder.tsx","../../src/components/BaseImage/BaseImage.tsx","../../src/components/BaseImage/toBaseImageDescriptors.ts","../../src/components/Gallery/GalleryContext.tsx","../../src/components/Gallery/GalleryHeader.tsx","../../src/components/VideoPlayer/VideoPlayer.tsx","../../src/components/VideoPlayer/VideoThumbnail.tsx","../../src/components/Gallery/GalleryUI.tsx","../../src/components/Gallery/Gallery.tsx","../../src/utils/getChannelConfig.ts","../../src/components/Form/SwitchField.tsx","../../src/components/Form/TextInput.tsx","../../src/components/ListItemLayout/ListItemLayout.tsx","../../src/constants/messageTypes.ts","../../src/components/MessageList/utils.ts","../../src/components/Channel/hooks/useChannelContainerClasses.ts","../../src/components/Channel/utils.ts","../../src/utils/getChannel.ts","../../src/components/Attachment/attachment-sizing.tsx","../../src/components/Search/hooks/useSearchFocusedMessage.ts","../../src/components/Channel/Channel.tsx","../../src/components/Threads/ThreadContext.tsx","../../src/components/Threads/UnreadCountBadge.tsx","../../src/components/ChatView/ChatView.a11y.utility.ts","../../src/components/ChatView/ChatView.tsx","../../src/components/Notifications/hooks/useNotificationTarget.ts","../../src/components/Notifications/hooks/useNotificationApi.ts","../../src/components/Notifications/Notification.tsx","../../src/components/Notifications/NotificationList.tsx"],"sourcesContent":["import type { PropsWithChildren } from 'react';\nimport React, { useContext } from 'react';\n\nimport type {\n DeleteMessageOptions,\n LocalMessage,\n Message,\n MessageResponse,\n SendMessageOptions,\n UpdateMessageAPIResponse,\n UpdateMessageOptions,\n} from 'stream-chat';\n\nimport type { ChannelStateReducerAction } from '../components/Channel/channelState';\nimport type { CustomMentionHandler } from '../components/Message/hooks/useMentionsHandler';\n\nimport type { ChannelUnreadUiState } from '../types/types';\n\nexport type MarkReadWrapperOptions = {\n /**\n * Signal, whether the `channelUnreadUiState` should be updated.\n * By default, the local state update is prevented when the Channel component is mounted.\n * This is in order to keep the UI indicating the original unread state, when the user opens a channel.\n */\n updateChannelUiUnreadState?: boolean;\n};\n\nexport type RetrySendMessage = (message: LocalMessage) => Promise<void>;\n\nexport type ChannelActionContextValue = {\n closeThread: (event?: React.BaseSyntheticEvent) => void;\n deleteMessage: (\n message: LocalMessage,\n options?: DeleteMessageOptions,\n ) => Promise<MessageResponse>;\n dispatch: React.Dispatch<ChannelStateReducerAction>;\n editMessage: (\n message: LocalMessage | MessageResponse,\n options?: UpdateMessageOptions,\n ) => Promise<UpdateMessageAPIResponse | void>;\n jumpToFirstUnreadMessage: (\n queryMessageLimit?: number,\n highlightDuration?: number,\n ) => Promise<void>;\n jumpToLatestMessage: () => Promise<void>;\n jumpToMessage: (\n messageId: string,\n limit?: number,\n highlightDuration?: number,\n ) => Promise<void>;\n loadMore: (limit?: number) => Promise<number>;\n loadMoreNewer: (limit?: number) => Promise<number>;\n loadMoreThread: () => Promise<void>;\n markRead: (options?: MarkReadWrapperOptions) => void;\n onMentionsClick: CustomMentionHandler;\n onMentionsHover: CustomMentionHandler;\n openThread: (message: LocalMessage, event?: React.BaseSyntheticEvent) => void;\n removeMessage: (message: LocalMessage) => void;\n retrySendMessage: RetrySendMessage;\n sendMessage: (params: {\n localMessage: LocalMessage;\n message: Message;\n options?: SendMessageOptions;\n }) => Promise<void>;\n setChannelUnreadUiState: React.Dispatch<\n React.SetStateAction<ChannelUnreadUiState | undefined>\n >;\n updateMessage: (message: MessageResponse | LocalMessage) => void;\n};\n\nexport const ChannelActionContext = React.createContext<\n ChannelActionContextValue | undefined\n>(undefined);\n\nexport const ChannelActionProvider = ({\n children,\n value,\n}: PropsWithChildren<{\n value: ChannelActionContextValue;\n}>) => (\n <ChannelActionContext.Provider value={value as unknown as ChannelActionContextValue}>\n {children}\n </ChannelActionContext.Provider>\n);\n\nexport const useChannelActionContext = (componentName?: string) => {\n const contextValue = useContext(ChannelActionContext);\n\n if (!contextValue) {\n console.warn(\n `The useChannelActionContext hook was called outside of the ChannelActionContext provider. Make sure this hook is called within a child of the Channel component. The errored call is located in the ${componentName} component.`,\n );\n\n return {} as ChannelActionContextValue;\n }\n\n return contextValue as unknown as ChannelActionContextValue;\n};\n","import type { Dispatch, PropsWithChildren, SetStateAction } from 'react';\nimport React, { createContext, useContext } from 'react';\n\nimport type { Channel } from 'stream-chat';\n\nexport type ChannelListContextValue = {\n /**\n * State representing the array of loaded channels.\n * Channels query is executed by default only by ChannelList component in the SDK.\n */\n channels: Channel[];\n /**\n * Indicator for channel pagination to determine whether more items can be loaded\n */\n hasNextPage: boolean;\n /**\n * Pagination function to load more channels\n */\n loadNextPage(): Promise<void>;\n /**\n * Sets the list of Channel objects to be rendered by ChannelList component.\n */\n setChannels: Dispatch<SetStateAction<Channel[]>>;\n};\n\nexport const ChannelListContext = createContext<ChannelListContextValue | undefined>(\n undefined,\n);\n\n/**\n * Context provider for components rendered within the `ChannelList`\n */\nexport const ChannelListContextProvider = ({\n children,\n value,\n}: PropsWithChildren<{\n value: ChannelListContextValue;\n}>) => (\n <ChannelListContext.Provider value={value as unknown as ChannelListContextValue}>\n {children}\n </ChannelListContext.Provider>\n);\n\nexport const useChannelListContext = () => {\n const contextValue = useContext(ChannelListContext);\n\n if (!contextValue) {\n return {} as ChannelListContextValue;\n }\n\n return contextValue as unknown as ChannelListContextValue;\n};\n","import type { PropsWithChildren } from 'react';\nimport React, { useContext } from 'react';\nimport type {\n Channel,\n ChannelConfigWithInfo,\n GiphyVersions,\n LocalMessage,\n Mute,\n ChannelState as StreamChannelState,\n} from 'stream-chat';\n\nimport type {\n ChannelUnreadUiState,\n ImageAttachmentSizeHandler,\n VideoAttachmentSizeHandler,\n} from '../types/types';\n\nexport type ChannelNotifications = Array<{\n id: string;\n text: string;\n type: 'success' | 'error';\n}>;\n\nexport type ChannelState = {\n suppressAutoscroll: boolean;\n error?: Error | null;\n hasMore?: boolean;\n hasMoreNewer?: boolean;\n highlightedMessageId?: string;\n loading?: boolean;\n loadingMore?: boolean;\n loadingMoreForJumpToChannelMessage?: boolean;\n loadingMoreNewer?: boolean;\n members?: StreamChannelState['members'];\n messages?: LocalMessage[];\n pinnedMessages?: LocalMessage[];\n read?: StreamChannelState['read'];\n thread?: LocalMessage | null;\n threadHasMore?: boolean;\n threadLoadingMore?: boolean;\n threadMessages?: LocalMessage[];\n threadSuppressAutoscroll?: boolean;\n typing?: StreamChannelState['typing'];\n watcherCount?: number;\n watchers?: StreamChannelState['watchers'];\n};\n\nexport type ChannelStateContextValue = Omit<ChannelState, 'typing'> & {\n channel: Channel;\n channelCapabilities: Record<string, boolean>;\n channelConfig: ChannelConfigWithInfo | undefined;\n imageAttachmentSizeHandler: ImageAttachmentSizeHandler;\n notifications: ChannelNotifications;\n shouldGenerateVideoThumbnail: boolean;\n videoAttachmentSizeHandler: VideoAttachmentSizeHandler;\n channelUnreadUiState?: ChannelUnreadUiState;\n giphyVersion?: GiphyVersions;\n mutes?: Array<Mute>;\n watcher_count?: number;\n};\n\nexport const ChannelStateContext = React.createContext<\n ChannelStateContextValue | undefined\n>(undefined);\n\nexport const ChannelStateProvider = ({\n children,\n value,\n}: PropsWithChildren<{\n value: ChannelStateContextValue;\n}>) => (\n <ChannelStateContext.Provider value={value as unknown as ChannelStateContextValue}>\n {children}\n </ChannelStateContext.Provider>\n);\n\nlet remainingWarningCount = 1;\n\nexport const useChannelStateContext = (componentName?: string) => {\n const contextValue = useContext(ChannelStateContext);\n\n if (!contextValue) {\n if (componentName && remainingWarningCount > 0) {\n console.warn(\n `The useChannelStateContext hook was called outside of the ChannelStateContext provider. Make sure this hook is called within a child of the Channel component. The errored call is located in the ${componentName} component.`,\n );\n remainingWarningCount -= 1;\n }\n\n return {} as ChannelStateContextValue;\n }\n\n return contextValue as unknown as ChannelStateContextValue;\n};\n","import React, { useContext } from 'react';\nimport type { PropsWithChildren } from 'react';\nimport type {\n AppSettingsAPIResponse,\n Channel,\n Mute,\n SearchController,\n} from 'stream-chat';\n\nimport type { ChatProps } from '../components/Chat/Chat';\nimport type { ChannelsQueryState } from '../components/Chat/hooks/useChannelsQueryState';\n\ntype CSSClasses =\n | 'chat'\n | 'chatContainer'\n | 'channel'\n | 'channelList'\n | 'message'\n | 'messageList'\n | 'thread'\n | 'threadList'\n | 'virtualMessage'\n | 'virtualizedMessageList';\n\nexport type CustomClasses = Partial<Record<CSSClasses, string>>;\n\ntype ChannelConfId = string; // e.g.: \"messaging:general\"\n\nexport type ChatContextValue = {\n /**\n * Indicates, whether a channels query has been triggered within ChannelList by its channels pagination controller.\n */\n channelsQueryState: ChannelsQueryState;\n getAppSettings: () => Promise<AppSettingsAPIResponse> | null;\n latestMessageDatesByChannels: Record<ChannelConfId, Date>;\n mutes: Array<Mute>;\n /** Instance of SearchController class that allows to control all the search operations. */\n searchController: SearchController;\n /**\n * Sets active channel to be rendered within Channel component.\n * @param newChannel\n * @param watchers\n * @param event\n */\n setActiveChannel: (\n newChannel?: Channel,\n watchers?: { limit?: number; offset?: number },\n event?: React.BaseSyntheticEvent,\n ) => void;\n useImageFlagEmojisOnWindows: boolean;\n /**\n * Active channel used to render the contents of the Channel component.\n */\n channel?: Channel;\n /**\n * Object through which custom classes can be set for main container components of the SDK.\n */\n customClasses?: CustomClasses;\n} & Partial<Pick<ChatProps, 'isMessageAIGenerated'>> &\n Required<Pick<ChatProps, 'theme' | 'client'>>;\n\nexport const ChatContext = React.createContext<ChatContextValue | undefined>(undefined);\n\nexport const ChatProvider = ({\n children,\n value,\n}: PropsWithChildren<{\n value: ChatContextValue;\n}>) => (\n <ChatContext.Provider value={value as unknown as ChatContextValue}>\n {children}\n </ChatContext.Provider>\n);\n\nexport const useChatContext = (componentName?: string) => {\n const contextValue = useContext(ChatContext);\n\n if (!contextValue) {\n console.warn(\n `The useChatContext hook was called outside of the ChatContext provider. Make sure this hook is called within a child of the Chat component. The errored call is located in the ${componentName} component.`,\n );\n\n return {} as ChatContextValue;\n }\n\n return contextValue as unknown as ChatContextValue;\n};\n","import type { ComponentProps, PropsWithChildren } from 'react';\nimport React, { useContext } from 'react';\nimport type { UserResponse } from 'stream-chat';\n\nimport {\n type AttachmentPreviewListProps,\n type AttachmentProps,\n type AvatarStackProps,\n type BaseImageProps,\n type CalloutDialogProps,\n type ChannelAvatarProps,\n type ChannelListItemUIProps,\n type ChannelListUIProps,\n type ContextMenuContentProps,\n type ContextMenuProps,\n type DateSeparatorProps,\n type EmojiSearchIndex,\n type EmptyStateIndicatorProps,\n type EventComponentProps,\n type FileDragAndDropContentProps,\n type GalleryProps,\n type GiphyPreviewMessageProps,\n type ImagePlaceholderProps,\n type LoadingErrorIndicatorProps,\n type LoadingIndicatorProps,\n type MessageBouncePromptProps,\n type MessageComposerProps,\n type MessageDeletedProps,\n type MessageEditedIndicatorProps,\n type MessageProps,\n type MessageReactionsDetailProps,\n type MessageReactionsProps,\n type MessageRepliesCountButtonProps,\n type MessageStatusProps,\n type MessageTimestampProps,\n type MessageUIComponentProps,\n type ModalGalleryProps,\n type ModalProps,\n type NewMessageNotificationProps,\n type NotificationListProps,\n type NotificationProps,\n type PinIndicatorProps,\n type PollCreationDialogProps,\n type PollOptionSelectorProps,\n type QuotedMessagePreviewProps,\n type ReactionOptions,\n type ReactionSelector,\n type ReactionSelectorProps,\n type RecordingPermissionDeniedNotificationProps,\n type ReminderNotificationProps,\n type ScrollToLatestMessageButtonProps,\n type SearchResultsPresearchProps,\n type SearchSourceResultListProps,\n type SendButtonProps,\n type ShareLocationDialogProps,\n type StartRecordingAudioButtonProps,\n type StreamedMessageTextProps,\n type TextareaComposerProps,\n type ThreadHeaderProps,\n type ThreadListItemProps,\n type ThreadListItemUIProps,\n type TimestampProps,\n type TranslationIndicatorProps,\n type TypingIndicatorProps,\n type UnreadMessagesNotificationProps,\n type UnreadMessagesSeparatorProps,\n type VoiceRecordingPreviewSlotProps,\n} from '../components';\n\nimport type {\n SuggestionItemProps,\n SuggestionListProps,\n} from '../components/TextareaComposer';\n\nimport type { IconSlots } from '../components/Icons';\nimport type { PropsWithChildrenOnly } from '../types/types';\nimport type { StopAIGenerationButtonProps } from '../components/MessageComposer/StopAIGenerationButton';\nimport type { VideoPlayerProps } from '../components/VideoPlayer';\nimport type { EditedMessagePreviewProps } from '../components/MessageComposer/EditedMessagePreview';\nimport type { FileIconProps } from '../components/FileIcon/FileIcon';\nimport type { AttachmentUploadProgressIndicatorProps } from '../components/Attachment/components/AttachmentUploadProgressIndicator';\nimport type { FileSizeIndicatorProps } from '../components/Attachment/components/FileSizeIndicator';\nimport type { CommandChipProps } from '../components/MessageComposer/CommandChip';\nimport type { ProgressIndicatorProps } from '../components/Loading/progress-indicators';\nimport type { UploadedSizeIndicatorProps } from '../components/Loading/UploadedSizeIndicator';\nimport type { NotificationAnnouncerProps } from '../components/Accessibility';\n\nexport type ComponentContextValue = {\n /** Custom UI component to display additional message composer action buttons left to the textarea, defaults to and accepts same props as: [AdditionalMessageComposerActions](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageComposer/MessageComposerActions.tsx) */\n AdditionalMessageComposerActions?: React.ComponentType;\n /** Custom UI component to display a message attachment, defaults to and accepts same props as: [Attachment](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Attachment/Attachment.tsx) */\n Attachment?: React.ComponentType<AttachmentProps>;\n /** Custom UI component for the file type icon shown on file attachments (e.g. PDF, doc). Accepts same props as [FileIcon](https://github.com/GetStream/stream-chat-react/blob/master/src/components/FileIcon/FileIcon.tsx) (e.g. mimeType, size, sizeConfig). Use this to override dimensions or provide a custom icon. */\n AttachmentFileIcon?: React.ComponentType<FileIconProps>;\n /** Custom UI component rendering the progress of an attachment whose upload is still in flight, defaults to and accepts same props as: [AttachmentUploadProgressIndicator](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Attachment/components/AttachmentUploadProgressIndicator.tsx) */\n AttachmentUploadProgressIndicator?: React.ComponentType<AttachmentUploadProgressIndicatorProps>;\n /** Custom UI component to display an attachment previews in MessageComposer, defaults to and accepts same props as: [Attachment](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageComposer/AttachmentPreviewList.tsx) */\n AttachmentPreviewList?: React.ComponentType<AttachmentPreviewListProps>;\n /** Custom UI component to control adding attachments to MessageComposer, defaults to and accepts same props as: [AttachmentSelector](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageComposer/AttachmentSelector.tsx) */\n AttachmentSelector?: React.ComponentType;\n /** Custom UI component for the dedicated voice recording preview slot above composer attachments (REACT-794), defaults to and accepts same props as: [VoiceRecordingPreviewSlot](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageComposer/AttachmentPreviewList/VoiceRecordingPreviewSlot.tsx) */\n VoiceRecordingPreviewSlot?: React.ComponentType<VoiceRecordingPreviewSlotProps>;\n /** Custom UI component for contents of attachment selector initiation button */\n AttachmentSelectorInitiationButtonContents?: React.ComponentType;\n /** Custom UI component to display AudioRecorder in MessageComposer, defaults to and accepts same props as: [AudioRecorder](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageComposer/AudioRecorder.tsx) */\n AudioRecorder?: React.ComponentType;\n /** Optional UI component to override the default suggestion Item component, defaults to and accepts same props as: [Item](https://github.com/GetStream/stream-chat-react/blob/master/src/components/AutoCompleteTextarea/Item.js) */\n AutocompleteSuggestionItem?: React.ComponentType<SuggestionItemProps>;\n /** Optional UI component to override the default List component that displays suggestions, defaults to and accepts same props as: [List](https://github.com/GetStream/stream-chat-react/blob/master/src/components/AutoCompleteTextarea/List.js) */\n AutocompleteSuggestionList?: React.ComponentType<SuggestionListProps>;\n extractDisplayInfo?: (_: {\n user?: Partial<UserResponse>;\n }) => NonNullable<AvatarStackProps['displayInfo']>[number];\n /** Overrides for icons rendered across the SDK. Individual keys are deep-merged with parent overrides via `WithComponents`, so a consumer can rebrand a single icon without wiping out the others. Preferred over component-level icon props (which are `@deprecated`). */\n icons?: IconSlots;\n /** UI component to display a user's avatar, defaults to and accepts same props as: [Avatar](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Avatar/Avatar.tsx) */\n Avatar?: React.ComponentType<ChannelAvatarProps>;\n /** UI component to display a list of avatars stacked in a row, defaults to and accepts same props as: [AvatarStack](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Avatar/AvatarStack.tsx) */\n AvatarStack?: React.ComponentType<AvatarStackProps>;\n /** Custom UI component to display <img/> elements resp. a fallback in case of load error, defaults to and accepts same props as: [BaseImage](https://github.com/GetStream/stream-chat-react/blob/master/src/components/BaseImage/BaseImage.tsx) */\n BaseImage?: React.ComponentType<BaseImageProps>;\n /** Custom UI component to display the contents of callout dialog, accepts same props as: [DefaultCalloutDialog](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Dialog/base/Callout.tsx) */\n CalloutDialog?: React.ComponentType<CalloutDialogProps>;\n /** Custom UI component shown instead of the image when it fails to load, defaults to and accepts same props as: [ImagePlaceholder](https://github.com/GetStream/stream-chat-react/blob/master/src/components/BaseImage/ImagePlaceholder.tsx) */\n ImagePlaceholder?: React.ComponentType<ImagePlaceholderProps>;\n /** Custom UI component to display the header of the `ChannelList`, defaults to and accepts same props as: [ChannelListHeader](https://github.com/GetStream/stream-chat-react/blob/master/src/components/ChannelList/ChannelListHeader.tsx) */\n ChannelListHeader?: React.ComponentType;\n /** Custom UI component to display the container for the queried channels, defaults to and accepts same props as: [ChannelListUI](https://github.com/GetStream/stream-chat-react/blob/master/src/components/ChannelList/ChannelListUI.tsx) */\n ChannelListUI?: React.ComponentType<ChannelListUIProps>;\n /** Custom UI component to display set of action buttons within `ChannelListItemUI` component, accepts same props as: [ChannelListItemActionButtons](https://github.com/GetStream/stream-chat-react/blob/master/src/components/ChannelList/ChannelListItemActionButtons.tsx) */\n ChannelListItemActionButtons?: React.ComponentType;\n /** Custom UI component to display the channel preview in the list, defaults to and accepts same props as: [ChannelListItemUI](https://github.com/GetStream/stream-chat-react/blob/master/src/components/ChannelPreview/ChannelListItemUI.tsx) */\n ChannelListItemUI?: React.ComponentType<ChannelListItemUIProps>;\n /** Custom UI component to display command chip, defaults to and accepts same props as: [CommandChip](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageComposer/CommandChip.tsx) */\n CommandChip?: React.ComponentType<CommandChipProps>;\n /** Custom component for rendering context menus, defaults to and accepts same props as: [ContextMenu](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Dialog/components/ContextMenu.tsx). The default is behavior-aware (not purely presentational) and solves: stable anchoring/placement updates against the reference element, submenu stack navigation (open/return), coordinated dismissal (Escape, overlay click, controlled close), focus management for anchored menus, and transition state reset between openings so animations stay consistent. */\n ContextMenu?: React.ComponentType<ContextMenuProps>;\n /** Custom UI component for rendering context menu content (used by ContextMenu), defaults to and accepts same props as: [ContextMenuContent](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Dialog/components/ContextMenu.tsx). */\n ContextMenuContent?: React.ComponentType<ContextMenuContentProps>;\n /** Custom UI component to display the slow mode cooldown timer, defaults to and accepts same props as: [CooldownTimer](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageComposer/CooldownTimer.tsx) */\n CooldownTimer?: React.ComponentType;\n /** Custom UI component for date separators, defaults to and accepts same props as: [DateSeparator](https://github.com/GetStream/stream-chat-react/blob/master/src/components/DateSeparator.tsx) */\n DateSeparator?: React.ComponentType<DateSeparatorProps>;\n /** Custom UI component to display the contents on file drag-and-drop overlay, defaults to and accepts same props as: [FileDragAndDropContent](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageComposer/WithDragAndDropUpload.tsx) */\n FileDragAndDropContent?: React.ComponentType<FileDragAndDropContentProps>;\n /** Custom UI component to display a formatted file byte size (message attachments, upload previews), defaults to and accepts same props as: [FileSizeIndicator](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Attachment/components/FileSizeIndicator.tsx) */\n FileSizeIndicator?: React.ComponentType<FileSizeIndicatorProps>;\n /** Custom UI component to override default preview of edited message, defaults to and accepts same props as: [EditedMessagePreview](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageComposer/EditedMessagePreview.tsx) */\n EditedMessagePreview?: React.ComponentType<EditedMessagePreviewProps>;\n /** Custom UI component for rendering button with emoji picker in MessageComposer */\n EmojiPicker?: React.ComponentType;\n /** Mechanism to be used with autocomplete and text replace features of the `MessageComposer` component, see [emoji-mart `SearchIndex`](https://github.com/missive/emoji-mart#%EF%B8%8F%EF%B8%8F-headless-search) */\n emojiSearchIndex?: EmojiSearchIndex;\n /** Custom UI component to be displayed when the `MessageList` is empty, defaults to and accepts same props as: [EmptyStateIndicator](https://github.com/GetStream/stream-chat-react/blob/master/src/components/EmptyStateIndicator/EmptyStateIndicator.tsx) */\n EmptyStateIndicator?: React.ComponentType<EmptyStateIndicatorProps>;\n /** Custom component that provides gallery state (current index, navigation) via GalleryContext and renders GalleryUI. Override this to control the gallery's data/navigation logic. Defaults to and accepts same props as: [Gallery](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Gallery/Gallery.tsx) */\n Gallery?: React.ComponentType<GalleryProps>;\n /** Custom UI component to render the gallery's visual interface (slides, navigation buttons, header). Override this to change the gallery's appearance without altering navigation logic. Defaults to and accepts same props as: [GalleryUI](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Gallery/GalleryUI.tsx) */\n GalleryUI?: React.ComponentType;\n /** Custom UI component to render a Giphy preview in the `VirtualizedMessageList` */\n GiphyPreviewMessage?: React.ComponentType<GiphyPreviewMessageProps>;\n /** Custom UI component to render at the top of the `MessageList` */\n HeaderComponent?: React.ComponentType;\n /** Custom UI component handling how the message composer is rendered, defaults to and accepts the same props as [MessageComposerUI](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageComposer/MessageComposerUI.tsx) */\n MessageComposerUI?: React.ComponentType<MessageComposerProps>;\n /** Custom component to render link previews in message composer **/\n LinkPreviewList?: React.ComponentType;\n /** Custom UI component to be shown if the channel query fails, defaults to and accepts same props as: [LoadingErrorIndicator](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Loading/LoadingErrorIndicator.tsx) */\n LoadingErrorIndicator?: React.ComponentType<LoadingErrorIndicatorProps>;\n /** Custom UI component to render while the `MessageList` is loading new messages, defaults to and accepts same props as: [LoadingIndicator](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Loading/LoadingIndicator.tsx) */\n LoadingIndicator?: React.ComponentType<LoadingIndicatorProps>;\n /** Custom UI component for determinate progress (0–100), defaults to and accepts same props as: [ProgressIndicator](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Loading/progress-indicators.tsx) */\n ProgressIndicator?: React.ComponentType<ProgressIndicatorProps>;\n /** Custom UI component to display a message in the standard `MessageList`, defaults to and accepts the same props as: [MessageUI](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Message/MessageUI.tsx) */\n MessageUI?: React.ComponentType<MessageUIComponentProps>;\n /** Custom UI component to display a message in the standard `MessageList`, defaults to and accepts the same props as: [MessageUI](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Message/MessageUI.tsx)\n * @deprecated use `MessageUI` instead\n */\n Message?: React.ComponentType<MessageUIComponentProps>;\n /** Custom UI component for message actions popup, accepts no props, all the defaults are set within [MessageActions (unstable)](https://github.com/GetStream/stream-chat-react/blob/master/src/experimental/MessageActions/MessageActions.tsx) */\n MessageActions?: React.ComponentType;\n /** Custom UI component to display the contents of a bounced message modal. Usually it allows to retry, edit, or delete the message. Defaults to and accepts the same props as: [MessageBouncePrompt](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageBounce/MessageBouncePrompt.tsx) */\n MessageBouncePrompt?: React.ComponentType<MessageBouncePromptProps>;\n /** Custom UI component for a moderation-blocked message, defaults to and accepts same props as: [MessageBlocked](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Message/MessageBlocked.tsx) */\n MessageBlocked?: React.ComponentType;\n /** Custom UI component for a deleted message. Has no default component */\n MessageDeleted?: React.ComponentType<MessageDeletedProps>;\n /** Custom UI component for a message bubble of a deleted message, defaults to and accepts same props as: [MessageDeletedBubble](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Message/MessageDeletedBubble.tsx) */\n MessageDeletedBubble?: React.ComponentType;\n MessageListMainPanel?: React.ComponentType<PropsWithChildrenOnly>;\n /** Custom UI component to render a single notification item in NotificationList, defaults to and accepts same props as: [Notification](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Notifications/Notification.tsx) */\n Notification?: React.ForwardRefExoticComponent<\n NotificationProps & React.RefAttributes<HTMLDivElement>\n >;\n /** Custom UI component to render screen-reader notification announcements, defaults to and accepts same props as: [NotificationAnnouncer](https://github.com/GetStream/stream-chat-react/blob/master/src/a11y/NotificationAnnouncer.tsx) */\n NotificationAnnouncer?: React.ComponentType<NotificationAnnouncerProps>;\n /** Custom UI component to display notifications rendered by `NotificationList`, defaults to and accepts same props as: [NotificationList](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Notifications/NotificationList.tsx) */\n NotificationList?: React.ComponentType<NotificationListProps>;\n /** Custom UI component to display a notification when scrolled up the list and new messages arrive, defaults to and accepts same props as [NewMessageNotification](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageList/NewMessageNotification.tsx) */\n NewMessageNotification?: React.ComponentType<NewMessageNotificationProps>;\n /** Custom UI component to display the scroll-to-latest-message button in a `MessageList`, defaults to and accepts same props as: [ScrollToLatestMessageButton](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageList/ScrollToLatestMessageButton.tsx) */\n ScrollToLatestMessageButton?: React.ComponentType<ScrollToLatestMessageButtonProps>;\n /** Custom UI component to display message replies, defaults to and accepts same props as: [MessageRepliesCountButton](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Message/MessageRepliesCountButton.tsx) */\n MessageRepliesCountButton?: React.ComponentType<MessageRepliesCountButtonProps>;\n /** Custom UI component to display message delivery status, defaults to and accepts same props as: [MessageStatus](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Message/MessageStatus.tsx) */\n MessageStatus?: React.ComponentType<MessageStatusProps>;\n /** Custom UI component to display system messages, defaults to and accepts same props as: [EventComponent](https://github.com/GetStream/stream-chat-react/blob/master/src/components/EventComponent/EventComponent.tsx) */\n MessageSystem?: React.ComponentType<EventComponentProps>;\n /** Custom UI component to display a timestamp on a message, defaults to and accepts same props as: [MessageTimestamp](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Message/MessageTimestamp.tsx) */\n MessageTimestamp?: React.ComponentType<MessageTimestampProps>;\n /** Custom UI component for viewing content in a modal, defaults to and accepts the same props as [Modal](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Modal/Modal.tsx) */\n Modal?: React.ComponentType<ModalProps>;\n /** Custom UI component for viewing message's image attachments with option to expand into the Gallery on Modal, defaults to and accepts the same props as [ModalGallery](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Gallery/ModalGallery.tsx) */\n ModalGallery?: React.ComponentType<ModalGalleryProps>;\n /** Custom UI component to show \"Also sent in channel\" in thread message lists when message.show_in_channel is true, defaults to and accepts same props as: [MessageAlsoSentInChannelIndicator](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Message/MessageAlsoSentInChannelIndicator.tsx) */\n MessageAlsoSentInChannelIndicator?: React.ComponentType;\n /** Custom UI component to override default pinned message indicator, defaults to and accepts same props as: [PinIndicator](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Message/PinIndicator.tsx) */\n PinIndicator?: React.ComponentType<PinIndicatorProps>;\n /** Custom UI component to override default poll actions rendering in a message, defaults to and accepts same props as: [PollActions](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Poll/PollActions/PollActions.tsx) */\n PollActions?: React.ComponentType;\n /** Custom UI component to override default poll rendering in a message, defaults to and accepts same props as: [PollContent](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Poll/PollContent.tsx) */\n PollContent?: React.ComponentType;\n /** Custom UI component to override default poll creation dialog contents, defaults to and accepts same props as: [PollCreationDialog](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Poll/PollCreationDialog/PollCreationDialog.tsx) */\n PollCreationDialog?: React.ComponentType<PollCreationDialogProps>;\n /** Custom UI component to override default poll header in a message, defaults to and accepts same props as: [PollHeader](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Poll/PollHeader.tsx) */\n PollHeader?: React.ComponentType;\n /** Custom UI component to override default poll option selector, defaults to and accepts same props as: [PollOptionSelector](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Poll/PollOptionSelector.tsx) */\n PollOptionSelector?: React.ComponentType<PollOptionSelectorProps>;\n /** Custom UI component to override quoted message UI on a sent message, defaults to and accepts same props as: [QuotedMessage](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Message/QuotedMessage.tsx) */\n QuotedMessage?: React.ComponentType;\n /** Custom UI component to override the message input's quoted message preview, defaults to and accepts same props as: [QuotedMessagePreview](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageComposer/QuotedMessagePreview.tsx) */\n QuotedMessagePreview?: React.ComponentType<QuotedMessagePreviewProps>;\n /** Custom reaction options to be applied to ReactionSelector, ReactionList and SimpleReactionList components */\n reactionOptions?: ReactionOptions;\n /** Custom UI component to display the reaction selector, defaults to and accepts same props as: [ReactionSelector](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Reactions/ReactionSelector.tsx) */\n ReactionSelector?: React.ForwardRefExoticComponent<ReactionSelectorProps>;\n ReactionSelectorExtendedList?: React.ComponentType<\n ComponentProps<(typeof ReactionSelector)['ExtendedList']>\n >;\n /** Custom UI component to display the list of reactions on a message, defaults to and accepts same props as: [MessageReactions](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Reactions/MessageReactions.tsx) */\n MessageReactions?: React.ComponentType<MessageReactionsProps>;\n /** Custom UI component to display the reactions modal, defaults to and accepts same props as: [MessageReactionsDetail](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Reactions/MessageReactionsDetail.tsx) */\n MessageReactionsDetail?: React.ComponentType<MessageReactionsDetailProps>;\n RecordingPermissionDeniedNotification?: React.ComponentType<RecordingPermissionDeniedNotificationProps>;\n /** Custom UI component to display the message reminder information in the Message UI, defaults to and accepts same props as: [ReminderNotification](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Message/ReminderNotification.tsx) */\n ReminderNotification?: React.ComponentType<ReminderNotificationProps>;\n /** Custom UI component to display the message translation indicator when message has i18n, defaults to and accepts same props as: [MessageTranslationIndicator](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Message/TranslationIndicator.tsx) */\n MessageTranslationIndicator?: React.ComponentType<TranslationIndicatorProps>;\n /** Custom UI component to display the edited indicator and tooltip when a message has been edited, defaults to and accepts same props as: [MessageEditedIndicator](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Message/MessageEditedIndicator.tsx) */\n MessageEditedIndicator?: React.ComponentType<MessageEditedIndicatorProps>;\n /** Custom component to display the search UI, defaults to and accepts same props as: [Search](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Search/Search.tsx) */\n Search?: React.ComponentType;\n /** Custom component to display the UI where the searched string is entered, defaults to and accepts same props as: [SearchBar](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Search/SearchBar/SearchBar.tsx) */\n SearchBar?: React.ComponentType;\n /** Custom component for the search UI dedicated to display the results area, defaults to and accepts same props as: [SearchResults](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Search/SearchResults/SearchResults.tsx) */\n SearchResults?: React.ComponentType;\n /** Custom UI component to display header of search results pane, defaults to and accepts same props as: [SearchResultsHeader](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Search/SearchResults/SearchResultsHeader.tsx) */\n SearchResultsHeader?: React.ComponentType;\n /** Custom component to display search results pane before emitting the first search query for a given source, defaults to and accepts same props as: [SearchResultsPresearch](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Search/SearchResults/SearchSourceResultsPresearch.tsx) */\n SearchResultsPresearch?: React.ComponentType<SearchResultsPresearchProps>;\n /** Custom component to display the search source items results, defaults to and accepts same props as: [SearchSourceResultList](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Search/SearchResults/SearchSourceResultList.tsx) */\n SearchSourceResultList?: React.ComponentType<SearchSourceResultListProps>;\n /** Custom component to indicate the end of the last page for a searched source, defaults to and accepts same props as: [SearchSourceResultListFooter](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Search/SearchResults/SearchSourceResultListFooter.tsx) */\n SearchSourceResultListFooter?: React.ComponentType;\n /** Custom UI component to display search results items for a given search source pane, defaults to and accepts same props as: [SearchSourceResults](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Search/SearchResults/SourceSearchResults.tsx) */\n SearchSourceResults?: React.ComponentType;\n /** Custom component to display the search source results UI with 0 items found, defaults to and accepts same props as: [SearchSourceResultsEmpty](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Search/SearchResults/SearchSourceResultsEmpty.tsx) */\n SearchSourceResultsEmpty?: React.ComponentType;\n /** Custom component to display the header content for a given search source results, no default component is provided. */\n SearchSourceResultsHeader?: React.ComponentType;\n /** Custom component to display the search source results UI during the search query execution, defaults to and accepts same props as: [SearchSourceResultsLoadingIndicator](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Search/SearchResults/SearchSourceResultsLoadingIndicator.tsx) */\n SearchSourceResultsLoadingIndicator?: React.ComponentType;\n /** Custom UI component for send button, defaults to and accepts same props as: [SendButton](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageComposer/icons.tsx) */\n SendButton?: React.ComponentType<SendButtonProps>;\n /** Custom UI component checkbox that indicates message to be sent to main channel, defaults to and accepts same props as: [SendToChannelCheckbox](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageComposer/SendToChannelCheckbox.tsx) */\n SendToChannelCheckbox?: React.ComponentType;\n /** Custom UI component to render the location sharing dialog, defaults to and accepts same props as: [ShareLocationDialog](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Location/ShareLocationDialog.tsx) */\n ShareLocationDialog?: React.ComponentType<ShareLocationDialogProps>;\n /** Custom UI component button for initiating audio recording, defaults to and accepts same props as: [StartRecordingAudioButton](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MediaRecorder/AudioRecorder/AudioRecordingButtons.tsx) */\n StartRecordingAudioButton?: React.ComponentType<StartRecordingAudioButtonProps>;\n StopAIGenerationButton?: React.ComponentType<StopAIGenerationButtonProps> | null;\n StreamedMessageText?: React.ComponentType<StreamedMessageTextProps>;\n /** Custom UI component to handle message text input, defaults to and accepts same props as [TextareaComposer](https://github.com/GetStream/stream-chat-react/blob/master/src/components/TextareaComposer/TextareaComposer.tsx) */\n TextareaComposer?: React.ComponentType<TextareaComposerProps>;\n /** Custom UI component that displays thread's parent or other message at the top of the `MessageList`, defaults to and accepts same props as [MessageUI](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Message/MessageUI.tsx) */\n ThreadHead?: React.ComponentType<MessageProps>;\n /** Custom UI component to display the header of a `Thread`, defaults to and accepts same props as: [DefaultThreadHeader](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Thread/Thread.tsx) */\n ThreadHeader?: React.ComponentType<ThreadHeaderProps>;\n ThreadListEmptyPlaceholder?: React.ComponentType;\n ThreadListItem?: React.ComponentType<ThreadListItemProps>;\n ThreadListItemUI?: React.ComponentType<ThreadListItemUIProps>;\n ThreadListLoadingIndicator?: React.ComponentType;\n ThreadListUnseenThreadsBanner?: React.ComponentType;\n /** Custom UI component to display the start of a threaded `MessageList`, defaults to and accepts same props as: [DefaultThreadStart](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Thread/Thread.tsx) */\n ThreadStart?: React.ComponentType;\n /** Custom UI component to display a date used in timestamps. It's used internally by the default `MessageTimestamp`, and to display a timestamp for edited messages. */\n Timestamp?: React.ComponentType<TimestampProps>;\n /** Custom UI component for the typing indicator, defaults to and accepts same props as: [TypingIndicator](https://github.com/GetStream/stream-chat-react/blob/master/src/components/TypingIndicator/TypingIndicator.tsx) */\n TypingIndicator?: React.ComponentType<TypingIndicatorProps>;\n /** Custom UI component that indicates a user is viewing unread messages. It disappears once the user scrolls to UnreadMessagesSeparator. Defaults to and accepts same props as: [UnreadMessagesNotification](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageList/UnreadMessagesNotification.tsx) */\n UnreadMessagesNotification?: React.ComponentType<UnreadMessagesNotificationProps>;\n /** Custom UI component rendered at the end of sidebar headers (ChannelListHeader, ThreadListHeader). No default — if omitted, the slot is empty. */\n HeaderEndContent?: React.ComponentType;\n /** Custom UI component rendered at the start of content headers (ChannelHeader, ThreadHeader). No default — if omitted, the slot is empty. */\n HeaderStartContent?: React.ComponentType;\n /** Custom UI component that separates read messages from unread, defaults to and accepts same props as: [UnreadMessagesSeparator](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageList/UnreadMessagesSeparator.tsx) */\n UnreadMessagesSeparator?: React.ComponentType<UnreadMessagesSeparatorProps>;\n /** Custom UI component for uploaded vs total byte size during attachment upload (MessageComposer previews), defaults to and accepts same props as: [UploadedSizeIndicator](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Loading/UploadedSizeIndicator.tsx) */\n UploadedSizeIndicator?: React.ComponentType<UploadedSizeIndicatorProps>;\n /** Component used to play video. If not provided, ReactPlayer is used as a default video player. */\n VideoPlayer?: React.ComponentType<VideoPlayerProps>;\n /** Custom UI component to display a message in the `VirtualizedMessageList`, does not have a default implementation */\n VirtualMessage?: React.ComponentType<MessageUIComponentProps>;\n /** Custom UI component to wrap MessageList children. Default is the `ul` tag */\n MessageListWrapper?: React.ComponentType<PropsWithChildren>;\n /** Custom UI component to wrap each element of MessageList. Default is the `li` tag */\n MessageListItem?: React.ComponentType<PropsWithChildren>;\n};\n\nexport const ComponentContext = React.createContext<ComponentContextValue>({});\n\nexport const ComponentProvider = ({\n children,\n value,\n}: PropsWithChildren<{\n value: Partial<ComponentContextValue>;\n}>) => (\n <ComponentContext.Provider value={value as unknown as ComponentContextValue}>\n {children}\n </ComponentContext.Provider>\n);\n\nexport const useComponentContext = (\n /**\n * @deprecated\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _componentName?: string,\n) => useContext(ComponentContext) as unknown as ComponentContextValue;\n","import React, { type ComponentProps } from 'react';\nimport clsx from 'clsx';\n\nexport type BaseIconProps = ComponentProps<'svg'> & {\n decorative?: boolean;\n};\n\nexport const BaseIcon = ({ className, decorative = true, ...props }: BaseIconProps) => {\n const ariaHidden = props['aria-hidden'] ?? (decorative ? true : undefined);\n const focusable = props.focusable ?? (decorative ? false : undefined);\n\n return (\n <svg\n viewBox='0 0 20 20'\n xmlns='http://www.w3.org/2000/svg'\n {...props}\n aria-hidden={ariaHidden}\n className={clsx('str-chat__icon', className)}\n focusable={focusable}\n />\n );\n};\n","import React, { type ReactNode } from 'react';\nimport clsx from 'clsx';\nimport { BaseIcon, type BaseIconProps } from './BaseIcon';\n\nfunction toIconClass(name: string) {\n return (\n 'str-chat__icon--' +\n name\n .replace(/^Icon/, '')\n .replace(/([a-z])([A-Z])/g, '$1-$2')\n .replace(/([A-Za-z])(\\d)/g, '$1-$2')\n .replace(/(\\d)([A-Za-z])/g, '$1-$2')\n .replace(/_/g, '-')\n .toLowerCase()\n );\n}\n\ntype IconProps = BaseIconProps & Record<`data-${string}`, string>;\n\nexport function createIcon(name: string, content: ReactNode, defaultProps?: IconProps) {\n const iconClass = toIconClass(name);\n const Icon = ({ className, ...props }: BaseIconProps) => (\n <BaseIcon {...defaultProps} {...props} className={clsx(iconClass, className)}>\n {content}\n </BaseIcon>\n );\n Icon.displayName = name;\n return Icon;\n}\n","import React from 'react';\n\nimport { createIcon } from './createIcon';\n\n// was: IconArrowBoxLeft\nexport const IconLeave = createIcon(\n 'IconLeave',\n <path\n d='M8.75 3.125H3.75V16.875H8.75M8.75 10H17.5M17.5 10L14.375 6.875M17.5 10L14.375 13.125'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n);\n\nexport const IconArrowDown = createIcon(\n 'IconArrowDown',\n <path\n d='M10 3.125V16.875M10 16.875L4.375 11.25M10 16.875L15.625 11.25'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n);\n\nexport const IconArrowDownCircle = createIcon(\n 'IconArrowDownCircle',\n <path\n d='M7.5 10.625L10 13.125M10 13.125L12.5 10.625M10 13.125V6.875M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10Z'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n);\n\nexport const IconArrowLeft = createIcon(\n 'IconArrowLeft',\n <path\n d='M16.875 10H3.125M3.125 10L8.75 4.375M3.125 10L8.75 15.625'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n { 'data-rtl-mirror': '' },\n);\n\n// was: IconArrowRightUp\nexport const IconArrowUpRight = createIcon(\n 'IconArrowUpRight',\n <path\n d='M5 15L15 5M15 5H6.875M15 5V13.125'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n { 'data-rtl-mirror': '' },\n);\n\n// was: IconArrowRotateClockwise\nexport const IconRetry = createIcon(\n 'IconRetry',\n <path\n d='M14.3751 8.12481H18.1251M18.1251 8.12481V4.37481M18.1251 8.12481L14.8618 5.13809C13.9063 4.18263 12.6904 3.52991 11.3661 3.26151C10.0418 2.9931 8.66771 3.12091 7.41561 3.62896C6.1635 4.137 5.08887 5.00276 4.32599 6.11806C3.5631 7.23336 3.1458 8.54875 3.12621 9.89986C3.10662 11.251 3.48562 12.5779 4.21585 13.7148C4.94609 14.8518 5.99517 15.7483 7.23202 16.2925C8.46887 16.8366 9.83865 17.0042 11.1702 16.7743C12.5018 16.5444 13.736 15.9272 14.7188 14.9998'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n);\n\n// was: IconArrowRotateRightLeftRepeatRefresh\nexport const IconRefresh = createIcon(\n 'IconRefresh',\n <path\n d='M13.125 7.49978H16.875M16.875 7.49978V3.74978M16.875 7.49978L14.6656 5.29041C13.3861 4.01095 11.6538 3.2875 9.84437 3.27697C8.03494 3.26644 6.29431 3.96968 5 5.23416M6.875 12.4998H3.125M3.125 12.4998V16.2498M3.125 12.4998L5.33437 14.7092C6.61388 15.9886 8.34621 16.7121 10.1556 16.7226C11.9651 16.7331 13.7057 16.0299 15 14.7654'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n);\n\n// was: IconArrowShareLeft\nexport const IconReply = createIcon(\n 'IconReply',\n <path\n d='M17.5812 15.525C16.2953 14.1555 12.9195 11.25 8.12265 11.25V15L1.87265 8.75L8.12265 2.5V6.25C12.2476 6.25 17.5359 10.1914 18.1226 15.2766C18.1308 15.3424 18.1177 15.4091 18.0854 15.4671C18.0531 15.525 18.0031 15.5712 17.9428 15.5988C17.8825 15.6265 17.815 15.6343 17.75 15.621C17.685 15.6077 17.6259 15.5741 17.5812 15.525Z'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n { 'data-rtl-mirror': '' },\n);\n\nexport const IconArrowUp = createIcon(\n 'IconArrowUp',\n <path\n d='M10 16.875V3.125M10 3.125L4.375 8.75M10 3.125L15.625 8.75'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n);\n\n// was: IconBellNotification\nexport const IconBell = createIcon(\n 'IconBell',\n <path\n d='M7.50015 15C7.50015 15.663 7.76354 16.2989 8.23238 16.7678C8.70122 17.2366 9.33711 17.5 10.0001 17.5C10.6632 17.5 11.2991 17.2366 11.7679 16.7678C12.2368 16.2989 12.5001 15.663 12.5001 15M4.37515 8.125C4.37515 6.63316 4.96778 5.20242 6.02267 4.14752C7.07756 3.09263 8.5083 2.5 10.0001 2.5C11.492 2.5 12.9227 3.09263 13.9776 4.14752C15.0325 5.20242 15.6251 6.63316 15.6251 8.125C15.6251 10.9234 16.2736 13.1719 16.7892 14.0625C16.844 14.1574 16.8728 14.2649 16.8729 14.3745C16.873 14.484 16.8444 14.5916 16.7898 14.6865C16.7352 14.7815 16.6566 14.8604 16.5619 14.9154C16.4672 14.9705 16.3597 14.9996 16.2501 15H3.75015C3.64076 14.9993 3.53345 14.97 3.43896 14.9149C3.34448 14.8597 3.26611 14.7808 3.2117 14.6859C3.15729 14.591 3.12874 14.4835 3.12891 14.3741C3.12907 14.2647 3.15795 14.1572 3.21265 14.0625C3.72749 13.1719 4.37515 10.9227 4.37515 8.125Z'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n);\n\nexport const IconBellOff = createIcon(\n 'IconBellOff',\n <path\n d='M3.75015 3.12492L10.0001 9.99992C10.0001 9.99992 13.8094 14.1901 16.2501 16.8749M7.50015 14.9999C7.50015 15.663 7.76354 16.2988 8.23238 16.7677C8.70122 17.2365 9.33711 17.4999 10.0001 17.4999C10.6632 17.4999 11.2991 17.2365 11.7679 16.7677C12.2368 16.2988 12.5001 15.663 12.5001 14.9999M7.22515 3.23117C8.0809 2.74583 9.04899 2.49341 10.0328 2.49912C11.0166 2.50482 11.9817 2.76845 12.8317 3.26369C13.6818 3.75893 14.3871 4.46846 14.8773 5.32147C15.3674 6.17447 15.6253 7.14111 15.6251 8.12492C15.6251 10.3984 16.0533 12.3093 16.49 13.4218M14.5455 14.9999H3.75015C3.64076 14.9993 3.53345 14.9699 3.43896 14.9148C3.34448 14.8597 3.26611 14.7807 3.2117 14.6858C3.15729 14.5909 3.12874 14.4834 3.12891 14.374C3.12907 14.2646 3.15795 14.1572 3.21265 14.0624C3.72749 13.1718 4.37515 10.9226 4.37515 8.12492C4.37327 6.97806 4.72371 5.85829 5.37905 4.91711'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n);\n\nexport const IconBookmark = createIcon(\n 'IconBookmark',\n <path\n d='M15 17.5L10 14.375L5 17.5V3.75C5 3.58424 5.06585 3.42527 5.18306 3.30806C5.30027 3.19085 5.45924 3.125 5.625 3.125H14.375C14.5408 3.125 14.6997 3.19085 14.8169 3.30806C14.9342 3.42527 15 3.58424 15 3.75V17.5Z'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n);\n\nexport const IconBookmarkRemove = createIcon(\n 'IconBookmarkRemove',\n <path\n d='M5 6.49074V17.5L10 14.375L15 17.5V16M5.125 3.125H14.375C14.5408 3.125 14.6997 3.19085 14.8169 3.30806C14.9342 3.42527 15 3.58424 15 3.75V13M5.125 3.125L3.5 1.5M5.125 3.125L15 13M15 13L17.5 15.5'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n);\n\n// was: IconBubbles\nexport const IconMessageBubbles = createIcon(\n 'IconMessageBubbles',\n <path\n d='M12.8076 6.25836C13.7525 6.30974 14.6692 6.59868 15.4728 7.09845C16.2764 7.59821 16.941 8.29265 17.4049 9.11746C17.8688 9.94227 18.1172 10.8708 18.1269 11.8171C18.1367 12.7634 17.9075 13.6968 17.4607 14.531L18.0982 16.6998C18.1298 16.8075 18.1319 16.9217 18.1041 17.0304C18.0764 17.1392 18.0198 17.2385 17.9405 17.3178C17.8611 17.3972 17.7618 17.4537 17.6531 17.4815C17.5443 17.5092 17.4301 17.5072 17.3224 17.4756L15.156 16.8357C14.4404 17.2184 13.6504 17.4419 12.8404 17.4907C12.0303 17.5396 11.2192 17.4127 10.4628 17.1188C9.70632 16.8249 9.02237 16.3708 8.45781 15.7878C7.89325 15.2049 7.46143 14.5067 7.19195 13.7412M2.53882 10.781C1.90215 9.59158 1.71418 8.21294 2.00918 6.89647C2.30419 5.58 3.06253 4.41341 4.14591 3.60942C5.22929 2.80543 6.56555 2.4176 7.91103 2.51665C9.2565 2.6157 10.5216 3.19503 11.4755 4.149C12.4295 5.10297 13.0088 6.36803 13.1079 7.7135C13.2069 9.05898 12.8191 10.3952 12.0151 11.4786C11.2111 12.562 10.0445 13.3203 8.72806 13.6153C7.41159 13.9104 6.03295 13.7224 4.84351 13.0857L2.67476 13.7232C2.56707 13.7548 2.45285 13.7569 2.3441 13.7291C2.23535 13.7014 2.13608 13.6448 2.05671 13.5655C1.97735 13.4861 1.92082 13.3868 1.89307 13.2781C1.86531 13.1693 1.86735 13.0551 1.89898 12.9474L2.53882 10.781Z'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n);\n\n// was: IconBubble2ChatMessage\nexport const IconMessageBubble = createIcon(\n 'IconMessageBubble',\n <path\n d='M6.24431 16.4932C7.81972 17.405 9.67297 17.7127 11.4585 17.359C13.2441 17.0053 14.84 16.0143 15.9489 14.5708C17.0578 13.1273 17.6038 11.3298 17.4852 9.51341C17.3667 7.69704 16.5916 5.98577 15.3045 4.69866C14.0174 3.41156 12.3061 2.63646 10.4897 2.51789C8.67333 2.39932 6.87582 2.94537 5.43231 4.05422C3.9888 5.16308 2.99781 6.75906 2.64412 8.54461C2.29042 10.3302 2.59815 12.1834 3.50993 13.7588L2.53259 16.6768C2.49586 16.7869 2.49053 16.9051 2.5172 17.0181C2.54386 17.131 2.60146 17.2344 2.68355 17.3165C2.76563 17.3985 2.86895 17.4561 2.98194 17.4828C3.09492 17.5095 3.21309 17.5041 3.32321 17.4674L6.24431 16.4932Z'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n);\n\n// was: IconBubble2Solid\nexport const IconMessageBubbleFill = createIcon(\n 'IconMessageBubbleFill',\n <path d='M18.125 10.0001C18.1253 11.4028 17.7624 12.7818 17.0717 14.0027C16.381 15.2236 15.3859 16.2449 14.1834 16.9671C12.9808 17.6894 11.6118 18.088 10.2095 18.1242C8.80719 18.1603 7.41942 17.8328 6.18125 17.1735L3.52109 18.0602C3.30085 18.1337 3.0645 18.1444 2.83854 18.091C2.61257 18.0377 2.40593 17.9225 2.24176 17.7583C2.07759 17.5942 1.96239 17.3875 1.90906 17.1615C1.85573 16.9356 1.86639 16.6992 1.93984 16.479L2.82656 13.8188C2.24699 12.7292 1.92328 11.5218 1.88 10.2883C1.83672 9.0549 2.075 7.8278 2.57677 6.70019C3.07854 5.57258 3.8306 4.57411 4.77587 3.78055C5.72114 2.98699 6.83478 2.41921 8.03224 2.1203C9.22971 1.82139 10.4795 1.79922 11.6868 2.05545C12.8942 2.31169 14.0272 2.8396 15.0001 3.59912C15.9729 4.35865 16.7599 5.32981 17.3014 6.43891C17.8428 7.548 18.1245 8.76588 18.125 10.0001Z' />,\n);\n\n// was: IconBubbleText6ChatMessage\nexport const IconThread = createIcon(\n 'IconThread',\n <path\n d='M7.5 8.75H12.8125M7.5 11.25H12.8125M10.3125 16.875H3.75C3.58424 16.875 3.42527 16.8092 3.30806 16.6919C3.19085 16.5747 3.125 16.4158 3.125 16.25V9.6875C3.125 7.78126 3.88225 5.95309 5.23017 4.60517C6.57809 3.25725 8.40626 2.5 10.3125 2.5C11.2564 2.5 12.191 2.68591 13.063 3.04712C13.9351 3.40832 14.7274 3.93775 15.3948 4.60517C16.0623 5.27259 16.5917 6.06493 16.9529 6.93696C17.3141 7.80899 17.5 8.74362 17.5 9.6875C17.5 10.6314 17.3141 11.566 16.9529 12.438C16.5917 13.3101 16.0623 14.1024 15.3948 14.7698C14.7274 15.4373 13.9351 15.9667 13.063 16.3279C12.191 16.6891 11.2564 16.875 10.3125 16.875Z'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n);\n\n// was: IconBubbleText6Solid\nexport const IconThreadFill = createIcon(\n 'IconThreadFill',\n <path d='M10.3125 1.875C8.24119 1.87727 6.25538 2.70111 4.79074 4.16574C3.32611 5.63038 2.50227 7.61619 2.5 9.6875V16.25C2.5 16.5815 2.6317 16.8995 2.86612 17.1339C3.10054 17.3683 3.41848 17.5 3.75 17.5H10.3125C12.3845 17.5 14.3716 16.6769 15.8368 15.2118C17.3019 13.7466 18.125 11.7595 18.125 9.6875C18.125 7.6155 17.3019 5.62836 15.8368 4.16323C14.3716 2.6981 12.3845 1.875 10.3125 1.875ZM12.8125 11.875H7.5C7.33424 11.875 7.17527 11.8092 7.05806 11.6919C6.94085 11.5747 6.875 11.4158 6.875 11.25C6.875 11.0842 6.94085 10.9253 7.05806 10.8081C7.17527 10.6908 7.33424 10.625 7.5 10.625H12.8125C12.9783 10.625 13.1372 10.6908 13.2544 10.8081C13.3717 10.9253 13.4375 11.0842 13.4375 11.25C13.4375 11.4158 13.3717 11.5747 13.2544 11.6919C13.1372 11.8092 12.9783 11.875 12.8125 11.875ZM12.8125 9.375H7.5C7.33424 9.375 7.17527 9.30915 7.05806 9.19194C6.94085 9.07473 6.875 8.91576 6.875 8.75C6.875 8.58424 6.94085 8.42527 7.05806 8.30806C7.17527 8.19085 7.33424 8.125 7.5 8.125H12.8125C12.9783 8.125 13.1372 8.19085 13.2544 8.30806C13.3717 8.42527 13.4375 8.58424 13.4375 8.75C13.4375 8.91576 13.3717 9.07473 13.2544 9.19194C13.1372 9.30915 12.9783 9.375 12.8125 9.375Z' />,\n);\n\n// was: IconBubbleWideNotificationChatMessage\nexport const IconNotification = createIcon(\n 'IconNotification',\n <path\n d='M16.25 10V16.25C16.25 16.4158 16.1842 16.5747 16.0669 16.6919C15.9497 16.8092 15.7908 16.875 15.625 16.875H3.75C3.58424 16.875 3.42527 16.8092 3.30806 16.6919C3.19085 16.5747 3.125 16.4158 3.125 16.25V4.375C3.125 4.20924 3.19085 4.05027 3.30806 3.93306C3.42527 3.81585 3.58424 3.75 3.75 3.75H10M17.5 4.6875C17.5 5.89562 16.5206 6.875 15.3125 6.875C14.1044 6.875 13.125 5.89562 13.125 4.6875C13.125 3.47938 14.1044 2.5 15.3125 2.5C16.5206 2.5 17.5 3.47938 17.5 4.6875Z'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n);\n\n// was: IconCamera1\nexport const IconCamera = createIcon(\n 'IconCamera',\n <>\n <path\n d='M16.25 16.25H3.75C3.41848 16.25 3.10054 16.1183 2.86612 15.8839C2.6317 15.6495 2.5 15.3315 2.5 15V6.25C2.5 5.91848 2.6317 5.60054 2.86612 5.36612C3.10054 5.1317 3.41848 5 3.75 5H6.25L7.5 3.125H12.5L13.75 5H16.25C16.5815 5 16.8995 5.1317 17.1339 5.36612C17.3683 5.60054 17.5 5.91848 17.5 6.25V15C17.5 15.3315 17.3683 15.6495 17.1339 15.8839C16.8995 16.1183 16.5815 16.25 16.25 16.25Z'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />\n <path\n d='M10 13.125C11.5533 13.125 12.8125 11.8658 12.8125 10.3125C12.8125 8.7592 11.5533 7.5 10 7.5C8.4467 7.5 7.1875 8.7592 7.1875 10.3125C7.1875 11.8658 8.4467 13.125 10 13.125Z'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />\n </>,\n);\n\n// was: IconChainLink\nexport const IconLink = createIcon(\n 'IconLink',\n <path\n d='M7.49989 12.4999L12.4999 7.49989M8.74989 5.94598L11.0983 3.60223C11.8035 2.90843 12.7543 2.52139 13.7436 2.52542C14.7328 2.52945 15.6804 2.92422 16.3799 3.62374C17.0795 4.32326 17.4742 5.27086 17.4783 6.26012C17.4823 7.24938 17.0953 8.20016 16.4015 8.90536L14.053 11.2499M5.94598 8.74989L3.60223 11.0983C2.90843 11.8035 2.52139 12.7543 2.52542 13.7436C2.52945 14.7328 2.92422 15.6804 3.62374 16.3799C4.32326 17.0795 5.27086 17.4742 6.26012 17.4783C7.24938 17.4823 8.20016 17.0953 8.90536 16.4015L11.2499 14.053'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n);\n\n// was: IconChart5\nexport const IconPoll = createIcon(\n 'IconPoll',\n <path\n d='M3.75 16.25V10.625H7.5M17.5 16.25H2.5M7.5 16.25V6.875H11.875M11.875 16.25V3.125H16.25V16.25'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n);\n\nexport const IconCheckmark1Small = createIcon(\n 'IconCheckmark1Small',\n <path\n d='M3.125 11.25L7.5 15.625L17.5 5.625'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n);\n\n// was: IconCheckmark2\nexport const IconCheckmark = createIcon(\n 'IconCheckmark',\n <path\n d='M3.125 11.25L7.5 15.625L17.5 5.625'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n);\n\nexport const IconChevronDown = createIcon(\n 'IconChevronDown',\n <path\n d='M16.25 7.5L10 13.75L3.75 7.5'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n);\n\nexport const IconChevronLeft = createIcon(\n 'IconChevronLeft',\n <path\n d='M12.5 16.25L6.25 10L12.5 3.75'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n { 'data-rtl-mirror': '' },\n);\n\nexport const IconChevronRight = createIcon(\n 'IconChevronRight',\n <path\n d='M7.5 3.75L13.75 10L7.5 16.25'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n { 'data-rtl-mirror': '' },\n);\n\n// was: IconCircleBanSign\nexport const IconNoSign = createIcon(\n 'IconNoSign',\n <path\n d='M15.3031 15.3031L4.69688 4.69688M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10Z'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeMiterlimit='10'\n strokeWidth='1.5'\n />,\n);\n\nexport const IconMinusCircle = createIcon(\n 'IconMinusCircle',\n <path\n d='M6.875 10H13.125M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10Z'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeMiterlimit='10'\n strokeWidth='1.5'\n />,\n);\n\nexport const IconMinus = createIcon(\n 'IconMinus',\n <path\n d='M16.875 9.40039C17.2064 9.40039 17.4746 9.66863 17.4746 10C17.4746 10.3314 17.2064 10.5996 16.875 10.5996H3.125C2.79363 10.5996 2.52539 10.3314 2.52539 10C2.52539 9.66863 2.79363 9.40039 3.125 9.40039H16.875Z'\n fill='currentColor'\n />,\n);\n\n// was: IconCircleX\nexport const IconXCircle = createIcon(\n 'IconXCircle',\n <path\n d='M12.5 7.5L7.5 12.5M7.5 7.5L12.5 12.5M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10Z'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n);\n\nexport const IconClock = createIcon(\n 'IconClock',\n <path\n d='M10 5.625V10H14.375M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10Z'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n);\n\n// was: IconCloseQuote2\nexport const IconQuote = createIcon(\n 'IconQuote',\n <path\n d='M8.4375 11.25H3.125C2.95924 11.25 2.80027 11.1842 2.68306 11.0669C2.56585 10.9497 2.5 10.7908 2.5 10.625V5.625C2.5 5.45924 2.56585 5.30027 2.68306 5.18306C2.80027 5.06585 2.95924 5 3.125 5H7.8125C7.97826 5 8.13723 5.06585 8.25444 5.18306C8.37165 5.30027 8.4375 5.45924 8.4375 5.625V12.5C8.4375 13.3288 8.10826 14.1237 7.52221 14.7097C6.93616 15.2958 6.1413 15.625 5.3125 15.625M17.5 11.25H12.1875C12.0217 11.25 11.8628 11.1842 11.7456 11.0669C11.6283 10.9497 11.5625 10.7908 11.5625 10.625V5.625C11.5625 5.45924 11.6283 5.30027 11.7456 5.18306C11.8628 5.06585 12.0217 5 12.1875 5H16.875C17.0408 5 17.1997 5.06585 17.3169 5.18306C17.4342 5.30027 17.5 5.45924 17.5 5.625V12.5C17.5 13.3288 17.1708 14.1237 16.5847 14.7097C15.9987 15.2958 15.2038 15.625 14.375 15.625'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n);\n\n// was: IconCrossMedium\nexport const IconXmark = createIcon(\n 'IconXmark',\n <path\n d='M15.625 4.375L4.375 15.625M15.625 15.625L4.375 4.375'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n />,\n);\n\n// was: IconCrossSmall\nexport const IconXmarkSmall = createIcon(\n 'IconXmarkSmall',\n <path\n d='M13.5 6.5L6.5 13.5M13.5 13.5L6.5 6.5'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n);\n\n// was: IconDotGrid1x3Horizontal\nexport const IconMore = createIcon(\n 'IconMore',\n <>\n <path d='M10 11.25C10.6904 11.25 11.25 10.6904 11.25 10C11.25 9.30964 10.6904 8.75 10 8.75C9.30964 8.75 8.75 9.30964 8.75 10C8.75 10.6904 9.30964 11.25 10 11.25Z' />\n <path d='M4.6875 11.25C5.37786 11.25 5.9375 10.6904 5.9375 10C5.9375 9.30964 5.37786 8.75 4.6875 8.75C3.99714 8.75 3.4375 9.30964 3.4375 10C3.4375 10.6904 3.99714 11.25 4.6875 11.25Z' />\n <path d='M15.3125 11.25C16.0029 11.25 16.5625 10.6904 16.5625 10C16.5625 9.30964 16.0029 8.75 15.3125 8.75C14.6221 8.75 14.0625 9.30964 14.0625 10C14.0625 10.6904 14.6221 11.25 15.3125 11.25Z' />\n </>,\n);\n\nexport const IconMenu = createIcon(\n 'IconMenu',\n <path\n d='M3.125 5H16.875M3.125 10H16.875M3.125 15H16.875'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n);\n\n// was: IconDotGrid2x3\nexport const IconReorder = createIcon(\n 'IconReorder',\n <path d='M8.875 15.3125C8.875 16.2445 8.11948 17 7.1875 17C6.25552 17 5.5 16.2445 5.5 15.3125C5.5 14.3805 6.25552 13.625 7.1875 13.625C8.11948 13.625 8.875 14.3805 8.875 15.3125ZM14.5 15.3125C14.5 16.2445 13.7445 17 12.8125 17C11.8805 17 11.125 16.2445 11.125 15.3125C11.125 14.3805 11.8805 13.625 12.8125 13.625C13.7445 13.625 14.5 14.3805 14.5 15.3125ZM8.875 10C8.875 10.932 8.11948 11.6875 7.1875 11.6875C6.25552 11.6875 5.5 10.932 5.5 10C5.5 9.06802 6.25552 8.3125 7.1875 8.3125C8.11948 8.3125 8.875 9.06802 8.875 10ZM14.5 10C14.5 10.932 13.7445 11.6875 12.8125 11.6875C11.8805 11.6875 11.125 10.932 11.125 10C11.125 9.06802 11.8805 8.3125 12.8125 8.3125C13.7445 8.3125 14.5 9.06802 14.5 10ZM8.875 4.6875C8.875 5.61948 8.11948 6.375 7.1875 6.375C6.25552 6.375 5.5 5.61948 5.5 4.6875C5.5 3.75552 6.25552 3 7.1875 3C8.11948 3 8.875 3.75552 8.875 4.6875ZM14.5 4.6875C14.5 5.61948 13.7445 6.375 12.8125 6.375C11.8805 6.375 11.125 5.61948 11.125 4.6875C11.125 3.75552 11.8805 3 12.8125 3C13.7445 3 14.5 3.75552 14.5 4.6875Z' />,\n);\n\n// was: IconDoubleCheckmark1Small\nexport const IconChecks = createIcon(\n 'IconChecks',\n <path\n d='M1.5 10.5724L4.98387 13.9936L13.1129 6.00977M10.371 13.9936L18.5 6.00977'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n);\n\nexport const IconDownload = createIcon(\n 'IconDownload',\n <path\n d='M2.375 11.25C2.375 10.8358 2.71079 10.5 3.125 10.5C3.53921 10.5 3.875 10.8358 3.875 11.25V15.5H16.125V11.25C16.125 10.8358 16.4608 10.5 16.875 10.5C17.2892 10.5 17.625 10.8358 17.625 11.25V16.25C17.625 16.6642 17.2892 17 16.875 17H3.125C2.71079 17 2.375 16.6642 2.375 16.25V11.25ZM9.25 2.5C9.25 2.08579 9.58579 1.75 10 1.75C10.4142 1.75 10.75 2.08579 10.75 2.5V9.43945L12.5947 7.59473C12.8876 7.30183 13.3624 7.30183 13.6553 7.59473C13.9482 7.88762 13.9482 8.36238 13.6553 8.65527L10.5303 11.7803C10.2374 12.0732 9.76262 12.0732 9.46973 11.7803L6.34473 8.65527C6.05183 8.36238 6.05183 7.88762 6.34473 7.59473C6.63762 7.30183 7.11238 7.30183 7.40527 7.59473L9.25 9.43945V2.5Z'\n fill='currentColor'\n />,\n);\n\n// was: IconEditBig\nexport const IconEdit = createIcon(\n 'IconEdit',\n <path\n d='M10.625 5.0001L15 9.3751M7.24141 16.8751H3.75C3.58424 16.8751 3.42527 16.8093 3.30806 16.692C3.19085 16.5748 3.125 16.4159 3.125 16.2501V12.7587C3.12508 12.5932 3.19082 12.4344 3.30781 12.3173L12.9422 2.68291C13.0594 2.56579 13.2183 2.5 13.384 2.5C13.5497 2.5 13.7086 2.56579 13.8258 2.68291L17.3172 6.17198C17.4343 6.28917 17.5001 6.44808 17.5001 6.61377C17.5001 6.77946 17.4343 6.93837 17.3172 7.05557L7.68281 16.6923C7.56569 16.8093 7.40695 16.875 7.24141 16.8751Z'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n);\n\n// was: IconEmojiSmile\nexport const IconEmoji = createIcon(\n 'IconEmoji',\n <>\n <path d='M16.75 10C16.75 6.27208 13.7279 3.25 10 3.25C6.27208 3.25 3.25 6.27208 3.25 10C3.25 13.7279 6.27208 16.75 10 16.75C13.7279 16.75 16.75 13.7279 16.75 10ZM18.25 10C18.25 14.5563 14.5563 18.25 10 18.25C5.44365 18.25 1.75 14.5563 1.75 10C1.75 5.44365 5.44365 1.75 10 1.75C14.5563 1.75 18.25 5.44365 18.25 10Z' />\n <path d='M7.1875 9.375C7.70527 9.375 8.125 8.95527 8.125 8.4375C8.125 7.91973 7.70527 7.5 7.1875 7.5C6.66973 7.5 6.25 7.91973 6.25 8.4375C6.25 8.95527 6.66973 9.375 7.1875 9.375Z' />\n <path d='M12.8125 9.375C13.3303 9.375 13.75 8.95527 13.75 8.4375C13.75 7.91973 13.3303 7.5 12.8125 7.5C12.2947 7.5 11.875 7.91973 11.875 8.4375C11.875 8.95527 12.2947 9.375 12.8125 9.375Z' />\n <path d='M12.4756 11.499C12.683 11.1407 13.1425 11.0182 13.501 11.2256C13.8593 11.433 13.9818 11.8925 13.7744 12.251C13.0125 13.568 11.6947 14.5 10 14.5C8.30531 14.5 6.98748 13.568 6.22559 12.251C6.01825 11.8925 6.14067 11.433 6.49902 11.2256C6.85749 11.0182 7.31695 11.1407 7.52441 11.499C8.05942 12.424 8.91824 13 10 13C11.0818 13 11.9406 12.424 12.4756 11.499Z' />\n </>,\n);\n\nexport const IconEmojiAdd = createIcon(\n 'IconEmojiAdd',\n <>\n <path\n d='M1.75 10C1.75 5.44365 5.44365 1.75 10 1.75C10.4142 1.75 10.75 2.08579 10.75 2.5C10.75 2.91421 10.4142 3.25 10 3.25C6.27208 3.25 3.25 6.27208 3.25 10C3.25 13.7279 6.27208 16.75 10 16.75C13.7279 16.75 16.75 13.7279 16.75 10C16.75 9.58579 17.0858 9.25 17.5 9.25C17.9142 9.25 18.25 9.58579 18.25 10C18.25 14.5563 14.5563 18.25 10 18.25C5.44365 18.25 1.75 14.5563 1.75 10Z'\n fill='currentColor'\n />\n <path\n d='M7.1875 9.375C7.70527 9.375 8.125 8.95527 8.125 8.4375C8.125 7.91973 7.70527 7.5 7.1875 7.5C6.66973 7.5 6.25 7.91973 6.25 8.4375C6.25 8.95527 6.66973 9.375 7.1875 9.375Z'\n fill='currentColor'\n />\n <path\n d='M12.8125 9.375C13.3303 9.375 13.75 8.95527 13.75 8.4375C13.75 7.91973 13.3303 7.5 12.8125 7.5C12.2947 7.5 11.875 7.91973 11.875 8.4375C11.875 8.95527 12.2947 9.375 12.8125 9.375Z'\n fill='currentColor'\n />\n <path\n d='M12.4756 11.499C12.683 11.1407 13.1425 11.0182 13.501 11.2256C13.8593 11.433 13.9818 11.8925 13.7744 12.251C13.0125 13.568 11.6947 14.5 10 14.5C8.30531 14.5 6.98748 13.568 6.22559 12.251C6.01825 11.8925 6.14067 11.433 6.49902 11.2256C6.85749 11.0182 7.31695 11.1407 7.52441 11.499C8.05942 12.424 8.91824 13 10 13C11.0818 13 11.9406 12.424 12.4756 11.499Z'\n fill='currentColor'\n />\n <path\n d='M15.083 6.87524V4.91626H13.125C12.7108 4.91626 12.375 4.58047 12.375 4.16626C12.3752 3.7522 12.7109 3.41626 13.125 3.41626H15.083V1.45825C15.083 1.04415 15.4189 0.708427 15.833 0.708252C16.2472 0.708252 16.583 1.04404 16.583 1.45825V3.41626H18.542C18.9559 3.41644 19.2918 3.7523 19.292 4.16626C19.292 4.58036 18.9561 4.91608 18.542 4.91626H16.583V6.87524C16.5828 7.28931 16.2471 7.62524 15.833 7.62524C15.4191 7.62507 15.0832 7.2892 15.083 6.87524Z'\n fill='currentColor'\n />\n </>,\n);\n\n// was: IconExclamation\nexport const IconExclamationMarkFill = createIcon(\n 'IconExclamationMarkFill',\n <>\n <path d='M10 16.875C10.6904 16.875 11.25 16.3154 11.25 15.625C11.25 14.9346 10.6904 14.375 10 14.375C9.30964 14.375 8.75 14.9346 8.75 15.625C8.75 16.3154 9.30964 16.875 10 16.875Z' />\n <path d='M9 11.875V3.75C9 3.19772 9.44772 2.75 10 2.75C10.5523 2.75 11 3.19772 11 3.75V11.875C11 12.4273 10.5523 12.875 10 12.875C9.44772 12.875 9 12.4273 9 11.875Z' />\n </>,\n);\n\n// was: IconExclamationCircle1\nexport const IconExclamationCircleFill = createIcon(\n 'IconExclamationCircleFill',\n <path d='M10 1.875C8.39303 1.875 6.82214 2.35152 5.486 3.24431C4.14985 4.1371 3.10844 5.40605 2.49348 6.8907C1.87852 8.37535 1.71762 10.009 2.03112 11.5851C2.34463 13.1612 3.11846 14.6089 4.25476 15.7452C5.39106 16.8815 6.8388 17.6554 8.41489 17.9689C9.99099 18.2824 11.6247 18.1215 13.1093 17.5065C14.594 16.8916 15.8629 15.8502 16.7557 14.514C17.6485 13.1779 18.125 11.607 18.125 10C18.1227 7.84581 17.266 5.78051 15.7427 4.25727C14.2195 2.73403 12.1542 1.87727 10 1.875ZM9.375 6.25C9.375 6.08424 9.44085 5.92527 9.55806 5.80806C9.67527 5.69085 9.83424 5.625 10 5.625C10.1658 5.625 10.3247 5.69085 10.4419 5.80806C10.5592 5.92527 10.625 6.08424 10.625 6.25V10.625C10.625 10.7908 10.5592 10.9497 10.4419 11.0669C10.3247 11.1842 10.1658 11.25 10 11.25C9.83424 11.25 9.67527 11.1842 9.55806 11.0669C9.44085 10.9497 9.375 10.7908 9.375 10.625V6.25ZM10 14.375C9.81458 14.375 9.63333 14.32 9.47916 14.217C9.32499 14.114 9.20482 13.9676 9.13387 13.7963C9.06291 13.625 9.04434 13.4365 9.08052 13.2546C9.11669 13.0727 9.20598 12.9057 9.33709 12.7746C9.4682 12.6435 9.63525 12.5542 9.81711 12.518C9.99896 12.4818 10.1875 12.5004 10.3588 12.5714C10.5301 12.6423 10.6765 12.7625 10.7795 12.9167C10.8825 13.0708 10.9375 13.2521 10.9375 13.4375C10.9375 13.6861 10.8387 13.9246 10.6629 14.1004C10.4871 14.2762 10.2486 14.375 10 14.375Z' />,\n);\n\n// was: IconExclamationCircle\nexport const IconExclamationMark = createIcon(\n 'IconExclamationMark',\n <>\n <path d='M16.75 10C16.75 6.27208 13.7279 3.25 10 3.25C6.27208 3.25 3.25 6.27208 3.25 10C3.25 13.7279 6.27208 16.75 10 16.75C13.7279 16.75 16.75 13.7279 16.75 10ZM18.25 10C18.25 14.5563 14.5563 18.25 10 18.25C5.44365 18.25 1.75 14.5563 1.75 10C1.75 5.44365 5.44365 1.75 10 1.75C14.5563 1.75 18.25 5.44365 18.25 10Z' />\n <path d='M9.25 10.625V6.25C9.25 5.83579 9.58579 5.5 10 5.5C10.4142 5.5 10.75 5.83579 10.75 6.25V10.625C10.75 11.0392 10.4142 11.375 10 11.375C9.58579 11.375 9.25 11.0392 9.25 10.625Z' />\n <path d='M10 14.375C10.5178 14.375 10.9375 13.9553 10.9375 13.4375C10.9375 12.9197 10.5178 12.5 10 12.5C9.48223 12.5 9.0625 12.9197 9.0625 13.4375C9.0625 13.9553 9.48223 14.375 10 14.375Z' />\n </>,\n);\n\n// was: IconExclamationTriangle\nexport const IconExclamationTriangleFill = createIcon(\n 'IconExclamationTriangleFill',\n <path d='M18.4999 14.6946L11.6678 2.82974C11.4971 2.53906 11.2534 2.29803 10.9608 2.13057C10.6682 1.9631 10.337 1.875 9.99986 1.875C9.66275 1.875 9.33149 1.9631 9.03892 2.13057C8.74635 2.29803 8.50262 2.53906 8.33189 2.82974L1.49986 14.6946C1.33559 14.9757 1.24902 15.2955 1.24902 15.6211C1.24902 15.9468 1.33559 16.2665 1.49986 16.5477C1.6684 16.8401 1.91171 17.0825 2.20483 17.2498C2.49795 17.4172 2.83032 17.5036 3.16783 17.5001H16.8319C17.1691 17.5033 17.5012 17.4168 17.794 17.2494C18.0868 17.0821 18.3299 16.8399 18.4983 16.5477C18.6628 16.2667 18.7496 15.947 18.7499 15.6214C18.7502 15.2957 18.6639 14.9759 18.4999 14.6946ZM9.37486 8.12505C9.37486 7.95929 9.44071 7.80032 9.55792 7.68311C9.67513 7.5659 9.8341 7.50005 9.99986 7.50005C10.1656 7.50005 10.3246 7.5659 10.4418 7.68311C10.559 7.80032 10.6249 7.95929 10.6249 8.12505V11.2501C10.6249 11.4158 10.559 11.5748 10.4418 11.692C10.3246 11.8092 10.1656 11.8751 9.99986 11.8751C9.8341 11.8751 9.67513 11.8092 9.55792 11.692C9.44071 11.5748 9.37486 11.4158 9.37486 11.2501V8.12505ZM9.99986 15.0001C9.81444 15.0001 9.63319 14.9451 9.47901 14.8421C9.32484 14.739 9.20468 14.5926 9.13372 14.4213C9.06277 14.25 9.0442 14.0615 9.08038 13.8797C9.11655 13.6978 9.20584 13.5308 9.33695 13.3996C9.46806 13.2685 9.63511 13.1792 9.81696 13.1431C9.99882 13.1069 10.1873 13.1255 10.3586 13.1964C10.5299 13.2674 10.6764 13.3875 10.7794 13.5417C10.8824 13.6959 10.9374 13.8771 10.9374 14.0626C10.9374 14.3112 10.8386 14.5496 10.6628 14.7255C10.487 14.9013 10.2485 15.0001 9.99986 15.0001Z' />,\n);\n\n// was: IconEyeOpen\nexport const IconEyeFill = createIcon(\n 'IconEyeFill',\n <path d='M19.3211 9.74688C19.2937 9.68516 18.632 8.21719 17.1609 6.74609C15.2008 4.78594 12.725 3.75 9.99999 3.75C7.27499 3.75 4.79921 4.78594 2.83905 6.74609C1.36796 8.21719 0.703118 9.6875 0.678899 9.74688C0.643362 9.82681 0.625 9.91331 0.625 10.0008C0.625 10.0883 0.643362 10.1748 0.678899 10.2547C0.706243 10.3164 1.36796 11.7836 2.83905 13.2547C4.79921 15.2141 7.27499 16.25 9.99999 16.25C12.725 16.25 15.2008 15.2141 17.1609 13.2547C18.632 11.7836 19.2937 10.3164 19.3211 10.2547C19.3566 10.1748 19.375 10.0883 19.375 10.0008C19.375 9.91331 19.3566 9.82681 19.3211 9.74688ZM9.99999 13.125C9.38193 13.125 8.77774 12.9417 8.26384 12.5983C7.74993 12.255 7.34939 11.7669 7.11287 11.1959C6.87634 10.6249 6.81446 9.99653 6.93504 9.39034C7.05562 8.78415 7.35324 8.22733 7.79028 7.79029C8.22732 7.35325 8.78414 7.05562 9.39033 6.93505C9.99652 6.81447 10.6249 6.87635 11.1959 7.11288C11.7669 7.3494 12.255 7.74994 12.5983 8.26384C12.9417 8.77775 13.125 9.38193 13.125 10C13.125 10.8288 12.7958 11.6237 12.2097 12.2097C11.6236 12.7958 10.8288 13.125 9.99999 13.125Z' />,\n);\n\nexport const IconUnsupportedAttachment = createIcon(\n 'IconUnsupportedAttachment',\n <path\n d='M4.5 16.75H15.5V7.625H11.875C11.4608 7.625 11.125 7.28921 11.125 6.875V3.25H4.5V16.75ZM11.3447 9.46973C11.6376 9.17683 12.1124 9.17683 12.4053 9.46973C12.6982 9.76262 12.6982 10.2374 12.4053 10.5303L11.0605 11.875L12.4053 13.2197C12.6982 13.5126 12.6982 13.9874 12.4053 14.2803C12.1124 14.5732 11.6376 14.5732 11.3447 14.2803L10 12.9355L8.65527 14.2803C8.36238 14.5732 7.88762 14.5732 7.59473 14.2803C7.30183 13.9874 7.30183 13.5126 7.59473 13.2197L8.93945 11.875L7.59473 10.5303C7.30183 10.2374 7.30183 9.76262 7.59473 9.46973C7.88762 9.17683 8.36238 9.17683 8.65527 9.46973L10 10.8145L11.3447 9.46973ZM12.625 6.125H14.4395L12.625 4.31055V6.125ZM17 16.875C17 17.2397 16.8555 17.5898 16.5977 17.8477C16.3398 18.1055 15.9897 18.25 15.625 18.25H4.375C4.01033 18.25 3.66021 18.1055 3.40234 17.8477C3.14448 17.5898 3 17.2397 3 16.875V3.125C3 2.76033 3.14448 2.41021 3.40234 2.15234L3.50391 2.06152C3.74856 1.86111 4.05597 1.75 4.375 1.75H11.875C12.0739 1.75 12.2646 1.82907 12.4053 1.96973L16.7803 6.34473C16.9209 6.48538 17 6.67609 17 6.875V16.875Z'\n fill='currentColor'\n />,\n);\n\n// was: IconFileArrowLeftIn\nexport const IconUpload = createIcon(\n 'IconUpload',\n <path\n d='M11.875 2.5H4.375C4.20924 2.5 4.05027 2.56585 3.93306 2.68306C3.81585 2.80027 3.75 2.95924 3.75 3.125V16.875C3.75 17.0408 3.81585 17.1997 3.93306 17.3169C4.05027 17.4342 4.20924 17.5 4.375 17.5H15.625C15.7908 17.5 15.9497 17.4342 16.0669 17.3169C16.1842 17.1997 16.25 17.0408 16.25 16.875V6.875M11.875 2.5L16.25 6.875M11.875 2.5V6.875H16.25M8.125 11.25L10 9.375M10 9.375L11.875 11.25M10 9.375V14.375'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n);\n\n// was: IconFileBend\nexport const IconFile = createIcon(\n 'IconFile',\n <path\n d='M11.875 2.5H4.375C4.20924 2.5 4.05027 2.56585 3.93306 2.68306C3.81585 2.80027 3.75 2.95924 3.75 3.125V16.875C3.75 17.0408 3.81585 17.1997 3.93306 17.3169C4.05027 17.4342 4.20924 17.5 4.375 17.5H15.625C15.7908 17.5 15.9497 17.4342 16.0669 17.3169C16.1842 17.1997 16.25 17.0408 16.25 16.875V6.875M11.875 2.5L16.25 6.875M11.875 2.5V6.875H16.25'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n);\n\n// was: IconFlag2\nexport const IconFlag = createIcon(\n 'IconFlag',\n <path\n d='M3.75 17.5001V4.3751C8.75 0.0446299 12.5 8.70557 17.5 4.3751V13.7501C12.5 18.0806 8.75 9.41963 3.75 13.7501'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n);\n\nexport const IconFolder = createIcon(\n 'IconFolder',\n <path\n d='M3.25 15.5H16.75V7H10C9.83774 7 9.67962 6.94696 9.5498 6.84961L7.25098 5.125H3.25V15.5ZM18.25 15.6943C18.25 16.0406 18.112 16.3724 17.8672 16.6172C17.6224 16.862 17.2906 17 16.9443 17H3.125C2.76033 17 2.41021 16.8555 2.15234 16.5977C1.89448 16.3398 1.75 15.9897 1.75 15.625V5C1.75 4.63533 1.89448 4.28521 2.15234 4.02734L2.25391 3.93652C2.49856 3.73611 2.80597 3.625 3.125 3.625H7.29102C7.58852 3.625 7.8782 3.72189 8.11621 3.90039L10.25 5.5H16.875C17.194 5.5 17.5014 5.61111 17.7461 5.81152L17.8477 5.90234L17.9385 6.00391C18.1389 6.24856 18.25 6.55597 18.25 6.875V15.6943Z'\n fill='currentColor'\n />,\n);\n\nexport const IconImage = createIcon(\n 'IconImage',\n <path\n d='M4.42891 16.875L12.9953 8.30781C13.0534 8.2497 13.1223 8.2036 13.1982 8.17215C13.274 8.1407 13.3554 8.12451 13.4375 8.12451C13.5196 8.12451 13.601 8.1407 13.6768 8.17215C13.7527 8.2036 13.8216 8.2497 13.8797 8.30781L16.875 11.3039M3.75 3.125H16.25C16.5952 3.125 16.875 3.40482 16.875 3.75V16.25C16.875 16.5952 16.5952 16.875 16.25 16.875H3.75C3.40482 16.875 3.125 16.5952 3.125 16.25V3.75C3.125 3.40482 3.40482 3.125 3.75 3.125ZM8.75 7.5C8.75 8.19036 8.19036 8.75 7.5 8.75C6.80964 8.75 6.25 8.19036 6.25 7.5C6.25 6.80964 6.80964 6.25 7.5 6.25C8.19036 6.25 8.75 6.80964 8.75 7.5Z'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n);\n\nexport const IconInfo = createIcon(\n 'IconInfo',\n <>\n <path\n d='M16.75 10C16.75 6.27208 13.7279 3.25 10 3.25C6.27208 3.25 3.25 6.27208 3.25 10C3.25 13.7279 6.27208 16.75 10 16.75C13.7279 16.75 16.75 13.7279 16.75 10ZM18.25 10C18.25 14.5563 14.5563 18.25 10 18.25C5.44365 18.25 1.75 14.5563 1.75 10C1.75 5.44365 5.44365 1.75 10 1.75C14.5563 1.75 18.25 5.44365 18.25 10Z'\n fill='currentColor'\n />\n <path\n d='M10.75 13.0107C11.1047 13.0703 11.375 13.3784 11.375 13.75C11.375 14.1642 11.0392 14.5 10.625 14.5C10.2603 14.5 9.91021 14.3555 9.65234 14.0977C9.39448 13.8398 9.25 13.4897 9.25 13.125V10.1133C8.89539 10.0537 8.625 9.74655 8.625 9.375C8.625 8.96079 8.96079 8.625 9.375 8.625C9.69403 8.625 10.0014 8.73611 10.2461 8.93652L10.3477 9.02734L10.4385 9.12891C10.6389 9.37356 10.75 9.68097 10.75 10V13.0107Z'\n fill='currentColor'\n />\n <path\n d='M9.6875 7.5C10.2053 7.5 10.625 7.08027 10.625 6.5625C10.625 6.04473 10.2053 5.625 9.6875 5.625C9.16973 5.625 8.75 6.04473 8.75 6.5625C8.75 7.08027 9.16973 7.5 9.6875 7.5Z'\n fill='currentColor'\n />\n </>,\n);\n\n// was: IconMagnifyingGlassSearch\nexport const IconSearch = createIcon(\n 'IconSearch',\n <path\n d='M13.1695 13.1695L17.5 17.5M15 8.75C15 12.2018 12.2018 15 8.75 15C5.29822 15 2.5 12.2018 2.5 8.75C2.5 5.29822 5.29822 2.5 8.75 2.5C12.2018 2.5 15 5.29822 15 8.75Z'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n { 'data-rtl-mirror': '' },\n);\n\n// was: IconMapPin\nexport const IconLocation = createIcon(\n 'IconLocation',\n <>\n <path\n d='M10 10.625C11.3807 10.625 12.5 9.50571 12.5 8.125C12.5 6.74429 11.3807 5.625 10 5.625C8.61929 5.625 7.5 6.74429 7.5 8.125C7.5 9.50571 8.61929 10.625 10 10.625Z'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />\n <path\n d='M16.25 8.125C16.25 13.75 10 18.125 10 18.125C10 18.125 3.75 13.75 3.75 8.125C3.75 6.4674 4.40848 4.87769 5.58058 3.70558C6.75269 2.53348 8.3424 1.875 10 1.875C11.6576 1.875 13.2473 2.53348 14.4194 3.70558C15.5915 4.87769 16.25 6.4674 16.25 8.125Z'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />\n </>,\n);\n\n// was: IconMicrophone\nexport const IconVoice = createIcon(\n 'IconVoice',\n <path\n d='M10 15.625V18.75M10 15.625C11.4918 15.625 12.9226 15.0324 13.9775 13.9775C15.0324 12.9226 15.625 11.4918 15.625 10M10 15.625C8.50816 15.625 7.07742 15.0324 6.02252 13.9775C4.96763 12.9226 4.375 11.4918 4.375 10M10 1.875C11.7259 1.875 13.125 3.27411 13.125 5V10C13.125 11.7259 11.7259 13.125 10 13.125C8.27411 13.125 6.875 11.7259 6.875 10V5C6.875 3.27411 8.27411 1.875 10 1.875Z'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n);\n\nexport const IconMicrophoneSolid = createIcon(\n 'IconMicrophoneSolid',\n <path\n d='M6.25 10V5C6.25 4.00544 6.64509 3.05161 7.34835 2.34835C8.05161 1.64509 9.00544 1.25 10 1.25C10.9946 1.25 11.9484 1.64509 12.6517 2.34835C13.3549 3.05161 13.75 4.00544 13.75 5V10C13.75 10.9946 13.3549 11.9484 12.6517 12.6517C11.9484 13.3549 10.9946 13.75 10 13.75C9.00544 13.75 8.05161 13.3549 7.34835 12.6517C6.64509 11.9484 6.25 10.9946 6.25 10ZM16.25 10C16.25 9.83424 16.1842 9.67527 16.0669 9.55806C15.9497 9.44085 15.7908 9.375 15.625 9.375C15.4592 9.375 15.3003 9.44085 15.1831 9.55806C15.0658 9.67527 15 9.83424 15 10C15 11.3261 14.4732 12.5979 13.5355 13.5355C12.5979 14.4732 11.3261 15 10 15C8.67392 15 7.40215 14.4732 6.46447 13.5355C5.52678 12.5979 5 11.3261 5 10C5 9.83424 4.93415 9.67527 4.81694 9.55806C4.69973 9.44085 4.54076 9.375 4.375 9.375C4.20924 9.375 4.05027 9.44085 3.93306 9.55806C3.81585 9.67527 3.75 9.83424 3.75 10C3.7519 11.5489 4.32806 13.042 5.36707 14.1907C6.40607 15.3393 7.83409 16.062 9.375 16.2188V18.75C9.375 18.9158 9.44085 19.0747 9.55806 19.1919C9.67527 19.3092 9.83424 19.375 10 19.375C10.1658 19.375 10.3247 19.3092 10.4419 19.1919C10.5592 19.0747 10.625 18.9158 10.625 18.75V16.2188C12.1659 16.062 13.5939 15.3393 14.6329 14.1907C15.6719 13.042 16.2481 11.5489 16.25 10Z'\n fill='currentColor'\n />,\n);\n\nexport const IconMute = createIcon(\n 'IconMute',\n <path\n d='M15.625 8.125V11.875M18.125 6.875V13.125M4.375 3.125L16.875 16.875M9.38672 4.92109L12.5 2.5V8.34609M12.5 12.0625V17.5L6.875 13.125H3.125C2.95924 13.125 2.80027 13.0592 2.68306 12.9419C2.56585 12.8247 2.5 12.6658 2.5 12.5V7.5C2.5 7.33424 2.56585 7.17527 2.68306 7.05806C2.80027 6.94085 2.95924 6.875 3.125 6.875H7.78437'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n { 'data-rtl-mirror': '' },\n);\n\nexport const IconMegaphone = createIcon(\n 'IconMegaphone',\n <path\n d='M18 9.375C18 8.74513 17.7501 8.1407 17.3047 7.69531C16.8593 7.24993 16.2549 7 15.625 7H13.25V11.75H15.625C16.2549 11.75 16.8593 11.5001 17.3047 11.0547C17.7501 10.6093 18 10.0049 18 9.375ZM13.25 15.6094L13.9072 16.0479L14.6504 13.25H13.25V15.6094ZM3.875 15.3613C5.95015 13.6742 8.04776 12.7734 9.64648 12.2949C10.4722 12.0478 11.1671 11.9129 11.6602 11.8389C11.6909 11.8343 11.7209 11.8303 11.75 11.8262V6.92383C11.7209 6.91969 11.6908 6.91671 11.6602 6.91211C11.1671 6.83809 10.4722 6.70218 9.64648 6.45508C8.04766 5.97662 5.95031 5.0757 3.875 3.38867V15.3613ZM19.5 9.375C19.5 10.4027 19.0919 11.3885 18.3652 12.1152C17.7786 12.7019 17.023 13.0807 16.2129 13.2051L15.3174 16.5811L15.3184 16.582C15.2651 16.7957 15.1613 16.994 15.0156 17.1592C14.8698 17.3244 14.686 17.4527 14.4805 17.5322C14.2749 17.6118 14.0531 17.6403 13.834 17.6162C13.615 17.5921 13.405 17.5158 13.2217 17.3936L12.3623 16.8213C12.1743 16.6958 12.0198 16.5254 11.9131 16.3262C11.8064 16.1268 11.7501 15.9039 11.75 15.6777V13.3428C11.3266 13.4117 10.752 13.5301 10.0762 13.7324C8.57696 14.1812 6.58735 15.0397 4.63477 16.6777L4.63379 16.6768C4.43352 16.845 4.18997 16.9539 3.93066 16.9883C3.67115 17.0227 3.40727 16.9816 3.16992 16.8711C2.93257 16.7606 2.73161 16.585 2.59082 16.3643C2.45002 16.1435 2.37506 15.8869 2.375 15.625V3.12402L2.38867 2.92871C2.41659 2.73605 2.48617 2.55103 2.5918 2.38574C2.73273 2.16523 2.93357 1.98918 3.1709 1.87891L3.35352 1.80957C3.47774 1.77216 3.6066 1.75227 3.73633 1.75098L3.93164 1.7627L4.12207 1.80273C4.30947 1.85543 4.48363 1.94804 4.63379 2.07422L4.63477 2.07324C6.58731 3.71082 8.57697 4.5689 10.0762 5.01758C10.8255 5.24183 11.4504 5.3638 11.8828 5.42871C12.0986 5.46111 12.2662 5.47917 12.377 5.48926C12.432 5.49427 12.4732 5.49735 12.499 5.49902C12.5118 5.49984 12.5213 5.49973 12.5264 5.5H15.625C16.6527 5.5 17.6385 5.90808 18.3652 6.63477C19.0919 7.36146 19.5 8.3473 19.5 9.375Z'\n fill='currentColor'\n />,\n);\n\n// was: IconPaperPlane\nexport const IconSend = createIcon(\n 'IconSend',\n <path\n d='M11.2498 10H6.24982M6.24982 10L3.7881 2.71328C3.74537 2.59349 3.7402 2.4635 3.7733 2.34069C3.80639 2.21788 3.87616 2.10808 3.9733 2.02597C4.07044 1.94386 4.19032 1.89335 4.31693 1.88117C4.44353 1.86899 4.57084 1.89573 4.68185 1.95781L17.8069 9.4461C17.9045 9.50015 17.986 9.57937 18.0427 9.67555C18.0994 9.77172 18.1293 9.88133 18.1293 9.99297C18.1293 10.1046 18.0994 10.2142 18.0427 10.3104C17.986 10.4066 17.9045 10.4858 17.8069 10.5398L4.68185 18.0469C4.57051 18.1096 4.4426 18.1367 4.31537 18.1245C4.18815 18.1123 4.06772 18.0614 3.97032 17.9787C3.87292 17.8959 3.80323 17.7853 3.77065 17.6617C3.73807 17.5381 3.74416 17.4075 3.7881 17.2875L6.24982 10Z'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n { 'data-rtl-mirror': '' },\n);\n\nexport const IconShield = createIcon(\n 'IconShield',\n <path\n d='M10.1973 18.8486C10.0681 18.8838 9.93188 18.8838 9.80273 18.8486L10 18.125L10.1973 18.8486ZM16.125 4.5H3.875V8.75C3.875 12.2327 5.45678 14.3769 7.03711 15.6699C7.83473 16.3225 8.63551 16.7591 9.23633 17.0322C9.53582 17.1683 9.7837 17.2629 9.95312 17.3223C9.96932 17.3279 9.98528 17.3319 10 17.3369C10.0147 17.3319 10.0307 17.3279 10.0469 17.3223C10.2163 17.2629 10.4642 17.1683 10.7637 17.0322C11.3645 16.7591 12.1653 16.3225 12.9629 15.6699C14.5432 14.3769 16.125 12.2327 16.125 8.75V4.5ZM17.625 8.75C17.625 12.7673 15.7693 15.3106 13.9121 16.8301C12.9911 17.5837 12.073 18.0846 11.3848 18.3975C11.04 18.5542 10.7504 18.6649 10.5439 18.7373C10.4407 18.7735 10.3576 18.8002 10.2988 18.8184C10.2694 18.8274 10.2455 18.8349 10.2285 18.8398L10.2012 18.8477H10.1992L10.1982 18.8486L10 18.125L9.80176 18.8486L9.80078 18.8477H9.79883L9.77148 18.8398C9.75446 18.8349 9.73058 18.8274 9.70117 18.8184C9.64239 18.8002 9.55926 18.7735 9.45605 18.7373C9.24957 18.6649 8.95996 18.5542 8.61523 18.3975C7.92702 18.0846 7.00893 17.5837 6.08789 16.8301C4.23072 15.3106 2.375 12.7673 2.375 8.75V4.375C2.375 4.01033 2.51948 3.66021 2.77734 3.40234L2.87891 3.31152C3.12356 3.11111 3.43097 3 3.75 3H16.25C16.569 3 16.8764 3.11111 17.1211 3.31152L17.2227 3.40234L17.3135 3.50391C17.5139 3.74856 17.625 4.05597 17.625 4.375V8.75Z'\n fill='currentColor'\n />,\n);\n\n// was: IconPaperclip\nexport const IconAttachment = createIcon(\n 'IconAttachment',\n <path\n d='M12.4999 6.24998L5.9913 12.8664C5.76258 13.102 5.63576 13.4181 5.63823 13.7465C5.6407 14.0748 5.77227 14.389 6.00451 14.6211C6.23674 14.8533 6.55099 14.9847 6.87934 14.987C7.20769 14.9894 7.52376 14.8624 7.75927 14.6336L15.5179 6.76795C15.9868 6.29905 16.2502 5.6631 16.2502 4.99998C16.2502 4.33686 15.9868 3.70091 15.5179 3.23201C15.049 2.76312 14.413 2.49969 13.7499 2.49969C13.0868 2.49969 12.4508 2.76312 11.9819 3.23201L4.22333 11.0984C3.52953 11.8036 3.14249 12.7544 3.14652 13.7437C3.15054 14.7329 3.54531 15.6805 4.24483 16.38C4.94435 17.0796 5.89195 17.4743 6.88121 17.4784C7.87048 17.4824 8.82126 17.0953 9.52645 16.4015L15.9374 9.99998'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n);\n\n// was: IconPause\nexport const IconPauseFill = createIcon(\n 'IconPauseFill',\n <path d='M16.875 3.75V16.25C16.875 16.5815 16.7433 16.8995 16.5089 17.1339C16.2745 17.3683 15.9565 17.5 15.625 17.5H12.5C12.1685 17.5 11.8505 17.3683 11.6161 17.1339C11.3817 16.8995 11.25 16.5815 11.25 16.25V3.75C11.25 3.41848 11.3817 3.10054 11.6161 2.86612C11.8505 2.6317 12.1685 2.5 12.5 2.5H15.625C15.9565 2.5 16.2745 2.6317 16.5089 2.86612C16.7433 3.10054 16.875 3.41848 16.875 3.75ZM7.5 2.5H4.375C4.04348 2.5 3.72554 2.6317 3.49112 2.86612C3.2567 3.10054 3.125 3.41848 3.125 3.75V16.25C3.125 16.5815 3.2567 16.8995 3.49112 17.1339C3.72554 17.3683 4.04348 17.5 4.375 17.5H7.5C7.83152 17.5 8.14946 17.3683 8.38388 17.1339C8.6183 16.8995 8.75 16.5815 8.75 16.25V3.75C8.75 3.41848 8.6183 3.10054 8.38388 2.86612C8.14946 2.6317 7.83152 2.5 7.5 2.5Z' />,\n);\n\n// was: IconPeople\nexport const IconUser = createIcon(\n 'IconUser',\n <path\n d='M10 12.5C12.7614 12.5 15 10.2614 15 7.5C15 4.73858 12.7614 2.5 10 2.5C7.23858 2.5 5 4.73858 5 7.5C5 10.2614 7.23858 12.5 10 12.5ZM10 12.5C6.76172 12.5 4.01328 14.2602 2.5 16.875M10 12.5C13.2383 12.5 15.9867 14.2602 17.5 16.875'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n);\n\nexport const IconUsers = createIcon(\n 'IconUsers',\n <path\n d='M9.87527 8.4375C9.87527 6.60819 8.39203 5.12521 6.56277 5.125C4.73332 5.125 3.25027 6.60806 3.25027 8.4375C3.25027 10.2547 4.71313 11.7293 6.52566 11.749C6.5379 11.749 6.55052 11.748 6.56277 11.748C6.57481 11.7481 6.58686 11.749 6.5989 11.749C8.41151 11.7294 9.87527 10.2548 9.87527 8.4375ZM13.7249 3.63379C14.4323 3.67666 15.1216 3.8757 15.7434 4.21582C16.3651 4.55594 16.9039 5.02905 17.3216 5.60157C17.7392 6.17405 18.0254 6.83152 18.1594 7.52735C18.2934 8.22317 18.2721 8.94034 18.0969 9.62696C17.9217 10.3136 17.5968 10.9534 17.1458 11.5C16.8952 11.8037 16.6079 12.073 16.2932 12.3057C16.559 12.413 16.8201 12.5335 17.0735 12.6709C18.1898 13.2762 19.1371 14.1512 19.8294 15.2158C20.0551 15.5631 19.9569 16.0281 19.6096 16.2539C19.2624 16.4797 18.7974 16.3814 18.5716 16.0342C18.0157 15.1792 17.2551 14.4764 16.3587 13.9902C15.462 13.5041 14.4577 13.2494 13.4378 13.25C13.0238 13.2502 12.6883 12.9149 12.6878 12.501C12.6875 12.1128 12.9817 11.7928 13.3596 11.7539L13.4368 11.75L13.6194 11.7451C14.0444 11.7213 14.4619 11.6157 14.8479 11.4336C15.2889 11.2255 15.6782 10.922 15.9885 10.5459C16.299 10.1697 16.5232 9.72944 16.6438 9.25684C16.7644 8.78425 16.779 8.29047 16.6868 7.81153C16.5946 7.33249 16.3971 6.87947 16.1096 6.48535C15.8222 6.09134 15.4516 5.76533 15.0237 5.53125C14.5957 5.29714 14.121 5.16037 13.6341 5.13086C13.1471 5.10137 12.6594 5.17964 12.2063 5.36035C11.8217 5.51366 11.3852 5.3269 11.2317 4.94239C11.0783 4.55776 11.2662 4.12136 11.6507 3.96778C12.309 3.70521 13.0174 3.59093 13.7249 3.63379ZM11.3753 8.4375C11.3753 10.024 10.6063 11.43 9.42214 12.3066C9.68664 12.4137 9.94634 12.5341 10.1985 12.6709C11.3147 13.2764 12.262 14.1513 12.9544 15.2158C13.1802 15.5631 13.0819 16.0281 12.7346 16.2539C12.3874 16.4797 11.9224 16.3814 11.6966 16.0342C11.1404 15.179 10.3794 14.4757 9.48269 13.9893C8.59628 13.5085 7.60498 13.2547 6.59695 13.249C6.58556 13.2491 6.57417 13.25 6.56277 13.25C6.55117 13.25 6.53919 13.2491 6.52761 13.249C5.51958 13.2547 4.52826 13.5085 3.64187 13.9893C2.7452 14.4757 1.98418 15.179 1.428 16.0342C1.20214 16.3813 0.737113 16.4797 0.389915 16.2539C0.0427651 16.028 -0.0556256 15.563 0.170188 15.2158C0.862547 14.1513 1.80989 13.2765 2.92605 12.6709C3.1779 12.5343 3.43728 12.4136 3.70144 12.3066C2.51771 11.4299 1.75027 10.0237 1.75027 8.4375C1.75027 5.77963 3.9049 3.625 6.56277 3.625C9.22046 3.62521 11.3753 5.77976 11.3753 8.4375Z'\n fill='currentColor'\n />,\n);\n\n// was: IconPeopleAdd\nexport const IconUserAdd = createIcon(\n 'IconUserAdd',\n <>\n <g clipPath='url(#clip0_14246_498359)'>\n <path\n d='M15.625 10.625H19.375M17.5 8.75V12.5M8.4375 12.5C11.0263 12.5 13.125 10.4013 13.125 7.8125C13.125 5.22367 11.0263 3.125 8.4375 3.125C5.84867 3.125 3.75 5.22367 3.75 7.8125C3.75 10.4013 5.84867 12.5 8.4375 12.5ZM8.4375 12.5C5.74688 12.5 3.48047 13.7148 1.875 15.625M8.4375 12.5C11.1281 12.5 13.3945 13.7148 15 15.625'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />\n </g>\n <defs>\n <clipPath id='clip0_14246_498359'>\n <rect fill='white' height='20' width='20' />\n </clipPath>\n </defs>\n </>,\n);\n\n// was: IconPeopleAdded\nexport const IconUserCheck = createIcon(\n 'IconUserCheck',\n <>\n <g clipPath='url(#clip0_14236_425131)'>\n <path\n d='M8.4375 12.5C11.0263 12.5 13.125 10.4013 13.125 7.8125C13.125 5.22367 11.0263 3.125 8.4375 3.125C5.84867 3.125 3.75 5.22367 3.75 7.8125C3.75 10.4013 5.84867 12.5 8.4375 12.5ZM8.4375 12.5C5.74688 12.5 3.48047 13.7148 1.875 15.625M8.4375 12.5C11.1281 12.5 13.3945 13.7148 15 15.625M15.625 11.25L16.875 12.5L19.375 10'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />\n </g>\n <defs>\n <clipPath id='clip0_14236_425131'>\n <rect fill='white' height='20' width='20' />\n </clipPath>\n </defs>\n </>,\n);\n\n// was: IconPeopleRemove\nexport const IconUserRemove = createIcon(\n 'IconUserRemove',\n <>\n <g clipPath='url(#clip0_14246_434209)'>\n <path\n d='M15.625 10.625H19.375M8.4375 12.5C11.0263 12.5 13.125 10.4013 13.125 7.8125C13.125 5.22367 11.0263 3.125 8.4375 3.125C5.84867 3.125 3.75 5.22367 3.75 7.8125C3.75 10.4013 5.84867 12.5 8.4375 12.5ZM8.4375 12.5C5.74688 12.5 3.48047 13.7148 1.875 15.625M8.4375 12.5C11.1281 12.5 13.3945 13.7148 15 15.625'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />\n </g>\n <defs>\n <clipPath id='clip0_14246_434209'>\n <rect fill='white' height='20' width='20' />\n </clipPath>\n </defs>\n </>,\n);\n\nexport const IconPin = createIcon(\n 'IconPin',\n <path\n d='M7.52271 12.4773L3.75006 16.25M17.9422 7.68279C18.0594 7.56559 18.1252 7.40668 18.1252 7.24099C18.1252 7.0753 18.0594 6.9164 17.9422 6.7992L13.2032 2.05779C13.086 1.94067 12.9271 1.87488 12.7614 1.87488C12.5957 1.87488 12.4368 1.94067 12.3196 2.05779L7.84303 6.54685C7.84303 6.54685 5.67506 5.46326 3.35943 7.33201C3.29077 7.38697 3.23447 7.45581 3.19424 7.53402C3.154 7.61224 3.13072 7.69806 3.12593 7.78589C3.12114 7.87371 3.13493 7.96156 3.16642 8.04369C3.19791 8.12581 3.24637 8.20037 3.30865 8.26248L11.7383 16.6914C11.8015 16.7541 11.8773 16.8025 11.9606 16.8336C12.044 16.8646 12.133 16.8775 12.2218 16.8713C12.3105 16.8652 12.3969 16.8402 12.4752 16.798C12.5535 16.7558 12.6219 16.6973 12.6758 16.6265C13.3313 15.7547 14.361 13.9633 13.4657 12.1734L17.9422 7.68279Z'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n);\n\n// was: IconPlaySolid\nexport const IconPlayFill = createIcon(\n 'IconPlayFill',\n <path d='M18.75 10C18.7505 10.2122 18.6961 10.4209 18.5921 10.6059C18.488 10.7908 18.3379 10.9457 18.1562 11.0555L6.9 17.9414C6.71022 18.0576 6.49287 18.1211 6.27037 18.1252C6.04788 18.1293 5.82832 18.0739 5.63438 17.9648C5.44227 17.8574 5.28225 17.7008 5.17075 17.511C5.05926 17.3213 5.00032 17.1052 5 16.8852V3.11484C5.00032 2.89475 5.05926 2.67872 5.17075 2.48896C5.28225 2.2992 5.44227 2.14257 5.63438 2.03516C5.82832 1.92605 6.04788 1.87071 6.27037 1.87483C6.49287 1.87895 6.71022 1.94239 6.9 2.05859L18.1562 8.94453C18.3379 9.05428 18.488 9.20916 18.5921 9.39411C18.6961 9.57906 18.7505 9.78779 18.75 10Z' />,\n);\n\n// was: IconPlusLarge\nexport const IconPlus = createIcon(\n 'IconPlus',\n <path\n d='M3.125 10H16.875M10 3.125V16.875'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='2'\n />,\n);\n\nexport const IconPlusSmall = createIcon(\n 'IconPlusSmall',\n <path\n d='M3.125 10H16.875M10 3.125V16.875'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n);\n\n// was: IconRunShortcut\nexport const IconCommand = createIcon(\n 'IconCommand',\n <path\n d='M6.25 7.5L9.375 10L6.25 12.5M10.625 12.5H13.75M3.125 3.75H16.875C17.2202 3.75 17.5 4.02982 17.5 4.375V15.625C17.5 15.9702 17.2202 16.25 16.875 16.25H3.125C2.77982 16.25 2.5 15.9702 2.5 15.625V4.375C2.5 4.02982 2.77982 3.75 3.125 3.75Z'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n);\n\n// was: IconSquareBehindSquare2_Copy\nexport const IconCopy = createIcon(\n 'IconCopy',\n <path\n d='M13.125 13.125H16.875V3.125H6.875V6.875M3.125 6.875H13.125V16.875H3.125V6.875Z'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n);\n\n// was: IconThunder\nexport const IconBolt = createIcon(\n 'IconBolt',\n <path d='M16.7071 9.80157L7.95711 19.1766C7.86438 19.2755 7.74198 19.3416 7.60839 19.3649C7.47479 19.3882 7.33724 19.3674 7.2165 19.3057C7.09576 19.244 6.99837 19.1446 6.93904 19.0227C6.8797 18.9007 6.86164 18.7628 6.88757 18.6297L8.03289 12.9008L3.53054 11.2102C3.43385 11.174 3.34762 11.1144 3.27956 11.0368C3.2115 10.9592 3.16373 10.8659 3.14052 10.7653C3.1173 10.6647 3.11937 10.5599 3.14653 10.4603C3.17369 10.3607 3.2251 10.2694 3.29617 10.1945L12.0462 0.819538C12.1389 0.720581 12.2613 0.654468 12.3949 0.631176C12.5285 0.607884 12.666 0.628675 12.7868 0.690414C12.9075 0.752152 13.0049 0.851488 13.0642 0.97343C13.1236 1.09537 13.1416 1.2333 13.1157 1.36641L11.9673 7.10157L16.4696 8.78985C16.5656 8.82626 16.6511 8.88576 16.7187 8.96307C16.7862 9.04039 16.8336 9.13315 16.8568 9.23316C16.88 9.33317 16.8781 9.43734 16.8515 9.53648C16.8248 9.63562 16.7742 9.72666 16.704 9.80157H16.7071Z' />,\n);\n\nexport const IconTranslate = createIcon(\n 'IconTranslate',\n <path\n d='M18.75 16.875L14.375 8.125L10 16.875M11.25 14.375H17.5M7.5 2.5V4.375M2.5 4.375H12.5M10 4.375C10 6.36412 9.20982 8.27178 7.8033 9.6783C6.39678 11.0848 4.48912 11.875 2.5 11.875M5.42734 6.875C5.94442 8.33751 6.90226 9.60371 8.16893 10.4992C9.4356 11.3947 10.9488 11.8753 12.5 11.875'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n);\n\n// was: IconTrashBin\nexport const IconDelete = createIcon(\n 'IconDelete',\n <path\n d='M16.875 4.375H3.125M8.125 8.125V13.125M11.875 8.125V13.125M15.625 4.375V16.25C15.625 16.4158 15.5592 16.5747 15.4419 16.6919C15.3247 16.8092 15.1658 16.875 15 16.875H5C4.83424 16.875 4.67527 16.8092 4.55806 16.6919C4.44085 16.5747 4.375 16.4158 4.375 16.25V4.375M13.125 4.375V3.125C13.125 2.79348 12.9933 2.47554 12.7589 2.24112C12.5245 2.0067 12.2065 1.875 11.875 1.875H8.125C7.79348 1.875 7.47554 2.0067 7.24112 2.24112C7.0067 2.47554 6.875 2.79348 6.875 3.125V4.375'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n);\n\nexport const IconTrophy = createIcon(\n 'IconTrophy',\n <path\n d='M7.5 17.5H12.5M10 14.375V17.5M4.53125 10H3.75C3.08696 10 2.45107 9.73661 1.98223 9.26777C1.51339 8.79893 1.25 8.16304 1.25 7.5V6.25C1.25 6.08424 1.31585 5.92527 1.43306 5.80806C1.55027 5.69085 1.70924 5.625 1.875 5.625H4.375M15.4688 10H16.25C16.913 10 17.5489 9.73661 18.0178 9.26777C18.4866 8.79893 18.75 8.16304 18.75 7.5V6.25C18.75 6.08424 18.6842 5.92527 18.5669 5.80806C18.4497 5.69085 18.2908 5.625 18.125 5.625H15.625M4.375 3.75H15.625V8.67969C15.625 11.7812 13.1445 14.3516 10.043 14.375C9.30068 14.3807 8.5646 14.2394 7.87718 13.9592C7.18975 13.6791 6.56458 13.2656 6.03769 12.7427C5.5108 12.2198 5.09262 11.5978 4.80725 10.9126C4.52188 10.2273 4.37498 9.49231 4.375 8.75V3.75Z'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n);\n\nexport const IconUnpin = createIcon(\n 'IconUnpin',\n <path\n d='M7.52271 12.4773L3.75006 16.25M3.75006 3.12498L16.2501 16.875M14.4532 11.1828L17.9415 7.68279C18.0586 7.56559 18.1244 7.40668 18.1244 7.24099C18.1244 7.0753 18.0586 6.9164 17.9415 6.7992L13.2032 2.05779C13.086 1.94067 12.9271 1.87488 12.7614 1.87488C12.5957 1.87488 12.4368 1.94067 12.3196 2.05779L9.09615 5.28904M6.58756 6.24998C5.74537 6.18435 4.57271 6.3531 3.35943 7.33201C3.29077 7.38697 3.23447 7.45581 3.19424 7.53402C3.154 7.61224 3.13072 7.69806 3.12593 7.78589C3.12114 7.87371 3.13493 7.96156 3.16642 8.04369C3.19791 8.12581 3.24637 8.20037 3.30865 8.26248L11.7383 16.6914C11.8015 16.7541 11.8773 16.8025 11.9606 16.8336C12.044 16.8646 12.133 16.8775 12.2218 16.8713C12.3105 16.8652 12.3969 16.8402 12.4752 16.798C12.5535 16.7558 12.6219 16.6973 12.6758 16.6265C13.0829 16.0851 13.6344 15.1898 13.779 14.1594'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n);\n\nexport const IconVideo = createIcon(\n 'IconVideo',\n <>\n <g clipPath='url(#clip0_14111_491476)'>\n <path\n d='M15.625 8.75L19.375 6.25V13.75L15.625 11.25M2.5 5H15C15.3452 5 15.625 5.27982 15.625 5.625V14.375C15.625 14.7202 15.3452 15 15 15H2.5C2.15482 15 1.875 14.7202 1.875 14.375V5.625C1.875 5.27982 2.15482 5 2.5 5Z'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />\n </g>\n <defs>\n <clipPath id='clip0_14111_491476'>\n <rect fill='white' height='20' width='20' />\n </clipPath>\n </defs>\n </>,\n { 'data-rtl-mirror': '' },\n);\n\n// was: IconVideoSolid\nexport const IconVideoFill = createIcon(\n 'IconVideoFill',\n <>\n <g clipPath='url(#clip0_14064_467281)'>\n <path d='M15 5.625V14.375C15 14.7065 14.8683 15.0245 14.6339 15.2589C14.3995 15.4933 14.0815 15.625 13.75 15.625H2.5C2.16848 15.625 1.85054 15.4933 1.61612 15.2589C1.3817 15.0245 1.25 14.7065 1.25 14.375V5.625C1.25 5.29348 1.3817 4.97554 1.61612 4.74112C1.85054 4.5067 2.16848 4.375 2.5 4.375H13.75C14.0815 4.375 14.3995 4.5067 14.6339 4.74112C14.8683 4.97554 15 5.29348 15 5.625ZM19.5312 5.64453C19.4431 5.62295 19.3513 5.62029 19.2621 5.63672C19.1728 5.65315 19.088 5.68829 19.0133 5.73984L16.3891 7.48906C16.3463 7.51762 16.3112 7.55631 16.2869 7.6017C16.2626 7.64708 16.25 7.69776 16.25 7.74922V12.2508C16.25 12.3022 16.2626 12.3529 16.2869 12.3983C16.3112 12.4437 16.3463 12.4824 16.3891 12.5109L19.0281 14.2703C19.1269 14.3362 19.2424 14.3726 19.3611 14.3752C19.4798 14.3779 19.5968 14.3466 19.6984 14.2852C19.7924 14.2254 19.8695 14.1425 19.9223 14.0444C19.9751 13.9464 20.0019 13.8364 20 13.725V6.25C20.0001 6.11139 19.9541 5.97668 19.8692 5.86708C19.7843 5.75747 19.6655 5.67918 19.5312 5.64453Z' />\n </g>\n <defs>\n <clipPath id='clip0_14064_467281'>\n <rect fill='white' height='20' width='20' />\n </clipPath>\n </defs>\n </>,\n { 'data-rtl-mirror': '' },\n);\n\n// was: IconVolumeFull\nexport const IconAudio = createIcon(\n 'IconAudio',\n <path\n d='M15.625 8.125V11.875M18.125 6.875V13.125M6.875 13.125H3.125C2.95924 13.125 2.80027 13.0592 2.68306 12.9419C2.56585 12.8247 2.5 12.6658 2.5 12.5V7.5C2.5 7.33424 2.56585 7.17527 2.68306 7.05806C2.80027 6.94085 2.95924 6.875 3.125 6.875H6.875L12.5 2.5V17.5L6.875 13.125Z'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n { 'data-rtl-mirror': '' },\n);\n\nexport const IconArchive = createIcon(\n 'IconArchive',\n <path\n d='M16.875 7.5V15C16.875 15.1658 16.8092 15.3247 16.6919 15.4419C16.5747 15.5592 16.4158 15.625 16.25 15.625H3.75C3.58424 15.625 3.42527 15.5592 3.30806 15.4419C3.19085 15.3247 3.125 15.1658 3.125 15V7.5M8.125 10.625H11.875M2.5 4.375H17.5C17.8452 4.375 18.125 4.65482 18.125 5V6.875C18.125 7.22018 17.8452 7.5 17.5 7.5H2.5C2.15482 7.5 1.875 7.22018 1.875 6.875V5C1.875 4.65482 2.15482 4.375 2.5 4.375Z'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />,\n);\n\n// was: IconLoadingCircle\nexport const IconLoading = createIcon(\n 'IconLoading',\n <>\n <path\n d='M17.5 10C17.5 14.1422 14.1422 17.5 10 17.5C5.85787 17.5 2.5 14.1422 2.5 10C2.5 5.85787 5.85787 2.5 10 2.5C14.1422 2.5 17.5 5.85787 17.5 10Z'\n fill='none'\n stroke='currentColor'\n strokeOpacity='0.3'\n strokeWidth='2'\n />\n <path\n d='M17.4544 10.8334C17.0701 14.3097 14.3098 17.07 10.8335 17.4543'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeWidth='2'\n />\n </>,\n);\n\nexport const IconGiphy = createIcon(\n 'IconGiphy',\n <>\n <rect fill='black' height='20' rx='10' width='20' />\n <path\n clipRule='evenodd'\n d='M6.5997 5.50024H13.4008V14.4999H6.59912L6.5997 5.50024Z'\n fill='black'\n fillRule='evenodd'\n />\n <path d='M5.24023 5.1665H6.59998V14.8335H5.24023V5.1665Z' fill='#04FF8E' />\n <path d='M13.4004 7.8335H14.7601V14.8335H13.4004V7.8335Z' fill='#8E2EFF' />\n <path d='M5.24023 14.4998H14.7602V15.8333H5.24023V14.4998Z' fill='#00C5FF' />\n <path d='M5.24023 4.16675H10.6804V5.50025H5.24023V4.16675Z' fill='#FFF152' />\n <path\n d='M13.4003 6.83316V5.50025H12.0399V4.16675H10.6802V8.16666H14.76V6.83316'\n fill='#FF5B5B'\n />\n <path d='M13.4004 9.5V8.1665H14.7601' fill='#551C99' />\n <path\n clipRule='evenodd'\n d='M10.6802 4.16675V5.50025H9.31982'\n fill='#999131'\n fillRule='evenodd'\n />\n </>,\n);\n","import { useMemo } from 'react';\n\nimport { useComponentContext } from './ComponentContext';\nimport * as DEFAULT_ICONS from '../components/Icons/icons';\nimport type { IconSlots } from '../components/Icons/slots';\n\n/**\n * Reads the `icons` override from `ComponentContext` and merges it on top of\n * `DEFAULT_ICONS`. Every returned icon is guaranteed defined, so callers can\n * destructure without fallbacks:\n *\n * ```tsx\n * const { IconFlag } = useComponentContextIcons();\n * ```\n *\n * Overrides supplied via `<WithComponents overrides={{ icons: { … } }} />` win\n * over defaults on a per-slot basis; slots the consumer didn't provide fall\n * back to the SDK's own icon.\n */\nexport const useComponentContextIcons = (): Required<IconSlots> => {\n const { icons } = useComponentContext();\n\n return useMemo(() => {\n const definedOverrides = Object.fromEntries(\n Object.entries(icons ?? {}).filter(([, Icon]) => typeof Icon === 'function'),\n );\n\n return { ...DEFAULT_ICONS, ...definedOverrides };\n\n // Component should be stable.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n};\n","import { nanoid } from 'nanoid';\nimport { StateStore } from 'stream-chat';\n\nexport type GetDialogParams = {\n id: DialogId;\n};\nexport type GetOrCreateDialogParams = GetDialogParams & {\n /**\n * Optional per-dialog override.\n * If undefined, manager-level `closeOnClickOutside` is used.\n */\n closeOnClickOutside?: boolean;\n};\n\ntype DialogId = string;\n\nexport type Dialog = {\n close: () => void;\n closeOnClickOutside?: boolean;\n id: DialogId;\n isOpen: boolean | undefined;\n open: (zIndex?: number) => void;\n removalTimeout: NodeJS.Timeout | undefined;\n remove: () => void;\n toggle: (closeAll?: boolean) => void;\n};\n\nexport type DialogManagerOptions = {\n /** Enables closing all dialogs in this manager when clicking overlay/outside area. */\n closeOnClickOutside?: boolean;\n id?: string;\n};\n\ntype Dialogs = Record<DialogId, Dialog>;\n\nexport type DialogManagerState = {\n dialogsById: Dialogs;\n openedDialogIds: DialogId[];\n};\n\n/**\n * Keeps a map of Dialog objects.\n * Dialog can be controlled via `Dialog` object retrieved using `useDialog()` hook.\n * The hook returns an object with the following API:\n *\n * - `dialog.open()` - opens the dialog\n * - `dialog.close()` - closes the dialog\n * - `dialog.toggle()` - toggles the dialog open state. Accepts boolean argument closeAll. If enabled closes any other dialog that would be open.\n * - `dialog.remove()` - removes the dialog object reference from the state (primarily for cleanup purposes)\n */\nexport class DialogManager {\n /** Manager-level outside click policy used by DialogPortal dismiss handlers. */\n closeOnClickOutside: boolean;\n id: string;\n state = new StateStore<DialogManagerState>({\n dialogsById: {},\n openedDialogIds: [],\n });\n\n constructor({ closeOnClickOutside = true, id }: DialogManagerOptions = {}) {\n this.closeOnClickOutside = closeOnClickOutside;\n this.id = id ?? nanoid();\n }\n\n get openDialogCount() {\n return this.state.getLatestValue().openedDialogIds.length;\n }\n\n get(id: DialogId): Dialog | undefined {\n return this.state.getLatestValue().dialogsById[id];\n }\n\n getOrCreate({ closeOnClickOutside, id }: GetOrCreateDialogParams) {\n let dialog = this.get(id);\n if (!dialog) {\n dialog = {\n close: () => {\n this.close(id);\n },\n closeOnClickOutside,\n id,\n isOpen: false,\n open: () => {\n this.open({ id });\n },\n removalTimeout: undefined,\n remove: () => {\n this.remove(id);\n },\n toggle: (closeAll = false) => {\n this.toggle({ id }, closeAll);\n },\n };\n this.state.next((current) => ({\n ...current,\n dialogsById: { ...current.dialogsById, [id]: dialog as Dialog },\n }));\n }\n\n const shouldUpdateDialogSettings =\n dialog.closeOnClickOutside !== closeOnClickOutside || !!dialog.removalTimeout;\n\n if (shouldUpdateDialogSettings) {\n if (dialog.removalTimeout) clearTimeout(dialog.removalTimeout);\n this.state.next((current) => ({\n ...current,\n dialogsById: {\n ...current.dialogsById,\n [id]: {\n ...current.dialogsById[id],\n closeOnClickOutside,\n removalTimeout: undefined,\n },\n },\n openedDialogIds: current.dialogsById[id]?.isOpen\n ? [...current.openedDialogIds.filter((dialogId) => dialogId !== id), id]\n : current.openedDialogIds,\n }));\n }\n\n return dialog;\n }\n\n open(params: GetOrCreateDialogParams, closeRest?: boolean) {\n const dialog = this.getOrCreate(params);\n if (dialog.isOpen) return;\n if (closeRest) {\n this.closeAll();\n }\n this.state.next((current) => ({\n ...current,\n dialogsById: { ...current.dialogsById, [dialog.id]: { ...dialog, isOpen: true } },\n openedDialogIds: [\n ...current.openedDialogIds.filter((dialogId) => dialogId !== dialog.id),\n dialog.id,\n ],\n }));\n }\n\n close(id: DialogId) {\n const dialog = this.state.getLatestValue().dialogsById[id];\n if (!dialog?.isOpen) return;\n this.state.next((current) => ({\n ...current,\n dialogsById: { ...current.dialogsById, [dialog.id]: { ...dialog, isOpen: false } },\n openedDialogIds: current.openedDialogIds.filter((dialogId) => dialogId !== id),\n }));\n }\n\n closeAll() {\n Object.values(this.state.getLatestValue().dialogsById).forEach((dialog) =>\n dialog.close(),\n );\n }\n\n toggle(params: GetOrCreateDialogParams, closeAll = false) {\n if (this.state.getLatestValue().dialogsById[params.id]?.isOpen) {\n this.close(params.id);\n } else {\n this.open(params, closeAll);\n }\n }\n\n remove = (id: DialogId) => {\n const dialog = this.get(id);\n if (!dialog) return;\n\n if (dialog.removalTimeout) {\n clearTimeout(dialog.removalTimeout);\n }\n\n this.state.next((current) => {\n const newDialogs = { ...current.dialogsById };\n delete newDialogs[id];\n return {\n ...current,\n dialogsById: newDialogs,\n openedDialogIds: current.openedDialogIds.filter((dialogId) => dialogId !== id),\n };\n });\n };\n\n /**\n * Marks the dialog state as unused. If the dialog id is referenced again quickly,\n * the state will not be removed. Otherwise, the state will be removed after\n * a short timeout.\n */\n markForRemoval(id: DialogId) {\n const dialog = this.get(id);\n\n if (!dialog) {\n return;\n }\n\n this.state.next((current) => ({\n ...current,\n dialogsById: {\n ...current.dialogsById,\n [id]: {\n ...dialog,\n removalTimeout: setTimeout(() => {\n this.remove(id);\n }, 16),\n },\n },\n openedDialogIds: current.openedDialogIds.filter((dialogId) => dialogId !== id),\n }));\n }\n\n cancelPendingRemoval(id: DialogId) {\n const dialog = this.get(id);\n\n if (!dialog?.removalTimeout) {\n return;\n }\n\n clearTimeout(dialog.removalTimeout);\n\n this.state.next((current) => ({\n ...current,\n dialogsById: {\n ...current.dialogsById,\n [id]: {\n ...current.dialogsById[id],\n removalTimeout: undefined,\n },\n },\n openedDialogIds: current.dialogsById[id]?.isOpen\n ? [...current.openedDialogIds.filter((dialogId) => dialogId !== id), id]\n : current.openedDialogIds,\n }));\n }\n}\n","import { useCallback, useMemo } from 'react';\nimport { useSyncExternalStore } from 'use-sync-external-store/shim';\n\nimport type { StateStore } from 'stream-chat';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst noop = () => {};\n\nexport function useStateStore<\n T extends Record<string, unknown>,\n O extends Readonly<Record<string, unknown> | Readonly<unknown[]>>,\n>(store: StateStore<T>, selector: (v: T) => O): O;\nexport function useStateStore<\n T extends Record<string, unknown>,\n O extends Readonly<Record<string, unknown> | Readonly<unknown[]>>,\n>(store: StateStore<T> | undefined, selector: (v: T) => O): O | undefined;\nexport function useStateStore<\n T extends Record<string, unknown>,\n O extends Readonly<Record<string, unknown> | Readonly<unknown[]>>,\n>(store: StateStore<T> | undefined, selector: (v: T) => O) {\n const wrappedSubscription = useCallback(\n (onStoreChange: () => void) => {\n const unsubscribe = store?.subscribeWithSelector(selector, onStoreChange);\n return unsubscribe ?? noop;\n },\n [store, selector],\n );\n\n const wrappedSnapshot = useMemo(() => {\n let cachedTuple: [T, O];\n\n return () => {\n const currentValue = store?.getLatestValue();\n\n if (!currentValue) return undefined;\n\n // store value hasn't changed, no need to compare individual values\n if (cachedTuple && cachedTuple[0] === currentValue) {\n return cachedTuple[1];\n }\n\n const newlySelected = selector(currentValue);\n\n // store value changed but selected values wouldn't have to, double-check selected\n if (cachedTuple) {\n let selectededAreEqualToCached = true;\n\n for (const key in cachedTuple[1]) {\n if (cachedTuple[1][key] === newlySelected[key]) continue;\n selectededAreEqualToCached = false;\n break;\n }\n\n if (selectededAreEqualToCached) return cachedTuple[1];\n }\n\n cachedTuple = [currentValue, newlySelected];\n return cachedTuple[1];\n };\n }, [store, selector]);\n\n const state = useSyncExternalStore(wrappedSubscription, wrappedSnapshot);\n\n return state;\n}\n","import { useCallback, useEffect } from 'react';\nimport {\n modalDialogManagerId,\n useDialogManager,\n useNearestDialogManagerContext,\n} from '../../../context';\nimport { useStateStore } from '../../../store';\n\nimport type {\n DialogManagerState,\n GetOrCreateDialogParams,\n} from '../service/DialogManager';\n\nexport type UseDialogParams = GetOrCreateDialogParams & {\n dialogManagerId?: string;\n};\n\nexport const useDialog = ({\n closeOnClickOutside,\n dialogManagerId,\n id,\n}: UseDialogParams) => {\n const { dialogManager } = useDialogManager({ dialogManagerId });\n\n useEffect(() => {\n dialogManager.cancelPendingRemoval(id);\n\n return () => {\n // Since this cleanup can run even if the component is still mounted\n // and dialog id is unchanged (e.g. in <StrictMode />), it's safer to\n // mark state as unused and only remove it after a timeout, rather than\n // to remove it immediately.\n dialogManager.markForRemoval(id);\n };\n }, [dialogManager, id]);\n\n return dialogManager.getOrCreate({ closeOnClickOutside, id });\n};\n\nexport const useDialogOnNearestManager = ({ id }: Pick<UseDialogParams, 'id'>) => {\n const { dialogManager } = useNearestDialogManagerContext() ?? {};\n const dialog = useDialog({ dialogManagerId: dialogManager?.id, id });\n\n return {\n dialog,\n dialogManager,\n };\n};\n\nexport const modalDialogId = 'modal-dialog' as const;\n\nexport const useModalDialog = (id: string = modalDialogId) =>\n useDialog({ dialogManagerId: modalDialogManagerId, id });\n\nexport const useDialogIsOpen = (id: string, dialogManagerId?: string) => {\n const { dialogManager } = useDialogManager({ dialogManagerId });\n const dialogIsOpenSelector = useCallback(\n ({ dialogsById }: DialogManagerState) => ({ isOpen: !!dialogsById[id]?.isOpen }),\n [id],\n );\n return useStateStore(dialogManager.state, dialogIsOpenSelector).isOpen;\n};\n\nexport const useModalDialogIsOpen = (id: string = modalDialogId) =>\n useDialogIsOpen(id, modalDialogManagerId);\n\nexport const useDialogIsTopmost = (id: string, dialogManagerId?: string) => {\n const { dialogManager } = useDialogManager({ dialogManagerId });\n const dialogIsTopmostSelector = useCallback(\n ({ openedDialogIds }: DialogManagerState) => ({\n isTopmost: openedDialogIds[openedDialogIds.length - 1] === id,\n }),\n [id],\n );\n return useStateStore(dialogManager.state, dialogIsTopmostSelector).isTopmost;\n};\n\nexport const useModalDialogIsTopmost = (id: string = modalDialogId) =>\n useDialogIsTopmost(id, modalDialogManagerId);\n\nconst openedDialogCountSelector = (nextValue: DialogManagerState) => ({\n openedDialogCount: nextValue.openedDialogIds.length,\n});\n\nexport const useOpenedDialogCount = ({\n dialogManagerId,\n}: { dialogManagerId?: string } = {}) => {\n const { dialogManager } = useDialogManager({ dialogManagerId });\n return useStateStore(dialogManager.state, openedDialogCountSelector).openedDialogCount;\n};\n","import type { PropsWithChildren, ReactPortal } from 'react';\nimport { useLayoutEffect, useState } from 'react';\nimport { createPortal } from 'react-dom';\n\nexport type PortalProps = {\n getPortalDestination: () => Element | null;\n isOpen?: boolean;\n};\n\nexport const Portal = ({\n children,\n getPortalDestination,\n isOpen,\n}: PropsWithChildren<PortalProps>): ReactPortal | null => {\n const [portalDestination, setPortalDestination] = useState<Element | null>(null);\n\n useLayoutEffect(() => {\n const destination = getPortalDestination();\n if (!destination || !isOpen) return;\n setPortalDestination(destination);\n }, [getPortalDestination, isOpen]);\n\n if (!portalDestination) return null;\n\n return createPortal(children, portalDestination);\n};\n","import clsx from 'clsx';\nimport type { PropsWithChildren } from 'react';\nimport React, { useCallback, useEffect, useState } from 'react';\nimport { useDialogIsOpen, useOpenedDialogCount } from '../hooks';\nimport { Portal } from '../../Portal/Portal';\nimport {\n modalDialogManagerId,\n useDialogManager,\n useNearestDialogManagerContext,\n} from '../../../context';\n\nconst shouldCloseOnOutsideClick = ({\n dialog,\n managerCloseOnClickOutside,\n}: {\n dialog: { closeOnClickOutside?: boolean };\n managerCloseOnClickOutside: boolean;\n}) => dialog.closeOnClickOutside ?? managerCloseOnClickOutside;\n\nexport type DialogPortalDestinationProps = {\n captureOutsideClicks?: boolean;\n className?: string;\n};\n\nexport const DialogPortalDestination = ({\n captureOutsideClicks,\n className,\n}: DialogPortalDestinationProps) => {\n const { dialogManager } = useNearestDialogManagerContext() ?? {};\n const openedDialogCount = useOpenedDialogCount({ dialogManagerId: dialogManager?.id });\n const [destinationRoot, setDestinationRoot] = useState<HTMLDivElement | null>(null);\n\n // Handle clicks outside dialog contents.\n // Clicks on the overlay itself or outside it close open dialogs;\n // only clicks on dialog contents (descendants) are ignored.\n useEffect(() => {\n if (!destinationRoot || !dialogManager) return;\n\n const handleDocumentClick = (event: MouseEvent) => {\n const target = event.target as Node;\n const clickedOverlay = (target as HTMLElement).closest?.(\n '[data-str-chat__portal-id]',\n );\n if (clickedOverlay && clickedOverlay !== destinationRoot) return;\n if (target !== destinationRoot && destinationRoot.contains(target)) return;\n // Defer so target onClick handlers (e.g. context-menu toggle buttons) can run first.\n setTimeout(() => {\n Object.values(dialogManager.state.getLatestValue().dialogsById).forEach(\n (dialog) => {\n if (!dialog.isOpen) return;\n if (\n !shouldCloseOnOutsideClick({\n dialog,\n managerCloseOnClickOutside: dialogManager.closeOnClickOutside,\n })\n )\n return;\n dialogManager.close(dialog.id);\n },\n );\n }, 0);\n };\n\n document.addEventListener('click', handleDocumentClick, { capture: true });\n\n return () => {\n document.removeEventListener('click', handleDocumentClick, { capture: true });\n };\n }, [destinationRoot, dialogManager]);\n\n if (!openedDialogCount) return null;\n\n const isModalDialogManager = dialogManager?.id === modalDialogManagerId;\n\n return (\n <div\n className={clsx(\n 'str-chat__dialog-overlay',\n {\n 'str-chat__dialog-overlay--modal': isModalDialogManager,\n 'str-chat__dialog-overlay--with-outside-click-capture': captureOutsideClicks,\n },\n className,\n )}\n data-str-chat__portal-id={dialogManager?.id}\n data-testid='str-chat__dialog-overlay'\n ref={setDestinationRoot}\n style={\n {\n '--str-chat__dialog-overlay-height': openedDialogCount > 0 ? '100%' : '0',\n } as React.CSSProperties\n }\n />\n );\n};\n\ntype DialogPortalEntryProps = {\n dialogId: string;\n dialogManagerId?: string;\n};\n\nexport const DialogPortalEntry = ({\n children,\n dialogId,\n dialogManagerId,\n}: PropsWithChildren<DialogPortalEntryProps>) => {\n const { dialogManager } = useDialogManager({ dialogId, dialogManagerId });\n const dialogIsOpen = useDialogIsOpen(dialogId, dialogManagerId);\n\n const getPortalDestination = useCallback(\n () => document.querySelector(`div[data-str-chat__portal-id=\"${dialogManager.id}\"]`),\n [dialogManager.id],\n );\n\n return (\n <Portal getPortalDestination={getPortalDestination} isOpen={dialogIsOpen}>\n {children}\n </Portal>\n );\n};\n","import React, {\n type PropsWithChildren,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport { StateStore } from 'stream-chat';\n\nimport { DialogManager } from '../components/Dialog/service/DialogManager';\nimport {\n DialogPortalDestination,\n type DialogPortalDestinationProps,\n} from '../components/Dialog/service/DialogPortal';\nimport type { PropsWithChildrenOnly } from '../types/types';\n\ntype DialogManagerId = string;\n\ntype DialogManagersState = Record<DialogManagerId, DialogManager | undefined>;\nconst dialogManagersRegistry: StateStore<DialogManagersState> = new StateStore({});\n\nconst getDialogManager = (id: string): DialogManager | undefined =>\n dialogManagersRegistry.getLatestValue()[id];\n\nconst getOrCreateDialogManager = ({\n closeOnClickOutside,\n id,\n}: {\n closeOnClickOutside?: boolean;\n id: string;\n}) => {\n let manager = getDialogManager(id);\n if (!manager) {\n manager = new DialogManager({ closeOnClickOutside, id });\n dialogManagersRegistry.partialNext({ [id]: manager });\n } else if (typeof closeOnClickOutside === 'boolean') {\n manager.closeOnClickOutside = closeOnClickOutside;\n }\n return manager;\n};\n\nconst removeDialogManager = (id: string) => {\n if (!getDialogManager(id)) return;\n dialogManagersRegistry.partialNext({ [id]: undefined });\n};\n\ntype DialogManagerProviderContextValue = {\n dialogManager: DialogManager;\n};\n\nconst DialogManagerProviderContext = React.createContext<\n DialogManagerProviderContextValue | undefined\n>(undefined);\n\ntype DialogManagerProviderProps = PropsWithChildren<{\n /**\n * Manager-level outside click policy.\n * When `true`, clicking overlay or outside overlay-covered area closes all dialogs\n * in this manager. When `false`, outside clicks do not dismiss dialogs.\n */\n closeOnClickOutside?: boolean;\n portalDestinationProps?: DialogPortalDestinationProps;\n id?: string;\n}>;\n\n/**\n * Creates/provides a dialog manager and its portal destination.\n */\nexport const DialogManagerProvider = ({\n children,\n closeOnClickOutside,\n id,\n portalDestinationProps,\n}: DialogManagerProviderProps) => {\n const [dialogManager, setDialogManager] = useState<DialogManager | null>(() => {\n if (id) return getDialogManager(id) ?? null;\n return new DialogManager({ closeOnClickOutside }); // will not be included in the registry\n });\n\n useEffect(() => {\n if (!id) return;\n setDialogManager(getOrCreateDialogManager({ closeOnClickOutside, id }));\n return () => {\n removeDialogManager(id);\n setDialogManager(null);\n };\n }, [closeOnClickOutside, id]);\n\n // temporarily do not render until a new dialog manager is created\n if (!dialogManager) return null;\n\n return (\n <DialogManagerProviderContext.Provider value={{ dialogManager }}>\n {children}\n <DialogPortalDestination {...portalDestinationProps} />\n </DialogManagerProviderContext.Provider>\n );\n};\n\nexport type UseDialogManagerParams = {\n dialogId?: string;\n dialogManagerId?: string;\n};\n\nconst getManagerFromStore = ({\n dialogId,\n dialogManagerId,\n newState,\n previousState,\n}: UseDialogManagerParams & {\n newState: DialogManagersState;\n previousState: DialogManagersState | undefined;\n}) => {\n let managerInNewState: DialogManager | undefined;\n let managerInPrevState: DialogManager | undefined;\n if (dialogManagerId) {\n if (!dialogId) {\n managerInNewState = newState[dialogManagerId];\n managerInPrevState = previousState?.[dialogManagerId];\n } else {\n if (newState[dialogManagerId]?.get(dialogId)) {\n managerInNewState = newState[dialogManagerId];\n }\n if (previousState?.[dialogManagerId]?.get(dialogId)) {\n managerInPrevState = previousState[dialogManagerId];\n }\n }\n } else if (dialogId) {\n managerInNewState = Object.values(newState).find(\n (dialogMng) => dialogId && dialogMng?.get(dialogId),\n );\n managerInPrevState =\n previousState &&\n Object.values(previousState).find(\n (dialogMng) => dialogId && dialogMng?.get(dialogId),\n );\n }\n\n return { managerInNewState, managerInPrevState };\n};\n\n/**\n * Retrieves the nearest dialog manager or searches for the dialog manager by dialog manager id or dialog id.\n * Dialog id will take precedence over dialog manager id if both are provided and dialog manager is found by dialog id.\n */\nexport const useDialogManager = ({\n dialogId,\n dialogManagerId,\n}: UseDialogManagerParams = {}) => {\n const nearestDialogManagerContext = useContext(DialogManagerProviderContext);\n\n const [dialogManagerContext, setDialogManagerContext] = useState<\n DialogManagerProviderContextValue | undefined\n >(() => {\n const { managerInNewState } = getManagerFromStore({\n dialogId,\n dialogManagerId,\n newState: dialogManagersRegistry.getLatestValue(),\n previousState: undefined,\n });\n return managerInNewState\n ? { dialogManager: managerInNewState }\n : nearestDialogManagerContext;\n });\n\n useEffect(() => {\n if (!dialogId && !dialogManagerId) return;\n const unsubscribe = dialogManagersRegistry.subscribeWithSelector(\n (state) => state,\n (newState, previousState) => {\n const { managerInNewState, managerInPrevState } = getManagerFromStore({\n dialogId,\n dialogManagerId,\n newState,\n previousState,\n });\n\n if (!managerInPrevState || managerInNewState?.id !== managerInPrevState.id) {\n setDialogManagerContext((prevState) => {\n if (prevState?.dialogManager.id === managerInNewState?.id) return prevState;\n // fixme: need to handle the possibility that the dialogManager is undefined\n return {\n dialogManager:\n managerInNewState || nearestDialogManagerContext?.dialogManager,\n } as DialogManagerProviderContextValue;\n });\n }\n },\n );\n return () => {\n unsubscribe();\n };\n }, [dialogId, dialogManagerId, nearestDialogManagerContext?.dialogManager]);\n\n if (!dialogManagerContext?.dialogManager) {\n console.warn(\n `Dialog manager (manager id: ${dialogManagerId}, dialog id: ${dialogId}) is not available`,\n );\n }\n\n return dialogManagerContext as DialogManagerProviderContextValue;\n};\n\nexport const modalDialogManagerId = 'modal-dialog-manager' as const;\n\nexport const ModalDialogManagerProvider = ({ children }: PropsWithChildrenOnly) => (\n <DialogManagerProvider id={modalDialogManagerId}>{children}</DialogManagerProvider>\n);\n\nexport const useModalDialogManager = () =>\n useMemo(() => getDialogManager(modalDialogManagerId), []);\n\nexport const useNearestDialogManagerContext = () =>\n useContext(DialogManagerProviderContext);\n","import type { PropsWithChildren } from 'react';\nimport React, { useContext } from 'react';\n\nimport type {\n DeleteMessageOptions,\n LocalMessage,\n Mute,\n ReactionResponse,\n ReactionSort,\n UserResponse,\n} from 'stream-chat';\n\nimport type { ChannelActionContextValue } from './ChannelActionContext';\n\nimport type { ActionHandlerReturnType } from '../components/Message/hooks/useActionHandler';\nimport type { ReactEventHandler } from '../components/Message/types';\nimport type { MessageActionsArray } from '../components/Message/utils';\nimport type { GroupStyle } from '../components/MessageList/utils';\nimport type { ReactionsComparator, ReactionType } from '../components/Reactions/types';\n\nimport type { RenderTextFunction } from '../components/Message/renderText';\n\nexport type MessageContextValue = {\n /** If actions such as edit, delete, flag, mute are enabled on Message */\n actionsEnabled: boolean;\n /**\n * Returns all allowed actions on message by current user e.g., ['edit', 'delete', 'flag', 'mute', 'pin', 'quote', 'react', 'reply'].\n * Please check [Message](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Message.tsx) component for default implementation.\n */\n getMessageActions: () => MessageActionsArray<string>;\n /** Function to send an action in a Channel */\n handleAction: ActionHandlerReturnType;\n /** Function to delete a message in a Channel */\n handleDelete: (options?: DeleteMessageOptions) => Promise<void> | void;\n /** Function to fetch the message reactions */\n handleFetchReactions: (\n reactionType?: ReactionType,\n sort?: ReactionSort,\n ) => Promise<Array<ReactionResponse>>;\n /** Function to flag a message in a Channel */\n handleFlag: ReactEventHandler;\n /** Function to mark message and the messages that follow it as unread in a Channel */\n handleMarkUnread: ReactEventHandler;\n /** Function to mute a user in a Channel */\n handleMute: ReactEventHandler;\n /** Function to open a Thread on a Message */\n handleOpenThread: ReactEventHandler;\n /** Function to pin a Message in a Channel */\n handlePin: ReactEventHandler;\n /** Function to post a reaction on a Message */\n handleReaction: (\n reactionType: string,\n event: React.BaseSyntheticEvent,\n ) => Promise<void>;\n /** Function to retry sending a Message */\n handleRetry: ChannelActionContextValue['retrySendMessage'];\n /** Function that returns whether the Message belongs to the current user */\n isMyMessage: () => boolean;\n /** The message object */\n message: LocalMessage;\n /** Indicates whether a message has not been read yet or has been marked unread */\n messageIsUnread: boolean;\n /** Handler function for a click event on an @mention in Message */\n onMentionsClickMessage: ReactEventHandler;\n /** Handler function for a hover event on an @mention in Message */\n onMentionsHoverMessage: ReactEventHandler;\n /** Handler function for a click event on the user that posted the Message */\n onUserClick: ReactEventHandler;\n /** Handler function for a hover event on the user that posted the Message */\n onUserHover: ReactEventHandler;\n /** Call this function to keep message list scrolled to the bottom when the scroll height increases, e.g. an element appears below the last message (only used in the `VirtualizedMessageList`) */\n autoscrollToBottom?: () => void;\n /** Message component configuration prop. If true, picking a reaction from the `ReactionSelector` component will close the selector */\n closeReactionSelectorOnClick?: boolean;\n /** An array of user IDs that have confirmed the message delivery to their device */\n deliveredTo?: UserResponse[];\n /** If true, the message is the last one in a group sent by a specific user (only used in the `VirtualizedMessageList`) */\n endOfGroup?: boolean;\n /** If true, the message is the first one in a group sent by a specific user (only used in the `VirtualizedMessageList`) */\n firstOfGroup?: boolean;\n /** Override the default formatting of the date. This is a function that has access to the original date object, returns a string */\n formatDate?: (date: Date) => string;\n /** If true, group messages sent by each user (only used in the `VirtualizedMessageList`) */\n groupedByUser?: boolean;\n /** A list of styles to apply to this message, ie. top, bottom, single */\n groupStyles?: GroupStyle[];\n /** Whether to highlight and focus the message on load */\n highlighted?: boolean;\n /** Whether the threaded message is the first in the thread list */\n initialMessage?: boolean;\n /**\n * A factory function that determines whether a message is AI generated or not.\n */\n isMessageAIGenerated?: (message: LocalMessage) => boolean;\n /** Latest own message in currently displayed message set. */\n lastOwnMessage?: LocalMessage;\n /** Latest message id on current channel */\n lastReceivedId?: string | null;\n /** DOMRect object for parent MessageList component */\n messageListRect?: DOMRect;\n /** Array of muted users coming from [ChannelStateContext](https://getstream.io/chat/docs/sdk/react/contexts/channel_state_context/#mutes) */\n mutes?: Mute[];\n /** Sort options to provide to a reactions query */\n reactionDetailsSort?: ReactionSort;\n /** A list of users that have read this Message */\n readBy?: UserResponse[];\n /** When set, shows the sender avatar in a grid layout. Values: true | 'incoming' | 'outgoing'. */\n showAvatar?: boolean | 'incoming' | 'outgoing';\n /** Custom function to render message text content, defaults to the renderText function: [utils](https://github.com/GetStream/stream-chat-react/blob/master/src/utils.tsx) */\n renderText?: RenderTextFunction;\n /** Keep track of read receipts for each message sent by the user. When disabled, only the last own message delivery / read status is rendered. */\n returnAllReadData?: boolean;\n /** Comparator function to sort reactions, defaults to chronological order */\n sortReactions?: ReactionsComparator;\n /** Whether or not the Message is in a Thread */\n threadList?: boolean;\n /** render HTML instead of markdown. Posting HTML is only allowed server-side */\n unsafeHTML?: boolean;\n /**\n * User-specific view for translated messages: which text to show.\n * - `'original'`: show `message.text` (source language).\n * - `'translated'`: show the translation for the **current user language** (from\n * `useTranslationContext().userLanguage`), i.e. `message.i18n[userLanguage + '_text']`\n * or fallback to `message.text` when missing. Resolved via `getTranslatedMessageText`.\n */\n translationView?: 'original' | 'translated';\n /** Set whether this message shows original or translated text (user-specific, does not change message data). */\n setTranslationView?: (view: 'original' | 'translated') => void;\n};\n\nexport const MessageContext = React.createContext<MessageContextValue | undefined>(\n undefined,\n);\n\nexport const MessageProvider = ({\n children,\n value,\n}: PropsWithChildren<{\n value: MessageContextValue;\n}>) => (\n <MessageContext.Provider value={value as unknown as MessageContextValue}>\n {children}\n </MessageContext.Provider>\n);\n\nexport const useMessageContext = (\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _componentName?: string,\n) => {\n const contextValue = useContext(MessageContext);\n\n if (!contextValue) {\n return {} as MessageContextValue;\n }\n\n return contextValue as unknown as MessageContextValue;\n};\n","import type { PropsWithChildren } from 'react';\nimport React, { useContext } from 'react';\n\nexport type ModalContextValue = {\n close: () => void;\n dialogId?: string;\n};\n\nexport const ModalContext = React.createContext<ModalContextValue | undefined>(undefined);\n\nexport const ModalContextProvider = ({\n children,\n value,\n}: PropsWithChildren<{\n value: ModalContextValue;\n}>) => <ModalContext.Provider value={value}>{children}</ModalContext.Provider>;\n\nexport const useModalContext = () => {\n const contextValue = useContext(ModalContext);\n\n if (!contextValue) {\n console.warn(\n `The useModalContext hook was called outside of the ModalContext provider. Make sure this hook is called within a child of the GlobalModal.`,\n );\n\n return { close: () => null };\n }\n\n return contextValue;\n};\n","import Dayjs from 'dayjs';\nimport type { Duration as DayjsDuration } from 'dayjs/plugin/duration.js';\n\nimport type { TFunction } from 'i18next';\nimport type { Moment } from 'moment-timezone';\nimport type {\n DateFormatterOptions,\n DurationFormatterOptions,\n PredefinedFormatters,\n SupportedTranslations,\n TDateTimeParserInput,\n TDateTimeParserOutput,\n TimestampFormatterOptions,\n} from './types';\n\nexport const notValidDateWarning =\n 'MessageTimestamp was called without a message, or message has invalid created_at date.';\nexport const noParsingFunctionWarning =\n 'MessageTimestamp was called but there is no datetime parsing function available';\n\nexport const isNumberOrString = (\n output: TDateTimeParserOutput,\n): output is number | string => typeof output === 'string' || typeof output === 'number';\n\nexport const isDayOrMoment = (\n output: TDateTimeParserOutput,\n): output is Dayjs.Dayjs | Moment => !!(output as Dayjs.Dayjs | Moment)?.isSame;\n\nexport const isDate = (output: unknown): output is Date =>\n output !== null &&\n typeof output === 'object' &&\n typeof (output as Date).getTime === 'function';\n\nconst DEFAULT_RELATIVE_COMPACT_MAX_DAYS = 6;\nconst DEFAULT_RELATIVE_COMPACT_MAX_WEEKS = 3;\n\n/**\n * Turns a date into a short, readable label: \"Today\", \"Yesterday\", \"2d ago\", \"1w ago\",\n * or a calendar date (DD/MM/YY) for older or future dates.\n *\n * What appears for each period:\n * - Same day → \"Today\"\n * - Yesterday → \"Yesterday\"\n * - 2 to maxDays days ago → \"2d ago\", \"3d ago\", … \"Nd ago\"\n * - If maxWeeks is greater than 0: 1 to maxWeeks weeks ago → \"1w ago\", \"2w ago\", …\n * - Anything older (or in the future) → calendar date\n *\n * To change the wording or which label is used, add these to your locale JSON (example in English):\n *\n * \"timestamp/relativeToday\": \"Today\",\n * \"timestamp/relativeYesterday\": \"Yesterday\",\n * \"timestamp/relativeDaysAgo\": \"{{ count }}d ago\",\n * \"timestamp/relativeWeeksAgo\": \"{{ count }}w ago\",\n *\n * To use this style for a timestamp (e.g. poll votes), add for example:\n *\n * \"timestamp/PollVote\": \"{{ timestamp | timestampFormatter(relativeCompact: true) }}\"\n *\n * Only \"Xd ago\", no \"Xw ago\" (anything 7+ days ago shows as a date):\n *\n * \"timestamp/PollVote\": \"{{ timestamp | timestampFormatter(relativeCompact: true; relativeCompactMaxWeeks: 0) }}\"\n *\n * To change how far \"days ago\" and \"weeks ago\" go: use relativeCompactMaxDays and\n * relativeCompactMaxWeeks in the formatter (e.g. relativeCompactMaxWeeks: 2 for only 1w and 2w ago).\n */\nfunction getRelativeCompactDateString(\n messageCreatedAt: string | Date,\n t: TFunction,\n tDateTimeParser: (input?: TDateTimeParserInput) => TDateTimeParserOutput,\n maxDays: number = DEFAULT_RELATIVE_COMPACT_MAX_DAYS,\n maxWeeks: number = DEFAULT_RELATIVE_COMPACT_MAX_WEEKS,\n): string | null {\n const then = tDateTimeParser(messageCreatedAt);\n if (!isDayOrMoment(then)) return null;\n const now = tDateTimeParser(new Date().toISOString());\n if (!isDayOrMoment(now)) return null;\n const diffDays = (now as Dayjs.Dayjs)\n .startOf('day')\n .diff((then as Dayjs.Dayjs).startOf('day'), 'day');\n if (diffDays < 0) {\n return (then as Dayjs.Dayjs).format('DD/MM/YY');\n }\n if (diffDays === 0) return t('timestamp/relativeToday');\n if (diffDays === 1) return t('timestamp/relativeYesterday');\n if (diffDays >= 2 && diffDays <= maxDays)\n return t('timestamp/relativeDaysAgo', { count: diffDays });\n if (maxWeeks > 0) {\n const maxDaysForWeeks = maxWeeks * 7;\n if (diffDays >= 7 && diffDays <= maxDaysForWeeks) {\n const weeks = Math.ceil(diffDays / 7);\n return t('timestamp/relativeWeeksAgo', { count: weeks });\n }\n }\n return (then as Dayjs.Dayjs).format('DD/MM/YY');\n}\n\nexport function getDateString({\n calendar,\n calendarFormats,\n format,\n formatDate,\n messageCreatedAt,\n relativeCompact,\n relativeCompactMaxDays,\n relativeCompactMaxWeeks,\n t,\n tDateTimeParser,\n timestampTranslationKey,\n}: DateFormatterOptions): string | number | null {\n if (\n !messageCreatedAt ||\n (typeof messageCreatedAt === 'string' && !Date.parse(messageCreatedAt))\n ) {\n // TODO: replace with proper logging (@stream-io/logger)\n // console.warn(notValidDateWarning);\n return null;\n }\n\n if (typeof formatDate === 'function') {\n return formatDate(new Date(messageCreatedAt));\n }\n\n if (relativeCompact && t && tDateTimeParser) {\n const maxDays =\n typeof relativeCompactMaxDays === 'number'\n ? relativeCompactMaxDays\n : typeof relativeCompactMaxDays === 'string'\n ? parseInt(relativeCompactMaxDays, 10)\n : DEFAULT_RELATIVE_COMPACT_MAX_DAYS;\n const maxWeeks =\n typeof relativeCompactMaxWeeks === 'number'\n ? relativeCompactMaxWeeks\n : typeof relativeCompactMaxWeeks === 'string'\n ? parseInt(relativeCompactMaxWeeks, 10)\n : DEFAULT_RELATIVE_COMPACT_MAX_WEEKS;\n const result = getRelativeCompactDateString(\n messageCreatedAt,\n t,\n tDateTimeParser,\n Number.isNaN(maxDays) ? DEFAULT_RELATIVE_COMPACT_MAX_DAYS : maxDays,\n Number.isNaN(maxWeeks) ? DEFAULT_RELATIVE_COMPACT_MAX_WEEKS : maxWeeks,\n );\n if (result) return result;\n }\n\n if (t && timestampTranslationKey) {\n const options: TimestampFormatterOptions = {};\n if (typeof calendar !== 'undefined' && calendar !== null) options.calendar = calendar;\n if (typeof calendarFormats !== 'undefined' && calendarFormats !== null)\n options.calendarFormats = calendarFormats;\n if (typeof format !== 'undefined' && format !== null) options.format = format;\n\n const translatedTimestamp = t(timestampTranslationKey, {\n ...options,\n timestamp: new Date(messageCreatedAt),\n });\n const translationKeyFound = timestampTranslationKey !== translatedTimestamp;\n if (translationKeyFound) return translatedTimestamp;\n }\n\n if (!tDateTimeParser) {\n // TODO: replace with proper logging (@stream-io/logger)\n // console.warn(noParsingFunctionWarning);\n return null;\n }\n\n const parsedTime = tDateTimeParser(messageCreatedAt);\n\n if (isDayOrMoment(parsedTime)) {\n /**\n * parsedTime.calendar is guaranteed on the type but is only\n * available when a user calls dayjs.extend(calendar)\n */\n return calendar && parsedTime.calendar\n ? parsedTime.calendar(undefined, calendarFormats || undefined)\n : parsedTime.format(format || undefined);\n }\n\n if (isDate(parsedTime)) {\n return parsedTime.toDateString();\n }\n\n if (isNumberOrString(parsedTime)) {\n return parsedTime;\n }\n\n return null;\n}\n\nexport const predefinedFormatters: PredefinedFormatters = {\n durationFormatter:\n (streamI18n) =>\n (value, _, { format, withSuffix }: DurationFormatterOptions) => {\n // NOTE: isDayjs is not exported in \"dayjs\" package for ESM, hence we access\n // `isDayjs` from Dayjs instance\n // dayjs's `.duration(value)` accepts both number and string at runtime,\n // but its TS signature post-1.11 narrowed to string only — cast through\n // unknown to keep callers passing a numeric value as before.\n const durationValue = value as unknown as string;\n if (format && Dayjs.isDayjs(streamI18n.DateTimeParser)) {\n return (\n streamI18n.DateTimeParser.duration(durationValue) as DayjsDuration\n ).format(format);\n }\n return streamI18n.DateTimeParser.duration(durationValue).humanize(!!withSuffix);\n },\n timestampFormatter:\n (streamI18n) =>\n (\n value,\n _,\n {\n calendarFormats,\n ...options\n }: Pick<\n TimestampFormatterOptions,\n | 'calendar'\n | 'format'\n | 'relativeCompact'\n | 'relativeCompactMaxDays'\n | 'relativeCompactMaxWeeks'\n > & {\n calendarFormats?: Record<string, string> | string;\n },\n ) => {\n let parsedCalendarFormats;\n try {\n if (!options.calendar) {\n parsedCalendarFormats = {};\n } else if (typeof calendarFormats === 'string') {\n parsedCalendarFormats = JSON.parse(calendarFormats);\n } else if (typeof calendarFormats === 'object') {\n parsedCalendarFormats = calendarFormats;\n }\n } catch (e) {\n console.error('[TIMESTAMP FORMATTER]', e);\n }\n\n const result = getDateString({\n ...options,\n calendarFormats: parsedCalendarFormats,\n messageCreatedAt: value,\n t: streamI18n.t,\n tDateTimeParser: streamI18n.tDateTimeParser,\n });\n if (!result || typeof result === 'number') {\n return JSON.stringify(value);\n }\n return result;\n },\n};\n\nexport const defaultTranslatorFunction = ((key: string) => key) as TFunction;\n\nexport const defaultDateTimeParser = (input?: TDateTimeParserInput) => Dayjs(input);\n\nexport const isLanguageSupported = (\n language: string,\n): language is SupportedTranslations => {\n const translations = [\n 'de',\n 'en',\n 'es',\n 'fr',\n 'hi',\n 'it',\n 'ja',\n 'ko',\n 'nl',\n 'pt',\n 'ru',\n 'tr',\n ];\n return translations.some((translation) => language === translation);\n};\n","import React, { useContext } from 'react';\nimport Dayjs from 'dayjs';\nimport calendar from 'dayjs/plugin/calendar.js';\nimport localizedFormat from 'dayjs/plugin/localizedFormat.js';\nimport type { PropsWithChildren } from 'react';\nimport type { TFunction } from 'i18next';\nimport type { TranslationLanguages } from 'stream-chat';\n\nimport { defaultDateTimeParser, defaultTranslatorFunction } from '../i18n/utils';\nimport type { TDateTimeParser } from '../i18n/types';\n\nDayjs.extend(calendar);\nDayjs.extend(localizedFormat);\n\nexport type TranslationContextValue = {\n t: TFunction;\n tDateTimeParser: TDateTimeParser;\n userLanguage: TranslationLanguages;\n};\n\nexport const TranslationContext = React.createContext<TranslationContextValue>({\n t: defaultTranslatorFunction,\n tDateTimeParser: defaultDateTimeParser,\n userLanguage: 'en',\n});\n\nexport const TranslationProvider = ({\n children,\n value,\n}: PropsWithChildren<{ value: TranslationContextValue }>) => (\n <TranslationContext.Provider value={value}>{children}</TranslationContext.Provider>\n);\n\nexport const useTranslationContext = (componentName?: string) => {\n const contextValue = useContext(TranslationContext);\n\n if (!contextValue) {\n console.warn(\n `The useTranslationContext hook was called outside of the TranslationContext provider. Make sure this hook is called within a child of the Chat component. The errored call is located in the ${componentName} component.`,\n );\n\n return {} as TranslationContextValue;\n }\n\n return contextValue;\n};\n","import React, { useContext } from 'react';\nimport type { PropsWithChildren } from 'react';\n\nimport type { ChannelState as StreamChannelState } from 'stream-chat';\n\nexport type TypingContextValue = {\n typing?: StreamChannelState['typing'];\n};\n\nexport const TypingContext = React.createContext<TypingContextValue | undefined>(\n undefined,\n);\n\nexport const TypingProvider = ({\n children,\n value,\n}: PropsWithChildren<{\n value: TypingContextValue;\n}>) => (\n <TypingContext.Provider value={value as unknown as TypingContextValue}>\n {children}\n </TypingContext.Provider>\n);\n\nexport const useTypingContext = (componentName?: string) => {\n const contextValue = useContext(TypingContext);\n\n if (!contextValue) {\n console.warn(\n `The useTypingContext hook was called outside of the TypingContext provider. Make sure this hook is called within a child of the Channel component. The errored call is located in the ${componentName} component.`,\n );\n\n return {} as TypingContextValue;\n }\n\n return contextValue as TypingContextValue;\n};\n","import { createContext, useContext } from 'react';\n\nimport type { AriaLivePriority } from './useAriaLiveAnnouncer';\n\nexport type LiveAnnouncement = {\n id: number;\n message: string;\n};\n\nexport type AnnouncementsByPriority = {\n [key in AriaLivePriority]: LiveAnnouncement[];\n};\n\n/**\n * Internal coordination context between {@link AriaLiveAnnouncerProvider} (which owns the\n * announcement state and the outlet stack) and the {@link AriaLiveOutlet}s that render the\n * live regions. Not part of the public API — consumers announce via `useAriaLiveAnnouncer`.\n */\nexport type AriaLiveOutletContextValue = {\n /** The id of the single outlet that should currently render the live regions. */\n activeOutletId: symbol | null;\n /** Current announcements grouped by aria-live priority. */\n announcementsByPriority: AnnouncementsByPriority;\n /** Register an outlet. Higher `layer` wins; ties resolve to the most recently registered. */\n registerOutlet: (id: symbol, layer: number) => void;\n unregisterOutlet: (id: symbol) => void;\n};\n\nexport const AriaLiveOutletContext = createContext<\n AriaLiveOutletContextValue | undefined\n>(undefined);\n\nexport const useAriaLiveOutletContext = () => useContext(AriaLiveOutletContext);\n","import { createContext, useContext } from 'react';\n\nexport type AriaLivePriority = 'assertive' | 'polite';\n\nexport type AriaLiveAnnounceOptions = {\n priority?: AriaLivePriority;\n /**\n * Delay (ms) before the message is placed in the live region. Use to let a competing\n * screen-reader utterance settle first — e.g. a dialog-identity announcement made while a\n * field is being auto-focused is otherwise superseded by the field's focus announcement.\n * Omitted/0 announces immediately.\n */\n delayMs?: number;\n /**\n * When set, an identical `message` is announced at most once per this window (ms); a repeat\n * within the window is suppressed (returns a no-op cancel). The window starts when the message\n * is actually announced. Guards against duplicate announcements — e.g. an effect double-invoked\n * by React StrictMode, or rapid re-renders firing the same message.\n */\n dedupeMs?: number;\n};\n\n/**\n * Announce `message` to assistive technology. Delivery is controlled by an options object\n * (`priority` defaults to `'polite'`). Returns a `cancel` function: for a delayed announcement it\n * prevents a still-pending message from being announced (call it from effect cleanup so a closing\n * surface does not announce after unmount); for an immediate announcement it is a no-op.\n */\nexport type AriaLiveAnnounce = (\n message: string,\n options?: AriaLiveAnnounceOptions,\n) => () => void;\n\nexport type AriaLiveAnnouncerContextValue = {\n announce: AriaLiveAnnounce;\n};\n\nconst noopAnnounce: AriaLiveAnnounce = () => () => undefined;\n\nexport const AriaLiveAnnouncerContext = createContext<\n AriaLiveAnnouncerContextValue | undefined\n>(undefined);\n\nexport const useAriaLiveAnnouncer = () => {\n const contextValue = useContext(AriaLiveAnnouncerContext);\n\n if (!contextValue) {\n console.warn(\n 'The useAriaLiveAnnouncer hook was called outside of an AriaLiveAnnouncerProvider.',\n );\n\n return noopAnnounce;\n }\n\n return contextValue.announce;\n};\n","import React, { type ComponentPropsWithoutRef, type CSSProperties } from 'react';\n\nexport type VisuallyHiddenProps = ComponentPropsWithoutRef<'span'>;\n\nconst visuallyHiddenStyle: CSSProperties = {\n border: 0,\n clip: 'rect(0, 0, 0, 0)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: 0,\n position: 'absolute',\n whiteSpace: 'nowrap',\n width: '1px',\n};\n\n/**\n * Hides content visually while preserving it for assistive technologies.\n */\nexport const VisuallyHidden = ({ children, style, ...rest }: VisuallyHiddenProps) => (\n <span {...rest} style={{ ...visuallyHiddenStyle, ...style }}>\n {children}\n </span>\n);\n","import React, { useCallback, useEffect, useRef } from 'react';\n\nimport { useAriaLiveOutletContext } from './AriaLiveOutletContext';\nimport { Portal } from '../Portal/Portal';\nimport { VisuallyHidden } from '../VisuallyHidden';\n\nexport type AriaLiveOutletProps = {\n /**\n * Stacking layer. The {@link AriaLiveAnnouncerProvider} renders into the highest-layer\n * outlet (ties resolve to the most recently registered). Outlets inside an `aria-modal`\n * subtree must use a layer above the root outlet so announcements land inside the modal\n * (assistive technologies suppress live regions outside the active modal). Defaults to `0`.\n */\n layer?: number;\n /**\n * When true, render the live region into a `document.body` portal instead of in place.\n * Use for the root outlet; modal outlets must render in place (omit) so they stay inside\n * the `aria-modal` subtree.\n */\n portal?: boolean;\n};\n\n/**\n * Dumb render target for the unified announcer. Registers itself with the nearest\n * {@link AriaLiveAnnouncerProvider} and renders the polite/assertive live regions ONLY when\n * it is the active (innermost) outlet, so exactly one region is live at a time — always in\n * the active accessibility-tree scope. Mount one at the `Chat` root and one inside each\n * `aria-modal` dialog (with a higher `layer`).\n */\nexport const AriaLiveOutlet = ({ layer = 0, portal = false }: AriaLiveOutletProps) => {\n const context = useAriaLiveOutletContext();\n\n const idRef = useRef<symbol | null>(null);\n if (idRef.current === null) {\n idRef.current = Symbol('aria-live-outlet');\n }\n\n const registerOutlet = context?.registerOutlet;\n const unregisterOutlet = context?.unregisterOutlet;\n\n useEffect(() => {\n const id = idRef.current;\n if (!id || !registerOutlet || !unregisterOutlet) return;\n\n registerOutlet(id, layer);\n return () => unregisterOutlet(id);\n }, [layer, registerOutlet, unregisterOutlet]);\n\n const getPortalDestination = useCallback(() => document.body, []);\n\n if (!context || context.activeOutletId !== idRef.current) return null;\n\n const { announcementsByPriority } = context;\n\n const liveRegions = (\n <VisuallyHidden>\n <div\n aria-atomic='false'\n aria-live='polite'\n aria-relevant='additions'\n data-testid='str-chat__aria-live-region--polite'\n role='status'\n >\n {announcementsByPriority.polite.map((announcement) => (\n <div key={announcement.id}>{announcement.message}</div>\n ))}\n </div>\n <div\n aria-atomic='false'\n aria-live='assertive'\n aria-relevant='additions'\n data-testid='str-chat__aria-live-region--assertive'\n role='alert'\n >\n {announcementsByPriority.assertive.map((announcement) => (\n <div key={announcement.id}>{announcement.message}</div>\n ))}\n </div>\n </VisuallyHidden>\n );\n\n if (!portal) return liveRegions;\n\n return (\n <Portal getPortalDestination={getPortalDestination} isOpen>\n {liveRegions}\n </Portal>\n );\n};\n","import { useCallback, useEffect, useRef } from 'react';\n\nimport type { AriaLiveAnnounce, AriaLivePriority } from '../useAriaLiveAnnouncer';\n\nexport type DebouncedAnnounceResult = {\n /**\n * Schedule an announcement on the channel identified by `key`. Each call on the same key\n * resets that key's timer, so only the last call within its `delayMs` fires. Different keys\n * debounce independently — scheduling key `a` never cancels a pending key `b`, and each may\n * use its own `delayMs`.\n */\n announce: (\n key: string,\n message: string,\n delayMs: number,\n priority?: AriaLivePriority,\n ) => void;\n /** Cancel pending announcement(s): a single `key`, or all when omitted (also runs on unmount). */\n cancel: (key?: string) => void;\n};\n\n/**\n * L2 scheduling policy: a per-key debounce over the provided `announce` (from\n * `useAriaLiveAnnouncer`). Keeps an independent timer per `key` and takes the delay per call, so\n * distinct rapidly-updating streams can coexist with different debounce windows without clobbering\n * one another (e.g. the autocomplete count, which is a consequence of typing and wants a longer\n * window to clear the screen reader's typing echo, vs. some other future debounced stream). For a\n * single stream, use a constant key.\n *\n * React 17/18/19 compatible — `useCallback`/`useRef`/`useEffect` only. All pending timers are\n * cleared on unmount.\n *\n * ## When to use this vs. {@link useSettledAnnouncement}\n *\n * Both wait out screen-reader noise (the typing echo / field re-read) before speaking, but they\n * model different problems:\n *\n * - **`useDebouncedAnnounce` — an imperative throttle for a value you announce REPEATEDLY.** You\n * call `announce(key, message, ...)` yourself whenever you have a fresh value (from an event\n * handler or effect); rapid calls on a key collapse to the last one. The message typically\n * *changes* each time, it can fire *again and again* (once per pause), and you drive it. Canonical\n * case: the autocomplete result count re-announced as the user keeps typing. It has no notion of\n * \"active\", \"once\", or re-arming — it just throttles whatever you push through it.\n *\n * - **{@link useSettledAnnouncement} — a declarative ONE-SHOT cue for a state change.** You pass\n * `{ active, message, settleKey }`; it announces *once* when `active`, deferred until `settleKey`\n * stops changing, then stays silent until `active` flips back and forth. The message is fixed and\n * the point is \"say this single fact once the UI settles\", not \"announce the latest value\".\n *\n * | | `useDebouncedAnnounce` | `useSettledAnnouncement` |\n * | --- | --- | --- |\n * | Style | Imperative — you call `announce(key, …)` | Declarative — reacts to `{ active, message, settleKey }` |\n * | Repetition | Fires repeatedly, once per pause | Once per `active` epoch (re-arms on reset) |\n * | Message | Typically changes each time | Fixed fact |\n * | Timer reset | Each explicit call | Each `settleKey` change |\n * | Streams | Many, independent per `key` | One logical cue |\n * | Canonical case | Autocomplete count while typing | \"Controls just became available\" |\n *\n * Rule of thumb: announcing the **latest value of a changing thing** → this hook. Announcing a\n * **fixed fact once, after things settle** → `useSettledAnnouncement`.\n */\nexport const useDebouncedAnnounce = (\n announce: AriaLiveAnnounce,\n): DebouncedAnnounceResult => {\n const timersRef = useRef<Map<string, ReturnType<typeof setTimeout>>>(new Map());\n\n // Keep the latest `announce` without changing the debounced callback identity.\n const announceRef = useRef(announce);\n announceRef.current = announce;\n\n const cancel = useCallback((key?: string) => {\n const timers = timersRef.current;\n if (key === undefined) {\n timers.forEach((timerId) => clearTimeout(timerId));\n timers.clear();\n return;\n }\n const timerId = timers.get(key);\n if (timerId !== undefined) {\n clearTimeout(timerId);\n timers.delete(key);\n }\n }, []);\n\n useEffect(() => () => cancel(), [cancel]);\n\n const debouncedAnnounce = useCallback(\n (key: string, message: string, delayMs: number, priority?: AriaLivePriority) => {\n const timers = timersRef.current;\n const existing = timers.get(key);\n if (existing !== undefined) clearTimeout(existing);\n const timerId = setTimeout(() => {\n timers.delete(key);\n announceRef.current(message, { priority });\n }, delayMs);\n timers.set(key, timerId);\n },\n [],\n );\n\n return { announce: debouncedAnnounce, cancel };\n};\n","import React, { useContext, useMemo } from 'react';\n\nimport type { Notification } from 'stream-chat';\nimport type { PropsWithChildrenOnly } from '../../types/types';\nimport type { NotificationTargetPanel } from './notificationTarget';\nimport type { NotificationListFilter } from './NotificationList';\n\nexport type NotificationDisplayFilterParams = {\n /** Fallback panel used by the receiving NotificationList when a notification has no explicit target. */\n fallbackPanel?: NotificationTargetPanel;\n /** Local NotificationList filter. Runs only after the display filter accepts the notification. */\n filter?: NotificationListFilter;\n /** Notification being evaluated after panel/fallback routing matched it to this list. */\n notification: Notification;\n /** Panel of the NotificationList currently evaluating the notification. */\n panel?: NotificationTargetPanel;\n};\n\nexport type NotificationDisplayFilter = (\n params: NotificationDisplayFilterParams,\n) => boolean;\n\nexport type NotificationConfigurationContextValue = {\n displayFilter: NotificationDisplayFilter;\n};\n\nconst defaultNotificationDisplayFilter: NotificationDisplayFilter = () => true;\n\nconst defaultNotificationConfigurationContextValue: NotificationConfigurationContextValue =\n {\n displayFilter: defaultNotificationDisplayFilter,\n };\n\nconst NotificationConfigurationContext =\n React.createContext<NotificationConfigurationContextValue>(\n defaultNotificationConfigurationContextValue,\n );\n\nexport type NotificationConfigurationProviderProps = PropsWithChildrenOnly & {\n displayFilter?: NotificationDisplayFilter;\n};\n\nexport const NotificationConfigurationProvider = ({\n children,\n displayFilter,\n}: NotificationConfigurationProviderProps) => {\n const parentConfiguration = useContext(NotificationConfigurationContext);\n const value = useMemo<NotificationConfigurationContextValue>(\n () => ({\n displayFilter: displayFilter ?? parentConfiguration.displayFilter,\n }),\n [displayFilter, parentConfiguration.displayFilter],\n );\n\n return (\n <NotificationConfigurationContext.Provider value={value}>\n {children}\n </NotificationConfigurationContext.Provider>\n );\n};\n\nexport const useNotificationConfigurationContext = () =>\n useContext(NotificationConfigurationContext);\n","import type { Notification } from 'stream-chat';\n\nconst NOTIFICATION_TARGET_PANELS = [\n 'channel',\n 'thread',\n 'channel-list',\n 'thread-list',\n 'modal',\n] as const;\n\n/**\n * Panel where a notification should be consumed.\n * Use in origin.context.panel when publishing so NotificationList can filter by panel.\n */\nexport type NotificationTargetPanel = (typeof NOTIFICATION_TARGET_PANELS)[number];\n\nexport const isNotificationTargetPanel = (\n value: unknown,\n): value is NotificationTargetPanel =>\n typeof value === 'string' &&\n (NOTIFICATION_TARGET_PANELS as readonly string[]).includes(value);\n\nexport const getNotificationTargetPanel = (\n notification: Notification,\n): NotificationTargetPanel | undefined => {\n const targetTag = notification.tags?.find((tag) => tag.startsWith('target:'));\n if (targetTag) {\n const candidate = targetTag.slice('target:'.length);\n if (isNotificationTargetPanel(candidate)) return candidate;\n }\n const panel = notification.origin.context?.panel;\n return isNotificationTargetPanel(panel) ? panel : undefined;\n};\n\nexport const getNotificationTargetPanels = (\n notification: Notification,\n): NotificationTargetPanel[] => {\n const targetPanels = (notification.tags ?? [])\n .filter((tag) => tag.startsWith('target:'))\n .map((tag) => tag.slice('target:'.length))\n .filter((value): value is NotificationTargetPanel =>\n isNotificationTargetPanel(value),\n );\n\n if (targetPanels.length > 0) {\n return Array.from(new Set(targetPanels));\n }\n\n const panel = notification.origin.context?.panel;\n return isNotificationTargetPanel(panel) ? [panel] : [];\n};\n\nexport const getNotificationTargetTag = (panel: NotificationTargetPanel) =>\n `target:${panel}` as const;\n\nexport const addNotificationTargetTag = (\n panel: NotificationTargetPanel | undefined,\n tags?: string[],\n) => {\n if (!panel) return tags ?? [];\n return Array.from(new Set([getNotificationTargetTag(panel), ...(tags ?? [])]));\n};\n\nexport const isNotificationForPanel = (\n notification: Notification,\n panel: NotificationTargetPanel,\n options?: { fallbackPanel?: NotificationTargetPanel },\n) => {\n const explicitTargetPanels = getNotificationTargetPanels(notification);\n if (explicitTargetPanels.length > 0) {\n return explicitTargetPanels.includes(panel);\n }\n\n const resolvedPanel = options?.fallbackPanel ?? 'channel';\n return resolvedPanel === panel;\n};\n","import { useCallback } from 'react';\nimport { useChatContext } from '../../../context';\nimport { useStateStore } from '../../../store';\nimport type { Notification, NotificationManagerState } from 'stream-chat';\nimport { useNotificationConfigurationContext } from '../NotificationConfigurationContext';\nimport { isNotificationForPanel } from '../notificationTarget';\n\nimport type { NotificationTargetPanel } from '../notificationTarget';\n\nexport type UseNotificationsFilter = (notification: Notification) => boolean;\n\nexport type UseNotificationsOptions = {\n /**\n * When true, the configured Chat-level notificationDisplayFilter is applied after\n * panel routing and before the local filter.\n */\n applyDisplayFilter?: boolean;\n /**\n * When provided, only notifications that pass this filter are returned.\n * Use to have a given NotificationList consume only a subset of client.notifications\n * (e.g. by origin.emitter, origin.context, or metadata).\n */\n filter?: UseNotificationsFilter;\n /**\n * Panel target consumed by a specific notification list.\n */\n panel?: NotificationTargetPanel;\n /**\n * Fallback panel used when origin.context.panel is absent.\n * Defaults to `channel`.\n */\n fallbackPanel?: NotificationTargetPanel;\n};\n\n/**\n * Subscribes to client.notifications.store and returns the list of notifications.\n * Optionally pass a filter so only notifications that match are returned (e.g. for a specific NotificationList).\n */\nexport const useNotifications = (options?: UseNotificationsOptions): Notification[] => {\n const { client } = useChatContext();\n const { displayFilter } = useNotificationConfigurationContext();\n const { applyDisplayFilter, fallbackPanel, filter, panel } = options ?? {};\n const selector = useCallback(\n (state: NotificationManagerState) => {\n const notifications = state.notifications;\n return {\n notifications: notifications.filter((notification) => {\n if (\n panel &&\n !isNotificationForPanel(notification, panel, {\n fallbackPanel,\n })\n ) {\n return false;\n }\n\n if (\n applyDisplayFilter &&\n !displayFilter({\n fallbackPanel,\n filter,\n notification,\n panel,\n })\n ) {\n return false;\n }\n\n return filter ? filter(notification) : true;\n }),\n };\n },\n [applyDisplayFilter, displayFilter, fallbackPanel, filter, panel],\n );\n\n const { notifications } = useStateStore(client.notifications.store, selector);\n\n return notifications;\n};\n","import { nanoid } from 'nanoid';\nimport React, { useMemo } from 'react';\n\nconst reactUseId = React.useId as (() => string) | undefined;\n\n// Strips React.useId() wrapper characters so the value is safe as an HTML id:\n// from React 19.0 (`:r0:` -> `r0`) and 19.1 (`«r0»` -> `r0`);\n// 19.2+ uses `_r_1_` which is safe and doesn't need stripping\nexport const stripUseIdWrappers = (id: string): string => id.replace(/[:«»]/g, '');\n\n/**\n * Returns a stable, unique string id.\n *\n * On React 18+ this delegates to `React.useId()` (with the surrounding wrapper\n * characters stripped so the value is safe to use anywhere an HTML id is expected)\n * and is SSR-stable. On React 17, it falls back to a client-only id generated via `nanoid`.\n */\nexport const useStableId = () => {\n if (reactUseId) return stripUseIdWrappers(reactUseId());\n // eslint-disable-next-line react-hooks/rules-of-hooks\n return useMemo(() => nanoid(), []);\n};\n","import React, { type ComponentProps, forwardRef } from 'react';\nimport clsx from 'clsx';\n\nexport type ButtonVariant = 'primary' | 'secondary' | 'danger';\nexport type ButtonAppearance = 'solid' | 'outline' | 'ghost';\nexport type ButtonSize = 'lg' | 'md' | 'sm' | 'xs';\n\nexport type ButtonProps = ComponentProps<'button'> & {\n /** Semantic variant: primary, secondary, or danger (maps to destructive in styles). */\n variant?: ButtonVariant;\n /** Visual style: solid, outline, or ghost. */\n appearance?: ButtonAppearance;\n /** When true, uses full border-radius for icon-only/pill shape. */\n circular?: boolean;\n /** When true, button uses inverse theme (e.g. on dark surface in light theme). */\n inverseTheme?: boolean;\n /** Size: lg, md, or sm. */\n size?: ButtonSize;\n};\n\nconst variantToClass: Record<ButtonVariant, string> = {\n danger: 'str-chat__button--destructive',\n primary: 'str-chat__button--primary',\n secondary: 'str-chat__button--secondary',\n};\n\nconst appearanceToClass: Record<ButtonAppearance, string> = {\n ghost: 'str-chat__button--ghost',\n outline: 'str-chat__button--outline',\n solid: 'str-chat__button--solid',\n};\n\nconst sizeToClass: Record<ButtonSize, string> = {\n lg: 'str-chat__button--size-lg',\n md: 'str-chat__button--size-md',\n sm: 'str-chat__button--size-sm',\n xs: 'str-chat__button--size-xs',\n};\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n { appearance, children, circular, className, inverseTheme, size, variant, ...props },\n ref,\n) {\n return (\n <button\n ref={ref}\n type='button'\n {...props}\n className={clsx(\n 'str-chat__button',\n variant != null && variantToClass[variant],\n appearance != null && appearanceToClass[appearance],\n circular && 'str-chat__button--circular',\n inverseTheme && 'str-chat__theme-inverse',\n size != null && sizeToClass[size],\n className,\n )}\n >\n <div className='str-chat__button__content'>{children}</div>\n </button>\n );\n});\n","import React from 'react';\n\nimport { useComponentContextIcons } from '../../context';\nimport { useTranslationContext } from '../../context/TranslationContext';\n\nexport type EmptyStateIndicatorProps = {\n /** List Type: channel | message */\n listType?: 'channel' | 'message' | 'thread';\n messageText?: string;\n};\n\nconst UnMemoizedEmptyStateIndicator = (props: EmptyStateIndicatorProps) => {\n const { listType, messageText } = props;\n\n const { t } = useTranslationContext('EmptyStateIndicator');\n const { IconMessageBubble, IconMessageBubbles } = useComponentContextIcons();\n\n if (listType === 'thread') return null;\n\n if (listType === 'channel') {\n const text = t('No conversations yet');\n return (\n <div className='str-chat__channel-list-empty'>\n <IconMessageBubbles />\n <p role='listitem'>{text}</p>\n </div>\n );\n }\n\n if (listType === 'message') {\n const text = t(messageText || 'Send a message to start the conversation');\n return (\n <div className='str-chat__empty-channel'>\n <IconMessageBubble />\n <p className='str-chat__empty-channel-text' role='listitem'>\n {text}\n </p>\n </div>\n );\n }\n\n return <p>{t('No items exist')}</p>;\n};\n\nexport const EmptyStateIndicator = React.memo(\n UnMemoizedEmptyStateIndicator,\n) as typeof UnMemoizedEmptyStateIndicator;\n","import type {\n Channel,\n LocalMessage,\n MessageResponse,\n ChannelState as StreamChannelState,\n} from 'stream-chat';\n\nimport type { ChannelState } from '../../context/ChannelStateContext';\n\nexport type ChannelStateReducerAction =\n | {\n type: 'closeThread';\n }\n | {\n type: 'clearHighlightedMessage';\n }\n | {\n channel: Channel;\n type: 'copyMessagesFromChannel';\n parentId?: string | null;\n }\n | {\n channel: Channel;\n type: 'copyStateFromChannelOnEvent';\n }\n | {\n hasMore: boolean;\n hasMoreNewer: boolean;\n messages: LocalMessage[];\n type: 'jumpToLatestMessageFinished';\n }\n | {\n channel: Channel;\n highlightedMessageId: string;\n type: 'jumpToMessageFinished';\n }\n | {\n channel: Channel;\n hasMore: boolean;\n type: 'initStateFromChannel';\n }\n | {\n hasMore: boolean;\n messages: LocalMessage[];\n type: 'loadMoreFinished';\n }\n | {\n hasMoreNewer: boolean;\n messages: LocalMessage[];\n type: 'loadMoreNewerFinished';\n }\n | {\n threadHasMore: boolean;\n threadMessages: Array<ReturnType<StreamChannelState['formatMessage']>>;\n type: 'loadMoreThreadFinished';\n }\n | {\n channel: Channel;\n message: LocalMessage;\n type: 'openThread';\n }\n | {\n error: Error;\n type: 'setError';\n }\n | {\n loadingMore: boolean;\n type: 'setLoadingMore';\n }\n | {\n loadingMoreForJumpToChannelMessage: boolean;\n type: 'setLoadingMoreForJumpToChannelMessage';\n }\n | {\n loadingMoreNewer: boolean;\n type: 'setLoadingMoreNewer';\n }\n | {\n message: LocalMessage;\n type: 'setThread';\n }\n | {\n channel: Channel;\n type: 'setTyping';\n }\n | {\n type: 'startLoadingThread';\n }\n | {\n channel: Channel;\n message: MessageResponse;\n type: 'updateThreadOnEvent';\n };\n\nexport const makeChannelReducer =\n () => (state: ChannelState, action: ChannelStateReducerAction) => {\n switch (action.type) {\n case 'closeThread': {\n return {\n ...state,\n thread: null,\n threadLoadingMore: false,\n threadMessages: [],\n };\n }\n\n case 'copyMessagesFromChannel': {\n const { channel, parentId } = action;\n return {\n ...state,\n messages: [...channel.state.messages],\n pinnedMessages: [...channel.state.pinnedMessages],\n // copying messages from channel happens with new message - this resets the suppressAutoscroll\n suppressAutoscroll: false,\n threadMessages: parentId\n ? { ...channel.state.threads }[parentId] || []\n : state.threadMessages,\n };\n }\n\n case 'copyStateFromChannelOnEvent': {\n const { channel } = action;\n return {\n ...state,\n members: { ...channel.state.members },\n messages: [...channel.state.messages],\n pinnedMessages: [...channel.state.pinnedMessages],\n read: { ...channel.state.read },\n watcherCount: channel.state.watcher_count,\n watchers: { ...channel.state.watchers },\n };\n }\n\n case 'initStateFromChannel': {\n const { channel, hasMore } = action;\n return {\n ...state,\n hasMore,\n loading: false,\n members: { ...channel.state.members },\n messages: [...channel.state.messages],\n pinnedMessages: [...channel.state.pinnedMessages],\n read: { ...channel.state.read },\n watcherCount: channel.state.watcher_count,\n watchers: { ...channel.state.watchers },\n };\n }\n\n case 'jumpToLatestMessageFinished': {\n const { hasMore, hasMoreNewer, messages } = action;\n return {\n ...state,\n hasMore,\n hasMoreNewer,\n highlightedMessageId: undefined,\n loading: false,\n messages,\n suppressAutoscroll: false,\n };\n }\n\n case 'jumpToMessageFinished': {\n return {\n ...state,\n hasMore: action.channel.state.messagePagination.hasPrev,\n hasMoreNewer: action.channel.state.messagePagination.hasNext,\n highlightedMessageId: action.highlightedMessageId,\n loadingMore: false,\n loadingMoreForJumpToChannelMessage: false,\n messages: action.channel.state.messages,\n suppressAutoscroll: false,\n };\n }\n\n case 'clearHighlightedMessage': {\n return {\n ...state,\n highlightedMessageId: undefined,\n };\n }\n\n case 'loadMoreFinished': {\n const { hasMore, messages } = action;\n return {\n ...state,\n hasMore,\n loadingMore: false,\n messages,\n suppressAutoscroll: false,\n };\n }\n\n case 'loadMoreNewerFinished': {\n const { hasMoreNewer, messages } = action;\n return {\n ...state,\n hasMoreNewer,\n loadingMoreNewer: false,\n messages,\n };\n }\n\n case 'loadMoreThreadFinished': {\n const { threadHasMore, threadMessages } = action;\n return {\n ...state,\n threadHasMore,\n threadLoadingMore: false,\n threadMessages,\n };\n }\n\n case 'openThread': {\n const { channel, message } = action;\n return {\n ...state,\n thread: message,\n threadHasMore: true,\n threadMessages: message.id\n ? { ...channel.state.threads }[message.id] || []\n : [],\n threadSuppressAutoscroll: false,\n };\n }\n\n case 'setError': {\n const { error } = action;\n return { ...state, error };\n }\n\n case 'setLoadingMore': {\n const { loadingMore } = action;\n // suppress the autoscroll behavior\n return { ...state, loadingMore, suppressAutoscroll: loadingMore };\n }\n\n case 'setLoadingMoreForJumpToChannelMessage': {\n const { loadingMoreForJumpToChannelMessage } = action;\n return {\n ...state,\n loadingMoreForJumpToChannelMessage,\n suppressAutoscroll: loadingMoreForJumpToChannelMessage,\n };\n }\n\n case 'setLoadingMoreNewer': {\n const { loadingMoreNewer } = action;\n return { ...state, loadingMoreNewer };\n }\n\n case 'setThread': {\n const { message } = action;\n return { ...state, thread: message };\n }\n\n case 'setTyping': {\n const { channel } = action;\n return {\n ...state,\n typing: { ...channel.state.typing },\n };\n }\n\n case 'startLoadingThread': {\n return {\n ...state,\n threadLoadingMore: true,\n threadSuppressAutoscroll: true,\n };\n }\n\n case 'updateThreadOnEvent': {\n const { channel, message } = action;\n if (!state.thread) return state;\n return {\n ...state,\n thread:\n message?.id === state.thread.id\n ? channel.state.formatMessage(message)\n : state.thread,\n threadMessages: state.thread?.id\n ? { ...channel.state.threads }[state.thread.id] || []\n : [],\n };\n }\n\n default:\n return state;\n }\n };\n\nexport const initialState = {\n error: null,\n hasMore: true,\n hasMoreNewer: false,\n loading: true,\n loadingMore: false,\n loadingMoreForJumpToChannelMessage: false,\n members: {},\n messages: [],\n pinnedMessages: [],\n read: {},\n suppressAutoscroll: false,\n thread: null,\n threadHasMore: true,\n threadLoadingMore: false,\n threadMessages: [],\n threadSuppressAutoscroll: false,\n typing: {},\n watcherCount: 0,\n watchers: {},\n};\n","import { useMemo } from 'react';\n\nimport { isDate, isDayOrMoment } from '../../../i18n';\n\nimport type { ChannelStateContextValue } from '../../../context/ChannelStateContext';\n\nexport const useCreateChannelStateContext = (\n value: Omit<ChannelStateContextValue, 'channelCapabilities'> & {\n channelCapabilitiesArray: string[];\n skipMessageDataMemoization?: boolean;\n },\n) => {\n const {\n channel,\n channelCapabilitiesArray = [],\n channelConfig,\n channelUnreadUiState,\n error,\n giphyVersion,\n hasMore,\n hasMoreNewer,\n highlightedMessageId,\n imageAttachmentSizeHandler,\n loading,\n loadingMore,\n loadingMoreForJumpToChannelMessage,\n members,\n messages = [],\n mutes,\n notifications,\n pinnedMessages,\n read = {},\n shouldGenerateVideoThumbnail,\n skipMessageDataMemoization,\n suppressAutoscroll,\n thread,\n threadHasMore,\n threadLoadingMore,\n threadMessages = [],\n videoAttachmentSizeHandler,\n watcher_count,\n watcherCount,\n watchers,\n } = value;\n\n const channelId = channel.cid;\n // `channel.lastRead()` reaches `channel.getClient()`, which throws once the\n // client has been disconnected. Guard against it so a disconnect while the\n // channel is mounted does not crash the render (#2393).\n const lastRead =\n channel.initialized && !channel.disconnected && channel.lastRead()?.getTime();\n const membersLength = Object.keys(members || []).length;\n const notificationsLength = notifications.length;\n const readUsers = Object.values(read);\n const readUsersLength = readUsers.length;\n const readUsersLastReadDateStrings: string[] = [];\n for (const { last_read } of readUsers) {\n if (!lastRead) continue;\n readUsersLastReadDateStrings.push(last_read?.toISOString());\n }\n const readUsersLastReads = readUsersLastReadDateStrings.join();\n const threadMessagesLength = threadMessages?.length;\n\n const channelCapabilities: Record<string, boolean> = {};\n\n channelCapabilitiesArray.forEach((capability) => {\n channelCapabilities[capability] = true;\n });\n\n // FIXME: this is crazy - I could not find out why the messages were not getting updated when only message properties that are not part\n // of this serialization has been changed. A great example of memoization gone wrong.\n const memoizedMessageData = skipMessageDataMemoization\n ? messages\n : messages\n .map(\n ({\n deleted_at,\n latest_reactions,\n pinned,\n reply_count,\n status,\n type,\n updated_at,\n user,\n }) =>\n `${type}${deleted_at}${\n latest_reactions ? latest_reactions.map(({ type }) => type).join() : ''\n }${pinned}${reply_count}${status}${\n updated_at && (isDayOrMoment(updated_at) || isDate(updated_at))\n ? updated_at.toISOString()\n : updated_at || ''\n }${user?.updated_at}`,\n )\n .join();\n\n const memoizedThreadMessageData = threadMessages\n .map(\n ({ deleted_at, latest_reactions, pinned, status, updated_at, user }) =>\n `${deleted_at}${\n latest_reactions ? latest_reactions.map(({ type }) => type).join() : ''\n }${pinned}${status}${\n updated_at && (isDayOrMoment(updated_at) || isDate(updated_at))\n ? updated_at.toISOString()\n : updated_at || ''\n }${user?.updated_at}`,\n )\n .join();\n\n const channelStateContext: ChannelStateContextValue = useMemo(\n () => ({\n channel,\n channelCapabilities,\n channelConfig,\n channelUnreadUiState,\n error,\n giphyVersion,\n hasMore,\n hasMoreNewer,\n highlightedMessageId,\n imageAttachmentSizeHandler,\n loading,\n loadingMore,\n loadingMoreForJumpToChannelMessage,\n members,\n messages,\n mutes,\n notifications,\n pinnedMessages,\n read,\n shouldGenerateVideoThumbnail,\n suppressAutoscroll,\n thread,\n threadHasMore,\n threadLoadingMore,\n threadMessages,\n videoAttachmentSizeHandler,\n watcher_count,\n watcherCount,\n watchers,\n }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n channel.data?.name, // otherwise ChannelHeader will not be updated\n channelId,\n channelUnreadUiState,\n error,\n hasMore,\n hasMoreNewer,\n highlightedMessageId,\n lastRead,\n loading,\n loadingMore,\n loadingMoreForJumpToChannelMessage,\n membersLength,\n memoizedMessageData,\n memoizedThreadMessageData,\n notificationsLength,\n readUsersLength,\n readUsersLastReads,\n shouldGenerateVideoThumbnail,\n skipMessageDataMemoization,\n suppressAutoscroll,\n thread,\n threadHasMore,\n threadLoadingMore,\n threadMessagesLength,\n watcherCount,\n ],\n );\n\n return channelStateContext;\n};\n","import { useMemo } from 'react';\n\nimport type { TypingContextValue } from '../../../context/TypingContext';\n\nexport const useCreateTypingContext = (value: TypingContextValue) => {\n const { typing } = value;\n\n const typingValue = Object.keys(typing || {}).join();\n\n const typingContext: TypingContextValue = useMemo(\n () => ({\n typing,\n }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [typingValue],\n );\n\n return typingContext;\n};\n","import type {\n LocalMessage,\n MessageResponse,\n StreamChat,\n UpdateMessageOptions,\n} from 'stream-chat';\n\nimport { useChatContext } from '../../../context/ChatContext';\n\ntype UpdateHandler = (\n cid: string,\n updatedMessage: LocalMessage | MessageResponse,\n options?: UpdateMessageOptions,\n) => ReturnType<StreamChat['updateMessage']>;\n\nexport const useEditMessageHandler = (doUpdateMessageRequest?: UpdateHandler) => {\n const { channel, client } = useChatContext('useEditMessageHandler');\n\n return (\n updatedMessage: LocalMessage | MessageResponse,\n options?: UpdateMessageOptions,\n ) => {\n if (doUpdateMessageRequest && channel) {\n return Promise.resolve(\n doUpdateMessageRequest(channel.cid, updatedMessage, options),\n );\n }\n return client.updateMessage(updatedMessage, undefined, options);\n };\n};\n","import { useEffect, useRef } from 'react';\n\nexport const useIsMounted = () => {\n const isMounted = useRef(false);\n\n useEffect(() => {\n isMounted.current = true;\n return () => {\n isMounted.current = false;\n };\n }, []);\n\n return isMounted;\n};\n","import type React from 'react';\nimport { useCallback } from 'react';\nimport type { LocalMessage, UserResponse } from 'stream-chat';\n\nexport type OnMentionAction = (\n event: React.BaseSyntheticEvent,\n /**\n * @deprecated Use the third `message` argument to access mention metadata instead.\n * FIXME: Remove this argument in the next major release.\n */\n user?: UserResponse,\n message?: LocalMessage,\n) => void;\n\nexport const useMentionsHandlers = (\n onMentionsHover?: OnMentionAction,\n onMentionsClick?: OnMentionAction,\n) =>\n useCallback(\n (\n event: React.BaseSyntheticEvent,\n mentioned_users: UserResponse[],\n message?: LocalMessage,\n ) => {\n if (\n (!onMentionsHover && !onMentionsClick) ||\n !(event.target instanceof HTMLElement)\n ) {\n return;\n }\n\n const target = event.target;\n const textContent = target.innerHTML.replace('*', '');\n\n if (textContent[0] === '@') {\n const userName = textContent.replace('@', '');\n const user = mentioned_users?.find(\n ({ id, name }) => name === userName || id === userName,\n );\n\n if (\n onMentionsHover &&\n typeof onMentionsHover === 'function' &&\n event.type === 'mouseover'\n ) {\n if (message) {\n onMentionsHover(event, user, message);\n } else {\n onMentionsHover(event, user);\n }\n }\n\n if (\n onMentionsClick &&\n event.type === 'click' &&\n typeof onMentionsClick === 'function'\n ) {\n if (message) {\n onMentionsClick(event, user, message);\n } else {\n onMentionsClick(event, user);\n }\n }\n }\n },\n [onMentionsClick, onMentionsHover],\n );\n","export function prettifyFileSize(bytes: number, precision = 3) {\n const units = ['B', 'kB', 'MB', 'GB'];\n const exponent =\n bytes === 0\n ? 0\n : Math.min(Math.floor(Math.log(bytes) / Math.log(1024)), units.length - 1);\n const mantissa = bytes / 1024 ** exponent;\n // `toPrecision` switches to exponential notation as soon as the value needs more integer digits\n // than the requested significant digits, so any size just below the next unit boundary came out\n // as `1.00e+3 B` (1000-1023 B, and the same range in kB/MB/GB). Such a mantissa has no fraction\n // worth showing at this precision, so round it to an integer instead.\n const formattedMantissa =\n precision === 0 || mantissa >= 10 ** precision\n ? Math.round(mantissa).toString()\n : mantissa.toPrecision(precision);\n return `${formattedMantissa} ${units[exponent]}`;\n}\n","import React from 'react';\nimport { prettifyFileSize } from '../../MessageComposer/hooks/utils';\n\nexport type FileSizeIndicatorProps = {\n /** file size in byte */\n fileSize?: number | string;\n /**\n The maximum number of fraction digits to display. If not set, the default behavior is to round to 3 significant digits.\n @default undefined\n */\n maximumFractionDigits?: number;\n};\n\nexport const FileSizeIndicator = ({\n fileSize,\n maximumFractionDigits,\n}: FileSizeIndicatorProps) => {\n const actualFileSize = typeof fileSize === 'string' ? parseFloat(fileSize) : fileSize;\n\n if (typeof actualFileSize === 'undefined' || !Number.isFinite(Number(actualFileSize))) {\n return null;\n }\n\n return (\n <span\n className='str-chat__message-attachment-file--item-size'\n data-testid='file-size-indicator'\n >\n {prettifyFileSize(actualFileSize, maximumFractionDigits)}\n </span>\n );\n};\n","import React from 'react';\n\ntype LoadingMessageProps = {\n bubbleSize: 'md' | 'lg';\n metadataSize: 'sm' | 'md';\n outgoing?: boolean;\n};\n\nconst LoadingMessage = ({\n bubbleSize,\n metadataSize,\n outgoing = false,\n}: LoadingMessageProps) => (\n <div\n className={`str-chat__loading-channel-message ${\n outgoing\n ? 'str-chat__loading-channel-message--outgoing'\n : 'str-chat__loading-channel-message--incoming'\n }`}\n >\n {!outgoing ? <div className='str-chat__loading-channel-message-avatar' /> : null}\n <div className='str-chat__loading-channel-message-content'>\n <div\n className={`str-chat__loading-channel-message-bubble str-chat__loading-channel-message-bubble--${bubbleSize}`}\n ></div>\n <div\n className={`str-chat__loading-channel-message-metadata str-chat__loading-channel-message-metadata--${metadataSize}`}\n ></div>\n </div>\n </div>\n);\n\nconst LoadingMessageInput = () => (\n <div className='str-chat__message-composer-container str-chat__message-composer-container--loading'>\n <div className='str-chat__message-composer'>\n <div className='str-chat__loading-channel-message-input-button'></div>\n <div className='str-chat__loading-channel-message-input-pill'></div>\n </div>\n </div>\n);\n\nconst LoadingChannelHeader = () => (\n <div className='str-chat__channel-header str-chat__channel-header--loading'>\n <div className='str-chat__channel-header__data str-chat__channel-header__data--loading'>\n <div className='str-chat__loading-channel-header-name'></div>\n </div>\n <div className='str-chat__loading-channel-header-avatar'></div>\n </div>\n);\n\nexport const LoadingChannel = () => (\n <div className='str-chat__loading-channel'>\n <LoadingChannelHeader />\n <div className='str-chat__message-list str-chat__message-list--loading'>\n <div className='str-chat__message-list-scroll'>\n <div className='str-chat__loading-channel-message-list'>\n <LoadingMessage bubbleSize='lg' metadataSize='md' />\n <LoadingMessage bubbleSize='md' metadataSize='sm' outgoing />\n <LoadingMessage bubbleSize='lg' metadataSize='md' />\n </div>\n </div>\n </div>\n <LoadingMessageInput />\n </div>\n);\n","import React from 'react';\n\nimport { useTranslationContext } from '../../context/TranslationContext';\n\nexport type LoadingErrorIndicatorProps = {\n /** Error object */\n error?: Error | null;\n};\n\n/**\n * UI component for error indicator in a Channel\n */\nconst UnMemoizedLoadingErrorIndicator = ({ error }: LoadingErrorIndicatorProps) => {\n const { t } = useTranslationContext('LoadingErrorIndicator');\n\n if (!error) return null;\n\n return <div>{t('Error: {{ errorMessage }}', { errorMessage: error.message })}</div>;\n};\n\nexport const LoadingErrorIndicator = React.memo(\n UnMemoizedLoadingErrorIndicator,\n (prevProps, nextProps) => prevProps.error?.message === nextProps.error?.message,\n) as typeof UnMemoizedLoadingErrorIndicator;\n","import React, { type ComponentProps } from 'react';\nimport { useComponentContextIcons } from '../../context';\nimport type { IconLoading as DefaultIconLoading } from '../Icons';\n\nexport type LoadingIndicatorProps = ComponentProps<typeof DefaultIconLoading>;\n\nexport const LoadingIndicator = (props: LoadingIndicatorProps) => {\n const { IconLoading } = useComponentContextIcons();\n return <IconLoading {...props} className='str-chat__loading-indicator' />;\n};\n","export const CHANNEL_CONTAINER_ID = 'str-chat__channel';\n","import emojiRegex from 'emoji-regex';\n\n/**\n * `emojiRegex()` compiles a ~15KB regex source on every call, so we build a\n * single shared instance at module load and reuse it everywhere an emoji match\n * is needed.\n *\n * The instance is global (carries the `g` flag and therefore a mutable\n * `lastIndex`), so it is only safe to reuse with consumers that reset\n * `lastIndex` before scanning:\n * - `String#match` / `String#replace` reset it internally;\n * - `hast-util-find-and-replace` resets it before each use.\n *\n * Do NOT use it directly with stateful `.test()` / `.exec()` loops.\n */\nexport const EMOJI_REGEX = emojiRegex();\n","import deepequal from 'react-fast-compare';\n\nimport { EMOJI_REGEX } from './emojiRegex';\n\nimport type { TFunction } from 'i18next';\nimport type {\n ChannelConfigWithInfo,\n LocalMessage,\n LocalMessageBase,\n MessageResponse,\n Mute,\n StreamChat,\n UserResponse,\n} from 'stream-chat';\nimport type { MessageProps } from './types';\nimport type { MessageContextValue } from '../../context';\n\n/**\n * Following function validates a function which returns notification message.\n * It validates if the first parameter is function and also if return value of function is string or no.\n */\nexport const validateAndGetMessage = <T extends unknown[]>(\n func: (...args: T) => unknown,\n args: T,\n) => {\n if (!func || typeof func !== 'function') return null;\n\n // below is due to tests passing a single argument\n // rather than an array.\n if (!Array.isArray(args)) {\n args = [args] as unknown as T;\n }\n\n const returnValue = func(...args);\n\n if (typeof returnValue !== 'string') return null;\n\n return returnValue;\n};\n\n/**\n * Tell if the owner of the current message is muted\n */\nexport const isUserMuted = (message: LocalMessage, mutes?: Mute[]) => {\n if (!mutes || !message) return false;\n\n const userMuted = mutes.filter((el) => el.target.id === message.user?.id);\n return !!userMuted.length;\n};\n\nexport const OPTIONAL_MESSAGE_ACTIONS = {\n deleteForMe: 'deleteForMe',\n};\n\nexport const MESSAGE_ACTIONS = {\n delete: 'delete',\n download: 'download',\n edit: 'edit',\n flag: 'flag',\n markUnread: 'markUnread',\n mute: 'mute',\n pin: 'pin',\n quote: 'quote',\n react: 'react',\n remindMe: 'remindMe',\n reply: 'reply',\n saveForLater: 'saveForLater',\n};\n\nexport type MessageActionsArray<T extends string = string> = Array<\n keyof typeof MESSAGE_ACTIONS | keyof typeof OPTIONAL_MESSAGE_ACTIONS | T\n>;\n\nexport type Capabilities = {\n canDelete?: boolean;\n canEdit?: boolean;\n canFlag?: boolean;\n canMarkUnread?: boolean;\n canMute?: boolean;\n canPin?: boolean;\n canQuote?: boolean;\n canReact?: boolean;\n canReply?: boolean;\n};\n\nexport const getMessageActions = (\n actions: MessageActionsArray | boolean,\n {\n canDelete,\n canEdit,\n canFlag,\n canMarkUnread,\n canMute,\n canPin,\n canQuote,\n canReact,\n canReply,\n }: Capabilities,\n channelConfig?: ChannelConfigWithInfo,\n): MessageActionsArray => {\n const messageActionsAfterPermission: MessageActionsArray = [];\n let messageActions: MessageActionsArray = [];\n\n if (actions && typeof actions === 'boolean') {\n // If value of actions is true, then populate all the possible values\n messageActions = Object.keys(MESSAGE_ACTIONS);\n } else if (actions && Array.isArray(actions) && actions.length > 0) {\n messageActions = [...actions];\n } else {\n return [];\n }\n\n if (canDelete && messageActions.indexOf(MESSAGE_ACTIONS.delete) > -1) {\n messageActionsAfterPermission.push(MESSAGE_ACTIONS.delete);\n }\n\n if (messageActions.indexOf(MESSAGE_ACTIONS.download) > -1) {\n messageActionsAfterPermission.push(MESSAGE_ACTIONS.download);\n }\n\n if (canDelete && messageActions.indexOf(OPTIONAL_MESSAGE_ACTIONS.deleteForMe) > -1) {\n messageActionsAfterPermission.push(OPTIONAL_MESSAGE_ACTIONS.deleteForMe);\n }\n\n if (canEdit && messageActions.indexOf(MESSAGE_ACTIONS.edit) > -1) {\n messageActionsAfterPermission.push(MESSAGE_ACTIONS.edit);\n }\n\n if (canFlag && messageActions.indexOf(MESSAGE_ACTIONS.flag) > -1) {\n messageActionsAfterPermission.push(MESSAGE_ACTIONS.flag);\n }\n\n if (canMarkUnread && messageActions.indexOf(MESSAGE_ACTIONS.markUnread) > -1) {\n messageActionsAfterPermission.push(MESSAGE_ACTIONS.markUnread);\n }\n\n if (canMute && messageActions.indexOf(MESSAGE_ACTIONS.mute) > -1) {\n messageActionsAfterPermission.push(MESSAGE_ACTIONS.mute);\n }\n\n if (canPin && messageActions.indexOf(MESSAGE_ACTIONS.pin) > -1) {\n messageActionsAfterPermission.push(MESSAGE_ACTIONS.pin);\n }\n\n if (canQuote && messageActions.indexOf(MESSAGE_ACTIONS.quote) > -1) {\n messageActionsAfterPermission.push(MESSAGE_ACTIONS.quote);\n }\n\n if (canReact && messageActions.indexOf(MESSAGE_ACTIONS.react) > -1) {\n messageActionsAfterPermission.push(MESSAGE_ACTIONS.react);\n }\n\n if (\n channelConfig?.['user_message_reminders'] &&\n messageActions.indexOf(MESSAGE_ACTIONS.remindMe) > -1\n ) {\n messageActionsAfterPermission.push(MESSAGE_ACTIONS.remindMe);\n }\n\n if (canReply && messageActions.indexOf(MESSAGE_ACTIONS.reply) > -1) {\n messageActionsAfterPermission.push(MESSAGE_ACTIONS.reply);\n }\n\n if (\n channelConfig?.['user_message_reminders'] &&\n messageActions.indexOf(MESSAGE_ACTIONS.saveForLater) > -1\n ) {\n messageActionsAfterPermission.push(MESSAGE_ACTIONS.saveForLater);\n }\n\n return messageActionsAfterPermission;\n};\n\nexport const ACTIONS_NOT_WORKING_IN_THREAD = [\n MESSAGE_ACTIONS.pin,\n MESSAGE_ACTIONS.reply,\n MESSAGE_ACTIONS.markUnread,\n];\n\nfunction areMessagesEqual(prevMessage: LocalMessage, nextMessage: LocalMessage): boolean {\n const areBaseMessagesEqual = (\n prevMessage: LocalMessageBase,\n nextMessage: LocalMessageBase,\n ) =>\n prevMessage.deleted_at === nextMessage.deleted_at &&\n prevMessage.latest_reactions?.length === nextMessage.latest_reactions?.length &&\n prevMessage.own_reactions?.length === nextMessage.own_reactions?.length &&\n prevMessage.pinned === nextMessage.pinned &&\n prevMessage.reply_count === nextMessage.reply_count &&\n prevMessage.show_in_channel === nextMessage.show_in_channel &&\n prevMessage.status === nextMessage.status &&\n prevMessage.text === nextMessage.text &&\n prevMessage.type === nextMessage.type &&\n prevMessage.updated_at === nextMessage.updated_at &&\n prevMessage.user?.updated_at === nextMessage.user?.updated_at;\n\n return (\n areBaseMessagesEqual(prevMessage, nextMessage) &&\n Boolean(prevMessage.quoted_message) === Boolean(nextMessage.quoted_message) &&\n ((!prevMessage.quoted_message && !nextMessage.quoted_message) ||\n areBaseMessagesEqual(\n prevMessage.quoted_message as LocalMessageBase,\n nextMessage.quoted_message as LocalMessageBase,\n ))\n );\n}\n\nexport const areMessagePropsEqual = (\n prevProps: MessageProps & {\n mutes?: Mute[];\n showDetailedReactions?: boolean;\n },\n nextProps: MessageProps & {\n mutes?: Mute[];\n showDetailedReactions?: boolean;\n },\n) => {\n const { message: prevMessage, Message: prevMessageUI } = prevProps;\n const { message: nextMessage, Message: nextMessageUI } = nextProps;\n\n if (prevMessageUI !== nextMessageUI) return false;\n\n if (nextProps.showDetailedReactions !== prevProps.showDetailedReactions) {\n return false;\n }\n\n if (nextProps.closeReactionSelectorOnClick !== prevProps.closeReactionSelectorOnClick) {\n return false;\n }\n\n const messagesAreEqual = areMessagesEqual(prevMessage, nextMessage);\n if (!messagesAreEqual) return false;\n\n const deepEqualProps =\n deepequal(nextProps.messageActions, prevProps.messageActions) &&\n deepequal(nextProps.readBy, prevProps.readBy) &&\n deepequal(nextProps.deliveredTo, prevProps.deliveredTo) &&\n deepequal(nextProps.highlighted, prevProps.highlighted) &&\n deepequal(nextProps.groupStyles, prevProps.groupStyles) && // last 3 messages can have different group styles\n deepequal(nextProps.mutes, prevProps.mutes) &&\n deepequal(nextProps.lastReceivedId, prevProps.lastReceivedId);\n\n if (!deepEqualProps) return false;\n\n return (\n prevProps.messageListRect === nextProps.messageListRect // MessageList wrapper layout changes\n );\n};\n\nexport const areMessageUIPropsEqual = (\n prevProps: MessageContextValue & {\n showDetailedReactions?: boolean;\n },\n nextProps: MessageContextValue & {\n showDetailedReactions?: boolean;\n },\n) => {\n const { lastReceivedId: prevLastReceivedId, message: prevMessage } = prevProps;\n const { lastReceivedId: nextLastReceivedId, message: nextMessage } = nextProps;\n\n if (prevProps.highlighted !== nextProps.highlighted) return false;\n if (prevProps.threadList !== nextProps.threadList) return false;\n if (prevProps.endOfGroup !== nextProps.endOfGroup) return false;\n if (prevProps.mutes?.length !== nextProps.mutes?.length) return false;\n if (prevProps.readBy?.length !== nextProps.readBy?.length) return false;\n if (prevProps.deliveredTo?.length !== nextProps.deliveredTo?.length) return false;\n if (prevProps.groupStyles !== nextProps.groupStyles) return false;\n\n if (prevProps.showDetailedReactions !== nextProps.showDetailedReactions) {\n return false;\n }\n\n if (\n (prevMessage.id === prevLastReceivedId || prevMessage.id === nextLastReceivedId) &&\n prevLastReceivedId !== nextLastReceivedId\n ) {\n return false;\n }\n\n return areMessagesEqual(prevMessage, nextMessage);\n};\n\nexport const messageHasReactions = (message?: LocalMessage) =>\n Object.values(message?.reaction_groups ?? {}).some(({ count }) => count > 0);\n\nexport const messageHasQuotedMessage = (message?: LocalMessage) =>\n !!message?.quoted_message;\n\nexport const messageHasAttachments = (message?: LocalMessage) =>\n !!message?.attachments && !!message.attachments.length;\n\nexport const messageHasSingleAttachment = (message?: LocalMessage) =>\n message?.attachments?.length === 1;\n\nexport const messageHasGiphyAttachment = (message?: LocalMessage) =>\n !!message?.attachments?.some((att) => att.type === 'giphy');\n\nexport const getImages = (message?: MessageResponse) => {\n if (!message?.attachments) {\n return [];\n }\n return message.attachments.filter((item) => item.type === 'image');\n};\n\nexport const getNonImageAttachments = (message?: MessageResponse) => {\n if (!message?.attachments) {\n return [];\n }\n return message.attachments.filter((item) => item.type !== 'image');\n};\n\nexport interface TooltipUsernameMapper {\n (user: UserResponse): string;\n}\n\n/**\n * Default Tooltip Username mapper implementation.\n *\n * @param user the user.\n */\nexport const mapToUserNameOrId: TooltipUsernameMapper = (user) => user.name || user.id;\n\nexport const getReadByTooltipText = (\n users: UserResponse[],\n t: TFunction,\n client: StreamChat,\n tooltipUserNameMapper: TooltipUsernameMapper,\n) => {\n let outStr = '';\n\n if (!t) {\n throw new Error(\n 'getReadByTooltipText was called, but translation function is not available',\n );\n }\n\n if (!tooltipUserNameMapper) {\n throw new Error(\n 'getReadByTooltipText was called, but tooltipUserNameMapper function is not available',\n );\n }\n // first filter out client user, so restLength won't count it\n const otherUsers = users\n .filter((item) => item && client?.user && item.id !== client.user.id)\n .map(tooltipUserNameMapper);\n\n const slicedArr = otherUsers.slice(0, 5);\n const restLength = otherUsers.length - slicedArr.length;\n\n if (slicedArr.length === 1) {\n outStr = `${slicedArr[0]} `;\n } else if (slicedArr.length === 2) {\n // joins all with \"and\" but =no commas\n // example: \"bob and sam\"\n outStr = t('{{ firstUser }} and {{ secondUser }}', {\n firstUser: slicedArr[0],\n secondUser: slicedArr[1],\n });\n } else if (slicedArr.length > 2) {\n // joins all with commas, but last one gets \", and\" (oxford comma!)\n // example: \"bob, joe, sam and 4 more\"\n if (restLength === 0) {\n // mutate slicedArr to remove last user to display it separately\n const lastUser = slicedArr.splice(slicedArr.length - 1, 1);\n outStr = t('{{ commaSeparatedUsers }}, and {{ lastUser }}', {\n commaSeparatedUsers: slicedArr.join(', '),\n lastUser,\n });\n } else {\n outStr = t('{{ commaSeparatedUsers }} and {{ moreCount }} more', {\n commaSeparatedUsers: slicedArr.join(', '),\n moreCount: restLength,\n });\n }\n }\n\n return outStr;\n};\n\nexport const countEmojis = (text?: string) => {\n const matches = text?.match(EMOJI_REGEX);\n return matches ? matches.length : 0;\n};\n\nexport const messageTextHasEmojisOnly = (message: LocalMessage) => {\n if (!message.text) return false;\n\n const noEmojis = message.text.replace(EMOJI_REGEX, '');\n const noSpace = noEmojis.replace(/[\\s\\n]/gm, '');\n\n return !noSpace;\n};\n\nexport const isMessageErrorRetryable = (message: LocalMessage) =>\n message.status === 'failed' && message.error?.status !== 403;\n\nexport const isNetworkSendFailure = (message: Pick<LocalMessage, 'error' | 'status'>) =>\n message.status === 'failed' && message.error?.status === 0;\n\nexport const isMessageBounced = (\n message: Pick<LocalMessage, 'type' | 'moderation' | 'moderation_details'>,\n) =>\n message.type === 'error' &&\n (message.moderation_details?.action === 'MESSAGE_RESPONSE_ACTION_BOUNCE' ||\n message.moderation?.action === 'bounce');\n\nexport const isMessageBlocked = (\n message: Pick<LocalMessage, 'type' | 'moderation' | 'moderation_details' | 'shadowed'>,\n) =>\n message.shadowed ||\n (message.type === 'error' &&\n (message.moderation_details?.action === 'MESSAGE_RESPONSE_ACTION_REMOVE' ||\n message.moderation?.action === 'remove'));\n\nexport const isMessageDeleted = (message: LocalMessage): boolean =>\n Boolean(message.deleted_at || message.type === 'deleted' || message.deleted_for_me);\n\nexport const isMessageEdited = (message: Pick<LocalMessage, 'message_text_updated_at'>) =>\n !!message.message_text_updated_at;\n","import { useMemo } from 'react';\n\ntype AriaIdentifierDescriptor = 'description' | 'title';\n\nconst sanitizeAriaRootId = (rootId?: string) =>\n rootId?.trim().replace(/[^A-Za-z0-9:_-]/g, '-') ?? '';\n\nconst buildAriaIdentifier = (\n sanitizedRootId: string,\n descriptor: AriaIdentifierDescriptor,\n) => (sanitizedRootId ? `${sanitizedRootId}-${descriptor}` : undefined);\n\n/**\n * Derives stable ARIA identifier IDs from a single root ID.\n *\n * Use this to keep dialog/component labeling conventions consistent without\n * manually building `*-title` and `*-description` IDs at each call site.\n *\n * Behavior:\n * - Root ID is trimmed and sanitized to `[A-Za-z0-9:_-]` before use.\n * - Returns `undefined` IDs when root ID is missing/empty after sanitization.\n */\nexport const useAriaIdentifiers = (rootId?: string) => {\n const sanitizedRootId = sanitizeAriaRootId(rootId);\n\n return useMemo(\n () => ({\n descriptionId: buildAriaIdentifier(sanitizedRootId, 'description'),\n titleId: buildAriaIdentifier(sanitizedRootId, 'title'),\n }),\n [sanitizedRootId],\n );\n};\n","import {\n autoPlacement,\n type AutoPlacementOptions,\n autoUpdate,\n flip as flipMw,\n offset as offsetMw,\n type Placement,\n shift as shiftMw,\n size as sizeMw,\n useFloating,\n} from '@floating-ui/react';\n\nconst hasResizeObserver = typeof window !== 'undefined' && 'ResizeObserver' in window;\n\nexport type PopperLikePlacement = Placement | 'auto' | 'auto-start' | 'auto-end';\n\nfunction autoMiddlewareFor(p: PopperLikePlacement) {\n if (!String(p).startsWith('auto')) return null;\n const alignment: AutoPlacementOptions['alignment'] =\n p === 'auto-start' ? 'start' : p === 'auto-end' ? 'end' : undefined;\n return autoPlacement({ alignment });\n}\n\nexport type OffsetOpt =\n | number\n | { mainAxis?: number; crossAxis?: number; alignmentAxis?: number }\n | [crossAxis: number, mainAxis: number]; // keep your tuple compat\n\nfunction toOffsetMw(opt?: OffsetOpt) {\n if (opt == null) return null;\n if (Array.isArray(opt)) {\n const [crossAxis, mainAxis] = opt;\n return offsetMw({ crossAxis, mainAxis });\n }\n if (typeof opt === 'number') return offsetMw(opt);\n return offsetMw(opt);\n}\n\nexport type UsePopoverParams = {\n placement?: PopperLikePlacement;\n /** Add flip() when placement is not 'auto*' */\n allowFlip?: boolean;\n /** Keep in viewport; default true to match common popper setups */\n allowShift?: boolean;\n /** Extra options for Floating UI shift() middleware (merged with default padding: 8) */\n shiftOptions?: Parameters<typeof shiftMw>[0];\n /** The floating UI is fitted to the available space (by constraining its max size) instead of letting it overflow; default false */\n fitAvailableSpace?: boolean;\n /** Offset (number, object, or [crossAxis, mainAxis] tuple) */\n offset?: OffsetOpt;\n /**\n * Freeze behavior like Popper's eventListeners: { scroll:false, resize:false }.\n * If true → no autoUpdate (you can call `update()` manually).\n */\n freeze?: boolean;\n /**\n * Fine-grained control of autoUpdate triggers (only if freeze=false).\n * Defaults match Popper's \"disabled\" example when all set to false.\n */\n autoUpdateOptions?: Partial<Parameters<typeof autoUpdate>[3]>;\n};\n\nexport function usePopoverPosition({\n allowFlip = true,\n allowShift = true,\n autoUpdateOptions,\n fitAvailableSpace = false,\n freeze = false,\n offset,\n placement = 'bottom-start',\n shiftOptions,\n}: UsePopoverParams) {\n const autoMw = autoMiddlewareFor(placement);\n const offsetMiddleware = toOffsetMw(offset);\n const isSidePlacement = placement.startsWith('left') || placement.startsWith('right');\n const mergedShiftOptions = shiftOptions\n ? { padding: 8, ...shiftOptions }\n : { padding: 8 };\n\n const middleware = [\n // offset first (mirrors common Popper setups)\n ...(offsetMiddleware ? [offsetMiddleware] : []),\n\n // choose between autoPlacement (Popper's \"auto*\") OR flip()\n // only allow flip when not explicitly 'left*' or 'right*'\n ...(autoMw ? [autoMw] : allowFlip && !isSidePlacement ? [flipMw()] : []),\n\n // viewport collision adjustments\n ...(allowShift ? [shiftMw(mergedShiftOptions)] : []),\n\n // optional size constraining\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n ...(fitAvailableSpace ? [sizeMw({ apply: () => {} })] : []),\n ];\n\n // if placement is 'auto*', seed with any static placement; autoPlacement will pick the final one\n const seedPlacement: Placement = String(placement).startsWith('auto')\n ? 'bottom'\n : (placement as Placement);\n\n return useFloating({\n middleware,\n placement: seedPlacement,\n strategy: 'fixed',\n whileElementsMounted: freeze\n ? undefined\n : (reference, floating, update) =>\n autoUpdate(reference, floating, update, {\n ancestorResize: true,\n ancestorScroll: true,\n animationFrame: false,\n elementResize: hasResizeObserver,\n ...autoUpdateOptions,\n }),\n });\n}\n","import clsx from 'clsx';\nimport type { ComponentProps, PropsWithChildren } from 'react';\nimport React, { useEffect, useRef, useState } from 'react';\nimport { FocusScope } from '@react-aria/focus';\nimport { DialogPortalEntry } from './DialogPortal';\nimport { useDialog, useDialogIsOpen } from '../hooks';\nimport { type OffsetOpt, usePopoverPosition } from '../hooks/usePopoverPosition';\nimport type { PopperLikePlacement } from '../hooks';\nimport type { Placement } from '@floating-ui/react';\nimport { AriaLiveOutlet } from '../../Accessibility';\n\nexport interface DialogAnchorOptions {\n open: boolean;\n placement: PopperLikePlacement;\n referenceElement: HTMLElement | null;\n allowFlip?: boolean;\n updateKey?: unknown;\n updatePositionOnContentResize?: boolean;\n offset?: OffsetOpt;\n}\n\nexport function useDialogAnchor<T extends HTMLElement>({\n allowFlip,\n offset,\n open,\n placement,\n referenceElement,\n updateKey,\n updatePositionOnContentResize = false,\n}: DialogAnchorOptions) {\n const [popperElement, setPopperElement] = useState<T | null>(null);\n // keeps track of the first \"chosen\" placement (after popperElement is set) to avoid popper \"jumping\" to a different placement when it updates and finds a better fit; resets when popperElement is unset (!open)\n const [stabilisedChosenPlacement, setStabilisedChosenPlacement] =\n useState<Placement | null>(null);\n\n const {\n placement: chosenPlacement,\n refs,\n strategy,\n update,\n x,\n y,\n } = usePopoverPosition({\n allowFlip,\n freeze: true,\n offset,\n placement: stabilisedChosenPlacement ?? placement,\n });\n\n if (!stabilisedChosenPlacement && popperElement && placement !== chosenPlacement) {\n setStabilisedChosenPlacement(chosenPlacement);\n } else if (stabilisedChosenPlacement && !popperElement) {\n setStabilisedChosenPlacement(null);\n }\n\n // Freeze reference when dialog opens so submenus (e.g. ContextMenu level 2+) stay aligned to the original anchor\n const frozenReferenceRef = useRef<HTMLElement | null>(null);\n if (open && referenceElement && !frozenReferenceRef.current) {\n frozenReferenceRef.current = referenceElement;\n }\n if (!open) {\n frozenReferenceRef.current = null;\n }\n const effectiveReference = open ? frozenReferenceRef.current : referenceElement;\n\n useEffect(() => {\n refs.setReference(effectiveReference);\n }, [effectiveReference, refs]);\n\n useEffect(() => {\n refs.setFloating(popperElement);\n }, [popperElement, refs]);\n\n useEffect(() => {\n if (open && popperElement && effectiveReference) {\n // Re-run when reference becomes available (e.g. after ref is set) or when updateKey changes (e.g. submenu open)\n // Since the popper's reference element might not be (and usually is not) visible\n // all the time, it's safer to force popper update before showing it.\n // update is non-null only if popperElement is non-null\n update?.();\n }\n }, [open, placement, popperElement, update, updateKey, effectiveReference]);\n\n useEffect(() => {\n if (!popperElement || !updatePositionOnContentResize) return;\n\n const resizeObserver = new ResizeObserver(update);\n\n resizeObserver.observe(popperElement);\n\n return () => {\n resizeObserver.disconnect();\n };\n }, [popperElement, update, updatePositionOnContentResize]);\n\n if (popperElement && !open) {\n setPopperElement(null);\n }\n\n return {\n placement: stabilisedChosenPlacement ?? chosenPlacement,\n setPopperElement,\n styles: {\n left: x ?? 0,\n position: strategy,\n top: y ?? 0,\n } as React.CSSProperties,\n };\n}\n\nexport type DialogAnchorProps = PropsWithChildren<Partial<DialogAnchorOptions>> & {\n /**\n * Optional per-dialog override for outside-click dismissal.\n * If undefined, manager-level `DialogManager.closeOnClickOutside` is used.\n */\n closeOnClickOutside?: boolean;\n /**\n * Whether pressing Escape closes the dialog. Symmetric with `closeOnClickOutside`; set to\n * `false` for a dialog that should only be dismissed through its own close control (e.g. a\n * long-lived inspector panel kept open while the user works elsewhere).\n * @default true\n */\n closeOnEscape?: boolean;\n id: string;\n /**\n * Delay (ms) before unmounting after dialog closes.\n * Use this to keep the dialog in DOM long enough for CSS exit animations.\n * `0` means immediate unmount (no exit-animation window).\n */\n closeTransitionMs?: number;\n dialogManagerId?: string;\n focus?: boolean;\n trapFocus?: boolean;\n} & ComponentProps<'div'>;\n\nexport const DialogAnchor = ({\n allowFlip = true,\n children,\n className,\n closeOnClickOutside,\n closeOnEscape = true,\n closeTransitionMs = 0,\n dialogManagerId,\n focus = true,\n id,\n offset,\n placement = 'auto',\n referenceElement = null,\n tabIndex,\n trapFocus,\n updateKey,\n updatePositionOnContentResize,\n ...restDivProps\n}: DialogAnchorProps) => {\n /**\n * Rendering lifecycle notes:\n * - `open=true` renders dialog contents immediately.\n * - `open=false` can keep contents mounted for `closeTransitionMs` to allow CSS exit\n * animations before unmount.\n *\n * State exposed to CSS:\n * - `data-str-chat-dialog-state=\"open\"` while actively open.\n * - `data-str-chat-dialog-state=\"closing\"` during delayed unmount window.\n *\n * Consumers like `ContextMenu` combine:\n * - `data-str-chat-dialog-state` from this component, and\n * - `data-str-chat-placement` (e.g. `top-start`, `right-end`)\n * to select the correct closing keyframe in CSS (horizontal vs vertical roll direction).\n * In practice, JS only toggles state and timing (`closeTransitionMs`); CSS owns the\n * visual motion details (transform/easing), so animation behavior stays declarative.\n */\n const dialog = useDialog({ closeOnClickOutside, dialogManagerId, id });\n const open = useDialogIsOpen(id, dialogManagerId);\n const [shouldRender, setShouldRender] = useState(open);\n const closeTimeoutRef = useRef<NodeJS.Timeout | null>(null);\n const isClosing = !open && shouldRender;\n\n useEffect(() => {\n if (open) {\n setShouldRender(true);\n if (closeTimeoutRef.current) {\n clearTimeout(closeTimeoutRef.current);\n closeTimeoutRef.current = null;\n }\n return;\n }\n\n if (!shouldRender) return;\n if (!closeTransitionMs) {\n setShouldRender(false);\n return;\n }\n\n closeTimeoutRef.current = setTimeout(() => {\n setShouldRender(false);\n closeTimeoutRef.current = null;\n }, closeTransitionMs);\n }, [closeTransitionMs, open, shouldRender]);\n\n useEffect(\n () => () => {\n if (closeTimeoutRef.current) clearTimeout(closeTimeoutRef.current);\n },\n [],\n );\n\n const {\n placement: chosenPlacement,\n setPopperElement,\n styles,\n } = useDialogAnchor<HTMLDivElement>({\n allowFlip,\n offset,\n open: shouldRender,\n placement,\n referenceElement,\n updateKey,\n updatePositionOnContentResize,\n });\n\n useEffect(() => {\n if (!open || !closeOnEscape) return;\n const hideOnEscape = (event: KeyboardEvent) => {\n if (event.key !== 'Escape' || event.defaultPrevented) return;\n dialog?.close();\n };\n\n document.addEventListener('keyup', hideOnEscape);\n\n return () => {\n document.removeEventListener('keyup', hideOnEscape);\n };\n }, [closeOnEscape, dialog, open]);\n\n // prevent rendering the dialog contents if the dialog should not be open / shown\n if (!shouldRender) {\n return null;\n }\n\n const {\n ['aria-describedby']: ariaDescribedBy,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledBy,\n ['aria-modal']: ariaModal,\n role,\n ...anchorDivProps\n } = restDivProps;\n const resolvedRole = trapFocus ? (role ?? 'dialog') : role;\n const resolvedAriaModal = trapFocus ? true : ariaModal;\n const resolvedAriaLabel = ariaLabelledBy ? undefined : ariaLabel;\n\n return (\n <DialogPortalEntry dialogId={id} dialogManagerId={dialogManagerId}>\n <FocusScope autoFocus={focus} contain={trapFocus} restoreFocus>\n <div\n {...anchorDivProps}\n aria-describedby={ariaDescribedBy}\n aria-label={resolvedAriaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-modal={resolvedAriaModal}\n className={clsx('str-chat__dialog-contents', className)}\n data-str-chat-dialog-state={isClosing ? 'closing' : 'open'}\n data-str-chat-placement={chosenPlacement}\n data-testid='str-chat__dialog-contents'\n ref={setPopperElement}\n role={resolvedRole}\n style={styles}\n tabIndex={typeof tabIndex !== 'undefined' ? tabIndex : 0}\n >\n {children}\n {/* Render the live-region outlet inside the dialog subtree only when it\n is an `aria-modal` dialog, so announcements are not suppressed by\n assistive technologies. Non-modal popovers/menus skip it. */}\n {resolvedAriaModal && <AriaLiveOutlet layer={1} />}\n </div>\n </FocusScope>\n </DialogPortalEntry>\n );\n};\n","import clsx from 'clsx';\nimport React, {\n type ComponentPropsWithoutRef,\n type ComponentType,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport { useComponentContextIcons } from '../../context';\n\nexport type AvatarProps = {\n /**\n * Custom icon rendered when there is no image and no initials.\n * @deprecated Use the `icons.IconUser` slot on `ComponentContext` (via `<WithComponents overrides={{ icons: { IconUser: ... } }}>`) instead.\n * Passing this prop still wins over the context slot for backwards compatibility.\n */\n FallbackIcon?: ComponentType<ComponentPropsWithoutRef<'svg'>>;\n /** URL of the avatar image */\n imageUrl?: string;\n /** Name of the user (first and last name), used for avatar image alt text and title fallback */\n userName?: string;\n /**\n * Initials that are used directly instead of generating intials from `userName` property.\n * @note Providing more than two characters will break the default UI.\n */\n initials?: string;\n /** Online status indicator, not rendered if not of type boolean */\n isOnline?: boolean;\n size: '2xl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs' | (string & {}) | null;\n} & ComponentPropsWithoutRef<'div'>;\n\nconst getInitials = (name?: string) => {\n const regex = /(\\p{L}{1})\\p{L}+/gu;\n\n if (!name || name.trim().length === 0) {\n return '';\n }\n\n const initials = Array.from(name?.matchAll(regex) || []);\n\n if (!initials.length) {\n return '';\n }\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const startInitial = initials.at(0)![1];\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const endInitial = initials.length > 1 ? initials.at(-1)![1] : '';\n\n return `${startInitial}${endInitial}`;\n};\n\n/**\n * A round avatar image with fallback to username's first letter\n */\nexport const Avatar = ({\n className,\n FallbackIcon,\n imageUrl,\n initials: customInitials,\n isOnline,\n size,\n userName,\n ...rest\n}: AvatarProps) => {\n const { IconUser } = useComponentContextIcons();\n const ResolvedFallbackIcon = FallbackIcon ?? IconUser;\n const [error, setError] = useState(false);\n\n useEffect(() => () => setError(false), [imageUrl]);\n\n const nameString = userName?.toString().trim() || '';\n\n const sizeAwareInitials = useMemo(() => {\n const initials = customInitials || getInitials(nameString);\n\n if (size === 'sm' || size === 'xs') {\n return initials.charAt(0);\n }\n\n return initials;\n }, [nameString, size, customInitials]);\n\n const showImage = typeof imageUrl === 'string' && imageUrl && !error;\n\n return (\n <div\n className={clsx(`str-chat__avatar`, className, {\n 'str-chat__avatar--multiple-letters': sizeAwareInitials.length > 1,\n 'str-chat__avatar--no-letters': !sizeAwareInitials.length,\n 'str-chat__avatar--one-letter': sizeAwareInitials.length === 1,\n [`str-chat__avatar--size-${size}`]: typeof size === 'string',\n })}\n data-testid='avatar'\n role='button'\n title={userName}\n {...rest}\n >\n {typeof isOnline === 'boolean' && (\n <div\n className={clsx('str-chat__avatar-status-badge', {\n 'str-chat__avatar-status-badge--offline': !isOnline,\n 'str-chat__avatar-status-badge--online': isOnline,\n })}\n />\n )}\n {showImage ? (\n <img\n alt={nameString}\n className='str-chat__avatar-image'\n data-testid='avatar-img'\n onError={() => setError(true)}\n src={imageUrl}\n />\n ) : (\n <>\n {!!sizeAwareInitials.length && (\n <div className='str-chat__avatar-initials' data-testid='avatar-fallback'>\n {sizeAwareInitials}\n </div>\n )}\n {!sizeAwareInitials.length && <ResolvedFallbackIcon />}\n </>\n )}\n </div>\n );\n};\n","const MENU_KEYBOARD_NAVIGATION_KEYS = ['ArrowDown', 'ArrowUp', 'End', 'Home'] as const;\n\ntype MenuKeyboardNavigationKey = (typeof MENU_KEYBOARD_NAVIGATION_KEYS)[number];\n\nconst isMenuKeyboardNavigationKey = (key: string): key is MenuKeyboardNavigationKey =>\n (MENU_KEYBOARD_NAVIGATION_KEYS as readonly string[]).includes(key);\n\ntype GetNextRovingFocusIndexArgs = {\n activeIndex: number;\n itemCount: number;\n key: string;\n};\n\nexport const getNextRovingFocusIndex = ({\n activeIndex,\n itemCount,\n key,\n}: GetNextRovingFocusIndexArgs): number | null => {\n if (itemCount <= 0 || !isMenuKeyboardNavigationKey(key)) return null;\n\n const lastIndex = itemCount - 1;\n\n if (key === 'Home') return 0;\n if (key === 'End') return lastIndex;\n if (activeIndex === -1) return key === 'ArrowUp' ? lastIndex : 0;\n if (key === 'ArrowUp') return activeIndex <= 0 ? lastIndex : activeIndex - 1;\n\n return activeIndex >= lastIndex ? 0 : activeIndex + 1;\n};\n\ntype RovingFocusKeyboardEvent = {\n currentTarget: Element;\n key: string;\n preventDefault: () => void;\n};\n\ntype CreateRovingFocusKeyDownHandlerParams<T extends { focus: () => void }> = {\n focusItem?: (item: T, event: RovingFocusKeyboardEvent) => void;\n getActiveIndex?: (items: T[], event: RovingFocusKeyboardEvent) => number;\n getItems: (event: RovingFocusKeyboardEvent) => T[];\n};\n\nconst getDefaultActiveIndex = <T extends { focus: () => void }>(items: T[]) => {\n const activeElement = document.activeElement;\n if (!(activeElement instanceof Element)) return -1;\n\n return items.findIndex((item) => item instanceof Element && item === activeElement);\n};\n\nexport const createRovingFocusKeyDownHandler = <T extends { focus: () => void }>({\n focusItem = (item) => item.focus(),\n getActiveIndex = (items) => getDefaultActiveIndex(items),\n getItems,\n}: CreateRovingFocusKeyDownHandlerParams<T>) => {\n const handleKeyDown = (event: RovingFocusKeyboardEvent) => {\n const items = getItems(event);\n const activeIndex = getActiveIndex(items, event);\n const nextIndex = getNextRovingFocusIndex({\n activeIndex,\n itemCount: items.length,\n key: event.key,\n });\n\n if (nextIndex === null) return;\n\n event.preventDefault();\n const nextItem = items[nextIndex];\n if (!nextItem) return;\n focusItem(nextItem, event);\n };\n\n return handleKeyDown;\n};\n","import clsx from 'clsx';\nimport React, {\n type ComponentProps,\n type ComponentPropsWithoutRef,\n type ComponentType,\n type ReactNode,\n useCallback,\n useContext,\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { type AvatarProps, Avatar as DefaultAvatar } from '../../Avatar';\nimport type { PopperLikePlacement } from '../hooks';\nimport { useDialogIsOpen, useDialogOnNearestManager } from '../hooks';\nimport type { DialogAnchorProps } from '../service/DialogAnchor';\nimport { DialogAnchor, useDialogAnchor } from '../service/DialogAnchor';\nimport {\n useComponentContext,\n useComponentContextIcons,\n useTranslationContext,\n} from '../../../context';\nimport { createRovingFocusKeyDownHandler } from '../../../a11y/a11yUtils';\nimport { VisuallyHidden } from '../../VisuallyHidden';\nimport { useStableId } from '../../UtilityComponents/useStableId';\n\n/**\n * ContextMenu module\n *\n * What this file provides\n * - Primitives for contextual action UIs:\n * `ContextMenu`, `ContextMenuContent`, `ContextMenuButton`, `ContextMenuHeader`,\n * `ContextMenuBody`, `ContextMenuBackButton`, and user/emoji button variants.\n * - A small runtime context (`useContextMenuContext`) used by menu items to:\n * - close the current menu (`closeMenu`)\n * - open a submenu (`openSubmenu`)\n * - return to parent level (`returnToParentMenu`)\n *\n * Rendering modes\n * - Anchored mode (most common): pass `id` and `referenceElement`.\n * The component renders inside `DialogAnchor` and uses dialog manager state.\n * - Inline mode: omit anchor props and render as a plain contextual list.\n * - Outside click dismissal can be overridden per menu via `closeOnClickOutside`;\n * otherwise manager default is used.\n *\n * Submenu model\n * - Submenus are represented as a stack of menu levels.\n * - Each level can define `Header`, `Submenu`, `items`, `ItemsWrapper`,\n * and `menuClassName`.\n * - Opening submenu pushes a level to the stack; going back pops one level.\n * - When anchored menu closes, stack resets to root to avoid stale submenu state\n * on next open.\n *\n * Animation model\n * - Root menu open/close is handled by `DialogAnchor` transition timing.\n * - `ContextMenu` defaults `closeTransitionMs` to `130` so close animations can be visible.\n * - `DialogAnchor` marks rendered content with `data-str-chat-dialog-state`:\n * - `open` while visible\n * - `closing` during delayed unmount window (`closeTransitionMs`)\n * - Context-menu closing keyframes in `ContextMenu.scss` target\n * `[data-str-chat-dialog-state='closing']` + placement selectors.\n * - Level-to-level transitions are directional:\n * - forward: parent -> submenu\n * - backward: submenu -> parent\n * - Direction is tracked in `ContextMenu` and passed to `ContextMenuContent`.\n * - `ContextMenuContent` bumps an internal key for `ContextMenuBody` so React\n * remounts the body and CSS enter animation reliably restarts on each level change.\n * - Initial/root menu render does not apply submenu forward/backward classes;\n * directional animation classes are used only for submenu transitions.\n * - `enableAnimations` can disable content animations through data attributes/CSS.\n * - `submenuTransitionDurationMs` controls how long directional transition state is kept.\n *\n * Submenu popover behavior (`ContextMenuButton` with `Submenu`)\n * - Submenu can be rendered by passing `Submenu` (and optional placement/container props).\n * - Default submenu roll axis is `x` (override with `submenuRollAxis`).\n * - Hover/focus management uses a \"keep open\" ref flag plus lazy close timeout to avoid\n * accidental submenu dismissal when moving pointer/focus between parent and submenu.\n *\n * Customization via `ComponentContext`\n * - `ComponentContext.ContextMenu` replaces the whole menu component at SDK call sites.\n * - `ComponentContext.ContextMenuContent` replaces content-level behavior while preserving\n * default anchoring/dialog integration from `ContextMenu`.\n * - Built-in call sites (message actions, channel list action buttons, attachment selector,\n * suggestion list) resolve `ContextMenu` from `ComponentContext` with fallback to default.\n */\nexport type BaseContextMenuButtonProps = {\n details?: ReactNode;\n hasSubMenu?: boolean;\n label?: ReactNode;\n Icon?: ComponentType<ComponentProps<'svg'>>;\n /**\n * @deprecated Use the `icons.IconChevronRight` slot on `ComponentContext` (via `<WithComponents overrides={{ icons: { IconChevronRight: ... } }}>`) instead.\n * Passing this prop still wins over the context slot for backwards compatibility.\n */\n SubmenuIcon?: ComponentType<ComponentProps<'svg'>>;\n variant?: 'destructive';\n} & ComponentProps<'button'>;\n\nexport const BaseContextMenuButton = ({\n children,\n className,\n details,\n hasSubMenu,\n Icon,\n label,\n role = 'menuitem',\n SubmenuIcon,\n variant,\n ...props\n}: BaseContextMenuButtonProps) => {\n const { IconChevronRight } = useComponentContextIcons();\n const ResolvedSubmenuIcon = SubmenuIcon ?? IconChevronRight;\n return (\n <button\n {...props}\n className={clsx(\n 'str-chat__context-menu__button',\n {\n 'str-chat__context-menu__button--with-submenu': hasSubMenu,\n [`str-chat__context-menu__button--${variant}`]: typeof variant === 'string',\n },\n className,\n )}\n role={role}\n type='button'\n >\n {Icon && <Icon className='str-chat__context-menu__button__icon' />}\n {label ? (\n <>\n <div className='str-chat__context-menu__button__label'>{label}</div>\n <div className='str-chat__context-menu__button__details'>{details}</div>\n </>\n ) : (\n <div className='str-chat__context-menu__button__label'>{children}</div>\n )}\n {!!hasSubMenu && (\n <ResolvedSubmenuIcon className='str-chat__context-menu__button__submenu-icon' />\n )}\n </button>\n );\n};\n\nexport type UserContextMenuButtonProps = Pick<AvatarProps, 'imageUrl' | 'userName'> &\n ComponentProps<'button'>;\n\nexport const UserContextMenuButton = ({\n children,\n className,\n imageUrl,\n role = 'menuitem',\n userName,\n ...props\n}: UserContextMenuButtonProps) => {\n const { Avatar = DefaultAvatar } = useComponentContext();\n return (\n <button\n {...props}\n className={clsx(\n 'str-chat__context-menu__button str-chat__user-context-menu__button',\n className,\n )}\n role={role}\n type='button'\n >\n {/* The avatar is decorative here: the button already carries the user's name as its\n label, so exposing the avatar (its fallback initials, title, and role=\"button\")\n to assistive tech only adds noise to the option's accessible name. */}\n <Avatar aria-hidden imageUrl={imageUrl} size='sm' userName={userName} />\n <div className='str-chat__context-menu__button__label'>{children ?? userName}</div>\n </button>\n );\n};\n\nexport type EmojiContextMenuButtonProps = { emoji: string } & Pick<\n BaseContextMenuButtonProps,\n 'label'\n> &\n ComponentProps<'button'>;\n\nexport const EmojiContextMenuButton = ({\n children,\n className,\n emoji,\n label,\n role = 'menuitem',\n ...props\n}: EmojiContextMenuButtonProps) => (\n <button\n {...props}\n className={clsx(\n 'str-chat__context-menu__button str-chat__emoji-context-menu__button',\n className,\n )}\n role={role}\n type='button'\n >\n <span className='str-chat__context-menu__button__emoji str-chat__emoji-item--entity'>\n {emoji}\n </span>\n <div className='str-chat__context-menu__button__label'>{children ?? label}</div>\n </button>\n);\n\ntype ButtonWithSubmenuProps = {\n Submenu: ComponentType;\n submenuContainerProps?: ComponentProps<'div'>;\n submenuPlacement?: PopperLikePlacement;\n submenuRollAxis?: 'x' | 'y';\n};\n\nconst ContextMenuButtonWithSubmenu = ({\n children,\n className,\n Submenu,\n submenuContainerProps,\n submenuPlacement = 'right-start',\n submenuRollAxis = 'x',\n ...buttonProps\n}: BaseContextMenuButtonProps & ButtonWithSubmenuProps) => {\n const { className: submenuClassName, ...submenuContainerRestProps } =\n submenuContainerProps ?? {};\n const { registerDialogSubmenu, unregisterDialogSubmenu } = useContextMenuContext();\n const buttonRef = useRef<HTMLButtonElement | null>(null);\n const [dialogContainer, setDialogContainer] = useState<HTMLDivElement | null>(null);\n const keepSubmenuOpenFlag = useRef(false);\n const dialogCloseTimeout = useRef<NodeJS.Timeout | null>(null);\n const dialogId = useMemo(() => `submenu-${Math.random().toString(36).slice(2)}`, []);\n const { dialog, dialogManager } = useDialogOnNearestManager({ id: dialogId });\n const dialogIsOpen = useDialogIsOpen(dialogId, dialogManager?.id);\n\n useEffect(() => {\n if (!dialogIsOpen) return;\n registerDialogSubmenu();\n return () => unregisterDialogSubmenu();\n }, [dialogIsOpen, registerDialogSubmenu, unregisterDialogSubmenu]);\n const {\n placement: chosenPlacement,\n setPopperElement,\n styles,\n } = useDialogAnchor<HTMLDivElement>({\n offset: 8,\n open: dialogIsOpen,\n placement: submenuPlacement,\n referenceElement: buttonRef.current,\n });\n\n const closeDialogLazily = useCallback(() => {\n if (dialogCloseTimeout.current) clearTimeout(dialogCloseTimeout.current);\n dialogCloseTimeout.current = setTimeout(() => {\n if (keepSubmenuOpenFlag.current) return;\n dialog.close();\n }, 100);\n }, [dialog]);\n\n const keepSubmenuOpen = useCallback(() => {\n keepSubmenuOpenFlag.current = true;\n }, []);\n\n const allowToCloseSubmenu = useCallback(() => {\n keepSubmenuOpenFlag.current = false;\n }, []);\n\n const closeSubmenu = useCallback(() => {\n allowToCloseSubmenu();\n closeDialogLazily();\n }, [allowToCloseSubmenu, closeDialogLazily]);\n\n const handleClose = useCallback(\n (event: Event) => {\n const parentButton = buttonRef.current;\n if (!dialogIsOpen || !parentButton) return;\n event.stopPropagation();\n closeDialogLazily();\n parentButton.focus();\n },\n [closeDialogLazily, dialogIsOpen, buttonRef],\n );\n\n const handleFocusParentButton = () => {\n if (dialogIsOpen) return;\n dialog.open();\n keepSubmenuOpen();\n };\n\n useEffect(() => {\n const parentButton = buttonRef.current;\n if (!dialogIsOpen || !parentButton) return;\n const hideOnEscape = (event: KeyboardEvent) => {\n if (event.key !== 'Escape') return;\n handleClose(event);\n closeSubmenu();\n };\n\n document.addEventListener('keyup', hideOnEscape, { capture: true });\n\n return () => {\n document.removeEventListener('keyup', hideOnEscape, { capture: true });\n };\n }, [dialogIsOpen, handleClose, closeSubmenu]);\n\n return (\n <>\n <BaseContextMenuButton\n aria-expanded={dialogIsOpen}\n aria-haspopup='menu'\n className={clsx(className, 'str_chat__button-with-submenu', {\n 'str_chat__button-with-submenu--submenu-open': dialogIsOpen,\n })}\n hasSubMenu\n onBlur={closeSubmenu}\n onClick={(event) => {\n event.stopPropagation();\n dialog.toggle();\n }}\n onFocus={handleFocusParentButton}\n onMouseEnter={handleFocusParentButton}\n onMouseLeave={closeSubmenu}\n {...buttonProps}\n ref={buttonRef}\n >\n {children}\n </BaseContextMenuButton>\n {dialogIsOpen && (\n <div\n className={clsx('str-chat__context-menu__submenu-container', submenuClassName)}\n data-str-chat-placement={chosenPlacement}\n data-str-chat-roll-axis={submenuRollAxis}\n onBlur={(event) => {\n const isBlurredDescendant =\n event.relatedTarget instanceof Node &&\n dialogContainer?.contains(event.relatedTarget);\n if (isBlurredDescendant) return;\n closeSubmenu();\n }}\n onFocus={keepSubmenuOpen}\n onMouseEnter={keepSubmenuOpen}\n onMouseLeave={closeSubmenu}\n ref={(element) => {\n setPopperElement(element);\n setDialogContainer(element);\n }}\n style={styles}\n tabIndex={-1}\n {...submenuContainerRestProps}\n >\n <Submenu />\n </div>\n )}\n </>\n );\n};\n\ntype ContextMenuButtonProps = BaseContextMenuButtonProps &\n Partial<ButtonWithSubmenuProps>;\n\nexport const ContextMenuButton = (props: ContextMenuButtonProps) => {\n const {\n Submenu,\n submenuContainerProps,\n submenuPlacement,\n submenuRollAxis,\n ...buttonProps\n } = props;\n if (Submenu) {\n return (\n <ContextMenuButtonWithSubmenu\n {...buttonProps}\n Submenu={Submenu}\n submenuContainerProps={submenuContainerProps}\n submenuPlacement={submenuPlacement}\n submenuRollAxis={submenuRollAxis}\n />\n );\n }\n\n return <BaseContextMenuButton {...buttonProps} />;\n};\n\nexport const ContextMenuBackButton = ({\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n children,\n className,\n role = 'menuitem',\n ...props\n}: ComponentProps<'button'>) => {\n const { t } = useTranslationContext();\n const generatedBackNavigationLabelId = useStableId();\n const generatedVisibleLabelId = useStableId();\n const resolvedAriaLabel = ariaLabel ?? t('aria/Back to parent menu button');\n const resolvedAriaLabelledBy =\n ariaLabelledBy ?? `${generatedVisibleLabelId} ${generatedBackNavigationLabelId}`;\n\n return (\n <button\n {...props}\n aria-labelledby={resolvedAriaLabelledBy}\n className={clsx('str-chat__context-menu__back-button', className)}\n role={role}\n type='button'\n >\n {!ariaLabelledBy && (\n <VisuallyHidden id={generatedBackNavigationLabelId}>\n {resolvedAriaLabel}\n </VisuallyHidden>\n )}\n <span\n className='str-chat__context-menu__back-button__content'\n id={generatedVisibleLabelId}\n >\n {children}\n </span>\n </button>\n );\n};\n\nexport const ContextMenuHeader = ({\n children,\n className,\n ...props\n}: ComponentProps<'div'>) => (\n <div {...props} className={clsx('str-chat__context-menu__header', className)}>\n {children}\n </div>\n);\n\nexport const ContextMenuBody = ({\n children,\n className,\n ...props\n}: ComponentProps<'div'>) => (\n <div {...props} className={clsx('str-chat__context-menu__body', className)}>\n {children}\n </div>\n);\n\nexport const ContextMenuRoot = React.forwardRef<HTMLDivElement, ComponentProps<'div'>>(\n function ContextMenuRoot({ className, role = 'menu', ...props }, ref) {\n return (\n <div\n {...props}\n className={clsx('str-chat__context-menu', className)}\n ref={ref}\n role={role}\n />\n );\n },\n);\n\nexport type ContextMenuHeaderComponent = ComponentType;\nexport type ContextMenuSubmenu = ComponentType;\n\nexport type ContextMenuOpenSubmenuParams = Omit<\n ContextMenuLevel,\n 'focusRestoreRequest' | 'items'\n> & {\n focusReturnTarget?: HTMLElement | null;\n};\n\nexport type ContextMenuItemProps = ComponentProps<'button'>;\n\nexport type ContextMenuItemComponent = ComponentType<ContextMenuItemProps>;\n\nexport const DEFAULT_CONTEXT_MENU_KEYBOARD_NAVIGATION_ITEM_SELECTOR = [\n '[role=\"menuitem\"]:not(:disabled)',\n '[role=\"menuitemradio\"]:not(:disabled)',\n '[role=\"menuitemcheckbox\"]:not(:disabled)',\n].join(',');\n\nconst isVisibleContextMenuKeyboardNavigationItem = (item: HTMLElement) => {\n // Fast path: offsetParent is null for display:none elements (and their descendants).\n // offsetHeight covers position:fixed elements which have no offsetParent.\n if (item.offsetParent !== null || item.offsetHeight > 0) return true;\n\n // In environments without layout (e.g. jsdom), offsetParent/offsetHeight are always 0/null.\n // Fall back to checking inline style and the `hidden` attribute.\n if (item.hidden) return false;\n const display = item.style.display;\n if (display === 'none') return false;\n\n // If no layout info and no explicit hiding signal, assume visible.\n return true;\n};\n\ntype ContextMenuFocusRestoreRequest = {\n /** Positional fallback used when the target element is no longer in the DOM. */\n index: number;\n target: HTMLElement | null;\n};\n\nconst getVisibleContextMenuKeyboardNavigationItems = (\n contextMenuRoot: Element | null,\n itemSelector: string = DEFAULT_CONTEXT_MENU_KEYBOARD_NAVIGATION_ITEM_SELECTOR,\n) =>\n Array.from(contextMenuRoot?.querySelectorAll<HTMLElement>(itemSelector) ?? []).filter(\n isVisibleContextMenuKeyboardNavigationItem,\n );\n\nconst createContextMenuFocusRestoreRequest = ({\n contextMenuRoot,\n focusReturnTarget,\n}: {\n contextMenuRoot: Element | null;\n focusReturnTarget?: HTMLElement | null;\n}): ContextMenuFocusRestoreRequest => {\n const target =\n focusReturnTarget ??\n (document.activeElement instanceof HTMLElement ? document.activeElement : null);\n\n if (!target) return { index: -1, target: null };\n\n const index = getVisibleContextMenuKeyboardNavigationItems(contextMenuRoot).findIndex(\n (menuItem) => menuItem === target,\n );\n\n return { index, target };\n};\n\nconst resolveContextMenuFocusRestoreTarget = ({\n contextMenuRoot,\n request,\n}: {\n contextMenuRoot: Element | null;\n request: ContextMenuFocusRestoreRequest | null;\n}) => {\n if (!request) return null;\n\n // Prefer the original element if it's still in the DOM.\n if (request.target?.isConnected) return request.target;\n\n // Fall back to positional index when the element has been unmounted.\n if (request.index >= 0) {\n return (\n getVisibleContextMenuKeyboardNavigationItems(contextMenuRoot)[request.index] ?? null\n );\n }\n\n return null;\n};\n\nconst CONTEXT_MENU_HEADER_SELECTOR = '.str-chat__context-menu__header';\n\n/**\n * Where focus should land when a submenu OPENS (forward navigation):\n * - `'first-item'` (default): the first focusable item that is NOT in the header — i.e. the first\n * real menu option, skipping a back-button header — falling back to the very first item when the\n * body has none.\n * - `'first'`: the first focusable item overall (the back-button header when present).\n * - `'none'`: do not move focus on open.\n */\nexport type ContextMenuSubmenuInitialFocus = 'first' | 'first-item' | 'none';\n\nconst resolveSubmenuInitialFocusTarget = ({\n contextMenuRoot,\n initialFocus,\n itemSelector,\n}: {\n contextMenuRoot: Element | null;\n initialFocus: ContextMenuSubmenuInitialFocus;\n itemSelector?: string;\n}): HTMLElement | null => {\n if (initialFocus === 'none') return null;\n\n const items = getVisibleContextMenuKeyboardNavigationItems(\n contextMenuRoot,\n itemSelector,\n );\n if (initialFocus === 'first') return items[0] ?? null;\n\n // 'first-item': skip the header (e.g. the back button) and land on the first content item;\n // fall back to the first item overall if the body has no focusable item.\n return (\n items.find((item) => !item.closest(CONTEXT_MENU_HEADER_SELECTOR)) ?? items[0] ?? null\n );\n};\n\nexport type ContextMenuKeyboardNavigation = {\n /**\n * CSS selector used to collect focusable menu items.\n * Defaults to `[role=\"menuitem\"]:not(:disabled)`.\n */\n itemSelector?: string;\n};\n\ntype ContextMenuContextValue = {\n anchorReferenceElement?: HTMLElement | null;\n closeMenu: () => void;\n openSubmenu: (params: ContextMenuOpenSubmenuParams) => void;\n registerDialogSubmenu: () => void;\n returnToParentMenu: () => void;\n unregisterDialogSubmenu: () => void;\n};\n\nconst ContextMenuContext = React.createContext<ContextMenuContextValue | undefined>(\n undefined,\n);\n\nexport const useContextMenuContext = () =>\n useContext(ContextMenuContext) as ContextMenuContextValue;\n\ntype ContextMenuLevel = {\n focusRestoreRequest?: ContextMenuFocusRestoreRequest;\n /**\n * Where focus lands when this level is opened as a submenu (forward navigation). Defaults to\n * `'first-item'`. Ignored for the root level (its initial focus is the dialog's `autoFocus`).\n */\n initialFocus?: ContextMenuSubmenuInitialFocus;\n items?: ContextMenuItemComponent[];\n Submenu?: ContextMenuSubmenu;\n Header?: ContextMenuHeaderComponent;\n ItemsWrapper?: ComponentType;\n menuClassName?: string;\n};\n\ntype ContextMenuBaseProps = ComponentPropsWithoutRef<'div'> & {\n backButtonAriaLabel?: string;\n backLabel?: ReactNode;\n enableAnimations?: boolean;\n Header?: ContextMenuHeaderComponent;\n /**\n * Customizes roving-focus keyboard navigation for menu items.\n * ArrowUp/ArrowDown/Home/End move focus across items matched by\n * `keyboardNavigation.itemSelector` (defaults to `[role=\"menuitem\"]:not(:disabled)`).\n * Navigation is always enabled; use this prop only to override the item selector.\n */\n keyboardNavigation?: ContextMenuKeyboardNavigation;\n onClose?: () => void;\n onMenuLevelChange?: (level: number) => void;\n /** Duration (ms) to keep submenu transition direction active for forward/backward animations. */\n submenuTransitionDurationMs?: number;\n} & ContextMenuLevel;\n\n/** When provided, ContextMenu renders inside DialogAnchor and wires menu level for submenu alignment. */\ntype ContextMenuAnchorProps = Partial<\n Pick<\n DialogAnchorProps,\n | 'id'\n | 'dialogManagerId'\n | 'placement'\n | 'referenceElement'\n | 'tabIndex'\n | 'trapFocus'\n | 'allowFlip'\n | 'closeOnClickOutside'\n | 'focus'\n | 'closeTransitionMs'\n | 'offset'\n >\n>;\n\nexport type ContextMenuProps = ContextMenuBaseProps & ContextMenuAnchorProps;\n\nexport type ContextMenuContentProps = ContextMenuBaseProps & {\n anchorReferenceElement?: HTMLElement | null;\n transitionDirection?: 'forward' | 'backward';\n};\n\n/**\n * Internal/default content renderer for {@link ContextMenu}.\n *\n * Override this through `ComponentContext.ContextMenuContent` when you need to\n * customize submenu/back navigation behavior while keeping the same anchor/focus\n * handling from `ContextMenu`.\n */\nexport function ContextMenuContent({\n anchorReferenceElement,\n backButtonAriaLabel,\n backLabel,\n children,\n className,\n enableAnimations = true,\n Header,\n items,\n ItemsWrapper,\n keyboardNavigation,\n menuClassName,\n onClose,\n onMenuLevelChange,\n transitionDirection,\n ...props\n}: ContextMenuContentProps) {\n const { t } = useTranslationContext();\n const { IconChevronLeft } = useComponentContextIcons();\n const resolvedBackLabel = backLabel ?? t('Back');\n const {\n ['aria-describedby']: rootAriaDescribedBy,\n ['aria-label']: rootAriaLabel,\n ['aria-labelledby']: rootAriaLabelledBy,\n ...contextMenuRootProps\n } = props;\n const rootLevel = useMemo<ContextMenuLevel>(\n () => ({\n Header,\n items,\n ItemsWrapper,\n menuClassName,\n }),\n [Header, items, ItemsWrapper, menuClassName],\n );\n const [menuStack, setMenuStack] = useState<ContextMenuLevel[]>(() => [rootLevel]);\n const [menuBodyAnimationKey, setMenuBodyAnimationKey] = useState(0);\n const contextMenuRootRef = useRef<HTMLDivElement | null>(null);\n const focusRestoreRequestRef = useRef<ContextMenuFocusRestoreRequest | null>(null);\n // Where to place focus when the NEXT level opens (forward navigation). Symmetric to\n // `focusRestoreRequestRef`, which handles returning to the parent (backward).\n const pendingForwardFocusRef = useRef<ContextMenuSubmenuInitialFocus | null>(null);\n const activeMenu = menuStack[menuStack.length - 1];\n\n const keyboardNavigationItemSelector =\n keyboardNavigation?.itemSelector ??\n DEFAULT_CONTEXT_MENU_KEYBOARD_NAVIGATION_ITEM_SELECTOR;\n\n const ActiveMenuItemsWrapper = activeMenu.ItemsWrapper ?? React.Fragment;\n\n const closeMenu = useCallback(() => {\n onClose?.();\n }, [onClose]);\n\n const openSubmenu = useCallback(\n ({\n focusReturnTarget,\n Header,\n initialFocus = 'first-item',\n ItemsWrapper: SubmenuItemsWrapper,\n menuClassName,\n Submenu,\n }: ContextMenuOpenSubmenuParams) => {\n // Record where focus should land in the opening submenu, so the level-change effect can move\n // it there once the new level has rendered (mirrors the backward focus restore). Clear any\n // backward request so the forward intent is what applies for this transition.\n pendingForwardFocusRef.current = initialFocus;\n focusRestoreRequestRef.current = null;\n const nextLevel: ContextMenuLevel = {\n focusRestoreRequest: createContextMenuFocusRestoreRequest({\n contextMenuRoot: contextMenuRootRef.current,\n focusReturnTarget,\n }),\n Header,\n initialFocus,\n ItemsWrapper: SubmenuItemsWrapper ?? ItemsWrapper,\n menuClassName,\n Submenu,\n };\n setMenuStack((current) => [...current, nextLevel]);\n },\n [ItemsWrapper],\n );\n\n const returnToParentMenu = useCallback(() => {\n setMenuStack((current) => {\n if (current.length <= 1) return current;\n focusRestoreRequestRef.current =\n current[current.length - 1]?.focusRestoreRequest ?? null;\n // Clear any forward intent so the backward restore is what applies for this transition.\n pendingForwardFocusRef.current = null;\n return current.slice(0, -1);\n });\n }, []);\n\n useEffect(() => {\n setMenuStack((current) => {\n if (current.length === 1 && current[0] === rootLevel) return current;\n return [rootLevel];\n });\n }, [rootLevel]);\n\n useEffect(() => {\n onMenuLevelChange?.(menuStack.length);\n }, [menuStack.length, onMenuLevelChange]);\n\n // Move focus on menu-level changes. Runs in a LAYOUT effect (before paint) and re-runs when the\n // body remounts (`menuBodyAnimationKey`) — the body is remounted a step after the level changes\n // to restart the enter animation, which removes the just-focused node. Re-applying focus in the\n // same commit that mounts the new body keeps focus in the menu with no `<body>` flicker (a naive\n // post-paint / single-rAF focus lands one frame before that remount and gets dropped). The\n // request refs are NOT consumed here (so this re-run can re-apply); each transition\n // (`openSubmenu`/`returnToParentMenu`) sets one ref and clears the other.\n useLayoutEffect(() => {\n const focusRestoreRequest = focusRestoreRequestRef.current;\n const pendingForwardFocus = pendingForwardFocusRef.current;\n if (!focusRestoreRequest && !pendingForwardFocus) return;\n\n const contextMenuRoot = contextMenuRootRef.current;\n // Backward (return to parent) restores the remembered element; it takes precedence.\n const target = focusRestoreRequest\n ? resolveContextMenuFocusRestoreTarget({\n contextMenuRoot,\n request: focusRestoreRequest,\n })\n : // Forward (submenu opened): move focus INTO the new level per its `initialFocus`, so it is\n // not lost to <body> when the parent item that had focus unmounts.\n resolveSubmenuInitialFocusTarget({\n contextMenuRoot,\n initialFocus: pendingForwardFocus as ContextMenuSubmenuInitialFocus,\n itemSelector: keyboardNavigationItemSelector,\n });\n\n target?.focus();\n }, [keyboardNavigationItemSelector, menuBodyAnimationKey, menuStack.length]);\n\n useEffect(() => {\n if (!transitionDirection) return;\n setMenuBodyAnimationKey((value) => value + 1);\n }, [transitionDirection, menuStack.length]);\n\n const dialogSubmenuOpenCountRef = useRef(0);\n\n const registerDialogSubmenu = useCallback(() => {\n dialogSubmenuOpenCountRef.current += 1;\n }, []);\n\n const unregisterDialogSubmenu = useCallback(() => {\n dialogSubmenuOpenCountRef.current = Math.max(\n 0,\n dialogSubmenuOpenCountRef.current - 1,\n );\n }, []);\n\n const rovingFocusKeyDownHandler = useMemo(\n () =>\n createRovingFocusKeyDownHandler<HTMLElement>({\n getItems: (event) =>\n getVisibleContextMenuKeyboardNavigationItems(\n event.currentTarget,\n keyboardNavigationItemSelector,\n ),\n }),\n [keyboardNavigationItemSelector],\n );\n\n const escapeConsumedRef = useRef(false);\n\n const keyboardNavigationHandler = useCallback(\n (event: React.KeyboardEvent<HTMLElement>) => {\n if (event.key === 'Escape') {\n if (dialogSubmenuOpenCountRef.current > 0) return;\n\n event.preventDefault();\n event.stopPropagation();\n\n if (menuStack.length > 1) {\n escapeConsumedRef.current = true;\n returnToParentMenu();\n } else {\n closeMenu();\n }\n return;\n }\n\n rovingFocusKeyDownHandler(event);\n },\n [closeMenu, menuStack.length, returnToParentMenu, rovingFocusKeyDownHandler],\n );\n\n const suppressEscapeKeyUp = useCallback((event: React.KeyboardEvent<HTMLElement>) => {\n if (event.key === 'Escape' && escapeConsumedRef.current) {\n escapeConsumedRef.current = false;\n event.stopPropagation();\n }\n }, []);\n const isSubmenuLevel = menuStack.length > 1;\n\n return (\n <ContextMenuContext.Provider\n value={{\n anchorReferenceElement,\n closeMenu,\n openSubmenu,\n registerDialogSubmenu,\n returnToParentMenu,\n unregisterDialogSubmenu,\n }}\n >\n <ContextMenuRoot\n aria-describedby={isSubmenuLevel ? undefined : rootAriaDescribedBy}\n aria-label={isSubmenuLevel ? t('aria/Submenu') : rootAriaLabel}\n aria-labelledby={isSubmenuLevel ? undefined : rootAriaLabelledBy}\n className={clsx(className, activeMenu.menuClassName)}\n data-str-chat-enable-animations={enableAnimations}\n onKeyDownCapture={keyboardNavigationHandler}\n onKeyUpCapture={suppressEscapeKeyUp}\n ref={contextMenuRootRef}\n {...contextMenuRootProps}\n >\n {activeMenu.Header ? (\n <activeMenu.Header />\n ) : menuStack.length > 1 ? (\n <ContextMenuHeader>\n <ContextMenuBackButton\n aria-label={backButtonAriaLabel}\n onClick={returnToParentMenu}\n >\n <IconChevronLeft />\n <span>{resolvedBackLabel}</span>\n </ContextMenuBackButton>\n </ContextMenuHeader>\n ) : null}\n <ContextMenuBody\n className={clsx({\n 'str-chat__context-menu__body--submenu-backward':\n transitionDirection === 'backward',\n 'str-chat__context-menu__body--submenu-forward':\n transitionDirection === 'forward',\n })}\n key={`context-menu-body-${menuStack.length}-${menuBodyAnimationKey}`}\n >\n {activeMenu.Submenu ? (\n <activeMenu.Submenu />\n ) : (\n <ActiveMenuItemsWrapper>\n {typeof children !== 'undefined'\n ? children\n : activeMenu.items?.map((Item, index) => (\n <Item key={`context-menu-item-${index}`} />\n ))}\n </ActiveMenuItemsWrapper>\n )}\n </ContextMenuBody>\n </ContextMenuRoot>\n </ContextMenuContext.Provider>\n );\n}\n\n/**\n * Contextual actions menu that can be used in two modes:\n *\n * - Anchored dialog mode: pass `id` + `referenceElement` (submenu-aware positioning).\n * - Inline mode: omit `id` and render a plain contextual list.\n *\n * Customization via `ComponentContext`:\n *\n * - `ContextMenu`: replace the whole menu container/behavior.\n * - `ContextMenuContent`: keep default container behavior but customize menu content\n * rendering (items, submenu transitions, back navigation UI).\n * - To customize outside-click dismissal via `ComponentContext`, provide a custom\n * `ContextMenu` that sets `closeOnClickOutside`:\n *\n * ```tsx\n * const CustomContextMenu = (props: ContextMenuProps) => (\n * <ContextMenu {...props} closeOnClickOutside={false} />\n * );\n *\n * <ComponentProvider value={{ ContextMenu: CustomContextMenu }}>\n * <Chat client={client}>{children}</Chat>\n * </ComponentProvider>\n * ```\n *\n * Example:\n * ```tsx\n * <ComponentProvider\n * value={{\n * ContextMenu: MyContextMenu,\n * ContextMenuContent: MyContextMenuContent,\n * }}\n * >\n * <Chat client={client}>{children}</Chat>\n * </ComponentProvider>\n * ```\n */\nexport const ContextMenu = (props: ContextMenuProps) => {\n const { ContextMenuContent: ContextMenuContentComponent = ContextMenuContent } =\n useComponentContext();\n const {\n allowFlip,\n closeOnClickOutside,\n closeTransitionMs = 130,\n dialogManagerId,\n focus,\n id,\n offset = 8,\n onMenuLevelChange: onMenuLevelChangeProp,\n placement,\n referenceElement,\n submenuTransitionDurationMs,\n tabIndex,\n trapFocus,\n ...menuProps\n } = props;\n const resolvedSubmenuTransitionDurationMs = submenuTransitionDurationMs ?? 460;\n\n const isAnchored = id != null;\n\n const [menuLevel, setMenuLevel] = useState(1);\n const [transitionDirection, setTransitionDirection] = useState<\n 'forward' | 'backward' | undefined\n >(undefined);\n const [contentResetToken, setContentResetToken] = useState(0);\n const transitionTimeoutRef = useRef<NodeJS.Timeout | null>(null);\n const previousMenuLevelRef = useRef(1);\n const open = useDialogIsOpen(id ?? '', dialogManagerId);\n const previousOpenRef = useRef(open);\n\n useEffect(() => {\n if (!isAnchored) return;\n\n if (previousOpenRef.current && !open) {\n setMenuLevel(1);\n setTransitionDirection(undefined);\n setContentResetToken((value) => value + 1);\n previousMenuLevelRef.current = 1;\n if (transitionTimeoutRef.current) {\n clearTimeout(transitionTimeoutRef.current);\n transitionTimeoutRef.current = null;\n }\n }\n previousOpenRef.current = open;\n }, [isAnchored, open]);\n\n useEffect(\n () => () => {\n if (transitionTimeoutRef.current) {\n clearTimeout(transitionTimeoutRef.current);\n }\n },\n [],\n );\n\n const handleMenuLevelChange = useCallback(\n (level: number) => {\n if (isAnchored) {\n const previousLevel = previousMenuLevelRef.current;\n if (level !== previousLevel) {\n setTransitionDirection(level > previousLevel ? 'forward' : 'backward');\n if (transitionTimeoutRef.current) clearTimeout(transitionTimeoutRef.current);\n transitionTimeoutRef.current = setTimeout(() => {\n setTransitionDirection(undefined);\n transitionTimeoutRef.current = null;\n }, resolvedSubmenuTransitionDurationMs);\n }\n previousMenuLevelRef.current = level;\n setMenuLevel(level);\n return;\n }\n onMenuLevelChangeProp?.(level);\n },\n [isAnchored, onMenuLevelChangeProp, resolvedSubmenuTransitionDurationMs],\n );\n\n const content = (\n <ContextMenuContentComponent\n anchorReferenceElement={isAnchored ? referenceElement : undefined}\n {...menuProps}\n key={`context-menu-content-${contentResetToken}`}\n onMenuLevelChange={handleMenuLevelChange}\n transitionDirection={transitionDirection}\n />\n );\n\n if (isAnchored) {\n const {\n ['aria-describedby']: ariaDescribedBy,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledBy,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n backButtonAriaLabel: _bbal,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n backLabel: _b,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n enableAnimations: _ea,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n Header: _h,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n items: _i,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n ItemsWrapper: _w,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n keyboardNavigation: _kn,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n menuClassName: _m,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onClose: _c,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n role: _r,\n ...anchorDivProps\n } = menuProps;\n const isSubmenuLevel = menuLevel > 1;\n return (\n <DialogAnchor\n allowFlip={allowFlip}\n aria-describedby={isSubmenuLevel ? undefined : ariaDescribedBy}\n aria-label={isSubmenuLevel ? undefined : ariaLabel}\n aria-labelledby={isSubmenuLevel ? undefined : ariaLabelledBy}\n closeOnClickOutside={closeOnClickOutside}\n closeTransitionMs={closeTransitionMs}\n dialogManagerId={dialogManagerId}\n focus={focus}\n id={id}\n offset={offset}\n placement={placement}\n referenceElement={referenceElement}\n tabIndex={tabIndex}\n trapFocus={trapFocus}\n updateKey={menuLevel}\n {...anchorDivProps}\n >\n {content}\n </DialogAnchor>\n );\n }\n\n return content;\n};\n","import React, { type ComponentProps, type PropsWithChildren } from 'react';\nimport clsx from 'clsx';\nimport { Button, type ButtonProps } from '../../Button';\nimport {\n useComponentContextIcons,\n useModalContext,\n useTranslationContext,\n} from '../../../context';\nimport { useAriaIdentifiers } from '../../../a11y/hooks/useAriaIdentifiers';\n\nconst PromptRoot = ({ children, className, ...props }: ComponentProps<'div'>) => (\n <div {...props} className={clsx('str-chat__prompt', className)}>\n {children}\n </div>\n);\n\nexport type PromptHeaderProps = {\n title: React.ReactNode;\n className?: string;\n close?: () => void;\n description?: string;\n descriptionId?: string;\n goBack?: () => void;\n LeadingContent?: React.ComponentType;\n titleId?: string;\n TrailingContent?: React.ComponentType;\n};\n\nconst PromptHeader = ({\n className,\n close,\n description,\n descriptionId,\n goBack,\n LeadingContent,\n title,\n titleId,\n TrailingContent,\n}: PromptHeaderProps) => {\n const { t } = useTranslationContext();\n const { dialogId } = useModalContext();\n const { IconArrowLeft, IconXmark } = useComponentContextIcons();\n const { descriptionId: derivedDescriptionId, titleId: derivedTitleId } =\n useAriaIdentifiers(dialogId);\n const resolvedTitleId = titleId ?? derivedTitleId;\n const resolvedDescriptionId = descriptionId ?? derivedDescriptionId;\n const hasDescription = description != null && description !== '';\n\n return (\n <div\n className={clsx('str-chat__prompt__header', className, {\n 'str-chat__prompt__header--withDescription': hasDescription,\n 'str-chat__prompt__header--withGoBack': goBack,\n })}\n >\n {LeadingContent && (\n <div className='str-chat__prompt__header__leading-content'>\n <LeadingContent />\n </div>\n )}\n <div className={clsx('str-chat__prompt__header__title-group')}>\n {goBack && (\n <Button\n appearance='ghost'\n aria-label={t('Go back')}\n circular\n className='str-chat__prompt__header__go-back-button'\n onClick={goBack}\n size='md'\n variant='secondary'\n >\n <IconArrowLeft />\n </Button>\n )}\n <h2 className='str-chat__prompt__header__title' id={resolvedTitleId}>\n {title}\n </h2>\n {hasDescription && (\n <p className='str-chat__prompt__header__description' id={resolvedDescriptionId}>\n {description}\n </p>\n )}\n </div>\n {(close || TrailingContent) && (\n <div className='str-chat__prompt__header__trailing-content'>\n {TrailingContent && <TrailingContent />}\n {close && (\n <Button\n appearance='ghost'\n // Concise \"Close\": the dialog itself is named by its title (aria-labelledby) and\n // described by its description (aria-describedby on the dialog surface), so the close\n // button carries neither — repeating them here is redundant noise on focus.\n aria-label={t('Close')}\n circular\n className='str-chat__prompt__header__close-button'\n onClick={close}\n size='md'\n variant='secondary'\n >\n <IconXmark />\n </Button>\n )}\n </div>\n )}\n </div>\n );\n};\n\nexport type PromptBodyProps = PropsWithChildren<{\n className?: string;\n}>;\n\nconst PromptBody = ({ children, className }: PromptBodyProps) => (\n <div className={clsx('str-chat__prompt__body', className)}>{children}</div>\n);\n\nexport type PromptFooterProps = PropsWithChildren<{\n className?: string;\n}>;\n\nconst PromptFooter = ({ children, className }: PromptFooterProps) => (\n <div className={clsx('str-chat__prompt__footer', className)}>{children}</div>\n);\n\ntype PromptFooterControlsProps = PropsWithChildren<{\n className?: string;\n}>;\n\nconst PromptFooterControls = ({ children, className }: PromptFooterControlsProps) => (\n <div className={clsx('str-chat__prompt__footer__controls', className)}>{children}</div>\n);\n\nconst PromptFooterControlsButtonSecondary = ({ className, ...props }: ButtonProps) => (\n <Button\n appearance='ghost'\n className={clsx('str-chat__prompt__footer__controls-button', className)}\n size='md'\n variant='secondary'\n {...props}\n />\n);\n\nconst PromptFooterControlsButtonPrimary = ({ className, ...props }: ButtonProps) => (\n <Button\n appearance='solid'\n className={clsx('str-chat__prompt__footer__controls-button', className)}\n size='md'\n variant='primary'\n {...props}\n />\n);\n\nexport const Prompt = {\n Body: PromptBody,\n Footer: PromptFooter,\n FooterControls: PromptFooterControls,\n FooterControlsButtonPrimary: PromptFooterControlsButtonPrimary,\n FooterControlsButtonSecondary: PromptFooterControlsButtonSecondary,\n Header: PromptHeader,\n Root: PromptRoot,\n};\n","import { useMemo } from 'react';\nimport { useAriaIdentifiers } from './useAriaIdentifiers';\n\nexport type ResolvedModalAriaProps = {\n 'aria-describedby'?: string;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n};\n\ntype UseResolvedModalAriaPropsParams = {\n ariaDescribedby?: string;\n ariaLabel?: string;\n ariaLabelledby?: string;\n dialogId?: string;\n};\n\n/**\n * Resolves modal labeling/description attributes from explicit props first,\n * then from the modal dialog id convention (`${dialogId}-title|description`).\n *\n * Rules:\n * - `aria-labelledby` wins over `aria-label`.\n * - `aria-describedby` defaults to inferred id when explicit value is absent.\n */\nexport const useResolvedModalAriaProps = ({\n ariaDescribedby,\n ariaLabel,\n ariaLabelledby,\n dialogId,\n}: UseResolvedModalAriaPropsParams): ResolvedModalAriaProps => {\n const { descriptionId, titleId } = useAriaIdentifiers(dialogId);\n\n return useMemo(() => {\n const resolvedAriaLabelledby = ariaLabel\n ? ariaLabelledby\n : (ariaLabelledby ?? titleId);\n const resolvedAriaDescribedby = ariaDescribedby ?? descriptionId;\n const resolvedAriaLabel = resolvedAriaLabelledby ? undefined : ariaLabel;\n\n return {\n 'aria-describedby': resolvedAriaDescribedby,\n 'aria-label': resolvedAriaLabel,\n 'aria-labelledby': resolvedAriaLabelledby,\n };\n }, [ariaDescribedby, ariaLabel, ariaLabelledby, descriptionId, titleId]);\n};\n","import clsx from 'clsx';\nimport React, {\n type ComponentProps,\n type ComponentType,\n type PropsWithChildren,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n} from 'react';\nimport { FocusScope } from '@react-aria/focus';\n\nimport { AriaLiveOutlet } from '../Accessibility';\nimport { NotificationList as DefaultNotificationList } from '../Notifications';\nimport {\n DialogManagerProvider,\n ModalContextProvider,\n modalDialogManagerId,\n useChatContext,\n useComponentContext,\n} from '../../context';\nimport {\n DialogPortalEntry,\n modalDialogId,\n useModalDialog,\n useModalDialogIsOpen,\n useModalDialogIsTopmost,\n} from '../Dialog';\nimport { useResolvedModalAriaProps } from '../../a11y/hooks/useResolvedModalAriaProps';\nimport { useStableId } from '../UtilityComponents/useStableId';\n\nexport type ModalCloseEvent =\n | KeyboardEvent\n | React.KeyboardEvent\n | React.MouseEvent<HTMLButtonElement | HTMLDivElement>;\n\nexport type ModalCloseSource = 'overlay' | 'button' | 'escape';\nexport type ModalInitialFocusStrategy = 'dialog' | 'firstElement';\n\nexport type ModalProps = {\n /** If true, modal is opened or visible. */\n open: boolean;\n /** Custom class to be applied to the modal root div */\n className?: string;\n /** Optional stable id for this modal instance. Generated automatically when omitted. */\n dialogId?: string;\n /** Properties forwarded to the root div within which the dialog content is rendered */\n dialogRootProps?: Omit<\n ComponentProps<'div'>,\n 'aria-label' | 'aria-labelledby' | 'aria-describedby' | 'role'\n >;\n /** Accessible label for the modal dialog. Ignored when aria-labelledby is provided. */\n 'aria-label'?: string;\n /** ID of the element that labels the modal dialog. */\n 'aria-labelledby'?: string;\n /** ID of the element that describes the modal dialog. */\n 'aria-describedby'?: string;\n /** ARIA role for the modal dialog surface. */\n role?: 'alertdialog' | 'dialog';\n /** Controls whether the dialog surface or the first focusable descendant receives initial focus. */\n initialFocusStrategy?: ModalInitialFocusStrategy;\n /** Resolves a custom initial focus element. When provided, it overrides `initialFocusStrategy` and falls back to the dialog surface when no element is returned. */\n getInitialFocusElement?: (dialogElement: HTMLDivElement) => HTMLElement | null;\n /** If provided, the close button is rendered on overlay */\n CloseButtonOnOverlay?: ComponentType<ComponentProps<'button'>>;\n /** Callback handler for closing of modal. */\n onClose?: (event: ModalCloseEvent) => void;\n /** Optional handler to intercept closing logic. Return false to prevent onClose. */\n onCloseAttempt?: (source: ModalCloseSource, event: ModalCloseEvent) => boolean;\n};\n\nexport const GlobalModal = ({\n 'aria-describedby': ariaDescribedby,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n children,\n className,\n CloseButtonOnOverlay,\n dialogId,\n dialogRootProps,\n getInitialFocusElement,\n initialFocusStrategy,\n onClose,\n onCloseAttempt,\n open,\n role = 'dialog',\n}: PropsWithChildren<ModalProps>) => {\n const generatedDialogId = useStableId();\n const resolvedDialogId = dialogId ?? `${modalDialogId}-${generatedDialogId}`;\n const dialog = useModalDialog(resolvedDialogId);\n const isOpen = useModalDialogIsOpen(resolvedDialogId);\n const isTopmost = useModalDialogIsTopmost(resolvedDialogId);\n const overlayRef = useRef<HTMLDivElement | null>(null);\n const dialogRef = useRef<HTMLDivElement | null>(null);\n const closeButtonRef = useRef<HTMLButtonElement | null>(null);\n const closingRef = useRef(false);\n const { theme } = useChatContext();\n const { NotificationList = DefaultNotificationList } = useComponentContext();\n const {\n className: dialogRootClassName,\n onKeyDown: dialogRootOnKeyDown,\n ...dialogRootPropsRest\n } = dialogRootProps ?? {};\n // Base for label/description ids must be unique per modal. `resolvedDialogId` already carries a\n // per-instance suffix; the shared `modalDialogId` fallback would collide across stacked modals.\n const dialogLabelingBaseId = resolvedDialogId;\n const resolvedInitialFocusStrategy: ModalInitialFocusStrategy =\n initialFocusStrategy ?? 'firstElement';\n const resolvedModalAriaProps = useResolvedModalAriaProps({\n ariaDescribedby,\n ariaLabel,\n ariaLabelledby,\n dialogId: dialogLabelingBaseId,\n });\n\n const maybeClose = useCallback(\n (source: ModalCloseSource, event: ModalCloseEvent) => {\n const allow = onCloseAttempt?.(source, event);\n if (allow !== false) {\n dialog.close();\n closingRef.current = true;\n onClose?.(event);\n }\n },\n [dialog, onClose, onCloseAttempt],\n );\n\n const modalContextValue = useMemo<{ close: () => void; dialogId?: string }>(\n () => ({\n close: () => maybeClose('button', {} as ModalCloseEvent),\n dialogId: dialogLabelingBaseId,\n }),\n [dialogLabelingBaseId, maybeClose],\n );\n\n const handleOverlayClick = (event: React.MouseEvent<HTMLDivElement>) => {\n if (!isTopmost) return;\n const target = event.target as HTMLDivElement;\n if (overlayRef.current === target) {\n maybeClose('overlay', event);\n }\n };\n\n const handleCloseButtonClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n if (!isTopmost) return;\n maybeClose('button', event);\n };\n\n const handleDialogKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n dialogRootOnKeyDown?.(event);\n if (event.defaultPrevented || !isTopmost) return;\n\n if (event.key === 'Escape') {\n maybeClose('escape', event);\n return;\n }\n\n // Initial focus lands on the dialog surface so the screen reader announces the dialog\n // identity/description (a child field's focus would supersede that). Enter on the surface then\n // steps the user into the dialog's declared default field (`[data-autofocus]`), so they can\n // start interacting without hunting for it. `event.target === dialogRef.current` ensures we\n // only react to Enter on the surface itself, never one bubbling up from a control inside.\n if (event.key === 'Enter' && event.target === dialogRef.current) {\n const target = dialogRef.current?.querySelector<HTMLElement>('[data-autofocus]');\n if (target) {\n event.preventDefault();\n target.focus();\n }\n }\n };\n\n // Sync open prop to dialog state.\n // closingRef blocks re-open when we just closed and parent hasn't set open=false yet.\n useEffect(() => {\n if (!open) {\n closingRef.current = false;\n if (isOpen) {\n dialog.close();\n }\n return;\n }\n if (open && !isOpen && !closingRef.current) {\n dialog.open();\n }\n }, [dialog, isOpen, open]);\n\n useEffect(() => {\n if (\n !open ||\n !isOpen ||\n // Only the topmost modal may take initial focus; a non-topmost (inert) stacked modal must not\n // pull focus behind the active one (mirrors the FocusScope/AriaLiveOutlet topmost gating).\n !isTopmost ||\n (!getInitialFocusElement && resolvedInitialFocusStrategy === 'firstElement')\n )\n return;\n\n const frame = requestAnimationFrame(() => {\n const dialogElement = dialogRef.current;\n if (!dialogElement) return;\n\n const target = getInitialFocusElement?.(dialogElement) ?? dialogElement;\n\n target.focus();\n });\n\n return () => cancelAnimationFrame(frame);\n }, [getInitialFocusElement, isOpen, isTopmost, open, resolvedInitialFocusStrategy]);\n\n if (!open || !isOpen) return null;\n\n return (\n <DialogPortalEntry dialogId={resolvedDialogId} dialogManagerId={modalDialogManagerId}>\n <ModalContextProvider value={modalContextValue}>\n <div\n className={clsx(\n 'str-chat',\n theme,\n 'str-chat__modal str-chat-react__modal str-chat__modal--open',\n className,\n )}\n onClick={handleOverlayClick}\n ref={overlayRef}\n >\n <FocusScope\n autoFocus={\n isTopmost &&\n !getInitialFocusElement &&\n resolvedInitialFocusStrategy === 'firstElement'\n }\n contain={isTopmost}\n restoreFocus\n >\n <div\n {...dialogRootPropsRest}\n aria-describedby={resolvedModalAriaProps['aria-describedby']}\n aria-label={resolvedModalAriaProps['aria-label']}\n aria-labelledby={resolvedModalAriaProps['aria-labelledby']}\n aria-modal={isTopmost ? 'true' : undefined}\n className={clsx('str-chat__modal__dialog', dialogRootClassName)}\n inert={isTopmost ? undefined : true}\n onKeyDown={handleDialogKeyDown}\n ref={dialogRef}\n role={role}\n tabIndex={isTopmost ? 0 : -1}\n >\n <DialogManagerProvider\n id={`${resolvedDialogId}-floating-dialog-manager`}\n portalDestinationProps={{\n captureOutsideClicks: true,\n className: 'str-chat__modal__floating-dialog-overlay',\n }}\n >\n {children}\n {/* Render the live-region outlet inside the active modal subtree\n (only the topmost dialog carries `aria-modal`) so announcements\n are not suppressed by assistive technologies. */}\n {isTopmost && <AriaLiveOutlet layer={1} />}\n </DialogManagerProvider>\n </div>\n </FocusScope>\n <NotificationList\n className='str-chat__modal__notification-list'\n panel='modal'\n verticalAlignment='top'\n />\n {CloseButtonOnOverlay && (\n <CloseButtonOnOverlay onClick={handleCloseButtonClick} ref={closeButtonRef} />\n )}\n </div>\n </ModalContextProvider>\n </DialogPortalEntry>\n );\n};\n","import React, { useContext } from 'react';\nimport type { LocalMessage } from 'stream-chat';\n\nexport const LegacyThreadContext = React.createContext<{\n legacyThread: LocalMessage | undefined;\n}>({ legacyThread: undefined });\n\nexport const useLegacyThreadContext = () => useContext(LegacyThreadContext);\n","import type { ComponentContextValue } from '../../context';\n\nexport const extractDisplayInfo: NonNullable<\n ComponentContextValue['extractDisplayInfo']\n> = ({ user }) => ({\n id: user?.id,\n imageUrl: user?.image,\n userName: user?.name, // || user?.id,\n});\n","import React, { useMemo } from 'react';\n\nimport { useMessageContext } from '../../context/MessageContext';\nimport { useTranslationContext } from '../../context/TranslationContext';\nimport { getDateString, isDate } from '../../i18n/utils';\nimport type { TimestampFormatterOptions } from '../../i18n/types';\n\nexport interface TimestampProps extends TimestampFormatterOptions {\n /* Adds a CSS class name to the component's outer `time` container. */\n customClass?: string;\n /* Timestamp to display */\n timestamp?: Date | string;\n}\n\nexport function Timestamp(props: TimestampProps) {\n const { calendar, calendarFormats, customClass, format, timestamp } = props;\n\n const { formatDate } = useMessageContext('MessageTimestamp');\n const { t, tDateTimeParser } = useTranslationContext('MessageTimestamp');\n\n const normalizedTimestamp =\n timestamp && isDate(timestamp) ? timestamp.toISOString() : timestamp;\n\n const when = useMemo(\n () =>\n getDateString({\n calendar,\n calendarFormats,\n format,\n formatDate,\n messageCreatedAt: normalizedTimestamp,\n t,\n tDateTimeParser,\n timestampTranslationKey: 'timestamp/MessageTimestamp',\n }),\n [\n calendar,\n calendarFormats,\n format,\n formatDate,\n normalizedTimestamp,\n t,\n tDateTimeParser,\n ],\n );\n\n if (!when) {\n return null;\n }\n\n return (\n <time\n className={customClass}\n dateTime={normalizedTimestamp}\n title={normalizedTimestamp}\n >\n {when}\n </time>\n );\n}\n","import React from 'react';\nimport { useMessageContext } from '../../context/MessageContext';\nimport { Timestamp as DefaultTimestamp } from './Timestamp';\nimport { useComponentContext } from '../../context';\n\nimport type { LocalMessage } from 'stream-chat';\nimport type { TimestampFormatterOptions } from '../../i18n/types';\n\nexport type MessageTimestampProps = TimestampFormatterOptions & {\n /* Adds a CSS class name to the component's outer `time` container. */\n customClass?: string;\n /* The `StreamChat` message object, which provides necessary data to the underlying UI components (overrides the value from `MessageContext`) */\n message?: LocalMessage;\n};\n\nconst UnMemoizedMessageTimestamp = (props: MessageTimestampProps) => {\n const { message: propMessage, ...timestampProps } = props;\n const { message: contextMessage } = useMessageContext('MessageTimestamp');\n const { Timestamp = DefaultTimestamp } = useComponentContext('MessageTimestamp');\n const message = propMessage || contextMessage;\n return <Timestamp timestamp={message.created_at} {...timestampProps} />;\n};\n\nexport const MessageTimestamp = React.memo(\n UnMemoizedMessageTimestamp,\n) as typeof UnMemoizedMessageTimestamp;\n","import React from 'react';\nimport clsx from 'clsx';\nimport { sanitizeUrl } from '@braintree/sanitize-url';\n\nimport { useComponentContextIcons, useTranslationContext } from '../../../context';\n\nexport type DownloadButtonProps = {\n /** Attachment asset URL (e.g. `asset_url`). */\n assetUrl?: string;\n className?: string;\n /** Suggested filename for the `download` attribute (not the HTML `title` tooltip). */\n suggestedFileName?: string;\n /** Native browser tooltip; defaults to translated “Download Attachment”. */\n tooltipTitle?: string;\n};\n\n/**\n * Icon download control for {@link Audio} and {@link FileAttachment} rows.\n * (BaseImage defines its own small download link when `showDownloadButtonOnError` is used.)\n */\nexport const DownloadButton = ({\n assetUrl,\n className,\n suggestedFileName,\n tooltipTitle,\n}: DownloadButtonProps) => {\n const { IconDownload } = useComponentContextIcons();\n\n const { t } = useTranslationContext();\n if (!assetUrl) return null;\n const href = sanitizeUrl(assetUrl);\n if (!href) return null;\n\n return (\n <a\n aria-label={t('aria/Download attachment')}\n className={clsx(\n 'str-chat__button',\n 'str-chat__button--secondary',\n 'str-chat__button--outline',\n 'str-chat__button--circular',\n 'str-chat__button--size-sm',\n 'str-chat__audio-attachment-download-button',\n className,\n )}\n download={suggestedFileName ?? ''}\n href={href}\n rel='noopener noreferrer'\n target='_blank'\n title={tooltipTitle ?? t('Download Attachment')}\n >\n <div className='str-chat__button__content'>\n <IconDownload className='str-chat__icon str-chat__audio-attachment-download-button__icon' />\n </div>\n </a>\n );\n};\n","import { StateStore } from 'stream-chat';\nimport throttle from 'lodash.throttle';\nimport type { AudioPlayerPlugin } from './plugins';\nimport type { AudioPlayerPool } from './AudioPlayerPool';\n\nexport type AudioPlayerErrorCode =\n | 'failed-to-start'\n | 'not-playable'\n | 'seek-not-supported'\n | (string & {});\n\nexport type RegisterAudioPlayerErrorParams = {\n error?: Error;\n errCode?: AudioPlayerErrorCode;\n};\n\nexport type AudioPlayerDescriptor = {\n id: string;\n src: string;\n /** Audio duration in seconds. */\n durationSeconds?: number;\n fileSize?: number | string;\n mimeType?: string;\n title?: string;\n waveformData?: number[];\n};\n\nexport type AudioPlayerPlayAudioParams = {\n currentPlaybackRate?: number;\n playbackRates?: number[];\n};\n\nexport type AudioPlayerState = {\n /** Signals whether the browser can play the record. */\n canPlayRecord: boolean;\n /** Current playback speed. Initiated with the first item of the playbackRates array. */\n currentPlaybackRate: number;\n /** Audio duration in seconds, from descriptor or loaded metadata. */\n durationSeconds?: number;\n /** The audio element ref */\n elementRef: HTMLAudioElement | null;\n /** Signals whether the playback is in progress. */\n isPlaying: boolean;\n /** Keeps the latest playback error reference. */\n playbackError: Error | null;\n /** An array of fractional numeric values of playback speed to override the defaults (1.0, 1.5, 2.0) */\n playbackRates: number[];\n /** Playback progress expressed in percent. */\n progressPercent: number;\n /** Playback progress expressed in seconds. */\n secondsElapsed: number;\n};\n\nexport type AudioPlayerOptions = AudioPlayerDescriptor & {\n /** An array of fractional numeric values of playback speed to override the defaults (1.0, 1.5, 2.0) */\n playbackRates?: number[];\n plugins?: AudioPlayerPlugin[];\n pool: AudioPlayerPool;\n};\n\nconst DEFAULT_PLAYBACK_RATES = [1.0, 1.5, 2.0];\n\nconst isSeekable = (audioElement: HTMLAudioElement) =>\n !(audioElement.duration === Infinity || isNaN(audioElement.duration));\n\nexport const defaultRegisterAudioPlayerError = ({\n error,\n}: RegisterAudioPlayerErrorParams = {}) => {\n if (!error) return;\n console.error('[AUDIO PLAYER]', error);\n};\n\nexport const elementIsPlaying = (audioElement: HTMLAudioElement | null) =>\n audioElement && !(audioElement.paused || audioElement.ended);\n\nexport type SeekFn = (params: {\n clientX: number;\n currentTarget: HTMLDivElement;\n}) => Promise<void>;\n\nexport class AudioPlayer {\n state: StateStore<AudioPlayerState>;\n /** The audio MIME type that is checked before the audio is played. If the type is not supported the controller registers error in playbackError. */\n private _data: AudioPlayerDescriptor;\n private _plugins = new Map<string, AudioPlayerPlugin>();\n private playTimeout: ReturnType<typeof setTimeout> | undefined = undefined;\n private unsubscribeEventListeners: (() => void) | null = null;\n private _pool: AudioPlayerPool;\n private _disposed = false;\n private _pendingLoadedMeta?: { element: HTMLAudioElement; onLoaded: () => void };\n private _elementIsReadyPromise?: Promise<boolean>;\n private _metadataProbe: HTMLAudioElement | null = null;\n private _metadataProbePromise?: Promise<void>;\n private _restoringPosition = false;\n private _removalTimeout: ReturnType<typeof setTimeout> | undefined = undefined;\n\n constructor({\n durationSeconds,\n fileSize,\n id,\n mimeType,\n playbackRates: customPlaybackRates,\n plugins,\n pool,\n src,\n title,\n waveformData,\n }: AudioPlayerOptions) {\n this._data = {\n durationSeconds,\n fileSize,\n id,\n mimeType,\n src,\n title,\n waveformData,\n };\n this._pool = pool;\n this.setPlugins(() => plugins ?? []);\n\n const playbackRates = customPlaybackRates?.length\n ? customPlaybackRates\n : DEFAULT_PLAYBACK_RATES;\n\n // do not create element here; only evaluate canPlayRecord cheaply\n const canPlayRecord = mimeType ? !!new Audio().canPlayType(mimeType) : true;\n\n this.state = new StateStore<AudioPlayerState>({\n canPlayRecord,\n currentPlaybackRate: playbackRates[0],\n durationSeconds,\n elementRef: null,\n isPlaying: false,\n playbackError: null,\n playbackRates,\n progressPercent: 0,\n secondsElapsed: 0,\n });\n\n this.plugins.forEach((p) => p.onInit?.({ player: this }));\n this.preloadMetadata();\n }\n\n private get plugins(): AudioPlayerPlugin[] {\n return Array.from(this._plugins.values());\n }\n\n get canPlayRecord() {\n return this.state.getLatestValue().canPlayRecord;\n }\n\n get elementRef() {\n return this.state.getLatestValue().elementRef;\n }\n\n get isPlaying(): boolean {\n return this.state.getLatestValue().isPlaying;\n }\n\n get currentPlaybackRate() {\n return this.state.getLatestValue().currentPlaybackRate;\n }\n\n get playbackRates() {\n return this.state.getLatestValue().playbackRates;\n }\n\n get durationSeconds() {\n return this.state.getLatestValue().durationSeconds;\n }\n\n get fileSize() {\n return this._data.fileSize;\n }\n\n get id() {\n return this._data.id;\n }\n\n get src() {\n return this._data.src;\n }\n\n get mimeType() {\n return this._data.mimeType;\n }\n\n get title() {\n return this._data.title;\n }\n\n get waveformData() {\n return this._data.waveformData;\n }\n\n get secondsElapsed() {\n return this.state.getLatestValue().secondsElapsed;\n }\n\n get progressPercent() {\n return this.state.getLatestValue().progressPercent;\n }\n\n get disposed() {\n return this._disposed;\n }\n\n private setDurationSeconds = (durationSeconds?: number) => {\n this._data.durationSeconds = durationSeconds;\n this.state.partialNext({ durationSeconds });\n };\n\n private ensureElementRef(): HTMLAudioElement {\n if (this._disposed) {\n throw new Error('AudioPlayer is disposed');\n }\n if (!this.elementRef) {\n const el = this._pool.acquireElement({\n ownerId: this.id,\n src: this.src,\n });\n this.setRef(el);\n }\n return this.elementRef as HTMLAudioElement;\n }\n private setPlaybackStartSafetyTimeout = () => {\n clearTimeout(this.playTimeout);\n this.playTimeout = setTimeout(() => {\n if (!this.elementRef) return;\n try {\n this.elementRef.pause();\n this.state.partialNext({ isPlaying: false });\n } catch (e) {\n this.registerError({ errCode: 'failed-to-start' });\n }\n }, 2000);\n };\n\n private updateDurationFromElement = (element: HTMLAudioElement) => {\n const duration = element.duration;\n if (\n typeof duration !== 'number' ||\n isNaN(duration) ||\n !isFinite(duration) ||\n duration <= 0\n ) {\n return;\n }\n this.setDurationSeconds(duration);\n };\n\n private clearMetadataProbe = () => {\n const probe = this._metadataProbe;\n this._metadataProbe = null;\n this._metadataProbePromise = undefined;\n\n if (!probe) return;\n\n try {\n probe.pause();\n } catch {\n // ignore\n }\n\n probe.removeAttribute('src');\n try {\n probe.load();\n } catch {\n // ignore\n }\n };\n\n private preloadMetadata = () => {\n if (\n this._disposed ||\n this.durationSeconds != null ||\n !this.src ||\n this._metadataProbePromise ||\n typeof document === 'undefined'\n ) {\n return;\n }\n\n const probe = document.createElement('audio');\n probe.preload = 'metadata';\n this._metadataProbe = probe;\n this._metadataProbePromise = new Promise((resolve) => {\n const cleanup = () => {\n probe.removeEventListener('loadedmetadata', handleLoadedMetadata);\n probe.removeEventListener('error', handleError);\n if (this._metadataProbe === probe) {\n this.clearMetadataProbe();\n } else {\n this._metadataProbePromise = undefined;\n }\n resolve();\n };\n\n const handleLoadedMetadata = () => {\n this.updateDurationFromElement(probe);\n cleanup();\n };\n\n const handleError = () => {\n cleanup();\n };\n\n probe.addEventListener('loadedmetadata', handleLoadedMetadata, { once: true });\n probe.addEventListener('error', handleError, { once: true });\n probe.src = this.src;\n try {\n probe.load();\n } catch {\n cleanup();\n }\n });\n };\n\n private clearPlaybackStartSafetyTimeout = () => {\n if (!this.elementRef) return;\n clearTimeout(this.playTimeout);\n this.playTimeout = undefined;\n };\n\n private clearPendingLoadedMeta = () => {\n const pending = this._pendingLoadedMeta;\n if (pending?.element && pending.onLoaded) {\n pending.element.removeEventListener('loadedmetadata', pending.onLoaded);\n }\n this._pendingLoadedMeta = undefined;\n };\n\n private restoreSavedPosition = (elementRef: HTMLAudioElement) => {\n const saved = this.secondsElapsed;\n if (!saved || saved <= 0) return;\n const apply = () => {\n const duration = elementRef.duration;\n const clamped =\n typeof duration === 'number' && !isNaN(duration) && isFinite(duration)\n ? Math.min(saved, duration)\n : saved;\n try {\n if (elementRef.currentTime === clamped) return;\n elementRef.currentTime = clamped;\n // Preempt UI with restored position to avoid flicker\n this.setSecondsElapsed(clamped);\n } catch {\n // ignore\n }\n };\n // No information is available about the media resource.\n if (elementRef.readyState < 1) {\n this.clearPendingLoadedMeta();\n this._restoringPosition = true;\n const onLoaded = () => {\n // Ensure this callback still belongs to the same pending registration and same element\n if (this._pendingLoadedMeta?.onLoaded !== onLoaded) return;\n this._pendingLoadedMeta = undefined;\n if (this.elementRef !== elementRef) {\n this._restoringPosition = false;\n return;\n }\n apply();\n this._restoringPosition = false;\n };\n elementRef.addEventListener('loadedmetadata', onLoaded, { once: true });\n this._pendingLoadedMeta = { element: elementRef, onLoaded };\n } else {\n this._restoringPosition = true;\n apply();\n this._restoringPosition = false;\n }\n };\n\n setDescriptor(descriptor: AudioPlayerDescriptor) {\n const previousSrc = this.src;\n this._data = { ...this._data, ...descriptor };\n if (descriptor.src !== previousSrc && this.elementRef) {\n this.elementRef.src = descriptor.src;\n }\n if (descriptor.src && descriptor.src !== previousSrc) {\n this.clearMetadataProbe();\n if (descriptor.durationSeconds == null) {\n this.setDurationSeconds(undefined);\n this.preloadMetadata();\n } else {\n this.setDurationSeconds(descriptor.durationSeconds);\n }\n return;\n }\n if (descriptor.durationSeconds != null) {\n this.setDurationSeconds(descriptor.durationSeconds);\n }\n }\n\n private releaseElement({ resetState }: { resetState: boolean }) {\n this.clearPendingLoadedMeta();\n this.clearMetadataProbe();\n this._restoringPosition = false;\n if (resetState) {\n this.stop();\n } else {\n // Ensure isPlaying reflects reality, but keep progress/seconds\n this.state.partialNext({ isPlaying: false });\n if (this.elementRef) {\n try {\n this.elementRef.pause();\n } catch {\n // ignore\n }\n }\n }\n if (this.elementRef) {\n this._pool.releaseElement(this.id);\n this.setRef(null);\n }\n }\n\n private elementIsReady = (): Promise<boolean> => {\n if (this._elementIsReadyPromise) return this._elementIsReadyPromise;\n\n this._elementIsReadyPromise = new Promise((resolve) => {\n if (!this.elementRef) return resolve(false);\n const element = this.elementRef;\n const handleLoaded = () => {\n element.removeEventListener('loadedmetadata', handleLoaded);\n resolve(element.readyState > 0);\n };\n element.addEventListener('loadedmetadata', handleLoaded);\n });\n\n return this._elementIsReadyPromise;\n };\n\n private setRef = (elementRef: HTMLAudioElement | null) => {\n if (elementIsPlaying(this.elementRef)) {\n // preserve state during swap\n this.releaseElement({ resetState: false });\n }\n this.clearPendingLoadedMeta();\n this.clearMetadataProbe();\n this._restoringPosition = false;\n this._elementIsReadyPromise = undefined;\n this.state.partialNext({ elementRef });\n // When a new element is attached, make sure listeners are wired to it\n if (elementRef) {\n this.registerSubscriptions();\n }\n };\n\n setSecondsElapsed = (secondsElapsed: number) => {\n const duration = this.elementRef?.duration ?? this.durationSeconds;\n this.state.partialNext({\n progressPercent: duration && secondsElapsed ? (secondsElapsed / duration) * 100 : 0,\n secondsElapsed,\n });\n };\n\n setPlugins(setter: (currentPlugins: AudioPlayerPlugin[]) => AudioPlayerPlugin[]) {\n this._plugins = setter(this.plugins).reduce((acc, plugin) => {\n if (plugin.id) {\n acc.set(plugin.id, plugin);\n }\n return acc;\n }, new Map<string, AudioPlayerPlugin>());\n }\n\n canPlayMimeType = (mimeType: string) => {\n if (!mimeType) return false;\n if (this.elementRef) return !!this.elementRef.canPlayType(mimeType);\n return !!new Audio().canPlayType(mimeType);\n };\n\n play = async (params?: AudioPlayerPlayAudioParams) => {\n if (this._disposed) return;\n const elementRef = this.ensureElementRef();\n if (elementIsPlaying(this.elementRef)) {\n if (this.isPlaying) return;\n this.state.partialNext({ isPlaying: true });\n return;\n }\n\n const { currentPlaybackRate, playbackRates } = {\n currentPlaybackRate: this.currentPlaybackRate,\n playbackRates: this.playbackRates,\n ...params,\n };\n\n if (!this.canPlayRecord) {\n this.registerError({ errCode: 'not-playable' });\n return;\n }\n\n // Restore last known position for this player before attempting to play\n this.restoreSavedPosition(elementRef);\n\n elementRef.playbackRate = currentPlaybackRate ?? this.currentPlaybackRate;\n\n this.setPlaybackStartSafetyTimeout();\n\n try {\n await elementRef.play();\n this.state.partialNext({\n currentPlaybackRate,\n isPlaying: true,\n playbackRates,\n });\n this._pool.setActiveAudioPlayer(this);\n } catch (e) {\n this.registerError({ error: e as Error });\n this.state.partialNext({ isPlaying: false });\n } finally {\n this.clearPlaybackStartSafetyTimeout();\n }\n };\n\n pause = () => {\n if (!elementIsPlaying(this.elementRef)) return;\n this.clearPlaybackStartSafetyTimeout();\n\n // existence of the element already checked by elementIsPlaying\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n this.elementRef!.pause();\n this.state.partialNext({ isPlaying: false });\n };\n\n stop = () => {\n this.pause();\n this.state.partialNext({ isPlaying: false });\n this.setSecondsElapsed(0);\n if (this.elementRef) this.elementRef.currentTime = 0;\n };\n\n togglePlay = async () => (this.isPlaying ? this.pause() : await this.play());\n\n increasePlaybackRate = () => {\n let currentPlaybackRateIndex = this.state\n .getLatestValue()\n .playbackRates.findIndex((rate) => rate === this.currentPlaybackRate);\n if (currentPlaybackRateIndex === -1) {\n currentPlaybackRateIndex = 0;\n }\n const nextIndex =\n currentPlaybackRateIndex === this.playbackRates.length - 1\n ? 0\n : currentPlaybackRateIndex + 1;\n const currentPlaybackRate = this.playbackRates[nextIndex];\n this.state.partialNext({ currentPlaybackRate });\n if (this.elementRef) {\n this.elementRef.playbackRate = currentPlaybackRate;\n }\n };\n\n seek = throttle<SeekFn>(async ({ clientX, currentTarget }) => {\n let element = this.elementRef;\n if (!this.elementRef) {\n element = this.ensureElementRef();\n const isReady = await this.elementIsReady();\n if (!isReady) return;\n }\n if (!currentTarget || !element) return;\n if (!isSeekable(element)) {\n this.registerError({ errCode: 'seek-not-supported' });\n return;\n }\n\n const { width, x } = currentTarget.getBoundingClientRect();\n\n const ratio = (clientX - x) / width;\n if (ratio > 1 || ratio < 0) return;\n const currentTime = ratio * element.duration;\n this.setSecondsElapsed(currentTime);\n element.currentTime = currentTime;\n }, 16);\n\n registerError = (params: RegisterAudioPlayerErrorParams) => {\n defaultRegisterAudioPlayerError(params);\n this.plugins.forEach(({ onError }) => onError?.({ player: this, ...params }));\n };\n\n /**\n * Removes the audio element reference, event listeners and audio player from the player pool.\n * Helpful when only a single AudioPlayer instance is to be removed from the AudioPlayerPool.\n */\n requestRemoval = () => {\n this._disposed = true;\n this.cancelScheduledRemoval();\n this.clearPendingLoadedMeta();\n this.clearMetadataProbe();\n this._restoringPosition = false;\n this.releaseElement({ resetState: true });\n this.unsubscribeEventListeners?.();\n this.unsubscribeEventListeners = null;\n this.plugins.forEach(({ onRemove }) => onRemove?.({ player: this }));\n this._pool.deregister(this.id);\n };\n\n cancelScheduledRemoval = () => {\n clearTimeout(this._removalTimeout);\n this._removalTimeout = undefined;\n };\n\n scheduleRemoval = (ms: number = 0) => {\n this.cancelScheduledRemoval();\n this._removalTimeout = setTimeout(() => {\n if (this.disposed) return;\n this.requestRemoval();\n }, ms);\n };\n\n /**\n * Releases only the underlying element back to the pool without disposing the player instance.\n * Used by the pool to hand off the shared element in single-playback mode.\n */\n releaseElementForHandoff = () => {\n if (!this.elementRef) return;\n this.releaseElement({ resetState: false });\n this.unsubscribeEventListeners?.();\n this.unsubscribeEventListeners = null;\n };\n\n registerSubscriptions = () => {\n this.unsubscribeEventListeners?.();\n\n const audioElement = this.elementRef;\n if (!audioElement) return;\n\n const handleEnded = () => {\n if (audioElement) {\n this.updateDurationFromElement(audioElement);\n }\n this.stop();\n };\n\n const handleError = (e: HTMLMediaElementEventMap['error']) => {\n // if fired probably is one of these (e.srcElement.error.code)\n // 1 = MEDIA_ERR_ABORTED (fetch aborted by user/JS)\n // 2 = MEDIA_ERR_NETWORK (network failed while fetching)\n // 3 = MEDIA_ERR_DECODE (data fetched but couldn’t decode)\n // 4 = MEDIA_ERR_SRC_NOT_SUPPORTED (no resource supported / bad type)\n // reported during the mount so only logging to the console\n const audio = e.currentTarget as HTMLAudioElement | null;\n const state: Partial<AudioPlayerState> = { isPlaying: false };\n\n if (!audio?.error?.code) {\n this.state.partialNext(state);\n return;\n }\n\n if (audio.error.code === 4) {\n state.canPlayRecord = false;\n this.state.partialNext(state);\n }\n\n const errorMsg = [\n undefined,\n 'MEDIA_ERR_ABORTED: fetch aborted by user',\n 'MEDIA_ERR_NETWORK: network failed while fetching',\n 'MEDIA_ERR_DECODE: audio fetched but couldn’t decode',\n 'MEDIA_ERR_SRC_NOT_SUPPORTED: source not supported',\n ][audio?.error?.code];\n if (!errorMsg) return;\n\n defaultRegisterAudioPlayerError({ error: new Error(errorMsg + ` (${audio.src})`) });\n };\n\n const handleTimeupdate = () => {\n const t = audioElement?.currentTime ?? 0;\n // Ignore spurious zero during restore/handoff to avoid UI flicker\n if (this._restoringPosition && t === 0) return;\n // Also avoid regressing UI to zero if we already have non-zero progress and we're not playing\n if (!this.isPlaying && t === 0 && this.secondsElapsed > 0) return;\n this.setSecondsElapsed(t);\n };\n\n const handleLoadedMetadata = () => {\n if (audioElement) {\n this.updateDurationFromElement(audioElement);\n }\n };\n\n audioElement.addEventListener('ended', handleEnded);\n audioElement.addEventListener('error', handleError);\n audioElement.addEventListener('loadedmetadata', handleLoadedMetadata);\n audioElement.addEventListener('timeupdate', handleTimeupdate);\n\n this.unsubscribeEventListeners = () => {\n audioElement.pause();\n audioElement.removeEventListener('ended', handleEnded);\n audioElement.removeEventListener('error', handleError);\n audioElement.removeEventListener('loadedmetadata', handleLoadedMetadata);\n audioElement.removeEventListener('timeupdate', handleTimeupdate);\n };\n };\n}\n","import { AudioPlayer, type AudioPlayerOptions } from './AudioPlayer';\nimport { StateStore } from 'stream-chat';\n\nexport type AudioPlayerPoolState = {\n activeAudioPlayer: AudioPlayer | null;\n};\n\nexport class AudioPlayerPool {\n state: StateStore<AudioPlayerPoolState> = new StateStore<AudioPlayerPoolState>({\n activeAudioPlayer: null,\n });\n private pool = new Map<string, AudioPlayer>();\n private audios = new Map<string, HTMLAudioElement>();\n private sharedAudio: HTMLAudioElement | null = null;\n private sharedOwnerId: string | null = null;\n private readonly allowConcurrentPlayback: boolean;\n\n constructor(config?: { allowConcurrentPlayback?: boolean }) {\n this.allowConcurrentPlayback = !!config?.allowConcurrentPlayback;\n }\n\n get players() {\n return Array.from(this.pool.values());\n }\n\n get activeAudioPlayer() {\n return this.state.getLatestValue().activeAudioPlayer;\n }\n\n getOrAdd = (params: Omit<AudioPlayerOptions, 'pool'>) => {\n const { playbackRates, plugins, ...descriptor } = params;\n let player = this.pool.get(params.id);\n if (player) {\n if (!player.disposed) {\n player.setDescriptor(descriptor);\n return player;\n }\n this.deregister(params.id);\n }\n player = new AudioPlayer({\n playbackRates,\n plugins,\n ...descriptor,\n pool: this,\n });\n this.pool.set(params.id, player);\n return player;\n };\n\n /**\n * In case of allowConcurrentPlayback enabled, a new Audio is created and assigned to the given audioPlayer owner.\n * In case of disabled concurrency, the shared audio ownership is transferred to the new owner loading the owner's\n * source.\n *\n * @param ownerId\n * @param src\n */\n acquireElement = ({ ownerId, src }: { ownerId: string; src: string }) => {\n if (!this.allowConcurrentPlayback) {\n // Single shared element mode\n if (!this.sharedAudio) {\n this.sharedAudio = new Audio();\n }\n // Handoff from previous owner if different\n if (this.sharedOwnerId && this.sharedOwnerId !== ownerId) {\n const previous = this.pool.get(this.sharedOwnerId);\n // Ask previous to pause and drop ref, but keep player in pool\n previous?.pause();\n previous?.releaseElementForHandoff();\n }\n this.sharedOwnerId = ownerId;\n if (this.sharedAudio.src !== src) {\n // setting src starts loading; avoid explicit load() to prevent currentTime reset flicker\n this.sharedAudio.src = src;\n }\n return this.sharedAudio;\n }\n\n // Concurrent-per-owner mode\n let audio = this.audios.get(ownerId);\n if (!audio) {\n audio = new Audio();\n this.audios.set(ownerId, audio);\n }\n if (audio.src !== src) {\n // setting src starts loading; avoid explicit load() here as well\n audio.src = src;\n }\n return audio;\n };\n\n /**\n * Removes the given audio players ownership of the shared audio element (in case of concurrent playback is disabled)\n * and pauses the reproduction of the audio.\n * In case of concurrent playback mode (allowConcurrentPlayback enabled), the audio is paused,\n * its source cleared and removed from the audios pool readied for garbage collection.\n *\n * @param ownerId\n */\n releaseElement = (ownerId: string) => {\n if (!this.allowConcurrentPlayback) {\n if (this.sharedOwnerId !== ownerId) return;\n const el = this.sharedAudio;\n if (el) {\n try {\n el.pause();\n } catch {\n // ignore\n }\n el.removeAttribute('src');\n el.load();\n }\n // Keep shared element instance for reuse\n this.sharedOwnerId = null;\n return;\n }\n\n const el = this.audios.get(ownerId);\n if (!el) return;\n try {\n el.pause();\n } catch {\n // ignore\n }\n el.removeAttribute('src');\n el.load();\n this.audios.delete(ownerId);\n };\n\n /** Sets active audio player when allowConcurrentPlayback is disabled */\n setActiveAudioPlayer = (activeAudioPlayer: AudioPlayer | null) => {\n if (this.allowConcurrentPlayback) return;\n this.state.partialNext({ activeAudioPlayer });\n };\n\n /** Removes the AudioPlayer instance from the pool of players */\n deregister(id: string) {\n if (this.pool.has(id)) {\n this.pool.delete(id);\n }\n if (this.activeAudioPlayer?.id === id) {\n this.setActiveAudioPlayer(null);\n }\n }\n\n /** Performs all the necessary cleanup actions and removes the player from the pool */\n remove = (id: string) => {\n const player = this.pool.get(id);\n if (!player) return;\n player.requestRemoval();\n };\n\n /** Removes and cleans up all the players from the pool */\n clear = () => {\n this.players.forEach((player) => {\n this.remove(player.id);\n });\n };\n\n registerSubscriptions = () => {\n // Only register subscriptions for players that have an attached element.\n // Avoid creating elements or cross-wiring listeners on the shared element in single-playback mode.\n this.players.forEach((p) => {\n if (p.elementRef) {\n p.registerSubscriptions();\n }\n });\n };\n}\n","import type { AudioPlayerPlugin } from './AudioPlayerPlugin';\nimport { type AudioPlayerErrorCode } from '../AudioPlayer';\nimport type { TFunction } from 'i18next';\nimport type { AddNotification } from '../../Notifications/hooks/useNotificationApi';\nimport type { NotificationTargetPanel } from '../../Notifications/notificationTarget';\n\nconst SEEK_NOT_SUPPORTED_NOTIFICATION_DEBOUNCE_INTERVAL_MS = 1000;\n\nexport const audioPlayerNotificationsPluginFactory = ({\n addNotification,\n panel = 'channel',\n t,\n}: {\n addNotification: AddNotification;\n panel?: NotificationTargetPanel;\n t: TFunction;\n}): AudioPlayerPlugin => {\n const errors: Record<AudioPlayerErrorCode, Error> = {\n 'failed-to-start': new Error(t('Failed to play the recording')),\n 'not-playable': new Error(\n t('Recording format is not supported and cannot be reproduced'),\n ),\n 'seek-not-supported': new Error(t('Cannot seek in the recording')),\n };\n let lastSeekNotSupportedNotificationAt: number | undefined;\n\n return {\n id: 'AudioPlayerNotificationsPlugin',\n onError: ({ errCode, error: e }) => {\n if (errCode === 'seek-not-supported') {\n const now = Date.now();\n\n if (\n typeof lastSeekNotSupportedNotificationAt === 'number' &&\n now - lastSeekNotSupportedNotificationAt <\n SEEK_NOT_SUPPORTED_NOTIFICATION_DEBOUNCE_INTERVAL_MS\n ) {\n return;\n }\n\n lastSeekNotSupportedNotificationAt = now;\n }\n\n const error =\n (errCode && errors[errCode]) ??\n e ??\n new Error(t('Error reproducing the recording'));\n\n addNotification({\n emitter: 'AudioPlayer',\n error,\n message: error.message,\n severity: 'error',\n targetPanels: [panel],\n type: 'browser:audio:playback:error',\n });\n },\n };\n};\n","import { useMemo, useRef } from 'react';\n\nimport type { AriaLivePriority } from '../useAriaLiveAnnouncer';\nimport { useAriaLiveAnnouncer } from '../useAriaLiveAnnouncer';\nimport { useDebouncedAnnounce } from '../scheduling';\nimport { useTranslationContext } from '../../../context/TranslationContext';\n\ntype TranslateFn = ReturnType<typeof useTranslationContext>['t'];\n\n/**\n * Optional delivery overrides a call site may pass ALONGSIDE an interaction's message params.\n * These are not consumed by the message resolver — they only affect how the announcement is\n * delivered. `debounceMs` overrides that interaction's default debounce ({@link\n * INTERACTION_DEBOUNCE_MS}) for THIS call, and enables debouncing for an interaction that has no\n * default. `delayMs` overrides the default delay ({@link INTERACTION_DELAY_MS}) for the\n * (non-debounced) immediate path. Param-less (discrete) interactions are always immediate and do\n * not accept overrides.\n *\n * `debounceMs` vs `delayMs`: a debounce collapses rapid repeats on a per-call-site timer and is\n * **cancelled if that call site unmounts** — right for a value that keeps changing in place (a\n * result count). `delayMs` schedules a single deferred emit in the shared announcer PROVIDER, so it\n * **survives the caller unmounting** — right for a one-shot confirmation whose origin (e.g. a list\n * row) disappears on the very action being confirmed (opening a channel/thread hides the list on\n * mobile). Both let the message land after a competing focus/typing read-out. `debounceMs` wins if\n * both are given.\n */\nexport type InteractionDeliveryOptions = { debounceMs?: number; delayMs?: number };\n\n/**\n * Parameters accepted by each parameterized interaction announcement.\n * Interactions that take no parameters map to `undefined`. Param-ful interactions additionally\n * accept {@link InteractionDeliveryOptions} (e.g. a per-call `debounceMs`).\n */\nexport type InteractionAnnouncementParams = {\n /** Audio playback speed was changed via the playback-rate button. `rate` is the new multiplier. */\n 'audioPlayer.playbackRateChanged': InteractionDeliveryOptions & { rate: number };\n /** A channel was opened from the channel list. `name` is its display title. */\n 'channel.opened': InteractionDeliveryOptions & { name: string };\n /** A slash command was activated from the Instant Commands menu. `command` is its name. */\n 'command.selected': InteractionDeliveryOptions & { command: string };\n 'giphy.canceled': undefined;\n 'giphy.sent': undefined;\n 'giphy.shuffled': InteractionDeliveryOptions & { title?: string };\n 'poll.dialogOpened': undefined;\n /** A poll option was dropped at a new position during keyboard reorder. */\n 'poll.optionDropped': InteractionDeliveryOptions & {\n option: string;\n position: number;\n };\n /** A poll option was picked up to start a keyboard reorder. `option` is its text (or a fallback). */\n 'poll.optionPickedUp': InteractionDeliveryOptions & { option: string };\n 'poll.optionRemoved': InteractionDeliveryOptions & { option: string };\n 'poll.sent': undefined;\n 'search.cleared': undefined;\n 'search.resultCount': InteractionDeliveryOptions & {\n /** Whether every active source is fully loaded — appends an \"all results loaded\" clause. */\n allResultsLoaded?: boolean;\n count: number;\n };\n 'suggestions.count': InteractionDeliveryOptions & {\n count: number;\n suggestionsLabel?: string;\n };\n /** A thread was opened from the thread list. `name` is its channel's display title. */\n 'thread.opened': InteractionDeliveryOptions & { name: string };\n 'user.selected': InteractionDeliveryOptions & { user: string };\n /** A finished voice recording was added to the composer (async multi-send: not sent yet). */\n 'voiceRecording.attached': undefined;\n 'voiceRecording.paused': undefined;\n 'voiceRecording.resumed': undefined;\n /** A finished voice recording was sent immediately as a message. */\n 'voiceRecording.sent': undefined;\n 'voiceRecording.started': undefined;\n};\n\nexport type InteractionAnnouncementType = keyof InteractionAnnouncementParams;\n\n/**\n * One entry per interaction — the single place an interaction is registered. Each\n * resolver contains a LITERAL `t('aria/…')` call so that `i18next-cli extract`\n * (run via `yarn build-translations`) discovers and generates the key across all\n * locales. Keys must never be built dynamically (e.g. `t(someVariable)`) or\n * extraction silently misses them. Adding an interaction = one line here + one\n * line in {@link InteractionAnnouncementParams} (+ an override in\n * {@link INTERACTION_PRIORITIES} only if it is not `polite`).\n */\nconst INTERACTION_MESSAGES: {\n [T in InteractionAnnouncementType]: (\n t: TranslateFn,\n params: InteractionAnnouncementParams[T],\n ) => string;\n} = {\n // Confirms the new audio playback speed after the user cycles it with the playback-rate button.\n // Reuses the existing (already-localized) button label so the spoken text matches the control.\n 'audioPlayer.playbackRateChanged': (t, params) =>\n t('Playback speed {{ rate }}x', { rate: params.rate }),\n // Confirms which channel was opened after selecting it from the list. Delayed (see\n // INTERACTION_DELAY_MS) so it lands AFTER the screen reader's announcement of the newly-focused\n // element (the message composer auto-focuses on channel change) rather than competing with — and\n // being superseded by — that native focus read-out. A provider-managed delay (not a per-row\n // debounce) so it still fires when selecting the channel unmounts the list (mobile).\n 'channel.opened': (t, params) =>\n t('aria/Opened channel: {{ name }}', { name: params.name }),\n // Confirms which slash command was activated after picking it from the Instant Commands menu.\n // Delayed (INTERACTION_DELAY_MS) for the same reason as the \"opened\" confirmations: selecting a\n // command closes the menu and focuses the composer textarea (whose name changes, e.g. to\n // \"Search GIFs\"), so the screen reader reads that focus first — this lands after it. A provider\n // delay (not a debounce) because the menu that fired it unmounts on selection.\n 'command.selected': (t, params) =>\n t('aria/Command activated: {{ command }}', { command: params.command }),\n 'giphy.canceled': (t) => t('aria/Giphy canceled'),\n 'giphy.sent': (t) => t('aria/Giphy sent'),\n // Giphy payloads rarely carry a human title, so include it only when present; otherwise a\n // generic \"changed\" confirmation. Both literal keys are extracted by i18next-cli.\n 'giphy.shuffled': (t, params) =>\n params.title\n ? t('aria/Giphy image changed: {{ title }}', { title: params.title })\n : t('aria/Giphy image changed'),\n // Spoken on poll-dialog open. Reuses the already-localized visible description for the middle\n // clause (so the spoken and visible text stay consistent) and adds two short aria-only phrases:\n // an explicit \"opened\" confirmation and the Enter affordance to step into the Question field.\n 'poll.dialogOpened': (t) =>\n `${t('aria/Poll dialog opened')}. ${t(\n 'Create a question, add options, and configure poll settings',\n )}. ${t('aria/Press Enter to start typing')}.`,\n // Keyboard reorder pickup/drop. Assertive (see INTERACTION_PRIORITIES) — immediate drag feedback\n // that must not be queued behind other polite messages.\n 'poll.optionDropped': (t, params) =>\n t('aria/Dropped \"{{ option }}\" at position {{ position }}.', {\n option: params.option,\n position: params.position,\n }),\n 'poll.optionPickedUp': (t, params) =>\n t(\n 'aria/Picked up \"{{ option }}\". Use arrow keys to reorder. Press Space or Tab to drop.',\n { option: params.option },\n ),\n // Confirms a poll option was removed, naming it by its text (or positional fallback). Polite so it\n // queues behind the focus move to the next option field instead of interrupting it.\n 'poll.optionRemoved': (t, params) =>\n t('aria/Removed option {{ option }}', { option: params.option }),\n 'poll.sent': (t) => t('aria/Poll sent'),\n 'search.cleared': (t) => t('aria/Search cleared'),\n // The number of items currently listed in the search results; an empty result set is spelled out\n // rather than announced as \"0\". When the list is fully loaded, the end-of-list status is folded\n // into THIS one announcement (reusing the visible footer's \"All results loaded\" text) instead of a\n // competing second live-region message that would supersede the count.\n 'search.resultCount': (t, params) => {\n if (params.count <= 0) return t('aria/No search results found');\n const count = t('aria/{{ count }} search results', { count: params.count });\n return params.allResultsLoaded ? `${count}. ${t('All results loaded')}` : count;\n },\n // Name the suggestion type by reusing the already-localized list label (\"5 Command\n // Suggestions\") so the user knows what the results are; fall back to the bare count when no\n // label is given. Both literal keys are extracted.\n 'suggestions.count': (t, params) =>\n params.suggestionsLabel\n ? t('aria/{{ count }} {{ suggestionsLabel }}', {\n count: params.count,\n suggestionsLabel: params.suggestionsLabel,\n })\n : t('aria/{{ count }} suggestions', { count: params.count }),\n // Confirms which thread was opened after selecting it from the list; `name` is the thread's\n // channel display title. Delayed for the same reason as `channel.opened` (the thread composer\n // auto-focuses on open, and its focus announcement would otherwise supersede this one).\n 'thread.opened': (t, params) =>\n t('aria/Opened thread in {{ name }}', { name: params.name }),\n 'user.selected': (t, params) =>\n t('aria/User selected: {{ user }}', { user: params.user }),\n // Voice recorder lifecycle — discrete, immediate, polite confirmations. Cancellation is NOT here:\n // it already emits an app notification (\"Voice message deleted\") announced by NotificationAnnouncer,\n // and recording errors surface as error notifications; adding them here would double-announce.\n 'voiceRecording.attached': (t) => t('aria/Voice recording attached'),\n 'voiceRecording.paused': (t) => t('aria/Recording paused'),\n 'voiceRecording.resumed': (t) => t('aria/Recording resumed'),\n 'voiceRecording.sent': (t) => t('aria/Voice message sent'),\n 'voiceRecording.started': (t) => t('aria/Recording started'),\n};\n\n/**\n * Per-interaction aria-live priority. Interactions default to `polite`; list one\n * here only to override it (e.g. with `assertive`).\n */\nconst INTERACTION_PRIORITIES: Partial<\n Record<InteractionAnnouncementType, AriaLivePriority>\n> = {\n // Assertive on open: a polite update fired around the dialog's focus-entry announcement is\n // dropped; assertive interrupts and is spoken (VoiceOver demotes the aria-describedby hint).\n 'poll.dialogOpened': 'assertive',\n // Keyboard reorder feedback must be immediate (interrupt), not queued behind polite messages.\n 'poll.optionDropped': 'assertive',\n 'poll.optionPickedUp': 'assertive',\n};\n\n/**\n * Per-interaction dedupe window (ms): an identical message for this interaction is announced at\n * most once per window (see {@link AriaLiveAnnounceOptions.dedupeMs}). List an interaction here\n * only when the SAME open/mount can fire it more than once in quick succession — e.g. a mount\n * effect double-invoked by React StrictMode (dev) — so the user does not hear a duplicate.\n */\nconst INTERACTION_DEDUPE_MS: Partial<Record<InteractionAnnouncementType, number>> = {\n // The audio player is pooled: if the same asset is rendered by two widgets they share one player,\n // so a single rate change fires this from both consumers. Dedupe collapses the identical message.\n // (Cycling always lands on a different rate → different text, so this never swallows a real change.)\n 'audioPlayer.playbackRateChanged': 300,\n 'poll.dialogOpened': 1000,\n};\n\n/**\n * Default per-interaction debounce delay (ms). Only list rapidly-updating streams where just the\n * settled value should be read (e.g. the autocomplete count as the query filters). Discrete\n * confirmations (Giphy/Poll sent, user selected) are NOT listed and announce immediately. A call\n * site can override (or opt into) a delay for a single call via `params.debounceMs` — see\n * {@link InteractionDeliveryOptions}.\n *\n * `suggestions.count` is a CONSEQUENCE OF TYPING, so the delay does double duty: it coalesces\n * rapid filters into the settled value AND lets the screen reader's per-keystroke typing echo\n * (the spoken character + field re-read) finish first. A polite update that lands mid-echo gets\n * queued behind a long re-read and is perceived as buried; waiting past the echo makes the count\n * the next thing spoken once the user pauses. This is a heuristic — echo length varies with the\n * SR's \"speak typed words/characters\" setting and field content — so tune if it still collides.\n */\nconst INTERACTION_DEBOUNCE_MS: Partial<Record<InteractionAnnouncementType, number>> = {\n // Coalesce the result count as the query filters / results stream in, and let the screen reader's\n // typing echo finish first (same rationale as `suggestions.count`, slightly longer as search\n // results can arrive over the network in bursts). The end-of-list status rides along in this same\n // message (see `search.resultCount` resolver), so there is no second announcement to compete.\n 'search.resultCount': 1000,\n 'suggestions.count': 500,\n};\n\n/**\n * Default per-interaction delay (ms) for the immediate (non-debounced) path — a single deferred\n * emit scheduled in the announcer PROVIDER (see {@link AriaLiveAnnounceOptions.delayMs}), so it\n * SURVIVES the calling component unmounting (unlike a debounce, whose timer is cleared on unmount).\n *\n * Opening a channel/thread moves focus to the (auto-focusing) message composer; the screen reader\n * announces that newly-focused element first, and a live-region message emitted alongside it is\n * superseded and dropped. The delay defers the confirmation past that focus read-out so it is spoken\n * next, in a calm moment. It is a provider delay rather than a debounce specifically because\n * selecting the item can unmount its list row (and the whole list, on mobile) — a per-row debounce\n * would be cancelled mid-flight, swallowing the confirmation.\n */\nconst INTERACTION_DELAY_MS: Partial<Record<InteractionAnnouncementType, number>> = {\n 'channel.opened': 1500,\n 'command.selected': 1500,\n 'thread.opened': 1500,\n};\n\n// Overloads enforce that parameterized interactions require their params and that\n// param-less interactions reject extra arguments.\ntype AnnounceInteraction = {\n <T extends InteractionAnnouncementType>(\n interaction: InteractionAnnouncementParams[T] extends undefined ? T : never,\n ): void;\n <T extends InteractionAnnouncementType>(\n interaction: InteractionAnnouncementParams[T] extends undefined ? never : T,\n params: InteractionAnnouncementParams[T],\n ): void;\n};\n\nexport type UseInteractionAnnouncementsValue = {\n /**\n * Announce a predefined interaction event to assistive technology. The\n * interaction name maps to a localized message and a baked-in aria-live\n * priority.\n */\n announceInteraction: AnnounceInteraction;\n /**\n * Cancel pending (debounced, not-yet-spoken) announcements: a single `interaction`, or all when\n * omitted. Call this when the source of a debounced announcement is torn down (e.g. search exited)\n * so a queued message is not spoken after its context is gone. An announcement already emitted into\n * the live region cannot be recalled.\n */\n cancelInteraction: (interaction?: InteractionAnnouncementType) => void;\n};\n\n/**\n * Thin, typed wrapper over the aria-live announcer exposing intention-revealing\n * helpers for transient, user-initiated UI interactions (e.g. a Giphy being\n * sent, a poll being created, a mention being picked). They map to i18n keys with\n * baked-in priorities and reuse the existing live region via\n * {@link useAriaLiveAnnouncer}. New interactions are registered as a single entry\n * in {@link INTERACTION_MESSAGES}.\n */\nexport const useInteractionAnnouncements = (): UseInteractionAnnouncementsValue => {\n const announce = useAriaLiveAnnouncer();\n const { t } = useTranslationContext();\n // Per-interaction debounce: each type has its own timer + delay from INTERACTION_DEBOUNCE_MS,\n // so e.g. the typing-driven `suggestions.count` can wait longer (to clear the screen reader's\n // typing echo) without affecting any other debounced interaction.\n const { announce: announceDebounced, cancel: cancelDebounced } =\n useDebouncedAnnounce(announce);\n // Cancel fn of the still-pending provider-delayed emit per interaction. A second trigger of the\n // same interaction within its delay window supersedes the first (so only the latest is spoken).\n // NOT cleared on unmount on purpose — provider-delayed emits are designed to survive the caller\n // unmounting (e.g. channel.opened fires after its list row is gone).\n const pendingImmediateCancelsRef = useRef<\n Partial<Record<InteractionAnnouncementType, () => void>>\n >({});\n\n return useMemo(\n () => ({\n announceInteraction: (\n interaction: InteractionAnnouncementType,\n params?: InteractionAnnouncementParams[InteractionAnnouncementType],\n ) => {\n const resolveMessage = INTERACTION_MESSAGES[interaction] as (\n t: TranslateFn,\n params: InteractionAnnouncementParams[InteractionAnnouncementType],\n ) => string;\n\n if (!resolveMessage) return;\n\n const message = resolveMessage(t, params as never);\n const priority = INTERACTION_PRIORITIES[interaction] ?? 'polite';\n\n // A per-call `params.debounceMs` overrides the registered default (and can opt an\n // otherwise-immediate interaction into debouncing).\n const debounceMs =\n (params as InteractionDeliveryOptions | undefined)?.debounceMs ??\n INTERACTION_DEBOUNCE_MS[interaction];\n if (debounceMs === undefined) {\n // Immediate path. `delayMs` (if any) is a provider-managed deferral that survives this\n // call site unmounting — used by the \"opened\" confirmations, whose list row disappears on\n // selection. `debounceMs` takes precedence over `delayMs` when both are set.\n const delayMs =\n (params as InteractionDeliveryOptions | undefined)?.delayMs ??\n INTERACTION_DELAY_MS[interaction];\n // Supersede a still-pending delayed emit of the same interaction so a rapid re-trigger\n // (e.g. selecting a second channel within the 1500ms window) speaks only the latest.\n pendingImmediateCancelsRef.current[interaction]?.();\n pendingImmediateCancelsRef.current[interaction] = announce(message, {\n dedupeMs: INTERACTION_DEDUPE_MS[interaction],\n delayMs,\n priority,\n });\n return;\n }\n\n // Debounced stream (e.g. suggestions.count): coalesce rapid updates into the settled\n // value, on a channel keyed by interaction type with that type's own delay. We do NOT\n // dedupe an unchanged message here — whether a repeat is meaningful is the caller's call\n // (e.g. SuggestionList re-announces the count on each genuine re-filter so the user gets\n // feedback even when the count is steady, such as emoji results capped at a constant N).\n // The debounce window already collapses idle/rapid duplicates.\n announceDebounced(interaction, message, debounceMs, priority);\n },\n cancelInteraction: (interaction?: InteractionAnnouncementType) => {\n cancelDebounced(interaction);\n const pending = pendingImmediateCancelsRef.current;\n if (interaction) {\n pending[interaction]?.();\n delete pending[interaction];\n } else {\n Object.values(pending).forEach((cancel) => cancel?.());\n pendingImmediateCancelsRef.current = {};\n }\n },\n }),\n [announce, announceDebounced, cancelDebounced, t],\n );\n};\n","import type { AudioPlayer, AudioPlayerState } from '../../AudioPlayback';\nimport { useInteractionAnnouncements } from './useInteractionAnnouncements';\nimport { useStateStore } from '../../../store';\nimport { useEffect, useRef } from 'react';\n\nconst playbackRateSelector = (state: AudioPlayerState) => ({\n currentPlaybackRate: state.currentPlaybackRate,\n});\n\nexport const useAudioPlaybackChangeAnnouncements = (\n audioPlayer: AudioPlayer | undefined,\n) => {\n const { announceInteraction } = useInteractionAnnouncements();\n\n // Announce a playback-speed change to assistive tech. The rate button only changes an icon/label\n // in place, so a screen reader gets no confirmation; announce off the state so it reflects the new\n // rate regardless of which widget's button was pressed (voice recording or audio attachment).\n const { currentPlaybackRate } =\n useStateStore(audioPlayer?.state, playbackRateSelector) ?? {};\n const previousPlaybackRateRef = useRef(currentPlaybackRate);\n useEffect(() => {\n const previous = previousPlaybackRateRef.current;\n previousPlaybackRateRef.current = currentPlaybackRate;\n // Skip the initial value and no-op re-renders; announce only a real change to a defined rate.\n if (\n currentPlaybackRate === undefined ||\n previous === undefined ||\n previous === currentPlaybackRate\n )\n return;\n announceInteraction('audioPlayer.playbackRateChanged', { rate: currentPlaybackRate });\n }, [announceInteraction, currentPlaybackRate]);\n};\n","import React, { useContext, useEffect, useState } from 'react';\nimport type { AudioPlayerOptions } from './AudioPlayer';\nimport type { AudioPlayerPoolState } from './AudioPlayerPool';\nimport { AudioPlayerPool } from './AudioPlayerPool';\nimport { audioPlayerNotificationsPluginFactory } from './plugins/AudioPlayerNotificationsPlugin';\nimport { useNotificationApi, useNotificationTarget } from '../Notifications';\nimport { useTranslationContext } from '../../context';\nimport { useStateStore } from '../../store';\nimport { useAudioPlaybackChangeAnnouncements } from '../Accessibility/hooks/useAudioPlaybackChangeAnnouncements';\n\nexport type WithAudioPlaybackProps = {\n children?: React.ReactNode;\n allowConcurrentPlayback?: boolean;\n};\n\nconst AudioPlayerContext = React.createContext<{ audioPlayers: AudioPlayerPool | null }>({\n audioPlayers: null,\n});\n\nexport const WithAudioPlayback = ({\n allowConcurrentPlayback,\n children,\n}: WithAudioPlaybackProps) => {\n const [audioPlayers] = useState(() => new AudioPlayerPool({ allowConcurrentPlayback }));\n\n useEffect(\n () => () => {\n audioPlayers.clear();\n },\n [audioPlayers],\n );\n\n return (\n <AudioPlayerContext.Provider value={{ audioPlayers }}>\n {children}\n </AudioPlayerContext.Provider>\n );\n};\n\nexport type UseAudioPlayerProps = {\n /**\n * Identifier of the entity that requested the audio playback, e.g. message ID.\n * Asset to specific audio player is a many-to-many relationship\n * - one URL can be associated with multiple UI elements,\n * - one UI element can display multiple audio sources.\n * Therefore, the AudioPlayer ID is a combination of request:src.\n *\n * The requester string can take into consideration whether there are multiple instances of\n * the same URL requested by the same requester (message has multiple attachments with the same asset URL).\n * In reality the fact that one message has multiple attachments with the same asset URL\n * could be considered a bad practice or a bug.\n */\n requester?: string;\n} & Partial<Omit<AudioPlayerOptions, 'id' | 'pool'>>;\n\nconst makeAudioPlayerId = ({ requester, src }: { src: string; requester?: string }) =>\n `${requester ?? 'requester-unknown'}:${src}`;\n\nexport const useAudioPlayer = ({\n durationSeconds,\n fileSize,\n mimeType,\n playbackRates,\n plugins,\n requester = '',\n src,\n title,\n waveformData,\n}: UseAudioPlayerProps) => {\n const { addNotification } = useNotificationApi();\n const panel = useNotificationTarget();\n const { t } = useTranslationContext();\n const { audioPlayers } = useContext(AudioPlayerContext);\n\n const audioPlayer =\n src && audioPlayers\n ? audioPlayers.getOrAdd({\n durationSeconds,\n fileSize,\n id: makeAudioPlayerId({ requester, src }),\n mimeType,\n playbackRates,\n plugins,\n src,\n title,\n waveformData,\n })\n : undefined;\n\n useAudioPlaybackChangeAnnouncements(audioPlayer);\n\n useEffect(() => {\n if (!audioPlayer) return;\n /**\n * Avoid having to pass client and translation function to AudioPlayer instances\n * and instead provide plugin that takes care of translated notifications.\n */\n const notificationsPlugin = audioPlayerNotificationsPluginFactory({\n addNotification,\n panel,\n t,\n });\n audioPlayer.setPlugins((currentPlugins) => [\n ...currentPlugins.filter((plugin) => plugin.id !== notificationsPlugin.id),\n notificationsPlugin,\n ]);\n }, [addNotification, audioPlayer, panel, t]);\n\n return audioPlayer;\n};\n\nconst activeAudioPlayerSelector = ({ activeAudioPlayer }: AudioPlayerPoolState) => ({\n activeAudioPlayer,\n});\n\nexport const useActiveAudioPlayer = () => {\n const { audioPlayers } = useContext(AudioPlayerContext);\n const { activeAudioPlayer } =\n useStateStore(audioPlayers?.state, activeAudioPlayerSelector) ?? {};\n return activeAudioPlayer;\n};\n","import type { ComponentPropsWithoutRef, ReactNode } from 'react';\nimport React from 'react';\nimport clsx from 'clsx';\n\nexport const BASE_FILE_ICON_CLASSNAME = 'str-chat__file-icon' as const;\nexport const FILE_ICON_GRAPHIC_CLASSNAME = 'str-chat__file-icon__graphic' as const;\n/** Add this class (e.g. via className) when hiding the label with CSS to center the icon graphic. */\nexport const FILE_ICON_NO_LABEL_CLASSNAME = 'str-chat__file-icon--no-label' as const;\n\nexport type FileIconSize = 'sm' | 'md' | 'lg' | 'xl';\n\nexport type FileIconSizeConfigEntry = {\n width: number;\n height: number;\n labelX: number;\n labelY: number;\n};\n\n/** Rendered dimensions (px) and label position in viewBox coords for consistent spacing. */\nexport const FILE_ICON_SIZE_CONFIG: Record<FileIconSize, FileIconSizeConfigEntry> = {\n lg: { height: 40, labelX: 16, labelY: 36, width: 32 },\n md: { height: 32, labelX: 16, labelY: 35, width: 26 },\n sm: { height: 24, labelX: 16, labelY: 31.5, width: 19 },\n xl: { height: 48, labelX: 16, labelY: 36, width: 40 },\n};\n\n/** Merge partial overrides with default config. Use for Chat-level fileIconSizeConfig. */\nexport const mergeFileIconSizeConfig = (\n overrides?: Partial<Record<FileIconSize, Partial<FileIconSizeConfigEntry>>>,\n): Record<FileIconSize, FileIconSizeConfigEntry> => {\n if (!overrides) return FILE_ICON_SIZE_CONFIG;\n return (['sm', 'md', 'lg', 'xl'] as const).reduce(\n (acc, size) => ({\n ...acc,\n [size]: { ...FILE_ICON_SIZE_CONFIG[size], ...overrides[size] },\n }),\n {} as Record<FileIconSize, FileIconSizeConfigEntry>,\n );\n};\n\nconst FILE_ICON_VIEWBOX = { height: 40, width: 32 } as const;\nconst FILE_ICON_PAPER_PATH =\n 'M0 4C0 1.79086 1.79086 0 4 0H22.4L32 10V36C32 38.2091 30.2091 40 28 40H4C1.79086 40 0 38.2091 0 36V4Z';\nconst FILE_ICON_FOLD_PATH = 'M32 10H25.4C23.7431 10 22.4 8.65685 22.4 7V0L32 10Z';\nconst FILE_ICON_WITHOUT_CAPTION_SYMBOL_SCALE_X = 32 / 26;\nconst FILE_ICON_WITHOUT_CAPTION_SYMBOL_SCALE_Y = 40 / 32;\n\nexport type BaseFileIconProps = {\n label?: string;\n /** Resolved size config (defaults from FILE_ICON_SIZE_CONFIG when omitted). Pass sizeConfig on FileIcon or use AttachmentFileIcon to override. */\n sizeConfig?: Record<FileIconSize, FileIconSizeConfigEntry>;\n size?: FileIconSize;\n} & ComponentPropsWithoutRef<'svg'>;\n\ntype SvgProps = Omit<BaseFileIconProps, 'label'>;\n\nconst Svg = ({ className, size, sizeConfig, ...props }: SvgProps) => {\n const config = sizeConfig ?? FILE_ICON_SIZE_CONFIG;\n const dimensions = size ? config[size] : undefined;\n const dimensionsStyle = dimensions\n ? {\n flexShrink: 0,\n height: `${dimensions.height}px`,\n width: `${dimensions.width}px`,\n }\n : undefined;\n\n return (\n <svg\n height={dimensions?.height}\n viewBox={`0 0 ${FILE_ICON_VIEWBOX.width} ${FILE_ICON_VIEWBOX.height}`}\n width={dimensions?.width}\n xmlns='http://www.w3.org/2000/svg'\n {...props}\n className={clsx(\n BASE_FILE_ICON_CLASSNAME,\n { [`${BASE_FILE_ICON_CLASSNAME}--size-${size}`]: size },\n className,\n )}\n style={{ ...dimensionsStyle, ...props.style }}\n />\n );\n};\n\ntype FileIconLabelProps = {\n label?: string;\n size?: FileIconSize;\n sizeConfig?: Record<FileIconSize, FileIconSizeConfigEntry>;\n};\n\nconst FileIconLabel = ({ label, size, sizeConfig }: FileIconLabelProps) => {\n const configMap = sizeConfig ?? FILE_ICON_SIZE_CONFIG;\n const config = size ? configMap[size] : { labelX: 16, labelY: 33 };\n return (\n <text className='str-chat__file-icon__label' x={config.labelX} y={config.labelY}>\n {label}\n </text>\n );\n};\n\ntype FileIconSymbolMap = {\n withCaption: ReactNode;\n withoutCaption: ReactNode;\n};\n\nconst TEXT_SYMBOLS: FileIconSymbolMap = {\n withCaption: (\n <>\n <rect fill='white' height='1.6' rx='0.8' width='14.4' x='8' y='12.2' />\n <rect fill='white' height='1.6' rx='0.8' width='14.4' x='8' y='20.2' />\n <rect fill='white' height='1.6' rx='0.8' width='9.6' x='8' y='16.2' />\n </>\n ),\n withoutCaption: (\n <>\n <rect fill='white' height='1.4' rx='0.7' width='12.6' x='6' y='14.8' />\n <rect fill='white' height='1.4' rx='0.7' width='12.6' x='6' y='21.8' />\n <rect fill='white' height='1.4' rx='0.7' width='8.4' x='6' y='18.3' />\n </>\n ),\n};\n\nconst OTHER_SYMBOLS: FileIconSymbolMap = {\n withCaption: (\n <>\n <rect fill='white' height='1.6' rx='0.8' width='14.4' x='8' y='13.2' />\n <rect fill='white' height='1.6' rx='0.8' width='14.4' x='8' y='21.2' />\n <rect fill='white' height='1.6' rx='0.8' width='9.6' x='8' y='17.2' />\n </>\n ),\n withoutCaption: TEXT_SYMBOLS.withoutCaption,\n};\n\nconst CODE_SYMBOLS: FileIconSymbolMap = {\n withCaption: (\n <path\n d='M14.5 22.5L17.5 11.5M20.1666 14.1667L21.9732 16.0862C22.4564 16.5996 22.4564 17.4004 21.9732 17.9138L20.1666 19.8333M11.8333 19.8333L10.0267 17.9138C9.54351 17.4004 9.54351 16.5996 10.0267 16.0862L11.8333 14.1667'\n stroke='white'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.2'\n />\n ),\n withoutCaption: (\n <path\n d='M11.6876 23.8125L14.3126 14.1875M16.646 16.5208L18.2267 18.2004C18.6495 18.6496 18.6495 19.3503 18.2267 19.7996L16.646 21.4792M9.3543 21.4792L7.77352 19.7996C7.35072 19.3503 7.35072 18.6496 7.77352 18.2004L9.3543 16.5208'\n stroke='white'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.33333'\n />\n ),\n};\n\nconst AUDIO_SYMBOLS: FileIconSymbolMap = {\n withCaption: (\n <path\n d='M20.5 15.5V18.5M22.5 14.5V19.5M13.5 19.5H10.5C10.3674 19.5 10.2402 19.4473 10.1464 19.3536C10.0527 19.2598 10 19.1326 10 19V15C10 14.8674 10.0527 14.7402 10.1464 14.6464C10.2402 14.5527 10.3674 14.5 10.5 14.5H13.5L18 11V23L13.5 19.5Z'\n stroke='white'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.2'\n />\n ),\n withoutCaption: (\n <path\n d='M17.5 17.5V20.5M19.5 16.5V21.5M10.5 21.5H7.5C7.36739 21.5 7.24021 21.4473 7.14645 21.3536C7.05268 21.2598 7 21.1326 7 21V17C7 16.8674 7.05268 16.7402 7.14645 16.6464C7.24021 16.5527 7.36739 16.5 7.5 16.5H10.5L15 13V25L10.5 21.5Z'\n stroke='white'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.33333'\n />\n ),\n};\n\nconst PRESENTATION_SYMBOLS: FileIconSymbolMap = {\n withCaption: (\n <path\n d='M12.5 15.5H19.5M16 17.5V22.5M14 22.5H18M9.49999 17.5C9.41472 17.5001 9.33085 17.4783 9.25635 17.4368C9.18185 17.3953 9.1192 17.3355 9.07436 17.263C9.02952 17.1904 9.00397 17.1076 9.00014 17.0224C8.99631 16.9373 9.01433 16.8525 9.05249 16.7762L11.5525 11.7763C11.5941 11.6932 11.6579 11.6233 11.737 11.5745C11.816 11.5257 11.9071 11.4999 12 11.5H20C20.0929 11.4999 20.184 11.5257 20.263 11.5745C20.342 11.6233 20.4059 11.6932 20.4475 11.7763L22.9475 16.7762C22.9857 16.8525 23.0037 16.9373 22.9998 17.0224C22.996 17.1076 22.9705 17.1904 22.9256 17.263C22.8808 17.3355 22.8181 17.3953 22.7436 17.4368C22.6691 17.4783 22.5853 17.5001 22.5 17.5H9.49999Z'\n stroke='white'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.2'\n />\n ),\n withoutCaption: (\n <path\n d='M9.49999 17.5H16.5M13 19.5V24.5M11 24.5H15M6.49999 19.5C6.41472 19.5001 6.33085 19.4783 6.25635 19.4368C6.18185 19.3953 6.11921 19.3355 6.07436 19.263C6.02952 19.1904 6.00397 19.1076 6.00014 19.0224C5.99631 18.9373 6.01433 18.8525 6.05249 18.7763L8.55249 13.7763C8.59406 13.6932 8.65795 13.6233 8.73699 13.5745C8.81603 13.5257 8.9071 13.4999 8.99999 13.5H17C17.0929 13.4999 17.184 13.5257 17.263 13.5745C17.342 13.6233 17.4059 13.6932 17.4475 13.7763L19.9475 18.7763C19.9857 18.8525 20.0037 18.9373 19.9998 19.0224C19.996 19.1076 19.9705 19.1904 19.9256 19.263C19.8808 19.3355 19.8181 19.3953 19.7436 19.4368C19.6691 19.4783 19.5853 19.5001 19.5 19.5H6.49999Z'\n stroke='white'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.33333'\n />\n ),\n};\n\nconst SPREADSHEET_SYMBOLS: FileIconSymbolMap = {\n withCaption: (\n <path\n d='M10 15.5H22M10 18.5H22M13.5 15.5V21.5M10 12.5H22V21C22 21.1326 21.9473 21.2598 21.8536 21.3536C21.7598 21.4473 21.6326 21.5 21.5 21.5H10.5C10.3674 21.5 10.2402 21.4473 10.1464 21.3536C10.0527 21.2598 10 21.1326 10 21V12.5Z'\n stroke='white'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.5'\n />\n ),\n withoutCaption: (\n <path\n d='M7 17.5H19M7 20.5H19M10.5 17.5V23.5M7 14.5H19V23C19 23.1326 18.9473 23.2598 18.8536 23.3536C18.7598 23.4473 18.6326 23.5 18.5 23.5H7.5C7.36739 23.5 7.24021 23.4473 7.14645 23.3536C7.05268 23.2598 7 23.1326 7 23V14.5Z'\n stroke='white'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.2'\n />\n ),\n};\n\nconst COMPRESSION_SYMBOLS: FileIconSymbolMap = {\n withCaption: (\n <path\n clipRule='evenodd'\n d='M9.41177 0H7.52942V2H9.41177V4H7.52942V6H9.41177V8H7.52942V10H9.41177V12H7.52942V14H9.41177V12H11.2941V10H9.41177V8H11.2941V6H9.41177V4H11.2941V2H9.41177V0ZM7.52942 17C7.52942 16.4477 7.9508 16 8.4706 16H10.3529C10.8727 16 11.2941 16.4477 11.2941 17V23C11.2941 23.5523 10.8727 24 10.3529 24H8.4706C7.9508 24 7.52942 23.5523 7.52942 23V17ZM8.4706 23V20H10.3529V23H8.4706Z'\n fill='white'\n fillRule='evenodd'\n />\n ),\n withoutCaption: (\n <path\n clipRule='evenodd'\n d='M8.17031 0H6.11768V2.14737H8.17031V4.29474H6.11768V6.4421H8.17031V8.58947H6.11768V10.7368H8.17031V12.8842H6.11768V15.0316H8.17031V12.8842H10.2229V10.7368H8.17031V8.58947H10.2229V6.4421H8.17031V4.29474H10.2229V2.14737H8.17031V0ZM6.11768 18.2526C6.11768 17.6597 6.57717 17.1789 7.14399 17.1789H9.19662C9.76344 17.1789 10.2229 17.6597 10.2229 18.2526V24.6947C10.2229 25.2877 9.76344 25.7684 9.19662 25.7684H7.14399C6.57717 25.7684 6.11768 25.2877 6.11768 24.6947V18.2526ZM7.14399 24.6947V21.4737H9.19662V24.6947H7.14399Z'\n fill='white'\n fillRule='evenodd'\n />\n ),\n};\n\nconst VIDEO_SYMBOLS: FileIconSymbolMap = {\n withCaption: (\n <path\n d='M20.5 16L23.5 14V20L20.5 18M10 13H20C20.2761 13 20.5 13.2239 20.5 13.5V20.5C20.5 20.7761 20.2761 21 20 21H10C9.72386 21 9.5 20.7761 9.5 20.5V13.5C9.5 13.2239 9.72386 13 10 13Z'\n stroke='white'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.2'\n />\n ),\n withoutCaption: (\n <path\n d='M17.5001 18L20.5001 16V22L17.5001 20M7.00012 15H17.0001C17.2763 15 17.5001 15.2239 17.5001 15.5V22.5C17.5001 22.7761 17.2763 23 17.0001 23H7.00012C6.72398 23 6.50012 22.7761 6.50012 22.5V15.5C6.50012 15.2239 6.72398 15 7.00012 15Z'\n stroke='white'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='1.33333'\n />\n ),\n};\n\ntype StandardFileTypeIconProps = BaseFileIconProps & {\n color: string;\n fileTypeClassName: string;\n symbols: FileIconSymbolMap;\n};\n\nconst StandardFileTypeIcon = ({\n className,\n color,\n fileTypeClassName,\n label,\n size,\n sizeConfig,\n symbols,\n ...props\n}: StandardFileTypeIconProps) => {\n const renderLabel = !!label;\n const resolvedLabel = renderLabel ? label : undefined;\n const symbolVariant = renderLabel ? 'withCaption' : 'withoutCaption';\n\n return (\n <Svg\n {...props}\n className={clsx(fileTypeClassName, className)}\n size={size}\n sizeConfig={sizeConfig}\n >\n <g className={FILE_ICON_GRAPHIC_CLASSNAME}>\n <path d={FILE_ICON_PAPER_PATH} fill={color} />\n {renderLabel ? (\n symbols[symbolVariant]\n ) : (\n <g\n transform={`scale(${FILE_ICON_WITHOUT_CAPTION_SYMBOL_SCALE_X} ${FILE_ICON_WITHOUT_CAPTION_SYMBOL_SCALE_Y})`}\n >\n {symbols[symbolVariant]}\n </g>\n )}\n <path d={FILE_ICON_FOLD_PATH} fill='white' opacity='0.5' />\n </g>\n {resolvedLabel && (\n <FileIconLabel label={resolvedLabel} size={size} sizeConfig={sizeConfig} />\n )}\n </Svg>\n );\n};\n\nconst PDF_SMALL_SYMBOL = (\n <path\n d='M20.7533 19.5337C20.28 19.037 19.3093 18.7537 17.9373 18.7537C17.204 18.7537 16.3526 18.8244 15.43 18.9897C14.8647 18.4461 14.3499 17.8523 13.892 17.2157C13.5373 16.7424 13.2293 16.2224 12.9453 15.725C13.49 14.069 13.75 12.7204 13.75 11.7504C13.75 10.6624 13.348 9.52637 12.1886 9.52637C11.834 9.52637 11.4786 9.7397 11.2893 10.047C10.7693 10.9697 11.006 12.9804 11.9046 14.9677C11.5664 15.984 11.1876 16.9863 10.7693 17.9724C10.3906 18.8717 9.96465 19.7944 9.49131 20.6457C6.88931 21.687 5.20931 22.8937 5.01998 23.839C4.94931 24.1944 5.06731 24.5257 5.32798 24.7857C5.42265 24.857 5.75398 25.141 6.32131 25.141C8.04798 25.141 9.86998 22.349 10.7926 20.6697C11.5026 20.433 12.2126 20.1964 12.922 20.007C13.6704 19.8038 14.4284 19.638 15.1933 19.5104C17.0146 21.1424 18.6233 21.403 19.428 21.403C20.4213 21.403 20.7766 21.0004 20.8946 20.6697C21.108 20.243 20.966 19.7704 20.7533 19.5337ZM19.8066 20.2204C19.7353 20.575 19.38 20.8117 18.884 20.8117C18.742 20.8117 18.624 20.7877 18.4813 20.7644C17.5826 20.551 16.7306 20.1017 15.8793 19.3917C16.5357 19.2807 17.2003 19.2254 17.866 19.2264C18.3633 19.2264 18.7893 19.2497 19.0726 19.321C19.404 19.3917 19.9246 19.605 19.806 20.2197L19.8066 20.2204ZM14.7906 19.1084C14.1305 19.2321 13.4755 19.382 12.8273 19.5577C12.262 19.7047 11.7017 19.8703 11.1473 20.0544C11.4355 19.4962 11.7039 18.9281 11.952 18.351C12.236 17.6884 12.472 17.0024 12.7093 16.3637C12.9453 16.7657 13.206 17.1684 13.466 17.523C13.8911 18.065 14.3329 18.5937 14.7906 19.1084ZM11.692 10.307C11.7338 10.2232 11.7978 10.1525 11.877 10.1025C11.9563 10.0526 12.0477 10.0253 12.1413 10.0237C12.638 10.0237 12.7326 10.591 12.7326 11.041C12.7326 11.7977 12.496 12.957 12.094 14.2817C11.4073 12.4364 11.3606 10.899 11.692 10.307ZM9.08931 21.3317C7.88265 23.319 6.72331 24.549 6.01398 24.549C5.88599 24.5498 5.76132 24.5083 5.65931 24.431C5.51731 24.289 5.44598 24.1237 5.49331 23.9344C5.63531 23.2244 7.00731 22.231 9.08931 21.3317Z'\n fill='white'\n />\n);\n\nconst PDF_LEGACY_SYMBOL = (\n <>\n <path\n d='M23.7533 19.2C23.28 18.7033 22.3093 18.42 20.9373 18.42C20.204 18.42 19.3526 18.4906 18.43 18.656C17.8647 18.1124 17.3499 17.5186 16.892 16.882C16.5373 16.4086 16.2293 15.8886 15.9453 15.3913C16.49 13.7353 16.75 12.3866 16.75 11.4166C16.75 10.3286 16.348 9.19263 15.1886 9.19263C14.834 9.19263 14.4786 9.40596 14.2893 9.71329C13.7693 10.636 14.006 12.6466 14.9046 14.634C14.5664 15.6502 14.1877 16.6526 13.7693 17.6386C13.3906 18.538 12.9646 19.4606 12.4913 20.312C9.88931 21.3533 8.20931 22.56 8.01998 23.5053C7.94931 23.8606 8.06731 24.192 8.32798 24.452C8.42265 24.5233 8.75398 24.8073 9.32131 24.8073C11.048 24.8073 12.87 22.0153 13.7926 20.336C14.5026 20.0993 15.2126 19.8626 15.922 19.6733C16.6704 19.4701 17.4284 19.3043 18.1933 19.1766C20.0146 20.8086 21.6233 21.0693 22.428 21.0693C23.4213 21.0693 23.7766 20.6666 23.8946 20.336C24.108 19.9093 23.966 19.4366 23.7533 19.2ZM22.8066 19.8866C22.7353 20.2413 22.38 20.478 21.884 20.478C21.742 20.478 21.624 20.454 21.4813 20.4306C20.5826 20.2173 19.7306 19.768 18.8793 19.058C19.5357 18.947 20.2003 18.8917 20.866 18.8926C21.3633 18.8926 21.7893 18.916 22.0726 18.9873C22.404 19.058 22.9246 19.2713 22.806 19.886L22.8066 19.8866ZM17.7906 18.7746C17.1305 18.8983 16.4755 19.0482 15.8273 19.224C15.262 19.3709 14.7017 19.5366 14.1473 19.7206C14.4355 19.1625 14.7039 18.5944 14.952 18.0173C15.236 17.3546 15.472 16.6686 15.7093 16.03C15.9453 16.432 16.206 16.8346 16.466 17.1893C16.8911 17.7313 17.3329 18.26 17.7906 18.7746ZM14.692 9.97329C14.7338 9.88949 14.7978 9.81875 14.877 9.7688C14.9563 9.71884 15.0477 9.69157 15.1413 9.68996C15.638 9.68996 15.7326 10.2573 15.7326 10.7073C15.7326 11.464 15.496 12.6233 15.094 13.948C14.4073 12.1026 14.3606 10.5653 14.692 9.97329ZM12.0893 20.998C10.8826 22.9853 9.72331 24.2153 9.01398 24.2153C8.88599 24.2161 8.76132 24.1746 8.65931 24.0973C8.51731 23.9553 8.44598 23.79 8.49331 23.6006C8.63531 22.8906 10.0073 21.8973 12.0893 20.998Z'\n fill='white'\n />\n <path\n d='M9.74219 34.4258V28.6992H10.8828V29.3633H10.9531C11.0286 29.2096 11.1276 29.0781 11.25 28.9688C11.375 28.8594 11.5208 28.776 11.6875 28.7188C11.8542 28.6589 12.0391 28.6289 12.2422 28.6289C12.6016 28.6289 12.9115 28.7188 13.1719 28.8984C13.4323 29.0781 13.6328 29.3333 13.7734 29.6641C13.9167 29.9922 13.9883 30.3854 13.9883 30.8438V30.8516C13.9883 31.3125 13.918 31.7083 13.7773 32.0391C13.6367 32.3698 13.4362 32.6237 13.1758 32.8008C12.9154 32.9779 12.6042 33.0664 12.2422 33.0664C12.0443 33.0664 11.8607 33.0365 11.6914 32.9766C11.5247 32.9141 11.3776 32.8268 11.25 32.7148C11.125 32.6029 11.026 32.4688 10.9531 32.3125H10.8828V34.4258H9.74219ZM11.8516 32.1211C12.0547 32.1211 12.2279 32.0703 12.3711 31.9688C12.5169 31.8672 12.6289 31.7214 12.707 31.5312C12.7878 31.3411 12.8281 31.1146 12.8281 30.8516V30.8438C12.8281 30.5807 12.7878 30.3542 12.707 30.1641C12.6289 29.974 12.5169 29.8281 12.3711 29.7266C12.2279 29.625 12.0547 29.5742 11.8516 29.5742C11.651 29.5742 11.4766 29.625 11.3281 29.7266C11.1823 29.8281 11.069 29.974 10.9883 30.1641C10.9102 30.3516 10.8711 30.5781 10.8711 30.8438V30.8516C10.8711 31.112 10.9115 31.3385 10.9922 31.5312C11.0729 31.7214 11.1862 31.8672 11.332 31.9688C11.4805 32.0703 11.6536 32.1211 11.8516 32.1211ZM16.457 33.0664C16.1003 33.0664 15.7904 32.9779 15.5273 32.8008C15.2669 32.6211 15.0651 32.3659 14.9219 32.0352C14.7812 31.7044 14.7109 31.3099 14.7109 30.8516V30.8438C14.7109 30.3828 14.7799 29.987 14.918 29.6562C15.0586 29.3255 15.2591 29.0716 15.5195 28.8945C15.7799 28.7174 16.0924 28.6289 16.457 28.6289C16.6523 28.6289 16.8333 28.6602 17 28.7227C17.1693 28.7826 17.3177 28.8685 17.4453 28.9805C17.5729 29.0924 17.6719 29.2279 17.7422 29.3867H17.8125V27.0547H18.9531V33H17.8125V32.332H17.7422C17.6693 32.4857 17.5703 32.6172 17.4453 32.7266C17.3229 32.8359 17.1784 32.9206 17.0117 32.9805C16.8451 33.0378 16.6602 33.0664 16.457 33.0664ZM16.8438 32.1211C17.0469 32.1211 17.2214 32.0703 17.3672 31.9688C17.513 31.8672 17.625 31.7214 17.7031 31.5312C17.7839 31.3411 17.8242 31.1159 17.8242 30.8555V30.8477C17.8242 30.582 17.7839 30.3555 17.7031 30.168C17.625 29.9779 17.5117 29.832 17.3633 29.7305C17.2174 29.6263 17.0443 29.5742 16.8438 29.5742C16.6458 29.5742 16.4727 29.6263 16.3242 29.7305C16.1784 29.832 16.0664 29.9779 15.9883 30.168C15.9102 30.3555 15.8711 30.5807 15.8711 30.8438V30.8516C15.8711 31.1146 15.9102 31.3411 15.9883 31.5312C16.0664 31.7214 16.1784 31.8672 16.3242 31.9688C16.4701 32.0703 16.6432 32.1211 16.8438 32.1211ZM20.4648 33V29.5586H19.7695V28.6992H20.4648V28.2969C20.4648 28.0104 20.5156 27.7721 20.6172 27.582C20.7188 27.3919 20.8776 27.25 21.0938 27.1562C21.3125 27.0599 21.5951 27.0117 21.9414 27.0117C22.0586 27.0117 22.1641 27.0156 22.2578 27.0234C22.3542 27.0312 22.444 27.0417 22.5273 27.0547V27.8164C22.4909 27.8086 22.4427 27.8034 22.3828 27.8008C22.3255 27.7956 22.2604 27.793 22.1875 27.793C21.9661 27.793 21.8099 27.8438 21.7188 27.9453C21.6276 28.0443 21.582 28.1875 21.582 28.375V28.6992H22.4922V29.5586H21.6055V33H20.4648Z'\n fill='white'\n />\n </>\n);\n\nexport const FilePdfIcon = ({\n className,\n label,\n size,\n sizeConfig,\n ...props\n}: BaseFileIconProps) => {\n const useLegacyPdfMarkup = !!label;\n\n return (\n <Svg\n {...props}\n className={clsx(\n 'str-chat__file-icon--pdf',\n useLegacyPdfMarkup && FILE_ICON_NO_LABEL_CLASSNAME,\n className,\n )}\n size={size}\n sizeConfig={sizeConfig}\n >\n <g className={FILE_ICON_GRAPHIC_CLASSNAME}>\n <path d={FILE_ICON_PAPER_PATH} fill='#E71A01' />\n {useLegacyPdfMarkup ? (\n PDF_LEGACY_SYMBOL\n ) : (\n <g\n transform={`scale(${FILE_ICON_WITHOUT_CAPTION_SYMBOL_SCALE_X} ${FILE_ICON_WITHOUT_CAPTION_SYMBOL_SCALE_Y})`}\n >\n {PDF_SMALL_SYMBOL}\n </g>\n )}\n <path d={FILE_ICON_FOLD_PATH} fill='white' opacity='0.5' />\n </g>\n </Svg>\n );\n};\n\nexport const FileWordIcon = ({ className, label, ...props }: BaseFileIconProps) => (\n <StandardFileTypeIcon\n {...props}\n className={className}\n color='#3375E2'\n fileTypeClassName='str-chat__file-icon--doc'\n label={label}\n symbols={TEXT_SYMBOLS}\n />\n);\n\nexport const FilePowerPointIcon = ({ className, label, ...props }: BaseFileIconProps) => (\n <StandardFileTypeIcon\n {...props}\n className={className}\n color='#D14423'\n fileTypeClassName='str-chat__file-icon--ppt'\n label={label}\n symbols={PRESENTATION_SYMBOLS}\n />\n);\n\nexport const FileExcelIcon = ({ className = '', label, ...props }: BaseFileIconProps) => (\n <StandardFileTypeIcon\n {...props}\n className={className}\n color='#0C864B'\n fileTypeClassName='str-chat__file-icon--xls'\n label={label}\n symbols={SPREADSHEET_SYMBOLS}\n />\n);\n\nexport const FileArchiveIcon = ({\n className = '',\n label = '',\n ...props\n}: BaseFileIconProps) => (\n <StandardFileTypeIcon\n {...props}\n className={className}\n color='#E59E34'\n fileTypeClassName='str-chat__file-icon--compressed'\n label={label}\n symbols={COMPRESSION_SYMBOLS}\n />\n);\n\nexport const FileCodeIcon = ({ className = '', label, ...props }: BaseFileIconProps) => (\n <StandardFileTypeIcon\n {...props}\n className={className}\n color='#00ACA1'\n fileTypeClassName='str-chat__file-icon--code'\n label={label}\n symbols={CODE_SYMBOLS}\n />\n);\n\nexport const FileAudioIcon = ({ className = '', label, ...props }: BaseFileIconProps) => (\n <StandardFileTypeIcon\n {...props}\n className={className}\n color='#2727B0'\n fileTypeClassName='str-chat__file-icon--audio'\n label={label}\n symbols={AUDIO_SYMBOLS}\n />\n);\n\nexport const FileVideoIcon = ({ className = '', label, ...props }: BaseFileIconProps) => (\n <StandardFileTypeIcon\n {...props}\n className={className}\n color='#A847B7'\n fileTypeClassName='str-chat__file-icon--video'\n label={label}\n symbols={VIDEO_SYMBOLS}\n />\n);\n\nexport const FileFallbackIcon = ({\n className = '',\n label = '',\n ...props\n}: BaseFileIconProps) => (\n <StandardFileTypeIcon\n {...props}\n className={className}\n color='#888888'\n fileTypeClassName='str-chat__file-icon--other'\n label={label}\n symbols={OTHER_SYMBOLS}\n />\n);\n","export type GeneralType = 'audio/' | 'video/' | 'image/' | 'text/';\n\nexport type SupportedMimeType =\n | (typeof wordMimeTypes)[number]\n | (typeof excelMimeTypes)[number]\n | (typeof powerpointMimeTypes)[number]\n | (typeof archiveFileTypes)[number]\n | (typeof codeFileTypes)[number];\n\nexport const wordMimeTypes = [\n // Microsoft Word\n // .doc .dot\n 'application/msword',\n // .doc .dot\n 'application/msword-template',\n // .docx\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n // .dotx (no test)\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',\n // .docm\n 'application/vnd.ms-word.document.macroEnabled.12',\n // .dotm (no test)\n 'application/vnd.ms-word.template.macroEnabled.12',\n\n // LibreOffice/OpenOffice Writer\n // .odt\n 'application/vnd.oasis.opendocument.text',\n // .ott\n 'application/vnd.oasis.opendocument.text-template',\n // .fodt\n 'application/vnd.oasis.opendocument.text-flat-xml',\n // .uot\n // NOTE: firefox doesn't know mimetype so maybe ignore\n];\n\nexport const excelMimeTypes = [\n // .csv\n 'text/csv',\n // TODO: maybe more data files\n\n // Microsoft Excel\n // .xls .xlt .xla (no test for .xla)\n 'application/vnd.ms-excel',\n // .xlsx\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n // .xltx (no test)\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.template',\n // .xlsm\n 'application/vnd.ms-excel.sheet.macroEnabled.12',\n // .xltm (no test)\n 'application/vnd.ms-excel.template.macroEnabled.12',\n // .xlam (no test)\n 'application/vnd.ms-excel.addin.macroEnabled.12',\n // .xlsb (no test)\n 'application/vnd.ms-excel.addin.macroEnabled.12',\n\n // LibreOffice/OpenOffice Calc\n // .ods\n 'application/vnd.oasis.opendocument.spreadsheet',\n // .ots\n 'application/vnd.oasis.opendocument.spreadsheet-template',\n // .fods\n 'application/vnd.oasis.opendocument.spreadsheet-flat-xml',\n // .uos\n // NOTE: firefox doesn't know mimetype so maybe ignore\n];\n\nexport const powerpointMimeTypes = [\n // Microsoft Word\n // .ppt .pot .pps .ppa (no test for .ppa)\n 'application/vnd.ms-powerpoint',\n // .pptx\n 'application/vnd.openxmlformats-officedocument.presentationml.presentation',\n // .potx (no test)\n 'application/vnd.openxmlformats-officedocument.presentationml.template',\n // .ppsx\n 'application/vnd.openxmlformats-officedocument.presentationml.slideshow',\n // .ppam\n 'application/vnd.ms-powerpoint.addin.macroEnabled.12',\n // .pptm\n 'application/vnd.ms-powerpoint.presentation.macroEnabled.12',\n // .potm\n 'application/vnd.ms-powerpoint.template.macroEnabled.12',\n // .ppsm\n 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12',\n\n // LibreOffice/OpenOffice Writer\n // .odp\n 'application/vnd.oasis.opendocument.presentation',\n // .otp\n 'application/vnd.oasis.opendocument.presentation-template',\n // .fodp\n 'application/vnd.oasis.opendocument.presentation-flat-xml',\n // .uop\n // NOTE: firefox doesn't know mimetype so maybe ignore\n];\n\nexport const archiveFileTypes = [\n // .zip\n 'application/zip',\n // .z7\n 'application/x-7z-compressed',\n // .ar\n 'application/x-archive',\n // .tar\n 'application/x-tar',\n // .tar.gz\n 'application/gzip',\n // .tar.Z\n 'application/x-compress',\n // .tar.bz2\n 'application/x-bzip',\n // .tar.lz\n 'application/x-lzip',\n // .tar.lz4\n 'application/x-lz4',\n // .tar.lzma\n 'application/x-lzma',\n // .tar.lzo (no test)\n 'application/x-lzop',\n // .tar.xz\n 'application/x-xz',\n // .war\n 'application/x-webarchive',\n // .rar\n 'application/vnd.rar',\n];\n\nexport const codeFileTypes = [\n // .html .htm\n 'text/html',\n // .css\n 'text/css',\n // .js\n 'application/x-javascript',\n 'text/javascript',\n // .json\n 'application/json',\n // .py\n 'text/x-python',\n // .go\n 'text/x-go',\n // .c\n 'text/x-csrc',\n // .cpp\n 'text/x-c++src',\n // .rb\n 'application/x-ruby',\n // .rust\n 'text/rust',\n // .java\n 'text/x-java',\n // .php\n 'application/x-php',\n // .cs\n 'text/x-csharp',\n // .scala\n 'text/x-scala',\n // .erl\n 'text/x-erlang',\n // .sh\n 'application/x-shellscript',\n];\n\nexport const mimeTypeToExtensionMap: Record<string, string> = {\n // Application types (sorted alphabetically)\n 'application/epub+zip': 'epub',\n 'application/gzip': 'gz',\n 'application/java-archive': 'jar',\n 'application/json': 'json',\n 'application/ld+json': 'jsonld',\n 'application/msword': 'doc',\n 'application/msword-template': 'dot',\n 'application/octet-stream': 'bin',\n 'application/ogg': 'ogx',\n 'application/pdf': 'pdf',\n 'application/postscript': 'ps',\n 'application/rtf': 'rtf',\n 'application/vnd.amazon.ebook': 'azw',\n 'application/vnd.apple.installer+xml': 'mpkg',\n 'application/vnd.mozilla.xul+xml': 'xul',\n 'application/vnd.ms-excel': 'xls',\n 'application/vnd.ms-excel.addin.macroEnabled.12': 'xlam',\n 'application/vnd.ms-excel.sheet.macroEnabled.12': 'xlsm',\n 'application/vnd.ms-excel.template.macroEnabled.12': 'xltm',\n 'application/vnd.ms-fontobject': 'eot',\n 'application/vnd.ms-powerpoint': 'ppt',\n 'application/vnd.ms-powerpoint.addin.macroEnabled.12': 'ppam',\n 'application/vnd.ms-powerpoint.presentation.macroEnabled.12': 'pptm',\n 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12': 'ppsm',\n 'application/vnd.ms-powerpoint.template.macroEnabled.12': 'potm',\n 'application/vnd.ms-word.document.macroEnabled.12': 'docm',\n 'application/vnd.ms-word.template.macroEnabled.12': 'dotm',\n 'application/vnd.oasis.opendocument.presentation': 'odp',\n 'application/vnd.oasis.opendocument.presentation-flat-xml': 'fodp',\n 'application/vnd.oasis.opendocument.presentation-template': 'otp',\n 'application/vnd.oasis.opendocument.spreadsheet': 'ods',\n 'application/vnd.oasis.opendocument.spreadsheet-flat-xml': 'fods',\n 'application/vnd.oasis.opendocument.spreadsheet-template': 'ots',\n 'application/vnd.oasis.opendocument.text': 'odt',\n 'application/vnd.oasis.opendocument.text-flat-xml': 'fodt',\n 'application/vnd.oasis.opendocument.text-template': 'ott',\n 'application/vnd.openxmlformats-officedocument.presentationml.presentation': 'pptx',\n 'application/vnd.openxmlformats-officedocument.presentationml.slideshow': 'ppsx',\n 'application/vnd.openxmlformats-officedocument.presentationml.template': 'potx',\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': 'xlsx',\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.template': 'xltx',\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.document': 'docx',\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.template': 'dotx',\n 'application/vnd.rar': 'rar',\n 'application/vnd.visio': 'vsd',\n 'application/wasm': 'wasm',\n 'application/x-7z-compressed': '7z',\n 'application/x-abiword': 'abw',\n 'application/x-archive': 'ar',\n 'application/x-bzip': 'bz',\n 'application/x-bzip2': 'bz2',\n 'application/x-cdf': 'cda',\n 'application/x-compress': 'Z',\n 'application/x-csh': 'csh',\n 'application/x-dosexec': 'exe',\n 'application/x-freearc': 'arc',\n 'application/x-httpd-php': 'php',\n 'application/x-iso9660-image': 'iso',\n 'application/x-javascript': 'js',\n 'application/x-lz4': 'lz4',\n 'application/x-lzip': 'lz',\n 'application/x-lzma': 'lzma',\n 'application/x-lzop': 'lzo',\n 'application/x-mobipocket-ebook': 'mobi',\n 'application/x-msdownload': 'exe',\n 'application/x-perl': 'pl',\n 'application/x-php': 'php',\n 'application/x-rar-compressed': 'rar',\n 'application/x-ruby': 'rb',\n 'application/x-sh': 'sh',\n 'application/x-shellscript': 'sh',\n 'application/x-shockwave-flash': 'swf',\n 'application/x-sql': 'sql',\n 'application/x-stuffit': 'sit',\n 'application/x-tar': 'tar',\n 'application/x-webarchive': 'war',\n 'application/x-xz': 'xz',\n 'application/x-yaml': 'yaml',\n 'application/xhtml+xml': 'xhtml',\n 'application/xml': 'xml',\n 'application/zip': 'zip',\n\n // Audio types\n 'audio/aac': 'aac',\n 'audio/flac': 'flac',\n 'audio/midi': 'midi',\n 'audio/mp4': 'm4a',\n 'audio/mpeg': 'mp3',\n 'audio/ogg': 'oga',\n 'audio/opus': 'opus',\n 'audio/wav': 'wav',\n 'audio/webm': 'weba',\n 'audio/x-aiff': 'aiff',\n 'audio/x-m4a': 'm4a',\n 'audio/x-midi': 'midi',\n 'audio/x-ms-wma': 'wma',\n 'audio/x-wav': 'wav',\n\n // Font types\n 'font/otf': 'otf',\n 'font/ttf': 'ttf',\n 'font/woff': 'woff',\n 'font/woff2': 'woff2',\n\n // Image types\n 'image/apng': 'apng',\n 'image/avif': 'avif',\n 'image/bmp': 'bmp',\n 'image/gif': 'gif',\n 'image/heic': 'heic',\n 'image/heif': 'heif',\n 'image/jpeg': 'jpg',\n 'image/png': 'png',\n 'image/svg+xml': 'svg',\n 'image/tiff': 'tiff',\n 'image/vnd.microsoft.icon': 'ico',\n 'image/webp': 'webp',\n 'image/x-icon': 'ico',\n\n // Text types\n 'text/calendar': 'ics',\n 'text/css': 'css',\n 'text/csv': 'csv',\n 'text/html': 'html',\n 'text/javascript': 'js',\n 'text/markdown': 'md',\n 'text/plain': 'txt',\n 'text/rtf': 'rtf',\n 'text/rust': 'rs',\n 'text/tab-separated-values': 'tsv',\n 'text/vcard': 'vcf',\n 'text/x-c': 'c',\n 'text/x-c++src': 'cpp',\n 'text/x-csharp': 'cs',\n 'text/x-csrc': 'c',\n 'text/x-diff': 'diff',\n 'text/x-erlang': 'erl',\n 'text/x-go': 'go',\n 'text/x-java': 'java',\n 'text/x-java-source': 'java',\n 'text/x-kotlin': 'kt',\n 'text/x-lua': 'lua',\n 'text/x-markdown': 'md',\n 'text/x-objectivec': 'm',\n 'text/x-pascal': 'pas',\n 'text/x-perl': 'pl',\n 'text/x-python': 'py',\n 'text/x-ruby': 'rb',\n 'text/x-rust': 'rs',\n 'text/x-scala': 'scala',\n 'text/x-sh': 'sh',\n 'text/x-shellscript': 'sh',\n 'text/x-sql': 'sql',\n 'text/x-swift': 'swift',\n 'text/x-typescript': 'ts',\n 'text/x-yaml': 'yaml',\n 'text/xml': 'xml',\n 'text/yaml': 'yaml',\n\n // Video types\n 'video/3gpp': '3gp',\n 'video/3gpp2': '3g2',\n 'video/mp2t': 'ts',\n 'video/mp4': 'mp4',\n 'video/mpeg': 'mpeg',\n 'video/ogg': 'ogv',\n 'video/quicktime': 'mov',\n 'video/webm': 'webm',\n 'video/x-flv': 'flv',\n 'video/x-m4v': 'm4v',\n 'video/x-matroska': 'mkv',\n 'video/x-ms-wmv': 'wmv',\n 'video/x-msvideo': 'avi',\n};\n","import * as fileIconSet from './FileIconSet';\nimport type { GeneralType, SupportedMimeType } from './mimeTypes';\nimport {\n archiveFileTypes,\n codeFileTypes,\n excelMimeTypes,\n powerpointMimeTypes,\n wordMimeTypes,\n} from './mimeTypes';\nimport type { ComponentType } from 'react';\nimport type { BaseFileIconProps } from './FileIconSet';\n\ntype MimeTypeMappedComponent =\n | 'FilePdfIcon'\n | 'FileWordIcon'\n | 'FileExcelIcon'\n | 'FilePowerPointIcon'\n | 'FileArchiveIcon'\n | 'FileCodeIcon';\n\ntype GeneralContentTypeComponent = 'FileAudioIcon' | 'FileVideoIcon' | 'FileAltIcon';\n\ntype IconComponents<Props> = {\n FileAltIcon: ComponentType<Props>;\n FileArchiveIcon: ComponentType<Props>;\n FileAudioIcon: ComponentType<Props>;\n FileCodeIcon: ComponentType<Props>;\n FileExcelIcon: ComponentType<Props>;\n FileFallbackIcon: ComponentType<Props>;\n FilePdfIcon: ComponentType<Props>;\n FilePowerPointIcon: ComponentType<Props>;\n FileVideoIcon: ComponentType<Props>;\n FileWordIcon: ComponentType<Props>;\n};\n\ntype MimeTypeToIconMap<Props> = {\n [key: string]: ComponentType<Props>;\n};\n\nfunction generateMimeTypeToIconMap<Props>({\n FileArchiveIcon,\n FileCodeIcon,\n FileExcelIcon,\n FilePdfIcon,\n FilePowerPointIcon,\n FileWordIcon,\n}: Pick<IconComponents<Props>, MimeTypeMappedComponent>) {\n const mimeTypeToIconMap: MimeTypeToIconMap<Props> = {\n 'application/pdf': FilePdfIcon,\n };\n\n for (const type of wordMimeTypes) {\n mimeTypeToIconMap[type] = FileWordIcon;\n }\n\n for (const type of excelMimeTypes) {\n mimeTypeToIconMap[type] = FileExcelIcon;\n }\n\n for (const type of powerpointMimeTypes) {\n mimeTypeToIconMap[type] = FilePowerPointIcon;\n }\n\n for (const type of archiveFileTypes) {\n mimeTypeToIconMap[type] = FileArchiveIcon;\n }\n\n for (const type of codeFileTypes) {\n mimeTypeToIconMap[type] = FileCodeIcon;\n }\n return mimeTypeToIconMap;\n}\n\nfunction generateGeneralTypeToIconMap<Props>({\n FileAltIcon,\n FileAudioIcon,\n FileFallbackIcon,\n FileVideoIcon,\n}: Pick<IconComponents<Props>, GeneralContentTypeComponent | 'FileFallbackIcon'>) {\n return {\n 'audio/': FileAudioIcon,\n 'image/': FileFallbackIcon,\n 'text/': FileAltIcon,\n 'video/': FileVideoIcon,\n };\n}\n\ntype IconMap = {\n standard: Record<\n SupportedMimeType | GeneralType | 'fallback',\n ComponentType<BaseFileIconProps>\n >;\n};\n\nexport const iconMap: IconMap = {\n standard: {\n ...generateMimeTypeToIconMap<BaseFileIconProps>({\n FileArchiveIcon: fileIconSet.FileArchiveIcon,\n FileCodeIcon: fileIconSet.FileCodeIcon,\n FileExcelIcon: fileIconSet.FileExcelIcon,\n FilePdfIcon: fileIconSet.FilePdfIcon,\n FilePowerPointIcon: fileIconSet.FilePowerPointIcon,\n FileWordIcon: fileIconSet.FileWordIcon,\n }),\n ...generateGeneralTypeToIconMap<BaseFileIconProps>({\n FileAltIcon: fileIconSet.FileFallbackIcon,\n FileAudioIcon: fileIconSet.FileAudioIcon,\n FileFallbackIcon: fileIconSet.FileFallbackIcon,\n FileVideoIcon: fileIconSet.FileVideoIcon,\n }),\n fallback: fileIconSet.FileFallbackIcon,\n },\n};\n","import React, { useMemo } from 'react';\nimport { iconMap } from './iconMap';\nimport { mergeFileIconSizeConfig } from './FileIconSet';\nimport { mimeTypeToExtensionMap } from './mimeTypes';\nimport type { FileIconSize } from './FileIconSet';\n\nexport type FileIconSizeConfigOverride = Partial<\n Record<\n FileIconSize,\n Partial<{ width: number; height: number; labelX: number; labelY: number }>\n >\n>;\n\nexport type FileIconProps = {\n className?: string;\n fileName?: string;\n mimeType?: string;\n /** Override dimensions/label position per size (sm, md, lg, xl). */\n sizeConfig?: FileIconSizeConfigOverride;\n size?: FileIconSize;\n};\n\nexport function mimeTypeToIcon(mimeType?: string) {\n const theMap = iconMap['standard'];\n\n if (!mimeType) return theMap.fallback;\n\n const icon = theMap[mimeType];\n if (icon) return icon;\n\n if (mimeType.startsWith('audio/')) return theMap['audio/'] ?? theMap.fallback;\n if (mimeType.startsWith('video/')) return theMap['video/'] ?? theMap.fallback;\n if (mimeType.startsWith('image/')) return theMap['image/'] ?? theMap.fallback;\n if (mimeType.startsWith('text/')) return theMap['text/'] ?? theMap.fallback;\n\n return theMap.fallback;\n}\n\nconst labelFromMimeType = ({\n fileName,\n mimeType,\n}: Pick<FileIconProps, 'fileName' | 'mimeType'>) => {\n let label;\n\n if (mimeType) {\n label = mimeTypeToExtensionMap[mimeType];\n }\n\n if (!label && fileName) {\n label = fileName.split('.').slice(-1)[0];\n }\n return label;\n};\n\nexport const FileIcon = (props: FileIconProps) => {\n const {\n className,\n fileName,\n mimeType,\n size = 'md',\n sizeConfig: sizeConfigOverride,\n ...rest\n } = props;\n const sizeConfig = useMemo(\n () => mergeFileIconSizeConfig(sizeConfigOverride),\n [sizeConfigOverride],\n );\n const Icon = mimeTypeToIcon(mimeType);\n const label = fileName ? labelFromMimeType({ fileName, mimeType }) : undefined;\n return (\n <Icon\n {...rest}\n className={className}\n label={label}\n size={size}\n sizeConfig={sizeConfig}\n />\n );\n};\n","export const formatTime = (\n totalSeconds?: number,\n rounding: 'ceil' | 'floor' = 'ceil',\n) => {\n if (totalSeconds == null || Number.isNaN(totalSeconds) || totalSeconds < 0) {\n return null;\n }\n\n const roundedSeconds =\n rounding === 'floor' ? Math.floor(totalSeconds) : Math.ceil(totalSeconds);\n const hours = Math.floor(roundedSeconds / 3600);\n const minutes = Math.floor((roundedSeconds % 3600) / 60);\n const seconds = roundedSeconds % 60;\n const minSec = `${String(minutes).padStart(2, '0')}:${String(seconds).padStart(\n 2,\n '0',\n )}`;\n\n return hours ? `${String(hours).padStart(2, '0')}:${minSec}` : minSec;\n};\n","import React from 'react';\nimport clsx from 'clsx';\nimport { useTranslationContext } from '../../context/TranslationContext';\nimport { useComponentContextIcons } from '../../context';\n\nexport type ImagePlaceholderProps = {\n className?: string;\n};\n\nexport const ImagePlaceholder = ({ className }: ImagePlaceholderProps) => {\n const { IconImage } = useComponentContextIcons();\n\n const { t } = useTranslationContext();\n return (\n <div\n aria-label={t('aria/Image failed to load')}\n className={clsx('str-chat__image-placeholder', className)}\n data-testid='str-chat__base-image-placeholder'\n role='img'\n >\n <IconImage />\n </div>\n );\n};\n","import React, { forwardRef, useEffect, useMemo, useState } from 'react';\nimport clsx from 'clsx';\nimport { useComponentContext } from '../../context/ComponentContext';\nimport { DownloadButton } from '../Attachment';\nimport { ImagePlaceholder as DefaultImagePlaceholder } from './ImagePlaceholder';\nimport { sanitizeUrl } from '@braintree/sanitize-url';\n\nexport type BaseImageProps = React.ComponentPropsWithRef<'img'> & {\n showDownloadButtonOnError?: boolean;\n};\n\nexport const BaseImage = forwardRef<HTMLImageElement, BaseImageProps>(function BaseImage(\n { src, ...props },\n ref,\n) {\n const {\n alt: propsAlt,\n className: propsClassName,\n onError: propsOnError,\n showDownloadButtonOnError = false,\n ...imgProps\n } = props;\n // Store the failed URL rather than a boolean so that when src changes (e.g. retry\n // with a cache-busting param), the error state clears synchronously via the derived\n // `error` check below. A boolean would require a useEffect to reset, causing a\n // 1-frame flash of the error placeholder before the loading state kicks in.\n const [failedSrc, setFailedSrc] = useState<string | null>(null);\n const { ImagePlaceholder: ImagePlaceholderComponent = DefaultImagePlaceholder } =\n useComponentContext();\n\n const sanitizedUrl = useMemo(() => sanitizeUrl(src), [src]);\n const error = failedSrc === sanitizedUrl;\n\n useEffect(\n () => () => {\n setFailedSrc(null);\n },\n [sanitizedUrl],\n );\n\n if (error) {\n return (\n <>\n <ImagePlaceholderComponent\n className={clsx(propsClassName, 'str-chat__base-image--load-failed')}\n />\n {showDownloadButtonOnError && <DownloadButton assetUrl={sanitizedUrl} />}\n </>\n );\n }\n\n return (\n <img\n data-testid='str-chat__base-image'\n {...imgProps}\n alt={propsAlt ?? ''}\n className={clsx(propsClassName, 'str-chat__base-image')}\n onError={(e) => {\n setFailedSrc(sanitizedUrl);\n propsOnError?.(e);\n }}\n ref={ref}\n src={sanitizedUrl}\n />\n );\n});\n","import {\n type Attachment,\n isGiphyAttachment,\n isImageAttachment,\n isLocalImageAttachment,\n isLocalVideoAttachment,\n isScrapedContent,\n isVideoAttachment,\n type LinkPreview,\n type LocalImageAttachment,\n type LocalVideoAttachment,\n} from 'stream-chat';\nimport type { Dimensions } from '../../types/types';\n\ntype AttachmentPreviewableInGallery =\n | LocalImageAttachment\n | LocalVideoAttachment\n | LinkPreview\n | Attachment;\n\n/** Fields shared with gallery items for image/video preview from an attachment. */\nexport type BaseImageDescriptor = {\n alt?: string;\n dimensions?: Dimensions;\n imageUrl?: string;\n title?: string;\n videoThumbnailUrl?: string;\n videoUrl?: string;\n};\n\n/**\n * Maps an attachment (or link preview) to image/video URLs and metadata for {@link BaseImage} or the gallery.\n */\nexport const toBaseImageDescriptors = (\n attachment: AttachmentPreviewableInGallery,\n options: { giphyVersionName?: string } = {},\n): BaseImageDescriptor | undefined => {\n if (isGiphyAttachment(attachment)) {\n const giphyVersion =\n options?.giphyVersionName && attachment.giphy\n ? attachment.giphy[\n options.giphyVersionName as keyof NonNullable<Attachment['giphy']>\n ]\n : undefined;\n\n return {\n alt: giphyVersion?.url || attachment.thumb_url,\n dimensions: giphyVersion\n ? {\n height: giphyVersion.height,\n width: giphyVersion.width,\n }\n : undefined,\n imageUrl: attachment.thumb_url,\n title: attachment.title || attachment.thumb_url,\n };\n }\n\n if (isScrapedContent(attachment)) {\n const imageUrl = attachment.image_url || attachment.thumb_url;\n return {\n alt: attachment.title || imageUrl,\n imageUrl,\n title: attachment.title,\n };\n }\n\n if (isLocalVideoAttachment(attachment)) {\n return {\n title: attachment.title,\n videoThumbnailUrl: attachment.thumb_url ?? attachment.localMetadata.previewUri,\n videoUrl: attachment.asset_url ?? attachment.localMetadata.previewUri,\n };\n }\n\n if (isVideoAttachment(attachment)) {\n return {\n title: attachment.title,\n videoThumbnailUrl: attachment.thumb_url,\n videoUrl: attachment.asset_url,\n };\n }\n\n if (isLocalImageAttachment(attachment)) {\n const imageUrl = attachment.image_url || attachment.localMetadata.previewUri;\n return {\n alt: attachment.title || imageUrl,\n imageUrl,\n title: attachment.title,\n };\n }\n\n if (isImageAttachment(attachment)) {\n const imageUrl = attachment.image_url;\n return {\n alt: attachment.title || imageUrl,\n imageUrl,\n title: attachment.title,\n };\n }\n\n return undefined;\n};\n","import { createContext, useContext } from 'react';\n\nimport { toBaseImageDescriptors } from '../BaseImage';\nimport type { BaseImageProps } from '../BaseImage';\nimport type { Dimensions } from '../../types/types';\n\nexport type GalleryItem = Omit<BaseImageProps, 'src'> & {\n dimensions?: Dimensions;\n imageUrl?: string;\n videoThumbnailUrl?: string;\n videoUrl?: string;\n};\n\n/**\n * Maps an attachment (or link preview) to gallery item fields.\n * Delegates to {@link toBaseImageDescriptors}.\n */\nexport const toGalleryItemDescriptors = (\n ...args: Parameters<typeof toBaseImageDescriptors>\n):\n | Pick<\n GalleryItem,\n 'alt' | 'dimensions' | 'imageUrl' | 'title' | 'videoThumbnailUrl' | 'videoUrl'\n >\n | undefined => toBaseImageDescriptors(...args);\n\nexport type GalleryContextValue = {\n /** Whether clicking the empty gallery background should request close */\n closeOnBackgroundClick: boolean;\n /** Currently displayed item index */\n currentIndex: number;\n /** Currently displayed item */\n currentItem: GalleryItem;\n /** Navigate to a specific index */\n goToIndex: (index: number) => void;\n /** Navigate to the next item */\n goToNext: () => void;\n /** Navigate to the previous item */\n goToPrevious: () => void;\n /** Whether there is a next item */\n hasNext: boolean;\n /** Whether there is a previous item */\n hasPrevious: boolean;\n /** Total number of items */\n itemCount: number;\n /** All items in the gallery */\n items: GalleryItem[];\n /** Request closing the gallery viewer */\n onRequestClose?: () => void;\n};\n\nexport const GalleryContext = createContext<GalleryContextValue | undefined>(undefined);\n\nexport const useGalleryContext = () => {\n const contextValue = useContext(GalleryContext);\n\n if (!contextValue) {\n console.warn(\n `The useGalleryContext hook was called outside of the GalleryContext provider. Make sure this hook is called within a child of the Gallery component.`,\n );\n\n return {} as GalleryContextValue;\n }\n\n return contextValue;\n};\n","import React, { useContext, useMemo } from 'react';\nimport { sanitizeUrl } from '@braintree/sanitize-url';\n\nimport { type GalleryItem } from './GalleryContext';\nimport { Button } from '../Button';\nimport { MessageTimestamp as DefaultMessageTimestamp } from '../Message/MessageTimestamp';\nimport {\n ModalContext,\n useComponentContext,\n useComponentContextIcons,\n useMessageContext,\n useTranslationContext,\n} from '../../context';\n\ntype GalleryHeaderProps = {\n currentItem: GalleryItem;\n};\n\nexport const GalleryHeader = ({ currentItem }: GalleryHeaderProps) => {\n const { IconArrowDownCircle, IconXmark } = useComponentContextIcons();\n\n const { t } = useTranslationContext();\n const { MessageTimestamp = DefaultMessageTimestamp } = useComponentContext('GalleryUI');\n const { isMyMessage, message } = useMessageContext('GalleryUI');\n const modalContext = useContext(ModalContext);\n\n const headerTitle =\n (isMyMessage?.() && t('You')) ||\n message?.user?.name ||\n message?.user?.id ||\n currentItem.title ||\n t('User uploaded content');\n const downloadUrl = useMemo(() => {\n const rawDownloadUrl = currentItem.videoUrl ?? currentItem.imageUrl;\n\n if (!rawDownloadUrl) return undefined;\n\n const sanitizedUrl = sanitizeUrl(rawDownloadUrl);\n\n return sanitizedUrl === 'about:blank' ? undefined : sanitizedUrl;\n }, [currentItem.imageUrl, currentItem.videoUrl]);\n const downloadLabel = t('aria/Download attachment');\n\n return (\n <div className='str-chat__gallery__header'>\n <div aria-hidden='true' className='str-chat__gallery__header-spacer' />\n <div className='str-chat__gallery__header-meta'>\n <div className='str-chat__gallery__title'>{headerTitle}</div>\n {message?.created_at ? (\n <MessageTimestamp customClass='str-chat__gallery__timestamp' />\n ) : null}\n </div>\n <div className='str-chat__gallery__header-actions'>\n {downloadUrl ? (\n <a\n aria-label={downloadLabel}\n className='str-chat__gallery__action-button str-chat__gallery__action-button--download'\n download\n href={downloadUrl}\n rel='noreferrer'\n target='_blank'\n title={downloadLabel}\n >\n <IconArrowDownCircle />\n </a>\n ) : null}\n {modalContext?.close ? (\n <Button\n aria-label={t('Close')}\n className='str-chat__gallery__action-button str-chat__gallery__action-button--close'\n onClick={modalContext.close}\n title={t('Close')}\n >\n <IconXmark />\n </Button>\n ) : null}\n </div>\n </div>\n );\n};\n","import React from 'react';\n\nimport { useComponentContext } from '../../context';\nimport { LoadingIndicator as DefaultLoadingIndicator } from '../Loading/LoadingIndicator';\n\n// `react-player` (~2 MB) is loaded lazily so it stays out of the SDK's eager\n// import graph; the consumer's bundler emits it as a separate chunk that is\n// fetched only when a default video player renders. Consumers who override\n// `VideoPlayer` via `ComponentContext` never load it at all.\nconst ReactPlayer = React.lazy(() => import('./ReactPlayerWrapper'));\n\nexport type VideoPlayerProps = {\n /**\n * Whether the native playback controls are rendered. Set to `false` for a video that cannot\n * be played yet — e.g. one whose upload is still in flight.\n * @default true\n */\n controls?: boolean;\n isPlaying?: boolean;\n videoUrl?: string;\n thumbnailUrl?: string;\n};\n\nexport const VideoPlayer = ({\n controls = true,\n isPlaying,\n thumbnailUrl,\n videoUrl,\n}: VideoPlayerProps) => {\n const { LoadingIndicator = DefaultLoadingIndicator, VideoPlayer: VideoPlayerContext } =\n useComponentContext();\n\n return VideoPlayerContext ? (\n <VideoPlayerContext\n controls={controls}\n isPlaying={isPlaying}\n thumbnailUrl={thumbnailUrl}\n videoUrl={videoUrl}\n />\n ) : (\n <React.Suspense\n fallback={\n <div className='str-chat__video-player-loading'>\n <LoadingIndicator />\n </div>\n }\n >\n <ReactPlayer\n controls={controls}\n isPlaying={isPlaying}\n thumbnailUrl={thumbnailUrl}\n videoUrl={videoUrl}\n />\n </React.Suspense>\n );\n};\n","import { BaseImage, type BaseImageProps } from '../BaseImage';\nimport { Button } from '../Button';\nimport clsx from 'clsx';\nimport React from 'react';\nimport { useComponentContextIcons, useTranslationContext } from '../../context';\n\nexport type VideoThumbnailProps = BaseImageProps & {\n onPlay?: () => void;\n};\n\nexport const VideoThumbnail = ({\n className,\n onPlay,\n ...imageProps\n}: VideoThumbnailProps) => {\n const { IconPlayFill } = useComponentContextIcons();\n\n const { t } = useTranslationContext();\n\n return (\n <div className='str-chat__message-attachment__video-thumbnail'>\n <BaseImage\n className={clsx('str-chat__message-attachment__video-thumbnail-image', className)}\n {...imageProps}\n />\n {onPlay ? (\n <Button\n appearance='solid'\n aria-label={t('Play video')}\n circular\n className={clsx(\n 'str-chat__message-attachment__video-thumbnail__play-indicator',\n )}\n onClick={onPlay}\n size='lg'\n variant='secondary'\n >\n <IconPlayFill />\n </Button>\n ) : (\n <div className='str-chat__message-attachment__video-thumbnail__play-indicator'>\n <IconPlayFill />\n </div>\n )}\n </div>\n );\n};\n","import React, { useCallback, useContext, useEffect, useRef, useState } from 'react';\n\nimport { BaseImage } from '../BaseImage';\nimport { GalleryHeader } from './GalleryHeader';\nimport { useGalleryContext } from './GalleryContext';\nimport { Button, type ButtonProps } from '../Button';\nimport {\n ModalContext,\n useComponentContextIcons,\n useTranslationContext,\n} from '../../context';\nimport { VideoPlayer } from '../VideoPlayer';\nimport { VideoThumbnail } from '../VideoPlayer/VideoThumbnail';\n\nimport clsx from 'clsx';\n\nconst SWIPE_THRESHOLD = 50;\nconst TRANSITION_DURATION = 300;\n\nexport const GalleryUI = () => {\n const { IconChevronLeft, IconChevronRight } = useComponentContextIcons();\n\n const { t } = useTranslationContext();\n const {\n closeOnBackgroundClick,\n currentIndex,\n currentItem,\n goToNext,\n goToPrevious,\n hasNext,\n hasPrevious,\n itemCount,\n onRequestClose,\n } = useGalleryContext();\n const modalContext = useContext(ModalContext);\n\n const [showVideo, setShowVideo] = useState(false);\n\n // Slide transition state\n const isTransitioningRef = useRef(false);\n const [slideOffset, setSlideOffset] = useState(0);\n const [isDragging, setIsDragging] = useState(false);\n const [slideDirection, setSlideDirection] = useState<'forward' | 'backward' | null>(\n null,\n );\n\n // Touch tracking refs\n // Some touch interactions on the slide container are followed by a click; suppress\n // that one-shot click so swipe navigation doesn't immediately trigger background close.\n const ignoreNextClickRef = useRef(false);\n const touchStartRef = useRef<{ x: number; y: number } | null>(null);\n const isVerticalSwipeRef = useRef(false);\n const containerRef = useRef<HTMLDivElement>(null);\n\n // Reset video play state when navigating to a new item\n useEffect(() => {\n setShowVideo(false);\n }, [currentIndex]);\n\n // Slide animation on index change\n const prevIndexRef = useRef(currentIndex);\n useEffect(() => {\n if (prevIndexRef.current === currentIndex) return;\n const direction = currentIndex > prevIndexRef.current ? 'forward' : 'backward';\n setSlideDirection(direction);\n setSlideOffset(0);\n setIsDragging(false);\n isTransitioningRef.current = true;\n\n const timer = setTimeout(() => {\n setSlideDirection(null);\n isTransitioningRef.current = false;\n }, TRANSITION_DURATION);\n\n prevIndexRef.current = currentIndex;\n return () => clearTimeout(timer);\n }, [currentIndex]);\n\n // Wrapped navigation functions that respect transition lock\n const handleGoToNext = useCallback(() => {\n if (isTransitioningRef.current) return;\n goToNext();\n }, [goToNext]);\n\n const handleGoToPrevious = useCallback(() => {\n if (isTransitioningRef.current) return;\n goToPrevious();\n }, [goToPrevious]);\n\n // Keyboard navigation\n const handleKeyDown = useCallback(\n (event: KeyboardEvent) => {\n if (event.key === 'ArrowLeft') {\n event.preventDefault();\n handleGoToPrevious();\n } else if (event.key === 'ArrowRight') {\n event.preventDefault();\n handleGoToNext();\n }\n },\n [handleGoToNext, handleGoToPrevious],\n );\n\n useEffect(() => {\n document.addEventListener('keydown', handleKeyDown);\n return () => document.removeEventListener('keydown', handleKeyDown);\n }, [handleKeyDown]);\n\n // Touch event handlers\n const handleTouchStart = useCallback((event: React.TouchEvent) => {\n if (isTransitioningRef.current) return;\n const touch = event.touches[0];\n ignoreNextClickRef.current = false;\n touchStartRef.current = { x: touch.clientX, y: touch.clientY };\n isVerticalSwipeRef.current = false;\n }, []);\n\n const handleTouchMove = useCallback(\n (event: React.TouchEvent) => {\n if (!touchStartRef.current || isTransitioningRef.current) return;\n\n const touch = event.touches[0];\n const deltaX = touch.clientX - touchStartRef.current.x;\n const deltaY = touch.clientY - touchStartRef.current.y;\n\n // Determine swipe direction on first significant movement\n if (!isDragging && !isVerticalSwipeRef.current) {\n if (Math.abs(deltaY) > Math.abs(deltaX) && Math.abs(deltaY) > 10) {\n ignoreNextClickRef.current = true;\n isVerticalSwipeRef.current = true;\n return;\n }\n if (Math.abs(deltaX) > 10) {\n ignoreNextClickRef.current = true;\n setIsDragging(true);\n }\n }\n\n if (isVerticalSwipeRef.current) return;\n\n // Constrain drag when at boundaries\n if ((!hasNext && deltaX < 0) || (!hasPrevious && deltaX > 0)) {\n setSlideOffset(deltaX * 0.3); // Rubber-band effect\n } else {\n setSlideOffset(deltaX);\n }\n },\n [isDragging, hasNext, hasPrevious],\n );\n\n const handleTouchEnd = useCallback(() => {\n if (!touchStartRef.current || isVerticalSwipeRef.current) {\n if (isVerticalSwipeRef.current) ignoreNextClickRef.current = true;\n touchStartRef.current = null;\n return;\n }\n\n const offset = slideOffset;\n if (isDragging || Math.abs(offset) > 10) {\n ignoreNextClickRef.current = true;\n }\n touchStartRef.current = null;\n\n if (Math.abs(offset) >= SWIPE_THRESHOLD) {\n if (offset < 0 && hasNext) {\n goToNext();\n } else if (offset > 0 && hasPrevious) {\n goToPrevious();\n } else {\n // Snap back — at boundary\n setSlideOffset(0);\n }\n } else {\n // Snap back — below threshold\n setSlideOffset(0);\n }\n\n setIsDragging(false);\n }, [slideOffset, hasNext, hasPrevious, goToNext, goToPrevious, isDragging]);\n\n const requestClose = modalContext?.close ?? onRequestClose;\n const handleBackgroundClick = useCallback(\n (event: React.MouseEvent<HTMLDivElement>) => {\n if (event.target !== event.currentTarget) return;\n\n if (ignoreNextClickRef.current) {\n ignoreNextClickRef.current = false;\n return;\n }\n\n if (!closeOnBackgroundClick) return;\n\n requestClose?.();\n },\n [closeOnBackgroundClick, requestClose],\n );\n\n const mediaStyle: React.CSSProperties =\n isDragging || (slideOffset !== 0 && slideDirection === null)\n ? { transform: `translateX(${slideOffset}px)` }\n : {};\n\n return (\n <div className='str-chat__gallery'>\n <div className='str-chat__gallery__main'>\n <GalleryHeader currentItem={currentItem} />\n <NavButton\n aria-label={t('Previous image')}\n className={clsx(\n 'str-chat__gallery__nav-button--prev',\n !hasPrevious && 'str-chat__gallery__nav-button--hidden',\n )}\n disabled={!hasPrevious}\n onClick={handleGoToPrevious}\n >\n <IconChevronLeft />\n </NavButton>\n <div\n className='str-chat__gallery__slide-container'\n onClick={handleBackgroundClick}\n onTouchEnd={handleTouchEnd}\n onTouchMove={handleTouchMove}\n onTouchStart={handleTouchStart}\n ref={containerRef}\n >\n <div\n className={clsx('str-chat__gallery__media-container', {\n 'str-chat__gallery__media--dragging': isDragging,\n 'str-chat__gallery__media--slide-backward':\n !isDragging && slideDirection === 'backward',\n 'str-chat__gallery__media--slide-forward':\n !isDragging && slideDirection === 'forward',\n })}\n style={mediaStyle}\n >\n {currentItem.videoUrl && currentItem.videoThumbnailUrl ? (\n <div className='str-chat__gallery__media str-chat__gallery__media--video'>\n {showVideo ? (\n <VideoPlayer isPlaying videoUrl={currentItem.videoUrl} />\n ) : (\n <VideoThumbnail\n alt={currentItem.title ?? ''}\n onPlay={() => setShowVideo(true)}\n src={currentItem.videoThumbnailUrl}\n />\n )}\n </div>\n ) : (\n <div className='str-chat__gallery__media str-chat__gallery__media--image'>\n <BaseImage alt={currentItem.alt} src={currentItem.imageUrl} />\n </div>\n )}\n </div>\n </div>\n <NavButton\n aria-label={t('Next image')}\n className={clsx(\n 'str-chat__gallery__nav-button--next',\n !hasNext && 'str-chat__gallery__nav-button--hidden',\n )}\n disabled={!hasNext}\n onClick={handleGoToNext}\n >\n <IconChevronRight />\n </NavButton>\n </div>\n {itemCount > 1 && (\n <div className='str-chat__gallery__position-indicator'>\n {currentIndex + 1} of {itemCount}\n </div>\n )}\n </div>\n );\n};\n\nconst NavButton = ({ className, ...props }: ButtonProps) => (\n <Button {...props} className={clsx('str-chat__gallery__nav-button', className)} />\n);\n","import React, { useCallback, useEffect, useMemo, useState } from 'react';\n\nimport { GalleryContext } from './GalleryContext';\nimport { GalleryUI as DefaultGalleryUI } from './GalleryUI';\nimport { useComponentContext } from '../../context';\n\nimport type { GalleryContextValue, GalleryItem } from './GalleryContext';\n\nexport type GalleryProps = {\n /** Whether clicking the empty gallery background should request close (default: true) */\n closeOnBackgroundClick?: boolean;\n /** Array of media attachments to display */\n items: GalleryItem[];\n /** Custom UI component to replace the default GalleryUI */\n GalleryUI?: React.ComponentType;\n /** Initial index of the item to display (default: 0) */\n initialIndex?: number;\n /** Callback when the active item changes */\n onIndexChange?: (index: number) => void;\n /** Callback invoked when the gallery requests to close */\n onRequestClose?: () => void;\n};\n\nexport const Gallery = ({\n closeOnBackgroundClick = true,\n GalleryUI,\n initialIndex = 0,\n items,\n onIndexChange,\n onRequestClose,\n}: GalleryProps) => {\n const { GalleryUI: ContextGalleryUI } = useComponentContext();\n const ResolvedGalleryUI = GalleryUI ?? ContextGalleryUI ?? DefaultGalleryUI;\n const [currentIndex, setCurrentIndex] = useState(initialIndex);\n\n const itemCount = items.length;\n\n const goToIndex = useCallback(\n (index: number) => {\n if (index >= 0 && index < itemCount) {\n setCurrentIndex(index);\n }\n },\n [itemCount],\n );\n\n const goToNext = useCallback(() => {\n setCurrentIndex((prev) => (prev < itemCount - 1 ? prev + 1 : prev));\n }, [itemCount]);\n\n const goToPrevious = useCallback(() => {\n setCurrentIndex((prev) => (prev > 0 ? prev - 1 : prev));\n }, []);\n\n useEffect(() => {\n onIndexChange?.(currentIndex);\n }, [currentIndex, onIndexChange]);\n\n const hasNext = currentIndex < itemCount - 1;\n const hasPrevious = currentIndex > 0;\n const currentItem = items[currentIndex];\n\n const contextValue = useMemo<GalleryContextValue>(\n () => ({\n closeOnBackgroundClick,\n currentIndex,\n currentItem,\n goToIndex,\n goToNext,\n goToPrevious,\n hasNext,\n hasPrevious,\n itemCount,\n items,\n onRequestClose,\n }),\n [\n closeOnBackgroundClick,\n currentIndex,\n currentItem,\n goToIndex,\n goToNext,\n goToPrevious,\n hasNext,\n hasPrevious,\n itemCount,\n items,\n onRequestClose,\n ],\n );\n\n return (\n <GalleryContext.Provider value={contextValue}>\n <ResolvedGalleryUI />\n </GalleryContext.Provider>\n );\n};\n","import type { Channel, ChannelConfigWithInfo } from 'stream-chat';\n\n/**\n * `channel.getConfig()` throws once the channel is disconnected (current user\n * removed from the channel, channel deleted). Returns `undefined` instead,\n * which is already part of `getConfig()`'s return type.\n */\nexport const getChannelConfig = (channel: Channel): ChannelConfigWithInfo | undefined =>\n channel.disconnected ? undefined : channel.getConfig();\n","import clsx from 'clsx';\nimport type {\n ChangeEventHandler,\n ComponentProps,\n KeyboardEventHandler,\n MouseEventHandler,\n PropsWithChildren,\n ReactNode,\n} from 'react';\nimport React, { isValidElement, useContext, useRef, useState } from 'react';\nimport { useStableId } from '../UtilityComponents/useStableId';\nimport { AriaLiveAnnouncerContext } from '../Accessibility';\nimport { useTranslationContext } from '../../context';\n\nexport type SwitchFieldProps = Omit<\n PropsWithChildren<ComponentProps<'input'>>,\n 'children'\n> & {\n /** Main label content when title/description are not used */\n children?: ReactNode;\n /** Optional description line below title */\n description?: string;\n /** Class applied to the root div element of the SwitchField component */\n fieldClassName?: string;\n /** Optional title line */\n title?: string;\n};\n\nexport const SwitchField = ({\n children,\n description,\n fieldClassName,\n title,\n ...props\n}: SwitchFieldProps) => {\n const {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n checked,\n defaultChecked,\n disabled,\n id,\n onChange,\n onKeyDown,\n ...rest\n } = props;\n const generatedSwitchId = useStableId();\n const switchId = id ?? `str-chat__switch-field-${generatedSwitchId}`;\n const switchLabelId = `${switchId}-label`;\n const inputRef = useRef<HTMLInputElement | null>(null);\n // Read the announcer optionally: a SwitchField may render outside an announcer provider (e.g. in\n // isolation), where it simply stays silent rather than warning.\n const announce = useContext(AriaLiveAnnouncerContext)?.announce;\n const { t } = useTranslationContext('SwitchField');\n\n const [uncontrolledChecked, setUncontrolledChecked] = useState(Boolean(defaultChecked));\n const isControlled = checked !== undefined;\n const isOn = isControlled ? checked : uncontrolledChecked;\n const isReadOnly = isControlled && onChange === undefined;\n\n // When no title/aria-label is provided, SwitchField can still be named by a caller-supplied\n // child element id via aria-labelledby.\n const childElement = isValidElement<{ id?: string }>(children) ? children : undefined;\n const childLabelId = childElement?.props.id;\n // Accessible-name precedence:\n // 1) explicit aria-labelledby prop\n // 2) explicit aria-label prop\n // 3) generated title label id (title path)\n // 4) caller-supplied child id (children path)\n const resolvedAriaLabelledBy =\n ariaLabelledBy ?? (!ariaLabel ? (title ? switchLabelId : childLabelId) : undefined);\n\n // Name the toggled setting for the announcement: prefer the explicit title/aria-label; otherwise\n // fall back to the text of the aria-labelledby target (its title row, when present, so the\n // description is not read out as part of the name).\n const resolveAnnouncementName = () => {\n if (title) return title;\n if (ariaLabel) return ariaLabel;\n if (resolvedAriaLabelledBy) {\n const labelEl = document.getElementById(resolvedAriaLabelledBy);\n const titleEl = labelEl?.querySelector(\n '.str-chat__form__switch-field__label__text',\n );\n return (titleEl?.textContent || labelEl?.textContent || '').trim() || undefined;\n }\n return undefined;\n };\n\n const handleChange: ChangeEventHandler<HTMLInputElement> = (event) => {\n if (!isControlled) {\n setUncontrolledChecked(event.target.checked);\n }\n\n onChange?.(event);\n\n const setting = resolveAnnouncementName();\n if (!announce || !setting) return;\n announce(\n event.target.checked\n ? t('aria/{{ setting }} enabled', { setting })\n : t('aria/{{ setting }} disabled', { setting }),\n { priority: 'polite' },\n );\n };\n\n const handleKeyDown: KeyboardEventHandler<HTMLInputElement> = (event) => {\n onKeyDown?.(event);\n if (event.defaultPrevented || event.key !== ' ') return;\n\n event.preventDefault();\n event.currentTarget.click();\n };\n\n const handleSwitchClick: MouseEventHandler<HTMLDivElement> = (event) => {\n if (disabled || event.target === inputRef.current) return;\n inputRef.current?.click();\n };\n\n return (\n <div\n className={clsx(\n 'str-chat__form__switch-field',\n fieldClassName,\n disabled && 'str-chat__form__switch-field--disabled',\n )}\n >\n {title ? (\n <SwitchFieldLabel\n description={description}\n htmlFor={switchId}\n id={switchLabelId}\n title={title}\n />\n ) : (\n children\n )}\n <Switch\n {...rest}\n aria-label={ariaLabel}\n aria-labelledby={resolvedAriaLabelledBy}\n checked={isOn}\n disabled={disabled}\n id={switchId}\n on={isOn}\n onChange={handleChange}\n onKeyDown={handleKeyDown}\n onSwitchClick={handleSwitchClick}\n readOnly={isReadOnly}\n switchRef={inputRef}\n />\n </div>\n );\n};\nexport type SwitchProps = Omit<ComponentProps<'input'>, 'type'> & {\n on?: boolean;\n onSwitchClick?: MouseEventHandler<HTMLDivElement>;\n /**\n * Renders the switch as a visual-only indicator when another element owns interaction.\n * Example: a button row with a trailing switch indicator must not render an input inside the button.\n */\n presentation?: boolean;\n switchRef?: React.RefObject<HTMLInputElement | null>;\n};\n\nexport const Switch = ({\n className,\n on,\n onSwitchClick,\n presentation,\n switchRef,\n ...props\n}: SwitchProps) => (\n <div\n aria-hidden={presentation ? true : undefined}\n className={clsx('str-chat__form__switch-field__switch', {\n 'str-chat__form__switch-field__switch--on': on,\n })}\n onClick={presentation ? undefined : onSwitchClick}\n >\n {!presentation && (\n <input\n {...props}\n className={clsx('str-chat__form__switch-field__input', className)}\n ref={switchRef}\n role='switch'\n type='checkbox'\n />\n )}\n <span className='str-chat__form__switch-field__switch-handle' />\n </div>\n);\n\nexport type SwitchFieldLabelProps = ComponentProps<'label'> & {\n /** Adds className str-chat__form__switch-field__label--as-error to the root */\n asError?: boolean;\n title?: string;\n description?: string;\n};\n\nexport const SwitchFieldLabel = ({\n asError,\n children,\n className,\n description,\n title,\n ...props\n}: SwitchFieldLabelProps) => (\n <label\n className={clsx(\n 'str-chat__form__switch-field__label',\n { 'str-chat__form__switch-field__label--as-error': asError },\n className,\n )}\n {...props}\n >\n <div className='str-chat__form__switch-field__label__content'>\n {title ? (\n <>\n <SwitchFieldTitle>{title}</SwitchFieldTitle>\n {description != null && description !== '' && (\n <SwitchFieldDescription>{description}</SwitchFieldDescription>\n )}\n </>\n ) : (\n children\n )}\n </div>\n </label>\n);\n\nexport type SwitchFieldTitleProps = ComponentProps<'div'> & {\n title?: string;\n};\n\nexport const SwitchFieldTitle = ({\n children,\n className,\n title,\n ...props\n}: SwitchFieldTitleProps) => (\n <div\n className={clsx('str-chat__form__switch-field__label__text', className)}\n {...props}\n >\n {children ?? title}\n </div>\n);\n\nexport type SwitchFieldDescriptionProps = ComponentProps<'div'> & {\n description?: string;\n};\n\nexport const SwitchFieldDescription = ({\n children,\n className,\n description,\n ...props\n}: SwitchFieldDescriptionProps) => (\n <div\n className={clsx('str-chat__form__switch-field__label__description', className)}\n {...props}\n >\n {children ?? description}\n </div>\n);\n","import clsx from 'clsx';\nimport React, { forwardRef } from 'react';\nimport type { ComponentProps, ReactNode } from 'react';\nimport { useStableId } from '../UtilityComponents/useStableId';\nimport { useComponentContextIcons } from '../../context';\n\nexport type TextInputVariant = 'outline' | 'ghost';\n\n/** Where the active field message (error, success, or neutral) sits relative to the bordered control */\nexport type TextInputFieldMessagePlacement = 'outside' | 'inside';\n\nexport type TextInputProps = Omit<ComponentProps<'input'>, 'className'> & {\n /** Root class name */\n className?: string;\n /**\n * `outside` (default): message below the bordered wrapper.\n * `inside`: message under the value row, inside the border (error, success, or neutral).\n */\n fieldMessagePlacement?: TextInputFieldMessagePlacement;\n /** Optional label above the input */\n label?: string;\n /** Optional leading content (e.g. icon) inside the input area */\n leading?: ReactNode;\n /** Optional trailing content (e.g. clear button) inside the input area */\n trailing?: ReactNode;\n /** Optional suffix text shown after the input value, inside the field */\n trailingText?: string;\n /** Neutral/helper message below the input (no icon) */\n message?: ReactNode;\n /** Error message; shown when `error` is true, with `errorMessageIcon` */\n errorMessage?: ReactNode;\n /** Icon before error text (default: exclamation) */\n errorMessageIcon?: ReactNode;\n /** Success message below the input */\n successMessage?: ReactNode;\n /** Icon before success text (default: checkmark) */\n successMessageIcon?: ReactNode;\n /** When true, error border and error styling */\n error?: boolean;\n /** `outline` = border always; `ghost` = border on focus */\n variant?: TextInputVariant;\n};\n\ntype TextInputIconMessageLineProps = {\n icon: ReactNode;\n text: ReactNode;\n};\n\nconst TextInputIconMessageLine = ({ icon, text }: TextInputIconMessageLineProps) => (\n <>\n <span aria-hidden className='str-chat__form-text-input__message-icon'>\n {icon}\n </span>\n <span className='str-chat__form-text-input__message-text'>{text}</span>\n </>\n);\n\n/** At most one of error / success / neutral is shown under the field */\ntype TextInputFieldMessageProps =\n | {\n kind: 'error';\n id?: string;\n insidePlacement: boolean;\n errorMessageIcon?: ReactNode;\n text: ReactNode;\n }\n | {\n kind: 'success';\n id?: string;\n insidePlacement: boolean;\n successMessageIcon?: ReactNode;\n text: ReactNode;\n }\n | {\n kind: 'neutral';\n id?: string;\n insidePlacement: boolean;\n text: ReactNode;\n };\n\nconst TextInputFieldMessage = (props: TextInputFieldMessageProps) => {\n const { IconCheckmark, IconExclamationMark } = useComponentContextIcons();\n if (props.kind === 'neutral') {\n return (\n <div\n className={clsx(\n 'str-chat__form-text-input__message',\n props.insidePlacement &&\n 'str-chat__form-text-input__message--field-message-inside',\n )}\n id={props.id}\n >\n {props.text}\n </div>\n );\n } else if (props.kind === 'success') {\n return (\n <div\n className={clsx(\n 'str-chat__form-text-input__message',\n 'str-chat__form-text-input__message--success',\n props.insidePlacement &&\n 'str-chat__form-text-input__message--field-message-inside',\n )}\n id={props.id}\n >\n <TextInputIconMessageLine\n icon={props.successMessageIcon ?? <IconCheckmark />}\n text={props.text}\n />\n </div>\n );\n } else if (props.kind === 'error') {\n return (\n <div\n className={clsx(\n 'str-chat__form-text-input__message',\n 'str-chat__form-field-error',\n props.insidePlacement &&\n 'str-chat__form-text-input__message--field-message-inside',\n )}\n id={props.id}\n role='alert'\n >\n <TextInputIconMessageLine\n icon={props.errorMessageIcon ?? <IconExclamationMark />}\n text={props.text}\n />\n </div>\n );\n }\n\n return null;\n};\n\nexport const TextInput = forwardRef<HTMLInputElement, TextInputProps>(function TextInput(\n {\n className,\n disabled,\n error = false,\n errorMessage,\n errorMessageIcon,\n fieldMessagePlacement = 'outside',\n id: idProp,\n label,\n leading,\n message,\n successMessage,\n successMessageIcon,\n trailing,\n trailingText,\n variant = 'outline',\n ...inputProps\n },\n ref,\n) {\n const autoId = useStableId();\n const id = idProp ?? autoId;\n\n const hasError = error && (errorMessage != null || message != null);\n const showSuccess = !hasError && successMessage != null;\n const showNeutral = !hasError && !showSuccess && message != null;\n const hasFeedback = hasError || showSuccess || showNeutral;\n const messageInside = fieldMessagePlacement === 'inside' && hasFeedback;\n\n const messageId = hasError\n ? `${id}-field-error`\n : showSuccess || showNeutral\n ? `${id}-message`\n : undefined;\n const describedBy = [inputProps['aria-describedby'], messageId]\n .filter((value): value is string => !!value)\n .join(' ');\n\n const fieldMessage = hasError ? (\n <TextInputFieldMessage\n errorMessageIcon={errorMessageIcon}\n id={messageId}\n insidePlacement={messageInside}\n kind='error'\n text={errorMessage ?? message}\n />\n ) : showSuccess ? (\n <TextInputFieldMessage\n id={messageId}\n insidePlacement={messageInside}\n kind='success'\n successMessageIcon={successMessageIcon}\n text={successMessage}\n />\n ) : showNeutral ? (\n <TextInputFieldMessage\n id={messageId}\n insidePlacement={messageInside}\n kind='neutral'\n text={message}\n />\n ) : null;\n\n return (\n <div\n className={clsx(\n 'str-chat__form-text-input',\n error && 'str-chat__form-text-input--error',\n showSuccess && 'str-chat__form-text-input--success',\n disabled && 'str-chat__form-text-input--disabled',\n messageInside && 'str-chat__form-text-input--field-message-inside',\n className,\n )}\n >\n {label ? (\n <label className='str-chat__form-text-input__label' htmlFor={id}>\n {label}\n </label>\n ) : null}\n <div\n className={clsx(\n 'str-chat__form-text-input__wrapper',\n `str-chat__form-text-input__wrapper--${variant}`,\n messageInside && 'str-chat__form-text-input__wrapper--field-message-inside',\n )}\n >\n <div className='str-chat__form-text-input__control-row'>\n {leading ? (\n <span className='str-chat__form-text-input__leading'>{leading}</span>\n ) : null}\n <input\n aria-describedby={describedBy}\n aria-invalid={error}\n className='str-chat__form-text-input__input'\n disabled={disabled}\n id={id}\n ref={ref}\n {...inputProps}\n />\n {trailingText != null ? (\n <span aria-hidden className='str-chat__form-text-input__suffix'>\n {trailingText}\n </span>\n ) : null}\n {trailing ? (\n <span className='str-chat__form-text-input__trailing'>{trailing}</span>\n ) : null}\n </div>\n {messageInside ? fieldMessage : null}\n </div>\n {messageInside ? null : fieldMessage}\n </div>\n );\n});\n","import clsx from 'clsx';\nimport type {\n ComponentProps,\n ComponentType,\n ElementType,\n HTMLAttributes,\n ReactNode,\n} from 'react';\nimport React from 'react';\n\nexport type ListItemLayoutRootElement = Extract<\n keyof React.JSX.IntrinsicElements,\n keyof HTMLElementTagNameMap\n>;\n\nexport type ListItemLayoutBaseProps = {\n ContentSlot?: ComponentType<ListItemLayoutContentProps>;\n contentClassName?: string;\n description?: ReactNode;\n descriptionClassName?: string;\n destructive?: boolean;\n LeadingIcon?: ComponentType;\n LeadingSlot?: ComponentType;\n selected?: boolean;\n subtitle?: ReactNode;\n subtitleClassName?: string;\n title: ReactNode;\n titleClassName?: string;\n TrailingIcon?: ComponentType;\n TrailingSlot?: ComponentType;\n};\n\nexport type ListItemLayoutProps<RootElement extends ListItemLayoutRootElement = 'div'> =\n ListItemLayoutBaseProps & {\n RootElement?: RootElement;\n rootProps?: Omit<ComponentProps<RootElement>, 'children'>;\n };\n\nexport const ListItemLayout = <RootElement extends ListItemLayoutRootElement = 'div'>({\n ContentSlot = ListItemLayoutContent,\n contentClassName,\n description,\n descriptionClassName,\n destructive,\n LeadingIcon,\n LeadingSlot,\n RootElement,\n rootProps,\n selected,\n subtitle,\n subtitleClassName,\n title,\n titleClassName,\n TrailingIcon,\n TrailingSlot,\n}: ListItemLayoutProps<RootElement>) => {\n // The inner container is the interactive element (button/anchor). The outer\n // wrapper is a plain spacing buffer so the container's focus ring (2px offset)\n // never overlaps adjacent items or gets clipped by an overflow ancestor.\n const ContainerComponent = (RootElement ?? 'div') as ElementType<\n HTMLAttributes<HTMLElement>\n >;\n const containerProps = {\n ...(ContainerComponent === 'button' ? { type: 'button' } : undefined),\n ...rootProps,\n className: clsx(\n 'str-chat__list-item-layout__container',\n rootProps?.className,\n destructive && 'str-chat__list-item-layout__container--destructive',\n selected && 'str-chat__list-item-layout__container--selected',\n ),\n } as HTMLAttributes<HTMLElement>;\n\n return (\n <div className='str-chat__list-item-layout'>\n <ContainerComponent {...containerProps}>\n {LeadingIcon && (\n <div className='str-chat__list-item-layout__leading-icon'>\n <LeadingIcon />\n </div>\n )}\n {LeadingSlot && <LeadingSlot />}\n <ContentSlot\n className={contentClassName}\n description={description}\n descriptionClassName={descriptionClassName}\n subtitle={subtitle}\n subtitleClassName={subtitleClassName}\n title={title}\n titleClassName={titleClassName}\n />\n {TrailingIcon && (\n <div className='str-chat__list-item-layout__trailing-icon'>\n <TrailingIcon />\n </div>\n )}\n {TrailingSlot && <TrailingSlot />}\n </ContainerComponent>\n </div>\n );\n};\n\nexport type ListItemLayoutContentProps = Omit<ComponentProps<'div'>, 'title'> & {\n description?: ReactNode;\n descriptionClassName?: string;\n subtitle?: ReactNode;\n subtitleClassName?: string;\n title: ReactNode;\n titleClassName?: string;\n};\n\nexport const ListItemLayoutContent = ({\n className,\n description,\n descriptionClassName,\n subtitle,\n subtitleClassName,\n title,\n titleClassName,\n ...props\n}: ListItemLayoutContentProps) => (\n <div\n {...props}\n className={clsx('str-chat__list-item-layout__content', className, {\n 'str-chat__list-item-layout__content--withDescription': description,\n 'str-chat__list-item-layout__content--withSubtitle': subtitle,\n 'str-chat__list-item-layout__content--withTitle': title,\n })}\n >\n {title && (\n <div className={clsx('str-chat__list-item-layout__title', titleClassName)}>\n {title}\n </div>\n )}\n {subtitle && (\n <div className={clsx('str-chat__list-item-layout__subtitle', subtitleClassName)}>\n {subtitle}\n </div>\n )}\n {description && (\n <div\n className={clsx('str-chat__list-item-layout__description', descriptionClassName)}\n >\n {description}\n </div>\n )}\n </div>\n);\n","export const CUSTOM_MESSAGE_TYPE = {\n date: 'message.date',\n intro: 'channel.intro',\n} as const;\n","import { nanoid } from 'nanoid';\n\nimport { CUSTOM_MESSAGE_TYPE } from '../../constants/messageTypes';\nimport { isMessageEdited } from '../Message/utils';\nimport { isDate } from '../../i18n';\n\nimport type { LocalMessage, MessageLabel } from 'stream-chat';\n\ntype IntroMessage = {\n customType: typeof CUSTOM_MESSAGE_TYPE.intro;\n id: string;\n};\n\ntype DateSeparatorMessage = {\n customType: typeof CUSTOM_MESSAGE_TYPE.date;\n date: Date;\n id: string;\n type: MessageLabel;\n unread: boolean;\n};\n\nexport type RenderedMessage = LocalMessage | DateSeparatorMessage | IntroMessage;\n\ntype ProcessMessagesContext = {\n /** the connected user ID */\n userId: string;\n /** Enable date separator */\n enableDateSeparator?: boolean;\n /** Enable deleted messages to be filtered out of resulting message list */\n hideDeletedMessages?: boolean;\n /** Disable date separator display for unread incoming messages */\n hideNewMessageSeparator?: boolean;\n /** Sets the threshold after everything is considered unread */\n lastRead?: Date | null;\n};\n\nexport type ProcessMessagesParams = ProcessMessagesContext & {\n messages: LocalMessage[];\n reviewProcessedMessage?: (params: {\n /** array of messages representing the changes applied around a given processed message */\n changes: RenderedMessage[];\n /** configuration params and information forwarded from `processMessages` */\n context: ProcessMessagesContext;\n /** index of the processed message in the original messages array */\n index: number;\n /** array of messages retrieved from the back-end */\n messages: LocalMessage[];\n /** newly built array of messages to be later rendered */\n processedMessages: RenderedMessage[];\n }) => LocalMessage[];\n /** Signals whether to separate giphy preview as well as used to set the giphy preview state */\n setGiphyPreviewMessage?: React.Dispatch<React.SetStateAction<LocalMessage | undefined>>;\n};\n\n/**\n * processMessages - Transform the input message list according to config parameters\n *\n * Inserts date separators btw. messages created on different dates or before unread incoming messages. By default:\n * - enabled in main message list\n * - disabled in virtualized message list\n * - disabled in thread\n *\n * Allows to filter out deleted messages, contolled by hideDeletedMessages param. This is disabled by default.\n *\n * Sets Giphy preview message for VirtualizedMessageList\n *\n * The only required params are messages and userId, the rest are config params:\n *\n * @return {LocalMessage[]} Transformed list of messages\n */\nexport const processMessages = (params: ProcessMessagesParams) => {\n const { messages, reviewProcessedMessage, setGiphyPreviewMessage, ...context } = params;\n const {\n enableDateSeparator,\n hideDeletedMessages,\n hideNewMessageSeparator,\n lastRead,\n userId,\n } = context;\n\n let unread = false;\n let ephemeralMessagePresent = false;\n let lastDateSeparator;\n const newMessages: RenderedMessage[] = [];\n\n for (let i = 0; i < messages.length; i += 1) {\n const message = messages[i];\n\n if (hideDeletedMessages && message.type === 'deleted') {\n continue;\n }\n\n if (\n setGiphyPreviewMessage &&\n message.type === 'ephemeral' &&\n message.command === 'giphy'\n ) {\n ephemeralMessagePresent = true;\n setGiphyPreviewMessage(message);\n continue;\n }\n\n const changes: RenderedMessage[] = [];\n const messageDate =\n (message.created_at &&\n isDate(message.created_at) &&\n message.created_at.toDateString()) ||\n '';\n const previousMessage = messages[i - 1];\n let prevMessageDate = messageDate;\n\n if (\n enableDateSeparator &&\n previousMessage?.created_at &&\n isDate(previousMessage.created_at)\n ) {\n prevMessageDate = previousMessage.created_at.toDateString();\n }\n\n if (!unread && !hideNewMessageSeparator) {\n unread =\n (lastRead && message.created_at && new Date(lastRead) < message.created_at) ||\n false;\n\n // do not show date separator for current user's messages\n if (enableDateSeparator && unread && message.user?.id !== userId) {\n changes.push({\n customType: CUSTOM_MESSAGE_TYPE.date,\n date: message.created_at,\n id: makeDateMessageId(message.created_at),\n unread,\n } as DateSeparatorMessage);\n }\n }\n\n if (\n enableDateSeparator &&\n (i === 0 || // always put date separator before the first message\n messageDate !== prevMessageDate || // add date separator btw. 2 messages created on different date\n // if hiding deleted messages replace the previous deleted message(s) with A separator if the last rendered message was created on different date\n (hideDeletedMessages &&\n previousMessage?.type === 'deleted' &&\n lastDateSeparator !== messageDate)) &&\n !isDateSeparatorMessage(changes[changes.length - 1]) // do not show two date separators in a row)\n ) {\n lastDateSeparator = messageDate;\n\n changes.push(\n {\n customType: CUSTOM_MESSAGE_TYPE.date,\n date: message.created_at,\n id: makeDateMessageId(message.created_at),\n } as DateSeparatorMessage,\n message,\n );\n } else {\n changes.push(message);\n }\n\n newMessages.push(\n ...(reviewProcessedMessage?.({\n changes,\n context,\n index: i,\n messages,\n processedMessages: newMessages,\n }) || changes),\n );\n }\n\n // clean up the giphy preview component state after a Cancel action\n if (setGiphyPreviewMessage && !ephemeralMessagePresent) {\n setGiphyPreviewMessage(undefined);\n }\n\n return newMessages;\n};\n\nexport const makeIntroMessage = (): IntroMessage => ({\n customType: CUSTOM_MESSAGE_TYPE.intro,\n id: nanoid(),\n});\n\nexport const makeDateMessageId = (date?: string | Date) => {\n let idSuffix;\n try {\n idSuffix = !date ? nanoid() : date instanceof Date ? date.toISOString() : date;\n } catch (e) {\n idSuffix = nanoid();\n }\n return `${CUSTOM_MESSAGE_TYPE.date}-${idSuffix}`;\n};\n\n// fast since it usually iterates just the last few messages\nexport const getLastReceived = (messages: RenderedMessage[]) => {\n for (let i = messages.length - 1; i > 0; i -= 1) {\n if ((messages[i] as LocalMessage).status === 'received') {\n return messages[i].id;\n }\n }\n\n return null;\n};\n\nexport const insertIntro = (messages: RenderedMessage[], headerPosition?: number) => {\n const newMessages = messages;\n const intro = makeIntroMessage();\n\n // if no headerPosition is set, HeaderComponent will go at the top\n if (!headerPosition) {\n newMessages.unshift(intro);\n return newMessages;\n }\n\n // if no messages, intro gets inserted\n if (!newMessages.length) {\n newMessages.unshift(intro);\n return newMessages;\n }\n\n // else loop over the messages\n for (let i = 0; i < messages.length; i += 1) {\n const messageTime = isDate((messages[i] as LocalMessage).created_at)\n ? (messages[i] as LocalMessage).created_at.getTime()\n : null;\n\n const nextMessageTime = isDate((messages[i + 1] as LocalMessage).created_at)\n ? (messages[i + 1] as LocalMessage).created_at.getTime()\n : null;\n\n // header position is smaller than message time so comes after;\n if (messageTime && messageTime < headerPosition) {\n // if header position is also smaller than message time continue;\n if (nextMessageTime && nextMessageTime < headerPosition) {\n if (messages[i + 1] && isDateSeparatorMessage(messages[i + 1])) continue;\n if (!nextMessageTime) {\n newMessages.push(intro);\n return newMessages;\n }\n } else {\n newMessages.splice(i + 1, 0, intro);\n return newMessages;\n }\n }\n }\n\n return newMessages;\n};\n\nexport type GroupStyle = '' | 'middle' | 'top' | 'bottom' | 'single';\n\n// Allocation-free, early-exiting emptiness check. Avoids the throwaway array\n// that `Object.keys(obj).length > 0` allocates per message inside getGroupStyles.\nconst isNonEmptyRecord = (record: Record<string, unknown>) => {\n for (const key in record) {\n if (Object.prototype.hasOwnProperty.call(record, key)) return true;\n }\n return false;\n};\n\nexport const getGroupStyles = (\n message: RenderedMessage,\n previousMessage: RenderedMessage,\n nextMessage: RenderedMessage,\n noGroupByUser: boolean,\n maxTimeBetweenGroupedMessages?: number,\n): GroupStyle => {\n if (isDateSeparatorMessage(message) || isIntroMessage(message)) return '';\n\n if (noGroupByUser || message.attachments?.length !== 0) return 'single';\n\n const isTopMessage =\n !previousMessage ||\n isIntroMessage(previousMessage) ||\n isDateSeparatorMessage(previousMessage) ||\n previousMessage.type === 'system' ||\n previousMessage.type === 'error' ||\n previousMessage.attachments?.length !== 0 ||\n message.user?.id !== previousMessage.user?.id ||\n (message.reaction_groups && isNonEmptyRecord(message.reaction_groups)) ||\n isMessageEdited(previousMessage) ||\n (maxTimeBetweenGroupedMessages !== undefined &&\n previousMessage.created_at &&\n message.created_at &&\n new Date(message.created_at).getTime() -\n new Date(previousMessage.created_at).getTime() >\n maxTimeBetweenGroupedMessages);\n\n const isBottomMessage =\n !nextMessage ||\n isIntroMessage(nextMessage) ||\n isDateSeparatorMessage(nextMessage) ||\n nextMessage.type === 'system' ||\n nextMessage.type === 'error' ||\n nextMessage.attachments?.length !== 0 ||\n message.user?.id !== nextMessage.user?.id ||\n (nextMessage.reaction_groups && isNonEmptyRecord(nextMessage.reaction_groups)) ||\n isMessageEdited(message) ||\n (maxTimeBetweenGroupedMessages !== undefined &&\n nextMessage.created_at &&\n message.created_at &&\n new Date(nextMessage.created_at).getTime() -\n new Date(message.created_at).getTime() >\n maxTimeBetweenGroupedMessages);\n\n if (!isTopMessage && !isBottomMessage) {\n if (message.type === 'error') return 'single';\n return 'middle';\n }\n\n if (isBottomMessage) {\n if (isTopMessage || message.type === 'error') return 'single';\n return 'bottom';\n }\n\n if (isTopMessage) return 'top';\n\n return '';\n};\n\n// \"Probably\" included, because it may happen that the last page was returned and it has exactly the size of the limit\n// but the back-end cannot provide us with information on whether it has still more messages in the DB\n// FIXME: once the pagination state is moved from Channel to MessageList, these should be moved as well.\n// The MessageList should have configurable the limit for performing the requests.\n// This parameter would then be used within these functions\nexport const hasMoreMessagesProbably = (returnedCountMessages: number, limit: number) =>\n returnedCountMessages >= limit;\n\nexport function isIntroMessage(message: unknown): message is IntroMessage {\n return (message as IntroMessage).customType === CUSTOM_MESSAGE_TYPE.intro;\n}\n\nexport function isDateSeparatorMessage(\n message: unknown,\n): message is DateSeparatorMessage {\n return (\n message !== null &&\n typeof message === 'object' &&\n (message as DateSeparatorMessage).customType === CUSTOM_MESSAGE_TYPE.date &&\n isDate((message as DateSeparatorMessage).date)\n );\n}\n\nexport function isLocalMessage(message: unknown): message is LocalMessage {\n return !isDateSeparatorMessage(message) && !isIntroMessage(message);\n}\n\nexport const getIsFirstUnreadMessage = ({\n firstUnreadMessageId,\n isFirstMessage,\n lastReadDate,\n lastReadMessageId,\n message,\n previousMessage,\n unreadMessageCount = 0,\n}: {\n isFirstMessage: boolean;\n message: LocalMessage;\n firstUnreadMessageId?: string;\n lastReadDate?: Date;\n lastReadMessageId?: string;\n previousMessage?: RenderedMessage;\n unreadMessageCount?: number;\n}) => {\n // prevent showing unread indicator in threads\n if (message.parent_id) return false;\n\n const createdAtTimestamp = message.created_at && new Date(message.created_at).getTime();\n const lastReadTimestamp = lastReadDate?.getTime();\n\n const messageIsUnread =\n !!createdAtTimestamp && !!lastReadTimestamp && createdAtTimestamp > lastReadTimestamp;\n\n const previousMessageIsLastRead =\n !!lastReadMessageId && lastReadMessageId === previousMessage?.id;\n\n return (\n firstUnreadMessageId === message.id ||\n (!!unreadMessageCount &&\n messageIsUnread &&\n (isFirstMessage || previousMessageIsLastRead))\n );\n};\n","import { useChatContext } from '../../../context/ChatContext';\nimport type { ChatContextValue } from '../../../context/ChatContext';\n\nexport const useImageFlagEmojisOnWindowsClass = () => {\n const { useImageFlagEmojisOnWindows } = useChatContext('Channel');\n return useImageFlagEmojisOnWindows && navigator.userAgent.match(/Win/)\n ? 'str-chat--windows-flags'\n : '';\n};\n\nexport const getChatContainerClass = (customClass?: string) =>\n customClass ?? 'str-chat__container';\n\nexport const useChannelContainerClasses = ({\n customClasses,\n}: Pick<ChatContextValue, 'customClasses'>) => {\n const windowsEmojiClass = useImageFlagEmojisOnWindowsClass();\n return {\n channelClass: customClasses?.channel ?? 'str-chat__channel',\n chatClass: customClasses?.chat ?? 'str-chat',\n chatContainerClass: getChatContainerClass(customClasses?.chatContainer),\n windowsEmojiClass,\n };\n};\n","import {\n type APIErrorResponse,\n type ChannelState,\n ErrorFromResponse,\n isLocalImageAttachment,\n isPendingUpload,\n type LocalMessage,\n type LocalNotImageAttachment,\n type LocalUploadAttachment,\n type MessageResponse,\n type MinimumUploadRequestResult,\n type StreamChat,\n} from 'stream-chat';\n\n/** Writes the resolved URL onto the attachment and releases its local preview. */\nconst applyUploadResult = (\n attachment: LocalUploadAttachment,\n response: MinimumUploadRequestResult,\n) => {\n const enriched: LocalUploadAttachment = { ...attachment };\n\n // Narrow on the copy, not the original, so the assignment type-checks.\n if (isLocalImageAttachment(enriched)) {\n enriched.image_url = response.file;\n } else {\n (enriched as LocalNotImageAttachment).asset_url = response.file;\n }\n if (response.thumb_url) {\n (enriched as LocalNotImageAttachment).thumb_url = response.thumb_url;\n }\n\n // The message has owned this preview since the composition was handed over — see\n // `createPostUploadAttachmentEnrichmentMiddleware`, which stops revoking once the composer\n // no longer holds the attachment.\n const { previewUri } = attachment.localMetadata;\n if (previewUri?.startsWith('blob:')) URL.revokeObjectURL?.(previewUri);\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars -- omit-by-destructure\n const { localMetadata, ...rest } = enriched;\n return rest;\n};\n\n/**\n * Utility function for jumpToFirstUnreadMessage\n * @param targetId\n * @param msgSet\n */\nexport const findInMsgSetById = (\n targetId: string,\n msgSet: ReturnType<ChannelState['formatMessage']>[],\n) => {\n for (let i = msgSet.length - 1; i >= 0; i--) {\n const item = msgSet[i];\n if (item.id === targetId) {\n return {\n index: i,\n target: item,\n };\n }\n }\n return {\n index: -1,\n };\n};\n\n/**\n * Utility function for jumpToFirstUnreadMessage\n * @param targetDate\n * @param msgSet\n * @param exact\n */\nexport const findInMsgSetByDate = (\n targetDate: Date,\n msgSet: MessageResponse[] | ReturnType<ChannelState['formatMessage']>[],\n exact = false,\n) => {\n const targetTimestamp = targetDate.getTime();\n let left = 0;\n let middle = 0;\n let right = msgSet.length - 1;\n while (left <= right) {\n middle = Math.floor((right + left) / 2);\n const middleTimestamp = new Date(\n msgSet[middle].created_at as string | Date,\n ).getTime();\n const middleLeftTimestamp =\n msgSet[middle - 1]?.created_at &&\n new Date(msgSet[middle - 1].created_at as string | Date).getTime();\n const middleRightTimestamp =\n msgSet[middle + 1]?.created_at &&\n new Date(msgSet[middle + 1].created_at as string | Date).getTime();\n if (\n middleTimestamp === targetTimestamp ||\n (middleLeftTimestamp &&\n middleRightTimestamp &&\n middleLeftTimestamp < targetTimestamp &&\n targetTimestamp < middleRightTimestamp)\n ) {\n return { index: middle, target: msgSet[middle] };\n }\n if (middleTimestamp < targetTimestamp) left = middle + 1;\n else right = middle - 1;\n }\n\n if (\n !exact ||\n new Date(msgSet[left].created_at as string | Date).getTime() === targetTimestamp\n ) {\n return { index: left, target: msgSet[left] };\n }\n return { index: -1 };\n};\n/**\n * Compatibility adapter:\n * LocalMessage.error expects ErrorFromResponse<APIErrorResponse>, but some transport failures\n * (for example Axios ERR_NETWORK while offline) do not have an HTTP response payload.\n */\nexport const adaptMessageSendErrorToErrorFromResponse = (\n error: unknown,\n): ErrorFromResponse<APIErrorResponse> => {\n if (error instanceof ErrorFromResponse) {\n return error;\n }\n\n const fallbackMessage = error instanceof Error ? error.message : 'Message send failed';\n let message = fallbackMessage;\n let status = 0;\n let code: number | null = null;\n\n if (typeof error === 'object' && error !== null) {\n const maybeAxiosError = error as {\n code?: unknown;\n message?: unknown;\n name?: unknown;\n response?: ErrorFromResponse<APIErrorResponse>['response'];\n status?: unknown;\n };\n\n if (maybeAxiosError.name === 'AxiosError' && maybeAxiosError.code === 'ERR_NETWORK') {\n message =\n typeof maybeAxiosError.message === 'string'\n ? maybeAxiosError.message\n : 'Network Error';\n status = maybeAxiosError.response?.status ?? 0;\n\n return new ErrorFromResponse<APIErrorResponse>(message, {\n code: null,\n response:\n maybeAxiosError.response ??\n ({\n // Compatibility shim: this is an intentionally incomplete AxiosResponse-like object.\n data: {\n duration: '',\n message,\n more_info: '',\n StatusCode: status,\n },\n status,\n } as ErrorFromResponse<APIErrorResponse>['response']),\n status,\n });\n }\n\n try {\n // error response isn't usable so needs to be stringified then parsed\n const stringError = JSON.stringify(error);\n const parsedError = stringError\n ? (JSON.parse(stringError) as Record<string, unknown>)\n : {};\n\n if (typeof parsedError.message === 'string') {\n message = parsedError.message;\n }\n if (typeof parsedError.status === 'number') {\n status = parsedError.status;\n }\n if (typeof parsedError.code === 'number') {\n code = parsedError.code;\n }\n } catch {\n // keep fallback values\n }\n }\n\n return new ErrorFromResponse<APIErrorResponse>(message, {\n code,\n response: {\n // Compatibility shim: this is an intentionally incomplete AxiosResponse-like object.\n data: {\n duration: '',\n message,\n more_info: '',\n StatusCode: status,\n },\n status,\n } as ErrorFromResponse<APIErrorResponse>['response'],\n status,\n });\n};\n\n/**\n * Settles the uploads of any attachment that is still in flight, and reports the outcome.\n *\n * A message only ever reaches the send path with a pending attachment when\n * `createSendWithPendingUploadsAttachmentsMiddleware` is installed — the default composition\n * middleware discards such a composition instead. `UploadManager.upload()` is idempotent by\n * `localMetadata.id`, so this awaits the request the composer already started rather than\n * starting a second one; an attachment whose upload never started (a retry, an offline replay)\n * is uploaded here for the first time.\n *\n * Resolved attachments come back carrying their URL and **without** `localMetadata`, and their\n * local preview is revoked. Failed ones are returned untouched, `localMetadata` and all, so a\n * retry re-uploads only what is still missing.\n */\nexport const settlePendingAttachmentUploads = async ({\n attachments,\n channelCid,\n client,\n}: {\n attachments: NonNullable<LocalMessage['attachments']>;\n channelCid: string;\n client: StreamChat;\n}): Promise<{\n attachments: NonNullable<LocalMessage['attachments']>;\n failureReason?: unknown;\n}> => {\n const pendingIndexes = attachments.reduce<number[]>((indexes, attachment, index) => {\n if (isPendingUpload(attachment)) indexes.push(index);\n return indexes;\n }, []);\n\n if (!pendingIndexes.length) return { attachments };\n\n const settled = await Promise.allSettled(\n pendingIndexes.map((index) => {\n const { file, id } = (attachments[index] as LocalUploadAttachment).localMetadata;\n return client.uploadManager.upload({ channelCid, file, id });\n }),\n );\n\n const nextAttachments = [...attachments];\n let failureReason: unknown;\n\n settled.forEach((result, position) => {\n const index = pendingIndexes[position];\n const attachment = nextAttachments[index] as LocalUploadAttachment;\n\n if (result.status === 'fulfilled' && result.value) {\n nextAttachments[index] = applyUploadResult(attachment, result.value);\n return;\n }\n\n // Deliberately `allSettled`, and the resolved URLs above are kept even though the message as\n // a whole now fails: a retry then only re-uploads what did not make it.\n if (!failureReason) {\n failureReason =\n result.status === 'rejected'\n ? result.reason\n : new Error('Attachment upload returned no result');\n }\n });\n\n return { attachments: nextAttachments, failureReason };\n};\n","import type {\n Channel,\n ChannelQueryOptions,\n QueryChannelAPIResponse,\n StreamChat,\n} from 'stream-chat';\n\n/**\n * prevent from duplicate invocation of channel.watch()\n * when events 'notification.message_new' and 'notification.added_to_channel' arrive at the same time\n */\nconst WATCH_QUERY_IN_PROGRESS_FOR_CHANNEL: Record<\n string,\n Promise<QueryChannelAPIResponse> | undefined\n> = {};\n\ntype GetChannelParams = {\n client: StreamChat;\n channel?: Channel;\n id?: string;\n members?: string[];\n options?: ChannelQueryOptions;\n type?: string;\n};\n/**\n * Calls channel.watch() if it was not already recently called. Waits for watch promise to resolve even if it was invoked previously.\n * @param client\n * @param members\n * @param options\n * @param type\n * @param id\n * @param channel\n */\nexport const getChannel = async ({\n channel,\n client,\n id,\n members,\n options,\n type,\n}: GetChannelParams) => {\n if (!channel && !type) {\n throw new Error('Channel or channel type have to be provided to query a channel.');\n }\n\n // unfortunately typescript is not able to infer that if (!channel && !type) === false, then channel or type has to be truthy\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const theChannel = channel || client.channel(type!, id, { members });\n\n // need to keep as with call to channel.watch the id can be changed from undefined to an actual ID generated server-side\n const originalCid = theChannel?.id\n ? theChannel.cid\n : members && members.length\n ? generateChannelTempCid(theChannel.type, members)\n : undefined;\n\n if (!originalCid) {\n throw new Error(\n 'Channel ID or channel members array have to be provided to query a channel.',\n );\n }\n\n const queryPromise = WATCH_QUERY_IN_PROGRESS_FOR_CHANNEL[originalCid];\n\n if (queryPromise) {\n await queryPromise;\n } else {\n try {\n WATCH_QUERY_IN_PROGRESS_FOR_CHANNEL[originalCid] = theChannel.watch(options);\n await WATCH_QUERY_IN_PROGRESS_FOR_CHANNEL[originalCid];\n } finally {\n delete WATCH_QUERY_IN_PROGRESS_FOR_CHANNEL[originalCid];\n }\n }\n\n return theChannel;\n};\n\n// Channels created without ID need to be referenced by an identifier until the back-end generates the final ID.\nconst generateChannelTempCid = (channelType: string, members?: string[]) => {\n if (!members) return;\n const membersStr = [...members].sort().join(',');\n return `${channelType}:!members-${membersStr}`;\n};\n","import type { Attachment } from 'stream-chat';\nimport * as linkify from 'linkifyjs';\n\nexport const getImageAttachmentConfiguration = (\n attachment: Attachment,\n element: HTMLElement,\n) => {\n let newUrl = undefined;\n\n const urlToTest = attachment.image_url || attachment.thumb_url || '';\n\n if (linkify.test(urlToTest, 'url')) {\n const url = new URL(urlToTest);\n const resizeDimensions = getSizingRestrictions(url, element);\n\n if (resizeDimensions) {\n // Apply 2x for retina displays\n resizeDimensions.height *= 2;\n resizeDimensions.width *= 2;\n addResizingParamsToUrl(resizeDimensions, url);\n }\n newUrl = url.href;\n }\n\n return {\n url: newUrl || '',\n };\n};\n\nexport const getVideoAttachmentConfiguration = (\n attachment: Attachment,\n element: HTMLElement,\n shouldGenerateVideoThumbnail: boolean,\n) => {\n let thumbUrl = undefined;\n if (\n attachment.thumb_url &&\n shouldGenerateVideoThumbnail &&\n linkify.test(attachment.thumb_url, 'url')\n ) {\n const url = new URL(attachment.thumb_url);\n const resizeDimensions = getSizingRestrictions(url, element);\n\n if (resizeDimensions) {\n // Apply 2x for retina displays\n resizeDimensions.height *= 2;\n resizeDimensions.width *= 2;\n addResizingParamsToUrl(resizeDimensions, url);\n }\n thumbUrl = url.href;\n }\n\n return {\n thumbUrl,\n url: attachment.asset_url || '',\n };\n};\n\nconst getSizingRestrictions = (url: URL, htmlElement: HTMLElement) => {\n const urlParams = url.searchParams;\n const originalHeight = Number(urlParams.get('oh')) || 1;\n const originalWidth = Number(urlParams.get('ow')) || 1;\n const cssSizeRestriction = getCSSSizeRestrictions(htmlElement);\n let resizeDimensions: { height: number; width: number } | undefined;\n\n if (\n (cssSizeRestriction.maxHeight || cssSizeRestriction.height) &&\n cssSizeRestriction.maxWidth\n ) {\n resizeDimensions = getResizeDimensions(\n originalHeight,\n originalWidth,\n /* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */\n cssSizeRestriction.maxHeight || cssSizeRestriction.height!,\n cssSizeRestriction.maxWidth,\n );\n } else {\n resizeDimensions = undefined;\n }\n\n return resizeDimensions;\n};\n\nconst getResizeDimensions = (\n originalHeight: number,\n originalWidth: number,\n maxHeight: number,\n maxWidth: number,\n) => ({\n height: Math.round(Math.max(maxHeight, (maxWidth / originalWidth) * originalHeight)),\n width: Math.round(Math.max(maxHeight, (maxWidth / originalHeight) * originalWidth)),\n});\n\nconst getCSSSizeRestrictions = (htmlElement: HTMLElement) => {\n const computedStylesheet = getComputedStyle(htmlElement);\n const height = getValueRepresentationOfCSSProperty(\n computedStylesheet.getPropertyValue('height'),\n );\n const maxHeight = getValueRepresentationOfCSSProperty(\n computedStylesheet.getPropertyValue('max-height'),\n );\n const maxWidth = getValueRepresentationOfCSSProperty(\n computedStylesheet.getPropertyValue('max-width'),\n );\n\n if (!((height || maxHeight) && maxWidth)) {\n console.warn(\n `Invalid value set for height/max-height and/or max-width for HTML element, this can cause scrolling issues inside the message list, more info https://getstream.io/chat/docs/sdk/react/message-components/attachment/#image-and-video-sizing`,\n );\n }\n\n return { height, maxHeight, maxWidth };\n};\n\nconst getValueRepresentationOfCSSProperty = (property: string) => {\n if (!property.endsWith('px')) {\n return undefined;\n }\n const number = parseFloat(property);\n return isNaN(number) ? undefined : number;\n};\n\nconst addResizingParamsToUrl = (\n resizeDimensions: { height: number; width: number },\n url: URL,\n) => {\n url.searchParams.set('h', resizeDimensions.height.toString());\n url.searchParams.set('w', resizeDimensions.width.toString());\n};\n","import type { InternalSearchControllerState } from 'stream-chat';\nimport { useChatContext } from '../../../context';\nimport { useStateStore } from '../../../store';\n\nconst searchControllerStateSelector = (nextValue: InternalSearchControllerState) => ({\n focusedMessage: nextValue.focusedMessage,\n});\n\nexport const useSearchFocusedMessage = () => {\n const { searchController } = useChatContext('Channel');\n const { focusedMessage } = useStateStore(\n searchController._internalState,\n searchControllerStateSelector,\n );\n\n return focusedMessage;\n};\n","import type { ComponentProps, PropsWithChildren } from 'react';\nimport React, {\n useCallback,\n useEffect,\n useLayoutEffect,\n useMemo,\n useReducer,\n useRef,\n useState,\n} from 'react';\nimport clsx from 'clsx';\nimport debounce from 'lodash.debounce';\nimport throttle from 'lodash.throttle';\nimport type {\n ChannelAPIResponse,\n ChannelMemberResponse,\n ChannelQueryOptions,\n ChannelState,\n DeleteMessageOptions,\n Event,\n EventAPIResponse,\n GiphyVersions,\n LocalMessage,\n Message,\n MessageResponse,\n SendMessageAPIResponse,\n SendMessageOptions,\n Channel as StreamChannel,\n StreamChat,\n UpdateMessageOptions,\n} from 'stream-chat';\nimport { localMessageToNewMessagePayload, withoutConcurrency } from 'stream-chat';\n\nimport { initialState, makeChannelReducer } from './channelState';\nimport { useCreateChannelStateContext } from './hooks/useCreateChannelStateContext';\nimport { useCreateTypingContext } from './hooks/useCreateTypingContext';\nimport { useEditMessageHandler } from './hooks/useEditMessageHandler';\nimport { useIsMounted } from './hooks/useIsMounted';\nimport type { OnMentionAction } from './hooks/useMentionsHandlers';\nimport { useMentionsHandlers } from './hooks/useMentionsHandlers';\n\nimport {\n LoadingErrorIndicator as DefaultLoadingErrorIndicator,\n LoadingChannel as DefaultLoadingIndicator,\n} from '../Loading';\nimport { EmptyStateIndicator as DefaultEmptyStateIndicator } from '../EmptyStateIndicator';\nimport { useNotificationApi } from '../Notifications';\n\nimport type { ChannelActionContextValue, MarkReadWrapperOptions } from '../../context';\nimport {\n ChannelActionProvider,\n ChannelStateProvider,\n TypingProvider,\n useChatContext,\n useComponentContext,\n useTranslationContext,\n} from '../../context';\n\nimport { CHANNEL_CONTAINER_ID } from './constants';\nimport {\n DEFAULT_HIGHLIGHT_DURATION,\n DEFAULT_JUMP_TO_PAGE_SIZE,\n DEFAULT_NEXT_CHANNEL_PAGE_SIZE,\n DEFAULT_THREAD_PAGE_SIZE,\n} from '../../constants/limits';\n\nimport { hasMoreMessagesProbably } from '../MessageList';\nimport {\n getChatContainerClass,\n useChannelContainerClasses,\n useImageFlagEmojisOnWindowsClass,\n} from './hooks/useChannelContainerClasses';\nimport {\n adaptMessageSendErrorToErrorFromResponse,\n findInMsgSetByDate,\n findInMsgSetById,\n settlePendingAttachmentUploads,\n} from './utils';\nimport { useThreadContext } from '../Threads';\nimport { getChannel } from '../../utils';\nimport { getChannelConfig } from '../../utils/getChannelConfig';\nimport type {\n ChannelUnreadUiState,\n ImageAttachmentSizeHandler,\n VideoAttachmentSizeHandler,\n} from '../../types/types';\nimport {\n getImageAttachmentConfiguration,\n getVideoAttachmentConfiguration,\n} from '../Attachment/attachment-sizing';\nimport { useSearchFocusedMessage } from '../Search/hooks';\nimport { WithAudioPlayback } from '../AudioPlayback';\n\nexport type ChannelProps = {\n /** Custom handler function that runs when the active channel has unread messages and the app is running on a separate browser tab */\n activeUnreadHandler?: (unread: number, documentTitle: string) => void;\n /** Allows multiple audio players to play the audio at the same time. Disabled by default. */\n allowConcurrentAudioPlayback?: boolean;\n /** The connected and active channel */\n channel?: StreamChannel;\n /**\n * Optional configuration parameters used for the initial channel query.\n * Applied only if the value of channel.initialized is false.\n * If the channel instance has already been initialized (channel has been queried),\n * then the channel query will be skipped and channelQueryOptions will not be applied.\n */\n channelQueryOptions?: ChannelQueryOptions;\n /** Custom action handler to override the default `client.deleteMessage(message.id)` function */\n doDeleteMessageRequest?: (\n message: LocalMessage,\n options?: DeleteMessageOptions,\n ) => Promise<MessageResponse>;\n /** Custom action handler to override the default `channel.markRead` request function (advanced usage only) */\n doMarkReadRequest?: (\n channel: StreamChannel,\n setChannelUnreadUiState?: (state: ChannelUnreadUiState) => void,\n ) => Promise<EventAPIResponse> | void;\n /** Custom action handler to override the default `channel.sendMessage` request function (advanced usage only) */\n doSendMessageRequest?: (\n channel: StreamChannel,\n message: Message,\n options?: SendMessageOptions,\n ) => ReturnType<StreamChannel['sendMessage']> | void;\n /** Custom action handler to override the default `client.updateMessage` request function (advanced usage only) */\n doUpdateMessageRequest?: (\n cid: string,\n updatedMessage: LocalMessage | MessageResponse,\n options?: UpdateMessageOptions,\n ) => ReturnType<StreamChat['updateMessage']>;\n /** Custom UI component to be shown if no active channel is set, defaults to the message empty state indicator. Pass `null` to suppress rendering. */\n EmptyPlaceholder?: React.ReactElement | null;\n /** The giphy version to render - check the keys of the [Image Object](https://developers.giphy.com/docs/api/schema#image-object) for possible values. Uses 'fixed_height' by default */\n giphyVersion?: GiphyVersions;\n /** A custom function to provide size configuration for image attachments */\n imageAttachmentSizeHandler?: ImageAttachmentSizeHandler;\n /**\n * Allows to prevent triggering the channel.watch() call when mounting the component.\n * That means that no channel data from the back-end will be received neither channel WS events will be delivered to the client.\n * Preventing to initialize the channel on mount allows us to postpone the channel creation to a later point in time.\n */\n initializeOnMount?: boolean;\n /** Configuration parameter to mark the active channel as read when mounted (opened). By default, the channel is marked read on mount. */\n markReadOnMount?: boolean;\n /** Custom action handler function to run on click of an @mention in a message */\n onMentionsClick?: OnMentionAction;\n /** Custom action handler function to run on hover of an @mention in a message */\n onMentionsHover?: OnMentionAction;\n /** You can turn on/off thumbnail generation for video attachments */\n shouldGenerateVideoThumbnail?: boolean;\n /** If true, skips the message data string comparison used to memoize the current channel messages (helpful for channels with 1000s of messages) */\n skipMessageDataMemoization?: boolean;\n /** A custom function to provide size configuration for video attachments */\n videoAttachmentSizeHandler?: VideoAttachmentSizeHandler;\n};\n\nconst ChannelContainer = ({\n children,\n className: additionalClassName,\n ...props\n}: PropsWithChildren<ComponentProps<'div'>>) => {\n const { customClasses, theme } = useChatContext('Channel');\n const { channelClass, chatClass } = useChannelContainerClasses({\n customClasses,\n });\n const className = clsx(chatClass, theme, channelClass, additionalClassName);\n return (\n <div id={CHANNEL_CONTAINER_ID} {...props} className={className}>\n {children}\n </div>\n );\n};\n\nconst UnMemoizedChannel = (props: PropsWithChildren<ChannelProps>) => {\n const { channel: propsChannel, EmptyPlaceholder } = props;\n const {\n EmptyStateIndicator = DefaultEmptyStateIndicator,\n LoadingErrorIndicator,\n LoadingIndicator = DefaultLoadingIndicator,\n } = useComponentContext('Channel');\n\n const { channel: contextChannel, channelsQueryState } = useChatContext('Channel');\n\n const channel = propsChannel || contextChannel;\n const emptyPlaceholder =\n 'EmptyPlaceholder' in props\n ? EmptyPlaceholder\n : EmptyStateIndicator && <EmptyStateIndicator listType='message' />;\n\n if (channelsQueryState.queryInProgress === 'reload' && LoadingIndicator) {\n return (\n <ChannelContainer>\n <LoadingIndicator />\n </ChannelContainer>\n );\n }\n\n if (channelsQueryState.error && !channel && LoadingErrorIndicator) {\n return (\n <ChannelContainer>\n <LoadingErrorIndicator error={channelsQueryState.error} />\n </ChannelContainer>\n );\n }\n\n if (channelsQueryState.error && !channel) {\n return <ChannelContainer />;\n }\n\n if (!channel?.cid) {\n return <ChannelContainer>{emptyPlaceholder}</ChannelContainer>;\n }\n\n return <ChannelInner {...props} channel={channel} key={channel.cid} />;\n};\n\nconst ChannelInner = (\n props: PropsWithChildren<\n ChannelProps & {\n channel: StreamChannel;\n key: string;\n }\n >,\n) => {\n const {\n activeUnreadHandler,\n allowConcurrentAudioPlayback,\n channel,\n channelQueryOptions,\n children,\n doDeleteMessageRequest,\n doMarkReadRequest,\n doSendMessageRequest,\n doUpdateMessageRequest,\n initializeOnMount = true,\n markReadOnMount = true,\n onMentionsClick,\n onMentionsHover,\n skipMessageDataMemoization,\n } = props;\n const {\n LoadingErrorIndicator = DefaultLoadingErrorIndicator,\n LoadingIndicator = DefaultLoadingIndicator,\n } = useComponentContext();\n\n const { client, customClasses, latestMessageDatesByChannels, mutes, searchController } =\n useChatContext();\n const { addNotification } = useNotificationApi();\n const { t } = useTranslationContext('Channel');\n const chatContainerClass = getChatContainerClass(customClasses?.chatContainer);\n const windowsEmojiClass = useImageFlagEmojisOnWindowsClass();\n const thread = useThreadContext();\n\n const [channelConfig, setChannelConfig] = useState(() => getChannelConfig(channel));\n\n const [channelUnreadUiState, _setChannelUnreadUiState] =\n useState<ChannelUnreadUiState>();\n\n const channelReducer = useMemo(() => makeChannelReducer(), []);\n\n const [state, dispatch] = useReducer(\n channelReducer,\n // channel.initialized === false if client.channel().query() was not called, e.g. ChannelList is not used\n // => Channel will call channel.watch() in useLayoutEffect => state.loading is used to signal the watch() call state\n {\n ...initialState,\n hasMore: channel.state.messagePagination.hasPrev,\n loading: !channel.initialized,\n messages: channel.state.messages,\n },\n );\n const jumpToMessageFromSearch = useSearchFocusedMessage();\n const isMounted = useIsMounted();\n\n const originalTitle = useRef('');\n const lastRead = useRef<Date | undefined>(undefined);\n const online = useRef(true);\n\n const clearHighlightedMessageTimeoutId = useRef<ReturnType<typeof setTimeout> | null>(\n null,\n );\n\n const channelCapabilitiesArray = channel.data?.own_capabilities as string[];\n\n const throttledCopyStateFromChannel = useMemo(\n () =>\n throttle(() => dispatch({ channel, type: 'copyStateFromChannelOnEvent' }), 500, {\n leading: true,\n trailing: true,\n }),\n [channel],\n );\n\n const setChannelUnreadUiState = useMemo(\n () =>\n throttle(_setChannelUnreadUiState, 200, {\n leading: true,\n trailing: false,\n }),\n [],\n );\n\n const markRead = useMemo(\n () =>\n throttle(\n async (options?: MarkReadWrapperOptions) => {\n const { updateChannelUiUnreadState = true } = options ?? {};\n if (channel.disconnected) return;\n\n if (!channelConfig?.read_events && client.options.isLocalUnreadCountEnabled) {\n const event = channel.markReadLocally();\n\n if (updateChannelUiUnreadState && event) {\n lastRead.current = new Date();\n _setChannelUnreadUiState({\n last_read: lastRead.current,\n last_read_message_id: event.last_read_message_id,\n unread_messages: 0,\n });\n }\n } else if (channelConfig?.read_events) {\n lastRead.current = new Date();\n\n if (doMarkReadRequest) {\n doMarkReadRequest(\n channel,\n updateChannelUiUnreadState ? setChannelUnreadUiState : undefined,\n );\n } else {\n const markReadResponse = await channel.markRead();\n // markReadResponse.event can be null in case of a user that is not a member of a channel being marked read\n // in that case event is null and we should not set unread UI\n if (updateChannelUiUnreadState && markReadResponse?.event) {\n _setChannelUnreadUiState({\n last_read: lastRead.current,\n last_read_message_id: markReadResponse.event.last_read_message_id,\n unread_messages: 0,\n });\n }\n }\n }\n\n if (activeUnreadHandler) {\n activeUnreadHandler(0, originalTitle.current);\n } else if (originalTitle.current) {\n document.title = originalTitle.current;\n }\n },\n 500,\n { leading: true, trailing: false },\n ),\n [\n activeUnreadHandler,\n channel,\n channelConfig,\n client,\n doMarkReadRequest,\n setChannelUnreadUiState,\n ],\n );\n\n const handleEvent = async (event: Event) => {\n // client-level subscriptions keep firing after disconnect, and reading from\n // or querying a disconnected channel throws\n if (channel.disconnected) return;\n\n if (event.message) {\n dispatch({\n channel,\n message: event.message,\n type: 'updateThreadOnEvent',\n });\n }\n\n // ignore the event if it is not targeted at the current channel.\n // Event targeted at this channel or globally targeted event should lead to state refresh\n if (event.type === 'user.messages.deleted' && event.cid && event.cid !== channel.cid)\n return;\n\n if (event.type === 'user.watching.start' || event.type === 'user.watching.stop')\n return;\n\n if (event.type === 'typing.start' || event.type === 'typing.stop') {\n return dispatch({ channel, type: 'setTyping' });\n }\n\n if (event.type === 'connection.changed' && typeof event.online === 'boolean') {\n online.current = event.online;\n }\n\n if (event.type === 'message.new') {\n const mainChannelUpdated =\n !event.message?.parent_id || event.message?.show_in_channel;\n\n if (mainChannelUpdated) {\n if (\n document.hidden &&\n (channelConfig?.read_events || client.options.isLocalUnreadCountEnabled) &&\n !channel.muteStatus().muted\n ) {\n const unread = channel.countUnread(lastRead.current);\n\n if (activeUnreadHandler) {\n activeUnreadHandler(unread, originalTitle.current);\n } else {\n document.title = `(${unread}) ${originalTitle.current}`;\n }\n }\n }\n\n if (\n event.message?.user?.id === client.userID &&\n event?.message?.created_at &&\n event?.message?.cid\n ) {\n const messageDate = new Date(event.message.created_at);\n const cid = event.message.cid;\n\n if (\n !latestMessageDatesByChannels[cid] ||\n latestMessageDatesByChannels[cid].getTime() < messageDate.getTime()\n ) {\n latestMessageDatesByChannels[cid] = messageDate;\n }\n }\n }\n\n if (event.type === 'user.deleted') {\n const oldestID = channel.state?.messages?.[0]?.id;\n\n /**\n * As the channel state is not normalized we re-fetch the channel data. Thus, we avoid having to search for user references in the channel state.\n */\n // FIXME: we should use channelQueryOptions if they are available\n await channel.query({\n messages: { id_lt: oldestID, limit: DEFAULT_NEXT_CHANNEL_PAGE_SIZE },\n watchers: { limit: DEFAULT_NEXT_CHANNEL_PAGE_SIZE },\n });\n }\n\n if (event.type === 'message.read_locally') {\n return;\n }\n\n if (event.type === 'notification.mark_unread')\n _setChannelUnreadUiState((prev) => {\n if (!(event.last_read_at && event.user)) return prev;\n return {\n first_unread_message_id: event.first_unread_message_id,\n last_read: new Date(event.last_read_at),\n last_read_message_id: event.last_read_message_id,\n unread_messages: event.unread_messages ?? 0,\n };\n });\n\n if (event.type === 'channel.truncated' && event.cid === channel.cid) {\n _setChannelUnreadUiState(undefined);\n }\n\n throttledCopyStateFromChannel();\n };\n\n // useLayoutEffect here to prevent spinner. Use Suspense when it is available in stable release\n useLayoutEffect(() => {\n let errored = false;\n let done = false;\n\n (async () => {\n if (!channel.initialized && initializeOnMount) {\n try {\n // if active channel has been set without id, we will create a temporary channel id from its member IDs\n // to keep track of the /query request in progress. This is the same approach of generating temporary id\n // that the JS client uses to keep track of channel in client.activeChannels\n const members: string[] = [];\n if (!channel.id && channel.data?.members) {\n for (const member of channel.data.members) {\n let userId: string | undefined;\n if (typeof member === 'string') {\n userId = member;\n } else if (typeof member === 'object') {\n const { user, user_id } = member as ChannelMemberResponse;\n userId = user_id || user?.id;\n }\n if (userId) {\n members.push(userId);\n }\n }\n }\n await getChannel({ channel, client, members, options: channelQueryOptions });\n const config = channel.getConfig();\n setChannelConfig(config);\n } catch (e) {\n dispatch({ error: e as Error, type: 'setError' });\n errored = true;\n }\n }\n\n done = true;\n originalTitle.current = document.title;\n\n if (!errored) {\n dispatch({\n channel,\n hasMore: channel.state.messagePagination.hasPrev,\n type: 'initStateFromChannel',\n });\n\n if (client.user?.id && channel.state.read[client.user.id]) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { user, ...ownReadState } = channel.state.read[client.user.id];\n _setChannelUnreadUiState((existingState) => {\n // only set the initial state here, do not override existing\n if (existingState) return existingState;\n return ownReadState;\n });\n }\n /**\n * TODO: maybe pass last_read to the countUnread method to get proper value\n * combined with channel.countUnread adjustment (_countMessageAsUnread)\n * to allow counting own messages too\n *\n * const lastRead = channel.state.read[client.userID as string].last_read;\n */\n if (channel.countUnread() > 0 && markReadOnMount)\n markRead({ updateChannelUiUnreadState: false });\n // The more complex sync logic is done in Chat\n client.on('connection.changed', handleEvent);\n client.on('connection.recovered', handleEvent);\n client.on('user.updated', handleEvent);\n client.on('user.deleted', handleEvent);\n client.on('user.messages.deleted', handleEvent);\n channel.on(handleEvent);\n }\n })();\n\n return () => {\n if (errored || !done) return;\n channel?.off(handleEvent);\n client.off('connection.changed', handleEvent);\n client.off('connection.recovered', handleEvent);\n client.off('user.deleted', handleEvent);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n channel.cid,\n channelQueryOptions,\n doMarkReadRequest,\n channelConfig?.read_events,\n initializeOnMount,\n ]);\n\n useEffect(() => {\n if (!state.thread) return;\n\n const message = state.messages?.find((m) => m.id === state.thread?.id);\n\n if (message) dispatch({ message, type: 'setThread' });\n }, [state.messages, state.thread]);\n\n const handleHighlightedMessageChange = useCallback(\n ({\n highlightDuration,\n highlightedMessageId,\n }: {\n highlightedMessageId: string;\n highlightDuration?: number;\n }) => {\n dispatch({\n channel,\n highlightedMessageId,\n type: 'jumpToMessageFinished',\n });\n if (clearHighlightedMessageTimeoutId.current) {\n clearTimeout(clearHighlightedMessageTimeoutId.current);\n }\n clearHighlightedMessageTimeoutId.current = setTimeout(() => {\n if (searchController._internalState.getLatestValue().focusedMessage) {\n searchController._internalState.partialNext({ focusedMessage: undefined });\n }\n clearHighlightedMessageTimeoutId.current = null;\n dispatch({ type: 'clearHighlightedMessage' });\n }, highlightDuration ?? DEFAULT_HIGHLIGHT_DURATION);\n },\n [channel, searchController],\n );\n\n useEffect(() => {\n if (!jumpToMessageFromSearch?.id) return;\n handleHighlightedMessageChange({ highlightedMessageId: jumpToMessageFromSearch.id });\n }, [jumpToMessageFromSearch, handleHighlightedMessageChange]);\n\n /** MESSAGE */\n const notifyJumpToFirstUnreadError = useCallback(() => {\n addNotification({\n context: { feature: 'jumpToFirstUnread' },\n emitter: 'Channel',\n message: t('Failed to jump to the first unread message'),\n severity: 'error',\n targetPanels: ['channel'],\n type: 'channel:jumpToFirstUnread:failed',\n });\n }, [addNotification, t]);\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const loadMoreFinished = useCallback(\n debounce(\n (hasMore: boolean, messages: ChannelState['messages']) => {\n if (!isMounted.current) return;\n dispatch({ hasMore, messages, type: 'loadMoreFinished' });\n },\n 2000,\n { leading: true, trailing: true },\n ),\n [],\n );\n\n const finishLoadMore = useCallback(\n (hasMore: boolean, messages: ChannelState['messages']) => {\n if (!isMounted.current) return;\n dispatch({ hasMore, messages, type: 'loadMoreFinished' });\n },\n [isMounted],\n );\n\n const loadMore = async (limit = DEFAULT_NEXT_CHANNEL_PAGE_SIZE) => {\n if (\n channel.disconnected ||\n !online.current ||\n !window.navigator.onLine ||\n !channel.state.messagePagination.hasPrev\n )\n return 0;\n\n // prevent duplicate loading events...\n const oldestMessage = state?.messages?.[0];\n\n if (\n state.loadingMore ||\n state.loadingMoreNewer ||\n oldestMessage?.status !== 'received'\n ) {\n return 0;\n }\n\n dispatch({ loadingMore: true, type: 'setLoadingMore' });\n\n const oldestID = oldestMessage?.id;\n const perPage = limit;\n let queryResponse: ChannelAPIResponse;\n\n try {\n queryResponse = await channel.query({\n messages: { id_lt: oldestID, limit: perPage },\n watchers: { limit: perPage },\n });\n } catch (e) {\n console.warn('message pagination request failed with error', e);\n dispatch({ loadingMore: false, type: 'setLoadingMore' });\n return 0;\n }\n\n loadMoreFinished.cancel();\n finishLoadMore(channel.state.messagePagination.hasPrev, channel.state.messages);\n\n return queryResponse.messages.length;\n };\n\n const loadMoreNewer = async (limit = DEFAULT_NEXT_CHANNEL_PAGE_SIZE) => {\n if (\n channel.disconnected ||\n !online.current ||\n !window.navigator.onLine ||\n !channel.state.messagePagination.hasNext\n )\n return 0;\n\n const newestMessage = state?.messages?.[state?.messages?.length - 1];\n if (state.loadingMore || state.loadingMoreNewer) return 0;\n\n dispatch({ loadingMoreNewer: true, type: 'setLoadingMoreNewer' });\n\n const newestId = newestMessage?.id;\n const perPage = limit;\n let queryResponse: ChannelAPIResponse;\n\n try {\n queryResponse = await channel.query({\n messages: { id_gt: newestId, limit: perPage },\n watchers: { limit: perPage },\n });\n } catch (e) {\n console.warn('message pagination request failed with error', e);\n dispatch({ loadingMoreNewer: false, type: 'setLoadingMoreNewer' });\n return 0;\n }\n\n dispatch({\n hasMoreNewer: channel.state.messagePagination.hasNext,\n messages: channel.state.messages,\n type: 'loadMoreNewerFinished',\n });\n return queryResponse.messages.length;\n };\n\n const jumpToMessage: ChannelActionContextValue['jumpToMessage'] = useCallback(\n async (\n messageId,\n messageLimit = DEFAULT_JUMP_TO_PAGE_SIZE,\n highlightDuration = DEFAULT_HIGHLIGHT_DURATION,\n ) => {\n // Keep quoted-message jumps out of the older-page pagination path.\n dispatch({\n loadingMoreForJumpToChannelMessage: true,\n type: 'setLoadingMoreForJumpToChannelMessage',\n });\n loadMoreFinished.cancel();\n try {\n await channel.state.loadMessageIntoState(messageId, undefined, messageLimit);\n\n handleHighlightedMessageChange({\n highlightDuration,\n highlightedMessageId: messageId,\n });\n } catch (error) {\n dispatch({\n loadingMoreForJumpToChannelMessage: false,\n type: 'setLoadingMoreForJumpToChannelMessage',\n });\n throw error;\n }\n },\n [channel, handleHighlightedMessageChange, loadMoreFinished],\n );\n\n const jumpToLatestMessage: ChannelActionContextValue['jumpToLatestMessage'] =\n useCallback(async () => {\n loadMoreFinished.cancel();\n await channel.state.loadMessageIntoState('latest');\n dispatch({\n hasMore: channel.state.messagePagination.hasPrev,\n hasMoreNewer: channel.state.messagePagination.hasNext,\n messages: channel.state.messages,\n type: 'jumpToLatestMessageFinished',\n });\n }, [channel, loadMoreFinished]);\n\n const jumpToFirstUnreadMessage: ChannelActionContextValue['jumpToFirstUnreadMessage'] =\n useCallback(\n async (\n queryMessageLimit = DEFAULT_JUMP_TO_PAGE_SIZE,\n highlightDuration = DEFAULT_HIGHLIGHT_DURATION,\n ) => {\n if (!channelUnreadUiState?.unread_messages) return;\n let lastReadMessageId = channelUnreadUiState?.last_read_message_id;\n let firstUnreadMessageId = channelUnreadUiState?.first_unread_message_id;\n let isInCurrentMessageSet = false;\n\n if (firstUnreadMessageId) {\n const result = findInMsgSetById(firstUnreadMessageId, channel.state.messages);\n isInCurrentMessageSet = result.index !== -1;\n } else if (lastReadMessageId) {\n const result = findInMsgSetById(lastReadMessageId, channel.state.messages);\n isInCurrentMessageSet = !!result.target;\n firstUnreadMessageId =\n result.index > -1 ? channel.state.messages[result.index + 1]?.id : undefined;\n } else {\n const lastReadTimestamp = channelUnreadUiState.last_read.getTime();\n const { index: lastReadMessageIndex, target: lastReadMessage } =\n findInMsgSetByDate(\n channelUnreadUiState.last_read,\n channel.state.messages,\n true,\n );\n\n if (lastReadMessage) {\n firstUnreadMessageId = channel.state.messages[lastReadMessageIndex + 1]?.id;\n isInCurrentMessageSet = !!firstUnreadMessageId;\n lastReadMessageId = lastReadMessage.id;\n } else {\n dispatch({ loadingMore: true, type: 'setLoadingMore' });\n let messages;\n try {\n messages = (\n await channel.query(\n {\n messages: {\n created_at_around: channelUnreadUiState.last_read.toISOString(),\n limit: queryMessageLimit,\n },\n },\n 'new',\n )\n ).messages;\n } catch (e) {\n notifyJumpToFirstUnreadError();\n finishLoadMore(\n channel.state.messagePagination.hasPrev,\n channel.state.messages,\n );\n return;\n }\n\n const firstMessageWithCreationDate = messages.find((msg) => msg.created_at);\n if (!firstMessageWithCreationDate) {\n notifyJumpToFirstUnreadError();\n finishLoadMore(\n channel.state.messagePagination.hasPrev,\n channel.state.messages,\n );\n return;\n }\n const firstMessageTimestamp = new Date(\n firstMessageWithCreationDate.created_at as string,\n ).getTime();\n if (lastReadTimestamp < firstMessageTimestamp) {\n // whole channel is unread\n firstUnreadMessageId = firstMessageWithCreationDate.id;\n } else {\n const result = findInMsgSetByDate(channelUnreadUiState.last_read, messages);\n lastReadMessageId = result.target?.id;\n }\n finishLoadMore(\n channel.state.messagePagination.hasPrev,\n channel.state.messages,\n );\n }\n }\n\n if (!firstUnreadMessageId && !lastReadMessageId) {\n notifyJumpToFirstUnreadError();\n return;\n }\n\n if (!isInCurrentMessageSet) {\n dispatch({ loadingMore: true, type: 'setLoadingMore' });\n try {\n const targetId = (firstUnreadMessageId ?? lastReadMessageId) as string;\n await channel.state.loadMessageIntoState(\n targetId,\n undefined,\n queryMessageLimit,\n );\n /**\n * if the index of the last read message on the page is beyond the half of the page,\n * we have arrived to the oldest page of the channel\n */\n const indexOfTarget = channel.state.messages.findIndex(\n (message) => message.id === targetId,\n ) as number;\n finishLoadMore(\n channel.state.messagePagination.hasPrev,\n channel.state.messages,\n );\n firstUnreadMessageId =\n firstUnreadMessageId ?? channel.state.messages[indexOfTarget + 1]?.id;\n } catch (e) {\n notifyJumpToFirstUnreadError();\n finishLoadMore(\n channel.state.messagePagination.hasPrev,\n channel.state.messages,\n );\n return;\n }\n }\n\n if (!firstUnreadMessageId) {\n notifyJumpToFirstUnreadError();\n return;\n }\n if (!channelUnreadUiState.first_unread_message_id)\n _setChannelUnreadUiState({\n ...channelUnreadUiState,\n first_unread_message_id: firstUnreadMessageId,\n last_read_message_id: lastReadMessageId,\n });\n handleHighlightedMessageChange({\n highlightDuration,\n highlightedMessageId: firstUnreadMessageId,\n });\n },\n [\n channel,\n finishLoadMore,\n handleHighlightedMessageChange,\n notifyJumpToFirstUnreadError,\n channelUnreadUiState,\n ],\n );\n\n const deleteMessage = useCallback(\n async (\n message: LocalMessage,\n options?: DeleteMessageOptions,\n ): Promise<MessageResponse> => {\n if (!message?.id) {\n throw new Error('Cannot delete a message - missing message ID.');\n }\n let deletedMessage;\n if (doDeleteMessageRequest) {\n deletedMessage = await doDeleteMessageRequest(message, options);\n } else {\n const result = await client.deleteMessage(message.id, options);\n deletedMessage = result.message;\n }\n\n return deletedMessage;\n },\n [client, doDeleteMessageRequest],\n );\n\n const updateMessage = (updatedMessage: MessageResponse | LocalMessage) => {\n // add the message to the local channel state\n channel.state.addMessageSorted(updatedMessage, true);\n\n dispatch({\n channel,\n parentId: state.thread && updatedMessage.parent_id,\n type: 'copyMessagesFromChannel',\n });\n };\n\n const sendMessageRequest = async ({\n localMessage,\n message,\n options,\n }: {\n localMessage: LocalMessage;\n message: Message;\n options?: SendMessageOptions;\n }) => {\n try {\n // With a composition middleware that allows pending uploads, a message can reach this\n // point while its attachments are still uploading. Settling them here rather than in the\n // composer's submit handler means `retrySendMessage` gets the same treatment, and an\n // attachment that already has a URL is skipped — so a retry only re-uploads what failed.\n const { attachments: settledAttachments, failureReason } =\n await settlePendingAttachmentUploads({\n attachments: localMessage.attachments ?? [],\n channelCid: channel.cid,\n client,\n });\n\n if (failureReason) {\n // One failed upload fails the whole message: the send was already committed\n // optimistically, so there is nobody left to ask whether to proceed without that\n // attachment, and dropping it silently would alter what the user sent. Nothing is sent.\n // `AttachmentManager` has already raised the per-upload error notification.\n const failedMessage: LocalMessage = {\n ...localMessage,\n attachments: settledAttachments,\n error: adaptMessageSendErrorToErrorFromResponse(failureReason),\n status: 'failed',\n };\n updateMessage(failedMessage);\n thread?.upsertReplyLocally({ message: failedMessage });\n return;\n }\n\n // `settledAttachments` is the same array unless something was uploaded just now, in which\n // case the payload has to be rebuilt from it: the composition middleware left\n // `message.attachments` holding only the attachments that already had a URL.\n const messageToSend =\n settledAttachments === localMessage.attachments\n ? message\n : { ...message, attachments: settledAttachments };\n\n let messageResponse: void | SendMessageAPIResponse;\n\n if (doSendMessageRequest) {\n messageResponse = await doSendMessageRequest(channel, messageToSend, options);\n } else {\n messageResponse = await channel.sendMessage(messageToSend, options);\n }\n\n let existingMessage: LocalMessage | undefined = undefined;\n for (let i = channel.state.messages.length - 1; i >= 0; i--) {\n const msg = channel.state.messages[i];\n if (msg.id && msg.id === message.id) {\n existingMessage = msg;\n break;\n }\n }\n\n const responseTimestamp = new Date(\n messageResponse?.message?.updated_at || 0,\n ).getTime();\n const existingMessageTimestamp = existingMessage?.updated_at?.getTime() || 0;\n const responseIsTheNewest = responseTimestamp > existingMessageTimestamp;\n\n // Replace the message payload after send is completed\n // We need to check for the newest message payload, because on slow network, the response can arrive later than WS events message.new, message.updated.\n // Always override existing message in status \"sending\"\n if (\n messageResponse?.message &&\n (responseIsTheNewest || existingMessage?.status === 'sending')\n ) {\n updateMessage({\n ...messageResponse.message,\n status: 'received',\n });\n }\n } catch (error) {\n const parsedError = adaptMessageSendErrorToErrorFromResponse(error);\n\n // Handle the case where the message already exists\n // (typically, when retrying to send a message).\n // If the message already exists, we can assume it was sent successfully,\n // so we update the message status to \"received\".\n // Right now, the only way to check this error is by checking\n // the combination of the error code and the error description,\n // since there is no special error code for duplicate messages.\n if (\n parsedError.code === 4 &&\n error instanceof Error &&\n error.message.includes('already exists')\n ) {\n updateMessage({\n ...localMessage,\n status: 'received',\n });\n } else {\n updateMessage({\n ...localMessage,\n error: parsedError,\n status: 'failed',\n });\n\n thread?.upsertReplyLocally({\n message: {\n ...localMessage,\n error: parsedError,\n status: 'failed',\n },\n });\n }\n }\n };\n\n /**\n * Sends are serialised per channel while a composition middleware declaring\n * `allowsPendingUploads` is installed. Without it a text-only message would reach the server\n * while an earlier message was still uploading, and since `created_at` is stamped when the\n * request arrives, the channel would end up in a different order than the user watched happen.\n * `withoutConcurrency` lets a failed send through without blocking the ones behind it.\n *\n * Read off the channel's composer, which is what the composer setup function configures — so\n * whoever installs the middleware gets the matching send path with nothing else to switch on.\n */\n const doSendMessage = (params: {\n localMessage: LocalMessage;\n message: Message;\n options?: SendMessageOptions;\n }) =>\n channel.messageComposer.allowsPendingUploads\n ? withoutConcurrency(`stream-chat-react/send-message/${channel.cid}`, () =>\n sendMessageRequest(params),\n )\n : sendMessageRequest(params);\n\n const sendMessage = async ({\n localMessage,\n message,\n options,\n }: {\n localMessage: LocalMessage;\n message: Message;\n options?: SendMessageOptions;\n }) => {\n channel.state.filterErrorMessages();\n\n thread?.upsertReplyLocally({\n message: localMessage,\n });\n\n updateMessage(localMessage);\n\n await doSendMessage({ localMessage, message, options });\n };\n\n const retrySendMessage = async (localMessage: LocalMessage) => {\n /**\n * If type is not checked, and we for example send message.type === 'error',\n * then request fails with error: \"message.type must be one of ['' regular system]\".\n * For now, we re-send any other type to prevent breaking behavior.\n */\n\n const type = localMessage.type === 'error' ? 'regular' : localMessage.type;\n updateMessage({\n ...localMessage,\n error: undefined,\n status: 'sending',\n type,\n });\n\n await doSendMessage({\n localMessage,\n message: localMessageToNewMessagePayload({ ...localMessage, type }),\n });\n };\n\n const removeMessage = (message: LocalMessage) => {\n channel.state.removeMessage(message);\n\n dispatch({\n channel,\n parentId: state.thread && message.parent_id,\n type: 'copyMessagesFromChannel',\n });\n };\n\n /** THREAD */\n\n const openThread = (message: LocalMessage, event?: React.BaseSyntheticEvent) => {\n event?.preventDefault();\n dispatch({ channel, message, type: 'openThread' });\n };\n\n const closeThread = (event?: React.BaseSyntheticEvent) => {\n event?.preventDefault();\n dispatch({ type: 'closeThread' });\n };\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const loadMoreThreadFinished = useCallback(\n debounce(\n (\n threadHasMore: boolean,\n threadMessages: Array<ReturnType<ChannelState['formatMessage']>>,\n ) => {\n dispatch({\n threadHasMore,\n threadMessages,\n type: 'loadMoreThreadFinished',\n });\n },\n 2000,\n { leading: true, trailing: true },\n ),\n [],\n );\n\n const loadMoreThread = async (limit: number = DEFAULT_THREAD_PAGE_SIZE) => {\n // FIXME: should prevent loading more, if state.thread.reply_count === channel.state.threads[parentID].length\n if (state.threadLoadingMore || !state.thread || !state.threadHasMore) return;\n\n dispatch({ type: 'startLoadingThread' });\n const parentId = state.thread.id;\n\n if (!parentId) {\n return dispatch({ type: 'closeThread' });\n }\n\n const oldMessages = channel.state.threads[parentId] || [];\n const oldestMessageId = oldMessages[0]?.id;\n\n try {\n const queryResponse = await channel.getReplies(parentId, {\n id_lt: oldestMessageId,\n limit,\n });\n\n const threadHasMoreMessages = hasMoreMessagesProbably(\n queryResponse.messages.length,\n limit,\n );\n const newThreadMessages = channel.state.threads[parentId] || [];\n\n // next set loadingMore to false so we can start asking for more data\n loadMoreThreadFinished(threadHasMoreMessages, newThreadMessages);\n } catch (e) {\n loadMoreThreadFinished(false, oldMessages);\n }\n };\n\n const onMentionsHoverOrClick = useMentionsHandlers(onMentionsHover, onMentionsClick);\n\n const editMessage = useEditMessageHandler(doUpdateMessageRequest);\n\n const { typing, ...restState } = state;\n\n const channelStateContextValue = useCreateChannelStateContext({\n ...restState,\n channel,\n channelCapabilitiesArray,\n channelConfig,\n channelUnreadUiState,\n giphyVersion: props.giphyVersion || 'fixed_height',\n imageAttachmentSizeHandler:\n props.imageAttachmentSizeHandler || getImageAttachmentConfiguration,\n mutes,\n notifications: [],\n shouldGenerateVideoThumbnail: props.shouldGenerateVideoThumbnail ?? true,\n videoAttachmentSizeHandler:\n props.videoAttachmentSizeHandler || getVideoAttachmentConfiguration,\n watcher_count: state.watcherCount,\n });\n\n const channelActionContextValue: ChannelActionContextValue = useMemo(\n () => ({\n closeThread,\n deleteMessage,\n dispatch,\n editMessage,\n jumpToFirstUnreadMessage,\n jumpToLatestMessage,\n jumpToMessage,\n loadMore,\n loadMoreNewer,\n loadMoreThread,\n markRead,\n onMentionsClick: onMentionsHoverOrClick,\n onMentionsHover: onMentionsHoverOrClick,\n openThread,\n removeMessage,\n retrySendMessage,\n sendMessage,\n setChannelUnreadUiState,\n skipMessageDataMemoization,\n updateMessage,\n }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n channel.cid,\n deleteMessage,\n loadMore,\n loadMoreNewer,\n markRead,\n jumpToFirstUnreadMessage,\n jumpToMessage,\n jumpToLatestMessage,\n setChannelUnreadUiState,\n ],\n );\n\n const typingContextValue = useCreateTypingContext({\n typing,\n });\n\n if (state.error) {\n return (\n <ChannelContainer>\n <LoadingErrorIndicator error={state.error} />\n </ChannelContainer>\n );\n }\n\n if (state.loading) {\n return (\n <ChannelContainer>\n <LoadingIndicator />\n </ChannelContainer>\n );\n }\n\n if (!channel.watch) {\n return (\n <ChannelContainer>\n <div>{t('Channel Missing')}</div>\n </ChannelContainer>\n );\n }\n\n return (\n <ChannelContainer className={windowsEmojiClass}>\n <ChannelStateProvider value={channelStateContextValue}>\n <ChannelActionProvider value={channelActionContextValue}>\n <TypingProvider value={typingContextValue}>\n <WithAudioPlayback allowConcurrentPlayback={allowConcurrentAudioPlayback}>\n <div className={clsx(chatContainerClass)}>{children}</div>\n </WithAudioPlayback>\n </TypingProvider>\n </ChannelActionProvider>\n </ChannelStateProvider>\n </ChannelContainer>\n );\n};\n\n/**\n * A wrapper component that provides channel data and renders children.\n * The Channel component provides the following contexts:\n * - [ChannelStateContext](https://getstream.io/chat/docs/sdk/react/contexts/channel_state_context/)\n * - [ChannelActionContext](https://getstream.io/chat/docs/sdk/react/contexts/channel_action_context/)\n * - [ComponentContext](https://getstream.io/chat/docs/sdk/react/contexts/component_context/)\n * - [TypingContext](https://getstream.io/chat/docs/sdk/react/contexts/typing_context/)\n */\nexport const Channel = React.memo(UnMemoizedChannel) as typeof UnMemoizedChannel;\n","import React, { createContext, useContext } from 'react';\n\nimport { Channel } from '../Channel';\n\nimport type { PropsWithChildren } from 'react';\nimport type { Thread } from 'stream-chat';\n\nexport type ThreadContextValue = Thread | undefined;\n\nexport const ThreadContext = createContext<ThreadContextValue>(undefined);\n\nexport const useThreadContext = () => useContext(ThreadContext);\n\nexport const ThreadProvider = ({\n children,\n thread,\n}: PropsWithChildren<{ thread?: Thread }>) => (\n <ThreadContext.Provider value={thread}>\n <Channel channel={thread?.channel}>{children}</Channel>\n </ThreadContext.Provider>\n);\n","import clsx from 'clsx';\nimport React from 'react';\nimport type { PropsWithChildren } from 'react';\n\nexport const UnreadCountBadge = ({\n children,\n count,\n position,\n}: PropsWithChildren<{\n count: number;\n position?: 'top-right' | 'bottom-right' | 'bottom-left' | 'top-left';\n}>) => (\n // The wrapper stays in the a11y tree so arbitrary `children` remain exposed. Only the numeric\n // badge is hidden: it duplicates a count the consumer must already convey via an accessible name\n // (e.g. the threads selector button's aria-label includes the unread count), so exposing it would\n // announce the number twice.\n <div className='str-chat__unread-count-badge-container'>\n {children}\n {count > 0 && (\n <div\n aria-hidden='true'\n className={clsx(\n 'str-chat__unread-count-badge',\n position && `str-chat__unread-count-badge--${position}`,\n )}\n >\n {count}\n </div>\n )}\n </div>\n);\n","/**\n * ChatView is a top-level view switcher between two parallel, independent\n * surfaces (channels and threads). It is NOT a WAI-ARIA Tabs widget: each view\n * owns its own composer and message list and is not a panel of a single\n * composite widget. The selector is a navigation landmark (role=\"navigation\")\n * whose buttons mark the active surface via aria-current=\"true\" (generic\n * \"current item\"; not \"page\", since the SDK may be embedded in a larger host UI).\n *\n * The helper generates stable per-instance DOM ids for the view containers so\n * integrators (skip-links, programmatic focus) have predictable hooks even\n * when multiple ChatViews coexist.\n */\nexport type ChatViewA11yContextValue = {\n chatViewPanelIds: Record<'channels' | 'threads', string>;\n};\n\nexport const DEFAULT_CHAT_VIEW_A11Y_CONTEXT_VALUE: ChatViewA11yContextValue = {\n chatViewPanelIds: {\n channels: 'str-chat__chat-view-panel-channels',\n threads: 'str-chat__chat-view-panel-threads',\n },\n};\n\nexport const createChatViewA11yContextValue = (\n chatViewId: string,\n): ChatViewA11yContextValue => ({\n chatViewPanelIds: {\n channels: `str-chat__chat-view-${chatViewId}-panel-channels`,\n threads: `str-chat__chat-view-${chatViewId}-panel-threads`,\n },\n});\n","import clsx from 'clsx';\nimport React, {\n type ComponentType,\n createContext,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport { useStableId } from '../UtilityComponents/useStableId';\n\nimport { Button, type ButtonProps } from '../Button';\nimport { EmptyStateIndicator as DefaultEmptyStateIndicator } from '../EmptyStateIndicator';\nimport { ThreadProvider } from '../Threads';\nimport { UnreadCountBadge } from '../Threads/UnreadCountBadge';\nimport {\n useChatContext,\n useComponentContext,\n useComponentContextIcons,\n useTranslationContext,\n} from '../../context';\nimport { useStateStore } from '../../store';\nimport {\n type ChatViewA11yContextValue,\n createChatViewA11yContextValue,\n DEFAULT_CHAT_VIEW_A11Y_CONTEXT_VALUE,\n} from './ChatView.a11y.utility';\n\nimport type { PropsWithChildren } from 'react';\nimport type { Thread, ThreadManagerState } from 'stream-chat';\n\nexport type ChatView = 'channels' | 'threads';\n\n/**\n * ChatView switches between two independent surfaces, not panels in a single\n * WAI-ARIA Tabs widget. The selector is a navigation landmark\n * (`role=\"navigation\"`) holding one button per surface; the button for the\n * surface currently shown is marked with `aria-current=\"true\"` (the \"current\n * item in a set\" — not `\"page\"`, since this SDK view may be embedded in a larger\n * host UI that owns the page). View wrappers stay plain `<div>`s to avoid leaking\n * ancestor context into descendants like the composer textarea.\n */\ntype ChatViewContextValue = {\n activeChatView: ChatView;\n setActiveChatView: (cv: ChatView) => void;\n};\n\nexport const ChatViewContext = createContext<ChatViewContextValue | undefined>(undefined);\nconst ChatViewA11yContext = createContext<ChatViewA11yContextValue>(\n DEFAULT_CHAT_VIEW_A11Y_CONTEXT_VALUE,\n);\n\nexport const useChatViewContext = () => {\n const value = useContext(ChatViewContext);\n\n if (!value) {\n console.warn(\n 'The useChatViewContext hook was called outside of the ChatView provider.',\n );\n return {} as ChatViewContextValue;\n }\n\n return value;\n};\nconst useChatViewA11yContext = () => useContext(ChatViewA11yContext);\n\nexport const ChatView = ({ children }: PropsWithChildren) => {\n const [activeChatView, setActiveChatView] = useState<ChatView>('channels');\n const chatViewId = useStableId();\n\n const { theme } = useChatContext();\n\n const a11yValue = useMemo(\n () => createChatViewA11yContextValue(chatViewId),\n [chatViewId],\n );\n\n const value = useMemo(() => ({ activeChatView, setActiveChatView }), [activeChatView]);\n\n return (\n <ChatViewA11yContext.Provider value={a11yValue}>\n <ChatViewContext.Provider value={value}>\n <div className={clsx('str-chat', theme, 'str-chat__chat-view')}>{children}</div>\n </ChatViewContext.Provider>\n </ChatViewA11yContext.Provider>\n );\n};\n\nconst ChannelsView = ({ children }: PropsWithChildren) => {\n const { activeChatView } = useChatViewContext();\n const { chatViewPanelIds } = useChatViewA11yContext();\n const isActive = activeChatView === 'channels';\n\n if (!isActive) return null;\n\n return (\n <div className='str-chat__chat-view__channels' id={chatViewPanelIds.channels}>\n {children}\n </div>\n );\n};\n\nexport type ThreadsViewContextValue = {\n activeThread: Thread | undefined;\n setActiveThread: (cv: ThreadsViewContextValue['activeThread']) => void;\n};\n\nconst ThreadsViewContext = createContext<ThreadsViewContextValue>({\n activeThread: undefined,\n setActiveThread: () => undefined,\n});\n\nexport const useThreadsViewContext = () => useContext(ThreadsViewContext);\n\nconst ThreadsView = ({ children }: PropsWithChildren) => {\n const { activeChatView } = useChatViewContext();\n const { chatViewPanelIds } = useChatViewA11yContext();\n const [activeThread, setActiveThread] =\n useState<ThreadsViewContextValue['activeThread']>(undefined);\n\n const value = useMemo(() => ({ activeThread, setActiveThread }), [activeThread]);\n const isActive = activeChatView === 'threads';\n\n if (!isActive) return null;\n\n return (\n <ThreadsViewContext.Provider value={value}>\n <div className='str-chat__chat-view__threads' id={chatViewPanelIds.threads}>\n {children}\n </div>\n </ThreadsViewContext.Provider>\n );\n};\n\n// thread business logic that's impossible to keep within client but encapsulated for ease of use\nexport const useActiveThread = ({ activeThread }: { activeThread?: Thread }) => {\n useEffect(() => {\n if (!activeThread) return;\n\n const handleVisibilityChange = () => {\n if (document.visibilityState === 'visible' && document.hasFocus()) {\n activeThread.activate();\n }\n if (document.visibilityState === 'hidden' || !document.hasFocus()) {\n activeThread.deactivate();\n }\n };\n\n handleVisibilityChange();\n\n window.addEventListener('focus', handleVisibilityChange);\n window.addEventListener('blur', handleVisibilityChange);\n return () => {\n activeThread.deactivate();\n window.removeEventListener('blur', handleVisibilityChange);\n window.removeEventListener('focus', handleVisibilityChange);\n };\n }, [activeThread]);\n};\n\n// ThreadList under View.Threads context, will access setting function and on item click will set activeThread\n// which can be accessed for the ease of use by ThreadAdapter which forwards it to required ThreadProvider\n// ThreadList can easily live without this context and click handler can be overriden, ThreadAdapter is then no longer needed\n/**\n * // this setup still works\n * const MyCustomComponent = () => {\n * const [activeThread, setActiveThread] = useState();\n *\n * return <>\n * // simplified\n * <ThreadList onItemPointerDown={setActiveThread} />\n * <ThreadProvider thread={activeThread}>\n * <Thread />\n * </ThreadProvider>\n * </>\n * }\n *\n */\nconst ThreadAdapter = ({ children }: PropsWithChildren) => {\n const { client } = useChatContext('ThreadAdapter');\n const { EmptyStateIndicator = DefaultEmptyStateIndicator } =\n useComponentContext('ThreadAdapter');\n const { activeThread } = useThreadsViewContext();\n const { t } = useTranslationContext('ThreadAdapter');\n const { isLoading, ready } = useStateStore(\n client.threads.state,\n threadAdapterSelector,\n ) ?? {\n isLoading: false,\n ready: false,\n };\n\n useActiveThread({ activeThread });\n\n if (!activeThread && ready && !isLoading && EmptyStateIndicator) {\n return (\n <div className='str-chat__thread-container str-chat__thread'>\n <EmptyStateIndicator\n listType='message'\n messageText={t('Select a thread to continue the conversation')}\n />\n </div>\n );\n }\n\n return <ThreadProvider thread={activeThread}>{children}</ThreadProvider>;\n};\n\nexport const ChatViewSelectorButton = ({\n ActiveIcon,\n children,\n className,\n Icon,\n iconOnly = true,\n isActive,\n text,\n ...props\n}: ButtonProps & {\n ActiveIcon?: ComponentType;\n iconOnly?: boolean;\n Icon?: ComponentType;\n isActive?: boolean;\n text?: string;\n}) => {\n const SelectorIcon = isActive && ActiveIcon ? ActiveIcon : Icon;\n const shouldShowTooltip = !!text && iconOnly;\n\n return (\n <div className='str-chat__chat-view__selector-button-container'>\n <Button\n appearance='ghost'\n aria-current={isActive || undefined}\n aria-label={props['aria-label'] ?? (shouldShowTooltip ? text : undefined)}\n className={clsx('str-chat__chat-view__selector-button', className)}\n variant='secondary'\n {...props}\n >\n {children ?? (SelectorIcon && <SelectorIcon />)}\n {!iconOnly && text && (\n <div className='str-chat__chat-view__selector-button-text'>{text}</div>\n )}\n </Button>\n {shouldShowTooltip && (\n <div\n aria-hidden='true'\n className='str-chat__chat-view__selector-button-tooltip str-chat__tooltip'\n >\n {text}\n </div>\n )}\n </div>\n );\n};\n\nconst threadAdapterSelector = ({ pagination, ready }: ThreadManagerState) => ({\n isLoading: pagination.isLoading,\n ready,\n});\n\nconst unreadThreadCountSelector = ({ unreadThreadCount }: ThreadManagerState) => ({\n unreadThreadCount,\n});\n\nexport type ChatViewSelectorItemProps = {\n iconOnly?: boolean;\n};\n\nexport const ChatViewChannelsSelectorButton = ({\n iconOnly = true,\n}: ChatViewSelectorItemProps) => {\n const { activeChatView, setActiveChatView } = useChatViewContext();\n const { t } = useTranslationContext();\n const { IconMessageBubble, IconMessageBubbleFill } = useComponentContextIcons();\n\n const isActive = activeChatView === 'channels';\n\n return (\n <ChatViewSelectorButton\n ActiveIcon={IconMessageBubbleFill}\n aria-label={t('aria/Open channels view')}\n Icon={IconMessageBubble}\n iconOnly={iconOnly}\n isActive={isActive}\n onClick={() => setActiveChatView('channels')}\n onPointerDown={() => setActiveChatView('channels')}\n text={t('Channels')}\n />\n );\n};\n\nexport const ChatViewThreadsSelectorButton = ({\n iconOnly = true,\n}: ChatViewSelectorItemProps) => {\n const { client } = useChatContext();\n const { unreadThreadCount } = useStateStore(\n client.threads.state,\n unreadThreadCountSelector,\n ) ?? {\n unreadThreadCount: 0,\n };\n const { activeChatView, setActiveChatView } = useChatViewContext();\n const { t } = useTranslationContext();\n const { IconThread, IconThreadFill } = useComponentContextIcons();\n\n const isActive = activeChatView === 'threads';\n const label =\n unreadThreadCount > 0\n ? t('aria/Open threads view with unread threads', {\n count: unreadThreadCount,\n })\n : t('aria/Open threads view');\n\n return (\n <ChatViewSelectorButton\n ActiveIcon={IconThreadFill}\n aria-label={label}\n Icon={IconThread}\n iconOnly={iconOnly}\n isActive={isActive}\n onClick={() => setActiveChatView('threads')}\n onPointerDown={() => setActiveChatView('threads')}\n text={t('Threads')}\n >\n <UnreadCountBadge count={unreadThreadCount} position='top-right'>\n {isActive ? <IconThreadFill /> : <IconThread />}\n </UnreadCountBadge>\n </ChatViewSelectorButton>\n );\n};\n\nexport type ChatViewSelectorItem = {\n Component: React.ComponentType<ChatViewSelectorItemProps>;\n type: string & {};\n};\n\nexport type ChatViewSelectorEntry = ChatViewSelectorItem;\n\nexport type ChatViewSelectorProps = {\n iconOnly?: boolean;\n itemSet?: ChatViewSelectorEntry[];\n};\n\nexport const defaultChatViewSelectorItemSet: ChatViewSelectorEntry[] = [\n {\n Component: ChatViewChannelsSelectorButton,\n type: 'channels' as string & {},\n },\n {\n Component: ChatViewThreadsSelectorButton,\n type: 'threads' as string & {},\n },\n];\n\nconst ChatViewSelector = ({\n iconOnly = true,\n itemSet = defaultChatViewSelectorItemSet,\n}: ChatViewSelectorProps) => {\n const { t } = useTranslationContext();\n\n return (\n <div\n aria-label={t('aria/Chat view controls')}\n className='str-chat__chat-view__selector'\n role='navigation'\n >\n {itemSet.map(({ Component, type }) => (\n <Component iconOnly={iconOnly} key={type} />\n ))}\n </div>\n );\n};\n\nChatView.Channels = ChannelsView;\nChatView.Threads = ThreadsView;\nChatView.ThreadAdapter = ThreadAdapter;\nChatView.Selector = ChatViewSelector;\n","import { useContext } from 'react';\n\nimport { ChatViewContext } from '../../ChatView';\nimport { useChannelListContext, useChannelStateContext } from '../../../context';\nimport { useThreadContext } from '../../Threads/ThreadContext';\n\nimport type { NotificationTargetPanel } from '../notificationTarget';\nimport { useLegacyThreadContext } from '../../Thread';\n\n/**\n * Resolves the panel target where notifications emitted by the current component should be displayed.\n */\nexport const useNotificationTarget = (): NotificationTargetPanel | undefined => {\n const chatViewContext = useContext(ChatViewContext);\n const { channels } = useChannelListContext();\n const { channel } = useChannelStateContext();\n const threadInstance = useThreadContext();\n const { legacyThread } = useLegacyThreadContext();\n\n if (threadInstance || legacyThread) return 'thread';\n if (channel) return 'channel';\n if (chatViewContext?.activeChatView === 'threads') return 'thread-list';\n if (channels) return 'channel-list';\n return undefined;\n};\n","import { useCallback } from 'react';\n\nimport type { Notification, NotificationAction, NotificationSeverity } from 'stream-chat';\n\nimport type { AriaLivePriority } from '../../Accessibility';\nimport { useChatContext, useModalDialogManager } from '../../../context';\nimport { useStateStore } from '../../../store';\nimport {\n addNotificationTargetTag,\n getNotificationTargetTag,\n type NotificationTargetPanel,\n} from '../notificationTarget';\nimport { useNotificationTarget } from './useNotificationTarget';\n\nimport type { DialogManagerState } from '../../Dialog/service/DialogManager';\n\nconst modalDialogManagerStateSelector = ({\n dialogsById,\n openedDialogIds,\n}: DialogManagerState) => ({\n hasOpenDialog: openedDialogIds\n ? openedDialogIds.length > 0\n : Object.values(dialogsById).some((dialog) => dialog.isOpen),\n});\n\n/** Tag used for full-width system banners (e.g. connection status). Excluded from `NotificationList` by default. */\nexport const SYSTEM_NOTIFICATION_TAG = 'system' as const;\n\nexport const hasSystemNotificationTag = (notification: Notification) =>\n notification.tags?.includes(SYSTEM_NOTIFICATION_TAG) ?? false;\n\nexport type NotificationIncidentDescriptor = {\n /** Where the incident happened (e.g. api, browser, validation, permission). */\n domain: string;\n /** Entity being operated on (e.g. message, poll, location, attachment). */\n entity: string;\n /** Attempted operation (e.g. send, end, share, upload). */\n operation: string;\n /** Status of the operation (e.g. failed, success, blocked). */\n status?: string;\n};\n\nexport type AddNotificationParams = {\n /** Optional interactive actions rendered by the notification component. */\n actions?: NotificationAction[];\n /**\n * Overrides the aria-live priority the notification is announced with. Defaults to severity-based\n * (`error` → `assertive`, otherwise `polite`). Set `assertive` for a confirmation that should be\n * heard promptly rather than queued behind a competing announcement (e.g. a focus change).\n */\n ariaLive?: AriaLivePriority;\n /** Arbitrary context metadata stored in `origin.context`. */\n context?: Record<string, unknown>;\n /** Duration in milliseconds after which the notification auto-dismisses. */\n duration?: number;\n /** Logical source emitting the notification (e.g. component or feature name). */\n emitter: string;\n /** Underlying error object attached as `options.originalError`. */\n error?: Error;\n /** Human-readable notification message. */\n message: string;\n /** Notification severity visualized by the UI. */\n severity?: NotificationSeverity;\n /** Additional tags appended to target panel tags. */\n tags?: string[];\n /** Explicit target panels; when provided, inferred panel is ignored. */\n targetPanels?: NotificationTargetPanel[];\n /** Structured descriptor of the incident this notification reports on. */\n incident?: NotificationIncidentDescriptor;\n /**\n * Optional machine-readable notification type identifier (domain:entity:operation:status).\n * Used by notification consumers to route behavior, including translation lookup\n * via notification-type registries.\n * When omitted, `type` is generated from `incident` if `incident` is provided.\n */\n type?: string;\n};\n\n/**\n * Same shape as {@link AddNotificationParams} except `targetPanels` is omitted — system\n * banners are global and do not receive `target:*` panel tags (they are filtered by the\n * `system` tag for `NotificationList` vs banner UIs).\n */\nexport type AddSystemNotificationParams = Omit<AddNotificationParams, 'targetPanels'>;\n\nexport type AddNotification = (params: AddNotificationParams) => void;\n/** Returns the notification id (for removal / timeouts). */\nexport type AddSystemNotification = (params: AddSystemNotificationParams) => string;\nexport type RemoveNotification = (id: string) => void;\nexport type StartNotificationTimeout = (id: string) => void;\n\nexport type NotificationApi = {\n addNotification: AddNotification;\n addSystemNotification: AddSystemNotification;\n removeNotification: RemoveNotification;\n startNotificationTimeout: StartNotificationTimeout;\n};\n\nconst getTargetTags = (\n targetPanels: NotificationTargetPanel[] | undefined,\n inferredPanel: NotificationTargetPanel | undefined,\n tags: string[] | undefined,\n modalManagerHasOpenDialog: boolean,\n) => {\n if (targetPanels) {\n const effectiveTargetPanels =\n modalManagerHasOpenDialog && targetPanels.length > 0\n ? [...targetPanels, 'modal' as const]\n : targetPanels;\n\n return Array.from(\n new Set([...effectiveTargetPanels.map(getNotificationTargetTag), ...(tags ?? [])]),\n );\n }\n\n if (modalManagerHasOpenDialog) {\n return Array.from(\n new Set([\n ...(inferredPanel ? [getNotificationTargetTag(inferredPanel)] : []),\n getNotificationTargetTag('modal'),\n ...(tags ?? []),\n ]),\n );\n }\n\n return addNotificationTargetTag(inferredPanel, tags);\n};\n\nconst getTypeFromIncident = ({\n incident,\n severity,\n type,\n}: Pick<AddNotificationParams, 'incident' | 'severity' | 'type'>) => {\n if (type) return type;\n if (!incident) return undefined;\n\n const status =\n incident.status ??\n (severity === 'error' ? 'failed' : severity === 'success' ? 'success' : severity);\n\n return [incident.domain, incident.entity, incident.operation, status]\n .filter((segment): segment is string => !!segment)\n .join(':');\n};\n\nexport const useNotificationApi = (): NotificationApi => {\n const { client } = useChatContext();\n const inferredPanel = useNotificationTarget();\n const modalDialogManager = useModalDialogManager();\n const modalManagerHasOpenDialog =\n useStateStore(modalDialogManager?.state, modalDialogManagerStateSelector)\n ?.hasOpenDialog ?? false;\n\n const addNotification: AddNotification = useCallback(\n ({\n actions,\n ariaLive,\n context,\n duration,\n emitter,\n error,\n incident,\n message,\n severity,\n tags,\n targetPanels,\n type,\n }: AddNotificationParams) => {\n const notificationTags = getTargetTags(\n targetPanels,\n inferredPanel,\n tags,\n modalManagerHasOpenDialog,\n );\n const resolvedType = getTypeFromIncident({ incident, severity, type });\n const origin = context ? { context, emitter } : { emitter };\n\n const options = {\n ...(actions ? { actions } : {}),\n ...(typeof duration === 'number' ? { duration } : {}),\n ...(error ? { originalError: error } : {}),\n ...(ariaLive ? { metadata: { ariaLive } } : {}),\n ...(notificationTags.length > 0 ? { tags: notificationTags } : {}),\n ...(severity ? { severity } : {}),\n ...(resolvedType ? { type: resolvedType } : {}),\n };\n\n client.notifications.add({\n message,\n options,\n origin,\n });\n },\n [client, inferredPanel, modalManagerHasOpenDialog],\n );\n\n const addSystemNotification: AddSystemNotification = useCallback(\n ({\n actions,\n ariaLive,\n context,\n duration,\n emitter,\n error,\n incident,\n message,\n severity,\n tags,\n type,\n }: AddSystemNotificationParams) => {\n const notificationTags = Array.from(\n new Set([SYSTEM_NOTIFICATION_TAG, ...(tags ?? [])]),\n );\n const resolvedType = getTypeFromIncident({ incident, severity, type });\n const origin = context ? { context, emitter } : { emitter };\n\n const options = {\n ...(actions ? { actions } : {}),\n ...(typeof duration === 'number' ? { duration } : {}),\n ...(error ? { originalError: error } : {}),\n ...(ariaLive ? { metadata: { ariaLive } } : {}),\n ...(notificationTags.length > 0 ? { tags: notificationTags } : {}),\n ...(severity ? { severity } : {}),\n ...(resolvedType ? { type: resolvedType } : {}),\n };\n\n return client.notifications.add({\n message,\n options,\n origin,\n });\n },\n [client],\n );\n\n const removeNotification: RemoveNotification = useCallback(\n (id) => {\n client.notifications.remove(id);\n },\n [client],\n );\n\n const startNotificationTimeout: StartNotificationTimeout = useCallback(\n (id) => {\n client.notifications.startTimeout(id);\n },\n [client],\n );\n\n return {\n addNotification,\n addSystemNotification,\n removeNotification,\n startNotificationTimeout,\n };\n};\n","import React, { type ComponentType, forwardRef } from 'react';\nimport clsx from 'clsx';\nimport type { NotificationSeverity } from 'stream-chat';\nimport { type Notification as NotificationType } from 'stream-chat';\n\nimport { useComponentContextIcons } from '../../context';\nimport { useTranslationContext } from '../../context/TranslationContext';\nimport { Button } from '../Button';\nimport { useNotificationApi } from './hooks/useNotificationApi';\n\ntype NotificationEntryDirection = 'bottom' | 'left' | 'right' | 'top';\ntype NotificationTransitionState = 'enter' | 'exit';\n\nexport type NotificationIconProps = {\n notification: NotificationType;\n};\n\nconst DefaultNotificationIcon = ({ notification }: NotificationIconProps) => {\n const { IconCheckmark, IconExclamationMark, IconExclamationTriangleFill, IconRefresh } =\n useComponentContextIcons();\n if (!notification.severity) return null;\n\n const iconsBySeverity: Record<NotificationSeverity, ComponentType | null> = {\n error: IconExclamationMark,\n info: null,\n loading: IconRefresh,\n success: IconCheckmark,\n warning: IconExclamationTriangleFill,\n };\n\n const Icon = iconsBySeverity[notification.severity] ?? null;\n return (\n Icon && (\n <div className='str-chat__notification-icon'>\n <Icon />\n </div>\n )\n );\n};\n\nexport type NotificationProps = {\n /** Notification from client.notifications state */\n notification: NotificationType;\n /** Optional class name */\n className?: string;\n /** Direction from which the notification enters. */\n entryDirection?: NotificationEntryDirection;\n /** Optional custom icon component. */\n Icon?: React.ComponentType<NotificationIconProps>;\n /** Optional dismiss handler */\n onDismiss?: () => void;\n /** Show close button (for persistent notifications) */\n showClose?: boolean;\n /** Optional transition state applied by NotificationList. */\n transitionState?: NotificationTransitionState;\n};\n\nexport const Notification = forwardRef<HTMLDivElement, NotificationProps>(\n (\n {\n className,\n entryDirection,\n Icon = DefaultNotificationIcon,\n notification,\n onDismiss,\n showClose = false,\n transitionState,\n }: NotificationProps,\n ref,\n ) => {\n const { IconXmark } = useComponentContextIcons();\n\n const { removeNotification } = useNotificationApi();\n const { t } = useTranslationContext();\n\n const displayMessage = t('translationBuilderTopic/notification', {\n notification,\n value: notification.message,\n });\n\n const handleDismiss = () => {\n if (onDismiss) {\n onDismiss();\n return;\n }\n\n removeNotification(notification.id);\n };\n\n const isPersistent = !notification.duration;\n\n const severity = notification.severity;\n // Priority defaults from severity (errors interrupt; everything else is polite), but a\n // notification may explicitly opt into a different aria-live priority via\n // `metadata.ariaLive` — e.g. a success confirmation that should be heard promptly rather than\n // queued behind a focus-change announcement (see `addNotification`'s `ariaLive` option).\n const ariaLiveOverride = notification.metadata?.ariaLive;\n const livePriority: 'assertive' | 'polite' =\n ariaLiveOverride === 'assertive' || ariaLiveOverride === 'polite'\n ? ariaLiveOverride\n : severity === 'error'\n ? 'assertive'\n : 'polite';\n\n return (\n <div\n className={clsx(\n 'str-chat__notification',\n entryDirection && `str-chat__notification--enter-from-${entryDirection}`,\n transitionState === 'enter' && 'str-chat__notification--is-entering',\n transitionState === 'exit' && 'str-chat__notification--is-exiting',\n severity && `str-chat__notification--${severity}`,\n severity === 'loading' && 'str-chat__notification--loading',\n className,\n )}\n data-testid='notification'\n ref={ref}\n >\n <div className='str-chat__notification-content'>\n {Icon && <Icon notification={notification} />}\n <div\n aria-atomic='true'\n aria-live={livePriority}\n className='str-chat__notification-message'\n role={livePriority === 'assertive' ? 'alert' : 'status'}\n >\n {displayMessage}\n </div>\n </div>\n {notification.actions && notification.actions.length > 0 && (\n <div className='str-chat__notification-actions'>\n {notification.actions.map((action, index) => (\n <Button\n appearance='outline'\n className='str-chat__notification-action'\n inverseTheme\n key={index}\n onClick={() => {\n action.handler();\n }}\n size='sm'\n variant='secondary'\n >\n {action.label}\n </Button>\n ))}\n </div>\n )}\n {(showClose || isPersistent) && (\n <Button\n appearance='ghost'\n aria-label={t('aria/Dismiss notification')}\n circular\n className='str-chat__notification-close-button'\n inverseTheme\n onClick={handleDismiss}\n size='sm'\n variant='secondary'\n >\n <IconXmark />\n </Button>\n )}\n </div>\n );\n },\n);\n\nNotification.displayName = 'Notification';\n","import React, { useCallback, useEffect, useRef, useState } from 'react';\nimport clsx from 'clsx';\nimport type { Notification } from 'stream-chat';\n\nimport { hasSystemNotificationTag, useNotificationApi } from './hooks/useNotificationApi';\nimport { useNotifications } from './hooks/useNotifications';\nimport { Notification as DefaultNotification } from './Notification';\nimport { useComponentContext, useTranslationContext } from '../../context';\n\nimport type { NotificationTargetPanel } from './notificationTarget';\n\nexport type NotificationListFilter = (notification: Notification) => boolean;\nexport type NotificationListEnterFrom = 'bottom' | 'left' | 'right' | 'top';\nexport type NotificationListVerticalAlignment = 'bottom' | 'top';\n/**\n * Selects the candidate notification to display. Receives the current store contents and\n * the currently displayed notification (or `null` when nothing is mounted). Returning\n * `displayed` (or any notification with the same id) means \"no swap\"; returning a\n * different notification triggers a swap (immediate or after `minDisplayMs`, see the\n * scheduling effect); returning `null` triggers the empty-slot exit.\n *\n * Default: `createDefaultPickNext(pickOldest)` — applies persistent-wins,\n * same-type-refresh and FIFO queue rules from the design spec. Pass\n * `pickNext={createDefaultPickNext(pickNewest)}` to swap FIFO for LIFO without\n * reimplementing those rules, or your own `pickNext` to opt out entirely.\n */\nexport type PickNextNotification = (\n notifications: Notification[],\n displayed: Notification | null,\n) => Notification | null;\n\n/**\n * Picks the next queued notification when no higher-priority rule applies (persistent\n * wins, same-type refresh). Used by `createDefaultPickNext`.\n */\nexport type PickFromQueue = (\n notifications: Notification[],\n displayed: Notification | null,\n) => Notification | null;\n\nexport type NotificationListProps = {\n /** Optional class name for the list container */\n className?: string;\n /**\n * Direction from which the replacement notification enters the single visible slot.\n * Travel distance is configured in `ENTER_TRANSLATION` below.\n */\n enterFrom?: NotificationListEnterFrom;\n /**\n * When provided, this list only shows notifications that pass the filter.\n * Use to declare which notifications this list consumes (e.g. by origin.emitter, origin.context.channelId, or metadata).\n */\n filter?: NotificationListFilter;\n /**\n * Minimum time in milliseconds the active notification stays visible before a queued one\n * can replace it. Replacements scheduled while the dwell window is open wait until it has\n * elapsed; arrivals after that window replace the active notification immediately.\n * Same-type repeated triggers and external dismissals bypass this dwell.\n * Defaults to 1000ms.\n */\n minDisplayMs?: number;\n /**\n * Override the candidate-selection policy. The function decides which notification\n * should be displayed given the store and the currently displayed one. Defaults to\n * `createDefaultPickNext(pickOldest)`. Pass `createDefaultPickNext(pickNewest)` for LIFO.\n */\n pickNext?: PickNextNotification;\n /** Panel target consumed by this list. */\n panel?: NotificationTargetPanel;\n /** Fallback panel when emitted notifications do not include origin.context.panel. */\n fallbackPanel?: NotificationTargetPanel;\n /** Vertical alignment of the single notification slot within its parent. Defaults to `bottom`. */\n verticalAlignment?: NotificationListVerticalAlignment;\n};\n\n// Entry motion is controlled through CSS variables so the keyframe can stay shared in SCSS.\n// Use full-size percentages on the active axis to make a replacement notification slide in\n// from outside its slot. If future tuning needs more travel, prefer `calc(100% + gap)` here.\nconst ENTER_TRANSLATION: Record<NotificationListEnterFrom, { x: string; y: string }> = {\n bottom: { x: '0%', y: '100%' },\n left: { x: '-100%', y: '0%' },\n right: { x: '100%', y: '0%' },\n top: { x: '0%', y: '-100%' },\n};\n\nconst EXIT_ANIMATION_MS = 340;\nconst DEFAULT_MIN_DISPLAY_MS = 1000;\n\nconst isEnterFrom = (value: unknown): value is NotificationListEnterFrom =>\n value === 'bottom' || value === 'left' || value === 'right' || value === 'top';\n\nconst getNotificationEnterFrom = (\n notification: Notification | null,\n fallbackEnterFrom: NotificationListEnterFrom,\n) => {\n if (!notification) return fallbackEnterFrom;\n\n const metadataEnterFrom = notification.metadata?.entryDirection;\n if (isEnterFrom(metadataEnterFrom)) return metadataEnterFrom;\n\n const originEnterFrom = notification.origin.context?.entryDirection;\n if (isEnterFrom(originEnterFrom)) return originEnterFrom;\n\n return fallbackEnterFrom;\n};\n\nconst isPersistent = (notification: Notification) => !notification.duration;\n\nconst haveSameType = (a: Notification | null, b: Notification | null) =>\n !!a?.type && !!b?.type && a.type === b.type;\n\n/** FIFO queue selector — oldest `createdAt` other than `displayed` wins. */\nexport const pickOldest: PickFromQueue = (notifications, displayed) => {\n const excludeId = displayed?.id ?? null;\n let oldest: Notification | null = null;\n for (const notification of notifications) {\n if (notification.id === excludeId) continue;\n if (!oldest || notification.createdAt < oldest.createdAt) {\n oldest = notification;\n }\n }\n return oldest;\n};\n\n/** LIFO queue selector — newest `createdAt` other than `displayed` wins. */\nexport const pickNewest: PickFromQueue = (notifications, displayed) => {\n const excludeId = displayed?.id ?? null;\n let newest: Notification | null = null;\n for (const notification of notifications) {\n if (notification.id === excludeId) continue;\n if (!newest || notification.createdAt > newest.createdAt) {\n newest = notification;\n }\n }\n return newest;\n};\n\nconst pickNewestPersistent = (\n notifications: Notification[],\n excludeId: string | null,\n): Notification | null => {\n let newest: Notification | null = null;\n for (const notification of notifications) {\n if (notification.id === excludeId) continue;\n if (!isPersistent(notification)) continue;\n if (!newest || notification.createdAt > newest.createdAt) {\n newest = notification;\n }\n }\n return newest;\n};\n\nconst pickNewestOfType = (\n notifications: Notification[],\n type: string | undefined | null,\n excludeId: string | null,\n): Notification | null => {\n if (!type) return null;\n let newest: Notification | null = null;\n for (const notification of notifications) {\n if (notification.id === excludeId) continue;\n if (notification.type !== type) continue;\n if (!newest || notification.createdAt > newest.createdAt) {\n newest = notification;\n }\n }\n return newest;\n};\n\n/**\n * Builds the default `PickNextNotification` selector with a configurable queue fallback.\n * Encodes the snackbar concurrency rules from the design spec — the scheduling effect\n * only decides *when* to swap, the returned function decides *what* to swap to.\n *\n * Rules, in order of precedence:\n * 1. **Persistent wins.** Persistent variants (no `duration`) jump ahead of any\n * queued transient because they carry an action the user must acknowledge.\n * 2. **Persistent ↛ replaced by transient.** While a persistent is displayed it stays\n * put until dismissed externally or a *newer* persistent arrives.\n * 3. **Same-type refresh.** While a transient is displayed, a repeated trigger of the\n * same `type` collapses to its latest occurrence. (The scheduling effect detects\n * this via `haveSameType` and bypasses the dwell window so the refresh feels\n * instant; this function just makes sure the latest same-type is returned.)\n * 4. **Queue fallback.** Otherwise, `pickFromQueue` selects the next notification\n * (default: `pickOldest` / FIFO).\n *\n * Exported so callers that want to layer behavior on top of the design rules can wrap\n * the result instead of rewriting it.\n */\nexport const createDefaultPickNext =\n (pickFromQueue: PickFromQueue = pickOldest): PickNextNotification =>\n (notifications, displayed) => {\n if (notifications.length === 0) return null;\n\n const newestPersistent = pickNewestPersistent(notifications, null);\n\n if (!displayed) {\n return newestPersistent ?? pickFromQueue(notifications, null);\n }\n\n const displayedInStore = notifications.some(({ id }) => id === displayed.id);\n if (!displayedInStore) {\n return newestPersistent ?? pickFromQueue(notifications, null);\n }\n\n if (isPersistent(displayed)) {\n // Currently showing a persistent: only a newer persistent can replace it. Reuse the\n // earlier lookup when it already points at a different persistent.\n const newerPersistent =\n newestPersistent && newestPersistent.id !== displayed.id\n ? newestPersistent\n : pickNewestPersistent(notifications, displayed.id);\n if (newerPersistent && newerPersistent.createdAt > displayed.createdAt) {\n return newerPersistent;\n }\n return displayed;\n }\n\n // Currently showing a transient.\n // 1. Same-type \"refresh of current\" wins immediately — a repeated trigger of the\n // displayed snackbar collapses to the latest occurrence of that type.\n const sameTypeNewest = pickNewestOfType(notifications, displayed.type, displayed.id);\n if (sameTypeNewest) return sameTypeNewest;\n\n // 2. Any queued persistent jumps ahead of the queue.\n if (newestPersistent) return newestPersistent;\n\n // 3. Queue fallback.\n return pickFromQueue(notifications, displayed) ?? displayed;\n };\n\n/** Default selector — design-spec rules with FIFO queue fallback (`pickOldest`). */\nconst defaultPickNext = createDefaultPickNext(pickOldest);\n\nexport const NotificationList = ({\n className,\n enterFrom = 'bottom',\n fallbackPanel,\n filter,\n minDisplayMs = DEFAULT_MIN_DISPLAY_MS,\n panel,\n pickNext = defaultPickNext,\n verticalAlignment = 'bottom',\n}: NotificationListProps) => {\n const { Notification: NotificationComponent = DefaultNotification } =\n useComponentContext();\n const { t } = useTranslationContext();\n const { removeNotification, startNotificationTimeout } = useNotificationApi();\n // Holds the timer that runs the exit animation. Set when we flip `transitionState` to\n // `'exit'`; when it fires, the previously displayed notification is removed and either the\n // next candidate is mounted (entering) or the list collapses to empty. Only one exit\n // animation can be in flight at a time.\n const exitTimeoutRef = useRef<number | null>(null);\n // Holds the dwell timer that defers a swap until `minDisplayMs` has elapsed since the\n // active notification became visible. It only exists while we're waiting out the dwell\n // window; same-type triggers, external dismissals and arrivals after the dwell window\n // bypass it and trigger the exit animation directly.\n const replacementTimeoutRef = useRef<number | null>(null);\n const candidateRef = useRef<Notification | null>(null);\n const displayedAtRef = useRef<number | null>(null);\n const listRef = useRef<HTMLDivElement | null>(null);\n const observedElementRef = useRef<HTMLDivElement | null>(null);\n const startedTimeoutIdsRef = useRef<Set<string> | null>(null);\n\n if (!startedTimeoutIdsRef.current) {\n startedTimeoutIdsRef.current = new Set<string>();\n }\n\n const [displayedNotification, setDisplayedNotification] = useState<Notification | null>(\n null,\n );\n const [transitionState, setTransitionState] = useState<'enter' | 'exit'>('enter');\n const combinedFilter = useCallback(\n (notification: Notification) => {\n if (hasSystemNotificationTag(notification)) return false;\n return filter ? filter(notification) : true;\n },\n [filter],\n );\n const notifications = useNotifications({\n applyDisplayFilter: true,\n fallbackPanel,\n filter: combinedFilter,\n panel,\n });\n\n const dismiss = useCallback(\n (id: string) => {\n startedTimeoutIdsRef.current?.delete(id);\n removeNotification(id);\n },\n [removeNotification],\n );\n\n // Drop any stale entries from the started-timeouts set whenever the store changes.\n useEffect(() => {\n const notificationIds = new Set(notifications.map(({ id }) => id));\n\n startedTimeoutIdsRef.current?.forEach((id) => {\n if (!notificationIds.has(id)) {\n startedTimeoutIdsRef.current?.delete(id);\n }\n });\n }, [notifications]);\n\n const clearReplacementTimeout = useCallback(() => {\n if (replacementTimeoutRef.current !== null) {\n window.clearTimeout(replacementTimeoutRef.current);\n replacementTimeoutRef.current = null;\n }\n }, []);\n\n // Cleanup pending timers on unmount.\n useEffect(\n () => () => {\n clearReplacementTimeout();\n if (exitTimeoutRef.current !== null) {\n window.clearTimeout(exitTimeoutRef.current);\n exitTimeoutRef.current = null;\n }\n },\n [clearReplacementTimeout],\n );\n\n // Keep the freshest candidate around so swap completion can read the latest value, even\n // when a new notification arrives mid-exit-animation.\n useEffect(() => {\n candidateRef.current = pickNext(notifications, displayedNotification);\n }, [displayedNotification, notifications, pickNext]);\n\n // Main scheduling effect — owns *when* swaps happen. The *what* is delegated entirely\n // to `pickNext` (default: `createDefaultPickNext(pickOldest)`).\n //\n // Runs on every change to `displayedNotification`, `notifications`, `pickNext`, or\n // `transitionState`, and decides one of four outcomes:\n // 1. Do nothing (the right notification is already on screen, or an exit animation\n // is mid-flight and will re-trigger this effect when it finishes).\n // 2. Mount the first notification (no `displayedNotification` yet).\n // 3. Unmount the current one (`pickNext` returned `null`, the store became empty).\n // 4. Swap the displayed one for the new candidate — either immediately or after the\n // `minDisplayMs` dwell window has elapsed.\n //\n // Timing rules applied here (independent of selection policy):\n // - **Dwell window.** When `pickNext` returns a different candidate, hold the active\n // notification on screen until at least `minDisplayMs` has passed since it became\n // visible. Replacements that arrive after that window swap immediately.\n // - **Same-type bypass.** If the candidate has the same `type` as the displayed\n // notification, swap immediately (no dwell) — this is the \"repeated trigger\n // refreshes the snackbar and resets the auto-dismiss timer\" behavior. The timer\n // reset is achieved by removing the previously displayed notification on swap\n // (which clears its `NotificationManager` timer) so the new one starts its own\n // when it next intersects the slot.\n // - **External-dismiss bypass.** If the displayed notification is no longer in the\n // store (user clicked the close button, `NotificationManager` auto-removed it,\n // etc.), swap immediately — we should not stall an empty slot for the dwell.\n useEffect(() => {\n // An exit animation is already in flight. Once its timer fires it sets new state\n // (either the next notification or `null`), which will re-run this effect from a\n // clean baseline.\n if (transitionState === 'exit') return;\n\n // No notification is mounted yet — pick whatever the candidate logic prefers and\n // mount it directly with an enter animation. No swap required.\n if (!displayedNotification) {\n const candidate = pickNext(notifications, null);\n if (candidate) {\n displayedAtRef.current = Date.now();\n setDisplayedNotification(candidate);\n setTransitionState('enter');\n }\n return;\n }\n\n const candidate = pickNext(notifications, displayedNotification);\n\n // The store has been drained while a notification was visible. Play the exit\n // animation, then unmount.\n if (!candidate) {\n clearReplacementTimeout();\n setTransitionState('exit');\n exitTimeoutRef.current = window.setTimeout(() => {\n exitTimeoutRef.current = null;\n displayedAtRef.current = null;\n setDisplayedNotification(null);\n setTransitionState('enter');\n }, EXIT_ANIMATION_MS);\n return;\n }\n\n // The candidate is the displayed notification itself — nothing to do. Cancel any\n // dwell timer that may have been queued by an earlier run that has since become\n // moot (e.g. the incoming notification was removed before its dwell expired).\n if (candidate.id === displayedNotification.id) {\n clearReplacementTimeout();\n return;\n }\n\n const displayedInStore = notifications.some(\n ({ id }) => id === displayedNotification.id,\n );\n\n // Swap routine shared by the immediate and dwell-deferred branches below. Captures\n // `previousId` / `wasInStore` from the effect's closure so the exit timer can run\n // the right cleanup even if state has moved on by the time it fires.\n const startSwap = () => {\n replacementTimeoutRef.current = null;\n setTransitionState('exit');\n const previousId = displayedNotification.id;\n const wasInStore = displayedInStore;\n exitTimeoutRef.current = window.setTimeout(() => {\n exitTimeoutRef.current = null;\n if (wasInStore) {\n // Remove the previously displayed notification from the store so it does not\n // re-appear, and so its NotificationManager auto-dismiss timer is cleared.\n startedTimeoutIdsRef.current?.delete(previousId);\n removeNotification(previousId);\n }\n // Read the latest candidate at the moment the exit animation actually completes —\n // it may differ from the one decided when `startSwap` was queued because new\n // notifications could have arrived during the 340ms exit window.\n const next = candidateRef.current;\n if (next && next.id !== previousId) {\n displayedAtRef.current = Date.now();\n setDisplayedNotification(next);\n setTransitionState('enter');\n } else {\n displayedAtRef.current = null;\n setDisplayedNotification(null);\n setTransitionState('enter');\n }\n }, EXIT_ANIMATION_MS);\n };\n\n // External dismissal or auto-dismiss removed the displayed notification: swap right\n // away (no dwell wait — the slot would otherwise stall empty for `minDisplayMs`).\n if (!displayedInStore) {\n clearReplacementTimeout();\n startSwap();\n return;\n }\n\n // Repeated triggers of the same snackbar replace the active one and reset the\n // auto-dismiss timer immediately — feedback for the same condition should feel like\n // a single, persistent thing being refreshed.\n if (haveSameType(displayedNotification, candidate)) {\n clearReplacementTimeout();\n startSwap();\n return;\n }\n\n // Default branch: enforce the dwell window. `displayedAtRef` is stamped synchronously\n // every time we set `displayedNotification` (initial mount and swap completion), so it\n // is in sync with what is on screen by the time this effect runs.\n const elapsed = displayedAtRef.current ? Date.now() - displayedAtRef.current : 0;\n const remaining = Math.max(0, minDisplayMs - elapsed);\n\n if (remaining === 0) {\n // Dwell already elapsed; swap right now.\n clearReplacementTimeout();\n startSwap();\n } else if (replacementTimeoutRef.current === null) {\n // A swap is pending but the dwell hasn't elapsed yet. Schedule the swap once —\n // subsequent re-runs of this effect (e.g. as even newer notifications arrive)\n // intentionally do NOT reschedule. `candidateRef` keeps tracking the freshest\n // candidate, so when the timer fires `startSwap` → exit completes → the latest\n // candidate is picked up automatically.\n replacementTimeoutRef.current = window.setTimeout(startSwap, remaining);\n }\n }, [\n clearReplacementTimeout,\n displayedNotification,\n minDisplayMs,\n notifications,\n pickNext,\n removeNotification,\n transitionState,\n ]);\n\n const notification = displayedNotification;\n const notificationEnterFrom = getNotificationEnterFrom(notification, enterFrom);\n\n useEffect(() => {\n const element = observedElementRef.current;\n if (!element || !notification || transitionState === 'exit') return;\n\n const startTimeout = () => {\n if (\n !startedTimeoutIdsRef.current ||\n startedTimeoutIdsRef.current.has(notification.id)\n )\n return;\n\n startedTimeoutIdsRef.current.add(notification.id);\n startNotificationTimeout(notification.id);\n };\n\n if (typeof IntersectionObserver === 'undefined') {\n startTimeout();\n return;\n }\n\n const observer = new IntersectionObserver(\n (entries) => {\n const [entry] = entries;\n if (!entry?.isIntersecting) return;\n\n startTimeout();\n observer.disconnect();\n },\n {\n root: listRef.current,\n threshold: 0.5,\n },\n );\n\n observer.observe(element);\n\n return () => {\n observer.disconnect();\n };\n }, [notification, startNotificationTimeout, transitionState]);\n\n if (!notification) return null;\n\n return (\n <div\n aria-label={t('aria/Notifications')}\n className={clsx(\n 'str-chat__notification-list',\n `str-chat__notification-list--enter-from-${notificationEnterFrom}`,\n `str-chat__notification-list--position-${verticalAlignment}`,\n panel && `str-chat__notification-list--${panel}`,\n className,\n )}\n data-testid='notification-list'\n ref={listRef}\n role='region'\n style={\n {\n '--str-chat__notification-list-enter-x':\n ENTER_TRANSLATION[notificationEnterFrom].x,\n '--str-chat__notification-list-enter-y':\n ENTER_TRANSLATION[notificationEnterFrom].y,\n } as React.CSSProperties\n }\n >\n <div\n aria-hidden\n className='str-chat__notification-list__edge str-chat__notification-list__edge--top'\n />\n <NotificationComponent\n entryDirection={notificationEnterFrom}\n key={notification.id}\n notification={notification}\n onDismiss={() => dismiss(notification.id)}\n ref={(element) => {\n observedElementRef.current = element;\n }}\n showClose={!notification.duration}\n transitionState={transitionState}\n />\n <div\n aria-hidden\n className='str-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