@e-llm-studio/citation 0.0.208 → 0.0.210

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 (64) hide show
  1. package/README.md +270 -0
  2. package/dist/assests/svg/NeuralNetworkIcon.js +2 -0
  3. package/dist/assests/svg/NeuralNetworkIcon.js.map +1 -0
  4. package/dist/cjs/assests/svg/NeuralNetworkIcon.js +2 -0
  5. package/dist/cjs/assests/svg/NeuralNetworkIcon.js.map +1 -0
  6. package/dist/cjs/features/CognitiveCompare/hooks/memoizedMarkdown.js +1 -1
  7. package/dist/cjs/features/GptWebCitation/GptWebCitation.js +2 -0
  8. package/dist/cjs/features/GptWebCitation/GptWebCitation.js.map +1 -0
  9. package/dist/cjs/features/GptWebCitation/GptWebCitation.module.css.js +2 -0
  10. package/dist/cjs/features/GptWebCitation/GptWebCitation.module.css.js.map +1 -0
  11. package/dist/cjs/features/GptWebCitation/GptWebCitationImageCitation.js +2 -0
  12. package/dist/cjs/features/GptWebCitation/GptWebCitationImageCitation.js.map +1 -0
  13. package/dist/cjs/features/GptWebCitation/GptWebCitationImageFullScreenView.js +2 -0
  14. package/dist/cjs/features/GptWebCitation/GptWebCitationImageFullScreenView.js.map +1 -0
  15. package/dist/cjs/features/GptWebCitation/GptWebCitationMarkdown.js +2 -0
  16. package/dist/cjs/features/GptWebCitation/GptWebCitationMarkdown.js.map +1 -0
  17. package/dist/cjs/features/GptWebCitation/GptWebCitationSkeleton.js +2 -0
  18. package/dist/cjs/features/GptWebCitation/GptWebCitationSkeleton.js.map +1 -0
  19. package/dist/cjs/features/GptWebCitation/utils/citationData.utils.js +2 -0
  20. package/dist/cjs/features/GptWebCitation/utils/citationData.utils.js.map +1 -0
  21. package/dist/cjs/features/RequirementAiCitations/WebCitation/WebCitationWithImageContent.js +1 -1
  22. package/dist/cjs/features/RequirementAiCitations/WebCitation/WebCitationWithImageContent.module.css.js +1 -1
  23. package/dist/cjs/index.js +1 -1
  24. package/dist/features/CognitiveCompare/hooks/memoizedMarkdown.js +1 -1
  25. package/dist/features/GptWebCitation/GptWebCitation.js +2 -0
  26. package/dist/features/GptWebCitation/GptWebCitation.js.map +1 -0
  27. package/dist/features/GptWebCitation/GptWebCitation.module.css.js +2 -0
  28. package/dist/features/GptWebCitation/GptWebCitation.module.css.js.map +1 -0
  29. package/dist/features/GptWebCitation/GptWebCitationImageCitation.js +2 -0
  30. package/dist/features/GptWebCitation/GptWebCitationImageCitation.js.map +1 -0
  31. package/dist/features/GptWebCitation/GptWebCitationImageFullScreenView.js +2 -0
  32. package/dist/features/GptWebCitation/GptWebCitationImageFullScreenView.js.map +1 -0
  33. package/dist/features/GptWebCitation/GptWebCitationMarkdown.js +2 -0
  34. package/dist/features/GptWebCitation/GptWebCitationMarkdown.js.map +1 -0
  35. package/dist/features/GptWebCitation/GptWebCitationSkeleton.js +2 -0
  36. package/dist/features/GptWebCitation/GptWebCitationSkeleton.js.map +1 -0
  37. package/dist/features/GptWebCitation/utils/citationData.utils.js +2 -0
  38. package/dist/features/GptWebCitation/utils/citationData.utils.js.map +1 -0
  39. package/dist/features/RequirementAiCitations/WebCitation/WebCitationWithImageContent.js +1 -1
  40. package/dist/features/RequirementAiCitations/WebCitation/WebCitationWithImageContent.module.css.js +1 -1
  41. package/dist/index.js +1 -1
  42. package/dist/types/src/assests/svg/NeuralNetworkIcon.d.ts +9 -0
  43. package/dist/types/src/assests/svg/NeuralNetworkIcon.d.ts.map +1 -0
  44. package/dist/types/src/features/GptWebCitation/GptWebCitation.d.ts +5 -0
  45. package/dist/types/src/features/GptWebCitation/GptWebCitation.d.ts.map +1 -0
  46. package/dist/types/src/features/GptWebCitation/GptWebCitationImageCitation.d.ts +8 -0
  47. package/dist/types/src/features/GptWebCitation/GptWebCitationImageCitation.d.ts.map +1 -0
  48. package/dist/types/src/features/GptWebCitation/GptWebCitationImageFullScreenView.d.ts +8 -0
  49. package/dist/types/src/features/GptWebCitation/GptWebCitationImageFullScreenView.d.ts.map +1 -0
  50. package/dist/types/src/features/GptWebCitation/GptWebCitationMarkdown.d.ts +9 -0
  51. package/dist/types/src/features/GptWebCitation/GptWebCitationMarkdown.d.ts.map +1 -0
  52. package/dist/types/src/features/GptWebCitation/GptWebCitationSkeleton.d.ts +3 -0
  53. package/dist/types/src/features/GptWebCitation/GptWebCitationSkeleton.d.ts.map +1 -0
  54. package/dist/types/src/features/GptWebCitation/GptWebCitationTest.d.ts +4 -0
  55. package/dist/types/src/features/GptWebCitation/GptWebCitationTest.d.ts.map +1 -0
  56. package/dist/types/src/features/GptWebCitation/WebCitationSampleResponse.d.ts +4 -0
  57. package/dist/types/src/features/GptWebCitation/WebCitationSampleResponse.d.ts.map +1 -0
  58. package/dist/types/src/features/GptWebCitation/types.d.ts +112 -0
  59. package/dist/types/src/features/GptWebCitation/types.d.ts.map +1 -0
  60. package/dist/types/src/features/GptWebCitation/utils/citationData.utils.d.ts +8 -0
  61. package/dist/types/src/features/GptWebCitation/utils/citationData.utils.d.ts.map +1 -0
  62. package/dist/types/src/index.d.ts +3 -0
  63. package/dist/types/src/index.d.ts.map +1 -1
  64. package/package.json +6 -1
