@viswa-test/test-citation 0.0.138 → 0.0.139

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/README.md +157 -45
  2. package/dist/assests/svg/PdfViewerIcons.js +1 -1
  3. package/dist/cjs/assests/svg/PdfViewerIcons.js +1 -1
  4. package/dist/cjs/features/ChatDrawer/ChatDrawer.js +1 -1
  5. package/dist/cjs/features/CognitiveCompare/CognitiveCompare.js +1 -1
  6. package/dist/cjs/features/CognitiveCompare/components/CompareHeader.js +1 -1
  7. package/dist/cjs/index.js +1 -1
  8. package/dist/features/ChatDrawer/ChatDrawer.js +1 -1
  9. package/dist/features/CognitiveCompare/CognitiveCompare.js +1 -1
  10. package/dist/features/CognitiveCompare/components/CompareHeader.js +1 -1
  11. package/dist/index.js +1 -1
  12. package/dist/types/src/ChatDrawerTest.d.ts +0 -7
  13. package/dist/types/src/ChatDrawerTest.d.ts.map +1 -1
  14. package/dist/types/src/CognitiveCompareTest.d.ts.map +1 -1
  15. package/dist/types/src/CommonConstants/CommonConstants.d.ts +1 -0
  16. package/dist/types/src/CommonConstants/CommonConstants.d.ts.map +1 -1
  17. package/dist/types/src/assests/svg/PdfViewerIcons.d.ts +1 -0
  18. package/dist/types/src/assests/svg/PdfViewerIcons.d.ts.map +1 -1
  19. package/dist/types/src/features/ChatDrawer/ChatDrawer.d.ts.map +1 -1
  20. package/dist/types/src/features/ChatDrawer/types/ChatDrawer.types.d.ts +0 -1
  21. package/dist/types/src/features/ChatDrawer/types/ChatDrawer.types.d.ts.map +1 -1
  22. package/dist/types/src/features/CognitiveCompare/CognitiveCompare.d.ts.map +1 -1
  23. package/dist/types/src/features/CognitiveCompare/CognitiveCompareTypes.d.ts +1 -0
  24. package/dist/types/src/features/CognitiveCompare/CognitiveCompareTypes.d.ts.map +1 -1
  25. package/dist/types/src/features/CognitiveCompare/components/CompareHeader.d.ts.map +1 -1
  26. package/dist/types/src/index.d.ts +1 -0
  27. package/dist/types/src/index.d.ts.map +1 -1
  28. package/package.json +7 -2
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
- - [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)
11
- - [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)
12
- - [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)
13
- - [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)
14
- - [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)
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)
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
- - [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)
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
+ ```
193
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
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
 
@@ -287,23 +415,6 @@ const [drawerHeight, setDrawerHeight] = useState(300);
287
415
  </ChatDrawer>
288
416
  ```
289
417
 
290
-
291
- ### With drawer summary
292
- ```tsx
293
- <ChatDrawer
294
- uploadListTopContent="Custom Notch"
295
- isExpanded={isOpen}
296
- onToggle={() => setIsOpen(v => !v)}
297
- styles={{
298
- notch: { backgroundColor: '#6d28d9', border: '1px solid #5b21b6' },
299
- notchArrowColor: '#fff',
300
- }}
301
- drawerSummaryComponent={<RedliningFixesSummaryUI approved={5} rejected={2} pending={3} />}
302
- >
303
- <YourComponent />
304
- </ChatDrawer>
305
- ```
306
-
307
418
  **With styles (theme customization):**
308
419
  ```tsx
309
420
  <ChatDrawer
@@ -943,6 +1054,7 @@ This visual captures a clean product collaboration workspace prepared for planni
943
1054
  ```
944
1055
 
945
1056
  **With CitationRenderer (Expandable Pill):**
