movius-chats 1.4.13 → 1.4.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/lib/commonjs/index.js +4 -4
  2. package/lib/commonjs/index.js.map +1 -1
  3. package/lib/module/index.js +4 -4
  4. package/lib/module/index.js.map +1 -1
  5. package/lib/typescript/components/VoiceRecorder/VoiceRecorder.d.ts +37 -0
  6. package/lib/typescript/components/VoiceRecorder/VoiceRecorderFlow.d.ts +29 -0
  7. package/lib/typescript/components/VoiceRecorder/VoiceRecordingGesture.d.ts +25 -0
  8. package/lib/typescript/index.d.ts +3 -0
  9. package/package.json +5 -3
  10. package/src/components/ChatInput/ChatInput.tsx +92 -273
  11. package/src/components/VoiceRecorder/VoiceRecorder.tsx +388 -0
  12. package/src/components/VoiceRecorder/VoiceRecorderFlow.tsx +910 -0
  13. package/src/components/VoiceRecorder/VoiceRecordingGesture.tsx +404 -0
  14. package/src/index.tsx +17 -0
  15. package/lib/typescript/components/VoiceRecorder/AnimatedHoldMic.d.ts +0 -10
  16. package/lib/typescript/components/VoiceRecorder/LockSlideColumn.d.ts +0 -11
  17. package/lib/typescript/components/VoiceRecorder/LongPressRecording.d.ts +0 -14
  18. package/lib/typescript/components/VoiceRecorder/NormalRecording.d.ts +0 -22
  19. package/lib/typescript/components/VoiceRecorder/WaveformAnimation.d.ts +0 -12
  20. package/lib/typescript/components/VoiceRecorder/recordingContainerStyle.d.ts +0 -4
  21. package/src/components/VoiceRecorder/AnimatedHoldMic.tsx +0 -47
  22. package/src/components/VoiceRecorder/LockSlideColumn.tsx +0 -114
  23. package/src/components/VoiceRecorder/LongPressRecording.tsx +0 -103
  24. package/src/components/VoiceRecorder/NormalRecording.tsx +0 -235
  25. package/src/components/VoiceRecorder/WaveformAnimation.tsx +0 -90
  26. package/src/components/VoiceRecorder/recordingContainerStyle.ts +0 -19
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/assets/Icons/ArrowBack2RoundedIcon.tsx","../../src/context/ChatContext.tsx","../../src/utils/bubbleTheme.ts","../../src/utils/messageMedia.ts","../../src/utils/theme.ts","../../node_modules/react-is/index.js","../../node_modules/react-is/cjs/react-is.production.min.js","../../node_modules/react-is/cjs/react-is.development.js","../../node_modules/object-assign/index.js","../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../../node_modules/prop-types/lib/has.js","../../node_modules/prop-types/checkPropTypes.js","../../node_modules/prop-types/factoryWithTypeCheckers.js","../../node_modules/prop-types/factoryWithThrowingShims.js","../../node_modules/prop-types/index.js","../../node_modules/react-native-parsed-text/src/lib/TextExtraction.js","../../node_modules/react-native-parsed-text/src/ParsedText.js","../../src/assets/Icons/PauseIcon.tsx","../../src/assets/Icons/PlayIcon.tsx","../../src/context/AudioContext.tsx","../../src/utils/datefunc.ts","../../src/components/AudioPlayer/types.ts","../../src/components/AudioPlayer/AudioPlayer.tsx","../../src/assets/Icons/LoadingIcon.tsx","../../src/components/ChatBubble/MediaGrid.tsx","../../src/components/ChatBubble/MessageContent.tsx","../../src/assets/Icons/CheckAllIcon.tsx","../../src/assets/Icons/CheckIcon.tsx","../../src/components/ChatBubble/MessageStatus.tsx","../../src/components/ChatBubble/ChatBubble.tsx","../../src/assets/Icons/CameraIcon.tsx","../../src/assets/Icons/EmojiFunnySquareIcon.tsx","../../src/assets/Icons/MicrophoneIcon.tsx","../../src/assets/Icons/PaperClipIcon.tsx","../../src/assets/Icons/PaperPlaneIcon.tsx","../../src/components/VoiceRecorder/AnimatedHoldMic.tsx","../../src/assets/Icons/ChevronUpIcon.tsx","../../src/assets/Icons/LockIcon.tsx","../../src/components/VoiceRecorder/LockSlideColumn.tsx","../../src/components/VoiceRecorder/LongPressRecording.tsx","../../src/assets/Icons/TrashIcon.tsx","../../src/components/VoiceRecorder/WaveformAnimation.tsx","../../src/components/VoiceRecorder/NormalRecording.tsx","../../src/hooks/useVoiceRecorder.ts","../../src/assets/Icons/FileIcon.tsx","../../src/components/ChatInput/TruncateFileName.tsx","../../src/components/ChatInput/FilePreview.tsx","../../src/components/ChatInput/ChatInput.tsx","../../src/components/VoiceRecorder/recordingContainerStyle.ts","../../src/assets/Icons/XIcon.tsx","../../src/components/MediaViewer/MediaViewer.tsx","../../src/components/TypingComponent/TypingIndicator.tsx","../../src/index.tsx","../../src/hooks/useKeyboardInset.ts"],"sourcesContent":["import { ViewStyle } from 'react-native';\nimport Svg, { Path } from 'react-native-svg';\n\nexport const ArrowBack2RoundedIcon = ({\n style,\n color,\n}: {\n style?: ViewStyle;\n color?: string;\n}) => {\n return (\n <Svg style={style} viewBox=\"0 0 48 48\">\n <Path\n fill={color}\n fillRule=\"evenodd\"\n stroke={color}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"4\"\n d=\"M8 9.115c0-1.82 2.235-2.694 3.47-1.356l29.432 31.884c1.182 1.282.273 3.357-1.47 3.357H10a2 2 0 0 1-2-2z\"\n clipRule=\"evenodd\"\n ></Path>\n </Svg>\n );\n};\n","import React, { createContext, useContext, useState } from 'react';\nimport { ChatScreenProps, MessageMediaItem } from '../types';\n\n/** Full-screen swipe viewer state */\nexport interface MediaViewerGalleryState {\n items: MessageMediaItem[];\n initialIndex: number;\n}\n\ninterface ChatContextType extends ChatScreenProps {\n mediaViewerGallery: MediaViewerGalleryState | null;\n setMediaViewerGallery: (\n items: MessageMediaItem[],\n initialIndex: number\n ) => void;\n clearMediaViewerGallery: () => void;\n isVideoPlaying: boolean;\n setIsVideoPlaying: (playing: boolean) => void;\n}\n\nconst ChatContext = createContext<ChatContextType | undefined>(undefined);\n\nexport const ChatProvider: React.FC<\n ChatScreenProps & { children: React.ReactNode }\n> = ({ children, ...props }) => {\n const [mediaViewerGallery, setMediaViewerGalleryState] =\n useState<MediaViewerGalleryState | null>(null);\n const [isVideoPlaying, setIsVideoPlaying] = useState(false);\n\n const setMediaViewerGallery = (\n items: MessageMediaItem[],\n initialIndex: number\n ) => {\n setMediaViewerGalleryState({ items, initialIndex });\n const cur = items[initialIndex];\n setIsVideoPlaying(cur?.kind === 'video');\n };\n\n const clearMediaViewerGallery = () => {\n setMediaViewerGalleryState(null);\n setIsVideoPlaying(false);\n };\n\n return (\n <ChatContext.Provider\n value={{\n ...props,\n mediaViewerGallery,\n setMediaViewerGallery,\n clearMediaViewerGallery,\n isVideoPlaying,\n setIsVideoPlaying,\n }}\n >\n {children}\n </ChatContext.Provider>\n );\n};\n\nexport const useChatContext = () => {\n const context = useContext(ChatContext);\n if (!context) {\n throw new Error('useChatContext must be used within a ChatProvider');\n }\n return context;\n};\n","import type { ChatScreenProps } from '../types';\n\ntype Theme = ChatScreenProps['theme'];\ntype Colors = NonNullable<Theme>['colors'];\n\nfunction colors(theme?: Theme): Colors | undefined {\n return theme?.colors;\n}\n\nexport function getMessageTimestampColor(\n theme: Theme | undefined,\n isCurrentUser: boolean\n): string {\n const c = colors(theme);\n if (isCurrentUser) {\n return c?.sentTimestampColor ?? 'rgba(255, 255, 255, 0.75)';\n }\n return c?.receivedTimestampColor ?? 'rgba(107, 114, 128, 0.85)';\n}\n\nexport function getMediaTimestampColor(\n theme: Theme | undefined,\n isCurrentUser: boolean\n): string {\n const c = colors(theme);\n if (isCurrentUser) {\n return c?.sentTimestampColor ?? 'rgba(255, 255, 255, 0.75)';\n }\n return c?.receivedTimestampColor ?? 'rgba(107, 114, 128, 0.85)';\n}\n\nexport function getMediaTimestampContainerStyle(\n theme: Theme | undefined,\n isCurrentUser: boolean\n) {\n const base = { paddingHorizontal: 8, paddingVertical: 4, borderRadius: 6 };\n const c = colors(theme);\n const bg = isCurrentUser\n ? (c?.sentMediaTimestampBackground ?? 'rgba(0,0,0,0.45)')\n : (c?.receivedMediaTimestampBackground ?? 'rgba(0,0,0,0.45)');\n\n const custom = isCurrentUser\n ? theme?.messageStyle?.sentMediaTimestampContainerStyle\n : theme?.messageStyle?.receivedMediaTimestampContainerStyle;\n\n return { ...base, backgroundColor: bg, ...custom };\n}\n\nexport function getFileAttachmentBackground(\n theme: Theme | undefined,\n isCurrentUser: boolean\n): string {\n const c = colors(theme);\n if (isCurrentUser) {\n return c?.sentFileAttachmentBackground ?? 'rgba(255, 255, 255, 0.15)';\n }\n return c?.receivedFileAttachmentBackground ?? 'rgba(0, 0, 0, 0.08)';\n}\n\nexport function getFileAttachmentTextColor(\n theme: Theme | undefined,\n isCurrentUser: boolean\n): string {\n const c = colors(theme);\n if (isCurrentUser) {\n return c?.sentFileAttachmentTextColor ?? '#ffffff';\n }\n return c?.receivedFileAttachmentTextColor ?? '#1f2937';\n}\n\nexport function getFileAttachmentSubtitleColor(\n theme: Theme | undefined,\n isCurrentUser: boolean\n): string {\n const c = colors(theme);\n if (isCurrentUser) {\n return c?.sentFileAttachmentSubtitleColor ?? 'rgba(255,255,255,0.7)';\n }\n return c?.receivedFileAttachmentSubtitleColor ?? 'rgba(31,41,55,0.65)';\n}\n\nexport function getAudioWaveformColors(\n theme: Theme | undefined,\n isCurrentUser: boolean\n): { inactive: string; active: string } {\n const c = colors(theme);\n if (isCurrentUser) {\n return {\n inactive: c?.sentAudioWaveformColor ?? 'rgba(255,255,255,0.35)',\n active: c?.sentAudioWaveformActiveColor ?? 'rgba(255,255,255,0.95)',\n };\n }\n return {\n inactive: c?.receivedAudioWaveformColor ?? 'rgba(0,0,0,0.20)',\n active: c?.receivedAudioWaveformActiveColor ?? 'rgba(0,0,0,0.60)',\n };\n}\n\nexport function getAudioDurationColor(\n theme: Theme | undefined,\n isCurrentUser: boolean\n): string {\n const c = colors(theme);\n if (isCurrentUser) {\n return (\n c?.sentAudioTimestampColor ??\n c?.sentTimestampColor ??\n 'rgba(255,255,255,0.75)'\n );\n }\n return (\n c?.receivedAudioTimestampColor ??\n c?.receivedTimestampColor ??\n 'rgba(0,0,0,0.45)'\n );\n}\n\nexport function getAudioPlayIconColor(\n theme: Theme | undefined,\n isCurrentUser: boolean\n): string {\n const c = colors(theme);\n if (isCurrentUser) {\n return c?.sentAudioPlayIconColor ?? '#ffffff';\n }\n return c?.receivedAudioPlayIconColor ?? '#374151';\n}\n\nexport function getAudioPauseIconColor(\n theme: Theme | undefined,\n isCurrentUser: boolean\n): string {\n const c = colors(theme);\n if (isCurrentUser) {\n return c?.sentAudioPauseIconColor ?? '#ffffff';\n }\n return c?.receivedAudioPauseIconColor ?? '#374151';\n}\n\nexport function getAudioPlayButtonBackground(\n theme: Theme | undefined,\n isCurrentUser: boolean\n): string {\n const c = colors(theme);\n if (isCurrentUser) {\n return c?.sentAudioPlayButtonBackground ?? 'rgba(0,0,0,0.35)';\n }\n return c?.receivedAudioPlayButtonBackground ?? 'rgba(0,0,0,0.08)';\n}\n\nexport function getAudioSpeedTextColor(\n theme: Theme | undefined,\n isCurrentUser: boolean\n): string {\n const c = colors(theme);\n if (isCurrentUser) {\n return c?.sentAudioSpeedTextColor ?? '#ffffff';\n }\n return c?.receivedAudioSpeedTextColor ?? '#e5e7eb';\n}\n\nexport function getMessageTextColor(\n theme: Theme | undefined,\n isCurrentUser: boolean\n): string | undefined {\n const c = colors(theme);\n return isCurrentUser ? c?.sentMessageTextColor : c?.receivedMessageTextColor;\n}\n\nexport function getBubbleBackgroundColor(\n theme: Theme | undefined,\n isCurrentUser: boolean\n): string | undefined {\n const c = colors(theme);\n return isCurrentUser\n ? c?.sentBubbleBackgroundColor\n : c?.receivedBubbleBackgroundColor;\n}\n","import type { Message, MessageMediaItem } from '../types';\n\n/** Merge legacy `image` / `video` with `mediaItems` (array wins when non-empty). */\nexport function collectMediaItems(message: Message): MessageMediaItem[] {\n if (message.mediaItems && message.mediaItems.length > 0) {\n return message.mediaItems;\n }\n const out: MessageMediaItem[] = [];\n if (message.image) {\n out.push({ uri: message.image, kind: 'image' });\n }\n if (message.video) {\n out.push({ uri: message.video, kind: 'video' });\n }\n return out;\n}\n","import { Platform, StyleProp, TextStyle, ViewStyle } from 'react-native';\nimport tw from 'twrnc';\n\nconst DEFAULT_INPUT_BAR_ICON_CLASS =\n Platform.OS === 'ios' ? 'h-6 w-6' : 'w-6 h-6';\n\nconst DEFAULT_INPUT_BAR_ICON_PX = 24;\n\nexport function getInputBarIconPixelSize(size?: string | number): number {\n if (typeof size === 'number' && size > 0) {\n return size;\n }\n return DEFAULT_INPUT_BAR_ICON_PX;\n}\n\n/** Size for emoji, attachment, and camera icons only (not send/mic). */\nexport function getInputBarIconStyle(size?: string | number): ViewStyle {\n if (typeof size === 'number' && size > 0) {\n return { width: size, height: size };\n }\n\n const sizeClass =\n typeof size === 'string' && size.trim().length > 0\n ? size.trim()\n : DEFAULT_INPUT_BAR_ICON_CLASS;\n\n return tw.style(sizeClass);\n}\n\n/** Applies theme.fontFamily to any Text / ParsedText style array. */\nexport function withFontFamily(\n style: StyleProp<TextStyle>,\n fontFamily?: string\n): StyleProp<TextStyle> {\n if (!fontFamily) {\n return style;\n }\n return [style, { fontFamily }];\n}\n\nexport function getFontFamilyStyle(fontFamily?: string): TextStyle | undefined {\n return fontFamily ? { fontFamily } : undefined;\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","/** @license React v16.13.1\n * react-is.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar hasSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\nvar REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\nvar REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\nvar REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\nvar REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\nvar REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\nvar REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary\n// (unstable) APIs that have been removed. Can we remove the symbols?\n\nvar REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;\nvar REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\nvar REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\nvar REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\nvar REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;\nvar REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\nvar REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\nvar REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;\nvar REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;\nvar REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;\nvar REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;\n\nfunction isValidElementType(type) {\n return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.\n type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);\n}\n\nfunction typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n\n switch (type) {\n case REACT_ASYNC_MODE_TYPE:\n case REACT_CONCURRENT_MODE_TYPE:\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n return type;\n\n default:\n var $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n\n default:\n return $$typeof;\n }\n\n }\n\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n} // AsyncMode is deprecated along with isAsyncMode\n\nvar AsyncMode = REACT_ASYNC_MODE_TYPE;\nvar ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}\nfunction isConcurrentMode(object) {\n return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;\n}\nfunction isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\n\nexports.AsyncMode = AsyncMode;\nexports.ConcurrentMode = ConcurrentMode;\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\nexports.isValidElementType = isValidElementType;\nexports.typeOf = typeOf;\n })();\n}\n","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","module.exports = Function.call.bind(Object.prototype.hasOwnProperty);\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n var loggedTypeFailures = {};\n var has = require('./lib/has');\n\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) { /**/ }\n };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (process.env.NODE_ENV !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n var err = Error(\n (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +\n 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'\n );\n err.name = 'Invariant Violation';\n throw err;\n }\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n if (error && !(error instanceof Error)) {\n printWarning(\n (componentName || 'React class') + ': type specification of ' +\n location + ' `' + typeSpecName + '` is invalid; the type checker ' +\n 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +\n 'You may have forgotten to pass an argument to the type checker ' +\n 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +\n 'shape all require an argument).'\n );\n }\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n printWarning(\n 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')\n );\n }\n }\n }\n }\n}\n\n/**\n * Resets warning cache when testing.\n *\n * @private\n */\ncheckPropTypes.resetWarningCache = function() {\n if (process.env.NODE_ENV !== 'production') {\n loggedTypeFailures = {};\n }\n}\n\nmodule.exports = checkPropTypes;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactIs = require('react-is');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar has = require('./lib/has');\nvar checkPropTypes = require('./checkPropTypes');\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n return null;\n}\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<<anonymous>>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bigint: createPrimitiveTypeChecker('bigint'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n elementType: createElementTypeTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker,\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message, data) {\n this.message = message;\n this.data = data && typeof data === 'object' ? data: {};\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (process.env.NODE_ENV !== 'production') {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use `PropTypes.checkPropTypes()` to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n printWarning(\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),\n {expectedType: expectedType}\n );\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!ReactIs.isValidElementType(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n if (process.env.NODE_ENV !== 'production') {\n if (arguments.length > 1) {\n printWarning(\n 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +\n 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'\n );\n } else {\n printWarning('Invalid argument supplied to oneOf, expected an array.');\n }\n }\n return emptyFunctionThatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {\n var type = getPreciseType(value);\n if (type === 'symbol') {\n return String(value);\n }\n return value;\n });\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (has(propValue, key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunctionThatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n printWarning(\n 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'\n );\n return emptyFunctionThatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var expectedTypes = [];\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);\n if (checkerResult == null) {\n return null;\n }\n if (checkerResult.data && has(checkerResult.data, 'expectedType')) {\n expectedTypes.push(checkerResult.data.expectedType);\n }\n }\n var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function invalidValidatorError(componentName, location, propFullName, key, type) {\n return new PropTypeError(\n (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'\n );\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (has(shapeTypes, key) && typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n if (!checker) {\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') +\n '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')\n );\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // falsy value can't be a Symbol\n if (!propValue) {\n return false;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * If you want to provide a custom regexp, this is the configuration to use.\n * -- For historical reasons, all regexps are processed as if they have the global flag set.\n * -- Use the nonExhaustiveModeMaxMatchCount property to match a limited number of matches.\n * Note: any additional keys/props are permitted, and will be returned as-is!\n * @typedef {Object} CustomParseShape\n * @property {RegExp} pattern\n * @property {number} [nonExhaustiveModeMaxMatchCount] Enables \"non-exhaustive mode\", where you can limit how many matches are found. -- Must be a positive integer or Infinity matches are permitted\n * @property {Function} [renderText] arbitrary function to rewrite the matched string into something else\n * @property {Function} [onPress]\n * @property {Function} [onLongPress]\n */\n/**\n * Class to encapsulate the business logic of converting text into matches & props\n */\nclass TextExtraction {\n /**\n * @param {String} text - Text to be parsed\n * @param {CustomParseShape[]} patterns - Patterns to be used when parsed,\n * any extra attributes, will be returned from parse()\n */\n constructor(text, patterns) {\n this.text = text;\n this.patterns = patterns || [];\n }\n\n /**\n * Returns parts of the text with their own props\n * @public\n * @return {Object[]} - props for all the parts of the text\n */\n parse() {\n let parsedTexts = [{ children: this.text }];\n this.patterns.forEach((pattern) => {\n let newParts = [];\n\n const tmp = pattern.nonExhaustiveModeMaxMatchCount || 0;\n const numberOfMatchesPermitted = Math.min(\n Math.max(Number.isInteger(tmp) ? tmp : 0, 0) ||\n Number.POSITIVE_INFINITY,\n Number.POSITIVE_INFINITY,\n );\n\n let currentMatches = 0;\n\n parsedTexts.forEach((parsedText) => {\n // Only allow for now one parsing\n if (parsedText._matched) {\n newParts.push(parsedText);\n return;\n }\n\n let parts = [];\n let textLeft = parsedText.children;\n let indexOfMatchedString = 0;\n\n /** @type {RegExpExecArray} */\n let matches;\n // Global RegExps are stateful, this makes it start at 0 if reused\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/exec\n pattern.pattern.lastIndex = 0;\n while (textLeft && (matches = pattern.pattern.exec(textLeft))) {\n let previousText = textLeft.substr(0, matches.index);\n indexOfMatchedString = matches.index;\n\n if (++currentMatches > numberOfMatchesPermitted) {\n // Abort if we've exhausted our number of matches\n break;\n }\n\n parts.push({ children: previousText });\n\n parts.push(\n this.getMatchedPart(\n pattern,\n matches[0],\n matches,\n indexOfMatchedString,\n ),\n );\n\n textLeft = textLeft.substr(matches.index + matches[0].length);\n indexOfMatchedString += matches[0].length - 1;\n // Global RegExps are stateful, this makes it operate on the \"remainder\" of the string\n pattern.pattern.lastIndex = 0;\n }\n\n parts.push({ children: textLeft });\n\n newParts.push(...parts);\n });\n\n parsedTexts = newParts;\n });\n\n // Remove _matched key.\n parsedTexts.forEach((parsedText) => delete parsedText._matched);\n\n return parsedTexts.filter((t) => !!t.children);\n }\n\n // private\n\n /**\n * @protected\n * @param {ParseShape} matchedPattern - pattern configuration of the pattern used to match the text\n * @param {String} text - Text matching the pattern\n * @param {String[]} matches - Result of the RegExp.exec\n * @param {Integer} index - Index of the matched string in the whole string\n * @return {Object} props for the matched text\n */\n getMatchedPart(matchedPattern, text, matches, index) {\n let props = {};\n\n Object.keys(matchedPattern).forEach((key) => {\n if (\n key === 'pattern' ||\n key === 'renderText' ||\n key === 'nonExhaustiveModeMaxMatchCount'\n ) {\n return;\n }\n\n if (typeof matchedPattern[key] === 'function') {\n // Support onPress / onLongPress functions\n props[key] = () => matchedPattern[key](text, index);\n } else {\n // Set a prop with an arbitrary name to the value in the match-config\n props[key] = matchedPattern[key];\n }\n });\n\n let children = text;\n if (\n matchedPattern.renderText &&\n typeof matchedPattern.renderText === 'function'\n ) {\n children = matchedPattern.renderText(text, matches);\n }\n\n return {\n ...props,\n children: children,\n _matched: true,\n };\n }\n}\n\nexport default TextExtraction;\n","import React from 'react';\nimport { Text } from 'react-native';\nimport PropTypes from 'prop-types';\n\nimport TextExtraction from './lib/TextExtraction';\n\n/**\n * This is a list of the known patterns that are provided by this library\n * @typedef {('url'|'phone'|'email')} KnownParsePattern\n */\n/**\n * @type {Object.<string, RegExp>}\n * // The keys really should be KnownParsePattern -- but this is unsupported in jsdoc, sadly\n */\nexport const PATTERNS = {\n /**\n * Segments/Features:\n * - http/https support https?\n * - auto-detecting loose domains if preceded by `www.`\n * - Localized & Long top-level domains \\.(xn--)?[a-z0-9-]{2,20}\\b\n * - Allowed query parameters & values, it's two blocks of matchers\n * ([-a-zA-Z0-9@:%_\\+,.~#?&\\/=]*[-a-zA-Z0-9@:%_\\+~#?&\\/=])*\n * - First block is [-a-zA-Z0-9@:%_\\+\\[\\],.~#?&\\/=]* -- this matches parameter names & values (including commas, dots, opening & closing brackets)\n * - The first block must be followed by a closing block [-a-zA-Z0-9@:%_\\+\\]~#?&\\/=] -- this doesn't match commas, dots, and opening brackets\n */\n url: /(https?:\\/\\/|www\\.)[-a-zA-Z0-9@:%._\\+~#=]{1,256}\\.(xn--)?[a-z0-9-]{2,20}\\b([-a-zA-Z0-9@:%_\\+\\[\\],.~#?&\\/=]*[-a-zA-Z0-9@:%_\\+\\]~#?&\\/=])*/i,\n phone: /[\\+]?[(]?[0-9]{3}[)]?[-\\s\\.]?[0-9]{3}[-\\s\\.]?[0-9]{4,7}/,\n email: /\\S+@\\S+\\.\\S+/,\n};\n\n/**\n * This is for built-in-patterns already supported by this library\n * Note: any additional keys/props are permitted, and will be passed along as props to the <Text> component!\n * @typedef {Object} DefaultParseShape\n * @property {KnownParsePattern} [type] key of the known pattern you'd like to configure\n * @property {number} [nonExhaustiveModeMaxMatchCount] Enables \"non-exhaustive mode\", where you can limit how many matches are found. -- Must be a positive integer or Infinity matches are permitted\n * @property {Function} [renderText] arbitrary function to rewrite the matched string into something else\n * @property {Function} [onPress]\n * @property {Function} [onLongPress]\n */\nconst defaultParseShape = PropTypes.shape({\n ...Text.propTypes,\n type: PropTypes.oneOf(Object.keys(PATTERNS)).isRequired,\n nonExhaustiveMaxMatchCount: PropTypes.number,\n});\n\nconst customParseShape = PropTypes.shape({\n ...Text.propTypes,\n pattern: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(RegExp)])\n .isRequired,\n nonExhaustiveMaxMatchCount: PropTypes.number,\n});\n\n/**\n * The props added by this component\n * @typedef {DefaultParseShape|import('./lib/TextExtraction').CustomParseShape} ParsedTextAddedProps\n * @property {ParseShape[]} parse\n * @property {import('react-native').TextProps} childrenProps -- the props set on each child Text component\n */\n/** @typedef {ParsedTextAddedProps & import('react-native').TextProps} ParsedTextProps */\n\n/** @type {import('react').ComponentClass<ParsedTextProps>} */\nclass ParsedText extends React.Component {\n static displayName = 'ParsedText';\n\n static propTypes = {\n ...Text.propTypes,\n parse: PropTypes.arrayOf(\n PropTypes.oneOfType([defaultParseShape, customParseShape]),\n ),\n childrenProps: PropTypes.shape(Text.propTypes),\n };\n\n static defaultProps = {\n parse: null,\n childrenProps: {},\n };\n\n setNativeProps(nativeProps) {\n this._root.setNativeProps(nativeProps);\n }\n /** @returns {import('./lib/TextExtraction').CustomParseShape[]} */\n getPatterns() {\n return this.props.parse.map((option) => {\n const { type, ...patternOption } = option;\n if (type) {\n if (!PATTERNS[type]) {\n throw new Error(`${option.type} is not a supported type`);\n }\n patternOption.pattern = PATTERNS[type];\n }\n\n return patternOption;\n });\n }\n\n getParsedText() {\n if (!this.props.parse) {\n return this.props.children;\n }\n if (typeof this.props.children !== 'string') {\n return this.props.children;\n }\n\n const textExtraction = new TextExtraction(\n this.props.children,\n this.getPatterns(),\n );\n\n return textExtraction.parse().map((props, index) => {\n const { style: parentStyle } = this.props;\n const { style, ...remainder } = props;\n return (\n <Text\n key={`parsedText-${index}`}\n style={[parentStyle, style]}\n {...this.props.childrenProps}\n {...remainder}\n />\n );\n });\n }\n\n render() {\n // Discard custom props before passing remainder to Text\n const { parse, childrenProps, ...remainder } = { ...this.props };\n\n return (\n <Text ref={(ref) => (this._root = ref)} {...remainder}>\n {this.getParsedText()}\n </Text>\n );\n }\n}\n\nexport default ParsedText;\n","import { ViewStyle } from \"react-native\";\nimport Svg, { Path } from \"react-native-svg\";\n\nexport const PauseIcon = ({\n style,\n color,\n}: {\n style?: ViewStyle;\n color?: string;\n}) => {\n return (\n <Svg style={style} viewBox=\"0 0 15 15\">\n <Path\n fill={color}\n fillRule=\"evenodd\"\n d=\"M6.05 2.75a.55.55 0 0 0-1.1 0v9.5a.55.55 0 0 0 1.1 0zm4 0a.55.55 0 0 0-1.1 0v9.5a.55.55 0 0 0 1.1 0z\"\n clipRule=\"evenodd\"\n ></Path>\n </Svg>\n );\n};\n","import { ViewStyle } from \"react-native\";\n\nimport Svg, { Path } from \"react-native-svg\";\n\nexport const PlayIcon = ({\n style,\n color,\n}: {\n style?: ViewStyle;\n color?: string;\n}) => {\n return (\n <Svg style={style} viewBox=\"0 0 24 24\">\n <Path\n fill={color}\n d=\"M8 17.175V6.825q0-.425.3-.713t.7-.287q.125 0 .263.037t.262.113l8.15 5.175q.225.15.338.375t.112.475t-.112.475t-.338.375l-8.15 5.175q-.125.075-.262.113T9 18.175q-.4 0-.7-.288t-.3-.712\"\n ></Path>\n </Svg>\n );\n};\n","import React, { createContext, useContext, useState } from \"react\";\n\ninterface AudioContextType {\n currentlyPlayingId: string | null;\n setCurrentlyPlayingId: (id: string | null) => void;\n}\n\nconst AudioContext = createContext<AudioContextType | undefined>(undefined);\n\nexport const AudioProvider: React.FC<{ children: React.ReactNode }> = ({\n children,\n}) => {\n const [currentlyPlayingId, setCurrentlyPlayingId] = useState<string | null>(\n null\n );\n\n return (\n <AudioContext.Provider value={{ currentlyPlayingId, setCurrentlyPlayingId }}>\n {children}\n </AudioContext.Provider>\n );\n};\n\nexport const useAudio = () => {\n const context = useContext(AudioContext);\n if (!context) {\n throw new Error(\"useAudio must be used within an AudioProvider\");\n }\n return context;\n};"," export const formatDuration = (time: number) => {\n const minutes = Math.floor(time / 60);\n const seconds = Math.floor(time % 60);\n return `${minutes}:${seconds < 10 ? \"0\" : \"\"}${seconds}`;\n };","export interface AudioPlayerProps {\n audioUrl: string;\n audioId: string;\n isVideoPlaying: boolean;\n isCurrentUser: boolean;\n senderAvatar?: string;\n senderName?: string;\n reserveStatusSpace?: boolean;\n}\n\nexport const PLAYBACK_RATES = [1, 1.5, 2] as const;\nexport type PlaybackRate = (typeof PLAYBACK_RATES)[number];\n","import React, { useCallback, useMemo, useRef, useState } from 'react';\nimport { Image, PanResponder, Pressable, Text, View } from 'react-native';\nimport Video, { VideoRef } from 'react-native-video';\nimport tw from 'twrnc';\nimport { PauseIcon } from '../../assets/Icons/PauseIcon';\nimport { PlayIcon } from '../../assets/Icons/PlayIcon';\nimport { useAudio } from '../../context/AudioContext';\nimport { useChatContext } from '../../context/ChatContext';\nimport {\n getAudioDurationColor,\n getAudioPauseIconColor,\n getAudioPlayIconColor,\n getAudioSpeedTextColor,\n getAudioWaveformColors,\n} from '../../utils/bubbleTheme';\nimport { formatDuration } from '../../utils/datefunc';\nimport { withFontFamily } from '../../utils/theme';\nimport type { ChatScreenProps } from '../../types';\nimport { AudioPlayerProps, PLAYBACK_RATES, PlaybackRate } from './types';\n\ntype ChatTheme = ChatScreenProps['theme'];\n\nconst WAVEFORM_BARS = 50;\nconst WAVEFORM_H = 36;\nconst AVATAR_SIZE = 42;\n\nfunction generateWaveform(url: string, count: number): number[] {\n let h = 5381;\n for (let i = 0; i < url.length; i++) {\n h = ((h << 5) + h + url.charCodeAt(i)) | 0;\n }\n return Array.from({ length: count }, (_, i) => {\n h = Math.imul(h ^ (h >>> 16), 0x45d9f3b + i * 31337) | 0;\n h = h ^ (h >>> 13);\n return 0.18 + ((Math.abs(h) % 100) / 100) * 0.82;\n });\n}\n\nfunction avatarInitial(name?: string): string {\n const t = name?.trim();\n return t ? t.charAt(0).toUpperCase() : '?';\n}\n\nfunction AudioAvatarOrSpeed({\n isPlaying,\n playbackRate,\n onCycleSpeed,\n senderAvatar,\n senderName,\n isCurrentUser,\n theme,\n}: {\n isPlaying: boolean;\n playbackRate: PlaybackRate;\n onCycleSpeed: () => void;\n senderAvatar?: string;\n senderName?: string;\n isCurrentUser: boolean;\n theme?: ChatTheme;\n}) {\n if (isPlaying) {\n return (\n <Pressable\n onPress={onCycleSpeed}\n style={[\n tw`rounded-full items-center justify-center`,\n {\n width: AVATAR_SIZE,\n height: AVATAR_SIZE,\n backgroundColor: isCurrentUser\n ? 'rgba(0,0,0,0.22)'\n : 'rgba(255,255,255,0.12)',\n },\n theme?.messageStyle?.audioSpeedButtonStyle,\n ]}\n >\n <Text\n style={withFontFamily(\n [\n tw`text-xs font-semibold`,\n { color: getAudioSpeedTextColor(theme, isCurrentUser) },\n theme?.messageStyle?.audioSpeedTextStyle,\n ],\n theme?.fontFamily\n )}\n >\n {playbackRate === 1 ? '1x' : `${playbackRate}x`}\n </Text>\n </Pressable>\n );\n }\n\n if (senderAvatar) {\n return (\n <Image\n source={{ uri: senderAvatar }}\n style={[\n tw`rounded-full`,\n { width: AVATAR_SIZE, height: AVATAR_SIZE },\n theme?.bubbleStyle?.avatarImageStyle,\n ]}\n resizeMode=\"cover\"\n />\n );\n }\n\n return (\n <View\n style={[\n tw`rounded-full items-center justify-center`,\n {\n width: AVATAR_SIZE,\n height: AVATAR_SIZE,\n backgroundColor: isCurrentUser ? 'rgba(0,0,0,0.2)' : '#9ca3af',\n },\n ]}\n >\n <Text\n style={withFontFamily(\n [tw`text-base font-semibold capitalize`, { color: '#ffffff' }],\n theme?.fontFamily\n )}\n >\n {avatarInitial(senderName)}\n </Text>\n </View>\n );\n}\n\nconst AudioPlayer: React.FC<AudioPlayerProps> = ({\n audioUrl,\n audioId,\n isVideoPlaying,\n isCurrentUser,\n senderAvatar,\n senderName,\n reserveStatusSpace = true,\n}) => {\n const { theme, CustomPlayIcon, CustomPauseIcon, showMessageStatus } =\n useChatContext();\n const { currentlyPlayingId, setCurrentlyPlayingId } = useAudio();\n\n const videoRef = useRef<VideoRef>(null);\n const [isPlaying, setIsPlaying] = useState(false);\n const [currentTime, setCurrentTime] = useState(0);\n const [duration, setDuration] = useState(0);\n const [isDragging, setIsDragging] = useState(false);\n const [playbackRate, setPlaybackRate] = useState<PlaybackRate>(1);\n const [waveformW, setWaveformW] = useState(0);\n const seekPendingRef = useRef<number | null>(null);\n\n const waveform = useMemo(\n () => generateWaveform(audioUrl, WAVEFORM_BARS),\n [audioUrl]\n );\n\n const { inactive: inactiveBarColor, active: activeBarColor } =\n getAudioWaveformColors(theme, isCurrentUser);\n const durationColor = getAudioDurationColor(theme, isCurrentUser);\n const playIconColor = getAudioPlayIconColor(theme, isCurrentUser);\n const pauseIconColor = getAudioPauseIconColor(theme, isCurrentUser);\n const shouldPause =\n isVideoPlaying || (!!currentlyPlayingId && currentlyPlayingId !== audioId);\n const effectivePlaying = isPlaying && !shouldPause;\n const progress = duration > 0 ? currentTime / duration : 0;\n\n const handleLoad = useCallback((data: { duration: number }) => {\n setDuration(data.duration);\n if (seekPendingRef.current !== null) {\n videoRef.current?.seek(seekPendingRef.current);\n seekPendingRef.current = null;\n }\n }, []);\n\n const handleProgress = useCallback(\n ({ currentTime: t }: { currentTime: number }) => {\n if (!isDragging) setCurrentTime(t);\n },\n [isDragging]\n );\n\n const handleEnd = useCallback(() => {\n setIsPlaying(false);\n setCurrentTime(0);\n videoRef.current?.seek(0);\n setCurrentlyPlayingId(null);\n }, [setCurrentlyPlayingId]);\n\n const togglePlay = useCallback(() => {\n if (effectivePlaying) {\n setIsPlaying(false);\n setCurrentlyPlayingId(null);\n } else {\n setCurrentlyPlayingId(audioId);\n setIsPlaying(true);\n }\n }, [effectivePlaying, audioId, setCurrentlyPlayingId]);\n\n const cycleSpeed = useCallback(() => {\n setPlaybackRate((r) => {\n const i = PLAYBACK_RATES.indexOf(r);\n const next = PLAYBACK_RATES[(i + 1) % PLAYBACK_RATES.length];\n return next ?? 1;\n });\n }, []);\n\n const seekTo = useCallback(\n (x: number) => {\n const w = waveformW;\n if (w <= 0 || duration <= 0) return;\n const t = Math.max(0, Math.min(x / w, 1)) * duration;\n setCurrentTime(t);\n if (duration > 0) {\n videoRef.current?.seek(t);\n } else {\n seekPendingRef.current = t;\n }\n },\n [duration, waveformW]\n );\n\n const panResponder = useMemo(\n () =>\n PanResponder.create({\n onStartShouldSetPanResponder: () => true,\n onMoveShouldSetPanResponder: () => true,\n onPanResponderGrant: (evt) => {\n setIsDragging(true);\n seekTo(evt.nativeEvent.locationX);\n },\n onPanResponderMove: (evt) => seekTo(evt.nativeEvent.locationX),\n onPanResponderRelease: () => setIsDragging(false),\n onPanResponderTerminate: () => setIsDragging(false),\n }),\n [seekTo]\n );\n\n const playPause = (\n <Pressable onPress={togglePlay} hitSlop={8} style={tw`shrink-0 px-0.5`}>\n {effectivePlaying ? (\n CustomPauseIcon ? (\n <CustomPauseIcon />\n ) : (\n <PauseIcon style={tw.style('h-6 w-6')} color={pauseIconColor} />\n )\n ) : CustomPlayIcon ? (\n <CustomPlayIcon />\n ) : (\n <PlayIcon style={tw.style('h-6 w-6')} color={playIconColor} />\n )}\n </Pressable>\n );\n\n const avatarOrSpeed = (\n <AudioAvatarOrSpeed\n isPlaying={effectivePlaying}\n playbackRate={playbackRate}\n onCycleSpeed={cycleSpeed}\n senderAvatar={senderAvatar}\n senderName={senderName}\n isCurrentUser={isCurrentUser}\n theme={theme}\n />\n );\n\n const waveformBars = (\n <View\n style={[tw`flex-1 min-w-0`, { height: WAVEFORM_H }]}\n onLayout={(e) => setWaveformW(e.nativeEvent.layout.width)}\n >\n <View\n style={[\n {\n flex: 1,\n flexDirection: 'row',\n alignItems: 'center',\n },\n theme?.messageStyle?.progressBarStyle,\n ]}\n {...panResponder.panHandlers}\n >\n {waveform.map((amp, i) => {\n const barProgress = (i + 0.5) / WAVEFORM_BARS;\n const active = barProgress <= progress;\n return (\n <View\n key={i}\n style={[\n {\n flex: 1,\n marginHorizontal: 0.5,\n height: Math.max(3, Math.round(amp * WAVEFORM_H)),\n borderRadius: 2,\n backgroundColor: active ? activeBarColor : inactiveBarColor,\n },\n active ? theme?.messageStyle?.activeProgressBarStyle : undefined,\n ]}\n />\n );\n })}\n </View>\n </View>\n );\n\n return (\n <View\n style={[\n tw`min-w-[240px] max-w-[280px] py-1.5 px-1`,\n reserveStatusSpace && showMessageStatus && tw`pb-4`,\n ]}\n >\n <Video\n ref={videoRef}\n source={{ uri: audioUrl }}\n paused={!effectivePlaying}\n rate={playbackRate}\n playInBackground={false}\n playWhenInactive={false}\n onLoad={handleLoad}\n onProgress={handleProgress}\n onEnd={handleEnd}\n style={{ width: 0, height: 0 }}\n progressUpdateInterval={80}\n />\n\n <View style={tw`flex-row items-center gap-1.5`}>\n {isCurrentUser ? (\n <>\n {avatarOrSpeed}\n {playPause}\n {waveformBars}\n </>\n ) : (\n <>\n {playPause}\n {waveformBars}\n {avatarOrSpeed}\n </>\n )}\n </View>\n <Text\n style={withFontFamily(\n [\n tw`text-[11px] mt-1`,\n {\n color: durationColor,\n paddingLeft: isCurrentUser\n ? AVATAR_SIZE + 6 + 28 + 6\n : 28 + 6,\n },\n theme?.messageStyle?.audioDurationStyle,\n ],\n theme?.fontFamily\n )}\n >\n {formatDuration(\n effectivePlaying ? currentTime : duration > 0 ? duration : currentTime\n )}\n </Text>\n </View>\n );\n};\n\nexport default React.memo(AudioPlayer);\n","import { useEffect, useRef } from 'react';\nimport { Animated, Easing, ViewStyle } from 'react-native';\nimport Svg, { Path } from 'react-native-svg';\n\ntype LoadingIconProps = {\n style?: ViewStyle;\n spinning?: boolean;\n};\n\nexport const LoadingIcon = ({ style, spinning = false }: LoadingIconProps) => {\n const spinAnim = useRef(new Animated.Value(0)).current;\n\n useEffect(() => {\n if (spinning) {\n Animated.loop(\n Animated.timing(spinAnim, {\n toValue: 1,\n duration: 1000,\n easing: Easing.linear,\n useNativeDriver: true,\n })\n ).start();\n }\n }, [spinning]);\n\n const spin = spinAnim.interpolate({\n inputRange: [0, 1],\n outputRange: ['0deg', '360deg'],\n });\n\n return (\n <Animated.View\n style={spinning ? { transform: [{ rotate: spin }] } : undefined}\n >\n <Svg style={style} viewBox=\"0 0 1024 1024\">\n <Path\n d=\"M988 548c-19.9 0-36-16.1-36-36c0-59.4-11.6-117-34.6-171.3a440.5 440.5 0 0 0-94.3-139.9a437.7 437.7 0 0 0-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150s83.9 101.8 109.7 162.7c26.7 63.1 40.2 130.2 40.2 199.3c.1 19.9-16 36-35.9 36\"\n fill=\"white\"\n />\n </Svg>\n </Animated.View>\n );\n};\n","import React from 'react';\nimport {\n Image,\n Pressable,\n Text,\n View,\n useWindowDimensions,\n} from 'react-native';\nimport Video, { VideoRef } from 'react-native-video';\nimport tw from 'twrnc';\nimport { LoadingIcon } from '../../assets/Icons/LoadingIcon';\nimport { PlayIcon } from '../../assets/Icons/PlayIcon';\nimport { useChatContext } from '../../context/ChatContext';\nimport type { MessageMediaItem } from '../../types';\nimport { withFontFamily } from '../../utils/theme';\n\nconst GRID_WIDTH = 240;\nconst SINGLE_HEIGHT = 320;\nconst ROW_GAP = 2;\n\n// All multi-item layouts share this total height to match the single-item bubble\nconst MULTI_HEIGHT = SINGLE_HEIGHT;\nconst TWO_ROW_H = MULTI_HEIGHT;\nconst THREE_TOP_H = Math.round(MULTI_HEIGHT * 0.55);\nconst THREE_BOT_H = MULTI_HEIGHT - THREE_TOP_H - ROW_GAP;\nconst FOUR_CELL_H = Math.round((MULTI_HEIGHT - ROW_GAP) / 2);\n\ninterface MediaGridProps {\n items: MessageMediaItem[];\n onOpenGallery: (items: MessageMediaItem[], index: number) => void;\n}\n\nconst VideoThumbCell: React.FC<{\n uri: string;\n cellStyle: object;\n roundedStyle: object;\n}> = ({ uri, cellStyle, roundedStyle }) => {\n const { theme, CustomPlayIcon } = useChatContext();\n const videoRef = React.useRef<VideoRef>(null);\n const [duration, setDuration] = React.useState(0);\n const [loading, setLoading] = React.useState(true);\n const [error, setError] = React.useState(false);\n\n return (\n <View style={[cellStyle, roundedStyle]} pointerEvents=\"none\">\n <Video\n source={{ uri }}\n ref={videoRef}\n paused\n muted\n playInBackground={false}\n playWhenInactive={false}\n pointerEvents=\"none\"\n style={[roundedStyle, { width: '100%', height: '100%' }]}\n resizeMode=\"cover\"\n onLoadStart={() => {\n setLoading(true);\n setError(false);\n }}\n onLoad={(d) => {\n setDuration(d.duration);\n setLoading(false);\n }}\n onError={() => {\n setError(true);\n setLoading(false);\n }}\n />\n {loading && (\n <View\n style={[\n tw`absolute inset-0 items-center justify-center bg-black/40`,\n roundedStyle,\n ]}\n >\n <LoadingIcon style={tw.style('h-8 w-8')} spinning />\n </View>\n )}\n {!loading && !error && (\n <>\n <View style={tw`pointer-events-none absolute inset-0 items-center justify-center`}>\n {CustomPlayIcon ? (\n <CustomPlayIcon />\n ) : (\n <PlayIcon\n style={tw.style('h-10 w-10')}\n color={theme?.colors?.videoPlayIconColor || 'white'}\n />\n )}\n </View>\n <View\n style={tw`pointer-events-none absolute bottom-1 left-1 bg-black/50 px-1.5 py-0.5 rounded`}\n >\n <Text style={tw`text-white text-[10px] font-semibold`}>\n {formatShortDuration(duration)}\n </Text>\n </View>\n </>\n )}\n {error && (\n <View\n style={[\n tw`absolute inset-0 items-center justify-center bg-red-500/50`,\n roundedStyle,\n ]}\n >\n <Text style={withFontFamily(tw`text-white text-xs`, theme?.fontFamily)}>\n Video\n </Text>\n </View>\n )}\n </View>\n );\n};\n\nfunction formatShortDuration(sec: number): string {\n if (!sec || Number.isNaN(sec)) return '0:00';\n const m = Math.floor(sec / 60);\n const s = Math.floor(sec % 60);\n return `${m}:${s.toString().padStart(2, '0')}`;\n}\n\nexport const MediaGrid: React.FC<MediaGridProps> = ({\n items,\n onOpenGallery,\n}) => {\n const { width: windowW } = useWindowDimensions();\n const maxW = Math.min(GRID_WIDTH, windowW * 0.72);\n\n if (items.length === 0) return null;\n\n const roundedSmall = { borderRadius: 6, overflow: 'hidden' as const };\n\n if (items.length === 1) {\n const item = items[0]!;\n return (\n <Pressable\n onPress={() => onOpenGallery(items, 0)}\n style={{ width: maxW, height: SINGLE_HEIGHT, marginVertical: 8 }}\n >\n {item.kind === 'image' ? (\n <Image\n source={{ uri: item.uri }}\n style={{\n width: '100%',\n height: '100%',\n borderRadius: 8,\n }}\n resizeMode=\"cover\"\n />\n ) : (\n <VideoThumbCell\n uri={item.uri}\n cellStyle={{ width: maxW, height: SINGLE_HEIGHT }}\n roundedStyle={{ borderRadius: 8 }}\n />\n )}\n </Pressable>\n );\n }\n\n if (items.length === 2) {\n const half = (maxW - ROW_GAP) / 2;\n return (\n <View\n style={{\n width: maxW,\n height: TWO_ROW_H,\n flexDirection: 'row',\n gap: ROW_GAP,\n marginVertical: 8,\n }}\n >\n {items.slice(0, 2).map((item, idx) => (\n <Pressable\n key={`${item.uri}-${idx}`}\n onPress={() => onOpenGallery(items, idx)}\n style={{ width: half, height: TWO_ROW_H }}\n >\n {item.kind === 'image' ? (\n <Image\n source={{ uri: item.uri }}\n style={[roundedSmall, { width: '100%', height: '100%' }]}\n resizeMode=\"cover\"\n />\n ) : (\n <VideoThumbCell\n uri={item.uri}\n cellStyle={{ width: half, height: TWO_ROW_H }}\n roundedStyle={roundedSmall}\n />\n )}\n </Pressable>\n ))}\n </View>\n );\n }\n\n if (items.length === 3) {\n const top = items[0]!;\n const left = items[1]!;\n const right = items[2]!;\n const bottomHalf = (maxW - ROW_GAP) / 2;\n return (\n <View style={{ width: maxW, height: MULTI_HEIGHT, marginVertical: 8, gap: ROW_GAP }}>\n <Pressable\n onPress={() => onOpenGallery(items, 0)}\n style={{ width: maxW, height: THREE_TOP_H }}\n >\n {top.kind === 'image' ? (\n <Image\n source={{ uri: top.uri }}\n style={[roundedSmall, { width: '100%', height: '100%' }]}\n resizeMode=\"cover\"\n />\n ) : (\n <VideoThumbCell\n uri={top.uri}\n cellStyle={{ width: maxW, height: THREE_TOP_H }}\n roundedStyle={roundedSmall}\n />\n )}\n </Pressable>\n <View style={{ flexDirection: 'row', gap: ROW_GAP, height: THREE_BOT_H }}>\n <Pressable\n key={`${left.uri}-1`}\n onPress={() => onOpenGallery(items, 1)}\n style={{ width: bottomHalf, height: THREE_BOT_H }}\n >\n {left.kind === 'image' ? (\n <Image\n source={{ uri: left.uri }}\n style={[roundedSmall, { width: '100%', height: '100%' }]}\n resizeMode=\"cover\"\n />\n ) : (\n <VideoThumbCell\n uri={left.uri}\n cellStyle={{ width: bottomHalf, height: THREE_BOT_H }}\n roundedStyle={roundedSmall}\n />\n )}\n </Pressable>\n <Pressable\n key={`${right.uri}-2`}\n onPress={() => onOpenGallery(items, 2)}\n style={{ width: bottomHalf, height: THREE_BOT_H }}\n >\n {right.kind === 'image' ? (\n <Image\n source={{ uri: right.uri }}\n style={[roundedSmall, { width: '100%', height: '100%' }]}\n resizeMode=\"cover\"\n />\n ) : (\n <VideoThumbCell\n uri={right.uri}\n cellStyle={{ width: bottomHalf, height: THREE_BOT_H }}\n roundedStyle={roundedSmall}\n />\n )}\n </Pressable>\n </View>\n </View>\n );\n }\n\n const cellW = (maxW - ROW_GAP) / 2;\n const extra = items.length - 4;\n const display = items.slice(0, 4);\n\n return (\n <View\n style={{\n width: maxW,\n height: MULTI_HEIGHT,\n flexWrap: 'wrap',\n flexDirection: 'row',\n gap: ROW_GAP,\n marginVertical: 8,\n }}\n >\n {display.map((cell, idx) => (\n <Pressable\n key={`${cell.uri}-${idx}`}\n onPress={() => onOpenGallery(items, idx)}\n style={{\n width: cellW,\n height: FOUR_CELL_H,\n position: 'relative',\n }}\n >\n {cell.kind === 'image' ? (\n <Image\n source={{ uri: cell.uri }}\n style={[roundedSmall, { width: '100%', height: '100%' }]}\n resizeMode=\"cover\"\n />\n ) : (\n <VideoThumbCell\n uri={cell.uri}\n cellStyle={{ width: cellW, height: FOUR_CELL_H }}\n roundedStyle={roundedSmall}\n />\n )}\n {idx === 3 && extra > 0 && (\n <View\n style={tw`absolute inset-0 bg-black/55 items-center justify-center`}\n >\n <Text style={tw`text-white text-lg font-bold`}>+{extra}</Text>\n </View>\n )}\n </Pressable>\n ))}\n </View>\n );\n};\n","import React, { useMemo } from 'react';\nimport { Linking, Pressable, Text, View } from 'react-native';\nimport ParsedText from 'react-native-parsed-text';\nimport tw from 'twrnc';\nimport { useChatContext } from '../../context/ChatContext';\nimport {\n getFileAttachmentBackground,\n getFileAttachmentSubtitleColor,\n getFileAttachmentTextColor,\n getMessageTextColor,\n} from '../../utils/bubbleTheme';\nimport { collectMediaItems } from '../../utils/messageMedia';\nimport { getFontFamilyStyle, withFontFamily } from '../../utils/theme';\nimport AudioPlayer from '../AudioPlayer/AudioPlayer';\nimport { MediaGrid } from './MediaGrid';\nimport { MessageContentProps } from './types';\n\nconst MessageContent: React.FC<MessageContentProps> = ({\n message,\n onGalleryOpen,\n isVideoPlaying,\n isCurrentUser,\n}) => {\n const { theme, showMessageStatus, onFileAttachmentPress } = useChatContext();\n\n const mediaItems = useMemo(() => collectMediaItems(message), [message]);\n\n return (\n <View>\n {mediaItems.length > 0 && (\n <MediaGrid items={mediaItems} onOpenGallery={onGalleryOpen} />\n )}\n\n {(message.fileAttachments ?? []).map((file, idx) => (\n <Pressable\n key={`${file.uri}-${idx}`}\n onPress={() => {\n if (onFileAttachmentPress) {\n onFileAttachmentPress(file);\n } else {\n Linking.openURL(\n file.uri.startsWith('http') || file.uri.startsWith('file:')\n ? file.uri\n : `file://${file.uri}`\n );\n }\n }}\n style={[\n tw`my-1.5 py-2 px-3 rounded-lg max-w-[220px]`,\n {\n backgroundColor: getFileAttachmentBackground(\n theme,\n isCurrentUser\n ),\n },\n isCurrentUser\n ? theme?.messageStyle?.sentFileAttachmentStyle\n : theme?.messageStyle?.receivedFileAttachmentStyle,\n ]}\n >\n <Text\n style={withFontFamily(\n [\n tw`text-xs font-semibold`,\n {\n color: getFileAttachmentTextColor(theme, isCurrentUser),\n },\n isCurrentUser\n ? theme?.messageStyle?.sentFileAttachmentTextStyle\n : theme?.messageStyle?.receivedFileAttachmentTextStyle,\n ],\n theme?.fontFamily\n )}\n numberOfLines={2}\n >\n 📎 {file.name}\n </Text>\n <Text\n style={withFontFamily(\n [\n tw`text-[10px] mt-0.5`,\n {\n color: getFileAttachmentSubtitleColor(theme, isCurrentUser),\n },\n isCurrentUser\n ? theme?.messageStyle?.sentFileAttachmentSubtitleStyle\n : theme?.messageStyle?.receivedFileAttachmentSubtitleStyle,\n ],\n theme?.fontFamily\n )}\n >\n {file.type}\n </Text>\n </Pressable>\n ))}\n\n {message.audio && (\n <AudioPlayer\n audioUrl={message.audio}\n audioId={message.id}\n isVideoPlaying={isVideoPlaying as boolean}\n isCurrentUser={isCurrentUser}\n senderAvatar={message.senderAvatar}\n senderName={message.senderName}\n reserveStatusSpace={!message.text}\n />\n )}\n\n {message.text && (\n <ParsedText\n style={withFontFamily(\n [\n tw`pt-1`,\n showMessageStatus ? tw`pb-0` : tw`pb-2`,\n { wordBreak: 'break-word', overflowWrap: 'break-word' },\n isCurrentUser\n ? theme?.messageStyle?.sentTextStyle\n : theme?.messageStyle?.receivedTextStyle,\n getMessageTextColor(theme, isCurrentUser)\n ? { color: getMessageTextColor(theme, isCurrentUser) }\n : undefined,\n ],\n theme?.fontFamily\n )}\n parse={[\n {\n type: 'url',\n style: {\n color: 'blue',\n textDecorationLine: 'underline',\n ...getFontFamilyStyle(theme?.fontFamily),\n },\n onPress: (url) =>\n Linking.openURL(\n url.startsWith('http') ? url : `https://${url}`\n ),\n },\n ]}\n childrenProps={{ allowFontScaling: false }}\n >\n {message.text}\n </ParsedText>\n )}\n </View>\n );\n};\n\nexport default React.memo(MessageContent);\n","\nimport { ViewStyle } from \"react-native\";\nimport Svg, { Path } from \"react-native-svg\";\ninterface IconProps {\n style?: ViewStyle;\n fill?: string;\n}\n\nexport const CheckAllIcon = ({ style, fill }: IconProps) => {\n return (\n <Svg style={style} viewBox=\"0 0 24 24\">\n <Path\n fill={fill}\n d=\"M.41 13.41L6 19l1.41-1.42L1.83 12m20.41-6.42L11.66 16.17L7.5 12l-1.43 1.41L11.66 19l12-12M18 7l-1.41-1.42l-6.35 6.35l1.42 1.41z\"\n ></Path>\n </Svg>\n );\n};\n","\nimport { ViewStyle } from \"react-native\";\nimport Svg, { Path } from \"react-native-svg\";\ninterface IconProps {\n style?: ViewStyle;\n fill?: string;\n}\n\nexport const CheckIcon = ({ style, fill }: IconProps) => {\n return (\n <Svg style={style} viewBox=\"0 0 24 24\">\n <Path d=\"m9.55 18l-5.7-5.7l1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4z\" fill={fill}></Path>\n </Svg>\n );\n};\n","import React from 'react';\nimport { Text, View } from 'react-native';\nimport tw from 'twrnc';\nimport { CheckAllIcon } from '../../assets/Icons/CheckAllIcon';\nimport { CheckIcon } from '../../assets/Icons/CheckIcon';\nimport { useChatContext } from '../../context/ChatContext';\nimport {\n getMediaTimestampColor,\n getMediaTimestampContainerStyle,\n getMessageTimestampColor,\n} from '../../utils/bubbleTheme';\nimport { withFontFamily } from '../../utils/theme';\nimport { MessageStatusProps } from './types';\n\nconst MessageStatus: React.FC<MessageStatusProps> = ({\n time,\n status,\n isCurrentUser,\n hasText,\n hasAudio,\n hasGalleryMedia,\n hasFileAttachments,\n}) => {\n const { theme, showMessageStatus } = useChatContext();\n const galleryOnlyOverlay =\n hasGalleryMedia && !hasText && !hasAudio;\n const mediaOverlay =\n (hasGalleryMedia || hasFileAttachments) && !hasText && !hasAudio;\n\n const timestampColor = galleryOnlyOverlay\n ? '#ffffff'\n : mediaOverlay\n ? getMediaTimestampColor(theme, isCurrentUser)\n : getMessageTimestampColor(theme, isCurrentUser);\n\n return (\n <>\n {showMessageStatus && (\n <View\n style={[\n tw`flex-row items-center`,\n hasText\n ? tw`justify-end pb-1 ml-4`\n : hasAudio\n ? tw`absolute right-3 bottom-2`\n : mediaOverlay\n ? [\n tw`absolute right-3 bottom-4`,\n getMediaTimestampContainerStyle(theme, isCurrentUser),\n ]\n : [\n tw`absolute right-3 bottom-4`,\n getMediaTimestampContainerStyle(theme, isCurrentUser),\n ],\n ]}\n >\n <Text\n style={withFontFamily(\n [tw`text-xs`, { color: timestampColor }],\n theme?.fontFamily\n )}\n >\n {time}\n </Text>\n {isCurrentUser && (\n <View style={tw`ml-1 flex-row items-center`}>\n {status === 'sent' && (\n <CheckIcon\n style={tw.style('h-4 w-4', { opacity: 0.7 })}\n fill={theme?.colors?.sentIconColor || '#6B7280'}\n />\n )}\n {status === 'delivered' && (\n <CheckAllIcon\n style={tw.style('h-4 w-4', { opacity: 0.7 })}\n fill={theme?.colors?.deliveredIconColor || '#6B7280'}\n />\n )}\n {status === 'read' && (\n <CheckAllIcon\n style={tw.style('h-4 w-4', { opacity: 0.9 })}\n fill={theme?.colors?.readIconColor || '#3B82F6'}\n />\n )}\n </View>\n )}\n </View>\n )}\n </>\n );\n};\n\nexport default React.memo(MessageStatus);\n","import React from 'react';\nimport { Image, Pressable, Text, View } from 'react-native';\nimport tw from 'twrnc';\nimport { ArrowBack2RoundedIcon } from '../../assets/Icons/ArrowBack2RoundedIcon';\nimport { useChatContext } from '../../context/ChatContext';\nimport { getBubbleBackgroundColor } from '../../utils/bubbleTheme';\nimport { collectMediaItems } from '../../utils/messageMedia';\nimport { withFontFamily } from '../../utils/theme';\nimport MessageContent from './MessageContent';\nimport MessageStatus from './MessageStatus';\nimport { ChatBubbleProps } from './types';\n\nimport type { MessageMediaItem } from '../../types';\n\nconst ChatBubble: React.FC<ChatBubbleProps> = ({\n message,\n isCurrentUser,\n isFirstInSequence,\n onLongPress,\n}) => {\n const {\n theme,\n showAvatars,\n showUserNames,\n showBubbleTail,\n setMediaViewerGallery,\n isVideoPlaying,\n } = useChatContext();\n\n const mediaItems = collectMediaItems(message);\n\n const handleGalleryOpen = (items: MessageMediaItem[], index: number) => {\n setMediaViewerGallery(items, index);\n };\n\n const hasFilesOnly =\n (message.fileAttachments?.length ?? 0) > 0 &&\n mediaItems.length === 0 &&\n !message.text &&\n !message.audio;\n\n return (\n <Pressable\n onLongPress={onLongPress}\n style={[\n tw`px-2 my-1 max-w-[75%] relative`,\n isCurrentUser ? tw`self-end mr-3` : tw`self-start ml-9`,\n isFirstInSequence\n ? isCurrentUser\n ? tw`bg-green-500 rounded-tr-none`\n : tw`bg-white rounded-tl-none`\n : isCurrentUser\n ? tw`bg-green-500`\n : tw`bg-white`,\n {\n borderRadius: 8,\n ...(getBubbleBackgroundColor(theme, isCurrentUser)\n ? {\n backgroundColor: getBubbleBackgroundColor(theme, isCurrentUser),\n }\n : {}),\n ...(isCurrentUser\n ? theme?.bubbleStyle?.sent\n : theme?.bubbleStyle?.received),\n },\n ]}\n >\n {/* Avatar & Sender Name for Group Chat */}\n {!isCurrentUser && isFirstInSequence && showAvatars && (\n <>\n <View\n style={tw`absolute w-6 h-6 rounded-full top-0 -left-9 flex-row items-center`}\n >\n {message.senderAvatar ? (\n <Image\n source={{ uri: message.senderAvatar }}\n style={[\n tw`w-full h-full rounded-full`,\n theme?.bubbleStyle?.avatarImageStyle,\n ]}\n resizeMode=\"cover\"\n />\n ) : (\n <Text\n style={withFontFamily(\n [\n tw`text-sm text-black font-semibold capitalize rounded-full bg-zinc-300 w-full h-full text-center pt-0.5`,\n theme?.bubbleStyle?.avatarTextStyle,\n ],\n theme?.fontFamily\n )}\n >\n {message.senderName?.charAt(0)}\n </Text>\n )}\n </View>\n {showUserNames && message.senderName && (\n <Text\n style={withFontFamily(\n [\n tw`text-sm text-black font-semibold mt-1 capitalize`,\n theme?.bubbleStyle?.userNameStyle,\n ],\n theme?.fontFamily\n )}\n >\n {message.senderName}\n </Text>\n )}\n </>\n )}\n\n {/* Bubble Tail */}\n {isFirstInSequence && showBubbleTail && (\n <ArrowBack2RoundedIcon\n style={tw.style(\n 'absolute w-6 h-6',\n isCurrentUser\n ? 'rotate-90 -right-3.5 mt-[1.24px] -top-1'\n : 'rotate-180 -left-3.5 mt-[1.5px] -top-[3px]'\n )}\n color={\n isCurrentUser\n ? theme?.colors?.sentMessageTailColor || 'rgba(34, 197, 94, 1)'\n : theme?.colors?.receivedMessageTailColor || 'white'\n }\n />\n )}\n\n <MessageContent\n message={message}\n isCurrentUser={isCurrentUser}\n isFirstInSequence={isFirstInSequence}\n onGalleryOpen={handleGalleryOpen}\n isVideoPlaying={isVideoPlaying}\n />\n\n <MessageStatus\n time={message.time}\n status={isCurrentUser ? message.status : undefined}\n isCurrentUser={isCurrentUser}\n hasText={!!message.text}\n hasAudio={!!message.audio}\n hasGalleryMedia={mediaItems.length > 0 && !message.text}\n hasFileAttachments={hasFilesOnly}\n />\n </Pressable>\n );\n};\n\nexport default React.memo(ChatBubble);\n","import { ViewStyle } from \"react-native\";\nimport { Circle, G, Path, Svg } from \"react-native-svg\";\n\nexport const CameraIcon = ({\n style,\n color\n}: {\n style?: ViewStyle;\n color?: string;\n}) => {\n return (\n <Svg style={style} viewBox=\"0 0 24 24\">\n <G fill=\"none\" strokeWidth=\"1.5\" stroke={color}>\n <Circle cx=\"12\" cy=\"13\" r=\"3\"></Circle>\n <Path d=\"M9.778 21h4.444c3.121 0 4.682 0 5.803-.735a4.4 4.4 0 0 0 1.226-1.204c.749-1.1.749-2.633.749-5.697s0-4.597-.749-5.697a4.4 4.4 0 0 0-1.226-1.204c-.72-.473-1.622-.642-3.003-.702c-.659 0-1.226-.49-1.355-1.125A2.064 2.064 0 0 0 13.634 3h-3.268c-.988 0-1.839.685-2.033 1.636c-.129.635-.696 1.125-1.355 1.125c-1.38.06-2.282.23-3.003.702A4.4 4.4 0 0 0 2.75 7.667C2 8.767 2 10.299 2 13.364s0 4.596.749 5.697c.324.476.74.885 1.226 1.204C5.096 21 6.657 21 9.778 21Z\"></Path>\n <Path strokeLinecap=\"round\" d=\"M19 10h-1\"></Path>\n </G>\n </Svg>\n );\n};\n","\nimport { ViewStyle } from \"react-native\";\nimport Svg, { Ellipse, G, Path } from \"react-native-svg\";\n\nexport const EmojiFunnySquareIcon = ({ style ,color}: { style?: ViewStyle,color?: string }) => {\n return (\n <Svg style={style} viewBox=\"0 0 24 24\">\n <G fill=\"none\" stroke={color}>\n <Path\n strokeLinecap=\"round\"\n strokeWidth=\"1.5\"\n d=\"M8.913 15.934c1.258.315 2.685.315 4.122-.07s2.673-1.099 3.605-2.001\"\n ></Path>\n <Ellipse\n cx=\"14.509\"\n cy=\"9.774\"\n fill=\"currentColor\"\n rx=\"1\"\n ry=\"1.5\"\n transform=\"rotate(-15 14.51 9.774)\"\n ></Ellipse>\n <Ellipse\n cx=\"8.714\"\n cy=\"11.328\"\n fill=\"currentColor\"\n rx=\"1\"\n ry=\"1.5\"\n transform=\"rotate(-15 8.714 11.328)\"\n ></Ellipse>\n <Path\n strokeWidth=\"1.5\"\n d=\"M3.204 14.357c-1.112-4.147-1.667-6.22-.724-7.853s3.016-2.19 7.163-3.3c4.147-1.112 6.22-1.667 7.853-.724s2.19 3.016 3.3 7.163c1.111 4.147 1.667 6.22.724 7.853s-3.016 2.19-7.163 3.3c-4.147 1.111-6.22 1.667-7.853.724s-2.19-3.016-3.3-7.163Z\"\n ></Path>\n <Path\n strokeWidth=\"1.5\"\n d=\"m13 16l.478.974a1.5 1.5 0 1 0 2.693-1.322l-.46-.935\"\n ></Path>\n </G>\n </Svg>\n );\n};\n","\nimport { ViewStyle } from \"react-native\";\nimport Svg, { G, Path } from \"react-native-svg\";\n\nexport const MicrophoneIcon = ({\n style,\n color,\n}: {\n style?: ViewStyle;\n color?: string;\n}) => {\n return (\n <Svg style={style} viewBox=\"0 0 24 24\">\n <G fill=\"none\" strokeWidth=\"1.5\" stroke={color}>\n <Path d=\"M7 8a5 5 0 0 1 10 0v3a5 5 0 0 1-10 0z\"></Path>\n <Path\n strokeLinecap=\"round\"\n d=\"M13.5 8H17m-3.5 3H17M7 8h2m-2 3h2m11-1v1a8 8 0 0 1-8 8m-8-9v1a8 8 0 0 0 8 8m0 0v3\"\n opacity=\".5\"\n ></Path>\n </G>\n </Svg>\n );\n};\n","\nimport { ViewStyle } from \"react-native\";\nimport Svg, { Path } from \"react-native-svg\";\n\nexport const PaperClipIcon = ({\n style,\n color,\n}: {\n style?: ViewStyle;\n color?: string;\n}) => {\n return (\n <Svg style={style} fill={color} viewBox=\"0 0 24 24\">\n <Path d=\"M17.346 15.539q0 2.271-1.565 3.866T11.952 21t-3.838-1.595t-1.576-3.867v-8.73q0-1.587 1.092-2.697Q8.72 3 10.308 3t2.678 1.11t1.091 2.698v8.269q0 .88-.615 1.517q-.614.637-1.498.637t-1.52-.627t-.636-1.527V6.769h1v8.308q0 .479.327.816q.328.338.807.338t.807-.338t.328-.816V6.789q-.006-1.166-.802-1.977Q11.48 4 10.308 4q-1.163 0-1.966.821q-.804.821-.804 1.987v8.73q-.005 1.853 1.283 3.157Q10.11 20 11.96 20q1.823 0 3.1-1.305t1.287-3.156v-8.77h1z\"></Path>\n </Svg>\n );\n};\n","import { ViewStyle } from \"react-native\";\n\nimport Svg, { G, Path } from \"react-native-svg\";\n\nexport const PaperPlaneIcon = ({\n style,\n color,\n}: {\n style?: ViewStyle;\n color?: string;\n}) => {\n return (\n <Svg style={style} viewBox=\"0 0 24 24\">\n <G fill=\"none\" strokeWidth=\"1.5\" stroke={color}>\n <Path d=\"m18.636 15.67l1.716-5.15c1.5-4.498 2.25-6.747 1.062-7.934s-3.436-.438-7.935 1.062L8.33 5.364C4.7 6.574 2.885 7.18 2.37 8.067a2.72 2.72 0 0 0 0 2.73c.515.888 2.33 1.493 5.96 2.704c.584.194.875.291 1.119.454c.236.158.439.361.597.597c.163.244.26.535.454 1.118c1.21 3.63 1.816 5.446 2.703 5.962a2.72 2.72 0 0 0 2.731 0c.887-.516 1.492-2.331 2.703-5.962Z\"></Path>\n <Path\n strokeLinecap=\"round\"\n d=\"m17.79 6.21l-4.211 4.165\"\n opacity=\".5\"\n ></Path>\n </G>\n </Svg>\n );\n};\n","import React, { useEffect } from 'react';\nimport { ViewStyle } from 'react-native';\nimport Animated, {\n Easing,\n useAnimatedStyle,\n useSharedValue,\n withRepeat,\n withSequence,\n withTiming,\n} from 'react-native-reanimated';\nimport { MicrophoneIcon } from '../../assets/Icons/MicrophoneIcon';\n\ninterface AnimatedHoldMicProps {\n color?: string;\n size?: number;\n style?: ViewStyle;\n}\n\n/** Breathing mic icon only — no background circle (WhatsApp-style hold). */\nexport const AnimatedHoldMic: React.FC<AnimatedHoldMicProps> = ({\n color = '#ef4444',\n size = 28,\n style,\n}) => {\n const scale = useSharedValue(1);\n\n useEffect(() => {\n scale.value = withRepeat(\n withSequence(\n withTiming(1.22, { duration: 700, easing: Easing.inOut(Easing.ease) }),\n withTiming(1, { duration: 700, easing: Easing.inOut(Easing.ease) })\n ),\n -1,\n false\n );\n }, []);\n\n const animatedStyle = useAnimatedStyle(() => ({\n transform: [{ scale: scale.value }],\n }));\n\n return (\n <Animated.View style={[animatedStyle, style]}>\n <MicrophoneIcon style={{ width: size, height: size }} color={color} />\n </Animated.View>\n );\n};\n","import { ViewStyle } from 'react-native';\nimport Svg, { Path } from 'react-native-svg';\n\nexport const ChevronUpIcon = ({\n style,\n color = '#6b7280',\n}: {\n style?: ViewStyle;\n color?: string;\n}) => (\n <Svg style={style} viewBox=\"0 0 24 24\" fill=\"none\">\n <Path\n d=\"M6 15l6-6 6 6\"\n stroke={color}\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </Svg>\n);\n","import { ViewStyle } from 'react-native';\nimport Svg, { Path, Rect } from 'react-native-svg';\n\nexport const LockIcon = ({\n style,\n color = '#6b7280',\n}: {\n style?: ViewStyle;\n color?: string;\n}) => (\n <Svg style={style} viewBox=\"0 0 24 24\" fill=\"none\">\n <Rect\n x=\"5\"\n y=\"11\"\n width=\"14\"\n height=\"10\"\n rx=\"2\"\n stroke={color}\n strokeWidth=\"1.5\"\n />\n <Path\n d=\"M8 11V7a4 4 0 0 1 8 0v4\"\n stroke={color}\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n />\n </Svg>\n);\n","import React, { useEffect } from 'react';\nimport { View } from 'react-native';\nimport Animated, {\n Easing,\n useAnimatedStyle,\n useSharedValue,\n withRepeat,\n withSequence,\n withTiming,\n} from 'react-native-reanimated';\nimport { ChevronUpIcon } from '../../assets/Icons/ChevronUpIcon';\nimport { LockIcon } from '../../assets/Icons/LockIcon';\nimport { RecordingUIProps, VoiceRecorderStyleOverrides } from '../../types';\n\ninterface LockSlideColumnProps {\n /** Finger vertical offset while holding (negative = sliding up) */\n slideY: number;\n lockSlideDistance: number;\n recordingUIProps?: RecordingUIProps;\n voiceRecorderStyles?: VoiceRecorderStyleOverrides;\n}\n\nexport const LockSlideColumn: React.FC<LockSlideColumnProps> = ({\n slideY,\n lockSlideDistance,\n recordingUIProps,\n voiceRecorderStyles,\n}) => {\n const pillBg =\n recordingUIProps?.lockPillBackground ?? 'rgba(30,30,30,0.88)';\n const lockColor = recordingUIProps?.lockIconColor ?? '#e5e7eb';\n const chevronColor = recordingUIProps?.chevronIconColor ?? '#9ca3af';\n const gap = recordingUIProps?.lockPillGap ?? 8;\n const marginBelow = recordingUIProps?.lockPillMarginBottom ?? 10;\n\n const chevronY = useSharedValue(0);\n useEffect(() => {\n chevronY.value = withRepeat(\n withSequence(\n withTiming(-4, { duration: 450, easing: Easing.inOut(Easing.ease) }),\n withTiming(0, { duration: 450, easing: Easing.inOut(Easing.ease) })\n ),\n -1,\n false\n );\n }, []);\n\n const lockScale = useSharedValue(0.92);\n useEffect(() => {\n lockScale.value = withRepeat(\n withSequence(\n withTiming(1, { duration: 550, easing: Easing.out(Easing.ease) }),\n withTiming(0.92, { duration: 550, easing: Easing.in(Easing.ease) })\n ),\n -1,\n false\n );\n }, []);\n\n const chevronStyle = useAnimatedStyle(() => ({\n transform: [{ translateY: chevronY.value }],\n }));\n\n const lockStyle = useAnimatedStyle(() => ({\n transform: [{ scale: lockScale.value }],\n }));\n\n // 0 → 1 as the finger approaches the lock threshold\n const lockProgress = Math.min(\n 1,\n Math.max(0, -slideY / lockSlideDistance)\n );\n\n return (\n <View\n style={[\n {\n alignItems: 'center',\n marginBottom: marginBelow,\n },\n voiceRecorderStyles?.lockContainer,\n ]}\n pointerEvents=\"none\"\n >\n <View\n style={[\n {\n backgroundColor: pillBg,\n borderRadius: 22,\n paddingVertical: 10,\n paddingHorizontal: 14,\n alignItems: 'center',\n gap,\n opacity: 0.85 + lockProgress * 0.15,\n borderWidth: lockProgress > 0.85 ? 1.5 : 0,\n borderColor:\n recordingUIProps?.lockPillActiveBorderColor ?? '#22c55e',\n },\n voiceRecorderStyles?.lockPill,\n ]}\n >\n <Animated.View style={lockStyle}>\n <LockIcon style={{ width: 20, height: 20 }} color={lockColor} />\n </Animated.View>\n <Animated.View style={chevronStyle}>\n <ChevronUpIcon\n style={{ width: 18, height: 18 }}\n color={chevronColor}\n />\n </Animated.View>\n </View>\n </View>\n );\n};\n","import React, { useEffect } from 'react';\nimport { Text, View } from 'react-native';\nimport Animated, {\n Easing,\n useAnimatedStyle,\n useSharedValue,\n withRepeat,\n withSequence,\n withTiming,\n} from 'react-native-reanimated';\nimport { formatDuration } from '../../utils/datefunc';\nimport { RecordingUIProps, VoiceRecorderStyleOverrides } from '../../types';\n\ninterface LongPressRecordingProps {\n duration: number;\n /** Horizontal drag (negative = sliding left to cancel) */\n slideX: number;\n containerHeight?: number;\n fontFamily?: string;\n voiceRecorderStyles?: VoiceRecorderStyleOverrides;\n recordingUIProps?: RecordingUIProps;\n}\n\n/** Center strip: timer + “slide to cancel” (mic + lock live in ChatInput). */\nexport const LongPressRecording: React.FC<LongPressRecordingProps> = ({\n duration,\n slideX,\n containerHeight = 50,\n fontFamily,\n voiceRecorderStyles,\n recordingUIProps,\n}) => {\n const cancelTextColor =\n recordingUIProps?.cancelTextColor ?? 'rgba(107,114,128,1)';\n const timerColor = recordingUIProps?.timerColor ?? '#374151';\n\n const slideTextX = useSharedValue(0);\n useEffect(() => {\n slideTextX.value = withRepeat(\n withSequence(\n withTiming(-6, { duration: 600, easing: Easing.inOut(Easing.ease) }),\n withTiming(0, { duration: 600, easing: Easing.inOut(Easing.ease) })\n ),\n -1,\n false\n );\n }, []);\n\n const cancelProgress = Math.min(1, Math.abs(Math.min(0, slideX)) / 70);\n\n const slideTextStyle = useAnimatedStyle(() => ({\n transform: [{ translateX: slideTextX.value }],\n opacity: 1 - cancelProgress,\n }));\n\n return (\n <View\n style={[\n {\n flex: 1,\n flexDirection: 'row',\n alignItems: 'center',\n minHeight: containerHeight,\n paddingHorizontal: 4,\n },\n voiceRecorderStyles?.longPressBar,\n ]}\n >\n <Text\n style={[\n {\n fontSize: 15,\n fontWeight: '600',\n color: timerColor,\n minWidth: 44,\n fontFamily,\n },\n voiceRecorderStyles?.timer,\n recordingUIProps?.timerTextStyle,\n ]}\n >\n {formatDuration(duration)}\n </Text>\n\n <Animated.View\n style={[slideTextStyle, { flex: 1, alignItems: 'center' }]}\n >\n <Text\n style={[\n {\n fontSize: 14,\n color: cancelTextColor,\n fontFamily,\n },\n voiceRecorderStyles?.slideText,\n ]}\n >\n {'< Slide to cancel'}\n </Text>\n </Animated.View>\n </View>\n );\n};\n","import { ViewStyle } from 'react-native';\nimport Svg, { Path } from 'react-native-svg';\n\nexport const TrashIcon = ({\n style,\n color = '#ef4444',\n}: {\n style?: ViewStyle;\n color?: string;\n}) => (\n <Svg style={style} viewBox=\"0 0 24 24\" fill=\"none\">\n <Path\n d=\"M3 6h18M8 6V4h8v2M19 6l-1 14H6L5 6\"\n stroke={color}\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n <Path\n d=\"M10 11v6M14 11v6\"\n stroke={color}\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n />\n </Svg>\n);\n","import React, { useEffect, useState } from 'react';\nimport { StyleProp, View, ViewStyle } from 'react-native';\n\nconst DEFAULT_BAR_COUNT = 30;\n\nfunction buildStaticBars(count: number, showOuterDots: boolean): number[] {\n return Array.from({ length: count }, (_, i): number => {\n if (!showOuterDots) return 0.3;\n const pos = i / (count - 1);\n if (pos < 0.12 || pos > 0.88) return 0.08;\n if (pos < 0.22 || pos > 0.78) return 0.18;\n return 0.3;\n });\n}\n\nfunction nextBars(prev: number[], showOuterDots: boolean): number[] {\n const count = prev.length;\n return Array.from({ length: count }, (_, i): number => {\n if (!showOuterDots) return 0.15 + Math.random() * 0.85;\n const pos = i / (count - 1);\n if (pos < 0.12 || pos > 0.88) return prev[i]!;\n if (pos < 0.22 || pos > 0.78) return 0.12 + Math.random() * 0.35;\n return 0.2 + Math.random() * 0.8;\n });\n}\n\ninterface WaveformAnimationProps {\n isActive: boolean;\n color?: string;\n height?: number;\n style?: StyleProp<ViewStyle>;\n barCount?: number;\n showOuterDots?: boolean;\n}\n\nexport const WaveformAnimation: React.FC<WaveformAnimationProps> = ({\n isActive,\n color = 'rgba(0,0,0,0.45)',\n height = 26,\n style,\n barCount = DEFAULT_BAR_COUNT,\n showOuterDots = false,\n}) => {\n const [bars, setBars] = useState<number[]>(() =>\n buildStaticBars(barCount, showOuterDots)\n );\n\n useEffect(() => {\n setBars(buildStaticBars(barCount, showOuterDots));\n }, [barCount, showOuterDots]);\n\n useEffect(() => {\n if (!isActive) {\n setBars(buildStaticBars(barCount, showOuterDots));\n return;\n }\n const id = setInterval(\n () => setBars((prev) => nextBars(prev, showOuterDots)),\n 110\n );\n return () => clearInterval(id);\n }, [isActive, barCount, showOuterDots]);\n\n return (\n <View\n style={[\n { flexDirection: 'row', alignItems: 'center', height, gap: 2 },\n style,\n ]}\n >\n {bars.map((amp, i) => {\n const barH = Math.max(3, Math.round(amp * height));\n const isOuter =\n showOuterDots &&\n (i / (bars.length - 1) < 0.22 || i / (bars.length - 1) > 0.78);\n return (\n <View\n key={i}\n style={{\n flex: 1,\n height: barH,\n borderRadius: isOuter ? barH / 2 : 2,\n backgroundColor: color,\n }}\n />\n );\n })}\n </View>\n );\n};\n","import React from 'react';\nimport { Pressable, Text, View } from 'react-native';\nimport { PaperPlaneIcon } from '../../assets/Icons/PaperPlaneIcon';\nimport { PauseIcon } from '../../assets/Icons/PauseIcon';\nimport { PlayIcon } from '../../assets/Icons/PlayIcon';\nimport { TrashIcon } from '../../assets/Icons/TrashIcon';\nimport { formatDuration } from '../../utils/datefunc';\nimport {\n RecordingUIProps,\n VoiceRecorderStyleOverrides,\n} from '../../types';\nimport { WaveformAnimation } from './WaveformAnimation';\n\ninterface NormalRecordingProps {\n isRecording: boolean;\n isPaused: boolean;\n duration: number;\n onCancel: () => void;\n onSend: () => void;\n onPause: () => void;\n onResume: () => void;\n containerHeight?: number;\n fontFamily?: string;\n sendButtonColor?: string;\n sendIconColor?: string;\n enablePauseResume?: boolean;\n voiceRecorderStyles?: VoiceRecorderStyleOverrides;\n recordingUIProps?: RecordingUIProps;\n CustomPlayIcon?: () => React.ReactNode;\n CustomPauseIcon?: () => React.ReactNode;\n}\n\n// Simple circular ring indicator\nfunction TimerRing({\n color = 'rgba(255,255,255,0.5)',\n size = 26,\n}: {\n color?: string;\n size?: number;\n}) {\n return (\n <View\n style={{\n width: size,\n height: size,\n borderRadius: size / 2,\n borderWidth: 2,\n borderColor: color,\n justifyContent: 'center',\n alignItems: 'center',\n }}\n >\n <View\n style={{\n width: 4,\n height: 4,\n borderRadius: 2,\n backgroundColor: color,\n }}\n />\n </View>\n );\n}\n\nexport const NormalRecording: React.FC<NormalRecordingProps> = ({\n isRecording,\n isPaused,\n duration,\n onCancel,\n onSend,\n onPause,\n onResume,\n containerHeight = 50,\n fontFamily,\n sendButtonColor = '#16a34a',\n sendIconColor = '#ffffff',\n enablePauseResume = true,\n voiceRecorderStyles,\n recordingUIProps,\n CustomPlayIcon,\n CustomPauseIcon,\n}) => {\n const waveColor = recordingUIProps?.waveformColor ?? 'rgba(0,0,0,0.45)';\n const cancelColor = recordingUIProps?.cancelTextColor ?? '#ef4444';\n const timerColor = recordingUIProps?.timerColor ?? '#374151';\n const bg = recordingUIProps?.recordingBackground ?? 'transparent';\n const playPauseIconColor = recordingUIProps?.playPauseIconColor ?? '#ef4444';\n const playPauseSize = recordingUIProps?.playPauseIconSize ?? 24;\n const barCount = recordingUIProps?.waveformBarCount ?? 30;\n const showOuterDots = recordingUIProps?.showWaveformOuterDots ?? true;\n const showTimerRing = recordingUIProps?.showTimerRing ?? true;\n const ringColor = recordingUIProps?.timerRingColor ?? 'rgba(0,0,0,0.3)';\n\n return (\n <View\n style={[\n {\n backgroundColor: bg,\n paddingHorizontal: 4,\n gap: 4,\n },\n voiceRecorderStyles?.normalBar,\n ]}\n >\n {/* ── Row 1: Timer + Waveform + Ring ── */}\n <View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>\n <Text\n style={[\n {\n fontSize: 14,\n fontWeight: '600',\n color: timerColor,\n minWidth: 40,\n fontFamily,\n },\n voiceRecorderStyles?.timer,\n recordingUIProps?.timerTextStyle,\n ]}\n >\n {formatDuration(duration)}\n </Text>\n\n <WaveformAnimation\n isActive={isRecording && !isPaused}\n color={waveColor}\n height={Math.round(containerHeight * 0.5)}\n barCount={barCount}\n showOuterDots={showOuterDots}\n style={[{ flex: 1 }, voiceRecorderStyles?.waveform]}\n />\n\n {showTimerRing && (\n <TimerRing color={ringColor} size={24} />\n )}\n </View>\n\n {/* ── Row 2: Trash | Pause | Send ── */}\n <View\n style={{\n flexDirection: 'row',\n alignItems: 'center',\n minHeight: containerHeight,\n }}\n >\n {/* Trash */}\n <Pressable\n onPress={onCancel}\n style={[\n {\n width: containerHeight,\n height: containerHeight,\n borderRadius: containerHeight / 2,\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: `${cancelColor}18`,\n },\n voiceRecorderStyles?.trashButton,\n ]}\n hitSlop={6}\n >\n <TrashIcon\n style={{\n width: containerHeight * 0.44,\n height: containerHeight * 0.44,\n }}\n color={cancelColor}\n />\n </Pressable>\n\n {/* Pause / Resume — centered */}\n {enablePauseResume && (\n <Pressable\n onPress={isPaused ? onResume : onPause}\n style={[\n {\n flex: 1,\n alignItems: 'center',\n justifyContent: 'center',\n height: containerHeight,\n },\n voiceRecorderStyles?.playPauseButton,\n ]}\n hitSlop={8}\n >\n {isPaused ? (\n CustomPlayIcon ? (\n <CustomPlayIcon />\n ) : (\n <PlayIcon\n style={{ width: playPauseSize, height: playPauseSize }}\n color={playPauseIconColor}\n />\n )\n ) : CustomPauseIcon ? (\n <CustomPauseIcon />\n ) : (\n <PauseIcon\n style={{ width: playPauseSize, height: playPauseSize }}\n color={playPauseIconColor}\n />\n )}\n </Pressable>\n )}\n\n {/* Spacer when pause is disabled so send stays right */}\n {!enablePauseResume && <View style={{ flex: 1 }} />}\n\n {/* Send */}\n <Pressable\n onPress={onSend}\n style={[\n {\n width: containerHeight,\n height: containerHeight,\n borderRadius: containerHeight / 2,\n backgroundColor: sendButtonColor,\n justifyContent: 'center',\n alignItems: 'center',\n },\n voiceRecorderStyles?.sendButton,\n ]}\n hitSlop={4}\n >\n <PaperPlaneIcon\n style={{\n width: containerHeight * 0.44,\n height: containerHeight * 0.44,\n }}\n color={sendIconColor}\n />\n </Pressable>\n </View>\n </View>\n );\n};\n","import { useCallback, useEffect, useRef, useState } from 'react';\nimport { PermissionsAndroid, Platform } from 'react-native';\nimport { RecordingResult } from '../types';\n\nexport type RecordingStatus = 'idle' | 'recording' | 'paused';\n\ninterface UseVoiceRecorderOptions {\n maxDuration?: number;\n onRecordStart?: () => void;\n onRecordEnd?: (result: RecordingResult) => void;\n}\n\nasync function requestMicPermission(): Promise<boolean> {\n if (Platform.OS === 'android') {\n try {\n const granted = await PermissionsAndroid.request(\n PermissionsAndroid.PERMISSIONS.RECORD_AUDIO,\n {\n title: 'Microphone Permission',\n message: 'This app needs access to your microphone to record audio.',\n buttonPositive: 'OK',\n }\n );\n return granted === PermissionsAndroid.RESULTS.GRANTED;\n } catch {\n return false;\n }\n }\n // iOS: permissions are handled natively by AVFoundation when recording starts\n return true;\n}\n\nexport function useVoiceRecorder({\n maxDuration = 300,\n onRecordStart,\n onRecordEnd,\n}: UseVoiceRecorderOptions = {}) {\n const [status, setStatus] = useState<RecordingStatus>('idle');\n const [duration, setDuration] = useState(0);\n\n const recordingRef = useRef<any>(null);\n const timerRef = useRef<ReturnType<typeof setInterval> | null>(null);\n const durationRef = useRef(0);\n\n const onRecordEndRef = useRef(onRecordEnd);\n onRecordEndRef.current = onRecordEnd;\n const onRecordStartRef = useRef(onRecordStart);\n onRecordStartRef.current = onRecordStart;\n const maxDurationRef = useRef(maxDuration);\n maxDurationRef.current = maxDuration;\n\n const stopTimer = useCallback(() => {\n if (timerRef.current) {\n clearInterval(timerRef.current);\n timerRef.current = null;\n }\n }, []);\n\n const startTimer = useCallback(\n (onMax: () => void) => {\n stopTimer();\n timerRef.current = setInterval(() => {\n durationRef.current += 1;\n setDuration(durationRef.current);\n if (durationRef.current >= maxDurationRef.current) onMax();\n }, 1000);\n },\n [stopTimer]\n );\n\n const startRecording = useCallback(async () => {\n let AudioRecord: any;\n try {\n AudioRecord = require('react-native-audio-record').default;\n } catch {\n console.error(\n '[movius-chats] Voice recording requires react-native-audio-record. ' +\n 'Install it: yarn add react-native-audio-record'\n );\n return;\n }\n\n const granted = await requestMicPermission();\n if (!granted) {\n console.warn('[movius-chats] Microphone permission denied.');\n return;\n }\n\n try {\n AudioRecord.init({\n sampleRate: 16000,\n channels: 1,\n bitsPerSample: 16,\n audioSource: 6,\n wavFile: `movius_rec_${Date.now()}.wav`,\n });\n\n AudioRecord.start();\n recordingRef.current = AudioRecord;\n durationRef.current = 0;\n setDuration(0);\n setStatus('recording');\n\n startTimer(() => stopRecordingRef.current());\n\n onRecordStartRef.current?.();\n } catch (e) {\n console.warn('[movius-chats] Failed to start recording:', e);\n }\n }, [startTimer]);\n\n const pauseRecording = useCallback(async () => {\n if (!recordingRef.current) return;\n try {\n recordingRef.current.stop();\n setStatus('paused');\n stopTimer();\n } catch (e) {\n console.warn('[movius-chats] Failed to pause:', e);\n }\n }, [stopTimer]);\n\n const resumeRecording = useCallback(async () => {\n if (!recordingRef.current) return;\n try {\n recordingRef.current.start();\n setStatus('recording');\n startTimer(() => stopRecordingRef.current());\n } catch (e) {\n console.warn('[movius-chats] Failed to resume:', e);\n }\n }, [startTimer]);\n\n const stopRecordingImpl = useCallback(async (): Promise<RecordingResult | null> => {\n const rec = recordingRef.current;\n if (!rec) return null;\n\n stopTimer();\n recordingRef.current = null;\n const capturedDuration = durationRef.current;\n durationRef.current = 0;\n setStatus('idle');\n setDuration(0);\n\n try {\n const uri: string = await rec.stop();\n if (!uri) return null;\n\n const result: RecordingResult = {\n uri: uri.startsWith('file://') ? uri : `file://${uri}`,\n duration: Math.max(1, capturedDuration),\n mimeType: 'audio/wav',\n };\n\n onRecordEndRef.current?.(result);\n return result;\n } catch (e) {\n console.warn('[movius-chats] Failed to stop recording:', e);\n return null;\n }\n }, [stopTimer]);\n\n const stopRecordingRef = useRef(stopRecordingImpl);\n stopRecordingRef.current = stopRecordingImpl;\n\n const stopRecording = useCallback(() => stopRecordingRef.current(), []);\n\n const cancelRecording = useCallback(async () => {\n const rec = recordingRef.current;\n stopTimer();\n recordingRef.current = null;\n durationRef.current = 0;\n setStatus('idle');\n setDuration(0);\n\n if (rec) {\n try {\n const uri: string = await rec.stop();\n if (uri) {\n try {\n const RNFS = require('react-native-fs');\n const path = uri.startsWith('file://') ? uri.slice(7) : uri;\n await RNFS.unlink(path);\n } catch {}\n }\n } catch {}\n }\n }, [stopTimer]);\n\n useEffect(() => {\n return () => {\n stopTimer();\n try { recordingRef.current?.stop(); } catch {}\n };\n }, [stopTimer]);\n\n return {\n status,\n duration,\n isRecording: status === 'recording',\n isPaused: status === 'paused',\n startRecording,\n pauseRecording,\n resumeRecording,\n stopRecording,\n cancelRecording,\n };\n}\n","\nimport { ViewStyle } from \"react-native\";\n\nimport Svg, { Path } from \"react-native-svg\";\n\nexport const FileIcon = ({\n style,\n fill = \"currentColor\",\n}: {\n style?: ViewStyle;\n fill?: string;\n}) => {\n return (\n <Svg style={style} viewBox=\"0 0 24 24\">\n <Path fill={fill} d=\"M13 4H6v16h12V9h-5z\" opacity=\".3\" />\n <Path\n fill={fill}\n d=\"m20 8l-6-6H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2zm-2 12H6V4h7v5h5z\"\n />\n </Svg>\n );\n};\n","import React from 'react';\nimport { StyleProp, Text, TextStyle } from 'react-native';\nimport { useChatContext } from '../../context/ChatContext';\nimport { withFontFamily } from '../../utils/theme';\n\nconst TruncateFileName = ({\n fileName,\n style,\n}: {\n fileName: string;\n style?: StyleProp<TextStyle>;\n}) => {\n const { theme } = useChatContext();\n const getTruncatedName = (fullName: string) => {\n const lastDot = fullName.lastIndexOf('.');\n if (lastDot === -1) return fullName;\n const name = fullName.slice(0, lastDot);\n const ext = fullName.slice(lastDot);\n const maxLength = 40;\n if (name.length > maxLength) {\n return name.slice(0, maxLength) + '...' + ext;\n }\n return name + ext;\n };\n return (\n <Text\n numberOfLines={2}\n ellipsizeMode=\"tail\"\n style={withFontFamily(\n [{ fontSize: 14, fontWeight: '600', color: 'black' }, style],\n theme?.fontFamily\n )}\n >\n {getTruncatedName(fileName)}\n </Text>\n );\n};\n\nexport default React.memo(TruncateFileName);","import React from 'react';\nimport { Image, Pressable, ScrollView, Text, View } from 'react-native';\nimport Video from 'react-native-video';\nimport { FileIcon } from '../../assets/Icons/FileIcon';\nimport { useChatContext } from '../../context/ChatContext';\nimport type { MessageMediaItem, PreviewAttachment } from '../../types';\nimport { withFontFamily } from '../../utils/theme';\nimport TruncateFileName from './TruncateFileName';\n\nfunction previewsToMediaItems(\n previews: PreviewAttachment[]\n): MessageMediaItem[] {\n return previews\n .filter((p) => p.type?.startsWith('image/') || p.type?.startsWith('video/'))\n .map((p) => ({\n uri: p.uri,\n kind: p.type.startsWith('video/') ? 'video' : 'image',\n }));\n}\n\ninterface FilePreviewProps {\n previews: PreviewAttachment[];\n closePreview?: () => void;\n /** Remove a single item by URI. When provided each card gets its own × button. */\n onRemoveItem?: (uri: string) => void;\n CustomFileIcon?: React.ComponentType<{ style?: any }>;\n CustomImagePreview?: React.ComponentType<{ uri: string }>;\n CustomVideoPreview?: React.ComponentType<{ uri: string }>;\n inputHeight?: number;\n}\n\nconst CARD = 56;\nconst FAN_OVERLAP = 18;\n\nconst FilePreview: React.FC<FilePreviewProps> = ({\n previews,\n closePreview,\n onRemoveItem,\n CustomFileIcon,\n CustomImagePreview,\n CustomVideoPreview,\n inputHeight,\n}) => {\n const { theme, setMediaViewerGallery } = useChatContext();\n\n const media = previews.filter(\n (p) => p.type?.startsWith('image/') || p.type?.startsWith('video/')\n );\n const docs = previews.filter(\n (p) => !p.type?.startsWith('image/') && !p.type?.startsWith('video/')\n );\n\n const mediaAsItems = previewsToMediaItems(previews);\n\n if (previews.length === 0) return null;\n\n const openGalleryAt = (index: number) => {\n if (mediaAsItems.length === 0) return;\n setMediaViewerGallery(mediaAsItems, index);\n };\n\n const renderMediaThumb = (p: PreviewAttachment, size = CARD) => {\n const isImage = p.type?.startsWith('image/');\n const isVideo = p.type?.startsWith('video/');\n if (isImage && CustomImagePreview) {\n return <CustomImagePreview uri={p.uri} />;\n }\n if (isVideo && CustomVideoPreview) {\n return <CustomVideoPreview uri={p.uri} />;\n }\n if (isImage) {\n return (\n <Image\n source={{ uri: p.uri }}\n style={{\n width: size,\n height: size,\n borderRadius: 12,\n }}\n resizeMode=\"cover\"\n />\n );\n }\n if (isVideo) {\n return (\n <View\n style={{\n width: size,\n height: size,\n borderRadius: 12,\n overflow: 'hidden',\n }}\n >\n <Video\n source={{ uri: p.uri }}\n style={{ width: '100%', height: '100%' }}\n resizeMode=\"cover\"\n muted\n repeat\n paused={false}\n pointerEvents=\"none\"\n playInBackground={false}\n playWhenInactive={false}\n />\n </View>\n );\n }\n return null;\n };\n\n\n const renderCloseBtn = (uri: string, counterRotate?: string) => (\n <Pressable\n onPress={() => (onRemoveItem ? onRemoveItem(uri) : closePreview?.())}\n style={{\n position: 'absolute',\n zIndex: 50,\n height: 22,\n width: 22,\n backgroundColor: 'rgba(0,0,0,0.55)',\n right: -6,\n top: -6,\n borderRadius: 11,\n justifyContent: 'center',\n alignItems: 'center',\n transform: counterRotate ? [{ rotate: counterRotate }] : undefined,\n }}\n >\n <Text\n style={withFontFamily(\n { fontSize: 13, color: 'white', fontWeight: '700', lineHeight: 14 },\n theme?.fontFamily\n )}\n >\n ×\n </Text>\n </Pressable>\n );\n\n const renderMediaSection = () => {\n if (media.length === 0) return null;\n\n if (media.length === 1) {\n const p = media[0];\n if (!p) return null;\n return (\n <Pressable onPress={() => openGalleryAt(0)} style={{ position: 'relative' }}>\n {renderMediaThumb(p)}\n {renderCloseBtn(p.uri)}\n </Pressable>\n );\n }\n\n const slice = media.slice(0, 3);\n const extraOnThird = media.length > 3 ? media.length - 3 : 0;\n\n return (\n <View\n style={{\n flexDirection: 'row',\n alignItems: 'center',\n minHeight: CARD + 12,\n }}\n >\n {slice.map((p, idx) => {\n const rot =\n slice.length === 2\n ? idx === 0\n ? '-4deg'\n : '4deg'\n : idx === 0\n ? '-10deg'\n : idx === 1\n ? '0deg'\n : '10deg';\n\n // Negate the card rotation so the × button stays visually upright\n const counterRot =\n slice.length === 2\n ? idx === 0\n ? '4deg'\n : '-4deg'\n : idx === 0\n ? '10deg'\n : idx === 1\n ? '0deg'\n : '-10deg';\n\n return (\n <Pressable\n key={`${p.uri}-${idx}`}\n onPress={() => {\n const items = previewsToMediaItems(media);\n const i = items.findIndex((x) => x.uri === p.uri);\n openGalleryAt(i >= 0 ? i : 0);\n }}\n style={{\n marginLeft: idx === 0 ? 0 : -FAN_OVERLAP,\n zIndex: idx + 1,\n transform: [{ rotate: rot }],\n position: 'relative',\n }}\n >\n <View style={{ position: 'relative' }}>\n {renderMediaThumb(p)}\n {idx === 2 && extraOnThird > 0 && (\n <View\n style={{\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n borderRadius: 12,\n backgroundColor: 'rgba(0,0,0,0.55)',\n alignItems: 'center',\n justifyContent: 'center',\n }}\n >\n <Text\n style={{ color: '#fff', fontWeight: '700', fontSize: 14 }}\n >\n +{extraOnThird}\n </Text>\n </View>\n )}\n {renderCloseBtn(p.uri, counterRot)}\n </View>\n </Pressable>\n );\n })}\n </View>\n );\n };\n\n // Each doc card: minHeight 64 + gap 8. Show at most 3 before scrolling.\n const DOC_CARD_H = 72; // 64 min + a bit of padding room\n const docsMaxHeight = DOC_CARD_H * 3 + 8 * 2; // 3 cards + 2 gaps\n\n const renderDocCard = (doc: PreviewAttachment, di: number) => (\n <View\n key={`${doc.uri}-${di}`}\n style={{ position: 'relative' }}\n >\n <View\n style={[\n {\n backgroundColor: 'white',\n width: 240,\n minHeight: 64,\n borderRadius: 12,\n flexDirection: 'row',\n padding: 4,\n gap: 4,\n alignItems: 'center',\n },\n theme?.filePreviewStyle?.container,\n ]}\n >\n <View\n style={[\n {\n backgroundColor: '#d1d5db',\n borderRadius: 8,\n padding: 4,\n justifyContent: 'center',\n alignItems: 'center',\n },\n theme?.filePreviewStyle?.iconContainer,\n ]}\n >\n {CustomFileIcon ? (\n <CustomFileIcon />\n ) : (\n <FileIcon style={{ width: 40, height: 40 }} fill=\"white\" />\n )}\n </View>\n <View\n style={[\n {\n backgroundColor: '#f3f4f6',\n flex: 1,\n borderRadius: 8,\n justifyContent: 'center',\n paddingHorizontal: 12,\n },\n theme?.filePreviewStyle?.nameContainer,\n ]}\n >\n <TruncateFileName\n fileName={doc.name || 'File'}\n style={theme?.filePreviewStyle?.text}\n />\n </View>\n </View>\n {renderCloseBtn(doc.uri)}\n </View>\n );\n\n return (\n <View\n style={[\n {\n position: 'absolute',\n bottom: (inputHeight ?? 0) + 8,\n zIndex: 20,\n borderRadius: 12,\n maxWidth: '92%',\n alignSelf: 'flex-start',\n },\n theme?.filePreviewStyle?.root,\n ]}\n >\n <View style={{ gap: 8 }}>\n {renderMediaSection()}\n {docs.length > 0 && (\n <ScrollView\n scrollEnabled={docs.length > 3}\n style={{ maxHeight: docsMaxHeight }}\n showsVerticalScrollIndicator={docs.length > 3}\n contentContainerStyle={{ gap: 8 }}\n nestedScrollEnabled\n >\n {docs.map((doc, di) => renderDocCard(doc, di))}\n </ScrollView>\n )}\n </View>\n </View>\n );\n};\n\nexport default React.memo(FilePreview);\n","import React, {\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport {\n PanResponder,\n Platform,\n Pressable,\n TextInput,\n View,\n} from 'react-native';\nimport tw from 'twrnc';\nimport { CameraIcon } from '../../assets/Icons/CameraIcon';\nimport { EmojiFunnySquareIcon } from '../../assets/Icons/EmojiFunnySquareIcon';\nimport { MicrophoneIcon } from '../../assets/Icons/MicrophoneIcon';\nimport { PaperClipIcon } from '../../assets/Icons/PaperClipIcon';\nimport { PaperPlaneIcon } from '../../assets/Icons/PaperPlaneIcon';\nimport { AnimatedHoldMic } from '../VoiceRecorder/AnimatedHoldMic';\nimport { LockSlideColumn } from '../VoiceRecorder/LockSlideColumn';\nimport { LongPressRecording } from '../VoiceRecorder/LongPressRecording';\nimport { NormalRecording } from '../VoiceRecorder/NormalRecording';\nimport { getRecordingContainerStyle } from '../VoiceRecorder/recordingContainerStyle';\nimport { useChatContext } from '../../context/ChatContext';\nimport { useVoiceRecorder } from '../../hooks/useVoiceRecorder';\nimport { RecordingResult, VoiceRecorderExposedState } from '../../types';\nimport {\n getInputBarIconPixelSize,\n getInputBarIconStyle,\n withFontFamily,\n} from '../../utils/theme';\nimport FilePreview from './FilePreview';\nimport { ChatInputProps, InputHeightState } from './types';\n\n// ─── Layout constants ─────────────────────────────────────────────────────────\nconst MIN_INPUT_HEIGHT = Platform.OS === 'ios' ? 32 : 30;\nconst MAX_INPUT_HEIGHT = 118;\nconst INPUT_BAR_SHELL_HEIGHT = Platform.OS === 'ios' ? 50 : 48;\n\nconst SEND_ICON_CLASS = 'h-6 w-6';\nconst MIC_ICON_CLASS = 'h-8 w-8';\n\n// Long-press / swipe thresholds (px)\nconst LONG_PRESS_MS = 500;\nconst CANCEL_THRESHOLD_X = -70; // slide left to cancel\nconst DEFAULT_LOCK_SLIDE_DISTANCE = 72; // slide up to lock (matches lock pill)\n\ntype VoiceMode = 'idle' | 'normal' | 'longPress' | 'locked';\n\n// ─── Component ────────────────────────────────────────────────────────────────\nconst ChatInput: React.FC<ChatInputProps> = ({\n onSendMessage,\n onTypingStart,\n onTypingEnd,\n onAttachmentPress,\n onCameraPress,\n onAudioRecordStart,\n onAudioRecordEnd,\n CustomEmojiIcon,\n CustomAttachmentIcon,\n CustomCameraIcon,\n CustomSendIcon,\n CustomMicrophoneIcon,\n CustomFileIcon,\n CustomImagePreview,\n CustomVideoPreview,\n}) => {\n // ── Text input state ───────────────────────────────────────────────────────\n const [inputText, setInputText] = useState('');\n const [inputResetKey, setInputResetKey] = useState(0);\n const [inputHeight, setInputHeight] = useState<InputHeightState>({\n height: MIN_INPUT_HEIGHT,\n isMultiline: false,\n });\n\n const {\n theme,\n currentUserId,\n showEmojiButton,\n showAttachmentsButton,\n showCameraButton,\n showVoiceRecordButton,\n placeholder,\n previewData,\n previewItems,\n closePreview,\n onRemovePreviewItem,\n voiceRecorderProps,\n voiceRecorderStyles,\n recordingUIProps,\n renderVoiceRecorder,\n CustomPlayIcon,\n CustomPauseIcon,\n } = useChatContext();\n\n // ── Preview list ───────────────────────────────────────────────────────────\n const previewList = useMemo(() => {\n if (previewItems?.length) return previewItems;\n if (previewData) return [previewData];\n return [];\n }, [previewItems, previewData]);\n\n const hasPreviewAttachments = previewList.length > 0;\n\n // ── Icon sizing ────────────────────────────────────────────────────────────\n const inputBarIconSize = theme?.sizes?.inputIconSize;\n const inputBarIconStyle = getInputBarIconStyle(inputBarIconSize);\n const iconPixelSize = getInputBarIconPixelSize(inputBarIconSize);\n\n const isCompactInput =\n inputText.trim().length === 0 && !inputHeight.isMultiline;\n\n const iconInset = Math.max(0, (INPUT_BAR_SHELL_HEIGHT - iconPixelSize) / 2);\n const iconSlotStyle = isCompactInput\n ? { paddingTop: iconInset, paddingBottom: iconInset }\n : { paddingBottom: iconInset };\n\n // ── Text input handlers ────────────────────────────────────────────────────\n const resetInputLayout = useCallback(() => {\n setInputHeight({ height: MIN_INPUT_HEIGHT, isMultiline: false });\n setInputResetKey((k) => k + 1);\n }, []);\n\n const handleChangeText = useCallback(\n (text: string) => {\n setInputText(text);\n if (text.length === 0) resetInputLayout();\n },\n [resetInputLayout]\n );\n\n const handleContentSizeChange = useCallback(\n (event: { nativeEvent: { contentSize: { height: number } } }) => {\n const newHeight = Math.min(\n Math.max(event.nativeEvent.contentSize.height, MIN_INPUT_HEIGHT),\n MAX_INPUT_HEIGHT\n );\n const isMultiline = newHeight > MIN_INPUT_HEIGHT;\n setInputHeight({\n height: isMultiline ? newHeight : MIN_INPUT_HEIGHT,\n isMultiline,\n });\n },\n []\n );\n\n const handleSendMessage = useCallback(() => {\n const trimmedText = inputText.trim();\n if (!trimmedText && !hasPreviewAttachments) return;\n onSendMessage({ text: trimmedText, senderId: currentUserId });\n setInputText('');\n resetInputLayout();\n }, [inputText, onSendMessage, currentUserId, hasPreviewAttachments, resetInputLayout]);\n\n useEffect(() => {\n if (inputText.trim()) onTypingStart?.();\n else onTypingEnd?.();\n }, [inputText, onTypingStart, onTypingEnd]);\n\n const showSendButton = !!inputText.trim() || hasPreviewAttachments;\n\n // ── Voice recorder ─────────────────────────────────────────────────────────\n const [voiceMode, setVoiceModeState] = useState<VoiceMode>('idle');\n const voiceModeRef = useRef<VoiceMode>('idle');\n const setVoiceMode = useCallback((mode: VoiceMode) => {\n voiceModeRef.current = mode;\n setVoiceModeState(mode);\n }, []);\n\n const lockSlideDistance =\n recordingUIProps?.lockSlideDistance ?? DEFAULT_LOCK_SLIDE_DISTANCE;\n const lockSlideDistanceRef = useRef(lockSlideDistance);\n lockSlideDistanceRef.current = lockSlideDistance;\n\n // Track finger position for long-press UI feedback\n const [slideX, setSlideX] = useState(0);\n const [slideY, setSlideY] = useState(0);\n const slideXRef = useRef(0);\n const slideYRef = useRef(0);\n\n const onRecordEnd = useCallback(\n (result: RecordingResult) => {\n onAudioRecordEnd?.(result);\n },\n [onAudioRecordEnd]\n );\n\n const recorder = useVoiceRecorder({\n maxDuration: voiceRecorderProps?.maxDuration ?? 300,\n onRecordStart: onAudioRecordStart,\n onRecordEnd,\n });\n\n // Keep a stable ref to the recorder so the PanResponder closure never stales\n const recorderRef = useRef(recorder);\n recorderRef.current = recorder;\n\n // ── Send / cancel helpers ──────────────────────────────────────────────────\n const handleSendVoice = useCallback(async () => {\n const result = await recorderRef.current.stopRecording();\n setVoiceMode('idle');\n if (result) {\n onSendMessage({ audio: result.uri, senderId: currentUserId });\n }\n }, [onSendMessage, currentUserId, setVoiceMode]);\n\n const handleCancelVoice = useCallback(() => {\n recorderRef.current.cancelRecording();\n setVoiceMode('idle');\n setSlideX(0);\n setSlideY(0);\n slideXRef.current = 0;\n slideYRef.current = 0;\n }, [setVoiceMode]);\n\n // Stable refs for PanResponder closures\n const handleSendVoiceRef = useRef(handleSendVoice);\n handleSendVoiceRef.current = handleSendVoice;\n const handleCancelVoiceRef = useRef(handleCancelVoice);\n handleCancelVoiceRef.current = handleCancelVoice;\n\n // ── PanResponder for the mic button ───────────────────────────────────────\n // Created once; uses refs for all mutable values to avoid stale closures.\n const longPressTimerRef = useRef<ReturnType<typeof setTimeout>>();\n const isLongPressActiveRef = useRef(false);\n\n const micPanResponder = useMemo(\n () =>\n PanResponder.create({\n onStartShouldSetPanResponder: () => true,\n onMoveShouldSetPanResponder: () => isLongPressActiveRef.current,\n\n onPanResponderGrant: () => {\n isLongPressActiveRef.current = false;\n slideXRef.current = 0;\n slideYRef.current = 0;\n setSlideX(0);\n setSlideY(0);\n\n longPressTimerRef.current = setTimeout(async () => {\n isLongPressActiveRef.current = true;\n await recorderRef.current.startRecording();\n setVoiceMode('longPress');\n }, LONG_PRESS_MS);\n },\n\n onPanResponderMove: (_, gestureState) => {\n if (!isLongPressActiveRef.current) return;\n\n slideXRef.current = gestureState.dx;\n slideYRef.current = gestureState.dy;\n setSlideX(gestureState.dx);\n setSlideY(gestureState.dy);\n\n const enableLock =\n voiceRecorderProps?.enableLockRecording !== false;\n\n // Lock only after sliding up to the lock pill (not on tiny movements)\n if (\n enableLock &&\n gestureState.dy <= -lockSlideDistanceRef.current &&\n voiceModeRef.current === 'longPress'\n ) {\n setVoiceMode('locked');\n slideYRef.current = -lockSlideDistanceRef.current;\n setSlideY(-lockSlideDistanceRef.current);\n }\n },\n\n onPanResponderRelease: async (_, gestureState) => {\n clearTimeout(longPressTimerRef.current);\n const wasLongPress = isLongPressActiveRef.current;\n isLongPressActiveRef.current = false;\n\n if (!wasLongPress) {\n // Quick tap → start normal recording mode\n await recorderRef.current.startRecording();\n setVoiceMode('normal');\n return;\n }\n\n // Long press released\n if (voiceModeRef.current === 'locked') {\n // Locked → stay in recording, user taps send/cancel manually\n return;\n }\n\n if (gestureState.dx < CANCEL_THRESHOLD_X) {\n handleCancelVoiceRef.current();\n } else {\n // Auto-send on release (WhatsApp behaviour)\n handleSendVoiceRef.current();\n }\n },\n\n onPanResponderTerminate: () => {\n clearTimeout(longPressTimerRef.current);\n isLongPressActiveRef.current = false;\n },\n }),\n [] // Intentional: all values accessed via refs\n );\n\n const recordingSendBg =\n recordingUIProps?.recordingSendButtonBackground ??\n (theme?.inputStyles?.sendButtonStyle?.backgroundColor as string) ??\n '#16a34a';\n const recordingSendFg = theme?.colors?.sendIconsColor ?? '#ffffff';\n const holdMicColor =\n recordingUIProps?.longPressMicColor ?? theme?.colors?.sendIconsColor ?? '#ffffff';\n\n const recordingContainerStyle = getRecordingContainerStyle(\n voiceRecorderStyles,\n recordingUIProps\n );\n\n // ── Render recording UI ───────────────────────────────────────────────────\n if (voiceMode !== 'idle') {\n const exposedState: VoiceRecorderExposedState = {\n isRecording: recorder.isRecording,\n isPaused: recorder.isPaused,\n duration: recorder.duration,\n isLocked: voiceMode === 'locked',\n slideOffset: { x: slideX, y: slideY },\n waveformData: [],\n startRecording: recorder.startRecording,\n stopRecording: recorder.stopRecording,\n pauseRecording: recorder.pauseRecording,\n resumeRecording: recorder.resumeRecording,\n cancelRecording: handleCancelVoice,\n };\n\n return (\n <View style={tw`w-full px-2`}>\n {hasPreviewAttachments && (\n <FilePreview\n previews={previewList}\n closePreview={closePreview}\n onRemoveItem={onRemovePreviewItem}\n CustomFileIcon={CustomFileIcon}\n CustomImagePreview={CustomImagePreview}\n CustomVideoPreview={CustomVideoPreview}\n inputHeight={inputHeight.height}\n />\n )}\n\n <View style={recordingContainerStyle}>\n {renderVoiceRecorder ? (\n renderVoiceRecorder(exposedState)\n ) : voiceMode === 'longPress' ? (\n <View\n style={[\n tw`flex-row items-end gap-2`,\n theme?.inputStyles?.inputSectionContainerStyle,\n ]}\n >\n <LongPressRecording\n duration={recorder.duration}\n slideX={slideX}\n containerHeight={INPUT_BAR_SHELL_HEIGHT}\n fontFamily={theme?.fontFamily}\n voiceRecorderStyles={voiceRecorderStyles}\n recordingUIProps={recordingUIProps}\n />\n\n <View style={{ alignItems: 'center' }}>\n <LockSlideColumn\n slideY={slideY}\n lockSlideDistance={lockSlideDistance}\n recordingUIProps={recordingUIProps}\n voiceRecorderStyles={voiceRecorderStyles}\n />\n <View\n {...micPanResponder.panHandlers}\n style={[\n tw`rounded-full justify-center items-center`,\n {\n height: INPUT_BAR_SHELL_HEIGHT,\n width: INPUT_BAR_SHELL_HEIGHT,\n backgroundColor: recordingSendBg,\n },\n voiceRecorderStyles?.holdMicButton,\n theme?.inputStyles?.sendButtonStyle,\n ]}\n >\n <AnimatedHoldMic\n color={holdMicColor}\n size={\n recordingUIProps?.recordingIconSize ??\n recordingUIProps?.iconSize ??\n 28\n }\n />\n </View>\n </View>\n </View>\n ) : (\n <NormalRecording\n isRecording={recorder.isRecording}\n isPaused={recorder.isPaused}\n duration={recorder.duration}\n onCancel={handleCancelVoice}\n onSend={handleSendVoice}\n onPause={recorder.pauseRecording}\n onResume={recorder.resumeRecording}\n enablePauseResume={voiceRecorderProps?.enablePauseResume ?? true}\n containerHeight={INPUT_BAR_SHELL_HEIGHT}\n fontFamily={theme?.fontFamily}\n sendButtonColor={recordingSendBg}\n sendIconColor={recordingSendFg}\n voiceRecorderStyles={voiceRecorderStyles}\n recordingUIProps={recordingUIProps}\n CustomPlayIcon={CustomPlayIcon}\n CustomPauseIcon={CustomPauseIcon}\n />\n )}\n </View>\n </View>\n );\n }\n\n // ── Normal input UI ───────────────────────────────────────────────────────\n return (\n <View style={tw`w-full px-2`}>\n {hasPreviewAttachments && (\n <FilePreview\n previews={previewList}\n closePreview={closePreview}\n onRemoveItem={onRemovePreviewItem}\n CustomFileIcon={CustomFileIcon}\n CustomImagePreview={CustomImagePreview}\n CustomVideoPreview={CustomVideoPreview}\n inputHeight={inputHeight.height}\n />\n )}\n\n <View\n style={[\n tw`flex-row items-end gap-2`,\n theme?.inputStyles?.inputSectionContainerStyle,\n ]}\n >\n {/* ── Text input pill ── */}\n <View\n style={[\n tw`flex-1 flex-row bg-white overflow-hidden px-3.5`,\n {\n minHeight: INPUT_BAR_SHELL_HEIGHT,\n borderRadius: isCompactInput ? 9999 : 24,\n alignItems: isCompactInput ? 'center' : 'flex-end',\n },\n theme?.inputStyles?.inputContainerStyle,\n ]}\n >\n {showEmojiButton && (\n <View style={iconSlotStyle}>\n <Pressable>\n {CustomEmojiIcon ? (\n <CustomEmojiIcon />\n ) : (\n <EmojiFunnySquareIcon\n style={inputBarIconStyle}\n color={\n theme?.colors?.inputsIconsColor || 'rgba(0,0,0,0.7)'\n }\n />\n )}\n </Pressable>\n </View>\n )}\n\n <TextInput\n key={`chat-input-${inputResetKey}`}\n value={inputText}\n onChangeText={handleChangeText}\n placeholder={placeholder || 'Message'}\n style={withFontFamily(\n [\n tw`bg-transparent flex-1 pl-2`,\n Platform.OS === 'ios' ? tw`text-[17px]` : tw`text-[16px]`,\n {\n minHeight: MIN_INPUT_HEIGHT,\n maxHeight: MAX_INPUT_HEIGHT,\n paddingVertical: isCompactInput ? 0 : 8,\n marginVertical: isCompactInput\n ? (INPUT_BAR_SHELL_HEIGHT - MIN_INPUT_HEIGHT) / 2\n : 4,\n },\n {\n color:\n theme?.colors?.inputTextColor || 'rgba(0, 0, 0, 0.87)',\n },\n ],\n theme?.fontFamily\n )}\n placeholderTextColor={\n theme?.colors?.placeholderTextColor || 'rgba(0, 0, 0, 0.4)'\n }\n multiline\n textAlignVertical={\n inputHeight.isMultiline && inputText.length > 0\n ? 'top'\n : 'center'\n }\n onContentSizeChange={handleContentSizeChange}\n />\n\n <View style={[tw`flex-row items-center gap-4`, iconSlotStyle]}>\n {showAttachmentsButton && (\n <Pressable onPress={onAttachmentPress}>\n {CustomAttachmentIcon ? (\n <CustomAttachmentIcon />\n ) : (\n <PaperClipIcon\n style={inputBarIconStyle}\n color={\n theme?.colors?.inputsIconsColor || 'rgba(0,0,0,0.7)'\n }\n />\n )}\n </Pressable>\n )}\n {showCameraButton && !inputText.trim() && (\n <Pressable onPress={onCameraPress}>\n {CustomCameraIcon ? (\n <CustomCameraIcon />\n ) : (\n <CameraIcon\n style={inputBarIconStyle}\n color={\n theme?.colors?.inputsIconsColor || 'rgba(0,0,0,0.7)'\n }\n />\n )}\n </Pressable>\n )}\n </View>\n </View>\n\n {/* ── Right action button (send / mic) ── */}\n {showSendButton ? (\n <Pressable\n onPress={handleSendMessage}\n style={[\n tw`rounded-full justify-center items-center`,\n {\n height: INPUT_BAR_SHELL_HEIGHT,\n width: INPUT_BAR_SHELL_HEIGHT,\n backgroundColor: '#16a34a',\n ...theme?.inputStyles?.sendButtonStyle,\n },\n ]}\n >\n {CustomSendIcon ? (\n <CustomSendIcon />\n ) : (\n <PaperPlaneIcon\n style={tw.style(SEND_ICON_CLASS)}\n color={theme?.colors?.sendIconsColor || 'rgba(255,255,255,0.7)'}\n />\n )}\n </Pressable>\n ) : showVoiceRecordButton ? (\n // Mic button uses PanResponder for tap + long-press + drag\n <View\n {...micPanResponder.panHandlers}\n style={[\n tw`rounded-full justify-center items-center`,\n {\n height: INPUT_BAR_SHELL_HEIGHT,\n width: INPUT_BAR_SHELL_HEIGHT,\n backgroundColor: '#16a34a',\n ...theme?.inputStyles?.sendButtonStyle,\n },\n ]}\n >\n {CustomMicrophoneIcon ? (\n <CustomMicrophoneIcon />\n ) : (\n <MicrophoneIcon\n style={tw.style(MIC_ICON_CLASS)}\n color={theme?.colors?.sendIconsColor || 'rgba(255,255,255,0.7)'}\n />\n )}\n </View>\n ) : (\n <Pressable\n onPress={handleSendMessage}\n style={[\n tw`rounded-full justify-center items-center`,\n {\n height: INPUT_BAR_SHELL_HEIGHT,\n width: INPUT_BAR_SHELL_HEIGHT,\n backgroundColor: '#16a34a',\n ...theme?.inputStyles?.sendButtonStyle,\n },\n ]}\n >\n {CustomSendIcon ? (\n <CustomSendIcon />\n ) : (\n <PaperPlaneIcon\n style={tw.style(SEND_ICON_CLASS)}\n color={theme?.colors?.sendIconsColor || 'rgba(255,255,255,0.7)'}\n />\n )}\n </Pressable>\n )}\n </View>\n </View>\n );\n};\n\nexport default React.memo(ChatInput);\n","import { ViewStyle } from 'react-native';\nimport { RecordingUIProps, VoiceRecorderStyleOverrides } from '../../types';\n\n/** Shared wrapper styles for every built-in recording mode. */\nexport function getRecordingContainerStyle(\n voiceRecorderStyles?: VoiceRecorderStyleOverrides,\n recordingUIProps?: RecordingUIProps\n): ViewStyle {\n const borderColor =\n recordingUIProps?.containerBorderTopColor ?? 'rgba(0,0,0,0.12)';\n\n return {\n borderTopWidth: recordingUIProps?.containerBorderTopWidth ?? 1,\n borderTopColor: borderColor,\n paddingTop: 10,\n paddingBottom: 4,\n ...voiceRecorderStyles?.container,\n };\n}\n","import { ViewStyle } from 'react-native';\nimport { Line, Svg } from 'react-native-svg';\nimport tw from 'twrnc';\n\nexport function XIcon({ style }: { style?: ViewStyle }) {\n return (\n <Svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"black\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={tw.style('h-6 w-6 text-black', style)}\n >\n <Line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <Line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </Svg>\n );\n}\n","import React, { useCallback, useEffect, useRef, useState } from 'react';\nimport {\n FlatList,\n Image,\n Modal,\n NativeScrollEvent,\n NativeSyntheticEvent,\n Pressable,\n Text,\n View,\n useWindowDimensions,\n} from 'react-native';\nimport Video, { VideoRef } from 'react-native-video';\nimport tw from 'twrnc';\nimport { LoadingIcon } from '../../assets/Icons/LoadingIcon';\nimport { XIcon } from '../../assets/Icons/XIcon';\nimport { useChatContext } from '../../context/ChatContext';\nimport type { MessageMediaItem } from '../../types';\nimport { withFontFamily } from '../../utils/theme';\n\nexport interface MediaViewerProps {\n gallery: { items: MessageMediaItem[]; initialIndex: number } | null;\n onClose: () => void;\n}\n\nconst MediaViewer: React.FC<MediaViewerProps> = ({ gallery, onClose }) => {\n const { theme, setIsVideoPlaying } = useChatContext();\n const listRef = useRef<FlatList<MessageMediaItem>>(null);\n const initialIndex = gallery?.initialIndex ?? 0;\n const [pageIndex, setPageIndex] = useState(initialIndex);\n const { width, height: windowHeight } = useWindowDimensions();\n\n useEffect(() => {\n if (!gallery?.items.length) return;\n const idx = gallery.initialIndex;\n setPageIndex(idx);\n const item = gallery.items[idx];\n setIsVideoPlaying(item?.kind === 'video');\n\n requestAnimationFrame(() => {\n try {\n listRef.current?.scrollToIndex({\n index: idx,\n animated: false,\n });\n } catch {\n /* layout not ready */\n }\n });\n }, [gallery?.initialIndex, gallery?.items, setIsVideoPlaying]);\n\n const handleClose = useCallback(() => {\n setIsVideoPlaying(false);\n onClose();\n }, [onClose, setIsVideoPlaying]);\n\n const onMomentumScrollEnd = useCallback(\n (e: NativeSyntheticEvent<NativeScrollEvent>) => {\n const idx = Math.round(e.nativeEvent.contentOffset.x / width);\n setPageIndex(idx);\n const item = gallery?.items[idx];\n setIsVideoPlaying(item?.kind === 'video');\n },\n [gallery?.items, width, setIsVideoPlaying]\n );\n\n if (!gallery || gallery.items.length === 0) return null;\n\n return (\n <Modal\n visible\n transparent\n animationType=\"fade\"\n onRequestClose={handleClose}\n statusBarTranslucent\n >\n <View style={[tw`flex-1 bg-black`, { width, height: windowHeight }]}>\n <Pressable\n onPress={handleClose}\n style={tw`absolute right-4 top-12 z-20 p-2 rounded-full bg-slate-100/70`}\n >\n <XIcon style={tw`h-8 w-8`} />\n </Pressable>\n\n {gallery.items.length > 1 && (\n <View style={tw`absolute top-14 left-0 right-0 z-10 items-center`}>\n <Text\n style={withFontFamily(\n tw`text-white/90 text-sm bg-black/40 px-3 py-1 rounded-full`,\n theme?.fontFamily\n )}\n >\n {pageIndex + 1} / {gallery.items.length}\n </Text>\n </View>\n )}\n\n <FlatList\n ref={listRef}\n data={gallery.items}\n horizontal\n pagingEnabled\n showsHorizontalScrollIndicator={false}\n keyExtractor={(item, i) => `${item.uri}-${i}`}\n initialScrollIndex={gallery.initialIndex}\n extraData={pageIndex}\n getItemLayout={(_, index) => ({\n length: width,\n offset: width * index,\n index,\n })}\n onMomentumScrollEnd={onMomentumScrollEnd}\n onScrollToIndexFailed={({ index }) => {\n setTimeout(() => {\n listRef.current?.scrollToIndex({ index, animated: false });\n }, 100);\n }}\n renderItem={({ item, index }) => (\n <ViewerPage\n item={item}\n width={width}\n height={windowHeight}\n isActive={index === pageIndex}\n autoPlayVideo={index === initialIndex && item.kind === 'video'}\n />\n )}\n />\n </View>\n </Modal>\n );\n};\n\nconst ViewerPage: React.FC<{\n item: MessageMediaItem;\n width: number;\n height: number;\n isActive: boolean;\n /** Only true for the item the user tapped — not other pages in the album */\n autoPlayVideo: boolean;\n}> = ({ item, width, height, isActive, autoPlayVideo }) => {\n const { theme } = useChatContext();\n const videoRef = useRef<VideoRef>(null);\n const [loading, setLoading] = useState(item.kind === 'video');\n const [error, setError] = useState(false);\n\n const shouldPlayVideo =\n item.kind === 'video' && isActive && autoPlayVideo;\n\n if (item.kind === 'image') {\n return (\n <View style={{ width, height, justifyContent: 'center' }}>\n <Image\n source={{ uri: item.uri }}\n style={{ width, height }}\n resizeMode=\"contain\"\n />\n </View>\n );\n }\n\n return (\n <View\n style={{\n width,\n height,\n justifyContent: 'center',\n alignItems: 'center',\n paddingHorizontal: 16,\n }}\n >\n <Video\n source={{ uri: item.uri }}\n ref={videoRef}\n controls\n paused={!shouldPlayVideo}\n shutterColor=\"transparent\"\n playInBackground={false}\n playWhenInactive={false}\n style={{\n width: width - 32,\n height: height * 0.55,\n backgroundColor: '#000',\n }}\n resizeMode=\"contain\"\n onLoadStart={() => {\n setLoading(true);\n setError(false);\n }}\n onLoad={() => setLoading(false)}\n onBuffer={({ isBuffering }) => setLoading(isBuffering)}\n onError={() => {\n setError(true);\n setLoading(false);\n }}\n />\n {loading && (\n <View\n style={tw`absolute inset-0 items-center justify-center`}\n pointerEvents=\"none\"\n >\n <LoadingIcon style={tw.style('h-14 w-14')} spinning />\n </View>\n )}\n {error && (\n <View style={tw`absolute inset-0 items-center justify-center px-6`}>\n <Text\n style={withFontFamily(\n tw`text-white font-semibold`,\n theme?.fontFamily\n )}\n >\n Failed to load video\n </Text>\n </View>\n )}\n </View>\n );\n};\n\nexport default React.memo(MediaViewer);\n","import { Image, Text, View } from 'react-native';\nimport tw from 'twrnc';\nimport { ArrowBack2RoundedIcon } from '../../assets/Icons/ArrowBack2RoundedIcon';\nimport { useChatContext } from '../../context/ChatContext';\nimport { withFontFamily } from '../../utils/theme';\n\nexport interface TypingUser {\n id: string;\n avatar: string;\n name: string;\n}\n\ninterface TypingIndicatorProps {\n typingUsers: TypingUser[];\n currentUserId: string;\n}\n\nexport const TypingIndicator = ({\n typingUsers,\n currentUserId,\n}: TypingIndicatorProps) => {\n const { theme, showAvatars, renderCustomTyping, showBubbleTail, typingText } =\n useChatContext();\n\n const otherTypingUsers = typingUsers.filter(\n (user) => user.id !== currentUserId\n );\n\n if (!otherTypingUsers.length) return null;\n\n const displayedUsers = otherTypingUsers.slice(0, 2);\n const additionalUsers = otherTypingUsers.length - 2;\n\n // Number of visible circles (up to 2 user avatars + optional \"+N\")\n const numCircles = showAvatars\n ? displayedUsers.length + (additionalUsers > 0 ? 1 : 0)\n : 0;\n\n // Width of avatar group: first is 24px, each extra adds 14px (24 - 10px overlap)\n const avatarGroupW = numCircles > 0 ? 24 + Math.max(0, numCircles - 1) * 14 : 0;\n\n // marginLeft = avatarGroupW + 12 keeps the same 4px visual gap as regular\n // received chat bubbles (px-2 = 8px padding + 4px gap). For 1 avatar this\n // equals exactly 36px = ml-9, matching ChatBubble.tsx perfectly.\n const bubbleMarginLeft = numCircles > 0 ? avatarGroupW + 12 : 8;\n\n // Avatar group left from content area (inside px-2 padding = 8px)\n const avatarLeft = -(avatarGroupW + 12);\n\n return (\n <View\n style={[\n tw`px-2 my-1 bg-white rounded-tl-none rounded-lg relative max-w-[75%] self-start`,\n { marginLeft: bubbleMarginLeft },\n theme?.bubbleStyle?.typingContainerStyle,\n ]}\n >\n {showAvatars && numCircles > 0 && (\n <View\n style={{\n position: 'absolute',\n top: 0,\n left: avatarLeft,\n flexDirection: 'row',\n }}\n >\n {displayedUsers.map((user, index) => (\n <View\n key={user.id}\n style={[\n tw`bg-gray-400 w-6 h-6 rounded-full items-center`,\n {\n marginLeft: index > 0 ? -10 : 0,\n zIndex: displayedUsers.length + index,\n },\n ]}\n >\n {user.avatar ? (\n <Image\n source={{ uri: user.avatar }}\n style={[\n tw`w-full h-full object-cover rounded-full`,\n theme?.bubbleStyle?.avatarImageStyle,\n ]}\n />\n ) : (\n <Text\n style={withFontFamily(\n [\n tw`text-sm text-black font-semibold capitalize rounded-full bg-zinc-300 w-full h-full text-center pt-0.5`,\n theme?.bubbleStyle?.avatarTextStyle,\n ],\n theme?.fontFamily\n )}\n >\n {user.name?.charAt(0)}\n </Text>\n )}\n </View>\n ))}\n {additionalUsers > 0 && (\n <View\n style={[\n tw`bg-gray-400 w-6 h-6 rounded-full items-center justify-center`,\n { marginLeft: -10, zIndex: 3 },\n { ...theme?.bubbleStyle?.additionalTypingUsersContainerStyle },\n ]}\n >\n <Text\n style={withFontFamily(\n [\n tw`text-white text-xs font-semibold`,\n theme?.bubbleStyle?.additionalTypingUsersTextStyle,\n ],\n theme?.fontFamily\n )}\n >\n +{additionalUsers}\n </Text>\n </View>\n )}\n </View>\n )}\n\n {showBubbleTail && (\n <ArrowBack2RoundedIcon\n style={tw.style('absolute -top-[3px] w-6 h-6 rotate-180 -left-3.5 mt-[1.5px]')}\n color={theme?.colors?.receivedMessageTailColor || 'white'}\n />\n )}\n\n {renderCustomTyping ? (\n renderCustomTyping()\n ) : (\n <View style={tw`flex-row items-center py-3 px-2 justify-center`}>\n <Text\n style={withFontFamily(\n [tw`text-gray-600`, theme?.bubbleStyle?.typingTextStyle],\n theme?.fontFamily\n )}\n >\n {typingText ?? 'Typing...'}\n </Text>\n </View>\n )}\n </View>\n );\n};\n","import React from 'react';\nimport { FlatList, KeyboardAvoidingView, Platform, View } from 'react-native';\nimport tw from 'twrnc';\nimport ChatBubble from './components/ChatBubble/ChatBubble';\nimport ChatInput from './components/ChatInput/ChatInput';\nimport MediaViewer from './components/MediaViewer/MediaViewer';\nimport { TypingIndicator } from './components/TypingComponent/TypingIndicator';\nimport { AudioProvider } from './context/AudioContext';\nimport { ChatProvider, useChatContext } from './context/ChatContext';\nimport { useKeyboardInset } from './hooks/useKeyboardInset';\nimport { ChatScreenProps } from './types';\n\nconst ChatScreenContent = () => {\n const {\n messages,\n currentUserId,\n onMessageLongPress,\n mediaViewerGallery,\n clearMediaViewerGallery,\n typingUsers,\n onSendMessage,\n onTypingStart,\n onTypingEnd,\n onAttachmentPress,\n onAudioRecordEnd,\n onAudioRecordStart,\n onCameraPress,\n renderCustomInput,\n CustomEmojiIcon,\n CustomAttachmentIcon,\n CustomCameraIcon,\n CustomMicrophoneIcon,\n CustomSendIcon,\n CustomFileIcon,\n CustomImagePreview,\n CustomVideoPreview,\n keyboardVerticalOffset = 0,\n disableKeyboardAvoiding = false,\n } = useChatContext();\n\n const keyboardInset = useKeyboardInset(!disableKeyboardAvoiding);\n\n const inputSection = renderCustomInput ? (\n renderCustomInput()\n ) : (\n <ChatInput\n onSendMessage={onSendMessage}\n onTypingStart={onTypingStart}\n onTypingEnd={onTypingEnd}\n onAttachmentPress={onAttachmentPress}\n onAudioRecordEnd={onAudioRecordEnd}\n onAudioRecordStart={onAudioRecordStart}\n onCameraPress={onCameraPress}\n CustomEmojiIcon={CustomEmojiIcon}\n CustomAttachmentIcon={CustomAttachmentIcon}\n CustomCameraIcon={CustomCameraIcon}\n CustomMicrophoneIcon={CustomMicrophoneIcon}\n CustomSendIcon={CustomSendIcon}\n CustomFileIcon={CustomFileIcon}\n CustomImagePreview={CustomImagePreview}\n CustomVideoPreview={CustomVideoPreview}\n />\n );\n\n const content = (\n <View style={tw`flex-1 px-2 pb-4 gap-2 relative`}>\n <FlatList\n style={tw`flex-1`}\n data={messages}\n keyExtractor={(item) => item.id}\n renderItem={({ item, index }) => (\n <ChatBubble\n message={item}\n isCurrentUser={item.senderId === currentUserId}\n onLongPress={() => onMessageLongPress?.(item)}\n isFirstInSequence={\n index === messages.length - 1 ||\n messages[index + 1]?.senderId !== item.senderId\n }\n />\n )}\n ListHeaderComponent={\n <TypingIndicator\n typingUsers={typingUsers || []}\n currentUserId={currentUserId}\n />\n }\n showsVerticalScrollIndicator={false}\n inverted\n keyboardShouldPersistTaps=\"handled\"\n keyboardDismissMode=\"interactive\"\n />\n\n <View\n style={\n !disableKeyboardAvoiding && keyboardInset > 0\n ? { marginBottom: keyboardInset }\n : undefined\n }\n >\n {inputSection}\n </View>\n\n <MediaViewer\n gallery={mediaViewerGallery}\n onClose={clearMediaViewerGallery}\n />\n </View>\n );\n\n if (disableKeyboardAvoiding) {\n return <View style={tw`flex-1`}>{content}</View>;\n }\n\n if (Platform.OS === 'android') {\n return <View style={tw`flex-1`}>{content}</View>;\n }\n\n return (\n <KeyboardAvoidingView\n style={tw`flex-1`}\n behavior=\"padding\"\n keyboardVerticalOffset={keyboardVerticalOffset}\n >\n {content}\n </KeyboardAvoidingView>\n );\n};\n\nconst ChatScreen: React.FC<ChatScreenProps> = (props) => {\n return (\n <AudioProvider>\n <ChatProvider {...props}>\n <ChatScreenContent />\n </ChatProvider>\n </AudioProvider>\n );\n};\n\nexport default ChatScreen;\n","import { useEffect, useState } from 'react';\nimport { Keyboard, KeyboardEvent, Platform } from 'react-native';\n\n/**\n * Full keyboard height for lifting the input bar above the software keyboard.\n * Do not subtract header offset here — that is only for KeyboardAvoidingView on iOS.\n */\nexport function useKeyboardInset(enabled = true) {\n const [inset, setInset] = useState(0);\n\n useEffect(() => {\n if (!enabled) {\n setInset(0);\n return;\n }\n\n const showEvent =\n Platform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow';\n const hideEvent =\n Platform.OS === 'ios' ? 'keyboardWillHide' : 'keyboardDidHide';\n\n const onShow = (event: KeyboardEvent) => {\n setInset(event.endCoordinates.height);\n };\n\n const onHide = () => setInset(0);\n\n const showSub = Keyboard.addListener(showEvent, onShow);\n const hideSub = Keyboard.addListener(hideEvent, onHide);\n\n return () => {\n showSub.remove();\n hideSub.remove();\n };\n }, [enabled]);\n\n return enabled ? inset : 0;\n}\n"],"names":["ArrowBack2RoundedIcon","_ref","style","color","_jsx","Svg","viewBox","jsx","Path","fill","fillRule","stroke","strokeLinecap","strokeLinejoin","strokeWidth","d","clipRule","ChatContext","createContext","undefined","ChatProvider","children","props","_objectWithoutProperties","_excluded","_useState2","_slicedToArray","useState","mediaViewerGallery","setMediaViewerGalleryState","_useState4","isVideoPlaying","setIsVideoPlaying","Provider","value","_objectSpread","setMediaViewerGallery","items","initialIndex","cur","kind","clearMediaViewerGallery","useChatContext","context","useContext","Error","colors","theme","getMediaTimestampContainerStyle","isCurrentUser","_c$sentMediaTimestamp","_c$receivedMediaTimes","_theme$messageStyle","_theme$messageStyle2","c","bg","sentMediaTimestampBackground","receivedMediaTimestampBackground","custom","messageStyle","sentMediaTimestampContainerStyle","receivedMediaTimestampContainerStyle","paddingHorizontal","paddingVertical","borderRadius","backgroundColor","getFileAttachmentBackground","_c$receivedFileAttach","_c$sentFileAttachment","sentFileAttachmentBackground","receivedFileAttachmentBackground","getFileAttachmentTextColor","_c$receivedFileAttach2","_c$sentFileAttachment2","sentFileAttachmentTextColor","receivedFileAttachmentTextColor","getFileAttachmentSubtitleColor","_c$receivedFileAttach3","_c$sentFileAttachment3","sentFileAttachmentSubtitleColor","receivedFileAttachmentSubtitleColor","getAudioSpeedTextColor","_c$receivedAudioSpeed","_c$sentAudioSpeedText","sentAudioSpeedTextColor","receivedAudioSpeedTextColor","getMessageTextColor","sentMessageTextColor","receivedMessageTextColor","getBubbleBackgroundColor","sentBubbleBackgroundColor","receivedBubbleBackgroundColor","collectMediaItems","message","mediaItems","length","out","image","push","uri","video","DEFAULT_INPUT_BAR_ICON_CLASS","Platform","OS","withFontFamily","fontFamily","process","env","NODE_ENV","reactIsModule","exports","b","Symbol","for","e","f","g","h","k","l","m","n","p","q","r","t","v","w","x","y","z","a","u","$$typeof","type","A","reactIs_production_min","AsyncMode","ConcurrentMode","ContextConsumer","Element","ForwardRef","Fragment","Lazy","Portal","Profiler","StrictMode","Suspense","isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isMemo","isProfiler","isStrictMode","isSuspense","isValidElementType","typeOf","require$$0","hasSymbol","REACT_ELEMENT_TYPE","REACT_PORTAL_TYPE","REACT_FRAGMENT_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_PROVIDER_TYPE","REACT_CONTEXT_TYPE","REACT_ASYNC_MODE_TYPE","REACT_CONCURRENT_MODE_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","REACT_BLOCK_TYPE","REACT_FUNDAMENTAL_TYPE","REACT_RESPONDER_TYPE","REACT_SCOPE_TYPE","object","$$typeofType","ContextProvider","Memo","hasWarnedAboutDeprecatedIsAsyncMode","reactIs_development","console","isPortal","getOwnPropertySymbols","Object","hasOwnProperty","prototype","propIsEnumerable","propertyIsEnumerable","objectAssign","assign","test1","String","getOwnPropertyNames","test2","i","fromCharCode","map","join","test3","split","forEach","letter","keys","err","shouldUseNative","target","source","from","symbols","to","val","TypeError","toObject","s","arguments","key","call","ReactPropTypesSecret_1","has","Function","bind","printWarning","ReactPropTypesSecret","loggedTypeFailures","require$$1","text","error","checkPropTypes","typeSpecs","values","location","componentName","getStack","typeSpecName","name","ex","stack","resetWarningCache","checkPropTypes_1","ReactIs","require$$2","require$$3","require$$4","emptyFunctionThatReturnsNull","factoryWithTypeCheckers","isValidElement","throwOnDirectAccess","ITERATOR_SYMBOL","iterator","ANONYMOUS","ReactPropTypes","array","createPrimitiveTypeChecker","bigint","bool","func","number","string","symbol","any","createChainableTypeChecker","arrayOf","typeChecker","propName","propFullName","PropTypeError","propValue","Array","isArray","getPropType","element","elementType","instanceOf","expectedClass","expectedClassName","constructor","node","isNode","objectOf","propType","oneOf","expectedValues","is","valuesString","JSON","stringify","getPreciseType","oneOfType","arrayOfTypeCheckers","checker","getPostfixForTypeWarning","expectedTypes","checkerResult","data","expectedType","shape","shapeTypes","invalidValidatorError","exact","allKeys","this","validate","manualPropTypeCallCache","manualPropTypeWarningCount","checkType","isRequired","secret","cacheKey","chainedCheckType","every","iteratorFn","maybeIterable","getIteratorFn","step","entries","next","done","entry","RegExp","isSymbol","Date","PropTypes","emptyFunction","emptyFunctionWithReset","factoryWithThrowingShims","shim","getShim","propTypesModule","TextExtraction","_createClass","patterns","_classCallCheck","_this","parsedTexts","pattern","newParts","tmp","nonExhaustiveModeMaxMatchCount","numberOfMatchesPermitted","Math","min","max","Number","isInteger","POSITIVE_INFINITY","currentMatches","parsedText","_matched","matches","parts","textLeft","indexOfMatchedString","lastIndex","exec","previousText","substr","index","getMatchedPart","apply","filter","matchedPattern","renderText","PATTERNS","url","phone","email","defaultParseShape","Text","propTypes","nonExhaustiveMaxMatchCount","customParseShape","ParsedText","_callSuper","_inherits","React","Component","nativeProps","_root","setNativeProps","parse","option","patternOption","concat","getPatterns","parentStyle","remainder","_excluded2","childrenProps","_this2","_this$props","_excluded3","ref","getParsedText","displayName","defaultProps","PauseIcon","PlayIcon","AudioContext","AudioProvider","currentlyPlayingId","setCurrentlyPlayingId","formatDuration","time","minutes","floor","seconds","PLAYBACK_RATES","AVATAR_SIZE","AudioAvatarOrSpeed","_theme$bubbleStyle","isPlaying","playbackRate","onCycleSpeed","senderAvatar","senderName","Pressable","onPress","tw","_templateObject","_taggedTemplateLiteral","width","height","audioSpeedButtonStyle","_templateObject2","audioSpeedTextStyle","Image","_templateObject3","bubbleStyle","avatarImageStyle","resizeMode","View","_templateObject4","_templateObject5","trim","charAt","toUpperCase","AudioPlayer","_ref2","_theme$messageStyle3","_theme$messageStyle5","audioUrl","audioId","_ref2$reserveStatusSp","reserveStatusSpace","_useChatContext","CustomPlayIcon","CustomPauseIcon","showMessageStatus","_useAudio","useAudio","videoRef","useRef","setIsPlaying","currentTime","setCurrentTime","_useState6","duration","setDuration","_useState8","isDragging","setIsDragging","_useState10","setPlaybackRate","_useState12","waveformW","setWaveformW","seekPendingRef","waveform","useMemo","count","charCodeAt","_","imul","abs","generateWaveform","_getAudioWaveformColo","_c$receivedAudioWavef","_c$receivedAudioWavef2","_c$sentAudioWaveformC","_c$sentAudioWaveformA","inactive","sentAudioWaveformColor","active","sentAudioWaveformActiveColor","receivedAudioWaveformColor","receivedAudioWaveformActiveColor","getAudioWaveformColors","inactiveBarColor","activeBarColor","durationColor","_c$receivedAudioTimes","_c$sentAudioTimestamp","sentAudioTimestampColor","sentTimestampColor","receivedAudioTimestampColor","receivedTimestampColor","getAudioDurationColor","playIconColor","_c$receivedAudioPlayI","_c$sentAudioPlayIconC","sentAudioPlayIconColor","receivedAudioPlayIconColor","getAudioPlayIconColor","pauseIconColor","_c$receivedAudioPause","_c$sentAudioPauseIcon","sentAudioPauseIconColor","receivedAudioPauseIconColor","getAudioPauseIconColor","effectivePlaying","progress","handleLoad","useCallback","_videoRef$current","current","seek","handleProgress","_ref3","handleEnd","_videoRef$current2","togglePlay","cycleSpeed","indexOf","seekTo","_videoRef$current3","panResponder","PanResponder","create","onStartShouldSetPanResponder","onMoveShouldSetPanResponder","onPanResponderGrant","evt","nativeEvent","locationX","onPanResponderMove","onPanResponderRelease","onPanResponderTerminate","playPause","hitSlop","_templateObject6","avatarOrSpeed","waveformBars","_templateObject7","onLayout","layout","flex","flexDirection","alignItems","progressBarStyle","panHandlers","amp","_theme$messageStyle4","marginHorizontal","round","activeProgressBarStyle","_jsxs","_templateObject8","_templateObject9","Video","paused","rate","playInBackground","playWhenInactive","onLoad","onProgress","onEnd","progressUpdateInterval","_templateObject10","jsxs","_Fragment","_templateObject11","paddingLeft","audioDurationStyle","AudioPlayer$1","memo","LoadingIcon","_ref$spinning","spinning","spinAnim","Animated","Value","useEffect","loop","timing","toValue","easing","Easing","linear","useNativeDriver","start","spin","interpolate","inputRange","outputRange","transform","rotate","MULTI_HEIGHT","TWO_ROW_H","THREE_TOP_H","THREE_BOT_H","FOUR_CELL_H","VideoThumbCell","_theme$colors","cellStyle","roundedStyle","_React$useState2","_React$useState4","loading","setLoading","_React$useState6","setError","pointerEvents","muted","onLoadStart","onError","videoPlayIconColor","formatShortDuration","sec","isNaN","toString","padStart","MediaGrid","onOpenGallery","windowW","useWindowDimensions","maxW","roundedSmall","overflow","item","marginVertical","half","gap","slice","idx","top","left","right","bottomHalf","cellW","extra","display","flexWrap","cell","position","MessageContent","_message$fileAttachme","_theme$messageStyle7","_theme$messageStyle8","onGalleryOpen","onFileAttachmentPress","fileAttachments","file","_theme$messageStyle6","Linking","openURL","startsWith","sentFileAttachmentStyle","receivedFileAttachmentStyle","sentFileAttachmentTextStyle","receivedFileAttachmentTextStyle","numberOfLines","sentFileAttachmentSubtitleStyle","receivedFileAttachmentSubtitleStyle","audio","id","wordBreak","overflowWrap","sentTextStyle","receivedTextStyle","textDecorationLine","allowFontScaling","MessageContent$1","CheckAllIcon","CheckIcon","MessageStatus","_theme$colors2","_theme$colors3","status","hasText","hasAudio","hasGalleryMedia","hasFileAttachments","mediaOverlay","timestampColor","_c$receivedTimestampC2","_c$sentTimestampColor2","getMediaTimestampColor","_c$receivedTimestampC","_c$sentTimestampColor","getMessageTimestampColor","opacity","sentIconColor","deliveredIconColor","readIconColor","MessageStatus$1","ChatBubble","_message$fileAttachme2","_theme$bubbleStyle2","_theme$bubbleStyle3","_theme$bubbleStyle4","_message$senderName","_theme$bubbleStyle5","isFirstInSequence","onLongPress","showAvatars","showUserNames","showBubbleTail","hasFilesOnly","sent","received","avatarTextStyle","userNameStyle","sentMessageTailColor","receivedMessageTailColor","ChatBubble$1","CameraIcon","G","Circle","cx","cy","EmojiFunnySquareIcon","Ellipse","rx","ry","MicrophoneIcon","PaperClipIcon","PaperPlaneIcon","_worklet_3539239666849_init_data","code","sourceMap","version","AnimatedHoldMic","_ref$color","_ref$size","size","scale","useSharedValue","withRepeat","withSequence","withTiming","inOut","ease","_e","AnimatedHoldMicTsx1","animatedStyle","useAnimatedStyle","global","__closure","__workletHash","__initData","__stackDetails","ChevronUpIcon","LockIcon","Rect","_worklet_17238011353947_init_data","_worklet_12925913346303_init_data","LockSlideColumn","_recordingUIProps$loc","_recordingUIProps$loc2","_recordingUIProps$che","_recordingUIProps$loc3","_recordingUIProps$loc4","_recordingUIProps$loc5","slideY","lockSlideDistance","recordingUIProps","voiceRecorderStyles","pillBg","lockPillBackground","lockColor","lockIconColor","chevronColor","chevronIconColor","lockPillGap","marginBelow","lockPillMarginBottom","chevronY","lockScale","LockSlideColumnTsx1","chevronStyle","translateY","lockStyle","LockSlideColumnTsx2","lockProgress","marginBottom","lockContainer","borderWidth","borderColor","lockPillActiveBorderColor","lockPill","_worklet_12909957294735_init_data","LongPressRecording","_recordingUIProps$can","_recordingUIProps$tim","slideX","_ref$containerHeight","containerHeight","cancelTextColor","timerColor","slideTextX","LongPressRecordingTsx1","cancelProgress","slideTextStyle","translateX","minHeight","longPressBar","fontSize","fontWeight","minWidth","timer","timerTextStyle","slideText","TrashIcon","buildStaticBars","showOuterDots","pos","WaveformAnimation","isActive","_ref$height","_ref$barCount","barCount","DEFAULT_BAR_COUNT","_ref$showOuterDots","bars","setBars","setInterval","prev","random","nextBars","clearInterval","barH","isOuter","TimerRing","justifyContent","NormalRecording","_recordingUIProps$wav","_recordingUIProps$rec","_recordingUIProps$pla","_recordingUIProps$pla2","_recordingUIProps$wav2","_recordingUIProps$sho","_recordingUIProps$sho2","_recordingUIProps$tim2","isRecording","isPaused","onCancel","onSend","onPause","onResume","_ref2$containerHeight","_ref2$sendButtonColor","sendButtonColor","_ref2$sendIconColor","sendIconColor","_ref2$enablePauseResu","enablePauseResume","waveColor","waveformColor","cancelColor","recordingBackground","playPauseIconColor","playPauseSize","playPauseIconSize","waveformBarCount","showWaveformOuterDots","showTimerRing","ringColor","timerRingColor","normalBar","trashButton","playPauseButton","sendButton","requestMicPermission","_requestMicPermission","_asyncToGenerator","_regeneratorRuntime","mark","_callee6","granted","wrap","_context6","PermissionsAndroid","request","PERMISSIONS","RECORD_AUDIO","title","buttonPositive","abrupt","RESULTS","GRANTED","t0","stop","FileIcon","_ref$fill","TruncateFileName","fileName","ellipsizeMode","fullName","lastDot","lastIndexOf","ext","getTruncatedName","TruncateFileName$1","previewsToMediaItems","previews","_p$type","_p$type2","FilePreview","_theme$filePreviewSty5","closePreview","onRemoveItem","CustomFileIcon","CustomImagePreview","CustomVideoPreview","inputHeight","media","_p$type3","_p$type4","docs","_p$type5","_p$type6","mediaAsItems","openGalleryAt","renderMediaThumb","_p$type7","_p$type8","isImage","isVideo","repeat","renderCloseBtn","counterRotate","zIndex","lineHeight","bottom","maxWidth","alignSelf","filePreviewStyle","root","extraOnThird","CARD","rot","counterRot","findIndex","marginLeft","renderMediaSection","ScrollView","scrollEnabled","maxHeight","DOC_CARD_H","showsVerticalScrollIndicator","contentContainerStyle","nestedScrollEnabled","doc","di","_theme$filePreviewSty","_theme$filePreviewSty2","_theme$filePreviewSty3","_theme$filePreviewSty4","padding","container","iconContainer","nameContainer","renderDocCard","FilePreview$1","MIN_INPUT_HEIGHT","INPUT_BAR_SHELL_HEIGHT","SEND_ICON_CLASS","ChatInput","_theme$sizes","_voiceRecorderProps$m","_ref4","_theme$inputStyles","_theme$colors$sendIco","_ref5","_recordingUIProps$lon","_theme$inputStyles4","_theme$inputStyles5","_theme$colors4","_theme$colors5","_theme$colors6","_theme$colors7","_theme$inputStyles6","_theme$colors8","_theme$inputStyles7","_theme$colors9","_theme$inputStyles8","_theme$colors10","onSendMessage","onTypingStart","onTypingEnd","onAttachmentPress","onCameraPress","onAudioRecordStart","onAudioRecordEnd","CustomEmojiIcon","CustomAttachmentIcon","CustomCameraIcon","CustomSendIcon","CustomMicrophoneIcon","inputText","setInputText","inputResetKey","setInputResetKey","isMultiline","setInputHeight","currentUserId","showEmojiButton","showAttachmentsButton","showCameraButton","showVoiceRecordButton","placeholder","previewData","previewItems","onRemovePreviewItem","voiceRecorderProps","renderVoiceRecorder","previewList","hasPreviewAttachments","inputBarIconSize","sizes","inputIconSize","inputBarIconStyle","sizeClass","getInputBarIconStyle","iconPixelSize","isCompactInput","iconInset","iconSlotStyle","paddingTop","paddingBottom","resetInputLayout","handleChangeText","handleContentSizeChange","event","newHeight","contentSize","handleSendMessage","trimmedText","senderId","showSendButton","voiceMode","setVoiceModeState","voiceModeRef","setVoiceMode","mode","lockSlideDistanceRef","setSlideX","setSlideY","slideXRef","slideYRef","onRecordEnd","result","recorder","_ref$maxDuration","maxDuration","onRecordStart","setStatus","recordingRef","timerRef","durationRef","onRecordEndRef","onRecordStartRef","maxDurationRef","stopTimer","startTimer","onMax","startRecording","_callee","AudioRecord","_onRecordStartRef$cur","_context","require","warn","init","sampleRate","channels","bitsPerSample","audioSource","wavFile","now","stopRecordingRef","pauseRecording","_callee2","_context2","resumeRecording","_callee3","_context3","stopRecordingImpl","_callee4","rec","capturedDuration","_onRecordEndRef$curre","_context4","mimeType","stopRecording","cancelRecording","_callee5","RNFS","path","_context5","unlink","t1","_recordingRef$current","_unused4","useVoiceRecorder","recorderRef","handleSendVoice","handleCancelVoice","handleSendVoiceRef","handleCancelVoiceRef","longPressTimerRef","isLongPressActiveRef","micPanResponder","setTimeout","gestureState","dx","dy","enableLockRecording","_onPanResponderRelease","wasLongPress","clearTimeout","_x","_x2","recordingSendBg","recordingSendButtonBackground","inputStyles","sendButtonStyle","recordingSendFg","sendIconsColor","holdMicColor","longPressMicColor","recordingContainerStyle","_recordingUIProps$con","_recordingUIProps$con2","containerBorderTopColor","borderTopWidth","containerBorderTopWidth","borderTopColor","getRecordingContainerStyle","_theme$inputStyles2","_theme$inputStyles3","_ref6","_recordingUIProps$rec2","_voiceRecorderProps$e","exposedState","isLocked","slideOffset","waveformData","inputSectionContainerStyle","holdMicButton","recordingIconSize","iconSize","inputContainerStyle","inputsIconsColor","TextInput","onChangeText","inputTextColor","placeholderTextColor","multiline","textAlignVertical","onContentSizeChange","_templateObject12","_templateObject13","ChatInput$1","XIcon","Line","x1","y1","x2","y2","MediaViewer","_gallery$initialIndex","gallery","onClose","listRef","pageIndex","setPageIndex","_useWindowDimensions","windowHeight","requestAnimationFrame","_listRef$current","scrollToIndex","animated","_unused","handleClose","onMomentumScrollEnd","contentOffset","Modal","visible","transparent","animationType","onRequestClose","statusBarTranslucent","FlatList","horizontal","pagingEnabled","showsHorizontalScrollIndicator","keyExtractor","initialScrollIndex","extraData","getItemLayout","offset","onScrollToIndexFailed","_listRef$current2","renderItem","ViewerPage","autoPlayVideo","shouldPlayVideo","controls","shutterColor","onBuffer","isBuffering","MediaViewer$1","TypingIndicator","_theme$bubbleStyle6","typingUsers","renderCustomTyping","typingText","otherTypingUsers","user","displayedUsers","additionalUsers","numCircles","avatarGroupW","bubbleMarginLeft","avatarLeft","typingContainerStyle","_user$name","avatar","additionalTypingUsersContainerStyle","additionalTypingUsersTextStyle","typingTextStyle","ChatScreenContent","messages","onMessageLongPress","renderCustomInput","_useChatContext$keybo","keyboardVerticalOffset","_useChatContext$disab","disableKeyboardAvoiding","keyboardInset","enabled","inset","setInset","showEvent","hideEvent","showSub","Keyboard","addListener","endCoordinates","hideSub","remove","useKeyboardInset","inputSection","content","_messages","ListHeaderComponent","inverted","keyboardShouldPersistTaps","keyboardDismissMode","KeyboardAvoidingView","behavior"],"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AjY,SACZjB,EAAAA,IAACgB,EAAYe,EAAAA,EAAA,GAAKb,GAAK,GAAA,CAAAD,SACrBjB,EAAAA,IAACotC,GAAiB,CAAA,OAI1B","x_google_ignoreList":[5,6,7,8,9,10,11,12,13,14,15,16]}
1
+ {"version":3,"file":"index.js","sources":["../../src/assets/Icons/ArrowBack2RoundedIcon.tsx","../../src/context/ChatContext.tsx","../../src/utils/bubbleTheme.ts","../../src/utils/messageMedia.ts","../../src/utils/theme.ts","../../node_modules/react-is/index.js","../../node_modules/react-is/cjs/react-is.production.min.js","../../node_modules/react-is/cjs/react-is.development.js","../../node_modules/object-assign/index.js","../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../../node_modules/prop-types/lib/has.js","../../node_modules/prop-types/checkPropTypes.js","../../node_modules/prop-types/factoryWithTypeCheckers.js","../../node_modules/prop-types/factoryWithThrowingShims.js","../../node_modules/prop-types/index.js","../../node_modules/react-native-parsed-text/src/lib/TextExtraction.js","../../node_modules/react-native-parsed-text/src/ParsedText.js","../../src/assets/Icons/PauseIcon.tsx","../../src/assets/Icons/PlayIcon.tsx","../../src/context/AudioContext.tsx","../../src/utils/datefunc.ts","../../src/components/AudioPlayer/types.ts","../../src/components/AudioPlayer/AudioPlayer.tsx","../../src/assets/Icons/LoadingIcon.tsx","../../src/components/ChatBubble/MediaGrid.tsx","../../src/components/ChatBubble/MessageContent.tsx","../../src/assets/Icons/CheckAllIcon.tsx","../../src/assets/Icons/CheckIcon.tsx","../../src/components/ChatBubble/MessageStatus.tsx","../../src/components/ChatBubble/ChatBubble.tsx","../../src/assets/Icons/CameraIcon.tsx","../../src/assets/Icons/EmojiFunnySquareIcon.tsx","../../src/assets/Icons/MicrophoneIcon.tsx","../../src/assets/Icons/PaperClipIcon.tsx","../../src/assets/Icons/PaperPlaneIcon.tsx","../../src/hooks/useVoiceRecorder.ts","../../src/assets/Icons/ChevronUpIcon.tsx","../../src/assets/Icons/LockIcon.tsx","../../src/assets/Icons/TrashIcon.tsx","../../src/components/VoiceRecorder/VoiceRecorderFlow.tsx","../../src/assets/Icons/FileIcon.tsx","../../src/components/ChatInput/TruncateFileName.tsx","../../src/components/ChatInput/FilePreview.tsx","../../src/components/ChatInput/ChatInput.tsx","../../src/assets/Icons/XIcon.tsx","../../src/components/MediaViewer/MediaViewer.tsx","../../src/components/TypingComponent/TypingIndicator.tsx","../../src/components/VoiceRecorder/VoiceRecorder.tsx","../../src/components/VoiceRecorder/VoiceRecordingGesture.tsx","../../src/index.tsx","../../src/hooks/useKeyboardInset.ts"],"sourcesContent":["import { ViewStyle } from 'react-native';\nimport Svg, { Path } from 'react-native-svg';\n\nexport const ArrowBack2RoundedIcon = ({\n style,\n color,\n}: {\n style?: ViewStyle;\n color?: string;\n}) => {\n return (\n <Svg style={style} viewBox=\"0 0 48 48\">\n <Path\n fill={color}\n fillRule=\"evenodd\"\n stroke={color}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"4\"\n d=\"M8 9.115c0-1.82 2.235-2.694 3.47-1.356l29.432 31.884c1.182 1.282.273 3.357-1.47 3.357H10a2 2 0 0 1-2-2z\"\n clipRule=\"evenodd\"\n ></Path>\n </Svg>\n );\n};\n","import React, { createContext, useContext, useState } from 'react';\nimport { ChatScreenProps, MessageMediaItem } from '../types';\n\n/** Full-screen swipe viewer state */\nexport interface MediaViewerGalleryState {\n items: MessageMediaItem[];\n initialIndex: number;\n}\n\ninterface ChatContextType extends ChatScreenProps {\n mediaViewerGallery: MediaViewerGalleryState | null;\n setMediaViewerGallery: (\n items: MessageMediaItem[],\n initialIndex: number\n ) => void;\n clearMediaViewerGallery: () => void;\n isVideoPlaying: boolean;\n setIsVideoPlaying: (playing: boolean) => void;\n}\n\nconst ChatContext = createContext<ChatContextType | undefined>(undefined);\n\nexport const ChatProvider: React.FC<\n ChatScreenProps & { children: React.ReactNode }\n> = ({ children, ...props }) => {\n const [mediaViewerGallery, setMediaViewerGalleryState] =\n useState<MediaViewerGalleryState | null>(null);\n const [isVideoPlaying, setIsVideoPlaying] = useState(false);\n\n const setMediaViewerGallery = (\n items: MessageMediaItem[],\n initialIndex: number\n ) => {\n setMediaViewerGalleryState({ items, initialIndex });\n const cur = items[initialIndex];\n setIsVideoPlaying(cur?.kind === 'video');\n };\n\n const clearMediaViewerGallery = () => {\n setMediaViewerGalleryState(null);\n setIsVideoPlaying(false);\n };\n\n return (\n <ChatContext.Provider\n value={{\n ...props,\n mediaViewerGallery,\n setMediaViewerGallery,\n clearMediaViewerGallery,\n isVideoPlaying,\n setIsVideoPlaying,\n }}\n >\n {children}\n </ChatContext.Provider>\n );\n};\n\nexport const useChatContext = () => {\n const context = useContext(ChatContext);\n if (!context) {\n throw new Error('useChatContext must be used within a ChatProvider');\n }\n return context;\n};\n","import type { ChatScreenProps } from '../types';\n\ntype Theme = ChatScreenProps['theme'];\ntype Colors = NonNullable<Theme>['colors'];\n\nfunction colors(theme?: Theme): Colors | undefined {\n return theme?.colors;\n}\n\nexport function getMessageTimestampColor(\n theme: Theme | undefined,\n isCurrentUser: boolean\n): string {\n const c = colors(theme);\n if (isCurrentUser) {\n return c?.sentTimestampColor ?? 'rgba(255, 255, 255, 0.75)';\n }\n return c?.receivedTimestampColor ?? 'rgba(107, 114, 128, 0.85)';\n}\n\nexport function getMediaTimestampColor(\n theme: Theme | undefined,\n isCurrentUser: boolean\n): string {\n const c = colors(theme);\n if (isCurrentUser) {\n return c?.sentTimestampColor ?? 'rgba(255, 255, 255, 0.75)';\n }\n return c?.receivedTimestampColor ?? 'rgba(107, 114, 128, 0.85)';\n}\n\nexport function getMediaTimestampContainerStyle(\n theme: Theme | undefined,\n isCurrentUser: boolean\n) {\n const base = { paddingHorizontal: 8, paddingVertical: 4, borderRadius: 6 };\n const c = colors(theme);\n const bg = isCurrentUser\n ? (c?.sentMediaTimestampBackground ?? 'rgba(0,0,0,0.45)')\n : (c?.receivedMediaTimestampBackground ?? 'rgba(0,0,0,0.45)');\n\n const custom = isCurrentUser\n ? theme?.messageStyle?.sentMediaTimestampContainerStyle\n : theme?.messageStyle?.receivedMediaTimestampContainerStyle;\n\n return { ...base, backgroundColor: bg, ...custom };\n}\n\nexport function getFileAttachmentBackground(\n theme: Theme | undefined,\n isCurrentUser: boolean\n): string {\n const c = colors(theme);\n if (isCurrentUser) {\n return c?.sentFileAttachmentBackground ?? 'rgba(255, 255, 255, 0.15)';\n }\n return c?.receivedFileAttachmentBackground ?? 'rgba(0, 0, 0, 0.08)';\n}\n\nexport function getFileAttachmentTextColor(\n theme: Theme | undefined,\n isCurrentUser: boolean\n): string {\n const c = colors(theme);\n if (isCurrentUser) {\n return c?.sentFileAttachmentTextColor ?? '#ffffff';\n }\n return c?.receivedFileAttachmentTextColor ?? '#1f2937';\n}\n\nexport function getFileAttachmentSubtitleColor(\n theme: Theme | undefined,\n isCurrentUser: boolean\n): string {\n const c = colors(theme);\n if (isCurrentUser) {\n return c?.sentFileAttachmentSubtitleColor ?? 'rgba(255,255,255,0.7)';\n }\n return c?.receivedFileAttachmentSubtitleColor ?? 'rgba(31,41,55,0.65)';\n}\n\nexport function getAudioWaveformColors(\n theme: Theme | undefined,\n isCurrentUser: boolean\n): { inactive: string; active: string } {\n const c = colors(theme);\n if (isCurrentUser) {\n return {\n inactive: c?.sentAudioWaveformColor ?? 'rgba(255,255,255,0.35)',\n active: c?.sentAudioWaveformActiveColor ?? 'rgba(255,255,255,0.95)',\n };\n }\n return {\n inactive: c?.receivedAudioWaveformColor ?? 'rgba(0,0,0,0.20)',\n active: c?.receivedAudioWaveformActiveColor ?? 'rgba(0,0,0,0.60)',\n };\n}\n\nexport function getAudioDurationColor(\n theme: Theme | undefined,\n isCurrentUser: boolean\n): string {\n const c = colors(theme);\n if (isCurrentUser) {\n return (\n c?.sentAudioTimestampColor ??\n c?.sentTimestampColor ??\n 'rgba(255,255,255,0.75)'\n );\n }\n return (\n c?.receivedAudioTimestampColor ??\n c?.receivedTimestampColor ??\n 'rgba(0,0,0,0.45)'\n );\n}\n\nexport function getAudioPlayIconColor(\n theme: Theme | undefined,\n isCurrentUser: boolean\n): string {\n const c = colors(theme);\n if (isCurrentUser) {\n return c?.sentAudioPlayIconColor ?? '#ffffff';\n }\n return c?.receivedAudioPlayIconColor ?? '#374151';\n}\n\nexport function getAudioPauseIconColor(\n theme: Theme | undefined,\n isCurrentUser: boolean\n): string {\n const c = colors(theme);\n if (isCurrentUser) {\n return c?.sentAudioPauseIconColor ?? '#ffffff';\n }\n return c?.receivedAudioPauseIconColor ?? '#374151';\n}\n\nexport function getAudioPlayButtonBackground(\n theme: Theme | undefined,\n isCurrentUser: boolean\n): string {\n const c = colors(theme);\n if (isCurrentUser) {\n return c?.sentAudioPlayButtonBackground ?? 'rgba(0,0,0,0.35)';\n }\n return c?.receivedAudioPlayButtonBackground ?? 'rgba(0,0,0,0.08)';\n}\n\nexport function getAudioSpeedTextColor(\n theme: Theme | undefined,\n isCurrentUser: boolean\n): string {\n const c = colors(theme);\n if (isCurrentUser) {\n return c?.sentAudioSpeedTextColor ?? '#ffffff';\n }\n return c?.receivedAudioSpeedTextColor ?? '#e5e7eb';\n}\n\nexport function getMessageTextColor(\n theme: Theme | undefined,\n isCurrentUser: boolean\n): string | undefined {\n const c = colors(theme);\n return isCurrentUser ? c?.sentMessageTextColor : c?.receivedMessageTextColor;\n}\n\nexport function getBubbleBackgroundColor(\n theme: Theme | undefined,\n isCurrentUser: boolean\n): string | undefined {\n const c = colors(theme);\n return isCurrentUser\n ? c?.sentBubbleBackgroundColor\n : c?.receivedBubbleBackgroundColor;\n}\n","import type { Message, MessageMediaItem } from '../types';\n\n/** Merge legacy `image` / `video` with `mediaItems` (array wins when non-empty). */\nexport function collectMediaItems(message: Message): MessageMediaItem[] {\n if (message.mediaItems && message.mediaItems.length > 0) {\n return message.mediaItems;\n }\n const out: MessageMediaItem[] = [];\n if (message.image) {\n out.push({ uri: message.image, kind: 'image' });\n }\n if (message.video) {\n out.push({ uri: message.video, kind: 'video' });\n }\n return out;\n}\n","import { Platform, StyleProp, TextStyle, ViewStyle } from 'react-native';\nimport tw from 'twrnc';\n\nconst DEFAULT_INPUT_BAR_ICON_CLASS =\n Platform.OS === 'ios' ? 'h-6 w-6' : 'w-6 h-6';\n\nconst DEFAULT_INPUT_BAR_ICON_PX = 24;\n\nexport function getInputBarIconPixelSize(size?: string | number): number {\n if (typeof size === 'number' && size > 0) {\n return size;\n }\n return DEFAULT_INPUT_BAR_ICON_PX;\n}\n\n/** Size for emoji, attachment, and camera icons only (not send/mic). */\nexport function getInputBarIconStyle(size?: string | number): ViewStyle {\n if (typeof size === 'number' && size > 0) {\n return { width: size, height: size };\n }\n\n const sizeClass =\n typeof size === 'string' && size.trim().length > 0\n ? size.trim()\n : DEFAULT_INPUT_BAR_ICON_CLASS;\n\n return tw.style(sizeClass);\n}\n\n/** Applies theme.fontFamily to any Text / ParsedText style array. */\nexport function withFontFamily(\n style: StyleProp<TextStyle>,\n fontFamily?: string\n): StyleProp<TextStyle> {\n if (!fontFamily) {\n return style;\n }\n return [style, { fontFamily }];\n}\n\nexport function getFontFamilyStyle(fontFamily?: string): TextStyle | undefined {\n return fontFamily ? { fontFamily } : undefined;\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","/** @license React v16.13.1\n * react-is.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar hasSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\nvar REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\nvar REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\nvar REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\nvar REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\nvar REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\nvar REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary\n// (unstable) APIs that have been removed. Can we remove the symbols?\n\nvar REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;\nvar REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\nvar REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\nvar REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\nvar REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;\nvar REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\nvar REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\nvar REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;\nvar REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;\nvar REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;\nvar REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;\n\nfunction isValidElementType(type) {\n return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.\n type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);\n}\n\nfunction typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n\n switch (type) {\n case REACT_ASYNC_MODE_TYPE:\n case REACT_CONCURRENT_MODE_TYPE:\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n return type;\n\n default:\n var $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n\n default:\n return $$typeof;\n }\n\n }\n\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n} // AsyncMode is deprecated along with isAsyncMode\n\nvar AsyncMode = REACT_ASYNC_MODE_TYPE;\nvar ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}\nfunction isConcurrentMode(object) {\n return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;\n}\nfunction isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\n\nexports.AsyncMode = AsyncMode;\nexports.ConcurrentMode = ConcurrentMode;\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\nexports.isValidElementType = isValidElementType;\nexports.typeOf = typeOf;\n })();\n}\n","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","module.exports = Function.call.bind(Object.prototype.hasOwnProperty);\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n var loggedTypeFailures = {};\n var has = require('./lib/has');\n\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) { /**/ }\n };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (process.env.NODE_ENV !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n var err = Error(\n (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +\n 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'\n );\n err.name = 'Invariant Violation';\n throw err;\n }\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n if (error && !(error instanceof Error)) {\n printWarning(\n (componentName || 'React class') + ': type specification of ' +\n location + ' `' + typeSpecName + '` is invalid; the type checker ' +\n 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +\n 'You may have forgotten to pass an argument to the type checker ' +\n 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +\n 'shape all require an argument).'\n );\n }\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n printWarning(\n 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')\n );\n }\n }\n }\n }\n}\n\n/**\n * Resets warning cache when testing.\n *\n * @private\n */\ncheckPropTypes.resetWarningCache = function() {\n if (process.env.NODE_ENV !== 'production') {\n loggedTypeFailures = {};\n }\n}\n\nmodule.exports = checkPropTypes;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactIs = require('react-is');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar has = require('./lib/has');\nvar checkPropTypes = require('./checkPropTypes');\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n return null;\n}\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<<anonymous>>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bigint: createPrimitiveTypeChecker('bigint'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n elementType: createElementTypeTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker,\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message, data) {\n this.message = message;\n this.data = data && typeof data === 'object' ? data: {};\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (process.env.NODE_ENV !== 'production') {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use `PropTypes.checkPropTypes()` to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n printWarning(\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),\n {expectedType: expectedType}\n );\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!ReactIs.isValidElementType(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n if (process.env.NODE_ENV !== 'production') {\n if (arguments.length > 1) {\n printWarning(\n 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +\n 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'\n );\n } else {\n printWarning('Invalid argument supplied to oneOf, expected an array.');\n }\n }\n return emptyFunctionThatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {\n var type = getPreciseType(value);\n if (type === 'symbol') {\n return String(value);\n }\n return value;\n });\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (has(propValue, key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunctionThatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n printWarning(\n 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'\n );\n return emptyFunctionThatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var expectedTypes = [];\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);\n if (checkerResult == null) {\n return null;\n }\n if (checkerResult.data && has(checkerResult.data, 'expectedType')) {\n expectedTypes.push(checkerResult.data.expectedType);\n }\n }\n var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function invalidValidatorError(componentName, location, propFullName, key, type) {\n return new PropTypeError(\n (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'\n );\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (has(shapeTypes, key) && typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n if (!checker) {\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') +\n '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')\n );\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // falsy value can't be a Symbol\n if (!propValue) {\n return false;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * If you want to provide a custom regexp, this is the configuration to use.\n * -- For historical reasons, all regexps are processed as if they have the global flag set.\n * -- Use the nonExhaustiveModeMaxMatchCount property to match a limited number of matches.\n * Note: any additional keys/props are permitted, and will be returned as-is!\n * @typedef {Object} CustomParseShape\n * @property {RegExp} pattern\n * @property {number} [nonExhaustiveModeMaxMatchCount] Enables \"non-exhaustive mode\", where you can limit how many matches are found. -- Must be a positive integer or Infinity matches are permitted\n * @property {Function} [renderText] arbitrary function to rewrite the matched string into something else\n * @property {Function} [onPress]\n * @property {Function} [onLongPress]\n */\n/**\n * Class to encapsulate the business logic of converting text into matches & props\n */\nclass TextExtraction {\n /**\n * @param {String} text - Text to be parsed\n * @param {CustomParseShape[]} patterns - Patterns to be used when parsed,\n * any extra attributes, will be returned from parse()\n */\n constructor(text, patterns) {\n this.text = text;\n this.patterns = patterns || [];\n }\n\n /**\n * Returns parts of the text with their own props\n * @public\n * @return {Object[]} - props for all the parts of the text\n */\n parse() {\n let parsedTexts = [{ children: this.text }];\n this.patterns.forEach((pattern) => {\n let newParts = [];\n\n const tmp = pattern.nonExhaustiveModeMaxMatchCount || 0;\n const numberOfMatchesPermitted = Math.min(\n Math.max(Number.isInteger(tmp) ? tmp : 0, 0) ||\n Number.POSITIVE_INFINITY,\n Number.POSITIVE_INFINITY,\n );\n\n let currentMatches = 0;\n\n parsedTexts.forEach((parsedText) => {\n // Only allow for now one parsing\n if (parsedText._matched) {\n newParts.push(parsedText);\n return;\n }\n\n let parts = [];\n let textLeft = parsedText.children;\n let indexOfMatchedString = 0;\n\n /** @type {RegExpExecArray} */\n let matches;\n // Global RegExps are stateful, this makes it start at 0 if reused\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/exec\n pattern.pattern.lastIndex = 0;\n while (textLeft && (matches = pattern.pattern.exec(textLeft))) {\n let previousText = textLeft.substr(0, matches.index);\n indexOfMatchedString = matches.index;\n\n if (++currentMatches > numberOfMatchesPermitted) {\n // Abort if we've exhausted our number of matches\n break;\n }\n\n parts.push({ children: previousText });\n\n parts.push(\n this.getMatchedPart(\n pattern,\n matches[0],\n matches,\n indexOfMatchedString,\n ),\n );\n\n textLeft = textLeft.substr(matches.index + matches[0].length);\n indexOfMatchedString += matches[0].length - 1;\n // Global RegExps are stateful, this makes it operate on the \"remainder\" of the string\n pattern.pattern.lastIndex = 0;\n }\n\n parts.push({ children: textLeft });\n\n newParts.push(...parts);\n });\n\n parsedTexts = newParts;\n });\n\n // Remove _matched key.\n parsedTexts.forEach((parsedText) => delete parsedText._matched);\n\n return parsedTexts.filter((t) => !!t.children);\n }\n\n // private\n\n /**\n * @protected\n * @param {ParseShape} matchedPattern - pattern configuration of the pattern used to match the text\n * @param {String} text - Text matching the pattern\n * @param {String[]} matches - Result of the RegExp.exec\n * @param {Integer} index - Index of the matched string in the whole string\n * @return {Object} props for the matched text\n */\n getMatchedPart(matchedPattern, text, matches, index) {\n let props = {};\n\n Object.keys(matchedPattern).forEach((key) => {\n if (\n key === 'pattern' ||\n key === 'renderText' ||\n key === 'nonExhaustiveModeMaxMatchCount'\n ) {\n return;\n }\n\n if (typeof matchedPattern[key] === 'function') {\n // Support onPress / onLongPress functions\n props[key] = () => matchedPattern[key](text, index);\n } else {\n // Set a prop with an arbitrary name to the value in the match-config\n props[key] = matchedPattern[key];\n }\n });\n\n let children = text;\n if (\n matchedPattern.renderText &&\n typeof matchedPattern.renderText === 'function'\n ) {\n children = matchedPattern.renderText(text, matches);\n }\n\n return {\n ...props,\n children: children,\n _matched: true,\n };\n }\n}\n\nexport default TextExtraction;\n","import React from 'react';\nimport { Text } from 'react-native';\nimport PropTypes from 'prop-types';\n\nimport TextExtraction from './lib/TextExtraction';\n\n/**\n * This is a list of the known patterns that are provided by this library\n * @typedef {('url'|'phone'|'email')} KnownParsePattern\n */\n/**\n * @type {Object.<string, RegExp>}\n * // The keys really should be KnownParsePattern -- but this is unsupported in jsdoc, sadly\n */\nexport const PATTERNS = {\n /**\n * Segments/Features:\n * - http/https support https?\n * - auto-detecting loose domains if preceded by `www.`\n * - Localized & Long top-level domains \\.(xn--)?[a-z0-9-]{2,20}\\b\n * - Allowed query parameters & values, it's two blocks of matchers\n * ([-a-zA-Z0-9@:%_\\+,.~#?&\\/=]*[-a-zA-Z0-9@:%_\\+~#?&\\/=])*\n * - First block is [-a-zA-Z0-9@:%_\\+\\[\\],.~#?&\\/=]* -- this matches parameter names & values (including commas, dots, opening & closing brackets)\n * - The first block must be followed by a closing block [-a-zA-Z0-9@:%_\\+\\]~#?&\\/=] -- this doesn't match commas, dots, and opening brackets\n */\n url: /(https?:\\/\\/|www\\.)[-a-zA-Z0-9@:%._\\+~#=]{1,256}\\.(xn--)?[a-z0-9-]{2,20}\\b([-a-zA-Z0-9@:%_\\+\\[\\],.~#?&\\/=]*[-a-zA-Z0-9@:%_\\+\\]~#?&\\/=])*/i,\n phone: /[\\+]?[(]?[0-9]{3}[)]?[-\\s\\.]?[0-9]{3}[-\\s\\.]?[0-9]{4,7}/,\n email: /\\S+@\\S+\\.\\S+/,\n};\n\n/**\n * This is for built-in-patterns already supported by this library\n * Note: any additional keys/props are permitted, and will be passed along as props to the <Text> component!\n * @typedef {Object} DefaultParseShape\n * @property {KnownParsePattern} [type] key of the known pattern you'd like to configure\n * @property {number} [nonExhaustiveModeMaxMatchCount] Enables \"non-exhaustive mode\", where you can limit how many matches are found. -- Must be a positive integer or Infinity matches are permitted\n * @property {Function} [renderText] arbitrary function to rewrite the matched string into something else\n * @property {Function} [onPress]\n * @property {Function} [onLongPress]\n */\nconst defaultParseShape = PropTypes.shape({\n ...Text.propTypes,\n type: PropTypes.oneOf(Object.keys(PATTERNS)).isRequired,\n nonExhaustiveMaxMatchCount: PropTypes.number,\n});\n\nconst customParseShape = PropTypes.shape({\n ...Text.propTypes,\n pattern: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(RegExp)])\n .isRequired,\n nonExhaustiveMaxMatchCount: PropTypes.number,\n});\n\n/**\n * The props added by this component\n * @typedef {DefaultParseShape|import('./lib/TextExtraction').CustomParseShape} ParsedTextAddedProps\n * @property {ParseShape[]} parse\n * @property {import('react-native').TextProps} childrenProps -- the props set on each child Text component\n */\n/** @typedef {ParsedTextAddedProps & import('react-native').TextProps} ParsedTextProps */\n\n/** @type {import('react').ComponentClass<ParsedTextProps>} */\nclass ParsedText extends React.Component {\n static displayName = 'ParsedText';\n\n static propTypes = {\n ...Text.propTypes,\n parse: PropTypes.arrayOf(\n PropTypes.oneOfType([defaultParseShape, customParseShape]),\n ),\n childrenProps: PropTypes.shape(Text.propTypes),\n };\n\n static defaultProps = {\n parse: null,\n childrenProps: {},\n };\n\n setNativeProps(nativeProps) {\n this._root.setNativeProps(nativeProps);\n }\n /** @returns {import('./lib/TextExtraction').CustomParseShape[]} */\n getPatterns() {\n return this.props.parse.map((option) => {\n const { type, ...patternOption } = option;\n if (type) {\n if (!PATTERNS[type]) {\n throw new Error(`${option.type} is not a supported type`);\n }\n patternOption.pattern = PATTERNS[type];\n }\n\n return patternOption;\n });\n }\n\n getParsedText() {\n if (!this.props.parse) {\n return this.props.children;\n }\n if (typeof this.props.children !== 'string') {\n return this.props.children;\n }\n\n const textExtraction = new TextExtraction(\n this.props.children,\n this.getPatterns(),\n );\n\n return textExtraction.parse().map((props, index) => {\n const { style: parentStyle } = this.props;\n const { style, ...remainder } = props;\n return (\n <Text\n key={`parsedText-${index}`}\n style={[parentStyle, style]}\n {...this.props.childrenProps}\n {...remainder}\n />\n );\n });\n }\n\n render() {\n // Discard custom props before passing remainder to Text\n const { parse, childrenProps, ...remainder } = { ...this.props };\n\n return (\n <Text ref={(ref) => (this._root = ref)} {...remainder}>\n {this.getParsedText()}\n </Text>\n );\n }\n}\n\nexport default ParsedText;\n","import { ViewStyle } from \"react-native\";\nimport Svg, { Path } from \"react-native-svg\";\n\nexport const PauseIcon = ({\n style,\n color,\n}: {\n style?: ViewStyle;\n color?: string;\n}) => {\n return (\n <Svg style={style} viewBox=\"0 0 15 15\">\n <Path\n fill={color}\n fillRule=\"evenodd\"\n d=\"M6.05 2.75a.55.55 0 0 0-1.1 0v9.5a.55.55 0 0 0 1.1 0zm4 0a.55.55 0 0 0-1.1 0v9.5a.55.55 0 0 0 1.1 0z\"\n clipRule=\"evenodd\"\n ></Path>\n </Svg>\n );\n};\n","import { ViewStyle } from \"react-native\";\n\nimport Svg, { Path } from \"react-native-svg\";\n\nexport const PlayIcon = ({\n style,\n color,\n}: {\n style?: ViewStyle;\n color?: string;\n}) => {\n return (\n <Svg style={style} viewBox=\"0 0 24 24\">\n <Path\n fill={color}\n d=\"M8 17.175V6.825q0-.425.3-.713t.7-.287q.125 0 .263.037t.262.113l8.15 5.175q.225.15.338.375t.112.475t-.112.475t-.338.375l-8.15 5.175q-.125.075-.262.113T9 18.175q-.4 0-.7-.288t-.3-.712\"\n ></Path>\n </Svg>\n );\n};\n","import React, { createContext, useContext, useState } from \"react\";\n\ninterface AudioContextType {\n currentlyPlayingId: string | null;\n setCurrentlyPlayingId: (id: string | null) => void;\n}\n\nconst AudioContext = createContext<AudioContextType | undefined>(undefined);\n\nexport const AudioProvider: React.FC<{ children: React.ReactNode }> = ({\n children,\n}) => {\n const [currentlyPlayingId, setCurrentlyPlayingId] = useState<string | null>(\n null\n );\n\n return (\n <AudioContext.Provider value={{ currentlyPlayingId, setCurrentlyPlayingId }}>\n {children}\n </AudioContext.Provider>\n );\n};\n\nexport const useAudio = () => {\n const context = useContext(AudioContext);\n if (!context) {\n throw new Error(\"useAudio must be used within an AudioProvider\");\n }\n return context;\n};"," export const formatDuration = (time: number) => {\n const minutes = Math.floor(time / 60);\n const seconds = Math.floor(time % 60);\n return `${minutes}:${seconds < 10 ? \"0\" : \"\"}${seconds}`;\n };","export interface AudioPlayerProps {\n audioUrl: string;\n audioId: string;\n isVideoPlaying: boolean;\n isCurrentUser: boolean;\n senderAvatar?: string;\n senderName?: string;\n reserveStatusSpace?: boolean;\n}\n\nexport const PLAYBACK_RATES = [1, 1.5, 2] as const;\nexport type PlaybackRate = (typeof PLAYBACK_RATES)[number];\n","import React, { useCallback, useMemo, useRef, useState } from 'react';\nimport { Image, PanResponder, Pressable, Text, View } from 'react-native';\nimport Video, { VideoRef } from 'react-native-video';\nimport tw from 'twrnc';\nimport { PauseIcon } from '../../assets/Icons/PauseIcon';\nimport { PlayIcon } from '../../assets/Icons/PlayIcon';\nimport { useAudio } from '../../context/AudioContext';\nimport { useChatContext } from '../../context/ChatContext';\nimport {\n getAudioDurationColor,\n getAudioPauseIconColor,\n getAudioPlayIconColor,\n getAudioSpeedTextColor,\n getAudioWaveformColors,\n} from '../../utils/bubbleTheme';\nimport { formatDuration } from '../../utils/datefunc';\nimport { withFontFamily } from '../../utils/theme';\nimport type { ChatScreenProps } from '../../types';\nimport { AudioPlayerProps, PLAYBACK_RATES, PlaybackRate } from './types';\n\ntype ChatTheme = ChatScreenProps['theme'];\n\nconst WAVEFORM_BARS = 50;\nconst WAVEFORM_H = 36;\nconst AVATAR_SIZE = 42;\n\nfunction generateWaveform(url: string, count: number): number[] {\n let h = 5381;\n for (let i = 0; i < url.length; i++) {\n h = ((h << 5) + h + url.charCodeAt(i)) | 0;\n }\n return Array.from({ length: count }, (_, i) => {\n h = Math.imul(h ^ (h >>> 16), 0x45d9f3b + i * 31337) | 0;\n h = h ^ (h >>> 13);\n return 0.18 + ((Math.abs(h) % 100) / 100) * 0.82;\n });\n}\n\nfunction avatarInitial(name?: string): string {\n const t = name?.trim();\n return t ? t.charAt(0).toUpperCase() : '?';\n}\n\nfunction AudioAvatarOrSpeed({\n isPlaying,\n playbackRate,\n onCycleSpeed,\n senderAvatar,\n senderName,\n isCurrentUser,\n theme,\n}: {\n isPlaying: boolean;\n playbackRate: PlaybackRate;\n onCycleSpeed: () => void;\n senderAvatar?: string;\n senderName?: string;\n isCurrentUser: boolean;\n theme?: ChatTheme;\n}) {\n if (isPlaying) {\n return (\n <Pressable\n onPress={onCycleSpeed}\n style={[\n tw`rounded-full items-center justify-center`,\n {\n width: AVATAR_SIZE,\n height: AVATAR_SIZE,\n backgroundColor: isCurrentUser\n ? 'rgba(0,0,0,0.22)'\n : 'rgba(255,255,255,0.12)',\n },\n theme?.messageStyle?.audioSpeedButtonStyle,\n ]}\n >\n <Text\n style={withFontFamily(\n [\n tw`text-xs font-semibold`,\n { color: getAudioSpeedTextColor(theme, isCurrentUser) },\n theme?.messageStyle?.audioSpeedTextStyle,\n ],\n theme?.fontFamily\n )}\n >\n {playbackRate === 1 ? '1x' : `${playbackRate}x`}\n </Text>\n </Pressable>\n );\n }\n\n if (senderAvatar) {\n return (\n <Image\n source={{ uri: senderAvatar }}\n style={[\n tw`rounded-full`,\n { width: AVATAR_SIZE, height: AVATAR_SIZE },\n theme?.bubbleStyle?.avatarImageStyle,\n ]}\n resizeMode=\"cover\"\n />\n );\n }\n\n return (\n <View\n style={[\n tw`rounded-full items-center justify-center`,\n {\n width: AVATAR_SIZE,\n height: AVATAR_SIZE,\n backgroundColor: isCurrentUser ? 'rgba(0,0,0,0.2)' : '#9ca3af',\n },\n ]}\n >\n <Text\n style={withFontFamily(\n [tw`text-base font-semibold capitalize`, { color: '#ffffff' }],\n theme?.fontFamily\n )}\n >\n {avatarInitial(senderName)}\n </Text>\n </View>\n );\n}\n\nconst AudioPlayer: React.FC<AudioPlayerProps> = ({\n audioUrl,\n audioId,\n isVideoPlaying,\n isCurrentUser,\n senderAvatar,\n senderName,\n reserveStatusSpace = true,\n}) => {\n const { theme, CustomPlayIcon, CustomPauseIcon, showMessageStatus } =\n useChatContext();\n const { currentlyPlayingId, setCurrentlyPlayingId } = useAudio();\n\n const videoRef = useRef<VideoRef>(null);\n const [isPlaying, setIsPlaying] = useState(false);\n const [currentTime, setCurrentTime] = useState(0);\n const [duration, setDuration] = useState(0);\n const [isDragging, setIsDragging] = useState(false);\n const [playbackRate, setPlaybackRate] = useState<PlaybackRate>(1);\n const [waveformW, setWaveformW] = useState(0);\n const seekPendingRef = useRef<number | null>(null);\n\n const waveform = useMemo(\n () => generateWaveform(audioUrl, WAVEFORM_BARS),\n [audioUrl]\n );\n\n const { inactive: inactiveBarColor, active: activeBarColor } =\n getAudioWaveformColors(theme, isCurrentUser);\n const durationColor = getAudioDurationColor(theme, isCurrentUser);\n const playIconColor = getAudioPlayIconColor(theme, isCurrentUser);\n const pauseIconColor = getAudioPauseIconColor(theme, isCurrentUser);\n const shouldPause =\n isVideoPlaying || (!!currentlyPlayingId && currentlyPlayingId !== audioId);\n const effectivePlaying = isPlaying && !shouldPause;\n const progress = duration > 0 ? currentTime / duration : 0;\n\n const handleLoad = useCallback((data: { duration: number }) => {\n setDuration(data.duration);\n if (seekPendingRef.current !== null) {\n videoRef.current?.seek(seekPendingRef.current);\n seekPendingRef.current = null;\n }\n }, []);\n\n const handleProgress = useCallback(\n ({ currentTime: t }: { currentTime: number }) => {\n if (!isDragging) setCurrentTime(t);\n },\n [isDragging]\n );\n\n const handleEnd = useCallback(() => {\n setIsPlaying(false);\n setCurrentTime(0);\n videoRef.current?.seek(0);\n setCurrentlyPlayingId(null);\n }, [setCurrentlyPlayingId]);\n\n const togglePlay = useCallback(() => {\n if (effectivePlaying) {\n setIsPlaying(false);\n setCurrentlyPlayingId(null);\n } else {\n setCurrentlyPlayingId(audioId);\n setIsPlaying(true);\n }\n }, [effectivePlaying, audioId, setCurrentlyPlayingId]);\n\n const cycleSpeed = useCallback(() => {\n setPlaybackRate((r) => {\n const i = PLAYBACK_RATES.indexOf(r);\n const next = PLAYBACK_RATES[(i + 1) % PLAYBACK_RATES.length];\n return next ?? 1;\n });\n }, []);\n\n const seekTo = useCallback(\n (x: number) => {\n const w = waveformW;\n if (w <= 0 || duration <= 0) return;\n const t = Math.max(0, Math.min(x / w, 1)) * duration;\n setCurrentTime(t);\n if (duration > 0) {\n videoRef.current?.seek(t);\n } else {\n seekPendingRef.current = t;\n }\n },\n [duration, waveformW]\n );\n\n const panResponder = useMemo(\n () =>\n PanResponder.create({\n onStartShouldSetPanResponder: () => true,\n onMoveShouldSetPanResponder: () => true,\n onPanResponderGrant: (evt) => {\n setIsDragging(true);\n seekTo(evt.nativeEvent.locationX);\n },\n onPanResponderMove: (evt) => seekTo(evt.nativeEvent.locationX),\n onPanResponderRelease: () => setIsDragging(false),\n onPanResponderTerminate: () => setIsDragging(false),\n }),\n [seekTo]\n );\n\n const playPause = (\n <Pressable onPress={togglePlay} hitSlop={8} style={tw`shrink-0 px-0.5`}>\n {effectivePlaying ? (\n CustomPauseIcon ? (\n <CustomPauseIcon />\n ) : (\n <PauseIcon style={tw.style('h-6 w-6')} color={pauseIconColor} />\n )\n ) : CustomPlayIcon ? (\n <CustomPlayIcon />\n ) : (\n <PlayIcon style={tw.style('h-6 w-6')} color={playIconColor} />\n )}\n </Pressable>\n );\n\n const avatarOrSpeed = (\n <AudioAvatarOrSpeed\n isPlaying={effectivePlaying}\n playbackRate={playbackRate}\n onCycleSpeed={cycleSpeed}\n senderAvatar={senderAvatar}\n senderName={senderName}\n isCurrentUser={isCurrentUser}\n theme={theme}\n />\n );\n\n const waveformBars = (\n <View\n style={[tw`flex-1 min-w-0`, { height: WAVEFORM_H }]}\n onLayout={(e) => setWaveformW(e.nativeEvent.layout.width)}\n >\n <View\n style={[\n {\n flex: 1,\n flexDirection: 'row',\n alignItems: 'center',\n },\n theme?.messageStyle?.progressBarStyle,\n ]}\n {...panResponder.panHandlers}\n >\n {waveform.map((amp, i) => {\n const barProgress = (i + 0.5) / WAVEFORM_BARS;\n const active = barProgress <= progress;\n return (\n <View\n key={i}\n style={[\n {\n flex: 1,\n marginHorizontal: 0.5,\n height: Math.max(3, Math.round(amp * WAVEFORM_H)),\n borderRadius: 2,\n backgroundColor: active ? activeBarColor : inactiveBarColor,\n },\n active ? theme?.messageStyle?.activeProgressBarStyle : undefined,\n ]}\n />\n );\n })}\n </View>\n </View>\n );\n\n return (\n <View\n style={[\n tw`min-w-[240px] max-w-[280px] py-1.5 px-1`,\n reserveStatusSpace && showMessageStatus && tw`pb-4`,\n ]}\n >\n <Video\n ref={videoRef}\n source={{ uri: audioUrl }}\n paused={!effectivePlaying}\n rate={playbackRate}\n playInBackground={false}\n playWhenInactive={false}\n onLoad={handleLoad}\n onProgress={handleProgress}\n onEnd={handleEnd}\n style={{ width: 0, height: 0 }}\n progressUpdateInterval={80}\n />\n\n <View style={tw`flex-row items-center gap-1.5`}>\n {isCurrentUser ? (\n <>\n {avatarOrSpeed}\n {playPause}\n {waveformBars}\n </>\n ) : (\n <>\n {playPause}\n {waveformBars}\n {avatarOrSpeed}\n </>\n )}\n </View>\n <Text\n style={withFontFamily(\n [\n tw`text-[11px] mt-1`,\n {\n color: durationColor,\n paddingLeft: isCurrentUser\n ? AVATAR_SIZE + 6 + 28 + 6\n : 28 + 6,\n },\n theme?.messageStyle?.audioDurationStyle,\n ],\n theme?.fontFamily\n )}\n >\n {formatDuration(\n effectivePlaying ? currentTime : duration > 0 ? duration : currentTime\n )}\n </Text>\n </View>\n );\n};\n\nexport default React.memo(AudioPlayer);\n","import { useEffect, useRef } from 'react';\nimport { Animated, Easing, ViewStyle } from 'react-native';\nimport Svg, { Path } from 'react-native-svg';\n\ntype LoadingIconProps = {\n style?: ViewStyle;\n spinning?: boolean;\n};\n\nexport const LoadingIcon = ({ style, spinning = false }: LoadingIconProps) => {\n const spinAnim = useRef(new Animated.Value(0)).current;\n\n useEffect(() => {\n if (spinning) {\n Animated.loop(\n Animated.timing(spinAnim, {\n toValue: 1,\n duration: 1000,\n easing: Easing.linear,\n useNativeDriver: true,\n })\n ).start();\n }\n }, [spinning]);\n\n const spin = spinAnim.interpolate({\n inputRange: [0, 1],\n outputRange: ['0deg', '360deg'],\n });\n\n return (\n <Animated.View\n style={spinning ? { transform: [{ rotate: spin }] } : undefined}\n >\n <Svg style={style} viewBox=\"0 0 1024 1024\">\n <Path\n d=\"M988 548c-19.9 0-36-16.1-36-36c0-59.4-11.6-117-34.6-171.3a440.5 440.5 0 0 0-94.3-139.9a437.7 437.7 0 0 0-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150s83.9 101.8 109.7 162.7c26.7 63.1 40.2 130.2 40.2 199.3c.1 19.9-16 36-35.9 36\"\n fill=\"white\"\n />\n </Svg>\n </Animated.View>\n );\n};\n","import React from 'react';\nimport {\n Image,\n Pressable,\n Text,\n View,\n useWindowDimensions,\n} from 'react-native';\nimport Video, { VideoRef } from 'react-native-video';\nimport tw from 'twrnc';\nimport { LoadingIcon } from '../../assets/Icons/LoadingIcon';\nimport { PlayIcon } from '../../assets/Icons/PlayIcon';\nimport { useChatContext } from '../../context/ChatContext';\nimport type { MessageMediaItem } from '../../types';\nimport { withFontFamily } from '../../utils/theme';\n\nconst GRID_WIDTH = 240;\nconst SINGLE_HEIGHT = 320;\nconst ROW_GAP = 2;\n\n// All multi-item layouts share this total height to match the single-item bubble\nconst MULTI_HEIGHT = SINGLE_HEIGHT;\nconst TWO_ROW_H = MULTI_HEIGHT;\nconst THREE_TOP_H = Math.round(MULTI_HEIGHT * 0.55);\nconst THREE_BOT_H = MULTI_HEIGHT - THREE_TOP_H - ROW_GAP;\nconst FOUR_CELL_H = Math.round((MULTI_HEIGHT - ROW_GAP) / 2);\n\ninterface MediaGridProps {\n items: MessageMediaItem[];\n onOpenGallery: (items: MessageMediaItem[], index: number) => void;\n}\n\nconst VideoThumbCell: React.FC<{\n uri: string;\n cellStyle: object;\n roundedStyle: object;\n}> = ({ uri, cellStyle, roundedStyle }) => {\n const { theme, CustomPlayIcon } = useChatContext();\n const videoRef = React.useRef<VideoRef>(null);\n const [duration, setDuration] = React.useState(0);\n const [loading, setLoading] = React.useState(true);\n const [error, setError] = React.useState(false);\n\n return (\n <View style={[cellStyle, roundedStyle]} pointerEvents=\"none\">\n <Video\n source={{ uri }}\n ref={videoRef}\n paused\n muted\n playInBackground={false}\n playWhenInactive={false}\n pointerEvents=\"none\"\n style={[roundedStyle, { width: '100%', height: '100%' }]}\n resizeMode=\"cover\"\n onLoadStart={() => {\n setLoading(true);\n setError(false);\n }}\n onLoad={(d) => {\n setDuration(d.duration);\n setLoading(false);\n }}\n onError={() => {\n setError(true);\n setLoading(false);\n }}\n />\n {loading && (\n <View\n style={[\n tw`absolute inset-0 items-center justify-center bg-black/40`,\n roundedStyle,\n ]}\n >\n <LoadingIcon style={tw.style('h-8 w-8')} spinning />\n </View>\n )}\n {!loading && !error && (\n <>\n <View style={tw`pointer-events-none absolute inset-0 items-center justify-center`}>\n {CustomPlayIcon ? (\n <CustomPlayIcon />\n ) : (\n <PlayIcon\n style={tw.style('h-10 w-10')}\n color={theme?.colors?.videoPlayIconColor || 'white'}\n />\n )}\n </View>\n <View\n style={tw`pointer-events-none absolute bottom-1 left-1 bg-black/50 px-1.5 py-0.5 rounded`}\n >\n <Text style={tw`text-white text-[10px] font-semibold`}>\n {formatShortDuration(duration)}\n </Text>\n </View>\n </>\n )}\n {error && (\n <View\n style={[\n tw`absolute inset-0 items-center justify-center bg-red-500/50`,\n roundedStyle,\n ]}\n >\n <Text style={withFontFamily(tw`text-white text-xs`, theme?.fontFamily)}>\n Video\n </Text>\n </View>\n )}\n </View>\n );\n};\n\nfunction formatShortDuration(sec: number): string {\n if (!sec || Number.isNaN(sec)) return '0:00';\n const m = Math.floor(sec / 60);\n const s = Math.floor(sec % 60);\n return `${m}:${s.toString().padStart(2, '0')}`;\n}\n\nexport const MediaGrid: React.FC<MediaGridProps> = ({\n items,\n onOpenGallery,\n}) => {\n const { width: windowW } = useWindowDimensions();\n const maxW = Math.min(GRID_WIDTH, windowW * 0.72);\n\n if (items.length === 0) return null;\n\n const roundedSmall = { borderRadius: 6, overflow: 'hidden' as const };\n\n if (items.length === 1) {\n const item = items[0]!;\n return (\n <Pressable\n onPress={() => onOpenGallery(items, 0)}\n style={{ width: maxW, height: SINGLE_HEIGHT, marginVertical: 8 }}\n >\n {item.kind === 'image' ? (\n <Image\n source={{ uri: item.uri }}\n style={{\n width: '100%',\n height: '100%',\n borderRadius: 8,\n }}\n resizeMode=\"cover\"\n />\n ) : (\n <VideoThumbCell\n uri={item.uri}\n cellStyle={{ width: maxW, height: SINGLE_HEIGHT }}\n roundedStyle={{ borderRadius: 8 }}\n />\n )}\n </Pressable>\n );\n }\n\n if (items.length === 2) {\n const half = (maxW - ROW_GAP) / 2;\n return (\n <View\n style={{\n width: maxW,\n height: TWO_ROW_H,\n flexDirection: 'row',\n gap: ROW_GAP,\n marginVertical: 8,\n }}\n >\n {items.slice(0, 2).map((item, idx) => (\n <Pressable\n key={`${item.uri}-${idx}`}\n onPress={() => onOpenGallery(items, idx)}\n style={{ width: half, height: TWO_ROW_H }}\n >\n {item.kind === 'image' ? (\n <Image\n source={{ uri: item.uri }}\n style={[roundedSmall, { width: '100%', height: '100%' }]}\n resizeMode=\"cover\"\n />\n ) : (\n <VideoThumbCell\n uri={item.uri}\n cellStyle={{ width: half, height: TWO_ROW_H }}\n roundedStyle={roundedSmall}\n />\n )}\n </Pressable>\n ))}\n </View>\n );\n }\n\n if (items.length === 3) {\n const top = items[0]!;\n const left = items[1]!;\n const right = items[2]!;\n const bottomHalf = (maxW - ROW_GAP) / 2;\n return (\n <View style={{ width: maxW, height: MULTI_HEIGHT, marginVertical: 8, gap: ROW_GAP }}>\n <Pressable\n onPress={() => onOpenGallery(items, 0)}\n style={{ width: maxW, height: THREE_TOP_H }}\n >\n {top.kind === 'image' ? (\n <Image\n source={{ uri: top.uri }}\n style={[roundedSmall, { width: '100%', height: '100%' }]}\n resizeMode=\"cover\"\n />\n ) : (\n <VideoThumbCell\n uri={top.uri}\n cellStyle={{ width: maxW, height: THREE_TOP_H }}\n roundedStyle={roundedSmall}\n />\n )}\n </Pressable>\n <View style={{ flexDirection: 'row', gap: ROW_GAP, height: THREE_BOT_H }}>\n <Pressable\n key={`${left.uri}-1`}\n onPress={() => onOpenGallery(items, 1)}\n style={{ width: bottomHalf, height: THREE_BOT_H }}\n >\n {left.kind === 'image' ? (\n <Image\n source={{ uri: left.uri }}\n style={[roundedSmall, { width: '100%', height: '100%' }]}\n resizeMode=\"cover\"\n />\n ) : (\n <VideoThumbCell\n uri={left.uri}\n cellStyle={{ width: bottomHalf, height: THREE_BOT_H }}\n roundedStyle={roundedSmall}\n />\n )}\n </Pressable>\n <Pressable\n key={`${right.uri}-2`}\n onPress={() => onOpenGallery(items, 2)}\n style={{ width: bottomHalf, height: THREE_BOT_H }}\n >\n {right.kind === 'image' ? (\n <Image\n source={{ uri: right.uri }}\n style={[roundedSmall, { width: '100%', height: '100%' }]}\n resizeMode=\"cover\"\n />\n ) : (\n <VideoThumbCell\n uri={right.uri}\n cellStyle={{ width: bottomHalf, height: THREE_BOT_H }}\n roundedStyle={roundedSmall}\n />\n )}\n </Pressable>\n </View>\n </View>\n );\n }\n\n const cellW = (maxW - ROW_GAP) / 2;\n const extra = items.length - 4;\n const display = items.slice(0, 4);\n\n return (\n <View\n style={{\n width: maxW,\n height: MULTI_HEIGHT,\n flexWrap: 'wrap',\n flexDirection: 'row',\n gap: ROW_GAP,\n marginVertical: 8,\n }}\n >\n {display.map((cell, idx) => (\n <Pressable\n key={`${cell.uri}-${idx}`}\n onPress={() => onOpenGallery(items, idx)}\n style={{\n width: cellW,\n height: FOUR_CELL_H,\n position: 'relative',\n }}\n >\n {cell.kind === 'image' ? (\n <Image\n source={{ uri: cell.uri }}\n style={[roundedSmall, { width: '100%', height: '100%' }]}\n resizeMode=\"cover\"\n />\n ) : (\n <VideoThumbCell\n uri={cell.uri}\n cellStyle={{ width: cellW, height: FOUR_CELL_H }}\n roundedStyle={roundedSmall}\n />\n )}\n {idx === 3 && extra > 0 && (\n <View\n style={tw`absolute inset-0 bg-black/55 items-center justify-center`}\n >\n <Text style={tw`text-white text-lg font-bold`}>+{extra}</Text>\n </View>\n )}\n </Pressable>\n ))}\n </View>\n );\n};\n","import React, { useMemo } from 'react';\nimport { Linking, Pressable, Text, View } from 'react-native';\nimport ParsedText from 'react-native-parsed-text';\nimport tw from 'twrnc';\nimport { useChatContext } from '../../context/ChatContext';\nimport {\n getFileAttachmentBackground,\n getFileAttachmentSubtitleColor,\n getFileAttachmentTextColor,\n getMessageTextColor,\n} from '../../utils/bubbleTheme';\nimport { collectMediaItems } from '../../utils/messageMedia';\nimport { getFontFamilyStyle, withFontFamily } from '../../utils/theme';\nimport AudioPlayer from '../AudioPlayer/AudioPlayer';\nimport { MediaGrid } from './MediaGrid';\nimport { MessageContentProps } from './types';\n\nconst MessageContent: React.FC<MessageContentProps> = ({\n message,\n onGalleryOpen,\n isVideoPlaying,\n isCurrentUser,\n}) => {\n const { theme, showMessageStatus, onFileAttachmentPress } = useChatContext();\n\n const mediaItems = useMemo(() => collectMediaItems(message), [message]);\n\n return (\n <View>\n {mediaItems.length > 0 && (\n <MediaGrid items={mediaItems} onOpenGallery={onGalleryOpen} />\n )}\n\n {(message.fileAttachments ?? []).map((file, idx) => (\n <Pressable\n key={`${file.uri}-${idx}`}\n onPress={() => {\n if (onFileAttachmentPress) {\n onFileAttachmentPress(file);\n } else {\n Linking.openURL(\n file.uri.startsWith('http') || file.uri.startsWith('file:')\n ? file.uri\n : `file://${file.uri}`\n );\n }\n }}\n style={[\n tw`my-1.5 py-2 px-3 rounded-lg max-w-[220px]`,\n {\n backgroundColor: getFileAttachmentBackground(\n theme,\n isCurrentUser\n ),\n },\n isCurrentUser\n ? theme?.messageStyle?.sentFileAttachmentStyle\n : theme?.messageStyle?.receivedFileAttachmentStyle,\n ]}\n >\n <Text\n style={withFontFamily(\n [\n tw`text-xs font-semibold`,\n {\n color: getFileAttachmentTextColor(theme, isCurrentUser),\n },\n isCurrentUser\n ? theme?.messageStyle?.sentFileAttachmentTextStyle\n : theme?.messageStyle?.receivedFileAttachmentTextStyle,\n ],\n theme?.fontFamily\n )}\n numberOfLines={2}\n >\n 📎 {file.name}\n </Text>\n <Text\n style={withFontFamily(\n [\n tw`text-[10px] mt-0.5`,\n {\n color: getFileAttachmentSubtitleColor(theme, isCurrentUser),\n },\n isCurrentUser\n ? theme?.messageStyle?.sentFileAttachmentSubtitleStyle\n : theme?.messageStyle?.receivedFileAttachmentSubtitleStyle,\n ],\n theme?.fontFamily\n )}\n >\n {file.type}\n </Text>\n </Pressable>\n ))}\n\n {message.audio && (\n <AudioPlayer\n audioUrl={message.audio}\n audioId={message.id}\n isVideoPlaying={isVideoPlaying as boolean}\n isCurrentUser={isCurrentUser}\n senderAvatar={message.senderAvatar}\n senderName={message.senderName}\n reserveStatusSpace={!message.text}\n />\n )}\n\n {message.text && (\n <ParsedText\n style={withFontFamily(\n [\n tw`pt-1`,\n showMessageStatus ? tw`pb-0` : tw`pb-2`,\n { wordBreak: 'break-word', overflowWrap: 'break-word' },\n isCurrentUser\n ? theme?.messageStyle?.sentTextStyle\n : theme?.messageStyle?.receivedTextStyle,\n getMessageTextColor(theme, isCurrentUser)\n ? { color: getMessageTextColor(theme, isCurrentUser) }\n : undefined,\n ],\n theme?.fontFamily\n )}\n parse={[\n {\n type: 'url',\n style: {\n color: 'blue',\n textDecorationLine: 'underline',\n ...getFontFamilyStyle(theme?.fontFamily),\n },\n onPress: (url) =>\n Linking.openURL(\n url.startsWith('http') ? url : `https://${url}`\n ),\n },\n ]}\n childrenProps={{ allowFontScaling: false }}\n >\n {message.text}\n </ParsedText>\n )}\n </View>\n );\n};\n\nexport default React.memo(MessageContent);\n","\nimport { ViewStyle } from \"react-native\";\nimport Svg, { Path } from \"react-native-svg\";\ninterface IconProps {\n style?: ViewStyle;\n fill?: string;\n}\n\nexport const CheckAllIcon = ({ style, fill }: IconProps) => {\n return (\n <Svg style={style} viewBox=\"0 0 24 24\">\n <Path\n fill={fill}\n d=\"M.41 13.41L6 19l1.41-1.42L1.83 12m20.41-6.42L11.66 16.17L7.5 12l-1.43 1.41L11.66 19l12-12M18 7l-1.41-1.42l-6.35 6.35l1.42 1.41z\"\n ></Path>\n </Svg>\n );\n};\n","\nimport { ViewStyle } from \"react-native\";\nimport Svg, { Path } from \"react-native-svg\";\ninterface IconProps {\n style?: ViewStyle;\n fill?: string;\n}\n\nexport const CheckIcon = ({ style, fill }: IconProps) => {\n return (\n <Svg style={style} viewBox=\"0 0 24 24\">\n <Path d=\"m9.55 18l-5.7-5.7l1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4z\" fill={fill}></Path>\n </Svg>\n );\n};\n","import React from 'react';\nimport { Text, View } from 'react-native';\nimport tw from 'twrnc';\nimport { CheckAllIcon } from '../../assets/Icons/CheckAllIcon';\nimport { CheckIcon } from '../../assets/Icons/CheckIcon';\nimport { useChatContext } from '../../context/ChatContext';\nimport {\n getMediaTimestampColor,\n getMediaTimestampContainerStyle,\n getMessageTimestampColor,\n} from '../../utils/bubbleTheme';\nimport { withFontFamily } from '../../utils/theme';\nimport { MessageStatusProps } from './types';\n\nconst MessageStatus: React.FC<MessageStatusProps> = ({\n time,\n status,\n isCurrentUser,\n hasText,\n hasAudio,\n hasGalleryMedia,\n hasFileAttachments,\n}) => {\n const { theme, showMessageStatus } = useChatContext();\n const galleryOnlyOverlay =\n hasGalleryMedia && !hasText && !hasAudio;\n const mediaOverlay =\n (hasGalleryMedia || hasFileAttachments) && !hasText && !hasAudio;\n\n const timestampColor = galleryOnlyOverlay\n ? '#ffffff'\n : mediaOverlay\n ? getMediaTimestampColor(theme, isCurrentUser)\n : getMessageTimestampColor(theme, isCurrentUser);\n\n return (\n <>\n {showMessageStatus && (\n <View\n style={[\n tw`flex-row items-center`,\n hasText\n ? tw`justify-end pb-1 ml-4`\n : hasAudio\n ? tw`absolute right-3 bottom-2`\n : mediaOverlay\n ? [\n tw`absolute right-3 bottom-4`,\n getMediaTimestampContainerStyle(theme, isCurrentUser),\n ]\n : [\n tw`absolute right-3 bottom-4`,\n getMediaTimestampContainerStyle(theme, isCurrentUser),\n ],\n ]}\n >\n <Text\n style={withFontFamily(\n [tw`text-xs`, { color: timestampColor }],\n theme?.fontFamily\n )}\n >\n {time}\n </Text>\n {isCurrentUser && (\n <View style={tw`ml-1 flex-row items-center`}>\n {status === 'sent' && (\n <CheckIcon\n style={tw.style('h-4 w-4', { opacity: 0.7 })}\n fill={theme?.colors?.sentIconColor || '#6B7280'}\n />\n )}\n {status === 'delivered' && (\n <CheckAllIcon\n style={tw.style('h-4 w-4', { opacity: 0.7 })}\n fill={theme?.colors?.deliveredIconColor || '#6B7280'}\n />\n )}\n {status === 'read' && (\n <CheckAllIcon\n style={tw.style('h-4 w-4', { opacity: 0.9 })}\n fill={theme?.colors?.readIconColor || '#3B82F6'}\n />\n )}\n </View>\n )}\n </View>\n )}\n </>\n );\n};\n\nexport default React.memo(MessageStatus);\n","import React from 'react';\nimport { Image, Pressable, Text, View } from 'react-native';\nimport tw from 'twrnc';\nimport { ArrowBack2RoundedIcon } from '../../assets/Icons/ArrowBack2RoundedIcon';\nimport { useChatContext } from '../../context/ChatContext';\nimport { getBubbleBackgroundColor } from '../../utils/bubbleTheme';\nimport { collectMediaItems } from '../../utils/messageMedia';\nimport { withFontFamily } from '../../utils/theme';\nimport MessageContent from './MessageContent';\nimport MessageStatus from './MessageStatus';\nimport { ChatBubbleProps } from './types';\n\nimport type { MessageMediaItem } from '../../types';\n\nconst ChatBubble: React.FC<ChatBubbleProps> = ({\n message,\n isCurrentUser,\n isFirstInSequence,\n onLongPress,\n}) => {\n const {\n theme,\n showAvatars,\n showUserNames,\n showBubbleTail,\n setMediaViewerGallery,\n isVideoPlaying,\n } = useChatContext();\n\n const mediaItems = collectMediaItems(message);\n\n const handleGalleryOpen = (items: MessageMediaItem[], index: number) => {\n setMediaViewerGallery(items, index);\n };\n\n const hasFilesOnly =\n (message.fileAttachments?.length ?? 0) > 0 &&\n mediaItems.length === 0 &&\n !message.text &&\n !message.audio;\n\n return (\n <Pressable\n onLongPress={onLongPress}\n style={[\n tw`px-2 my-1 max-w-[75%] relative`,\n isCurrentUser ? tw`self-end mr-3` : tw`self-start ml-9`,\n isFirstInSequence\n ? isCurrentUser\n ? tw`bg-green-500 rounded-tr-none`\n : tw`bg-white rounded-tl-none`\n : isCurrentUser\n ? tw`bg-green-500`\n : tw`bg-white`,\n {\n borderRadius: 8,\n ...(getBubbleBackgroundColor(theme, isCurrentUser)\n ? {\n backgroundColor: getBubbleBackgroundColor(theme, isCurrentUser),\n }\n : {}),\n ...(isCurrentUser\n ? theme?.bubbleStyle?.sent\n : theme?.bubbleStyle?.received),\n },\n ]}\n >\n {/* Avatar & Sender Name for Group Chat */}\n {!isCurrentUser && isFirstInSequence && showAvatars && (\n <>\n <View\n style={tw`absolute w-6 h-6 rounded-full top-0 -left-9 flex-row items-center`}\n >\n {message.senderAvatar ? (\n <Image\n source={{ uri: message.senderAvatar }}\n style={[\n tw`w-full h-full rounded-full`,\n theme?.bubbleStyle?.avatarImageStyle,\n ]}\n resizeMode=\"cover\"\n />\n ) : (\n <Text\n style={withFontFamily(\n [\n tw`text-sm text-black font-semibold capitalize rounded-full bg-zinc-300 w-full h-full text-center pt-0.5`,\n theme?.bubbleStyle?.avatarTextStyle,\n ],\n theme?.fontFamily\n )}\n >\n {message.senderName?.charAt(0)}\n </Text>\n )}\n </View>\n {showUserNames && message.senderName && (\n <Text\n style={withFontFamily(\n [\n tw`text-sm text-black font-semibold mt-1 capitalize`,\n theme?.bubbleStyle?.userNameStyle,\n ],\n theme?.fontFamily\n )}\n >\n {message.senderName}\n </Text>\n )}\n </>\n )}\n\n {/* Bubble Tail */}\n {isFirstInSequence && showBubbleTail && (\n <ArrowBack2RoundedIcon\n style={tw.style(\n 'absolute w-6 h-6',\n isCurrentUser\n ? 'rotate-90 -right-3.5 mt-[1.24px] -top-1'\n : 'rotate-180 -left-3.5 mt-[1.5px] -top-[3px]'\n )}\n color={\n isCurrentUser\n ? theme?.colors?.sentMessageTailColor || 'rgba(34, 197, 94, 1)'\n : theme?.colors?.receivedMessageTailColor || 'white'\n }\n />\n )}\n\n <MessageContent\n message={message}\n isCurrentUser={isCurrentUser}\n isFirstInSequence={isFirstInSequence}\n onGalleryOpen={handleGalleryOpen}\n isVideoPlaying={isVideoPlaying}\n />\n\n <MessageStatus\n time={message.time}\n status={isCurrentUser ? message.status : undefined}\n isCurrentUser={isCurrentUser}\n hasText={!!message.text}\n hasAudio={!!message.audio}\n hasGalleryMedia={mediaItems.length > 0 && !message.text}\n hasFileAttachments={hasFilesOnly}\n />\n </Pressable>\n );\n};\n\nexport default React.memo(ChatBubble);\n","import { ViewStyle } from \"react-native\";\nimport { Circle, G, Path, Svg } from \"react-native-svg\";\n\nexport const CameraIcon = ({\n style,\n color\n}: {\n style?: ViewStyle;\n color?: string;\n}) => {\n return (\n <Svg style={style} viewBox=\"0 0 24 24\">\n <G fill=\"none\" strokeWidth=\"1.5\" stroke={color}>\n <Circle cx=\"12\" cy=\"13\" r=\"3\"></Circle>\n <Path d=\"M9.778 21h4.444c3.121 0 4.682 0 5.803-.735a4.4 4.4 0 0 0 1.226-1.204c.749-1.1.749-2.633.749-5.697s0-4.597-.749-5.697a4.4 4.4 0 0 0-1.226-1.204c-.72-.473-1.622-.642-3.003-.702c-.659 0-1.226-.49-1.355-1.125A2.064 2.064 0 0 0 13.634 3h-3.268c-.988 0-1.839.685-2.033 1.636c-.129.635-.696 1.125-1.355 1.125c-1.38.06-2.282.23-3.003.702A4.4 4.4 0 0 0 2.75 7.667C2 8.767 2 10.299 2 13.364s0 4.596.749 5.697c.324.476.74.885 1.226 1.204C5.096 21 6.657 21 9.778 21Z\"></Path>\n <Path strokeLinecap=\"round\" d=\"M19 10h-1\"></Path>\n </G>\n </Svg>\n );\n};\n","\nimport { ViewStyle } from \"react-native\";\nimport Svg, { Ellipse, G, Path } from \"react-native-svg\";\n\nexport const EmojiFunnySquareIcon = ({ style ,color}: { style?: ViewStyle,color?: string }) => {\n return (\n <Svg style={style} viewBox=\"0 0 24 24\">\n <G fill=\"none\" stroke={color}>\n <Path\n strokeLinecap=\"round\"\n strokeWidth=\"1.5\"\n d=\"M8.913 15.934c1.258.315 2.685.315 4.122-.07s2.673-1.099 3.605-2.001\"\n ></Path>\n <Ellipse\n cx=\"14.509\"\n cy=\"9.774\"\n fill=\"currentColor\"\n rx=\"1\"\n ry=\"1.5\"\n transform=\"rotate(-15 14.51 9.774)\"\n ></Ellipse>\n <Ellipse\n cx=\"8.714\"\n cy=\"11.328\"\n fill=\"currentColor\"\n rx=\"1\"\n ry=\"1.5\"\n transform=\"rotate(-15 8.714 11.328)\"\n ></Ellipse>\n <Path\n strokeWidth=\"1.5\"\n d=\"M3.204 14.357c-1.112-4.147-1.667-6.22-.724-7.853s3.016-2.19 7.163-3.3c4.147-1.112 6.22-1.667 7.853-.724s2.19 3.016 3.3 7.163c1.111 4.147 1.667 6.22.724 7.853s-3.016 2.19-7.163 3.3c-4.147 1.111-6.22 1.667-7.853.724s-2.19-3.016-3.3-7.163Z\"\n ></Path>\n <Path\n strokeWidth=\"1.5\"\n d=\"m13 16l.478.974a1.5 1.5 0 1 0 2.693-1.322l-.46-.935\"\n ></Path>\n </G>\n </Svg>\n );\n};\n","\nimport { ViewStyle } from \"react-native\";\nimport Svg, { G, Path } from \"react-native-svg\";\n\nexport const MicrophoneIcon = ({\n style,\n color,\n}: {\n style?: ViewStyle;\n color?: string;\n}) => {\n return (\n <Svg style={style} viewBox=\"0 0 24 24\">\n <G fill=\"none\" strokeWidth=\"1.5\" stroke={color}>\n <Path d=\"M7 8a5 5 0 0 1 10 0v3a5 5 0 0 1-10 0z\"></Path>\n <Path\n strokeLinecap=\"round\"\n d=\"M13.5 8H17m-3.5 3H17M7 8h2m-2 3h2m11-1v1a8 8 0 0 1-8 8m-8-9v1a8 8 0 0 0 8 8m0 0v3\"\n opacity=\".5\"\n ></Path>\n </G>\n </Svg>\n );\n};\n","\nimport { ViewStyle } from \"react-native\";\nimport Svg, { Path } from \"react-native-svg\";\n\nexport const PaperClipIcon = ({\n style,\n color,\n}: {\n style?: ViewStyle;\n color?: string;\n}) => {\n return (\n <Svg style={style} fill={color} viewBox=\"0 0 24 24\">\n <Path d=\"M17.346 15.539q0 2.271-1.565 3.866T11.952 21t-3.838-1.595t-1.576-3.867v-8.73q0-1.587 1.092-2.697Q8.72 3 10.308 3t2.678 1.11t1.091 2.698v8.269q0 .88-.615 1.517q-.614.637-1.498.637t-1.52-.627t-.636-1.527V6.769h1v8.308q0 .479.327.816q.328.338.807.338t.807-.338t.328-.816V6.789q-.006-1.166-.802-1.977Q11.48 4 10.308 4q-1.163 0-1.966.821q-.804.821-.804 1.987v8.73q-.005 1.853 1.283 3.157Q10.11 20 11.96 20q1.823 0 3.1-1.305t1.287-3.156v-8.77h1z\"></Path>\n </Svg>\n );\n};\n","import { ViewStyle } from \"react-native\";\n\nimport Svg, { G, Path } from \"react-native-svg\";\n\nexport const PaperPlaneIcon = ({\n style,\n color,\n}: {\n style?: ViewStyle;\n color?: string;\n}) => {\n return (\n <Svg style={style} viewBox=\"0 0 24 24\">\n <G fill=\"none\" strokeWidth=\"1.5\" stroke={color}>\n <Path d=\"m18.636 15.67l1.716-5.15c1.5-4.498 2.25-6.747 1.062-7.934s-3.436-.438-7.935 1.062L8.33 5.364C4.7 6.574 2.885 7.18 2.37 8.067a2.72 2.72 0 0 0 0 2.73c.515.888 2.33 1.493 5.96 2.704c.584.194.875.291 1.119.454c.236.158.439.361.597.597c.163.244.26.535.454 1.118c1.21 3.63 1.816 5.446 2.703 5.962a2.72 2.72 0 0 0 2.731 0c.887-.516 1.492-2.331 2.703-5.962Z\"></Path>\n <Path\n strokeLinecap=\"round\"\n d=\"m17.79 6.21l-4.211 4.165\"\n opacity=\".5\"\n ></Path>\n </G>\n </Svg>\n );\n};\n","import { useCallback, useEffect, useRef, useState } from 'react';\nimport { PermissionsAndroid, Platform } from 'react-native';\nimport { RecordingResult } from '../types';\n\nexport type RecordingStatus = 'idle' | 'recording' | 'paused';\n\ninterface UseVoiceRecorderOptions {\n maxDuration?: number;\n onRecordStart?: () => void;\n onRecordEnd?: (result: RecordingResult) => void;\n}\n\nasync function requestMicPermission(): Promise<boolean> {\n if (Platform.OS === 'android') {\n try {\n const granted = await PermissionsAndroid.request(\n PermissionsAndroid.PERMISSIONS.RECORD_AUDIO,\n {\n title: 'Microphone Permission',\n message: 'This app needs access to your microphone to record audio.',\n buttonPositive: 'OK',\n }\n );\n return granted === PermissionsAndroid.RESULTS.GRANTED;\n } catch {\n return false;\n }\n }\n // iOS: permissions are handled natively by AVFoundation when recording starts\n return true;\n}\n\nexport function useVoiceRecorder({\n maxDuration = 300,\n onRecordStart,\n onRecordEnd,\n}: UseVoiceRecorderOptions = {}) {\n const [status, setStatus] = useState<RecordingStatus>('idle');\n const [duration, setDuration] = useState(0);\n\n const recordingRef = useRef<any>(null);\n const timerRef = useRef<ReturnType<typeof setInterval> | null>(null);\n const durationRef = useRef(0);\n\n const onRecordEndRef = useRef(onRecordEnd);\n onRecordEndRef.current = onRecordEnd;\n const onRecordStartRef = useRef(onRecordStart);\n onRecordStartRef.current = onRecordStart;\n const maxDurationRef = useRef(maxDuration);\n maxDurationRef.current = maxDuration;\n\n const stopTimer = useCallback(() => {\n if (timerRef.current) {\n clearInterval(timerRef.current);\n timerRef.current = null;\n }\n }, []);\n\n const startTimer = useCallback(\n (onMax: () => void) => {\n stopTimer();\n timerRef.current = setInterval(() => {\n durationRef.current += 1;\n setDuration(durationRef.current);\n if (durationRef.current >= maxDurationRef.current) onMax();\n }, 1000);\n },\n [stopTimer]\n );\n\n const startRecording = useCallback(async () => {\n let AudioRecord: any;\n try {\n AudioRecord = require('react-native-audio-record').default;\n } catch {\n console.error(\n '[movius-chats] Voice recording requires react-native-audio-record. ' +\n 'Install it: yarn add react-native-audio-record'\n );\n return;\n }\n\n const granted = await requestMicPermission();\n if (!granted) {\n console.warn('[movius-chats] Microphone permission denied.');\n return;\n }\n\n try {\n AudioRecord.init({\n sampleRate: 16000,\n channels: 1,\n bitsPerSample: 16,\n audioSource: 6,\n wavFile: `movius_rec_${Date.now()}.wav`,\n });\n\n AudioRecord.start();\n recordingRef.current = AudioRecord;\n durationRef.current = 0;\n setDuration(0);\n setStatus('recording');\n\n startTimer(() => stopRecordingRef.current());\n\n onRecordStartRef.current?.();\n } catch (e) {\n console.warn('[movius-chats] Failed to start recording:', e);\n }\n }, [startTimer]);\n\n const pauseRecording = useCallback(async () => {\n if (!recordingRef.current) return;\n try {\n recordingRef.current.stop();\n setStatus('paused');\n stopTimer();\n } catch (e) {\n console.warn('[movius-chats] Failed to pause:', e);\n }\n }, [stopTimer]);\n\n const resumeRecording = useCallback(async () => {\n if (!recordingRef.current) return;\n try {\n recordingRef.current.start();\n setStatus('recording');\n startTimer(() => stopRecordingRef.current());\n } catch (e) {\n console.warn('[movius-chats] Failed to resume:', e);\n }\n }, [startTimer]);\n\n const stopRecordingImpl = useCallback(async (): Promise<RecordingResult | null> => {\n const rec = recordingRef.current;\n if (!rec) return null;\n\n stopTimer();\n recordingRef.current = null;\n const capturedDuration = durationRef.current;\n durationRef.current = 0;\n setStatus('idle');\n setDuration(0);\n\n try {\n const uri: string = await rec.stop();\n if (!uri) return null;\n\n const result: RecordingResult = {\n uri: uri.startsWith('file://') ? uri : `file://${uri}`,\n duration: Math.max(1, capturedDuration),\n mimeType: 'audio/wav',\n };\n\n onRecordEndRef.current?.(result);\n return result;\n } catch (e) {\n console.warn('[movius-chats] Failed to stop recording:', e);\n return null;\n }\n }, [stopTimer]);\n\n const stopRecordingRef = useRef(stopRecordingImpl);\n stopRecordingRef.current = stopRecordingImpl;\n\n const stopRecording = useCallback(() => stopRecordingRef.current(), []);\n\n const cancelRecording = useCallback(async () => {\n const rec = recordingRef.current;\n stopTimer();\n recordingRef.current = null;\n durationRef.current = 0;\n setStatus('idle');\n setDuration(0);\n\n if (rec) {\n try {\n const uri: string = await rec.stop();\n if (uri) {\n try {\n const RNFS = require('react-native-fs');\n const path = uri.startsWith('file://') ? uri.slice(7) : uri;\n await RNFS.unlink(path);\n } catch {}\n }\n } catch {}\n }\n }, [stopTimer]);\n\n useEffect(() => {\n return () => {\n stopTimer();\n try { recordingRef.current?.stop(); } catch {}\n };\n }, [stopTimer]);\n\n return {\n status,\n duration,\n isRecording: status === 'recording',\n isPaused: status === 'paused',\n startRecording,\n pauseRecording,\n resumeRecording,\n stopRecording,\n cancelRecording,\n };\n}\n","import { ViewStyle } from 'react-native';\nimport Svg, { Path } from 'react-native-svg';\n\nexport const ChevronUpIcon = ({\n style,\n color = '#6b7280',\n}: {\n style?: ViewStyle;\n color?: string;\n}) => (\n <Svg style={style} viewBox=\"0 0 24 24\" fill=\"none\">\n <Path\n d=\"M6 15l6-6 6 6\"\n stroke={color}\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </Svg>\n);\n","import { ViewStyle } from 'react-native';\nimport Svg, { Path, Rect } from 'react-native-svg';\n\nexport const LockIcon = ({\n style,\n color = '#6b7280',\n}: {\n style?: ViewStyle;\n color?: string;\n}) => (\n <Svg style={style} viewBox=\"0 0 24 24\" fill=\"none\">\n <Rect\n x=\"5\"\n y=\"11\"\n width=\"14\"\n height=\"10\"\n rx=\"2\"\n stroke={color}\n strokeWidth=\"1.5\"\n />\n <Path\n d=\"M8 11V7a4 4 0 0 1 8 0v4\"\n stroke={color}\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n />\n </Svg>\n);\n","import { ViewStyle } from 'react-native';\nimport Svg, { Path } from 'react-native-svg';\n\nexport const TrashIcon = ({\n style,\n color = '#ef4444',\n}: {\n style?: ViewStyle;\n color?: string;\n}) => (\n <Svg style={style} viewBox=\"0 0 24 24\" fill=\"none\">\n <Path\n d=\"M3 6h18M8 6V4h8v2M19 6l-1 14H6L5 6\"\n stroke={color}\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n <Path\n d=\"M10 11v6M14 11v6\"\n stroke={color}\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n />\n </Svg>\n);\n","import React, {\n ReactNode,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { Pressable, StyleSheet, Text, Vibration, View } from 'react-native';\nimport { Gesture, GestureDetector } from 'react-native-gesture-handler';\nimport Animated, {\n Easing,\n Extrapolation,\n interpolate,\n runOnJS,\n useAnimatedStyle,\n useSharedValue,\n withRepeat,\n withSequence,\n withSpring,\n withTiming,\n} from 'react-native-reanimated';\nimport type { SharedValue } from 'react-native-reanimated';\nimport { ChevronUpIcon } from '../../assets/Icons/ChevronUpIcon';\nimport { LockIcon } from '../../assets/Icons/LockIcon';\nimport { MicrophoneIcon } from '../../assets/Icons/MicrophoneIcon';\nimport { PaperPlaneIcon } from '../../assets/Icons/PaperPlaneIcon';\nimport { TrashIcon } from '../../assets/Icons/TrashIcon';\nimport { formatDuration } from '../../utils/datefunc';\n\n// ─── State machine ────────────────────────────────────────────────────────────\n\nexport type RecordingState =\n | 'IDLE'\n | 'RECORDING_TAP'\n | 'RECORDING_HOLD'\n | 'LOCKED_RECORDING'\n | 'SENDING'\n | 'CANCELLED';\n\nconst STATE_IDLE = 0;\nconst STATE_TAP = 1;\nconst STATE_HOLD = 2;\nconst STATE_LOCKED = 3;\nconst STATE_SENDING = 4;\nconst STATE_CANCELLED = 5;\n\nfunction stateToInt(s: RecordingState): number {\n switch (s) {\n case 'IDLE':\n return STATE_IDLE;\n case 'RECORDING_TAP':\n return STATE_TAP;\n case 'RECORDING_HOLD':\n return STATE_HOLD;\n case 'LOCKED_RECORDING':\n return STATE_LOCKED;\n case 'SENDING':\n return STATE_SENDING;\n case 'CANCELLED':\n return STATE_CANCELLED;\n }\n}\n\n// ─── Audio payload passed to onSend ───────────────────────────────────────────\n\nexport interface VoiceRecorderFlowAudio {\n /** Final recording duration in seconds. */\n duration: number;\n}\n\n// ─── Public props ─────────────────────────────────────────────────────────────\n\nexport interface VoiceRecorderFlowProps {\n primaryColor?: string;\n backgroundColor?: string;\n timerColor?: string;\n microphoneColor?: string;\n lockColor?: string;\n waveformColor?: string;\n deleteIconColor?: string;\n\n renderMicIcon?: () => ReactNode;\n renderSendIcon?: () => ReactNode;\n renderLockIcon?: () => ReactNode;\n renderArrowIcon?: () => ReactNode;\n renderDeleteIcon?: () => ReactNode;\n renderWaveform?: () => ReactNode;\n\n onRecordingStart?: () => void;\n onRecordingStop?: () => void;\n onSend?: (audio: VoiceRecorderFlowAudio) => void;\n onDelete?: () => void;\n onLock?: () => void;\n onCancel?: () => void;\n}\n\n// ─── Tunables ─────────────────────────────────────────────────────────────────\n\nconst CONTAINER_HEIGHT = 110;\nconst MIC_SIZE = 72;\nconst MIC_RIGHT = 18;\n\nconst LONG_PRESS_MS = 300;\n\nconst MAX_LEFT = -150;\nconst MAX_UP = -120;\nconst CANCEL_THRESHOLD = -120;\nconst LOCK_THRESHOLD = -100;\nconst LOCK_REVEAL_TRAVEL = -10;\n\n// ─── Helpers ──────────────────────────────────────────────────────────────────\n\nfunction vibrateOnce() {\n Vibration.vibrate(20);\n}\n\n// ─── Component ────────────────────────────────────────────────────────────────\n\nexport const VoiceRecorderFlow: React.FC<VoiceRecorderFlowProps> = (props) => {\n const {\n primaryColor = '#22C55E',\n backgroundColor = '#0B141A',\n timerColor = '#FFFFFF',\n microphoneColor = '#FFFFFF',\n lockColor = '#E9EDEF',\n waveformColor = '#E9EDEF',\n deleteIconColor = '#8696A0',\n renderMicIcon,\n renderSendIcon,\n renderLockIcon,\n renderArrowIcon,\n renderDeleteIcon,\n renderWaveform,\n onRecordingStart,\n onRecordingStop,\n onSend,\n onDelete,\n onLock,\n onCancel,\n } = props;\n\n // Reactive state\n const [state, setState] = useState<RecordingState>('IDLE');\n const [duration, setDuration] = useState(0);\n\n // Mirrors of state for closures / worklets\n const stateRef = useRef<RecordingState>('IDLE');\n useEffect(() => {\n stateRef.current = state;\n }, [state]);\n\n const stateShared = useSharedValue(STATE_IDLE);\n useEffect(() => {\n stateShared.value = stateToInt(state);\n }, [state]);\n\n // Timekeeping\n const startedAtRef = useRef<number>(0);\n\n // Animation shared values\n const translateX = useSharedValue(0);\n const translateY = useSharedValue(0);\n const containerOpacity = useSharedValue(0);\n const containerY = useSharedValue(120);\n\n const micPulse = useSharedValue(1);\n const arrowPulse = useSharedValue(0);\n const chevronPulse = useSharedValue(0);\n const pauseOpacity = useSharedValue(1);\n const waveTick = useSharedValue(0);\n\n const cancelFiredShared = useSharedValue(0);\n const lockFiredShared = useSharedValue(0);\n\n // Continuous loop animations\n useEffect(() => {\n micPulse.value = withRepeat(\n withSequence(\n withTiming(1.06, { duration: 850, easing: Easing.inOut(Easing.ease) }),\n withTiming(1, { duration: 850, easing: Easing.inOut(Easing.ease) })\n ),\n -1,\n false\n );\n arrowPulse.value = withRepeat(\n withSequence(\n withTiming(-4, { duration: 700, easing: Easing.inOut(Easing.ease) }),\n withTiming(0, { duration: 700, easing: Easing.inOut(Easing.ease) })\n ),\n -1,\n false\n );\n chevronPulse.value = withRepeat(\n withSequence(\n withTiming(-5, { duration: 500, easing: Easing.inOut(Easing.ease) }),\n withTiming(0, { duration: 500, easing: Easing.inOut(Easing.ease) })\n ),\n -1,\n false\n );\n pauseOpacity.value = withRepeat(\n withSequence(\n withTiming(0.45, { duration: 600, easing: Easing.inOut(Easing.ease) }),\n withTiming(1, { duration: 600, easing: Easing.inOut(Easing.ease) })\n ),\n -1,\n false\n );\n waveTick.value = withRepeat(\n withTiming(1, { duration: 4500, easing: Easing.linear }),\n -1,\n false\n );\n }, []);\n\n // Timer — single source of truth across HOLD ↔ LOCKED transitions\n useEffect(() => {\n const recording =\n state === 'RECORDING_TAP' ||\n state === 'RECORDING_HOLD' ||\n state === 'LOCKED_RECORDING';\n if (!recording) return;\n const id = setInterval(() => {\n setDuration((Date.now() - startedAtRef.current) / 1000);\n }, 250);\n return () => clearInterval(id);\n }, [state]);\n\n // Stable callback refs (worklet-safe)\n const onRecordingStartRef = useRef(onRecordingStart);\n onRecordingStartRef.current = onRecordingStart;\n const onRecordingStopRef = useRef(onRecordingStop);\n onRecordingStopRef.current = onRecordingStop;\n const onSendRef = useRef(onSend);\n onSendRef.current = onSend;\n const onDeleteRef = useRef(onDelete);\n onDeleteRef.current = onDelete;\n const onLockRef = useRef(onLock);\n onLockRef.current = onLock;\n const onCancelRef = useRef(onCancel);\n onCancelRef.current = onCancel;\n\n // ─── Lifecycle helpers ──────────────────────────────────────────────────────\n\n const beginRecording = useCallback(() => {\n startedAtRef.current = Date.now();\n setDuration(0);\n cancelFiredShared.value = 0;\n lockFiredShared.value = 0;\n translateX.value = 0;\n translateY.value = 0;\n containerOpacity.value = withTiming(1, { duration: 280 });\n containerY.value = withSpring(0, { damping: 18, stiffness: 180 });\n onRecordingStartRef.current?.();\n }, []);\n\n const finalizeReset = useCallback(() => {\n setDuration(0);\n translateX.value = 0;\n translateY.value = 0;\n containerY.value = 120;\n containerOpacity.value = 0;\n setState('IDLE');\n }, []);\n\n const closeOut = useCallback(() => {\n containerOpacity.value = withTiming(0, { duration: 280 });\n containerY.value = withTiming(\n 120,\n { duration: 280, easing: Easing.in(Easing.cubic) },\n (finished) => {\n 'worklet';\n if (finished) {\n runOnJS(finalizeReset)();\n }\n }\n );\n }, [finalizeReset]);\n\n // ─── Transitions ────────────────────────────────────────────────────────────\n\n const sendNow = useCallback(() => {\n const finalDuration = (Date.now() - startedAtRef.current) / 1000;\n setState('SENDING');\n onRecordingStopRef.current?.();\n onSendRef.current?.({ duration: finalDuration });\n closeOut();\n }, [closeOut]);\n\n const handleQuickTap = useCallback(() => {\n const s = stateRef.current;\n if (s === 'IDLE') {\n setState('RECORDING_TAP');\n beginRecording();\n return;\n }\n if (s === 'RECORDING_TAP' || s === 'LOCKED_RECORDING') {\n sendNow();\n }\n }, [beginRecording, sendNow]);\n\n const handleHoldStart = useCallback(() => {\n if (stateRef.current !== 'IDLE') return;\n setState('RECORDING_HOLD');\n beginRecording();\n }, [beginRecording]);\n\n const triggerLock = useCallback(() => {\n if (stateRef.current !== 'RECORDING_HOLD') return;\n vibrateOnce();\n setState('LOCKED_RECORDING');\n translateX.value = withSpring(0, { damping: 18, stiffness: 180 });\n translateY.value = withSpring(0, { damping: 18, stiffness: 180 });\n onLockRef.current?.();\n }, []);\n\n const triggerCancel = useCallback(() => {\n const s = stateRef.current;\n if (\n s !== 'RECORDING_HOLD' &&\n s !== 'RECORDING_TAP' &&\n s !== 'LOCKED_RECORDING'\n )\n return;\n vibrateOnce();\n setState('CANCELLED');\n onRecordingStopRef.current?.();\n onCancelRef.current?.();\n onDeleteRef.current?.();\n closeOut();\n }, [closeOut]);\n\n const handleHoldEnd = useCallback(() => {\n if (stateRef.current !== 'RECORDING_HOLD') return;\n sendNow();\n }, [sendNow]);\n\n // Stable refs for worklets (avoid recomputing gesture on every render)\n const handleQuickTapRef = useRef(handleQuickTap);\n handleQuickTapRef.current = handleQuickTap;\n const handleHoldStartRef = useRef(handleHoldStart);\n handleHoldStartRef.current = handleHoldStart;\n const handleHoldEndRef = useRef(handleHoldEnd);\n handleHoldEndRef.current = handleHoldEnd;\n const triggerLockRef = useRef(triggerLock);\n triggerLockRef.current = triggerLock;\n const triggerCancelRef = useRef(triggerCancel);\n triggerCancelRef.current = triggerCancel;\n\n const fireQuickTap = () => handleQuickTapRef.current();\n const fireHoldStart = () => handleHoldStartRef.current();\n const fireHoldEnd = () => handleHoldEndRef.current();\n const fireLock = () => triggerLockRef.current();\n const fireCancel = () => triggerCancelRef.current();\n\n // ─── Gestures ───────────────────────────────────────────────────────────────\n\n const composedGesture = useMemo(() => {\n const tap = Gesture.Tap()\n .maxDuration(LONG_PRESS_MS - 10)\n .onEnd((_e, success) => {\n 'worklet';\n if (success) runOnJS(fireQuickTap)();\n });\n\n const holdPan = Gesture.Pan()\n .activateAfterLongPress(LONG_PRESS_MS)\n .onStart(() => {\n 'worklet';\n runOnJS(fireHoldStart)();\n })\n .onUpdate((e) => {\n 'worklet';\n if (stateShared.value !== STATE_HOLD) return;\n\n const tx = Math.max(MAX_LEFT, Math.min(0, e.translationX));\n const ty = Math.max(MAX_UP, Math.min(0, e.translationY));\n translateX.value = tx;\n translateY.value = ty;\n\n const dominantY = Math.abs(ty) > Math.abs(tx);\n\n if (\n dominantY &&\n lockFiredShared.value === 0 &&\n ty <= LOCK_THRESHOLD\n ) {\n lockFiredShared.value = 1;\n runOnJS(fireLock)();\n }\n\n if (\n !dominantY &&\n cancelFiredShared.value === 0 &&\n tx <= CANCEL_THRESHOLD\n ) {\n cancelFiredShared.value = 1;\n runOnJS(fireCancel)();\n }\n })\n .onEnd(() => {\n 'worklet';\n runOnJS(fireHoldEnd)();\n })\n .onFinalize(() => {\n 'worklet';\n if (lockFiredShared.value === 0 && cancelFiredShared.value === 0) {\n translateX.value = withSpring(0, { damping: 18, stiffness: 180 });\n translateY.value = withSpring(0, { damping: 18, stiffness: 180 });\n }\n });\n\n return Gesture.Race(tap, holdPan);\n }, []);\n\n // ─── Animated styles ────────────────────────────────────────────────────────\n\n const containerStyle = useAnimatedStyle(() => ({\n opacity: containerOpacity.value,\n transform: [{ translateY: containerY.value }],\n }));\n\n const micButtonStyle = useAnimatedStyle(() => {\n const isHold = stateShared.value === STATE_HOLD;\n const pulse = stateShared.value === STATE_IDLE ? 1 : micPulse.value;\n return {\n transform: [\n { translateX: isHold ? translateX.value : 0 },\n { translateY: isHold ? translateY.value : 0 },\n { scale: pulse },\n ],\n };\n });\n\n const slideTextStyle = useAnimatedStyle(() => {\n const opacity = interpolate(\n translateX.value,\n [0, CANCEL_THRESHOLD],\n [1, 0],\n Extrapolation.CLAMP\n );\n return {\n opacity,\n transform: [{ translateX: translateX.value * 0.55 + arrowPulse.value }],\n };\n });\n\n const lockPillStyle = useAnimatedStyle(() => {\n const reveal = interpolate(\n translateY.value,\n [0, LOCK_REVEAL_TRAVEL],\n [0, 1],\n Extrapolation.CLAMP\n );\n const lockProgress = interpolate(\n translateY.value,\n [0, LOCK_THRESHOLD],\n [0, 1],\n Extrapolation.CLAMP\n );\n return {\n opacity: reveal,\n transform: [\n { scale: 0.7 + reveal * 0.3 },\n { translateY: interpolate(lockProgress, [0, 1], [0, -22]) },\n ],\n };\n });\n\n const lockProgressFillStyle = useAnimatedStyle(() => {\n const progress = interpolate(\n translateY.value,\n [0, LOCK_THRESHOLD],\n [0, 1],\n Extrapolation.CLAMP\n );\n return { height: `${Math.round(progress * 100)}%` };\n });\n\n const chevronStyle = useAnimatedStyle(() => ({\n transform: [{ translateY: chevronPulse.value }],\n }));\n\n const pauseAnimatedStyle = useAnimatedStyle(() => ({\n opacity: pauseOpacity.value,\n }));\n\n // ─── Render decisions ───────────────────────────────────────────────────────\n\n const showBar = state !== 'IDLE';\n const showLockPill = state === 'RECORDING_HOLD';\n const isScreenOne =\n state === 'RECORDING_TAP' ||\n state === 'LOCKED_RECORDING' ||\n state === 'SENDING';\n\n return (\n <View style={styles.root} pointerEvents=\"box-none\">\n {showBar && (\n <Animated.View\n style={[styles.bar, { backgroundColor }, containerStyle]}\n >\n {isScreenOne ? (\n <ScreenOneCenter\n duration={duration}\n timerColor={timerColor}\n waveformColor={waveformColor}\n deleteIconColor={deleteIconColor}\n waveTick={waveTick}\n pauseAnimatedStyle={pauseAnimatedStyle}\n renderDeleteIcon={renderDeleteIcon}\n renderWaveform={renderWaveform}\n onDeletePress={triggerCancel}\n />\n ) : (\n <ScreenTwoCenter\n duration={duration}\n timerColor={timerColor}\n slideTextStyle={slideTextStyle}\n renderArrowIcon={renderArrowIcon}\n />\n )}\n </Animated.View>\n )}\n\n {showLockPill && (\n <Animated.View style={[styles.lockPill, lockPillStyle]} pointerEvents=\"none\">\n {renderLockIcon ? (\n renderLockIcon()\n ) : (\n <LockIcon style={{ width: 20, height: 20 }} color={lockColor} />\n )}\n <View style={styles.lockProgressTrack}>\n <Animated.View\n style={[\n styles.lockProgressFill,\n { backgroundColor: primaryColor },\n lockProgressFillStyle,\n ]}\n />\n </View>\n <Animated.View style={chevronStyle}>\n <ChevronUpIcon\n style={{ width: 16, height: 16 }}\n color={lockColor}\n />\n </Animated.View>\n </Animated.View>\n )}\n\n <View style={styles.buttonAnchor} pointerEvents=\"box-none\">\n <GestureDetector gesture={composedGesture}>\n <Animated.View\n style={[styles.micPressable, micButtonStyle]}\n accessibilityRole=\"button\"\n accessibilityLabel={\n isScreenOne\n ? 'Send recording'\n : 'Tap to record. Long-press and slide left to cancel or up to lock.'\n }\n >\n <View\n style={[styles.mic, { backgroundColor: primaryColor }]}\n >\n {isScreenOne\n ? renderSendIcon\n ? renderSendIcon()\n : (\n <PaperPlaneIcon\n style={{ width: 30, height: 30 }}\n color=\"#FFFFFF\"\n />\n )\n : renderMicIcon\n ? renderMicIcon()\n : (\n <MicrophoneIcon\n style={{ width: 30, height: 30 }}\n color={microphoneColor}\n />\n )}\n </View>\n </Animated.View>\n </GestureDetector>\n </View>\n </View>\n );\n};\n\n// ─── Sub-components ───────────────────────────────────────────────────────────\n\ninterface ScreenOneCenterProps {\n duration: number;\n timerColor: string;\n waveformColor: string;\n deleteIconColor: string;\n waveTick: SharedValue<number>;\n pauseAnimatedStyle: ReturnType<typeof useAnimatedStyle>;\n renderDeleteIcon?: () => ReactNode;\n renderWaveform?: () => ReactNode;\n onDeletePress: () => void;\n}\n\nconst ScreenOneCenter: React.FC<ScreenOneCenterProps> = ({\n duration,\n timerColor,\n waveformColor,\n deleteIconColor,\n waveTick,\n pauseAnimatedStyle,\n renderDeleteIcon,\n renderWaveform,\n onDeletePress,\n}) => {\n return (\n <View style={styles.screenOneRow}>\n <Pressable\n onPress={onDeletePress}\n hitSlop={10}\n style={styles.deleteWrapper}\n accessibilityRole=\"button\"\n accessibilityLabel=\"Delete recording\"\n >\n {renderDeleteIcon ? (\n renderDeleteIcon()\n ) : (\n <TrashIcon\n style={{ width: 26, height: 26 }}\n color={deleteIconColor}\n />\n )}\n </Pressable>\n\n <View style={styles.screenOneCenter}>\n <View style={styles.timerRow}>\n <Text\n style={[styles.timer, { color: timerColor }]}\n numberOfLines={1}\n >\n {formatDuration(duration)}\n </Text>\n <View style={styles.waveformWrapper}>\n {renderWaveform ? (\n renderWaveform()\n ) : (\n <Waveform color={waveformColor} tick={waveTick} />\n )}\n </View>\n </View>\n\n <Animated.View style={[styles.pauseRow, pauseAnimatedStyle]}>\n <View style={styles.pauseBar} />\n <View style={styles.pauseBar} />\n </Animated.View>\n </View>\n\n <View style={styles.micSpacer} />\n </View>\n );\n};\n\ninterface ScreenTwoCenterProps {\n duration: number;\n timerColor: string;\n slideTextStyle: ReturnType<typeof useAnimatedStyle>;\n renderArrowIcon?: () => ReactNode;\n}\n\nconst ScreenTwoCenter: React.FC<ScreenTwoCenterProps> = ({\n duration,\n timerColor,\n slideTextStyle,\n renderArrowIcon,\n}) => {\n return (\n <View style={styles.screenTwoRow}>\n <Text\n style={[styles.timer, { color: timerColor }]}\n numberOfLines={1}\n >\n {formatDuration(duration)}\n </Text>\n\n <Animated.View style={[styles.slideArea, slideTextStyle]}>\n {renderArrowIcon ? (\n renderArrowIcon()\n ) : (\n <Text style={styles.slideArrow}>‹</Text>\n )}\n <Text style={styles.slideText}>Slide to cancel</Text>\n </Animated.View>\n\n <View style={styles.micSpacer} />\n </View>\n );\n};\n\n// ─── Waveform (UI-thread driven) ──────────────────────────────────────────────\n\nconst WAVE_COUNT = 28;\nconst WAVE_BAR_WIDTH = 3;\nconst WAVE_SPACING = 3;\n\ninterface WaveformProps {\n color: string;\n tick: SharedValue<number>;\n}\n\nconst Waveform: React.FC<WaveformProps> = ({ color, tick }) => {\n return (\n <View style={styles.waveform}>\n {Array.from({ length: WAVE_COUNT }).map((_, i) => (\n <WaveBar key={i} index={i} total={WAVE_COUNT} color={color} tick={tick} />\n ))}\n </View>\n );\n};\n\ninterface WaveBarProps {\n index: number;\n total: number;\n color: string;\n tick: SharedValue<number>;\n}\n\nconst WaveBar: React.FC<WaveBarProps> = ({ index, total, color, tick }) => {\n const animatedStyle = useAnimatedStyle(() => {\n 'worklet';\n const t = tick.value * Math.PI * 2;\n const phase1 = Math.sin(t * 2 + index * 0.55);\n const phase2 = Math.sin(t * 4 + index * 1.3);\n const phase3 = Math.sin(t * 0.9 + index * 0.27);\n const combined = (phase1 * 0.55 + phase2 * 0.3 + phase3 * 0.4) * 0.5 + 0.5;\n const edge = Math.sin((index / Math.max(1, total - 1)) * Math.PI);\n const amp = Math.max(0.15, Math.min(1, combined) * (0.35 + 0.65 * edge));\n return { height: `${Math.round(amp * 100)}%` };\n });\n return (\n <Animated.View\n style={[\n {\n width: WAVE_BAR_WIDTH,\n marginHorizontal: WAVE_SPACING / 2,\n backgroundColor: color,\n borderRadius: WAVE_BAR_WIDTH,\n },\n animatedStyle,\n ]}\n />\n );\n};\n\n// ─── Styles ───────────────────────────────────────────────────────────────────\n\nconst styles = StyleSheet.create({\n root: {\n position: 'absolute',\n left: 0,\n right: 0,\n bottom: 0,\n },\n bar: {\n width: '100%',\n height: CONTAINER_HEIGHT,\n paddingHorizontal: 18,\n paddingVertical: 14,\n borderTopLeftRadius: 18,\n borderTopRightRadius: 18,\n flexDirection: 'row',\n alignItems: 'center',\n },\n buttonAnchor: {\n position: 'absolute',\n right: MIC_RIGHT,\n bottom: (CONTAINER_HEIGHT - MIC_SIZE) / 2,\n },\n micPressable: {\n width: MIC_SIZE,\n height: MIC_SIZE,\n justifyContent: 'center',\n alignItems: 'center',\n },\n mic: {\n width: MIC_SIZE,\n height: MIC_SIZE,\n borderRadius: MIC_SIZE / 2,\n justifyContent: 'center',\n alignItems: 'center',\n shadowColor: '#000',\n shadowOffset: { width: 0, height: 4 },\n shadowOpacity: 0.3,\n shadowRadius: 8,\n elevation: 6,\n },\n micSpacer: {\n width: MIC_SIZE,\n height: MIC_SIZE,\n },\n lockPill: {\n position: 'absolute',\n right: MIC_RIGHT + (MIC_SIZE - 46) / 2,\n bottom: CONTAINER_HEIGHT + 8,\n width: 46,\n paddingVertical: 12,\n borderRadius: 28,\n backgroundColor: 'rgba(20,28,33,0.95)',\n alignItems: 'center',\n justifyContent: 'center',\n gap: 10,\n shadowColor: '#000',\n shadowOffset: { width: 0, height: 4 },\n shadowOpacity: 0.3,\n shadowRadius: 8,\n elevation: 8,\n },\n lockProgressTrack: {\n width: 4,\n height: 18,\n borderRadius: 2,\n backgroundColor: 'rgba(255,255,255,0.15)',\n overflow: 'hidden',\n justifyContent: 'flex-end',\n },\n lockProgressFill: {\n width: '100%',\n borderRadius: 2,\n },\n screenOneRow: {\n flex: 1,\n flexDirection: 'row',\n alignItems: 'center',\n },\n screenOneCenter: {\n flex: 1,\n height: '100%',\n paddingHorizontal: 12,\n justifyContent: 'center',\n },\n screenTwoRow: {\n flex: 1,\n flexDirection: 'row',\n alignItems: 'center',\n height: '100%',\n },\n deleteWrapper: {\n width: 26,\n height: '100%',\n justifyContent: 'flex-end',\n alignItems: 'flex-start',\n paddingBottom: 4,\n },\n timerRow: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 12,\n },\n timer: {\n fontSize: 24,\n fontWeight: '600',\n minWidth: 50,\n letterSpacing: 0.3,\n },\n waveformWrapper: {\n flex: 1,\n alignItems: 'flex-start',\n justifyContent: 'center',\n },\n waveform: {\n width: 200,\n height: 36,\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n },\n pauseRow: {\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center',\n marginTop: 6,\n gap: 4,\n },\n pauseBar: {\n width: 3,\n height: 12,\n borderRadius: 2,\n backgroundColor: '#F15C6D',\n },\n slideArea: {\n flex: 1,\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n gap: 6,\n },\n slideArrow: {\n fontSize: 18,\n lineHeight: 18,\n color: 'rgba(255,255,255,0.55)',\n fontWeight: '500',\n marginTop: -2,\n },\n slideText: {\n fontSize: 14,\n color: 'rgba(255,255,255,0.55)',\n fontWeight: '500',\n },\n});\n\nexport default VoiceRecorderFlow;\n","\nimport { ViewStyle } from \"react-native\";\n\nimport Svg, { Path } from \"react-native-svg\";\n\nexport const FileIcon = ({\n style,\n fill = \"currentColor\",\n}: {\n style?: ViewStyle;\n fill?: string;\n}) => {\n return (\n <Svg style={style} viewBox=\"0 0 24 24\">\n <Path fill={fill} d=\"M13 4H6v16h12V9h-5z\" opacity=\".3\" />\n <Path\n fill={fill}\n d=\"m20 8l-6-6H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2zm-2 12H6V4h7v5h5z\"\n />\n </Svg>\n );\n};\n","import React from 'react';\nimport { StyleProp, Text, TextStyle } from 'react-native';\nimport { useChatContext } from '../../context/ChatContext';\nimport { withFontFamily } from '../../utils/theme';\n\nconst TruncateFileName = ({\n fileName,\n style,\n}: {\n fileName: string;\n style?: StyleProp<TextStyle>;\n}) => {\n const { theme } = useChatContext();\n const getTruncatedName = (fullName: string) => {\n const lastDot = fullName.lastIndexOf('.');\n if (lastDot === -1) return fullName;\n const name = fullName.slice(0, lastDot);\n const ext = fullName.slice(lastDot);\n const maxLength = 40;\n if (name.length > maxLength) {\n return name.slice(0, maxLength) + '...' + ext;\n }\n return name + ext;\n };\n return (\n <Text\n numberOfLines={2}\n ellipsizeMode=\"tail\"\n style={withFontFamily(\n [{ fontSize: 14, fontWeight: '600', color: 'black' }, style],\n theme?.fontFamily\n )}\n >\n {getTruncatedName(fileName)}\n </Text>\n );\n};\n\nexport default React.memo(TruncateFileName);","import React from 'react';\nimport { Image, Pressable, ScrollView, Text, View } from 'react-native';\nimport Video from 'react-native-video';\nimport { FileIcon } from '../../assets/Icons/FileIcon';\nimport { useChatContext } from '../../context/ChatContext';\nimport type { MessageMediaItem, PreviewAttachment } from '../../types';\nimport { withFontFamily } from '../../utils/theme';\nimport TruncateFileName from './TruncateFileName';\n\nfunction previewsToMediaItems(\n previews: PreviewAttachment[]\n): MessageMediaItem[] {\n return previews\n .filter((p) => p.type?.startsWith('image/') || p.type?.startsWith('video/'))\n .map((p) => ({\n uri: p.uri,\n kind: p.type.startsWith('video/') ? 'video' : 'image',\n }));\n}\n\ninterface FilePreviewProps {\n previews: PreviewAttachment[];\n closePreview?: () => void;\n /** Remove a single item by URI. When provided each card gets its own × button. */\n onRemoveItem?: (uri: string) => void;\n CustomFileIcon?: React.ComponentType<{ style?: any }>;\n CustomImagePreview?: React.ComponentType<{ uri: string }>;\n CustomVideoPreview?: React.ComponentType<{ uri: string }>;\n inputHeight?: number;\n}\n\nconst CARD = 56;\nconst FAN_OVERLAP = 18;\n\nconst FilePreview: React.FC<FilePreviewProps> = ({\n previews,\n closePreview,\n onRemoveItem,\n CustomFileIcon,\n CustomImagePreview,\n CustomVideoPreview,\n inputHeight,\n}) => {\n const { theme, setMediaViewerGallery } = useChatContext();\n\n const media = previews.filter(\n (p) => p.type?.startsWith('image/') || p.type?.startsWith('video/')\n );\n const docs = previews.filter(\n (p) => !p.type?.startsWith('image/') && !p.type?.startsWith('video/')\n );\n\n const mediaAsItems = previewsToMediaItems(previews);\n\n if (previews.length === 0) return null;\n\n const openGalleryAt = (index: number) => {\n if (mediaAsItems.length === 0) return;\n setMediaViewerGallery(mediaAsItems, index);\n };\n\n const renderMediaThumb = (p: PreviewAttachment, size = CARD) => {\n const isImage = p.type?.startsWith('image/');\n const isVideo = p.type?.startsWith('video/');\n if (isImage && CustomImagePreview) {\n return <CustomImagePreview uri={p.uri} />;\n }\n if (isVideo && CustomVideoPreview) {\n return <CustomVideoPreview uri={p.uri} />;\n }\n if (isImage) {\n return (\n <Image\n source={{ uri: p.uri }}\n style={{\n width: size,\n height: size,\n borderRadius: 12,\n }}\n resizeMode=\"cover\"\n />\n );\n }\n if (isVideo) {\n return (\n <View\n style={{\n width: size,\n height: size,\n borderRadius: 12,\n overflow: 'hidden',\n }}\n >\n <Video\n source={{ uri: p.uri }}\n style={{ width: '100%', height: '100%' }}\n resizeMode=\"cover\"\n muted\n repeat\n paused={false}\n pointerEvents=\"none\"\n playInBackground={false}\n playWhenInactive={false}\n />\n </View>\n );\n }\n return null;\n };\n\n\n const renderCloseBtn = (uri: string, counterRotate?: string) => (\n <Pressable\n onPress={() => (onRemoveItem ? onRemoveItem(uri) : closePreview?.())}\n style={{\n position: 'absolute',\n zIndex: 50,\n height: 22,\n width: 22,\n backgroundColor: 'rgba(0,0,0,0.55)',\n right: -6,\n top: -6,\n borderRadius: 11,\n justifyContent: 'center',\n alignItems: 'center',\n transform: counterRotate ? [{ rotate: counterRotate }] : undefined,\n }}\n >\n <Text\n style={withFontFamily(\n { fontSize: 13, color: 'white', fontWeight: '700', lineHeight: 14 },\n theme?.fontFamily\n )}\n >\n ×\n </Text>\n </Pressable>\n );\n\n const renderMediaSection = () => {\n if (media.length === 0) return null;\n\n if (media.length === 1) {\n const p = media[0];\n if (!p) return null;\n return (\n <Pressable onPress={() => openGalleryAt(0)} style={{ position: 'relative' }}>\n {renderMediaThumb(p)}\n {renderCloseBtn(p.uri)}\n </Pressable>\n );\n }\n\n const slice = media.slice(0, 3);\n const extraOnThird = media.length > 3 ? media.length - 3 : 0;\n\n return (\n <View\n style={{\n flexDirection: 'row',\n alignItems: 'center',\n minHeight: CARD + 12,\n }}\n >\n {slice.map((p, idx) => {\n const rot =\n slice.length === 2\n ? idx === 0\n ? '-4deg'\n : '4deg'\n : idx === 0\n ? '-10deg'\n : idx === 1\n ? '0deg'\n : '10deg';\n\n // Negate the card rotation so the × button stays visually upright\n const counterRot =\n slice.length === 2\n ? idx === 0\n ? '4deg'\n : '-4deg'\n : idx === 0\n ? '10deg'\n : idx === 1\n ? '0deg'\n : '-10deg';\n\n return (\n <Pressable\n key={`${p.uri}-${idx}`}\n onPress={() => {\n const items = previewsToMediaItems(media);\n const i = items.findIndex((x) => x.uri === p.uri);\n openGalleryAt(i >= 0 ? i : 0);\n }}\n style={{\n marginLeft: idx === 0 ? 0 : -FAN_OVERLAP,\n zIndex: idx + 1,\n transform: [{ rotate: rot }],\n position: 'relative',\n }}\n >\n <View style={{ position: 'relative' }}>\n {renderMediaThumb(p)}\n {idx === 2 && extraOnThird > 0 && (\n <View\n style={{\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n borderRadius: 12,\n backgroundColor: 'rgba(0,0,0,0.55)',\n alignItems: 'center',\n justifyContent: 'center',\n }}\n >\n <Text\n style={{ color: '#fff', fontWeight: '700', fontSize: 14 }}\n >\n +{extraOnThird}\n </Text>\n </View>\n )}\n {renderCloseBtn(p.uri, counterRot)}\n </View>\n </Pressable>\n );\n })}\n </View>\n );\n };\n\n // Each doc card: minHeight 64 + gap 8. Show at most 3 before scrolling.\n const DOC_CARD_H = 72; // 64 min + a bit of padding room\n const docsMaxHeight = DOC_CARD_H * 3 + 8 * 2; // 3 cards + 2 gaps\n\n const renderDocCard = (doc: PreviewAttachment, di: number) => (\n <View\n key={`${doc.uri}-${di}`}\n style={{ position: 'relative' }}\n >\n <View\n style={[\n {\n backgroundColor: 'white',\n width: 240,\n minHeight: 64,\n borderRadius: 12,\n flexDirection: 'row',\n padding: 4,\n gap: 4,\n alignItems: 'center',\n },\n theme?.filePreviewStyle?.container,\n ]}\n >\n <View\n style={[\n {\n backgroundColor: '#d1d5db',\n borderRadius: 8,\n padding: 4,\n justifyContent: 'center',\n alignItems: 'center',\n },\n theme?.filePreviewStyle?.iconContainer,\n ]}\n >\n {CustomFileIcon ? (\n <CustomFileIcon />\n ) : (\n <FileIcon style={{ width: 40, height: 40 }} fill=\"white\" />\n )}\n </View>\n <View\n style={[\n {\n backgroundColor: '#f3f4f6',\n flex: 1,\n borderRadius: 8,\n justifyContent: 'center',\n paddingHorizontal: 12,\n },\n theme?.filePreviewStyle?.nameContainer,\n ]}\n >\n <TruncateFileName\n fileName={doc.name || 'File'}\n style={theme?.filePreviewStyle?.text}\n />\n </View>\n </View>\n {renderCloseBtn(doc.uri)}\n </View>\n );\n\n return (\n <View\n style={[\n {\n position: 'absolute',\n bottom: (inputHeight ?? 0) + 8,\n zIndex: 20,\n borderRadius: 12,\n maxWidth: '92%',\n alignSelf: 'flex-start',\n },\n theme?.filePreviewStyle?.root,\n ]}\n >\n <View style={{ gap: 8 }}>\n {renderMediaSection()}\n {docs.length > 0 && (\n <ScrollView\n scrollEnabled={docs.length > 3}\n style={{ maxHeight: docsMaxHeight }}\n showsVerticalScrollIndicator={docs.length > 3}\n contentContainerStyle={{ gap: 8 }}\n nestedScrollEnabled\n >\n {docs.map((doc, di) => renderDocCard(doc, di))}\n </ScrollView>\n )}\n </View>\n </View>\n );\n};\n\nexport default React.memo(FilePreview);\n","import React, {\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { Platform, Pressable, TextInput, View } from 'react-native';\nimport tw from 'twrnc';\nimport { CameraIcon } from '../../assets/Icons/CameraIcon';\nimport { EmojiFunnySquareIcon } from '../../assets/Icons/EmojiFunnySquareIcon';\nimport { MicrophoneIcon } from '../../assets/Icons/MicrophoneIcon';\nimport { PaperClipIcon } from '../../assets/Icons/PaperClipIcon';\nimport { PaperPlaneIcon } from '../../assets/Icons/PaperPlaneIcon';\nimport { useChatContext } from '../../context/ChatContext';\nimport { useVoiceRecorder } from '../../hooks/useVoiceRecorder';\nimport { RecordingResult, VoiceRecorderExposedState } from '../../types';\nimport {\n getInputBarIconPixelSize,\n getInputBarIconStyle,\n withFontFamily,\n} from '../../utils/theme';\nimport { VoiceRecorderFlow } from '../VoiceRecorder/VoiceRecorderFlow';\nimport FilePreview from './FilePreview';\nimport { ChatInputProps, InputHeightState } from './types';\n\n// ─── Layout constants ─────────────────────────────────────────────────────────\nconst MIN_INPUT_HEIGHT = Platform.OS === 'ios' ? 32 : 30;\nconst MAX_INPUT_HEIGHT = 118;\nconst INPUT_BAR_SHELL_HEIGHT = Platform.OS === 'ios' ? 50 : 48;\n\nconst SEND_ICON_CLASS = 'h-6 w-6';\nconst MIC_ICON_CLASS = 'h-8 w-8';\n\n// ─── Component ────────────────────────────────────────────────────────────────\nconst ChatInput: React.FC<ChatInputProps> = ({\n onSendMessage,\n onTypingStart,\n onTypingEnd,\n onAttachmentPress,\n onCameraPress,\n onAudioRecordStart,\n onAudioRecordEnd,\n CustomEmojiIcon,\n CustomAttachmentIcon,\n CustomCameraIcon,\n CustomSendIcon,\n CustomMicrophoneIcon,\n CustomFileIcon,\n CustomImagePreview,\n CustomVideoPreview,\n}) => {\n // ── Text input state ───────────────────────────────────────────────────────\n const [inputText, setInputText] = useState('');\n const [inputResetKey, setInputResetKey] = useState(0);\n const [inputHeight, setInputHeight] = useState<InputHeightState>({\n height: MIN_INPUT_HEIGHT,\n isMultiline: false,\n });\n\n const {\n theme,\n currentUserId,\n showEmojiButton,\n showAttachmentsButton,\n showCameraButton,\n showVoiceRecordButton,\n placeholder,\n previewData,\n previewItems,\n closePreview,\n onRemovePreviewItem,\n voiceRecorderProps,\n recordingUIProps,\n renderVoiceRecorder,\n } = useChatContext();\n\n // ── Preview list ───────────────────────────────────────────────────────────\n const previewList = useMemo(() => {\n if (previewItems?.length) return previewItems;\n if (previewData) return [previewData];\n return [];\n }, [previewItems, previewData]);\n\n const hasPreviewAttachments = previewList.length > 0;\n\n // ── Icon sizing ────────────────────────────────────────────────────────────\n const inputBarIconSize = theme?.sizes?.inputIconSize;\n const inputBarIconStyle = getInputBarIconStyle(inputBarIconSize);\n const iconPixelSize = getInputBarIconPixelSize(inputBarIconSize);\n\n const isCompactInput =\n inputText.trim().length === 0 && !inputHeight.isMultiline;\n\n const iconInset = Math.max(0, (INPUT_BAR_SHELL_HEIGHT - iconPixelSize) / 2);\n const iconSlotStyle = isCompactInput\n ? { paddingTop: iconInset, paddingBottom: iconInset }\n : { paddingBottom: iconInset };\n\n // ── Text input handlers ────────────────────────────────────────────────────\n const resetInputLayout = useCallback(() => {\n setInputHeight({ height: MIN_INPUT_HEIGHT, isMultiline: false });\n setInputResetKey((k) => k + 1);\n }, []);\n\n const handleChangeText = useCallback(\n (text: string) => {\n setInputText(text);\n if (text.length === 0) resetInputLayout();\n },\n [resetInputLayout]\n );\n\n const handleContentSizeChange = useCallback(\n (event: { nativeEvent: { contentSize: { height: number } } }) => {\n const newHeight = Math.min(\n Math.max(event.nativeEvent.contentSize.height, MIN_INPUT_HEIGHT),\n MAX_INPUT_HEIGHT\n );\n const isMultiline = newHeight > MIN_INPUT_HEIGHT;\n setInputHeight({\n height: isMultiline ? newHeight : MIN_INPUT_HEIGHT,\n isMultiline,\n });\n },\n []\n );\n\n const handleSendMessage = useCallback(() => {\n const trimmedText = inputText.trim();\n if (!trimmedText && !hasPreviewAttachments) return;\n onSendMessage({ text: trimmedText, senderId: currentUserId });\n setInputText('');\n resetInputLayout();\n }, [\n inputText,\n onSendMessage,\n currentUserId,\n hasPreviewAttachments,\n resetInputLayout,\n ]);\n\n useEffect(() => {\n if (inputText.trim()) onTypingStart?.();\n else onTypingEnd?.();\n }, [inputText, onTypingStart, onTypingEnd]);\n\n const showSendButton = !!inputText.trim() || hasPreviewAttachments;\n\n // ── Voice recorder (audio engine) ──────────────────────────────────────────\n const onRecordEnd = useCallback(\n (result: RecordingResult) => {\n onAudioRecordEnd?.(result);\n },\n [onAudioRecordEnd]\n );\n\n const recorder = useVoiceRecorder({\n maxDuration: voiceRecorderProps?.maxDuration ?? 300,\n onRecordStart: onAudioRecordStart,\n onRecordEnd,\n });\n\n const recorderRef = useRef(recorder);\n recorderRef.current = recorder;\n\n // VoiceRecorderFlow → audio engine wiring\n const handleFlowRecordingStart = useCallback(() => {\n recorderRef.current.startRecording();\n }, []);\n\n const handleFlowSend = useCallback(async () => {\n const result = await recorderRef.current.stopRecording();\n if (result) {\n onSendMessage({ audio: result.uri, senderId: currentUserId });\n }\n }, [onSendMessage, currentUserId]);\n\n const handleFlowCancel = useCallback(() => {\n recorderRef.current.cancelRecording();\n }, []);\n\n // Theme colors for flow\n const recordingPrimary =\n recordingUIProps?.recordingSendButtonBackground ??\n (theme?.inputStyles?.sendButtonStyle?.backgroundColor as string) ??\n '#22C55E';\n const recordingBackground =\n recordingUIProps?.recordingBackground ?? '#0B141A';\n const recordingTimerColor =\n recordingUIProps?.timerColor ?? '#FFFFFF';\n const recordingMicColor =\n recordingUIProps?.longPressMicColor ??\n theme?.colors?.sendIconsColor ??\n '#FFFFFF';\n const recordingWaveformColor =\n recordingUIProps?.waveformColor ?? '#E9EDEF';\n\n // ── Custom voice UI override (back-compat for renderVoiceRecorder) ─────────\n const exposedState: VoiceRecorderExposedState = {\n isRecording: recorder.isRecording,\n isPaused: recorder.isPaused,\n duration: recorder.duration,\n isLocked: false,\n slideOffset: { x: 0, y: 0 },\n waveformData: [],\n startRecording: recorder.startRecording,\n stopRecording: recorder.stopRecording,\n pauseRecording: recorder.pauseRecording,\n resumeRecording: recorder.resumeRecording,\n cancelRecording: recorder.cancelRecording,\n };\n\n const customVoiceUI = renderVoiceRecorder\n ? renderVoiceRecorder(exposedState)\n : null;\n\n const showFlowMicSpacer = !showSendButton && showVoiceRecordButton;\n\n // ── Render ─────────────────────────────────────────────────────────────────\n return (\n <View style={tw`w-full px-2 relative`}>\n {hasPreviewAttachments && (\n <FilePreview\n previews={previewList}\n closePreview={closePreview}\n onRemoveItem={onRemovePreviewItem}\n CustomFileIcon={CustomFileIcon}\n CustomImagePreview={CustomImagePreview}\n CustomVideoPreview={CustomVideoPreview}\n inputHeight={inputHeight.height}\n />\n )}\n\n <View\n style={[\n tw`flex-row items-end gap-2`,\n theme?.inputStyles?.inputSectionContainerStyle,\n ]}\n >\n {/* ── Text input pill ── */}\n <View\n style={[\n tw`flex-1 flex-row bg-white overflow-hidden px-3.5`,\n {\n minHeight: INPUT_BAR_SHELL_HEIGHT,\n borderRadius: isCompactInput ? 9999 : 24,\n alignItems: isCompactInput ? 'center' : 'flex-end',\n },\n theme?.inputStyles?.inputContainerStyle,\n ]}\n >\n {showEmojiButton && (\n <View style={iconSlotStyle}>\n <Pressable>\n {CustomEmojiIcon ? (\n <CustomEmojiIcon />\n ) : (\n <EmojiFunnySquareIcon\n style={inputBarIconStyle}\n color={\n theme?.colors?.inputsIconsColor || 'rgba(0,0,0,0.7)'\n }\n />\n )}\n </Pressable>\n </View>\n )}\n\n <TextInput\n key={`chat-input-${inputResetKey}`}\n value={inputText}\n onChangeText={handleChangeText}\n placeholder={placeholder || 'Message'}\n style={withFontFamily(\n [\n tw`bg-transparent flex-1 pl-2`,\n Platform.OS === 'ios' ? tw`text-[17px]` : tw`text-[16px]`,\n {\n minHeight: MIN_INPUT_HEIGHT,\n maxHeight: MAX_INPUT_HEIGHT,\n paddingVertical: isCompactInput ? 0 : 8,\n marginVertical: isCompactInput\n ? (INPUT_BAR_SHELL_HEIGHT - MIN_INPUT_HEIGHT) / 2\n : 4,\n },\n {\n color:\n theme?.colors?.inputTextColor || 'rgba(0, 0, 0, 0.87)',\n },\n ],\n theme?.fontFamily\n )}\n placeholderTextColor={\n theme?.colors?.placeholderTextColor || 'rgba(0, 0, 0, 0.4)'\n }\n multiline\n textAlignVertical={\n inputHeight.isMultiline && inputText.length > 0\n ? 'top'\n : 'center'\n }\n onContentSizeChange={handleContentSizeChange}\n />\n\n <View style={[tw`flex-row items-center gap-4`, iconSlotStyle]}>\n {showAttachmentsButton && (\n <Pressable onPress={onAttachmentPress}>\n {CustomAttachmentIcon ? (\n <CustomAttachmentIcon />\n ) : (\n <PaperClipIcon\n style={inputBarIconStyle}\n color={\n theme?.colors?.inputsIconsColor || 'rgba(0,0,0,0.7)'\n }\n />\n )}\n </Pressable>\n )}\n {showCameraButton && !inputText.trim() && (\n <Pressable onPress={onCameraPress}>\n {CustomCameraIcon ? (\n <CustomCameraIcon />\n ) : (\n <CameraIcon\n style={inputBarIconStyle}\n color={\n theme?.colors?.inputsIconsColor || 'rgba(0,0,0,0.7)'\n }\n />\n )}\n </Pressable>\n )}\n </View>\n </View>\n\n {/* ── Right action button ── */}\n {showSendButton ? (\n <Pressable\n onPress={handleSendMessage}\n style={[\n tw`rounded-full justify-center items-center`,\n {\n height: INPUT_BAR_SHELL_HEIGHT,\n width: INPUT_BAR_SHELL_HEIGHT,\n backgroundColor: '#16a34a',\n ...theme?.inputStyles?.sendButtonStyle,\n },\n ]}\n >\n {CustomSendIcon ? (\n <CustomSendIcon />\n ) : (\n <PaperPlaneIcon\n style={tw.style(SEND_ICON_CLASS)}\n color={theme?.colors?.sendIconsColor || 'rgba(255,255,255,0.7)'}\n />\n )}\n </Pressable>\n ) : showFlowMicSpacer && !customVoiceUI ? (\n // Reserve space for VoiceRecorderFlow's overlaid mic button\n <View\n style={{\n height: INPUT_BAR_SHELL_HEIGHT,\n width: INPUT_BAR_SHELL_HEIGHT,\n }}\n pointerEvents=\"none\"\n />\n ) : showVoiceRecordButton && customVoiceUI ? (\n // Custom UI provides its own trigger; render a placeholder mic\n // that does nothing visible if the custom UI handles its own button.\n <View\n style={{\n height: INPUT_BAR_SHELL_HEIGHT,\n width: INPUT_BAR_SHELL_HEIGHT,\n justifyContent: 'center',\n alignItems: 'center',\n }}\n >\n {CustomMicrophoneIcon ? (\n <CustomMicrophoneIcon />\n ) : (\n <MicrophoneIcon\n style={tw.style(MIC_ICON_CLASS)}\n color={theme?.colors?.sendIconsColor || 'rgba(255,255,255,0.7)'}\n />\n )}\n </View>\n ) : (\n <Pressable\n onPress={handleSendMessage}\n style={[\n tw`rounded-full justify-center items-center`,\n {\n height: INPUT_BAR_SHELL_HEIGHT,\n width: INPUT_BAR_SHELL_HEIGHT,\n backgroundColor: '#16a34a',\n ...theme?.inputStyles?.sendButtonStyle,\n },\n ]}\n >\n {CustomSendIcon ? (\n <CustomSendIcon />\n ) : (\n <PaperPlaneIcon\n style={tw.style(SEND_ICON_CLASS)}\n color={theme?.colors?.sendIconsColor || 'rgba(255,255,255,0.7)'}\n />\n )}\n </Pressable>\n )}\n </View>\n\n {/* ── Voice recorder overlay ── */}\n {customVoiceUI ?? (\n showVoiceRecordButton && (\n <VoiceRecorderFlow\n primaryColor={recordingPrimary}\n backgroundColor={recordingBackground}\n timerColor={recordingTimerColor}\n microphoneColor={recordingMicColor}\n waveformColor={recordingWaveformColor}\n onRecordingStart={handleFlowRecordingStart}\n onSend={handleFlowSend}\n onCancel={handleFlowCancel}\n onDelete={handleFlowCancel}\n />\n )\n )}\n </View>\n );\n};\n\nexport default React.memo(ChatInput);\n","import { ViewStyle } from 'react-native';\nimport { Line, Svg } from 'react-native-svg';\nimport tw from 'twrnc';\n\nexport function XIcon({ style }: { style?: ViewStyle }) {\n return (\n <Svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"black\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={tw.style('h-6 w-6 text-black', style)}\n >\n <Line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <Line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </Svg>\n );\n}\n","import React, { useCallback, useEffect, useRef, useState } from 'react';\nimport {\n FlatList,\n Image,\n Modal,\n NativeScrollEvent,\n NativeSyntheticEvent,\n Pressable,\n Text,\n View,\n useWindowDimensions,\n} from 'react-native';\nimport Video, { VideoRef } from 'react-native-video';\nimport tw from 'twrnc';\nimport { LoadingIcon } from '../../assets/Icons/LoadingIcon';\nimport { XIcon } from '../../assets/Icons/XIcon';\nimport { useChatContext } from '../../context/ChatContext';\nimport type { MessageMediaItem } from '../../types';\nimport { withFontFamily } from '../../utils/theme';\n\nexport interface MediaViewerProps {\n gallery: { items: MessageMediaItem[]; initialIndex: number } | null;\n onClose: () => void;\n}\n\nconst MediaViewer: React.FC<MediaViewerProps> = ({ gallery, onClose }) => {\n const { theme, setIsVideoPlaying } = useChatContext();\n const listRef = useRef<FlatList<MessageMediaItem>>(null);\n const initialIndex = gallery?.initialIndex ?? 0;\n const [pageIndex, setPageIndex] = useState(initialIndex);\n const { width, height: windowHeight } = useWindowDimensions();\n\n useEffect(() => {\n if (!gallery?.items.length) return;\n const idx = gallery.initialIndex;\n setPageIndex(idx);\n const item = gallery.items[idx];\n setIsVideoPlaying(item?.kind === 'video');\n\n requestAnimationFrame(() => {\n try {\n listRef.current?.scrollToIndex({\n index: idx,\n animated: false,\n });\n } catch {\n /* layout not ready */\n }\n });\n }, [gallery?.initialIndex, gallery?.items, setIsVideoPlaying]);\n\n const handleClose = useCallback(() => {\n setIsVideoPlaying(false);\n onClose();\n }, [onClose, setIsVideoPlaying]);\n\n const onMomentumScrollEnd = useCallback(\n (e: NativeSyntheticEvent<NativeScrollEvent>) => {\n const idx = Math.round(e.nativeEvent.contentOffset.x / width);\n setPageIndex(idx);\n const item = gallery?.items[idx];\n setIsVideoPlaying(item?.kind === 'video');\n },\n [gallery?.items, width, setIsVideoPlaying]\n );\n\n if (!gallery || gallery.items.length === 0) return null;\n\n return (\n <Modal\n visible\n transparent\n animationType=\"fade\"\n onRequestClose={handleClose}\n statusBarTranslucent\n >\n <View style={[tw`flex-1 bg-black`, { width, height: windowHeight }]}>\n <Pressable\n onPress={handleClose}\n style={tw`absolute right-4 top-12 z-20 p-2 rounded-full bg-slate-100/70`}\n >\n <XIcon style={tw`h-8 w-8`} />\n </Pressable>\n\n {gallery.items.length > 1 && (\n <View style={tw`absolute top-14 left-0 right-0 z-10 items-center`}>\n <Text\n style={withFontFamily(\n tw`text-white/90 text-sm bg-black/40 px-3 py-1 rounded-full`,\n theme?.fontFamily\n )}\n >\n {pageIndex + 1} / {gallery.items.length}\n </Text>\n </View>\n )}\n\n <FlatList\n ref={listRef}\n data={gallery.items}\n horizontal\n pagingEnabled\n showsHorizontalScrollIndicator={false}\n keyExtractor={(item, i) => `${item.uri}-${i}`}\n initialScrollIndex={gallery.initialIndex}\n extraData={pageIndex}\n getItemLayout={(_, index) => ({\n length: width,\n offset: width * index,\n index,\n })}\n onMomentumScrollEnd={onMomentumScrollEnd}\n onScrollToIndexFailed={({ index }) => {\n setTimeout(() => {\n listRef.current?.scrollToIndex({ index, animated: false });\n }, 100);\n }}\n renderItem={({ item, index }) => (\n <ViewerPage\n item={item}\n width={width}\n height={windowHeight}\n isActive={index === pageIndex}\n autoPlayVideo={index === initialIndex && item.kind === 'video'}\n />\n )}\n />\n </View>\n </Modal>\n );\n};\n\nconst ViewerPage: React.FC<{\n item: MessageMediaItem;\n width: number;\n height: number;\n isActive: boolean;\n /** Only true for the item the user tapped — not other pages in the album */\n autoPlayVideo: boolean;\n}> = ({ item, width, height, isActive, autoPlayVideo }) => {\n const { theme } = useChatContext();\n const videoRef = useRef<VideoRef>(null);\n const [loading, setLoading] = useState(item.kind === 'video');\n const [error, setError] = useState(false);\n\n const shouldPlayVideo =\n item.kind === 'video' && isActive && autoPlayVideo;\n\n if (item.kind === 'image') {\n return (\n <View style={{ width, height, justifyContent: 'center' }}>\n <Image\n source={{ uri: item.uri }}\n style={{ width, height }}\n resizeMode=\"contain\"\n />\n </View>\n );\n }\n\n return (\n <View\n style={{\n width,\n height,\n justifyContent: 'center',\n alignItems: 'center',\n paddingHorizontal: 16,\n }}\n >\n <Video\n source={{ uri: item.uri }}\n ref={videoRef}\n controls\n paused={!shouldPlayVideo}\n shutterColor=\"transparent\"\n playInBackground={false}\n playWhenInactive={false}\n style={{\n width: width - 32,\n height: height * 0.55,\n backgroundColor: '#000',\n }}\n resizeMode=\"contain\"\n onLoadStart={() => {\n setLoading(true);\n setError(false);\n }}\n onLoad={() => setLoading(false)}\n onBuffer={({ isBuffering }) => setLoading(isBuffering)}\n onError={() => {\n setError(true);\n setLoading(false);\n }}\n />\n {loading && (\n <View\n style={tw`absolute inset-0 items-center justify-center`}\n pointerEvents=\"none\"\n >\n <LoadingIcon style={tw.style('h-14 w-14')} spinning />\n </View>\n )}\n {error && (\n <View style={tw`absolute inset-0 items-center justify-center px-6`}>\n <Text\n style={withFontFamily(\n tw`text-white font-semibold`,\n theme?.fontFamily\n )}\n >\n Failed to load video\n </Text>\n </View>\n )}\n </View>\n );\n};\n\nexport default React.memo(MediaViewer);\n","import { Image, Text, View } from 'react-native';\nimport tw from 'twrnc';\nimport { ArrowBack2RoundedIcon } from '../../assets/Icons/ArrowBack2RoundedIcon';\nimport { useChatContext } from '../../context/ChatContext';\nimport { withFontFamily } from '../../utils/theme';\n\nexport interface TypingUser {\n id: string;\n avatar: string;\n name: string;\n}\n\ninterface TypingIndicatorProps {\n typingUsers: TypingUser[];\n currentUserId: string;\n}\n\nexport const TypingIndicator = ({\n typingUsers,\n currentUserId,\n}: TypingIndicatorProps) => {\n const { theme, showAvatars, renderCustomTyping, showBubbleTail, typingText } =\n useChatContext();\n\n const otherTypingUsers = typingUsers.filter(\n (user) => user.id !== currentUserId\n );\n\n if (!otherTypingUsers.length) return null;\n\n const displayedUsers = otherTypingUsers.slice(0, 2);\n const additionalUsers = otherTypingUsers.length - 2;\n\n // Number of visible circles (up to 2 user avatars + optional \"+N\")\n const numCircles = showAvatars\n ? displayedUsers.length + (additionalUsers > 0 ? 1 : 0)\n : 0;\n\n // Width of avatar group: first is 24px, each extra adds 14px (24 - 10px overlap)\n const avatarGroupW = numCircles > 0 ? 24 + Math.max(0, numCircles - 1) * 14 : 0;\n\n // marginLeft = avatarGroupW + 12 keeps the same 4px visual gap as regular\n // received chat bubbles (px-2 = 8px padding + 4px gap). For 1 avatar this\n // equals exactly 36px = ml-9, matching ChatBubble.tsx perfectly.\n const bubbleMarginLeft = numCircles > 0 ? avatarGroupW + 12 : 8;\n\n // Avatar group left from content area (inside px-2 padding = 8px)\n const avatarLeft = -(avatarGroupW + 12);\n\n return (\n <View\n style={[\n tw`px-2 my-1 bg-white rounded-tl-none rounded-lg relative max-w-[75%] self-start`,\n { marginLeft: bubbleMarginLeft },\n theme?.bubbleStyle?.typingContainerStyle,\n ]}\n >\n {showAvatars && numCircles > 0 && (\n <View\n style={{\n position: 'absolute',\n top: 0,\n left: avatarLeft,\n flexDirection: 'row',\n }}\n >\n {displayedUsers.map((user, index) => (\n <View\n key={user.id}\n style={[\n tw`bg-gray-400 w-6 h-6 rounded-full items-center`,\n {\n marginLeft: index > 0 ? -10 : 0,\n zIndex: displayedUsers.length + index,\n },\n ]}\n >\n {user.avatar ? (\n <Image\n source={{ uri: user.avatar }}\n style={[\n tw`w-full h-full object-cover rounded-full`,\n theme?.bubbleStyle?.avatarImageStyle,\n ]}\n />\n ) : (\n <Text\n style={withFontFamily(\n [\n tw`text-sm text-black font-semibold capitalize rounded-full bg-zinc-300 w-full h-full text-center pt-0.5`,\n theme?.bubbleStyle?.avatarTextStyle,\n ],\n theme?.fontFamily\n )}\n >\n {user.name?.charAt(0)}\n </Text>\n )}\n </View>\n ))}\n {additionalUsers > 0 && (\n <View\n style={[\n tw`bg-gray-400 w-6 h-6 rounded-full items-center justify-center`,\n { marginLeft: -10, zIndex: 3 },\n { ...theme?.bubbleStyle?.additionalTypingUsersContainerStyle },\n ]}\n >\n <Text\n style={withFontFamily(\n [\n tw`text-white text-xs font-semibold`,\n theme?.bubbleStyle?.additionalTypingUsersTextStyle,\n ],\n theme?.fontFamily\n )}\n >\n +{additionalUsers}\n </Text>\n </View>\n )}\n </View>\n )}\n\n {showBubbleTail && (\n <ArrowBack2RoundedIcon\n style={tw.style('absolute -top-[3px] w-6 h-6 rotate-180 -left-3.5 mt-[1.5px]')}\n color={theme?.colors?.receivedMessageTailColor || 'white'}\n />\n )}\n\n {renderCustomTyping ? (\n renderCustomTyping()\n ) : (\n <View style={tw`flex-row items-center py-3 px-2 justify-center`}>\n <Text\n style={withFontFamily(\n [tw`text-gray-600`, theme?.bubbleStyle?.typingTextStyle],\n theme?.fontFamily\n )}\n >\n {typingText ?? 'Typing...'}\n </Text>\n </View>\n )}\n </View>\n );\n};\n","import React, { ReactNode, useEffect, useRef, useState } from 'react';\nimport { Pressable, StyleSheet, Text, View, ViewStyle } from 'react-native';\nimport Animated, {\n Easing,\n useAnimatedStyle,\n useSharedValue,\n withRepeat,\n withSequence,\n withTiming,\n} from 'react-native-reanimated';\nimport { PaperPlaneIcon } from '../../assets/Icons/PaperPlaneIcon';\nimport { TrashIcon } from '../../assets/Icons/TrashIcon';\nimport { formatDuration } from '../../utils/datefunc';\n\nexport interface VoiceRecorderProps {\n /** App primary color used for the circular send button. */\n primaryColor?: string;\n /** Bar background color. */\n backgroundColor?: string;\n /** Color of the animated waveform bars. */\n waveformColor?: string;\n /** Color of the running timer. */\n timerColor?: string;\n /** Override the send-button background. Falls back to `primaryColor`. */\n sendButtonColor?: string;\n /** Stroke color of the trash / delete icon. */\n deleteIconColor?: string;\n\n /** Container height. Default `110`. */\n height?: number;\n /** Top corner radius. Bottom corners always stay square. Default `18`. */\n borderRadius?: number;\n\n /** Number of bars rendered inside the waveform. Default `28`. */\n waveCount?: number;\n /** Horizontal gap between waveform bars. Default `3`. */\n waveSpacing?: number;\n /** Width of each waveform bar. Default `3`. */\n waveWidth?: number;\n\n /** Override the entire delete icon (keeps press handling intact). */\n renderDeleteIcon?: () => ReactNode;\n /** Override the entire send icon (keeps press handling intact). */\n renderSendIcon?: () => ReactNode;\n /** Replace the built-in waveform with any node. */\n renderWaveform?: () => ReactNode;\n\n /** Fired when the user taps the send button. */\n onSend?: () => void;\n /** Fired when the user taps the trash / cancel icon. */\n onDelete?: () => void;\n}\n\nconst DEFAULT_BG = '#0B141A';\nconst DEFAULT_PRIMARY = '#22C55E';\nconst DEFAULT_WAVEFORM = '#E9EDEF';\nconst DEFAULT_TIMER = '#FFFFFF';\nconst DEFAULT_DELETE = '#8696A0';\nconst PAUSE_BAR_COLOR = '#F15C6D';\n\nconst WAVEFORM_HEIGHT = 36;\nconst WAVEFORM_WIDTH = 200;\nconst SEND_SIZE = 72;\nconst DELETE_SIZE = 26;\n\nexport const VoiceRecorder: React.FC<VoiceRecorderProps> = ({\n primaryColor = DEFAULT_PRIMARY,\n backgroundColor = DEFAULT_BG,\n waveformColor = DEFAULT_WAVEFORM,\n timerColor = DEFAULT_TIMER,\n sendButtonColor,\n deleteIconColor = DEFAULT_DELETE,\n height = 110,\n borderRadius = 18,\n waveCount = 28,\n waveSpacing = 3,\n waveWidth = 3,\n renderDeleteIcon,\n renderSendIcon,\n renderWaveform,\n onSend,\n onDelete,\n}) => {\n const [duration, setDuration] = useState(0);\n const startedAt = useRef<number>(Date.now());\n\n useEffect(() => {\n startedAt.current = Date.now();\n const id = setInterval(() => {\n setDuration((Date.now() - startedAt.current) / 1000);\n }, 250);\n return () => clearInterval(id);\n }, []);\n\n const sendScale = useSharedValue(1);\n const pauseOpacity = useSharedValue(1);\n\n useEffect(() => {\n sendScale.value = withRepeat(\n withSequence(\n withTiming(1.05, {\n duration: 900,\n easing: Easing.inOut(Easing.ease),\n }),\n withTiming(1, { duration: 900, easing: Easing.inOut(Easing.ease) })\n ),\n -1,\n false\n );\n\n pauseOpacity.value = withRepeat(\n withSequence(\n withTiming(0.45, {\n duration: 600,\n easing: Easing.inOut(Easing.ease),\n }),\n withTiming(1, { duration: 600, easing: Easing.inOut(Easing.ease) })\n ),\n -1,\n false\n );\n }, []);\n\n const sendAnimatedStyle = useAnimatedStyle(() => ({\n transform: [{ scale: sendScale.value }],\n }));\n const pauseAnimatedStyle = useAnimatedStyle(() => ({\n opacity: pauseOpacity.value,\n }));\n\n const containerStyle: ViewStyle = {\n height,\n backgroundColor,\n borderTopLeftRadius: borderRadius,\n borderTopRightRadius: borderRadius,\n };\n\n const resolvedSendBackground = sendButtonColor ?? primaryColor;\n\n return (\n <View style={[styles.container, containerStyle]}>\n <View style={styles.row}>\n <Pressable\n onPress={onDelete}\n hitSlop={10}\n style={styles.deleteWrapper}\n accessibilityRole=\"button\"\n accessibilityLabel=\"Delete recording\"\n >\n {renderDeleteIcon ? (\n renderDeleteIcon()\n ) : (\n <TrashIcon\n style={{ width: DELETE_SIZE, height: DELETE_SIZE }}\n color={deleteIconColor}\n />\n )}\n </Pressable>\n\n <View style={styles.center}>\n <View style={styles.timerRow}>\n <Text\n style={[styles.timer, { color: timerColor }]}\n numberOfLines={1}\n >\n {formatDuration(duration)}\n </Text>\n\n <View style={styles.waveformWrapper}>\n {renderWaveform ? (\n renderWaveform()\n ) : (\n <Waveform\n color={waveformColor}\n count={waveCount}\n spacing={waveSpacing}\n barWidth={waveWidth}\n />\n )}\n </View>\n </View>\n\n <Animated.View style={[styles.pauseRow, pauseAnimatedStyle]}>\n <View style={styles.pauseBar} />\n <View style={styles.pauseBar} />\n </Animated.View>\n </View>\n\n <Animated.View style={sendAnimatedStyle}>\n <Pressable\n onPress={onSend}\n hitSlop={6}\n accessibilityRole=\"button\"\n accessibilityLabel=\"Send recording\"\n style={[\n styles.sendButton,\n { backgroundColor: resolvedSendBackground },\n ]}\n >\n {renderSendIcon ? (\n renderSendIcon()\n ) : (\n <PaperPlaneIcon\n style={{ width: 30, height: 30 }}\n color=\"#FFFFFF\"\n />\n )}\n </Pressable>\n </Animated.View>\n </View>\n </View>\n );\n};\n\ninterface WaveformProps {\n color: string;\n count: number;\n spacing: number;\n barWidth: number;\n}\n\nconst Waveform: React.FC<WaveformProps> = ({\n color,\n count,\n spacing,\n barWidth,\n}) => {\n const tick = useSharedValue(0);\n\n useEffect(() => {\n tick.value = withRepeat(\n withTiming(1, { duration: 4500, easing: Easing.linear }),\n -1,\n false\n );\n }, []);\n\n const totalWidth = Math.min(\n WAVEFORM_WIDTH,\n count * barWidth + (count - 1) * spacing\n );\n\n return (\n <View\n style={[\n styles.waveform,\n { width: totalWidth, height: WAVEFORM_HEIGHT },\n ]}\n >\n {Array.from({ length: count }).map((_, i) => (\n <WaveBar\n key={i}\n index={i}\n total={count}\n tick={tick}\n color={color}\n width={barWidth}\n spacing={spacing}\n />\n ))}\n </View>\n );\n};\n\ninterface WaveBarProps {\n index: number;\n total: number;\n tick: ReturnType<typeof useSharedValue<number>>;\n color: string;\n width: number;\n spacing: number;\n}\n\nconst WaveBar: React.FC<WaveBarProps> = ({\n index,\n total,\n tick,\n color,\n width,\n spacing,\n}) => {\n const animatedStyle = useAnimatedStyle(() => {\n 'worklet';\n const t = tick.value * Math.PI * 2;\n const phase1 = Math.sin(t * 2 + index * 0.55);\n const phase2 = Math.sin(t * 4 + index * 1.3);\n const phase3 = Math.sin(t * 0.9 + index * 0.27);\n const combined = (phase1 * 0.55 + phase2 * 0.3 + phase3 * 0.4) * 0.5 + 0.5;\n\n const edgeFalloff = Math.sin((index / Math.max(1, total - 1)) * Math.PI);\n const amplitude = Math.max(\n 0.15,\n Math.min(1, combined) * (0.35 + 0.65 * edgeFalloff)\n );\n return {\n height: `${Math.round(amplitude * 100)}%`,\n };\n });\n\n return (\n <Animated.View\n style={[\n {\n width,\n marginHorizontal: spacing / 2,\n backgroundColor: color,\n borderRadius: width,\n },\n animatedStyle,\n ]}\n />\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n width: '100%',\n paddingHorizontal: 18,\n paddingVertical: 14,\n justifyContent: 'center',\n },\n row: {\n flex: 1,\n flexDirection: 'row',\n alignItems: 'center',\n },\n deleteWrapper: {\n width: DELETE_SIZE,\n height: '100%',\n justifyContent: 'flex-end',\n alignItems: 'flex-start',\n paddingBottom: 2,\n },\n center: {\n flex: 1,\n height: '100%',\n paddingHorizontal: 12,\n justifyContent: 'center',\n },\n timerRow: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 12,\n },\n timer: {\n fontSize: 24,\n fontWeight: '600',\n minWidth: 50,\n letterSpacing: 0.3,\n },\n waveformWrapper: {\n flex: 1,\n alignItems: 'flex-start',\n justifyContent: 'center',\n },\n waveform: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n },\n pauseRow: {\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center',\n marginTop: 6,\n gap: 4,\n },\n pauseBar: {\n width: 3,\n height: 12,\n borderRadius: 2,\n backgroundColor: PAUSE_BAR_COLOR,\n },\n sendButton: {\n width: SEND_SIZE,\n height: SEND_SIZE,\n borderRadius: SEND_SIZE / 2,\n justifyContent: 'center',\n alignItems: 'center',\n shadowColor: '#000',\n shadowOffset: { width: 0, height: 4 },\n shadowOpacity: 0.25,\n shadowRadius: 8,\n elevation: 6,\n },\n});\n\nexport default VoiceRecorder;\n","import React, { ReactNode, useEffect, useRef, useState } from 'react';\nimport { StyleSheet, Text, Vibration, View, ViewStyle } from 'react-native';\nimport { Gesture, GestureDetector } from 'react-native-gesture-handler';\nimport Animated, {\n Easing,\n interpolate,\n runOnJS,\n useAnimatedStyle,\n useSharedValue,\n withRepeat,\n withSequence,\n withSpring,\n withTiming,\n} from 'react-native-reanimated';\nimport { ChevronUpIcon } from '../../assets/Icons/ChevronUpIcon';\nimport { LockIcon } from '../../assets/Icons/LockIcon';\nimport { MicrophoneIcon } from '../../assets/Icons/MicrophoneIcon';\nimport { formatDuration } from '../../utils/datefunc';\n\nexport interface VoiceRecordingGestureProps {\n /** App primary color used for the mic button background. */\n primaryColor?: string;\n /** Recording bar background. */\n backgroundColor?: string;\n /** Color of the running timer. */\n timerColor?: string;\n /** Color of the microphone glyph. */\n microphoneColor?: string;\n /** Color of the lock glyph + chevron. */\n lockColor?: string;\n\n /** Replace the mic icon. */\n renderMicIcon?: () => ReactNode;\n /** Replace the lock icon shown in the floating pill. */\n renderLockIcon?: () => ReactNode;\n /** Replace the \"<\" arrow next to \"Slide to cancel\". */\n renderArrowIcon?: () => ReactNode;\n\n /** Fired when the horizontal drag passes the cancel threshold. */\n onCancel?: () => void;\n /** Fired when the upward drag passes the lock threshold. */\n onLock?: () => void;\n}\n\nconst DEFAULT_BG = '#0B141A';\nconst DEFAULT_PRIMARY = '#22C55E';\nconst DEFAULT_TIMER = '#FFFFFF';\nconst DEFAULT_MIC = '#FFFFFF';\nconst DEFAULT_LOCK = '#E9EDEF';\nconst SLIDE_TEXT_COLOR = 'rgba(255,255,255,0.55)';\n\nconst CONTAINER_HEIGHT = 95;\nconst MIC_SIZE = 72;\n\nconst CANCEL_THRESHOLD = 90;\nconst LOCK_THRESHOLD = 70;\nconst LOCK_REVEAL_TRAVEL = 12;\n\nfunction vibrateOnce() {\n Vibration.vibrate(20);\n}\n\nexport const VoiceRecordingGesture: React.FC<VoiceRecordingGestureProps> = ({\n primaryColor = DEFAULT_PRIMARY,\n backgroundColor = DEFAULT_BG,\n timerColor = DEFAULT_TIMER,\n microphoneColor = DEFAULT_MIC,\n lockColor = DEFAULT_LOCK,\n renderMicIcon,\n renderLockIcon,\n renderArrowIcon,\n onCancel,\n onLock,\n}) => {\n const [duration, setDuration] = useState(0);\n const startedAt = useRef<number>(Date.now());\n\n useEffect(() => {\n startedAt.current = Date.now();\n const id = setInterval(() => {\n setDuration((Date.now() - startedAt.current) / 1000);\n }, 250);\n return () => clearInterval(id);\n }, []);\n\n const dragX = useSharedValue(0);\n const dragY = useSharedValue(0);\n const arrowPulse = useSharedValue(0);\n const micPulse = useSharedValue(1);\n const chevronPulse = useSharedValue(0);\n const lockHighlight = useSharedValue(0);\n const cancelFired = useSharedValue(0);\n const lockFired = useSharedValue(0);\n\n useEffect(() => {\n arrowPulse.value = withRepeat(\n withSequence(\n withTiming(-4, { duration: 700, easing: Easing.inOut(Easing.ease) }),\n withTiming(0, { duration: 700, easing: Easing.inOut(Easing.ease) })\n ),\n -1,\n false\n );\n micPulse.value = withRepeat(\n withSequence(\n withTiming(1.08, { duration: 850, easing: Easing.inOut(Easing.ease) }),\n withTiming(1, { duration: 850, easing: Easing.inOut(Easing.ease) })\n ),\n -1,\n false\n );\n chevronPulse.value = withRepeat(\n withSequence(\n withTiming(-5, { duration: 500, easing: Easing.inOut(Easing.ease) }),\n withTiming(0, { duration: 500, easing: Easing.inOut(Easing.ease) })\n ),\n -1,\n false\n );\n }, []);\n\n const onCancelRef = useRef(onCancel);\n onCancelRef.current = onCancel;\n const onLockRef = useRef(onLock);\n onLockRef.current = onLock;\n\n const fireCancel = () => {\n vibrateOnce();\n onCancelRef.current?.();\n };\n const fireLock = () => {\n vibrateOnce();\n onLockRef.current?.();\n };\n\n const panGesture = Gesture.Pan()\n .minDistance(0)\n .onBegin(() => {\n 'worklet';\n cancelFired.value = 0;\n lockFired.value = 0;\n dragX.value = 0;\n dragY.value = 0;\n })\n .onUpdate((e) => {\n 'worklet';\n const x = Math.min(0, e.translationX);\n const y = Math.min(0, e.translationY);\n dragX.value = x;\n dragY.value = y;\n\n if (lockFired.value === 0 && y <= -LOCK_THRESHOLD) {\n lockFired.value = 1;\n lockHighlight.value = withTiming(1, { duration: 180 });\n runOnJS(fireLock)();\n }\n\n if (cancelFired.value === 0 && x <= -CANCEL_THRESHOLD) {\n cancelFired.value = 1;\n runOnJS(fireCancel)();\n }\n })\n .onEnd(() => {\n 'worklet';\n if (lockFired.value === 0) {\n dragX.value = withSpring(0, { damping: 18, stiffness: 180 });\n dragY.value = withSpring(0, { damping: 18, stiffness: 180 });\n }\n })\n .onFinalize(() => {\n 'worklet';\n if (lockFired.value === 0) {\n dragX.value = withSpring(0, { damping: 18, stiffness: 180 });\n dragY.value = withSpring(0, { damping: 18, stiffness: 180 });\n }\n });\n\n const slideTextStyle = useAnimatedStyle(() => {\n const progress = Math.min(1, Math.abs(dragX.value) / CANCEL_THRESHOLD);\n return {\n transform: [{ translateX: dragX.value * 0.55 + arrowPulse.value }],\n opacity: 1 - progress,\n };\n });\n\n const lockPillStyle = useAnimatedStyle(() => {\n const reveal = Math.min(1, Math.max(0, -dragY.value / LOCK_REVEAL_TRAVEL));\n const lockProgress = Math.min(1, Math.max(0, -dragY.value / LOCK_THRESHOLD));\n const rise = interpolate(lockProgress, [0, 1], [0, -22]);\n return {\n opacity: reveal,\n transform: [\n { scale: 0.85 + reveal * 0.15 },\n { translateY: rise },\n ],\n };\n });\n\n const lockBorderStyle = useAnimatedStyle(() => {\n const lockProgress = Math.min(\n 1,\n Math.max(0, -dragY.value / LOCK_THRESHOLD)\n );\n return {\n borderWidth: lockProgress > 0.85 || lockHighlight.value > 0 ? 1.5 : 0,\n };\n });\n\n const chevronStyle = useAnimatedStyle(() => ({\n transform: [{ translateY: chevronPulse.value }],\n }));\n\n const lockProgressFillStyle = useAnimatedStyle(() => {\n const progress = Math.min(\n 1,\n Math.max(0, -dragY.value / LOCK_THRESHOLD)\n );\n return {\n height: `${Math.round(progress * 100)}%`,\n };\n });\n\n const micStyle = useAnimatedStyle(() => {\n const lockedScale = lockHighlight.value;\n return {\n transform: [\n { translateX: dragX.value },\n { translateY: dragY.value },\n { scale: micPulse.value * (1 + lockedScale * 0.04) },\n ],\n };\n });\n\n const containerStyle: ViewStyle = {\n backgroundColor,\n };\n\n return (\n <View style={styles.wrapper} pointerEvents=\"box-none\">\n <Animated.View\n style={[styles.lockPill, lockPillStyle, lockBorderStyle]}\n pointerEvents=\"none\"\n >\n <Animated.View>\n {renderLockIcon ? (\n renderLockIcon()\n ) : (\n <LockIcon style={{ width: 20, height: 20 }} color={lockColor} />\n )}\n </Animated.View>\n\n <View style={styles.lockProgressTrack}>\n <Animated.View\n style={[\n styles.lockProgressFill,\n { backgroundColor: primaryColor },\n lockProgressFillStyle,\n ]}\n />\n </View>\n\n <Animated.View style={chevronStyle}>\n <ChevronUpIcon\n style={{ width: 16, height: 16 }}\n color={lockColor}\n />\n </Animated.View>\n </Animated.View>\n\n <View style={[styles.bar, containerStyle]}>\n <Text\n style={[styles.timer, { color: timerColor }]}\n numberOfLines={1}\n >\n {formatDuration(duration)}\n </Text>\n\n <Animated.View style={[styles.slideArea, slideTextStyle]}>\n {renderArrowIcon ? (\n renderArrowIcon()\n ) : (\n <Text style={styles.slideArrow}>‹</Text>\n )}\n <Text style={styles.slideText}>Slide to cancel</Text>\n </Animated.View>\n\n <GestureDetector gesture={panGesture}>\n <Animated.View\n style={styles.micPressable}\n accessibilityRole=\"button\"\n accessibilityLabel=\"Hold to record. Slide left to cancel, slide up to lock.\"\n >\n <Animated.View\n style={[\n styles.mic,\n { backgroundColor: primaryColor },\n micStyle,\n ]}\n >\n {renderMicIcon ? (\n renderMicIcon()\n ) : (\n <MicrophoneIcon\n style={{ width: 30, height: 30 }}\n color={microphoneColor}\n />\n )}\n </Animated.View>\n </Animated.View>\n </GestureDetector>\n </View>\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n wrapper: {\n width: '100%',\n },\n lockPill: {\n position: 'absolute',\n right: 18 + (MIC_SIZE - 46) / 2,\n bottom: CONTAINER_HEIGHT + 8,\n width: 46,\n paddingVertical: 12,\n borderRadius: 28,\n backgroundColor: 'rgba(20,28,33,0.95)',\n borderColor: '#22C55E',\n alignItems: 'center',\n justifyContent: 'center',\n gap: 10,\n shadowColor: '#000',\n shadowOffset: { width: 0, height: 4 },\n shadowOpacity: 0.3,\n shadowRadius: 8,\n elevation: 8,\n },\n lockProgressTrack: {\n width: 4,\n height: 18,\n borderRadius: 2,\n backgroundColor: 'rgba(255,255,255,0.15)',\n overflow: 'hidden',\n justifyContent: 'flex-end',\n },\n lockProgressFill: {\n width: '100%',\n borderRadius: 2,\n },\n bar: {\n width: '100%',\n height: CONTAINER_HEIGHT,\n paddingHorizontal: 18,\n borderTopLeftRadius: 18,\n borderTopRightRadius: 18,\n flexDirection: 'row',\n alignItems: 'center',\n },\n timer: {\n fontSize: 24,\n fontWeight: '600',\n minWidth: 50,\n letterSpacing: 0.3,\n },\n slideArea: {\n flex: 1,\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n gap: 6,\n },\n slideArrow: {\n fontSize: 18,\n lineHeight: 18,\n color: SLIDE_TEXT_COLOR,\n fontWeight: '500',\n marginTop: -2,\n },\n slideText: {\n fontSize: 14,\n color: SLIDE_TEXT_COLOR,\n fontWeight: '500',\n },\n micPressable: {\n width: MIC_SIZE,\n height: MIC_SIZE,\n justifyContent: 'center',\n alignItems: 'center',\n },\n mic: {\n width: MIC_SIZE,\n height: MIC_SIZE,\n borderRadius: MIC_SIZE / 2,\n justifyContent: 'center',\n alignItems: 'center',\n shadowColor: '#000',\n shadowOffset: { width: 0, height: 4 },\n shadowOpacity: 0.3,\n shadowRadius: 8,\n elevation: 6,\n },\n});\n\nexport default VoiceRecordingGesture;\n","import React from 'react';\nimport { FlatList, KeyboardAvoidingView, Platform, View } from 'react-native';\nimport tw from 'twrnc';\nimport ChatBubble from './components/ChatBubble/ChatBubble';\nimport ChatInput from './components/ChatInput/ChatInput';\nimport MediaViewer from './components/MediaViewer/MediaViewer';\nimport { TypingIndicator } from './components/TypingComponent/TypingIndicator';\nimport { AudioProvider } from './context/AudioContext';\nimport { ChatProvider, useChatContext } from './context/ChatContext';\nimport { useKeyboardInset } from './hooks/useKeyboardInset';\nimport { ChatScreenProps } from './types';\n\nconst ChatScreenContent = () => {\n const {\n messages,\n currentUserId,\n onMessageLongPress,\n mediaViewerGallery,\n clearMediaViewerGallery,\n typingUsers,\n onSendMessage,\n onTypingStart,\n onTypingEnd,\n onAttachmentPress,\n onAudioRecordEnd,\n onAudioRecordStart,\n onCameraPress,\n renderCustomInput,\n CustomEmojiIcon,\n CustomAttachmentIcon,\n CustomCameraIcon,\n CustomMicrophoneIcon,\n CustomSendIcon,\n CustomFileIcon,\n CustomImagePreview,\n CustomVideoPreview,\n keyboardVerticalOffset = 0,\n disableKeyboardAvoiding = false,\n } = useChatContext();\n\n const keyboardInset = useKeyboardInset(!disableKeyboardAvoiding);\n\n const inputSection = renderCustomInput ? (\n renderCustomInput()\n ) : (\n <ChatInput\n onSendMessage={onSendMessage}\n onTypingStart={onTypingStart}\n onTypingEnd={onTypingEnd}\n onAttachmentPress={onAttachmentPress}\n onAudioRecordEnd={onAudioRecordEnd}\n onAudioRecordStart={onAudioRecordStart}\n onCameraPress={onCameraPress}\n CustomEmojiIcon={CustomEmojiIcon}\n CustomAttachmentIcon={CustomAttachmentIcon}\n CustomCameraIcon={CustomCameraIcon}\n CustomMicrophoneIcon={CustomMicrophoneIcon}\n CustomSendIcon={CustomSendIcon}\n CustomFileIcon={CustomFileIcon}\n CustomImagePreview={CustomImagePreview}\n CustomVideoPreview={CustomVideoPreview}\n />\n );\n\n const content = (\n <View style={tw`flex-1 px-2 pb-4 gap-2 relative`}>\n <FlatList\n style={tw`flex-1`}\n data={messages}\n keyExtractor={(item) => item.id}\n renderItem={({ item, index }) => (\n <ChatBubble\n message={item}\n isCurrentUser={item.senderId === currentUserId}\n onLongPress={() => onMessageLongPress?.(item)}\n isFirstInSequence={\n index === messages.length - 1 ||\n messages[index + 1]?.senderId !== item.senderId\n }\n />\n )}\n ListHeaderComponent={\n <TypingIndicator\n typingUsers={typingUsers || []}\n currentUserId={currentUserId}\n />\n }\n showsVerticalScrollIndicator={false}\n inverted\n keyboardShouldPersistTaps=\"handled\"\n keyboardDismissMode=\"interactive\"\n />\n\n <View\n style={\n !disableKeyboardAvoiding && keyboardInset > 0\n ? { marginBottom: keyboardInset }\n : undefined\n }\n >\n {inputSection}\n </View>\n\n <MediaViewer\n gallery={mediaViewerGallery}\n onClose={clearMediaViewerGallery}\n />\n </View>\n );\n\n if (disableKeyboardAvoiding) {\n return <View style={tw`flex-1`}>{content}</View>;\n }\n\n if (Platform.OS === 'android') {\n return <View style={tw`flex-1`}>{content}</View>;\n }\n\n return (\n <KeyboardAvoidingView\n style={tw`flex-1`}\n behavior=\"padding\"\n keyboardVerticalOffset={keyboardVerticalOffset}\n >\n {content}\n </KeyboardAvoidingView>\n );\n};\n\nconst ChatScreen: React.FC<ChatScreenProps> = (props) => {\n return (\n <AudioProvider>\n <ChatProvider {...props}>\n <ChatScreenContent />\n </ChatProvider>\n </AudioProvider>\n );\n};\n\nexport {\n VoiceRecorder,\n type VoiceRecorderProps,\n} from './components/VoiceRecorder/VoiceRecorder';\n\nexport {\n VoiceRecordingGesture,\n type VoiceRecordingGestureProps,\n} from './components/VoiceRecorder/VoiceRecordingGesture';\n\nexport {\n VoiceRecorderFlow,\n type VoiceRecorderFlowProps,\n type VoiceRecorderFlowAudio,\n type RecordingState,\n} from './components/VoiceRecorder/VoiceRecorderFlow';\n\nexport default ChatScreen;\n","import { useEffect, useState } from 'react';\nimport { Keyboard, KeyboardEvent, Platform } from 'react-native';\n\n/**\n * Full keyboard height for lifting the input bar above the software keyboard.\n * Do not subtract header offset here — that is only for KeyboardAvoidingView on iOS.\n */\nexport function useKeyboardInset(enabled = true) {\n const [inset, setInset] = useState(0);\n\n useEffect(() => {\n if (!enabled) {\n setInset(0);\n return;\n }\n\n const showEvent =\n Platform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow';\n const hideEvent =\n Platform.OS === 'ios' ? 'keyboardWillHide' : 'keyboardDidHide';\n\n const onShow = (event: KeyboardEvent) => {\n setInset(event.endCoordinates.height);\n };\n\n const onHide = () => setInset(0);\n\n const showSub = Keyboard.addListener(showEvent, onShow);\n const hideSub = Keyboard.addListener(hideEvent, onHide);\n\n return () => {\n showSub.remove();\n hideSub.remove();\n };\n }, [enabled]);\n\n return enabled ? inset : 0;\n}\n"],"names":["ArrowBack2RoundedIcon","_ref","style","color","_jsx","Svg","viewBox","jsx","Path","fill","fillRule","stroke","strokeLinecap","strokeLinejoin","strokeWidth","d","clipRule","ChatContext","createContext","undefined","ChatProvider","children","props","_objectWithoutProperties","_excluded","_useState2","_slicedToArray","useState","mediaViewerGallery","setMediaViewerGalleryState","_useState4","isVideoPlaying","setIsVideoPlaying","Provider","value","_objectSpread","setMediaViewerGallery","items","initialIndex","cur","kind","clearMediaViewerGallery","useChatContext","context","useContext","Error","colors","theme","getMediaTimestampContainerStyle","isCurrentUser","_c$sentMediaTimestamp","_c$receivedMediaTimes","_theme$messageStyle","_theme$messageStyle2","c","bg","sentMediaTimestampBackground","receivedMediaTimestampBackground","custom","messageStyle","sentMediaTimestampContainerStyle","receivedMediaTimestampContainerStyle","paddingHorizontal","paddingVertical","borderRadius","backgroundColor","getFileAttachmentBackground","_c$receivedFileAttach","_c$sentFileAttachment","sentFileAttachmentBackground","receivedFileAttachmentBackground","getFileAttachmentTextColor","_c$receivedFileAttach2","_c$sentFileAttachment2","sentFileAttachmentTextColor","receivedFileAttachmentTextColor","getFileAttachmentSubtitleColor","_c$receivedFileAttach3","_c$sentFileAttachment3","sentFileAttachmentSubtitleColor","receivedFileAttachmentSubtitleColor","getAudioSpeedTextColor","_c$receivedAudioSpeed","_c$sentAudioSpeedText","sentAudioSpeedTextColor","receivedAudioSpeedTextColor","getMessageTextColor","sentMessageTextColor","receivedMessageTextColor","getBubbleBackgroundColor","sentBubbleBackgroundColor","receivedBubbleBackgroundColor","collectMediaItems","message","mediaItems","length","out","image","push","uri","video","DEFAULT_INPUT_BAR_ICON_CLASS","Platform","OS","withFontFamily","fontFamily","process","env","NODE_ENV","reactIsModule","exports","b","Symbol","for","e","f","g","h","k","l","m","n","p","q","r","t","v","w","x","y","z","a","u","$$typeof","type","A","reactIs_production_min","AsyncMode","ConcurrentMode","ContextConsumer","Element","ForwardRef","Fragment","Lazy","Portal","Profiler","StrictMode","Suspense","isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isMemo","isProfiler","isStrictMode","isSuspense","isValidElementType","typeOf","require$$0","hasSymbol","REACT_ELEMENT_TYPE","REACT_PORTAL_TYPE","REACT_FRAGMENT_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_PROVIDER_TYPE","REACT_CONTEXT_TYPE","REACT_ASYNC_MODE_TYPE","REACT_CONCURRENT_MODE_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","REACT_BLOCK_TYPE","REACT_FUNDAMENTAL_TYPE","REACT_RESPONDER_TYPE","REACT_SCOPE_TYPE","object","$$typeofType","ContextProvider","Memo","hasWarnedAboutDeprecatedIsAsyncMode","reactIs_development","console","isPortal","getOwnPropertySymbols","Object","hasOwnProperty","prototype","propIsEnumerable","propertyIsEnumerable","objectAssign","assign","test1","String","getOwnPropertyNames","test2","i","fromCharCode","map","join","test3","split","forEach","letter","keys","err","shouldUseNative","target","source","from","symbols","to","val","TypeError","toObject","s","arguments","key","call","ReactPropTypesSecret_1","has","Function","bind","printWarning","ReactPropTypesSecret","loggedTypeFailures","require$$1","text","error","checkPropTypes","typeSpecs","values","location","componentName","getStack","typeSpecName","name","ex","stack","resetWarningCache","checkPropTypes_1","ReactIs","require$$2","require$$3","require$$4","emptyFunctionThatReturnsNull","factoryWithTypeCheckers","isValidElement","throwOnDirectAccess","ITERATOR_SYMBOL","iterator","ANONYMOUS","ReactPropTypes","array","createPrimitiveTypeChecker","bigint","bool","func","number","string","symbol","any","createChainableTypeChecker","arrayOf","typeChecker","propName","propFullName","PropTypeError","propValue","Array","isArray","getPropType","element","elementType","instanceOf","expectedClass","expectedClassName","constructor","node","isNode","objectOf","propType","oneOf","expectedValues","is","valuesString","JSON","stringify","getPreciseType","oneOfType","arrayOfTypeCheckers","checker","getPostfixForTypeWarning","expectedTypes","checkerResult","data","expectedType","shape","shapeTypes","invalidValidatorError","exact","allKeys","this","validate","manualPropTypeCallCache","manualPropTypeWarningCount","checkType","isRequired","secret","cacheKey","chainedCheckType","every","iteratorFn","maybeIterable","getIteratorFn","step","entries","next","done","entry","RegExp","isSymbol","Date","PropTypes","emptyFunction","emptyFunctionWithReset","factoryWithThrowingShims","shim","getShim","propTypesModule","TextExtraction","_createClass","patterns","_classCallCheck","_this","parsedTexts","pattern","newParts","tmp","nonExhaustiveModeMaxMatchCount","numberOfMatchesPermitted","Math","min","max","Number","isInteger","POSITIVE_INFINITY","currentMatches","parsedText","_matched","matches","parts","textLeft","indexOfMatchedString","lastIndex","exec","previousText","substr","index","getMatchedPart","apply","filter","matchedPattern","renderText","PATTERNS","url","phone","email","defaultParseShape","Text","propTypes","nonExhaustiveMaxMatchCount","customParseShape","ParsedText","_callSuper","_inherits","React","Component","nativeProps","_root","setNativeProps","parse","option","patternOption","concat","getPatterns","parentStyle","remainder","_excluded2","childrenProps","_this2","_this$props","_excluded3","ref","getParsedText","displayName","defaultProps","PauseIcon","PlayIcon","AudioContext","AudioProvider","currentlyPlayingId","setCurrentlyPlayingId","formatDuration","time","minutes","floor","seconds","PLAYBACK_RATES","AVATAR_SIZE","AudioAvatarOrSpeed","_theme$bubbleStyle","isPlaying","playbackRate","onCycleSpeed","senderAvatar","senderName","Pressable","onPress","tw","_templateObject","_taggedTemplateLiteral","width","height","audioSpeedButtonStyle","_templateObject2","audioSpeedTextStyle","Image","_templateObject3","bubbleStyle","avatarImageStyle","resizeMode","View","_templateObject4","_templateObject5","trim","charAt","toUpperCase","AudioPlayer","_ref2","_theme$messageStyle3","_theme$messageStyle5","audioUrl","audioId","_ref2$reserveStatusSp","reserveStatusSpace","_useChatContext","CustomPlayIcon","CustomPauseIcon","showMessageStatus","_useAudio","useAudio","videoRef","useRef","setIsPlaying","currentTime","setCurrentTime","_useState6","duration","setDuration","_useState8","isDragging","setIsDragging","_useState10","setPlaybackRate","_useState12","waveformW","setWaveformW","seekPendingRef","waveform","useMemo","count","charCodeAt","_","imul","abs","generateWaveform","_getAudioWaveformColo","_c$receivedAudioWavef","_c$receivedAudioWavef2","_c$sentAudioWaveformC","_c$sentAudioWaveformA","inactive","sentAudioWaveformColor","active","sentAudioWaveformActiveColor","receivedAudioWaveformColor","receivedAudioWaveformActiveColor","getAudioWaveformColors","inactiveBarColor","activeBarColor","durationColor","_c$receivedAudioTimes","_c$sentAudioTimestamp","sentAudioTimestampColor","sentTimestampColor","receivedAudioTimestampColor","receivedTimestampColor","getAudioDurationColor","playIconColor","_c$receivedAudioPlayI","_c$sentAudioPlayIconC","sentAudioPlayIconColor","receivedAudioPlayIconColor","getAudioPlayIconColor","pauseIconColor","_c$receivedAudioPause","_c$sentAudioPauseIcon","sentAudioPauseIconColor","receivedAudioPauseIconColor","getAudioPauseIconColor","effectivePlaying","progress","handleLoad","useCallback","_videoRef$current","current","seek","handleProgress","_ref3","handleEnd","_videoRef$current2","togglePlay","cycleSpeed","indexOf","seekTo","_videoRef$current3","panResponder","PanResponder","create","onStartShouldSetPanResponder","onMoveShouldSetPanResponder","onPanResponderGrant","evt","nativeEvent","locationX","onPanResponderMove","onPanResponderRelease","onPanResponderTerminate","playPause","hitSlop","_templateObject6","avatarOrSpeed","waveformBars","_templateObject7","onLayout","layout","flex","flexDirection","alignItems","progressBarStyle","panHandlers","amp","_theme$messageStyle4","marginHorizontal","round","activeProgressBarStyle","_jsxs","_templateObject8","_templateObject9","Video","paused","rate","playInBackground","playWhenInactive","onLoad","onProgress","onEnd","progressUpdateInterval","_templateObject10","jsxs","_Fragment","_templateObject11","paddingLeft","audioDurationStyle","AudioPlayer$1","memo","LoadingIcon","_ref$spinning","spinning","spinAnim","Animated","Value","useEffect","loop","timing","toValue","easing","Easing","linear","useNativeDriver","start","spin","interpolate","inputRange","outputRange","transform","rotate","MULTI_HEIGHT","TWO_ROW_H","THREE_TOP_H","THREE_BOT_H","FOUR_CELL_H","VideoThumbCell","_theme$colors","cellStyle","roundedStyle","_React$useState2","_React$useState4","loading","setLoading","_React$useState6","setError","pointerEvents","muted","onLoadStart","onError","videoPlayIconColor","formatShortDuration","sec","isNaN","toString","padStart","MediaGrid","onOpenGallery","windowW","useWindowDimensions","maxW","roundedSmall","overflow","item","marginVertical","half","gap","slice","idx","top","left","right","bottomHalf","cellW","extra","display","flexWrap","cell","position","MessageContent","_message$fileAttachme","_theme$messageStyle7","_theme$messageStyle8","onGalleryOpen","onFileAttachmentPress","fileAttachments","file","_theme$messageStyle6","Linking","openURL","startsWith","sentFileAttachmentStyle","receivedFileAttachmentStyle","sentFileAttachmentTextStyle","receivedFileAttachmentTextStyle","numberOfLines","sentFileAttachmentSubtitleStyle","receivedFileAttachmentSubtitleStyle","audio","id","wordBreak","overflowWrap","sentTextStyle","receivedTextStyle","textDecorationLine","allowFontScaling","MessageContent$1","CheckAllIcon","CheckIcon","MessageStatus","_theme$colors2","_theme$colors3","status","hasText","hasAudio","hasGalleryMedia","hasFileAttachments","mediaOverlay","timestampColor","_c$receivedTimestampC2","_c$sentTimestampColor2","getMediaTimestampColor","_c$receivedTimestampC","_c$sentTimestampColor","getMessageTimestampColor","opacity","sentIconColor","deliveredIconColor","readIconColor","MessageStatus$1","ChatBubble","_message$fileAttachme2","_theme$bubbleStyle2","_theme$bubbleStyle3","_theme$bubbleStyle4","_message$senderName","_theme$bubbleStyle5","isFirstInSequence","onLongPress","showAvatars","showUserNames","showBubbleTail","hasFilesOnly","sent","received","avatarTextStyle","userNameStyle","sentMessageTailColor","receivedMessageTailColor","ChatBubble$1","CameraIcon","G","Circle","cx","cy","EmojiFunnySquareIcon","Ellipse","rx","ry","MicrophoneIcon","PaperClipIcon","PaperPlaneIcon","requestMicPermission","_requestMicPermission","_asyncToGenerator","_regeneratorRuntime","mark","_callee6","granted","wrap","_context6","prev","PermissionsAndroid","request","PERMISSIONS","RECORD_AUDIO","title","buttonPositive","abrupt","RESULTS","GRANTED","t0","stop","ChevronUpIcon","_ref$color","LockIcon","Rect","TrashIcon","MIC_SIZE","CANCEL_THRESHOLD","LOCK_THRESHOLD","vibrateOnce","Vibration","vibrate","_worklet_6814982830705_init_data","code","sourceMap","version","_worklet_15704458555810_init_data","_worklet_5634645742267_init_data","_worklet_3774937740471_init_data","_worklet_8780501045437_init_data","_worklet_16862732032018_init_data","_worklet_15712840370831_init_data","_worklet_966893052371_init_data","_worklet_289901874090_init_data","_worklet_7437293893991_init_data","_worklet_2643638419470_init_data","_worklet_2094038225597_init_data","_worklet_15482916801484_init_data","VoiceRecorderFlow","_props$primaryColor","primaryColor","_props$backgroundColo","_props$timerColor","timerColor","_props$microphoneColo","microphoneColor","_props$lockColor","lockColor","_props$waveformColor","waveformColor","_props$deleteIconColo","deleteIconColor","renderMicIcon","renderSendIcon","renderLockIcon","renderArrowIcon","renderDeleteIcon","renderWaveform","onRecordingStart","onRecordingStop","onSend","onDelete","onLock","onCancel","state","setState","stateRef","stateShared","useSharedValue","stateToInt","startedAtRef","translateX","translateY","containerOpacity","containerY","micPulse","arrowPulse","chevronPulse","pauseOpacity","waveTick","cancelFiredShared","lockFiredShared","withRepeat","withSequence","withTiming","inOut","ease","setInterval","now","clearInterval","onRecordingStartRef","onRecordingStopRef","onSendRef","onDeleteRef","onLockRef","onCancelRef","beginRecording","_onRecordingStartRef$","withSpring","damping","stiffness","finalizeReset","closeOut","_e","VoiceRecorderFlowTsx1","cubic","global","finished","runOnJS","__closure","__workletHash","__initData","__stackDetails","sendNow","_onRecordingStopRef$c","_onSendRef$current","finalDuration","handleQuickTap","handleHoldStart","triggerLock","_onLockRef$current","triggerCancel","_onRecordingStopRef$c2","_onCancelRef$current","_onDeleteRef$current","handleHoldEnd","handleQuickTapRef","handleHoldStartRef","handleHoldEndRef","triggerLockRef","triggerCancelRef","VoiceRecorderFlowTsx7","fireQuickTap","fireHoldStart","fireHoldEnd","fireLock","fireCancel","composedGesture","VoiceRecorderFlowTsx2","tap","Gesture","Tap","maxDuration","LONG_PRESS_MS","success","holdPan","Pan","activateAfterLongPress","onStart","VoiceRecorderFlowTsx3","onUpdate","VoiceRecorderFlowTsx4","tx","translationX","ty","translationY","dominantY","STATE_HOLD","MAX_LEFT","MAX_UP","VoiceRecorderFlowTsx5","onFinalize","VoiceRecorderFlowTsx6","Race","containerStyle","useAnimatedStyle","micButtonStyle","VoiceRecorderFlowTsx8","isHold","pulse","scale","STATE_IDLE","slideTextStyle","VoiceRecorderFlowTsx9","Extrapolation","CLAMP","lockPillStyle","VoiceRecorderFlowTsx10","reveal","lockProgress","LOCK_REVEAL_TRAVEL","lockProgressFillStyle","VoiceRecorderFlowTsx11","chevronStyle","VoiceRecorderFlowTsx12","pauseAnimatedStyle","VoiceRecorderFlowTsx13","showBar","showLockPill","isScreenOne","styles","root","bar","ScreenOneCenter","onDeletePress","ScreenTwoCenter","lockPill","lockProgressTrack","lockProgressFill","buttonAnchor","GestureDetector","gesture","micPressable","accessibilityRole","accessibilityLabel","mic","screenOneRow","deleteWrapper","screenOneCenter","timerRow","timer","waveformWrapper","Waveform","tick","pauseRow","pauseBar","micSpacer","screenTwoRow","slideArea","slideArrow","slideText","WaveBar","total","_worklet_16271292457583_init_data","_ref4","VoiceRecorderFlowTsx14","animatedStyle","PI","combined","sin","edge","WAVE_SPACING","StyleSheet","bottom","borderTopLeftRadius","borderTopRightRadius","justifyContent","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","MIC_RIGHT","CONTAINER_HEIGHT","paddingBottom","fontSize","fontWeight","minWidth","letterSpacing","marginTop","lineHeight","FileIcon","_ref$fill","TruncateFileName","fileName","ellipsizeMode","fullName","lastDot","lastIndexOf","ext","getTruncatedName","TruncateFileName$1","previewsToMediaItems","previews","_p$type","_p$type2","FilePreview","_theme$filePreviewSty5","closePreview","onRemoveItem","CustomFileIcon","CustomImagePreview","CustomVideoPreview","inputHeight","media","_p$type3","_p$type4","docs","_p$type5","_p$type6","mediaAsItems","openGalleryAt","renderMediaThumb","_p$type7","_p$type8","size","isImage","isVideo","repeat","renderCloseBtn","counterRotate","zIndex","maxWidth","alignSelf","filePreviewStyle","extraOnThird","minHeight","CARD","rot","counterRot","findIndex","marginLeft","renderMediaSection","ScrollView","scrollEnabled","maxHeight","DOC_CARD_H","showsVerticalScrollIndicator","contentContainerStyle","nestedScrollEnabled","doc","di","_theme$filePreviewSty","_theme$filePreviewSty2","_theme$filePreviewSty3","_theme$filePreviewSty4","padding","container","iconContainer","nameContainer","renderDocCard","FilePreview$1","MIN_INPUT_HEIGHT","INPUT_BAR_SHELL_HEIGHT","SEND_ICON_CLASS","ChatInput","_theme$sizes","_voiceRecorderProps$m","_recordingUIProps$rec","_theme$inputStyles","_recordingUIProps$rec2","_recordingUIProps$tim","_recordingUIProps$lon","_recordingUIProps$wav","_theme$inputStyles2","_theme$inputStyles3","_theme$colors4","_theme$colors5","_theme$colors6","_theme$inputStyles4","_theme$colors7","_theme$colors8","_theme$inputStyles5","_theme$colors9","onSendMessage","onTypingStart","onTypingEnd","onAttachmentPress","onCameraPress","onAudioRecordStart","onAudioRecordEnd","CustomEmojiIcon","CustomAttachmentIcon","CustomCameraIcon","CustomSendIcon","CustomMicrophoneIcon","inputText","setInputText","inputResetKey","setInputResetKey","isMultiline","setInputHeight","currentUserId","showEmojiButton","showAttachmentsButton","showCameraButton","showVoiceRecordButton","placeholder","previewData","previewItems","onRemovePreviewItem","voiceRecorderProps","recordingUIProps","renderVoiceRecorder","previewList","hasPreviewAttachments","inputBarIconSize","sizes","inputIconSize","inputBarIconStyle","sizeClass","getInputBarIconStyle","iconPixelSize","isCompactInput","iconInset","iconSlotStyle","paddingTop","resetInputLayout","handleChangeText","handleContentSizeChange","event","newHeight","contentSize","handleSendMessage","trimmedText","senderId","showSendButton","onRecordEnd","result","recorder","_ref$maxDuration","onRecordStart","setStatus","recordingRef","timerRef","durationRef","onRecordEndRef","onRecordStartRef","maxDurationRef","stopTimer","startTimer","onMax","startRecording","_callee","AudioRecord","_onRecordStartRef$cur","_context","require","warn","init","sampleRate","channels","bitsPerSample","audioSource","wavFile","stopRecordingRef","pauseRecording","_callee2","_context2","resumeRecording","_callee3","_context3","stopRecordingImpl","_callee4","rec","capturedDuration","_onRecordEndRef$curre","_context4","mimeType","stopRecording","cancelRecording","_callee5","RNFS","path","_context5","unlink","t1","_recordingRef$current","_unused4","isRecording","isPaused","useVoiceRecorder","recorderRef","handleFlowRecordingStart","handleFlowSend","handleFlowCancel","recordingPrimary","recordingSendButtonBackground","inputStyles","sendButtonStyle","recordingBackground","recordingTimerColor","recordingMicColor","longPressMicColor","sendIconsColor","recordingWaveformColor","exposedState","isLocked","slideOffset","waveformData","customVoiceUI","showFlowMicSpacer","inputSectionContainerStyle","inputContainerStyle","inputsIconsColor","TextInput","onChangeText","inputTextColor","placeholderTextColor","multiline","textAlignVertical","onContentSizeChange","ChatInput$1","XIcon","Line","x1","y1","x2","y2","MediaViewer","_gallery$initialIndex","gallery","onClose","listRef","pageIndex","setPageIndex","_useWindowDimensions","windowHeight","requestAnimationFrame","_listRef$current","scrollToIndex","animated","_unused","handleClose","onMomentumScrollEnd","contentOffset","Modal","visible","transparent","animationType","onRequestClose","statusBarTranslucent","FlatList","horizontal","pagingEnabled","showsHorizontalScrollIndicator","keyExtractor","initialScrollIndex","extraData","getItemLayout","offset","onScrollToIndexFailed","setTimeout","_listRef$current2","renderItem","ViewerPage","isActive","autoPlayVideo","shouldPlayVideo","controls","shutterColor","onBuffer","_ref5","isBuffering","MediaViewer$1","TypingIndicator","_theme$bubbleStyle6","typingUsers","renderCustomTyping","typingText","otherTypingUsers","user","displayedUsers","additionalUsers","numCircles","avatarGroupW","bubbleMarginLeft","avatarLeft","typingContainerStyle","_user$name","avatar","additionalTypingUsersContainerStyle","additionalTypingUsersTextStyle","typingTextStyle","_worklet_12167281918170_init_data","_worklet_17494909876270_init_data","spacing","barWidth","totalWidth","_worklet_7061037340779_init_data","VoiceRecorderTsx3","edgeFalloff","amplitude","row","center","sendButton","SEND_SIZE","SLIDE_TEXT_COLOR","_worklet_9031413480896_init_data","_worklet_10037304432722_init_data","_worklet_12183845817905_init_data","_worklet_6312451443030_init_data","_worklet_14837959466503_init_data","_worklet_4153451354770_init_data","_worklet_16339621481199_init_data","_worklet_2030830631140_init_data","_worklet_15757977943145_init_data","_worklet_6567433970992_init_data","wrapper","borderColor","ChatScreenContent","messages","onMessageLongPress","renderCustomInput","_useChatContext$keybo","keyboardVerticalOffset","_useChatContext$disab","disableKeyboardAvoiding","keyboardInset","enabled","inset","setInset","showEvent","hideEvent","showSub","Keyboard","addListener","endCoordinates","hideSub","remove","useKeyboardInset","inputSection","content","_messages","ListHeaderComponent","inverted","keyboardShouldPersistTaps","keyboardDismissMode","marginBottom","KeyboardAvoidingView","behavior","_ref$primaryColor","DEFAULT_PRIMARY","_ref$backgroundColor","DEFAULT_BG","_ref$waveformColor","DEFAULT_WAVEFORM","_ref$timerColor","DEFAULT_TIMER","sendButtonColor","_ref$deleteIconColor","DEFAULT_DELETE","_ref$height","_ref$borderRadius","_ref$waveCount","waveCount","_ref$waveSpacing","waveSpacing","_ref$waveWidth","waveWidth","startedAt","sendScale","VoiceRecorderTsx1","sendAnimatedStyle","VoiceRecorderTsx2","resolvedSendBackground","_ref$microphoneColor","DEFAULT_MIC","_ref$lockColor","DEFAULT_LOCK","dragX","dragY","lockHighlight","cancelFired","lockFired","VoiceRecordingGestureTsx1","panGesture","minDistance","onBegin","VoiceRecordingGestureTsx2","VoiceRecordingGestureTsx3","VoiceRecordingGestureTsx4","VoiceRecordingGestureTsx5","VoiceRecordingGestureTsx6","lockBorderStyle","VoiceRecordingGestureTsx7","borderWidth","VoiceRecordingGestureTsx8","VoiceRecordingGestureTsx9","micStyle","VoiceRecordingGestureTsx10","lockedScale"],"mappings":";;kiLAGO,IAAMA,EAAwB,SAAHC,GAM7B,IALHC,EAAKD,EAALC,MAC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