@viswa-test/test-citation 0.0.228 → 0.0.230

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (664) hide show
  1. package/README.md +284 -45
  2. package/dist/cjs/features/CognitiveCompare/CognitiveComparehelpers.js +1 -1
  3. package/dist/cjs/features/CognitiveCompare/components/SectionAccordion.js +1 -1
  4. package/dist/cjs/features/CognitiveCompare/components/SubSectionAccordion.js +1 -1
  5. package/dist/cjs/features/CognitiveCompare/hooks/useCompareData.js +1 -1
  6. package/dist/cjs/features/CognitiveCompare/hooks/useLinesCalculator.js +1 -1
  7. package/dist/cjs/features/GptWebCitation/GptWebCitation.js +1 -1
  8. package/dist/cjs/features/GptWebCitation/GptWebCitation.module.css.js +1 -1
  9. package/dist/cjs/features/GptWebCitation/GptWebCitationImageCitation.js +1 -1
  10. package/dist/cjs/features/GptWebCitation/GptWebCitationImageFullScreenView.js +1 -1
  11. package/dist/cjs/features/GptWebCitation/GptWebCitationSkeleton.js +1 -1
  12. package/dist/cjs/features/GptWebCitation/types.js +2 -0
  13. package/dist/cjs/features/GptWebCitation/types.js.map +1 -0
  14. package/dist/cjs/features/GptWebCitation/utils/citationData.utils.js +1 -1
  15. package/dist/cjs/features/GptWebCitation/utils/fixedHeight.utils.js +2 -0
  16. package/dist/cjs/features/GptWebCitation/utils/fixedHeight.utils.js.map +1 -0
  17. package/dist/cjs/features/GptWebCitation/utils/styleOverrides.utils.js +2 -0
  18. package/dist/cjs/features/GptWebCitation/utils/styleOverrides.utils.js.map +1 -0
  19. package/dist/cjs/features/IngestionStatus/IngestionStatusComponent.js +1 -1
  20. package/dist/cjs/features/RequirementAI/components/CustomPopover/CustomPopover.js +1 -1
  21. package/dist/cjs/features/RequirementAI/components/GapRiskSidebar/GapRiskSidebar.js +1 -1
  22. package/dist/cjs/features/RequirementAI/components/GapRiskSidebar/components/GapItem/GapItem.js +1 -1
  23. package/dist/cjs/features/RequirementAI/components/GapRiskSidebar/components/RiskCategorySection/RiskCategorySection.js +1 -1
  24. package/dist/cjs/features/RequirementAI/components/GapRiskSidebar/components/RiskSidebarCategorySection/RiskSidebarCategorySection.js +1 -1
  25. package/dist/cjs/features/RequirementAI/components/GapRiskSidebar/components/StoryNode/StoryNode.js +1 -1
  26. package/dist/cjs/features/RequirementAI/components/GapRiskSidebar/utils/buildStoryWithGap.js +1 -1
  27. package/dist/cjs/features/RequirementAI/components/GapRiskSidebar/utils/buildStoryWithRisk.js +1 -1
  28. package/dist/cjs/features/RequirementAI/components/RecommendationBlock/RecommendationBlock.js +1 -1
  29. package/dist/cjs/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.js +1 -1
  30. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/Editor.js +1 -1
  31. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/Context/ContextMenu.js +1 -1
  32. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/EditorContainer/EditorContainer.js +1 -1
  33. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/EditorPlaceholder/EditorPlaceholder.js +1 -1
  34. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/EditorToolbar.js +1 -1
  35. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/components/ToolbarButton/ToolbarButton.js +1 -1
  36. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/components/ToolbarDivider/ToolbarDivider.js +1 -1
  37. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/components/UndoRedo/UndoRedo.js +1 -1
  38. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/Icons/Icon.js +1 -1
  39. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/constants/editorConfig.js +1 -1
  40. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/CommentPlugin/HTMLNode.js +1 -1
  41. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/DeleteNode.js +1 -1
  42. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/HighlightNode.js +2 -0
  43. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/HighlightNode.js.map +1 -0
  44. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/InitialHtml.js +1 -1
  45. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/InsertNode.js +1 -1
  46. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/InvisibleNode.js +2 -0
  47. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/InvisibleNode.js.map +1 -0
  48. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/LayoutPlugin.js +1 -1
  49. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/ManualNode.js +2 -0
  50. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/ManualNode.js.map +1 -0
  51. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/PreservedNode.js +2 -0
  52. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/PreservedNode.js.map +1 -0
  53. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/UpdateNode.js +2 -0
  54. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/UpdateNode.js.map +1 -0
  55. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/theme/theme.css.js +1 -1
  56. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/theme/theme.js +1 -1
  57. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/getSelectedNode.js +1 -1
  58. package/dist/cjs/features/RequirementAI/components/RichTextEditor/RichTextEditor.js +1 -1
  59. package/dist/cjs/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.js +2 -0
  60. package/dist/cjs/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.js.map +1 -0
  61. package/dist/cjs/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.module.css.js +2 -0
  62. package/dist/cjs/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.module.css.js.map +1 -0
  63. package/dist/cjs/features/RequirementAI/components/UserStoryCard/AttachedContext.js +1 -1
  64. package/dist/cjs/features/RequirementAI/components/UserStoryCard/AttachedContext.module.css.js +1 -1
  65. package/dist/cjs/features/RequirementAI/components/UserStoryCard/ClinicalTrialSection.js +2 -0
  66. package/dist/cjs/features/RequirementAI/components/UserStoryCard/ClinicalTrialSection.js.map +1 -0
  67. package/dist/cjs/features/RequirementAI/components/UserStoryCard/ClinicalTrialSection.module.css.js +2 -0
  68. package/dist/cjs/features/RequirementAI/components/UserStoryCard/ClinicalTrialSection.module.css.js.map +1 -0
  69. package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationAnchor.js +1 -1
  70. package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.js +1 -1
  71. package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/ResizableSplitPane.js +1 -1
  72. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.js +1 -1
  73. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/IterateComponent.js +1 -1
  74. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/ManualEditPopup.js +2 -0
  75. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/ManualEditPopup.js.map +1 -0
  76. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/PopupDefaults.js +1 -1
  77. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.js +1 -1
  78. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/ToneToggle.js +1 -1
  79. package/dist/cjs/features/RequirementAI/components/UserStoryCard/TitleEditor/TitleEditor.js +1 -1
  80. package/dist/cjs/features/RequirementAI/components/UserStoryCard/UserStoryCard.js +1 -1
  81. package/dist/cjs/features/RequirementAI/components/UserStoryCard/UserStoryCard.module.css.js +1 -1
  82. package/dist/cjs/features/RequirementAI/components/UserStoryCard/icons/PdfViewerIcons.js +1 -1
  83. package/dist/cjs/features/RequirementAI/components/ai-reasoning/AIReasonAccordion.js +1 -1
  84. package/dist/cjs/features/RequirementAI/components/ai-reasoning/AiReasonMarkdownWrapper.js +1 -1
  85. package/dist/cjs/features/RequirementAI/components/ai-reasoning/AiReasoningCitation.js +1 -1
  86. package/dist/cjs/features/RequirementAI/components/ai-reasoning/AiReasoningCitationContent.js +1 -1
  87. package/dist/cjs/features/RequirementAI/components/ai-reasoning/BigEnoughComponent.js +1 -1
  88. package/dist/cjs/features/RequirementAI/components/ai-reasoning/ScannedCitationRenderer.js +1 -1
  89. package/dist/cjs/features/RequirementAI/components/citations/appmod-citation/AppmodCitationContent.js +1 -1
  90. package/dist/cjs/features/RequirementAI/components/citations/appmod-citation/AppmodCitationRenderer.js +1 -1
  91. package/dist/cjs/features/RequirementAI/components/citations/appmod-citation/components/CodeLinkHandler.js +1 -1
  92. package/dist/cjs/features/RequirementAI/components/citations/appmod-citation/icons/AppmodIcon.js +1 -1
  93. package/dist/cjs/features/RequirementAI/components/citations/appmod-citation/icons/ChatBubbleIcon.js +1 -1
  94. package/dist/cjs/features/RequirementAI/components/citations/appmod-citation/icons/SparkleIcon.js +1 -1
  95. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/SearchWaveFromWrapper.js +1 -1
  96. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/WaveformCitationRenderer.js +1 -1
  97. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/components/AudioCitationIcon.js +1 -1
  98. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/components/AudioTimeLineSlider.js +1 -1
  99. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/components/SegmentByWordsViral.js +1 -1
  100. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/components/videoPlayer.js +1 -1
  101. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/AudioLinesIcon.js +1 -1
  102. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/MaximizeIcon.js +1 -1
  103. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/MinimizeIcon.js +1 -1
  104. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/PauseIcon.js +1 -1
  105. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/PlayIcon.js +1 -1
  106. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/PlaybackSpeedIcon.js +1 -1
  107. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/VideoIcon.js +1 -1
  108. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/searchwaveform.js +1 -1
  109. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/store/autoplay.wavefrom.js +1 -1
  110. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/utils/word-segment-util.js +1 -1
  111. package/dist/cjs/features/RequirementAI/components/citations/big-enough/BigEnoughCitationRenderer.js +1 -1
  112. package/dist/cjs/features/RequirementAI/components/citations/chat-citation/ChatCitationRenderer.js +1 -1
  113. package/dist/cjs/features/RequirementAI/components/citations/file-citation/DocumentCitationIcon.js +1 -1
  114. package/dist/cjs/features/RequirementAI/components/citations/file-citation/FileCitationContent.js +1 -1
  115. package/dist/cjs/features/RequirementAI/components/citations/file-citation/FileCitationRender.js +1 -1
  116. package/dist/cjs/features/RequirementAI/components/citations/gpt-web-citation/GptWebCitationRenderer.js +2 -0
  117. package/dist/cjs/features/RequirementAI/components/citations/gpt-web-citation/GptWebCitationRenderer.js.map +1 -0
  118. package/dist/cjs/features/RequirementAI/components/citations/gpt-web-citation/GptWebcitationPanel.js +2 -0
  119. package/dist/cjs/features/RequirementAI/components/citations/gpt-web-citation/GptWebcitationPanel.js.map +1 -0
  120. package/dist/cjs/features/RequirementAI/components/citations/image-citation/ImageCitationContent.js +1 -1
  121. package/dist/cjs/features/RequirementAI/components/citations/image-citation/ImageCitationIcon.js +1 -1
  122. package/dist/cjs/features/RequirementAI/components/citations/image-citation/ImageCitationRenderer.js +1 -1
  123. package/dist/cjs/features/RequirementAI/components/citations/rca-citation/RCACitationContent.js +1 -1
  124. package/dist/cjs/features/RequirementAI/components/citations/rca-citation/RCACitationRenderer.js +1 -1
  125. package/dist/cjs/features/RequirementAI/components/citations/readfile-citation/CustomFileIcon.js +1 -1
  126. package/dist/cjs/features/RequirementAI/components/citations/readfile-citation/ReadFileCitationContent.js +1 -1
  127. package/dist/cjs/features/RequirementAI/components/citations/readfile-citation/ReadFileCitationRenderer.js +1 -1
  128. package/dist/cjs/features/RequirementAI/components/citations/readfile-citation/icons/ExternalLinkIcon.js +1 -1
  129. package/dist/cjs/features/RequirementAI/components/citations/readfile-citation/icons/FileCodeIcon.js +1 -1
  130. package/dist/cjs/features/RequirementAI/components/citations/stormee-citation/StormeeCitationRenderer.js +1 -1
  131. package/dist/cjs/features/RequirementAI/components/citations/stormee-citation/StormeeContent.js +1 -1
  132. package/dist/cjs/features/RequirementAI/components/citations/stormee-citation/components/GradientButton.js +1 -1
  133. package/dist/cjs/features/RequirementAI/components/citations/stormee-citation/components/ProblemStatementCard.js +1 -1
  134. package/dist/cjs/features/RequirementAI/components/citations/web-citation/FullScreenIcon.js +1 -1
  135. package/dist/cjs/features/RequirementAI/components/citations/web-citation/ImagePreviewDialog.js +1 -1
  136. package/dist/cjs/features/RequirementAI/components/citations/web-citation/WebCitation.js +1 -1
  137. package/dist/cjs/features/RequirementAI/components/citations/web-citation/WebCitationIcon.js +1 -1
  138. package/dist/cjs/features/RequirementAI/components/citations/web-citation/WebCitationRenderer.js +1 -1
  139. package/dist/cjs/features/RequirementAI/components/citations/web-citation/WebCitationWithImageContent.js +1 -1
  140. package/dist/cjs/features/RequirementAI/components/citations/web-citation/WebCitationWithImageRenderer.js +1 -1
  141. package/dist/cjs/features/RequirementAI/components/cra/PartialRequirementContent.js +1 -1
  142. package/dist/cjs/features/RequirementAI/components/lsc-reason-gap/CustomChatCrRedirection.js +1 -1
  143. package/dist/cjs/features/RequirementAI/components/lsc-reason-gap/GapFilterBlock.js +1 -1
  144. package/dist/cjs/features/RequirementAI/components/lsc-reason-gap/GapFilterContentWrapper.js +1 -1
  145. package/dist/cjs/features/RequirementAI/components/lsc-reason-gap/GapFilterItem.js +1 -1
  146. package/dist/cjs/features/RequirementAI/components/lsc-reason-gap/gapFilterSvgs.js +1 -1
  147. package/dist/cjs/features/RequirementAI/components/segment/ExampleComponentWrapper.js +1 -1
  148. package/dist/cjs/features/RequirementAI/components/segment/Segment.js +1 -1
  149. package/dist/cjs/features/RequirementAI/components/segment/SegmentLoader.js +1 -1
  150. package/dist/cjs/features/RequirementAI/components/segment/SegmentWrapper.js +1 -1
  151. package/dist/cjs/features/RequirementAI/components/segment/segment-common.css.js +1 -1
  152. package/dist/cjs/features/RequirementAI/components/story-screen/BigEnoughPanel.js +1 -1
  153. package/dist/cjs/features/RequirementAI/components/story-screen/CompletionPanel.js +2 -0
  154. package/dist/cjs/features/RequirementAI/components/story-screen/CompletionPanel.js.map +1 -0
  155. package/dist/cjs/features/RequirementAI/components/story-screen/CompletionPanel.module.css.js +2 -0
  156. package/dist/cjs/features/RequirementAI/components/story-screen/CompletionPanel.module.css.js.map +1 -0
  157. package/dist/cjs/features/RequirementAI/components/story-screen/ReplaceLearnedTags.js +1 -1
  158. package/dist/cjs/features/RequirementAI/components/story-screen/StreamingScreenSidebar.js +1 -1
  159. package/dist/cjs/features/RequirementAI/components/story-screen/SubfeatureBlock.js +1 -1
  160. package/dist/cjs/features/RequirementAI/components/story-screen/UserStoryScreen.js +1 -1
  161. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalContext.js +1 -1
  162. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.js +1 -1
  163. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.module.css.js +1 -1
  164. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ApprovalBadge/ApprovalBadge.js +1 -1
  165. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ApprovalSidebar/ApprovalSidebar.js +1 -1
  166. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ApprovalSidebarItem/ApprovalSidebarItem.js +1 -1
  167. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ApprovalStatusBadge/ApprovalStatusBadge.js +1 -1
  168. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ContentBlock/ContentBlock.js +1 -1
  169. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ContentSegment/ContentSegment.js +1 -1
  170. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ContentSegment/ContentSegment.module.css.js +1 -1
  171. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.js +1 -1
  172. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.module.css.js +1 -1
  173. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/HighlightButtonComponent.js +2 -0
  174. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/HighlightButtonComponent.js.map +1 -0
  175. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/InlineManualComponent.js +2 -0
  176. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/InlineManualComponent.js.map +1 -0
  177. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/InlineManualComponent.module.css.js +2 -0
  178. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/InlineManualComponent.module.css.js.map +1 -0
  179. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.js +1 -1
  180. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.module.css.js +1 -1
  181. package/dist/cjs/features/RequirementAI/hooks/useApprovalStatus.js +1 -1
  182. package/dist/cjs/features/RequirementAI/hooks/useDiffEditReviewMode.js +1 -1
  183. package/dist/cjs/features/RequirementAI/hooks/useStreamContentHandler.js +1 -1
  184. package/dist/cjs/features/RequirementAI/icons/AiGapIcon.js +1 -1
  185. package/dist/cjs/features/RequirementAI/icons/AiReasoningIcon.js +1 -1
  186. package/dist/cjs/features/RequirementAI/icons/BigEnoughIcon.js +1 -1
  187. package/dist/cjs/features/RequirementAI/icons/BookmarkIcon.js +1 -1
  188. package/dist/cjs/features/RequirementAI/icons/BrainRed.js +1 -1
  189. package/dist/cjs/features/RequirementAI/icons/CDIcon.js +2 -0
  190. package/dist/cjs/features/RequirementAI/icons/CDIcon.js.map +1 -0
  191. package/dist/cjs/features/RequirementAI/icons/CheckIcon.js +1 -1
  192. package/dist/cjs/features/RequirementAI/icons/ChevronDownIcon.js +1 -1
  193. package/dist/cjs/features/RequirementAI/icons/ChevronUpIcon.js +1 -1
  194. package/dist/cjs/features/RequirementAI/icons/CognitiveDecision.js +1 -1
  195. package/dist/cjs/features/RequirementAI/icons/Illustration.svg.js +2 -0
  196. package/dist/cjs/features/RequirementAI/icons/Illustration.svg.js.map +1 -0
  197. package/dist/cjs/features/RequirementAI/icons/MeetingHighlightsIcon.js +1 -1
  198. package/dist/cjs/features/RequirementAI/icons/MenuUnfoldIcon.js +1 -1
  199. package/dist/cjs/features/RequirementAI/icons/PencilIcon.js +1 -1
  200. package/dist/cjs/features/RequirementAI/icons/ReasoningBulbIcon.js +1 -1
  201. package/dist/cjs/features/RequirementAI/icons/RelevanceScoreIcon.js +1 -1
  202. package/dist/cjs/features/RequirementAI/icons/SidebarCloseIcon.js +1 -1
  203. package/dist/cjs/features/RequirementAI/icons/SidebarOpenIcon.js +1 -1
  204. package/dist/cjs/features/RequirementAI/icons/TrashIcon.js +1 -1
  205. package/dist/cjs/features/RequirementAI/shared/Accordian.js +1 -1
  206. package/dist/cjs/features/RequirementAI/shared/AtomicButton.js +1 -1
  207. package/dist/cjs/features/RequirementAI/shared/CitationAIConfidenceDisplay.js +1 -1
  208. package/dist/cjs/features/RequirementAI/shared/CitationLoadingIndicator.js +1 -1
  209. package/dist/cjs/features/RequirementAI/shared/CodeViewer.js +1 -1
  210. package/dist/cjs/features/RequirementAI/shared/ExpandableOl.js +1 -1
  211. package/dist/cjs/features/RequirementAI/shared/GeneratedCodeCitation.js +1 -1
  212. package/dist/cjs/features/RequirementAI/shared/ReqAiCitationRenderer.js +1 -1
  213. package/dist/cjs/features/RequirementAI/shared/UpdatedAnimationContent.js +1 -1
  214. package/dist/cjs/features/RequirementAI/shared/useMarkdownSearch.js +1 -1
  215. package/dist/cjs/features/RequirementAI/store/markdown-context.js +1 -1
  216. package/dist/cjs/features/RequirementAI/store/ref.context.js +1 -1
  217. package/dist/cjs/features/RequirementAI/utils/css.utils.js +1 -1
  218. package/dist/cjs/features/RequirementAI/utils/diff-edit.utils.js +1 -1
  219. package/dist/cjs/features/RequirementAI/utils/helpers.js +1 -1
  220. package/dist/cjs/features/RequirementAI/utils/json-helper.js +1 -1
  221. package/dist/cjs/features/RequirementAI/utils/learned-tag.utils.js +1 -1
  222. package/dist/cjs/features/RequirementAI/utils/proccess-stream.utils.js +1 -1
  223. package/dist/cjs/features/RequirementAI/utils/user-story.utils.js +1 -1
  224. package/dist/cjs/features/RequirementAI/utils/userStoryAttachedContext.utils.js +1 -1
  225. package/dist/cjs/features/RequirementAI/utils/userstory-approval-transform.utils.js +1 -1
  226. package/dist/cjs/features/RequirementAI/utils/userstory-approval.utils.js +1 -1
  227. package/dist/cjs/features/RulebookCitations/RuleBookCitationApi.js +1 -1
  228. package/dist/cjs/features/RulebookCitations/RuleBookCitationWrapper.js +1 -1
  229. package/dist/cjs/features/UserStoryImport/UserStoryPicker.context.js +1 -1
  230. package/dist/cjs/features/UserStoryImport/UserStoryPicker.js +1 -1
  231. package/dist/cjs/features/UserStoryImport/UserStoryPicker.theme.js +1 -1
  232. package/dist/cjs/features/UserStoryImport/components/BackNav.js +1 -1
  233. package/dist/cjs/features/UserStoryImport/components/Badge.js +1 -1
  234. package/dist/cjs/features/UserStoryImport/components/BrowseProjectsButton.js +1 -1
  235. package/dist/cjs/features/UserStoryImport/components/CardGrid.js +1 -1
  236. package/dist/cjs/features/UserStoryImport/components/CardProceedButton.js +1 -1
  237. package/dist/cjs/features/UserStoryImport/components/ContentArea.js +1 -1
  238. package/dist/cjs/features/UserStoryImport/components/Footer.js +1 -1
  239. package/dist/cjs/features/UserStoryImport/components/Header.js +1 -1
  240. package/dist/cjs/features/UserStoryImport/components/NavRow.js +1 -1
  241. package/dist/cjs/features/UserStoryImport/components/ProceedButton.js +1 -1
  242. package/dist/cjs/features/UserStoryImport/components/ProjectCard.js +1 -1
  243. package/dist/cjs/features/UserStoryImport/components/ResizeHandle.js +1 -1
  244. package/dist/cjs/features/UserStoryImport/components/ScopeDropdown.js +1 -1
  245. package/dist/cjs/features/UserStoryImport/components/SearchInput.js +1 -1
  246. package/dist/cjs/features/UserStoryImport/components/SectionHeading.js +1 -1
  247. package/dist/cjs/features/UserStoryImport/components/ShowMore.js +1 -1
  248. package/dist/cjs/features/UserStoryImport/components/Sidebar.js +1 -1
  249. package/dist/cjs/features/UserStoryImport/components/SidebarFavoritesList.js +1 -1
  250. package/dist/cjs/features/UserStoryImport/components/SidebarProjectList.js +1 -1
  251. package/dist/cjs/features/UserStoryImport/components/SidebarSection.js +1 -1
  252. package/dist/cjs/features/UserStoryImport/components/SortDropdown.js +1 -1
  253. package/dist/cjs/features/UserStoryImport/components/SplitLayout.js +1 -1
  254. package/dist/cjs/features/UserStoryImport/components/Toolbar.js +1 -1
  255. package/dist/cjs/features/UserStoryImport/components/TypeDropdown.js +1 -1
  256. package/dist/cjs/features/UserStoryImport/components/UserStoryCard.js +1 -1
  257. package/dist/cjs/features/UserStoryImport/components/UserStoryImportDialog.js +1 -1
  258. package/dist/cjs/features/UserStoryImport/components/UserStoryScopeDropdown.js +1 -1
  259. package/dist/cjs/features/UserStoryImport/components/usePanelResize.js +1 -1
  260. package/dist/cjs/features/UserStoryImport/hooks/useFilteredItems.js +1 -1
  261. package/dist/cjs/features/UserStoryImport/hooks/useUSPData.js +1 -1
  262. package/dist/cjs/features/UserStoryImport/hooks/useUserStoryPickerState.js +1 -1
  263. package/dist/cjs/features/UserStoryImport/index.js +1 -1
  264. package/dist/cjs/features/UserStoryImport/lib/CustomTooltip.js +1 -1
  265. package/dist/cjs/features/UserStoryImport/lib/Tooltip.js +1 -1
  266. package/dist/cjs/features/UserStoryImport/lib/cn.js +1 -1
  267. package/dist/cjs/features/UserStoryImport/lib/dialog.js +1 -1
  268. package/dist/cjs/index.js +1 -1
  269. package/dist/cjs/service/redlineService.js +2 -0
  270. package/dist/cjs/service/redlineService.js.map +1 -0
  271. package/dist/features/CognitiveCompare/CognitiveComparehelpers.js +1 -1
  272. package/dist/features/CognitiveCompare/components/SectionAccordion.js +1 -1
  273. package/dist/features/CognitiveCompare/components/SubSectionAccordion.js +1 -1
  274. package/dist/features/CognitiveCompare/hooks/useCompareData.js +1 -1
  275. package/dist/features/CognitiveCompare/hooks/useLinesCalculator.js +1 -1
  276. package/dist/features/GptWebCitation/GptWebCitation.js +1 -1
  277. package/dist/features/GptWebCitation/GptWebCitation.module.css.js +1 -1
  278. package/dist/features/GptWebCitation/GptWebCitationImageCitation.js +1 -1
  279. package/dist/features/GptWebCitation/GptWebCitationImageFullScreenView.js +1 -1
  280. package/dist/features/GptWebCitation/GptWebCitationSkeleton.js +1 -1
  281. package/dist/features/GptWebCitation/types.js +2 -0
  282. package/dist/features/GptWebCitation/types.js.map +1 -0
  283. package/dist/features/GptWebCitation/utils/citationData.utils.js +1 -1
  284. package/dist/features/GptWebCitation/utils/fixedHeight.utils.js +2 -0
  285. package/dist/features/GptWebCitation/utils/fixedHeight.utils.js.map +1 -0
  286. package/dist/features/GptWebCitation/utils/styleOverrides.utils.js +2 -0
  287. package/dist/features/GptWebCitation/utils/styleOverrides.utils.js.map +1 -0
  288. package/dist/features/IngestionStatus/IngestionStatusComponent.js +1 -1
  289. package/dist/features/RequirementAI/components/CustomPopover/CustomPopover.js +1 -1
  290. package/dist/features/RequirementAI/components/GapRiskSidebar/GapRiskSidebar.js +1 -1
  291. package/dist/features/RequirementAI/components/GapRiskSidebar/components/GapItem/GapItem.js +1 -1
  292. package/dist/features/RequirementAI/components/GapRiskSidebar/components/RiskCategorySection/RiskCategorySection.js +1 -1
  293. package/dist/features/RequirementAI/components/GapRiskSidebar/components/RiskSidebarCategorySection/RiskSidebarCategorySection.js +1 -1
  294. package/dist/features/RequirementAI/components/GapRiskSidebar/components/StoryNode/StoryNode.js +1 -1
  295. package/dist/features/RequirementAI/components/GapRiskSidebar/utils/buildStoryWithGap.js +1 -1
  296. package/dist/features/RequirementAI/components/GapRiskSidebar/utils/buildStoryWithRisk.js +1 -1
  297. package/dist/features/RequirementAI/components/RecommendationBlock/RecommendationBlock.js +1 -1
  298. package/dist/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.js +1 -1
  299. package/dist/features/RequirementAI/components/RichTextEditor/Editor/Editor.js +1 -1
  300. package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/Context/ContextMenu.js +1 -1
  301. package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/EditorContainer/EditorContainer.js +1 -1
  302. package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/EditorPlaceholder/EditorPlaceholder.js +1 -1
  303. package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/EditorToolbar.js +1 -1
  304. package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/components/ToolbarButton/ToolbarButton.js +1 -1
  305. package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/components/ToolbarDivider/ToolbarDivider.js +1 -1
  306. package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/components/UndoRedo/UndoRedo.js +1 -1
  307. package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/Icons/Icon.js +1 -1
  308. package/dist/features/RequirementAI/components/RichTextEditor/Editor/constants/editorConfig.js +1 -1
  309. package/dist/features/RequirementAI/components/RichTextEditor/Editor/constants/objects.js +1 -1
  310. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/CommentPlugin/HTMLNode.js +1 -1
  311. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/DeleteNode.js +1 -1
  312. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/HighlightNode.js +2 -0
  313. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/HighlightNode.js.map +1 -0
  314. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/InitialHtml.js +1 -1
  315. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/InsertNode.js +1 -1
  316. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/InvisibleNode.js +2 -0
  317. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/InvisibleNode.js.map +1 -0
  318. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/LayoutPlugin.js +1 -1
  319. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/ManualNode.js +2 -0
  320. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/ManualNode.js.map +1 -0
  321. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/PreservedNode.js +2 -0
  322. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/PreservedNode.js.map +1 -0
  323. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/UpdateNode.js +2 -0
  324. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/UpdateNode.js.map +1 -0
  325. package/dist/features/RequirementAI/components/RichTextEditor/Editor/theme/theme.css.js +1 -1
  326. package/dist/features/RequirementAI/components/RichTextEditor/Editor/theme/theme.js +1 -1
  327. package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/getSelectedNode.js +1 -1
  328. package/dist/features/RequirementAI/components/RichTextEditor/RichTextEditor.js +1 -1
  329. package/dist/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.js +2 -0
  330. package/dist/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.js.map +1 -0
  331. package/dist/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.module.css.js +2 -0
  332. package/dist/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.module.css.js.map +1 -0
  333. package/dist/features/RequirementAI/components/UserStoryCard/AttachedContext.js +1 -1
  334. package/dist/features/RequirementAI/components/UserStoryCard/AttachedContext.module.css.js +1 -1
  335. package/dist/features/RequirementAI/components/UserStoryCard/ClinicalTrialSection.js +2 -0
  336. package/dist/features/RequirementAI/components/UserStoryCard/ClinicalTrialSection.js.map +1 -0
  337. package/dist/features/RequirementAI/components/UserStoryCard/ClinicalTrialSection.module.css.js +2 -0
  338. package/dist/features/RequirementAI/components/UserStoryCard/ClinicalTrialSection.module.css.js.map +1 -0
  339. package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationAnchor.js +1 -1
  340. package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.js +1 -1
  341. package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/ResizableSplitPane.js +1 -1
  342. package/dist/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.js +1 -1
  343. package/dist/features/RequirementAI/components/UserStoryCard/Popups/IterateComponent.js +1 -1
  344. package/dist/features/RequirementAI/components/UserStoryCard/Popups/ManualEditPopup.js +2 -0
  345. package/dist/features/RequirementAI/components/UserStoryCard/Popups/ManualEditPopup.js.map +1 -0
  346. package/dist/features/RequirementAI/components/UserStoryCard/Popups/PopupDefaults.js +1 -1
  347. package/dist/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.js +1 -1
  348. package/dist/features/RequirementAI/components/UserStoryCard/Popups/ToneToggle.js +1 -1
  349. package/dist/features/RequirementAI/components/UserStoryCard/TitleEditor/TitleEditor.js +1 -1
  350. package/dist/features/RequirementAI/components/UserStoryCard/UserStoryCard.js +1 -1
  351. package/dist/features/RequirementAI/components/UserStoryCard/UserStoryCard.module.css.js +1 -1
  352. package/dist/features/RequirementAI/components/UserStoryCard/icons/PdfViewerIcons.js +1 -1
  353. package/dist/features/RequirementAI/components/ai-reasoning/AIReasonAccordion.js +1 -1
  354. package/dist/features/RequirementAI/components/ai-reasoning/AiReasonMarkdownWrapper.js +1 -1
  355. package/dist/features/RequirementAI/components/ai-reasoning/AiReasoningCitation.js +1 -1
  356. package/dist/features/RequirementAI/components/ai-reasoning/AiReasoningCitationContent.js +1 -1
  357. package/dist/features/RequirementAI/components/ai-reasoning/BigEnoughComponent.js +1 -1
  358. package/dist/features/RequirementAI/components/ai-reasoning/ScannedCitationRenderer.js +1 -1
  359. package/dist/features/RequirementAI/components/citations/appmod-citation/AppmodCitationContent.js +1 -1
  360. package/dist/features/RequirementAI/components/citations/appmod-citation/AppmodCitationRenderer.js +1 -1
  361. package/dist/features/RequirementAI/components/citations/appmod-citation/components/CodeLinkHandler.js +1 -1
  362. package/dist/features/RequirementAI/components/citations/appmod-citation/icons/AppmodIcon.js +1 -1
  363. package/dist/features/RequirementAI/components/citations/appmod-citation/icons/ChatBubbleIcon.js +1 -1
  364. package/dist/features/RequirementAI/components/citations/appmod-citation/icons/SparkleIcon.js +1 -1
  365. package/dist/features/RequirementAI/components/citations/appmod-citation/types.js +1 -1
  366. package/dist/features/RequirementAI/components/citations/audio-citation/SearchWaveFromWrapper.js +1 -1
  367. package/dist/features/RequirementAI/components/citations/audio-citation/WaveformCitationRenderer.js +1 -1
  368. package/dist/features/RequirementAI/components/citations/audio-citation/components/AudioCitationIcon.js +1 -1
  369. package/dist/features/RequirementAI/components/citations/audio-citation/components/AudioTimeLineSlider.js +1 -1
  370. package/dist/features/RequirementAI/components/citations/audio-citation/components/SegmentByWordsViral.js +1 -1
  371. package/dist/features/RequirementAI/components/citations/audio-citation/components/videoPlayer.js +1 -1
  372. package/dist/features/RequirementAI/components/citations/audio-citation/icons/AudioLinesIcon.js +1 -1
  373. package/dist/features/RequirementAI/components/citations/audio-citation/icons/MaximizeIcon.js +1 -1
  374. package/dist/features/RequirementAI/components/citations/audio-citation/icons/MinimizeIcon.js +1 -1
  375. package/dist/features/RequirementAI/components/citations/audio-citation/icons/PauseIcon.js +1 -1
  376. package/dist/features/RequirementAI/components/citations/audio-citation/icons/PlayIcon.js +1 -1
  377. package/dist/features/RequirementAI/components/citations/audio-citation/icons/PlaybackSpeedIcon.js +1 -1
  378. package/dist/features/RequirementAI/components/citations/audio-citation/icons/VideoIcon.js +1 -1
  379. package/dist/features/RequirementAI/components/citations/audio-citation/searchwaveform.js +1 -1
  380. package/dist/features/RequirementAI/components/citations/audio-citation/store/autoplay.wavefrom.js +1 -1
  381. package/dist/features/RequirementAI/components/citations/audio-citation/utils/word-segment-util.js +1 -1
  382. package/dist/features/RequirementAI/components/citations/big-enough/BigEnoughCitationRenderer.js +1 -1
  383. package/dist/features/RequirementAI/components/citations/chat-citation/ChatCitationRenderer.js +1 -1
  384. package/dist/features/RequirementAI/components/citations/file-citation/DocumentCitationIcon.js +1 -1
  385. package/dist/features/RequirementAI/components/citations/file-citation/FileCitationContent.js +1 -1
  386. package/dist/features/RequirementAI/components/citations/file-citation/FileCitationRender.js +1 -1
  387. package/dist/features/RequirementAI/components/citations/gpt-web-citation/GptWebCitationRenderer.js +2 -0
  388. package/dist/features/RequirementAI/components/citations/gpt-web-citation/GptWebCitationRenderer.js.map +1 -0
  389. package/dist/features/RequirementAI/components/citations/gpt-web-citation/GptWebcitationPanel.js +2 -0
  390. package/dist/features/RequirementAI/components/citations/gpt-web-citation/GptWebcitationPanel.js.map +1 -0
  391. package/dist/features/RequirementAI/components/citations/image-citation/ImageCitationContent.js +1 -1
  392. package/dist/features/RequirementAI/components/citations/image-citation/ImageCitationIcon.js +1 -1
  393. package/dist/features/RequirementAI/components/citations/image-citation/ImageCitationRenderer.js +1 -1
  394. package/dist/features/RequirementAI/components/citations/rca-citation/RCACitationContent.js +1 -1
  395. package/dist/features/RequirementAI/components/citations/rca-citation/RCACitationRenderer.js +1 -1
  396. package/dist/features/RequirementAI/components/citations/readfile-citation/CustomFileIcon.js +1 -1
  397. package/dist/features/RequirementAI/components/citations/readfile-citation/ReadFileCitationContent.js +1 -1
  398. package/dist/features/RequirementAI/components/citations/readfile-citation/ReadFileCitationRenderer.js +1 -1
  399. package/dist/features/RequirementAI/components/citations/readfile-citation/icons/ExternalLinkIcon.js +1 -1
  400. package/dist/features/RequirementAI/components/citations/readfile-citation/icons/FileCodeIcon.js +1 -1
  401. package/dist/features/RequirementAI/components/citations/stormee-citation/StormeeCitationRenderer.js +1 -1
  402. package/dist/features/RequirementAI/components/citations/stormee-citation/StormeeContent.js +1 -1
  403. package/dist/features/RequirementAI/components/citations/stormee-citation/components/GradientButton.js +1 -1
  404. package/dist/features/RequirementAI/components/citations/stormee-citation/components/ProblemStatementCard.js +1 -1
  405. package/dist/features/RequirementAI/components/citations/web-citation/FullScreenIcon.js +1 -1
  406. package/dist/features/RequirementAI/components/citations/web-citation/ImagePreviewDialog.js +1 -1
  407. package/dist/features/RequirementAI/components/citations/web-citation/WebCitation.js +1 -1
  408. package/dist/features/RequirementAI/components/citations/web-citation/WebCitationIcon.js +1 -1
  409. package/dist/features/RequirementAI/components/citations/web-citation/WebCitationRenderer.js +1 -1
  410. package/dist/features/RequirementAI/components/citations/web-citation/WebCitationWithImageContent.js +1 -1
  411. package/dist/features/RequirementAI/components/citations/web-citation/WebCitationWithImageRenderer.js +1 -1
  412. package/dist/features/RequirementAI/components/cra/PartialRequirementContent.js +1 -1
  413. package/dist/features/RequirementAI/components/lsc-reason-gap/CustomChatCrRedirection.js +1 -1
  414. package/dist/features/RequirementAI/components/lsc-reason-gap/GapFilterBlock.js +1 -1
  415. package/dist/features/RequirementAI/components/lsc-reason-gap/GapFilterContentWrapper.js +1 -1
  416. package/dist/features/RequirementAI/components/lsc-reason-gap/GapFilterItem.js +1 -1
  417. package/dist/features/RequirementAI/components/lsc-reason-gap/gapFilterSvgs.js +1 -1
  418. package/dist/features/RequirementAI/components/segment/ExampleComponentWrapper.js +1 -1
  419. package/dist/features/RequirementAI/components/segment/Segment.js +1 -1
  420. package/dist/features/RequirementAI/components/segment/SegmentLoader.js +1 -1
  421. package/dist/features/RequirementAI/components/segment/SegmentWrapper.js +1 -1
  422. package/dist/features/RequirementAI/components/segment/segment-common.css.js +1 -1
  423. package/dist/features/RequirementAI/components/story-screen/BigEnoughPanel.js +1 -1
  424. package/dist/features/RequirementAI/components/story-screen/CompletionPanel.js +2 -0
  425. package/dist/features/RequirementAI/components/story-screen/CompletionPanel.js.map +1 -0
  426. package/dist/features/RequirementAI/components/story-screen/CompletionPanel.module.css.js +2 -0
  427. package/dist/features/RequirementAI/components/story-screen/CompletionPanel.module.css.js.map +1 -0
  428. package/dist/features/RequirementAI/components/story-screen/ReplaceLearnedTags.js +1 -1
  429. package/dist/features/RequirementAI/components/story-screen/StreamingScreenSidebar.js +1 -1
  430. package/dist/features/RequirementAI/components/story-screen/SubfeatureBlock.js +1 -1
  431. package/dist/features/RequirementAI/components/story-screen/UserStoryScreen.js +1 -1
  432. package/dist/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalContext.js +1 -1
  433. package/dist/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.js +1 -1
  434. package/dist/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.module.css.js +1 -1
  435. package/dist/features/RequirementAI/components/userstory-approval-screen/components/ApprovalBadge/ApprovalBadge.js +1 -1
  436. package/dist/features/RequirementAI/components/userstory-approval-screen/components/ApprovalSidebar/ApprovalSidebar.js +1 -1
  437. package/dist/features/RequirementAI/components/userstory-approval-screen/components/ApprovalSidebarItem/ApprovalSidebarItem.js +1 -1
  438. package/dist/features/RequirementAI/components/userstory-approval-screen/components/ApprovalStatusBadge/ApprovalStatusBadge.js +1 -1
  439. package/dist/features/RequirementAI/components/userstory-approval-screen/components/ContentBlock/ContentBlock.js +1 -1
  440. package/dist/features/RequirementAI/components/userstory-approval-screen/components/ContentSegment/ContentSegment.js +1 -1
  441. package/dist/features/RequirementAI/components/userstory-approval-screen/components/ContentSegment/ContentSegment.module.css.js +1 -1
  442. package/dist/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.js +1 -1
  443. package/dist/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.module.css.js +1 -1
  444. package/dist/features/RequirementAI/components/userstory-with-citation/components/HighlightButtonComponent.js +2 -0
  445. package/dist/features/RequirementAI/components/userstory-with-citation/components/HighlightButtonComponent.js.map +1 -0
  446. package/dist/features/RequirementAI/components/userstory-with-citation/components/InlineManualComponent.js +2 -0
  447. package/dist/features/RequirementAI/components/userstory-with-citation/components/InlineManualComponent.js.map +1 -0
  448. package/dist/features/RequirementAI/components/userstory-with-citation/components/InlineManualComponent.module.css.js +2 -0
  449. package/dist/features/RequirementAI/components/userstory-with-citation/components/InlineManualComponent.module.css.js.map +1 -0
  450. package/dist/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.js +1 -1
  451. package/dist/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.module.css.js +1 -1
  452. package/dist/features/RequirementAI/hooks/useApprovalStatus.js +1 -1
  453. package/dist/features/RequirementAI/hooks/useDiffEditReviewMode.js +1 -1
  454. package/dist/features/RequirementAI/hooks/useStreamContentHandler.js +1 -1
  455. package/dist/features/RequirementAI/icons/AiGapIcon.js +1 -1
  456. package/dist/features/RequirementAI/icons/AiReasoningIcon.js +1 -1
  457. package/dist/features/RequirementAI/icons/BigEnoughIcon.js +1 -1
  458. package/dist/features/RequirementAI/icons/BookmarkIcon.js +1 -1
  459. package/dist/features/RequirementAI/icons/BrainRed.js +1 -1
  460. package/dist/features/RequirementAI/icons/CDIcon.js +2 -0
  461. package/dist/features/RequirementAI/icons/CDIcon.js.map +1 -0
  462. package/dist/features/RequirementAI/icons/CheckIcon.js +1 -1
  463. package/dist/features/RequirementAI/icons/ChevronDownIcon.js +1 -1
  464. package/dist/features/RequirementAI/icons/ChevronUpIcon.js +1 -1
  465. package/dist/features/RequirementAI/icons/CognitiveDecision.js +1 -1
  466. package/dist/features/RequirementAI/icons/Illustration.svg.js +2 -0
  467. package/dist/features/RequirementAI/icons/Illustration.svg.js.map +1 -0
  468. package/dist/features/RequirementAI/icons/MeetingHighlightsIcon.js +1 -1
  469. package/dist/features/RequirementAI/icons/MenuUnfoldIcon.js +1 -1
  470. package/dist/features/RequirementAI/icons/PencilIcon.js +1 -1
  471. package/dist/features/RequirementAI/icons/ReasoningBulbIcon.js +1 -1
  472. package/dist/features/RequirementAI/icons/RelevanceScoreIcon.js +1 -1
  473. package/dist/features/RequirementAI/icons/SidebarCloseIcon.js +1 -1
  474. package/dist/features/RequirementAI/icons/SidebarOpenIcon.js +1 -1
  475. package/dist/features/RequirementAI/icons/TrashIcon.js +1 -1
  476. package/dist/features/RequirementAI/shared/Accordian.js +1 -1
  477. package/dist/features/RequirementAI/shared/AtomicButton.js +1 -1
  478. package/dist/features/RequirementAI/shared/CitationAIConfidenceDisplay.js +1 -1
  479. package/dist/features/RequirementAI/shared/CitationLoadingIndicator.js +1 -1
  480. package/dist/features/RequirementAI/shared/CodeViewer.js +1 -1
  481. package/dist/features/RequirementAI/shared/ExpandableOl.js +1 -1
  482. package/dist/features/RequirementAI/shared/GeneratedCodeCitation.js +1 -1
  483. package/dist/features/RequirementAI/shared/ReqAiCitationRenderer.js +1 -1
  484. package/dist/features/RequirementAI/shared/UpdatedAnimationContent.js +1 -1
  485. package/dist/features/RequirementAI/shared/useMarkdownSearch.js +1 -1
  486. package/dist/features/RequirementAI/store/markdown-context.js +1 -1
  487. package/dist/features/RequirementAI/store/ref.context.js +1 -1
  488. package/dist/features/RequirementAI/utils/css.utils.js +1 -1
  489. package/dist/features/RequirementAI/utils/diff-edit.utils.js +1 -1
  490. package/dist/features/RequirementAI/utils/helpers.js +1 -1
  491. package/dist/features/RequirementAI/utils/json-helper.js +1 -1
  492. package/dist/features/RequirementAI/utils/learned-tag.utils.js +1 -1
  493. package/dist/features/RequirementAI/utils/proccess-stream.utils.js +1 -1
  494. package/dist/features/RequirementAI/utils/user-story.utils.js +1 -1
  495. package/dist/features/RequirementAI/utils/userStoryAttachedContext.utils.js +1 -1
  496. package/dist/features/RequirementAI/utils/userstory-approval-transform.utils.js +1 -1
  497. package/dist/features/RequirementAI/utils/userstory-approval.utils.js +1 -1
  498. package/dist/features/RulebookCitations/RuleBookCitationApi.js +1 -1
  499. package/dist/features/RulebookCitations/RuleBookCitationWrapper.js +1 -1
  500. package/dist/features/UserStoryImport/UserStoryPicker.context.js +1 -1
  501. package/dist/features/UserStoryImport/UserStoryPicker.js +1 -1
  502. package/dist/features/UserStoryImport/UserStoryPicker.theme.js +1 -1
  503. package/dist/features/UserStoryImport/components/BackNav.js +1 -1
  504. package/dist/features/UserStoryImport/components/Badge.js +1 -1
  505. package/dist/features/UserStoryImport/components/BrowseProjectsButton.js +1 -1
  506. package/dist/features/UserStoryImport/components/CardGrid.js +1 -1
  507. package/dist/features/UserStoryImport/components/CardProceedButton.js +1 -1
  508. package/dist/features/UserStoryImport/components/ContentArea.js +1 -1
  509. package/dist/features/UserStoryImport/components/Footer.js +1 -1
  510. package/dist/features/UserStoryImport/components/Header.js +1 -1
  511. package/dist/features/UserStoryImport/components/NavRow.js +1 -1
  512. package/dist/features/UserStoryImport/components/ProceedButton.js +1 -1
  513. package/dist/features/UserStoryImport/components/ProjectCard.js +1 -1
  514. package/dist/features/UserStoryImport/components/ResizeHandle.js +1 -1
  515. package/dist/features/UserStoryImport/components/ScopeDropdown.js +1 -1
  516. package/dist/features/UserStoryImport/components/SearchInput.js +1 -1
  517. package/dist/features/UserStoryImport/components/SectionHeading.js +1 -1
  518. package/dist/features/UserStoryImport/components/ShowMore.js +1 -1
  519. package/dist/features/UserStoryImport/components/Sidebar.js +1 -1
  520. package/dist/features/UserStoryImport/components/SidebarFavoritesList.js +1 -1
  521. package/dist/features/UserStoryImport/components/SidebarProjectList.js +1 -1
  522. package/dist/features/UserStoryImport/components/SidebarSection.js +1 -1
  523. package/dist/features/UserStoryImport/components/SortDropdown.js +1 -1
  524. package/dist/features/UserStoryImport/components/SplitLayout.js +1 -1
  525. package/dist/features/UserStoryImport/components/Toolbar.js +1 -1
  526. package/dist/features/UserStoryImport/components/TypeDropdown.js +1 -1
  527. package/dist/features/UserStoryImport/components/UserStoryCard.js +1 -1
  528. package/dist/features/UserStoryImport/components/UserStoryImportDialog.js +1 -1
  529. package/dist/features/UserStoryImport/components/UserStoryScopeDropdown.js +1 -1
  530. package/dist/features/UserStoryImport/components/usePanelResize.js +1 -1
  531. package/dist/features/UserStoryImport/hooks/useFilteredItems.js +1 -1
  532. package/dist/features/UserStoryImport/hooks/useUSPData.js +1 -1
  533. package/dist/features/UserStoryImport/hooks/useUserStoryPickerState.js +1 -1
  534. package/dist/features/UserStoryImport/index.js +1 -1
  535. package/dist/features/UserStoryImport/lib/CustomTooltip.js +1 -1
  536. package/dist/features/UserStoryImport/lib/Tooltip.js +1 -1
  537. package/dist/features/UserStoryImport/lib/cn.js +1 -1
  538. package/dist/features/UserStoryImport/lib/dialog.js +1 -1
  539. package/dist/index.js +1 -1
  540. package/dist/service/redlineService.js +2 -0
  541. package/dist/service/redlineService.js.map +1 -0
  542. package/dist/types/src/Background.d.ts +7 -0
  543. package/dist/types/src/Background.d.ts.map +1 -0
  544. package/dist/types/src/DeviationSummaryTest.d.ts +2 -0
  545. package/dist/types/src/DeviationSummaryTest.d.ts.map +1 -0
  546. package/dist/types/src/RedlineEditorTest.d.ts +3 -0
  547. package/dist/types/src/RedlineEditorTest.d.ts.map +1 -0
  548. package/dist/types/src/RequirementAiTest.d.ts.map +1 -1
  549. package/dist/types/src/features/CognitiveCompare/CognitiveCompareTypes.d.ts +5 -0
  550. package/dist/types/src/features/CognitiveCompare/CognitiveCompareTypes.d.ts.map +1 -1
  551. package/dist/types/src/features/CognitiveCompare/CognitiveComparehelpers.d.ts +9 -1
  552. package/dist/types/src/features/CognitiveCompare/CognitiveComparehelpers.d.ts.map +1 -1
  553. package/dist/types/src/features/CognitiveCompare/components/SectionAccordion.d.ts.map +1 -1
  554. package/dist/types/src/features/CognitiveCompare/components/SubSectionAccordion.d.ts.map +1 -1
  555. package/dist/types/src/features/CognitiveCompare/hooks/useCompareData.d.ts.map +1 -1
  556. package/dist/types/src/features/CognitiveCompare/hooks/useLinesCalculator.d.ts.map +1 -1
  557. package/dist/types/src/features/GptWebCitation/GptWebCitation.d.ts +10 -0
  558. package/dist/types/src/features/GptWebCitation/GptWebCitation.d.ts.map +1 -1
  559. package/dist/types/src/features/GptWebCitation/GptWebCitationImageCitation.d.ts +9 -1
  560. package/dist/types/src/features/GptWebCitation/GptWebCitationImageCitation.d.ts.map +1 -1
  561. package/dist/types/src/features/GptWebCitation/GptWebCitationImageFullScreenView.d.ts +3 -1
  562. package/dist/types/src/features/GptWebCitation/GptWebCitationImageFullScreenView.d.ts.map +1 -1
  563. package/dist/types/src/features/GptWebCitation/GptWebCitationSkeleton.d.ts +12 -1
  564. package/dist/types/src/features/GptWebCitation/GptWebCitationSkeleton.d.ts.map +1 -1
  565. package/dist/types/src/features/GptWebCitation/GptWebCitationTest.d.ts +1 -1
  566. package/dist/types/src/features/GptWebCitation/GptWebCitationTest.d.ts.map +1 -1
  567. package/dist/types/src/features/GptWebCitation/WebCitationSampleResponse.d.ts.map +1 -1
  568. package/dist/types/src/features/GptWebCitation/types.d.ts +313 -20
  569. package/dist/types/src/features/GptWebCitation/types.d.ts.map +1 -1
  570. package/dist/types/src/features/GptWebCitation/utils/citationData.utils.d.ts +2 -0
  571. package/dist/types/src/features/GptWebCitation/utils/citationData.utils.d.ts.map +1 -1
  572. package/dist/types/src/features/GptWebCitation/utils/fixedHeight.utils.d.ts +10 -0
  573. package/dist/types/src/features/GptWebCitation/utils/fixedHeight.utils.d.ts.map +1 -0
  574. package/dist/types/src/features/GptWebCitation/utils/styleOverrides.utils.d.ts +6 -0
  575. package/dist/types/src/features/GptWebCitation/utils/styleOverrides.utils.d.ts.map +1 -0
  576. package/dist/types/src/features/IngestionStatus/IngestionStatusComponent.d.ts +2 -0
  577. package/dist/types/src/features/IngestionStatus/IngestionStatusComponent.d.ts.map +1 -1
  578. package/dist/types/src/features/IngestionStatus/IngestionStatusComponentTest.d.ts.map +1 -1
  579. package/dist/types/src/features/RequirementAI/components/GapRiskSidebar/components/StoryNode/StoryNode.d.ts.map +1 -1
  580. package/dist/types/src/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.d.ts +156 -3
  581. package/dist/types/src/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.d.ts.map +1 -1
  582. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/Editor.d.ts +2 -1
  583. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/Editor.d.ts.map +1 -1
  584. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/DeleteNode.d.ts +1 -4
  585. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/DeleteNode.d.ts.map +1 -1
  586. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/HighlightNode.d.ts +44 -0
  587. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/HighlightNode.d.ts.map +1 -0
  588. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/InitialHtml.d.ts.map +1 -1
  589. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/InsertNode.d.ts +4 -3
  590. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/InsertNode.d.ts.map +1 -1
  591. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/InvisibleNode.d.ts +35 -0
  592. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/InvisibleNode.d.ts.map +1 -0
  593. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/ManualNode.d.ts +25 -0
  594. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/ManualNode.d.ts.map +1 -0
  595. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/PreservedNode.d.ts +23 -0
  596. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/PreservedNode.d.ts.map +1 -0
  597. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/UpdateNode.d.ts +25 -0
  598. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/UpdateNode.d.ts.map +1 -0
  599. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/theme/PlaygroundEditorTheme.d.ts.map +1 -1
  600. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/theme/theme.d.ts.map +1 -1
  601. package/dist/types/src/features/RequirementAI/components/RichTextEditor/RichTextEditor.d.ts +9 -1
  602. package/dist/types/src/features/RequirementAI/components/RichTextEditor/RichTextEditor.d.ts.map +1 -1
  603. package/dist/types/src/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.d.ts +8 -0
  604. package/dist/types/src/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.d.ts.map +1 -0
  605. package/dist/types/src/features/RequirementAI/components/UserStoryCard/ClinicalTrialSection.d.ts +29 -0
  606. package/dist/types/src/features/RequirementAI/components/UserStoryCard/ClinicalTrialSection.d.ts.map +1 -0
  607. package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.d.ts +8 -3
  608. package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.d.ts.map +1 -1
  609. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.d.ts +44 -4
  610. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.d.ts.map +1 -1
  611. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/ManualEditPopup.d.ts +25 -0
  612. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/ManualEditPopup.d.ts.map +1 -0
  613. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.d.ts +17 -3
  614. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.d.ts.map +1 -1
  615. package/dist/types/src/features/RequirementAI/components/UserStoryCard/UserStoryCard.d.ts +35 -2
  616. package/dist/types/src/features/RequirementAI/components/UserStoryCard/UserStoryCard.d.ts.map +1 -1
  617. package/dist/types/src/features/RequirementAI/components/ai-reasoning/AiReasonMarkdownWrapper.d.ts.map +1 -1
  618. package/dist/types/src/features/RequirementAI/components/citations/gpt-web-citation/GptWebCitationRenderer.d.ts +12 -0
  619. package/dist/types/src/features/RequirementAI/components/citations/gpt-web-citation/GptWebCitationRenderer.d.ts.map +1 -0
  620. package/dist/types/src/features/RequirementAI/components/citations/gpt-web-citation/GptWebcitationPanel.d.ts +6 -0
  621. package/dist/types/src/features/RequirementAI/components/citations/gpt-web-citation/GptWebcitationPanel.d.ts.map +1 -0
  622. package/dist/types/src/features/RequirementAI/components/cra/PartialRequirementContent.d.ts +1 -0
  623. package/dist/types/src/features/RequirementAI/components/cra/PartialRequirementContent.d.ts.map +1 -1
  624. package/dist/types/src/features/RequirementAI/components/story-screen/CompletionPanel.d.ts +15 -0
  625. package/dist/types/src/features/RequirementAI/components/story-screen/CompletionPanel.d.ts.map +1 -0
  626. package/dist/types/src/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.d.ts +7 -1
  627. package/dist/types/src/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.d.ts.map +1 -1
  628. package/dist/types/src/features/RequirementAI/components/userstory-approval-screen/components/ContentSegment/ContentSegment.d.ts +4 -1
  629. package/dist/types/src/features/RequirementAI/components/userstory-approval-screen/components/ContentSegment/ContentSegment.d.ts.map +1 -1
  630. package/dist/types/src/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.d.ts +14 -1
  631. package/dist/types/src/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.d.ts.map +1 -1
  632. package/dist/types/src/features/RequirementAI/components/userstory-with-citation/components/HighlightButtonComponent.d.ts +11 -0
  633. package/dist/types/src/features/RequirementAI/components/userstory-with-citation/components/HighlightButtonComponent.d.ts.map +1 -0
  634. package/dist/types/src/features/RequirementAI/components/userstory-with-citation/components/InlineManualComponent.d.ts +10 -0
  635. package/dist/types/src/features/RequirementAI/components/userstory-with-citation/components/InlineManualComponent.d.ts.map +1 -0
  636. package/dist/types/src/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.d.ts +2 -1
  637. package/dist/types/src/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.d.ts.map +1 -1
  638. package/dist/types/src/features/RequirementAI/icons/CDIcon.d.ts +4 -1
  639. package/dist/types/src/features/RequirementAI/icons/CDIcon.d.ts.map +1 -1
  640. package/dist/types/src/features/RequirementAI/interfaces/citation.interface.d.ts +17 -2
  641. package/dist/types/src/features/RequirementAI/interfaces/citation.interface.d.ts.map +1 -1
  642. package/dist/types/src/features/RequirementAI/interfaces/userstory.interface.d.ts +10 -0
  643. package/dist/types/src/features/RequirementAI/interfaces/userstory.interface.d.ts.map +1 -1
  644. package/dist/types/src/features/RequirementAI/shared/UpdatedAnimationContent.d.ts +4 -1
  645. package/dist/types/src/features/RequirementAI/shared/UpdatedAnimationContent.d.ts.map +1 -1
  646. package/dist/types/src/features/RequirementAI/types/aiReasoning.type.d.ts +22 -12
  647. package/dist/types/src/features/RequirementAI/types/aiReasoning.type.d.ts.map +1 -1
  648. package/dist/types/src/features/RequirementAI/types/citation.type.d.ts +20 -0
  649. package/dist/types/src/features/RequirementAI/types/citation.type.d.ts.map +1 -1
  650. package/dist/types/src/features/RequirementAI/utils/userStoryAttachedContext.utils.d.ts.map +1 -1
  651. package/dist/types/src/features/RulebookCitations/RuleBookCitationApi.d.ts +2 -2
  652. package/dist/types/src/features/RulebookCitations/RuleBookCitationApi.d.ts.map +1 -1
  653. package/dist/types/src/features/RulebookCitations/RuleBookCitationWrapper.d.ts +1 -0
  654. package/dist/types/src/features/RulebookCitations/RuleBookCitationWrapper.d.ts.map +1 -1
  655. package/dist/types/src/features/RulebookCitations/RuleBookCitationWrapperTest.d.ts.map +1 -1
  656. package/dist/types/src/index.d.ts +3 -2
  657. package/dist/types/src/index.d.ts.map +1 -1
  658. package/dist/types/src/service/redlineService.d.ts +33 -0
  659. package/dist/types/src/service/redlineService.d.ts.map +1 -0
  660. package/package.json +9 -6
  661. package/dist/cjs/features/GptWebCitation/GptWebCitationMarkdown.js +0 -2
  662. package/dist/cjs/features/GptWebCitation/GptWebCitationMarkdown.js.map +0 -1
  663. package/dist/features/GptWebCitation/GptWebCitationMarkdown.js +0 -2
  664. package/dist/features/GptWebCitation/GptWebCitationMarkdown.js.map +0 -1
