@viswa-test/test-citation 0.0.226 → 0.0.228

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (242) hide show
  1. package/README.md +393 -0
  2. package/dist/assests/icons/CitationsIcon.js +2 -0
  3. package/dist/assests/icons/CitationsIcon.js.map +1 -0
  4. package/dist/assests/icons/CitationsSparkleIcon.js +2 -0
  5. package/dist/assests/icons/CitationsSparkleIcon.js.map +1 -0
  6. package/dist/assests/svg/NeuralNetworkIcon.js +2 -0
  7. package/dist/assests/svg/NeuralNetworkIcon.js.map +1 -0
  8. package/dist/cjs/assests/icons/CitationsIcon.js +2 -0
  9. package/dist/cjs/assests/icons/CitationsIcon.js.map +1 -0
  10. package/dist/cjs/assests/icons/CitationsSparkleIcon.js +2 -0
  11. package/dist/cjs/assests/icons/CitationsSparkleIcon.js.map +1 -0
  12. package/dist/cjs/assests/svg/NeuralNetworkIcon.js +2 -0
  13. package/dist/cjs/assests/svg/NeuralNetworkIcon.js.map +1 -0
  14. package/dist/cjs/features/CitationRenderer/CitationRenderer.js +1 -1
  15. package/dist/cjs/features/CitationRenderer/MarkdownRenderer.js +1 -1
  16. package/dist/cjs/features/CitationRenderer/MarkdownRenderer.module.css.js +1 -1
  17. package/dist/cjs/features/CognitiveCompare/CognitiveCompare.js +1 -1
  18. package/dist/cjs/features/CognitiveCompare/components/SectionAccordion.js +1 -1
  19. package/dist/cjs/features/CognitiveCompare/components/SubSectionAccordion.js +1 -1
  20. package/dist/cjs/features/CognitiveCompare/hooks/memoizedMarkdown.js +1 -1
  21. package/dist/cjs/features/CognitiveCompare/hooks/useCompareData.js +1 -1
  22. package/dist/cjs/features/CognitiveCompare/hooks/useStyles.js +1 -1
  23. package/dist/cjs/features/GptWebCitation/GptWebCitation.js +2 -0
  24. package/dist/cjs/features/GptWebCitation/GptWebCitation.js.map +1 -0
  25. package/dist/cjs/features/GptWebCitation/GptWebCitation.module.css.js +2 -0
  26. package/dist/cjs/features/GptWebCitation/GptWebCitation.module.css.js.map +1 -0
  27. package/dist/cjs/features/GptWebCitation/GptWebCitationImageCitation.js +2 -0
  28. package/dist/cjs/features/GptWebCitation/GptWebCitationImageCitation.js.map +1 -0
  29. package/dist/cjs/features/GptWebCitation/GptWebCitationImageFullScreenView.js +2 -0
  30. package/dist/cjs/features/GptWebCitation/GptWebCitationImageFullScreenView.js.map +1 -0
  31. package/dist/cjs/features/GptWebCitation/GptWebCitationMarkdown.js +2 -0
  32. package/dist/cjs/features/GptWebCitation/GptWebCitationMarkdown.js.map +1 -0
  33. package/dist/cjs/features/GptWebCitation/GptWebCitationSkeleton.js +2 -0
  34. package/dist/cjs/features/GptWebCitation/GptWebCitationSkeleton.js.map +1 -0
  35. package/dist/cjs/features/GptWebCitation/utils/citationData.utils.js +2 -0
  36. package/dist/cjs/features/GptWebCitation/utils/citationData.utils.js.map +1 -0
  37. package/dist/cjs/features/InstantLearningCitation/CongnitiveDecisioningComponent.js +2 -0
  38. package/dist/cjs/features/InstantLearningCitation/CongnitiveDecisioningComponent.js.map +1 -0
  39. package/dist/cjs/features/InstantLearningCitation/HistorySkeleton.js +2 -0
  40. package/dist/cjs/features/InstantLearningCitation/HistorySkeleton.js.map +1 -0
  41. package/dist/cjs/features/InstantLearningCitation/InstantLearningCitation.js +2 -0
  42. package/dist/cjs/features/InstantLearningCitation/InstantLearningCitation.js.map +1 -0
  43. package/dist/cjs/features/InstantLearningCitation/InstantLearningCitationComponent.js +2 -0
  44. package/dist/cjs/features/InstantLearningCitation/InstantLearningCitationComponent.js.map +1 -0
  45. package/dist/cjs/features/InstantLearningCitation/OverrideTimeline.js +2 -0
  46. package/dist/cjs/features/InstantLearningCitation/OverrideTimeline.js.map +1 -0
  47. package/dist/cjs/features/InstantLearningCitation/RuleConditionBlock.js +2 -0
  48. package/dist/cjs/features/InstantLearningCitation/RuleConditionBlock.js.map +1 -0
  49. package/dist/cjs/features/InstantLearningCitation/RuleContentComponent.js +2 -0
  50. package/dist/cjs/features/InstantLearningCitation/RuleContentComponent.js.map +1 -0
  51. package/dist/cjs/features/InstantLearningCitation/css/CongnitiveDecisioning.module.css.js +2 -0
  52. package/dist/cjs/features/InstantLearningCitation/css/CongnitiveDecisioning.module.css.js.map +1 -0
  53. package/dist/cjs/features/InstantLearningCitation/css/Override.module.css.js +2 -0
  54. package/dist/cjs/features/InstantLearningCitation/css/Override.module.css.js.map +1 -0
  55. package/dist/cjs/features/InstantLearningCitation/css/RuleAccordian.module.css.js +2 -0
  56. package/dist/cjs/features/InstantLearningCitation/css/RuleAccordian.module.css.js.map +1 -0
  57. package/dist/cjs/features/InstantLearningCitation/css/common.module.css.js +2 -0
  58. package/dist/cjs/features/InstantLearningCitation/css/common.module.css.js.map +1 -0
  59. package/dist/cjs/features/InstantLearningCitation/types/Types.js +2 -0
  60. package/dist/cjs/features/InstantLearningCitation/types/Types.js.map +1 -0
  61. package/dist/cjs/features/RequirementAI/components/UserStoryCard/AttachedContext.js +1 -1
  62. package/dist/cjs/features/RequirementAI/components/UserStoryCard/AttachedContext.module.css.js +1 -1
  63. package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationComponent.module.css.js +1 -1
  64. package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.js +1 -1
  65. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.js +1 -1
  66. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/IterateComponent.js +1 -1
  67. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/PopupDefaults.js +1 -1
  68. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.js +1 -1
  69. package/dist/cjs/features/RequirementAI/components/UserStoryCard/UserStoryCard.js +1 -1
  70. package/dist/cjs/features/RequirementAI/components/ai-reasoning/AiReasoningCitation.js +1 -1
  71. package/dist/cjs/features/RequirementAI/components/ai-reasoning/AiReasoningCitationContent.js +1 -1
  72. package/dist/cjs/features/RequirementAI/components/ai-reasoning/ScannedCitationRenderer.js +1 -1
  73. package/dist/cjs/features/RequirementAI/components/segment/Segment.js +1 -1
  74. package/dist/cjs/features/RequirementAI/components/segment/segment-common.css.js +1 -1
  75. package/dist/cjs/features/RequirementAI/components/segment/segment.module.css.js +1 -1
  76. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.js +1 -1
  77. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.module.css.js +1 -1
  78. package/dist/cjs/features/RequirementAiCitations/WebCitation/WebCitationWithImageContent.js +1 -1
  79. package/dist/cjs/features/RequirementAiCitations/WebCitation/WebCitationWithImageContent.module.css.js +1 -1
  80. package/dist/cjs/features/RulebookCitations/RuleBookCitationApi.js +2 -0
  81. package/dist/cjs/features/RulebookCitations/RuleBookCitationApi.js.map +1 -0
  82. package/dist/cjs/features/RulebookCitations/RuleBookCitationWrapper.js +2 -0
  83. package/dist/cjs/features/RulebookCitations/RuleBookCitationWrapper.js.map +1 -0
  84. package/dist/cjs/index.js +1 -1
  85. package/dist/features/CitationRenderer/CitationRenderer.js +1 -1
  86. package/dist/features/CitationRenderer/MarkdownRenderer.js +1 -1
  87. package/dist/features/CitationRenderer/MarkdownRenderer.module.css.js +1 -1
  88. package/dist/features/CognitiveCompare/CognitiveCompare.js +1 -1
  89. package/dist/features/CognitiveCompare/components/SectionAccordion.js +1 -1
  90. package/dist/features/CognitiveCompare/components/SubSectionAccordion.js +1 -1
  91. package/dist/features/CognitiveCompare/hooks/memoizedMarkdown.js +1 -1
  92. package/dist/features/CognitiveCompare/hooks/useCompareData.js +1 -1
  93. package/dist/features/CognitiveCompare/hooks/useStyles.js +1 -1
  94. package/dist/features/GptWebCitation/GptWebCitation.js +2 -0
  95. package/dist/features/GptWebCitation/GptWebCitation.js.map +1 -0
  96. package/dist/features/GptWebCitation/GptWebCitation.module.css.js +2 -0
  97. package/dist/features/GptWebCitation/GptWebCitation.module.css.js.map +1 -0
  98. package/dist/features/GptWebCitation/GptWebCitationImageCitation.js +2 -0
  99. package/dist/features/GptWebCitation/GptWebCitationImageCitation.js.map +1 -0
  100. package/dist/features/GptWebCitation/GptWebCitationImageFullScreenView.js +2 -0
  101. package/dist/features/GptWebCitation/GptWebCitationImageFullScreenView.js.map +1 -0
  102. package/dist/features/GptWebCitation/GptWebCitationMarkdown.js +2 -0
  103. package/dist/features/GptWebCitation/GptWebCitationMarkdown.js.map +1 -0
  104. package/dist/features/GptWebCitation/GptWebCitationSkeleton.js +2 -0
  105. package/dist/features/GptWebCitation/GptWebCitationSkeleton.js.map +1 -0
  106. package/dist/features/GptWebCitation/utils/citationData.utils.js +2 -0
  107. package/dist/features/GptWebCitation/utils/citationData.utils.js.map +1 -0
  108. package/dist/features/InstantLearningCitation/CongnitiveDecisioningComponent.js +2 -0
  109. package/dist/features/InstantLearningCitation/CongnitiveDecisioningComponent.js.map +1 -0
  110. package/dist/features/InstantLearningCitation/HistorySkeleton.js +2 -0
  111. package/dist/features/InstantLearningCitation/HistorySkeleton.js.map +1 -0
  112. package/dist/features/InstantLearningCitation/InstantLearningCitation.js +2 -0
  113. package/dist/features/InstantLearningCitation/InstantLearningCitation.js.map +1 -0
  114. package/dist/features/InstantLearningCitation/InstantLearningCitationComponent.js +2 -0
  115. package/dist/features/InstantLearningCitation/InstantLearningCitationComponent.js.map +1 -0
  116. package/dist/features/InstantLearningCitation/OverrideTimeline.js +2 -0
  117. package/dist/features/InstantLearningCitation/OverrideTimeline.js.map +1 -0
  118. package/dist/features/InstantLearningCitation/RuleConditionBlock.js +2 -0
  119. package/dist/features/InstantLearningCitation/RuleConditionBlock.js.map +1 -0
  120. package/dist/features/InstantLearningCitation/RuleContentComponent.js +2 -0
  121. package/dist/features/InstantLearningCitation/RuleContentComponent.js.map +1 -0
  122. package/dist/features/InstantLearningCitation/css/CongnitiveDecisioning.module.css.js +2 -0
  123. package/dist/features/InstantLearningCitation/css/CongnitiveDecisioning.module.css.js.map +1 -0
  124. package/dist/features/InstantLearningCitation/css/Override.module.css.js +2 -0
  125. package/dist/features/InstantLearningCitation/css/Override.module.css.js.map +1 -0
  126. package/dist/features/InstantLearningCitation/css/RuleAccordian.module.css.js +2 -0
  127. package/dist/features/InstantLearningCitation/css/RuleAccordian.module.css.js.map +1 -0
  128. package/dist/features/InstantLearningCitation/css/common.module.css.js +2 -0
  129. package/dist/features/InstantLearningCitation/css/common.module.css.js.map +1 -0
  130. package/dist/features/InstantLearningCitation/types/Types.js +2 -0
  131. package/dist/features/InstantLearningCitation/types/Types.js.map +1 -0
  132. package/dist/features/RequirementAI/components/UserStoryCard/AttachedContext.js +1 -1
  133. package/dist/features/RequirementAI/components/UserStoryCard/AttachedContext.module.css.js +1 -1
  134. package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationComponent.module.css.js +1 -1
  135. package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.js +1 -1
  136. package/dist/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.js +1 -1
  137. package/dist/features/RequirementAI/components/UserStoryCard/Popups/IterateComponent.js +1 -1
  138. package/dist/features/RequirementAI/components/UserStoryCard/Popups/PopupDefaults.js +1 -1
  139. package/dist/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.js +1 -1
  140. package/dist/features/RequirementAI/components/UserStoryCard/UserStoryCard.js +1 -1
  141. package/dist/features/RequirementAI/components/ai-reasoning/AiReasoningCitation.js +1 -1
  142. package/dist/features/RequirementAI/components/ai-reasoning/AiReasoningCitationContent.js +1 -1
  143. package/dist/features/RequirementAI/components/ai-reasoning/ScannedCitationRenderer.js +1 -1
  144. package/dist/features/RequirementAI/components/segment/Segment.js +1 -1
  145. package/dist/features/RequirementAI/components/segment/segment-common.css.js +1 -1
  146. package/dist/features/RequirementAI/components/segment/segment.module.css.js +1 -1
  147. package/dist/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.js +1 -1
  148. package/dist/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.module.css.js +1 -1
  149. package/dist/features/RequirementAiCitations/WebCitation/WebCitationWithImageContent.js +1 -1
  150. package/dist/features/RequirementAiCitations/WebCitation/WebCitationWithImageContent.module.css.js +1 -1
  151. package/dist/features/RulebookCitations/RuleBookCitationApi.js +2 -0
  152. package/dist/features/RulebookCitations/RuleBookCitationApi.js.map +1 -0
  153. package/dist/features/RulebookCitations/RuleBookCitationWrapper.js +2 -0
  154. package/dist/features/RulebookCitations/RuleBookCitationWrapper.js.map +1 -0
  155. package/dist/index.js +1 -1
  156. package/dist/types/src/CognitiveCompareTest.d.ts.map +1 -1
  157. package/dist/types/src/CommonConstants/CommonConstants.d.ts +0 -10476
  158. package/dist/types/src/CommonConstants/CommonConstants.d.ts.map +1 -1
  159. package/dist/types/src/assests/icons/CitationsIcon.d.ts +2 -0
  160. package/dist/types/src/assests/icons/CitationsIcon.d.ts.map +1 -0
  161. package/dist/types/src/assests/icons/CitationsSparkleIcon.d.ts +10 -0
  162. package/dist/types/src/assests/icons/CitationsSparkleIcon.d.ts.map +1 -0
  163. package/dist/types/src/assests/svg/NeuralNetworkIcon.d.ts +9 -0
  164. package/dist/types/src/assests/svg/NeuralNetworkIcon.d.ts.map +1 -0
  165. package/dist/types/src/features/CitationRenderer/CitationRenderer.d.ts.map +1 -1
  166. package/dist/types/src/features/CitationRenderer/MarkdownRenderer.d.ts.map +1 -1
  167. package/dist/types/src/features/CognitiveCompare/CognitiveCompare.d.ts +1 -1
  168. package/dist/types/src/features/CognitiveCompare/CognitiveCompare.d.ts.map +1 -1
  169. package/dist/types/src/features/CognitiveCompare/CognitiveCompareTypes.d.ts +7 -0
  170. package/dist/types/src/features/CognitiveCompare/CognitiveCompareTypes.d.ts.map +1 -1
  171. package/dist/types/src/features/CognitiveCompare/CompareContext.d.ts +1 -1
  172. package/dist/types/src/features/CognitiveCompare/CompareContext.d.ts.map +1 -1
  173. package/dist/types/src/features/CognitiveCompare/components/SectionAccordion.d.ts.map +1 -1
  174. package/dist/types/src/features/CognitiveCompare/components/SubSectionAccordion.d.ts.map +1 -1
  175. package/dist/types/src/features/CognitiveCompare/hooks/memoizedMarkdown.d.ts.map +1 -1
  176. package/dist/types/src/features/CognitiveCompare/hooks/useCompareData.d.ts.map +1 -1
  177. package/dist/types/src/features/CognitiveCompare/hooks/useCompareLayout.d.ts +0 -1
  178. package/dist/types/src/features/CognitiveCompare/hooks/useCompareLayout.d.ts.map +1 -1
  179. package/dist/types/src/features/CognitiveCompare/hooks/useStyles.d.ts +3 -2
  180. package/dist/types/src/features/CognitiveCompare/hooks/useStyles.d.ts.map +1 -1
  181. package/dist/types/src/features/GptWebCitation/GptWebCitation.d.ts +5 -0
  182. package/dist/types/src/features/GptWebCitation/GptWebCitation.d.ts.map +1 -0
  183. package/dist/types/src/features/GptWebCitation/GptWebCitationImageCitation.d.ts +8 -0
  184. package/dist/types/src/features/GptWebCitation/GptWebCitationImageCitation.d.ts.map +1 -0
  185. package/dist/types/src/features/GptWebCitation/GptWebCitationImageFullScreenView.d.ts +8 -0
  186. package/dist/types/src/features/GptWebCitation/GptWebCitationImageFullScreenView.d.ts.map +1 -0
  187. package/dist/types/src/features/GptWebCitation/GptWebCitationMarkdown.d.ts +9 -0
  188. package/dist/types/src/features/GptWebCitation/GptWebCitationMarkdown.d.ts.map +1 -0
  189. package/dist/types/src/features/GptWebCitation/GptWebCitationSkeleton.d.ts +3 -0
  190. package/dist/types/src/features/GptWebCitation/GptWebCitationSkeleton.d.ts.map +1 -0
  191. package/dist/types/src/features/GptWebCitation/GptWebCitationTest.d.ts +4 -0
  192. package/dist/types/src/features/GptWebCitation/GptWebCitationTest.d.ts.map +1 -0
  193. package/dist/types/src/features/GptWebCitation/WebCitationSampleResponse.d.ts +4 -0
  194. package/dist/types/src/features/GptWebCitation/WebCitationSampleResponse.d.ts.map +1 -0
  195. package/dist/types/src/features/GptWebCitation/types.d.ts +112 -0
  196. package/dist/types/src/features/GptWebCitation/types.d.ts.map +1 -0
  197. package/dist/types/src/features/GptWebCitation/utils/citationData.utils.d.ts +8 -0
  198. package/dist/types/src/features/GptWebCitation/utils/citationData.utils.d.ts.map +1 -0
  199. package/dist/types/src/features/InstantLearningCitation/CongnitiveDecisioningComponent.d.ts +5 -0
  200. package/dist/types/src/features/InstantLearningCitation/CongnitiveDecisioningComponent.d.ts.map +1 -0
  201. package/dist/types/src/features/InstantLearningCitation/HistorySkeleton.d.ts +10 -0
  202. package/dist/types/src/features/InstantLearningCitation/HistorySkeleton.d.ts.map +1 -0
  203. package/dist/types/src/features/InstantLearningCitation/InstantLearningCitation.d.ts +2 -0
  204. package/dist/types/src/features/InstantLearningCitation/InstantLearningCitation.d.ts.map +1 -0
  205. package/dist/types/src/features/InstantLearningCitation/InstantLearningCitationComponent.d.ts +10 -0
  206. package/dist/types/src/features/InstantLearningCitation/InstantLearningCitationComponent.d.ts.map +1 -0
  207. package/dist/types/src/features/InstantLearningCitation/InstantLearningCitationTest.d.ts +4 -0
  208. package/dist/types/src/features/InstantLearningCitation/InstantLearningCitationTest.d.ts.map +1 -0
  209. package/dist/types/src/features/InstantLearningCitation/OverrideTimeline.d.ts +13 -0
  210. package/dist/types/src/features/InstantLearningCitation/OverrideTimeline.d.ts.map +1 -0
  211. package/dist/types/src/features/InstantLearningCitation/RuleConditionBlock.d.ts +13 -0
  212. package/dist/types/src/features/InstantLearningCitation/RuleConditionBlock.d.ts.map +1 -0
  213. package/dist/types/src/features/InstantLearningCitation/RuleContentComponent.d.ts +5 -0
  214. package/dist/types/src/features/InstantLearningCitation/RuleContentComponent.d.ts.map +1 -0
  215. package/dist/types/src/features/InstantLearningCitation/SlashLoader.d.ts +12 -0
  216. package/dist/types/src/features/InstantLearningCitation/SlashLoader.d.ts.map +1 -0
  217. package/dist/types/src/features/InstantLearningCitation/types/Types.d.ts +350 -0
  218. package/dist/types/src/features/InstantLearningCitation/types/Types.d.ts.map +1 -0
  219. package/dist/types/src/features/RequirementAI/components/UserStoryCard/AttachedContext.d.ts +1 -3
  220. package/dist/types/src/features/RequirementAI/components/UserStoryCard/AttachedContext.d.ts.map +1 -1
  221. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.d.ts.map +1 -1
  222. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/IterateComponent.d.ts.map +1 -1
  223. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/PopupDefaults.d.ts.map +1 -1
  224. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.d.ts +4 -1
  225. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.d.ts.map +1 -1
  226. package/dist/types/src/features/RequirementAI/components/UserStoryCard/UserStoryCard.d.ts +5 -3
  227. package/dist/types/src/features/RequirementAI/components/UserStoryCard/UserStoryCard.d.ts.map +1 -1
  228. package/dist/types/src/features/RequirementAI/components/ai-reasoning/AiReasoningCitationContent.d.ts.map +1 -1
  229. package/dist/types/src/features/RequirementAI/components/ai-reasoning/ScannedCitationRenderer.d.ts +1 -1
  230. package/dist/types/src/features/RequirementAI/components/ai-reasoning/ScannedCitationRenderer.d.ts.map +1 -1
  231. package/dist/types/src/features/RequirementAI/components/segment/Segment.d.ts.map +1 -1
  232. package/dist/types/src/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.d.ts +2 -1
  233. package/dist/types/src/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.d.ts.map +1 -1
  234. package/dist/types/src/features/RulebookCitations/RuleBookCitationApi.d.ts +31 -0
  235. package/dist/types/src/features/RulebookCitations/RuleBookCitationApi.d.ts.map +1 -0
  236. package/dist/types/src/features/RulebookCitations/RuleBookCitationWrapper.d.ts +11 -0
  237. package/dist/types/src/features/RulebookCitations/RuleBookCitationWrapper.d.ts.map +1 -0
  238. package/dist/types/src/features/RulebookCitations/RuleBookCitationWrapperTest.d.ts +3 -0
  239. package/dist/types/src/features/RulebookCitations/RuleBookCitationWrapperTest.d.ts.map +1 -0
  240. package/dist/types/src/index.d.ts +5 -0
  241. package/dist/types/src/index.d.ts.map +1 -1
  242. package/package.json +18 -2
@@ -1,2 +1,2 @@
1
- var t={wrapper:"AttachedContext-module_wrapper__KHDIP",dropdownContainer:"AttachedContext-module_dropdownContainer__TPFtZ",triggerButton:"AttachedContext-module_triggerButton__ZXDWZ",triggerIcon:"AttachedContext-module_triggerIcon__cdeba",triggerLabel:"AttachedContext-module_triggerLabel__7HM4O",dropdownPanel:"AttachedContext-module_dropdownPanel__r-NRo",slideIn:"AttachedContext-module_slideIn__ah8dZ",dropdownList:"AttachedContext-module_dropdownList__E-mKF",fadeGradient:"AttachedContext-module_fadeGradient__ncpfP",emptyState:"AttachedContext-module_emptyState__WCYKW",contextItem:"AttachedContext-module_contextItem__I0Q9u",lastItem:"AttachedContext-module_lastItem__fWT-n",itemIconWrapper:"AttachedContext-module_itemIconWrapper__FjAJj",itemContent:"AttachedContext-module_itemContent__jwJwp",itemTitle:"AttachedContext-module_itemTitle__e2hAN",itemMeta:"AttachedContext-module_itemMeta__Hw9Ct",actionButton:"AttachedContext-module_actionButton__oQioa",actionButtonReady:"AttachedContext-module_actionButtonReady__TbrP-"};!function(){if("undefined"==typeof document)return;const t=document.createElement("style");t.type="text/css";const e=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode(".AttachedContext-module_wrapper__KHDIP{display:flex;flex-direction:column}.AttachedContext-module_dropdownContainer__TPFtZ{display:inline-block;position:relative;text-align:left}.AttachedContext-module_triggerButton__ZXDWZ{align-items:center;background-color:#fff;border:1px solid #d1d5db;border-radius:8px;box-shadow:0 1px 2px 0 #0000000d;color:#374151;cursor:pointer;display:flex;gap:.5rem;padding:.5rem 1rem;transition:background-color .2s,border-color .2s}.AttachedContext-module_triggerButton__ZXDWZ:hover{background-color:#f9fafb}.AttachedContext-module_triggerIcon__cdeba{color:#4b5563}.AttachedContext-module_triggerLabel__7HM4O{font-weight:500}.AttachedContext-module_dropdownPanel__r-NRo{animation:AttachedContext-module_slideIn__ah8dZ .2s ease-out;background-color:#fff;border:1px solid #f3f4f6;border-radius:12px;box-shadow:0 20px 25px -5px #0000001a,0 8px 10px -6px #0000001a;left:0;margin-top:.5rem;overflow:hidden;position:absolute;width:420px;z-index:50}.AttachedContext-module_dropdownList__E-mKF{max-height:300px;overflow-y:auto;padding-bottom:.5rem;padding-top:.5rem}.AttachedContext-module_dropdownList__E-mKF::-webkit-scrollbar{width:6px}.AttachedContext-module_dropdownList__E-mKF::-webkit-scrollbar-track{background:#0000}.AttachedContext-module_dropdownList__E-mKF::-webkit-scrollbar-thumb{background:#e5e7eb;border-radius:10px}.AttachedContext-module_dropdownList__E-mKF::-webkit-scrollbar-thumb:hover{background:#d1d5db}.AttachedContext-module_fadeGradient__ncpfP{background:linear-gradient(0deg,#f9fafb80,#0000);height:1rem;pointer-events:none}.AttachedContext-module_emptyState__WCYKW{color:#9ca3af;font-size:.875rem;padding:2rem;text-align:center}.AttachedContext-module_contextItem__I0Q9u{align-items:flex-start;border-bottom:1px solid #0000;border-radius:8px;display:flex;gap:1rem;margin-left:.5rem;margin-right:.5rem;padding:1rem;transition:background-color .15s}.AttachedContext-module_contextItem__I0Q9u:not(.AttachedContext-module_lastItem__fWT-n){border-bottom-color:#f3f4f6}.AttachedContext-module_contextItem__I0Q9u:hover{background-color:#f9fafb}.AttachedContext-module_itemIconWrapper__FjAJj{background-color:#f5f3ff;border-radius:8px;color:#8b5cf6;flex-shrink:0;margin-top:.25rem;padding:.5rem}.AttachedContext-module_itemContent__jwJwp{flex:1;min-width:0}.AttachedContext-module_itemTitle__e2hAN{color:#111827;font-size:.9375rem;font-weight:600;margin:0;overflow:hidden;text-overflow:ellipsis;transition:color .15s;white-space:nowrap}.AttachedContext-module_contextItem__I0Q9u:hover .AttachedContext-module_itemTitle__e2hAN{color:#7c3aed}.AttachedContext-module_itemMeta__Hw9Ct{color:#6b7280;font-size:.875rem;margin-bottom:0;margin-top:.125rem}.AttachedContext-module_actionButton__oQioa{align-self:center;background:none;border:none;border-radius:4px;color:#9ca3af;cursor:pointer;flex-shrink:0;line-height:0;padding:.5rem;transition:color .15s,background-color .15s}.AttachedContext-module_actionButton__oQioa:hover{background-color:#fff;color:#7c3aed}.AttachedContext-module_actionButtonReady__TbrP-{color:#6b7280}@keyframes AttachedContext-module_slideIn__ah8dZ{0%{opacity:0;transform:translateY(-10px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}"));const o=document.head||document.getElementsByTagName("head")[0]||document.documentElement;o&&o.appendChild(t)}();export{t as default};
1
+ var e={wrapper:"AttachedContext-module_wrapper__KHDIP",dropdownContainer:"AttachedContext-module_dropdownContainer__TPFtZ",triggerButton:"AttachedContext-module_triggerButton__ZXDWZ",triggerIcon:"AttachedContext-module_triggerIcon__cdeba",triggerLabel:"AttachedContext-module_triggerLabel__7HM4O",dropdownPanel:"AttachedContext-module_dropdownPanel__r-NRo",slideIn:"AttachedContext-module_slideIn__ah8dZ",dropdownList:"AttachedContext-module_dropdownList__E-mKF",fadeGradient:"AttachedContext-module_fadeGradient__ncpfP",emptyState:"AttachedContext-module_emptyState__WCYKW",contextItem:"AttachedContext-module_contextItem__I0Q9u",lastItem:"AttachedContext-module_lastItem__fWT-n",itemIconWrapper:"AttachedContext-module_itemIconWrapper__FjAJj",itemContent:"AttachedContext-module_itemContent__jwJwp",itemTitle:"AttachedContext-module_itemTitle__e2hAN",itemMeta:"AttachedContext-module_itemMeta__Hw9Ct",actionButton:"AttachedContext-module_actionButton__oQioa",actionButtonReady:"AttachedContext-module_actionButtonReady__TbrP-",sourcesContainer:"AttachedContext-module_sourcesContainer__AP6PI",sourcesFilesContainer:"AttachedContext-module_sourcesFilesContainer__-Mnhn",sourcesLabel:"AttachedContext-module_sourcesLabel__VN-9Q",sourceChip:"AttachedContext-module_sourceChip__QsVPO",sourceChipLabel:"AttachedContext-module_sourceChipLabel__f29Qv",moreChip:"AttachedContext-module_moreChip__ieXRs"};!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const t=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;t&&e.setAttribute("nonce",t),e.appendChild(document.createTextNode(".AttachedContext-module_wrapper__KHDIP{display:flex;flex-direction:column}.AttachedContext-module_dropdownContainer__TPFtZ{display:inline-block;position:relative;text-align:left}.AttachedContext-module_triggerButton__ZXDWZ{align-items:center;background-color:#fff;border:1px solid #d1d5db;border-radius:8px;box-shadow:0 1px 2px 0 #0000000d;color:#374151;cursor:pointer;display:flex;gap:.5rem;padding:.5rem 1rem;transition:background-color .2s,border-color .2s}.AttachedContext-module_triggerButton__ZXDWZ:hover{background-color:#f9fafb}.AttachedContext-module_triggerIcon__cdeba{color:#4b5563}.AttachedContext-module_triggerLabel__7HM4O{font-weight:500}.AttachedContext-module_dropdownPanel__r-NRo{animation:AttachedContext-module_slideIn__ah8dZ .2s ease-out;background-color:#fff;border:1px solid #f3f4f6;border-radius:12px;box-shadow:0 20px 25px -5px #0000001a,0 8px 10px -6px #0000001a;left:0;margin-top:.5rem;overflow:hidden;position:absolute;width:420px;z-index:50}.AttachedContext-module_dropdownList__E-mKF{max-height:300px;overflow-y:auto;padding-bottom:.5rem;padding-top:.5rem}.AttachedContext-module_dropdownList__E-mKF::-webkit-scrollbar{width:6px}.AttachedContext-module_dropdownList__E-mKF::-webkit-scrollbar-track{background:#0000}.AttachedContext-module_dropdownList__E-mKF::-webkit-scrollbar-thumb{background:#e5e7eb;border-radius:10px}.AttachedContext-module_dropdownList__E-mKF::-webkit-scrollbar-thumb:hover{background:#d1d5db}.AttachedContext-module_fadeGradient__ncpfP{background:linear-gradient(0deg,#f9fafb80,#0000);height:1rem;pointer-events:none}.AttachedContext-module_emptyState__WCYKW{color:#9ca3af;font-size:.875rem;padding:2rem;text-align:center}.AttachedContext-module_contextItem__I0Q9u{align-items:flex-start;border-bottom:1px solid #0000;border-radius:8px;display:flex;gap:1rem;margin-left:.5rem;margin-right:.5rem;padding:1rem;transition:background-color .15s}.AttachedContext-module_contextItem__I0Q9u:not(.AttachedContext-module_lastItem__fWT-n){border-bottom-color:#f3f4f6}.AttachedContext-module_contextItem__I0Q9u:hover{background-color:#f9fafb}.AttachedContext-module_itemIconWrapper__FjAJj{background-color:#f5f3ff;border-radius:8px;color:#8b5cf6;flex-shrink:0;margin-top:.25rem;padding:.5rem}.AttachedContext-module_itemContent__jwJwp{flex:1;min-width:0}.AttachedContext-module_itemTitle__e2hAN{color:#111827;font-size:.9375rem;font-weight:600;margin:0;overflow:hidden;text-overflow:ellipsis;transition:color .15s;white-space:nowrap}.AttachedContext-module_contextItem__I0Q9u:hover .AttachedContext-module_itemTitle__e2hAN{color:#7c3aed}.AttachedContext-module_itemMeta__Hw9Ct{color:#6b7280;font-size:.875rem;margin-bottom:0;margin-top:.125rem}.AttachedContext-module_actionButton__oQioa{align-self:center;background:none;border:none;border-radius:4px;color:#9ca3af;cursor:pointer;flex-shrink:0;line-height:0;padding:.5rem;transition:color .15s,background-color .15s}.AttachedContext-module_actionButton__oQioa:hover{background-color:#fff;color:#7c3aed}.AttachedContext-module_actionButtonReady__TbrP-{color:#6b7280}.AttachedContext-module_sourcesContainer__AP6PI{align-items:flex-start;display:flex;gap:8px;min-width:0;width:100%}.AttachedContext-module_sourcesFilesContainer__-Mnhn{align-items:center;display:flex;flex-wrap:wrap;gap:8px;min-width:0}.AttachedContext-module_sourcesLabel__VN-9Q{color:#374151;flex-shrink:0;font-size:14px;font-weight:600;line-height:20px}.AttachedContext-module_sourceChip__QsVPO{align-items:center;background:#eef2ff;border-radius:10px;color:#6366f1;cursor:pointer;display:inline-flex;flex-shrink:1;font-size:13px;font-weight:500;gap:6px;line-height:18px;min-width:0;padding:6px 12px;transition:background-color .15s ease,transform .15s ease}.AttachedContext-module_sourceChip__QsVPO:hover{background:#e0e7ff}.AttachedContext-module_sourceChipLabel__f29Qv{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.AttachedContext-module_moreChip__ieXRs{align-items:center;background:#eef2ff;border-radius:10px;color:#6366f1;cursor:pointer;display:inline-flex;flex-shrink:0;font-size:13px;font-weight:600;justify-content:center;line-height:18px;padding:6px 12px;transition:background-color .15s ease}.AttachedContext-module_moreChip__ieXRs:hover{background:#e0e7ff}@keyframes AttachedContext-module_slideIn__ah8dZ{0%{opacity:0;transform:translateY(-10px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}"));const o=document.head||document.getElementsByTagName("head")[0]||document.documentElement;o&&o.appendChild(e)}();export{e as default};
2
2
  //# sourceMappingURL=AttachedContext.module.css.js.map
