@e-llm-studio/requirement-ai 0.0.251 → 0.0.253
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.
- package/dist/cjs/features/CitationRenderer/CitationRenderer.js +1 -1
- package/dist/cjs/features/RequirementAI/components/CustomPopover/CustomPopover.js +1 -1
- package/dist/cjs/features/RequirementAI/components/GapRiskSidebar/GapRiskSidebar.js +1 -1
- package/dist/cjs/features/RequirementAI/components/GapRiskSidebar/components/GapItem/GapItem.js +1 -1
- package/dist/cjs/features/RequirementAI/components/GapRiskSidebar/components/RiskCategorySection/RiskCategorySection.js +1 -1
- package/dist/cjs/features/RequirementAI/components/GapRiskSidebar/components/RiskSidebarCategorySection/RiskSidebarCategorySection.js +1 -1
- package/dist/cjs/features/RequirementAI/components/GapRiskSidebar/components/StoryNode/StoryNode.js +1 -1
- package/dist/cjs/features/RequirementAI/components/GapRiskSidebar/utils/buildStoryWithGap.js +1 -1
- package/dist/cjs/features/RequirementAI/components/GapRiskSidebar/utils/buildStoryWithRisk.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RecommendationBlock/RecommendationBlock.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/Editor.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/Context/ContextMenu.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/EditorContainer/EditorContainer.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/EditorPlaceholder/EditorPlaceholder.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/EditorToolbar.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/components/ToolbarButton/ToolbarButton.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/Icons/Icon.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/DeleteNode.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/HighlightNode.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/InitialHtml.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/InsertNode.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/theme/theme.css.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/RichTextEditor.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/AttachedContext.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/ClinicalTrialSection.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationAnchor.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/ResizableSplitPane.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/IterateComponent.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/PopupDefaults.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/ToneToggle.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/TitleEditor/TitleEditor.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/UserStoryCard.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/icons/PdfViewerIcons.js +1 -1
- package/dist/cjs/features/RequirementAI/components/ai-reasoning/AIReasonAccordion.js +1 -1
- package/dist/cjs/features/RequirementAI/components/ai-reasoning/AiReasonMarkdownWrapper.js +1 -1
- package/dist/cjs/features/RequirementAI/components/ai-reasoning/AiReasoningCitation.js +1 -1
- package/dist/cjs/features/RequirementAI/components/ai-reasoning/AiReasoningCitationContent.js +1 -1
- package/dist/cjs/features/RequirementAI/components/ai-reasoning/BigEnoughComponent.js +1 -1
- package/dist/cjs/features/RequirementAI/components/ai-reasoning/CitationPdfRendererWrapper.js +1 -1
- package/dist/cjs/features/RequirementAI/components/ai-reasoning/CitationPdfViewer.js +1 -1
- package/dist/cjs/features/RequirementAI/components/ai-reasoning/ScannedCitationRenderer.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/appmod-citation/AppmodCitationContent.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/appmod-citation/AppmodCitationRenderer.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/appmod-citation/components/CodeLinkHandler.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/appmod-citation/icons/AppmodIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/appmod-citation/icons/ChatBubbleIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/appmod-citation/icons/SparkleIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/audio-citation/SearchWaveFromWrapper.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/audio-citation/WaveformCitationRenderer.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/audio-citation/components/AudioCitationIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/audio-citation/components/AudioTimeLineSlider.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/audio-citation/components/SegmentByWordsViral.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/audio-citation/components/videoPlayer.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/AudioLinesIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/MaximizeIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/MinimizeIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/PauseIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/PlayIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/PlaybackSpeedIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/VideoIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/audio-citation/searchwaveform.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/audio-citation/store/autoplay.wavefrom.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/big-enough/BigEnoughCitationRenderer.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/chat-citation/ChatCitationRenderer.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/file-citation/DocumentCitationIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/file-citation/FileCitationContent.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/file-citation/FileCitationRender.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/gpt-web-citation/GptWebCitationRenderer.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/gpt-web-citation/GptWebcitationPanel.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/image-citation/ImageCitationContent.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/image-citation/ImageCitationIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/image-citation/ImageCitationRenderer.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/rca-citation/RCACitationContent.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/rca-citation/RCACitationRenderer.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/readfile-citation/CustomFileIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/readfile-citation/ReadFileCitationContent.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/readfile-citation/ReadFileCitationRenderer.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/readfile-citation/icons/ExternalLinkIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/readfile-citation/icons/FileCodeIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/stormee-citation/StormeeCitationRenderer.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/stormee-citation/StormeeContent.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/stormee-citation/components/GradientButton.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/stormee-citation/components/ProblemStatementCard.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/web-citation/FullScreenIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/web-citation/ImagePreviewDialog.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/web-citation/WebCitation.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/web-citation/WebCitationIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/web-citation/WebCitationRenderer.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/web-citation/WebCitationWithImageContent.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/web-citation/WebCitationWithImageRenderer.js +1 -1
- package/dist/cjs/features/RequirementAI/components/cra/PartialRequirementContent.js +1 -1
- package/dist/cjs/features/RequirementAI/components/lsc-reason-gap/CustomChatCrRedirection.js +1 -1
- package/dist/cjs/features/RequirementAI/components/lsc-reason-gap/GapFilterBlock.js +1 -1
- package/dist/cjs/features/RequirementAI/components/lsc-reason-gap/GapFilterContentWrapper.js +1 -1
- package/dist/cjs/features/RequirementAI/components/lsc-reason-gap/GapFilterItem.js +1 -1
- package/dist/cjs/features/RequirementAI/components/lsc-reason-gap/gapFilterSvgs.js +1 -1
- package/dist/cjs/features/RequirementAI/components/segment/DeleteSegmentsDialog.js +1 -1
- package/dist/cjs/features/RequirementAI/components/segment/EditSegmentDialog.js +1 -1
- package/dist/cjs/features/RequirementAI/components/segment/ExampleComponentWrapper.js +1 -1
- package/dist/cjs/features/RequirementAI/components/segment/Segment.js +1 -1
- package/dist/cjs/features/RequirementAI/components/segment/SegmentLoader.js +1 -1
- package/dist/cjs/features/RequirementAI/components/segment/SegmentWrapper.js +1 -1
- package/dist/cjs/features/RequirementAI/components/story-screen/BigEnoughPanel.js +1 -1
- package/dist/cjs/features/RequirementAI/components/story-screen/CompletionPanel.js +1 -1
- package/dist/cjs/features/RequirementAI/components/story-screen/ReplaceLearnedTags.js +1 -1
- package/dist/cjs/features/RequirementAI/components/story-screen/StreamingScreenSidebar.js +1 -1
- package/dist/cjs/features/RequirementAI/components/story-screen/SubfeatureBlock.js +1 -1
- package/dist/cjs/features/RequirementAI/components/story-screen/UserStoryScreen.js +1 -1
- package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.js +1 -1
- package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ApprovalBadge/ApprovalBadge.js +1 -1
- package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ApprovalSidebar/ApprovalSidebar.js +1 -1
- package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ApprovalSidebarItem/ApprovalSidebarItem.js +1 -1
- package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ApprovalStatusBadge/ApprovalStatusBadge.js +1 -1
- package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ContentBlock/ContentBlock.js +1 -1
- package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ContentSegment/ContentSegment.js +1 -1
- package/dist/cjs/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.js +1 -1
- package/dist/cjs/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.module.css.js +1 -1
- package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/HighlightButtonComponent.js +1 -1
- package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.js +1 -1
- package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.module.css.js +1 -1
- package/dist/cjs/features/RequirementAI/hooks/useApprovalStatus.js +1 -1
- package/dist/cjs/features/RequirementAI/hooks/useStreamContentHandler.js +1 -1
- package/dist/cjs/features/RequirementAI/icons/AiGapIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/icons/AiReasoningIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/icons/BigEnoughIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/icons/BookmarkIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/icons/BrainRed.js +1 -1
- package/dist/cjs/features/RequirementAI/icons/CDIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/icons/CheckIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/icons/ChevronDownIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/icons/ChevronUpIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/icons/CognitiveDecision.js +1 -1
- package/dist/cjs/features/RequirementAI/icons/MeetingHighlightsIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/icons/MenuUnfoldIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/icons/PencilIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/icons/ReasoningBulbIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/icons/RelevanceScoreIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/icons/SidebarCloseIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/icons/SidebarOpenIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/icons/TrashIcon.js +1 -1
- package/dist/cjs/features/RequirementAI/shared/Accordian.js +1 -1
- package/dist/cjs/features/RequirementAI/shared/AtomicButton.js +1 -1
- package/dist/cjs/features/RequirementAI/shared/CitationAIConfidenceDisplay.js +1 -1
- package/dist/cjs/features/RequirementAI/shared/CitationLoadingIndicator.js +1 -1
- package/dist/cjs/features/RequirementAI/shared/CodeViewer.js +1 -1
- package/dist/cjs/features/RequirementAI/shared/ExpandableOl.js +1 -1
- package/dist/cjs/features/RequirementAI/shared/GeneratedCodeCitation.js +1 -1
- package/dist/cjs/features/RequirementAI/shared/ReqAiCitationRenderer.js +1 -1
- package/dist/cjs/features/RequirementAI/shared/UpdatedAnimationContent.js +1 -1
- package/dist/cjs/features/RequirementAI/store/markdown-context.js +1 -1
- package/dist/cjs/features/RequirementAI/store/ref.context.js +1 -1
- package/dist/cjs/features/RequirementAI/utils/diff-edit.utils.js +1 -1
- package/dist/cjs/features/RequirementAI/utils/helpers.js +1 -1
- package/dist/cjs/features/RequirementAI/utils/learned-tag.utils.js +1 -1
- package/dist/cjs/features/RequirementAI/utils/userstory-approval.utils.js +1 -1
- package/dist/cjs/features/RequirementAiCitations/AiReasoning/components/AIConfidenceDisplay.js +1 -1
- package/dist/cjs/features/RequirementAiCitations/AiReasoning/components/icons/DocumentCitationIcon.js +1 -1
- package/dist/cjs/features/RequirementAiCitations/AiReasoning/components/icons/RelevanceScoreIcon.js +1 -1
- package/dist/cjs/features/UserStoryImport/UserStoryPicker.js +1 -1
- package/dist/cjs/features/UserStoryImport/UserStoryPicker.theme.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/BackNav.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/Badge.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/BrowseProjectsButton.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/CardGrid.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/CardProceedButton.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/ContentArea.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/Footer.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/Header.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/NavRow.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/ProceedButton.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/ProjectCard.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/ResizeHandle.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/ScopeDropdown.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/SearchInput.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/SectionHeading.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/ShowMore.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/Sidebar.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/SidebarFavoritesList.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/SidebarProjectList.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/SidebarSection.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/SortDropdown.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/SplitLayout.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/Toolbar.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/TypeDropdown.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/UserStoryCard.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/UserStoryImportDialog.js +1 -1
- package/dist/cjs/features/UserStoryImport/components/UserStoryScopeDropdown.js +1 -1
- package/dist/cjs/features/UserStoryImport/hooks/useUSPData.js +1 -1
- package/dist/cjs/features/UserStoryImport/hooks/useUserStoryPickerState.js +1 -1
- package/dist/cjs/features/UserStoryImport/lib/CustomTooltip.js +1 -1
- package/dist/cjs/features/UserStoryImport/lib/Tooltip.js +1 -1
- package/dist/cjs/features/UserStoryImport/lib/dialog.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/features/CitationRenderer/CitationRenderer.js +1 -1
- package/dist/features/RequirementAI/components/CustomPopover/CustomPopover.js +1 -1
- package/dist/features/RequirementAI/components/GapRiskSidebar/GapRiskSidebar.js +1 -1
- package/dist/features/RequirementAI/components/GapRiskSidebar/components/GapItem/GapItem.js +1 -1
- package/dist/features/RequirementAI/components/GapRiskSidebar/components/RiskCategorySection/RiskCategorySection.js +1 -1
- package/dist/features/RequirementAI/components/GapRiskSidebar/components/RiskSidebarCategorySection/RiskSidebarCategorySection.js +1 -1
- package/dist/features/RequirementAI/components/GapRiskSidebar/components/StoryNode/StoryNode.js +1 -1
- package/dist/features/RequirementAI/components/GapRiskSidebar/utils/buildStoryWithGap.js +1 -1
- package/dist/features/RequirementAI/components/GapRiskSidebar/utils/buildStoryWithRisk.js +1 -1
- package/dist/features/RequirementAI/components/RecommendationBlock/RecommendationBlock.js +1 -1
- package/dist/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/Editor.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/Context/ContextMenu.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/EditorContainer/EditorContainer.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/EditorPlaceholder/EditorPlaceholder.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/EditorToolbar.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/components/ToolbarButton/ToolbarButton.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/Icons/Icon.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/DeleteNode.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/HighlightNode.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/InitialHtml.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/InsertNode.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/theme/theme.css.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/RichTextEditor.js +1 -1
- package/dist/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/AttachedContext.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/ClinicalTrialSection.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationAnchor.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/ResizableSplitPane.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/Popups/IterateComponent.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/Popups/PopupDefaults.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/Popups/ToneToggle.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/TitleEditor/TitleEditor.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/UserStoryCard.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/icons/PdfViewerIcons.js +1 -1
- package/dist/features/RequirementAI/components/ai-reasoning/AIReasonAccordion.js +1 -1
- package/dist/features/RequirementAI/components/ai-reasoning/AiReasonMarkdownWrapper.js +1 -1
- package/dist/features/RequirementAI/components/ai-reasoning/AiReasoningCitation.js +1 -1
- package/dist/features/RequirementAI/components/ai-reasoning/AiReasoningCitationContent.js +1 -1
- package/dist/features/RequirementAI/components/ai-reasoning/BigEnoughComponent.js +1 -1
- package/dist/features/RequirementAI/components/ai-reasoning/CitationPdfRendererWrapper.js +1 -1
- package/dist/features/RequirementAI/components/ai-reasoning/CitationPdfViewer.js +1 -1
- package/dist/features/RequirementAI/components/ai-reasoning/ScannedCitationRenderer.js +1 -1
- package/dist/features/RequirementAI/components/citations/appmod-citation/AppmodCitationContent.js +1 -1
- package/dist/features/RequirementAI/components/citations/appmod-citation/AppmodCitationRenderer.js +1 -1
- package/dist/features/RequirementAI/components/citations/appmod-citation/components/CodeLinkHandler.js +1 -1
- package/dist/features/RequirementAI/components/citations/appmod-citation/icons/AppmodIcon.js +1 -1
- package/dist/features/RequirementAI/components/citations/appmod-citation/icons/ChatBubbleIcon.js +1 -1
- package/dist/features/RequirementAI/components/citations/appmod-citation/icons/SparkleIcon.js +1 -1
- package/dist/features/RequirementAI/components/citations/audio-citation/SearchWaveFromWrapper.js +1 -1
- package/dist/features/RequirementAI/components/citations/audio-citation/WaveformCitationRenderer.js +1 -1
- package/dist/features/RequirementAI/components/citations/audio-citation/components/AudioCitationIcon.js +1 -1
- package/dist/features/RequirementAI/components/citations/audio-citation/components/AudioTimeLineSlider.js +1 -1
- package/dist/features/RequirementAI/components/citations/audio-citation/components/SegmentByWordsViral.js +1 -1
- package/dist/features/RequirementAI/components/citations/audio-citation/components/videoPlayer.js +1 -1
- package/dist/features/RequirementAI/components/citations/audio-citation/icons/AudioLinesIcon.js +1 -1
- package/dist/features/RequirementAI/components/citations/audio-citation/icons/MaximizeIcon.js +1 -1
- package/dist/features/RequirementAI/components/citations/audio-citation/icons/MinimizeIcon.js +1 -1
- package/dist/features/RequirementAI/components/citations/audio-citation/icons/PauseIcon.js +1 -1
- package/dist/features/RequirementAI/components/citations/audio-citation/icons/PlayIcon.js +1 -1
- package/dist/features/RequirementAI/components/citations/audio-citation/icons/PlaybackSpeedIcon.js +1 -1
- package/dist/features/RequirementAI/components/citations/audio-citation/icons/VideoIcon.js +1 -1
- package/dist/features/RequirementAI/components/citations/audio-citation/searchwaveform.js +1 -1
- package/dist/features/RequirementAI/components/citations/audio-citation/store/autoplay.wavefrom.js +1 -1
- package/dist/features/RequirementAI/components/citations/big-enough/BigEnoughCitationRenderer.js +1 -1
- package/dist/features/RequirementAI/components/citations/chat-citation/ChatCitationRenderer.js +1 -1
- package/dist/features/RequirementAI/components/citations/file-citation/DocumentCitationIcon.js +1 -1
- package/dist/features/RequirementAI/components/citations/file-citation/FileCitationContent.js +1 -1
- package/dist/features/RequirementAI/components/citations/file-citation/FileCitationRender.js +1 -1
- package/dist/features/RequirementAI/components/citations/gpt-web-citation/GptWebCitationRenderer.js +1 -1
- package/dist/features/RequirementAI/components/citations/gpt-web-citation/GptWebcitationPanel.js +1 -1
- package/dist/features/RequirementAI/components/citations/image-citation/ImageCitationContent.js +1 -1
- package/dist/features/RequirementAI/components/citations/image-citation/ImageCitationIcon.js +1 -1
- package/dist/features/RequirementAI/components/citations/image-citation/ImageCitationRenderer.js +1 -1
- package/dist/features/RequirementAI/components/citations/rca-citation/RCACitationContent.js +1 -1
- package/dist/features/RequirementAI/components/citations/rca-citation/RCACitationRenderer.js +1 -1
- package/dist/features/RequirementAI/components/citations/readfile-citation/CustomFileIcon.js +1 -1
- package/dist/features/RequirementAI/components/citations/readfile-citation/ReadFileCitationContent.js +1 -1
- package/dist/features/RequirementAI/components/citations/readfile-citation/ReadFileCitationRenderer.js +1 -1
- package/dist/features/RequirementAI/components/citations/readfile-citation/icons/ExternalLinkIcon.js +1 -1
- package/dist/features/RequirementAI/components/citations/readfile-citation/icons/FileCodeIcon.js +1 -1
- package/dist/features/RequirementAI/components/citations/stormee-citation/StormeeCitationRenderer.js +1 -1
- package/dist/features/RequirementAI/components/citations/stormee-citation/StormeeContent.js +1 -1
- package/dist/features/RequirementAI/components/citations/stormee-citation/components/GradientButton.js +1 -1
- package/dist/features/RequirementAI/components/citations/stormee-citation/components/ProblemStatementCard.js +1 -1
- package/dist/features/RequirementAI/components/citations/web-citation/FullScreenIcon.js +1 -1
- package/dist/features/RequirementAI/components/citations/web-citation/ImagePreviewDialog.js +1 -1
- package/dist/features/RequirementAI/components/citations/web-citation/WebCitation.js +1 -1
- package/dist/features/RequirementAI/components/citations/web-citation/WebCitationIcon.js +1 -1
- package/dist/features/RequirementAI/components/citations/web-citation/WebCitationRenderer.js +1 -1
- package/dist/features/RequirementAI/components/citations/web-citation/WebCitationWithImageContent.js +1 -1
- package/dist/features/RequirementAI/components/citations/web-citation/WebCitationWithImageRenderer.js +1 -1
- package/dist/features/RequirementAI/components/cra/PartialRequirementContent.js +1 -1
- package/dist/features/RequirementAI/components/lsc-reason-gap/CustomChatCrRedirection.js +1 -1
- package/dist/features/RequirementAI/components/lsc-reason-gap/GapFilterBlock.js +1 -1
- package/dist/features/RequirementAI/components/lsc-reason-gap/GapFilterContentWrapper.js +1 -1
- package/dist/features/RequirementAI/components/lsc-reason-gap/GapFilterItem.js +1 -1
- package/dist/features/RequirementAI/components/lsc-reason-gap/gapFilterSvgs.js +1 -1
- package/dist/features/RequirementAI/components/segment/DeleteSegmentsDialog.js +1 -1
- package/dist/features/RequirementAI/components/segment/EditSegmentDialog.js +1 -1
- package/dist/features/RequirementAI/components/segment/ExampleComponentWrapper.js +1 -1
- package/dist/features/RequirementAI/components/segment/Segment.js +1 -1
- package/dist/features/RequirementAI/components/segment/SegmentLoader.js +1 -1
- package/dist/features/RequirementAI/components/segment/SegmentWrapper.js +1 -1
- package/dist/features/RequirementAI/components/story-screen/BigEnoughPanel.js +1 -1
- package/dist/features/RequirementAI/components/story-screen/CompletionPanel.js +1 -1
- package/dist/features/RequirementAI/components/story-screen/ReplaceLearnedTags.js +1 -1
- package/dist/features/RequirementAI/components/story-screen/StreamingScreenSidebar.js +1 -1
- package/dist/features/RequirementAI/components/story-screen/SubfeatureBlock.js +1 -1
- package/dist/features/RequirementAI/components/story-screen/UserStoryScreen.js +1 -1
- package/dist/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.js +1 -1
- package/dist/features/RequirementAI/components/userstory-approval-screen/components/ApprovalBadge/ApprovalBadge.js +1 -1
- package/dist/features/RequirementAI/components/userstory-approval-screen/components/ApprovalSidebar/ApprovalSidebar.js +1 -1
- package/dist/features/RequirementAI/components/userstory-approval-screen/components/ApprovalSidebarItem/ApprovalSidebarItem.js +1 -1
- package/dist/features/RequirementAI/components/userstory-approval-screen/components/ApprovalStatusBadge/ApprovalStatusBadge.js +1 -1
- package/dist/features/RequirementAI/components/userstory-approval-screen/components/ContentBlock/ContentBlock.js +1 -1
- package/dist/features/RequirementAI/components/userstory-approval-screen/components/ContentSegment/ContentSegment.js +1 -1
- package/dist/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.js +1 -1
- package/dist/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.module.css.js +1 -1
- package/dist/features/RequirementAI/components/userstory-with-citation/components/HighlightButtonComponent.js +1 -1
- package/dist/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.js +1 -1
- package/dist/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.module.css.js +1 -1
- package/dist/features/RequirementAI/hooks/useApprovalStatus.js +1 -1
- package/dist/features/RequirementAI/hooks/useStreamContentHandler.js +1 -1
- package/dist/features/RequirementAI/icons/AiGapIcon.js +1 -1
- package/dist/features/RequirementAI/icons/AiReasoningIcon.js +1 -1
- package/dist/features/RequirementAI/icons/BigEnoughIcon.js +1 -1
- package/dist/features/RequirementAI/icons/BookmarkIcon.js +1 -1
- package/dist/features/RequirementAI/icons/BrainRed.js +1 -1
- package/dist/features/RequirementAI/icons/CDIcon.js +1 -1
- package/dist/features/RequirementAI/icons/CheckIcon.js +1 -1
- package/dist/features/RequirementAI/icons/ChevronDownIcon.js +1 -1
- package/dist/features/RequirementAI/icons/ChevronUpIcon.js +1 -1
- package/dist/features/RequirementAI/icons/CognitiveDecision.js +1 -1
- package/dist/features/RequirementAI/icons/MeetingHighlightsIcon.js +1 -1
- package/dist/features/RequirementAI/icons/MenuUnfoldIcon.js +1 -1
- package/dist/features/RequirementAI/icons/PencilIcon.js +1 -1
- package/dist/features/RequirementAI/icons/ReasoningBulbIcon.js +1 -1
- package/dist/features/RequirementAI/icons/RelevanceScoreIcon.js +1 -1
- package/dist/features/RequirementAI/icons/SidebarCloseIcon.js +1 -1
- package/dist/features/RequirementAI/icons/SidebarOpenIcon.js +1 -1
- package/dist/features/RequirementAI/icons/TrashIcon.js +1 -1
- package/dist/features/RequirementAI/shared/Accordian.js +1 -1
- package/dist/features/RequirementAI/shared/AtomicButton.js +1 -1
- package/dist/features/RequirementAI/shared/CitationAIConfidenceDisplay.js +1 -1
- package/dist/features/RequirementAI/shared/CitationLoadingIndicator.js +1 -1
- package/dist/features/RequirementAI/shared/CodeViewer.js +1 -1
- package/dist/features/RequirementAI/shared/ExpandableOl.js +1 -1
- package/dist/features/RequirementAI/shared/GeneratedCodeCitation.js +1 -1
- package/dist/features/RequirementAI/shared/ReqAiCitationRenderer.js +1 -1
- package/dist/features/RequirementAI/shared/UpdatedAnimationContent.js +1 -1
- package/dist/features/RequirementAI/store/markdown-context.js +1 -1
- package/dist/features/RequirementAI/store/ref.context.js +1 -1
- package/dist/features/RequirementAI/utils/diff-edit.utils.js +1 -1
- package/dist/features/RequirementAI/utils/helpers.js +1 -1
- package/dist/features/RequirementAI/utils/learned-tag.utils.js +1 -1
- package/dist/features/RequirementAI/utils/userstory-approval.utils.js +1 -1
- package/dist/features/RequirementAiCitations/AiReasoning/components/AIConfidenceDisplay.js +1 -1
- package/dist/features/RequirementAiCitations/AiReasoning/components/icons/DocumentCitationIcon.js +1 -1
- package/dist/features/RequirementAiCitations/AiReasoning/components/icons/RelevanceScoreIcon.js +1 -1
- package/dist/features/UserStoryImport/UserStoryPicker.js +1 -1
- package/dist/features/UserStoryImport/UserStoryPicker.theme.js +1 -1
- package/dist/features/UserStoryImport/components/BackNav.js +1 -1
- package/dist/features/UserStoryImport/components/Badge.js +1 -1
- package/dist/features/UserStoryImport/components/BrowseProjectsButton.js +1 -1
- package/dist/features/UserStoryImport/components/CardGrid.js +1 -1
- package/dist/features/UserStoryImport/components/CardProceedButton.js +1 -1
- package/dist/features/UserStoryImport/components/ContentArea.js +1 -1
- package/dist/features/UserStoryImport/components/Footer.js +1 -1
- package/dist/features/UserStoryImport/components/Header.js +1 -1
- package/dist/features/UserStoryImport/components/NavRow.js +1 -1
- package/dist/features/UserStoryImport/components/ProceedButton.js +1 -1
- package/dist/features/UserStoryImport/components/ProjectCard.js +1 -1
- package/dist/features/UserStoryImport/components/ResizeHandle.js +1 -1
- package/dist/features/UserStoryImport/components/ScopeDropdown.js +1 -1
- package/dist/features/UserStoryImport/components/SearchInput.js +1 -1
- package/dist/features/UserStoryImport/components/SectionHeading.js +1 -1
- package/dist/features/UserStoryImport/components/ShowMore.js +1 -1
- package/dist/features/UserStoryImport/components/Sidebar.js +1 -1
- package/dist/features/UserStoryImport/components/SidebarFavoritesList.js +1 -1
- package/dist/features/UserStoryImport/components/SidebarProjectList.js +1 -1
- package/dist/features/UserStoryImport/components/SidebarSection.js +1 -1
- package/dist/features/UserStoryImport/components/SortDropdown.js +1 -1
- package/dist/features/UserStoryImport/components/SplitLayout.js +1 -1
- package/dist/features/UserStoryImport/components/Toolbar.js +1 -1
- package/dist/features/UserStoryImport/components/TypeDropdown.js +1 -1
- package/dist/features/UserStoryImport/components/UserStoryCard.js +1 -1
- package/dist/features/UserStoryImport/components/UserStoryImportDialog.js +1 -1
- package/dist/features/UserStoryImport/components/UserStoryScopeDropdown.js +1 -1
- package/dist/features/UserStoryImport/hooks/useUSPData.js +1 -1
- package/dist/features/UserStoryImport/hooks/useUserStoryPickerState.js +1 -1
- package/dist/features/UserStoryImport/lib/CustomTooltip.js +1 -1
- package/dist/features/UserStoryImport/lib/Tooltip.js +1 -1
- package/dist/features/UserStoryImport/lib/dialog.js +1 -1
- package/dist/index.js +1 -1
- package/dist/types/src/App.d.ts.map +1 -1
- package/dist/types/src/RequirementAiTest.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.d.ts +50 -1
- package/dist/types/src/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/Editor.d.ts +2 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/Editor.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/DeleteNode.d.ts +1 -4
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/DeleteNode.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/InitialHtml.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/InsertNode.d.ts +4 -3
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/InsertNode.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/RichTextEditor.d.ts +1 -0
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/RichTextEditor.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationAnchor.d.ts +8 -0
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationAnchor.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.d.ts +9 -4
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.d.ts +45 -11
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/IterateComponent.d.ts +17 -13
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/IterateComponent.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.d.ts +29 -5
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/UserStoryCard.d.ts +17 -2
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/UserStoryCard.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/citations/readfile-citation/ReadFileCitationContent.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/lsc-reason-gap/CustomChatCrRedirection.d.ts +3 -2
- package/dist/types/src/features/RequirementAI/components/lsc-reason-gap/CustomChatCrRedirection.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/lsc-reason-gap/GapFilterBlock.d.ts +1 -1
- package/dist/types/src/features/RequirementAI/components/lsc-reason-gap/GapFilterBlock.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/segment/Segment.d.ts +4 -0
- package/dist/types/src/features/RequirementAI/components/segment/Segment.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/segment/SegmentWrapper.d.ts +2 -1
- package/dist/types/src/features/RequirementAI/components/segment/SegmentWrapper.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalContext.d.ts +1 -0
- package/dist/types/src/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalContext.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.d.ts +2 -0
- package/dist/types/src/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.d.ts +7 -1
- package/dist/types/src/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.d.ts +4 -1
- package/dist/types/src/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/hooks/useStreamContentHandler.d.ts +1 -1
- package/dist/types/src/features/RequirementAI/hooks/useStreamContentHandler.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/interfaces/userstory.interface.d.ts +2 -0
- package/dist/types/src/features/RequirementAI/interfaces/userstory.interface.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/types/aiReasoning.type.d.ts +24 -13
- package/dist/types/src/features/RequirementAI/types/aiReasoning.type.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/types/segment.type.d.ts +7 -1
- package/dist/types/src/features/RequirementAI/types/segment.type.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/utils/helpers.d.ts +2 -0
- package/dist/types/src/features/RequirementAI/utils/helpers.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +3 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/package.json +24 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__awaiter as e}from"tslib";import{jsxs as t,jsx as n,Fragment as i}from"react/jsx-runtime";import{useState as l,useRef as o,useEffect as s}from"react";import{Info as a,ChevronUp as r,ChevronDown as d,ExternalLink as c,Download as u,Share2 as v,Copy as g,LoaderCircle as p,PencilIcon as m,Plus as y,Trash2 as h,X as b,Ellipsis as f,Hourglass as S,Check as C,ChevronUpIcon as O,ChevronDownIcon as j,Bookmark as I}from"lucide-react";import N from"showdown";import{Tooltip as w,Menu as E,MenuItem as D}from"@mui/material";import x from"../../icons/Illustration.svg.js";import{v4 as B}from"uuid";import T from"./UserStoryCard.module.css.js";import{formatMarkdown as P,indentMarkdown as U}from"../../utils/helpers.js";import{preprocessUserStoryForEdit as k,replaceTitleSection as A,postprocessUserStoryAfterEdit as R}from"../../utils/user-story.utils.js";import L from"../../shared/AtomicButton.js";import M from"../RichTextEditor/RichTextEditor.js";import _ from"../userstory-with-citation/UserStoryWithCitation.js";import{SectionStatus as F,useRequirementAI as z}from"../RequirementAIWrapper/RequirementAIWrapper.js";import{BigEnoughPanel as W}from"../story-screen/BigEnoughPanel.js";import{InlineTitleEditor as G}from"./TitleEditor/TitleEditor.js";import H from"./ClinicalTrialSection.js";import{CompletionPanel as V}from"../story-screen/CompletionPanel.js";import $ from"../../icons/CDIcon.js";const q={[F.WAITING]:"WAITING TO GENERATE",[F.IN_PROGRESS]:"IN PROGRESS",[F.GENERATED]:"GENERATED",[F.FAILED]:"FAILED",[F.GENERATE]:"GENERATE",[F.APPROVED]:"APPROVED"};function Y(e){const t=[],i=/<learned>(.*?)<\/learned>/g;let l,o=0,s=0;for(;null!==(l=i.exec(e));){const[,r]=l,d=l.index;d>o&&t.push(n("span",{children:e.slice(o,d)},"text-pre-"+s++)),t.push(n(w,Object.assign({title:r,placement:"top"},{children:n(a,{size:16,className:"inline-block mx-1 text-blue-500 hover:text-blue-700 cursor"})}),`tooltip-${B()}`)),o=i.lastIndex}return o<(null==e?void 0:e.length)&&t.push(n("span",{children:e.slice(o)},"text-post-"+s++)),t}function Q(e,t,n){var i;if(!e)return{};if(t)return Object.assign({},e.parentConfig);const l=Object.assign({},e.childConfig);return n&&(null===(i=e.subFeatureOverrides)||void 0===i?void 0:i[n])?Object.assign(Object.assign({},l),e.subFeatureOverrides[n]):l}const Z=({displayName:e})=>{var i;const{customStyles:l}=z(),o=null===(i=null==l?void 0:l.userStoryCardStyles)||void 0===i?void 0:i.showDisplayName;return t("div",Object.assign({className:T.displayName,style:null==o?void 0:o.wrapper},{children:[n(I,{className:T.displayNameIcon,style:null==o?void 0:o.displayNameIcon}),t("span",Object.assign({style:null==o?void 0:o.label},{children:[e,":"]}))]}))},J=({isUserStoryCurrentlyUpdated:O,artifactId:j,artifactTitleId:I,parentUserStory:K,currentUserStory:X,onUserStoryChange:ee,parentIndex:te,currentIndex:ne,enableDownload:ie,isDiffEditReviewMode:le,showUserStoryDiff:oe,handleDownloadUserStory:se,handleOpenSendDialog:ae,updateUserStoryArtifact:re,selectedArtifactId:de,isDisplayHighlightControl:ce,elementDisplayConfig:ue,_resolvedConfig:ve,showWrapper:ge=!1,defaultExpanded:pe,actionItemsConfig:me,onDelete:ye,contextVariant:he,expandedSubFeatures:be,showDisplayName:fe=!0,allowTitleEdit:Se=!0,showConfidenceScore:Ce=!0,showBorderTop:Oe=!0,sectionStatusConfig:je,showCompletionPanel:Ie=!1,completionPanelConfig:Ne,showAddSectionButton:we=!1,disableEditPlan:Ee=!1,useMuiTooltip:De=!1,approveButtonConfig:xe,editButtonConfig:Be,CDNeededInChip:Te,blockNumber:Pe,showSuggestedFilesInfo:Ue=!1,suggestedFilesConfig:ke})=>{var Ae,Re,Le,Me,_e,Fe,ze,We,Ge,He,Ve,$e,qe,Ye,Qe,Ze,Je,Ke,Xe,et,tt,nt,it,lt,ot,st,at,rt,dt,ct,ut;const{isLoadingSectionData:vt=!1,onLoadSectionData:gt,status:pt,onStatusClick:mt,completedCount:yt,totalCount:ht,isNoDataAvailable:bt=!1}=null!=je?je:{},{searchQueryList:ft,citations:St,customStyles:Ct,customSectionConfig:Ot}=z(),jt=null==Ct?void 0:Ct.userStoryCardStyles,It=null==jt?void 0:jt.customSectionEditButton,Nt=null==jt?void 0:jt.statusStyles,wt=null===(Ae=null==Ct?void 0:Ct.userStoryCardStyles)||void 0===Ae?void 0:Ae.userStoryEditStyles,Et=null===(Re=null==Ct?void 0:Ct.userStoryScreenStyles)||void 0===Re?void 0:Re.userStoryContentStyles,Dt=null==jt?void 0:jt.progressHeaderStyles,xt=null==jt?void 0:jt.clinicalTrialSectionStyles,Bt=null==jt?void 0:jt.CompletionStyles,Tt=null==jt?void 0:jt.noDataStyles,Pt=null==jt?void 0:jt.approveButtonStyles;null==jt||jt.suggestedFilesStyles;const Ut=null!==(Me=null===(Le=null==Ot?void 0:Ot.shouldRender)||void 0===Le?void 0:Le.call(Ot,X))&&void 0!==Me&&Me,kt=null===(_e=null==Ot?void 0:Ot.getValue)||void 0===_e?void 0:_e.call(Ot,X),At=null!==(ze=null===(Fe=null==Ot?void 0:Ot.getFields)||void 0===Fe?void 0:Fe.call(Ot,X))&&void 0!==ze?ze:[],Rt=null!==(We=null==Ot?void 0:Ot.isEditDisabled)&&void 0!==We&&We,Lt=null!==(He=null===(Ge=null==Ot?void 0:Ot.isSaving)||void 0===Ge?void 0:Ge.call(Ot,X))&&void 0!==He&&He,Mt=((e,t)=>e>=80?null==t?void 0:t.highCompletion:e>=50?null==t?void 0:t.mediumCompletion:null==t?void 0:t.lowCompletion)(null!==(Ve=X.completion_percentage)&&void 0!==Ve?Ve:0,Bt),_t={[F.WAITING]:null==Nt?void 0:Nt.waiting,[F.IN_PROGRESS]:null==Nt?void 0:Nt.inProgress,[F.GENERATED]:null==Nt?void 0:Nt.generated,[F.FAILED]:null==Nt?void 0:Nt.failed,[F.GENERATE]:null==Nt?void 0:Nt.generate,[F.APPROVED]:null==Nt?void 0:Nt.approved},[Ft,zt]=l(Object.assign(Object.assign({},structuredClone(X)),{value:P(X.value)||""})),[Wt,Gt]=l({userStory:!!X.isDefaultEdit}),[Ht,Vt]=l(!1),[$t,qt]=l(!1),[Yt,Qt]=l(null),[Zt,Jt]=l(null),{userStory:Kt,customIcons:Xt}=z(),[en,tn]=l(null!=pe?pe:""===te||de===X.artifactId||!!X.isDefaultOpen),[nn,ln]=l(!1),[on,sn]=l(null),[an,rn]=l(null),[dn,cn]=l(!1),un=o(null),vn=o(null),gn=o(null),[pn,mn]=l(!1),[yn,hn]=l(!1),bn=o(null),[fn,Sn]=l(!1),[Cn,On]=l(!1);s(()=>{O&&tn(O)},[O]),s(()=>{zt(Object.assign(Object.assign({},structuredClone(X)),{value:P(X.value)||""}))},[X]),s(()=>{ft.length>0?tn(!0):void 0===pe&&de&&tn(de===X.artifactId)},[ft,de,X.artifactId]),s(()=>{be&&be.length>0&&tn(be.includes(X.artifactId)||""===te||de===X.artifactId||!!X.isDefaultOpen)},[be]),s(()=>{if(!Cn)return;const e=e=>{vn.current&&!vn.current.contains(e.target)&&On(!1)};return document.addEventListener("mousedown",e,!0),()=>{document.removeEventListener("mousedown",e,!0)}},[Cn]);const jn=()=>{sn(null)},In=()=>{rn(null)},Nn=()=>{en&&Wt.userStory&&gn.current&&!gn.current.requestClose()||tn(e=>!e)},wn=()=>e(void 0,void 0,void 0,function*(){var e,t;cn(!0);try{"userStory"==="userStory"&&(ee(Ft),console.log("I am changing RTE editor values",Ft)),yield null===(e=null==Be?void 0:Be.onSaveEditedSection)||void 0===e?void 0:e.call(Be,Ft),yield re(St,Kt,j,null===(t=bn.current)||void 0===t?void 0:t.signal),ee(Object.assign(Object.assign({},Ft),{isDefaultEdit:!1})),Gt(e=>Object.assign(Object.assign({},e),{userStory:!1}))}finally{cn(!1)}});const En=null!=(null==X?void 0:X.big_enough)&&!Number.isNaN(X.big_enough)&&!!(null==X?void 0:X.big_enough_decision_factors),Dn=null!==($e=null==X?void 0:X.completion_percentage)&&void 0!==$e?$e:0,xn=!!(null==X?void 0:X.completion_decision_factors),Bn=""===te,Tn=null!=ve?ve:Q(ue,Bn),Pn=!le&&!oe;return s(()=>{if(!Zt)return;const e=setTimeout(()=>{const e=document.getElementById(`story-card-${Zt}`);null==e||e.scrollIntoView({behavior:"smooth",block:"start"})},100);return()=>clearTimeout(e)},[Zt]),s(()=>{X.isDefaultEdit&&Gt(e=>Object.assign(Object.assign({},e),{userStory:!0}))},[X.isDefaultEdit]),console.log("block number in userstory card ",Pe),console.log("[TESTING-CURRENT-USER-STORY] \n",X,"\n[TESTING-USER-STORY] \n",Kt),t("div",Object.assign({className:T.card,"data-block-id":"user-story-card-wrapper-"+Pe,style:null==jt?void 0:jt.cardStyle,id:`story-card-${X.title}`,"data-expanded":en},{children:[t("div",Object.assign({className:T.titleSection,style:null==jt?void 0:jt.titleSection},{children:[t("div",Object.assign({className:T.titleRow,style:null==jt?void 0:jt.titleRow,onClick:Nn},{children:[t("div",Object.assign({className:T.titleLeft,style:null==jt?void 0:jt.titleLeft,onMouseEnter:()=>mn(!0),onMouseLeave:()=>mn(!1)},{children:[fe&&n(Z,{displayName:I}),Ht&&Pn?n(G,{title:X.title,onSave:t=>((t,n)=>e(void 0,void 0,void 0,function*(){var e;try{let i=Object.assign({},X);X.artifactId===n?i.title=t:i.sub_features=(null===(e=X.sub_features)||void 0===e?void 0:e.map(e=>e.artifactId===n?Object.assign(Object.assign({},e),{title:t}):e))||[],zt(i),ee(i),Vt(!1)}catch(e){console.error("Failed to save title",e)}}))(t,X.artifactId),onCancel:()=>{Vt(!1)},inputStyle:null==wt?void 0:wt.inlineTitleInput,confirmButtonStyle:null==wt?void 0:wt.inlineTitleConfirm,cancelButtonStyle:null==wt?void 0:wt.inlineTitleCancel},"inline-title-editor"):t("div",Object.assign({className:T.storyTitleWrapper},{children:[n(w,Object.assign({title:Y(X.title),arrow:!0},{children:n("h2",Object.assign({title:De?void 0:X.title,className:T.storyTitle,style:null==jt?void 0:jt.storyTitle},{children:Y(X.title)}),X.artifactId)})),Ue&&!Ut&&n("div",Object.assign({ref:vn,style:{display:"inline-flex"}},{children:n(w,Object.assign({open:Cn&&!(null==ke?void 0:ke.isLoading)&&!!(null===(qe=null==ke?void 0:ke.files)||void 0===qe?void 0:qe.length),disableHoverListener:!0,disableFocusListener:!0,disableTouchListener:!0,placement:"bottom",PopperProps:{disablePortal:!0},arrow:!0,componentsProps:{tooltip:{className:T.suggestedFilesTooltip,sx:{backgroundColor:"#334155",color:"#fff",maxWidth:400,padding:0,borderRadius:"8px",boxShadow:"0 8px 24px rgba(0,0,0,0.25)"}},arrow:{sx:{color:"#334155"}}},title:t("div",Object.assign({onClick:e=>e.stopPropagation()},{children:[t("div",Object.assign({style:{fontWeight:700,fontSize:15,color:"#fff",padding:"12px 14px 10px 14px",borderBottom:"1px solid rgba(255,255,255,0.15)",whiteSpace:"nowrap"}},{children:[null!==(Ye=null==ke?void 0:ke.title)&&void 0!==Ye?Ye:"Suggested files to generate this section"," ","(",null!==(Ze=null===(Qe=null==ke?void 0:ke.files)||void 0===Qe?void 0:Qe.length)&&void 0!==Ze?Ze:0,")"]})),n("ol",Object.assign({className:T.suggestedFilesList,style:{margin:0,padding:"8px 14px 10px 14px",maxHeight:180,overflowY:"auto",listStyle:"none"}},{children:null===(Je=null==ke?void 0:ke.files)||void 0===Je?void 0:Je.map((e,n)=>t("li",Object.assign({style:{fontSize:14,color:"#CBD5E1",padding:"6px 0",whiteSpace:"nowrap"}},{children:[n+1,". ",e]}),n))}))]}))},{children:n(a,{size:16,style:{cursor:(null==ke?void 0:ke.isLoading)||!(null===(Ke=null==ke?void 0:ke.files)||void 0===Ke?void 0:Ke.length)?"not-allowed":"pointer",color:"#94A3B8",marginLeft:4,opacity:(null==ke?void 0:ke.isLoading)||!(null===(Xe=null==ke?void 0:ke.files)||void 0===Xe?void 0:Xe.length)?.4:1,transition:"opacity 0.15s ease"},onClick:e=>{var t;e.stopPropagation(),!(null==ke?void 0:ke.isLoading)&&(null===(t=null==ke?void 0:ke.files)||void 0===t?void 0:t.length)&&On(e=>!e)}})}))})),Ie&&(xn?n(V,Object.assign({customIcons:null==Xt?void 0:Xt.userStoryIcons,customStyles:null==jt?void 0:jt.aiReasoningCitaionStyles,currentUserStory:X,panelStyles:null==jt?void 0:jt.CompletionStyles,onToggleStateChange:hn,completionPanelConfig:Ne},{children:t("div",Object.assign({style:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",gap:"4px"},null==Bt?void 0:Bt.badge),Mt)},{children:[t("span",{children:[Dn,"% Completed"]}),n("span",Object.assign({style:{display:"flex",alignItems:"center"}},{children:n($,{color:"currentColor"})})),n(yn?r:d,{size:14,style:null==Bt?void 0:Bt.chevronStyle})]}))})):n("div",Object.assign({style:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",gap:"4px"},null==Bt?void 0:Bt.badge),Mt)},{children:t("span",{children:[Dn,"% Completed"]})}))),Se&&n("button",Object.assign({type:"button",className:T.titleEditButton,style:null==wt?void 0:wt.titleEditButton,onClick:e=>{e.stopPropagation(),Vt(!0),en||tn(!0)},"aria-label":"Edit title",title:"Edit title"},{children:n("svg",Object.assign({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:n("path",{d:"M8.99998 14.9992H15.75M2.25 14.9992H3.50591C3.87279 14.9992 4.05624 14.9992 4.22887 14.9577C4.38192 14.921 4.52824 14.8604 4.66245 14.7782C4.81382 14.6854 4.94354 14.5557 5.20296 14.2962L14.625 4.87419C15.2463 4.25287 15.2463 3.24551 14.625 2.62419C14.0037 2.00287 12.9963 2.00287 12.375 2.62419L2.95295 12.0462C2.69352 12.3057 2.5638 12.4354 2.47104 12.5868C2.3888 12.721 2.32819 12.8673 2.29145 13.0203C2.25 13.193 2.25 13.3764 2.25 13.7433V14.9992Z",stroke:"#94A3B8","stroke-width":"1.54286","stroke-linecap":"round","stroke-linejoin":"round"})}))}))]}))]})),(pt||void 0!==yt&&void 0!==ht)&&t("div",Object.assign({className:T.statusContainer},{children:[void 0!==yt&&void 0!==ht&&t("div",Object.assign({className:T.completedBadge},{children:["Completed: ",yt,"/",ht]})),pt&&n("button",Object.assign({type:"button",onClick:e=>{e.stopPropagation(),null==mt||mt()},onMouseEnter:()=>Sn(!0),onMouseLeave:()=>Sn(!1),className:T.statusButton,style:Object.assign(Object.assign({},null===(et=_t[pt])||void 0===et?void 0:et.default),fn&&(null===(tt=_t[pt])||void 0===tt?void 0:tt.hover))},{children:q[pt]}))]})),t("div",Object.assign({className:T.titleActions,style:null==jt?void 0:jt.titleActions,onClick:e=>e.stopPropagation()},{children:[(Tn.showProgressPercentage||Tn.showGapBox)&&ge&&t("div",Object.assign({className:T.progressHeader,style:null==Dt?void 0:Dt.wrapper},{children:[Tn.showProgressPercentage&&t("div",Object.assign({className:T.progressPercentage,style:null==Dt?void 0:Dt.percentage},{children:[null!==(it=null!==(nt=null==X?void 0:X.confidenceScore)&&void 0!==nt?nt:null==Tn?void 0:Tn.confidenceValue)&&void 0!==it?it:"0","%"]})),Tn.showGapBox&&t("div",Object.assign({className:T.gapBox,style:null==Dt?void 0:Dt.gapBox},{children:[null!==(ot=null!==(lt=null==X?void 0:X.gapValue)&&void 0!==lt?lt:null==Tn?void 0:Tn.gapBoxValue)&&void 0!==ot?ot:"2"," ","Gaps"]}))]})),En&&n(W,{customIcons:null==Xt?void 0:Xt.userStoryIcons,customStyles:null==jt?void 0:jt.aiReasoningCitaionStyles,currentUserStory:X,panelStyles:null==jt?void 0:jt.BigEnoughStyles}),!Wt.userStory&&t(i,{children:[!1!==(null==Tn?void 0:Tn.showShareButton)&&n("button",Object.assign({className:T.iconButton,style:null==jt?void 0:jt.iconButton,onClick:e=>{sn(e.currentTarget)}},{children:n(c,{size:16})})),t(E,Object.assign({id:"user-story-share-menu",anchorEl:on,open:!!on,onClose:()=>sn(null),style:null==jt?void 0:jt.userStoryShareMenu},{children:[ie&&n(D,Object.assign({style:null==jt?void 0:jt.userStoryMenuItem,onClick:()=>e(void 0,void 0,void 0,function*(){ln(!0),se&&(yield Promise.all([se("pdf"),se("doc")]),ln(!1))})},{children:t("div",Object.assign({ref:un,className:T.menuItemContent,style:null==jt?void 0:jt.menuItemContent},{children:[n(u,{size:16,color:null==jt?void 0:jt.menuIconColor}),n("p",Object.assign({style:null==jt?void 0:jt.menuLabel},{children:"Download"}))]}))})),n(D,Object.assign({style:null==jt?void 0:jt.userStoryMenuItem,onClick:()=>e(void 0,void 0,void 0,function*(){let e=X;K&&(e=Object.assign(Object.assign({},X),{value:`${A(null==K?void 0:K.value,X.title)} \n${X.value}`})),null==ae||ae(!0,[e],X.artifactId),jn()})},{children:t("div",Object.assign({style:null==jt?void 0:jt.menuItemContent,className:T.menuItemContentPadded},{children:[n(v,{size:16,color:null==jt?void 0:jt.menuIconColor}),n("p",Object.assign({style:null==jt?void 0:jt.menuLabel},{children:"Send"}))]}))})),n(D,Object.assign({style:null==jt?void 0:jt.userStoryMenuItem,onClick:()=>e(void 0,void 0,void 0,function*(){const e=(new N.Converter).makeHtml(P(X.value)||X.value),t=function(e){const t=(new N.Converter).makeHtml(e),n=document.createElement("div");return n.innerHTML=t,n.textContent||n.innerText||""}(P(X.value)||X.value),n=new ClipboardItem({"text/plain":new Blob([t],{type:"text/plain"}),"text/html":new Blob([e],{type:"text/html"})});try{yield navigator.clipboard.write([n]),console.log("Copied User Story")}catch(e){console.error("Failed to copy user story:",e)}finally{jn()}})},{children:t("div",Object.assign({style:null==jt?void 0:jt.menuItemContent,className:T.menuItemContentPadded},{children:[n(g,{size:16,color:null==jt?void 0:jt.menuIconColor}),n("p",Object.assign({style:null==jt?void 0:jt.menuLabel},{children:"Copy"}))]}))}))]}))]}),Wt.userStory&&en?n(L,{type:"outline",children:"Cancel",style:null==jt?void 0:jt.cancelButton,onClick:()=>{var e;null===(e=bn.current)||void 0===e||e.abort(),Gt(e=>Object.assign(Object.assign({},e),{userStory:!1}))}}):n(i,{}),Wt.userStory&&en?n(L,{type:"fill",children:dn?t("span",Object.assign({className:T.savingSpinner,style:null==jt?void 0:jt.savingSpinner},{children:[n(p,{className:T.spinAnimation,style:null==jt?void 0:jt.spinAnimation}),n("span",{children:"Saving..."})]})):"Save",isDisable:dn,style:dn?null==jt?void 0:jt.savingButton:null==jt?void 0:jt.saveButton,onClick:()=>e(void 0,void 0,void 0,function*(){yield wn()})}):!le&&!oe&&!Ee&&en&&!1!==(null==Tn?void 0:Tn.showEditButton)&&n("button",Object.assign({className:T.iconButton,style:null==jt?void 0:jt.editButton,onClick:()=>Gt(e=>Object.assign(Object.assign({},e),{userStory:!0}))},{children:n(m,{color:null==jt?void 0:jt.pencilIconColor,size:16})})),we&&Bn&&en&&!le&&!oe&&!1!==(null==Tn?void 0:Tn.showEditButton)&&t("button",Object.assign({type:"button",className:T.addSectionButton,style:null==wt?void 0:wt.addSectionButton,onClick:e=>{var t,n,i;e.stopPropagation();const l=(null!==(n=null===(t=X.sub_features)||void 0===t?void 0:t.length)&&void 0!==n?n:0)+1,o={artifactId:B(),title:`New Section ${l}`,value:"Please add details for this section.",section:"subfeature",isDefaultOpen:!0},s=Object.assign(Object.assign({},X),{sub_features:[...null!==(i=X.sub_features)&&void 0!==i?i:[],o]});zt(s),ee(s),tn(!0),Jt(o.title)},"aria-label":"Add section",title:"Add section"},{children:[n(y,{size:14}),n("span",Object.assign({className:T.addSectionLabel},{children:"Add Section"}))]})),!Bn&&!le&&!Ee&&!oe&&n("button",Object.assign({type:"button",onClick:e=>{e.stopPropagation(),null==ye||ye()},className:T.iconButton,style:null==wt?void 0:wt.deleteButton,"aria-label":"Delete section",title:"Delete section"},{children:n(h,{size:16})})),Ut&&n("button",Object.assign({type:"button",className:T.iconButton,style:null==It?void 0:It.button,disabled:Rt,onClick:e=>{if(e.stopPropagation(),$t)return Qt(null),void qt(!1);Qt(structuredClone(null!=kt?kt:{})),tn(!0),qt(!0)}},{children:$t?n(b,{size:16,color:null==jt?void 0:jt.pencilIconColor,style:null==It?void 0:It.cancelIcon}):n(m,{size:16,color:null==jt?void 0:jt.pencilIconColor,style:null==It?void 0:It.editIcon})})),(null==Tn?void 0:Tn.actionItemsButton)&&t(i,{children:[n("span",Object.assign({className:T.actionItemBtn,style:null==jt?void 0:jt.actionItemBtn,onClick:e=>{e.stopPropagation(),rn(e.currentTarget)}},{children:n(f,{})})),n(E,Object.assign({id:"user-story-action-menu",anchorEl:an,open:!!an,onClose:In,style:null==jt?void 0:jt.userStoryShareMenu},{children:null==me?void 0:me.items.map((e,i)=>n(D,Object.assign({style:null==jt?void 0:jt.userStoryMenuItem,onClick:()=>{e.onclick(X),In()}},{children:t("div",Object.assign({className:T.menuItemContent,style:Object.assign(Object.assign({},null==jt?void 0:jt.menuItemContent),!e.isActive&&{cursor:"not-allowed",opacity:.5})},{children:[n("span",Object.assign({className:T.menuItemIcon,style:null==jt?void 0:jt.menuItemIcon},{children:e.icon})),n("p",Object.assign({style:null==jt?void 0:jt.menuLabel},{children:e.name})),n("span",{className:T.menuItemRight,style:null==jt?void 0:jt.menuItemRight})]}))}),`action-item-${i}-${e.name}`))}))]}),n("button",Object.assign({type:"button",onClick:e=>{e.stopPropagation(),Nn()},style:null==jt?void 0:jt.chevronButton,className:T.chevronButton},{children:n(en?r:d,{className:T.chevronIcon,color:null==jt?void 0:jt.chevronIconColor})}))]}))]})),n("div",{className:T.divider,style:null==jt?void 0:jt.dividerStyle})]})),en&&n("div",Object.assign({className:T.cardContent,style:Object.assign(Object.assign({},null==jt?void 0:jt.cardContentStyle),{borderTop:Oe?"1px solid #E5E5E5":"none"})},{children:t("div",vt?Object.assign({className:T.loadingContainer},{children:[n("div",Object.assign({className:T.loadingIconWrapper},{children:n(S,{size:28,color:"#5B3DF5",className:T.spinAnimation})})),t("div",{children:[n("h3",Object.assign({className:T.loadingTitle},{children:"Section generation in progress.."})),n("p",Object.assign({className:T.loadingSubtitle},{children:"This may take a few minutes"}))]}),n("button",Object.assign({type:"button",onClick:()=>null==gt?void 0:gt(),className:T.viewStatusButton},{children:"View Status"}))]}):bt?Object.assign({className:T.noDataContainer,style:null==Tt?void 0:Tt.container},{children:[n("img",{src:x,alt:"No data available",className:T.noDataIllustration,style:null==Tt?void 0:Tt.illustration}),n("h3",Object.assign({className:T.noDataTitle,style:null==Tt?void 0:Tt.title},{children:"No Data Available for This Section"})),n("p",Object.assign({className:T.noDataSubtitle,style:null==Tt?void 0:Tt.subtitle},{children:"We couldn't find data for this section yet. Upload the required document from the Documents tab to generate content."}))]}):Object.assign({className:T.contentInner,style:null==jt?void 0:jt.contentInner},{children:[t("div",Object.assign({className:T.descriptionSection,style:null==jt?void 0:jt.descriptionSection},{children:[n("div",{className:T.justifyBetween,style:null==jt?void 0:jt.justifyBetween}),Wt.userStory?n(M,{ref:gn,minHeight:"100%",height:"100%",type:"string",value:k(P(X.value)||""),handleUpdateState:(e,t)=>{const n=R(U(t));zt(e=>Object.assign(Object.assign({},e),{value:n||""}))},doNotShowBorderInViewMode:!1,onBlur:()=>{},mode:Wt.userStory?"edit":"readOnly",onSaveUnsavedChanges:()=>e(void 0,void 0,void 0,function*(){yield wn(),tn(!1)}),onDiscardUnsavedChanges:()=>{zt(Object.assign(Object.assign({},structuredClone(X)),{value:P(X.value)||""})),Gt(e=>Object.assign(Object.assign({},e),{userStory:!1})),tn(!1)},isSavingUnsavedChanges:dn}):Ut?n(H,{styles:xt,fields:At,readonly:!$t,isSaving:Lt,value:null!==(st=null!=Yt?Yt:kt)&&void 0!==st?st:{},onChange:Qt,onSave:()=>e(void 0,void 0,void 0,function*(){var e;Yt&&(yield null===(e=null==Ot?void 0:Ot.onSave)||void 0===e?void 0:e.call(Ot,X,Yt),Qt(null),qt(!1))}),onCancel:()=>{Qt(null),qt(!1)}}):t(i,{children:[n(_,{showUserStoryDiff:oe,isParent:""===te,message:P(X.value)||"",artifactId:X.artifactId,customStyles:Et,isDisplayHighlightControl:ce,contextVariant:he,showConfidenceScore:Ce,CDNeededInChip:Te,blockId:Pe}),(xe||Be)&&t("div",Object.assign({className:T.actionButtonsContainer,style:null==Pt?void 0:Pt.container},{children:[Be&&!Wt.userStory&&t(i,{children:[n("button",Object.assign({type:"button",className:T.actionButton,style:null==Pt?void 0:Pt.button,disabled:Be.disabled||Be.isLoading,onClick:e=>{var t;e.stopPropagation(),null===(t=Be.onClick)||void 0===t||t.call(Be),Gt(e=>Object.assign(Object.assign({},e),{userStory:!0})),tn(!0)}},{children:Be.isLoading?t(i,{children:[n(p,{size:16,className:T.actionButtonSpinner,style:null==Pt?void 0:Pt.icon}),n("span",Object.assign({style:null==Pt?void 0:Pt.text},{children:null!==(at=Be.label)&&void 0!==at?at:"Edit"}))]}):t(i,{children:[n(m,{size:16,style:null==Pt?void 0:Pt.icon}),n("span",Object.assign({style:null==Pt?void 0:Pt.text},{children:null!==(rt=Be.label)&&void 0!==rt?rt:"Edit"}))]})})),xe&&n("span",{className:T.actionButtonDivider})]}),xe&&n("button",Object.assign({type:"button",className:T.actionButton,style:null==Pt?void 0:Pt.button,disabled:xe.disabled||xe.isLoading,onClick:e=>{var t;e.stopPropagation(),null===(t=xe.onClick)||void 0===t||t.call(xe)}},{children:xe.isLoading?t(i,{children:[n(p,{size:16,className:T.actionButtonSpinner,style:null==Pt?void 0:Pt.icon}),n("span",Object.assign({style:null==Pt?void 0:Pt.text},{children:null!==(dt=xe.label)&&void 0!==dt?dt:"Approve"}))]}):t(i,{children:[n(C,{size:16,style:null==Pt?void 0:Pt.icon}),n("span",Object.assign({style:null==Pt?void 0:Pt.text},{children:null!==(ct=xe.label)&&void 0!==ct?ct:"Approve"}))]})}))]}))]})]})),null===(ut=Ft.sub_features)||void 0===ut?void 0:ut.map((e,t)=>{console.log("UserStoryCardWrapper: sub",e);const i=Q(ue,!1,e.artifactId);return n(J,{artifactId:j,isUserStoryCurrentlyUpdated:O,artifactTitleId:`${I}-${String.fromCharCode(65+t)}`,parentUserStory:X,parentIndex:`${te}${te&&"."}${ne}`,currentIndex:`${t+1}`,doNotShowBorderInViewMode:!1,currentUserStory:e,onUserStoryChange:e=>((e,t)=>{const n=[...X.sub_features||[]];n[e]=t,ee(Object.assign(Object.assign({},X),{sub_features:n}))})(t,e),enableDownload:!0,isDiffEditReviewMode:le,showUserStoryDiff:oe,updateUserStoryArtifact:re,handleDownloadUserStory:se,handleOpenSendDialog:ae,isDisplayHighlightControl:ce,elementDisplayConfig:ue,_resolvedConfig:i,actionItemsConfig:me,onDelete:()=>(e=>{const t=(X.sub_features||[]).filter((t,n)=>n!==e),n=Object.assign(Object.assign({},X),{sub_features:t});zt(n),ee(n)})(t),expandedSubFeatures:be,disableEditPlan:Ee,useMuiTooltip:De,blockNumber:e.blockNumber},e.artifactId)})]}))}))]}))},K=({artifactTitleIDs:e,expandedSubFeatures:l,isDiffEditReviewMode:o,showUserStoryDiff:s,updateUserStoryArtifact:a,isUserStoryCurrentlyUpdated:r,artifactId:d,handleOpenSendDialog:c,handleDownloadUserStory:u,selectedArtifactId:v,isDisplayHighlightControl:g,elementDisplayConfig:p,showWrapper:m,actionItemsConfig:y,contextVariant:h,showDisplayName:b,allowTitleEdit:f,showConfidenceScore:S,showBorderTop:C,defaultExpanded:I,showCompletionPanel:N=!1,completionPanelConfig:w,showAddSectionButton:E=!1,disableEditPlan:D=!1,useMuiTooltip:x=!1,approveButtonConfig:B,editButtonConfig:P,CDNeededInChip:U,showSuggestedFilesInfo:k,suggestedFilesConfig:A})=>{const{userStory:R,setUserStory:L,customStyles:M,searchQueryList:_,currentHighlightIndex:F,setCurrentHighlightIndex:W,segmentComponentConfig:G,sectionStatusConfig:H}=z(),V=null==M?void 0:M.userStoryCardStyles,$=0===F,q=F===_.length-1;return t("div",Object.assign({className:T.userStoryCardWrapper,style:g?Object.assign(Object.assign({},null==V?void 0:V.userStoryCardWrapper),{position:"relative"}):null==V?void 0:V.userStoryCardWrapper},{children:[g&&n(i,{children:_.length>0&&n("div",Object.assign({className:T.wrapper},{children:n("div",Object.assign({className:T.highlightNavigation},{children:t("div",Object.assign({className:T.navigationContainer},{children:[t("span",Object.assign({className:T.navCounter},{children:[F+1," of ",_.length]})),t("div",Object.assign({className:T.navButtons},{children:[n("button",Object.assign({onClick:()=>{F>0&&W(e=>e-1)},className:T.navButton,disabled:$},{children:n(O,{size:20,className:T.navIcon})})),n("button",Object.assign({onClick:()=>{F<_.length-1&&W(e=>e+1)},className:T.navButton,disabled:q},{children:n(j,{size:20,className:T.navIcon})}))]}))]}))}))}))}),R.map((t,i)=>{console.log("UserStoryCardWrapper: userstory",t);const O=Q(p,!0);return n(J,{isUserStoryCurrentlyUpdated:r,artifactId:d,artifactTitleId:e[i]||"",expandedSubFeatures:l,currentUserStory:t,onUserStoryChange:e=>{L(t=>(t[i]=e,[...t]))},parentIndex:"",currentIndex:`${i+1}`,doNotShowBorderInViewMode:!0,enableDownload:!0,isDiffEditReviewMode:o,showUserStoryDiff:s,updateUserStoryArtifact:a,handleOpenSendDialog:c,handleDownloadUserStory:u,selectedArtifactId:v,isDisplayHighlightControl:g,elementDisplayConfig:p,_resolvedConfig:O,showWrapper:m,defaultExpanded:I,actionItemsConfig:y,contextVariant:h,showDisplayName:b,allowTitleEdit:f,showConfidenceScore:S,showBorderTop:C,sectionStatusConfig:H,showCompletionPanel:N,completionPanelConfig:w,showAddSectionButton:E,disableEditPlan:D,useMuiTooltip:x,approveButtonConfig:B,CDNeededInChip:U,editButtonConfig:P,showSuggestedFilesInfo:k,suggestedFilesConfig:A},t.artifactId)})]}))};export{J as StoryCard,K as UserStoryCardWrapper,J as default,Y as replaceLearnedTagsWithInfo};
|
|
1
|
+
import{jsxs as e,Fragment as t,jsx as l}from"react/jsx-runtime";import{useState as o,useRef as n,useEffect as i}from"react";import{Info as s,ChevronUp as a,ChevronDown as r,Users as d,ExternalLink as u,Download as c,Share2 as v,Copy as p,LoaderCircle as m,PencilIcon as h,RefreshCw as y,Plus as g,Trash2 as f,X as S,Ellipsis as C,Hourglass as I,Check as b,ChevronUpIcon as w,ChevronDownIcon as N,Bookmark as E}from"lucide-react";import D from"showdown";import{Tooltip as B,Menu as x,MenuItem as A}from"@mui/material";import T from"../../icons/Illustration.svg.js";import{v4 as U}from"uuid";import k from"./UserStoryCard.module.css.js";import{formatMarkdown as P,indentMarkdown as R}from"../../utils/helpers.js";import{replaceTitleSection as L,postprocessUserStoryAfterEdit as _}from"../../utils/user-story.utils.js";import F from"../../shared/AtomicButton.js";import W from"../RichTextEditor/RichTextEditor.js";import $ from"../userstory-with-citation/UserStoryWithCitation.js";import{SectionStatus as M,useRequirementAI as z,ToasterId as j}from"../RequirementAIWrapper/RequirementAIWrapper.js";import{BigEnoughPanel as O}from"../story-screen/BigEnoughPanel.js";import{InlineTitleEditor as V}from"./TitleEditor/TitleEditor.js";import{fetchRedlineDocumentSection as G,updateRedlineDocument as H,getRedlineDocumentId as q,createRedlineDocument as Y}from"../../../../service/redlineService.js";import Q from"./ClinicalTrialSection.js";import{CompletionPanel as Z}from"../story-screen/CompletionPanel.js";import J from"../../icons/CDIcon.js";import K from"./cws/CwsEvent.js";import X from"./cws/useCwsEvent.js";import ee from"react-hot-toast";import te from"./Popups/RedlineToast.js";const le={[M.WAITING]:"WAITING TO GENERATE",[M.IN_PROGRESS]:"IN PROGRESS",[M.GENERATED]:"GENERATED",[M.FAILED]:"FAILED",[M.GENERATE]:"GENERATE",[M.APPROVED]:"APPROVED"};function oe(e){const t=[],o=/<learned>(.*?)<\/learned>/g;let n,i=0,a=0;for(;null!==(n=o.exec(e));){const[,r]=n,d=n.index;d>i&&t.push(l("span",{children:e.slice(i,d)},"text-pre-"+a++)),t.push(l(B,{title:r,placement:"top",children:l(s,{size:16,className:"inline-block mx-1 text-blue-500 hover:text-blue-700 cursor"})},`tooltip-${U()}`)),i=o.lastIndex}return i<(null==e?void 0:e.length)&&t.push(l("span",{children:e.slice(i)},"text-post-"+a++)),t}function ne(e,t,l){var o;if(!e)return{};if(t)return{...e.parentConfig};const n={...e.childConfig};return l&&(null===(o=e.subFeatureOverrides)||void 0===o?void 0:o[l])?{...n,...e.subFeatureOverrides[l]}:n}const ie=({displayName:t})=>{var o;const{customStyles:n}=z(),i=null===(o=null==n?void 0:n.userStoryCardStyles)||void 0===o?void 0:o.showDisplayName;return e("div",{className:k.displayName,style:null==i?void 0:i.wrapper,children:[l(E,{className:k.displayNameIcon,style:null==i?void 0:i.displayNameIcon}),e("span",{style:null==i?void 0:i.label,children:[t,":"]})]})},se=({isUserStoryCurrentlyUpdated:w,artifactId:N,artifactTitleId:E,parentUserStory:q,currentUserStory:Y,onUserStoryChange:ae,parentIndex:re,currentIndex:de,enableDownload:ue,isDiffEditReviewMode:ce,showUserStoryDiff:ve,handleDownloadUserStory:pe,handleOpenSendDialog:me,updateUserStoryArtifact:he,selectedArtifactId:ye,isDisplayHighlightControl:ge,elementDisplayConfig:fe,_resolvedConfig:Se,showWrapper:Ce=!1,defaultExpanded:Ie,actionItemsConfig:be,onDelete:we,contextVariant:Ne,expandedSubFeatures:Ee,showDisplayName:De=!0,allowTitleEdit:Be=!0,showConfidenceScore:xe=!0,showBorderTop:Ae=!0,sectionStatusConfig:Te,showCompletionPanel:Ue=!1,completionPanelConfig:ke,showAddSectionButton:Pe=!1,disableEditPlan:Re=!1,useMuiTooltip:Le=!1,approveButtonConfig:_e,editButtonConfig:Fe,CDNeededInChip:We,blockNumber:$e,storyNumber:Me,showWaitingIconInChip:ze,showAssignSection:je=!1,disableAssignSection:Oe=!1,onAssignSectionClick:Ve,onSave:Ge,onUserStoryAccordionStateChange:He,showSuggestedFilesInfo:qe=!1,suggestedFilesConfig:Ye})=>{var Qe,Ze,Je,Ke,Xe,et,tt,lt,ot,nt,it,st,at,rt,dt,ut,ct,vt,pt,mt,ht,yt,gt,ft,St,Ct,It,bt,wt,Nt,Et;const{isLoadingSectionData:Dt=!1,onLoadSectionData:Bt,status:xt,onStatusClick:At,completedCount:Tt,totalCount:Ut,isNoDataAvailable:kt=!1}=null!=Te?Te:{},{searchQueryList:Pt,citations:Rt,customStyles:Lt,onEditBlocked:_t,redlineDcoumentId:Ft,redlineConfig:Wt,customSectionConfig:$t,updateRedlineDataParent:Mt,aiReasoning:zt,redlineCollaborativeConfig:jt}=z(),Ot=null==Lt?void 0:Lt.userStoryCardStyles,Vt=null==Ot?void 0:Ot.customSectionEditButton,Gt=null==Ot?void 0:Ot.statusStyles,Ht=null===(Qe=null==Lt?void 0:Lt.userStoryCardStyles)||void 0===Qe?void 0:Qe.userStoryEditStyles,qt=null===(Ze=null==Lt?void 0:Lt.userStoryScreenStyles)||void 0===Ze?void 0:Ze.userStoryContentStyles,Yt=null==Ot?void 0:Ot.progressHeaderStyles,Qt=null==Ot?void 0:Ot.clinicalTrialSectionStyles,Zt=null==Ot?void 0:Ot.CompletionStyles,Jt=null==Ot?void 0:Ot.noDataStyles,Kt=null==Ot?void 0:Ot.approveButtonStyles;null==Ot||Ot.suggestedFilesStyles;const Xt=null!==(Ke=null===(Je=null==$t?void 0:$t.shouldRender)||void 0===Je?void 0:Je.call($t,Y))&&void 0!==Ke&&Ke,el=null===(Xe=null==$t?void 0:$t.getValue)||void 0===Xe?void 0:Xe.call($t,Y),tl=null!==(tt=null===(et=null==$t?void 0:$t.getFields)||void 0===et?void 0:et.call($t,Y))&&void 0!==tt?tt:[],ll=null!==(lt=null==$t?void 0:$t.isEditDisabled)&&void 0!==lt&<,ol=null!==(nt=null===(ot=null==$t?void 0:$t.isSaving)||void 0===ot?void 0:ot.call($t,Y))&&void 0!==nt&&nt,nl=((e,t)=>e>=80?null==t?void 0:t.highCompletion:e>=50?null==t?void 0:t.mediumCompletion:null==t?void 0:t.lowCompletion)(null!==(it=Y.completion_percentage)&&void 0!==it?it:0,Zt),il={[M.WAITING]:null==Gt?void 0:Gt.waiting,[M.IN_PROGRESS]:null==Gt?void 0:Gt.inProgress,[M.GENERATED]:null==Gt?void 0:Gt.generated,[M.FAILED]:null==Gt?void 0:Gt.failed,[M.GENERATE]:null==Gt?void 0:Gt.generate,[M.APPROVED]:null==Gt?void 0:Gt.approved},[sl,al]=o({...structuredClone(Y),value:P(Y.value)||""}),[rl,dl]=o({userStory:!!Y.isDefaultEdit}),[ul,cl]=o(!1),[vl,pl]=o(!1),[ml,hl]=o(null),[yl,gl]=o(null),{userStory:fl,customIcons:Sl}=z(),[Cl,Il]=o(null!=Ie?Ie:""===re||ye===Y.artifactId||!!Y.isDefaultOpen),[bl,wl]=o(!1),[Nl,El]=o(null),[Dl,Bl]=o(null),[xl,Al]=o(!1),Tl=n(null),Ul=n(null),kl=n(null),[Pl,Rl]=o(!1),[Ll,_l]=o(!1),Fl=n(null),[Wl,$l]=o(!1),[Ml,zl]=o(!1),[jl,Ol]=o(Y.value);i(()=>{w&&Il(w)},[w]),i(()=>{al({...structuredClone(Y),value:P(Y.value)||""})},[Y]),i(()=>{Pt.length>0?Il(!0):void 0===Ie&&ye&&Il(ye===Y.artifactId)},[Pt,ye,Y.artifactId]),i(()=>{Ee&&Ee.length>0&&Me&&$e&&Il(Ee.includes(`${Me}-${$e}`)||""===re||ye===Y.artifactId||!!Y.isDefaultOpen)},[Ee,Me,$e]),i(()=>{if(!Ml)return;const e=e=>{Ul.current&&!Ul.current.contains(e.target)&&zl(!1)};return document.addEventListener("mousedown",e,!0),()=>{document.removeEventListener("mousedown",e,!0)}},[Ml]);const Vl=()=>{El(null)},Gl=()=>{Bl(null)},Hl=()=>{if(Cl&&rl.userStory&&kl.current&&!kl.current.requestClose())return;const e=!Cl;Il(e),null==He||He(Y,e)},ql=async()=>{var e,t;try{"userStory"==="userStory"&&(ae(sl),console.log("I am changing RTE editor values",sl)),await(null===(e=null==Fe?void 0:Fe.onSaveEditedSection)||void 0===e?void 0:e.call(Fe,sl)),await he(Rt,fl,N,null===(t=Fl.current)||void 0===t?void 0:t.signal)}finally{}};const Yl=null!=(null==Y?void 0:Y.big_enough)&&!Number.isNaN(Y.big_enough)&&!!(null==Y?void 0:Y.big_enough_decision_factors),Ql=null!==(st=null==Y?void 0:Y.completion_percentage)&&void 0!==st?st:0,Zl=!!(null==Y?void 0:Y.completion_decision_factors),Jl=""===re,Kl=null!=Se?Se:ne(fe,Jl),Xl=!ce&&!ve;i(()=>{if(!yl)return;const e=setTimeout(()=>{const e=document.getElementById(`story-card-${yl}`);null==e||e.scrollIntoView({behavior:"smooth",block:"start"})},100);return()=>clearTimeout(e)},[yl]);const[eo,to]=o(0),[lo,oo]=o(!1),no=async()=>{var e,t;let l=!0;if(oo(e=>(l=!e,!0)),l){let l;to(e=>(l=e,e));try{const{updated_reqai:o}=await G({documentId:Ft,sectionId:Y.artifactId,baseApiUrl:null==Wt?void 0:Wt.baseApiUrl,redlineConfigId:null!==(e=null==Wt?void 0:Wt.redlineConfigId)&&void 0!==e?e:""},null!==(t=null==Wt?void 0:Wt.token)&&void 0!==t?t:"");await(null==Mt?void 0:Mt(o)),to(e=>l===e?0:1)}catch(e){console.error("failed to fetch latest user story: ",e),ee.error("Failed to fetch the latest user story. Please try again.")}oo(!1)}};i(()=>{Y.isDefaultEdit&&dl(e=>({...e,userStory:!0}))},[Y.isDefaultEdit]),console.log("block number in userstory card ",$e),console.log("[TESTING-CURRENT-USER-STORY] \n",Y,"\n[TESTING-USER-STORY] \n",fl),X(`redline-edit:${Ft}:${Y.artifactId}`,async({updatedBy:o})=>{var n;null===(n=Fl.current)||void 0===n||n.abort(),to(e=>e+1),dl(n=>n.userStory?(ee.custom(t=>e(te,{onCancel:()=>ee.dismiss(t.id),onRefresh:()=>{ee.dismiss(t.id),no()},children:["This ",l("span",{style:{fontWeight:600},children:Y.title})," section has been updated by ",l("span",{style:{fontWeight:600},children:o})," while you were editing. Please refresh to view the latest version."]}),{duration:1e4,toasterId:j}),{...fl,userStory:!1}):(no().then(()=>{ee.custom(n=>e(te,{onCancel:()=>ee.dismiss(n.id),title:e(t,{children:[l("span",{style:{fontWeight:600},children:Y.title})," updated,",l("br",{})]}),children:[o," saved changes. Your unsaved edits are untouched."]}),{duration:1e4,toasterId:j})}),n))});return i(()=>Ol(Y.value),[Y.value]),e("div",{className:k.card,"data-block-id":`user-story-card-wrapper-${Me}-${$e}`,style:null==Ot?void 0:Ot.cardStyle,id:`story-card-${Y.title}`,"data-expanded":Cl,children:[e("div",{className:k.titleSection,style:null==Ot?void 0:Ot.titleSection,children:[e("div",{className:k.titleRow,style:null==Ot?void 0:Ot.titleRow,onClick:Hl,children:[e("div",{className:k.titleLeft,style:null==Ot?void 0:Ot.titleLeft,onMouseEnter:()=>Rl(!0),onMouseLeave:()=>Rl(!1),children:[De&&l(ie,{displayName:E}),ul&&Xl?l(V,{title:Y.title,onSave:e=>(async(e,t)=>{var l;try{let o={...Y};Y.artifactId===t?o.title=e:o.sub_features=(null===(l=Y.sub_features)||void 0===l?void 0:l.map(l=>l.artifactId===t?{...l,title:e}:l))||[],al(o),ae(o),cl(!1)}catch(e){console.error("Failed to save title",e)}})(e,Y.artifactId),onCancel:()=>{cl(!1)},inputStyle:null==Ht?void 0:Ht.inlineTitleInput,confirmButtonStyle:null==Ht?void 0:Ht.inlineTitleConfirm,cancelButtonStyle:null==Ht?void 0:Ht.inlineTitleCancel},"inline-title-editor"):e("div",{className:k.storyTitleWrapper,children:[l(B,{title:oe(Y.title),arrow:!0,children:l("h2",{title:Le?void 0:Y.title,className:k.storyTitle,style:null==Ot?void 0:Ot.storyTitle,children:oe(Y.title)},Y.artifactId)}),qe&&!Xt&&l("div",{ref:Ul,style:{display:"inline-flex"},children:l(B,{open:Ml&&!(null==Ye?void 0:Ye.isLoading)&&!!(null===(at=null==Ye?void 0:Ye.files)||void 0===at?void 0:at.length),disableHoverListener:!0,disableFocusListener:!0,disableTouchListener:!0,placement:"bottom",PopperProps:{disablePortal:!0},arrow:!0,componentsProps:{tooltip:{className:k.suggestedFilesTooltip,sx:{backgroundColor:"#334155",color:"#fff",maxWidth:400,padding:0,borderRadius:"8px",boxShadow:"0 8px 24px rgba(0,0,0,0.25)"}},arrow:{sx:{color:"#334155"}}},title:e("div",{onClick:e=>e.stopPropagation(),children:[e("div",{style:{fontWeight:700,fontSize:15,color:"#fff",padding:"12px 14px 10px 14px",borderBottom:"1px solid rgba(255,255,255,0.15)",whiteSpace:"nowrap"},children:[null!==(rt=null==Ye?void 0:Ye.title)&&void 0!==rt?rt:"Suggested files to generate this section"," ","(",null!==(ut=null===(dt=null==Ye?void 0:Ye.files)||void 0===dt?void 0:dt.length)&&void 0!==ut?ut:0,")"]}),l("ol",{className:k.suggestedFilesList,style:{margin:0,padding:"8px 14px 10px 14px",maxHeight:180,overflowY:"auto",listStyle:"none"},children:null===(ct=null==Ye?void 0:Ye.files)||void 0===ct?void 0:ct.map((t,l)=>e("li",{style:{fontSize:14,color:"#CBD5E1",padding:"6px 0",whiteSpace:"nowrap"},children:[l+1,". ",t]},l))})]}),children:l(s,{size:16,style:{cursor:(null==Ye?void 0:Ye.isLoading)||!(null===(vt=null==Ye?void 0:Ye.files)||void 0===vt?void 0:vt.length)?"not-allowed":"pointer",color:"#94A3B8",marginLeft:4,opacity:(null==Ye?void 0:Ye.isLoading)||!(null===(pt=null==Ye?void 0:Ye.files)||void 0===pt?void 0:pt.length)?.4:1,transition:"opacity 0.15s ease"},onClick:e=>{var t;e.stopPropagation(),!(null==Ye?void 0:Ye.isLoading)&&(null===(t=null==Ye?void 0:Ye.files)||void 0===t?void 0:t.length)&&zl(e=>!e)}})})}),Ue&&(Zl?l(Z,{customIcons:null==Sl?void 0:Sl.userStoryIcons,customStyles:null==Ot?void 0:Ot.aiReasoningCitaionStyles,currentUserStory:Y,panelStyles:null==Ot?void 0:Ot.CompletionStyles,onToggleStateChange:_l,completionPanelConfig:ke,children:e("div",{style:{display:"inline-flex",alignItems:"center",gap:"4px",...null==Zt?void 0:Zt.badge,...nl},children:[e("span",{children:[Ql,"% Completed"]}),l("span",{style:{display:"flex",alignItems:"center"},children:l(J,{color:"currentColor"})}),l(Ll?a:r,{size:14,style:null==Zt?void 0:Zt.chevronStyle})]})}):l("div",{style:{display:"inline-flex",alignItems:"center",gap:"4px",...null==Zt?void 0:Zt.badge,...nl},children:e("span",{children:[Ql,"% Completed"]})})),Be&&l("button",{type:"button",className:k.titleEditButton,style:null==Ht?void 0:Ht.titleEditButton,onClick:e=>{e.stopPropagation(),cl(!0),Cl||Il(!0)},"aria-label":"Edit title",title:"Edit title",children:l("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:l("path",{d:"M8.99998 14.9992H15.75M2.25 14.9992H3.50591C3.87279 14.9992 4.05624 14.9992 4.22887 14.9577C4.38192 14.921 4.52824 14.8604 4.66245 14.7782C4.81382 14.6854 4.94354 14.5557 5.20296 14.2962L14.625 4.87419C15.2463 4.25287 15.2463 3.24551 14.625 2.62419C14.0037 2.00287 12.9963 2.00287 12.375 2.62419L2.95295 12.0462C2.69352 12.3057 2.5638 12.4354 2.47104 12.5868C2.3888 12.721 2.32819 12.8673 2.29145 13.0203C2.25 13.193 2.25 13.3764 2.25 13.7433V14.9992Z",stroke:"#94A3B8","stroke-width":"1.54286","stroke-linecap":"round","stroke-linejoin":"round"})})})]})]}),(xt||void 0!==Tt&&void 0!==Ut)&&e("div",{className:k.statusContainer,children:[void 0!==Tt&&void 0!==Ut&&e("div",{className:k.completedBadge,children:["Completed: ",Tt,"/",Ut]}),xt&&l("button",{type:"button",onClick:e=>{e.stopPropagation(),null==At||At()},onMouseEnter:()=>$l(!0),onMouseLeave:()=>$l(!1),className:k.statusButton,style:{...null===(mt=il[xt])||void 0===mt?void 0:mt.default,...Wl&&(null===(ht=il[xt])||void 0===ht?void 0:ht.hover)},children:le[xt]})]}),e("div",{className:k.titleActions,style:null==Ot?void 0:Ot.titleActions,onClick:e=>e.stopPropagation(),children:[(Kl.showProgressPercentage||Kl.showGapBox)&&Ce&&e("div",{className:k.progressHeader,style:null==Yt?void 0:Yt.wrapper,children:[Kl.showProgressPercentage&&e("div",{className:k.progressPercentage,style:null==Yt?void 0:Yt.percentage,children:[null!==(gt=null!==(yt=null==Y?void 0:Y.confidenceScore)&&void 0!==yt?yt:null==Kl?void 0:Kl.confidenceValue)&&void 0!==gt?gt:"0","%"]}),Kl.showGapBox&&e("div",{className:k.gapBox,style:null==Yt?void 0:Yt.gapBox,children:[null!==(St=null!==(ft=null==Y?void 0:Y.gapValue)&&void 0!==ft?ft:null==Kl?void 0:Kl.gapBoxValue)&&void 0!==St?St:"2"," ","Gaps"]})]}),Yl&&l(O,{customIcons:null==Sl?void 0:Sl.userStoryIcons,customStyles:null==Ot?void 0:Ot.aiReasoningCitaionStyles,currentUserStory:Y,panelStyles:null==Ot?void 0:Ot.BigEnoughStyles}),je&&l("button",{type:"button",className:k.iconButton,style:null==Ot?void 0:Ot.iconButton,disabled:Oe,onClick:e=>{e.stopPropagation(),null==Ve||Ve(Y)},"aria-label":"Assign section users",title:"Assign section users",children:l(d,{size:16})}),!rl.userStory&&e(t,{children:[!1!==(null==Kl?void 0:Kl.showShareButton)&&l("button",{className:k.iconButton,style:null==Ot?void 0:Ot.iconButton,onClick:e=>{El(e.currentTarget)},children:l(u,{size:16})}),e(x,{id:"user-story-share-menu",anchorEl:Nl,open:!!Nl,onClose:()=>El(null),style:null==Ot?void 0:Ot.userStoryShareMenu,children:[ue&&l(A,{style:null==Ot?void 0:Ot.userStoryMenuItem,onClick:async()=>{wl(!0),pe&&(await Promise.all([pe("pdf"),pe("doc")]),wl(!1))},children:e("div",{ref:Tl,className:k.menuItemContent,style:null==Ot?void 0:Ot.menuItemContent,children:[l(c,{size:16,color:null==Ot?void 0:Ot.menuIconColor}),l("p",{style:null==Ot?void 0:Ot.menuLabel,children:"Download"})]})}),l(A,{style:null==Ot?void 0:Ot.userStoryMenuItem,onClick:async()=>{let e=Y;q&&(e={...Y,value:`${L(null==q?void 0:q.value,Y.title)} \n${Y.value}`}),null==me||me(!0,[e],Y.artifactId),Vl()},children:e("div",{style:null==Ot?void 0:Ot.menuItemContent,className:k.menuItemContentPadded,children:[l(v,{size:16,color:null==Ot?void 0:Ot.menuIconColor}),l("p",{style:null==Ot?void 0:Ot.menuLabel,children:"Send"})]})}),l(A,{style:null==Ot?void 0:Ot.userStoryMenuItem,onClick:async()=>{const e=(new D.Converter).makeHtml(P(Y.value)||Y.value),t=function(e){const t=(new D.Converter).makeHtml(e),l=document.createElement("div");return l.innerHTML=t,l.textContent||l.innerText||""}(P(Y.value)||Y.value),l=new ClipboardItem({"text/plain":new Blob([t],{type:"text/plain"}),"text/html":new Blob([e],{type:"text/html"})});try{await navigator.clipboard.write([l]),console.log("Copied User Story")}catch(e){console.error("Failed to copy user story:",e)}finally{Vl()}},children:e("div",{style:null==Ot?void 0:Ot.menuItemContent,className:k.menuItemContentPadded,children:[l(p,{size:16,color:null==Ot?void 0:Ot.menuIconColor}),l("p",{style:null==Ot?void 0:Ot.menuLabel,children:"Copy"})]})})]})]}),!xl&&rl.userStory&&Cl?l(F,{type:"outline",children:"Cancel",style:null==Ot?void 0:Ot.cancelButton,onClick:()=>{var e;null===(e=Fl.current)||void 0===e||e.abort(),dl(e=>({...e,userStory:!1}))}}):l(t,{}),rl.userStory&&Cl?l(F,{type:"fill",children:xl?e("span",{className:k.savingSpinner,style:null==Ot?void 0:Ot.savingSpinner,children:[l(m,{className:k.spinAnimation,style:null==Ot?void 0:Ot.spinAnimation}),l("span",{children:"Saving..."})]}):"Save",isDisable:xl,style:xl?null==Ot?void 0:Ot.savingButton:null==Ot?void 0:Ot.saveButton,onClick:async()=>{Al(!0),await ql();let e=await(async()=>{var e,t,l,o,n,i,s,a;let r=sl.value;console.log("[V] valueToUpdate before",r),r=r.replace(/<invisible\s+id="([^"]+)"\s*><\/invisible>/gi,"\x3c!-- $1 --\x3e"),console.log("[V] valueToUpdate after",r);try{await(null==Ge?void 0:Ge(r,Y.artifactId))}catch(e){}try{if(null==Wt?void 0:Wt.callUpdateDocument){const{updated_reqai:d}=await H({documentId:Ft,sectionId:Y.artifactId,baseApiUrl:null==Wt?void 0:Wt.baseApiUrl,updatedContent:r,userEmail:Wt.userEmail,userName:Wt.userName,redlineConfigId:null!==(e=Wt.redlineConfigId)&&void 0!==e?e:""},null!==(t=null==Wt?void 0:Wt.token)&&void 0!==t?t:"");r=null===(n=null===(o=null===(l=null==d?void 0:d.artifactData)||void 0===l?void 0:l.userStorySnapshot)||void 0===o?void 0:o[0])||void 0===n?void 0:n.value,await(null==Mt?void 0:Mt(d));const u=null===(a=null===(s=null===(i=null==d?void 0:d.artifactData)||void 0===i?void 0:i.userStorySnapshot)||void 0===s?void 0:s[0])||void 0===a?void 0:a.artifactId;"string"==typeof u&&u.trim()&&"string"==typeof Ft&&Ft.trim()&&"string"==typeof(null==Wt?void 0:Wt.userName)&&(null==Wt?void 0:Wt.userName.trim())?K.emit(`redline-edit:${Ft}:${u}`,{updatedBy:null==Wt?void 0:Wt.userName}):console.error("invalid cwsEvent name or payload")}}catch(e){console.error("failed to update redline document",e),r=jl}return r=r.replace(/<!--\s*([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\s*-->/gi,'<invisible id="$1"></invisible>'),r})();const t={...sl,value:e};ae({...t,isDefaultEdit:!1}),Ol(t.value),dl(e=>({...e,userStory:!1})),Al(!1)}}):!eo&&!ce&&!ve&&!Re&&Cl&&!1!==(null==Kl?void 0:Kl.showEditButton)&&l("button",{className:k.iconButton,style:null==Ot?void 0:Ot.editButton,onClick:()=>dl(e=>({...e,userStory:!0})),children:l(h,{color:null==Ot?void 0:Ot.pencilIconColor,size:16})}),(null==jt?void 0:jt.initiateCollaborativeFlow)&&!!eo&&l(B,{title:"Fetch latest section",children:l(y,{color:lo?"#d3d3d3":"black",onClick:no})}),Pe&&Jl&&Cl&&!ce&&!ve&&!1!==(null==Kl?void 0:Kl.showEditButton)&&e("button",{type:"button",className:k.addSectionButton,style:null==Ht?void 0:Ht.addSectionButton,onClick:e=>{var t,l,o;e.stopPropagation();const n=(null!==(l=null===(t=Y.sub_features)||void 0===t?void 0:t.length)&&void 0!==l?l:0)+1,i={artifactId:U(),title:`New Section ${n}`,value:"Please add details for this section.",section:"subfeature",isDefaultOpen:!0},s={...Y,sub_features:[...null!==(o=Y.sub_features)&&void 0!==o?o:[],i]};al(s),ae(s),Il(!0),gl(i.title)},"aria-label":"Add section",title:"Add section",children:[l(g,{size:14}),l("span",{className:k.addSectionLabel,children:"Add Section"})]}),!Jl&&!ce&&!Re&&!ve&&l("button",{type:"button",onClick:e=>{e.stopPropagation(),null==we||we()},className:k.iconButton,style:null==Ht?void 0:Ht.deleteButton,"aria-label":"Delete section",title:"Delete section",children:l(f,{size:16})}),Xt&&l("button",{type:"button",className:k.iconButton,style:null==Vt?void 0:Vt.button,disabled:ll,onClick:e=>{if(e.stopPropagation(),vl)return hl(null),void pl(!1);hl(structuredClone(null!=el?el:{})),Il(!0),pl(!0)},children:vl?l(S,{size:16,color:null==Ot?void 0:Ot.pencilIconColor,style:null==Vt?void 0:Vt.cancelIcon}):l(h,{size:16,color:null==Ot?void 0:Ot.pencilIconColor,style:null==Vt?void 0:Vt.editIcon})}),(null==Kl?void 0:Kl.actionItemsButton)&&e(t,{children:[l("span",{className:k.actionItemBtn,style:null==Ot?void 0:Ot.actionItemBtn,onClick:e=>{e.stopPropagation(),Bl(e.currentTarget)},children:l(C,{})}),l(x,{id:"user-story-action-menu",anchorEl:Dl,open:!!Dl,onClose:Gl,style:null==Ot?void 0:Ot.userStoryShareMenu,children:null==be?void 0:be.items.map((t,o)=>l(A,{style:null==Ot?void 0:Ot.userStoryMenuItem,onClick:()=>{t.onclick(Y),Gl()},children:e("div",{className:k.menuItemContent,style:{...null==Ot?void 0:Ot.menuItemContent,...!t.isActive&&{cursor:"not-allowed",opacity:.5}},children:[l("span",{className:k.menuItemIcon,style:null==Ot?void 0:Ot.menuItemIcon,children:t.icon}),l("p",{style:null==Ot?void 0:Ot.menuLabel,children:t.name}),l("span",{className:k.menuItemRight,style:null==Ot?void 0:Ot.menuItemRight})]})},`action-item-${o}-${t.name}`))})]}),l("button",{type:"button",onClick:e=>{e.stopPropagation(),Hl()},style:null==Ot?void 0:Ot.chevronButton,className:k.chevronButton,children:l(Cl?a:r,{className:k.chevronIcon,color:null==Ot?void 0:Ot.chevronIconColor})})]})]}),l("div",{className:k.divider,style:null==Ot?void 0:Ot.dividerStyle})]}),Cl&&l("div",{className:k.cardContent,style:{...null==Ot?void 0:Ot.cardContentStyle,borderTop:Ae?"1px solid #E5E5E5":"none"},children:e("div",Dt?{className:k.loadingContainer,children:[l("div",{className:k.loadingIconWrapper,children:l(I,{size:28,color:"#5B3DF5",className:k.spinAnimation})}),e("div",{children:[l("h3",{className:k.loadingTitle,children:"Section generation in progress.."}),l("p",{className:k.loadingSubtitle,children:"This may take a few minutes"})]}),l("button",{type:"button",onClick:()=>null==Bt?void 0:Bt(),className:k.viewStatusButton,children:"View Status"})]}:kt?{className:k.noDataContainer,style:null==Jt?void 0:Jt.container,children:[l("img",{src:T,alt:"No data available",className:k.noDataIllustration,style:null==Jt?void 0:Jt.illustration}),l("h3",{className:k.noDataTitle,style:null==Jt?void 0:Jt.title,children:"No Data Available for This Section"}),l("p",{className:k.noDataSubtitle,style:null==Jt?void 0:Jt.subtitle,children:"We couldn't find data for this section yet. Upload the required document from the Documents tab to generate content."})]}:{className:k.contentInner,style:null==Ot?void 0:Ot.contentInner,children:[e("div",{className:k.descriptionSection,style:null==Ot?void 0:Ot.descriptionSection,children:[l("div",{className:k.justifyBetween,style:null==Ot?void 0:Ot.justifyBetween}),rl.userStory?l(W,{ref:kl,minHeight:"100%",height:"100%",type:"string",value:P(jl)||"",handleUpdateState:(e,t)=>{const l=_(R(t));al(e=>({...e,value:l||""}))},doNotShowBorderInViewMode:!1,onBlur:()=>{},mode:rl.userStory?"edit":"readOnly",onEditBlocked:_t,onSaveUnsavedChanges:async()=>{await ql(),Il(!1)},onDiscardUnsavedChanges:()=>{al({...structuredClone(Y),value:P(Y.value)||""}),dl(e=>({...e,userStory:!1})),Il(!1)},isSavingUnsavedChanges:xl}):Xt?l(Q,{styles:Qt,fields:tl,readonly:!vl,isSaving:ol,value:null!==(Ct=null!=ml?ml:el)&&void 0!==Ct?Ct:{},onChange:hl,onSave:async()=>{var e;ml&&(await(null===(e=null==$t?void 0:$t.onSave)||void 0===e?void 0:e.call($t,Y,ml)),hl(null),pl(!1))},onCancel:()=>{hl(null),pl(!1)}}):e(t,{children:[l($,{showUserStoryDiff:ve,isParent:""===re,message:P(Y.value)||"",artifactId:Y.artifactId,customStyles:qt,isDisplayHighlightControl:ge,contextVariant:Ne,showConfidenceScore:xe,CDNeededInChip:We,blockId:$e,storyId:Me,showWaitingIconInChip:ze}),(_e||Fe)&&e("div",{className:k.actionButtonsContainer,style:null==Kt?void 0:Kt.container,children:[Fe&&!rl.userStory&&e(t,{children:[l("button",{type:"button",className:k.actionButton,style:null==Kt?void 0:Kt.button,disabled:Fe.disabled||Fe.isLoading,onClick:e=>{var t;e.stopPropagation(),null===(t=Fe.onClick)||void 0===t||t.call(Fe),dl(e=>({...e,userStory:!0})),Il(!0)},children:Fe.isLoading?e(t,{children:[l(m,{size:16,className:k.actionButtonSpinner,style:null==Kt?void 0:Kt.icon}),l("span",{style:null==Kt?void 0:Kt.text,children:null!==(It=Fe.label)&&void 0!==It?It:"Edit"})]}):e(t,{children:[l(h,{size:16,style:null==Kt?void 0:Kt.icon}),l("span",{style:null==Kt?void 0:Kt.text,children:null!==(bt=Fe.label)&&void 0!==bt?bt:"Edit"})]})}),_e&&l("span",{className:k.actionButtonDivider})]}),_e&&l("button",{type:"button",className:k.actionButton,style:null==Kt?void 0:Kt.button,disabled:_e.disabled||_e.isLoading,onClick:e=>{var t;e.stopPropagation(),null===(t=_e.onClick)||void 0===t||t.call(_e)},children:_e.isLoading?e(t,{children:[l(m,{size:16,className:k.actionButtonSpinner,style:null==Kt?void 0:Kt.icon}),l("span",{style:null==Kt?void 0:Kt.text,children:null!==(wt=_e.label)&&void 0!==wt?wt:"Approve"})]}):e(t,{children:[l(b,{size:16,style:null==Kt?void 0:Kt.icon}),l("span",{style:null==Kt?void 0:Kt.text,children:null!==(Nt=_e.label)&&void 0!==Nt?Nt:"Approve"})]})})]})]})]}),null===(Et=sl.sub_features)||void 0===Et?void 0:Et.map((e,t)=>{console.log("UserStoryCardWrapper: sub",e);const o=ne(fe,!1,e.artifactId);return l(se,{artifactId:N,isUserStoryCurrentlyUpdated:w,artifactTitleId:`${E}-${String.fromCharCode(65+t)}`,parentUserStory:Y,parentIndex:`${re}${re&&"."}${de}`,currentIndex:`${t+1}`,doNotShowBorderInViewMode:!1,currentUserStory:e,onUserStoryChange:e=>((e,t)=>{const l=[...Y.sub_features||[]];l[e]=t,ae({...Y,sub_features:l})})(t,e),enableDownload:!0,isDiffEditReviewMode:ce,showUserStoryDiff:ve,updateUserStoryArtifact:he,handleDownloadUserStory:pe,handleOpenSendDialog:me,isDisplayHighlightControl:ge,elementDisplayConfig:fe,_resolvedConfig:o,actionItemsConfig:be,onDelete:()=>(e=>{const t=(Y.sub_features||[]).filter((t,l)=>l!==e),l={...Y,sub_features:t};al(l),ae(l)})(t),expandedSubFeatures:Ee,disableEditPlan:Re,useMuiTooltip:Le,storyNumber:e.storyNumber,blockNumber:e.blockNumber,onUserStoryAccordionStateChange:He,showAssignSection:je,onAssignSectionClick:Ve,onSave:Ge},e.artifactId)})]})})]})},ae=({artifactTitleIDs:o,expandedSubFeatures:n,isDiffEditReviewMode:s,showUserStoryDiff:a,updateUserStoryArtifact:r,isUserStoryCurrentlyUpdated:d,artifactId:u,handleOpenSendDialog:c,handleDownloadUserStory:v,selectedArtifactId:p,isDisplayHighlightControl:m,elementDisplayConfig:h,showWrapper:y,actionItemsConfig:g,contextVariant:f,showDisplayName:S,allowTitleEdit:C,showConfidenceScore:I,showBorderTop:b,defaultExpanded:E,showCompletionPanel:D=!1,completionPanelConfig:B,showAddSectionButton:x=!1,disableEditPlan:A=!1,useMuiTooltip:T=!1,approveButtonConfig:U,editButtonConfig:P,CDNeededInChip:R,showWaitingIconInChip:L,setRedlineDocumentIdParent:_,showAssignSection:F,onAssignSectionClick:W,disableAssignSection:$,onSave:M,onUserStoryAccordionStateChange:j,showSuggestedFilesInfo:O,suggestedFilesConfig:V})=>{const{userStory:G,setUserStory:H,customStyles:Q,searchQueryList:Z,currentHighlightIndex:J,setCurrentHighlightIndex:K,segmentComponentConfig:X,sectionStatusConfig:ee,redlineConfig:te,setRedlineDocumentId:le}=z(),oe=null==Q?void 0:Q.userStoryCardStyles,ie=0===J,ae=J===Z.length-1;return i(()=>{if(!(null==te?void 0:te.callCreateDocumentOnInit))return;(async()=>{var e;const{redline_document_id:t}=await q({baseApiUrl:te.documentBaseApiUrl||"",comparisonId:te.documentComparisonId||""});if(t)le(t);else{const{document_id:t}=await Y({baseApiUrl:te.baseApiUrl,changelogConfigId:te.changelogConfigId,comparisonId:te.documentComparisonId,artifactId:te.artifactId,inputData:te.inputData,redlineConfigId:te.redlineConfigId,userEmail:te.userEmail,userName:te.userName},null!==(e=null==te?void 0:te.token)&&void 0!==e?e:"");t&&(le(t),null==_||_(t))}})()},[]),e("div",{className:k.userStoryCardWrapper,style:m?{...null==oe?void 0:oe.userStoryCardWrapper,position:"relative"}:null==oe?void 0:oe.userStoryCardWrapper,children:[m&&l(t,{children:Z.length>0&&l("div",{className:k.wrapper,children:l("div",{className:k.highlightNavigation,children:e("div",{className:k.navigationContainer,children:[e("span",{className:k.navCounter,children:[J+1," of ",Z.length]}),e("div",{className:k.navButtons,children:[l("button",{onClick:()=>{J>0&&K(e=>e-1)},className:k.navButton,disabled:ie,children:l(w,{size:20,className:k.navIcon})}),l("button",{onClick:()=>{J<Z.length-1&&K(e=>e+1)},className:k.navButton,disabled:ae,children:l(N,{size:20,className:k.navIcon})})]})]})})})}),G.map((e,t)=>{console.log("UserStoryCardWrapper: userstory",e);const i=ne(h,!0);return l(se,{isUserStoryCurrentlyUpdated:d,artifactId:u,artifactTitleId:o[t]||"",expandedSubFeatures:n,currentUserStory:e,onUserStoryChange:e=>{H(l=>(l[t]=e,[...l]))},parentIndex:"",currentIndex:`${t+1}`,doNotShowBorderInViewMode:!0,enableDownload:!0,isDiffEditReviewMode:s,showUserStoryDiff:a,updateUserStoryArtifact:r,handleOpenSendDialog:c,handleDownloadUserStory:v,selectedArtifactId:p,isDisplayHighlightControl:m,elementDisplayConfig:h,_resolvedConfig:i,showWrapper:y,defaultExpanded:E,actionItemsConfig:g,contextVariant:f,showDisplayName:S,allowTitleEdit:C,showConfidenceScore:I,showBorderTop:b,sectionStatusConfig:ee,showCompletionPanel:D,completionPanelConfig:B,showAddSectionButton:x,disableEditPlan:A,useMuiTooltip:T,approveButtonConfig:U,CDNeededInChip:R,editButtonConfig:P,storyNumber:e.storyNumber,blockNumber:e.blockNumber,onUserStoryAccordionStateChange:j,showSuggestedFilesInfo:O,suggestedFilesConfig:V,showWaitingIconInChip:L,showAssignSection:F,disableAssignSection:$,onAssignSectionClick:W,onSave:M},e.artifactId)})]})};export{se as StoryCard,ae as UserStoryCardWrapper,se as default,oe as replaceLearnedTagsWithInfo};
|
|
2
2
|
//# sourceMappingURL=UserStoryCard.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";const
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";const o=()=>e("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#475467",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e("path",{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"})}),t=()=>e("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#475467",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e("path",{d:"M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"})});export{t as DefaultFullScreenCloseIcon,o as DefaultFullScreenIcon};
|
|
2
2
|
//# sourceMappingURL=PdfViewerIcons.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as e,jsx as
|
|
1
|
+
import{jsxs as e,jsx as l,Fragment as n}from"react/jsx-runtime";import{ChevronUp as i,ChevronDown as t,ExternalLink as a}from"lucide-react";import{useState as r}from"react";import s from"./AiReasonAccoridon.module.css.js";function o({icon:o,title:d,content:c,subTitle:m,scenario:p,className:u="",customStyles:h,alwaysOpen:v=!1,defaultOpen:y=!0,isSegmentExplanation:B=!1,handleViewExample:N,handleViewGlossary:x,isUpdatedSegment:$}){const[f,k]=r(y);return e("div",{className:`${"riskSideBar"!==p&&s.wrapperBorder} ${s.wrapper} ${u}`,style:null==h?void 0:h.wrapper,children:[e("div",{className:`${s.header} ${"riskSideBar"===p?s.headerPaddingRisk:s.headerPadding}`,style:null==h?void 0:h.header,onClick:()=>{v||k(!f)},children:[e("div",{className:s.headerLeft,style:null==h?void 0:h.iconWrapper,children:[o,e("div",{className:s.titleBlock,children:[l("h1",{className:s.title,style:null==h?void 0:h.title,children:d}),l("p",{className:s.subTitle,style:null==h?void 0:h.subTitle,children:m})]})]}),"riskSideBar"!==p&&!v&&l("div",{className:s.chevronWrapper,style:null==h?void 0:h.chevronWrapper,children:l(f?i:t,{className:s.chevronIcon})})]}),f&&e("div",{className:`${"riskSideBar"!==p&&s.content} ${s.contentBase}`,style:{...null==h?void 0:h.contentContainerWrapper},children:[l("div",{style:null==h?void 0:h.contentWrapper,children:c}),(N||x)&&B&&e("div",{className:`${s.segmentExplanationButtonContainer} flex-row`,style:{...null==h?void 0:h.segmentExplanationButtonContainer},children:[N&&l("button",{className:`${s.segmentButton}`,onClick:()=>null==N?void 0:N(),style:{...null==h?void 0:h.explanationButton},children:"Show Example"}),x&&l("button",{className:`${s.segmentButton}`,onClick:()=>null==x?void 0:x(),style:{...null==h?void 0:h.explanationButton},children:!$&&e(n,{children:["View in Glossary ",l(a,{size:14})]})})]})]})]})}export{o as default};
|
|
2
2
|
//# sourceMappingURL=AIReasonAccordion.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__rest as i}from"tslib";import{jsx as t,Fragment as o,jsxs as n}from"react/jsx-runtime";import{useRef as e,useMemo as a,Suspense as l}from"react";import c from"react-markdown";import d from"rehype-raw";import{ChevronDown as s,ChevronUp as r,Maximize2 as u,X as m,Info as v}from"lucide-react";import{Tooltip as p}from"@mui/material";import g from"./AiReasonMarkdownWrapper.module.css.js";import h from"../../shared/ExpandableOl.js";import _ from"../citations/web-citation/WebCitationWithImageRenderer.js";import b from"../citations/web-citation/WebCitationRenderer.js";import f from"../citations/image-citation/ImageCitationRenderer.js";import C from"../citations/file-citation/FileCitationRender.js";import{useRequirementAI as j}from"../RequirementAIWrapper/RequirementAIWrapper.js";import y from"../citations/stormee-citation/StormeeCitationRenderer.js";import O from"../citations/audio-citation/WaveformCitationRenderer.js";import I from"../citations/appmod-citation/AppmodCitationRenderer.js";import k from"../citations/rca-citation/RCACitationRenderer.js";import S from"../citations/readfile-citation/ReadFileCitationRenderer.js";import w from"../citations/chat-citation/ChatCitationRenderer.js";import{NonWebReasoningComponent as M}from"@e-llm-studio/citation";import N from"../citations/big-enough/BigEnoughCitationRenderer.js";import R from"./ScannedCitationRenderer.js";import F from"../citations/gpt-web-citation/GptWebCitationRenderer.js";const $=["appmode_citation","appmode_citations","appmod_citation","appmod_citations","image_citation","image_citations","audio_citation","audio_citations","document_citation","document_citations","rca_citation","rca_citations","web_citation","web_citations","code_generated","chat_citation","readfile_citation","readfile_citations","gpt_citation","gpt_citations","big_enough_block","scanned_doc_citation","scanned_doc_citations"],x=(i,t,o)=>{const n=Number.isFinite(t)&&Number.isFinite(o);return[...i.map((i,e)=>{const a=e>=t&&e<=o;return Object.assign(Object.assign({},i),{highlighted_text:n?a?i.message:"":i.highlighted_text})})]},W=({label:W,message:L,isExpandableOrderedListEnabled:P,customStyles:T,citationStyles:A,customIcons:E,onSelectProceed:D,isDisableProceedButton:G,big_enough_block:H})=>{const q=e(null),{citations:z,citationConfig:B,chatHistory:U,chatCitationConfigs:V,gptCitationConfigs:J}=j();console.log("Testing::Citations in Lib",z);const K=a(()=>({h1:o=>{var n=i(o,["node"]);return t("h1",Object.assign({className:g.h1,style:null==T?void 0:T.h1},{children:null==n?void 0:n.children}))},h2:o=>{var n=i(o,["node"]);return t("h2",Object.assign({className:g.h2,style:null==T?void 0:T.h2},{children:null==n?void 0:n.children}))},h3:o=>{var n=i(o,["node"]);return t("h2",Object.assign({className:g.h3,style:null==T?void 0:T.h3},{children:null==n?void 0:n.children}))},b:o=>(i(o,["node"]),t("b",{className:g.bold,style:null==T?void 0:T.b})),p:o=>{var n=i(o,["node"]);return t("p",Object.assign({},n,{className:g.paragraph,style:null==T?void 0:T.p},{children:null==n?void 0:n.children}))},ol:o=>{var n=i(o,["node"]);return P?t(h,Object.assign({label:W,customStyles:null==T?void 0:T.expandOlStyle,onProceed:D,isProceedDisabled:G,aiReasoningCitation:z,citationStyles:A,customIcons:E},{children:null==n?void 0:n.children})):t("ol",Object.assign({className:g.orderedList,style:null==T?void 0:T.ol},{children:null==n?void 0:n.children}))},ul:o=>{var n=i(o,["node"]);return t("ul",Object.assign({className:g.unorderedList},{children:null==n?void 0:n.children}))},a:e=>{var a,c,d,v,h,j,W,P,D,G,q,K,Q,X,Y,Z,ii,ti,oi,ni,ei,ai,li,ci,di,si,ri,ui,mi,{inline:vi,children:pi,node:gi}=e,hi=i(e,["inline","children","node"]);const _i="true"===(null==hi?void 0:hi.table),bi=`${null==hi?void 0:hi.href}`,fi=null===(a=bi.split("$"))||void 0===a?void 0:a[0],Ci=null===(c=bi.split("$"))||void 0===c?void 0:c[1],ji=("appmode_citation"===fi||"appmode_citations"===fi?(null==z?void 0:z.appmod_citations)||[]:"image_citation"===fi||"image_citations"===fi?(null==z?void 0:z.image_citations)||[]:"audio_citation"===fi||"audio_citations"===fi?(null==z?void 0:z.audio_citations)||[]:"document_citation"===fi||"document_citations"===fi?(null==z?void 0:z.file_citations)||[]:"rca_citation"===fi||"rca_citations"===fi?(null==z?void 0:z.rca_citations)||[]:"web_citation"===fi||"web_citations"===fi?(null==z?void 0:z.web_citations)||[]:"code_generated"===fi?(null==z?void 0:z.code_generated)||[]:"readfile_citation"===fi||"readfile_citations"===fi?(null==z?void 0:z.readfile_citations)||[]:"gpt_citation"===fi||"gpt_citations"===fi?(null==z?void 0:z.gpt_citations)||[]:"scanned_doc_citation"===fi||"scanned_doc_citations"===fi?(null==z?void 0:z.scanned_doc_citations)||[]:"big_enough_block"===fi&&H||[]).find(i=>i.citation_number===decodeURIComponent(Ci));console.log("TESTING::citation",ji);const yi=$.includes(fi);if("big_enough_block"===fi&&ji)return console.log("Rendering big enough block with citation:",A),t(N,{title:pi,citation:ji,customStyles:null==A?void 0:A.bigEnoughCitation,customIcons:E});if("chat_citation"===fi){if(!U||0===U.length)return null;let i=0,o=U.length-1;if("all"!==Ci){const[t,n]=Ci.split("-").map(Number);i=Number.isFinite(t)?t:0,o=Number.isFinite(n)?n:i,i=i>0?i-1:i,o=o<U.length-1?o+1:o}return t(w,{customIcon:null==E?void 0:E.chatCitationIcon,title:pi,chatHistory:x(U,i,o),isTable:_i,chatCitationProps:null==V?void 0:V.chatCitationProps,onCitationClick:null==V?void 0:V.handleCitationClicked,customStyles:null==A?void 0:A.chatCitation,openInFullscreenOnClick:null==V?void 0:V.openInFullscreenOnClick})}if(("gpt_citation"===fi||"gpt_citations"===fi)&&ji)return(null===(d=null==ji?void 0:ji.customMetadata)||void 0===d?void 0:d.value)?t(F,{title:pi,citation:ji,customStyles:null==A?void 0:A.webCitation,customIcons:E,content:L}):t(M,Object.assign({item:{text:"",dataSource:null===(h=null===(v=ji.customMetadata)||void 0===v?void 0:v.data_sources)||void 0===h?void 0:h[0],trainingDataTitle:null===(W=null===(j=ji.customMetadata)||void 0===j?void 0:j.training_data_title)||void 0===W?void 0:W[0],paraphrase:null===(D=null===(P=ji.customMetadata)||void 0===P?void 0:P.paraphrase)||void 0===D?void 0:D[0]},headerTitle:(null==J?void 0:J.title)||"GPT - Gemini 2.5 Flash",iconsConfig:{ChevronDownIcon:s,ChevronUpIcon:r,MaximizeIcon:u,CloseIcon:m}},null==J?void 0:J.gptCitationProps));if("image_citation"===fi&&!ji)return null;if("web_citation"===(null===(G=null==ji?void 0:ji.customMetadata)||void 0===G?void 0:G.type))return(null===(q=ji.customMetadata)||void 0===q?void 0:q.screenshot_url)?t(_,{title:pi,citation:ji,customStyles:null==A?void 0:A.webCitation,customIcons:E}):t(b,{label:pi,url:null===(K=ji.customMetadata)||void 0===K?void 0:K.link,customStyles:null==A?void 0:A.webCitation,customIcons:E});if("audio_transcript"===(null===(Q=null==ji?void 0:ji.customMetadata)||void 0===Q?void 0:Q.type))return"stormee"===(null==ji?void 0:ji.customMetadata.audio_citation_mode)?t(l,Object.assign({fallback:t(o,{})},{children:t(y,{title:`${pi}`,citation:ji,customStyles:null==A?void 0:A.stormeeCitation,customIcons:E})})):t(l,Object.assign({fallback:t(o,{})},{children:t(O,{title:`${pi}`,citation:ji,customStyles:null==A?void 0:A.waveformCitation,customIcons:E})}));if("scanned_doc_citations"===(null===(X=null==ji?void 0:ji.customMetadata)||void 0===X?void 0:X.type)||"scanned_doc_citation"===(null===(Y=null==ji?void 0:ji.customMetadata)||void 0===Y?void 0:Y.type))return t(l,Object.assign({fallback:t(o,{})},{children:t(R,{title:pi,citation:ji,customIcons:E,customStyles:null==A?void 0:A.scannedDocumentCitation,pdfViewHeaderAction:null==B?void 0:B.pdfViewHeaderAction})}));if("image_citation"===(null==ji?void 0:ji.customMetadata.type))return t(l,Object.assign({fallback:t(o,{})},{children:t(f,{title:`${pi}`,citation:ji,customIcons:E,customStyles:null==A?void 0:A.imageCitation})}));if("book_citation_doc"===(null===(Z=null==ji?void 0:ji.customMetadata)||void 0===Z?void 0:Z.type)||"book_citation_pdf"===(null==ji?void 0:ji.customMetadata.type))return t(l,Object.assign({fallback:t(o,{})},{children:t(C,{title:`${pi}`,citation:ji,customIcons:E,customStyles:null==A?void 0:A.fileCitation})}));if("app_mod_rag_question"===(null===(ii=null==ji?void 0:ji.customMetadata)||void 0===ii?void 0:ii.type))return t(l,Object.assign({fallback:t(o,{})},{children:t(I,{title:`${pi}`,citation:ji,customIcons:E,customStyles:null==A?void 0:A.appModCitation,codeLinkConfig:null===(ti=null==B?void 0:B.appMod)||void 0===ti?void 0:ti.codeLinkConfig,isLoading:null===(oi=null==B?void 0:B.appMod)||void 0===oi?void 0:oi.isLoading})}));if("rca_citation"===(null===(ni=null==ji?void 0:ji.customMetadata)||void 0===ni?void 0:ni.type))return t(l,Object.assign({fallback:t(o,{})},{children:t(k,{title:`${pi}`,citation:ji,customIcons:E,customStyles:null==A?void 0:A.rcaCitation})}));if("readfile_citation"===(null===(ei=null==ji?void 0:ji.customMetadata)||void 0===ei?void 0:ei.type))return t(l,Object.assign({fallback:t(o,{})},{children:t(S,{title:`${pi}`,citation:ji,customIcons:E,customStyles:null==A?void 0:A.readFileCitation,fileCallback:null===(ai=null==B?void 0:B.readFile)||void 0===ai?void 0:ai.fileCallback,editorConfig:null===(li=null==B?void 0:B.readFile)||void 0===li?void 0:li.editorConfig,customColors:null===(ci=null==B?void 0:B.readFile)||void 0===ci?void 0:ci.customColors})}));if(yi&&!ji){const i=null!==(di=null==E?void 0:E.citationLoadingIcon)&&void 0!==di?di:t("span",{className:g.citationSpinner,style:null===(si=null==A?void 0:A.loadingCitations)||void 0===si?void 0:si.citationSpinner});return t(p,Object.assign({title:null!==(ui=null===(ri=null==A?void 0:A.loadingCitations)||void 0===ri?void 0:ri.tooltipTitle)&&void 0!==ui?ui:`source ${fi.split("_")[0]} citations`,arrow:!0},{children:n("span",Object.assign({className:g.citationSpinnerWrapper,style:null===(mi=null==A?void 0:A.loadingCitations)||void 0===mi?void 0:mi.citationSpinnerWrapper},{children:[pi,i]}))}))}return t("span",Object.assign({},hi,{className:g.paragraph,style:null==T?void 0:T.p},{children:null==hi?void 0:hi.children}))},code:o=>{var{inline:n,children:e,className:a,node:l}=o;i(o,["inline","children","className","node"]);return/language-(\w+)/.exec(a||"")||(null==a?void 0:a.includes("language-"))?t("div",{children:t("code",Object.assign({className:g.blockCode},{children:e}))}):t("code",Object.assign({className:g.inlineCode,style:null==T?void 0:T.code},{children:e}))},learned:({children:i})=>t(o,{children:t(p,Object.assign({title:i,placement:"top"},{children:t(v,{size:16,className:g.learnedIcon})}))})}),[z,P,B,U,H]);return t("div",Object.assign({ref:q,className:"w-full"},{children:t(c,Object.assign({components:K,rehypePlugins:[d]},{children:L}))}))};export{W as AiReasonMarkdownWrapper,x as formatChatData};
|
|
1
|
+
import{jsx as i,Fragment as t,jsxs as o}from"react/jsx-runtime";import{useRef as n,useMemo as e,Suspense as l}from"react";import a from"react-markdown";import c from"rehype-raw";import{ChevronDown as d,ChevronUp as s,Maximize2 as r,X as u,Info as m}from"lucide-react";import{Tooltip as v}from"@mui/material";import p from"./AiReasonMarkdownWrapper.module.css.js";import _ from"../../shared/ExpandableOl.js";import h from"../citations/web-citation/WebCitationWithImageRenderer.js";import g from"../citations/web-citation/WebCitationRenderer.js";import f from"../citations/image-citation/ImageCitationRenderer.js";import C from"../citations/file-citation/FileCitationRender.js";import{useRequirementAI as b}from"../RequirementAIWrapper/RequirementAIWrapper.js";import y from"../citations/stormee-citation/StormeeCitationRenderer.js";import I from"../citations/audio-citation/WaveformCitationRenderer.js";import k from"../citations/appmod-citation/AppmodCitationRenderer.js";import S from"../citations/rca-citation/RCACitationRenderer.js";import w from"../citations/readfile-citation/ReadFileCitationRenderer.js";import M from"../citations/chat-citation/ChatCitationRenderer.js";import{NonWebReasoningComponent as N}from"@e-llm-studio/citation";import R from"../citations/big-enough/BigEnoughCitationRenderer.js";import j from"./ScannedCitationRenderer.js";import F from"../citations/gpt-web-citation/GptWebCitationRenderer.js";const $=["appmode_citation","appmode_citations","appmod_citation","appmod_citations","image_citation","image_citations","audio_citation","audio_citations","document_citation","document_citations","rca_citation","rca_citations","web_citation","web_citations","code_generated","chat_citation","readfile_citation","readfile_citations","gpt_citation","gpt_citations","big_enough_block","scanned_doc_citation","scanned_doc_citations"],x=(i,t,o)=>{const n=Number.isFinite(t)&&Number.isFinite(o);return[...i.map((i,e)=>{const l=e>=t&&e<=o;return{...i,highlighted_text:n?l?i.message:"":i.highlighted_text}})]},W=({label:W,message:L,isExpandableOrderedListEnabled:P,customStyles:T,citationStyles:A,customIcons:E,onSelectProceed:D,isDisableProceedButton:O,big_enough_block:G})=>{const H=n(null),{citations:q,citationConfig:z,chatHistory:B,chatCitationConfigs:U,gptCitationConfigs:V}=b();console.log("Testing::Citations in Lib",q);const J=e(()=>({h1:({node:t,...o})=>i("h1",{className:p.h1,style:null==T?void 0:T.h1,children:null==o?void 0:o.children}),h2:({node:t,...o})=>i("h2",{className:p.h2,style:null==T?void 0:T.h2,children:null==o?void 0:o.children}),h3:({node:t,...o})=>i("h2",{className:p.h3,style:null==T?void 0:T.h3,children:null==o?void 0:o.children}),b:({node:t,...o})=>i("b",{className:p.bold,style:null==T?void 0:T.b}),p:({node:t,...o})=>i("p",{...o,className:p.paragraph,style:null==T?void 0:T.p,children:null==o?void 0:o.children}),ol:({node:t,...o})=>P?i(_,{label:W,customStyles:null==T?void 0:T.expandOlStyle,onProceed:D,isProceedDisabled:O,aiReasoningCitation:q,citationStyles:A,customIcons:E,children:null==o?void 0:o.children}):i("ol",{className:p.orderedList,style:null==T?void 0:T.ol,children:null==o?void 0:o.children}),ul:({node:t,...o})=>i("ul",{className:p.unorderedList,children:null==o?void 0:o.children}),a:({inline:n,children:e,node:a,...c})=>{var m,_,b,W,P,D,O,H,J,K,Q,X,Y,Z,ii,ti,oi,ni,ei,li,ai,ci,di,si,ri,ui,mi,vi,pi;const _i="true"===(null==c?void 0:c.table),hi=`${null==c?void 0:c.href}`,gi=null===(m=hi.split("$"))||void 0===m?void 0:m[0],fi=null===(_=hi.split("$"))||void 0===_?void 0:_[1],Ci=("appmode_citation"===gi||"appmode_citations"===gi?(null==q?void 0:q.appmod_citations)||[]:"image_citation"===gi||"image_citations"===gi?(null==q?void 0:q.image_citations)||[]:"audio_citation"===gi||"audio_citations"===gi?(null==q?void 0:q.audio_citations)||[]:"document_citation"===gi||"document_citations"===gi?(null==q?void 0:q.file_citations)||[]:"rca_citation"===gi||"rca_citations"===gi?(null==q?void 0:q.rca_citations)||[]:"web_citation"===gi||"web_citations"===gi?(null==q?void 0:q.web_citations)||[]:"code_generated"===gi?(null==q?void 0:q.code_generated)||[]:"readfile_citation"===gi||"readfile_citations"===gi?(null==q?void 0:q.readfile_citations)||[]:"gpt_citation"===gi||"gpt_citations"===gi?(null==q?void 0:q.gpt_citations)||[]:"scanned_doc_citation"===gi||"scanned_doc_citations"===gi?(null==q?void 0:q.scanned_doc_citations)||[]:"big_enough_block"===gi&&G||[]).find(i=>i.citation_number===decodeURIComponent(fi));console.log("TESTING::citation",Ci);const bi=$.includes(gi);if("big_enough_block"===gi&&Ci)return console.log("Rendering big enough block with citation:",A),i(R,{title:e,citation:Ci,customStyles:null==A?void 0:A.bigEnoughCitation,customIcons:E});if("chat_citation"===gi){if(!B||0===B.length)return null;let t=0,o=B.length-1;if("all"!==fi){const[i,n]=fi.split("-").map(Number);t=Number.isFinite(i)?i:0,o=Number.isFinite(n)?n:t,t=t>0?t-1:t,o=o<B.length-1?o+1:o}return i(M,{customIcon:null==E?void 0:E.chatCitationIcon,title:e,chatHistory:x(B,t,o),isTable:_i,chatCitationProps:null==U?void 0:U.chatCitationProps,onCitationClick:null==U?void 0:U.handleCitationClicked,customStyles:null==A?void 0:A.chatCitation,openInFullscreenOnClick:null==U?void 0:U.openInFullscreenOnClick})}if(("gpt_citation"===gi||"gpt_citations"===gi)&&Ci)return(null===(b=null==Ci?void 0:Ci.customMetadata)||void 0===b?void 0:b.value)?i(F,{title:e,citation:Ci,customStyles:null==A?void 0:A.webCitation,customIcons:E,content:L}):i(N,{item:{text:"",dataSource:null===(P=null===(W=Ci.customMetadata)||void 0===W?void 0:W.data_sources)||void 0===P?void 0:P[0],trainingDataTitle:null===(O=null===(D=Ci.customMetadata)||void 0===D?void 0:D.training_data_title)||void 0===O?void 0:O[0],paraphrase:null===(J=null===(H=Ci.customMetadata)||void 0===H?void 0:H.paraphrase)||void 0===J?void 0:J[0]},headerTitle:(null==V?void 0:V.title)||"GPT - Gemini 2.5 Flash",iconsConfig:{ChevronDownIcon:d,ChevronUpIcon:s,MaximizeIcon:r,CloseIcon:u},...null==V?void 0:V.gptCitationProps});if("image_citation"===gi&&!Ci)return null;if("web_citation"===(null===(K=null==Ci?void 0:Ci.customMetadata)||void 0===K?void 0:K.type))return(null===(Q=Ci.customMetadata)||void 0===Q?void 0:Q.screenshot_url)?i(h,{title:e,citation:Ci,customStyles:null==A?void 0:A.webCitation,customIcons:E}):i(g,{label:e,url:null===(X=Ci.customMetadata)||void 0===X?void 0:X.link,customStyles:null==A?void 0:A.webCitation,customIcons:E});if("audio_transcript"===(null===(Y=null==Ci?void 0:Ci.customMetadata)||void 0===Y?void 0:Y.type))return"stormee"===(null==Ci?void 0:Ci.customMetadata.audio_citation_mode)?i(l,{fallback:i(t,{}),children:i(y,{title:`${e}`,citation:Ci,customStyles:null==A?void 0:A.stormeeCitation,customIcons:E})}):i(l,{fallback:i(t,{}),children:i(I,{title:`${e}`,citation:Ci,customStyles:null==A?void 0:A.waveformCitation,customIcons:E})});if("scanned_doc_citations"===(null===(Z=null==Ci?void 0:Ci.customMetadata)||void 0===Z?void 0:Z.type)||"scanned_doc_citation"===(null===(ii=null==Ci?void 0:Ci.customMetadata)||void 0===ii?void 0:ii.type))return i(l,{fallback:i(t,{}),children:i(j,{title:e,citation:Ci,customIcons:E,customStyles:null==A?void 0:A.scannedDocumentCitation,pdfViewHeaderAction:null==z?void 0:z.pdfViewHeaderAction})});if("image_citation"===(null==Ci?void 0:Ci.customMetadata.type))return i(l,{fallback:i(t,{}),children:i(f,{title:`${e}`,citation:Ci,customIcons:E,customStyles:null==A?void 0:A.imageCitation})});if("book_citation_doc"===(null===(ti=null==Ci?void 0:Ci.customMetadata)||void 0===ti?void 0:ti.type)||"book_citation_pdf"===(null==Ci?void 0:Ci.customMetadata.type))return i(l,{fallback:i(t,{}),children:i(C,{title:`${e}`,citation:Ci,customIcons:E,customStyles:null==A?void 0:A.fileCitation})});if("app_mod_rag_question"===(null===(oi=null==Ci?void 0:Ci.customMetadata)||void 0===oi?void 0:oi.type))return i(l,{fallback:i(t,{}),children:i(k,{title:`${e}`,citation:Ci,customIcons:E,customStyles:null==A?void 0:A.appModCitation,codeLinkConfig:null===(ni=null==z?void 0:z.appMod)||void 0===ni?void 0:ni.codeLinkConfig,isLoading:null===(ei=null==z?void 0:z.appMod)||void 0===ei?void 0:ei.isLoading})});if("rca_citation"===(null===(li=null==Ci?void 0:Ci.customMetadata)||void 0===li?void 0:li.type))return i(l,{fallback:i(t,{}),children:i(S,{title:`${e}`,citation:Ci,customIcons:E,customStyles:null==A?void 0:A.rcaCitation})});if("readfile_citation"===(null===(ai=null==Ci?void 0:Ci.customMetadata)||void 0===ai?void 0:ai.type))return i(l,{fallback:i(t,{}),children:i(w,{title:`${e}`,citation:Ci,customIcons:E,customStyles:null==A?void 0:A.readFileCitation,fileCallback:null===(ci=null==z?void 0:z.readFile)||void 0===ci?void 0:ci.fileCallback,editorConfig:null===(di=null==z?void 0:z.readFile)||void 0===di?void 0:di.editorConfig,customColors:null===(si=null==z?void 0:z.readFile)||void 0===si?void 0:si.customColors})});if(bi&&!Ci){const t=null!==(ri=null==E?void 0:E.citationLoadingIcon)&&void 0!==ri?ri:i("span",{className:p.citationSpinner,style:null===(ui=null==A?void 0:A.loadingCitations)||void 0===ui?void 0:ui.citationSpinner});return i(v,{title:null!==(vi=null===(mi=null==A?void 0:A.loadingCitations)||void 0===mi?void 0:mi.tooltipTitle)&&void 0!==vi?vi:`source ${gi.split("_")[0]} citations`,arrow:!0,children:o("span",{className:p.citationSpinnerWrapper,style:null===(pi=null==A?void 0:A.loadingCitations)||void 0===pi?void 0:pi.citationSpinnerWrapper,children:[e,t]})})}return i("span",{...c,className:p.paragraph,style:null==T?void 0:T.p,children:null==c?void 0:c.children})},code:({inline:t,children:o,className:n,node:e,...l})=>/language-(\w+)/.exec(n||"")||(null==n?void 0:n.includes("language-"))?i("div",{children:i("code",{className:p.blockCode,children:o})}):i("code",{className:p.inlineCode,style:null==T?void 0:T.code,children:o}),learned:({children:o})=>i(t,{children:i(v,{title:o,placement:"top",children:i(m,{size:16,className:p.learnedIcon})})})}),[q,P,z,B,G]);return i("div",{ref:H,className:"w-full",children:i(a,{components:J,rehypePlugins:[c],children:L})})};export{W as AiReasonMarkdownWrapper,x as formatChatData};
|
|
2
2
|
//# sourceMappingURL=AiReasonMarkdownWrapper.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as i}from"react/jsx-runtime";import n from"./AiReasoningCitationContent.js";import e from"../../icons/CognitiveDecision.js";import t from"../../../CitationRenderer/CitationRenderer.js";const o=()=>i("svg",
|
|
1
|
+
import{jsx as i}from"react/jsx-runtime";import n from"./AiReasoningCitationContent.js";import e from"../../icons/CognitiveDecision.js";import t from"../../../CitationRenderer/CitationRenderer.js";const o=()=>i("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"#4B5563",strokeWidth:"2.5",style:{verticalAlign:"bottom",marginLeft:"1px"},children:i("polyline",{points:"18 15 12 9 6 15"})}),l=()=>i("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"#4B5563",strokeWidth:"2.5",style:{verticalAlign:"bottom",marginLeft:"1px"},children:i("polyline",{points:"6 9 12 15 18 9"})}),r=75,s=({isSourceHasHighlight:r,aiReason:s,citationTitle:a="",customStyles:c,customIcons:d,onSelectProceed:p,isDisableProceedButton:f,inlineLabel:g,isInlineCitation:m})=>{const h=(s.relevance_score>=75?null==d?void 0:d.highConfidence:null==d?void 0:d.lowConfidence)||i(e,{});return i("span",{children:i(t,{inLineCitation:!0,citationId:`ai-reasoning-${s.id}`,citationTitle:m?g||"":a||"",citationIcon:m?null:h,defaultExpanded:(null==s?void 0:s.isOpen)||r||!1,citationComponent:i(n,{aiReason:s,customStyles:c,customIcons:d,onSelectProceed:p,isDisableProceedButton:f}),chevronDownComponent:m?null:i(l,{}),chevronUpComponent:m?null:i(o,{}),styles:{pillButton:{margin:"0px",padding:m?"0":"4px 8px",fontSize:"15px",color:"#526eff",cursor:"pointer",verticalAlign:"middle",whiteSpace:"nowrap",display:"inline-flex",alignItems:m?"center":"flex-end",background:"#ffffffff",fontWeight:"700",gap:"1.5px",border:"none",...null==c?void 0:c.aiReasoningPill},citationContent:{width:"100%",background:"transparent",minHeight:"10px",height:"fit-content"}}})})};export{r as SHOW_CONFIDENCE_SCORE_THRESHOLD_IN_AI_REASONING,s as default};
|
|
2
2
|
//# sourceMappingURL=AiReasoningCitation.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as i,jsxs as
|
|
1
|
+
import{jsx as i,jsxs as o,Fragment as n}from"react/jsx-runtime";import e from"../../icons/AiReasoningIcon.js";import l from"./AIReasonAccordion.js";import a from"../../icons/ReasoningBulbIcon.js";import{AiReasonMarkdownWrapper as t}from"./AiReasonMarkdownWrapper.js";import d from"../../icons/AiGapIcon.js";import{useState as s}from"react";import{ChevronUp as r,ChevronDown as v}from"lucide-react";import c from"./AiReasoningCitationContent.module.css.js";import{renderAIConfidenceDisplay as u}from"../../shared/CitationAIConfidenceDisplay.js";import{useRequirementAI as C}from"../RequirementAIWrapper/RequirementAIWrapper.js";const m=({label:m,aiReason:p,scenario:g,customStyles:h,customIcons:f,cognitiveDecisionHeaders:b,onSelectProceed:y,isDisableProceedButton:R,big_enough_block:w,isSegmentExplanation:S,handleViewExample:I,handleViewGlossary:N,isUpdatedSegment:A,footer:B})=>{var k,x,D,E,_,M,O,j,W,F,$,G,H,P,T,U,V,q,L,z,J,K;const{aiReasoningAccordionOpenStates:Q}=C(),X=(null==f?void 0:f.aireasonIcon)||i(e,{}),Y=(null==f?void 0:f.reasoningIcon)||i(a,{}),Z=(null==f?void 0:f.gapIcon)||i(d,{}),[ii,oi]=s(null!==(k=null==Q?void 0:Q.isBottomComponentDefaultOpen)&&void 0!==k&&k);return o("div",{className:`${c.container} ${"riskSideBar"===g?"":c.containerBordered}`,style:null===(x=null==h?void 0:h.aiReasoningContent)||void 0===x?void 0:x.container,children:[(null==p?void 0:p.explanation)&&i("div",{className:`${(null==p?void 0:p.explanation)&&"riskSideBar"!==g?"":c.explanationDivider}`,style:null===(D=null==h?void 0:h.aiReasoningContent)||void 0===D?void 0:D.explanationDivider,children:i(l,{icon:i(n,{}),title:"Explanation",subTitle:"",customStyles:null==h?void 0:h.aiReasoningAccordion,content:i(t,{label:m,message:p.explanation,isExpandableOrderedListEnabled:!0,customStyles:null==h?void 0:h.aiReasoningMarkdown,citationStyles:{webCitation:null==h?void 0:h.webCitation,stormeeCitation:null==h?void 0:h.stormeeCitation,waveformCitation:null==h?void 0:h.waveformCitation,imageCitation:null==h?void 0:h.imageCitation,fileCitation:null==h?void 0:h.fileCitation,appModCitation:null==h?void 0:h.appModCitation,rcaCitation:null==h?void 0:h.rcaCitation,readFileCitation:null==h?void 0:h.readFileCitation,loadingCitations:null==h?void 0:h.loadingCitations,chatCitation:null==h?void 0:h.chatCitation,bigEnoughCitation:null==h?void 0:h.bigEnoughCitation},customIcons:f,onSelectProceed:y,isDisableProceedButton:R,big_enough_block:w}),isSegmentExplanation:S,scenario:g,handleViewExample:I,handleViewGlossary:N,isUpdatedSegment:A})}),"riskSideBar"!==g&&o("div",{onClick:()=>{(null==Q?void 0:Q.isBottomComponentCollapsed)&&oi(i=>!i)},className:`${c.headerBar} ${"riskSideBar"===g?"":c.headerBarRounded}`,style:null===(E=null==h?void 0:h.aiReasoningContent)||void 0===E?void 0:E.headerBar,children:[o("div",{className:c.headerBrand,style:null===(_=null==h?void 0:h.aiReasoningContent)||void 0===_?void 0:_.headerBrand,children:[X,i("p",{children:null!==(M=null==b?void 0:b.mainHeader)&&void 0!==M?M:"Cognitive Decisioning AI"})]}),o("div",{className:c.headerScore,style:null===(O=null==h?void 0:h.aiReasoningContent)||void 0===O?void 0:O.headerScore,children:[!isNaN(null==p?void 0:p.relevance_score)&&u(p.relevance_score,p.relevance_score_diff,null===(j=null==h?void 0:h.aiReasoningContent)||void 0===j?void 0:j.confidenceDisplay,f),(null==Q?void 0:Q.isBottomComponentCollapsed)&&i("button",{className:c.chevronWrapper,style:null===(W=null==h?void 0:h.aiReasoningContent)||void 0===W?void 0:W.chevronWrapper,children:ii?i(r,{className:null==c?void 0:c.chevronIcon,style:null===(F=null==h?void 0:h.aiReasoningContent)||void 0===F?void 0:F.chevronIcon}):i(v,{className:null==c?void 0:c.chevronIcon,style:null===($=null==h?void 0:h.aiReasoningContent)||void 0===$?void 0:$.chevronIcon})})]})]}),"riskSideBar"!==g&&ii&&i("div",{className:c.bodyRow,style:{width:"100%",...null===(G=null==h?void 0:h.aiReasoningContent)||void 0===G?void 0:G.bodyRow},children:o("div",{className:`flex flex-col ${c.bodyFull}`,children:[i(l,{icon:i("div",{className:c.iconWrapper,style:null===(H=null==h?void 0:h.aiReasoningContent)||void 0===H?void 0:H.iconWrapper,children:Y}),isUpdatedSegment:A,title:null!==(P=null==b?void 0:b.decisionHeader)&&void 0!==P?P:"Decision Making Factors",subTitle:"",customStyles:null==h?void 0:h.aiReasoningAccordion,alwaysOpen:null===(T=null==Q?void 0:Q.reasoningAlwaysOpen)||void 0===T||T,defaultOpen:null===(U=null==Q?void 0:Q.reasoningDefaultOpen)||void 0===U||U,content:i(t,{message:(null==p?void 0:p.reason)||"No reasoning available.",customStyles:null==h?void 0:h.aiReasoningMarkdown,citationStyles:{webCitation:null==h?void 0:h.webCitation,stormeeCitation:null==h?void 0:h.stormeeCitation,waveformCitation:null==h?void 0:h.waveformCitation,imageCitation:null==h?void 0:h.imageCitation,fileCitation:null==h?void 0:h.fileCitation,appModCitation:null==h?void 0:h.appModCitation,rcaCitation:null==h?void 0:h.rcaCitation,readFileCitation:null==h?void 0:h.readFileCitation,loadingCitations:null==h?void 0:h.loadingCitations,chatCitation:null==h?void 0:h.chatCitation,bigEnoughCitation:null==h?void 0:h.bigEnoughCitation},customIcons:f,big_enough_block:w})}),i("div",{className:c.divider,style:null===(V=null==h?void 0:h.aiReasoningContent)||void 0===V?void 0:V.divider}),i(l,{icon:i("div",{className:c.iconWrapper,style:null===(q=null==h?void 0:h.aiReasoningContent)||void 0===q?void 0:q.iconWrapper,children:Z}),title:null!==(L=null==b?void 0:b.gapHeader)&&void 0!==L?L:"Gaps in Decision",subTitle:"",customStyles:null==h?void 0:h.aiReasoningAccordion,alwaysOpen:null!==(z=null==Q?void 0:Q.gapAlwaysOpen)&&void 0!==z&&z,defaultOpen:null!==(J=null==Q?void 0:Q.gapDefaultOpen)&&void 0!==J&&J,isUpdatedSegment:A,content:i(t,{message:(ni=p.relevance_score,ei=(null==p?void 0:p.gap)||"No gap available.",ni<100?`The decision strength is ${ni}% because: \n${ei}`:ei),customStyles:null==h?void 0:h.aiReasoningMarkdown,citationStyles:{webCitation:null==h?void 0:h.webCitation,stormeeCitation:null==h?void 0:h.stormeeCitation,waveformCitation:null==h?void 0:h.waveformCitation,imageCitation:null==h?void 0:h.imageCitation,fileCitation:null==h?void 0:h.fileCitation,appModCitation:null==h?void 0:h.appModCitation,rcaCitation:null==h?void 0:h.rcaCitation,readFileCitation:null==h?void 0:h.readFileCitation,loadingCitations:null==h?void 0:h.loadingCitations,chatCitation:null==h?void 0:h.chatCitation,bigEnoughCitation:null==h?void 0:h.bigEnoughCitation},customIcons:f,big_enough_block:w}),className:c.gapAccordion})]})}),B&&i("div",{className:c.footer,style:null===(K=null==h?void 0:h.aiReasoningContent)||void 0===K?void 0:K.footer,children:B})]});var ni,ei};export{m as default};
|
|
2
2
|
//# sourceMappingURL=AiReasoningCitationContent.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as i,jsx as n}from"react/jsx-runtime";import e from"./BigEnoughComponent.module.css.js";import{ChevronDown as l,ChevronUp as o,Maximize2 as
|
|
1
|
+
import{jsxs as i,jsx as n}from"react/jsx-runtime";import e from"./BigEnoughComponent.module.css.js";import{ChevronDown as l,ChevronUp as o,Maximize2 as u,X as t}from"lucide-react";import{CognitiveInternalgptCoreComponent as s}from"@e-llm-studio/citation";import{useRequirementAI as g}from"../RequirementAIWrapper/RequirementAIWrapper.js";const a=({customStyles:a,big_enough_decision_factors:d})=>{var c,r,h,m,v,b;const{gptCitationConfigs:p}=g(),E=i=>({...(null==d?void 0:d.big_enough_score)===i?{...null==a?void 0:a.bigEnoughGuidelinePoints,...null==a?void 0:a.bigEnoughGuidelinePointsActive}:null==a?void 0:a.bigEnoughGuidelinePoints});return i("div",{className:e.bigEnoughContainer,style:null==a?void 0:a.bigEnoughContainer,children:[i("div",{className:e.bigEnoughColumn,style:null==a?void 0:a.bigEnoughColumn,children:[n("p",{className:e.bigEnoughColumnLabel,style:null==a?void 0:a.bigEnoughColumnLabel,children:"Guideline"}),i("div",{className:e.bigEnoughBlock,style:null==a?void 0:a.bigEnoughBlock,children:[n("p",{className:`${e.bigEnoughGuidelinePoints} ${0===(null==d?void 0:d.big_enough_score)?e.bigEnoughGuidelinePointsActive:""}`,style:E(0),children:"0 - Micro : 1-2 line changes single step"}),n("p",{className:`${e.bigEnoughGuidelinePoints} ${1===(null==d?void 0:d.big_enough_score)?e.bigEnoughGuidelinePointsActive:""}`,style:E(1),children:"1 - Small task : one function change 1-2 steps max"}),n("p",{className:`${e.bigEnoughGuidelinePoints} ${2===(null==d?void 0:d.big_enough_score)?e.bigEnoughGuidelinePointsActive:""}`,style:E(2),children:"2 - Mid-small : 3-5 step task encompasses within a single file"}),n("p",{className:`${e.bigEnoughGuidelinePoints} ${3===(null==d?void 0:d.big_enough_score)?e.bigEnoughGuidelinePointsActive:""}`,style:E(3),children:"3 - Medium : 3-7 steps encompassing multiple files"}),n("p",{className:`${e.bigEnoughGuidelinePoints} ${4===(null==d?void 0:d.big_enough_score)?e.bigEnoughGuidelinePointsActive:""}`,style:E(4),children:"4 - Large : A full blown big feature implementation"}),n("p",{className:`${e.bigEnoughGuidelinePoints} ${5===(null==d?void 0:d.big_enough_score)?e.bigEnoughGuidelinePointsActive:""}`,style:E(5),children:"5 - Very Large : Full blown multi-repo feature implementation"})]})]}),n("div",{className:e.bigEnoughColumnDivider,style:null==a?void 0:a.bigEnoughColumnDivider}),i("div",{className:e.bigEnoughColumn,style:null==a?void 0:a.bigEnoughColumn,children:[n("p",{className:e.bigEnoughColumnLabel,style:null==a?void 0:a.bigEnoughColumnLabel,children:"GPT Citation"}),n("div",{className:e.bigEnoughBlock,style:null==a?void 0:a.bigEnoughBlock,children:n(s,{item:{text:"",dataSource:null===(r=null===(c=null==d?void 0:d.customMetadata)||void 0===c?void 0:c.data_sources)||void 0===r?void 0:r[0],trainingDataTitle:null===(m=null===(h=null==d?void 0:d.customMetadata)||void 0===h?void 0:h.training_data_title)||void 0===m?void 0:m[0],paraphrase:null===(b=null===(v=null==d?void 0:d.customMetadata)||void 0===v?void 0:v.paraphrase)||void 0===b?void 0:b[0]},headerTitle:(null==p?void 0:p.title)||"GPT - Gemini 2.5 Flash",iconsConfig:{ChevronDownIcon:l,ChevronUpIcon:o,MaximizeIcon:u,CloseIcon:t},...null==p?void 0:p.gptCitationProps})})]})]})};export{a as default};
|
|
2
2
|
//# sourceMappingURL=BigEnoughComponent.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{Loader2 as i}from"lucide-react";import{useState as t,useEffect as a}from"react";import{mapToHighlightAreas as o,citationViewerStyles as r}from"./pdfCitationUtils.js";import{useRequirementAI as n}from"../RequirementAIWrapper/RequirementAIWrapper.js";import l from"./pdfCitation.module.css.js";import d from"./CitationPdfViewer.js";function s({citation:s,isCitationLoading:c=!1,renderMode:
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{Loader2 as i}from"lucide-react";import{useState as t,useEffect as a}from"react";import{mapToHighlightAreas as o,citationViewerStyles as r}from"./pdfCitationUtils.js";import{useRequirementAI as n}from"../RequirementAIWrapper/RequirementAIWrapper.js";import l from"./pdfCitation.module.css.js";import d from"./CitationPdfViewer.js";function s({citation:s,isCitationLoading:c=!1,renderMode:u,pdfViewHeaderAction:g,citationId:f}){var h,m,p,v,C;const{queryClient:U,useGetSignedUrlQuery:w,useGetSignedUrlMutation:P}=n().apiCachingConfig,[V,_]=t(!1),x=null==s?void 0:s.customMetadata,y=null!==(h=null==x?void 0:x.value)&&void 0!==h?h:[],A=null!==(m=null==x?void 0:x.artifact_url)&&void 0!==m?m:"",j=null!==(p=null==x?void 0:x.artifact_title)&&void 0!==p?p:"",I=null!==(v=null==x?void 0:x.artifact_format)&&void 0!==v?v:"pdf",M=y.flatMap(e=>e.highlighted_text.map(e=>e.text)),N="docx"===I,S=["getSignedUrl",A],{data:D}=w(A,S),{mutate:H,isPending:q}=P(A),G=null!=D?D:"",R=!!A&&q&&!G;A||console.warn("Artifact preview details not found in header message or message data",A);return a(()=>{if(!A)return void _(!0);const e=U.getQueryData(S);e||q||H({gsUtilPath:A}),e&&_(!1)},[A,U,S,q,H]),a(()=>{G&&_(!1)},[G]),null!==(C=(()=>{try{const t=o(y),a=t.length>0;if(R||c)return e("div",{className:l.loaderContainer,children:e(i,{className:l.loaderIcon,size:28})});const n=y.some(e=>!!e.gs_url),s=y.some(e=>null!==e.page_no&&void 0!==e.page_no),h=y.some(e=>Array.isArray(e.highlighted_coordinates)&&e.highlighted_coordinates.length>0),m=t.length>0;return!(n||s||h||m)&&console.warn("No valid coordinates or gs_url found for this citation.",{hasValidGsUrl:n,hasValidPageNo:s,hasHighlightedCoords:h,hasCoordinatesPages:m,pages:y,artifactUrl:A}),(a||!s||V)&&(V||!a)?(console.warn("Error in loading PDF or no valid highlight coordinates found. Rendering fallback viewer without highlights.",{artifactUrl:A,hasValidCoordinates:a,coordinatesPages:t,pages:y}),e(d,{artifactUrl:A,pdfUrl:"",pdfName:j,pages:y,coordinatesPages:[],pdfViewHeaderAction:g,renderMode:null!=u?u:"fallback",isDocx:N,hasValidCoordinates:!1,customStyles:r,highlightText:M,citationId:f})):e(d,{artifactUrl:A,pdfUrl:G,pdfName:j,pages:y,coordinatesPages:t,pdfViewHeaderAction:g,renderMode:null!=u?u:"default",isDocx:N,hasValidCoordinates:a,jumpToPageValue:1,customStyles:r,highlightText:M,citationId:f})}catch(e){return console.warn("Error rendering citation",e),null}})())&&void 0!==C?C:null}export{s as default};
|
|
2
2
|
//# sourceMappingURL=CitationPdfRendererWrapper.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{Loader2 as i}from"lucide-react";import{PdfViewer as t}from"@e-llm-studio/citation";import{stringToNumber as o}from"./pdfCitationUtils.js";const a={pdfViewer:{height:"50%",maxHeight:"50%",display:"flex",flexDirection:"column",backgroundColor:"#FAFAFA",border:"1px solid #e5e7eb",borderRadius:"8px",overflow:"hidden"},pdfContainer:{flex:1,overflowY:"auto",padding:"8px"},header:{borderBottom:"1px solid #e5e7eb"}},l={pdfViewerWrapper:"shadow-sm"},r=()=>e("div",
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{Loader2 as i}from"lucide-react";import{PdfViewer as t}from"@e-llm-studio/citation";import{stringToNumber as o}from"./pdfCitationUtils.js";const a={pdfViewer:{height:"50%",maxHeight:"50%",display:"flex",flexDirection:"column",backgroundColor:"#FAFAFA",border:"1px solid #e5e7eb",borderRadius:"8px",overflow:"hidden"},pdfContainer:{flex:1,overflowY:"auto",padding:"8px"},header:{borderBottom:"1px solid #e5e7eb"}},l={pdfViewerWrapper:"shadow-sm"},r=()=>e("div",{className:"h-full flex items-center justify-center",children:e(i,{className:"animate-spin text-purple-500",size:28})}),n=({artifactUrl:i,pdfUrl:n,pdfName:s,pages:d,coordinatesPages:c,activeCitationIndex:f,onActiveCitationChange:h,pdfViewHeaderAction:p,isLoading:u,hasValidCoordinates:g,renderMode:m="default",useCoordinates:C=!0,jumpToPageValue:x,customStyles:b,customClasses:k,isDocx:v=!1,highlightText:A,citationId:w})=>{if(u)return e(r,{});const P=v||"fallback"===m?"":n,V="fallback"===m||!1===g?[]:c,j="fallback"!==m&&C,I=o(w),N=p?{icon:p.icon,tooltip:p.tooltip,onClick:()=>{p.onClick({artifactUrl:i,artifactId:i,fileName:null!=s?s:"",pages:d,currentCitationIndex:null!=I?I:0})}}:void 0;return e(t,{pdfUrl:P,pdfName:s,fallbackPages:d,highlightCordinatePages:V,highlightText:null!=A?A:[],highlightPages:{},useCoordinates:j,activeCitationIndex:f,headerAction:N,onActiveCitationChange:h,highlightColor:"oklch(0.78 0.16 95 / 0.35)",activeHighlightColor:"oklch(0.75 0.17 95 / 0.45)",jumpToPageValue:x,customStyles:null!=b?b:a,customClasses:null!=k?k:l})};export{n as default};
|
|
2
2
|
//# sourceMappingURL=CitationPdfViewer.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as n}from"react/jsx-runtime";import t from"../../../CitationRenderer/CitationRenderer.js";import i from"../../../RequirementAiCitations/AiReasoning/components/icons/DocumentCitationIcon.js";import o from"./CitationPdfRendererWrapper.js";const e=({title:e,citation:r,customIcons:c,customStyles:a,pdfViewHeaderAction:
|
|
1
|
+
import{jsx as n}from"react/jsx-runtime";import t from"../../../CitationRenderer/CitationRenderer.js";import i from"../../../RequirementAiCitations/AiReasoning/components/icons/DocumentCitationIcon.js";import o from"./CitationPdfRendererWrapper.js";const e=({title:e,citation:r,customIcons:c,customStyles:a,pdfViewHeaderAction:d})=>{var l;const m=null!==(l=null==c?void 0:c.ScannedDocumentIcon)&&void 0!==l?l:n(i,{});return n(t,{inLineCitation:!0,citationTitle:e,citationId:`scanned-doc-${r.citation_number}`,citationComponent:n(o,{citation:r,citationId:`${r.citation_number}`,pdfViewHeaderAction:d}),chevronDownComponent:m,chevronUpComponent:m,styles:{pillButton:{fontSize:"14px",margin:"0px",background:"#ffffff",color:"#526eff",cursor:"pointer",verticalAlign:"middle",whiteSpace:"nowrap",display:"inline-flex",alignItems:"center",border:"none",...null==a?void 0:a.pill},citationContent:{width:"100%",background:"transparent",minHeight:"10px",height:"fit-content",...null==a?void 0:a.content}}})};export{e as default};
|
|
2
2
|
//# sourceMappingURL=ScannedCitationRenderer.js.map
|
package/dist/features/RequirementAI/components/citations/appmod-citation/AppmodCitationContent.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as e,jsxs as
|
|
1
|
+
import{jsx as e,jsxs as l}from"react/jsx-runtime";import{useRef as n,useMemo as r,useEffect as i}from"react";import a from"react-markdown";import o from"rehype-raw";import d from"./AppModCitationContent.module.css.js";import s from"./components/CodeLinkHandler.js";import{DEFAULT_HIGHLIGHT_THEME as t}from"./types.js";import{renderAIConfidenceDisplay as c}from"../../../../RequirementAiCitations/AiReasoning/components/AIConfidenceDisplay.js";import{SparkleIcon as m}from"./icons/SparkleIcon.js";const h=(l,n,r,i)=>{const a=(null==n?void 0:n.highlight)||t,o=()=>l?{backgroundColor:a.background,color:a.text,padding:"2px 3px",borderRadius:"2px",boxDecorationBreak:"clone",WebkitBoxDecorationBreak:"clone"}:{},c=()=>({...o(),display:"inline"});return{h1:({children:r})=>{var i;return e("h1",{className:d.heading1,style:null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.heading1,children:l?e("span",{style:o(),children:r}):r})},h2:({children:r})=>{var i;return e("h2",{className:d.heading2,style:null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.heading2,children:l?e("span",{style:o(),children:r}):r})},h3:({children:r})=>{var i;return e("h3",{className:d.heading3,style:null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.heading3,children:l?e("span",{style:o(),children:r}):r})},h4:({children:r})=>{var i;return e("h4",{className:d.heading4,style:null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.heading4,children:l?e("span",{style:o(),children:r}):r})},h5:({children:r})=>{var i;return e("h5",{className:d.heading5,style:null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.heading5,children:l?e("span",{style:o(),children:r}):r})},h6:({children:r})=>{var i;return e("h6",{className:d.heading6,style:null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.heading6,children:l?e("span",{style:o(),children:r}):r})},p:({children:r})=>{var i;return e("p",{className:d.paragraph,style:null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.paragraph,children:l?e("span",{style:c(),children:r}):r})},ol:({children:l})=>{var r;return e("ol",{className:d.orderedList,style:null===(r=null==n?void 0:n.markdown)||void 0===r?void 0:r.list,children:l})},ul:({children:l})=>{var r;return e("ul",{className:d.unorderedList,style:null===(r=null==n?void 0:n.markdown)||void 0===r?void 0:r.list,children:l})},li:({children:r})=>{var i;return e("li",{className:d.listItem,style:null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.listItem,children:l?e("span",{style:c(),children:r}):r})},strong:({children:r})=>{var i;return e("strong",{className:d.strong,style:{...null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.strong,...l?o():{}},children:r})},em:({children:r})=>{var i;return e("em",{className:d.emphasis,style:{...null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.emphasis,...l?o():{}},children:r})},a:({children:o,href:d})=>e(s,{href:d,codeLinkConfig:i,isHighlighted:l,highlightTheme:a,customStyles:null==n?void 0:n.markdown,customIcon:null==r?void 0:r.appModCitationLinkIcon,children:o}),code:({children:r,className:i})=>{var o,s;const t=null==i?void 0:i.includes("language-"),c=l?{backgroundColor:a.codeBackground,color:a.codeText,border:`1px solid ${a.codeBorder}`}:{};return t?e("div",{children:e("code",{className:d.codeBlock,style:{...null===(s=null==n?void 0:n.markdown)||void 0===s?void 0:s.codeBlock,...c},children:r})}):e("code",{className:d.inlineCode,style:{...null===(o=null==n?void 0:n.markdown)||void 0===o?void 0:o.code,...c},children:r})},pre:({children:l})=>e("pre",{className:d.preBlock,children:l}),blockquote:({children:r})=>{var i;return e("blockquote",{className:d.blockquote,style:{...null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.blockquote,...l?{borderColor:a.border}:{}},children:l?e("span",{style:c(),children:r}):r})},table:({children:r})=>{var i;return e("div",{className:d.tableWrapper,children:e("table",{className:d.table,style:{...null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.table,...l?o():{}},children:r})})},thead:({children:l})=>e("thead",{className:d.tableHead,children:l}),tbody:({children:l})=>e("tbody",{className:d.tableBody,children:l}),tr:({children:n})=>e("tr",{className:d.tableRow,style:l?o():{},children:n}),th:({children:r})=>{var i;return e("th",{className:d.tableHeader,style:{...null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.tableHeader,...l?o():{}},children:r})},td:({children:r})=>{var i;return e("td",{className:d.tableCell,style:{...null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.tableCell,...l?o():{}},children:r})},details:({children:l})=>e("details",{className:d.details,children:l}),summary:({children:n})=>{const r=e=>{var l;return"string"==typeof e?e:Array.isArray(e)?e.map(r).join(""):(null===(l=null==e?void 0:e.props)||void 0===l?void 0:l.children)?r(e.props.children):""},i=r(n).replace(/:$/,"").trim();return e("summary",{className:d.summary,style:l?o():{},children:i})}}},u=({citation:s,customStyles:t,customIcons:u,codeLinkConfig:v,isLoading:p=!1,shouldAutoScroll:y=!1})=>{var g,b;const N=n(null),k=n(null),w=s.description||"",f=s.customMetadata.question||"",C=s.customMetadata.highlighted_text,x=s.customMetadata.relevance_score,I=r(()=>h(!1,t,u,v),[t,u,v]),q=r(()=>h(!0,t,u,v),[t,u,v]);i(()=>{if(!y||!(null==C?void 0:C.trim())||!(null==w?void 0:w.trim())||p)return;const e=k.current;if(!e)return;const l=()=>{e.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"})},n=window.requestAnimationFrame(()=>{l(),window.setTimeout(l,120)});return()=>{window.cancelAnimationFrame(n)}},[w,C,p,y]);const A=(null==u?void 0:u.appModCitationIcon)||e("div",{children:e(m,{className:d.headerIcon})});return l("div",{ref:N,className:d.container,style:null==t?void 0:t.container,children:[l("div",{className:d.header,style:null==t?void 0:t.header,children:[l("div",{className:d.headerLeft,style:null==t?void 0:t.headerLeft,children:[e("span",{style:null==t?void 0:t.headerIcon,children:A}),e("span",{className:d.headerTitle,style:null==t?void 0:t.headerTitle,children:"AskMod Response"})]}),c(x,null==t?void 0:t.confidenceDisplay)]}),l("div",{className:d.questionContainer,style:null==t?void 0:t.questionContainer,children:[e("p",{className:d.questionLabel,style:null==t?void 0:t.questionLabel,children:"Me"}),e("div",{className:d.questionText,style:null==t?void 0:t.questionText,children:f||"Ask question to get response"})]}),e("div",{className:d.answerIconRow,style:null==t?void 0:t.answerIconRow,children:l("p",{className:d.assistantName,style:null==t?void 0:t.assistantName,children:["Askmod",e("span",{className:d.assistantNameInner,style:null==t?void 0:t.assistantNameInner,children:".AI"})]})}),e("div",{className:d.answerContainer,style:null==t?void 0:t.answerContainer,children:p?e("span",{className:d.loadingText,style:null===(g=null==t?void 0:t.loading)||void 0===g?void 0:g.text,children:"Generating..."}):w?((n,r)=>{const i=((e="")=>e.replace(/<details\b([^>]*)>/gi,(e,l)=>/\bopen\b/i.test(l)?"<details open>":"<details>").replace(/<summary\b[^>]*>\s*<codebasename>([^<]*)<\/codebasename>\s*<\/summary>/gi,(e,l)=>`<summary class="codebase-summary codebasename">From ${l.trim()} codebase</summary>`).replace(/<\/summary>/g,"</summary>\n").replace(/```codebasename\s*([\s\S]{0,2000}?)```/gi,(e,l)=>`<codebasename>${l.trim()}</codebasename>`).trim())(n.replace(/\\n/g,"\n"));if(r&&i.includes(r)){const n=i.indexOf(r),s=i.substring(0,n),t=i.substring(n,n+r.length),c=i.substring(n+r.length),m=!t.trim();return l("div",{className:d.markdownContent,children:[s&&e(a,{rehypePlugins:[o],components:I,children:s}),t&&!m&&e("div",{ref:k,"data-appmod-highlight-anchor":"true",children:e(a,{rehypePlugins:[o],components:q,children:t})}),t&&m&&t,c&&e(a,{rehypePlugins:[o],components:I,children:c})]})}return e(a,{className:d.markdownContent,rehypePlugins:[o],components:I,children:i})})(w,C):e("span",{className:d.errorText,style:null===(b=null==t?void 0:t.error)||void 0===b?void 0:b.text,children:"Oops! Can't generate your response now."})})]})};export{u as default};
|
|
2
2
|
//# sourceMappingURL=AppmodCitationContent.js.map
|
package/dist/features/RequirementAI/components/citations/appmod-citation/AppmodCitationRenderer.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as t,Fragment as n}from"react/jsx-runtime";import{SparkleIcon as i}from"lucide-react";import{useState as o,useCallback as e}from"react";import
|
|
1
|
+
import{jsx as t,Fragment as n}from"react/jsx-runtime";import{SparkleIcon as i}from"lucide-react";import{useState as o,useCallback as e}from"react";import r from"../../../../CitationRenderer/CitationRenderer.js";import a from"./AppmodCitationContent.js";const c=({title:c,citation:l,customStyles:p,customIcons:s,codeLinkConfig:m,isLoading:d=!1,isOpen:u})=>{const[g,f]=o(!1),C=void 0!==u,h=C?!!u:g,x=e(()=>{C||f(t=>!t)},[C]),b=(null==s?void 0:s.appModCitationIcon)||t(i,{className:"inline align-super mb-1 ml-1",style:{width:"12px",height:"12px"}});return t(r,{inLineCitation:!0,citationTitle:c+"",citationIcon:t(n,{}),citationId:`appmod-ai-${l.citation_number}`,citationComponent:t(a,{citation:l,customStyles:p,customIcons:s,codeLinkConfig:m,isLoading:d,shouldAutoScroll:h}),isOpen:h,onToggle:x,chevronDownComponent:b,chevronUpComponent:b,styles:{pillButton:{fontSize:"13px",margin:"0px",padding:"0px 4px",color:"#3b82f6",cursor:"pointer",verticalAlign:"baseline",whiteSpace:"normal",wordBreak:"break-all",display:"inline-flex",alignItems:"unset",background:"transparent",border:"none",...null==p?void 0:p.pill},citationContent:{width:"100%",background:"transparent",minHeight:"10px",height:"fit-content"}}})};export{c as default};
|
|
2
2
|
//# sourceMappingURL=AppmodCitationRenderer.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
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),
|
|
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),k="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",{href:s,title:s,onClick:o,className:i.linkContainer,style:null==u?void 0:u.link,children:n("span",{className:i.linkWrapper,style:a,children:[p,e("span",{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:k,filename:"Generated Code"!==k?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:{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",{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
|
package/dist/features/RequirementAI/components/citations/appmod-citation/icons/AppmodIcon.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as o,jsx as r}from"react/jsx-runtime";const e=({className:e,style:t})=>o("svg",
|
|
1
|
+
import{jsxs as o,jsx as r}from"react/jsx-runtime";const e=({className:e,style:t})=>o("svg",{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
|
package/dist/features/RequirementAI/components/citations/appmod-citation/icons/ChatBubbleIcon.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";const e=({className:e,style:s})=>t("svg",
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";const e=({className:e,style:s})=>t("svg",{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
|
package/dist/features/RequirementAI/components/citations/appmod-citation/icons/SparkleIcon.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";const s=({className:s,style:e})=>t("svg",{className:s,style:e,width:"12",height:"12",viewBox:"0 0 24 24",fill:"#3b82f6",xmlns:"http://www.w3.org/2000/svg",children:t("path",{d:"M12 0L14.59 9.41L24 12L14.59 14.59L12 24L9.41 14.59L0 12L9.41 9.41L12 0Z"})});export{s as SparkleIcon};
|
|
2
2
|
//# sourceMappingURL=SparkleIcon.js.map
|
package/dist/features/RequirementAI/components/citations/audio-citation/SearchWaveFromWrapper.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsx as e,jsxs as i}from"react/jsx-runtime";import{memo as t,useState as o,useRef as a,useCallback as n,useEffect as l}from"react";import r from"./searchwaveform.js";import s from"./components/videoPlayer.js";import{sortTopicsByCheckedStatus as d}from"./utils/word-segment-util.js";import c from"./components/SegmentByWordsViral.js";import u from"./SearchWaveFromWrapper.module.css.js";import m from"./icons/AudioLinesIcon.js";import v from"./icons/VideoIcon.js";import{CircularProgress as p}from"@mui/material";import{renderCitationAIConfidenceDisplay as g}from"../../../shared/CitationAIConfidenceDisplay.js";import{useRequirementAI as h}from"../../RequirementAIWrapper/RequirementAIWrapper.js";import{AudioPlayProvider as y}from"./store/autoplay.wavefrom.js";const f=e=>{const i=Math.floor(e/3600),t=Math.floor(e%3600/60),o=Math.floor(e%60),a=e=>String(e).padStart(2,"0");return`${a(i)}:${a(t)}:${o.toFixed(0)}`},S=t(({title:t,segments:S,gsUtilPath:P,citationNumber:w,relevanceScore:N,customStyles:A})=>{const[U,L]=o(0),[j,B]=o(S.length>0),[$,k]=o(!1),[C,M]=o(!1),[T,W]=o(""),[b,I]=o(!0),[x,V]=o("audio"),{queryClient:D,useGetSignedUrlQuery:Q,useGetSignedUrlMutation:q,useExtractAudioPeaksMutation:E,useExtractAudioPeaksQuery:G,useGetVideoSignedUrlQuery:O,useGetVideoSignedUrlMutation:R}=h().apiCachingConfig,_=a(null),z=P.replace(/\.wav$|\.mp3$/i,".mp4"),F=["getSignedUrl",P],H=["extractAudioPeaks",P],J=["getVideoSignedUrl",z],{data:K}=Q(P,F),{data:X}=G(P,H),{data:Y}=O(z,J),{mutate:Z,isPending:ee}=q(P),{mutate:ie,isPending:te}=E(P),{mutate:oe}=R(z),ae=n(e=>{L(e)},[]);l(()=>{if(!P)return void console.error("Error -> SearchWaveformWrapper: gsUtilPath is required to fetch signed URL");const e=D.getQueryData(F),i=D.getQueryData(H),t=D.getQueryData(J);e||Z({gsUtilPath:P}),i||ie({gsUtilPath:P}),t||oe({gsUtilPath:z})},[P]),l(()=>{Y&&(async()=>{const e=await fetch(Y);W(e.ok?Y:"")})()},[Y]);return e(y,{children:i("div",{className:u.wrapper,style:null==A?void 0:A.wrapper,children:[i("div",{className:u.header,style:null==A?void 0:A.header,children:[e("h2",{className:u.title,style:null==A?void 0:A.title,children:t||"Audio Snippet"}),g(N,!0,null==A?void 0:A.confidenceDisplay)]}),i("div",{className:u.content,style:null==A?void 0:A.content,children:["audio"!==x&&T?i("div",{className:u.videoSection,style:null==A?void 0:A.videoSection,children:[b&&i("div",{className:u.videoLoader,style:null==A?void 0:A.videoLoader,children:[e(p,{size:40}),e("p",{children:"Loading video..."})]}),e("div",{style:{visibility:b?"hidden":"visible",position:b?"absolute":"relative"},children:e(s,{videoSrc:T,currentTime:U,isWaveformPlaying:C,onBufferingStart:()=>{k(!0),C&&M(!1)},onBufferingEnd:()=>{k(!1)},onVideoPlayPause:e=>{_.current?e?C||_.current.togglePlayPause():C&&_.current.togglePlayPause():M(e)},className:"w-full aspect-video rounded-lg overflow-hidden shadow-lg mb-2",onVideoLoadingStateChange:e=>(e=>{I(e)})(e),isUrlPending:ee,isPeaksPending:te,signedUrl:K,AudioData:X,showOnlyMatched:j,wavesurferRef:_,handleAudioTimeUpdate:ae,segments:S,setIsAudioPlaying:M,setShowOnlyMatched:B,customStyles:null==A?void 0:A.videoPlayer,waveformStyles:null==A?void 0:A.waveform},`video-${w}`)})]}):e("div",{className:u.audioSection,style:null==A?void 0:A.audioSection,children:ee||te?i("div",{className:u.audioLoader,style:null==A?void 0:A.audioLoader,children:[e(p,{size:48}),e("span",{children:"Loading audio peaks..."})]}):K&&X&&e(r,{ref:_,audio_file_name:K,matchedSegments:S,peaks:X.peaks,duration:X.duration,setIsAudioPlaying:M,onTimeUpdate:ae,currentAudioTime:U,showOnlyMatched:j,setShowOnlyMatched:B,customStyles:null==A?void 0:A.waveform},`audio-${w}`)}),i("div",{className:u.controls,style:null==A?void 0:A.controls,children:[T&&i("div",{className:u.mediaToggle,style:null==A?void 0:A.mediaToggle,children:[e("span",{className:`\n ${u.mediaButton}\n ${"video"===x&&u.mediaButtonActive}\n `,style:"video"===x?null==A?void 0:A.mediaButtonActive:null==A?void 0:A.mediaButton,onClick:()=>V("video"),children:e(v,{})}),e("span",{className:`\n ${u.mediaButton}\n ${"audio"===x&&u.mediaButtonActive}\n `,style:"audio"===x?null==A?void 0:A.mediaButtonActive:null==A?void 0:A.mediaButton,onClick:()=>V("audio"),children:e(m,{})})]}),e("label",{className:u.switchLabel,style:null==A?void 0:A.switchLabel,children:e("span",{children:"play only matched segments"})})]}),i("div",{className:u.transcript,style:null==A?void 0:A.transcriptContainer,children:[e("div",{className:u.transcriptHeader,style:null==A?void 0:A.transcriptHeader,children:"Transcript"}),(i=>{const t=d(i);return e("div",{className:u.segmentList,style:null==A?void 0:A.segmentList,children:null==t?void 0:t.map(i=>e("div",{id:i.segment_id,className:u.segmentItem,style:null==A?void 0:A.transcriptSegment,children:e(c,{content:i.text,startTime:f(i.start),endTime:f(i.end),words:i.words||[],currentTime:U,containerStyle:null==A?void 0:A.transcriptContainer,customStyles:null==A?void 0:A.segmentWords})},i.segment_id))})})(S)]})]})]})})});export{S as default,f as formatTime};
|
|
2
2
|
//# sourceMappingURL=SearchWaveFromWrapper.js.map
|
package/dist/features/RequirementAI/components/citations/audio-citation/WaveformCitationRenderer.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
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,
|
|
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,d,s,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===(d=a.citation.customMetadata)||void 0===d?void 0:d.file_name:"",segments:"audio_transcript"===a.citation.customMetadata.type?null===(s=a.citation.customMetadata)||void 0===s?void 0:s.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:{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:{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
|