package/README.md CHANGED
@@ -681,31 +681,68 @@ const reasoningData = {
681
681
 
682
682
  `GptWebCitation` is a composite React component that wraps the GPT reasoning citation (`CognitiveInternalgptCoreComponent`) and adds an optional **Web Citation** view. Users can toggle between GPT and web-based citations without modifying the underlying GPT citation code.
683
683
 
684
- In **GPT view**, the component renders the standard GPT citation panel with a **View Web Citation** button on the left and the document source link on the right (inside the GPT citation footer). In **Web Citation view**, it shows a web snapshot (image or markdown content) with highlight navigation, relevance score, and a **View GPT Citation** toggle to switch back.
684
+ In **GPT view**, the component renders the standard GPT citation panel with a **View Web Citation** button on the left and the document source link on the right (inside the GPT citation footer). In **Web Citation view**, it shows a screenshot snapshot of the source page (when available), a relevance score badge, visit links, and a **View GPT Citation** toggle to switch back.
685
+
686
+ The component is **presentational** — it does not fetch web citations. The parent owns `webCitationData`, `webCitationStatus`, and view toggling via the required `citationType` prop.
687
+
688
+ ### `CitationType`
689
+
690
+ Import from `@e-llm-studio/citation`:
691
+
692
+ ```tsx
693
+ import { CitationType } from '@e-llm-studio/citation';
694
+ ```
695
+
696
+ | Value | GPT view | Web view | Toggle | Default view |
697
+ | --- | --- | --- | --- | --- |
698
+ | `CitationType.GPT` | yes | no | no | GPT only |
699
+ | `CitationType.WEB` | no | yes | no | Web only |
700
+ | `CitationType.GPT_WEB` | yes | yes | yes | Web (uncontrolled) |
701
+
702
+ `citationType` is **required**. Use `CitationType.GPT_WEB` when users should switch between GPT reasoning and web screenshot citations.
685
703
 
686
704
  ### Features
687
705
 
688
706
  - **Dual citation views** — Toggle between GPT reasoning and web-based citation
689
707
  - **Non-invasive GPT integration** — Wraps `CognitiveInternalgptCoreComponent` via props; no changes to GPT citation code required
690
- - **Image & markdown web citations** — Supports screenshot snapshots (`imageMetadata.signed_url`) or HTML/markdown content
691
- - **Highlight pagination** — Navigate between highlighted anchors in web citation markdown
708
+ - **Screenshot web citations** — Renders `imageMetadata.signed_url` when the API returns a snapshot
709
+ - **Status-driven skeleton UI** — `"pending"` loading skeleton and `"error"` fallback with **Visit Link**
710
+ - **`defaultCitationUrl`** — Immediate visit link while fetch is in progress (before `highlightedUrl` arrives)
711
+ - **Visit link priority** — `highlightedUrl` from API response wins over `defaultCitationUrl` in pending/error states
692
712
  - **Relevance score badge** — Auto-extracted from web citation content (e.g. "decision strength is 85%")
693
- - **Loading skeleton** — Built-in loading state while web citation is being generated
694
713
  - **Expand screenshot button** — Optional full-screen image view (`showExpandImageButton`)
714
+ - **Custom icons** — Override expand and external-link icons via `iconsConfig`
715
+ - **Fixed height mode** — Optional `isFixedHeight` keeps GPT and web panels the same size with contained screenshots
695
716
  - **Style overrides** — Customize layout via the `styles` prop without editing component internals
696
717
 
697
718
  ### Installation / Import
698
719
 
699
720
  ```tsx
700
721
  import GptWebCitation from '@e-llm-studio/citation/GptWebCitation';
722
+
723
+ // Optional utilities and types
724
+ import {
725
+ mapCitationDataToDisplay,
726
+ getWebCitationImageUrl,
727
+ resolveSkeletonVisitUrl,
728
+ type GptWebCitationStatus,
729
+ type IWebCitationApiResponse,
730
+ type IGptWebCitationStyleOverrides,
731
+ type IGptWebCitationImageStyles,
732
+ type IGptWebCitationSkeletonStyles,
733
+ type IGptWebCitationVisitLinkStyles,
734
+ type IGptWebCitationFullScreenStyles,
735
+ CitationType,
736
+ } from '@e-llm-studio/citation';
701
737
  ```
702
738
 
703
739
  ### Usage 1: Basic GPT + Web Citation Toggle
704
740
 
705
741
  ```tsx
706
742
  import { useState } from 'react';
707
- import { ChevronDown, ChevronUp, Maximize2, X } from 'lucide-react';
743
+ import { ChevronDown, ChevronUp, ExternalLink, Maximize2, X } from 'lucide-react';
708
744
  import GptWebCitation from '@e-llm-studio/citation/GptWebCitation';
745
+ import { CitationType, type GptWebCitationStatus } from '@e-llm-studio/citation';
709
746
 
710
747
  const gptCitation = {
711
748
  item: {
@@ -727,31 +764,42 @@ const gptCitation = {
727
764
  previewCallback: () => window.open('/preview/document'),
728
765
  };
729
766
 
767
+ const webCitationIcons = {
768
+ MaximizeIcon: Maximize2,
769
+ ExternalLinkIcon: ExternalLink,
770
+ };
771
+
730
772
  function CitationPanel() {
731
773
  const [showWebCitation, setShowWebCitation] = useState(false);
732
774
  const [webCitationData, setWebCitationData] = useState(undefined);
733
- const [isLoading, setIsLoading] = useState(false);
775
+ const [webCitationStatus, setWebCitationStatus] =
776
+ useState<GptWebCitationStatus>('pending');
734
777
 
735
778
  const handleGenerateWebCitation = async () => {
736
779
  setShowWebCitation(true);
737
- setIsLoading(true);
738
-
739
- const response = await fetch('/api/web-citation/generate');
740
- const data = await response.json();
741
-
742
- setWebCitationData(data);
743
- setIsLoading(false);
780
+ setWebCitationStatus('pending');
781
+
782
+ try {
783
+ const response = await fetch('/api/web-citation/generate');
784
+ const data = await response.json();
785
+ setWebCitationData(data);
786
+ setWebCitationStatus('success');
787
+ } catch {
788
+ setWebCitationStatus('error');
789
+ }
744
790
  };
745
791
 
746
792
  return (
747
793
  <GptWebCitation
748
794
  gptCitation={gptCitation}
749
- isWebCitation={true}
795
+ defaultCitationUrl="https://example.com/article"
796
+ citationType={CitationType.GPT_WEB}
750
797
  webCitationData={webCitationData}
798
+ webCitationStatus={webCitationStatus}
751
799
  showWebCitation={showWebCitation}
752
- isWebCitationLoading={isLoading}
753
800
  onGenerateWebCitation={handleGenerateWebCitation}
754
801
  onToggleCitationView={() => setShowWebCitation((prev) => !prev)}
802
+ iconsConfig={webCitationIcons}
755
803
  />
756
804
  );
757
805
  }
@@ -768,6 +816,8 @@ const webCitationData = {
768
816
  'The decision strength is 85% because:<ol><li>The exact <a href="https://example.com/article">valuation of SpaceX</a> fluctuates between sources.</li></ol>',
769
817
  citationType: 'web',
770
818
  citationUrl: 'https://example.com/article',
819
+ highlightedUrl: 'https://example.com/article#highlight',
820
+ message: 'Citation processed successfully',
771
821
  imageMetadata: {
772
822
  signed_url: 'https://storage.example.com/image_citations/screenshot.png',
773
823
  blob_path: 'image_citations/screenshot.png',
@@ -777,22 +827,48 @@ const webCitationData = {
777
827
 
778
828
  <GptWebCitation
779
829
  gptCitation={gptCitation}
780
- isWebCitation={true}
830
+ defaultCitationUrl="https://example.com/article"
831
+ citationType={CitationType.GPT_WEB}
781
832
  webCitationData={webCitationData}
833
+ webCitationStatus="success"
782
834
  showWebCitation={true}
783
835
  />
784
836
  ```
785
837
 
786
- When `imageMetadata.signed_url` is present, the component renders a screenshot snapshot. Otherwise it falls back to rendering the `content` field as markdown/HTML.
838
+ When `imageMetadata.signed_url` is present and `webCitationStatus` is `"success"`, the component renders a screenshot snapshot. If the image is unavailable or the fetch fails, an error skeleton is shown with a **Visit Link** (using `highlightedUrl` or `defaultCitationUrl`).
839
+
840
+ #### Visit link resolution
841
+
842
+ | UI state | Visit link source |
843
+ | --- | --- |
844
+ | Pending / error skeleton | `highlightedUrl` from `webCitationData` → else `defaultCitationUrl` prop |
845
+ | Screenshot footer (success) | `citationUrl` from `webCitationData` |
846
+
847
+ Use `resolveSkeletonVisitUrl(highlightedUrl, defaultCitationUrl)` from `@e-llm-studio/citation` if you need the same logic outside the component.
787
848
 
788
849
  ### Usage 3: GPT-Only Mode (No Web Citation)
789
850
 
790
- Set `isWebCitation={false}` to render only the GPT citation with no toggle button:
851
+ Set `citationType={CitationType.GPT}` to render only the GPT citation with no toggle button. `defaultCitationUrl` is still required by the prop contract but is unused in GPT-only mode:
791
852
 
792
853
  ```tsx
793
854
  <GptWebCitation
794
855
  gptCitation={gptCitation}
795
- isWebCitation={false}
856
+ defaultCitationUrl="https://example.com/article"
857
+ citationType={CitationType.GPT}
858
+ />
859
+ ```
860
+
861
+ ### Usage 3b: Web-Only Mode (No GPT Citation)
862
+
863
+ Set `citationType={CitationType.WEB}` to render only the web citation panel with no toggle:
864
+
865
+ ```tsx
866
+ <GptWebCitation
867
+ gptCitation={gptCitation}
868
+ defaultCitationUrl="https://example.com/article"
869
+ citationType={CitationType.WEB}
870
+ webCitationData={webCitationData}
871
+ webCitationStatus="success"
796
872
  />
797
873
  ```
798
874
 
@@ -803,8 +879,10 @@ Hide the web citation screenshot expand button:
803
879
  ```tsx
804
880
  <GptWebCitation
805
881
  gptCitation={gptCitation}
806
- isWebCitation={true}
882
+ defaultCitationUrl="https://example.com/article"
883
+ citationType={CitationType.GPT_WEB}
807
884
  webCitationData={webCitationData}
885
+ webCitationStatus="success"
808
886
  showWebCitation={true}
809
887
  showExpandImageButton={false}
810
888
  />
@@ -815,7 +893,8 @@ Hide the GPT citation header maximize/expand icon:
815
893
  ```tsx
816
894
  <GptWebCitation
817
895
  gptCitation={gptCitation}
818
- isWebCitation={true}
896
+ defaultCitationUrl="https://example.com/article"
897
+ citationType={CitationType.GPT_WEB}
819
898
  showGptMaximizeButton={false}
820
899
  />
821
900
  ```
@@ -824,7 +903,7 @@ You can also use `gptCitation.disableMaximize: true` directly on the GPT config.
824
903
 
825
904
  ### Usage 5: Custom Styling via Props (matched heights)
826
905
 
827
- Layout, borders, and heights for **both GPT and web views** can be controlled from the parent without modifying component internals:
906
+ Layout, borders, and heights for **both GPT and web views** can be controlled from the parent without modifying component internals. Prefer **`isFixedHeight`** (Usage 6) when you only need equal panel size + contained screenshots; use `styles` when you need granular control over skeleton, image, visit-link, or full-screen elements:
828
907
 
829
908
  ```tsx
830
909
  const sharedPanelHeight = '520px';
@@ -835,9 +914,15 @@ const sharedContentHeight = '384px';
835
914
  ...gptCitation,
836
915
  bodyHeight: sharedContentHeight,
837
916
  }}