@@ -1,2 +1,2 @@
1
- var e={"cite-acc":"CitationComponent-module_cite-acc__2XusN","cite-acc__header":"CitationComponent-module_cite-acc__header__Ek-ou","cite-acc__headerLeft":"CitationComponent-module_cite-acc__headerLeft__K6ItR","cite-acc__titleIcon":"CitationComponent-module_cite-acc__titleIcon__ssoL-","cite-acc__title":"CitationComponent-module_cite-acc__title__3ibjn","cite-acc__headerRight":"CitationComponent-module_cite-acc__headerRight__OhMqH","cite-acc__gapBadge":"CitationComponent-module_cite-acc__gapBadge__VkuKQ","cite-acc__scoreBadge":"CitationComponent-module_cite-acc__scoreBadge__uVDRv","cite-acc__scoreIcon":"CitationComponent-module_cite-acc__scoreIcon__-MUli","cite-acc__scoreText":"CitationComponent-module_cite-acc__scoreText__42VsL","cite-acc__toggleBtn":"CitationComponent-module_cite-acc__toggleBtn__RcZmg","cite-acc__body":"CitationComponent-module_cite-acc__body__YQDAm","cite-acc__explain-body":"CitationComponent-module_cite-acc__explain-body__1v7hb","cite-acc__explain-body_border":"CitationComponent-module_cite-acc__explain-body_border__QQnDb","cite-acc__innerHeader":"CitationComponent-module_cite-acc__innerHeader__BFwFr","cite-acc__backHeader":"CitationComponent-module_cite-acc__backHeader__aFHVT","cite-acc__backBtn":"CitationComponent-module_cite-acc__backBtn__d91ol","cite-acc__backTitle":"CitationComponent-module_cite-acc__backTitle__Jwdr9","cite-acc__cognitiveSection":"CitationComponent-module_cite-acc__cognitiveSection__eVNry","cite-acc__cognitiveTitle":"CitationComponent-module_cite-acc__cognitiveTitle__LXmhU","cite-acc__innerHeaderLeft":"CitationComponent-module_cite-acc__innerHeaderLeft__uY1Et","cite-acc__innerIcon":"CitationComponent-module_cite-acc__innerIcon__UvlXX","cite-acc__innerTitle":"CitationComponent-module_cite-acc__innerTitle__Lv8vo","cite-acc__innerSub":"CitationComponent-module_cite-acc__innerSub__XG7ad","cite-acc__innerToggle":"CitationComponent-module_cite-acc__innerToggle__3YHI5","cite-acc__innerBody":"CitationComponent-module_cite-acc__innerBody__Bzkt4","cite-text__mark":"CitationComponent-module_cite-text__mark__Xh6wV","cite-text__a":"CitationComponent-module_cite-text__a__9HVV6","cite-text__a-btn":"CitationComponent-module_cite-text__a-btn__9XyA1","cite-text__a-btn_circle":"CitationComponent-module_cite-text__a-btn_circle__SI-j3","cite-text__a-btn_chevron":"CitationComponent-module_cite-text__a-btn_chevron__DXtkI","cite-text__a-btn_open":"CitationComponent-module_cite-text__a-btn_open__2NfoX",spin:"CitationComponent-module_spin__W-F7a","cite-text__a-container":"CitationComponent-module_cite-text__a-container__G-ier","cite-text__a-container-docs":"CitationComponent-module_cite-text__a-container-docs__n8qlA","cite-text__a-container-loader":"CitationComponent-module_cite-text__a-container-loader__f0Exm","md-ol":"CitationComponent-module_md-ol__TO-dB","md-ul":"CitationComponent-module_md-ul__LfZPA","md-li":"CitationComponent-module_md-li__ZEscN","cite-acc__btn-container":"CitationComponent-module_cite-acc__btn-container__RUjvL","btn-accept":"CitationComponent-module_btn-accept__F5s10","btn-reject":"CitationComponent-module_btn-reject__ziZa-"};!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const t=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;t&&e.setAttribute("nonce",t),e.appendChild(document.createTextNode('.CitationComponent-module_cite-acc__2XusN{background:#fff;border:1px solid #eaecf0;border-radius:12px;box-sizing:border-box;container-type:inline-size;max-height:500px;overflow:auto;width:400px}.CitationComponent-module_cite-acc__header__Ek-ou{align-items:center;border-bottom:1px solid #eaecf0;border-top:1px solid #eaecf0;display:flex;flex-wrap:nowrap;gap:12px;justify-content:space-between;min-width:0;padding:12px}.CitationComponent-module_cite-acc__headerLeft__K6ItR{align-items:center;display:flex;flex:1 1 auto;gap:4px;min-width:0;overflow:hidden}.CitationComponent-module_cite-acc__titleIcon__ssoL-{align-items:center;display:inline-flex;flex:0 0 28px;height:28px;justify-content:center;width:28px}.CitationComponent-module_cite-acc__title__3ibjn{color:#101828;font-size:14px;font-weight:500;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.CitationComponent-module_cite-acc__headerRight__OhMqH{align-items:center;display:flex;flex:0 0 auto;flex-wrap:nowrap;gap:10px;min-width:0}.CitationComponent-module_cite-acc__gapBadge__VkuKQ{background:#fef3f2;border-radius:999px;color:#b42318;font-size:12px;font-weight:500;padding:4px 10px;white-space:nowrap}.CitationComponent-module_cite-acc__scoreBadge__uVDRv{align-items:center;border:1px solid var(--Primitive-Gray-300,#d0d5dd);border-radius:var(--chip-border-radius,16px);display:flex;gap:4px;padding:4px 8px}.CitationComponent-module_cite-acc__scoreIcon__-MUli{display:none}.CitationComponent-module_cite-acc__scoreText__42VsL{color:var(--Primitive-Purple-600,#6938ef);font-family:Inter;font-size:12px;font-style:normal;font-weight:500;line-height:150%}.CitationComponent-module_cite-acc__gapBadge__VkuKQ,.CitationComponent-module_cite-acc__scoreBadge__uVDRv{flex:0 1 auto;min-width:0}.CitationComponent-module_cite-acc__toggleBtn__RcZmg{align-items:center;background:#0000;border:none;cursor:pointer;display:inline-flex;flex:0 0 auto;justify-content:center;padding:4px}.CitationComponent-module_cite-acc__toggleBtn__RcZmg i{color:#667085;font-size:18px}.CitationComponent-module_cite-acc__body__YQDAm{display:flex;flex-direction:column;gap:12px;min-width:0;padding:20px}.CitationComponent-module_cite-acc__explain-body__1v7hb{display:flex;flex-direction:column;gap:"14px";min-width:0;padding:15px}.CitationComponent-module_cite-acc__explain-body_border__QQnDb{border-top:1px solid #eaecf0}.CitationComponent-module_cite-acc__innerHeader__BFwFr{align-items:center;background:#0000;display:flex;gap:12px;justify-content:space-between;min-width:0}.CitationComponent-module_cite-acc__backHeader__aFHVT{align-items:center;border-bottom:.5px solid #e8e7e3;display:flex;gap:8px;padding:14px 16px}.CitationComponent-module_cite-acc__backBtn__d91ol{background:none;border:none;color:#888;cursor:pointer;font-size:20px;line-height:1;padding:0}.CitationComponent-module_cite-acc__backTitle__Jwdr9{color:#1a1a1a;font-size:14px;font-weight:500}.CitationComponent-module_cite-acc__cognitiveSection__eVNry{align-items:center;border-bottom:none;border-top:1px solid #eee;cursor:pointer;display:flex;justify-content:space-between;padding-left:12px;padding-right:12px;padding-top:12px}.CitationComponent-module_cite-acc__cognitiveTitle__LXmhU{color:#101828;font-size:13px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.CitationComponent-module_cite-acc__innerHeaderLeft__uY1Et{align-items:flex-start;display:flex;flex:1 1 auto;gap:10px;min-width:0}.CitationComponent-module_cite-acc__innerIcon__UvlXX{align-items:center;background:#f4f3ff;border-radius:999px;display:inline-flex;flex:0 0 28px;height:28px;justify-content:center;width:28px}.CitationComponent-module_cite-acc__innerTitle__Lv8vo{color:#101828;font-size:14px;font-weight:500;line-height:22px}.CitationComponent-module_cite-acc__innerSub__XG7ad{color:#101828;font-size:12px;line-height:18px;margin-top:2px}.CitationComponent-module_cite-acc__innerToggle__3YHI5{align-items:center;background:#fff;border:1px solid #eaecf0;border-radius:999px;cursor:pointer;display:inline-flex;flex:0 0 28px;height:28px;justify-content:center;width:28px}.CitationComponent-module_cite-acc__innerToggle__3YHI5 i{color:#667085;font-size:18px}.CitationComponent-module_cite-acc__innerBody__Bzkt4{border-top:none;min-width:0;overflow-wrap:anywhere;word-break:break-word}.CitationComponent-module_cite-text__mark__Xh6wV{background-color:#fef3c7;border-radius:4px;padding-left:4px;padding-right:4px}.CitationComponent-module_cite-text__a__9HVV6{display:inline}.CitationComponent-module_cite-text__a-btn__9XyA1{color:#7a5af8;cursor:pointer;display:inline;font-weight:500}.CitationComponent-module_cite-text__a-btn_chevron__DXtkI,.CitationComponent-module_cite-text__a-btn_circle__SI-j3{display:inline-block;margin-left:4px;vertical-align:middle}.CitationComponent-module_cite-text__a-btn_open__2NfoX{border:1px solid #7a5af8;border-radius:4px;padding-left:4px;padding-right:4px}.CitationComponent-module_cite-text__a-btn_circle__SI-j3{animation:CitationComponent-module_spin__W-F7a 1.5s linear infinite;color:#7a5af8;height:16px;margin-left:auto;margin-right:auto;width:16px}.CitationComponent-module_cite-text__a-btn_chevron__DXtkI{height:16px;width:16px}.CitationComponent-module_cite-text__a-container__G-ier{margin-bottom:8px;margin-top:8px;max-height:250px;overflow:scroll}.CitationComponent-module_cite-text__a-container-docs__n8qlA{margin-bottom:8px;margin-top:8px;max-height:620px;overflow:scroll}.CitationComponent-module_cite-text__a-container-loader__f0Exm{animation:CitationComponent-module_spin__W-F7a 1.5s linear infinite;color:#000;height:32px;margin-left:auto;margin-right:auto;width:32px}.CitationComponent-module_md-ol__TO-dB{list-style:decimal;list-style-position:outside;padding-left:20px}.CitationComponent-module_md-ul__LfZPA{list-style:disc;list-style-position:outside;margin:10px 0 12px;padding-left:20px}.CitationComponent-module_md-li__ZEscN{margin:6px 0}.CitationComponent-module_cite-acc__btn-container__RUjvL{align-items:center;display:flex;font-family:Inter;font-size:14px;font-style:normal;font-weight:500;gap:5px;line-height:normal;padding:0 30px 15px;.CitationComponent-module_btn-accept__F5s10{border:1px solid #8098f9;border-radius:6px;color:#444ce7;padding:7px 10.5px}.CitationComponent-module_btn-reject__ziZa-{border:1px solid #fecaca;border-radius:6px;color:#ef4444;padding:7px 10.5px}}@keyframes CitationComponent-module_spin__W-F7a{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@container (max-width: 420px){.CitationComponent-module_cite-acc__scoreIcon__-MUli{align-items:center;display:inline-flex}.CitationComponent-module_cite-acc__scoreBadge__uVDRv{gap:6px;padding:6px 8px}.CitationComponent-module_cite-acc__gapBadge__VkuKQ{padding:4px 8px}}'));const o=document.head||document.getElementsByTagName("head")[0]||document.documentElement;o&&o.appendChild(e)}();export{e as default};
1
+ var e={"cite-acc":"CitationComponent-module_cite-acc__2XusN","cite-body":"CitationComponent-module_cite-body__MwotJ","cite-acc__header":"CitationComponent-module_cite-acc__header__Ek-ou","cite-acc__headerLeft":"CitationComponent-module_cite-acc__headerLeft__K6ItR","cite-acc__titleIcon":"CitationComponent-module_cite-acc__titleIcon__ssoL-","cite-acc__title":"CitationComponent-module_cite-acc__title__3ibjn","cite-acc__headerRight":"CitationComponent-module_cite-acc__headerRight__OhMqH","cite-acc__gapBadge":"CitationComponent-module_cite-acc__gapBadge__VkuKQ","cite-acc__scoreBadge":"CitationComponent-module_cite-acc__scoreBadge__uVDRv","cite-acc__scoreIcon":"CitationComponent-module_cite-acc__scoreIcon__-MUli","cite-acc__scoreText":"CitationComponent-module_cite-acc__scoreText__42VsL","cite-acc__toggleBtn":"CitationComponent-module_cite-acc__toggleBtn__RcZmg","cite-acc__body":"CitationComponent-module_cite-acc__body__YQDAm","cite-acc__explain-body":"CitationComponent-module_cite-acc__explain-body__1v7hb","cite-acc__explain-body_border":"CitationComponent-module_cite-acc__explain-body_border__QQnDb","cite-acc__innerHeader":"CitationComponent-module_cite-acc__innerHeader__BFwFr","cite-acc__backHeader":"CitationComponent-module_cite-acc__backHeader__aFHVT","cite-acc__backBtn":"CitationComponent-module_cite-acc__backBtn__d91ol","cite-acc__backTitle":"CitationComponent-module_cite-acc__backTitle__Jwdr9","cite-acc__cognitiveSection":"CitationComponent-module_cite-acc__cognitiveSection__eVNry","cite-acc__cognitiveTitle":"CitationComponent-module_cite-acc__cognitiveTitle__LXmhU","cite-acc__innerHeaderLeft":"CitationComponent-module_cite-acc__innerHeaderLeft__uY1Et","cite-acc__innerIcon":"CitationComponent-module_cite-acc__innerIcon__UvlXX","cite-acc__innerTitle":"CitationComponent-module_cite-acc__innerTitle__Lv8vo","cite-acc__innerSub":"CitationComponent-module_cite-acc__innerSub__XG7ad","cite-acc__innerToggle":"CitationComponent-module_cite-acc__innerToggle__3YHI5","cite-acc__innerBody":"CitationComponent-module_cite-acc__innerBody__Bzkt4","cite-text__mark":"CitationComponent-module_cite-text__mark__Xh6wV","cite-text__a":"CitationComponent-module_cite-text__a__9HVV6","cite-text__a-btn":"CitationComponent-module_cite-text__a-btn__9XyA1","cite-text__a-btn_circle":"CitationComponent-module_cite-text__a-btn_circle__SI-j3","cite-text__a-btn_chevron":"CitationComponent-module_cite-text__a-btn_chevron__DXtkI","cite-text__a-btn_open":"CitationComponent-module_cite-text__a-btn_open__2NfoX",spin:"CitationComponent-module_spin__W-F7a","cite-text__a-container":"CitationComponent-module_cite-text__a-container__G-ier","cite-text__a-container-docs":"CitationComponent-module_cite-text__a-container-docs__n8qlA","cite-text__a-container-loader":"CitationComponent-module_cite-text__a-container-loader__f0Exm","md-ol":"CitationComponent-module_md-ol__TO-dB","md-ul":"CitationComponent-module_md-ul__LfZPA","md-li":"CitationComponent-module_md-li__ZEscN","cite-acc__btn-container":"CitationComponent-module_cite-acc__btn-container__RUjvL","btn-accept":"CitationComponent-module_btn-accept__F5s10","btn-reject":"CitationComponent-module_btn-reject__ziZa-"};!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const t=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;t&&e.setAttribute("nonce",t),e.appendChild(document.createTextNode('.CitationComponent-module_cite-acc__2XusN{background:#fff;border:1px solid #eaecf0;border-radius:12px;box-sizing:border-box;container-type:inline-size;width:400px}.CitationComponent-module_cite-body__MwotJ{max-height:500px;overflow:auto;width:100%}.CitationComponent-module_cite-acc__header__Ek-ou{align-items:center;border-bottom:1px solid #eaecf0;border-top:1px solid #eaecf0;display:flex;flex-wrap:nowrap;gap:12px;justify-content:space-between;min-width:0;padding:12px}.CitationComponent-module_cite-acc__headerLeft__K6ItR{align-items:center;display:flex;flex:1 1 auto;gap:4px;min-width:0;overflow:hidden}.CitationComponent-module_cite-acc__titleIcon__ssoL-{align-items:center;display:inline-flex;flex:0 0 28px;height:28px;justify-content:center;width:28px}.CitationComponent-module_cite-acc__title__3ibjn{color:#101828;font-size:14px;font-weight:500;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.CitationComponent-module_cite-acc__headerRight__OhMqH{align-items:center;display:flex;flex:0 0 auto;flex-wrap:nowrap;gap:10px;min-width:0}.CitationComponent-module_cite-acc__gapBadge__VkuKQ{background:#fef3f2;border-radius:999px;color:#b42318;font-size:12px;font-weight:500;padding:4px 10px;white-space:nowrap}.CitationComponent-module_cite-acc__scoreBadge__uVDRv{align-items:center;border:1px solid var(--Primitive-Gray-300,#d0d5dd);border-radius:var(--chip-border-radius,16px);display:flex;gap:4px;padding:4px 8px}.CitationComponent-module_cite-acc__scoreIcon__-MUli{display:none}.CitationComponent-module_cite-acc__scoreText__42VsL{color:var(--Primitive-Purple-600,#6938ef);font-family:Inter;font-size:12px;font-style:normal;font-weight:500;line-height:150%}.CitationComponent-module_cite-acc__gapBadge__VkuKQ,.CitationComponent-module_cite-acc__scoreBadge__uVDRv{flex:0 1 auto;min-width:0}.CitationComponent-module_cite-acc__toggleBtn__RcZmg{align-items:center;background:#0000;border:none;cursor:pointer;display:inline-flex;flex:0 0 auto;justify-content:center;padding:4px}.CitationComponent-module_cite-acc__toggleBtn__RcZmg i{color:#667085;font-size:18px}.CitationComponent-module_cite-acc__body__YQDAm{display:flex;flex-direction:column;gap:12px;min-width:0;padding:20px}.CitationComponent-module_cite-acc__explain-body__1v7hb{display:flex;flex-direction:column;gap:"14px";min-width:0;padding:15px}.CitationComponent-module_cite-acc__explain-body_border__QQnDb{border-top:1px solid #eaecf0}.CitationComponent-module_cite-acc__innerHeader__BFwFr{align-items:center;background:#0000;display:flex;gap:12px;justify-content:space-between;min-width:0}.CitationComponent-module_cite-acc__backHeader__aFHVT{align-items:center;border-bottom:.5px solid #e8e7e3;display:flex;gap:8px;padding:14px 16px}.CitationComponent-module_cite-acc__backBtn__d91ol{background:none;border:none;color:#888;cursor:pointer;font-size:20px;line-height:1;padding:0}.CitationComponent-module_cite-acc__backTitle__Jwdr9{color:#1a1a1a;font-size:14px;font-weight:500}.CitationComponent-module_cite-acc__cognitiveSection__eVNry{align-items:center;border-bottom:none;border-top:1px solid #eee;cursor:pointer;display:flex;justify-content:space-between;padding-left:12px;padding-right:12px;padding-top:12px}.CitationComponent-module_cite-acc__cognitiveTitle__LXmhU{color:#101828;font-size:13px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.CitationComponent-module_cite-acc__innerHeaderLeft__uY1Et{align-items:flex-start;display:flex;flex:1 1 auto;gap:10px;min-width:0}.CitationComponent-module_cite-acc__innerIcon__UvlXX{align-items:center;background:#f4f3ff;border-radius:999px;display:inline-flex;flex:0 0 28px;height:28px;justify-content:center;width:28px}.CitationComponent-module_cite-acc__innerTitle__Lv8vo{color:#101828;font-size:14px;font-weight:500;line-height:22px}.CitationComponent-module_cite-acc__innerSub__XG7ad{color:#101828;font-size:12px;line-height:18px;margin-top:2px}.CitationComponent-module_cite-acc__innerToggle__3YHI5{align-items:center;background:#fff;border:1px solid #eaecf0;border-radius:999px;cursor:pointer;display:inline-flex;flex:0 0 28px;height:28px;justify-content:center;width:28px}.CitationComponent-module_cite-acc__innerToggle__3YHI5 i{color:#667085;font-size:18px}.CitationComponent-module_cite-acc__innerBody__Bzkt4{border-top:none;min-width:0;overflow-wrap:anywhere;word-break:break-word}.CitationComponent-module_cite-text__mark__Xh6wV{background-color:#fef3c7;border-radius:4px;padding-left:4px;padding-right:4px}.CitationComponent-module_cite-text__a__9HVV6{display:inline}.CitationComponent-module_cite-text__a-btn__9XyA1{color:#7a5af8;cursor:pointer;display:inline;font-weight:500}.CitationComponent-module_cite-text__a-btn_chevron__DXtkI,.CitationComponent-module_cite-text__a-btn_circle__SI-j3{display:inline-block;margin-left:4px;vertical-align:middle}.CitationComponent-module_cite-text__a-btn_open__2NfoX{border:1px solid #7a5af8;border-radius:4px;padding-left:4px;padding-right:4px}.CitationComponent-module_cite-text__a-btn_circle__SI-j3{animation:CitationComponent-module_spin__W-F7a 1.5s linear infinite;color:#7a5af8;height:16px;margin-left:auto;margin-right:auto;width:16px}.CitationComponent-module_cite-text__a-btn_chevron__DXtkI{height:16px;width:16px}.CitationComponent-module_cite-text__a-container__G-ier{margin-bottom:8px;margin-top:8px;max-height:250px;overflow:scroll}.CitationComponent-module_cite-text__a-container-docs__n8qlA{margin-bottom:8px;margin-top:8px;max-height:620px;overflow:scroll}.CitationComponent-module_cite-text__a-container-loader__f0Exm{animation:CitationComponent-module_spin__W-F7a 1.5s linear infinite;color:#000;height:32px;margin-left:auto;margin-right:auto;width:32px}.CitationComponent-module_md-ol__TO-dB{list-style:decimal;list-style-position:outside;padding-left:20px}.CitationComponent-module_md-ul__LfZPA{list-style:disc;list-style-position:outside;margin:10px 0 12px;padding-left:20px}.CitationComponent-module_md-li__ZEscN{margin:6px 0}.CitationComponent-module_cite-acc__btn-container__RUjvL{align-items:center;display:flex;font-family:Inter;font-size:14px;font-style:normal;font-weight:500;gap:5px;line-height:normal;padding:0 30px 15px;.CitationComponent-module_btn-accept__F5s10{border:1px solid #8098f9;border-radius:6px;color:#444ce7;padding:7px 10.5px}.CitationComponent-module_btn-reject__ziZa-{border:1px solid #fecaca;border-radius:6px;color:#ef4444;padding:7px 10.5px}}@keyframes CitationComponent-module_spin__W-F7a{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@container (max-width: 420px){.CitationComponent-module_cite-acc__scoreIcon__-MUli{align-items:center;display:inline-flex}.CitationComponent-module_cite-acc__scoreBadge__uVDRv{gap:6px;padding:6px 8px}.CitationComponent-module_cite-acc__gapBadge__VkuKQ{padding:4px 8px}}'));const o=document.head||document.getElementsByTagName("head")[0]||document.documentElement;o&&o.appendChild(e)}();export{e as default};
2
2
  //# sourceMappingURL=CitationComponent.module.css.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsxs as c,jsx as i,Fragment as a}from"react/jsx-runtime";import n,{useMemo as t}from"react";import r from"../Popups/PopupDefaults.js";import o from"react-markdown";import l from"rehype-raw";import d from"./CitationComponent.module.css.js";import{ChevronUp as s}from"lucide-react";import{ReactComponent as m}from"../icons/cognitiveBrain.svg.js";import{ReactComponent as v}from"../icons/aiMagic.svg.js";import _ from"./CitationAnchor.js";var p=function(c){var a=c.text,n=c.item;return i(o,e({rehypePlugins:[l],components:{ol:function(c){var a=c.children;return i("ol",e({className:d["md-ol"]},{children:a}))},ul:function(c){var a=c.children;return i("ul",e({className:d["md-ul"]},{children:a}))},li:function(c){var a=c.children;return i("li",e({className:d["md-li"]},{children:a}))},a:function(e){e.node;var c=e.href,a=e.children;return i(_,{href:c,children:a,metaData:{citations:n.citations,docData:n.docData}})}}},{children:a.replace(/<br\s*\/?>/gi,"\n")}))};function h(o){var l=o.item,_=o.title,h=void 0===_?"Cognitive Decisioning AI":_,u=o.relevanceScore,N=void 0===u?0:u,f=o.showRelevanceScore,b=void 0===f||f,y=o.reason,x=void 0===y?"No reasoning provided.":y,g=o.impact,C=void 0===g?"No Impact provided.":g,k=o.explaination,B=void 0===k?"No explaination provided.":k,H=o.gap,j=void 0===H?"None":H,D=o.onClose,A=void 0===D?function(){}:D,T=o.onAccept,I=o.onReject,L=o.showResolveBtns,w=void 0!==L&&L,R=o.sections,P=o.leftIcon,M=o.scoreIcon,S=o.className,E=o.customStyles,G=void 0===E?{}:E,F=o.actions,q=o.disableAllActions,z=void 0!==q&&q,J=o.actionBtnDisabledStyle,K=void 0===J?{}:J,O=o.onBackClick,Q=o.isImpactNeeded,U=void 0===Q||Q,V=o.cognitiveTitle,W=void 0===V?"Cognitive Integrity":V,X=o.labels,Y=void 0===X?{}:X,Z=t(function(){var e=Number(N);return Number.isNaN(e)?0:Math.max(0,Math.min(100,Math.round(e)))},[N]),$=t(function(){var e=Y&&Y.noGapsText||"1. No gaps identified.";return function(e){if(!e)return!0;var c=e.trim().toLowerCase();return"none"===c||"no gap"===c||"no gaps"===c||"n/a"===c}(j)?e:j},[j]),ee=Y&&Y.impact||"Impact",ce=Y&&Y.explanation||"Explaination",ie=Y&&Y.decisionFactors||"Decision Making Factors",ae=Y&&Y.gaps||"Gaps in Decision",ne=Y&&Y.accept||"Accept",te=Y&&Y.reject||"Reject",re=Y&&Y.backAriaLabel||"Go back",oe=F||[{id:"reject",label:te,onClick:I,className:d["btn-reject"]},{id:"accept",label:ne,onClick:T,className:d["btn-accept"]}];return c("div",e({className:"".concat(d["cite-acc"]," ").concat(S||""),style:e(e({},r.CitationAccordionDefaults.container),null==G?void 0:G.container)},{children:[O&&c("div",e({className:d["cite-acc__backHeader"]},{children:[i("button",e({type:"button",className:d["cite-acc__backBtn"],onClick:function(e){e.stopPropagation(),O&&O()},"aria-label":re},{children:"‹"})),i("span",e({className:d["cite-acc__backTitle"]},{children:W}))]})),R&&R.length>0?R.map(function(a){return!1===a.show?null:c("div",e({className:"".concat(d["cite-acc__explain-body"]," ").concat(a.bodyClassName||"")},{children:[c("div",e({className:d["cite-acc__innerHeader"],style:e(e({},r.CitationAccordionDefaults.innerHeader),null==G?void 0:G.innerHeader)},{children:[i("div",e({className:d["cite-acc__innerHeaderLeft"]},{children:i("div",{children:i("div",e({className:d["cite-acc__innerTitle"]},{children:a.title}))})})),i("button",e({type:"button",onClick:function(e){e.stopPropagation(),A&&A()}},{children:i(s,{})}))]})),i("div",e({className:"".concat(d["cite-acc__innerBody"]," text-sm text-gray-600"),style:e(e({},r.CitationAccordionDefaults.innerBody),null==G?void 0:G.innerBody)},{children:"string"==typeof a.content?i(p,{text:a.content,item:a.item||l||{}}):a.content}))]}),a.id||a.title)}):c(a,{children:[U&&c("div",e({className:d["cite-acc__explain-body"]},{children:[c("div",e({className:d["cite-acc__innerHeader"]},{children:[i("div",e({className:d["cite-acc__innerHeaderLeft"]},{children:i("div",{children:i("div",e({className:d["cite-acc__innerTitle"]},{children:ee}))})})),i("button",e({type:"button",onClick:function(e){e.stopPropagation(),A&&A()}},{children:i(s,{})}))]})),i("div",e({className:"".concat(d["cite-acc__innerBody"]," text-sm text-gray-600")},{children:i(p,{text:C||"",item:l||{}})}))]})),c("div",e({className:d["cite-acc__explain-body"]},{children:[i("div",e({className:d["cite-acc__innerHeader"]},{children:i("div",e({className:d["cite-acc__innerHeaderLeft"]},{children:i("div",{children:i("div",e({className:d["cite-acc__innerTitle"]},{children:ce}))})}))})),i("div",e({className:"".concat(d["cite-acc__innerBody"]," text-sm text-gray-600")},{children:i(p,{text:B||"",item:{}})}))]})),w&&i("div",e({className:d["cite-acc__btn-container"]},{children:oe.map(function(c){var a=z||c.disabled;return i("button",e({className:c.className,onClick:a?void 0:c.onClick,disabled:a,style:e(e({},c.style),a?e(e({opacity:.5,cursor:"not-allowed"},K),c.disabledStyle):{})},{children:c.label}),c.id)})})),c("div",e({className:d["cite-acc__header"]},{children:[c("div",e({className:d["cite-acc__headerLeft"]},{children:[i("span",e({className:d["cite-acc__titleIcon"]},{children:P?"function"==typeof P?n.createElement(P):P:i(m,{})})),i("div",e({className:d["cite-acc__title"]},{children:h}))]})),i("div",e({className:d["cite-acc__headerRight"]},{children:b&&c("span",e({className:d["cite-acc__scoreBadge"]},{children:[M?"function"==typeof M?n.createElement(M):M:i(v,{}),c("span",e({className:d["cite-acc__scoreText"]},{children:[Z,"%"]}))]}))}))]})),c("div",e({className:d["cite-acc__explain-body"]},{children:[i("div",e({className:d["cite-acc__innerHeader"]},{children:i("div",e({className:d["cite-acc__innerHeaderLeft"]},{children:i("div",{children:i("div",e({className:d["cite-acc__innerTitle"]},{children:ie}))})}))})),i("div",e({className:"".concat(d["cite-acc__innerBody"]," text-sm text-gray-600")},{children:i(p,{text:x||"",item:l||{}})}))]})),c("div",e({className:"".concat(d["cite-acc__explain-body"]," ").concat(d["cite-acc__explain-body_border"])},{children:[i("div",e({className:d["cite-acc__innerHeader"]},{children:i("div",e({className:d["cite-acc__innerHeaderLeft"]},{children:i("div",{children:i("div",e({className:d["cite-acc__innerTitle"]},{children:ae}))})}))})),i("div",e({className:"".concat(d["cite-acc__innerBody"]," text-sm text-gray-600")},{children:i(p,{text:$||"",item:l||{}})}))]}))]})]}))}export{h as default};