package/README.md CHANGED
@@ -13,6 +13,7 @@
13
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
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
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
+ - [GptWebCitation](#gptwebcitation)
16
17
  - [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
18
  - [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
19
  - [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)
@@ -672,6 +673,275 @@ const reasoningData = {
672
673
 
673
674
  ---
674
675
 
676
+ ## GptWebCitation
677
+
678
+ ### Overview
679
+
680
+ `GptWebCitation` is a composite React component that wraps the GPT reasoning citation (`CognitiveInternalgptCoreComponent`) and adds an optional **Web Citation** view. Users can toggle between GPT and web-based citations without modifying the underlying GPT citation code.
681
+
682
+ In **GPT view**, the component renders the standard GPT citation panel with a **View Web Citation** button on the left and the document source link on the right (inside the GPT citation footer). In **Web Citation view**, it shows a web snapshot (image or markdown content) with highlight navigation, relevance score, and a **View GPT Citation** toggle to switch back.
683
+
684
+ ### Features
685
+
686
+ - **Dual citation views** — Toggle between GPT reasoning and web-based citation
687
+ - **Non-invasive GPT integration** — Wraps `CognitiveInternalgptCoreComponent` via props; no changes to GPT citation code required
688
+ - **Image & markdown web citations** — Supports screenshot snapshots (`imageMetadata.signed_url`) or HTML/markdown content
689
+ - **Highlight pagination** — Navigate between highlighted anchors in web citation markdown
690
+ - **Relevance score badge** — Auto-extracted from web citation content (e.g. "decision strength is 85%")
691
+ - **Loading skeleton** — Built-in loading state while web citation is being generated
692
+ - **Expand screenshot button** — Optional full-screen image view (`showExpandImageButton`)
693
+ - **Style overrides** — Customize layout via the `styles` prop without editing component internals
694
+
695
+ ### Installation / Import
696
+
697
+ ```tsx
698
+ import GptWebCitation from '@e-llm-studio/citation/GptWebCitation';
699
+ ```
700
+
701
+ ### Usage 1: Basic GPT + Web Citation Toggle
702
+
703
+ ```tsx
704
+ import { useState } from 'react';
705
+ import { ChevronDown, ChevronUp, Maximize2, X } from 'lucide-react';
706
+ import GptWebCitation from '@e-llm-studio/citation/GptWebCitation';
707
+
708
+ const gptCitation = {
709
+ item: {
710
+ confidence_score: 100,
711
+ text: 'Standard financial data interpretation patterns.',
712
+ dataSource:
713
+ 'Title: Commodity Market Analysis\n\n- <highlight>Verify the most recent timestamp in search results.</highlight>\n- Analyze safe-haven asset demand and geopolitical triggers.',
714
+ paraphrase: 'Market interpretation patterns for commodity price reporting.',
715
+ },
716
+ headerTitle: 'Summary Citations',
717
+ index: 0,
718
+ iconsConfig: {
719
+ ChevronDownIcon: ChevronDown,
720
+ ChevronUpIcon: ChevronUp,
721
+ MaximizeIcon: Maximize2,
722
+ CloseIcon: X,
723
+ },
724
+ DocumentTitle: 'Source : Employee Handbook - Code of Conduct Section.pdf',
725
+ previewCallback: () => window.open('/preview/document'),
726
+ };
727
+
728
+ function CitationPanel() {
729
+ const [showWebCitation, setShowWebCitation] = useState(false);
730
+ const [webCitationData, setWebCitationData] = useState(undefined);
731
+ const [isLoading, setIsLoading] = useState(false);
732
+
733
+ const handleGenerateWebCitation = async () => {
734
+ setShowWebCitation(true);
735
+ setIsLoading(true);
736
+
737
+ const response = await fetch('/api/web-citation/generate');
738
+ const data = await response.json();
739
+
740
+ setWebCitationData(data);
741
+ setIsLoading(false);
742
+ };
743
+
744
+ return (
745
+ <GptWebCitation
746
+ gptCitation={gptCitation}
747
+ isWebCitation={true}
748
+ webCitationData={webCitationData}
749
+ showWebCitation={showWebCitation}
750
+ isWebCitationLoading={isLoading}
751
+ onGenerateWebCitation={handleGenerateWebCitation}
752
+ onToggleCitationView={() => setShowWebCitation((prev) => !prev)}
753
+ />
754
+ );
755
+ }
756
+ ```
757
+
758
+ ### Usage 2: Web Citation API Response Shape
759
+
760
+ Pass the API response from your web citation service as `webCitationData`:
761
+
762
+ ```tsx
763
+ const webCitationData = {
764
+ citationId: '550e8400-e29b-41d4-a716-446655440061',
765
+ content:
766
+ 'The decision strength is 85% because:<ol><li>The exact <a href="https://example.com/article">valuation of SpaceX</a> fluctuates between sources.</li></ol>',
767
+ citationType: 'web',
768
+ citationUrl: 'https://example.com/article',
769
+ imageMetadata: {
770
+ signed_url: 'https://storage.example.com/image_citations/screenshot.png',
771
+ blob_path: 'image_citations/screenshot.png',
772
+ gs_uri: 'gs://bucket/image_citations/screenshot.png',
773
+ },
774
+ };
775
+
776
+ <GptWebCitation
777
+ gptCitation={gptCitation}
778
+ isWebCitation={true}
779
+ webCitationData={webCitationData}
780
+ showWebCitation={true}
781
+ />
782
+ ```
783
+
784
+ When `imageMetadata.signed_url` is present, the component renders a screenshot snapshot. Otherwise it falls back to rendering the `content` field as markdown/HTML.
785
+
786
+ ### Usage 3: GPT-Only Mode (No Web Citation)
787
+
788
+ Set `isWebCitation={false}` to render only the GPT citation with no toggle button:
789
+
790
+ ```tsx
791
+ <GptWebCitation
792
+ gptCitation={gptCitation}
793
+ isWebCitation={false}
794
+ />
795
+ ```
796
+
797
+ ### Usage 4: Hide Expand Buttons
798
+
799
+ Hide the web citation screenshot expand button:
800
+
801
+ ```tsx
802
+ <GptWebCitation
803
+ gptCitation={gptCitation}
804
+ isWebCitation={true}
805
+ webCitationData={webCitationData}
806
+ showWebCitation={true}
807
+ showExpandImageButton={false}
808
+ />
809
+ ```
810
+
811
+ Hide the GPT citation header maximize/expand icon:
812
+
813
+ ```tsx
814
+ <GptWebCitation
815
+ gptCitation={gptCitation}
816
+ isWebCitation={true}
817
+ showGptMaximizeButton={false}
818
+ />
819
+ ```
820
+
821
+ You can also use `gptCitation.disableMaximize: true` directly on the GPT config.
822
+
823
+ ### Usage 5: Custom Styling via Props (matched heights)
824
+
825
+ Layout, borders, and heights for **both GPT and web views** can be controlled from the parent without modifying component internals:
826
+
827
+ ```tsx
828
+ const sharedPanelHeight = '520px';
829
+ const sharedContentHeight = '384px';
830
+
831
+ <GptWebCitation
832
+ gptCitation={{
833
+ ...gptCitation,
834
+ bodyHeight: sharedContentHeight,
835
+ }}
836
+ isWebCitation={true}
837
+ webCitationData={webCitationData}
838
+ showGptMaximizeButton={true}
839
+ styles={{
840
+ container: { maxWidth: 900 },
841
+ gptCitation: {
842
+ wrapper: {
843
+ minHeight: sharedPanelHeight,
844
+ border: '1px solid #e5e7eb',
845
+ borderRadius: 8,
846
+ },
847
+ footerAction: { left: '1.5rem' },
848
+ toggleButton: { minWidth: 180, fontSize: 14 },
849
+ },
850
+ webCitation: {
851
+ panel: {
852
+ minHeight: sharedPanelHeight,
853
+ border: '1px solid #e5e7eb',
854
+ borderRadius: 8,
855
+ },
856
+ header: { padding: '8px 16px' },
857
+ content: {
858
+ minHeight: sharedContentHeight,
859
+ maxHeight: sharedContentHeight,
860
+ overflowY: 'auto',
861
+ },
862
+ footer: { padding: '8px 16px' },
863
+ toggleButton: { minWidth: 180, fontSize: 14 },
864
+ learnedFrom: { fontSize: 13 },
865
+ },
866
+ }}
867
+ />
868
+ ```
869
+
870
+ #### Style keys
871
+
872
+ | Key | Applies to | Description |
873
+ |-----|------------|-------------|
874
+ | `container` | Both views | Shared outer wrapper (`overlay` in GPT view, merged into web `panel`) |
875
+ | `gptCitation.wrapper` | GPT view | Border card around GPT citation (left/right borders restored here) |
876
+ | `gptCitation.footerAction` | GPT view | View Web Citation button row in footer |
877
+ | `gptCitation.toggleButton` | GPT view | View Web Citation button styles |
878
+ | `webCitation.panel` | Web view | Outer web citation card |
879
+ | `webCitation.header` | Web view | Source label + pagination + score badge row |
880
+ | `webCitation.content` | Web view | Main content area (markdown, image, skeleton) |
881
+ | `webCitation.footer` | Web view | View GPT Citation + Learned From row |
882
+ | `webCitation.toggleButton` | Web view | View GPT Citation button styles |
883
+ | `webCitation.learnedFrom` | Web view | "Learned From …" text styles |
884
+
885
+ Legacy flat keys (`gptCitationWrapper`, `footerAction`, `webCitationButton`) still work for backward compatibility.
886
+
887
+ ### Props
888
+
889
+ | Prop | Type | Default | Description |
890
+ |------|------|---------|-------------|
891
+ | `gptCitation` | `IGptCitationConfig` | **required** | GPT citation config passed to `CognitiveInternalgptCoreComponent` (`item`, `headerTitle`, `iconsConfig`, `DocumentTitle`, `previewCallback`, etc.) |
892
+ | `isWebCitation` | `boolean` | `false` | When `true`, enables web citation toggle and web view. When `false`, only GPT citation is shown. |
893
+ | `webCitationData` | `IWebCitationApiResponse` | — | Web citation API response (content, image snapshot, URL) |
894
+ | `showWebCitation` | `boolean` | — | Controls which view is active. Omit for uncontrolled internal state. |
895
+ | `onGenerateWebCitation` | `() => void` | — | Called when user clicks **View Web Citation** and no cached web data exists yet |
896
+ | `isWebCitationLoading` | `boolean` | `false` | Parent-controlled loading state while web citation is being fetched |
897
+ | `onToggleCitationView` | `() => void` | — | Called when user toggles between GPT and web views |
898
+ | `showExpandImageButton` | `boolean` | `true` | Show/hide the full-screen expand button on web citation image snapshots |
899
+ | `showGptMaximizeButton` | `boolean` | `true` | Show/hide the GPT citation header maximize/expand icon (`gptCitation.disableMaximize: true` when `false`) |
900
+ | `topic` | `string` | auto | Override topic label in web citation header (auto-extracted from content if omitted) |
901
+ | `sourceLabel` | `string` | auto | Override header source label in web view |
902
+ | `relevanceScore` | `number` | auto | Override relevance/decision strength score (auto-extracted from content if omitted) |
903
+ | `learnedFrom` | `string` | auto | Site name shown in web citation footer (auto-extracted from `citationUrl` if omitted) |
904
+ | `styles` | `IGptWebCitationStyleOverrides` | — | Style overrides for GPT and web citation views (see Usage 5) |
905
+
906
+ ### `IGptCitationConfig` (gptCitation prop)
907
+
908
+ | Field | Type | Description |
909
+ |-------|------|-------------|
910
+ | `item` | `INonReasoningSource` | GPT reasoning data (`dataSource`, `confidence_score`, highlights, etc.) |
911
+ | `headerTitle` | `string` | Panel header title |
912
+ | `index` | `number` | Citation index |
913
+ | `iconsConfig` | `object` | Icon components (`ChevronDownIcon`, `ChevronUpIcon`, `MaximizeIcon`, `CloseIcon`) |
914
+ | `DocumentTitle` | `string` | Source document label shown in the GPT footer (right side) |
915
+ | `previewCallback` | `() => void` | Called when the source link is clicked |
916
+ | `bodyHeight` | `string` | Optional fixed GPT content body height (use with `styles.webCitation.content` to match web view height) |
917
+ | `disableMaximize` | `boolean` | Disable GPT header fullscreen maximize button (or use `showGptMaximizeButton={false}`) |
918
+
919
+ ### `IWebCitationApiResponse` (webCitationData prop)
920
+
921
+ | Field | Type | Description |
922
+ |-------|------|-------------|
923
+ | `citationId` | `string` | Unique citation identifier |
924
+ | `content` | `string` | HTML/markdown web citation content |
925
+ | `citationType` | `string` | Citation type (e.g. `"web"`) |
926
+ | `citationUrl` | `string` | Original source URL |
927
+ | `imageMetadata` | `object` | Image snapshot metadata |
928
+ | `imageMetadata.signed_url` | `string` | Signed URL for screenshot image (preferred) |
929
+ | `imageMetadata.gs_uri` | `string` | GCS URI fallback for image |
930
+ | `db` | `object` | Database metadata (`citation_id`, `blob_path`) |
931
+
932
+ ### View Behavior
933
+
934
+ | State | What renders |
935
+ |-------|--------------|
936
+ | `isWebCitation={false}` | GPT citation only |
937
+ | `isWebCitation={true}`, `showWebCitation={false}` | GPT citation + **View Web Citation** button (left footer) + source link (right footer) |
938
+ | `isWebCitation={true}`, `showWebCitation={true}` | Web citation panel with snapshot/markdown, highlight nav, and **View GPT Citation** button |
939
+
940
+ ### Local Test Component
941
+
942
+ A test harness is available at `src/features/GptWebCitation/GptWebCitationTest.tsx`. Run the citation dev server with `GptWebCitationTest` mounted in `src/index.tsx` to preview the component interactively.
943
+
944
+ ---
675
945
 
676
946
  ## CodeCitation
677
947
 
@@ -0,0 +1,2 @@
1
+ import{__assign as C}from"tslib";import{jsxs as r,jsx as o}from"react/jsx-runtime";var e=function(e){var i=e.className,t=e.size,a=void 0===t?24:t,n=e.color,s=void 0===n?"currentColor":n,d=e["aria-hidden"];return r("svg",C({xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 16 16",fill:"none","aria-hidden":void 0===d||d,className:i},{children:[o("path",{d:"M14.3327 7.9974C14.3327 8.21627 14.2896 8.43299 14.2058 8.6352C14.1221 8.83741 13.9993 9.02114 13.8445 9.17591C13.6898 9.33067 13.506 9.45344 13.3038 9.5372C13.1016 9.62095 12.8849 9.66406 12.666 9.66406C12.4471 9.66406 12.2304 9.62095 12.0282 9.5372C11.826 9.45344 11.6423 9.33067 11.4875 9.17591C11.3327 9.02114 11.21 8.83741 11.1262 8.6352C11.0425 8.43299 10.9993 8.21627 10.9993 7.9974C10.9993 7.55537 11.1749 7.13145 11.4875 6.81888C11.8001 6.50632 12.224 6.33073 12.666 6.33073C13.108 6.33073 13.532 6.50632 13.8445 6.81888C14.1571 7.13145 14.3327 7.55537 14.3327 7.9974ZM8.99935 2.66406C8.99935 2.92928 8.89399 3.18363 8.70646 3.37117C8.51892 3.55871 8.26457 3.66406 7.99935 3.66406C7.73413 3.66406 7.47978 3.55871 7.29224 3.37117C7.10471 3.18363 6.99935 2.92928 6.99935 2.66406C6.99935 2.39885 7.10471 2.14449 7.29224 1.95696C7.47978 1.76942 7.73413 1.66406 7.99935 1.66406C8.26457 1.66406 8.51892 1.76942 8.70646 1.95696C8.89399 2.14449 8.99935 2.39885 8.99935 2.66406ZM8.33268 7.66406C8.33268 7.79538 8.30682 7.92542 8.25656 8.04675C8.20631 8.16807 8.13265 8.27831 8.03979 8.37117C7.94693 8.46403 7.83669 8.53769 7.71537 8.58794C7.59404 8.6382 7.464 8.66406 7.33268 8.66406C7.20136 8.66406 7.07132 8.6382 6.95 8.58794C6.82867 8.53769 6.71843 8.46403 6.62558 8.37117C6.53272 8.27831 6.45906 8.16807 6.4088 8.04675C6.35855 7.92542 6.33268 7.79538 6.33268 7.66406C6.33268 7.39885 6.43804 7.14449 6.62558 6.95696C6.81311 6.76942 7.06747 6.66406 7.33268 6.66406C7.5979 6.66406 7.85225 6.76942 8.03979 6.95696C8.22733 7.144449 8.33268 7.39885 8.33268 7.66406ZM4.33268 4.9974C4.33268 5.35102 4.19221 5.69016 3.94216 5.9402C3.69211 6.19025 3.35297 6.33073 2.99935 6.33073C2.64573 6.33073 2.30659 6.19025 2.05654 5.9402C1.80649 5.69016 1.66602 5.35102 1.66602 4.9974C1.66602 4.64377 1.80649 4.30464 2.05654 4.05459C2.30659 3.80454 2.64573 3.66406 2.99935 3.66406C3.35297 3.66406 3.69211 3.80454 3.94216 4.05459C4.19221 4.30464 4.33268 4.64377 4.33268 4.9974ZM6.99935 12.9974C6.99935 13.351 6.85887 13.6902 6.60882 13.9402C6.35878 14.1903 6.01964 14.3307 5.66602 14.3307C5.31239 14.3307 4.97326 14.1903 4.72321 13.9402C4.47316 13.6902 4.33268 13.351 4.33268 12.9974C4.33268 12.6438 4.47316 12.3046 4.72321 12.0546C4.97326 11.8045 5.31239 11.6641 5.66602 11.6641C6.01964 11.6641 6.35878 11.8045 6.60882 12.0546C6.85887 12.3046 6.99935 12.6438 6.99935 12.9974Z",stroke:s}),o("path",{d:"M9.00065 3.33333L11.6673 6.66667M9.66732 10.3333L7.00065 12.3333M5.33398 11.6667L3.33398 6.33333M4.20932 4.436L7.00065 3M8.33398 7.66667L11.004 7.896M8.00065 3.66667L7.33398 6.66667",stroke:s,strokeWidth:"0.666667",strokeLinecap:"round",strokeLinejoin:"round"})]}))};export{e as default};
2
+ //# sourceMappingURL=NeuralNetworkIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NeuralNetworkIcon.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var C=require("tslib"),e=require("react/jsx-runtime");exports.default=function(r){var s=r.className,i=r.size,t=void 0===i?24:i,o=r.color,n=void 0===o?"currentColor":o,a=r["aria-hidden"],d=void 0===a||a;return e.jsxs("svg",C.__assign({xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 16 16",fill:"none","aria-hidden":d,className:s},{children:[e.jsx("path",{d:"M14.3327 7.9974C14.3327 8.21627 14.2896 8.43299 14.2058 8.6352C14.1221 8.83741 13.9993 9.02114 13.8445 9.17591C13.6898 9.33067 13.506 9.45344 13.3038 9.5372C13.1016 9.62095 12.8849 9.66406 12.666 9.66406C12.4471 9.66406 12.2304 9.62095 12.0282 9.5372C11.826 9.45344 11.6423 9.33067 11.4875 9.17591C11.3327 9.02114 11.21 8.83741 11.1262 8.6352C11.0425 8.43299 10.9993 8.21627 10.9993 7.9974C10.9993 7.55537 11.1749 7.13145 11.4875 6.81888C11.8001 6.50632 12.224 6.33073 12.666 6.33073C13.108 6.33073 13.532 6.50632 13.8445 6.81888C14.1571 7.13145 14.3327 7.55537 14.3327 7.9974ZM8.99935 2.66406C8.99935 2.92928 8.89399 3.18363 8.70646 3.37117C8.51892 3.55871 8.26457 3.66406 7.99935 3.66406C7.73413 3.66406 7.47978 3.55871 7.29224 3.37117C7.10471 3.18363 6.99935 2.92928 6.99935 2.66406C6.99935 2.39885 7.10471 2.14449 7.29224 1.95696C7.47978 1.76942 7.73413 1.66406 7.99935 1.66406C8.26457 1.66406 8.51892 1.76942 8.70646 1.95696C8.89399 2.14449 8.99935 2.39885 8.99935 2.66406ZM8.33268 7.66406C8.33268 7.79538 8.30682 7.92542 8.25656 8.04675C8.20631 8.16807 8.13265 8.27831 8.03979 8.37117C7.94693 8.46403 7.83669 8.53769 7.71537 8.58794C7.59404 8.6382 7.464 8.66406 7.33268 8.66406C7.20136 8.66406 7.07132 8.6382 6.95 8.58794C6.82867 8.53769 6.71843 8.46403 6.62558 8.37117C6.53272 8.27831 6.45906 8.16807 6.4088 8.04675C6.35855 7.92542 6.33268 7.79538 6.33268 7.66406C6.33268 7.39885 6.43804 7.14449 6.62558 6.95696C6.81311 6.76942 7.06747 6.66406 7.33268 6.66406C7.5979 6.66406 7.85225 6.76942 8.03979 6.95696C8.22733 7.144449 8.33268 7.39885 8.33268 7.66406ZM4.33268 4.9974C4.33268 5.35102 4.19221 5.69016 3.94216 5.9402C3.69211 6.19025 3.35297 6.33073 2.99935 6.33073C2.64573 6.33073 2.30659 6.19025 2.05654 5.9402C1.80649 5.69016 1.66602 5.35102 1.66602 4.9974C1.66602 4.64377 1.80649 4.30464 2.05654 4.05459C2.30659 3.80454 2.64573 3.66406 2.99935 3.66406C3.35297 3.66406 3.69211 3.80454 3.94216 4.05459C4.19221 4.30464 4.33268 4.64377 4.33268 4.9974ZM6.99935 12.9974C6.99935 13.351 6.85887 13.6902 6.60882 13.9402C6.35878 14.1903 6.01964 14.3307 5.66602 14.3307C5.31239 14.3307 4.97326 14.1903 4.72321 13.9402C4.47316 13.6902 4.33268 13.351 4.33268 12.9974C4.33268 12.6438 4.47316 12.3046 4.72321 12.0546C4.97326 11.8045 5.31239 11.6641 5.66602 11.6641C6.01964 11.6641 6.35878 11.8045 6.60882 12.0546C6.85887 12.3046 6.99935 12.6438 6.99935 12.9974Z",stroke:n}),e.jsx("path",{d:"M9.00065 3.33333L11.6673 6.66667M9.66732 10.3333L7.00065 12.3333M5.33398 11.6667L3.33398 6.33333M4.20932 4.436L7.00065 3M8.33398 7.66667L11.004 7.896M8.00065 3.66667L7.33398 6.66667",stroke:n,strokeWidth:"0.666667",strokeLinecap:"round",strokeLinejoin:"round"})]}))};
2
+ //# sourceMappingURL=NeuralNetworkIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NeuralNetworkIcon.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("tslib"),e=require("react/jsx-runtime"),t=require("@mui/material"),r=require("react"),i=require("../CognitiveCompareConstants.js"),o=require("lucide-react"),a=require("react-markdown"),s=require("../CognitiveComparehelpers.js"),l=require("rehype-raw"),c=require("remark-gfm");function d(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var u=d(r),g=d(a),h=d(l),p=function(n){return"function"==typeof n?n:(null==n?void 0:n.default)||n},f=[p(d(c).default)],v=[p(h.default)],x=u.default.memo(function(a){var l=a.content,c=a.overlayContent,d=a.sxStyles,h=a.deviationBadges,p=void 0===h?[]:h,x=a.highlights,m=void 0===x?[]:x;a.maintainRelativeOrder;var _=a.highlightBg,b=a.suppressHighlightBg,y=void 0!==b&&b,B=a.collisionKey,E=r.useRef(null),j=!!c,C=r.useMemo(function(){return p.reduce(function(e,t){var r;return n.__assign(n.__assign({},e),((r={})[t.id]=t,r))},{})},[p]),k=r.useRef({badgeMap:C,highlightBg:_,hideHighlightBg:j,suppressHighlightBg:y});k.current={badgeMap:C,highlightBg:_,hideHighlightBg:j,suppressHighlightBg:y};var S=function(e,t){return u.default.Children.map(e,function(e){var r;if(!u.default.isValidElement(e))return e;var i=(null===(r=e.props)||void 0===r?void 0:r.children)?S(e.props.children,t):e.props.children,o=u.default.cloneElement(e,n.__assign(n.__assign({},e.props),{children:i}));return t(o)})},F=r.useMemo(function(){return{mark:function(t){var r,i,o,a,s=t.children,l=n.__rest(t,["children"]),c=k.current,d=c.badgeMap,u=c.highlightBg,g=c.hideHighlightBg,h=c.suppressHighlightBg,p=l["data-badge-id"],f=p?d[p]:null,v=l["data-highlight-color"],x=null!==(a=null!==(i=null!=v?v:null===(r=null==f?void 0:f.style)||void 0===r?void 0:r.highlightBg)&&void 0!==i?i:null===(o=null==f?void 0:f.style)||void 0===o?void 0:o.badgeBg)&&void 0!==a?a:u,m="true"===l["data-is-suggested-deviation-fix"]||h;return e.jsx("span",n.__assign({style:n.__assign(n.__assign(n.__assign({},m?{}:{backgroundColor:x}),{borderRadius:"2px",display:"inline",boxDecorationBreak:"clone",WebkitBoxDecorationBreak:"clone",backgroundClip:"padding-box",padding:"0 1px"}),g?{color:"transparent"}:{})},{children:s}))},span:function(r){var a,s,l,c,d,u,g=r.children,h=n.__rest(r,["children"]),p=k.current.badgeMap,f=h["data-badge-id"];if(!f)return e.jsx("span",n.__assign({},h,{children:g}));var v=p[f];if(!v)return e.jsx("span",n.__assign({},h,{children:g}));var x="number"==typeof v.stackIndex?v.stackIndex:0,m="translateY(calc(-20% + ".concat(12*x,"px + var(--badge-nudge, 0px)))");return e.jsxs(t.Box,n.__assign({component:"span",sx:{position:"static",display:"inline"}},{children:[e.jsxs(t.Box,n.__assign({ref:v.badgeRef,className:"deviation-badge","data-side":v.side||"right",sx:n.__assign(n.__assign({fontStyle:"normal",position:"absolute",zIndex:30+x,display:"inline-flex",alignItems:"stretch",fontSize:"10px",bgcolor:(null===(a=v.style)||void 0===a?void 0:a.badgeBg)||"#EEF2FF",color:(null===(s=v.style)||void 0===s?void 0:s.badgeText)||i.DEFAULT_DEVIAION_COLOR,border:"1px solid ".concat((null===(l=v.style)||void 0===l?void 0:l.badgeBorder)||"#C7D2FE"),borderRadius:"12px",fontWeight:600,whiteSpace:"nowrap",boxShadow:"0 1px 3px rgba(0,0,0,0.07)",overflow:"hidden",transition:"none"},"left"===v.side?{right:"-16px",transform:"".concat(m," translateX(calc(100% + 8px))")}:{left:"-16px",transform:"".concat(m," translateX(calc(-100% - 8px))")}),v.isConnected&&v.style&&{outline:"2px solid ".concat(v.style.badgeBorder),outlineOffset:"1px"})},{children:[e.jsxs(t.Box,n.__assign({onClick:function(n){n.stopPropagation(),v.onSummaryClick&&v.onSummaryClick(n)},sx:{display:"flex",alignItems:"center",px:1,py:.3,cursor:"pointer","&:hover":{bgcolor:"rgba(0,0,0,0.04)"}}},{children:[e.jsx(t.Box,n.__assign({component:"span",sx:{fontSize:"10px",fontWeight:700}},{children:v.label})),("left"===v.side||v.isOrphan)&&e.jsx(t.Box,n.__assign({component:"span",sx:{fontSize:"10px",pl:.5,ml:.5,borderLeft:"1px solid ".concat((null===(c=v.style)||void 0===c?void 0:c.badgeBorder)||"#C7D2FE")}},{children:null!=v.score&&"N/A"!==v.score&&"NA"!==v.score&&0!==v.score?"".concat(v.score):"N/A"===v.score||"NA"===v.score?"N/A":"Same"}))]})),("left"===v.side||v.isOrphan)&&e.jsx(t.Box,n.__assign({onClick:function(n){n.stopPropagation(),v.onClick&&v.onClick(n)},sx:{display:"flex",alignItems:"center",px:.5,borderLeft:"1px solid ".concat((null===(d=v.style)||void 0===d?void 0:d.badgeBorder)||"#C7D2FE"),cursor:"pointer","&:hover":{bgcolor:"rgba(0,0,0,0.06)"}}},{children:e.jsx(o.EllipsisVertical,{size:12,color:(null===(u=v.style)||void 0===u?void 0:u.badgeText)||"#3730A3"})}))]})),g]}))},table:function(r){var i=r.children;return e.jsx(t.Box,n.__assign({component:"table",sx:{width:"100%",borderCollapse:"collapse",my:1,fontSize:"inherit"}},{children:i}))},thead:function(r){var i=r.children;return e.jsx(t.Box,n.__assign({component:"thead"},{children:i}))},tbody:function(r){var i=r.children;return e.jsx(t.Box,n.__assign({component:"tbody"},{children:i}))},tr:function(r){var i=r.children;return e.jsx(t.Box,n.__assign({component:"tr",sx:{borderBottom:"1px solid #E5E7EB"}},{children:i}))},th:function(r){var i=r.children;return e.jsx(t.Box,n.__assign({component:"th",sx:{border:"1px solid #E5E7EB",padding:"8px",textAlign:"left",fontWeight:600,backgroundColor:"#F9FAFB"}},{children:i}))},td:function(r){var i=r.children;return e.jsx(t.Box,n.__assign({component:"td",sx:{border:"1px solid #E5E7EB",padding:"8px",verticalAlign:"top"}},{children:i}))},code:function(t){var r=t.children;return e.jsx("span",n.__assign({style:{fontFamily:"inherit",fontSize:"inherit"}},{children:r}))},pre:function(t){var r=t.children;return e.jsx("span",n.__assign({style:{fontFamily:"inherit",fontSize:"inherit",display:"block",whiteSpace:"pre-wrap"}},{children:r}))},updated:function(n){var t=n.children;return e.jsx(e.Fragment,{children:t})},deleted:function(t){var r=t.children,i=S(r,function(n){return u.default.cloneElement(n,{"data-is-suggested-deviation-fix":"true"})});return e.jsx("span",n.__assign({style:{boxShadow:"inset 0 1px 0 #EF4444, inset 0 -1px 0 #EF4444",backgroundColor:"#FCCCCC",textDecoration:"line-through"}},{children:i}))},changed:function(t){var r=t.children,i=S(r,function(n){return u.default.cloneElement(n,{"data-is-suggested-deviation-fix":"true"})});return e.jsx("span",n.__assign({style:{boxShadow:"inset 0 1px 0 #2F59FF, inset 0 -1px 0 #2F59FF",backgroundColor:"#D5E8FF"}},{children:i}))},ul:function(r){var i=r.children;return e.jsx(t.Box,n.__assign({component:"ul",sx:{mt:1,mb:1,pl:3,listStyleType:"disc"}},{children:i}))},ol:function(r){var i=r.children;return e.jsx(t.Box,n.__assign({component:"ol",sx:{mt:1,mb:1,pl:3,listStyleType:"decimal"}},{children:i}))},li:function(r){var i=r.children;return e.jsx(t.Box,n.__assign({component:"li",sx:{mb:.5,display:"list-item"}},{children:i}))}}},[]),w=function(n){if(!n||"string"!=typeof n)return"";var e=n,t=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/((?:<\/?[a-z]+[^>]*>\s*)+)([*+\-] |\d+\. )/gi,"$2$1")).replace(/\\(['"])/g,"$1").replace(/\\n/g,"\n").replace(/\\\./g,".").replace(/\r\n/g,"\n")).replace(/^(\d+\.)(\s{2,})/gm,function(n,e,t){return"".concat(e.slice(0,-1),"\\.").concat(t)})).replace(/^(\d+\.)\s*\n+(\s+)(\S)/gm,function(n,e,t,r){return"".concat(e," ").concat(r)})).replace(/([^\n])\n(#{1,6} )/g,"$1\n\n$2")).replace(/([^\n])\n([ \t]*(?:[#*+\-] |\d+\. ))/g,"$1\n\n$2")).replace(/\n{3,}/g,"\n\n")).replace(/^[ \t]+(?![ \t]*([\*\-\+] |\d+\. ))/gm,function(n){return n.replace(/ /g," ").replace(/\t/g,"    ")})).split(/(\n{2,})/);return(e=t.map(function(n){return/^\n+$/.test(n)||/\|.*\|/.test(n)&&/\|[\s:|-]+\|/.test(n)||/^#{1,6} /.test(n.trimStart())?n:n.replace(/\n(?=[^\n])/g,function(e,t){var r=n.slice(t+1);return/^[ \t]*([#>|\-*+]|\d+\.)/.test(r)?"\n":" "})}).join("")).trim()},M=function(n){return n.replace(/[\.,;:]/g," ")},A=r.useMemo(function(){return p.map(function(n){return{id:n.id,connected:n.isConnected,stackIndex:n.stackIndex,size:n.size}})},[p]),T=r.useMemo(function(){var e=w(l||""),t=y?M(e):e,r=(p||[]).map(function(n){var e,t;return{id:null==n?void 0:n.id,highlight:w((null==n?void 0:n.highlight)||""),highlightColor:(null===(e=null==n?void 0:n.style)||void 0===e?void 0:e.highlightBg)||(null===(t=null==n?void 0:n.style)||void 0===t?void 0:t.badgeBg)||_}}).filter(function(n){return n.id&&n.highlight}),i={};r.forEach(function(n){i[n.highlight]||(i[n.highlight]=[]),i[n.highlight].push(n)});var o=function(n,e,t,r){void 0===e&&(e=""),void 0===r&&(r=[]);var i=!1,o=function(n){var o=function(n,e,t){var r,i,o;void 0===e&&(e="");var a=n.match(/^(\s*)([\s\S]*?)(\s*)$/);if(!a)return n;var s=null!==(r=a[1])&&void 0!==r?r:"",l=null!==(i=a[2])&&void 0!==i?i:"",c=null!==(o=a[3])&&void 0!==o?o:"";return l?s+function(n,e){void 0===n&&(n="");var t=e?' data-highlight-color="'.concat(e,'"'):"",r=n?' data-badge-id="'.concat(n,'"'):"";return"<mark".concat(r).concat(t,">")}(e,t)+l+"</mark>"+c:n}(n,e,t),a=o;if(!i&&r.length>0){i=!0;var s="",l="";r.forEach(function(n){s+=function(n){return'<span data-badge-id="'.concat(n,'">')}(n.id),l="</span>"+l}),a=s+o+l}return"​"+a};return n.split(/(\n+)/).map(function(n){return/^\n+$/.test(n)?n:n.trim()?""===n.replace(/[|:\-\s]/g,"")&&n.includes("-")?n:n.includes("|")?n.split(/(\|)/).map(function(n){return"|"!==n&&n.trim()?o(n):n}).join(""):o(n):n}).join("")},a=[];Object.entries(i).forEach(function(n){var r=n[0],i=n[1],o=e.indexOf(r),l=!1;if(-1===o&&y){var c=M(r);-1!==(o=t.indexOf(c))&&(l=!0)}if(-1!==o){for(var d=i[0].highlightColor,u=1;u<i.length;u++)d=s.mixHexColors(d,i[u].highlightColor||"");a.push({highlight:r,start:o,end:o+r.length,badges:i,color:d,usedLooseMatch:l})}});var c=new Set(Object.keys(i));(m||[]).forEach(function(n){if(n){var r=w(n);if(r&&!c.has(r)){var i=e.indexOf(r),o=!1;if(-1===i&&y){var s=M(r);-1!==(i=t.indexOf(s))&&(o=!0)}if(-1!==i){var l=e.slice(0,i);(l.match(/</g)||[]).length===(l.match(/>/g)||[]).length&&a.push({highlight:r,start:i,end:i+r.length,badges:[],color:_||"",usedLooseMatch:o})}}}}),a.sort(function(n,e){return n.start-e.start||e.end-n.end});var d=[],u={};a.forEach(function(n,e){for(var t=n.start,r=n.end,i=0,o=d;i<o.length;i++){var a=o[i],s=a.start,l=a.end,c=t<l&&r>l&&t>=s,g=t<s&&r>s&&r<=l;if(t>=s&&r<=l){n.orphaned=!0,u[e]=a.matchIdx;break}c&&(t=l),g&&(r=s)}n.trimmedStart=t,n.trimmedEnd=r,!n.orphaned&&t<r&&d.push({start:t,end:r,matchIdx:e})});var g={};Object.entries(u).forEach(function(n){var e=n[0],t=n[1],r=Number(e);g[t]||(g[t]=[]),g[t].push(r)});var h=a.map(function(e,t){return n.__assign(n.__assign({},e),{idx:t})}).filter(function(n){return!n.orphaned}).sort(function(n,e){var t,r;return(null!==(t=e.trimmedStart)&&void 0!==t?t:e.start)-(null!==(r=n.trimmedStart)&&void 0!==r?r:n.start)});return h.forEach(function(n){var t,r,i,l,c=null!==(t=n.trimmedStart)&&void 0!==t?t:n.start,d=null!==(r=n.trimmedEnd)&&void 0!==r?r:n.end;if(!(c>=d)){var u=e.slice(c,d),h=function(n,e,t,r){if(!t.length)return n;var i=t.map(function(n){return a[n]}).sort(function(n,e){return n.start-e.start}),l="",c=0;return i.forEach(function(t){var i,a,d=Math.max(c,t.start-e),u=Math.max(d,t.end-e);if(!(d>=u)){var g=s.mixHexColors(r,t.color||"");l+=n.slice(c,d),l+=o(n.slice(d,u),(null===(a=null===(i=t.badges)||void 0===i?void 0:i[0])||void 0===a?void 0:a.id)||"",g,t.badges||[]),c=u}}),l+=n.slice(c)}(n.usedLooseMatch||c!==n.start||d!==n.end?u:n.highlight,n.start,g[n.idx]||[],n.color),p=o(h,(null===(l=null===(i=n.badges)||void 0===i?void 0:i[0])||void 0===l?void 0:l.id)||"",n.color,n.badges||[]);e=e.slice(0,c)+p+e.slice(d)}}),e},[l,p,m,_,y]),z=r.useMemo(function(){return c?w(c||""):""},[c]),O=!!c,q={"& *":{fontFamily:"inherit"},"& code, & pre, & kbd, & samp":{fontFamily:"inherit !important",fontSize:"inherit",background:"none",padding:0,border:"none",whiteSpace:"pre-wrap"},"& p, & li, & ul, & ol":{position:"static",overflow:"visible",whiteSpace:"pre-wrap"}},I=n.__assign(n.__assign(n.__assign(n.__assign({},d),q),{position:"relative",overflow:"visible",whiteSpace:"normal",gridArea:"1 / 1",zIndex:2}),O?{color:"transparent",userSelect:"none",pointerEvents:"none","& .deviation-badge":{pointerEvents:"auto"},"& table":{visibility:"hidden",margin:"0 !important"},"& th, & td":{padding:"0 !important",border:"none !important",backgroundColor:"transparent !important"},"& tr":{border:"none !important"},"& p:empty":{display:"none"}}:{}),P=n.__assign(n.__assign(n.__assign({},d),q),{position:"relative",overflow:"visible",whiteSpace:"normal",gridArea:"1 / 1",zIndex:1,pointerEvents:"auto"});return r.useLayoutEffect(function(){if(E.current){var n=function(){var n=Array.from(E.current.querySelectorAll(".deviation-badge"));if(0!==n.length){n.forEach(function(n){n.style.setProperty("--badge-nudge","0px")});var e=n.filter(function(n){return"left"===n.dataset.side}),t=n.filter(function(n){return"left"!==n.dataset.side}),r=E.current.getBoundingClientRect(),i=r.bottom-4,o=r.top+4,a=function(n){if(0!==n.length){var e=n.map(function(n){var e=n.getBoundingClientRect();return{el:n,naturalTop:e.top,height:e.height,currentTop:e.top}});e.sort(function(n,e){return n.naturalTop-e.naturalTop});var t=[],r=[];e.forEach(function(n){if(0===r.length)r.push(n);else{var e=r[r.length-1],i=e.currentTop+e.height;n.naturalTop<i+8?(n.currentTop=i+8,r.push(n)):(t.push(r),r=[n])}}),r.length>0&&t.push(r),t.forEach(function(n){var e=n[n.length-1],t=e.currentTop+e.height;if(t>i){var r=t-i,a=n[0].currentTop-o,s=Math.max(0,Math.min(r,a));n.forEach(function(n){n.currentTop-=s})}}),t.flat().forEach(function(n){var e=n.currentTop-n.naturalTop;n.el.style.setProperty("--badge-nudge","".concat(e,"px"))})}};a(e),a(t)}},e=requestAnimationFrame(function(){requestAnimationFrame(function(){n()})}),t=new ResizeObserver(function(){requestAnimationFrame(n)});return t.observe(E.current),function(){t.disconnect(),cancelAnimationFrame(e)}}},[T,B,A]),e.jsxs(t.Box,n.__assign({ref:E,sx:{position:"relative",display:"grid"}},{children:[e.jsx(t.Typography,n.__assign({component:"div",sx:n.__assign(n.__assign({},I),{padding:"3px"})},{children:e.jsx(g.default,n.__assign({components:F,remarkPlugins:f,rehypePlugins:v},{children:T.replace(/#{3}/g,"")}))})),O&&e.jsx(t.Typography,n.__assign({component:"div",sx:P},{children:e.jsx(g.default,n.__assign({components:F,remarkPlugins:f,rehypePlugins:v},{children:z}))}))]}))},s.areMarkdownPropsEqual);exports.MemoizedMarkdown=x;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("tslib"),e=require("react/jsx-runtime"),t=require("@mui/material"),r=require("react"),i=require("../CognitiveCompareConstants.js"),o=require("lucide-react"),a=require("react-markdown"),s=require("../CognitiveComparehelpers.js"),l=require("rehype-raw"),c=require("remark-gfm");function d(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var u=d(r),g=d(a),h=d(l),p=function(n){return"function"==typeof n?n:(null==n?void 0:n.default)||n},f=[p(d(c).default)],v=[p(h.default)],x=u.default.memo(function(a){var l=a.content,c=a.overlayContent,d=a.sxStyles,h=a.deviationBadges,p=void 0===h?[]:h,x=a.highlights,m=void 0===x?[]:x;a.maintainRelativeOrder;var _=a.highlightBg,b=a.suppressHighlightBg,y=void 0!==b&&b,B=a.collisionKey,E=r.useRef(null),j=!!c,C=r.useMemo(function(){return p.reduce(function(e,t){var r;return n.__assign(n.__assign({},e),((r={})[t.id]=t,r))},{})},[p]),k=r.useRef({badgeMap:C,highlightBg:_,hideHighlightBg:j,suppressHighlightBg:y});k.current={badgeMap:C,highlightBg:_,hideHighlightBg:j,suppressHighlightBg:y};var S=function(e,t){return u.default.Children.map(e,function(e){var r;if(!u.default.isValidElement(e))return e;var i=(null===(r=e.props)||void 0===r?void 0:r.children)?S(e.props.children,t):e.props.children,o=u.default.cloneElement(e,n.__assign(n.__assign({},e.props),{children:i}));return t(o)})},F=r.useMemo(function(){return{mark:function(t){var r,i,o,a,s=t.children,l=n.__rest(t,["children"]),c=k.current,d=c.badgeMap,u=c.highlightBg,g=c.hideHighlightBg,h=c.suppressHighlightBg,p=l["data-badge-id"],f=p?d[p]:null,v=l["data-highlight-color"],x=null!==(a=null!==(i=null!=v?v:null===(r=null==f?void 0:f.style)||void 0===r?void 0:r.highlightBg)&&void 0!==i?i:null===(o=null==f?void 0:f.style)||void 0===o?void 0:o.badgeBg)&&void 0!==a?a:u,m="true"===l["data-is-suggested-deviation-fix"]||h;return e.jsx("span",n.__assign({style:n.__assign(n.__assign(n.__assign({},m?{}:{backgroundColor:x}),{borderRadius:"2px",display:"inline",boxDecorationBreak:"clone",WebkitBoxDecorationBreak:"clone",backgroundClip:"padding-box",padding:"0 1px"}),g?{color:"transparent"}:{})},{children:s}))},span:function(r){var a,s,l,c,d,u,g=r.children,h=n.__rest(r,["children"]),p=k.current.badgeMap,f=h["data-badge-id"];if(!f)return e.jsx("span",n.__assign({},h,{children:g}));var v=p[f];if(!v)return e.jsx("span",n.__assign({},h,{children:g}));var x="number"==typeof v.stackIndex?v.stackIndex:0,m="translateY(calc(-20% + ".concat(12*x,"px + var(--badge-nudge, 0px)))");return e.jsxs(t.Box,n.__assign({component:"span",sx:{position:"static",display:"inline"}},{children:[e.jsxs(t.Box,n.__assign({ref:v.badgeRef,className:"deviation-badge","data-side":v.side||"right",sx:n.__assign(n.__assign({fontStyle:"normal",position:"absolute",zIndex:30+x,display:"inline-flex",alignItems:"stretch",fontSize:"10px",bgcolor:(null===(a=v.style)||void 0===a?void 0:a.badgeBg)||"#EEF2FF",color:(null===(s=v.style)||void 0===s?void 0:s.badgeText)||i.DEFAULT_DEVIAION_COLOR,border:"1px solid ".concat((null===(l=v.style)||void 0===l?void 0:l.badgeBorder)||"#C7D2FE"),borderRadius:"12px",fontWeight:600,whiteSpace:"nowrap",boxShadow:"0 1px 3px rgba(0,0,0,0.07)",overflow:"hidden",transition:"none"},"left"===v.side?{right:"-16px",transform:"".concat(m," translateX(calc(100% + 8px))")}:{left:"-16px",transform:"".concat(m," translateX(calc(-100% - 8px))")}),v.isConnected&&v.style&&{outline:"2px solid ".concat(v.style.badgeBorder),outlineOffset:"1px"})},{children:[e.jsxs(t.Box,n.__assign({onClick:function(n){n.stopPropagation(),v.onSummaryClick&&v.onSummaryClick(n)},sx:{display:"flex",alignItems:"center",px:1,py:.3,cursor:"pointer","&:hover":{bgcolor:"rgba(0,0,0,0.04)"}}},{children:[e.jsx(t.Box,n.__assign({component:"span",sx:{fontSize:"10px",fontWeight:700}},{children:v.label})),("left"===v.side||v.isOrphan)&&e.jsx(t.Box,n.__assign({component:"span",sx:{fontSize:"10px",pl:.5,ml:.5,borderLeft:"1px solid ".concat((null===(c=v.style)||void 0===c?void 0:c.badgeBorder)||"#C7D2FE")}},{children:null!=v.score&&"N/A"!==v.score&&"NA"!==v.score&&0!==v.score?"".concat(v.score):"N/A"===v.score||"NA"===v.score?"N/A":"Same"}))]})),("left"===v.side||v.isOrphan)&&e.jsx(t.Box,n.__assign({onClick:function(n){n.stopPropagation(),v.onClick&&v.onClick(n)},sx:{display:"flex",alignItems:"center",px:.5,borderLeft:"1px solid ".concat((null===(d=v.style)||void 0===d?void 0:d.badgeBorder)||"#C7D2FE"),cursor:"pointer","&:hover":{bgcolor:"rgba(0,0,0,0.06)"}}},{children:e.jsx(o.EllipsisVertical,{size:12,color:(null===(u=v.style)||void 0===u?void 0:u.badgeText)||"#3730A3"})}))]})),g]}))},table:function(r){var i=r.children;return e.jsx(t.Box,n.__assign({component:"table",sx:{width:"100%",borderCollapse:"collapse",my:1,fontSize:"inherit"}},{children:i}))},thead:function(r){var i=r.children;return e.jsx(t.Box,n.__assign({component:"thead"},{children:i}))},tbody:function(r){var i=r.children;return e.jsx(t.Box,n.__assign({component:"tbody"},{children:i}))},tr:function(r){var i=r.children;return e.jsx(t.Box,n.__assign({component:"tr",sx:{borderBottom:"1px solid #E5E7EB"}},{children:i}))},th:function(r){var i=r.children;return e.jsx(t.Box,n.__assign({component:"th",sx:{border:"1px solid #E5E7EB",padding:"8px",textAlign:"left",fontWeight:600,backgroundColor:"#F9FAFB"}},{children:i}))},td:function(r){var i=r.children;return e.jsx(t.Box,n.__assign({component:"td",sx:{border:"1px solid #E5E7EB",padding:"8px",verticalAlign:"top"}},{children:i}))},code:function(t){var r=t.children;return e.jsx("span",n.__assign({style:{fontFamily:"inherit",fontSize:"inherit"}},{children:r}))},pre:function(t){var r=t.children;return e.jsx("span",n.__assign({style:{fontFamily:"inherit",fontSize:"inherit",display:"block",whiteSpace:"pre-wrap"}},{children:r}))},updated:function(n){var t=n.children;return e.jsx(e.Fragment,{children:t})},deleted:function(t){var r=t.children,i=S(r,function(n){return u.default.cloneElement(n,{"data-is-suggested-deviation-fix":"true"})});return e.jsx("span",n.__assign({style:{boxShadow:"inset 0 1px 0 #EF4444, inset 0 -1px 0 #EF4444",backgroundColor:"#FCCCCC",textDecoration:"line-through"}},{children:i}))},changed:function(t){var r=t.children,i=S(r,function(n){return u.default.cloneElement(n,{"data-is-suggested-deviation-fix":"true"})});return e.jsx("span",n.__assign({style:{boxShadow:"inset 0 1px 0 #2F59FF, inset 0 -1px 0 #2F59FF",backgroundColor:"#D5E8FF"}},{children:i}))},ul:function(r){var i=r.children,o=n.__rest(r,["children"]);return e.jsx(t.Box,n.__assign({component:"ul",sx:{mt:1,mb:1,pl:3,listStyleType:"disc"}},o,{children:i}))},ol:function(r){var i=r.children,o=n.__rest(r,["children"]);return e.jsx(t.Box,n.__assign({component:"ol",sx:{mt:1,mb:1,pl:3,listStyleType:"decimal"}},o,{children:i}))},li:function(r){var i=r.children,o=n.__rest(r,["children"]);return e.jsx(t.Box,n.__assign({component:"li",sx:{mb:.5,display:"list-item"}},o,{children:i}))}}},[]),w=function(n){if(!n||"string"!=typeof n)return"";var e=n,t=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/((?:<\/?[a-z]+[^>]*>\s*)+)([*+\-] |\d+\. )/gi,"$2$1")).replace(/\\(['"])/g,"$1").replace(/\\n/g,"\n").replace(/\\\./g,".").replace(/\r\n/g,"\n")).replace(/^(\d+\.)(\s{2,})/gm,function(n,e,t){return"".concat(e.slice(0,-1),"\\.").concat(t)})).replace(/^(\d+\.)\s*\n+(\s+)(\S)/gm,function(n,e,t,r){return"".concat(e," ").concat(r)})).replace(/([^\n])\n(#{1,6} )/g,"$1\n\n$2")).replace(/([^\n])\n([ \t]*(?:[#*+\-] |\d+\. ))/g,"$1\n\n$2")).replace(/\n{3,}/g,"\n\n")).replace(/^[ \t]+(?![ \t]*([\*\-\+] |\d+\. ))/gm,function(n){return n.replace(/ /g," ").replace(/\t/g,"    ")})).split(/(\n{2,})/);return(e=t.map(function(n){return/^\n+$/.test(n)||/\|.*\|/.test(n)&&/\|[\s:|-]+\|/.test(n)||/^#{1,6} /.test(n.trimStart())?n:n.replace(/\n(?=[^\n])/g,function(e,t){var r=n.slice(t+1);return/^[ \t]*([#>|\-*+]|\d+\.)/.test(r)?"\n":" "})}).join("")).trim()},M=function(n){return n.replace(/[\.,;:]/g," ")},A=r.useMemo(function(){return p.map(function(n){return{id:n.id,connected:n.isConnected,stackIndex:n.stackIndex,size:n.size}})},[p]),T=r.useMemo(function(){var e=w(l||""),t=y?M(e):e,r=(p||[]).map(function(n){var e,t;return{id:null==n?void 0:n.id,highlight:w((null==n?void 0:n.highlight)||""),highlightColor:(null===(e=null==n?void 0:n.style)||void 0===e?void 0:e.highlightBg)||(null===(t=null==n?void 0:n.style)||void 0===t?void 0:t.badgeBg)||_}}).filter(function(n){return n.id&&n.highlight}),i={};r.forEach(function(n){i[n.highlight]||(i[n.highlight]=[]),i[n.highlight].push(n)});var o=function(n,e,t,r){void 0===e&&(e=""),void 0===r&&(r=[]);var i=!1,o=function(n){var o=function(n,e,t){var r,i,o;void 0===e&&(e="");var a=n.match(/^(\s*)([\s\S]*?)(\s*)$/);if(!a)return n;var s=null!==(r=a[1])&&void 0!==r?r:"",l=null!==(i=a[2])&&void 0!==i?i:"",c=null!==(o=a[3])&&void 0!==o?o:"";return l?s+function(n,e){void 0===n&&(n="");var t=e?' data-highlight-color="'.concat(e,'"'):"",r=n?' data-badge-id="'.concat(n,'"'):"";return"<mark".concat(r).concat(t,">")}(e,t)+l+"</mark>"+c:n}(n,e,t),a=o;if(!i&&r.length>0){i=!0;var s="",l="";r.forEach(function(n){s+=function(n){return'<span data-badge-id="'.concat(n,'">')}(n.id),l="</span>"+l}),a=s+o+l}return"​"+a};return n.split(/(\n+)/).map(function(n){return/^\n+$/.test(n)?n:n.trim()?""===n.replace(/[|:\-\s]/g,"")&&n.includes("-")?n:n.includes("|")?n.split(/(\|)/).map(function(n){return"|"!==n&&n.trim()?o(n):n}).join(""):o(n):n}).join("")},a=[];Object.entries(i).forEach(function(n){var r=n[0],i=n[1],o=e.indexOf(r),l=!1;if(-1===o&&y){var c=M(r);-1!==(o=t.indexOf(c))&&(l=!0)}if(-1!==o){for(var d=i[0].highlightColor,u=1;u<i.length;u++)d=s.mixHexColors(d,i[u].highlightColor||"");a.push({highlight:r,start:o,end:o+r.length,badges:i,color:d,usedLooseMatch:l})}});var c=new Set(Object.keys(i));(m||[]).forEach(function(n){if(n){var r=w(n);if(r&&!c.has(r)){var i=e.indexOf(r),o=!1;if(-1===i&&y){var s=M(r);-1!==(i=t.indexOf(s))&&(o=!0)}if(-1!==i){var l=e.slice(0,i);(l.match(/</g)||[]).length===(l.match(/>/g)||[]).length&&a.push({highlight:r,start:i,end:i+r.length,badges:[],color:_||"",usedLooseMatch:o})}}}}),a.sort(function(n,e){return n.start-e.start||e.end-n.end});var d=[],u={};a.forEach(function(n,e){for(var t=n.start,r=n.end,i=0,o=d;i<o.length;i++){var a=o[i],s=a.start,l=a.end,c=t<l&&r>l&&t>=s,g=t<s&&r>s&&r<=l;if(t>=s&&r<=l){n.orphaned=!0,u[e]=a.matchIdx;break}c&&(t=l),g&&(r=s)}n.trimmedStart=t,n.trimmedEnd=r,!n.orphaned&&t<r&&d.push({start:t,end:r,matchIdx:e})});var g={};Object.entries(u).forEach(function(n){var e=n[0],t=n[1],r=Number(e);g[t]||(g[t]=[]),g[t].push(r)});var h=a.map(function(e,t){return n.__assign(n.__assign({},e),{idx:t})}).filter(function(n){return!n.orphaned}).sort(function(n,e){var t,r;return(null!==(t=e.trimmedStart)&&void 0!==t?t:e.start)-(null!==(r=n.trimmedStart)&&void 0!==r?r:n.start)});return h.forEach(function(n){var t,r,i,l,c=null!==(t=n.trimmedStart)&&void 0!==t?t:n.start,d=null!==(r=n.trimmedEnd)&&void 0!==r?r:n.end;if(!(c>=d)){var u=e.slice(c,d),h=function(n,e,t,r){if(!t.length)return n;var i=t.map(function(n){return a[n]}).sort(function(n,e){return n.start-e.start}),l="",c=0;return i.forEach(function(t){var i,a,d=Math.max(c,t.start-e),u=Math.max(d,t.end-e);if(!(d>=u)){var g=s.mixHexColors(r,t.color||"");l+=n.slice(c,d),l+=o(n.slice(d,u),(null===(a=null===(i=t.badges)||void 0===i?void 0:i[0])||void 0===a?void 0:a.id)||"",g,t.badges||[]),c=u}}),l+=n.slice(c)}(n.usedLooseMatch||c!==n.start||d!==n.end?u:n.highlight,n.start,g[n.idx]||[],n.color),p=o(h,(null===(l=null===(i=n.badges)||void 0===i?void 0:i[0])||void 0===l?void 0:l.id)||"",n.color,n.badges||[]);e=e.slice(0,c)+p+e.slice(d)}}),e},[l,p,m,_,y]),z=r.useMemo(function(){return c?w(c||""):""},[c]),O=!!c,q={"& *":{fontFamily:"inherit"},"& code, & pre, & kbd, & samp":{fontFamily:"inherit !important",fontSize:"inherit",background:"none",padding:0,border:"none",whiteSpace:"pre-wrap"},"& p, & li, & ul, & ol":{position:"static",overflow:"visible",whiteSpace:"pre-wrap"}},I=n.__assign(n.__assign(n.__assign(n.__assign({},d),q),{position:"relative",overflow:"visible",whiteSpace:"normal",gridArea:"1 / 1",zIndex:2}),O?{color:"transparent",userSelect:"none",pointerEvents:"none","& .deviation-badge":{pointerEvents:"auto"},"& table":{visibility:"hidden",margin:"0 !important"},"& th, & td":{padding:"0 !important",border:"none !important",backgroundColor:"transparent !important"},"& tr":{border:"none !important"},"& p:empty":{display:"none"}}:{}),P=n.__assign(n.__assign(n.__assign({},d),q),{position:"relative",overflow:"visible",whiteSpace:"normal",gridArea:"1 / 1",zIndex:1,pointerEvents:"auto"});return r.useLayoutEffect(function(){if(E.current){var n=function(){var n=Array.from(E.current.querySelectorAll(".deviation-badge"));if(0!==n.length){n.forEach(function(n){n.style.setProperty("--badge-nudge","0px")});var e=n.filter(function(n){return"left"===n.dataset.side}),t=n.filter(function(n){return"left"!==n.dataset.side}),r=E.current.getBoundingClientRect(),i=r.bottom-4,o=r.top+4,a=function(n){if(0!==n.length){var e=n.map(function(n){var e=n.getBoundingClientRect();return{el:n,naturalTop:e.top,height:e.height,currentTop:e.top}});e.sort(function(n,e){return n.naturalTop-e.naturalTop});var t=[],r=[];e.forEach(function(n){if(0===r.length)r.push(n);else{var e=r[r.length-1],i=e.currentTop+e.height;n.naturalTop<i+8?(n.currentTop=i+8,r.push(n)):(t.push(r),r=[n])}}),r.length>0&&t.push(r),t.forEach(function(n){var e=n[n.length-1],t=e.currentTop+e.height;if(t>i){var r=t-i,a=n[0].currentTop-o,s=Math.max(0,Math.min(r,a));n.forEach(function(n){n.currentTop-=s})}}),t.flat().forEach(function(n){var e=n.currentTop-n.naturalTop;n.el.style.setProperty("--badge-nudge","".concat(e,"px"))})}};a(e),a(t)}},e=requestAnimationFrame(function(){requestAnimationFrame(function(){n()})}),t=new ResizeObserver(function(){requestAnimationFrame(n)});return t.observe(E.current),function(){t.disconnect(),cancelAnimationFrame(e)}}},[T,B,A]),e.jsxs(t.Box,n.__assign({ref:E,sx:{position:"relative",display:"grid"}},{children:[e.jsx(t.Typography,n.__assign({component:"div",sx:n.__assign(n.__assign({},I),{padding:"3px"})},{children:e.jsx(g.default,n.__assign({components:F,remarkPlugins:f,rehypePlugins:v},{children:T.replace(/#{3}/g,"")}))})),O&&e.jsx(t.Typography,n.__assign({component:"div",sx:P},{children:e.jsx(g.default,n.__assign({components:F,remarkPlugins:f,rehypePlugins:v},{children:z}))}))]}))},s.areMarkdownPropsEqual);exports.MemoizedMarkdown=x;
2
2
  //# sourceMappingURL=memoizedMarkdown.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),i=require("react"),n=require("lucide-react"),a=require("../CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.js"),o=require("./GptWebCitationImageCitation.js"),l=require("./GptWebCitationMarkdown.js"),s=require("./GptWebCitationSkeleton.js"),r=require("./utils/citationData.utils.js"),u=require("./GptWebCitation.module.css.js"),d=require("../../assests/svg/NeuralNetworkIcon.js"),c=function(i){var a=i.variant,o=i.disabled,l=i.onClick,s=i.title,r=i.style;return t.jsx("button",e.__assign({type:"button",className:u.default.webCitationButton,onClick:l,disabled:o,title:s,style:r},{children:"gpt"===a?t.jsxs(t.Fragment,{children:[t.jsx(d.default,{className:u.default.webCitationButtonIcon}),"View GPT Citation"]}):t.jsxs(t.Fragment,{children:[t.jsx(n.Globe,{size:24,className:u.default.webCitationButtonIcon}),"View Web Citation"]})}))},g=function(){return t.jsx(s.default,{})};exports.default=function(s){var d,v,p,_=s.gptCitation,b=s.isWebCitation,C=void 0!==b&&b,f=s.webCitationData,m=s.topic,x=s.sourceLabel,h=s.relevanceScore,j=s.learnedFrom,w=s.onGenerateWebCitation,y=s.isWebCitationLoading,N=void 0!==y&&y,W=s.showWebCitation,B=s.onToggleCitationView,F=s.showExpandImageButton,k=void 0===F||F,I=s.showGptMaximizeButton,q=s.styles,M=i.useMemo(function(){return function(t){var i,n,a,o,l,s,r,u,d;return{container:null==t?void 0:t.container,gptWrapper:e.__assign(e.__assign({},null===(i=null==t?void 0:t.gptCitation)||void 0===i?void 0:i.wrapper),null==t?void 0:t.gptCitationWrapper),gptFooterAction:e.__assign(e.__assign({},null===(n=null==t?void 0:t.gptCitation)||void 0===n?void 0:n.footerAction),null==t?void 0:t.footerAction),gptToggleButton:e.__assign(e.__assign({},null===(a=null==t?void 0:t.gptCitation)||void 0===a?void 0:a.toggleButton),null==t?void 0:t.webCitationButton),webPanel:e.__assign(e.__assign({},null==t?void 0:t.container),null===(o=null==t?void 0:t.webCitation)||void 0===o?void 0:o.panel),webHeader:null===(l=null==t?void 0:t.webCitation)||void 0===l?void 0:l.header,webContent:null===(s=null==t?void 0:t.webCitation)||void 0===s?void 0:s.content,webFooter:null===(r=null==t?void 0:t.webCitation)||void 0===r?void 0:r.footer,webToggleButton:e.__assign(e.__assign({},null===(u=null==t?void 0:t.webCitation)||void 0===u?void 0:u.toggleButton),null==t?void 0:t.webCitationButton),webLearnedFrom:null===(d=null==t?void 0:t.webCitation)||void 0===d?void 0:d.learnedFrom}}(q)},[q]),S=i.useMemo(function(){return e.__assign(e.__assign(e.__assign({},_),{disableMaximize:void 0!==I?!I:_.disableMaximize}),C?{DocumentTitle:void 0,previewCallback:void 0}:{})},[_,I,C]),T=i.useState(!1),D=T[0],G=T[1],z=i.useState(0),A=z[0],H=z[1],L=i.useState(0),P=L[0],E=L[1],U=null!=W?W:D,V=void 0!==W,O=i.useMemo(function(){return f?r.mapCitationDataToDisplay(f):null},[f]),R=null!==(d=null!=m?m:null==O?void 0:O.topic)&&void 0!==d?d:"Web Citation",J=null!==(v=null!=h?h:null==O?void 0:O.relevanceScore)&&void 0!==v?v:0,K=null!=j?j:null==O?void 0:O.learnedFrom,Q=null!==(p=null==O?void 0:O.content)&&void 0!==p?p:"",X=null==O?void 0:O.citationUrl,Y=r.getWebCitationImageUrl(f),Z=!!Y,$=!!Q,ee=Z||$,te=N&&!Z;i.useEffect(function(){H(0)},[Q,R,null==f?void 0:f.citationId]);var ie=i.useCallback(function(){B?B():V||G(!1)},[B,V]),ne=i.useCallback(function(){B?B():V||G(!0),ee||N||null==w||w()},[B,V,ee,N,w]),ae=i.useCallback(function(){H(function(e){return Math.min(e+1,Math.max(P-1,0))})},[P]),oe=i.useCallback(function(){H(function(e){return Math.max(e-1,0)})},[]),le=null!=x?x:"Source: Web Citation > ".concat(R),se=function(i){var n=!!S.DocumentTitle,o=n?"".concat(u.default.gptCitationWrapper," ").concat(u.default.gptCitationWrapperWithSource):u.default.gptCitationWrapper;return t.jsxs("div",e.__assign({className:o,style:M.gptWrapper},{children:[t.jsx(a.default,e.__assign({},S,{splitterCustomStyle:!0})),i&&(n?t.jsx("div",e.__assign({className:u.default.gptCitationFooterAction,style:M.gptFooterAction},{children:i})):t.jsx("div",e.__assign({className:u.default.gptCitationToggleFooter,style:M.gptFooterAction},{children:i})))]}))};return C?U?t.jsxs("div",e.__assign({className:u.default.panel,style:M.webPanel},{children:[t.jsxs("div",e.__assign({className:u.default.panelHeader,style:M.webHeader},{children:[t.jsx("span",e.__assign({className:u.default.panelSource},{children:le})),t.jsxs("div",e.__assign({className:u.default.panelHeaderActions},{children:[$&&!te&&P>0&&t.jsxs("div",e.__assign({className:u.default.pagination},{children:[t.jsx("button",e.__assign({type:"button",onClick:oe,disabled:0===A,className:u.default.paginationButton,"aria-label":"Previous highlight"},{children:t.jsx(n.ChevronUp,{size:14})})),t.jsxs("span",e.__assign({className:u.default.paginationLabel},{children:[A+1," / ",P]})),t.jsx("button",e.__assign({type:"button",onClick:ae,disabled:A>=P-1,className:u.default.paginationButton,"aria-label":"Next highlight"},{children:t.jsx(n.ChevronDown,{size:14})}))]})),J>0&&t.jsxs("div",e.__assign({className:u.default.confidenceBadge,title:"Decision strength"},{children:[t.jsx(n.Sparkles,{size:14}),J,"%"]}))]}))]})),t.jsx("div",e.__assign({className:"".concat(u.default.panelContent).concat(te||Z?" ".concat(u.default.panelContentExpanded):""),style:M.webContent},{children:te?t.jsx(g,{}):Z&&Y?t.jsx(o.default,{citationImage:Y,citationUrl:X,showExpandImageButton:k}):$?t.jsx(l.default,{content:Q,activeHighlightIndex:A,onHighlightCountChange:E}):t.jsx(g,{})})),t.jsxs("div",e.__assign({className:u.default.panelFooter,style:M.webFooter},{children:[t.jsx(c,{variant:"gpt",disabled:te,onClick:ie,style:M.webToggleButton}),K&&t.jsxs("span",e.__assign({className:u.default.learnedFrom,style:M.webLearnedFrom},{children:["Learned From ",K]}))]}))]})):t.jsx("div",e.__assign({className:u.default.overlay,style:M.container},{children:se(t.jsx(c,{variant:"web",disabled:N,onClick:ne,title:"View web-based citation for this source.",style:M.gptToggleButton}))})):t.jsx("div",e.__assign({className:u.default.overlay,style:M.container},{children:se()}))};
2
+ //# sourceMappingURL=GptWebCitation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GptWebCitation.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const t=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;t&&e.setAttribute("nonce",t),e.appendChild(document.createTextNode(".GptWebCitation-module_overlay__OY5pa{display:flex;flex-direction:column;font-family:Plus Jakarta Sans,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;width:100%}.GptWebCitation-module_gptCitationWrapper__EN7nk{background-color:#fff;border:solid #e5e7eb;border-radius:8px;border-width:1px 1px 2px;box-shadow:0 1px 2px #0000000d;box-sizing:border-box;display:flex;flex-direction:column;overflow:hidden;position:relative;width:100%}.GptWebCitation-module_gptCitationToggleFooter__ncfLT{align-items:center;background-color:#f2f4f7;border-top:1px solid #e5e7eb;display:flex;flex-shrink:0;padding:1rem 1.5rem}.GptWebCitation-module_gptCitationFooterAction__WWpAY{align-items:center;bottom:0;box-sizing:border-box;display:flex;height:3rem;left:1.5rem;padding:0;pointer-events:none;position:absolute;z-index:2}.GptWebCitation-module_gptCitationFooterAction__WWpAY>*{pointer-events:auto}.GptWebCitation-module_gptCitationWrapperWithSource__1-ynq [class*=modalFooterSource]{justify-content:flex-end!important;padding-left:13rem}.GptWebCitation-module_panel__ek9Lq{background-color:#fff;border:1px solid #e5e7eb;border-radius:8px;box-shadow:0 1px 2px #0000000d;color:#1f2937;display:flex;flex-direction:column;font-family:Plus Jakarta Sans,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;width:100%}.GptWebCitation-module_panelHeader__afwge{align-items:center;background-color:#f9fafb;border-bottom:1px solid #e5e7eb;display:flex;font-size:13px;gap:8px;justify-content:space-between;padding:8px 16px}.GptWebCitation-module_panelSource__oFl-c{color:#374151;flex:1;font-weight:600;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.GptWebCitation-module_panelHeaderActions__sGrhi{align-items:center;display:flex;flex-shrink:0;gap:8px}.GptWebCitation-module_pagination__VQvbY{align-items:center;background-color:#fff;border:1px solid #d1d5db;border-radius:6px;display:flex;gap:2px;padding:2px 4px}.GptWebCitation-module_paginationButton__fzJyQ{align-items:center;background:#0000;border:none;border-radius:4px;color:#6b7280;cursor:pointer;display:flex;justify-content:center;padding:2px}.GptWebCitation-module_paginationButton__fzJyQ:hover:not(:disabled){background-color:#f3f4f6}.GptWebCitation-module_paginationButton__fzJyQ:disabled{cursor:not-allowed;opacity:.4}.GptWebCitation-module_paginationLabel__S7t1W{color:#6b7280;font-size:12px;min-width:36px;padding:0 4px;text-align:center}.GptWebCitation-module_confidenceBadge__4BBTf{align-items:center;background-color:#ecfdf5;border:1px solid #10b981;border-radius:9999px;color:#059669;display:inline-flex;font-size:13px;font-weight:500;gap:4px;padding:4px 10px}.GptWebCitation-module_panelContent__vg-mG{max-height:192px;overflow-y:auto;padding:8px 12px 12px}.GptWebCitation-module_panelContentExpanded__3aGjq{display:flex;flex-direction:column;max-height:none;min-height:384px;overflow:hidden}.GptWebCitation-module_markdownBody__5kdwH{color:#374151;font-size:14px;line-height:1.6}.GptWebCitation-module_markdownBody__5kdwH ol{list-style-type:lower-alpha;margin:0;padding-left:1.25rem}.GptWebCitation-module_markdownBody__5kdwH li{margin-bottom:8px}.GptWebCitation-module_markdownBody__5kdwH code{background-color:#f3f4f6;border-radius:4px;color:#1f2937;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:13px;padding:1px 6px}.GptWebCitation-module_highlight__Xr1wl{background-color:#fef08a;border-radius:2px;color:#1f2937;padding:0 2px}.GptWebCitation-module_highlightActive__iFuz5{background-color:#fde047;border:1px solid #eab308;box-shadow:0 1px 2px #0000001a}.GptWebCitation-module_citationLink__kH9JC{color:#2563eb;font-weight:500;text-decoration:none}.GptWebCitation-module_citationLink__kH9JC:hover{text-decoration:underline}.GptWebCitation-module_citationLinkActive__SShYx{background-color:#fef08a;border:1px solid #eab308;border-radius:2px;color:#1f2937;padding:0 2px}.GptWebCitation-module_panelFooter__wm98C{align-items:center;background-color:#f9fafb;border-top:1px solid #e5e7eb;display:flex;font-size:13px;justify-content:space-between;padding:8px 16px}.GptWebCitation-module_webCitationButton__blI--{align-items:center;background-color:#f9fafb;border:1px solid #e5e7eb;border-radius:8px;color:#2563eb;cursor:pointer;display:inline-flex;font-size:14px;font-weight:700;gap:8px;justify-content:center;line-height:1.25;min-width:180px;padding:6px 16px;transition:background-color .15s ease;white-space:nowrap}.GptWebCitation-module_webCitationButton__blI--:hover:not(:disabled){background-color:#f3f4f6}.GptWebCitation-module_webCitationButton__blI--:disabled{cursor:not-allowed;opacity:.75}.GptWebCitation-module_webCitationButtonIcon__r9lPc{color:#2563eb;flex-shrink:0}.GptWebCitation-module_learnedFrom__DMyLS{color:#6b7280;font-size:13px}.GptWebCitation-module_imageCitationWrapper__iQUSw{box-sizing:border-box;display:flex;flex:1;flex-direction:column;gap:12px;min-height:0;padding:8px 4px;width:100%}.GptWebCitation-module_imageCitationCenter__DMlqn{display:flex;flex:1;justify-content:center;min-height:0;position:relative;width:100%}.GptWebCitation-module_imageCitationViewport__xcotr{height:100%;max-width:100%;min-height:0;position:relative;width:100%}.GptWebCitation-module_imageCitationScrollContainer__bAQNk{background-color:#f9fafb;border:1px solid #e5e7eb;border-radius:12px;height:100%;max-height:100%;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-color:#cbd5e1 #0000;scrollbar-width:thin;width:100%}.GptWebCitation-module_imageCitationScrollContainer__bAQNk::-webkit-scrollbar{width:8px}.GptWebCitation-module_imageCitationScrollContainer__bAQNk::-webkit-scrollbar-thumb{background-color:#cbd5e1;border-radius:9999px}.GptWebCitation-module_imageCitationScrollContainer__bAQNk::-webkit-scrollbar-track{background-color:initial}.GptWebCitation-module_citationImage__7rWdT{background-color:#f9fafb;border:none;border-radius:0;display:block;height:auto;max-width:100%;object-fit:unset;width:100%}.GptWebCitation-module_citationImagePreload__L7ibJ{height:0;opacity:0;pointer-events:none;position:absolute;visibility:hidden;width:0}.GptWebCitation-module_expandImageButton__598k6{align-items:center;background-color:#374151eb;border:none;border-radius:6px;bottom:12px;box-shadow:0 2px 6px #0003;color:#fff;cursor:pointer;display:inline-flex;height:32px;justify-content:center;padding:0;position:absolute;right:12px;transition:background-color .15s ease;width:32px;z-index:2}.GptWebCitation-module_expandImageButton__598k6:hover{background-color:#1f2937}.GptWebCitation-module_expandImageButton__598k6 svg{flex-shrink:0}.GptWebCitation-module_fullScreenOverlay__Z5U8h{align-items:center;backdrop-filter:blur(4px);background-color:#0009;display:flex;inset:0;justify-content:center;overflow:hidden;overscroll-behavior:contain;padding:16px;position:fixed;z-index:1100}.GptWebCitation-module_fullScreenContent__xIXZR{background-color:#fff;border:1px solid #e5e7eb;border-radius:16px;box-shadow:0 25px 50px -12px #00000040;max-height:90vh;max-width:95vw;overflow:hidden;position:relative}.GptWebCitation-module_fullScreenCloseButton__lnaT1{align-items:center;background-color:#374151eb;border:none;border-radius:6px;box-shadow:0 2px 6px #0003;color:#fff;cursor:pointer;display:inline-flex;height:32px;justify-content:center;padding:0;position:absolute;right:16px;top:16px;transition:background-color .15s ease;width:32px;z-index:1}.GptWebCitation-module_fullScreenCloseButton__lnaT1:hover{background-color:#1f2937}.GptWebCitation-module_fullScreenImageWrapper__ADPGU{align-items:flex-start;display:flex;justify-content:center;max-height:80vh;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;padding:8px;scrollbar-color:#cbd5e1 #0000;scrollbar-width:thin;width:100%}.GptWebCitation-module_fullScreenImage__jLVAQ{border-radius:12px;height:auto;max-width:100%;object-fit:unset;width:100%}.GptWebCitation-module_visitLinkRow__H8ai5{align-items:center;display:flex;flex-shrink:0;gap:12px;justify-content:flex-start;padding:4px 8px 0;width:100%}.GptWebCitation-module_visitLinkHint__FAwob{color:#6b7280;font-size:13px;line-height:1.4}.GptWebCitation-module_visitLink__1BDo8{align-items:center;background-color:#2563eb1f;border-radius:6px;color:#2563eb;display:inline-flex;flex-shrink:0;font-size:13px;font-weight:600;gap:6px;padding:6px 12px;text-decoration:none;white-space:nowrap}.GptWebCitation-module_visitLink__1BDo8:hover{background-color:#2563eb2e;text-decoration:none}.GptWebCitation-module_skeleton__1q51h{align-items:center;background-color:#f3f4f6;border-radius:12px;display:flex;justify-content:center;min-height:384px;overflow:hidden;padding:24px;position:relative;width:100%}.GptWebCitation-module_skeletonText__E6XgN{color:#6b7280;font-size:14px;line-height:1.5;max-width:320px;position:relative;text-align:center;z-index:1}.GptWebCitation-module_skeletonShimmer__yqWJh{animation:GptWebCitation-module_shimmer__-ZbQA 1.5s linear infinite;background:linear-gradient(90deg,#0000,#fff9,#0000);inset:0;position:absolute}@keyframes GptWebCitation-module_shimmer__-ZbQA{0%{transform:translateX(-100%)}to{transform:translateX(100%)}}"));const o=document.head||document.getElementsByTagName("head")[0]||document.documentElement;o&&o.appendChild(e)}(),exports.default={overlay:"GptWebCitation-module_overlay__OY5pa",gptCitationWrapper:"GptWebCitation-module_gptCitationWrapper__EN7nk",gptCitationToggleFooter:"GptWebCitation-module_gptCitationToggleFooter__ncfLT",gptCitationFooterAction:"GptWebCitation-module_gptCitationFooterAction__WWpAY",gptCitationWrapperWithSource:"GptWebCitation-module_gptCitationWrapperWithSource__1-ynq",panel:"GptWebCitation-module_panel__ek9Lq",panelHeader:"GptWebCitation-module_panelHeader__afwge",panelSource:"GptWebCitation-module_panelSource__oFl-c",panelHeaderActions:"GptWebCitation-module_panelHeaderActions__sGrhi",pagination:"GptWebCitation-module_pagination__VQvbY",paginationButton:"GptWebCitation-module_paginationButton__fzJyQ",paginationLabel:"GptWebCitation-module_paginationLabel__S7t1W",confidenceBadge:"GptWebCitation-module_confidenceBadge__4BBTf",panelContent:"GptWebCitation-module_panelContent__vg-mG",panelContentExpanded:"GptWebCitation-module_panelContentExpanded__3aGjq",markdownBody:"GptWebCitation-module_markdownBody__5kdwH",highlight:"GptWebCitation-module_highlight__Xr1wl",highlightActive:"GptWebCitation-module_highlightActive__iFuz5",citationLink:"GptWebCitation-module_citationLink__kH9JC",citationLinkActive:"GptWebCitation-module_citationLinkActive__SShYx",panelFooter:"GptWebCitation-module_panelFooter__wm98C",webCitationButton:"GptWebCitation-module_webCitationButton__blI--",webCitationButtonIcon:"GptWebCitation-module_webCitationButtonIcon__r9lPc",learnedFrom:"GptWebCitation-module_learnedFrom__DMyLS",imageCitationWrapper:"GptWebCitation-module_imageCitationWrapper__iQUSw",imageCitationCenter:"GptWebCitation-module_imageCitationCenter__DMlqn",imageCitationViewport:"GptWebCitation-module_imageCitationViewport__xcotr",imageCitationScrollContainer:"GptWebCitation-module_imageCitationScrollContainer__bAQNk",citationImage:"GptWebCitation-module_citationImage__7rWdT",citationImagePreload:"GptWebCitation-module_citationImagePreload__L7ibJ",expandImageButton:"GptWebCitation-module_expandImageButton__598k6",fullScreenOverlay:"GptWebCitation-module_fullScreenOverlay__Z5U8h",fullScreenContent:"GptWebCitation-module_fullScreenContent__xIXZR",fullScreenCloseButton:"GptWebCitation-module_fullScreenCloseButton__lnaT1",fullScreenImageWrapper:"GptWebCitation-module_fullScreenImageWrapper__ADPGU",fullScreenImage:"GptWebCitation-module_fullScreenImage__jLVAQ",visitLinkRow:"GptWebCitation-module_visitLinkRow__H8ai5",visitLinkHint:"GptWebCitation-module_visitLinkHint__FAwob",visitLink:"GptWebCitation-module_visitLink__1BDo8",skeleton:"GptWebCitation-module_skeleton__1q51h",skeletonText:"GptWebCitation-module_skeletonText__E6XgN",skeletonShimmer:"GptWebCitation-module_skeletonShimmer__yqWJh",shimmer:"GptWebCitation-module_shimmer__-ZbQA"};
2
+ //# sourceMappingURL=GptWebCitation.module.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GptWebCitation.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),a=require("react"),t=require("lucide-react"),n=require("./GptWebCitationImageFullScreenView.js"),s=require("./GptWebCitationSkeleton.js"),r=require("./utils/citationData.utils.js"),l=require("./GptWebCitation.module.css.js");exports.default=function(o){var u=o.citationImage,c=o.citationUrl,d=o.showExpandImageButton,g=void 0===d||d,f=a.useState(!1),m=f[0],x=f[1],j=a.useState("loading"),p=j[0],_=j[1];a.useEffect(function(){var e=!0;_("loading"),x(!1);var i=new Image;return i.onload=function(){e&&_("loaded")},i.onerror=function(){e&&_("error")},i.src=u,function(){e=!1,i.onload=null,i.onerror=null}},[u]);var v="loaded"===p,h=r.sanitizeExternalUrl(c);return i.jsxs("div",e.__assign({className:l.default.imageCitationWrapper},{children:[i.jsx("div",e.__assign({className:l.default.imageCitationCenter},{children:v?i.jsxs("div",e.__assign({className:l.default.imageCitationViewport},{children:[i.jsx("div",e.__assign({className:l.default.imageCitationScrollContainer},{children:i.jsx("img",{src:u,alt:"Web citation snapshot",className:l.default.citationImage})})),g&&i.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),x(!0)},className:l.default.expandImageButton,"aria-label":"View citation image in full screen",title:"Expand image"},{children:i.jsx(t.Maximize2,{size:16,strokeWidth:2})}))]})):i.jsx(s.default,{})})),h&&i.jsxs("div",e.__assign({className:l.default.visitLinkRow},{children:[i.jsx("span",e.__assign({className:l.default.visitLinkHint},{children:"Open link in new tab to read in detail"})),i.jsxs("a",e.__assign({href:h,target:"_blank",rel:"noreferrer",className:l.default.visitLink},{children:["Visit Link",i.jsx(t.SquareArrowOutUpRight,{size:16})]}))]})),m&&v&&i.jsx(n.default,{src:u,onClose:function(){return x(!1)}})]}))};
2
+ //# sourceMappingURL=GptWebCitationImageCitation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GptWebCitationImageCitation.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),r=require("react/jsx-runtime"),t=require("react"),l=require("react-dom"),o=require("lucide-react"),s=require("./GptWebCitation.module.css.js"),a=function(e){return e.stopPropagation()},n=function(e){e.stopPropagation()};exports.default=function(i){var u=i.src,c=i.onClose;return t.useEffect(function(){var e=document.body.style.overflow;return document.body.style.overflow="hidden",function(){document.body.style.overflow=e}},[]),l.createPortal(r.jsx("div",e.__assign({role:"dialog","aria-modal":"true",className:s.default.fullScreenOverlay,onClick:c,onWheel:n},{children:r.jsxs("div",e.__assign({className:s.default.fullScreenContent,onClick:a},{children:[r.jsx("button",e.__assign({type:"button",onClick:c,className:s.default.fullScreenCloseButton,"aria-label":"Close full screen view"},{children:r.jsx(o.X,{size:18,strokeWidth:2})})),r.jsx("div",e.__assign({className:s.default.fullScreenImageWrapper},{children:r.jsx("img",{src:u,alt:"Citation full view",className:s.default.fullScreenImage})}))]}))})),document.body)};
2
+ //# sourceMappingURL=GptWebCitationImageFullScreenView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GptWebCitationImageFullScreenView.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),r=require("react/jsx-runtime"),n=require("react"),t=require("react-markdown"),i=require("rehype-raw"),l=require("./utils/citationData.utils.js"),c=require("./GptWebCitation.module.css.js");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=a(t),u=a(i);exports.default=function(t){var i=t.content,a=t.activeHighlightIndex,o=t.onHighlightCountChange,h=n.useRef(null),d=n.useMemo(function(){var e,r=i.match(/id=["']highlighted-\d+["']/g);if(null==r?void 0:r.length)return r.length;var n=i.match(/<a\b[^>]*>/gi);return null!==(e=null==n?void 0:n.length)&&void 0!==e?e:0},[i]),f=n.useMemo(function(){return/id=["']highlighted-\d+["']/.test(i)},[i]);n.useEffect(function(){null==o||o(d)},[d,o]),n.useEffect(function(){var e;if(h.current){var r=h.current.querySelector("#highlighted-".concat(a));if(r)r.scrollIntoView({behavior:"smooth",block:"center"});else null===(e=h.current.querySelectorAll("a[href]")[a])||void 0===e||e.scrollIntoView({behavior:"smooth",block:"center"})}},[a,i]);var g=n.useMemo(function(){var n=-1;return{span:function(n){n.node;var t=e.__rest(n,["node"]),i=t.id;if(null==i?void 0:i.startsWith("highlighted-")){var l=Number(i.replace("highlighted-",""))===a;return r.jsx("span",e.__assign({},t,{id:i,className:"".concat(c.default.highlight).concat(l?" ".concat(c.default.highlightActive):"")}))}return r.jsx("span",e.__assign({},t))},a:function(t){var i,s=t.children,u=t.href,o=t.title,h=t.className;if(!u)return r.jsx(r.Fragment,{children:s});n+=1;var d=!f&&n===a,g=null!==(i=l.sanitizeExternalUrl(u))&&void 0!==i?i:"#";return r.jsx("a",e.__assign({href:g,title:o,target:"_blank",rel:"noreferrer",className:"".concat(c.default.citationLink).concat(d?" ".concat(c.default.citationLinkActive):"").concat(h?" ".concat(h):"")},{children:s}))},code:function(n){var t=n.children,i=e.__rest(n,["children"]);return r.jsx("code",e.__assign({},i,{children:t}))},ol:function(n){var t=n.children,i=e.__rest(n,["children"]);return r.jsx("ol",e.__assign({},i,{children:t}))},ul:function(n){var t=n.children,i=e.__rest(n,["children"]);return r.jsx("ul",e.__assign({},i,{children:t}))},li:function(n){var t=n.children,i=e.__rest(n,["children"]);return r.jsx("li",e.__assign({},i,{children:t}))},p:function(n){var t=n.children,i=e.__rest(n,["children"]);return r.jsx("p",e.__assign({},i,{children:t}))}}},[a,f,i]);return r.jsx("div",e.__assign({ref:h,className:c.default.markdownBody},{children:r.jsx(s.default,e.__assign({rehypePlugins:[u.default],components:g},{children:i}))}))};
2
+ //# sourceMappingURL=GptWebCitationMarkdown.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GptWebCitationMarkdown.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),s=require("react/jsx-runtime"),t=require("./GptWebCitation.module.css.js");exports.default=function(){return s.jsxs("div",e.__assign({className:t.default.skeleton},{children:[s.jsx("span",e.__assign({className:t.default.skeletonText},{children:"Loading a snapshot of citation from source website..."})),s.jsx("div",{className:t.default.skeletonShimmer})]}))};
2
+ //# sourceMappingURL=GptWebCitationSkeleton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GptWebCitationSkeleton.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=function(t){return t?t.replace(/\\"/g,'"').replace(/\\'/g,"'").trim():""},e=function(t){if(null==t?void 0:t.trim()){var e=t.trim();if(!/^(javascript|data|vbscript):/i.test(e))try{var r=new URL(e);if("http:"===r.protocol||"https:"===r.protocol)return e}catch(t){if(e.startsWith("gs://"))return e}}},r=function(e){if(e)for(var r=t(e),i=0,a=[/decision strength is\s+([\d.]+)\s*%/i,/relevance score is\s+([\d.]+)\s*%/i,/confidence(?:\s+score)?(?:\s+is)?\s+([\d.]+)\s*%/i];i<a.length;i++){var n=a[i],o=r.match(n);if(null==o?void 0:o[1]){var c=Number(o[1]);if(!Number.isNaN(c))return c}}},i=function(e){if(e){var r=t(e).match(/<a\b[^>]*>(.*?)<\/a>/i);if(null==r?void 0:r[1]){var i=r[1].replace(/<[^>]*>?/gm,"").trim();if(i)return i}}},a=function(t){if(t)try{var e=new URL(t).hostname.replace(/^www\./i,""),r=e.split(".");if(r.length<2)return e;var i=r[r.length-2];return i.charAt(0).toUpperCase()+i.slice(1)}catch(t){return}},n=function(t){var r,i,a,n=e(null===(r=null==t?void 0:t.imageMetadata)||void 0===r?void 0:r.signed_url);if(n)return n;var o=null===(a=null===(i=null==t?void 0:t.imageMetadata)||void 0===i?void 0:i.gs_uri)||void 0===a?void 0:a.trim();return(null==o?void 0:o.startsWith("gs://"))?o:void 0};exports.extractLearnedFromUrl=a,exports.extractRelevanceScoreFromContent=r,exports.extractTopicFromContent=i,exports.getWebCitationImageUrl=n,exports.mapCitationDataToDisplay=function(o){var c,l,s=t(o.content);return{citationId:o.citationId,content:s,citationType:o.citationType,citationUrl:e(o.citationUrl),topic:null!==(c=i(s))&&void 0!==c?c:"Web Citation",relevanceScore:null!==(l=r(s))&&void 0!==l?l:0,learnedFrom:a(o.citationUrl),web_citation_gcs_url:n(o),userId:o.userId,userName:o.userName,userEmail:o.userEmail,db:o.db,imageMetadata:o.imageMetadata}},exports.sanitizeExternalUrl=e;
2
+ //# sourceMappingURL=citationData.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"citationData.utils.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),l=require("react/jsx-runtime"),i=require("react"),s=require("../components/CitationAIConfidenceDisplay.js"),n=require("../AiReasoning/components/icons/FullScreenIcon.js"),a=require("./components/ImagePreviewDialog.js"),t=require("@mui/material"),r=require("./WebCitationWithImageContent.module.css.js");exports.default=function(o){var d,c,u,g,v,f,m,h=null===(d=null==o?void 0:o.closeCitationConfig)||void 0===d?void 0:d.CloseIcon,C=o.visitIcon,j=i.useState(!1),p=j[0],x=j[1],_=null===(c=null==o?void 0:o.cachingConfig)||void 0===c?void 0:c.queryClient,y=o.styles,N=["getSignedUrl",o.gsUtilPath||""],I=null!==(g=null===(u=o.cachingConfig)||void 0===u?void 0:u.useGetSignedUrlQuery)&&void 0!==g?g:function(){return{data:void 0}},P=null!==(f=null===(v=o.cachingConfig)||void 0===v?void 0:v.useGetSignedUrlMutation)&&void 0!==f?f:function(){return{mutate:function(e){},isPending:!1}},U=I((null==o?void 0:o.gsUtilPath)||"",N).data,S=P((null==o?void 0:o.gsUtilPath)||""),k=S.mutate,D=S.isPending;return i.useEffect(function(){o.signedUrl||o.gsUtilPath&&(((null==_?void 0:_.getQueryData)?_.getQueryData(N):void 0)||k({gsUtilPath:o.gsUtilPath}))},[o.gsUtilPath,o.signedUrl,_,k]),l.jsxs("div",e.__assign({className:r.default.container,style:null==y?void 0:y.container},{children:[l.jsxs("div",e.__assign({className:r.default.header,style:null==y?void 0:y.header},{children:[l.jsx("div",e.__assign({className:r.default.headerLeft,style:null==y?void 0:y.headerLeft},{children:l.jsx("a",e.__assign({className:r.default.link,target:"_blank",rel:"noopener noreferrer",href:o.url},{children:o.label}))})),(null==o?void 0:o.closeCitationConfig)?l.jsxs("div",e.__assign({className:r.default.headerActions,style:null==y?void 0:y.headerActions},{children:[s.renderCitationAIConfidenceDisplay(o.relevanceScore,!1,null==y?void 0:y.aiConfidenceDisplayPill),l.jsx("div",{className:r.default.divider,style:null==y?void 0:y.divider}),h&&l.jsx("div",e.__assign({className:r.default.closeIconWrapper,style:null==y?void 0:y.closeIconWrapper,onClick:o.closeCitationConfig.handleCloseCitationPreview},{children:l.jsx(h,{className:r.default.closeIcon})}))]})):l.jsx(l.Fragment,{children:s.renderCitationAIConfidenceDisplay(o.relevanceScore,!0,null==y?void 0:y.aiConfidenceDisplayPill)})]})),o.signedUrl?l.jsxs("div",e.__assign({className:r.default.imageWrapper,style:null==y?void 0:y.imageWrapper},{children:[l.jsx("img",{src:o.signedUrl,alt:"images",className:r.default.image,style:null==y?void 0:y.image}),l.jsx("div",e.__assign({className:r.default.fullScreenButton,style:null==y?void 0:y.fullScreenButton,onClick:function(){return x(!0)}},{children:l.jsx(n.default,{})})),l.jsx(a.default,{open:p,handleClose:function(){return x(!1)},src:o.signedUrl,CloseIcon:o.PreviewDialogCloseIcon,styles:null===(m=o.styles)||void 0===m?void 0:m.previewDialogStyles})]})):D?l.jsxs("div",e.__assign({className:r.default.loaderContainer},{children:[l.jsx("style",{children:".mui-circular-progress-circle { stroke-linecap: round; }"}),l.jsx(t.CircularProgress,{size:48,thickness:4,style:{color:"#4F85FF"},classes:{circle:"mui-circular-progress-circle"}}),l.jsx("span",e.__assign({className:r.default.loaderText,style:null==y?void 0:y.loaderText},{children:"Loading Image..."}))]})):U&&l.jsxs("div",e.__assign({className:r.default.imageWrapper},{children:[l.jsx("img",{src:U,alt:"images",className:r.default.image,style:null==y?void 0:y.image}),l.jsx("div",e.__assign({className:r.default.fullScreenButton,style:null==y?void 0:y.fullScreenButton,onClick:function(){return x(!0)}},{children:l.jsx(n.default,{})})),l.jsx(a.default,{open:p,handleClose:function(){return x(!1)},src:U,CloseIcon:o.PreviewDialogCloseIcon,styles:null==y?void 0:y.previewDialogStyles})]})),l.jsx("div",e.__assign({className:r.default.footer,style:null==y?void 0:y.footer},{children:l.jsxs("div",e.__assign({className:r.default.footerContent,style:null==y?void 0:y.footerContent},{children:[l.jsx("span",{children:"Open link in new tab to read in detail"}),l.jsxs("a",e.__assign({className:r.default.visitLink,style:null==y?void 0:y.visitLink,href:o.url,target:"_blank",rel:"noopener noreferrer"},{children:[l.jsx("span",{children:"Visit Link"}),l.jsx(C,{className:r.default.visitIcon})]}))]}))}))]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),l=require("react/jsx-runtime"),i=require("react"),s=require("../components/CitationAIConfidenceDisplay.js"),n=require("../AiReasoning/components/icons/FullScreenIcon.js"),a=require("./components/ImagePreviewDialog.js"),t=require("@mui/material"),r=require("./WebCitationWithImageContent.module.css.js");exports.default=function(o){var d,c,u,g,v,f,m,h=null===(d=null==o?void 0:o.closeCitationConfig)||void 0===d?void 0:d.CloseIcon,C=o.visitIcon,j=i.useState(!1),_=j[0],p=j[1],x=null===(c=null==o?void 0:o.cachingConfig)||void 0===c?void 0:c.queryClient,y=o.styles,N=["getSignedUrl",o.gsUtilPath||""],I=null!==(g=null===(u=o.cachingConfig)||void 0===u?void 0:u.useGetSignedUrlQuery)&&void 0!==g?g:function(){return{data:void 0}},P=null!==(f=null===(v=o.cachingConfig)||void 0===v?void 0:v.useGetSignedUrlMutation)&&void 0!==f?f:function(){return{mutate:function(e){},isPending:!1}},U=I((null==o?void 0:o.gsUtilPath)||"",N).data,S=P((null==o?void 0:o.gsUtilPath)||""),k=S.mutate,D=S.isPending;return i.useEffect(function(){o.signedUrl||o.gsUtilPath&&(((null==x?void 0:x.getQueryData)?x.getQueryData(N):void 0)||k({gsUtilPath:o.gsUtilPath}))},[o.gsUtilPath,o.signedUrl,x,k]),l.jsxs("div",e.__assign({className:r.default.container,style:null==y?void 0:y.container},{children:[l.jsxs("div",e.__assign({className:r.default.header,style:null==y?void 0:y.header},{children:[l.jsx("div",e.__assign({className:r.default.headerLeft,style:null==y?void 0:y.headerLeft},{children:l.jsx("a",e.__assign({className:r.default.link,target:"_blank",rel:"noopener noreferrer",href:o.url},{children:o.label}))})),(null==o?void 0:o.closeCitationConfig)?l.jsxs("div",e.__assign({className:r.default.headerActions,style:null==y?void 0:y.headerActions},{children:[s.renderCitationAIConfidenceDisplay(o.relevanceScore,!1,null==y?void 0:y.aiConfidenceDisplayPill),l.jsx("div",{className:r.default.divider,style:null==y?void 0:y.divider}),h&&l.jsx("div",e.__assign({className:r.default.closeIconWrapper,style:null==y?void 0:y.closeIconWrapper,onClick:o.closeCitationConfig.handleCloseCitationPreview},{children:l.jsx(h,{className:r.default.closeIcon})}))]})):l.jsx(l.Fragment,{children:s.renderCitationAIConfidenceDisplay(o.relevanceScore,!0,null==y?void 0:y.aiConfidenceDisplayPill)})]})),o.signedUrl?l.jsxs("div",e.__assign({className:r.default.imageWrapper,style:null==y?void 0:y.imageWrapper},{children:[l.jsx("img",{src:o.signedUrl,alt:"images",className:r.default.image,style:null==y?void 0:y.image}),l.jsx("div",e.__assign({className:r.default.fullScreenButton,style:null==y?void 0:y.fullScreenButton,onClick:function(){return p(!0)}},{children:l.jsx(n.default,{})})),l.jsx(a.default,{open:_,handleClose:function(){return p(!1)},src:o.signedUrl,CloseIcon:o.PreviewDialogCloseIcon,styles:null===(m=o.styles)||void 0===m?void 0:m.previewDialogStyles})]})):D?l.jsxs("div",e.__assign({className:r.default.loaderContainer},{children:[l.jsx("style",{children:".mui-circular-progress-circle { stroke-linecap: round; }"}),l.jsx(t.CircularProgress,{size:48,thickness:4,style:{color:"#4F85FF"},classes:{circle:"mui-circular-progress-circle"}}),l.jsx("span",e.__assign({className:r.default.loaderText,style:null==y?void 0:y.loaderText},{children:"Loading Image..."}))]})):U&&l.jsxs("div",e.__assign({className:r.default.imageWrapper},{children:[l.jsx("img",{src:U,alt:"images",className:r.default.image,style:null==y?void 0:y.image}),l.jsx("div",e.__assign({className:r.default.fullScreenButton,style:null==y?void 0:y.fullScreenButton,onClick:function(){return p(!0)}},{children:l.jsx(n.default,{})})),l.jsx(a.default,{open:_,handleClose:function(){return p(!1)},src:U,CloseIcon:o.PreviewDialogCloseIcon,styles:null==y?void 0:y.previewDialogStyles})]})),l.jsx("div",e.__assign({className:r.default.footer,style:null==y?void 0:y.footer},{children:l.jsxs("div",e.__assign({className:r.default.footerContent,style:null==y?void 0:y.footerContent},{children:[l.jsx("span",{children:"Open link in new tab to read in detail"}),l.jsxs("a",e.__assign({className:r.default.visitLink,style:null==y?void 0:y.visitLink,href:o.url,target:"_blank",rel:"noopener noreferrer"},{children:["Visit Link",l.jsx(C,{className:r.default.visitIcon})]}))]}))}))]}))};
2
2
  //# sourceMappingURL=WebCitationWithImageContent.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const t=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;t&&e.setAttribute("nonce",t),e.appendChild(document.createTextNode(".WebCitationWithImageContent-module_container__0caP3{border:1px solid #e5e7eb;display:flex;flex-direction:column;gap:1rem;height:100%;min-height:200px;position:relative}.WebCitationWithImageContent-module_header__yd-ED{align-items:center;border-bottom:1px solid #e5e7eb;display:flex;flex-direction:row;justify-content:space-between;padding:.5rem 1rem;width:100%}.WebCitationWithImageContent-module_headerLeft__vemHH{align-items:center;display:flex;flex-direction:row;gap:.5rem}.WebCitationWithImageContent-module_link__9am5l{color:#1f2937;font-weight:600;text-decoration-color:#1f2937;text-decoration:none}.WebCitationWithImageContent-module_headerActions__pinS2{align-items:center;display:flex;flex-direction:row;gap:1rem;justify-content:space-between}.WebCitationWithImageContent-module_divider__OR-bP{align-self:stretch;background-color:#e5e7eb;margin-bottom:-.5rem;margin-top:-.5rem;width:1px}.WebCitationWithImageContent-module_closeIconWrapper__D6HHj{cursor:pointer}.WebCitationWithImageContent-module_closeIcon__CDrjR{color:#6b7280;height:1.5rem;width:1.5rem}.WebCitationWithImageContent-module_imageWrapper__Zk2jF{padding-left:.75rem;padding-right:.75rem;position:relative}.WebCitationWithImageContent-module_image__KJMJS{border:1px solid #e5e7eb;border-radius:8px;width:100%}.WebCitationWithImageContent-module_fullScreenButton__JH8MC{background-color:#f9fafb;border:1px solid #d0d5dd;border-radius:8px;bottom:.5rem;cursor:pointer;padding:.5rem;position:absolute;right:1.25rem}.WebCitationWithImageContent-module_loaderContainer__9UQBM{align-items:center;display:flex;flex-direction:column;justify-content:center;min-height:400px}.WebCitationWithImageContent-module_loaderText__fqlg2{color:#4b5563;font-size:.875rem;font-weight:500;margin-top:.5rem}.WebCitationWithImageContent-module_footer__7-3Et{align-items:center;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;padding-bottom:1rem;width:100%}.WebCitationWithImageContent-module_footerContent__U60cY{align-items:center;color:#000;display:flex;flex-direction:row;gap:.5rem;padding-left:.75rem}.WebCitationWithImageContent-module_visitLink__YiGQo{align-items:center;background-color:#eee9fd;border-radius:8px;color:#5928ed;display:flex;flex-direction:row;gap:.5rem;padding:.25rem .5rem;text-decoration:none;width:fit-content}.WebCitationWithImageContent-module_visitIcon__FjN9-{color:#5928ed;height:1rem;width:1rem}"));const o=document.head||document.getElementsByTagName("head")[0]||document.documentElement;o&&o.appendChild(e)}(),exports.default={container:"WebCitationWithImageContent-module_container__0caP3",header:"WebCitationWithImageContent-module_header__yd-ED",headerLeft:"WebCitationWithImageContent-module_headerLeft__vemHH",link:"WebCitationWithImageContent-module_link__9am5l",headerActions:"WebCitationWithImageContent-module_headerActions__pinS2",divider:"WebCitationWithImageContent-module_divider__OR-bP",closeIconWrapper:"WebCitationWithImageContent-module_closeIconWrapper__D6HHj",closeIcon:"WebCitationWithImageContent-module_closeIcon__CDrjR",imageWrapper:"WebCitationWithImageContent-module_imageWrapper__Zk2jF",image:"WebCitationWithImageContent-module_image__KJMJS",fullScreenButton:"WebCitationWithImageContent-module_fullScreenButton__JH8MC",loaderContainer:"WebCitationWithImageContent-module_loaderContainer__9UQBM",loaderText:"WebCitationWithImageContent-module_loaderText__fqlg2",footer:"WebCitationWithImageContent-module_footer__7-3Et",footerContent:"WebCitationWithImageContent-module_footerContent__U60cY",visitLink:"WebCitationWithImageContent-module_visitLink__YiGQo",visitIcon:"WebCitationWithImageContent-module_visitIcon__FjN9-"};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const t=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;t&&e.setAttribute("nonce",t),e.appendChild(document.createTextNode(".WebCitationWithImageContent-module_container__0caP3{border:1px solid #e5e7eb;display:flex;flex-direction:column;gap:1rem;height:100%;min-height:200px;position:relative}.WebCitationWithImageContent-module_header__yd-ED{align-items:center;border-bottom:1px solid #e5e7eb;display:flex;flex-direction:row;justify-content:space-between;padding:.5rem 1rem;width:100%}.WebCitationWithImageContent-module_headerLeft__vemHH{align-items:center;display:flex;flex-direction:row;gap:.5rem}.WebCitationWithImageContent-module_link__9am5l{color:#1f2937;font-weight:600;text-decoration-color:#1f2937;text-decoration:none}.WebCitationWithImageContent-module_headerActions__pinS2{align-items:center;display:flex;flex-direction:row;gap:1rem;justify-content:space-between}.WebCitationWithImageContent-module_divider__OR-bP{align-self:stretch;background-color:#e5e7eb;margin-bottom:-.5rem;margin-top:-.5rem;width:1px}.WebCitationWithImageContent-module_closeIconWrapper__D6HHj{cursor:pointer}.WebCitationWithImageContent-module_closeIcon__CDrjR{color:#6b7280;height:1.5rem;width:1.5rem}.WebCitationWithImageContent-module_imageWrapper__Zk2jF{padding-left:.75rem;padding-right:.75rem;position:relative}.WebCitationWithImageContent-module_image__KJMJS{border:1px solid #e5e7eb;border-radius:8px;width:100%}.WebCitationWithImageContent-module_fullScreenButton__JH8MC{background-color:#f9fafb;border:1px solid #d0d5dd;border-radius:8px;bottom:.5rem;cursor:pointer;padding:.5rem;position:absolute;right:1.25rem}.WebCitationWithImageContent-module_loaderContainer__9UQBM{align-items:center;display:flex;flex-direction:column;justify-content:center;min-height:400px}.WebCitationWithImageContent-module_loaderText__fqlg2{color:#4b5563;font-size:.875rem;font-weight:500;margin-top:.5rem}.WebCitationWithImageContent-module_footer__7-3Et{box-sizing:border-box;flex-shrink:0;padding:4px 12px 12px;width:100%}.WebCitationWithImageContent-module_footerContent__U60cY{align-items:center;display:flex;flex-direction:row;gap:12px;justify-content:flex-start;width:100%}.WebCitationWithImageContent-module_footerContent__U60cY>span{color:#6b7280;font-size:13px;line-height:1.4}.WebCitationWithImageContent-module_visitLink__YiGQo{align-items:center;background-color:#2563eb1f;border-radius:6px;color:#2563eb;display:inline-flex;flex-shrink:0;font-size:13px;font-weight:600;gap:6px;padding:6px 12px;text-decoration:none;white-space:nowrap}.WebCitationWithImageContent-module_visitLink__YiGQo:hover{background-color:#2563eb2e;text-decoration:none}.WebCitationWithImageContent-module_visitIcon__FjN9-{color:#2563eb;flex-shrink:0;height:1rem;width:1rem}"));const o=document.head||document.getElementsByTagName("head")[0]||document.documentElement;o&&o.appendChild(e)}(),exports.default={container:"WebCitationWithImageContent-module_container__0caP3",header:"WebCitationWithImageContent-module_header__yd-ED",headerLeft:"WebCitationWithImageContent-module_headerLeft__vemHH",link:"WebCitationWithImageContent-module_link__9am5l",headerActions:"WebCitationWithImageContent-module_headerActions__pinS2",divider:"WebCitationWithImageContent-module_divider__OR-bP",closeIconWrapper:"WebCitationWithImageContent-module_closeIconWrapper__D6HHj",closeIcon:"WebCitationWithImageContent-module_closeIcon__CDrjR",imageWrapper:"WebCitationWithImageContent-module_imageWrapper__Zk2jF",image:"WebCitationWithImageContent-module_image__KJMJS",fullScreenButton:"WebCitationWithImageContent-module_fullScreenButton__JH8MC",loaderContainer:"WebCitationWithImageContent-module_loaderContainer__9UQBM",loaderText:"WebCitationWithImageContent-module_loaderText__fqlg2",footer:"WebCitationWithImageContent-module_footer__7-3Et",footerContent:"WebCitationWithImageContent-module_footerContent__U60cY",visitLink:"WebCitationWithImageContent-module_visitLink__YiGQo",visitIcon:"WebCitationWithImageContent-module_visitIcon__FjN9-"};
2
2
  //# sourceMappingURL=WebCitationWithImageContent.module.css.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"),n=require("./features/Bookemon/Bookemon.js"),o=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"),m=require("./features/MarkdownWithImageCitation/MarkdownWithImageCitation.js"),c=require("./features/RequirementAiCitations/AiReasoning/AiReasoningCitation.js"),R=require("./features/TableCitation/TableCitationContent.js"),I=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"),_=require("./features/ManageRemainders/ManageReminders.js");exports.CodeCitation=e.default,exports.ProjectAccordian=t.default,exports.BookCitation=i.default,exports.Bookemon=n.default,exports.PdfCitation=o.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=m.default,exports.AiReasoningCitation=c.default,exports.TableCitationContent=R.default,exports.CitationsViewer=I.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,exports.ManageReminders=_.ManageReminders;
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"),r=require("./features/Bookemon/Bookemon.js"),o=require("./features/PdfEditorCitation/PdfEditorCitation.js"),a=require("./features/CitationRenderer/CitationRenderer.js"),n=require("./features/CitationRenderer/MarkdownRenderer.js"),s=require("./features/CodeCitation/_components/CodeEditor.js"),C=require("./features/PaginatedTable/PaginatedTable.js"),u=require("./features/CognitiveInternalgptReasoning/CognitiveInternalgptReasoningComponent.js"),p=require("./features/ChatCitation/ChatCitationRenderer.js"),d=require("./features/CognitiveDecisioning/CognitiveDecisioningWrapper.js"),f=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"),m=require("./features/RequirementAiCitations/FileCitation/FileCitationContent.js"),c=require("./features/RequirementAiCitations/WebCitation/WebCitationWithImageContent.js"),q=require("./features/MarkdownWithImageCitation/MarkdownWithImageCitation.js"),j=require("./features/RequirementAiCitations/AiReasoning/AiReasoningCitation.js"),R=require("./features/TableCitation/TableCitationContent.js"),I=require("./features/CitationViewer/CitationsViewer.js"),T=require("./features/ExcelCitation/ExcelCitations.js"),S=require("./features/ScannedDocCitation/ScannedDocCitation.js"),D=require("./features/ChatDrawer/ChatDrawer.js"),E=require("./features/ChatDrawer/constants/ChatDrawer.js"),b=require("./features/SplitterCitations/SplitterCitationsComponent.js"),A=require("./features/CognitiveCompare/CognitiveCompare.js"),v=require("./features/CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.js"),P=require("./features/TextualGuidelines/TextualGuideLinesComponent.js"),w=require("./features/IngestionStatus/IngestionStatusComponent.js"),W=require("./features/ManageRemainders/ManageReminders.js"),h=require("./features/GptWebCitation/GptWebCitation.js"),_=require("./features/GptWebCitation/utils/citationData.utils.js");exports.CodeCitation=e.default,exports.ProjectAccordian=t.default,exports.BookCitation=i.default,exports.Bookemon=r.default,exports.PdfCitation=o.PdfEditorCitation,exports.CitationRenderer=a.default,exports.MarkdownRenderer=n.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=p.default,exports.CognitiveDecisioningCard=d.default,exports.PdfViewer=f.default,exports.FaqCitation=l.default,exports.ImageCitationContent=g.default,exports.VideoCitationContent=x.default,exports.FileCitationContent=m.default,exports.WebCitationWithImageContent=c.default,exports.MarkdownWithImageCitation=q.default,exports.AiReasoningCitation=j.default,exports.TableCitationContent=R.default,exports.CitationsViewer=I.default,exports.ExcelCitation=T.default,exports.ScannedDocCitation=S.default,exports.ChatDrawer=D.default,exports.FILE_INGESTION_STATUS=E.FILE_INGESTION_STATUS,exports.SUMMARY_EXPAND_HEIGHT_NUDGE=E.SUMMARY_EXPAND_HEIGHT_NUDGE,exports.TRUNCATE_THRESHOLD=E.TRUNCATE_THRESHOLD,exports.SplitterCitationsComponent=b.default,exports.CognitiveCompare=A.default,exports.CognitiveInternalgptCoreComponent=v.default,exports.TextualGuideLinesComponent=P.default,exports.IngestionStatusChip=w.IngestionStatusChip,exports.IngestionStatusComponent=w.IngestionStatusComponent,exports.ManageReminders=W.ManageReminders,exports.GptWebCitation=h.default,exports.extractLearnedFromUrl=_.extractLearnedFromUrl,exports.extractRelevanceScoreFromContent=_.extractRelevanceScoreFromContent,exports.extractTopicFromContent=_.extractTopicFromContent,exports.getWebCitationImageUrl=_.getWebCitationImageUrl,exports.mapCitationDataToDisplay=_.mapCitationDataToDisplay,exports.sanitizeExternalUrl=_.sanitizeExternalUrl;
2
2
  //# sourceMappingURL=index.js.map