@viswa-test/requirement-ai 0.0.1 → 0.0.3

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 (419) hide show
  1. package/dist/assests/svg/ButtonCognitiveIcon.js +1 -1
  2. package/dist/assests/svg/PdfViewerIcons.js +1 -1
  3. package/dist/cjs/assests/svg/ButtonCognitiveIcon.js +1 -1
  4. package/dist/cjs/assests/svg/PdfViewerIcons.js +1 -1
  5. package/dist/cjs/features/CognitiveCompare/CitationAnchor.js +1 -1
  6. package/dist/cjs/features/CognitiveCompare/CognitiveCompare.js +1 -1
  7. package/dist/cjs/features/CognitiveCompare/CognitiveCompareConstants.js +1 -1
  8. package/dist/cjs/features/CognitiveCompare/CognitiveComparehelpers.js +1 -1
  9. package/dist/cjs/features/CognitiveCompare/CognitivePopup.js +1 -1
  10. package/dist/cjs/features/CognitiveCompare/CompareContext.js +2 -0
  11. package/dist/cjs/features/CognitiveCompare/CompareContext.js.map +1 -0
  12. package/dist/cjs/features/CognitiveCompare/ResizableSplitPane.js +1 -1
  13. package/dist/cjs/features/CognitiveCompare/components/CognitiveSummaryPopup.js +2 -0
  14. package/dist/cjs/features/CognitiveCompare/components/CognitiveSummaryPopup.js.map +1 -0
  15. package/dist/cjs/features/CognitiveCompare/components/CompareHeader.js +1 -1
  16. package/dist/cjs/features/CognitiveCompare/components/LHSSectionRow.js +2 -0
  17. package/dist/cjs/features/CognitiveCompare/components/LHSSectionRow.js.map +1 -0
  18. package/dist/cjs/features/CognitiveCompare/components/RHSSectionRow.js +2 -0
  19. package/dist/cjs/features/CognitiveCompare/components/RHSSectionRow.js.map +1 -0
  20. package/dist/cjs/features/CognitiveCompare/components/SectionAccordion.js +1 -1
  21. package/dist/cjs/features/CognitiveCompare/components/SubSectionAccordion.js +1 -1
  22. package/dist/cjs/features/CognitiveCompare/components/SvgConnectors.js +2 -0
  23. package/dist/cjs/features/CognitiveCompare/components/SvgConnectors.js.map +1 -0
  24. package/dist/cjs/features/CognitiveCompare/components/connectedLines.js +2 -0
  25. package/dist/cjs/features/CognitiveCompare/components/connectedLines.js.map +1 -0
  26. package/dist/cjs/features/CognitiveCompare/hooks/memoizedMarkdown.js +1 -1
  27. package/dist/cjs/features/CognitiveCompare/hooks/useCompareData.js +1 -1
  28. package/dist/cjs/features/CognitiveCompare/hooks/useComparePopups.js +1 -1
  29. package/dist/cjs/features/CognitiveCompare/hooks/useDeviationNavigation.js +1 -1
  30. package/dist/cjs/features/CognitiveCompare/hooks/useLinesCalculator.js +2 -0
  31. package/dist/cjs/features/CognitiveCompare/hooks/useLinesCalculator.js.map +1 -0
  32. package/dist/cjs/features/CognitiveCompare/hooks/useResizeHandler.js +2 -0
  33. package/dist/cjs/features/CognitiveCompare/hooks/useResizeHandler.js.map +1 -0
  34. package/dist/cjs/features/CognitiveCompare/hooks/useSideBySide.js +2 -0
  35. package/dist/cjs/features/CognitiveCompare/hooks/useSideBySide.js.map +1 -0
  36. package/dist/cjs/features/CognitiveCompare/hooks/useStyles.js +2 -0
  37. package/dist/cjs/features/CognitiveCompare/hooks/useStyles.js.map +1 -0
  38. package/dist/cjs/features/CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.js +1 -1
  39. package/dist/cjs/features/CognitiveInternalgptReasoning/CognitiveInternalgptReasoningComponent.js +1 -1
  40. package/dist/cjs/features/CognitiveInternalgptReasoning/CognitiveNonWebSearchReasoning.module.css.js +1 -1
  41. package/dist/cjs/features/IngestionStatus/IngestionStatusComponent.js +2 -0
  42. package/dist/cjs/features/IngestionStatus/IngestionStatusComponent.js.map +1 -0
  43. package/dist/cjs/features/IngestionStatus/ingestion.module.css.js +2 -0
  44. package/dist/cjs/features/IngestionStatus/ingestion.module.css.js.map +1 -0
  45. package/dist/cjs/features/IngestionStatus/useIngestionStatus.js +2 -0
  46. package/dist/cjs/features/IngestionStatus/useIngestionStatus.js.map +1 -0
  47. package/dist/cjs/features/PdfViewer/PdfToolbar.js +1 -1
  48. package/dist/cjs/features/PdfViewer/PdfViewer.js +1 -1
  49. package/dist/cjs/features/PdfViewer/usePdfHighlight.js +1 -1
  50. package/dist/cjs/features/RequirementAI/components/CustomPopover/CustomPopover.js +2 -0
  51. package/dist/cjs/features/RequirementAI/components/CustomPopover/CustomPopover.js.map +1 -0
  52. package/dist/cjs/features/RequirementAI/components/CustomPopover/CustomPopover.module.css.js +2 -0
  53. package/dist/cjs/features/RequirementAI/components/CustomPopover/CustomPopover.module.css.js.map +1 -0
  54. package/dist/cjs/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.js +1 -1
  55. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/Editor.css.js +1 -1
  56. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/Editor.js +1 -1
  57. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/DeleteNode.js +2 -0
  58. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/DeleteNode.js.map +1 -0
  59. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/InsertNode.js +2 -0
  60. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/InsertNode.js.map +1 -0
  61. package/dist/cjs/features/RequirementAI/components/RichTextEditor/RichTextEditor.js +1 -1
  62. package/dist/cjs/features/RequirementAI/components/UserStoryCard/AttachedContext.js +1 -1
  63. package/dist/cjs/features/RequirementAI/components/UserStoryCard/AttachedContext.module.css.js +2 -0
  64. package/dist/cjs/features/RequirementAI/components/UserStoryCard/AttachedContext.module.css.js.map +1 -0
  65. package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationAnchor.js +2 -0
  66. package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationAnchor.js.map +1 -0
  67. package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationComponent.css.js +2 -0
  68. package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationComponent.css.js.map +1 -0
  69. package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.js +2 -0
  70. package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.js.map +1 -0
  71. package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/ResizableSplitPane.js +2 -0
  72. package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/ResizableSplitPane.js.map +1 -0
  73. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.js +2 -0
  74. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.js.map +1 -0
  75. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/InterateComponent.js +2 -0
  76. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/InterateComponent.js.map +1 -0
  77. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.js +2 -0
  78. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.js.map +1 -0
  79. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/ToneToggle.js +2 -0
  80. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/ToneToggle.js.map +1 -0
  81. package/dist/cjs/features/RequirementAI/components/UserStoryCard/UserStoryCard.js +1 -1
  82. package/dist/cjs/features/RequirementAI/components/UserStoryCard/UserStoryCard.module.css.js +1 -1
  83. package/dist/cjs/features/RequirementAI/components/UserStoryCard/icons/History.svg.js +2 -0
  84. package/dist/cjs/features/RequirementAI/components/UserStoryCard/icons/History.svg.js.map +1 -0
  85. package/dist/cjs/features/RequirementAI/components/UserStoryCard/icons/PdfViewerIcons.js +2 -0
  86. package/dist/cjs/features/RequirementAI/components/UserStoryCard/icons/PdfViewerIcons.js.map +1 -0
  87. package/dist/cjs/features/RequirementAI/components/UserStoryCard/icons/aiMagic.svg.js +2 -0
  88. package/dist/cjs/features/RequirementAI/components/UserStoryCard/icons/aiMagic.svg.js.map +1 -0
  89. package/dist/cjs/features/RequirementAI/components/UserStoryCard/icons/cognitiveBrain.svg.js +2 -0
  90. package/dist/cjs/features/RequirementAI/components/UserStoryCard/icons/cognitiveBrain.svg.js.map +1 -0
  91. package/dist/cjs/features/RequirementAI/components/UserStoryCard/icons/message-chat-square.svg.js +2 -0
  92. package/dist/cjs/features/RequirementAI/components/UserStoryCard/icons/message-chat-square.svg.js.map +1 -0
  93. package/dist/cjs/features/RequirementAI/components/ai-reasoning/AIReasonAccordion.js +1 -1
  94. package/dist/cjs/features/RequirementAI/components/ai-reasoning/AiReasonAccoridon.module.css.js +1 -1
  95. package/dist/cjs/features/RequirementAI/components/ai-reasoning/AiReasoningCitation.js +1 -1
  96. package/dist/cjs/features/RequirementAI/components/ai-reasoning/AiReasoningCitationContent.js +1 -1
  97. package/dist/cjs/features/RequirementAI/components/ai-reasoning/BigEnoughComponent.js +1 -1
  98. package/dist/cjs/features/RequirementAI/components/cra/PartialRequirementContent.js +1 -1
  99. package/dist/cjs/features/RequirementAI/components/cra/PartialRequirementContent.module.css.js +1 -1
  100. package/dist/cjs/features/RequirementAI/components/lsc-reason-gap/GapFilterBlock.js +1 -1
  101. package/dist/cjs/features/RequirementAI/components/segment/ExampleComponentWrapper.js +2 -0
  102. package/dist/cjs/features/RequirementAI/components/segment/ExampleComponentWrapper.js.map +1 -0
  103. package/dist/cjs/features/RequirementAI/components/segment/Segment.js +2 -0
  104. package/dist/cjs/features/RequirementAI/components/segment/Segment.js.map +1 -0
  105. package/dist/cjs/features/RequirementAI/components/segment/segment.module.css.js +2 -0
  106. package/dist/cjs/features/RequirementAI/components/segment/segment.module.css.js.map +1 -0
  107. package/dist/cjs/features/RequirementAI/components/story-screen/StreamingScreenSidebar.js +1 -1
  108. package/dist/cjs/features/RequirementAI/components/story-screen/SubfeatureBlock.js +1 -1
  109. package/dist/cjs/features/RequirementAI/components/story-screen/UserStoryScreen.js +1 -1
  110. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.js +1 -1
  111. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.module.css.js +1 -1
  112. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.js +2 -0
  113. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.js.map +1 -0
  114. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.module.css.js +2 -0
  115. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.module.css.js.map +1 -0
  116. package/dist/cjs/features/RequirementAI/hooks/useStreamContentHandler.js +1 -1
  117. package/dist/cjs/features/RequirementAI/icons/BrainRed.js +2 -0
  118. package/dist/cjs/features/RequirementAI/icons/BrainRed.js.map +1 -0
  119. package/dist/cjs/features/RequirementAI/icons/CognitiveDecision.js +1 -1
  120. package/dist/cjs/features/RequirementAI/shared/UpdatedAnimationContent.js +1 -1
  121. package/dist/cjs/features/RequirementAI/utils/css.utils.js +2 -0
  122. package/dist/cjs/features/RequirementAI/utils/css.utils.js.map +1 -0
  123. package/dist/cjs/features/RequirementAI/utils/userstory-approval-transform.utils.js +1 -1
  124. package/dist/cjs/features/SplitterCitations/Splitter.module.css.js +1 -1
  125. package/dist/cjs/features/SplitterCitations/SplitterCitationsComponent.js +1 -1
  126. package/dist/cjs/features/TextualGuidelines/TextualGuideLinesComponent.js +2 -0
  127. package/dist/cjs/features/TextualGuidelines/TextualGuideLinesComponent.js.map +1 -0
  128. package/dist/cjs/features/TextualGuidelines/TextualGuidelines.module.css.js +2 -0
  129. package/dist/cjs/features/TextualGuidelines/TextualGuidelines.module.css.js.map +1 -0
  130. package/dist/cjs/features/UserStoryImport/components/ProjectCard.js +1 -1
  131. package/dist/cjs/features/UserStoryImport/components/TypeDropdown.js +1 -1
  132. package/dist/cjs/features/UserStoryImport/components/UserStoryCard.js +1 -1
  133. package/dist/cjs/features/UserStoryImport/hooks/useUSPData.js +1 -1
  134. package/dist/cjs/features/UserStoryImport/user-story-picker.css.js +1 -1
  135. package/dist/cjs/index.js +1 -1
  136. package/dist/features/CognitiveCompare/CitationAnchor.js +1 -1
  137. package/dist/features/CognitiveCompare/CognitiveCompare.js +1 -1
  138. package/dist/features/CognitiveCompare/CognitiveCompareConstants.js +1 -1
  139. package/dist/features/CognitiveCompare/CognitiveComparehelpers.js +1 -1
  140. package/dist/features/CognitiveCompare/CognitivePopup.js +1 -1
  141. package/dist/features/CognitiveCompare/CompareContext.js +2 -0
  142. package/dist/features/CognitiveCompare/CompareContext.js.map +1 -0
  143. package/dist/features/CognitiveCompare/ResizableSplitPane.js +1 -1
  144. package/dist/features/CognitiveCompare/components/CognitiveSummaryPopup.js +2 -0
  145. package/dist/features/CognitiveCompare/components/CognitiveSummaryPopup.js.map +1 -0
  146. package/dist/features/CognitiveCompare/components/CompareHeader.js +1 -1
  147. package/dist/features/CognitiveCompare/components/LHSSectionRow.js +2 -0
  148. package/dist/features/CognitiveCompare/components/LHSSectionRow.js.map +1 -0
  149. package/dist/features/CognitiveCompare/components/RHSSectionRow.js +2 -0
  150. package/dist/features/CognitiveCompare/components/RHSSectionRow.js.map +1 -0
  151. package/dist/features/CognitiveCompare/components/SectionAccordion.js +1 -1
  152. package/dist/features/CognitiveCompare/components/SubSectionAccordion.js +1 -1
  153. package/dist/features/CognitiveCompare/components/SvgConnectors.js +2 -0
  154. package/dist/features/CognitiveCompare/components/SvgConnectors.js.map +1 -0
  155. package/dist/features/CognitiveCompare/components/connectedLines.js +2 -0
  156. package/dist/features/CognitiveCompare/components/connectedLines.js.map +1 -0
  157. package/dist/features/CognitiveCompare/hooks/memoizedMarkdown.js +1 -1
  158. package/dist/features/CognitiveCompare/hooks/useCompareData.js +1 -1
  159. package/dist/features/CognitiveCompare/hooks/useComparePopups.js +1 -1
  160. package/dist/features/CognitiveCompare/hooks/useDeviationNavigation.js +1 -1
  161. package/dist/features/CognitiveCompare/hooks/useLinesCalculator.js +2 -0
  162. package/dist/features/CognitiveCompare/hooks/useLinesCalculator.js.map +1 -0
  163. package/dist/features/CognitiveCompare/hooks/useResizeHandler.js +2 -0
  164. package/dist/features/CognitiveCompare/hooks/useResizeHandler.js.map +1 -0
  165. package/dist/features/CognitiveCompare/hooks/useSideBySide.js +2 -0
  166. package/dist/features/CognitiveCompare/hooks/useSideBySide.js.map +1 -0
  167. package/dist/features/CognitiveCompare/hooks/useStyles.js +2 -0
  168. package/dist/features/CognitiveCompare/hooks/useStyles.js.map +1 -0
  169. package/dist/features/CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.js +1 -1
  170. package/dist/features/CognitiveInternalgptReasoning/CognitiveInternalgptReasoningComponent.js +1 -1
  171. package/dist/features/CognitiveInternalgptReasoning/CognitiveNonWebSearchReasoning.module.css.js +1 -1
  172. package/dist/features/IngestionStatus/IngestionStatusComponent.js +2 -0
  173. package/dist/features/IngestionStatus/IngestionStatusComponent.js.map +1 -0
  174. package/dist/features/IngestionStatus/ingestion.module.css.js +2 -0
  175. package/dist/features/IngestionStatus/ingestion.module.css.js.map +1 -0
  176. package/dist/features/IngestionStatus/useIngestionStatus.js +2 -0
  177. package/dist/features/IngestionStatus/useIngestionStatus.js.map +1 -0
  178. package/dist/features/PdfViewer/PdfToolbar.js +1 -1
  179. package/dist/features/PdfViewer/PdfViewer.js +1 -1
  180. package/dist/features/PdfViewer/usePdfHighlight.js +1 -1
  181. package/dist/features/RequirementAI/components/CustomPopover/CustomPopover.js +2 -0
  182. package/dist/features/RequirementAI/components/CustomPopover/CustomPopover.js.map +1 -0
  183. package/dist/features/RequirementAI/components/CustomPopover/CustomPopover.module.css.js +2 -0
  184. package/dist/features/RequirementAI/components/CustomPopover/CustomPopover.module.css.js.map +1 -0
  185. package/dist/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.js +1 -1
  186. package/dist/features/RequirementAI/components/RichTextEditor/Editor/Editor.css.js +1 -1
  187. package/dist/features/RequirementAI/components/RichTextEditor/Editor/Editor.js +1 -1
  188. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/DeleteNode.js +2 -0
  189. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/DeleteNode.js.map +1 -0
  190. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/InsertNode.js +2 -0
  191. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/InsertNode.js.map +1 -0
  192. package/dist/features/RequirementAI/components/RichTextEditor/RichTextEditor.js +1 -1
  193. package/dist/features/RequirementAI/components/UserStoryCard/AttachedContext.js +1 -1
  194. package/dist/features/RequirementAI/components/UserStoryCard/AttachedContext.module.css.js +2 -0
  195. package/dist/features/RequirementAI/components/UserStoryCard/AttachedContext.module.css.js.map +1 -0
  196. package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationAnchor.js +2 -0
  197. package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationAnchor.js.map +1 -0
  198. package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationComponent.css.js +2 -0
  199. package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationComponent.css.js.map +1 -0
  200. package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.js +2 -0
  201. package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.js.map +1 -0
  202. package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/ResizableSplitPane.js +2 -0
  203. package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/ResizableSplitPane.js.map +1 -0
  204. package/dist/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.js +2 -0
  205. package/dist/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.js.map +1 -0
  206. package/dist/features/RequirementAI/components/UserStoryCard/Popups/InterateComponent.js +2 -0
  207. package/dist/features/RequirementAI/components/UserStoryCard/Popups/InterateComponent.js.map +1 -0
  208. package/dist/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.js +2 -0
  209. package/dist/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.js.map +1 -0
  210. package/dist/features/RequirementAI/components/UserStoryCard/Popups/ToneToggle.js +2 -0
  211. package/dist/features/RequirementAI/components/UserStoryCard/Popups/ToneToggle.js.map +1 -0
  212. package/dist/features/RequirementAI/components/UserStoryCard/UserStoryCard.js +1 -1
  213. package/dist/features/RequirementAI/components/UserStoryCard/UserStoryCard.module.css.js +1 -1
  214. package/dist/features/RequirementAI/components/UserStoryCard/icons/History.svg.js +2 -0
  215. package/dist/features/RequirementAI/components/UserStoryCard/icons/History.svg.js.map +1 -0
  216. package/dist/features/RequirementAI/components/UserStoryCard/icons/PdfViewerIcons.js +2 -0
  217. package/dist/features/RequirementAI/components/UserStoryCard/icons/PdfViewerIcons.js.map +1 -0
  218. package/dist/features/RequirementAI/components/UserStoryCard/icons/aiMagic.svg.js +2 -0
  219. package/dist/features/RequirementAI/components/UserStoryCard/icons/aiMagic.svg.js.map +1 -0
  220. package/dist/features/RequirementAI/components/UserStoryCard/icons/cognitiveBrain.svg.js +2 -0
  221. package/dist/features/RequirementAI/components/UserStoryCard/icons/cognitiveBrain.svg.js.map +1 -0
  222. package/dist/features/RequirementAI/components/UserStoryCard/icons/message-chat-square.svg.js +2 -0
  223. package/dist/features/RequirementAI/components/UserStoryCard/icons/message-chat-square.svg.js.map +1 -0
  224. package/dist/features/RequirementAI/components/ai-reasoning/AIReasonAccordion.js +1 -1
  225. package/dist/features/RequirementAI/components/ai-reasoning/AiReasonAccoridon.module.css.js +1 -1
  226. package/dist/features/RequirementAI/components/ai-reasoning/AiReasoningCitation.js +1 -1
  227. package/dist/features/RequirementAI/components/ai-reasoning/AiReasoningCitationContent.js +1 -1
  228. package/dist/features/RequirementAI/components/ai-reasoning/BigEnoughComponent.js +1 -1
  229. package/dist/features/RequirementAI/components/cra/PartialRequirementContent.js +1 -1
  230. package/dist/features/RequirementAI/components/cra/PartialRequirementContent.module.css.js +1 -1
  231. package/dist/features/RequirementAI/components/lsc-reason-gap/GapFilterBlock.js +1 -1
  232. package/dist/features/RequirementAI/components/segment/ExampleComponentWrapper.js +2 -0
  233. package/dist/features/RequirementAI/components/segment/ExampleComponentWrapper.js.map +1 -0
  234. package/dist/features/RequirementAI/components/segment/Segment.js +2 -0
  235. package/dist/features/RequirementAI/components/segment/Segment.js.map +1 -0
  236. package/dist/features/RequirementAI/components/segment/segment.module.css.js +2 -0
  237. package/dist/features/RequirementAI/components/segment/segment.module.css.js.map +1 -0
  238. package/dist/features/RequirementAI/components/story-screen/StreamingScreenSidebar.js +1 -1
  239. package/dist/features/RequirementAI/components/story-screen/SubfeatureBlock.js +1 -1
  240. package/dist/features/RequirementAI/components/story-screen/UserStoryScreen.js +1 -1
  241. package/dist/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.js +1 -1
  242. package/dist/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.module.css.js +1 -1
  243. package/dist/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.js +2 -0
  244. package/dist/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.js.map +1 -0
  245. package/dist/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.module.css.js +2 -0
  246. package/dist/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.module.css.js.map +1 -0
  247. package/dist/features/RequirementAI/hooks/useStreamContentHandler.js +1 -1
  248. package/dist/features/RequirementAI/icons/BrainRed.js +2 -0
  249. package/dist/features/RequirementAI/icons/BrainRed.js.map +1 -0
  250. package/dist/features/RequirementAI/icons/CognitiveDecision.js +1 -1
  251. package/dist/features/RequirementAI/shared/UpdatedAnimationContent.js +1 -1
  252. package/dist/features/RequirementAI/utils/css.utils.js +2 -0
  253. package/dist/features/RequirementAI/utils/css.utils.js.map +1 -0
  254. package/dist/features/RequirementAI/utils/userstory-approval-transform.utils.js +1 -1
  255. package/dist/features/SplitterCitations/Splitter.module.css.js +1 -1
  256. package/dist/features/SplitterCitations/SplitterCitationsComponent.js +1 -1
  257. package/dist/features/TextualGuidelines/TextualGuideLinesComponent.js +2 -0
  258. package/dist/features/TextualGuidelines/TextualGuideLinesComponent.js.map +1 -0
  259. package/dist/features/TextualGuidelines/TextualGuidelines.module.css.js +2 -0
  260. package/dist/features/TextualGuidelines/TextualGuidelines.module.css.js.map +1 -0
  261. package/dist/features/UserStoryImport/components/ProjectCard.js +1 -1
  262. package/dist/features/UserStoryImport/components/TypeDropdown.js +1 -1
  263. package/dist/features/UserStoryImport/components/UserStoryCard.js +1 -1
  264. package/dist/features/UserStoryImport/hooks/useUSPData.js +1 -1
  265. package/dist/features/UserStoryImport/user-story-picker.css.js +1 -1
  266. package/dist/index.js +1 -1
  267. package/dist/types/src/CognitiveCompareTest.d.ts.map +1 -1
  268. package/dist/types/src/RequirementAiTest.d.ts.map +1 -1
  269. package/dist/types/src/features/CognitiveCompare/CitationAnchor.d.ts.map +1 -1
  270. package/dist/types/src/features/CognitiveCompare/CitationRenderer.d.ts.map +1 -1
  271. package/dist/types/src/features/CognitiveCompare/CognitiveCompare.d.ts +1 -1
  272. package/dist/types/src/features/CognitiveCompare/CognitiveCompare.d.ts.map +1 -1
  273. package/dist/types/src/features/CognitiveCompare/CognitiveCompareConstants.d.ts +2 -1
  274. package/dist/types/src/features/CognitiveCompare/CognitiveCompareConstants.d.ts.map +1 -1
  275. package/dist/types/src/features/CognitiveCompare/CognitiveCompareTypes.d.ts +57 -1
  276. package/dist/types/src/features/CognitiveCompare/CognitiveCompareTypes.d.ts.map +1 -1
  277. package/dist/types/src/features/CognitiveCompare/CognitiveComparehelpers.d.ts +14 -0
  278. package/dist/types/src/features/CognitiveCompare/CognitiveComparehelpers.d.ts.map +1 -1
  279. package/dist/types/src/features/CognitiveCompare/CompareContext.d.ts +64 -0
  280. package/dist/types/src/features/CognitiveCompare/CompareContext.d.ts.map +1 -0
  281. package/dist/types/src/features/CognitiveCompare/ResizableSplitPane.d.ts +1 -0
  282. package/dist/types/src/features/CognitiveCompare/ResizableSplitPane.d.ts.map +1 -1
  283. package/dist/types/src/features/CognitiveCompare/components/CognitiveSummaryPopup.d.ts +3 -0
  284. package/dist/types/src/features/CognitiveCompare/components/CognitiveSummaryPopup.d.ts.map +1 -0
  285. package/dist/types/src/features/CognitiveCompare/components/CompareHeader.d.ts +3 -1
  286. package/dist/types/src/features/CognitiveCompare/components/CompareHeader.d.ts.map +1 -1
  287. package/dist/types/src/features/CognitiveCompare/components/LHSSectionRow.d.ts +9 -0
  288. package/dist/types/src/features/CognitiveCompare/components/LHSSectionRow.d.ts.map +1 -0
  289. package/dist/types/src/features/CognitiveCompare/components/RHSSectionRow.d.ts +9 -0
  290. package/dist/types/src/features/CognitiveCompare/components/RHSSectionRow.d.ts.map +1 -0
  291. package/dist/types/src/features/CognitiveCompare/components/SectionAccordion.d.ts +1 -14
  292. package/dist/types/src/features/CognitiveCompare/components/SectionAccordion.d.ts.map +1 -1
  293. package/dist/types/src/features/CognitiveCompare/components/SubSectionAccordion.d.ts +2 -19
  294. package/dist/types/src/features/CognitiveCompare/components/SubSectionAccordion.d.ts.map +1 -1
  295. package/dist/types/src/features/CognitiveCompare/components/SvgConnectors.d.ts +36 -0
  296. package/dist/types/src/features/CognitiveCompare/components/SvgConnectors.d.ts.map +1 -0
  297. package/dist/types/src/features/CognitiveCompare/components/connectedLines.d.ts +6 -0
  298. package/dist/types/src/features/CognitiveCompare/components/connectedLines.d.ts.map +1 -0
  299. package/dist/types/src/features/CognitiveCompare/hooks/memoizedMarkdown.d.ts +4 -1
  300. package/dist/types/src/features/CognitiveCompare/hooks/memoizedMarkdown.d.ts.map +1 -1
  301. package/dist/types/src/features/CognitiveCompare/hooks/useCompareData.d.ts +1 -1
  302. package/dist/types/src/features/CognitiveCompare/hooks/useCompareData.d.ts.map +1 -1
  303. package/dist/types/src/features/CognitiveCompare/hooks/useComparePopups.d.ts +6 -1
  304. package/dist/types/src/features/CognitiveCompare/hooks/useComparePopups.d.ts.map +1 -1
  305. package/dist/types/src/features/CognitiveCompare/hooks/useDeviationNavigation.d.ts +7 -1
  306. package/dist/types/src/features/CognitiveCompare/hooks/useDeviationNavigation.d.ts.map +1 -1
  307. package/dist/types/src/features/CognitiveCompare/hooks/useLinesCalculator.d.ts +27 -0
  308. package/dist/types/src/features/CognitiveCompare/hooks/useLinesCalculator.d.ts.map +1 -0
  309. package/dist/types/src/features/CognitiveCompare/hooks/useResizeHandler.d.ts +5 -0
  310. package/dist/types/src/features/CognitiveCompare/hooks/useResizeHandler.d.ts.map +1 -0
  311. package/dist/types/src/features/CognitiveCompare/hooks/useSectionRefs.d.ts +1 -2
  312. package/dist/types/src/features/CognitiveCompare/hooks/useSectionRefs.d.ts.map +1 -1
  313. package/dist/types/src/features/CognitiveCompare/hooks/useSideBySide.d.ts +35 -0
  314. package/dist/types/src/features/CognitiveCompare/hooks/useSideBySide.d.ts.map +1 -0
  315. package/dist/types/src/features/CognitiveCompare/hooks/useStyles.d.ts +15 -0
  316. package/dist/types/src/features/CognitiveCompare/hooks/useStyles.d.ts.map +1 -0
  317. package/dist/types/src/features/CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.d.ts +1 -0
  318. package/dist/types/src/features/CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.d.ts.map +1 -1
  319. package/dist/types/src/features/CognitiveInternalgptReasoning/CognitiveInternalgptReasoningComponent.d.ts.map +1 -1
  320. package/dist/types/src/features/CognitiveInternalgptReasoning/CognitiveInternalgptReasoningTest.d.ts +2 -0
  321. package/dist/types/src/features/CognitiveInternalgptReasoning/CognitiveInternalgptReasoningTest.d.ts.map +1 -1
  322. package/dist/types/src/features/IngestionStatus/IngestionStatusComponent.d.ts +26 -0
  323. package/dist/types/src/features/IngestionStatus/IngestionStatusComponent.d.ts.map +1 -0
  324. package/dist/types/src/features/IngestionStatus/IngestionStatusComponentTest.d.ts +7 -0
  325. package/dist/types/src/features/IngestionStatus/IngestionStatusComponentTest.d.ts.map +1 -0
  326. package/dist/types/src/features/IngestionStatus/useIngestionStatus.d.ts +40 -0
  327. package/dist/types/src/features/IngestionStatus/useIngestionStatus.d.ts.map +1 -0
  328. package/dist/types/src/features/PdfViewer/PdfToolbar.d.ts +2 -1
  329. package/dist/types/src/features/PdfViewer/PdfToolbar.d.ts.map +1 -1
  330. package/dist/types/src/features/PdfViewer/PdfViewer.d.ts +2 -1
  331. package/dist/types/src/features/PdfViewer/PdfViewer.d.ts.map +1 -1
  332. package/dist/types/src/features/PdfViewer/usePdfHighlight.d.ts.map +1 -1
  333. package/dist/types/src/features/RequirementAI/components/CustomPopover/CustomPopover.d.ts +14 -0
  334. package/dist/types/src/features/RequirementAI/components/CustomPopover/CustomPopover.d.ts.map +1 -0
  335. package/dist/types/src/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.d.ts +35 -3
  336. package/dist/types/src/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.d.ts.map +1 -1
  337. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/Editor.d.ts.map +1 -1
  338. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/DeleteNode.d.ts +18 -0
  339. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/DeleteNode.d.ts.map +1 -0
  340. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/InsertNode.d.ts +24 -0
  341. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/InsertNode.d.ts.map +1 -0
  342. package/dist/types/src/features/RequirementAI/components/RichTextEditor/RichTextEditor.d.ts.map +1 -1
  343. package/dist/types/src/features/RequirementAI/components/UserStoryCard/AttachedContext.d.ts +13 -1
  344. package/dist/types/src/features/RequirementAI/components/UserStoryCard/AttachedContext.d.ts.map +1 -1
  345. package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationAnchor.d.ts +27 -0
  346. package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationAnchor.d.ts.map +1 -0
  347. package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationRenderer.d.ts +11 -0
  348. package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationRenderer.d.ts.map +1 -0
  349. package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.d.ts +20 -0
  350. package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.d.ts.map +1 -0
  351. package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/ResizableSplitPane.d.ts +9 -0
  352. package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/ResizableSplitPane.d.ts.map +1 -0
  353. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.d.ts +12 -0
  354. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.d.ts.map +1 -0
  355. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/InterateComponent.d.ts +28 -0
  356. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/InterateComponent.d.ts.map +1 -0
  357. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.d.ts +17 -0
  358. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.d.ts.map +1 -0
  359. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/ToneToggle.d.ts +8 -0
  360. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/ToneToggle.d.ts.map +1 -0
  361. package/dist/types/src/features/RequirementAI/components/UserStoryCard/UserStoryCard.d.ts +22 -10
  362. package/dist/types/src/features/RequirementAI/components/UserStoryCard/UserStoryCard.d.ts.map +1 -1
  363. package/dist/types/src/features/RequirementAI/components/UserStoryCard/icons/AiGapIcon.d.ts +7 -0
  364. package/dist/types/src/features/RequirementAI/components/UserStoryCard/icons/AiGapIcon.d.ts.map +1 -0
  365. package/dist/types/src/features/RequirementAI/components/UserStoryCard/icons/PdfViewerIcons.d.ts +6 -0
  366. package/dist/types/src/features/RequirementAI/components/UserStoryCard/icons/PdfViewerIcons.d.ts.map +1 -0
  367. package/dist/types/src/features/RequirementAI/components/ai-reasoning/AIReasonAccordion.d.ts +4 -1
  368. package/dist/types/src/features/RequirementAI/components/ai-reasoning/AIReasonAccordion.d.ts.map +1 -1
  369. package/dist/types/src/features/RequirementAI/components/ai-reasoning/AiReasoningCitation.d.ts +1 -0
  370. package/dist/types/src/features/RequirementAI/components/ai-reasoning/AiReasoningCitation.d.ts.map +1 -1
  371. package/dist/types/src/features/RequirementAI/components/ai-reasoning/AiReasoningCitationContent.d.ts +4 -1
  372. package/dist/types/src/features/RequirementAI/components/ai-reasoning/AiReasoningCitationContent.d.ts.map +1 -1
  373. package/dist/types/src/features/RequirementAI/components/ai-reasoning/BigEnoughComponent.d.ts.map +1 -1
  374. package/dist/types/src/features/RequirementAI/components/cra/PartialRequirementContent.d.ts +2 -2
  375. package/dist/types/src/features/RequirementAI/components/cra/PartialRequirementContent.d.ts.map +1 -1
  376. package/dist/types/src/features/RequirementAI/components/lsc-reason-gap/GapFilterBlock.d.ts +0 -1
  377. package/dist/types/src/features/RequirementAI/components/lsc-reason-gap/GapFilterBlock.d.ts.map +1 -1
  378. package/dist/types/src/features/RequirementAI/components/segment/ExampleComponentWrapper.d.ts +11 -0
  379. package/dist/types/src/features/RequirementAI/components/segment/ExampleComponentWrapper.d.ts.map +1 -0
  380. package/dist/types/src/features/RequirementAI/components/segment/Segment.d.ts +17 -0
  381. package/dist/types/src/features/RequirementAI/components/segment/Segment.d.ts.map +1 -0
  382. package/dist/types/src/features/RequirementAI/components/story-screen/StreamingScreenSidebar.d.ts.map +1 -1
  383. package/dist/types/src/features/RequirementAI/components/story-screen/SubfeatureBlock.d.ts.map +1 -1
  384. package/dist/types/src/features/RequirementAI/components/story-screen/UserStoryScreen.d.ts.map +1 -1
  385. package/dist/types/src/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.d.ts +41 -4
  386. package/dist/types/src/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.d.ts.map +1 -1
  387. package/dist/types/src/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.d.ts +19 -0
  388. package/dist/types/src/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.d.ts.map +1 -0
  389. package/dist/types/src/features/RequirementAI/hooks/useStreamContentHandler.d.ts +3 -0
  390. package/dist/types/src/features/RequirementAI/hooks/useStreamContentHandler.d.ts.map +1 -1
  391. package/dist/types/src/features/RequirementAI/icons/CognitiveDecision.d.ts +5 -1
  392. package/dist/types/src/features/RequirementAI/icons/CognitiveDecision.d.ts.map +1 -1
  393. package/dist/types/src/features/RequirementAI/interfaces/userstory.interface.d.ts +8 -0
  394. package/dist/types/src/features/RequirementAI/interfaces/userstory.interface.d.ts.map +1 -1
  395. package/dist/types/src/features/RequirementAI/shared/UpdatedAnimationContent.d.ts +1 -0
  396. package/dist/types/src/features/RequirementAI/shared/UpdatedAnimationContent.d.ts.map +1 -1
  397. package/dist/types/src/features/RequirementAI/types/aiReasoning.type.d.ts +35 -0
  398. package/dist/types/src/features/RequirementAI/types/aiReasoning.type.d.ts.map +1 -1
  399. package/dist/types/src/features/RequirementAI/types/segment.type.d.ts +19 -0
  400. package/dist/types/src/features/RequirementAI/types/segment.type.d.ts.map +1 -0
  401. package/dist/types/src/features/RequirementAI/utils/css.utils.d.ts +2 -0
  402. package/dist/types/src/features/RequirementAI/utils/css.utils.d.ts.map +1 -0
  403. package/dist/types/src/features/RequirementAI/utils/userstory-approval-transform.utils.d.ts.map +1 -1
  404. package/dist/types/src/features/SplitterCitations/SplitterCitationsComponent.d.ts +2 -0
  405. package/dist/types/src/features/SplitterCitations/SplitterCitationsComponent.d.ts.map +1 -1
  406. package/dist/types/src/features/SplitterCitations/SplitterCitationsTest.d.ts.map +1 -1
  407. package/dist/types/src/features/TextualGuidelines/TextualGudelinesTest.d.ts +5 -0
  408. package/dist/types/src/features/TextualGuidelines/TextualGudelinesTest.d.ts.map +1 -0
  409. package/dist/types/src/features/TextualGuidelines/TextualGuideLinesComponent.d.ts +13 -0
  410. package/dist/types/src/features/TextualGuidelines/TextualGuideLinesComponent.d.ts.map +1 -0
  411. package/dist/types/src/features/UserStoryImport/UserStoryPicker.types.d.ts +2 -1
  412. package/dist/types/src/features/UserStoryImport/UserStoryPicker.types.d.ts.map +1 -1
  413. package/dist/types/src/features/UserStoryImport/components/TypeDropdown.d.ts +1 -1
  414. package/dist/types/src/features/UserStoryImport/components/TypeDropdown.d.ts.map +1 -1
  415. package/dist/types/src/features/UserStoryImport/components/UserStoryCard.d.ts.map +1 -1
  416. package/dist/types/src/features/UserStoryImport/hooks/useUSPData.d.ts.map +1 -1
  417. package/dist/types/src/index.d.ts +32 -27
  418. package/dist/types/src/index.d.ts.map +1 -1
  419. package/package.json +42 -2