1
+ import{__assign as e}from"tslib";import{jsxs as c,jsx as i,Fragment as a}from"react/jsx-runtime";import n,{useMemo as t}from"react";import r from"../Popups/PopupDefaults.js";import o from"react-markdown";import l from"rehype-raw";import d from"./CitationComponent.module.css.js";import{ChevronUp as s}from"lucide-react";import{ReactComponent as m}from"../icons/cognitiveBrain.svg.js";import{ReactComponent as v}from"../icons/aiMagic.svg.js";import _ from"./CitationAnchor.js";var h=function(c){var a=c.text,n=c.item;return i(o,e({rehypePlugins:[l],components:{ol:function(c){var a=c.children;return i("ol",e({className:d["md-ol"]},{children:a}))},ul:function(c){var a=c.children;return i("ul",e({className:d["md-ul"]},{children:a}))},li:function(c){var a=c.children;return i("li",e({className:d["md-li"]},{children:a}))},a:function(e){e.node;var c=e.href,a=e.children;return i(_,{href:c,children:a,metaData:{citations:n.citations,docData:n.docData}})}}},{children:a.replace(/<br\s*\/?>/gi,"\n")}))};function p(o){var l=o.item,_=o.title,p=void 0===_?"Cognitive Decisioning AI":_,u=o.relevanceScore,N=void 0===u?0:u,f=o.showRelevanceScore,b=void 0===f||f,y=o.reason,x=void 0===y?"No reasoning provided.":y,g=o.impact,C=void 0===g?"No Impact provided.":g,k=o.explaination,B=void 0===k?"No explaination provided.":k,H=o.gap,j=void 0===H?"None":H,D=o.onClose,A=void 0===D?function(){}:D,T=o.onAccept,I=o.onReject,L=o.showResolveBtns,w=void 0!==L&&L,R=o.sections,P=o.leftIcon,M=o.scoreIcon,S=o.className,E=o.customStyles,G=void 0===E?{}:E,F=o.actions,q=o.disableAllActions,z=void 0!==q&&q,J=o.actionBtnDisabledStyle,K=void 0===J?{}:J,O=o.onBackClick,Q=o.isImpactNeeded,U=void 0===Q||Q,V=o.cognitiveTitle,W=void 0===V?"Cognitive Integrity":V,X=o.labels,Y=void 0===X?{}:X,Z=t(function(){var e=Number(N);return Number.isNaN(e)?0:Math.max(0,Math.min(100,Math.round(e)))},[N]),$=t(function(){var e=Y&&Y.noGapsText||"1. No gaps identified.";return function(e){if(!e)return!0;var c=e.trim().toLowerCase();return"none"===c||"no gap"===c||"no gaps"===c||"n/a"===c}(j)?e:j},[j]),ee=Y&&Y.impact||"Impact",ce=Y&&Y.explanation||"Explaination",ie=Y&&Y.decisionFactors||"Decision Making Factors",ae=Y&&Y.gaps||"Gaps in Decision",ne=Y&&Y.accept||"Accept",te=Y&&Y.reject||"Reject",re=Y&&Y.backAriaLabel||"Go back",oe=F||[{id:"reject",label:te,onClick:I,className:d["btn-reject"]},{id:"accept",label:ne,onClick:T,className:d["btn-accept"]}];return c("div",e({className:"".concat(d["cite-acc"]," ").concat(S||""),style:e(e({},r.CitationAccordionDefaults.container),null==G?void 0:G.container)},{children:[O&&c("div",e({className:d["cite-acc__backHeader"]},{children:[i("button",e({type:"button",className:d["cite-acc__backBtn"],onClick:function(e){e.stopPropagation(),O&&O()},"aria-label":re},{children:"‹"})),i("span",e({className:d["cite-acc__backTitle"]},{children:W}))]})),i("div",e({className:d["cite-body"]},{children:R&&R.length>0?R.map(function(a){return!1===a.show?null:c("div",e({className:"".concat(d["cite-acc__explain-body"]," ").concat(a.bodyClassName||"")},{children:[c("div",e({className:d["cite-acc__innerHeader"],style:e(e({},r.CitationAccordionDefaults.innerHeader),null==G?void 0:G.innerHeader)},{children:[i("div",e({className:d["cite-acc__innerHeaderLeft"]},{children:i("div",{children:i("div",e({className:d["cite-acc__innerTitle"]},{children:a.title}))})})),i("button",e({type:"button",onClick:function(e){e.stopPropagation(),A&&A()}},{children:i(s,{})}))]})),i("div",e({className:"".concat(d["cite-acc__innerBody"]," text-sm text-gray-600"),style:e(e({},r.CitationAccordionDefaults.innerBody),null==G?void 0:G.innerBody)},{children:"string"==typeof a.content?i(h,{text:a.content,item:a.item||l||{}}):a.content}))]}),a.id||a.title)}):c(a,{children:[U&&c("div",e({className:d["cite-acc__explain-body"]},{children:[c("div",e({className:d["cite-acc__innerHeader"]},{children:[i("div",e({className:d["cite-acc__innerHeaderLeft"]},{children:i("div",{children:i("div",e({className:d["cite-acc__innerTitle"]},{children:ee}))})})),i("button",e({type:"button",onClick:function(e){e.stopPropagation(),A&&A()}},{children:i(s,{})}))]})),i("div",e({className:"".concat(d["cite-acc__innerBody"]," text-sm text-gray-600")},{children:i(h,{text:C||"",item:l||{}})}))]})),c("div",e({className:d["cite-acc__explain-body"]},{children:[i("div",e({className:d["cite-acc__innerHeader"]},{children:i("div",e({className:d["cite-acc__innerHeaderLeft"]},{children:i("div",{children:i("div",e({className:d["cite-acc__innerTitle"]},{children:ce}))})}))})),i("div",e({className:"".concat(d["cite-acc__innerBody"]," text-sm text-gray-600")},{children:i(h,{text:B||"",item:{}})}))]})),w&&i("div",e({className:d["cite-acc__btn-container"]},{children:oe.map(function(c){var a=z||c.disabled;return i("button",e({className:c.className,onClick:a?void 0:c.onClick,disabled:a,style:e(e({},c.style),a?e(e({opacity:.5,cursor:"not-allowed"},K),c.disabledStyle):{})},{children:c.label}),c.id)})})),c("div",e({className:d["cite-acc__header"]},{children:[c("div",e({className:d["cite-acc__headerLeft"]},{children:[i("span",e({className:d["cite-acc__titleIcon"]},{children:P?"function"==typeof P?n.createElement(P):P:i(m,{})})),i("div",e({className:d["cite-acc__title"]},{children:p}))]})),i("div",e({className:d["cite-acc__headerRight"]},{children:b&&c("span",e({className:d["cite-acc__scoreBadge"]},{children:[M?"function"==typeof M?n.createElement(M):M:i(v,{}),c("span",e({className:d["cite-acc__scoreText"]},{children:[Z,"%"]}))]}))}))]})),c("div",e({className:d["cite-acc__explain-body"]},{children:[i("div",e({className:d["cite-acc__innerHeader"]},{children:i("div",e({className:d["cite-acc__innerHeaderLeft"]},{children:i("div",{children:i("div",e({className:d["cite-acc__innerTitle"]},{children:ie}))})}))})),i("div",e({className:"".concat(d["cite-acc__innerBody"]," text-sm text-gray-600")},{children:i(h,{text:x||"",item:l||{}})}))]})),c("div",e({className:"".concat(d["cite-acc__explain-body"]," ").concat(d["cite-acc__explain-body_border"])},{children:[i("div",e({className:d["cite-acc__innerHeader"]},{children:i("div",e({className:d["cite-acc__innerHeaderLeft"]},{children:i("div",{children:i("div",e({className:d["cite-acc__innerTitle"]},{children:ae}))})}))})),i("div",e({className:"".concat(d["cite-acc__innerBody"]," text-sm text-gray-600")},{children:i(h,{text:$||"",item:l||{}})}))]}))]})}))]}))}export{p as default};
2
2
  //# sourceMappingURL=CognitiveComponent.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsx as i,jsxs as o,Fragment as n}from"react/jsx-runtime";import{PenLine as t,CheckCircle as l,XCircle as r,Info as d,ChevronDown as a,ChevronRight as s}from"lucide-react";import{useState as c}from"react";import{ToneToggle as p}from"./ToneToggle.js";import"../CognitiveComponents/CitationComponent.module.css.js";import{ReactComponent as v}from"../icons/cognitiveBrain.svg.js";import{ReactComponent as u}from"../icons/aiMagic.svg.js";var g=[{color:"#1D9E75",angle:-90,arcD:"M1 13 A10 10 0 0 1 1 13"},{color:"#BA7517",angle:0,arcD:"M1 13 A10 10 0 0 1 11 3"},{color:"#E24B4A",angle:90,arcD:"M1 13 A10 10 0 0 1 21 13"}],m=function(n){var t=n.toneIndex,l=n.configs,r=void 0===l?g:l,d=r[Math.min(t,r.length-1)]||r[1]||r[0],a=d.color,s=d.angle,c=d.arcD,p=(s-90)*Math.PI/180,v=11+9*Math.cos(p),u=13+9*Math.sin(p);return o("svg",e({width:"22",height:"14",viewBox:"0 0 22 14",fill:"none"},{children:[i("path",{d:"M1 13 A10 10 0 0 1 21 13",stroke:"#e5e5e5",strokeWidth:"2.5",strokeLinecap:"round"}),i("path",{d:c,stroke:a,strokeWidth:"2.5",strokeLinecap:"round"}),i("line",{x1:"11",y1:"13",x2:v,y2:u,stroke:a,strokeWidth:"2",strokeLinecap:"round"})]}))},y=function(o){var n=o.type,t=o.customStyles,l=void 0===t?{}:t,r=e(e({},{High:{padding:"3.5px 7px",borderRadius:"100px",border:"1px solid #FECACA",background:"#FEF2F2",color:"#B91C1C",fontSize:"11px",fontWeight:"500"},Medium:{padding:"3.5px 7px",borderRadius:"100px",border:"1px solid #F2E5A1",background:"#FFFBEB",color:"#B45309",fontSize:"11px",fontWeight:"500"},Low:{padding:"3.5px 7px",borderRadius:"100px",border:"1px solid #8098F9",background:"#DBEAFE",color:"#444CE7",fontSize:"11px",fontWeight:"500"}}),l),d=r[n]||r.Medium;return i("div",e({style:d},{children:n}))},f=["Lenient","Balanced","Aggressive"],h={Lenient:"#1D9E75",Balanced:"#BA7517",Aggressive:"#E24B4A"},x={width:"350px",background:"#fff",border:"1px solid #ddd",borderRadius:"8px",padding:"16px",maxHeight:"400px",overflow:"auto"},S={display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:12},b={fontSize:11,fontWeight:500,letterSpacing:"0.08em",color:"#E24B4A",textTransform:"uppercase"},C={fontSize:15,fontWeight:500,margin:"0 0 8px",color:"#111"},B={fontSize:13,color:"#666",lineHeight:1.6,margin:"0 0 14px"},I={marginBottom:14,borderTop:"0.5px solid #eee",paddingTop:12},k={display:"flex",alignItems:"center",gap:6,background:"none",border:"none",cursor:"pointer",padding:0,width:"100%"},A={fontSize:11,fontWeight:500,textTransform:"uppercase",letterSpacing:"0.08em",color:"#E24B4A"},D={display:"flex",gap:8,marginBottom:18},T={flex:1,display:"flex",alignItems:"center",justifyContent:"center",gap:5,fontSize:12,fontWeight:500,padding:"7px 4px",borderRadius:8,border:"0.5px solid #ccc",background:"#fff",cursor:"pointer"},w={background:"none",border:"none",cursor:"pointer",fontSize:16,color:"#888",lineHeight:1,padding:0},z={borderTop:"0.5px solid #eee",paddingTop:14},R={display:"flex",alignItems:"center",width:"100%",background:"none",border:"none",cursor:"pointer",padding:0,marginBottom:4},W={cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"space-between",paddingTop:"12px",borderTop:"1px solid #eee",borderBottom:"none",paddingLeft:"12px",paddingRight:"12px"},E={display:"flex",alignItems:"center",gap:"4px",minWidth:0,flex:"1 1 auto",overflow:"hidden"},j={width:"28px",height:"28px",display:"inline-flex",alignItems:"center",justifyContent:"center",flex:"0 0 28px"},L={fontSize:"13px",color:"#101828",minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},M={display:"flex",alignItems:"center",gap:"10px",flex:"0 0 auto",minWidth:0,flexWrap:"nowrap"},F={display:"flex",padding:"4px 8px",alignItems:"center",gap:"4px",borderRadius:"var(--chip-border-radius, 16px)",border:"1px solid var(--Primitive-Gray-300, #d0d5dd)",flex:"0 1 auto",minWidth:0},H={color:"var(--Primitive-Purple-600, #6938ef)",fontFamily:"Inter",fontSize:"12px",fontStyle:"normal",fontWeight:500,lineHeight:"150%"};function N(N){var _,P,O,G,q,J,K,Q,U,V,X,Y,Z,$,ee,ie,oe=N.onClose,ne=N.aiReason,te=N.onAccept,le=N.onReject,re=N.onIterate,de=N.initialTone,ae=N.onRegenerate,se=N.labels,ce=void 0===se?{}:se,pe=N.toneLevelsConfig,ve=void 0===pe?f:pe,ue=N.toneColorsConfig,ge=void 0===ue?h:ue,me=N.dialConfigs,ye=void 0===me?g:me,fe=N.actions,he=N.disableAllActions,xe=void 0!==he&&he,Se=N.customStyles,be=void 0===Se?{}:Se,Ce=N.severityChipStyles,Be=void 0===Ce?{}:Ce,Ie=N.customIcons,ke=void 0===Ie?{}:Ie,Ae=N.onOpenCognitive,De=N.showTone,Te=void 0===De||De,we=N.cognitiveSectionStyle,ze=void 0===we?{}:we,Re=N.cognitiveScoreBadgeStyle,We=void 0===Re?{}:Re,Ee=N.cognitiveScoreTextStyle,je=void 0===Ee?{}:Ee,Le=N.cognitiveStyles,Me=void 0===Le?{}:Le,Fe=N.cognitiveClassNames,He=void 0===Fe?{}:Fe,Ne=N.cognitiveTitle,_e=void 0===Ne?"Cognitive Integrity":Ne,Pe=N.cognitiveLeftIcon,Oe=N.showCognitiveRightArrow,Ge=void 0===Oe||Oe,qe=N.isStreaming,Je=ve.findIndex(function(e){return e===de});-1===Je&&(Je=1);var Ke=c(!0),Qe=Ke[0],Ue=Ke[1],Ve=c(!1),Xe=Ve[0],Ye=Ve[1],Ze=c(Je),$e=Ze[0],ei=Ze[1],ii=c(Je)[0],oi=ve[$e],ni=ge[oi]||"#BA7517",ti=$e!==ii,li=[{id:"iterate",icon:ke.iterateIcon||i(t,{size:16,color:"#64748B"}),label:ce.btnIterate||"Iterate",color:"#64748B",onClick:re},{id:"accept",icon:ke.acceptIcon||i(l,{size:16,color:"#10B981"}),label:ce.btnAccept||"Approve",color:"#10B981",onClick:te},{id:"reject",icon:ke.rejectIcon||i(r,{size:16,color:"#DC2626"}),label:ce.btnReject||"Reject",color:"#DC2626",onClick:le}],ri=fe||li;return o("div",e({onClick:function(e){return e.stopPropagation()},style:e(e({},x),null===(_=null==be?void 0:be.DeviationSummaryStyles)||void 0===_?void 0:_.root)},{children:[o("div",e({style:e(e({},S),null===(P=null==be?void 0:be.DeviationSummaryStyles)||void 0===P?void 0:P.header)},{children:[o("div",e({style:{display:"flex",alignItems:"center",gap:6}},{children:[i("span",{children:ke.summaryIcon||i(d,{size:16,color:"#E24B4A"})}),i("span",e({style:e(e({},b),null===(O=null==be?void 0:be.DeviationSummaryStyles)||void 0===O?void 0:O.title)},{children:ce.summaryHeader||"Summary"}))]})),i("button",e({onClick:oe,style:e(e({},w),null===(G=null==be?void 0:be.DeviationSummaryStyles)||void 0===G?void 0:G.closeBtn)},{children:"✕"}))]})),i("p",e({style:e(e({},C),null===(q=null==be?void 0:be.DeviationSummaryStyles)||void 0===q?void 0:q.bodyText)},{children:null===(J=null==ne?void 0:ne.deviation_details)||void 0===J?void 0:J.deviation_title})),i("p",e({style:e(e({},B),null===(K=null==be?void 0:be.DeviationSummaryStyles)||void 0===K?void 0:K.summary)},{children:null===(Q=null==ne?void 0:ne.deviation_details)||void 0===Q?void 0:Q.deviation_summary})),o("div",e({style:e(e({},I),null===(U=null==be?void 0:be.DeviationSummaryStyles)||void 0===U?void 0:U.impactContainer)},{children:[o("div",e({style:{display:"flex",justifyContent:"space-between",alignItems:"center"}},{children:[o("button",e({onClick:function(){return Ue(!Qe)},style:e(e({},k),null===(V=null==be?void 0:be.DeviationSummaryStyles)||void 0===V?void 0:V.impactToggle)},{children:[i("span",e({style:e(e({},A),null===(X=null==be?void 0:be.DeviationSummaryStyles)||void 0===X?void 0:X.impactToggleLabel)},{children:ce.impactHeader||"Impact"})),i("span",e({style:{fontSize:12,color:"#E24B4A",transition:"transform 0.2s",display:"flex",alignItems:"center",transform:Qe?"rotate(180deg)":"rotate(0deg)"}},{children:i(a,{size:16,color:"#E24B4A"})}))]})),i(y,{type:(null==ne?void 0:ne.severity)||"Medium",customStyles:Be})]})),Qe&&i("p",e({style:{fontSize:13,color:"#666",lineHeight:1.6,margin:"8px 0 0"}},{children:null!==(Z=null===(Y=null==ne?void 0:ne.deviation_details)||void 0===Y?void 0:Y.deviation_impact)&&void 0!==Z?Z:ce.fallbackImpact||"This change reduces compliance obligations and lowers contractual risk thresholds."}))]})),i("div",e({style:e(e({},D),null===($=null==be?void 0:be.DeviationSummaryStyles)||void 0===$?void 0:$.actionContainer)},{children:ri.map(function(i){var n,t,l=xe||i.disabled,r=l?e(e({cursor:"not-allowed",opacity:.5},null===(n=null==be?void 0:be.DeviationSummaryStyles)||void 0===n?void 0:n.actionBtnDisabled),i.disabledStyle):{};return o("button",e({style:e(e(e(e(e({},T),null===(t=null==be?void 0:be.DeviationSummaryStyles)||void 0===t?void 0:t.actionBtn),{color:i.color}),i.style),r),onClick:l?void 0:i.onClick,disabled:l},{children:[i.icon,i.label]}),i.id)})})),Te&&o("div",e({style:e(e({},z),null===(ee=null==be?void 0:be.DeviationSummaryStyles)||void 0===ee?void 0:ee.toneContainer)},{children:[o("button",e({onClick:function(){return Ye(!Xe)},style:e(e({},R),null===(ie=null==be?void 0:be.DeviationSummaryStyles)||void 0===ie?void 0:ie.toneToggleBtn)},{children:[o("div",e({style:{display:"flex",alignItems:"center",gap:8}},{children:[i(m,{toneIndex:$e,configs:ye}),i("span",e({style:{fontSize:13,fontWeight:500,color:"#111"}},{children:ce.toneHeader||"Redline Tone"}))]})),i("span",e({style:{transition:"transform 0.2s",display:"flex",alignItems:"center",transform:Xe?"rotate(180deg)":"rotate(0deg)"}},{children:i(a,{size:16,color:"#111"})}))]})),Xe&&o(n,{children:[i("p",e({style:{fontSize:12,color:"#888",margin:"0 0 12px"}},{children:ce.toneDescription||"Controls how assertively AI is redlining"})),i(p,{isDirty:ti,onToneChange:function(e){ei(e)},toneColor:ni,toneIndex:$e,onClickRegenerate:function(){return null==ae?void 0:ae(oi)},toneLabels:ve,isStreaming:qe,aiReason:ne})]})]})),Ae&&o("div",e({className:null==He?void 0:He.section,onClick:function(e){e.stopPropagation(),Ae&&Ae(e)},style:e(e(e({},W),null==Me?void 0:Me.section),ze)},{children:[o("div",e({className:null==He?void 0:He.headerLeft,style:e(e({},E),null==Me?void 0:Me.headerLeft)},{children:[i("span",e({className:null==He?void 0:He.titleIcon,style:e(e({},j),null==Me?void 0:Me.titleIcon)},{children:null!=Pe?Pe:i(v,{})})),i("div",e({className:null==He?void 0:He.cognitiveTitle,style:e(e({},L),null==Me?void 0:Me.cognitiveTitle)},{children:_e}))]})),o("div",e({className:null==He?void 0:He.headerRight,style:e(e({},M),null==Me?void 0:Me.headerRight)},{children:[void 0!==(null==ne?void 0:ne.relevance_score)&&null!==(null==ne?void 0:ne.relevance_score)?o("span",e({className:null==He?void 0:He.scoreBadge,style:e(e(e({},F),null==Me?void 0:Me.scoreBadge),We)},{children:[i(u,{}),o("span",e({className:null==He?void 0:He.scoreText,style:e(e(e({},H),null==Me?void 0:Me.scoreText),je)},{children:[Math.round(Number(ne.relevance_score)),"%"]}))]})):null,Ge&&i("span",e({style:{display:"flex",alignItems:"center"}},{children:i(s,{size:16,color:"#64748B"})}))]}))]}))]}))}export{N as default};
