@e-llm-studio/citation 0.0.199 → 0.0.201
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +157 -28
- package/dist/assests/svg/PdfViewerIcons.js +1 -1
- package/dist/assests/svg/SparkleIcon.js +2 -0
- package/dist/assests/svg/SparkleIcon.js.map +1 -0
- package/dist/cjs/assests/svg/PdfViewerIcons.js +1 -1
- package/dist/cjs/assests/svg/SparkleIcon.js +2 -0
- package/dist/cjs/assests/svg/SparkleIcon.js.map +1 -0
- package/dist/cjs/features/ChatDrawer/ChatDrawer.js +1 -1
- package/dist/cjs/features/CognitiveCompare/CitationAnchor.js +2 -0
- package/dist/cjs/features/CognitiveCompare/CitationAnchor.js.map +1 -0
- package/dist/cjs/features/CognitiveCompare/CitationRenderer.js +2 -0
- package/dist/cjs/features/CognitiveCompare/CitationRenderer.js.map +1 -0
- package/dist/cjs/features/CognitiveCompare/CognitiveCompare.js +2 -0
- package/dist/cjs/features/CognitiveCompare/CognitiveCompare.js.map +1 -0
- package/dist/cjs/features/CognitiveCompare/CognitiveCompareConfig.js +2 -0
- package/dist/cjs/features/CognitiveCompare/CognitiveCompareConfig.js.map +1 -0
- package/dist/cjs/features/CognitiveCompare/CognitiveCompareConstants.js +2 -0
- package/dist/cjs/features/CognitiveCompare/CognitiveCompareConstants.js.map +1 -0
- package/dist/cjs/features/CognitiveCompare/CognitiveComparehelpers.js +2 -0
- package/dist/cjs/features/CognitiveCompare/CognitiveComparehelpers.js.map +1 -0
- package/dist/cjs/features/CognitiveCompare/CognitivePopup.js +2 -0
- package/dist/cjs/features/CognitiveCompare/CognitivePopup.js.map +1 -0
- package/dist/cjs/features/CognitiveCompare/CompareContext.js +2 -0
- package/dist/cjs/features/CognitiveCompare/CompareContext.js.map +1 -0
- package/dist/cjs/features/CognitiveCompare/LoaderComponent.js +2 -0
- package/dist/cjs/features/CognitiveCompare/LoaderComponent.js.map +1 -0
- package/dist/cjs/features/CognitiveCompare/MoreFunctionsPopup.js +2 -0
- package/dist/cjs/features/CognitiveCompare/MoreFunctionsPopup.js.map +1 -0
- package/dist/cjs/features/CognitiveCompare/OverlayComponent.js +2 -0
- package/dist/cjs/features/CognitiveCompare/OverlayComponent.js.map +1 -0
- package/dist/cjs/features/CognitiveCompare/ResizableSplitPane.js +2 -0
- package/dist/cjs/features/CognitiveCompare/ResizableSplitPane.js.map +1 -0
- package/dist/cjs/features/CognitiveCompare/components/CognitiveSummaryPopup.js +2 -0
- package/dist/cjs/features/CognitiveCompare/components/CognitiveSummaryPopup.js.map +1 -0
- package/dist/cjs/features/CognitiveCompare/components/CompareHeader.js +2 -0
- package/dist/cjs/features/CognitiveCompare/components/CompareHeader.js.map +1 -0
- package/dist/cjs/features/CognitiveCompare/components/LHSSectionRow.js +2 -0
- package/dist/cjs/features/CognitiveCompare/components/LHSSectionRow.js.map +1 -0
- package/dist/cjs/features/CognitiveCompare/components/RHSSectionRow.js +2 -0
- package/dist/cjs/features/CognitiveCompare/components/RHSSectionRow.js.map +1 -0
- package/dist/cjs/features/CognitiveCompare/components/ScrollLockToggle.js +2 -0
- package/dist/cjs/features/CognitiveCompare/components/ScrollLockToggle.js.map +1 -0
- package/dist/cjs/features/CognitiveCompare/components/SectionAccordion.js +2 -0
- package/dist/cjs/features/CognitiveCompare/components/SectionAccordion.js.map +1 -0
- package/dist/cjs/features/CognitiveCompare/components/SubSectionAccordion.js +2 -0
- package/dist/cjs/features/CognitiveCompare/components/SubSectionAccordion.js.map +1 -0
- package/dist/cjs/features/CognitiveCompare/components/SvgConnectors.js +2 -0
- package/dist/cjs/features/CognitiveCompare/components/SvgConnectors.js.map +1 -0
- package/dist/cjs/features/CognitiveCompare/components/ThreeDotsLoader.js +2 -0
- package/dist/cjs/features/CognitiveCompare/components/ThreeDotsLoader.js.map +1 -0
- package/dist/cjs/features/CognitiveCompare/components/connectedLines.js +2 -0
- package/dist/cjs/features/CognitiveCompare/components/connectedLines.js.map +1 -0
- package/dist/cjs/features/CognitiveCompare/hooks/memoizedMarkdown.js +2 -0
- package/dist/cjs/features/CognitiveCompare/hooks/memoizedMarkdown.js.map +1 -0
- package/dist/cjs/features/CognitiveCompare/hooks/useAccordionState.js +2 -0
- package/dist/cjs/features/CognitiveCompare/hooks/useAccordionState.js.map +1 -0
- package/dist/cjs/features/CognitiveCompare/hooks/useCompareData.js +2 -0
- package/dist/cjs/features/CognitiveCompare/hooks/useCompareData.js.map +1 -0
- package/dist/cjs/features/CognitiveCompare/hooks/useComparePopups.js +2 -0
- package/dist/cjs/features/CognitiveCompare/hooks/useComparePopups.js.map +1 -0
- package/dist/cjs/features/CognitiveCompare/hooks/useDeviationNavigation.js +2 -0
- package/dist/cjs/features/CognitiveCompare/hooks/useDeviationNavigation.js.map +1 -0
- package/dist/cjs/features/CognitiveCompare/hooks/useLinesCalculator.js +2 -0
- package/dist/cjs/features/CognitiveCompare/hooks/useLinesCalculator.js.map +1 -0
- package/dist/cjs/features/CognitiveCompare/hooks/useResizeHandler.js +2 -0
- package/dist/cjs/features/CognitiveCompare/hooks/useResizeHandler.js.map +1 -0
- package/dist/cjs/features/CognitiveCompare/hooks/useSectionRefs.js +2 -0
- package/dist/cjs/features/CognitiveCompare/hooks/useSectionRefs.js.map +1 -0
- package/dist/cjs/features/CognitiveCompare/hooks/useSideBySide.js +2 -0
- package/dist/cjs/features/CognitiveCompare/hooks/useSideBySide.js.map +1 -0
- package/dist/cjs/features/CognitiveCompare/hooks/useStyles.js +2 -0
- package/dist/cjs/features/CognitiveCompare/hooks/useStyles.js.map +1 -0
- package/dist/cjs/index.js +1 -1
- package/dist/features/ChatDrawer/ChatDrawer.js +1 -1
- package/dist/features/CognitiveCompare/CitationAnchor.js +2 -0
- package/dist/features/CognitiveCompare/CitationAnchor.js.map +1 -0
- package/dist/features/CognitiveCompare/CitationRenderer.js +2 -0
- package/dist/features/CognitiveCompare/CitationRenderer.js.map +1 -0
- package/dist/features/CognitiveCompare/CognitiveCompare.js +2 -0
- package/dist/features/CognitiveCompare/CognitiveCompare.js.map +1 -0
- package/dist/features/CognitiveCompare/CognitiveCompareConfig.js +2 -0
- package/dist/features/CognitiveCompare/CognitiveCompareConfig.js.map +1 -0
- package/dist/features/CognitiveCompare/CognitiveCompareConstants.js +2 -0
- package/dist/features/CognitiveCompare/CognitiveCompareConstants.js.map +1 -0
- package/dist/features/CognitiveCompare/CognitiveComparehelpers.js +2 -0
- package/dist/features/CognitiveCompare/CognitiveComparehelpers.js.map +1 -0
- package/dist/features/CognitiveCompare/CognitivePopup.js +2 -0
- package/dist/features/CognitiveCompare/CognitivePopup.js.map +1 -0
- package/dist/features/CognitiveCompare/CompareContext.js +2 -0
- package/dist/features/CognitiveCompare/CompareContext.js.map +1 -0
- package/dist/features/CognitiveCompare/LoaderComponent.js +2 -0
- package/dist/features/CognitiveCompare/LoaderComponent.js.map +1 -0
- package/dist/features/CognitiveCompare/MoreFunctionsPopup.js +2 -0
- package/dist/features/CognitiveCompare/MoreFunctionsPopup.js.map +1 -0
- package/dist/features/CognitiveCompare/OverlayComponent.js +2 -0
- package/dist/features/CognitiveCompare/OverlayComponent.js.map +1 -0
- package/dist/features/CognitiveCompare/ResizableSplitPane.js +2 -0
- package/dist/features/CognitiveCompare/ResizableSplitPane.js.map +1 -0
- package/dist/features/CognitiveCompare/components/CognitiveSummaryPopup.js +2 -0
- package/dist/features/CognitiveCompare/components/CognitiveSummaryPopup.js.map +1 -0
- package/dist/features/CognitiveCompare/components/CompareHeader.js +2 -0
- package/dist/features/CognitiveCompare/components/CompareHeader.js.map +1 -0
- package/dist/features/CognitiveCompare/components/LHSSectionRow.js +2 -0
- package/dist/features/CognitiveCompare/components/LHSSectionRow.js.map +1 -0
- package/dist/features/CognitiveCompare/components/RHSSectionRow.js +2 -0
- package/dist/features/CognitiveCompare/components/RHSSectionRow.js.map +1 -0
- package/dist/features/CognitiveCompare/components/ScrollLockToggle.js +2 -0
- package/dist/features/CognitiveCompare/components/ScrollLockToggle.js.map +1 -0
- package/dist/features/CognitiveCompare/components/SectionAccordion.js +2 -0
- package/dist/features/CognitiveCompare/components/SectionAccordion.js.map +1 -0
- package/dist/features/CognitiveCompare/components/SubSectionAccordion.js +2 -0
- package/dist/features/CognitiveCompare/components/SubSectionAccordion.js.map +1 -0
- package/dist/features/CognitiveCompare/components/SvgConnectors.js +2 -0
- package/dist/features/CognitiveCompare/components/SvgConnectors.js.map +1 -0
- package/dist/features/CognitiveCompare/components/ThreeDotsLoader.js +2 -0
- package/dist/features/CognitiveCompare/components/ThreeDotsLoader.js.map +1 -0
- package/dist/features/CognitiveCompare/components/connectedLines.js +2 -0
- package/dist/features/CognitiveCompare/components/connectedLines.js.map +1 -0
- package/dist/features/CognitiveCompare/hooks/memoizedMarkdown.js +2 -0
- package/dist/features/CognitiveCompare/hooks/memoizedMarkdown.js.map +1 -0
- package/dist/features/CognitiveCompare/hooks/useAccordionState.js +2 -0
- package/dist/features/CognitiveCompare/hooks/useAccordionState.js.map +1 -0
- package/dist/features/CognitiveCompare/hooks/useCompareData.js +2 -0
- package/dist/features/CognitiveCompare/hooks/useCompareData.js.map +1 -0
- package/dist/features/CognitiveCompare/hooks/useComparePopups.js +2 -0
- package/dist/features/CognitiveCompare/hooks/useComparePopups.js.map +1 -0
- package/dist/features/CognitiveCompare/hooks/useDeviationNavigation.js +2 -0
- package/dist/features/CognitiveCompare/hooks/useDeviationNavigation.js.map +1 -0
- package/dist/features/CognitiveCompare/hooks/useLinesCalculator.js +2 -0
- package/dist/features/CognitiveCompare/hooks/useLinesCalculator.js.map +1 -0
- package/dist/features/CognitiveCompare/hooks/useResizeHandler.js +2 -0
- package/dist/features/CognitiveCompare/hooks/useResizeHandler.js.map +1 -0
- package/dist/features/CognitiveCompare/hooks/useSectionRefs.js +2 -0
- package/dist/features/CognitiveCompare/hooks/useSectionRefs.js.map +1 -0
- package/dist/features/CognitiveCompare/hooks/useSideBySide.js +2 -0
- package/dist/features/CognitiveCompare/hooks/useSideBySide.js.map +1 -0
- package/dist/features/CognitiveCompare/hooks/useStyles.js +2 -0
- package/dist/features/CognitiveCompare/hooks/useStyles.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/types/src/CognitiveCompareTest.d.ts +3 -0
- package/dist/types/src/CognitiveCompareTest.d.ts.map +1 -0
- package/dist/types/src/CommonConstants/CommonConstants.d.ts.map +1 -1
- package/dist/types/src/assests/svg/PdfViewerIcons.d.ts +1 -0
- package/dist/types/src/assests/svg/PdfViewerIcons.d.ts.map +1 -1
- package/dist/types/src/assests/svg/SparkleIcon.d.ts +3 -0
- package/dist/types/src/assests/svg/SparkleIcon.d.ts.map +1 -0
- package/dist/types/src/features/ChatDrawer/ChatDrawer.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/CitationAnchor.d.ts +27 -0
- package/dist/types/src/features/CognitiveCompare/CitationAnchor.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/CitationRenderer.d.ts +11 -0
- package/dist/types/src/features/CognitiveCompare/CitationRenderer.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/CognitiveCompare.d.ts +6 -0
- package/dist/types/src/features/CognitiveCompare/CognitiveCompare.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/CognitiveCompareConfig.d.ts +64 -0
- package/dist/types/src/features/CognitiveCompare/CognitiveCompareConfig.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/CognitiveCompareConstants.d.ts +11 -0
- package/dist/types/src/features/CognitiveCompare/CognitiveCompareConstants.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/CognitiveCompareTypes.d.ts +282 -0
- package/dist/types/src/features/CognitiveCompare/CognitiveCompareTypes.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/CognitiveComparehelpers.d.ts +63 -0
- package/dist/types/src/features/CognitiveCompare/CognitiveComparehelpers.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/CognitivePopup.d.ts +7 -0
- package/dist/types/src/features/CognitiveCompare/CognitivePopup.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/CompareContext.d.ts +67 -0
- package/dist/types/src/features/CognitiveCompare/CompareContext.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/LoaderComponent.d.ts +3 -0
- package/dist/types/src/features/CognitiveCompare/LoaderComponent.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/MoreFunctionsPopup.d.ts +17 -0
- package/dist/types/src/features/CognitiveCompare/MoreFunctionsPopup.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/OverlayComponent.d.ts +5 -0
- package/dist/types/src/features/CognitiveCompare/OverlayComponent.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/ResizableSplitPane.d.ts +9 -0
- package/dist/types/src/features/CognitiveCompare/ResizableSplitPane.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/components/CognitiveSummaryPopup.d.ts +3 -0
- package/dist/types/src/features/CognitiveCompare/components/CognitiveSummaryPopup.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/components/CompareHeader.d.ts +12 -0
- package/dist/types/src/features/CognitiveCompare/components/CompareHeader.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/components/LHSSectionRow.d.ts +9 -0
- package/dist/types/src/features/CognitiveCompare/components/LHSSectionRow.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/components/RHSSectionRow.d.ts +9 -0
- package/dist/types/src/features/CognitiveCompare/components/RHSSectionRow.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/components/ScrollLockToggle.d.ts +11 -0
- package/dist/types/src/features/CognitiveCompare/components/ScrollLockToggle.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/components/SectionAccordion.d.ts +17 -0
- package/dist/types/src/features/CognitiveCompare/components/SectionAccordion.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/components/SubSectionAccordion.d.ts +13 -0
- package/dist/types/src/features/CognitiveCompare/components/SubSectionAccordion.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/components/SvgConnectors.d.ts +36 -0
- package/dist/types/src/features/CognitiveCompare/components/SvgConnectors.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/components/ThreeDotsLoader.d.ts +8 -0
- package/dist/types/src/features/CognitiveCompare/components/ThreeDotsLoader.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/components/connectedLines.d.ts +8 -0
- package/dist/types/src/features/CognitiveCompare/components/connectedLines.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/hooks/memoizedMarkdown.d.ts +13 -0
- package/dist/types/src/features/CognitiveCompare/hooks/memoizedMarkdown.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/hooks/useAccordionState.d.ts +32 -0
- package/dist/types/src/features/CognitiveCompare/hooks/useAccordionState.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/hooks/useCompareData.d.ts +13 -0
- package/dist/types/src/features/CognitiveCompare/hooks/useCompareData.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/hooks/useCompareLayout.d.ts +24 -0
- package/dist/types/src/features/CognitiveCompare/hooks/useCompareLayout.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/hooks/useComparePopups.d.ts +22 -0
- package/dist/types/src/features/CognitiveCompare/hooks/useComparePopups.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/hooks/useDeviationNavigation.d.ts +32 -0
- package/dist/types/src/features/CognitiveCompare/hooks/useDeviationNavigation.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/hooks/useLinesCalculator.d.ts +27 -0
- package/dist/types/src/features/CognitiveCompare/hooks/useLinesCalculator.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/hooks/useResizeHandler.d.ts +5 -0
- package/dist/types/src/features/CognitiveCompare/hooks/useResizeHandler.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/hooks/useSectionRefs.d.ts +19 -0
- package/dist/types/src/features/CognitiveCompare/hooks/useSectionRefs.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/hooks/useSideBySide.d.ts +35 -0
- package/dist/types/src/features/CognitiveCompare/hooks/useSideBySide.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/hooks/useStyles.d.ts +15 -0
- package/dist/types/src/features/CognitiveCompare/hooks/useStyles.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/package.json +9 -1
package/README.md
CHANGED
|
@@ -1,42 +1,41 @@
|
|
|
1
1
|
# 📚 e-llm-studio/citation
|
|
2
2
|
|
|
3
|
-
|
|
4
3
|
## Table of Contents
|
|
5
4
|
|
|
6
5
|
1. [Project Overview](#project-overview)
|
|
7
6
|
2. [Installation](#installation)
|
|
8
7
|
3. [Available Components](#available-citations)
|
|
9
8
|
- [Citation Components](#citation-components)
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
9
|
+
- [BookCitation](#bookcitation) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/src/features/BookCitation/README.MD)
|
|
10
|
+
- [ChatCitation](#chatcitation) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/src/features/ChatCitation/ChatCitationReadme.md)
|
|
11
|
+
- [CitationRenderer](#citationrenderer) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/src/features/CitationRenderer/CitationRendererReadme.md)
|
|
12
|
+
- [EmailCitation](#emailcitation) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/src/features/EmailCitation/EmailCitation.md)
|
|
13
|
+
- [CognitiveDecisioningCard](#cognitivedecisioningcard) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/src/features/CognitiveDecisioning/CognitiveDecisioningReadme.md)
|
|
14
|
+
- [CognitiveCompare](#cognitivecompare) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/new-compare-ui/citation/src/features/CognitiveCompare/README.md)
|
|
15
|
+
- [CognitiveInternalGPTReasoning](#cognitiveinternalgptreasoning) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/src/features/CognitiveInternalgptReasoning/README.md)
|
|
16
|
+
- [CodeCitation](#codecitation) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/src/features/CodeCitation/README.md)
|
|
17
|
+
- [ChatDrawer](#chatdrawer) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/src/features/ChatDrawer/ChatDrawerReadme.md)
|
|
18
|
+
- [CitationsViewer](#citationsviewer) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/src/features/CitationViewer/CitationViewerReadme.md)
|
|
19
|
+
- [PdfEditorCitation](#pdfeditorcitation) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/src/features/PdfEditorCitation/README.md)
|
|
20
|
+
- [RequirementAICitation](#requirementaicitation) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/src/features/RequirementAiCitations/RequirementAiCitationsReadme.md)
|
|
21
|
+
- [VideoCitationContent](#videocitationcontent) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/src/features/RequirementAiCitations/RequirementAiCitationsReadme.md)
|
|
22
|
+
- [MarkdownWithImageCitation](#markdownwithimagecitation) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/src/features/MarkdownWithImageCitation/README.md)
|
|
23
|
+
- [ScannedDocCitation](#scanneddoccitation) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/src/features/ScannedDocCitation/README.md)
|
|
24
24
|
- [Other Components](#other-components)
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
25
|
+
- [Bookemon](#bookemon) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/src/features/Bookemon/BookemonReadme.md)
|
|
26
|
+
- [DatagestMon](#datagestmon) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/src/features/DatagestMon/README.md)
|
|
27
|
+
- [DataSelector](#dataselector)[<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/src/features/DataSelector/DataSelectorReadme.md)
|
|
28
|
+
- [PaginatedTable](#paginatedtable) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/src/features/PaginatedTable/PaginatedTableReadme.md)
|
|
29
|
+
- [PdfViewer](#pdfviewer) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/src/features/PdfViewer/PdfViewerReadme.md)
|
|
30
|
+
- [ProjectAccordion](#projectaccordion) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/src/features/ProjectAccordion/README.md)
|
|
31
|
+
- [UploadData](#uploaddata) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/src/features/UploadData/README.md)
|
|
32
|
+
- [ReviewPanel](#reviewpanel) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/src/features/ReviewPanel/README.md)
|
|
33
|
+
- [TableCitationContent](#tablecitationcontent) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/src/features/TableCitation/README.md)
|
|
34
|
+
- [SplitterCitationsComponent](#splittercitationscomponent) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/src/features/SplitterCitations/README.md)
|
|
35
35
|
4. [Common Use Cases](#common-use-cases)
|
|
36
36
|
5. [Development & Contribution](#development--contribution)
|
|
37
37
|
6. [License](#license)
|
|
38
38
|
|
|
39
|
-
|
|
40
39
|
## Project Overview
|
|
41
40
|
|
|
42
41
|
The @e-llm-studio/citation library is a comprehensive React component library designed to render various types of citations and related UI elements within the e-LLM Studio ecosystem. It provides a robust set of reusable, production-ready components that enable developers to display citations, reasoning chains, code snippets, PDFs, and other content types with rich interactive features and highly customizable styling.
|
|
@@ -136,8 +135,8 @@ pnpm add @e-llm-studio/citation
|
|
|
136
135
|
|
|
137
136
|
---
|
|
138
137
|
|
|
139
|
-
|
|
140
138
|
# Citation Components
|
|
139
|
+
|
|
141
140
|
## BookCitation
|
|
142
141
|
|
|
143
142
|
### Overview
|
|
@@ -190,7 +189,136 @@ import BookCitation from '@e-llm-studio/citation/BookCitation'
|
|
|
190
189
|
| `useDropdown` | `boolean` | Optional flag to render the citation as a dropdown (default: `true`) |
|
|
191
190
|
|
|
192
191
|
---
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
### CognitiveCompare (Main Component)
|
|
195
|
+
|
|
196
|
+
A side-by-side document comparison component with cognitive analysis, deviation badges, citation-linked PDF previews, and two layout modes (Standard and Relative Order). For full documentation see the [dedicated README](https://github.com/Techolution/e-llm-studio-lib/blob/new-compare-ui/citation/src/features/CognitiveCompare/README.md).
|
|
197
|
+
|
|
198
|
+
### Props
|
|
199
|
+
|
|
200
|
+
| Prop | Type | Default | Description |
|
|
201
|
+
| --------------------- | ----------------------------------- | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
202
|
+
| `treeData` | `Record<string, any> \| null` | — | **Required.** Backend tree structure powering both columns. |
|
|
203
|
+
| `displayConfig` | [`IDisplayConfig`](#idisplayconfig) | — | **Required.** Controls header/toggle visibility and initial layout mode. |
|
|
204
|
+
| `componentHeaderText` | `string` | `"Contract Comparison"` | Text shown in the top header bar. |
|
|
205
|
+
| `deviationData` | `Record<string, any>` | `{}` | Per-node deviation analysis results keyed by node ID. Populates the Deviation Analysis tab in the cognitive popup and drives inline text highlights within section content. |
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
#### IDisplayConfig
|
|
210
|
+
|
|
211
|
+
| Property | Type | Default | Description |
|
|
212
|
+
| ----------------------- | --------- | ------- | ---------------------------------------------------------------------- |
|
|
213
|
+
| `isHeaderVisible` | `boolean` | `true` | Show or hide the top header bar. |
|
|
214
|
+
| `isToggleVisible` | `boolean` | `true` | Show or hide the Standard / Relative Order toggle switch. |
|
|
215
|
+
| `maintainRelativeOrder` | `boolean` | `false` | Initial layout mode — `true` for Relative Order, `false` for Standard. |
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
### treeData Shape
|
|
220
|
+
|
|
221
|
+
`treeData` is the primary data contract. It must be a flat object where every key is a node ID, plus four reserved keys.
|
|
222
|
+
|
|
223
|
+
```ts
|
|
224
|
+
{
|
|
225
|
+
// Top-level metadata keys
|
|
226
|
+
base_root_id: string, // ID of the root node (looked up inside nodes)
|
|
227
|
+
input_index_map: { // Maps side index to document UUID
|
|
228
|
+
"0": string, // left side UUID
|
|
229
|
+
"1": string, // right side UUID
|
|
230
|
+
},
|
|
231
|
+
documents: { // Document metadata keyed by UUID
|
|
232
|
+
[uuid: string]: {
|
|
233
|
+
title: string,
|
|
234
|
+
signed_url: string, // PDF URL used by CitationAnchor / PdfViewer
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
|
|
238
|
+
// All node data lives under the `nodes` key
|
|
239
|
+
nodes: {
|
|
240
|
+
// Root node (identified by base_root_id)
|
|
241
|
+
[rootId: string]: {
|
|
242
|
+
display_node?: boolean,
|
|
243
|
+
comparison_inputs: {
|
|
244
|
+
[uuid: string]: { title: string } // column titles
|
|
245
|
+
},
|
|
246
|
+
decision_scope_description?: string,
|
|
247
|
+
next?: Record<string, string>, // child node IDs
|
|
248
|
+
},
|
|
249
|
+
|
|
250
|
+
// Section nodes
|
|
251
|
+
[nodeId: string]: {
|
|
252
|
+
display_node?: boolean, // set false to hide the node
|
|
253
|
+
evaluation_result?: DeviationDataEntry, // deviation result attached directly to node
|
|
254
|
+
comparison_inputs: {
|
|
255
|
+
[uuid: string]: {
|
|
256
|
+
title: string,
|
|
257
|
+
content: string,
|
|
258
|
+
additional_attributes?: {
|
|
259
|
+
display_index?: number, // used in Relative Order mode for sorting
|
|
260
|
+
display_title?: boolean, // set false to suppress rendering the title
|
|
261
|
+
display_content?: boolean, // set false to suppress rendering the content
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
next?: Record<string, string>, // child node IDs (for subsections)
|
|
266
|
+
mapping_rationale?: {
|
|
267
|
+
decision_strength?: string, // numeric string, e.g. "72"
|
|
268
|
+
decisioning_factors?: string[],
|
|
269
|
+
gaps_in_decision?: string[],
|
|
270
|
+
citations?: Record<string, Record<string, CitationEntry>>
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
> All node data (root and section nodes) lives under the `nodes` key. The top-level `base_root_id`, `input_index_map`, and `documents` keys remain directly on `treeData`.
|
|
278
|
+
|
|
279
|
+
#### deviationData Shape
|
|
280
|
+
|
|
281
|
+
```ts
|
|
282
|
+
// deviationData[nodeId]
|
|
283
|
+
{
|
|
284
|
+
evaluation_outputs?: {
|
|
285
|
+
output_value?: string, // badge label text
|
|
286
|
+
metadata?: { label_color?: string } // hex — drives badge/highlight colors
|
|
287
|
+
},
|
|
288
|
+
cognitive_decisioning?: {
|
|
289
|
+
decisioning_factors?: string[],
|
|
290
|
+
gaps_in_decision?: string[],
|
|
291
|
+
citations?: Record<string, any>,
|
|
292
|
+
decision_strength?: string | null,
|
|
293
|
+
},
|
|
294
|
+
deviations?: Record<string, any>, // { devKey: { [docUuid]: highlightText } }
|
|
295
|
+
}
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
#### Usage
|
|
299
|
+
|
|
300
|
+
```tsx
|
|
301
|
+
import CognitiveCompare from "@e-llm-studio/citation/CognitiveCompare";
|
|
302
|
+
|
|
303
|
+
<CognitiveCompare
|
|
304
|
+
treeData={myTreeData}
|
|
305
|
+
displayConfig={{
|
|
306
|
+
isHeaderVisible: true,
|
|
307
|
+
isToggleVisible: true,
|
|
308
|
+
maintainRelativeOrder: false,
|
|
309
|
+
}}
|
|
310
|
+
deviationData={myDeviationData}
|
|
311
|
+
/>;
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
#### Key Behaviours
|
|
193
315
|
|
|
316
|
+
- Badge and highlight colors are generated dynamically from `evaluation_outputs.metadata.label_color` via `generateColorPalette()`. The static `relationStyles` map has been removed.
|
|
317
|
+
- Clicking a badge in **Standard mode** opens `CognitivePopup` directly. In **Relative Order mode** it opens `MoreFunctionsPopup` offering Connect, Side by Side, and Cognitive Decisioning actions.
|
|
318
|
+
- The **Deviation Analysis** tab is shown first in the popup and displays `cognitive_decisioning.decisioning_factors` and `gaps_in_decision` with inline citation anchors that open split PDF viewers.
|
|
319
|
+
- `deviations` entries drive inline `<mark>` highlights inside section content, colored using the same `label_color`-derived palette.
|
|
320
|
+
|
|
321
|
+
---
|
|
194
322
|
|
|
195
323
|
## ChatCitation
|
|
196
324
|
|
|
@@ -975,6 +1103,7 @@ This visual captures a clean product collaboration workspace prepared for planni
|
|
|
975
1103
|
```
|
|
976
1104
|
|
|
977
1105
|
**With CitationRenderer (Expandable Pill):**
|
|
1106
|
+
|
|
978
1107
|
```tsx
|
|
979
1108
|
import { CitationRenderer } from '@e-llm-studio/citation/CitationRenderer'
|
|
980
1109
|
import { MarkdownWithImageCitation } from '@e-llm-studio/citation/MarkdownWithImageCitation'
|
|
@@ -2312,4 +2441,4 @@ npm install @e-llm-studio/citation@latest
|
|
|
2312
2441
|
|
|
2313
2442
|
This library is released under the MIT License. See the LICENSE file for more details.
|
|
2314
2443
|
|
|
2315
|
-
The license information is also available in the `citation/package.json` file under the 'license' field.
|
|
2444
|
+
The license information is also available in the `citation/package.json` file under the 'license' field.
|
|
@@ -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
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as C}from"tslib";import{jsxs as i,jsx as L}from"react/jsx-runtime";var t=function(){return i("svg",C({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[L("g",C({id:"bi:stars",clipPath:"url(#clip0_6004_60631)"},{children:L("path",{id:"Vector",d:"M11.4867 9.37021C11.6517 8.87521 12.3507 8.87521 12.5157 9.37021L13.4832 12.2757C13.6961 12.9144 14.0549 13.4947 14.5311 13.9707C15.0073 14.4466 15.5879 14.8051 16.2267 15.0177L19.1307 15.9852C19.6257 16.1502 19.6257 16.8492 19.1307 17.0142L16.2252 17.9817C15.5865 18.1947 15.0062 18.5535 14.5302 19.0297C14.0543 19.5059 13.6958 20.0864 13.4832 20.7252L12.5157 23.6292C12.4801 23.7376 12.4112 23.832 12.3188 23.8989C12.2264 23.9658 12.1153 24.0019 12.0012 24.0019C11.8871 24.0019 11.7759 23.9658 11.6835 23.8989C11.5912 23.832 11.5223 23.7376 11.4867 23.6292L10.5192 20.7237C10.3064 20.0852 9.9478 19.505 9.47187 19.029C8.99594 18.5531 8.41572 18.1945 7.77718 17.9817L4.87168 17.0142C4.76329 16.9786 4.6689 16.9097 4.60198 16.8173C4.53506 16.725 4.49904 16.6138 4.49904 16.4997C4.49904 16.3856 4.53506 16.2745 4.60198 16.1821C4.6689 16.0897 4.76329 16.0208 4.87168 15.9852L7.77718 15.0177C8.41572 14.8049 8.99594 14.4463 9.47187 13.9704C9.9478 13.4945 10.3064 12.9142 10.5192 12.2757L11.4867 9.37021ZM5.69218 1.72171C5.71369 1.65675 5.75512 1.60022 5.8106 1.56016C5.86607 1.52009 5.93275 1.49853 6.00118 1.49853C6.06961 1.49853 6.13629 1.52009 6.19176 1.56016C6.24724 1.60022 6.28867 1.65675 6.31018 1.72171L6.89068 3.46471C7.15018 4.24171 7.75918 4.85071 8.53618 5.11021L10.2792 5.69071C10.3441 5.71222 10.4007 5.75365 10.4407 5.80912C10.4808 5.86459 10.5024 5.93128 10.5024 5.99971C10.5024 6.06813 10.4808 6.13482 10.4407 6.19029C10.4007 6.24576 10.3441 6.2872 10.2792 6.30871L8.53618 6.88921C8.15274 7.01647 7.80431 7.23149 7.51864 7.51717C7.23296 7.80284 7.01794 8.15127 6.89068 8.53471L6.31018 10.2777C6.28867 10.3427 6.24724 10.3992 6.19176 10.4393C6.13629 10.4793 6.06961 10.5009 6.00118 10.5009C5.93275 10.5009 5.86607 10.4793 5.8106 10.4393C5.75512 10.3992 5.71369 10.3427 5.69218 10.2777L5.11168 8.53471C4.98442 8.15127 4.7694 7.80284 4.48372 7.51717C4.19805 7.23149 3.84962 7.01647 3.46618 6.88921L1.72318 6.30871C1.65822 6.2872 1.60169 6.24576 1.56163 6.19029C1.52156 6.13482 1.5 6.06813 1.5 5.99971C1.5 5.93128 1.52156 5.86459 1.56163 5.80912C1.60169 5.75365 1.65822 5.71222 1.72318 5.69071L3.46618 5.11021C3.84962 4.98295 4.19805 4.76792 4.48372 4.48225C4.7694 4.19657 4.98442 3.84815 5.11168 3.46471L5.69218 1.72171ZM16.2957 0.148207C16.3105 0.105497 16.3382 0.068461 16.3751 0.0422495C16.4119 0.016038 16.456 0.00195312 16.5012 0.00195312C16.5464 0.00195313 16.5905 0.016038 16.6273 0.0422495C16.6641 0.068461 16.6919 0.105497 16.7067 0.148207L17.0937 1.30921C17.2662 1.82821 17.6727 2.23471 18.1917 2.40721L19.3527 2.79421C19.3954 2.80901 19.4324 2.83676 19.4586 2.87359C19.4848 2.91042 19.4989 2.9545 19.4989 2.99971C19.4989 3.04491 19.4848 3.08899 19.4586 3.12582C19.4324 3.16265 19.3954 3.1904 19.3527 3.20521L18.1917 3.59221C17.9361 3.67771 17.7039 3.82139 17.5134 4.01193C17.3229 4.20247 17.1792 4.43467 17.0937 4.69021L16.7067 5.85121C16.6919 5.89392 16.6641 5.93095 16.6273 5.95717C16.5905 5.98338 16.5464 5.99746 16.5012 5.99746C16.456 5.99746 16.4119 5.98338 16.3751 5.95717C16.3382 5.93095 16.3105 5.89392 16.2957 5.85121L15.9087 4.69021C15.8232 4.43467 15.6795 4.20247 15.489 4.01193C15.2984 3.82139 15.0662 3.67771 14.8107 3.59221L13.6512 3.20521C13.6085 3.1904 13.5714 3.16265 13.5452 3.12582C13.519 3.08899 13.5049 3.04491 13.5049 2.99971C13.5049 2.9545 13.519 2.91042 13.5452 2.87359C13.5714 2.83676 13.6085 2.80901 13.6512 2.79421L14.8122 2.40721C15.3312 2.23471 15.7377 1.82821 15.9102 1.30921L16.2957 0.148207Z",fill:"#5928ed"})})),L("defs",{children:L("clipPath",C({id:"clip0_6004_60631"},{children:L("rect",{width:"24",height:"24",fill:"white"})}))})]}))};export{t as default};
|
|
2
|
+
//# sourceMappingURL=SparkleIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SparkleIcon.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -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
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var C=require("tslib"),e=require("react/jsx-runtime");exports.default=function(){return e.jsxs("svg",C.__assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[e.jsx("g",C.__assign({id:"bi:stars",clipPath:"url(#clip0_6004_60631)"},{children:e.jsx("path",{id:"Vector",d:"M11.4867 9.37021C11.6517 8.87521 12.3507 8.87521 12.5157 9.37021L13.4832 12.2757C13.6961 12.9144 14.0549 13.4947 14.5311 13.9707C15.0073 14.4466 15.5879 14.8051 16.2267 15.0177L19.1307 15.9852C19.6257 16.1502 19.6257 16.8492 19.1307 17.0142L16.2252 17.9817C15.5865 18.1947 15.0062 18.5535 14.5302 19.0297C14.0543 19.5059 13.6958 20.0864 13.4832 20.7252L12.5157 23.6292C12.4801 23.7376 12.4112 23.832 12.3188 23.8989C12.2264 23.9658 12.1153 24.0019 12.0012 24.0019C11.8871 24.0019 11.7759 23.9658 11.6835 23.8989C11.5912 23.832 11.5223 23.7376 11.4867 23.6292L10.5192 20.7237C10.3064 20.0852 9.9478 19.505 9.47187 19.029C8.99594 18.5531 8.41572 18.1945 7.77718 17.9817L4.87168 17.0142C4.76329 16.9786 4.6689 16.9097 4.60198 16.8173C4.53506 16.725 4.49904 16.6138 4.49904 16.4997C4.49904 16.3856 4.53506 16.2745 4.60198 16.1821C4.6689 16.0897 4.76329 16.0208 4.87168 15.9852L7.77718 15.0177C8.41572 14.8049 8.99594 14.4463 9.47187 13.9704C9.9478 13.4945 10.3064 12.9142 10.5192 12.2757L11.4867 9.37021ZM5.69218 1.72171C5.71369 1.65675 5.75512 1.60022 5.8106 1.56016C5.86607 1.52009 5.93275 1.49853 6.00118 1.49853C6.06961 1.49853 6.13629 1.52009 6.19176 1.56016C6.24724 1.60022 6.28867 1.65675 6.31018 1.72171L6.89068 3.46471C7.15018 4.24171 7.75918 4.85071 8.53618 5.11021L10.2792 5.69071C10.3441 5.71222 10.4007 5.75365 10.4407 5.80912C10.4808 5.86459 10.5024 5.93128 10.5024 5.99971C10.5024 6.06813 10.4808 6.13482 10.4407 6.19029C10.4007 6.24576 10.3441 6.2872 10.2792 6.30871L8.53618 6.88921C8.15274 7.01647 7.80431 7.23149 7.51864 7.51717C7.23296 7.80284 7.01794 8.15127 6.89068 8.53471L6.31018 10.2777C6.28867 10.3427 6.24724 10.3992 6.19176 10.4393C6.13629 10.4793 6.06961 10.5009 6.00118 10.5009C5.93275 10.5009 5.86607 10.4793 5.8106 10.4393C5.75512 10.3992 5.71369 10.3427 5.69218 10.2777L5.11168 8.53471C4.98442 8.15127 4.7694 7.80284 4.48372 7.51717C4.19805 7.23149 3.84962 7.01647 3.46618 6.88921L1.72318 6.30871C1.65822 6.2872 1.60169 6.24576 1.56163 6.19029C1.52156 6.13482 1.5 6.06813 1.5 5.99971C1.5 5.93128 1.52156 5.86459 1.56163 5.80912C1.60169 5.75365 1.65822 5.71222 1.72318 5.69071L3.46618 5.11021C3.84962 4.98295 4.19805 4.76792 4.48372 4.48225C4.7694 4.19657 4.98442 3.84815 5.11168 3.46471L5.69218 1.72171ZM16.2957 0.148207C16.3105 0.105497 16.3382 0.068461 16.3751 0.0422495C16.4119 0.016038 16.456 0.00195312 16.5012 0.00195312C16.5464 0.00195313 16.5905 0.016038 16.6273 0.0422495C16.6641 0.068461 16.6919 0.105497 16.7067 0.148207L17.0937 1.30921C17.2662 1.82821 17.6727 2.23471 18.1917 2.40721L19.3527 2.79421C19.3954 2.80901 19.4324 2.83676 19.4586 2.87359C19.4848 2.91042 19.4989 2.9545 19.4989 2.99971C19.4989 3.04491 19.4848 3.08899 19.4586 3.12582C19.4324 3.16265 19.3954 3.1904 19.3527 3.20521L18.1917 3.59221C17.9361 3.67771 17.7039 3.82139 17.5134 4.01193C17.3229 4.20247 17.1792 4.43467 17.0937 4.69021L16.7067 5.85121C16.6919 5.89392 16.6641 5.93095 16.6273 5.95717C16.5905 5.98338 16.5464 5.99746 16.5012 5.99746C16.456 5.99746 16.4119 5.98338 16.3751 5.95717C16.3382 5.93095 16.3105 5.89392 16.2957 5.85121L15.9087 4.69021C15.8232 4.43467 15.6795 4.20247 15.489 4.01193C15.2984 3.82139 15.0662 3.67771 14.8107 3.59221L13.6512 3.20521C13.6085 3.1904 13.5714 3.16265 13.5452 3.12582C13.519 3.08899 13.5049 3.04491 13.5049 2.99971C13.5049 2.9545 13.519 2.91042 13.5452 2.87359C13.5714 2.83676 13.6085 2.80901 13.6512 2.79421L14.8122 2.40721C15.3312 2.23471 15.7377 1.82821 15.9102 1.30921L16.2957 0.148207Z",fill:"#5928ed"})})),e.jsx("defs",{children:e.jsx("clipPath",C.__assign({id:"clip0_6004_60631"},{children:e.jsx("rect",{width:"24",height:"24",fill:"white"})}))})]}))};
|
|
2
|
+
//# sourceMappingURL=SparkleIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SparkleIcon.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),n=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),n=require("react"),o=require("lucide-react");exports.default=function(i){var r,s,a,l,d=i.children,u=i.uploadListTopContent,c=i.defaultHeight,p=void 0===c?300:c,g=i.minHeight,f=void 0===g?150:g,x=i.maxHeight,h=i.isExpanded,v=void 0!==h&&h,m=i.onToggle,b=i.onHeightChange,y=i.styles,_=void 0===y?{}:y,w=i.drawerSummaryComponent,C=i.totalCountsBadge,j=i.headerComponent,H=n.useState(!1),S=H[0],R=H[1],k=n.useState(p),E=k[0],B=k[1],D=n.useRef(0),I=n.useRef(p),L=n.useRef(null),z=n.useRef(0),q="string"==typeof x?parseFloat(x)/100*window.innerHeight:null!=x?x:.4*window.innerHeight;n.useEffect(function(){!v&&L.current&&(z.current=L.current.getBoundingClientRect().height)},[v]);return n.useEffect(function(){if(S){var e=function(e){e.preventDefault();var t=e.clientY-D.current,n=Math.max(f,Math.min(q,I.current+t));B(n),null==b||b(n)},t=function(){R(!1),document.body.style.userSelect=""};return document.addEventListener("mousemove",e),document.addEventListener("mouseup",t),function(){document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",t)}}},[S]),t.jsxs("div",e.__assign({ref:L,style:{position:"relative",width:"100%",minHeight:v?z.current:"auto"}},{children:[t.jsxs("div",e.__assign({style:e.__assign({position:v?"absolute":"relative",zIndex:v?10:"auto",left:0,right:0,top:0,display:"flex",flexDirection:"column",backgroundColor:"#fff",borderRadius:20,border:"1px solid #BDB4FE",boxShadow:"0 4px 8px -2px rgba(16, 24, 40, 0.05), 0 2px 4px -2px rgba(16, 24, 40, 0.06)",height:v?"".concat(E,"px"):"auto",minHeight:v?"".concat(f,"px"):"auto",maxHeight:v?"".concat(E,"px"):"auto",overflow:"hidden",width:"100%"},_.container)},{children:[t.jsxs("div",e.__assign({style:e.__assign({display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",marginBottom:12,flexShrink:0,padding:"12px 20px 0 20px",gap:"16px"},_.header)},{children:[t.jsx("span",e.__assign({style:e.__assign({display:"inline-block",flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:16,fontWeight:500,lineHeight:"24px",color:"#101828",fontFamily:"Inter, sans-serif"},_.title)},{children:j||((null==u?void 0:u.trim())?u:"Data uploaded for your context")})),C]})),w,v&&t.jsx("div",e.__assign({style:e.__assign({flex:1,overflowY:"auto",overflowX:"hidden",minHeight:0,padding:"0 20px",paddingBottom:"36px"},_.body)},{children:d})),v&&t.jsx("div",e.__assign({onMouseDown:function(e){e.preventDefault(),R(!0),D.current=e.clientY,I.current=E,document.body.style.userSelect="none"},style:{position:"absolute",bottom:0,left:0,right:0,backgroundColor:null!==(s=null===(r=_.body)||void 0===r?void 0:r.backgroundColor)&&void 0!==s?s:"#fff",display:"flex",justifyContent:"center",alignItems:"center",padding:"8px 20px",cursor:"ns-resize",userSelect:"none",flexShrink:0}},{children:t.jsx("div",{style:e.__assign({width:48,height:4,borderRadius:4,background:S?null!==(a=_.dragPillActiveColor)&&void 0!==a?a:"#a78bfa":"#d1d5db"},_.dragPill)})}))]})),t.jsx("div",e.__assign({style:{position:v?"absolute":"relative",top:v?"".concat(E,"px"):"auto",width:"100%",display:"flex",justifyContent:"center",height:18,zIndex:v?10:"auto"}},{children:t.jsx("button",e.__assign({onClick:m,"aria-label":v?"Collapse":"Expand",style:e.__assign({position:"absolute",width:"52px",height:"18px",borderBottomLeftRadius:"10px",borderBottomRightRadius:"10px",border:"1px solid rgb(189, 180, 254)",borderTop:"none",backgroundColor:"#fff",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",padding:0},_.notch)},{children:t.jsx(o.ChevronDown,{size:14,color:null!==(l=_.notchArrowColor)&&void 0!==l?l:"#6d28d9",style:{transform:v?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"}})}))}))]}))};
|
|
2
2
|
//# sourceMappingURL=ChatDrawer.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
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
|
+
//# sourceMappingURL=CitationAnchor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CitationAnchor.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"),r=require("react"),o=require("@mui/material"),t=require("react-markdown"),n=require("./CitationAnchor.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=s(t);exports.default=function(t){var s=t.content,d=void 0===s?"":s,c=t.title,l=void 0===c?"":c,x=t.citations,u=void 0===x?{}:x,p=t.styles,f=void 0===p?{}:p,_=t.docData,h=void 0===_?{}:_,g=t.open,j=r.useMemo(function(){return{a:function(e){var r=e.href,o=void 0===r?"":r,t=e.children;return i.jsx(n.default,{href:o,children:t,metaData:{citations:u,docData:h}})}}},[g,u,h]);return i.jsxs(o.Box,e.__assign({sx:{borderRadius:"8px",border:"1px solid #E4E7EC",bgcolor:"#FCFCFD"}},{children:[i.jsx(o.Box,e.__assign({sx:{px:1.5,py:.75,borderBottom:"1px solid #EAECF0"}},{children:i.jsx(o.Typography,e.__assign({sx:{fontSize:"15px",fontWeight:600,color:"#344054",lineHeight:1.25}},{children:l}))})),i.jsx(o.Box,e.__assign({sx:{px:1.5,py:1.1,display:"flex",flexDirection:"column",gap:.95}},{children:i.jsx(o.Box,e.__assign({sx:{display:"flex",flexDirection:"column"}},{children:i.jsx(o.Typography,e.__assign({component:"div",sx:e.__assign({},f)},{children:i.jsx(a.default,e.__assign({components:j},{children:d}))}))}))}))]}))};
|
|
2
|
+
//# sourceMappingURL=CitationRenderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CitationRenderer.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
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"),c=require("./CognitivePopup.js"),d=require("./MoreFunctionsPopup.js"),f=require("./LoaderComponent.js"),v=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"),I=require("./components/SvgConnectors.js");exports.SHARED_MARKDOWN_STYLES=u.SHARED_MARKDOWN_STYLES,exports.default=function(w){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,ce,de,fe=w.componentHeaderText,ve=void 0===fe?a.DEFAULT_COMPONENT_HEADER_TEXT:fe,pe=w.treeData,ge=w.comparisonConfig,he=w.leftColumnTitleText,me=w.rightColumnTitleText,Se=w.markdownStyles,Re=w.resetTrigger,xe=w.displayConfig,_e=void 0===xe?{isHeaderVisible:!0,isToggleVisible:!0,maintainRelativeOrder:!1,isLoading:!0,showDeviationBadges:!1,enableDeviationSchemaBackwardCompatibility:!1,displayEmailNotifier:!0}:xe,ye=w.popupConfig,be=w.deviationData,Ce=void 0===be?{}:be,Ee=w.deviationNodeIdToView,Ae=w.resetDeviationNodeId,Be=w.isProposingFix,Te=void 0!==Be&&Be,Ie=w.proposingFixNodeId,we=w.isRedlineFlow,De=i.useState(_e.maintainRelativeOrder),Oe=De[0],Fe=De[1],je=null!==(D=null==_e?void 0:_e.expandLevels)&&void 0!==D?D:0,Pe=!!(null==_e?void 0:_e.expandAllSections),Ne=!!Oe||!!(null==_e?void 0:_e.showDeviationBadges),ke=i.useState(!1),Le=ke[0],qe=ke[1],Me=i.useState(null),He=Me[0],Ve=Me[1],ze=i.useState(null===(F=null!==(O=null==pe?void 0:pe.newEvaluationResult)&&void 0!==O?O:null==_e?void 0:_e.enableDeviationSchemaBackwardCompatibility)||void 0===F||F)[0],Ge=i.useState(new Set),We=Ge[0],Ke=Ge[1],Ue=i.useState([]),Ye=Ue[0],Xe=Ue[1],Je=i.useState(!1),$e=Je[0],Qe=Je[1],Ze=i.useRef(null),en=i.useRef(null),nn=i.useRef(null),tn=i.useRef(null),on=i.useRef(null),rn=i.useRef(!1),ln=i.useRef(null),sn=i.useRef({}),un=i.useRef([]),an=i.useRef(function(){}),cn=i.useRef(null),dn=i.useRef(function(){}),fn=i.useMemo(function(){return JSON.stringify(Ce||{})},[JSON.stringify(Ce)]),vn=i.useMemo(function(){return Ce||{}},[fn]),pn=i.useMemo(function(){return(null==pe?void 0:pe.cognitive_decisioning)||{}},[pe]),gn=i.useMemo(function(){return e.__assign(e.__assign({},u.SHARED_MARKDOWN_STYLES),Se)},[Se]),hn=i.useRef(null),mn=i.useRef(null),Sn=i.useRef(null),Rn=i.useRef(null),xn=i.useRef(null),_n=i.useRef(null),yn=i.useRef(null),bn=i.useRef(null),Cn=i.useRef(null),En=i.useRef(null),An=g.useComparePopups(hn),Bn=An.cognitivePopup,Tn=An.setCognitivePopup,In=An.moreFunctions,wn=An.setMoreFunctions,Dn=An.position,On=An.setPosition,Fn=An.activeBadgeId,jn=An.summaryPopup,Pn=An.setSummaryPopup,Nn=An.closeSummaryPopup,kn=An.setActiveBadgeId,Ln=An.popupRef,qn=An.handleOpenCognitiveCompare,Mn=An.openCognitivePopupFromState,Hn=An.closeCognitivePopup,Vn=An.closeMoreFunctionsPopup,zn=i.useMemo(function(){var e,n,i,t,o,r,l;return{fields:null!==(e=null==ge?void 0:ge.fields)&&void 0!==e?e:u.DEFAULT_FIELD_CONFIG,thresholds:{high:null!==(i=null===(n=null==ge?void 0:ge.thresholds)||void 0===n?void 0:n.high)&&void 0!==i?i:u.DEFAULT_COMPARISON_CONFIG.thresholds.high,medium:null!==(o=null===(t=null==ge?void 0:ge.thresholds)||void 0===t?void 0:t.medium)&&void 0!==o?o:u.DEFAULT_COMPARISON_CONFIG.thresholds.medium,exact:null!==(l=null===(r=null==ge?void 0:ge.thresholds)||void 0===r?void 0:r.exact)&&void 0!==l?l:u.DEFAULT_COMPARISON_CONFIG.thresholds.exact}}},[ge]),Gn=i.useState(null),Wn=Gn[0];Gn[1];var Kn=null===(N=null===(j=null==pe?void 0:pe.documents)||void 0===j?void 0:j[null===(P=null==pe?void 0:pe.input_index_map)||void 0===P?void 0:P[0]])||void 0===N?void 0:N.title,Un=null===(q=null===(k=null==pe?void 0:pe.documents)||void 0===k?void 0:k[null===(L=null==pe?void 0:pe.input_index_map)||void 0===L?void 0:L[1]])||void 0===q?void 0:q.title,Yn=s.safeStringify(he||Kn||"Uploaded Contract"),Xn=null===(z=null===(V=null===(M=null==pe?void 0:pe.documents)||void 0===M?void 0:M[null===(H=null==pe?void 0:pe.input_index_map)||void 0===H?void 0:H[0]])||void 0===V?void 0:V.metadata)||void 0===z?void 0:z.file_name,Jn=s.safeStringify(Xn),$n=null===(U=null===(K=null===(G=null==pe?void 0:pe.documents)||void 0===G?void 0:G[null===(W=null==pe?void 0:pe.input_index_map)||void 0===W?void 0:W[1]])||void 0===K?void 0:K.metadata)||void 0===U?void 0:U.file_name,Qn=s.safeStringify($n),Zn=s.safeStringify(me||Un||"Reference Template"),ei=p.useCognitiveTreeData(pe,Oe,vn,zn,ze),ni=ei.activeProposed,ii=ei.existingRule,ti=ei.proposedSections,oi=ei.existingSections,ri=ei.visibleFields,li=ei.parentDeviationRecord,si=ei.deviationNumberRegistry,ui=ei.parseError;i.useEffect(function(){ui&&Ve("Failed to load comparison: ".concat(ui))},[ui]);var ai=ti.length>0||oi.length>0,ci=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(ti),i(oi),"".concat(e,":").concat(n)},[we,ti,oi]);i.useEffect(function(){if(ti.length||oi.length)if(Pe){var e={},n={},i=function(i,t){i.forEach(function(i,o){var r,l=Oe?"".concat(t,"-").concat(o):String(o);e[l]=!0;var s=function(e,i){null==e||e.forEach(function(e,t){var o,r="".concat(i,"-").concat(t);n[r]=!0,(null===(o=e.subsections)||void 0===o?void 0:o.length)&&s(e.subsections,r)})};(null===(r=i.subsections)||void 0===r?void 0:r.length)&&s(i.subsections,String(o))})};i(ti,"left"),i(oi,"right"),Wi(e),Ui(n)}else if(je>0){var t={},o={},r=function(e,n,i){e.forEach(function(e,r){var l;if(i>=1){var s=Oe?"".concat(n,"-").concat(r):String(r);t[s]=!0}var u=function(e,n,t){t>i||null==e||e.forEach(function(e,i){var r,l="".concat(n,"-").concat(i);o[l]=!0,(null===(r=e.subsections)||void 0===r?void 0:r.length)&&u(e.subsections,l,t+1)})};(null===(l=e.subsections)||void 0===l?void 0:l.length)&&i>=2&&u(e.subsections,String(r),2)})};r(ti,"left",je),r(oi,"right",je),Wi(t),Ui(o)}},[Pe,je,ti,oi,Oe]);var di=h.useSectionRefs(ri.map(function(e){return e.key}),Math.max(ti.length,oi.length)),fi=di.leftRefs,vi=di.rightRefs,pi=di.sectionLeftRefs,gi=di.sectionRightRefs,hi=di.lhsBadgeRefs,mi=di.rhsBadgeRefs,Si=di.sectionRightRowRefs,Ri=di.subSectionLeftRefs,xi=di.subSectionRightRefs,_i=di.sectionRowRefs,yi=di.getSectionRowRef,bi=di.getSubSectionRef,Ci=di.getBadgeRef,Ei=T.useSideBySide({maintainRelativeOrder:Oe,proposedSections:ti,existingSections:oi,leftContainerRef:bn,rightContainerRef:Sn,scrollContainerRef:hn,sectionLeftRefs:pi,sectionRightRefs:gi,subSectionLeftRefs:Ri,subSectionRightRefs:xi,lhsBadgeRefs:hi,rhsBadgeRefs:mi,sectionRowRefs:_i,sectionRightRowRefs:Si,rhsTopSpacerRef:Rn,rhsBottomSpacerRef:xn,lhsTopSpacerRef:_n,lhsBottomSpacerRef:yn,calculateLinesRef:an,setConnectedSections:Ke,setConnectedLines:Xe,cachedConnectedPositions:un,closeMoreFunctionsPopup:Vn,setErrorToast:Ve,moreFunctions:In,closeSummaryPopup:Nn}),Ai=Ei.isSideBySide,Bi=Ei.isArrowVisible,Ti=Ei.setIsArrowVisible,Ii=Ei.isResizing,wi=Ei.setIsResizing,Di=Ei.isSideBySideLoading,Oi=Ei.activeSideBySideSection,Fi=Ei.scrollLock,ji=Ei.sideBySideCacheRef,Pi=Ei.isSideBySideRef,Ni=Ei.activeSideBySideRightSectionRef,ki=Ei.activeSideBySideSectionRef,Li=Ei.sideBySideLineRef,qi=Ei.highlightedClauseRefs,Mi=Ei.clearClauseHighlight,Hi=Ei.resetSideBySide,Vi=Ei.activateSideBySide,zi=m.useAccordionState({maintainRelativeOrder:!!Oe,proposedSections:ti,existingSections:oi,activeSideBySideSection:Oi,connectedSections:We,resetSideBySide:Hi,setConnectedSections:Ke,setConnectedLines:Xe,cachedConnectedPositions:un,svgContainerRef:Ze,isAnimatingRef:rn,animationTimerRef:ln,calculateLinesRef:an,sectionLeftRefs:pi,sectionRightRefs:gi,subSectionLeftRefs:Ri,subSectionRightRefs:xi}),Gi=zi.expandedSections,Wi=zi.setExpandedSections,Ki=zi.expandedSubSections,Ui=zi.setExpandedSubSections,Yi=zi.handleSubSectionToggle,Xi=zi.toggleSection,Ji=zi.forceExpandCrossWiredSections,$i=function(){var e,n;if(null!=Oi){var i=null===(e=pi.current[Oi])||void 0===e?void 0:e.current,t=null===(n=gi.current[Oi])||void 0===n?void 0:n.current,o=Sn.current;if(i&&t&&o){var r=i.getBoundingClientRect(),l=t.getBoundingClientRect(),s=o.getBoundingClientRect(),u=r.top-s.top,a=l.top-s.top-u;o.scrollBy({top:a,behavior:"smooth"})}}},Qi=i.useCallback(function(e){null==e||e.stopPropagation(),Qe(function(e){var n=!e;return n&&requestAnimationFrame(function(){$i()}),n})},[$i]);i.useEffect(function(){we&&"off"!==ci&&"0:0"!==ci&&(ji.current=null,un.current=[],requestAnimationFrame(function(){var e;null===(e=an.current)||void 0===e||e.call(an)}))},[we,ci]);var Zi=i.useMemo(function(){var e=new Map,n=new Map,i=1;if(Oe)ti.forEach(function(n){!n.title&&!n.content||n.id&&e.set(n.id,i++)}),oi.forEach(function(t){if(t.id){var o=ti.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(ti.length,oi.length),o=0;o<t;o++){var r=ti[o],l=oi[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}},[ti,oi,Oe]),et=ii.analysis,nt=s.safeStringify(null===(X=null===(Y=null==et?void 0:et.rule_difference_comparison)||void 0===Y?void 0:Y.summary)||void 0===X?void 0:X.overall_summary),it=!!nt.match(/<ai_reasoning>([\s\S]*?)<\/ai_reasoning>/i),tt=null!==(J=null==pe?void 0:pe.base_root_id)&&void 0!==J?J:"-1";null==pe||pe[tt];var ot=ze?null!==(ue=null!==(re=Ce&&(null===(oe=null==Ce?void 0:Ce[tt])||void 0===oe?void 0:oe.evaluation_result))&&void 0!==re?re:null===(se=null===(le=null==pe?void 0:pe.nodes)||void 0===le?void 0:le[tt])||void 0===se?void 0:se.evaluation_result)&&void 0!==ue?ue:null:null!==(te=null!==(Z=Ce&&(null===(Q=null===($=null==Ce?void 0:Ce[tt])||void 0===$?void 0:$.evaluation_result)||void 0===Q?void 0:Q[0]))&&void 0!==Z?Z:null===(ie=null===(ne=null===(ee=null==pe?void 0:pe.nodes)||void 0===ee?void 0:ee[tt])||void 0===ne?void 0:ne.evaluation_result)||void 0===ie?void 0:ie[0])&&void 0!==te?te:null,rt=s.extractDeviationScore(ot),lt=s.generateColorPalette(null!==(de=null===(ce=null===(ae=null==ot?void 0:ot.evaluation_outputs)||void 0===ae?void 0:ae.metadata)||void 0===ce?void 0:ce.label_color)&&void 0!==de?de:a.DEFAULT_DEVIAION_COLOR),st=i.useRef(Hi);i.useEffect(function(){st.current=Hi},[Hi]);var ut=i.useRef(Hn);i.useEffect(function(){ut.current=Hn},[Hn]);var at=i.useCallback(function(e,n,i,t,o,r){return co.current(e,n,i,t,o,r)},[]),ct=i.useCallback(function(e,n,i,t,o){return fo.current(e,n,i,t,o)},[]),dt=i.useCallback(function(){return vo.current()},[]),ft=i.useCallback(function(e,n){return po.current(e,n)},[]),vt=i.useCallback(function(e){return go.current(e)},[]),pt=i.useCallback(function(e){return ho.current(e)},[]),gt=i.useCallback(function(){return mo.current()},[]),ht=i.useCallback(function(){var e,n;Mi(),null===(e=st.current)||void 0===e||e.call(st),Qe(!1),Ke(new Set),Xe([]),un.current=[],Ot([]),jt(null),Pn(a.EMPTY_SUMMARY_POPUP_STATE),null===(n=ut.current)||void 0===n||n.call(ut),requestAnimationFrame(function(){var e;null===(e=an.current)||void 0===e||e.call(an)})},[]),mt=i.useRef(ht);i.useEffect(function(){mt.current=ht},[ht]),i.useEffect(function(){Re&&mt.current()},[Re]);var St=i.useCallback(function(n,i,t,o,r,l,u){var a,c,d,f=s.safeStringify(null==i?void 0:i.id)||s.safeStringify(null==t?void 0:t.id)||"",v=(f?pn[f]:null)||(null==i?void 0:i.cognitiveData)||(null==t?void 0:t.cognitiveData)||{section_id:f,decisioning:[],gap:[],relevance_score:0},p=null!==(c=null===(a=_i.current[o])||void 0===a?void 0:a.current)&&void 0!==c?c:null;return{isLoading:null!==(d=null==_e?void 0:_e.isLoading)&&void 0!==d&&d,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:v,anchorEl:n,sectionAnchorEl:p,badgeStyle:l||null,sectionIdx:o,docData:{documents:null==pe?void 0:pe.documents,input_index_map:null==pe?void 0:pe.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 c=(null==i?void 0:i.evaluationResult)||(null==t?void 0:t.evaluationResult)||{},d=(null===(n=null==c?void 0:c.deviation_entries)||void 0===n?void 0:n[a])||(null===(r=null==c?void 0:c.deviations)||void 0===r?void 0:r[a])||null;return d?e.__assign(e.__assign(e.__assign({},c),d),{deviation_summary:(null==d?void 0:d.deviation_summary)||(null==c?void 0:c.deviation_summary),deviation_title:(null==d?void 0:d.deviation_title)||(null==c?void 0:c.deviation_title),deviation_impact:(null==d?void 0:d.deviation_impact)||(null==c?void 0:c.deviation_impact),deviation_explanation:(null==d?void 0:d.deviation_explanation)||(null==c?void 0:c.deviation_explanation),evaluation_outputs:(null==d?void 0:d.evaluation_outputs)||(null==c?void 0:c.evaluation_outputs),cognitive_decisioning:(null==d?void 0:d.cognitive_decisioning)||(null==c?void 0:c.cognitive_decisioning)}):u(l)}(),isOrphan:!!r}},[pn,pe]),Rt=i.useCallback(function(e,n,i,t,o,r){var l;if(e.stopPropagation(),In.open&&In.sectionIdx===o)Vn();else{var u=e.currentTarget,a="left";(null===(l=Sn.current)||void 0===l?void 0:l.contains(u))&&(a="right");Mi(),Pi.current&&Hi(),Ke(new Set),Xe([]),un.current=[],Hn(),jn.open?Wt():Nn(),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=mi.current[l])||void 0===e?void 0:e.current:null===(n=hi.current[l])||void 0===n?void 0:n.current}return"right"===a?null===(i=mi.current[o])||void 0===i?void 0:i.current:null===(t=hi.current[o])||void 0===t?void 0:t.current}()||u;wn(St(e,n,t,o,i,r))})}},[In.open,In.sectionIdx,Vn,Nn,St]),xt=i.useCallback(function(){var e=In.sectionIdx,n=In.isOrphan;Vn(),Nn(),null!==e&&(n?Ve("No counterpart exists to connect to."):(Ji(e),Mi(),Pi.current&&Hi(),Xe([]),un.current=[],Ke(function(n){return n.has(e)?new Set:new Set([e])}),setTimeout(function(){an.current&&an.current()},50)))},[In.sectionIdx,In.isOrphan,Vn,Nn,Hi]),_t=i.useCallback(function(){var e=on.current;if(e){on.current=null;var n=ti.findIndex(function(n){return n.id===e}),i=oi.findIndex(function(n){return n.id===e}),t=-1===n?s.findKeyPathByNodeId(ti,e):null,o=-1===i?s.findKeyPathByNodeId(oi,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?(qi.current.add(r),s.scrollAndHighlightClause(r,n)):t++<i&&requestAnimationFrame(o)};requestAnimationFrame(o)};if(Oe)-1!==r&&bn.current&&a(function(){return u(n,t,pi,Ri)},bn.current),-1!==l&&Sn.current&&a(function(){return u(i,o,gi,xi)},Sn.current);else{var c=hn.current;if(!c)return;a(function(){return-1!==r?u(n,t,pi,Ri):u(i,o,gi,xi)},c)}}},[ti,oi,Oe,pi,gi,Ri,xi,bn,Sn,hn]),yt=i.useCallback(function(n){if(n){Mi(),Hi(),Ke(new Set),Xe([]),un.current=[],Nn(),Hn();var i=ti.findIndex(function(e){return e.id===n}),t=oi.findIndex(function(e){return e.id===n}),o=-1===i?s.findKeyPathByNodeId(ti,n):null,r=-1===t?s.findKeyPathByNodeId(oi,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;on.current=n,Wi(function(n){var i,t=e.__assign({},n),o=!1;-1!==l&&(t[i=Oe?"left-".concat(l):String(l)]||(t[i]=!0,o=!0));-1!==u&&(t[i=Oe?"right-".concat(u):String(u)]||(t[i]=!0,o=!0));return o?t:n}),Ui(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(){on.current===n&&bt.current()})},50)}else console.warn('scrollToAndHighlightClause: nodeId "'.concat(n,'" not found'))}},[ti,oi,Oe,Wi,Ui,Hi,Nn,Hn]),bt=i.useRef(_t);i.useEffect(function(){bt.current=_t},[_t]);var Ct=i.useRef(null);i.useEffect(function(){if(Wn){var e=zn.fields.find(function(e){return e.analysisKey===Wn||e.key===Wn});if(e){var n=fi.current[e.key]||vi.current[e.key];(null==n?void 0:n.current)&&setTimeout(function(){return n.current.scrollIntoView({behavior:"smooth",block:"center"})},150)}}},[Wn,zn.fields]);var Et=i.useCallback(function(e){var n,i,t,o,r,l,s,u,a,c=null===(n=null==et?void 0:et.rule_difference_comparison)||void 0===n?void 0:n.fields;if(!c||!c[e])return{score:0,relation:"",highlightsA:[],highlightsB:[],hasContent:!1};var d=c[e],f=(null==d?void 0:d.relation)||(null===(t=null===(i=null==d?void 0:d.highlights)||void 0===i?void 0:i.ruleA_spans)||void 0===t?void 0:t.length)||(null===(r=null===(o=null==d?void 0:d.highlights)||void 0===o?void 0:o.ruleB_spans)||void 0===r?void 0:r.length)||(null==d?void 0:d.mappings)&&d.mappings.length>0;if(d.mappings){var v=d.mappings[0]||{};return{score:d.score,relation:v.relation||"",highlightsA:(null===(l=v.highlights)||void 0===l?void 0:l.ruleA_spans)||[],highlightsB:(null===(s=v.highlights)||void 0===s?void 0:s.ruleB_spans)||[],hasContent:!!f}}return{score:d.score,relation:d.relation||"",highlightsA:(null===(u=d.highlights)||void 0===u?void 0:u.ruleA_spans)||[],highlightsB:(null===(a=d.highlights)||void 0===a?void 0:a.ruleB_spans)||[],hasContent:!!f}},[et]),At=E.useStyleHelpers({proposedSections:ti,existingSections:oi,maintainRelativeOrder:Oe,cognitiveMap:pn,deviationData:Ce,treeData:pe,resolvedComparisonConfig:zn}),Bt=At.getSectionCompareStyle,Tt=At.getSubSectionCompareStyle,It=At.getDeviationStyleByKey,wt=B.useLinesCalculator({containerRef:en,leftContainerRef:bn,rightContainerRef:Sn,svgContainerRef:Ze,pathRefs:sn,leftHeaderRef:nn,rightHeaderRef:tn,proposedSections:ti,existingSections:oi,visibleFields:ri,leftRefs:fi,rightRefs:vi,sectionLeftRefs:pi,sectionRightRefs:gi,subSectionLeftRefs:Ri,subSectionRightRefs:xi,lhsBadgeRefs:hi,rhsBadgeRefs:mi,sectionRowRefs:_i,expandedSections:Gi,expandedSubSections:Ki,connectedSections:We,isSideBySide:Ai,activeSideBySideSection:Oi,maintainRelativeOrder:Oe,cognitiveMap:pn,getSectionCompareStyle:Bt,getSubSectionCompareStyle:Tt,getDeviationStyleByKey:It,isArrowVisible:Bi,isAnimatingRef:rn,isSideBySideRef:Pi,sideBySideCacheRef:ji,sideBySideLineRef:Li,activeSideBySideSectionRef:ki,activeSideBySideRightSectionRef:Ni,connectedLines:Ye,setConnectedLines:Xe,cachedConnectedPositions:un,calculateLinesRef:an,resizeTimerRef:cn,scrollLock:Fi,scrollSyncLocked:$e,handleResizeRef:dn,activeProposed:ni,existingRule:ii,analysisData:et,pendingScrollTargetRef:Cn,pendingScrollCallbackRef:En,resolvedComparisonConfig:zn,getFieldData:Et}),Dt=wt.lines,Ot=wt.setLines,Ft=wt.overallConnector,jt=wt.setOverallConnector,Pt=wt.svgDimensions,Nt=wt.handleColumnScroll;i.useEffect(function(){jn.anchorEl&&requestAnimationFrame(function(){requestAnimationFrame(function(){var e;null===(e=an.current)||void 0===e||e.call(an)})})},[jn.anchorEl,$e]);var kt=i.useCallback(function(){Mi(),Qe(!1),Wi({}),Ui({}),Hi(),Ke(new Set),Xe([]),un.current=[],Nn(),Hn(),Vn(),requestAnimationFrame(function(){an.current&&an.current()})},[Wi,Ui,Hi,Nn,Hn,Vn]);i.useEffect(function(){Ai||0!==We.size||Qe(!1)},[Ai,We]);var Lt=i.useMemo(function(){return Object.values(Gi).some(Boolean)||Object.values(Ki).some(Boolean)},[Gi,Ki]),qt=i.useRef(null),Mt=i.useRef(0),Ht=i.useRef(0),Vt=i.useRef(0),zt=A.useResizeHandler({timerRef:qt,ruleComponentRef:mn,scrollContainerRef:hn,containerRef:en,maintainRelativeOrder:Oe,proposedSections:ti,existingSections:oi,isSideBySideRef:Pi,activeSideBySideSectionRef:ki,activeSideBySideRightSectionRef:Ni,sectionRowRefs:_i,sectionRightRowRefs:Si,sectionLeftRefs:pi,sectionRightRefs:gi,subSectionLeftRefs:Ri,subSectionRightRefs:xi,lhsBadgeRefs:hi,rhsBadgeRefs:mi,leftContainerRef:bn,rightContainerRef:Sn,calculateLinesRef:an,handleResizeRef:dn,setIsResizing:wi,setIsArrowVisible:Ti,sideBySideCacheRef:ji,cachedConnectedPositions:un}).handleResize;i.useEffect(function(){dn.current=zt},[zt,dn]),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 mn.current&&o.push(e(mn.current,Mt,n,function(){return dn.current()},function(){})),hn.current&&o.push(e(hn.current,Ht,i,function(){return dn.current()},function(){return an.current()})),en.current&&o.push(e(en.current,Vt,t,function(){return dn.current()},function(){return an.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(){Pi.current=Ai},[Ai]),i.useEffect(function(){ki.current=Oi},[Oi]);var Gt=i.useCallback(function(){var e,n=In.sectionIdx,i=In.isOrphan;if(Nn(),null!=n){var t="left";In.anchorEl&&(null===(e=Sn.current)||void 0===e?void 0:e.contains(In.anchorEl))&&(t="right"),Ji(n),Vi(n,i,{sourceSide:t})}},[Vi,In.isOrphan,In.sectionIdx,In.anchorEl,Nn]),Wt=i.useCallback(function(){Nn(),Hi(),Ke(new Set),Xe([]),un.current=[]},[Nn,Hi]),Kt=null!==In.sectionIdx&&We.has(In.sectionIdx),Ut=S.useDeviationNavigation({proposedSections:ti,existingSections:oi,parentDeviationRecord:li,expandedSections:Gi,maintainRelativeOrder:!!Oe,scrollContainerRef:hn,leftContainerRef:bn,rightContainerRef:Sn,lhsBadgeRefs:hi,rhsBadgeRefs:mi}),Yt=Ut.showDeviationNavigation,Xt=Ut.showOpenNodeRef,Jt=Ut.adjustScrollForPopup,$t=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;Hn();var a="left";(null===(r=Sn.current)||void 0===r?void 0:r.contains(u))&&(a="right");var c=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=mi.current[l])||void 0===e?void 0:e.current:null===(i=hi.current[l])||void 0===i?void 0:i.current}return"right"===a?null===(t=mi.current[n])||void 0===t?void 0:t.current:null===(o=hi.current[n])||void 0===o?void 0:o.current};if(i)return Hi(),Ke(new Set),Xe([]),un.current=[],void(l&&(Ji(n),requestAnimationFrame(function(){var e=c()||u;Pn({open:!0,anchorEl:e,summary:t,displayImpact:o})})));Ji(n),l?requestAnimationFrame(function(){Vi(n,i,{toggleIfSame:!1,sourceSide:a,onReady:function(){var e=c()||u;Pn({open:!0,anchorEl:e,summary:t,displayImpact:o})}})}):requestAnimationFrame(function(){Vi(n,i,{toggleIfSame:!1,sourceSide:a})})},[Vi,Hn,Pn,Hi,Ji]),Qt=i.useMemo(function(){var e;if(!Ee)return null;var n=null===(e=null==Ee?void 0:Ee.id)||void 0===e?void 0:e.split(":")[0];for(var i in li){if((li[i]||[]).some(function(e){return e.id===n}))return i}return null},[Ee,li]),Zt=i.useRef({id:null,triggerMs:null}),eo=i.useRef(null);i.useEffect(function(){var n;if(null==Ee?void 0:Ee.id){var i=Number(Ee.trigger),t=Zt.current;if((null==t?void 0:t.triggerMs)!==i){if(!(Ee.id.includes(":")&&/:\d+$/.test(Ee.id)))return Zt.current={id:Ee.id,triggerMs:i},void yt(Ee.id);var o=null===(n=null==Ee?void 0:Ee.id)||void 0===n?void 0:n.split(":"),r=o[0],l=o[1],u=null!=l?l:"0";eo.current!==Ee.id&&(Nn(),Hn(),Hi(),Ke(new Set),Xe([]),un.current=[],eo.current=Ee.id);var a=!1,c=0,d=null,f=150,v=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(){Zt.current={id:Ee.id,triggerMs:i}},h=null,m=null;for(var S in li){var R=li[S].find(function(e){return e.id===r});if(R){h=S,m=R;break}}if(m&&h){var x=ti.findIndex(function(e){return e.id===h}),_=oi.findIndex(function(e){return e.id===h}),y=-1===x&&-1!==_,b=v(ti,m.id),C=v(oi,m.id);if(b&&!C&&!y){var E=b.split("-"),A=Number(E[0]);if(Oe){var B=null===(t=null===(n=ti[A])||void 0===n?void 0:n.refIndexes)||void 0===t?void 0:t[0],T=oi.findIndex(function(e){return e.selfIndex===B});-1!==T&&(A=T)}C=e.__spreadArray([A],E.slice(1),!0).join("-")}if(b||C){var I=b?Number(b.split("-")[0]):x,w=C?Number(C.split("-")[0]):_,D=ti[I],O=oi[w],F=D&&!D.title&&!D.content,j=O&&!O.title&&!O.content,P=y||(!b&&!!C||F&&!j);if(P){if(!(Oe?!!Gi["right-".concat(w)]:!!Gi[String(w)])&&w>=0)return Xi(w,"right"),c+=1,void(d=setTimeout(p,450))}else if(!(Oe?!!Gi["left-".concat(I)]:!!Gi[String(I)])&&I>=0)return Xi(I,"left"),c+=1,void(d=setTimeout(p,450));var N,k=b||"",L=C||"",q="".concat(m.id).concat(s.DEVIATION_BADGE_SEPARATOR).concat(u).concat(s.DEVIATION_BADGE_SEPARATOR).concat(k).concat(s.DEVIATION_BADGE_SEPARATOR).concat(L),M="".concat(m.id).concat(s.DEVIATION_BADGE_SEPARATOR).concat(u),H=null===(o=hi.current[M])||void 0===o?void 0:o.current,V=null===(l=mi.current[M])||void 0===l?void 0:l.current,z=P||!H&&!!V,G=z?V:H;if(N=Oe?z?Sn.current:bn.current:hn.current,G&&N){var W=G.getBoundingClientRect();if(0===W.height)return void((c+=1)<2?d=setTimeout(p,f):g());var K=N.getBoundingClientRect(),U=W.top-K.top+N.scrollTop-K.height/2+W.height/2,Y=b&&b.includes("-")||C&&C.includes("-"),X=function(){var n,i,t,o,r;if(!a){g();var l=G instanceof Element?window.getComputedStyle(G).color:"";H&&(H.style.transition="box-shadow 300ms ease-in-out",H.style.boxShadow="0 0 10px ".concat(l)),V&&(V.style.transition="box-shadow 300ms ease-in-out",V.style.boxShadow="0 0 10px ".concat(l)),setTimeout(function(){H&&(H.style.boxShadow=""),V&&(V.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,c=(null===(t=m.evaluationResult)||void 0===t?void 0:t.evaluation_outputs)||m.evaluation_outputs;if(!(!!H&&!!V)){var d=z?(null===(o=mi.current[Y?M:w])||void 0===o?void 0:o.current)||V:(null===(r=hi.current[Y?M:I])||void 0===r?void 0:r.current)||H;return Jt(d,function(){Pn({open:!0,anchorEl:d,displayImpact:Ee.displayImpact,summary:e.__assign(e.__assign({},s),{evaluation_outputs:c})})},{skipScroll:!0}),void(null==Ae||Ae())}Vi(q,!1,{toggleIfSame:!1,sourceSide:y?"right":"left",onReady:function(){var n,i;g();var t=z?(null===(n=mi.current[M])||void 0===n?void 0:n.current)||V:(null===(i=hi.current[M])||void 0===i?void 0:i.current)||H;Pn({open:!0,anchorEl:t,displayImpact:Ee.displayImpact,summary:e.__assign({},s)}),null==Ae||Ae()}})}};Math.abs(N.scrollTop-U)<=2?X():(Cn.current=U,En.current=X,N.scrollTo({top:U,behavior:"smooth"}),d&&clearTimeout(d),d=setTimeout(function(){if(En.current){Cn.current=null;var e=En.current;En.current=null,e()}},800))}else(c+=1)<2?d=setTimeout(p,f):g()}else(c+=1)<2?d=setTimeout(p,f):g()}else(c+=1)<2?d=setTimeout(p,f):g()}};return d=setTimeout(p,f),function(){a=!0,d&&clearTimeout(d)}}}},[Ee,li,ti,oi,Oe,Gi,Xi,Vi,Pn,yt]),i.useEffect(function(){var n,i,t;if(jn.open){var o=jn.anchorEl;if(o&&!o.isConnected){var r=(null===(n=o.dataset)||void 0===n?void 0:n.deviationRefId)||Object.keys(hi.current).find(function(e){var n,i;return(null===(i=null===(n=hi.current[e])||void 0===n?void 0:n.current)||void 0===i?void 0:i.textContent)===o.textContent})||Object.keys(mi.current).find(function(e){var n,i;return(null===(i=null===(n=mi.current[e])||void 0===n?void 0:n.current)||void 0===i?void 0:i.textContent)===o.textContent});if(r){var l=(null===(i=mi.current[r])||void 0===i?void 0:i.current)||(null===(t=hi.current[r])||void 0===t?void 0:t.current);l&&l.isConnected&&Pn(function(n){return e.__assign(e.__assign({},n),{anchorEl:l})})}}}},[jn.open,jn.anchorEl,$e,We,Gi]);var no=Bn.open,io=Bn.sectionIdx,to=Bn.isOrphan,oo=Bn.badgeStyle,ro=Bn.anchorEl,lo=Bn.sectionAnchorEl;i.useEffect(function(){var n;if(no&&null!=io&&io!==tt){var i="string"==typeof io?io.split(s.DEVIATION_BADGE_SEPARATOR)[0]:null,t=function(e,n){var i;if(!e||!Array.isArray(e))return null;for(var o=0,r=e;o<r.length;o++){var l=r[o];if(l.id===n)return l;if(null===(i=l.subsections)||void 0===i?void 0:i.length){var s=t(l.subsections,n);if(s)return s}}return null},o=i&&"string"==typeof i?t(ti,i):null,r=i&&"string"==typeof i?t(oi,i):null,l="number"==typeof io?ti[io]||null:o||i&&((null===(n=null==pe?void 0:pe.nodes)||void 0===n?void 0:n[i])||(null==pe?void 0:pe[i]))||null,u="number"==typeof io?oi[io]||null:r,a=St(ro,l,u,io,to,oo);Tn(function(n){return n.open?n.cognitiveData===a.cognitiveData&&n.deviationData===a.deviationData&&n.sectionTitle===a.sectionTitle&&n.refSectionTitle===a.refSectionTitle?n:e.__assign(e.__assign(e.__assign({},n),a),{open:!0,anchorEl:n.anchorEl,sectionAnchorEl:n.sectionAnchorEl}):n})}},[no,io,to,oo,ro,lo,ti,oi,pe,Ce,St]);var so=i.useCallback(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,c=e.sectionOffset;return n.jsx(x.default,{section:i,keyPath:t,depth:r,columnKey:s,parentNodeId:a,sectionOffset:c})},[]),uo=i.useMemo(function(){return ti.map(function(e,i){var t;return n.jsx(_.default,{section:e,idx:i},null!==(t=null==e?void 0:e.id)&&void 0!==t?t:"left-row-".concat(i))})},[ti]),ao=i.useMemo(function(){return oi.map(function(e,i){var t;return n.jsx(y.default,{section:e,idx:i},null!==(t=null==e?void 0:e.id)&&void 0!==t?t:"right-row-".concat(i))})},[oi]),co=i.useRef(Rt);i.useEffect(function(){co.current=Rt},[Rt]);var fo=i.useRef($t);i.useEffect(function(){fo.current=$t},[$t]);var vo=i.useRef(Wt);i.useEffect(function(){vo.current=Wt},[Wt]);var po=i.useRef(Xi);i.useEffect(function(){po.current=Xi},[Xi]);var go=i.useRef(Yi);i.useEffect(function(){go.current=Yi},[Yi]);var ho=i.useRef(so);i.useEffect(function(){ho.current=so},[so]);var mo=i.useRef(Hi);i.useEffect(function(){mo.current=Hi},[Hi]);var So=i.useMemo(function(){return{maintainRelativeOrder:!!Oe,showDeviationBadges:Ne,isProposingFix:Te,proposingFixNodeId:Ie,isRedlineFlow:we,isSideBySide:Ai,activeSideBySideSection:Oi,scrollSyncLocked:$e,toggleScrollSyncLocked:Qi,summaryPopupAnchorEl:jn.anchorEl,connectedSections:We,proposedSections:ti,existingSections:oi,deviationNumberRegistry:si,treeData:pe,displayConfig:_e,resolvedMarkdownStyles:gn,unifiedNumbering:Zi,expandedSections:Gi,expandedSubSections:Ki,setExpandedSubSections:Ui,getSectionCompareStyle:Bt,getSubSectionCompareStyle:Tt,getBadgeRef:Ci,getSectionRowRef:yi,getSubSectionRef:bi,sectionLeftRefs:pi,sectionRightRefs:gi,sectionRowRefs:_i,sectionRightRowRefs:Si,subSectionLeftRefs:Ri,subSectionRightRefs:xi,lhsBadgeRefs:hi,rhsBadgeRefs:mi,openMoreFunctionsPopup:at,handleOpenSummaryPopup:ct,openSummaryPopup:ct,handleCloseSummaryPopup:dt,toggleSection:ft,handleSubSectionToggle:vt,renderSubSectionAccordion:pt,resetSideBySide:gt,setConnectedSections:Ke,setConnectedLines:Xe,cachedConnectedPositions:un,showDeviationNavigation:Yt,showOpenNodeRef:Xt,deviationNodeIdToView:null==Ee?void 0:Ee.id,deviationTargetParentId:Qt}},[Oe,Ne,Te,Ie,we,Ai,Oi,$e,Qi,jn.anchorEl,We,ti,oi,si,pe,_e,gn,Zi,Gi,Ki,Ui,Bt,Tt,Ci,yi,bi,Yt,Xt,Ee,Qt]);return n.jsx(C.CompareContextProvider,e.__assign({value:So},{children:n.jsxs(t.Box,e.__assign({ref:mn,sx:e.__assign(e.__assign({display:"flex",flexDirection:"column",height:"100%",bgcolor:"#F6F7F9B2",fontFamily:'"Plus Jakarta Sans", sans-serif'},Oe?{}:{overflow:"visible"}),{position:"relative"})},{children:[Le&&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(f.default,{})})),jn.open&&n.jsx(b.default,{open:jn.open,anchorEl:jn.anchorEl,containerEl:Ct.current,clipTopEl:nn.current,scrollContainerEl:hn.current,onClose:Wt,summary:jn.summary,displayImpact:jn.displayImpact,isScrollLocked:$e}),n.jsx(d.default,{open:In.open,anchorEl:In.anchorEl,maintainRelativeOrder:!!Oe,sectionTitle:In.sectionTitle,referenceSectionTitle:In.refSectionTitle,onClose:Vn,onOpenCognitiveCompare:qn,onOpenSideBySide:Gt,onConnect:xt,isConnected:Kt,isOrphan:In.isOrphan}),Bn.open&&n.jsx(c.default,{open:Bn.open,popupRef:Ln,position:Dn,popupConfig:ye,onClose:function(){On(null),Tn(function(n){return e.__assign(e.__assign({},n),{open:!1})}),kn(null)},markdownStyles:Se,sectionTitle:Jn,referenceSectionTitle:Qn,cognitiveData:Bn.cognitiveData,anchorEl:Bn.anchorEl,sectionAnchorEl:Bn.sectionAnchorEl,scrollContainerEl:hn.current,badgeStyle:Bn.badgeStyle,docData:Bn.docData,deviationData:Bn.deviationData,isLoading:Bn.isLoading}),n.jsx(t.Snackbar,e.__assign({open:!!He,autoHideDuration:8e3,onClose:function(){return Ve(null)},anchorOrigin:{vertical:"top",horizontal:"center"}},{children:n.jsx(t.Alert,e.__assign({onClose:function(){return Ve(null)},severity:"error",sx:{width:"100%",whiteSpace:"pre-line"}},{children:He}))})),n.jsx(R.default,{componentHeaderText:ve,displayConfig:_e,maintainRelativeOrder:Oe,onCollapseAll:kt,showCollapseAll:Lt,onToggleView:function(e){qe(!0),setTimeout(function(){Fe(!e),Qe(!1),Hi(),Nn(),Ke(new Set),Xe([]),un.current=[],requestAnimationFrame(function(){requestAnimationFrame(function(){setTimeout(function(){qe(!1)},600)})})},50)}}),n.jsx(t.Box,e.__assign({ref:hn,onScroll:Nt,sx:{flex:1,minHeight:0,pt:1.5,pb:1,px:3,display:"flex",justifyContent:"center",alignItems:"flex-start",bgcolor:"#FFFFFF",overflowY:Oe?"hidden":"auto",borderTop:nt&&it?"none":"1.5px solid #EEF0F4"}},{children:n.jsx(t.Box,e.__assign({sx:e.__assign({display:"flex",flexDirection:"column",width:"100%",maxWidth:"1200px"},Oe?{flex:1,minHeight:0}:{})},{children:n.jsxs(t.Box,e.__assign({ref:en,sx:e.__assign({display:"grid",gridTemplateColumns:"minmax(0, 1fr) 180px minmax(0, 1fr)",gap:"60px",maxWidth:"1200px",width:"100%",position:"relative",minHeight:0},Oe?{flex:1,overflow:"visible"}:{})},{children:[n.jsx(I.default,{svgContainerRef:Ze,svgDimensions:Pt,isResizing:Ii,overallConnector:Ft,rootDeviationStyle:lt,lines:Dt,isSideBySide:Ai,activeSideBySideSection:Oi,isArrowVisible:Bi,maintainRelativeOrder:Oe,proposedSections:ti,existingSections:oi,cognitivePopup:Bn,activeBadgeId:Fn,closeCognitivePopup:Hn,setActiveBadgeId:kn,openCognitivePopupFromState:Mn,buildSectionPopupState:St,connectedLines:Ye,pathRefs:sn}),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)"},Oe?{flex:1,overflow:"visible"}:{})},{children:[n.jsx(t.Box,e.__assign({ref:nn,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:Yn,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:Yn}))}))})),n.jsxs(t.Box,e.__assign({ref:bn,onScroll:Nt,sx:e.__assign({p:"12px",display:"flex",flexDirection:"column"},Oe?{maxHeight:"calc(100vh - 150px)",flex:1,overflowY:"auto",overflowX:"hidden",minHeight:0,mr:"-180px",pr:"192px","&::-webkit-scrollbar":{display:"none"},scrollbarWidth:"none"}:{})},{children:[n.jsx("div",{ref:_n,style:{width:"100%",height:"0px",flexShrink:0}}),ai&&uo,n.jsx("div",{ref:yn,style:{width:"100%",height:"0px",flexShrink:0}})]}))]})),n.jsx(t.Box,e.__assign({ref:Ct,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(),Bn.open&&Fn===tt?Hn():(kn(tt),Mn(St(n.currentTarget,{title:"",content:"",evaluationResult:ot,cognitiveData:{section_id:"",decisioning:[],gap:[],relevance_score:0,isMissingRationale:!0}},null,tt,!0,e.__assign(e.__assign({},lt),{label:""}))))},sx:{display:"inline-flex",alignItems:"center",gap:"5px",px:1.5,py:"5px",top:"-8px",borderRadius:"20px",bgcolor:lt.badgeBg,color:lt.badgeText,border:"1px solid ".concat(lt.badgeBorder),fontSize:"12px",fontWeight:600,whiteSpace:"nowrap",position:"relative",zIndex:1,pointerEvents:"auto",cursor:"pointer"}},{children:[null!=rt?rt:n.jsx(v.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:Bn.open&&Fn===tt?"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},Oe?{flex:1,overflow:"visible",minHeight:0}:{})},{children:[Di&&n.jsx(l.default,{sections:11}),n.jsx(t.Box,e.__assign({ref:tn,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:Zn,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:Zn}))}))})),n.jsxs(t.Box,e.__assign({ref:Sn,onScroll:Nt,sx:e.__assign({p:"12px",display:"flex",flexDirection:"column"},Oe?{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:Rn,style:{width:"100%",height:"0px",flexShrink:0}}),ai&&ao,n.jsx("div",{ref:xn,style:{width:"100%",height:"0px",flexShrink:0}})]}))]}))]}))}))}))]}))}))};
|
|
2
|
+
//# sourceMappingURL=CognitiveCompare.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CognitiveCompare.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=[{key:"title",label:"Title",analysisKey:"title"},{key:"description",label:"Description",analysisKey:"description"}],i={fields:e,thresholds:{exact:90,high:70,medium:40}};exports.DEFAULT_COMPARISON_CONFIG=i,exports.DEFAULT_FIELD_CONFIG=e,exports.DEFAULT_POPUP_CONFIG={tabs:{deviation:{key:"deviation",label:"Deviation Analysis",subtitle:"Why this is a deviation?",placeholderTitle:"Deviation Analysis",placeholderBody:"Deviation analysis content will appear here..."},association:{key:"association",label:"Association Logic",subtitle:"Why these sections are paired?"}},decisionStrengthLabel:"Decision Strength",sectionTitles:{decisioningFactors:"Decision Making Factors",gaps:"Gaps in Decision"},emptyStateMessage:"No cognitive decisioning data available for this section.",accentColor:"#5928ED"},exports.SHARED_MARKDOWN_STYLES={fontSize:"13px",color:"#0B0E1A",lineHeight:1.4,wordBreak:"break-word",overflowWrap:"break-word",overflow:"hidden","& p":{mt:0,mb:1.5},"& p:last-child":{mb:0},"& ul":{mt:0,mb:1.5,pl:2.5,listStyleType:"disc"},"& ol":{mt:0,mb:1.5,pl:2.5,listStyleType:"decimal"},"& li":{mb:.5},"& strong":{fontWeight:600},"& code":{whiteSpace:"pre-wrap",wordBreak:"break-word"}};
|
|
2
|
+
//# sourceMappingURL=CognitiveCompareConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CognitiveCompareConfig.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +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.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
|
+
//# sourceMappingURL=CognitiveCompareConstants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CognitiveCompareConstants.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
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 c=0;c<a.length;c++)if(a[c]!==s[c])return!1;var d=t.deviationBadges||[],v=n.deviationBadges||[];if(d.length!==v.length)return!1;for(c=0;c<d.length;c++){if(d[c].id!==v[c].id)return!1;if(d[c].actionId!==v[c].actionId)return!1;if(d[c].label!==v[c].label)return!1;if(d[c].score!==v[c].score)return!1;if(d[c].isOrphan!==v[c].isOrphan)return!1;if(d[c].isConnected!==v[c].isConnected)return!1;if(d[c].showScrollLockToggle!==v[c].showScrollLockToggle)return!1;if(d[c].scrollSyncLocked!==v[c].scrollSyncLocked)return!1;if((null===(e=d[c].style)||void 0===e?void 0:e.badgeBg)!==(null===(o=v[c].style)||void 0===o?void 0:o.badgeBg))return!1;if((null===(r=d[c].style)||void 0===r?void 0:r.badgeBorder)!==(null===(i=v[c].style)||void 0===i?void 0:i.badgeBorder))return!1;if((null===(u=d[c].style)||void 0===u?void 0:u.badgeText)!==(null===(l=v[c].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,c,d,v,g,f,p,h=[],b=0,y=Object.keys((null==n?void 0:n.deviations)||{}).sort(function(t,n){return Number(t)-Number(n)});b<y.length;b++){var m=y[b];(B=null===(u=null===(i=null===(o=null===(e=null==n?void 0:n.deviations)||void 0===e?void 0:e[m])||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(B)}for(var _=0,x=Object.keys((null==n?void 0:n.deviation_entries)||{}).sort(function(t,n){return Number(t)-Number(n)});_<x.length;_++){m=x[_];(B=null===(c=null===(s=null===(a=null===(l=null==n?void 0:n.deviation_entries)||void 0===l?void 0:l[m])||void 0===a?void 0:a.evaluation_outputs)||void 0===s?void 0:s.metadata)||void 0===c?void 0:c.label_color)&&h.push(B)}for(var T=0,A=Object.keys(n||{}).filter(function(t){return/^\d+$/.test(t)}).sort(function(t,n){return Number(t)-Number(n)});T<A.length;T++){var B;m=A[T];(B=null===(g=null===(v=null===(d=null==n?void 0:n[m])||void 0===d?void 0:d.evaluation_outputs)||void 0===v?void 0:v.metadata)||void 0===g?void 0:g.label_color)&&h.push(B)}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,c=0,d=Object.keys((null==t?void 0:t.deviations)||{}).sort(function(t,n){return Number(t)-Number(n)});c<d.length;c++){var v=d[c];if(b=null===(o=null===(e=null===(n=null==t?void 0:t.deviations)||void 0===n?void 0:n[v])||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++){v=f[g];if(b=null===(u=null===(i=null===(r=null==t?void 0:t.deviation_entries)||void 0===r?void 0:r[v])||void 0===i?void 0:i.evaluation_outputs)||void 0===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;v=h[p];if(b=null===(a=null===(l=null==t?void 0:t[v])||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(c){null===a&&(a=c);var d,v=c-a;v<e?(t.scrollTop=(d=v,d/=e,l*(--d*d*d+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
|
+
//# sourceMappingURL=CognitiveComparehelpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CognitiveComparehelpers.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +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 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
|
+
//# sourceMappingURL=CognitivePopup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CognitivePopup.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -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":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),a=require("@mui/material");exports.default=function(){return t.jsxs(a.Box,e.__assign({sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center","@keyframes bounce":{"0%":{transform:"translateY(0) scale(1)",opacity:.6},"100%":{transform:"translateY(-12px) scale(1.15)",opacity:1}},"@keyframes glowPulse":{"0%, 100%":{textShadow:"0 0 6px rgba(89,40,237,0.2)"},"50%":{textShadow:"0 0 14px rgba(89,40,237,0.45)"}}}},{children:[t.jsx(a.Typography,e.__assign({sx:{mb:2,fontSize:"20px",fontWeight:600,fontFamily:"sans-serif",color:"#5928ED",letterSpacing:"0.8px",animation:"glowPulse 2s ease-in-out infinite"}},{children:"Switching views..."})),t.jsx(a.Box,e.__assign({sx:{display:"flex",gap:"8px"}},{children:[0,1,2].map(function(e){return t.jsx(a.Box,{sx:{width:"12px",height:"12px",borderRadius:"50%",background:"linear-gradient(145deg, #7c5cff, #5928ED)",boxShadow:"0 4px 12px rgba(89,40,237,0.5), 0 0 8px rgba(89,40,237,0.3)",animation:"bounce 0.6s infinite alternate",animationDelay:"".concat(.15*e,"s")}},e)})}))]}))};
|
|
2
|
+
//# sourceMappingURL=LoaderComponent.js.map
|