{"version":3,"file":"useNotificationApi.f91ae46b.mjs","sources":["../../src/context/ChannelActionContext.tsx","../../src/context/ChannelListContext.tsx","../../src/context/ChannelStateContext.tsx","../../src/context/ChatContext.tsx","../../src/context/ComponentContext.tsx","../../src/store/hooks/useStateStore.ts","../../src/context/MessageComposerContext.tsx","../../node_modules/dayjs/plugin/calendar.js","../../node_modules/dayjs/plugin/localizedFormat.js","../../src/i18n/utils.ts","../../src/context/TranslationContext.tsx","../../src/context/TypingContext.tsx","../../src/components/Notifications/notificationTarget.ts","../../src/components/Button/Button.tsx","../../src/components/Icons/BaseIcon.tsx","../../src/components/Icons/createIcon.tsx","../../src/components/Icons/icons.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/Loading/LoadingChannel.tsx","../../src/components/Loading/LoadingErrorIndicator.tsx","../../src/components/Channel/constants.ts","../../src/constants/limits.ts","../../src/components/Message/utils.tsx","../../src/components/Dialog/hooks/usePopoverPosition.ts","../../src/components/Thread/LegacyThreadContext.ts","../../src/components/AudioPlayback/AudioPlayer.ts","../../src/components/AudioPlayback/AudioPlayerPool.ts","../../src/components/AudioPlayback/plugins/AudioPlayerNotificationsPlugin.ts","../../src/components/AudioPlayback/WithAudioPlayback.tsx","../../src/components/MessageComposer/hooks/useIsCooldownActive.ts","../../src/components/MessageComposer/hooks/useMessageComposerController.ts","../../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"],"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';\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 { 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 { 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 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  /** 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 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 { 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 React, { createContext, useContext } from 'react';\nimport type { PropsWithChildren } from 'react';\n\nimport type { MessageComposerProps } from '../components/MessageComposer';\nimport type { UseMessageComposerBindingsParams } from '../components/MessageComposer/hooks/useMessageComposerBindings';\n\nexport type MessageComposerContextValue = UseMessageComposerBindingsParams &\n  Omit<MessageComposerProps, 'Input'>;\n\nexport const MessageComposerContext = createContext<\n  UseMessageComposerBindingsParams | undefined\n>(undefined);\n\nexport const MessageComposerContextProvider = ({\n  children,\n  value,\n}: PropsWithChildren<{\n  value: MessageComposerContextValue;\n}>) => (\n  <MessageComposerContext.Provider\n    value={value as unknown as MessageComposerContextValue}\n  >\n    {children}\n  </MessageComposerContext.Provider>\n);\n\nexport const useMessageComposerContext = (\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  componentName?: string,\n) => {\n  const contextValue = useContext(MessageComposerContext);\n\n  if (!contextValue) {\n    return {} as MessageComposerContextValue;\n  }\n\n  return contextValue as unknown as MessageComposerContextValue;\n};\n","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):e.dayjs_plugin_calendar=t()}(this,function(){\"use strict\";return function(e,t,a){var n=\"h:mm A\",d={lastDay:\"[Yesterday at] \"+n,sameDay:\"[Today at] \"+n,nextDay:\"[Tomorrow at] \"+n,nextWeek:\"dddd [at] \"+n,lastWeek:\"[Last] dddd [at] \"+n,sameElse:\"MM/DD/YYYY\"};t.prototype.calendar=function(e,t){var n=t||this.$locale().calendar||d,s=a(e||void 0).startOf(\"d\"),o=this.diff(s,\"d\",!0),i=o<-6?\"sameElse\":o<-1?\"lastWeek\":o<0?\"lastDay\":o<1?\"sameDay\":o<2?\"nextDay\":o<7?\"nextWeek\":\"sameElse\",f=n[i]||d[i];return\"function\"==typeof f?f.call(this,a()):this.format(f)}}});\n","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):e.dayjs_plugin_localizedFormat=t()}(this,function(){\"use strict\";var e={LTS:\"h:mm:ss A\",LT:\"h:mm A\",L:\"MM/DD/YYYY\",LL:\"MMMM D, YYYY\",LLL:\"MMMM D, YYYY h:mm A\",LLLL:\"dddd, MMMM D, YYYY h:mm A\"};return function(t,n,o){var r=n.prototype,M=r.format;o.en.formats=e,r.format=function(t){void 0===t&&(t=\"YYYY-MM-DDTHH:mm:ssZ\");var n=this.$locale().formats,o=function(t,n){return t.replace(/(\\[[^\\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,o,r){var M=r&&r.toUpperCase();return o||n[r]||e[r]||n[M].replace(/(\\[[^\\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,n){return t||n.slice(1)})})}(t,void 0===n?{}:n);return M.call(this,o)}}});\n","import Dayjs from 'dayjs';\nimport type { Duration as DayjsDuration } from 'dayjs/plugin/duration';\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      if (format && Dayjs.isDayjs(streamI18n.DateTimeParser)) {\n        return (streamI18n.DateTimeParser.duration(value) as DayjsDuration).format(\n          format,\n        );\n      }\n      return streamI18n.DateTimeParser.duration(value).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';\nimport localizedFormat from 'dayjs/plugin/localizedFormat';\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 type { Notification } from 'stream-chat';\n\nconst NOTIFICATION_TARGET_PANELS = [\n  'channel',\n  'thread',\n  'channel-list',\n  'thread-list',\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 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, { 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\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 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\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\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\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\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 React from 'react';\n\nimport { useTranslationContext } from '../../context/TranslationContext';\nimport { IconMessageBubble, IconMessageBubbles } from '../Icons';\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\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  const lastRead = channel.initialized && 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 { UserResponse } from 'stream-chat';\n\nexport type OnMentionAction = (\n  event: React.BaseSyntheticEvent,\n  user?: UserResponse,\n) => void;\n\nexport const useMentionsHandlers = (\n  onMentionsHover?: OnMentionAction,\n  onMentionsClick?: OnMentionAction,\n) =>\n  useCallback(\n    (event: React.BaseSyntheticEvent, mentioned_users: UserResponse[]) => {\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          onMentionsHover(event, user);\n        }\n\n        if (\n          onMentionsClick &&\n          event.type === 'click' &&\n          typeof onMentionsClick === 'function'\n        ) {\n          onMentionsClick(event, user);\n        }\n      }\n    },\n    [onMentionsClick, onMentionsHover],\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","export const CHANNEL_CONTAINER_ID = 'str-chat__channel';\n","export const DEFAULT_NEXT_CHANNEL_PAGE_SIZE = 25;\nexport const DEFAULT_JUMP_TO_PAGE_SIZE = 25;\nexport const DEFAULT_THREAD_PAGE_SIZE = 25;\nexport const DEFAULT_LOAD_PAGE_SCROLL_THRESHOLD = 250;\nexport const DEFAULT_HIGHLIGHT_DURATION = 500;\n","import deepequal from 'react-fast-compare';\nimport emojiRegex from 'emoji-regex';\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(emojiRegex());\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(emojiRegex(), '');\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 {\n  autoPlacement,\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';\nimport type { AutoPlacementOptions } from '@floating-ui/core';\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 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 { 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 React, { useContext, useState } from 'react';\nimport { useEffect } 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';\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  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 { useChannelStateContext } from '../../../context';\nimport { useStateStore } from '../../../store';\nimport type { CooldownTimerState } from 'stream-chat';\n\nconst cooldownTimerStateSelector = (state: CooldownTimerState) => ({\n  isCooldownActive: !!state.cooldownRemaining,\n});\n\nexport const useIsCooldownActive = () => {\n  const { channel } = useChannelStateContext();\n  return useStateStore(channel.cooldownTimer.state, cooldownTimerStateSelector)\n    .isCooldownActive;\n};\n","import { useEffect, useMemo } from 'react';\nimport {\n  FixedSizeQueueCache,\n  MessageComposer as MessageComposerController,\n} from 'stream-chat';\nimport { useThreadContext } from '../../Threads';\nimport { useChannelStateContext, useChatContext } from '../../../context';\nimport { useLegacyThreadContext } from '../../Thread';\n\nconst queueCache = new FixedSizeQueueCache<string, MessageComposerController>(64);\n\nexport const useMessageComposerController = () => {\n  const { client } = useChatContext();\n  const { channel } = useChannelStateContext();\n  const { legacyThread: parentMessage } = useLegacyThreadContext();\n  const threadInstance = useThreadContext();\n\n  const cachedParentMessage = useMemo(() => {\n    if (!parentMessage) return undefined;\n\n    return parentMessage;\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [parentMessage?.id]);\n\n  // composer hierarchy\n  // edited message (always new) -> thread instance (own) -> thread message (always new) -> channel (own)\n  // editedMessage ?? thread ?? parentMessage ?? channel;\n  const messageComposer = useMemo(() => {\n    if (threadInstance) {\n      return threadInstance.messageComposer;\n    } else if (cachedParentMessage) {\n      const compositionContext = {\n        ...cachedParentMessage,\n        legacyThreadId: cachedParentMessage.id,\n      };\n\n      const tag = MessageComposerController.constructTag(compositionContext);\n\n      const cachedComposer = queueCache.get(tag);\n      if (cachedComposer) return cachedComposer;\n\n      return new MessageComposerController({\n        client,\n        compositionContext,\n      });\n    } else {\n      return channel.messageComposer;\n    }\n  }, [cachedParentMessage, channel, client, threadInstance]);\n\n  if (\n    (['legacy_thread', 'message'] as MessageComposerController['contextType'][]).includes(\n      messageComposer.contextType,\n    ) &&\n    !queueCache.peek(messageComposer.tag)\n  ) {\n    queueCache.add(messageComposer.tag, messageComposer);\n  }\n\n  useEffect(() => {\n    const unsubscribe = messageComposer.registerSubscriptions();\n    return () => {\n      unsubscribe();\n    };\n  }, [messageComposer]);\n\n  return messageComposer;\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\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 && Object.keys(message.reaction_groups).length > 0) ||\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 &&\n      Object.keys(nextMessage.reaction_groups).length > 0) ||\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  type MessageResponse,\n} from 'stream-chat';\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","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 } 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} from './utils';\nimport { useThreadContext } from '../Threads';\nimport { getChannel } from '../../utils';\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('Channel');\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(channel.getConfig());\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 = throttle(\n    () => dispatch({ channel, type: 'copyStateFromChannelOnEvent' }),\n    500,\n    {\n      leading: true,\n      trailing: true,\n    },\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 || !channelConfig?.read_events) {\n            return;\n          }\n\n          lastRead.current = new Date();\n\n          try {\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            if (activeUnreadHandler) {\n              activeUnreadHandler(0, originalTitle.current);\n            } else if (originalTitle.current) {\n              document.title = originalTitle.current;\n            }\n          } catch (e) {\n            console.error(t('Failed to mark channel as read'));\n          }\n        },\n        500,\n        { leading: true, trailing: false },\n      ),\n    [\n      activeUnreadHandler,\n      channel,\n      channelConfig,\n      doMarkReadRequest,\n      setChannelUnreadUiState,\n      t,\n    ],\n  );\n\n  const handleEvent = async (event: Event) => {\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 &&\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 === '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(ownReadState);\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      !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      !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 doSendMessage = async ({\n    localMessage,\n    message,\n    options,\n  }: {\n    localMessage: LocalMessage;\n    message: Message;\n    options?: SendMessageOptions;\n  }) => {\n    try {\n      let messageResponse: void | SendMessageAPIResponse;\n\n      if (doSendMessageRequest) {\n        messageResponse = await doSendMessageRequest(channel, message, options);\n      } else {\n        messageResponse = await channel.sendMessage(message, 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  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  <div className='str-chat__unread-count-badge-container'>\n    {children}\n    {count > 0 && (\n      <div\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 * Right now, a11y in ChatView does one thing: it provides correct ARIA\n * relationships for tabs.\n *\n * Specifically:\n * - ChatView.Selector is role=\"tablist\".\n * - Each selector button is role=\"tab\" with:\n *   - unique id\n *   - aria-controls=<panel-id>\n *   - aria-selected\n *   - tabIndex=0 (all tabs tabbable)\n * - Active panel container is role=\"tabpanel\" with:\n *   - id=<panel-id>\n *   - aria-labelledby=<tab-id>\n *\n * The a11y helper module exists to generate and share those tab/panel IDs per\n * ChatView instance, so tab ↔ tabpanel linkage stays correct and collision-safe\n * when multiple ChatViews exist.\n */\nexport type ChatViewA11yContextValue = {\n  // tab.id -> panel[aria-labelledby], and tab[aria-controls] -> panel.id\n  chatViewPanelIds: Record<'channels' | 'threads', string>;\n  chatViewTabIds: 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  chatViewTabIds: {\n    channels: 'str-chat__chat-view-tab-channels',\n    threads: 'str-chat__chat-view-tab-threads',\n  },\n};\n\nexport const createChatViewA11yContextValue = (\n  chatViewId: string,\n): ChatViewA11yContextValue => ({\n  // Keep IDs unique per ChatView instance so ARIA references do not collide.\n  chatViewPanelIds: {\n    channels: `str-chat__chat-view-${chatViewId}-panel-channels`,\n    threads: `str-chat__chat-view-${chatViewId}-panel-threads`,\n  },\n  chatViewTabIds: {\n    channels: `str-chat__chat-view-${chatViewId}-tab-channels`,\n    threads: `str-chat__chat-view-${chatViewId}-tab-threads`,\n  },\n});\n","import clsx from 'clsx';\nimport React, {\n  type ComponentType,\n  createContext,\n  useContext,\n  useEffect,\n  useId,\n  useMemo,\n  useState,\n} from 'react';\n\nimport { Button, type ButtonProps } from '../Button';\nimport { EmptyStateIndicator as DefaultEmptyStateIndicator } from '../EmptyStateIndicator';\nimport {\n  IconMessageBubble,\n  IconMessageBubbleFill,\n  IconThread,\n  IconThreadFill,\n} from '../Icons';\nimport { ThreadProvider } from '../Threads';\nimport { UnreadCountBadge } from '../Threads/UnreadCountBadge';\nimport {\n  useChatContext,\n  useComponentContext,\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 accessibility contract (WAI-ARIA Tabs):\n * 1) Selector container is role=\"tablist\".\n * 2) Each selector button is role=\"tab\", with id + aria-controls=<panel-id>.\n * 3) Each view container is role=\"tabpanel\", with id + aria-labelledby=<tab-id>.\n * 4) Tab activation updates the active panel.\n * 5) Tabs are always tabbable (tabIndex=0), so users can reach both without\n *    arrow-key navigation.\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 = useId().replace(/:/g, '');\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, chatViewTabIds } = useChatViewA11yContext();\n  const isActive = activeChatView === 'channels';\n\n  if (!isActive) return null;\n\n  return (\n    <div\n      aria-labelledby={chatViewTabIds.channels}\n      className='str-chat__chat-view__channels'\n      id={chatViewPanelIds.channels}\n      role='tabpanel'\n    >\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, chatViewTabIds } = 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\n        aria-labelledby={chatViewTabIds.threads}\n        className='str-chat__chat-view__threads'\n        id={chatViewPanelIds.threads}\n        role='tabpanel'\n      >\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.addEventListener('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-label={props['aria-label'] ?? (shouldShowTooltip ? text : undefined)}\n        className={clsx('str-chat__chat-view__selector-button', className)}\n        role='tab'\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 { chatViewPanelIds, chatViewTabIds } = useChatViewA11yContext();\n  const { t } = useTranslationContext();\n\n  const isActive = activeChatView === 'channels';\n\n  return (\n    <ChatViewSelectorButton\n      ActiveIcon={IconMessageBubbleFill}\n      // tab -> tabpanel wiring\n      aria-controls={chatViewPanelIds.channels}\n      aria-selected={isActive}\n      Icon={IconMessageBubble}\n      iconOnly={iconOnly}\n      id={chatViewTabIds.channels}\n      isActive={isActive}\n      onClick={() => setActiveChatView('channels')}\n      onPointerDown={() => setActiveChatView('channels')}\n      tabIndex={0}\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 { chatViewPanelIds, chatViewTabIds } = useChatViewA11yContext();\n  const { t } = useTranslationContext();\n\n  const isActive = activeChatView === 'threads';\n\n  return (\n    <ChatViewSelectorButton\n      ActiveIcon={IconThreadFill}\n      // tab -> tabpanel wiring\n      aria-controls={chatViewPanelIds.threads}\n      aria-selected={isActive}\n      Icon={IconThread}\n      iconOnly={iconOnly}\n      id={chatViewTabIds.threads}\n      isActive={isActive}\n      onClick={() => setActiveChatView('threads')}\n      onPointerDown={() => setActiveChatView('threads')}\n      tabIndex={0}\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 tabs')}\n      className='str-chat__chat-view__selector'\n      // WAI-ARIA Tabs pattern: tablist owns the tab controls.\n      role='tablist'\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 { useChatContext } from '../../../context';\nimport {\n  addNotificationTargetTag,\n  getNotificationTargetTag,\n  type NotificationTargetPanel,\n} from '../notificationTarget';\nimport { useNotificationTarget } from './useNotificationTarget';\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  /** 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) => {\n  if (targetPanels) {\n    return Array.from(\n      new Set([...targetPanels.map(getNotificationTargetTag), ...(tags ?? [])]),\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\n  const addNotification: AddNotification = useCallback(\n    ({\n      actions,\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(targetPanels, inferredPanel, tags);\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        ...(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],\n  );\n\n  const addSystemNotification: AddSystemNotification = useCallback(\n    ({\n      actions,\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        ...(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"],"names":["this","e","t","n","o","r","M","calendar","localizedFormat","Button","size","type","prevMessage","nextMessage","offsetMw","offset","flipMw","shiftMw","sizeMw","durationSeconds","mimeType","playbackRates","el","MessageComposerController","EmptyStateIndicator","DefaultEmptyStateIndicator","LoadingErrorIndicator","DefaultLoadingIndicator","DefaultLoadingErrorIndicator"],"mappings":";;;;;;;;;;;;;AAsEO,MAAM,uBAAuB,MAAM,cAExC,MAAS;AAEJ,MAAM,wBAAwB,CAAC;AAAA,EACpC;AAAA,EACA;AACF,MAGE,oBAAC,qBAAqB,UAArB,EAA8B,OAC5B,SAAA,CACH;AAGK,MAAM,0BAA0B,CAAC,kBAA2B;AACjE,QAAM,eAAe,WAAW,oBAAoB;AAEpD,MAAI,CAAC,cAAc;AACjB,YAAQ;AAAA,MACN,uMAAuM,aAAa;AAAA,IAAA;AAGtN,WAAO,CAAA;AAAA,EACT;AAEA,SAAO;AACT;ACxEO,MAAM,qBAAqB;AAAA,EAChC;AACF;AAKO,MAAM,6BAA6B,C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