1
+ import{__assign as e}from"tslib";import{jsx as i,jsxs as o,Fragment as n}from"react/jsx-runtime";import{PenLine as t,CheckCircle as l,XCircle as r,Info as d,ChevronDown as a,ChevronRight as s}from"lucide-react";import{useState as c}from"react";import{ToneToggle as v}from"./ToneToggle.js";import"../CognitiveComponents/CitationComponent.module.css.js";import{ReactComponent as p}from"../icons/cognitiveBrain.svg.js";import{ReactComponent as u}from"../icons/aiMagic.svg.js";import{Tooltip as m}from"@mui/material";var g=[{color:"#1D9E75",angle:-90,arcD:"M1 13 A10 10 0 0 1 1 13"},{color:"#BA7517",angle:0,arcD:"M1 13 A10 10 0 0 1 11 3"},{color:"#E24B4A",angle:90,arcD:"M1 13 A10 10 0 0 1 21 13"}],y=function(n){var t=n.toneIndex,l=n.configs,r=void 0===l?g:l,d=r[Math.min(t,r.length-1)]||r[1]||r[0],a=d.color,s=d.angle,c=d.arcD,v=(s-90)*Math.PI/180,p=11+9*Math.cos(v),u=13+9*Math.sin(v);return o("svg",e({width:"22",height:"14",viewBox:"0 0 22 14",fill:"none"},{children:[i("path",{d:"M1 13 A10 10 0 0 1 21 13",stroke:"#e5e5e5",strokeWidth:"2.5",strokeLinecap:"round"}),i("path",{d:c,stroke:a,strokeWidth:"2.5",strokeLinecap:"round"}),i("line",{x1:"11",y1:"13",x2:p,y2:u,stroke:a,strokeWidth:"2",strokeLinecap:"round"})]}))},f=function(o){var n=o.type,t=o.customStyles,l=void 0===t?{}:t,r=e(e({},{High:{padding:"3.5px 7px",borderRadius:"100px",border:"1px solid #FECACA",background:"#FEF2F2",color:"#B91C1C",fontSize:"11px",fontWeight:"500"},Medium:{padding:"3.5px 7px",borderRadius:"100px",border:"1px solid #F2E5A1",background:"#FFFBEB",color:"#B45309",fontSize:"11px",fontWeight:"500"},Low:{padding:"3.5px 7px",borderRadius:"100px",border:"1px solid #8098F9",background:"#DBEAFE",color:"#444CE7",fontSize:"11px",fontWeight:"500"}}),l),d=r[n]||r.Medium;return i("div",e({style:d},{children:n}))},h=["Lenient","Balanced","Aggressive"],x={Lenient:"#1D9E75",Balanced:"#BA7517",Aggressive:"#E24B4A"},S={width:"350px",background:"#fff",border:"1px solid #ddd",borderRadius:"8px",padding:"16px"},b={display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:12},C={fontSize:11,fontWeight:500,letterSpacing:"0.08em",color:"#E24B4A",textTransform:"uppercase"},B={fontSize:15,fontWeight:500,margin:"0 0 8px",color:"#111",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},I={fontSize:13,color:"#666",lineHeight:1.6,margin:"0 0 14px",maxHeight:"100px",overflow:"auto"},k={marginBottom:14,borderTop:"0.5px solid #eee",paddingTop:12},A={display:"flex",alignItems:"center",gap:6,background:"none",border:"none",cursor:"pointer",padding:0,width:"100%"},w={fontSize:11,fontWeight:500,textTransform:"uppercase",letterSpacing:"0.08em",color:"#E24B4A"},D={display:"flex",gap:8,marginBottom:18},T={flex:1,display:"flex",alignItems:"center",justifyContent:"center",gap:5,fontSize:12,fontWeight:500,padding:"7px 4px",borderRadius:8,border:"0.5px solid #ccc",background:"#fff",cursor:"pointer"},z={background:"none",border:"none",cursor:"pointer",fontSize:16,color:"#888",lineHeight:1,padding:0},R={borderTop:"0.5px solid #eee",padding:"14px 0px"},W={display:"flex",alignItems:"center",width:"100%",background:"none",border:"none",cursor:"pointer",padding:0,marginBottom:4},E={cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"space-between",paddingTop:"12px",borderTop:"1px solid #eee",borderBottom:"none",paddingLeft:"12px",paddingRight:"12px"},j={display:"flex",alignItems:"center",gap:"4px",minWidth:0,flex:"1 1 auto",overflow:"hidden"},L={width:"28px",height:"28px",display:"inline-flex",alignItems:"center",justifyContent:"center",flex:"0 0 28px"},M={fontSize:"13px",color:"#101828",minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},F={display:"flex",alignItems:"center",gap:"10px",flex:"0 0 auto",minWidth:0,flexWrap:"nowrap"},_={display:"flex",padding:"4px 8px",alignItems:"center",gap:"4px",borderRadius:"var(--chip-border-radius, 16px)",border:"1px solid var(--Primitive-Gray-300, #d0d5dd)",flex:"0 1 auto",minWidth:0},H={color:"var(--Primitive-Purple-600, #6938ef)",fontFamily:"Inter",fontSize:"12px",fontStyle:"normal",fontWeight:500,lineHeight:"150%"};function N(N){var P,O,G,q,J,K,Q,U,V,X,Y,Z,$,ee,ie,oe,ne,te=N.onClose,le=N.aiReason,re=N.onAccept,de=N.onReject,ae=N.onIterate,se=N.initialTone,ce=N.onRegenerate,ve=N.labels,pe=void 0===ve?{}:ve,ue=N.toneLevelsConfig,me=void 0===ue?h:ue,ge=N.toneColorsConfig,ye=void 0===ge?x:ge,fe=N.dialConfigs,he=void 0===fe?g:fe,xe=N.actions,Se=N.disableAllActions,be=void 0!==Se&&Se,Ce=N.customStyles,Be=void 0===Ce?{}:Ce,Ie=N.severityChipStyles,ke=void 0===Ie?{}:Ie,Ae=N.customIcons,we=void 0===Ae?{}:Ae,De=N.onOpenCognitive,Te=N.showTone,ze=void 0===Te||Te,Re=N.cognitiveSectionStyle,We=void 0===Re?{}:Re,Ee=N.cognitiveScoreBadgeStyle,je=void 0===Ee?{}:Ee,Le=N.cognitiveScoreTextStyle,Me=void 0===Le?{}:Le,Fe=N.cognitiveStyles,_e=void 0===Fe?{}:Fe,He=N.cognitiveClassNames,Ne=void 0===He?{}:He,Pe=N.cognitiveTitle,Oe=void 0===Pe?"Cognitive Integrity":Pe,Ge=N.cognitiveLeftIcon,qe=N.showCognitiveRightArrow,Je=void 0===qe||qe,Ke=N.isStreaming,Qe=me.findIndex(function(e){return e===se});-1===Qe&&(Qe=1);var Ue=c(!0),Ve=Ue[0],Xe=Ue[1],Ye=c(!1),Ze=Ye[0],$e=Ye[1],ei=c(Qe),ii=ei[0],oi=ei[1],ni=c(Qe)[0],ti=me[ii],li=ye[ti]||"#BA7517",ri=ii!==ni,di=[{id:"iterate",icon:we.iterateIcon||i(t,{size:16,color:"#64748B"}),label:pe.btnIterate||"Iterate",color:"#64748B",onClick:ae},{id:"accept",icon:we.acceptIcon||i(l,{size:16,color:"#10B981"}),label:pe.btnAccept||"Approve",color:"#10B981",onClick:re},{id:"reject",icon:we.rejectIcon||i(r,{size:16,color:"#DC2626"}),label:pe.btnReject||"Reject",color:"#DC2626",onClick:de}],ai=xe||di;return o("div",e({onClick:function(e){return e.stopPropagation()},style:e(e({},S),null===(P=null==Be?void 0:Be.DeviationSummaryStyles)||void 0===P?void 0:P.root)},{children:[o("div",e({style:e(e({},b),null===(O=null==Be?void 0:Be.DeviationSummaryStyles)||void 0===O?void 0:O.header)},{children:[o("div",e({style:{display:"flex",alignItems:"center",gap:6}},{children:[i("span",{children:we.summaryIcon||i(d,{size:16,color:"#E24B4A"})}),i("span",e({style:e(e({},C),null===(G=null==Be?void 0:Be.DeviationSummaryStyles)||void 0===G?void 0:G.title)},{children:pe.summaryHeader||"Summary"}))]})),i("button",e({onClick:te,style:e(e({},z),null===(q=null==Be?void 0:Be.DeviationSummaryStyles)||void 0===q?void 0:q.closeBtn)},{children:"✕"}))]})),i(m,e({title:null===(J=null==le?void 0:le.deviation_details)||void 0===J?void 0:J.deviation_title},{children:i("p",e({style:e(e({},B),null===(K=null==Be?void 0:Be.DeviationSummaryStyles)||void 0===K?void 0:K.bodyText)},{children:null===(Q=null==le?void 0:le.deviation_details)||void 0===Q?void 0:Q.deviation_title}))})),i("p",e({style:e(e({},I),null===(U=null==Be?void 0:Be.DeviationSummaryStyles)||void 0===U?void 0:U.summary)},{children:null===(V=null==le?void 0:le.deviation_details)||void 0===V?void 0:V.deviation_summary})),o("div",e({style:e(e({},k),null===(X=null==Be?void 0:Be.DeviationSummaryStyles)||void 0===X?void 0:X.impactContainer)},{children:[o("div",e({style:{display:"flex",justifyContent:"space-between",alignItems:"center"}},{children:[o("button",e({onClick:function(){return Xe(!Ve)},style:e(e({},A),null===(Y=null==Be?void 0:Be.DeviationSummaryStyles)||void 0===Y?void 0:Y.impactToggle)},{children:[i("span",e({style:e(e({},w),null===(Z=null==Be?void 0:Be.DeviationSummaryStyles)||void 0===Z?void 0:Z.impactToggleLabel)},{children:pe.impactHeader||"Impact"})),i("span",e({style:{fontSize:12,color:"#E24B4A",transition:"transform 0.2s",display:"flex",alignItems:"center",transform:Ve?"rotate(180deg)":"rotate(0deg)"}},{children:i(a,{size:16,color:"#E24B4A"})}))]})),i(f,{type:(null==le?void 0:le.severity)||"Medium",customStyles:ke})]})),Ve&&i("p",e({style:{fontSize:13,color:"#666",lineHeight:1.6,margin:"8px 0 0",maxHeight:"100px",overflow:"auto"}},{children:null!==(ee=null===($=null==le?void 0:le.deviation_details)||void 0===$?void 0:$.deviation_impact)&&void 0!==ee?ee:pe.fallbackImpact||"This change reduces compliance obligations and lowers contractual risk thresholds."}))]})),i("div",e({style:e(e({},D),null===(ie=null==Be?void 0:Be.DeviationSummaryStyles)||void 0===ie?void 0:ie.actionContainer)},{children:ai.map(function(i){var n,t,l=be||i.disabled,r=l?e(e({cursor:"not-allowed",opacity:.5},null===(n=null==Be?void 0:Be.DeviationSummaryStyles)||void 0===n?void 0:n.actionBtnDisabled),i.disabledStyle):{};return o("button",e({style:e(e(e(e(e({},T),null===(t=null==Be?void 0:Be.DeviationSummaryStyles)||void 0===t?void 0:t.actionBtn),{color:i.color}),i.style),r),onClick:l?void 0:i.onClick,disabled:l},{children:[i.icon,i.label]}),i.id)})})),ze&&o("div",e({style:e(e({},R),null===(oe=null==Be?void 0:Be.DeviationSummaryStyles)||void 0===oe?void 0:oe.toneContainer)},{children:[o("button",e({onClick:function(){return $e(!Ze)},style:e(e({},W),null===(ne=null==Be?void 0:Be.DeviationSummaryStyles)||void 0===ne?void 0:ne.toneToggleBtn)},{children:[o("div",e({style:{display:"flex",alignItems:"center",gap:8}},{children:[i(y,{toneIndex:ii,configs:he}),i("span",e({style:{fontSize:13,fontWeight:500,color:"#111"}},{children:pe.toneHeader||"Redline Tone"}))]})),i("span",e({style:{transition:"transform 0.2s",display:"flex",alignItems:"center",transform:Ze?"rotate(180deg)":"rotate(0deg)"}},{children:i(a,{size:16,color:"#111"})}))]})),Ze&&o(n,{children:[i("p",e({style:{fontSize:12,color:"#888",margin:"0 0 12px"}},{children:pe.toneDescription||"Controls how assertively AI is redlining"})),i(v,{isDirty:ri,onToneChange:function(e){oi(e)},toneColor:li,toneIndex:ii,onClickRegenerate:function(){return null==ce?void 0:ce(ti)},toneLabels:me,isStreaming:Ke,aiReason:le})]})]})),De&&o("div",e({className:null==Ne?void 0:Ne.section,onClick:function(e){e.stopPropagation(),De&&De(e)},style:e(e(e({},E),null==_e?void 0:_e.section),We)},{children:[o("div",e({className:null==Ne?void 0:Ne.headerLeft,style:e(e({},j),null==_e?void 0:_e.headerLeft)},{children:[i("span",e({className:null==Ne?void 0:Ne.titleIcon,style:e(e({},L),null==_e?void 0:_e.titleIcon)},{children:null!=Ge?Ge:i(p,{})})),i("div",e({className:null==Ne?void 0:Ne.cognitiveTitle,style:e(e({},M),null==_e?void 0:_e.cognitiveTitle)},{children:Oe}))]})),o("div",e({className:null==Ne?void 0:Ne.headerRight,style:e(e({},F),null==_e?void 0:_e.headerRight)},{children:[void 0!==(null==le?void 0:le.relevance_score)&&null!==(null==le?void 0:le.relevance_score)?o("span",e({className:null==Ne?void 0:Ne.scoreBadge,style:e(e(e({},_),null==_e?void 0:_e.scoreBadge),je)},{children:[i(u,{}),o("span",e({className:null==Ne?void 0:Ne.scoreText,style:e(e(e({},H),null==_e?void 0:_e.scoreText),Me)},{children:[Math.round(Number(le.relevance_score)),"%"]}))]})):null,Je&&i("span",e({style:{display:"flex",alignItems:"center"}},{children:i(s,{size:16,color:"#64748B"})}))]}))]}))]}))}export{N as default};
2
2
  //# sourceMappingURL=DeviationSummary.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsx as n,jsxs as t}from"react/jsx-runtime";import{useState as i}from"react";import o from"./PopupDefaults.js";import{ReactComponent as r}from"../icons/History.svg.js";import{ReactComponent as a}from"../icons/message-chat-square.svg.js";import{ToneToggle as l}from"./ToneToggle.js";var s=[{id:"chat",icon:n(a,{}),label:"Chat",description:"Type on what basis you want to iterate"},{id:"risk",icon:n(a,{}),label:"Shift the risk",description:"Adjust how aggressive or lenient the language is"},{id:"history",icon:n(r,{}),label:"Historical Recommendations",description:"Pull from past recommended clauses"}],d=[{id:"1",filename:"Mutual_DA2.pdf",excerpt:'"...shall protect Confidential Information using at least the same degree of care as it uses to protect its own confidential information, but no less than reasonable c..."',tab:"Balanced"},{id:"2",filename:"Tech NDA.pdf",excerpt:'"...protect confidential information using reasonable care and appropriate safeguards..."',tab:"Balanced"},{id:"3",filename:"Corp NDA.pdf",excerpt:'"...shall use best efforts to protect any disclosed confidential materials from unauthorised access or disclosure..."',tab:"Aggressive"},{id:"4",filename:"Vendor Agreement.pdf",excerpt:'"...may use disclosed information solely for the stated purpose with no special handling required..."',tab:"Lenient"}],c=["Lenient","Balanced","Aggressive"],f={Lenient:"#1D9E75",Balanced:"#BA7517",Aggressive:"#E24B4A"},p=["Grounded","Innovative"];function g(i){var o=i.chatTitle,r=i.chatBody,a=i.mergedStyles,l=void 0===a?b:a;return n("div",e({style:l.body},{children:t("div",e({style:l.chatBanner},{children:[n("p",e({style:l.chatBannerTitle},{children:o})),n("p",e({style:l.chatBannerBody},{children:r}))]}))}))}function u(o){var r=o.initialTone,a=o.onRiskRegenerate,s=o.riskMode,d=o.toneLevelsConfig,g=void 0===d?c:d,u=o.toneColorsConfig,h=void 0===u?f:u,m=o.riskModesConfig,y=void 0===m?p:m,x=o.mergedStyles,v=void 0===x?b:x,C=o.isStreaming,k=o.aiReason,B=g.findIndex(function(e){return e===r});-1===B&&(B=1);var S=i(s||y[0]||"Grounded"),R=S[0],T=S[1],A=i(B),w=A[0],z=A[1],L=i(B)[0],D=g[w],I=h[D]||"#BA7517",M=w!==L||s!==R;return t("div",e({style:v.body},{children:[n("div",e({style:{display:"flex",gap:8,marginBottom:16}},{children:y.map(function(i){return t("button",e({onClick:function(){return T(i)},style:{flex:1,display:"flex",alignItems:"center",gap:8,padding:"10px 12px",borderRadius:10,border:"1px solid ".concat(R===i?"#7c5cbf":"#e0ddd8"),background:"#fff",cursor:"pointer",fontSize:13,fontWeight:500,color:"#1a1a1a"}},{children:[n("span",e({style:{width:16,height:16,borderRadius:"50%",border:"2px solid ".concat(R===i?"#7c5cbf":"#ccc"),display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}},{children:R===i&&n("span",{style:{width:8,height:8,borderRadius:"50%",background:"#7c5cbf"}})})),i.charAt(0).toUpperCase()+i.slice(1)]}),i)})})),n(l,{onToneChange:function(e){return z(e)},toneColor:I,isDirty:M,toneIndex:w,onClickRegenerate:function(){return null==a?void 0:a({tone:D,mode:R})},isStreaming:C,aiReason:k})]}))}function h(o){var r=o.onApply,a=o.historicalClausesData,l=void 0===a?d:a,s=o.toneLevelsConfig,f=void 0===s?c:s,p=o.mergedStyles,g=void 0===p?b:p,u=f.length>1?f[1]:f[0]||"Balanced",h=i(u),m=h[0],y=h[1],x=l.filter(function(e){return e.tab===m});return t("div",e({style:g.body},{children:[n("div",e({style:g.segmentedControl},{children:f.map(function(t){return n("button",e({onClick:function(){return y(t)},style:e(e({},g.segmentedBtn),m===t?g.segmentedBtnActive:{})},{children:t.charAt(0).toUpperCase()+t.slice(1)}),t)})})),t("div",e({style:{display:"flex",flexDirection:"column",gap:10,marginTop:12}},{children:[x.map(function(i){return t("button",e({onClick:function(){return null==r?void 0:r({type:"history",value:i.excerpt})},style:g.clauseCard},{children:[n("p",e({style:g.clauseFilename},{children:i.filename})),n("p",e({style:g.clauseExcerpt},{children:i.excerpt}))]}),i.id)}),0===x.length&&n("p",e({style:{fontSize:12,color:"#aaa",textAlign:"center",padding:"12px 0"}},{children:"No clauses for this tone"}))]}))]}))}function m(e){var t=e.type,i=e.onRiskRegenerate,o=e.initialTone,r=e.riskMode,a=e.onApply,l=e.chatTitle,s=e.chatBody,d=e.historicalClausesData,c=e.toneLevelsConfig,f=e.toneColorsConfig,p=e.riskModesConfig,m=e.mergedStyles,y=void 0===m?b:m,x=e.isStreaming,v=e.aiReason;return"chat"===t?n(g,{chatTitle:l,chatBody:s,mergedStyles:y}):"risk"===t?n(u,{onRiskRegenerate:i,initialTone:o,riskMode:r,toneLevelsConfig:c,toneColorsConfig:f,riskModesConfig:p,mergedStyles:y,isStreaming:x,aiReason:v}):"history"===t?n(h,{onApply:a,historicalClausesData:d,toneLevelsConfig:c,mergedStyles:y}):null}function y(r){var a=r.onBack,l=r.onChatClick,g=r.onRiskRegenerate,u=r.initialTone,h=r.riskMode,y=r.onApply,x=r.onTabToggle,v=r.menuItemsConfig,C=void 0===v?s:v,k=r.historicalClausesConfig,B=void 0===k?d:k,S=r.chatTitle,R=void 0===S?"Chat mode active":S,T=r.chatBody,A=void 0===T?"You are now chatting about this redline, continue the conversation in the left panel to refine or update it":T,w=r.headerTitle,z=void 0===w?"How would you like to iterate?":w,L=r.customStyles,D=void 0===L?{}:L,I=r.toneLevelsConfig,M=void 0===I?c:I,j=r.toneColorsConfig,F=void 0===j?f:j,H=r.riskModesConfig,W=void 0===H?p:H,E=r.isStreaming,G=r.aiReason,N=i(null),q=N[0],P=N[1],U=e(e(e({},o.IterateMenuDefaults.styles),b),D);return t("div",e({style:U.card},{children:[t("div",e({style:U.header},{children:[n("button",e({onClick:a,style:U.backBtn,"aria-label":"Go back"},{children:"‹"})),n("span",e({style:U.headerTitle},{children:z}))]})),C.map(function(i,o){var r=q===i.id;return t("div",e({style:{borderBottom:o<C.length-1?"0.5px solid #e8e7e3":"none"}},{children:[t("button",e({onClick:function(){return e=i.id,P(function(n){return n===e?null:("chat"===e&&(null==l||l()),x&&x(e),e)});var e},style:U.row},{children:[n("div",e({style:U.rowLeft},{children:t("div",{children:[n("p",e({style:U.label},{children:i.label})),n("p",e({style:U.desc},{children:i.description}))]})})),n("span",e({style:e(e({},U.chevron),{transform:r?"rotate(90deg)":"rotate(0deg)"})},{children:"›"}))]})),n("div",e({style:{maxHeight:r?400:0,overflow:"hidden",transition:"max-height 0.25s ease"}},{children:n(m,{type:i.id,onRiskRegenerate:g,initialTone:u,riskMode:h,onApply:y,chatTitle:R,chatBody:A,historicalClausesData:B,toneLevelsConfig:M,toneColorsConfig:F,riskModesConfig:W,mergedStyles:U,aiReason:G,isStreaming:E})}))]}),i.id)})]}))}var b={card:{background:"#fff",border:"0.5px solid #e8e7e3",borderRadius:14,width:300,maxHeight:"350px",overflow:"auto",fontFamily:"system-ui, sans-serif"},header:{display:"flex",alignItems:"center",gap:8,padding:"14px 16px",borderBottom:"0.5px solid #e8e7e3"},backBtn:{background:"none",border:"none",cursor:"pointer",fontSize:20,color:"#888",padding:0,lineHeight:1},headerTitle:{fontSize:14,fontWeight:500,color:"#1a1a1a"},row:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",padding:"14px 16px",cursor:"pointer",border:"none",textAlign:"left",gap:10,boxSizing:"border-box",backgroundColor:"transparent"},rowLeft:{display:"flex",alignItems:"flex-start",gap:10,flex:1},icon:{fontSize:16,color:"#666",marginTop:1,flexShrink:0},label:{margin:0,fontSize:14,fontWeight:500,color:"#1a1a1a"},desc:{margin:"2px 0 0",fontSize:12,color:"#888",lineHeight:1.4},chevron:{fontSize:18,color:"#aaa",flexShrink:0,display:"inline-block",transition:"transform 0.2s"},body:{padding:"0 16px 14px 16px"},chatBanner:{background:"#eef4fd",border:"1px solid #c5d8f7",borderRadius:10,padding:"12px 14px",marginBottom:10},chatBannerTitle:{margin:"0 0 6px",fontSize:14,fontWeight:600,color:"#3a5a8a"},chatBannerBody:{margin:0,fontSize:13,color:"#4a6080",lineHeight:1.5},applyBtn:{display:"flex",padding:"7px 10.5px",justifyContent:"center",alignItems:"center",gap:"7px",marginTop:8,fontSize:13,borderRadius:6,border:"1px solid #2563EB",background:"#2563EB",color:"#fff"},rangeLabel:{fontSize:12,color:"#888"},segmentedControl:{border:"1px solid #F2F4F7",display:"flex",background:"#F9FAFB",borderRadius:4,padding:6,gap:8},segmentedBtn:{flex:1,padding:"7px 0",fontSize:13,fontWeight:500,color:"#888",background:"transparent",border:"none",borderRadius:8,cursor:"pointer",transition:"background 0.15s, color 0.15s"},segmentedBtnActive:{background:"#dce8fa",color:"#2a4a7a",fontWeight:700},clauseCard:{background:"#fff",border:"1px solid #dde5f0",borderRadius:12,padding:"12px 14px",textAlign:"left",cursor:"pointer",width:"100%"},clauseFilename:{margin:"0 0 6px",fontSize:13,fontWeight:600,color:"#2a4a7a"},clauseExcerpt:{margin:0,fontSize:13,color:"#4a5a70",fontStyle:"italic",lineHeight:1.5}};export{y as default};
