@e-llm-studio/requirement-ai 0.0.224 → 0.0.225

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 (438) hide show
  1. package/dist/cjs/features/CitationRenderer/CitationRenderer.js +1 -1
  2. package/dist/cjs/features/RequirementAI/components/CustomPopover/CustomPopover.js +1 -1
  3. package/dist/cjs/features/RequirementAI/components/GapRiskSidebar/GapRiskSidebar.js +1 -1
  4. package/dist/cjs/features/RequirementAI/components/GapRiskSidebar/components/GapItem/GapItem.js +1 -1
  5. package/dist/cjs/features/RequirementAI/components/GapRiskSidebar/components/RiskCategorySection/RiskCategorySection.js +1 -1
  6. package/dist/cjs/features/RequirementAI/components/GapRiskSidebar/components/RiskSidebarCategorySection/RiskSidebarCategorySection.js +1 -1
  7. package/dist/cjs/features/RequirementAI/components/GapRiskSidebar/components/StoryNode/StoryNode.js +1 -1
  8. package/dist/cjs/features/RequirementAI/components/GapRiskSidebar/utils/buildStoryWithGap.js +1 -1
  9. package/dist/cjs/features/RequirementAI/components/GapRiskSidebar/utils/buildStoryWithRisk.js +1 -1
  10. package/dist/cjs/features/RequirementAI/components/RecommendationBlock/RecommendationBlock.js +1 -1
  11. package/dist/cjs/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.js +1 -1
  12. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/Editor.js +1 -1
  13. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/Context/ContextMenu.js +1 -1
  14. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/EditorContainer/EditorContainer.js +1 -1
  15. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/EditorPlaceholder/EditorPlaceholder.js +1 -1
  16. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/EditorToolbar.js +1 -1
  17. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/components/ToolbarButton/ToolbarButton.js +1 -1
  18. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/components/ToolbarDivider/ToolbarDivider.js +1 -1
  19. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/components/UndoRedo/UndoRedo.js +1 -1
  20. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/Icons/Icon.js +1 -1
  21. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/constants/editorConfig.js +1 -1
  22. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/CommentPlugin/HTMLNode.js +1 -1
  23. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/DeleteNode.js +1 -1
  24. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/HighlightNode.js +1 -1
  25. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/InitialHtml.js +1 -1
  26. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/InsertNode.js +1 -1
  27. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/LayoutPlugin.js +1 -1
  28. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/getSelectedNode.js +1 -1
  29. package/dist/cjs/features/RequirementAI/components/RichTextEditor/RichTextEditor.js +1 -1
  30. package/dist/cjs/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.js +1 -1
  31. package/dist/cjs/features/RequirementAI/components/UserStoryCard/AttachedContext.js +1 -1
  32. package/dist/cjs/features/RequirementAI/components/UserStoryCard/ClinicalTrialSection.js +1 -1
  33. package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationAnchor.js +1 -1
  34. package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.js +1 -1
  35. package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/ResizableSplitPane.js +1 -1
  36. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.js +1 -1
  37. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/IterateComponent.js +1 -1
  38. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/PopupDefaults.js +1 -1
  39. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.js +1 -1
  40. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/ToneToggle.js +1 -1
  41. package/dist/cjs/features/RequirementAI/components/UserStoryCard/TitleEditor/TitleEditor.js +1 -1
  42. package/dist/cjs/features/RequirementAI/components/UserStoryCard/UserStoryCard.js +1 -1
  43. package/dist/cjs/features/RequirementAI/components/UserStoryCard/UserStoryCard.module.css.js +1 -1
  44. package/dist/cjs/features/RequirementAI/components/UserStoryCard/icons/PdfViewerIcons.js +1 -1
  45. package/dist/cjs/features/RequirementAI/components/ai-reasoning/AIReasonAccordion.js +1 -1
  46. package/dist/cjs/features/RequirementAI/components/ai-reasoning/AiReasonMarkdownWrapper.js +1 -1
  47. package/dist/cjs/features/RequirementAI/components/ai-reasoning/AiReasoningCitation.js +1 -1
  48. package/dist/cjs/features/RequirementAI/components/ai-reasoning/AiReasoningCitationContent.js +1 -1
  49. package/dist/cjs/features/RequirementAI/components/ai-reasoning/BigEnoughComponent.js +1 -1
  50. package/dist/cjs/features/RequirementAI/components/ai-reasoning/CitationPdfRendererWrapper.js +1 -1
  51. package/dist/cjs/features/RequirementAI/components/ai-reasoning/CitationPdfViewer.js +1 -1
  52. package/dist/cjs/features/RequirementAI/components/ai-reasoning/ScannedCitationRenderer.js +1 -1
  53. package/dist/cjs/features/RequirementAI/components/ai-reasoning/pdfCitationUtils.js +1 -1
  54. package/dist/cjs/features/RequirementAI/components/citations/appmod-citation/AppmodCitationContent.js +1 -1
  55. package/dist/cjs/features/RequirementAI/components/citations/appmod-citation/AppmodCitationRenderer.js +1 -1
  56. package/dist/cjs/features/RequirementAI/components/citations/appmod-citation/components/CodeLinkHandler.js +1 -1
  57. package/dist/cjs/features/RequirementAI/components/citations/appmod-citation/icons/AppmodIcon.js +1 -1
  58. package/dist/cjs/features/RequirementAI/components/citations/appmod-citation/icons/ChatBubbleIcon.js +1 -1
  59. package/dist/cjs/features/RequirementAI/components/citations/appmod-citation/icons/SparkleIcon.js +1 -1
  60. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/SearchWaveFromWrapper.js +1 -1
  61. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/WaveformCitationRenderer.js +1 -1
  62. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/components/AudioCitationIcon.js +1 -1
  63. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/components/AudioTimeLineSlider.js +1 -1
  64. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/components/SegmentByWordsViral.js +1 -1
  65. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/components/videoPlayer.js +1 -1
  66. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/AudioLinesIcon.js +1 -1
  67. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/MaximizeIcon.js +1 -1
  68. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/MinimizeIcon.js +1 -1
  69. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/PauseIcon.js +1 -1
  70. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/PlayIcon.js +1 -1
  71. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/PlaybackSpeedIcon.js +1 -1
  72. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/VideoIcon.js +1 -1
  73. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/searchwaveform.js +1 -1
  74. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/store/autoplay.wavefrom.js +1 -1
  75. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/utils/word-segment-util.js +1 -1
  76. package/dist/cjs/features/RequirementAI/components/citations/big-enough/BigEnoughCitationRenderer.js +1 -1
  77. package/dist/cjs/features/RequirementAI/components/citations/chat-citation/ChatCitationRenderer.js +1 -1
  78. package/dist/cjs/features/RequirementAI/components/citations/file-citation/DocumentCitationIcon.js +1 -1
  79. package/dist/cjs/features/RequirementAI/components/citations/file-citation/FileCitationContent.js +1 -1
  80. package/dist/cjs/features/RequirementAI/components/citations/file-citation/FileCitationRender.js +1 -1
  81. package/dist/cjs/features/RequirementAI/components/citations/gpt-web-citation/GptWebCitationRenderer.js +1 -1
  82. package/dist/cjs/features/RequirementAI/components/citations/gpt-web-citation/GptWebcitationPanel.js +1 -1
  83. package/dist/cjs/features/RequirementAI/components/citations/image-citation/ImageCitationContent.js +1 -1
  84. package/dist/cjs/features/RequirementAI/components/citations/image-citation/ImageCitationIcon.js +1 -1
  85. package/dist/cjs/features/RequirementAI/components/citations/image-citation/ImageCitationRenderer.js +1 -1
  86. package/dist/cjs/features/RequirementAI/components/citations/rca-citation/RCACitationContent.js +1 -1
  87. package/dist/cjs/features/RequirementAI/components/citations/rca-citation/RCACitationRenderer.js +1 -1
  88. package/dist/cjs/features/RequirementAI/components/citations/readfile-citation/CustomFileIcon.js +1 -1
  89. package/dist/cjs/features/RequirementAI/components/citations/readfile-citation/ReadFileCitationContent.js +1 -1
  90. package/dist/cjs/features/RequirementAI/components/citations/readfile-citation/ReadFileCitationRenderer.js +1 -1
  91. package/dist/cjs/features/RequirementAI/components/citations/readfile-citation/icons/ExternalLinkIcon.js +1 -1
  92. package/dist/cjs/features/RequirementAI/components/citations/readfile-citation/icons/FileCodeIcon.js +1 -1
  93. package/dist/cjs/features/RequirementAI/components/citations/stormee-citation/StormeeCitationRenderer.js +1 -1
  94. package/dist/cjs/features/RequirementAI/components/citations/stormee-citation/StormeeContent.js +1 -1
  95. package/dist/cjs/features/RequirementAI/components/citations/stormee-citation/components/GradientButton.js +1 -1
  96. package/dist/cjs/features/RequirementAI/components/citations/stormee-citation/components/ProblemStatementCard.js +1 -1
  97. package/dist/cjs/features/RequirementAI/components/citations/web-citation/FullScreenIcon.js +1 -1
  98. package/dist/cjs/features/RequirementAI/components/citations/web-citation/ImagePreviewDialog.js +1 -1
  99. package/dist/cjs/features/RequirementAI/components/citations/web-citation/WebCitation.js +1 -1
  100. package/dist/cjs/features/RequirementAI/components/citations/web-citation/WebCitationIcon.js +1 -1
  101. package/dist/cjs/features/RequirementAI/components/citations/web-citation/WebCitationRenderer.js +1 -1
  102. package/dist/cjs/features/RequirementAI/components/citations/web-citation/WebCitationWithImageContent.js +1 -1
  103. package/dist/cjs/features/RequirementAI/components/citations/web-citation/WebCitationWithImageRenderer.js +1 -1
  104. package/dist/cjs/features/RequirementAI/components/cra/PartialRequirementContent.js +1 -1
  105. package/dist/cjs/features/RequirementAI/components/lsc-reason-gap/CustomChatCrRedirection.js +1 -1
  106. package/dist/cjs/features/RequirementAI/components/lsc-reason-gap/GapFilterBlock.js +1 -1
  107. package/dist/cjs/features/RequirementAI/components/lsc-reason-gap/GapFilterContentWrapper.js +1 -1
  108. package/dist/cjs/features/RequirementAI/components/lsc-reason-gap/GapFilterItem.js +1 -1
  109. package/dist/cjs/features/RequirementAI/components/lsc-reason-gap/gapFilterSvgs.js +1 -1
  110. package/dist/cjs/features/RequirementAI/components/segment/ExampleComponentWrapper.js +1 -1
  111. package/dist/cjs/features/RequirementAI/components/segment/Segment.js +1 -1
  112. package/dist/cjs/features/RequirementAI/components/segment/SegmentLoader.js +1 -1
  113. package/dist/cjs/features/RequirementAI/components/segment/SegmentWrapper.js +1 -1
  114. package/dist/cjs/features/RequirementAI/components/story-screen/BigEnoughPanel.js +1 -1
  115. package/dist/cjs/features/RequirementAI/components/story-screen/CompletionPanel.js +1 -1
  116. package/dist/cjs/features/RequirementAI/components/story-screen/ReplaceLearnedTags.js +1 -1
  117. package/dist/cjs/features/RequirementAI/components/story-screen/StreamingScreenSidebar.js +1 -1
  118. package/dist/cjs/features/RequirementAI/components/story-screen/SubfeatureBlock.js +1 -1
  119. package/dist/cjs/features/RequirementAI/components/story-screen/UserStoryScreen.js +1 -1
  120. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalContext.js +1 -1
  121. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.js +1 -1
  122. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ApprovalBadge/ApprovalBadge.js +1 -1
  123. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ApprovalSidebar/ApprovalSidebar.js +1 -1
  124. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ApprovalSidebarItem/ApprovalSidebarItem.js +1 -1
  125. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ApprovalStatusBadge/ApprovalStatusBadge.js +1 -1
  126. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ContentBlock/ContentBlock.js +1 -1
  127. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ContentSegment/ContentSegment.js +1 -1
  128. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.js +1 -1
  129. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/HighlightButtonComponent.js +1 -1
  130. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.js +1 -1
  131. package/dist/cjs/features/RequirementAI/hooks/useApprovalStatus.js +1 -1
  132. package/dist/cjs/features/RequirementAI/hooks/useDiffEditReviewMode.js +1 -1
  133. package/dist/cjs/features/RequirementAI/hooks/useStreamContentHandler.js +1 -1
  134. package/dist/cjs/features/RequirementAI/icons/AiGapIcon.js +1 -1
  135. package/dist/cjs/features/RequirementAI/icons/AiReasoningIcon.js +1 -1
  136. package/dist/cjs/features/RequirementAI/icons/BigEnoughIcon.js +1 -1
  137. package/dist/cjs/features/RequirementAI/icons/BookmarkIcon.js +1 -1
  138. package/dist/cjs/features/RequirementAI/icons/BrainRed.js +1 -1
  139. package/dist/cjs/features/RequirementAI/icons/CDIcon.js +1 -1
  140. package/dist/cjs/features/RequirementAI/icons/CheckIcon.js +1 -1
  141. package/dist/cjs/features/RequirementAI/icons/ChevronDownIcon.js +1 -1
  142. package/dist/cjs/features/RequirementAI/icons/ChevronUpIcon.js +1 -1
  143. package/dist/cjs/features/RequirementAI/icons/CognitiveDecision.js +1 -1
  144. package/dist/cjs/features/RequirementAI/icons/MeetingHighlightsIcon.js +1 -1
  145. package/dist/cjs/features/RequirementAI/icons/MenuUnfoldIcon.js +1 -1
  146. package/dist/cjs/features/RequirementAI/icons/PencilIcon.js +1 -1
  147. package/dist/cjs/features/RequirementAI/icons/ReasoningBulbIcon.js +1 -1
  148. package/dist/cjs/features/RequirementAI/icons/RelevanceScoreIcon.js +1 -1
  149. package/dist/cjs/features/RequirementAI/icons/SidebarCloseIcon.js +1 -1
  150. package/dist/cjs/features/RequirementAI/icons/SidebarOpenIcon.js +1 -1
  151. package/dist/cjs/features/RequirementAI/icons/TrashIcon.js +1 -1
  152. package/dist/cjs/features/RequirementAI/shared/Accordian.js +1 -1
  153. package/dist/cjs/features/RequirementAI/shared/AtomicButton.js +1 -1
  154. package/dist/cjs/features/RequirementAI/shared/CitationAIConfidenceDisplay.js +1 -1
  155. package/dist/cjs/features/RequirementAI/shared/CitationLoadingIndicator.js +1 -1
  156. package/dist/cjs/features/RequirementAI/shared/CodeViewer.js +1 -1
  157. package/dist/cjs/features/RequirementAI/shared/ExpandableOl.js +1 -1
  158. package/dist/cjs/features/RequirementAI/shared/GeneratedCodeCitation.js +1 -1
  159. package/dist/cjs/features/RequirementAI/shared/ReqAiCitationRenderer.js +1 -1
  160. package/dist/cjs/features/RequirementAI/shared/UpdatedAnimationContent.js +1 -1
  161. package/dist/cjs/features/RequirementAI/shared/useMarkdownSearch.js +1 -1
  162. package/dist/cjs/features/RequirementAI/store/markdown-context.js +1 -1
  163. package/dist/cjs/features/RequirementAI/store/ref.context.js +1 -1
  164. package/dist/cjs/features/RequirementAI/utils/css.utils.js +1 -1
  165. package/dist/cjs/features/RequirementAI/utils/diff-edit.utils.js +1 -1
  166. package/dist/cjs/features/RequirementAI/utils/helpers.js +1 -1
  167. package/dist/cjs/features/RequirementAI/utils/json-helper.js +1 -1
  168. package/dist/cjs/features/RequirementAI/utils/learned-tag.utils.js +1 -1
  169. package/dist/cjs/features/RequirementAI/utils/proccess-stream.utils.js +1 -1
  170. package/dist/cjs/features/RequirementAI/utils/user-story.utils.js +1 -1
  171. package/dist/cjs/features/RequirementAI/utils/userStoryAttachedContext.utils.js +1 -1
  172. package/dist/cjs/features/RequirementAI/utils/userstory-approval-transform.utils.js +1 -1
  173. package/dist/cjs/features/RequirementAI/utils/userstory-approval.utils.js +1 -1
  174. package/dist/cjs/features/RequirementAiCitations/AiReasoning/components/AIConfidenceDisplay.js +1 -1
  175. package/dist/cjs/features/RequirementAiCitations/AiReasoning/components/icons/DocumentCitationIcon.js +1 -1
  176. package/dist/cjs/features/RequirementAiCitations/AiReasoning/components/icons/RelevanceScoreIcon.js +1 -1
  177. package/dist/cjs/features/UserStoryImport/UserStoryPicker.context.js +1 -1
  178. package/dist/cjs/features/UserStoryImport/UserStoryPicker.js +1 -1
  179. package/dist/cjs/features/UserStoryImport/UserStoryPicker.theme.js +1 -1
  180. package/dist/cjs/features/UserStoryImport/components/BackNav.js +1 -1
  181. package/dist/cjs/features/UserStoryImport/components/Badge.js +1 -1
  182. package/dist/cjs/features/UserStoryImport/components/BrowseProjectsButton.js +1 -1
  183. package/dist/cjs/features/UserStoryImport/components/CardGrid.js +1 -1
  184. package/dist/cjs/features/UserStoryImport/components/CardProceedButton.js +1 -1
  185. package/dist/cjs/features/UserStoryImport/components/ContentArea.js +1 -1
  186. package/dist/cjs/features/UserStoryImport/components/Footer.js +1 -1
  187. package/dist/cjs/features/UserStoryImport/components/Header.js +1 -1
  188. package/dist/cjs/features/UserStoryImport/components/NavRow.js +1 -1
  189. package/dist/cjs/features/UserStoryImport/components/ProceedButton.js +1 -1
  190. package/dist/cjs/features/UserStoryImport/components/ProjectCard.js +1 -1
  191. package/dist/cjs/features/UserStoryImport/components/ResizeHandle.js +1 -1
  192. package/dist/cjs/features/UserStoryImport/components/ScopeDropdown.js +1 -1
  193. package/dist/cjs/features/UserStoryImport/components/SearchInput.js +1 -1
  194. package/dist/cjs/features/UserStoryImport/components/SectionHeading.js +1 -1
  195. package/dist/cjs/features/UserStoryImport/components/ShowMore.js +1 -1
  196. package/dist/cjs/features/UserStoryImport/components/Sidebar.js +1 -1
  197. package/dist/cjs/features/UserStoryImport/components/SidebarFavoritesList.js +1 -1
  198. package/dist/cjs/features/UserStoryImport/components/SidebarProjectList.js +1 -1
  199. package/dist/cjs/features/UserStoryImport/components/SidebarSection.js +1 -1
  200. package/dist/cjs/features/UserStoryImport/components/SortDropdown.js +1 -1
  201. package/dist/cjs/features/UserStoryImport/components/SplitLayout.js +1 -1
  202. package/dist/cjs/features/UserStoryImport/components/Toolbar.js +1 -1
  203. package/dist/cjs/features/UserStoryImport/components/TypeDropdown.js +1 -1
  204. package/dist/cjs/features/UserStoryImport/components/UserStoryCard.js +1 -1
  205. package/dist/cjs/features/UserStoryImport/components/UserStoryImportDialog.js +1 -1
  206. package/dist/cjs/features/UserStoryImport/components/UserStoryScopeDropdown.js +1 -1
  207. package/dist/cjs/features/UserStoryImport/components/usePanelResize.js +1 -1
  208. package/dist/cjs/features/UserStoryImport/hooks/useFilteredItems.js +1 -1
  209. package/dist/cjs/features/UserStoryImport/hooks/useUSPData.js +1 -1
  210. package/dist/cjs/features/UserStoryImport/hooks/useUserStoryPickerState.js +1 -1
  211. package/dist/cjs/features/UserStoryImport/index.js +1 -1
  212. package/dist/cjs/features/UserStoryImport/lib/CustomTooltip.js +1 -1
  213. package/dist/cjs/features/UserStoryImport/lib/Tooltip.js +1 -1
  214. package/dist/cjs/features/UserStoryImport/lib/cn.js +1 -1
  215. package/dist/cjs/features/UserStoryImport/lib/dialog.js +1 -1
  216. package/dist/cjs/index.js +1 -1
  217. package/dist/features/CitationRenderer/CitationRenderer.js +1 -1
  218. package/dist/features/RequirementAI/components/CustomPopover/CustomPopover.js +1 -1
  219. package/dist/features/RequirementAI/components/GapRiskSidebar/GapRiskSidebar.js +1 -1
  220. package/dist/features/RequirementAI/components/GapRiskSidebar/components/GapItem/GapItem.js +1 -1
  221. package/dist/features/RequirementAI/components/GapRiskSidebar/components/RiskCategorySection/RiskCategorySection.js +1 -1
  222. package/dist/features/RequirementAI/components/GapRiskSidebar/components/RiskSidebarCategorySection/RiskSidebarCategorySection.js +1 -1
  223. package/dist/features/RequirementAI/components/GapRiskSidebar/components/StoryNode/StoryNode.js +1 -1
  224. package/dist/features/RequirementAI/components/GapRiskSidebar/utils/buildStoryWithGap.js +1 -1
  225. package/dist/features/RequirementAI/components/GapRiskSidebar/utils/buildStoryWithRisk.js +1 -1
  226. package/dist/features/RequirementAI/components/RecommendationBlock/RecommendationBlock.js +1 -1
  227. package/dist/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.js +1 -1
  228. package/dist/features/RequirementAI/components/RichTextEditor/Editor/Editor.js +1 -1
  229. package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/Context/ContextMenu.js +1 -1
  230. package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/EditorContainer/EditorContainer.js +1 -1
  231. package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/EditorPlaceholder/EditorPlaceholder.js +1 -1
  232. package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/EditorToolbar.js +1 -1
  233. package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/components/ToolbarButton/ToolbarButton.js +1 -1
  234. package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/components/ToolbarDivider/ToolbarDivider.js +1 -1
  235. package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/components/UndoRedo/UndoRedo.js +1 -1
  236. package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/Icons/Icon.js +1 -1
  237. package/dist/features/RequirementAI/components/RichTextEditor/Editor/constants/editorConfig.js +1 -1
  238. package/dist/features/RequirementAI/components/RichTextEditor/Editor/constants/objects.js +1 -1
  239. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/CommentPlugin/HTMLNode.js +1 -1
  240. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/DeleteNode.js +1 -1
  241. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/HighlightNode.js +1 -1
  242. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/InitialHtml.js +1 -1
  243. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/InsertNode.js +1 -1
  244. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/LayoutPlugin.js +1 -1
  245. package/dist/features/RequirementAI/components/RichTextEditor/Editor/theme/theme.js +1 -1
  246. package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/getSelectedNode.js +1 -1
  247. package/dist/features/RequirementAI/components/RichTextEditor/RichTextEditor.js +1 -1
  248. package/dist/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.js +1 -1
  249. package/dist/features/RequirementAI/components/UserStoryCard/AttachedContext.js +1 -1
  250. package/dist/features/RequirementAI/components/UserStoryCard/ClinicalTrialSection.js +1 -1
  251. package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationAnchor.js +1 -1
  252. package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.js +1 -1
  253. package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/ResizableSplitPane.js +1 -1
  254. package/dist/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.js +1 -1
  255. package/dist/features/RequirementAI/components/UserStoryCard/Popups/IterateComponent.js +1 -1
  256. package/dist/features/RequirementAI/components/UserStoryCard/Popups/PopupDefaults.js +1 -1
  257. package/dist/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.js +1 -1
  258. package/dist/features/RequirementAI/components/UserStoryCard/Popups/ToneToggle.js +1 -1
  259. package/dist/features/RequirementAI/components/UserStoryCard/TitleEditor/TitleEditor.js +1 -1
  260. package/dist/features/RequirementAI/components/UserStoryCard/UserStoryCard.js +1 -1
  261. package/dist/features/RequirementAI/components/UserStoryCard/UserStoryCard.module.css.js +1 -1
  262. package/dist/features/RequirementAI/components/UserStoryCard/icons/PdfViewerIcons.js +1 -1
  263. package/dist/features/RequirementAI/components/ai-reasoning/AIReasonAccordion.js +1 -1
  264. package/dist/features/RequirementAI/components/ai-reasoning/AiReasonMarkdownWrapper.js +1 -1
  265. package/dist/features/RequirementAI/components/ai-reasoning/AiReasoningCitation.js +1 -1
  266. package/dist/features/RequirementAI/components/ai-reasoning/AiReasoningCitationContent.js +1 -1
  267. package/dist/features/RequirementAI/components/ai-reasoning/BigEnoughComponent.js +1 -1
  268. package/dist/features/RequirementAI/components/ai-reasoning/CitationPdfRendererWrapper.js +1 -1
  269. package/dist/features/RequirementAI/components/ai-reasoning/CitationPdfViewer.js +1 -1
  270. package/dist/features/RequirementAI/components/ai-reasoning/ScannedCitationRenderer.js +1 -1
  271. package/dist/features/RequirementAI/components/ai-reasoning/pdfCitationUtils.js +1 -1
  272. package/dist/features/RequirementAI/components/citations/appmod-citation/AppmodCitationContent.js +1 -1
  273. package/dist/features/RequirementAI/components/citations/appmod-citation/AppmodCitationRenderer.js +1 -1
  274. package/dist/features/RequirementAI/components/citations/appmod-citation/components/CodeLinkHandler.js +1 -1
  275. package/dist/features/RequirementAI/components/citations/appmod-citation/icons/AppmodIcon.js +1 -1
  276. package/dist/features/RequirementAI/components/citations/appmod-citation/icons/ChatBubbleIcon.js +1 -1
  277. package/dist/features/RequirementAI/components/citations/appmod-citation/icons/SparkleIcon.js +1 -1
  278. package/dist/features/RequirementAI/components/citations/appmod-citation/types.js +1 -1
  279. package/dist/features/RequirementAI/components/citations/audio-citation/SearchWaveFromWrapper.js +1 -1
  280. package/dist/features/RequirementAI/components/citations/audio-citation/WaveformCitationRenderer.js +1 -1
  281. package/dist/features/RequirementAI/components/citations/audio-citation/components/AudioCitationIcon.js +1 -1
  282. package/dist/features/RequirementAI/components/citations/audio-citation/components/AudioTimeLineSlider.js +1 -1
  283. package/dist/features/RequirementAI/components/citations/audio-citation/components/SegmentByWordsViral.js +1 -1
  284. package/dist/features/RequirementAI/components/citations/audio-citation/components/videoPlayer.js +1 -1
  285. package/dist/features/RequirementAI/components/citations/audio-citation/icons/AudioLinesIcon.js +1 -1
  286. package/dist/features/RequirementAI/components/citations/audio-citation/icons/MaximizeIcon.js +1 -1
  287. package/dist/features/RequirementAI/components/citations/audio-citation/icons/MinimizeIcon.js +1 -1
  288. package/dist/features/RequirementAI/components/citations/audio-citation/icons/PauseIcon.js +1 -1
  289. package/dist/features/RequirementAI/components/citations/audio-citation/icons/PlayIcon.js +1 -1
  290. package/dist/features/RequirementAI/components/citations/audio-citation/icons/PlaybackSpeedIcon.js +1 -1
  291. package/dist/features/RequirementAI/components/citations/audio-citation/icons/VideoIcon.js +1 -1
  292. package/dist/features/RequirementAI/components/citations/audio-citation/searchwaveform.js +1 -1
  293. package/dist/features/RequirementAI/components/citations/audio-citation/store/autoplay.wavefrom.js +1 -1
  294. package/dist/features/RequirementAI/components/citations/audio-citation/utils/word-segment-util.js +1 -1
  295. package/dist/features/RequirementAI/components/citations/big-enough/BigEnoughCitationRenderer.js +1 -1
  296. package/dist/features/RequirementAI/components/citations/chat-citation/ChatCitationRenderer.js +1 -1
  297. package/dist/features/RequirementAI/components/citations/file-citation/DocumentCitationIcon.js +1 -1
  298. package/dist/features/RequirementAI/components/citations/file-citation/FileCitationContent.js +1 -1
  299. package/dist/features/RequirementAI/components/citations/file-citation/FileCitationRender.js +1 -1
  300. package/dist/features/RequirementAI/components/citations/gpt-web-citation/GptWebCitationRenderer.js +1 -1
  301. package/dist/features/RequirementAI/components/citations/gpt-web-citation/GptWebcitationPanel.js +1 -1
  302. package/dist/features/RequirementAI/components/citations/image-citation/ImageCitationContent.js +1 -1
  303. package/dist/features/RequirementAI/components/citations/image-citation/ImageCitationIcon.js +1 -1
  304. package/dist/features/RequirementAI/components/citations/image-citation/ImageCitationRenderer.js +1 -1
  305. package/dist/features/RequirementAI/components/citations/rca-citation/RCACitationContent.js +1 -1
  306. package/dist/features/RequirementAI/components/citations/rca-citation/RCACitationRenderer.js +1 -1
  307. package/dist/features/RequirementAI/components/citations/readfile-citation/CustomFileIcon.js +1 -1
  308. package/dist/features/RequirementAI/components/citations/readfile-citation/ReadFileCitationContent.js +1 -1
  309. package/dist/features/RequirementAI/components/citations/readfile-citation/ReadFileCitationRenderer.js +1 -1
  310. package/dist/features/RequirementAI/components/citations/readfile-citation/icons/ExternalLinkIcon.js +1 -1
  311. package/dist/features/RequirementAI/components/citations/readfile-citation/icons/FileCodeIcon.js +1 -1
  312. package/dist/features/RequirementAI/components/citations/stormee-citation/StormeeCitationRenderer.js +1 -1
  313. package/dist/features/RequirementAI/components/citations/stormee-citation/StormeeContent.js +1 -1
  314. package/dist/features/RequirementAI/components/citations/stormee-citation/components/GradientButton.js +1 -1
  315. package/dist/features/RequirementAI/components/citations/stormee-citation/components/ProblemStatementCard.js +1 -1
  316. package/dist/features/RequirementAI/components/citations/web-citation/FullScreenIcon.js +1 -1
  317. package/dist/features/RequirementAI/components/citations/web-citation/ImagePreviewDialog.js +1 -1
  318. package/dist/features/RequirementAI/components/citations/web-citation/WebCitation.js +1 -1
  319. package/dist/features/RequirementAI/components/citations/web-citation/WebCitationIcon.js +1 -1
  320. package/dist/features/RequirementAI/components/citations/web-citation/WebCitationRenderer.js +1 -1
  321. package/dist/features/RequirementAI/components/citations/web-citation/WebCitationWithImageContent.js +1 -1
  322. package/dist/features/RequirementAI/components/citations/web-citation/WebCitationWithImageRenderer.js +1 -1
  323. package/dist/features/RequirementAI/components/cra/PartialRequirementContent.js +1 -1
  324. package/dist/features/RequirementAI/components/lsc-reason-gap/CustomChatCrRedirection.js +1 -1
  325. package/dist/features/RequirementAI/components/lsc-reason-gap/GapFilterBlock.js +1 -1
  326. package/dist/features/RequirementAI/components/lsc-reason-gap/GapFilterContentWrapper.js +1 -1
  327. package/dist/features/RequirementAI/components/lsc-reason-gap/GapFilterItem.js +1 -1
  328. package/dist/features/RequirementAI/components/lsc-reason-gap/gapFilterSvgs.js +1 -1
  329. package/dist/features/RequirementAI/components/segment/ExampleComponentWrapper.js +1 -1
  330. package/dist/features/RequirementAI/components/segment/Segment.js +1 -1
  331. package/dist/features/RequirementAI/components/segment/SegmentLoader.js +1 -1
  332. package/dist/features/RequirementAI/components/segment/SegmentWrapper.js +1 -1
  333. package/dist/features/RequirementAI/components/story-screen/BigEnoughPanel.js +1 -1
  334. package/dist/features/RequirementAI/components/story-screen/CompletionPanel.js +1 -1
  335. package/dist/features/RequirementAI/components/story-screen/ReplaceLearnedTags.js +1 -1
  336. package/dist/features/RequirementAI/components/story-screen/StreamingScreenSidebar.js +1 -1
  337. package/dist/features/RequirementAI/components/story-screen/SubfeatureBlock.js +1 -1
  338. package/dist/features/RequirementAI/components/story-screen/UserStoryScreen.js +1 -1
  339. package/dist/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalContext.js +1 -1
  340. package/dist/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.js +1 -1
  341. package/dist/features/RequirementAI/components/userstory-approval-screen/components/ApprovalBadge/ApprovalBadge.js +1 -1
  342. package/dist/features/RequirementAI/components/userstory-approval-screen/components/ApprovalSidebar/ApprovalSidebar.js +1 -1
  343. package/dist/features/RequirementAI/components/userstory-approval-screen/components/ApprovalSidebarItem/ApprovalSidebarItem.js +1 -1
  344. package/dist/features/RequirementAI/components/userstory-approval-screen/components/ApprovalStatusBadge/ApprovalStatusBadge.js +1 -1
  345. package/dist/features/RequirementAI/components/userstory-approval-screen/components/ContentBlock/ContentBlock.js +1 -1
  346. package/dist/features/RequirementAI/components/userstory-approval-screen/components/ContentSegment/ContentSegment.js +1 -1
  347. package/dist/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.js +1 -1
  348. package/dist/features/RequirementAI/components/userstory-with-citation/components/HighlightButtonComponent.js +1 -1
  349. package/dist/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.js +1 -1
  350. package/dist/features/RequirementAI/hooks/useApprovalStatus.js +1 -1
  351. package/dist/features/RequirementAI/hooks/useDiffEditReviewMode.js +1 -1
  352. package/dist/features/RequirementAI/hooks/useStreamContentHandler.js +1 -1
  353. package/dist/features/RequirementAI/icons/AiGapIcon.js +1 -1
  354. package/dist/features/RequirementAI/icons/AiReasoningIcon.js +1 -1
  355. package/dist/features/RequirementAI/icons/BigEnoughIcon.js +1 -1
  356. package/dist/features/RequirementAI/icons/BookmarkIcon.js +1 -1
  357. package/dist/features/RequirementAI/icons/BrainRed.js +1 -1
  358. package/dist/features/RequirementAI/icons/CDIcon.js +1 -1
  359. package/dist/features/RequirementAI/icons/CheckIcon.js +1 -1
  360. package/dist/features/RequirementAI/icons/ChevronDownIcon.js +1 -1
  361. package/dist/features/RequirementAI/icons/ChevronUpIcon.js +1 -1
  362. package/dist/features/RequirementAI/icons/CognitiveDecision.js +1 -1
  363. package/dist/features/RequirementAI/icons/MeetingHighlightsIcon.js +1 -1
  364. package/dist/features/RequirementAI/icons/MenuUnfoldIcon.js +1 -1
  365. package/dist/features/RequirementAI/icons/PencilIcon.js +1 -1
  366. package/dist/features/RequirementAI/icons/ReasoningBulbIcon.js +1 -1
  367. package/dist/features/RequirementAI/icons/RelevanceScoreIcon.js +1 -1
  368. package/dist/features/RequirementAI/icons/SidebarCloseIcon.js +1 -1
  369. package/dist/features/RequirementAI/icons/SidebarOpenIcon.js +1 -1
  370. package/dist/features/RequirementAI/icons/TrashIcon.js +1 -1
  371. package/dist/features/RequirementAI/shared/Accordian.js +1 -1
  372. package/dist/features/RequirementAI/shared/AtomicButton.js +1 -1
  373. package/dist/features/RequirementAI/shared/CitationAIConfidenceDisplay.js +1 -1
  374. package/dist/features/RequirementAI/shared/CitationLoadingIndicator.js +1 -1
  375. package/dist/features/RequirementAI/shared/CodeViewer.js +1 -1
  376. package/dist/features/RequirementAI/shared/ExpandableOl.js +1 -1
  377. package/dist/features/RequirementAI/shared/GeneratedCodeCitation.js +1 -1
  378. package/dist/features/RequirementAI/shared/ReqAiCitationRenderer.js +1 -1
  379. package/dist/features/RequirementAI/shared/UpdatedAnimationContent.js +1 -1
  380. package/dist/features/RequirementAI/shared/useMarkdownSearch.js +1 -1
  381. package/dist/features/RequirementAI/store/markdown-context.js +1 -1
  382. package/dist/features/RequirementAI/store/ref.context.js +1 -1
  383. package/dist/features/RequirementAI/utils/css.utils.js +1 -1
  384. package/dist/features/RequirementAI/utils/diff-edit.utils.js +1 -1
  385. package/dist/features/RequirementAI/utils/helpers.js +1 -1
  386. package/dist/features/RequirementAI/utils/json-helper.js +1 -1
  387. package/dist/features/RequirementAI/utils/learned-tag.utils.js +1 -1
  388. package/dist/features/RequirementAI/utils/proccess-stream.utils.js +1 -1
  389. package/dist/features/RequirementAI/utils/user-story.utils.js +1 -1
  390. package/dist/features/RequirementAI/utils/userStoryAttachedContext.utils.js +1 -1
  391. package/dist/features/RequirementAI/utils/userstory-approval-transform.utils.js +1 -1
  392. package/dist/features/RequirementAI/utils/userstory-approval.utils.js +1 -1
  393. package/dist/features/RequirementAiCitations/AiReasoning/components/AIConfidenceDisplay.js +1 -1
  394. package/dist/features/RequirementAiCitations/AiReasoning/components/icons/DocumentCitationIcon.js +1 -1
  395. package/dist/features/RequirementAiCitations/AiReasoning/components/icons/RelevanceScoreIcon.js +1 -1
  396. package/dist/features/UserStoryImport/UserStoryPicker.context.js +1 -1
  397. package/dist/features/UserStoryImport/UserStoryPicker.js +1 -1
  398. package/dist/features/UserStoryImport/UserStoryPicker.theme.js +1 -1
  399. package/dist/features/UserStoryImport/components/BackNav.js +1 -1
  400. package/dist/features/UserStoryImport/components/Badge.js +1 -1
  401. package/dist/features/UserStoryImport/components/BrowseProjectsButton.js +1 -1
  402. package/dist/features/UserStoryImport/components/CardGrid.js +1 -1
  403. package/dist/features/UserStoryImport/components/CardProceedButton.js +1 -1
  404. package/dist/features/UserStoryImport/components/ContentArea.js +1 -1
  405. package/dist/features/UserStoryImport/components/Footer.js +1 -1
  406. package/dist/features/UserStoryImport/components/Header.js +1 -1
  407. package/dist/features/UserStoryImport/components/NavRow.js +1 -1
  408. package/dist/features/UserStoryImport/components/ProceedButton.js +1 -1
  409. package/dist/features/UserStoryImport/components/ProjectCard.js +1 -1
  410. package/dist/features/UserStoryImport/components/ResizeHandle.js +1 -1
  411. package/dist/features/UserStoryImport/components/ScopeDropdown.js +1 -1
  412. package/dist/features/UserStoryImport/components/SearchInput.js +1 -1
  413. package/dist/features/UserStoryImport/components/SectionHeading.js +1 -1
  414. package/dist/features/UserStoryImport/components/ShowMore.js +1 -1
  415. package/dist/features/UserStoryImport/components/Sidebar.js +1 -1
  416. package/dist/features/UserStoryImport/components/SidebarFavoritesList.js +1 -1
  417. package/dist/features/UserStoryImport/components/SidebarProjectList.js +1 -1
  418. package/dist/features/UserStoryImport/components/SidebarSection.js +1 -1
  419. package/dist/features/UserStoryImport/components/SortDropdown.js +1 -1
  420. package/dist/features/UserStoryImport/components/SplitLayout.js +1 -1
  421. package/dist/features/UserStoryImport/components/Toolbar.js +1 -1
  422. package/dist/features/UserStoryImport/components/TypeDropdown.js +1 -1
  423. package/dist/features/UserStoryImport/components/UserStoryCard.js +1 -1
  424. package/dist/features/UserStoryImport/components/UserStoryImportDialog.js +1 -1
  425. package/dist/features/UserStoryImport/components/UserStoryScopeDropdown.js +1 -1
  426. package/dist/features/UserStoryImport/components/usePanelResize.js +1 -1
  427. package/dist/features/UserStoryImport/hooks/useFilteredItems.js +1 -1
  428. package/dist/features/UserStoryImport/hooks/useUSPData.js +1 -1
  429. package/dist/features/UserStoryImport/hooks/useUserStoryPickerState.js +1 -1
  430. package/dist/features/UserStoryImport/index.js +1 -1
  431. package/dist/features/UserStoryImport/lib/CustomTooltip.js +1 -1
  432. package/dist/features/UserStoryImport/lib/Tooltip.js +1 -1
  433. package/dist/features/UserStoryImport/lib/cn.js +1 -1
  434. package/dist/features/UserStoryImport/lib/dialog.js +1 -1
  435. package/dist/index.js +1 -1
  436. package/dist/types/src/features/RequirementAI/components/UserStoryCard/UserStoryCard.d.ts +11 -2
  437. package/dist/types/src/features/RequirementAI/components/UserStoryCard/UserStoryCard.d.ts.map +1 -1
  438. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsx as n,jsxs as i}from"react/jsx-runtime";import o from"./CodeLinkHandler.module.css.js";import{ExternalLinkIcon as t,ChevronUpIcon as a,ChevronDownIcon as r}from"lucide-react";import{CodeCitation as l}from"@e-llm-studio/citation";import{DEFAULT_HIGHLIGHT_THEME as d}from"../types.js";var s=function(s){var c,m,f=s.href,u=s.children,h=s.codeLinkConfig,p=s.isHighlighted,g=void 0!==p&&p,C=s.highlightTheme,v=void 0===C?d:C,k=s.customStyles,b=s.customIcon;if(!f)return n("span",{children:u});var w,L,x=function(e){try{var n=new URL(e,"http://example.com"),i=n.searchParams.get("startLine"),o=n.searchParams.get("endLine"),t=n.searchParams.get("validation");n.searchParams.delete("startLine"),n.searchParams.delete("endLine"),n.searchParams.delete("validation");var a=n.pathname+n.search;return{filePath:decodeURIComponent(a.replace(/^\//,"")),fullPath:decodeURIComponent(e),startLine:i,endLine:o,validation:t}}catch(n){return{filePath:e,fullPath:e,startLine:null,endLine:null,validation:null}}}(f),y="string"==typeof u?u.split("\n").length>1?"Generated Code":u:(null===(c=null==u?void 0:u.props)||void 0===c?void 0:c.children)||f||"Generated Code";if("vscode"===(null==h?void 0:h.mode)){var P=g?{backgroundColor:v.linkBackground,borderColor:v.linkBorder}:void 0,I=g?{color:v.linkText}:void 0,N=g?{color:v.linkIconColor}:null==k?void 0:k.linkIcon,S=b||n(t,{className:o.linkIcon,style:N});return n("a",e({href:f,title:f,onClick:function(e){e.preventDefault(),(null==h?void 0:h.onCodeLinkClick)&&h.onCodeLinkClick({filePath:x.filePath,startLine:x.startLine,endLine:x.endLine,validation:x.validation})},className:o.linkContainer,style:null==k?void 0:k.link},{children:i("span",e({className:o.linkWrapper,style:P},{children:[S,n("span",e({className:o.linkText,style:I},{children:u}))]}))}))}if("web"===(null==h?void 0:h.mode)&&h.webConfig){var T=(w=x.filePath,(L=/\.(\w+)$/.exec(w))?L[1]:"plaintext");return n(l,{baseUrlForCodeRetrieval:h.baseUrlForCodeRetrieval||"",filepath:x.fullPath,assistantName:h.webConfig.assistantName,organizationName:h.webConfig.organizationName,userId:h.webConfig.userId,taskId:h.webConfig.taskId,repoUrl:h.webConfig.repoUrl,inLineCitation:!0,citationTitle:y,filename:"Generated Code"!==y?x.filePath:".".concat(T),fileSummarySectionTitle:"File Summary",citationContainerTitle:"Code Preview",showFileSummaryIButton:!0,showFullscreenIcon:!0,showThemeToggle:!0,isDarkModeEnabled:null===(m=h.webConfig.isDarkModeEnabled)||void 0===m||m,chevronUpComponent:h.webConfig.chevronUpComponent||n(a,{}),chevronDownComponent:h.webConfig.chevronDownComponent||n(r,{}),isHighlightingEnabled:!0,editorHeight:"95%",editorWidth:"100%",startIndex:x.startLine?Number(x.startLine):void 0,endIndex:x.endLine?Number(x.endLine):void 0,datasource:h.webConfig.datasource,styles:{pillButton:e({display:"inline-flex",alignItems:"center",fontFamily:"Plus Jakarta Sans, sans-serif",backgroundColor:"transparent",padding:"0px",fontSize:"13px",borderRadius:"9999px",cursor:"pointer",color:"#d63384",border:"none",textDecoration:"none",wordBreak:"break-word",whiteSpace:"normal"},null==k?void 0:k.link),citationWrapper:{justifyContent:"flex-start",width:"100%"},citationContent:{width:"100%",height:"500px",backgroundColor:"#eff6ff",border:"1px solid #000",padding:"8px",borderRadius:"4px"},citationContainerTitle:{fontFamily:"Plus Jakarta Sans, sans-serif",display:"flex",justifyContent:"space-between",alignItems:"center",color:"#000",fontSize:"16px",fontWeight:"bold",marginBottom:"8px"}}})}return n("a",e({href:f,target:"_blank",rel:"noopener noreferrer",className:o.regularLink,style:null==k?void 0:k.link},{children:u}))};export{s as default};
1
+ import{jsx as e,jsxs as n}from"react/jsx-runtime";import i from"./CodeLinkHandler.module.css.js";import{ExternalLinkIcon as t,ChevronUpIcon as o,ChevronDownIcon as a}from"lucide-react";import{CodeCitation as r}from"@e-llm-studio/citation";import{DEFAULT_HIGHLIGHT_THEME as l}from"../types.js";const s=({href:s,children:d,codeLinkConfig:c,isHighlighted:m=!1,highlightTheme:h=l,customStyles:u,customIcon:f})=>{var p,g;if(!s)return e("span",{children:d});const C=(e=>{try{const n=new URL(e,"http://example.com"),i=n.searchParams.get("startLine"),t=n.searchParams.get("endLine"),o=n.searchParams.get("validation");n.searchParams.delete("startLine"),n.searchParams.delete("endLine"),n.searchParams.delete("validation");const a=n.pathname+n.search;return{filePath:decodeURIComponent(a.replace(/^\//,"")),fullPath:decodeURIComponent(e),startLine:i,endLine:t,validation:o}}catch(n){return{filePath:e,fullPath:e,startLine:null,endLine:null,validation:null}}})(s),b="string"==typeof d?d.split("\n").length>1?"Generated Code":d:(null===(p=null==d?void 0:d.props)||void 0===p?void 0:p.children)||s||"Generated Code";if("vscode"===(null==c?void 0:c.mode)){const o=e=>{e.preventDefault(),(null==c?void 0:c.onCodeLinkClick)&&c.onCodeLinkClick({filePath:C.filePath,startLine:C.startLine,endLine:C.endLine,validation:C.validation})},a=m?{backgroundColor:h.linkBackground,borderColor:h.linkBorder}:void 0,r=m?{color:h.linkText}:void 0,l=m?{color:h.linkIconColor}:null==u?void 0:u.linkIcon,p=f||e(t,{className:i.linkIcon,style:l});return e("a",Object.assign({href:s,title:s,onClick:o,className:i.linkContainer,style:null==u?void 0:u.link},{children:n("span",Object.assign({className:i.linkWrapper,style:a},{children:[p,e("span",Object.assign({className:i.linkText,style:r},{children:d}))]}))}))}if("web"===(null==c?void 0:c.mode)&&c.webConfig){const n=(e=>{const n=/\.(\w+)$/.exec(e);return n?n[1]:"plaintext"})(C.filePath);return e(r,{baseUrlForCodeRetrieval:c.baseUrlForCodeRetrieval||"",filepath:C.fullPath,assistantName:c.webConfig.assistantName,organizationName:c.webConfig.organizationName,userId:c.webConfig.userId,taskId:c.webConfig.taskId,repoUrl:c.webConfig.repoUrl,inLineCitation:!0,citationTitle:b,filename:"Generated Code"!==b?C.filePath:`.${n}`,fileSummarySectionTitle:"File Summary",citationContainerTitle:"Code Preview",showFileSummaryIButton:!0,showFullscreenIcon:!0,showThemeToggle:!0,isDarkModeEnabled:null===(g=c.webConfig.isDarkModeEnabled)||void 0===g||g,chevronUpComponent:c.webConfig.chevronUpComponent||e(o,{}),chevronDownComponent:c.webConfig.chevronDownComponent||e(a,{}),isHighlightingEnabled:!0,editorHeight:"95%",editorWidth:"100%",startIndex:C.startLine?Number(C.startLine):void 0,endIndex:C.endLine?Number(C.endLine):void 0,datasource:c.webConfig.datasource,styles:{pillButton:Object.assign({display:"inline-flex",alignItems:"center",fontFamily:"Plus Jakarta Sans, sans-serif",backgroundColor:"transparent",padding:"0px",fontSize:"13px",borderRadius:"9999px",cursor:"pointer",color:"#d63384",border:"none",textDecoration:"none",wordBreak:"break-word",whiteSpace:"normal"},null==u?void 0:u.link),citationWrapper:{justifyContent:"flex-start",width:"100%"},citationContent:{width:"100%",height:"500px",backgroundColor:"#eff6ff",border:"1px solid #000",padding:"8px",borderRadius:"4px"},citationContainerTitle:{fontFamily:"Plus Jakarta Sans, sans-serif",display:"flex",justifyContent:"space-between",alignItems:"center",color:"#000",fontSize:"16px",fontWeight:"bold",marginBottom:"8px"}}})}return e("a",Object.assign({href:s,target:"_blank",rel:"noopener noreferrer",className:i.regularLink,style:null==u?void 0:u.link},{children:d}))};export{s as default};
2
2
  //# sourceMappingURL=CodeLinkHandler.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as r}from"tslib";import{jsxs as o,jsx as t}from"react/jsx-runtime";var e=function(e){var n=e.className,s=e.style;return o("svg",r({className:n,style:s,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[t("path",{d:"M12 2L2 7L12 12L22 7L12 2Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),t("path",{d:"M2 17L12 22L22 17",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),t("path",{d:"M2 12L12 17L22 12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}))};export{e as AppModIcon};
1
+ import{jsxs as o,jsx as r}from"react/jsx-runtime";const e=({className:e,style:t})=>o("svg",Object.assign({className:e,style:t,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[r("path",{d:"M12 2L2 7L12 12L22 7L12 2Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),r("path",{d:"M2 17L12 22L22 17",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),r("path",{d:"M2 12L12 17L22 12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}));export{e as AppModIcon};
2
2
  //# sourceMappingURL=AppmodIcon.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as t}from"tslib";import{jsx as r}from"react/jsx-runtime";var e=function(e){var o=e.className,s=e.style;return r("svg",t({className:o,style:s,width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",xmlns:"http://www.w3.org/2000/svg"},{children:r("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})}))};export{e as ChatBubbleIcon};
1
+ import{jsx as t}from"react/jsx-runtime";const e=({className:e,style:s})=>t("svg",Object.assign({className:e,style:s,width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",xmlns:"http://www.w3.org/2000/svg"},{children:t("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})}));export{e as ChatBubbleIcon};
2
2
  //# sourceMappingURL=ChatBubbleIcon.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as t}from"tslib";import{jsx as r}from"react/jsx-runtime";var e=function(e){var s=e.className,i=e.style;return r("svg",t({className:s,style:i,width:"12",height:"12",viewBox:"0 0 24 24",fill:"#3b82f6",xmlns:"http://www.w3.org/2000/svg"},{children:r("path",{d:"M12 0L14.59 9.41L24 12L14.59 14.59L12 24L9.41 14.59L0 12L9.41 9.41L12 0Z"})}))};export{e as SparkleIcon};
1
+ import{jsx as s}from"react/jsx-runtime";const t=({className:t,style:e})=>s("svg",Object.assign({className:t,style:e,width:"12",height:"12",viewBox:"0 0 24 24",fill:"#3b82f6",xmlns:"http://www.w3.org/2000/svg"},{children:s("path",{d:"M12 0L14.59 9.41L24 12L14.59 14.59L12 24L9.41 14.59L0 12L9.41 9.41L12 0Z"})}));export{t as SparkleIcon};
2
2
  //# sourceMappingURL=SparkleIcon.js.map
@@ -1,2 +1,2 @@
1
- var d={background:"#fef3c7",text:"#92400e",border:"#fcd34d",linkBackground:"#fef3c7",linkText:"#92400e",linkBorder:"#fcd34d",linkIconColor:"#d97706",codeBackground:"#fef3c7",codeText:"#92400e",codeBorder:"#fcd34d"};export{d as DEFAULT_HIGHLIGHT_THEME};
1
+ const d={background:"#fef3c7",text:"#92400e",border:"#fcd34d",linkBackground:"#fef3c7",linkText:"#92400e",linkBorder:"#fcd34d",linkIconColor:"#d97706",codeBackground:"#fef3c7",codeText:"#92400e",codeBorder:"#fcd34d"};export{d as DEFAULT_HIGHLIGHT_THEME};
2
2
  //# sourceMappingURL=types.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e,__awaiter as t,__generator as i}from"tslib";import{jsx as n,jsxs as o}from"react/jsx-runtime";import{memo as a,useState as r,useRef as l,useCallback as d,useEffect as s}from"react";import c from"./searchwaveform.js";import u from"./components/videoPlayer.js";import{sortTopicsByCheckedStatus as m}from"./utils/word-segment-util.js";import v from"./components/SegmentByWordsViral.js";import h from"./SearchWaveFromWrapper.module.css.js";import p from"./icons/AudioLinesIcon.js";import f from"./icons/VideoIcon.js";import{CircularProgress as g}from"@mui/material";import{renderCitationAIConfidenceDisplay as y}from"../../../shared/CitationAIConfidenceDisplay.js";import{useRequirementAI as S}from"../../RequirementAIWrapper/RequirementAIWrapper.js";import{AudioPlayProvider as P}from"./store/autoplay.wavefrom.js";var w=function(e){var t=Math.floor(e/3600),i=Math.floor(e%3600/60),n=Math.floor(e%60),o=function(e){return String(e).padStart(2,"0")};return"".concat(o(t),":").concat(o(i),":").concat(n.toFixed(0))},N=a(function(a){var N=a.title,A=a.segments,U=a.gsUtilPath,L=a.citationNumber,j=a.relevanceScore,B=a.customStyles,b=r(0),k=b[0],C=b[1],M=r(A.length>0),T=M[0],W=M[1],I=r(!1);I[0];var x=I[1],V=r(!1),D=V[0],Q=V[1],q=r(""),E=q[0],G=q[1],O=r(!0),R=O[0],_=O[1],z=r("audio"),F=z[0],H=z[1],$=S().apiCachingConfig,J=$.queryClient,K=$.useGetSignedUrlQuery,X=$.useGetSignedUrlMutation,Y=$.useExtractAudioPeaksMutation,Z=$.useExtractAudioPeaksQuery,ee=$.useGetVideoSignedUrlQuery,te=$.useGetVideoSignedUrlMutation,ie=l(null),ne=U.replace(/\.wav$|\.mp3$/i,".mp4"),oe=["getSignedUrl",U],ae=["extractAudioPeaks",U],re=["getVideoSignedUrl",ne],le=K(U,oe).data,de=Z(U,ae).data,se=ee(ne,re).data,ce=X(U),ue=ce.mutate,me=ce.isPending,ve=Y(U),he=ve.mutate,pe=ve.isPending,fe=te(ne).mutate,ge=d(function(e){C(e)},[]);s(function(){if(U){var e=J.getQueryData(oe),t=J.getQueryData(ae),i=J.getQueryData(re);e||ue({gsUtilPath:U}),t||he({gsUtilPath:U}),i||fe({gsUtilPath:ne})}else console.error("Error -> SearchWaveformWrapper: gsUtilPath is required to fetch signed URL")},[U]),s(function(){se&&t(void 0,void 0,void 0,function(){var e;return i(this,function(t){switch(t.label){case 0:return[4,fetch(se)];case 1:return e=t.sent(),G(e.ok?se:""),[2]}})})},[se]);return n(P,{children:o("div",e({className:h.wrapper,style:null==B?void 0:B.wrapper},{children:[o("div",e({className:h.header,style:null==B?void 0:B.header},{children:[n("h2",e({className:h.title,style:null==B?void 0:B.title},{children:N||"Audio Snippet"})),y(j,!0,null==B?void 0:B.confidenceDisplay)]})),o("div",e({className:h.content,style:null==B?void 0:B.content},{children:["audio"!==F&&E?o("div",e({className:h.videoSection,style:null==B?void 0:B.videoSection},{children:[R&&o("div",e({className:h.videoLoader,style:null==B?void 0:B.videoLoader},{children:[n(g,{size:40}),n("p",{children:"Loading video..."})]})),n("div",e({style:{visibility:R?"hidden":"visible",position:R?"absolute":"relative"}},{children:n(u,{videoSrc:E,currentTime:k,isWaveformPlaying:D,onBufferingStart:function(){x(!0),D&&Q(!1)},onBufferingEnd:function(){x(!1)},onVideoPlayPause:function(e){ie.current?e?D||ie.current.togglePlayPause():D&&ie.current.togglePlayPause():Q(e)},className:"w-full aspect-video rounded-lg overflow-hidden shadow-lg mb-2",onVideoLoadingStateChange:function(e){return function(e){_(e)}(e)},isUrlPending:me,isPeaksPending:pe,signedUrl:le,AudioData:de,showOnlyMatched:T,wavesurferRef:ie,handleAudioTimeUpdate:ge,segments:A,setIsAudioPlaying:Q,setShowOnlyMatched:W,customStyles:null==B?void 0:B.videoPlayer,waveformStyles:null==B?void 0:B.waveform},"video-".concat(L))}))]})):n("div",e({className:h.audioSection,style:null==B?void 0:B.audioSection},{children:me||pe?o("div",e({className:h.audioLoader,style:null==B?void 0:B.audioLoader},{children:[n(g,{size:48}),n("span",{children:"Loading audio peaks..."})]})):le&&de&&n(c,{ref:ie,audio_file_name:le,matchedSegments:A,peaks:de.peaks,duration:de.duration,setIsAudioPlaying:Q,onTimeUpdate:ge,currentAudioTime:k,showOnlyMatched:T,setShowOnlyMatched:W,customStyles:null==B?void 0:B.waveform},"audio-".concat(L))})),o("div",e({className:h.controls,style:null==B?void 0:B.controls},{children:[E&&o("div",e({className:h.mediaToggle,style:null==B?void 0:B.mediaToggle},{children:[n("span",e({className:"\n ".concat(h.mediaButton,"\n ").concat("video"===F&&h.mediaButtonActive,"\n "),style:"video"===F?null==B?void 0:B.mediaButtonActive:null==B?void 0:B.mediaButton,onClick:function(){return H("video")}},{children:n(f,{})})),n("span",e({className:"\n ".concat(h.mediaButton,"\n ").concat("audio"===F&&h.mediaButtonActive,"\n "),style:"audio"===F?null==B?void 0:B.mediaButtonActive:null==B?void 0:B.mediaButton,onClick:function(){return H("audio")}},{children:n(p,{})}))]})),n("label",e({className:h.switchLabel,style:null==B?void 0:B.switchLabel},{children:n("span",{children:"play only matched segments"})}))]})),o("div",e({className:h.transcript,style:null==B?void 0:B.transcriptContainer},{children:[n("div",e({className:h.transcriptHeader,style:null==B?void 0:B.transcriptHeader},{children:"Transcript"})),function(t){var i=m(t);return n("div",e({className:h.segmentList,style:null==B?void 0:B.segmentList},{children:null==i?void 0:i.map(function(t){return n("div",e({id:t.segment_id,className:h.segmentItem,style:null==B?void 0:B.transcriptSegment},{children:n(v,{content:t.text,startTime:w(t.start),endTime:w(t.end),words:t.words||[],currentTime:k,containerStyle:null==B?void 0:B.transcriptContainer,customStyles:null==B?void 0:B.segmentWords})}),t.segment_id)})}))}(A)]}))]}))]}))})});export{N as default,w as formatTime};
1
+ import{__awaiter as e}from"tslib";import{jsx as i,jsxs as t}from"react/jsx-runtime";import{memo as n,useState as a,useRef as s,useCallback as o,useEffect as l}from"react";import r from"./searchwaveform.js";import d from"./components/videoPlayer.js";import{sortTopicsByCheckedStatus as c}from"./utils/word-segment-util.js";import u from"./components/SegmentByWordsViral.js";import m from"./SearchWaveFromWrapper.module.css.js";import g from"./icons/AudioLinesIcon.js";import v from"./icons/VideoIcon.js";import{CircularProgress as p}from"@mui/material";import{renderCitationAIConfidenceDisplay as h}from"../../../shared/CitationAIConfidenceDisplay.js";import{useRequirementAI as y}from"../../RequirementAIWrapper/RequirementAIWrapper.js";import{AudioPlayProvider as f}from"./store/autoplay.wavefrom.js";const S=e=>{const i=Math.floor(e/3600),t=Math.floor(e%3600/60),n=Math.floor(e%60),a=e=>String(e).padStart(2,"0");return`${a(i)}:${a(t)}:${n.toFixed(0)}`},j=n(({title:n,segments:j,gsUtilPath:b,citationNumber:P,relevanceScore:O,customStyles:w})=>{const[N,A]=a(0),[U,L]=a(j.length>0),[B,$]=a(!1),[k,C]=a(!1),[M,T]=a(""),[W,I]=a(!0),[x,V]=a("audio"),{queryClient:D,useGetSignedUrlQuery:Q,useGetSignedUrlMutation:q,useExtractAudioPeaksMutation:E,useExtractAudioPeaksQuery:G,useGetVideoSignedUrlQuery:R,useGetVideoSignedUrlMutation:_}=y().apiCachingConfig,z=s(null),F=b.replace(/\.wav$|\.mp3$/i,".mp4"),H=["getSignedUrl",b],J=["extractAudioPeaks",b],K=["getVideoSignedUrl",F],{data:X}=Q(b,H),{data:Y}=G(b,J),{data:Z}=R(F,K),{mutate:ee,isPending:ie}=q(b),{mutate:te,isPending:ne}=E(b),{mutate:ae}=_(F),se=o(e=>{A(e)},[]);l(()=>{if(!b)return void console.error("Error -> SearchWaveformWrapper: gsUtilPath is required to fetch signed URL");const e=D.getQueryData(H),i=D.getQueryData(J),t=D.getQueryData(K);e||ee({gsUtilPath:b}),i||te({gsUtilPath:b}),t||ae({gsUtilPath:F})},[b]),l(()=>{Z&&e(void 0,void 0,void 0,function*(){const e=yield fetch(Z);T(e.ok?Z:"")})},[Z]);return i(f,{children:t("div",Object.assign({className:m.wrapper,style:null==w?void 0:w.wrapper},{children:[t("div",Object.assign({className:m.header,style:null==w?void 0:w.header},{children:[i("h2",Object.assign({className:m.title,style:null==w?void 0:w.title},{children:n||"Audio Snippet"})),h(O,!0,null==w?void 0:w.confidenceDisplay)]})),t("div",Object.assign({className:m.content,style:null==w?void 0:w.content},{children:["audio"!==x&&M?t("div",Object.assign({className:m.videoSection,style:null==w?void 0:w.videoSection},{children:[W&&t("div",Object.assign({className:m.videoLoader,style:null==w?void 0:w.videoLoader},{children:[i(p,{size:40}),i("p",{children:"Loading video..."})]})),i("div",Object.assign({style:{visibility:W?"hidden":"visible",position:W?"absolute":"relative"}},{children:i(d,{videoSrc:M,currentTime:N,isWaveformPlaying:k,onBufferingStart:()=>{$(!0),k&&C(!1)},onBufferingEnd:()=>{$(!1)},onVideoPlayPause:e=>{z.current?e?k||z.current.togglePlayPause():k&&z.current.togglePlayPause():C(e)},className:"w-full aspect-video rounded-lg overflow-hidden shadow-lg mb-2",onVideoLoadingStateChange:e=>(e=>{I(e)})(e),isUrlPending:ie,isPeaksPending:ne,signedUrl:X,AudioData:Y,showOnlyMatched:U,wavesurferRef:z,handleAudioTimeUpdate:se,segments:j,setIsAudioPlaying:C,setShowOnlyMatched:L,customStyles:null==w?void 0:w.videoPlayer,waveformStyles:null==w?void 0:w.waveform},`video-${P}`)}))]})):i("div",Object.assign({className:m.audioSection,style:null==w?void 0:w.audioSection},{children:ie||ne?t("div",Object.assign({className:m.audioLoader,style:null==w?void 0:w.audioLoader},{children:[i(p,{size:48}),i("span",{children:"Loading audio peaks..."})]})):X&&Y&&i(r,{ref:z,audio_file_name:X,matchedSegments:j,peaks:Y.peaks,duration:Y.duration,setIsAudioPlaying:C,onTimeUpdate:se,currentAudioTime:N,showOnlyMatched:U,setShowOnlyMatched:L,customStyles:null==w?void 0:w.waveform},`audio-${P}`)})),t("div",Object.assign({className:m.controls,style:null==w?void 0:w.controls},{children:[M&&t("div",Object.assign({className:m.mediaToggle,style:null==w?void 0:w.mediaToggle},{children:[i("span",Object.assign({className:`\n ${m.mediaButton}\n ${"video"===x&&m.mediaButtonActive}\n `,style:"video"===x?null==w?void 0:w.mediaButtonActive:null==w?void 0:w.mediaButton,onClick:()=>V("video")},{children:i(v,{})})),i("span",Object.assign({className:`\n ${m.mediaButton}\n ${"audio"===x&&m.mediaButtonActive}\n `,style:"audio"===x?null==w?void 0:w.mediaButtonActive:null==w?void 0:w.mediaButton,onClick:()=>V("audio")},{children:i(g,{})}))]})),i("label",Object.assign({className:m.switchLabel,style:null==w?void 0:w.switchLabel},{children:i("span",{children:"play only matched segments"})}))]})),t("div",Object.assign({className:m.transcript,style:null==w?void 0:w.transcriptContainer},{children:[i("div",Object.assign({className:m.transcriptHeader,style:null==w?void 0:w.transcriptHeader},{children:"Transcript"})),(e=>{const t=c(e);return i("div",Object.assign({className:m.segmentList,style:null==w?void 0:w.segmentList},{children:null==t?void 0:t.map(e=>i("div",Object.assign({id:e.segment_id,className:m.segmentItem,style:null==w?void 0:w.transcriptSegment},{children:i(u,{content:e.text,startTime:S(e.start),endTime:S(e.end),words:e.words||[],currentTime:N,containerStyle:null==w?void 0:w.transcriptContainer,customStyles:null==w?void 0:w.segmentWords})}),e.segment_id))}))})(j)]}))]}))]}))})});export{j as default,S as formatTime};
2
2
  //# sourceMappingURL=SearchWaveFromWrapper.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as t}from"tslib";import{jsx as i}from"react/jsx-runtime";import o from"react";import n from"./components/AudioCitationIcon.js";import e from"./SearchWaveFromWrapper.js";import a from"../../../../CitationRenderer/CitationRenderer.js";var c=function(c){var r,l,m,d,s,u,p,v=(null===(r=c.customIcons)||void 0===r?void 0:r.waveformCitationIcon)||i(n,{});return i(a,{inLineCitation:!0,citationTitle:c.title,citationId:"audio-citation-".concat(c.citation.citation_number),citationComponent:i(e,{citationNumber:c.citation.citation_number,gsUtilPath:"audio_transcript"===c.citation.customMetadata.type?null===(l=c.citation.customMetadata)||void 0===l?void 0:l.gs_util_url:"",relevanceScore:"audio_transcript"===c.citation.customMetadata.type?null===(m=c.citation.customMetadata)||void 0===m?void 0:m.relevance_score:0,title:"audio_transcript"===c.citation.customMetadata.type?null===(d=c.citation.customMetadata)||void 0===d?void 0:d.file_name:"",segments:"audio_transcript"===c.citation.customMetadata.type?null===(s=c.citation.customMetadata)||void 0===s?void 0:s.segments:[],customStyles:c.customStyles}),chevronDownComponent:(null==c?void 0:c.citationIcon)?o.createElement(c.citationIcon):v,chevronUpComponent:(null==c?void 0:c.citationIcon)?o.createElement(c.citationIcon):v,styles:{pillButton:t({margin:"0px",padding:"0px",fontSize:"14px",color:"#526eff",cursor:"pointer",verticalAlign:"middle",whiteSpace:"nowrap",display:"inline-flex",alignItems:"center",background:"white",border:"none"},null===(u=c.customStyles)||void 0===u?void 0:u.pill),citationContent:t({width:"100%",background:"transparent",minHeight:"10px",height:"fit-content"},null===(p=c.customStyles)||void 0===p?void 0:p.content)}})};export{c as default};
1
+ import{jsx as t}from"react/jsx-runtime";import i from"react";import o from"./components/AudioCitationIcon.js";import n from"./SearchWaveFromWrapper.js";import e from"../../../../CitationRenderer/CitationRenderer.js";const a=a=>{var c,r,l,s,d,m,u;const p=(null===(c=a.customIcons)||void 0===c?void 0:c.waveformCitationIcon)||t(o,{});return t(e,{inLineCitation:!0,citationTitle:a.title,citationId:`audio-citation-${a.citation.citation_number}`,citationComponent:t(n,{citationNumber:a.citation.citation_number,gsUtilPath:"audio_transcript"===a.citation.customMetadata.type?null===(r=a.citation.customMetadata)||void 0===r?void 0:r.gs_util_url:"",relevanceScore:"audio_transcript"===a.citation.customMetadata.type?null===(l=a.citation.customMetadata)||void 0===l?void 0:l.relevance_score:0,title:"audio_transcript"===a.citation.customMetadata.type?null===(s=a.citation.customMetadata)||void 0===s?void 0:s.file_name:"",segments:"audio_transcript"===a.citation.customMetadata.type?null===(d=a.citation.customMetadata)||void 0===d?void 0:d.segments:[],customStyles:a.customStyles}),chevronDownComponent:(null==a?void 0:a.citationIcon)?i.createElement(a.citationIcon):p,chevronUpComponent:(null==a?void 0:a.citationIcon)?i.createElement(a.citationIcon):p,styles:{pillButton:Object.assign({margin:"0px",padding:"0px",fontSize:"14px",color:"#526eff",cursor:"pointer",verticalAlign:"middle",whiteSpace:"nowrap",display:"inline-flex",alignItems:"center",background:"white",border:"none"},null===(m=a.customStyles)||void 0===m?void 0:m.pill),citationContent:Object.assign({width:"100%",background:"transparent",minHeight:"10px",height:"fit-content"},null===(u=a.customStyles)||void 0===u?void 0:u.content)}})};export{a as default};
2
2
  //# sourceMappingURL=WaveformCitationRenderer.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as t}from"tslib";import{jsx as i,jsxs as r}from"react/jsx-runtime";var e=function(e){return i("div",t({className:"mb-2"},{children:r("svg",t({width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[i("path",{d:"M6.00012 4.5C6.00012 3.70435 6.31619 2.94129 6.8788 2.37868C7.44141 1.81607 8.20447 1.5 9.00012 1.5H14.3791C14.9757 1.50053 15.5476 1.73792 15.9691 2.16L20.3416 6.531C20.7631 6.9528 21 7.52468 21.0001 8.121V19.5C21.0001 20.2957 20.684 21.0587 20.1214 21.6213C19.5588 22.1839 18.7958 22.5 18.0001 22.5H10.4561L10.4562 21.063H11.6561L18.0001 21C18.3979 21 18.7795 20.842 19.0608 20.5607C19.3421 20.2794 19.5001 19.8978 19.5001 19.5V9H15.7501C15.1534 9 14.5811 8.76295 14.1591 8.34099C13.7372 7.91903 13.5001 7.34674 13.5001 6.75V3H9.00012C8.60229 3 8.22076 3.15804 7.93946 3.43934C7.65815 3.72064 7.50012 4.10218 7.50012 4.5V8.14383H6.00012V4.5ZM15.7501 7.5H19.1896L15.0001 3.3105V6.75C15.0001 6.94891 15.0791 7.13968 15.2198 7.28033C15.3604 7.42098 15.5512 7.5 15.7501 7.5Z",fill:"#5C75F4"}),i("path",{d:"M10.0691 14.3961V15.3008C10.0691 17.0495 8.65149 18.4672 6.90273 18.4672M3.73633 14.3961V15.3008C3.73633 17.0495 5.15398 18.4672 6.90273 18.4672M6.90273 18.4672V19.8242M5.09336 19.8242H8.71211M6.90273 16.6578C6.15327 16.6578 5.5457 16.0502 5.5457 15.3008V12.1344C5.5457 11.3849 6.15327 10.7773 6.90273 10.7773C7.6522 10.7773 8.25977 11.3849 8.25977 12.1344V15.3008C8.25977 16.0502 7.6522 16.6578 6.90273 16.6578Z",stroke:"#5C75F4","stroke-linecap":"round","stroke-linejoin":"round"}),i("g",t({"clip-path":"url(#clip0_3025_73410)"},{children:i("path",{d:"M11.7012 13.7758L11.7012 14.9758M13.0512 14.0758V14.6758M14.4012 12.5758V16.1758M15.7512 11.6758V17.0758M17.1012 13.7758V14.9758",stroke:"#5C75F4","stroke-width":"0.837402","stroke-linecap":"round","stroke-linejoin":"round"})})),i("defs",{children:i("clipPath",t({id:"clip0_3025_73410"},{children:i("rect",{width:"7.2",height:"7.2",fill:"white",transform:"translate(10.8008 10.7773)"})}))})]}))}))};export{e as default};
1
+ import{jsx as t,jsxs as e}from"react/jsx-runtime";const i=i=>t("div",Object.assign({className:"mb-2"},{children:e("svg",Object.assign({width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[t("path",{d:"M6.00012 4.5C6.00012 3.70435 6.31619 2.94129 6.8788 2.37868C7.44141 1.81607 8.20447 1.5 9.00012 1.5H14.3791C14.9757 1.50053 15.5476 1.73792 15.9691 2.16L20.3416 6.531C20.7631 6.9528 21 7.52468 21.0001 8.121V19.5C21.0001 20.2957 20.684 21.0587 20.1214 21.6213C19.5588 22.1839 18.7958 22.5 18.0001 22.5H10.4561L10.4562 21.063H11.6561L18.0001 21C18.3979 21 18.7795 20.842 19.0608 20.5607C19.3421 20.2794 19.5001 19.8978 19.5001 19.5V9H15.7501C15.1534 9 14.5811 8.76295 14.1591 8.34099C13.7372 7.91903 13.5001 7.34674 13.5001 6.75V3H9.00012C8.60229 3 8.22076 3.15804 7.93946 3.43934C7.65815 3.72064 7.50012 4.10218 7.50012 4.5V8.14383H6.00012V4.5ZM15.7501 7.5H19.1896L15.0001 3.3105V6.75C15.0001 6.94891 15.0791 7.13968 15.2198 7.28033C15.3604 7.42098 15.5512 7.5 15.7501 7.5Z",fill:"#5C75F4"}),t("path",{d:"M10.0691 14.3961V15.3008C10.0691 17.0495 8.65149 18.4672 6.90273 18.4672M3.73633 14.3961V15.3008C3.73633 17.0495 5.15398 18.4672 6.90273 18.4672M6.90273 18.4672V19.8242M5.09336 19.8242H8.71211M6.90273 16.6578C6.15327 16.6578 5.5457 16.0502 5.5457 15.3008V12.1344C5.5457 11.3849 6.15327 10.7773 6.90273 10.7773C7.6522 10.7773 8.25977 11.3849 8.25977 12.1344V15.3008C8.25977 16.0502 7.6522 16.6578 6.90273 16.6578Z",stroke:"#5C75F4","stroke-linecap":"round","stroke-linejoin":"round"}),t("g",Object.assign({"clip-path":"url(#clip0_3025_73410)"},{children:t("path",{d:"M11.7012 13.7758L11.7012 14.9758M13.0512 14.0758V14.6758M14.4012 12.5758V16.1758M15.7512 11.6758V17.0758M17.1012 13.7758V14.9758",stroke:"#5C75F4","stroke-width":"0.837402","stroke-linecap":"round","stroke-linejoin":"round"})})),t("defs",{children:t("clipPath",Object.assign({id:"clip0_3025_73410"},{children:t("rect",{width:"7.2",height:"7.2",fill:"white",transform:"translate(10.8008 10.7773)"})}))})]}))}));export{i as default};
2
2
  //# sourceMappingURL=AudioCitationIcon.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsx as r,jsxs as n}from"react/jsx-runtime";import t,{forwardRef as c,useState as u,useRef as i,useEffect as o,useCallback as a}from"react";import l from"wavesurfer.js";import s from"wavesurfer.js/dist/plugins/regions";import{useAudioPlayPause as d}from"../store/autoplay.wavefrom.js";import f from"./AudioTimeLineSlider.module.css.js";var v=c(function(c,v){var m=c.audio_file_name,p=c.matchedSegments,g=c.onTimeUpdate;c.peaks;var h=c.duration,y=c.setIsAudioPlaying,T=c.setChevronIndex,S=c.chevronIndex,w=void 0===S?0:S,k=c.onToggleShowMatched,_=c.topicId,N=c.isVideoBuffering,P=c.playOnlyMatched,M=void 0===P||P,x=c.showOnlyMatched,b=c.setShowOnlyMatched,I=c.customStyles,R=u(!1),C=R[0],D=R[1],j=u(!0);j[0];var O=j[1],q=u(!1),A=q[0],B=q[1],E=u(!1),W=E[0],H=E[1],L=u(!1),U=L[0],X=L[1],z=u(!1);z[0];var F=z[1],G=u(0),V=G[0],J=G[1],K=u(!1);K[0];var Q=K[1],Y=u("00:00:00"),Z=Y[0],$=Y[1],ee=u("00:00:00"),re=ee[0],ne=ee[1],te=u(0),ce=te[0],ue=te[1],ie=u(!1),oe=ie[0],ae=ie[1],le=u(0),se=le[0],de=le[1],fe=u("00:00:00"),ve=fe[0],me=fe[1],pe=i(null),ge=i(!1),he=i(null),ye=i(null),Te=i(null),Se=i(!1),we=i(null),ke=i(null),_e=i(0),Ne=i(0),Pe=u(!1),Me=Pe[0],xe=Pe[1],be=d(),Ie=be.playTopicId,Re=be.resetTrigger,Ce=be.pendingPlayRequest,De=be.setPendingPlayRequest,je=be.triggerPlayForTopic,Oe=i(null),qe=function(e){try{var r=e.split(":"),n=r[0],t=r[1],c=r[2],u=(r[3],parseInt(n).toString().padStart(2,"0")),i=parseInt(t).toString().padStart(2,"0"),o=parseInt(c).toString().padStart(2,"0");return"".concat(u,":").concat(i,":").concat(o)}catch(e){console.log("Error converting formatTimeToHMS",e)}};o(function(){Me&&Ce===_&&(De(null),setTimeout(function(){je(_)},100))},[Me,Ce,_]),o(function(){Me&&Ie===_&&(Oe.current&&(Oe.current.click(),D(!0)),Re())},[Ie,_,Me]),o(function(){return xe(!0),function(){xe(!1)}},[]),o(function(){if(m&&he.current&&!Se.current){O(!0);var e=s.create(),r=l.create({container:he.current,waveColor:"#D0D5DD",progressColor:"#ffffffff",cursorColor:"#ffffffff",barWidth:2,barRadius:3});return ye.current=r,Te.current=r.registerPlugin(e),Se.current=!0,r.on("decode",function(){Q(!0),Be();var e=qe(Ae(h));ne(e||"00:00:00")}),r.on("ready",function(){O(!1)}),r.on("play",function(){D(!0),y&&y(!0)}),r.on("pause",function(){D(!1),y&&y(!1)}),r.on("finish",function(){D(!1),y&&y(!1),A&&(B(!1),H(!1),X(!0))}),r.on("seeking",function(){x||A&&!W&&Ee()}),r.on("error",function(){O(!1)}),r.on("audioprocess",function(e){(g&&g(e),ge.current)||ue(e/h*100);var r=qe(Ae(e));$(r||"00:00:00"),Ne.current=e}),function(){we.current&&clearTimeout(we.current),ke.current,r.destroy(),Se.current=!1,ye.current=null}}},[m]),o(function(){ye.current&&(ye.current.setOptions({interact:!x}),C&&ye.current.pause(),x?(B(!0),_e.current=0):Ee(),k&&k(x))},[x]);var Ae=function(e){var r=Math.floor(e/3600),n=Math.floor(e%3600/60),t=Math.floor(e%60),c=Math.floor(e%1*1e3);return"".concat(String(r).padStart(2,"0"),":").concat(String(n).padStart(2,"0"),":").concat(String(t).padStart(2,"0"),":").concat(String(c).padStart(3,"0"))},Be=a(function(){Te.current&&ye.current&&(Te.current.clearRegions(),p.forEach(function(e,r){Te.current.addRegion({start:e.start_time,end:e.end_time,color:"#feef89",drag:!1,resize:!1,id:e.segment_id})}))},[p]),Ee=a(function(){ye.current&&(B(!1),H(!1),X(!1),F(!1),we.current&&(clearTimeout(we.current),we.current=null),ke.current&&(ye.current.un("audioprocess",ke.current),ke.current=null))},[]),We=a(function(e){!x&&ye.current&&(ye.current.seekTo(e/h),ye.current.play(),D(!0),y&&y(!0),$(qe(Ae(e))),B(!1),H(!1),X(!1))},[x,h,y,Ae,qe]),He=i(!1),Le=a(function(){if(!He.current&&ye.current&&p.length){He.current=!0,ye.current.pause();var e=_e.current+1;if(console.log("Current segment:",_e.current),console.log("Next index calculated:",e),console.log("Total segments:",p.length),e<p.length){var r=p[e];$(qe(Ae(r.start_time))),T&&T(e),J(e),_e.current=e;var n=x?0:2e3;we.current=setTimeout(function(){He.current=!1,setTimeout(function(){if(ye.current){ye.current.seekTo(r.start_time/h),ye.current.play();var e=r.end_time,n=function(r){var t;r>=e&&(null===(t=ye.current)||void 0===t||t.un("audioprocess",n),ke.current=null,Le())};ke.current=n,ye.current.on("audioprocess",n)}},100)},n)}else{if(console.log("End of cycle reached, resetting to index 0"),B(x),H(!0),X(!0),_e.current=0,J(0),T&&T(0),p.length>0){var t=p[0];$(qe(Ae(t.start_time))),ye.current.seekTo(t.start_time/h)}ye.current.isPlaying()&&ye.current.pause(),we.current=setTimeout(function(){He.current=!1,ye.current&&ye.current.isPlaying()&&ye.current.pause()},x?0:2e3)}}},[p,h,T,Ae,x]),Ue=a(function(){if(ye.current&&p.length){var e=_e.current;if(e>=p.length)return B(x),void X(!0);var r=p[e];J(e),$(qe(Ae(r.start_time))),T&&T(e),setTimeout(function(){if(ye.current){ye.current.seekTo(r.start_time/h),ye.current.play();var e=r.end_time,n=function(r){var t;r>=e&&(null===(t=ye.current)||void 0===t||t.un("audioprocess",n),ke.current=null,Le())};ke.current=n,ye.current.on("audioprocess",n)}},100)}},[p,h,T,Le,Ae,x]),Xe=a(function(){if(ye.current&&p.length){ke.current&&(ye.current.un("audioprocess",ke.current),ke.current=null);var e=p[_e.current];if(e){var r=e.end_time,n=function(e){var t;e>=r&&(null===(t=ye.current)||void 0===t||t.un("audioprocess",n),ke.current=null,Le())};ke.current=n,ye.current.on("audioprocess",n)}}},[p,Le]),ze=a(function(){ye.current&&(x?C?(ye.current.pause(),H(!0)):W?(ye.current.play(),H(!1),Xe()):U?(X(!1),_e.current=0,Ue()):Ue():C?ye.current.pause():ye.current.play())},[C,x,W,U,Ue,Xe]),Fe=a(function(e){if(ye.current&&0!==p.length){var r,n=C;C&&(ye.current.pause(),H(!0)),ke.current&&(ye.current.un("audioprocess",ke.current),ke.current=null),r="next"===e?(V+1)%p.length:(V-1+p.length)%p.length,J(r),_e.current=r;var t=p[r];ye.current.seekTo(t.start_time/h),T&&T(r),n&&x&&setTimeout(function(){ye.current&&(ye.current.play(),H(!1),Xe())},50)}},[V,p,T,h,C,x,Xe]),Ge=a(function(e){ye.current&&(x||(A&&Ee(),ye.current.seekTo(e/h)))},[h,A,Ee,x]);o(function(){if(p.length>0&&void 0!==w&&ye.current&&!He.current){if(w===_e.current)return;var e=C;ke.current&&(ye.current.un("audioprocess",ke.current),ke.current=null);var r=p[w];r&&(ye.current.seekTo(r.start_time/h),J(w),_e.current=w,e&&x&&setTimeout(function(){ye.current&&Xe()},50))}},[w,h,p,x,C,Xe]);var Ve=i(!1);o(function(){N&&ye.current&&ye.current.isPlaying()&&(Ve.current=!0,ye.current.pause(),A&&H(!0)),!N&&Ve.current&&ye.current&&ye.current&&(ye.current.play(),Ve.current=!1,A&&W&&(H(!1),Xe()))},[N,A,W,Xe]),t.useImperativeHandle(v,function(){return{waveSurfer:ye.current,navigateSegments:Fe,togglePlayPause:ze,getCurrentSegmentIndex:function(){return V},setCurrentSegmentIndex:J,isPlayingSequence:function(){return A},setPlayingSequence:function(e){return B(e)},seekToTime:Ge,showOnlyMatched:x,setShowOnlyMatched:function(e){return b(e)},handleIndividualSegmentPlay:We,setPlaybackRate:function(e){ye.current&&ye.current.setPlaybackRate(e)}}},[ye.current,Fe,ze,V,A,Ge,x,We]);return r("div",e({className:f.container,style:null==I?void 0:I.container},{children:n("div",e({className:f.inner,style:null==I?void 0:I.inner},{children:[r("div",e({className:f.waveformWrapper,style:null==I?void 0:I.waveformRow},{children:r("div",{ref:he,className:f.waveform,style:null==I?void 0:I.waveform})})),r("div",e({className:f.timeWrapper,style:null==I?void 0:I.timeRow},{children:n("div",e({className:f.timeText,style:null==I?void 0:I.timeText},{children:[r("span",{children:Z}),r("span",{children:"/"}),r("span",{children:re})]}))})),r("div",e({className:f.sliderRow,style:null==I?void 0:I.sliderRow},{children:n("div",e({className:"".concat(f.slider," ").concat([f.sliderBase,x?f.sliderDisabled:f.sliderEnabled,f.sliderGroup].join(" ")),ref:pe,style:null==I?void 0:I.slider,onClick:x?void 0:function(e){var r;if(!x){var n=null===(r=pe.current)||void 0===r?void 0:r.getBoundingClientRect();if(n&&ye.current){var t=(e.clientX-n.left)/n.width*100,c=t/100*h;ue(t),ye.current.seekTo(c/h),A&&Ee()}}},onMouseMove:x?void 0:function(e){if(!x&&pe.current){var r=pe.current.getBoundingClientRect(),n=e.clientX-r.left;if(n>=0&&n<=r.width){var t=n/r.width*100;ae(!0),de(n);var c=qe(Ae(t/100*h));me(c||"00:00:00")}}},onMouseLeave:function(){ae(!1)},onMouseDown:x?void 0:function(){x||(ge.current=!0)},onMouseUp:x?void 0:function(){if(!x&&(ge.current=!1,ye.current)){var e=ce/100*h;ye.current.seekTo(e/h),A&&Ee()}}},{children:[r("div",e({className:f.track,style:null==I?void 0:I.sliderTrack},{children:r("div",{className:f.trackStripes,style:{backgroundImage:"repeating-linear-gradient(45deg, transparent, transparent 4px, #cbd5e1 4px, #cbd5e1 5px)"}})})),p.map(function(e,n){var t=e.start_time/h*100,c=(e.end_time-e.start_time)/h*100,u=n===V&&M;return r("div",{className:"".concat(f.segment," ").concat(u?f.segmentActive:f.segmentInactive),style:{left:"".concat(t,"%"),width:"".concat(c,"%"),opacity:M&&!u?.3:1}},e.segment_id)}),r("div",{className:f.progress,style:e({width:"".concat(ce,"%")},null==I?void 0:I.sliderProgress)}),r("div",e({className:f.thumb,style:e({left:"".concat(ce,"%")},null==I?void 0:I.sliderThumb)},{children:r("div",{className:f.thumbDot,style:null==I?void 0:I.thumbDot})})),oe&&!x&&r("div",e({className:f.tooltip,style:e({left:se},null==I?void 0:I.timeTooltip)},{children:ve}))]}))}))]}))}))});v.displayName="AudioTimelineSlider";export{v as default};
1
+ import{jsx as e,jsxs as r}from"react/jsx-runtime";import t,{forwardRef as n,useState as c,useRef as s,useEffect as u,useCallback as i}from"react";import o from"wavesurfer.js";import l from"wavesurfer.js/dist/plugins/regions";import{useAudioPlayPause as a}from"../store/autoplay.wavefrom.js";import d from"./AudioTimeLineSlider.module.css.js";const m=n(({audio_file_name:n,matchedSegments:m,onTimeUpdate:g,peaks:p,duration:f,setIsAudioPlaying:v,setChevronIndex:h,chevronIndex:y=0,onToggleShowMatched:T,topicId:S,isVideoBuffering:b,playOnlyMatched:w=!0,showOnlyMatched:k,setShowOnlyMatched:_,customStyles:j},O)=>{const[N,P]=c(!1),[M,x]=c(!0),[$,I]=c(!1),[R,C]=c(!1),[D,q]=c(!1),[A,B]=c(!1),[E,W]=c(0),[H,L]=c(!1),[U,X]=c("00:00:00"),[z,F]=c("00:00:00"),[G,V]=c(0),[J,K]=c(!1),[Q,Y]=c(0),[Z,ee]=c("00:00:00"),re=s(null),te=s(!1),ne=s(null),ce=s(null),se=s(null),ue=s(!1),ie=s(null),oe=s(null),le=s(0),ae=s(0),[de,me]=c(!1),{playTopicId:ge,resetTrigger:pe,pendingPlayRequest:fe,setPendingPlayRequest:ve,triggerPlayForTopic:he}=a(),ye=s(null),Te=e=>{try{const[r,t,n,c]=e.split(":"),s=parseInt(r).toString().padStart(2,"0"),u=parseInt(t).toString().padStart(2,"0");return`${s}:${u}:${parseInt(n).toString().padStart(2,"0")}`}catch(e){console.log("Error converting formatTimeToHMS",e)}};u(()=>{de&&fe===S&&(ve(null),setTimeout(()=>{he(S)},100))},[de,fe,S]),u(()=>{de&&ge===S&&(ye.current&&(ye.current.click(),P(!0)),pe())},[ge,S,de]),u(()=>(me(!0),()=>{me(!1)}),[]),u(()=>{if(!n||!ne.current||ue.current)return;x(!0);const e=l.create(),r=o.create({container:ne.current,waveColor:"#D0D5DD",progressColor:"#ffffffff",cursorColor:"#ffffffff",barWidth:2,barRadius:3});return ce.current=r,se.current=r.registerPlugin(e),ue.current=!0,r.on("decode",()=>{L(!0),be();const e=Te(Se(f));F(e||"00:00:00")}),r.on("ready",()=>{x(!1)}),r.on("play",()=>{P(!0),v&&v(!0)}),r.on("pause",()=>{P(!1),v&&v(!1)}),r.on("finish",()=>{P(!1),v&&v(!1),$&&(I(!1),C(!1),q(!0))}),r.on("seeking",()=>{k||$&&!R&&we()}),r.on("error",()=>{x(!1)}),r.on("audioprocess",e=>{if(g&&g(e),!te.current){V(e/f*100)}const r=Te(Se(e));X(r||"00:00:00"),ae.current=e}),()=>{ie.current&&clearTimeout(ie.current),oe.current,r.destroy(),ue.current=!1,ce.current=null}},[n]),u(()=>{ce.current&&(ce.current.setOptions({interact:!k}),N&&ce.current.pause(),k?(I(!0),le.current=0):we(),T&&T(k))},[k]);const Se=e=>{const r=Math.floor(e/3600),t=Math.floor(e%3600/60),n=Math.floor(e%60),c=Math.floor(e%1*1e3);return`${String(r).padStart(2,"0")}:${String(t).padStart(2,"0")}:${String(n).padStart(2,"0")}:${String(c).padStart(3,"0")}`},be=i(()=>{se.current&&ce.current&&(se.current.clearRegions(),m.forEach((e,r)=>{se.current.addRegion({start:e.start_time,end:e.end_time,color:"#feef89",drag:!1,resize:!1,id:e.segment_id})}))},[m]),we=i(()=>{ce.current&&(I(!1),C(!1),q(!1),B(!1),ie.current&&(clearTimeout(ie.current),ie.current=null),oe.current&&(ce.current.un("audioprocess",oe.current),oe.current=null))},[]),ke=i(e=>{!k&&ce.current&&(ce.current.seekTo(e/f),ce.current.play(),P(!0),v&&v(!0),X(Te(Se(e))),I(!1),C(!1),q(!1))},[k,f,v,Se,Te]),_e=s(!1),je=i(()=>{if(_e.current)return;if(!ce.current||!m.length)return;_e.current=!0,ce.current.pause();const e=le.current+1;if(console.log("Current segment:",le.current),console.log("Next index calculated:",e),console.log("Total segments:",m.length),e<m.length){const r=m[e];X(Te(Se(r.start_time))),h&&h(e),W(e),le.current=e;const t=k?0:2e3;ie.current=setTimeout(()=>{_e.current=!1,setTimeout(()=>{if(!ce.current)return;ce.current.seekTo(r.start_time/f),ce.current.play();const e=r.end_time,t=r=>{var n;r>=e&&(null===(n=ce.current)||void 0===n||n.un("audioprocess",t),oe.current=null,je())};oe.current=t,ce.current.on("audioprocess",t)},100)},t)}else{if(console.log("End of cycle reached, resetting to index 0"),I(k),C(!0),q(!0),le.current=0,W(0),h&&h(0),m.length>0){const e=m[0];X(Te(Se(e.start_time))),ce.current.seekTo(e.start_time/f)}ce.current.isPlaying()&&ce.current.pause(),ie.current=setTimeout(()=>{_e.current=!1,ce.current&&ce.current.isPlaying()&&ce.current.pause()},k?0:2e3)}},[m,f,h,Se,k]),Oe=i(()=>{if(!ce.current||!m.length)return;const e=le.current;if(e>=m.length)return I(k),void q(!0);const r=m[e];W(e),X(Te(Se(r.start_time))),h&&h(e),setTimeout(()=>{if(!ce.current)return;ce.current.seekTo(r.start_time/f),ce.current.play();const e=r.end_time,t=r=>{var n;r>=e&&(null===(n=ce.current)||void 0===n||n.un("audioprocess",t),oe.current=null,je())};oe.current=t,ce.current.on("audioprocess",t)},100)},[m,f,h,je,Se,k]),Ne=i(()=>{if(!ce.current||!m.length)return;oe.current&&(ce.current.un("audioprocess",oe.current),oe.current=null);const e=m[le.current];if(!e)return;const r=e.end_time,t=e=>{var n;e>=r&&(null===(n=ce.current)||void 0===n||n.un("audioprocess",t),oe.current=null,je())};oe.current=t,ce.current.on("audioprocess",t)},[m,je]),Pe=i(()=>{ce.current&&(k?N?(ce.current.pause(),C(!0)):R?(ce.current.play(),C(!1),Ne()):D?(q(!1),le.current=0,Oe()):Oe():N?ce.current.pause():ce.current.play())},[N,k,R,D,Oe,Ne]),Me=i(e=>{if(!ce.current||0===m.length)return;const r=N;let t;N&&(ce.current.pause(),C(!0)),oe.current&&(ce.current.un("audioprocess",oe.current),oe.current=null),t="next"===e?(E+1)%m.length:(E-1+m.length)%m.length,W(t),le.current=t;const n=m[t];ce.current.seekTo(n.start_time/f),h&&h(t),r&&k&&setTimeout(()=>{ce.current&&(ce.current.play(),C(!1),Ne())},50)},[E,m,h,f,N,k,Ne]),xe=i(e=>{ce.current&&(k||($&&we(),ce.current.seekTo(e/f)))},[f,$,we,k]);u(()=>{if(m.length>0&&void 0!==y&&ce.current&&!_e.current){if(y===le.current)return;const e=N;oe.current&&(ce.current.un("audioprocess",oe.current),oe.current=null);const r=m[y];r&&(ce.current.seekTo(r.start_time/f),W(y),le.current=y,e&&k&&setTimeout(()=>{ce.current&&Ne()},50))}},[y,f,m,k,N,Ne]);const $e=s(!1);u(()=>{b&&ce.current&&ce.current.isPlaying()&&($e.current=!0,ce.current.pause(),$&&C(!0)),!b&&$e.current&&ce.current&&ce.current&&(ce.current.play(),$e.current=!1,$&&R&&(C(!1),Ne()))},[b,$,R,Ne]),t.useImperativeHandle(O,()=>({waveSurfer:ce.current,navigateSegments:Me,togglePlayPause:Pe,getCurrentSegmentIndex:()=>E,setCurrentSegmentIndex:W,isPlayingSequence:()=>$,setPlayingSequence:e=>I(e),seekToTime:xe,showOnlyMatched:k,setShowOnlyMatched:e=>_(e),handleIndividualSegmentPlay:ke,setPlaybackRate:e=>{ce.current&&ce.current.setPlaybackRate(e)}}),[ce.current,Me,Pe,E,$,xe,k,ke]);return e("div",Object.assign({className:d.container,style:null==j?void 0:j.container},{children:r("div",Object.assign({className:d.inner,style:null==j?void 0:j.inner},{children:[e("div",Object.assign({className:d.waveformWrapper,style:null==j?void 0:j.waveformRow},{children:e("div",{ref:ne,className:d.waveform,style:null==j?void 0:j.waveform})})),e("div",Object.assign({className:d.timeWrapper,style:null==j?void 0:j.timeRow},{children:r("div",Object.assign({className:d.timeText,style:null==j?void 0:j.timeText},{children:[e("span",{children:U}),e("span",{children:"/"}),e("span",{children:z})]}))})),e("div",Object.assign({className:d.sliderRow,style:null==j?void 0:j.sliderRow},{children:r("div",Object.assign({className:`${d.slider} ${[d.sliderBase,k?d.sliderDisabled:d.sliderEnabled,d.sliderGroup].join(" ")}`,ref:re,style:null==j?void 0:j.slider,onClick:k?void 0:e=>{var r;if(k)return;const t=null===(r=re.current)||void 0===r?void 0:r.getBoundingClientRect();if(!t||!ce.current)return;const n=(e.clientX-t.left)/t.width*100,c=n/100*f;V(n),ce.current.seekTo(c/f),$&&we()},onMouseMove:k?void 0:e=>{if(!k&&re.current){const r=re.current.getBoundingClientRect(),t=e.clientX-r.left;if(t>=0&&t<=r.width){const e=t/r.width*100;K(!0),Y(t);const n=Te(Se(e/100*f));ee(n||"00:00:00")}}},onMouseLeave:()=>{K(!1)},onMouseDown:k?void 0:()=>{k||(te.current=!0)},onMouseUp:k?void 0:()=>{if(!k&&(te.current=!1,ce.current)){const e=G/100*f;ce.current.seekTo(e/f),$&&we()}}},{children:[e("div",Object.assign({className:d.track,style:null==j?void 0:j.sliderTrack},{children:e("div",{className:d.trackStripes,style:{backgroundImage:"repeating-linear-gradient(45deg, transparent, transparent 4px, #cbd5e1 4px, #cbd5e1 5px)"}})})),m.map((r,t)=>{const n=r.start_time/f*100,c=(r.end_time-r.start_time)/f*100,s=t===E&&w;return e("div",{className:`${d.segment} ${s?d.segmentActive:d.segmentInactive}`,style:{left:`${n}%`,width:`${c}%`,opacity:w&&!s?.3:1}},r.segment_id)}),e("div",{className:d.progress,style:Object.assign({width:`${G}%`},null==j?void 0:j.sliderProgress)}),e("div",Object.assign({className:d.thumb,style:Object.assign({left:`${G}%`},null==j?void 0:j.sliderThumb)},{children:e("div",{className:d.thumbDot,style:null==j?void 0:j.thumbDot})})),J&&!k&&e("div",Object.assign({className:d.tooltip,style:Object.assign({left:Q},null==j?void 0:j.timeTooltip)},{children:Z}))]}))}))]}))}))});m.displayName="AudioTimelineSlider";export{m as default};
2
2
  //# sourceMappingURL=AudioTimeLineSlider.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsx as t,jsxs as r}from"react/jsx-runtime";import{useRef as n,useEffect as o}from"react";import i from"./SegmentByWordsViral.module.css.js";var l=function(l){var s=l.startTime,c=l.endTime,u=l.words,m=l.currentTime,d=l.content;l.containerStyle;var f=l.customStyles,p=n([]),v=n(null),g=a(s),h=a(c),y=m>=g&&m<=h;o(function(){if(y){var e=u.findIndex(function(e){return m>=e.start&&m<=e.end});if(-1!==e&&p.current[e]){var t=p.current[e];if(t&&v.current){var r=v.current.getBoundingClientRect(),n=t.getBoundingClientRect(),o=n.top<r.top,i=n.bottom>r.bottom;(o||i)&&t.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})}}}},[m,u,y]);return t("div",e({className:i.segmentContainer,style:null==f?void 0:f.segmentContainer},{children:t("div",e({className:i.wrapper,style:null==f?void 0:f.wrapper},{children:t("div",e({className:i.segmentTextContainer,style:null==f?void 0:f.segmentTextContainer,ref:v},{children:u&&0!==u.length?u.map(function(t,n){var o=m>=t.end;return r("span",e({ref:function(e){return p.current[n]=e},className:i.word,style:e({fontWeight:o?"bold":"normal"},null==f?void 0:f.wordText)},{children:[t.text," "]}),n)}):t("span",e({className:i.word,style:null==f?void 0:f.word},{children:d}))}))}))}))};function a(e){if("number"==typeof e)return e;if(!e)return 0;var t=e.split(":"),r=t[0],n=t[1],o=t[2];return 3600*parseInt(r)+60*parseInt(n)+parseFloat(o)}export{l as default};
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useRef as n,useEffect as r}from"react";import s from"./SegmentByWordsViral.module.css.js";const o=o=>{const{startTime:l,endTime:a,words:c,currentTime:d,content:m,containerStyle:u,customStyles:p}=o,g=n([]),f=n(null),b=i(l),h=i(a),v=d>=b&&d<=h;r(()=>{if(v){const e=c.findIndex(e=>d>=e.start&&d<=e.end);if(-1!==e&&g.current[e]){const t=g.current[e];if(t&&f.current){const e=f.current.getBoundingClientRect(),n=t.getBoundingClientRect(),r=n.top<e.top,s=n.bottom>e.bottom;(r||s)&&t.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})}}}},[d,c,v]);return e("div",Object.assign({className:s.segmentContainer,style:null==p?void 0:p.segmentContainer},{children:e("div",Object.assign({className:s.wrapper,style:null==p?void 0:p.wrapper},{children:e("div",Object.assign({className:s.segmentTextContainer,style:null==p?void 0:p.segmentTextContainer,ref:f},{children:c&&0!==c.length?c.map((e,n)=>{const r=d>=e.end;return t("span",Object.assign({ref:e=>g.current[n]=e,className:s.word,style:Object.assign({fontWeight:r?"bold":"normal"},null==p?void 0:p.wordText)},{children:[e.text," "]}),n)}):e("span",Object.assign({className:s.word,style:null==p?void 0:p.word},{children:m}))}))}))}))};function i(e){if("number"==typeof e)return e;if(!e)return 0;const[t,n,r]=e.split(":");return 3600*parseInt(t)+60*parseInt(n)+parseFloat(r)}export{o as default};
2
2
  //# sourceMappingURL=SegmentByWordsViral.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsxs as n,jsx as o}from"react/jsx-runtime";import{useRef as l,useState as i,useEffect as r}from"react";import t from"video.js";import"video.js/dist/video-js.css";import c from"./AudioTimeLineSlider.js";import a from"../icons/MaximizeIcon.js";import s from"../icons/MinimizeIcon.js";import d from"../icons/PlayIcon.js";import u from"../icons/PauseIcon.js";import p from"../icons/PlaybackSpeedIcon.js";import v from"./videoPlayer.module.css.js";var m=function(m){var f,y,g=m.videoSrc,h=m.currentTime,S=m.isWaveformPlaying,P=m.onBufferingStart,k=m.onBufferingEnd,V=m.onVideoPlayPause,b=m.videoType,I=void 0===b?"video/mp4":b,j=m.className,J=void 0===j?"":j,x=m.onVideoLoadingStateChange,w=m.isUrlPending,N=m.isPeaksPending,B=m.signedUrl,C=m.AudioData,T=m.showOnlyMatched,M=m.setShowOnlyMatched,R=m.wavesurferRef,A=m.segments,F=m.setIsAudioPlaying,L=m.handleAudioTimeUpdate,O=m.customStyles,U=m.waveformStyles,z=l(null),E=l(null),W=l(null),D=l(!1),H=l(!1),_=i(!1),q=_[0];_[1];var G=i(!0)[0],K=i(!0),Q=K[0],X=K[1],Y=i("1x"),Z=Y[0],$=Y[1],ee=i(!1),ne=ee[0],oe=ee[1],le=function(){oe(function(e){return!e})};r(function(){if(console.log("[VideoJS] useEffect triggered",{videoSrc:g}),z.current){console.log("[VideoJS] Initializing player"),X(!0),null==x||x(!0);var e=t(z.current,{controls:!1,autoplay:!1,preload:"auto",fluid:!0,muted:!0,sources:[{src:g,type:I}]});return e.on("loadstart",function(){console.log("[VideoJS] loadstart"),X(!0),null==x||x(!0)}),e.on("canplay",function(){console.log("[VideoJS] canplay",{isVideoLoading:Q,isBuffering:D.current}),Q&&(console.log("[VideoJS] Video loading finished"),X(!1),null==x||x(!1)),D.current&&(console.log("[VideoJS] Buffering ended"),D.current=!1,setTimeout(function(){console.log("[VideoJS] onBufferingEnd()"),k()},100))}),e.on("waiting",function(){console.log("[VideoJS] waiting (buffering start)"),D.current||(D.current=!0,H.current=S,console.log("[VideoJS] Buffering started",{wasPlaying:H.current}),P())}),e.on("error",function(){console.error("[VideoJS] Player error",e.error()),X(!1),null==x||x(!1)}),E.current=e,console.log("[VideoJS] Player ready"),function(){var e;console.log("[VideoJS] Disposing player"),null===(e=E.current)||void 0===e||e.dispose(),E.current=null}}console.warn("[VideoJS] videoRef is null")},[g]),r(function(){if(E.current){var e=E.current.currentTime();Math.abs(e-h)>.2&&E.current.currentTime(h)}},[h]),r(function(){E.current&&!D.current&&(S&&E.current.paused()?E.current.play().catch(function(){}):S||E.current.paused()||E.current.pause())},[S]),r(function(){var e,n,o,l=parseFloat(Z.replace("x",""));null===(e=E.current)||void 0===e||e.playbackRate(l),null===(o=null===(n=R.current)||void 0===n?void 0:n.setPlaybackRate)||void 0===o||o.call(n,l)},[Z]);return n("div",e({ref:W,className:"".concat(v.container," ").concat(J),style:null==O?void 0:O.container},{children:[o("video",{ref:z,className:"video-js vjs-big-play-centered ".concat(v.video),style:null==O?void 0:O.video,playsInline:!0,muted:!0}),n("div",e({className:"".concat(v.controlsWrapper," ").concat(G?v.visible:v.hidden),style:null==O?void 0:O.controlsWrapper},{children:[ne&&n("div",e({className:v.speedSelector,style:null==O?void 0:O.speedSelector},{children:[o("div",e({className:v.speedHeader,style:null==O?void 0:O.speedHeader},{children:"Playback Speed"})),["0.5x","1x","1.5x","2x"].map(function(n){return o("button",e({onClick:function(){return function(e){var n,o,l;$(e),oe(!1);var i=parseFloat(e.replace("x",""));null===(n=E.current)||void 0===n||n.playbackRate(i),null===(l=null===(o=R.current)||void 0===o?void 0:o.setPlaybackRate)||void 0===l||l.call(o,i)}(n)},className:v.speedItem,style:null==O?void 0:O.speedItem},{children:n}),n)})]})),n("div",e({className:v.controlBar,style:null==O?void 0:O.controlBar},{children:[o("div",{children:o("button",S?e({onClick:function(e){e.stopPropagation(),null==V||V(!1)},style:null==O?void 0:O.pauseIcon},{children:o(u,{})}):e({onClick:function(e){e.stopPropagation(),null==V||V(!0)},style:null==O?void 0:O.playIcon},{children:o(d,{})}))}),n("div",e({className:v.rightControls,style:null==O?void 0:O.rightControls},{children:["1x"!==Z?o("span",e({onClick:le},{children:Z})):o("button",e({onClick:le,style:null==O?void 0:O.playBackSpeedIcon},{children:o(p,{})})),o("button",e({onClick:function(e){var n,o,l;e.stopPropagation(),W.current&&(q?null===(l=document.exitFullscreen)||void 0===l||l.call(document):null===(o=(n=W.current).requestFullscreen)||void 0===o||o.call(n))}},{children:o(q?s:a,{})}))]}))]})),o("div",e({className:v.timeline,style:null==O?void 0:O.timeline},{children:w||N?o("div",e({className:v.loader,style:null==O?void 0:O.loader},{children:o("span",{children:"Loading audio-timeline peaks..."})})):B&&C&&o(c,{ref:R,audio_file_name:B,peaks:null!==(f=C.peaks)&&void 0!==f?f:[],duration:null!==(y=C.duration)&&void 0!==y?y:0,matchedSegments:A,showOnlyMatched:T,setShowOnlyMatched:M,setIsAudioPlaying:F,onTimeUpdate:L,onToggleShowMatched:function(){},customStyles:U})}))]}))]}))};export{m as default};
1
+ import{jsxs as e,jsx as o}from"react/jsx-runtime";import{useRef as n,useState as l,useEffect as i}from"react";import r from"video.js";import"video.js/dist/video-js.css";import s from"./AudioTimeLineSlider.js";import t from"../icons/MaximizeIcon.js";import a from"../icons/MinimizeIcon.js";import c from"../icons/PlayIcon.js";import d from"../icons/PauseIcon.js";import u from"../icons/PlaybackSpeedIcon.js";import p from"./videoPlayer.module.css.js";const m=({videoSrc:m,currentTime:g,isWaveformPlaying:v,onBufferingStart:y,onBufferingEnd:f,onVideoPlayPause:h,videoType:S="video/mp4",className:b="",onVideoLoadingStateChange:j,isUrlPending:P,isPeaksPending:O,signedUrl:k,AudioData:V,showOnlyMatched:I,setShowOnlyMatched:J,wavesurferRef:x,segments:w,setIsAudioPlaying:N,handleAudioTimeUpdate:B,customStyles:C,waveformStyles:T})=>{var M,R;const A=n(null),$=n(null),F=n(null),L=n(!1),U=n(!1),[z,E]=l(!1),[W]=l(!0),[D,H]=l(!0),[_,q]=l("1x"),[G,K]=l(!1),Q=()=>{K(e=>!e)};i(()=>{if(console.log("[VideoJS] useEffect triggered",{videoSrc:m}),!A.current)return void console.warn("[VideoJS] videoRef is null");console.log("[VideoJS] Initializing player"),H(!0),null==j||j(!0);const e=r(A.current,{controls:!1,autoplay:!1,preload:"auto",fluid:!0,muted:!0,sources:[{src:m,type:S}]});return e.on("loadstart",()=>{console.log("[VideoJS] loadstart"),H(!0),null==j||j(!0)}),e.on("canplay",()=>{console.log("[VideoJS] canplay",{isVideoLoading:D,isBuffering:L.current}),D&&(console.log("[VideoJS] Video loading finished"),H(!1),null==j||j(!1)),L.current&&(console.log("[VideoJS] Buffering ended"),L.current=!1,setTimeout(()=>{console.log("[VideoJS] onBufferingEnd()"),f()},100))}),e.on("waiting",()=>{console.log("[VideoJS] waiting (buffering start)"),L.current||(L.current=!0,U.current=v,console.log("[VideoJS] Buffering started",{wasPlaying:U.current}),y())}),e.on("error",()=>{console.error("[VideoJS] Player error",e.error()),H(!1),null==j||j(!1)}),$.current=e,console.log("[VideoJS] Player ready"),()=>{var e;console.log("[VideoJS] Disposing player"),null===(e=$.current)||void 0===e||e.dispose(),$.current=null}},[m]),i(()=>{if(!$.current)return;const e=$.current.currentTime();Math.abs(e-g)>.2&&$.current.currentTime(g)},[g]),i(()=>{$.current&&!L.current&&(v&&$.current.paused()?$.current.play().catch(()=>{}):v||$.current.paused()||$.current.pause())},[v]),i(()=>{var e,o,n;const l=parseFloat(_.replace("x",""));null===(e=$.current)||void 0===e||e.playbackRate(l),null===(n=null===(o=x.current)||void 0===o?void 0:o.setPlaybackRate)||void 0===n||n.call(o,l)},[_]);return e("div",Object.assign({ref:F,className:`${p.container} ${b}`,style:null==C?void 0:C.container},{children:[o("video",{ref:A,className:`video-js vjs-big-play-centered ${p.video}`,style:null==C?void 0:C.video,playsInline:!0,muted:!0}),e("div",Object.assign({className:`${p.controlsWrapper} ${W?p.visible:p.hidden}`,style:null==C?void 0:C.controlsWrapper},{children:[G&&e("div",Object.assign({className:p.speedSelector,style:null==C?void 0:C.speedSelector},{children:[o("div",Object.assign({className:p.speedHeader,style:null==C?void 0:C.speedHeader},{children:"Playback Speed"})),["0.5x","1x","1.5x","2x"].map(e=>o("button",Object.assign({onClick:()=>(e=>{var o,n,l;q(e),K(!1);const i=parseFloat(e.replace("x",""));null===(o=$.current)||void 0===o||o.playbackRate(i),null===(l=null===(n=x.current)||void 0===n?void 0:n.setPlaybackRate)||void 0===l||l.call(n,i)})(e),className:p.speedItem,style:null==C?void 0:C.speedItem},{children:e}),e))]})),e("div",Object.assign({className:p.controlBar,style:null==C?void 0:C.controlBar},{children:[o("div",{children:o("button",v?Object.assign({onClick:e=>{e.stopPropagation(),null==h||h(!1)},style:null==C?void 0:C.pauseIcon},{children:o(d,{})}):Object.assign({onClick:e=>{e.stopPropagation(),null==h||h(!0)},style:null==C?void 0:C.playIcon},{children:o(c,{})}))}),e("div",Object.assign({className:p.rightControls,style:null==C?void 0:C.rightControls},{children:["1x"!==_?o("span",Object.assign({onClick:Q},{children:_})):o("button",Object.assign({onClick:Q,style:null==C?void 0:C.playBackSpeedIcon},{children:o(u,{})})),o("button",Object.assign({onClick:e=>{var o,n,l;e.stopPropagation(),F.current&&(z?null===(l=document.exitFullscreen)||void 0===l||l.call(document):null===(n=(o=F.current).requestFullscreen)||void 0===n||n.call(o))}},{children:o(z?a:t,{})}))]}))]})),o("div",Object.assign({className:p.timeline,style:null==C?void 0:C.timeline},{children:P||O?o("div",Object.assign({className:p.loader,style:null==C?void 0:C.loader},{children:o("span",{children:"Loading audio-timeline peaks..."})})):k&&V&&o(s,{ref:x,audio_file_name:k,peaks:null!==(M=V.peaks)&&void 0!==M?M:[],duration:null!==(R=V.duration)&&void 0!==R?R:0,matchedSegments:w,showOnlyMatched:I,setShowOnlyMatched:J,setIsAudioPlaying:N,onTimeUpdate:B,onToggleShowMatched:()=>{},customStyles:T})}))]}))]}))};export{m as default};
2
2
  //# sourceMappingURL=videoPlayer.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as t}from"tslib";import{jsx as r,jsxs as i}from"react/jsx-runtime";var o=function(o){var e=o.height,d=void 0===e?24:e,h=o.width;return r("div",{children:i("svg",t({xmlns:"http://www.w3.org/2000/svg",width:void 0===h?24:h,height:d,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},{children:[r("path",{d:"M2 10v3"}),r("path",{d:"M6 6v11"}),r("path",{d:"M10 3v18"}),r("path",{d:"M14 8v7"}),r("path",{d:"M18 5v13"}),r("path",{d:"M22 10v3"})]}))})};export{o as default};
1
+ import{jsx as t,jsxs as e}from"react/jsx-runtime";const r=({height:r=24,width:h=24})=>t("div",{children:e("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:h,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},{children:[t("path",{d:"M2 10v3"}),t("path",{d:"M6 6v11"}),t("path",{d:"M10 3v18"}),t("path",{d:"M14 8v7"}),t("path",{d:"M18 5v13"}),t("path",{d:"M22 10v3"})]}))});export{r as default};
2
2
  //# sourceMappingURL=AudioLinesIcon.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as t}from"tslib";import{jsx as r,jsxs as i}from"react/jsx-runtime";var o=function(o){var e=o.height,h=void 0===e?24:e,d=o.width;return r("div",{children:i("svg",t({xmlns:"http://www.w3.org/2000/svg",width:void 0===d?24:d,height:h,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:[r("path",{d:"M8 3H5a2 2 0 0 0-2 2v3"}),r("path",{d:"M21 8V5a2 2 0 0 0-2-2h-3"}),r("path",{d:"M3 16v3a2 2 0 0 0 2 2h3"}),r("path",{d:"M16 21h3a2 2 0 0 0 2-2v-3"})]}))})};export{o as default};
1
+ import{jsx as t,jsxs as e}from"react/jsx-runtime";const h=({height:h=24,width:r=24})=>t("div",{children:e("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:r,height:h,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:[t("path",{d:"M8 3H5a2 2 0 0 0-2 2v3"}),t("path",{d:"M21 8V5a2 2 0 0 0-2-2h-3"}),t("path",{d:"M3 16v3a2 2 0 0 0 2 2h3"}),t("path",{d:"M16 21h3a2 2 0 0 0 2-2v-3"})]}))});export{h as default};
2
2
  //# sourceMappingURL=MaximizeIcon.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as t}from"tslib";import{jsx as r,jsxs as i}from"react/jsx-runtime";var o=function(o){var e=o.height,h=void 0===e?24:e,d=o.width;return r("div",{children:i("svg",t({xmlns:"http://www.w3.org/2000/svg",width:void 0===d?24:d,height:h,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:[r("path",{d:"M8 3v3a2 2 0 0 1-2 2H3"}),r("path",{d:"M21 8h-3a2 2 0 0 1-2-2V3"}),r("path",{d:"M3 16h3a2 2 0 0 1 2 2v3"}),r("path",{d:"M16 21v-3a2 2 0 0 1 2-2h3"})]}))})};export{o as default};
1
+ import{jsx as t,jsxs as e}from"react/jsx-runtime";const h=({height:h=24,width:r=24})=>t("div",{children:e("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:r,height:h,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:[t("path",{d:"M8 3v3a2 2 0 0 1-2 2H3"}),t("path",{d:"M21 8h-3a2 2 0 0 1-2-2V3"}),t("path",{d:"M3 16h3a2 2 0 0 1 2 2v3"}),t("path",{d:"M16 21v-3a2 2 0 0 1 2-2h3"})]}))});export{h as default};
2
2
  //# sourceMappingURL=MinimizeIcon.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as r}from"tslib";import{jsx as t,jsxs as i}from"react/jsx-runtime";var e=function(e){var o=e.height,h=void 0===o?24:o,n=e.width;return t("div",{children:i("svg",r({xmlns:"http://www.w3.org/2000/svg",width:void 0===n?24:n,height:h,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:[t("rect",{x:"14",y:"3",width:"5",height:"18",rx:"1"}),t("rect",{x:"5",y:"3",width:"5",height:"18",rx:"1"})]}))})};export{e as default};
1
+ import{jsx as t,jsxs as e}from"react/jsx-runtime";const r=({height:r=24,width:i=24})=>t("div",{children:e("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:i,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:[t("rect",{x:"14",y:"3",width:"5",height:"18",rx:"1"}),t("rect",{x:"5",y:"3",width:"5",height:"18",rx:"1"})]}))});export{r as default};
2
2
  //# sourceMappingURL=PauseIcon.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as r}from"tslib";import{jsx as t}from"react/jsx-runtime";var o=function(o){var i=o.height,e=void 0===i?24:i,n=o.width;return t("svg",r({xmlns:"http://www.w3.org/2000/svg",width:void 0===n?24:n,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:t("path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z"})}))};export{o as default};
1
+ import{jsx as t}from"react/jsx-runtime";const e=({height:e=24,width:o=24})=>t("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:o,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:t("path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z"})}));export{e as default};
2
2
  //# sourceMappingURL=PlayIcon.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as C}from"tslib";import{jsxs as i,jsx as t}from"react/jsx-runtime";var l=function(){return i("svg",C({xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 12 12",fill:"none"},{children:[i("g",C({"clip-path":"url(#clip0_3246_74403)"},{children:[t("path",{d:"M4.80358 0.7585C5.18858 0.671 5.58907 0.625 6.00007 0.625C8.96858 0.625 11.3751 3.0315 11.3751 6C11.3751 8.9685 8.96858 11.375 6.00007 11.375C5.58907 11.375 5.18858 11.329 4.80358 11.2415C4.75554 11.2306 4.71014 11.2103 4.66995 11.1818C4.62975 11.1533 4.59557 11.1172 4.56933 11.0755C4.5431 11.0338 4.52534 10.9874 4.51706 10.9388C4.50878 10.8902 4.51014 10.8405 4.52107 10.7925C4.53201 10.7445 4.55229 10.6991 4.58077 10.6589C4.60926 10.6187 4.64537 10.5845 4.68707 10.5583C4.72876 10.532 4.77521 10.5143 4.82377 10.506C4.87233 10.4977 4.92204 10.4991 4.97007 10.51C5.64726 10.6639 6.35041 10.6633 7.02734 10.5083C7.70427 10.3533 8.33761 10.0479 8.88035 9.61462C9.4231 9.18139 9.86131 8.63149 10.1625 8.00574C10.4636 7.37999 10.62 6.69445 10.62 6C10.62 5.30555 10.4636 4.62001 10.1625 3.99426C9.86131 3.36851 9.4231 2.81861 8.88035 2.38538C8.33761 1.95214 7.70427 1.64668 7.02734 1.49168C6.35041 1.33668 5.64726 1.3361 4.97007 1.49C4.87307 1.51208 4.77127 1.49472 4.68707 1.44174C4.60286 1.38876 4.54315 1.3045 4.52107 1.2075C4.499 1.1105 4.51636 1.0087 4.56933 0.924492C4.62231 0.840289 4.70657 0.780579 4.80358 0.7585Z",fill:"white"}),t("path",{opacity:"0.5",d:"M3.65722 1.56573C3.71017 1.64988 3.72754 1.75161 3.70551 1.84856C3.68347 1.94551 3.62384 2.02974 3.53972 2.08273C2.95168 2.45316 2.45415 2.95069 2.08372 3.53873C2.03075 3.62294 1.94649 3.68265 1.84948 3.70474C1.75248 3.72682 1.65068 3.70946 1.56647 3.65648C1.48227 3.60351 1.42255 3.51925 1.40047 3.42225C1.37839 3.32524 1.39575 3.22344 1.44872 3.13923C1.87921 2.45616 2.4574 1.87832 3.14072 1.44823C3.22487 1.39528 3.3266 1.37792 3.42355 1.39995C3.5205 1.42199 3.60423 1.48162 3.65722 1.56573ZM1.56672 8.34273C1.65087 8.28978 1.7526 8.27242 1.84955 8.29445C1.9465 8.31649 2.03073 8.37612 2.08372 8.46023C2.45409 9.04846 2.95163 9.54616 3.53972 9.91673C3.58264 9.94237 3.61999 9.97632 3.64959 10.0166C3.67919 10.0569 3.70044 10.1027 3.71209 10.1513C3.72374 10.1999 3.72555 10.2503 3.71742 10.2997C3.70929 10.349 3.69139 10.3962 3.66475 10.4385C3.63812 10.4808 3.6033 10.5173 3.56234 10.546C3.52138 10.5746 3.4751 10.5948 3.42623 10.6053C3.37736 10.6158 3.32688 10.6164 3.27777 10.6071C3.22865 10.5979 3.18189 10.5789 3.14022 10.5512C2.45721 10.1209 1.87937 9.54288 1.44922 8.85973C1.39627 8.77559 1.37891 8.67386 1.40094 8.57691C1.42297 8.47996 1.4826 8.39573 1.56672 8.34273Z",fill:"white"}),t("path",{opacity:"0.3",d:"M1.48951 4.96617C1.51159 4.86917 1.49423 4.76736 1.44125 4.68316C1.38827 4.59896 1.30401 4.53925 1.20701 4.51717C1.11001 4.49509 1.00821 4.51245 0.924004 4.56543C0.8398 4.61841 0.780091 4.70267 0.758012 4.79967C0.670512 5.18467 0.624512 5.58517 0.624512 5.99617C0.624512 6.40717 0.670512 6.80717 0.758012 7.19217C0.780025 7.28917 0.83967 7.37346 0.923827 7.42648C1.00798 7.47951 1.10976 7.49693 1.20676 7.47492C1.30376 7.45291 1.38805 7.39326 1.44108 7.3091C1.4941 7.22495 1.51152 7.12317 1.48951 7.02617C1.41292 6.68819 1.37434 6.34271 1.37451 5.99617C1.37451 5.64167 1.41451 5.29717 1.48951 4.96617Z",fill:"white"}),t("path",{d:"M7.707 5.46999C8.0975 5.70099 8.0975 6.29799 7.707 6.52899L5.347 7.92249C4.967 8.14649 4.5 7.85449 4.5 7.39249V4.60649C4.5 4.14449 4.967 3.85299 5.347 4.07699L7.707 5.46999Z",fill:"white"})]})),t("defs",{children:t("clipPath",C({id:"clip0_3246_74403"},{children:t("rect",{width:"12",height:"12",fill:"white"})}))})]}))};export{l as default};
1
+ import{jsxs as C,jsx as i}from"react/jsx-runtime";const t=()=>C("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 12 12",fill:"none"},{children:[C("g",Object.assign({"clip-path":"url(#clip0_3246_74403)"},{children:[i("path",{d:"M4.80358 0.7585C5.18858 0.671 5.58907 0.625 6.00007 0.625C8.96858 0.625 11.3751 3.0315 11.3751 6C11.3751 8.9685 8.96858 11.375 6.00007 11.375C5.58907 11.375 5.18858 11.329 4.80358 11.2415C4.75554 11.2306 4.71014 11.2103 4.66995 11.1818C4.62975 11.1533 4.59557 11.1172 4.56933 11.0755C4.5431 11.0338 4.52534 10.9874 4.51706 10.9388C4.50878 10.8902 4.51014 10.8405 4.52107 10.7925C4.53201 10.7445 4.55229 10.6991 4.58077 10.6589C4.60926 10.6187 4.64537 10.5845 4.68707 10.5583C4.72876 10.532 4.77521 10.5143 4.82377 10.506C4.87233 10.4977 4.92204 10.4991 4.97007 10.51C5.64726 10.6639 6.35041 10.6633 7.02734 10.5083C7.70427 10.3533 8.33761 10.0479 8.88035 9.61462C9.4231 9.18139 9.86131 8.63149 10.1625 8.00574C10.4636 7.37999 10.62 6.69445 10.62 6C10.62 5.30555 10.4636 4.62001 10.1625 3.99426C9.86131 3.36851 9.4231 2.81861 8.88035 2.38538C8.33761 1.95214 7.70427 1.64668 7.02734 1.49168C6.35041 1.33668 5.64726 1.3361 4.97007 1.49C4.87307 1.51208 4.77127 1.49472 4.68707 1.44174C4.60286 1.38876 4.54315 1.3045 4.52107 1.2075C4.499 1.1105 4.51636 1.0087 4.56933 0.924492C4.62231 0.840289 4.70657 0.780579 4.80358 0.7585Z",fill:"white"}),i("path",{opacity:"0.5",d:"M3.65722 1.56573C3.71017 1.64988 3.72754 1.75161 3.70551 1.84856C3.68347 1.94551 3.62384 2.02974 3.53972 2.08273C2.95168 2.45316 2.45415 2.95069 2.08372 3.53873C2.03075 3.62294 1.94649 3.68265 1.84948 3.70474C1.75248 3.72682 1.65068 3.70946 1.56647 3.65648C1.48227 3.60351 1.42255 3.51925 1.40047 3.42225C1.37839 3.32524 1.39575 3.22344 1.44872 3.13923C1.87921 2.45616 2.4574 1.87832 3.14072 1.44823C3.22487 1.39528 3.3266 1.37792 3.42355 1.39995C3.5205 1.42199 3.60423 1.48162 3.65722 1.56573ZM1.56672 8.34273C1.65087 8.28978 1.7526 8.27242 1.84955 8.29445C1.9465 8.31649 2.03073 8.37612 2.08372 8.46023C2.45409 9.04846 2.95163 9.54616 3.53972 9.91673C3.58264 9.94237 3.61999 9.97632 3.64959 10.0166C3.67919 10.0569 3.70044 10.1027 3.71209 10.1513C3.72374 10.1999 3.72555 10.2503 3.71742 10.2997C3.70929 10.349 3.69139 10.3962 3.66475 10.4385C3.63812 10.4808 3.6033 10.5173 3.56234 10.546C3.52138 10.5746 3.4751 10.5948 3.42623 10.6053C3.37736 10.6158 3.32688 10.6164 3.27777 10.6071C3.22865 10.5979 3.18189 10.5789 3.14022 10.5512C2.45721 10.1209 1.87937 9.54288 1.44922 8.85973C1.39627 8.77559 1.37891 8.67386 1.40094 8.57691C1.42297 8.47996 1.4826 8.39573 1.56672 8.34273Z",fill:"white"}),i("path",{opacity:"0.3",d:"M1.48951 4.96617C1.51159 4.86917 1.49423 4.76736 1.44125 4.68316C1.38827 4.59896 1.30401 4.53925 1.20701 4.51717C1.11001 4.49509 1.00821 4.51245 0.924004 4.56543C0.8398 4.61841 0.780091 4.70267 0.758012 4.79967C0.670512 5.18467 0.624512 5.58517 0.624512 5.99617C0.624512 6.40717 0.670512 6.80717 0.758012 7.19217C0.780025 7.28917 0.83967 7.37346 0.923827 7.42648C1.00798 7.47951 1.10976 7.49693 1.20676 7.47492C1.30376 7.45291 1.38805 7.39326 1.44108 7.3091C1.4941 7.22495 1.51152 7.12317 1.48951 7.02617C1.41292 6.68819 1.37434 6.34271 1.37451 5.99617C1.37451 5.64167 1.41451 5.29717 1.48951 4.96617Z",fill:"white"}),i("path",{d:"M7.707 5.46999C8.0975 5.70099 8.0975 6.29799 7.707 6.52899L5.347 7.92249C4.967 8.14649 4.5 7.85449 4.5 7.39249V4.60649C4.5 4.14449 4.967 3.85299 5.347 4.07699L7.707 5.46999Z",fill:"white"})]})),i("defs",{children:i("clipPath",Object.assign({id:"clip0_3246_74403"},{children:i("rect",{width:"12",height:"12",fill:"white"})}))})]}));export{t as default};
2
2
  //# sourceMappingURL=PlaybackSpeedIcon.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as r}from"tslib";import{jsx as t,jsxs as i}from"react/jsx-runtime";var e=function(e){var o=e.height,n=void 0===o?24:o,h=e.width;return t("div",{children:i("svg",r({xmlns:"http://www.w3.org/2000/svg",width:void 0===h?24:h,height:n,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:[t("path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5"}),t("rect",{x:"2",y:"6",width:"14",height:"12",rx:"2"})]}))})};export{e as default};
1
+ import{jsx as t,jsxs as e}from"react/jsx-runtime";const r=({height:r=24,width:i=24})=>t("div",{children:e("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:i,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:[t("path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5"}),t("rect",{x:"2",y:"6",width:"14",height:"12",rx:"2"})]}))});export{r as default};
2
2
  //# sourceMappingURL=VideoIcon.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as r}from"tslib";import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import u,{forwardRef as c,useState as o,useRef as i,useEffect as a,useCallback as l}from"react";import s from"wavesurfer.js";import d from"wavesurfer.js/dist/plugins/regions";import f from"./searchwaveform.module.css.js";import v from"./icons/PauseIcon.js";import m from"./icons/PlayIcon.js";import{useAudioPlayPause as p}from"./store/autoplay.wavefrom.js";var g=c(function(c,g){var h=c.audio_file_name,y=c.showOnlyMatched,T=c.setShowOnlyMatched,S=c.matchedSegments,w=c.onTimeUpdate;c.currentAudioTime;var N=c.peaks,P=c.duration,k=c.setIsAudioPlaying,I=c.setChevronIndex,M=c.chevronIndex,_=void 0===M?0:M,b=c.onToggleShowMatched,R=c.topicId,x=c.isVideoBuffering,C=c.playOnlyMatched,B=void 0===C||C,j=c.customStyles,O=o(!1),A=O[0],D=O[1],q=o(!0),W=q[0],E=q[1],F=o(!1),z=F[0],H=F[1],L=o(!1),U=L[0],X=L[1],V=o(!1),G=V[0],J=V[1],K=o(!1);K[0];var Q=K[1],Y=o(0),Z=Y[0],$=Y[1],rr=o(!1);rr[0];var er=rr[1],nr=o("00:00:00"),tr=nr[0],ur=nr[1],cr=o("00:00:00"),or=cr[0],ir=cr[1],ar=o(0),lr=ar[0],sr=ar[1],dr=o(!1),fr=dr[0],vr=dr[1],mr=o(0),pr=mr[0],gr=mr[1],hr=o("00:00:00"),yr=hr[0],Tr=hr[1],Sr=i(null),wr=i(!1),Nr=i(null),Pr=i(null),kr=i(null),Ir=i(!1),Mr=i(null),_r=i(null),br=i(0),Rr=i(0),xr=o(!1),Cr=xr[0],Br=xr[1],jr=p(),Or=jr.playTopicId,Ar=jr.resetTrigger,Dr=jr.pendingPlayRequest,qr=jr.setPendingPlayRequest,Wr=jr.triggerPlayForTopic,Er=i(null),Fr=function(r){try{var e=r.split(":"),n=e[0],t=e[1],u=e[2],c=(e[3],parseInt(n).toString().padStart(2,"0")),o=parseInt(t).toString().padStart(2,"0"),i=parseInt(u).toString().padStart(2,"0");return"".concat(c,":").concat(o,":").concat(i)}catch(r){console.log("Error converting formatTimeToHMS",r)}};a(function(){null==T||T(B)},[B]),a(function(){Cr&&Dr===R&&(qr(null),setTimeout(function(){Wr(R)},100))},[Cr,Dr,R]),a(function(){Cr&&Or===R&&(Er.current&&(Er.current.click(),D(!0)),Ar())},[Or,R,Cr]),a(function(){return Br(!0),function(){Br(!1)}},[]),a(function(){if(h&&Nr.current&&!Ir.current){E(!0);var r=d.create(),e=s.create({container:Nr.current,waveColor:"#D0D5DD",progressColor:"#9CA3AF",cursorColor:"#6B7280",barWidth:2,barRadius:3,height:64,normalize:!0,peaks:[new Float32Array(N)],duration:P,url:h});return Pr.current=e,kr.current=e.registerPlugin(r),Ir.current=!0,e.on("decode",function(){er(!0),Hr();var r=Fr(zr(P));ir(r||"00:00:00")}),e.on("ready",function(){E(!1)}),e.on("play",function(){D(!0),k&&k(!0)}),e.on("pause",function(){D(!1),k&&k(!1)}),e.on("finish",function(){D(!1),k&&k(!1),z&&(H(!1),X(!1),J(!0))}),e.on("seeking",function(){y||z&&!U&&Lr()}),e.on("error",function(){E(!1)}),e.on("audioprocess",function(r){(w&&w(r),wr.current)||sr(r/P*100);var e=Fr(zr(r));ur(e||"00:00:00"),Rr.current=r}),function(){Mr.current&&clearTimeout(Mr.current),_r.current,e.destroy(),Ir.current=!1,Pr.current=null}}},[h]),a(function(){Pr.current&&(Pr.current.setOptions({interact:!y}),A&&Pr.current.pause(),y?(H(!0),br.current=0):Lr(),b&&b(y))},[y]);var zr=function(r){var e=Math.floor(r/3600),n=Math.floor(r%3600/60),t=Math.floor(r%60),u=Math.floor(r%1*1e3);return"".concat(String(e).padStart(2,"0"),":").concat(String(n).padStart(2,"0"),":").concat(String(t).padStart(2,"0"),":").concat(String(u).padStart(3,"0"))},Hr=l(function(){kr.current&&Pr.current&&(kr.current.clearRegions(),S.forEach(function(r,e){kr.current.addRegion({start:r.start_time,end:r.end_time,color:"rgba(254, 239, 137, 0.5)",drag:!1,resize:!1,id:r.segment_id})}))},[S]),Lr=l(function(){Pr.current&&(H(!1),X(!1),J(!1),Q(!1),Mr.current&&(clearTimeout(Mr.current),Mr.current=null),_r.current&&(Pr.current.un("audioprocess",_r.current),_r.current=null))},[]),Ur=l(function(r){!y&&Pr.current&&(Pr.current.seekTo(r/P),Pr.current.play(),D(!0),k&&k(!0),ur(Fr(zr(r))),H(!1),X(!1),J(!1))},[y,P,k,zr,Fr]),Xr=i(!1),Vr=l(function(){if(!Xr.current&&Pr.current&&S.length){Xr.current=!0,Pr.current.pause();var r=br.current+1;if(console.log("Current segment:",br.current),console.log("Next index calculated:",r),console.log("Total segments:",S.length),r<S.length){var e=S[r];ur(Fr(zr(e.start_time))),I&&I(r),$(r),br.current=r;var n=y?0:2e3;Mr.current=setTimeout(function(){Xr.current=!1,setTimeout(function(){if(Pr.current){Pr.current.seekTo(e.start_time/P),Pr.current.play();var r=e.end_time,n=function(e){var t;e>=r&&(null===(t=Pr.current)||void 0===t||t.un("audioprocess",n),_r.current=null,Vr())};_r.current=n,Pr.current.on("audioprocess",n)}},100)},n)}else{if(console.log("End of cycle reached, resetting to index 0"),H(y),X(!0),J(!0),br.current=0,$(0),I&&I(0),S.length>0){var t=S[0];ur(Fr(zr(t.start_time))),Pr.current.seekTo(t.start_time/P)}Pr.current.isPlaying()&&Pr.current.pause(),Mr.current=setTimeout(function(){Xr.current=!1,Pr.current&&Pr.current.isPlaying()&&Pr.current.pause()},y?0:2e3)}}},[S,P,I,zr,y]),Gr=l(function(){if(Pr.current&&S.length){var r=br.current;if(r>=S.length)return H(y),void J(!0);var e=S[r];$(r),ur(Fr(zr(e.start_time))),I&&I(r),setTimeout(function(){if(Pr.current){Pr.current.seekTo(e.start_time/P),Pr.current.play();var r=e.end_time,n=function(e){var t;e>=r&&(null===(t=Pr.current)||void 0===t||t.un("audioprocess",n),_r.current=null,Vr())};_r.current=n,Pr.current.on("audioprocess",n)}},100)}},[S,P,I,Vr,zr,y]),Jr=l(function(){if(Pr.current&&S.length){_r.current&&(Pr.current.un("audioprocess",_r.current),_r.current=null);var r=S[br.current];if(r){var e=r.end_time,n=function(r){var t;r>=e&&(null===(t=Pr.current)||void 0===t||t.un("audioprocess",n),_r.current=null,Vr())};_r.current=n,Pr.current.on("audioprocess",n)}}},[S,Vr]),Kr=l(function(){Pr.current&&(y?A?(Pr.current.pause(),X(!0)):U?(Pr.current.play(),X(!1),Jr()):G?(J(!1),br.current=0,Gr()):Gr():A?Pr.current.pause():Pr.current.play())},[A,y,U,G,Gr,Jr]),Qr=l(function(r){if(Pr.current&&0!==S.length){var e,n=A;A&&(Pr.current.pause(),X(!0)),_r.current&&(Pr.current.un("audioprocess",_r.current),_r.current=null),e="next"===r?(Z+1)%S.length:(Z-1+S.length)%S.length,$(e),br.current=e;var t=S[e];Pr.current.seekTo(t.start_time/P),I&&I(e),n&&y&&setTimeout(function(){Pr.current&&(Pr.current.play(),X(!1),Jr())},50)}},[Z,S,I,P,A,y,Jr]),Yr=l(function(r){Pr.current&&(y||(z&&Lr(),Pr.current.seekTo(r/P)))},[P,z,Lr,y]);a(function(){if(S.length>0&&void 0!==_&&Pr.current&&!Xr.current){if(_===br.current)return;var r=A;_r.current&&(Pr.current.un("audioprocess",_r.current),_r.current=null);var e=S[_];e&&(Pr.current.seekTo(e.start_time/P),$(_),br.current=_,r&&y&&setTimeout(function(){Pr.current&&Jr()},50))}},[_,P,S,y,A,Jr]);var Zr=i(!1);a(function(){x&&Pr.current&&Pr.current.isPlaying()&&(Zr.current=!0,Pr.current.pause(),z&&X(!0)),!x&&Zr.current&&Pr.current&&Pr.current&&(Pr.current.play(),Zr.current=!1,z&&U&&(X(!1),Jr()))},[x,z,U,Jr]),u.useImperativeHandle(g,function(){return{waveSurfer:Pr.current,navigateSegments:Qr,togglePlayPause:Kr,getCurrentSegmentIndex:function(){return Z},setCurrentSegmentIndex:$,isPlayingSequence:function(){return z},setPlayingSequence:function(r){return H(r)},seekToTime:Yr,showOnlyMatched:y,setShowOnlyMatched:function(r){return null==T?void 0:T(r)},handleIndividualSegmentPlay:Ur}},[Pr.current,Qr,Kr,Z,z,Yr,y,Ur]);return e("div",r({className:f.container,style:null==j?void 0:j.container},{children:n("div",r({className:f.inner,style:null==j?void 0:j.inner},{children:[n("div",r({className:f.waveformRow,style:null==j?void 0:j.waveformRow},{children:[e("div",r({className:f.playButtonWrapper,style:null==j?void 0:j.playButtonWrapper},{children:e("button",r({ref:Er,onClick:Kr,className:f.playButton,style:null==j?void 0:j.playButton,title:A?"Pause":"Play",disabled:W},{children:W?e(t,{children:"Loading..."}):e("div",A?r({className:f.icon,style:null==j?void 0:j.pauseIcon},{children:e(v,{})}):r({className:f.icon,style:null==j?void 0:j.playIcon},{children:e(m,{})}))}))})),e("div",{ref:Nr,className:f.waveform,style:null==j?void 0:j.waveform})]})),n("div",r({className:f.sliderRow,style:null==j?void 0:j.sliderRow},{children:[e("div",{className:f.buttonSpacer,style:null==j?void 0:j.buttonSpacer}),n("div",r({className:"".concat(f.slider,"\n ").concat(f.group,"\n ").concat(y?f.disabled:f.interactive),ref:Sr,style:null==j?void 0:j.slider,onClick:y?void 0:function(r){var e;if(!y){var n=null===(e=Sr.current)||void 0===e?void 0:e.getBoundingClientRect();if(n&&Pr.current){var t=(r.clientX-n.left)/n.width*100,u=t/100*P;sr(t),Pr.current.seekTo(u/P),z&&Lr()}}},onMouseMove:y?void 0:function(r){if(!y&&Sr.current){var e=Sr.current.getBoundingClientRect(),n=r.clientX-e.left;if(n>=0&&n<=e.width){var t=n/e.width*100;vr(!0),gr(n);var u=Fr(zr(t/100*P));Tr(u||"00:00:00")}}},onMouseLeave:function(){vr(!1)},onMouseDown:y?void 0:function(){y||(wr.current=!0)},onMouseUp:y?void 0:function(){if(!y&&(wr.current=!1,Pr.current)){var r=lr/100*P;Pr.current.seekTo(r/P),z&&Lr()}}},{children:[e("div",{className:f.sliderTrack,style:null==j?void 0:j.sliderTrack}),e("div",{className:f.sliderProgress,style:r({width:"".concat(lr,"%")},null==j?void 0:j.sliderProgress)}),e("div",{className:f.sliderThumb,style:r({left:"".concat(lr,"%")},null==j?void 0:j.sliderThumb)}),fr&&!y&&e("div",r({className:f.timeTooltip,style:r({left:pr},null==j?void 0:j.timeTooltip)},{children:yr}))]}))]})),n("div",r({className:f.timeRow,style:null==j?void 0:j.timeRow},{children:[e("div",{className:f.buttonSpacer,style:null==j?void 0:j.buttonSpacer}),n("div",r({className:f.timeText,style:null==j?void 0:j.timeText},{children:[e("span",{children:tr}),e("span",{children:"/"}),e("span",{children:or})]}))]}))]}))}))});g.displayName="SearchWaveform";export{g as default};
1
+ import{jsx as e,jsxs as r,Fragment as t}from"react/jsx-runtime";import n,{forwardRef as c,useState as u,useRef as s,useEffect as o,useCallback as i}from"react";import l from"wavesurfer.js";import a from"wavesurfer.js/dist/plugins/regions";import d from"./searchwaveform.module.css.js";import m from"./icons/PauseIcon.js";import g from"./icons/PlayIcon.js";import{useAudioPlayPause as p}from"./store/autoplay.wavefrom.js";const v=c(({audio_file_name:c,showOnlyMatched:v,setShowOnlyMatched:h,matchedSegments:y,onTimeUpdate:f,currentAudioTime:T,peaks:S,duration:b,setIsAudioPlaying:w,setChevronIndex:j,chevronIndex:O=0,onToggleShowMatched:N,topicId:P,isVideoBuffering:k,playOnlyMatched:I=!0,customStyles:M},_)=>{const[R,x]=u(!1),[C,$]=u(!0),[B,A]=u(!1),[D,q]=u(!1),[W,E]=u(!1),[F,z]=u(!1),[H,L]=u(0),[U,X]=u(!1),[V,G]=u("00:00:00"),[J,K]=u("00:00:00"),[Q,Y]=u(0),[Z,ee]=u(!1),[re,te]=u(0),[ne,ce]=u("00:00:00"),ue=s(null),se=s(!1),oe=s(null),ie=s(null),le=s(null),ae=s(!1),de=s(null),me=s(null),ge=s(0),pe=s(0),[ve,he]=u(!1),{playTopicId:ye,resetTrigger:fe,pendingPlayRequest:Te,setPendingPlayRequest:Se,triggerPlayForTopic:be}=p(),we=s(null),je=e=>{try{const[r,t,n,c]=e.split(":"),u=parseInt(r).toString().padStart(2,"0"),s=parseInt(t).toString().padStart(2,"0");return`${u}:${s}:${parseInt(n).toString().padStart(2,"0")}`}catch(e){console.log("Error converting formatTimeToHMS",e)}};o(()=>{null==h||h(I)},[I]),o(()=>{ve&&Te===P&&(Se(null),setTimeout(()=>{be(P)},100))},[ve,Te,P]),o(()=>{ve&&ye===P&&(we.current&&(we.current.click(),x(!0)),fe())},[ye,P,ve]),o(()=>(he(!0),()=>{he(!1)}),[]),o(()=>{if(!c||!oe.current||ae.current)return;$(!0);const e=a.create(),r=l.create({container:oe.current,waveColor:"#D0D5DD",progressColor:"#9CA3AF",cursorColor:"#6B7280",barWidth:2,barRadius:3,height:64,normalize:!0,peaks:[new Float32Array(S)],duration:b,url:c});return ie.current=r,le.current=r.registerPlugin(e),ae.current=!0,r.on("decode",()=>{X(!0),Ne();const e=je(Oe(b));K(e||"00:00:00")}),r.on("ready",()=>{$(!1)}),r.on("play",()=>{x(!0),w&&w(!0)}),r.on("pause",()=>{x(!1),w&&w(!1)}),r.on("finish",()=>{x(!1),w&&w(!1),B&&(A(!1),q(!1),E(!0))}),r.on("seeking",()=>{v||B&&!D&&Pe()}),r.on("error",()=>{$(!1)}),r.on("audioprocess",e=>{if(f&&f(e),!se.current){Y(e/b*100)}const r=je(Oe(e));G(r||"00:00:00"),pe.current=e}),()=>{de.current&&clearTimeout(de.current),me.current,r.destroy(),ae.current=!1,ie.current=null}},[c]),o(()=>{ie.current&&(ie.current.setOptions({interact:!v}),R&&ie.current.pause(),v?(A(!0),ge.current=0):Pe(),N&&N(v))},[v]);const Oe=e=>{const r=Math.floor(e/3600),t=Math.floor(e%3600/60),n=Math.floor(e%60),c=Math.floor(e%1*1e3);return`${String(r).padStart(2,"0")}:${String(t).padStart(2,"0")}:${String(n).padStart(2,"0")}:${String(c).padStart(3,"0")}`},Ne=i(()=>{le.current&&ie.current&&(le.current.clearRegions(),y.forEach((e,r)=>{le.current.addRegion({start:e.start_time,end:e.end_time,color:"rgba(254, 239, 137, 0.5)",drag:!1,resize:!1,id:e.segment_id})}))},[y]),Pe=i(()=>{ie.current&&(A(!1),q(!1),E(!1),z(!1),de.current&&(clearTimeout(de.current),de.current=null),me.current&&(ie.current.un("audioprocess",me.current),me.current=null))},[]),ke=i(e=>{!v&&ie.current&&(ie.current.seekTo(e/b),ie.current.play(),x(!0),w&&w(!0),G(je(Oe(e))),A(!1),q(!1),E(!1))},[v,b,w,Oe,je]),Ie=s(!1),Me=i(()=>{if(Ie.current)return;if(!ie.current||!y.length)return;Ie.current=!0,ie.current.pause();const e=ge.current+1;if(console.log("Current segment:",ge.current),console.log("Next index calculated:",e),console.log("Total segments:",y.length),e<y.length){const r=y[e];G(je(Oe(r.start_time))),j&&j(e),L(e),ge.current=e;const t=v?0:2e3;de.current=setTimeout(()=>{Ie.current=!1,setTimeout(()=>{if(!ie.current)return;ie.current.seekTo(r.start_time/b),ie.current.play();const e=r.end_time,t=r=>{var n;r>=e&&(null===(n=ie.current)||void 0===n||n.un("audioprocess",t),me.current=null,Me())};me.current=t,ie.current.on("audioprocess",t)},100)},t)}else{if(console.log("End of cycle reached, resetting to index 0"),A(v),q(!0),E(!0),ge.current=0,L(0),j&&j(0),y.length>0){const e=y[0];G(je(Oe(e.start_time))),ie.current.seekTo(e.start_time/b)}ie.current.isPlaying()&&ie.current.pause(),de.current=setTimeout(()=>{Ie.current=!1,ie.current&&ie.current.isPlaying()&&ie.current.pause()},v?0:2e3)}},[y,b,j,Oe,v]),_e=i(()=>{if(!ie.current||!y.length)return;const e=ge.current;if(e>=y.length)return A(v),void E(!0);const r=y[e];L(e),G(je(Oe(r.start_time))),j&&j(e),setTimeout(()=>{if(!ie.current)return;ie.current.seekTo(r.start_time/b),ie.current.play();const e=r.end_time,t=r=>{var n;r>=e&&(null===(n=ie.current)||void 0===n||n.un("audioprocess",t),me.current=null,Me())};me.current=t,ie.current.on("audioprocess",t)},100)},[y,b,j,Me,Oe,v]),Re=i(()=>{if(!ie.current||!y.length)return;me.current&&(ie.current.un("audioprocess",me.current),me.current=null);const e=y[ge.current];if(!e)return;const r=e.end_time,t=e=>{var n;e>=r&&(null===(n=ie.current)||void 0===n||n.un("audioprocess",t),me.current=null,Me())};me.current=t,ie.current.on("audioprocess",t)},[y,Me]),xe=i(()=>{ie.current&&(v?R?(ie.current.pause(),q(!0)):D?(ie.current.play(),q(!1),Re()):W?(E(!1),ge.current=0,_e()):_e():R?ie.current.pause():ie.current.play())},[R,v,D,W,_e,Re]),Ce=i(e=>{if(!ie.current||0===y.length)return;const r=R;let t;R&&(ie.current.pause(),q(!0)),me.current&&(ie.current.un("audioprocess",me.current),me.current=null),t="next"===e?(H+1)%y.length:(H-1+y.length)%y.length,L(t),ge.current=t;const n=y[t];ie.current.seekTo(n.start_time/b),j&&j(t),r&&v&&setTimeout(()=>{ie.current&&(ie.current.play(),q(!1),Re())},50)},[H,y,j,b,R,v,Re]),$e=i(e=>{ie.current&&(v||(B&&Pe(),ie.current.seekTo(e/b)))},[b,B,Pe,v]);o(()=>{if(y.length>0&&void 0!==O&&ie.current&&!Ie.current){if(O===ge.current)return;const e=R;me.current&&(ie.current.un("audioprocess",me.current),me.current=null);const r=y[O];r&&(ie.current.seekTo(r.start_time/b),L(O),ge.current=O,e&&v&&setTimeout(()=>{ie.current&&Re()},50))}},[O,b,y,v,R,Re]);const Be=s(!1);o(()=>{k&&ie.current&&ie.current.isPlaying()&&(Be.current=!0,ie.current.pause(),B&&q(!0)),!k&&Be.current&&ie.current&&ie.current&&(ie.current.play(),Be.current=!1,B&&D&&(q(!1),Re()))},[k,B,D,Re]),n.useImperativeHandle(_,()=>({waveSurfer:ie.current,navigateSegments:Ce,togglePlayPause:xe,getCurrentSegmentIndex:()=>H,setCurrentSegmentIndex:L,isPlayingSequence:()=>B,setPlayingSequence:e=>A(e),seekToTime:$e,showOnlyMatched:v,setShowOnlyMatched:e=>null==h?void 0:h(e),handleIndividualSegmentPlay:ke}),[ie.current,Ce,xe,H,B,$e,v,ke]);return e("div",Object.assign({className:d.container,style:null==M?void 0:M.container},{children:r("div",Object.assign({className:d.inner,style:null==M?void 0:M.inner},{children:[r("div",Object.assign({className:d.waveformRow,style:null==M?void 0:M.waveformRow},{children:[e("div",Object.assign({className:d.playButtonWrapper,style:null==M?void 0:M.playButtonWrapper},{children:e("button",Object.assign({ref:we,onClick:xe,className:d.playButton,style:null==M?void 0:M.playButton,title:R?"Pause":"Play",disabled:C},{children:C?e(t,{children:"Loading..."}):e("div",R?Object.assign({className:d.icon,style:null==M?void 0:M.pauseIcon},{children:e(m,{})}):Object.assign({className:d.icon,style:null==M?void 0:M.playIcon},{children:e(g,{})}))}))})),e("div",{ref:oe,className:d.waveform,style:null==M?void 0:M.waveform})]})),r("div",Object.assign({className:d.sliderRow,style:null==M?void 0:M.sliderRow},{children:[e("div",{className:d.buttonSpacer,style:null==M?void 0:M.buttonSpacer}),r("div",Object.assign({className:`${d.slider}\n ${d.group}\n ${v?d.disabled:d.interactive}`,ref:ue,style:null==M?void 0:M.slider,onClick:v?void 0:e=>{var r;if(v)return;const t=null===(r=ue.current)||void 0===r?void 0:r.getBoundingClientRect();if(!t||!ie.current)return;const n=(e.clientX-t.left)/t.width*100,c=n/100*b;Y(n),ie.current.seekTo(c/b),B&&Pe()},onMouseMove:v?void 0:e=>{if(!v&&ue.current){const r=ue.current.getBoundingClientRect(),t=e.clientX-r.left;if(t>=0&&t<=r.width){const e=t/r.width*100;ee(!0),te(t);const n=je(Oe(e/100*b));ce(n||"00:00:00")}}},onMouseLeave:()=>{ee(!1)},onMouseDown:v?void 0:()=>{v||(se.current=!0)},onMouseUp:v?void 0:()=>{if(!v&&(se.current=!1,ie.current)){const e=Q/100*b;ie.current.seekTo(e/b),B&&Pe()}}},{children:[e("div",{className:d.sliderTrack,style:null==M?void 0:M.sliderTrack}),e("div",{className:d.sliderProgress,style:Object.assign({width:`${Q}%`},null==M?void 0:M.sliderProgress)}),e("div",{className:d.sliderThumb,style:Object.assign({left:`${Q}%`},null==M?void 0:M.sliderThumb)}),Z&&!v&&e("div",Object.assign({className:d.timeTooltip,style:Object.assign({left:re},null==M?void 0:M.timeTooltip)},{children:ne}))]}))]})),r("div",Object.assign({className:d.timeRow,style:null==M?void 0:M.timeRow},{children:[e("div",{className:d.buttonSpacer,style:null==M?void 0:M.buttonSpacer}),r("div",Object.assign({className:d.timeText,style:null==M?void 0:M.timeText},{children:[e("span",{children:V}),e("span",{children:"/"}),e("span",{children:J})]}))]}))]}))}))});v.displayName="SearchWaveform";export{v as default};
2
2
  //# sourceMappingURL=searchwaveform.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as r}from"tslib";import{jsx as e}from"react/jsx-runtime";import{createContext as n,useState as i,useContext as t}from"react";var u=n(void 0),o=function(n){var t=n.children,o=i(null),l=o[0],a=o[1],d=i(null),c=d[0],s=d[1],P=i(null),p=P[0],f=P[1];return e(u.Provider,r({value:{playTopicId:l,pendingPlayRequest:c,currentPlayingSpeakerId:p,triggerPlayForTopic:function(r){return a(r)},setPendingPlayRequest:s,setCurrentPlayingSpeakerId:f,resetTrigger:function(){return a(null)}}},{children:t}))},l=function(){var r=t(u);if(!r)throw new Error("useAudioPlayPause must be used within an AudioPlayProvider");return r};export{o as AudioPlayProvider,l as useAudioPlayPause};
1
+ import{jsx as e}from"react/jsx-runtime";import{createContext as r,useState as n,useContext as t}from"react";const i=r(void 0),l=({children:r})=>{const[t,l]=n(null),[o,u]=n(null),[a,s]=n(null);return e(i.Provider,Object.assign({value:{playTopicId:t,pendingPlayRequest:o,currentPlayingSpeakerId:a,triggerPlayForTopic:e=>l(e),setPendingPlayRequest:u,setCurrentPlayingSpeakerId:s,resetTrigger:()=>l(null)}},{children:r}))},o=()=>{const e=t(i);if(!e)throw new Error("useAudioPlayPause must be used within an AudioPlayProvider");return e};export{l as AudioPlayProvider,o as useAudioPlayPause};
2
2
  //# sourceMappingURL=autoplay.wavefrom.js.map
@@ -1,2 +1,2 @@
1
- var e=function(e){return e.sort(function(e,t){var n=e.segmentSelected?1:0;return(t.segmentSelected?1:0)-n})};export{e as sortTopicsByCheckedStatus};
1
+ const e=e=>e.sort((e,t)=>{const n=e.segmentSelected?1:0;return(t.segmentSelected?1:0)-n});export{e as sortTopicsByCheckedStatus};
2
2
  //# sourceMappingURL=word-segment-util.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as t}from"tslib";import{jsx as n,Fragment as i}from"react/jsx-runtime";import o from"../../../../CitationRenderer/CitationRenderer.js";import e from"../../ai-reasoning/BigEnoughComponent.js";var r=function(r){var a,c,l,s=(null===(a=r.customIcons)||void 0===a?void 0:a.bigEnoughCitationIcon)||n(i,{});return n(o,{inLineCitation:!0,citationTitle:r.title,citationId:"big-enough-".concat(r.citation.citation_number),citationComponent:n(e,{customStyles:r.customStyles,big_enough_decision_factors:r.citation}),chevronDownComponent:s,chevronUpComponent:s,styles:{pillButton:t({margin:"0px",padding:"0px",fontSize:"14px",color:"#526eff",cursor:"pointer",verticalAlign:"middle",whiteSpace:"nowrap",display:"inline-flex",alignItems:"center",background:"white",border:"none"},null===(c=r.customStyles)||void 0===c?void 0:c.pill),citationContent:t({width:"100%",background:"transparent",minHeight:"10px",height:"fit-content"},null===(l=r.customStyles)||void 0===l?void 0:l.content)}})};export{r as default};
1
+ import{jsx as t,Fragment as n}from"react/jsx-runtime";import i from"../../../../CitationRenderer/CitationRenderer.js";import o from"../../ai-reasoning/BigEnoughComponent.js";const e=e=>{var r,c,a;const s=(null===(r=e.customIcons)||void 0===r?void 0:r.bigEnoughCitationIcon)||t(n,{});return t(i,{inLineCitation:!0,citationTitle:e.title,citationId:`big-enough-${e.citation.citation_number}`,citationComponent:t(o,{customStyles:e.customStyles,big_enough_decision_factors:e.citation}),chevronDownComponent:s,chevronUpComponent:s,styles:{pillButton:Object.assign({margin:"0px",padding:"0px",fontSize:"14px",color:"#526eff",cursor:"pointer",verticalAlign:"middle",whiteSpace:"nowrap",display:"inline-flex",alignItems:"center",background:"white",border:"none"},null===(c=e.customStyles)||void 0===c?void 0:c.pill),citationContent:Object.assign({width:"100%",background:"transparent",minHeight:"10px",height:"fit-content"},null===(a=e.customStyles)||void 0===a?void 0:a.content)}})};export{e as default};
2
2
  //# sourceMappingURL=BigEnoughCitationRenderer.js.map
@@ -1,2 +1,2 @@
1
- import{__rest as t,__assign as n}from"tslib";import{jsx as i,jsxs as e,Fragment as o}from"react/jsx-runtime";import{ChatCitation as r,CitationRenderer as l}from"@e-llm-studio/citation";import c from"dayjs";import{stripHtmlAndMetadata as a}from"../../../utils/helpers.js";import u,{memo as s,useState as d,useRef as m,useCallback as p,useMemo as f,useEffect as h}from"react";var v=function(t){var n,i;return null!==(i=null!==(n=t.message)&&void 0!==n?n:t.content)&&void 0!==i?i:""},y=function(t){var n;return null!==(n=t.highlighted_text)&&void 0!==n?n:""},C=function(t,n){if(t.length!==n.length)return!1;for(var i=0;i<t.length;i+=1){var e=t[i],o=n[i];if(e.role!==o.role)return!1;if(v(e)!==v(o))return!1;if(y(e)!==y(o))return!1;if((e.timeStamp?String(e.timeStamp):"")!==(o.timeStamp?String(o.timeStamp):""))return!1}return!0},g=function(t){var n;return null==t?"":"string"==typeof t||"number"==typeof t?String(t):Array.isArray(t)?t.map(g).join(""):u.isValidElement(t)?g(null===(n=t.props)||void 0===n?void 0:n.children):""},b=s(function(u){var s,g,b=d(0),S=b[0],w=b[1],k=m(null),x=p(function(){var t;null===(t=u.onCitationClick)||void 0===t||t.call(u,u.isTable)},[u.onCitationClick,u.isTable]),I=u.chatCitationProps,A=null!=I?I:{},T=A.chatContainer,H=A.rootContainer,D=t(A,["chatContainer","rootContainer"]),E=m(null),F=m([]);E.current&&C(E.current,u.chatHistory)||(E.current=u.chatHistory,F.current=u.chatHistory.map(function(t){var i=v(t),e=y(t);return n(n({},t),{message:a(i),timeStamp:c(t.timeStamp),highlighted_text:a(e)})}));var j=F.current,z=f(function(){return n({relevanceScore:100},H)},[H]),P=f(function(){return n(n({summarizedTab:{chip:{show:!1,isActive:!1}},detailedTab:{chip:{isActive:!0}}},T),{chatData:j})},[T,j]),O=f(function(){var t,i;return{pillButton:n({fontSize:"14px",margin:"0px",background:"#ffffff",color:"#526eff",cursor:"pointer",verticalAlign:"middle",whiteSpace:"nowrap",display:"inline-flex",alignItems:"center",border:"none"},null===(t=u.customStyles)||void 0===t?void 0:t.pill),citationContent:n({width:"100%",background:"transparent",minHeight:"10px",height:"fit-content",color:"black"},null===(i=u.customStyles)||void 0===i?void 0:i.content)}},[u.customStyles]),q=f(function(){return i(r,n({rootContainer:z,chatContainer:P},D))},[z,P]);h(function(){if(S){var t=window.innerWidth-document.documentElement.clientWidth;document.body.style.overflow="hidden",document.body.style.paddingRight="".concat(t,"px");var n=window.requestAnimationFrame(function(){var t=k.current,n=null==t?void 0:t.querySelector(".lucide-maximize-2, svg[class*='maximize']"),i=null==n?void 0:n.parentElement;null==i||i.click()});return function(){window.cancelAnimationFrame(n),document.body.style.overflow="auto",document.body.style.paddingRight="0px"}}},[S]);var B=p(function(t){t.preventDefault(),t.stopPropagation(),x(),w(function(t){return t+1})},[x]);return!0===u.openInFullscreenOnClick?e(o,{children:[i("span",n({onClick:B,style:O.pillButton,role:"button",tabIndex:0,onKeyDown:function(t){"Enter"!==t.key&&" "!==t.key||B(t)}},{children:u.title})),S>0&&i("div",n({ref:k,"aria-hidden":"true",style:{position:"fixed",left:-1e4,top:-1e4,width:1,height:1,opacity:0,pointerEvents:"none",overflow:"hidden"}},{children:q}),S)]}):i("span",n({onClickCapture:x},{children:i(l,{inLineCitation:!0,citationTitle:u.title,chevronUpComponent:null===(s=u.customIcon)||void 0===s?void 0:s.chevronUp,chevronDownComponent:null===(g=u.customIcon)||void 0===g?void 0:g.chevronDown,citationComponent:q,styles:O})}))},function(t,n){return t.isTable===n.isTable&&(t.onCitationClick===n.onCitationClick&&(t.customIcon===n.customIcon&&(t.customStyles===n.customStyles&&(t.chatCitationProps===n.chatCitationProps&&(t.openInFullscreenOnClick===n.openInFullscreenOnClick&&(!!C(t.chatHistory,n.chatHistory)&&g(t.title)===g(n.title)))))))});export{b as default};
1
+ import{__rest as t}from"tslib";import{jsx as n,jsxs as e,Fragment as i}from"react/jsx-runtime";import{ChatCitation as o,CitationRenderer as r}from"@e-llm-studio/citation";import l from"dayjs";import{stripHtmlAndMetadata as c}from"../../../utils/helpers.js";import a,{memo as s,useState as u,useRef as d,useCallback as m,useMemo as p,useEffect as h}from"react";const g=t=>{var n,e;return null!==(e=null!==(n=t.message)&&void 0!==n?n:t.content)&&void 0!==e?e:""},v=t=>{var n;return null!==(n=t.highlighted_text)&&void 0!==n?n:""},f=(t,n)=>{if(t.length!==n.length)return!1;for(let e=0;e<t.length;e+=1){const i=t[e],o=n[e];if(i.role!==o.role)return!1;if(g(i)!==g(o))return!1;if(v(i)!==v(o))return!1;if((i.timeStamp?String(i.timeStamp):"")!==(o.timeStamp?String(o.timeStamp):""))return!1}return!0},y=t=>{var n;return null==t?"":"string"==typeof t||"number"==typeof t?String(t):Array.isArray(t)?t.map(y).join(""):a.isValidElement(t)?y(null===(n=t.props)||void 0===n?void 0:n.children):""};var b=s(a=>{var s,y;const[b,C]=u(0),S=d(null),w=m(()=>{var t;null===(t=a.onCitationClick)||void 0===t||t.call(a,a.isTable)},[a.onCitationClick,a.isTable]),j=a.chatCitationProps,k=null!=j?j:{},{chatContainer:x,rootContainer:O}=k,I=t(k,["chatContainer","rootContainer"]),A=d(null),T=d([]);A.current&&f(A.current,a.chatHistory)||(A.current=a.chatHistory,T.current=a.chatHistory.map(t=>{const n=g(t),e=v(t);return Object.assign(Object.assign({},t),{message:c(n),timeStamp:l(t.timeStamp),highlighted_text:c(e)})}));const H=T.current,D=p(()=>Object.assign({relevanceScore:100},O),[O]),E=p(()=>Object.assign(Object.assign({summarizedTab:{chip:{show:!1,isActive:!1}},detailedTab:{chip:{isActive:!0}}},x),{chatData:H}),[x,H]),F=p(()=>{var t,n;return{pillButton:Object.assign({fontSize:"14px",margin:"0px",background:"#ffffff",color:"#526eff",cursor:"pointer",verticalAlign:"middle",whiteSpace:"nowrap",display:"inline-flex",alignItems:"center",border:"none"},null===(t=a.customStyles)||void 0===t?void 0:t.pill),citationContent:Object.assign({width:"100%",background:"transparent",minHeight:"10px",height:"fit-content",color:"black"},null===(n=a.customStyles)||void 0===n?void 0:n.content)}},[a.customStyles]),z=p(()=>n(o,Object.assign({rootContainer:D,chatContainer:E},I)),[D,E]);h(()=>{if(!b)return;const t=window.innerWidth-document.documentElement.clientWidth;document.body.style.overflow="hidden",document.body.style.paddingRight=`${t}px`;const n=window.requestAnimationFrame(()=>{const t=S.current,n=null==t?void 0:t.querySelector(".lucide-maximize-2, svg[class*='maximize']"),e=null==n?void 0:n.parentElement;null==e||e.click()});return()=>{window.cancelAnimationFrame(n),document.body.style.overflow="auto",document.body.style.paddingRight="0px"}},[b]);const P=m(t=>{t.preventDefault(),t.stopPropagation(),w(),C(t=>t+1)},[w]);return!0===a.openInFullscreenOnClick?e(i,{children:[n("span",Object.assign({onClick:P,style:F.pillButton,role:"button",tabIndex:0,onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||P(t)}},{children:a.title})),b>0&&n("div",Object.assign({ref:S,"aria-hidden":"true",style:{position:"fixed",left:-1e4,top:-1e4,width:1,height:1,opacity:0,pointerEvents:"none",overflow:"hidden"}},{children:z}),b)]}):n("span",Object.assign({onClickCapture:w},{children:n(r,{inLineCitation:!0,citationTitle:a.title,chevronUpComponent:null===(s=a.customIcon)||void 0===s?void 0:s.chevronUp,chevronDownComponent:null===(y=a.customIcon)||void 0===y?void 0:y.chevronDown,citationComponent:z,styles:F})}))},(t,n)=>t.isTable===n.isTable&&(t.onCitationClick===n.onCitationClick&&(t.customIcon===n.customIcon&&(t.customStyles===n.customStyles&&(t.chatCitationProps===n.chatCitationProps&&(t.openInFullscreenOnClick===n.openInFullscreenOnClick&&(!!f(t.chatHistory,n.chatHistory)&&y(t.title)===y(n.title))))))));export{b as default};
2
2
  //# sourceMappingURL=ChatCitationRenderer.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as C}from"tslib";import{jsx as l,jsxs as t}from"react/jsx-runtime";var i=function(i){return l("div",C({className:"mb-2"},{children:t("svg",C({},i,{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[l("path",{d:"M20 19C20 19.7957 19.6839 20.5587 19.1213 21.1213C18.5587 21.6839 17.7956 22 17 22H7C6.20435 22 5.44129 21.6839 4.87868 21.1213C4.31607 20.5587 4 19.7957 4 19V5C4 4.20435 4.31607 3.44129 4.87868 2.87868C5.44129 2.31607 6.20435 2 7 2V4C6.73478 4 6.48043 4.10536 6.29289 4.29289C6.10536 4.48043 6 4.73478 6 5V19C6 19.2652 6.10536 19.5196 6.29289 19.7071C6.48043 19.8946 6.73478 20 7 20H17C17.2652 20 17.5196 19.8946 17.7071 19.7071C17.8946 19.5196 18 19.2652 18 19H20Z",fill:"#5C75F4"}),l("path",{d:"M7 2V4L14.4726 4V2L7 2Z",fill:"#5C75F4"}),l("path",{d:"M18 19H20V13H18V19Z",fill:"#5C75F4"}),l("path",{d:"M15.2209 5.47302C14.2942 5.47302 13.543 6.22424 13.543 7.15091C13.5446 8.05479 14.262 8.79491 15.1653 8.82483L14.1023 11.066H15.2209L16.7369 7.87C16.8441 7.6439 16.8928 7.39945 16.8988 7.15091C16.8988 6.22424 16.1476 5.47302 15.2209 5.47302ZM19.6953 5.47302C18.7686 5.47302 18.0174 6.22424 18.0174 7.15091C18.019 8.05479 18.7363 8.79491 19.6397 8.82483L18.5767 11.066H19.6953L21.2112 7.87C21.3185 7.6439 21.3672 7.39945 21.3731 7.15091C21.3731 6.22424 20.6219 5.47302 19.6953 5.47302Z",fill:"#5C75F4"}),l("path",{d:"M8.7984 15.5988H14.8447C15.0103 15.5988 15.1692 15.6646 15.2863 15.7817C15.4034 15.8988 15.4692 16.0577 15.4692 16.2233C15.4692 16.389 15.4034 16.5478 15.2863 16.665C15.1692 16.7821 15.0103 16.8479 14.8447 16.8479H8.7984C8.63275 16.8479 8.47389 16.7821 8.35676 16.665C8.23963 16.5478 8.17383 16.389 8.17383 16.2233C8.17383 16.0577 8.23963 15.8988 8.35676 15.7817C8.47389 15.6646 8.63275 15.5988 8.7984 15.5988ZM8.7984 13.1005H14.8447C15.0103 13.1005 15.1692 13.1663 15.2863 13.2834C15.4034 13.4005 15.4692 13.5594 15.4692 13.725C15.4692 13.8907 15.4034 14.0496 15.2863 14.1667C15.1692 14.2838 15.0103 14.3496 14.8447 14.3496H8.7984C8.63275 14.3496 8.47389 14.2838 8.35676 14.1667C8.23963 14.0496 8.17383 13.8907 8.17383 13.725C8.17383 13.5594 8.23963 13.4005 8.35676 13.2834C8.47389 13.1663 8.63275 13.1005 8.7984 13.1005ZM8.7984 10.3672L11.962 10.3672C12.1276 10.3672 12.2865 10.433 12.4036 10.5501C12.5208 10.6673 12.5866 10.8261 12.5866 10.9918C12.5866 11.1574 12.5208 11.3163 12.4036 11.4334C12.2865 11.5505 12.1276 11.6163 11.962 11.6163H8.7984C8.63275 11.6163 8.47389 11.5505 8.35676 11.4334C8.23963 11.3163 8.17383 11.1574 8.17383 10.9918C8.17383 10.8261 8.23963 10.6673 8.35676 10.5501C8.47389 10.433 8.63275 10.3672 8.7984 10.3672Z",fill:"#5C75F4"})]}))}))};export{i as default};
1
+ import{jsx as C,jsxs as l}from"react/jsx-runtime";const t=t=>C("div",Object.assign({className:"mb-2"},{children:l("svg",Object.assign({},t,{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[C("path",{d:"M20 19C20 19.7957 19.6839 20.5587 19.1213 21.1213C18.5587 21.6839 17.7956 22 17 22H7C6.20435 22 5.44129 21.6839 4.87868 21.1213C4.31607 20.5587 4 19.7957 4 19V5C4 4.20435 4.31607 3.44129 4.87868 2.87868C5.44129 2.31607 6.20435 2 7 2V4C6.73478 4 6.48043 4.10536 6.29289 4.29289C6.10536 4.48043 6 4.73478 6 5V19C6 19.2652 6.10536 19.5196 6.29289 19.7071C6.48043 19.8946 6.73478 20 7 20H17C17.2652 20 17.5196 19.8946 17.7071 19.7071C17.8946 19.5196 18 19.2652 18 19H20Z",fill:"#5C75F4"}),C("path",{d:"M7 2V4L14.4726 4V2L7 2Z",fill:"#5C75F4"}),C("path",{d:"M18 19H20V13H18V19Z",fill:"#5C75F4"}),C("path",{d:"M15.2209 5.47302C14.2942 5.47302 13.543 6.22424 13.543 7.15091C13.5446 8.05479 14.262 8.79491 15.1653 8.82483L14.1023 11.066H15.2209L16.7369 7.87C16.8441 7.6439 16.8928 7.39945 16.8988 7.15091C16.8988 6.22424 16.1476 5.47302 15.2209 5.47302ZM19.6953 5.47302C18.7686 5.47302 18.0174 6.22424 18.0174 7.15091C18.019 8.05479 18.7363 8.79491 19.6397 8.82483L18.5767 11.066H19.6953L21.2112 7.87C21.3185 7.6439 21.3672 7.39945 21.3731 7.15091C21.3731 6.22424 20.6219 5.47302 19.6953 5.47302Z",fill:"#5C75F4"}),C("path",{d:"M8.7984 15.5988H14.8447C15.0103 15.5988 15.1692 15.6646 15.2863 15.7817C15.4034 15.8988 15.4692 16.0577 15.4692 16.2233C15.4692 16.389 15.4034 16.5478 15.2863 16.665C15.1692 16.7821 15.0103 16.8479 14.8447 16.8479H8.7984C8.63275 16.8479 8.47389 16.7821 8.35676 16.665C8.23963 16.5478 8.17383 16.389 8.17383 16.2233C8.17383 16.0577 8.23963 15.8988 8.35676 15.7817C8.47389 15.6646 8.63275 15.5988 8.7984 15.5988ZM8.7984 13.1005H14.8447C15.0103 13.1005 15.1692 13.1663 15.2863 13.2834C15.4034 13.4005 15.4692 13.5594 15.4692 13.725C15.4692 13.8907 15.4034 14.0496 15.2863 14.1667C15.1692 14.2838 15.0103 14.3496 14.8447 14.3496H8.7984C8.63275 14.3496 8.47389 14.2838 8.35676 14.1667C8.23963 14.0496 8.17383 13.8907 8.17383 13.725C8.17383 13.5594 8.23963 13.4005 8.35676 13.2834C8.47389 13.1663 8.63275 13.1005 8.7984 13.1005ZM8.7984 10.3672L11.962 10.3672C12.1276 10.3672 12.2865 10.433 12.4036 10.5501C12.5208 10.6673 12.5866 10.8261 12.5866 10.9918C12.5866 11.1574 12.5208 11.3163 12.4036 11.4334C12.2865 11.5505 12.1276 11.6163 11.962 11.6163H8.7984C8.63275 11.6163 8.47389 11.5505 8.35676 11.4334C8.23963 11.3163 8.17383 11.1574 8.17383 10.9918C8.17383 10.8261 8.23963 10.6673 8.35676 10.5501C8.47389 10.433 8.63275 10.3672 8.7984 10.3672Z",fill:"#5C75F4"})]}))}));export{t as default};
2
2
  //# sourceMappingURL=DocumentCitationIcon.js.map