@@ -1,2 +1,2 @@
1
- import{__assign as C}from"tslib";import{jsxs as i,jsx as l}from"react/jsx-runtime";var e=function(){return i("svg",C({width:"13",height:"20",viewBox:"0 0 13 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[i("g",C({"clip-path":"url(#clip0_7146_59770)"},{children:[l("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.870143 7.4728C1.05898 7.12852 1.27464 6.8046 1.51383 6.50373L1.18293 7.96614C0.979942 8.80183 0.898342 9.61402 1.17775 10.2711C1.21942 10.3691 1.26815 10.4612 1.32333 10.5469C1.31329 10.7241 1.31151 10.9023 1.31813 11.0806C1.35384 12.0427 1.63248 12.9774 2.12537 13.7883C2.61826 14.5994 3.30759 15.2574 4.12238 15.6948C4.23255 15.7549 4.32499 15.8457 4.38965 15.9572C4.45431 16.0686 4.48873 16.1966 4.48918 16.3274V19.2231C4.48918 19.3163 4.47174 19.4086 4.43785 19.4947C4.40397 19.5808 4.3543 19.6591 4.29169 19.7249C4.22908 19.7908 4.15475 19.8432 4.07294 19.8788C3.99114 19.9145 3.90346 19.9328 3.81492 19.9328C3.72637 19.9328 3.63869 19.9145 3.55689 19.8788C3.47508 19.8432 3.40075 19.7908 3.33814 19.7249C3.27553 19.6591 3.22587 19.5808 3.19198 19.4947C3.1581 19.4086 3.14066 19.3163 3.14066 19.2231V16.7453C1.68401 15.8205 0.630139 14.3313 0.205569 12.5974C-0.219001 10.8635 0.0196202 9.02345 0.870143 7.4728ZM2.90096 5.19659C2.88899 5.25028 2.87501 5.30914 2.85914 5.37342L2.35372 7.6047C2.74036 7.06579 3.22081 6.60571 3.77188 6.25032C3.86004 6.19348 3.94964 6.13953 4.04056 6.08854L4.37488 4.7326C4.4043 4.6181 4.42962 4.50778 4.45073 4.40202C3.89913 4.59451 3.3785 4.86265 2.90096 5.19659ZM5.56585 4.12493C5.53444 4.42314 5.47335 4.72393 5.39987 5.0116L5.25401 5.6033C5.6147 5.51175 5.98526 5.46115 6.35938 5.45343C7.27383 5.43458 8.17653 5.67261 8.97455 6.14302C9.77256 6.61343 10.437 7.29923 10.8996 8.1298C11.3621 8.96038 11.606 9.90572 11.6062 10.8685V15.3246C11.6062 15.4318 11.5657 15.5346 11.4937 15.6104C11.4216 15.6863 11.324 15.7288 11.2221 15.7288H9.10545C8.92662 15.7288 8.75512 15.8037 8.62867 15.9367C8.50223 16.0699 8.43119 16.2504 8.43119 16.4386V19.2231C8.43119 19.4114 8.50223 19.5919 8.62867 19.7249C8.75512 19.8581 8.92662 19.9328 9.10545 19.9328C9.28428 19.9328 9.45578 19.8581 9.58223 19.7249C9.70867 19.5919 9.77971 19.4114 9.77971 19.2231V17.1483H11.2221C11.4496 17.1483 11.6749 17.1012 11.8851 17.0096C12.0953 16.9179 12.2863 16.7836 12.4472 16.6142C12.6081 16.4448 12.7357 16.2438 12.8228 16.0225C12.9099 15.8013 12.9547 15.5641 12.9547 15.3246V10.8696C12.9545 9.65475 12.6467 8.46189 12.0631 7.4138C11.4794 6.36573 10.641 5.50029 9.63407 4.90657C8.38865 4.18261 6.95913 3.91301 5.56585 4.12493ZM3.70049 8.44134C3.42465 8.78904 3.20515 9.1864 3.05432 9.61774C2.98799 9.80743 2.93585 10.0011 2.89791 10.1971C3.31428 10.1882 3.71718 10.1018 4.57574 9.3851L5.00851 9.00583C5.17133 8.85685 5.2371 8.62777 5.20005 8.40752L5.17831 8.31379C5.07205 8.04339 4.74203 7.96266 4.50119 8.1089C4.25222 8.26007 3.98261 8.37306 3.70049 8.44134ZM6.15774 7.88766C6.02755 7.55613 5.82305 7.3186 5.58321 7.1627C6.10638 7.00991 6.65842 6.97659 7.20161 7.07001C8.06073 7.21777 8.84495 7.67345 9.42154 8.35994C9.80992 8.82213 9.70204 9.48646 9.30287 9.86461C8.12912 10.9809 6.18401 12.4277 4.25076 12.9671C3.75882 13.1034 3.21941 12.8535 3.03925 12.3198C2.92908 11.9929 2.86081 11.6548 2.8344 11.314C3.15405 11.3123 3.55309 11.2871 4.0591 11.0503C4.53459 10.8279 5.0516 10.4444 5.70426 9.84718C6.24535 9.35195 6.37813 8.59572 6.18673 7.97158L6.1743 7.92908L6.15774 7.88766Z",fill:"#344054"}),l("path",{d:"M2.78566 10.2017C2.21589 10.2017 1.79754 9.83133 2.19656 8.2028L2.85082 5.3137C2.96495 4.85111 2.98338 4.66616 2.85082 4.66616C2.36416 4.7953 2.60848 4.71503 2.19651 4.89983L1.91211 4.39986C3.29881 3.15966 3.32335 2.83187 4.00636 2.83187C4.57614 2.83187 4.6714 3.55367 4.38607 4.66428L3.63745 7.70142C3.50444 8.23827 3.56196 8.42321 3.69406 8.42321C3.98316 8.35428 4.2596 8.24005 4.5145 8.08528C4.75852 7.93711 5.09207 8.01872 5.19962 8.29281C5.27637 8.54288 5.21676 8.82053 5.02834 8.99293C3.76206 10.1516 3.31404 10.2017 2.78566 10.2017ZM4.0972 0.00281947C4.22705 -0.00766091 4.35753 0.0111517 4.47993 0.0580007C4.60232 0.10485 4.71381 0.178656 4.80694 0.274487C4.90007 0.370319 4.97269 0.485969 5.01996 0.61371C5.06723 0.74145 5.08806 0.878339 5.08105 1.01523V1.01265C5.06571 1.36127 4.9234 1.69028 4.68365 1.93134C4.44391 2.17242 4.12517 2.30702 3.79362 2.3072L3.76707 2.30677C3.63546 2.32186 3.50354 2.30544 3.3788 2.25874C3.25407 2.21205 3.14097 2.13628 3.04797 2.0371C2.95497 1.93792 2.88447 1.8179 2.84174 1.68601C2.79934 1.55514 2.78536 1.41595 2.80082 1.27867C2.81343 0.928866 2.95678 0.598439 3.1997 0.359319C3.44286 0.119957 3.76606 -0.00849914 4.09883 0.00195941L4.0972 0.00281947Z",fill:"#344054"})]})),l("defs",{children:l("clipPath",C({id:"clip0_7146_59770"},{children:l("rect",{width:"13",height:"20",fill:"white"})}))})]}))};export{e as ButtonCognitiveIcon};
1
+ import{__assign as C}from"tslib";import{jsxs as i,jsx as l}from"react/jsx-runtime";var r=function(){return i("svg",C({width:"13",height:"20",viewBox:"0 0 13 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[i("g",C({"clip-path":"url(#clip0_7146_59770)"},{children:[l("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.870143 7.4728C1.05898 7.12852 1.27464 6.8046 1.51383 6.50373L1.18293 7.96614C0.979942 8.80183 0.898342 9.61402 1.17775 10.2711C1.21942 10.3691 1.26815 10.4612 1.32333 10.5469C1.31329 10.7241 1.31151 10.9023 1.31813 11.0806C1.35384 12.0427 1.63248 12.9774 2.12537 13.7883C2.61826 14.5994 3.30759 15.2574 4.12238 15.6948C4.23255 15.7549 4.32499 15.8457 4.38965 15.9572C4.45431 16.0686 4.48873 16.1966 4.48918 16.3274V19.2231C4.48918 19.3163 4.47174 19.4086 4.43785 19.4947C4.40397 19.5808 4.3543 19.6591 4.29169 19.7249C4.22908 19.7908 4.15475 19.8432 4.07294 19.8788C3.99114 19.9145 3.90346 19.9328 3.81492 19.9328C3.72637 19.9328 3.63869 19.9145 3.55689 19.8788C3.47508 19.8432 3.40075 19.7908 3.33814 19.7249C3.27553 19.6591 3.22587 19.5808 3.19198 19.4947C3.1581 19.4086 3.14066 19.3163 3.14066 19.2231V16.7453C1.68401 15.8205 0.630139 14.3313 0.205569 12.5974C-0.219001 10.8635 0.0196202 9.02345 0.870143 7.4728ZM2.90096 5.19659C2.88899 5.25028 2.87501 5.30914 2.85914 5.37342L2.35372 7.6047C2.74036 7.06579 3.22081 6.60571 3.77188 6.25032C3.86004 6.19348 3.94964 6.13953 4.04056 6.08854L4.37488 4.7326C4.4043 4.6181 4.42962 4.50778 4.45073 4.40202C3.89913 4.59451 3.3785 4.86265 2.90096 5.19659ZM5.56585 4.12493C5.53444 4.42314 5.47335 4.72393 5.39987 5.0116L5.25401 5.6033C5.6147 5.51175 5.98526 5.46115 6.35938 5.45343C7.27383 5.43458 8.17653 5.67261 8.97455 6.14302C9.77256 6.61343 10.437 7.29923 10.8996 8.1298C11.3621 8.96038 11.606 9.90572 11.6062 10.8685V15.3246C11.6062 15.4318 11.5657 15.5346 11.4937 15.6104C11.4216 15.6863 11.324 15.7288 11.2221 15.7288H9.10545C8.92662 15.7288 8.75512 15.8037 8.62867 15.9367C8.50223 16.0699 8.43119 16.2504 8.43119 16.4386V19.2231C8.43119 19.4114 8.50223 19.5919 8.62867 19.7249C8.75512 19.8581 8.92662 19.9328 9.10545 19.9328C9.28428 19.9328 9.45578 19.8581 9.58223 19.7249C9.70867 19.5919 9.77971 19.4114 9.77971 19.2231V17.1483H11.2221C11.4496 17.1483 11.6749 17.1012 11.8851 17.0096C12.0953 16.9179 12.2863 16.7836 12.4472 16.6142C12.6081 16.4448 12.7357 16.2438 12.8228 16.0225C12.9099 15.8013 12.9547 15.5641 12.9547 15.3246V10.8696C12.9545 9.65475 12.6467 8.46189 12.0631 7.4138C11.4794 6.36573 10.641 5.50029 9.63407 4.90657C8.38865 4.18261 6.95913 3.91301 5.56585 4.12493ZM3.70049 8.44134C3.42465 8.78904 3.20515 9.1864 3.05432 9.61774C2.98799 9.80743 2.93585 10.0011 2.89791 10.1971C3.31428 10.1882 3.71718 10.1018 4.57574 9.3851L5.00851 9.00583C5.17133 8.85685 5.2371 8.62777 5.20005 8.40752L5.17831 8.31379C5.07205 8.04339 4.74203 7.96266 4.50119 8.1089C4.25222 8.26007 3.98261 8.37306 3.70049 8.44134ZM6.15774 7.88766C6.02755 7.55613 5.82305 7.3186 5.58321 7.1627C6.10638 7.00991 6.65842 6.97659 7.20161 7.07001C8.06073 7.21777 8.84495 7.67345 9.42154 8.35994C9.80992 8.82213 9.70204 9.48646 9.30287 9.86461C8.12912 10.9809 6.18401 12.4277 4.25076 12.9671C3.75882 13.1034 3.21941 12.8535 3.03925 12.3198C2.92908 11.9929 2.86081 11.6548 2.8344 11.314C3.15405 11.3123 3.55309 11.2871 4.0591 11.0503C4.53459 10.8279 5.0516 10.4444 5.70426 9.84718C6.24535 9.35195 6.37813 8.59572 6.18673 7.97158L6.1743 7.92908L6.15774 7.88766Z",fill:"currentColor"}),l("path",{d:"M2.78566 10.2017C2.21589 10.2017 1.79754 9.83133 2.19656 8.2028L2.85082 5.3137C2.96495 4.85111 2.98338 4.66616 2.85082 4.66616C2.36416 4.7953 2.60848 4.71503 2.19651 4.89983L1.91211 4.39986C3.29881 3.15966 3.32335 2.83187 4.00636 2.83187C4.57614 2.83187 4.6714 3.55367 4.38607 4.66428L3.63745 7.70142C3.50444 8.23827 3.56196 8.42321 3.69406 8.42321C3.98316 8.35428 4.2596 8.24005 4.5145 8.08528C4.75852 7.93711 5.09207 8.01872 5.19962 8.29281C5.27637 8.54288 5.21676 8.82053 5.02834 8.99293C3.76206 10.1516 3.31404 10.2017 2.78566 10.2017ZM4.0972 0.00281947C4.22705 -0.00766091 4.35753 0.0111517 4.47993 0.0580007C4.60232 0.10485 4.71381 0.178656 4.80694 0.274487C4.90007 0.370319 4.97269 0.485969 5.01996 0.61371C5.06723 0.74145 5.08806 0.878339 5.08105 1.01523V1.01265C5.06571 1.36127 4.9234 1.69028 4.68365 1.93134C4.44391 2.17242 4.12517 2.30702 3.79362 2.3072L3.76707 2.30677C3.63546 2.32186 3.50354 2.30544 3.3788 2.25874C3.25407 2.21205 3.14097 2.13628 3.04797 2.0371C2.95497 1.93792 2.88447 1.8179 2.84174 1.68601C2.79934 1.55514 2.78536 1.41595 2.80082 1.27867C2.81343 0.928866 2.95678 0.598439 3.1997 0.359319C3.44286 0.119957 3.76606 -0.00849914 4.09883 0.00195941L4.0972 0.00281947Z",fill:"currentColor"})]})),l("defs",{children:l("clipPath",C({id:"clip0_7146_59770"},{children:l("rect",{width:"13",height:"20",fill:"white"})}))})]}))};export{r as ButtonCognitiveIcon};
2
2
  //# sourceMappingURL=ButtonCognitiveIcon.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsx as n,jsxs as i}from"react/jsx-runtime";var t=function(){return n("svg",e({xmlns:"http://www.w3.org/2000/svg",style:{width:"12px",height:"15px"},viewBox:"0 0 14 17",fill:"none"},{children:n("path",{d:"M8.25 0.952148V4.05005C8.25 4.47009 8.25 4.68011 8.33175 4.84055C8.40365 4.98167 8.51839 5.0964 8.65951 5.16831C8.81994 5.25005 9.02996 5.25005 9.45 5.25005H12.5479M9.75 9H3.75M9.75 12H3.75M5.25 6H3.75M8.25 0.75H4.35C3.08988 0.75 2.45982 0.75 1.97852 0.995235C1.55516 1.21095 1.21095 1.55516 0.995235 1.97852C0.75 2.45982 0.75 3.08988 0.75 4.35V12.15C0.75 13.4101 0.75 14.0402 0.995235 14.5215C1.21095 14.9448 1.55516 15.289 1.97852 15.5048C2.45982 15.75 3.08988 15.75 4.35 15.75H9.15C10.4101 15.75 11.0402 15.75 11.5215 15.5048C11.9448 15.289 12.289 14.9448 12.5048 14.5215C12.75 14.0402 12.75 13.4101 12.75 12.15V5.25L8.25 0.75Z",stroke:"#0019FF",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}))},o=function(){return n("svg",e({width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#475467",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:n("path",{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"})}))},r=function(){return i("svg",e({width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#475467",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:[n("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),n("polyline",{points:"7 10 12 15 17 10"}),n("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]}))},h=function(){return i("svg",e({width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"#475467",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:[n("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}))};export{h as DefaultCloseIcon,r as DefaultDownloadIcon,o as DefaultFullScreenIcon,t as DefaultPdfIcon};
1
+ import{__assign as e}from"tslib";import{jsx as n,jsxs as i}from"react/jsx-runtime";var t=function(){return n("svg",e({xmlns:"http://www.w3.org/2000/svg",style:{width:"12px",height:"15px"},viewBox:"0 0 14 17",fill:"none"},{children:n("path",{d:"M8.25 0.952148V4.05005C8.25 4.47009 8.25 4.68011 8.33175 4.84055C8.40365 4.98167 8.51839 5.0964 8.65951 5.16831C8.81994 5.25005 9.02996 5.25005 9.45 5.25005H12.5479M9.75 9H3.75M9.75 12H3.75M5.25 6H3.75M8.25 0.75H4.35C3.08988 0.75 2.45982 0.75 1.97852 0.995235C1.55516 1.21095 1.21095 1.55516 0.995235 1.97852C0.75 2.45982 0.75 3.08988 0.75 4.35V12.15C0.75 13.4101 0.75 14.0402 0.995235 14.5215C1.21095 14.9448 1.55516 15.289 1.97852 15.5048C2.45982 15.75 3.08988 15.75 4.35 15.75H9.15C10.4101 15.75 11.0402 15.75 11.5215 15.5048C11.9448 15.289 12.289 14.9448 12.5048 14.5215C12.75 14.0402 12.75 13.4101 12.75 12.15V5.25L8.25 0.75Z",stroke:"#0019FF",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}))},o=function(){return n("svg",e({width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#475467",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:n("path",{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"})}))},r=function(){return i("svg",e({width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#475467",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:[n("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),n("polyline",{points:"7 10 12 15 17 10"}),n("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]}))},h=function(){return i("svg",e({width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"#475467",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:[n("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}))},s=function(){return n("svg",e({width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#475467",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:n("path",{d:"M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"})}))};export{h as DefaultCloseIcon,r as DefaultDownloadIcon,s as DefaultFullScreenCloseIcon,o as DefaultFullScreenIcon,t as DefaultPdfIcon};
2
2
  //# sourceMappingURL=PdfViewerIcons.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var C=require("tslib"),e=require("react/jsx-runtime");exports.ButtonCognitiveIcon=function(){return e.jsxs("svg",C.__assign({width:"13",height:"20",viewBox:"0 0 13 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[e.jsxs("g",C.__assign({"clip-path":"url(#clip0_7146_59770)"},{children:[e.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.870143 7.4728C1.05898 7.12852 1.27464 6.8046 1.51383 6.50373L1.18293 7.96614C0.979942 8.80183 0.898342 9.61402 1.17775 10.2711C1.21942 10.3691 1.26815 10.4612 1.32333 10.5469C1.31329 10.7241 1.31151 10.9023 1.31813 11.0806C1.35384 12.0427 1.63248 12.9774 2.12537 13.7883C2.61826 14.5994 3.30759 15.2574 4.12238 15.6948C4.23255 15.7549 4.32499 15.8457 4.38965 15.9572C4.45431 16.0686 4.48873 16.1966 4.48918 16.3274V19.2231C4.48918 19.3163 4.47174 19.4086 4.43785 19.4947C4.40397 19.5808 4.3543 19.6591 4.29169 19.7249C4.22908 19.7908 4.15475 19.8432 4.07294 19.8788C3.99114 19.9145 3.90346 19.9328 3.81492 19.9328C3.72637 19.9328 3.63869 19.9145 3.55689 19.8788C3.47508 19.8432 3.40075 19.7908 3.33814 19.7249C3.27553 19.6591 3.22587 19.5808 3.19198 19.4947C3.1581 19.4086 3.14066 19.3163 3.14066 19.2231V16.7453C1.68401 15.8205 0.630139 14.3313 0.205569 12.5974C-0.219001 10.8635 0.0196202 9.02345 0.870143 7.4728ZM2.90096 5.19659C2.88899 5.25028 2.87501 5.30914 2.85914 5.37342L2.35372 7.6047C2.74036 7.06579 3.22081 6.60571 3.77188 6.25032C3.86004 6.19348 3.94964 6.13953 4.04056 6.08854L4.37488 4.7326C4.4043 4.6181 4.42962 4.50778 4.45073 4.40202C3.89913 4.59451 3.3785 4.86265 2.90096 5.19659ZM5.56585 4.12493C5.53444 4.42314 5.47335 4.72393 5.39987 5.0116L5.25401 5.6033C5.6147 5.51175 5.98526 5.46115 6.35938 5.45343C7.27383 5.43458 8.17653 5.67261 8.97455 6.14302C9.77256 6.61343 10.437 7.29923 10.8996 8.1298C11.3621 8.96038 11.606 9.90572 11.6062 10.8685V15.3246C11.6062 15.4318 11.5657 15.5346 11.4937 15.6104C11.4216 15.6863 11.324 15.7288 11.2221 15.7288H9.10545C8.92662 15.7288 8.75512 15.8037 8.62867 15.9367C8.50223 16.0699 8.43119 16.2504 8.43119 16.4386V19.2231C8.43119 19.4114 8.50223 19.5919 8.62867 19.7249C8.75512 19.8581 8.92662 19.9328 9.10545 19.9328C9.28428 19.9328 9.45578 19.8581 9.58223 19.7249C9.70867 19.5919 9.77971 19.4114 9.77971 19.2231V17.1483H11.2221C11.4496 17.1483 11.6749 17.1012 11.8851 17.0096C12.0953 16.9179 12.2863 16.7836 12.4472 16.6142C12.6081 16.4448 12.7357 16.2438 12.8228 16.0225C12.9099 15.8013 12.9547 15.5641 12.9547 15.3246V10.8696C12.9545 9.65475 12.6467 8.46189 12.0631 7.4138C11.4794 6.36573 10.641 5.50029 9.63407 4.90657C8.38865 4.18261 6.95913 3.91301 5.56585 4.12493ZM3.70049 8.44134C3.42465 8.78904 3.20515 9.1864 3.05432 9.61774C2.98799 9.80743 2.93585 10.0011 2.89791 10.1971C3.31428 10.1882 3.71718 10.1018 4.57574 9.3851L5.00851 9.00583C5.17133 8.85685 5.2371 8.62777 5.20005 8.40752L5.17831 8.31379C5.07205 8.04339 4.74203 7.96266 4.50119 8.1089C4.25222 8.26007 3.98261 8.37306 3.70049 8.44134ZM6.15774 7.88766C6.02755 7.55613 5.82305 7.3186 5.58321 7.1627C6.10638 7.00991 6.65842 6.97659 7.20161 7.07001C8.06073 7.21777 8.84495 7.67345 9.42154 8.35994C9.80992 8.82213 9.70204 9.48646 9.30287 9.86461C8.12912 10.9809 6.18401 12.4277 4.25076 12.9671C3.75882 13.1034 3.21941 12.8535 3.03925 12.3198C2.92908 11.9929 2.86081 11.6548 2.8344 11.314C3.15405 11.3123 3.55309 11.2871 4.0591 11.0503C4.53459 10.8279 5.0516 10.4444 5.70426 9.84718C6.24535 9.35195 6.37813 8.59572 6.18673 7.97158L6.1743 7.92908L6.15774 7.88766Z",fill:"#344054"}),e.jsx("path",{d:"M2.78566 10.2017C2.21589 10.2017 1.79754 9.83133 2.19656 8.2028L2.85082 5.3137C2.96495 4.85111 2.98338 4.66616 2.85082 4.66616C2.36416 4.7953 2.60848 4.71503 2.19651 4.89983L1.91211 4.39986C3.29881 3.15966 3.32335 2.83187 4.00636 2.83187C4.57614 2.83187 4.6714 3.55367 4.38607 4.66428L3.63745 7.70142C3.50444 8.23827 3.56196 8.42321 3.69406 8.42321C3.98316 8.35428 4.2596 8.24005 4.5145 8.08528C4.75852 7.93711 5.09207 8.01872 5.19962 8.29281C5.27637 8.54288 5.21676 8.82053 5.02834 8.99293C3.76206 10.1516 3.31404 10.2017 2.78566 10.2017ZM4.0972 0.00281947C4.22705 -0.00766091 4.35753 0.0111517 4.47993 0.0580007C4.60232 0.10485 4.71381 0.178656 4.80694 0.274487C4.90007 0.370319 4.97269 0.485969 5.01996 0.61371C5.06723 0.74145 5.08806 0.878339 5.08105 1.01523V1.01265C5.06571 1.36127 4.9234 1.69028 4.68365 1.93134C4.44391 2.17242 4.12517 2.30702 3.79362 2.3072L3.76707 2.30677C3.63546 2.32186 3.50354 2.30544 3.3788 2.25874C3.25407 2.21205 3.14097 2.13628 3.04797 2.0371C2.95497 1.93792 2.88447 1.8179 2.84174 1.68601C2.79934 1.55514 2.78536 1.41595 2.80082 1.27867C2.81343 0.928866 2.95678 0.598439 3.1997 0.359319C3.44286 0.119957 3.76606 -0.00849914 4.09883 0.00195941L4.0972 0.00281947Z",fill:"#344054"})]})),e.jsx("defs",{children:e.jsx("clipPath",C.__assign({id:"clip0_7146_59770"},{children:e.jsx("rect",{width:"13",height:"20",fill:"white"})}))})]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var C=require("tslib"),e=require("react/jsx-runtime");exports.ButtonCognitiveIcon=function(){return e.jsxs("svg",C.__assign({width:"13",height:"20",viewBox:"0 0 13 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[e.jsxs("g",C.__assign({"clip-path":"url(#clip0_7146_59770)"},{children:[e.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.870143 7.4728C1.05898 7.12852 1.27464 6.8046 1.51383 6.50373L1.18293 7.96614C0.979942 8.80183 0.898342 9.61402 1.17775 10.2711C1.21942 10.3691 1.26815 10.4612 1.32333 10.5469C1.31329 10.7241 1.31151 10.9023 1.31813 11.0806C1.35384 12.0427 1.63248 12.9774 2.12537 13.7883C2.61826 14.5994 3.30759 15.2574 4.12238 15.6948C4.23255 15.7549 4.32499 15.8457 4.38965 15.9572C4.45431 16.0686 4.48873 16.1966 4.48918 16.3274V19.2231C4.48918 19.3163 4.47174 19.4086 4.43785 19.4947C4.40397 19.5808 4.3543 19.6591 4.29169 19.7249C4.22908 19.7908 4.15475 19.8432 4.07294 19.8788C3.99114 19.9145 3.90346 19.9328 3.81492 19.9328C3.72637 19.9328 3.63869 19.9145 3.55689 19.8788C3.47508 19.8432 3.40075 19.7908 3.33814 19.7249C3.27553 19.6591 3.22587 19.5808 3.19198 19.4947C3.1581 19.4086 3.14066 19.3163 3.14066 19.2231V16.7453C1.68401 15.8205 0.630139 14.3313 0.205569 12.5974C-0.219001 10.8635 0.0196202 9.02345 0.870143 7.4728ZM2.90096 5.19659C2.88899 5.25028 2.87501 5.30914 2.85914 5.37342L2.35372 7.6047C2.74036 7.06579 3.22081 6.60571 3.77188 6.25032C3.86004 6.19348 3.94964 6.13953 4.04056 6.08854L4.37488 4.7326C4.4043 4.6181 4.42962 4.50778 4.45073 4.40202C3.89913 4.59451 3.3785 4.86265 2.90096 5.19659ZM5.56585 4.12493C5.53444 4.42314 5.47335 4.72393 5.39987 5.0116L5.25401 5.6033C5.6147 5.51175 5.98526 5.46115 6.35938 5.45343C7.27383 5.43458 8.17653 5.67261 8.97455 6.14302C9.77256 6.61343 10.437 7.29923 10.8996 8.1298C11.3621 8.96038 11.606 9.90572 11.6062 10.8685V15.3246C11.6062 15.4318 11.5657 15.5346 11.4937 15.6104C11.4216 15.6863 11.324 15.7288 11.2221 15.7288H9.10545C8.92662 15.7288 8.75512 15.8037 8.62867 15.9367C8.50223 16.0699 8.43119 16.2504 8.43119 16.4386V19.2231C8.43119 19.4114 8.50223 19.5919 8.62867 19.7249C8.75512 19.8581 8.92662 19.9328 9.10545 19.9328C9.28428 19.9328 9.45578 19.8581 9.58223 19.7249C9.70867 19.5919 9.77971 19.4114 9.77971 19.2231V17.1483H11.2221C11.4496 17.1483 11.6749 17.1012 11.8851 17.0096C12.0953 16.9179 12.2863 16.7836 12.4472 16.6142C12.6081 16.4448 12.7357 16.2438 12.8228 16.0225C12.9099 15.8013 12.9547 15.5641 12.9547 15.3246V10.8696C12.9545 9.65475 12.6467 8.46189 12.0631 7.4138C11.4794 6.36573 10.641 5.50029 9.63407 4.90657C8.38865 4.18261 6.95913 3.91301 5.56585 4.12493ZM3.70049 8.44134C3.42465 8.78904 3.20515 9.1864 3.05432 9.61774C2.98799 9.80743 2.93585 10.0011 2.89791 10.1971C3.31428 10.1882 3.71718 10.1018 4.57574 9.3851L5.00851 9.00583C5.17133 8.85685 5.2371 8.62777 5.20005 8.40752L5.17831 8.31379C5.07205 8.04339 4.74203 7.96266 4.50119 8.1089C4.25222 8.26007 3.98261 8.37306 3.70049 8.44134ZM6.15774 7.88766C6.02755 7.55613 5.82305 7.3186 5.58321 7.1627C6.10638 7.00991 6.65842 6.97659 7.20161 7.07001C8.06073 7.21777 8.84495 7.67345 9.42154 8.35994C9.80992 8.82213 9.70204 9.48646 9.30287 9.86461C8.12912 10.9809 6.18401 12.4277 4.25076 12.9671C3.75882 13.1034 3.21941 12.8535 3.03925 12.3198C2.92908 11.9929 2.86081 11.6548 2.8344 11.314C3.15405 11.3123 3.55309 11.2871 4.0591 11.0503C4.53459 10.8279 5.0516 10.4444 5.70426 9.84718C6.24535 9.35195 6.37813 8.59572 6.18673 7.97158L6.1743 7.92908L6.15774 7.88766Z",fill:"currentColor"}),e.jsx("path",{d:"M2.78566 10.2017C2.21589 10.2017 1.79754 9.83133 2.19656 8.2028L2.85082 5.3137C2.96495 4.85111 2.98338 4.66616 2.85082 4.66616C2.36416 4.7953 2.60848 4.71503 2.19651 4.89983L1.91211 4.39986C3.29881 3.15966 3.32335 2.83187 4.00636 2.83187C4.57614 2.83187 4.6714 3.55367 4.38607 4.66428L3.63745 7.70142C3.50444 8.23827 3.56196 8.42321 3.69406 8.42321C3.98316 8.35428 4.2596 8.24005 4.5145 8.08528C4.75852 7.93711 5.09207 8.01872 5.19962 8.29281C5.27637 8.54288 5.21676 8.82053 5.02834 8.99293C3.76206 10.1516 3.31404 10.2017 2.78566 10.2017ZM4.0972 0.00281947C4.22705 -0.00766091 4.35753 0.0111517 4.47993 0.0580007C4.60232 0.10485 4.71381 0.178656 4.80694 0.274487C4.90007 0.370319 4.97269 0.485969 5.01996 0.61371C5.06723 0.74145 5.08806 0.878339 5.08105 1.01523V1.01265C5.06571 1.36127 4.9234 1.69028 4.68365 1.93134C4.44391 2.17242 4.12517 2.30702 3.79362 2.3072L3.76707 2.30677C3.63546 2.32186 3.50354 2.30544 3.3788 2.25874C3.25407 2.21205 3.14097 2.13628 3.04797 2.0371C2.95497 1.93792 2.88447 1.8179 2.84174 1.68601C2.79934 1.55514 2.78536 1.41595 2.80082 1.27867C2.81343 0.928866 2.95678 0.598439 3.1997 0.359319C3.44286 0.119957 3.76606 -0.00849914 4.09883 0.00195941L4.0972 0.00281947Z",fill:"currentColor"})]})),e.jsx("defs",{children:e.jsx("clipPath",C.__assign({id:"clip0_7146_59770"},{children:e.jsx("rect",{width:"13",height:"20",fill:"white"})}))})]}))};
2
2
  //# sourceMappingURL=ButtonCognitiveIcon.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime");exports.DefaultCloseIcon=function(){return n.jsxs("svg",e.__assign({width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"#475467",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}))},exports.DefaultDownloadIcon=function(){return n.jsxs("svg",e.__assign({width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#475467",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:[n.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),n.jsx("polyline",{points:"7 10 12 15 17 10"}),n.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]}))},exports.DefaultFullScreenIcon=function(){return n.jsx("svg",e.__assign({width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#475467",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:n.jsx("path",{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"})}))},exports.DefaultPdfIcon=function(){return n.jsx("svg",e.__assign({xmlns:"http://www.w3.org/2000/svg",style:{width:"12px",height:"15px"},viewBox:"0 0 14 17",fill:"none"},{children:n.jsx("path",{d:"M8.25 0.952148V4.05005C8.25 4.47009 8.25 4.68011 8.33175 4.84055C8.40365 4.98167 8.51839 5.0964 8.65951 5.16831C8.81994 5.25005 9.02996 5.25005 9.45 5.25005H12.5479M9.75 9H3.75M9.75 12H3.75M5.25 6H3.75M8.25 0.75H4.35C3.08988 0.75 2.45982 0.75 1.97852 0.995235C1.55516 1.21095 1.21095 1.55516 0.995235 1.97852C0.75 2.45982 0.75 3.08988 0.75 4.35V12.15C0.75 13.4101 0.75 14.0402 0.995235 14.5215C1.21095 14.9448 1.55516 15.289 1.97852 15.5048C2.45982 15.75 3.08988 15.75 4.35 15.75H9.15C10.4101 15.75 11.0402 15.75 11.5215 15.5048C11.9448 15.289 12.289 14.9448 12.5048 14.5215C12.75 14.0402 12.75 13.4101 12.75 12.15V5.25L8.25 0.75Z",stroke:"#0019FF",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime");exports.DefaultCloseIcon=function(){return n.jsxs("svg",e.__assign({width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"#475467",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}))},exports.DefaultDownloadIcon=function(){return n.jsxs("svg",e.__assign({width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#475467",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:[n.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),n.jsx("polyline",{points:"7 10 12 15 17 10"}),n.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]}))},exports.DefaultFullScreenCloseIcon=function(){return n.jsx("svg",e.__assign({width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#475467",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:n.jsx("path",{d:"M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"})}))},exports.DefaultFullScreenIcon=function(){return n.jsx("svg",e.__assign({width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#475467",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:n.jsx("path",{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"})}))},exports.DefaultPdfIcon=function(){return n.jsx("svg",e.__assign({xmlns:"http://www.w3.org/2000/svg",style:{width:"12px",height:"15px"},viewBox:"0 0 14 17",fill:"none"},{children:n.jsx("path",{d:"M8.25 0.952148V4.05005C8.25 4.47009 8.25 4.68011 8.33175 4.84055C8.40365 4.98167 8.51839 5.0964 8.65951 5.16831C8.81994 5.25005 9.02996 5.25005 9.45 5.25005H12.5479M9.75 9H3.75M9.75 12H3.75M5.25 6H3.75M8.25 0.75H4.35C3.08988 0.75 2.45982 0.75 1.97852 0.995235C1.55516 1.21095 1.21095 1.55516 0.995235 1.97852C0.75 2.45982 0.75 3.08988 0.75 4.35V12.15C0.75 13.4101 0.75 14.0402 0.995235 14.5215C1.21095 14.9448 1.55516 15.289 1.97852 15.5048C2.45982 15.75 3.08988 15.75 4.35 15.75H9.15C10.4101 15.75 11.0402 15.75 11.5215 15.5048C11.9448 15.289 12.289 14.9448 12.5048 14.5215C12.75 14.0402 12.75 13.4101 12.75 12.15V5.25L8.25 0.75Z",stroke:"#0019FF",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}))};
2
2
  //# sourceMappingURL=PdfViewerIcons.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),i=require("lucide-react"),l=require("react"),t=require("./ResizableSplitPane.js"),o=require("../PdfViewer/PdfViewer.js");exports.default=function(a){var r,d,u,s=a.href,g=a.children,c=a.metaData,v=a.chevronUpComponent,h=void 0===v?null:v,p=a.chevronDownComponent,f=void 0===p?null:p,_=a.customStyle,m=void 0===_?{}:_,x=a.defaultState,j=void 0!==x&&x,b=l.useState(j),y=b[0],P=b[1],C="string"==typeof g&&(null===(r=null==g?void 0:g.split("\n"))||void 0===r?void 0:r.length)>1?g.split("\n").join(" "):g,w="string"==typeof g?g:g[0],D=null!=h?h:function(e){var l,t;return n.jsx(i.ChevronUp,{size:null!==(l=null==e?void 0:e.fontSize)&&void 0!==l?l:16,color:null!==(t=null==e?void 0:e.color)&&void 0!==t?t:"rgb(214, 51, 132)"})}(null!==(d=null==m?void 0:m.arrow)&&void 0!==d?d:{}),S=null!=f?f:function(e){var l,t;return n.jsx(i.ChevronDown,{size:null!==(l=null==e?void 0:e.fontSize)&&void 0!==l?l:16,color:null!==(t=null==e?void 0:e.color)&&void 0!==t?t:"rgb(214, 51, 132)"})}(null!==(u=null==m?void 0:m.arrow)&&void 0!==u?u:{}),q=["contract","clause"];return n.jsxs("span",e.__assign({style:e.__assign({display:"inline"},m.relativeWrapper||{})},{children:[n.jsx("div",e.__assign({style:e.__assign({display:"inline",marginTop:0},m.citationButtonWrapper||{})},{children:n.jsxs("button",e.__assign({type:"button",onClick:function(){return P(function(e){return!e})},style:e.__assign({display:"inline-flex",alignItems:"center",gap:"3px",fontFamily:'"Inter", sans-serif',backgroundColor:"transparent",padding:0,margin:0,fontSize:"13px",borderRadius:9999,cursor:"pointer",fontWeight:700,color:"rgb(214, 51, 132)",border:"none",textDecoration:"none",wordBreak:"break-word",whiteSpace:"normal"},m.citationButton||{})},{children:[n.jsx("span",{children:C}),n.jsx("span",e.__assign({style:{display:"flex",alignItems:"center"}},{children:y?D:S}))]}))})),y&&n.jsx(n.Fragment,{children:n.jsx(function(){var e,i,l,a,r,d,u,v,h,p,f;console.log("citation details ->","href ->",s,"children ->",g,"metaData ->",c,"citationDisplayTitle ->",C);var _=function(e){try{return new URL(e,window.location.origin).searchParams.get("citationNumber")}catch(e){return null}}(s);if(!_)return null;var m=(null===(e=null==c?void 0:c.citations)||void 0===e?void 0:e[_])||{},x=(null===(i=null==c?void 0:c.docData)||void 0===i?void 0:i.documents)||{},j=(null===(l=null==c?void 0:c.docData)||void 0===l?void 0:l.input_index_map)||{},b=null==j?void 0:j[0],y=null==j?void 0:j[1],P=b?x[b]:null,D=y?x[y]:null,S=b?m[b]:null,z=y?m[y]:null;if(q.includes(w)){console.log("leftDocument",P,"rightDocument",D),console.log("leftCitation",S,"rightCitation",z);var T=S?n.jsx(o.default,{defaultScale:"PageWidth",showHighlightsAction:!1,pdfName:P.title,pdfUrl:P.signed_url,highlightText:[null!==(a=null==S?void 0:S.highlighted_text)&&void 0!==a?a:""],highlightPages:{1:null===(r=null==S?void 0:S.custom_metadata)||void 0===r?void 0:r.pdf_start_page_number},jumpToPageValue:1,highlightCordinatePages:[],useCoordinates:!1,useRange:!0,rangeOfPages:[null===(d=null==S?void 0:S.custom_metadata)||void 0===d?void 0:d.pdf_start_page_number,null===(u=null==S?void 0:S.custom_metadata)||void 0===u?void 0:u.pdf_end_page_number]}):null,R=z?n.jsx(o.default,{defaultScale:"PageWidth",showHighlightsAction:!1,pdfName:D.title,pdfUrl:D.signed_url,jumpToPageValue:1,highlightText:[null!==(v=null==z?void 0:z.highlighted_text)&&void 0!==v?v:""],highlightPages:{1:null===(h=null==z?void 0:z.custom_metadata)||void 0===h?void 0:h.pdf_start_page_number},highlightCordinatePages:[],useCoordinates:!1,useRange:!0,rangeOfPages:[null===(p=null==z?void 0:z.custom_metadata)||void 0===p?void 0:p.pdf_start_page_number,null===(f=null==z?void 0:z.custom_metadata)||void 0===f?void 0:f.pdf_end_page_number]}):null;return S||z?n.jsx("div",{children:n.jsx(t.default,{leftComponent:T,rightComponent:R})}):n.jsx("div",{children:"Missing PDF Citation. Please try again later"})}return n.jsx("div",{children:"No Citation Found. Please try again later"})},{})})]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),n=require("lucide-react"),l=require("react"),t=require("./ResizableSplitPane.js"),o=require("../PdfViewer/PdfViewer.js"),r=require("../../assests/svg/PdfViewerIcons.js"),a=function(n){var l,r,a,d,s,u,c,g,v,p,h,f=n.href,x=n.metaData,_=n.citationTitle,m=n.isFullscreen,b=function(e){try{return new URL(e,window.location.origin).searchParams.get("citationNumber")}catch(e){return null}}(f);if(!b)return null;var j=(null===(l=null==x?void 0:x.citations)||void 0===l?void 0:l[b])||{},y=(null===(r=null==x?void 0:x.docData)||void 0===r?void 0:r.documents)||{},C=(null===(a=null==x?void 0:x.docData)||void 0===a?void 0:a.input_index_map)||{},w=null==C?void 0:C[0],F=null==C?void 0:C[1],P=w?y[w]:null,S=F?y[F]:null,D=w?j[w]:null,k=F?j[F]:null;if(["contract","clause"].includes(_)){var z=D?i.jsx(o.default,{defaultScale:"PageWidth",showFullScreenAction:!1,showHighlightsAction:!1,pdfName:P.title,pdfUrl:P.signed_url,highlightText:[null!==(d=null==D?void 0:D.highlighted_text)&&void 0!==d?d:""],highlightPages:{1:null===(s=null==D?void 0:D.custom_metadata)||void 0===s?void 0:s.pdf_start_page_number},jumpToPageValue:1,highlightCordinatePages:[],useCoordinates:!1,useRange:!0,rangeOfPages:[null===(u=null==D?void 0:D.custom_metadata)||void 0===u?void 0:u.pdf_start_page_number,null===(c=null==D?void 0:D.custom_metadata)||void 0===c?void 0:c.pdf_end_page_number]}):null,R=k?i.jsx(o.default,{defaultScale:"PageWidth",showFullScreenAction:!1,showHighlightsAction:!1,pdfName:S.title,pdfUrl:S.signed_url,jumpToPageValue:1,highlightText:[null!==(g=null==k?void 0:k.highlighted_text)&&void 0!==g?g:""],highlightPages:{1:null===(v=null==k?void 0:k.custom_metadata)||void 0===v?void 0:v.pdf_start_page_number},highlightCordinatePages:[],useCoordinates:!1,useRange:!0,rangeOfPages:[null===(p=null==k?void 0:k.custom_metadata)||void 0===p?void 0:p.pdf_start_page_number,null===(h=null==k?void 0:k.custom_metadata)||void 0===h?void 0:h.pdf_end_page_number]}):null;return D||k?i.jsx("div",e.__assign({style:{height:"100%",display:"flex",flexDirection:"column"}},{children:i.jsx(t.default,{leftComponent:z,rightComponent:R,isFullscreen:m})})):i.jsx("div",{children:"Missing PDF Citation. Please try again later"})}return i.jsx("div",{children:"No Citation Found. Please try again later"})};exports.default=function(t){var o,d,s,u=t.href,c=t.children,g=t.metaData,v=t.chevronUpComponent,p=void 0===v?null:v,h=t.chevronDownComponent,f=void 0===h?null:h,x=t.customStyle,_=void 0===x?{}:x,m=t.defaultState,b=void 0!==m&&m,j=l.useState(b),y=j[0],C=j[1],w=l.useState(!1),F=w[0],P=w[1],S="string"==typeof c&&(null===(o=null==c?void 0:c.split("\n"))||void 0===o?void 0:o.length)>1?c.split("\n").join(" "):c,D="string"==typeof c?c:c[0],k=null!=p?p:function(e){var l,t;return i.jsx(n.ChevronUp,{size:null!==(l=null==e?void 0:e.fontSize)&&void 0!==l?l:16,color:null!==(t=null==e?void 0:e.color)&&void 0!==t?t:"rgb(214, 51, 132)"})}(null!==(d=null==_?void 0:_.arrow)&&void 0!==d?d:{}),z=null!=f?f:function(e){var l,t;return i.jsx(n.ChevronDown,{size:null!==(l=null==e?void 0:e.fontSize)&&void 0!==l?l:16,color:null!==(t=null==e?void 0:e.color)&&void 0!==t?t:"rgb(214, 51, 132)"})}(null!==(s=null==_?void 0:_.arrow)&&void 0!==s?s:{});return i.jsxs("span",e.__assign({style:e.__assign({display:"inline"},_.relativeWrapper||{})},{children:[i.jsx("div",e.__assign({style:e.__assign({display:"inline",marginTop:0},_.citationButtonWrapper||{})},{children:i.jsxs("button",e.__assign({type:"button",onClick:function(){return C(function(e){return!e})},style:e.__assign({display:"inline-flex",alignItems:"center",gap:"3px",fontFamily:'"Inter", sans-serif',backgroundColor:"transparent",padding:0,margin:0,fontSize:"13px",borderRadius:9999,cursor:"pointer",fontWeight:700,color:"rgb(214, 51, 132)",border:"none",textDecoration:"none",wordBreak:"break-word",whiteSpace:"normal"},_.citationButton||{})},{children:[i.jsx("span",{children:S}),i.jsx("span",e.__assign({style:{display:"flex",alignItems:"center"}},{children:y?k:z}))]}))})),y&&i.jsxs("div",e.__assign({style:F?{position:"fixed",inset:0,zIndex:999999,backgroundColor:"#FAFAFA",display:"flex",flexDirection:"column"}:{boxSizing:"border-box",border:"1px solid #E4E7EC",borderRadius:"8px",overflow:"hidden",marginTop:"8px",display:"flex",flexDirection:"column",width:"100%"}},{children:[i.jsx("div",e.__assign({style:{display:"flex",justifyContent:"flex-end",padding:"6px 10px",borderBottom:"1px solid #E4E7EC",backgroundColor:"#FFFFFF",flexShrink:0}},{children:i.jsx("button",e.__assign({onClick:function(){P(function(e){return!e})},style:{background:"none",border:"none",cursor:"pointer",padding:"4px",borderRadius:"6px",color:"#475467",marginRight:"9px"}},{children:F?i.jsx(r.DefaultFullScreenCloseIcon,{}):i.jsx(r.DefaultFullScreenIcon,{})}))})),i.jsx("div",e.__assign({style:{flex:1,minHeight:0,height:"100%",overflow:"hidden"}},{children:i.jsx(a,{href:u,children:c,metaData:g,citationTitle:D,isFullscreen:F})}))]}))]}))};
2
2
  //# sourceMappingURL=CitationAnchor.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),t=require("react"),i=require("@mui/material"),o=require("lucide-react"),l=require("../../assests/svg/ButtonCognitiveIcon.js"),r=require("./OverlayComponent.js"),c=require("./CognitiveComparehelpers.js"),s=require("./CognitiveCompareConfig.js"),u=require("./CognitiveCompareConstants.js"),a=require("./CognitivePopup.js"),d=require("./MoreFunctionsPopup.js"),v=require("./LoaderComponent.js"),g=require("./components/ThreeDotsLoader.js"),f=require("./hooks/useCompareData.js"),p=require("./hooks/useComparePopups.js"),h=require("./hooks/useSectionRefs.js"),x=require("./hooks/useAccordionState.js"),_=require("./hooks/useDeviationNavigation.js"),y=require("./components/CompareHeader.js"),R=require("./components/SectionAccordion.js"),m=require("./components/SubSectionAccordion.js");exports.SHARED_MARKDOWN_STYLES=s.SHARED_MARKDOWN_STYLES,exports.default=function(b){var S,A,E,I,T,B,C,D,O,j,w,F,N,k,P,M=b.componentHeaderText,L=void 0===M?u.DEFAULT_COMPONENT_HEADER_TEXT:M,H=b.treeData,V=b.comparisonConfig,G=b.leftColumnTitleText,q=b.rightColumnTitleText,z=b.markdownStyles,W=b.displayConfig,Y=void 0===W?{isHeaderVisible:!0,isToggleVisible:!0,maintainRelativeOrder:!1,isLoading:!0}:W,K=b.popupConfig,U=b.deviationData,X=void 0===U?{}:U,J=b.deviationNodeIdToView,Q=t.useState(Y.maintainRelativeOrder),Z=Q[0],$=Q[1],ee=t.useState(!1),ne=ee[0],te=ee[1],ie=t.useState(!1),oe=ie[0],le=ie[1],re=t.useState(null),ce=re[0],se=re[1],ue=t.useState(!1),ae=ue[0],de=ue[1],ve=t.useState(!1),ge=ve[0],fe=ve[1],pe=t.useState(null),he=pe[0],xe=pe[1],_e=t.useRef(!1),ye=t.useState(new Set),Re=ye[0],me=ye[1],be=t.useState([]),Se=be[0],Ae=be[1],Ee=t.useRef(null),Ie=t.useRef(!1),Te=t.useRef(null),Be=t.useRef({}),Ce=t.useRef([]),De=t.useRef(!1),Oe=t.useRef(!1),je=t.useRef(null),we=t.useRef(function(){}),Fe=t.useMemo(function(){return(null==H?void 0:H.cognitive_decisioning)||{}},[H]),Ne=t.useState({width:0,height:0}),ke=Ne[0],Pe=Ne[1],Me=t.useMemo(function(){return e.__assign(e.__assign({},s.SHARED_MARKDOWN_STYLES),z)},[z]),Le=t.useRef(null),He=t.useRef(null),Ve=t.useRef(null),Ge=t.useRef(null),qe=t.useRef(null),ze=t.useRef(null),We=t.useRef(null),Ye=t.useRef(null),Ke=t.useRef(!1),Ue=p.useComparePopups(Le),Xe=Ue.cognitivePopup,Je=Ue.setCognitivePopup,Qe=Ue.moreFunctions,Ze=Ue.setMoreFunctions,$e=Ue.position,en=Ue.setPosition,nn=Ue.activeBadgeId,tn=Ue.setActiveBadgeId,on=Ue.popupRef,ln=Ue.closeCognitivePopup,rn=Ue.closeMoreFunctionsPopup,cn=t.useMemo(function(){var e,n,t,i,o,l,r;return{fields:null!==(e=null==V?void 0:V.fields)&&void 0!==e?e:s.DEFAULT_FIELD_CONFIG,thresholds:{high:null!==(t=null===(n=null==V?void 0:V.thresholds)||void 0===n?void 0:n.high)&&void 0!==t?t:s.DEFAULT_COMPARISON_CONFIG.thresholds.high,medium:null!==(o=null===(i=null==V?void 0:V.thresholds)||void 0===i?void 0:i.medium)&&void 0!==o?o:s.DEFAULT_COMPARISON_CONFIG.thresholds.medium,exact:null!==(r=null===(l=null==V?void 0:V.thresholds)||void 0===l?void 0:l.exact)&&void 0!==r?r:s.DEFAULT_COMPARISON_CONFIG.thresholds.exact}}},[V]),sn=t.useState(null),un=sn[0];sn[1];var an=null===(E=null===(S=null==H?void 0:H.documents)||void 0===S?void 0:S[null===(A=null==H?void 0:H.input_index_map)||void 0===A?void 0:A[0]])||void 0===E?void 0:E.title,dn=null===(B=null===(I=null==H?void 0:H.documents)||void 0===I?void 0:I[null===(T=null==H?void 0:H.input_index_map)||void 0===T?void 0:T[1]])||void 0===B?void 0:B.title,vn=c.safeStringify(G||an||"Uploaded Contract"),gn=c.safeStringify(q||dn||"Reference Template"),fn=f.useCognitiveTreeData(H,Z,X,cn),pn=fn.activeProposed,hn=fn.existingRule,xn=fn.proposedSections,_n=fn.existingSections,yn=fn.visibleFields,Rn=fn.parentDeviationRecord,mn=fn.deviationNumberRegistry,bn=fn.parseError;t.useEffect(function(){bn&&se("Failed to load comparison: ".concat(bn))},[bn]);var Sn=xn.length>0||_n.length>0,An=h.useSectionRefs(yn.map(function(e){return e.key}),Math.max(xn.length,_n.length)),En=An.leftRefs,In=An.rightRefs,Tn=An.sectionLeftRefs,Bn=An.sectionRightRefs,Cn=An.lhsBadgeRefs,Dn=An.rhsBadgeRefs,On=An.sectionRightRowRefs,jn=An.subSectionLeftRefs,wn=An.subSectionRightRefs,Fn=An.sectionRowRefs,Nn=An.getSectionRowRef,kn=An.getSubSectionRef,Pn=An.getBadgeRef,Mn=hn.analysis,Ln=c.safeStringify(null===(D=null===(C=null==Mn?void 0:Mn.rule_difference_comparison)||void 0===C?void 0:C.summary)||void 0===D?void 0:D.overall_summary),Hn=!!Ln.match(/<ai_reasoning>([\s\S]*?)<\/ai_reasoning>/i),Vn=null!==(O=null==H?void 0:H.base_root_id)&&void 0!==O?O:"-1";null==H||H[Vn];var Gn=(null===(j=null==X?void 0:X[Vn])||void 0===j?void 0:j.evaluation_result)||(null===(F=null===(w=null==H?void 0:H.nodes)||void 0===w?void 0:w[Vn])||void 0===F?void 0:F.evaluation_result)||null,qn=c.extractDeviationScore(Gn),zn=c.generateColorPalette(null!==(P=null===(k=null===(N=null==Gn?void 0:Gn.evaluation_outputs)||void 0===N?void 0:N.metadata)||void 0===k?void 0:k.label_color)&&void 0!==P?P:""),Wn=t.useCallback(function(){var e,n,t,i;de(!1),Oe.current=!1;var o=je.current,l=it.current;if(null!==o)if("string"==typeof o&&o.includes(c.DEVIATION_BADGE_SEPARATOR)){var r=o.split(c.DEVIATION_BADGE_SEPARATOR);(s=null===(e=jn.current[r[2]])||void 0===e?void 0:e.current)&&(s.style.paddingTop="0px")}else{var s;(s=null===(n=Tn.current[o])||void 0===n?void 0:n.current)&&(s.style.paddingTop="0px")}if(null!==l)if("string"==typeof l&&l.includes(c.DEVIATION_BADGE_SEPARATOR)){r=l.split(c.DEVIATION_BADGE_SEPARATOR);(u=null===(t=wn.current[r[3]])||void 0===t?void 0:t.current)&&(u.style.paddingTop="0px")}else{var u;(u=null===(i=Bn.current[l])||void 0===i?void 0:i.current)&&(u.style.paddingTop="0px")}xe(null),je.current=null,it.current=null,fe(!1),le(!1),Ge.current&&(Ge.current.style.height="0px"),qe.current&&(qe.current.style.height="0px"),ze.current&&(ze.current.style.height="0px"),We.current&&(We.current.style.height="0px")},[]),Yn=x.useAccordionState({maintainRelativeOrder:!!Z,proposedSections:xn,existingSections:_n,activeSideBySideSection:he,connectedSections:Re,resetSideBySide:Wn,setConnectedSections:me,setConnectedLines:Ae,cachedConnectedPositions:Ce,svgContainerRef:Ee,isAnimatingRef:Ie,animationTimerRef:Te,calculateLinesRef:we,sectionLeftRefs:Tn,sectionRightRefs:Bn,subSectionLeftRefs:jn,subSectionRightRefs:wn}),Kn=Yn.expandedSections,Un=Yn.expandedSubSections,Xn=Yn.setExpandedSubSections,Jn=Yn.toggleSection,Qn=t.useCallback(function(e,n,t,i,o,l,r){var s,u,a,d=c.safeStringify(null==n?void 0:n.id)||c.safeStringify(null==t?void 0:t.id)||"",v=(d?Fe[d]:null)||(null==n?void 0:n.cognitiveData)||(null==t?void 0:t.cognitiveData)||{section_id:d,decisioning:[],gap:[],relevance_score:0},g=null!==(u=null===(s=Fn.current[i])||void 0===s?void 0:s.current)&&void 0!==u?u:null;return{isLoading:null!==(a=null==Y?void 0:Y.isLoading)&&void 0!==a&&a,open:!0,sectionTitle:(null==n?void 0:n.displayTitle)?null==n?void 0:n.title:"no title",refSectionTitle:(null==t?void 0:t.displayTitle)?null==t?void 0:t.title:"no title",cognitiveData:v,anchorEl:e,sectionAnchorEl:g,badgeStyle:l||null,sectionIdx:i,docData:{documents:null==H?void 0:H.documents,input_index_map:null==H?void 0:H.input_index_map},deviationData:(null==n?void 0:n.evaluationResult)||(null==t?void 0:t.evaluationResult)||null,isOrphan:!!o}},[Fe,H]),Zn=t.useCallback(function(e){rn(),en(null),Je(e)},[rn]),$n=function(e,n,t,i,o,l){e.stopPropagation(),Qe.open&&Qe.sectionIdx===o?rn():(ln(),Ze(Qn(e.currentTarget,n,i,o,t,l)))},et=t.useCallback(function(){null!==Qe.sectionIdx&&Qe.anchorEl?Zn(e.__assign(e.__assign({},Qe),{open:!0})):rn()},[Qe,rn,Zn]),nt=t.useCallback(function(){var e=Qe.sectionIdx,n=Qe.isOrphan;rn(),null!==e&&(n?se("No counterpart exists to connect to."):(Oe.current&&Wn(),me(function(n){return n.has(e)?new Set:new Set([e])})))},[Qe.sectionIdx,rn,Wn]),tt=t.useRef(null),it=t.useRef(null),ot=t.useRef(null),lt=t.useRef(null),rt=t.useRef(null),ct=t.useState([]),st=ct[0],ut=ct[1];t.useRef(null);var at=t.useState(null),dt=at[0],vt=at[1];t.useEffect(function(){if(un){var e=cn.fields.find(function(e){return e.analysisKey===un||e.key===un});if(e){var n=En.current[e.key]||In.current[e.key];(null==n?void 0:n.current)&&setTimeout(function(){return n.current.scrollIntoView({behavior:"smooth",block:"center"})},150)}}},[un,cn.fields]);var gt=t.useCallback(function(e){var n,t,i,o,l,r,c,s,u,a=null===(n=null==Mn?void 0:Mn.rule_difference_comparison)||void 0===n?void 0:n.fields;if(!a||!a[e])return{score:0,relation:"",highlightsA:[],highlightsB:[],hasContent:!1};var d=a[e],v=(null==d?void 0:d.relation)||(null===(i=null===(t=null==d?void 0:d.highlights)||void 0===t?void 0:t.ruleA_spans)||void 0===i?void 0:i.length)||(null===(l=null===(o=null==d?void 0:d.highlights)||void 0===o?void 0:o.ruleB_spans)||void 0===l?void 0:l.length)||(null==d?void 0:d.mappings)&&d.mappings.length>0;if(d.mappings){var g=d.mappings[0]||{};return{score:d.score,relation:g.relation||"",highlightsA:(null===(r=g.highlights)||void 0===r?void 0:r.ruleA_spans)||[],highlightsB:(null===(c=g.highlights)||void 0===c?void 0:c.ruleB_spans)||[],hasContent:!!v}}return{score:d.score,relation:d.relation||"",highlightsA:(null===(s=d.highlights)||void 0===s?void 0:s.ruleA_spans)||[],highlightsB:(null===(u=d.highlights)||void 0===u?void 0:u.ruleB_spans)||[],hasContent:!!v}},[Mn]),ft=t.useCallback(function(n){var t,i,o,l,r,s,a,d=xn[n],v=_n[n],g=(null==d?void 0:d.relation)&&"not_defined"!==d.relation,f=(null==v?void 0:v.relation)&&"not_defined"!==v.relation;c.safeStringify(null==d?void 0:d.id)||c.safeStringify(null==v?void 0:v.id);var p=!(!(null==d?void 0:d.cognitiveData)&&!(null==v?void 0:v.cognitiveData));if(!g&&!f&&!p)return e.__assign(e.__assign({},c.generateColorPalette(u.DEFAULT_DEVIAION_COLOR)),{label:"Not Defined"});var h=null!==(i=null!==(t=null==d?void 0:d.evaluationResult)&&void 0!==t?t:null==v?void 0:v.evaluationResult)&&void 0!==i?i:null,x=null===(o=null==h?void 0:h.evaluation_outputs)||void 0===o?void 0:o.output_value,_=null!==(s=null===(r=null===(l=null==h?void 0:h.evaluation_outputs)||void 0===l?void 0:l.metadata)||void 0===r?void 0:r.label_color)&&void 0!==s?s:u.DEFAULT_DEVIAION_COLOR;return null!=h?e.__assign(e.__assign({},c.generateColorPalette(_)),{label:null!==(a=x)&&void 0!==a?a:""}):e.__assign(e.__assign({},c.generateColorPalette(_)),{label:null})},[xn,_n,Fe,cn,gt]),pt=t.useCallback(function(n){for(var t,i,o,l,r,s,a,d,v,g=n.split("-").map(Number),f=xn[g[0]],p=_n[g[0]],h=1;h<g.length;h++)(null==f?void 0:f.subsections)&&(f=f.subsections[g[h]]),(null==p?void 0:p.subsections)&&(p=p.subsections[g[h]]);if(!f&&!p)return null;var x=(null==f?void 0:f.relation)&&"not_defined"!==f.relation,_=(null==p?void 0:p.relation)&&"not_defined"!==p.relation,y=c.safeStringify(null==f?void 0:f.id)||c.safeStringify(null==p?void 0:p.id)||"",R=!(!(null==f?void 0:f.cognitiveData)&&!(null==p?void 0:p.cognitiveData));if(!x&&!_&&!R)return e.__assign(e.__assign({},c.generateColorPalette(u.DEFAULT_DEVIAION_COLOR)),{label:"Not Defined"});null!==(i=null!==(t=null==f?void 0:f.cognitiveRelevanceScore)&&void 0!==t?t:null==p?void 0:p.cognitiveRelevanceScore)&&void 0!==i||y&&(null===(o=Fe[y])||void 0===o||o.relevance_score);var m=null!==(r=null!==(l=null==f?void 0:f.evaluationResult)&&void 0!==l?l:null==p?void 0:p.evaluationResult)&&void 0!==r?r:null,b=null===(s=null==m?void 0:m.evaluation_outputs)||void 0===s?void 0:s.output_value,S=null!==(v=null===(d=null===(a=null==m?void 0:m.evaluation_outputs)||void 0===a?void 0:a.metadata)||void 0===d?void 0:d.label_color)&&void 0!==v?v:u.DEFAULT_DEVIAION_COLOR;return null!=m?e.__assign(e.__assign({},c.generateColorPalette(S)),{label:null!=b?b:""}):e.__assign(e.__assign({},c.generateColorPalette(S)),{label:null})},[xn,_n,Fe,cn]),ht=t.useCallback(function(){var e,n,t,i,o,l,r,s,u,a,d,v,g,f,p,h,x,_,y,R,m,b;if(!Ke.current&&!Ie.current){Ke.current=!0;try{if(!tt.current)return;var S=function(e){var n=e.split("-"),t=n[0];if(!Kn[t]&&!1===Z)return!1;if(Z&&!Kn["left-".concat(t)]&&!Kn["right-".concat(t)]&&!Kn[t])return!1;for(var i=t,o=1;o<n.length-1;o++)if(i+="-".concat(n[o]),!Un[i])return!1;return!0},A=tt.current.getBoundingClientRect();Pe({width:A.width,height:A.height});var E=[];if(yn.forEach(function(e){var n,t,i=e.key,o=null===(n=En.current[i])||void 0===n?void 0:n.current,l=null===(t=In.current[i])||void 0===t?void 0:t.current;o&&l&&(o.style.height="auto",l.style.height="auto",o.style.minHeight="0px",l.style.minHeight="0px")}),!Ie.current){for(var I=0;I<Math.max(xn.length,_n.length);I++){var T=null===(e=Tn.current[I])||void 0===e?void 0:e.current,B=null===(n=Bn.current[I])||void 0===n?void 0:n.current;T&&(T.style.height="auto",T.style.minHeight="0px"),B&&(B.style.height="auto",B.style.minHeight="0px")}Z||Object.keys(jn.current).forEach(function(e){var n,t;if(S(e)){var i=null===(n=jn.current[e])||void 0===n?void 0:n.current,o=null===(t=wn.current[e])||void 0===t?void 0:t.current;i&&o&&(i.style.height="auto",o.style.height="auto",i.style.minHeight="0px",o.style.minHeight="0px")}})}var C={};yn.forEach(function(e){var n,t,i=e.key,o=null===(n=En.current[i])||void 0===n?void 0:n.current,l=null===(t=In.current[i])||void 0===t?void 0:t.current;if(o&&l){var r=o.getBoundingClientRect(),c=l.getBoundingClientRect();C[i]=Math.max(r.height,c.height)}});var D={left:{},right:{}},O={};if(!Ie.current)if(Z){if(ae&&null!==he)if("number"==typeof he){var j=he,w=xn[j],F=null===(o=Tn.current[j])||void 0===o?void 0:o.current;F&&w&&(w.refIndexes||[]).forEach(function(e){var n,t=_n.findIndex(function(n){return n.selfIndex===e}),i=null===(n=Bn.current[t])||void 0===n?void 0:n.current;if(i&&(Kn["left-".concat(j)]||Kn["right-".concat(t)])){var o=Math.max(F.getBoundingClientRect().height,i.getBoundingClientRect().height);D.left[j]=Math.max(D.left[j]||0,o),D.right[t]=Math.max(D.right[t]||0,o)}})}else{var N=he.split(c.DEVIATION_BADGE_SEPARATOR)[2];if(N){T=null===(l=jn.current[N])||void 0===l?void 0:l.current,B=null===(r=wn.current[N])||void 0===r?void 0:r.current;if(T&&B){k=Math.max(T.getBoundingClientRect().height,B.getBoundingClientRect().height);O[N]=Math.max(O[N]||0,k)}}}}else{Object.keys(jn.current).forEach(function(e){var n,t;if(S(e)){var i=null===(n=jn.current[e])||void 0===n?void 0:n.current,o=null===(t=wn.current[e])||void 0===t?void 0:t.current;if(i&&o&&null!==i.offsetParent&&null!==o.offsetParent){var l=i.getBoundingClientRect(),r=o.getBoundingClientRect(),c=Math.max(l.height,r.height);O[e]=c,i.style.minHeight="".concat(c,"px"),o.style.minHeight="".concat(c,"px")}}});for(I=0;I<Math.min(xn.length,_n.length);I++){var T=null===(t=Tn.current[I])||void 0===t?void 0:t.current,B=null===(i=Bn.current[I])||void 0===i?void 0:i.current;if(T&&B){var k=Math.max(T.getBoundingClientRect().height,B.getBoundingClientRect().height);D.left[I]=k,D.right[I]=k}}}if(yn.forEach(function(e){var n,t,i=e.key,o=null===(n=En.current[i])||void 0===n?void 0:n.current,l=null===(t=In.current[i])||void 0===t?void 0:t.current;if(o&&l){var r=C[i];o.style.minHeight="".concat(r,"px"),l.style.minHeight="".concat(r,"px")}}),Ie.current||(Object.entries(D.left).forEach(function(e){var n,t=e[0],i=e[1],o=null===(n=Tn.current[Number(t)])||void 0===n?void 0:n.current;o&&(o.style.minHeight="".concat(i,"px"))}),Object.entries(D.right).forEach(function(e){var n,t=e[0],i=e[1],o=null===(n=Bn.current[Number(t)])||void 0===n?void 0:n.current;o&&(o.style.minHeight="".concat(i,"px"))}),Z||Object.keys(O).forEach(function(e){var n,t,i=null===(n=jn.current[e])||void 0===n?void 0:n.current,o=null===(t=wn.current[e])||void 0===t?void 0:t.current;if(i&&o&&O[e]){var l=O[e];i.style.minHeight="".concat(l,"px"),o.style.minHeight="".concat(l,"px")}})),Z)xn.forEach(function(e,n){var t;(null===(t=Tn.current[n])||void 0===t?void 0:t.current)&&(e.refIndexes||[]).forEach(function(e){var t,i,o,l,r,c,s,u,a,d,v=_n.findIndex(function(n){return n.selfIndex===e});if(-1!==v){var g=null===(t=Cn.current[n])||void 0===t?void 0:t.current,f=null===(i=Dn.current[v])||void 0===i?void 0:i.current;if(g&&f){var p=g.getBoundingClientRect(),h=f.getBoundingClientRect(),x=p.right-A.left,_=h.left-A.left,y=p.top+p.height/2-A.top,R=h.top+h.height/2-A.top;if(ae&&he===n){var m=null!==(l=null===(o=Ye.current)||void 0===o?void 0:o.getBoundingClientRect().top)&&void 0!==l?l:0,b=null!==(c=null===(r=Ve.current)||void 0===r?void 0:r.getBoundingClientRect().top)&&void 0!==c?c:0,S=m+(null!==(u=null===(s=Ye.current)||void 0===s?void 0:s.clientHeight)&&void 0!==u?u:1/0),I=b+(null!==(d=null===(a=Ve.current)||void 0===a?void 0:a.clientHeight)&&void 0!==d?d:1/0),T=p.top+p.height/2,B=function(e,n,t){return Math.max(n,Math.min(t,e))};y=B(T,m,S)-A.top,R=B(T,b,I)-A.top}var C=ft(n);C&&E.push({id:"line-".concat(n,"-").concat(v),x1:x,y1:y,x2:_,y2:R,style:C,sectionIdx:n,targetRightIdx:v})}}})});else{for(I=0;I<Math.min(xn.length,_n.length);I++){var P=null===(s=Tn.current[I])||void 0===s?void 0:s.current,M=null===(u=Bn.current[I])||void 0===u?void 0:u.current;if(P&&M){var L=P.getBoundingClientRect(),H=M.getBoundingClientRect(),V=Math.max(L.top,H.top)+18-A.top,G=(null===(a=_n[I])||void 0===a?void 0:a.id)||"sec-".concat(I);(J=ft(I))&&E.push({id:G,x1:L.right-A.left,y1:V,x2:H.left-A.left,y2:V,style:J,sectionIdx:I,hasCognitive:!!((null===(d=xn[I])||void 0===d?void 0:d.cognitiveData)||(null===(v=_n[I])||void 0===v?void 0:v.cognitiveData)||G&&Fe[G]),isSubSection:!1})}}Object.keys(jn.current).forEach(function(e){var n,t,i,o,l,r;if(S(e)){var s=null===(n=jn.current[e])||void 0===n?void 0:n.current,u=null===(t=wn.current[e])||void 0===t?void 0:t.current;if(s&&u){for(var a=e.split("-").map(Number),d=xn[a[0]],v=_n[a[0]],g=1;g<a.length;g++)(null==d?void 0:d.subsections)&&(d=d.subsections[a[g]]),(null==v?void 0:v.subsections)&&(v=v.subsections[a[g]]);var f=!!d&&((null===(i=d.displayTitle)||void 0===i||i)&&c.hasValue(d.title)),p=!!d&&((null===(o=d.displayContent)||void 0===o||o)&&c.hasValue(d.content)),h=!!v&&((null===(l=v.displayTitle)||void 0===l||l)&&c.hasValue(v.title)),x=!!v&&((null===(r=v.displayContent)||void 0===r||r)&&c.hasValue(v.content));if(f&&p||h&&x){var _=s.getBoundingClientRect(),y=u.getBoundingClientRect(),R=Math.max(_.top,y.top)+16-A.top,m=pt(e);m&&"Not Defined"!==m.label&&E.push({id:"subsec-".concat(e),x1:_.right-A.left,y1:R,x2:y.left-A.left,y2:R,style:m,sectionIdx:a[0],isSubSection:!0,subSectionKeyPath:e,hasCognitive:!(!(null==d?void 0:d.cognitiveData)&&!(null==v?void 0:v.cognitiveData))})}}}})}if(ae&&"string"==typeof he&&he.includes(c.DEVIATION_BADGE_SEPARATOR)){var q=he.split(c.DEVIATION_BADGE_SEPARATOR),z=q[0],W=q[1],Y=q[2],K=(q[3],"".concat(z).concat(c.DEVIATION_BADGE_SEPARATOR).concat(W)),U=null===(g=Cn.current[K])||void 0===g?void 0:g.current,X=null===(f=Dn.current[K])||void 0===f?void 0:f.current;if(U&&X){var J,Q=U.getBoundingClientRect(),$=X.getBoundingClientRect(),ee=Q.right-A.left,ne=$.left-A.left,te=Q.top+Q.height/2-A.top,ie=$.top+$.height/2-A.top;if(Z){var oe=null!==(h=null===(p=Ye.current)||void 0===p?void 0:p.getBoundingClientRect().top)&&void 0!==h?h:0,le=null!==(_=null===(x=Ve.current)||void 0===x?void 0:x.getBoundingClientRect().top)&&void 0!==_?_:0,re=oe+(null!==(R=null===(y=Ye.current)||void 0===y?void 0:y.clientHeight)&&void 0!==R?R:1/0),ce=le+(null!==(b=null===(m=Ve.current)||void 0===m?void 0:m.clientHeight)&&void 0!==b?b:1/0),se=function(e,n,t){return Math.max(n,Math.min(t,e))};te=se(Q.top+Q.height/2,oe,re)-A.top,ie=se($.top+$.height/2,le,ce)-A.top}(J=pt(Y))&&E.push({id:"line-subsec-".concat(K),x1:ee,y1:te,x2:ne,y2:ie,style:J,sectionIdx:Number(Y.split("-")[0]),isSubSection:!0,subSectionKeyPath:he})}}if(ut(E),lt.current&&rt.current){var ue=lt.current.getBoundingClientRect(),de=rt.current.getBoundingClientRect(),ve=(ue.top+ue.height/2-A.top+de.top+de.height/2-A.top)/2;vt({x1:ue.right-A.left,x2:de.left-A.left,y:ve})}else vt(null);if(Re.size>0){var ge=[],fe=Ye.current,pe=Ve.current;if(fe&&pe){var xe=[],_e=fe.getBoundingClientRect().top,ye=pe.getBoundingClientRect().top,me=_e+fe.clientHeight,be=ye+pe.clientHeight,Se=fe.scrollTop,Ee=pe.scrollTop,Te=A.top,Be=function(e,n,t){return Math.max(n,Math.min(t,e))};Re.forEach(function(e){var n,t,i,o,l;if("string"==typeof e&&e.includes(c.DEVIATION_BADGE_SEPARATOR)){var r=e.split(c.DEVIATION_BADGE_SEPARATOR),s=r[0],u=r[1],a=r[2],d=(r[3],"".concat(s).concat(c.DEVIATION_BADGE_SEPARATOR).concat(u)),v=null===(n=Cn.current[d])||void 0===n?void 0:n.current,g=null===(t=Dn.current[d])||void 0===t?void 0:t.current;if(!v||!g)return;var f=v.getBoundingClientRect(),p=g.getBoundingClientRect(),h=pt(a),x=(F=f.right-A.left)+.5*((N=p.left-A.left-0)-F),_=f.top+f.height/2,y=p.top+p.height/2,R=_-_e+Se,m=y-ye+Ee,b="conn-subsec-".concat(d);xe.push({lhsScrollY:R,rhsScrollY:m,x1:F,x2:N,containerTop:Te,leftIdx:e,rhsArrayIdx:e,styleColor:(null==h?void 0:h.badgeBorder)||"#6366F1",styleId:b});var S=Be(_,_e,me),E=Be(y,ye,be),I=S-Te,T=E-Te,B=y>=ye-4&&y<=be+4,C="";C=(k=_>=_e-4&&_<=me+4)&&B?c.getBentArrowPath(F,I,N,T):k&&!B?"M ".concat(F,",").concat(I," L ").concat(x,",").concat(I," L ").concat(x,",").concat(T):!k&&B?"M ".concat(x,",").concat(I," L ").concat(x,",").concat(T," L ").concat(N,",").concat(T):"M ".concat(x,",").concat(I," L ").concat(x,",").concat(T),ge.push({id:b,pathD:C,style:h,leftIdx:e,rhsArrayIdx:e})}else if(Z){var D=e,O=xn[D];if(!(null===(l=null==O?void 0:O.refIndexes)||void 0===l?void 0:l.length))return;O.refIndexes.forEach(function(e){var n,t,i=_n.findIndex(function(n){return n.selfIndex===e});if(-1!==i){var o=null===(n=Cn.current[D])||void 0===n?void 0:n.current,l=null===(t=Dn.current[i])||void 0===t?void 0:t.current;if(o&&l){var r=o.getBoundingClientRect(),s=l.getBoundingClientRect(),u=ft(D),a=r.right-A.left,d=s.left-A.left-0,v=a+.5*(d-a),g=r.top+r.height/2,f=s.top+s.height/2,p=g-_e+Se,h=f-ye+Ee,x="conn-".concat(D,"-").concat(i);xe.push({lhsScrollY:p,rhsScrollY:h,x1:a,x2:d,containerTop:Te,leftIdx:D,rhsArrayIdx:i,styleColor:(null==u?void 0:u.badgeBorder)||"#6366F1",styleId:x});var _=Be(g,_e,me),y=Be(f,ye,be),R=_-Te,m=y-Te,b=g>=_e-4&&g<=me+4,S=f>=ye-4&&f<=be+4,E="";E=b&&S?c.getBentArrowPath(a,R,d,m):b&&!S?"M ".concat(a,",").concat(R," L ").concat(v,",").concat(R," L ").concat(v,",").concat(m):!b&&S?"M ".concat(v,",").concat(R," L ").concat(v,",").concat(m," L ").concat(d,",").concat(m):"M ".concat(v,",").concat(R," L ").concat(v,",").concat(m),ge.push({id:x,pathD:E,style:u,leftIdx:D,rhsArrayIdx:i})}}})}else{var j=e,w=j;v=null===(i=Cn.current[j])||void 0===i?void 0:i.current,g=null===(o=Dn.current[w])||void 0===o?void 0:o.current;if(!v||!g)return;var F,N;f=v.getBoundingClientRect(),p=g.getBoundingClientRect(),h=ft(j),x=(F=f.right-A.left)+.5*((N=p.left-A.left-0)-F),_=f.top+f.height/2,y=p.top+p.height/2,R=_-_e+Se,m=y-ye+Ee,b="conn-".concat(j,"-").concat(w);xe.push({lhsScrollY:R,rhsScrollY:m,x1:F,x2:N,containerTop:Te,leftIdx:j,rhsArrayIdx:w,styleColor:(null==h?void 0:h.badgeBorder)||"#6366F1",styleId:b});var k;S=Be(_,_e,me),E=Be(y,ye,be),I=S-Te,T=E-Te,B=y>=ye-4&&y<=be+4,C="";C=(k=_>=_e-4&&_<=me+4)&&B?c.getBentArrowPath(F,I,N,T):k&&!B?"M ".concat(F,",").concat(I," L ").concat(x,",").concat(I," L ").concat(x,",").concat(T):!k&&B?"M ".concat(x,",").concat(I," L ").concat(x,",").concat(T," L ").concat(N,",").concat(T):"M ".concat(x,",").concat(I," L ").concat(x,",").concat(T),ge.push({id:b,pathD:C,style:h,leftIdx:j,rhsArrayIdx:w})}}),Ce.current=xe}Ae(ge)}else Ae([]),Ce.current=[]}catch(e){console.error("Line render safe fail: ",e)}finally{Ke.current=!1}}},[yn,xn,_n,Fe,cn,gt,ft,Z,ae,he,Re,Kn,Un]),xt=t.useCallback(function(){var e,n,t,i,o,l,r,s,u,a,d,v,g,f,p=Ce.current;if(p.length&&!Ie.current){var h=null!==(n=null===(e=Ye.current)||void 0===e?void 0:e.scrollTop)&&void 0!==n?n:0,x=null!==(i=null===(t=Ve.current)||void 0===t?void 0:t.scrollTop)&&void 0!==i?i:0,_=null!==(l=null===(o=Ye.current)||void 0===o?void 0:o.clientHeight)&&void 0!==l?l:1/0,y=null!==(s=null===(r=Ve.current)||void 0===r?void 0:r.clientHeight)&&void 0!==s?s:1/0,R=null!==(a=null===(u=Ye.current)||void 0===u?void 0:u.getBoundingClientRect().top)&&void 0!==a?a:0,m=null!==(v=null===(d=Ve.current)||void 0===d?void 0:d.getBoundingClientRect().top)&&void 0!==v?v:0,b=R+_,S=m+y,A=null!==(f=null===(g=tt.current)||void 0===g?void 0:g.getBoundingClientRect().top)&&void 0!==f?f:0,E=function(e,n,t){return Math.max(n,Math.min(t,e))};p.forEach(function(e){var n=e.lhsScrollY-h+R,t=e.rhsScrollY-x+m,i=Be.current[e.styleId+"-stroke"],o=Be.current[e.styleId+"-bg"];if(i||o){var l,r=E(n,R,b),s=E(t,m,S),u=r-A,a=s-A,d=n>=R-4&&n<=b+4,v=t>=m-4&&t<=S+4,g=e.x1+.5*(e.x2-e.x1);l=d&&v?c.getBentArrowPath(e.x1,u,e.x2,a):d&&!v?"M ".concat(e.x1,",").concat(u," L ").concat(g,",").concat(u," L ").concat(g,",").concat(a):!d&&v?"M ".concat(g,",").concat(u," L ").concat(g,",").concat(a," L ").concat(e.x2,",").concat(a):"M ".concat(g,",").concat(u," L ").concat(g,",").concat(a),i&&(i.setAttribute("visibility","visible"),i.setAttribute("d",l)),o&&(o.setAttribute("visibility","visible"),o.setAttribute("d",l))}})}},[]);t.useEffect(function(){we.current=ht},[ht]);var _t=t.useRef(null),yt=t.useCallback(function(){null!==_t.current&&clearTimeout(_t.current),_t.current=setTimeout(function(){we.current(),_t.current=null},50)},[]),Rt=t.useCallback(function(e){var n,t,i,o,l,r,s,u,a,d;if(!_e.current){if(Z||yt(),Oe.current){var v=je.current,g=it.current,f=Ye.current,p=Ve.current;if(null!==v&&null!==g&&f&&p){var h="string"==typeof v&&v.includes(c.DEVIATION_BADGE_SEPARATOR)?null===(n=Cn.current["".concat(v.split(c.DEVIATION_BADGE_SEPARATOR)[0]).concat(c.DEVIATION_BADGE_SEPARATOR).concat(v.split(c.DEVIATION_BADGE_SEPARATOR)[1])])||void 0===n?void 0:n.current:null===(t=Fn.current[v])||void 0===t?void 0:t.current,x="string"==typeof g&&g.includes(c.DEVIATION_BADGE_SEPARATOR)?null===(i=Dn.current["".concat(g.split(c.DEVIATION_BADGE_SEPARATOR)[0]).concat(c.DEVIATION_BADGE_SEPARATOR).concat(g.split(c.DEVIATION_BADGE_SEPARATOR)[1])])||void 0===i?void 0:i.current:null===(o=On.current[g])||void 0===o?void 0:o.current;if(h&&x){var _=h.getBoundingClientRect().top-f.getBoundingClientRect().top+f.scrollTop,y=x.getBoundingClientRect().top-p.getBoundingClientRect().top+p.scrollTop;if(e.currentTarget===f){var R=y-(_-f.scrollTop),m=p.scrollHeight-p.clientHeight,b=Math.max(0,Math.min(R,m));Math.abs(p.scrollTop-b)>1&&(p.scrollTop=b)}else if(e.currentTarget===p){var S=_-(y-p.scrollTop),A=f.scrollHeight-f.clientHeight,E=Math.max(0,Math.min(S,A));Math.abs(f.scrollTop-E)>1&&(f.scrollTop=E)}if(ot.current){var I=void 0,T=void 0;if("string"==typeof v&&v.includes(c.DEVIATION_BADGE_SEPARATOR)){var B=v.split(c.DEVIATION_BADGE_SEPARATOR),C="".concat(B[0]).concat(c.DEVIATION_BADGE_SEPARATOR).concat(B[1]);I=null===(l=Cn.current[C])||void 0===l?void 0:l.current,T=null===(r=Dn.current[C])||void 0===r?void 0:r.current}else I=null===(s=Cn.current[v])||void 0===s?void 0:s.current,T=null===(u=Dn.current[g])||void 0===u?void 0:u.current;var D=null!==(d=null===(a=tt.current)||void 0===a?void 0:a.getBoundingClientRect().top)&&void 0!==d?d:0,O=f.getBoundingClientRect().top,j=O+f.clientHeight,w=p.getBoundingClientRect().top,F=w+p.clientHeight,N=function(e,n,t){return Math.max(n,Math.min(t,e))};if(I&&T){var k=I.getBoundingClientRect(),P=T.getBoundingClientRect(),M=k.top+k.height/2,L=P.top+P.height/2,H=N(M,O,j),V=N(L,w,F);ot.current.setAttribute("y1",(H-D).toString()),ot.current.setAttribute("y2",(V-D).toString());var G=M>=O-4&&M<=j+4;ot.current.setAttribute("visibility",G?"visible":"hidden")}}}}}Ce.current.length>0&&!De.current&&(De.current=!0,requestAnimationFrame(function(){xt(),De.current=!1}))}},[xt,Z,yt]);t.useEffect(function(){var e=setTimeout(yt,250);window.addEventListener("resize",yt);var n=null,t=null;return Le.current&&(n=new ResizeObserver(yt)).observe(Le.current),tt.current&&(t=new ResizeObserver(yt)).observe(tt.current),function(){clearTimeout(e),window.removeEventListener("resize",yt),null==n||n.disconnect(),null==t||t.disconnect()}},[pn,hn,Mn,yn,Kn,Un,xn,_n,cn,yt,ae,he,ge,Re]),t.useEffect(function(){Oe.current=ae},[ae]),t.useEffect(function(){je.current=he},[he]);var mt=t.useCallback(function(){var e,n,t,i,o=Qe.sectionIdx,l=Qe.isOrphan;if(rn(),null!=o)if(l)se("No counterpart exists for this section.");else if(ae&&he===o)Wn();else{if(!Z){var r=je.current,s=it.current;if(null!==r)if("string"==typeof r&&r.includes(c.DEVIATION_BADGE_SEPARATOR)){var u=r.split(c.DEVIATION_BADGE_SEPARATOR);(a=null===(e=jn.current[u[2]])||void 0===e?void 0:e.current)&&(a.style.paddingTop="0px")}else{var a;(a=null===(n=Tn.current[r])||void 0===n?void 0:n.current)&&(a.style.paddingTop="0px")}if(null!==s)if("string"==typeof s&&s.includes(c.DEVIATION_BADGE_SEPARATOR)){u=s.split(c.DEVIATION_BADGE_SEPARATOR);(d=null===(t=wn.current[u[3]])||void 0===t?void 0:t.current)&&(d.style.paddingTop="0px")}else{var d;(d=null===(i=Bn.current[s])||void 0===i?void 0:i.current)&&(d.style.paddingTop="0px")}}me(new Set),Ae([]),Ce.current=[],le(!0),_e.current=!0,xe(o),je.current=o,de(!0),Oe.current=!0,fe(!1),Ge.current&&(Ge.current.style.height="0px"),qe.current&&(qe.current.style.height="0px"),ze.current&&(ze.current.style.height="0px"),We.current&&(We.current.style.height="0px"),requestAnimationFrame(function(){var e,n,t,i,l,r,s,u,a,d,v,g=null,f=null,p=null,h=null,x=null;if("string"==typeof o&&o.includes(c.DEVIATION_BADGE_SEPARATOR)){var _=o.split(c.DEVIATION_BADGE_SEPARATOR),y="".concat(_[0]).concat(c.DEVIATION_BADGE_SEPARATOR).concat(_[1]);g=(null===(e=Cn.current[y])||void 0===e?void 0:e.current)||null,x=(f=(null===(n=Dn.current[y])||void 0===n?void 0:n.current)||null)?o:null,p=(null===(t=jn.current[_[2]])||void 0===t?void 0:t.current)||null,h=(null===(i=wn.current[_[3]])||void 0===i?void 0:i.current)||null}else if(g=(null===(l=Fn.current[o])||void 0===l?void 0:l.current)||null,p=(null===(r=Tn.current[o])||void 0===r?void 0:r.current)||null,Z){var R=xn[o],m=(null==R?void 0:R.refIndexes)||[];if(m.length>0){var b=m[0],S=_n.findIndex(function(e){return e.selfIndex===b});-1!==S&&(f=(null===(a=On.current[S])||void 0===a?void 0:a.current)||null,h=(null===(d=Bn.current[S])||void 0===d?void 0:d.current)||null,x=S)}}else f=(null===(s=On.current[o])||void 0===s?void 0:s.current)||null,h=(null===(u=Bn.current[o])||void 0===u?void 0:u.current)||null,x=f?o:null;it.current=x;var A=Ye.current,E=Ve.current;if(!g||!A)return _e.current=!1,void le(!1);if(!f||!E)return fe(!0),we.current(),_e.current=!1,void le(!1);if(!Z){var I=g.getBoundingClientRect(),T=f.getBoundingClientRect(),B=I.top-T.top;p&&h&&(p.style.paddingTop="0px",h.style.paddingTop="0px",B>0?h.style.paddingTop="".concat(B,"px"):B<0&&(p.style.paddingTop="".concat(Math.abs(B),"px")));var C=g?g.getBoundingClientRect().top:(null==p?void 0:p.getBoundingClientRect().top)||0;return null===(v=Le.current)||void 0===v||v.scrollTo({top:Le.current.scrollTop+C-150,behavior:"smooth"}),fe(!0),we.current(),_e.current=!1,void le(!1)}var D=g.getBoundingClientRect().top-A.getBoundingClientRect().top+A.scrollTop,O=f.getBoundingClientRect().top-E.getBoundingClientRect().top+E.scrollTop-(D-A.scrollTop);O<0&&Ge.current&&(Ge.current.style.height="".concat(Math.abs(O),"px"));requestAnimationFrame(function(){var e,n=E.scrollHeight-E.clientHeight;if(O<0)e=0;else{if(O>n){var t=O-n;return qe.current&&(qe.current.style.height="".concat(t+150,"px")),void requestAnimationFrame(function(){c.smoothScrollTo(E,O,200,function(){fe(!0),we.current(),_e.current=!1,le(!1)})})}e=O}c.smoothScrollTo(E,e,200,function(){fe(!0),we.current(),_e.current=!1,le(!1)})})})}},[rn,Qe.sectionIdx,ae,he,xn,_n,yt,Wn]),bt=null!==Qe.sectionIdx&&Re.has(Qe.sectionIdx),St=_.useDeviationNavigation({proposedSections:xn,existingSections:_n,parentDeviationRecord:Rn,expandedSections:Kn,maintainRelativeOrder:!!Z,scrollContainerRef:Le,leftContainerRef:Ye,lhsBadgeRefs:Cn,rhsBadgeRefs:Dn}),At=St.showDeviationNavigation,Et=St.showOpenNodeRef;t.useEffect(function(){if(J){var e=function(e){var n=Rn[e].find(function(e){return e.id===J});if(n){var t=xn.findIndex(function(n){return n.id===e});(Z?!!Kn["right-".concat(t)]:!!Kn[String(t)])||Jn(t,"left");var i="".concat(n.id).concat(c.DEVIATION_BADGE_SEPARATOR,"0"),o=setInterval(function(){var e,n,t=null===(e=Cn.current[i])||void 0===e?void 0:e.current,l=null===(n=Dn.current[i])||void 0===n?void 0:n.current;if(t){t.scrollIntoView({behavior:"smooth",block:"center"});var r=window.getComputedStyle(t).color;t.style.transition="box-shadow 300ms ease-in-out",t.style.boxShadow="0 0 10px ".concat(r),l&&(l.style.transition="box-shadow 300ms ease-in-out",l.style.boxShadow="0 0 10px ".concat(r)),setTimeout(function(){t.style.boxShadow="",l&&(l.style.boxShadow="")},2e3),clearTimeout(o)}},600);return"break"}};for(var n in Rn){if("break"===e(n))break}}},[J]);var It=function(e){var t=e.section,i=e.keyPath,o=e.depth,l=void 0===o?0:o,r=e.columnKey,c=void 0===r?"left":r,s=e.parentNodeId,u=void 0===s?"":s;return n.jsx(m.default,{section:t,keyPath:i,depth:l,columnKey:c,parentNodeId:u,expandedSubSections:Un,setExpandedSubSections:Xn,maintainRelativeOrder:Z||!1,proposedSections:xn,existingSections:_n,treeData:H,deviationNumberRegistry:mn,connectedSections:Re,activeSideBySideSection:he,resolvedMarkdownStyles:Me,getSubSectionRef:kn,getSubSectionCompareStyle:pt,getBadgeRef:Pn,openMoreFunctionsPopup:$n,resetSideBySide:Wn,setConnectedSections:me,setConnectedLines:Ae,cachedConnectedPositions:Ce})};return n.jsxs(i.Box,e.__assign({ref:He,sx:e.__assign(e.__assign({display:"flex",flexDirection:"column",height:"100%",bgcolor:"#F6F7F9B2",fontFamily:'"Plus Jakarta Sans", sans-serif'},Z?{}:{overflow:"visible"}),{position:"relative"})},{children:[ne&&n.jsx(i.Box,e.__assign({sx:{position:"absolute",inset:0,bgcolor:"rgba(255, 255, 255, 0.6)",backdropFilter:"blur(10px)",zIndex:9999,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"8px"}},{children:n.jsx(v.default,{})})),n.jsx(d.default,{open:Qe.open,anchorEl:Qe.anchorEl,sectionTitle:Qe.sectionTitle,referenceSectionTitle:Qe.refSectionTitle,onClose:rn,onOpenCognitiveCompare:et,onOpenSideBySide:mt,onConnect:nt,isConnected:bt,isOrphan:Qe.isOrphan}),Xe.open&&n.jsx(a.default,{open:Xe.open,popupRef:on,position:$e,popupConfig:K,onClose:function(){en(null),Je(function(n){return e.__assign(e.__assign({},n),{open:!1})}),tn(null)},markdownStyles:z,sectionTitle:Xe.sectionTitle,referenceSectionTitle:Xe.refSectionTitle,cognitiveData:Xe.cognitiveData,anchorEl:Xe.anchorEl,sectionAnchorEl:Xe.sectionAnchorEl,scrollContainerEl:Le.current,badgeStyle:Xe.badgeStyle,docData:Xe.docData,deviationData:Xe.deviationData,isLoading:Xe.isLoading}),n.jsx(i.Snackbar,e.__assign({open:!!ce,autoHideDuration:8e3,onClose:function(){return se(null)},anchorOrigin:{vertical:"top",horizontal:"center"}},{children:n.jsx(i.Alert,e.__assign({onClose:function(){return se(null)},severity:"error",sx:{width:"100%",whiteSpace:"pre-line"}},{children:ce}))})),n.jsx(y.default,{componentHeaderText:L,displayConfig:Y,maintainRelativeOrder:Z,onToggleView:function(e){te(!0),setTimeout(function(){$(!e),Wn(),me(new Set),Ae([]),Ce.current=[],setTimeout(function(){te(!1)},400)},50)}}),n.jsx(i.Box,e.__assign({ref:Le,onScroll:Rt,sx:{flex:1,minHeight:0,pt:1.5,pb:1,px:3,display:"flex",justifyContent:"center",alignItems:"flex-start",bgcolor:"#FFFFFF",overflowY:Z?"hidden":"auto",borderTop:Ln&&Hn?"none":"1.5px solid #EEF0F4"}},{children:n.jsx(i.Box,e.__assign({sx:e.__assign({display:"flex",flexDirection:"column",width:"100%",maxWidth:"1200px"},Z?{flex:1,minHeight:0}:{})},{children:n.jsxs(i.Box,e.__assign({ref:tt,sx:e.__assign({display:"grid",gridTemplateColumns:"minmax(0, 1fr) 180px minmax(0, 1fr)",gap:"10px",maxWidth:"1200px",width:"100%",position:"relative",minHeight:0},Z?{flex:1,overflow:"visible"}:{})},{children:[n.jsxs("svg",e.__assign({ref:Ee,style:{position:"absolute",top:0,left:0,width:ke.width||"100%",height:ke.height||"100%",pointerEvents:"none",zIndex:10,overflow:"visible",transition:"opacity 0.15s ease-in-out"}},{children:[dt&&!ae&&n.jsx("g",{children:n.jsx("line",{x1:dt.x1,y1:dt.y,x2:dt.x2,y2:dt.y,stroke:zn.badgeBorder,strokeWidth:"1.5"})}),st.map(function(t){var r,s=t.x1+.5*(t.x2-t.x1),a=(t.y1+t.y2)/2;if("Not Defined"===t.style.label&&!t.hasCognitive)return null;var d=!1;if(t.isSubSection)d=ae&&he===t.subSectionKeyPath&&ge;else{var v=xn[t.sectionIdx];(Z?!(null===(r=null==v?void 0:v.refIndexes)||void 0===r?void 0:r.length)||(null==v?void 0:v.selfIndex)<0:!_n[t.sectionIdx])||(d=ae&&he===t.sectionIdx&&ge)}if(d)return n.jsxs("g",e.__assign({style:{transition:"opacity 0.2s"}},{children:[n.jsx("defs",{children:n.jsx("marker",e.__assign({id:"arr-".concat(t.id),markerWidth:"7",markerHeight:"5",refX:"7",refY:"2.5",orient:"auto"},{children:n.jsx("polygon",{points:"0 0, 7 2.5, 0 5",fill:t.style.badgeBorder||"#6366F1"})}))}),n.jsx("line",{ref:ot,x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2,stroke:t.style.badgeBorder||"#6366F1",strokeWidth:"1.5",markerEnd:"url(#arr-".concat(t.id,")")})]}),t.id);if(!Z){var f=t.isSubSection?c.getBentArrowPath(t.x1,t.y1,t.x2,t.y2):"M ".concat(t.x1," ").concat(t.y1," L ").concat(t.x2," ").concat(t.y2);return n.jsxs("g",{children:[n.jsx("path",{d:f,fill:"none",stroke:t.style.badgeBorder||"#E2E8F0",strokeWidth:"1.5"}),n.jsx("foreignObject",e.__assign({x:s-100,y:a-14,width:"200",height:"28",style:{pointerEvents:"auto",overflow:"visible"}},{children:n.jsx(i.Box,e.__assign({sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"}},{children:n.jsxs(i.Box,e.__assign({onClick:function(n){if(n.stopPropagation(),Xe.open&&nn===t.id)ln();else{var i=xn[t.sectionIdx]||{title:"",content:""},o=_n[t.sectionIdx]||{title:"",content:""};if(t.isSubSection&&t.subSectionKeyPath){for(var l=t.subSectionKeyPath.split(c.DEVIATION_BADGE_SEPARATOR)[2].split("-").map(Number),r=xn[l[0]],s=_n[l[0]],u=(null==r?void 0:r.title)||"",a=(null==s?void 0:s.title)||"",d=1;d<l.length;d++)(null==r?void 0:r.subsections)&&(r=r.subsections[l[d]]),(null==s?void 0:s.subsections)&&(s=s.subsections[l[d]]);r&&(i=e.__assign(e.__assign({},r),{title:u||r.title})),s&&(o=e.__assign(e.__assign({},s),{title:a||s.title}))}tn(t.id),Zn(Qn(n.currentTarget,i,o,t.sectionIdx,t.style))}},sx:{display:"inline-flex",alignItems:"center",gap:"4px",fontSize:"11px",bgcolor:t.style.badgeBg,color:t.style.badgeText,border:"1px solid ".concat(t.style.badgeBorder),borderRadius:"12px",px:1.5,py:.5,fontWeight:600,textAlign:"center",whiteSpace:"nowrap",cursor:"pointer"}},{children:[t.style.badgeText===u.DEFAULT_DEVIAION_COLOR&&null==t.style.label?n.jsx(g.default,{color:t.style.badgeText}):0===t.style.label?"Same":t.style.label,n.jsx(i.Box,e.__assign({component:"span",sx:{width:14,height:14,display:"flex",alignItems:"center","& svg":{width:"14px",height:"14px"}}},{children:n.jsx(l.ButtonCognitiveIcon,{})})),n.jsx(o.ChevronDown,{size:11,style:{transform:Xe.open&&nn===t.id?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.25s ease"}})]}))}))}))]},t.id)}return null}),Se.map(function(t){var i,o=t.pathD,l=(null===(i=t.style)||void 0===i?void 0:i.badgeBorder)||"#6366F1",r="conn-marker-".concat(t.id),c="".concat(t.id,"-bg"),s="".concat(t.id,"-stroke");return n.jsxs("g",{children:[n.jsx("defs",{children:n.jsx("clipPath",e.__assign({id:"connections-clip"},{children:n.jsx("marker",e.__assign({id:r,markerWidth:"8",markerHeight:"6",refX:"7",refY:"3",orient:"auto"},{children:n.jsx("polygon",{points:"0 0, 8 3, 0 6",fill:l})}))}))}),n.jsx("path",{ref:function(e){Be.current[c]=e},d:o,fill:"none",stroke:"#FFFFFF",strokeWidth:"4",strokeOpacity:"0.7"}),n.jsx("path",{ref:function(e){Be.current[s]=e},d:o,fill:"none",stroke:l,strokeWidth:"1.75",markerEnd:"url(#".concat(r,")")})]},t.id)})]})),n.jsxs(i.Box,e.__assign({sx:e.__assign({border:"1px solid #E7E7E9",borderRadius:"8px",bgcolor:"#FFFFFF",display:"flex",flexDirection:"column",position:"relative",zIndex:2,filter:"drop-shadow(0px 2px 4px #F2F2F2)"},Z?{flex:1,overflow:"visible"}:{})},{children:[n.jsx(i.Box,e.__assign({ref:lt,sx:{p:"8px",bgcolor:"#F7F8FA",borderBottom:"1px solid #E7E7E9",borderRadius:"8px 8px 0 0",display:"flex",alignItems:"center",minHeight:"40px",overflow:"hidden",minWidth:0}},{children:n.jsx(i.Tooltip,e.__assign({title:vn,placement:"top"},{children:n.jsx(i.Typography,e.__assign({sx:{fontSize:"16px",fontWeight:500,color:"#19213D",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",width:"100%",minWidth:0,textAlign:"left",display:"block"}},{children:vn}))}))})),n.jsxs(i.Box,e.__assign({ref:Ye,onScroll:Rt,sx:e.__assign({p:"12px",display:"flex",flexDirection:"column"},Z?{maxHeight:"calc(100vh - 150px)",flex:1,overflowY:"auto",overflowX:"hidden",minHeight:0,mr:"-160px",pr:"172px","&::-webkit-scrollbar":{display:"none"},scrollbarWidth:"none"}:{})},{children:[n.jsx("div",{ref:ze,style:{width:"100%",height:"0px",flexShrink:0}}),Sn&&xn.map(function(t,l){var r,s,u=!t.title&&!t.content;if(Z&&u)return null;var a=t,d=ft(l),v=Z?!(null===(r=a.refIndexes)||void 0===r?void 0:r.length)||a.selfIndex<0:!_n[l],f=Z?"number"==typeof a.selfIndex&&a.selfIndex>=0?a.selfIndex+1:null:l+1,p=Re.has(l),h=c.extractDeviationScore(a.evaluationResult,null==d?void 0:d.deviationLabel);return n.jsx(i.Box,e.__assign({ref:Nn(l),sx:{mb:1,width:"100%"}},{children:n.jsxs(i.Box,e.__assign({sx:{position:"relative",width:"100%"}},{children:[n.jsx(i.Box,e.__assign({ref:Tn.current[l],sx:e.__assign({width:"100%",display:"flex"},p&&{borderRadius:"6px",outline:"2px solid ".concat((null==d?void 0:d.badgeBorder)||"#6366F1"),outlineOffset:"1px"})},{children:n.jsx(R.default,{section:t,idx:l,columnKey:"left",colRef:Nn("left-accordion-".concat(l)),mb:0,parentNodeId:(null===(s=null==H?void 0:H.input_index_map)||void 0===s?void 0:s[0])||"",isExpanded:Z?!!Kn["left-".concat(l)]:!!Kn[String(l)],onToggle:function(){return Jn(l,"left")},navigation:t.id?At[t.id]:null,showOpenNodeRef:Et,resolvedMarkdownStyles:Me,maintainRelativeOrder:Z,renderSubSections:It})})),Z&&d&&n.jsxs(i.Box,e.__assign({ref:Cn.current[l],onClick:function(e){var n=Z?_n.find(function(e){var n;return null===(n=a.refIndexes)||void 0===n?void 0:n.includes(e.selfIndex)})||{title:"",content:""}:_n[l]||{title:"",content:""};$n(e,t,v,n,l,d)},sx:{position:"absolute",top:"18px",right:0,transform:"translateY(-50%) translateX(calc(100% + 8px))",display:"inline-flex",alignItems:"center",gap:"4px",fontSize:"11px",bgcolor:d.badgeBg,color:d.badgeText,border:"1px solid ".concat(d.badgeBorder),borderRadius:"12px",px:1.2,py:.4,fontWeight:600,cursor:"pointer",whiteSpace:"nowrap",zIndex:20,boxShadow:"0 1px 3px rgba(0,0,0,0.07)"}},{children:[null!==f&&n.jsx(i.Box,e.__assign({component:"span",sx:{fontSize:"11px",fontWeight:700,pr:.5,borderRight:"1px solid ".concat(d.badgeBorder)}},{children:f})),n.jsx(i.Box,e.__assign({component:"span",sx:{fontSize:"11px",px:.25}},{children:!Y.isLoading||null!=a.evaluationResult&&null!=a.evaluationResult?v?"No Deviation Found":"N/A"===h||"NA"===h?"N/A":0==h||null==h?"Same":"".concat(h):n.jsx(g.default,{color:d.badgeText})})),n.jsx(o.EllipsisVertical,{size:11,color:d.badgeText})]}))]}))}),"left-row-".concat(l))}),n.jsx("div",{ref:We,style:{width:"100%",height:"0px",flexShrink:0}})]}))]})),n.jsx(i.Box,e.__assign({sx:{width:"180px",display:"flex",flexDirection:"column",alignItems:"center",pt:"15px",gap:0,zIndex:20,pointerEvents:"none"}},{children:n.jsx(i.Box,e.__assign({sx:{display:"flex",justifyContent:"center",alignItems:"center",mt:0}},{children:n.jsxs(i.Box,e.__assign({sx:{display:"inline-flex",alignItems:"center",gap:"5px",px:1.5,py:"5px",borderRadius:"20px",bgcolor:zn.badgeBg,color:zn.badgeText,border:"1px solid ".concat(zn.badgeBorder),fontSize:"12px",fontWeight:600,whiteSpace:"nowrap",position:"relative",zIndex:1,pointerEvents:"auto",cursor:"pointer"}},{children:[null!=qn?qn:n.jsx(g.default,{}),n.jsx(i.Box,e.__assign({component:"span",onClick:function(n){n.stopPropagation(),Xe.open&&nn===Vn?ln():(tn(Vn),Zn(Qn(n.currentTarget,{title:"",content:"",evaluationResult:Gn,cognitiveData:{section_id:"",decisioning:[],gap:[],relevance_score:0,isMissingRationale:!0}},null,Vn,!0,e.__assign(e.__assign({},zn),{label:""}))))},sx:{width:14,height:14,display:"flex",alignItems:"center","& svg":{width:"14px",height:"14px"}}},{children:n.jsx(l.ButtonCognitiveIcon,{})})),n.jsx(o.ChevronDown,{size:11,style:{transform:Xe.open&&nn===Vn?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.25s ease"}})]}))}))})),n.jsxs(i.Box,e.__assign({sx:e.__assign({border:"1px solid #E3E6EA",borderRadius:"8px",bgcolor:"#FFFFFF",boxShadow:"0px 1px 4px #F7F4FE",position:"relative",zIndex:2,display:"flex",flexDirection:"column",minWidth:0},Z?{flex:1,overflow:"visible",minHeight:0}:{})},{children:[oe&&n.jsx(r.default,{sections:11}),n.jsx(i.Box,e.__assign({ref:rt,sx:{p:"8px",bgcolor:"#F7F8FA",borderBottom:"1px solid #E3E6EA",borderRadius:"8px 8px 0 0",minHeight:"40px",display:"flex",alignItems:"center",overflowX:"hidden"}},{children:n.jsx(i.Tooltip,e.__assign({title:gn,placement:"top"},{children:n.jsx(i.Typography,e.__assign({sx:{fontSize:"16px",fontWeight:500,color:"#5928ED",overflow:"hidden",display:"flex",justifyContent:"center",alignItems:"center",textOverflow:"ellipsis",whiteSpace:"normal",width:"100%",height:"40px"}},{children:gn}))}))})),n.jsxs(i.Box,e.__assign({ref:Ve,onScroll:Rt,sx:e.__assign({p:"12px",display:"flex",flexDirection:"column"},Z?{maxHeight:"calc(100vh - 150px)",flex:1,overflowY:"auto",overflowX:"hidden",minHeight:0,ml:"-25px",pl:"45px","&::-webkit-scrollbar":{display:"none"},scrollbarWidth:"none"}:{})},{children:[n.jsx("div",{ref:Ge,style:{width:"100%",height:"0px",flexShrink:0}}),Sn&&_n.map(function(t,o){var l,r=t,c=[],s=!1,u=null;if(Z){c=xn.filter(function(e){var n;return(null===(n=e.refIndexes)||void 0===n?void 0:n.includes(r.selfIndex))&&e.selfIndex>=0}).map(function(e){return e.selfIndex+1});var a=xn.findIndex(function(e,n){var t;return Re.has(n)&&(null===(t=e.refIndexes)||void 0===t?void 0:t.includes(r.selfIndex))});(s=-1!==a)&&(u=ft(a))}else c=[o+1],(s=Re.has(o))&&(u=ft(o));var d=ft(o);return n.jsx(i.Box,e.__assign({ref:On.current[o],sx:{mb:1,width:"100%"}},{children:n.jsxs(i.Box,e.__assign({sx:{position:"relative",width:"100%"}},{children:[n.jsx(i.Box,e.__assign({ref:Bn.current[o],sx:e.__assign({width:"100%",display:"flex"},s&&u&&{borderRadius:"6px",outline:"2px solid ".concat(u.badgeBorder),outlineOffset:"1px"})},{children:n.jsx(R.default,{section:t,idx:o,columnKey:"right",colRef:Nn("right-accordion-".concat(o)),mb:0,parentNodeId:(null===(l=null==H?void 0:H.input_index_map)||void 0===l?void 0:l[1])||"",isExpanded:Z?!!Kn["right-".concat(o)]:!!Kn[String(o)],onToggle:function(){return Jn(o,"right")},navigation:t.id?At[t.id]:null,showOpenNodeRef:Et,resolvedMarkdownStyles:Me,maintainRelativeOrder:Z,renderSubSections:It})})),Z&&!oe&&d&&n.jsx(i.Box,e.__assign({ref:Dn.current[o],"data-section-id":r.id,sx:{position:"absolute",top:"18px",left:0,transform:"translateY(-50%) translateX(calc(-100% - 8px))",display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:"11px",bgcolor:d.badgeBg,color:d.badgeText,border:"1px solid ".concat(d.badgeBorder),borderRadius:"10px",px:1,py:.3,fontWeight:700,whiteSpace:"nowrap",zIndex:20}},{children:c.length>0?c.join(", "):"-"}))]}))}),"right-row-".concat(o))}),n.jsx("div",{ref:qe,style:{width:"100%",height:"0px",flexShrink:0}})]}))]}))]}))}))}))]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),i=require("react"),t=require("@mui/material"),o=require("lucide-react"),r=require("../../assests/svg/ButtonCognitiveIcon.js"),l=require("./OverlayComponent.js"),s=require("./CognitiveComparehelpers.js"),u=require("./CognitiveCompareConfig.js"),a=require("./CognitiveCompareConstants.js"),d=require("./CognitivePopup.js"),c=require("./MoreFunctionsPopup.js"),v=require("./LoaderComponent.js"),f=require("./components/ThreeDotsLoader.js"),p=require("./hooks/useCompareData.js"),g=require("./hooks/useComparePopups.js"),h=require("./hooks/useSectionRefs.js"),m=require("./hooks/useAccordionState.js"),S=require("./hooks/useDeviationNavigation.js"),R=require("./components/CompareHeader.js"),x=require("./components/SubSectionAccordion.js"),_=require("./components/LHSSectionRow.js"),y=require("./components/RHSSectionRow.js"),b=require("./components/CognitiveSummaryPopup.js"),C=require("./CompareContext.js"),E=require("./hooks/useStyles.js"),A=require("./hooks/useResizeHandler.js"),B=require("./hooks/useLinesCalculator.js"),T=require("./hooks/useSideBySide.js"),w=require("./components/SvgConnectors.js");exports.SHARED_MARKDOWN_STYLES=u.SHARED_MARKDOWN_STYLES,exports.default=function(I){var D,O,F,j,P,N,k,L,q,M,H,V,z,G,W,K,U,Y,X,$,J,Q,Z,ee,ne,ie,te,oe,re,le,se,ue,ae,de,ce=I.componentHeaderText,ve=void 0===ce?a.DEFAULT_COMPONENT_HEADER_TEXT:ce,fe=I.treeData,pe=I.comparisonConfig,ge=I.leftColumnTitleText,he=I.rightColumnTitleText,me=I.markdownStyles,Se=I.resetTrigger,Re=I.displayConfig,xe=void 0===Re?{isHeaderVisible:!0,isToggleVisible:!0,maintainRelativeOrder:!1,isLoading:!0,showDeviationBadges:!1,enableDeviationSchemaBackwardCompatibility:!1,displayEmailNotifier:!0,expandAllSections:!1,expandLevels:1}:Re,_e=I.popupConfig,ye=I.deviationData,be=void 0===ye?{}:ye,Ce=I.deviationNodeIdToView,Ee=I.resetDeviationNodeId,Ae=I.isProposingFix,Be=void 0!==Ae&&Ae,Te=I.proposingFixNodeId,we=I.isRedlineFlow,Ie=i.useState(xe.maintainRelativeOrder),De=Ie[0],Oe=Ie[1];null==xe||xe.expandAllSections;var Fe=!!De||!!(null==xe?void 0:xe.showDeviationBadges),je=i.useState(!1),Pe=je[0],Ne=je[1],ke=i.useState(null),Le=ke[0],qe=ke[1],Me=i.useState(null===(O=null!==(D=null==fe?void 0:fe.newEvaluationResult)&&void 0!==D?D:null==xe?void 0:xe.enableDeviationSchemaBackwardCompatibility)||void 0===O||O)[0],He=i.useState(new Set),Ve=He[0],ze=He[1],Ge=i.useState([]),We=Ge[0],Ke=Ge[1],Ue=i.useRef(null),Ye=i.useRef(null),Xe=i.useRef(null),$e=i.useRef(null),Je=i.useRef(null),Qe=i.useRef(!1),Ze=i.useRef(null),en=i.useRef({}),nn=i.useRef([]),tn=i.useRef(function(){}),on=i.useRef(null),rn=i.useRef(function(){}),ln=i.useMemo(function(){return(null==fe?void 0:fe.cognitive_decisioning)||{}},[fe]),sn=i.useMemo(function(){return e.__assign(e.__assign({},u.SHARED_MARKDOWN_STYLES),me)},[me]),un=i.useRef(null),an=i.useRef(null),dn=i.useRef(null),cn=i.useRef(null),vn=i.useRef(null),fn=i.useRef(null),pn=i.useRef(null),gn=i.useRef(null),hn=i.useRef(null),mn=i.useRef(null),Sn=g.useComparePopups(un),Rn=Sn.cognitivePopup,xn=Sn.setCognitivePopup,_n=Sn.moreFunctions,yn=Sn.setMoreFunctions,bn=Sn.position,Cn=Sn.setPosition,En=Sn.activeBadgeId,An=Sn.summaryPopup,Bn=Sn.setSummaryPopup,Tn=Sn.closeSummaryPopup,wn=Sn.setActiveBadgeId,In=Sn.popupRef,Dn=Sn.handleOpenCognitiveCompare,On=Sn.openCognitivePopupFromState,Fn=Sn.closeCognitivePopup,jn=Sn.closeMoreFunctionsPopup,Pn=i.useMemo(function(){var e,n,i,t,o,r,l;return{fields:null!==(e=null==pe?void 0:pe.fields)&&void 0!==e?e:u.DEFAULT_FIELD_CONFIG,thresholds:{high:null!==(i=null===(n=null==pe?void 0:pe.thresholds)||void 0===n?void 0:n.high)&&void 0!==i?i:u.DEFAULT_COMPARISON_CONFIG.thresholds.high,medium:null!==(o=null===(t=null==pe?void 0:pe.thresholds)||void 0===t?void 0:t.medium)&&void 0!==o?o:u.DEFAULT_COMPARISON_CONFIG.thresholds.medium,exact:null!==(l=null===(r=null==pe?void 0:pe.thresholds)||void 0===r?void 0:r.exact)&&void 0!==l?l:u.DEFAULT_COMPARISON_CONFIG.thresholds.exact}}},[pe]),Nn=i.useState(null),kn=Nn[0];Nn[1];var Ln=null===(P=null===(F=null==fe?void 0:fe.documents)||void 0===F?void 0:F[null===(j=null==fe?void 0:fe.input_index_map)||void 0===j?void 0:j[0]])||void 0===P?void 0:P.title,qn=null===(L=null===(N=null==fe?void 0:fe.documents)||void 0===N?void 0:N[null===(k=null==fe?void 0:fe.input_index_map)||void 0===k?void 0:k[1]])||void 0===L?void 0:L.title,Mn=s.safeStringify(ge||Ln||"Uploaded Contract"),Hn=null===(V=null===(H=null===(q=null==fe?void 0:fe.documents)||void 0===q?void 0:q[null===(M=null==fe?void 0:fe.input_index_map)||void 0===M?void 0:M[0]])||void 0===H?void 0:H.metadata)||void 0===V?void 0:V.file_name,Vn=s.safeStringify(Hn),zn=null===(K=null===(W=null===(z=null==fe?void 0:fe.documents)||void 0===z?void 0:z[null===(G=null==fe?void 0:fe.input_index_map)||void 0===G?void 0:G[1]])||void 0===W?void 0:W.metadata)||void 0===K?void 0:K.file_name,Gn=s.safeStringify(zn),Wn=s.safeStringify(he||qn||"Reference Template"),Kn=p.useCognitiveTreeData(fe,De,be,Pn,Me),Un=Kn.activeProposed,Yn=Kn.existingRule,Xn=Kn.proposedSections,$n=Kn.existingSections,Jn=Kn.visibleFields,Qn=Kn.parentDeviationRecord,Zn=Kn.deviationNumberRegistry,ei=Kn.parseError;i.useEffect(function(){ei&&qe("Failed to load comparison: ".concat(ei))},[ei]);var ni=Xn.length>0||$n.length>0,ii=i.useMemo(function(){if(!we)return"off";var e=0,n=0,i=function(t){Array.isArray(t)&&t.forEach(function(t){var o,r=(null==t?void 0:t.content)||"";s.hasMeaningfulRedlineTags(r)&&(e+=1,n+=String(r).length),(null===(o=null==t?void 0:t.subsections)||void 0===o?void 0:o.length)&&i(t.subsections)})};return i(Xn),i($n),"".concat(e,":").concat(n)},[we,Xn,$n]),ti=h.useSectionRefs(Jn.map(function(e){return e.key}),Math.max(Xn.length,$n.length)),oi=ti.leftRefs,ri=ti.rightRefs,li=ti.sectionLeftRefs,si=ti.sectionRightRefs,ui=ti.lhsBadgeRefs,ai=ti.rhsBadgeRefs,di=ti.sectionRightRowRefs,ci=ti.subSectionLeftRefs,vi=ti.subSectionRightRefs,fi=ti.sectionRowRefs,pi=ti.getSectionRowRef,gi=ti.getSubSectionRef,hi=ti.getBadgeRef,mi=T.useSideBySide({maintainRelativeOrder:De,proposedSections:Xn,existingSections:$n,leftContainerRef:gn,rightContainerRef:dn,scrollContainerRef:un,sectionLeftRefs:li,sectionRightRefs:si,subSectionLeftRefs:ci,subSectionRightRefs:vi,lhsBadgeRefs:ui,rhsBadgeRefs:ai,sectionRowRefs:fi,sectionRightRowRefs:di,rhsTopSpacerRef:cn,rhsBottomSpacerRef:vn,lhsTopSpacerRef:fn,lhsBottomSpacerRef:pn,calculateLinesRef:tn,setConnectedSections:ze,setConnectedLines:Ke,cachedConnectedPositions:nn,closeMoreFunctionsPopup:jn,setErrorToast:qe,moreFunctions:_n,closeSummaryPopup:Tn}),Si=mi.isSideBySide,Ri=mi.isArrowVisible,xi=mi.setIsArrowVisible,_i=mi.isResizing,yi=mi.setIsResizing,bi=mi.isSideBySideLoading,Ci=mi.activeSideBySideSection,Ei=mi.scrollLock,Ai=mi.sideBySideCacheRef,Bi=mi.isSideBySideRef,Ti=mi.activeSideBySideRightSectionRef,wi=mi.activeSideBySideSectionRef,Ii=mi.sideBySideLineRef,Di=mi.highlightedClauseRefs,Oi=mi.clearClauseHighlight,Fi=mi.applyAlignmentPadding,ji=mi.resetSideBySide,Pi=mi.activateSideBySide,Ni=m.useAccordionState({maintainRelativeOrder:!!De,proposedSections:Xn,existingSections:$n,activeSideBySideSection:Ci,connectedSections:Ve,resetSideBySide:ji,setConnectedSections:ze,setConnectedLines:Ke,cachedConnectedPositions:nn,svgContainerRef:Ue,isAnimatingRef:Qe,animationTimerRef:Ze,calculateLinesRef:tn,sectionLeftRefs:li,sectionRightRefs:si,subSectionLeftRefs:ci,subSectionRightRefs:vi}),ki=Ni.expandedSections,Li=Ni.setExpandedSections,qi=Ni.expandedSubSections,Mi=Ni.setExpandedSubSections,Hi=Ni.handleSubSectionToggle,Vi=Ni.toggleSection;i.useEffect(function(){we&&"off"!==ii&&"0:0"!==ii&&(Ai.current=null,nn.current=[],requestAnimationFrame(function(){var e;null===(e=tn.current)||void 0===e||e.call(tn)}))},[we,ii]);var zi=i.useMemo(function(){var e=new Map,n=new Map,i=1;if(De)Xn.forEach(function(n){!n.title&&!n.content||n.id&&e.set(n.id,i++)}),$n.forEach(function(t){if(t.id){var o=Xn.filter(function(e){var n;return null===(n=e.refIndexes)||void 0===n?void 0:n.includes(t.selfIndex)});if(o.length>0){var r=o.map(function(n){return e.get(n.id)}).filter(Boolean);n.set(t.id,r.join(", "))}else n.set(t.id,String(i++))}});else for(var t=Math.max(Xn.length,$n.length),o=0;o<t;o++){var r=Xn[o],l=$n[o];r?(e.set(r.id,i),l&&n.set(l.id,String(i)),i++):l&&n.set(l.id,String(i++))}return{leftNums:e,rightNums:n}},[Xn,$n,De]),Gi=Yn.analysis,Wi=s.safeStringify(null===(Y=null===(U=null==Gi?void 0:Gi.rule_difference_comparison)||void 0===U?void 0:U.summary)||void 0===Y?void 0:Y.overall_summary),Ki=!!Wi.match(/<ai_reasoning>([\s\S]*?)<\/ai_reasoning>/i),Ui=null!==(X=null==fe?void 0:fe.base_root_id)&&void 0!==X?X:"-1";null==fe||fe[Ui];var Yi=Me?null!==(se=null!==(oe=be&&(null===(te=null==be?void 0:be[Ui])||void 0===te?void 0:te.evaluation_result))&&void 0!==oe?oe:null===(le=null===(re=null==fe?void 0:fe.nodes)||void 0===re?void 0:re[Ui])||void 0===le?void 0:le.evaluation_result)&&void 0!==se?se:null:null!==(ie=null!==(Q=be&&(null===(J=null===($=null==be?void 0:be[Ui])||void 0===$?void 0:$.evaluation_result)||void 0===J?void 0:J[0]))&&void 0!==Q?Q:null===(ne=null===(ee=null===(Z=null==fe?void 0:fe.nodes)||void 0===Z?void 0:Z[Ui])||void 0===ee?void 0:ee.evaluation_result)||void 0===ne?void 0:ne[0])&&void 0!==ie?ie:null,Xi=s.extractDeviationScore(Yi),$i=s.generateColorPalette(null!==(de=null===(ae=null===(ue=null==Yi?void 0:Yi.evaluation_outputs)||void 0===ue?void 0:ue.metadata)||void 0===ae?void 0:ae.label_color)&&void 0!==de?de:a.DEFAULT_DEVIAION_COLOR),Ji=i.useMemo(function(){return(null==xe?void 0:xe.badgeStyleOverride)?xe.badgeStyleOverride(Xi):null},[null==xe?void 0:xe.badgeStyleOverride,Xi]),Qi=i.useMemo(function(){return Ji?e.__assign(e.__assign({},$i),{badgeBg:Ji.bg,badgeText:Ji.text,badgeBorder:Ji.border}):$i},[$i,Ji]),Zi=i.useCallback(function(){Oi(),ji(),ze(new Set),Ke([]),nn.current=[],pt([]),ht(null),Bn(a.EMPTY_SUMMARY_POPUP_STATE),Fn(),requestAnimationFrame(function(){var e;null===(e=tn.current)||void 0===e||e.call(tn)})},[]),et=i.useRef(Zi);i.useEffect(function(){et.current=Zi},[Zi]),i.useEffect(function(){Se&&et.current()},[Se]);var nt=i.useCallback(function(n,i,t,o,r,l,u){var a,d,c,v=s.safeStringify(null==i?void 0:i.id)||s.safeStringify(null==t?void 0:t.id)||"",f=(v?ln[v]:null)||(null==i?void 0:i.cognitiveData)||(null==t?void 0:t.cognitiveData)||{section_id:v,decisioning:[],gap:[],relevance_score:0},p=null!==(d=null===(a=fi.current[o])||void 0===a?void 0:a.current)&&void 0!==d?d:null;return{isLoading:null!==(c=null==xe?void 0:xe.isLoading)&&void 0!==c&&c,open:!0,sectionTitle:(null==i?void 0:i.title)?null==i?void 0:i.title:"No Counterpart",refSectionTitle:(null==t?void 0:t.title)?null==t?void 0:t.title:"No Counterpart",cognitiveData:f,anchorEl:n,sectionAnchorEl:p,badgeStyle:l||null,sectionIdx:o,docData:{documents:null==fe?void 0:fe.documents,input_index_map:null==fe?void 0:fe.input_index_map},deviationData:function(){var n,r,l=(null==i?void 0:i.evaluationResult)||(null==t?void 0:t.evaluationResult)||null,u=function(n){var i=function(e){if(!e||"object"!=typeof e)return null;var n=null==e?void 0:e.deviation_entries;if(n&&"object"==typeof n){var i=Object.keys(n).sort(function(e,n){return Number(e)-Number(n)})[0];if(i&&n[i])return n[i]}var t=Object.keys(e).filter(function(e){return/^\d+$/.test(e)}).sort(function(e,n){return Number(e)-Number(n)});if(t.length&&e[t[0]])return e[t[0]];var o=null==e?void 0:e.deviations;if(o&&"object"==typeof o){var r=Object.keys(o).sort(function(e,n){return Number(e)-Number(n)})[0];if(r&&o[r])return o[r]}return null}(n);return i?e.__assign(e.__assign({},n),{deviation_summary:(null==n?void 0:n.deviation_summary)||(null==i?void 0:i.deviation_summary),deviation_title:(null==n?void 0:n.deviation_title)||(null==i?void 0:i.deviation_title),deviation_impact:(null==n?void 0:n.deviation_impact)||(null==i?void 0:i.deviation_impact),deviation_explanation:(null==n?void 0:n.deviation_explanation)||(null==i?void 0:i.deviation_explanation),evaluation_outputs:(null==n?void 0:n.evaluation_outputs)||(null==i?void 0:i.evaluation_outputs),cognitive_decisioning:(null==n?void 0:n.cognitive_decisioning)||(null==i?void 0:i.cognitive_decisioning)}):n};if(!("string"==typeof o&&o.includes(s.DEVIATION_BADGE_SEPARATOR)))return u(l);var a=o.split(s.DEVIATION_BADGE_SEPARATOR)[1];if(!a)return l;var d=(null==i?void 0:i.evaluationResult)||(null==t?void 0:t.evaluationResult)||{},c=(null===(n=null==d?void 0:d.deviation_entries)||void 0===n?void 0:n[a])||(null===(r=null==d?void 0:d.deviations)||void 0===r?void 0:r[a])||null;return c?e.__assign(e.__assign(e.__assign({},d),c),{deviation_summary:(null==c?void 0:c.deviation_summary)||(null==d?void 0:d.deviation_summary),deviation_title:(null==c?void 0:c.deviation_title)||(null==d?void 0:d.deviation_title),deviation_impact:(null==c?void 0:c.deviation_impact)||(null==d?void 0:d.deviation_impact),deviation_explanation:(null==c?void 0:c.deviation_explanation)||(null==d?void 0:d.deviation_explanation),evaluation_outputs:(null==c?void 0:c.evaluation_outputs)||(null==d?void 0:d.evaluation_outputs),cognitive_decisioning:(null==c?void 0:c.cognitive_decisioning)||(null==d?void 0:d.cognitive_decisioning)}):u(l)}(),isOrphan:!!r}},[ln,fe]),it=i.useCallback(function(){var e=_n.sectionIdx,n=_n.isOrphan;jn(),Tn(),null!==e&&(n?qe("No counterpart exists to connect to."):(Oi(),Bi.current&&ji(),Ke([]),nn.current=[],ze(function(n){return n.has(e)?new Set:new Set([e])}),setTimeout(function(){tn.current&&tn.current()},50)))},[_n.sectionIdx,_n.isOrphan,jn,Tn,ji]),tt=i.useCallback(function(){var e=Je.current;if(e){Je.current=null;var n=Xn.findIndex(function(n){return n.id===e}),i=$n.findIndex(function(n){return n.id===e}),t=-1===n?s.findKeyPathByNodeId(Xn,e):null,o=-1===i?s.findKeyPathByNodeId($n,e):null,r=-1!==n?n:t?Number(t.split("-")[0]):-1,l=-1!==i?i:o?Number(o.split("-")[0]):-1,u=function(e,n,i,t){var o,r,l,s;return-1!==e?null!==(r=null===(o=i.current[e])||void 0===o?void 0:o.current)&&void 0!==r?r:null:n&&null!==(s=null===(l=t.current[n])||void 0===l?void 0:l.current)&&void 0!==s?s:null},a=function(e,n,i){void 0===i&&(i=30);var t=0,o=function(){var r=e();r&&0!==r.getBoundingClientRect().height?(Di.current.add(r),s.scrollAndHighlightClause(r,n)):t++<i&&requestAnimationFrame(o)};requestAnimationFrame(o)};if(De)-1!==r&&gn.current&&a(function(){return u(n,t,li,ci)},gn.current),-1!==l&&dn.current&&a(function(){return u(i,o,si,vi)},dn.current);else{var d=un.current;if(!d)return;a(function(){return-1!==r?u(n,t,li,ci):u(i,o,si,vi)},d)}}},[Xn,$n,De,li,si,ci,vi,gn,dn,un]),ot=i.useCallback(function(n){if(n){Oi(),ji(),ze(new Set),Ke([]),nn.current=[],Tn(),Fn();var i=Xn.findIndex(function(e){return e.id===n}),t=$n.findIndex(function(e){return e.id===n}),o=-1===i?s.findKeyPathByNodeId(Xn,n):null,r=-1===t?s.findKeyPathByNodeId($n,n):null;if(-1!==i||o||-1!==t||r){var l=-1!==i?i:o?Number(o.split("-")[0]):-1,u=-1!==t?t:r?Number(r.split("-")[0]):-1;Je.current=n,Li(function(n){var i,t=e.__assign({},n),o=!1;-1!==l&&(t[i=De?"left-".concat(l):String(l)]||(t[i]=!0,o=!0));-1!==u&&(t[i=De?"right-".concat(u):String(u)]||(t[i]=!0,o=!0));return o?t:n}),Mi(function(n){var i=e.__assign({},n),t=!1,l=function(e){for(var n=e.split("-"),o=n[0],r=1;r<n.length;r++)o+="-".concat(n[r]),i[o]||(i[o]=!0,t=!0)};return o&&l(o),r&&l(r),t?i:n}),setTimeout(function(){requestAnimationFrame(function(){Je.current===n&&rt.current()})},50)}else console.warn('scrollToAndHighlightClause: nodeId "'.concat(n,'" not found'))}},[Xn,$n,De,Li,Mi,ji,Tn,Fn]),rt=i.useRef(tt);i.useEffect(function(){rt.current=tt},[tt]);var lt=i.useRef(null);i.useEffect(function(){if(kn){var e=Pn.fields.find(function(e){return e.analysisKey===kn||e.key===kn});if(e){var n=oi.current[e.key]||ri.current[e.key];(null==n?void 0:n.current)&&setTimeout(function(){return n.current.scrollIntoView({behavior:"smooth",block:"center"})},150)}}},[kn,Pn.fields]);var st=i.useCallback(function(e){var n,i,t,o,r,l,s,u,a,d=null===(n=null==Gi?void 0:Gi.rule_difference_comparison)||void 0===n?void 0:n.fields;if(!d||!d[e])return{score:0,relation:"",highlightsA:[],highlightsB:[],hasContent:!1};var c=d[e],v=(null==c?void 0:c.relation)||(null===(t=null===(i=null==c?void 0:c.highlights)||void 0===i?void 0:i.ruleA_spans)||void 0===t?void 0:t.length)||(null===(r=null===(o=null==c?void 0:c.highlights)||void 0===o?void 0:o.ruleB_spans)||void 0===r?void 0:r.length)||(null==c?void 0:c.mappings)&&c.mappings.length>0;if(c.mappings){var f=c.mappings[0]||{};return{score:c.score,relation:f.relation||"",highlightsA:(null===(l=f.highlights)||void 0===l?void 0:l.ruleA_spans)||[],highlightsB:(null===(s=f.highlights)||void 0===s?void 0:s.ruleB_spans)||[],hasContent:!!v}}return{score:c.score,relation:c.relation||"",highlightsA:(null===(u=c.highlights)||void 0===u?void 0:u.ruleA_spans)||[],highlightsB:(null===(a=c.highlights)||void 0===a?void 0:a.ruleB_spans)||[],hasContent:!!v}},[Gi]),ut=E.useStyleHelpers({proposedSections:Xn,existingSections:$n,maintainRelativeOrder:De,cognitiveMap:ln,deviationData:be,treeData:fe,resolvedComparisonConfig:Pn}),at=ut.getSectionCompareStyle,dt=ut.getSubSectionCompareStyle,ct=ut.getDeviationStyleByKey,vt=B.useLinesCalculator({containerRef:Ye,leftContainerRef:gn,rightContainerRef:dn,svgContainerRef:Ue,pathRefs:en,leftHeaderRef:Xe,rightHeaderRef:$e,proposedSections:Xn,existingSections:$n,visibleFields:Jn,leftRefs:oi,rightRefs:ri,sectionLeftRefs:li,sectionRightRefs:si,subSectionLeftRefs:ci,subSectionRightRefs:vi,lhsBadgeRefs:ui,rhsBadgeRefs:ai,sectionRowRefs:fi,expandedSections:ki,expandedSubSections:qi,connectedSections:Ve,isSideBySide:Si,activeSideBySideSection:Ci,maintainRelativeOrder:De,cognitiveMap:ln,getSectionCompareStyle:at,getSubSectionCompareStyle:dt,getDeviationStyleByKey:ct,isArrowVisible:Ri,isAnimatingRef:Qe,isSideBySideRef:Bi,sideBySideCacheRef:Ai,sideBySideLineRef:Ii,activeSideBySideSectionRef:wi,activeSideBySideRightSectionRef:Ti,connectedLines:We,setConnectedLines:Ke,cachedConnectedPositions:nn,calculateLinesRef:tn,resizeTimerRef:on,scrollLock:Ei,handleResizeRef:rn,activeProposed:Un,existingRule:Yn,analysisData:Gi,pendingScrollTargetRef:hn,pendingScrollCallbackRef:mn,resolvedComparisonConfig:Pn,getFieldData:st}),ft=vt.lines,pt=vt.setLines,gt=vt.overallConnector,ht=vt.setOverallConnector,mt=vt.svgDimensions,St=vt.handleColumnScroll,Rt=i.useMemo(function(){return(null==xe?void 0:xe.badgeStyleOverride)?ft.map(function(n){var i=xe.badgeStyleOverride(null!=n.style.label?String(n.style.label):null);return i?e.__assign(e.__assign({},n),{style:e.__assign(e.__assign({},n.style),{badgeBg:i.bg,badgeText:i.text,badgeBorder:i.border})}):n}):ft},[ft,null==xe?void 0:xe.badgeStyleOverride]),xt=i.useCallback(function(){Oi(),Li({}),Mi({}),ji(),ze(new Set),Ke([]),nn.current=[],Tn(),Fn(),jn(),requestAnimationFrame(function(){tn.current&&tn.current()})},[Li,Mi,ji,Tn,Fn,jn]),_t=i.useMemo(function(){return Object.values(ki).some(Boolean)||Object.values(qi).some(Boolean)},[ki,qi]),yt=i.useRef(null),bt=i.useRef(0),Ct=i.useRef(0),Et=i.useRef(0),At=A.useResizeHandler({timerRef:yt,ruleComponentRef:an,scrollContainerRef:un,containerRef:Ye,maintainRelativeOrder:De,proposedSections:Xn,existingSections:$n,isSideBySideRef:Bi,activeSideBySideSectionRef:wi,activeSideBySideRightSectionRef:Ti,sectionRowRefs:fi,sectionRightRowRefs:di,sectionLeftRefs:li,sectionRightRefs:si,subSectionLeftRefs:ci,subSectionRightRefs:vi,lhsBadgeRefs:ui,rhsBadgeRefs:ai,leftContainerRef:gn,rightContainerRef:dn,calculateLinesRef:tn,handleResizeRef:rn,setIsResizing:yi,setIsArrowVisible:xi,sideBySideCacheRef:Ai,cachedConnectedPositions:nn}).handleResize;i.useEffect(function(){rn.current=At},[At,rn]),i.useEffect(function(){var e=function(e,n,i,t,o){n.current=e.getBoundingClientRect().width;var r=new ResizeObserver(function(e){null!==i.current&&cancelAnimationFrame(i.current),i.current=requestAnimationFrame(function(){var r,l,s;i.current=null;var u=e[e.length-1];if(u){var a=null!==(s=null===(l=null===(r=u.borderBoxSize)||void 0===r?void 0:r[0])||void 0===l?void 0:l.inlineSize)&&void 0!==s?s:u.contentRect.width;Math.abs(a-n.current)<1?o():(n.current=a,t())}})});return r.observe(e),r},n={current:null},i={current:null},t={current:null},o=[],r=[n,i,t];return an.current&&o.push(e(an.current,bt,n,function(){return rn.current()},function(){})),un.current&&o.push(e(un.current,Ct,i,function(){return rn.current()},function(){return tn.current()})),Ye.current&&o.push(e(Ye.current,Et,t,function(){return rn.current()},function(){return tn.current()})),function(){o.forEach(function(e){return e.disconnect()}),r.forEach(function(e){null!==e.current&&(cancelAnimationFrame(e.current),e.current=null)})}},[]),i.useEffect(function(){Bi.current=Si},[Si]),i.useEffect(function(){wi.current=Ci},[Ci]);var Bt=i.useCallback(function(){var e,n=_n.sectionIdx,i=_n.isOrphan;if(Tn(),null!=n){var t="left";_n.anchorEl&&(null===(e=dn.current)||void 0===e?void 0:e.contains(_n.anchorEl))&&(t="right"),Pi(n,i,{sourceSide:t})}},[Pi,_n.isOrphan,_n.sectionIdx,_n.anchorEl,Tn]),Tt=i.useCallback(function(){Tn(),ji(),ze(new Set),Ke([]),nn.current=[]},[Tn,ji]),wt=null!==_n.sectionIdx&&Ve.has(_n.sectionIdx),It=S.useDeviationNavigation({proposedSections:Xn,existingSections:$n,parentDeviationRecord:Qn,expandedSections:ki,maintainRelativeOrder:!!De,scrollContainerRef:un,leftContainerRef:gn,rightContainerRef:dn,lhsBadgeRefs:ui,rhsBadgeRefs:ai}),Dt=It.showDeviationNavigation,Ot=It.showOpenNodeRef,Ft=It.adjustScrollForPopup,jt=i.useCallback(function(e,n,i,t,o){var r,l="string"==typeof t?s.safeStringify(t).trim():s.safeStringify(null==t?void 0:t.deviation_summary).trim(),u=e.currentTarget;Fn();var a="left";(null===(r=dn.current)||void 0===r?void 0:r.contains(u))&&(a="right");var d=function(){var e,i,t,o;if("string"==typeof n&&n.includes(s.DEVIATION_BADGE_SEPARATOR)){var r=n.split(s.DEVIATION_BADGE_SEPARATOR),l="".concat(r[0]).concat(s.DEVIATION_BADGE_SEPARATOR).concat(r[1]);return"right"===a?null===(e=ai.current[l])||void 0===e?void 0:e.current:null===(i=ui.current[l])||void 0===i?void 0:i.current}return"right"===a?null===(t=ai.current[n])||void 0===t?void 0:t.current:null===(o=ui.current[n])||void 0===o?void 0:o.current},c=function(e,t){var o=!!De,r=o?"right"===a?dn.current:gn.current:un.current,l=o?"right"===a?gn.current:dn.current:null;if(r&&e){var u=function(){var e="string"==typeof n&&n.includes(s.DEVIATION_BADGE_SEPARATOR);i||!e?t():requestAnimationFrame(function(){var e,i,o;Ai.current=null,nn.current=[],Fi(!0,n,null),null===(e=tn.current)||void 0===e||e.call(tn),null===(i=gn.current)||void 0===i||i.dispatchEvent(new Event("scroll")),null===(o=dn.current)||void 0===o||o.dispatchEvent(new Event("scroll")),t()})},d=e.getBoundingClientRect(),c=r.getBoundingClientRect(),v=c.bottom-.35*c.height,f=c.top+.35*c.height;if(d.top>v||d.top<f){var p=c.top+c.height/2,g=d.top+d.height/2-p;o&&l&&s.smoothScrollTo(l,l.scrollTop+g,250,function(){}),s.smoothScrollTo(r,r.scrollTop+g,250,u)}else u()}else t()};if(i)return ji(),ze(new Set),Ke([]),nn.current=[],void(l&&requestAnimationFrame(function(){var e=d()||u;c(e,function(){Bn({open:!0,anchorEl:e,summary:t,displayImpact:o})})}));Pi(n,i,l?{toggleIfSame:!1,sourceSide:a,onReady:function(){var e=d()||u;c(e,function(){Bn({open:!0,anchorEl:e,summary:t,displayImpact:o})})}}:{toggleIfSame:!1,sourceSide:a})},[Pi,Fn,Bn,ji,De]),Pt=i.useMemo(function(){var e;if(!Ce)return null;var n=null===(e=null==Ce?void 0:Ce.id)||void 0===e?void 0:e.split(":")[0];for(var i in Qn){if((Qn[i]||[]).some(function(e){return e.id===n}))return i}return null},[Ce,Qn]),Nt=i.useRef({id:null,triggerMs:null}),kt=i.useRef(null);i.useEffect(function(){var n;if(null==Ce?void 0:Ce.id){var i=Number(Ce.trigger),t=Nt.current;if((null==t?void 0:t.triggerMs)!==i){if(!(Ce.id.includes(":")&&/:\d+$/.test(Ce.id)))return Nt.current={id:Ce.id,triggerMs:i},void ot(Ce.id);var o=null===(n=null==Ce?void 0:Ce.id)||void 0===n?void 0:n.split(":"),r=o[0],l=o[1],u=null!=l?l:"0";kt.current!==Ce.id&&(Tn(),Fn(),ji(),ze(new Set),Ke([]),nn.current=[],kt.current=Ce.id);var a=!1,d=0,c=null,v=150,f=function(e,n){for(var i=function(e,t){if(!e)return null;if(e.id===n)return t;if(!Array.isArray(e.subsections))return null;for(var o=0;o<e.subsections.length;o++){var r=i(e.subsections[o],"".concat(t,"-").concat(o));if(r)return r}return null},t=0;t<e.length;t++){var o=i(e[t],String(t));if(o)return o}return null},p=function(){var n,t,o,l;if(!a){var g=function(){Nt.current={id:Ce.id,triggerMs:i}},h=null,m=null;for(var S in Qn){var R=Qn[S].find(function(e){return e.id===r});if(R){h=S,m=R;break}}if(m&&h){var x=Xn.findIndex(function(e){return e.id===h}),_=$n.findIndex(function(e){return e.id===h}),y=-1===x&&-1!==_,b=f(Xn,m.id),C=f($n,m.id);if(b&&!C&&!y){var E=b.split("-"),A=Number(E[0]);if(De){var B=null===(t=null===(n=Xn[A])||void 0===n?void 0:n.refIndexes)||void 0===t?void 0:t[0],T=$n.findIndex(function(e){return e.selfIndex===B});-1!==T&&(A=T)}C=e.__spreadArray([A],E.slice(1),!0).join("-")}if(b||C){var w=y||!b&&!!C,I=b?Number(b.split("-")[0]):x,D=C?Number(C.split("-")[0]):_;if(w){if(!(De?!!ki["right-".concat(D)]:!!ki[String(D)])&&D>=0)return Vi(D,"right"),d+=1,void(c=setTimeout(p,450))}else if(!(De?!!ki["left-".concat(I)]:!!ki[String(I)])&&I>=0)return Vi(I,"left"),d+=1,void(c=setTimeout(p,450));var O,F=b||"",j=C||"",P="".concat(m.id).concat(s.DEVIATION_BADGE_SEPARATOR).concat(u).concat(s.DEVIATION_BADGE_SEPARATOR).concat(F).concat(s.DEVIATION_BADGE_SEPARATOR).concat(j),N="".concat(m.id).concat(s.DEVIATION_BADGE_SEPARATOR).concat(u),k=null===(o=ui.current[N])||void 0===o?void 0:o.current,L=null===(l=ai.current[N])||void 0===l?void 0:l.current,q=w||!k&&!!L,M=q?L:k;if(O=De?q?dn.current:gn.current:un.current,M&&O){var H=M.getBoundingClientRect();if(0===H.height)return void((d+=1)<2?c=setTimeout(p,v):g());var V=O.getBoundingClientRect(),z=H.top-V.top+O.scrollTop-V.height/2+H.height/2+200,G=function(){var n,i,t,o,r;if(!a){g();var l=M instanceof Element?window.getComputedStyle(M).color:"";k&&(k.style.transition="box-shadow 300ms ease-in-out",k.style.boxShadow="0 0 10px ".concat(l)),L&&(L.style.transition="box-shadow 300ms ease-in-out",L.style.boxShadow="0 0 10px ".concat(l)),setTimeout(function(){k&&(k.style.boxShadow=""),L&&(L.style.boxShadow="")},2e3);var s=(null===(i=null===(n=m.evaluationResult)||void 0===n?void 0:n.deviations)||void 0===i?void 0:i[u])||m,d=(null===(t=m.evaluationResult)||void 0===t?void 0:t.evaluation_outputs)||m.evaluation_outputs;if(!(!!k&&!!L)){var c=q?(null===(o=ai.current[N])||void 0===o?void 0:o.current)||L:(null===(r=ui.current[N])||void 0===r?void 0:r.current)||k;return Ft(c,function(){Bn({open:!0,anchorEl:c,displayImpact:Ce.displayImpact,summary:e.__assign(e.__assign({},s),{evaluation_outputs:d})})},{skipScroll:!0}),void(null==Ee||Ee())}Pi(P,!1,{toggleIfSame:!1,sourceSide:"left",onReady:function(){var n,i,t=q?(null===(n=ai.current[N])||void 0===n?void 0:n.current)||L:(null===(i=ui.current[N])||void 0===i?void 0:i.current)||k;Ft(t,function(){requestAnimationFrame(function(){var n,i,o;Ai.current=null,nn.current=[],null===(n=tn.current)||void 0===n||n.call(tn),null===(i=gn.current)||void 0===i||i.dispatchEvent(new Event("scroll")),null===(o=dn.current)||void 0===o||o.dispatchEvent(new Event("scroll")),Bn({open:!0,anchorEl:t,displayImpact:null==Ce?void 0:Ce.displayImpact,summary:e.__assign({},s)})})},{skipScroll:!0})}})}};Math.abs(O.scrollTop-z)<=2?G():(hn.current=z,mn.current=G,O.scrollTo({top:z,behavior:"smooth"}),c&&clearTimeout(c),c=setTimeout(function(){if(mn.current){hn.current=null;var e=mn.current;mn.current=null,e()}},800))}else(d+=1)<2?c=setTimeout(p,v):g()}else(d+=1)<2?c=setTimeout(p,v):g()}else(d+=1)<2?c=setTimeout(p,v):g()}};return c=setTimeout(p,v),function(){a=!0,c&&clearTimeout(c)}}}},[Ce,Qn,Xn,$n,De,ki,Vi,Pi,Bn,ot]);var Lt={maintainRelativeOrder:!!De,showDeviationBadges:Fe,isProposingFix:Be,proposingFixNodeId:Te,isRedlineFlow:we,isSideBySide:Si,activeSideBySideSection:Ci,connectedSections:Ve,proposedSections:Xn,existingSections:$n,deviationNumberRegistry:Zn,treeData:fe,displayConfig:xe,resolvedMarkdownStyles:sn,unifiedNumbering:zi,expandedSections:ki,expandedSubSections:qi,setExpandedSubSections:Mi,getSectionCompareStyle:at,getSubSectionCompareStyle:dt,getBadgeRef:hi,getSectionRowRef:pi,getSubSectionRef:gi,sectionLeftRefs:li,sectionRightRefs:si,sectionRowRefs:fi,sectionRightRowRefs:di,subSectionLeftRefs:ci,subSectionRightRefs:vi,lhsBadgeRefs:ui,rhsBadgeRefs:ai,openMoreFunctionsPopup:function(e,n,i,t,o,r){var l;if(e.stopPropagation(),_n.open&&_n.sectionIdx===o)jn();else{var u=e.currentTarget,a="left";(null===(l=dn.current)||void 0===l?void 0:l.contains(u))&&(a="right");Oi(),Bi.current&&ji(),ze(new Set),Ke([]),nn.current=[],Fn(),An.open?Tt():Tn(),requestAnimationFrame(function(){var e=function(){var e,n,i,t;if("string"==typeof o&&o.includes(s.DEVIATION_BADGE_SEPARATOR)){var r=o.split(s.DEVIATION_BADGE_SEPARATOR),l="".concat(r[0]).concat(s.DEVIATION_BADGE_SEPARATOR).concat(r[1]);return"right"===a?null===(e=ai.current[l])||void 0===e?void 0:e.current:null===(n=ui.current[l])||void 0===n?void 0:n.current}return"right"===a?null===(i=ai.current[o])||void 0===i?void 0:i.current:null===(t=ui.current[o])||void 0===t?void 0:t.current}()||u;yn(nt(e,n,t,o,i,r))})}},handleOpenSummaryPopup:jt,openSummaryPopup:jt,handleCloseSummaryPopup:Tt,toggleSection:Vi,handleSubSectionToggle:Hi,renderSubSectionAccordion:function(e){var i=e.section,t=e.keyPath,o=e.depth,r=void 0===o?0:o,l=e.columnKey,s=void 0===l?"left":l,u=e.parentNodeId,a=void 0===u?"":u,d=e.sectionOffset;return n.jsx(x.default,{section:i,keyPath:t,depth:r,columnKey:s,parentNodeId:a,sectionOffset:d})},resetSideBySide:ji,setConnectedSections:ze,setConnectedLines:Ke,cachedConnectedPositions:nn,showDeviationNavigation:Dt,showOpenNodeRef:Ot,deviationNodeIdToView:null==Ce?void 0:Ce.id,deviationTargetParentId:Pt};return n.jsx(C.CompareContextProvider,e.__assign({value:Lt},{children:n.jsxs(t.Box,e.__assign({ref:an,sx:e.__assign(e.__assign({display:"flex",flexDirection:"column",height:"100%",bgcolor:"#F6F7F9B2",fontFamily:'"Plus Jakarta Sans", sans-serif'},De?{}:{overflow:"visible"}),{position:"relative"})},{children:[Pe&&n.jsx(t.Box,e.__assign({sx:{position:"absolute",inset:0,bgcolor:"rgba(255, 255, 255, 0.6)",backdropFilter:"blur(10px)",zIndex:9999,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"8px"}},{children:n.jsx(v.default,{})})),An.open&&n.jsx(b.default,{open:An.open,anchorEl:An.anchorEl,containerEl:lt.current,clipTopEl:Xe.current,scrollContainerEl:un.current,onClose:Tt,summary:An.summary,displayImpact:An.displayImpact}),n.jsx(c.default,{open:_n.open,anchorEl:_n.anchorEl,sectionTitle:_n.sectionTitle,referenceSectionTitle:_n.refSectionTitle,onClose:jn,onOpenCognitiveCompare:Dn,onOpenSideBySide:Bt,onConnect:it,isConnected:wt,isOrphan:_n.isOrphan}),Rn.open&&n.jsx(d.default,{open:Rn.open,popupRef:In,position:bn,popupConfig:_e,onClose:function(){Cn(null),xn(function(n){return e.__assign(e.__assign({},n),{open:!1})}),wn(null)},markdownStyles:me,sectionTitle:Vn,referenceSectionTitle:Gn,cognitiveData:Rn.cognitiveData,anchorEl:Rn.anchorEl,sectionAnchorEl:Rn.sectionAnchorEl,scrollContainerEl:un.current,badgeStyle:Rn.badgeStyle,docData:Rn.docData,deviationData:Rn.deviationData,isLoading:Rn.isLoading}),n.jsx(t.Snackbar,e.__assign({open:!!Le,autoHideDuration:8e3,onClose:function(){return qe(null)},anchorOrigin:{vertical:"top",horizontal:"center"}},{children:n.jsx(t.Alert,e.__assign({onClose:function(){return qe(null)},severity:"error",sx:{width:"100%",whiteSpace:"pre-line"}},{children:Le}))})),n.jsx(R.default,{componentHeaderText:ve,displayConfig:xe,maintainRelativeOrder:De,onCollapseAll:xt,showCollapseAll:_t,onToggleView:function(e){Ne(!0),setTimeout(function(){Oe(!e),ji(),Tn(),ze(new Set),Ke([]),nn.current=[],requestAnimationFrame(function(){requestAnimationFrame(function(){setTimeout(function(){Ne(!1)},600)})})},50)}}),n.jsx(t.Box,e.__assign({ref:un,onScroll:St,sx:{flex:1,minHeight:0,pt:1.5,pb:1,px:3,display:"flex",justifyContent:"center",alignItems:"flex-start",bgcolor:"#FFFFFF",overflowY:De?"hidden":"auto",borderTop:Wi&&Ki?"none":"1.5px solid #EEF0F4"}},{children:n.jsx(t.Box,e.__assign({sx:e.__assign({display:"flex",flexDirection:"column",width:"100%",maxWidth:"1200px"},De?{flex:1,minHeight:0}:{})},{children:n.jsxs(t.Box,e.__assign({ref:Ye,sx:e.__assign({display:"grid",gridTemplateColumns:"minmax(0, 1fr) 180px minmax(0, 1fr)",gap:"60px",maxWidth:"1200px",width:"100%",position:"relative",minHeight:0},De?{flex:1,overflow:"visible"}:{})},{children:[n.jsx(w.default,{svgContainerRef:Ue,svgDimensions:mt,isResizing:_i,overallConnector:gt,rootDeviationStyle:Qi,lines:Rt,isSideBySide:Si,activeSideBySideSection:Ci,isArrowVisible:Ri,maintainRelativeOrder:De,proposedSections:Xn,existingSections:$n,cognitivePopup:Rn,activeBadgeId:En,closeCognitivePopup:Fn,setActiveBadgeId:wn,openCognitivePopupFromState:On,buildSectionPopupState:nt,connectedLines:We,pathRefs:en}),n.jsxs(t.Box,e.__assign({sx:e.__assign({border:"1px solid #E7E7E9",borderRadius:"8px",bgcolor:"#FFFFFF",display:"flex",flexDirection:"column",position:"relative",zIndex:2,filter:"drop-shadow(0px 2px 4px #F2F2F2)"},De?{flex:1,overflow:"visible"}:{})},{children:[n.jsx(t.Box,e.__assign({ref:Xe,sx:{p:"8px",bgcolor:"#F7F8FA",borderBottom:"1px solid #E7E7E9",borderRadius:"8px 8px 0 0",display:"flex",alignItems:"center",minHeight:"40px",overflow:"hidden",minWidth:0}},{children:n.jsx(t.Tooltip,e.__assign({title:Mn,placement:"top"},{children:n.jsx(t.Typography,e.__assign({sx:{fontSize:"16px",fontWeight:500,color:"#19213D",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",width:"100%",minWidth:0,textAlign:"center",display:"block"}},{children:Mn}))}))})),n.jsxs(t.Box,e.__assign({ref:gn,onScroll:St,sx:e.__assign({p:"12px",display:"flex",flexDirection:"column"},De?{maxHeight:"calc(100vh - 150px)",flex:1,overflowY:"auto",overflowX:"hidden",minHeight:0,mr:"-160px",pr:"172px","&::-webkit-scrollbar":{display:"none"},scrollbarWidth:"none"}:{})},{children:[n.jsx("div",{ref:fn,style:{width:"100%",height:"0px",flexShrink:0}}),ni&&Xn.map(function(e,i){return n.jsx(_.default,{section:e,idx:i},"left-row-".concat(i))}),n.jsx("div",{ref:pn,style:{width:"100%",height:"0px",flexShrink:0}})]}))]})),n.jsx(t.Box,e.__assign({ref:lt,sx:{width:"180px",display:"flex",flexDirection:"column",alignItems:"center",pt:"15px",gap:0,zIndex:20,pointerEvents:"none"}},{children:n.jsx(t.Box,e.__assign({sx:{display:"flex",justifyContent:"center",alignItems:"center",mt:0}},{children:n.jsxs(t.Box,e.__assign({onClick:function(n){n.stopPropagation(),Rn.open&&En===Ui?Fn():(wn(Ui),On(nt(n.currentTarget,{title:"",content:"",evaluationResult:Yi,cognitiveData:{section_id:"",decisioning:[],gap:[],relevance_score:0,isMissingRationale:!0}},null,Ui,!0,e.__assign(e.__assign({},Qi),{label:""}))))},sx:{display:"inline-flex",alignItems:"center",gap:"5px",px:1.5,py:"5px",top:"-8px",borderRadius:"20px",bgcolor:Qi.badgeBg,color:Qi.badgeText,border:"1px solid ".concat(Qi.badgeBorder),fontSize:"12px",fontWeight:600,whiteSpace:"nowrap",position:"relative",zIndex:1,pointerEvents:"auto",cursor:"pointer"}},{children:[null!=Xi?Xi:n.jsx(f.default,{}),n.jsx(t.Box,e.__assign({component:"span",sx:{width:14,height:14,display:"flex",alignItems:"center","& svg":{width:"14px",height:"14px"}}},{children:n.jsx(r.ButtonCognitiveIcon,{})})),n.jsx(o.ChevronDown,{size:11,style:{transform:Rn.open&&En===Ui?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.25s ease"}})]}))}))})),n.jsxs(t.Box,e.__assign({sx:e.__assign({border:"1px solid #E3E6EA",borderRadius:"8px",bgcolor:"#FFFFFF",boxShadow:"0px 1px 4px #F7F4FE",position:"relative",zIndex:2,display:"flex",flexDirection:"column",minWidth:0},De?{flex:1,overflow:"visible",minHeight:0}:{})},{children:[bi&&n.jsx(l.default,{sections:11}),n.jsx(t.Box,e.__assign({ref:$e,sx:{p:"8px",bgcolor:"#F7F8FA",borderBottom:"1px solid #E3E6EA",borderRadius:"8px 8px 0 0",minHeight:"40px",display:"flex",alignItems:"center",overflowX:"hidden"}},{children:n.jsx(t.Tooltip,e.__assign({title:Wn,placement:"top"},{children:n.jsx(t.Typography,e.__assign({sx:{fontSize:"16px",fontWeight:500,color:"#5928ED",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",width:"100%",minWidth:0,textAlign:"center",display:"block"}},{children:Wn}))}))})),n.jsxs(t.Box,e.__assign({ref:dn,onScroll:St,sx:e.__assign({p:"12px",display:"flex",flexDirection:"column"},De?{maxHeight:"calc(100vh - 150px)",flex:1,overflowY:"auto",overflowX:"hidden",minHeight:0,ml:"-150px",pl:"165px","&::-webkit-scrollbar":{display:"none"},scrollbarWidth:"none"}:{})},{children:[n.jsx("div",{ref:cn,style:{width:"100%",height:"0px",flexShrink:0}}),ni&&$n.map(function(e,i){return n.jsx(y.default,{section:e,idx:i},"right-row-".concat(i))}),n.jsx("div",{ref:vn,style:{width:"100%",height:"0px",flexShrink:0}})]}))]}))]}))}))}))]}))}))};
2
2
  //# sourceMappingURL=CognitiveCompare.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.ARROW_SIZE=10,exports.DEFAULT_COMPONENT_HEADER_TEXT="Contract Comparison",exports.DEFAULT_DEVIAION_COLOR="#3730A3",exports.EMPTY_SECTION_POPUP_STATE={isLoading:!1,open:!1,sectionTitle:"",refSectionTitle:"",cognitiveData:null,anchorEl:null,sectionAnchorEl:null,badgeStyle:null,sectionIdx:null,isOrphan:!1,docData:null,deviationData:null},exports.POPUP_GAP=12,exports.POPUP_WIDTH=680,exports.VIEWPORT_MARGIN=12;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.ARROW_SIZE=10,exports.DEFAULT_COMPONENT_HEADER_TEXT="Contract Comparison",exports.DEFAULT_DEVIAION_COLOR="#3730A3",exports.EMPTY_SECTION_POPUP_STATE={isLoading:!1,open:!1,sectionTitle:"",refSectionTitle:"",cognitiveData:null,anchorEl:null,sectionAnchorEl:null,badgeStyle:null,sectionIdx:null,isOrphan:!1,docData:null,deviationData:null},exports.EMPTY_SUMMARY_POPUP_STATE={open:!1,anchorEl:null,summary:"",markdownStyles:{},displayImpact:!1},exports.POPUP_GAP=12,exports.POPUP_WIDTH=680,exports.VIEWPORT_MARGIN=12;
2
2
  //# sourceMappingURL=CognitiveCompareConstants.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=function(n){return null==n?"":"string"==typeof n?n:Array.isArray(n)?n.map(t).join("\n\n"):"object"==typeof n?JSON.stringify(n):String(n)},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)}))};exports.DEVIATION_BADGE_SEPARATOR="::",exports.areMarkdownPropsEqual=function(t,n){if(t.content!==n.content)return!1;if(t.sxStyles!==n.sxStyles)return!1;if(t.maintainRelativeOrder!==n.maintainRelativeOrder)return!1;var e=t.highlights||[],r=n.highlights||[];if(e.length!==r.length)return!1;for(var o=0;o<e.length;o++)if(e[o]!==r[o])return!1;var i=t.deviationBadges||[],a=n.deviationBadges||[];if(i.length!==a.length)return!1;for(o=0;o<i.length;o++){if(i[o].id!==a[o].id)return!1;if(i[o].label!==a[o].label)return!1;if(i[o].isConnected!==a[o].isConnected)return!1}return!0},exports.debounce=function(t,n){var e;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var i=this;clearTimeout(e),e=setTimeout(function(){return t.apply(i,r)},n)}},exports.extractDeviationScore=function(t,n){var e,r,o,i,a,u,l;if(!t)return n;var c=null!==(u=null!==(i=null!==(r=null===(e=t.evaluation_output)||void 0===e?void 0:e.output_score)&&void 0!==r?r:null===(o=t.evaluation_outputs)||void 0===o?void 0:o.output_score)&&void 0!==i?i:null===(a=t.evaluation_outputs)||void 0===a?void 0:a.output_value)&&void 0!==u?u:t.output_score;return null!==(l=null!=c?c:n)&&void 0!==l?l:""},exports.generateColorPalette=function(t){var n=function(t,n){var e=function(t){var n=function(t){return 4===t.length?"#"+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]:t}(t).replace("#",""),e=parseInt(n,16);return{r:e>>16&255,g:e>>8&255,b:255&e}}(t),r=e.r,o=e.g,i=e.b;return function(t,n,e){return"#"+[t,n,e].map(function(t){return t.toString(16).padStart(2,"0")}).join("").toUpperCase()}(Math.round(r+(255-r)*n),Math.round(o+(255-o)*n),Math.round(i+(255-i)*n))};return{bg:n(t,.8),border:n(t,.5),badgeBg:n(t,.8),badgeBorder:n(t,.5),badgeText:t.toUpperCase(),highlightBg:n(t,.8)}},exports.getBentArrowPath=function(t,n,e,r,o){void 0===o&&(o=14);var i=t+.5*(e-t),a=r-n;if(Math.abs(a)<3)return"M ".concat(t," ").concat(n," H ").concat(e);var u=a>0?1:-1,l=Math.min(o,Math.abs(a)/2,Math.abs(i-t)/2,Math.abs(e-i)/2);return["M ".concat(t," ").concat(n),"H ".concat(i-l),"Q ".concat(i," ").concat(n," ").concat(i," ").concat(n+u*l),"V ".concat(r-u*l),"Q ".concat(i," ").concat(r," ").concat(i+l," ").concat(r),"H ".concat(e)].join(" ")},exports.getRationale=function(t){if(!t.mapping_rationale)return{cognitiveData:{decisioning:[],gap:[],relevance_score:0,isMissingRationale:!0,citations:[]},score:0,relation:"N/A"};var n=t.mapping_rationale,e=parseInt(n.decision_strength||"0");return{cognitiveData:{decisioning:n.decisioning_factors||[],gap:n.gaps_in_decision||[],relevance_score:e,citations:n.citations},score:0,relation:"N/A"}},exports.getSideData=function(n,e,r){var o,i=r[e],a=null===(o=null==n?void 0:n.comparison_inputs)||void 0===o?void 0:o[i];return{title:t((null==a?void 0:a.title)||""),content:t((null==a?void 0:a.content)||""),attributes:(null==a?void 0:a.additional_attributes)||null,subsections:(null==a?void 0:a.subsections)||[]}},exports.hasValue=n,exports.isMissingStr=function(t){if(!t)return!0;var n=t.trim().toLowerCase();return n.includes("no equivalent")||"n/a"===n||"na"===n||"none"===n},exports.safeStringify=t,exports.smoothScrollTo=function(t,n,e,r,o){void 0===e&&(e=300);var i=t.style.scrollBehavior;t.style.scrollBehavior="auto";var a=t.scrollTop,u=n-a,l=null,c=function(s){null===l&&(l=s);var v,d=s-l;d<e?(t.scrollTop=(v=d,v/=e,u*(--v*v*v+1)+a),o&&o(),requestAnimationFrame(c)):(t.scrollTop=n,t.style.scrollBehavior=i,o&&o(),r&&r())};requestAnimationFrame(c)};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("./CognitiveCompareConstants.js"),n=function(t){return null==t?"":"string"==typeof t?t:Array.isArray(t)?t.map(n).join("\n\n"):"object"==typeof t?JSON.stringify(t):String(t)},e=function(t){return null!=t&&("string"==typeof t?t.trim().length>0:!Array.isArray(t)||t.length>0&&t.some(function(t){return e(t)}))};var o=["#B91C1C","#A16207","#1D4ED8","#000000"],r=function(t){var n=o.findIndex(function(n){return n.toLowerCase()===t.toLowerCase()});return-1===n?o.length:n},i=function(t,n,e){if(!t)return null;if(t.id===e)return n;if(!Array.isArray(t.subsections))return null;for(var o=0;o<t.subsections.length;o++){var r=i(t.subsections[o],"".concat(n,"-").concat(o),e);if(r)return r}return null},u=new WeakMap,l=function(t){if(t){var n=u.get(t);null!=n&&(clearTimeout(n),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)}},a=function(t){if(t){var n=u.get(t);null!=n&&clearTimeout(n),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 e=window.setTimeout(function(){l(t)},3e3);u.set(t,e)}};exports.DEVIATION_BADGE_SEPARATOR="::",exports.areMarkdownPropsEqual=function(t,n){var e,o,r,i,u,l;if(t.content!==n.content)return!1;if(t.overlayContent!==n.overlayContent)return!1;if(t.sxStyles!==n.sxStyles)return!1;if(t.maintainRelativeOrder!==n.maintainRelativeOrder)return!1;if(t.highlightBg!==n.highlightBg)return!1;if(t.suppressHighlightBg!==n.suppressHighlightBg)return!1;if(t.collisionKey!==n.collisionKey)return!1;var a=t.highlights||[],s=n.highlights||[];if(a.length!==s.length)return!1;for(var d=0;d<a.length;d++)if(a[d]!==s[d])return!1;var v=t.deviationBadges||[],c=n.deviationBadges||[];if(v.length!==c.length)return!1;for(d=0;d<v.length;d++){if(v[d].id!==c[d].id)return!1;if(v[d].actionId!==c[d].actionId)return!1;if(v[d].label!==c[d].label)return!1;if(v[d].score!==c[d].score)return!1;if(v[d].isOrphan!==c[d].isOrphan)return!1;if(v[d].isConnected!==c[d].isConnected)return!1;if((null===(e=v[d].style)||void 0===e?void 0:e.badgeBg)!==(null===(o=c[d].style)||void 0===o?void 0:o.badgeBg))return!1;if((null===(r=v[d].style)||void 0===r?void 0:r.badgeBorder)!==(null===(i=c[d].style)||void 0===i?void 0:i.badgeBorder))return!1;if((null===(u=v[d].style)||void 0===u?void 0:u.badgeText)!==(null===(l=c[d].style)||void 0===l?void 0:l.badgeText))return!1}return!0},exports.debounce=function(t,n){var e;return function(){for(var o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];var i=this;clearTimeout(e),e=setTimeout(function(){return t.apply(i,o)},n)}},exports.extractDeviationScore=function(t,n){var e,o,r,i,u,l,a;if(!t)return n;var s=null!==(l=null!==(i=null!==(o=null===(e=t.evaluation_output)||void 0===e?void 0:e.output_score)&&void 0!==o?o:null===(r=t.evaluation_outputs)||void 0===r?void 0:r.output_score)&&void 0!==i?i:null===(u=t.evaluation_outputs)||void 0===u?void 0:u.output_value)&&void 0!==l?l:t.output_score;return null!==(a=null!=s?s:n)&&void 0!==a?a:""},exports.findKeyPathByNodeId=function(t,n){for(var e=0;e<t.length;e++){var o=i(t[e],String(e),n);if(o)return o}return null},exports.generateColorPalette=function(t){var n=function(t,n){var e=function(t){var n=function(t){return 4===t.length?"#"+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]:t}(t).replace("#",""),e=parseInt(n,16);return{r:e>>16&255,g:e>>8&255,b:255&e}}(t),o=e.r,r=e.g,i=e.b;return function(t,n,e){return"#"+[t,n,e].map(function(t){return t.toString(16).padStart(2,"0")}).join("").toUpperCase()}(Math.round(o+(255-o)*n),Math.round(r+(255-r)*n),Math.round(i+(255-i)*n))};return{bg:n(t,.8),border:n(t,.5),badgeBg:n(t,.8),badgeBorder:n(t,.5),badgeText:t.toUpperCase(),highlightBg:n(t,.8)}},exports.getBentArrowPath=function(t,n,e,o,r){void 0===r&&(r=14);var i=t+.5*(e-t),u=o-n;if(Math.abs(u)<3)return"M ".concat(t," ").concat(n," H ").concat(e);var l=u>0?1:-1,a=Math.min(r,Math.abs(u)/2,Math.abs(i-t)/2,Math.abs(e-i)/2);return["M ".concat(t," ").concat(n),"H ".concat(i-a),"Q ".concat(i," ").concat(n," ").concat(i," ").concat(n+l*a),"V ".concat(o-l*a),"Q ".concat(i," ").concat(o," ").concat(i+a," ").concat(o),"H ".concat(e)].join(" ")},exports.getFirstDeviationColor=function(n){for(var e,o,i,u,l,a,s,d,v,c,g,f,p,h=[],b=0,m=Object.keys((null==n?void 0:n.deviations)||{}).sort(function(t,n){return Number(t)-Number(n)});b<m.length;b++){var y=m[b];(C=null===(u=null===(i=null===(o=null===(e=null==n?void 0:n.deviations)||void 0===e?void 0:e[y])||void 0===o?void 0:o.evaluation_outputs)||void 0===i?void 0:i.metadata)||void 0===u?void 0:u.label_color)&&h.push(C)}for(var _=0,x=Object.keys((null==n?void 0:n.deviation_entries)||{}).sort(function(t,n){return Number(t)-Number(n)});_<x.length;_++){y=x[_];(C=null===(d=null===(s=null===(a=null===(l=null==n?void 0:n.deviation_entries)||void 0===l?void 0:l[y])||void 0===a?void 0:a.evaluation_outputs)||void 0===s?void 0:s.metadata)||void 0===d?void 0:d.label_color)&&h.push(C)}for(var A=0,B=Object.keys(n||{}).filter(function(t){return/^\d+$/.test(t)}).sort(function(t,n){return Number(t)-Number(n)});A<B.length;A++){var C;y=B[A];(C=null===(g=null===(c=null===(v=null==n?void 0:n[y])||void 0===v?void 0:v.evaluation_outputs)||void 0===c?void 0:c.metadata)||void 0===g?void 0:g.label_color)&&h.push(C)}return 0===h.length?(null===(p=null===(f=null==n?void 0:n.evaluation_outputs)||void 0===f?void 0:f.metadata)||void 0===p?void 0:p.label_color)?n.evaluation_outputs.metadata.label_color:t.DEFAULT_DEVIAION_COLOR:h.sort(function(t,n){return r(t)-r(n)})[0]},exports.getFirstDeviationOutputValue=function(t){for(var n,e,o,r,i,u,l,a,s,d=0,v=Object.keys((null==t?void 0:t.deviations)||{}).sort(function(t,n){return Number(t)-Number(n)});d<v.length;d++){var c=v[d];if(b=null===(o=null===(e=null===(n=null==t?void 0:t.deviations)||void 0===n?void 0:n[c])||void 0===e?void 0:e.evaluation_outputs)||void 0===o?void 0:o.output_value)return b}for(var g=0,f=Object.keys((null==t?void 0:t.deviation_entries)||{}).sort(function(t,n){return Number(t)-Number(n)});g<f.length;g++){c=f[g];if(b=null===(u=null===(i=null===(r=null==t?void 0:t.deviation_entries)||void 0===r?void 0:r[c])||void 0===i?void 0:i.evaluation_outputs)||void 0===u?void 0:u.output_value)return b}for(var p=0,h=Object.keys(t||{}).filter(function(t){return/^\d+$/.test(t)}).sort(function(t,n){return Number(t)-Number(n)});p<h.length;p++){var b;c=h[p];if(b=null===(a=null===(l=null==t?void 0:t[c])||void 0===l?void 0:l.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 n=t.mapping_rationale,e=parseInt(n.decision_strength||"0");return{cognitiveData:{decisioning:n.decisioning_factors||[],gap:n.gaps_in_decision||[],relevance_score:e,citations:n.citations},score:0,relation:"N/A"}},exports.getSideData=function(t,e,o){var r,i=o[e],u=null===(r=null==t?void 0:t.comparison_inputs)||void 0===r?void 0:r[i];return{title:n((null==u?void 0:u.title)||""),content:n((null==u?void 0:u.content)||""),change_history:n((null==u?void 0:u.change_history)||""),attributes:(null==u?void 0:u.additional_attributes)||null,subsections:(null==u?void 0:u.subsections)||[]}},exports.hasMeaningfulRedlineTags=function(t){var n;if("string"!=typeof t||!t)return!1;for(var e=/<(updated|deleted|changed|change)\b[^>]*>([\s\S]*?)<\/\1>/gi,o=null;null!==(o=e.exec(t));){if((null!==(n=o[2])&&void 0!==n?n:"").replace(/<[^>]*>/g,"").trim().length>0)return!0}return!1},exports.hasValue=e,exports.highlightClause=a,exports.isMissingStr=function(t){if(!t)return!0;var n=t.trim().toLowerCase();return n.includes("no equivalent")||"n/a"===n||"na"===n||"none"===n},exports.mixHexColors=function(t,n){var e=function(t){var n=t.replace("#","");return[parseInt(n.substring(0,2),16),parseInt(n.substring(2,4),16),parseInt(n.substring(4,6),16)]},o=function(t){var n=Math.round(t).toString(16);return 1===n.length?"0"+n:n};try{var r=e(t),i=e(n),u=(r[0]+i[0])/2*.95,l=(r[1]+i[1])/2*.95,a=(r[2]+i[2])/2*.95;return"#".concat(o(u)).concat(o(l)).concat(o(a))}catch(t){return"#FDE68A"}},exports.recursivelyFindSubSectionIdxById=i,exports.resetClauseHighlight=l,exports.safeStringify=n,exports.scrollAndHighlightClause=function(t,n){var e=n.getBoundingClientRect(),o=t.getBoundingClientRect(),r=n.scrollTop+o.top-e.top-e.height/2+o.height/2;n.scrollTo({top:r,behavior:"smooth"});var i=function(){return a(t)};if("onscrollend"in n)n.addEventListener("scrollend",i,{once:!0});else{var u=n.scrollTop,l=function(){n.scrollTop===u?i():(u=n.scrollTop,requestAnimationFrame(l))};requestAnimationFrame(l)}},exports.smoothScrollTo=function(t,n,e,o,r){void 0===e&&(e=300);var i=t.style.scrollBehavior;t.style.scrollBehavior="auto";var u=t.scrollTop,l=n-u,a=null,s=function(d){null===a&&(a=d);var v,c=d-a;c<e?(t.scrollTop=(v=c,v/=e,l*(--v*v*v+1)+u),r&&r(),requestAnimationFrame(s)):(t.scrollTop=n,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,""):""};
2
2
  //# sourceMappingURL=CognitiveComparehelpers.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var i=require("tslib"),o=require("react/jsx-runtime"),e=require("react"),n=require("@mui/material"),t=require("lucide-react"),s=require("react-dom"),a=require("../../assests/svg/SparkleIcon.js"),r=require("./CognitiveCompareConfig.js"),l=require("./CitationRenderer.js");function c(i){return i&&"object"==typeof i&&"default"in i?i:{default:i}}var d=c(s),x=10;exports.default=function(s){var c,p,g,u,v,h,b,f,_,m,y,F,j,w,k,B,S,C,D,E,T=s.open,I=s.onClose,R=s.sectionTitle,A=s.referenceSectionTitle,L=s.cognitiveData,P=s.relevanceScore,z=s.anchorEl,O=s.badgeStyle,W=s.popupRef,q=s.position,U=s.markdownStyles,H=s.docData,M=s.popupConfig,N=s.deviationData,G=void 0===N?null:N,Y=s.isLoading,K=i.__assign(i.__assign({},r.SHARED_MARKDOWN_STYLES),U),X=e.useMemo(function(){var o,e;return i.__assign(i.__assign(i.__assign({},r.DEFAULT_POPUP_CONFIG),M),{tabs:{deviation:i.__assign(i.__assign({},r.DEFAULT_POPUP_CONFIG.tabs.deviation),null===(o=null==M?void 0:M.tabs)||void 0===o?void 0:o.deviation),association:i.__assign(i.__assign({},r.DEFAULT_POPUP_CONFIG.tabs.association),null===(e=null==M?void 0:M.tabs)||void 0===e?void 0:e.association)},sectionTitles:i.__assign(i.__assign({},r.DEFAULT_POPUP_CONFIG.sectionTitles),null==M?void 0:M.sectionTitles)})},[M]),J=null==L?void 0:L.isMissingRationale,Q=e.useState(J?X.tabs.deviation.key:X.tabs.association.key),V=Q[0],Z=Q[1];e.useEffect(function(){T&&Z(J?X.tabs.deviation.key:X.tabs.association.key)},[T,J,X.tabs.deviation.key,X.tabs.association.key]);var $=e.useMemo(function(){if(!O)return{border:X.accentColor,shadow:"".concat(X.accentColor,"2E")};var i=O.badgeText;return"#9F1239"===i||"#B42318"===i?{border:"#E11D48",shadow:"rgba(225,29,72,0.15)"}:"#1D4ED8"===i?{border:"#3B82F6",shadow:"rgba(59,130,246,0.15)"}:"#A16207"===i?{border:"#F59E0B",shadow:"rgba(245,158,11,0.15)"}:{border:X.accentColor,shadow:"".concat(X.accentColor,"2E")}},[O,X.accentColor]);e.useEffect(function(){if(T){var i=function(i){var o;(null===(o=W.current)||void 0===o?void 0:o.contains(i.target))||(null==z?void 0:z.contains(i.target))||I()};return document.addEventListener("mousedown",i),function(){return document.removeEventListener("mousedown",i)}}},[T,I,z,W]);var ii=J?[]:[X.tabs.deviation,X.tabs.association];if(1===ii.length&&ii[0].key===X.tabs.deviation.key)return null;if(!T||!L)return null;var oi=null!==(g=null!==(p=V===X.tabs.deviation.key?null===(c=null==G?void 0:G.cognitive_decisioning)||void 0===c?void 0:c.decision_strength:L.relevance_score)&&void 0!==p?p:P)&&void 0!==g?g:0,ei=L.decisioning,ni=Array.isArray(ei)?ei:"string"==typeof ei&&ei.trim()?[ei]:[],ti=L.gap,si=Array.isArray(ti)?ti:"string"==typeof ti&&ti.trim()?[ti]:[],ai=q?q.left-150:-9999,ri=(null!==(u=null==q?void 0:q.arrowLeft)&&void 0!==u?u:60)+150,li=o.jsxs(n.Box,i.__assign({ref:W,sx:{position:"fixed",top:null!==(v=null==q?void 0:q.top)&&void 0!==v?v:-9999,left:ai,zIndex:9999,width:"".concat(1050,"px"),maxWidth:"min(".concat(1050,"px, calc(100vw - ").concat(ai>0?ai:0,"px - ").concat(12,"px))"),bgcolor:"#FFFFFF",borderRadius:"14px",border:"1.5px solid ".concat($.border),boxShadow:"0px 8px 32px ".concat($.shadow,", 0px 0px 0px 3px ").concat($.shadow),overflow:"visible",display:"flex",flexDirection:"column",maxHeight:(null==q?void 0:q.maxHeight)?"min(60vh, ".concat(q.maxHeight,"px)"):"60vh",visibility:q?"visible":"hidden"}},{children:[q&&(q.openAbove?o.jsxs(o.Fragment,{children:[o.jsx(n.Box,{sx:{position:"absolute",bottom:-11,left:ri-x,width:0,height:0,borderLeft:"".concat(x,"px solid transparent"),borderRight:"".concat(x,"px solid transparent"),borderTop:"".concat(11,"px solid ").concat($.border),zIndex:1}}),o.jsx(n.Box,{sx:{position:"absolute",bottom:-9,left:ri-x+1,width:0,height:0,borderLeft:"".concat(9,"px solid transparent"),borderRight:"".concat(9,"px solid transparent"),borderTop:"".concat(x,"px solid #FFFFFF"),zIndex:2}})]}):o.jsxs(o.Fragment,{children:[o.jsx(n.Box,{sx:{position:"absolute",top:-11,left:ri-x,width:0,height:0,borderLeft:"".concat(x,"px solid transparent"),borderRight:"".concat(x,"px solid transparent"),borderBottom:"".concat(11,"px solid ").concat($.border),zIndex:1}}),o.jsx(n.Box,{sx:{position:"absolute",top:-9,left:ri-x+1,width:0,height:0,borderLeft:"".concat(9,"px solid transparent"),borderRight:"".concat(9,"px solid transparent"),borderBottom:"".concat(x,"px solid #FFFFFF"),zIndex:2}})]})),o.jsxs(n.Box,i.__assign({sx:{px:2.5,pt:2,pb:1.5,display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:2,flexShrink:0}},{children:[o.jsxs(n.Box,i.__assign({sx:{flex:1,minWidth:0}},{children:[("no title"!==R||"no title"!==A)&&o.jsxs(n.Typography,i.__assign({sx:{fontSize:"16px",fontWeight:600,color:"#101828",lineHeight:1.3,display:"flex",alignItems:"center",gap:1,flexWrap:"nowrap",overflow:"hidden",width:"100%"}},{children:[o.jsx(n.Box,i.__assign({component:"span",title:R,sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:"0 1 auto",maxWidth:"calc(50% - 16px)",minWidth:0}},{children:R})),o.jsx(n.Box,i.__assign({component:"span",sx:{color:"#667085",fontWeight:400,flexShrink:0,mx:.5}},{children:"↔"})),o.jsx(n.Box,i.__assign({component:"span",title:A||"Reference Section",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1,minWidth:0}},{children:A||"Reference Section"}))]})),o.jsx(n.Box,i.__assign({sx:{mt:.75,display:"inline-flex",alignItems:"center",gap:.75}},{children:o.jsx(n.Typography,i.__assign({sx:{fontSize:"no title"!==R||"no title"!==A?"13px":"16px",fontWeight:400,color:"#5928ED",lineHeight:1}},{children:null===(h=Object.values(X.tabs).find(function(i){return i.key===V}))||void 0===h?void 0:h.subtitle}))}))]})),o.jsxs(n.Box,i.__assign({sx:{display:"flex",alignItems:"center",gap:1.5,flexShrink:0}},{children:[o.jsxs(n.Box,i.__assign({sx:{display:"inline-flex",alignItems:"center",gap:"5px",px:1.5,py:.5,borderRadius:"20px",bgcolor:"#FFFFFF",border:"1px solid #5928ED",fontSize:"12px",fontWeight:600,color:"#5928ED"}},{children:[o.jsx(a.default,{}),X.decisionStrengthLabel," ",oi,"%"]})),o.jsx(n.IconButton,i.__assign({onClick:I,size:"small",sx:{color:"#667085",width:24,height:24,"&:hover":{bgcolor:"transparent",color:"#101828"}}},{children:o.jsx(t.X,{size:22})}))]}))]})),o.jsx(n.Box,i.__assign({sx:{display:"flex",borderBottom:"1px solid #E4E7EC",px:2.5,flexShrink:0}},{children:ii.map(function(e){var t=V===e.key,s=e.key===X.tabs.deviation.key,a=ii.length>1&&s&&Y,r=o.jsx(n.Box,i.__assign({onClick:function(){a||Z(e.key)},sx:{pb:"10px",pt:"4px",mr:3,px:2,cursor:a?"not-allowed":"pointer",opacity:a?.5:1,fontSize:"14px",fontWeight:t?600:400,color:t?X.accentColor:"#667085",backgroundColor:t?"".concat(X.accentColor,"14"):"transparent",borderBottom:t?"2px solid ".concat(X.accentColor):"2px solid transparent",transition:"all 0.15s",userSelect:"none"}},{children:e.label}),e.key);return a?o.jsx(n.Tooltip,i.__assign({title:"Fetching deviation data",arrow:!0,placement:"top"},{children:o.jsx("span",{children:r})}),e.key):r})})),o.jsx(n.Box,i.__assign({sx:{flex:1,minHeight:0,overflowY:"auto",px:2.5,py:2,display:"flex",flexDirection:"column",gap:1.5,"&::-webkit-scrollbar":{width:"6px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{background:"".concat($.border,"55"),borderRadius:"10px"},"&::-webkit-scrollbar-thumb:hover":{background:$.border},scrollbarWidth:"thin",scrollbarColor:"".concat($.border,"55 transparent")}},{children:V===X.tabs.deviation.key?G?o.jsxs(o.Fragment,{children:[(null===(f=(null===(b=null==G?void 0:G.cognitive_decisioning)||void 0===b?void 0:b.decisioning_factors)||[])||void 0===f?void 0:f.length)>0&&o.jsx(l.default,{title:"Decision Making Factors",content:null===(m=null===(_=null==G?void 0:G.cognitive_decisioning)||void 0===_?void 0:_.decisioning_factors)||void 0===m?void 0:m.join("\n\n"),citations:null===(y=null==G?void 0:G.cognitive_decisioning)||void 0===y?void 0:y.citations,styles:K,docData:H,open:T}),(null===(j=(null===(F=null==G?void 0:G.cognitive_decisioning)||void 0===F?void 0:F.gaps_in_decision)||[])||void 0===j?void 0:j.length)>0&&o.jsx(l.default,{title:"Gaps in Decision",content:null===(k=null===(w=null==G?void 0:G.cognitive_decisioning)||void 0===w?void 0:w.gaps_in_decision)||void 0===k?void 0:k.join("\n\n"),citations:null===(B=null==G?void 0:G.cognitive_decisioning)||void 0===B?void 0:B.citations,styles:K,docData:H,open:T}),0===(null===(C=(null===(S=null==G?void 0:G.cognitive_decisioning)||void 0===S?void 0:S.decisioning_factors)||[])||void 0===C?void 0:C.length)&&0===(null===(E=(null===(D=null==G?void 0:G.cognitive_decisioning)||void 0===D?void 0:D.gaps_in_decision)||[])||void 0===E?void 0:E.length)&&o.jsx(n.Box,i.__assign({sx:{p:2,bgcolor:"#F8FAFC",borderRadius:"8px",border:"1px solid #E2E8F0"}},{children:o.jsx(n.Typography,i.__assign({sx:{fontSize:"13px",color:"#64748B"}},{children:"No cognitive decisioning data available for this section."}))}))]}):o.jsx(l.default,{title:"Deviation Analysis",content:"Deviation analysis content will appear here. This tab shows\n structural and semantic deviations identified between the two\n sections being compared.",citations:{},styles:K,docData:H,open:T}):o.jsxs(o.Fragment,{children:[ni.length>0&&o.jsx(l.default,{title:X.sectionTitles.decisioningFactors,content:ni.join("\n\n"),citations:L.citations,styles:K,open:T,docData:H}),si.length>0&&o.jsx(l.default,{title:X.sectionTitles.gaps,content:si.join("\n\n"),citations:L.citations,styles:K,open:T,docData:H}),0===ni.length&&0===si.length&&o.jsx(n.Box,i.__assign({sx:{p:2,bgcolor:"#F8FAFC",borderRadius:"8px",border:"1px solid #E2E8F0"}},{children:o.jsx(n.Typography,i.__assign({sx:{fontSize:"13px",color:"#64748B"}},{children:X.emptyStateMessage}))}))]})}))]}));return d.default.createPortal(li,document.body)};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var i=require("tslib"),o=require("react/jsx-runtime"),e=require("react"),n=require("@mui/material"),t=require("lucide-react"),s=require("react-dom"),a=require("../../assests/svg/SparkleIcon.js"),r=require("./CognitiveCompareConfig.js"),l=require("./CitationRenderer.js");function c(i){return i&&"object"==typeof i&&"default"in i?i:{default:i}}var d=c(s),x=10;exports.default=function(s){var c,p,g,u,v,h,b,f,_,m,y,F,j,w,k,B,S,C,D,E,T=s.open,I=s.onClose,R=s.sectionTitle,A=s.referenceSectionTitle,L=s.cognitiveData,P=s.relevanceScore,z=s.anchorEl,O=s.badgeStyle,W=s.popupRef,q=s.position,U=s.markdownStyles,H=s.docData,M=s.popupConfig,N=s.deviationData,G=void 0===N?null:N,Y=s.isLoading,K=i.__assign(i.__assign({},r.SHARED_MARKDOWN_STYLES),U),X=e.useMemo(function(){var o,e;return i.__assign(i.__assign(i.__assign({},r.DEFAULT_POPUP_CONFIG),M),{tabs:{deviation:i.__assign(i.__assign({},r.DEFAULT_POPUP_CONFIG.tabs.deviation),null===(o=null==M?void 0:M.tabs)||void 0===o?void 0:o.deviation),association:i.__assign(i.__assign({},r.DEFAULT_POPUP_CONFIG.tabs.association),null===(e=null==M?void 0:M.tabs)||void 0===e?void 0:e.association)},sectionTitles:i.__assign(i.__assign({},r.DEFAULT_POPUP_CONFIG.sectionTitles),null==M?void 0:M.sectionTitles)})},[M]),J=null==L?void 0:L.isMissingRationale,Q=e.useState(J?X.tabs.deviation.key:X.tabs.association.key),V=Q[0],Z=Q[1];e.useEffect(function(){T&&Z(J?X.tabs.deviation.key:X.tabs.association.key)},[T,J,X.tabs.deviation.key,X.tabs.association.key]);var $=e.useMemo(function(){if(!O)return{border:X.accentColor,shadow:"".concat(X.accentColor,"2E")};var i=O.badgeText;return"#9F1239"===i||"#B42318"===i?{border:"#E11D48",shadow:"rgba(225,29,72,0.15)"}:"#1D4ED8"===i?{border:"#3B82F6",shadow:"rgba(59,130,246,0.15)"}:"#A16207"===i?{border:"#F59E0B",shadow:"rgba(245,158,11,0.15)"}:{border:X.accentColor,shadow:"".concat(X.accentColor,"2E")}},[O,X.accentColor]);e.useEffect(function(){if(T){var i=function(i){var o;(null===(o=W.current)||void 0===o?void 0:o.contains(i.target))||(null==z?void 0:z.contains(i.target))||I()};return document.addEventListener("mousedown",i),function(){return document.removeEventListener("mousedown",i)}}},[T,I,z,W]);var ii=J?[]:[X.tabs.deviation,X.tabs.association];if(1===ii.length&&ii[0].key===X.tabs.deviation.key)return null;if(!T||!L)return null;var oi=null!==(g=null!==(p=V===X.tabs.deviation.key?null===(c=null==G?void 0:G.cognitive_decisioning)||void 0===c?void 0:c.decision_strength:L.relevance_score)&&void 0!==p?p:P)&&void 0!==g?g:0,ei=L.decisioning,ni=Array.isArray(ei)?ei:"string"==typeof ei&&ei.trim()?[ei]:[],ti=L.gap,si=Array.isArray(ti)?ti:"string"==typeof ti&&ti.trim()?[ti]:[],ai=q?q.left-150:-9999,ri=(null!==(u=null==q?void 0:q.arrowLeft)&&void 0!==u?u:60)+150,li=o.jsxs(n.Box,i.__assign({ref:W,sx:{position:"fixed",top:null!==(v=null==q?void 0:q.top)&&void 0!==v?v:-9999,left:ai,zIndex:9999,width:"".concat(1050,"px"),maxWidth:"min(".concat(1050,"px, calc(100vw - ").concat(ai>0?ai:0,"px - ").concat(12,"px))"),bgcolor:"#FFFFFF",borderRadius:"14px",border:"1.5px solid ".concat($.border),boxShadow:"0px 8px 32px ".concat($.shadow,", 0px 0px 0px 3px ").concat($.shadow),overflow:"visible",display:"flex",flexDirection:"column",maxHeight:(null==q?void 0:q.maxHeight)?"min(60vh, ".concat(q.maxHeight,"px)"):"60vh",visibility:q?"visible":"hidden"}},{children:[q&&(q.openAbove?o.jsxs(o.Fragment,{children:[o.jsx(n.Box,{sx:{position:"absolute",bottom:-11,left:ri-x,width:0,height:0,borderLeft:"".concat(x,"px solid transparent"),borderRight:"".concat(x,"px solid transparent"),borderTop:"".concat(11,"px solid ").concat($.border),zIndex:1}}),o.jsx(n.Box,{sx:{position:"absolute",bottom:-9,left:ri-x+1,width:0,height:0,borderLeft:"".concat(9,"px solid transparent"),borderRight:"".concat(9,"px solid transparent"),borderTop:"".concat(x,"px solid #FFFFFF"),zIndex:2}})]}):o.jsxs(o.Fragment,{children:[o.jsx(n.Box,{sx:{position:"absolute",top:-11,left:ri-x,width:0,height:0,borderLeft:"".concat(x,"px solid transparent"),borderRight:"".concat(x,"px solid transparent"),borderBottom:"".concat(11,"px solid ").concat($.border),zIndex:1}}),o.jsx(n.Box,{sx:{position:"absolute",top:-9,left:ri-x+1,width:0,height:0,borderLeft:"".concat(9,"px solid transparent"),borderRight:"".concat(9,"px solid transparent"),borderBottom:"".concat(x,"px solid #FFFFFF"),zIndex:2}})]})),o.jsxs(n.Box,i.__assign({sx:{px:2.5,pt:2,pb:1.5,display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:2,flexShrink:0}},{children:[o.jsxs(n.Box,i.__assign({sx:{flex:1,minWidth:0}},{children:[("no counterpart"!==R||"no counterpart"!==A)&&o.jsxs(n.Typography,i.__assign({sx:{fontSize:"16px",fontWeight:600,color:"#101828",lineHeight:1.3,display:"flex",alignItems:"center",gap:1,flexWrap:"nowrap",overflow:"hidden",width:"100%"}},{children:[o.jsx(n.Box,i.__assign({component:"span",title:R,sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:"0 1 auto",maxWidth:"calc(50% - 16px)",minWidth:0}},{children:R})),o.jsx(n.Box,i.__assign({component:"span",sx:{color:"#667085",fontWeight:400,flexShrink:0,mx:.5}},{children:"↔"})),o.jsx(n.Box,i.__assign({component:"span",title:A||"Reference Section",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1,minWidth:0}},{children:A||"Reference Section"}))]})),o.jsx(n.Box,i.__assign({sx:{mt:.75,display:"inline-flex",alignItems:"center",gap:.75}},{children:o.jsx(n.Typography,i.__assign({sx:{fontSize:"no counterpart"!==R||"no counterpart"!==A?"13px":"16px",fontWeight:400,color:"#5928ED",lineHeight:1}},{children:null===(h=Object.values(X.tabs).find(function(i){return i.key===V}))||void 0===h?void 0:h.subtitle}))}))]})),o.jsxs(n.Box,i.__assign({sx:{display:"flex",alignItems:"center",gap:1.5,flexShrink:0}},{children:[o.jsxs(n.Box,i.__assign({sx:{display:"inline-flex",alignItems:"center",gap:"5px",px:1.5,py:.5,borderRadius:"20px",bgcolor:"#FFFFFF",border:"1px solid #5928ED",fontSize:"12px",fontWeight:600,color:"#5928ED"}},{children:[o.jsx(a.default,{}),X.decisionStrengthLabel," ",oi,"%"]})),o.jsx(n.IconButton,i.__assign({onClick:I,size:"small",sx:{color:"#667085",width:24,height:24,"&:hover":{bgcolor:"transparent",color:"#101828"}}},{children:o.jsx(t.X,{size:22})}))]}))]})),o.jsx(n.Box,i.__assign({sx:{display:"flex",borderBottom:"1px solid #E4E7EC",px:2.5,flexShrink:0}},{children:ii.map(function(e){var t=V===e.key,s=e.key===X.tabs.deviation.key,a=ii.length>1&&s&&Y,r=o.jsx(n.Box,i.__assign({onClick:function(){a||Z(e.key)},sx:{pb:"10px",pt:"4px",mr:3,px:2,cursor:a?"not-allowed":"pointer",opacity:a?.5:1,fontSize:"14px",fontWeight:t?600:400,color:t?X.accentColor:"#667085",backgroundColor:t?"".concat(X.accentColor,"14"):"transparent",borderBottom:t?"2px solid ".concat(X.accentColor):"2px solid transparent",transition:"all 0.15s",userSelect:"none"}},{children:e.label}),e.key);return a?o.jsx(n.Tooltip,i.__assign({title:"Fetching deviation data",arrow:!0,placement:"top"},{children:o.jsx("span",{children:r})}),e.key):r})})),o.jsx(n.Box,i.__assign({sx:{flex:1,minHeight:0,overflowY:"auto",px:2.5,py:2,display:"flex",flexDirection:"column",gap:1.5,"&::-webkit-scrollbar":{width:"6px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{background:"".concat($.border,"55"),borderRadius:"10px"},"&::-webkit-scrollbar-thumb:hover":{background:$.border},scrollbarWidth:"thin",scrollbarColor:"".concat($.border,"55 transparent")}},{children:V===X.tabs.deviation.key?G?o.jsxs(o.Fragment,{children:[(null===(f=(null===(b=null==G?void 0:G.cognitive_decisioning)||void 0===b?void 0:b.decisioning_factors)||[])||void 0===f?void 0:f.length)>0&&o.jsx(l.default,{title:"Decision Making Factors",content:null===(m=null===(_=null==G?void 0:G.cognitive_decisioning)||void 0===_?void 0:_.decisioning_factors)||void 0===m?void 0:m.join("\n\n"),citations:null===(y=null==G?void 0:G.cognitive_decisioning)||void 0===y?void 0:y.citations,styles:K,docData:H,open:T}),(null===(j=(null===(F=null==G?void 0:G.cognitive_decisioning)||void 0===F?void 0:F.gaps_in_decision)||[])||void 0===j?void 0:j.length)>0&&o.jsx(l.default,{title:"Gaps in Decision",content:null===(k=null===(w=null==G?void 0:G.cognitive_decisioning)||void 0===w?void 0:w.gaps_in_decision)||void 0===k?void 0:k.join("\n\n"),citations:null===(B=null==G?void 0:G.cognitive_decisioning)||void 0===B?void 0:B.citations,styles:K,docData:H,open:T}),0===(null===(C=(null===(S=null==G?void 0:G.cognitive_decisioning)||void 0===S?void 0:S.decisioning_factors)||[])||void 0===C?void 0:C.length)&&0===(null===(E=(null===(D=null==G?void 0:G.cognitive_decisioning)||void 0===D?void 0:D.gaps_in_decision)||[])||void 0===E?void 0:E.length)&&o.jsx(n.Box,i.__assign({sx:{p:2,bgcolor:"#F8FAFC",borderRadius:"8px",border:"1px solid #E2E8F0"}},{children:o.jsx(n.Typography,i.__assign({sx:{fontSize:"13px",color:"#64748B"}},{children:"No cognitive decisioning data available for this section."}))}))]}):o.jsx(l.default,{title:"Deviation Analysis",content:"Deviation analysis content will appear here. This tab shows\n structural and semantic deviations identified between the two\n sections being compared.",citations:{},styles:K,docData:H,open:T}):o.jsxs(o.Fragment,{children:[ni.length>0&&o.jsx(l.default,{title:X.sectionTitles.decisioningFactors,content:ni.join("\n\n"),citations:L.citations,styles:K,open:T,docData:H}),si.length>0&&o.jsx(l.default,{title:X.sectionTitles.gaps,content:si.join("\n\n"),citations:L.citations,styles:K,open:T,docData:H}),0===ni.length&&0===si.length&&o.jsx(n.Box,i.__assign({sx:{p:2,bgcolor:"#F8FAFC",borderRadius:"8px",border:"1px solid #E2E8F0"}},{children:o.jsx(n.Typography,i.__assign({sx:{fontSize:"13px",color:"#64748B"}},{children:X.emptyStateMessage}))}))]})}))]}));return d.default.createPortal(li,document.body)};
2
2
  //# sourceMappingURL=CognitivePopup.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),r=e.createContext(null),t=r.Provider;exports.CompareContextProvider=t,exports.useCompareContext=function(){var t=e.useContext(r);if(!t)throw new Error("useCompareContext must be used within CompareContextProvider");return t};
2
+ //# sourceMappingURL=CompareContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CompareContext.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),s=require("react");exports.default=function(n){var t=n.leftComponent,l=n.rightComponent,r=s.useRef(null),a=s.useState(50),o=a[0],d=a[1],u=s.useState(!1),c=u[0],_=u[1],h=null!=t,g=null!=l,x=s.useCallback(function(){h&&g&&_(!0)},[h,g]),f=s.useCallback(function(e){if(c&&r.current){var i=r.current.getBoundingClientRect(),s=(e.clientX-i.left)/i.width*100;s=Math.max(25,Math.min(75,s)),d(s)}},[c]),v=s.useCallback(function(){_(!1)},[]),p={minWidth:0,minHeight:0,height:"100%",overflow:"hidden",display:"flex",flexDirection:"column"};return i.jsxs("div",e.__assign({ref:r,onMouseMove:f,onMouseUp:v,onMouseLeave:v,style:{display:"flex",width:"calc(100% - 4px)",height:"400px",border:"1px solid #ddd",overflow:"hidden",userSelect:c?"none":"auto"}},{children:[h&&!g&&i.jsx("div",e.__assign({style:e.__assign(e.__assign({},p),{width:"100%"})},{children:t})),!h&&g&&i.jsx("div",e.__assign({style:e.__assign(e.__assign({},p),{width:"100%"})},{children:l})),h&&g&&i.jsxs(i.Fragment,{children:[i.jsx("div",e.__assign({style:e.__assign(e.__assign({},p),{width:"".concat(o,"%"),flexShrink:0})},{children:t})),i.jsx("div",{onMouseDown:x,style:{width:"6px",background:"#D0D5DD",cursor:"col-resize",flexShrink:0}}),i.jsx("div",e.__assign({style:e.__assign(e.__assign({},p),{flex:1})},{children:l}))]})]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),s=require("react");exports.default=function(n){var t=n.leftComponent,l=n.rightComponent,r=n.isFullscreen,a=void 0!==r&&r,o=s.useRef(null),d=s.useState(50),u=d[0],c=d[1],_=s.useState(!1),h=_[0],g=_[1],x=null!=t,f=null!=l,v=s.useCallback(function(){x&&f&&g(!0)},[x,f]),p=s.useCallback(function(e){if(h&&o.current){var i=o.current.getBoundingClientRect(),s=(e.clientX-i.left)/i.width*100;s=Math.max(25,Math.min(75,s)),c(s)}},[h]),j=s.useCallback(function(){g(!1)},[]),m={minWidth:0,minHeight:0,height:"100%",overflow:"hidden",display:"flex",flexDirection:"column"};return i.jsxs("div",e.__assign({ref:o,onMouseMove:p,onMouseUp:j,onMouseLeave:j,style:{display:"flex",width:"calc(100% - 1px)",height:a?"100%":"400px",border:"1px solid #ddd",overflow:"hidden",userSelect:h?"none":"auto"}},{children:[x&&!f&&i.jsx("div",e.__assign({style:e.__assign(e.__assign({},m),{width:"100%"})},{children:t})),!x&&f&&i.jsx("div",e.__assign({style:e.__assign(e.__assign({},m),{width:"100%"})},{children:l})),x&&f&&i.jsxs(i.Fragment,{children:[i.jsx("div",e.__assign({style:e.__assign(e.__assign({},m),{width:"".concat(u,"%"),flexShrink:0})},{children:t})),i.jsx("div",{onMouseDown:v,style:{width:"6px",background:"#D0D5DD",cursor:"col-resize",flexShrink:0}}),i.jsx("div",e.__assign({style:e.__assign(e.__assign({},m),{flex:1})},{children:l}))]})]}))};
2
2
  //# sourceMappingURL=ResizableSplitPane.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),t=require("@mui/material"),i=require("lucide-react"),o=require("react");exports.default=function(r){var l,a,s,c=r.open,d=r.anchorEl,u=r.containerEl,p=r.clipTopEl,f=r.scrollContainerEl,x=r.onClose,m=r.summary;r.markdownStyles,r.isLoading;var h=r.displayImpact,g=o.useRef(null),v=o.useRef(null),y=o.useState(null),b=y[0],_=y[1],w=o.useState(null),S=w[0],j=w[1],C=o.useState(null);C[0];var B=C[1],I=o.useState(0),R=I[0],z=I[1],E="string"==typeof m?{deviation_summary:m}:null!=m?m:{},F=E.deviation_title,W=E.deviation_summary,A=E.deviation_impact,T=E.evaluation_outputs,H=!!String(A||"").trim(),M=o.useState(!!h),P=M[0],k=M[1];o.useEffect(function(){H&&k(!!h)},[h,H,m]);var q=(null===(l=null==T?void 0:T.metadata)||void 0===l?void 0:l.label_color)||"#6366F1",L=null!==(a=null==u?void 0:u.getBoundingClientRect().width)&&void 0!==a?a:180,O=Math.max(148,L+120),D=o.useMemo(function(){if(!d||!u)return null;var e=d.getBoundingClientRect();if(0===e.width&&0===e.height)return null;var n=u.getBoundingClientRect();return{top:e.top,bottom:e.bottom,left:n.left+n.width/2}},[d,u]);o.useEffect(function(){if(!c||!d||!u)return _(null),j(null),void B(null);var e=function(){null!==g.current&&cancelAnimationFrame(g.current),g.current=requestAnimationFrame(function(){var e,n,t=d.getBoundingClientRect(),i=null==p?void 0:p.getBoundingClientRect(),o=null==f?void 0:f.getBoundingClientRect();if(0===t.width&&0===t.height)_(null);else{var r=u.getBoundingClientRect();_({top:t.top,bottom:t.bottom,left:r.left+r.width/2})}j(null!==(e=null==i?void 0:i.bottom)&&void 0!==e?e:null),B(null!==(n=null==o?void 0:o.bottom)&&void 0!==n?n:null),v.current&&z(v.current.offsetHeight)})};return e(),window.addEventListener("scroll",e,{passive:!0,capture:!0}),window.addEventListener("resize",e),function(){null!==g.current&&cancelAnimationFrame(g.current),window.removeEventListener("scroll",e,{capture:!0}),window.removeEventListener("resize",e)}},[c,d,u,p,f]);var N=null!==(s=null!=b?b:D)&&void 0!==s?s:"hidden",J="hidden"===N?"hidden":N.bottom+20,G=null!=S&&"number"==typeof J&&J<S?Math.min(R,S-J):0,V=o.useMemo(function(){return"hidden"===N?{getBoundingClientRect:function(){return{width:0,height:0,top:0,bottom:0,left:0,right:0,x:0,y:0,toJSON:function(){}}}}:{getBoundingClientRect:function(){return{width:0,height:N.bottom-N.top,top:N.top,bottom:N.bottom,left:N.left,right:N.left,x:N.left,y:N.top,toJSON:function(){}}}}},[N]);return m?n.jsx(t.Popper,e.__assign({open:c,disablePortal:!0,popperOptions:{strategy:"fixed"},anchorEl:V,placement:"bottom",modifiers:[{name:"offset",options:{offset:[0,20]}},{name:"preventOverflow",enabled:!0,options:{boundary:f||"clippingParents",tether:!1}},{name:"flip",enabled:!0,options:{boundary:f||"clippingParents",fallbackPlacements:["top"]}}],sx:{zIndex:21,visibility:"hidden"===N?"hidden":"visible",opacity:"hidden"===N?0:1,transition:"opacity 0.15s ease-in-out"}},{children:n.jsxs(t.Paper,e.__assign({ref:v,sx:e.__assign(e.__assign({p:1.5,borderRadius:"12px",width:O,maxWidth:O},G>0&&{clipPath:"inset(".concat(G,"px 0px 0px 0px round 12px)")}),{transition:"transform 80ms linear",willChange:"transform",backfaceVisibility:"hidden",transform:"translateZ(0)",boxShadow:"0px 10px 24px rgba(15, 23, 42, 0.18)",border:"1px solid ".concat(q,"26"),borderTop:"3px solid ".concat(q),overflow:"hidden",bgcolor:"#fff"})},{children:[n.jsxs(t.Box,e.__assign({sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:.75}},{children:[n.jsxs(t.Box,e.__assign({sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0}},{children:[n.jsx(i.Info,{size:14,color:q}),n.jsx(t.Typography,e.__assign({sx:{fontSize:"11px",fontWeight:700,color:q,fontFamily:'"Inter", sans-serif',textTransform:"uppercase",letterSpacing:"0.4px",lineHeight:1.2}},{children:"Summary"}))]})),n.jsx(t.IconButton,e.__assign({size:"small",onClick:x,sx:{p:.25,ml:.5,color:"#64748B"}},{children:n.jsx(i.X,{size:14})}))]})),n.jsxs(t.Box,e.__assign({sx:{display:"flex",flexDirection:"column",gap:1.5,maxHeight:"300px",overflowY:"auto",pr:.5}},{children:[n.jsxs(t.Box,{children:[F&&n.jsx(t.Typography,e.__assign({sx:{fontSize:"12px",color:"#334155",fontFamily:'"Inter", sans-serif',lineHeight:1.6,fontWeight:700,overflowWrap:"anywhere"}},{children:F})),n.jsx(t.Typography,e.__assign({sx:{fontSize:"11px",color:"#334155",lineHeight:1.6,fontFamily:'"Inter", sans-serif',fontWeight:400,overflowWrap:"anywhere",whiteSpace:"pre-wrap"}},{children:W||"No summary available."}))]}),H&&n.jsxs(t.Accordion,e.__assign({expanded:P,onChange:function(e,n){return k(n)},disableGutters:!0,elevation:0,sx:{backgroundColor:"".concat(q,"0A"),border:"1px solid ".concat(q,"33"),borderRadius:"4px",fontFamily:'"Inter", sans-serif',overflow:"hidden",flexShrink:0,"&:before":{display:"none"},"&.Mui-expanded":{margin:0}}},{children:[n.jsx(t.AccordionSummary,e.__assign({expandIcon:n.jsx(i.ChevronDown,{size:16,color:q}),sx:{minHeight:"10px",px:1.5,"& .MuiAccordionSummary-content":{py:"5px",my:0},"&.Mui-expanded":{minHeight:"10px",borderBottom:"1px solid ".concat(q,"1A")}}},{children:n.jsx(t.Typography,e.__assign({sx:{fontSize:"11px",fontWeight:700,color:q,fontFamily:'"Inter", sans-serif',textTransform:"uppercase",letterSpacing:"0.5px"}},{children:"Impact"}))})),n.jsx(t.AccordionDetails,e.__assign({sx:{p:1.5,backgroundColor:"#fff"}},{children:n.jsx(t.Typography,e.__assign({sx:{fontSize:"11px",color:"#475569",lineHeight:1.6,fontWeight:400,fontFamily:'"Inter", sans-serif',overflowWrap:"anywhere",whiteSpace:"pre-wrap"}},{children:String(A).replace("Impact -","").trim()}))}))]}))]}))]}))})):null};
2
+ //# sourceMappingURL=CognitiveSummaryPopup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CognitiveSummaryPopup.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),t=require("@mui/material");exports.default=function(o){var r=o.componentHeaderText,n=o.displayConfig,s=o.maintainRelativeOrder,a=o.onToggleView;return n.isHeaderVisible||n.isToggleVisible?i.jsxs(t.Box,e.__assign({sx:{px:2,py:1,display:"flex",alignItems:"center",justifyContent:"space-between",bgcolor:"#FFFFFF",border:"1.5px solid #EEF0F4",borderTopLeftRadius:"8px",borderTopRightRadius:"8px"}},{children:[i.jsx(t.Box,e.__assign({sx:{display:"flex",alignItems:"center",gap:1}},{children:n.isHeaderVisible&&i.jsx(t.Typography,e.__assign({sx:{fontSize:"16px",fontWeight:600,color:"#0F172A"}},{children:r}))})),n.isToggleVisible&&i.jsx(t.Box,e.__assign({sx:{display:"flex",alignItems:"center"}},{children:i.jsx(t.FormControlLabel,{control:i.jsx(t.Switch,{checked:!s,onChange:function(e){return a(e.target.checked)},color:"primary",size:"small",sx:{width:100,height:26,padding:0,"& .MuiSwitch-switchBase":{padding:0,margin:"3px",transitionDuration:"300ms","&.Mui-checked":{transform:"translateX(75px)",color:"#fff","& + .MuiSwitch-track":{backgroundColor:"#5928ED",opacity:1,border:0,"&::before":{content:'"Side by Side"',position:"absolute",left:8,top:8,fontSize:10,color:"#fff",fontWeight:600}}},"& .MuiSwitch-thumb:before":{position:"absolute",width:"100%",height:"100%",left:0,top:0,display:"flex",alignItems:"center",justifyContent:"center",fontSize:10,fontWeight:700,color:"#5928ED"}},"& .MuiSwitch-thumb":{boxSizing:"border-box",width:20,height:20,boxShadow:"0px 1px 3px rgba(0,0,0,0.2)"},"& .MuiSwitch-track":{borderRadius:13,backgroundColor:"#CBD5E1",opacity:1,position:"relative","&::before":{content:'"Side By Side"',position:"absolute",right:8,top:8,left:30,fontSize:10,color:"#1E293B",fontWeight:600}}}}),label:"",sx:{m:0}})}))]})):null};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),o=require("@mui/material");exports.default=function(t){var r=t.componentHeaderText,n=t.displayConfig,s=t.maintainRelativeOrder,l=t.onToggleView,a=t.onCollapseAll,d=t.showCollapseAll;return n.isHeaderVisible||n.isToggleVisible?i.jsxs(o.Box,e.__assign({sx:{px:2,py:1,display:"flex",alignItems:"center",justifyContent:"space-between",bgcolor:"#FFFFFF",border:"1.5px solid #EEF0F4",borderTopLeftRadius:"8px",borderTopRightRadius:"8px"}},{children:[i.jsx(o.Box,e.__assign({sx:{display:"flex",alignItems:"center",gap:1}},{children:n.isHeaderVisible&&i.jsx(o.Typography,e.__assign({sx:{fontSize:"16px",fontWeight:600,color:"#0F172A"}},{children:r}))})),i.jsxs(o.Box,e.__assign({sx:{display:"flex",alignItems:"center",gap:2}},{children:[n.displayEmailNotifier&&i.jsxs(o.Box,e.__assign({sx:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",gap:1,backgroundColor:"#f5f5f5",px:.5,py:.25,borderRadius:1,border:"1px solid #a0a0a0",paddingX:.8}},{children:[i.jsxs("svg",e.__assign({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",className:"lucide lucide-bell-ring-icon lucide-bell-ring"},{children:[i.jsx("path",{d:"M10.268 21a2 2 0 0 0 3.464 0"}),i.jsx("path",{d:"M22 8c0-2.3-.8-4.3-2-6"}),i.jsx("path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326"}),i.jsx("path",{d:"M4 2C2.8 3.7 2 5.7 2 8"})]})),i.jsx(o.Typography,e.__assign({variant:"caption",sx:{color:"black",textAlign:"center",fontSize:"13px",fontWeight:500}},{children:"You'll be notified on completion"}))]})),n.isToggleVisible&&i.jsxs(o.Box,e.__assign({sx:{display:"flex",alignItems:"center",gap:2}},{children:[d&&i.jsx(o.Button,e.__assign({variant:"outlined",size:"small",onClick:a,sx:{textTransform:"none",fontWeight:600,fontSize:"12px",color:"#5928ED",borderColor:"#5928ED",height:26,"&:hover":{borderColor:"#3E1BB3",backgroundColor:"rgba(89, 40, 237, 0.04)"}}},{children:"Collapse All"})),i.jsx(o.FormControlLabel,{control:i.jsx(o.Switch,{checked:!s,onChange:function(e){return l(e.target.checked)},color:"primary",size:"small",sx:{width:100,height:26,padding:0,"& .MuiSwitch-switchBase":{padding:0,margin:"3px",transitionDuration:"300ms","&.Mui-checked":{transform:"translateX(75px)",color:"#fff","& + .MuiSwitch-track":{backgroundColor:"#5928ED",opacity:1,border:0,"&::before":{content:'"Side by Side"',position:"absolute",left:8,top:5,fontSize:10,color:"#fff",fontWeight:600}}},"& .MuiSwitch-thumb:before":{position:"absolute",width:"100%",height:"100%",left:0,top:0,display:"flex",alignItems:"center",justifyContent:"center",fontSize:10,fontWeight:700,color:"#5928ED"}},"& .MuiSwitch-thumb":{boxSizing:"border-box",width:20,height:20,boxShadow:"0px 1px 3px rgba(0,0,0,0.2)"},"& .MuiSwitch-track":{borderRadius:13,backgroundColor:"#CBD5E1",opacity:1,position:"relative","&::before":{content:'"Side By Side"',position:"absolute",right:8,top:5,left:30,fontSize:10,color:"#1E293B",fontWeight:600}}}}),label:"",sx:{m:0}})]}))]}))]})):null};
2
2
  //# sourceMappingURL=CompareHeader.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),o=require("react"),n=require("@mui/material"),t=require("lucide-react"),r=require("./SectionAccordion.js"),a=require("./ThreeDotsLoader.js"),l=require("../CognitiveComparehelpers.js"),s=require("../CompareContext.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=d(o).default.memo(function(o){var d,c,u=o.section,p=o.idx,x=s.useCompareContext(),g=x.maintainRelativeOrder,v=x.existingSections;x.proposedSections;var f=x.connectedSections,m=x.expandedSections,b=x.displayConfig,h=x.treeData;x.deviationNumberRegistry;var S=x.getSectionCompareStyle;x.getBadgeRef;var B=x.getSectionRowRef,_=x.sectionLeftRefs,R=x.lhsBadgeRefs,j=x.openMoreFunctionsPopup,y=x.handleOpenSummaryPopup,w=x.handleCloseSummaryPopup,C=x.toggleSection;x.showDeviationBadges,x.renderSubSectionAccordion,x.isProposingFix,x.proposingFixNodeId,x.isRedlineFlow,x.isSideBySide,x.activeSideBySideSection,x.deviationNodeIdToView,x.deviationTargetParentId;var I=x.showDeviationNavigation;x.showOpenNodeRef,x.resolvedMarkdownStyles;var N=x.unifiedNumbering,q=!u.title&&!u.content;if(g&&q)return null;var D=u,P=S(p,"left"),T=g?!(null===(d=D.refIndexes)||void 0===d?void 0:d.length)||D.selfIndex<0:!v[p],k=f.has(p),z=l.extractDeviationScore(D.evaluationResult,null==P?void 0:P.deviationLabel),A=N.leftNums.get(D.id);return i.jsx(n.Box,e.__assign({ref:B(p),sx:{mb:1,width:"100%"}},{children:i.jsx(n.Box,e.__assign({ref:_.current[p],sx:e.__assign({width:"100%",display:"flex",flexDirection:"column",minWidth:0},k&&{borderRadius:"6px",outline:"2px solid ".concat((null==P?void 0:P.badgeBorder)||"#6366F1"),outlineOffset:"1px"})},{children:i.jsxs(n.Box,e.__assign({sx:{position:"relative",width:"100%"}},{children:[i.jsx(r.default,{section:u,idx:p,columnKey:"left",colRef:B("left-accordion-".concat(p)),mb:0,parentNodeId:(null===(c=null==h?void 0:h.input_index_map)||void 0===c?void 0:c[0])||"",isExpanded:g?!!m["left-".concat(p)]:!!m[String(p)],onToggle:function(){w(),C(p,"left")},navigation:u.id?I[u.id]:null}),g&&P&&i.jsxs(n.Box,e.__assign({ref:R.current[p],onClick:function(e){var i,o,n,t=b.enableDeviationSchemaBackwardCompatibility?null!==(i=D.evaluationResult)&&void 0!==i?i:null:null!==(n=null===(o=D.evaluationResult)||void 0===o?void 0:o[0])&&void 0!==n?n:null;y(e,String(p),T,t)},sx:{position:"absolute",top:"18px",right:0,transform:"translateY(-50%) translateX(calc(100% + 8px))",display:"inline-flex",alignItems:"center",gap:"4px",fontSize:"11px",bgcolor:P.badgeBg,color:P.badgeText,border:"1px solid ".concat(P.badgeBorder),borderRadius:"12px",px:1.2,py:.3,fontWeight:600,cursor:"pointer",whiteSpace:"nowrap",zIndex:20,boxShadow:"0 1px 3px rgba(0,0,0,0.07)"}},{children:[i.jsxs(n.Box,e.__assign({component:"span",onClick:function(e){var i,o,n;e.stopPropagation();var t=b.enableDeviationSchemaBackwardCompatibility?null!==(i=D.evaluationResult)&&void 0!==i?i:null:null!==(n=null===(o=D.evaluationResult)||void 0===o?void 0:o[0])&&void 0!==n?n:null;y(e,String(p),T,t)},sx:{display:"inline-flex",alignItems:"center",gap:"4px",px:.2,cursor:T?"default":"pointer",borderRight:"1px solid ".concat(P.badgeBorder),"&:hover":T?{}:{bgColor:"".concat(P.badgeBorder,"22")}}},{children:[null!=A&&i.jsx(n.Box,e.__assign({component:"span",sx:{fontSize:"11px",fontWeight:700,pr:.5,borderRight:"1px solid ".concat(P.badgeBorder)}},{children:A})),i.jsx(n.Box,e.__assign({component:"span",sx:{fontSize:"11px",px:.25}},{children:!b.isLoading||null!=D.evaluationResult&&void 0!==D.evaluationResult?"N/A"===z||"NA"===z?"N/A":0==z||null==z?"Same":"".concat(z):i.jsx(a.default,{color:P.badgeText})}))]})),i.jsx(n.Box,e.__assign({component:"span",onClick:function(e){e.stopPropagation();var i=g?v.find(function(e){var i;return null===(i=D.refIndexes)||void 0===i?void 0:i.includes(e.selfIndex)})||{title:"",content:""}:v[p]||{title:"",content:""};j(e,u,T,i,p,P)},sx:{display:"inline-flex",alignItems:"center",px:.2,cursor:"pointer","&:hover":{bgcolor:"".concat(P.badgeBorder,"22")}}},{children:i.jsx(t.EllipsisVertical,{size:11,color:P.badgeText})}))]}))]}))}))}),"left-row-".concat(p))});exports.default=c;
2
+ //# sourceMappingURL=LHSSectionRow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LHSSectionRow.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),n=require("react"),o=require("@mui/material"),t=require("lucide-react"),r=require("./SectionAccordion.js"),a=require("./ThreeDotsLoader.js"),l=require("../CompareContext.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=d(n).default.memo(function(n){var d,s,c=n.section,u=n.idx,x=l.useCompareContext(),p=x.maintainRelativeOrder;x.existingSections;var g=x.proposedSections,v=x.connectedSections,f=x.expandedSections,h=x.displayConfig,b=x.treeData;x.deviationNumberRegistry;var m=x.getSectionCompareStyle;x.getBadgeRef;var S=x.getSectionRowRef,B=x.sectionRightRefs,_=x.rhsBadgeRefs,R=x.openMoreFunctionsPopup,j=x.handleOpenSummaryPopup,y=x.handleCloseSummaryPopup,I=x.toggleSection;x.showDeviationBadges,x.renderSubSectionAccordion,x.isProposingFix,x.proposingFixNodeId,x.isRedlineFlow,x.isSideBySide,x.activeSideBySideSection,x.deviationNodeIdToView,x.deviationTargetParentId;var w=x.showDeviationNavigation;x.showOpenNodeRef,x.resolvedMarkdownStyles;var C=x.unifiedNumbering,q=c,N=!1,P=null,D=-1;if(p){D=g.findIndex(function(e){var i;return(null===(i=e.refIndexes)||void 0===i?void 0:i.includes(q.selfIndex))&&e.selfIndex>=0});var T=g.findIndex(function(e,i){var n;return v.has(i)&&(null===(n=e.refIndexes)||void 0===n?void 0:n.includes(q.selfIndex))});(N=-1!==T)&&(P=m(T,"left"))}else(N=v.has(u))&&(P=m(u,"right"));var k=p&&-1!==D?m(D,"left"):m(u,"right"),z=p?-1!==D||!(null===(d=q.refIndexes)||void 0===d?void 0:d.length)&&g.some(function(e){return e.id&&e.id===q.id}):Boolean(g[u]),F=p?q.selfIndex<0||!z:!g[u],O=C.rightNums.get(q.id);return i.jsx(o.Box,e.__assign({ref:S(u),sx:{mb:1,width:"100%"}},{children:i.jsx(o.Box,e.__assign({ref:B.current[u],sx:e.__assign({width:"100%",display:"flex"},N&&P&&{borderRadius:"6px",outline:"2px solid ".concat(P.badgeBorder),outlineOffset:"1px"})},{children:i.jsxs(o.Box,e.__assign({sx:{position:"relative",width:"100%"}},{children:[i.jsx(r.default,{section:c,idx:u,columnKey:"right",colRef:S("right-accordion-".concat(u)),mb:0,parentNodeId:(null===(s=null==b?void 0:b.input_index_map)||void 0===s?void 0:s[1])||"",isExpanded:p?!!f["right-".concat(u)]:!!f[String(u)],onToggle:function(){y(),I(u,"right")},navigation:c.id?w[c.id]:null}),p&&k&&i.jsx(o.Box,e.__assign({ref:_.current[u],"data-section-id":q.id,onClick:function(e){var i,n,o;if(F){var t=h.enableDeviationSchemaBackwardCompatibility?null!==(i=q.evaluationResult)&&void 0!==i?i:null:null!==(o=null===(n=q.evaluationResult)||void 0===n?void 0:n[0])&&void 0!==o?o:null;j(e,String(u),F,t)}},sx:{position:"absolute",top:"18px",left:0,transform:"translateY(-50%) translateX(calc(-100% - 8px))",display:"inline-flex",alignItems:"center",justifyContent:"center",gap:F?"4px":"0px",fontSize:"11px",bgcolor:k.badgeBg,color:k.badgeText,border:"1px solid ".concat(k.badgeBorder),borderRadius:F?"12px":"10px",px:F?1.2:1,py:.3,fontWeight:F?600:700,cursor:F?"pointer":"default",whiteSpace:"nowrap",zIndex:20,boxShadow:F?"0 1px 3px rgba(0,0,0,0.07)":"none"}},{children:F?i.jsxs(i.Fragment,{children:[i.jsxs(o.Box,e.__assign({component:"span",onClick:function(e){var i,n,o;e.stopPropagation();var t=h.enableDeviationSchemaBackwardCompatibility?null!==(i=q.evaluationResult)&&void 0!==i?i:null:null!==(o=null===(n=q.evaluationResult)||void 0===n?void 0:n[0])&&void 0!==o?o:null;j(e,String(u),F,t)},sx:{display:"inline-flex",alignItems:"center",gap:"4px",px:.2,cursor:"pointer",borderRight:"1px solid ".concat(k.badgeBorder),"&:hover":{bgcolor:"".concat(k.badgeBorder,"22")}}},{children:[null!=O&&i.jsx(o.Box,e.__assign({component:"span",sx:{fontSize:"11px",fontWeight:700,pr:.5,borderRight:"1px solid ".concat(k.badgeBorder)}},{children:O})),i.jsx(o.Box,e.__assign({component:"span",sx:{fontSize:"11px",px:.25}},{children:!h.isLoading||null!=q.evaluationResult&&void 0!==q.evaluationResult?k.label?"".concat(k.label):"100% Deviation":i.jsx(a.default,{color:k.badgeText})}))]})),i.jsx(o.Box,e.__assign({component:"span",onClick:function(e){e.stopPropagation();var i=p?g.find(function(e){var i;return null===(i=e.refIndexes)||void 0===i?void 0:i.includes(q.selfIndex)})||{title:"",content:""}:g[u]||{title:"",content:""};R(e,i,F,q,u,k)},sx:{display:"inline-flex",alignItems:"center",px:.2,cursor:"pointer","&:hover":{bgcolor:"".concat(k.badgeBorder,"22")}}},{children:i.jsx(t.EllipsisVertical,{size:11,color:k.badgeText})}))]}):null!=O?O:""}))]}))}))}),"right-row-".concat(u))});exports.default=s;
2
+ //# sourceMappingURL=RHSSectionRow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RHSSectionRow.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}