838
- isWebCitation={true}
917
+ defaultCitationUrl="https://example.com/article"
918
+ citationType={CitationType.GPT_WEB}
839
919
  webCitationData={webCitationData}
920
+ webCitationStatus="success"
840
921
  showGptMaximizeButton={true}
922
+ iconsConfig={{
923
+ MaximizeIcon: Maximize2,
924
+ ExternalLinkIcon: ExternalLink,
925
+ }}
841
926
  styles={{
842
927
  container: { maxWidth: 900 },
843
928
  gptCitation: {
@@ -878,33 +963,143 @@ const sharedContentHeight = '384px';
878
963
  | `gptCitation.footerAction` | GPT view | View Web Citation button row in footer |
879
964
  | `gptCitation.toggleButton` | GPT view | View Web Citation button styles |
880
965
  | `webCitation.panel` | Web view | Outer web citation card |
881
- | `webCitation.header` | Web view | Source label + pagination + score badge row |
882
- | `webCitation.content` | Web view | Main content area (markdown, image, skeleton) |
966
+ | `webCitation.header` | Web view | Source label + relevance score badge row |
967
+ | `webCitation.content` | Web view | Screenshot or loading/error skeleton |
883
968
  | `webCitation.footer` | Web view | View GPT Citation + Learned From row |
884
969
  | `webCitation.toggleButton` | Web view | View GPT Citation button styles |
885
970
  | `webCitation.learnedFrom` | Web view | "Learned From …" text styles |
971
+ | `webCitation.visitLink.row` | Image + skeleton | Shared visit link row (merged with scoped overrides below) |
972
+ | `webCitation.visitLink.hint` | Image + skeleton | Shared visit link hint text |
973
+ | `webCitation.visitLink.link` | Image + skeleton | Shared visit link anchor styles |
974
+ | `webCitation.image.wrapper` | Screenshot view | Outer image citation wrapper |
975
+ | `webCitation.image.center` | Screenshot view | Center column (viewport or inline skeleton) |
976
+ | `webCitation.image.viewport` | Screenshot view | Viewport around scroll container |
977
+ | `webCitation.image.scrollContainer` | Screenshot view | Scrollable screenshot container |
978
+ | `webCitation.image.image` | Screenshot view | Screenshot `<img>` element |
979
+ | `webCitation.image.expandButton` | Screenshot view | Full-screen expand button |
980
+ | `webCitation.image.visitLink.*` | Screenshot footer | Image-specific visit link overrides (merged on top of `webCitation.visitLink`) |
981
+ | `webCitation.image.fullScreen.overlay` | Full-screen viewer | Portal overlay backdrop |
982
+ | `webCitation.image.fullScreen.content` | Full-screen viewer | Modal content card |
983
+ | `webCitation.image.fullScreen.closeButton` | Full-screen viewer | Close button |
984
+ | `webCitation.image.fullScreen.imageWrapper` | Full-screen viewer | Scrollable image wrapper |
985
+ | `webCitation.image.fullScreen.image` | Full-screen viewer | Full-screen `<img>` |
986
+ | `webCitation.skeleton.container` | Pending/error | Outer skeleton column |
987
+ | `webCitation.skeleton.frame` | Pending/error | Gray skeleton frame |
988
+ | `webCitation.skeleton.shimmer` | Pending | Shimmer animation overlay |
989
+ | `webCitation.skeleton.pending.content` | Pending | Centered pending content block |
990
+ | `webCitation.skeleton.pending.text` | Pending | Loading message text |
991
+ | `webCitation.skeleton.pending.actionRow` | Pending | Visit link row |
992
+ | `webCitation.skeleton.pending.actionHint` | Pending | "to view details" hint |
993
+ | `webCitation.skeleton.error.content` | Error | Error content block |
994
+ | `webCitation.skeleton.error.title` | Error | "No preview available" title |
995
+ | `webCitation.skeleton.error.message` | Error | Restriction message |
996
+ | `webCitation.skeleton.error.actionGroup` | Error | Action row wrapper |
997
+ | `webCitation.skeleton.error.detailsToggle` | Error | Error details expand button |
998
+ | `webCitation.skeleton.error.detailsMessage` | Error | Expanded error details text |
999
+ | `webCitation.skeleton.error.visitLinkGlow` | Error | Glowing visit link (merged on top of visit link styles) |
1000
+ | `webCitation.skeleton.visitLink.*` | Pending/error | Skeleton-specific visit link overrides (merged on top of `webCitation.visitLink`) |
886
1001
 
887
1002
  Legacy flat keys (`gptCitationWrapper`, `footerAction`, `webCitationButton`) still work for backward compatibility.
888
1003
 
1004
+ #### Example: customize screenshot and pending skeleton
1005
+
1006
+ ```tsx
1007
+ <GptWebCitation
1008
+ gptCitation={gptCitation}
1009
+ defaultCitationUrl="https://example.com/article"
1010
+ citationType={CitationType.GPT_WEB}
1011
+ webCitationData={data}
1012
+ webCitationStatus={status}
1013
+ styles={{
1014
+ webCitation: {
1015
+ visitLink: {
1016
+ link: { backgroundColor: 'rgba(37, 99, 235, 0.08)', borderRadius: 8 },
1017
+ },
1018
+ image: {
1019
+ scrollContainer: { borderRadius: 16, borderColor: '#d1d5db' },
1020
+ image: { objectFit: 'contain', maxHeight: 360 },
1021
+ expandButton: { backgroundColor: '#111827' },
1022
+ },
1023
+ skeleton: {
1024
+ frame: { minHeight: 320, backgroundColor: '#f8fafc' },
1025
+ pending: {
1026
+ text: { fontSize: 14, color: '#374151' },
1027
+ },
1028
+ error: {
1029
+ title: { color: '#dc2626' },
1030
+ visitLinkGlow: { borderColor: '#dc2626' },
1031
+ },
1032
+ },
1033
+ },
1034
+ }}
1035
+ />
1036
+ ```
1037
+
1038
+ ### Usage 6: Fixed height mode (matched GPT + web panels)
1039
+
1040
+ Set `isFixedHeight={true}` when you want GPT and web citation views to share the same panel dimensions. Screenshots use `object-fit: contain` so tall pages stay inside the box without layout shift when toggling views.
1041
+
1042
+ ```tsx
1043
+ <GptWebCitation
1044
+ gptCitation={{
1045
+ ...gptCitation,
1046
+ bodyHeight: '384px', // optional — customizes inner content height
1047
+ }}
1048
+ defaultCitationUrl="https://example.com/article"
1049
+ citationType={CitationType.GPT_WEB}
1050
+ isFixedHeight
1051
+ webCitationData={webCitationData}
1052
+ webCitationStatus="success"
1053
+ showWebCitation={showWebCitation}
1054
+ onToggleCitationView={() => setShowWeb((v) => !v)}
1055
+ />
1056
+ ```
1057
+
1058
+ | Scenario | Panel height |
1059
+ | --- | --- |
1060
+ | `isFixedHeight` + `CitationType.GPT_WEB` (toggle footer present) | `520px` default, or `calc(bodyHeight + 3.25rem)` when `gptCitation.bodyHeight` is set |
1061
+ | `isFixedHeight` + `CitationType.GPT` or `CitationType.WEB` | `520px` default, or `gptCitation.bodyHeight` when set |
1062
+
1063
+ `isFixedHeight` applies flex layout and contained images automatically. For manual per-element styling without fixed dimensions, use `styles` (Usage 5) instead.
1064
+
889
1065
  ### Props
890
1066
 
891
1067
  | Prop | Type | Default | Description |
892
1068
  |------|------|---------|-------------|
893
- | `gptCitation` | `IGptCitationConfig` | **required** | GPT citation config passed to `CognitiveInternalgptCoreComponent` (`item`, `headerTitle`, `iconsConfig`, `DocumentTitle`, `previewCallback`, etc.) |
894
- | `isWebCitation` | `boolean` | `false` | When `true`, enables web citation toggle and web view. When `false`, only GPT citation is shown. |
895
- | `webCitationData` | `IWebCitationApiResponse` | | Web citation API response (content, image snapshot, URL) |
896
- | `showWebCitation` | `boolean` | — | Controls which view is active. Omit for uncontrolled internal state. |
897
- | `onGenerateWebCitation` | `() => void` | | Called when user clicks **View Web Citation** and no cached web data exists yet |
898
- | `isWebCitationLoading` | `boolean` | `false` | Parent-controlled loading state while web citation is being fetched |
1069
+ | `gptCitation` | `IGptCitationConfig` | **required** | GPT citation config passed to `CognitiveInternalgptCoreComponent` |
1070
+ | `defaultCitationUrl` | `string` | **required** | Fallback source URL for **Visit Link** in pending/error skeletons. Used when `webCitationData.highlightedUrl` is not yet available |
1071
+ | `citationType` | `CitationType` | **required** | `GPT` = GPT only, `WEB` = web only, `GPT_WEB` = both views with toggle (default web view when uncontrolled) |
1072
+ | `webCitationData` | `IWebCitationApiResponse` | — | Web citation API response (screenshot metadata, URLs, optional message) |
1073
+ | `webCitationStatus` | `"pending"` \| `"success"` \| `"error"` | inferred | Lifecycle status from parent API call. Inferred from `webCitationData` when omitted |
1074
+ | `showWebCitation` | `boolean` | web for `GPT_WEB` (uncontrolled) | Active view when `citationType` is `GPT_WEB`. Ignored for `GPT` / `WEB` |
1075
+ | `onGenerateWebCitation` | `() => void` | — | Called when the user clicks **View Web Citation** and no cached screenshot exists. Parent owns fetch lifecycle (when to call, deduplication, reset) |
899
1076
  | `onToggleCitationView` | `() => void` | — | Called when user toggles between GPT and web views |
900
- | `showExpandImageButton` | `boolean` | `true` | Show/hide the full-screen expand button on web citation image snapshots |
901
- | `showGptMaximizeButton` | `boolean` | `true` | Show/hide the GPT citation header maximize/expand icon (`gptCitation.disableMaximize: true` when `false`) |
902
- | `topic` | `string` | auto | Override topic label in web citation header (auto-extracted from content if omitted) |
1077
+ | `showExpandImageButton` | `boolean` | `true` | Show/hide full-screen expand on screenshot |
1078
+ | `showGptMaximizeButton` | `boolean` | `true` | Show/hide GPT header maximize icon (`gptCitation.disableMaximize: true` when `false`) |
1079
+ | `iconsConfig` | `IGptWebCitationImageIconsConfig` | | `MaximizeIcon` and `ExternalLinkIcon` overrides for web view |
1080
+ | `topic` | `string` | auto | Override topic label in web header |
903
1081
  | `sourceLabel` | `string` | auto | Override header source label in web view |
904
- | `relevanceScore` | `number` | auto | Override relevance/decision strength score (auto-extracted from content if omitted) |
905
- | `learnedFrom` | `string` | auto | Site name shown in web citation footer (auto-extracted from `citationUrl` if omitted) |
1082
+ | `relevanceScore` | `number` | auto | Override relevance/decision strength badge (%) |
1083
+ | `learnedFrom` | `string` | auto | Site name in web footer (auto-derived from `citationUrl`) |
1084
+ | `sourceModel` | `string` | — | **Deprecated.** Use `sourceLabel` instead |
1085
+ | `isFixedHeight` | `boolean` | `false` | When `true`, GPT and web panels share the same fixed height/width; screenshot uses `object-fit: contain` |
906
1086
  | `styles` | `IGptWebCitationStyleOverrides` | — | Style overrides for GPT and web citation views (see Usage 5) |
907
1087
 
1088
+ When `isFixedHeight` is `true`, both views use the same panel height (`520px` by default, or `gptCitation.bodyHeight` + toggle footer). Pair with `gptCitation.bodyHeight` to customize the content area (e.g. `"384px"`).
1089
+
1090
+ #### `webCitationStatus` inference
1091
+
1092
+ When `webCitationStatus` is omitted, the component derives it in this order:
1093
+
1094
+ | Priority | Condition | Status |
1095
+ | --- | --- | --- |
1096
+ | 1 | Valid screenshot URL in `webCitationData` (`signed_url` or `gs_uri`) | `"success"` (always — image wins over explicit status) |
1097
+ | 2 | Explicit `webCitationStatus` prop | uses prop value |
1098
+ | 3 | `webCitationData` present but no image URL | `"error"` |
1099
+ | 4 | No `webCitationData` | `"pending"` |
1100
+
1101
+ Pass `webCitationStatus="pending"` explicitly while your fetch is in flight (before the image URL is available).
1102
+
908
1103
  ### `IGptCitationConfig` (gptCitation prop)
909
1104
 
910
1105
  | Field | Type | Description |
@@ -913,35 +1108,79 @@ Legacy flat keys (`gptCitationWrapper`, `footerAction`, `webCitationButton`) sti
913
1108
  | `headerTitle` | `string` | Panel header title |
914
1109
  | `index` | `number` | Citation index |
915
1110
  | `iconsConfig` | `object` | Icon components (`ChevronDownIcon`, `ChevronUpIcon`, `MaximizeIcon`, `CloseIcon`) |
916
- | `DocumentTitle` | `string` | Source document label shown in the GPT footer (right side) |
1111
+ | `DocumentTitle` | `string` | Source document label shown in the GPT footer (right side). Hidden when `citationType` is `GPT_WEB` or `WEB` |
917
1112
  | `previewCallback` | `() => void` | Called when the source link is clicked |
918
- | `bodyHeight` | `string` | Optional fixed GPT content body height (use with `styles.webCitation.content` to match web view height) |
1113
+ | `bodyHeight` | `string` | Optional fixed GPT content body height (pair with `styles.webCitation.content`) |
919
1114
  | `disableMaximize` | `boolean` | Disable GPT header fullscreen maximize button (or use `showGptMaximizeButton={false}`) |
920
1115
 
1116
+ ### `IGptWebCitationImageIconsConfig` (iconsConfig prop)
1117
+
1118
+ | Field | Type | Fallback |
1119
+ |-------|------|----------|
1120
+ | `MaximizeIcon` | `ElementType` | `gptCitation.iconsConfig.MaximizeIcon`, then `Maximize2` |
1121
+ | `ExternalLinkIcon` | `ElementType` | `ExternalLink` |
1122
+
1123
+ ### Style override types (`styles` prop)
1124
+
1125
+ Nested under `styles.webCitation`:
1126
+
1127
+ | Type | Keys | Purpose |
1128
+ | --- | --- | --- |
1129
+ | `IGptWebCitationVisitLinkStyles` | `row`, `hint`, `link` | Visit link row shared by image footer and skeletons |
1130
+ | `IGptWebCitationImageStyles` | `wrapper`, `center`, `viewport`, `scrollContainer`, `image`, `expandButton`, `visitLink`, `fullScreen` | Screenshot view + inline loading skeleton while image decodes |
1131
+ | `IGptWebCitationSkeletonStyles` | `container`, `frame`, `shimmer`, `pending.*`, `error.*`, `visitLink` | Pending/error skeleton UI |
1132
+ | `IGptWebCitationFullScreenStyles` | `overlay`, `content`, `closeButton`, `imageWrapper`, `image` | Full-screen screenshot modal |
1133
+
1134
+ `webCitation.visitLink` merges with scoped `image.visitLink` or `skeleton.visitLink` overrides (scoped wins on conflict).
1135
+
921
1136
  ### `IWebCitationApiResponse` (webCitationData prop)
922
1137
 
923
1138
  | Field | Type | Description |
924
1139
  |-------|------|-------------|
925
1140
  | `citationId` | `string` | Unique citation identifier |
926
- | `content` | `string` | HTML/markdown web citation content |
1141
+ | `content` | `string` | HTML/markdown explanation (used for topic/score extraction) |
927
1142
  | `citationType` | `string` | Citation type (e.g. `"web"`) |
928
- | `citationUrl` | `string` | Original source URL |
1143
+ | `citationUrl` | `string` | Original source URL (screenshot footer **Visit Link**) |
1144
+ | `highlightedUrl` | `string` | Highlighted URL from API (preferred for skeleton **Visit Link**) |
1145
+ | `message` | `string` | API status or error message |
929
1146
  | `imageMetadata` | `object` | Image snapshot metadata |
930
- | `imageMetadata.signed_url` | `string` | Signed URL for screenshot image (preferred) |
1147
+ | `imageMetadata.signed_url` | `string` | Signed URL for screenshot (preferred) |
931
1148
  | `imageMetadata.gs_uri` | `string` | GCS URI fallback for image |
932
1149
  | `db` | `object` | Database metadata (`citation_id`, `blob_path`) |
933
1150
 
1151
+ ### Utility helpers
1152
+
1153
+ Exported from `@e-llm-studio/citation`:
1154
+
1155
+ | Function | Purpose |
1156
+ | --- | --- |
1157
+ | `mapCitationDataToDisplay(data)` | Normalizes API response → display fields (`topic`, `highlightedUrl`, `relevanceScore`, etc.) |
1158
+ | `getWebCitationImageUrl(data)` | Resolves screenshot URL from `imageMetadata` |
1159
+ | `resolveSkeletonVisitUrl(highlightedUrl, defaultCitationUrl)` | Visit link for pending/error skeletons |
1160
+ | `extractTopicFromContent(content)` | First anchor text from content |
1161
+ | `extractRelevanceScoreFromContent(content)` | Parses decision strength / confidence % |
1162
+ | `extractLearnedFromUrl(citationUrl)` | Hostname → site name for footer |
1163
+ | `sanitizeExternalUrl(url)` | Safe http(s) URL for links |
1164
+
934
1165
  ### View Behavior
935
1166
 
936
1167
  | State | What renders |
937
1168
  |-------|--------------|
938
- | `isWebCitation={false}` | GPT citation only |
939
- | `isWebCitation={true}`, `showWebCitation={false}` | GPT citation + **View Web Citation** button (left footer) + source link (right footer) |
940
- | `isWebCitation={true}`, `showWebCitation={true}` | Web citation panel with snapshot/markdown, highlight nav, and **View GPT Citation** button |
1169
+ | `CitationType.GPT` | GPT citation only (no toggle) |
1170
+ | `CitationType.WEB` | Web citation only (no toggle) |
1171
+ | `CitationType.GPT_WEB`, `showWebCitation={false}` | GPT citation + **View Web Citation** button |
1172
+ | `CitationType.GPT_WEB`, `showWebCitation={true}`, `webCitationStatus="pending"` | Shimmer skeleton + optional **Visit Link** (`highlightedUrl` → `defaultCitationUrl`) |
1173
+ | `CitationType.GPT_WEB`, `showWebCitation={true}`, `webCitationStatus="success"` | Screenshot (pending skeleton while image loads) + footer **Visit Link** |
1174
+ | `CitationType.GPT_WEB`, `showWebCitation={true}`, `webCitationStatus="error"` | Error skeleton ("No preview available") + inline **Visit Link** |
1175
+ | `isFixedHeight={true}` | GPT and web outer panels share height; screenshot `object-fit: contain`; skeleton fills content area |
1176
+
1177
+ #### Error skeleton
1178
+
1179
+ The error state shows a fixed title ("No preview available"), a restriction message ("This website restricts external previews"), and an inline **Visit Link** when a source URL is available.
941
1180
 
942
1181
  ### Local Test Component
943
1182
 
944
- A test harness is available at `src/features/GptWebCitation/GptWebCitationTest.tsx`. Run the citation dev server with `GptWebCitationTest` mounted in `src/index.tsx` to preview the component interactively.
1183
+ A test harness is available at `src/features/GptWebCitation/GptWebCitationTest.tsx`. Run the citation dev server with `GptWebCitationTest` mounted in `src/index.tsx` to preview the component interactively. The harness uses `sampleWebCitationApiResponse` from `WebCitationSampleResponse.ts`, simulates a 2s fetch delay when **View Web Citation** is clicked, and accepts `isFixedHeight`, `webCitationStatus`, `iconsConfig`, and `styles` props for local experimentation.
945
1184
 
946
1185
  ---
947
1186
 
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("./CognitiveCompareConstants.js"),e=function(t){return null==t?"":"string"==typeof t?t:Array.isArray(t)?t.map(e).join("\n\n"):"object"==typeof t?JSON.stringify(t):String(t)},n=function(t){return null!=t&&("string"==typeof t?t.trim().length>0:!Array.isArray(t)||t.length>0&&t.some(function(t){return n(t)}))};var o=["#B91C1C","#A16207","#1D4ED8","#000000"],r=function(t){var e=o.findIndex(function(e){return e.toLowerCase()===t.toLowerCase()});return-1===e?o.length:e},i=function(t,e,n){if(!t)return null;if(t.id===n)return e;if(!Array.isArray(t.subsections))return null;for(var o=0;o<t.subsections.length;o++){var r=i(t.subsections[o],"".concat(e,"-").concat(o),n);if(r)return r}return null},l=new WeakMap,u=function(t){if(t){var e=l.get(t);null!=e&&(clearTimeout(e),l.delete(t)),t.style.transition="box-shadow 300ms ease-out, outline 300ms ease-out",requestAnimationFrame(function(){t.style.outline="",t.style.boxShadow=""}),window.setTimeout(function(){t.style.transition="",t.style.borderRadius=""},300)}},a=function(t){if(t){var e=l.get(t);null!=e&&clearTimeout(e),t.style.transition="box-shadow 300ms ease-in-out, outline 300ms ease-in-out",t.style.outline="2px solid #ff9494",t.style.borderRadius="6px",t.style.boxShadow="0 0 12px 2px rgba(244, 113, 113, 0.33)";var n=window.setTimeout(function(){u(t)},3e3);l.set(t,n)}};exports.DEVIATION_BADGE_SEPARATOR="::",exports.areMarkdownPropsEqual=function(t,e){var n,o,r,i,l,u;if(t.content!==e.content)return!1;if(t.overlayContent!==e.overlayContent)return!1;if(t.sxStyles!==e.sxStyles)return!1;if(t.maintainRelativeOrder!==e.maintainRelativeOrder)return!1;if(t.highlightBg!==e.highlightBg)return!1;if(t.suppressHighlightBg!==e.suppressHighlightBg)return!1;if(t.collisionKey!==e.collisionKey)return!1;var a=t.highlights||[],s=e.highlights||[];if(a.length!==s.length)return!1;for(var c=0;c<a.length;c++)if(a[c]!==s[c])return!1;var d=t.deviationBadges||[],v=e.deviationBadges||[];if(d.length!==v.length)return!1;for(c=0;c<d.length;c++){if(d[c].id!==v[c].id)return!1;if(d[c].actionId!==v[c].actionId)return!1;if(d[c].label!==v[c].label)return!1;if(d[c].score!==v[c].score)return!1;if(d[c].isOrphan!==v[c].isOrphan)return!1;if(d[c].isConnected!==v[c].isConnected)return!1;if(d[c].showScrollLockToggle!==v[c].showScrollLockToggle)return!1;if(d[c].scrollSyncLocked!==v[c].scrollSyncLocked)return!1;if((null===(n=d[c].style)||void 0===n?void 0:n.badgeBg)!==(null===(o=v[c].style)||void 0===o?void 0:o.badgeBg))return!1;if((null===(r=d[c].style)||void 0===r?void 0:r.badgeBorder)!==(null===(i=v[c].style)||void 0===i?void 0:i.badgeBorder))return!1;if((null===(l=d[c].style)||void 0===l?void 0:l.badgeText)!==(null===(u=v[c].style)||void 0===u?void 0:u.badgeText))return!1}return!0},exports.debounce=function(t,e){var n;return function(){for(var o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];var i=this;clearTimeout(n),n=setTimeout(function(){return t.apply(i,o)},e)}},exports.extractDeviationScore=function(t,e){var n,o,r,i,l,u,a;if(!t)return e;var s=null!==(u=null!==(i=null!==(o=null===(n=t.evaluation_output)||void 0===n?void 0:n.output_score)&&void 0!==o?o:null===(r=t.evaluation_outputs)||void 0===r?void 0:r.output_score)&&void 0!==i?i:null===(l=t.evaluation_outputs)||void 0===l?void 0:l.output_value)&&void 0!==u?u:t.output_score;return null!==(a=null!=s?s:e)&&void 0!==a?a:""},exports.findKeyPathByNodeId=function(t,e){for(var n=0;n<t.length;n++){var o=i(t[n],String(n),e);if(o)return o}return null},exports.generateColorPalette=function(t){var e=function(t,e){var n=function(t){var e=function(t){return 4===t.length?"#"+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]:t}(t).replace("#",""),n=parseInt(e,16);return{r:n>>16&255,g:n>>8&255,b:255&n}}(t),o=n.r,r=n.g,i=n.b;return function(t,e,n){return"#"+[t,e,n].map(function(t){return t.toString(16).padStart(2,"0")}).join("").toUpperCase()}(Math.round(o+(255-o)*e),Math.round(r+(255-r)*e),Math.round(i+(255-i)*e))};return{bg:e(t,.8),border:e(t,.5),badgeBg:e(t,.8),badgeBorder:e(t,.5),badgeText:t.toUpperCase(),highlightBg:e(t,.8)}},exports.getBentArrowPath=function(t,e,n,o,r){void 0===r&&(r=14);var i=t+.5*(n-t),l=o-e;if(Math.abs(l)<3)return"M ".concat(t," ").concat(e," H ").concat(n);var u=l>0?1:-1,a=Math.min(r,Math.abs(l)/2,Math.abs(i-t)/2,Math.abs(n-i)/2);return["M ".concat(t," ").concat(e),"H ".concat(i-a),"Q ".concat(i," ").concat(e," ").concat(i," ").concat(e+u*a),"V ".concat(o-u*a),"Q ".concat(i," ").concat(o," ").concat(i+a," ").concat(o),"H ".concat(n)].join(" ")},exports.getFirstDeviationColor=function(e){for(var n,o,i,l,u,a,s,c,d,v,f,g,p,h=[],b=0,m=Object.keys((null==e?void 0:e.deviations)||{}).sort(function(t,e){return Number(t)-Number(e)});b<m.length;b++){var y=m[b];(S=null===(l=null===(i=null===(o=null===(n=null==e?void 0:e.deviations)||void 0===n?void 0:n[y])||void 0===o?void 0:o.evaluation_outputs)||void 0===i?void 0:i.metadata)||void 0===l?void 0:l.label_color)&&h.push(S)}for(var _=0,x=Object.keys((null==e?void 0:e.deviation_entries)||{}).sort(function(t,e){return Number(t)-Number(e)});_<x.length;_++){y=x[_];(S=null===(c=null===(s=null===(a=null===(u=null==e?void 0:e.deviation_entries)||void 0===u?void 0:u[y])||void 0===a?void 0:a.evaluation_outputs)||void 0===s?void 0:s.metadata)||void 0===c?void 0:c.label_color)&&h.push(S)}for(var T=0,A=Object.keys(e||{}).filter(function(t){return/^\d+$/.test(t)}).sort(function(t,e){return Number(t)-Number(e)});T<A.length;T++){var S;y=A[T];(S=null===(f=null===(v=null===(d=null==e?void 0:e[y])||void 0===d?void 0:d.evaluation_outputs)||void 0===v?void 0:v.metadata)||void 0===f?void 0:f.label_color)&&h.push(S)}return 0===h.length?(null===(p=null===(g=null==e?void 0:e.evaluation_outputs)||void 0===g?void 0:g.metadata)||void 0===p?void 0:p.label_color)?e.evaluation_outputs.metadata.label_color:t.DEFAULT_DEVIAION_COLOR:h.sort(function(t,e){return r(t)-r(e)})[0]},exports.getFirstDeviationOutputValue=function(t){for(var e,n,o,r,i,l,u,a,s,c=0,d=Object.keys((null==t?void 0:t.deviations)||{}).sort(function(t,e){return Number(t)-Number(e)});c<d.length;c++){var v=d[c];if(b=null===(o=null===(n=null===(e=null==t?void 0:t.deviations)||void 0===e?void 0:e[v])||void 0===n?void 0:n.evaluation_outputs)||void 0===o?void 0:o.output_value)return b}for(var f=0,g=Object.keys((null==t?void 0:t.deviation_entries)||{}).sort(function(t,e){return Number(t)-Number(e)});f<g.length;f++){v=g[f];if(b=null===(l=null===(i=null===(r=null==t?void 0:t.deviation_entries)||void 0===r?void 0:r[v])||void 0===i?void 0:i.evaluation_outputs)||void 0===l?void 0:l.output_value)return b}for(var p=0,h=Object.keys(t||{}).filter(function(t){return/^\d+$/.test(t)}).sort(function(t,e){return Number(t)-Number(e)});p<h.length;p++){var b;v=h[p];if(b=null===(a=null===(u=null==t?void 0:t[v])||void 0===u?void 0:u.evaluation_outputs)||void 0===a?void 0:a.output_value)return b}return(null===(s=null==t?void 0:t.evaluation_outputs)||void 0===s?void 0:s.output_value)?t.evaluation_outputs.output_value:null},exports.getRationale=function(t){if(!t.mapping_rationale)return{cognitiveData:{decisioning:[],gap:[],relevance_score:0,isMissingRationale:!0,citations:[]},score:0,relation:"N/A"};var e=t.mapping_rationale,n=parseInt(e.decision_strength||"0");return{cognitiveData:{decisioning:e.decisioning_factors||[],gap:e.gaps_in_decision||[],relevance_score:n,citations:e.citations},score:0,relation:"N/A"}},exports.getSideData=function(t,n,o){var r,i=o[n],l=null===(r=null==t?void 0:t.comparison_inputs)||void 0===r?void 0:r[i];return{title:e((null==l?void 0:l.title)||""),content:e((null==l?void 0:l.content)||""),change_history:e((null==l?void 0:l.change_history)||""),attributes:(null==l?void 0:l.additional_attributes)||null,subsections:(null==l?void 0:l.subsections)||[]}},exports.hasMeaningfulRedlineTags=function(t){var e;if("string"!=typeof t||!t)return!1;for(var n=/<(updated|deleted|changed|change)\b[^>]*>([\s\S]*?)<\/\1>/gi,o=null;null!==(o=n.exec(t));){if((null!==(e=o[2])&&void 0!==e?e:"").replace(/<[^>]*>/g,"").trim().length>0)return!0}return!1},exports.hasValue=n,exports.highlightClause=a,exports.isMissingStr=function(t){if(!t)return!0;var e=t.trim().toLowerCase();return e.includes("no equivalent")||"n/a"===e||"na"===e||"none"===e},exports.mixHexColors=function(t,e){var n=function(t){var e=t.replace("#","");return[parseInt(e.substring(0,2),16),parseInt(e.substring(2,4),16),parseInt(e.substring(4,6),16)]},o=function(t){var e=Math.round(t).toString(16);return 1===e.length?"0"+e:e};try{var r=n(t),i=n(e),l=(r[0]+i[0])/2*.95,u=(r[1]+i[1])/2*.95,a=(r[2]+i[2])/2*.95;return"#".concat(o(l)).concat(o(u)).concat(o(a))}catch(t){return"#FDE68A"}},exports.recursivelyFindSubSectionIdxById=i,exports.resetClauseHighlight=u,exports.safeStringify=e,exports.scrollAndHighlightClause=function(t,e){var n=e.getBoundingClientRect(),o=t.getBoundingClientRect(),r=e.scrollTop+o.top-n.top-n.height/2+o.height/2;e.scrollTo({top:r,behavior:"smooth"});var i=function(){return a(t)};if("onscrollend"in e)e.addEventListener("scrollend",i,{once:!0});else{var l=e.scrollTop,u=function(){e.scrollTop===l?i():(l=e.scrollTop,requestAnimationFrame(u))};requestAnimationFrame(u)}},exports.scrollAndWait=function(t,e,n){if(Math.abs(t.scrollTop-e)<=2)n();else{var o,r=!1,i=function(){r||(r=!0,clearTimeout(o),t.removeEventListener("scrollend",l),n())},l=function(){return i()};t.addEventListener("scrollend",l),t.scrollTo({top:e,behavior:"smooth"}),o=setTimeout(i,800)}},exports.smoothScrollTo=function(t,e,n,o,r){void 0===n&&(n=300);var i=t.style.scrollBehavior;t.style.scrollBehavior="auto";var l=t.scrollTop,u=e-l,a=null,s=function(c){null===a&&(a=c);var d,v=c-a;v<n?(t.scrollTop=(d=v,d/=n,u*(--d*d*d+1)+l),r&&r(),requestAnimationFrame(s)):(t.scrollTop=e,t.style.scrollBehavior=i,r&&r(),o&&o())};requestAnimationFrame(s)},exports.stripRedlineTags=function(t){return"string"==typeof t&&t?t.replace(/<\/?(updated|deleted|changed|change)\b[^>]*>/gi,""):""},exports.waitForScrollIdle=function(t,e){return void 0===e&&(e=100),new Promise(function(n){var o,r=!1,i=function(){r||(r=!0,t.removeEventListener("scroll",l),n())},l=function(){clearTimeout(o),o=setTimeout(i,e)};t.addEventListener("scroll",l),o=setTimeout(i,e)})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("./CognitiveCompareConstants.js"),e=function(t){return null==t?"":"string"==typeof t?t:Array.isArray(t)?t.map(e).join("\n\n"):"object"==typeof t?JSON.stringify(t):String(t)},n=function(t){return null!=t&&("string"==typeof t?t.trim().length>0:!Array.isArray(t)||t.length>0&&t.some(function(t){return n(t)}))},o=function(t,e,n,o){var r;void 0===o&&(o={});var i=n[e],l=null===(r=null==t?void 0:t.comparison_inputs)||void 0===r?void 0:r[i];return l?(Array.isArray(l)?l:[l]).map(function(t,e){if("string"==typeof t){var n=o[t];return n?{contentId:t,data:n,attributes:n.additional_attributes||{}}:null}return t&&"object"==typeof t?{contentId:t.content_id||t.id||"".concat(i,"-direct-").concat(e),data:t,attributes:t.additional_attributes||{}}:null}).filter(Boolean):[]};var r=["#B91C1C","#A16207","#1D4ED8","#000000"],i=function(t){var e=r.findIndex(function(e){return e.toLowerCase()===t.toLowerCase()});return-1===e?r.length:e},l=function(t,e,n){if(!t)return null;if(t.id===n||t.nodeId===n||t.contentId===n)return e;if(!Array.isArray(t.subsections))return null;for(var o=0;o<t.subsections.length;o++){var r=l(t.subsections[o],"".concat(e,"-").concat(o),n);if(r)return r}return null},u=new WeakMap,a=function(t){if(t){var e=u.get(t);null!=e&&(clearTimeout(e),u.delete(t)),t.style.transition="box-shadow 300ms ease-out, outline 300ms ease-out",requestAnimationFrame(function(){t.style.outline="",t.style.boxShadow=""}),window.setTimeout(function(){t.style.transition="",t.style.borderRadius=""},300)}},s=function(t){if(t){var e=u.get(t);null!=e&&clearTimeout(e),t.style.transition="box-shadow 300ms ease-in-out, outline 300ms ease-in-out",t.style.outline="2px solid #ff9494",t.style.borderRadius="6px",t.style.boxShadow="0 0 12px 2px rgba(244, 113, 113, 0.33)";var n=window.setTimeout(function(){a(t)},3e3);u.set(t,n)}};exports.DEVIATION_BADGE_SEPARATOR="::",exports.areMarkdownPropsEqual=function(t,e){var n,o,r,i,l,u;if(t.content!==e.content)return!1;if(t.overlayContent!==e.overlayContent)return!1;if(t.sxStyles!==e.sxStyles)return!1;if(t.maintainRelativeOrder!==e.maintainRelativeOrder)return!1;if(t.highlightBg!==e.highlightBg)return!1;if(t.suppressHighlightBg!==e.suppressHighlightBg)return!1;if(t.collisionKey!==e.collisionKey)return!1;var a=t.highlights||[],s=e.highlights||[];if(a.length!==s.length)return!1;for(var c=0;c<a.length;c++)if(a[c]!==s[c])return!1;var d=t.deviationBadges||[],v=e.deviationBadges||[];if(d.length!==v.length)return!1;for(c=0;c<d.length;c++){if(d[c].id!==v[c].id)return!1;if(d[c].actionId!==v[c].actionId)return!1;if(d[c].label!==v[c].label)return!1;if(d[c].score!==v[c].score)return!1;if(d[c].isOrphan!==v[c].isOrphan)return!1;if(d[c].isConnected!==v[c].isConnected)return!1;if(d[c].showScrollLockToggle!==v[c].showScrollLockToggle)return!1;if(d[c].scrollSyncLocked!==v[c].scrollSyncLocked)return!1;if((null===(n=d[c].style)||void 0===n?void 0:n.badgeBg)!==(null===(o=v[c].style)||void 0===o?void 0:o.badgeBg))return!1;if((null===(r=d[c].style)||void 0===r?void 0:r.badgeBorder)!==(null===(i=v[c].style)||void 0===i?void 0:i.badgeBorder))return!1;if((null===(l=d[c].style)||void 0===l?void 0:l.badgeText)!==(null===(u=v[c].style)||void 0===u?void 0:u.badgeText))return!1}return!0},exports.debounce=function(t,e){var n;return function(){for(var o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];var i=this;clearTimeout(n),n=setTimeout(function(){return t.apply(i,o)},e)}},exports.extractDeviationScore=function(t,e){var n,o,r,i,l,u,a;if(!t)return e;var s=null!==(u=null!==(i=null!==(o=null===(n=t.evaluation_output)||void 0===n?void 0:n.output_score)&&void 0!==o?o:null===(r=t.evaluation_outputs)||void 0===r?void 0:r.output_score)&&void 0!==i?i:null===(l=t.evaluation_outputs)||void 0===l?void 0:l.output_value)&&void 0!==u?u:t.output_score;return null!==(a=null!=s?s:e)&&void 0!==a?a:""},exports.findKeyPathByNodeId=function(t,e){for(var n=0;n<t.length;n++){var o=l(t[n],String(n),e);if(o)return o}return null},exports.generateColorPalette=function(t){var e=function(t,e){var n=function(t){var e=function(t){return 4===t.length?"#"+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]:t}(t).replace("#",""),n=parseInt(e,16);return{r:n>>16&255,g:n>>8&255,b:255&n}}(t),o=n.r,r=n.g,i=n.b;return function(t,e,n){return"#"+[t,e,n].map(function(t){return t.toString(16).padStart(2,"0")}).join("").toUpperCase()}(Math.round(o+(255-o)*e),Math.round(r+(255-r)*e),Math.round(i+(255-i)*e))};return{bg:e(t,.8),border:e(t,.5),badgeBg:e(t,.8),badgeBorder:e(t,.5),badgeText:t.toUpperCase(),highlightBg:e(t,.8)}},exports.getBentArrowPath=function(t,e,n,o,r){void 0===r&&(r=14);var i=t+.5*(n-t),l=o-e;if(Math.abs(l)<3)return"M ".concat(t," ").concat(e," H ").concat(n);var u=l>0?1:-1,a=Math.min(r,Math.abs(l)/2,Math.abs(i-t)/2,Math.abs(n-i)/2);return["M ".concat(t," ").concat(e),"H ".concat(i-a),"Q ".concat(i," ").concat(e," ").concat(i," ").concat(e+u*a),"V ".concat(o-u*a),"Q ".concat(i," ").concat(o," ").concat(i+a," ").concat(o),"H ".concat(n)].join(" ")},exports.getFirstDeviationColor=function(e){for(var n,o,r,l,u,a,s,c,d,v,f,g,p,h=[],b=0,m=Object.keys((null==e?void 0:e.deviations)||{}).sort(function(t,e){return Number(t)-Number(e)});b<m.length;b++){var y=m[b];(I=null===(l=null===(r=null===(o=null===(n=null==e?void 0:e.deviations)||void 0===n?void 0:n[y])||void 0===o?void 0:o.evaluation_outputs)||void 0===r?void 0:r.metadata)||void 0===l?void 0:l.label_color)&&h.push(I)}for(var _=0,x=Object.keys((null==e?void 0:e.deviation_entries)||{}).sort(function(t,e){return Number(t)-Number(e)});_<x.length;_++){y=x[_];(I=null===(c=null===(s=null===(a=null===(u=null==e?void 0:e.deviation_entries)||void 0===u?void 0:u[y])||void 0===a?void 0:a.evaluation_outputs)||void 0===s?void 0:s.metadata)||void 0===c?void 0:c.label_color)&&h.push(I)}for(var T=0,A=Object.keys(e||{}).filter(function(t){return/^\d+$/.test(t)}).sort(function(t,e){return Number(t)-Number(e)});T<A.length;T++){var I;y=A[T];(I=null===(f=null===(v=null===(d=null==e?void 0:e[y])||void 0===d?void 0:d.evaluation_outputs)||void 0===v?void 0:v.metadata)||void 0===f?void 0:f.label_color)&&h.push(I)}return 0===h.length?(null===(p=null===(g=null==e?void 0:e.evaluation_outputs)||void 0===g?void 0:g.metadata)||void 0===p?void 0:p.label_color)?e.evaluation_outputs.metadata.label_color:t.DEFAULT_DEVIAION_COLOR:h.sort(function(t,e){return i(t)-i(e)})[0]},exports.getFirstDeviationOutputValue=function(t){for(var e,n,o,r,i,l,u,a,s,c=0,d=Object.keys((null==t?void 0:t.deviations)||{}).sort(function(t,e){return Number(t)-Number(e)});c<d.length;c++){var v=d[c];if(b=null===(o=null===(n=null===(e=null==t?void 0:t.deviations)||void 0===e?void 0:e[v])||void 0===n?void 0:n.evaluation_outputs)||void 0===o?void 0:o.output_value)return b}for(var f=0,g=Object.keys((null==t?void 0:t.deviation_entries)||{}).sort(function(t,e){return Number(t)-Number(e)});f<g.length;f++){v=g[f];if(b=null===(l=null===(i=null===(r=null==t?void 0:t.deviation_entries)||void 0===r?void 0:r[v])||void 0===i?void 0:i.evaluation_outputs)||void 0===l?void 0:l.output_value)return b}for(var p=0,h=Object.keys(t||{}).filter(function(t){return/^\d+$/.test(t)}).sort(function(t,e){return Number(t)-Number(e)});p<h.length;p++){var b;v=h[p];if(b=null===(a=null===(u=null==t?void 0:t[v])||void 0===u?void 0:u.evaluation_outputs)||void 0===a?void 0:a.output_value)return b}return(null===(s=null==t?void 0:t.evaluation_outputs)||void 0===s?void 0:s.output_value)?t.evaluation_outputs.output_value:null},exports.getRationale=function(t){if(!t.mapping_rationale)return{cognitiveData:{decisioning:[],gap:[],relevance_score:0,isMissingRationale:!0,citations:[]},score:0,relation:"N/A"};var e=t.mapping_rationale,n=parseInt(e.decision_strength||"0");return{cognitiveData:{decisioning:e.decisioning_factors||[],gap:e.gaps_in_decision||[],relevance_score:n,citations:e.citations},score:0,relation:"N/A"}},exports.getSideData=function(t,n,r,i){var l,u,a;void 0===i&&(i={});var s=o(t,n,r,i),c=(null===(l=s[0])||void 0===l?void 0:l.data)||{},d=(null===(u=s[0])||void 0===u?void 0:u.attributes)||null;return{title:e((null==c?void 0:c.title)||""),content:e((null==c?void 0:c.content)||""),change_history:e((null==c?void 0:c.change_history)||""),attributes:d,subsections:(null==c?void 0:c.subsections)||[],contentId:null===(a=s[0])||void 0===a?void 0:a.contentId,allItems:s}},exports.hasMeaningfulRedlineTags=function(t){var e;if("string"!=typeof t||!t)return!1;for(var n=/<(updated|deleted|changed|change)\b[^>]*>([\s\S]*?)<\/\1>/gi,o=null;null!==(o=n.exec(t));){if((null!==(e=o[2])&&void 0!==e?e:"").replace(/<[^>]*>/g,"").trim().length>0)return!0}return!1},exports.hasValue=n,exports.highlightClause=s,exports.isMissingStr=function(t){if(!t)return!0;var e=t.trim().toLowerCase();return e.includes("no equivalent")||"n/a"===e||"na"===e||"none"===e},exports.mixHexColors=function(t,e){var n=function(t){var e=t.replace("#","");return[parseInt(e.substring(0,2),16),parseInt(e.substring(2,4),16),parseInt(e.substring(4,6),16)]},o=function(t){var e=Math.round(t).toString(16);return 1===e.length?"0"+e:e};try{var r=n(t),i=n(e),l=(r[0]+i[0])/2*.95,u=(r[1]+i[1])/2*.95,a=(r[2]+i[2])/2*.95;return"#".concat(o(l)).concat(o(u)).concat(o(a))}catch(t){return"#FDE68A"}},exports.recursivelyFindSubSectionIdxById=l,exports.resetClauseHighlight=a,exports.resolveComparisonInputItems=o,exports.safeStringify=e,exports.scrollAndHighlightClause=function(t,e){var n=e.getBoundingClientRect(),o=t.getBoundingClientRect(),r=e.scrollTop+o.top-n.top-n.height/2+o.height/2;e.scrollTo({top:r,behavior:"smooth"});var i=function(){return s(t)};if("onscrollend"in e)e.addEventListener("scrollend",i,{once:!0});else{var l=e.scrollTop,u=function(){e.scrollTop===l?i():(l=e.scrollTop,requestAnimationFrame(u))};requestAnimationFrame(u)}},exports.scrollAndWait=function(t,e,n){if(Math.abs(t.scrollTop-e)<=2)n();else{var o,r=!1,i=function(){r||(r=!0,clearTimeout(o),t.removeEventListener("scrollend",l),n())},l=function(){return i()};t.addEventListener("scrollend",l),t.scrollTo({top:e,behavior:"smooth"}),o=setTimeout(i,800)}},exports.smoothScrollTo=function(t,e,n,o,r){void 0===n&&(n=300);var i=t.style.scrollBehavior;t.style.scrollBehavior="auto";var l=t.scrollTop,u=e-l,a=null,s=function(c){null===a&&(a=c);var d,v=c-a;v<n?(t.scrollTop=(d=v,d/=n,u*(--d*d*d+1)+l),r&&r(),requestAnimationFrame(s)):(t.scrollTop=e,t.style.scrollBehavior=i,r&&r(),o&&o())};requestAnimationFrame(s)},exports.stripRedlineTags=function(t){return"string"==typeof t&&t?t.replace(/<\/?(updated|deleted|changed|change)\b[^>]*>/gi,""):""},exports.waitForScrollIdle=function(t,e){return void 0===e&&(e=100),new Promise(function(n){var o,r=!1,i=function(){r||(r=!0,t.removeEventListener("scroll",l),n())},l=function(){clearTimeout(o),o=setTimeout(i,e)};t.addEventListener("scroll",l),o=setTimeout(i,e)})};
2
2
  //# sourceMappingURL=CognitiveComparehelpers.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("tslib"),e=require("react/jsx-runtime"),i=require("react"),o=require("@mui/material"),t=require("lucide-react"),l=require("../hooks/memoizedMarkdown.js"),r=require("../CompareContext.js"),d=require("../CognitiveComparehelpers.js"),a=require("../CognitiveCompareConstants.js");function u(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var s=u(i);exports.default=function(u){var c,v,f,p,g,x,h,m,_,I,y,b,A,S=u.section,R=u.idx,w=u.columnKey,E=u.colRef,O=u.mb,B=void 0===O?1:O,j=u.isExpanded,C=u.onToggle,T=u.navigation,D=u.parentNodeId,F=void 0===D?"":D,k=r.useCompareContext(),M=k.showOpenNodeRef,N=k.resolvedMarkdownStyles,P=k.maintainRelativeOrder,V=k.showDeviationBadges,W=void 0!==V&&V,q=k.renderSubSectionAccordion,G=k.treeData,L=k.proposedSections,K=k.existingSections,z=k.deviationNumberRegistry,H=k.deviationParentRegistry,U=k.getBadgeRef,X=k.openSummaryPopup,Y=k.getSectionCompareStyle,J=k.connectedSections,Q=k.openMoreFunctionsPopup,Z=k.isProposingFix,$=k.proposingFixNodeId,nn=k.isRedlineFlow,en=k.isSideBySide,on=k.activeSideBySideSection,tn=k.scrollSyncLocked,ln=k.unifiedNumbering,rn=k.toggleScrollSyncLocked,dn=k.summaryPopupAnchorEl,an="".concat(en?"1":"0","-").concat(String(null!=on?on:"")),un=(null===(c=S.displayTitle)||void 0===c||c)&&d.hasValue(S.title),sn=!!Z&&!!$&&"left"===w&&S.id===$,cn=d.hasMeaningfulRedlineTags(S.content),vn="boolean"==typeof nn?nn:cn,fn=cn,pn=vn&&cn,gn=pn?d.stripRedlineTags(S.content):S.content,xn=pn?S.content:void 0,hn=(null===(v=S.displayContent)||void 0===v||v||cn)&&d.hasValue(S.content),mn=!un&&!hn,_n=S.title;un||(_n=hn?"No Title Found":"No Matching Section Found");var In=S.evaluationResult;if(!In&&"right"===w)if(P){var yn=null===(f=S.refIndexes)||void 0===f?void 0:f[0],bn=L.find(function(n){return n.selfIndex===yn});In=null==bn?void 0:bn.evaluationResult}else In=null===(p=L[R])||void 0===p?void 0:p.evaluationResult;var An=null===(g=null==G?void 0:G.input_index_map)||void 0===g?void 0:g[0],Sn=null===(x=null==G?void 0:G.input_index_map)||void 0===x?void 0:x[1],Rn="left"===w?Sn:An,wn=function(n,e){var i;if(!e||!n)return null;for(var o=0,t=n;o<t.length;o++){var l=t[o];if(l.id===e)return l;if(null===(i=l.subsections)||void 0===i?void 0:i.length){var r=wn(l.subsections,e);if(r)return r}}return null},En="left"===w?S:wn(L,S.id),On="right"===w?S:wn(K,S.id),Bn=s.default.useMemo(function(){if(!P)return 0;var n=1/0,e=function(i,o,t,l){var r;if(i){var a=i.id;if(l&&"right"===w){var u=L.filter(function(n){var e;return null===(e=n.refIndexes)||void 0===e?void 0:e.includes(i.selfIndex)});u.length>0&&(a=u[0].id)}var s=i.id||(null==o?void 0:o.id)||(null==t?void 0:t.id),c=(null===(r=i.evaluationResult)||void 0===r?void 0:r.deviations)||{};Object.keys(c).forEach(function(e){var i="".concat(a).concat(d.DEVIATION_BADGE_SEPARATOR).concat(e),o=null==z?void 0:z[i];null!=o&&o<n&&(n=o);var t="".concat(s).concat(d.DEVIATION_BADGE_SEPARATOR).concat(e),l=null==z?void 0:z[t];null!=l&&l<n&&(n=l)});for(var v=i.subsections||[],f=(null==o?void 0:o.subsections)||[],p=(null==t?void 0:t.subsections)||[],g=Math.max(v.length,f.length,p.length),x=0;x<g;x++)e(v[x],f[x],p[x],!1)}};return e(S,En,On,!0),n!==1/0?n-1:0},[S,En,On,w,z,P,L]);if(P)if("left"===w){var jn=null===(h=S.refIndexes)||void 0===h?void 0:h[0],Cn=K.findIndex(function(n){return n.selfIndex===jn});On=-1!==Cn?K[Cn]:wn(K,S.id)}else{var Tn=null===(m=S.refIndexes)||void 0===m?void 0:m[0],Dn=L.findIndex(function(n){return n.selfIndex===Tn});En=-1!==Dn?L[Dn]:wn(L,S.id)}var Fn="left"===w?!On:!En,kn=In||(null==En?void 0:En.evaluationResult)||(null==On?void 0:On.evaluationResult),Mn=null!==(y=null===(I=null===(_=null==kn?void 0:kn.evaluation_outputs)||void 0===_?void 0:_.metadata)||void 0===I?void 0:I.label_color)&&void 0!==y?y:a.DEFAULT_DEVIAION_COLOR,Nn=d.generateColorPalette(Mn).highlightBg,Pn=(null==kn?void 0:kn.deviations)||{},Vn=S.id;if(P&&"left"!==w){var Wn=L.filter(function(n){var e;return null===(e=n.refIndexes)||void 0===e?void 0:e.includes(S.selfIndex)});Wn.length>0?Vn=Wn[0].id:(null==En?void 0:En.id)&&(Vn=En.id)}var qn=Object.keys(Pn)[0],Gn=qn?"".concat(Vn).concat(d.DEVIATION_BADGE_SEPARATOR).concat(qn):null,Ln=Gn?null==H?void 0:H[Gn]:null,Kn=R+1;if(P&&ln){var zn="left"===w?ln.leftNums.get(null==S?void 0:S.id):ln.rightNums.get(null==S?void 0:S.id);Fn&&void 0!==zn?Kn=zn:null!=Ln&&Ln>=0?Kn=Ln:void 0!==zn&&(Kn=zn)}else null!=Ln&&Ln>=0&&(Kn=Ln);var Hn=Object.entries(Pn).map(function(n){var e=n[0],i=n[1],o="".concat(Vn).concat(d.DEVIATION_BADGE_SEPARATOR).concat(e);return{deviationKey:e,deviationMap:i,refId:o,currentIndex:z[o]}}).filter(function(n){return void 0!==n.currentIndex&&null!==n.currentIndex});Hn.sort(function(n,e){return n.currentIndex-e.currentIndex});var Un,Xn=Hn.map(function(e){var i,o,t,l,r,a,u=e.deviationKey,s=e.deviationMap,c=e.refId,v=e.currentIndex;P&&void 0!==Bn&&(v-=Bn);var f=s[F],p=d.isMissingStr(f);if(p)f="";else if(!f)return null;var g=R,x=R;if(P)if("left"===w){var h=null===(i=S.refIndexes)||void 0===i?void 0:i[0],m=K.findIndex(function(n){return n.selfIndex===h});if(-1!==m)x=m;else{var _=K.findIndex(function(n){return n.id===S.id});x=-1!==_?_:R}}else{var I=null===(o=S.refIndexes)||void 0===o?void 0:o[0],y=L.findIndex(function(n){return n.selfIndex===I});if(-1!==y)g=y;else g=-1!==(j=L.findIndex(function(n){return n.id===S.id}))?j:R}var b="".concat(Vn).concat(d.DEVIATION_BADGE_SEPARATOR).concat(u).concat(d.DEVIATION_BADGE_SEPARATOR).concat(g).concat(d.DEVIATION_BADGE_SEPARATOR).concat(x),A=s[Rn],E=Fn||d.isMissingStr(A),O="".concat(Kn,".").concat(v),B=R;if("right"===w&&P){var j,C=null===(t=S.refIndexes)||void 0===t?void 0:t[0],T=L.findIndex(function(n){return n.selfIndex===C});if(-1!==T)B=T;else-1!==(j=L.findIndex(function(n){return n.id===S.id}))&&(B=j)}var D=Y?Y(B):null,k=(null==s?void 0:s.evaluation_outputs)||(null==kn?void 0:kn.evaluation_outputs),M=null!==(l=null==k?void 0:k.output_value)&&void 0!==l?l:null,N=null!==(a=null===(r=null==k?void 0:k.metadata)||void 0===r?void 0:r.label_color)&&void 0!==a?a:Mn,V=d.generateColorPalette(N),W=D?n.__assign(n.__assign({},D),{badgeBg:V.badgeBg,badgeBorder:V.badgeBorder,badgeText:V.badgeText}):n.__assign({},V),q=(null==s?void 0:s.deviation_summary)?{deviation_summary:s.deviation_summary,deviation_title:(null==s?void 0:s.deviation_title)||(null==kn?void 0:kn.deviation_title),deviation_impact:(null==s?void 0:s.deviation_impact)||(null==kn?void 0:kn.deviation_impact),deviation_explanation:(null==s?void 0:s.deviation_explanation)||(null==kn?void 0:kn.deviation_explanation),evaluation_outputs:k,cognitive_decisioning:(null==s?void 0:s.cognitive_decisioning)||(null==kn?void 0:kn.cognitive_decisioning)}:null,G=0,z=gn||"";if(f&&z){var H=z.split(/\n{2,}/),Z=H.findIndex(function(n){return n.includes(f)});if(-1!==Z){var $=Object.entries(Pn).filter(function(n){n[0];var e=n[1][F];return e&&H[Z].includes(e)}).sort(function(n,e){return H[Z].indexOf(n[1][F])-H[Z].indexOf(e[1][F])}),nn=$.filter(function(n){n[0];var e=n[1][F];return e&&(e.includes(f)||f.includes(e))});nn.length>1&&(G=Math.max(0,nn.findIndex(function(n){return n[0]===u})))}}var ln=U(w,c);return{id:c,actionId:b,label:O,highlight:f,side:w,style:W,stackIndex:G,score:M,isConnected:null==J?void 0:J.has(b),showScrollLockToggle:(null==J?void 0:J.has(b))||en&&on===b||!!dn&&dn===ln.current,scrollSyncLocked:tn,toggleScrollSyncLocked:rn,isOrphan:E,isMissingClause:p,badgeRef:ln,onClick:function(n){n.stopPropagation(),Q&&Q(n,En||{id:"orphan-left",title:"",content:""},E,On||{id:"orphan-right",title:"",content:""},b,W)},onSummaryClick:function(n){n.stopPropagation(),X(n,b,E,q)}}}).filter(Boolean),Yn=W||!vn&&sn?Xn:[],Jn=Xn.map(function(n){return n.highlight}).filter(Boolean),Qn=S.id&&w===(null==T?void 0:T.columnKey)?T:null,Zn=s.default.useRef(!1);return i.useEffect(function(){j||(Zn.current=!1)},[j]),e.jsxs(o.Box,n.__assign({ref:E,sx:{mb:B,width:"100%",display:"flex",flexDirection:"column",position:"relative",minWidth:0}},{children:[j&&(null==Qn?void 0:Qn.showAbove)&&e.jsx("div",n.__assign({style:{position:"sticky",top:0,height:"0px",cursor:"pointer"},onClick:function(){var n,e;return null===(e=null===(n=null==Qn?void 0:Qn.showAboveRef)||void 0===n?void 0:n.current)||void 0===e?void 0:e.scrollIntoView({behavior:"smooth",block:"center"})}},{children:e.jsx("div",n.__assign({style:n.__assign({transform:"translateY(-50%) translateX(calc(100% ".concat("left"===w?"+":"-"," 130px))"),position:"absolute",paddingTop:"20px"},"left"===w?{right:"-20px"}:{left:"-20px"})},{children:e.jsx(t.ChevronUp,{color:(null===(b=null==Qn?void 0:Qn.showAboveRef)||void 0===b?void 0:b.current)?window.getComputedStyle(Qn.showAboveRef.current).color:void 0})}))})),e.jsxs(o.Accordion,n.__assign({disableGutters:!0,expanded:!mn&&j,onChange:function(){mn||(C(),M.current=S.id)},sx:{boxShadow:"none",border:mn?"1px dashed #E2E8F0":"1px solid #E2E8F0",bgcolor:mn?"#FAFAFA":"#FFFFFF",borderRadius:"6px",flexGrow:1,width:"100%",display:"flex",flexDirection:"column",minWidth:0,"&:before":{display:"none"},"& .MuiAccordion-heading":{position:"sticky",top:-12,zIndex:10,background:"#fff"}}},{children:[e.jsx(o.AccordionSummary,n.__assign({expandIcon:mn?null:e.jsx(t.ChevronDown,{size:16}),sx:{minHeight:"36px",flexShrink:0,cursor:mn?"default":"pointer","& .MuiAccordionSummary-content":{my:.5,display:"grid",alignItems:"center",minWidth:0,width:"100%"},"& .MuiAccordionSummary-expandIconWrapper":{transition:"transform 0.2s ease"},"& .MuiAccordionSummary-expandIconWrapper.Mui-expanded":{transform:"rotate(180deg)"}}},{children:un&&e.jsx(o.Tooltip,n.__assign({title:_n,placement:"top"},{children:e.jsx(o.Typography,n.__assign({component:"div",sx:{fontSize:"12px",color:mn?"#94A3B8":"#19213D",fontWeight:mn?400:700,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",width:"100%",minWidth:0}},{children:(Un=_n,Un?d.safeStringify(Un).replace(/\\n/g,"\n").split(/(\*\*.*?\*\*)/g).map(function(n,i){return n.startsWith("**")&&n.endsWith("**")?e.jsx("strong",{children:n.slice(2,-2)},i):e.jsx(s.default.Fragment,{children:n},i)}):null)}))}))})),!mn&&e.jsxs(o.AccordionDetails,n.__assign({sx:{pt:0,pb:1.25,bgcolor:"#FFFFFF",flex:1,display:"flex",flexDirection:"column",minWidth:0}},{children:[hn&&e.jsx(l.MemoizedMarkdown,{content:gn,overlayContent:xn,sxStyles:N,highlights:Jn,maintainRelativeOrder:P,highlightBg:Nn,suppressHighlightBg:fn,deviationBadges:Yn,collisionKey:an}),(S.subsections||[]).map(function(n,e){return q({section:n,keyPath:"".concat(R,"-").concat(e),depth:0,columnKey:w,parentNodeId:F,sectionOffset:Bn})})]}))]})),j&&(null==Qn?void 0:Qn.showBelow)&&e.jsx("div",n.__assign({style:{position:"sticky",bottom:0,height:"0px",cursor:"pointer"},onClick:function(){var n,e;return null===(e=null===(n=null==Qn?void 0:Qn.showBelowRef)||void 0===n?void 0:n.current)||void 0===e?void 0:e.scrollIntoView({behavior:"smooth",block:"center"})}},{children:e.jsx("div",n.__assign({style:n.__assign({transform:"translateY(-50%) translateX(calc(100% ".concat("left"===w?"+":"-"," 130px))"),position:"absolute",paddingBottom:"20px"},"left"===w?{right:"-20px"}:{left:"-20px"})},{children:e.jsx(t.ChevronDown,{color:(null===(A=null==Qn?void 0:Qn.showBelowRef)||void 0===A?void 0:A.current)?window.getComputedStyle(Qn.showBelowRef.current).color:void 0})}))}))]}),"".concat(w,"-sec-").concat(R))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("tslib"),e=require("react/jsx-runtime"),i=require("react"),o=require("@mui/material"),t=require("lucide-react"),l=require("../hooks/memoizedMarkdown.js"),d=require("../CompareContext.js"),r=require("../CognitiveComparehelpers.js"),a=require("../CognitiveCompareConstants.js");function u(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var s=u(i);exports.default=function(u){var c,v,f,p,g,x,h,I,m,_,y,b,A,S=u.section,R=u.idx,w=u.columnKey,E=u.colRef,O=u.mb,B=void 0===O?1:O,j=u.isExpanded,C=u.onToggle,T=u.navigation,D=u.parentNodeId,F=void 0===D?"":D,k=d.useCompareContext(),M=k.showOpenNodeRef,N=k.resolvedMarkdownStyles,P=k.maintainRelativeOrder,V=k.showDeviationBadges,W=void 0!==V&&V,q=k.renderSubSectionAccordion,G=k.treeData,L=k.proposedSections,K=k.existingSections,z=k.deviationNumberRegistry,H=k.deviationParentRegistry,U=k.getBadgeRef,X=k.openSummaryPopup,Y=k.getSectionCompareStyle,J=k.connectedSections,Q=k.openMoreFunctionsPopup,Z=k.isProposingFix,$=k.proposingFixNodeId,nn=k.isRedlineFlow,en=k.isSideBySide,on=k.activeSideBySideSection,tn=k.scrollSyncLocked,ln=k.unifiedNumbering,dn=k.toggleScrollSyncLocked,rn=k.summaryPopupAnchorEl,an="".concat(en?"1":"0","-").concat(String(null!=on?on:"")),un=(null===(c=S.displayTitle)||void 0===c||c)&&r.hasValue(S.title),sn=!(!Z||!$||"left"!==w||S.id!==$&&S.nodeId!==$),cn=r.hasMeaningfulRedlineTags(S.content),vn="boolean"==typeof nn?nn:cn,fn=cn,pn=vn&&cn,gn=pn?r.stripRedlineTags(S.content):S.content,xn=pn?S.content:void 0,hn=(null===(v=S.displayContent)||void 0===v||v||cn)&&r.hasValue(S.content),In=!un&&!hn,mn=S.title;un||(mn=hn?"No Title Found":"No Matching Section Found");var _n=S.evaluationResult;if(!_n&&"right"===w)if(P){var yn=null===(f=S.refIndexes)||void 0===f?void 0:f[0],bn=L.find(function(n){return n.selfIndex===yn});_n=null==bn?void 0:bn.evaluationResult}else _n=null===(p=L[R])||void 0===p?void 0:p.evaluationResult;var An=null===(g=null==G?void 0:G.input_index_map)||void 0===g?void 0:g[0],Sn=null===(x=null==G?void 0:G.input_index_map)||void 0===x?void 0:x[1],Rn="left"===w?Sn:An,wn=function(n,e){var i;if(!e||!n)return null;for(var o=0,t=n;o<t.length;o++){var l=t[o];if(l.id===e||l.nodeId===e||l.contentId===e)return l;if(null===(i=l.subsections)||void 0===i?void 0:i.length){var d=wn(l.subsections,e);if(d)return d}}return null},En="left"===w?S:wn(L,S.id),On="right"===w?S:wn(K,S.id),Bn=s.default.useMemo(function(){if(!P)return 0;var n=1/0,e=function(i,o,t,l){var d;if(i){var a=i.nodeId||i.id;if(l&&"right"===w){var u=L.filter(function(n){var e;return null===(e=n.refIndexes)||void 0===e?void 0:e.includes(i.selfIndex)});u.length>0&&(a=u[0].nodeId||u[0].id)}var s=i.nodeId||i.id||(null==o?void 0:o.nodeId)||(null==o?void 0:o.id)||(null==t?void 0:t.nodeId)||(null==t?void 0:t.id),c=(null===(d=i.evaluationResult)||void 0===d?void 0:d.deviations)||{};Object.keys(c).forEach(function(e){var i="".concat(a).concat(r.DEVIATION_BADGE_SEPARATOR).concat(e),o=null==z?void 0:z[i];null!=o&&o<n&&(n=o);var t="".concat(s).concat(r.DEVIATION_BADGE_SEPARATOR).concat(e),l=null==z?void 0:z[t];null!=l&&l<n&&(n=l)});for(var v=i.subsections||[],f=(null==o?void 0:o.subsections)||[],p=(null==t?void 0:t.subsections)||[],g=Math.max(v.length,f.length,p.length),x=0;x<g;x++)e(v[x],f[x],p[x],!1)}};return e(S,En,On,!0),n!==1/0?n-1:0},[S,En,On,w,z,P,L]);if(P)if("left"===w){var jn=null===(h=S.refIndexes)||void 0===h?void 0:h[0],Cn=K.findIndex(function(n){return n.selfIndex===jn});On=-1!==Cn?K[Cn]:wn(K,S.id)}else{var Tn=null===(I=S.refIndexes)||void 0===I?void 0:I[0],Dn=L.findIndex(function(n){return n.selfIndex===Tn});En=-1!==Dn?L[Dn]:wn(L,S.id)}var Fn="left"===w?!On:!En,kn=_n||(null==En?void 0:En.evaluationResult)||(null==On?void 0:On.evaluationResult),Mn=null!==(y=null===(_=null===(m=null==kn?void 0:kn.evaluation_outputs)||void 0===m?void 0:m.metadata)||void 0===_?void 0:_.label_color)&&void 0!==y?y:a.DEFAULT_DEVIAION_COLOR,Nn=r.generateColorPalette(Mn).highlightBg,Pn=(null==kn?void 0:kn.deviations)||{},Vn=S.nodeId||S.id;if(P&&"left"!==w){var Wn=L.filter(function(n){var e;return null===(e=n.refIndexes)||void 0===e?void 0:e.includes(S.selfIndex)});Wn.length>0?Vn=Wn[0].nodeId||Wn[0].id:(null==En?void 0:En.id)&&(Vn=En.nodeId||En.id)}var qn=Object.keys(Pn)[0],Gn=qn?"".concat(Vn).concat(r.DEVIATION_BADGE_SEPARATOR).concat(qn):null,Ln=Gn?null==H?void 0:H[Gn]:null,Kn=R+1;if(P&&ln){var zn="left"===w?ln.leftNums.get(null==S?void 0:S.id):ln.rightNums.get(null==S?void 0:S.id);Fn&&void 0!==zn?Kn=zn:null!=Ln&&Ln>=0?Kn=Ln:void 0!==zn&&(Kn=zn)}else null!=Ln&&Ln>=0&&(Kn=Ln);var Hn=Object.entries(Pn).map(function(n){var e=n[0],i=n[1],o="".concat(Vn).concat(r.DEVIATION_BADGE_SEPARATOR).concat(e);return{deviationKey:e,deviationMap:i,refId:o,currentIndex:z[o]}}).filter(function(n){return void 0!==n.currentIndex&&null!==n.currentIndex});Hn.sort(function(n,e){return n.currentIndex-e.currentIndex});var Un,Xn=Hn.map(function(e){var i,o,t,l,d,a,u=e.deviationKey,s=e.deviationMap,c=e.refId,v=e.currentIndex;P&&void 0!==Bn&&(v-=Bn);var f=s[F],p=r.isMissingStr(f);if(p)f="";else if(!f)return null;var g=R,x=R;if(P)if("left"===w){var h=null===(i=S.refIndexes)||void 0===i?void 0:i[0],I=K.findIndex(function(n){return n.selfIndex===h});if(-1!==I)x=I;else{var m=K.findIndex(function(n){return n.id===S.id||n.nodeId===S.nodeId||n.contentId===S.contentId});x=-1!==m?m:R}}else{var _=null===(o=S.refIndexes)||void 0===o?void 0:o[0],y=L.findIndex(function(n){return n.selfIndex===_});if(-1!==y)g=y;else g=-1!==(j=L.findIndex(function(n){return n.id===S.id||n.nodeId===S.nodeId||n.contentId===S.contentId}))?j:R}var b="".concat(Vn).concat(r.DEVIATION_BADGE_SEPARATOR).concat(u).concat(r.DEVIATION_BADGE_SEPARATOR).concat(g).concat(r.DEVIATION_BADGE_SEPARATOR).concat(x),A=s[Rn],E=Fn||r.isMissingStr(A),O="".concat(Kn,".").concat(v),B=R;if("right"===w&&P){var j,C=null===(t=S.refIndexes)||void 0===t?void 0:t[0],T=L.findIndex(function(n){return n.selfIndex===C});if(-1!==T)B=T;else-1!==(j=L.findIndex(function(n){return n.id===S.id||n.nodeId===S.nodeId||n.contentId===S.contentId}))&&(B=j)}var D=Y?Y(B):null,k=(null==s?void 0:s.evaluation_outputs)||(null==kn?void 0:kn.evaluation_outputs),M=null!==(l=null==k?void 0:k.output_value)&&void 0!==l?l:null,N=null!==(a=null===(d=null==k?void 0:k.metadata)||void 0===d?void 0:d.label_color)&&void 0!==a?a:Mn,V=r.generateColorPalette(N),W=D?n.__assign(n.__assign({},D),{badgeBg:V.badgeBg,badgeBorder:V.badgeBorder,badgeText:V.badgeText}):n.__assign({},V),q=(null==s?void 0:s.deviation_summary)?{deviation_summary:s.deviation_summary,deviation_title:(null==s?void 0:s.deviation_title)||(null==kn?void 0:kn.deviation_title),deviation_impact:(null==s?void 0:s.deviation_impact)||(null==kn?void 0:kn.deviation_impact),deviation_explanation:(null==s?void 0:s.deviation_explanation)||(null==kn?void 0:kn.deviation_explanation),evaluation_outputs:k,cognitive_decisioning:(null==s?void 0:s.cognitive_decisioning)||(null==kn?void 0:kn.cognitive_decisioning)}:null,G=0,z=gn||"";if(f&&z){var H=z.split(/\n{2,}/),Z=H.findIndex(function(n){return n.includes(f)});if(-1!==Z){var $=Object.entries(Pn).filter(function(n){n[0];var e=n[1][F];return e&&H[Z].includes(e)}).sort(function(n,e){return H[Z].indexOf(n[1][F])-H[Z].indexOf(e[1][F])}),nn=$.filter(function(n){n[0];var e=n[1][F];return e&&(e.includes(f)||f.includes(e))});nn.length>1&&(G=Math.max(0,nn.findIndex(function(n){return n[0]===u})))}}var ln=U(w,c);return{id:c,actionId:b,label:O,highlight:f,side:w,style:W,stackIndex:G,score:M,isConnected:null==J?void 0:J.has(b),showScrollLockToggle:(null==J?void 0:J.has(b))||en&&on===b||!!rn&&rn===ln.current,scrollSyncLocked:tn,toggleScrollSyncLocked:dn,isOrphan:E,isMissingClause:p,badgeRef:ln,onClick:function(n){n.stopPropagation(),Q&&Q(n,En||{id:"orphan-left",title:"",content:""},E,On||{id:"orphan-right",title:"",content:""},b,W)},onSummaryClick:function(n){n.stopPropagation(),X(n,b,E,q)}}}).filter(Boolean),Yn=W||!vn&&sn?Xn:[],Jn=Xn.map(function(n){return n.highlight}).filter(Boolean),Qn=S.id&&w===(null==T?void 0:T.columnKey)?T:null,Zn=s.default.useRef(!1);return i.useEffect(function(){j||(Zn.current=!1)},[j]),e.jsxs(o.Box,n.__assign({ref:E,sx:{mb:B,width:"100%",display:"flex",flexDirection:"column",position:"relative",minWidth:0}},{children:[j&&(null==Qn?void 0:Qn.showAbove)&&e.jsx("div",n.__assign({style:{position:"sticky",top:0,height:"0px",cursor:"pointer"},onClick:function(){var n,e;return null===(e=null===(n=null==Qn?void 0:Qn.showAboveRef)||void 0===n?void 0:n.current)||void 0===e?void 0:e.scrollIntoView({behavior:"smooth",block:"center"})}},{children:e.jsx("div",n.__assign({style:n.__assign({transform:"translateY(-50%) translateX(calc(100% ".concat("left"===w?"+":"-"," 130px))"),position:"absolute",paddingTop:"20px"},"left"===w?{right:"-20px"}:{left:"-20px"})},{children:e.jsx(t.ChevronUp,{color:(null===(b=null==Qn?void 0:Qn.showAboveRef)||void 0===b?void 0:b.current)?window.getComputedStyle(Qn.showAboveRef.current).color:void 0})}))})),e.jsxs(o.Accordion,n.__assign({disableGutters:!0,expanded:!In&&j,onChange:function(){In||(C(),M.current=S.id)},sx:{boxShadow:"none",border:In?"1px dashed #E2E8F0":"1px solid #E2E8F0",bgcolor:In?"#FAFAFA":"#FFFFFF",borderRadius:"6px",flexGrow:1,width:"100%",display:"flex",flexDirection:"column",minWidth:0,"&:before":{display:"none"},"& .MuiAccordion-heading":{position:"sticky",top:-12,zIndex:10,background:"#fff"}}},{children:[e.jsx(o.AccordionSummary,n.__assign({expandIcon:In?null:e.jsx(t.ChevronDown,{size:16}),sx:{minHeight:"36px",flexShrink:0,cursor:In?"default":"pointer","& .MuiAccordionSummary-content":{my:.5,display:"grid",alignItems:"center",minWidth:0,width:"100%"},"& .MuiAccordionSummary-expandIconWrapper":{transition:"transform 0.2s ease"},"& .MuiAccordionSummary-expandIconWrapper.Mui-expanded":{transform:"rotate(180deg)"}}},{children:un&&e.jsx(o.Tooltip,n.__assign({title:mn,placement:"top"},{children:e.jsx(o.Typography,n.__assign({component:"div",sx:{fontSize:"12px",color:In?"#94A3B8":"#19213D",fontWeight:In?400:700,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",width:"100%",minWidth:0}},{children:(Un=mn,Un?r.safeStringify(Un).replace(/\\n/g,"\n").split(/(\*\*.*?\*\*)/g).map(function(n,i){return n.startsWith("**")&&n.endsWith("**")?e.jsx("strong",{children:n.slice(2,-2)},i):e.jsx(s.default.Fragment,{children:n},i)}):null)}))}))})),!In&&e.jsxs(o.AccordionDetails,n.__assign({sx:{pt:0,pb:1.25,bgcolor:"#FFFFFF",flex:1,display:"flex",flexDirection:"column",minWidth:0}},{children:[hn&&e.jsx(l.MemoizedMarkdown,{content:gn,overlayContent:xn,sxStyles:N,highlights:Jn,maintainRelativeOrder:P,highlightBg:Nn,suppressHighlightBg:fn,deviationBadges:Yn,collisionKey:an}),(S.subsections||[]).map(function(n,e){return q({section:n,keyPath:"".concat(R,"-").concat(e),depth:0,columnKey:w,parentNodeId:F,sectionOffset:Bn})})]}))]})),j&&(null==Qn?void 0:Qn.showBelow)&&e.jsx("div",n.__assign({style:{position:"sticky",bottom:0,height:"0px",cursor:"pointer"},onClick:function(){var n,e;return null===(e=null===(n=null==Qn?void 0:Qn.showBelowRef)||void 0===n?void 0:n.current)||void 0===e?void 0:e.scrollIntoView({behavior:"smooth",block:"center"})}},{children:e.jsx("div",n.__assign({style:n.__assign({transform:"translateY(-50%) translateX(calc(100% ".concat("left"===w?"+":"-"," 130px))"),position:"absolute",paddingBottom:"20px"},"left"===w?{right:"-20px"}:{left:"-20px"})},{children:e.jsx(t.ChevronDown,{color:(null===(A=null==Qn?void 0:Qn.showBelowRef)||void 0===A?void 0:A.current)?window.getComputedStyle(Qn.showBelowRef.current).color:void 0})}))}))]}),"".concat(w,"-sec-").concat(R))};
2
2
  //# sourceMappingURL=SectionAccordion.js.map