@e-llm-studio/requirement-ai 0.0.351-alpha.0 → 0.0.352
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/Editor.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/InitialHtml.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/InsertNode.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/ManualNode.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/UpdateNode.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/RichTextEditor.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationAnchor.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/UserStoryCard.js +1 -1
- package/dist/cjs/features/RequirementAI/components/ai-reasoning/AiReasonMarkdownWrapper.js +1 -1
- package/dist/cjs/features/RequirementAI/components/ai-reasoning/AiReasoningCitationContent.js +1 -1
- package/dist/cjs/features/RequirementAI/components/ai-reasoning/AiReasoningCitationContent.module.css.js +1 -1
- package/dist/cjs/features/RequirementAI/components/ai-reasoning/CitationPdfRendererWrapper.js +2 -0
- package/dist/cjs/features/RequirementAI/components/ai-reasoning/CitationPdfRendererWrapper.js.map +1 -0
- package/dist/cjs/features/RequirementAI/components/ai-reasoning/CitationPdfViewer.js +2 -0
- package/dist/cjs/features/RequirementAI/components/ai-reasoning/CitationPdfViewer.js.map +1 -0
- package/dist/cjs/features/RequirementAI/components/ai-reasoning/pdfCitationUtils.js +2 -0
- package/dist/cjs/features/RequirementAI/components/ai-reasoning/pdfCitationUtils.js.map +1 -0
- package/dist/cjs/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/service/redlineService.js +1 -1
- package/dist/cjs/utils/tagHelper.js +1 -1
- package/dist/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/Editor.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/InitialHtml.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/InsertNode.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/ManualNode.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/UpdateNode.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/RichTextEditor.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationAnchor.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/UserStoryCard.js +1 -1
- package/dist/features/RequirementAI/components/ai-reasoning/AiReasonMarkdownWrapper.js +1 -1
- package/dist/features/RequirementAI/components/ai-reasoning/AiReasoningCitationContent.js +1 -1
- package/dist/features/RequirementAI/components/ai-reasoning/AiReasoningCitationContent.module.css.js +1 -1
- package/dist/features/RequirementAI/components/ai-reasoning/CitationPdfRendererWrapper.js +2 -0
- package/dist/features/RequirementAI/components/ai-reasoning/CitationPdfRendererWrapper.js.map +1 -0
- package/dist/features/RequirementAI/components/ai-reasoning/CitationPdfViewer.js +2 -0
- package/dist/features/RequirementAI/components/ai-reasoning/CitationPdfViewer.js.map +1 -0
- package/dist/features/RequirementAI/components/ai-reasoning/pdfCitationUtils.js +2 -0
- package/dist/features/RequirementAI/components/ai-reasoning/pdfCitationUtils.js.map +1 -0
- package/dist/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.js +1 -1
- package/dist/index.js +1 -1
- package/dist/service/redlineService.js +1 -1
- package/dist/types/src/RedlineEditorTest.d.ts.map +1 -1
- package/dist/types/src/RequirementAiTest.d.ts +0 -6
- package/dist/types/src/RequirementAiTest.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.d.ts +2 -33
- package/dist/types/src/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/Editor.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/InitialHtml.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/InsertNode.d.ts +1 -3
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/InsertNode.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/ManualNode.d.ts +0 -2
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/ManualNode.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/UpdateNode.d.ts +1 -5
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/UpdateNode.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/RichTextEditor.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationAnchor.d.ts +0 -3
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationAnchor.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.d.ts +0 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/ManualEditPopup.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/UserStoryCard.d.ts +2 -23
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/UserStoryCard.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/ai-reasoning/AiReasonMarkdownWrapper.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/ai-reasoning/AiReasoningCitationContent.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/interfaces/citation.interface.d.ts +0 -52
- package/dist/types/src/features/RequirementAI/interfaces/citation.interface.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/types/aiReasoning.type.d.ts +2 -4
- package/dist/types/src/features/RequirementAI/types/aiReasoning.type.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -3
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/service/redlineService.d.ts +0 -61
- package/dist/types/src/service/redlineService.d.ts.map +1 -1
- package/dist/types/src/utils/tagHelper.d.ts +0 -9
- package/dist/types/src/utils/tagHelper.d.ts.map +1 -1
- package/dist/utils/tagHelper.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/constants/updateTags.js +0 -2
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/constants/updateTags.js.map +0 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/codeBlockSerialization.js +0 -2
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/codeBlockSerialization.js.map +0 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/markdownTableSerialization.js +0 -2
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/markdownTableSerialization.js.map +0 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/normalizeRedlineMarkdown.js +0 -2
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/normalizeRedlineMarkdown.js.map +0 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownEmphasis.js +0 -2
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownEmphasis.js.map +0 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownEscapes.js +0 -2
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownEscapes.js.map +0 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownLineBreaks.js +0 -2
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownLineBreaks.js.map +0 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownListFormatting.js +0 -2
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownListFormatting.js.map +0 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveReviewBlocks.js +0 -2
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveReviewBlocks.js.map +0 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveReviewBoundaryWhitespace.js +0 -2
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveReviewBoundaryWhitespace.js.map +0 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveTableDelimiters.js +0 -2
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveTableDelimiters.js.map +0 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/reviewNodeSerialization.js +0 -2
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/reviewNodeSerialization.js.map +0 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/onDemandCitations/href.js +0 -2
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/onDemandCitations/href.js.map +0 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/onDemandCitations/payload.js +0 -2
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/onDemandCitations/payload.js.map +0 -1
- package/dist/cjs/features/RequirementAI/components/userstory-with-citation/utils/inlineMarkdown.js +0 -2
- package/dist/cjs/features/RequirementAI/components/userstory-with-citation/utils/inlineMarkdown.js.map +0 -1
- package/dist/cjs/features/RequirementAI/utils/exponential-retry.js +0 -2
- package/dist/cjs/features/RequirementAI/utils/exponential-retry.js.map +0 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/constants/updateTags.js +0 -2
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/constants/updateTags.js.map +0 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/codeBlockSerialization.js +0 -2
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/codeBlockSerialization.js.map +0 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/markdownTableSerialization.js +0 -2
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/markdownTableSerialization.js.map +0 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/normalizeRedlineMarkdown.js +0 -2
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/normalizeRedlineMarkdown.js.map +0 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownEmphasis.js +0 -2
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownEmphasis.js.map +0 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownEscapes.js +0 -2
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownEscapes.js.map +0 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownLineBreaks.js +0 -2
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownLineBreaks.js.map +0 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownListFormatting.js +0 -2
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownListFormatting.js.map +0 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveReviewBlocks.js +0 -2
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveReviewBlocks.js.map +0 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveReviewBoundaryWhitespace.js +0 -2
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveReviewBoundaryWhitespace.js.map +0 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveTableDelimiters.js +0 -2
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveTableDelimiters.js.map +0 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/reviewNodeSerialization.js +0 -2
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/reviewNodeSerialization.js.map +0 -1
- package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/onDemandCitations/href.js +0 -2
- package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/onDemandCitations/href.js.map +0 -1
- package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/onDemandCitations/payload.js +0 -2
- package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/onDemandCitations/payload.js.map +0 -1
- package/dist/features/RequirementAI/components/userstory-with-citation/utils/inlineMarkdown.js +0 -2
- package/dist/features/RequirementAI/components/userstory-with-citation/utils/inlineMarkdown.js.map +0 -1
- package/dist/features/RequirementAI/utils/exponential-retry.js +0 -2
- package/dist/features/RequirementAI/utils/exponential-retry.js.map +0 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/constants/updateTags.d.ts +0 -2
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/constants/updateTags.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/codeBlockSerialization.d.ts +0 -5
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/codeBlockSerialization.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/manualEditEdgeCases.test.d.ts +0 -2
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/manualEditEdgeCases.test.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/markdownTableSerialization.d.ts +0 -16
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/markdownTableSerialization.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/markdownTableStructure.test.d.ts +0 -2
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/markdownTableStructure.test.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/normalizeRedlineMarkdown.d.ts +0 -8
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/normalizeRedlineMarkdown.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownEmphasis.d.ts +0 -58
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownEmphasis.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownEscapes.d.ts +0 -14
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownEscapes.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownLineBreaks.d.ts +0 -14
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownLineBreaks.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownListFormatting.d.ts +0 -3
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownListFormatting.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveReviewBlocks.d.ts +0 -4
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveReviewBlocks.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveReviewBoundaryWhitespace.d.ts +0 -86
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveReviewBoundaryWhitespace.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveTableDelimiters.d.ts +0 -7
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveTableDelimiters.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/randomEditSerialization.audit.test.d.ts +0 -2
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/randomEditSerialization.audit.test.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/reviewNodeSerialization.d.ts +0 -15
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/reviewNodeSerialization.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/serializationPreservation.test.d.ts +0 -2
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/serializationPreservation.test.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/tableMarkdownReviewRoundTrip.test.d.ts +0 -2
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/tableMarkdownReviewRoundTrip.test.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/tableNumberingFix.test.d.ts +0 -2
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/tableNumberingFix.test.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/tableNumberingIssue.test.d.ts +0 -2
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/tableNumberingIssue.test.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/tableNumberingSample.fixture.d.ts +0 -2
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/tableNumberingSample.fixture.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/tableNumberingValidation.test.d.ts +0 -2
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/tableNumberingValidation.test.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/onDemandCitations/href.d.ts +0 -13
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/onDemandCitations/href.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/onDemandCitations/index.d.ts +0 -3
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/onDemandCitations/index.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/onDemandCitations/payload.d.ts +0 -30
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/onDemandCitations/payload.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/userstory.mock.data.d.ts +0 -3006
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/userstory.mock.data.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/components/userstory-with-citation/utils/inlineMarkdown.d.ts +0 -9
- package/dist/types/src/features/RequirementAI/components/userstory-with-citation/utils/inlineMarkdown.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/utils/exponential-retry.d.ts +0 -12
- package/dist/types/src/features/RequirementAI/utils/exponential-retry.d.ts.map +0 -1
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./markdownTableSerialization.js");const t=String.raw`(?:[^>"']|"[^"]*"|'[^']*')*`,n=new RegExp(String.raw`<updated\b(${t})>([\s\S]*?)<\/updated\s*>`,"gi"),r=new RegExp(String.raw`<upt\b(${t})>([\s\S]*?)<\/upt\s*>`,"gi"),i=new RegExp(String.raw`<(deleted|changed)\b(${t})>([\s\S]*?)<\/\1\s*>`,"gi"),l=new Set(["updated","upt","manual","deleted","changed","del","ins","preserved","mark"]),s=(e,t)=>{let n=0;for(let r=t-1;r>=0&&"\\"===e[r];r-=1)n+=1;return n%2==1},d=(e,t)=>{let n="";for(let r=t+1;r<e.length;r+=1){const t=e[r];if(n)t!==n||s(e,r)||(n="");else if('"'===t||"'"===t)n=t;else if(">"===t)return r}return-1},a=e=>{var t,n;let r="",i=0;for(let a=0;a<e.length;a+=1){if("<"===e[a]&&/[A-Za-z/]/.test(null!==(t=e[a+1])&&void 0!==t?t:"")){const t=d(e,a);if(-1!==t){const s=e.slice(a,t+1),d=s.match(/^<\s*(\/?)\s*([A-Za-z][\w:-]*)/),o=null!==(n=null==d?void 0:d[2].toLowerCase())&&void 0!==n?n:"",c=l.has(o),u="/"===(null==d?void 0:d[1]),g=/\/\s*>$/.test(s);r+=c||i>0?s.replace(/\|/g,"|"):s,c&&u?i=Math.max(0,i-1):c&&!g&&(i+=1),a=t;continue}}"|"===e[a]&&i>0?(s(e,a)&&(r=r.slice(0,-1)),r+="|"):r+=e[a]}return r},o=e=>{const t=e.trim();if(!t.includes("|"))return null;const n=[];let r="";for(let e=0;e<t.length;e+=1){const i=t[e],l=e>0&&"\\"===t[e-1];"|"!==i||l?r+=i:(n.push(r.trim()),r="")}return n.push(r.trim()),t.startsWith("|")&&n.shift(),t.endsWith("|")&&n.pop(),n},c=e=>!!(null==e?void 0:e.length)&&e.every(e=>/^:?-{3,}:?$/.test(e)),u=e=>`| ${e.join(" | ")} |`,g=e=>e.replace(r,(e,t,n)=>{if(!(e=>{const t=e.split("\n");return t.some((e,n)=>{var r;return n>0&&c(o(e))&&!!(null===(r=o(t[n-1]))||void 0===r?void 0:r.length)})})(n))return e;return`<updated${t}>${n.replace(/<del\b([^>]*)>/gi,"<deleted$1>").replace(/<\/del\s*>/gi,"</deleted>").replace(/<ins\b([^>]*)>/gi,"<changed$1>").replace(/<\/ins\s*>/gi,"</changed>")}</updated>`});exports.normalizeRedlineMarkdown=r=>{if(!r)return"";let l=g(r).replace(n,(e,t,n)=>{if(!n.includes("|"))return e;if(!/\bid\s*=\s*["']ai_reasoning\$/i.test(t))return n;const r=/\bdata-main\b/i.test(t)?"":" data-main",i=((e,t)=>{const n=t.match(/\bid\s*=\s*["']([^"']+)["']/i);if(!n)return e;const r=encodeURIComponent(n[1]);return e.replace(/<(deleted|changed)\b([^>]*)>/gi,(e,t,n)=>/\bdata-upt-id\s*=/i.test(n)?e:`<${t}${n} data-upt-id="${r}">`)})(n,t);return`<upt${t}${r}></upt>\n\n${i}`});return l=(e=>{const n=new RegExp(String.raw`(<deleted\b${t}>(?:(?!<\/deleted\s*>)[\s\S])*?\|(?:(?!<\/deleted\s*>)[\s\S])*?<\/deleted\s*>)\s*(<changed\b${t}>[^|]*?<\/changed\s*>)\s*\|`,"gi"),r=e.replace(n,(e,t,n)=>{var r;return`${(null!==(r=t.replace(/<\/deleted\s*>$/i,"").trimEnd().split("\n").at(-1))&&void 0!==r?r:"").trimEnd().endsWith("|")?t:t.replace(/<\/deleted\s*>$/i," |</deleted>")}\n${n}`}),l=new RegExp(String.raw`(<deleted\b${t}>(?:(?!<\/deleted\s*>)[\s\S])*?\|(?:(?!<\/deleted\s*>)[\s\S])*?<\/deleted\s*>)\s*(?=<changed\b${t}>)`,"gi"),s=r.replace(l,"$1\n\n");return s.replace(i,(e,t,n,r,i)=>{if(!r.includes("|"))return e;const l=s.slice(0,i),d=/(?:^|\n)[ \t]*$/.test(l);return r.split("\n").map((e,r)=>{if(!e)return e;let i=e;i.includes("|")&&!/^\s*\|/.test(i)&&(r>0||d)&&(i=`| ${i}`);const l=o(i);return c(l)?i:i.split(/(\|)/).map(e=>"|"!==e&&e.trim()?`<${t}${n}>${e}</${t}>`:e).join("")}).join("\n")})})(l),l=l.replace(/([([])\s+(?=<(?:deleted|changed)>)/gi,"$1"),l=a(l),l=e.normalizeMarkdownTableBoundaryMetadataForRendering(l),(e=>{const t=e.split("\n");for(let e=1;e<t.length;e+=1){const n=o(t[e]);if(!c(n))continue;const r=o(t[e-1]);if(!(null==r?void 0:r.length))continue;for(;r.length>n.length;){const e=r.findIndex(e=>""===e);if(-1===e)break;r.splice(e,1)}const i=Math.max(r.length,n.length);let l=e+1,s=0;for(;l<t.length&&""!==t[l].trim();){const e=o(t[l]);if(!e)break;for(;e.length>i;){const t=e.findIndex(e=>""===e);if(-1===t)break;e.splice(t,1)}t[l]=u(e),s=Math.max(s,e.length),l+=1}const d=Math.max(r.length,n.length,s);for(;r.length<d;)r.push("");for(;n.length<d;)n.push("---");t[e-1]=u(r),t[e]=u(n)}return t.join("\n")})(l)},exports.protectReviewTagPipesForRendering=a;
|
|
2
|
-
//# sourceMappingURL=normalizeRedlineMarkdown.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"normalizeRedlineMarkdown.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const e=(e,n)=>{let t=0;for(let r=n-1;r>=0&&"\\"===e[r];r-=1)t+=1;return t%2==1},n=e=>/[\p{L}\p{N}]/u.test(e),t=(n,t)=>{let r="",l=0,o="",s=!1,a=0;return n.split(/(\r?\n)/).map(n=>{var i;if(/^\r?\n$/.test(n))return n;const c=s||a?null:n.match(/^\s*(`{3,}|~{3,})/);if(r)return c&&c[1][0]===r&&c[1].length>=l&&(r="",l=0),n;if(c)return r=c[1][0],l=c[1].length,n;let d="";for(let r=0;r<n.length;r+=1){const l=n[r];if(s){d+=l,o?l!==o||e(n,r)||(o=""):'"'===l||"'"===l?o=l:">"===l&&(s=!1);continue}if(!a&&"<"===l&&/[A-Za-z/!?]/.test(null!==(i=n[r+1])&&void 0!==i?i:"")){s=!0,d+=l;continue}if("`"===l&&!e(n,r)){let e=1;for(;"`"===n[r+e];)e+=1;a?a===e&&(a=0):a=e,d+=n.slice(r,r+e),r+=e-1;continue}if(a){d+=l;continue}const c=t(n,r);c?(d+=c.value,r+=c.consumedLength-1):d+=l}return d}).join("")},r=e=>Array.from(e.matchAll(/[\p{L}\p{N}]+(?:(?:\\?_)+[\p{L}\p{N}]+)+/gu),e=>{var n;return{index:null!==(n=e.index)&&void 0!==n?n:0,raw:e[0],visible:e[0].replace(/\\_/g,"_")}}),l=e=>/^(?:B|STRONG)$/.test(e.tagName)?"bold":/^(?:I|EM)$/.test(e.tagName)?"italic":"",o=e=>0===e.attributes.length,s=e=>{var n;Array.from(e.classList).filter(e=>e.startsWith("PlaygroundEditorTheme__")).forEach(n=>e.classList.remove(n)),e.classList.length||e.removeAttribute("class");const t=e;"pre-wrap"===t.style.whiteSpace&&t.style.removeProperty("white-space"),(null===(n=t.getAttribute("style"))||void 0===n?void 0:n.trim())||t.removeAttribute("style")},a=t=>{var r,l,o;const s=[],a=[];let i="",c=!1,d=0;for(let g=0;g<t.length;g+=1){const u=t[g];if(c){i?u!==i||e(t,g)||(i=""):'"'===u||"'"===u?i=u:">"===u&&(c=!1);continue}if(!d&&"<"===u&&/[A-Za-z/!?]/.test(null!==(r=t[g+1])&&void 0!==r?r:"")){c=!0;continue}if("`"===u&&!e(t,g)){let e=1;for(;"`"===t[g+e];)e+=1;d?d===e&&(d=0):d=e,g+=e-1;continue}if(d||"*"!==u&&"_"!==u)continue;if(e(t,g))continue;let p=1;for(;t[g+p]===u;)p+=1;const h=null!==(l=t[g-1])&&void 0!==l?l:"",m=null!==(o=t[g+p])&&void 0!==o?o:"",x="_"===u&&n(h)&&n(m),f=""!==m&&!/\s/.test(m)&&!x;let I=0,v=p;if(""!==h&&!/\s/.test(h)&&!x){let e=a.at(-1);for(;e&&e.marker===u&&v>=e.markerLength;)s.push({...e,closeIndex:g+I}),I+=e.markerLength,v-=e.markerLength,a.pop(),e=a.at(-1)}f&&v>0&&v<=3&&a.push({openIndex:g+I,marker:u,markerLength:v}),g+=p-1}return s.sort((e,n)=>e.openIndex-n.openIndex)},i=e=>e.split(/(`+[^`]*`+|<(?:[^>"']|"[^"]*"|'[^']*')*>)/g).map((e,n)=>n%2==1?e:e.replace(/\*{1,3}/g,"")).join("").replace(/[ \t]*(<\/?(?:manual|upt)\b(?:[^>"']|"[^"]*"|'[^']*')*>)[ \t]*/gi,"$1").replace(/\r\n/g,"\n"),c=e=>{const n=[];let t="",r=0;return e.split("\n").forEach(e=>{const l=e.match(/^\s*(`{3,}|~{3,})/);if(l){const n=l[1][0];return t?t===n&&(t=""):t=n,void(r+=e.length+1)}if(!t){let t=0;e.split(/(`+[^`]*`+)/g).forEach((e,l)=>{l%2==0&&Array.from(e.matchAll(/\*{3}([ \t]*)(\S(?:.*?\S)?)([ \t]*)\*{3}/g)).forEach(e=>{var l;const o=r+t+(null!==(l=e.index)&&void 0!==l?l:0);n.push({openIndex:o,closeIndex:o+e[0].length-3,leadingSpace:e[1],content:e[2],trailingSpace:e[3]})}),t+=e.length})}r+=e.length+1}),n},d=/(<(manual|upt)\b(?:[^>"']|"[^"]*"|'[^']*')*>[\s\S]*?<\/\2\s*>)/gi;exports.collectMarkdownEmphasisRanges=a,exports.markdownWithoutEmphasisMarkers=e=>a(e).flatMap(e=>[{index:e.openIndex,length:e.markerLength},{index:e.closeIndex,length:e.markerLength}]).sort((e,n)=>n.index-e.index).reduce((e,n)=>e.slice(0,n.index)+e.slice(n.index+n.length),e),exports.normalizeCombinedEmphasisForRendering=e=>{let n="";return e.split("\n").map(e=>{const t=e.match(/^\s*(`{3,}|~{3,})/);if(t){const r=t[1][0];return n?n===r&&(n=""):n=r,e}return n?e:e.split(/(`+[^`]*`+)/g).map((e,n)=>n%2==1?e:e.replace(/\*{3}([ \t]*)(\S(?:.*?\S)?)([ \t]*)\*{3}/g,(e,n,t,r)=>`${n}***${t}***${r}`)).join("")}).join("\n")},exports.normalizeNestedReviewEmphasisForRendering=e=>e.replace(/(<(?:manual|upt)\b(?:[^>"']|"[^"]*"|'[^']*')*>[\s\S]*?<ins\b(?:[^>"']|"[^"]*"|'[^']*')*>)([\s\S]*?)(<\/ins\s*>[\s\S]*?<\/(?:manual|upt)\s*>)/gi,(e,n,t,r,l,o)=>{const s=o.lastIndexOf("\n",Math.max(0,l-1))+1,a=o.indexOf("\n",l+e.length),i=o.slice(s,l),c=o.slice(l+e.length,-1===a?o.length:a);if(!["**","__"].some(e=>i.includes(e)&&c.includes(e)))return e;return`${n}${t.replace(/(\*{2}|_{2})([ \t]+)((\*{3}|_{3})(\S(?:.*?\S)?)\4)([ \t]+)\1/g,(e,n,t,r,l,o,s)=>`${t}${r}${s}`)}${r}`}),exports.normalizeRedundantInlineFormattingElements=e=>{e.querySelectorAll("b, strong, i, em").forEach(s);let n=!0;for(;n;){n=!1,e.querySelectorAll("b b, b strong, strong b, strong strong, i i, i em, em i, em em").forEach(e=>{const t=e.parentElement;t&&l(t)===l(e)&&o(e)&&(e.replaceWith(...Array.from(e.childNodes)),n=!0)});[e,...Array.from(e.querySelectorAll("*"))].forEach(e=>{let t=e.firstChild;for(;t;){const e=t.nextSibling;t instanceof Element&&e instanceof Element&&l(t)&&l(t)===l(e)&&o(t)&&o(e)?(t.append(...Array.from(e.childNodes)),e.remove(),n=!0):t=e}})}},exports.normalizeReviewBoundaryEmphasisForRendering=e=>e.replace(/(<(?:manual|upt)\b(?:[^>"']|"[^"]*"|'[^']*')*>)(<del\b(?:[^>"']|"[^"]*"|'[^']*')*>)(\*{1,3}|_{1,3})([\s\S]*?)(<\/del\s*>)([ \t]*)(<ins\b(?:[^>"']|"[^"]*"|'[^']*')*>)\3([\s\S]*?)(<\/ins\s*>)(<\/(?:manual|upt)\s*>)([^\n]*?)\3/g,(e,n,t,r,l,o,s,a,i,c,d,g)=>`${r}${n}${t}${l}${o}${s}${a}${i}${c}${d}${g}${r}`),exports.preserveEmphasisMarkersFromSource=(e,n)=>{n=((e,n)=>{const t=c(e),r=c(n);if(!t.length||!r.length)return n;const l=[];if(t.length===r.length)r.forEach((e,n)=>{l.push({sourceIndex:n,generatedIndex:n})});else{let e=0;r.forEach((n,r)=>{const o=t.findIndex((t,r)=>r>=e&&t.content===n.content);-1!==o&&(l.push({sourceIndex:o,generatedIndex:r}),e=o+1)})}let o=n;return l.sort((e,n)=>r[n.generatedIndex].openIndex-r[e.generatedIndex].openIndex).forEach(({sourceIndex:e,generatedIndex:n})=>{const l=t[e],s=r[n],a=`***${l.leadingSpace}${s.content}${l.trailingSpace}***`;o=o.slice(0,s.openIndex)+a+o.slice(s.closeIndex+3)}),o})(e,n),n=((e,n)=>{const t=a(e).filter(n=>/<(?:manual|upt)\b/i.test(e.slice(n.openIndex+n.markerLength,n.closeIndex)));let r=n;return t.sort((e,n)=>n.openIndex-e.openIndex).forEach(n=>{const t=n.marker.repeat(n.markerLength),l="*".repeat(n.markerLength),o=e.slice(n.openIndex+n.markerLength,n.closeIndex),s=o.split(new RegExp(d.source,"gi")).filter((e,n)=>e&&(n%3==0||n%3==1)).map(e=>/^<(?:manual|upt)\b/i.test(e)?e:`${l}${e}${l}`).join(""),a=`${t}${o}${t}`;s&&r.includes(s)&&(r=r.replace(s,a))}),r})(e,n);const t=a(e),r=a(n),l=(e,n)=>e.slice(n.openIndex+n.markerLength,n.closeIndex).replace(/\r\n/g,"\n"),o=t.map(n=>l(e,n)),s=r.map(e=>l(n,e)),i=[],g=(e,n)=>t[e].markerLength===r[n].markerLength&&o[e]===s[n],u=Array.from({length:o.length+1},()=>Array(s.length+1).fill(0));for(let e=o.length-1;e>=0;e-=1)for(let n=s.length-1;n>=0;n-=1)u[e][n]=g(e,n)?u[e+1][n+1]+1:Math.max(u[e+1][n],u[e][n+1]);let p=0,h=0;for(;p<o.length&&h<s.length;)g(p,h)?(i.push({sourceIndex:p,generatedIndex:h}),p+=1,h+=1):u[p+1][h]>=u[p][h+1]?p+=1:h+=1;if(t.length===r.length){const e=new Set(i.map(e=>e.generatedIndex));for(let n=0;n<r.length;n+=1)e.has(n)||t[n].markerLength!==r[n].markerLength||i.push({sourceIndex:n,generatedIndex:n})}let m=n;return i.sort((e,n)=>n.generatedIndex-e.generatedIndex),i.forEach(({sourceIndex:e,generatedIndex:n})=>{const l=t[e],o=r[n],s=l.marker.repeat(l.markerLength);m=m.slice(0,o.closeIndex)+s+m.slice(o.closeIndex+o.markerLength),m=m.slice(0,o.openIndex)+s+m.slice(o.openIndex+o.markerLength)}),m},exports.preserveLiteralMidWordUnderscoresFromSource=(l,o)=>{let s=t(o,(t,r)=>{var l,o;if("\\"!==t[r]||e(t,r))return null;let s=r,a=0;for(;"\\"===t[s]&&"_"===t[s+1]&&!e(t,s);)a+=1,s+=2;return a&&n(null!==(l=t[r-1])&&void 0!==l?l:"")&&n(null!==(o=t[s])&&void 0!==o?o:"")?{consumedLength:s-r,value:"_".repeat(a)}:null});const a=r(l),i=r(s);if(!a.length||!i.length)return s;const c=Array.from({length:a.length+1},()=>Array(i.length+1).fill(0));for(let e=a.length-1;e>=0;e-=1)for(let n=i.length-1;n>=0;n-=1)c[e][n]=a[e].visible===i[n].visible?c[e+1][n+1]+1:Math.max(c[e+1][n],c[e][n+1]);const d=[];let g=0,u=0;for(;g<a.length&&u<i.length;)a[g].visible===i[u].visible?(d.push({sourceIndex:g,generatedIndex:u}),g+=1,u+=1):c[g+1][u]>=c[g][u+1]?g+=1:u+=1;return d.sort((e,n)=>i[n.generatedIndex].index-i[e.generatedIndex].index).forEach(({sourceIndex:e,generatedIndex:n})=>{const t=a[e],r=i[n];t.raw!==r.raw&&(s=s.slice(0,r.index)+t.raw+s.slice(r.index+r.raw.length))}),s},exports.preserveUnchangedEmphasisParagraphsFromSource=(e,n)=>{const t=e.split(/(\r?\n\r?\n)/),r=n.split(/(\r?\n\r?\n)/);return t.length!==r.length?n:r.map((e,n)=>{if(n%2==1)return e;const r=t[n],l=i(r)===i(e),o=/<(?:manual|upt)\b/i.test(r),s=/\*{4,}/.test(e);return l&&(o||s)?r:e}).join("")},exports.protectLiteralMidWordUnderscoresForRendering=r=>t(r,(t,r)=>{var l,o;if("_"!==t[r]||e(t,r))return null;let s=1;for(;"_"===t[r+s];)s+=1;return n(null!==(l=t[r-1])&&void 0!==l?l:"")&&n(null!==(o=t[r+s])&&void 0!==o?o:"")?{consumedLength:s,value:"\\_".repeat(s)}:null});
|
|
2
|
-
//# sourceMappingURL=preserveMarkdownEmphasis.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"preserveMarkdownEmphasis.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var n=e(require("showdown"));const t=new Set(Array.from("`*_{}[]()>#+.!~=|:-")),r=e=>e.replace(/&(?:#\d+|#x[\da-f]+|[a-z][\da-z]+);/gi,e=>{const n=document.createElement("textarea");return n.innerHTML=e,n.value}),a=/<!--\s*([a-f0-9]{8}(?:-[a-f0-9]{4}){3}-[a-f0-9]{12})\s*-->/gi,o=/<invisible\b[^>]*\bid=(["'])([a-f0-9]{8}(?:-[a-f0-9]{4}){3}-[a-f0-9]{12})\1[^>]*>\s*<\/invisible>/gi,l=new n.default.Converter({tables:!0,simpleLineBreaks:!0,literalMidWordUnderscores:!0}),s=e=>e.split(/\r?\n/).filter(e=>/^ {0,3}\[[^\]]+\]:\s*\S/.test(e)).join("\n"),c=e=>e.replace(a,(e,n)=>`ZXQDOCUMENTANCHOR${n.replace(/-/g,"")}QXZ`).replace(o,(e,n,t)=>`ZXQDOCUMENTANCHOR${t.replace(/-/g,"")}QXZ`),i=(e,n)=>{const t=l.makeHtml(n?`${c(e)}\n\n${n}`:c(e)).replace(/\r\n/g,"\n");return(new DOMParser).parseFromString(t,"text/html").body.innerHTML},d=e=>{var n;let a="";for(let r=0;r<e.length;r+=1){if("\\"!==e[r]){a+=e[r];continue}let o=1;for(;"\\"===e[r+o];)o+=1;const l=null!==(n=e[r+o])&&void 0!==n?n:"",s=t.has(l),c=s?Math.floor(o/2):Math.ceil(o/2);a+="\\".repeat(c),s?(a+=l,r+=o):r+=o-1}return r(a).replace(/\r\n/g,"\n")},p=e=>e.split(/(\r?\n\r?\n)/),u=e=>/[\p{L}\p{N}]/u.test(e),f=e=>{var n,a,o,l;const s=[];for(let c=0;c<e.length;c+=1){const i=e[c],p="&"===i?null===(n=e.slice(c).match(/^&(?:#\d+|#x[\da-f]+|[a-z][\da-z]+);/i))||void 0===n?void 0:n[0]:void 0;if(p)s.push({comparable:r(p),escapeKind:"entity",raw:p}),c+=p.length-1;else{if("\\"===i){let n=1;for(;"\\"===e[c+n];)n+=1;const r=null!==(a=e[c+n])&&void 0!==a?a:"",o=t.has(r),l=n+(o?1:0),i=e.slice(c,c+l);s.push({comparable:d(i),escapeKind:o?r:"\\",raw:i}),c+=l-1;continue}if(u(i)){let n=c+1;for(;u(null!==(o=e[n])&&void 0!==o?o:"");)n+=1;const t=e.slice(c,n);s.push({comparable:t,escapeKind:"",raw:t}),c=n-1;continue}if(/\s/.test(i)){let n=c+1;for(;/\s/.test(null!==(l=e[n])&&void 0!==l?l:"");)n+=1;const t=e.slice(c,n);s.push({comparable:t,escapeKind:"",raw:t}),c=n-1;continue}s.push({comparable:i,escapeKind:i,raw:i})}}return s};exports.markdownWithoutEscapeSpelling=d,exports.preserveUnchangedMarkdownEscapesFromSource=(e,n)=>{const t=p(e),r=p(n),a=t.filter((e,n)=>n%2==0),o=r.filter((e,n)=>n%2==0),l=a.map(d),c=o.map(d),u=s(e),h=s(n),g=new Array(a.length),w=new Array(o.length),m=(e,n)=>{var t,r;return a[e]===o[n]||l[e]===c[n]&&(null!==(t=g[e])&&void 0!==t||(g[e]=i(a[e],u)),null!==(r=w[n])&&void 0!==r||(w[n]=i(o[n],h)),g[e]===w[n])},v=Array.from({length:a.length+1},()=>new Uint32Array(o.length+1));for(let e=a.length-1;e>=0;e-=1)for(let n=o.length-1;n>=0;n-=1)v[e][n]=m(e,n)?v[e+1][n+1]+1:Math.max(v[e+1][n],v[e][n+1]);const x=new Map,b=new Set,M=[];let y=0,I=0;for(;y<a.length&&I<o.length;)m(y,I)?(x.set(I,y),b.add(y),M.push({sourceIndex:y,generatedIndex:I}),y+=1,I+=1):v[y+1][I]>=v[y][I+1]?y+=1:I+=1;const E=new Map,K=[{sourceIndex:-1,generatedIndex:-1},...M,{sourceIndex:a.length,generatedIndex:o.length}];for(let e=1;e<K.length;e+=1){const n=K[e-1],t=K[e],r=t.sourceIndex-n.sourceIndex-1;if(r===t.generatedIndex-n.generatedIndex-1)for(let e=1;e<=r;e+=1)E.set(n.generatedIndex+e,n.sourceIndex+e)}for(let e=0;e<o.length;e+=1){if(x.has(e))continue;const n=a.findIndex((n,t)=>!b.has(t)&&m(t,e));-1!==n&&(x.set(e,n),b.add(n))}let A=0;return r.map((e,n)=>{if(n%2==1)return e;const t=x.get(A),r=E.get(A);return A+=1,void 0!==t?a[t]:void 0===r?e:((e,n,t)=>{const r=f(e),a=f(n),o=Array.from({length:r.length+1},()=>new Uint32Array(a.length+1));for(let e=r.length-1;e>=0;e-=1)for(let n=a.length-1;n>=0;n-=1)o[e][n]=r[e].comparable===a[n].comparable?o[e+1][n+1]+1:Math.max(o[e+1][n],o[e][n+1]);const l=new Map;let s=0,c=0;for(;s<r.length&&c<a.length;)r[s].comparable===a[c].comparable?(l.set(c,s),s+=1,c+=1):o[s+1][c]>=o[s][c+1]?s+=1:c+=1;const d=new Map;l.forEach((e,n)=>{var t;const o=r[e],l=a[n];if(o.raw===l.raw||!o.raw.includes("\\")&&!l.raw.includes("\\")&&"entity"!==o.escapeKind&&"entity"!==l.escapeKind)return;const s=l.escapeKind||o.escapeKind,c="["===s||"]"===s?"brackets":s,i=null!==(t=d.get(c))&&void 0!==t?t:new Map;i.set(n,o.raw),d.set(c,i)});let p=a.map(e=>e.raw),u=n;d.forEach(e=>{const n=[...p];e.forEach((e,t)=>{n[t]=e});const r=n.join("");i(r,t)===i(u,t)&&(p=n,u=r)});const h=new Map;return a.forEach((e,n)=>{var t;if(l.has(n)||!e.raw.includes("\\"))return;const r=["[","]"].includes(e.escapeKind)?"brackets":e.escapeKind;h.set(r,[...null!==(t=h.get(r))&&void 0!==t?t:[],n])}),h.forEach(e=>{const n=[...p];e.forEach(e=>{n[e]=a[e].comparable});const r=n.join("");i(r,t)===i(u,t)&&(p=n,u=r)}),u})(a[r],e,h)}).join("")};
|
|
2
|
-
//# sourceMappingURL=preserveMarkdownEscapes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"preserveMarkdownEscapes.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const e=/<br\s*\/?>| {2,}\r?\n|\r\n|\r|\n/gi,r=e=>e.replace(/<[^>]*>/g," ").replace(/\\([*+\-=#`~[\]>_.])/g,"$1").replace(/[*_`~]+/g,"").replace(/ |\u00a0/gi," ").replace(/>/gi,">").replace(/</gi,"<").replace(/"/gi,'"').replace(/'|'/gi,"'").replace(/&/gi,"&").replace(/\s+/g," ").trim().toLocaleLowerCase(),t=t=>{const l=Array.from(t.matchAll(new RegExp(e.source,"gi")));return l.map((e,n)=>{var i,g,s,c;const a=null!==(i=e.index)&&void 0!==i?i:0,h=n>0?(null!==(g=l[n-1].index)&&void 0!==g?g:0)+l[n-1][0].length:0,o=null!==(c=null===(s=l[n+1])||void 0===s?void 0:s.index)&&void 0!==c?c:t.length;return{raw:e[0],left:r(t.slice(h,a).slice(-100)),right:r(t.slice(a+e[0].length,o).slice(0,100))}})},l=/[^\S\r\n]*(?:\r?\n[^\S\r\n]*){2,}/g,n=e=>Array.from(e.matchAll(new RegExp(l.source,"g"))).map(t=>{var l;const n=null!==(l=t.index)&&void 0!==l?l:0,i=e.slice(0,n),g=e.slice(n+t[0].length);return{raw:t[0],left:r(i.slice(i.lastIndexOf("\n")+1).slice(-240)),right:r(g.split(/\r?\n/,1)[0].slice(0,240))}}),i=e=>{var r;return(null!==(r=e.match(/\r?\n/g))&&void 0!==r?r:[]).length};exports.preserveLineBreaksFromSource=(r,l)=>{if(!r||!l)return l;const n=t(r),i=t(l);if(!n.length||!i.length)return l;if(n.length===i.length){let r=0;return l.replace(e,()=>n[r++].raw)}let g=0,s=0;return l.replace(e,e=>{const r=i[s++],t=n.findIndex((e,t)=>t>=g&&((e,r)=>{const t=Boolean(e.left&&r.left&&(e.left.endsWith(r.left)||r.left.endsWith(e.left))),l=Boolean(e.right&&r.right&&(e.right.startsWith(r.right)||r.right.startsWith(e.right)));if(t||l)return!0;const n=e.left&&e.left.length>=50&&r.left&&r.left.length>=50,i=e.right&&e.right.length>=50&&r.right&&r.right.length>=50;if(n){const t=e.left.slice(-30),l=r.left.slice(-30);if(t.split("").filter((e,r)=>l[r]===e).length>=15)return!0}if(i){const t=e.right.slice(0,30),l=r.right.slice(0,30);if(t.split("").filter((e,r)=>l[r]===e).length>=15)return!0}return!1})(e,r));return-1===t?e:(g=t+1,n[t].raw)})},exports.preserveUnchangedWhitespaceRunsFromSource=(e,r,t=!1)=>{if(!e||!r)return r;const g=n(e),s=n(r);if(!g.length||!s.length)return r;let c=0,a=0;return r.replace(l,e=>{const r=s[a++],l=g.findIndex((e,l)=>l>=c&&(e.left===r.left&&e.right===r.right||t&&g.length===s.length&&l===a-1)&&i(r.raw)<=i(e.raw)&&(e.raw.includes(" ")||i(r.raw)===i(e.raw)));return-1===l?e:(c=l+1,g[l].raw)})};
|
|
2
|
-
//# sourceMappingURL=preserveMarkdownLineBreaks.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"preserveMarkdownLineBreaks.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const e=e=>{const n=[];let t="";return e.forEach((e,r)=>{const s=e.match(/^\s*(`{3,}|~{3,})/);if(s){const e=s[1][0];return void(t?t===e&&(t=""):t=e)}if(t)return;const o=e.match(/^(\s*)([*+-]|\d+\.)([ \t]+)(.*)$/);o&&n.push({lineIndex:r,indent:o[1],marker:o[2],spacing:o[3],content:o[4]})}),n};exports.preserveListFormattingFromSource=(n,t)=>{if(!n||!t)return t;const r=n.split("\n"),s=t.split("\n"),o=e(r),c=e(s);if(!o.length||!c.length)return t;const d=[];if(o.length===c.length)c.forEach((e,n)=>{d.push({sourceIndex:n,generatedIndex:n})});else{let e=0;c.forEach((n,t)=>{const r=o.findIndex((t,r)=>r>=e&&t.content===n.content);-1!==r&&(d.push({sourceIndex:r,generatedIndex:t}),e=r+1)})}return d.forEach(({sourceIndex:e,generatedIndex:n})=>{const t=o[e],r=c[n];/\d/.test(t.marker+r.marker)&&t.marker!==r.marker||(s[r.lineIndex]=`${t.indent}${t.marker}${t.spacing}`+r.content)}),s.join("\n")};
|
|
2
|
-
//# sourceMappingURL=preserveMarkdownListFormatting.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"preserveMarkdownListFormatting.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./preserveMarkdownEmphasis.js"),r=require("./preserveMarkdownEscapes.js");const n=new RegExp(String.raw`<(manual|upt|updated)\b((?:[^>"']|"[^"]*"|'[^']*')*)>([\s\S]*?)<\/\1\s*>`,"gi"),i=new RegExp(String.raw`<del\b(?:[^>"']|"[^"]*"|'[^']*')*>[\s\S]*?<\/del\s*>[ \t\r\n]*<ins\b(?:[^>"']|"[^"]*"|'[^']*')*>[\s\S]*?<\/ins\s*>`,"gi"),s=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),t=e=>{var r,n;return null!==(n=null===(r=e.match(/\bid\s*=\s*(?:"([^"]*)"|'([^']*)')/i))||void 0===r?void 0:r.slice(1).find(Boolean))&&void 0!==n?n:""},a=n=>e.markdownWithoutEmphasisMarkers(r.markdownWithoutEscapeSpelling(n)).replace(/<(\/)?(del|ins|changed|preserved)\b[^>]*>/gi,(e,r,n)=>` ZXQ${r?"CLOSE":"OPEN"}${String(n).toUpperCase()}QXZ `).replace(/<br\s*\/?>/gi,"\n").replace(/\\\|/g,"|").replace(/<[^>]*>/g,"").replace(/ |\u00a0/gi," ").replace(/>/gi,">").replace(/</gi,"<").replace(/"/gi,'"').replace(/'|'/gi,"'").replace(/&/gi,"&").replace(/\s+/g," ").trim();exports.getReviewId=t,exports.preserveUnchangedReviewBlocksFromSource=(e,r)=>{const c=Array.from(e.matchAll(new RegExp(n.source,"gi")));let l=r;return c.forEach(e=>{const[,r,n,c]=e,o=t(n);if(!o)return;const p=s(o),g=new RegExp(String.raw`<${r}\b(?=(?:[^>"']|"[^"]*"|'[^']*')*\bid\s*=\s*(?:"${p}"|'${p}'))((?:[^>"']|"[^"]*"|'[^']*')*)>([\s\S]*?)<\/${r}\s*>`,"i");l=l.replace(g,(r,n,i)=>a(c)===a(i)?e[0]:r),l=((e,r,n,i)=>{const c=t(r),l=n.search(/^\|/m);if(!c||l<0)return i;if(n.slice(l).trimEnd().split(/\r?\n/).some(e=>!e.startsWith("|")))return i;const o=s(c),p=new RegExp(String.raw`<${e}\b(?=(?:[^>"']|"[^"]*"|'[^']*')*\bid\s*=\s*(?:"${o}"|'${o}'))((?:[^>"']|"[^"]*"|'[^']*')*)>([\s\S]*?)<\/${e}\s*>`,"i").exec(i);if(!p||void 0===p.index)return i;const g=i.slice(p.index+p[0].length).match(/^([\t \r\n]*)(\|[^\r\n]*(?:\r?\n\|[^\r\n]*)*)/);if(!g)return i;const u=/\s$/.test(p[2])?"":g[1],d=`${p[2]}${u}${g[2]}`,$=a(n)===a(d)?`<${e}${r}>${n}</${e}>`:`<${e}${r}>${d}</${e}>`,x=p[0].length+g[0].length;return i.slice(0,p.index)+$+i.slice(p.index+x)})(r,n,c,l),l=((e,r,n,c)=>{var l;const o=t(r);if(!o)return c;const p=s(o);if(new RegExp(String.raw`<(?:manual|upt)\b(?=(?:[^>"']|"[^"]*"|'[^']*')*\bid\s*=\s*(?:"${p}"|'${p}'))`,"i").test(c))return c;const g=null===(l=n.match(new RegExp(`^\\s*(${i.source})\\s*$`,"i")))||void 0===l?void 0:l[1];if(!g)return c;const u=a(g),d=Array.from(c.matchAll(new RegExp(i.source,"gi"))).find(e=>{var r;return!((e,r)=>{const n=/<(\/)?(?:manual|upt)\b(?:[^>"']|"[^"]*"|'[^']*')*>/gi;let i,s=0;for(;null!==(i=n.exec(e))&&i.index<r;)s+=i[1]?-1:1;return s>0})(c,null!==(r=e.index)&&void 0!==r?r:0)&&a(e[0])===u});if(!d||void 0===d.index)return c;const $=`<${e}${r}>${d[0]}</${e}>`;return c.slice(0,d.index)+$+c.slice(d.index+d[0].length)})(r,n,c,l)}),l};
|
|
2
|
-
//# sourceMappingURL=preserveReviewBlocks.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"preserveReviewBlocks.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("lexical"),t=require("../plugins/ManualNode.js"),o=require("../plugins/UpdateNode.js");const n=(e,t)=>`${"updated"===e.toLowerCase()?"upt":e.toLowerCase()}:${t}`;exports.collectReviewBoundaryWhitespace=e=>{const t=new Map;return e.querySelectorAll("manual[id], upt[id], updated[id]").forEach(e=>{var o,r,i,a,d,l;const s=e.getAttribute("id");if(!s)return;const u=null===(r=null===(o=e.previousSibling)||void 0===o?void 0:o.textContent)||void 0===r?void 0:r.match(/[ \t]+$/),c=null!==(i=null==u?void 0:u[0])&&void 0!==i?i:"",p=null===(d=null===(a=e.nextSibling)||void 0===a?void 0:a.textContent)||void 0===d?void 0:d.match(/^[ \t]+/),f=null!==(l=null==p?void 0:p[0])&&void 0!==l?l:"";t.set(n(e.tagName,s),{before:c,after:f})}),t},exports.restoreReviewBoundaryWhitespace=r=>{[...e.$nodesOfType(t.ManualNode).map(e=>({tag:"manual",node:e})),...e.$nodesOfType(o.UpdateNode).map(e=>({tag:"upt",node:e}))].forEach(({tag:t,node:o})=>{const i=o.getId(),a=r.get(n(t,i));if(!a)return;const d=o.getPreviousSibling();if(e.$isTextNode(d)){const e=d.getTextContent();d.setTextContent(`${e.replace(/[ \t]*$/,"")}${a.before}`)}else a.before&&o.insertBefore(e.$createTextNode(a.before));const l=o.getNextSibling();if(e.$isTextNode(l)){const e=l.getTextContent();l.setTextContent(`${a.after}${e.replace(/^[ \t]*/,"")}`)}else a.after&&o.insertAfter(e.$createTextNode(a.after))})};
|
|
2
|
-
//# sourceMappingURL=preserveReviewBoundaryWhitespace.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"preserveReviewBoundaryWhitespace.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const e=e=>{const n=[],t=[],r=/\r\n|\n|\r|\\r\\n|\\n|\\r/g;let l,s=0;for(;null!==(l=r.exec(e));)n.push(e.slice(s,l.index)),t.push(l[0]),s=l.index+l[0].length;return n.push(e.slice(s)),{lines:n,separators:t}},n=(e,n)=>{let t=0;for(let r=n-1;r>=0&&"\\"===e[r];r-=1)t+=1;return t%2==1},t=e=>e.flatMap((e,t)=>{const r=(e=>{let t=e.trim();if(!t.includes("|"))return 0;t.startsWith("|")&&(t=t.slice(1)),t.endsWith("|")&&!n(t,t.length-1)&&(t=t.slice(0,-1));const r=[];let l="";for(let e=0;e<t.length;e+=1)"|"!==t[e]||n(t,e)?l+=t[e]:(r.push(l.trim()),l="");return r.push(l.trim()),r.length>=2&&r.every(e=>/^:?-{3,}:?$/.test(e))?r.length:0})(e);return r?[{lineIndex:t,columnCount:r,raw:e}]:[]});exports.preserveTableDelimiterRowsFromSource=(n,r)=>{if(!n||!r)return r;const l=e(n),s=e(r),u=t(l.lines),i=t(s.lines);if(!u.length||!i.length)return r;let o=0;return i.forEach((e,n)=>{let t=u.findIndex((n,t)=>t>=o&&n.columnCount===e.columnCount);if(t<0){const r=u[n];if(!r||r.columnCount!==e.columnCount)return;t=n}s.lines[e.lineIndex]=u[t].raw,o=t+1}),(({lines:e,separators:n})=>e.map((e,t)=>{var r;return`${e}${null!==(r=n[t])&&void 0!==r?r:""}`}).join(""))(s)};
|
|
2
|
-
//# sourceMappingURL=preserveTableDelimiters.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"preserveTableDelimiters.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./markdownTableSerialization.js");const r=["upt","updated","manual","ins","del","preserved","deleted","changed","mark"],t=(e,r,t=[])=>{const o=new Set(t);let n=e;for(;r.includes(n)||o.has(n);)n=`Z${n}`;return n},o=(n,l,a=Boolean(n.closest("td, th")))=>{const c=n.cloneNode(!0),s=new Map;Array.from(c.querySelectorAll(r.join(","))).forEach(e=>{if(!c.contains(e))return;const r=t(`ZXQNESTEDREVIEWTOKEN${s.size}QXZ`,c.innerHTML,s.keys());s.set(r,o(e,l,a)),e.replaceWith(c.ownerDocument.createTextNode(r))});const i=new Map;a&&c.querySelectorAll("br").forEach(e=>{const r=t(`ZXQTABLEBREAKTOKEN${i.size}QXZ`,c.innerHTML,i.keys());i.set(r,"<br>"),e.replaceWith(c.ownerDocument.createTextNode(r))});let d=l.turndown(c.innerHTML);i.forEach((e,r)=>{d=d.replace(r,e)}),s.forEach((e,r)=>{d=d.replace(r,e)}),a&&(d=e.escapeMarkdownTableCellPipes(d));const u=Array.from(n.attributes).map(e=>`${e.name}="${e.value}"`).join(" "),p=n.tagName.toLowerCase();return u?`<${p} ${u}>${d}</${p}>`:`<${p}>${d}</${p}>`};exports.replaceReviewNodesWithMarkdownPlaceholders=(e,n)=>{var l,a,c,s;const i=[],d=r.join(","),u=Array.from(e.querySelectorAll(d)).filter(e=>{var r;return!(null===(r=e.parentElement)||void 0===r?void 0:r.closest(d))}),p=null!==(s=null!==(c=null!==(a=null===(l=e.documentElement)||void 0===l?void 0:l.outerHTML)&&void 0!==a?a:e.innerHTML)&&void 0!==c?c:e.textContent)&&void 0!==s?s:"";return u.forEach(e=>{const r=t(`ZXQREVIEWTOKEN${i.length}QXZ`,p,i.map(e=>e.placeholder));i.push({html:o(e,n),placeholder:r}),e.replaceWith(e.ownerDocument.createTextNode(r))}),i},exports.restoreReviewNodePlaceholders=(e,r)=>{let t=e;for(let e=r.length-1;e>=0;e-=1){const{html:o,placeholder:n}=r[e];t=t.replace(n,o)}return t},exports.serializeReviewNodeToMarkdown=o;
|
|
2
|
-
//# sourceMappingURL=reviewNodeSerialization.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"reviewNodeSerialization.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const t=(t,e)=>{const i=t.lastIndexOf("\n",e),n=t.indexOf("\n",e);return t.slice(-1===i?0:i+1,-1===n?t.length:n).trim()};exports.extractRedlineCitationRefs=(e="")=>{const i=[],n=new Set,r=/href=(["'])(.*?)\1/gi;let a;for(;null!==(a=r.exec(e));){const r=a[2]||"";r.startsWith("pdf_citation$")&&!n.has(r)&&(n.add(r),i.push({href:r,citedText:t(e,a.index)}))}return i},exports.parseRedlineCitationHref=(t="")=>{var e;const[i="",n=""]=t.split("$"),[r="",a=""]=n.split("?"),s=new URLSearchParams(a),o=s.get("citationNumber")||s.get("citation_number")||"",c=(null===(e=r.match(/^\d+/))||void 0===e?void 0:e[0])||"";return{citationType:i,localCitationId:r,citationNumber:o||c,queryParams:s}};
|
|
2
|
-
//# sourceMappingURL=href.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"href.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./href.js");const i=(e,i)=>{var n;return i&&(null===(n=(e=>(null==e?void 0:e.nodes)||e||{})(e))||void 0===n?void 0:n[i])||null},n=(e,i)=>(null==e?void 0:e.documents)||(null==i?void 0:i.documents)||{},t=(e,i)=>{var n,t,o,l,d;const a="function"==typeof(null==e?void 0:e.metadata)?e.metadata(i):(null==e?void 0:e.metadata)||(null===(n=null==e?void 0:e.identity)||void 0===n?void 0:n.metadata)||((null===(t=null==e?void 0:e.identity)||void 0===t?void 0:t.userName)||(null===(o=null==e?void 0:e.identity)||void 0===o?void 0:o.userEmailId)?{userName:(null===(l=null==e?void 0:e.identity)||void 0===l?void 0:l.userName)||"",userEmailId:(null===(d=null==e?void 0:e.identity)||void 0===d?void 0:d.userEmailId)||""}:void 0);return"string"==typeof a?a:a&&"object"==typeof a?JSON.stringify(a):"{}"},o=(e,n,t,o)=>{var l,d,a,r,u,s;const c=null===(d=null===(l=i(e,t))||void 0===l?void 0:l.evaluation_result)||void 0===d?void 0:d[o];return(null===(a=null==c?void 0:c.deviation_fix_details)||void 0===a?void 0:a.cognitive_decisioning)||(null==c?void 0:c.cognitive_decisioning)||(null===(u=null===(r=null==n?void 0:n.redlining_details)||void 0===r?void 0:r.deviation_fix_details)||void 0===u?void 0:u.cognitive_decisioning)||(null===(s=null==n?void 0:n.redlining_details)||void 0===s?void 0:s.cognitive_decisioning)||null},l=(e,n,t)=>{var o;const l=i(e,n),d=(e=>(null==e?void 0:e.content_mapping)||{})(e),a=null===(o=null==l?void 0:l.comparison_inputs)||void 0===o?void 0:o[t];return(r=a,Array.isArray(r)?r:null==r?[]:[r]).map(e=>"string"==typeof e?null==d?void 0:d[e]:e).filter(Boolean);var r},d=(e,i)=>{const n=`${(null==e?void 0:e.role)||(null==e?void 0:e.contract_role)||""}`.toLowerCase();return"base"===n||"uploaded"===n?"base":i},a=(e,i,t,o,a,r)=>{const u=n(e,i),s=(null==u?void 0:u[o])||{},c=l(e,t,o),v=c[0]||{},_=c.map(e=>(null==e?void 0:e.content)||(null==e?void 0:e.change_history)||"").filter(Boolean).join("\n\n"),m=(null==r?void 0:r.custom_metadata)||(null==r?void 0:r.customMetaData)||{},p=(null==v?void 0:v.additional_attributes)||{};return{contract_uuid:o,contract_role:d(s,a),source_type:"text",content:{text:_||(null==r?void 0:r.highlighted_text)||""},gcs_source_link:(null==s?void 0:s.source_uri)||(null==s?void 0:s.gcs_source_link)||(null==m?void 0:m.gcs_source_link)||"",pdf_start_page_number:(null==m?void 0:m.pdf_start_page_number)||(null==p?void 0:p.pdf_start_page_number)||"",pdf_end_page_number:(null==m?void 0:m.pdf_end_page_number)||(null==p?void 0:p.pdf_end_page_number)||""}},r=(e,i,t,l,r)=>{var u;const s=((e,i)=>(null==e?void 0:e.input_index_map)||(null==i?void 0:i.input_index_map)||{})(e,i),c=n(e,i),v=o(e,null,t,l),_=(null===(u=null==v?void 0:v.citations)||void 0===u?void 0:u[r])||{},m=(null==s?void 0:s[0])||Object.keys(c).find(e=>"base"===d(c[e],"compare"))||Object.keys(_)[0]||"",p=(null==s?void 0:s[1])||Object.keys(c).find(e=>e!==m)||Object.keys(_).find(e=>e!==m)||"",f={};return m&&(f.base=a(e,i,t,m,"base",null==_?void 0:_[m])),p&&(f.compare=a(e,i,t,p,"compare",null==_?void 0:_[p])),f},u=({href:i,sourceText:n="",citationSection:l,aiReasoning:d,treeData:a,docData:u,config:s})=>{var c,v,_,m;const p=e.parseRedlineCitationHref(i),f=((e,i)=>{var n,t;if(null==e?void 0:e.node_id)return e.node_id;const o=i.match(/\.\/([^?:)]+)/);return(null===(t=null===(n=null==o?void 0:o[1])||void 0===n?void 0:n.split(":"))||void 0===t?void 0:t[0])||""})(d,i),g=((e,i)=>{const n=null==e?void 0:e.deviation_id;if(null!=n&&`${n}`.trim())return`${n}`;const t=i.match(/\.\/[^?:]+:(\d+)/);return(null==t?void 0:t[1])||"0"})(d,i),h=p.citationNumber||"0",y=f?`${f}:${g}:${h}`:p.localCitationId,b=p.queryParams.get("highlight_type")||"both",x=((e,i,n,t,l,d)=>{const a=o(e,i,n,t),r=(e=>(null==e?void 0:e.toLowerCase().includes("gap"))?"gaps_in_decision":"decisioning_factors")(d);return(Array.isArray(null==a?void 0:a[r])?a[r]:[]).find(e=>e.includes(`citationNumber=${l}`)||e.includes(`citation_number=${l}`)||e.includes(`deviation_summary$${l}`)||e.includes(`pdf_citation$${l}`)||e.trim().startsWith(`${l}.`))||""})(a,d,f,g,h,l)||((e="",i)=>{const n=e.indexOf(i);if(-1===n)return e.trim();const t=e.lastIndexOf("\n",n),o=e.indexOf("\n",n);return e.slice(-1===t?0:t+1,-1===o?e.length:o).trim()})(n,i),O={href:i,localCitationId:p.localCitationId,citationNumber:h,citationId:y,citedText:x,citationSection:l,highlightType:b,aiReasoning:d,treeData:a,docData:u},R={name:(null===(c=null==s?void 0:s.identity)||void 0===c?void 0:c.name)||(null==s?void 0:s.name)||"",organizationName:(null===(v=null==s?void 0:s.identity)||void 0===v?void 0:v.organizationName)||(null==s?void 0:s.organizationName)||"",prompt:"",useAgent:{agent_name:(null===(_=null==s?void 0:s.identity)||void 0===_?void 0:_.agentName)||(null==s?void 0:s.agentName)||"",metadata:t(s,O),arguments:{citation_type:(null==s?void 0:s.citationType)||"redline_citation",is_primary_agent_request:null!==(m=null==s?void 0:s.isPrimaryAgentRequest)&&void 0!==m&&m,ui_request_body:{request_id:(null==a?void 0:a.comparison_id)||(null==a?void 0:a.msgRequestId)||"",citation_id:y,cited_text:x,highlight_type:b,sources:r(a,u,f,g,h)}}}};return{context:O,payload:(null==s?void 0:s.buildPayload)?s.buildPayload(O,R):R}},s=e=>{var i;return(null===(i=null==e?void 0:e.request)||void 0===i?void 0:i.url)||(null==e?void 0:e.requestUrl)||""},c=(e,i,n)=>{var t,o,l,d;const a="function"==typeof(null===(t=e.request)||void 0===t?void 0:t.headers)?e.request.headers(n):null===(o=e.request)||void 0===o?void 0:o.headers,r="function"==typeof e.headers?e.headers(n):e.headers;return{method:(null===(l=e.request)||void 0===l?void 0:l.method)||e.method||"POST",headers:{"content-type":"application/json",...r||{},...a||{}},credentials:(null===(d=e.request)||void 0===d?void 0:d.credentials)||e.credentials,body:JSON.stringify(i)}};exports.buildRedlineOnDemandCitationPayload=u,exports.buildRedlineOnDemandPrefetchPayloads=({texts:i,aiReasoning:n,treeData:t,docData:o,config:l})=>{const d=new Set;return i.flatMap(({text:i="",citationSection:a})=>e.extractRedlineCitationRefs(i).filter(({href:e})=>!d.has(`${a||""}:${e}`)&&(d.add(`${a||""}:${e}`),!0)).map(({href:e,citedText:d})=>u({href:e,sourceText:d||i,citationSection:a,aiReasoning:n,treeData:t,docData:o,config:l})))},exports.buildRedlineOnDemandRequestInit=c,exports.fetchRedlineOnDemandCitation=async(e,i,n)=>{const t=s(e),o=c(e,i,n);if(!t)throw new Error("Missing redline on-demand citation request URL");if(e.fetcher)return e.fetcher({requestUrl:t,init:o,payload:i,context:n});const l=await fetch(t,o),d=await l.text();let a=d;try{a=d?JSON.parse(d):null}catch(e){a=d}if(!l.ok){const e=new Error(`Redline on-demand citation request failed with ${l.status}`);throw e.response=a,e}return e.transformResponse?e.transformResponse(a,n):a},exports.getRedlineOnDemandRequestUrl=s,exports.normalizeRedlineOnDemandStrategy=e=>"prefetchOnOpen"===e||"prefetchActiveTab"===e?"prefetchOnOpen":"onExpand";
|
|
2
|
-
//# sourceMappingURL=payload.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"payload.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/cjs/features/RequirementAI/components/userstory-with-citation/utils/inlineMarkdown.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const e=(e,t,r)=>e.replace(t,(e,t,g,n)=>`${t}${r(g)}${n}`);exports.convertInlineMarkdownToHtml=t=>{if(!t)return t;const r=[],g=e=>`ZXQINLINEPROTECTED${r.push(e)-1}QXZ`;let n=t.replace(/(`+)([^\n]*?)\1/g,(e,t,r)=>{return g(`<code>${n=r,n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}</code>`);var n});return n=n.replace(/\\\*/g,()=>g("*")),n=e(n,/\*{3}([ \t]*)(\S(?:[\s\S]*?\S)?)([ \t]*)\*{3}/g,e=>`<strong><em>${e}</em></strong>`),n=e(n,/_{3}([ \t]*)(\S(?:[\s\S]*?\S)?)([ \t]*)_{3}/g,e=>`<strong><em>${e}</em></strong>`),n=e(n,/\*{2}([ \t]*)(\S(?:[\s\S]*?\S)?)([ \t]*)\*{2}/g,e=>`<strong>${e}</strong>`),n=e(n,/_{2}([ \t]*)(\S(?:[\s\S]*?\S)?)([ \t]*)_{2}/g,e=>`<strong>${e}</strong>`),n=e(n,/\*([ \t]*)(\S(?:[\s\S]*?\S)?)([ \t]*)\*/g,e=>`<em>${e}</em>`),n.replace(/ZXQINLINEPROTECTED(\d+)QXZ/g,(e,t)=>{var g;return null!==(g=r[Number(t)])&&void 0!==g?g:""})};
|
|
2
|
-
//# sourceMappingURL=inlineMarkdown.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inlineMarkdown.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";function t(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}Object.defineProperty(exports,"__esModule",{value:!0});var e=t(require("react-hot-toast"));const r=(t,e)=>new Promise((r,o)=>{if(null==e?void 0:e.aborted)return void o(new DOMException("Operation aborted","AbortError"));const a=setTimeout(r,t);null==e||e.addEventListener("abort",()=>{clearTimeout(a),o(new DOMException("Operation aborted","AbortError"))},{once:!0})});exports.retryWithExponentialBackoff=async function(t,o={}){const{maxAttempts:a=5,initialDelayMs:n=500,maxDelayMs:i=3e4,backoffFactor:l=2,jitter:s=!0,signal:u,shouldRetry:c=()=>!0,onRetry:f}=o;if(a<1)throw new Error("maxAttempts must be at least 1");let d;for(let o=1;o<=a;o++){null==u||u.throwIfAborted();try{return await t(o)}catch(t){d=t;if(o===a||!c(t,o))throw t;const m=Math.min(n*l**(o-1),i),p=s?Math.floor(Math.random()*m):m;e.default.error(`Request failed. Retrying attempt ${o} of ${a}.`),null==f||f(t,o,p),await r(p,u)}}throw d};
|
|
2
|
-
//# sourceMappingURL=exponential-retry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"exponential-retry.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/features/RequirementAI/components/RichTextEditor/Editor/constants/updateTags.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"updateTags.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/codeBlockSerialization.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const e=e=>{e.querySelectorAll("pre > code").forEach(e=>{var t;const a=e.parentElement,l=null===(t=e.className.match(/(?:^|\s)language-([^\s]+)/))||void 0===t?void 0:t[1];l&&a.setAttribute("data-language",l),a.textContent=e.textContent})},t=e=>{e.querySelectorAll("pre").forEach(t=>{t.querySelectorAll("br").forEach(e=>e.replaceWith("\n"));const a=e.createElement("code");a.textContent=t.textContent;const l=t.getAttribute("data-language");l&&(a.className=`language-${l}`),t.replaceChildren(a)})};export{t as prepareCodeBlocksForExport,e as prepareCodeBlocksForImport};
|
|
2
|
-
//# sourceMappingURL=codeBlockSerialization.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codeBlockSerialization.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const t=(t,e)=>{let l=0;for(let r=e-1;r>=0&&"\\"===t[r];r-=1)l+=1;return l%2==1},e=new Set(["updated","upt","manual","deleted","changed","del","ins","preserved","mark"]),l=String.raw`(?:[^>"']|"[^"]*"|'[^']*')*`,r=[new RegExp(String.raw`^<\/(?:manual|upt|updated)\s*>`,"i"),new RegExp(String.raw`^<invisible\b${l}>[\s\S]*?<\/invisible\s*>`,"i"),new RegExp(String.raw`^<manual\b${l}>[\s\S]*?<\/manual\s*>`,"i"),new RegExp(String.raw`^<upt\b${l}>[\s\S]*?<\/upt\s*>`,"i")],n=t=>{let e=t.trim();for(;e;){const t=r.map(t=>e.match(t)).find(Boolean);if(!t)break;e=e.slice(t[0].length).trimStart()}return""===e},i=(e,l)=>{let r="";for(let n=l+1;n<e.length;n+=1){const l=e[n];if(r)l!==r||t(e,n)||(r="");else if('"'===l||"'"===l)r=l;else if(">"===l)return n}return-1},a=l=>{var r,a;const s=l.trimEnd(),u=[];let c="",o=0,h=0,g=-1,d=-1;for(let l=0;l<s.length;l+=1){if("<"===s[l]&&/[A-Za-z/]/.test(null!==(r=s[l+1])&&void 0!==r?r:"")){const t=i(s,l);if(-1!==t){const r=s.slice(l,t+1),n=r.match(/^<\s*(\/?)\s*([A-Za-z][\w:-]*)/),i=null!==(a=null==n?void 0:n[2].toLowerCase())&&void 0!==a?a:"";e.has(i)&&("/"===(null==n?void 0:n[1])?o=Math.max(0,o-1):/\/\s*>$/.test(r)||(o+=1)),c+=r,l=t;continue}}"|"!==s[l]||0!==o||t(s,l)?c+=s[l]:(u.push(c),c="",-1===g&&(g=l),d=l,h+=1)}if(u.push(c),!h)return null;const p=s.search(/\S/),f=p>=0&&"|"===s[p],v=!f&&n(u[0]),m=d===s.length-1,S=!m&&n(u[u.length-1]);return(f||v)&&u.shift(),(m||S)&&u.pop(),{cells:u,trailingPipe:m,firstStructuralPipe:g,lastStructuralPipe:d,hasLeadingMetadata:v,hasTrailingMetadata:S}},s=t=>!!t&&t.cells.length>0&&t.cells.every(t=>/^\s*:?-{3,}:?\s*$/.test(t)),u=(t,e,l)=>{var r,n;if(l<=0)return t;const i=null!==(n=null===(r=t.match(/\s*$/))||void 0===r?void 0:r[0])&&void 0!==n?n:"";return`${t.slice(0,t.length-i.length)}${e.trailingPipe?" |".repeat(l):` | |${" |".repeat(l-1)}`}${i}`},c=(t,e,l)=>{var r,n;if(l<=0)return t;const i=null!==(n=null===(r=t.match(/\s*$/))||void 0===r?void 0:r[0])&&void 0!==n?n:"";return`${t.slice(0,t.length-i.length)}${e.trailingPipe?" --- |".repeat(l):" | ---".repeat(l)}${i}`},o=t=>{const e=new Set;let l="",r=0;return t.forEach((t,n)=>{var i;const a=t.match(/^\s{0,3}(`{3,}|~{3,})/);l?(e.add(n),a&&a[1][0]===l&&a[1].length>=r&&/^\s*$/.test(t.slice((null!==(i=a.index)&&void 0!==i?i:0)+a[0].length))&&(l="",r=0)):a&&(l=a[1][0],r=a[1].length,e.add(n))}),e},h=t=>{var e;return{separators:null!==(e=t.match(/\r\n|\n|\r/g))&&void 0!==e?e:[],lines:t.split(/\r\n|\n|\r/)}},g=(t,e)=>t.map((t,l)=>{var r;return`${t}${null!==(r=e[l])&&void 0!==r?r:""}`}).join(""),d=t=>{let e=t,l=a(e);if(!l)return t;if(l.hasLeadingMetadata){const t=e.slice(0,l.firstStructuralPipe);e=e.slice(l.firstStructuralPipe,l.firstStructuralPipe+1)+t+e.slice(l.firstStructuralPipe+1),l=a(e)}if(null==l?void 0:l.hasTrailingMetadata){const t=e.slice(l.lastStructuralPipe+1);e=e.slice(0,l.lastStructuralPipe)+t+e.slice(l.lastStructuralPipe,l.lastStructuralPipe+1)}return e},p=t=>{const{lines:e,separators:l}=h(t),r=o(e);for(let t=1;t<e.length;t+=1){if(r.has(t)||r.has(t-1))continue;const l=a(e[t]),n=a(e[t-1]);if(s(l)&&n){e[t-1]=d(e[t-1]);for(let l=t+1;l<e.length&&(e[l].trim()&&!r.has(l));l+=1){const t=a(e[l]);if(!t||s(t))break;e[l]=d(e[l])}}}return g(e,l)},f=t=>{const{lines:e,separators:l}=h(t),r=o(e);for(let t=1;t<e.length;t+=1){if(r.has(t)||r.has(t-1))continue;const l=a(e[t]),n=a(e[t-1]);if(!s(l)||!n)continue;const i=Math.max(n.cells.length,l.cells.length);let o=i;for(let l=t+1;l<e.length&&(e[l].trim()&&!r.has(l));l+=1){const t=a(e[l]);if(!t||s(t))break;let r=t.cells.length;for(;r>i&&!t.cells[r-1].trim();)r-=1;o=Math.max(o,r)}e[t-1]=u(e[t-1],n,o-n.cells.length),e[t]=c(e[t],l,o-l.cells.length)}return g(e,l)},v=e=>{var l;let r="",n=!1,i="";for(let a=0;a<e.length;a+=1){const s=e[a];n?(r+=s,i?s!==i||t(e,a)||(i=""):'"'===s||"'"===s?i=s:">"===s&&(n=!1)):"<"===s&&/[A-Za-z/!?]/.test(null!==(l=e[a+1])&&void 0!==l?l:"")?(n=!0,r+=s):r+="|"!==s||t(e,a)?s:"\\|"}return r},m=(t,e)=>{var l,r;const n=e,i=0===Array.from(null!==(r=null===(l=n.parentElement)||void 0===l?void 0:l.children)&&void 0!==r?r:[]).indexOf(n);let a=t.trim().replace(/\n{2,}/g,"<br><br>").replace(/\n/g,"<br>");return/^(?:<br>)+$/.test(a)&&(a=""),a=v(a),i?a?`| ${a} |`:"| |":a?` ${a} |`:" |"};export{f as ensureMarkdownTableColumnCounts,v as escapeMarkdownTableCellPipes,m as markdownTableCellReplacement,p as normalizeMarkdownTableBoundaryMetadataForRendering};
|
|
2
|
-
//# sourceMappingURL=markdownTableSerialization.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"markdownTableSerialization.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{normalizeMarkdownTableBoundaryMetadataForRendering as e}from"./markdownTableSerialization.js";const t=String.raw`(?:[^>"']|"[^"]*"|'[^']*')*`,n=new RegExp(String.raw`<updated\b(${t})>([\s\S]*?)<\/updated\s*>`,"gi"),r=new RegExp(String.raw`<upt\b(${t})>([\s\S]*?)<\/upt\s*>`,"gi"),l=new RegExp(String.raw`<(deleted|changed)\b(${t})>([\s\S]*?)<\/\1\s*>`,"gi"),i=new Set(["updated","upt","manual","deleted","changed","del","ins","preserved","mark"]),s=(e,t)=>{let n=0;for(let r=t-1;r>=0&&"\\"===e[r];r-=1)n+=1;return n%2==1},d=(e,t)=>{let n="";for(let r=t+1;r<e.length;r+=1){const t=e[r];if(n)t!==n||s(e,r)||(n="");else if('"'===t||"'"===t)n=t;else if(">"===t)return r}return-1},a=e=>{var t,n;let r="",l=0;for(let a=0;a<e.length;a+=1){if("<"===e[a]&&/[A-Za-z/]/.test(null!==(t=e[a+1])&&void 0!==t?t:"")){const t=d(e,a);if(-1!==t){const s=e.slice(a,t+1),d=s.match(/^<\s*(\/?)\s*([A-Za-z][\w:-]*)/),o=null!==(n=null==d?void 0:d[2].toLowerCase())&&void 0!==n?n:"",c=i.has(o),u="/"===(null==d?void 0:d[1]),g=/\/\s*>$/.test(s);r+=c||l>0?s.replace(/\|/g,"|"):s,c&&u?l=Math.max(0,l-1):c&&!g&&(l+=1),a=t;continue}}"|"===e[a]&&l>0?(s(e,a)&&(r=r.slice(0,-1)),r+="|"):r+=e[a]}return r},o=e=>{const t=e.trim();if(!t.includes("|"))return null;const n=[];let r="";for(let e=0;e<t.length;e+=1){const l=t[e],i=e>0&&"\\"===t[e-1];"|"!==l||i?r+=l:(n.push(r.trim()),r="")}return n.push(r.trim()),t.startsWith("|")&&n.shift(),t.endsWith("|")&&n.pop(),n},c=e=>!!(null==e?void 0:e.length)&&e.every(e=>/^:?-{3,}:?$/.test(e)),u=e=>`| ${e.join(" | ")} |`,g=e=>e.replace(r,(e,t,n)=>{if(!(e=>{const t=e.split("\n");return t.some((e,n)=>{var r;return n>0&&c(o(e))&&!!(null===(r=o(t[n-1]))||void 0===r?void 0:r.length)})})(n))return e;return`<updated${t}>${n.replace(/<del\b([^>]*)>/gi,"<deleted$1>").replace(/<\/del\s*>/gi,"</deleted>").replace(/<ins\b([^>]*)>/gi,"<changed$1>").replace(/<\/ins\s*>/gi,"</changed>")}</updated>`}),p=r=>{if(!r)return"";let i=g(r).replace(n,(e,t,n)=>{if(!n.includes("|"))return e;if(!/\bid\s*=\s*["']ai_reasoning\$/i.test(t))return n;const r=/\bdata-main\b/i.test(t)?"":" data-main",l=((e,t)=>{const n=t.match(/\bid\s*=\s*["']([^"']+)["']/i);if(!n)return e;const r=encodeURIComponent(n[1]);return e.replace(/<(deleted|changed)\b([^>]*)>/gi,(e,t,n)=>/\bdata-upt-id\s*=/i.test(n)?e:`<${t}${n} data-upt-id="${r}">`)})(n,t);return`<upt${t}${r}></upt>\n\n${l}`});return i=(e=>{const n=new RegExp(String.raw`(<deleted\b${t}>(?:(?!<\/deleted\s*>)[\s\S])*?\|(?:(?!<\/deleted\s*>)[\s\S])*?<\/deleted\s*>)\s*(<changed\b${t}>[^|]*?<\/changed\s*>)\s*\|`,"gi"),r=e.replace(n,(e,t,n)=>{var r;return`${(null!==(r=t.replace(/<\/deleted\s*>$/i,"").trimEnd().split("\n").at(-1))&&void 0!==r?r:"").trimEnd().endsWith("|")?t:t.replace(/<\/deleted\s*>$/i," |</deleted>")}\n${n}`}),i=new RegExp(String.raw`(<deleted\b${t}>(?:(?!<\/deleted\s*>)[\s\S])*?\|(?:(?!<\/deleted\s*>)[\s\S])*?<\/deleted\s*>)\s*(?=<changed\b${t}>)`,"gi"),s=r.replace(i,"$1\n\n");return s.replace(l,(e,t,n,r,l)=>{if(!r.includes("|"))return e;const i=s.slice(0,l),d=/(?:^|\n)[ \t]*$/.test(i);return r.split("\n").map((e,r)=>{if(!e)return e;let l=e;l.includes("|")&&!/^\s*\|/.test(l)&&(r>0||d)&&(l=`| ${l}`);const i=o(l);return c(i)?l:l.split(/(\|)/).map(e=>"|"!==e&&e.trim()?`<${t}${n}>${e}</${t}>`:e).join("")}).join("\n")})})(i),i=i.replace(/([([])\s+(?=<(?:deleted|changed)>)/gi,"$1"),i=a(i),i=e(i),(e=>{const t=e.split("\n");for(let e=1;e<t.length;e+=1){const n=o(t[e]);if(!c(n))continue;const r=o(t[e-1]);if(!(null==r?void 0:r.length))continue;for(;r.length>n.length;){const e=r.findIndex(e=>""===e);if(-1===e)break;r.splice(e,1)}const l=Math.max(r.length,n.length);let i=e+1,s=0;for(;i<t.length&&""!==t[i].trim();){const e=o(t[i]);if(!e)break;for(;e.length>l;){const t=e.findIndex(e=>""===e);if(-1===t)break;e.splice(t,1)}t[i]=u(e),s=Math.max(s,e.length),i+=1}const d=Math.max(r.length,n.length,s);for(;r.length<d;)r.push("");for(;n.length<d;)n.push("---");t[e-1]=u(r),t[e]=u(n)}return t.join("\n")})(i)};export{p as normalizeRedlineMarkdown,a as protectReviewTagPipesForRendering};
|
|
2
|
-
//# sourceMappingURL=normalizeRedlineMarkdown.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"normalizeRedlineMarkdown.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const e=(e,n)=>{let t=0;for(let r=n-1;r>=0&&"\\"===e[r];r-=1)t+=1;return t%2==1},n=e=>/[\p{L}\p{N}]/u.test(e),t=(n,t)=>{let r="",l=0,o="",s=!1,a=0;return n.split(/(\r?\n)/).map(n=>{var i;if(/^\r?\n$/.test(n))return n;const c=s||a?null:n.match(/^\s*(`{3,}|~{3,})/);if(r)return c&&c[1][0]===r&&c[1].length>=l&&(r="",l=0),n;if(c)return r=c[1][0],l=c[1].length,n;let d="";for(let r=0;r<n.length;r+=1){const l=n[r];if(s){d+=l,o?l!==o||e(n,r)||(o=""):'"'===l||"'"===l?o=l:">"===l&&(s=!1);continue}if(!a&&"<"===l&&/[A-Za-z/!?]/.test(null!==(i=n[r+1])&&void 0!==i?i:"")){s=!0,d+=l;continue}if("`"===l&&!e(n,r)){let e=1;for(;"`"===n[r+e];)e+=1;a?a===e&&(a=0):a=e,d+=n.slice(r,r+e),r+=e-1;continue}if(a){d+=l;continue}const c=t(n,r);c?(d+=c.value,r+=c.consumedLength-1):d+=l}return d}).join("")},r=r=>t(r,(t,r)=>{var l,o;if("_"!==t[r]||e(t,r))return null;let s=1;for(;"_"===t[r+s];)s+=1;return n(null!==(l=t[r-1])&&void 0!==l?l:"")&&n(null!==(o=t[r+s])&&void 0!==o?o:"")?{consumedLength:s,value:"\\_".repeat(s)}:null}),l=e=>Array.from(e.matchAll(/[\p{L}\p{N}]+(?:(?:\\?_)+[\p{L}\p{N}]+)+/gu),e=>{var n;return{index:null!==(n=e.index)&&void 0!==n?n:0,raw:e[0],visible:e[0].replace(/\\_/g,"_")}}),o=(r,o)=>{let s=t(o,(t,r)=>{var l,o;if("\\"!==t[r]||e(t,r))return null;let s=r,a=0;for(;"\\"===t[s]&&"_"===t[s+1]&&!e(t,s);)a+=1,s+=2;return a&&n(null!==(l=t[r-1])&&void 0!==l?l:"")&&n(null!==(o=t[s])&&void 0!==o?o:"")?{consumedLength:s-r,value:"_".repeat(a)}:null});const a=l(r),i=l(s);if(!a.length||!i.length)return s;const c=Array.from({length:a.length+1},()=>Array(i.length+1).fill(0));for(let e=a.length-1;e>=0;e-=1)for(let n=i.length-1;n>=0;n-=1)c[e][n]=a[e].visible===i[n].visible?c[e+1][n+1]+1:Math.max(c[e+1][n],c[e][n+1]);const d=[];let g=0,u=0;for(;g<a.length&&u<i.length;)a[g].visible===i[u].visible?(d.push({sourceIndex:g,generatedIndex:u}),g+=1,u+=1):c[g+1][u]>=c[g][u+1]?g+=1:u+=1;return d.sort((e,n)=>i[n.generatedIndex].index-i[e.generatedIndex].index).forEach(({sourceIndex:e,generatedIndex:n})=>{const t=a[e],r=i[n];t.raw!==r.raw&&(s=s.slice(0,r.index)+t.raw+s.slice(r.index+r.raw.length))}),s},s=e=>/^(?:B|STRONG)$/.test(e.tagName)?"bold":/^(?:I|EM)$/.test(e.tagName)?"italic":"",a=e=>0===e.attributes.length,i=e=>{var n;Array.from(e.classList).filter(e=>e.startsWith("PlaygroundEditorTheme__")).forEach(n=>e.classList.remove(n)),e.classList.length||e.removeAttribute("class");const t=e;"pre-wrap"===t.style.whiteSpace&&t.style.removeProperty("white-space"),(null===(n=t.getAttribute("style"))||void 0===n?void 0:n.trim())||t.removeAttribute("style")},c=e=>{e.querySelectorAll("b, strong, i, em").forEach(i);let n=!0;for(;n;){n=!1,e.querySelectorAll("b b, b strong, strong b, strong strong, i i, i em, em i, em em").forEach(e=>{const t=e.parentElement;t&&s(t)===s(e)&&a(e)&&(e.replaceWith(...Array.from(e.childNodes)),n=!0)});[e,...Array.from(e.querySelectorAll("*"))].forEach(e=>{let t=e.firstChild;for(;t;){const e=t.nextSibling;t instanceof Element&&e instanceof Element&&s(t)&&s(t)===s(e)&&a(t)&&a(e)?(t.append(...Array.from(e.childNodes)),e.remove(),n=!0):t=e}})}},d=t=>{var r,l,o;const s=[],a=[];let i="",c=!1,d=0;for(let g=0;g<t.length;g+=1){const u=t[g];if(c){i?u!==i||e(t,g)||(i=""):'"'===u||"'"===u?i=u:">"===u&&(c=!1);continue}if(!d&&"<"===u&&/[A-Za-z/!?]/.test(null!==(r=t[g+1])&&void 0!==r?r:"")){c=!0;continue}if("`"===u&&!e(t,g)){let e=1;for(;"`"===t[g+e];)e+=1;d?d===e&&(d=0):d=e,g+=e-1;continue}if(d||"*"!==u&&"_"!==u)continue;if(e(t,g))continue;let h=1;for(;t[g+h]===u;)h+=1;const p=null!==(l=t[g-1])&&void 0!==l?l:"",m=null!==(o=t[g+h])&&void 0!==o?o:"",f="_"===u&&n(p)&&n(m),x=""!==m&&!/\s/.test(m)&&!f;let I=0,$=h;if(""!==p&&!/\s/.test(p)&&!f){let e=a.at(-1);for(;e&&e.marker===u&&$>=e.markerLength;)s.push({...e,closeIndex:g+I}),I+=e.markerLength,$-=e.markerLength,a.pop(),e=a.at(-1)}x&&$>0&&$<=3&&a.push({openIndex:g+I,marker:u,markerLength:$}),g+=h-1}return s.sort((e,n)=>e.openIndex-n.openIndex)},g=e=>{let n="";return e.split("\n").map(e=>{const t=e.match(/^\s*(`{3,}|~{3,})/);if(t){const r=t[1][0];return n?n===r&&(n=""):n=r,e}return n?e:e.split(/(`+[^`]*`+)/g).map((e,n)=>n%2==1?e:e.replace(/\*{3}([ \t]*)(\S(?:.*?\S)?)([ \t]*)\*{3}/g,(e,n,t,r)=>`${n}***${t}***${r}`)).join("")}).join("\n")},u=e=>e.replace(/(<(?:manual|upt)\b(?:[^>"']|"[^"]*"|'[^']*')*>)(<del\b(?:[^>"']|"[^"]*"|'[^']*')*>)(\*{1,3}|_{1,3})([\s\S]*?)(<\/del\s*>)([ \t]*)(<ins\b(?:[^>"']|"[^"]*"|'[^']*')*>)\3([\s\S]*?)(<\/ins\s*>)(<\/(?:manual|upt)\s*>)([^\n]*?)\3/g,(e,n,t,r,l,o,s,a,i,c,d,g)=>`${r}${n}${t}${l}${o}${s}${a}${i}${c}${d}${g}${r}`),h=e=>e.replace(/(<(?:manual|upt)\b(?:[^>"']|"[^"]*"|'[^']*')*>[\s\S]*?<ins\b(?:[^>"']|"[^"]*"|'[^']*')*>)([\s\S]*?)(<\/ins\s*>[\s\S]*?<\/(?:manual|upt)\s*>)/gi,(e,n,t,r,l,o)=>{const s=o.lastIndexOf("\n",Math.max(0,l-1))+1,a=o.indexOf("\n",l+e.length),i=o.slice(s,l),c=o.slice(l+e.length,-1===a?o.length:a);if(!["**","__"].some(e=>i.includes(e)&&c.includes(e)))return e;return`${n}${t.replace(/(\*{2}|_{2})([ \t]+)((\*{3}|_{3})(\S(?:.*?\S)?)\4)([ \t]+)\1/g,(e,n,t,r,l,o,s)=>`${t}${r}${s}`)}${r}`}),p=e=>e.split(/(`+[^`]*`+|<(?:[^>"']|"[^"]*"|'[^']*')*>)/g).map((e,n)=>n%2==1?e:e.replace(/\*{1,3}/g,"")).join("").replace(/[ \t]*(<\/?(?:manual|upt)\b(?:[^>"']|"[^"]*"|'[^']*')*>)[ \t]*/gi,"$1").replace(/\r\n/g,"\n"),m=(e,n)=>{const t=e.split(/(\r?\n\r?\n)/),r=n.split(/(\r?\n\r?\n)/);return t.length!==r.length?n:r.map((e,n)=>{if(n%2==1)return e;const r=t[n],l=p(r)===p(e),o=/<(?:manual|upt)\b/i.test(r),s=/\*{4,}/.test(e);return l&&(o||s)?r:e}).join("")},f=e=>{const n=[];let t="",r=0;return e.split("\n").forEach(e=>{const l=e.match(/^\s*(`{3,}|~{3,})/);if(l){const n=l[1][0];return t?t===n&&(t=""):t=n,void(r+=e.length+1)}if(!t){let t=0;e.split(/(`+[^`]*`+)/g).forEach((e,l)=>{l%2==0&&Array.from(e.matchAll(/\*{3}([ \t]*)(\S(?:.*?\S)?)([ \t]*)\*{3}/g)).forEach(e=>{var l;const o=r+t+(null!==(l=e.index)&&void 0!==l?l:0);n.push({openIndex:o,closeIndex:o+e[0].length-3,leadingSpace:e[1],content:e[2],trailingSpace:e[3]})}),t+=e.length})}r+=e.length+1}),n},x=e=>d(e).flatMap(e=>[{index:e.openIndex,length:e.markerLength},{index:e.closeIndex,length:e.markerLength}]).sort((e,n)=>n.index-e.index).reduce((e,n)=>e.slice(0,n.index)+e.slice(n.index+n.length),e),I=/(<(manual|upt)\b(?:[^>"']|"[^"]*"|'[^']*')*>[\s\S]*?<\/\2\s*>)/gi,$=(e,n)=>{n=((e,n)=>{const t=f(e),r=f(n);if(!t.length||!r.length)return n;const l=[];if(t.length===r.length)r.forEach((e,n)=>{l.push({sourceIndex:n,generatedIndex:n})});else{let e=0;r.forEach((n,r)=>{const o=t.findIndex((t,r)=>r>=e&&t.content===n.content);-1!==o&&(l.push({sourceIndex:o,generatedIndex:r}),e=o+1)})}let o=n;return l.sort((e,n)=>r[n.generatedIndex].openIndex-r[e.generatedIndex].openIndex).forEach(({sourceIndex:e,generatedIndex:n})=>{const l=t[e],s=r[n],a=`***${l.leadingSpace}${s.content}${l.trailingSpace}***`;o=o.slice(0,s.openIndex)+a+o.slice(s.closeIndex+3)}),o})(e,n),n=((e,n)=>{const t=d(e).filter(n=>/<(?:manual|upt)\b/i.test(e.slice(n.openIndex+n.markerLength,n.closeIndex)));let r=n;return t.sort((e,n)=>n.openIndex-e.openIndex).forEach(n=>{const t=n.marker.repeat(n.markerLength),l="*".repeat(n.markerLength),o=e.slice(n.openIndex+n.markerLength,n.closeIndex),s=o.split(new RegExp(I.source,"gi")).filter((e,n)=>e&&(n%3==0||n%3==1)).map(e=>/^<(?:manual|upt)\b/i.test(e)?e:`${l}${e}${l}`).join(""),a=`${t}${o}${t}`;s&&r.includes(s)&&(r=r.replace(s,a))}),r})(e,n);const t=d(e),r=d(n),l=(e,n)=>e.slice(n.openIndex+n.markerLength,n.closeIndex).replace(/\r\n/g,"\n"),o=t.map(n=>l(e,n)),s=r.map(e=>l(n,e)),a=[],i=(e,n)=>t[e].markerLength===r[n].markerLength&&o[e]===s[n],c=Array.from({length:o.length+1},()=>Array(s.length+1).fill(0));for(let e=o.length-1;e>=0;e-=1)for(let n=s.length-1;n>=0;n-=1)c[e][n]=i(e,n)?c[e+1][n+1]+1:Math.max(c[e+1][n],c[e][n+1]);let g=0,u=0;for(;g<o.length&&u<s.length;)i(g,u)?(a.push({sourceIndex:g,generatedIndex:u}),g+=1,u+=1):c[g+1][u]>=c[g][u+1]?g+=1:u+=1;if(t.length===r.length){const e=new Set(a.map(e=>e.generatedIndex));for(let n=0;n<r.length;n+=1)e.has(n)||t[n].markerLength!==r[n].markerLength||a.push({sourceIndex:n,generatedIndex:n})}let h=n;return a.sort((e,n)=>n.generatedIndex-e.generatedIndex),a.forEach(({sourceIndex:e,generatedIndex:n})=>{const l=t[e],o=r[n],s=l.marker.repeat(l.markerLength);h=h.slice(0,o.closeIndex)+s+h.slice(o.closeIndex+o.markerLength),h=h.slice(0,o.openIndex)+s+h.slice(o.openIndex+o.markerLength)}),h};export{d as collectMarkdownEmphasisRanges,x as markdownWithoutEmphasisMarkers,g as normalizeCombinedEmphasisForRendering,h as normalizeNestedReviewEmphasisForRendering,c as normalizeRedundantInlineFormattingElements,u as normalizeReviewBoundaryEmphasisForRendering,$ as preserveEmphasisMarkersFromSource,o as preserveLiteralMidWordUnderscoresFromSource,m as preserveUnchangedEmphasisParagraphsFromSource,r as protectLiteralMidWordUnderscoresForRendering};
|
|
2
|
-
//# sourceMappingURL=preserveMarkdownEmphasis.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"preserveMarkdownEmphasis.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import e from"showdown";const n=new Set(Array.from("`*_{}[]()>#+.!~=|:-")),t=e=>e.replace(/&(?:#\d+|#x[\da-f]+|[a-z][\da-z]+);/gi,e=>{const n=document.createElement("textarea");return n.innerHTML=e,n.value}),r=/<!--\s*([a-f0-9]{8}(?:-[a-f0-9]{4}){3}-[a-f0-9]{12})\s*-->/gi,a=/<invisible\b[^>]*\bid=(["'])([a-f0-9]{8}(?:-[a-f0-9]{4}){3}-[a-f0-9]{12})\1[^>]*>\s*<\/invisible>/gi,l=new e.Converter({tables:!0,simpleLineBreaks:!0,literalMidWordUnderscores:!0}),o=e=>e.split(/\r?\n/).filter(e=>/^ {0,3}\[[^\]]+\]:\s*\S/.test(e)).join("\n"),s=e=>e.replace(r,(e,n)=>`ZXQDOCUMENTANCHOR${n.replace(/-/g,"")}QXZ`).replace(a,(e,n,t)=>`ZXQDOCUMENTANCHOR${t.replace(/-/g,"")}QXZ`),c=(e,n)=>{const t=l.makeHtml(n?`${s(e)}\n\n${n}`:s(e)).replace(/\r\n/g,"\n");return(new DOMParser).parseFromString(t,"text/html").body.innerHTML},i=e=>{var r;let a="";for(let t=0;t<e.length;t+=1){if("\\"!==e[t]){a+=e[t];continue}let l=1;for(;"\\"===e[t+l];)l+=1;const o=null!==(r=e[t+l])&&void 0!==r?r:"",s=n.has(o),c=s?Math.floor(l/2):Math.ceil(l/2);a+="\\".repeat(c),s?(a+=o,t+=l):t+=l-1}return t(a).replace(/\r\n/g,"\n")},d=e=>e.split(/(\r?\n\r?\n)/),p=e=>/[\p{L}\p{N}]/u.test(e),f=e=>{var r,a,l,o;const s=[];for(let c=0;c<e.length;c+=1){const d=e[c],f="&"===d?null===(r=e.slice(c).match(/^&(?:#\d+|#x[\da-f]+|[a-z][\da-z]+);/i))||void 0===r?void 0:r[0]:void 0;if(f)s.push({comparable:t(f),escapeKind:"entity",raw:f}),c+=f.length-1;else{if("\\"===d){let t=1;for(;"\\"===e[c+t];)t+=1;const r=null!==(a=e[c+t])&&void 0!==a?a:"",l=n.has(r),o=t+(l?1:0),d=e.slice(c,c+o);s.push({comparable:i(d),escapeKind:l?r:"\\",raw:d}),c+=o-1;continue}if(p(d)){let n=c+1;for(;p(null!==(l=e[n])&&void 0!==l?l:"");)n+=1;const t=e.slice(c,n);s.push({comparable:t,escapeKind:"",raw:t}),c=n-1;continue}if(/\s/.test(d)){let n=c+1;for(;/\s/.test(null!==(o=e[n])&&void 0!==o?o:"");)n+=1;const t=e.slice(c,n);s.push({comparable:t,escapeKind:"",raw:t}),c=n-1;continue}s.push({comparable:d,escapeKind:d,raw:d})}}return s},h=(e,n)=>{const t=d(e),r=d(n),a=t.filter((e,n)=>n%2==0),l=r.filter((e,n)=>n%2==0),s=a.map(i),p=l.map(i),h=o(e),u=o(n),g=new Array(a.length),m=new Array(l.length),w=(e,n)=>{var t,r;return a[e]===l[n]||s[e]===p[n]&&(null!==(t=g[e])&&void 0!==t||(g[e]=c(a[e],h)),null!==(r=m[n])&&void 0!==r||(m[n]=c(l[n],u)),g[e]===m[n])},v=Array.from({length:a.length+1},()=>new Uint32Array(l.length+1));for(let e=a.length-1;e>=0;e-=1)for(let n=l.length-1;n>=0;n-=1)v[e][n]=w(e,n)?v[e+1][n+1]+1:Math.max(v[e+1][n],v[e][n+1]);const x=new Map,b=new Set,M=[];let I=0,y=0;for(;I<a.length&&y<l.length;)w(I,y)?(x.set(y,I),b.add(I),M.push({sourceIndex:I,generatedIndex:y}),I+=1,y+=1):v[I+1][y]>=v[I][y+1]?I+=1:y+=1;const K=new Map,A=[{sourceIndex:-1,generatedIndex:-1},...M,{sourceIndex:a.length,generatedIndex:l.length}];for(let e=1;e<A.length;e+=1){const n=A[e-1],t=A[e],r=t.sourceIndex-n.sourceIndex-1;if(r===t.generatedIndex-n.generatedIndex-1)for(let e=1;e<=r;e+=1)K.set(n.generatedIndex+e,n.sourceIndex+e)}for(let e=0;e<l.length;e+=1){if(x.has(e))continue;const n=a.findIndex((n,t)=>!b.has(t)&&w(t,e));-1!==n&&(x.set(e,n),b.add(n))}let E=0;return r.map((e,n)=>{if(n%2==1)return e;const t=x.get(E),r=K.get(E);return E+=1,void 0!==t?a[t]:void 0===r?e:((e,n,t)=>{const r=f(e),a=f(n),l=Array.from({length:r.length+1},()=>new Uint32Array(a.length+1));for(let e=r.length-1;e>=0;e-=1)for(let n=a.length-1;n>=0;n-=1)l[e][n]=r[e].comparable===a[n].comparable?l[e+1][n+1]+1:Math.max(l[e+1][n],l[e][n+1]);const o=new Map;let s=0,i=0;for(;s<r.length&&i<a.length;)r[s].comparable===a[i].comparable?(o.set(i,s),s+=1,i+=1):l[s+1][i]>=l[s][i+1]?s+=1:i+=1;const d=new Map;o.forEach((e,n)=>{var t;const l=r[e],o=a[n];if(l.raw===o.raw||!l.raw.includes("\\")&&!o.raw.includes("\\")&&"entity"!==l.escapeKind&&"entity"!==o.escapeKind)return;const s=o.escapeKind||l.escapeKind,c="["===s||"]"===s?"brackets":s,i=null!==(t=d.get(c))&&void 0!==t?t:new Map;i.set(n,l.raw),d.set(c,i)});let p=a.map(e=>e.raw),h=n;d.forEach(e=>{const n=[...p];e.forEach((e,t)=>{n[t]=e});const r=n.join("");c(r,t)===c(h,t)&&(p=n,h=r)});const u=new Map;return a.forEach((e,n)=>{var t;if(o.has(n)||!e.raw.includes("\\"))return;const r=["[","]"].includes(e.escapeKind)?"brackets":e.escapeKind;u.set(r,[...null!==(t=u.get(r))&&void 0!==t?t:[],n])}),u.forEach(e=>{const n=[...p];e.forEach(e=>{n[e]=a[e].comparable});const r=n.join("");c(r,t)===c(h,t)&&(p=n,h=r)}),h})(a[r],e,u)}).join("")};export{i as markdownWithoutEscapeSpelling,h as preserveUnchangedMarkdownEscapesFromSource};
|
|
2
|
-
//# sourceMappingURL=preserveMarkdownEscapes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"preserveMarkdownEscapes.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const e=/<br\s*\/?>| {2,}\r?\n|\r\n|\r|\n/gi,t=e=>e.replace(/<[^>]*>/g," ").replace(/\\([*+\-=#`~[\]>_.])/g,"$1").replace(/[*_`~]+/g,"").replace(/ |\u00a0/gi," ").replace(/>/gi,">").replace(/</gi,"<").replace(/"/gi,'"').replace(/'|'/gi,"'").replace(/&/gi,"&").replace(/\s+/g," ").trim().toLocaleLowerCase(),r=r=>{const l=Array.from(r.matchAll(new RegExp(e.source,"gi")));return l.map((e,n)=>{var i,g,c,a;const s=null!==(i=e.index)&&void 0!==i?i:0,h=n>0?(null!==(g=l[n-1].index)&&void 0!==g?g:0)+l[n-1][0].length:0,f=null!==(a=null===(c=l[n+1])||void 0===c?void 0:c.index)&&void 0!==a?a:r.length;return{raw:e[0],left:t(r.slice(h,s).slice(-100)),right:t(r.slice(s+e[0].length,f).slice(0,100))}})},l=(t,l)=>{if(!t||!l)return l;const n=r(t),i=r(l);if(!n.length||!i.length)return l;if(n.length===i.length){let t=0;return l.replace(e,()=>n[t++].raw)}let g=0,c=0;return l.replace(e,e=>{const t=i[c++],r=n.findIndex((e,r)=>r>=g&&((e,t)=>{const r=Boolean(e.left&&t.left&&(e.left.endsWith(t.left)||t.left.endsWith(e.left))),l=Boolean(e.right&&t.right&&(e.right.startsWith(t.right)||t.right.startsWith(e.right)));if(r||l)return!0;const n=e.left&&e.left.length>=50&&t.left&&t.left.length>=50,i=e.right&&e.right.length>=50&&t.right&&t.right.length>=50;if(n){const r=e.left.slice(-30),l=t.left.slice(-30);if(r.split("").filter((e,t)=>l[t]===e).length>=15)return!0}if(i){const r=e.right.slice(0,30),l=t.right.slice(0,30);if(r.split("").filter((e,t)=>l[t]===e).length>=15)return!0}return!1})(e,t));return-1===r?e:(g=r+1,n[r].raw)})},n=/[^\S\r\n]*(?:\r?\n[^\S\r\n]*){2,}/g,i=e=>Array.from(e.matchAll(new RegExp(n.source,"g"))).map(r=>{var l;const n=null!==(l=r.index)&&void 0!==l?l:0,i=e.slice(0,n),g=e.slice(n+r[0].length);return{raw:r[0],left:t(i.slice(i.lastIndexOf("\n")+1).slice(-240)),right:t(g.split(/\r?\n/,1)[0].slice(0,240))}}),g=e=>{var t;return(null!==(t=e.match(/\r?\n/g))&&void 0!==t?t:[]).length},c=(e,t,r=!1)=>{if(!e||!t)return t;const l=i(e),c=i(t);if(!l.length||!c.length)return t;let a=0,s=0;return t.replace(n,e=>{const t=c[s++],n=l.findIndex((e,n)=>n>=a&&(e.left===t.left&&e.right===t.right||r&&l.length===c.length&&n===s-1)&&g(t.raw)<=g(e.raw)&&(e.raw.includes(" ")||g(t.raw)===g(e.raw)));return-1===n?e:(a=n+1,l[n].raw)})};export{l as preserveLineBreaksFromSource,c as preserveUnchangedWhitespaceRunsFromSource};
|
|
2
|
-
//# sourceMappingURL=preserveMarkdownLineBreaks.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"preserveMarkdownLineBreaks.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const n=n=>{const e=[];let t="";return n.forEach((n,r)=>{const c=n.match(/^\s*(`{3,}|~{3,})/);if(c){const n=c[1][0];return void(t?t===n&&(t=""):t=n)}if(t)return;const o=n.match(/^(\s*)([*+-]|\d+\.)([ \t]+)(.*)$/);o&&e.push({lineIndex:r,indent:o[1],marker:o[2],spacing:o[3],content:o[4]})}),e},e=(e,t)=>{if(!e||!t)return t;const r=e.split("\n"),c=t.split("\n"),o=n(r),s=n(c);if(!o.length||!s.length)return t;const d=[];if(o.length===s.length)s.forEach((n,e)=>{d.push({sourceIndex:e,generatedIndex:e})});else{let n=0;s.forEach((e,t)=>{const r=o.findIndex((t,r)=>r>=n&&t.content===e.content);-1!==r&&(d.push({sourceIndex:r,generatedIndex:t}),n=r+1)})}return d.forEach(({sourceIndex:n,generatedIndex:e})=>{const t=o[n],r=s[e];/\d/.test(t.marker+r.marker)&&t.marker!==r.marker||(c[r.lineIndex]=`${t.indent}${t.marker}${t.spacing}`+r.content)}),c.join("\n")};export{e as preserveListFormattingFromSource};
|
|
2
|
-
//# sourceMappingURL=preserveMarkdownListFormatting.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"preserveMarkdownListFormatting.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveReviewBlocks.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{markdownWithoutEmphasisMarkers as e}from"./preserveMarkdownEmphasis.js";import{markdownWithoutEscapeSpelling as r}from"./preserveMarkdownEscapes.js";const n=new RegExp(String.raw`<(manual|upt|updated)\b((?:[^>"']|"[^"]*"|'[^']*')*)>([\s\S]*?)<\/\1\s*>`,"gi"),i=new RegExp(String.raw`<del\b(?:[^>"']|"[^"]*"|'[^']*')*>[\s\S]*?<\/del\s*>[ \t\r\n]*<ins\b(?:[^>"']|"[^"]*"|'[^']*')*>[\s\S]*?<\/ins\s*>`,"gi"),s=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),t=e=>{var r,n;return null!==(n=null===(r=e.match(/\bid\s*=\s*(?:"([^"]*)"|'([^']*)')/i))||void 0===r?void 0:r.slice(1).find(Boolean))&&void 0!==n?n:""},l=n=>e(r(n)).replace(/<(\/)?(del|ins|changed|preserved)\b[^>]*>/gi,(e,r,n)=>` ZXQ${r?"CLOSE":"OPEN"}${String(n).toUpperCase()}QXZ `).replace(/<br\s*\/?>/gi,"\n").replace(/\\\|/g,"|").replace(/<[^>]*>/g,"").replace(/ |\u00a0/gi," ").replace(/>/gi,">").replace(/</gi,"<").replace(/"/gi,'"').replace(/'|'/gi,"'").replace(/&/gi,"&").replace(/\s+/g," ").trim(),a=(e,r)=>{const a=Array.from(e.matchAll(new RegExp(n.source,"gi")));let c=r;return a.forEach(e=>{const[,r,n,a]=e,o=t(n);if(!o)return;const p=s(o),g=new RegExp(String.raw`<${r}\b(?=(?:[^>"']|"[^"]*"|'[^']*')*\bid\s*=\s*(?:"${p}"|'${p}'))((?:[^>"']|"[^"]*"|'[^']*')*)>([\s\S]*?)<\/${r}\s*>`,"i");c=c.replace(g,(r,n,i)=>l(a)===l(i)?e[0]:r),c=((e,r,n,i)=>{const a=t(r),c=n.search(/^\|/m);if(!a||c<0)return i;if(n.slice(c).trimEnd().split(/\r?\n/).some(e=>!e.startsWith("|")))return i;const o=s(a),p=new RegExp(String.raw`<${e}\b(?=(?:[^>"']|"[^"]*"|'[^']*')*\bid\s*=\s*(?:"${o}"|'${o}'))((?:[^>"']|"[^"]*"|'[^']*')*)>([\s\S]*?)<\/${e}\s*>`,"i").exec(i);if(!p||void 0===p.index)return i;const g=i.slice(p.index+p[0].length).match(/^([\t \r\n]*)(\|[^\r\n]*(?:\r?\n\|[^\r\n]*)*)/);if(!g)return i;const d=/\s$/.test(p[2])?"":g[1],u=`${p[2]}${d}${g[2]}`,$=l(n)===l(u)?`<${e}${r}>${n}</${e}>`:`<${e}${r}>${u}</${e}>`,m=p[0].length+g[0].length;return i.slice(0,p.index)+$+i.slice(p.index+m)})(r,n,a,c),c=((e,r,n,a)=>{var c;const o=t(r);if(!o)return a;const p=s(o);if(new RegExp(String.raw`<(?:manual|upt)\b(?=(?:[^>"']|"[^"]*"|'[^']*')*\bid\s*=\s*(?:"${p}"|'${p}'))`,"i").test(a))return a;const g=null===(c=n.match(new RegExp(`^\\s*(${i.source})\\s*$`,"i")))||void 0===c?void 0:c[1];if(!g)return a;const d=l(g),u=Array.from(a.matchAll(new RegExp(i.source,"gi"))).find(e=>{var r;return!((e,r)=>{const n=/<(\/)?(?:manual|upt)\b(?:[^>"']|"[^"]*"|'[^']*')*>/gi;let i,s=0;for(;null!==(i=n.exec(e))&&i.index<r;)s+=i[1]?-1:1;return s>0})(a,null!==(r=e.index)&&void 0!==r?r:0)&&l(e[0])===d});if(!u||void 0===u.index)return a;const $=`<${e}${r}>${u[0]}</${e}>`;return a.slice(0,u.index)+$+a.slice(u.index+u[0].length)})(r,n,a,c)}),c};export{t as getReviewId,a as preserveUnchangedReviewBlocksFromSource};
|
|
2
|
-
//# sourceMappingURL=preserveReviewBlocks.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"preserveReviewBlocks.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{$nodesOfType as t,$isTextNode as e,$createTextNode as o}from"lexical";import{ManualNode as n}from"../plugins/ManualNode.js";import{UpdateNode as i}from"../plugins/UpdateNode.js";const r=(t,e)=>`${"updated"===t.toLowerCase()?"upt":t.toLowerCase()}:${e}`,l=t=>{const e=new Map;return t.querySelectorAll("manual[id], upt[id], updated[id]").forEach(t=>{var o,n,i,l,a,d;const u=t.getAttribute("id");if(!u)return;const s=null===(n=null===(o=t.previousSibling)||void 0===o?void 0:o.textContent)||void 0===n?void 0:n.match(/[ \t]+$/),f=null!==(i=null==s?void 0:s[0])&&void 0!==i?i:"",p=null===(a=null===(l=t.nextSibling)||void 0===l?void 0:l.textContent)||void 0===a?void 0:a.match(/^[ \t]+/),c=null!==(d=null==p?void 0:p[0])&&void 0!==d?d:"";e.set(r(t.tagName,u),{before:f,after:c})}),e},a=l=>{[...t(n).map(t=>({tag:"manual",node:t})),...t(i).map(t=>({tag:"upt",node:t}))].forEach(({tag:t,node:n})=>{const i=n.getId(),a=l.get(r(t,i));if(!a)return;const d=n.getPreviousSibling();if(e(d)){const t=d.getTextContent();d.setTextContent(`${t.replace(/[ \t]*$/,"")}${a.before}`)}else a.before&&n.insertBefore(o(a.before));const u=n.getNextSibling();if(e(u)){const t=u.getTextContent();u.setTextContent(`${a.after}${t.replace(/^[ \t]*/,"")}`)}else a.after&&n.insertAfter(o(a.after))})};export{l as collectReviewBoundaryWhitespace,a as restoreReviewBoundaryWhitespace};
|
|
2
|
-
//# sourceMappingURL=preserveReviewBoundaryWhitespace.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"preserveReviewBoundaryWhitespace.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const n=n=>{const e=[],t=[],r=/\r\n|\n|\r|\\r\\n|\\n|\\r/g;let l,s=0;for(;null!==(l=r.exec(n));)e.push(n.slice(s,l.index)),t.push(l[0]),s=l.index+l[0].length;return e.push(n.slice(s)),{lines:e,separators:t}},e=(n,e)=>{let t=0;for(let r=e-1;r>=0&&"\\"===n[r];r-=1)t+=1;return t%2==1},t=n=>n.flatMap((n,t)=>{const r=(n=>{let t=n.trim();if(!t.includes("|"))return 0;t.startsWith("|")&&(t=t.slice(1)),t.endsWith("|")&&!e(t,t.length-1)&&(t=t.slice(0,-1));const r=[];let l="";for(let n=0;n<t.length;n+=1)"|"!==t[n]||e(t,n)?l+=t[n]:(r.push(l.trim()),l="");return r.push(l.trim()),r.length>=2&&r.every(n=>/^:?-{3,}:?$/.test(n))?r.length:0})(n);return r?[{lineIndex:t,columnCount:r,raw:n}]:[]}),r=(e,r)=>{if(!e||!r)return r;const l=n(e),s=n(r),u=t(l.lines),i=t(s.lines);if(!u.length||!i.length)return r;let o=0;return i.forEach((n,e)=>{let t=u.findIndex((e,t)=>t>=o&&e.columnCount===n.columnCount);if(t<0){const r=u[e];if(!r||r.columnCount!==n.columnCount)return;t=e}s.lines[n.lineIndex]=u[t].raw,o=t+1}),(({lines:n,separators:e})=>n.map((n,t)=>{var r;return`${n}${null!==(r=e[t])&&void 0!==r?r:""}`}).join(""))(s)};export{r as preserveTableDelimiterRowsFromSource};
|
|
2
|
-
//# sourceMappingURL=preserveTableDelimiters.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"preserveTableDelimiters.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{escapeMarkdownTableCellPipes as e}from"./markdownTableSerialization.js";const r=["upt","updated","manual","ins","del","preserved","deleted","changed","mark"],t=(e,r,t=[])=>{const o=new Set(t);let n=e;for(;r.includes(n)||o.has(n);)n=`Z${n}`;return n},o=(n,l,a=Boolean(n.closest("td, th")))=>{const c=n.cloneNode(!0),i=new Map;Array.from(c.querySelectorAll(r.join(","))).forEach(e=>{if(!c.contains(e))return;const r=t(`ZXQNESTEDREVIEWTOKEN${i.size}QXZ`,c.innerHTML,i.keys());i.set(r,o(e,l,a)),e.replaceWith(c.ownerDocument.createTextNode(r))});const s=new Map;a&&c.querySelectorAll("br").forEach(e=>{const r=t(`ZXQTABLEBREAKTOKEN${s.size}QXZ`,c.innerHTML,s.keys());s.set(r,"<br>"),e.replaceWith(c.ownerDocument.createTextNode(r))});let u=l.turndown(c.innerHTML);s.forEach((e,r)=>{u=u.replace(r,e)}),i.forEach((e,r)=>{u=u.replace(r,e)}),a&&(u=e(u));const d=Array.from(n.attributes).map(e=>`${e.name}="${e.value}"`).join(" "),m=n.tagName.toLowerCase();return d?`<${m} ${d}>${u}</${m}>`:`<${m}>${u}</${m}>`},n=(e,n)=>{var l,a,c,i;const s=[],u=r.join(","),d=Array.from(e.querySelectorAll(u)).filter(e=>{var r;return!(null===(r=e.parentElement)||void 0===r?void 0:r.closest(u))}),m=null!==(i=null!==(c=null!==(a=null===(l=e.documentElement)||void 0===l?void 0:l.outerHTML)&&void 0!==a?a:e.innerHTML)&&void 0!==c?c:e.textContent)&&void 0!==i?i:"";return d.forEach(e=>{const r=t(`ZXQREVIEWTOKEN${s.length}QXZ`,m,s.map(e=>e.placeholder));s.push({html:o(e,n),placeholder:r}),e.replaceWith(e.ownerDocument.createTextNode(r))}),s},l=(e,r)=>{let t=e;for(let e=r.length-1;e>=0;e-=1){const{html:o,placeholder:n}=r[e];t=t.replace(n,o)}return t};export{n as replaceReviewNodesWithMarkdownPlaceholders,l as restoreReviewNodePlaceholders,o as serializeReviewNodeToMarkdown};
|
|
2
|
-
//# sourceMappingURL=reviewNodeSerialization.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"reviewNodeSerialization.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const t=(t="")=>{var e;const[n="",i=""]=t.split("$"),[r="",a=""]=i.split("?"),c=new URLSearchParams(a),o=c.get("citationNumber")||c.get("citation_number")||"",s=(null===(e=r.match(/^\d+/))||void 0===e?void 0:e[0])||"";return{citationType:n,localCitationId:r,citationNumber:o||s,queryParams:c}},e=(t,e)=>{const n=t.lastIndexOf("\n",e),i=t.indexOf("\n",e);return t.slice(-1===n?0:n+1,-1===i?t.length:i).trim()},n=(t="")=>{const n=[],i=new Set,r=/href=(["'])(.*?)\1/gi;let a;for(;null!==(a=r.exec(t));){const r=a[2]||"";r.startsWith("pdf_citation$")&&!i.has(r)&&(i.add(r),n.push({href:r,citedText:e(t,a.index)}))}return n};export{n as extractRedlineCitationRefs,t as parseRedlineCitationHref};
|
|
2
|
-
//# sourceMappingURL=href.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"href.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{extractRedlineCitationRefs as i,parseRedlineCitationHref as n}from"./href.js";const e=(i,n)=>{var e;return n&&(null===(e=(i=>(null==i?void 0:i.nodes)||i||{})(i))||void 0===e?void 0:e[n])||null},t=(i,n)=>(null==i?void 0:i.documents)||(null==n?void 0:n.documents)||{},o=(i,n)=>{var e,t,o,l,d;const a="function"==typeof(null==i?void 0:i.metadata)?i.metadata(n):(null==i?void 0:i.metadata)||(null===(e=null==i?void 0:i.identity)||void 0===e?void 0:e.metadata)||((null===(t=null==i?void 0:i.identity)||void 0===t?void 0:t.userName)||(null===(o=null==i?void 0:i.identity)||void 0===o?void 0:o.userEmailId)?{userName:(null===(l=null==i?void 0:i.identity)||void 0===l?void 0:l.userName)||"",userEmailId:(null===(d=null==i?void 0:i.identity)||void 0===d?void 0:d.userEmailId)||""}:void 0);return"string"==typeof a?a:a&&"object"==typeof a?JSON.stringify(a):"{}"},l=(i,n,t,o)=>{var l,d,a,r,u,s;const v=null===(d=null===(l=e(i,t))||void 0===l?void 0:l.evaluation_result)||void 0===d?void 0:d[o];return(null===(a=null==v?void 0:v.deviation_fix_details)||void 0===a?void 0:a.cognitive_decisioning)||(null==v?void 0:v.cognitive_decisioning)||(null===(u=null===(r=null==n?void 0:n.redlining_details)||void 0===r?void 0:r.deviation_fix_details)||void 0===u?void 0:u.cognitive_decisioning)||(null===(s=null==n?void 0:n.redlining_details)||void 0===s?void 0:s.cognitive_decisioning)||null},d=(i,n,t)=>{var o;const l=e(i,n),d=(i=>(null==i?void 0:i.content_mapping)||{})(i),a=null===(o=null==l?void 0:l.comparison_inputs)||void 0===o?void 0:o[t];return(r=a,Array.isArray(r)?r:null==r?[]:[r]).map(i=>"string"==typeof i?null==d?void 0:d[i]:i).filter(Boolean);var r},a=(i,n)=>{const e=`${(null==i?void 0:i.role)||(null==i?void 0:i.contract_role)||""}`.toLowerCase();return"base"===e||"uploaded"===e?"base":n},r=(i,n,e,o,l,r)=>{const u=t(i,n),s=(null==u?void 0:u[o])||{},v=d(i,e,o),c=v[0]||{},_=v.map(i=>(null==i?void 0:i.content)||(null==i?void 0:i.change_history)||"").filter(Boolean).join("\n\n"),m=(null==r?void 0:r.custom_metadata)||(null==r?void 0:r.customMetaData)||{},p=(null==c?void 0:c.additional_attributes)||{};return{contract_uuid:o,contract_role:a(s,l),source_type:"text",content:{text:_||(null==r?void 0:r.highlighted_text)||""},gcs_source_link:(null==s?void 0:s.source_uri)||(null==s?void 0:s.gcs_source_link)||(null==m?void 0:m.gcs_source_link)||"",pdf_start_page_number:(null==m?void 0:m.pdf_start_page_number)||(null==p?void 0:p.pdf_start_page_number)||"",pdf_end_page_number:(null==m?void 0:m.pdf_end_page_number)||(null==p?void 0:p.pdf_end_page_number)||""}},u=(i,n,e,o,d)=>{var u;const s=((i,n)=>(null==i?void 0:i.input_index_map)||(null==n?void 0:n.input_index_map)||{})(i,n),v=t(i,n),c=l(i,null,e,o),_=(null===(u=null==c?void 0:c.citations)||void 0===u?void 0:u[d])||{},m=(null==s?void 0:s[0])||Object.keys(v).find(i=>"base"===a(v[i],"compare"))||Object.keys(_)[0]||"",p=(null==s?void 0:s[1])||Object.keys(v).find(i=>i!==m)||Object.keys(_).find(i=>i!==m)||"",f={};return m&&(f.base=r(i,n,e,m,"base",null==_?void 0:_[m])),p&&(f.compare=r(i,n,e,p,"compare",null==_?void 0:_[p])),f},s=({href:i,sourceText:e="",citationSection:t,aiReasoning:d,treeData:a,docData:r,config:s})=>{var v,c,_,m;const p=n(i),f=((i,n)=>{var e,t;if(null==i?void 0:i.node_id)return i.node_id;const o=n.match(/\.\/([^?:)]+)/);return(null===(t=null===(e=null==o?void 0:o[1])||void 0===e?void 0:e.split(":"))||void 0===t?void 0:t[0])||""})(d,i),g=((i,n)=>{const e=null==i?void 0:i.deviation_id;if(null!=e&&`${e}`.trim())return`${e}`;const t=n.match(/\.\/[^?:]+:(\d+)/);return(null==t?void 0:t[1])||"0"})(d,i),h=p.citationNumber||"0",y=f?`${f}:${g}:${h}`:p.localCitationId,b=p.queryParams.get("highlight_type")||"both",x=((i,n,e,t,o,d)=>{const a=l(i,n,e,t),r=(i=>(null==i?void 0:i.toLowerCase().includes("gap"))?"gaps_in_decision":"decisioning_factors")(d);return(Array.isArray(null==a?void 0:a[r])?a[r]:[]).find(i=>i.includes(`citationNumber=${o}`)||i.includes(`citation_number=${o}`)||i.includes(`deviation_summary$${o}`)||i.includes(`pdf_citation$${o}`)||i.trim().startsWith(`${o}.`))||""})(a,d,f,g,h,t)||((i="",n)=>{const e=i.indexOf(n);if(-1===e)return i.trim();const t=i.lastIndexOf("\n",e),o=i.indexOf("\n",e);return i.slice(-1===t?0:t+1,-1===o?i.length:o).trim()})(e,i),$={href:i,localCitationId:p.localCitationId,citationNumber:h,citationId:y,citedText:x,citationSection:t,highlightType:b,aiReasoning:d,treeData:a,docData:r},q={name:(null===(v=null==s?void 0:s.identity)||void 0===v?void 0:v.name)||(null==s?void 0:s.name)||"",organizationName:(null===(c=null==s?void 0:s.identity)||void 0===c?void 0:c.organizationName)||(null==s?void 0:s.organizationName)||"",prompt:"",useAgent:{agent_name:(null===(_=null==s?void 0:s.identity)||void 0===_?void 0:_.agentName)||(null==s?void 0:s.agentName)||"",metadata:o(s,$),arguments:{citation_type:(null==s?void 0:s.citationType)||"redline_citation",is_primary_agent_request:null!==(m=null==s?void 0:s.isPrimaryAgentRequest)&&void 0!==m&&m,ui_request_body:{request_id:(null==a?void 0:a.comparison_id)||(null==a?void 0:a.msgRequestId)||"",citation_id:y,cited_text:x,highlight_type:b,sources:u(a,r,f,g,h)}}}};return{context:$,payload:(null==s?void 0:s.buildPayload)?s.buildPayload($,q):q}},v=({texts:n,aiReasoning:e,treeData:t,docData:o,config:l})=>{const d=new Set;return n.flatMap(({text:n="",citationSection:a})=>i(n).filter(({href:i})=>!d.has(`${a||""}:${i}`)&&(d.add(`${a||""}:${i}`),!0)).map(({href:i,citedText:d})=>s({href:i,sourceText:d||n,citationSection:a,aiReasoning:e,treeData:t,docData:o,config:l})))},c=i=>"prefetchOnOpen"===i||"prefetchActiveTab"===i?"prefetchOnOpen":"onExpand",_=i=>{var n;return(null===(n=null==i?void 0:i.request)||void 0===n?void 0:n.url)||(null==i?void 0:i.requestUrl)||""},m=(i,n,e)=>{var t,o,l,d;const a="function"==typeof(null===(t=i.request)||void 0===t?void 0:t.headers)?i.request.headers(e):null===(o=i.request)||void 0===o?void 0:o.headers,r="function"==typeof i.headers?i.headers(e):i.headers;return{method:(null===(l=i.request)||void 0===l?void 0:l.method)||i.method||"POST",headers:{"content-type":"application/json",...r||{},...a||{}},credentials:(null===(d=i.request)||void 0===d?void 0:d.credentials)||i.credentials,body:JSON.stringify(n)}},p=async(i,n,e)=>{const t=_(i),o=m(i,n,e);if(!t)throw new Error("Missing redline on-demand citation request URL");if(i.fetcher)return i.fetcher({requestUrl:t,init:o,payload:n,context:e});const l=await fetch(t,o),d=await l.text();let a=d;try{a=d?JSON.parse(d):null}catch(i){a=d}if(!l.ok){const i=new Error(`Redline on-demand citation request failed with ${l.status}`);throw i.response=a,i}return i.transformResponse?i.transformResponse(a,e):a};export{s as buildRedlineOnDemandCitationPayload,v as buildRedlineOnDemandPrefetchPayloads,m as buildRedlineOnDemandRequestInit,p as fetchRedlineOnDemandCitation,_ as getRedlineOnDemandRequestUrl,c as normalizeRedlineOnDemandStrategy};
|
|
2
|
-
//# sourceMappingURL=payload.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"payload.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/features/RequirementAI/components/userstory-with-citation/utils/inlineMarkdown.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const e=(e,r,t)=>e.replace(r,(e,r,g,n)=>`${r}${t(g)}${n}`),r=r=>{if(!r)return r;const t=[],g=e=>`ZXQINLINEPROTECTED${t.push(e)-1}QXZ`;let n=r.replace(/(`+)([^\n]*?)\1/g,(e,r,t)=>{return g(`<code>${n=t,n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}</code>`);var n});return n=n.replace(/\\\*/g,()=>g("*")),n=e(n,/\*{3}([ \t]*)(\S(?:[\s\S]*?\S)?)([ \t]*)\*{3}/g,e=>`<strong><em>${e}</em></strong>`),n=e(n,/_{3}([ \t]*)(\S(?:[\s\S]*?\S)?)([ \t]*)_{3}/g,e=>`<strong><em>${e}</em></strong>`),n=e(n,/\*{2}([ \t]*)(\S(?:[\s\S]*?\S)?)([ \t]*)\*{2}/g,e=>`<strong>${e}</strong>`),n=e(n,/_{2}([ \t]*)(\S(?:[\s\S]*?\S)?)([ \t]*)_{2}/g,e=>`<strong>${e}</strong>`),n=e(n,/\*([ \t]*)(\S(?:[\s\S]*?\S)?)([ \t]*)\*/g,e=>`<em>${e}</em>`),n.replace(/ZXQINLINEPROTECTED(\d+)QXZ/g,(e,r)=>{var g;return null!==(g=t[Number(r)])&&void 0!==g?g:""})};export{r as convertInlineMarkdownToHtml};
|
|
2
|
-
//# sourceMappingURL=inlineMarkdown.js.map
|
package/dist/features/RequirementAI/components/userstory-with-citation/utils/inlineMarkdown.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inlineMarkdown.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import t from"react-hot-toast";const r=(t,r)=>new Promise((o,e)=>{if(null==r?void 0:r.aborted)return void e(new DOMException("Operation aborted","AbortError"));const a=setTimeout(o,t);null==r||r.addEventListener("abort",()=>{clearTimeout(a),e(new DOMException("Operation aborted","AbortError"))},{once:!0})});async function o(o,e={}){const{maxAttempts:a=5,initialDelayMs:n=500,maxDelayMs:i=3e4,backoffFactor:l=2,jitter:s=!0,signal:c,shouldRetry:m=()=>!0,onRetry:f}=e;if(a<1)throw new Error("maxAttempts must be at least 1");let u;for(let e=1;e<=a;e++){null==c||c.throwIfAborted();try{return await o(e)}catch(o){u=o;if(e===a||!m(o,e))throw o;const d=Math.min(n*l**(e-1),i),h=s?Math.floor(Math.random()*d):d;t.error(`Request failed. Retrying attempt ${e} of ${a}.`),null==f||f(o,e,h),await r(h,c)}}throw u}export{o as retryWithExponentialBackoff};
|
|
2
|
-
//# sourceMappingURL=exponential-retry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"exponential-retry.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"updateTags.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/features/RequirementAI/components/RichTextEditor/Editor/constants/updateTags.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,0BAA0B,qCAAqC,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/** Adapt Showdown's pre/code HTML to Lexical's language-bearing CodeNode. */
|
|
2
|
-
export declare const prepareCodeBlocksForImport: (doc: Document) => void;
|
|
3
|
-
/** Turndown expects pre > code; Lexical exports pre with text/span/br children. */
|
|
4
|
-
export declare const prepareCodeBlocksForExport: (doc: Document) => void;
|
|
5
|
-
//# sourceMappingURL=codeBlockSerialization.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codeBlockSerialization.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/features/RequirementAI/components/RichTextEditor/Editor/utils/codeBlockSerialization.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,eAAO,MAAM,0BAA0B,QAAS,QAAQ,SAQvD,CAAC;AAEF,mFAAmF;AACnF,eAAO,MAAM,0BAA0B,QAAS,QAAQ,SASvD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"manualEditEdgeCases.test.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/features/RequirementAI/components/RichTextEditor/Editor/utils/manualEditEdgeCases.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Showdown counts inline elements outside a row's first/last pipe as cells.
|
|
3
|
-
* Move review/anchor metadata inside those pipes in the temporary rendering
|
|
4
|
-
* copy so it remains attached to the boundary cell instead.
|
|
5
|
-
*/
|
|
6
|
-
export declare const normalizeMarkdownTableBoundaryMetadataForRendering: (markdown: string) => string;
|
|
7
|
-
/**
|
|
8
|
-
* Ensure a table's header and delimiter declare every non-empty column found
|
|
9
|
-
* in its body. Short body rows remain untouched because GFM treats their
|
|
10
|
-
* missing trailing cells as empty; preserving them avoids unrelated diffs.
|
|
11
|
-
*/
|
|
12
|
-
export declare const ensureMarkdownTableColumnCounts: (markdown: string) => string;
|
|
13
|
-
export declare const escapeMarkdownTableCellPipes: (value: string) => string;
|
|
14
|
-
/** Serialize one TH/TD without allowing its content to create extra rows/cells. */
|
|
15
|
-
export declare const markdownTableCellReplacement: (content: string, node: Node) => string;
|
|
16
|
-
//# sourceMappingURL=markdownTableSerialization.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"markdownTableSerialization.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/features/RequirementAI/components/RichTextEditor/Editor/utils/markdownTableSerialization.ts"],"names":[],"mappings":"AA2OA;;;;GAIG;AACH,eAAO,MAAM,kDAAkD,aACnD,MAAM,WA4BjB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,+BAA+B,aAAc,MAAM,WA6C/D,CAAC;AAEF,eAAO,MAAM,4BAA4B,UAAW,MAAM,WAiCzD,CAAC;AAEF,mFAAmF;AACnF,eAAO,MAAM,4BAA4B,YAC9B,MAAM,QACT,IAAI,WAkBX,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"markdownTableStructure.test.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/features/RequirementAI/components/RichTextEditor/Editor/utils/markdownTableStructure.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Keep a visual pipe inside review markup from becoming a Showdown table-cell
|
|
3
|
-
* delimiter. This is rendering-only: DOMParser decodes `|` back to `|`,
|
|
4
|
-
* and the source Markdown remains the persistence baseline.
|
|
5
|
-
*/
|
|
6
|
-
export declare const protectReviewTagPipesForRendering: (value: string) => string;
|
|
7
|
-
export declare const normalizeRedlineMarkdown: (source: string) => string;
|
|
8
|
-
//# sourceMappingURL=normalizeRedlineMarkdown.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"normalizeRedlineMarkdown.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/features/RequirementAI/components/RichTextEditor/Editor/utils/normalizeRedlineMarkdown.ts"],"names":[],"mappings":"AA0DA;;;;GAIG;AACH,eAAO,MAAM,iCAAiC,UAAW,MAAM,WAuC9D,CAAC;AAwLF,eAAO,MAAM,wBAAwB,WAAY,MAAM,KAAG,MAuBzD,CAAC"}
|