1057
+
946
1058
  ```tsx
947
1059
  import { CitationRenderer } from '@e-llm-studio/citation/CitationRenderer'
948
1060
  import { MarkdownWithImageCitation } from '@e-llm-studio/citation/MarkdownWithImageCitation'
@@ -2280,4 +2392,4 @@ npm install @e-llm-studio/citation@latest
2280
2392
 
2281
2393
  This library is released under the MIT License. See the LICENSE file for more details.
2282
2394
 
2283
- The license information is also available in the `citation/package.json` file under the 'license' field.
2395
+ 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
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime");exports.DefaultCloseIcon=function(){return n.jsxs("svg",e.__assign({width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"#475467",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}))},exports.DefaultDownloadIcon=function(){return n.jsxs("svg",e.__assign({width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#475467",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:[n.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),n.jsx("polyline",{points:"7 10 12 15 17 10"}),n.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]}))},exports.DefaultFullScreenIcon=function(){return n.jsx("svg",e.__assign({width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#475467",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:n.jsx("path",{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"})}))},exports.DefaultPdfIcon=function(){return n.jsx("svg",e.__assign({xmlns:"http://www.w3.org/2000/svg",style:{width:"12px",height:"15px"},viewBox:"0 0 14 17",fill:"none"},{children:n.jsx("path",{d:"M8.25 0.952148V4.05005C8.25 4.47009 8.25 4.68011 8.33175 4.84055C8.40365 4.98167 8.51839 5.0964 8.65951 5.16831C8.81994 5.25005 9.02996 5.25005 9.45 5.25005H12.5479M9.75 9H3.75M9.75 12H3.75M5.25 6H3.75M8.25 0.75H4.35C3.08988 0.75 2.45982 0.75 1.97852 0.995235C1.55516 1.21095 1.21095 1.55516 0.995235 1.97852C0.75 2.45982 0.75 3.08988 0.75 4.35V12.15C0.75 13.4101 0.75 14.0402 0.995235 14.5215C1.21095 14.9448 1.55516 15.289 1.97852 15.5048C2.45982 15.75 3.08988 15.75 4.35 15.75H9.15C10.4101 15.75 11.0402 15.75 11.5215 15.5048C11.9448 15.289 12.289 14.9448 12.5048 14.5215C12.75 14.0402 12.75 13.4101 12.75 12.15V5.25L8.25 0.75Z",stroke:"#0019FF",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime");exports.DefaultCloseIcon=function(){return n.jsxs("svg",e.__assign({width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"#475467",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}))},exports.DefaultDownloadIcon=function(){return n.jsxs("svg",e.__assign({width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#475467",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:[n.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),n.jsx("polyline",{points:"7 10 12 15 17 10"}),n.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]}))},exports.DefaultFullScreenCloseIcon=function(){return n.jsx("svg",e.__assign({width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#475467",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:n.jsx("path",{d:"M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"})}))},exports.DefaultFullScreenIcon=function(){return n.jsx("svg",e.__assign({width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#475467",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:n.jsx("path",{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"})}))},exports.DefaultPdfIcon=function(){return n.jsx("svg",e.__assign({xmlns:"http://www.w3.org/2000/svg",style:{width:"12px",height:"15px"},viewBox:"0 0 14 17",fill:"none"},{children:n.jsx("path",{d:"M8.25 0.952148V4.05005C8.25 4.47009 8.25 4.68011 8.33175 4.84055C8.40365 4.98167 8.51839 5.0964 8.65951 5.16831C8.81994 5.25005 9.02996 5.25005 9.45 5.25005H12.5479M9.75 9H3.75M9.75 12H3.75M5.25 6H3.75M8.25 0.75H4.35C3.08988 0.75 2.45982 0.75 1.97852 0.995235C1.55516 1.21095 1.21095 1.55516 0.995235 1.97852C0.75 2.45982 0.75 3.08988 0.75 4.35V12.15C0.75 13.4101 0.75 14.0402 0.995235 14.5215C1.21095 14.9448 1.55516 15.289 1.97852 15.5048C2.45982 15.75 3.08988 15.75 4.35 15.75H9.15C10.4101 15.75 11.0402 15.75 11.5215 15.5048C11.9448 15.289 12.289 14.9448 12.5048 14.5215C12.75 14.0402 12.75 13.4101 12.75 12.15V5.25L8.25 0.75Z",stroke:"#0019FF",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}))};
2
2
  //# sourceMappingURL=PdfViewerIcons.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),n=require("react"),i=require("lucide-react");exports.default=function(o){var r,s,a=o.children,d=o.uploadListTopContent,l=o.defaultHeight,u=void 0===l?300:l,c=o.minHeight,p=void 0===c?150:c,g=o.maxHeight,f=o.isExpanded,x=void 0!==f&&f,h=o.onToggle,m=o.onHeightChange,v=o.styles,y=void 0===v?{}:v,_=o.drawerSummaryComponent,b=n.useState(!1),w=b[0],j=b[1],C=n.useState(u),H=C[0],S=C[1],R=n.useRef(0),E=n.useRef(u),k=n.useRef(null),D=n.useRef(0),B="string"==typeof g?parseFloat(g)/100*window.innerHeight:null!=g?g:.4*window.innerHeight;n.useEffect(function(){!x&&k.current&&(D.current=k.current.getBoundingClientRect().height)},[x]);return n.useEffect(function(){if(w){var e=function(e){e.preventDefault();var t=e.clientY-R.current,n=Math.max(p,Math.min(B,E.current+t));S(n),null==m||m(n)},t=function(){j(!1),document.body.style.userSelect=""};return document.addEventListener("mousemove",e),document.addEventListener("mouseup",t),function(){document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",t)}}},[w]),t.jsxs("div",e.__assign({ref:k,style:{position:"relative",width:"100%",minHeight:x?D.current:"auto"}},{children:[t.jsxs("div",e.__assign({style:e.__assign({position:x?"absolute":"relative",zIndex:x?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:x?"".concat(H,"px"):"auto",minHeight:x?"".concat(p,"px"):"auto",maxHeight:x?"".concat(H,"px"):"auto",overflow:"hidden",width:"100%"},y.container)},{children:[t.jsx("div",e.__assign({style:e.__assign({display:"flex",alignItems:"center",width:"100%",marginBottom:12,flexShrink:0,padding:"12px 20px 0 20px"},y.header)},{children:t.jsx("span",e.__assign({style:e.__assign({display:"inline-block",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:16,fontWeight:500,lineHeight:"24px",color:"#101828",fontFamily:"Inter, sans-serif"},y.title)},{children:(null==d?void 0:d.trim())?d:"Data uploaded for your context"}))})),_,x&&t.jsx("div",e.__assign({style:e.__assign({flex:1,overflowY:"auto",overflowX:"hidden",minHeight:0,padding:"0 20px"},y.body)},{children:a})),x&&t.jsx("div",e.__assign({onMouseDown:function(e){e.preventDefault(),j(!0),R.current=e.clientY,E.current=H,document.body.style.userSelect="none"},style:{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:w?null!==(r=y.dragPillActiveColor)&&void 0!==r?r:"#a78bfa":"#d1d5db"},y.dragPill)})}))]})),t.jsx("div",e.__assign({style:{position:x?"absolute":"relative",top:x?"".concat(H,"px"):"auto",width:"100%",display:"flex",justifyContent:"center",height:18,zIndex:x?10:"auto"}},{children:t.jsx("button",e.__assign({onClick:h,"aria-label":x?"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},y.notch)},{children:t.jsx(i.ChevronDown,{size:14,color:null!==(s=y.notchArrowColor)&&void 0!==s?s:"#6d28d9",style:{transform:x?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"}})}))}))]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),n=require("react"),i=require("lucide-react");exports.default=function(o){var r,s,a=o.children,l=o.uploadListTopContent,d=o.defaultHeight,u=void 0===d?300:d,c=o.minHeight,p=void 0===c?150:c,g=o.maxHeight,f=o.isExpanded,x=void 0!==f&&f,h=o.onToggle,v=o.onHeightChange,m=o.styles,_=void 0===m?{}:m,y=n.useState(!1),b=y[0],w=y[1],j=n.useState(u),C=j[0],H=j[1],R=n.useRef(0),S=n.useRef(u),E=n.useRef(null),k=n.useRef(0),D="string"==typeof g?parseFloat(g)/100*window.innerHeight:null!=g?g:.4*window.innerHeight;n.useEffect(function(){!x&&E.current&&(k.current=E.current.getBoundingClientRect().height)},[x]);return n.useEffect(function(){if(b){var e=function(e){e.preventDefault();var t=e.clientY-R.current,n=Math.max(p,Math.min(D,S.current+t));H(n),null==v||v(n)},t=function(){w(!1),document.body.style.userSelect=""};return document.addEventListener("mousemove",e),document.addEventListener("mouseup",t),function(){document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",t)}}},[b]),t.jsxs("div",e.__assign({ref:E,style:{position:"relative",width:"100%",minHeight:x?k.current:"auto"}},{children:[t.jsxs("div",e.__assign({style:e.__assign({position:x?"absolute":"relative",zIndex:x?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:x?"".concat(C,"px"):"auto",minHeight:x?"".concat(p,"px"):"auto",maxHeight:x?"".concat(C,"px"):"auto",overflow:"hidden",width:"100%"},_.container)},{children:[t.jsx("div",e.__assign({style:e.__assign({display:"flex",alignItems:"center",width:"100%",marginBottom:12,flexShrink:0,padding:"12px 20px 0 20px"},_.header)},{children:t.jsx("span",e.__assign({style:e.__assign({display:"inline-block",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:16,fontWeight:500,lineHeight:"24px",color:"#101828",fontFamily:"Inter, sans-serif"},_.title)},{children:(null==l?void 0:l.trim())?l:"Data uploaded for your context"}))})),x&&t.jsx("div",e.__assign({style:e.__assign({flex:1,overflowY:"auto",overflowX:"hidden",minHeight:0,padding:"0 20px"},_.body)},{children:a})),x&&t.jsx("div",e.__assign({onMouseDown:function(e){e.preventDefault(),w(!0),R.current=e.clientY,S.current=C,document.body.style.userSelect="none"},style:{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:b?null!==(r=_.dragPillActiveColor)&&void 0!==r?r:"#a78bfa":"#d1d5db"},_.dragPill)})}))]})),t.jsx("div",e.__assign({style:{position:x?"absolute":"relative",top:x?"".concat(C,"px"):"auto",width:"100%",display:"flex",justifyContent:"center",height:18,zIndex:x?10:"auto"}},{children:t.jsx("button",e.__assign({onClick:h,"aria-label":x?"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(i.ChevronDown,{size:14,color:null!==(s=_.notchArrowColor)&&void 0!==s?s:"#6d28d9",style:{transform:x?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"}})}))}))]}))};
2
2
  //# sourceMappingURL=ChatDrawer.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),i=require("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"),v=require("./LoaderComponent.js"),f=require("./components/ThreeDotsLoader.js"),p=require("./hooks/useCompareData.js"),g=require("./hooks/useComparePopups.js"),h=require("./hooks/useSectionRefs.js"),m=require("./hooks/useAccordionState.js"),S=require("./hooks/useDeviationNavigation.js"),R=require("./components/CompareHeader.js"),x=require("./components/SubSectionAccordion.js"),_=require("./components/LHSSectionRow.js"),y=require("./components/RHSSectionRow.js"),b=require("./components/CognitiveSummaryPopup.js"),C=require("./CompareContext.js"),E=require("./hooks/useStyles.js"),A=require("./hooks/useResizeHandler.js"),B=require("./hooks/useLinesCalculator.js"),T=require("./hooks/useSideBySide.js"),w=require("./components/SvgConnectors.js");exports.SHARED_MARKDOWN_STYLES=u.SHARED_MARKDOWN_STYLES,exports.default=function(I){var D,F,O,j,P,N,k,L,q,M,H,V,z,G,W,K,U,Y,X,$,J,Q,Z,ee,ne,ie,te=I.componentHeaderText,oe=void 0===te?a.DEFAULT_COMPONENT_HEADER_TEXT:te,re=I.treeData,le=I.comparisonConfig,se=I.leftColumnTitleText,ue=I.rightColumnTitleText,ae=I.markdownStyles,ce=I.resetTrigger,de=I.displayConfig,ve=void 0===de?{isHeaderVisible:!0,isToggleVisible:!0,maintainRelativeOrder:!1,isLoading:!0,showDeviationBadges:!1,enableDeviationSchemaBackwardCompatibility:!1}:de,fe=I.popupConfig,pe=I.deviationData,ge=void 0===pe?{}:pe,he=I.deviationNodeIdToView,me=I.resetDeviationNodeId,Se=I.isProposingFix,Re=void 0!==Se&&Se,xe=I.proposingFixNodeId,_e=I.isRedlineFlow,ye=i.useState(ve.maintainRelativeOrder),be=ye[0],Ce=ye[1],Ee=!!be||!!(null==ve?void 0:ve.showDeviationBadges),Ae=i.useState(!1),Be=Ae[0],Te=Ae[1],we=i.useState(null),Ie=we[0],De=we[1],Fe=i.useState(null===(F=null!==(D=null==re?void 0:re.newEvaluationResult)&&void 0!==D?D:null==ve?void 0:ve.enableDeviationSchemaBackwardCompatibility)||void 0===F||F)[0],Oe=i.useState(new Set),je=Oe[0],Pe=Oe[1],Ne=i.useState([]),ke=Ne[0],Le=Ne[1],qe=i.useRef(null),Me=i.useRef(null),He=i.useRef(null),Ve=i.useRef(null),ze=i.useRef(null),Ge=i.useRef(!1),We=i.useRef(null),Ke=i.useRef({}),Ue=i.useRef([]),Ye=i.useRef(function(){}),Xe=i.useRef(null),$e=i.useRef(function(){}),Je=i.useMemo(function(){return(null==re?void 0:re.cognitive_decisioning)||{}},[re]),Qe=i.useMemo(function(){return e.__assign(e.__assign({},u.SHARED_MARKDOWN_STYLES),ae)},[ae]),Ze=i.useRef(null),en=i.useRef(null),nn=i.useRef(null),tn=i.useRef(null),on=i.useRef(null),rn=i.useRef(null),ln=i.useRef(null),sn=i.useRef(null),un=i.useRef(null),an=i.useRef(null),cn=g.useComparePopups(Ze),dn=cn.cognitivePopup,vn=cn.setCognitivePopup,fn=cn.moreFunctions,pn=cn.setMoreFunctions,gn=cn.position,hn=cn.setPosition,mn=cn.activeBadgeId,Sn=cn.summaryPopup,Rn=cn.setSummaryPopup,xn=cn.closeSummaryPopup,_n=cn.setActiveBadgeId,yn=cn.popupRef,bn=cn.handleOpenCognitiveCompare,Cn=cn.openCognitivePopupFromState,En=cn.closeCognitivePopup,An=cn.closeMoreFunctionsPopup,Bn=i.useMemo(function(){var e,n,i,t,o,r,l;return{fields:null!==(e=null==le?void 0:le.fields)&&void 0!==e?e:u.DEFAULT_FIELD_CONFIG,thresholds:{high:null!==(i=null===(n=null==le?void 0:le.thresholds)||void 0===n?void 0:n.high)&&void 0!==i?i:u.DEFAULT_COMPARISON_CONFIG.thresholds.high,medium:null!==(o=null===(t=null==le?void 0:le.thresholds)||void 0===t?void 0:t.medium)&&void 0!==o?o:u.DEFAULT_COMPARISON_CONFIG.thresholds.medium,exact:null!==(l=null===(r=null==le?void 0:le.thresholds)||void 0===r?void 0:r.exact)&&void 0!==l?l:u.DEFAULT_COMPARISON_CONFIG.thresholds.exact}}},[le]),Tn=i.useState(null),wn=Tn[0];Tn[1];var In=null===(P=null===(O=null==re?void 0:re.documents)||void 0===O?void 0:O[null===(j=null==re?void 0:re.input_index_map)||void 0===j?void 0:j[0]])||void 0===P?void 0:P.title,Dn=null===(L=null===(N=null==re?void 0:re.documents)||void 0===N?void 0:N[null===(k=null==re?void 0:re.input_index_map)||void 0===k?void 0:k[1]])||void 0===L?void 0:L.title,Fn=s.safeStringify(se||In||"Uploaded Contract"),On=s.safeStringify(ue||Dn||"Reference Template"),jn=p.useCognitiveTreeData(re,be,ge,Bn,Fe),Pn=jn.activeProposed,Nn=jn.existingRule,kn=jn.proposedSections,Ln=jn.existingSections,qn=jn.visibleFields,Mn=jn.parentDeviationRecord,Hn=jn.deviationNumberRegistry,Vn=jn.parseError;i.useEffect(function(){Vn&&De("Failed to load comparison: ".concat(Vn))},[Vn]);var zn=kn.length>0||Ln.length>0,Gn=i.useMemo(function(){if(!_e)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(kn),i(Ln),"".concat(e,":").concat(n)},[_e,kn,Ln]),Wn=h.useSectionRefs(qn.map(function(e){return e.key}),Math.max(kn.length,Ln.length)),Kn=Wn.leftRefs,Un=Wn.rightRefs,Yn=Wn.sectionLeftRefs,Xn=Wn.sectionRightRefs,$n=Wn.lhsBadgeRefs,Jn=Wn.rhsBadgeRefs,Qn=Wn.sectionRightRowRefs,Zn=Wn.subSectionLeftRefs,ei=Wn.subSectionRightRefs,ni=Wn.sectionRowRefs,ii=Wn.getSectionRowRef,ti=Wn.getSubSectionRef,oi=Wn.getBadgeRef,ri=T.useSideBySide({maintainRelativeOrder:be,proposedSections:kn,existingSections:Ln,leftContainerRef:sn,rightContainerRef:nn,scrollContainerRef:Ze,sectionLeftRefs:Yn,sectionRightRefs:Xn,subSectionLeftRefs:Zn,subSectionRightRefs:ei,lhsBadgeRefs:$n,rhsBadgeRefs:Jn,sectionRowRefs:ni,sectionRightRowRefs:Qn,rhsTopSpacerRef:tn,rhsBottomSpacerRef:on,lhsTopSpacerRef:rn,lhsBottomSpacerRef:ln,calculateLinesRef:Ye,setConnectedSections:Pe,setConnectedLines:Le,cachedConnectedPositions:Ue,closeMoreFunctionsPopup:An,setErrorToast:De,moreFunctions:fn,closeSummaryPopup:xn}),li=ri.isSideBySide,si=ri.isArrowVisible,ui=ri.setIsArrowVisible,ai=ri.isResizing,ci=ri.setIsResizing,di=ri.isSideBySideLoading,vi=ri.activeSideBySideSection,fi=ri.scrollLock,pi=ri.sideBySideCacheRef,gi=ri.isSideBySideRef,hi=ri.activeSideBySideRightSectionRef,mi=ri.activeSideBySideSectionRef,Si=ri.sideBySideLineRef,Ri=ri.highlightedClauseRefs,xi=ri.clearClauseHighlight,_i=ri.applyAlignmentPadding,yi=ri.resetSideBySide,bi=ri.activateSideBySide,Ci=m.useAccordionState({maintainRelativeOrder:!!be,proposedSections:kn,existingSections:Ln,activeSideBySideSection:vi,connectedSections:je,resetSideBySide:yi,setConnectedSections:Pe,setConnectedLines:Le,cachedConnectedPositions:Ue,svgContainerRef:qe,isAnimatingRef:Ge,animationTimerRef:We,calculateLinesRef:Ye,sectionLeftRefs:Yn,sectionRightRefs:Xn,subSectionLeftRefs:Zn,subSectionRightRefs:ei}),Ei=Ci.expandedSections,Ai=Ci.setExpandedSections,Bi=Ci.expandedSubSections,Ti=Ci.setExpandedSubSections,wi=Ci.handleSubSectionToggle,Ii=Ci.toggleSection;i.useEffect(function(){_e&&"off"!==Gn&&"0:0"!==Gn&&(pi.current=null,Ue.current=[],requestAnimationFrame(function(){var e;null===(e=Ye.current)||void 0===e||e.call(Ye)}))},[_e,Gn]);var Di=i.useMemo(function(){var e=new Map,n=new Map,i=1;if(be)kn.forEach(function(n){!n.title&&!n.content||n.id&&e.set(n.id,i++)}),Ln.forEach(function(t){if(t.id){var o=kn.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(kn.length,Ln.length),o=0;o<t;o++){var r=kn[o],l=Ln[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}},[kn,Ln,be]),Fi=Nn.analysis,Oi=s.safeStringify(null===(M=null===(q=null==Fi?void 0:Fi.rule_difference_comparison)||void 0===q?void 0:q.summary)||void 0===M?void 0:M.overall_summary),ji=!!Oi.match(/<ai_reasoning>([\s\S]*?)<\/ai_reasoning>/i),Pi=null!==(H=null==re?void 0:re.base_root_id)&&void 0!==H?H:"-1";null==re||re[Pi];var Ni=Fe?null!==(Z=null!==($=ge&&(null===(X=null==ge?void 0:ge[Pi])||void 0===X?void 0:X.evaluation_result))&&void 0!==$?$:null===(Q=null===(J=null==re?void 0:re.nodes)||void 0===J?void 0:J[Pi])||void 0===Q?void 0:Q.evaluation_result)&&void 0!==Z?Z:null:null!==(Y=null!==(G=ge&&(null===(z=null===(V=null==ge?void 0:ge[Pi])||void 0===V?void 0:V.evaluation_result)||void 0===z?void 0:z[0]))&&void 0!==G?G:null===(U=null===(K=null===(W=null==re?void 0:re.nodes)||void 0===W?void 0:W[Pi])||void 0===K?void 0:K.evaluation_result)||void 0===U?void 0:U[0])&&void 0!==Y?Y:null,ki=s.extractDeviationScore(Ni),Li=s.generateColorPalette(null!==(ie=null===(ne=null===(ee=null==Ni?void 0:Ni.evaluation_outputs)||void 0===ee?void 0:ee.metadata)||void 0===ne?void 0:ne.label_color)&&void 0!==ie?ie:a.DEFAULT_DEVIAION_COLOR),qi=i.useCallback(function(){xi(),yi(),Pe(new Set),Le([]),Ue.current=[],et([]),it(null),Rn(a.EMPTY_SUMMARY_POPUP_STATE),En(),requestAnimationFrame(function(){var e;null===(e=Ye.current)||void 0===e||e.call(Ye)})},[]),Mi=i.useRef(qi);i.useEffect(function(){Mi.current=qi},[qi]),i.useEffect(function(){ce&&Mi.current()},[ce]);var Hi=i.useCallback(function(n,i,t,o,r,l,u){var a,c,d,v=s.safeStringify(null==i?void 0:i.id)||s.safeStringify(null==t?void 0:t.id)||"",f=(v?Je[v]:null)||(null==i?void 0:i.cognitiveData)||(null==t?void 0:t.cognitiveData)||{section_id:v,decisioning:[],gap:[],relevance_score:0},p=null!==(c=null===(a=ni.current[o])||void 0===a?void 0:a.current)&&void 0!==c?c:null;return{isLoading:null!==(d=null==ve?void 0:ve.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:f,anchorEl:n,sectionAnchorEl:p,badgeStyle:l||null,sectionIdx:o,docData:{documents:null==re?void 0:re.documents,input_index_map:null==re?void 0:re.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}},[Je,re]),Vi=i.useCallback(function(){var e=fn.sectionIdx,n=fn.isOrphan;An(),xn(),null!==e&&(n?De("No counterpart exists to connect to."):(xi(),gi.current&&yi(),Le([]),Ue.current=[],Pe(function(n){return n.has(e)?new Set:new Set([e])}),setTimeout(function(){Ye.current&&Ye.current()},50)))},[fn.sectionIdx,fn.isOrphan,An,xn,yi]),zi=i.useCallback(function(){var e=ze.current;if(e){ze.current=null;var n=kn.findIndex(function(n){return n.id===e}),i=Ln.findIndex(function(n){return n.id===e}),t=-1===n?s.findKeyPathByNodeId(kn,e):null,o=-1===i?s.findKeyPathByNodeId(Ln,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?(Ri.current.add(r),s.scrollAndHighlightClause(r,n)):t++<i&&requestAnimationFrame(o)};requestAnimationFrame(o)};if(be)-1!==r&&sn.current&&a(function(){return u(n,t,Yn,Zn)},sn.current),-1!==l&&nn.current&&a(function(){return u(i,o,Xn,ei)},nn.current);else{var c=Ze.current;if(!c)return;a(function(){return-1!==r?u(n,t,Yn,Zn):u(i,o,Xn,ei)},c)}}},[kn,Ln,be,Yn,Xn,Zn,ei,sn,nn,Ze]),Gi=i.useCallback(function(n){if(n){xi(),yi(),Pe(new Set),Le([]),Ue.current=[],xn(),En();var i=kn.findIndex(function(e){return e.id===n}),t=Ln.findIndex(function(e){return e.id===n}),o=-1===i?s.findKeyPathByNodeId(kn,n):null,r=-1===t?s.findKeyPathByNodeId(Ln,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;ze.current=n,Ai(function(n){var i,t=e.__assign({},n),o=!1;-1!==l&&(t[i=be?"left-".concat(l):String(l)]||(t[i]=!0,o=!0));-1!==u&&(t[i=be?"right-".concat(u):String(u)]||(t[i]=!0,o=!0));return o?t:n}),Ti(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(){ze.current===n&&Wi.current()})},50)}else console.warn('scrollToAndHighlightClause: nodeId "'.concat(n,'" not found'))}},[kn,Ln,be,Ai,Ti,yi,xn,En]),Wi=i.useRef(zi);i.useEffect(function(){Wi.current=zi},[zi]);var Ki=i.useRef(null);i.useEffect(function(){if(wn){var e=Bn.fields.find(function(e){return e.analysisKey===wn||e.key===wn});if(e){var n=Kn.current[e.key]||Un.current[e.key];(null==n?void 0:n.current)&&setTimeout(function(){return n.current.scrollIntoView({behavior:"smooth",block:"center"})},150)}}},[wn,Bn.fields]);var Ui=i.useCallback(function(e){var n,i,t,o,r,l,s,u,a,c=null===(n=null==Fi?void 0:Fi.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],v=(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 f=d.mappings[0]||{};return{score:d.score,relation:f.relation||"",highlightsA:(null===(l=f.highlights)||void 0===l?void 0:l.ruleA_spans)||[],highlightsB:(null===(s=f.highlights)||void 0===s?void 0:s.ruleB_spans)||[],hasContent:!!v}}return{score: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:!!v}},[Fi]),Yi=E.useStyleHelpers({proposedSections:kn,existingSections:Ln,maintainRelativeOrder:be,cognitiveMap:Je,deviationData:ge,treeData:re,resolvedComparisonConfig:Bn}),Xi=Yi.getSectionCompareStyle,$i=Yi.getSubSectionCompareStyle,Ji=Yi.getDeviationStyleByKey,Qi=B.useLinesCalculator({containerRef:Me,leftContainerRef:sn,rightContainerRef:nn,svgContainerRef:qe,pathRefs:Ke,leftHeaderRef:He,rightHeaderRef:Ve,proposedSections:kn,existingSections:Ln,visibleFields:qn,leftRefs:Kn,rightRefs:Un,sectionLeftRefs:Yn,sectionRightRefs:Xn,subSectionLeftRefs:Zn,subSectionRightRefs:ei,lhsBadgeRefs:$n,rhsBadgeRefs:Jn,sectionRowRefs:ni,expandedSections:Ei,expandedSubSections:Bi,connectedSections:je,isSideBySide:li,activeSideBySideSection:vi,maintainRelativeOrder:be,cognitiveMap:Je,getSectionCompareStyle:Xi,getSubSectionCompareStyle:$i,getDeviationStyleByKey:Ji,isArrowVisible:si,isAnimatingRef:Ge,isSideBySideRef:gi,sideBySideCacheRef:pi,sideBySideLineRef:Si,activeSideBySideSectionRef:mi,activeSideBySideRightSectionRef:hi,connectedLines:ke,setConnectedLines:Le,cachedConnectedPositions:Ue,calculateLinesRef:Ye,resizeTimerRef:Xe,scrollLock:fi,handleResizeRef:$e,activeProposed:Pn,existingRule:Nn,analysisData:Fi,pendingScrollTargetRef:un,pendingScrollCallbackRef:an,resolvedComparisonConfig:Bn,getFieldData:Ui}),Zi=Qi.lines,et=Qi.setLines,nt=Qi.overallConnector,it=Qi.setOverallConnector,tt=Qi.svgDimensions,ot=Qi.handleColumnScroll,rt=i.useCallback(function(){xi(),Ai({}),Ti({}),yi(),Pe(new Set),Le([]),Ue.current=[],xn(),En(),An(),requestAnimationFrame(function(){Ye.current&&Ye.current()})},[Ai,Ti,yi,xn,En,An]),lt=i.useMemo(function(){return Object.values(Ei).some(Boolean)||Object.values(Bi).some(Boolean)},[Ei,Bi]),st=i.useRef(null),ut=i.useRef(0),at=i.useRef(0),ct=i.useRef(0),dt=A.useResizeHandler({timerRef:st,ruleComponentRef:en,scrollContainerRef:Ze,containerRef:Me,maintainRelativeOrder:be,proposedSections:kn,existingSections:Ln,isSideBySideRef:gi,activeSideBySideSectionRef:mi,activeSideBySideRightSectionRef:hi,sectionRowRefs:ni,sectionRightRowRefs:Qn,sectionLeftRefs:Yn,sectionRightRefs:Xn,subSectionLeftRefs:Zn,subSectionRightRefs:ei,lhsBadgeRefs:$n,rhsBadgeRefs:Jn,leftContainerRef:sn,rightContainerRef:nn,calculateLinesRef:Ye,handleResizeRef:$e,setIsResizing:ci,setIsArrowVisible:ui,sideBySideCacheRef:pi,cachedConnectedPositions:Ue}).handleResize;i.useEffect(function(){$e.current=dt},[dt,$e]),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 en.current&&o.push(e(en.current,ut,n,function(){return $e.current()},function(){})),Ze.current&&o.push(e(Ze.current,at,i,function(){return $e.current()},function(){return Ye.current()})),Me.current&&o.push(e(Me.current,ct,t,function(){return $e.current()},function(){return Ye.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(){gi.current=li},[li]),i.useEffect(function(){mi.current=vi},[vi]);var vt=i.useCallback(function(){var e,n=fn.sectionIdx,i=fn.isOrphan;if(xn(),null!=n){var t="left";fn.anchorEl&&(null===(e=nn.current)||void 0===e?void 0:e.contains(fn.anchorEl))&&(t="right"),bi(n,i,{sourceSide:t})}},[bi,fn.isOrphan,fn.sectionIdx,fn.anchorEl,xn]),ft=i.useCallback(function(){xn(),yi(),Pe(new Set),Le([]),Ue.current=[]},[xn,yi]),pt=null!==fn.sectionIdx&&je.has(fn.sectionIdx),gt=S.useDeviationNavigation({proposedSections:kn,existingSections:Ln,parentDeviationRecord:Mn,expandedSections:Ei,maintainRelativeOrder:!!be,scrollContainerRef:Ze,leftContainerRef:sn,rightContainerRef:nn,lhsBadgeRefs:$n,rhsBadgeRefs:Jn}),ht=gt.showDeviationNavigation,mt=gt.showOpenNodeRef,St=gt.adjustScrollForPopup,Rt=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;En();var a="left";(null===(r=nn.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=Jn.current[l])||void 0===e?void 0:e.current:null===(i=$n.current[l])||void 0===i?void 0:i.current}return"right"===a?null===(t=Jn.current[n])||void 0===t?void 0:t.current:null===(o=$n.current[n])||void 0===o?void 0:o.current},d=function(e,t){var o=!!be,r=o?"right"===a?nn.current:sn.current:Ze.current,l=o?"right"===a?sn.current:nn.current:null;if(r&&e){var u=function(){var e="string"==typeof n&&n.includes(s.DEVIATION_BADGE_SEPARATOR);i||!e?t():requestAnimationFrame(function(){var e,i,o;pi.current=null,Ue.current=[],_i(!0,n,null),null===(e=Ye.current)||void 0===e||e.call(Ye),null===(i=sn.current)||void 0===i||i.dispatchEvent(new Event("scroll")),null===(o=nn.current)||void 0===o||o.dispatchEvent(new Event("scroll")),t()})},c=e.getBoundingClientRect(),d=r.getBoundingClientRect(),v=d.bottom-.35*d.height,f=d.top+.35*d.height;if(c.top>v||c.top<f){var p=d.top+d.height/2,g=c.top+c.height/2-p;o&&l&&s.smoothScrollTo(l,l.scrollTop+g,250,function(){}),s.smoothScrollTo(r,r.scrollTop+g,250,u)}else u()}else t()};if(i)return yi(),Pe(new Set),Le([]),Ue.current=[],void(l&&requestAnimationFrame(function(){var e=c()||u;d(e,function(){Rn({open:!0,anchorEl:e,summary:t,displayImpact:o})})}));bi(n,i,l?{toggleIfSame:!1,sourceSide:a,onReady:function(){var e=c()||u;d(e,function(){Rn({open:!0,anchorEl:e,summary:t,displayImpact:o})})}}:{toggleIfSame:!1,sourceSide:a})},[bi,En,Rn,yi,be]),xt=i.useMemo(function(){var e;if(!he)return null;var n=null===(e=null==he?void 0:he.id)||void 0===e?void 0:e.split(":")[0];for(var i in Mn){if((Mn[i]||[]).some(function(e){return e.id===n}))return i}return null},[he,Mn]),_t=i.useRef({id:null,triggerMs:null}),yt=i.useRef(null);i.useEffect(function(){var n;if(null==he?void 0:he.id){var i=Number(he.trigger),t=_t.current;if((null==t?void 0:t.triggerMs)!==i){if(!(he.id.includes(":")&&/:\d+$/.test(he.id)))return _t.current={id:he.id,triggerMs:i},void Gi(he.id);var o=null===(n=null==he?void 0:he.id)||void 0===n?void 0:n.split(":"),r=o[0],l=o[1],u=null!=l?l:"0";yt.current!==he.id&&(xn(),En(),yi(),Pe(new Set),Le([]),Ue.current=[],yt.current=he.id);var a=!1,c=0,d=null,v=150,f=function(e,n){for(var i=function(e,t){if(!e)return null;if(e.id===n)return t;if(!Array.isArray(e.subsections))return null;for(var o=0;o<e.subsections.length;o++){var r=i(e.subsections[o],"".concat(t,"-").concat(o));if(r)return r}return null},t=0;t<e.length;t++){var o=i(e[t],String(t));if(o)return o}return null},p=function(){var n,t,o,l;if(!a){var g=function(){_t.current={id:he.id,triggerMs:i}},h=null,m=null;for(var S in Mn){var R=Mn[S].find(function(e){return e.id===r});if(R){h=S,m=R;break}}if(m&&h){var x=kn.findIndex(function(e){return e.id===h}),_=Ln.findIndex(function(e){return e.id===h}),y=-1===x&&-1!==_,b=f(kn,m.id),C=f(Ln,m.id);if(b&&!C&&!y){var E=b.split("-"),A=Number(E[0]);if(be){var B=null===(t=null===(n=kn[A])||void 0===n?void 0:n.refIndexes)||void 0===t?void 0:t[0],T=Ln.findIndex(function(e){return e.selfIndex===B});-1!==T&&(A=T)}C=e.__spreadArray([A],E.slice(1),!0).join("-")}if(b||C){var w=y||!b&&!!C,I=b?Number(b.split("-")[0]):x,D=C?Number(C.split("-")[0]):_;if(w){if(!(be?!!Ei["right-".concat(D)]:!!Ei[String(D)])&&D>=0)return Ii(D,"right"),c+=1,void(d=setTimeout(p,450))}else if(!(be?!!Ei["left-".concat(I)]:!!Ei[String(I)])&&I>=0)return Ii(I,"left"),c+=1,void(d=setTimeout(p,450));var F,O=b||"",j=C||"",P="".concat(m.id).concat(s.DEVIATION_BADGE_SEPARATOR).concat(u).concat(s.DEVIATION_BADGE_SEPARATOR).concat(O).concat(s.DEVIATION_BADGE_SEPARATOR).concat(j),N="".concat(m.id).concat(s.DEVIATION_BADGE_SEPARATOR).concat(u),k=null===(o=$n.current[N])||void 0===o?void 0:o.current,L=null===(l=Jn.current[N])||void 0===l?void 0:l.current,q=w||!k&&!!L,M=q?L:k;if(F=be?q?nn.current:sn.current:Ze.current,M&&F){var H=M.getBoundingClientRect();if(0===H.height)return void((c+=1)<2?d=setTimeout(p,v):g());var V=F.getBoundingClientRect(),z=H.top-V.top+F.scrollTop-V.height/2+H.height/2+150,G=function(){var n,i,t,o,r;if(!a){g();var l=M instanceof Element?window.getComputedStyle(M).color:"";k&&(k.style.transition="box-shadow 300ms ease-in-out",k.style.boxShadow="0 0 10px ".concat(l)),L&&(L.style.transition="box-shadow 300ms ease-in-out",L.style.boxShadow="0 0 10px ".concat(l)),setTimeout(function(){k&&(k.style.boxShadow=""),L&&(L.style.boxShadow="")},2e3);var s=(null===(i=null===(n=m.evaluationResult)||void 0===n?void 0:n.deviations)||void 0===i?void 0:i[u])||m,c=(null===(t=m.evaluationResult)||void 0===t?void 0:t.evaluation_outputs)||m.evaluation_outputs;if(!(!!k&&!!L)){var d=q?(null===(o=Jn.current[N])||void 0===o?void 0:o.current)||L:(null===(r=$n.current[N])||void 0===r?void 0:r.current)||k;return St(d,function(){Rn({open:!0,anchorEl:d,displayImpact:he.displayImpact,summary:e.__assign(e.__assign({},s),{evaluation_outputs:c})})}),void(null==me||me())}bi(P,!1,{toggleIfSame:!1,sourceSide:"left",onReady:function(){var n,i,t=q?(null===(n=Jn.current[N])||void 0===n?void 0:n.current)||L:(null===(i=$n.current[N])||void 0===i?void 0:i.current)||k;St(t,function(){requestAnimationFrame(function(){var n,i,o;pi.current=null,Ue.current=[],_i(!0,P,null),null===(n=Ye.current)||void 0===n||n.call(Ye),null===(i=sn.current)||void 0===i||i.dispatchEvent(new Event("scroll")),null===(o=nn.current)||void 0===o||o.dispatchEvent(new Event("scroll")),Rn({open:!0,anchorEl:t,displayImpact:null==he?void 0:he.displayImpact,summary:e.__assign({},s)})})})}})}};Math.abs(F.scrollTop-z)<=2?G():(un.current=z,an.current=G,F.scrollTo({top:z,behavior:"smooth"}),d&&clearTimeout(d),d=setTimeout(function(){if(an.current){un.current=null;var e=an.current;an.current=null,e()}},800))}else(c+=1)<2?d=setTimeout(p,v):g()}else(c+=1)<2?d=setTimeout(p,v):g()}else(c+=1)<2?d=setTimeout(p,v):g()}};return d=setTimeout(p,v),function(){a=!0,d&&clearTimeout(d)}}}},[he,Mn,kn,Ln,be,Ei,Ii,bi,Rn,Gi]);var bt={maintainRelativeOrder:!!be,showDeviationBadges:Ee,isProposingFix:Re,proposingFixNodeId:xe,isRedlineFlow:_e,isSideBySide:li,activeSideBySideSection:vi,connectedSections:je,proposedSections:kn,existingSections:Ln,deviationNumberRegistry:Hn,treeData:re,displayConfig:ve,resolvedMarkdownStyles:Qe,unifiedNumbering:Di,expandedSections:Ei,expandedSubSections:Bi,setExpandedSubSections:Ti,getSectionCompareStyle:Xi,getSubSectionCompareStyle:$i,getBadgeRef:oi,getSectionRowRef:ii,getSubSectionRef:ti,sectionLeftRefs:Yn,sectionRightRefs:Xn,sectionRowRefs:ni,sectionRightRowRefs:Qn,subSectionLeftRefs:Zn,subSectionRightRefs:ei,lhsBadgeRefs:$n,rhsBadgeRefs:Jn,openMoreFunctionsPopup:function(e,n,i,t,o,r){var l;if(e.stopPropagation(),fn.open&&fn.sectionIdx===o)An();else{var u=e.currentTarget,a="left";(null===(l=nn.current)||void 0===l?void 0:l.contains(u))&&(a="right");xi(),gi.current&&yi(),Pe(new Set),Le([]),Ue.current=[],En(),Sn.open?ft():xn(),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=Jn.current[l])||void 0===e?void 0:e.current:null===(n=$n.current[l])||void 0===n?void 0:n.current}return"right"===a?null===(i=Jn.current[o])||void 0===i?void 0:i.current:null===(t=$n.current[o])||void 0===t?void 0:t.current}()||u;pn(Hi(e,n,t,o,i,r))})}},handleOpenSummaryPopup:Rt,openSummaryPopup:Rt,handleCloseSummaryPopup:ft,toggleSection:Ii,handleSubSectionToggle:wi,renderSubSectionAccordion:function(e){var i=e.section,t=e.keyPath,o=e.depth,r=void 0===o?0:o,l=e.columnKey,s=void 0===l?"left":l,u=e.parentNodeId,a=void 0===u?"":u,c=e.sectionOffset;return n.jsx(x.default,{section:i,keyPath:t,depth:r,columnKey:s,parentNodeId:a,sectionOffset:c})},resetSideBySide:yi,setConnectedSections:Pe,setConnectedLines:Le,cachedConnectedPositions:Ue,showDeviationNavigation:ht,showOpenNodeRef:mt,deviationNodeIdToView:null==he?void 0:he.id,deviationTargetParentId:xt};return n.jsx(C.CompareContextProvider,e.__assign({value:bt},{children:n.jsxs(t.Box,e.__assign({ref:en,sx:e.__assign(e.__assign({display:"flex",flexDirection:"column",height:"100%",bgcolor:"#F6F7F9B2",fontFamily:'"Plus Jakarta Sans", sans-serif'},be?{}:{overflow:"visible"}),{position:"relative"})},{children:[Be&&n.jsx(t.Box,e.__assign({sx:{position:"absolute",inset:0,bgcolor:"rgba(255, 255, 255, 0.6)",backdropFilter:"blur(10px)",zIndex:9999,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"8px"}},{children:n.jsx(v.default,{})})),Sn.open&&n.jsx(b.default,{open:Sn.open,anchorEl:Sn.anchorEl,containerEl:Ki.current,clipTopEl:He.current,scrollContainerEl:Ze.current,onClose:ft,summary:Sn.summary,displayImpact:Sn.displayImpact}),n.jsx(d.default,{open:fn.open,anchorEl:fn.anchorEl,sectionTitle:fn.sectionTitle,referenceSectionTitle:fn.refSectionTitle,onClose:An,onOpenCognitiveCompare:bn,onOpenSideBySide:vt,onConnect:Vi,isConnected:pt,isOrphan:fn.isOrphan}),dn.open&&n.jsx(c.default,{open:dn.open,popupRef:yn,position:gn,popupConfig:fe,onClose:function(){hn(null),vn(function(n){return e.__assign(e.__assign({},n),{open:!1})}),_n(null)},markdownStyles:ae,sectionTitle:dn.sectionTitle,referenceSectionTitle:dn.refSectionTitle,cognitiveData:dn.cognitiveData,anchorEl:dn.anchorEl,sectionAnchorEl:dn.sectionAnchorEl,scrollContainerEl:Ze.current,badgeStyle:dn.badgeStyle,docData:dn.docData,deviationData:dn.deviationData,isLoading:dn.isLoading}),n.jsx(t.Snackbar,e.__assign({open:!!Ie,autoHideDuration:8e3,onClose:function(){return De(null)},anchorOrigin:{vertical:"top",horizontal:"center"}},{children:n.jsx(t.Alert,e.__assign({onClose:function(){return De(null)},severity:"error",sx:{width:"100%",whiteSpace:"pre-line"}},{children:Ie}))})),n.jsx(R.default,{componentHeaderText:oe,displayConfig:ve,maintainRelativeOrder:be,onCollapseAll:rt,showCollapseAll:lt,onToggleView:function(e){Te(!0),setTimeout(function(){Ce(!e),yi(),xn(),Pe(new Set),Le([]),Ue.current=[],requestAnimationFrame(function(){requestAnimationFrame(function(){setTimeout(function(){Te(!1)},600)})})},50)}}),n.jsx(t.Box,e.__assign({ref:Ze,onScroll:ot,sx:{flex:1,minHeight:0,pt:1.5,pb:1,px:3,display:"flex",justifyContent:"center",alignItems:"flex-start",bgcolor:"#FFFFFF",overflowY:be?"hidden":"auto",borderTop:Oi&&ji?"none":"1.5px solid #EEF0F4"}},{children:n.jsx(t.Box,e.__assign({sx:e.__assign({display:"flex",flexDirection:"column",width:"100%",maxWidth:"1200px"},be?{flex:1,minHeight:0}:{})},{children:n.jsxs(t.Box,e.__assign({ref:Me,sx:e.__assign({display:"grid",gridTemplateColumns:"minmax(0, 1fr) 180px minmax(0, 1fr)",gap:"60px",maxWidth:"1200px",width:"100%",position:"relative",minHeight:0},be?{flex:1,overflow:"visible"}:{})},{children:[n.jsx(w.default,{svgContainerRef:qe,svgDimensions:tt,isResizing:ai,overallConnector:nt,rootDeviationStyle:Li,lines:Zi,isSideBySide:li,activeSideBySideSection:vi,isArrowVisible:si,maintainRelativeOrder:be,proposedSections:kn,existingSections:Ln,cognitivePopup:dn,activeBadgeId:mn,closeCognitivePopup:En,setActiveBadgeId:_n,openCognitivePopupFromState:Cn,buildSectionPopupState:Hi,connectedLines:ke,pathRefs:Ke}),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)"},be?{flex:1,overflow:"visible"}:{})},{children:[n.jsx(t.Box,e.__assign({ref:He,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:Fn,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:Fn}))}))})),n.jsxs(t.Box,e.__assign({ref:sn,onScroll:ot,sx:e.__assign({p:"12px",display:"flex",flexDirection:"column"},be?{maxHeight:"calc(100vh - 150px)",flex:1,overflowY:"auto",overflowX:"hidden",minHeight:0,mr:"-160px",pr:"172px","&::-webkit-scrollbar":{display:"none"},scrollbarWidth:"none"}:{})},{children:[n.jsx("div",{ref:rn,style:{width:"100%",height:"0px",flexShrink:0}}),zn&&kn.map(function(e,i){return n.jsx(_.default,{section:e,idx:i},"left-row-".concat(i))}),n.jsx("div",{ref:ln,style:{width:"100%",height:"0px",flexShrink:0}})]}))]})),n.jsx(t.Box,e.__assign({ref:Ki,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(),dn.open&&mn===Pi?En():(_n(Pi),Cn(Hi(n.currentTarget,{title:"",content:"",evaluationResult:Ni,cognitiveData:{section_id:"",decisioning:[],gap:[],relevance_score:0,isMissingRationale:!0}},null,Pi,!0,e.__assign(e.__assign({},Li),{label:""}))))},sx:{display:"inline-flex",alignItems:"center",gap:"5px",px:1.5,py:"5px",top:"-8px",borderRadius:"20px",bgcolor:Li.badgeBg,color:Li.badgeText,border:"1px solid ".concat(Li.badgeBorder),fontSize:"12px",fontWeight:600,whiteSpace:"nowrap",position:"relative",zIndex:1,pointerEvents:"auto",cursor:"pointer"}},{children:[null!=ki?ki:n.jsx(f.default,{}),n.jsx(t.Box,e.__assign({component:"span",sx:{width:14,height:14,display:"flex",alignItems:"center","& svg":{width:"14px",height:"14px"}}},{children:n.jsx(r.ButtonCognitiveIcon,{})})),n.jsx(o.ChevronDown,{size:11,style:{transform:dn.open&&mn===Pi?"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},be?{flex:1,overflow:"visible",minHeight:0}:{})},{children:[di&&n.jsx(l.default,{sections:11}),n.jsx(t.Box,e.__assign({ref:Ve,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:On,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:On}))}))})),n.jsxs(t.Box,e.__assign({ref:nn,onScroll:ot,sx:e.__assign({p:"12px",display:"flex",flexDirection:"column"},be?{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:tn,style:{width:"100%",height:"0px",flexShrink:0}}),zn&&Ln.map(function(e,i){return n.jsx(y.default,{section:e,idx:i},"right-row-".concat(i))}),n.jsx("div",{ref:on,style:{width:"100%",height:"0px",flexShrink:0}})]}))]}))]}))}))}))]}))}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),i=require("react"),t=require("@mui/material"),o=require("lucide-react"),r=require("../../assests/svg/ButtonCognitiveIcon.js"),l=require("./OverlayComponent.js"),s=require("./CognitiveComparehelpers.js"),u=require("./CognitiveCompareConfig.js"),a=require("./CognitiveCompareConstants.js"),c=require("./CognitivePopup.js"),d=require("./MoreFunctionsPopup.js"),v=require("./LoaderComponent.js"),f=require("./components/ThreeDotsLoader.js"),p=require("./hooks/useCompareData.js"),g=require("./hooks/useComparePopups.js"),h=require("./hooks/useSectionRefs.js"),m=require("./hooks/useAccordionState.js"),S=require("./hooks/useDeviationNavigation.js"),R=require("./components/CompareHeader.js"),x=require("./components/SubSectionAccordion.js"),_=require("./components/LHSSectionRow.js"),y=require("./components/RHSSectionRow.js"),b=require("./components/CognitiveSummaryPopup.js"),C=require("./CompareContext.js"),E=require("./hooks/useStyles.js"),A=require("./hooks/useResizeHandler.js"),B=require("./hooks/useLinesCalculator.js"),T=require("./hooks/useSideBySide.js"),w=require("./components/SvgConnectors.js");exports.SHARED_MARKDOWN_STYLES=u.SHARED_MARKDOWN_STYLES,exports.default=function(I){var D,F,O,j,P,N,k,L,q,M,H,V,z,G,W,K,U,Y,X,$,J,Q,Z,ee,ne,ie,te=I.componentHeaderText,oe=void 0===te?a.DEFAULT_COMPONENT_HEADER_TEXT:te,re=I.treeData,le=I.comparisonConfig,se=I.leftColumnTitleText,ue=I.rightColumnTitleText,ae=I.markdownStyles,ce=I.resetTrigger,de=I.displayConfig,ve=void 0===de?{isHeaderVisible:!0,isToggleVisible:!0,maintainRelativeOrder:!1,isLoading:!0,showDeviationBadges:!1,enableDeviationSchemaBackwardCompatibility:!1,displayEmailNotifier:!0}:de,fe=I.popupConfig,pe=I.deviationData,ge=void 0===pe?{}:pe,he=I.deviationNodeIdToView,me=I.resetDeviationNodeId,Se=I.isProposingFix,Re=void 0!==Se&&Se,xe=I.proposingFixNodeId,_e=I.isRedlineFlow,ye=i.useState(ve.maintainRelativeOrder),be=ye[0],Ce=ye[1],Ee=!!be||!!(null==ve?void 0:ve.showDeviationBadges),Ae=i.useState(!1),Be=Ae[0],Te=Ae[1],we=i.useState(null),Ie=we[0],De=we[1],Fe=i.useState(null===(F=null!==(D=null==re?void 0:re.newEvaluationResult)&&void 0!==D?D:null==ve?void 0:ve.enableDeviationSchemaBackwardCompatibility)||void 0===F||F)[0],Oe=i.useState(new Set),je=Oe[0],Pe=Oe[1],Ne=i.useState([]),ke=Ne[0],Le=Ne[1],qe=i.useRef(null),Me=i.useRef(null),He=i.useRef(null),Ve=i.useRef(null),ze=i.useRef(null),Ge=i.useRef(!1),We=i.useRef(null),Ke=i.useRef({}),Ue=i.useRef([]),Ye=i.useRef(function(){}),Xe=i.useRef(null),$e=i.useRef(function(){}),Je=i.useMemo(function(){return(null==re?void 0:re.cognitive_decisioning)||{}},[re]),Qe=i.useMemo(function(){return e.__assign(e.__assign({},u.SHARED_MARKDOWN_STYLES),ae)},[ae]),Ze=i.useRef(null),en=i.useRef(null),nn=i.useRef(null),tn=i.useRef(null),on=i.useRef(null),rn=i.useRef(null),ln=i.useRef(null),sn=i.useRef(null),un=i.useRef(null),an=i.useRef(null),cn=g.useComparePopups(Ze),dn=cn.cognitivePopup,vn=cn.setCognitivePopup,fn=cn.moreFunctions,pn=cn.setMoreFunctions,gn=cn.position,hn=cn.setPosition,mn=cn.activeBadgeId,Sn=cn.summaryPopup,Rn=cn.setSummaryPopup,xn=cn.closeSummaryPopup,_n=cn.setActiveBadgeId,yn=cn.popupRef,bn=cn.handleOpenCognitiveCompare,Cn=cn.openCognitivePopupFromState,En=cn.closeCognitivePopup,An=cn.closeMoreFunctionsPopup,Bn=i.useMemo(function(){var e,n,i,t,o,r,l;return{fields:null!==(e=null==le?void 0:le.fields)&&void 0!==e?e:u.DEFAULT_FIELD_CONFIG,thresholds:{high:null!==(i=null===(n=null==le?void 0:le.thresholds)||void 0===n?void 0:n.high)&&void 0!==i?i:u.DEFAULT_COMPARISON_CONFIG.thresholds.high,medium:null!==(o=null===(t=null==le?void 0:le.thresholds)||void 0===t?void 0:t.medium)&&void 0!==o?o:u.DEFAULT_COMPARISON_CONFIG.thresholds.medium,exact:null!==(l=null===(r=null==le?void 0:le.thresholds)||void 0===r?void 0:r.exact)&&void 0!==l?l:u.DEFAULT_COMPARISON_CONFIG.thresholds.exact}}},[le]),Tn=i.useState(null),wn=Tn[0];Tn[1];var In=null===(P=null===(O=null==re?void 0:re.documents)||void 0===O?void 0:O[null===(j=null==re?void 0:re.input_index_map)||void 0===j?void 0:j[0]])||void 0===P?void 0:P.title,Dn=null===(L=null===(N=null==re?void 0:re.documents)||void 0===N?void 0:N[null===(k=null==re?void 0:re.input_index_map)||void 0===k?void 0:k[1]])||void 0===L?void 0:L.title,Fn=s.safeStringify(se||In||"Uploaded Contract"),On=s.safeStringify(ue||Dn||"Reference Template"),jn=p.useCognitiveTreeData(re,be,ge,Bn,Fe),Pn=jn.activeProposed,Nn=jn.existingRule,kn=jn.proposedSections,Ln=jn.existingSections,qn=jn.visibleFields,Mn=jn.parentDeviationRecord,Hn=jn.deviationNumberRegistry,Vn=jn.parseError;i.useEffect(function(){Vn&&De("Failed to load comparison: ".concat(Vn))},[Vn]);var zn=kn.length>0||Ln.length>0,Gn=i.useMemo(function(){if(!_e)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(kn),i(Ln),"".concat(e,":").concat(n)},[_e,kn,Ln]),Wn=h.useSectionRefs(qn.map(function(e){return e.key}),Math.max(kn.length,Ln.length)),Kn=Wn.leftRefs,Un=Wn.rightRefs,Yn=Wn.sectionLeftRefs,Xn=Wn.sectionRightRefs,$n=Wn.lhsBadgeRefs,Jn=Wn.rhsBadgeRefs,Qn=Wn.sectionRightRowRefs,Zn=Wn.subSectionLeftRefs,ei=Wn.subSectionRightRefs,ni=Wn.sectionRowRefs,ii=Wn.getSectionRowRef,ti=Wn.getSubSectionRef,oi=Wn.getBadgeRef,ri=T.useSideBySide({maintainRelativeOrder:be,proposedSections:kn,existingSections:Ln,leftContainerRef:sn,rightContainerRef:nn,scrollContainerRef:Ze,sectionLeftRefs:Yn,sectionRightRefs:Xn,subSectionLeftRefs:Zn,subSectionRightRefs:ei,lhsBadgeRefs:$n,rhsBadgeRefs:Jn,sectionRowRefs:ni,sectionRightRowRefs:Qn,rhsTopSpacerRef:tn,rhsBottomSpacerRef:on,lhsTopSpacerRef:rn,lhsBottomSpacerRef:ln,calculateLinesRef:Ye,setConnectedSections:Pe,setConnectedLines:Le,cachedConnectedPositions:Ue,closeMoreFunctionsPopup:An,setErrorToast:De,moreFunctions:fn,closeSummaryPopup:xn}),li=ri.isSideBySide,si=ri.isArrowVisible,ui=ri.setIsArrowVisible,ai=ri.isResizing,ci=ri.setIsResizing,di=ri.isSideBySideLoading,vi=ri.activeSideBySideSection,fi=ri.scrollLock,pi=ri.sideBySideCacheRef,gi=ri.isSideBySideRef,hi=ri.activeSideBySideRightSectionRef,mi=ri.activeSideBySideSectionRef,Si=ri.sideBySideLineRef,Ri=ri.highlightedClauseRefs,xi=ri.clearClauseHighlight,_i=ri.applyAlignmentPadding,yi=ri.resetSideBySide,bi=ri.activateSideBySide,Ci=m.useAccordionState({maintainRelativeOrder:!!be,proposedSections:kn,existingSections:Ln,activeSideBySideSection:vi,connectedSections:je,resetSideBySide:yi,setConnectedSections:Pe,setConnectedLines:Le,cachedConnectedPositions:Ue,svgContainerRef:qe,isAnimatingRef:Ge,animationTimerRef:We,calculateLinesRef:Ye,sectionLeftRefs:Yn,sectionRightRefs:Xn,subSectionLeftRefs:Zn,subSectionRightRefs:ei}),Ei=Ci.expandedSections,Ai=Ci.setExpandedSections,Bi=Ci.expandedSubSections,Ti=Ci.setExpandedSubSections,wi=Ci.handleSubSectionToggle,Ii=Ci.toggleSection;i.useEffect(function(){_e&&"off"!==Gn&&"0:0"!==Gn&&(pi.current=null,Ue.current=[],requestAnimationFrame(function(){var e;null===(e=Ye.current)||void 0===e||e.call(Ye)}))},[_e,Gn]);var Di=i.useMemo(function(){var e=new Map,n=new Map,i=1;if(be)kn.forEach(function(n){!n.title&&!n.content||n.id&&e.set(n.id,i++)}),Ln.forEach(function(t){if(t.id){var o=kn.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(kn.length,Ln.length),o=0;o<t;o++){var r=kn[o],l=Ln[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}},[kn,Ln,be]),Fi=Nn.analysis,Oi=s.safeStringify(null===(M=null===(q=null==Fi?void 0:Fi.rule_difference_comparison)||void 0===q?void 0:q.summary)||void 0===M?void 0:M.overall_summary),ji=!!Oi.match(/<ai_reasoning>([\s\S]*?)<\/ai_reasoning>/i),Pi=null!==(H=null==re?void 0:re.base_root_id)&&void 0!==H?H:"-1";null==re||re[Pi];var Ni=Fe?null!==(Z=null!==($=ge&&(null===(X=null==ge?void 0:ge[Pi])||void 0===X?void 0:X.evaluation_result))&&void 0!==$?$:null===(Q=null===(J=null==re?void 0:re.nodes)||void 0===J?void 0:J[Pi])||void 0===Q?void 0:Q.evaluation_result)&&void 0!==Z?Z:null:null!==(Y=null!==(G=ge&&(null===(z=null===(V=null==ge?void 0:ge[Pi])||void 0===V?void 0:V.evaluation_result)||void 0===z?void 0:z[0]))&&void 0!==G?G:null===(U=null===(K=null===(W=null==re?void 0:re.nodes)||void 0===W?void 0:W[Pi])||void 0===K?void 0:K.evaluation_result)||void 0===U?void 0:U[0])&&void 0!==Y?Y:null,ki=s.extractDeviationScore(Ni),Li=s.generateColorPalette(null!==(ie=null===(ne=null===(ee=null==Ni?void 0:Ni.evaluation_outputs)||void 0===ee?void 0:ee.metadata)||void 0===ne?void 0:ne.label_color)&&void 0!==ie?ie:a.DEFAULT_DEVIAION_COLOR),qi=i.useCallback(function(){xi(),yi(),Pe(new Set),Le([]),Ue.current=[],et([]),it(null),Rn(a.EMPTY_SUMMARY_POPUP_STATE),En(),requestAnimationFrame(function(){var e;null===(e=Ye.current)||void 0===e||e.call(Ye)})},[]),Mi=i.useRef(qi);i.useEffect(function(){Mi.current=qi},[qi]),i.useEffect(function(){ce&&Mi.current()},[ce]);var Hi=i.useCallback(function(n,i,t,o,r,l,u){var a,c,d,v=s.safeStringify(null==i?void 0:i.id)||s.safeStringify(null==t?void 0:t.id)||"",f=(v?Je[v]:null)||(null==i?void 0:i.cognitiveData)||(null==t?void 0:t.cognitiveData)||{section_id:v,decisioning:[],gap:[],relevance_score:0},p=null!==(c=null===(a=ni.current[o])||void 0===a?void 0:a.current)&&void 0!==c?c:null;return{isLoading:null!==(d=null==ve?void 0:ve.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:f,anchorEl:n,sectionAnchorEl:p,badgeStyle:l||null,sectionIdx:o,docData:{documents:null==re?void 0:re.documents,input_index_map:null==re?void 0:re.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}},[Je,re]),Vi=i.useCallback(function(){var e=fn.sectionIdx,n=fn.isOrphan;An(),xn(),null!==e&&(n?De("No counterpart exists to connect to."):(xi(),gi.current&&yi(),Le([]),Ue.current=[],Pe(function(n){return n.has(e)?new Set:new Set([e])}),setTimeout(function(){Ye.current&&Ye.current()},50)))},[fn.sectionIdx,fn.isOrphan,An,xn,yi]),zi=i.useCallback(function(){var e=ze.current;if(e){ze.current=null;var n=kn.findIndex(function(n){return n.id===e}),i=Ln.findIndex(function(n){return n.id===e}),t=-1===n?s.findKeyPathByNodeId(kn,e):null,o=-1===i?s.findKeyPathByNodeId(Ln,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?(Ri.current.add(r),s.scrollAndHighlightClause(r,n)):t++<i&&requestAnimationFrame(o)};requestAnimationFrame(o)};if(be)-1!==r&&sn.current&&a(function(){return u(n,t,Yn,Zn)},sn.current),-1!==l&&nn.current&&a(function(){return u(i,o,Xn,ei)},nn.current);else{var c=Ze.current;if(!c)return;a(function(){return-1!==r?u(n,t,Yn,Zn):u(i,o,Xn,ei)},c)}}},[kn,Ln,be,Yn,Xn,Zn,ei,sn,nn,Ze]),Gi=i.useCallback(function(n){if(n){xi(),yi(),Pe(new Set),Le([]),Ue.current=[],xn(),En();var i=kn.findIndex(function(e){return e.id===n}),t=Ln.findIndex(function(e){return e.id===n}),o=-1===i?s.findKeyPathByNodeId(kn,n):null,r=-1===t?s.findKeyPathByNodeId(Ln,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;ze.current=n,Ai(function(n){var i,t=e.__assign({},n),o=!1;-1!==l&&(t[i=be?"left-".concat(l):String(l)]||(t[i]=!0,o=!0));-1!==u&&(t[i=be?"right-".concat(u):String(u)]||(t[i]=!0,o=!0));return o?t:n}),Ti(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(){ze.current===n&&Wi.current()})},50)}else console.warn('scrollToAndHighlightClause: nodeId "'.concat(n,'" not found'))}},[kn,Ln,be,Ai,Ti,yi,xn,En]),Wi=i.useRef(zi);i.useEffect(function(){Wi.current=zi},[zi]);var Ki=i.useRef(null);i.useEffect(function(){if(wn){var e=Bn.fields.find(function(e){return e.analysisKey===wn||e.key===wn});if(e){var n=Kn.current[e.key]||Un.current[e.key];(null==n?void 0:n.current)&&setTimeout(function(){return n.current.scrollIntoView({behavior:"smooth",block:"center"})},150)}}},[wn,Bn.fields]);var Ui=i.useCallback(function(e){var n,i,t,o,r,l,s,u,a,c=null===(n=null==Fi?void 0:Fi.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],v=(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 f=d.mappings[0]||{};return{score:d.score,relation:f.relation||"",highlightsA:(null===(l=f.highlights)||void 0===l?void 0:l.ruleA_spans)||[],highlightsB:(null===(s=f.highlights)||void 0===s?void 0:s.ruleB_spans)||[],hasContent:!!v}}return{score: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:!!v}},[Fi]),Yi=E.useStyleHelpers({proposedSections:kn,existingSections:Ln,maintainRelativeOrder:be,cognitiveMap:Je,deviationData:ge,treeData:re,resolvedComparisonConfig:Bn}),Xi=Yi.getSectionCompareStyle,$i=Yi.getSubSectionCompareStyle,Ji=Yi.getDeviationStyleByKey,Qi=B.useLinesCalculator({containerRef:Me,leftContainerRef:sn,rightContainerRef:nn,svgContainerRef:qe,pathRefs:Ke,leftHeaderRef:He,rightHeaderRef:Ve,proposedSections:kn,existingSections:Ln,visibleFields:qn,leftRefs:Kn,rightRefs:Un,sectionLeftRefs:Yn,sectionRightRefs:Xn,subSectionLeftRefs:Zn,subSectionRightRefs:ei,lhsBadgeRefs:$n,rhsBadgeRefs:Jn,sectionRowRefs:ni,expandedSections:Ei,expandedSubSections:Bi,connectedSections:je,isSideBySide:li,activeSideBySideSection:vi,maintainRelativeOrder:be,cognitiveMap:Je,getSectionCompareStyle:Xi,getSubSectionCompareStyle:$i,getDeviationStyleByKey:Ji,isArrowVisible:si,isAnimatingRef:Ge,isSideBySideRef:gi,sideBySideCacheRef:pi,sideBySideLineRef:Si,activeSideBySideSectionRef:mi,activeSideBySideRightSectionRef:hi,connectedLines:ke,setConnectedLines:Le,cachedConnectedPositions:Ue,calculateLinesRef:Ye,resizeTimerRef:Xe,scrollLock:fi,handleResizeRef:$e,activeProposed:Pn,existingRule:Nn,analysisData:Fi,pendingScrollTargetRef:un,pendingScrollCallbackRef:an,resolvedComparisonConfig:Bn,getFieldData:Ui}),Zi=Qi.lines,et=Qi.setLines,nt=Qi.overallConnector,it=Qi.setOverallConnector,tt=Qi.svgDimensions,ot=Qi.handleColumnScroll,rt=i.useCallback(function(){xi(),Ai({}),Ti({}),yi(),Pe(new Set),Le([]),Ue.current=[],xn(),En(),An(),requestAnimationFrame(function(){Ye.current&&Ye.current()})},[Ai,Ti,yi,xn,En,An]),lt=i.useMemo(function(){return Object.values(Ei).some(Boolean)||Object.values(Bi).some(Boolean)},[Ei,Bi]),st=i.useRef(null),ut=i.useRef(0),at=i.useRef(0),ct=i.useRef(0),dt=A.useResizeHandler({timerRef:st,ruleComponentRef:en,scrollContainerRef:Ze,containerRef:Me,maintainRelativeOrder:be,proposedSections:kn,existingSections:Ln,isSideBySideRef:gi,activeSideBySideSectionRef:mi,activeSideBySideRightSectionRef:hi,sectionRowRefs:ni,sectionRightRowRefs:Qn,sectionLeftRefs:Yn,sectionRightRefs:Xn,subSectionLeftRefs:Zn,subSectionRightRefs:ei,lhsBadgeRefs:$n,rhsBadgeRefs:Jn,leftContainerRef:sn,rightContainerRef:nn,calculateLinesRef:Ye,handleResizeRef:$e,setIsResizing:ci,setIsArrowVisible:ui,sideBySideCacheRef:pi,cachedConnectedPositions:Ue}).handleResize;i.useEffect(function(){$e.current=dt},[dt,$e]),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 en.current&&o.push(e(en.current,ut,n,function(){return $e.current()},function(){})),Ze.current&&o.push(e(Ze.current,at,i,function(){return $e.current()},function(){return Ye.current()})),Me.current&&o.push(e(Me.current,ct,t,function(){return $e.current()},function(){return Ye.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(){gi.current=li},[li]),i.useEffect(function(){mi.current=vi},[vi]);var vt=i.useCallback(function(){var e,n=fn.sectionIdx,i=fn.isOrphan;if(xn(),null!=n){var t="left";fn.anchorEl&&(null===(e=nn.current)||void 0===e?void 0:e.contains(fn.anchorEl))&&(t="right"),bi(n,i,{sourceSide:t})}},[bi,fn.isOrphan,fn.sectionIdx,fn.anchorEl,xn]),ft=i.useCallback(function(){xn(),yi(),Pe(new Set),Le([]),Ue.current=[]},[xn,yi]),pt=null!==fn.sectionIdx&&je.has(fn.sectionIdx),gt=S.useDeviationNavigation({proposedSections:kn,existingSections:Ln,parentDeviationRecord:Mn,expandedSections:Ei,maintainRelativeOrder:!!be,scrollContainerRef:Ze,leftContainerRef:sn,rightContainerRef:nn,lhsBadgeRefs:$n,rhsBadgeRefs:Jn}),ht=gt.showDeviationNavigation,mt=gt.showOpenNodeRef,St=gt.adjustScrollForPopup,Rt=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;En();var a="left";(null===(r=nn.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=Jn.current[l])||void 0===e?void 0:e.current:null===(i=$n.current[l])||void 0===i?void 0:i.current}return"right"===a?null===(t=Jn.current[n])||void 0===t?void 0:t.current:null===(o=$n.current[n])||void 0===o?void 0:o.current},d=function(e,t){var o=!!be,r=o?"right"===a?nn.current:sn.current:Ze.current,l=o?"right"===a?sn.current:nn.current:null;if(r&&e){var u=function(){var e="string"==typeof n&&n.includes(s.DEVIATION_BADGE_SEPARATOR);i||!e?t():requestAnimationFrame(function(){var e,i,o;pi.current=null,Ue.current=[],_i(!0,n,null),null===(e=Ye.current)||void 0===e||e.call(Ye),null===(i=sn.current)||void 0===i||i.dispatchEvent(new Event("scroll")),null===(o=nn.current)||void 0===o||o.dispatchEvent(new Event("scroll")),t()})},c=e.getBoundingClientRect(),d=r.getBoundingClientRect(),v=d.bottom-.35*d.height,f=d.top+.35*d.height;if(c.top>v||c.top<f){var p=d.top+d.height/2,g=c.top+c.height/2-p;o&&l&&s.smoothScrollTo(l,l.scrollTop+g,250,function(){}),s.smoothScrollTo(r,r.scrollTop+g,250,u)}else u()}else t()};if(i)return yi(),Pe(new Set),Le([]),Ue.current=[],void(l&&requestAnimationFrame(function(){var e=c()||u;d(e,function(){Rn({open:!0,anchorEl:e,summary:t,displayImpact:o})})}));bi(n,i,l?{toggleIfSame:!1,sourceSide:a,onReady:function(){var e=c()||u;d(e,function(){Rn({open:!0,anchorEl:e,summary:t,displayImpact:o})})}}:{toggleIfSame:!1,sourceSide:a})},[bi,En,Rn,yi,be]),xt=i.useMemo(function(){var e;if(!he)return null;var n=null===(e=null==he?void 0:he.id)||void 0===e?void 0:e.split(":")[0];for(var i in Mn){if((Mn[i]||[]).some(function(e){return e.id===n}))return i}return null},[he,Mn]),_t=i.useRef({id:null,triggerMs:null}),yt=i.useRef(null);i.useEffect(function(){var n;if(null==he?void 0:he.id){var i=Number(he.trigger),t=_t.current;if((null==t?void 0:t.triggerMs)!==i){if(!(he.id.includes(":")&&/:\d+$/.test(he.id)))return _t.current={id:he.id,triggerMs:i},void Gi(he.id);var o=null===(n=null==he?void 0:he.id)||void 0===n?void 0:n.split(":"),r=o[0],l=o[1],u=null!=l?l:"0";yt.current!==he.id&&(xn(),En(),yi(),Pe(new Set),Le([]),Ue.current=[],yt.current=he.id);var a=!1,c=0,d=null,v=150,f=function(e,n){for(var i=function(e,t){if(!e)return null;if(e.id===n)return t;if(!Array.isArray(e.subsections))return null;for(var o=0;o<e.subsections.length;o++){var r=i(e.subsections[o],"".concat(t,"-").concat(o));if(r)return r}return null},t=0;t<e.length;t++){var o=i(e[t],String(t));if(o)return o}return null},p=function(){var n,t,o,l;if(!a){var g=function(){_t.current={id:he.id,triggerMs:i}},h=null,m=null;for(var S in Mn){var R=Mn[S].find(function(e){return e.id===r});if(R){h=S,m=R;break}}if(m&&h){var x=kn.findIndex(function(e){return e.id===h}),_=Ln.findIndex(function(e){return e.id===h}),y=-1===x&&-1!==_,b=f(kn,m.id),C=f(Ln,m.id);if(b&&!C&&!y){var E=b.split("-"),A=Number(E[0]);if(be){var B=null===(t=null===(n=kn[A])||void 0===n?void 0:n.refIndexes)||void 0===t?void 0:t[0],T=Ln.findIndex(function(e){return e.selfIndex===B});-1!==T&&(A=T)}C=e.__spreadArray([A],E.slice(1),!0).join("-")}if(b||C){var w=y||!b&&!!C,I=b?Number(b.split("-")[0]):x,D=C?Number(C.split("-")[0]):_;if(w){if(!(be?!!Ei["right-".concat(D)]:!!Ei[String(D)])&&D>=0)return Ii(D,"right"),c+=1,void(d=setTimeout(p,450))}else if(!(be?!!Ei["left-".concat(I)]:!!Ei[String(I)])&&I>=0)return Ii(I,"left"),c+=1,void(d=setTimeout(p,450));var F,O=b||"",j=C||"",P="".concat(m.id).concat(s.DEVIATION_BADGE_SEPARATOR).concat(u).concat(s.DEVIATION_BADGE_SEPARATOR).concat(O).concat(s.DEVIATION_BADGE_SEPARATOR).concat(j),N="".concat(m.id).concat(s.DEVIATION_BADGE_SEPARATOR).concat(u),k=null===(o=$n.current[N])||void 0===o?void 0:o.current,L=null===(l=Jn.current[N])||void 0===l?void 0:l.current,q=w||!k&&!!L,M=q?L:k;if(F=be?q?nn.current:sn.current:Ze.current,M&&F){var H=M.getBoundingClientRect();if(0===H.height)return void((c+=1)<2?d=setTimeout(p,v):g());var V=F.getBoundingClientRect(),z=H.top-V.top+F.scrollTop-V.height/2+H.height/2+150,G=function(){var n,i,t,o,r;if(!a){g();var l=M instanceof Element?window.getComputedStyle(M).color:"";k&&(k.style.transition="box-shadow 300ms ease-in-out",k.style.boxShadow="0 0 10px ".concat(l)),L&&(L.style.transition="box-shadow 300ms ease-in-out",L.style.boxShadow="0 0 10px ".concat(l)),setTimeout(function(){k&&(k.style.boxShadow=""),L&&(L.style.boxShadow="")},2e3);var s=(null===(i=null===(n=m.evaluationResult)||void 0===n?void 0:n.deviations)||void 0===i?void 0:i[u])||m,c=(null===(t=m.evaluationResult)||void 0===t?void 0:t.evaluation_outputs)||m.evaluation_outputs;if(!(!!k&&!!L)){var d=q?(null===(o=Jn.current[N])||void 0===o?void 0:o.current)||L:(null===(r=$n.current[N])||void 0===r?void 0:r.current)||k;return St(d,function(){Rn({open:!0,anchorEl:d,displayImpact:he.displayImpact,summary:e.__assign(e.__assign({},s),{evaluation_outputs:c})})}),void(null==me||me())}bi(P,!1,{toggleIfSame:!1,sourceSide:"left",onReady:function(){var n,i,t=q?(null===(n=Jn.current[N])||void 0===n?void 0:n.current)||L:(null===(i=$n.current[N])||void 0===i?void 0:i.current)||k;St(t,function(){requestAnimationFrame(function(){var n,i,o;pi.current=null,Ue.current=[],_i(!0,P,null),null===(n=Ye.current)||void 0===n||n.call(Ye),null===(i=sn.current)||void 0===i||i.dispatchEvent(new Event("scroll")),null===(o=nn.current)||void 0===o||o.dispatchEvent(new Event("scroll")),Rn({open:!0,anchorEl:t,displayImpact:null==he?void 0:he.displayImpact,summary:e.__assign({},s)})})})}})}};Math.abs(F.scrollTop-z)<=2?G():(un.current=z,an.current=G,F.scrollTo({top:z,behavior:"smooth"}),d&&clearTimeout(d),d=setTimeout(function(){if(an.current){un.current=null;var e=an.current;an.current=null,e()}},800))}else(c+=1)<2?d=setTimeout(p,v):g()}else(c+=1)<2?d=setTimeout(p,v):g()}else(c+=1)<2?d=setTimeout(p,v):g()}};return d=setTimeout(p,v),function(){a=!0,d&&clearTimeout(d)}}}},[he,Mn,kn,Ln,be,Ei,Ii,bi,Rn,Gi]);var bt={maintainRelativeOrder:!!be,showDeviationBadges:Ee,isProposingFix:Re,proposingFixNodeId:xe,isRedlineFlow:_e,isSideBySide:li,activeSideBySideSection:vi,connectedSections:je,proposedSections:kn,existingSections:Ln,deviationNumberRegistry:Hn,treeData:re,displayConfig:ve,resolvedMarkdownStyles:Qe,unifiedNumbering:Di,expandedSections:Ei,expandedSubSections:Bi,setExpandedSubSections:Ti,getSectionCompareStyle:Xi,getSubSectionCompareStyle:$i,getBadgeRef:oi,getSectionRowRef:ii,getSubSectionRef:ti,sectionLeftRefs:Yn,sectionRightRefs:Xn,sectionRowRefs:ni,sectionRightRowRefs:Qn,subSectionLeftRefs:Zn,subSectionRightRefs:ei,lhsBadgeRefs:$n,rhsBadgeRefs:Jn,openMoreFunctionsPopup:function(e,n,i,t,o,r){var l;if(e.stopPropagation(),fn.open&&fn.sectionIdx===o)An();else{var u=e.currentTarget,a="left";(null===(l=nn.current)||void 0===l?void 0:l.contains(u))&&(a="right");xi(),gi.current&&yi(),Pe(new Set),Le([]),Ue.current=[],En(),Sn.open?ft():xn(),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=Jn.current[l])||void 0===e?void 0:e.current:null===(n=$n.current[l])||void 0===n?void 0:n.current}return"right"===a?null===(i=Jn.current[o])||void 0===i?void 0:i.current:null===(t=$n.current[o])||void 0===t?void 0:t.current}()||u;pn(Hi(e,n,t,o,i,r))})}},handleOpenSummaryPopup:Rt,openSummaryPopup:Rt,handleCloseSummaryPopup:ft,toggleSection:Ii,handleSubSectionToggle:wi,renderSubSectionAccordion:function(e){var i=e.section,t=e.keyPath,o=e.depth,r=void 0===o?0:o,l=e.columnKey,s=void 0===l?"left":l,u=e.parentNodeId,a=void 0===u?"":u,c=e.sectionOffset;return n.jsx(x.default,{section:i,keyPath:t,depth:r,columnKey:s,parentNodeId:a,sectionOffset:c})},resetSideBySide:yi,setConnectedSections:Pe,setConnectedLines:Le,cachedConnectedPositions:Ue,showDeviationNavigation:ht,showOpenNodeRef:mt,deviationNodeIdToView:null==he?void 0:he.id,deviationTargetParentId:xt};return n.jsx(C.CompareContextProvider,e.__assign({value:bt},{children:n.jsxs(t.Box,e.__assign({ref:en,sx:e.__assign(e.__assign({display:"flex",flexDirection:"column",height:"100%",bgcolor:"#F6F7F9B2",fontFamily:'"Plus Jakarta Sans", sans-serif'},be?{}:{overflow:"visible"}),{position:"relative"})},{children:[Be&&n.jsx(t.Box,e.__assign({sx:{position:"absolute",inset:0,bgcolor:"rgba(255, 255, 255, 0.6)",backdropFilter:"blur(10px)",zIndex:9999,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"8px"}},{children:n.jsx(v.default,{})})),Sn.open&&n.jsx(b.default,{open:Sn.open,anchorEl:Sn.anchorEl,containerEl:Ki.current,clipTopEl:He.current,scrollContainerEl:Ze.current,onClose:ft,summary:Sn.summary,displayImpact:Sn.displayImpact}),n.jsx(d.default,{open:fn.open,anchorEl:fn.anchorEl,sectionTitle:fn.sectionTitle,referenceSectionTitle:fn.refSectionTitle,onClose:An,onOpenCognitiveCompare:bn,onOpenSideBySide:vt,onConnect:Vi,isConnected:pt,isOrphan:fn.isOrphan}),dn.open&&n.jsx(c.default,{open:dn.open,popupRef:yn,position:gn,popupConfig:fe,onClose:function(){hn(null),vn(function(n){return e.__assign(e.__assign({},n),{open:!1})}),_n(null)},markdownStyles:ae,sectionTitle:dn.sectionTitle,referenceSectionTitle:dn.refSectionTitle,cognitiveData:dn.cognitiveData,anchorEl:dn.anchorEl,sectionAnchorEl:dn.sectionAnchorEl,scrollContainerEl:Ze.current,badgeStyle:dn.badgeStyle,docData:dn.docData,deviationData:dn.deviationData,isLoading:dn.isLoading}),n.jsx(t.Snackbar,e.__assign({open:!!Ie,autoHideDuration:8e3,onClose:function(){return De(null)},anchorOrigin:{vertical:"top",horizontal:"center"}},{children:n.jsx(t.Alert,e.__assign({onClose:function(){return De(null)},severity:"error",sx:{width:"100%",whiteSpace:"pre-line"}},{children:Ie}))})),n.jsx(R.default,{componentHeaderText:oe,displayConfig:ve,maintainRelativeOrder:be,onCollapseAll:rt,showCollapseAll:lt,onToggleView:function(e){Te(!0),setTimeout(function(){Ce(!e),yi(),xn(),Pe(new Set),Le([]),Ue.current=[],requestAnimationFrame(function(){requestAnimationFrame(function(){setTimeout(function(){Te(!1)},600)})})},50)}}),n.jsx(t.Box,e.__assign({ref:Ze,onScroll:ot,sx:{flex:1,minHeight:0,pt:1.5,pb:1,px:3,display:"flex",justifyContent:"center",alignItems:"flex-start",bgcolor:"#FFFFFF",overflowY:be?"hidden":"auto",borderTop:Oi&&ji?"none":"1.5px solid #EEF0F4"}},{children:n.jsx(t.Box,e.__assign({sx:e.__assign({display:"flex",flexDirection:"column",width:"100%",maxWidth:"1200px"},be?{flex:1,minHeight:0}:{})},{children:n.jsxs(t.Box,e.__assign({ref:Me,sx:e.__assign({display:"grid",gridTemplateColumns:"minmax(0, 1fr) 180px minmax(0, 1fr)",gap:"60px",maxWidth:"1200px",width:"100%",position:"relative",minHeight:0},be?{flex:1,overflow:"visible"}:{})},{children:[n.jsx(w.default,{svgContainerRef:qe,svgDimensions:tt,isResizing:ai,overallConnector:nt,rootDeviationStyle:Li,lines:Zi,isSideBySide:li,activeSideBySideSection:vi,isArrowVisible:si,maintainRelativeOrder:be,proposedSections:kn,existingSections:Ln,cognitivePopup:dn,activeBadgeId:mn,closeCognitivePopup:En,setActiveBadgeId:_n,openCognitivePopupFromState:Cn,buildSectionPopupState:Hi,connectedLines:ke,pathRefs:Ke}),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)"},be?{flex:1,overflow:"visible"}:{})},{children:[n.jsx(t.Box,e.__assign({ref:He,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:Fn,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:Fn}))}))})),n.jsxs(t.Box,e.__assign({ref:sn,onScroll:ot,sx:e.__assign({p:"12px",display:"flex",flexDirection:"column"},be?{maxHeight:"calc(100vh - 150px)",flex:1,overflowY:"auto",overflowX:"hidden",minHeight:0,mr:"-160px",pr:"172px","&::-webkit-scrollbar":{display:"none"},scrollbarWidth:"none"}:{})},{children:[n.jsx("div",{ref:rn,style:{width:"100%",height:"0px",flexShrink:0}}),zn&&kn.map(function(e,i){return n.jsx(_.default,{section:e,idx:i},"left-row-".concat(i))}),n.jsx("div",{ref:ln,style:{width:"100%",height:"0px",flexShrink:0}})]}))]})),n.jsx(t.Box,e.__assign({ref:Ki,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(),dn.open&&mn===Pi?En():(_n(Pi),Cn(Hi(n.currentTarget,{title:"",content:"",evaluationResult:Ni,cognitiveData:{section_id:"",decisioning:[],gap:[],relevance_score:0,isMissingRationale:!0}},null,Pi,!0,e.__assign(e.__assign({},Li),{label:""}))))},sx:{display:"inline-flex",alignItems:"center",gap:"5px",px:1.5,py:"5px",top:"-8px",borderRadius:"20px",bgcolor:Li.badgeBg,color:Li.badgeText,border:"1px solid ".concat(Li.badgeBorder),fontSize:"12px",fontWeight:600,whiteSpace:"nowrap",position:"relative",zIndex:1,pointerEvents:"auto",cursor:"pointer"}},{children:[null!=ki?ki:n.jsx(f.default,{}),n.jsx(t.Box,e.__assign({component:"span",sx:{width:14,height:14,display:"flex",alignItems:"center","& svg":{width:"14px",height:"14px"}}},{children:n.jsx(r.ButtonCognitiveIcon,{})})),n.jsx(o.ChevronDown,{size:11,style:{transform:dn.open&&mn===Pi?"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},be?{flex:1,overflow:"visible",minHeight:0}:{})},{children:[di&&n.jsx(l.default,{sections:11}),n.jsx(t.Box,e.__assign({ref:Ve,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:On,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:On}))}))})),n.jsxs(t.Box,e.__assign({ref:nn,onScroll:ot,sx:e.__assign({p:"12px",display:"flex",flexDirection:"column"},be?{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:tn,style:{width:"100%",height:"0px",flexShrink:0}}),zn&&Ln.map(function(e,i){return n.jsx(y.default,{section:e,idx:i},"right-row-".concat(i))}),n.jsx("div",{ref:on,style:{width:"100%",height:"0px",flexShrink:0}})]}))]}))]}))}))}))]}))}))};
2
2
  //# sourceMappingURL=CognitiveCompare.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),o=require("@mui/material");exports.default=function(t){var r=t.componentHeaderText,n=t.displayConfig,s=t.maintainRelativeOrder,l=t.onToggleView,a=t.onCollapseAll,c=t.showCollapseAll;return n.isHeaderVisible||n.isToggleVisible?i.jsxs(o.Box,e.__assign({sx:{px:2,py:1,display:"flex",alignItems:"center",justifyContent:"space-between",bgcolor:"#FFFFFF",border:"1.5px solid #EEF0F4",borderTopLeftRadius:"8px",borderTopRightRadius:"8px"}},{children:[i.jsx(o.Box,e.__assign({sx:{display:"flex",alignItems:"center",gap:1}},{children:n.isHeaderVisible&&i.jsx(o.Typography,e.__assign({sx:{fontSize:"16px",fontWeight:600,color:"#0F172A"}},{children:r}))})),n.isToggleVisible&&i.jsxs(o.Box,e.__assign({sx:{display:"flex",alignItems:"center",gap:2}},{children:[c&&i.jsx(o.Button,e.__assign({variant:"outlined",size:"small",onClick:a,sx:{textTransform:"none",fontWeight:600,fontSize:"12px",color:"#5928ED",borderColor:"#5928ED",height:26,"&:hover":{borderColor:"#3E1BB3",backgroundColor:"rgba(89, 40, 237, 0.04)"}}},{children:"Collapse All"})),i.jsx(o.FormControlLabel,{control:i.jsx(o.Switch,{checked:!s,onChange:function(e){return l(e.target.checked)},color:"primary",size:"small",sx:{width:100,height:26,padding:0,"& .MuiSwitch-switchBase":{padding:0,margin:"3px",transitionDuration:"300ms","&.Mui-checked":{transform:"translateX(75px)",color:"#fff","& + .MuiSwitch-track":{backgroundColor:"#5928ED",opacity:1,border:0,"&::before":{content:'"Side by Side"',position:"absolute",left:8,top:5,fontSize:10,color:"#fff",fontWeight:600}}},"& .MuiSwitch-thumb:before":{position:"absolute",width:"100%",height:"100%",left:0,top:0,display:"flex",alignItems:"center",justifyContent:"center",fontSize:10,fontWeight:700,color:"#5928ED"}},"& .MuiSwitch-thumb":{boxSizing:"border-box",width:20,height:20,boxShadow:"0px 1px 3px rgba(0,0,0,0.2)"},"& .MuiSwitch-track":{borderRadius:13,backgroundColor:"#CBD5E1",opacity:1,position:"relative","&::before":{content:'"Side By Side"',position:"absolute",right:8,top:5,left:30,fontSize:10,color:"#1E293B",fontWeight:600}}}}),label:"",sx:{m:0}})]}))]})):null};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),o=require("@mui/material");exports.default=function(t){var r=t.componentHeaderText,n=t.displayConfig,s=t.maintainRelativeOrder,l=t.onToggleView,a=t.onCollapseAll,d=t.showCollapseAll;return n.isHeaderVisible||n.isToggleVisible?i.jsxs(o.Box,e.__assign({sx:{px:2,py:1,display:"flex",alignItems:"center",justifyContent:"space-between",bgcolor:"#FFFFFF",border:"1.5px solid #EEF0F4",borderTopLeftRadius:"8px",borderTopRightRadius:"8px"}},{children:[i.jsx(o.Box,e.__assign({sx:{display:"flex",alignItems:"center",gap:1}},{children:n.isHeaderVisible&&i.jsx(o.Typography,e.__assign({sx:{fontSize:"16px",fontWeight:600,color:"#0F172A"}},{children:r}))})),i.jsxs(o.Box,e.__assign({sx:{display:"flex",alignItems:"center",gap:2}},{children:[n.displayEmailNotifier&&i.jsxs(o.Box,e.__assign({sx:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",gap:1,backgroundColor:"#f5f5f5",px:.5,py:.25,borderRadius:1,border:"1px solid #a0a0a0",paddingX:.8}},{children:[i.jsxs("svg",e.__assign({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",className:"lucide lucide-bell-ring-icon lucide-bell-ring"},{children:[i.jsx("path",{d:"M10.268 21a2 2 0 0 0 3.464 0"}),i.jsx("path",{d:"M22 8c0-2.3-.8-4.3-2-6"}),i.jsx("path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326"}),i.jsx("path",{d:"M4 2C2.8 3.7 2 5.7 2 8"})]})),i.jsx(o.Typography,e.__assign({variant:"caption",sx:{color:"black",textAlign:"center",fontSize:"13px",fontWeight:500}},{children:"You'll be notified on completion"}))]})),n.isToggleVisible&&i.jsxs(o.Box,e.__assign({sx:{display:"flex",alignItems:"center",gap:2}},{children:[d&&i.jsx(o.Button,e.__assign({variant:"outlined",size:"small",onClick:a,sx:{textTransform:"none",fontWeight:600,fontSize:"12px",color:"#5928ED",borderColor:"#5928ED",height:26,"&:hover":{borderColor:"#3E1BB3",backgroundColor:"rgba(89, 40, 237, 0.04)"}}},{children:"Collapse All"})),i.jsx(o.FormControlLabel,{control:i.jsx(o.Switch,{checked:!s,onChange:function(e){return l(e.target.checked)},color:"primary",size:"small",sx:{width:100,height:26,padding:0,"& .MuiSwitch-switchBase":{padding:0,margin:"3px",transitionDuration:"300ms","&.Mui-checked":{transform:"translateX(75px)",color:"#fff","& + .MuiSwitch-track":{backgroundColor:"#5928ED",opacity:1,border:0,"&::before":{content:'"Side by Side"',position:"absolute",left:8,top:5,fontSize:10,color:"#fff",fontWeight:600}}},"& .MuiSwitch-thumb:before":{position:"absolute",width:"100%",height:"100%",left:0,top:0,display:"flex",alignItems:"center",justifyContent:"center",fontSize:10,fontWeight:700,color:"#5928ED"}},"& .MuiSwitch-thumb":{boxSizing:"border-box",width:20,height:20,boxShadow:"0px 1px 3px rgba(0,0,0,0.2)"},"& .MuiSwitch-track":{borderRadius:13,backgroundColor:"#CBD5E1",opacity:1,position:"relative","&::before":{content:'"Side By Side"',position:"absolute",right:8,top:5,left:30,fontSize:10,color:"#1E293B",fontWeight:600}}}}),label:"",sx:{m:0}})]}))]}))]})):null};
2
2
  //# sourceMappingURL=CompareHeader.js.map
package/dist/cjs/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./features/CodeCitation/CodeCitation.js"),t=require("./features/ProjectAccordion/ProjectAccordion.js"),i=require("./features/BookCitation/BookCitation.js"),o=require("./features/Bookemon/Bookemon.js"),n=require("./features/PdfEditorCitation/PdfEditorCitation.js"),r=require("./features/CitationRenderer/CitationRenderer.js"),a=require("./features/CitationRenderer/MarkdownRenderer.js"),s=require("./features/CodeCitation/_components/CodeEditor.js"),u=require("./features/PaginatedTable/PaginatedTable.js"),C=require("./features/CognitiveInternalgptReasoning/CognitiveInternalgptReasoningComponent.js"),d=require("./features/ChatCitation/ChatCitationRenderer.js"),f=require("./features/CognitiveDecisioning/CognitiveDecisioningWrapper.js"),p=require("./features/PdfViewer/PdfViewer.js"),l=require("./features/CognitiveDecisioning/FaqCitation/FaqCitation.js"),g=require("./features/RequirementAiCitations/ImageCitation/ImageCitationContent.js"),x=require("./features/RequirementAiCitations/VideoCitation/VideoCitationContent.js"),q=require("./features/RequirementAiCitations/FileCitation/FileCitationContent.js"),j=require("./features/RequirementAiCitations/WebCitation/WebCitationWithImageContent.js"),c=require("./features/MarkdownWithImageCitation/MarkdownWithImageCitation.js"),m=require("./features/RequirementAiCitations/AiReasoning/AiReasoningCitation.js"),I=require("./features/TableCitation/TableCitationContent.js"),R=require("./features/CitationViewer/CitationsViewer.js"),S=require("./features/ExcelCitation/ExcelCitations.js"),T=require("./features/ScannedDocCitation/ScannedDocCitation.js"),E=require("./features/ChatDrawer/ChatDrawer.js"),D=require("./features/ChatDrawer/constants/ChatDrawer.js"),A=require("./features/SplitterCitations/SplitterCitationsComponent.js"),P=require("./features/CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.js"),w=require("./features/TextualGuidelines/TextualGuideLinesComponent.js"),h=require("./features/IngestionStatus/IngestionStatusComponent.js");exports.CodeCitation=e.default,exports.ProjectAccordian=t.default,exports.BookCitation=i.default,exports.Bookemon=o.default,exports.PdfCitation=n.PdfEditorCitation,exports.CitationRenderer=r.default,exports.MarkdownRenderer=a.default,Object.defineProperty(exports,"DiagnosticSeverity",{enumerable:!0,get:function(){return s.DiagnosticSeverity}}),exports.PaginatedTable=u.default,exports.InternalgptReasoningComponent=C.default,exports.NonWebReasoningComponent=C.default,exports.ChatCitation=d.default,exports.CognitiveDecisioningCard=f.default,exports.PdfViewer=p.default,exports.FaqCitation=l.default,exports.ImageCitationContent=g.default,exports.VideoCitationContent=x.default,exports.FileCitationContent=q.default,exports.WebCitationWithImageContent=j.default,exports.MarkdownWithImageCitation=c.default,exports.AiReasoningCitation=m.default,exports.TableCitationContent=I.default,exports.CitationsViewer=R.default,exports.ExcelCitation=S.default,exports.ScannedDocCitation=T.default,exports.ChatDrawer=E.default,exports.FILE_INGESTION_STATUS=D.FILE_INGESTION_STATUS,exports.SUMMARY_EXPAND_HEIGHT_NUDGE=D.SUMMARY_EXPAND_HEIGHT_NUDGE,exports.TRUNCATE_THRESHOLD=D.TRUNCATE_THRESHOLD,exports.SplitterCitationsComponent=A.default,exports.CognitiveInternalgptCoreComponent=P.default,exports.TextualGuideLinesComponent=w.default,exports.IngestionStatusChip=h.IngestionStatusChip,exports.IngestionStatusComponent=h.IngestionStatusComponent;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./features/CodeCitation/CodeCitation.js"),t=require("./features/ProjectAccordion/ProjectAccordion.js"),i=require("./features/BookCitation/BookCitation.js"),o=require("./features/Bookemon/Bookemon.js"),n=require("./features/PdfEditorCitation/PdfEditorCitation.js"),r=require("./features/CitationRenderer/CitationRenderer.js"),a=require("./features/CitationRenderer/MarkdownRenderer.js"),s=require("./features/CodeCitation/_components/CodeEditor.js"),C=require("./features/PaginatedTable/PaginatedTable.js"),u=require("./features/CognitiveInternalgptReasoning/CognitiveInternalgptReasoningComponent.js"),d=require("./features/ChatCitation/ChatCitationRenderer.js"),f=require("./features/CognitiveDecisioning/CognitiveDecisioningWrapper.js"),p=require("./features/PdfViewer/PdfViewer.js"),l=require("./features/CognitiveDecisioning/FaqCitation/FaqCitation.js"),g=require("./features/RequirementAiCitations/ImageCitation/ImageCitationContent.js"),x=require("./features/RequirementAiCitations/VideoCitation/VideoCitationContent.js"),q=require("./features/RequirementAiCitations/FileCitation/FileCitationContent.js"),j=require("./features/RequirementAiCitations/WebCitation/WebCitationWithImageContent.js"),m=require("./features/MarkdownWithImageCitation/MarkdownWithImageCitation.js"),c=require("./features/RequirementAiCitations/AiReasoning/AiReasoningCitation.js"),I=require("./features/TableCitation/TableCitationContent.js"),R=require("./features/CitationViewer/CitationsViewer.js"),S=require("./features/ExcelCitation/ExcelCitations.js"),T=require("./features/ScannedDocCitation/ScannedDocCitation.js"),E=require("./features/ChatDrawer/ChatDrawer.js"),D=require("./features/ChatDrawer/constants/ChatDrawer.js"),A=require("./features/SplitterCitations/SplitterCitationsComponent.js"),P=require("./features/CognitiveCompare/CognitiveCompare.js"),v=require("./features/CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.js"),w=require("./features/TextualGuidelines/TextualGuideLinesComponent.js"),h=require("./features/IngestionStatus/IngestionStatusComponent.js");exports.CodeCitation=e.default,exports.ProjectAccordian=t.default,exports.BookCitation=i.default,exports.Bookemon=o.default,exports.PdfCitation=n.PdfEditorCitation,exports.CitationRenderer=r.default,exports.MarkdownRenderer=a.default,Object.defineProperty(exports,"DiagnosticSeverity",{enumerable:!0,get:function(){return s.DiagnosticSeverity}}),exports.PaginatedTable=C.default,exports.InternalgptReasoningComponent=u.default,exports.NonWebReasoningComponent=u.default,exports.ChatCitation=d.default,exports.CognitiveDecisioningCard=f.default,exports.PdfViewer=p.default,exports.FaqCitation=l.default,exports.ImageCitationContent=g.default,exports.VideoCitationContent=x.default,exports.FileCitationContent=q.default,exports.WebCitationWithImageContent=j.default,exports.MarkdownWithImageCitation=m.default,exports.AiReasoningCitation=c.default,exports.TableCitationContent=I.default,exports.CitationsViewer=R.default,exports.ExcelCitation=S.default,exports.ScannedDocCitation=T.default,exports.ChatDrawer=E.default,exports.FILE_INGESTION_STATUS=D.FILE_INGESTION_STATUS,exports.SUMMARY_EXPAND_HEIGHT_NUDGE=D.SUMMARY_EXPAND_HEIGHT_NUDGE,exports.TRUNCATE_THRESHOLD=D.TRUNCATE_THRESHOLD,exports.SplitterCitationsComponent=A.default,exports.CognitiveCompare=P.default,exports.CognitiveInternalgptCoreComponent=v.default,exports.TextualGuideLinesComponent=w.default,exports.IngestionStatusChip=h.IngestionStatusChip,exports.IngestionStatusComponent=h.IngestionStatusComponent;
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsxs as t,jsx as o}from"react/jsx-runtime";import{useState as n,useRef as i,useEffect as r}from"react";import{ChevronDown as d}from"lucide-react";var l=function(l){var a,s,u=l.children,c=l.uploadListTopContent,p=l.defaultHeight,h=void 0===p?300:p,f=l.minHeight,m=void 0===f?150:f,x=l.maxHeight,g=l.isExpanded,v=void 0!==g&&g,y=l.onToggle,b=l.onHeightChange,w=l.styles,C=void 0===w?{}:w,H=l.drawerSummaryComponent,S=n(!1),k=S[0],E=S[1],B=n(h),D=B[0],I=B[1],L=i(0),R=i(h),z=i(null),j=i(0),F="string"==typeof x?parseFloat(x)/100*window.innerHeight:null!=x?x:.4*window.innerHeight;r(function(){!v&&z.current&&(j.current=z.current.getBoundingClientRect().height)},[v]);return r(function(){if(k){var e=function(e){e.preventDefault();var t=e.clientY-L.current,o=Math.max(m,Math.min(F,R.current+t));I(o),null==b||b(o)},t=function(){E(!1),document.body.style.userSelect=""};return document.addEventListener("mousemove",e),document.addEventListener("mouseup",t),function(){document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",t)}}},[k]),t("div",e({ref:z,style:{position:"relative",width:"100%",minHeight:v?j.current:"auto"}},{children:[t("div",e({style:e({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(D,"px"):"auto",minHeight:v?"".concat(m,"px"):"auto",maxHeight:v?"".concat(D,"px"):"auto",overflow:"hidden",width:"100%"},C.container)},{children:[o("div",e({style:e({display:"flex",alignItems:"center",width:"100%",marginBottom:12,flexShrink:0,padding:"12px 20px 0 20px"},C.header)},{children:o("span",e({style:e({display:"inline-block",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:16,fontWeight:500,lineHeight:"24px",color:"#101828",fontFamily:"Inter, sans-serif"},C.title)},{children:(null==c?void 0:c.trim())?c:"Data uploaded for your context"}))})),H,v&&o("div",e({style:e({flex:1,overflowY:"auto",overflowX:"hidden",minHeight:0,padding:"0 20px"},C.body)},{children:u})),v&&o("div",e({onMouseDown:function(e){e.preventDefault(),E(!0),L.current=e.clientY,R.current=D,document.body.style.userSelect="none"},style:{display:"flex",justifyContent:"center",alignItems:"center",padding:"8px 20px",cursor:"ns-resize",userSelect:"none",flexShrink:0}},{children:o("div",{style:e({width:48,height:4,borderRadius:4,background:k?null!==(a=C.dragPillActiveColor)&&void 0!==a?a:"#a78bfa":"#d1d5db"},C.dragPill)})}))]})),o("div",e({style:{position:v?"absolute":"relative",top:v?"".concat(D,"px"):"auto",width:"100%",display:"flex",justifyContent:"center",height:18,zIndex:v?10:"auto"}},{children:o("button",e({onClick:y,"aria-label":v?"Collapse":"Expand",style:e({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},C.notch)},{children:o(d,{size:14,color:null!==(s=C.notchArrowColor)&&void 0!==s?s:"#6d28d9",style:{transform:v?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"}})}))}))]}))};export{l as default};
1
+ import{__assign as e}from"tslib";import{jsxs as t,jsx as o}from"react/jsx-runtime";import{useState as n,useRef as i,useEffect as r}from"react";import{ChevronDown as l}from"lucide-react";var d=function(d){var a,s,u=d.children,c=d.uploadListTopContent,p=d.defaultHeight,h=void 0===p?300:p,f=d.minHeight,x=void 0===f?150:f,m=d.maxHeight,g=d.isExpanded,v=void 0!==g&&g,y=d.onToggle,b=d.onHeightChange,w=d.styles,C=void 0===w?{}:w,H=n(!1),S=H[0],k=H[1],E=n(h),B=E[0],D=E[1],I=i(0),L=i(h),R=i(null),z=i(0),j="string"==typeof m?parseFloat(m)/100*window.innerHeight:null!=m?m:.4*window.innerHeight;r(function(){!v&&R.current&&(z.current=R.current.getBoundingClientRect().height)},[v]);return r(function(){if(S){var e=function(e){e.preventDefault();var t=e.clientY-I.current,o=Math.max(x,Math.min(j,L.current+t));D(o),null==b||b(o)},t=function(){k(!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("div",e({ref:R,style:{position:"relative",width:"100%",minHeight:v?z.current:"auto"}},{children:[t("div",e({style:e({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(B,"px"):"auto",minHeight:v?"".concat(x,"px"):"auto",maxHeight:v?"".concat(B,"px"):"auto",overflow:"hidden",width:"100%"},C.container)},{children:[o("div",e({style:e({display:"flex",alignItems:"center",width:"100%",marginBottom:12,flexShrink:0,padding:"12px 20px 0 20px"},C.header)},{children:o("span",e({style:e({display:"inline-block",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:16,fontWeight:500,lineHeight:"24px",color:"#101828",fontFamily:"Inter, sans-serif"},C.title)},{children:(null==c?void 0:c.trim())?c:"Data uploaded for your context"}))})),v&&o("div",e({style:e({flex:1,overflowY:"auto",overflowX:"hidden",minHeight:0,padding:"0 20px"},C.body)},{children:u})),v&&o("div",e({onMouseDown:function(e){e.preventDefault(),k(!0),I.current=e.clientY,L.current=B,document.body.style.userSelect="none"},style:{display:"flex",justifyContent:"center",alignItems:"center",padding:"8px 20px",cursor:"ns-resize",userSelect:"none",flexShrink:0}},{children:o("div",{style:e({width:48,height:4,borderRadius:4,background:S?null!==(a=C.dragPillActiveColor)&&void 0!==a?a:"#a78bfa":"#d1d5db"},C.dragPill)})}))]})),o("div",e({style:{position:v?"absolute":"relative",top:v?"".concat(B,"px"):"auto",width:"100%",display:"flex",justifyContent:"center",height:18,zIndex:v?10:"auto"}},{children:o("button",e({onClick:y,"aria-label":v?"Collapse":"Expand",style:e({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},C.notch)},{children:o(l,{size:14,color:null!==(s=C.notchArrowColor)&&void 0!==s?s:"#6d28d9",style:{transform:v?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"}})}))}))]}))};export{d as default};
2
2
  //# sourceMappingURL=ChatDrawer.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e,__spreadArray as n}from"tslib";import{jsx as i,jsxs as t}from"react/jsx-runtime";import{useState as o,useRef as r,useMemo as l,useEffect as u,useCallback as s}from"react";import{Box as a,Snackbar as c,Alert as d,Tooltip as v,Typography as f}from"@mui/material";import{ChevronDown as p}from"lucide-react";import{ButtonCognitiveIcon as g}from"../../assests/svg/ButtonCognitiveIcon.js";import m from"./OverlayComponent.js";import{safeStringify as h,extractDeviationScore as S,generateColorPalette as R,findKeyPathByNodeId as x,hasMeaningfulRedlineTags as y,DEVIATION_BADGE_SEPARATOR as b,smoothScrollTo as C,scrollAndHighlightClause as w}from"./CognitiveComparehelpers.js";import{SHARED_MARKDOWN_STYLES as B,DEFAULT_FIELD_CONFIG as _,DEFAULT_COMPARISON_CONFIG as F}from"./CognitiveCompareConfig.js";export{SHARED_MARKDOWN_STYLES}from"./CognitiveCompareConfig.js";import{DEFAULT_DEVIAION_COLOR as I,EMPTY_SUMMARY_POPUP_STATE as T,DEFAULT_COMPONENT_HEADER_TEXT as E}from"./CognitiveCompareConstants.js";import A from"./CognitivePopup.js";import D from"./MoreFunctionsPopup.js";import j from"./LoaderComponent.js";import P from"./components/ThreeDotsLoader.js";import{useCognitiveTreeData as k}from"./hooks/useCompareData.js";import{useComparePopups as L}from"./hooks/useComparePopups.js";import{useSectionRefs as O}from"./hooks/useSectionRefs.js";import{useAccordionState as N}from"./hooks/useAccordionState.js";import{useDeviationNavigation as H}from"./hooks/useDeviationNavigation.js";import z from"./components/CompareHeader.js";import M from"./components/SubSectionAccordion.js";import q from"./components/LHSSectionRow.js";import W from"./components/RHSSectionRow.js";import V from"./components/CognitiveSummaryPopup.js";import{CompareContextProvider as K}from"./CompareContext.js";import{useStyleHelpers as Y}from"./hooks/useStyles.js";import{useResizeHandler as X}from"./hooks/useResizeHandler.js";import{useLinesCalculator as $}from"./hooks/useLinesCalculator.js";import{useSideBySide as J}from"./hooks/useSideBySide.js";import U from"./components/SvgConnectors.js";var G=function(G){var Q,Z,ee,ne,ie,te,oe,re,le,ue,se,ae,ce,de,ve,fe,pe,ge,me,he,Se,Re,xe,ye,be,Ce,we=G.componentHeaderText,Be=void 0===we?E:we,_e=G.treeData,Fe=G.comparisonConfig,Ie=G.leftColumnTitleText,Te=G.rightColumnTitleText,Ee=G.markdownStyles,Ae=G.resetTrigger,De=G.displayConfig,je=void 0===De?{isHeaderVisible:!0,isToggleVisible:!0,maintainRelativeOrder:!1,isLoading:!0,showDeviationBadges:!1,enableDeviationSchemaBackwardCompatibility:!1}:De,Pe=G.popupConfig,ke=G.deviationData,Le=void 0===ke?{}:ke,Oe=G.deviationNodeIdToView,Ne=G.resetDeviationNodeId,He=G.isProposingFix,ze=void 0!==He&&He,Me=G.proposingFixNodeId,qe=G.isRedlineFlow,We=o(je.maintainRelativeOrder),Ve=We[0],Ke=We[1],Ye=!!Ve||!!(null==je?void 0:je.showDeviationBadges),Xe=o(!1),$e=Xe[0],Je=Xe[1],Ue=o(null),Ge=Ue[0],Qe=Ue[1],Ze=o(null===(Z=null!==(Q=null==_e?void 0:_e.newEvaluationResult)&&void 0!==Q?Q:null==je?void 0:je.enableDeviationSchemaBackwardCompatibility)||void 0===Z||Z)[0],en=o(new Set),nn=en[0],tn=en[1],on=o([]),rn=on[0],ln=on[1],un=r(null),sn=r(null),an=r(null),cn=r(null),dn=r(null),vn=r(!1),fn=r(null),pn=r({}),gn=r([]),mn=r(function(){}),hn=r(null),Sn=r(function(){}),Rn=l(function(){return(null==_e?void 0:_e.cognitive_decisioning)||{}},[_e]),xn=l(function(){return e(e({},B),Ee)},[Ee]),yn=r(null),bn=r(null),Cn=r(null),wn=r(null),Bn=r(null),_n=r(null),Fn=r(null),In=r(null),Tn=r(null),En=r(null),An=L(yn),Dn=An.cognitivePopup,jn=An.setCognitivePopup,Pn=An.moreFunctions,kn=An.setMoreFunctions,Ln=An.position,On=An.setPosition,Nn=An.activeBadgeId,Hn=An.summaryPopup,zn=An.setSummaryPopup,Mn=An.closeSummaryPopup,qn=An.setActiveBadgeId,Wn=An.popupRef,Vn=An.handleOpenCognitiveCompare,Kn=An.openCognitivePopupFromState,Yn=An.closeCognitivePopup,Xn=An.closeMoreFunctionsPopup,$n=l(function(){var e,n,i,t,o,r,l;return{fields:null!==(e=null==Fe?void 0:Fe.fields)&&void 0!==e?e:_,thresholds:{high:null!==(i=null===(n=null==Fe?void 0:Fe.thresholds)||void 0===n?void 0:n.high)&&void 0!==i?i:F.thresholds.high,medium:null!==(o=null===(t=null==Fe?void 0:Fe.thresholds)||void 0===t?void 0:t.medium)&&void 0!==o?o:F.thresholds.medium,exact:null!==(l=null===(r=null==Fe?void 0:Fe.thresholds)||void 0===r?void 0:r.exact)&&void 0!==l?l:F.thresholds.exact}}},[Fe]),Jn=o(null),Un=Jn[0];Jn[1];var Gn=null===(ie=null===(ee=null==_e?void 0:_e.documents)||void 0===ee?void 0:ee[null===(ne=null==_e?void 0:_e.input_index_map)||void 0===ne?void 0:ne[0]])||void 0===ie?void 0:ie.title,Qn=null===(re=null===(te=null==_e?void 0:_e.documents)||void 0===te?void 0:te[null===(oe=null==_e?void 0:_e.input_index_map)||void 0===oe?void 0:oe[1]])||void 0===re?void 0:re.title,Zn=h(Ie||Gn||"Uploaded Contract"),ei=h(Te||Qn||"Reference Template"),ni=k(_e,Ve,Le,$n,Ze),ii=ni.activeProposed,ti=ni.existingRule,oi=ni.proposedSections,ri=ni.existingSections,li=ni.visibleFields,ui=ni.parentDeviationRecord,si=ni.deviationNumberRegistry,ai=ni.parseError;u(function(){ai&&Qe("Failed to load comparison: ".concat(ai))},[ai]);var ci=oi.length>0||ri.length>0,di=l(function(){if(!qe)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)||"";y(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(oi),i(ri),"".concat(e,":").concat(n)},[qe,oi,ri]),vi=O(li.map(function(e){return e.key}),Math.max(oi.length,ri.length)),fi=vi.leftRefs,pi=vi.rightRefs,gi=vi.sectionLeftRefs,mi=vi.sectionRightRefs,hi=vi.lhsBadgeRefs,Si=vi.rhsBadgeRefs,Ri=vi.sectionRightRowRefs,xi=vi.subSectionLeftRefs,yi=vi.subSectionRightRefs,bi=vi.sectionRowRefs,Ci=vi.getSectionRowRef,wi=vi.getSubSectionRef,Bi=vi.getBadgeRef,_i=J({maintainRelativeOrder:Ve,proposedSections:oi,existingSections:ri,leftContainerRef:In,rightContainerRef:Cn,scrollContainerRef:yn,sectionLeftRefs:gi,sectionRightRefs:mi,subSectionLeftRefs:xi,subSectionRightRefs:yi,lhsBadgeRefs:hi,rhsBadgeRefs:Si,sectionRowRefs:bi,sectionRightRowRefs:Ri,rhsTopSpacerRef:wn,rhsBottomSpacerRef:Bn,lhsTopSpacerRef:_n,lhsBottomSpacerRef:Fn,calculateLinesRef:mn,setConnectedSections:tn,setConnectedLines:ln,cachedConnectedPositions:gn,closeMoreFunctionsPopup:Xn,setErrorToast:Qe,moreFunctions:Pn,closeSummaryPopup:Mn}),Fi=_i.isSideBySide,Ii=_i.isArrowVisible,Ti=_i.setIsArrowVisible,Ei=_i.isResizing,Ai=_i.setIsResizing,Di=_i.isSideBySideLoading,ji=_i.activeSideBySideSection,Pi=_i.scrollLock,ki=_i.sideBySideCacheRef,Li=_i.isSideBySideRef,Oi=_i.activeSideBySideRightSectionRef,Ni=_i.activeSideBySideSectionRef,Hi=_i.sideBySideLineRef,zi=_i.highlightedClauseRefs,Mi=_i.clearClauseHighlight,qi=_i.applyAlignmentPadding,Wi=_i.resetSideBySide,Vi=_i.activateSideBySide,Ki=N({maintainRelativeOrder:!!Ve,proposedSections:oi,existingSections:ri,activeSideBySideSection:ji,connectedSections:nn,resetSideBySide:Wi,setConnectedSections:tn,setConnectedLines:ln,cachedConnectedPositions:gn,svgContainerRef:un,isAnimatingRef:vn,animationTimerRef:fn,calculateLinesRef:mn,sectionLeftRefs:gi,sectionRightRefs:mi,subSectionLeftRefs:xi,subSectionRightRefs:yi}),Yi=Ki.expandedSections,Xi=Ki.setExpandedSections,$i=Ki.expandedSubSections,Ji=Ki.setExpandedSubSections,Ui=Ki.handleSubSectionToggle,Gi=Ki.toggleSection;u(function(){qe&&"off"!==di&&"0:0"!==di&&(ki.current=null,gn.current=[],requestAnimationFrame(function(){var e;null===(e=mn.current)||void 0===e||e.call(mn)}))},[qe,di]);var Qi=l(function(){var e=new Map,n=new Map,i=1;if(Ve)oi.forEach(function(n){!n.title&&!n.content||n.id&&e.set(n.id,i++)}),ri.forEach(function(t){if(t.id){var o=oi.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(oi.length,ri.length),o=0;o<t;o++){var r=oi[o],l=ri[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}},[oi,ri,Ve]),Zi=ti.analysis,et=h(null===(ue=null===(le=null==Zi?void 0:Zi.rule_difference_comparison)||void 0===le?void 0:le.summary)||void 0===ue?void 0:ue.overall_summary),nt=!!et.match(/<ai_reasoning>([\s\S]*?)<\/ai_reasoning>/i),it=null!==(se=null==_e?void 0:_e.base_root_id)&&void 0!==se?se:"-1";null==_e||_e[it];var tt=Ze?null!==(xe=null!==(he=Le&&(null===(me=null==Le?void 0:Le[it])||void 0===me?void 0:me.evaluation_result))&&void 0!==he?he:null===(Re=null===(Se=null==_e?void 0:_e.nodes)||void 0===Se?void 0:Se[it])||void 0===Re?void 0:Re.evaluation_result)&&void 0!==xe?xe:null:null!==(ge=null!==(de=Le&&(null===(ce=null===(ae=null==Le?void 0:Le[it])||void 0===ae?void 0:ae.evaluation_result)||void 0===ce?void 0:ce[0]))&&void 0!==de?de:null===(pe=null===(fe=null===(ve=null==_e?void 0:_e.nodes)||void 0===ve?void 0:ve[it])||void 0===fe?void 0:fe.evaluation_result)||void 0===pe?void 0:pe[0])&&void 0!==ge?ge:null,ot=S(tt),rt=R(null!==(Ce=null===(be=null===(ye=null==tt?void 0:tt.evaluation_outputs)||void 0===ye?void 0:ye.metadata)||void 0===be?void 0:be.label_color)&&void 0!==Ce?Ce:I),lt=s(function(){Mi(),Wi(),tn(new Set),ln([]),gn.current=[],yt([]),Ct(null),zn(T),Yn(),requestAnimationFrame(function(){var e;null===(e=mn.current)||void 0===e||e.call(mn)})},[]),ut=r(lt);u(function(){ut.current=lt},[lt]),u(function(){Ae&&ut.current()},[Ae]);var st=s(function(n,i,t,o,r,l,u){var s,a,c,d=h(null==i?void 0:i.id)||h(null==t?void 0:t.id)||"",v=(d?Rn[d]:null)||(null==i?void 0:i.cognitiveData)||(null==t?void 0:t.cognitiveData)||{section_id:d,decisioning:[],gap:[],relevance_score:0},f=null!==(a=null===(s=bi.current[o])||void 0===s?void 0:s.current)&&void 0!==a?a:null;return{isLoading:null!==(c=null==je?void 0:je.isLoading)&&void 0!==c&&c,open:!0,sectionTitle:(null==i?void 0:i.title)?null==i?void 0:i.title:"No Counterpart",refSectionTitle:(null==t?void 0:t.title)?null==t?void 0:t.title:"No Counterpart",cognitiveData:v,anchorEl:n,sectionAnchorEl:f,badgeStyle:l||null,sectionIdx:o,docData:{documents:null==_e?void 0:_e.documents,input_index_map:null==_e?void 0:_e.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(e({},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(b)))return u(l);var s=o.split(b)[1];if(!s)return l;var a=(null==i?void 0:i.evaluationResult)||(null==t?void 0:t.evaluationResult)||{},c=(null===(n=null==a?void 0:a.deviation_entries)||void 0===n?void 0:n[s])||(null===(r=null==a?void 0:a.deviations)||void 0===r?void 0:r[s])||null;return c?e(e(e({},a),c),{deviation_summary:(null==c?void 0:c.deviation_summary)||(null==a?void 0:a.deviation_summary),deviation_title:(null==c?void 0:c.deviation_title)||(null==a?void 0:a.deviation_title),deviation_impact:(null==c?void 0:c.deviation_impact)||(null==a?void 0:a.deviation_impact),deviation_explanation:(null==c?void 0:c.deviation_explanation)||(null==a?void 0:a.deviation_explanation),evaluation_outputs:(null==c?void 0:c.evaluation_outputs)||(null==a?void 0:a.evaluation_outputs),cognitive_decisioning:(null==c?void 0:c.cognitive_decisioning)||(null==a?void 0:a.cognitive_decisioning)}):u(l)}(),isOrphan:!!r}},[Rn,_e]),at=s(function(){var e=Pn.sectionIdx,n=Pn.isOrphan;Xn(),Mn(),null!==e&&(n?Qe("No counterpart exists to connect to."):(Mi(),Li.current&&Wi(),ln([]),gn.current=[],tn(function(n){return n.has(e)?new Set:new Set([e])}),setTimeout(function(){mn.current&&mn.current()},50)))},[Pn.sectionIdx,Pn.isOrphan,Xn,Mn,Wi]),ct=s(function(){var e=dn.current;if(e){dn.current=null;var n=oi.findIndex(function(n){return n.id===e}),i=ri.findIndex(function(n){return n.id===e}),t=-1===n?x(oi,e):null,o=-1===i?x(ri,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,u;return-1!==e?null!==(r=null===(o=i.current[e])||void 0===o?void 0:o.current)&&void 0!==r?r:null:n&&null!==(u=null===(l=t.current[n])||void 0===l?void 0:l.current)&&void 0!==u?u:null},s=function(e,n,i){void 0===i&&(i=30);var t=0,o=function(){var r=e();r&&0!==r.getBoundingClientRect().height?(zi.current.add(r),w(r,n)):t++<i&&requestAnimationFrame(o)};requestAnimationFrame(o)};if(Ve)-1!==r&&In.current&&s(function(){return u(n,t,gi,xi)},In.current),-1!==l&&Cn.current&&s(function(){return u(i,o,mi,yi)},Cn.current);else{var a=yn.current;if(!a)return;s(function(){return-1!==r?u(n,t,gi,xi):u(i,o,mi,yi)},a)}}},[oi,ri,Ve,gi,mi,xi,yi,In,Cn,yn]),dt=s(function(n){if(n){Mi(),Wi(),tn(new Set),ln([]),gn.current=[],Mn(),Yn();var i=oi.findIndex(function(e){return e.id===n}),t=ri.findIndex(function(e){return e.id===n}),o=-1===i?x(oi,n):null,r=-1===t?x(ri,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;dn.current=n,Xi(function(n){var i,t=e({},n),o=!1;-1!==l&&(t[i=Ve?"left-".concat(l):String(l)]||(t[i]=!0,o=!0));-1!==u&&(t[i=Ve?"right-".concat(u):String(u)]||(t[i]=!0,o=!0));return o?t:n}),Ji(function(n){var i=e({},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(){dn.current===n&&vt.current()})},50)}else console.warn('scrollToAndHighlightClause: nodeId "'.concat(n,'" not found'))}},[oi,ri,Ve,Xi,Ji,Wi,Mn,Yn]),vt=r(ct);u(function(){vt.current=ct},[ct]);var ft=r(null);u(function(){if(Un){var e=$n.fields.find(function(e){return e.analysisKey===Un||e.key===Un});if(e){var n=fi.current[e.key]||pi.current[e.key];(null==n?void 0:n.current)&&setTimeout(function(){return n.current.scrollIntoView({behavior:"smooth",block:"center"})},150)}}},[Un,$n.fields]);var pt=s(function(e){var n,i,t,o,r,l,u,s,a,c=null===(n=null==Zi?void 0:Zi.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],v=(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 f=d.mappings[0]||{};return{score:d.score,relation:f.relation||"",highlightsA:(null===(l=f.highlights)||void 0===l?void 0:l.ruleA_spans)||[],highlightsB:(null===(u=f.highlights)||void 0===u?void 0:u.ruleB_spans)||[],hasContent:!!v}}return{score:d.score,relation:d.relation||"",highlightsA:(null===(s=d.highlights)||void 0===s?void 0:s.ruleA_spans)||[],highlightsB:(null===(a=d.highlights)||void 0===a?void 0:a.ruleB_spans)||[],hasContent:!!v}},[Zi]),gt=Y({proposedSections:oi,existingSections:ri,maintainRelativeOrder:Ve,cognitiveMap:Rn,deviationData:Le,treeData:_e,resolvedComparisonConfig:$n}),mt=gt.getSectionCompareStyle,ht=gt.getSubSectionCompareStyle,St=gt.getDeviationStyleByKey,Rt=$({containerRef:sn,leftContainerRef:In,rightContainerRef:Cn,svgContainerRef:un,pathRefs:pn,leftHeaderRef:an,rightHeaderRef:cn,proposedSections:oi,existingSections:ri,visibleFields:li,leftRefs:fi,rightRefs:pi,sectionLeftRefs:gi,sectionRightRefs:mi,subSectionLeftRefs:xi,subSectionRightRefs:yi,lhsBadgeRefs:hi,rhsBadgeRefs:Si,sectionRowRefs:bi,expandedSections:Yi,expandedSubSections:$i,connectedSections:nn,isSideBySide:Fi,activeSideBySideSection:ji,maintainRelativeOrder:Ve,cognitiveMap:Rn,getSectionCompareStyle:mt,getSubSectionCompareStyle:ht,getDeviationStyleByKey:St,isArrowVisible:Ii,isAnimatingRef:vn,isSideBySideRef:Li,sideBySideCacheRef:ki,sideBySideLineRef:Hi,activeSideBySideSectionRef:Ni,activeSideBySideRightSectionRef:Oi,connectedLines:rn,setConnectedLines:ln,cachedConnectedPositions:gn,calculateLinesRef:mn,resizeTimerRef:hn,scrollLock:Pi,handleResizeRef:Sn,activeProposed:ii,existingRule:ti,analysisData:Zi,pendingScrollTargetRef:Tn,pendingScrollCallbackRef:En,resolvedComparisonConfig:$n,getFieldData:pt}),xt=Rt.lines,yt=Rt.setLines,bt=Rt.overallConnector,Ct=Rt.setOverallConnector,wt=Rt.svgDimensions,Bt=Rt.handleColumnScroll,_t=s(function(){Mi(),Xi({}),Ji({}),Wi(),tn(new Set),ln([]),gn.current=[],Mn(),Yn(),Xn(),requestAnimationFrame(function(){mn.current&&mn.current()})},[Xi,Ji,Wi,Mn,Yn,Xn]),Ft=l(function(){return Object.values(Yi).some(Boolean)||Object.values($i).some(Boolean)},[Yi,$i]),It=r(null),Tt=r(0),Et=r(0),At=r(0),Dt=X({timerRef:It,ruleComponentRef:bn,scrollContainerRef:yn,containerRef:sn,maintainRelativeOrder:Ve,proposedSections:oi,existingSections:ri,isSideBySideRef:Li,activeSideBySideSectionRef:Ni,activeSideBySideRightSectionRef:Oi,sectionRowRefs:bi,sectionRightRowRefs:Ri,sectionLeftRefs:gi,sectionRightRefs:mi,subSectionLeftRefs:xi,subSectionRightRefs:yi,lhsBadgeRefs:hi,rhsBadgeRefs:Si,leftContainerRef:In,rightContainerRef:Cn,calculateLinesRef:mn,handleResizeRef:Sn,setIsResizing:Ai,setIsArrowVisible:Ti,sideBySideCacheRef:ki,cachedConnectedPositions:gn}).handleResize;u(function(){Sn.current=Dt},[Dt,Sn]),u(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,u;i.current=null;var s=e[e.length-1];if(s){var a=null!==(u=null===(l=null===(r=s.borderBoxSize)||void 0===r?void 0:r[0])||void 0===l?void 0:l.inlineSize)&&void 0!==u?u:s.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 bn.current&&o.push(e(bn.current,Tt,n,function(){return Sn.current()},function(){})),yn.current&&o.push(e(yn.current,Et,i,function(){return Sn.current()},function(){return mn.current()})),sn.current&&o.push(e(sn.current,At,t,function(){return Sn.current()},function(){return mn.current()})),function(){o.forEach(function(e){return e.disconnect()}),r.forEach(function(e){null!==e.current&&(cancelAnimationFrame(e.current),e.current=null)})}},[]),u(function(){Li.current=Fi},[Fi]),u(function(){Ni.current=ji},[ji]);var jt=s(function(){var e,n=Pn.sectionIdx,i=Pn.isOrphan;if(Mn(),null!=n){var t="left";Pn.anchorEl&&(null===(e=Cn.current)||void 0===e?void 0:e.contains(Pn.anchorEl))&&(t="right"),Vi(n,i,{sourceSide:t})}},[Vi,Pn.isOrphan,Pn.sectionIdx,Pn.anchorEl,Mn]),Pt=s(function(){Mn(),Wi(),tn(new Set),ln([]),gn.current=[]},[Mn,Wi]),kt=null!==Pn.sectionIdx&&nn.has(Pn.sectionIdx),Lt=H({proposedSections:oi,existingSections:ri,parentDeviationRecord:ui,expandedSections:Yi,maintainRelativeOrder:!!Ve,scrollContainerRef:yn,leftContainerRef:In,rightContainerRef:Cn,lhsBadgeRefs:hi,rhsBadgeRefs:Si}),Ot=Lt.showDeviationNavigation,Nt=Lt.showOpenNodeRef,Ht=Lt.adjustScrollForPopup,zt=s(function(e,n,i,t,o){var r,l="string"==typeof t?h(t).trim():h(null==t?void 0:t.deviation_summary).trim(),u=e.currentTarget;Yn();var s="left";(null===(r=Cn.current)||void 0===r?void 0:r.contains(u))&&(s="right");var a=function(){var e,i,t,o;if("string"==typeof n&&n.includes(b)){var r=n.split(b),l="".concat(r[0]).concat(b).concat(r[1]);return"right"===s?null===(e=Si.current[l])||void 0===e?void 0:e.current:null===(i=hi.current[l])||void 0===i?void 0:i.current}return"right"===s?null===(t=Si.current[n])||void 0===t?void 0:t.current:null===(o=hi.current[n])||void 0===o?void 0:o.current},c=function(e,t){var o=!!Ve,r=o?"right"===s?Cn.current:In.current:yn.current,l=o?"right"===s?In.current:Cn.current:null;if(r&&e){var u=function(){var e="string"==typeof n&&n.includes(b);i||!e?t():requestAnimationFrame(function(){var e,i,o;ki.current=null,gn.current=[],qi(!0,n,null),null===(e=mn.current)||void 0===e||e.call(mn),null===(i=In.current)||void 0===i||i.dispatchEvent(new Event("scroll")),null===(o=Cn.current)||void 0===o||o.dispatchEvent(new Event("scroll")),t()})},a=e.getBoundingClientRect(),c=r.getBoundingClientRect(),d=c.bottom-.35*c.height,v=c.top+.35*c.height;if(a.top>d||a.top<v){var f=c.top+c.height/2,p=a.top+a.height/2-f;o&&l&&C(l,l.scrollTop+p,250,function(){}),C(r,r.scrollTop+p,250,u)}else u()}else t()};if(i)return Wi(),tn(new Set),ln([]),gn.current=[],void(l&&requestAnimationFrame(function(){var e=a()||u;c(e,function(){zn({open:!0,anchorEl:e,summary:t,displayImpact:o})})}));Vi(n,i,l?{toggleIfSame:!1,sourceSide:s,onReady:function(){var e=a()||u;c(e,function(){zn({open:!0,anchorEl:e,summary:t,displayImpact:o})})}}:{toggleIfSame:!1,sourceSide:s})},[Vi,Yn,zn,Wi,Ve]),Mt=l(function(){var e;if(!Oe)return null;var n=null===(e=null==Oe?void 0:Oe.id)||void 0===e?void 0:e.split(":")[0];for(var i in ui){if((ui[i]||[]).some(function(e){return e.id===n}))return i}return null},[Oe,ui]),qt=r({id:null,triggerMs:null}),Wt=r(null);u(function(){var i;if(null==Oe?void 0:Oe.id){var t=Number(Oe.trigger),o=qt.current;if((null==o?void 0:o.triggerMs)!==t){if(!(Oe.id.includes(":")&&/:\d+$/.test(Oe.id)))return qt.current={id:Oe.id,triggerMs:t},void dt(Oe.id);var r=null===(i=null==Oe?void 0:Oe.id)||void 0===i?void 0:i.split(":"),l=r[0],u=r[1],s=null!=u?u:"0";Wt.current!==Oe.id&&(Mn(),Yn(),Wi(),tn(new Set),ln([]),gn.current=[],Wt.current=Oe.id);var a=!1,c=0,d=null,v=150,f=function(e,n){for(var i=function(e,t){if(!e)return null;if(e.id===n)return t;if(!Array.isArray(e.subsections))return null;for(var o=0;o<e.subsections.length;o++){var r=i(e.subsections[o],"".concat(t,"-").concat(o));if(r)return r}return null},t=0;t<e.length;t++){var o=i(e[t],String(t));if(o)return o}return null},p=function(){var i,o,r,u;if(!a){var g=function(){qt.current={id:Oe.id,triggerMs:t}},m=null,h=null;for(var S in ui){var R=ui[S].find(function(e){return e.id===l});if(R){m=S,h=R;break}}if(h&&m){var x=oi.findIndex(function(e){return e.id===m}),y=ri.findIndex(function(e){return e.id===m}),C=-1===x&&-1!==y,w=f(oi,h.id),B=f(ri,h.id);if(w&&!B&&!C){var _=w.split("-"),F=Number(_[0]);if(Ve){var I=null===(o=null===(i=oi[F])||void 0===i?void 0:i.refIndexes)||void 0===o?void 0:o[0],T=ri.findIndex(function(e){return e.selfIndex===I});-1!==T&&(F=T)}B=n([F],_.slice(1),!0).join("-")}if(w||B){var E=C||!w&&!!B,A=w?Number(w.split("-")[0]):x,D=B?Number(B.split("-")[0]):y;if(E){if(!(Ve?!!Yi["right-".concat(D)]:!!Yi[String(D)])&&D>=0)return Gi(D,"right"),c+=1,void(d=setTimeout(p,450))}else if(!(Ve?!!Yi["left-".concat(A)]:!!Yi[String(A)])&&A>=0)return Gi(A,"left"),c+=1,void(d=setTimeout(p,450));var j,P=w||"",k=B||"",L="".concat(h.id).concat(b).concat(s).concat(b).concat(P).concat(b).concat(k),O="".concat(h.id).concat(b).concat(s),N=null===(r=hi.current[O])||void 0===r?void 0:r.current,H=null===(u=Si.current[O])||void 0===u?void 0:u.current,z=E||!N&&!!H,M=z?H:N;if(j=Ve?z?Cn.current:In.current:yn.current,M&&j){var q=M.getBoundingClientRect();if(0===q.height)return void((c+=1)<2?d=setTimeout(p,v):g());var W=j.getBoundingClientRect(),V=q.top-W.top+j.scrollTop-W.height/2+q.height/2+150,K=function(){var n,i,t,o,r;if(!a){g();var l=M instanceof Element?window.getComputedStyle(M).color:"";N&&(N.style.transition="box-shadow 300ms ease-in-out",N.style.boxShadow="0 0 10px ".concat(l)),H&&(H.style.transition="box-shadow 300ms ease-in-out",H.style.boxShadow="0 0 10px ".concat(l)),setTimeout(function(){N&&(N.style.boxShadow=""),H&&(H.style.boxShadow="")},2e3);var u=(null===(i=null===(n=h.evaluationResult)||void 0===n?void 0:n.deviations)||void 0===i?void 0:i[s])||h,c=(null===(t=h.evaluationResult)||void 0===t?void 0:t.evaluation_outputs)||h.evaluation_outputs;if(!(!!N&&!!H)){var d=z?(null===(o=Si.current[O])||void 0===o?void 0:o.current)||H:(null===(r=hi.current[O])||void 0===r?void 0:r.current)||N;return Ht(d,function(){zn({open:!0,anchorEl:d,displayImpact:Oe.displayImpact,summary:e(e({},u),{evaluation_outputs:c})})}),void(null==Ne||Ne())}Vi(L,!1,{toggleIfSame:!1,sourceSide:"left",onReady:function(){var n,i,t=z?(null===(n=Si.current[O])||void 0===n?void 0:n.current)||H:(null===(i=hi.current[O])||void 0===i?void 0:i.current)||N;Ht(t,function(){requestAnimationFrame(function(){var n,i,o;ki.current=null,gn.current=[],qi(!0,L,null),null===(n=mn.current)||void 0===n||n.call(mn),null===(i=In.current)||void 0===i||i.dispatchEvent(new Event("scroll")),null===(o=Cn.current)||void 0===o||o.dispatchEvent(new Event("scroll")),zn({open:!0,anchorEl:t,displayImpact:null==Oe?void 0:Oe.displayImpact,summary:e({},u)})})})}})}};Math.abs(j.scrollTop-V)<=2?K():(Tn.current=V,En.current=K,j.scrollTo({top:V,behavior:"smooth"}),d&&clearTimeout(d),d=setTimeout(function(){if(En.current){Tn.current=null;var e=En.current;En.current=null,e()}},800))}else(c+=1)<2?d=setTimeout(p,v):g()}else(c+=1)<2?d=setTimeout(p,v):g()}else(c+=1)<2?d=setTimeout(p,v):g()}};return d=setTimeout(p,v),function(){a=!0,d&&clearTimeout(d)}}}},[Oe,ui,oi,ri,Ve,Yi,Gi,Vi,zn,dt]);var Vt={maintainRelativeOrder:!!Ve,showDeviationBadges:Ye,isProposingFix:ze,proposingFixNodeId:Me,isRedlineFlow:qe,isSideBySide:Fi,activeSideBySideSection:ji,connectedSections:nn,proposedSections:oi,existingSections:ri,deviationNumberRegistry:si,treeData:_e,displayConfig:je,resolvedMarkdownStyles:xn,unifiedNumbering:Qi,expandedSections:Yi,expandedSubSections:$i,setExpandedSubSections:Ji,getSectionCompareStyle:mt,getSubSectionCompareStyle:ht,getBadgeRef:Bi,getSectionRowRef:Ci,getSubSectionRef:wi,sectionLeftRefs:gi,sectionRightRefs:mi,sectionRowRefs:bi,sectionRightRowRefs:Ri,subSectionLeftRefs:xi,subSectionRightRefs:yi,lhsBadgeRefs:hi,rhsBadgeRefs:Si,openMoreFunctionsPopup:function(e,n,i,t,o,r){var l;if(e.stopPropagation(),Pn.open&&Pn.sectionIdx===o)Xn();else{var u=e.currentTarget,s="left";(null===(l=Cn.current)||void 0===l?void 0:l.contains(u))&&(s="right");Mi(),Li.current&&Wi(),tn(new Set),ln([]),gn.current=[],Yn(),Hn.open?Pt():Mn(),requestAnimationFrame(function(){var e=function(){var e,n,i,t;if("string"==typeof o&&o.includes(b)){var r=o.split(b),l="".concat(r[0]).concat(b).concat(r[1]);return"right"===s?null===(e=Si.current[l])||void 0===e?void 0:e.current:null===(n=hi.current[l])||void 0===n?void 0:n.current}return"right"===s?null===(i=Si.current[o])||void 0===i?void 0:i.current:null===(t=hi.current[o])||void 0===t?void 0:t.current}()||u;kn(st(e,n,t,o,i,r))})}},handleOpenSummaryPopup:zt,openSummaryPopup:zt,handleCloseSummaryPopup:Pt,toggleSection:Gi,handleSubSectionToggle:Ui,renderSubSectionAccordion:function(e){var n=e.section,t=e.keyPath,o=e.depth,r=void 0===o?0:o,l=e.columnKey,u=void 0===l?"left":l,s=e.parentNodeId,a=void 0===s?"":s,c=e.sectionOffset;return i(M,{section:n,keyPath:t,depth:r,columnKey:u,parentNodeId:a,sectionOffset:c})},resetSideBySide:Wi,setConnectedSections:tn,setConnectedLines:ln,cachedConnectedPositions:gn,showDeviationNavigation:Ot,showOpenNodeRef:Nt,deviationNodeIdToView:null==Oe?void 0:Oe.id,deviationTargetParentId:Mt};return i(K,e({value:Vt},{children:t(a,e({ref:bn,sx:e(e({display:"flex",flexDirection:"column",height:"100%",bgcolor:"#F6F7F9B2",fontFamily:'"Plus Jakarta Sans", sans-serif'},Ve?{}:{overflow:"visible"}),{position:"relative"})},{children:[$e&&i(a,e({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:i(j,{})})),Hn.open&&i(V,{open:Hn.open,anchorEl:Hn.anchorEl,containerEl:ft.current,clipTopEl:an.current,scrollContainerEl:yn.current,onClose:Pt,summary:Hn.summary,displayImpact:Hn.displayImpact}),i(D,{open:Pn.open,anchorEl:Pn.anchorEl,sectionTitle:Pn.sectionTitle,referenceSectionTitle:Pn.refSectionTitle,onClose:Xn,onOpenCognitiveCompare:Vn,onOpenSideBySide:jt,onConnect:at,isConnected:kt,isOrphan:Pn.isOrphan}),Dn.open&&i(A,{open:Dn.open,popupRef:Wn,position:Ln,popupConfig:Pe,onClose:function(){On(null),jn(function(n){return e(e({},n),{open:!1})}),qn(null)},markdownStyles:Ee,sectionTitle:Dn.sectionTitle,referenceSectionTitle:Dn.refSectionTitle,cognitiveData:Dn.cognitiveData,anchorEl:Dn.anchorEl,sectionAnchorEl:Dn.sectionAnchorEl,scrollContainerEl:yn.current,badgeStyle:Dn.badgeStyle,docData:Dn.docData,deviationData:Dn.deviationData,isLoading:Dn.isLoading}),i(c,e({open:!!Ge,autoHideDuration:8e3,onClose:function(){return Qe(null)},anchorOrigin:{vertical:"top",horizontal:"center"}},{children:i(d,e({onClose:function(){return Qe(null)},severity:"error",sx:{width:"100%",whiteSpace:"pre-line"}},{children:Ge}))})),i(z,{componentHeaderText:Be,displayConfig:je,maintainRelativeOrder:Ve,onCollapseAll:_t,showCollapseAll:Ft,onToggleView:function(e){Je(!0),setTimeout(function(){Ke(!e),Wi(),Mn(),tn(new Set),ln([]),gn.current=[],requestAnimationFrame(function(){requestAnimationFrame(function(){setTimeout(function(){Je(!1)},600)})})},50)}}),i(a,e({ref:yn,onScroll:Bt,sx:{flex:1,minHeight:0,pt:1.5,pb:1,px:3,display:"flex",justifyContent:"center",alignItems:"flex-start",bgcolor:"#FFFFFF",overflowY:Ve?"hidden":"auto",borderTop:et&&nt?"none":"1.5px solid #EEF0F4"}},{children:i(a,e({sx:e({display:"flex",flexDirection:"column",width:"100%",maxWidth:"1200px"},Ve?{flex:1,minHeight:0}:{})},{children:t(a,e({ref:sn,sx:e({display:"grid",gridTemplateColumns:"minmax(0, 1fr) 180px minmax(0, 1fr)",gap:"60px",maxWidth:"1200px",width:"100%",position:"relative",minHeight:0},Ve?{flex:1,overflow:"visible"}:{})},{children:[i(U,{svgContainerRef:un,svgDimensions:wt,isResizing:Ei,overallConnector:bt,rootDeviationStyle:rt,lines:xt,isSideBySide:Fi,activeSideBySideSection:ji,isArrowVisible:Ii,maintainRelativeOrder:Ve,proposedSections:oi,existingSections:ri,cognitivePopup:Dn,activeBadgeId:Nn,closeCognitivePopup:Yn,setActiveBadgeId:qn,openCognitivePopupFromState:Kn,buildSectionPopupState:st,connectedLines:rn,pathRefs:pn}),t(a,e({sx:e({border:"1px solid #E7E7E9",borderRadius:"8px",bgcolor:"#FFFFFF",display:"flex",flexDirection:"column",position:"relative",zIndex:2,filter:"drop-shadow(0px 2px 4px #F2F2F2)"},Ve?{flex:1,overflow:"visible"}:{})},{children:[i(a,e({ref:an,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:i(v,e({title:Zn,placement:"top"},{children:i(f,e({sx:{fontSize:"16px",fontWeight:500,color:"#19213D",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",width:"100%",minWidth:0,textAlign:"center",display:"block"}},{children:Zn}))}))})),t(a,e({ref:In,onScroll:Bt,sx:e({p:"12px",display:"flex",flexDirection:"column"},Ve?{maxHeight:"calc(100vh - 150px)",flex:1,overflowY:"auto",overflowX:"hidden",minHeight:0,mr:"-160px",pr:"172px","&::-webkit-scrollbar":{display:"none"},scrollbarWidth:"none"}:{})},{children:[i("div",{ref:_n,style:{width:"100%",height:"0px",flexShrink:0}}),ci&&oi.map(function(e,n){return i(q,{section:e,idx:n},"left-row-".concat(n))}),i("div",{ref:Fn,style:{width:"100%",height:"0px",flexShrink:0}})]}))]})),i(a,e({ref:ft,sx:{width:"180px",display:"flex",flexDirection:"column",alignItems:"center",pt:"15px",gap:0,zIndex:20,pointerEvents:"none"}},{children:i(a,e({sx:{display:"flex",justifyContent:"center",alignItems:"center",mt:0}},{children:t(a,e({onClick:function(n){n.stopPropagation(),Dn.open&&Nn===it?Yn():(qn(it),Kn(st(n.currentTarget,{title:"",content:"",evaluationResult:tt,cognitiveData:{section_id:"",decisioning:[],gap:[],relevance_score:0,isMissingRationale:!0}},null,it,!0,e(e({},rt),{label:""}))))},sx:{display:"inline-flex",alignItems:"center",gap:"5px",px:1.5,py:"5px",top:"-8px",borderRadius:"20px",bgcolor:rt.badgeBg,color:rt.badgeText,border:"1px solid ".concat(rt.badgeBorder),fontSize:"12px",fontWeight:600,whiteSpace:"nowrap",position:"relative",zIndex:1,pointerEvents:"auto",cursor:"pointer"}},{children:[null!=ot?ot:i(P,{}),i(a,e({component:"span",sx:{width:14,height:14,display:"flex",alignItems:"center","& svg":{width:"14px",height:"14px"}}},{children:i(g,{})})),i(p,{size:11,style:{transform:Dn.open&&Nn===it?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.25s ease"}})]}))}))})),t(a,e({sx:e({border:"1px solid #E3E6EA",borderRadius:"8px",bgcolor:"#FFFFFF",boxShadow:"0px 1px 4px #F7F4FE",position:"relative",zIndex:2,display:"flex",flexDirection:"column",minWidth:0},Ve?{flex:1,overflow:"visible",minHeight:0}:{})},{children:[Di&&i(m,{sections:11}),i(a,e({ref:cn,sx:{p:"8px",bgcolor:"#F7F8FA",borderBottom:"1px solid #E3E6EA",borderRadius:"8px 8px 0 0",minHeight:"40px",display:"flex",alignItems:"center",overflowX:"hidden"}},{children:i(v,e({title:ei,placement:"top"},{children:i(f,e({sx:{fontSize:"16px",fontWeight:500,color:"#5928ED",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",width:"100%",minWidth:0,textAlign:"center",display:"block"}},{children:ei}))}))})),t(a,e({ref:Cn,onScroll:Bt,sx:e({p:"12px",display:"flex",flexDirection:"column"},Ve?{maxHeight:"calc(100vh - 150px)",flex:1,overflowY:"auto",overflowX:"hidden",minHeight:0,ml:"-150px",pl:"165px","&::-webkit-scrollbar":{display:"none"},scrollbarWidth:"none"}:{})},{children:[i("div",{ref:wn,style:{width:"100%",height:"0px",flexShrink:0}}),ci&&ri.map(function(e,n){return i(W,{section:e,idx:n},"right-row-".concat(n))}),i("div",{ref:Bn,style:{width:"100%",height:"0px",flexShrink:0}})]}))]}))]}))}))}))]}))}))};export{G as default};
1
+ import{__assign as e,__spreadArray as n}from"tslib";import{jsx as i,jsxs as t}from"react/jsx-runtime";import{useState as o,useRef as r,useMemo as l,useEffect as u,useCallback as s}from"react";import{Box as a,Snackbar as c,Alert as d,Tooltip as v,Typography as f}from"@mui/material";import{ChevronDown as p}from"lucide-react";import{ButtonCognitiveIcon as g}from"../../assests/svg/ButtonCognitiveIcon.js";import m from"./OverlayComponent.js";import{safeStringify as h,extractDeviationScore as S,generateColorPalette as R,findKeyPathByNodeId as x,hasMeaningfulRedlineTags as y,DEVIATION_BADGE_SEPARATOR as b,smoothScrollTo as C,scrollAndHighlightClause as w}from"./CognitiveComparehelpers.js";import{SHARED_MARKDOWN_STYLES as B,DEFAULT_FIELD_CONFIG as _,DEFAULT_COMPARISON_CONFIG as F}from"./CognitiveCompareConfig.js";export{SHARED_MARKDOWN_STYLES}from"./CognitiveCompareConfig.js";import{DEFAULT_DEVIAION_COLOR as E,EMPTY_SUMMARY_POPUP_STATE as I,DEFAULT_COMPONENT_HEADER_TEXT as T}from"./CognitiveCompareConstants.js";import A from"./CognitivePopup.js";import D from"./MoreFunctionsPopup.js";import j from"./LoaderComponent.js";import P from"./components/ThreeDotsLoader.js";import{useCognitiveTreeData as k}from"./hooks/useCompareData.js";import{useComparePopups as L}from"./hooks/useComparePopups.js";import{useSectionRefs as O}from"./hooks/useSectionRefs.js";import{useAccordionState as N}from"./hooks/useAccordionState.js";import{useDeviationNavigation as H}from"./hooks/useDeviationNavigation.js";import z from"./components/CompareHeader.js";import M from"./components/SubSectionAccordion.js";import q from"./components/LHSSectionRow.js";import W from"./components/RHSSectionRow.js";import V from"./components/CognitiveSummaryPopup.js";import{CompareContextProvider as K}from"./CompareContext.js";import{useStyleHelpers as Y}from"./hooks/useStyles.js";import{useResizeHandler as X}from"./hooks/useResizeHandler.js";import{useLinesCalculator as $}from"./hooks/useLinesCalculator.js";import{useSideBySide as J}from"./hooks/useSideBySide.js";import U from"./components/SvgConnectors.js";var G=function(G){var Q,Z,ee,ne,ie,te,oe,re,le,ue,se,ae,ce,de,ve,fe,pe,ge,me,he,Se,Re,xe,ye,be,Ce,we=G.componentHeaderText,Be=void 0===we?T:we,_e=G.treeData,Fe=G.comparisonConfig,Ee=G.leftColumnTitleText,Ie=G.rightColumnTitleText,Te=G.markdownStyles,Ae=G.resetTrigger,De=G.displayConfig,je=void 0===De?{isHeaderVisible:!0,isToggleVisible:!0,maintainRelativeOrder:!1,isLoading:!0,showDeviationBadges:!1,enableDeviationSchemaBackwardCompatibility:!1,displayEmailNotifier:!0}:De,Pe=G.popupConfig,ke=G.deviationData,Le=void 0===ke?{}:ke,Oe=G.deviationNodeIdToView,Ne=G.resetDeviationNodeId,He=G.isProposingFix,ze=void 0!==He&&He,Me=G.proposingFixNodeId,qe=G.isRedlineFlow,We=o(je.maintainRelativeOrder),Ve=We[0],Ke=We[1],Ye=!!Ve||!!(null==je?void 0:je.showDeviationBadges),Xe=o(!1),$e=Xe[0],Je=Xe[1],Ue=o(null),Ge=Ue[0],Qe=Ue[1],Ze=o(null===(Z=null!==(Q=null==_e?void 0:_e.newEvaluationResult)&&void 0!==Q?Q:null==je?void 0:je.enableDeviationSchemaBackwardCompatibility)||void 0===Z||Z)[0],en=o(new Set),nn=en[0],tn=en[1],on=o([]),rn=on[0],ln=on[1],un=r(null),sn=r(null),an=r(null),cn=r(null),dn=r(null),vn=r(!1),fn=r(null),pn=r({}),gn=r([]),mn=r(function(){}),hn=r(null),Sn=r(function(){}),Rn=l(function(){return(null==_e?void 0:_e.cognitive_decisioning)||{}},[_e]),xn=l(function(){return e(e({},B),Te)},[Te]),yn=r(null),bn=r(null),Cn=r(null),wn=r(null),Bn=r(null),_n=r(null),Fn=r(null),En=r(null),In=r(null),Tn=r(null),An=L(yn),Dn=An.cognitivePopup,jn=An.setCognitivePopup,Pn=An.moreFunctions,kn=An.setMoreFunctions,Ln=An.position,On=An.setPosition,Nn=An.activeBadgeId,Hn=An.summaryPopup,zn=An.setSummaryPopup,Mn=An.closeSummaryPopup,qn=An.setActiveBadgeId,Wn=An.popupRef,Vn=An.handleOpenCognitiveCompare,Kn=An.openCognitivePopupFromState,Yn=An.closeCognitivePopup,Xn=An.closeMoreFunctionsPopup,$n=l(function(){var e,n,i,t,o,r,l;return{fields:null!==(e=null==Fe?void 0:Fe.fields)&&void 0!==e?e:_,thresholds:{high:null!==(i=null===(n=null==Fe?void 0:Fe.thresholds)||void 0===n?void 0:n.high)&&void 0!==i?i:F.thresholds.high,medium:null!==(o=null===(t=null==Fe?void 0:Fe.thresholds)||void 0===t?void 0:t.medium)&&void 0!==o?o:F.thresholds.medium,exact:null!==(l=null===(r=null==Fe?void 0:Fe.thresholds)||void 0===r?void 0:r.exact)&&void 0!==l?l:F.thresholds.exact}}},[Fe]),Jn=o(null),Un=Jn[0];Jn[1];var Gn=null===(ie=null===(ee=null==_e?void 0:_e.documents)||void 0===ee?void 0:ee[null===(ne=null==_e?void 0:_e.input_index_map)||void 0===ne?void 0:ne[0]])||void 0===ie?void 0:ie.title,Qn=null===(re=null===(te=null==_e?void 0:_e.documents)||void 0===te?void 0:te[null===(oe=null==_e?void 0:_e.input_index_map)||void 0===oe?void 0:oe[1]])||void 0===re?void 0:re.title,Zn=h(Ee||Gn||"Uploaded Contract"),ei=h(Ie||Qn||"Reference Template"),ni=k(_e,Ve,Le,$n,Ze),ii=ni.activeProposed,ti=ni.existingRule,oi=ni.proposedSections,ri=ni.existingSections,li=ni.visibleFields,ui=ni.parentDeviationRecord,si=ni.deviationNumberRegistry,ai=ni.parseError;u(function(){ai&&Qe("Failed to load comparison: ".concat(ai))},[ai]);var ci=oi.length>0||ri.length>0,di=l(function(){if(!qe)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)||"";y(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(oi),i(ri),"".concat(e,":").concat(n)},[qe,oi,ri]),vi=O(li.map(function(e){return e.key}),Math.max(oi.length,ri.length)),fi=vi.leftRefs,pi=vi.rightRefs,gi=vi.sectionLeftRefs,mi=vi.sectionRightRefs,hi=vi.lhsBadgeRefs,Si=vi.rhsBadgeRefs,Ri=vi.sectionRightRowRefs,xi=vi.subSectionLeftRefs,yi=vi.subSectionRightRefs,bi=vi.sectionRowRefs,Ci=vi.getSectionRowRef,wi=vi.getSubSectionRef,Bi=vi.getBadgeRef,_i=J({maintainRelativeOrder:Ve,proposedSections:oi,existingSections:ri,leftContainerRef:En,rightContainerRef:Cn,scrollContainerRef:yn,sectionLeftRefs:gi,sectionRightRefs:mi,subSectionLeftRefs:xi,subSectionRightRefs:yi,lhsBadgeRefs:hi,rhsBadgeRefs:Si,sectionRowRefs:bi,sectionRightRowRefs:Ri,rhsTopSpacerRef:wn,rhsBottomSpacerRef:Bn,lhsTopSpacerRef:_n,lhsBottomSpacerRef:Fn,calculateLinesRef:mn,setConnectedSections:tn,setConnectedLines:ln,cachedConnectedPositions:gn,closeMoreFunctionsPopup:Xn,setErrorToast:Qe,moreFunctions:Pn,closeSummaryPopup:Mn}),Fi=_i.isSideBySide,Ei=_i.isArrowVisible,Ii=_i.setIsArrowVisible,Ti=_i.isResizing,Ai=_i.setIsResizing,Di=_i.isSideBySideLoading,ji=_i.activeSideBySideSection,Pi=_i.scrollLock,ki=_i.sideBySideCacheRef,Li=_i.isSideBySideRef,Oi=_i.activeSideBySideRightSectionRef,Ni=_i.activeSideBySideSectionRef,Hi=_i.sideBySideLineRef,zi=_i.highlightedClauseRefs,Mi=_i.clearClauseHighlight,qi=_i.applyAlignmentPadding,Wi=_i.resetSideBySide,Vi=_i.activateSideBySide,Ki=N({maintainRelativeOrder:!!Ve,proposedSections:oi,existingSections:ri,activeSideBySideSection:ji,connectedSections:nn,resetSideBySide:Wi,setConnectedSections:tn,setConnectedLines:ln,cachedConnectedPositions:gn,svgContainerRef:un,isAnimatingRef:vn,animationTimerRef:fn,calculateLinesRef:mn,sectionLeftRefs:gi,sectionRightRefs:mi,subSectionLeftRefs:xi,subSectionRightRefs:yi}),Yi=Ki.expandedSections,Xi=Ki.setExpandedSections,$i=Ki.expandedSubSections,Ji=Ki.setExpandedSubSections,Ui=Ki.handleSubSectionToggle,Gi=Ki.toggleSection;u(function(){qe&&"off"!==di&&"0:0"!==di&&(ki.current=null,gn.current=[],requestAnimationFrame(function(){var e;null===(e=mn.current)||void 0===e||e.call(mn)}))},[qe,di]);var Qi=l(function(){var e=new Map,n=new Map,i=1;if(Ve)oi.forEach(function(n){!n.title&&!n.content||n.id&&e.set(n.id,i++)}),ri.forEach(function(t){if(t.id){var o=oi.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(oi.length,ri.length),o=0;o<t;o++){var r=oi[o],l=ri[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}},[oi,ri,Ve]),Zi=ti.analysis,et=h(null===(ue=null===(le=null==Zi?void 0:Zi.rule_difference_comparison)||void 0===le?void 0:le.summary)||void 0===ue?void 0:ue.overall_summary),nt=!!et.match(/<ai_reasoning>([\s\S]*?)<\/ai_reasoning>/i),it=null!==(se=null==_e?void 0:_e.base_root_id)&&void 0!==se?se:"-1";null==_e||_e[it];var tt=Ze?null!==(xe=null!==(he=Le&&(null===(me=null==Le?void 0:Le[it])||void 0===me?void 0:me.evaluation_result))&&void 0!==he?he:null===(Re=null===(Se=null==_e?void 0:_e.nodes)||void 0===Se?void 0:Se[it])||void 0===Re?void 0:Re.evaluation_result)&&void 0!==xe?xe:null:null!==(ge=null!==(de=Le&&(null===(ce=null===(ae=null==Le?void 0:Le[it])||void 0===ae?void 0:ae.evaluation_result)||void 0===ce?void 0:ce[0]))&&void 0!==de?de:null===(pe=null===(fe=null===(ve=null==_e?void 0:_e.nodes)||void 0===ve?void 0:ve[it])||void 0===fe?void 0:fe.evaluation_result)||void 0===pe?void 0:pe[0])&&void 0!==ge?ge:null,ot=S(tt),rt=R(null!==(Ce=null===(be=null===(ye=null==tt?void 0:tt.evaluation_outputs)||void 0===ye?void 0:ye.metadata)||void 0===be?void 0:be.label_color)&&void 0!==Ce?Ce:E),lt=s(function(){Mi(),Wi(),tn(new Set),ln([]),gn.current=[],yt([]),Ct(null),zn(I),Yn(),requestAnimationFrame(function(){var e;null===(e=mn.current)||void 0===e||e.call(mn)})},[]),ut=r(lt);u(function(){ut.current=lt},[lt]),u(function(){Ae&&ut.current()},[Ae]);var st=s(function(n,i,t,o,r,l,u){var s,a,c,d=h(null==i?void 0:i.id)||h(null==t?void 0:t.id)||"",v=(d?Rn[d]:null)||(null==i?void 0:i.cognitiveData)||(null==t?void 0:t.cognitiveData)||{section_id:d,decisioning:[],gap:[],relevance_score:0},f=null!==(a=null===(s=bi.current[o])||void 0===s?void 0:s.current)&&void 0!==a?a:null;return{isLoading:null!==(c=null==je?void 0:je.isLoading)&&void 0!==c&&c,open:!0,sectionTitle:(null==i?void 0:i.title)?null==i?void 0:i.title:"No Counterpart",refSectionTitle:(null==t?void 0:t.title)?null==t?void 0:t.title:"No Counterpart",cognitiveData:v,anchorEl:n,sectionAnchorEl:f,badgeStyle:l||null,sectionIdx:o,docData:{documents:null==_e?void 0:_e.documents,input_index_map:null==_e?void 0:_e.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(e({},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(b)))return u(l);var s=o.split(b)[1];if(!s)return l;var a=(null==i?void 0:i.evaluationResult)||(null==t?void 0:t.evaluationResult)||{},c=(null===(n=null==a?void 0:a.deviation_entries)||void 0===n?void 0:n[s])||(null===(r=null==a?void 0:a.deviations)||void 0===r?void 0:r[s])||null;return c?e(e(e({},a),c),{deviation_summary:(null==c?void 0:c.deviation_summary)||(null==a?void 0:a.deviation_summary),deviation_title:(null==c?void 0:c.deviation_title)||(null==a?void 0:a.deviation_title),deviation_impact:(null==c?void 0:c.deviation_impact)||(null==a?void 0:a.deviation_impact),deviation_explanation:(null==c?void 0:c.deviation_explanation)||(null==a?void 0:a.deviation_explanation),evaluation_outputs:(null==c?void 0:c.evaluation_outputs)||(null==a?void 0:a.evaluation_outputs),cognitive_decisioning:(null==c?void 0:c.cognitive_decisioning)||(null==a?void 0:a.cognitive_decisioning)}):u(l)}(),isOrphan:!!r}},[Rn,_e]),at=s(function(){var e=Pn.sectionIdx,n=Pn.isOrphan;Xn(),Mn(),null!==e&&(n?Qe("No counterpart exists to connect to."):(Mi(),Li.current&&Wi(),ln([]),gn.current=[],tn(function(n){return n.has(e)?new Set:new Set([e])}),setTimeout(function(){mn.current&&mn.current()},50)))},[Pn.sectionIdx,Pn.isOrphan,Xn,Mn,Wi]),ct=s(function(){var e=dn.current;if(e){dn.current=null;var n=oi.findIndex(function(n){return n.id===e}),i=ri.findIndex(function(n){return n.id===e}),t=-1===n?x(oi,e):null,o=-1===i?x(ri,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,u;return-1!==e?null!==(r=null===(o=i.current[e])||void 0===o?void 0:o.current)&&void 0!==r?r:null:n&&null!==(u=null===(l=t.current[n])||void 0===l?void 0:l.current)&&void 0!==u?u:null},s=function(e,n,i){void 0===i&&(i=30);var t=0,o=function(){var r=e();r&&0!==r.getBoundingClientRect().height?(zi.current.add(r),w(r,n)):t++<i&&requestAnimationFrame(o)};requestAnimationFrame(o)};if(Ve)-1!==r&&En.current&&s(function(){return u(n,t,gi,xi)},En.current),-1!==l&&Cn.current&&s(function(){return u(i,o,mi,yi)},Cn.current);else{var a=yn.current;if(!a)return;s(function(){return-1!==r?u(n,t,gi,xi):u(i,o,mi,yi)},a)}}},[oi,ri,Ve,gi,mi,xi,yi,En,Cn,yn]),dt=s(function(n){if(n){Mi(),Wi(),tn(new Set),ln([]),gn.current=[],Mn(),Yn();var i=oi.findIndex(function(e){return e.id===n}),t=ri.findIndex(function(e){return e.id===n}),o=-1===i?x(oi,n):null,r=-1===t?x(ri,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;dn.current=n,Xi(function(n){var i,t=e({},n),o=!1;-1!==l&&(t[i=Ve?"left-".concat(l):String(l)]||(t[i]=!0,o=!0));-1!==u&&(t[i=Ve?"right-".concat(u):String(u)]||(t[i]=!0,o=!0));return o?t:n}),Ji(function(n){var i=e({},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(){dn.current===n&&vt.current()})},50)}else console.warn('scrollToAndHighlightClause: nodeId "'.concat(n,'" not found'))}},[oi,ri,Ve,Xi,Ji,Wi,Mn,Yn]),vt=r(ct);u(function(){vt.current=ct},[ct]);var ft=r(null);u(function(){if(Un){var e=$n.fields.find(function(e){return e.analysisKey===Un||e.key===Un});if(e){var n=fi.current[e.key]||pi.current[e.key];(null==n?void 0:n.current)&&setTimeout(function(){return n.current.scrollIntoView({behavior:"smooth",block:"center"})},150)}}},[Un,$n.fields]);var pt=s(function(e){var n,i,t,o,r,l,u,s,a,c=null===(n=null==Zi?void 0:Zi.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],v=(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 f=d.mappings[0]||{};return{score:d.score,relation:f.relation||"",highlightsA:(null===(l=f.highlights)||void 0===l?void 0:l.ruleA_spans)||[],highlightsB:(null===(u=f.highlights)||void 0===u?void 0:u.ruleB_spans)||[],hasContent:!!v}}return{score:d.score,relation:d.relation||"",highlightsA:(null===(s=d.highlights)||void 0===s?void 0:s.ruleA_spans)||[],highlightsB:(null===(a=d.highlights)||void 0===a?void 0:a.ruleB_spans)||[],hasContent:!!v}},[Zi]),gt=Y({proposedSections:oi,existingSections:ri,maintainRelativeOrder:Ve,cognitiveMap:Rn,deviationData:Le,treeData:_e,resolvedComparisonConfig:$n}),mt=gt.getSectionCompareStyle,ht=gt.getSubSectionCompareStyle,St=gt.getDeviationStyleByKey,Rt=$({containerRef:sn,leftContainerRef:En,rightContainerRef:Cn,svgContainerRef:un,pathRefs:pn,leftHeaderRef:an,rightHeaderRef:cn,proposedSections:oi,existingSections:ri,visibleFields:li,leftRefs:fi,rightRefs:pi,sectionLeftRefs:gi,sectionRightRefs:mi,subSectionLeftRefs:xi,subSectionRightRefs:yi,lhsBadgeRefs:hi,rhsBadgeRefs:Si,sectionRowRefs:bi,expandedSections:Yi,expandedSubSections:$i,connectedSections:nn,isSideBySide:Fi,activeSideBySideSection:ji,maintainRelativeOrder:Ve,cognitiveMap:Rn,getSectionCompareStyle:mt,getSubSectionCompareStyle:ht,getDeviationStyleByKey:St,isArrowVisible:Ei,isAnimatingRef:vn,isSideBySideRef:Li,sideBySideCacheRef:ki,sideBySideLineRef:Hi,activeSideBySideSectionRef:Ni,activeSideBySideRightSectionRef:Oi,connectedLines:rn,setConnectedLines:ln,cachedConnectedPositions:gn,calculateLinesRef:mn,resizeTimerRef:hn,scrollLock:Pi,handleResizeRef:Sn,activeProposed:ii,existingRule:ti,analysisData:Zi,pendingScrollTargetRef:In,pendingScrollCallbackRef:Tn,resolvedComparisonConfig:$n,getFieldData:pt}),xt=Rt.lines,yt=Rt.setLines,bt=Rt.overallConnector,Ct=Rt.setOverallConnector,wt=Rt.svgDimensions,Bt=Rt.handleColumnScroll,_t=s(function(){Mi(),Xi({}),Ji({}),Wi(),tn(new Set),ln([]),gn.current=[],Mn(),Yn(),Xn(),requestAnimationFrame(function(){mn.current&&mn.current()})},[Xi,Ji,Wi,Mn,Yn,Xn]),Ft=l(function(){return Object.values(Yi).some(Boolean)||Object.values($i).some(Boolean)},[Yi,$i]),Et=r(null),It=r(0),Tt=r(0),At=r(0),Dt=X({timerRef:Et,ruleComponentRef:bn,scrollContainerRef:yn,containerRef:sn,maintainRelativeOrder:Ve,proposedSections:oi,existingSections:ri,isSideBySideRef:Li,activeSideBySideSectionRef:Ni,activeSideBySideRightSectionRef:Oi,sectionRowRefs:bi,sectionRightRowRefs:Ri,sectionLeftRefs:gi,sectionRightRefs:mi,subSectionLeftRefs:xi,subSectionRightRefs:yi,lhsBadgeRefs:hi,rhsBadgeRefs:Si,leftContainerRef:En,rightContainerRef:Cn,calculateLinesRef:mn,handleResizeRef:Sn,setIsResizing:Ai,setIsArrowVisible:Ii,sideBySideCacheRef:ki,cachedConnectedPositions:gn}).handleResize;u(function(){Sn.current=Dt},[Dt,Sn]),u(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,u;i.current=null;var s=e[e.length-1];if(s){var a=null!==(u=null===(l=null===(r=s.borderBoxSize)||void 0===r?void 0:r[0])||void 0===l?void 0:l.inlineSize)&&void 0!==u?u:s.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 bn.current&&o.push(e(bn.current,It,n,function(){return Sn.current()},function(){})),yn.current&&o.push(e(yn.current,Tt,i,function(){return Sn.current()},function(){return mn.current()})),sn.current&&o.push(e(sn.current,At,t,function(){return Sn.current()},function(){return mn.current()})),function(){o.forEach(function(e){return e.disconnect()}),r.forEach(function(e){null!==e.current&&(cancelAnimationFrame(e.current),e.current=null)})}},[]),u(function(){Li.current=Fi},[Fi]),u(function(){Ni.current=ji},[ji]);var jt=s(function(){var e,n=Pn.sectionIdx,i=Pn.isOrphan;if(Mn(),null!=n){var t="left";Pn.anchorEl&&(null===(e=Cn.current)||void 0===e?void 0:e.contains(Pn.anchorEl))&&(t="right"),Vi(n,i,{sourceSide:t})}},[Vi,Pn.isOrphan,Pn.sectionIdx,Pn.anchorEl,Mn]),Pt=s(function(){Mn(),Wi(),tn(new Set),ln([]),gn.current=[]},[Mn,Wi]),kt=null!==Pn.sectionIdx&&nn.has(Pn.sectionIdx),Lt=H({proposedSections:oi,existingSections:ri,parentDeviationRecord:ui,expandedSections:Yi,maintainRelativeOrder:!!Ve,scrollContainerRef:yn,leftContainerRef:En,rightContainerRef:Cn,lhsBadgeRefs:hi,rhsBadgeRefs:Si}),Ot=Lt.showDeviationNavigation,Nt=Lt.showOpenNodeRef,Ht=Lt.adjustScrollForPopup,zt=s(function(e,n,i,t,o){var r,l="string"==typeof t?h(t).trim():h(null==t?void 0:t.deviation_summary).trim(),u=e.currentTarget;Yn();var s="left";(null===(r=Cn.current)||void 0===r?void 0:r.contains(u))&&(s="right");var a=function(){var e,i,t,o;if("string"==typeof n&&n.includes(b)){var r=n.split(b),l="".concat(r[0]).concat(b).concat(r[1]);return"right"===s?null===(e=Si.current[l])||void 0===e?void 0:e.current:null===(i=hi.current[l])||void 0===i?void 0:i.current}return"right"===s?null===(t=Si.current[n])||void 0===t?void 0:t.current:null===(o=hi.current[n])||void 0===o?void 0:o.current},c=function(e,t){var o=!!Ve,r=o?"right"===s?Cn.current:En.current:yn.current,l=o?"right"===s?En.current:Cn.current:null;if(r&&e){var u=function(){var e="string"==typeof n&&n.includes(b);i||!e?t():requestAnimationFrame(function(){var e,i,o;ki.current=null,gn.current=[],qi(!0,n,null),null===(e=mn.current)||void 0===e||e.call(mn),null===(i=En.current)||void 0===i||i.dispatchEvent(new Event("scroll")),null===(o=Cn.current)||void 0===o||o.dispatchEvent(new Event("scroll")),t()})},a=e.getBoundingClientRect(),c=r.getBoundingClientRect(),d=c.bottom-.35*c.height,v=c.top+.35*c.height;if(a.top>d||a.top<v){var f=c.top+c.height/2,p=a.top+a.height/2-f;o&&l&&C(l,l.scrollTop+p,250,function(){}),C(r,r.scrollTop+p,250,u)}else u()}else t()};if(i)return Wi(),tn(new Set),ln([]),gn.current=[],void(l&&requestAnimationFrame(function(){var e=a()||u;c(e,function(){zn({open:!0,anchorEl:e,summary:t,displayImpact:o})})}));Vi(n,i,l?{toggleIfSame:!1,sourceSide:s,onReady:function(){var e=a()||u;c(e,function(){zn({open:!0,anchorEl:e,summary:t,displayImpact:o})})}}:{toggleIfSame:!1,sourceSide:s})},[Vi,Yn,zn,Wi,Ve]),Mt=l(function(){var e;if(!Oe)return null;var n=null===(e=null==Oe?void 0:Oe.id)||void 0===e?void 0:e.split(":")[0];for(var i in ui){if((ui[i]||[]).some(function(e){return e.id===n}))return i}return null},[Oe,ui]),qt=r({id:null,triggerMs:null}),Wt=r(null);u(function(){var i;if(null==Oe?void 0:Oe.id){var t=Number(Oe.trigger),o=qt.current;if((null==o?void 0:o.triggerMs)!==t){if(!(Oe.id.includes(":")&&/:\d+$/.test(Oe.id)))return qt.current={id:Oe.id,triggerMs:t},void dt(Oe.id);var r=null===(i=null==Oe?void 0:Oe.id)||void 0===i?void 0:i.split(":"),l=r[0],u=r[1],s=null!=u?u:"0";Wt.current!==Oe.id&&(Mn(),Yn(),Wi(),tn(new Set),ln([]),gn.current=[],Wt.current=Oe.id);var a=!1,c=0,d=null,v=150,f=function(e,n){for(var i=function(e,t){if(!e)return null;if(e.id===n)return t;if(!Array.isArray(e.subsections))return null;for(var o=0;o<e.subsections.length;o++){var r=i(e.subsections[o],"".concat(t,"-").concat(o));if(r)return r}return null},t=0;t<e.length;t++){var o=i(e[t],String(t));if(o)return o}return null},p=function(){var i,o,r,u;if(!a){var g=function(){qt.current={id:Oe.id,triggerMs:t}},m=null,h=null;for(var S in ui){var R=ui[S].find(function(e){return e.id===l});if(R){m=S,h=R;break}}if(h&&m){var x=oi.findIndex(function(e){return e.id===m}),y=ri.findIndex(function(e){return e.id===m}),C=-1===x&&-1!==y,w=f(oi,h.id),B=f(ri,h.id);if(w&&!B&&!C){var _=w.split("-"),F=Number(_[0]);if(Ve){var E=null===(o=null===(i=oi[F])||void 0===i?void 0:i.refIndexes)||void 0===o?void 0:o[0],I=ri.findIndex(function(e){return e.selfIndex===E});-1!==I&&(F=I)}B=n([F],_.slice(1),!0).join("-")}if(w||B){var T=C||!w&&!!B,A=w?Number(w.split("-")[0]):x,D=B?Number(B.split("-")[0]):y;if(T){if(!(Ve?!!Yi["right-".concat(D)]:!!Yi[String(D)])&&D>=0)return Gi(D,"right"),c+=1,void(d=setTimeout(p,450))}else if(!(Ve?!!Yi["left-".concat(A)]:!!Yi[String(A)])&&A>=0)return Gi(A,"left"),c+=1,void(d=setTimeout(p,450));var j,P=w||"",k=B||"",L="".concat(h.id).concat(b).concat(s).concat(b).concat(P).concat(b).concat(k),O="".concat(h.id).concat(b).concat(s),N=null===(r=hi.current[O])||void 0===r?void 0:r.current,H=null===(u=Si.current[O])||void 0===u?void 0:u.current,z=T||!N&&!!H,M=z?H:N;if(j=Ve?z?Cn.current:En.current:yn.current,M&&j){var q=M.getBoundingClientRect();if(0===q.height)return void((c+=1)<2?d=setTimeout(p,v):g());var W=j.getBoundingClientRect(),V=q.top-W.top+j.scrollTop-W.height/2+q.height/2+150,K=function(){var n,i,t,o,r;if(!a){g();var l=M instanceof Element?window.getComputedStyle(M).color:"";N&&(N.style.transition="box-shadow 300ms ease-in-out",N.style.boxShadow="0 0 10px ".concat(l)),H&&(H.style.transition="box-shadow 300ms ease-in-out",H.style.boxShadow="0 0 10px ".concat(l)),setTimeout(function(){N&&(N.style.boxShadow=""),H&&(H.style.boxShadow="")},2e3);var u=(null===(i=null===(n=h.evaluationResult)||void 0===n?void 0:n.deviations)||void 0===i?void 0:i[s])||h,c=(null===(t=h.evaluationResult)||void 0===t?void 0:t.evaluation_outputs)||h.evaluation_outputs;if(!(!!N&&!!H)){var d=z?(null===(o=Si.current[O])||void 0===o?void 0:o.current)||H:(null===(r=hi.current[O])||void 0===r?void 0:r.current)||N;return Ht(d,function(){zn({open:!0,anchorEl:d,displayImpact:Oe.displayImpact,summary:e(e({},u),{evaluation_outputs:c})})}),void(null==Ne||Ne())}Vi(L,!1,{toggleIfSame:!1,sourceSide:"left",onReady:function(){var n,i,t=z?(null===(n=Si.current[O])||void 0===n?void 0:n.current)||H:(null===(i=hi.current[O])||void 0===i?void 0:i.current)||N;Ht(t,function(){requestAnimationFrame(function(){var n,i,o;ki.current=null,gn.current=[],qi(!0,L,null),null===(n=mn.current)||void 0===n||n.call(mn),null===(i=En.current)||void 0===i||i.dispatchEvent(new Event("scroll")),null===(o=Cn.current)||void 0===o||o.dispatchEvent(new Event("scroll")),zn({open:!0,anchorEl:t,displayImpact:null==Oe?void 0:Oe.displayImpact,summary:e({},u)})})})}})}};Math.abs(j.scrollTop-V)<=2?K():(In.current=V,Tn.current=K,j.scrollTo({top:V,behavior:"smooth"}),d&&clearTimeout(d),d=setTimeout(function(){if(Tn.current){In.current=null;var e=Tn.current;Tn.current=null,e()}},800))}else(c+=1)<2?d=setTimeout(p,v):g()}else(c+=1)<2?d=setTimeout(p,v):g()}else(c+=1)<2?d=setTimeout(p,v):g()}};return d=setTimeout(p,v),function(){a=!0,d&&clearTimeout(d)}}}},[Oe,ui,oi,ri,Ve,Yi,Gi,Vi,zn,dt]);var Vt={maintainRelativeOrder:!!Ve,showDeviationBadges:Ye,isProposingFix:ze,proposingFixNodeId:Me,isRedlineFlow:qe,isSideBySide:Fi,activeSideBySideSection:ji,connectedSections:nn,proposedSections:oi,existingSections:ri,deviationNumberRegistry:si,treeData:_e,displayConfig:je,resolvedMarkdownStyles:xn,unifiedNumbering:Qi,expandedSections:Yi,expandedSubSections:$i,setExpandedSubSections:Ji,getSectionCompareStyle:mt,getSubSectionCompareStyle:ht,getBadgeRef:Bi,getSectionRowRef:Ci,getSubSectionRef:wi,sectionLeftRefs:gi,sectionRightRefs:mi,sectionRowRefs:bi,sectionRightRowRefs:Ri,subSectionLeftRefs:xi,subSectionRightRefs:yi,lhsBadgeRefs:hi,rhsBadgeRefs:Si,openMoreFunctionsPopup:function(e,n,i,t,o,r){var l;if(e.stopPropagation(),Pn.open&&Pn.sectionIdx===o)Xn();else{var u=e.currentTarget,s="left";(null===(l=Cn.current)||void 0===l?void 0:l.contains(u))&&(s="right");Mi(),Li.current&&Wi(),tn(new Set),ln([]),gn.current=[],Yn(),Hn.open?Pt():Mn(),requestAnimationFrame(function(){var e=function(){var e,n,i,t;if("string"==typeof o&&o.includes(b)){var r=o.split(b),l="".concat(r[0]).concat(b).concat(r[1]);return"right"===s?null===(e=Si.current[l])||void 0===e?void 0:e.current:null===(n=hi.current[l])||void 0===n?void 0:n.current}return"right"===s?null===(i=Si.current[o])||void 0===i?void 0:i.current:null===(t=hi.current[o])||void 0===t?void 0:t.current}()||u;kn(st(e,n,t,o,i,r))})}},handleOpenSummaryPopup:zt,openSummaryPopup:zt,handleCloseSummaryPopup:Pt,toggleSection:Gi,handleSubSectionToggle:Ui,renderSubSectionAccordion:function(e){var n=e.section,t=e.keyPath,o=e.depth,r=void 0===o?0:o,l=e.columnKey,u=void 0===l?"left":l,s=e.parentNodeId,a=void 0===s?"":s,c=e.sectionOffset;return i(M,{section:n,keyPath:t,depth:r,columnKey:u,parentNodeId:a,sectionOffset:c})},resetSideBySide:Wi,setConnectedSections:tn,setConnectedLines:ln,cachedConnectedPositions:gn,showDeviationNavigation:Ot,showOpenNodeRef:Nt,deviationNodeIdToView:null==Oe?void 0:Oe.id,deviationTargetParentId:Mt};return i(K,e({value:Vt},{children:t(a,e({ref:bn,sx:e(e({display:"flex",flexDirection:"column",height:"100%",bgcolor:"#F6F7F9B2",fontFamily:'"Plus Jakarta Sans", sans-serif'},Ve?{}:{overflow:"visible"}),{position:"relative"})},{children:[$e&&i(a,e({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:i(j,{})})),Hn.open&&i(V,{open:Hn.open,anchorEl:Hn.anchorEl,containerEl:ft.current,clipTopEl:an.current,scrollContainerEl:yn.current,onClose:Pt,summary:Hn.summary,displayImpact:Hn.displayImpact}),i(D,{open:Pn.open,anchorEl:Pn.anchorEl,sectionTitle:Pn.sectionTitle,referenceSectionTitle:Pn.refSectionTitle,onClose:Xn,onOpenCognitiveCompare:Vn,onOpenSideBySide:jt,onConnect:at,isConnected:kt,isOrphan:Pn.isOrphan}),Dn.open&&i(A,{open:Dn.open,popupRef:Wn,position:Ln,popupConfig:Pe,onClose:function(){On(null),jn(function(n){return e(e({},n),{open:!1})}),qn(null)},markdownStyles:Te,sectionTitle:Dn.sectionTitle,referenceSectionTitle:Dn.refSectionTitle,cognitiveData:Dn.cognitiveData,anchorEl:Dn.anchorEl,sectionAnchorEl:Dn.sectionAnchorEl,scrollContainerEl:yn.current,badgeStyle:Dn.badgeStyle,docData:Dn.docData,deviationData:Dn.deviationData,isLoading:Dn.isLoading}),i(c,e({open:!!Ge,autoHideDuration:8e3,onClose:function(){return Qe(null)},anchorOrigin:{vertical:"top",horizontal:"center"}},{children:i(d,e({onClose:function(){return Qe(null)},severity:"error",sx:{width:"100%",whiteSpace:"pre-line"}},{children:Ge}))})),i(z,{componentHeaderText:Be,displayConfig:je,maintainRelativeOrder:Ve,onCollapseAll:_t,showCollapseAll:Ft,onToggleView:function(e){Je(!0),setTimeout(function(){Ke(!e),Wi(),Mn(),tn(new Set),ln([]),gn.current=[],requestAnimationFrame(function(){requestAnimationFrame(function(){setTimeout(function(){Je(!1)},600)})})},50)}}),i(a,e({ref:yn,onScroll:Bt,sx:{flex:1,minHeight:0,pt:1.5,pb:1,px:3,display:"flex",justifyContent:"center",alignItems:"flex-start",bgcolor:"#FFFFFF",overflowY:Ve?"hidden":"auto",borderTop:et&&nt?"none":"1.5px solid #EEF0F4"}},{children:i(a,e({sx:e({display:"flex",flexDirection:"column",width:"100%",maxWidth:"1200px"},Ve?{flex:1,minHeight:0}:{})},{children:t(a,e({ref:sn,sx:e({display:"grid",gridTemplateColumns:"minmax(0, 1fr) 180px minmax(0, 1fr)",gap:"60px",maxWidth:"1200px",width:"100%",position:"relative",minHeight:0},Ve?{flex:1,overflow:"visible"}:{})},{children:[i(U,{svgContainerRef:un,svgDimensions:wt,isResizing:Ti,overallConnector:bt,rootDeviationStyle:rt,lines:xt,isSideBySide:Fi,activeSideBySideSection:ji,isArrowVisible:Ei,maintainRelativeOrder:Ve,proposedSections:oi,existingSections:ri,cognitivePopup:Dn,activeBadgeId:Nn,closeCognitivePopup:Yn,setActiveBadgeId:qn,openCognitivePopupFromState:Kn,buildSectionPopupState:st,connectedLines:rn,pathRefs:pn}),t(a,e({sx:e({border:"1px solid #E7E7E9",borderRadius:"8px",bgcolor:"#FFFFFF",display:"flex",flexDirection:"column",position:"relative",zIndex:2,filter:"drop-shadow(0px 2px 4px #F2F2F2)"},Ve?{flex:1,overflow:"visible"}:{})},{children:[i(a,e({ref:an,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:i(v,e({title:Zn,placement:"top"},{children:i(f,e({sx:{fontSize:"16px",fontWeight:500,color:"#19213D",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",width:"100%",minWidth:0,textAlign:"center",display:"block"}},{children:Zn}))}))})),t(a,e({ref:En,onScroll:Bt,sx:e({p:"12px",display:"flex",flexDirection:"column"},Ve?{maxHeight:"calc(100vh - 150px)",flex:1,overflowY:"auto",overflowX:"hidden",minHeight:0,mr:"-160px",pr:"172px","&::-webkit-scrollbar":{display:"none"},scrollbarWidth:"none"}:{})},{children:[i("div",{ref:_n,style:{width:"100%",height:"0px",flexShrink:0}}),ci&&oi.map(function(e,n){return i(q,{section:e,idx:n},"left-row-".concat(n))}),i("div",{ref:Fn,style:{width:"100%",height:"0px",flexShrink:0}})]}))]})),i(a,e({ref:ft,sx:{width:"180px",display:"flex",flexDirection:"column",alignItems:"center",pt:"15px",gap:0,zIndex:20,pointerEvents:"none"}},{children:i(a,e({sx:{display:"flex",justifyContent:"center",alignItems:"center",mt:0}},{children:t(a,e({onClick:function(n){n.stopPropagation(),Dn.open&&Nn===it?Yn():(qn(it),Kn(st(n.currentTarget,{title:"",content:"",evaluationResult:tt,cognitiveData:{section_id:"",decisioning:[],gap:[],relevance_score:0,isMissingRationale:!0}},null,it,!0,e(e({},rt),{label:""}))))},sx:{display:"inline-flex",alignItems:"center",gap:"5px",px:1.5,py:"5px",top:"-8px",borderRadius:"20px",bgcolor:rt.badgeBg,color:rt.badgeText,border:"1px solid ".concat(rt.badgeBorder),fontSize:"12px",fontWeight:600,whiteSpace:"nowrap",position:"relative",zIndex:1,pointerEvents:"auto",cursor:"pointer"}},{children:[null!=ot?ot:i(P,{}),i(a,e({component:"span",sx:{width:14,height:14,display:"flex",alignItems:"center","& svg":{width:"14px",height:"14px"}}},{children:i(g,{})})),i(p,{size:11,style:{transform:Dn.open&&Nn===it?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.25s ease"}})]}))}))})),t(a,e({sx:e({border:"1px solid #E3E6EA",borderRadius:"8px",bgcolor:"#FFFFFF",boxShadow:"0px 1px 4px #F7F4FE",position:"relative",zIndex:2,display:"flex",flexDirection:"column",minWidth:0},Ve?{flex:1,overflow:"visible",minHeight:0}:{})},{children:[Di&&i(m,{sections:11}),i(a,e({ref:cn,sx:{p:"8px",bgcolor:"#F7F8FA",borderBottom:"1px solid #E3E6EA",borderRadius:"8px 8px 0 0",minHeight:"40px",display:"flex",alignItems:"center",overflowX:"hidden"}},{children:i(v,e({title:ei,placement:"top"},{children:i(f,e({sx:{fontSize:"16px",fontWeight:500,color:"#5928ED",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",width:"100%",minWidth:0,textAlign:"center",display:"block"}},{children:ei}))}))})),t(a,e({ref:Cn,onScroll:Bt,sx:e({p:"12px",display:"flex",flexDirection:"column"},Ve?{maxHeight:"calc(100vh - 150px)",flex:1,overflowY:"auto",overflowX:"hidden",minHeight:0,ml:"-150px",pl:"165px","&::-webkit-scrollbar":{display:"none"},scrollbarWidth:"none"}:{})},{children:[i("div",{ref:wn,style:{width:"100%",height:"0px",flexShrink:0}}),ci&&ri.map(function(e,n){return i(W,{section:e,idx:n},"right-row-".concat(n))}),i("div",{ref:Bn,style:{width:"100%",height:"0px",flexShrink:0}})]}))]}))]}))}))}))]}))}))};export{G as default};
2
2
  //# sourceMappingURL=CognitiveCompare.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsxs as o,jsx as i}from"react/jsx-runtime";import{Box as t,Typography as r,Button as l,FormControlLabel as n,Switch as a}from"@mui/material";var s=function(s){var c=s.componentHeaderText,d=s.displayConfig,p=s.maintainRelativeOrder,f=s.onToggleView,h=s.onCollapseAll,g=s.showCollapseAll;return d.isHeaderVisible||d.isToggleVisible?o(t,e({sx:{px:2,py:1,display:"flex",alignItems:"center",justifyContent:"space-between",bgcolor:"#FFFFFF",border:"1.5px solid #EEF0F4",borderTopLeftRadius:"8px",borderTopRightRadius:"8px"}},{children:[i(t,e({sx:{display:"flex",alignItems:"center",gap:1}},{children:d.isHeaderVisible&&i(r,e({sx:{fontSize:"16px",fontWeight:600,color:"#0F172A"}},{children:c}))})),d.isToggleVisible&&o(t,e({sx:{display:"flex",alignItems:"center",gap:2}},{children:[g&&i(l,e({variant:"outlined",size:"small",onClick:h,sx:{textTransform:"none",fontWeight:600,fontSize:"12px",color:"#5928ED",borderColor:"#5928ED",height:26,"&:hover":{borderColor:"#3E1BB3",backgroundColor:"rgba(89, 40, 237, 0.04)"}}},{children:"Collapse All"})),i(n,{control:i(a,{checked:!p,onChange:function(e){return f(e.target.checked)},color:"primary",size:"small",sx:{width:100,height:26,padding:0,"& .MuiSwitch-switchBase":{padding:0,margin:"3px",transitionDuration:"300ms","&.Mui-checked":{transform:"translateX(75px)",color:"#fff","& + .MuiSwitch-track":{backgroundColor:"#5928ED",opacity:1,border:0,"&::before":{content:'"Side by Side"',position:"absolute",left:8,top:5,fontSize:10,color:"#fff",fontWeight:600}}},"& .MuiSwitch-thumb:before":{position:"absolute",width:"100%",height:"100%",left:0,top:0,display:"flex",alignItems:"center",justifyContent:"center",fontSize:10,fontWeight:700,color:"#5928ED"}},"& .MuiSwitch-thumb":{boxSizing:"border-box",width:20,height:20,boxShadow:"0px 1px 3px rgba(0,0,0,0.2)"},"& .MuiSwitch-track":{borderRadius:13,backgroundColor:"#CBD5E1",opacity:1,position:"relative","&::before":{content:'"Side By Side"',position:"absolute",right:8,top:5,left:30,fontSize:10,color:"#1E293B",fontWeight:600}}}}),label:"",sx:{m:0}})]}))]})):null};export{s as default};
1
+ import{__assign as e}from"tslib";import{jsxs as i,jsx as o}from"react/jsx-runtime";import{Box as t,Typography as r,Button as l,FormControlLabel as n,Switch as a}from"@mui/material";var s=function(s){var d=s.componentHeaderText,c=s.displayConfig,p=s.maintainRelativeOrder,h=s.onToggleView,f=s.onCollapseAll,g=s.showCollapseAll;return c.isHeaderVisible||c.isToggleVisible?i(t,e({sx:{px:2,py:1,display:"flex",alignItems:"center",justifyContent:"space-between",bgcolor:"#FFFFFF",border:"1.5px solid #EEF0F4",borderTopLeftRadius:"8px",borderTopRightRadius:"8px"}},{children:[o(t,e({sx:{display:"flex",alignItems:"center",gap:1}},{children:c.isHeaderVisible&&o(r,e({sx:{fontSize:"16px",fontWeight:600,color:"#0F172A"}},{children:d}))})),i(t,e({sx:{display:"flex",alignItems:"center",gap:2}},{children:[c.displayEmailNotifier&&i(t,e({sx:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",gap:1,backgroundColor:"#f5f5f5",px:.5,py:.25,borderRadius:1,border:"1px solid #a0a0a0",paddingX:.8}},{children:[i("svg",e({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",className:"lucide lucide-bell-ring-icon lucide-bell-ring"},{children:[o("path",{d:"M10.268 21a2 2 0 0 0 3.464 0"}),o("path",{d:"M22 8c0-2.3-.8-4.3-2-6"}),o("path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326"}),o("path",{d:"M4 2C2.8 3.7 2 5.7 2 8"})]})),o(r,e({variant:"caption",sx:{color:"black",textAlign:"center",fontSize:"13px",fontWeight:500}},{children:"You'll be notified on completion"}))]})),c.isToggleVisible&&i(t,e({sx:{display:"flex",alignItems:"center",gap:2}},{children:[g&&o(l,e({variant:"outlined",size:"small",onClick:f,sx:{textTransform:"none",fontWeight:600,fontSize:"12px",color:"#5928ED",borderColor:"#5928ED",height:26,"&:hover":{borderColor:"#3E1BB3",backgroundColor:"rgba(89, 40, 237, 0.04)"}}},{children:"Collapse All"})),o(n,{control:o(a,{checked:!p,onChange:function(e){return h(e.target.checked)},color:"primary",size:"small",sx:{width:100,height:26,padding:0,"& .MuiSwitch-switchBase":{padding:0,margin:"3px",transitionDuration:"300ms","&.Mui-checked":{transform:"translateX(75px)",color:"#fff","& + .MuiSwitch-track":{backgroundColor:"#5928ED",opacity:1,border:0,"&::before":{content:'"Side by Side"',position:"absolute",left:8,top:5,fontSize:10,color:"#fff",fontWeight:600}}},"& .MuiSwitch-thumb:before":{position:"absolute",width:"100%",height:"100%",left:0,top:0,display:"flex",alignItems:"center",justifyContent:"center",fontSize:10,fontWeight:700,color:"#5928ED"}},"& .MuiSwitch-thumb":{boxSizing:"border-box",width:20,height:20,boxShadow:"0px 1px 3px rgba(0,0,0,0.2)"},"& .MuiSwitch-track":{borderRadius:13,backgroundColor:"#CBD5E1",opacity:1,position:"relative","&::before":{content:'"Side By Side"',position:"absolute",right:8,top:5,left:30,fontSize:10,color:"#1E293B",fontWeight:600}}}}),label:"",sx:{m:0}})]}))]}))]})):null};export{s as default};
2
2
  //# sourceMappingURL=CompareHeader.js.map
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export{default as CodeCitation}from"./features/CodeCitation/CodeCitation.js";export{default as ProjectAccordian}from"./features/ProjectAccordion/ProjectAccordion.js";export{default as BookCitation}from"./features/BookCitation/BookCitation.js";export{default as Bookemon}from"./features/Bookemon/Bookemon.js";export{PdfEditorCitation as PdfCitation}from"./features/PdfEditorCitation/PdfEditorCitation.js";export{default as CitationRenderer}from"./features/CitationRenderer/CitationRenderer.js";export{default as MarkdownRenderer}from"./features/CitationRenderer/MarkdownRenderer.js";export{DiagnosticSeverity}from"./features/CodeCitation/_components/CodeEditor.js";export{default as PaginatedTable}from"./features/PaginatedTable/PaginatedTable.js";export{default as InternalgptReasoningComponent,default as NonWebReasoningComponent}from"./features/CognitiveInternalgptReasoning/CognitiveInternalgptReasoningComponent.js";export{default as ChatCitation}from"./features/ChatCitation/ChatCitationRenderer.js";export{default as CognitiveDecisioningCard}from"./features/CognitiveDecisioning/CognitiveDecisioningWrapper.js";export{default as PdfViewer}from"./features/PdfViewer/PdfViewer.js";export{default as FaqCitation}from"./features/CognitiveDecisioning/FaqCitation/FaqCitation.js";export{default as ImageCitationContent}from"./features/RequirementAiCitations/ImageCitation/ImageCitationContent.js";export{default as VideoCitationContent}from"./features/RequirementAiCitations/VideoCitation/VideoCitationContent.js";export{default as FileCitationContent}from"./features/RequirementAiCitations/FileCitation/FileCitationContent.js";export{default as WebCitationWithImageContent}from"./features/RequirementAiCitations/WebCitation/WebCitationWithImageContent.js";export{default as MarkdownWithImageCitation}from"./features/MarkdownWithImageCitation/MarkdownWithImageCitation.js";export{default as AiReasoningCitation}from"./features/RequirementAiCitations/AiReasoning/AiReasoningCitation.js";export{default as TableCitationContent}from"./features/TableCitation/TableCitationContent.js";export{default as CitationsViewer}from"./features/CitationViewer/CitationsViewer.js";export{default as ExcelCitation}from"./features/ExcelCitation/ExcelCitations.js";export{default as ScannedDocCitation}from"./features/ScannedDocCitation/ScannedDocCitation.js";export{default as ChatDrawer}from"./features/ChatDrawer/ChatDrawer.js";export{FILE_INGESTION_STATUS,SUMMARY_EXPAND_HEIGHT_NUDGE,TRUNCATE_THRESHOLD}from"./features/ChatDrawer/constants/ChatDrawer.js";export{default as SplitterCitationsComponent}from"./features/SplitterCitations/SplitterCitationsComponent.js";export{default as CognitiveInternalgptCoreComponent}from"./features/CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.js";export{default as TextualGuideLinesComponent}from"./features/TextualGuidelines/TextualGuideLinesComponent.js";export{IngestionStatusChip,IngestionStatusComponent}from"./features/IngestionStatus/IngestionStatusComponent.js";
1
+ export{default as CodeCitation}from"./features/CodeCitation/CodeCitation.js";export{default as ProjectAccordian}from"./features/ProjectAccordion/ProjectAccordion.js";export{default as BookCitation}from"./features/BookCitation/BookCitation.js";export{default as Bookemon}from"./features/Bookemon/Bookemon.js";export{PdfEditorCitation as PdfCitation}from"./features/PdfEditorCitation/PdfEditorCitation.js";export{default as CitationRenderer}from"./features/CitationRenderer/CitationRenderer.js";export{default as MarkdownRenderer}from"./features/CitationRenderer/MarkdownRenderer.js";export{DiagnosticSeverity}from"./features/CodeCitation/_components/CodeEditor.js";export{default as PaginatedTable}from"./features/PaginatedTable/PaginatedTable.js";export{default as InternalgptReasoningComponent,default as NonWebReasoningComponent}from"./features/CognitiveInternalgptReasoning/CognitiveInternalgptReasoningComponent.js";export{default as ChatCitation}from"./features/ChatCitation/ChatCitationRenderer.js";export{default as CognitiveDecisioningCard}from"./features/CognitiveDecisioning/CognitiveDecisioningWrapper.js";export{default as PdfViewer}from"./features/PdfViewer/PdfViewer.js";export{default as FaqCitation}from"./features/CognitiveDecisioning/FaqCitation/FaqCitation.js";export{default as ImageCitationContent}from"./features/RequirementAiCitations/ImageCitation/ImageCitationContent.js";export{default as VideoCitationContent}from"./features/RequirementAiCitations/VideoCitation/VideoCitationContent.js";export{default as FileCitationContent}from"./features/RequirementAiCitations/FileCitation/FileCitationContent.js";export{default as WebCitationWithImageContent}from"./features/RequirementAiCitations/WebCitation/WebCitationWithImageContent.js";export{default as MarkdownWithImageCitation}from"./features/MarkdownWithImageCitation/MarkdownWithImageCitation.js";export{default as AiReasoningCitation}from"./features/RequirementAiCitations/AiReasoning/AiReasoningCitation.js";export{default as TableCitationContent}from"./features/TableCitation/TableCitationContent.js";export{default as CitationsViewer}from"./features/CitationViewer/CitationsViewer.js";export{default as ExcelCitation}from"./features/ExcelCitation/ExcelCitations.js";export{default as ScannedDocCitation}from"./features/ScannedDocCitation/ScannedDocCitation.js";export{default as ChatDrawer}from"./features/ChatDrawer/ChatDrawer.js";export{FILE_INGESTION_STATUS,SUMMARY_EXPAND_HEIGHT_NUDGE,TRUNCATE_THRESHOLD}from"./features/ChatDrawer/constants/ChatDrawer.js";export{default as SplitterCitationsComponent}from"./features/SplitterCitations/SplitterCitationsComponent.js";export{default as CognitiveCompare}from"./features/CognitiveCompare/CognitiveCompare.js";export{default as CognitiveInternalgptCoreComponent}from"./features/CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.js";export{default as TextualGuideLinesComponent}from"./features/TextualGuidelines/TextualGuideLinesComponent.js";export{IngestionStatusChip,IngestionStatusComponent}from"./features/IngestionStatus/IngestionStatusComponent.js";
2
2
  //# sourceMappingURL=index.js.map
@@ -1,9 +1,2 @@
1
- interface RedliningSummaryProps {
2
- approved: number;
3
- rejected: number;
4
- pending: number;
5
- }
6
- export declare const RedliningFixesSummaryUI: ({ approved, rejected, pending }: RedliningSummaryProps) => import("react/jsx-runtime").JSX.Element;
7
1
  export default function ChatDrawerTest(): import("react/jsx-runtime").JSX.Element;
8
- export {};
9
2
  //# sourceMappingURL=ChatDrawerTest.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChatDrawerTest.d.ts","sourceRoot":"","sources":["../../../src/ChatDrawerTest.tsx"],"names":[],"mappings":"AAQA,UAAU,qBAAqB;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,uBAAuB,oCAAqC,qBAAqB,4CA0B7F,CAAC;AA8CF,MAAM,CAAC,OAAO,UAAU,cAAc,4CAoCrC"}
1
+ {"version":3,"file":"ChatDrawerTest.d.ts","sourceRoot":"","sources":["../../../src/ChatDrawerTest.tsx"],"names":[],"mappings":"AA+CA,MAAM,CAAC,OAAO,UAAU,cAAc,4CAmCrC"}
@@ -1 +1 @@
1
- {"version":3,"file":"CognitiveCompareTest.d.ts","sourceRoot":"","sources":["../../../src/CognitiveCompareTest.tsx"],"names":[],"mappings":"AAKA,QAAA,MAAM,oBAAoB,+CAgLzB,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"CognitiveCompareTest.d.ts","sourceRoot":"","sources":["../../../src/CognitiveCompareTest.tsx"],"names":[],"mappings":"AAKA,QAAA,MAAM,oBAAoB,+CA8KzB,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -2,4 +2,5 @@ export type ButtonVariant = "big" | "small";
2
2
  export declare const BIGTEXT: ButtonVariant;
3
3
  export declare const SMALLTEXT: ButtonVariant;
4
4
  export declare const RESOURCE_TABLE_SCENARIO_VALUE = "resourcesOfSelectedDataSetCollection";
5
+ export declare const DEFAULT_TREE_DATA: any;
5
6
  //# sourceMappingURL=CommonConstants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CommonConstants.d.ts","sourceRoot":"","sources":["../../../../src/CommonConstants/CommonConstants.tsx"],"names":[],"mappings":"AACA,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,OAAO,CAAC;AAC5C,eAAO,MAAM,OAAO,EAAE,aAAqB,CAAC;AAC5C,eAAO,MAAM,SAAS,EAAE,aAAuB,CAAC;AAChD,eAAO,MAAM,6BAA6B,yCAAwC,CAAA"}
1
+ {"version":3,"file":"CommonConstants.d.ts","sourceRoot":"","sources":["../../../../src/CommonConstants/CommonConstants.tsx"],"names":[],"mappings":"AACA,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,OAAO,CAAC;AAC5C,eAAO,MAAM,OAAO,EAAE,aAAqB,CAAC;AAC5C,eAAO,MAAM,SAAS,EAAE,aAAuB,CAAC;AAChD,eAAO,MAAM,6BAA6B,yCAAyC,CAAA;AAEnF,eAAO,MAAM,iBAAiB,EAAE,GAsyU/B,CAAA"}
@@ -2,4 +2,5 @@ export declare const DefaultPdfIcon: () => import("react/jsx-runtime").JSX.Eleme
2
2
  export declare const DefaultFullScreenIcon: () => import("react/jsx-runtime").JSX.Element;
3
3
  export declare const DefaultDownloadIcon: () => import("react/jsx-runtime").JSX.Element;
4
4
  export declare const DefaultCloseIcon: () => import("react/jsx-runtime").JSX.Element;
5
+ export declare const DefaultFullScreenCloseIcon: () => import("react/jsx-runtime").JSX.Element;
5
6
  //# sourceMappingURL=PdfViewerIcons.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PdfViewerIcons.d.ts","sourceRoot":"","sources":["../../../../../src/assests/svg/PdfViewerIcons.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,+CAI1B,CAAC;AAEF,eAAO,MAAM,qBAAqB,+CAIjC,CAAC;AAEF,eAAO,MAAM,mBAAmB,+CAM/B,CAAC;AAEF,eAAO,MAAM,gBAAgB,+CAK5B,CAAC"}
1
+ {"version":3,"file":"PdfViewerIcons.d.ts","sourceRoot":"","sources":["../../../../../src/assests/svg/PdfViewerIcons.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,+CAI1B,CAAC;AAEF,eAAO,MAAM,qBAAqB,+CAIjC,CAAC;AAEF,eAAO,MAAM,mBAAmB,+CAM/B,CAAC;AAEF,eAAO,MAAM,gBAAgB,+CAK5B,CAAC;AAEF,eAAO,MAAM,0BAA0B,+CAetC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ChatDrawer.d.ts","sourceRoot":"","sources":["../../../../../src/features/ChatDrawer/ChatDrawer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAE3D,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAuLzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"ChatDrawer.d.ts","sourceRoot":"","sources":["../../../../../src/features/ChatDrawer/ChatDrawer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAE3D,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAmLzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -26,7 +26,6 @@ export interface ChatDrawerProps {
26
26
  * Lets consuming teams customize colors, borders, and backgrounds
27
27
  * without touching the component internals.
28
28
  */
29
- drawerSummaryComponent?: React.ReactNode;
30
29
  styles?: {
31
30
  /** Outer container — background, border, borderRadius, boxShadow */
32
31
  container?: CSSProperties;
@@ -1 +1 @@
1
- {"version":3,"file":"ChatDrawer.types.d.ts","sourceRoot":"","sources":["../../../../../../src/features/ChatDrawer/types/ChatDrawer.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEjD,MAAM,WAAW,eAAe;IAC9B,mGAAmG;IACnG,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,oEAAoE;IACpE,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,uDAAuD;IACvD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sEAAsE;IACtE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,4BAA4B;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,sBAAsB;IACtB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,iEAAiE;IACjE,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAKzC,MAAM,CAAC,EAAE;QACP,oEAAoE;QACpE,SAAS,CAAC,EAAE,aAAa,CAAC;QAC1B,sDAAsD;QACtD,MAAM,CAAC,EAAE,aAAa,CAAC;QACvB,sDAAsD;QACtD,KAAK,CAAC,EAAE,aAAa,CAAC;QACtB,oDAAoD;QACpD,IAAI,CAAC,EAAE,aAAa,CAAC;QACrB,0CAA0C;QAC1C,QAAQ,CAAC,EAAE,aAAa,CAAC;QACzB,qEAAqE;QACrE,KAAK,CAAC,EAAE,aAAa,CAAC;QACtB,6DAA6D;QAC7D,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,gEAAgE;QAChE,mBAAmB,CAAC,EAAE,MAAM,CAAC;KAC9B,CAAC;CACH"}
1
+ {"version":3,"file":"ChatDrawer.types.d.ts","sourceRoot":"","sources":["../../../../../../src/features/ChatDrawer/types/ChatDrawer.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEjD,MAAM,WAAW,eAAe;IAC9B,mGAAmG;IACnG,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,oEAAoE;IACpE,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,uDAAuD;IACvD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sEAAsE;IACtE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,4BAA4B;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,sBAAsB;IACtB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,iEAAiE;IACjE,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,MAAM,CAAC,EAAE;QACP,oEAAoE;QACpE,SAAS,CAAC,EAAE,aAAa,CAAC;QAC1B,sDAAsD;QACtD,MAAM,CAAC,EAAE,aAAa,CAAC;QACvB,sDAAsD;QACtD,KAAK,CAAC,EAAE,aAAa,CAAC;QACtB,oDAAoD;QACpD,IAAI,CAAC,EAAE,aAAa,CAAC;QACrB,0CAA0C;QAC1C,QAAQ,CAAC,EAAE,aAAa,CAAC;QACzB,qEAAqE;QACrE,KAAK,CAAC,EAAE,aAAa,CAAC;QACtB,6DAA6D;QAC7D,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,gEAAgE;QAChE,mBAAmB,CAAC,EAAE,MAAM,CAAC;KAC9B,CAAC;CACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"CognitiveCompare.d.ts","sourceRoot":"","sources":["../../../../../src/features/CognitiveCompare/CognitiveCompare.tsx"],"names":[],"mappings":"AAwCA,OAAO,EAEL,qBAAqB,EAMtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAGL,sBAAsB,EACvB,MAAM,0BAA0B,CAAC;AA0BlC,QAAA,MAAM,gBAAgB,6QAuBnB,qBAAqB,4CAwhEvB,CAAC;AAEF,OAAO,EAAE,sBAAsB,EAAE,CAAC;AAClC,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"CognitiveCompare.d.ts","sourceRoot":"","sources":["../../../../../src/features/CognitiveCompare/CognitiveCompare.tsx"],"names":[],"mappings":"AAwCA,OAAO,EAEL,qBAAqB,EAMtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAGL,sBAAsB,EACvB,MAAM,0BAA0B,CAAC;AA0BlC,QAAA,MAAM,gBAAgB,6QAwBnB,qBAAqB,4CAwhEvB,CAAC;AAEF,OAAO,EAAE,sBAAsB,EAAE,CAAC;AAClC,eAAe,gBAAgB,CAAC"}
@@ -84,6 +84,7 @@ export type IDisplayConfig = {
84
84
  isLoading?: boolean;
85
85
  showDeviationBadges?: boolean;
86
86
  enableDeviationSchemaBackwardCompatibility?: boolean;
87
+ displayEmailNotifier?: boolean;
87
88
  };
88
89
  export interface CognitiveCompareProps {
89
90
  componentHeaderText?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"CognitiveCompareTypes.d.ts","sourceRoot":"","sources":["../../../../../src/features/CognitiveCompare/CognitiveCompareTypes.ts"],"names":[],"mappings":";AAEA,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE;QACX,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;QACvB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;KACxB,CAAC;CACH;AAED,MAAM,WAAW,kBAAkB;IACjC,0BAA0B,EAAE;QA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EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,WAAW,GAAG,IAAI,CAAA;IAC5B,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IAC7C,cAAc,CAAC,EAAE,KAAK,CAAC,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAA;AAGD,MAAM,MAAM,cAAc,GAAG;IACzB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,GAAG,EAAE,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEJ,MAAM,MAAM,SAAS,CAAC,GAAG,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,IAAI,MAAM,CAC3E,GAAG,EACH,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAChC,CAAC"}
1
+ {"version":3,"file":"CognitiveCompareTypes.d.ts","sourceRoot":"","sources":["../../../../../src/features/CognitiveCompare/CognitiveCompareTypes.ts"],"names":[],"mappings":";AAEA,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE;QACX,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;QACvB,WAAW,CAAC,EAAE,MAAM,EA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AC,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,WAAW,GAAG,IAAI,CAAA;IAC5B,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IAC7C,cAAc,CAAC,EAAE,KAAK,CAAC,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAA;AAGD,MAAM,MAAM,cAAc,GAAG;IACzB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,GAAG,EAAE,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEJ,MAAM,MAAM,SAAS,CAAC,GAAG,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,IAAI,MAAM,CAC3E,GAAG,EACH,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAChC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"CompareHeader.d.ts","sourceRoot":"","sources":["../../../../../../src/features/CognitiveCompare/components/CompareHeader.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,KAAK,kBAAkB,GAAG;IACxB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,aAAa,EAAE,cAAc,CAAC;IAC9B,qBAAqB,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3C,YAAY,EAAE,CAAC,aAAa,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/C,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,eAAe,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,QAAA,MAAM,aAAa,iHAOhB,kBAAkB,mDAkIpB,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"CompareHeader.d.ts","sourceRoot":"","sources":["../../../../../../src/features/CognitiveCompare/components/CompareHeader.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,KAAK,kBAAkB,GAAG;IACxB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,aAAa,EAAE,cAAc,CAAC;IAC9B,qBAAqB,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3C,YAAY,EAAE,CAAC,aAAa,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/C,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,eAAe,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,QAAA,MAAM,aAAa,iHAOhB,kBAAkB,mDA6IpB,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -26,6 +26,7 @@ export { default as ChatDrawer } from "./features/ChatDrawer/ChatDrawer";
26
26
  export type { ChatDrawerProps } from "./features/ChatDrawer/types/ChatDrawer.types";
27
27
  export { FILE_INGESTION_STATUS, SUMMARY_EXPAND_HEIGHT_NUDGE, TRUNCATE_THRESHOLD } from "./features/ChatDrawer/constants/ChatDrawer";
28
28
  export { default as SplitterCitationsComponent } from './features/SplitterCitations/SplitterCitationsComponent';
29
+ export { default as CognitiveCompare } from "./features/CognitiveCompare/CognitiveCompare";
29
30
  export { default as CognitiveInternalgptCoreComponent } from "./features/CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent";
30
31
  export { default as InternalgptReasoningComponent } from "./features/CognitiveInternalgptReasoning/CognitiveInternalgptReasoningComponent";
31
32
  export { default as TextualGuideLinesComponent } from "./features/TextualGuidelines/TextualGuideLinesComponent";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAC3F,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,iBAAiB,IAAI,WAAW,EAAE,MAAM,gDAAgD,CAAC;AAClG,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAC3F,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAC3F,OAAO,EAAE,kBAAkB,IAAI,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAC1G,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,iFAAiF,CAAC;AACtI,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,8CAA8C,CAAC;AACvF,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,6DAA6D,CAAC;AAClH,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,yDAAyD,CAAC;AAEjG,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,sEAAsE,CAAC;AACvH,OAAO,EAA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mB,EAAE,MAAM,mEAAmE,CAAC;AACnH,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAC,MAAM,+CAA+C,CAAC;AAC/F,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,2CAA2C,CAAC;AACvF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,yCAAyC,CAAC;AACnF,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,kDAAkD,CAAC;AACjG,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,kCAAkC,CAAC;AACzE,YAAY,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAC;AACpF,OAAO,EAAE,qBAAqB,EAAE,2BAA2B,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AACpI,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAC,MAAM,yDAAyD,CAAA;AAC9G,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAC3F,OAAO,EAAC,OAAO,IAAI,iCAAiC,EAAC,MAAM,4EAA4E,CAAC;AACxI,OAAO,EAAC,OAAO,IAAI,6BAA6B,EAAC,MAAM,iFAAiF,CAAC;AACzI,OAAO,EAAC,OAAO,IAAI,0BAA0B,EAAC,MAAM,yDAAyD,CAAC;AAC9G,OAAO,EAAC,wBAAwB,EAAC,MAAM,qDAAqD,CAAC;AAC7F,OAAO,EAAC,mBAAmB,EAAC,MAAM,qDAAqD,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viswa-test/test-citation",
3
- "version": "0.0.138",
3
+ "version": "0.0.139",
4
4
  "author": "Viswa Koduru",
5
5
  "description": "",
6
6
  "license": "MIT",
@@ -132,6 +132,11 @@
132
132
  "require": "./dist/cjs/features/SplitterCitations/SplitterCitationsComponent.js",
133
133
  "types": "./dist/types/src/features/SplitterCitations/SplitterCitationsComponent.d.ts"
134
134
  },
135
+ "./CognitiveCompare": {
136
+ "import": "./dist/features/CognitiveCompare/CognitiveCompare.js",
137
+ "require": "./dist/cjs/features/CognitiveCompare/CognitiveCompare.js",
138
+ "types": "./dist/types/src/features/CognitiveCompare/CognitiveCompare.d.ts"
139
+ },
135
140
  "./TextualGuideLinesComponent": {
136
141
  "import": "./dist/features/TextualGuidelines/TextualGuideLinesComponent.js",
137
142
  "require": "./dist/cjs/features/TextualGuidelines/TextualGuideLinesComponent.js",
@@ -154,7 +159,7 @@
154
159
  "dist"
155
160
  ],
156
161
  "scripts": {
157
- "start": "craco start",
162
+ "start": "PORT=3005 craco start",
158
163
  "build": "rollup -c",
159
164
  "tsupBuild": "tsup src/index.ts",
160
165
  "test": "craco test",