1
+ import{__assign as e}from"tslib";import{jsx as n,jsxs as t}from"react/jsx-runtime";import{useState as i}from"react";import o from"./PopupDefaults.js";import{ReactComponent as r}from"../icons/History.svg.js";import{ReactComponent as a}from"../icons/message-chat-square.svg.js";import{ToneToggle as l}from"./ToneToggle.js";var d=[{id:"chat",icon:n(a,{}),label:"Chat",description:"Type on what basis you want to iterate"},{id:"risk",icon:n(a,{}),label:"Shift the risk",description:"Adjust how aggressive or lenient the language is"},{id:"history",icon:n(r,{}),label:"Historical Recommendations",description:"Pull from past recommended clauses"}],s=[{id:"1",filename:"Mutual_DA2.pdf",excerpt:'"...shall protect Confidential Information using at least the same degree of care as it uses to protect its own confidential information, but no less than reasonable c..."',tab:"Balanced"},{id:"2",filename:"Tech NDA.pdf",excerpt:'"...protect confidential information using reasonable care and appropriate safeguards..."',tab:"Balanced"},{id:"3",filename:"Corp NDA.pdf",excerpt:'"...shall use best efforts to protect any disclosed confidential materials from unauthorised access or disclosure..."',tab:"Aggressive"},{id:"4",filename:"Vendor Agreement.pdf",excerpt:'"...may use disclosed information solely for the stated purpose with no special handling required..."',tab:"Lenient"}],c=["Lenient","Balanced","Aggressive"],f={Lenient:"#1D9E75",Balanced:"#BA7517",Aggressive:"#E24B4A"},p=["Grounded","Innovative"];function g(i){var o=i.chatTitle,r=i.chatBody,a=i.mergedStyles,l=void 0===a?b:a;return n("div",e({style:l.body},{children:t("div",e({style:l.chatBanner},{children:[n("p",e({style:l.chatBannerTitle},{children:o})),n("p",e({style:l.chatBannerBody},{children:r}))]}))}))}function u(o){var r=o.initialTone,a=o.onRiskRegenerate,d=o.riskMode,s=o.toneLevelsConfig,g=void 0===s?c:s,u=o.toneColorsConfig,h=void 0===u?f:u,m=o.riskModesConfig,y=void 0===m?p:m,v=o.mergedStyles,x=void 0===v?b:v,C=o.isStreaming,k=o.aiReason,B=g.findIndex(function(e){return e===r});-1===B&&(B=1);var S=i(d||y[0]||"Grounded"),R=S[0],T=S[1],A=i(B),w=A[0],z=A[1],L=i(B)[0],D=g[w],I=h[D]||"#BA7517",M=w!==L||d!==R;return t("div",e({style:x.body},{children:[n("div",e({style:{display:"flex",gap:8,marginBottom:16}},{children:y.map(function(i){return t("button",e({onClick:function(){return T(i)},style:{flex:1,display:"flex",alignItems:"center",gap:8,padding:"10px 12px",borderRadius:10,border:"1px solid ".concat(R===i?"#7c5cbf":"#e0ddd8"),background:"#fff",cursor:"pointer",fontSize:13,fontWeight:500,color:"#1a1a1a"}},{children:[n("span",e({style:{width:16,height:16,borderRadius:"50%",border:"2px solid ".concat(R===i?"#7c5cbf":"#ccc"),display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}},{children:R===i&&n("span",{style:{width:8,height:8,borderRadius:"50%",background:"#7c5cbf"}})})),i.charAt(0).toUpperCase()+i.slice(1)]}),i)})})),n(l,{onToneChange:function(e){return z(e)},toneColor:I,isDirty:M,toneIndex:w,onClickRegenerate:function(){return null==a?void 0:a({tone:D,mode:R})},isStreaming:C,aiReason:k})]}))}function h(o){var r=o.onApply,a=o.historicalClausesData,l=void 0===a?s:a,d=o.toneLevelsConfig,f=void 0===d?c:d,p=o.mergedStyles,g=void 0===p?b:p,u=f.length>1?f[1]:f[0]||"Balanced",h=i(u),m=h[0],y=h[1],v=l.filter(function(e){return e.tab===m});return t("div",e({style:g.body},{children:[n("div",e({style:g.segmentedControl},{children:f.map(function(t){return n("button",e({onClick:function(){return y(t)},style:e(e({},g.segmentedBtn),m===t?g.segmentedBtnActive:{})},{children:t.charAt(0).toUpperCase()+t.slice(1)}),t)})})),t("div",e({style:{display:"flex",flexDirection:"column",gap:10,marginTop:12}},{children:[v.map(function(i){return t("button",e({onClick:function(){return null==r?void 0:r({type:"history",value:i.excerpt})},style:g.clauseCard},{children:[n("p",e({style:g.clauseFilename},{children:i.filename})),n("p",e({style:g.clauseExcerpt},{children:i.excerpt}))]}),i.id)}),0===v.length&&n("p",e({style:{fontSize:12,color:"#aaa",textAlign:"center",padding:"12px 0"}},{children:"No clauses for this tone"}))]}))]}))}function m(e){var t=e.type,i=e.onRiskRegenerate,o=e.initialTone,r=e.riskMode,a=e.onApply,l=e.chatTitle,d=e.chatBody,s=e.historicalClausesData,c=e.toneLevelsConfig,f=e.toneColorsConfig,p=e.riskModesConfig,m=e.mergedStyles,y=void 0===m?b:m,v=e.isStreaming,x=e.aiReason;return"chat"===t?n(g,{chatTitle:l,chatBody:d,mergedStyles:y}):"risk"===t?n(u,{onRiskRegenerate:i,initialTone:o,riskMode:r,toneLevelsConfig:c,toneColorsConfig:f,riskModesConfig:p,mergedStyles:y,isStreaming:v,aiReason:x}):"history"===t?n(h,{onApply:a,historicalClausesData:s,toneLevelsConfig:c,mergedStyles:y}):null}function y(r){var a=r.onBack,l=r.onChatClick,g=r.onRiskRegenerate,u=r.initialTone,h=r.riskMode,y=r.onApply,v=r.onTabToggle,x=r.menuItemsConfig,C=void 0===x?d:x,k=r.historicalClausesConfig,B=void 0===k?s:k,S=r.chatTitle,R=void 0===S?"Chat mode active":S,T=r.chatBody,A=void 0===T?"You are now chatting about this redline, continue the conversation in the left panel to refine or update it":T,w=r.headerTitle,z=void 0===w?"How would you like to iterate?":w,L=r.customStyles,D=void 0===L?{}:L,I=r.toneLevelsConfig,M=void 0===I?c:I,j=r.toneColorsConfig,F=void 0===j?f:j,H=r.riskModesConfig,W=void 0===H?p:H,E=r.isStreaming,G=r.aiReason,N=i(null),q=N[0],P=N[1],U=e(e(e({},o.IterateMenuDefaults.styles),b),D);return t("div",e({style:U.card},{children:[t("div",e({style:U.header},{children:[n("button",e({onClick:a,style:U.backBtn,"aria-label":"Go back"},{children:"‹"})),n("span",e({style:U.headerTitle},{children:z}))]})),n("div",e({style:{width:"100%",maxHeight:"300px",overflow:"auto"}},{children:C.map(function(i,o){var r=q===i.id;return t("div",e({style:{borderBottom:o<C.length-1?"0.5px solid #e8e7e3":"none"}},{children:[t("button",e({onClick:function(){return e=i.id,P(function(n){return n===e?null:("chat"===e&&(null==l||l()),v&&v(e),e)});var e},style:U.row},{children:[n("div",e({style:U.rowLeft},{children:t("div",{children:[n("p",e({style:U.label},{children:i.label})),n("p",e({style:U.desc},{children:i.description}))]})})),n("span",e({style:e(e({},U.chevron),{transform:r?"rotate(90deg)":"rotate(0deg)"})},{children:"›"}))]})),n("div",e({style:{maxHeight:r?400:0,overflow:"hidden",transition:"max-height 0.25s ease"}},{children:n(m,{type:i.id,onRiskRegenerate:g,initialTone:u,riskMode:h,onApply:y,chatTitle:R,chatBody:A,historicalClausesData:B,toneLevelsConfig:M,toneColorsConfig:F,riskModesConfig:W,mergedStyles:U,aiReason:G,isStreaming:E})}))]}),i.id)})}))]}))}var b={card:{background:"#fff",border:"0.5px solid #e8e7e3",borderRadius:14,width:300,fontFamily:"system-ui, sans-serif"},header:{display:"flex",alignItems:"center",gap:8,padding:"14px 16px",borderBottom:"0.5px solid #e8e7e3"},backBtn:{background:"none",border:"none",cursor:"pointer",fontSize:20,color:"#888",padding:0,lineHeight:1},headerTitle:{fontSize:14,fontWeight:500,color:"#1a1a1a"},row:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",padding:"14px 16px",cursor:"pointer",border:"none",textAlign:"left",gap:10,boxSizing:"border-box",backgroundColor:"transparent"},rowLeft:{display:"flex",alignItems:"flex-start",gap:10,flex:1},icon:{fontSize:16,color:"#666",marginTop:1,flexShrink:0},label:{margin:0,fontSize:14,fontWeight:500,color:"#1a1a1a"},desc:{margin:"2px 0 0",fontSize:12,color:"#888",lineHeight:1.4},chevron:{fontSize:18,color:"#aaa",flexShrink:0,display:"inline-block",transition:"transform 0.2s"},body:{padding:"0 16px 14px 16px"},chatBanner:{background:"#eef4fd",border:"1px solid #c5d8f7",borderRadius:10,padding:"12px 14px",marginBottom:10},chatBannerTitle:{margin:"0 0 6px",fontSize:14,fontWeight:600,color:"#3a5a8a"},chatBannerBody:{margin:0,fontSize:13,color:"#4a6080",lineHeight:1.5},applyBtn:{display:"flex",padding:"7px 10.5px",justifyContent:"center",alignItems:"center",gap:"7px",marginTop:8,fontSize:13,borderRadius:6,border:"1px solid #2563EB",background:"#2563EB",color:"#fff"},rangeLabel:{fontSize:12,color:"#888"},segmentedControl:{border:"1px solid #F2F4F7",display:"flex",background:"#F9FAFB",borderRadius:4,padding:6,gap:8},segmentedBtn:{flex:1,padding:"7px 0",fontSize:13,fontWeight:500,color:"#888",background:"transparent",border:"none",borderRadius:8,cursor:"pointer",transition:"background 0.15s, color 0.15s"},segmentedBtnActive:{background:"#dce8fa",color:"#2a4a7a",fontWeight:700},clauseCard:{background:"#fff",border:"1px solid #dde5f0",borderRadius:12,padding:"12px 14px",textAlign:"left",cursor:"pointer",width:"100%"},clauseFilename:{margin:"0 0 6px",fontSize:13,fontWeight:600,color:"#2a4a7a"},clauseExcerpt:{margin:0,fontSize:13,color:"#4a5a70",fontStyle:"italic",lineHeight:1.5}};export{y as default};
2
2
  //# sourceMappingURL=IterateComponent.js.map
@@ -1,2 +1,2 @@
1
- var e={root:{width:"350px",background:"#fff",border:"1px solid #ddd",borderRadius:"8px",padding:"16px",maxHeight:"400px",overflow:"auto"},header:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:12},title:{fontSize:11,fontWeight:500,letterSpacing:"0.08em",color:"#E24B4A",textTransform:"uppercase"},bodyText:{fontSize:15,fontWeight:500,margin:"0 0 8px",color:"#111"},summary:{fontSize:13,color:"#666",lineHeight:1.6,margin:"0 0 14px"},impactContainer:{marginBottom:14,borderTop:"0.5px solid #eee",paddingTop:12},actionContainer:{display:"flex",gap:8,marginBottom:18},toneContainer:{borderTop:"0.5px solid #eee",paddingTop:14}},o={styles:{card:{background:"#fff",border:"0.5px solid #e8e7e3",borderRadius:14,width:300,maxHeight:"350px",overflow:"auto",fontFamily:"system-ui, sans-serif"},header:{display:"flex",alignItems:"center",gap:8,padding:"14px 16px",borderBottom:"0.5px solid #e8e7e3"},backBtn:{background:"none",border:"none",cursor:"pointer",fontSize:20,color:"#888",padding:0,lineHeight:1},headerTitle:{fontSize:14,fontWeight:500,color:"#1a1a1a"},row:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",padding:"14px 16px",cursor:"pointer",border:"none",textAlign:"left",gap:10,boxSizing:"border-box",backgroundColor:"transparent"},rowLeft:{display:"flex",alignItems:"flex-start",gap:10,flex:1},label:{margin:0,fontSize:14,fontWeight:500,color:"#1a1a1a"},desc:{margin:"2px 0 0",fontSize:12,color:"#888",lineHeight:1.4},chevron:{fontSize:18,color:"#aaa",flexShrink:0,display:"inline-block",transition:"transform 0.2s"},body:{padding:"0 16px 14px 16px"},chatBanner:{background:"#eef4fd",border:"1px solid #c5d8f7",borderRadius:10,padding:"12px 14px",marginBottom:10},chatBannerTitle:{margin:"0 0 6px",fontSize:14,fontWeight:600,color:"#3a5a8a"},chatBannerBody:{margin:0,fontSize:13,color:"#4a6080",lineHeight:1.5},segmentedControl:{border:"1px solid #F2F4F7",display:"flex",background:"#F9FAFB",borderRadius:4,padding:6,gap:8},segmentedBtn:{flex:1,padding:"7px 0",fontSize:13,fontWeight:500,color:"#888",background:"transparent",border:"none",borderRadius:8,cursor:"pointer",transition:"background 0.15s, color 0.15s"},segmentedBtnActive:{background:"#dce8fa",color:"#2a4a7a",fontWeight:700},clauseCard:{background:"#fff",border:"1px solid #dde5f0",borderRadius:12,padding:"12px 14px",textAlign:"left",cursor:"pointer",width:"100%"},clauseFilename:{margin:"0 0 6px",fontSize:13,fontWeight:600,color:"#2a4a7a"},clauseExcerpt:{margin:0,fontSize:13,color:"#4a5a70",fontStyle:"italic",lineHeight:1.5}}},n={root:{animation:"slideIn 0.32s cubic-bezier(0.22,1,0.36,1) both",width:350,background:"#fff",borderRadius:18,boxShadow:"0 8px 48px rgba(0,0,0,0.18), 0 1.5px 6px rgba(0,0,0,0.07)",overflow:"hidden",fontFamily:"'DM Sans', 'Segoe UI', sans-serif"},header:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"14px 16px",borderBottom:"1.5px solid #e2e8f0"},closeBtn:{background:"none",border:"none",cursor:"pointer",padding:4,borderRadius:6,display:"flex",alignItems:"center"},body:{padding:"14px 16px",display:"flex",flexDirection:"column",gap:13,overflow:"auto"},meta:{},divider:{height:1,background:"#f1f5f9"},impactText:{margin:"10px 0 0",fontSize:13,lineHeight:1.65,color:"#334155"},secondSection:{marginTop:12,background:"#f8fafc",border:"1.5px solid #e2e8f0",borderRadius:12,padding:"14px 16px",fontSize:13,lineHeight:1.7,color:"#64748b",fontStyle:"italic"},actionsContainer:{display:"flex",justifyContent:"space-between",alignItems:"center",paddingTop:2}},a={container:{background:"#fff"},header:{display:"flex",alignItems:"center",justifyContent:"space-between"},innerHeader:{padding:"8px 12px"},innerBody:{padding:"8px 12px",color:"#4b5563"}},i={DeviationSummaryDefaults:e,IterateMenuDefaults:o,RedlineCardDefaults:n,CitationAccordionDefaults:a};export{a as CitationAccordionDefaults,e as DeviationSummaryDefaults,o as IterateMenuDefaults,n as RedlineCardDefaults,i as default};
1
+ var e={root:{width:"350px",background:"#fff",border:"1px solid #ddd",borderRadius:"8px",padding:"16px",maxHeight:"400px",overflow:"auto"},header:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:12},title:{fontSize:11,fontWeight:500,letterSpacing:"0.08em",color:"#E24B4A",textTransform:"uppercase"},bodyText:{fontSize:15,fontWeight:500,margin:"0 0 8px",color:"#111"},summary:{fontSize:13,color:"#666",lineHeight:1.6,margin:"0 0 14px"},impactContainer:{marginBottom:14,borderTop:"0.5px solid #eee",paddingTop:12},actionContainer:{display:"flex",gap:8,marginBottom:18},toneContainer:{borderTop:"0.5px solid #eee",paddingTop:14}},o={styles:{card:{background:"#fff",border:"0.5px solid #e8e7e3",borderRadius:14,width:300,maxHeight:"350px",overflow:"auto",fontFamily:"system-ui, sans-serif"},header:{display:"flex",alignItems:"center",gap:8,padding:"14px 16px",borderBottom:"0.5px solid #e8e7e3"},backBtn:{background:"none",border:"none",cursor:"pointer",fontSize:20,color:"#888",padding:0,lineHeight:1},headerTitle:{fontSize:14,fontWeight:500,color:"#1a1a1a"},row:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",padding:"14px 16px",cursor:"pointer",border:"none",textAlign:"left",gap:10,boxSizing:"border-box",backgroundColor:"transparent"},rowLeft:{display:"flex",alignItems:"flex-start",gap:10,flex:1},label:{margin:0,fontSize:14,fontWeight:500,color:"#1a1a1a"},desc:{margin:"2px 0 0",fontSize:12,color:"#888",lineHeight:1.4},chevron:{fontSize:18,color:"#aaa",flexShrink:0,display:"inline-block",transition:"transform 0.2s"},body:{padding:"0 16px 14px 16px"},chatBanner:{background:"#eef4fd",border:"1px solid #c5d8f7",borderRadius:10,padding:"12px 14px",marginBottom:10},chatBannerTitle:{margin:"0 0 6px",fontSize:14,fontWeight:600,color:"#3a5a8a"},chatBannerBody:{margin:0,fontSize:13,color:"#4a6080",lineHeight:1.5},segmentedControl:{border:"1px solid #F2F4F7",display:"flex",background:"#F9FAFB",borderRadius:4,padding:6,gap:8},segmentedBtn:{flex:1,padding:"7px 0",fontSize:13,fontWeight:500,color:"#888",background:"transparent",border:"none",borderRadius:8,cursor:"pointer",transition:"background 0.15s, color 0.15s"},segmentedBtnActive:{background:"#dce8fa",color:"#2a4a7a",fontWeight:700},clauseCard:{background:"#fff",border:"1px solid #dde5f0",borderRadius:12,padding:"12px 14px",textAlign:"left",cursor:"pointer",width:"100%"},clauseFilename:{margin:"0 0 6px",fontSize:13,fontWeight:600,color:"#2a4a7a"},clauseExcerpt:{margin:0,fontSize:13,color:"#4a5a70",fontStyle:"italic",lineHeight:1.5}}},n={root:{animation:"slideIn 0.32s cubic-bezier(0.22,1,0.36,1) both",width:350,background:"#fff",borderRadius:18,boxShadow:"0 8px 48px rgba(0,0,0,0.18), 0 1.5px 6px rgba(0,0,0,0.07)",fontFamily:"'DM Sans', 'Segoe UI', sans-serif"},header:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"14px 16px",borderBottom:"1.5px solid #e2e8f0",borderRadius:"18px 18px 0px 0px"},closeBtn:{background:"none",border:"none",cursor:"pointer",padding:4,borderRadius:6,display:"flex",alignItems:"center"},body:{padding:"14px 16px",display:"flex",flexDirection:"column",gap:13},meta:{},divider:{height:1,background:"#f1f5f9"},impactText:{margin:"10px 0 0",fontSize:13,lineHeight:1.65,color:"#334155",overflow:"auto",maxHeight:"100px"},secondSection:{marginTop:12,background:"#f8fafc",border:"1.5px solid #e2e8f0",borderRadius:12,padding:"14px 16px",fontSize:13,lineHeight:1.7,color:"#64748b",fontStyle:"italic",overflow:"auto",maxHeight:"100px"},actionsContainer:{display:"flex",justifyContent:"space-between",alignItems:"center",paddingTop:2},fallbackSectionStyle:{marginTop:12,padding:"16px",fontSize:13,color:"#94a3b8",textAlign:"center",fontStyle:"italic",background:"#f8fafc",borderRadius:12,border:"1.5px dashed #cbd5e1"}},a={container:{background:"#fff"},header:{display:"flex",alignItems:"center",justifyContent:"space-between"},innerHeader:{padding:"8px 12px"},innerBody:{padding:"8px 12px",color:"#4b5563"}},t={DeviationSummaryDefaults:e,IterateMenuDefaults:o,RedlineCardDefaults:n,CitationAccordionDefaults:a};export{a as CitationAccordionDefaults,e as DeviationSummaryDefaults,o as IterateMenuDefaults,n as RedlineCardDefaults,t as default};
2
2
  //# sourceMappingURL=PopupDefaults.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsx as t,jsxs as o}from"react/jsx-runtime";import{Undo2 as n}from"lucide-react";import{useState as i}from"react";import r from"./PopupDefaults.js";function d(e){var t=new Date(e);return isNaN(t.getTime())?e:new Date(e).toLocaleString("en-US",{month:"2-digit",day:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!0}).replace(" AM","AM").replace(" PM","PM")}var l=function(){return o("svg",e({width:"22",height:"22",viewBox:"0 0 22 22",fill:"none"},{children:[t("circle",{cx:"11",cy:"11",r:"10",stroke:"#22c55e",strokeWidth:"2",fill:"#f0fdf4"}),t("path",{d:"M6.5 11.5l3 3 6-6",stroke:"#22c55e",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}))},a=function(){return o("svg",e({width:"22",height:"22",viewBox:"0 0 22 22",fill:"none"},{children:[t("circle",{cx:"11",cy:"11",r:"10",stroke:"#ef4444",strokeWidth:"2",fill:"#fff1f2"}),t("path",{d:"M7.5 7.5l7 7M14.5 7.5l-7 7",stroke:"#ef4444",strokeWidth:"2",strokeLinecap:"round"})]}))},c=function(){return t("svg",e({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none"},{children:t("path",{d:"M4 4l10 10M14 4L4 14",stroke:"#94a3b8",strokeWidth:"1.8",strokeLinecap:"round"})}))},s=function(){return o("svg",e({width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},{children:[t("circle",{cx:"6.5",cy:"5.5",r:"2.5",stroke:"#94a3b8",strokeWidth:"1.4"}),t("path",{d:"M1.5 13.5c0-3.038 2.462-5.5 5-5.5s5 2.462 5 5.5",stroke:"#94a3b8",strokeWidth:"1.4",strokeLinecap:"round"}),t("path",{d:"M11 8.5l1.5 1.5 2.5-2.5",stroke:"#22c55e",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})]}))},h=function(){return o("svg",e({width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},{children:[t("circle",{cx:"6.5",cy:"5.5",r:"2.5",stroke:"#94a3b8",strokeWidth:"1.4"}),t("path",{d:"M1.5 13.5c0-3.038 2.462-5.5 5-5.5s5 2.462 5 5.5",stroke:"#94a3b8",strokeWidth:"1.4",strokeLinecap:"round"}),t("path",{d:"M11.5 8l3 3m0-3l-3 3",stroke:"#ef4444",strokeWidth:"1.4",strokeLinecap:"round"})]}))},u=function(o){var n=o.open;return t("svg",e({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",style:{transform:n?"rotate(0deg)":"rotate(180deg)",transition:"transform 0.25s ease"}},{children:t("path",{d:"M4.5 11.25L9 6.75l4.5 4.5",stroke:"#64748b",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})}))},f=function(n){var i=n.color,r=void 0===i?"#3b82f6":i;return o("svg",e({width:"15",height:"15",viewBox:"0 0 16 16",fill:"none"},{children:[t("path",{d:"M1.5 8A6.5 6.5 0 1 0 4 3.2",stroke:r,strokeWidth:"1.5",strokeLinecap:"round"}),t("path",{d:"M1.5 3.5v4h4",stroke:r,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),t("path",{d:"M8 5v3.5l2 1.5",stroke:r,strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]}))},p=function(){return o("svg",e({width:"15",height:"15",viewBox:"0 0 16 16",fill:"none"},{children:[t("path",{d:"M13.5 8a5.5 5.5 0 1 0-1.6 3.9",stroke:"#3b82f6",strokeWidth:"1.5",strokeLinecap:"round"}),t("path",{d:"M13.5 13v-4.5H9",stroke:"#3b82f6",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}))},k=function(){return o("svg",e({width:"15",height:"15",viewBox:"0 0 16 16",fill:"none"},{children:[t("path",{d:"M2 8h12M10 4l4 4-4 4",stroke:"#64748b",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),t("path",{d:"M4 5l-2 3 2 3",stroke:"#64748b",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]}))};function g(n){var i=n.title,r=n.open,d=n.onToggle,l=n.children;return o("div",e({style:{maxHeight:"170px",overflow:"auto"}},{children:[o("div",e({onClick:d,style:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",userSelect:"none",padding:"2px 0"}},{children:[t("span",e({style:{fontSize:14,fontWeight:700,color:"#1e293b",letterSpacing:"-0.01em"}},{children:i})),t(u,{open:r})]})),t("div",e({style:{maxHeight:r?300:0,opacity:r?1:0,overflow:"hidden",transition:"max-height 0.3s cubic-bezier(0.4,0,0.2,1), opacity 0.25s"}},{children:l}))]}))}function b(t){var n=t.icon,i=t.label,r=t.onClick,d=t.customStyle,l=void 0===d?{}:d,a=t.disabled,c=void 0!==a&&a,s=t.disabledStyle,h=void 0===s?{}:s,u=e(e({display:"flex",alignItems:"center",gap:7,padding:"8px 16px",background:"#f8fafc",border:"1.5px solid #e2e8f0",borderRadius:10,cursor:c?"not-allowed":"pointer",fontSize:"12px",fontWeight:600,color:"#475569",fontFamily:"inherit",transition:"background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.12s",whiteSpace:"nowrap",opacity:c?.5:1},l),c?h:{});return o("button",e({onClick:c?void 0:r,disabled:c,style:u,onMouseEnter:function(e){c||(e.currentTarget.style.background="#f1f5f9",e.currentTarget.style.transform="translateY(-1px)",e.currentTarget.style.boxShadow="0 2px 8px rgba(0,0,0,0.07)")},onMouseLeave:function(e){c||(e.currentTarget.style.background="#f8fafc",e.currentTarget.style.transform="",e.currentTarget.style.boxShadow="")}},{children:[n,i]}))}function v(u){var v=u.status,m=u.onClose,y=u.impactText,x=u.secondText,B=u.actionTakenByName,C=u.actionTakenAtTime,L=void 0===C?"NA":C,w=u.onHistory,R=u.onIterate,S=u.onReinstate,M=u.onRevert,W=u.disableAllActions,T=void 0!==W&&W,I=u.impactTitle,D=void 0===I?"Impact":I,j=u.customConfigs,z=void 0===j?{}:j,A=u.customStyles,H=void 0===A?{}:A,F=i(!0),U=F[0],E=F[1],N=i(!0),P=N[0],O=N[1],Y=i(!1),q=Y[0],G=Y[1],J={headerBg:"#f0fdf4",headerBorder:"#dcfce7",titleColor:"#166534",label:"Redline Approved",metaLabel:"Approved By",UserIcon:t(s,{}),StatusIcon:t(l,{}),secondTitle:"Original text",secondBg:"#f8fafc",secondBorder:"#e2e8f0",impactBox:!0,actions:[{icon:t(f,{}),label:"History",onClick:w},{icon:t(n,{size:17}),label:"Revert",onClick:M},{icon:t(k,{}),label:"Iterate",onClick:R}]},K={headerBg:"#fff1f2",headerBorder:"#fecdd3",titleColor:"#991b1b",label:"Redline Rejected",metaLabel:"Rejected By",UserIcon:t(h,{}),StatusIcon:t(a,{}),secondTitle:"Rejected Recommendation",secondBg:"#f8fafc",secondBorder:"#e2e8f0",impactBox:!1,actions:[{icon:t(f,{color:"#3b82f6"}),label:"History",onClick:w},{icon:t(p,{}),label:"Reinstate",onClick:S},{icon:t(k,{}),label:"Iterate",onClick:R}]},Q={headerBg:"#E2E8F0",headerBorder:"none",titleColor:"#1E293B",label:"Redline Reverted",metaLabel:"Reverted By",UserIcon:t(s,{}),StatusIcon:t(n,{size:17}),secondTitle:"Reverted redline",secondBg:"#F9FAFB",secondBorder:"#D0D5DD",impactBox:!1,actions:[{icon:t(f,{}),label:"History",onClick:w},{icon:t(k,{}),label:"Iterate",onClick:R}]},V=e(e({},"accepted"===v?J:"rejected"===v?K:Q),z[v]||{});return o("div",e({style:e(e(e({},r.RedlineCardDefaults.root),{animation:q?"slideOut 0.26s cubic-bezier(0.4,0,1,1) forwards":r.RedlineCardDefaults.root.animation||"slideIn 0.32s cubic-bezier(0.22,1,0.36,1) both"}),H.root)},{children:[o("div",e({style:e(e(e({},r.RedlineCardDefaults.header),{background:V.headerBg,borderBottom:"1.5px solid ".concat(V.headerBorder)}),H.header)},{children:[o("div",e({style:{display:"flex",alignItems:"center",gap:10}},{children:[V.StatusIcon,t("span",e({style:{fontSize:15,fontWeight:700,color:V.titleColor,letterSpacing:"-0.01em"}},{children:V.label}))]})),t("button",e({onClick:function(){G(!0),m()},style:{background:"none",border:"none",cursor:"pointer",padding:4,borderRadius:6,display:"flex",alignItems:"center"}},{children:t(c,{})}))]})),o("div",e({style:e(e({},r.RedlineCardDefaults.body),H.body)},{children:[o("div",e({style:e(e({},r.RedlineCardDefaults.meta),H.meta)},{children:[o("div",e({style:{display:"flex",alignItems:"center",gap:6,marginBottom:5}},{children:[V.UserIcon,t("span",e({style:{fontSize:12.5,color:"#94a3b8",fontWeight:500}},{children:V.metaLabel}))]})),o("div",e({style:{fontSize:14,fontWeight:700,color:"#1e293b",letterSpacing:"-0.01em"}},{children:[B,", ",d(L)]}))]})),t("div",{style:e(e({},r.RedlineCardDefaults.divider),H.divider)}),t(g,e({title:D,open:U,onToggle:function(){return E(function(e){return!e})}},{children:t("p",e({style:e(e({},r.RedlineCardDefaults.impactText),H.impactText)},{children:y||""}))})),t("div",{style:e(e({},r.RedlineCardDefaults.divider),H.divider)}),t(g,e({title:V.secondTitle,open:P,onToggle:function(){return O(function(e){return!e})}},{children:t("div",e({style:e(e(e({},r.RedlineCardDefaults.secondSection),{background:V.secondBg,border:"1.5px solid ".concat(V.secondBorder)}),H.secondSection)},{children:x||""}))})),t("div",e({style:e(e({},r.RedlineCardDefaults.actionsContainer),H.actionsContainer)},{children:V.actions.map(function(o){return t(b,{icon:o.icon,label:o.label,onClick:o.onClick,customStyle:e(e({},o.style),H.actionBtn),disabled:T||o.disabled,disabledStyle:H.actionBtnDisabled},o.label)})}))]}))]}))}export{l as ApprovedIcon,u as ChevronIcon,c as CloseIcon,f as HistoryIcon,k as IterateIcon,v as RedlineCard,p as ReinstateIcon,a as RejectedIcon,s as UserApprovedIcon,h as UserRejectedIcon,d as formatDate};
1
+ import{__assign as e}from"tslib";import{jsx as t,jsxs as i,Fragment as o}from"react/jsx-runtime";import{Undo2 as n}from"lucide-react";import{useState as r}from"react";import l from"./PopupDefaults.js";import{Tooltip as d}from"@mui/material";function a(e){var t=new Date(e);return isNaN(t.getTime())?e:new Date(e).toLocaleString("en-US",{month:"2-digit",day:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!0}).replace(" AM","AM").replace(" PM","PM")}var c=function(){return i("svg",e({width:"22",height:"22",viewBox:"0 0 22 22",fill:"none"},{children:[t("circle",{cx:"11",cy:"11",r:"10",stroke:"#22c55e",strokeWidth:"2",fill:"#f0fdf4"}),t("path",{d:"M6.5 11.5l3 3 6-6",stroke:"#22c55e",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}))},s=function(){return i("svg",e({width:"22",height:"22",viewBox:"0 0 22 22",fill:"none"},{children:[t("circle",{cx:"11",cy:"11",r:"10",stroke:"#ef4444",strokeWidth:"2",fill:"#fff1f2"}),t("path",{d:"M7.5 7.5l7 7M14.5 7.5l-7 7",stroke:"#ef4444",strokeWidth:"2",strokeLinecap:"round"})]}))},h=function(){return t("svg",e({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none"},{children:t("path",{d:"M4 4l10 10M14 4L4 14",stroke:"#94a3b8",strokeWidth:"1.8",strokeLinecap:"round"})}))},f=function(){return i("svg",e({width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},{children:[t("circle",{cx:"6.5",cy:"5.5",r:"2.5",stroke:"#94a3b8",strokeWidth:"1.4"}),t("path",{d:"M1.5 13.5c0-3.038 2.462-5.5 5-5.5s5 2.462 5 5.5",stroke:"#94a3b8",strokeWidth:"1.4",strokeLinecap:"round"}),t("path",{d:"M11 8.5l1.5 1.5 2.5-2.5",stroke:"#22c55e",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})]}))},u=function(){return i("svg",e({width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},{children:[t("circle",{cx:"6.5",cy:"5.5",r:"2.5",stroke:"#94a3b8",strokeWidth:"1.4"}),t("path",{d:"M1.5 13.5c0-3.038 2.462-5.5 5-5.5s5 2.462 5 5.5",stroke:"#94a3b8",strokeWidth:"1.4",strokeLinecap:"round"}),t("path",{d:"M11.5 8l3 3m0-3l-3 3",stroke:"#ef4444",strokeWidth:"1.4",strokeLinecap:"round"})]}))},p=function(i){var o=i.open;return t("svg",e({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",style:{transform:o?"rotate(0deg)":"rotate(180deg)",transition:"transform 0.25s ease"}},{children:t("path",{d:"M4.5 11.25L9 6.75l4.5 4.5",stroke:"#64748b",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})}))},k=function(o){var n=o.color,r=void 0===n?"#3b82f6":n;return i("svg",e({width:"15",height:"15",viewBox:"0 0 16 16",fill:"none"},{children:[t("path",{d:"M1.5 8A6.5 6.5 0 1 0 4 3.2",stroke:r,strokeWidth:"1.5",strokeLinecap:"round"}),t("path",{d:"M1.5 3.5v4h4",stroke:r,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),t("path",{d:"M8 5v3.5l2 1.5",stroke:r,strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]}))},b=function(){return i("svg",e({width:"15",height:"15",viewBox:"0 0 16 16",fill:"none"},{children:[t("path",{d:"M13.5 8a5.5 5.5 0 1 0-1.6 3.9",stroke:"#3b82f6",strokeWidth:"1.5",strokeLinecap:"round"}),t("path",{d:"M13.5 13v-4.5H9",stroke:"#3b82f6",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}))},g=function(){return i("svg",e({width:"15",height:"15",viewBox:"0 0 16 16",fill:"none"},{children:[t("path",{d:"M2 8h12M10 4l4 4-4 4",stroke:"#64748b",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),t("path",{d:"M4 5l-2 3 2 3",stroke:"#64748b",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]}))};function v(n){var r=n.title,l=n.open,d=n.onToggle,a=n.children;return i("div",{children:[i("div",e({onClick:d,style:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",userSelect:"none",padding:"2px 0"}},{children:[t("span",e({style:{fontSize:14,fontWeight:700,color:"#1e293b",letterSpacing:"-0.01em"}},{children:r})),t(p,{open:l})]})),t("div",e({style:{maxHeight:l?100:0,opacity:l?1:0,transition:"max-height 0.3s cubic-bezier(0.4,0,0.2,1), opacity 0.25s"}},{children:l&&t(o,{children:a})}))]})}function y(t){var o=t.icon,n=t.label,r=t.onClick,l=t.customStyle,d=void 0===l?{}:l,a=t.disabled,c=void 0!==a&&a,s=t.disabledStyle,h=void 0===s?{}:s,f=e(e({display:"flex",alignItems:"center",gap:10,padding:"8px 16px",background:"#f8fafc",border:"1.5px solid #e2e8f0",borderRadius:10,cursor:c?"not-allowed":"pointer",fontSize:"12px",fontWeight:600,color:"#475569",fontFamily:"inherit",transition:"background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.12s",whiteSpace:"nowrap",opacity:c?.5:1},d),c?h:{});return i("button",e({onClick:c?void 0:r,disabled:c,style:f,onMouseEnter:function(e){c||(e.currentTarget.style.background="#f1f5f9",e.currentTarget.style.transform="translateY(-1px)",e.currentTarget.style.boxShadow="0 2px 8px rgba(0,0,0,0.07)")},onMouseLeave:function(e){c||(e.currentTarget.style.background="#f8fafc",e.currentTarget.style.transform="",e.currentTarget.style.boxShadow="")}},{children:[o,n]}))}function m(o){var p=o.status,m=o.onClose,x=o.impactText,B=o.secondText,C=o.actionTakenByName,L=o.actionTakenAtTime,w=void 0===L?"NA":L,S=o.onHistory,W=o.onIterate,R=o.onReinstate,T=o.onRevert,M=o.disableAllActions,I=void 0!==M&&M,D=o.impactTitle,j=void 0===D?"Impact":D,z=o.customConfigs,A=void 0===z?{}:z,N=o.customStyles,H=void 0===N?{}:N,F=o.secondaryTitle,U=r(!0),E=U[0],O=U[1],P=r(!0),Y=P[0],q=P[1],G=r(!1),J=G[0],K=G[1],Q={headerBg:"#f0fdf4",headerBorder:"#dcfce7",titleColor:"#166534",label:"Redline Approved",metaLabel:"Approved By",UserIcon:t(f,{}),StatusIcon:t(c,{}),secondTitle:"Original text",secondBg:"#f8fafc",secondBorder:"#e2e8f0",impactBox:!0,actions:[{icon:t(k,{}),label:"History",onClick:S},{icon:t(n,{size:17}),label:"Revert",onClick:T},{icon:t(g,{}),label:"Iterate",onClick:W}],fallbackText:"No original text available"},V={headerBg:"#fff1f2",headerBorder:"#fecdd3",titleColor:"#991b1b",label:"Redline Rejected",metaLabel:"Rejected By",UserIcon:t(u,{}),StatusIcon:t(s,{}),secondTitle:"Rejected Recommendation",secondBg:"#f8fafc",secondBorder:"#e2e8f0",impactBox:!1,actions:[{icon:t(k,{color:"#3b82f6"}),label:"History",onClick:S},{icon:t(b,{}),label:"Reinstate",onClick:R},{icon:t(g,{}),label:"Iterate",onClick:W}],fallbackText:"No rejected recommendation available"},X={headerBg:"#E2E8F0",headerBorder:"none",titleColor:"#1E293B",label:"Redline Reverted",metaLabel:"Reverted By",UserIcon:t(f,{}),StatusIcon:t(n,{size:17}),secondTitle:"Reverted redline",secondBg:"#F9FAFB",secondBorder:"#D0D5DD",impactBox:!1,actions:[{icon:t(k,{}),label:"History",onClick:S},{icon:t(g,{}),label:"Iterate",onClick:W}],fallbackText:"No reverted redline available"},Z=e(e({},"accepted"===p?Q:"rejected"===p?V:X),A[p]||{});return i("div",e({style:e(e(e({},l.RedlineCardDefaults.root),{animation:J?"slideOut 0.26s cubic-bezier(0.4,0,1,1) forwards":l.RedlineCardDefaults.root.animation||"slideIn 0.32s cubic-bezier(0.22,1,0.36,1) both"}),H.root)},{children:[i("div",e({style:e(e(e({},l.RedlineCardDefaults.header),{background:Z.headerBg,borderBottom:"1.5px solid ".concat(Z.headerBorder)}),H.header)},{children:[i("div",e({style:{display:"flex",alignItems:"center",gap:10}},{children:[t("div",e({style:{display:"flex",alignItems:"center",justifyContent:"center"}},{children:Z.StatusIcon})),i("div",{children:[t("span",e({style:{fontSize:15,fontWeight:700,color:Z.titleColor,letterSpacing:"-0.01em"}},{children:Z.label})),t(d,e({title:F},{children:t("span",e({style:{display:"-webkit-box",WebkitLineClamp:1,WebkitBoxOrient:"vertical",overflow:"hidden",fontSize:12,color:"gray"}},{children:F}))}))]})]})),t("button",e({onClick:function(){K(!0),m()},style:{background:"none",border:"none",cursor:"pointer",padding:4,borderRadius:6,display:"flex",alignItems:"center"}},{children:t(h,{})}))]})),i("div",e({style:e(e({},l.RedlineCardDefaults.body),H.body)},{children:[i("div",e({style:e(e({},l.RedlineCardDefaults.meta),H.meta)},{children:[i("div",e({style:{display:"flex",alignItems:"center",gap:6,marginBottom:5}},{children:[Z.UserIcon,t("span",e({style:{fontSize:12.5,color:"#94a3b8",fontWeight:500}},{children:Z.metaLabel}))]})),i("div",e({style:{fontSize:14,fontWeight:700,color:"#1e293b",letterSpacing:"-0.01em"}},{children:[t(d,e({title:C},{children:t("span",e({style:{display:"-webkit-box",WebkitLineClamp:1,WebkitBoxOrient:"vertical",overflow:"hidden"}},{children:C}))})),t("span",{children:a(w)})]}))]})),t("div",{style:e(e({},l.RedlineCardDefaults.divider),H.divider)}),t(v,e({title:j,open:E,onToggle:function(){return O(function(e){return!e})}},{children:t("p",e({style:e(e({},l.RedlineCardDefaults.impactText),H.impactText)},{children:x||""}))})),t("div",{style:e(e({},l.RedlineCardDefaults.divider),H.divider)}),t(v,e({title:Z.secondTitle,open:Y,onToggle:function(){return q(function(e){return!e})}},{children:B?t("div",e({style:e(e(e({},l.RedlineCardDefaults.secondSection),{background:Z.secondBg,border:"1.5px solid ".concat(Z.secondBorder)}),H.secondSection)},{children:B})):i("div",e({style:e(e({},l.RedlineCardDefaults.fallbackSectionStyle),H.fallbackSectionStyle)},{children:[Z.fallbackText," "]}))})),t("div",e({style:e(e({},l.RedlineCardDefaults.actionsContainer),H.actionsContainer)},{children:Z.actions.map(function(i){return t(y,{icon:i.icon,label:i.label,onClick:i.onClick,customStyle:e(e({},i.style),H.actionBtn),disabled:I||i.disabled,disabledStyle:H.actionBtnDisabled},i.label)})}))]}))]}))}export{c as ApprovedIcon,p as ChevronIcon,h as CloseIcon,k as HistoryIcon,g as IterateIcon,m as RedlineCard,b as ReinstateIcon,s as RejectedIcon,f as UserApprovedIcon,u as UserRejectedIcon,a as formatDate};
2
2
  //# sourceMappingURL=RedlineStatusCard.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e,__awaiter as t,__generator as n,__spreadArray as o}from"tslib";import{jsxs as i,jsx as l,Fragment as r}from"react/jsx-runtime";import{useState as a,useRef as s,useEffect as u}from"react";import{ExternalLink as c,Download as d,Share2 as v,Copy as f,LoaderCircle as m,PencilIcon as y,Plus as h,Trash2 as p,Ellipsis as S,ChevronUp as g,ChevronDown as C,ChevronUpIcon as I,ChevronDownIcon as w,Info as b,Bookmark as N}from"lucide-react";import B from"showdown";import{Menu as D,MenuItem as U,Tooltip as x}from"@mui/material";import{v4 as E}from"uuid";import k from"./UserStoryCard.module.css.js";import{formatMarkdown as T,indentMarkdown as A}from"../../utils/helpers.js";import{replaceTitleSection as M}from"../../utils/user-story.utils.js";import _ from"../../shared/AtomicButton.js";import P from"../RichTextEditor/RichTextEditor.js";import H from"../userstory-with-citation/UserStoryWithCitation.js";import{useRequirementAI as R}from"../RequirementAIWrapper/RequirementAIWrapper.js";import{BigEnoughPanel as j}from"../story-screen/BigEnoughPanel.js";import{InlineTitleEditor as L}from"./TitleEditor/TitleEditor.js";function z(t){for(var n,o=[],i=/<learned>(.*?)<\/learned>/g,r=0,a=0;null!==(n=i.exec(t));){var s=n[1],u=n.index;u>r&&o.push(l("span",{children:t.slice(r,u)},"text-pre-".concat(a++))),o.push(l(x,e({title:s,placement:"top"},{children:l(b,{size:16,className:"inline-block mx-1 text-blue-500 hover:text-blue-700 cursor"})}),"tooltip-".concat(E()))),r=i.lastIndex}return r<(null==t?void 0:t.length)&&o.push(l("span",{children:t.slice(r)},"text-post-".concat(a++))),o}function W(t,n,o){var i;if(!t)return{};if(n)return e({},t.parentConfig);var l=e({},t.childConfig);return o&&(null===(i=t.subFeatureOverrides)||void 0===i?void 0:i[o])?e(e({},l),t.subFeatureOverrides[o]):l}var O=function(t){var n,o=t.displayName,r=R().customStyles,a=null===(n=null==r?void 0:r.userStoryCardStyles)||void 0===n?void 0:n.showDisplayName;return i("div",e({className:k.displayName,style:null==a?void 0:a.wrapper},{children:[l(N,{className:k.displayNameIcon,style:null==a?void 0:a.displayNameIcon}),i("span",e({style:null==a?void 0:a.label},{children:[o,":"]}))]}))},V=function(I){var w,b,N,x,F,G,q,Q=I.isUserStoryCurrentlyUpdated,Z=I.artifactId,J=I.artifactTitleId,K=I.parentUserStory,X=I.currentUserStory,Y=I.onUserStoryChange,$=I.parentIndex,ee=I.currentIndex,te=I.enableDownload,ne=I.isDiffEditReviewMode,oe=I.showUserStoryDiff,ie=I.handleDownloadUserStory,le=I.handleOpenSendDialog,re=I.updateUserStoryArtifact,ae=I.selectedArtifactId,se=I.isDisplayHighlightControl,ue=I.elementDisplayConfig,ce=I._resolvedConfig,de=I.showWrapper,ve=void 0!==de&&de,fe=I.actionItemsConfig,me=I.onDelete,ye=R(),he=ye.searchQueryList,pe=ye.citations,Se=ye.customStyles,ge=null==Se?void 0:Se.userStoryCardStyles,Ce=null===(w=null==Se?void 0:Se.userStoryCardStyles)||void 0===w?void 0:w.userStoryEditStyles,Ie=null===(b=null==Se?void 0:Se.userStoryScreenStyles)||void 0===b?void 0:b.userStoryContentStyles,we=null==ge?void 0:ge.progressHeaderStyles,be=a(e(e({},structuredClone(X)),{value:T(X.value)||""})),Ne=be[0],Be=be[1],De=a({userStory:!!X.isDefaultEdit}),Ue=De[0],xe=De[1],Ee=a(!1),ke=Ee[0],Te=Ee[1],Ae=a(null),Me=Ae[0],_e=Ae[1],Pe=R(),He=Pe.userStory,Re=Pe.customIcons,je=a(""===$||ae===X.artifactId||!!X.isDefaultOpen),Le=je[0],ze=je[1],We=a(!1);We[0];var Oe=We[1],Ve=a(null),Fe=Ve[0],Ge=Ve[1],qe=a(null),Qe=qe[0],Ze=qe[1],Je=a(!1),Ke=Je[0],Xe=Je[1],Ye=s(null),$e=a(!1);$e[0];var et=$e[1],tt=s(null);u(function(){Q&&ze(Q)},[Q]),u(function(){Be(e(e({},structuredClone(X)),{value:T(X.value)||""}))},[X]),u(function(){he.length>0?ze(!0):ae&&ze(ae===X.artifactId)},[he,ae,X.artifactId]);var nt=function(){Ge(null)},ot=function(){Ze(null)},it=function(){ze(function(e){return!e})};var lt=null!=(null==X?void 0:X.big_enough)&&!Number.isNaN(X.big_enough)&&!!(null==X?void 0:X.big_enough_decision_factors),rt=""===$,at=null!=ce?ce:W(ue,rt),st=!ne&&!oe;return u(function(){if(Me){var e=setTimeout(function(){var e=document.getElementById("story-card-".concat(Me));null==e||e.scrollIntoView({behavior:"smooth",block:"start"})},100);return function(){return clearTimeout(e)}}},[Me]),u(function(){X.isDefaultEdit&&xe(function(t){return e(e({},t),{userStory:!0})})},[X.isDefaultEdit]),i("div",e({className:k.card,style:null==ge?void 0:ge.cardStyle,id:"story-card-".concat(X.title),"data-expanded":Le},{children:[i("div",e({className:k.titleSection,style:null==ge?void 0:ge.titleSection},{children:[i("div",e({className:k.titleRow,style:null==ge?void 0:ge.titleRow,onClick:it},{children:[i("div",e({className:k.titleLeft,style:null==ge?void 0:ge.titleLeft,onMouseEnter:function(){return et(!0)},onMouseLeave:function(){return et(!1)}},{children:[l(O,{displayName:J}),ke&&st?l(L,{title:X.title,onSave:function(o){return function(o,i){return t(void 0,void 0,void 0,function(){var t,l;return n(this,function(n){try{t=e({},X),X.artifactId===i?t.title=o:t.sub_features=(null===(l=X.sub_features)||void 0===l?void 0:l.map(function(t){return t.artifactId===i?e(e({},t),{title:o}):t}))||[],Be(t),Y(t),Te(!1)}catch(e){console.error("Failed to save title",e)}return[2]})})}(o,X.artifactId)},onCancel:function(){Te(!1)},inputStyle:null==Ce?void 0:Ce.inlineTitleInput,confirmButtonStyle:null==Ce?void 0:Ce.inlineTitleConfirm,cancelButtonStyle:null==Ce?void 0:Ce.inlineTitleCancel},"inline-title-editor"):i("div",e({className:k.storyTitleWrapper},{children:[l("h2",e({title:X.title,className:k.storyTitle,style:null==ge?void 0:ge.storyTitle},{children:z(X.title)}),X.artifactId),l("button",e({type:"button",className:k.titleEditButton,style:null==Ce?void 0:Ce.titleEditButton,onClick:function(e){e.stopPropagation(),Te(!0),Le||ze(!0)},"aria-label":"Edit title",title:"Edit title"},{children:l("svg",e({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:l("path",{d:"M8.99998 14.9992H15.75M2.25 14.9992H3.50591C3.87279 14.9992 4.05624 14.9992 4.22887 14.9577C4.38192 14.921 4.52824 14.8604 4.66245 14.7782C4.81382 14.6854 4.94354 14.5557 5.20296 14.2962L14.625 4.87419C15.2463 4.25287 15.2463 3.24551 14.625 2.62419C14.0037 2.00287 12.9963 2.00287 12.375 2.62419L2.95295 12.0462C2.69352 12.3057 2.5638 12.4354 2.47104 12.5868C2.3888 12.721 2.32819 12.8673 2.29145 13.0203C2.25 13.193 2.25 13.3764 2.25 13.7433V14.9992Z",stroke:"#94A3B8","stroke-width":"1.54286","stroke-linecap":"round","stroke-linejoin":"round"})}))}))]}))]})),i("div",e({className:k.titleActions,style:null==ge?void 0:ge.titleActions,onClick:function(e){return e.stopPropagation()}},{children:[(at.showProgressPercentage||at.showGapBox)&&ve&&i("div",e({className:k.progressHeader,style:null==we?void 0:we.wrapper},{children:[at.showProgressPercentage&&i("div",e({className:k.progressPercentage,style:null==we?void 0:we.percentage},{children:[null!==(x=null!==(N=null==X?void 0:X.confidenceScore)&&void 0!==N?N:null==at?void 0:at.confidenceValue)&&void 0!==x?x:"0","%"]})),at.showGapBox&&i("div",e({className:k.gapBox,style:null==we?void 0:we.gapBox},{children:[null!==(G=null!==(F=null==X?void 0:X.gapValue)&&void 0!==F?F:null==at?void 0:at.gapBoxValue)&&void 0!==G?G:"2"," ","Gaps"]}))]})),lt&&l(j,{customIcons:null==Re?void 0:Re.userStoryIcons,customStyles:null==ge?void 0:ge.aiReasoningCitaionStyles,currentUserStory:X,panelStyles:null==ge?void 0:ge.BigEnoughStyles}),!Ue.userStory&&i(r,{children:[!1!==(null==at?void 0:at.showShareButton)&&l("button",e({className:k.iconButton,style:null==ge?void 0:ge.iconButton,onClick:function(e){Ge(e.currentTarget)}},{children:l(c,{size:16})})),i(D,e({id:"user-story-share-menu",anchorEl:Fe,open:!!Fe,onClose:function(){return Ge(null)},style:null==ge?void 0:ge.userStoryShareMenu},{children:[te&&l(U,e({style:null==ge?void 0:ge.userStoryMenuItem,onClick:function(){return t(void 0,void 0,void 0,function(){return n(this,function(e){switch(e.label){case 0:return Oe(!0),ie?[4,Promise.all([ie("pdf"),ie("doc")])]:[2];case 1:return e.sent(),Oe(!1),[2]}})})}},{children:i("div",e({ref:Ye,className:k.menuItemContent,style:null==ge?void 0:ge.menuItemContent},{children:[l(d,{size:16,color:null==ge?void 0:ge.menuIconColor}),l("p",e({style:null==ge?void 0:ge.menuLabel},{children:"Download"}))]}))})),l(U,e({style:null==ge?void 0:ge.userStoryMenuItem,onClick:function(){return t(void 0,void 0,void 0,function(){var t;return n(this,function(n){return t=X,K&&(t=e(e({},X),{value:"".concat(M(null==K?void 0:K.value,X.title)," \n").concat(X.value)})),null==le||le(!0,[t],X.artifactId),nt(),[2]})})}},{children:i("div",e({style:null==ge?void 0:ge.menuItemContent,className:k.menuItemContentPadded},{children:[l(v,{size:16,color:null==ge?void 0:ge.menuIconColor}),l("p",e({style:null==ge?void 0:ge.menuLabel},{children:"Send"}))]}))})),l(U,e({style:null==ge?void 0:ge.userStoryMenuItem,onClick:function(){return t(void 0,void 0,void 0,function(){var e,t,o,i,l;return n(this,function(n){switch(n.label){case 0:e=new B.Converter,t=e.makeHtml(T(X.value)||X.value),o=function(e){var t=(new B.Converter).makeHtml(e),n=document.createElement("div");return n.innerHTML=t,n.textContent||n.innerText||""}(T(X.value)||X.value),i=new ClipboardItem({"text/plain":new Blob([o],{type:"text/plain"}),"text/html":new Blob([t],{type:"text/html"})}),n.label=1;case 1:return n.trys.push([1,3,4,5]),[4,navigator.clipboard.write([i])];case 2:return n.sent(),console.log("Copied User Story"),[3,5];case 3:return l=n.sent(),console.error("Failed to copy user story:",l),[3,5];case 4:return nt(),[7];case 5:return[2]}})})}},{children:i("div",e({style:null==ge?void 0:ge.menuItemContent,className:k.menuItemContentPadded},{children:[l(f,{size:16,color:null==ge?void 0:ge.menuIconColor}),l("p",e({style:null==ge?void 0:ge.menuLabel},{children:"Copy"}))]}))}))]}))]}),Ue.userStory&&Le?l(_,{type:"outline",children:"Cancel",style:null==ge?void 0:ge.cancelButton,onClick:function(){var t;null===(t=tt.current)||void 0===t||t.abort(),xe(function(t){return e(e({},t),{userStory:!1})})}}):l(r,{}),Ue.userStory&&Le?l(_,{type:"fill",children:Ke?i("span",e({className:k.savingSpinner,style:null==ge?void 0:ge.savingSpinner},{children:[l(m,{className:k.spinAnimation,style:null==ge?void 0:ge.spinAnimation}),l("span",{children:"Saving..."})]})):"Save",isDisable:Ke,style:Ke?null==ge?void 0:ge.savingButton:null==ge?void 0:ge.saveButton,onClick:function(){return t(void 0,void 0,void 0,function(){var t;return n(this,function(n){switch(n.label){case 0:return Xe(!0),"userStory"==="userStory"&&(Y(Ne),console.log("I am changing RTE editor values",Ne)),[4,re(pe,He,Z,null===(t=tt.current)||void 0===t?void 0:t.signal)];case 1:return n.sent(),Y(e(e({},Ne),{isDefaultEdit:!1})),xe(function(t){return e(e({},t),{userStory:!1})}),Xe(!1),[2]}})})}}):!ne&&!oe&&Le&&!1!==(null==at?void 0:at.showEditButton)&&l("button",e({className:k.iconButton,style:null==ge?void 0:ge.editButton,onClick:function(){return xe(function(t){return e(e({},t),{userStory:!0})})}},{children:l(y,{color:null==ge?void 0:ge.pencilIconColor,size:16})})),rt&&Le&&!ne&&!oe&&!1!==(null==at?void 0:at.showEditButton)&&i("button",e({type:"button",className:k.addSectionButton,style:null==Ce?void 0:Ce.addSectionButton,onClick:function(t){var n,i,l;t.stopPropagation();var r=(null!==(i=null===(n=X.sub_features)||void 0===n?void 0:n.length)&&void 0!==i?i:0)+1,a={artifactId:E(),title:"New Section ".concat(r),value:"Please add details for this section.",section:"subfeature",isDefaultOpen:!0},s=e(e({},X),{sub_features:o(o([],null!==(l=X.sub_features)&&void 0!==l?l:[],!0),[a],!1)});Be(s),Y(s),ze(!0),_e(a.title)},"aria-label":"Add section",title:"Add section"},{children:[l(h,{size:14}),l("span",e({className:k.addSectionLabel},{children:"Add Section"}))]})),!rt&&!ne&&!oe&&l("button",e({type:"button",onClick:function(e){e.stopPropagation(),null==me||me()},className:k.iconButton,style:null==Ce?void 0:Ce.deleteButton,"aria-label":"Delete section",title:"Delete section"},{children:l(p,{size:16})})),(null==at?void 0:at.actionItemsButton)&&i(r,{children:[l("span",e({className:k.actionItemBtn,style:null==ge?void 0:ge.actionItemBtn,onClick:function(e){e.stopPropagation(),Ze(e.currentTarget)}},{children:l(S,{})})),l(D,e({id:"user-story-action-menu",anchorEl:Qe,open:!!Qe,onClose:ot,style:null==ge?void 0:ge.userStoryShareMenu},{children:null==fe?void 0:fe.items.map(function(t,n){return l(U,e({style:null==ge?void 0:ge.userStoryMenuItem,onClick:function(){t.onclick(),ot()}},{children:i("div",e({className:k.menuItemContent,style:e(e({},null==ge?void 0:ge.menuItemContent),!t.isActive&&{cursor:"not-allowed",opacity:.5})},{children:[l("span",e({className:k.menuItemIcon,style:null==ge?void 0:ge.menuItemIcon},{children:t.icon})),l("p",e({style:null==ge?void 0:ge.menuLabel},{children:t.name})),l("span",{className:k.menuItemRight,style:null==ge?void 0:ge.menuItemRight})]}))}),"action-item-".concat(n,"-").concat(t.name))})}))]}),l("button",e({type:"button",onClick:function(e){e.stopPropagation(),it()},style:null==ge?void 0:ge.chevronButton,className:k.chevronButton},{children:l(Le?g:C,{className:k.chevronIcon,color:null==ge?void 0:ge.chevronIconColor})}))]}))]})),l("div",{className:k.divider,style:null==ge?void 0:ge.dividerStyle})]})),Le&&l("div",e({className:k.cardContent,style:null==ge?void 0:ge.cardContentStyle},{children:i("div",e({className:k.contentInner,style:null==ge?void 0:ge.contentInner},{children:[i("div",e({className:k.descriptionSection,style:null==ge?void 0:ge.descriptionSection},{children:[l("div",{className:k.justifyBetween,style:null==ge?void 0:ge.justifyBetween}),Ue.userStory?l(P,{minHeight:"100%",height:"100%",type:"string",value:T(X.value)||"",handleUpdateState:function(t,n){var o=A(n);Be(function(t){return e(e({},t),{value:o||""})})},doNotShowBorderInViewMode:!1,onBlur:function(){},mode:Ue.userStory?"edit":"readOnly"}):l(H,{showUserStoryDiff:oe,isParent:""===$,message:T(X.value)||"",artifactId:X.artifactId,customStyles:Ie,isDisplayHighlightControl:se})]})),null===(q=Ne.sub_features)||void 0===q?void 0:q.map(function(t,n){var i=W(ue,!1,t.artifactId);return l(V,{artifactId:Z,isUserStoryCurrentlyUpdated:Q,artifactTitleId:"".concat(J,"-").concat(String.fromCharCode(65+n)),parentUserStory:X,parentIndex:"".concat($).concat($&&".").concat(ee),currentIndex:"".concat(n+1),doNotShowBorderInViewMode:!1,currentUserStory:t,onUserStoryChange:function(t){return function(t,n){var i=o([],X.sub_features||[],!0);i[t]=n,Y(e(e({},X),{sub_features:i}))}(n,t)},enableDownload:!0,isDiffEditReviewMode:ne,showUserStoryDiff:oe,updateUserStoryArtifact:re,handleDownloadUserStory:ie,handleOpenSendDialog:le,isDisplayHighlightControl:se,elementDisplayConfig:ue,_resolvedConfig:i,actionItemsConfig:fe,onDelete:function(){return function(t){var n=(X.sub_features||[]).filter(function(e,n){return n!==t}),o=e(e({},X),{sub_features:n});Be(o),Y(o)}(n)}},t.artifactId)})]}))}))]}))},F=function(t){var n=t.artifactTitleIDs,a=t.isDiffEditReviewMode,s=t.showUserStoryDiff,u=t.updateUserStoryArtifact,c=t.isUserStoryCurrentlyUpdated,d=t.artifactId,v=t.handleOpenSendDialog,f=t.handleDownloadUserStory,m=t.selectedArtifactId,y=t.isDisplayHighlightControl,h=t.elementDisplayConfig,p=t.showWrapper,S=t.actionItemsConfig,g=R(),C=g.userStory,b=g.setUserStory,N=g.customStyles,B=g.searchQueryList,D=g.currentHighlightIndex,U=g.setCurrentHighlightIndex;g.segmentComponentConfig;var x=null==N?void 0:N.userStoryCardStyles,E=0===D,T=D===B.length-1;return i("div",e({className:k.userStoryCardWrapper,style:y?e(e({},null==x?void 0:x.userStoryCardWrapper),{position:"relative"}):null==x?void 0:x.userStoryCardWrapper},{children:[y&&l(r,{children:B.length>0&&l("div",e({className:k.wrapper},{children:l("div",e({className:k.highlightNavigation},{children:i("div",e({className:k.navigationContainer},{children:[i("span",e({className:k.navCounter},{children:[D+1," of ",B.length]})),i("div",e({className:k.navButtons},{children:[l("button",e({onClick:function(){D>0&&U(function(e){return e-1})},className:k.navButton,disabled:E},{children:l(I,{size:20,className:k.navIcon})})),l("button",e({onClick:function(){D<B.length-1&&U(function(e){return e+1})},className:k.navButton,disabled:T},{children:l(w,{size:20,className:k.navIcon})}))]}))]}))}))}))}),C.map(function(e,t){var i=W(h,!0);return l(V,{isUserStoryCurrentlyUpdated:c,artifactId:d,artifactTitleId:n[t]||"",currentUserStory:e,onUserStoryChange:function(e){b(function(n){return n[t]=e,o([],n,!0)})},parentIndex:"",currentIndex:"".concat(t+1),doNotShowBorderInViewMode:!0,enableDownload:!0,isDiffEditReviewMode:a,showUserStoryDiff:s,updateUserStoryArtifact:u,handleOpenSendDialog:v,handleDownloadUserStory:f,selectedArtifactId:m,isDisplayHighlightControl:y,elementDisplayConfig:h,_resolvedConfig:i,showWrapper:p,actionItemsConfig:S},e.artifactId)})]}))};export{V as StoryCard,F as UserStoryCardWrapper,V as default,z as replaceLearnedTagsWithInfo};
1
+ import{__assign as e,__awaiter as t,__generator as n,__spreadArray as o}from"tslib";import{jsxs as i,jsx as l,Fragment as r}from"react/jsx-runtime";import{useState as a,useRef as s,useEffect as u}from"react";import{ExternalLink as c,Download as d,Share2 as v,Copy as f,LoaderCircle as m,PencilIcon as y,Plus as h,Trash2 as p,Ellipsis as S,ChevronUp as g,ChevronDown as C,ChevronUpIcon as I,ChevronDownIcon as w,Info as b,Bookmark as N}from"lucide-react";import B from"showdown";import{Menu as D,MenuItem as x,Tooltip as U}from"@mui/material";import{v4 as E}from"uuid";import k from"./UserStoryCard.module.css.js";import{formatMarkdown as T,indentMarkdown as A}from"../../utils/helpers.js";import{replaceTitleSection as M}from"../../utils/user-story.utils.js";import _ from"../../shared/AtomicButton.js";import P from"../RichTextEditor/RichTextEditor.js";import H from"../userstory-with-citation/UserStoryWithCitation.js";import{useRequirementAI as R}from"../RequirementAIWrapper/RequirementAIWrapper.js";import{BigEnoughPanel as j}from"../story-screen/BigEnoughPanel.js";import{InlineTitleEditor as L}from"./TitleEditor/TitleEditor.js";function V(t){for(var n,o=[],i=/<learned>(.*?)<\/learned>/g,r=0,a=0;null!==(n=i.exec(t));){var s=n[1],u=n.index;u>r&&o.push(l("span",{children:t.slice(r,u)},"text-pre-".concat(a++))),o.push(l(U,e({title:s,placement:"top"},{children:l(b,{size:16,className:"inline-block mx-1 text-blue-500 hover:text-blue-700 cursor"})}),"tooltip-".concat(E()))),r=i.lastIndex}return r<(null==t?void 0:t.length)&&o.push(l("span",{children:t.slice(r)},"text-post-".concat(a++))),o}function z(t,n,o){var i;if(!t)return{};if(n)return e({},t.parentConfig);var l=e({},t.childConfig);return o&&(null===(i=t.subFeatureOverrides)||void 0===i?void 0:i[o])?e(e({},l),t.subFeatureOverrides[o]):l}var W=function(t){var n,o=t.displayName,r=R().customStyles,a=null===(n=null==r?void 0:r.userStoryCardStyles)||void 0===n?void 0:n.showDisplayName;return i("div",e({className:k.displayName,style:null==a?void 0:a.wrapper},{children:[l(N,{className:k.displayNameIcon,style:null==a?void 0:a.displayNameIcon}),i("span",e({style:null==a?void 0:a.label},{children:[o,":"]}))]}))},O=function(I){var w,b,N,U,F,G,q,Q=I.isUserStoryCurrentlyUpdated,Z=I.artifactId,J=I.artifactTitleId,K=I.parentUserStory,X=I.currentUserStory,Y=I.onUserStoryChange,$=I.parentIndex,ee=I.currentIndex,te=I.enableDownload,ne=I.isDiffEditReviewMode,oe=I.showUserStoryDiff,ie=I.handleDownloadUserStory,le=I.handleOpenSendDialog,re=I.updateUserStoryArtifact,ae=I.selectedArtifactId,se=I.isDisplayHighlightControl,ue=I.elementDisplayConfig,ce=I._resolvedConfig,de=I.showWrapper,ve=void 0!==de&&de,fe=I.actionItemsConfig,me=I.onDelete,ye=I.contextVariant,he=R(),pe=he.searchQueryList,Se=he.citations,ge=he.customStyles,Ce=null==ge?void 0:ge.userStoryCardStyles,Ie=null===(w=null==ge?void 0:ge.userStoryCardStyles)||void 0===w?void 0:w.userStoryEditStyles,we=null===(b=null==ge?void 0:ge.userStoryScreenStyles)||void 0===b?void 0:b.userStoryContentStyles,be=null==Ce?void 0:Ce.progressHeaderStyles,Ne=a(e(e({},structuredClone(X)),{value:T(X.value)||""})),Be=Ne[0],De=Ne[1],xe=a({userStory:!!X.isDefaultEdit}),Ue=xe[0],Ee=xe[1],ke=a(!1),Te=ke[0],Ae=ke[1],Me=a(null),_e=Me[0],Pe=Me[1],He=R(),Re=He.userStory,je=He.customIcons,Le=a(""===$||ae===X.artifactId||!!X.isDefaultOpen),Ve=Le[0],ze=Le[1],We=a(!1);We[0];var Oe=We[1],Fe=a(null),Ge=Fe[0],qe=Fe[1],Qe=a(null),Ze=Qe[0],Je=Qe[1],Ke=a(!1),Xe=Ke[0],Ye=Ke[1],$e=s(null),et=a(!1);et[0];var tt=et[1],nt=s(null);u(function(){Q&&ze(Q)},[Q]),u(function(){De(e(e({},structuredClone(X)),{value:T(X.value)||""}))},[X]),u(function(){pe.length>0?ze(!0):ae&&ze(ae===X.artifactId)},[pe,ae,X.artifactId]);var ot=function(){qe(null)},it=function(){Je(null)},lt=function(){ze(function(e){return!e})};var rt=null!=(null==X?void 0:X.big_enough)&&!Number.isNaN(X.big_enough)&&!!(null==X?void 0:X.big_enough_decision_factors),at=""===$,st=null!=ce?ce:z(ue,at),ut=!ne&&!oe;return u(function(){if(_e){var e=setTimeout(function(){var e=document.getElementById("story-card-".concat(_e));null==e||e.scrollIntoView({behavior:"smooth",block:"start"})},100);return function(){return clearTimeout(e)}}},[_e]),u(function(){X.isDefaultEdit&&Ee(function(t){return e(e({},t),{userStory:!0})})},[X.isDefaultEdit]),i("div",e({className:k.card,style:null==Ce?void 0:Ce.cardStyle,id:"story-card-".concat(X.title),"data-expanded":Ve},{children:[i("div",e({className:k.titleSection,style:null==Ce?void 0:Ce.titleSection},{children:[i("div",e({className:k.titleRow,style:null==Ce?void 0:Ce.titleRow,onClick:lt},{children:[i("div",e({className:k.titleLeft,style:null==Ce?void 0:Ce.titleLeft,onMouseEnter:function(){return tt(!0)},onMouseLeave:function(){return tt(!1)}},{children:[l(W,{displayName:J}),Te&&ut?l(L,{title:X.title,onSave:function(o){return function(o,i){return t(void 0,void 0,void 0,function(){var t,l;return n(this,function(n){try{t=e({},X),X.artifactId===i?t.title=o:t.sub_features=(null===(l=X.sub_features)||void 0===l?void 0:l.map(function(t){return t.artifactId===i?e(e({},t),{title:o}):t}))||[],De(t),Y(t),Ae(!1)}catch(e){console.error("Failed to save title",e)}return[2]})})}(o,X.artifactId)},onCancel:function(){Ae(!1)},inputStyle:null==Ie?void 0:Ie.inlineTitleInput,confirmButtonStyle:null==Ie?void 0:Ie.inlineTitleConfirm,cancelButtonStyle:null==Ie?void 0:Ie.inlineTitleCancel},"inline-title-editor"):i("div",e({className:k.storyTitleWrapper},{children:[l("h2",e({title:X.title,className:k.storyTitle,style:null==Ce?void 0:Ce.storyTitle},{children:V(X.title)}),X.artifactId),l("button",e({type:"button",className:k.titleEditButton,style:null==Ie?void 0:Ie.titleEditButton,onClick:function(e){e.stopPropagation(),Ae(!0),Ve||ze(!0)},"aria-label":"Edit title",title:"Edit title"},{children:l("svg",e({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:l("path",{d:"M8.99998 14.9992H15.75M2.25 14.9992H3.50591C3.87279 14.9992 4.05624 14.9992 4.22887 14.9577C4.38192 14.921 4.52824 14.8604 4.66245 14.7782C4.81382 14.6854 4.94354 14.5557 5.20296 14.2962L14.625 4.87419C15.2463 4.25287 15.2463 3.24551 14.625 2.62419C14.0037 2.00287 12.9963 2.00287 12.375 2.62419L2.95295 12.0462C2.69352 12.3057 2.5638 12.4354 2.47104 12.5868C2.3888 12.721 2.32819 12.8673 2.29145 13.0203C2.25 13.193 2.25 13.3764 2.25 13.7433V14.9992Z",stroke:"#94A3B8","stroke-width":"1.54286","stroke-linecap":"round","stroke-linejoin":"round"})}))}))]}))]})),i("div",e({className:k.titleActions,style:null==Ce?void 0:Ce.titleActions,onClick:function(e){return e.stopPropagation()}},{children:[(st.showProgressPercentage||st.showGapBox)&&ve&&i("div",e({className:k.progressHeader,style:null==be?void 0:be.wrapper},{children:[st.showProgressPercentage&&i("div",e({className:k.progressPercentage,style:null==be?void 0:be.percentage},{children:[null!==(U=null!==(N=null==X?void 0:X.confidenceScore)&&void 0!==N?N:null==st?void 0:st.confidenceValue)&&void 0!==U?U:"0","%"]})),st.showGapBox&&i("div",e({className:k.gapBox,style:null==be?void 0:be.gapBox},{children:[null!==(G=null!==(F=null==X?void 0:X.gapValue)&&void 0!==F?F:null==st?void 0:st.gapBoxValue)&&void 0!==G?G:"2"," ","Gaps"]}))]})),rt&&l(j,{customIcons:null==je?void 0:je.userStoryIcons,customStyles:null==Ce?void 0:Ce.aiReasoningCitaionStyles,currentUserStory:X,panelStyles:null==Ce?void 0:Ce.BigEnoughStyles}),!Ue.userStory&&i(r,{children:[!1!==(null==st?void 0:st.showShareButton)&&l("button",e({className:k.iconButton,style:null==Ce?void 0:Ce.iconButton,onClick:function(e){qe(e.currentTarget)}},{children:l(c,{size:16})})),i(D,e({id:"user-story-share-menu",anchorEl:Ge,open:!!Ge,onClose:function(){return qe(null)},style:null==Ce?void 0:Ce.userStoryShareMenu},{children:[te&&l(x,e({style:null==Ce?void 0:Ce.userStoryMenuItem,onClick:function(){return t(void 0,void 0,void 0,function(){return n(this,function(e){switch(e.label){case 0:return Oe(!0),ie?[4,Promise.all([ie("pdf"),ie("doc")])]:[2];case 1:return e.sent(),Oe(!1),[2]}})})}},{children:i("div",e({ref:$e,className:k.menuItemContent,style:null==Ce?void 0:Ce.menuItemContent},{children:[l(d,{size:16,color:null==Ce?void 0:Ce.menuIconColor}),l("p",e({style:null==Ce?void 0:Ce.menuLabel},{children:"Download"}))]}))})),l(x,e({style:null==Ce?void 0:Ce.userStoryMenuItem,onClick:function(){return t(void 0,void 0,void 0,function(){var t;return n(this,function(n){return t=X,K&&(t=e(e({},X),{value:"".concat(M(null==K?void 0:K.value,X.title)," \n").concat(X.value)})),null==le||le(!0,[t],X.artifactId),ot(),[2]})})}},{children:i("div",e({style:null==Ce?void 0:Ce.menuItemContent,className:k.menuItemContentPadded},{children:[l(v,{size:16,color:null==Ce?void 0:Ce.menuIconColor}),l("p",e({style:null==Ce?void 0:Ce.menuLabel},{children:"Send"}))]}))})),l(x,e({style:null==Ce?void 0:Ce.userStoryMenuItem,onClick:function(){return t(void 0,void 0,void 0,function(){var e,t,o,i,l;return n(this,function(n){switch(n.label){case 0:e=new B.Converter,t=e.makeHtml(T(X.value)||X.value),o=function(e){var t=(new B.Converter).makeHtml(e),n=document.createElement("div");return n.innerHTML=t,n.textContent||n.innerText||""}(T(X.value)||X.value),i=new ClipboardItem({"text/plain":new Blob([o],{type:"text/plain"}),"text/html":new Blob([t],{type:"text/html"})}),n.label=1;case 1:return n.trys.push([1,3,4,5]),[4,navigator.clipboard.write([i])];case 2:return n.sent(),console.log("Copied User Story"),[3,5];case 3:return l=n.sent(),console.error("Failed to copy user story:",l),[3,5];case 4:return ot(),[7];case 5:return[2]}})})}},{children:i("div",e({style:null==Ce?void 0:Ce.menuItemContent,className:k.menuItemContentPadded},{children:[l(f,{size:16,color:null==Ce?void 0:Ce.menuIconColor}),l("p",e({style:null==Ce?void 0:Ce.menuLabel},{children:"Copy"}))]}))}))]}))]}),Ue.userStory&&Ve?l(_,{type:"outline",children:"Cancel",style:null==Ce?void 0:Ce.cancelButton,onClick:function(){var t;null===(t=nt.current)||void 0===t||t.abort(),Ee(function(t){return e(e({},t),{userStory:!1})})}}):l(r,{}),Ue.userStory&&Ve?l(_,{type:"fill",children:Xe?i("span",e({className:k.savingSpinner,style:null==Ce?void 0:Ce.savingSpinner},{children:[l(m,{className:k.spinAnimation,style:null==Ce?void 0:Ce.spinAnimation}),l("span",{children:"Saving..."})]})):"Save",isDisable:Xe,style:Xe?null==Ce?void 0:Ce.savingButton:null==Ce?void 0:Ce.saveButton,onClick:function(){return t(void 0,void 0,void 0,function(){var t;return n(this,function(n){switch(n.label){case 0:return Ye(!0),"userStory"==="userStory"&&(Y(Be),console.log("I am changing RTE editor values",Be)),[4,re(Se,Re,Z,null===(t=nt.current)||void 0===t?void 0:t.signal)];case 1:return n.sent(),Y(e(e({},Be),{isDefaultEdit:!1})),Ee(function(t){return e(e({},t),{userStory:!1})}),Ye(!1),[2]}})})}}):!ne&&!oe&&Ve&&!1!==(null==st?void 0:st.showEditButton)&&l("button",e({className:k.iconButton,style:null==Ce?void 0:Ce.editButton,onClick:function(){return Ee(function(t){return e(e({},t),{userStory:!0})})}},{children:l(y,{color:null==Ce?void 0:Ce.pencilIconColor,size:16})})),at&&Ve&&!ne&&!oe&&!1!==(null==st?void 0:st.showEditButton)&&i("button",e({type:"button",className:k.addSectionButton,style:null==Ie?void 0:Ie.addSectionButton,onClick:function(t){var n,i,l;t.stopPropagation();var r=(null!==(i=null===(n=X.sub_features)||void 0===n?void 0:n.length)&&void 0!==i?i:0)+1,a={artifactId:E(),title:"New Section ".concat(r),value:"Please add details for this section.",section:"subfeature",isDefaultOpen:!0},s=e(e({},X),{sub_features:o(o([],null!==(l=X.sub_features)&&void 0!==l?l:[],!0),[a],!1)});De(s),Y(s),ze(!0),Pe(a.title)},"aria-label":"Add section",title:"Add section"},{children:[l(h,{size:14}),l("span",e({className:k.addSectionLabel},{children:"Add Section"}))]})),!at&&!ne&&!oe&&l("button",e({type:"button",onClick:function(e){e.stopPropagation(),null==me||me()},className:k.iconButton,style:null==Ie?void 0:Ie.deleteButton,"aria-label":"Delete section",title:"Delete section"},{children:l(p,{size:16})})),(null==st?void 0:st.actionItemsButton)&&i(r,{children:[l("span",e({className:k.actionItemBtn,style:null==Ce?void 0:Ce.actionItemBtn,onClick:function(e){e.stopPropagation(),Je(e.currentTarget)}},{children:l(S,{})})),l(D,e({id:"user-story-action-menu",anchorEl:Ze,open:!!Ze,onClose:it,style:null==Ce?void 0:Ce.userStoryShareMenu},{children:null==fe?void 0:fe.items.map(function(t,n){return l(x,e({style:null==Ce?void 0:Ce.userStoryMenuItem,onClick:function(){t.onclick(X),it()}},{children:i("div",e({className:k.menuItemContent,style:e(e({},null==Ce?void 0:Ce.menuItemContent),!t.isActive&&{cursor:"not-allowed",opacity:.5})},{children:[l("span",e({className:k.menuItemIcon,style:null==Ce?void 0:Ce.menuItemIcon},{children:t.icon})),l("p",e({style:null==Ce?void 0:Ce.menuLabel},{children:t.name})),l("span",{className:k.menuItemRight,style:null==Ce?void 0:Ce.menuItemRight})]}))}),"action-item-".concat(n,"-").concat(t.name))})}))]}),l("button",e({type:"button",onClick:function(e){e.stopPropagation(),lt()},style:null==Ce?void 0:Ce.chevronButton,className:k.chevronButton},{children:l(Ve?g:C,{className:k.chevronIcon,color:null==Ce?void 0:Ce.chevronIconColor})}))]}))]})),l("div",{className:k.divider,style:null==Ce?void 0:Ce.dividerStyle})]})),Ve&&l("div",e({className:k.cardContent,style:null==Ce?void 0:Ce.cardContentStyle},{children:i("div",e({className:k.contentInner,style:null==Ce?void 0:Ce.contentInner},{children:[i("div",e({className:k.descriptionSection,style:null==Ce?void 0:Ce.descriptionSection},{children:[l("div",{className:k.justifyBetween,style:null==Ce?void 0:Ce.justifyBetween}),Ue.userStory?l(P,{minHeight:"100%",height:"100%",type:"string",value:T(X.value)||"",handleUpdateState:function(t,n){var o=A(n);De(function(t){return e(e({},t),{value:o||""})})},doNotShowBorderInViewMode:!1,onBlur:function(){},mode:Ue.userStory?"edit":"readOnly"}):l(H,{showUserStoryDiff:oe,isParent:""===$,message:T(X.value)||"",artifactId:X.artifactId,customStyles:we,isDisplayHighlightControl:se,contextVariant:ye})]})),null===(q=Be.sub_features)||void 0===q?void 0:q.map(function(t,n){var i=z(ue,!1,t.artifactId);return l(O,{artifactId:Z,isUserStoryCurrentlyUpdated:Q,artifactTitleId:"".concat(J,"-").concat(String.fromCharCode(65+n)),parentUserStory:X,parentIndex:"".concat($).concat($&&".").concat(ee),currentIndex:"".concat(n+1),doNotShowBorderInViewMode:!1,currentUserStory:t,onUserStoryChange:function(t){return function(t,n){var i=o([],X.sub_features||[],!0);i[t]=n,Y(e(e({},X),{sub_features:i}))}(n,t)},enableDownload:!0,isDiffEditReviewMode:ne,showUserStoryDiff:oe,updateUserStoryArtifact:re,handleDownloadUserStory:ie,handleOpenSendDialog:le,isDisplayHighlightControl:se,elementDisplayConfig:ue,_resolvedConfig:i,actionItemsConfig:fe,onDelete:function(){return function(t){var n=(X.sub_features||[]).filter(function(e,n){return n!==t}),o=e(e({},X),{sub_features:n});De(o),Y(o)}(n)}},t.artifactId)})]}))}))]}))},F=function(t){var n=t.artifactTitleIDs,a=t.isDiffEditReviewMode,s=t.showUserStoryDiff,u=t.updateUserStoryArtifact,c=t.isUserStoryCurrentlyUpdated,d=t.artifactId,v=t.handleOpenSendDialog,f=t.handleDownloadUserStory,m=t.selectedArtifactId,y=t.isDisplayHighlightControl,h=t.elementDisplayConfig,p=t.showWrapper,S=t.actionItemsConfig,g=t.contextVariant,C=R(),b=C.userStory,N=C.setUserStory,B=C.customStyles,D=C.searchQueryList,x=C.currentHighlightIndex,U=C.setCurrentHighlightIndex;C.segmentComponentConfig;var E=null==B?void 0:B.userStoryCardStyles,T=0===x,A=x===D.length-1;return i("div",e({className:k.userStoryCardWrapper,style:y?e(e({},null==E?void 0:E.userStoryCardWrapper),{position:"relative"}):null==E?void 0:E.userStoryCardWrapper},{children:[y&&l(r,{children:D.length>0&&l("div",e({className:k.wrapper},{children:l("div",e({className:k.highlightNavigation},{children:i("div",e({className:k.navigationContainer},{children:[i("span",e({className:k.navCounter},{children:[x+1," of ",D.length]})),i("div",e({className:k.navButtons},{children:[l("button",e({onClick:function(){x>0&&U(function(e){return e-1})},className:k.navButton,disabled:T},{children:l(I,{size:20,className:k.navIcon})})),l("button",e({onClick:function(){x<D.length-1&&U(function(e){return e+1})},className:k.navButton,disabled:A},{children:l(w,{size:20,className:k.navIcon})}))]}))]}))}))}))}),b.map(function(e,t){var i=z(h,!0);return l(O,{isUserStoryCurrentlyUpdated:c,artifactId:d,artifactTitleId:n[t]||"",currentUserStory:e,onUserStoryChange:function(e){N(function(n){return n[t]=e,o([],n,!0)})},parentIndex:"",currentIndex:"".concat(t+1),doNotShowBorderInViewMode:!0,enableDownload:!0,isDiffEditReviewMode:a,showUserStoryDiff:s,updateUserStoryArtifact:u,handleOpenSendDialog:v,handleDownloadUserStory:f,selectedArtifactId:m,isDisplayHighlightControl:y,elementDisplayConfig:h,_resolvedConfig:i,showWrapper:p,actionItemsConfig:S,contextVariant:g},e.artifactId)})]}))};export{O as StoryCard,F as UserStoryCardWrapper,O as default,V as replaceLearnedTagsWithInfo};
2
2
  //# sourceMappingURL=UserStoryCard.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as i}from"tslib";import{jsx as n}from"react/jsx-runtime";import e from"./AiReasoningCitationContent.js";import t from"../../icons/CognitiveDecision.js";import o from"../../../CitationRenderer/CitationRenderer.js";var r=function(){return n("svg",i({width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"#4B5563",strokeWidth:"2.5",style:{verticalAlign:"bottom",marginLeft:"1px"}},{children:n("polyline",{points:"18 15 12 9 6 15"})}))},l=function(){return n("svg",i({width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"#4B5563",strokeWidth:"2.5",style:{verticalAlign:"bottom",marginLeft:"1px"}},{children:n("polyline",{points:"6 9 12 15 18 9"})}))},a=75,c=function(a){var c=a.isSourceHasHighlight,s=a.aiReason,d=a.citationTitle,p=void 0===d?"":d,f=a.customStyles,m=a.customIcons,g=a.onSelectProceed,u=a.isDisableProceedButton,h=a.inlineLabel,v=a.isInlineCitation,x=(s.relevance_score>=75?null==m?void 0:m.highConfidence:null==m?void 0:m.lowConfidence)||n(t,{});return n("span",{children:n(o,{inLineCitation:!0,citationId:"ai-reasoning-".concat(s.id),citationTitle:v?h||"":p||"",citationIcon:v?null:x,defaultExpanded:(null==s?void 0:s.isOpen)||c||!1,citationComponent:n(e,{aiReason:s,customStyles:f,customIcons:m,onSelectProceed:g,isDisableProceedButton:u}),chevronDownComponent:n(l,{}),chevronUpComponent:n(r,{}),styles:{pillButton:i({margin:"0px",padding:"4px 8px",fontSize:"15px",color:"#526eff",cursor:"pointer",verticalAlign:"middle",whiteSpace:"nowrap",display:"inline-flex",alignItems:v?"center":"flex-end",background:"#ffffffff",fontWeight:"700",gap:"1.5px",border:"none"},null==f?void 0:f.aiReasoningPill),citationContent:{width:"100%",background:"transparent",minHeight:"10px",height:"fit-content"}}})})};export{a as SHOW_CONFIDENCE_SCORE_THRESHOLD_IN_AI_REASONING,c as default};
1
+ import{__assign as i}from"tslib";import{jsx as n}from"react/jsx-runtime";import e from"./AiReasoningCitationContent.js";import t from"../../icons/CognitiveDecision.js";import o from"../../../CitationRenderer/CitationRenderer.js";var l=function(){return n("svg",i({width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"#4B5563",strokeWidth:"2.5",style:{verticalAlign:"bottom",marginLeft:"1px"}},{children:n("polyline",{points:"18 15 12 9 6 15"})}))},r=function(){return n("svg",i({width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"#4B5563",strokeWidth:"2.5",style:{verticalAlign:"bottom",marginLeft:"1px"}},{children:n("polyline",{points:"6 9 12 15 18 9"})}))},a=75,c=function(a){var c=a.isSourceHasHighlight,s=a.aiReason,d=a.citationTitle,p=void 0===d?"":d,f=a.customStyles,u=a.customIcons,m=a.onSelectProceed,g=a.isDisableProceedButton,h=a.inlineLabel,v=a.isInlineCitation,x=(s.relevance_score>=75?null==u?void 0:u.highConfidence:null==u?void 0:u.lowConfidence)||n(t,{});return n("span",{children:n(o,{inLineCitation:!0,citationId:"ai-reasoning-".concat(s.id),citationTitle:v?h||"":p||"",citationIcon:v?null:x,defaultExpanded:(null==s?void 0:s.isOpen)||c||!1,citationComponent:n(e,{aiReason:s,customStyles:f,customIcons:u,onSelectProceed:m,isDisableProceedButton:g}),chevronDownComponent:v?null:n(r,{}),chevronUpComponent:v?null:n(l,{}),styles:{pillButton:i({margin:"0px",padding:v?"0":"4px 8px",fontSize:"15px",color:"#526eff",cursor:"pointer",verticalAlign:"middle",whiteSpace:"nowrap",display:"inline-flex",alignItems:v?"center":"flex-end",background:"#ffffffff",fontWeight:"700",gap:"1.5px",border:"none"},null==f?void 0:f.aiReasoningPill),citationContent:{width:"100%",background:"transparent",minHeight:"10px",height:"fit-content"}}})})};export{a as SHOW_CONFIDENCE_SCORE_THRESHOLD_IN_AI_REASONING,c as default};
2
2
  //# sourceMappingURL=AiReasoningCitation.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as i}from"tslib";import{jsx as n,jsxs as o,Fragment as e}from"react/jsx-runtime";import a from"../../icons/AiReasoningIcon.js";import l from"./AIReasonAccordion.js";import t from"../../icons/ReasoningBulbIcon.js";import{AiReasonMarkdownWrapper as d}from"./AiReasonMarkdownWrapper.js";import s from"../../icons/AiGapIcon.js";import{useState as r}from"react";import{ChevronUp as c,ChevronDown as v}from"lucide-react";import u from"./AiReasoningCitationContent.module.css.js";import{renderAIConfidenceDisplay as C}from"../../shared/CitationAIConfidenceDisplay.js";import{useRequirementAI as m}from"../RequirementAIWrapper/RequirementAIWrapper.js";var p=function(p){var g,h,f,b,y,R,w,S,I,N,A,B,k,x,D,E,_,M,O,j,W,F,G,H=p.label,P=p.aiReason,T=p.scenario,U=p.customStyles,V=p.customIcons,q=p.cognitiveDecisionHeaders,L=p.onSelectProceed,z=p.isDisableProceedButton,J=p.big_enough_block,K=p.isSegmentExplanation,Q=p.handleViewExample,X=p.handleViewGlossary,Y=p.isUpdatedSegment,Z=m().aiReasoningAccordionOpenStates,$=(null==V?void 0:V.aireasonIcon)||n(a,{}),ii=(null==V?void 0:V.reasoningIcon)||n(t,{}),ni=(null==V?void 0:V.gapIcon)||n(s,{}),oi=r(null!==(g=null==Z?void 0:Z.isBottomComponentDefaultOpen)&&void 0!==g&&g),ei=oi[0],ai=oi[1];return o("div",i({className:"".concat(u.container," ").concat("riskSideBar"===T?"":u.containerBordered),style:null===(h=null==U?void 0:U.aiReasoningContent)||void 0===h?void 0:h.container},{children:[n("div",i({className:"".concat((null==P?void 0:P.explanation)&&"riskSideBar"!==T?"":u.explanationDivider),style:null===(f=null==U?void 0:U.aiReasoningContent)||void 0===f?void 0:f.explanationDivider},{children:(null==P?void 0:P.explanation)&&n(l,{icon:n(e,{}),title:"Explanation",subTitle:"",customStyles:null==U?void 0:U.aiReasoningAccordion,content:n(d,{label:H,message:P.explanation,isExpandableOrderedListEnabled:!0,customStyles:null==U?void 0:U.aiReasoningMarkdown,citationStyles:{webCitation:null==U?void 0:U.webCitation,stormeeCitation:null==U?void 0:U.stormeeCitation,waveformCitation:null==U?void 0:U.waveformCitation,imageCitation:null==U?void 0:U.imageCitation,fileCitation:null==U?void 0:U.fileCitation,appModCitation:null==U?void 0:U.appModCitation,rcaCitation:null==U?void 0:U.rcaCitation,readFileCitation:null==U?void 0:U.readFileCitation,loadingCitations:null==U?void 0:U.loadingCitations,chatCitation:null==U?void 0:U.chatCitation,bigEnoughCitation:null==U?void 0:U.bigEnoughCitation},customIcons:V,onSelectProceed:L,isDisableProceedButton:z,big_enough_block:J}),isSegmentExplanation:K,scenario:T,handleViewExample:Q,handleViewGlossary:X,isUpdatedSegment:Y})})),"riskSideBar"!==T&&o("div",i({onClick:function(){(null==Z?void 0:Z.isBottomComponentCollapsed)&&ai(function(i){return!i})},className:"".concat(u.headerBar," ").concat("riskSideBar"===T?"":u.headerBarRounded),style:null===(b=null==U?void 0:U.aiReasoningContent)||void 0===b?void 0:b.headerBar},{children:[o("div",i({className:u.headerBrand,style:null===(y=null==U?void 0:U.aiReasoningContent)||void 0===y?void 0:y.headerBrand},{children:[$,n("p",{children:null!==(R=null==q?void 0:q.mainHeader)&&void 0!==R?R:"Cognitive Decisioning AI"})]})),o("div",i({className:u.headerScore,style:null===(w=null==U?void 0:U.aiReasoningContent)||void 0===w?void 0:w.headerScore},{children:[!isNaN(null==P?void 0:P.relevance_score)&&C(P.relevance_score,P.relevance_score_diff,null===(S=null==U?void 0:U.aiReasoningContent)||void 0===S?void 0:S.confidenceDisplay,V),(null==Z?void 0:Z.isBottomComponentCollapsed)&&n("button",i({className:u.chevronWrapper,style:null===(I=null==U?void 0:U.aiReasoningContent)||void 0===I?void 0:I.chevronWrapper},{children:ei?n(c,{className:null==u?void 0:u.chevronIcon,style:null===(N=null==U?void 0:U.aiReasoningContent)||void 0===N?void 0:N.chevronIcon}):n(v,{className:null==u?void 0:u.chevronIcon,style:null===(A=null==U?void 0:U.aiReasoningContent)||void 0===A?void 0:A.chevronIcon})}))]}))]})),"riskSideBar"!==T&&ei&&n("div",i({className:u.bodyRow,style:i({width:"100%"},null===(B=null==U?void 0:U.aiReasoningContent)||void 0===B?void 0:B.bodyRow)},{children:o("div",i({className:"flex flex-col ".concat(u.bodyFull)},{children:[n(l,{icon:n("div",i({className:u.iconWrapper,style:null===(k=null==U?void 0:U.aiReasoningContent)||void 0===k?void 0:k.iconWrapper},{children:ii})),isUpdatedSegment:Y,title:null!==(x=null==q?void 0:q.decisionHeader)&&void 0!==x?x:"Decision Making Factors",subTitle:"",customStyles:null==U?void 0:U.aiReasoningAccordion,alwaysOpen:null===(D=null==Z?void 0:Z.reasoningAlwaysOpen)||void 0===D||D,defaultOpen:null===(E=null==Z?void 0:Z.reasoningDefaultOpen)||void 0===E||E,content:n(d,{message:(null==P?void 0:P.reason)||"No reasoning available.",customStyles:null==U?void 0:U.aiReasoningMarkdown,citationStyles:{webCitation:null==U?void 0:U.webCitation,stormeeCitation:null==U?void 0:U.stormeeCitation,waveformCitation:null==U?void 0:U.waveformCitation,imageCitation:null==U?void 0:U.imageCitation,fileCitation:null==U?void 0:U.fileCitation,appModCitation:null==U?void 0:U.appModCitation,rcaCitation:null==U?void 0:U.rcaCitation,readFileCitation:null==U?void 0:U.readFileCitation,loadingCitations:null==U?void 0:U.loadingCitations,chatCitation:null==U?void 0:U.chatCitation,bigEnoughCitation:null==U?void 0:U.bigEnoughCitation},customIcons:V,big_enough_block:J})}),n("div",{className:u.divider,style:null===(_=null==U?void 0:U.aiReasoningContent)||void 0===_?void 0:_.divider}),n(l,{icon:n("div",i({className:u.iconWrapper,style:null===(M=null==U?void 0:U.aiReasoningContent)||void 0===M?void 0:M.iconWrapper},{children:ni})),title:null!==(O=null==q?void 0:q.gapHeader)&&void 0!==O?O:"Gaps in Decision",subTitle:"",customStyles:null==U?void 0:U.aiReasoningAccordion,alwaysOpen:null!==(j=null==Z?void 0:Z.gapAlwaysOpen)&&void 0!==j&&j,defaultOpen:null!==(W=null==Z?void 0:Z.gapDefaultOpen)&&void 0!==W&&W,isUpdatedSegment:Y,content:n(d,{message:(F=P.relevance_score,G=(null==P?void 0:P.gap)||"No gap available.",F<100?"The decision strength is ".concat(F,"% because: \n").concat(G):G),customStyles:null==U?void 0:U.aiReasoningMarkdown,citationStyles:{webCitation:null==U?void 0:U.webCitation,stormeeCitation:null==U?void 0:U.stormeeCitation,waveformCitation:null==U?void 0:U.waveformCitation,imageCitation:null==U?void 0:U.imageCitation,fileCitation:null==U?void 0:U.fileCitation,appModCitation:null==U?void 0:U.appModCitation,rcaCitation:null==U?void 0:U.rcaCitation,readFileCitation:null==U?void 0:U.readFileCitation,loadingCitations:null==U?void 0:U.loadingCitations,chatCitation:null==U?void 0:U.chatCitation,bigEnoughCitation:null==U?void 0:U.bigEnoughCitation},customIcons:V,big_enough_block:J}),className:u.gapAccordion})]}))}))]}))};export{p as default};
1
+ import{__assign as i}from"tslib";import{jsx as n,jsxs as o,Fragment as e}from"react/jsx-runtime";import a from"../../icons/AiReasoningIcon.js";import l from"./AIReasonAccordion.js";import t from"../../icons/ReasoningBulbIcon.js";import{AiReasonMarkdownWrapper as d}from"./AiReasonMarkdownWrapper.js";import s from"../../icons/AiGapIcon.js";import{useState as r}from"react";import{ChevronUp as c,ChevronDown as v}from"lucide-react";import u from"./AiReasoningCitationContent.module.css.js";import{renderAIConfidenceDisplay as C}from"../../shared/CitationAIConfidenceDisplay.js";import{useRequirementAI as m}from"../RequirementAIWrapper/RequirementAIWrapper.js";var p=function(p){var g,h,f,b,y,R,w,S,I,N,A,B,k,x,D,E,_,M,O,j,W,F,G,H=p.label,P=p.aiReason,T=p.scenario,U=p.customStyles,V=p.customIcons,q=p.cognitiveDecisionHeaders,L=p.onSelectProceed,z=p.isDisableProceedButton,J=p.big_enough_block,K=p.isSegmentExplanation,Q=p.handleViewExample,X=p.handleViewGlossary,Y=p.isUpdatedSegment,Z=m().aiReasoningAccordionOpenStates,$=(null==V?void 0:V.aireasonIcon)||n(a,{}),ii=(null==V?void 0:V.reasoningIcon)||n(t,{}),ni=(null==V?void 0:V.gapIcon)||n(s,{}),oi=r(null!==(g=null==Z?void 0:Z.isBottomComponentDefaultOpen)&&void 0!==g&&g),ei=oi[0],ai=oi[1];return o("div",i({className:"".concat(u.container," ").concat("riskSideBar"===T?"":u.containerBordered),style:null===(h=null==U?void 0:U.aiReasoningContent)||void 0===h?void 0:h.container},{children:[(null==P?void 0:P.explanation)&&n("div",i({className:"".concat((null==P?void 0:P.explanation)&&"riskSideBar"!==T?"":u.explanationDivider),style:null===(f=null==U?void 0:U.aiReasoningContent)||void 0===f?void 0:f.explanationDivider},{children:n(l,{icon:n(e,{}),title:"Explanation",subTitle:"",customStyles:null==U?void 0:U.aiReasoningAccordion,content:n(d,{label:H,message:P.explanation,isExpandableOrderedListEnabled:!0,customStyles:null==U?void 0:U.aiReasoningMarkdown,citationStyles:{webCitation:null==U?void 0:U.webCitation,stormeeCitation:null==U?void 0:U.stormeeCitation,waveformCitation:null==U?void 0:U.waveformCitation,imageCitation:null==U?void 0:U.imageCitation,fileCitation:null==U?void 0:U.fileCitation,appModCitation:null==U?void 0:U.appModCitation,rcaCitation:null==U?void 0:U.rcaCitation,readFileCitation:null==U?void 0:U.readFileCitation,loadingCitations:null==U?void 0:U.loadingCitations,chatCitation:null==U?void 0:U.chatCitation,bigEnoughCitation:null==U?void 0:U.bigEnoughCitation},customIcons:V,onSelectProceed:L,isDisableProceedButton:z,big_enough_block:J}),isSegmentExplanation:K,scenario:T,handleViewExample:Q,handleViewGlossary:X,isUpdatedSegment:Y})})),"riskSideBar"!==T&&o("div",i({onClick:function(){(null==Z?void 0:Z.isBottomComponentCollapsed)&&ai(function(i){return!i})},className:"".concat(u.headerBar," ").concat("riskSideBar"===T?"":u.headerBarRounded),style:null===(b=null==U?void 0:U.aiReasoningContent)||void 0===b?void 0:b.headerBar},{children:[o("div",i({className:u.headerBrand,style:null===(y=null==U?void 0:U.aiReasoningContent)||void 0===y?void 0:y.headerBrand},{children:[$,n("p",{children:null!==(R=null==q?void 0:q.mainHeader)&&void 0!==R?R:"Cognitive Decisioning AI"})]})),o("div",i({className:u.headerScore,style:null===(w=null==U?void 0:U.aiReasoningContent)||void 0===w?void 0:w.headerScore},{children:[!isNaN(null==P?void 0:P.relevance_score)&&C(P.relevance_score,P.relevance_score_diff,null===(S=null==U?void 0:U.aiReasoningContent)||void 0===S?void 0:S.confidenceDisplay,V),(null==Z?void 0:Z.isBottomComponentCollapsed)&&n("button",i({className:u.chevronWrapper,style:null===(I=null==U?void 0:U.aiReasoningContent)||void 0===I?void 0:I.chevronWrapper},{children:ei?n(c,{className:null==u?void 0:u.chevronIcon,style:null===(N=null==U?void 0:U.aiReasoningContent)||void 0===N?void 0:N.chevronIcon}):n(v,{className:null==u?void 0:u.chevronIcon,style:null===(A=null==U?void 0:U.aiReasoningContent)||void 0===A?void 0:A.chevronIcon})}))]}))]})),"riskSideBar"!==T&&ei&&n("div",i({className:u.bodyRow,style:i({width:"100%"},null===(B=null==U?void 0:U.aiReasoningContent)||void 0===B?void 0:B.bodyRow)},{children:o("div",i({className:"flex flex-col ".concat(u.bodyFull)},{children:[n(l,{icon:n("div",i({className:u.iconWrapper,style:null===(k=null==U?void 0:U.aiReasoningContent)||void 0===k?void 0:k.iconWrapper},{children:ii})),isUpdatedSegment:Y,title:null!==(x=null==q?void 0:q.decisionHeader)&&void 0!==x?x:"Decision Making Factors",subTitle:"",customStyles:null==U?void 0:U.aiReasoningAccordion,alwaysOpen:null===(D=null==Z?void 0:Z.reasoningAlwaysOpen)||void 0===D||D,defaultOpen:null===(E=null==Z?void 0:Z.reasoningDefaultOpen)||void 0===E||E,content:n(d,{message:(null==P?void 0:P.reason)||"No reasoning available.",customStyles:null==U?void 0:U.aiReasoningMarkdown,citationStyles:{webCitation:null==U?void 0:U.webCitation,stormeeCitation:null==U?void 0:U.stormeeCitation,waveformCitation:null==U?void 0:U.waveformCitation,imageCitation:null==U?void 0:U.imageCitation,fileCitation:null==U?void 0:U.fileCitation,appModCitation:null==U?void 0:U.appModCitation,rcaCitation:null==U?void 0:U.rcaCitation,readFileCitation:null==U?void 0:U.readFileCitation,loadingCitations:null==U?void 0:U.loadingCitations,chatCitation:null==U?void 0:U.chatCitation,bigEnoughCitation:null==U?void 0:U.bigEnoughCitation},customIcons:V,big_enough_block:J})}),n("div",{className:u.divider,style:null===(_=null==U?void 0:U.aiReasoningContent)||void 0===_?void 0:_.divider}),n(l,{icon:n("div",i({className:u.iconWrapper,style:null===(M=null==U?void 0:U.aiReasoningContent)||void 0===M?void 0:M.iconWrapper},{children:ni})),title:null!==(O=null==q?void 0:q.gapHeader)&&void 0!==O?O:"Gaps in Decision",subTitle:"",customStyles:null==U?void 0:U.aiReasoningAccordion,alwaysOpen:null!==(j=null==Z?void 0:Z.gapAlwaysOpen)&&void 0!==j&&j,defaultOpen:null!==(W=null==Z?void 0:Z.gapDefaultOpen)&&void 0!==W&&W,isUpdatedSegment:Y,content:n(d,{message:(F=P.relevance_score,G=(null==P?void 0:P.gap)||"No gap available.",F<100?"The decision strength is ".concat(F,"% because: \n").concat(G):G),customStyles:null==U?void 0:U.aiReasoningMarkdown,citationStyles:{webCitation:null==U?void 0:U.webCitation,stormeeCitation:null==U?void 0:U.stormeeCitation,waveformCitation:null==U?void 0:U.waveformCitation,imageCitation:null==U?void 0:U.imageCitation,fileCitation:null==U?void 0:U.fileCitation,appModCitation:null==U?void 0:U.appModCitation,rcaCitation:null==U?void 0:U.rcaCitation,readFileCitation:null==U?void 0:U.readFileCitation,loadingCitations:null==U?void 0:U.loadingCitations,chatCitation:null==U?void 0:U.chatCitation,bigEnoughCitation:null==U?void 0:U.bigEnoughCitation},customIcons:V,big_enough_block:J}),className:u.gapAccordion})]}))}))]}))};export{p as default};
2
2
  //# sourceMappingURL=AiReasoningCitationContent.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as t}from"tslib";import{jsx as n}from"react/jsx-runtime";import{ScannedDocCitation as i}from"@e-llm-studio/citation";import o from"../../../RequirementAiCitations/AiReasoning/components/icons/DocumentCitationIcon.js";import e from"../../../CitationRenderer/CitationRenderer.js";var r=function(r){var a,c=r.title,l=r.citation,m=r.customIcons,s=r.customStyles,u=l.customMetadata,d=null!==(a=null==m?void 0:m.ScannedDocumentIcon)&&void 0!==a?a:n(o,{});return n(e,{inLineCitation:!0,citationTitle:c,citationId:"scanned-doc-".concat(l.citation_number),citationComponent:n(i,{pages:null==u?void 0:u.value,subHeadingText:null==u?void 0:u.artifact_title,height:"400px"}),chevronDownComponent:d,chevronUpComponent:d,styles:{pillButton:t({fontSize:"14px",margin:"0px",background:"#ffffff",color:"#526eff",cursor:"pointer",verticalAlign:"middle",whiteSpace:"nowrap",display:"inline-flex",alignItems:"center",border:"none"},null==s?void 0:s.pill),citationContent:t({width:"100%",background:"transparent",minHeight:"10px",height:"fit-content"},null==s?void 0:s.content)}})};export{r as default};
1
+ import{__assign as t}from"tslib";import{jsx as n}from"react/jsx-runtime";import{ScannedDocCitation as i}from"@e-llm-studio/citation";import o from"../../../CitationRenderer/CitationRenderer.js";import e from"../../../RequirementAiCitations/AiReasoning/components/icons/DocumentCitationIcon.js";var r=function(r){var a,c=r.title,l=r.citation,m=r.customIcons,s=r.customStyles,u=l.customMetadata,d=null!==(a=null==m?void 0:m.ScannedDocumentIcon)&&void 0!==a?a:n(e,{});return n(o,{inLineCitation:!0,citationTitle:c,citationId:"scanned-doc-".concat(l.citation_number),citationComponent:n(i,{pages:null==u?void 0:u.value,subHeadingText:null==u?void 0:u.artifact_title,height:"400px"}),chevronDownComponent:d,chevronUpComponent:d,styles:{pillButton:t({fontSize:"14px",margin:"0px",background:"#ffffff",color:"#526eff",cursor:"pointer",verticalAlign:"middle",whiteSpace:"nowrap",display:"inline-flex",alignItems:"center",border:"none"},null==s?void 0:s.pill),citationContent:t({width:"100%",background:"transparent",minHeight:"10px",height:"fit-content"},null==s?void 0:s.content)}})};export{r as default};
2
2
  //# sourceMappingURL=ScannedCitationRenderer.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e,__awaiter as n,__generator as t}from"tslib";import{jsxs as o,jsx as a}from"react/jsx-runtime";import i,{useContext as r,useMemo as l}from"react";import{Loader2 as s,ChevronDown as c}from"lucide-react";import{cn as m}from"../../../UserStoryImport/lib/cn.js";import d from"./segment.module.css.js";import u from"./ExampleComponentWrapper.js";import p from"../ai-reasoning/AiReasoningCitationContent.js";import g from"./SegmentLoader.js";import"./segment-common.css.js";import{MarkdownStateContext as v}from"../../store/markdown-context.js";var f=function(f){var h=f.id,y=void 0===h?"Segment":h,S=f.label,C=f.children,x=f.segmentUUID;f.decisionStrength;var b=f.aiReason,j=f.customStyles,E=f.customIcons,I=f.aiReasoningCitationCustomStyles,N=f.segmentExampleComponent,w=f.handleViewGlossary,R=f.isUpdatedSegment,U=f.onOpen,k=r(v),L=k.citationsMetadata,V=k.updateCitationsMetadata;console.log("citation metadata ",L);var W=i.useState(!1),A=W[0],G=W[1],M=l(function(){return L.get(x)},[L,x]),P=l(function(){return(null==M?void 0:M.open)||!1},[M]),z=l(function(){return M&&"loading"===M.state},[M]);return o("div",e({className:"".concat(d.segmentWrapper),style:e(e({},null==j?void 0:j.segmentWrapper),{display:"inline-flex",verticalAlign:"middle"})},{children:[o("div",e({className:"segment-".concat(y,"-container segmentContainer ").concat(R?"updatedSegmentContainer":""),style:e({},null==j?void 0:j.container)},{children:[a("span",e({className:"segment-".concat(y," segmentLabel ").concat(R?"updatedSegmentLabel":""),style:e({},null==j?void 0:j.label)},{children:R?C:S})),a("button",e({className:"".concat(d.segmentExplanationButtonContainer),style:e({},null==j?void 0:j.buttonContainer),onClick:function(){return n(void 0,void 0,void 0,function(){var n;return t(this,function(t){switch(t.label){case 0:if(n=!P,G(!1),console.log("citation metadata::",n,b),!n||(null==b?void 0:b.reason))return[3,5];V(x,function(t){if(t){var o=e({},t);return o.state="loading",o}return{open:n,state:"loading"}}),t.label=1;case 1:return t.trys.push([1,,3,4]),console.log("citation metadata:: onopen"),[4,null==U?void 0:U()];case 2:return t.sent(),[3,4];case 3:return V(x,function(t){if(t){var o=e({},t);return o.state="ready",o.open=n,o}return{open:n,state:"ready"}}),[7];case 4:return[3,6];case 5:console.log("citation metadata:: else block"),V(x,function(t){if(t){var o=e({},t);return o.open=n,o}return{open:n,state:z?"loading":"ready"}}),t.label=6;case 6:return[2]}})})}},{children:z?a(s,{size:16,className:d.spinner}):a(c,{className:m(R&&d.updatedChevronIcon,d.cheveronIcon,P&&d.cheveronIconRotated),style:e({},null==j?void 0:j.cheveronIcon)})}))]})),A&&!R?a("div",e({className:d.explanationPanel},{children:a(u,{label:null!=S?S:"",segmentExampleComponent:N,customStyles:null==j?void 0:j.segmentExample,handleCancelExample:function(){G(!1)}})})):P&&(z?a(g,{customStyles:null==j?void 0:j.loadingSkeleton}):a("div",e({className:d.explanationPanel},{children:a(p,{aiReason:b,customStyles:I,customIcons:E,isSegmentExplanation:!0,handleViewGlossary:w?function(){V(x,function(n){if(n){var t=e({},n);return t.open=!1,t}return{open:!1,state:z?"loading":"ready"}}),null==w||w(y)}:void 0,handleViewExample:N?function(){G(!0)}:void 0,isUpdatedSegment:R})})))]}))};export{f as default};
1
+ import{__assign as e,__awaiter as n,__generator as t}from"tslib";import{jsxs as o,jsx as a,Fragment as i}from"react/jsx-runtime";import l,{useContext as r,useMemo as s}from"react";import{ArrowUpRight as d,X as c}from"lucide-react";import{cn as m}from"../../../UserStoryImport/lib/cn.js";import u from"./segment.module.css.js";import p from"./ExampleComponentWrapper.js";import g from"../ai-reasoning/AiReasoningCitationContent.js";import v from"./SegmentLoader.js";import"./segment-common.css.js";import{MarkdownStateContext as f}from"../../store/markdown-context.js";import h from"@mui/material/Dialog";import y from"@mui/material/IconButton";var b=function(b){var C,S=b.id,x=void 0===S?"Segment":S,E=b.label,w=b.children,I=b.segmentUUID;b.decisionStrength;var j=b.aiReason,L=b.customStyles,N=b.customIcons,B=b.aiReasoningCitationCustomStyles,R=b.segmentExampleComponent,U=b.handleViewGlossary,W=b.isUpdatedSegment,k=b.onOpen,A=r(f),V=A.citationsMetadata,G=A.updateCitationsMetadata;console.log("citation metadata ",V);var M=l.useState(!1),z=M[0],D=M[1],T=s(function(){return V.get(I)},[V,I]),O=s(function(){return(null==T?void 0:T.open)||!1},[T]),q=s(function(){return T&&"loading"===T.state},[T]),F=function(){return n(void 0,void 0,void 0,function(){var n;return t(this,function(t){switch(t.label){case 0:if(n=!O,D(!1),console.log("citation metadata::",n,j),!n||(null==j?void 0:j.reason))return[3,5];G(I,function(t){if(t){var o=e({},t);return o.state="loading",o}return{open:n,state:"loading"}}),t.label=1;case 1:return t.trys.push([1,,3,4]),console.log("citation metadata:: onopen"),[4,null==k?void 0:k()];case 2:return t.sent(),[3,4];case 3:return G(I,function(t){if(t){var o=e({},t);return o.state="ready",o.open=n,o}return{open:n,state:"ready"}}),[7];case 4:return[3,6];case 5:console.log("citation metadata:: else block"),G(I,function(t){if(t){var o=e({},t);return o.open=n,o}return{open:n,state:q?"loading":"ready"}}),t.label=6;case 6:return[2]}})})};return o("div",e({className:"".concat(u.segmentWrapper),style:e(e({},null==L?void 0:L.segmentWrapper),{display:"inline-flex",verticalAlign:"middle"})},{children:[o("div",e({className:"segment-".concat(x,"-container segmentContainer ").concat(W?"updatedSegmentContainer":""),style:e({},null==L?void 0:L.container)},{children:[a("span",e({className:"segment-".concat(x," segmentLabel ").concat(W?"updatedSegmentLabel":""),style:e({},null==L?void 0:L.label)},{children:W?w:E})),a("button",e({className:"".concat(u.segmentExplanationButtonContainer),style:e({},null==L?void 0:L.buttonContainer),onClick:F},{children:a(d,{className:m(W&&u.updatedChevronIcon,u.cheveronIcon),style:e({},null==L?void 0:L.cheveronIcon)})}))]})),O&&a(h,e({open:!0,onClose:F,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",maxWidth:"xl",container:document.getElementById("#root")},{children:o("div",e({style:{minWidth:"50vw",paddingLeft:16,paddingRight:16,paddingTop:24,paddingBottom:24}},{children:[o("div",e({style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:16}},{children:[a("span",e({className:"segmentLabel ".concat(W?"updatedSegmentLabel":""),style:{fontSize:18,fontWeight:600}},{children:W?"SEGMENT VALUE":E})),a(y,e({"aria-label":"close",onClick:F,sx:function(e){return{position:"absolute",right:8,top:8,color:e.palette.grey[500]}}},{children:a(c,{size:24})}))]})),q?a(v,{customStyles:null==L?void 0:L.loadingSkeleton}):o(i,{children:[z&&!W&&a("div",e({style:{marginBottom:16}},{children:a(p,{label:null!=E?E:"",segmentExampleComponent:R,customStyles:e(e({},null==L?void 0:L.segmentExample),{exampleContainer:e(e({},null===(C=null==L?void 0:L.segmentExample)||void 0===C?void 0:C.exampleContainer),{width:"100%"})}),handleCancelExample:function(){D(!1)}})})),W&&a("div",e({style:{marginBottom:16}},{children:a("div",e({className:"segment-".concat(x,"-container segmentContainer updatedSegmentContainer"),style:e({},null==L?void 0:L.container)},{children:a("span",e({className:"segment-".concat(x," segmentLabel updatedSegmentLabel"),style:e({},null==L?void 0:L.label)},{children:w}))}))})),a("div",{children:a(g,{aiReason:j,customStyles:e(e({},B),{aiReasoningContent:e(e({},null==B?void 0:B.aiReasoningContent),{headerBar:{width:"auto"}}),aiReasoningAccordion:{header:{width:"auto"}}}),customIcons:N,isSegmentExplanation:!0,handleViewGlossary:U?function(){G(I,function(n){if(n){var t=e({},n);return t.open=!1,t}return{open:!1,state:q?"loading":"ready"}}),null==U||U(x)}:void 0,handleViewExample:R?function(){D(!0)}:void 0,isUpdatedSegment:W})})]})]}))}))]}))};export{b as default};
2
2
  //# sourceMappingURL=Segment.js.map
@@ -1,2 +1,2 @@
1
- var e=".segmentContainer{align-items:center;background-color:#eff6ff;border:1px dashed #bfdbfe;border-radius:4px;color:#3b82f6;display:flex;gap:8px;padding:8px;width:fit-content}.updatedSegmentContainer{background-color:#f0fdf4;border:1px solid #bbf7d0;color:#16a34a}.segmentLabel{color:#3b82f6;font-size:14px;font-weight:600;line-height:21px;text-transform:uppercase}.updatedSegmentLabel{color:#16a34a}";!function(){if("undefined"==typeof document)return;const t=document.createElement("style");t.type="text/css";const n=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;n&&t.setAttribute("nonce",n),t.appendChild(document.createTextNode(e));const o=document.head||document.getElementsByTagName("head")[0]||document.documentElement;o&&o.appendChild(t)}();export{e as default};
1
+ var e=".segmentContainer{align-items:center;background-color:#eff6ff;border:1px dashed #bfdbfe;border-radius:4px;color:#3b82f6;display:flex;gap:8px;padding:8px;width:fit-content}.updatedSegmentContainer{align-items:start;background-color:#f0fdf4;border:1px solid #bbf7d0;color:#16a34a}.segmentLabel{color:#3b82f6;font-size:14px;font-weight:600;line-height:21px;text-transform:uppercase}.updatedSegmentLabel{color:#16a34a}.glow{box-shadow:0 4px 12px #deea611a}";!function(){if("undefined"==typeof document)return;const t=document.createElement("style");t.type="text/css";const n=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;n&&t.setAttribute("nonce",n),t.appendChild(document.createTextNode(e));const o=document.head||document.getElementsByTagName("head")[0]||document.documentElement;o&&o.appendChild(t)}();export{e as default};
2
2
  //# sourceMappingURL=segment-common.css.js.map
@@ -1,2 +1,2 @@
1
- var e={segmentWrapper:"segment-module_segmentWrapper__PVOuq",segmentButtonContainer:"segment-module_segmentButtonContainer__X76sx",cheveronIcon:"segment-module_cheveronIcon__1njFy",updatedChevronIcon:"segment-module_updatedChevronIcon__8vN-t",cheveronIconRotated:"segment-module_cheveronIconRotated__qDYj7",segmentPopup:"segment-module_segmentPopup__YcHor",explanationPanel:"segment-module_explanationPanel__7YlpU",exampleWrapper:"segment-module_exampleWrapper__ptZzj",uppercase:"segment-module_uppercase__hjgxG",exampleContainer:"segment-module_exampleContainer__9tMXx",exampleHeader:"segment-module_exampleHeader__9P11O",loaderWrapper:"segment-module_loaderWrapper__SwIof",loaderContainer:"segment-module_loaderContainer__5Mhyz",loaderHeader:"segment-module_loaderHeader__J2JnY",skeleton:"segment-module_skeleton__2uZEf",pulse:"segment-module_pulse__A17cR",title:"segment-module_title__fW93U",icon:"segment-module_icon__Dvee3",lineFull:"segment-module_lineFull__MMmOD",line90:"segment-module_line90__OFStl",line75:"segment-module_line75__9r6Xp",line60:"segment-module_line60__bLRec",exampleHeaderText:"segment-module_exampleHeaderText__MWMG0",cancelButton:"segment-module_cancelButton__-F5aZ",spinner:"segment-module_spinner__kRnWD",spin:"segment-module_spin__MV6y5"};!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const n=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;n&&e.setAttribute("nonce",n),e.appendChild(document.createTextNode(".segment-module_segmentWrapper__PVOuq{display:inline-flex;gap:8px;position:relative;vertical-align:middle}.segment-module_segmentButtonContainer__X76sx{background-color:initial;border:none;cursor:pointer;padding:0}.segment-module_cheveronIcon__1njFy{color:#3b82f6;height:16px;transition:all .2s ease-in-out;width:16px}.segment-module_updatedChevronIcon__8vN-t{color:#16a34a}.segment-module_cheveronIconRotated__qDYj7{transform:rotate(180deg)}.segment-module_segmentPopup__YcHor{left:0;min-width:500px;position:absolute;top:calc(100% + 8px);z-index:1000}.segment-module_explanationPanel__7YlpU{background:#fff;left:0;position:absolute;top:100%;width:600px;z-index:100}.segment-module_exampleWrapper__ptZzj{align-items:flex-start;display:flex;flex-direction:column;gap:12px}.segment-module_uppercase__hjgxG{text-transform:uppercase}.segment-module_exampleContainer__9tMXx{align-items:flex-start;border:2px dashed #e2e8f0;border-radius:8px;display:flex;flex-direction:column;gap:8px;padding:16px;width:100%}.segment-module_exampleHeader__9P11O{align-items:center;align-self:stretch;display:flex;justify-content:space-between}.segment-module_loaderContainer__5Mhyz,.segment-module_loaderWrapper__SwIof{border:1px solid #e5e7eb;border-radius:8px;padding:12px}.segment-module_loaderHeader__J2JnY{align-items:center;display:flex;justify-content:space-between;margin-bottom:16px}.segment-module_skeleton__2uZEf{animation:segment-module_pulse__A17cR 1.5s ease-in-out infinite;background:#e5e7eb;border-radius:6px}.segment-module_title__fW93U{height:18px;width:100px}.segment-module_icon__Dvee3{height:18px;width:18px}.segment-module_lineFull__MMmOD{height:14px;margin-bottom:10px;width:100%}.segment-module_line90__OFStl{height:14px;margin-bottom:10px;width:90%}.segment-module_line75__9r6Xp{height:14px;margin-bottom:10px;width:75%}.segment-module_line60__bLRec{height:14px;width:60%}@keyframes segment-module_pulse__A17cR{0%{opacity:1}50%{opacity:.5}to{opacity:1}}.segment-module_exampleHeaderText__MWMG0{color:#334155;font-size:14px;font-weight:600;line-height:21px;margin:0}.segment-module_cancelButton__-F5aZ{align-items:center;align-self:stretch;background-color:initial;border:none;color:#334155;cursor:pointer;display:flex;height:fit-content;justify-content:space-between;padding:4px;transition:all .2s ease-in-out}.segment-module_cancelButton__-F5aZ:hover{background-color:#eff6ff}.segment-module_spinner__kRnWD{animation:segment-module_spin__MV6y5 1s linear infinite}@keyframes segment-module_spin__MV6y5{to{transform:rotate(1turn)}}"));const t=document.head||document.getElementsByTagName("head")[0]||document.documentElement;t&&t.appendChild(e)}();export{e as default};
1
+ var e={segmentWrapper:"segment-module_segmentWrapper__PVOuq",segmentButtonContainer:"segment-module_segmentButtonContainer__X76sx",cheveronIcon:"segment-module_cheveronIcon__1njFy",updatedChevronIcon:"segment-module_updatedChevronIcon__8vN-t",cheveronIconRotated:"segment-module_cheveronIconRotated__qDYj7",segmentPopup:"segment-module_segmentPopup__YcHor",explanationPanel:"segment-module_explanationPanel__7YlpU",exampleWrapper:"segment-module_exampleWrapper__ptZzj",uppercase:"segment-module_uppercase__hjgxG",exampleContainer:"segment-module_exampleContainer__9tMXx",exampleHeader:"segment-module_exampleHeader__9P11O",loaderWrapper:"segment-module_loaderWrapper__SwIof",loaderContainer:"segment-module_loaderContainer__5Mhyz",loaderHeader:"segment-module_loaderHeader__J2JnY",skeleton:"segment-module_skeleton__2uZEf",pulse:"segment-module_pulse__A17cR",title:"segment-module_title__fW93U",icon:"segment-module_icon__Dvee3",lineFull:"segment-module_lineFull__MMmOD",line90:"segment-module_line90__OFStl",line75:"segment-module_line75__9r6Xp",line60:"segment-module_line60__bLRec",exampleHeaderText:"segment-module_exampleHeaderText__MWMG0",cancelButton:"segment-module_cancelButton__-F5aZ",spinner:"segment-module_spinner__kRnWD",spin:"segment-module_spin__MV6y5"};!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const n=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;n&&e.setAttribute("nonce",n),e.appendChild(document.createTextNode(".segment-module_segmentWrapper__PVOuq{display:flex;flex-direction:column;gap:8px}.segment-module_segmentButtonContainer__X76sx{background-color:initial;border:none;cursor:pointer;padding:0}.segment-module_cheveronIcon__1njFy{color:#3b82f6;height:16px;transition:all .2s ease-in-out;width:16px}.segment-module_updatedChevronIcon__8vN-t{color:#16a34a}.segment-module_cheveronIconRotated__qDYj7{transform:rotate(180deg)}.segment-module_segmentPopup__YcHor{left:0;min-width:500px;position:absolute;top:calc(100% + 8px);z-index:1000}.segment-module_explanationPanel__7YlpU{background:#fff;left:0;position:absolute;top:100%;width:600px;z-index:100}.segment-module_exampleWrapper__ptZzj{align-items:flex-start;display:flex;flex-direction:column;gap:12px}.segment-module_uppercase__hjgxG{text-transform:uppercase}.segment-module_exampleContainer__9tMXx{align-items:flex-start;border:2px dashed #e2e8f0;border-radius:8px;box-sizing:border-box;display:flex;flex-direction:column;gap:8px;padding:16px;width:100%}.segment-module_exampleHeader__9P11O{align-items:center;align-self:stretch;display:flex;justify-content:space-between}.segment-module_loaderContainer__5Mhyz,.segment-module_loaderWrapper__SwIof{border:1px solid #e5e7eb;border-radius:8px;padding:12px}.segment-module_loaderHeader__J2JnY{align-items:center;display:flex;justify-content:space-between;margin-bottom:16px}.segment-module_skeleton__2uZEf{animation:segment-module_pulse__A17cR 1.5s ease-in-out infinite;background:#e5e7eb;border-radius:6px}.segment-module_title__fW93U{height:18px;width:100px}.segment-module_icon__Dvee3{height:18px;width:18px}.segment-module_lineFull__MMmOD{height:14px;margin-bottom:10px;width:100%}.segment-module_line90__OFStl{height:14px;margin-bottom:10px;width:90%}.segment-module_line75__9r6Xp{height:14px;margin-bottom:10px;width:75%}.segment-module_line60__bLRec{height:14px;width:60%}@keyframes segment-module_pulse__A17cR{0%{opacity:1}50%{opacity:.5}to{opacity:1}}.segment-module_exampleHeaderText__MWMG0{color:#334155;font-size:14px;font-weight:600;line-height:21px;margin:0}.segment-module_cancelButton__-F5aZ{align-items:center;align-self:stretch;background-color:initial;border:none;color:#334155;cursor:pointer;display:flex;height:fit-content;justify-content:space-between;padding:4px;transition:all .2s ease-in-out}.segment-module_cancelButton__-F5aZ:hover{background-color:#eff6ff}.segment-module_spinner__kRnWD{animation:segment-module_spin__MV6y5 1s linear infinite}@keyframes segment-module_spin__MV6y5{to{transform:rotate(1turn)}}"));const t=document.head||document.getElementsByTagName("head")[0]||document.documentElement;t&&t.appendChild(e)}();export{e as default};
2
2
  //# sourceMappingURL=segment.module.css.js.map