@archieai/ui 1.4.1 → 2.1.0

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 (440) hide show
  1. package/README.md +16 -1
  2. package/dist/Search-DR0PlkBC.cjs +2 -0
  3. package/dist/Search-DR0PlkBC.cjs.map +1 -0
  4. package/dist/{Search-Cll_4Ycv.js → Search-XtroVPea.js} +585 -558
  5. package/dist/Search-XtroVPea.js.map +1 -0
  6. package/dist/UIRenderer.d.ts +11 -0
  7. package/dist/UIRenderer.d.ts.map +1 -0
  8. package/dist/brands/index.d.ts +55 -0
  9. package/dist/brands/index.d.ts.map +1 -0
  10. package/dist/components/atoms/Avatar/Avatar.styles.d.ts +2 -2
  11. package/dist/components/atoms/Badge/Badge.d.ts +10 -0
  12. package/dist/components/atoms/Badge/Badge.d.ts.map +1 -0
  13. package/dist/components/atoms/Badge/Badge.styles.d.ts +4 -0
  14. package/dist/components/atoms/Badge/Badge.styles.d.ts.map +1 -0
  15. package/dist/components/atoms/DeltaPill/DeltaPill.d.ts +13 -0
  16. package/dist/components/atoms/DeltaPill/DeltaPill.d.ts.map +1 -0
  17. package/dist/components/atoms/DeltaPill/index.d.ts +13 -0
  18. package/dist/components/atoms/DeltaPill/index.d.ts.map +1 -0
  19. package/dist/components/atoms/FootnoteRef/FootnoteRef.d.ts +14 -0
  20. package/dist/components/atoms/FootnoteRef/FootnoteRef.d.ts.map +1 -0
  21. package/dist/components/atoms/SparklineCell/SparklineCell.d.ts +21 -0
  22. package/dist/components/atoms/SparklineCell/SparklineCell.d.ts.map +1 -0
  23. package/dist/components/atoms/StatusIndicator/StatusIndicator.styles.d.ts +2 -2
  24. package/dist/components/atoms/StatusPill/StatusPill.d.ts +16 -0
  25. package/dist/components/atoms/StatusPill/StatusPill.d.ts.map +1 -0
  26. package/dist/components/atoms/StatusPill/index.d.ts +11 -0
  27. package/dist/components/atoms/StatusPill/index.d.ts.map +1 -0
  28. package/dist/components/atoms/Typography/Typography.d.ts +2 -2
  29. package/dist/components/atoms/Typography/Typography.d.ts.map +1 -1
  30. package/dist/components/atoms/icons/Bug.d.ts +7 -0
  31. package/dist/components/atoms/icons/Bug.d.ts.map +1 -0
  32. package/dist/components/atoms/icons/Users.d.ts.map +1 -1
  33. package/dist/components/atoms/icons/index.d.ts +1 -0
  34. package/dist/components/atoms/icons/index.d.ts.map +1 -1
  35. package/dist/components/canvas/widgets/AnswerableListWidget.d.ts +3 -0
  36. package/dist/components/canvas/widgets/AnswerableListWidget.d.ts.map +1 -0
  37. package/dist/components/canvas/widgets/AssignmentWidget.d.ts +3 -0
  38. package/dist/components/canvas/widgets/AssignmentWidget.d.ts.map +1 -0
  39. package/dist/components/canvas/widgets/ConfirmationWidget.d.ts +3 -0
  40. package/dist/components/canvas/widgets/ConfirmationWidget.d.ts.map +1 -0
  41. package/dist/components/canvas/widgets/DraftApprovalWidget.d.ts +3 -0
  42. package/dist/components/canvas/widgets/DraftApprovalWidget.d.ts.map +1 -0
  43. package/dist/components/canvas/widgets/MultiChoiceWidget.d.ts +3 -0
  44. package/dist/components/canvas/widgets/MultiChoiceWidget.d.ts.map +1 -0
  45. package/dist/components/canvas/widgets/PlanApprovalWidget.d.ts +3 -0
  46. package/dist/components/canvas/widgets/PlanApprovalWidget.d.ts.map +1 -0
  47. package/dist/components/canvas/widgets/QuestionWidget.d.ts +3 -0
  48. package/dist/components/canvas/widgets/QuestionWidget.d.ts.map +1 -0
  49. package/dist/components/canvas/widgets/types.d.ts +18 -0
  50. package/dist/components/canvas/widgets/types.d.ts.map +1 -0
  51. package/dist/components/email/EmailEditor.d.ts +32 -0
  52. package/dist/components/email/EmailEditor.d.ts.map +1 -0
  53. package/dist/components/molecules/ArtifactCard/ArtifactCard.styles.d.ts +5 -5
  54. package/dist/components/molecules/AuditStamp/AuditStamp.d.ts +20 -0
  55. package/dist/components/molecules/AuditStamp/AuditStamp.d.ts.map +1 -0
  56. package/dist/components/molecules/Banner/Banner.d.ts +12 -0
  57. package/dist/components/molecules/Banner/Banner.d.ts.map +1 -0
  58. package/dist/components/molecules/Banner/Banner.styles.d.ts +10 -0
  59. package/dist/components/molecules/Banner/Banner.styles.d.ts.map +1 -0
  60. package/dist/components/molecules/BriefingCard/BriefingCard.d.ts +19 -0
  61. package/dist/components/molecules/BriefingCard/BriefingCard.d.ts.map +1 -0
  62. package/dist/components/molecules/BriefingCard/index.d.ts +16 -0
  63. package/dist/components/molecules/BriefingCard/index.d.ts.map +1 -0
  64. package/dist/components/molecules/Button/Button.d.ts +13 -8
  65. package/dist/components/molecules/Button/Button.d.ts.map +1 -1
  66. package/dist/components/molecules/Button/Button.styles.d.ts +3 -5
  67. package/dist/components/molecules/Button/Button.styles.d.ts.map +1 -1
  68. package/dist/components/molecules/Card/Card.d.ts +7 -0
  69. package/dist/components/molecules/Card/Card.d.ts.map +1 -0
  70. package/dist/components/molecules/Card/Card.styles.d.ts +5 -0
  71. package/dist/components/molecules/Card/Card.styles.d.ts.map +1 -0
  72. package/dist/components/molecules/Checkbox/Checkbox.d.ts +1 -0
  73. package/dist/components/molecules/Checkbox/Checkbox.d.ts.map +1 -1
  74. package/dist/components/molecules/Checkbox/Checkbox.styles.d.ts +1 -0
  75. package/dist/components/molecules/Checkbox/Checkbox.styles.d.ts.map +1 -1
  76. package/dist/components/molecules/Chip/Chip.d.ts +2 -1
  77. package/dist/components/molecules/Chip/Chip.d.ts.map +1 -1
  78. package/dist/components/molecules/Chip/Chip.styles.d.ts +9 -6
  79. package/dist/components/molecules/Chip/Chip.styles.d.ts.map +1 -1
  80. package/dist/components/molecules/Chip/Chip.types.d.ts +29 -1
  81. package/dist/components/molecules/Chip/Chip.types.d.ts.map +1 -1
  82. package/dist/components/molecules/Chip/components/ChipDeleteButton.d.ts.map +1 -1
  83. package/dist/components/molecules/Chip/components/ChipLeadingContent.d.ts +1 -0
  84. package/dist/components/molecules/Chip/components/ChipLeadingContent.d.ts.map +1 -1
  85. package/dist/components/molecules/Chip/index.d.ts +1 -1
  86. package/dist/components/molecules/Chip/index.d.ts.map +1 -1
  87. package/dist/components/molecules/CircularProgress/CircularProgress.styles.d.ts +1 -1
  88. package/dist/components/molecules/CommentaryBlock/CommentaryBlock.d.ts +22 -0
  89. package/dist/components/molecules/CommentaryBlock/CommentaryBlock.d.ts.map +1 -0
  90. package/dist/components/molecules/ComparisonToggle/ComparisonToggle.d.ts +22 -0
  91. package/dist/components/molecules/ComparisonToggle/ComparisonToggle.d.ts.map +1 -0
  92. package/dist/components/molecules/CopyButton/CopyButton.d.ts +8 -0
  93. package/dist/components/molecules/CopyButton/CopyButton.d.ts.map +1 -0
  94. package/dist/components/molecules/DataAccordion/DataAccordion.d.ts +13 -0
  95. package/dist/components/molecules/DataAccordion/DataAccordion.d.ts.map +1 -0
  96. package/dist/components/molecules/Dropdown/Dropdown.styles.d.ts +1 -1
  97. package/dist/components/molecules/EmptyState/EmptyState.d.ts +15 -0
  98. package/dist/components/molecules/EmptyState/EmptyState.d.ts.map +1 -0
  99. package/dist/components/molecules/EmptyState/index.d.ts +15 -0
  100. package/dist/components/molecules/EmptyState/index.d.ts.map +1 -0
  101. package/dist/components/molecules/ExportBar/ExportBar.d.ts +21 -0
  102. package/dist/components/molecules/ExportBar/ExportBar.d.ts.map +1 -0
  103. package/dist/components/molecules/FieldRow/FieldRow.d.ts +11 -0
  104. package/dist/components/molecules/FieldRow/FieldRow.d.ts.map +1 -0
  105. package/dist/components/molecules/{ChatFile → FileIcon}/FileIcon.d.ts +2 -1
  106. package/dist/components/molecules/FileIcon/FileIcon.d.ts.map +1 -0
  107. package/dist/components/molecules/FileIcon/FileIcon.styles.d.ts +4 -0
  108. package/dist/components/molecules/FileIcon/FileIcon.styles.d.ts.map +1 -0
  109. package/dist/components/molecules/FootnoteList/FootnoteList.d.ts +14 -0
  110. package/dist/components/molecules/FootnoteList/FootnoteList.d.ts.map +1 -0
  111. package/dist/components/molecules/Input/Input.d.ts +5 -1
  112. package/dist/components/molecules/Input/Input.d.ts.map +1 -1
  113. package/dist/components/molecules/Input/Input.styles.d.ts +4 -4
  114. package/dist/components/molecules/Input/Input.styles.d.ts.map +1 -1
  115. package/dist/components/molecules/KpiStrip/KpiStrip.d.ts +22 -0
  116. package/dist/components/molecules/KpiStrip/KpiStrip.d.ts.map +1 -0
  117. package/dist/components/molecules/KpiStrip/index.d.ts +19 -0
  118. package/dist/components/molecules/KpiStrip/index.d.ts.map +1 -0
  119. package/dist/components/molecules/LoadingSpinner/LoadingSpinner.styles.d.ts +1 -1
  120. package/dist/components/molecules/MessageBubble/MessageBubble.d.ts +9 -1
  121. package/dist/components/molecules/MessageBubble/MessageBubble.d.ts.map +1 -1
  122. package/dist/components/molecules/MessageBubble/MessageBubble.styles.d.ts +6 -1
  123. package/dist/components/molecules/MessageBubble/MessageBubble.styles.d.ts.map +1 -1
  124. package/dist/components/molecules/MessageBubble/useElapsedTime.d.ts +6 -0
  125. package/dist/components/molecules/MessageBubble/useElapsedTime.d.ts.map +1 -0
  126. package/dist/components/molecules/MetricCard/MetricCard.d.ts +19 -0
  127. package/dist/components/molecules/MetricCard/MetricCard.d.ts.map +1 -0
  128. package/dist/components/molecules/MetricCard/index.d.ts +16 -0
  129. package/dist/components/molecules/MetricCard/index.d.ts.map +1 -0
  130. package/dist/components/molecules/NumberInput/NumberInput.d.ts +15 -0
  131. package/dist/components/molecules/NumberInput/NumberInput.d.ts.map +1 -0
  132. package/dist/components/molecules/PasswordField/PasswordField.d.ts +15 -0
  133. package/dist/components/molecules/PasswordField/PasswordField.d.ts.map +1 -0
  134. package/dist/components/molecules/PeriodSelector/PeriodSelector.d.ts +24 -0
  135. package/dist/components/molecules/PeriodSelector/PeriodSelector.d.ts.map +1 -0
  136. package/dist/components/molecules/ProgressBar/ProgressBar.styles.d.ts +1 -1
  137. package/dist/components/molecules/ReportBanner/ReportBanner.d.ts +23 -0
  138. package/dist/components/molecules/ReportBanner/ReportBanner.d.ts.map +1 -0
  139. package/dist/components/molecules/ReportBanner/index.d.ts +20 -0
  140. package/dist/components/molecules/ReportBanner/index.d.ts.map +1 -0
  141. package/dist/components/molecules/ReportHeader/ReportHeader.d.ts +21 -0
  142. package/dist/components/molecules/ReportHeader/ReportHeader.d.ts.map +1 -0
  143. package/dist/components/molecules/ReportHeader/index.d.ts +16 -0
  144. package/dist/components/molecules/ReportHeader/index.d.ts.map +1 -0
  145. package/dist/components/molecules/ReportSection/ReportSection.d.ts +21 -0
  146. package/dist/components/molecules/ReportSection/ReportSection.d.ts.map +1 -0
  147. package/dist/components/molecules/Select/Select.d.ts +13 -0
  148. package/dist/components/molecules/Select/Select.d.ts.map +1 -0
  149. package/dist/components/molecules/SettingsNav/SettingsNav.d.ts +17 -0
  150. package/dist/components/molecules/SettingsNav/SettingsNav.d.ts.map +1 -0
  151. package/dist/components/molecules/SidebarItem/SidebarItem.d.ts +2 -0
  152. package/dist/components/molecules/SidebarItem/SidebarItem.d.ts.map +1 -1
  153. package/dist/components/molecules/SidebarItem/SidebarItem.styles.d.ts +2 -0
  154. package/dist/components/molecules/SidebarItem/SidebarItem.styles.d.ts.map +1 -1
  155. package/dist/components/molecules/StatusMessage/StatusMessage.styles.d.ts +2 -2
  156. package/dist/components/molecules/Tabs/Tabs.d.ts +3 -1
  157. package/dist/components/molecules/Tabs/Tabs.d.ts.map +1 -1
  158. package/dist/components/molecules/Tabs/Tabs.styles.d.ts +2 -2
  159. package/dist/components/molecules/Tabs/Tabs.styles.d.ts.map +1 -1
  160. package/dist/components/molecules/Tag/Tag.d.ts +1 -1
  161. package/dist/components/molecules/Tag/Tag.d.ts.map +1 -1
  162. package/dist/components/molecules/Tag/Tag.styles.d.ts +1 -1
  163. package/dist/components/molecules/Tag/Tag.styles.d.ts.map +1 -1
  164. package/dist/components/molecules/TextArea/TextArea.d.ts +4 -0
  165. package/dist/components/molecules/TextArea/TextArea.d.ts.map +1 -1
  166. package/dist/components/molecules/TextArea/TextArea.styles.d.ts +1 -1
  167. package/dist/components/molecules/Toast/Toast.d.ts +1 -0
  168. package/dist/components/molecules/Toast/Toast.d.ts.map +1 -1
  169. package/dist/components/molecules/Toast/Toast.styles.d.ts +3 -3
  170. package/dist/components/molecules/Toast/Toast.styles.d.ts.map +1 -1
  171. package/dist/components/molecules/Toggle/Toggle.d.ts +5 -0
  172. package/dist/components/molecules/Toggle/Toggle.d.ts.map +1 -1
  173. package/dist/components/molecules/Toggle/Toggle.styles.d.ts +11 -2
  174. package/dist/components/molecules/Toggle/Toggle.styles.d.ts.map +1 -1
  175. package/dist/components/molecules/Tooltip/Tooltip.styles.d.ts +2 -2
  176. package/dist/components/molecules/VarianceBand/VarianceBand.d.ts +18 -0
  177. package/dist/components/molecules/VarianceBand/VarianceBand.d.ts.map +1 -0
  178. package/dist/components/molecules/VarianceBand/index.d.ts +15 -0
  179. package/dist/components/molecules/VarianceBand/index.d.ts.map +1 -0
  180. package/dist/components/organisms/BudgetVarianceTable/BudgetVarianceTable.d.ts +31 -0
  181. package/dist/components/organisms/BudgetVarianceTable/BudgetVarianceTable.d.ts.map +1 -0
  182. package/dist/components/organisms/Charts/AreaChart/AreaChart.d.ts +19 -0
  183. package/dist/components/organisms/Charts/AreaChart/AreaChart.d.ts.map +1 -0
  184. package/dist/components/organisms/Charts/AreaChart/index.d.ts +3 -0
  185. package/dist/components/organisms/Charts/AreaChart/index.d.ts.map +1 -0
  186. package/dist/components/organisms/Charts/BarChart/BarChart.d.ts +18 -0
  187. package/dist/components/organisms/Charts/BarChart/BarChart.d.ts.map +1 -0
  188. package/dist/components/organisms/Charts/BarChart/index.d.ts +3 -0
  189. package/dist/components/organisms/Charts/BarChart/index.d.ts.map +1 -0
  190. package/dist/components/organisms/Charts/BulletChart/BulletChart.d.ts +33 -0
  191. package/dist/components/organisms/Charts/BulletChart/BulletChart.d.ts.map +1 -0
  192. package/dist/components/organisms/Charts/BulletChart/index.d.ts +2 -0
  193. package/dist/components/organisms/Charts/BulletChart/index.d.ts.map +1 -0
  194. package/dist/components/organisms/Charts/ChartSection/ChartSection.d.ts +21 -0
  195. package/dist/components/organisms/Charts/ChartSection/ChartSection.d.ts.map +1 -0
  196. package/dist/components/organisms/Charts/ChartSection/index.d.ts +3 -0
  197. package/dist/components/organisms/Charts/ChartSection/index.d.ts.map +1 -0
  198. package/dist/components/organisms/Charts/DonutChart/DonutChart.d.ts +24 -0
  199. package/dist/components/organisms/Charts/DonutChart/DonutChart.d.ts.map +1 -0
  200. package/dist/components/organisms/Charts/DonutChart/index.d.ts +3 -0
  201. package/dist/components/organisms/Charts/DonutChart/index.d.ts.map +1 -0
  202. package/dist/components/organisms/Charts/ForecastChart/ForecastChart.d.ts +22 -0
  203. package/dist/components/organisms/Charts/ForecastChart/ForecastChart.d.ts.map +1 -0
  204. package/dist/components/organisms/Charts/ForecastChart/index.d.ts +3 -0
  205. package/dist/components/organisms/Charts/ForecastChart/index.d.ts.map +1 -0
  206. package/dist/components/organisms/Charts/FunnelChart/FunnelChart.d.ts +28 -0
  207. package/dist/components/organisms/Charts/FunnelChart/FunnelChart.d.ts.map +1 -0
  208. package/dist/components/organisms/Charts/FunnelChart/index.d.ts +2 -0
  209. package/dist/components/organisms/Charts/FunnelChart/index.d.ts.map +1 -0
  210. package/dist/components/organisms/Charts/HeatMap/HeatMap.d.ts +23 -0
  211. package/dist/components/organisms/Charts/HeatMap/HeatMap.d.ts.map +1 -0
  212. package/dist/components/organisms/Charts/HeatMap/index.d.ts +3 -0
  213. package/dist/components/organisms/Charts/HeatMap/index.d.ts.map +1 -0
  214. package/dist/components/organisms/Charts/HorizontalBarChart/HorizontalBarChart.d.ts +20 -0
  215. package/dist/components/organisms/Charts/HorizontalBarChart/HorizontalBarChart.d.ts.map +1 -0
  216. package/dist/components/organisms/Charts/HorizontalBarChart/index.d.ts +3 -0
  217. package/dist/components/organisms/Charts/HorizontalBarChart/index.d.ts.map +1 -0
  218. package/dist/components/organisms/Charts/LineChart/LineChart.d.ts +26 -0
  219. package/dist/components/organisms/Charts/LineChart/LineChart.d.ts.map +1 -0
  220. package/dist/components/organisms/Charts/LineChart/index.d.ts +3 -0
  221. package/dist/components/organisms/Charts/LineChart/index.d.ts.map +1 -0
  222. package/dist/components/organisms/Charts/WaterfallChart/WaterfallChart.d.ts +17 -0
  223. package/dist/components/organisms/Charts/WaterfallChart/WaterfallChart.d.ts.map +1 -0
  224. package/dist/components/organisms/Charts/WaterfallChart/index.d.ts +3 -0
  225. package/dist/components/organisms/Charts/WaterfallChart/index.d.ts.map +1 -0
  226. package/dist/components/organisms/Charts/index.d.ts +27 -0
  227. package/dist/components/organisms/Charts/index.d.ts.map +1 -0
  228. package/dist/components/organisms/Charts/types.d.ts +54 -0
  229. package/dist/components/organisms/Charts/types.d.ts.map +1 -0
  230. package/dist/components/organisms/Charts/utils/colorScheme.d.ts +32 -0
  231. package/dist/components/organisms/Charts/utils/colorScheme.d.ts.map +1 -0
  232. package/dist/components/organisms/Charts/utils/format.d.ts +4 -0
  233. package/dist/components/organisms/Charts/utils/format.d.ts.map +1 -0
  234. package/dist/components/organisms/Charts/utils/path.d.ts +11 -0
  235. package/dist/components/organisms/Charts/utils/path.d.ts.map +1 -0
  236. package/dist/components/organisms/Charts/utils/scales.d.ts +10 -0
  237. package/dist/components/organisms/Charts/utils/scales.d.ts.map +1 -0
  238. package/dist/components/organisms/CoverPage/CoverPage.d.ts +40 -0
  239. package/dist/components/organisms/CoverPage/CoverPage.d.ts.map +1 -0
  240. package/dist/components/organisms/CoverPage/index.d.ts +3 -0
  241. package/dist/components/organisms/CoverPage/index.d.ts.map +1 -0
  242. package/dist/components/organisms/DataTable/DataTable.d.ts +32 -0
  243. package/dist/components/organisms/DataTable/DataTable.d.ts.map +1 -0
  244. package/dist/components/organisms/DrillDownRow/DrillDownRow.d.ts +29 -0
  245. package/dist/components/organisms/DrillDownRow/DrillDownRow.d.ts.map +1 -0
  246. package/dist/components/organisms/ExecutiveSummaryPage/ExecutiveSummaryPage.d.ts +25 -0
  247. package/dist/components/organisms/ExecutiveSummaryPage/ExecutiveSummaryPage.d.ts.map +1 -0
  248. package/dist/components/organisms/ExecutiveSummaryPage/index.d.ts +3 -0
  249. package/dist/components/organisms/ExecutiveSummaryPage/index.d.ts.map +1 -0
  250. package/dist/components/organisms/FinancialTable/FinancialTable.d.ts +50 -0
  251. package/dist/components/organisms/FinancialTable/FinancialTable.d.ts.map +1 -0
  252. package/dist/components/organisms/KpiObservations/KpiObservations.d.ts +25 -0
  253. package/dist/components/organisms/KpiObservations/KpiObservations.d.ts.map +1 -0
  254. package/dist/components/organisms/KpiObservations/index.d.ts +3 -0
  255. package/dist/components/organisms/KpiObservations/index.d.ts.map +1 -0
  256. package/dist/components/organisms/KpiResultsTable/KpiResultsTable.d.ts +34 -0
  257. package/dist/components/organisms/KpiResultsTable/KpiResultsTable.d.ts.map +1 -0
  258. package/dist/components/organisms/KpiResultsTable/index.d.ts +3 -0
  259. package/dist/components/organisms/KpiResultsTable/index.d.ts.map +1 -0
  260. package/dist/components/organisms/KpiStatCard/KpiStatCard.d.ts +25 -0
  261. package/dist/components/organisms/KpiStatCard/KpiStatCard.d.ts.map +1 -0
  262. package/dist/components/organisms/KpiWheel/KpiWheel.d.ts +19 -0
  263. package/dist/components/organisms/KpiWheel/KpiWheel.d.ts.map +1 -0
  264. package/dist/components/organisms/Modal/Modal.d.ts +1 -1
  265. package/dist/components/organisms/Modal/Modal.d.ts.map +1 -1
  266. package/dist/components/organisms/Modal/Modal.styles.d.ts +3 -2
  267. package/dist/components/organisms/Modal/Modal.styles.d.ts.map +1 -1
  268. package/dist/components/organisms/Modal/Modal.types.d.ts +3 -1
  269. package/dist/components/organisms/Modal/Modal.types.d.ts.map +1 -1
  270. package/dist/components/organisms/PivotTable/PivotTable.d.ts +32 -0
  271. package/dist/components/organisms/PivotTable/PivotTable.d.ts.map +1 -0
  272. package/dist/components/organisms/ReportPage/ReportPage.d.ts +24 -0
  273. package/dist/components/organisms/ReportPage/ReportPage.d.ts.map +1 -0
  274. package/dist/components/organisms/SettingsSectionCard/SettingsSectionCard.d.ts +17 -0
  275. package/dist/components/organisms/SettingsSectionCard/SettingsSectionCard.d.ts.map +1 -0
  276. package/dist/components/report/ApprovalCard.d.ts +3 -0
  277. package/dist/components/report/ApprovalCard.d.ts.map +1 -0
  278. package/dist/components/report/AuditStamp.d.ts +3 -0
  279. package/dist/components/report/AuditStamp.d.ts.map +1 -0
  280. package/dist/components/report/Banner.d.ts +3 -0
  281. package/dist/components/report/Banner.d.ts.map +1 -0
  282. package/dist/components/report/BriefingCard.d.ts +3 -0
  283. package/dist/components/report/BriefingCard.d.ts.map +1 -0
  284. package/dist/components/report/CommentaryBlock.d.ts +3 -0
  285. package/dist/components/report/CommentaryBlock.d.ts.map +1 -0
  286. package/dist/components/report/ComparisonToggle.d.ts +3 -0
  287. package/dist/components/report/ComparisonToggle.d.ts.map +1 -0
  288. package/dist/components/report/DataTable.d.ts +3 -0
  289. package/dist/components/report/DataTable.d.ts.map +1 -0
  290. package/dist/components/report/DeltaPill.d.ts +3 -0
  291. package/dist/components/report/DeltaPill.d.ts.map +1 -0
  292. package/dist/components/report/DrillDownRow.d.ts +3 -0
  293. package/dist/components/report/DrillDownRow.d.ts.map +1 -0
  294. package/dist/components/report/EmptyState.d.ts +3 -0
  295. package/dist/components/report/EmptyState.d.ts.map +1 -0
  296. package/dist/components/report/EntityCard.d.ts +3 -0
  297. package/dist/components/report/EntityCard.d.ts.map +1 -0
  298. package/dist/components/report/ExportBar.d.ts +3 -0
  299. package/dist/components/report/ExportBar.d.ts.map +1 -0
  300. package/dist/components/report/FilterBar.d.ts +3 -0
  301. package/dist/components/report/FilterBar.d.ts.map +1 -0
  302. package/dist/components/report/FinancialTable.d.ts +3 -0
  303. package/dist/components/report/FinancialTable.d.ts.map +1 -0
  304. package/dist/components/report/FootnoteList.d.ts +3 -0
  305. package/dist/components/report/FootnoteList.d.ts.map +1 -0
  306. package/dist/components/report/FootnoteRef.d.ts +3 -0
  307. package/dist/components/report/FootnoteRef.d.ts.map +1 -0
  308. package/dist/components/report/Grid.d.ts +6 -0
  309. package/dist/components/report/Grid.d.ts.map +1 -0
  310. package/dist/components/report/KpiStrip.d.ts +3 -0
  311. package/dist/components/report/KpiStrip.d.ts.map +1 -0
  312. package/dist/components/report/MetricCard.d.ts +3 -0
  313. package/dist/components/report/MetricCard.d.ts.map +1 -0
  314. package/dist/components/report/PeriodSelector.d.ts +3 -0
  315. package/dist/components/report/PeriodSelector.d.ts.map +1 -0
  316. package/dist/components/report/PivotTable.d.ts +3 -0
  317. package/dist/components/report/PivotTable.d.ts.map +1 -0
  318. package/dist/components/report/ProgressBar.d.ts +3 -0
  319. package/dist/components/report/ProgressBar.d.ts.map +1 -0
  320. package/dist/components/report/ReportBanner.d.ts +3 -0
  321. package/dist/components/report/ReportBanner.d.ts.map +1 -0
  322. package/dist/components/report/ReportHeader.d.ts +3 -0
  323. package/dist/components/report/ReportHeader.d.ts.map +1 -0
  324. package/dist/components/report/ReportPage.d.ts +6 -0
  325. package/dist/components/report/ReportPage.d.ts.map +1 -0
  326. package/dist/components/report/ReportSection.d.ts +6 -0
  327. package/dist/components/report/ReportSection.d.ts.map +1 -0
  328. package/dist/components/report/ReportToolbar.d.ts +3 -0
  329. package/dist/components/report/ReportToolbar.d.ts.map +1 -0
  330. package/dist/components/report/SectionCard.d.ts +6 -0
  331. package/dist/components/report/SectionCard.d.ts.map +1 -0
  332. package/dist/components/report/SparklineCell.d.ts +3 -0
  333. package/dist/components/report/SparklineCell.d.ts.map +1 -0
  334. package/dist/components/report/Stack.d.ts +6 -0
  335. package/dist/components/report/Stack.d.ts.map +1 -0
  336. package/dist/components/report/StackedBarChart.d.ts +3 -0
  337. package/dist/components/report/StackedBarChart.d.ts.map +1 -0
  338. package/dist/components/report/StatCard.d.ts +3 -0
  339. package/dist/components/report/StatCard.d.ts.map +1 -0
  340. package/dist/components/report/StatusPill.d.ts +3 -0
  341. package/dist/components/report/StatusPill.d.ts.map +1 -0
  342. package/dist/components/report/TaskCard.d.ts +3 -0
  343. package/dist/components/report/TaskCard.d.ts.map +1 -0
  344. package/dist/components/report/VarianceBand.d.ts +3 -0
  345. package/dist/components/report/VarianceBand.d.ts.map +1 -0
  346. package/dist/components/report/WorkstreamCard.d.ts +3 -0
  347. package/dist/components/report/WorkstreamCard.d.ts.map +1 -0
  348. package/dist/components/report/index.d.ts +35 -0
  349. package/dist/components/report/index.d.ts.map +1 -0
  350. package/dist/fonts/LICENSE.txt +92 -0
  351. package/dist/fonts/OFL.txt +93 -0
  352. package/dist/fonts/geist/Geist-Bold.woff2 +0 -0
  353. package/dist/fonts/geist/Geist-Medium.woff2 +0 -0
  354. package/dist/fonts/geist/Geist-Regular.woff2 +0 -0
  355. package/dist/fonts/geist/Geist-SemiBold.woff2 +0 -0
  356. package/dist/fonts/geist-mono/GeistMono-Medium.woff2 +0 -0
  357. package/dist/fonts/geist-mono/GeistMono-Regular.woff2 +0 -0
  358. package/dist/fonts/geist-mono/GeistMono-SemiBold.woff2 +0 -0
  359. package/dist/icons.cjs +1 -1
  360. package/dist/icons.cjs.map +1 -1
  361. package/dist/icons.js +311 -303
  362. package/dist/icons.js.map +1 -1
  363. package/dist/index.cjs +104 -46
  364. package/dist/index.cjs.map +1 -1
  365. package/dist/index.d.ts +98 -6
  366. package/dist/index.d.ts.map +1 -1
  367. package/dist/index.js +8366 -3805
  368. package/dist/index.js.map +1 -1
  369. package/dist/panes/archie/pages/design-studio/StudioContext.d.ts +9 -0
  370. package/dist/panes/archie/pages/design-studio/StudioContext.d.ts.map +1 -0
  371. package/dist/panes/archie/pages/design-studio/stories/archie-ui.d.ts +17 -0
  372. package/dist/panes/archie/pages/design-studio/stories/archie-ui.d.ts.map +1 -0
  373. package/dist/panes/archie/pages/design-studio/stories/buttons.d.ts +7 -0
  374. package/dist/panes/archie/pages/design-studio/stories/buttons.d.ts.map +1 -0
  375. package/dist/panes/archie/pages/design-studio/stories/charts-recharts.d.ts +15 -0
  376. package/dist/panes/archie/pages/design-studio/stories/charts-recharts.d.ts.map +1 -0
  377. package/dist/panes/archie/pages/design-studio/stories/charts.d.ts +16 -0
  378. package/dist/panes/archie/pages/design-studio/stories/charts.d.ts.map +1 -0
  379. package/dist/panes/archie/pages/design-studio/stories/colors.d.ts +6 -0
  380. package/dist/panes/archie/pages/design-studio/stories/colors.d.ts.map +1 -0
  381. package/dist/panes/archie/pages/design-studio/stories/conversation.d.ts +13 -0
  382. package/dist/panes/archie/pages/design-studio/stories/conversation.d.ts.map +1 -0
  383. package/dist/panes/archie/pages/design-studio/stories/data-display.d.ts +5 -0
  384. package/dist/panes/archie/pages/design-studio/stories/data-display.d.ts.map +1 -0
  385. package/dist/panes/archie/pages/design-studio/stories/email-editor.d.ts +8 -0
  386. package/dist/panes/archie/pages/design-studio/stories/email-editor.d.ts.map +1 -0
  387. package/dist/panes/archie/pages/design-studio/stories/feedback.d.ts +4 -0
  388. package/dist/panes/archie/pages/design-studio/stories/feedback.d.ts.map +1 -0
  389. package/dist/panes/archie/pages/design-studio/stories/form-controls.d.ts +7 -0
  390. package/dist/panes/archie/pages/design-studio/stories/form-controls.d.ts.map +1 -0
  391. package/dist/panes/archie/pages/design-studio/stories/icons.d.ts +6 -0
  392. package/dist/panes/archie/pages/design-studio/stories/icons.d.ts.map +1 -0
  393. package/dist/panes/archie/pages/design-studio/stories/management-report.d.ts +21 -0
  394. package/dist/panes/archie/pages/design-studio/stories/management-report.d.ts.map +1 -0
  395. package/dist/panes/archie/pages/design-studio/stories/navigation.d.ts +4 -0
  396. package/dist/panes/archie/pages/design-studio/stories/navigation.d.ts.map +1 -0
  397. package/dist/panes/archie/pages/design-studio/stories/platform/platform-controls.d.ts +6 -0
  398. package/dist/panes/archie/pages/design-studio/stories/platform/platform-controls.d.ts.map +1 -0
  399. package/dist/panes/archie/pages/design-studio/stories/platform/platform-typography.d.ts +5 -0
  400. package/dist/panes/archie/pages/design-studio/stories/platform/platform-typography.d.ts.map +1 -0
  401. package/dist/panes/archie/pages/design-studio/stories/platform/platform-window-chrome.d.ts +5 -0
  402. package/dist/panes/archie/pages/design-studio/stories/platform/platform-window-chrome.d.ts.map +1 -0
  403. package/dist/panes/archie/pages/design-studio/stories/reports-v2.d.ts +10 -0
  404. package/dist/panes/archie/pages/design-studio/stories/reports-v2.d.ts.map +1 -0
  405. package/dist/panes/archie/pages/design-studio/stories/reports.d.ts +10 -0
  406. package/dist/panes/archie/pages/design-studio/stories/reports.d.ts.map +1 -0
  407. package/dist/panes/archie/pages/design-studio/stories/sales-forecasts.d.ts +22 -0
  408. package/dist/panes/archie/pages/design-studio/stories/sales-forecasts.d.ts.map +1 -0
  409. package/dist/panes/archie/pages/design-studio/stories/settings-ui.d.ts +4 -0
  410. package/dist/panes/archie/pages/design-studio/stories/settings-ui.d.ts.map +1 -0
  411. package/dist/panes/archie/pages/design-studio/stories/tokens.d.ts +6 -0
  412. package/dist/panes/archie/pages/design-studio/stories/tokens.d.ts.map +1 -0
  413. package/dist/panes/archie/pages/design-studio/stories/topic-workspace.d.ts +13 -0
  414. package/dist/panes/archie/pages/design-studio/stories/topic-workspace.d.ts.map +1 -0
  415. package/dist/platform/PlatformProvider.d.ts +55 -0
  416. package/dist/platform/PlatformProvider.d.ts.map +1 -0
  417. package/dist/platform/index.d.ts +4 -0
  418. package/dist/platform/index.d.ts.map +1 -0
  419. package/dist/platform/tokens.d.ts +3 -0
  420. package/dist/platform/tokens.d.ts.map +1 -0
  421. package/dist/platform/types.d.ts +32 -0
  422. package/dist/platform/types.d.ts.map +1 -0
  423. package/dist/report-types.d.ts +431 -0
  424. package/dist/report-types.d.ts.map +1 -0
  425. package/dist/styles.css +1 -1
  426. package/dist/types/renderMode.d.ts +12 -0
  427. package/dist/types/renderMode.d.ts.map +1 -0
  428. package/package.json +6 -2
  429. package/dist/Search-BAtBAqQf.cjs +0 -2
  430. package/dist/Search-BAtBAqQf.cjs.map +0 -1
  431. package/dist/Search-Cll_4Ycv.js.map +0 -1
  432. package/dist/components/molecules/ChatFile/ChatFile.d.ts +0 -33
  433. package/dist/components/molecules/ChatFile/ChatFile.d.ts.map +0 -1
  434. package/dist/components/molecules/ChatFile/ChatFile.styles.d.ts +0 -16
  435. package/dist/components/molecules/ChatFile/ChatFile.styles.d.ts.map +0 -1
  436. package/dist/components/molecules/ChatFile/FileIcon.d.ts.map +0 -1
  437. package/dist/components/molecules/ChatFile/index.d.ts +0 -5
  438. package/dist/components/molecules/ChatFile/index.d.ts.map +0 -1
  439. package/dist/fonts/signifier/signifier-extralight.woff2 +0 -0
  440. package/dist/fonts/signifier/signifier-light.woff2 +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs","../node_modules/.pnpm/tailwind-merge@3.3.0/node_modules/tailwind-merge/dist/bundle-mjs.mjs","../src/utils/cn.ts","../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.mjs","../src/components/atoms/Avatar/Avatar.styles.ts","../src/components/atoms/Avatar/Avatar.tsx","../src/components/atoms/StatusIndicator/StatusIndicator.styles.ts","../src/components/atoms/StatusIndicator/StatusIndicator.tsx","../src/components/atoms/Typography/Typography.tsx","../src/components/atoms/logos/LogoA.tsx","../src/components/atoms/logos/FullLogo.tsx","../src/components/atoms/logos/SignatureA.tsx","../src/components/molecules/ArtifactCard/ArtifactCard.styles.ts","../src/components/molecules/ArtifactCard/ArtifactCard.tsx","../src/components/molecules/Breadcrumbs/Breadcrumbs.styles.ts","../src/components/molecules/Breadcrumbs/Breadcrumbs.tsx","../src/components/molecules/Button/Button.styles.ts","../src/components/molecules/Button/Button.tsx","../src/components/molecules/ChatFile/ChatFile.styles.ts","../src/components/molecules/ChatFile/FileIcon.tsx","../src/components/molecules/ChatFile/ChatFile.tsx","../src/components/molecules/Chip/Chip.styles.ts","../src/components/molecules/Chip/Chip.types.ts","../src/components/molecules/Chip/components/ChipDeleteButton.tsx","../src/components/molecules/Chip/components/ChipLeadingContent.tsx","../src/components/molecules/Chip/Chip.tsx","../src/components/molecules/Checkbox/Checkbox.styles.ts","../src/components/molecules/Checkbox/Checkbox.tsx","../src/components/molecules/CircularProgress/CircularProgress.styles.ts","../src/components/molecules/CircularProgress/CircularProgress.tsx","../src/hooks/useClickOutside.ts","../src/components/molecules/Dropdown/Dropdown.styles.ts","../src/components/molecules/Dropdown/Dropdown.tsx","../src/components/molecules/Input/Input.styles.ts","../src/components/molecules/Input/Input.tsx","../src/components/molecules/LoadingSpinner/LoadingSpinner.styles.ts","../src/components/molecules/LoadingSpinner/LoadingSpinner.tsx","../src/components/molecules/MessageBubble/MessageBubble.styles.ts","../src/components/molecules/MessageBubble/MessageBubble.tsx","../src/components/molecules/ProgressBar/ProgressBar.styles.ts","../src/components/molecules/ProgressBar/ProgressBar.tsx","../src/components/molecules/RangeInput/RangeInput.styles.ts","../src/components/molecules/RangeInput/RangeInput.tsx","../src/components/molecules/SidebarItem/SidebarItem.styles.ts","../src/components/molecules/SidebarItem/SidebarItem.tsx","../src/components/molecules/Tag/Tag.styles.ts","../src/components/molecules/Tag/Tag.tsx","../src/components/molecules/Tabs/Tabs.styles.ts","../src/components/molecules/Tabs/Tabs.tsx","../src/components/molecules/TextArea/TextArea.styles.ts","../src/components/molecules/TextArea/TextArea.tsx","../src/components/molecules/Timestamp/Timestamp.styles.ts","../src/components/molecules/Timestamp/Timestamp.tsx","../src/components/molecules/Toast/Toast.styles.ts","../src/components/molecules/Toast/Toast.tsx","../src/components/molecules/Toggle/Toggle.styles.ts","../src/components/molecules/Toggle/Toggle.tsx","../src/components/molecules/StatusMessage/StatusMessage.styles.ts","../src/components/molecules/StatusMessage/StatusMessage.tsx","../src/components/molecules/AutopilotAction/AutopilotAction.styles.ts","../src/components/molecules/AutopilotAction/AutopilotAction.tsx","../src/components/molecules/Tooltip/Tooltip.styles.ts","../src/components/molecules/Tooltip/Tooltip.tsx","../src/components/organisms/ConversationHeader/ConversationHeader.styles.ts","../src/components/organisms/ConversationHeader/ConversationHeader.tsx","../node_modules/.pnpm/@radix-ui+primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.mjs","../node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.2_@types+react@18.3.27_react@18.3.1/node_modules/@radix-ui/react-compose-refs/dist/index.mjs","../node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@18.3.27_react@18.3.1/node_modules/@radix-ui/react-context/dist/index.mjs","../node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@18.3.27_react@18.3.1/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs","../node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@18.3.27_react@18.3.1/node_modules/@radix-ui/react-id/dist/index.mjs","../node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@18.3.27_react@18.3.1/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs","../node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@18.3.27_react@18.3.1/node_modules/@radix-ui/react-slot/dist/index.mjs","../node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@18.3.7_@types+react@18.3.27__@types+re_fcd3de21280e20c51ab14304cef2fe55/node_modules/@radix-ui/react-primitive/dist/index.mjs","../node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@18.3.27_react@18.3.1/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs","../node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@18.3.27_react@18.3.1/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs","../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@18.3.7_@types+react@18.3.27___ef32cd5833e4d18b8335c2f21b9ac2fa/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs","../node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@18.3.7_@types+react@18.3.27__@types+_079b38391d94963b8fbac89fb53f156c/node_modules/@radix-ui/react-focus-scope/dist/index.mjs","../node_modules/.pnpm/@radix-ui+react-portal@1.1.9_@types+react-dom@18.3.7_@types+react@18.3.27__@types+react_a95d18b6a60dc8d181a971a9b89b86b6/node_modules/@radix-ui/react-portal/dist/index.mjs","../node_modules/.pnpm/@radix-ui+react-presence@1.1.5_@types+react-dom@18.3.7_@types+react@18.3.27__@types+rea_64d32f1aa8205b8137d1ae7fefc406b4/node_modules/@radix-ui/react-presence/dist/index.mjs","../node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.3_@types+react@18.3.27_react@18.3.1/node_modules/@radix-ui/react-focus-guards/dist/index.mjs","../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs","../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@18.3.27_react@18.3.1/node_modules/react-remove-scroll-bar/dist/es2015/constants.js","../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@18.3.27_react@18.3.1/node_modules/use-callback-ref/dist/es2015/assignRef.js","../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@18.3.27_react@18.3.1/node_modules/use-callback-ref/dist/es2015/useRef.js","../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@18.3.27_react@18.3.1/node_modules/use-callback-ref/dist/es2015/useMergeRef.js","../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@18.3.27_react@18.3.1/node_modules/use-sidecar/dist/es2015/medium.js","../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@18.3.27_react@18.3.1/node_modules/use-sidecar/dist/es2015/exports.js","../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@18.3.27_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/medium.js","../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@18.3.27_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/UI.js","../node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js","../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@18.3.27_react@18.3.1/node_modules/react-style-singleton/dist/es2015/singleton.js","../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@18.3.27_react@18.3.1/node_modules/react-style-singleton/dist/es2015/hook.js","../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@18.3.27_react@18.3.1/node_modules/react-style-singleton/dist/es2015/component.js","../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@18.3.27_react@18.3.1/node_modules/react-remove-scroll-bar/dist/es2015/utils.js","../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@18.3.27_react@18.3.1/node_modules/react-remove-scroll-bar/dist/es2015/component.js","../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@18.3.27_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js","../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@18.3.27_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/handleScroll.js","../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@18.3.27_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/SideEffect.js","../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@18.3.27_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/sidecar.js","../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@18.3.27_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/Combination.js","../node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.js","../node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@18.3.7_@types+react@18.3.27__@types+reac_714ecc194868bb6245bac079a4c1dd41/node_modules/@radix-ui/react-dialog/dist/index.mjs","../node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@18.3.7_@types+react@18.3.27__@ty_1b568180cc69792ef5dc460e0a38e386/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs","../src/components/organisms/Modal/Modal.styles.ts","../src/components/organisms/Modal/Modal.tsx"],"sourcesContent":["function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","const CLASS_PART_SEPARATOR = '-';\nconst createClassGroupUtils = config => {\n const classMap = createClassMap(config);\n const {\n conflictingClassGroups,\n conflictingClassGroupModifiers\n } = config;\n const getClassGroupId = className => {\n const classParts = className.split(CLASS_PART_SEPARATOR);\n // Classes like `-inset-1` produce an empty string as first classPart. We assume that classes for negative values are used correctly and remove it from classParts.\n if (classParts[0] === '' && classParts.length !== 1) {\n classParts.shift();\n }\n return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className);\n };\n const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {\n const conflicts = conflictingClassGroups[classGroupId] || [];\n if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {\n return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]];\n }\n return conflicts;\n };\n return {\n getClassGroupId,\n getConflictingClassGroupIds\n };\n};\nconst getGroupRecursive = (classParts, classPartObject) => {\n if (classParts.length === 0) {\n return classPartObject.classGroupId;\n }\n const currentClassPart = classParts[0];\n const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);\n const classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive(classParts.slice(1), nextClassPartObject) : undefined;\n if (classGroupFromNextClassPart) {\n return classGroupFromNextClassPart;\n }\n if (classPartObject.validators.length === 0) {\n return undefined;\n }\n const classRest = classParts.join(CLASS_PART_SEPARATOR);\n return classPartObject.validators.find(({\n validator\n }) => validator(classRest))?.classGroupId;\n};\nconst arbitraryPropertyRegex = /^\\[(.+)\\]$/;\nconst getGroupIdForArbitraryProperty = className => {\n if (arbitraryPropertyRegex.test(className)) {\n const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];\n const property = arbitraryPropertyClassName?.substring(0, arbitraryPropertyClassName.indexOf(':'));\n if (property) {\n // I use two dots here because one dot is used as prefix for class groups in plugins\n return 'arbitrary..' + property;\n }\n }\n};\n/**\n * Exported for testing only\n */\nconst createClassMap = config => {\n const {\n theme,\n classGroups\n } = config;\n const classMap = {\n nextPart: new Map(),\n validators: []\n };\n for (const classGroupId in classGroups) {\n processClassesRecursively(classGroups[classGroupId], classMap, classGroupId, theme);\n }\n return classMap;\n};\nconst processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {\n classGroup.forEach(classDefinition => {\n if (typeof classDefinition === 'string') {\n const classPartObjectToEdit = classDefinition === '' ? classPartObject : getPart(classPartObject, classDefinition);\n classPartObjectToEdit.classGroupId = classGroupId;\n return;\n }\n if (typeof classDefinition === 'function') {\n if (isThemeGetter(classDefinition)) {\n processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);\n return;\n }\n classPartObject.validators.push({\n validator: classDefinition,\n classGroupId\n });\n return;\n }\n Object.entries(classDefinition).forEach(([key, classGroup]) => {\n processClassesRecursively(classGroup, getPart(classPartObject, key), classGroupId, theme);\n });\n });\n};\nconst getPart = (classPartObject, path) => {\n let currentClassPartObject = classPartObject;\n path.split(CLASS_PART_SEPARATOR).forEach(pathPart => {\n if (!currentClassPartObject.nextPart.has(pathPart)) {\n currentClassPartObject.nextPart.set(pathPart, {\n nextPart: new Map(),\n validators: []\n });\n }\n currentClassPartObject = currentClassPartObject.nextPart.get(pathPart);\n });\n return currentClassPartObject;\n};\nconst isThemeGetter = func => func.isThemeGetter;\n\n// LRU cache inspired from hashlru (https://github.com/dominictarr/hashlru/blob/v1.0.4/index.js) but object replaced with Map to improve performance\nconst createLruCache = maxCacheSize => {\n if (maxCacheSize < 1) {\n return {\n get: () => undefined,\n set: () => {}\n };\n }\n let cacheSize = 0;\n let cache = new Map();\n let previousCache = new Map();\n const update = (key, value) => {\n cache.set(key, value);\n cacheSize++;\n if (cacheSize > maxCacheSize) {\n cacheSize = 0;\n previousCache = cache;\n cache = new Map();\n }\n };\n return {\n get(key) {\n let value = cache.get(key);\n if (value !== undefined) {\n return value;\n }\n if ((value = previousCache.get(key)) !== undefined) {\n update(key, value);\n return value;\n }\n },\n set(key, value) {\n if (cache.has(key)) {\n cache.set(key, value);\n } else {\n update(key, value);\n }\n }\n };\n};\nconst IMPORTANT_MODIFIER = '!';\nconst MODIFIER_SEPARATOR = ':';\nconst MODIFIER_SEPARATOR_LENGTH = MODIFIER_SEPARATOR.length;\nconst createParseClassName = config => {\n const {\n prefix,\n experimentalParseClassName\n } = config;\n /**\n * Parse class name into parts.\n *\n * Inspired by `splitAtTopLevelOnly` used in Tailwind CSS\n * @see https://github.com/tailwindlabs/tailwindcss/blob/v3.2.2/src/util/splitAtTopLevelOnly.js\n */\n let parseClassName = className => {\n const modifiers = [];\n let bracketDepth = 0;\n let parenDepth = 0;\n let modifierStart = 0;\n let postfixModifierPosition;\n for (let index = 0; index < className.length; index++) {\n let currentCharacter = className[index];\n if (bracketDepth === 0 && parenDepth === 0) {\n if (currentCharacter === MODIFIER_SEPARATOR) {\n modifiers.push(className.slice(modifierStart, index));\n modifierStart = index + MODIFIER_SEPARATOR_LENGTH;\n continue;\n }\n if (currentCharacter === '/') {\n postfixModifierPosition = index;\n continue;\n }\n }\n if (currentCharacter === '[') {\n bracketDepth++;\n } else if (currentCharacter === ']') {\n bracketDepth--;\n } else if (currentCharacter === '(') {\n parenDepth++;\n } else if (currentCharacter === ')') {\n parenDepth--;\n }\n }\n const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.substring(modifierStart);\n const baseClassName = stripImportantModifier(baseClassNameWithImportantModifier);\n const hasImportantModifier = baseClassName !== baseClassNameWithImportantModifier;\n const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : undefined;\n return {\n modifiers,\n hasImportantModifier,\n baseClassName,\n maybePostfixModifierPosition\n };\n };\n if (prefix) {\n const fullPrefix = prefix + MODIFIER_SEPARATOR;\n const parseClassNameOriginal = parseClassName;\n parseClassName = className => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.substring(fullPrefix.length)) : {\n isExternal: true,\n modifiers: [],\n hasImportantModifier: false,\n baseClassName: className,\n maybePostfixModifierPosition: undefined\n };\n }\n if (experimentalParseClassName) {\n const parseClassNameOriginal = parseClassName;\n parseClassName = className => experimentalParseClassName({\n className,\n parseClassName: parseClassNameOriginal\n });\n }\n return parseClassName;\n};\nconst stripImportantModifier = baseClassName => {\n if (baseClassName.endsWith(IMPORTANT_MODIFIER)) {\n return baseClassName.substring(0, baseClassName.length - 1);\n }\n /**\n * In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.\n * @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864\n */\n if (baseClassName.startsWith(IMPORTANT_MODIFIER)) {\n return baseClassName.substring(1);\n }\n return baseClassName;\n};\n\n/**\n * Sorts modifiers according to following schema:\n * - Predefined modifiers are sorted alphabetically\n * - When an arbitrary variant appears, it must be preserved which modifiers are before and after it\n */\nconst createSortModifiers = config => {\n const orderSensitiveModifiers = Object.fromEntries(config.orderSensitiveModifiers.map(modifier => [modifier, true]));\n const sortModifiers = modifiers => {\n if (modifiers.length <= 1) {\n return modifiers;\n }\n const sortedModifiers = [];\n let unsortedModifiers = [];\n modifiers.forEach(modifier => {\n const isPositionSensitive = modifier[0] === '[' || orderSensitiveModifiers[modifier];\n if (isPositionSensitive) {\n sortedModifiers.push(...unsortedModifiers.sort(), modifier);\n unsortedModifiers = [];\n } else {\n unsortedModifiers.push(modifier);\n }\n });\n sortedModifiers.push(...unsortedModifiers.sort());\n return sortedModifiers;\n };\n return sortModifiers;\n};\nconst createConfigUtils = config => ({\n cache: createLruCache(config.cacheSize),\n parseClassName: createParseClassName(config),\n sortModifiers: createSortModifiers(config),\n ...createClassGroupUtils(config)\n});\nconst SPLIT_CLASSES_REGEX = /\\s+/;\nconst mergeClassList = (classList, configUtils) => {\n const {\n parseClassName,\n getClassGroupId,\n getConflictingClassGroupIds,\n sortModifiers\n } = configUtils;\n /**\n * Set of classGroupIds in following format:\n * `{importantModifier}{variantModifiers}{classGroupId}`\n * @example 'float'\n * @example 'hover:focus:bg-color'\n * @example 'md:!pr'\n */\n const classGroupsInConflict = [];\n const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);\n let result = '';\n for (let index = classNames.length - 1; index >= 0; index -= 1) {\n const originalClassName = classNames[index];\n const {\n isExternal,\n modifiers,\n hasImportantModifier,\n baseClassName,\n maybePostfixModifierPosition\n } = parseClassName(originalClassName);\n if (isExternal) {\n result = originalClassName + (result.length > 0 ? ' ' + result : result);\n continue;\n }\n let hasPostfixModifier = !!maybePostfixModifierPosition;\n let classGroupId = getClassGroupId(hasPostfixModifier ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);\n if (!classGroupId) {\n if (!hasPostfixModifier) {\n // Not a Tailwind class\n result = originalClassName + (result.length > 0 ? ' ' + result : result);\n continue;\n }\n classGroupId = getClassGroupId(baseClassName);\n if (!classGroupId) {\n // Not a Tailwind class\n result = originalClassName + (result.length > 0 ? ' ' + result : result);\n continue;\n }\n hasPostfixModifier = false;\n }\n const variantModifier = sortModifiers(modifiers).join(':');\n const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;\n const classId = modifierId + classGroupId;\n if (classGroupsInConflict.includes(classId)) {\n // Tailwind class omitted due to conflict\n continue;\n }\n classGroupsInConflict.push(classId);\n const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier);\n for (let i = 0; i < conflictGroups.length; ++i) {\n const group = conflictGroups[i];\n classGroupsInConflict.push(modifierId + group);\n }\n // Tailwind class not in conflict\n result = originalClassName + (result.length > 0 ? ' ' + result : result);\n }\n return result;\n};\n\n/**\n * The code in this file is copied from https://github.com/lukeed/clsx and modified to suit the needs of tailwind-merge better.\n *\n * Specifically:\n * - Runtime code from https://github.com/lukeed/clsx/blob/v1.2.1/src/index.js\n * - TypeScript types from https://github.com/lukeed/clsx/blob/v1.2.1/clsx.d.ts\n *\n * Original code has MIT license: Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)\n */\nfunction twJoin() {\n let index = 0;\n let argument;\n let resolvedValue;\n let string = '';\n while (index < arguments.length) {\n if (argument = arguments[index++]) {\n if (resolvedValue = toValue(argument)) {\n string && (string += ' ');\n string += resolvedValue;\n }\n }\n }\n return string;\n}\nconst toValue = mix => {\n if (typeof mix === 'string') {\n return mix;\n }\n let resolvedValue;\n let string = '';\n for (let k = 0; k < mix.length; k++) {\n if (mix[k]) {\n if (resolvedValue = toValue(mix[k])) {\n string && (string += ' ');\n string += resolvedValue;\n }\n }\n }\n return string;\n};\nfunction createTailwindMerge(createConfigFirst, ...createConfigRest) {\n let configUtils;\n let cacheGet;\n let cacheSet;\n let functionToCall = initTailwindMerge;\n function initTailwindMerge(classList) {\n const config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());\n configUtils = createConfigUtils(config);\n cacheGet = configUtils.cache.get;\n cacheSet = configUtils.cache.set;\n functionToCall = tailwindMerge;\n return tailwindMerge(classList);\n }\n function tailwindMerge(classList) {\n const cachedResult = cacheGet(classList);\n if (cachedResult) {\n return cachedResult;\n }\n const result = mergeClassList(classList, configUtils);\n cacheSet(classList, result);\n return result;\n }\n return function callTailwindMerge() {\n return functionToCall(twJoin.apply(null, arguments));\n };\n}\nconst fromTheme = key => {\n const themeGetter = theme => theme[key] || [];\n themeGetter.isThemeGetter = true;\n return themeGetter;\n};\nconst arbitraryValueRegex = /^\\[(?:(\\w[\\w-]*):)?(.+)\\]$/i;\nconst arbitraryVariableRegex = /^\\((?:(\\w[\\w-]*):)?(.+)\\)$/i;\nconst fractionRegex = /^\\d+\\/\\d+$/;\nconst tshirtUnitRegex = /^(\\d+(\\.\\d+)?)?(xs|sm|md|lg|xl)$/;\nconst lengthUnitRegex = /\\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\\b(calc|min|max|clamp)\\(.+\\)|^0$/;\nconst colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\\(.+\\)$/;\n// Shadow always begins with x and y offset separated by underscore optionally prepended by inset\nconst shadowRegex = /^(inset_)?-?((\\d+)?\\.?(\\d+)[a-z]+|0)_-?((\\d+)?\\.?(\\d+)[a-z]+|0)/;\nconst imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\\(.+\\)$/;\nconst isFraction = value => fractionRegex.test(value);\nconst isNumber = value => !!value && !Number.isNaN(Number(value));\nconst isInteger = value => !!value && Number.isInteger(Number(value));\nconst isPercent = value => value.endsWith('%') && isNumber(value.slice(0, -1));\nconst isTshirtSize = value => tshirtUnitRegex.test(value);\nconst isAny = () => true;\nconst isLengthOnly = value =>\n// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.\n// For example, `hsl(0 0% 0%)` would be classified as a length without this check.\n// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.\nlengthUnitRegex.test(value) && !colorFunctionRegex.test(value);\nconst isNever = () => false;\nconst isShadow = value => shadowRegex.test(value);\nconst isImage = value => imageRegex.test(value);\nconst isAnyNonArbitrary = value => !isArbitraryValue(value) && !isArbitraryVariable(value);\nconst isArbitrarySize = value => getIsArbitraryValue(value, isLabelSize, isNever);\nconst isArbitraryValue = value => arbitraryValueRegex.test(value);\nconst isArbitraryLength = value => getIsArbitraryValue(value, isLabelLength, isLengthOnly);\nconst isArbitraryNumber = value => getIsArbitraryValue(value, isLabelNumber, isNumber);\nconst isArbitraryPosition = value => getIsArbitraryValue(value, isLabelPosition, isNever);\nconst isArbitraryImage = value => getIsArbitraryValue(value, isLabelImage, isImage);\nconst isArbitraryShadow = value => getIsArbitraryValue(value, isLabelShadow, isShadow);\nconst isArbitraryVariable = value => arbitraryVariableRegex.test(value);\nconst isArbitraryVariableLength = value => getIsArbitraryVariable(value, isLabelLength);\nconst isArbitraryVariableFamilyName = value => getIsArbitraryVariable(value, isLabelFamilyName);\nconst isArbitraryVariablePosition = value => getIsArbitraryVariable(value, isLabelPosition);\nconst isArbitraryVariableSize = value => getIsArbitraryVariable(value, isLabelSize);\nconst isArbitraryVariableImage = value => getIsArbitraryVariable(value, isLabelImage);\nconst isArbitraryVariableShadow = value => getIsArbitraryVariable(value, isLabelShadow, true);\n// Helpers\nconst getIsArbitraryValue = (value, testLabel, testValue) => {\n const result = arbitraryValueRegex.exec(value);\n if (result) {\n if (result[1]) {\n return testLabel(result[1]);\n }\n return testValue(result[2]);\n }\n return false;\n};\nconst getIsArbitraryVariable = (value, testLabel, shouldMatchNoLabel = false) => {\n const result = arbitraryVariableRegex.exec(value);\n if (result) {\n if (result[1]) {\n return testLabel(result[1]);\n }\n return shouldMatchNoLabel;\n }\n return false;\n};\n// Labels\nconst isLabelPosition = label => label === 'position' || label === 'percentage';\nconst isLabelImage = label => label === 'image' || label === 'url';\nconst isLabelSize = label => label === 'length' || label === 'size' || label === 'bg-size';\nconst isLabelLength = label => label === 'length';\nconst isLabelNumber = label => label === 'number';\nconst isLabelFamilyName = label => label === 'family-name';\nconst isLabelShadow = label => label === 'shadow';\nconst validators = /*#__PURE__*/Object.defineProperty({\n __proto__: null,\n isAny,\n isAnyNonArbitrary,\n isArbitraryImage,\n isArbitraryLength,\n isArbitraryNumber,\n isArbitraryPosition,\n isArbitraryShadow,\n isArbitrarySize,\n isArbitraryValue,\n isArbitraryVariable,\n isArbitraryVariableFamilyName,\n isArbitraryVariableImage,\n isArbitraryVariableLength,\n isArbitraryVariablePosition,\n isArbitraryVariableShadow,\n isArbitraryVariableSize,\n isFraction,\n isInteger,\n isNumber,\n isPercent,\n isTshirtSize\n}, Symbol.toStringTag, {\n value: 'Module'\n});\nconst getDefaultConfig = () => {\n /**\n * Theme getters for theme variable namespaces\n * @see https://tailwindcss.com/docs/theme#theme-variable-namespaces\n */\n /***/\n const themeColor = fromTheme('color');\n const themeFont = fromTheme('font');\n const themeText = fromTheme('text');\n const themeFontWeight = fromTheme('font-weight');\n const themeTracking = fromTheme('tracking');\n const themeLeading = fromTheme('leading');\n const themeBreakpoint = fromTheme('breakpoint');\n const themeContainer = fromTheme('container');\n const themeSpacing = fromTheme('spacing');\n const themeRadius = fromTheme('radius');\n const themeShadow = fromTheme('shadow');\n const themeInsetShadow = fromTheme('inset-shadow');\n const themeTextShadow = fromTheme('text-shadow');\n const themeDropShadow = fromTheme('drop-shadow');\n const themeBlur = fromTheme('blur');\n const themePerspective = fromTheme('perspective');\n const themeAspect = fromTheme('aspect');\n const themeEase = fromTheme('ease');\n const themeAnimate = fromTheme('animate');\n /**\n * Helpers to avoid repeating the same scales\n *\n * We use functions that create a new array every time they're called instead of static arrays.\n * This ensures that users who modify any scale by mutating the array (e.g. with `array.push(element)`) don't accidentally mutate arrays in other parts of the config.\n */\n /***/\n const scaleBreak = () => ['auto', 'avoid', 'all', 'avoid-page', 'page', 'left', 'right', 'column'];\n const scalePosition = () => ['center', 'top', 'bottom', 'left', 'right', 'top-left',\n // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378\n 'left-top', 'top-right',\n // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378\n 'right-top', 'bottom-right',\n // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378\n 'right-bottom', 'bottom-left',\n // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378\n 'left-bottom'];\n const scalePositionWithArbitrary = () => [...scalePosition(), isArbitraryVariable, isArbitraryValue];\n const scaleOverflow = () => ['auto', 'hidden', 'clip', 'visible', 'scroll'];\n const scaleOverscroll = () => ['auto', 'contain', 'none'];\n const scaleUnambiguousSpacing = () => [isArbitraryVariable, isArbitraryValue, themeSpacing];\n const scaleInset = () => [isFraction, 'full', 'auto', ...scaleUnambiguousSpacing()];\n const scaleGridTemplateColsRows = () => [isInteger, 'none', 'subgrid', isArbitraryVariable, isArbitraryValue];\n const scaleGridColRowStartAndEnd = () => ['auto', {\n span: ['full', isInteger, isArbitraryVariable, isArbitraryValue]\n }, isInteger, isArbitraryVariable, isArbitraryValue];\n const scaleGridColRowStartOrEnd = () => [isInteger, 'auto', isArbitraryVariable, isArbitraryValue];\n const scaleGridAutoColsRows = () => ['auto', 'min', 'max', 'fr', isArbitraryVariable, isArbitraryValue];\n const scaleAlignPrimaryAxis = () => ['start', 'end', 'center', 'between', 'around', 'evenly', 'stretch', 'baseline', 'center-safe', 'end-safe'];\n const scaleAlignSecondaryAxis = () => ['start', 'end', 'center', 'stretch', 'center-safe', 'end-safe'];\n const scaleMargin = () => ['auto', ...scaleUnambiguousSpacing()];\n const scaleSizing = () => [isFraction, 'auto', 'full', 'dvw', 'dvh', 'lvw', 'lvh', 'svw', 'svh', 'min', 'max', 'fit', ...scaleUnambiguousSpacing()];\n const scaleColor = () => [themeColor, isArbitraryVariable, isArbitraryValue];\n const scaleBgPosition = () => [...scalePosition(), isArbitraryVariablePosition, isArbitraryPosition, {\n position: [isArbitraryVariable, isArbitraryValue]\n }];\n const scaleBgRepeat = () => ['no-repeat', {\n repeat: ['', 'x', 'y', 'space', 'round']\n }];\n const scaleBgSize = () => ['auto', 'cover', 'contain', isArbitraryVariableSize, isArbitrarySize, {\n size: [isArbitraryVariable, isArbitraryValue]\n }];\n const scaleGradientStopPosition = () => [isPercent, isArbitraryVariableLength, isArbitraryLength];\n const scaleRadius = () => [\n // Deprecated since Tailwind CSS v4.0.0\n '', 'none', 'full', themeRadius, isArbitraryVariable, isArbitraryValue];\n const scaleBorderWidth = () => ['', isNumber, isArbitraryVariableLength, isArbitraryLength];\n const scaleLineStyle = () => ['solid', 'dashed', 'dotted', 'double'];\n const scaleBlendMode = () => ['normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity'];\n const scaleMaskImagePosition = () => [isNumber, isPercent, isArbitraryVariablePosition, isArbitraryPosition];\n const scaleBlur = () => [\n // Deprecated since Tailwind CSS v4.0.0\n '', 'none', themeBlur, isArbitraryVariable, isArbitraryValue];\n const scaleRotate = () => ['none', isNumber, isArbitraryVariable, isArbitraryValue];\n const scaleScale = () => ['none', isNumber, isArbitraryVariable, isArbitraryValue];\n const scaleSkew = () => [isNumber, isArbitraryVariable, isArbitraryValue];\n const scaleTranslate = () => [isFraction, 'full', ...scaleUnambiguousSpacing()];\n return {\n cacheSize: 500,\n theme: {\n animate: ['spin', 'ping', 'pulse', 'bounce'],\n aspect: ['video'],\n blur: [isTshirtSize],\n breakpoint: [isTshirtSize],\n color: [isAny],\n container: [isTshirtSize],\n 'drop-shadow': [isTshirtSize],\n ease: ['in', 'out', 'in-out'],\n font: [isAnyNonArbitrary],\n 'font-weight': ['thin', 'extralight', 'light', 'normal', 'medium', 'semibold', 'bold', 'extrabold', 'black'],\n 'inset-shadow': [isTshirtSize],\n leading: ['none', 'tight', 'snug', 'normal', 'relaxed', 'loose'],\n perspective: ['dramatic', 'near', 'normal', 'midrange', 'distant', 'none'],\n radius: [isTshirtSize],\n shadow: [isTshirtSize],\n spacing: ['px', isNumber],\n text: [isTshirtSize],\n 'text-shadow': [isTshirtSize],\n tracking: ['tighter', 'tight', 'normal', 'wide', 'wider', 'widest']\n },\n classGroups: {\n // --------------\n // --- Layout ---\n // --------------\n /**\n * Aspect Ratio\n * @see https://tailwindcss.com/docs/aspect-ratio\n */\n aspect: [{\n aspect: ['auto', 'square', isFraction, isArbitraryValue, isArbitraryVariable, themeAspect]\n }],\n /**\n * Container\n * @see https://tailwindcss.com/docs/container\n * @deprecated since Tailwind CSS v4.0.0\n */\n container: ['container'],\n /**\n * Columns\n * @see https://tailwindcss.com/docs/columns\n */\n columns: [{\n columns: [isNumber, isArbitraryValue, isArbitraryVariable, themeContainer]\n }],\n /**\n * Break After\n * @see https://tailwindcss.com/docs/break-after\n */\n 'break-after': [{\n 'break-after': scaleBreak()\n }],\n /**\n * Break Before\n * @see https://tailwindcss.com/docs/break-before\n */\n 'break-before': [{\n 'break-before': scaleBreak()\n }],\n /**\n * Break Inside\n * @see https://tailwindcss.com/docs/break-inside\n */\n 'break-inside': [{\n 'break-inside': ['auto', 'avoid', 'avoid-page', 'avoid-column']\n }],\n /**\n * Box Decoration Break\n * @see https://tailwindcss.com/docs/box-decoration-break\n */\n 'box-decoration': [{\n 'box-decoration': ['slice', 'clone']\n }],\n /**\n * Box Sizing\n * @see https://tailwindcss.com/docs/box-sizing\n */\n box: [{\n box: ['border', 'content']\n }],\n /**\n * Display\n * @see https://tailwindcss.com/docs/display\n */\n display: ['block', 'inline-block', 'inline', 'flex', 'inline-flex', 'table', 'inline-table', 'table-caption', 'table-cell', 'table-column', 'table-column-group', 'table-footer-group', 'table-header-group', 'table-row-group', 'table-row', 'flow-root', 'grid', 'inline-grid', 'contents', 'list-item', 'hidden'],\n /**\n * Screen Reader Only\n * @see https://tailwindcss.com/docs/display#screen-reader-only\n */\n sr: ['sr-only', 'not-sr-only'],\n /**\n * Floats\n * @see https://tailwindcss.com/docs/float\n */\n float: [{\n float: ['right', 'left', 'none', 'start', 'end']\n }],\n /**\n * Clear\n * @see https://tailwindcss.com/docs/clear\n */\n clear: [{\n clear: ['left', 'right', 'both', 'none', 'start', 'end']\n }],\n /**\n * Isolation\n * @see https://tailwindcss.com/docs/isolation\n */\n isolation: ['isolate', 'isolation-auto'],\n /**\n * Object Fit\n * @see https://tailwindcss.com/docs/object-fit\n */\n 'object-fit': [{\n object: ['contain', 'cover', 'fill', 'none', 'scale-down']\n }],\n /**\n * Object Position\n * @see https://tailwindcss.com/docs/object-position\n */\n 'object-position': [{\n object: scalePositionWithArbitrary()\n }],\n /**\n * Overflow\n * @see https://tailwindcss.com/docs/overflow\n */\n overflow: [{\n overflow: scaleOverflow()\n }],\n /**\n * Overflow X\n * @see https://tailwindcss.com/docs/overflow\n */\n 'overflow-x': [{\n 'overflow-x': scaleOverflow()\n }],\n /**\n * Overflow Y\n * @see https://tailwindcss.com/docs/overflow\n */\n 'overflow-y': [{\n 'overflow-y': scaleOverflow()\n }],\n /**\n * Overscroll Behavior\n * @see https://tailwindcss.com/docs/overscroll-behavior\n */\n overscroll: [{\n overscroll: scaleOverscroll()\n }],\n /**\n * Overscroll Behavior X\n * @see https://tailwindcss.com/docs/overscroll-behavior\n */\n 'overscroll-x': [{\n 'overscroll-x': scaleOverscroll()\n }],\n /**\n * Overscroll Behavior Y\n * @see https://tailwindcss.com/docs/overscroll-behavior\n */\n 'overscroll-y': [{\n 'overscroll-y': scaleOverscroll()\n }],\n /**\n * Position\n * @see https://tailwindcss.com/docs/position\n */\n position: ['static', 'fixed', 'absolute', 'relative', 'sticky'],\n /**\n * Top / Right / Bottom / Left\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n inset: [{\n inset: scaleInset()\n }],\n /**\n * Right / Left\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n 'inset-x': [{\n 'inset-x': scaleInset()\n }],\n /**\n * Top / Bottom\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n 'inset-y': [{\n 'inset-y': scaleInset()\n }],\n /**\n * Start\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n start: [{\n start: scaleInset()\n }],\n /**\n * End\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n end: [{\n end: scaleInset()\n }],\n /**\n * Top\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n top: [{\n top: scaleInset()\n }],\n /**\n * Right\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n right: [{\n right: scaleInset()\n }],\n /**\n * Bottom\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n bottom: [{\n bottom: scaleInset()\n }],\n /**\n * Left\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n left: [{\n left: scaleInset()\n }],\n /**\n * Visibility\n * @see https://tailwindcss.com/docs/visibility\n */\n visibility: ['visible', 'invisible', 'collapse'],\n /**\n * Z-Index\n * @see https://tailwindcss.com/docs/z-index\n */\n z: [{\n z: [isInteger, 'auto', isArbitraryVariable, isArbitraryValue]\n }],\n // ------------------------\n // --- Flexbox and Grid ---\n // ------------------------\n /**\n * Flex Basis\n * @see https://tailwindcss.com/docs/flex-basis\n */\n basis: [{\n basis: [isFraction, 'full', 'auto', themeContainer, ...scaleUnambiguousSpacing()]\n }],\n /**\n * Flex Direction\n * @see https://tailwindcss.com/docs/flex-direction\n */\n 'flex-direction': [{\n flex: ['row', 'row-reverse', 'col', 'col-reverse']\n }],\n /**\n * Flex Wrap\n * @see https://tailwindcss.com/docs/flex-wrap\n */\n 'flex-wrap': [{\n flex: ['nowrap', 'wrap', 'wrap-reverse']\n }],\n /**\n * Flex\n * @see https://tailwindcss.com/docs/flex\n */\n flex: [{\n flex: [isNumber, isFraction, 'auto', 'initial', 'none', isArbitraryValue]\n }],\n /**\n * Flex Grow\n * @see https://tailwindcss.com/docs/flex-grow\n */\n grow: [{\n grow: ['', isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Flex Shrink\n * @see https://tailwindcss.com/docs/flex-shrink\n */\n shrink: [{\n shrink: ['', isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Order\n * @see https://tailwindcss.com/docs/order\n */\n order: [{\n order: [isInteger, 'first', 'last', 'none', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Grid Template Columns\n * @see https://tailwindcss.com/docs/grid-template-columns\n */\n 'grid-cols': [{\n 'grid-cols': scaleGridTemplateColsRows()\n }],\n /**\n * Grid Column Start / End\n * @see https://tailwindcss.com/docs/grid-column\n */\n 'col-start-end': [{\n col: scaleGridColRowStartAndEnd()\n }],\n /**\n * Grid Column Start\n * @see https://tailwindcss.com/docs/grid-column\n */\n 'col-start': [{\n 'col-start': scaleGridColRowStartOrEnd()\n }],\n /**\n * Grid Column End\n * @see https://tailwindcss.com/docs/grid-column\n */\n 'col-end': [{\n 'col-end': scaleGridColRowStartOrEnd()\n }],\n /**\n * Grid Template Rows\n * @see https://tailwindcss.com/docs/grid-template-rows\n */\n 'grid-rows': [{\n 'grid-rows': scaleGridTemplateColsRows()\n }],\n /**\n * Grid Row Start / End\n * @see https://tailwindcss.com/docs/grid-row\n */\n 'row-start-end': [{\n row: scaleGridColRowStartAndEnd()\n }],\n /**\n * Grid Row Start\n * @see https://tailwindcss.com/docs/grid-row\n */\n 'row-start': [{\n 'row-start': scaleGridColRowStartOrEnd()\n }],\n /**\n * Grid Row End\n * @see https://tailwindcss.com/docs/grid-row\n */\n 'row-end': [{\n 'row-end': scaleGridColRowStartOrEnd()\n }],\n /**\n * Grid Auto Flow\n * @see https://tailwindcss.com/docs/grid-auto-flow\n */\n 'grid-flow': [{\n 'grid-flow': ['row', 'col', 'dense', 'row-dense', 'col-dense']\n }],\n /**\n * Grid Auto Columns\n * @see https://tailwindcss.com/docs/grid-auto-columns\n */\n 'auto-cols': [{\n 'auto-cols': scaleGridAutoColsRows()\n }],\n /**\n * Grid Auto Rows\n * @see https://tailwindcss.com/docs/grid-auto-rows\n */\n 'auto-rows': [{\n 'auto-rows': scaleGridAutoColsRows()\n }],\n /**\n * Gap\n * @see https://tailwindcss.com/docs/gap\n */\n gap: [{\n gap: scaleUnambiguousSpacing()\n }],\n /**\n * Gap X\n * @see https://tailwindcss.com/docs/gap\n */\n 'gap-x': [{\n 'gap-x': scaleUnambiguousSpacing()\n }],\n /**\n * Gap Y\n * @see https://tailwindcss.com/docs/gap\n */\n 'gap-y': [{\n 'gap-y': scaleUnambiguousSpacing()\n }],\n /**\n * Justify Content\n * @see https://tailwindcss.com/docs/justify-content\n */\n 'justify-content': [{\n justify: [...scaleAlignPrimaryAxis(), 'normal']\n }],\n /**\n * Justify Items\n * @see https://tailwindcss.com/docs/justify-items\n */\n 'justify-items': [{\n 'justify-items': [...scaleAlignSecondaryAxis(), 'normal']\n }],\n /**\n * Justify Self\n * @see https://tailwindcss.com/docs/justify-self\n */\n 'justify-self': [{\n 'justify-self': ['auto', ...scaleAlignSecondaryAxis()]\n }],\n /**\n * Align Content\n * @see https://tailwindcss.com/docs/align-content\n */\n 'align-content': [{\n content: ['normal', ...scaleAlignPrimaryAxis()]\n }],\n /**\n * Align Items\n * @see https://tailwindcss.com/docs/align-items\n */\n 'align-items': [{\n items: [...scaleAlignSecondaryAxis(), {\n baseline: ['', 'last']\n }]\n }],\n /**\n * Align Self\n * @see https://tailwindcss.com/docs/align-self\n */\n 'align-self': [{\n self: ['auto', ...scaleAlignSecondaryAxis(), {\n baseline: ['', 'last']\n }]\n }],\n /**\n * Place Content\n * @see https://tailwindcss.com/docs/place-content\n */\n 'place-content': [{\n 'place-content': scaleAlignPrimaryAxis()\n }],\n /**\n * Place Items\n * @see https://tailwindcss.com/docs/place-items\n */\n 'place-items': [{\n 'place-items': [...scaleAlignSecondaryAxis(), 'baseline']\n }],\n /**\n * Place Self\n * @see https://tailwindcss.com/docs/place-self\n */\n 'place-self': [{\n 'place-self': ['auto', ...scaleAlignSecondaryAxis()]\n }],\n // Spacing\n /**\n * Padding\n * @see https://tailwindcss.com/docs/padding\n */\n p: [{\n p: scaleUnambiguousSpacing()\n }],\n /**\n * Padding X\n * @see https://tailwindcss.com/docs/padding\n */\n px: [{\n px: scaleUnambiguousSpacing()\n }],\n /**\n * Padding Y\n * @see https://tailwindcss.com/docs/padding\n */\n py: [{\n py: scaleUnambiguousSpacing()\n }],\n /**\n * Padding Start\n * @see https://tailwindcss.com/docs/padding\n */\n ps: [{\n ps: scaleUnambiguousSpacing()\n }],\n /**\n * Padding End\n * @see https://tailwindcss.com/docs/padding\n */\n pe: [{\n pe: scaleUnambiguousSpacing()\n }],\n /**\n * Padding Top\n * @see https://tailwindcss.com/docs/padding\n */\n pt: [{\n pt: scaleUnambiguousSpacing()\n }],\n /**\n * Padding Right\n * @see https://tailwindcss.com/docs/padding\n */\n pr: [{\n pr: scaleUnambiguousSpacing()\n }],\n /**\n * Padding Bottom\n * @see https://tailwindcss.com/docs/padding\n */\n pb: [{\n pb: scaleUnambiguousSpacing()\n }],\n /**\n * Padding Left\n * @see https://tailwindcss.com/docs/padding\n */\n pl: [{\n pl: scaleUnambiguousSpacing()\n }],\n /**\n * Margin\n * @see https://tailwindcss.com/docs/margin\n */\n m: [{\n m: scaleMargin()\n }],\n /**\n * Margin X\n * @see https://tailwindcss.com/docs/margin\n */\n mx: [{\n mx: scaleMargin()\n }],\n /**\n * Margin Y\n * @see https://tailwindcss.com/docs/margin\n */\n my: [{\n my: scaleMargin()\n }],\n /**\n * Margin Start\n * @see https://tailwindcss.com/docs/margin\n */\n ms: [{\n ms: scaleMargin()\n }],\n /**\n * Margin End\n * @see https://tailwindcss.com/docs/margin\n */\n me: [{\n me: scaleMargin()\n }],\n /**\n * Margin Top\n * @see https://tailwindcss.com/docs/margin\n */\n mt: [{\n mt: scaleMargin()\n }],\n /**\n * Margin Right\n * @see https://tailwindcss.com/docs/margin\n */\n mr: [{\n mr: scaleMargin()\n }],\n /**\n * Margin Bottom\n * @see https://tailwindcss.com/docs/margin\n */\n mb: [{\n mb: scaleMargin()\n }],\n /**\n * Margin Left\n * @see https://tailwindcss.com/docs/margin\n */\n ml: [{\n ml: scaleMargin()\n }],\n /**\n * Space Between X\n * @see https://tailwindcss.com/docs/margin#adding-space-between-children\n */\n 'space-x': [{\n 'space-x': scaleUnambiguousSpacing()\n }],\n /**\n * Space Between X Reverse\n * @see https://tailwindcss.com/docs/margin#adding-space-between-children\n */\n 'space-x-reverse': ['space-x-reverse'],\n /**\n * Space Between Y\n * @see https://tailwindcss.com/docs/margin#adding-space-between-children\n */\n 'space-y': [{\n 'space-y': scaleUnambiguousSpacing()\n }],\n /**\n * Space Between Y Reverse\n * @see https://tailwindcss.com/docs/margin#adding-space-between-children\n */\n 'space-y-reverse': ['space-y-reverse'],\n // --------------\n // --- Sizing ---\n // --------------\n /**\n * Size\n * @see https://tailwindcss.com/docs/width#setting-both-width-and-height\n */\n size: [{\n size: scaleSizing()\n }],\n /**\n * Width\n * @see https://tailwindcss.com/docs/width\n */\n w: [{\n w: [themeContainer, 'screen', ...scaleSizing()]\n }],\n /**\n * Min-Width\n * @see https://tailwindcss.com/docs/min-width\n */\n 'min-w': [{\n 'min-w': [themeContainer, 'screen', /** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */\n 'none', ...scaleSizing()]\n }],\n /**\n * Max-Width\n * @see https://tailwindcss.com/docs/max-width\n */\n 'max-w': [{\n 'max-w': [themeContainer, 'screen', 'none', /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */\n 'prose', /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */\n {\n screen: [themeBreakpoint]\n }, ...scaleSizing()]\n }],\n /**\n * Height\n * @see https://tailwindcss.com/docs/height\n */\n h: [{\n h: ['screen', 'lh', ...scaleSizing()]\n }],\n /**\n * Min-Height\n * @see https://tailwindcss.com/docs/min-height\n */\n 'min-h': [{\n 'min-h': ['screen', 'lh', 'none', ...scaleSizing()]\n }],\n /**\n * Max-Height\n * @see https://tailwindcss.com/docs/max-height\n */\n 'max-h': [{\n 'max-h': ['screen', 'lh', ...scaleSizing()]\n }],\n // ------------------\n // --- Typography ---\n // ------------------\n /**\n * Font Size\n * @see https://tailwindcss.com/docs/font-size\n */\n 'font-size': [{\n text: ['base', themeText, isArbitraryVariableLength, isArbitraryLength]\n }],\n /**\n * Font Smoothing\n * @see https://tailwindcss.com/docs/font-smoothing\n */\n 'font-smoothing': ['antialiased', 'subpixel-antialiased'],\n /**\n * Font Style\n * @see https://tailwindcss.com/docs/font-style\n */\n 'font-style': ['italic', 'not-italic'],\n /**\n * Font Weight\n * @see https://tailwindcss.com/docs/font-weight\n */\n 'font-weight': [{\n font: [themeFontWeight, isArbitraryVariable, isArbitraryNumber]\n }],\n /**\n * Font Stretch\n * @see https://tailwindcss.com/docs/font-stretch\n */\n 'font-stretch': [{\n 'font-stretch': ['ultra-condensed', 'extra-condensed', 'condensed', 'semi-condensed', 'normal', 'semi-expanded', 'expanded', 'extra-expanded', 'ultra-expanded', isPercent, isArbitraryValue]\n }],\n /**\n * Font Family\n * @see https://tailwindcss.com/docs/font-family\n */\n 'font-family': [{\n font: [isArbitraryVariableFamilyName, isArbitraryValue, themeFont]\n }],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-normal': ['normal-nums'],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-ordinal': ['ordinal'],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-slashed-zero': ['slashed-zero'],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-figure': ['lining-nums', 'oldstyle-nums'],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-spacing': ['proportional-nums', 'tabular-nums'],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-fraction': ['diagonal-fractions', 'stacked-fractions'],\n /**\n * Letter Spacing\n * @see https://tailwindcss.com/docs/letter-spacing\n */\n tracking: [{\n tracking: [themeTracking, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Line Clamp\n * @see https://tailwindcss.com/docs/line-clamp\n */\n 'line-clamp': [{\n 'line-clamp': [isNumber, 'none', isArbitraryVariable, isArbitraryNumber]\n }],\n /**\n * Line Height\n * @see https://tailwindcss.com/docs/line-height\n */\n leading: [{\n leading: [/** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */\n themeLeading, ...scaleUnambiguousSpacing()]\n }],\n /**\n * List Style Image\n * @see https://tailwindcss.com/docs/list-style-image\n */\n 'list-image': [{\n 'list-image': ['none', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * List Style Position\n * @see https://tailwindcss.com/docs/list-style-position\n */\n 'list-style-position': [{\n list: ['inside', 'outside']\n }],\n /**\n * List Style Type\n * @see https://tailwindcss.com/docs/list-style-type\n */\n 'list-style-type': [{\n list: ['disc', 'decimal', 'none', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Text Alignment\n * @see https://tailwindcss.com/docs/text-align\n */\n 'text-alignment': [{\n text: ['left', 'center', 'right', 'justify', 'start', 'end']\n }],\n /**\n * Placeholder Color\n * @deprecated since Tailwind CSS v3.0.0\n * @see https://v3.tailwindcss.com/docs/placeholder-color\n */\n 'placeholder-color': [{\n placeholder: scaleColor()\n }],\n /**\n * Text Color\n * @see https://tailwindcss.com/docs/text-color\n */\n 'text-color': [{\n text: scaleColor()\n }],\n /**\n * Text Decoration\n * @see https://tailwindcss.com/docs/text-decoration\n */\n 'text-decoration': ['underline', 'overline', 'line-through', 'no-underline'],\n /**\n * Text Decoration Style\n * @see https://tailwindcss.com/docs/text-decoration-style\n */\n 'text-decoration-style': [{\n decoration: [...scaleLineStyle(), 'wavy']\n }],\n /**\n * Text Decoration Thickness\n * @see https://tailwindcss.com/docs/text-decoration-thickness\n */\n 'text-decoration-thickness': [{\n decoration: [isNumber, 'from-font', 'auto', isArbitraryVariable, isArbitraryLength]\n }],\n /**\n * Text Decoration Color\n * @see https://tailwindcss.com/docs/text-decoration-color\n */\n 'text-decoration-color': [{\n decoration: scaleColor()\n }],\n /**\n * Text Underline Offset\n * @see https://tailwindcss.com/docs/text-underline-offset\n */\n 'underline-offset': [{\n 'underline-offset': [isNumber, 'auto', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Text Transform\n * @see https://tailwindcss.com/docs/text-transform\n */\n 'text-transform': ['uppercase', 'lowercase', 'capitalize', 'normal-case'],\n /**\n * Text Overflow\n * @see https://tailwindcss.com/docs/text-overflow\n */\n 'text-overflow': ['truncate', 'text-ellipsis', 'text-clip'],\n /**\n * Text Wrap\n * @see https://tailwindcss.com/docs/text-wrap\n */\n 'text-wrap': [{\n text: ['wrap', 'nowrap', 'balance', 'pretty']\n }],\n /**\n * Text Indent\n * @see https://tailwindcss.com/docs/text-indent\n */\n indent: [{\n indent: scaleUnambiguousSpacing()\n }],\n /**\n * Vertical Alignment\n * @see https://tailwindcss.com/docs/vertical-align\n */\n 'vertical-align': [{\n align: ['baseline', 'top', 'middle', 'bottom', 'text-top', 'text-bottom', 'sub', 'super', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Whitespace\n * @see https://tailwindcss.com/docs/whitespace\n */\n whitespace: [{\n whitespace: ['normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap', 'break-spaces']\n }],\n /**\n * Word Break\n * @see https://tailwindcss.com/docs/word-break\n */\n break: [{\n break: ['normal', 'words', 'all', 'keep']\n }],\n /**\n * Overflow Wrap\n * @see https://tailwindcss.com/docs/overflow-wrap\n */\n wrap: [{\n wrap: ['break-word', 'anywhere', 'normal']\n }],\n /**\n * Hyphens\n * @see https://tailwindcss.com/docs/hyphens\n */\n hyphens: [{\n hyphens: ['none', 'manual', 'auto']\n }],\n /**\n * Content\n * @see https://tailwindcss.com/docs/content\n */\n content: [{\n content: ['none', isArbitraryVariable, isArbitraryValue]\n }],\n // -------------------\n // --- Backgrounds ---\n // -------------------\n /**\n * Background Attachment\n * @see https://tailwindcss.com/docs/background-attachment\n */\n 'bg-attachment': [{\n bg: ['fixed', 'local', 'scroll']\n }],\n /**\n * Background Clip\n * @see https://tailwindcss.com/docs/background-clip\n */\n 'bg-clip': [{\n 'bg-clip': ['border', 'padding', 'content', 'text']\n }],\n /**\n * Background Origin\n * @see https://tailwindcss.com/docs/background-origin\n */\n 'bg-origin': [{\n 'bg-origin': ['border', 'padding', 'content']\n }],\n /**\n * Background Position\n * @see https://tailwindcss.com/docs/background-position\n */\n 'bg-position': [{\n bg: scaleBgPosition()\n }],\n /**\n * Background Repeat\n * @see https://tailwindcss.com/docs/background-repeat\n */\n 'bg-repeat': [{\n bg: scaleBgRepeat()\n }],\n /**\n * Background Size\n * @see https://tailwindcss.com/docs/background-size\n */\n 'bg-size': [{\n bg: scaleBgSize()\n }],\n /**\n * Background Image\n * @see https://tailwindcss.com/docs/background-image\n */\n 'bg-image': [{\n bg: ['none', {\n linear: [{\n to: ['t', 'tr', 'r', 'br', 'b', 'bl', 'l', 'tl']\n }, isInteger, isArbitraryVariable, isArbitraryValue],\n radial: ['', isArbitraryVariable, isArbitraryValue],\n conic: [isInteger, isArbitraryVariable, isArbitraryValue]\n }, isArbitraryVariableImage, isArbitraryImage]\n }],\n /**\n * Background Color\n * @see https://tailwindcss.com/docs/background-color\n */\n 'bg-color': [{\n bg: scaleColor()\n }],\n /**\n * Gradient Color Stops From Position\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-from-pos': [{\n from: scaleGradientStopPosition()\n }],\n /**\n * Gradient Color Stops Via Position\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-via-pos': [{\n via: scaleGradientStopPosition()\n }],\n /**\n * Gradient Color Stops To Position\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-to-pos': [{\n to: scaleGradientStopPosition()\n }],\n /**\n * Gradient Color Stops From\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-from': [{\n from: scaleColor()\n }],\n /**\n * Gradient Color Stops Via\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-via': [{\n via: scaleColor()\n }],\n /**\n * Gradient Color Stops To\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-to': [{\n to: scaleColor()\n }],\n // ---------------\n // --- Borders ---\n // ---------------\n /**\n * Border Radius\n * @see https://tailwindcss.com/docs/border-radius\n */\n rounded: [{\n rounded: scaleRadius()\n }],\n /**\n * Border Radius Start\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-s': [{\n 'rounded-s': scaleRadius()\n }],\n /**\n * Border Radius End\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-e': [{\n 'rounded-e': scaleRadius()\n }],\n /**\n * Border Radius Top\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-t': [{\n 'rounded-t': scaleRadius()\n }],\n /**\n * Border Radius Right\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-r': [{\n 'rounded-r': scaleRadius()\n }],\n /**\n * Border Radius Bottom\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-b': [{\n 'rounded-b': scaleRadius()\n }],\n /**\n * Border Radius Left\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-l': [{\n 'rounded-l': scaleRadius()\n }],\n /**\n * Border Radius Start Start\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-ss': [{\n 'rounded-ss': scaleRadius()\n }],\n /**\n * Border Radius Start End\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-se': [{\n 'rounded-se': scaleRadius()\n }],\n /**\n * Border Radius End End\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-ee': [{\n 'rounded-ee': scaleRadius()\n }],\n /**\n * Border Radius End Start\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-es': [{\n 'rounded-es': scaleRadius()\n }],\n /**\n * Border Radius Top Left\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-tl': [{\n 'rounded-tl': scaleRadius()\n }],\n /**\n * Border Radius Top Right\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-tr': [{\n 'rounded-tr': scaleRadius()\n }],\n /**\n * Border Radius Bottom Right\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-br': [{\n 'rounded-br': scaleRadius()\n }],\n /**\n * Border Radius Bottom Left\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-bl': [{\n 'rounded-bl': scaleRadius()\n }],\n /**\n * Border Width\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w': [{\n border: scaleBorderWidth()\n }],\n /**\n * Border Width X\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-x': [{\n 'border-x': scaleBorderWidth()\n }],\n /**\n * Border Width Y\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-y': [{\n 'border-y': scaleBorderWidth()\n }],\n /**\n * Border Width Start\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-s': [{\n 'border-s': scaleBorderWidth()\n }],\n /**\n * Border Width End\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-e': [{\n 'border-e': scaleBorderWidth()\n }],\n /**\n * Border Width Top\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-t': [{\n 'border-t': scaleBorderWidth()\n }],\n /**\n * Border Width Right\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-r': [{\n 'border-r': scaleBorderWidth()\n }],\n /**\n * Border Width Bottom\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-b': [{\n 'border-b': scaleBorderWidth()\n }],\n /**\n * Border Width Left\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-l': [{\n 'border-l': scaleBorderWidth()\n }],\n /**\n * Divide Width X\n * @see https://tailwindcss.com/docs/border-width#between-children\n */\n 'divide-x': [{\n 'divide-x': scaleBorderWidth()\n }],\n /**\n * Divide Width X Reverse\n * @see https://tailwindcss.com/docs/border-width#between-children\n */\n 'divide-x-reverse': ['divide-x-reverse'],\n /**\n * Divide Width Y\n * @see https://tailwindcss.com/docs/border-width#between-children\n */\n 'divide-y': [{\n 'divide-y': scaleBorderWidth()\n }],\n /**\n * Divide Width Y Reverse\n * @see https://tailwindcss.com/docs/border-width#between-children\n */\n 'divide-y-reverse': ['divide-y-reverse'],\n /**\n * Border Style\n * @see https://tailwindcss.com/docs/border-style\n */\n 'border-style': [{\n border: [...scaleLineStyle(), 'hidden', 'none']\n }],\n /**\n * Divide Style\n * @see https://tailwindcss.com/docs/border-style#setting-the-divider-style\n */\n 'divide-style': [{\n divide: [...scaleLineStyle(), 'hidden', 'none']\n }],\n /**\n * Border Color\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color': [{\n border: scaleColor()\n }],\n /**\n * Border Color X\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-x': [{\n 'border-x': scaleColor()\n }],\n /**\n * Border Color Y\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-y': [{\n 'border-y': scaleColor()\n }],\n /**\n * Border Color S\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-s': [{\n 'border-s': scaleColor()\n }],\n /**\n * Border Color E\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-e': [{\n 'border-e': scaleColor()\n }],\n /**\n * Border Color Top\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-t': [{\n 'border-t': scaleColor()\n }],\n /**\n * Border Color Right\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-r': [{\n 'border-r': scaleColor()\n }],\n /**\n * Border Color Bottom\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-b': [{\n 'border-b': scaleColor()\n }],\n /**\n * Border Color Left\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-l': [{\n 'border-l': scaleColor()\n }],\n /**\n * Divide Color\n * @see https://tailwindcss.com/docs/divide-color\n */\n 'divide-color': [{\n divide: scaleColor()\n }],\n /**\n * Outline Style\n * @see https://tailwindcss.com/docs/outline-style\n */\n 'outline-style': [{\n outline: [...scaleLineStyle(), 'none', 'hidden']\n }],\n /**\n * Outline Offset\n * @see https://tailwindcss.com/docs/outline-offset\n */\n 'outline-offset': [{\n 'outline-offset': [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Outline Width\n * @see https://tailwindcss.com/docs/outline-width\n */\n 'outline-w': [{\n outline: ['', isNumber, isArbitraryVariableLength, isArbitraryLength]\n }],\n /**\n * Outline Color\n * @see https://tailwindcss.com/docs/outline-color\n */\n 'outline-color': [{\n outline: scaleColor()\n }],\n // ---------------\n // --- Effects ---\n // ---------------\n /**\n * Box Shadow\n * @see https://tailwindcss.com/docs/box-shadow\n */\n shadow: [{\n shadow: [\n // Deprecated since Tailwind CSS v4.0.0\n '', 'none', themeShadow, isArbitraryVariableShadow, isArbitraryShadow]\n }],\n /**\n * Box Shadow Color\n * @see https://tailwindcss.com/docs/box-shadow#setting-the-shadow-color\n */\n 'shadow-color': [{\n shadow: scaleColor()\n }],\n /**\n * Inset Box Shadow\n * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-shadow\n */\n 'inset-shadow': [{\n 'inset-shadow': ['none', themeInsetShadow, isArbitraryVariableShadow, isArbitraryShadow]\n }],\n /**\n * Inset Box Shadow Color\n * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-shadow-color\n */\n 'inset-shadow-color': [{\n 'inset-shadow': scaleColor()\n }],\n /**\n * Ring Width\n * @see https://tailwindcss.com/docs/box-shadow#adding-a-ring\n */\n 'ring-w': [{\n ring: scaleBorderWidth()\n }],\n /**\n * Ring Width Inset\n * @see https://v3.tailwindcss.com/docs/ring-width#inset-rings\n * @deprecated since Tailwind CSS v4.0.0\n * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158\n */\n 'ring-w-inset': ['ring-inset'],\n /**\n * Ring Color\n * @see https://tailwindcss.com/docs/box-shadow#setting-the-ring-color\n */\n 'ring-color': [{\n ring: scaleColor()\n }],\n /**\n * Ring Offset Width\n * @see https://v3.tailwindcss.com/docs/ring-offset-width\n * @deprecated since Tailwind CSS v4.0.0\n * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158\n */\n 'ring-offset-w': [{\n 'ring-offset': [isNumber, isArbitraryLength]\n }],\n /**\n * Ring Offset Color\n * @see https://v3.tailwindcss.com/docs/ring-offset-color\n * @deprecated since Tailwind CSS v4.0.0\n * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158\n */\n 'ring-offset-color': [{\n 'ring-offset': scaleColor()\n }],\n /**\n * Inset Ring Width\n * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-ring\n */\n 'inset-ring-w': [{\n 'inset-ring': scaleBorderWidth()\n }],\n /**\n * Inset Ring Color\n * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-ring-color\n */\n 'inset-ring-color': [{\n 'inset-ring': scaleColor()\n }],\n /**\n * Text Shadow\n * @see https://tailwindcss.com/docs/text-shadow\n */\n 'text-shadow': [{\n 'text-shadow': ['none', themeTextShadow, isArbitraryVariableShadow, isArbitraryShadow]\n }],\n /**\n * Text Shadow Color\n * @see https://tailwindcss.com/docs/text-shadow#setting-the-shadow-color\n */\n 'text-shadow-color': [{\n 'text-shadow': scaleColor()\n }],\n /**\n * Opacity\n * @see https://tailwindcss.com/docs/opacity\n */\n opacity: [{\n opacity: [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Mix Blend Mode\n * @see https://tailwindcss.com/docs/mix-blend-mode\n */\n 'mix-blend': [{\n 'mix-blend': [...scaleBlendMode(), 'plus-darker', 'plus-lighter']\n }],\n /**\n * Background Blend Mode\n * @see https://tailwindcss.com/docs/background-blend-mode\n */\n 'bg-blend': [{\n 'bg-blend': scaleBlendMode()\n }],\n /**\n * Mask Clip\n * @see https://tailwindcss.com/docs/mask-clip\n */\n 'mask-clip': [{\n 'mask-clip': ['border', 'padding', 'content', 'fill', 'stroke', 'view']\n }, 'mask-no-clip'],\n /**\n * Mask Composite\n * @see https://tailwindcss.com/docs/mask-composite\n */\n 'mask-composite': [{\n mask: ['add', 'subtract', 'intersect', 'exclude']\n }],\n /**\n * Mask Image\n * @see https://tailwindcss.com/docs/mask-image\n */\n 'mask-image-linear-pos': [{\n 'mask-linear': [isNumber]\n }],\n 'mask-image-linear-from-pos': [{\n 'mask-linear-from': scaleMaskImagePosition()\n }],\n 'mask-image-linear-to-pos': [{\n 'mask-linear-to': scaleMaskImagePosition()\n }],\n 'mask-image-linear-from-color': [{\n 'mask-linear-from': scaleColor()\n }],\n 'mask-image-linear-to-color': [{\n 'mask-linear-to': scaleColor()\n }],\n 'mask-image-t-from-pos': [{\n 'mask-t-from': scaleMaskImagePosition()\n }],\n 'mask-image-t-to-pos': [{\n 'mask-t-to': scaleMaskImagePosition()\n }],\n 'mask-image-t-from-color': [{\n 'mask-t-from': scaleColor()\n }],\n 'mask-image-t-to-color': [{\n 'mask-t-to': scaleColor()\n }],\n 'mask-image-r-from-pos': [{\n 'mask-r-from': scaleMaskImagePosition()\n }],\n 'mask-image-r-to-pos': [{\n 'mask-r-to': scaleMaskImagePosition()\n }],\n 'mask-image-r-from-color': [{\n 'mask-r-from': scaleColor()\n }],\n 'mask-image-r-to-color': [{\n 'mask-r-to': scaleColor()\n }],\n 'mask-image-b-from-pos': [{\n 'mask-b-from': scaleMaskImagePosition()\n }],\n 'mask-image-b-to-pos': [{\n 'mask-b-to': scaleMaskImagePosition()\n }],\n 'mask-image-b-from-color': [{\n 'mask-b-from': scaleColor()\n }],\n 'mask-image-b-to-color': [{\n 'mask-b-to': scaleColor()\n }],\n 'mask-image-l-from-pos': [{\n 'mask-l-from': scaleMaskImagePosition()\n }],\n 'mask-image-l-to-pos': [{\n 'mask-l-to': scaleMaskImagePosition()\n }],\n 'mask-image-l-from-color': [{\n 'mask-l-from': scaleColor()\n }],\n 'mask-image-l-to-color': [{\n 'mask-l-to': scaleColor()\n }],\n 'mask-image-x-from-pos': [{\n 'mask-x-from': scaleMaskImagePosition()\n }],\n 'mask-image-x-to-pos': [{\n 'mask-x-to': scaleMaskImagePosition()\n }],\n 'mask-image-x-from-color': [{\n 'mask-x-from': scaleColor()\n }],\n 'mask-image-x-to-color': [{\n 'mask-x-to': scaleColor()\n }],\n 'mask-image-y-from-pos': [{\n 'mask-y-from': scaleMaskImagePosition()\n }],\n 'mask-image-y-to-pos': [{\n 'mask-y-to': scaleMaskImagePosition()\n }],\n 'mask-image-y-from-color': [{\n 'mask-y-from': scaleColor()\n }],\n 'mask-image-y-to-color': [{\n 'mask-y-to': scaleColor()\n }],\n 'mask-image-radial': [{\n 'mask-radial': [isArbitraryVariable, isArbitraryValue]\n }],\n 'mask-image-radial-from-pos': [{\n 'mask-radial-from': scaleMaskImagePosition()\n }],\n 'mask-image-radial-to-pos': [{\n 'mask-radial-to': scaleMaskImagePosition()\n }],\n 'mask-image-radial-from-color': [{\n 'mask-radial-from': scaleColor()\n }],\n 'mask-image-radial-to-color': [{\n 'mask-radial-to': scaleColor()\n }],\n 'mask-image-radial-shape': [{\n 'mask-radial': ['circle', 'ellipse']\n }],\n 'mask-image-radial-size': [{\n 'mask-radial': [{\n closest: ['side', 'corner'],\n farthest: ['side', 'corner']\n }]\n }],\n 'mask-image-radial-pos': [{\n 'mask-radial-at': scalePosition()\n }],\n 'mask-image-conic-pos': [{\n 'mask-conic': [isNumber]\n }],\n 'mask-image-conic-from-pos': [{\n 'mask-conic-from': scaleMaskImagePosition()\n }],\n 'mask-image-conic-to-pos': [{\n 'mask-conic-to': scaleMaskImagePosition()\n }],\n 'mask-image-conic-from-color': [{\n 'mask-conic-from': scaleColor()\n }],\n 'mask-image-conic-to-color': [{\n 'mask-conic-to': scaleColor()\n }],\n /**\n * Mask Mode\n * @see https://tailwindcss.com/docs/mask-mode\n */\n 'mask-mode': [{\n mask: ['alpha', 'luminance', 'match']\n }],\n /**\n * Mask Origin\n * @see https://tailwindcss.com/docs/mask-origin\n */\n 'mask-origin': [{\n 'mask-origin': ['border', 'padding', 'content', 'fill', 'stroke', 'view']\n }],\n /**\n * Mask Position\n * @see https://tailwindcss.com/docs/mask-position\n */\n 'mask-position': [{\n mask: scaleBgPosition()\n }],\n /**\n * Mask Repeat\n * @see https://tailwindcss.com/docs/mask-repeat\n */\n 'mask-repeat': [{\n mask: scaleBgRepeat()\n }],\n /**\n * Mask Size\n * @see https://tailwindcss.com/docs/mask-size\n */\n 'mask-size': [{\n mask: scaleBgSize()\n }],\n /**\n * Mask Type\n * @see https://tailwindcss.com/docs/mask-type\n */\n 'mask-type': [{\n 'mask-type': ['alpha', 'luminance']\n }],\n /**\n * Mask Image\n * @see https://tailwindcss.com/docs/mask-image\n */\n 'mask-image': [{\n mask: ['none', isArbitraryVariable, isArbitraryValue]\n }],\n // ---------------\n // --- Filters ---\n // ---------------\n /**\n * Filter\n * @see https://tailwindcss.com/docs/filter\n */\n filter: [{\n filter: [\n // Deprecated since Tailwind CSS v3.0.0\n '', 'none', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Blur\n * @see https://tailwindcss.com/docs/blur\n */\n blur: [{\n blur: scaleBlur()\n }],\n /**\n * Brightness\n * @see https://tailwindcss.com/docs/brightness\n */\n brightness: [{\n brightness: [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Contrast\n * @see https://tailwindcss.com/docs/contrast\n */\n contrast: [{\n contrast: [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Drop Shadow\n * @see https://tailwindcss.com/docs/drop-shadow\n */\n 'drop-shadow': [{\n 'drop-shadow': [\n // Deprecated since Tailwind CSS v4.0.0\n '', 'none', themeDropShadow, isArbitraryVariableShadow, isArbitraryShadow]\n }],\n /**\n * Drop Shadow Color\n * @see https://tailwindcss.com/docs/filter-drop-shadow#setting-the-shadow-color\n */\n 'drop-shadow-color': [{\n 'drop-shadow': scaleColor()\n }],\n /**\n * Grayscale\n * @see https://tailwindcss.com/docs/grayscale\n */\n grayscale: [{\n grayscale: ['', isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Hue Rotate\n * @see https://tailwindcss.com/docs/hue-rotate\n */\n 'hue-rotate': [{\n 'hue-rotate': [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Invert\n * @see https://tailwindcss.com/docs/invert\n */\n invert: [{\n invert: ['', isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Saturate\n * @see https://tailwindcss.com/docs/saturate\n */\n saturate: [{\n saturate: [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Sepia\n * @see https://tailwindcss.com/docs/sepia\n */\n sepia: [{\n sepia: ['', isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Filter\n * @see https://tailwindcss.com/docs/backdrop-filter\n */\n 'backdrop-filter': [{\n 'backdrop-filter': [\n // Deprecated since Tailwind CSS v3.0.0\n '', 'none', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Blur\n * @see https://tailwindcss.com/docs/backdrop-blur\n */\n 'backdrop-blur': [{\n 'backdrop-blur': scaleBlur()\n }],\n /**\n * Backdrop Brightness\n * @see https://tailwindcss.com/docs/backdrop-brightness\n */\n 'backdrop-brightness': [{\n 'backdrop-brightness': [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Contrast\n * @see https://tailwindcss.com/docs/backdrop-contrast\n */\n 'backdrop-contrast': [{\n 'backdrop-contrast': [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Grayscale\n * @see https://tailwindcss.com/docs/backdrop-grayscale\n */\n 'backdrop-grayscale': [{\n 'backdrop-grayscale': ['', isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Hue Rotate\n * @see https://tailwindcss.com/docs/backdrop-hue-rotate\n */\n 'backdrop-hue-rotate': [{\n 'backdrop-hue-rotate': [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Invert\n * @see https://tailwindcss.com/docs/backdrop-invert\n */\n 'backdrop-invert': [{\n 'backdrop-invert': ['', isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Opacity\n * @see https://tailwindcss.com/docs/backdrop-opacity\n */\n 'backdrop-opacity': [{\n 'backdrop-opacity': [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Saturate\n * @see https://tailwindcss.com/docs/backdrop-saturate\n */\n 'backdrop-saturate': [{\n 'backdrop-saturate': [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Sepia\n * @see https://tailwindcss.com/docs/backdrop-sepia\n */\n 'backdrop-sepia': [{\n 'backdrop-sepia': ['', isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n // --------------\n // --- Tables ---\n // --------------\n /**\n * Border Collapse\n * @see https://tailwindcss.com/docs/border-collapse\n */\n 'border-collapse': [{\n border: ['collapse', 'separate']\n }],\n /**\n * Border Spacing\n * @see https://tailwindcss.com/docs/border-spacing\n */\n 'border-spacing': [{\n 'border-spacing': scaleUnambiguousSpacing()\n }],\n /**\n * Border Spacing X\n * @see https://tailwindcss.com/docs/border-spacing\n */\n 'border-spacing-x': [{\n 'border-spacing-x': scaleUnambiguousSpacing()\n }],\n /**\n * Border Spacing Y\n * @see https://tailwindcss.com/docs/border-spacing\n */\n 'border-spacing-y': [{\n 'border-spacing-y': scaleUnambiguousSpacing()\n }],\n /**\n * Table Layout\n * @see https://tailwindcss.com/docs/table-layout\n */\n 'table-layout': [{\n table: ['auto', 'fixed']\n }],\n /**\n * Caption Side\n * @see https://tailwindcss.com/docs/caption-side\n */\n caption: [{\n caption: ['top', 'bottom']\n }],\n // ---------------------------------\n // --- Transitions and Animation ---\n // ---------------------------------\n /**\n * Transition Property\n * @see https://tailwindcss.com/docs/transition-property\n */\n transition: [{\n transition: ['', 'all', 'colors', 'opacity', 'shadow', 'transform', 'none', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Transition Behavior\n * @see https://tailwindcss.com/docs/transition-behavior\n */\n 'transition-behavior': [{\n transition: ['normal', 'discrete']\n }],\n /**\n * Transition Duration\n * @see https://tailwindcss.com/docs/transition-duration\n */\n duration: [{\n duration: [isNumber, 'initial', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Transition Timing Function\n * @see https://tailwindcss.com/docs/transition-timing-function\n */\n ease: [{\n ease: ['linear', 'initial', themeEase, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Transition Delay\n * @see https://tailwindcss.com/docs/transition-delay\n */\n delay: [{\n delay: [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Animation\n * @see https://tailwindcss.com/docs/animation\n */\n animate: [{\n animate: ['none', themeAnimate, isArbitraryVariable, isArbitraryValue]\n }],\n // ------------------\n // --- Transforms ---\n // ------------------\n /**\n * Backface Visibility\n * @see https://tailwindcss.com/docs/backface-visibility\n */\n backface: [{\n backface: ['hidden', 'visible']\n }],\n /**\n * Perspective\n * @see https://tailwindcss.com/docs/perspective\n */\n perspective: [{\n perspective: [themePerspective, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Perspective Origin\n * @see https://tailwindcss.com/docs/perspective-origin\n */\n 'perspective-origin': [{\n 'perspective-origin': scalePositionWithArbitrary()\n }],\n /**\n * Rotate\n * @see https://tailwindcss.com/docs/rotate\n */\n rotate: [{\n rotate: scaleRotate()\n }],\n /**\n * Rotate X\n * @see https://tailwindcss.com/docs/rotate\n */\n 'rotate-x': [{\n 'rotate-x': scaleRotate()\n }],\n /**\n * Rotate Y\n * @see https://tailwindcss.com/docs/rotate\n */\n 'rotate-y': [{\n 'rotate-y': scaleRotate()\n }],\n /**\n * Rotate Z\n * @see https://tailwindcss.com/docs/rotate\n */\n 'rotate-z': [{\n 'rotate-z': scaleRotate()\n }],\n /**\n * Scale\n * @see https://tailwindcss.com/docs/scale\n */\n scale: [{\n scale: scaleScale()\n }],\n /**\n * Scale X\n * @see https://tailwindcss.com/docs/scale\n */\n 'scale-x': [{\n 'scale-x': scaleScale()\n }],\n /**\n * Scale Y\n * @see https://tailwindcss.com/docs/scale\n */\n 'scale-y': [{\n 'scale-y': scaleScale()\n }],\n /**\n * Scale Z\n * @see https://tailwindcss.com/docs/scale\n */\n 'scale-z': [{\n 'scale-z': scaleScale()\n }],\n /**\n * Scale 3D\n * @see https://tailwindcss.com/docs/scale\n */\n 'scale-3d': ['scale-3d'],\n /**\n * Skew\n * @see https://tailwindcss.com/docs/skew\n */\n skew: [{\n skew: scaleSkew()\n }],\n /**\n * Skew X\n * @see https://tailwindcss.com/docs/skew\n */\n 'skew-x': [{\n 'skew-x': scaleSkew()\n }],\n /**\n * Skew Y\n * @see https://tailwindcss.com/docs/skew\n */\n 'skew-y': [{\n 'skew-y': scaleSkew()\n }],\n /**\n * Transform\n * @see https://tailwindcss.com/docs/transform\n */\n transform: [{\n transform: [isArbitraryVariable, isArbitraryValue, '', 'none', 'gpu', 'cpu']\n }],\n /**\n * Transform Origin\n * @see https://tailwindcss.com/docs/transform-origin\n */\n 'transform-origin': [{\n origin: scalePositionWithArbitrary()\n }],\n /**\n * Transform Style\n * @see https://tailwindcss.com/docs/transform-style\n */\n 'transform-style': [{\n transform: ['3d', 'flat']\n }],\n /**\n * Translate\n * @see https://tailwindcss.com/docs/translate\n */\n translate: [{\n translate: scaleTranslate()\n }],\n /**\n * Translate X\n * @see https://tailwindcss.com/docs/translate\n */\n 'translate-x': [{\n 'translate-x': scaleTranslate()\n }],\n /**\n * Translate Y\n * @see https://tailwindcss.com/docs/translate\n */\n 'translate-y': [{\n 'translate-y': scaleTranslate()\n }],\n /**\n * Translate Z\n * @see https://tailwindcss.com/docs/translate\n */\n 'translate-z': [{\n 'translate-z': scaleTranslate()\n }],\n /**\n * Translate None\n * @see https://tailwindcss.com/docs/translate\n */\n 'translate-none': ['translate-none'],\n // ---------------------\n // --- Interactivity ---\n // ---------------------\n /**\n * Accent Color\n * @see https://tailwindcss.com/docs/accent-color\n */\n accent: [{\n accent: scaleColor()\n }],\n /**\n * Appearance\n * @see https://tailwindcss.com/docs/appearance\n */\n appearance: [{\n appearance: ['none', 'auto']\n }],\n /**\n * Caret Color\n * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities\n */\n 'caret-color': [{\n caret: scaleColor()\n }],\n /**\n * Color Scheme\n * @see https://tailwindcss.com/docs/color-scheme\n */\n 'color-scheme': [{\n scheme: ['normal', 'dark', 'light', 'light-dark', 'only-dark', 'only-light']\n }],\n /**\n * Cursor\n * @see https://tailwindcss.com/docs/cursor\n */\n cursor: [{\n cursor: ['auto', 'default', 'pointer', 'wait', 'text', 'move', 'help', 'not-allowed', 'none', 'context-menu', 'progress', 'cell', 'crosshair', 'vertical-text', 'alias', 'copy', 'no-drop', 'grab', 'grabbing', 'all-scroll', 'col-resize', 'row-resize', 'n-resize', 'e-resize', 's-resize', 'w-resize', 'ne-resize', 'nw-resize', 'se-resize', 'sw-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 'zoom-in', 'zoom-out', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Field Sizing\n * @see https://tailwindcss.com/docs/field-sizing\n */\n 'field-sizing': [{\n 'field-sizing': ['fixed', 'content']\n }],\n /**\n * Pointer Events\n * @see https://tailwindcss.com/docs/pointer-events\n */\n 'pointer-events': [{\n 'pointer-events': ['auto', 'none']\n }],\n /**\n * Resize\n * @see https://tailwindcss.com/docs/resize\n */\n resize: [{\n resize: ['none', '', 'y', 'x']\n }],\n /**\n * Scroll Behavior\n * @see https://tailwindcss.com/docs/scroll-behavior\n */\n 'scroll-behavior': [{\n scroll: ['auto', 'smooth']\n }],\n /**\n * Scroll Margin\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-m': [{\n 'scroll-m': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin X\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-mx': [{\n 'scroll-mx': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin Y\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-my': [{\n 'scroll-my': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin Start\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-ms': [{\n 'scroll-ms': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin End\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-me': [{\n 'scroll-me': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin Top\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-mt': [{\n 'scroll-mt': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin Right\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-mr': [{\n 'scroll-mr': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin Bottom\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-mb': [{\n 'scroll-mb': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin Left\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-ml': [{\n 'scroll-ml': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-p': [{\n 'scroll-p': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding X\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-px': [{\n 'scroll-px': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding Y\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-py': [{\n 'scroll-py': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding Start\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-ps': [{\n 'scroll-ps': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding End\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pe': [{\n 'scroll-pe': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding Top\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pt': [{\n 'scroll-pt': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding Right\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pr': [{\n 'scroll-pr': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding Bottom\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pb': [{\n 'scroll-pb': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding Left\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pl': [{\n 'scroll-pl': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Snap Align\n * @see https://tailwindcss.com/docs/scroll-snap-align\n */\n 'snap-align': [{\n snap: ['start', 'end', 'center', 'align-none']\n }],\n /**\n * Scroll Snap Stop\n * @see https://tailwindcss.com/docs/scroll-snap-stop\n */\n 'snap-stop': [{\n snap: ['normal', 'always']\n }],\n /**\n * Scroll Snap Type\n * @see https://tailwindcss.com/docs/scroll-snap-type\n */\n 'snap-type': [{\n snap: ['none', 'x', 'y', 'both']\n }],\n /**\n * Scroll Snap Type Strictness\n * @see https://tailwindcss.com/docs/scroll-snap-type\n */\n 'snap-strictness': [{\n snap: ['mandatory', 'proximity']\n }],\n /**\n * Touch Action\n * @see https://tailwindcss.com/docs/touch-action\n */\n touch: [{\n touch: ['auto', 'none', 'manipulation']\n }],\n /**\n * Touch Action X\n * @see https://tailwindcss.com/docs/touch-action\n */\n 'touch-x': [{\n 'touch-pan': ['x', 'left', 'right']\n }],\n /**\n * Touch Action Y\n * @see https://tailwindcss.com/docs/touch-action\n */\n 'touch-y': [{\n 'touch-pan': ['y', 'up', 'down']\n }],\n /**\n * Touch Action Pinch Zoom\n * @see https://tailwindcss.com/docs/touch-action\n */\n 'touch-pz': ['touch-pinch-zoom'],\n /**\n * User Select\n * @see https://tailwindcss.com/docs/user-select\n */\n select: [{\n select: ['none', 'text', 'all', 'auto']\n }],\n /**\n * Will Change\n * @see https://tailwindcss.com/docs/will-change\n */\n 'will-change': [{\n 'will-change': ['auto', 'scroll', 'contents', 'transform', isArbitraryVariable, isArbitraryValue]\n }],\n // -----------\n // --- SVG ---\n // -----------\n /**\n * Fill\n * @see https://tailwindcss.com/docs/fill\n */\n fill: [{\n fill: ['none', ...scaleColor()]\n }],\n /**\n * Stroke Width\n * @see https://tailwindcss.com/docs/stroke-width\n */\n 'stroke-w': [{\n stroke: [isNumber, isArbitraryVariableLength, isArbitraryLength, isArbitraryNumber]\n }],\n /**\n * Stroke\n * @see https://tailwindcss.com/docs/stroke\n */\n stroke: [{\n stroke: ['none', ...scaleColor()]\n }],\n // ---------------------\n // --- Accessibility ---\n // ---------------------\n /**\n * Forced Color Adjust\n * @see https://tailwindcss.com/docs/forced-color-adjust\n */\n 'forced-color-adjust': [{\n 'forced-color-adjust': ['auto', 'none']\n }]\n },\n conflictingClassGroups: {\n overflow: ['overflow-x', 'overflow-y'],\n overscroll: ['overscroll-x', 'overscroll-y'],\n inset: ['inset-x', 'inset-y', 'start', 'end', 'top', 'right', 'bottom', 'left'],\n 'inset-x': ['right', 'left'],\n 'inset-y': ['top', 'bottom'],\n flex: ['basis', 'grow', 'shrink'],\n gap: ['gap-x', 'gap-y'],\n p: ['px', 'py', 'ps', 'pe', 'pt', 'pr', 'pb', 'pl'],\n px: ['pr', 'pl'],\n py: ['pt', 'pb'],\n m: ['mx', 'my', 'ms', 'me', 'mt', 'mr', 'mb', 'ml'],\n mx: ['mr', 'ml'],\n my: ['mt', 'mb'],\n size: ['w', 'h'],\n 'font-size': ['leading'],\n 'fvn-normal': ['fvn-ordinal', 'fvn-slashed-zero', 'fvn-figure', 'fvn-spacing', 'fvn-fraction'],\n 'fvn-ordinal': ['fvn-normal'],\n 'fvn-slashed-zero': ['fvn-normal'],\n 'fvn-figure': ['fvn-normal'],\n 'fvn-spacing': ['fvn-normal'],\n 'fvn-fraction': ['fvn-normal'],\n 'line-clamp': ['display', 'overflow'],\n rounded: ['rounded-s', 'rounded-e', 'rounded-t', 'rounded-r', 'rounded-b', 'rounded-l', 'rounded-ss', 'rounded-se', 'rounded-ee', 'rounded-es', 'rounded-tl', 'rounded-tr', 'rounded-br', 'rounded-bl'],\n 'rounded-s': ['rounded-ss', 'rounded-es'],\n 'rounded-e': ['rounded-se', 'rounded-ee'],\n 'rounded-t': ['rounded-tl', 'rounded-tr'],\n 'rounded-r': ['rounded-tr', 'rounded-br'],\n 'rounded-b': ['rounded-br', 'rounded-bl'],\n 'rounded-l': ['rounded-tl', 'rounded-bl'],\n 'border-spacing': ['border-spacing-x', 'border-spacing-y'],\n 'border-w': ['border-w-x', 'border-w-y', 'border-w-s', 'border-w-e', 'border-w-t', 'border-w-r', 'border-w-b', 'border-w-l'],\n 'border-w-x': ['border-w-r', 'border-w-l'],\n 'border-w-y': ['border-w-t', 'border-w-b'],\n 'border-color': ['border-color-x', 'border-color-y', 'border-color-s', 'border-color-e', 'border-color-t', 'border-color-r', 'border-color-b', 'border-color-l'],\n 'border-color-x': ['border-color-r', 'border-color-l'],\n 'border-color-y': ['border-color-t', 'border-color-b'],\n translate: ['translate-x', 'translate-y', 'translate-none'],\n 'translate-none': ['translate', 'translate-x', 'translate-y', 'translate-z'],\n 'scroll-m': ['scroll-mx', 'scroll-my', 'scroll-ms', 'scroll-me', 'scroll-mt', 'scroll-mr', 'scroll-mb', 'scroll-ml'],\n 'scroll-mx': ['scroll-mr', 'scroll-ml'],\n 'scroll-my': ['scroll-mt', 'scroll-mb'],\n 'scroll-p': ['scroll-px', 'scroll-py', 'scroll-ps', 'scroll-pe', 'scroll-pt', 'scroll-pr', 'scroll-pb', 'scroll-pl'],\n 'scroll-px': ['scroll-pr', 'scroll-pl'],\n 'scroll-py': ['scroll-pt', 'scroll-pb'],\n touch: ['touch-x', 'touch-y', 'touch-pz'],\n 'touch-x': ['touch'],\n 'touch-y': ['touch'],\n 'touch-pz': ['touch']\n },\n conflictingClassGroupModifiers: {\n 'font-size': ['leading']\n },\n orderSensitiveModifiers: ['*', '**', 'after', 'backdrop', 'before', 'details-content', 'file', 'first-letter', 'first-line', 'marker', 'placeholder', 'selection']\n };\n};\n\n/**\n * @param baseConfig Config where other config will be merged into. This object will be mutated.\n * @param configExtension Partial config to merge into the `baseConfig`.\n */\nconst mergeConfigs = (baseConfig, {\n cacheSize,\n prefix,\n experimentalParseClassName,\n extend = {},\n override = {}\n}) => {\n overrideProperty(baseConfig, 'cacheSize', cacheSize);\n overrideProperty(baseConfig, 'prefix', prefix);\n overrideProperty(baseConfig, 'experimentalParseClassName', experimentalParseClassName);\n overrideConfigProperties(baseConfig.theme, override.theme);\n overrideConfigProperties(baseConfig.classGroups, override.classGroups);\n overrideConfigProperties(baseConfig.conflictingClassGroups, override.conflictingClassGroups);\n overrideConfigProperties(baseConfig.conflictingClassGroupModifiers, override.conflictingClassGroupModifiers);\n overrideProperty(baseConfig, 'orderSensitiveModifiers', override.orderSensitiveModifiers);\n mergeConfigProperties(baseConfig.theme, extend.theme);\n mergeConfigProperties(baseConfig.classGroups, extend.classGroups);\n mergeConfigProperties(baseConfig.conflictingClassGroups, extend.conflictingClassGroups);\n mergeConfigProperties(baseConfig.conflictingClassGroupModifiers, extend.conflictingClassGroupModifiers);\n mergeArrayProperties(baseConfig, extend, 'orderSensitiveModifiers');\n return baseConfig;\n};\nconst overrideProperty = (baseObject, overrideKey, overrideValue) => {\n if (overrideValue !== undefined) {\n baseObject[overrideKey] = overrideValue;\n }\n};\nconst overrideConfigProperties = (baseObject, overrideObject) => {\n if (overrideObject) {\n for (const key in overrideObject) {\n overrideProperty(baseObject, key, overrideObject[key]);\n }\n }\n};\nconst mergeConfigProperties = (baseObject, mergeObject) => {\n if (mergeObject) {\n for (const key in mergeObject) {\n mergeArrayProperties(baseObject, mergeObject, key);\n }\n }\n};\nconst mergeArrayProperties = (baseObject, mergeObject, key) => {\n const mergeValue = mergeObject[key];\n if (mergeValue !== undefined) {\n baseObject[key] = baseObject[key] ? baseObject[key].concat(mergeValue) : mergeValue;\n }\n};\nconst extendTailwindMerge = (configExtension, ...createConfig) => typeof configExtension === 'function' ? createTailwindMerge(getDefaultConfig, configExtension, ...createConfig) : createTailwindMerge(() => mergeConfigs(getDefaultConfig(), configExtension), ...createConfig);\nconst twMerge = /*#__PURE__*/createTailwindMerge(getDefaultConfig);\nexport { createTailwindMerge, extendTailwindMerge, fromTheme, getDefaultConfig, mergeConfigs, twJoin, twMerge, validators };\n//# sourceMappingURL=bundle-mjs.mjs.map\n","import { type ClassValue, clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\n","/**\n * Copyright 2022 Joe Bell. All rights reserved.\n *\n * This file is licensed to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with the\n * License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or implied. See the\n * License for the specific language governing permissions and limitations under\n * the License.\n */ import { clsx } from \"clsx\";\nconst falsyToString = (value)=>typeof value === \"boolean\" ? `${value}` : value === 0 ? \"0\" : value;\nexport const cx = clsx;\nexport const cva = (base, config)=>(props)=>{\n var _config_compoundVariants;\n if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);\n const { variants, defaultVariants } = config;\n const getVariantClassNames = Object.keys(variants).map((variant)=>{\n const variantProp = props === null || props === void 0 ? void 0 : props[variant];\n const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];\n if (variantProp === null) return null;\n const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);\n return variants[variant][variantKey];\n });\n const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param)=>{\n let [key, value] = param;\n if (value === undefined) {\n return acc;\n }\n acc[key] = value;\n return acc;\n }, {});\n const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param)=>{\n let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;\n return Object.entries(compoundVariantOptions).every((param)=>{\n let [key, value] = param;\n return Array.isArray(value) ? value.includes({\n ...defaultVariants,\n ...propsWithoutUndefined\n }[key]) : ({\n ...defaultVariants,\n ...propsWithoutUndefined\n })[key] === value;\n }) ? [\n ...acc,\n cvClass,\n cvClassName\n ] : acc;\n }, []);\n return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);\n };\n\n","import { cva } from 'class-variance-authority';\n\nexport const avatarContainerStyles = cva(\n 'relative inline-flex items-center justify-center shrink-0 overflow-hidden',\n {\n variants: {\n shape: {\n circular: 'rounded-full',\n square: '',\n },\n size: {\n small: 'size-[16px]',\n md: 'size-[24px]',\n big: 'size-[32px]',\n },\n },\n compoundVariants: [\n {\n shape: 'square',\n size: 'small',\n className: 'rounded-[4px]',\n },\n {\n shape: 'square',\n size: 'md',\n className: 'rounded-[6px]',\n },\n {\n shape: 'square',\n size: 'big',\n className: 'rounded-[8px]',\n },\n ],\n defaultVariants: {\n shape: 'circular',\n size: 'small',\n },\n }\n);\n\nexport const avatarTextStyles = cva(\n 'font-[\"Inter\",sans-serif] font-normal text-center text-[var(--color-blue-800)]',\n {\n variants: {\n size: {\n small: 'text-[8px] leading-[16px]',\n md: 'text-[12px] leading-[20px]',\n big: 'text-[16px] leading-[24px]',\n },\n },\n defaultVariants: {\n size: 'small',\n },\n }\n);\n\nexport const avatarImageStyles = cva('absolute inset-0 w-full h-full object-cover');\n\n","// React\nimport { HTMLAttributes, forwardRef, useState, useMemo } from 'react';\n\n// Styles\nimport { cn } from '@/utils/cn';\nimport {\n avatarContainerStyles,\n avatarTextStyles,\n avatarImageStyles,\n} from './Avatar.styles';\n\nexport interface AvatarProps extends HTMLAttributes<HTMLDivElement> {\n /** The type of avatar to display */\n type?: 'text' | 'image';\n /** The shape of the avatar */\n shape?: 'circular' | 'square';\n /** The size of the avatar */\n size?: 'small' | 'md' | 'big';\n /** The initials to display when type is 'text' */\n initials?: string;\n /** The image source URL when type is 'image' */\n src?: string;\n /** Alt text for the image */\n alt?: string;\n /** Fallback initials to show when image fails to load */\n fallbackInitials?: string;\n}\n\n/**\n * Generates initials from a name string\n * Takes the first letter of the first two words\n */\nconst generateInitials = (name: string): string => {\n const words = name.trim().split(/\\s+/);\n if (words.length >= 2) {\n return (words[0][0] + words[1][0]).toUpperCase();\n }\n return name.slice(0, 2).toUpperCase();\n};\n\n/**\n * Generates a random placeholder image URL from picsum.photos\n */\nconst getPlaceholderImage = (seed: number, size: number): string => {\n return `https://picsum.photos/seed/${seed}/${size}/${size}`;\n};\n\nexport const Avatar = forwardRef<HTMLDivElement, AvatarProps>(\n (\n {\n className,\n type = 'text',\n shape = 'circular',\n size = 'small',\n initials = 'AR',\n src,\n alt = 'Avatar',\n fallbackInitials,\n ...props\n },\n ref\n ) => {\n const [imageError, setImageError] = useState(false);\n\n // Generate a stable random seed for placeholder images\n const placeholderSeed = useMemo(() => Math.floor(Math.random() * 1000), []);\n const imageSize = size === 'big' ? 64 : size === 'md' ? 48 : 32; // Use larger size for better quality\n\n // Determine the image source\n const imageSrc = src || getPlaceholderImage(placeholderSeed, imageSize);\n\n // Determine what to display\n const displayInitials = imageError && fallbackInitials\n ? fallbackInitials\n : initials;\n const shouldShowImage = type === 'image' && !imageError;\n\n const handleImageError = () => {\n setImageError(true);\n };\n\n // Background style for text variant (light blue gradient)\n const textBackgroundStyle = {\n backgroundImage:\n 'linear-gradient(90deg, rgba(21, 177, 205, 0.08) 0%, rgba(21, 177, 205, 0.08) 100%), linear-gradient(90deg, rgb(255, 255, 255) 0%, rgb(255, 255, 255) 100%)',\n };\n\n return (\n <div\n ref={ref}\n className={cn(avatarContainerStyles({ shape, size }), className)}\n style={!shouldShowImage ? textBackgroundStyle : undefined}\n role=\"img\"\n aria-label={alt}\n {...props}\n >\n {shouldShowImage ? (\n <img\n src={imageSrc}\n alt={alt}\n className={cn(avatarImageStyles())}\n onError={handleImageError}\n />\n ) : (\n <span className={cn(avatarTextStyles({ size }))}>\n {generateInitials(displayInitials)}\n </span>\n )}\n </div>\n );\n }\n);\n\nAvatar.displayName = 'Avatar';\n\n","import { cva } from 'class-variance-authority';\n\nexport const statusIndicatorContainerStyles = cva(\n 'relative inline-flex items-center justify-center shrink-0',\n {\n variants: {\n size: {\n small: 'w-2 h-2',\n medium: 'w-3 h-3',\n large: 'w-4 h-4',\n },\n },\n defaultVariants: {\n size: 'medium',\n },\n }\n);\n\nexport const statusIndicatorDotStyles = cva(\n 'w-full h-full rounded-full',\n {\n variants: {\n variant: {\n success: 'bg-[var(--color-green-1000)]',\n warning: 'bg-[var(--color-orange-800)]',\n error: 'bg-[var(--color-red-1000)]',\n info: 'bg-[var(--color-blue-800)]',\n neutral: 'bg-[var(--color-gray-600)]',\n },\n },\n defaultVariants: {\n variant: 'neutral',\n },\n }\n);\n\nexport const statusIndicatorPingStyles = cva(\n 'absolute w-full h-full rounded-full opacity-75 animate-ping',\n {\n variants: {\n variant: {\n success: 'bg-[var(--color-green-1000)]',\n warning: 'bg-[var(--color-orange-800)]',\n error: 'bg-[var(--color-red-1000)]',\n info: 'bg-[var(--color-blue-800)]',\n neutral: 'bg-[var(--color-gray-600)]',\n },\n },\n defaultVariants: {\n variant: 'neutral',\n },\n }\n);\n","import { HTMLAttributes, forwardRef } from 'react';\nimport { cn } from '@/utils/cn';\nimport {\n statusIndicatorContainerStyles,\n statusIndicatorDotStyles,\n statusIndicatorPingStyles,\n} from './StatusIndicator.styles';\n\nexport interface StatusIndicatorProps extends HTMLAttributes<HTMLDivElement> {\n variant?: 'success' | 'warning' | 'error' | 'info' | 'neutral';\n size?: 'small' | 'medium' | 'large';\n animated?: boolean;\n}\n\nconst variantLabels: Record<StatusIndicatorProps['variant'] & string, string> = {\n success: 'Success status',\n warning: 'Warning status',\n error: 'Error status',\n info: 'Info status',\n neutral: 'Neutral status',\n};\n\nexport const StatusIndicator = forwardRef<HTMLDivElement, StatusIndicatorProps>(\n (\n {\n className,\n variant = 'neutral',\n size = 'medium',\n animated = false,\n ...props\n },\n ref\n ) => {\n return (\n <div\n ref={ref}\n role=\"status\"\n aria-label={variantLabels[variant]}\n className={cn(statusIndicatorContainerStyles({ size }), className)}\n {...props}\n >\n {animated && (\n <span className={statusIndicatorPingStyles({ variant })} />\n )}\n <span className={statusIndicatorDotStyles({ variant })} />\n </div>\n );\n }\n);\n\nStatusIndicator.displayName = 'StatusIndicator';\n\n","// react / next\nimport { ReactNode, ElementType } from 'react';\n\n// utils\nimport { cn } from '@/utils/cn';\n\nexport type TypographyVariant =\n | 'display'\n | 'h1'\n | 'h2'\n | 'h3'\n | 'h4'\n | 'small'\n | 'tiny'\n | 'x-small'\n | 'column-header'\n | 'tag';\n\nexport type TypographyWeight =\n | 'thin'\n | 'extralight'\n | 'light'\n | 'regular'\n | 'medium'\n | 'semibold'\n | 'bold'\n | 'black';\n\nexport type TypographyFontFamily = 'serif' | 'sans';\n\nexport interface TypographyProps {\n variant: TypographyVariant;\n as?: ElementType;\n children: ReactNode;\n className?: string;\n color?: 'primary' | 'secondary' | 'inherit';\n weight?: TypographyWeight;\n fontFamily?: TypographyFontFamily;\n}\n\nconst variantClassMap: Record<TypographyVariant, string> = {\n display: 'typography-display',\n h1: 'typography-h1',\n h2: 'typography-h2',\n h3: 'typography-h3',\n h4: 'typography-h4',\n small: 'typography-small',\n tiny: 'typography-tiny',\n 'x-small': 'typography-x-small',\n 'column-header': 'typography-column-header',\n tag: 'typography-tag',\n};\n\nconst defaultElementMap: Record<TypographyVariant, ElementType> = {\n display: 'h1',\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h4',\n small: 'p',\n tiny: 'p',\n 'x-small': 'p',\n 'column-header': 'span',\n tag: 'span',\n};\n\nconst colorClassMap = {\n primary: 'text-[var(--color-gray-1000)]',\n secondary: 'text-[var(--color-gray-600)]',\n inherit: '',\n};\n\nconst weightClassMap: Record<TypographyWeight, string> = {\n thin: 'font-thin',\n extralight: 'font-extralight',\n light: 'font-light',\n regular: 'font-normal',\n medium: 'font-medium',\n semibold: 'font-semibold',\n bold: 'font-bold',\n black: 'font-black',\n};\n\nconst fontFamilyClassMap: Record<TypographyFontFamily, string> = {\n serif: '!font-heading',\n sans: '!font-body',\n};\n\nexport const Typography = ({\n variant,\n as,\n children,\n className,\n color = 'primary',\n weight,\n fontFamily,\n}: TypographyProps) => {\n const Component = as || defaultElementMap[variant];\n const variantClass = variantClassMap[variant];\n const colorClass = colorClassMap[color];\n const weightClass = weight ? weightClassMap[weight] : '';\n const fontFamilyClass = fontFamily ? fontFamilyClassMap[fontFamily] : '';\n\n return (\n <Component\n className={cn(\n variantClass,\n colorClass,\n weightClass,\n fontFamilyClass,\n className\n )}\n >\n {children}\n </Component>\n );\n};\n","import React from 'react';\n\nexport type LogoColorVariant =\n | 'dark'\n | 'darkTeal'\n | 'teal'\n | 'lightTeal'\n | 'orange'\n | 'white';\n\nconst colorMap: Record<LogoColorVariant, string> = {\n dark: 'rgba(0, 6, 38, 1)',\n darkTeal: 'rgba(2, 46, 64, 1)',\n teal: 'rgba(21, 177, 205, 1)',\n lightTeal: 'rgba(106, 234, 253, 1)',\n orange: 'rgba(255, 111, 0, 1)',\n white: 'rgba(255, 255, 255, 1)',\n};\n\nexport interface LogoAProps extends React.SVGProps<SVGSVGElement> {\n size?: number | string;\n colorVariant?: LogoColorVariant;\n}\n\nexport const LogoA: React.FC<LogoAProps> = ({\n size = 256,\n colorVariant = 'dark',\n ...props\n}) => {\n const color = colorMap[colorVariant];\n\n return (\n <svg\n {...props}\n width={size}\n height={size}\n viewBox=\"0 0 256 256\"\n fill=\"none\"\n >\n <path\n d=\"M35.2761 209.996L27.7832 218.211H11V227H79.5141V218.211H53.3838L48.1047 212.422L62.2011 175.529H138.132L151.434 212.289L146.041 218.211H120.914V227H206.306V218.211H192.664L187.404 212.441L115.029 30H79.7412L81.3306 34.872L93.5916 64.7535M46.0234 218.211H45.9098L46.9127 215.575L46.0234 218.211ZM126.496 162.633H73.9891L69.4858 157.703L97.7164 88.5402H103.223L113.383 113.951L126.269 146.182L130.923 157.818L126.515 162.652L126.496 162.633ZM131.548 159.06H131.567L133.024 162.652L131.548 159.06Z\"\n fill={color}\n />\n <path\n d=\"M233.477 227C239.841 227 245 221.791 245 215.365C245 208.938 239.841 203.729 233.477 203.729C227.113 203.729 221.954 208.938 221.954 215.365C221.954 221.791 227.113 227 233.477 227Z\"\n fill={color}\n />\n </svg>\n );\n};\n\nLogoA.displayName = 'LogoA';\n","import React from 'react';\n\nexport type LogoColorVariant =\n | 'dark'\n | 'darkTeal'\n | 'teal'\n | 'lightTeal'\n | 'orange'\n | 'white';\n\nconst colorMap: Record<LogoColorVariant, string> = {\n dark: 'rgba(0, 6, 38, 1)',\n darkTeal: 'rgba(2, 46, 64, 1)',\n teal: 'rgba(21, 177, 205, 1)',\n lightTeal: 'rgba(106, 234, 253, 1)',\n orange: 'rgba(255, 111, 0, 1)',\n white: 'rgba(255, 255, 255, 1)',\n};\n\nexport interface FullLogoProps extends React.SVGProps<SVGSVGElement> {\n size?: number | string;\n colorVariant?: LogoColorVariant;\n}\n\nexport const FullLogo: React.FC<FullLogoProps> = ({\n size = 163,\n colorVariant = 'dark',\n ...props\n}) => {\n const color = colorMap[colorVariant];\n // Original aspect ratio is 603:163\n const aspectRatio = 603 / 163;\n const height = typeof size === 'number' ? size : parseFloat(size);\n const width = height * aspectRatio;\n\n return (\n <svg\n {...props}\n width={width}\n height={height}\n viewBox=\"0 0 603 163\"\n fill=\"none\"\n >\n <g clipPath=\"url(#clip0_full_logo)\">\n <path\n d=\"M303.686 142.03C284.282 142.03 267.966 127.819 267.966 105.332C267.966 84.0925 278.722 69.1137 300.637 67.9807L314.384 93.9439H326.694V59.4543H301.96C284.723 59.4543 270.554 65.5226 260.642 75.2972C250.537 85.2639 244.862 99.0905 244.862 114.3C244.862 142.702 267.506 163.019 293.025 163.019C314.615 163.019 330.107 148.156 332.733 127.416C326.406 136.365 315.727 142.049 303.724 142.049L303.686 142.03Z\"\n fill={color}\n />\n <path\n d=\"M481.48 48.6811C490.204 48.6811 497.183 41.4797 497.183 32.9534C497.183 24.427 490.204 17.2256 481.48 17.2256C472.756 17.2256 465.547 24.2157 465.547 32.9534C465.547 41.691 472.526 48.6811 481.48 48.6811Z\"\n fill={color}\n />\n <path\n d=\"M570.942 141.588C550.868 141.588 534.724 126.072 534.724 102.912V101.376H603C603 78.8691 587.949 59.4351 562.87 59.4351C536.047 59.4351 513.787 84.7838 513.787 112.533C513.787 140.282 534.513 163 561.336 163C581.622 163 598.859 150.114 602.348 126.955C594.487 137.229 583.367 141.588 570.942 141.588ZM558.94 69.9202C570.501 69.9202 578.132 79.0996 578.132 92.6381H535.606C538.654 78.005 548.049 69.9202 558.94 69.9202Z\"\n fill={color}\n />\n <path\n d=\"M198.233 79.0995V57.2459L155.476 73.204L172.502 86.5313V148.866L168.073 153.667H146.81L84.8802 0H55.8901L57.7691 4.53204L67.8351 28.8438L19.9402 146.984L13.7856 153.667H0V160.811H56.2736V153.667H34.8187L30.4855 148.962L42.0662 118.947H104.437L115.366 148.847L110.937 153.667H90.3062V160.811H221.26V153.667H198.233V89.1622L213.725 78.0242L230.961 91.2362H240.088V59.4543H230.079C217.118 59.4543 204.847 64.6585 198.233 79.1188V79.0995ZM28.7791 153.667H28.6641L29.4885 151.516L28.7599 153.667H28.7791ZM51.7487 108.462L48.0483 104.448L71.2288 48.1818H75.7537L84.094 68.8448L94.6777 95.0577L98.4932 104.525L94.8694 108.462H51.7487ZM99.0109 105.543H99.03L100.219 108.462L99.0109 105.543Z\"\n fill={color}\n />\n <path\n d=\"M495.668 153.667V57.2459L452.911 73.204L469.918 86.5313V148.866L465.489 153.667H443.344L438.934 148.885V91.5627C438.934 72.7816 429.328 59.4543 411.229 59.4543H407.394C392.995 59.4543 382.737 68.1919 374.895 76.2766H374.799V1.92035L328.764 16.7839L349.05 29.6695V148.866L344.64 153.667H333.404V160.811H390.253V153.667H379.229L374.819 148.866V84.3421C379.401 80.6358 385.728 76.6991 392.707 76.6991C406.014 76.6991 413.223 84.5726 413.223 98.5528V148.866L408.794 153.667H399.706V160.811H514.745V153.667H495.687H495.668Z\"\n fill={color}\n />\n </g>\n <defs>\n <clipPath id=\"clip0_full_logo\">\n <rect width=\"603\" height=\"163\" fill=\"white\" />\n </clipPath>\n </defs>\n </svg>\n );\n};\n\nFullLogo.displayName = 'FullLogo';\n","import React, { useId } from 'react';\n\nexport type LogoColorVariant =\n | 'dark'\n | 'darkTeal'\n | 'teal'\n | 'lightTeal'\n | 'orange'\n | 'white';\n\nconst colorMap: Record<LogoColorVariant, string> = {\n dark: 'rgba(0, 6, 38, 1)',\n darkTeal: 'rgba(2, 46, 64, 1)',\n teal: 'rgba(21, 177, 205, 1)',\n lightTeal: 'rgba(106, 234, 253, 1)',\n orange: 'rgba(255, 111, 0, 1)',\n white: 'rgba(255, 255, 255, 1)',\n};\n\nexport interface SignatureAProps extends React.SVGProps<SVGSVGElement> {\n size?: number | string;\n colorVariant?: LogoColorVariant;\n animated?: boolean;\n animationDuration?: number;\n animationDelay?: number;\n}\n\nexport const SignatureA: React.FC<SignatureAProps> = ({\n size = 329,\n colorVariant = 'dark',\n animated = false,\n animationDuration = 2,\n animationDelay = 0,\n ...props\n}) => {\n const color = colorMap[colorVariant];\n const uniqueId = useId();\n\n // Path length for stroke animation (approximate value)\n const mainPathLength = 2800;\n\n if (animated) {\n return (\n <svg\n {...props}\n width={size}\n height={size}\n viewBox=\"0 0 329 329\"\n fill=\"none\"\n >\n <style>\n {`\n @keyframes drawSignature-${uniqueId.replace(/:/g, '')} {\n 0% {\n stroke-dashoffset: var(--path-length);\n fill-opacity: 0;\n }\n 80% {\n stroke-dashoffset: 0;\n fill-opacity: 0;\n }\n 100% {\n stroke-dashoffset: 0;\n fill-opacity: 1;\n }\n }\n @keyframes drawDot-${uniqueId.replace(/:/g, '')} {\n 0% {\n opacity: 0;\n transform: scale(0);\n }\n 100% {\n opacity: 1;\n transform: scale(1);\n }\n }\n `}\n </style>\n {/* Dot - appears at the end */}\n <path\n d=\"M239.997 257.024C239.13 256.261 238.348 255.328 237.671 254.268C236.994 253.208 236.55 252.126 236.359 251.066C236.169 250.006 236.359 249.179 236.93 248.585C239.659 245.277 243.233 242.118 247.696 239.107C252.138 236.095 256.601 234.59 261.063 234.59C263.2 234.59 264.595 235.375 265.293 236.922C265.97 238.47 266.309 240.018 266.309 241.587C266.309 244.302 265.568 246.443 264.13 247.991C262.692 249.539 260.831 250.854 258.61 251.914C256.389 252.996 254.062 253.907 251.63 254.692C249.198 255.455 247.04 256.24 245.095 257.024L242.768 258.191C241.795 258.191 240.886 257.809 239.997 257.024Z\"\n fill={color}\n style={{\n transformOrigin: '252px 247px',\n animation: `drawDot-${uniqueId.replace(/:/g, '')} 0.3s ease-out ${animationDelay + animationDuration * 0.9}s forwards`,\n opacity: 0,\n }}\n />\n {/* Main signature path */}\n <path\n d=\"M308.102 176.765C306.453 175.663 304.126 174.963 301.123 174.687C298.119 174.411 294.46 174.433 290.167 174.772C285.873 175.111 281.008 175.578 275.594 176.193C273.648 176.405 271.829 176.617 270.179 176.808L245.793 180.942C242.091 181.536 239.003 182.003 236.486 182.406C233.969 182.808 231.558 182.702 229.232 182.13L193.572 185.777C193.952 184.293 194.587 182.893 195.517 181.6C196.469 180.243 197.548 179.161 198.711 178.398C205.099 169.068 211.254 160.056 217.176 151.299C223.077 142.562 228.639 134.102 233.885 125.959L234.752 121.888L253.936 88.6814C253.936 87.3243 254.422 86.2641 255.395 85.4795C256.368 84.7162 257.045 83.4439 257.425 81.7051L260.344 73.2445C260.915 71.6966 261.465 70.0426 261.93 68.2826C262.417 66.5439 262.671 64.5082 262.671 62.1757C262.671 60.8186 262.459 59.1223 262.1 57.0866C261.698 55.051 261.084 53.1426 260.217 51.4038C259.35 49.6438 258.271 48.1595 257.024 46.8872C255.776 45.615 254.168 45 252.243 45C250.89 45 249.388 45.3817 247.738 46.1663C246.089 46.9509 244.439 47.9263 242.789 49.0925C241.139 50.2588 239.595 51.4674 238.136 52.7397C236.677 54.012 235.471 55.0298 234.498 55.7932L207.468 81.7263L206.008 82.5957L192.641 96.2939C192.429 96.2939 192.112 96.3999 191.626 96.5907C191.139 96.7816 190.801 96.8876 190.61 96.8876L122.04 164.763C120.094 164.763 117.493 163.894 114.193 162.134C110.915 160.374 107.023 159.505 102.56 159.505C101.587 159.505 100.53 159.802 99.3666 160.374C98.2033 160.947 97.3361 161.243 96.7439 161.243C95.9613 161.243 95.2422 160.798 94.5654 159.929C93.8885 159.059 92.7887 158.635 91.2236 158.635C86.5704 159.611 83.567 160.183 82.2134 160.374C80.8597 160.586 79.9714 160.671 79.5907 160.671C77.6448 159.886 76.397 159.696 75.8047 160.098C75.2125 160.501 74.7472 160.777 74.3453 160.968C73.7743 160.586 72.3149 160.247 69.9883 159.95C67.6617 159.674 65.5255 159.505 63.6008 159.505C60.682 159.505 56.6634 159.611 51.5449 159.802C46.4053 159.992 41.3715 160.629 36.4434 161.689C31.5153 162.749 27.2005 164.488 23.5203 166.926C19.8401 169.365 18 172.8 18 177.274C18 181.155 18.9518 184.462 20.8976 187.177C22.8435 189.912 25.3181 192.223 28.3215 194.174C31.3249 196.125 34.6667 197.524 38.3469 198.394C42.0271 199.263 45.6016 199.709 49.0915 199.709C51.2277 200.281 53.1524 200.09 54.9079 199.136C54.6964 199.136 55.7328 199.369 57.9536 199.857C60.1744 200.345 62.9451 200.79 66.2235 201.172C69.523 201.553 72.9494 201.999 76.545 202.465C80.1195 202.953 83.0806 203.207 85.4071 203.207L59.5399 232.915L54.0196 239.319C52.8563 240.294 52.4333 241.948 52.7294 244.281C53.0043 246.613 53.6389 247.779 54.6118 247.779C57.1287 247.779 60.3225 246.083 64.193 242.69C68.0636 239.297 72.1457 235.163 76.397 230.307C80.6694 225.451 84.9207 220.51 89.1931 215.464C93.4444 210.417 97.2303 206.24 100.53 202.932C100.911 202.932 101.312 202.974 101.693 203.08C102.074 203.165 102.455 203.228 102.856 203.228C115.822 203.228 127.878 202.847 139.045 202.062C150.192 201.299 160.407 200.896 169.692 200.896C166.985 205.37 164.066 209.929 160.978 214.594C157.89 219.259 154.591 224.115 151.101 229.162L127.285 264.701C125.932 266.842 124.726 268.984 123.648 271.104C122.569 273.225 122.061 275.366 122.061 277.508C122.061 279.056 122.59 280.371 123.648 281.431C124.705 282.491 125.826 283.042 126.989 283.042C129.316 283.042 131.346 282.364 133.081 281.007C134.815 279.65 136.613 278.038 138.453 276.193C140.293 274.349 142.197 272.44 144.121 270.511C146.046 268.56 148.373 267.012 151.08 265.846L182.467 237.007C182.658 236.414 183.102 235.777 183.758 235.12C184.434 234.442 185.259 233.615 186.232 232.639L197.273 223.33C200.192 220.807 202.941 217.881 205.543 214.573C208.166 211.286 209.477 209.145 209.477 208.169C209.477 206.027 208.229 204.967 205.712 204.967C205.331 204.967 204.697 205.116 203.83 205.413C202.962 205.709 201.947 206.346 200.784 207.3L156.896 248.076L146.152 255.646L149.049 251.575C149.832 250.218 151.186 248.034 153.132 245.023C155.056 242.012 157.192 238.725 159.519 235.12C161.846 231.537 164.32 227.805 166.943 223.903C169.566 220.022 172.019 216.418 174.367 213.11C176.693 209.823 178.724 207.045 180.458 204.819C182.193 202.592 183.44 201.278 184.223 200.875C184.604 200.684 185.386 200.493 186.55 200.302C186.803 200.281 187.121 200.281 187.374 200.239L196.871 199.433C201.672 199.009 206.304 198.161 210.746 196.931C215.166 195.68 219.798 194.853 224.6 194.407C226.122 194.301 228.893 193.983 232.891 193.474C236.909 192.965 241.266 192.393 245.941 191.757C250.615 191.142 254.993 190.527 259.075 189.912C263.157 189.297 265.991 188.852 267.599 188.555C269.206 188.258 270.602 188.025 271.787 187.834C272.971 187.664 274.431 187.516 276.165 187.41C276.313 187.41 276.503 187.177 276.651 187.134L281.579 186.583C284.435 186.265 286.888 186.095 288.961 186.095C291.013 186.095 292.514 186.18 293.445 186.392C292.726 188.152 292.112 189.361 291.563 190.039C291.034 190.718 290.59 191.142 290.23 191.333C289.871 191.524 289.659 191.672 289.596 191.757C289.532 191.842 289.532 192.181 289.596 192.796C289.807 194.768 291.647 195.531 295.116 195.15C295.708 195.086 296.491 194.81 297.421 194.323C298.352 193.835 299.325 193.305 300.319 192.732C301.313 192.16 302.286 191.545 303.195 190.909C304.126 190.272 304.782 189.7 305.184 189.191C306.072 188.937 307.299 188.046 308.885 186.477C310.45 184.929 311.169 183.402 311 181.875C310.746 179.628 309.794 177.931 308.145 176.829L308.102 176.765ZM96.7227 190.039C76.5662 189.276 60.9781 188.088 49.9375 186.54C38.8968 184.993 31.5364 181.981 27.8562 177.507C28.6388 176.15 31.3884 175.026 36.1473 174.157C40.885 173.288 46.0246 172.567 51.5449 171.973C57.0653 171.379 62.1414 170.955 66.7946 170.679C71.4477 170.383 74.0704 170.234 74.6415 170.234H79.2946C88.6009 170.807 96.0882 171.4 101.82 171.973C107.531 172.545 111.549 173.033 113.876 173.436L96.7227 190.039ZM147.146 188.576C136.592 188.958 125.488 189.255 113.876 189.446C115.23 187.495 117.366 184.971 120.263 181.875C123.182 178.78 126.376 175.472 129.845 171.973C133.335 168.474 137.015 164.891 140.885 161.201C144.756 157.511 148.436 154.013 151.926 150.705L172.273 129.14C172.654 127.973 173.33 127.401 174.303 127.401L184.181 118.092C185.154 117.71 186.55 116.629 188.411 114.89C190.251 113.151 192.176 111.201 194.206 109.08C196.237 106.96 198.182 104.818 200.023 102.676C201.863 100.535 203.259 98.902 204.231 97.7146L211.211 93.0496C213.919 90.3354 216.541 87.706 219.058 85.1827C221.575 82.6593 224.092 80.3268 226.609 78.1852L231.262 73.5202C233.99 70.9968 236.74 68.8128 239.553 66.968C242.345 65.1232 246.279 62.727 251.313 59.822V63.0239C251.313 66.3318 250.551 70.1062 248.986 74.3896C247.421 78.6729 245.877 82.3625 244.333 85.4583L184.181 180.137C182.446 181.494 180.881 183.445 179.528 185.968C168.487 187.325 157.679 188.194 147.125 188.597L147.146 188.576Z\"\n stroke={color}\n strokeWidth=\"2\"\n fill={color}\n style={\n {\n '--path-length': mainPathLength,\n strokeDasharray: mainPathLength,\n strokeDashoffset: mainPathLength,\n fillOpacity: 0,\n animation: `drawSignature-${uniqueId.replace(/:/g, '')} ${animationDuration}s ease-out ${animationDelay}s forwards`,\n } as React.CSSProperties\n }\n />\n </svg>\n );\n }\n\n return (\n <svg\n {...props}\n width={size}\n height={size}\n viewBox=\"0 0 329 329\"\n fill=\"none\"\n >\n <path\n d=\"M239.997 257.024C239.13 256.261 238.348 255.328 237.671 254.268C236.994 253.208 236.55 252.126 236.359 251.066C236.169 250.006 236.359 249.179 236.93 248.585C239.659 245.277 243.233 242.118 247.696 239.107C252.138 236.095 256.601 234.59 261.063 234.59C263.2 234.59 264.595 235.375 265.293 236.922C265.97 238.47 266.309 240.018 266.309 241.587C266.309 244.302 265.568 246.443 264.13 247.991C262.692 249.539 260.831 250.854 258.61 251.914C256.389 252.996 254.062 253.907 251.63 254.692C249.198 255.455 247.04 256.24 245.095 257.024L242.768 258.191C241.795 258.191 240.886 257.809 239.997 257.024Z\"\n fill={color}\n />\n <path\n d=\"M308.102 176.765C306.453 175.663 304.126 174.963 301.123 174.687C298.119 174.411 294.46 174.433 290.167 174.772C285.873 175.111 281.008 175.578 275.594 176.193C273.648 176.405 271.829 176.617 270.179 176.808L245.793 180.942C242.091 181.536 239.003 182.003 236.486 182.406C233.969 182.808 231.558 182.702 229.232 182.13L193.572 185.777C193.952 184.293 194.587 182.893 195.517 181.6C196.469 180.243 197.548 179.161 198.711 178.398C205.099 169.068 211.254 160.056 217.176 151.299C223.077 142.562 228.639 134.102 233.885 125.959L234.752 121.888L253.936 88.6814C253.936 87.3243 254.422 86.2641 255.395 85.4795C256.368 84.7162 257.045 83.4439 257.425 81.7051L260.344 73.2445C260.915 71.6966 261.465 70.0426 261.93 68.2826C262.417 66.5439 262.671 64.5082 262.671 62.1757C262.671 60.8186 262.459 59.1223 262.1 57.0866C261.698 55.051 261.084 53.1426 260.217 51.4038C259.35 49.6438 258.271 48.1595 257.024 46.8872C255.776 45.615 254.168 45 252.243 45C250.89 45 249.388 45.3817 247.738 46.1663C246.089 46.9509 244.439 47.9263 242.789 49.0925C241.139 50.2588 239.595 51.4674 238.136 52.7397C236.677 54.012 235.471 55.0298 234.498 55.7932L207.468 81.7263L206.008 82.5957L192.641 96.2939C192.429 96.2939 192.112 96.3999 191.626 96.5907C191.139 96.7816 190.801 96.8876 190.61 96.8876L122.04 164.763C120.094 164.763 117.493 163.894 114.193 162.134C110.915 160.374 107.023 159.505 102.56 159.505C101.587 159.505 100.53 159.802 99.3666 160.374C98.2033 160.947 97.3361 161.243 96.7439 161.243C95.9613 161.243 95.2422 160.798 94.5654 159.929C93.8885 159.059 92.7887 158.635 91.2236 158.635C86.5704 159.611 83.567 160.183 82.2134 160.374C80.8597 160.586 79.9714 160.671 79.5907 160.671C77.6448 159.886 76.397 159.696 75.8047 160.098C75.2125 160.501 74.7472 160.777 74.3453 160.968C73.7743 160.586 72.3149 160.247 69.9883 159.95C67.6617 159.674 65.5255 159.505 63.6008 159.505C60.682 159.505 56.6634 159.611 51.5449 159.802C46.4053 159.992 41.3715 160.629 36.4434 161.689C31.5153 162.749 27.2005 164.488 23.5203 166.926C19.8401 169.365 18 172.8 18 177.274C18 181.155 18.9518 184.462 20.8976 187.177C22.8435 189.912 25.3181 192.223 28.3215 194.174C31.3249 196.125 34.6667 197.524 38.3469 198.394C42.0271 199.263 45.6016 199.709 49.0915 199.709C51.2277 200.281 53.1524 200.09 54.9079 199.136C54.6964 199.136 55.7328 199.369 57.9536 199.857C60.1744 200.345 62.9451 200.79 66.2235 201.172C69.523 201.553 72.9494 201.999 76.545 202.465C80.1195 202.953 83.0806 203.207 85.4071 203.207L59.5399 232.915L54.0196 239.319C52.8563 240.294 52.4333 241.948 52.7294 244.281C53.0043 246.613 53.6389 247.779 54.6118 247.779C57.1287 247.779 60.3225 246.083 64.193 242.69C68.0636 239.297 72.1457 235.163 76.397 230.307C80.6694 225.451 84.9207 220.51 89.1931 215.464C93.4444 210.417 97.2303 206.24 100.53 202.932C100.911 202.932 101.312 202.974 101.693 203.08C102.074 203.165 102.455 203.228 102.856 203.228C115.822 203.228 127.878 202.847 139.045 202.062C150.192 201.299 160.407 200.896 169.692 200.896C166.985 205.37 164.066 209.929 160.978 214.594C157.89 219.259 154.591 224.115 151.101 229.162L127.285 264.701C125.932 266.842 124.726 268.984 123.648 271.104C122.569 273.225 122.061 275.366 122.061 277.508C122.061 279.056 122.59 280.371 123.648 281.431C124.705 282.491 125.826 283.042 126.989 283.042C129.316 283.042 131.346 282.364 133.081 281.007C134.815 279.65 136.613 278.038 138.453 276.193C140.293 274.349 142.197 272.44 144.121 270.511C146.046 268.56 148.373 267.012 151.08 265.846L182.467 237.007C182.658 236.414 183.102 235.777 183.758 235.12C184.434 234.442 185.259 233.615 186.232 232.639L197.273 223.33C200.192 220.807 202.941 217.881 205.543 214.573C208.166 211.286 209.477 209.145 209.477 208.169C209.477 206.027 208.229 204.967 205.712 204.967C205.331 204.967 204.697 205.116 203.83 205.413C202.962 205.709 201.947 206.346 200.784 207.3L156.896 248.076L146.152 255.646L149.049 251.575C149.832 250.218 151.186 248.034 153.132 245.023C155.056 242.012 157.192 238.725 159.519 235.12C161.846 231.537 164.32 227.805 166.943 223.903C169.566 220.022 172.019 216.418 174.367 213.11C176.693 209.823 178.724 207.045 180.458 204.819C182.193 202.592 183.44 201.278 184.223 200.875C184.604 200.684 185.386 200.493 186.55 200.302C186.803 200.281 187.121 200.281 187.374 200.239L196.871 199.433C201.672 199.009 206.304 198.161 210.746 196.931C215.166 195.68 219.798 194.853 224.6 194.407C226.122 194.301 228.893 193.983 232.891 193.474C236.909 192.965 241.266 192.393 245.941 191.757C250.615 191.142 254.993 190.527 259.075 189.912C263.157 189.297 265.991 188.852 267.599 188.555C269.206 188.258 270.602 188.025 271.787 187.834C272.971 187.664 274.431 187.516 276.165 187.41C276.313 187.41 276.503 187.177 276.651 187.134L281.579 186.583C284.435 186.265 286.888 186.095 288.961 186.095C291.013 186.095 292.514 186.18 293.445 186.392C292.726 188.152 292.112 189.361 291.563 190.039C291.034 190.718 290.59 191.142 290.23 191.333C289.871 191.524 289.659 191.672 289.596 191.757C289.532 191.842 289.532 192.181 289.596 192.796C289.807 194.768 291.647 195.531 295.116 195.15C295.708 195.086 296.491 194.81 297.421 194.323C298.352 193.835 299.325 193.305 300.319 192.732C301.313 192.16 302.286 191.545 303.195 190.909C304.126 190.272 304.782 189.7 305.184 189.191C306.072 188.937 307.299 188.046 308.885 186.477C310.45 184.929 311.169 183.402 311 181.875C310.746 179.628 309.794 177.931 308.145 176.829L308.102 176.765ZM96.7227 190.039C76.5662 189.276 60.9781 188.088 49.9375 186.54C38.8968 184.993 31.5364 181.981 27.8562 177.507C28.6388 176.15 31.3884 175.026 36.1473 174.157C40.885 173.288 46.0246 172.567 51.5449 171.973C57.0653 171.379 62.1414 170.955 66.7946 170.679C71.4477 170.383 74.0704 170.234 74.6415 170.234H79.2946C88.6009 170.807 96.0882 171.4 101.82 171.973C107.531 172.545 111.549 173.033 113.876 173.436L96.7227 190.039ZM147.146 188.576C136.592 188.958 125.488 189.255 113.876 189.446C115.23 187.495 117.366 184.971 120.263 181.875C123.182 178.78 126.376 175.472 129.845 171.973C133.335 168.474 137.015 164.891 140.885 161.201C144.756 157.511 148.436 154.013 151.926 150.705L172.273 129.14C172.654 127.973 173.33 127.401 174.303 127.401L184.181 118.092C185.154 117.71 186.55 116.629 188.411 114.89C190.251 113.151 192.176 111.201 194.206 109.08C196.237 106.96 198.182 104.818 200.023 102.676C201.863 100.535 203.259 98.902 204.231 97.7146L211.211 93.0496C213.919 90.3354 216.541 87.706 219.058 85.1827C221.575 82.6593 224.092 80.3268 226.609 78.1852L231.262 73.5202C233.99 70.9968 236.74 68.8128 239.553 66.968C242.345 65.1232 246.279 62.727 251.313 59.822V63.0239C251.313 66.3318 250.551 70.1062 248.986 74.3896C247.421 78.6729 245.877 82.3625 244.333 85.4583L184.181 180.137C182.446 181.494 180.881 183.445 179.528 185.968C168.487 187.325 157.679 188.194 147.125 188.597L147.146 188.576Z\"\n fill={color}\n />\n </svg>\n );\n};\n\nSignatureA.displayName = 'SignatureA';\n","import { cva } from 'class-variance-authority';\n\nexport const artifactCardStyles = cva(\n 'group relative flex items-center rounded-[8px] border box-border cursor-pointer w-full overflow-hidden isolate transition-[border-color] duration-300',\n {\n variants: {\n status: {\n normal: 'bg-[var(--color-white)] border-[var(--color-gray-200)]',\n hover: 'border-[var(--color-blue-800)]',\n generating:\n 'bg-[var(--color-white)] border-[var(--color-gray-200)] cursor-default',\n error: 'border-[var(--color-red-1000)]',\n },\n disabled: {\n true: 'opacity-50 cursor-not-allowed pointer-events-none',\n false: '',\n },\n },\n defaultVariants: {\n status: 'normal',\n disabled: false,\n },\n },\n);\n\n// Background layer for hover effect - solid colors instead of gradients\nexport const hoverBackgroundStyles = cva(\n 'absolute inset-0 -z-10 transition-opacity duration-300',\n {\n variants: {\n status: {\n normal: 'opacity-0 group-hover:opacity-100',\n hover: 'opacity-100',\n generating: 'opacity-0',\n error: 'opacity-100',\n },\n },\n defaultVariants: {\n status: 'normal',\n },\n },\n);\n\n// Solid background color styles\nexport const animatedGradientStyles = cva('absolute inset-0', {\n variants: {\n status: {\n normal: 'bg-[var(--color-blue-200)]',\n hover: 'bg-[var(--color-blue-200)]',\n generating: '',\n error: 'bg-[var(--color-red-200)]',\n },\n },\n defaultVariants: {\n status: 'normal',\n },\n});\n\nexport const previewContainerStyles = cva('flex gap-2 h-[75px] shrink-0', {\n variants: {\n status: {\n normal: 'p-2 items-end',\n hover: 'p-2 items-end',\n generating: 'px-4 py-2 items-center',\n error: 'px-4 py-2 items-center',\n },\n },\n defaultVariants: {\n status: 'normal',\n },\n});\n\nexport const previewBoxStyles = cva(\n 'relative -bottom-2 w-[60px] h-[66px] bg-[var(--color-gray-50)] border border-[var(--color-gray-200)] border-b-0 rounded-t-[4px] overflow-hidden transition-transform duration-300 group-hover:opacity-90 group-hover:shadow-sm',\n);\n\nexport const previewBoxInnerStyles = cva(\n 'w-full h-full bg-[var(--color-blue-200)]/30 p-2 space-y-2 flex flex-col items-start justify-start gap-1',\n);\n\nexport const skeletonLineStyles = cva(\n 'h-1 bg-[var(--color-gray-200)] rounded-full origin-left',\n);\n\nexport const contentContainerStyles = cva(\n 'flex flex-col gap-[4px] grow items-start p-4 min-w-0',\n);\n\nexport const titleStyles = cva(\n 'font-medium text-[14px] leading-[20px] text-[var(--color-blue-1000)]',\n);\n\nexport const subtitleStyles = cva(\n 'text-[12px] leading-[16px] text-[var(--color-gray-600)]',\n);\n\nexport const iconContainerStyles = cva(\n 'px-4 overflow-hidden flex items-center w-[56px] relative',\n);\n\nexport const iconActiveStyles = cva(\n 'absolute w-6 h-6 text-[var(--color-blue-800)]',\n);\n\nexport const iconInactiveStyles = cva('w-6 h-6 text-[var(--color-gray-200)]');\n\nexport const iconStyles = cva('w-4 h-4 shrink-0 transition-all duration-300', {\n variants: {\n status: {\n normal:\n 'text-[var(--color-blue-1000)] group-hover:text-[var(--color-blue-800)] group-hover:translate-x-0.5',\n hover: 'text-[var(--color-blue-800)] translate-x-0.5',\n generating: 'text-[var(--color-gray-600)] animate-spin',\n error: 'text-[var(--color-blue-1000)] group-hover:rotate-[-20deg]',\n },\n },\n defaultVariants: {\n status: 'normal',\n },\n});\n\nexport const errorIconStyles = cva(\n 'w-4 h-4 shrink-0 text-[var(--color-red-1000)] transition-transform duration-300 group-hover:scale-110',\n);\n","// React\nimport { forwardRef, useState, useCallback, useMemo } from 'react';\nimport { motion } from 'framer-motion';\n\n// Components\nimport {\n Loader,\n TriangleAlert,\n RotateCcw,\n ArrowUp,\n} from '@/components/atoms/icons';\n\n// Styles\nimport {\n artifactCardStyles,\n hoverBackgroundStyles,\n animatedGradientStyles,\n previewContainerStyles,\n previewBoxStyles,\n previewBoxInnerStyles,\n contentContainerStyles,\n titleStyles,\n subtitleStyles,\n iconContainerStyles,\n iconStyles,\n errorIconStyles,\n skeletonLineStyles,\n iconActiveStyles,\n iconInactiveStyles,\n} from './ArtifactCard.styles';\n\n// Misc\nimport { cn } from '@/utils/cn';\n\n// Types\nimport type { ArtifactCardProps, ArtifactCardStatus } from './ArtifactCard.types';\n\n// Animation variants\nconst skeletonLineVariants = {\n rest: { scaleX: 1 },\n hover: { scaleX: [0, 1] },\n};\n\nconst contentSlideVariants = {\n rest: { x: 0 },\n hover: { x: 4 },\n};\n\nconst iconActiveVariants = {\n rest: { x: -20, opacity: 0 },\n hover: { x: 0, opacity: 1 },\n};\n\nconst iconInactiveVariants = {\n rest: { x: 0, opacity: 1 },\n hover: { x: 20, opacity: 0 },\n};\n\n// Skeleton line widths for the document preview animation\nconst SKELETON_WIDTHS = [100, 66, 75, 50];\n\nexport const ArtifactCard = forwardRef<HTMLDivElement, ArtifactCardProps>(\n (\n {\n title,\n subtitle,\n status: controlledStatus,\n onClick,\n onActionClick,\n className,\n disabled = false,\n },\n ref,\n ) => {\n const [isHovered, setIsHovered] = useState(false);\n\n // Determine effective status - controlled or internal hover state\n const effectiveStatus: ArtifactCardStatus =\n controlledStatus || (isHovered && !disabled ? 'hover' : 'normal');\n\n // Memoize animation state\n const animationState = useMemo(() => {\n if (effectiveStatus === 'generating' || effectiveStatus === 'error')\n return 'rest';\n return isHovered ? 'hover' : 'rest';\n }, [effectiveStatus, isHovered]);\n\n const handleMouseEnter = useCallback(() => {\n if (!controlledStatus && !disabled) {\n setIsHovered(true);\n }\n }, [controlledStatus, disabled]);\n\n const handleMouseLeave = useCallback(() => {\n if (!controlledStatus && !disabled) {\n setIsHovered(false);\n }\n }, [controlledStatus, disabled]);\n\n const handleClick = useCallback(() => {\n if (!disabled && onClick) {\n onClick();\n }\n }, [disabled, onClick]);\n\n const handleActionClick = useCallback(\n (e: React.MouseEvent) => {\n e.stopPropagation();\n if (!disabled && onActionClick) {\n onActionClick();\n }\n },\n [disabled, onActionClick],\n );\n\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n handleClick();\n }\n },\n [handleClick],\n );\n\n // Render preview with skeleton animation\n const renderPreview = () => {\n if (effectiveStatus === 'generating') {\n return (\n <div className={previewContainerStyles({ status: 'generating' })}>\n <Loader\n size={16}\n className=\"text-[var(--color-gray-600)] animate-spin\"\n />\n </div>\n );\n }\n\n if (effectiveStatus === 'error') {\n return (\n <div className={previewContainerStyles({ status: 'error' })}>\n <TriangleAlert size={16} className={errorIconStyles()} />\n </div>\n );\n }\n\n // Normal or hover - show animated skeleton preview\n return (\n <div className={previewContainerStyles({ status: effectiveStatus })}>\n <div className={previewBoxStyles()}>\n <motion.div\n className={previewBoxInnerStyles()}\n variants={{\n rest: {},\n hover: { transition: { staggerChildren: 0.1 } },\n }}\n >\n {SKELETON_WIDTHS.map((width, i) => (\n <motion.div\n key={i}\n className={skeletonLineStyles()}\n style={{ width: `${width}%` }}\n variants={skeletonLineVariants}\n transition={{ duration: 0.4, ease: 'easeInOut' }}\n />\n ))}\n </motion.div>\n </div>\n </div>\n );\n };\n\n // Render action icon with swap animation\n const renderActionIcon = () => {\n if (effectiveStatus === 'generating') {\n return null;\n }\n\n if (effectiveStatus === 'error') {\n return (\n <button\n type=\"button\"\n onClick={handleActionClick}\n className=\"focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-blue-800)] focus-visible:ring-offset-2 rounded-sm\"\n aria-label=\"Retry\"\n >\n <RotateCcw size={16} className={iconStyles({ status: 'error' })} />\n </button>\n );\n }\n\n // Icon swap animation\n return (\n <>\n <motion.div\n className={iconActiveStyles()}\n variants={iconActiveVariants}\n transition={{ duration: 0.3, ease: 'backOut' }}\n >\n <ArrowUp size={24} className=\"rotate-90\" />\n </motion.div>\n <motion.div\n className={iconInactiveStyles()}\n variants={iconInactiveVariants}\n transition={{ duration: 0.3 }}\n >\n <ArrowUp size={24} className=\"rotate-90\" />\n </motion.div>\n </>\n );\n };\n\n return (\n <motion.div\n ref={ref}\n role=\"button\"\n tabIndex={disabled ? -1 : 0}\n className={cn(\n artifactCardStyles({\n status: effectiveStatus,\n disabled,\n }),\n className,\n )}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n aria-disabled={disabled}\n aria-label={`${title} - ${subtitle}${\n effectiveStatus === 'error' ? ' - Error occurred' : ''\n }${effectiveStatus === 'generating' ? ' - Generating' : ''}`}\n initial=\"rest\"\n whileHover=\"hover\"\n animate={animationState}\n >\n {/* Background Layer - solid color */}\n <div className={hoverBackgroundStyles({ status: effectiveStatus })}>\n <div className={animatedGradientStyles({ status: effectiveStatus })} />\n </div>\n\n {/* Preview Section */}\n {renderPreview()}\n\n {/* Content Section with slide animation */}\n <motion.div\n className={contentContainerStyles()}\n variants={contentSlideVariants}\n >\n <p className={titleStyles()} title={title}>\n {title}\n </p>\n <p className={subtitleStyles()} title={subtitle}>\n {subtitle}\n </p>\n </motion.div>\n\n {/* Action Icon Section with swap animation */}\n <div className={iconContainerStyles()}>{renderActionIcon()}</div>\n </motion.div>\n );\n },\n);\n\nArtifactCard.displayName = 'ArtifactCard';\n","import { cva } from 'class-variance-authority';\n\nexport const breadcrumbsStyles = cva('flex items-center flex-wrap gap-2', {\n variants: {\n size: {\n small: 'text-[0.875rem] leading-[1.25rem]', // typography-tiny\n medium: 'text-[1rem] leading-[1.5rem]', // typography-small\n },\n },\n defaultVariants: {\n size: 'medium',\n },\n});\n\nexport const breadcrumbItemStyles = cva(\n 'inline-flex items-center gap-2 transition-colors duration-200 rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] focus-visible:ring-offset-2',\n {\n variants: {\n state: {\n default:\n 'text-[var(--color-gray-600)] hover:text-[var(--color-blue-1000)] cursor-pointer',\n active: 'text-[var(--color-blue-1000)] font-medium cursor-default',\n inactive: 'text-[var(--color-gray-600)] cursor-default',\n },\n },\n defaultVariants: {\n state: 'default',\n },\n }\n);\n\nexport const separatorStyles = cva(\n 'text-[var(--color-gray-600)] flex items-center justify-center'\n);\n\n","import { ReactNode } from 'react';\n\nimport {\n breadcrumbsStyles,\n breadcrumbItemStyles,\n separatorStyles,\n} from './Breadcrumbs.styles';\n\nimport { cn } from '@/utils/cn';\n\nimport { ChevronRight } from '@/components/atoms/icons';\n\nexport interface BreadcrumbItem {\n label: string;\n href?: string;\n onClick?: () => void;\n icon?: ReactNode;\n}\n\nexport interface BreadcrumbsProps {\n items: BreadcrumbItem[];\n separator?: ReactNode;\n className?: string;\n size?: 'small' | 'medium';\n}\n\nexport const Breadcrumbs = ({\n items,\n separator = <ChevronRight size={16} />,\n className,\n size = 'medium',\n}: BreadcrumbsProps) => {\n return (\n <nav\n aria-label=\"Breadcrumb\"\n className={cn(breadcrumbsStyles({ size }), className)}\n >\n <ol className=\"flex items-center flex-wrap gap-2\">\n {items.map((item, index) => {\n const isLast = index === items.length - 1;\n let content;\n\n if (isLast) {\n content = (\n <span\n className={breadcrumbItemStyles({ state: 'active' })}\n aria-current=\"page\"\n >\n {item.icon}\n {item.label}\n </span>\n );\n } else if (item.href) {\n content = (\n <a\n href={item.href}\n className={breadcrumbItemStyles({ state: 'default' })}\n onClick={item.onClick}\n >\n {item.icon}\n {item.label}\n </a>\n );\n } else if (item.onClick) {\n content = (\n <button\n type=\"button\"\n className={breadcrumbItemStyles({ state: 'default' })}\n onClick={item.onClick}\n >\n {item.icon}\n {item.label}\n </button>\n );\n } else {\n content = (\n <span className={breadcrumbItemStyles({ state: 'inactive' })}>\n {item.icon}\n {item.label}\n </span>\n );\n }\n\n return (\n <li\n key={`${item.label}-${index}`}\n className=\"flex items-center gap-2\"\n >\n {content}\n {!isLast && (\n <span className={separatorStyles()} aria-hidden=\"true\">\n {separator}\n </span>\n )}\n </li>\n );\n })}\n </ol>\n </nav>\n );\n};\n","import { cva } from 'class-variance-authority';\n\nexport const buttonStyles = cva(\n 'inline-flex items-center justify-center rounded-[8px] font-normal transition-colors duration-200 box-border cursor-pointer disabled:cursor-not-allowed disabled:opacity-50 focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] focus-visible:ring-offset-2',\n {\n variants: {\n variant: {\n primary:\n 'bg-[var(--color-white)] border border-[var(--color-blue-1000)] text-[var(--color-blue-1000)] hover:bg-[var(--color-blue-200)] active:bg-[var(--color-blue-400)]',\n secondary:\n 'bg-[rgba(255,255,255,0.01)] border border-[var(--color-gray-600)] text-[var(--color-gray-600)] hover:bg-[var(--color-gray-100)] hover:border-[var(--color-gray-800)] hover:text-[var(--color-gray-800)] active:bg-[var(--color-gray-200)] active:border-[var(--color-gray-1000)] active:text-[var(--color-gray-1000)]',\n tertiary:\n 'bg-transparent border border-transparent text-[var(--color-blue-1000)] hover:bg-[var(--color-gray-100)] active:bg-[var(--color-gray-200)]',\n cta:\n 'bg-[var(--color-blue-800)] border border-transparent text-[var(--color-white)] hover:bg-[var(--color-blue-400)] active:bg-[var(--color-blue-1000)]',\n danger:\n 'bg-[var(--color-red-1000)] border border-transparent text-[var(--color-white)] hover:bg-[#e54545] active:bg-[#cc3d3d] focus-visible:ring-[var(--color-red-200)]',\n },\n tone: {\n brand: '',\n neutral: '',\n },\n size: {\n small: 'px-2 py-2 gap-1 text-[0.75rem] leading-[1rem]', // 12px/16px, 8px padding\n medium: 'px-3 py-2 gap-1 text-[1rem] leading-[1.5rem]', // 16px/24px, 12px/8px padding\n large: 'px-4 py-3 gap-1 text-[1rem] leading-[1.5rem]', // 16px/24px, 16px/12px padding\n },\n },\n compoundVariants: [\n // Primary Neutral Overrides\n {\n variant: 'primary',\n tone: 'neutral',\n className:\n 'bg-[rgba(0,6,38,0.9)] border-transparent text-[var(--color-white)] hover:bg-[rgba(0,6,38,0.8)] active:bg-[rgba(0,6,38,1)]',\n },\n // Secondary Neutral Overrides\n {\n variant: 'secondary',\n tone: 'neutral',\n className:\n 'bg-[rgba(255,255,255,0.01)] border-[rgba(0,13,77,0.45)] text-[rgba(0,9,51,0.65)] hover:bg-[rgba(0,13,77,0.05)] hover:border-[rgba(0,13,77,0.65)] hover:text-[rgba(0,9,51,0.85)] active:bg-[rgba(0,13,77,0.1)] active:border-[rgba(0,13,77,0.85)] active:text-[rgba(0,9,51,1)]',\n },\n // Tertiary Neutral Overrides\n {\n variant: 'tertiary',\n tone: 'neutral',\n className:\n 'text-[rgba(0,9,51,0.65)] hover:bg-[rgba(0,13,77,0.05)] active:bg-[rgba(0,13,77,0.1)] hover:text-[rgba(0,9,51,0.85)] active:text-[rgba(0,9,51,1)]',\n },\n ],\n defaultVariants: {\n variant: 'primary',\n tone: 'brand',\n size: 'medium',\n },\n }\n);\n","import { ButtonHTMLAttributes, ReactNode, forwardRef } from 'react';\nimport { cn } from '@/utils/cn';\nimport { buttonStyles } from './Button.styles';\n\nexport interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n variant?: 'primary' | 'secondary' | 'tertiary' | 'cta' | 'danger';\n tone?: 'brand' | 'neutral';\n size?: 'small' | 'medium' | 'large';\n startIcon?: ReactNode;\n endIcon?: ReactNode;\n}\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n variant = 'primary',\n tone = 'brand',\n size = 'medium',\n startIcon,\n endIcon,\n children,\n disabled,\n ...props\n },\n ref\n ) => {\n const iconSize = size === 'small' ? 13 : size === 'large' ? 20 : 16;\n\n return (\n <button\n ref={ref}\n className={cn(buttonStyles({ variant, tone, size }), className)}\n disabled={disabled}\n {...props}\n >\n {startIcon && (\n <span\n className=\"flex items-center justify-center shrink-0\"\n style={{ width: iconSize, height: iconSize }}\n >\n {startIcon}\n </span>\n )}\n {children}\n {endIcon && (\n <span\n className=\"flex items-center justify-center shrink-0\"\n style={{ width: iconSize, height: iconSize }}\n >\n {endIcon}\n </span>\n )}\n </button>\n );\n }\n);\n\nButton.displayName = 'Button';\n","import { cva } from 'class-variance-authority';\n\nexport const fileIconContainerStyles = cva(\n 'flex items-center justify-center shrink-0 rounded-[2px]',\n {\n variants: {\n size: {\n sm: 'p-1',\n md: 'p-1.5',\n lg: 'p-2 rounded-[4px]',\n },\n },\n defaultVariants: {\n size: 'sm',\n },\n },\n);\n\nexport const chatFileContainerStyles = cva(\n 'relative inline-flex items-center px-1 py-1 gap-1 rounded-[5px] border overflow-hidden transition-colors',\n {\n variants: {\n status: {\n uploading: 'border-[var(--color-gray-600)] bg-[var(--color-gray-50)]',\n processing: 'border-[var(--color-gray-600)] bg-[var(--color-gray-50)]',\n done: 'border-[var(--color-gray-200)] bg-[var(--color-white)]',\n error: 'border-[var(--color-gray-200)] bg-[var(--color-white)]',\n },\n },\n defaultVariants: {\n status: 'done',\n },\n },\n);\n\nexport const chatFileNameStyles = cva(\n 'truncate text-[0.75rem] leading-[1rem] font-normal',\n {\n variants: {\n status: {\n uploading: 'text-[var(--color-gray-600)]',\n processing: 'text-[var(--color-gray-800)]',\n done: 'text-[var(--color-gray-800)]',\n error: 'text-[var(--color-gray-800)]',\n },\n },\n defaultVariants: {\n status: 'done',\n },\n },\n);\n\nexport const chatFileIconStyles = cva('shrink-0', {\n variants: {\n status: {\n uploading: 'text-[var(--color-blue-800)]',\n processing: 'text-[var(--color-blue-800)]',\n done: 'text-[var(--color-gray-600)]',\n error: 'text-[var(--color-red-1000)]',\n },\n },\n defaultVariants: {\n status: 'done',\n },\n});\n\nexport const progressBarStyles = cva(\n 'absolute top-0 left-0 bottom-0 bg-[var(--color-gray-200)] z-0 rounded-bl-[4px] rounded-tl-[4px]',\n {\n variants: {\n status: {\n uploading: 'opacity-100',\n processing: 'opacity-100',\n done: 'opacity-0',\n error: 'opacity-0',\n },\n },\n defaultVariants: {\n status: 'uploading',\n },\n },\n);\n","// react / next\nimport React from 'react';\n\n// components\nimport {\n FileText,\n Grid,\n Code,\n WhiteboardView,\n Archive,\n Video,\n Volume2,\n Pdf,\n} from '@/components/atoms/icons';\n\n// styles\nimport { fileIconContainerStyles } from './ChatFile.styles';\n\n// misc\nimport { cn } from '@/utils/cn';\n\n/**\n * Configuration for a file type including its background color, icon color, and icon component.\n */\nexport interface FileTypeConfig {\n background: string;\n iconColor: string;\n icon: React.FC<{ size?: number | string; className?: string }>;\n}\n\n/**\n * Map of file extensions to their visual configuration.\n */\nexport const FILE_TYPE_MAP: Record<string, FileTypeConfig> = {\n // Text files\n txt: { background: '#f3f4f6', iconColor: '#6b7280', icon: FileText },\n\n // Documents\n docx: { background: '#eef3fb', iconColor: '#3b82f6', icon: FileText },\n doc: { background: '#eef3fb', iconColor: '#3b82f6', icon: FileText },\n pdf: { background: '#fdecec', iconColor: '#ef4444', icon: Pdf },\n\n // Spreadsheets\n csv: { background: '#ecfdf5', iconColor: '#10b981', icon: Grid },\n xlsx: { background: '#eaf5ef', iconColor: '#22c55e', icon: Grid },\n xls: { background: '#eaf5ef', iconColor: '#22c55e', icon: Grid },\n\n // Code files\n json: { background: '#fff7ed', iconColor: '#f97316', icon: Code },\n js: { background: '#fefce8', iconColor: '#eab308', icon: Code },\n ts: { background: '#e0f2fe', iconColor: '#0ea5e9', icon: Code },\n md: { background: '#f1f5f9', iconColor: '#64748b', icon: Code },\n\n // Presentations\n pptx: { background: '#fff1e6', iconColor: '#ea580c', icon: WhiteboardView },\n ppt: { background: '#fff1e6', iconColor: '#ea580c', icon: WhiteboardView },\n\n // Archives\n zip: { background: '#f5f5f4', iconColor: '#78716c', icon: Archive },\n rar: { background: '#f5f5f4', iconColor: '#78716c', icon: Archive },\n '7z': { background: '#f5f5f4', iconColor: '#78716c', icon: Archive },\n\n // Video\n mp4: { background: '#fce7f3', iconColor: '#ec4899', icon: Video },\n mov: { background: '#fce7f3', iconColor: '#ec4899', icon: Video },\n avi: { background: '#fce7f3', iconColor: '#ec4899', icon: Video },\n\n // Audio\n mp3: { background: '#eef2ff', iconColor: '#6366f1', icon: Volume2 },\n wav: { background: '#eef2ff', iconColor: '#6366f1', icon: Volume2 },\n};\n\n/**\n * Default configuration for unknown file types.\n */\nconst DEFAULT_FILE_TYPE_CONFIG: FileTypeConfig = {\n background: '#f3f4f6',\n iconColor: '#6b7280',\n icon: FileText,\n};\n\n/**\n * Extract the file extension from a filename.\n * Handles edge cases like no extension, double extensions, and case insensitivity.\n * @param filename - The full filename\n * @returns The lowercase extension without the dot, or empty string if none\n */\nexport const getFileExtension = (filename: string): string => {\n if (!filename) return '';\n\n const lastDotIndex = filename.lastIndexOf('.');\n\n // No extension (e.g., \"Dockerfile\") or dot at start (e.g., \".gitignore\")\n if (lastDotIndex <= 0) return '';\n\n return filename.slice(lastDotIndex + 1).toLowerCase();\n};\n\n/**\n * Get the file type configuration for a given filename.\n * @param filename - The full filename\n * @returns The FileTypeConfig for this file type\n */\nexport const getFileTypeConfig = (filename: string): FileTypeConfig => {\n const extension = getFileExtension(filename);\n return FILE_TYPE_MAP[extension] || DEFAULT_FILE_TYPE_CONFIG;\n};\n\nexport interface FileIconProps {\n /** The filename to determine the icon type from */\n filename: string;\n /** Size of the icon container */\n size?: 'sm' | 'md' | 'lg';\n /** Additional CSS classes */\n className?: string;\n}\n\n/**\n * FileIcon renders a file-type icon with a colored background based on the file extension.\n */\nconst ICON_SIZES: Record<'sm' | 'md' | 'lg', number> = {\n sm: 12,\n md: 16,\n lg: 24,\n};\n\nexport const FileIcon: React.FC<FileIconProps> = ({\n filename,\n size = 'sm',\n className,\n}) => {\n const config = getFileTypeConfig(filename);\n const IconComponent = config.icon;\n const iconSize = ICON_SIZES[size];\n\n return (\n <div\n className={cn(fileIconContainerStyles({ size }), className)}\n style={{ backgroundColor: config.background }}\n >\n <span style={{ color: config.iconColor }} className=\"inline-flex shrink-0\">\n <IconComponent size={iconSize} className=\"shrink-0\" />\n </span>\n </div>\n );\n};\n\nFileIcon.displayName = 'FileIcon';\n","// react / next\nimport React from 'react';\n\n// components\nimport { motion } from 'framer-motion';\nimport { Loader, ArrowUp, X, TriangleAlert } from '@/components/atoms/icons';\nimport { FileIcon } from './FileIcon';\n\n// styles\nimport {\n chatFileContainerStyles,\n chatFileNameStyles,\n chatFileIconStyles,\n progressBarStyles,\n} from './ChatFile.styles';\n\n// misc\nimport { cn } from '@/utils/cn';\n\n/**\n * Truncate filename while preserving the extension.\n * For long filenames, shows: \"truncated-na….ext\"\n * @param filename - The full filename\n * @param maxLength - Maximum total length (default 20)\n */\nconst truncateFilename = (filename: string, maxLength = 20): string => {\n if (filename.length <= maxLength) return filename;\n\n const lastDotIndex = filename.lastIndexOf('.');\n\n // No extension found, just truncate normally\n if (lastDotIndex === -1 || lastDotIndex === 0) {\n return filename.slice(0, maxLength - 1) + '…';\n }\n\n const baseName = filename.slice(0, lastDotIndex);\n const extension = filename.slice(lastDotIndex); // includes the dot\n\n // If extension is very long, just truncate the whole thing\n if (extension.length >= maxLength - 3) {\n return filename.slice(0, maxLength - 1) + '…';\n }\n\n // Calculate how much space we have for the base name\n // Reserve space for: baseName + \"…\" + extension\n const availableForBase = maxLength - extension.length - 1; // -1 for the ellipsis\n\n if (availableForBase < 3) {\n // Not enough room, just truncate\n return filename.slice(0, maxLength - 1) + '…';\n }\n\n return baseName.slice(0, availableForBase) + '…' + extension;\n};\n\n/**\n * @deprecated Use `ChipStatus` from the `Chip` component instead.\n */\nexport enum FileStatus {\n Uploading = 'uploading',\n Processing = 'processing',\n Done = 'done',\n Error = 'error',\n}\n\n/**\n * @deprecated Use `Chip` component with `type=\"file\"` instead.\n */\nexport interface ChatFileProps {\n filename: string;\n status?: FileStatus;\n progress?: number;\n onDelete?: () => void;\n className?: string;\n /** Variant of the ChatFile display */\n variant?: 'default' | 'icon-only';\n}\n\n/**\n * @deprecated Use `Chip` component with `type=\"file\"` instead.\n * @example\n * // Before (deprecated):\n * <ChatFile filename=\"doc.pdf\" status={FileStatus.Done} onDelete={handleDelete} />\n *\n * // After:\n * <Chip type=\"file\" filename=\"doc.pdf\" status={ChipStatus.Done} onDelete={handleDelete} />\n */\nexport const ChatFile: React.FC<ChatFileProps> = ({\n filename,\n status = FileStatus.Done,\n progress = 0,\n onDelete,\n className,\n variant = 'default',\n}) => {\n const isUploading = status === FileStatus.Uploading;\n const isProcessing = status === FileStatus.Processing;\n const isError = status === FileStatus.Error;\n const isDone = status === FileStatus.Done;\n\n // Icon-only variant: just render the FileIcon\n if (variant === 'icon-only') {\n return <FileIcon filename={filename} className={className} />;\n }\n\n const getStatusVariant = () => {\n if (isUploading) return 'uploading';\n if (isProcessing) return 'processing';\n if (isError) return 'error';\n return 'done';\n };\n\n const statusVariant = getStatusVariant();\n\n const renderIcon = () => {\n if (isUploading) return <ArrowUp size={12} className={chatFileIconStyles({ status: statusVariant })} />;\n if (isProcessing) return <Loader size={12} className={cn(chatFileIconStyles({ status: statusVariant }), \"animate-spin\")} />;\n if (isError) return <TriangleAlert size={12} className={chatFileIconStyles({ status: statusVariant })} />;\n // For done status, use extension-based FileIcon\n if (isDone) return <FileIcon filename={filename} />;\n return null;\n };\n\n return (\n <div className=\"relative inline-block group\">\n <div className={cn(chatFileContainerStyles({ status: statusVariant }), className)}>\n {/* Progress Bar Background */}\n {(isUploading || isProcessing) && (\n <motion.div\n className={progressBarStyles({ status: statusVariant })}\n initial={{ width: '0%' }}\n animate={{ width: `${progress}%` }}\n transition={{ duration: 0.3, ease: \"easeOut\" }}\n />\n )}\n\n {/* Content */}\n <div className=\"relative z-10 flex items-center gap-1 pr-1\">\n {/* For done status, FileIcon renders its own container with colored bg */}\n {isDone ? (\n renderIcon()\n ) : (\n <div className={cn(\n \"flex items-center justify-center shrink-0 p-1 rounded-[2px]\",\n isError && \"bg-[#fff2f2]\"\n )}>\n {renderIcon()}\n </div>\n )}\n\n <span className={chatFileNameStyles({ status: statusVariant })} title={filename}>\n {truncateFilename(filename)}\n </span>\n </div>\n </div>\n\n {/* Delete Button - Shows on Hover (only when not uploading/processing) */}\n {onDelete && !isUploading && !isProcessing && (\n <motion.button\n onClick={onDelete}\n className=\"absolute -top-[6px] -right-[6px] hidden group-hover:flex items-center justify-center bg-[var(--color-white)] border border-[var(--color-gray-200)] rounded-[8px] p-[2px] focus:outline-none focus:ring-2 focus:ring-[var(--color-blue-800)] shrink-0 z-20\"\n aria-label=\"Remove file\"\n initial={{ scale: 0, opacity: 0 }}\n whileInView={{ scale: 1, opacity: 1 }}\n whileHover={{ scale: 1.1 }}\n whileTap={{ scale: 0.95 }}\n transition={{\n scale: { type: \"spring\", stiffness: 400, damping: 17 },\n opacity: { duration: 0.2 }\n }}\n >\n <X size={10} className=\"text-[var(--color-gray-800)]\" />\n </motion.button>\n )}\n </div>\n );\n};\n","import { cva } from 'class-variance-authority';\n\n/**\n * Container styles for the chip\n */\nexport const chipContainerStyles = cva(\n 'relative inline-flex items-center px-1 py-1 gap-1 rounded-[5px] border overflow-hidden transition-colors',\n {\n variants: {\n status: {\n uploading: 'border-[var(--color-gray-600)] bg-[var(--color-gray-50)]',\n processing: 'border-[var(--color-gray-600)] bg-[var(--color-gray-50)]',\n done: 'border-[var(--color-gray-200)] bg-[var(--color-white)]',\n error: 'border-[var(--color-gray-200)] bg-[var(--color-white)]',\n },\n },\n defaultVariants: {\n status: 'done',\n },\n },\n);\n\n/**\n * Label/name text styles\n */\nexport const chipLabelStyles = cva(\n 'truncate text-[0.75rem] leading-[1rem] font-normal',\n {\n variants: {\n status: {\n uploading: 'text-[var(--color-gray-600)]',\n processing: 'text-[var(--color-gray-800)]',\n done: 'text-[var(--color-gray-800)]',\n error: 'text-[var(--color-gray-800)]',\n },\n },\n defaultVariants: {\n status: 'done',\n },\n },\n);\n\n/**\n * Icon styles (for status icons during upload/processing/error)\n */\nexport const chipIconStyles = cva('shrink-0', {\n variants: {\n status: {\n uploading: 'text-[var(--color-blue-800)]',\n processing: 'text-[var(--color-blue-800)]',\n done: 'text-[var(--color-gray-600)]',\n error: 'text-[var(--color-red-1000)]',\n },\n },\n defaultVariants: {\n status: 'done',\n },\n});\n\n/**\n * Progress bar background styles\n */\nexport const chipProgressBarStyles = cva(\n 'absolute top-0 left-0 bottom-0 bg-[var(--color-gray-200)] z-0 rounded-bl-[4px] rounded-tl-[4px]',\n {\n variants: {\n status: {\n uploading: 'opacity-100',\n processing: 'opacity-100',\n done: 'opacity-0',\n error: 'opacity-0',\n },\n },\n defaultVariants: {\n status: 'uploading',\n },\n },\n);\n\n/**\n * Leading icon container styles (for mention type icons)\n */\nexport const chipLeadingIconContainerStyles = cva(\n 'flex items-center justify-center shrink-0 p-1 rounded-[2px]',\n {\n variants: {\n variant: {\n file: '', // FileIcon has its own background\n template: 'bg-[#eef3fb]',\n client: '', // Avatar has its own styling\n workstream: 'bg-[#e0f2fe]',\n status: '', // Status icons have conditional backgrounds\n },\n },\n defaultVariants: {\n variant: 'file',\n },\n },\n);\n","/**\n * Chip Component Types\n *\n * Discriminated union types for all chip variants used in chat attachments.\n */\n\n/**\n * Status for file chips during upload/processing\n */\nexport enum ChipStatus {\n Uploading = 'uploading',\n Processing = 'processing',\n Done = 'done',\n Error = 'error',\n}\n\n/**\n * Base props shared by all chip types\n */\ninterface ChipBaseProps {\n /** Additional CSS classes */\n className?: string;\n /** Callback when delete button is clicked (shows delete button on hover when provided) */\n onDelete?: () => void;\n}\n\n/**\n * File attachment chip (uploaded/dropped files)\n */\nexport interface FileChipProps extends ChipBaseProps {\n type: 'file';\n /** The filename to display */\n filename: string;\n /** Current status of the file */\n status?: ChipStatus;\n /** Upload/processing progress (0-100) */\n progress?: number;\n}\n\n/**\n * File mention chip (@-referenced files)\n */\nexport interface FileMentionChipProps extends ChipBaseProps {\n type: 'fileMention';\n /** The filename to display */\n filename: string;\n}\n\n/**\n * Template mention chip\n */\nexport interface TemplateMentionChipProps extends ChipBaseProps {\n type: 'templateMention';\n /** The template name to display */\n name: string;\n}\n\n/**\n * Client mention chip (initials generated from name)\n */\nexport interface ClientMentionChipProps extends ChipBaseProps {\n type: 'clientMention';\n /** The client name to display (also used for initials) */\n name: string;\n}\n\n/**\n * Workstream mention chip\n */\nexport interface WorkstreamMentionChipProps extends ChipBaseProps {\n type: 'workstreamMention';\n /** The workstream name to display */\n name: string;\n}\n\n/**\n * Discriminated union of all chip props\n */\nexport type ChipProps =\n | FileChipProps\n | FileMentionChipProps\n | TemplateMentionChipProps\n | ClientMentionChipProps\n | WorkstreamMentionChipProps;\n","import React from 'react';\nimport { motion } from 'framer-motion';\nimport { X } from '@/components/atoms/icons';\n\nexport interface ChipDeleteButtonProps {\n /** Callback when button is clicked */\n onClick: () => void;\n}\n\n/**\n * Animated delete button that appears on chip hover.\n * Positioned at top-right corner of parent chip.\n */\nexport const ChipDeleteButton: React.FC<ChipDeleteButtonProps> = ({ onClick }) => {\n return (\n <motion.button\n onClick={onClick}\n className=\"absolute -top-[6px] -right-[6px] hidden group-hover:flex items-center justify-center bg-[var(--color-white)] border border-[var(--color-gray-200)] rounded-[8px] p-[2px] focus:outline-none focus:ring-2 focus:ring-[var(--color-blue-800)] shrink-0 z-20\"\n aria-label=\"Remove\"\n initial={{ scale: 0, opacity: 0 }}\n whileInView={{ scale: 1, opacity: 1 }}\n whileHover={{ scale: 1.1 }}\n whileTap={{ scale: 0.95 }}\n transition={{\n scale: { type: 'spring', stiffness: 400, damping: 17 },\n opacity: { duration: 0.2 },\n }}\n >\n <X size={10} className=\"text-[var(--color-gray-800)]\" />\n </motion.button>\n );\n};\n\nChipDeleteButton.displayName = 'ChipDeleteButton';\n","import React from 'react';\nimport { FileIcon } from '../../ChatFile/FileIcon';\nimport { Avatar } from '@/components/atoms/Avatar/Avatar';\nimport { FileText, WorkStream, Loader, ArrowUp, TriangleAlert } from '@/components/atoms/icons';\nimport { chipIconStyles, chipLeadingIconContainerStyles } from '../Chip.styles';\nimport { ChipStatus, type ChipProps } from '../Chip.types';\nimport { cn } from '@/utils/cn';\n\nexport interface ChipLeadingContentProps {\n /** The chip props to determine what to render */\n chipProps: ChipProps;\n}\n\n/**\n * Renders the appropriate leading content (icon/avatar) based on chip type.\n */\nexport const ChipLeadingContent: React.FC<ChipLeadingContentProps> = ({ chipProps }) => {\n const { type } = chipProps;\n\n // File chip with status-based icons\n if (type === 'file') {\n const { filename, status = ChipStatus.Done } = chipProps;\n const isUploading = status === ChipStatus.Uploading;\n const isProcessing = status === ChipStatus.Processing;\n const isError = status === ChipStatus.Error;\n const isDone = status === ChipStatus.Done;\n\n // For done status, use FileIcon with colored background\n if (isDone) {\n return <FileIcon filename={filename} />;\n }\n\n // For status states, render appropriate icon\n const statusVariant = isUploading ? 'uploading' : isProcessing ? 'processing' : 'error';\n\n return (\n <div\n className={cn(\n chipLeadingIconContainerStyles({ variant: 'status' }),\n isError && 'bg-[#fff2f2]'\n )}\n >\n {isUploading && (\n <ArrowUp size={12} className={chipIconStyles({ status: statusVariant })} />\n )}\n {isProcessing && (\n <Loader\n size={12}\n className={cn(chipIconStyles({ status: statusVariant }), 'animate-spin')}\n />\n )}\n {isError && (\n <TriangleAlert size={12} className={chipIconStyles({ status: statusVariant })} />\n )}\n </div>\n );\n }\n\n // File mention - FileIcon with colored background\n if (type === 'fileMention') {\n return <FileIcon filename={chipProps.filename} />;\n }\n\n // Template mention - FileText icon\n if (type === 'templateMention') {\n return (\n <div className={chipLeadingIconContainerStyles({ variant: 'template' })}>\n <FileText size={12} className=\"text-[var(--color-gray-600)]\" />\n </div>\n );\n }\n\n // Client mention - Avatar with initials\n if (type === 'clientMention') {\n return (\n <Avatar\n type=\"text\"\n initials={chipProps.name}\n size=\"small\"\n shape=\"circular\"\n />\n );\n }\n\n // Workstream mention - WorkStream icon\n if (type === 'workstreamMention') {\n return (\n <div className={chipLeadingIconContainerStyles({ variant: 'workstream' })}>\n <WorkStream size={12} className=\"text-[var(--color-gray-600)]\" />\n </div>\n );\n }\n\n return null;\n};\n\nChipLeadingContent.displayName = 'ChipLeadingContent';\n","import React from 'react';\nimport { motion } from 'framer-motion';\nimport { cn } from '@/utils/cn';\nimport { chipContainerStyles, chipLabelStyles, chipProgressBarStyles } from './Chip.styles';\nimport { ChipStatus, type ChipProps } from './Chip.types';\nimport { ChipDeleteButton } from './components/ChipDeleteButton';\nimport { ChipLeadingContent } from './components/ChipLeadingContent';\n\n/**\n * Truncate filename while preserving the extension.\n * For long filenames, shows: \"truncated-na….ext\"\n */\nconst truncateFilename = (filename: string, maxLength = 20): string => {\n if (filename.length <= maxLength) return filename;\n\n const lastDotIndex = filename.lastIndexOf('.');\n\n // No extension found, just truncate normally\n if (lastDotIndex === -1 || lastDotIndex === 0) {\n return filename.slice(0, maxLength - 1) + '…';\n }\n\n const baseName = filename.slice(0, lastDotIndex);\n const extension = filename.slice(lastDotIndex); // includes the dot\n\n // If extension is very long, just truncate the whole thing\n if (extension.length >= maxLength - 3) {\n return filename.slice(0, maxLength - 1) + '…';\n }\n\n // Calculate how much space we have for the base name\n const availableForBase = maxLength - extension.length - 1;\n\n if (availableForBase < 3) {\n return filename.slice(0, maxLength - 1) + '…';\n }\n\n return baseName.slice(0, availableForBase) + '…' + extension;\n};\n\n/**\n * Get the display label for a chip\n */\nconst getChipLabel = (props: ChipProps): string => {\n switch (props.type) {\n case 'file':\n case 'fileMention':\n return truncateFilename(props.filename);\n case 'templateMention':\n case 'clientMention':\n case 'workstreamMention':\n return props.name;\n }\n};\n\n/**\n * Get the full label for title attribute\n */\nconst getFullLabel = (props: ChipProps): string => {\n switch (props.type) {\n case 'file':\n case 'fileMention':\n return props.filename;\n case 'templateMention':\n case 'clientMention':\n case 'workstreamMention':\n return props.name;\n }\n};\n\n/**\n * Chip Component\n *\n * A unified component for rendering attachment chips in chat.\n * Supports multiple types: file, fileMention, templateMention, clientMention, workstreamMention.\n */\nexport const Chip: React.FC<ChipProps> = (props) => {\n const { type, className, onDelete } = props;\n\n // Determine status variant (only applicable for file type)\n const status = type === 'file' ? (props.status ?? ChipStatus.Done) : ChipStatus.Done;\n const isUploading = status === ChipStatus.Uploading;\n const isProcessing = status === ChipStatus.Processing;\n const progress = type === 'file' ? (props.progress ?? 0) : 0;\n\n // Show progress bar only for uploading/processing states\n const showProgressBar = (isUploading || isProcessing) && type === 'file';\n\n // Show delete button only when not uploading/processing and onDelete is provided\n const showDeleteButton = onDelete && !isUploading && !isProcessing;\n\n const label = getChipLabel(props);\n const fullLabel = getFullLabel(props);\n\n return (\n <div className=\"relative inline-block group\">\n <div className={cn(chipContainerStyles({ status }), className)}>\n {/* Progress Bar Background */}\n {showProgressBar && (\n <motion.div\n className={chipProgressBarStyles({ status })}\n initial={{ width: '0%' }}\n animate={{ width: `${progress}%` }}\n transition={{ duration: 0.3, ease: 'easeOut' }}\n />\n )}\n\n {/* Content */}\n <div className=\"relative z-10 flex items-center gap-1 pr-1\">\n <ChipLeadingContent chipProps={props} />\n <span className={chipLabelStyles({ status })} title={fullLabel}>\n {label}\n </span>\n </div>\n </div>\n\n {/* Delete Button - Shows on Hover */}\n {showDeleteButton && <ChipDeleteButton onClick={onDelete} />}\n </div>\n );\n};\n\nChip.displayName = 'Chip';\n","import { cva } from 'class-variance-authority';\n\nexport const checkboxLabelStyles = cva(\n 'inline-flex items-center gap-2 cursor-pointer select-none group disabled:cursor-not-allowed disabled:opacity-50 w-fit',\n {\n variants: {\n size: {\n medium: 'text-[1rem] leading-[1.5rem] gap-2',\n small: 'gap-1',\n },\n },\n defaultVariants: {\n size: 'medium',\n },\n },\n);\n\nexport const checkboxVisualWrapperStyles = cva(\n 'flex items-center justify-center transition-colors duration-200 ease-in-out rounded-[2px] border shrink-0 peer-focus-visible:ring-2 peer-focus-visible:ring-[var(--color-blue-200)] peer-focus-visible:ring-offset-1',\n {\n variants: {\n checked: {\n true: 'bg-[var(--color-blue-1000)] border-[var(--color-blue-1000)] text-white',\n false:\n 'bg-white border-[var(--color-gray-200)] group-hover:border-[var(--color-gray-600)]',\n },\n size: {\n medium: 'w-[16px] h-[16px]', // 16px\n small: 'w-[12px] h-[12px]', // 12px\n },\n },\n defaultVariants: {\n checked: false,\n size: 'medium',\n },\n },\n);\n\n// Invisible input but accessible\nexport const checkboxInputStyles = 'sr-only peer';\n","// 1: react / next\nimport React, { forwardRef, useState } from 'react';\n\n// 2: components\nimport { Typography } from '@/components/atoms/Typography/Typography';\n\n// 3: styles\nimport {\n checkboxInputStyles,\n checkboxLabelStyles,\n checkboxVisualWrapperStyles,\n} from './Checkbox.styles';\n\n// 6: misc\nimport { Check } from '@/components/atoms/icons';\nimport { cn } from '@/utils/cn';\n\nexport interface CheckboxProps\n extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {\n label?: string;\n size?: 'medium' | 'small';\n}\n\nexport const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(\n (\n {\n className,\n checked,\n defaultChecked,\n onChange,\n label,\n size = 'medium',\n disabled,\n ...props\n },\n ref,\n ) => {\n const [internalChecked, setInternalChecked] = useState(\n defaultChecked || false,\n );\n const isControlled = checked !== undefined;\n const isChecked = isControlled ? checked : internalChecked;\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n if (!isControlled) {\n setInternalChecked(e.target.checked);\n }\n onChange?.(e);\n };\n\n return (\n <label className={checkboxLabelStyles({ size, className })}>\n <input\n type=\"checkbox\"\n className={checkboxInputStyles}\n ref={ref}\n checked={isControlled ? checked : undefined}\n defaultChecked={!isControlled ? defaultChecked : undefined}\n onChange={handleChange}\n disabled={disabled}\n {...props}\n />\n <span\n className={checkboxVisualWrapperStyles({\n checked: !!isChecked,\n size,\n })}\n >\n <Check\n size={size === 'medium' ? 12 : 8}\n strokeWidth={3}\n className={cn(\n 'text-white transition-opacity duration-200',\n isChecked ? 'opacity-100' : 'opacity-0',\n )}\n />\n </span>\n {label && (\n <Typography\n as=\"span\"\n variant={size === 'medium' ? 'small' : 'x-small'}\n color=\"secondary\"\n >\n {label}\n </Typography>\n )}\n </label>\n );\n },\n);\n\nCheckbox.displayName = 'Checkbox';\n","import { cva } from 'class-variance-authority';\n\nexport const circularProgressContainerStyles = cva(\n 'relative inline-flex items-center justify-center',\n {\n variants: {\n size: {\n xs: 'w-[18px] h-[18px]',\n small: 'w-[24px] h-[24px]',\n medium: 'w-[32px] h-[32px]',\n large: 'w-[40px] h-[40px]',\n },\n },\n defaultVariants: {\n size: 'medium',\n },\n }\n);\n\nexport const circularProgressSvgStyles = cva('transform');\n\nexport const circularProgressTrackStyles = cva(\n 'stroke-[var(--color-gray-200)]'\n);\n\nexport const circularProgressIndicatorStyles = cva(\n 'transition-[stroke-dashoffset] duration-300 ease-in-out',\n {\n variants: {\n variant: {\n default: 'stroke-[var(--color-blue-800)]',\n success: 'stroke-[var(--color-green-1000)]',\n warning: 'stroke-[var(--color-orange-800)]',\n error: 'stroke-[var(--color-red-1000)]',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n }\n);\n\nexport const circularProgressLabelStyles = cva(\n 'absolute inset-0 flex items-center justify-center font-medium text-[var(--color-gray-800)]',\n {\n variants: {\n size: {\n xs: 'text-[6px]',\n small: 'text-[8px]',\n medium: 'text-[10px]',\n large: 'text-[12px]',\n },\n },\n defaultVariants: {\n size: 'medium',\n },\n }\n);\n\n","// React\nimport { forwardRef, HTMLAttributes } from 'react';\n\n// Styles\nimport { cn } from '@/utils/cn';\nimport {\n circularProgressContainerStyles,\n circularProgressSvgStyles,\n circularProgressTrackStyles,\n circularProgressIndicatorStyles,\n circularProgressLabelStyles,\n} from './CircularProgress.styles';\n\nexport interface CircularProgressProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * The current value of the progress.\n * @default 0\n */\n value?: number;\n /**\n * The maximum value of the progress.\n * @default 100\n */\n max?: number;\n /**\n * The size of the circular progress.\n * @default 'medium'\n */\n size?: 'xs' | 'small' | 'medium' | 'large';\n /**\n * The visual variant of the progress indicator.\n * @default 'default'\n */\n variant?: 'default' | 'success' | 'warning' | 'error';\n /**\n * Whether to show the value label in the center.\n * @default true\n */\n showLabel?: boolean;\n /**\n * Custom formatter for the value label.\n */\n labelFormatter?: (value: number, max: number) => string;\n /**\n * The stroke width of the progress ring.\n * @default 3\n */\n strokeWidth?: number;\n}\n\nconst SIZE_MAP = {\n xs: 18,\n small: 24,\n medium: 32,\n large: 40,\n};\n\nexport const CircularProgress = forwardRef<HTMLDivElement, CircularProgressProps>(\n (\n {\n className,\n value = 0,\n max = 100,\n size = 'medium',\n variant = 'default',\n showLabel = true,\n labelFormatter,\n strokeWidth = 3,\n ...props\n },\n ref\n ) => {\n const percentage = Math.min(Math.max((value / max) * 100, 0), 100);\n const sizePx = SIZE_MAP[size];\n const radius = (sizePx - strokeWidth) / 2;\n const circumference = 2 * Math.PI * radius;\n const strokeDashoffset = circumference - (percentage / 100) * circumference;\n\n const formattedLabel = labelFormatter\n ? labelFormatter(value, max)\n : `${Math.round(value)}`;\n\n return (\n <div\n ref={ref}\n className={cn(circularProgressContainerStyles({ size }), className)}\n role=\"progressbar\"\n aria-valuemin={0}\n aria-valuemax={max}\n aria-valuenow={value}\n {...props}\n >\n <svg\n className={circularProgressSvgStyles()}\n width={sizePx}\n height={sizePx}\n viewBox={`0 0 ${sizePx} ${sizePx}`}\n >\n {/* Background track */}\n <circle\n className={circularProgressTrackStyles()}\n cx={sizePx / 2}\n cy={sizePx / 2}\n r={radius}\n fill=\"none\"\n strokeWidth={strokeWidth}\n />\n {/* Progress indicator */}\n <circle\n className={circularProgressIndicatorStyles({ variant })}\n cx={sizePx / 2}\n cy={sizePx / 2}\n r={radius}\n fill=\"none\"\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeDasharray={circumference}\n strokeDashoffset={strokeDashoffset}\n transform={`rotate(-90 ${sizePx / 2} ${sizePx / 2})`}\n />\n </svg>\n {showLabel && (\n <span className={circularProgressLabelStyles({ size })}>\n {formattedLabel}\n </span>\n )}\n </div>\n );\n }\n);\n\nCircularProgress.displayName = 'CircularProgress';\n\n","import { useEffect, RefObject } from 'react';\n\ntype Handler = (event: MouseEvent | TouchEvent) => void;\n\nexport function useClickOutside<T extends HTMLElement = HTMLElement>(\n ref: RefObject<T>,\n handler: Handler\n): void {\n useEffect(() => {\n const listener = (event: MouseEvent | TouchEvent) => {\n const el = ref?.current;\n\n // Do nothing if clicking ref's element or descendent elements\n if (!el || el.contains(event.target as Node)) {\n return;\n }\n\n handler(event);\n };\n\n document.addEventListener('mousedown', listener);\n document.addEventListener('touchstart', listener);\n\n return () => {\n document.removeEventListener('mousedown', listener);\n document.removeEventListener('touchstart', listener);\n };\n }, [ref, handler]);\n}\n\n","import { cva } from 'class-variance-authority';\n\nexport const dropdownContentStyles = cva(\n 'absolute top-full left-0 z-50 w-full min-w-[200px] overflow-hidden rounded-[8px] border border-[var(--color-gray-200)] bg-[var(--color-white)] shadow-lg focus:outline-none',\n {\n variants: {\n align: {\n start: 'left-0',\n end: 'right-0 left-auto',\n center: 'left-1/2 -translate-x-1/2',\n },\n attached: {\n true: 'mt-0 rounded-t-none border-t-0',\n false: 'mt-2',\n },\n },\n defaultVariants: {\n align: 'start',\n attached: false,\n },\n },\n);\n\nexport const dropdownItemStyles = cva(\n 'flex w-full cursor-pointer items-center px-3 py-2 text-[0.875rem] text-[var(--color-gray-800)] transition-colors hover:bg-[var(--color-gray-50)] focus:bg-[var(--color-blue-200)] focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--color-blue-200)] disabled:pointer-events-none disabled:opacity-50',\n {\n variants: {\n active: {\n true: 'bg-[var(--color-blue-200)] text-[var(--color-blue-1000)]',\n },\n variant: {\n default: '',\n destructive:\n 'text-[var(--color-red-1000)] hover:bg-[var(--color-red-200)] focus:bg-[var(--color-red-200)]',\n },\n },\n defaultVariants: {\n variant: 'default',\n active: false,\n },\n },\n);\n\nexport const dropdownLabelStyles = cva(\n 'w-full px-3 py-1 text-[0.625rem] font-bold text-[var(--color-gray-600)] uppercase tracking-wider select-none',\n);\n\nexport const dropdownSeparatorStyles = cva(\n 'w-full h-px bg-[var(--color-gray-200)] my-1',\n);\n","import {\n useState,\n useRef,\n createContext,\n useContext,\n HTMLAttributes,\n forwardRef,\n MouseEvent,\n} from 'react';\nimport { AnimatePresence, motion, HTMLMotionProps } from 'framer-motion';\n\n// Components\nimport { ChevronDown } from '@/components/atoms/icons';\n\n// Hooks\nimport { useClickOutside } from '@/hooks/useClickOutside';\n\n// Styles\nimport { cn } from '@/utils/cn';\nimport {\n dropdownContentStyles,\n dropdownItemStyles,\n dropdownLabelStyles,\n dropdownSeparatorStyles,\n} from './Dropdown.styles';\n\n// Context\ninterface DropdownContextType {\n isOpen: boolean;\n toggle: () => void;\n close: () => void;\n}\nconst DropdownContext = createContext<DropdownContextType | undefined>(\n undefined,\n);\n\nexport const useDropdown = () => {\n const context = useContext(DropdownContext);\n if (!context) {\n throw new Error('useDropdown must be used within a Dropdown');\n }\n return context;\n};\n\n// Dropdown Root\nexport interface DropdownProps extends HTMLAttributes<HTMLDivElement> {\n defaultOpen?: boolean;\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n}\n\nexport const Dropdown = ({\n children,\n defaultOpen = false,\n open: controlledOpen,\n onOpenChange,\n className,\n ...props\n}: DropdownProps) => {\n const [uncontrolledOpen, setUncontrolledOpen] = useState(defaultOpen);\n const isControlled = controlledOpen !== undefined;\n const isOpen = isControlled ? controlledOpen : uncontrolledOpen;\n\n const dropdownRef = useRef<HTMLDivElement>(null);\n\n const toggle = () => {\n const newState = !isOpen;\n if (!isControlled) setUncontrolledOpen(newState);\n onOpenChange?.(newState);\n };\n\n const close = () => {\n if (!isControlled) setUncontrolledOpen(false);\n onOpenChange?.(false);\n };\n\n useClickOutside(dropdownRef, close);\n\n return (\n <DropdownContext.Provider value={{ isOpen, toggle, close }}>\n <div\n ref={dropdownRef}\n className={cn('relative w-full text-left', className)}\n {...props}\n >\n {children}\n </div>\n </DropdownContext.Provider>\n );\n};\n\nDropdown.displayName = 'Dropdown';\n\n// Trigger\nexport interface DropdownTriggerProps extends HTMLAttributes<HTMLDivElement> {\n /** Show a chevron icon positioned absolutely inside the trigger */\n chevronIcon?: boolean;\n}\n\nexport const DropdownTrigger = forwardRef<HTMLDivElement, DropdownTriggerProps>(\n (\n { className, children, onClick, chevronIcon = false, ...props },\n ref,\n ) => {\n const { toggle, isOpen } = useDropdown();\n\n const handleClick = (e: MouseEvent<HTMLDivElement>) => {\n toggle();\n onClick?.(e);\n };\n\n return (\n <div\n ref={ref}\n className={cn('cursor-pointer w-full relative overflow-visible', className)}\n onClick={handleClick}\n aria-haspopup=\"true\"\n aria-expanded={isOpen}\n {...props}\n >\n {children}\n {chevronIcon && (\n <motion.span\n animate={{ rotate: isOpen ? 180 : 0 }}\n transition={{ duration: 0.2, ease: [0.16, 1, 0.3, 1] }}\n className=\"absolute right-3 top-1/2 -translate-y-1/2 z-20 pointer-events-none text-[var(--color-gray-600)]\"\n >\n <ChevronDown size={16} />\n </motion.span>\n )}\n </div>\n );\n },\n);\nDropdownTrigger.displayName = 'DropdownTrigger';\n\n// Content\nexport interface DropdownContentProps\n extends Omit<HTMLMotionProps<'div'>, 'ref'> {\n align?: 'start' | 'end' | 'center';\n attached?: boolean;\n}\n\nexport const DropdownContent = forwardRef<HTMLDivElement, DropdownContentProps>(\n (\n { className, align = 'start', attached = false, children, ...props },\n ref,\n ) => {\n const { isOpen } = useDropdown();\n\n return (\n <AnimatePresence>\n {isOpen && (\n <motion.div\n ref={ref}\n initial={{ opacity: 0, y: -4, scale: 0.98 }}\n animate={{ opacity: 1, y: 0, scale: 1 }}\n exit={{ opacity: 0, y: -4, scale: 0.98 }}\n transition={{ duration: 0.2, ease: [0.16, 1, 0.3, 1] }}\n style={{ transformOrigin: 'top center' }}\n className={cn(\n dropdownContentStyles({ align, attached }),\n className,\n )}\n {...props}\n >\n {children}\n </motion.div>\n )}\n </AnimatePresence>\n );\n },\n);\nDropdownContent.displayName = 'DropdownContent';\n\n// Item\nexport interface DropdownItemProps extends HTMLAttributes<HTMLDivElement> {\n active?: boolean;\n variant?: 'default' | 'destructive';\n closeOnSelect?: boolean;\n}\n\nexport const DropdownItem = forwardRef<HTMLDivElement, DropdownItemProps>(\n (\n {\n className,\n active,\n variant,\n closeOnSelect = true,\n children,\n onClick,\n ...props\n },\n ref,\n ) => {\n const { close } = useDropdown();\n\n const handleClick = (e: MouseEvent<HTMLDivElement>) => {\n onClick?.(e);\n if (closeOnSelect) {\n close();\n }\n };\n\n return (\n <div\n ref={ref}\n className={cn(dropdownItemStyles({ active, variant }), className)}\n onClick={handleClick}\n role=\"menuitem\"\n {...props}\n >\n {children}\n </div>\n );\n },\n);\nDropdownItem.displayName = 'DropdownItem';\n\n// Label\nexport interface DropdownLabelProps extends HTMLAttributes<HTMLDivElement> { }\n\nexport const DropdownLabel = forwardRef<HTMLDivElement, DropdownLabelProps>(\n ({ className, children, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(dropdownLabelStyles(), className)}\n {...props}\n >\n {children}\n </div>\n );\n },\n);\nDropdownLabel.displayName = 'DropdownLabel';\n\n// Separator\nexport interface DropdownSeparatorProps extends HTMLAttributes<HTMLDivElement> {\n animated?: boolean;\n animationDelay?: number;\n}\n\nexport const DropdownSeparator = forwardRef<\n HTMLDivElement,\n DropdownSeparatorProps\n>(({ className, animated = false, animationDelay = 0.2, ...props }, ref) => {\n if (animated) {\n return (\n <div\n ref={ref}\n className={cn('h-px my-1 overflow-hidden', className)}\n {...props}\n >\n <motion.div\n className=\"h-full bg-[var(--color-gray-200)]\"\n initial={{ width: 0 }}\n animate={{ width: '100%' }}\n transition={{\n duration: 0.3,\n ease: [0.16, 1, 0.3, 1],\n delay: animationDelay,\n }}\n />\n </div>\n );\n }\n\n return (\n <div\n ref={ref}\n className={cn(dropdownSeparatorStyles(), className)}\n {...props}\n />\n );\n});\nDropdownSeparator.displayName = 'DropdownSeparator';\n","import { cva } from 'class-variance-authority';\n\nexport const inputStyles = cva(\n 'w-full bg-[var(--color-white)] border border-solid rounded-[8px] font-normal transition-colors duration-200 box-border focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50',\n {\n variants: {\n status: {\n default:\n 'border-[var(--color-gray-200)] text-[var(--color-gray-600)] placeholder:text-[var(--color-gray-600)] hover:border-[var(--color-gray-500)] focus:border-[var(--color-blue-1000)] focus:text-[var(--color-blue-1000)]',\n error:\n 'border-[var(--color-red-1000)] text-[var(--color-red-1000)] placeholder:text-[var(--color-red-1000)] focus:border-[var(--color-red-1000)]',\n success:\n 'border-[var(--color-green-1000)] text-[var(--color-green-1000)] placeholder:text-[var(--color-green-1000)] focus:border-[var(--color-green-1000)]',\n },\n size: {\n medium: 'px-4 py-4 text-[1rem] leading-[1.5rem]', // 16px/24px\n small: 'px-3 py-2 text-[0.875rem] leading-[1.25rem]', // 14px/20px\n tiny: 'p-2 text-[0.75rem] leading-[1rem]', // 12px/16px\n },\n },\n defaultVariants: {\n status: 'default',\n size: 'medium',\n },\n },\n);\n\nexport const inputContainerStyles = cva('relative w-full', {\n variants: {\n size: {\n medium: '',\n small: '',\n tiny: '',\n },\n },\n defaultVariants: {\n size: 'medium',\n },\n});\n\nexport const inputIconStyles = cva(\n 'absolute top-1/2 -translate-y-1/2 pointer-events-none flex items-center justify-center',\n {\n variants: {\n status: {\n default: 'text-[var(--color-gray-600)]',\n error: 'text-[var(--color-red-1000)]',\n success: 'text-[var(--color-green-1000)]',\n },\n position: {\n start: '',\n end: '',\n },\n size: {\n medium: 'size-[24px]',\n small: 'size-[16px]',\n tiny: 'size-[16px]',\n },\n },\n compoundVariants: [\n {\n position: 'start',\n size: 'medium',\n className: 'left-4',\n },\n {\n position: 'start',\n size: 'small',\n className: 'left-3',\n },\n {\n position: 'start',\n size: 'tiny',\n className: 'left-2',\n },\n {\n position: 'end',\n size: 'medium',\n className: 'right-4',\n },\n {\n position: 'end',\n size: 'small',\n className: 'right-3',\n },\n {\n position: 'end',\n size: 'tiny',\n className: 'right-2',\n },\n ],\n defaultVariants: {\n status: 'default',\n size: 'medium',\n position: 'end',\n },\n },\n);\n\nexport const inputErrorStyles = cva('text-[var(--color-red-1000)]', {\n variants: {\n size: {\n medium: 'text-[0.875rem] leading-[1.25rem]',\n small: 'text-[0.75rem] leading-[1rem]',\n tiny: 'text-[0.75rem] leading-[1rem]',\n },\n },\n defaultVariants: {\n size: 'medium',\n },\n});\n","import { InputHTMLAttributes, ReactNode, forwardRef, useId } from 'react';\nimport { cn } from '@/utils/cn';\nimport {\n inputStyles,\n inputContainerStyles,\n inputIconStyles,\n inputErrorStyles,\n} from './Input.styles';\n\nexport interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {\n status?: 'default' | 'error' | 'success';\n size?: 'medium' | 'small' | 'tiny';\n startIcon?: ReactNode;\n endIcon?: ReactNode;\n /** Error message to display below the input. When provided, automatically sets status to 'error'. */\n error?: string;\n}\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>(\n (\n {\n className,\n status = 'default',\n size = 'medium',\n startIcon,\n endIcon,\n disabled,\n error,\n ...props\n },\n ref\n ) => {\n const errorId = useId();\n\n // Auto-set status to 'error' when error prop is provided\n const effectiveStatus = error ? 'error' : status;\n\n // Size-aware padding\n const startIconPaddingMap = {\n medium: 'pl-12', // 16px (pad) + 24px (icon) + 8px (gap) = 48px -> pl-12\n small: 'pl-9', // 12px (pad) + 16px (icon) + 8px (gap) = 36px -> pl-9\n tiny: 'pl-8', // 8px (pad) + 16px (icon) + 8px (gap) = 32px -> pl-8\n };\n\n const endIconPaddingMap = {\n medium: 'pr-12',\n small: 'pr-9',\n tiny: 'pr-8',\n };\n\n return (\n <div className=\"flex flex-col gap-1\">\n <div className={inputContainerStyles({ size })}>\n {startIcon && (\n <span\n className={inputIconStyles({\n status: effectiveStatus,\n size,\n position: 'start',\n })}\n >\n {startIcon}\n </span>\n )}\n <input\n ref={ref}\n className={cn(\n inputStyles({ status: effectiveStatus, size }),\n startIcon && startIconPaddingMap[size],\n endIcon && endIconPaddingMap[size],\n className\n )}\n disabled={disabled}\n aria-invalid={!!error}\n aria-describedby={error ? errorId : undefined}\n {...props}\n />\n {endIcon && (\n <span\n className={inputIconStyles({\n status: effectiveStatus,\n size,\n position: 'end',\n })}\n >\n {endIcon}\n </span>\n )}\n </div>\n {error && (\n <span id={errorId} className={inputErrorStyles({ size })} role=\"alert\">\n {error}\n </span>\n )}\n </div>\n );\n }\n);\n\nInput.displayName = 'Input';\n","import { cva } from 'class-variance-authority';\n\nexport const loadingSpinnerWrapperStyles = cva('flex flex-col items-center justify-center');\n\nexport const spinnerContainerStyles = cva('relative', {\n variants: {\n size: {\n sm: 'w-8 h-8',\n md: 'w-12 h-12',\n lg: 'w-16 h-16',\n },\n },\n defaultVariants: {\n size: 'lg',\n },\n});\n\nexport const spinnerBorderStyles = cva(\n 'absolute inset-0 rounded-full border-4 border-transparent animate-spin',\n {\n variants: {\n color: {\n primary: 'border-t-[var(--color-blue-800)]',\n secondary: 'border-t-[var(--color-gray-600)]',\n },\n },\n defaultVariants: {\n color: 'primary',\n },\n }\n);\n\nexport const loadingTextStyles = cva('mt-4 typography-small', {\n variants: {\n color: {\n primary: 'text-[var(--color-gray-1000)]',\n muted: 'text-[var(--color-gray-600)]',\n },\n },\n defaultVariants: {\n color: 'muted',\n },\n});\n","import { FC } from 'react';\nimport { cn } from '@/utils/cn';\nimport {\n loadingSpinnerWrapperStyles,\n spinnerContainerStyles,\n spinnerBorderStyles,\n loadingTextStyles,\n} from './LoadingSpinner.styles';\n\ninterface LoadingSpinnerProps {\n size?: 'sm' | 'md' | 'lg';\n color?: 'primary' | 'secondary';\n text?: string;\n textColor?: 'primary' | 'muted';\n className?: string;\n}\n\nexport const LoadingSpinner: FC<LoadingSpinnerProps> = ({\n size = 'lg',\n color = 'primary',\n text,\n textColor = 'muted',\n className,\n}) => {\n return (\n <div className={cn(loadingSpinnerWrapperStyles(), className)}>\n <div className={spinnerContainerStyles({ size })}>\n <div className={spinnerBorderStyles({ color })} />\n </div>\n {text && <p className={loadingTextStyles({ color: textColor })}>{text}</p>}\n </div>\n );\n};\n\n","import { cva } from 'class-variance-authority';\n\nexport const rootStyles = cva(\n 'relative flex flex-col w-full max-w-[668px] transition-colors duration-200 group',\n {\n variants: {\n variant: {\n user: '',\n assistant: '',\n system: '',\n loader: '',\n },\n alignment: {\n left: 'items-start',\n center: 'items-center',\n right: 'items-end',\n },\n isEditing: {\n true: 'items-stretch',\n false: '',\n },\n },\n compoundVariants: [\n // Default alignments based on variant (can be overridden by explicit alignment prop)\n { variant: 'user', alignment: undefined, isEditing: false, className: 'items-end' },\n { variant: 'assistant', alignment: undefined, isEditing: false, className: 'items-start' },\n { variant: 'system', alignment: undefined, className: 'items-start' },\n { variant: 'loader', alignment: undefined, className: 'items-start' },\n ],\n defaultVariants: {\n variant: 'user',\n isEditing: false,\n },\n },\n);\n\nexport const innerContainerStyles = cva('flex gap-[12px] items-start w-full');\n\nexport const messageContainerStyles = cva('flex flex-col flex-1 min-w-0');\n\nexport const bubbleStyles = cva(\n 'flex flex-col w-full transition-colors duration-200',\n {\n variants: {\n variant: {\n user: '[background-image:linear-gradient(var(--color-white),var(--color-white)),linear-gradient(180deg,#B9BCCB_0%,#E5E7F0_100%)] [background-origin:padding-box,border-box] [background-clip:padding-box,border-box] border border-transparent rounded-[16px] p-[16px] overflow-clip shadow-[0px_4px_6px_-2px_rgba(0,0,0,0.03),0px_12px_16px_-4px_rgba(0,0,0,0.05)]',\n assistant: 'bg-transparent p-[8px] gap-[8px]',\n system: 'bg-transparent p-[8px] gap-[8px]',\n loader: 'bg-transparent p-[8px] gap-[24px]',\n },\n isSticky: {\n true: 'shadow-[0px_8px_16px_-4px_rgba(0,0,0,0.1),0px_4px_8px_-4px_rgba(0,0,0,0.06)]',\n false: '',\n },\n },\n defaultVariants: {\n variant: 'user',\n isSticky: false,\n },\n },\n);\n\nexport const contentStyles = cva('flex w-full', {\n variants: {\n variant: {\n user: 'flex-col gap-[8px]',\n assistant: 'flex-col gap-[8px]',\n system: 'flex-row items-center gap-[8px]',\n loader: 'flex-col items-start',\n },\n },\n defaultVariants: {\n variant: 'user',\n },\n});\n\nexport const headerStyles = cva('typography-h4 text-[var(--color-blue-1000)]');\n\nexport const textStyles = cva('typography-small', {\n variants: {\n variant: {\n user: 'text-[var(--color-blue-1000)]',\n assistant: 'text-[var(--color-blue-1000)]',\n system: 'text-[var(--color-gray-600)]',\n loader: '',\n },\n },\n defaultVariants: {\n variant: 'user',\n },\n});\n\nexport const actionsStyles = cva(\n 'flex gap-[8px] p-[4px] rounded-[4px] transition-opacity duration-200',\n {\n variants: {\n variant: {\n user: '',\n assistant: '',\n system: 'hidden',\n loader: 'hidden',\n },\n },\n defaultVariants: {\n variant: 'user',\n },\n },\n);\n\n// Actions icons wrapper - only visible on hover\nexport const actionsIconsStyles = cva([\n 'flex',\n 'gap-[8px]',\n 'opacity-0',\n 'group-hover:opacity-100',\n 'transition-opacity',\n 'duration-200',\n]);\n\nexport const actionButtonStyles = cva(\n 'p-1 rounded-[4px] text-[var(--color-gray-400)] hover:text-[var(--color-gray-800)] hover:drop-shadow-[0_1px_2px_rgba(0,0,0,0.05)] transition-all duration-200 focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] focus-visible:ring-offset-1 disabled:opacity-30 disabled:cursor-not-allowed disabled:hover:text-[var(--color-gray-400)] disabled:hover:drop-shadow-none',\n {\n variants: {\n isActive: {\n true: 'text-[var(--color-blue-800)]',\n false: '',\n },\n },\n defaultVariants: {\n isActive: false,\n },\n },\n);\n\nexport const avatarContainerStyles = cva(\n 'flex items-start justify-center shrink-0 pt-[4px]',\n);\n\nexport const avatarInnerStyles = cva(\n 'flex items-center justify-center size-[32px] rounded-full bg-[var(--color-blue-1000)]',\n);\n\nexport const timestampStyles = cva(\n 'text-[12px] text-[var(--color-gray-600)] mt-[4px]',\n);\n\nexport const loaderStyles = cva(\n 'flex items-center justify-center',\n);\n\n// Container for system message content with shimmer overlay\nexport const systemContentWrapperStyles = cva(\n 'relative overflow-hidden flex items-center gap-[8px] py-[2px] select-none',\n);\n\n// Shine overlay that passes over the content like a skeleton loader\nexport const shimmerOverlayStyles = cva([\n 'absolute -inset-y-2 -inset-x-4',\n 'animate-shimmer',\n 'bg-[linear-gradient(90deg,transparent_0%,transparent_35%,rgba(255,255,255,0.4)_50%,transparent_65%,transparent_100%)]',\n 'blur-[1px]',\n 'z-10 pointer-events-none',\n]);\n\n// Activity icon container with styling and rhythm animation\nexport const activityIconAnimatedStyles = cva([\n 'relative shrink-0 flex items-center justify-center',\n 'text-[var(--color-gray-600)]',\n 'animate-signal-rhythm',\n 'origin-center',\n]);\n\n// Optional subtle glow backdrop for the activity icon\nexport const activityIconGlowStyles = cva([\n 'absolute inset-0',\n 'bg-[var(--color-blue-200)]',\n 'rounded-full',\n 'opacity-0',\n 'animate-ping-slow',\n '-z-10',\n]);\n\n// Edit mode container styles - wraps the bubble with blue border\nexport const editContainerStyles = cva([\n 'flex',\n 'flex-col',\n 'w-full',\n 'bg-[var(--color-white)]',\n 'rounded-[16px]',\n 'border',\n 'border-[var(--color-blue-800)]',\n 'p-[16px]',\n 'gap-[8px]',\n 'transition-colors',\n 'duration-200',\n]);\n\n// Edit mode textarea styles - minimal, no border\nexport const editTextareaStyles = cva([\n 'w-full',\n 'min-h-[60px]',\n 'bg-transparent',\n 'border-none',\n 'resize-none',\n 'typography-small',\n 'text-[var(--color-blue-1000)]',\n 'placeholder:text-[var(--color-gray-600)]',\n 'focus:outline-none',\n 'disabled:opacity-50',\n 'disabled:cursor-not-allowed',\n]);\n\n// Edit mode hint text styles\nexport const editHintStyles = cva([\n 'text-[12px]',\n 'leading-[16px]',\n 'text-[var(--color-gray-600)]',\n]);\n\n// Branch navigator container\nexport const branchNavigatorStyles = cva([\n 'flex',\n 'items-center',\n 'gap-[4px]',\n]);\n\n// Branch navigator button\nexport const branchNavButtonStyles = cva(\n [\n 'p-[4px]',\n 'rounded-[4px]',\n 'text-[var(--color-gray-400)]',\n 'transition-colors',\n 'duration-200',\n 'hover:text-[var(--color-gray-800)]',\n 'hover:bg-[var(--color-gray-100)]',\n 'disabled:opacity-30',\n 'disabled:cursor-not-allowed',\n 'disabled:hover:bg-transparent',\n 'disabled:hover:text-[var(--color-gray-400)]',\n 'focus-visible:ring-2',\n 'focus-visible:ring-[var(--color-blue-200)]',\n 'focus-visible:ring-offset-1',\n ]\n);\n\n// Branch navigator text\nexport const branchNavTextStyles = cva([\n 'text-[12px]',\n 'leading-[16px]',\n 'text-[var(--color-gray-600)]',\n 'font-normal',\n 'tabular-nums',\n 'select-none',\n 'min-w-[32px]',\n 'text-center',\n]);\n","// React\nimport {\n forwardRef,\n HTMLAttributes,\n useState,\n useEffect,\n useRef,\n useCallback,\n useMemo,\n memo,\n ComponentType,\n KeyboardEvent,\n ChangeEvent,\n} from 'react';\n\n// Components\nimport { Check, Activity, ChevronLeft, ChevronRight, Edit2, X } from '@/components/atoms/icons';\nimport { LogoA, SignatureA } from '@/components/atoms/logos';\n\n// Styles\nimport { cn } from '@/utils/cn';\nimport {\n rootStyles,\n bubbleStyles,\n contentStyles,\n actionsStyles,\n avatarContainerStyles,\n innerContainerStyles,\n messageContainerStyles,\n headerStyles,\n textStyles,\n actionButtonStyles,\n avatarInnerStyles,\n timestampStyles,\n loaderStyles,\n systemContentWrapperStyles,\n shimmerOverlayStyles,\n activityIconAnimatedStyles,\n activityIconGlowStyles,\n editContainerStyles,\n editTextareaStyles,\n editHintStyles,\n actionsIconsStyles,\n branchNavigatorStyles,\n branchNavButtonStyles,\n branchNavTextStyles,\n} from './MessageBubble.styles';\n\n// Types\nexport interface MessageAction {\n /** Icon component to display */\n icon: ComponentType<{ size?: number | string }>;\n /** Accessible label for the action button */\n label: string;\n /** Click handler - can be async. When resolved, success feedback shows if enabled. */\n onClick?: () => void | Promise<void>;\n /** Whether this action is in an active/highlighted state */\n isActive?: boolean;\n /** Show check icon after onClick completes successfully. Defaults to false. */\n showSuccessFeedback?: boolean;\n /** Custom success icon (defaults to Check icon) */\n successIcon?: ComponentType<{ size?: number | string }>;\n /** Duration to show success feedback in ms (defaults to 2000) */\n successDuration?: number;\n}\n\nexport interface BranchInfo {\n /** Current branch index (1-based for display) */\n currentIndex: number;\n /** Total number of branches */\n totalBranches: number;\n}\n\nexport interface MessageBubbleProps extends HTMLAttributes<HTMLDivElement> {\n variant?: 'user' | 'assistant' | 'system' | 'loader';\n heading?: string;\n isLoading?: boolean;\n /** Hide the Archie logo avatar (only applicable to assistant variant). Defaults to true (hidden). */\n hideAvatar?: boolean;\n /** Show timestamp (not recommended per design). Defaults to false. */\n showTimestamp?: boolean;\n /** Timestamp value to display */\n timestamp?: Date | string;\n /** Sticky mode - adds shadow to bubble, no action controls */\n isSticky?: boolean;\n /** Initial prompt - centers the message (only applies to user variant). Used for the first user message in a conversation. */\n isInitialPrompt?: boolean;\n /** Explicit alignment override - auto determines based on variant and isInitialPrompt */\n alignment?: 'left' | 'center' | 'right';\n /** Custom actions to display on hover. Each action has an icon, label, and onClick handler. */\n actions?: MessageAction[];\n /**\n * Enable built-in copy functionality. When true, adds a copy button that copies the message content.\n * @deprecated Use actions array with showSuccessFeedback instead for consistent success feedback across all actions.\n */\n enableCopy?: boolean;\n /**\n * Icon to use for the copy action (defaults to Clipboard icon from props)\n * @deprecated Use actions array with showSuccessFeedback instead for consistent success feedback across all actions.\n */\n copyIcon?: ComponentType<{ size?: number | string }>;\n /**\n * Callback executed when copy succeeds\n * @deprecated Use actions array with showSuccessFeedback instead for consistent success feedback across all actions.\n */\n onCopySuccess?: () => void;\n /** Enable edit mode functionality for user messages */\n enableEdit?: boolean;\n /** Whether the message is currently in edit mode (controlled) */\n isEditing?: boolean;\n /** Initial content for edit mode (required for controlled mode since contentRef is not available) */\n initialEditContent?: string;\n /** Callback when entering edit mode */\n onEditStart?: () => void;\n /** Callback when cancelling edit mode */\n onEditCancel?: () => void;\n /** Callback when saving edit with the new content */\n onEditSave?: (newContent: string) => void | Promise<void>;\n /** Whether save operation is in progress */\n isSaving?: boolean;\n /** Branch information for navigation */\n branchInfo?: BranchInfo;\n /** Callback when navigating to previous branch */\n onPreviousBranch?: () => void;\n /** Callback when navigating to next branch */\n onNextBranch?: () => void;\n /** Whether branch navigation is loading */\n isBranchLoading?: boolean;\n}\n\n// Empty array constant to prevent re-renders from default prop\nconst EMPTY_ACTIONS: MessageAction[] = [];\n\n// Platform detection - only needs to run once\nconst IS_MAC = typeof navigator !== 'undefined' && /Mac|iPod|iPhone|iPad/.test(navigator.platform);\nconst KEYBOARD_HINT = IS_MAC ? '⌘+Enter to save, Esc to cancel' : 'Ctrl+Enter to save, Esc to cancel';\n\n// Format timestamp utility - moved outside component to prevent recreation\nconst formatTimestamp = (ts: Date | string): string => {\n const date = typeof ts === 'string' ? new Date(ts) : ts;\n const now = new Date();\n const diffMs = now.getTime() - date.getTime();\n const diffMins = Math.floor(diffMs / 60000);\n\n if (diffMins < 1) return 'Just now';\n if (diffMins < 60) return `${diffMins} min ago`;\n\n const diffHours = Math.floor(diffMins / 60);\n if (diffHours < 24) return `${diffHours}h ago`;\n\n return date.toLocaleDateString();\n};\n\ninterface ActionButtonProps {\n onClick?: () => void | Promise<void>;\n icon: ComponentType<{ size?: number | string }>;\n label: string;\n className?: string;\n isActive?: boolean;\n disabled?: boolean;\n showSuccessFeedback?: boolean;\n successIcon?: ComponentType<{ size?: number | string }>;\n successDuration?: number;\n}\n\nconst ActionButton = memo<ActionButtonProps>(({\n onClick,\n icon: Icon,\n label,\n className,\n isActive = false,\n disabled = false,\n showSuccessFeedback = false,\n successIcon: SuccessIcon = Check,\n successDuration = 2000,\n}) => {\n const [showSuccess, setShowSuccess] = useState(false);\n\n const handleClick = useCallback(async () => {\n if (!onClick || disabled) return;\n\n try {\n await onClick();\n\n if (showSuccessFeedback) {\n setShowSuccess(true);\n setTimeout(() => setShowSuccess(false), successDuration);\n }\n } catch (error) {\n console.error('Action failed:', error);\n }\n }, [onClick, disabled, showSuccessFeedback, successDuration]);\n\n const DisplayIcon = showSuccess ? SuccessIcon : Icon;\n\n return (\n <button\n className={cn(actionButtonStyles({ isActive: isActive || showSuccess }), className)}\n onClick={handleClick}\n type=\"button\"\n aria-label={showSuccess ? 'Success' : label}\n disabled={disabled}\n >\n <DisplayIcon size={12} />\n </button>\n );\n});\n\nActionButton.displayName = 'ActionButton';\n\ninterface BranchNavigatorProps {\n branchInfo: BranchInfo;\n onPrevious?: () => void;\n onNext?: () => void;\n isLoading?: boolean;\n}\n\n/** Branch navigator component for navigating between message versions */\nconst BranchNavigator = memo<BranchNavigatorProps>(({\n branchInfo,\n onPrevious,\n onNext,\n isLoading = false,\n}) => {\n const hasPrevious = branchInfo.currentIndex > 1;\n const hasNext = branchInfo.currentIndex < branchInfo.totalBranches;\n\n if (branchInfo.totalBranches <= 1) {\n return null;\n }\n\n return (\n <div className={cn(branchNavigatorStyles())}>\n <button\n type=\"button\"\n className={cn(branchNavButtonStyles())}\n onClick={onPrevious}\n disabled={!hasPrevious || isLoading}\n aria-label=\"Previous version\"\n >\n <ChevronLeft size={14} />\n </button>\n <span className={cn(branchNavTextStyles())}>\n {branchInfo.currentIndex} / {branchInfo.totalBranches}\n </span>\n <button\n type=\"button\"\n className={cn(branchNavButtonStyles())}\n onClick={onNext}\n disabled={!hasNext || isLoading}\n aria-label=\"Next version\"\n >\n <ChevronRight size={14} />\n </button>\n </div>\n );\n});\n\nBranchNavigator.displayName = 'BranchNavigator';\n\n// Looping animated SignatureA for loader state\nconst AnimatedLoader = () => {\n const [key, setKey] = useState(0);\n\n useEffect(() => {\n // Restart animation every 2.5 seconds (animation duration + small pause)\n const interval = setInterval(() => {\n setKey((k) => k + 1);\n }, 2500);\n\n return () => clearInterval(interval);\n }, []);\n\n return (\n <div className={cn(loaderStyles())}>\n <SignatureA\n key={key}\n size={28}\n colorVariant=\"lightTeal\"\n animated\n animationDuration={2}\n />\n </div>\n );\n};\n\nexport const MessageBubble = forwardRef<HTMLDivElement, MessageBubbleProps>(\n (\n {\n className,\n variant = 'user',\n heading,\n children,\n isLoading,\n timestamp,\n hideAvatar = false,\n showTimestamp = false,\n isSticky = false,\n isInitialPrompt = false,\n alignment,\n actions = EMPTY_ACTIONS,\n enableCopy = false,\n copyIcon,\n onCopySuccess,\n enableEdit = false,\n isEditing: isEditingProp,\n initialEditContent,\n onEditStart,\n onEditCancel,\n onEditSave,\n isSaving = false,\n branchInfo,\n onPreviousBranch,\n onNextBranch,\n isBranchLoading = false,\n ...props\n },\n ref,\n ) => {\n const contentRef = useRef<HTMLDivElement>(null);\n const textareaRef = useRef<HTMLTextAreaElement>(null);\n const [isCopied, setIsCopied] = useState(false);\n const [internalEditing, setInternalEditing] = useState(false);\n const [editContent, setEditContent] = useState(initialEditContent ?? '');\n\n // Use controlled or uncontrolled editing state\n const isEditing = isEditingProp ?? internalEditing;\n\n const resolvedAlignment =\n alignment ??\n (variant === 'user' ? (isInitialPrompt ? 'center' : 'right') : 'left');\n\n // Extract text content from children for editing\n const getTextContent = useCallback((): string => {\n if (contentRef.current) {\n return contentRef.current.innerText;\n }\n if (typeof children === 'string') {\n return children;\n }\n return '';\n }, [children]);\n\n // Handle entering edit mode\n const handleEditStart = useCallback(() => {\n // In controlled mode, don't set editContent here - let the useEffect handle it\n // when isEditing transitions to true. This prevents race conditions.\n if (isEditingProp === undefined) {\n // Uncontrolled mode: set content immediately since we manage the state\n const content = initialEditContent ?? getTextContent();\n setEditContent(content);\n setInternalEditing(true);\n }\n // In controlled mode, the useEffect will handle setting editContent\n // when isEditing transitions from false to true\n onEditStart?.();\n }, [initialEditContent, getTextContent, isEditingProp, onEditStart]);\n\n // Handle cancelling edit mode\n const handleEditCancel = useCallback(() => {\n if (isEditingProp === undefined) {\n setInternalEditing(false);\n }\n setEditContent('');\n onEditCancel?.();\n }, [isEditingProp, onEditCancel]);\n\n // Handle saving edit\n const handleEditSave = useCallback(async () => {\n // Don't save if content is empty, saving in progress, or content hasn't changed\n if (!editContent?.trim() || isSaving) return;\n if (editContent.trim() === initialEditContent?.trim()) return;\n\n try {\n await onEditSave?.(editContent);\n if (isEditingProp === undefined) {\n setInternalEditing(false);\n }\n setEditContent('');\n } catch (error) {\n console.error('Failed to save edit:', error);\n }\n }, [editContent, isSaving, onEditSave, isEditingProp, initialEditContent]);\n\n // Handle keyboard shortcuts in edit mode\n const handleKeyDown = useCallback(\n (e: KeyboardEvent<HTMLTextAreaElement>) => {\n if (e.key === 'Escape') {\n handleEditCancel();\n } else if (e.key === 'Enter' && (e.metaKey || e.ctrlKey)) {\n e.preventDefault();\n handleEditSave();\n }\n },\n [handleEditCancel, handleEditSave],\n );\n\n // Track previous editing state to detect transitions\n const prevIsEditingRef = useRef(false);\n // Keep track of last known initialEditContent for controlled mode\n const lastInitialContentRef = useRef(initialEditContent);\n\n // Update ref whenever initialEditContent changes (before edit mode transition)\n useEffect(() => {\n lastInitialContentRef.current = initialEditContent;\n }, [initialEditContent]);\n\n // Initialize edit content when entering edit mode (controlled mode)\n // In controlled mode, use initialEditContent prop since contentRef won't be available\n useEffect(() => {\n const wasEditing = prevIsEditingRef.current;\n prevIsEditingRef.current = isEditing;\n\n // Only initialize when transitioning from not editing -> editing\n if (isEditing && !wasEditing) {\n // In controlled mode, ALWAYS prefer initialEditContent since contentRef\n // won't be available when isEditing is true (edit UI replaces content)\n // Use the ref to ensure we get the latest value even in race conditions\n const content = initialEditContent || lastInitialContentRef.current || getTextContent() || '';\n setEditContent(content);\n } else if (!isEditing && wasEditing) {\n // Clear content when exiting edit mode\n setEditContent('');\n }\n }, [isEditing, initialEditContent, getTextContent]);\n\n // Focus textarea when entering edit mode\n useEffect(() => {\n if (isEditing && textareaRef.current) {\n textareaRef.current.focus();\n const length = textareaRef.current.value.length;\n textareaRef.current.setSelectionRange(length, length);\n }\n }, [isEditing]);\n\n const handleCopyInternal = useCallback(async () => {\n if (!contentRef.current) return;\n\n const textToCopy = contentRef.current.innerText;\n try {\n if (navigator.clipboard && navigator.clipboard.writeText) {\n await navigator.clipboard.writeText(textToCopy);\n setIsCopied(true);\n\n // Trigger onCopySuccess callback if provided\n onCopySuccess?.();\n\n setTimeout(() => {\n setIsCopied(false);\n }, 2000);\n } else {\n // Fallback for environments where navigator.clipboard is not available\n console.warn('Clipboard API not available');\n }\n } catch (err) {\n console.error('Failed to copy:', err);\n }\n }, [onCopySuccess]);\n\n // Memoized handler for edit content change\n const handleEditContentChange = useCallback(\n (e: ChangeEvent<HTMLTextAreaElement>) => {\n setEditContent(e.target.value);\n },\n [],\n );\n\n // Memoize derived values to prevent unnecessary recalculations\n const hasActions = useMemo(\n () => actions.length > 0 || enableCopy || (enableEdit && variant === 'user'),\n [actions.length, enableCopy, enableEdit, variant],\n );\n\n const showActions = useMemo(\n () => !isSticky && !isEditing && (variant === 'user' || variant === 'assistant') && hasActions,\n [isSticky, isEditing, variant, hasActions],\n );\n\n const showBranchNavigator = useMemo(\n () => !isEditing && branchInfo && branchInfo.totalBranches > 1 && variant === 'user',\n [isEditing, branchInfo, variant],\n );\n\n // Loader variant - uses animated SignatureA drawing in loop\n if (variant === 'loader' || isLoading) {\n return (\n <div\n ref={ref}\n className={cn(\n rootStyles({ variant: 'loader', alignment: 'left', isEditing: false }),\n className,\n )}\n {...props}\n >\n <div className={cn(bubbleStyles({ variant: 'loader', isSticky }))}>\n <AnimatedLoader />\n </div>\n </div>\n );\n }\n\n // Edit mode UI for user messages\n if (isEditing && variant === 'user') {\n return (\n <div\n ref={ref}\n className={cn(\n rootStyles({ variant, alignment: 'right', isEditing: true }),\n 'group',\n className,\n )}\n {...props}\n >\n <div className={cn(editContainerStyles())}>\n <textarea\n ref={textareaRef}\n value={editContent}\n onChange={handleEditContentChange}\n onKeyDown={handleKeyDown}\n className={cn(editTextareaStyles())}\n placeholder=\"Edit your message...\"\n disabled={isSaving}\n aria-label=\"Edit message\"\n />\n </div>\n {/* Edit mode actions - hint on left, icons on right */}\n <div className={cn(actionsStyles({ variant }), 'opacity-100 justify-between')}>\n <span className={cn(editHintStyles())}>{KEYBOARD_HINT}</span>\n <div className=\"flex\">\n <ActionButton\n onClick={handleEditSave}\n icon={Check}\n label=\"Save\"\n disabled={isSaving || !editContent?.trim() || editContent.trim() === initialEditContent?.trim()}\n />\n <ActionButton\n onClick={handleEditCancel}\n icon={X}\n label=\"Cancel\"\n disabled={isSaving}\n />\n </div>\n </div>\n </div>\n );\n }\n\n return (\n <div\n ref={ref}\n className={cn(\n rootStyles({ variant, alignment: resolvedAlignment, isEditing: false }),\n 'group',\n className,\n )}\n {...props}\n >\n <div className={cn(innerContainerStyles())}>\n {!hideAvatar && variant === 'assistant' && (\n <div className={cn(avatarContainerStyles())}>\n <div className={cn(avatarInnerStyles())}>\n <LogoA size={20} colorVariant=\"lightTeal\" />\n </div>\n </div>\n )}\n\n <div className={cn(messageContainerStyles())}>\n <div className={cn(bubbleStyles({ variant, isSticky }))}>\n <div className={cn(contentStyles({ variant }))} ref={contentRef}>\n {variant === 'system' ? (\n <div className={cn(systemContentWrapperStyles())}>\n {/* Shimmer overlay that passes over the content */}\n <div className={cn(shimmerOverlayStyles())} />\n {/* Activity icon with rhythm animation */}\n <div className={cn(activityIconAnimatedStyles())}>\n <Activity size={16} />\n {/* Subtle glowing backdrop for active feel */}\n <div className={cn(activityIconGlowStyles())} />\n </div>\n {/* Text content */}\n <span className={cn(textStyles({ variant }))}>\n {children}\n </span>\n </div>\n ) : (\n <>\n {variant === 'assistant' && heading && (\n <h4 className={cn(headerStyles())}>{heading}</h4>\n )}\n <div className={cn(textStyles({ variant }))}>{children}</div>\n </>\n )}\n </div>\n </div>\n\n {/* Timestamp - Only show if explicitly enabled */}\n {showTimestamp && timestamp && (\n <div className={cn(timestampStyles())}>\n {formatTimestamp(timestamp)}\n </div>\n )}\n\n {/* Actions row - actions on left, branch navigator on right */}\n {(showActions || showBranchNavigator) && (\n <div className={cn(actionsStyles({ variant }), 'justify-between')}>\n {/* Left side: actions (visible on hover) */}\n <div className={cn(actionsIconsStyles())}>\n {showActions && (\n <>\n {/* Built-in copy action */}\n {enableCopy && copyIcon && (\n <ActionButton\n onClick={handleCopyInternal}\n icon={isCopied ? Check : copyIcon}\n label={isCopied ? 'Copied' : 'Copy'}\n isActive={isCopied}\n />\n )}\n\n {/* Built-in edit action for user messages */}\n {enableEdit && variant === 'user' && (\n <ActionButton\n onClick={handleEditStart}\n icon={Edit2}\n label=\"Edit\"\n />\n )}\n\n {/* Custom actions */}\n {actions.map((action, index) => (\n <ActionButton\n key={`${action.label}-${index}`}\n onClick={action.onClick}\n icon={action.icon}\n label={action.label}\n isActive={action.isActive}\n showSuccessFeedback={action.showSuccessFeedback}\n successIcon={action.successIcon}\n successDuration={action.successDuration}\n />\n ))}\n </>\n )}\n </div>\n\n {/* Right side: branch navigator (always visible) */}\n {showBranchNavigator && branchInfo && (\n <BranchNavigator\n branchInfo={branchInfo}\n onPrevious={onPreviousBranch}\n onNext={onNextBranch}\n isLoading={isBranchLoading}\n />\n )}\n </div>\n )}\n </div>\n </div>\n </div>\n );\n },\n);\n\nMessageBubble.displayName = 'MessageBubble';\n","import { cva } from 'class-variance-authority';\n\nexport const progressBarTrackStyles = cva(\n 'w-full overflow-hidden rounded-full bg-[var(--color-gray-200)]',\n {\n variants: {\n size: {\n small: 'h-1',\n medium: 'h-2',\n large: 'h-3',\n },\n },\n defaultVariants: {\n size: 'medium',\n },\n }\n);\n\nexport const progressBarIndicatorStyles = cva(\n 'h-full w-full flex-1 transition-all duration-300 ease-in-out rounded-full',\n {\n variants: {\n variant: {\n default: 'bg-[var(--color-blue-800)]',\n success: 'bg-[var(--color-green-1000)]',\n error: 'bg-[var(--color-red-1000)]',\n warning: 'bg-[var(--color-amber-1000)]',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n }\n);\n\nexport const progressBarLabelStyles = cva(\n 'flex justify-between mb-2 text-[var(--color-gray-800)]',\n {\n variants: {\n size: {\n small: 'text-xs',\n medium: 'text-sm',\n large: 'text-base',\n },\n },\n defaultVariants: {\n size: 'medium',\n },\n }\n);\n\n","// React\nimport { forwardRef, HTMLAttributes } from 'react';\n\n// Styles\nimport { cn } from '@/utils/cn';\nimport {\n progressBarTrackStyles,\n progressBarIndicatorStyles,\n progressBarLabelStyles,\n} from './ProgressBar.styles';\n\nexport interface ProgressBarProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * The current value of the progress bar.\n */\n value?: number;\n /**\n * The maximum value of the progress bar.\n * @default 100\n */\n max?: number;\n /**\n * The visual variant of the progress bar.\n * @default 'default'\n */\n variant?: 'default' | 'success' | 'error' | 'warning';\n /**\n * The size of the progress bar.\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n /**\n * Whether to show the value label.\n * @default false\n */\n showValueLabel?: boolean;\n /**\n * Custom label text to display above the progress bar.\n */\n label?: string;\n /**\n * Custom formatter for the value label.\n */\n valueFormatter?: (value: number, max: number) => string;\n}\n\nexport const ProgressBar = forwardRef<HTMLDivElement, ProgressBarProps>(\n (\n {\n className,\n value = 0,\n max = 100,\n variant = 'default',\n size = 'medium',\n showValueLabel = false,\n label,\n valueFormatter,\n ...props\n },\n ref\n ) => {\n const percentage = Math.min(Math.max((value / max) * 100, 0), 100);\n const formattedValue = valueFormatter\n ? valueFormatter(value, max)\n : `${Math.round(percentage)}%`;\n\n return (\n <div\n ref={ref}\n className={cn('w-full', className)}\n role=\"progressbar\"\n aria-valuemin={0}\n aria-valuemax={max}\n aria-valuenow={value}\n {...props}\n >\n {(label || showValueLabel) && (\n <div className={progressBarLabelStyles({ size })}>\n {label && <span className=\"font-medium\">{label}</span>}\n {showValueLabel && <span className=\"ml-auto\">{formattedValue}</span>}\n </div>\n )}\n <div className={progressBarTrackStyles({ size })}>\n <div\n className={progressBarIndicatorStyles({ variant })}\n style={{ transform: `translateX(-${100 - percentage}%)` }}\n />\n </div>\n </div>\n );\n }\n);\n\nProgressBar.displayName = 'ProgressBar';\n\n","import { cva } from 'class-variance-authority';\n\nexport const rangeInputStyles = cva(\n [\n 'w-full h-2 rounded-lg appearance-none cursor-pointer',\n 'focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n\n // Webkit Thumb\n '[&::-webkit-slider-thumb]:appearance-none',\n '[&::-webkit-slider-thumb]:w-5 [&::-webkit-slider-thumb]:h-5',\n '[&::-webkit-slider-thumb]:bg-[var(--color-white)]',\n '[&::-webkit-slider-thumb]:border-2',\n '[&::-webkit-slider-thumb]:rounded-full',\n '[&::-webkit-slider-thumb]:shadow-sm',\n '[&::-webkit-slider-thumb]:transition-all [&::-webkit-slider-thumb]:duration-200',\n '[&::-webkit-slider-thumb]:hover:scale-110',\n\n // Firefox Thumb\n '[&::-moz-range-thumb]:w-5 [&::-moz-range-thumb]:h-5',\n '[&::-moz-range-thumb]:bg-[var(--color-white)]',\n '[&::-moz-range-thumb]:border-2',\n '[&::-moz-range-thumb]:rounded-full',\n '[&::-moz-range-thumb]:shadow-sm',\n '[&::-moz-range-thumb]:transition-all [&::-moz-range-thumb]:duration-200',\n '[&::-moz-range-thumb]:hover:scale-110',\n ].join(' '),\n {\n variants: {\n variant: {\n cyan: [\n 'focus-visible:ring-[var(--color-blue-200)]',\n '[&::-webkit-slider-thumb]:border-[var(--color-gray-200)] [&::-webkit-slider-thumb]:hover:border-[var(--color-blue-800)]',\n '[&::-moz-range-thumb]:border-[var(--color-gray-200)] [&::-moz-range-thumb]:hover:border-[var(--color-blue-800)]',\n ],\n orange: [\n 'focus-visible:ring-[var(--color-orange-200)]',\n '[&::-webkit-slider-thumb]:border-[var(--color-gray-200)] [&::-webkit-slider-thumb]:hover:border-[var(--color-orange-800)]',\n '[&::-moz-range-thumb]:border-[var(--color-gray-200)] [&::-moz-range-thumb]:hover:border-[var(--color-orange-800)]',\n ],\n },\n animated: {\n true: [\n '[&::-webkit-slider-thumb]:animate-pulse',\n '[&::-moz-range-thumb]:animate-pulse',\n ],\n false: [],\n },\n },\n defaultVariants: {\n variant: 'cyan',\n animated: false,\n },\n },\n);\n","// React\nimport { InputHTMLAttributes, forwardRef } from 'react';\n\n// Styles\nimport { cn } from '@/utils/cn';\nimport { rangeInputStyles } from './RangeInput.styles';\n\nexport interface RangeInputProps extends InputHTMLAttributes<HTMLInputElement> {\n variant?: 'cyan' | 'orange';\n animated?: boolean;\n}\n\nexport const RangeInput = forwardRef<HTMLInputElement, RangeInputProps>(\n ({ className, variant = 'cyan', animated = false, style, ...props }, ref) => {\n const { min = 0, max = 100, value, defaultValue } = props;\n const currentValue = Number(value ?? defaultValue ?? 0);\n const minVal = Number(min);\n const maxVal = Number(max);\n\n // Calculate percentage for the gradient fill\n const percentage = Math.min(\n Math.max(((currentValue - minVal) * 100) / (maxVal - minVal), 0),\n 100,\n );\n\n const trackColor =\n variant === 'orange'\n ? 'var(--color-orange-800)'\n : 'var(--color-blue-800)';\n\n // We use a linear gradient to simulate the progress bar\n // The first part is the \"filled\" part (accent color)\n // The second part is the \"empty\" part (gray-200)\n const backgroundStyle = `linear-gradient(to right, ${trackColor} 0%, ${trackColor} ${percentage}%, var(--color-gray-200) ${percentage}%, var(--color-gray-200) 100%)`;\n\n return (\n <input\n ref={ref}\n type=\"range\"\n className={cn(rangeInputStyles({ variant, animated }), className)}\n style={{\n background: backgroundStyle,\n ...style,\n }}\n {...props}\n />\n );\n },\n);\n\nRangeInput.displayName = 'RangeInput';\n","import { cva } from 'class-variance-authority';\n\nexport const sidebarItemStyles = cva(\n 'box-border flex cursor-pointer transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] focus-visible:ring-offset-2',\n {\n variants: {\n type: {\n collapsed: 'flex-col items-center justify-center w-[64px] py-[6px] px-[4px] gap-[4px] rounded-[4px]',\n expanded: 'flex-row items-center w-full h-[32px] px-[4px] py-[6px] gap-[8px] rounded-[4px]',\n },\n variant: {\n default: 'text-[var(--color-gray-800)] hover:bg-[var(--color-gray-100)]',\n active: 'text-[var(--color-blue-800)] bg-[var(--color-blue-200)]',\n brand: 'h-[44px] rounded-[24px] bg-transparent hover:bg-transparent', // Special case for brand logo\n },\n disabled: {\n true: 'opacity-50 cursor-not-allowed pointer-events-none',\n },\n },\n compoundVariants: [\n {\n type: 'collapsed',\n variant: 'active',\n className: 'bg-[var(--color-blue-200)]',\n },\n ],\n defaultVariants: {\n type: 'expanded',\n variant: 'default',\n disabled: false,\n },\n }\n);\n\nexport const sidebarItemIconStyles = cva(\n 'relative shrink-0 flex items-center justify-center',\n {\n variants: {\n type: {\n collapsed: 'size-[16px]',\n expanded: 'size-[16px]',\n },\n variant: {\n default: 'text-[var(--color-gray-800)]',\n active: 'text-[var(--color-blue-800)]',\n brand: 'text-[var(--color-blue-1000)] size-[24px]',\n },\n },\n defaultVariants: {\n type: 'expanded',\n variant: 'default',\n },\n }\n);\n\nexport const sidebarItemLabelStyles = cva(\n 'font-normal whitespace-nowrap shrink-0',\n {\n variants: {\n type: {\n collapsed: 'text-[8px] leading-[10px] text-center min-w-full',\n expanded: 'text-[14px] leading-[20px]',\n },\n variant: {\n default: 'text-[var(--color-gray-800)]',\n active: 'text-[var(--color-blue-800)]',\n brand: 'hidden', // Brand variant usually just shows logo in collapsed, or text in expanded? Figma shows only Logo A in collapsed brand.\n },\n },\n defaultVariants: {\n type: 'expanded',\n variant: 'default',\n },\n }\n);\n","// React\nimport { HTMLAttributes, forwardRef, ReactNode } from 'react';\n\n// Styles\nimport { cn } from '@/utils/cn';\nimport { sidebarItemStyles, sidebarItemIconStyles, sidebarItemLabelStyles } from './SidebarItem.styles';\n\nexport interface SidebarItemProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {\n /** The icon to display */\n icon?: ReactNode;\n /** The label text */\n label: string;\n /** Whether the item is in collapsed state */\n isCollapsed?: boolean;\n /** Whether the item is active/selected */\n isActive?: boolean;\n /** Variant of the item */\n variant?: 'default' | 'brand';\n /** Whether the item is disabled */\n disabled?: boolean;\n /** Click handler */\n onClick?: () => void;\n}\n\nexport const SidebarItem = forwardRef<HTMLDivElement, SidebarItemProps>(\n (\n {\n className,\n icon,\n label,\n isCollapsed = false,\n isActive = false,\n variant = 'default',\n disabled = false,\n onClick,\n children,\n ...props\n },\n ref\n ) => {\n const type = isCollapsed ? 'collapsed' : 'expanded';\n // Map component props to style variant\n const styleVariant = isActive ? 'active' : variant;\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLDivElement>) => {\n if (disabled) return;\n if (onClick && (e.key === 'Enter' || e.key === ' ')) {\n e.preventDefault();\n onClick();\n }\n };\n\n const handleClick = () => {\n if (disabled) return;\n onClick?.();\n };\n\n return (\n <div\n ref={ref}\n className={cn(sidebarItemStyles({ type, variant: styleVariant, disabled }), className)}\n role=\"button\"\n tabIndex={disabled ? -1 : 0}\n aria-label={label}\n aria-disabled={disabled}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n {...props}\n >\n {icon && (\n <div className={cn(sidebarItemIconStyles({ type, variant: styleVariant }))}>\n {icon}\n </div>\n )}\n\n {(variant !== 'brand' || !isCollapsed) && (\n <span className={cn(sidebarItemLabelStyles({ type, variant: styleVariant }))}>\n {label}\n </span>\n )}\n </div>\n );\n }\n);\n\nSidebarItem.displayName = 'SidebarItem';\n","import { cva } from 'class-variance-authority';\n\nexport const tagStyles = cva(\n 'inline-flex items-center justify-center rounded-[4px] whitespace-nowrap transition-colors duration-200 box-border',\n {\n variants: {\n variant: {\n default:\n 'border border-[var(--color-gray-200)] bg-[var(--color-gray-100)] px-2 py-[2px] text-[var(--color-gray-800)] gap-1',\n collaborator:\n 'border border-[var(--color-gray-200)] bg-[var(--color-gray-100)] px-2 py-[2px] text-[var(--color-gray-800)] gap-1',\n indicator:\n 'bg-[var(--color-gray-100)] px-[2px] h-[12px] gap-[4px] text-[var(--color-gray-600)]',\n error:\n 'bg-[var(--color-red-200)] px-[2px] h-[12px] gap-[4px] text-[var(--color-red-1000)]',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n }\n);\n\nexport const tagAvatarStyles = cva(\n 'w-4 h-4 rounded-full object-cover shrink-0'\n);\n\nexport const tagIconStyles = cva(\n 'flex items-center justify-center shrink-0'\n);\n","// React\nimport { HTMLAttributes, ReactNode, forwardRef } from 'react';\n\n// Components\nimport { motion } from 'framer-motion';\nimport { Typography } from '@/components/atoms/Typography/Typography';\nimport { X } from '@/components/atoms/icons';\n\n// Styles\nimport { cn } from '@/utils/cn';\nimport { tagStyles, tagAvatarStyles, tagIconStyles } from './Tag.styles';\n\nexport interface TagProps extends HTMLAttributes<HTMLDivElement> {\n variant?: 'default' | 'indicator' | 'collaborator' | 'error';\n startIcon?: ReactNode;\n endIcon?: ReactNode;\n avatarSrc?: string;\n onDelete?: () => void;\n}\n\nexport const Tag = forwardRef<HTMLDivElement, TagProps>(\n (\n {\n className,\n variant = 'default',\n startIcon,\n endIcon,\n avatarSrc,\n onDelete,\n children,\n ...props\n },\n ref,\n ) => {\n return (\n <div\n ref={ref}\n className={cn(\n onDelete && 'relative group',\n tagStyles({ variant }),\n className\n )}\n {...props}\n >\n {avatarSrc && (\n <img src={avatarSrc} alt=\"avatar\" className={tagAvatarStyles()} />\n )}\n {startIcon && <span className={tagIconStyles()}>{startIcon}</span>}\n <Typography variant=\"tag\" color=\"inherit\" className=\"whitespace-nowrap\">\n {children}\n </Typography>\n {endIcon && <span className={tagIconStyles()}>{endIcon}</span>}\n {onDelete && (\n <motion.button\n onClick={(e) => {\n e.stopPropagation();\n onDelete();\n }}\n className=\"absolute -top-[6px] -right-[6px] hidden group-hover:flex items-center justify-center bg-[var(--color-white)] border border-[var(--color-gray-200)] rounded-[8px] p-[2px] focus:outline-none focus:ring-2 focus:ring-[var(--color-blue-800)] shrink-0 z-20\"\n aria-label=\"Remove\"\n initial={{ scale: 0, opacity: 0 }}\n whileInView={{ scale: 1, opacity: 1 }}\n whileHover={{ scale: 1.1 }}\n whileTap={{ scale: 0.95 }}\n transition={{\n scale: { type: \"spring\", stiffness: 400, damping: 17 },\n opacity: { duration: 0.2 }\n }}\n >\n <X size={10} className=\"text-[var(--color-gray-800)]\" />\n </motion.button>\n )}\n </div>\n );\n },\n);\n\nTag.displayName = 'Tag';\n","import { cva } from 'class-variance-authority';\n\nexport const tabsListStyles = cva(\n 'inline-flex items-center justify-start bg-transparent p-0 w-full',\n {\n variants: {\n variant: {\n default: '',\n underline: 'border-b border-[var(--color-gray-200)]',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n }\n);\n\nexport const tabsTriggerStyles = cva(\n 'inline-flex items-center justify-center whitespace-nowrap p-2 font-[\"Inter\",sans-serif] text-[10px] leading-4 font-normal focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border-b border-[var(--color-gray-200)] text-[var(--color-gray-600)] data-[state=active]:text-[var(--color-blue-1000)] data-[state=active]:border-[var(--color-blue-1000)] data-[state=inactive]:hover:bg-[var(--color-gray-100)] transition-colors gap-2 cursor-pointer group shrink-0',\n {\n variants: {\n variant: {\n default: '',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n }\n);\n\nexport const tabsContentStyles = cva(\n 'mt-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] focus-visible:ring-offset-2'\n);\n\nexport const tabsBadgeContainerStyles = cva(\n 'flex items-center gap-[2px]'\n);\n\nexport const tabsTagStyles = cva(\n 'group-data-[state=active]:text-[var(--color-blue-1000)]'\n);\n","// react / next\nimport * as React from 'react';\nimport * as TabsPrimitive from '@radix-ui/react-tabs';\n\n// components\nimport { Tag } from '@/components/molecules/Tag/Tag';\nimport { Settings, TriangleAlert } from '@/components/atoms/icons';\n\n// utils\nimport { cn } from '@/utils/cn';\n\n// styles\nimport {\n tabsListStyles,\n tabsTriggerStyles,\n tabsContentStyles,\n tabsBadgeContainerStyles,\n tabsTagStyles\n} from './Tabs.styles';\n\nconst Tabs = TabsPrimitive.Root;\n\ninterface TabsListProps\n extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.List> {\n variant?: 'default' | 'underline';\n}\n\nconst TabsList = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.List>,\n TabsListProps\n>(({ className, variant, ...props }, ref) => (\n <TabsPrimitive.List\n ref={ref}\n className={cn(tabsListStyles({ variant }), className)}\n {...props}\n />\n));\nTabsList.displayName = TabsPrimitive.List.displayName;\n\ninterface TabsTriggerProps\n extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger> {\n errorCount?: number;\n configurationCount?: number;\n children?: React.ReactNode;\n value: string;\n}\n\nconst TabsTrigger = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Trigger>,\n TabsTriggerProps\n>(({ className, children, errorCount, configurationCount, ...props }, ref) => {\n return (\n <TabsPrimitive.Trigger\n ref={ref}\n className={cn(tabsTriggerStyles(), className)}\n {...props}\n >\n {children}\n {(configurationCount !== undefined || errorCount !== undefined) && (\n <div className={tabsBadgeContainerStyles()}>\n {configurationCount !== undefined && (\n <Tag\n variant=\"indicator\"\n startIcon={<Settings size={10} className=\"text-[#15B1CD]\" />}\n className={tabsTagStyles()}\n >\n {configurationCount}\n </Tag>\n )}\n {errorCount !== undefined && (\n <Tag\n variant=\"indicator\"\n startIcon={<TriangleAlert size={10} className=\"text-[#FB6060]\" />}\n className={tabsTagStyles()}\n >\n {errorCount}\n </Tag>\n )}\n </div>\n )}\n </TabsPrimitive.Trigger>\n );\n});\nTabsTrigger.displayName = TabsPrimitive.Trigger.displayName;\n\nconst TabsContent = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.Content\n ref={ref}\n className={cn(tabsContentStyles(), className)}\n {...props}\n />\n));\nTabsContent.displayName = TabsPrimitive.Content.displayName;\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent };\n","import { cva } from 'class-variance-authority';\n\nexport const textAreaStyles = cva(\n 'w-full bg-[var(--color-white)] border border-solid rounded-[8px] font-normal transition-colors duration-200 box-border focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50 min-h-[80px]',\n {\n variants: {\n status: {\n default:\n 'border-[var(--color-gray-200)] text-[var(--color-gray-600)] placeholder:text-[var(--color-gray-600)] hover:border-[var(--color-gray-500)] focus:border-[var(--color-blue-1000)] focus:text-[var(--color-blue-1000)]',\n error:\n 'border-[var(--color-red-1000)] text-[var(--color-red-1000)] placeholder:text-[var(--color-red-1000)] focus:border-[var(--color-red-1000)]',\n success:\n 'border-[var(--color-green-1000)] text-[var(--color-green-1000)] placeholder:text-[var(--color-green-1000)] focus:border-[var(--color-green-1000)]',\n },\n size: {\n medium: 'px-4 py-4 text-[1rem] leading-[1.5rem]', // 16px/24px\n small: 'px-3 py-2 text-[0.875rem] leading-[1.25rem]', // 14px/20px\n tiny: 'p-2 text-[0.75rem] leading-[1rem]', // 12px/16px\n },\n resize: {\n none: 'resize-none',\n vertical: 'resize-y',\n horizontal: 'resize-x',\n both: 'resize',\n },\n },\n defaultVariants: {\n status: 'default',\n size: 'medium',\n resize: 'vertical',\n },\n }\n);\n\nexport const textAreaContainerStyles = cva('relative w-full', {\n variants: {\n size: {\n medium: '',\n small: '',\n tiny: '',\n },\n },\n defaultVariants: {\n size: 'medium',\n },\n});\n","import { TextareaHTMLAttributes, forwardRef } from 'react';\nimport { cn } from '@/utils/cn';\nimport {\n textAreaStyles,\n textAreaContainerStyles,\n} from './TextArea.styles';\n\nexport interface TextAreaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'size'> {\n status?: 'default' | 'error' | 'success';\n size?: 'medium' | 'small' | 'tiny';\n resize?: 'none' | 'vertical' | 'horizontal' | 'both';\n}\n\nexport const TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(\n (\n {\n className,\n status = 'default',\n size = 'medium',\n resize = 'vertical',\n disabled,\n ...props\n },\n ref\n ) => {\n return (\n <div className={textAreaContainerStyles({ size })}>\n <textarea\n ref={ref}\n className={cn(\n textAreaStyles({ status, size, resize }),\n className\n )}\n disabled={disabled}\n {...props}\n />\n </div>\n );\n }\n);\n\nTextArea.displayName = 'TextArea';\n","import { cva } from 'class-variance-authority';\n\nexport const timestampContainerStyles = cva(\n 'inline-flex items-center gap-1 font-sans whitespace-nowrap',\n {\n variants: {\n size: {\n small: 'text-[0.625rem] leading-[1rem]', // 10px / 16px\n medium: 'text-[0.75rem] leading-[1rem]', // 12px / 16px\n large: 'text-[0.875rem] leading-[1.25rem]', // 14px / 20px\n },\n variant: {\n default: 'text-[var(--color-gray-600)]',\n primary: 'text-[var(--color-gray-800)]',\n muted: 'text-[var(--color-gray-600)]',\n },\n },\n defaultVariants: {\n size: 'medium',\n variant: 'default',\n },\n },\n);\n\nexport const timestampIconStyles = cva(\n 'flex items-center justify-center shrink-0',\n {\n variants: {\n size: {\n small: '[&>svg]:w-[10px] [&>svg]:h-[10px]',\n medium: '[&>svg]:w-[12px] [&>svg]:h-[12px]',\n large: '[&>svg]:w-[14px] [&>svg]:h-[14px]',\n },\n },\n defaultVariants: {\n size: 'medium',\n },\n },\n);\n","// React\nimport { HTMLAttributes, forwardRef, useMemo } from 'react';\n\n// Components\nimport { ClockHistory } from '@/components/atoms/icons';\n\n// Styles\nimport { cn } from '@/utils/cn';\nimport {\n timestampContainerStyles,\n timestampIconStyles,\n} from './Timestamp.styles';\n\nexport type TimestampFormat =\n | 'relative'\n | 'short'\n | 'long'\n | 'time'\n | 'datetime';\n\nexport interface TimestampProps\n extends Omit<HTMLAttributes<HTMLTimeElement>, 'dateTime'> {\n /** The date to display - can be a Date object, timestamp number, or ISO string */\n date: Date | number | string;\n /** The format to display the timestamp */\n format?: TimestampFormat;\n /** Size variant */\n size?: 'small' | 'medium' | 'large';\n /** Color variant */\n variant?: 'default' | 'primary' | 'muted';\n /** Whether to show the clock icon */\n showIcon?: boolean;\n /** Custom locale for date formatting (default: 'en-US') */\n locale?: string;\n}\n\n/**\n * Formats a relative time string (e.g., \"2 hours ago\", \"in 3 days\")\n */\nconst formatRelativeTime = (date: Date, now: Date): string => {\n const diffMs = now.getTime() - date.getTime();\n const diffSeconds = Math.floor(diffMs / 1000);\n const diffMinutes = Math.floor(diffSeconds / 60);\n const diffHours = Math.floor(diffMinutes / 60);\n const diffDays = Math.floor(diffHours / 24);\n const diffWeeks = Math.floor(diffDays / 7);\n const diffMonths = Math.floor(diffDays / 30);\n const diffYears = Math.floor(diffDays / 365);\n\n const isFuture = diffMs < 0;\n const absSeconds = Math.abs(diffSeconds);\n const absMinutes = Math.abs(diffMinutes);\n const absHours = Math.abs(diffHours);\n const absDays = Math.abs(diffDays);\n const absWeeks = Math.abs(diffWeeks);\n const absMonths = Math.abs(diffMonths);\n const absYears = Math.abs(diffYears);\n\n const formatUnit = (value: number, unit: string): string => {\n const plural = value === 1 ? '' : 's';\n if (isFuture) {\n return `in ${value} ${unit}${plural}`;\n }\n return `${value} ${unit}${plural} ago`;\n };\n\n if (absSeconds < 60) {\n return 'just now';\n }\n if (absMinutes < 60) {\n return formatUnit(absMinutes, 'minute');\n }\n if (absHours < 24) {\n return formatUnit(absHours, 'hour');\n }\n if (absDays === 1) {\n return isFuture ? 'tomorrow' : 'yesterday';\n }\n if (absDays < 7) {\n return formatUnit(absDays, 'day');\n }\n if (absWeeks < 4) {\n return formatUnit(absWeeks, 'week');\n }\n if (absMonths < 12) {\n return formatUnit(absMonths, 'month');\n }\n return formatUnit(absYears, 'year');\n};\n\n/**\n * Formats a date based on the specified format\n */\nconst formatDate = (\n date: Date,\n format: TimestampFormat,\n locale: string,\n): string => {\n switch (format) {\n case 'relative':\n return formatRelativeTime(date, new Date());\n\n case 'short':\n return date.toLocaleDateString(locale, {\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n });\n\n case 'long':\n return date.toLocaleDateString(locale, {\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n });\n\n case 'time':\n return date.toLocaleTimeString(locale, {\n hour: 'numeric',\n minute: '2-digit',\n hour12: true,\n });\n\n case 'datetime':\n return date.toLocaleDateString(locale, {\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n hour: 'numeric',\n minute: '2-digit',\n hour12: true,\n });\n\n default:\n return date.toLocaleDateString(locale);\n }\n};\n\n/**\n * Parses the input date to a Date object\n */\nconst parseDate = (date: Date | number | string): Date => {\n if (date instanceof Date) {\n return date;\n }\n if (typeof date === 'number') {\n return new Date(date);\n }\n return new Date(date);\n};\n\nexport const Timestamp = forwardRef<HTMLTimeElement, TimestampProps>(\n (\n {\n className,\n date,\n format = 'relative',\n size = 'medium',\n variant = 'default',\n showIcon = false,\n locale = 'en-US',\n ...props\n },\n ref,\n ) => {\n const parsedDate = useMemo(() => parseDate(date), [date]);\n const formattedDate = useMemo(\n () => formatDate(parsedDate, format, locale),\n [parsedDate, format, locale],\n );\n const isoString = useMemo(() => parsedDate.toISOString(), [parsedDate]);\n\n // Icon color based on variant\n const iconColor =\n variant === 'primary' ? 'var(--color-gray-800)' : 'var(--color-gray-600)';\n\n // Icon size based on size prop\n const iconSize = size === 'small' ? 10 : size === 'large' ? 14 : 12;\n\n return (\n <time\n ref={ref}\n dateTime={isoString}\n className={cn(timestampContainerStyles({ size, variant }), className)}\n {...props}\n >\n {showIcon && (\n <span className={timestampIconStyles({ size })}>\n <ClockHistory size={iconSize} color={iconColor} />\n </span>\n )}\n {formattedDate}\n </time>\n );\n },\n);\n\nTimestamp.displayName = 'Timestamp';\n","import { cva, type VariantProps } from 'class-variance-authority';\n\nexport const toastStyles = cva(\n 'flex min-w-[420px] w-fit max-w-[850px] pl-4 pr-3 py-3 rounded-[12px] shadow-xl border pointer-events-auto gap-2 relative items-center bg-white',\n {\n variants: {\n variant: {\n info: 'bg-[linear-gradient(90deg,rgba(21,177,205,0.08)_0%,rgba(21,177,205,0.08)_100%),linear-gradient(90deg,rgb(255,255,255)_0%,rgb(255,255,255)_100%)] border-[var(--color-blue-800)]',\n success: 'bg-[linear-gradient(90deg,rgba(113,212,129,0.08)_0%,rgba(113,212,129,0.08)_100%),linear-gradient(90deg,rgb(255,255,255)_0%,rgb(255,255,255)_100%)] border-[var(--color-green-1000)]',\n warning:\n 'bg-[linear-gradient(90deg,rgba(242,229,40,0.08)_0%,rgba(242,229,40,0.08)_100%),linear-gradient(90deg,rgb(255,255,255)_0%,rgb(255,255,255)_100%)] border-[var(--color-orange-800)]',\n error: 'bg-[linear-gradient(90deg,rgba(251,96,96,0.08)_0%,rgba(251,96,96,0.08)_100%),linear-gradient(90deg,rgb(255,255,255)_0%,rgb(255,255,255)_100%)] border-[var(--color-red-1000)]',\n prompt: 'bg-[var(--color-gray-50)] border-[var(--color-blue-1000)]',\n },\n },\n defaultVariants: {\n variant: 'info',\n },\n },\n);\n\nexport type ToastVariant = NonNullable<\n VariantProps<typeof toastStyles>['variant']\n>;\n\nexport const iconStyles = cva('flex-shrink-0', {\n variants: {\n variant: {\n info: 'text-[var(--color-blue-800)]',\n success: 'text-[var(--color-green-1000)]',\n warning: 'text-[var(--color-orange-800)]',\n error: 'text-[var(--color-red-1000)]',\n prompt: 'text-[var(--color-blue-1000)]',\n },\n },\n defaultVariants: {\n variant: 'info',\n },\n});\n\nexport const contentStyles = cva(\n 'flex items-center gap-1 flex-1',\n);\n\nexport const titleStyles = cva(\n 'font-bold text-[var(--color-blue-1000)] text-[0.75rem] leading-normal',\n);\n\nexport const descriptionStyles = cva(\n 'font-normal text-[var(--color-blue-1000)] text-[0.75rem] leading-normal',\n);\n\nexport const actionsWrapperStyles = cva(\n 'flex items-center gap-2 shrink-0',\n);\n\nexport const separatorStyles = cva(\n 'w-[1px] self-stretch flex-shrink-0 bg-current',\n {\n variants: {\n variant: {\n info: 'text-[var(--color-blue-800)]',\n success: 'text-[var(--color-green-1000)]',\n warning: 'text-[var(--color-orange-800)]',\n error: 'text-[var(--color-red-1000)]',\n prompt: 'text-[var(--color-blue-1000)]',\n },\n },\n defaultVariants: {\n variant: 'info',\n },\n },\n);\n\nexport const closeButtonStyles = cva(\n 'p-0 bg-transparent border-none text-[var(--color-blue-1000)] hover:opacity-70 transition-opacity flex items-center justify-center w-4 h-4 shrink-0 cursor-pointer rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] focus-visible:ring-offset-2',\n);\n","// react\nimport { ReactNode } from 'react';\nimport { toast, Toaster as SonnerToaster, ToasterProps } from 'sonner';\n\n// components\nimport { Button } from '../Button/Button';\nimport {\n Info,\n TriangleAlert,\n X,\n Check,\n CheckCircle,\n AlertCircle,\n Sparks,\n Trash,\n} from '@/components/atoms/icons';\n\n// styles\nimport {\n toastStyles,\n iconStyles,\n contentStyles,\n titleStyles,\n descriptionStyles,\n closeButtonStyles,\n actionsWrapperStyles,\n separatorStyles,\n ToastVariant,\n} from './Toast.styles';\n\n// misc\nimport { cn } from '@/utils/cn';\n\nexport type { ToastVariant };\n\nexport interface ToastAction {\n label: string;\n onClick: (e: React.MouseEvent<HTMLButtonElement>) => void;\n icon?: ReactNode;\n}\n\nexport interface ToastProps {\n id?: string | number;\n variant?: ToastVariant;\n title: string;\n description?: ReactNode;\n icon?: ReactNode;\n action?: ToastAction;\n secondaryAction?: ToastAction;\n onClose?: () => void;\n}\n\nconst icons = {\n info: Info,\n success: CheckCircle,\n warning: TriangleAlert,\n error: AlertCircle,\n prompt: Sparks,\n};\n\nconst iconColors = {\n info: 'var(--color-blue-800)',\n success: 'var(--color-green-1000)',\n warning: 'var(--color-orange-800)',\n error: 'var(--color-red-1000)',\n prompt: 'var(--color-blue-800)',\n};\n\nexport const Toast = ({\n id,\n variant = 'info',\n title,\n description,\n icon,\n action,\n secondaryAction,\n onClose,\n}: ToastProps) => {\n const IconComponent = icons[variant];\n const iconColor = iconColors[variant];\n\n const handleClose = () => {\n if (onClose) {\n onClose();\n }\n if (id) {\n toast.dismiss(id);\n }\n };\n\n const handleActionClick = (\n onClick: (e: React.MouseEvent<HTMLButtonElement>) => void,\n ) => {\n return (e: React.MouseEvent<HTMLButtonElement>) => {\n onClick(e);\n if (id) {\n toast.dismiss(id);\n }\n };\n };\n\n const renderIcon = () => {\n if (icon) return icon;\n\n // Render custom icons with color prop\n if (variant === 'success') {\n return <CheckCircle size={16} color={iconColor} />;\n }\n if (variant === 'error') {\n return <AlertCircle size={16} color={iconColor} />;\n }\n if (variant === 'prompt') {\n return <Sparks size={16} color={iconColor} />;\n }\n\n // Lucide icons inherit color from CSS\n return <IconComponent size={16} />;\n };\n\n return (\n <div className={cn(toastStyles({ variant }))} role=\"alert\">\n <div className={iconStyles({ variant })}>{renderIcon()}</div>\n\n <div className={contentStyles()}>\n <span className={titleStyles()}>{title}</span>\n {description && (\n <span className={descriptionStyles()}>{description}</span>\n )}\n </div>\n\n <div className={separatorStyles({ variant })} />\n\n <div className={actionsWrapperStyles()}>\n {secondaryAction && (\n <Button\n onClick={handleActionClick(secondaryAction.onClick)}\n variant=\"tertiary\"\n size=\"small\"\n startIcon={\n secondaryAction.icon || <Trash size={13} color=\"currentColor\" />\n }\n className=\"w-auto\"\n >\n {secondaryAction.label}\n </Button>\n )}\n\n {action && (\n <Button\n onClick={handleActionClick(action.onClick)}\n variant=\"primary\"\n size=\"small\"\n startIcon={action.icon || <Check size={13} color=\"currentColor\" />}\n className=\"w-auto\"\n >\n {action.label}\n </Button>\n )}\n\n <button\n onClick={handleClose}\n className={closeButtonStyles()}\n aria-label=\"Close\"\n >\n <X size={16} />\n </button>\n </div>\n </div>\n );\n};\n\nexport interface ToastContainerProps extends Omit<ToasterProps, 'position'> {\n /** Position of the toast container */\n position?: ToasterProps['position'];\n /** Offset from the edge of the screen in pixels */\n offset?: number | string;\n /** Gap between toasts in pixels */\n gap?: number;\n /** Custom width for toasts */\n width?: number | string;\n}\n\n// Custom Toast Container configured for our design system\nexport const ToastContainer = ({\n position = 'bottom-right',\n offset = 24,\n gap = 8,\n width,\n ...props\n}: ToastContainerProps) => {\n return (\n <SonnerToaster\n position={position}\n offset={offset}\n gap={gap}\n toastOptions={{\n unstyled: true,\n classNames: {\n toast: cn('bg-transparent p-0', width ? '' : 'w-auto'),\n },\n style: width ? { width: typeof width === 'number' ? `${width}px` : width } : undefined,\n }}\n {...props}\n />\n );\n};\n\n// Helper to show toasts easier\nexport const showToast = {\n success: (title: string, description?: string, action?: ToastAction) =>\n toast.custom((id) => (\n <Toast\n id={id}\n variant=\"success\"\n title={title}\n description={description}\n action={action}\n />\n )),\n error: (title: string, description?: string, action?: ToastAction) =>\n toast.custom((id) => (\n <Toast\n id={id}\n variant=\"error\"\n title={title}\n description={description}\n action={action}\n />\n )),\n warning: (title: string, description?: string, action?: ToastAction) =>\n toast.custom((id) => (\n <Toast\n id={id}\n variant=\"warning\"\n title={title}\n description={description}\n action={action}\n />\n )),\n info: (title: string, description?: string, action?: ToastAction) =>\n toast.custom((id) => (\n <Toast\n id={id}\n variant=\"info\"\n title={title}\n description={description}\n action={action}\n />\n )),\n prompt: (\n title: string,\n description?: string,\n action?: ToastAction,\n secondaryAction?: ToastAction,\n ) =>\n toast.custom((id) => (\n <Toast\n id={id}\n variant=\"prompt\"\n title={title}\n description={description}\n action={action}\n secondaryAction={secondaryAction}\n />\n )),\n custom: (props: Omit<ToastProps, 'id'>) =>\n toast.custom((id) => <Toast id={id} {...props} />),\n};\n","import { cva } from 'class-variance-authority';\n\nexport const toggleRowStyles = cva('flex items-center gap-3');\n\nexport const toggleLabelStyles = cva(\n 'text-[var(--color-gray-1000)] font-medium select-none',\n);\n\nexport const toggleButtonStyles = cva(\n 'relative inline-flex h-[24px] w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',\n {\n variants: {\n enabled: {\n true: 'bg-[var(--color-blue-800)]',\n false: 'bg-[var(--color-gray-200)]',\n },\n },\n defaultVariants: {\n enabled: false,\n },\n },\n);\n\nexport const toggleKnobStyles = cva(\n 'pointer-events-none inline-block h-[20px] w-[20px] transform rounded-full bg-[var(--color-white)] shadow-lg ring-0 transition duration-200 ease-in-out',\n {\n variants: {\n enabled: {\n true: 'translate-x-[20px]',\n false: 'translate-x-0',\n },\n },\n defaultVariants: {\n enabled: false,\n },\n },\n);\n","// React\nimport { forwardRef, ButtonHTMLAttributes } from 'react';\n\n// Styles\nimport { cn } from '@/utils/cn';\nimport {\n toggleRowStyles,\n toggleLabelStyles,\n toggleButtonStyles,\n toggleKnobStyles,\n} from './Toggle.styles';\n\n// Components\nimport { Typography } from '@/components/atoms/Typography/Typography';\n\nexport interface ToggleProps\n extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onChange'> {\n enabled: boolean;\n onChange: (enabled: boolean) => void;\n label?: string;\n}\n\nexport const Toggle = forwardRef<HTMLButtonElement, ToggleProps>(\n ({ enabled, onChange, label, className, disabled, ...props }, ref) => {\n return (\n <div className={cn(toggleRowStyles(), className)}>\n {label && (\n <Typography variant=\"small\" className={toggleLabelStyles()}>\n {label}\n </Typography>\n )}\n <button\n ref={ref}\n type=\"button\"\n role=\"switch\"\n aria-checked={enabled}\n disabled={disabled}\n onClick={() => !disabled && onChange(!enabled)}\n className={toggleButtonStyles({ enabled })}\n {...props}\n >\n <span className={toggleKnobStyles({ enabled })} />\n </button>\n </div>\n );\n },\n);\n\nToggle.displayName = 'Toggle';\n","import { cva } from 'class-variance-authority';\n\nexport const statusMessageContainerStyles = cva(\n 'flex items-center justify-between w-full gap-2 min-h-[20px]'\n);\n\nexport const statusMessageTextStyles = cva(\n 'text-xs font-normal font-sans leading-4 whitespace-nowrap',\n {\n variants: {\n status: {\n success: 'text-[var(--color-gray-800)]',\n warning: 'text-[var(--color-gray-800)]',\n error: 'text-[var(--color-gray-800)]',\n info: 'text-[var(--color-gray-800)]',\n neutral: 'text-[var(--color-gray-800)]',\n loading: 'text-[var(--color-gray-800)]',\n },\n },\n defaultVariants: {\n status: 'neutral',\n },\n }\n);\n\nexport const statusMessageIconStyles = cva(\n 'w-4 h-4',\n {\n variants: {\n status: {\n success: 'text-[var(--color-green-1000)]',\n warning: 'text-[var(--color-orange-800)]',\n error: 'text-[var(--color-red-1000)]',\n info: 'text-[var(--color-blue-800)]',\n neutral: 'text-[var(--color-gray-600)]',\n loading: 'text-[var(--color-blue-800)]', // Matches Running/Info color\n },\n },\n defaultVariants: {\n status: 'neutral',\n },\n }\n);\n\n","import { HTMLAttributes, forwardRef } from 'react';\nimport { cn } from '@/utils/cn';\nimport { StatusIndicator } from '@/components/atoms/StatusIndicator/StatusIndicator';\nimport { CheckCircle, AlertCircle, TriangleAlert, Loader, Info } from '@/components/atoms/icons';\nimport {\n statusMessageContainerStyles,\n statusMessageTextStyles,\n} from './StatusMessage.styles';\n\nexport interface StatusMessageProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {\n status?: 'success' | 'warning' | 'error' | 'info' | 'neutral' | 'loading';\n message: string;\n}\n\n// Icon colors matching StatusIndicator dot colors\nconst iconColors = {\n success: 'var(--color-green-1000)',\n warning: 'var(--color-orange-800)',\n error: 'var(--color-red-1000)',\n info: 'var(--color-blue-800)',\n neutral: 'var(--color-gray-600)',\n loading: 'var(--color-blue-800)',\n};\n\nexport const StatusMessage = forwardRef<HTMLDivElement, StatusMessageProps>(\n ({ className, status = 'neutral', message, ...props }, ref) => {\n // Map status to StatusIndicator variant\n const indicatorVariant = status === 'loading' ? 'info' : status;\n const iconColor = iconColors[status];\n\n // Map status to Icon\n const renderIcon = () => {\n if (status === 'loading') {\n return <Loader size={16} color={iconColor} className=\"animate-spin\" />;\n }\n if (status === 'success') {\n return <CheckCircle size={16} color={iconColor} />;\n }\n if (status === 'warning') {\n return <TriangleAlert size={16} color={iconColor} />;\n }\n if (status === 'error') {\n return <AlertCircle size={16} color={iconColor} />;\n }\n if (status === 'info') {\n return <Info size={16} color={iconColor} />;\n }\n return null;\n };\n\n return (\n <div\n ref={ref}\n className={cn(statusMessageContainerStyles(), className)}\n {...props}\n >\n <div className=\"flex items-center gap-2\">\n <StatusIndicator variant={indicatorVariant} size=\"small\" />\n <span className={statusMessageTextStyles({ status })}>{message}</span>\n </div>\n <div className=\"w-4 h-4 flex items-center justify-center\">\n {renderIcon()}\n </div>\n </div>\n );\n }\n);\n\nStatusMessage.displayName = 'StatusMessage';\n\n","import { cva } from 'class-variance-authority';\n\nexport const autopilotActionContainerStyles = cva(\n 'flex items-center justify-between w-full gap-2 min-h-[20px]'\n);\n\nexport const autopilotActionContentStyles = cva(\n 'flex items-center gap-2'\n);\n\nexport const autopilotActionTextStyles = cva(\n 'text-[12px] font-normal font-sans leading-[16px]',\n {\n variants: {\n status: {\n running: 'text-[var(--color-gray-800)]',\n completed: 'text-[var(--color-gray-800)]',\n stopped: 'text-[var(--color-blue-800)]',\n },\n },\n defaultVariants: {\n status: 'running',\n },\n }\n);\n\nexport const autopilotActionIconContainerStyles = cva(\n 'w-4 h-4 flex items-center justify-center shrink-0'\n);\n","// React\nimport { HTMLAttributes, forwardRef } from 'react';\n\n// Components\nimport { Hexagon, CheckCircle, Pause, Hand } from '@/components/atoms/icons';\n\n// Styles\nimport { cn } from '@/utils/cn';\nimport {\n autopilotActionContainerStyles,\n autopilotActionContentStyles,\n autopilotActionTextStyles,\n autopilotActionIconContainerStyles,\n} from './AutopilotAction.styles';\n\nexport interface AutopilotActionProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {\n /** The status of the autopilot action */\n status?: 'running' | 'completed' | 'stopped';\n /** The message to display */\n message: string;\n}\n\n/** Color mapping for hexagon and action icons based on status */\nconst statusColors = {\n running: 'var(--color-gray-800)',\n completed: 'var(--color-gray-800)',\n stopped: 'var(--color-blue-800)',\n};\n\n/** Color for the action icon on the right side */\nconst actionIconColors = {\n running: 'var(--color-gray-800)',\n completed: 'var(--color-green-1000)',\n stopped: 'var(--color-blue-800)',\n};\n\nexport const AutopilotAction = forwardRef<HTMLDivElement, AutopilotActionProps>(\n ({ className, status = 'running', message, ...props }, ref) => {\n const hexagonColor = statusColors[status];\n const actionIconColor = actionIconColors[status];\n\n /** Renders the appropriate action icon based on status */\n const renderActionIcon = () => {\n if (status === 'completed') {\n return <CheckCircle size={16} color={actionIconColor} />;\n }\n if (status === 'stopped') {\n return <Hand size={16} color={actionIconColor} />;\n }\n // Default: running\n return <Pause size={16} color={actionIconColor} />;\n };\n\n return (\n <div\n ref={ref}\n className={cn(autopilotActionContainerStyles(), className)}\n {...props}\n >\n <div className={autopilotActionContentStyles()}>\n <div className={autopilotActionIconContainerStyles()}>\n <Hexagon size={16} color={hexagonColor} />\n </div>\n <span className={autopilotActionTextStyles({ status })}>{message}</span>\n </div>\n <div className={autopilotActionIconContainerStyles()}>\n {renderActionIcon()}\n </div>\n </div>\n );\n }\n);\n\nAutopilotAction.displayName = 'AutopilotAction';\n","import { cva } from 'class-variance-authority';\n\nexport const tooltipContentStyles = cva(\n 'z-50 rounded-[4px] px-3 py-3 shadow-[0px_8px_8px_-4px_rgba(0,0,0,0.04),0px_20px_24px_-4px_rgba(0,0,0,0.08)] max-w-[var(--radix-tooltip-content-available-width)] origin-[var(--radix-tooltip-content-transform-origin)]',\n {\n variants: {\n variant: {\n default: 'bg-[var(--color-blue-1000)] text-[var(--color-gray-50)]',\n light: 'bg-[var(--color-gray-50)] text-[var(--color-gray-1000)]',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n },\n);\n\nexport const tooltipArrowStyles = cva('', {\n variants: {\n variant: {\n default: 'fill-[var(--color-blue-1000)]',\n light: 'fill-[var(--color-gray-50)]',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n});\n","import * as React from 'react';\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip';\nimport { motion } from 'framer-motion';\nimport { cn } from '@/utils/cn';\nimport { tooltipContentStyles, tooltipArrowStyles } from './Tooltip.styles';\nimport { Typography } from '@/components/atoms/Typography/Typography';\nimport { VariantProps } from 'class-variance-authority';\n\n// Set default delay to 0ms for better UX (faster than Radix default of 700ms)\nconst TooltipProvider = ({\n delayDuration = 0,\n ...props\n}: TooltipPrimitive.TooltipProviderProps) => (\n <TooltipPrimitive.Provider delayDuration={delayDuration} {...props} />\n);\n\nconst Tooltip = TooltipPrimitive.Root;\n\nconst TooltipTrigger = TooltipPrimitive.Trigger;\n\ninterface TooltipContentProps\n extends React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>,\n VariantProps<typeof tooltipContentStyles> {}\n\nconst TooltipContent = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Content>,\n TooltipContentProps\n>(({ className, sideOffset = 4, children, variant, ...props }, ref) => (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n asChild\n className={cn(tooltipContentStyles({ variant }), className)}\n {...props}\n >\n <motion.div\n initial={{ opacity: 0, scale: 0.95 }}\n animate={{ opacity: 1, scale: 1 }}\n exit={{ opacity: 0, scale: 0.95 }}\n transition={{ duration: 0.1, ease: 'easeOut' }}\n >\n <Typography\n variant=\"x-small\"\n color=\"inherit\"\n className=\"font-normal relative z-10\"\n >\n {children}\n </Typography>\n <TooltipPrimitive.Arrow className={tooltipArrowStyles({ variant })} />\n </motion.div>\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n));\nTooltipContent.displayName = TooltipPrimitive.Content.displayName;\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };\n","import { cva } from 'class-variance-authority';\n\nexport const conversationHeaderStyles = cva(\n 'w-full h-[48px] box-border flex items-center justify-between px-[16px] py-[12px] bg-[var(--color-white)] border-b border-[var(--color-gray-200)]'\n);\n\nexport const headerRightStyles = cva(\n 'flex items-center gap-[12px] h-[24px]'\n);\n\nexport const actionGroupStyles = cva(\n 'flex items-center gap-[12px] h-[24px] rounded-[8px]'\n);\n\nexport const iconButtonStyles = cva(\n 'flex items-center justify-center size-[16px] overflow-hidden text-[var(--color-gray-800)] hover:text-[var(--color-blue-800)] transition-colors bg-transparent border-none cursor-pointer outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] rounded-sm disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:text-[var(--color-gray-800)]',\n {\n variants: {\n disabled: {\n true: 'opacity-50 cursor-not-allowed hover:text-[var(--color-gray-800)]',\n },\n },\n defaultVariants: {\n disabled: false,\n },\n }\n);\n\nexport const tagsGroupStyles = cva('flex items-center gap-[8px]');\n\nexport const collaboratorsGroupStyles = cva('flex items-center'); // We will handle overlap in the component or child items\n\n","// React\nimport { HTMLAttributes, forwardRef } from 'react';\n\n// Components\nimport { Breadcrumbs, BreadcrumbItem } from '@/components/molecules/Breadcrumbs/Breadcrumbs';\nimport { Tag } from '@/components/molecules/Tag/Tag';\nimport { Avatar } from '@/components/atoms/Avatar/Avatar';\nimport { TagPlus, UserPlus } from '@/components/atoms/icons';\n\n// Styles\nimport { cn } from '@/utils/cn';\nimport {\n conversationHeaderStyles,\n headerRightStyles,\n actionGroupStyles,\n iconButtonStyles,\n tagsGroupStyles,\n collaboratorsGroupStyles,\n} from './ConversationHeader.styles';\n\nexport interface ConversationTag {\n id: string;\n label: string;\n}\n\nexport interface ConversationCollaborator {\n id: string;\n name: string;\n src?: string;\n}\n\nexport interface ConversationHeaderProps extends HTMLAttributes<HTMLDivElement> {\n /** Breadcrumb items to display on the left */\n breadcrumbs: BreadcrumbItem[];\n /** List of tags to display */\n tags?: ConversationTag[];\n /** List of collaborators/users to display */\n collaborators?: ConversationCollaborator[];\n /** Callback when adding a tag */\n onAddTag?: () => void;\n /** Callback when adding a collaborator */\n onAddCollaborator?: () => void;\n /** Additional count for tags if truncated */\n tagsOverflowCount?: number;\n /** Whether the add tag button is disabled */\n addTagDisabled?: boolean;\n /** Whether the add collaborator button is disabled */\n addCollaboratorDisabled?: boolean;\n}\n\nexport const ConversationHeader = forwardRef<HTMLDivElement, ConversationHeaderProps>(\n (\n {\n className,\n breadcrumbs,\n tags = [],\n collaborators = [],\n onAddTag,\n onAddCollaborator,\n tagsOverflowCount = 0,\n addTagDisabled = false,\n addCollaboratorDisabled = false,\n ...props\n },\n ref\n ) => {\n return (\n <div\n ref={ref}\n className={cn(conversationHeaderStyles(), className)}\n {...props}\n >\n <Breadcrumbs items={breadcrumbs} size=\"medium\" />\n\n <div className={headerRightStyles()}>\n {/* Tags & Collaborators Group */}\n <div className={actionGroupStyles()}>\n\n {/* Tags Section */}\n {(tags.length > 0 || tagsOverflowCount > 0) && (\n <div className={tagsGroupStyles()}>\n {tags.map((tag) => (\n <Tag key={tag.id} variant=\"default\" className=\"bg-[var(--color-gray-100)] border border-[var(--color-gray-200)] text-[var(--color-gray-800)] px-[8px] py-[2px] text-[10px] h-[20px]\">\n {tag.label}\n </Tag>\n ))}\n {tagsOverflowCount > 0 && (\n <Tag variant=\"default\" className=\"bg-[var(--color-gray-100)] border border-[var(--color-gray-200)] text-[var(--color-gray-800)] px-[8px] py-[2px] text-[10px] h-[20px]\">\n +{tagsOverflowCount}\n </Tag>\n )}\n </div>\n )}\n\n {/* Collaborators Section (Avatars) */}\n {collaborators.length > 0 && (\n <div className={collaboratorsGroupStyles()}>\n <div className=\"flex items-center flex-row-reverse\">\n {/* Flex row reverse to make the first item on top if using negative margin from left,\n but typically we want the first one on left on top.\n Figma uses negative right margin on the wrapper div for each avatar.\n Let's use negative margin-right on items except the last one.\n */}\n {collaborators.map((user, index) => (\n <div\n key={user.id}\n className=\"relative shrink-0 border-[1.5px] border-white rounded-full\"\n style={{\n zIndex: collaborators.length - index,\n marginRight: index < collaborators.length - 1 ? -4 : 0\n }}\n >\n <Avatar\n initials={user.name}\n src={user.src}\n alt={user.name}\n // Avatar component handles size 'small' as 24px or 32px?\n // Looking at Avatar.tsx: size='small' (default) or 'big'.\n // We need 24px. Let's check Avatar implementation details.\n // Avatar.tsx says: const imageSize = size === 'big' ? 64 : 32;\n // 32px might be too big for this header (Figma shows 24px).\n // I might need to override class/size or add 'tiny' size to Avatar later.\n // For now, I'll use className to force size if needed, or accept 32px.\n // Figma explicitly showed 24px size.\n // I will try to force it via className if Avatar allows, otherwise might need to update Avatar.\n className=\"size-[24px] text-[10px]\"\n />\n </div>\n ))}\n </div>\n </div>\n )}\n\n {/* Add Tag Button */}\n <button\n type=\"button\"\n onClick={onAddTag}\n className={iconButtonStyles({ disabled: addTagDisabled })}\n aria-label=\"Add tag\"\n disabled={addTagDisabled}\n >\n <TagPlus size={16} />\n </button>\n\n {/* Add Collaborator Button */}\n <button\n type=\"button\"\n onClick={onAddCollaborator}\n className={iconButtonStyles({ disabled: addCollaboratorDisabled })}\n aria-label=\"Add collaborator\"\n disabled={addCollaboratorDisabled}\n >\n <UserPlus size={16} />\n </button>\n\n </div>\n </div>\n </div>\n );\n }\n);\n\nConversationHeader.displayName = 'ConversationHeader';\n\n","// src/primitive.tsx\nvar canUseDOM = !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\nfunction composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {\n return function handleEvent(event) {\n originalEventHandler?.(event);\n if (checkForDefaultPrevented === false || !event.defaultPrevented) {\n return ourEventHandler?.(event);\n }\n };\n}\nfunction getOwnerWindow(element) {\n if (!canUseDOM) {\n throw new Error(\"Cannot access window outside of the DOM\");\n }\n return element?.ownerDocument?.defaultView ?? window;\n}\nfunction getOwnerDocument(element) {\n if (!canUseDOM) {\n throw new Error(\"Cannot access document outside of the DOM\");\n }\n return element?.ownerDocument ?? document;\n}\nfunction getActiveElement(node, activeDescendant = false) {\n const { activeElement } = getOwnerDocument(node);\n if (!activeElement?.nodeName) {\n return null;\n }\n if (isFrame(activeElement) && activeElement.contentDocument) {\n return getActiveElement(activeElement.contentDocument.body, activeDescendant);\n }\n if (activeDescendant) {\n const id = activeElement.getAttribute(\"aria-activedescendant\");\n if (id) {\n const element = getOwnerDocument(activeElement).getElementById(id);\n if (element) {\n return element;\n }\n }\n }\n return activeElement;\n}\nfunction isFrame(element) {\n return element.tagName === \"IFRAME\";\n}\nexport {\n canUseDOM,\n composeEventHandlers,\n getActiveElement,\n getOwnerDocument,\n getOwnerWindow,\n isFrame\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/compose-refs/src/compose-refs.tsx\nimport * as React from \"react\";\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n return ref(value);\n } else if (ref !== null && ref !== void 0) {\n ref.current = value;\n }\n}\nfunction composeRefs(...refs) {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == \"function\") {\n hasCleanup = true;\n }\n return cleanup;\n });\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == \"function\") {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\nfunction useComposedRefs(...refs) {\n return React.useCallback(composeRefs(...refs), refs);\n}\nexport {\n composeRefs,\n useComposedRefs\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/context/src/create-context.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createContext2(rootComponentName, defaultContext) {\n const Context = React.createContext(defaultContext);\n const Provider = (props) => {\n const { children, ...context } = props;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName) {\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n}\nfunction createContextScope(scopeName, createContextScopeDeps = []) {\n let defaultContexts = [];\n function createContext3(rootComponentName, defaultContext) {\n const BaseContext = React.createContext(defaultContext);\n const index = defaultContexts.length;\n defaultContexts = [...defaultContexts, defaultContext];\n const Provider = (props) => {\n const { scope, children, ...context } = props;\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName, scope) {\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n }\n const createScope = () => {\n const scopeContexts = defaultContexts.map((defaultContext) => {\n return React.createContext(defaultContext);\n });\n return function useScope(scope) {\n const contexts = scope?.[scopeName] || scopeContexts;\n return React.useMemo(\n () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),\n [scope, contexts]\n );\n };\n };\n createScope.scopeName = scopeName;\n return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];\n}\nfunction composeContextScopes(...scopes) {\n const baseScope = scopes[0];\n if (scopes.length === 1) return baseScope;\n const createScope = () => {\n const scopeHooks = scopes.map((createScope2) => ({\n useScope: createScope2(),\n scopeName: createScope2.scopeName\n }));\n return function useComposedScopes(overrideScopes) {\n const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {\n const scopeProps = useScope(overrideScopes);\n const currentScope = scopeProps[`__scope${scopeName}`];\n return { ...nextScopes2, ...currentScope };\n }, {});\n return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);\n };\n };\n createScope.scopeName = baseScope.scopeName;\n return createScope;\n}\nexport {\n createContext2 as createContext,\n createContextScope\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/use-layout-effect/src/use-layout-effect.tsx\nimport * as React from \"react\";\nvar useLayoutEffect2 = globalThis?.document ? React.useLayoutEffect : () => {\n};\nexport {\n useLayoutEffect2 as useLayoutEffect\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/id/src/id.tsx\nimport * as React from \"react\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nvar useReactId = React[\" useId \".trim().toString()] || (() => void 0);\nvar count = 0;\nfunction useId(deterministicId) {\n const [id, setId] = React.useState(useReactId());\n useLayoutEffect(() => {\n if (!deterministicId) setId((reactId) => reactId ?? String(count++));\n }, [deterministicId]);\n return deterministicId || (id ? `radix-${id}` : \"\");\n}\nexport {\n useId\n};\n//# sourceMappingURL=index.mjs.map\n","// src/use-controllable-state.tsx\nimport * as React from \"react\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nvar useInsertionEffect = React[\" useInsertionEffect \".trim().toString()] || useLayoutEffect;\nfunction useControllableState({\n prop,\n defaultProp,\n onChange = () => {\n },\n caller\n}) {\n const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({\n defaultProp,\n onChange\n });\n const isControlled = prop !== void 0;\n const value = isControlled ? prop : uncontrolledProp;\n if (true) {\n const isControlledRef = React.useRef(prop !== void 0);\n React.useEffect(() => {\n const wasControlled = isControlledRef.current;\n if (wasControlled !== isControlled) {\n const from = wasControlled ? \"controlled\" : \"uncontrolled\";\n const to = isControlled ? \"controlled\" : \"uncontrolled\";\n console.warn(\n `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`\n );\n }\n isControlledRef.current = isControlled;\n }, [isControlled, caller]);\n }\n const setValue = React.useCallback(\n (nextValue) => {\n if (isControlled) {\n const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;\n if (value2 !== prop) {\n onChangeRef.current?.(value2);\n }\n } else {\n setUncontrolledProp(nextValue);\n }\n },\n [isControlled, prop, setUncontrolledProp, onChangeRef]\n );\n return [value, setValue];\n}\nfunction useUncontrolledState({\n defaultProp,\n onChange\n}) {\n const [value, setValue] = React.useState(defaultProp);\n const prevValueRef = React.useRef(value);\n const onChangeRef = React.useRef(onChange);\n useInsertionEffect(() => {\n onChangeRef.current = onChange;\n }, [onChange]);\n React.useEffect(() => {\n if (prevValueRef.current !== value) {\n onChangeRef.current?.(value);\n prevValueRef.current = value;\n }\n }, [value, prevValueRef]);\n return [value, setValue, onChangeRef];\n}\nfunction isFunction(value) {\n return typeof value === \"function\";\n}\n\n// src/use-controllable-state-reducer.tsx\nimport * as React2 from \"react\";\nimport { useEffectEvent } from \"@radix-ui/react-use-effect-event\";\nvar SYNC_STATE = Symbol(\"RADIX:SYNC_STATE\");\nfunction useControllableStateReducer(reducer, userArgs, initialArg, init) {\n const { prop: controlledState, defaultProp, onChange: onChangeProp, caller } = userArgs;\n const isControlled = controlledState !== void 0;\n const onChange = useEffectEvent(onChangeProp);\n if (true) {\n const isControlledRef = React2.useRef(controlledState !== void 0);\n React2.useEffect(() => {\n const wasControlled = isControlledRef.current;\n if (wasControlled !== isControlled) {\n const from = wasControlled ? \"controlled\" : \"uncontrolled\";\n const to = isControlled ? \"controlled\" : \"uncontrolled\";\n console.warn(\n `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`\n );\n }\n isControlledRef.current = isControlled;\n }, [isControlled, caller]);\n }\n const args = [{ ...initialArg, state: defaultProp }];\n if (init) {\n args.push(init);\n }\n const [internalState, dispatch] = React2.useReducer(\n (state2, action) => {\n if (action.type === SYNC_STATE) {\n return { ...state2, state: action.state };\n }\n const next = reducer(state2, action);\n if (isControlled && !Object.is(next.state, state2.state)) {\n onChange(next.state);\n }\n return next;\n },\n ...args\n );\n const uncontrolledState = internalState.state;\n const prevValueRef = React2.useRef(uncontrolledState);\n React2.useEffect(() => {\n if (prevValueRef.current !== uncontrolledState) {\n prevValueRef.current = uncontrolledState;\n if (!isControlled) {\n onChange(uncontrolledState);\n }\n }\n }, [onChange, uncontrolledState, prevValueRef, isControlled]);\n const state = React2.useMemo(() => {\n const isControlled2 = controlledState !== void 0;\n if (isControlled2) {\n return { ...internalState, state: controlledState };\n }\n return internalState;\n }, [internalState, controlledState]);\n React2.useEffect(() => {\n if (isControlled && !Object.is(controlledState, internalState.state)) {\n dispatch({ type: SYNC_STATE, state: controlledState });\n }\n }, [controlledState, internalState.state, isControlled]);\n return [state, dispatch];\n}\nexport {\n useControllableState,\n useControllableStateReducer\n};\n//# sourceMappingURL=index.mjs.map\n","// src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n","// src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"select\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/use-callback-ref/src/use-callback-ref.tsx\nimport * as React from \"react\";\nfunction useCallbackRef(callback) {\n const callbackRef = React.useRef(callback);\n React.useEffect(() => {\n callbackRef.current = callback;\n });\n return React.useMemo(() => (...args) => callbackRef.current?.(...args), []);\n}\nexport {\n useCallbackRef\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/use-escape-keydown/src/use-escape-keydown.tsx\nimport * as React from \"react\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nfunction useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {\n const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);\n React.useEffect(() => {\n const handleKeyDown = (event) => {\n if (event.key === \"Escape\") {\n onEscapeKeyDown(event);\n }\n };\n ownerDocument.addEventListener(\"keydown\", handleKeyDown, { capture: true });\n return () => ownerDocument.removeEventListener(\"keydown\", handleKeyDown, { capture: true });\n }, [onEscapeKeyDown, ownerDocument]);\n}\nexport {\n useEscapeKeydown\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/dismissable-layer.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { Primitive, dispatchDiscreteCustomEvent } from \"@radix-ui/react-primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useEscapeKeydown } from \"@radix-ui/react-use-escape-keydown\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DISMISSABLE_LAYER_NAME = \"DismissableLayer\";\nvar CONTEXT_UPDATE = \"dismissableLayer.update\";\nvar POINTER_DOWN_OUTSIDE = \"dismissableLayer.pointerDownOutside\";\nvar FOCUS_OUTSIDE = \"dismissableLayer.focusOutside\";\nvar originalBodyPointerEvents;\nvar DismissableLayerContext = React.createContext({\n layers: /* @__PURE__ */ new Set(),\n layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),\n branches: /* @__PURE__ */ new Set()\n});\nvar DismissableLayer = React.forwardRef(\n (props, forwardedRef) => {\n const {\n disableOutsidePointerEvents = false,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n ...layerProps\n } = props;\n const context = React.useContext(DismissableLayerContext);\n const [node, setNode] = React.useState(null);\n const ownerDocument = node?.ownerDocument ?? globalThis?.document;\n const [, force] = React.useState({});\n const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));\n const layers = Array.from(context.layers);\n const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);\n const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);\n const index = node ? layers.indexOf(node) : -1;\n const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;\n const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;\n const pointerDownOutside = usePointerDownOutside((event) => {\n const target = event.target;\n const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));\n if (!isPointerEventsEnabled || isPointerDownOnBranch) return;\n onPointerDownOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n const focusOutside = useFocusOutside((event) => {\n const target = event.target;\n const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));\n if (isFocusInBranch) return;\n onFocusOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n useEscapeKeydown((event) => {\n const isHighestLayer = index === context.layers.size - 1;\n if (!isHighestLayer) return;\n onEscapeKeyDown?.(event);\n if (!event.defaultPrevented && onDismiss) {\n event.preventDefault();\n onDismiss();\n }\n }, ownerDocument);\n React.useEffect(() => {\n if (!node) return;\n if (disableOutsidePointerEvents) {\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;\n ownerDocument.body.style.pointerEvents = \"none\";\n }\n context.layersWithOutsidePointerEventsDisabled.add(node);\n }\n context.layers.add(node);\n dispatchUpdate();\n return () => {\n if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) {\n ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;\n }\n };\n }, [node, ownerDocument, disableOutsidePointerEvents, context]);\n React.useEffect(() => {\n return () => {\n if (!node) return;\n context.layers.delete(node);\n context.layersWithOutsidePointerEventsDisabled.delete(node);\n dispatchUpdate();\n };\n }, [node, context]);\n React.useEffect(() => {\n const handleUpdate = () => force({});\n document.addEventListener(CONTEXT_UPDATE, handleUpdate);\n return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);\n }, []);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n ...layerProps,\n ref: composedRefs,\n style: {\n pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? \"auto\" : \"none\" : void 0,\n ...props.style\n },\n onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),\n onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),\n onPointerDownCapture: composeEventHandlers(\n props.onPointerDownCapture,\n pointerDownOutside.onPointerDownCapture\n )\n }\n );\n }\n);\nDismissableLayer.displayName = DISMISSABLE_LAYER_NAME;\nvar BRANCH_NAME = \"DismissableLayerBranch\";\nvar DismissableLayerBranch = React.forwardRef((props, forwardedRef) => {\n const context = React.useContext(DismissableLayerContext);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n context.branches.add(node);\n return () => {\n context.branches.delete(node);\n };\n }\n }, [context.branches]);\n return /* @__PURE__ */ jsx(Primitive.div, { ...props, ref: composedRefs });\n});\nDismissableLayerBranch.displayName = BRANCH_NAME;\nfunction usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {\n const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);\n const isPointerInsideReactTreeRef = React.useRef(false);\n const handleClickRef = React.useRef(() => {\n });\n React.useEffect(() => {\n const handlePointerDown = (event) => {\n if (event.target && !isPointerInsideReactTreeRef.current) {\n let handleAndDispatchPointerDownOutsideEvent2 = function() {\n handleAndDispatchCustomEvent(\n POINTER_DOWN_OUTSIDE,\n handlePointerDownOutside,\n eventDetail,\n { discrete: true }\n );\n };\n var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;\n const eventDetail = { originalEvent: event };\n if (event.pointerType === \"touch\") {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;\n ownerDocument.addEventListener(\"click\", handleClickRef.current, { once: true });\n } else {\n handleAndDispatchPointerDownOutsideEvent2();\n }\n } else {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n }\n isPointerInsideReactTreeRef.current = false;\n };\n const timerId = window.setTimeout(() => {\n ownerDocument.addEventListener(\"pointerdown\", handlePointerDown);\n }, 0);\n return () => {\n window.clearTimeout(timerId);\n ownerDocument.removeEventListener(\"pointerdown\", handlePointerDown);\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n };\n }, [ownerDocument, handlePointerDownOutside]);\n return {\n // ensures we check React component tree (not just DOM tree)\n onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true\n };\n}\nfunction useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {\n const handleFocusOutside = useCallbackRef(onFocusOutside);\n const isFocusInsideReactTreeRef = React.useRef(false);\n React.useEffect(() => {\n const handleFocus = (event) => {\n if (event.target && !isFocusInsideReactTreeRef.current) {\n const eventDetail = { originalEvent: event };\n handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {\n discrete: false\n });\n }\n };\n ownerDocument.addEventListener(\"focusin\", handleFocus);\n return () => ownerDocument.removeEventListener(\"focusin\", handleFocus);\n }, [ownerDocument, handleFocusOutside]);\n return {\n onFocusCapture: () => isFocusInsideReactTreeRef.current = true,\n onBlurCapture: () => isFocusInsideReactTreeRef.current = false\n };\n}\nfunction dispatchUpdate() {\n const event = new CustomEvent(CONTEXT_UPDATE);\n document.dispatchEvent(event);\n}\nfunction handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {\n const target = detail.originalEvent.target;\n const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });\n if (handler) target.addEventListener(name, handler, { once: true });\n if (discrete) {\n dispatchDiscreteCustomEvent(target, event);\n } else {\n target.dispatchEvent(event);\n }\n}\nvar Root = DismissableLayer;\nvar Branch = DismissableLayerBranch;\nexport {\n Branch,\n DismissableLayer,\n DismissableLayerBranch,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/focus-scope.tsx\nimport * as React from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { jsx } from \"react/jsx-runtime\";\nvar AUTOFOCUS_ON_MOUNT = \"focusScope.autoFocusOnMount\";\nvar AUTOFOCUS_ON_UNMOUNT = \"focusScope.autoFocusOnUnmount\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar FOCUS_SCOPE_NAME = \"FocusScope\";\nvar FocusScope = React.forwardRef((props, forwardedRef) => {\n const {\n loop = false,\n trapped = false,\n onMountAutoFocus: onMountAutoFocusProp,\n onUnmountAutoFocus: onUnmountAutoFocusProp,\n ...scopeProps\n } = props;\n const [container, setContainer] = React.useState(null);\n const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);\n const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);\n const lastFocusedElementRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));\n const focusScope = React.useRef({\n paused: false,\n pause() {\n this.paused = true;\n },\n resume() {\n this.paused = false;\n }\n }).current;\n React.useEffect(() => {\n if (trapped) {\n let handleFocusIn2 = function(event) {\n if (focusScope.paused || !container) return;\n const target = event.target;\n if (container.contains(target)) {\n lastFocusedElementRef.current = target;\n } else {\n focus(lastFocusedElementRef.current, { select: true });\n }\n }, handleFocusOut2 = function(event) {\n if (focusScope.paused || !container) return;\n const relatedTarget = event.relatedTarget;\n if (relatedTarget === null) return;\n if (!container.contains(relatedTarget)) {\n focus(lastFocusedElementRef.current, { select: true });\n }\n }, handleMutations2 = function(mutations) {\n const focusedElement = document.activeElement;\n if (focusedElement !== document.body) return;\n for (const mutation of mutations) {\n if (mutation.removedNodes.length > 0) focus(container);\n }\n };\n var handleFocusIn = handleFocusIn2, handleFocusOut = handleFocusOut2, handleMutations = handleMutations2;\n document.addEventListener(\"focusin\", handleFocusIn2);\n document.addEventListener(\"focusout\", handleFocusOut2);\n const mutationObserver = new MutationObserver(handleMutations2);\n if (container) mutationObserver.observe(container, { childList: true, subtree: true });\n return () => {\n document.removeEventListener(\"focusin\", handleFocusIn2);\n document.removeEventListener(\"focusout\", handleFocusOut2);\n mutationObserver.disconnect();\n };\n }\n }, [trapped, container, focusScope.paused]);\n React.useEffect(() => {\n if (container) {\n focusScopesStack.add(focusScope);\n const previouslyFocusedElement = document.activeElement;\n const hasFocusedCandidate = container.contains(previouslyFocusedElement);\n if (!hasFocusedCandidate) {\n const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);\n container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n container.dispatchEvent(mountEvent);\n if (!mountEvent.defaultPrevented) {\n focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });\n if (document.activeElement === previouslyFocusedElement) {\n focus(container);\n }\n }\n }\n return () => {\n container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n setTimeout(() => {\n const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);\n container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n container.dispatchEvent(unmountEvent);\n if (!unmountEvent.defaultPrevented) {\n focus(previouslyFocusedElement ?? document.body, { select: true });\n }\n container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n focusScopesStack.remove(focusScope);\n }, 0);\n };\n }\n }, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);\n const handleKeyDown = React.useCallback(\n (event) => {\n if (!loop && !trapped) return;\n if (focusScope.paused) return;\n const isTabKey = event.key === \"Tab\" && !event.altKey && !event.ctrlKey && !event.metaKey;\n const focusedElement = document.activeElement;\n if (isTabKey && focusedElement) {\n const container2 = event.currentTarget;\n const [first, last] = getTabbableEdges(container2);\n const hasTabbableElementsInside = first && last;\n if (!hasTabbableElementsInside) {\n if (focusedElement === container2) event.preventDefault();\n } else {\n if (!event.shiftKey && focusedElement === last) {\n event.preventDefault();\n if (loop) focus(first, { select: true });\n } else if (event.shiftKey && focusedElement === first) {\n event.preventDefault();\n if (loop) focus(last, { select: true });\n }\n }\n }\n },\n [loop, trapped, focusScope.paused]\n );\n return /* @__PURE__ */ jsx(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });\n});\nFocusScope.displayName = FOCUS_SCOPE_NAME;\nfunction focusFirst(candidates, { select = false } = {}) {\n const previouslyFocusedElement = document.activeElement;\n for (const candidate of candidates) {\n focus(candidate, { select });\n if (document.activeElement !== previouslyFocusedElement) return;\n }\n}\nfunction getTabbableEdges(container) {\n const candidates = getTabbableCandidates(container);\n const first = findVisible(candidates, container);\n const last = findVisible(candidates.reverse(), container);\n return [first, last];\n}\nfunction getTabbableCandidates(container) {\n const nodes = [];\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (node) => {\n const isHiddenInput = node.tagName === \"INPUT\" && node.type === \"hidden\";\n if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;\n return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n }\n });\n while (walker.nextNode()) nodes.push(walker.currentNode);\n return nodes;\n}\nfunction findVisible(elements, container) {\n for (const element of elements) {\n if (!isHidden(element, { upTo: container })) return element;\n }\n}\nfunction isHidden(node, { upTo }) {\n if (getComputedStyle(node).visibility === \"hidden\") return true;\n while (node) {\n if (upTo !== void 0 && node === upTo) return false;\n if (getComputedStyle(node).display === \"none\") return true;\n node = node.parentElement;\n }\n return false;\n}\nfunction isSelectableInput(element) {\n return element instanceof HTMLInputElement && \"select\" in element;\n}\nfunction focus(element, { select = false } = {}) {\n if (element && element.focus) {\n const previouslyFocusedElement = document.activeElement;\n element.focus({ preventScroll: true });\n if (element !== previouslyFocusedElement && isSelectableInput(element) && select)\n element.select();\n }\n}\nvar focusScopesStack = createFocusScopesStack();\nfunction createFocusScopesStack() {\n let stack = [];\n return {\n add(focusScope) {\n const activeFocusScope = stack[0];\n if (focusScope !== activeFocusScope) {\n activeFocusScope?.pause();\n }\n stack = arrayRemove(stack, focusScope);\n stack.unshift(focusScope);\n },\n remove(focusScope) {\n stack = arrayRemove(stack, focusScope);\n stack[0]?.resume();\n }\n };\n}\nfunction arrayRemove(array, item) {\n const updatedArray = [...array];\n const index = updatedArray.indexOf(item);\n if (index !== -1) {\n updatedArray.splice(index, 1);\n }\n return updatedArray;\n}\nfunction removeLinks(items) {\n return items.filter((item) => item.tagName !== \"A\");\n}\nvar Root = FocusScope;\nexport {\n FocusScope,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/portal.tsx\nimport * as React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { jsx } from \"react/jsx-runtime\";\nvar PORTAL_NAME = \"Portal\";\nvar Portal = React.forwardRef((props, forwardedRef) => {\n const { container: containerProp, ...portalProps } = props;\n const [mounted, setMounted] = React.useState(false);\n useLayoutEffect(() => setMounted(true), []);\n const container = containerProp || mounted && globalThis?.document?.body;\n return container ? ReactDOM.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;\n});\nPortal.displayName = PORTAL_NAME;\nvar Root = Portal;\nexport {\n Portal,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/presence.tsx\nimport * as React2 from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\n\n// src/use-state-machine.tsx\nimport * as React from \"react\";\nfunction useStateMachine(initialState, machine) {\n return React.useReducer((state, event) => {\n const nextState = machine[state][event];\n return nextState ?? state;\n }, initialState);\n}\n\n// src/presence.tsx\nvar Presence = (props) => {\n const { present, children } = props;\n const presence = usePresence(present);\n const child = typeof children === \"function\" ? children({ present: presence.isPresent }) : React2.Children.only(children);\n const ref = useComposedRefs(presence.ref, getElementRef(child));\n const forceMount = typeof children === \"function\";\n return forceMount || presence.isPresent ? React2.cloneElement(child, { ref }) : null;\n};\nPresence.displayName = \"Presence\";\nfunction usePresence(present) {\n const [node, setNode] = React2.useState();\n const stylesRef = React2.useRef(null);\n const prevPresentRef = React2.useRef(present);\n const prevAnimationNameRef = React2.useRef(\"none\");\n const initialState = present ? \"mounted\" : \"unmounted\";\n const [state, send] = useStateMachine(initialState, {\n mounted: {\n UNMOUNT: \"unmounted\",\n ANIMATION_OUT: \"unmountSuspended\"\n },\n unmountSuspended: {\n MOUNT: \"mounted\",\n ANIMATION_END: \"unmounted\"\n },\n unmounted: {\n MOUNT: \"mounted\"\n }\n });\n React2.useEffect(() => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n prevAnimationNameRef.current = state === \"mounted\" ? currentAnimationName : \"none\";\n }, [state]);\n useLayoutEffect(() => {\n const styles = stylesRef.current;\n const wasPresent = prevPresentRef.current;\n const hasPresentChanged = wasPresent !== present;\n if (hasPresentChanged) {\n const prevAnimationName = prevAnimationNameRef.current;\n const currentAnimationName = getAnimationName(styles);\n if (present) {\n send(\"MOUNT\");\n } else if (currentAnimationName === \"none\" || styles?.display === \"none\") {\n send(\"UNMOUNT\");\n } else {\n const isAnimating = prevAnimationName !== currentAnimationName;\n if (wasPresent && isAnimating) {\n send(\"ANIMATION_OUT\");\n } else {\n send(\"UNMOUNT\");\n }\n }\n prevPresentRef.current = present;\n }\n }, [present, send]);\n useLayoutEffect(() => {\n if (node) {\n let timeoutId;\n const ownerWindow = node.ownerDocument.defaultView ?? window;\n const handleAnimationEnd = (event) => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));\n if (event.target === node && isCurrentAnimation) {\n send(\"ANIMATION_END\");\n if (!prevPresentRef.current) {\n const currentFillMode = node.style.animationFillMode;\n node.style.animationFillMode = \"forwards\";\n timeoutId = ownerWindow.setTimeout(() => {\n if (node.style.animationFillMode === \"forwards\") {\n node.style.animationFillMode = currentFillMode;\n }\n });\n }\n }\n };\n const handleAnimationStart = (event) => {\n if (event.target === node) {\n prevAnimationNameRef.current = getAnimationName(stylesRef.current);\n }\n };\n node.addEventListener(\"animationstart\", handleAnimationStart);\n node.addEventListener(\"animationcancel\", handleAnimationEnd);\n node.addEventListener(\"animationend\", handleAnimationEnd);\n return () => {\n ownerWindow.clearTimeout(timeoutId);\n node.removeEventListener(\"animationstart\", handleAnimationStart);\n node.removeEventListener(\"animationcancel\", handleAnimationEnd);\n node.removeEventListener(\"animationend\", handleAnimationEnd);\n };\n } else {\n send(\"ANIMATION_END\");\n }\n }, [node, send]);\n return {\n isPresent: [\"mounted\", \"unmountSuspended\"].includes(state),\n ref: React2.useCallback((node2) => {\n stylesRef.current = node2 ? getComputedStyle(node2) : null;\n setNode(node2);\n }, [])\n };\n}\nfunction getAnimationName(styles) {\n return styles?.animationName || \"none\";\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nvar Root = Presence;\nexport {\n Presence,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/focus-guards.tsx\nimport * as React from \"react\";\nvar count = 0;\nfunction FocusGuards(props) {\n useFocusGuards();\n return props.children;\n}\nfunction useFocusGuards() {\n React.useEffect(() => {\n const edgeGuards = document.querySelectorAll(\"[data-radix-focus-guard]\");\n document.body.insertAdjacentElement(\"afterbegin\", edgeGuards[0] ?? createFocusGuard());\n document.body.insertAdjacentElement(\"beforeend\", edgeGuards[1] ?? createFocusGuard());\n count++;\n return () => {\n if (count === 1) {\n document.querySelectorAll(\"[data-radix-focus-guard]\").forEach((node) => node.remove());\n }\n count--;\n };\n }, []);\n}\nfunction createFocusGuard() {\n const element = document.createElement(\"span\");\n element.setAttribute(\"data-radix-focus-guard\", \"\");\n element.tabIndex = 0;\n element.style.outline = \"none\";\n element.style.opacity = \"0\";\n element.style.position = \"fixed\";\n element.style.pointerEvents = \"none\";\n return element;\n}\nexport {\n FocusGuards,\n FocusGuards as Root,\n useFocusGuards\n};\n//# sourceMappingURL=index.mjs.map\n","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nvar ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n","export var zeroRightClassName = 'right-scroll-bar-position';\nexport var fullWidthClassName = 'width-before-scroll-bar';\nexport var noScrollbarsClassName = 'with-scroll-bars-hidden';\n/**\n * Name of a CSS variable containing the amount of \"hidden\" scrollbar\n * ! might be undefined ! use will fallback!\n */\nexport var removedBarSizeVariable = '--removed-body-scroll-bar-size';\n","/**\n * Assigns a value for a given ref, no matter of the ref format\n * @param {RefObject} ref - a callback function or ref object\n * @param value - a new value\n *\n * @see https://github.com/theKashey/use-callback-ref#assignref\n * @example\n * const refObject = useRef();\n * const refFn = (ref) => {....}\n *\n * assignRef(refObject, \"refValue\");\n * assignRef(refFn, \"refValue\");\n */\nexport function assignRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n }\n else if (ref) {\n ref.current = value;\n }\n return ref;\n}\n","import { useState } from 'react';\n/**\n * creates a MutableRef with ref change callback\n * @param initialValue - initial ref value\n * @param {Function} callback - a callback to run when value changes\n *\n * @example\n * const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue);\n * ref.current = 1;\n * // prints 0 -> 1\n *\n * @see https://reactjs.org/docs/hooks-reference.html#useref\n * @see https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref\n * @returns {MutableRefObject}\n */\nexport function useCallbackRef(initialValue, callback) {\n var ref = useState(function () { return ({\n // value\n value: initialValue,\n // last callback\n callback: callback,\n // \"memoized\" public interface\n facade: {\n get current() {\n return ref.value;\n },\n set current(value) {\n var last = ref.value;\n if (last !== value) {\n ref.value = value;\n ref.callback(value, last);\n }\n },\n },\n }); })[0];\n // update callback\n ref.callback = callback;\n return ref.facade;\n}\n","import * as React from 'react';\nimport { assignRef } from './assignRef';\nimport { useCallbackRef } from './useRef';\nvar useIsomorphicLayoutEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\nvar currentValues = new WeakMap();\n/**\n * Merges two or more refs together providing a single interface to set their value\n * @param {RefObject|Ref} refs\n * @returns {MutableRefObject} - a new ref, which translates all changes to {refs}\n *\n * @see {@link mergeRefs} a version without buit-in memoization\n * @see https://github.com/theKashey/use-callback-ref#usemergerefs\n * @example\n * const Component = React.forwardRef((props, ref) => {\n * const ownRef = useRef();\n * const domRef = useMergeRefs([ref, ownRef]); // 👈 merge together\n * return <div ref={domRef}>...</div>\n * }\n */\nexport function useMergeRefs(refs, defaultValue) {\n var callbackRef = useCallbackRef(defaultValue || null, function (newValue) {\n return refs.forEach(function (ref) { return assignRef(ref, newValue); });\n });\n // handle refs changes - added or removed\n useIsomorphicLayoutEffect(function () {\n var oldValue = currentValues.get(callbackRef);\n if (oldValue) {\n var prevRefs_1 = new Set(oldValue);\n var nextRefs_1 = new Set(refs);\n var current_1 = callbackRef.current;\n prevRefs_1.forEach(function (ref) {\n if (!nextRefs_1.has(ref)) {\n assignRef(ref, null);\n }\n });\n nextRefs_1.forEach(function (ref) {\n if (!prevRefs_1.has(ref)) {\n assignRef(ref, current_1);\n }\n });\n }\n currentValues.set(callbackRef, refs);\n }, [refs]);\n return callbackRef;\n}\n","import { __assign } from \"tslib\";\nfunction ItoI(a) {\n return a;\n}\nfunction innerCreateMedium(defaults, middleware) {\n if (middleware === void 0) { middleware = ItoI; }\n var buffer = [];\n var assigned = false;\n var medium = {\n read: function () {\n if (assigned) {\n throw new Error('Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.');\n }\n if (buffer.length) {\n return buffer[buffer.length - 1];\n }\n return defaults;\n },\n useMedium: function (data) {\n var item = middleware(data, assigned);\n buffer.push(item);\n return function () {\n buffer = buffer.filter(function (x) { return x !== item; });\n };\n },\n assignSyncMedium: function (cb) {\n assigned = true;\n while (buffer.length) {\n var cbs = buffer;\n buffer = [];\n cbs.forEach(cb);\n }\n buffer = {\n push: function (x) { return cb(x); },\n filter: function () { return buffer; },\n };\n },\n assignMedium: function (cb) {\n assigned = true;\n var pendingQueue = [];\n if (buffer.length) {\n var cbs = buffer;\n buffer = [];\n cbs.forEach(cb);\n pendingQueue = buffer;\n }\n var executeQueue = function () {\n var cbs = pendingQueue;\n pendingQueue = [];\n cbs.forEach(cb);\n };\n var cycle = function () { return Promise.resolve().then(executeQueue); };\n cycle();\n buffer = {\n push: function (x) {\n pendingQueue.push(x);\n cycle();\n },\n filter: function (filter) {\n pendingQueue = pendingQueue.filter(filter);\n return buffer;\n },\n };\n },\n };\n return medium;\n}\nexport function createMedium(defaults, middleware) {\n if (middleware === void 0) { middleware = ItoI; }\n return innerCreateMedium(defaults, middleware);\n}\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function createSidecarMedium(options) {\n if (options === void 0) { options = {}; }\n var medium = innerCreateMedium(null);\n medium.options = __assign({ async: true, ssr: false }, options);\n return medium;\n}\n","import { __assign, __rest } from \"tslib\";\nimport * as React from 'react';\nvar SideCar = function (_a) {\n var sideCar = _a.sideCar, rest = __rest(_a, [\"sideCar\"]);\n if (!sideCar) {\n throw new Error('Sidecar: please provide `sideCar` property to import the right car');\n }\n var Target = sideCar.read();\n if (!Target) {\n throw new Error('Sidecar medium not found');\n }\n return React.createElement(Target, __assign({}, rest));\n};\nSideCar.isSideCarExport = true;\nexport function exportSidecar(medium, exported) {\n medium.useMedium(exported);\n return SideCar;\n}\n","import { createSidecarMedium } from 'use-sidecar';\nexport var effectCar = createSidecarMedium();\n","import { __assign, __rest } from \"tslib\";\nimport * as React from 'react';\nimport { fullWidthClassName, zeroRightClassName } from 'react-remove-scroll-bar/constants';\nimport { useMergeRefs } from 'use-callback-ref';\nimport { effectCar } from './medium';\nvar nothing = function () {\n return;\n};\n/**\n * Removes scrollbar from the page and contain the scroll within the Lock\n */\nvar RemoveScroll = React.forwardRef(function (props, parentRef) {\n var ref = React.useRef(null);\n var _a = React.useState({\n onScrollCapture: nothing,\n onWheelCapture: nothing,\n onTouchMoveCapture: nothing,\n }), callbacks = _a[0], setCallbacks = _a[1];\n var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noRelative = props.noRelative, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? 'div' : _b, gapMode = props.gapMode, rest = __rest(props, [\"forwardProps\", \"children\", \"className\", \"removeScrollBar\", \"enabled\", \"shards\", \"sideCar\", \"noRelative\", \"noIsolation\", \"inert\", \"allowPinchZoom\", \"as\", \"gapMode\"]);\n var SideCar = sideCar;\n var containerRef = useMergeRefs([ref, parentRef]);\n var containerProps = __assign(__assign({}, rest), callbacks);\n return (React.createElement(React.Fragment, null,\n enabled && (React.createElement(SideCar, { sideCar: effectCar, removeScrollBar: removeScrollBar, shards: shards, noRelative: noRelative, noIsolation: noIsolation, inert: inert, setCallbacks: setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode: gapMode })),\n forwardProps ? (React.cloneElement(React.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef }))) : (React.createElement(Container, __assign({}, containerProps, { className: className, ref: containerRef }), children))));\n});\nRemoveScroll.defaultProps = {\n enabled: true,\n removeScrollBar: true,\n inert: false,\n};\nRemoveScroll.classNames = {\n fullWidth: fullWidthClassName,\n zeroRight: zeroRightClassName,\n};\nexport { RemoveScroll };\n","var currentNonce;\nexport var setNonce = function (nonce) {\n currentNonce = nonce;\n};\nexport var getNonce = function () {\n if (currentNonce) {\n return currentNonce;\n }\n if (typeof __webpack_nonce__ !== 'undefined') {\n return __webpack_nonce__;\n }\n return undefined;\n};\n","import { getNonce } from 'get-nonce';\nfunction makeStyleTag() {\n if (!document)\n return null;\n var tag = document.createElement('style');\n tag.type = 'text/css';\n var nonce = getNonce();\n if (nonce) {\n tag.setAttribute('nonce', nonce);\n }\n return tag;\n}\nfunction injectStyles(tag, css) {\n // @ts-ignore\n if (tag.styleSheet) {\n // @ts-ignore\n tag.styleSheet.cssText = css;\n }\n else {\n tag.appendChild(document.createTextNode(css));\n }\n}\nfunction insertStyleTag(tag) {\n var head = document.head || document.getElementsByTagName('head')[0];\n head.appendChild(tag);\n}\nexport var stylesheetSingleton = function () {\n var counter = 0;\n var stylesheet = null;\n return {\n add: function (style) {\n if (counter == 0) {\n if ((stylesheet = makeStyleTag())) {\n injectStyles(stylesheet, style);\n insertStyleTag(stylesheet);\n }\n }\n counter++;\n },\n remove: function () {\n counter--;\n if (!counter && stylesheet) {\n stylesheet.parentNode && stylesheet.parentNode.removeChild(stylesheet);\n stylesheet = null;\n }\n },\n };\n};\n","import * as React from 'react';\nimport { stylesheetSingleton } from './singleton';\n/**\n * creates a hook to control style singleton\n * @see {@link styleSingleton} for a safer component version\n * @example\n * ```tsx\n * const useStyle = styleHookSingleton();\n * ///\n * useStyle('body { overflow: hidden}');\n */\nexport var styleHookSingleton = function () {\n var sheet = stylesheetSingleton();\n return function (styles, isDynamic) {\n React.useEffect(function () {\n sheet.add(styles);\n return function () {\n sheet.remove();\n };\n }, [styles && isDynamic]);\n };\n};\n","import { styleHookSingleton } from './hook';\n/**\n * create a Component to add styles on demand\n * - styles are added when first instance is mounted\n * - styles are removed when the last instance is unmounted\n * - changing styles in runtime does nothing unless dynamic is set. But with multiple components that can lead to the undefined behavior\n */\nexport var styleSingleton = function () {\n var useStyle = styleHookSingleton();\n var Sheet = function (_a) {\n var styles = _a.styles, dynamic = _a.dynamic;\n useStyle(styles, dynamic);\n return null;\n };\n return Sheet;\n};\n","export var zeroGap = {\n left: 0,\n top: 0,\n right: 0,\n gap: 0,\n};\nvar parse = function (x) { return parseInt(x || '', 10) || 0; };\nvar getOffset = function (gapMode) {\n var cs = window.getComputedStyle(document.body);\n var left = cs[gapMode === 'padding' ? 'paddingLeft' : 'marginLeft'];\n var top = cs[gapMode === 'padding' ? 'paddingTop' : 'marginTop'];\n var right = cs[gapMode === 'padding' ? 'paddingRight' : 'marginRight'];\n return [parse(left), parse(top), parse(right)];\n};\nexport var getGapWidth = function (gapMode) {\n if (gapMode === void 0) { gapMode = 'margin'; }\n if (typeof window === 'undefined') {\n return zeroGap;\n }\n var offsets = getOffset(gapMode);\n var documentWidth = document.documentElement.clientWidth;\n var windowWidth = window.innerWidth;\n return {\n left: offsets[0],\n top: offsets[1],\n right: offsets[2],\n gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0]),\n };\n};\n","import * as React from 'react';\nimport { styleSingleton } from 'react-style-singleton';\nimport { fullWidthClassName, zeroRightClassName, noScrollbarsClassName, removedBarSizeVariable } from './constants';\nimport { getGapWidth } from './utils';\nvar Style = styleSingleton();\nexport var lockAttribute = 'data-scroll-locked';\n// important tip - once we measure scrollBar width and remove them\n// we could not repeat this operation\n// thus we are using style-singleton - only the first \"yet correct\" style will be applied.\nvar getStyles = function (_a, allowRelative, gapMode, important) {\n var left = _a.left, top = _a.top, right = _a.right, gap = _a.gap;\n if (gapMode === void 0) { gapMode = 'margin'; }\n return \"\\n .\".concat(noScrollbarsClassName, \" {\\n overflow: hidden \").concat(important, \";\\n padding-right: \").concat(gap, \"px \").concat(important, \";\\n }\\n body[\").concat(lockAttribute, \"] {\\n overflow: hidden \").concat(important, \";\\n overscroll-behavior: contain;\\n \").concat([\n allowRelative && \"position: relative \".concat(important, \";\"),\n gapMode === 'margin' &&\n \"\\n padding-left: \".concat(left, \"px;\\n padding-top: \").concat(top, \"px;\\n padding-right: \").concat(right, \"px;\\n margin-left:0;\\n margin-top:0;\\n margin-right: \").concat(gap, \"px \").concat(important, \";\\n \"),\n gapMode === 'padding' && \"padding-right: \".concat(gap, \"px \").concat(important, \";\"),\n ]\n .filter(Boolean)\n .join(''), \"\\n }\\n \\n .\").concat(zeroRightClassName, \" {\\n right: \").concat(gap, \"px \").concat(important, \";\\n }\\n \\n .\").concat(fullWidthClassName, \" {\\n margin-right: \").concat(gap, \"px \").concat(important, \";\\n }\\n \\n .\").concat(zeroRightClassName, \" .\").concat(zeroRightClassName, \" {\\n right: 0 \").concat(important, \";\\n }\\n \\n .\").concat(fullWidthClassName, \" .\").concat(fullWidthClassName, \" {\\n margin-right: 0 \").concat(important, \";\\n }\\n \\n body[\").concat(lockAttribute, \"] {\\n \").concat(removedBarSizeVariable, \": \").concat(gap, \"px;\\n }\\n\");\n};\nvar getCurrentUseCounter = function () {\n var counter = parseInt(document.body.getAttribute(lockAttribute) || '0', 10);\n return isFinite(counter) ? counter : 0;\n};\nexport var useLockAttribute = function () {\n React.useEffect(function () {\n document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());\n return function () {\n var newCounter = getCurrentUseCounter() - 1;\n if (newCounter <= 0) {\n document.body.removeAttribute(lockAttribute);\n }\n else {\n document.body.setAttribute(lockAttribute, newCounter.toString());\n }\n };\n }, []);\n};\n/**\n * Removes page scrollbar and blocks page scroll when mounted\n */\nexport var RemoveScrollBar = function (_a) {\n var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? 'margin' : _b;\n useLockAttribute();\n /*\n gap will be measured on every component mount\n however it will be used only by the \"first\" invocation\n due to singleton nature of <Style\n */\n var gap = React.useMemo(function () { return getGapWidth(gapMode); }, [gapMode]);\n return React.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? '!important' : '') });\n};\n","var passiveSupported = false;\nif (typeof window !== 'undefined') {\n try {\n var options = Object.defineProperty({}, 'passive', {\n get: function () {\n passiveSupported = true;\n return true;\n },\n });\n // @ts-ignore\n window.addEventListener('test', options, options);\n // @ts-ignore\n window.removeEventListener('test', options, options);\n }\n catch (err) {\n passiveSupported = false;\n }\n}\nexport var nonPassive = passiveSupported ? { passive: false } : false;\n","var alwaysContainsScroll = function (node) {\n // textarea will always _contain_ scroll inside self. It only can be hidden\n return node.tagName === 'TEXTAREA';\n};\nvar elementCanBeScrolled = function (node, overflow) {\n if (!(node instanceof Element)) {\n return false;\n }\n var styles = window.getComputedStyle(node);\n return (\n // not-not-scrollable\n styles[overflow] !== 'hidden' &&\n // contains scroll inside self\n !(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === 'visible'));\n};\nvar elementCouldBeVScrolled = function (node) { return elementCanBeScrolled(node, 'overflowY'); };\nvar elementCouldBeHScrolled = function (node) { return elementCanBeScrolled(node, 'overflowX'); };\nexport var locationCouldBeScrolled = function (axis, node) {\n var ownerDocument = node.ownerDocument;\n var current = node;\n do {\n // Skip over shadow root\n if (typeof ShadowRoot !== 'undefined' && current instanceof ShadowRoot) {\n current = current.host;\n }\n var isScrollable = elementCouldBeScrolled(axis, current);\n if (isScrollable) {\n var _a = getScrollVariables(axis, current), scrollHeight = _a[1], clientHeight = _a[2];\n if (scrollHeight > clientHeight) {\n return true;\n }\n }\n current = current.parentNode;\n } while (current && current !== ownerDocument.body);\n return false;\n};\nvar getVScrollVariables = function (_a) {\n var scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight;\n return [\n scrollTop,\n scrollHeight,\n clientHeight,\n ];\n};\nvar getHScrollVariables = function (_a) {\n var scrollLeft = _a.scrollLeft, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth;\n return [\n scrollLeft,\n scrollWidth,\n clientWidth,\n ];\n};\nvar elementCouldBeScrolled = function (axis, node) {\n return axis === 'v' ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node);\n};\nvar getScrollVariables = function (axis, node) {\n return axis === 'v' ? getVScrollVariables(node) : getHScrollVariables(node);\n};\nvar getDirectionFactor = function (axis, direction) {\n /**\n * If the element's direction is rtl (right-to-left), then scrollLeft is 0 when the scrollbar is at its rightmost position,\n * and then increasingly negative as you scroll towards the end of the content.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollLeft\n */\n return axis === 'h' && direction === 'rtl' ? -1 : 1;\n};\nexport var handleScroll = function (axis, endTarget, event, sourceDelta, noOverscroll) {\n var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);\n var delta = directionFactor * sourceDelta;\n // find scrollable target\n var target = event.target;\n var targetInLock = endTarget.contains(target);\n var shouldCancelScroll = false;\n var isDeltaPositive = delta > 0;\n var availableScroll = 0;\n var availableScrollTop = 0;\n do {\n if (!target) {\n break;\n }\n var _a = getScrollVariables(axis, target), position = _a[0], scroll_1 = _a[1], capacity = _a[2];\n var elementScroll = scroll_1 - capacity - directionFactor * position;\n if (position || elementScroll) {\n if (elementCouldBeScrolled(axis, target)) {\n availableScroll += elementScroll;\n availableScrollTop += position;\n }\n }\n var parent_1 = target.parentNode;\n // we will \"bubble\" from ShadowDom in case we are, or just to the parent in normal case\n // this is the same logic used in focus-lock\n target = (parent_1 && parent_1.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? parent_1.host : parent_1);\n } while (\n // portaled content\n (!targetInLock && target !== document.body) ||\n // self content\n (targetInLock && (endTarget.contains(target) || endTarget === target)));\n // handle epsilon around 0 (non standard zoom levels)\n if (isDeltaPositive &&\n ((noOverscroll && Math.abs(availableScroll) < 1) || (!noOverscroll && delta > availableScroll))) {\n shouldCancelScroll = true;\n }\n else if (!isDeltaPositive &&\n ((noOverscroll && Math.abs(availableScrollTop) < 1) || (!noOverscroll && -delta > availableScrollTop))) {\n shouldCancelScroll = true;\n }\n return shouldCancelScroll;\n};\n","import { __spreadArray } from \"tslib\";\nimport * as React from 'react';\nimport { RemoveScrollBar } from 'react-remove-scroll-bar';\nimport { styleSingleton } from 'react-style-singleton';\nimport { nonPassive } from './aggresiveCapture';\nimport { handleScroll, locationCouldBeScrolled } from './handleScroll';\nexport var getTouchXY = function (event) {\n return 'changedTouches' in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];\n};\nexport var getDeltaXY = function (event) { return [event.deltaX, event.deltaY]; };\nvar extractRef = function (ref) {\n return ref && 'current' in ref ? ref.current : ref;\n};\nvar deltaCompare = function (x, y) { return x[0] === y[0] && x[1] === y[1]; };\nvar generateStyle = function (id) { return \"\\n .block-interactivity-\".concat(id, \" {pointer-events: none;}\\n .allow-interactivity-\").concat(id, \" {pointer-events: all;}\\n\"); };\nvar idCounter = 0;\nvar lockStack = [];\nexport function RemoveScrollSideCar(props) {\n var shouldPreventQueue = React.useRef([]);\n var touchStartRef = React.useRef([0, 0]);\n var activeAxis = React.useRef();\n var id = React.useState(idCounter++)[0];\n var Style = React.useState(styleSingleton)[0];\n var lastProps = React.useRef(props);\n React.useEffect(function () {\n lastProps.current = props;\n }, [props]);\n React.useEffect(function () {\n if (props.inert) {\n document.body.classList.add(\"block-interactivity-\".concat(id));\n var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);\n allow_1.forEach(function (el) { return el.classList.add(\"allow-interactivity-\".concat(id)); });\n return function () {\n document.body.classList.remove(\"block-interactivity-\".concat(id));\n allow_1.forEach(function (el) { return el.classList.remove(\"allow-interactivity-\".concat(id)); });\n };\n }\n return;\n }, [props.inert, props.lockRef.current, props.shards]);\n var shouldCancelEvent = React.useCallback(function (event, parent) {\n if (('touches' in event && event.touches.length === 2) || (event.type === 'wheel' && event.ctrlKey)) {\n return !lastProps.current.allowPinchZoom;\n }\n var touch = getTouchXY(event);\n var touchStart = touchStartRef.current;\n var deltaX = 'deltaX' in event ? event.deltaX : touchStart[0] - touch[0];\n var deltaY = 'deltaY' in event ? event.deltaY : touchStart[1] - touch[1];\n var currentAxis;\n var target = event.target;\n var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? 'h' : 'v';\n // allow horizontal touch move on Range inputs. They will not cause any scroll\n if ('touches' in event && moveDirection === 'h' && target.type === 'range') {\n return false;\n }\n var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);\n if (!canBeScrolledInMainDirection) {\n return true;\n }\n if (canBeScrolledInMainDirection) {\n currentAxis = moveDirection;\n }\n else {\n currentAxis = moveDirection === 'v' ? 'h' : 'v';\n canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);\n // other axis might be not scrollable\n }\n if (!canBeScrolledInMainDirection) {\n return false;\n }\n if (!activeAxis.current && 'changedTouches' in event && (deltaX || deltaY)) {\n activeAxis.current = currentAxis;\n }\n if (!currentAxis) {\n return true;\n }\n var cancelingAxis = activeAxis.current || currentAxis;\n return handleScroll(cancelingAxis, parent, event, cancelingAxis === 'h' ? deltaX : deltaY, true);\n }, []);\n var shouldPrevent = React.useCallback(function (_event) {\n var event = _event;\n if (!lockStack.length || lockStack[lockStack.length - 1] !== Style) {\n // not the last active\n return;\n }\n var delta = 'deltaY' in event ? getDeltaXY(event) : getTouchXY(event);\n var sourceEvent = shouldPreventQueue.current.filter(function (e) { return e.name === event.type && (e.target === event.target || event.target === e.shadowParent) && deltaCompare(e.delta, delta); })[0];\n // self event, and should be canceled\n if (sourceEvent && sourceEvent.should) {\n if (event.cancelable) {\n event.preventDefault();\n }\n return;\n }\n // outside or shard event\n if (!sourceEvent) {\n var shardNodes = (lastProps.current.shards || [])\n .map(extractRef)\n .filter(Boolean)\n .filter(function (node) { return node.contains(event.target); });\n var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation;\n if (shouldStop) {\n if (event.cancelable) {\n event.preventDefault();\n }\n }\n }\n }, []);\n var shouldCancel = React.useCallback(function (name, delta, target, should) {\n var event = { name: name, delta: delta, target: target, should: should, shadowParent: getOutermostShadowParent(target) };\n shouldPreventQueue.current.push(event);\n setTimeout(function () {\n shouldPreventQueue.current = shouldPreventQueue.current.filter(function (e) { return e !== event; });\n }, 1);\n }, []);\n var scrollTouchStart = React.useCallback(function (event) {\n touchStartRef.current = getTouchXY(event);\n activeAxis.current = undefined;\n }, []);\n var scrollWheel = React.useCallback(function (event) {\n shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));\n }, []);\n var scrollTouchMove = React.useCallback(function (event) {\n shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));\n }, []);\n React.useEffect(function () {\n lockStack.push(Style);\n props.setCallbacks({\n onScrollCapture: scrollWheel,\n onWheelCapture: scrollWheel,\n onTouchMoveCapture: scrollTouchMove,\n });\n document.addEventListener('wheel', shouldPrevent, nonPassive);\n document.addEventListener('touchmove', shouldPrevent, nonPassive);\n document.addEventListener('touchstart', scrollTouchStart, nonPassive);\n return function () {\n lockStack = lockStack.filter(function (inst) { return inst !== Style; });\n document.removeEventListener('wheel', shouldPrevent, nonPassive);\n document.removeEventListener('touchmove', shouldPrevent, nonPassive);\n document.removeEventListener('touchstart', scrollTouchStart, nonPassive);\n };\n }, []);\n var removeScrollBar = props.removeScrollBar, inert = props.inert;\n return (React.createElement(React.Fragment, null,\n inert ? React.createElement(Style, { styles: generateStyle(id) }) : null,\n removeScrollBar ? React.createElement(RemoveScrollBar, { noRelative: props.noRelative, gapMode: props.gapMode }) : null));\n}\nfunction getOutermostShadowParent(node) {\n var shadowParent = null;\n while (node !== null) {\n if (node instanceof ShadowRoot) {\n shadowParent = node.host;\n node = node.host;\n }\n node = node.parentNode;\n }\n return shadowParent;\n}\n","import { exportSidecar } from 'use-sidecar';\nimport { RemoveScrollSideCar } from './SideEffect';\nimport { effectCar } from './medium';\nexport default exportSidecar(effectCar, RemoveScrollSideCar);\n","import { __assign } from \"tslib\";\nimport * as React from 'react';\nimport { RemoveScroll } from './UI';\nimport SideCar from './sidecar';\nvar ReactRemoveScroll = React.forwardRef(function (props, ref) { return (React.createElement(RemoveScroll, __assign({}, props, { ref: ref, sideCar: SideCar }))); });\nReactRemoveScroll.classNames = RemoveScroll.classNames;\nexport default ReactRemoveScroll;\n","var getDefaultParent = function (originalTarget) {\n if (typeof document === 'undefined') {\n return null;\n }\n var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;\n return sampleTarget.ownerDocument.body;\n};\nvar counterMap = new WeakMap();\nvar uncontrolledNodes = new WeakMap();\nvar markerMap = {};\nvar lockCount = 0;\nvar unwrapHost = function (node) {\n return node && (node.host || unwrapHost(node.parentNode));\n};\nvar correctTargets = function (parent, targets) {\n return targets\n .map(function (target) {\n if (parent.contains(target)) {\n return target;\n }\n var correctedTarget = unwrapHost(target);\n if (correctedTarget && parent.contains(correctedTarget)) {\n return correctedTarget;\n }\n console.error('aria-hidden', target, 'in not contained inside', parent, '. Doing nothing');\n return null;\n })\n .filter(function (x) { return Boolean(x); });\n};\n/**\n * Marks everything except given node(or nodes) as aria-hidden\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @param {String} [controlAttribute] - html Attribute to control\n * @return {Undo} undo command\n */\nvar applyAttributeToOthers = function (originalTarget, parentNode, markerName, controlAttribute) {\n var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n if (!markerMap[markerName]) {\n markerMap[markerName] = new WeakMap();\n }\n var markerCounter = markerMap[markerName];\n var hiddenNodes = [];\n var elementsToKeep = new Set();\n var elementsToStop = new Set(targets);\n var keep = function (el) {\n if (!el || elementsToKeep.has(el)) {\n return;\n }\n elementsToKeep.add(el);\n keep(el.parentNode);\n };\n targets.forEach(keep);\n var deep = function (parent) {\n if (!parent || elementsToStop.has(parent)) {\n return;\n }\n Array.prototype.forEach.call(parent.children, function (node) {\n if (elementsToKeep.has(node)) {\n deep(node);\n }\n else {\n try {\n var attr = node.getAttribute(controlAttribute);\n var alreadyHidden = attr !== null && attr !== 'false';\n var counterValue = (counterMap.get(node) || 0) + 1;\n var markerValue = (markerCounter.get(node) || 0) + 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n hiddenNodes.push(node);\n if (counterValue === 1 && alreadyHidden) {\n uncontrolledNodes.set(node, true);\n }\n if (markerValue === 1) {\n node.setAttribute(markerName, 'true');\n }\n if (!alreadyHidden) {\n node.setAttribute(controlAttribute, 'true');\n }\n }\n catch (e) {\n console.error('aria-hidden: cannot operate on ', node, e);\n }\n }\n });\n };\n deep(parentNode);\n elementsToKeep.clear();\n lockCount++;\n return function () {\n hiddenNodes.forEach(function (node) {\n var counterValue = counterMap.get(node) - 1;\n var markerValue = markerCounter.get(node) - 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n if (!counterValue) {\n if (!uncontrolledNodes.has(node)) {\n node.removeAttribute(controlAttribute);\n }\n uncontrolledNodes.delete(node);\n }\n if (!markerValue) {\n node.removeAttribute(markerName);\n }\n });\n lockCount--;\n if (!lockCount) {\n // clear\n counterMap = new WeakMap();\n counterMap = new WeakMap();\n uncontrolledNodes = new WeakMap();\n markerMap = {};\n }\n };\n};\n/**\n * Marks everything except given node(or nodes) as aria-hidden\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var hideOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-aria-hidden'; }\n var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n var activeParentNode = parentNode || getDefaultParent(originalTarget);\n if (!activeParentNode) {\n return function () { return null; };\n }\n // we should not hide aria-live elements - https://github.com/theKashey/aria-hidden/issues/10\n // and script elements, as they have no impact on accessibility.\n targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll('[aria-live], script')));\n return applyAttributeToOthers(targets, activeParentNode, markerName, 'aria-hidden');\n};\n/**\n * Marks everything except given node(or nodes) as inert\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var inertOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-inert-ed'; }\n var activeParentNode = parentNode || getDefaultParent(originalTarget);\n if (!activeParentNode) {\n return function () { return null; };\n }\n return applyAttributeToOthers(originalTarget, activeParentNode, markerName, 'inert');\n};\n/**\n * @returns if current browser supports inert\n */\nexport var supportsInert = function () {\n return typeof HTMLElement !== 'undefined' && HTMLElement.prototype.hasOwnProperty('inert');\n};\n/**\n * Automatic function to \"suppress\" DOM elements - _hide_ or _inert_ in the best possible way\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var suppressOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-suppressed'; }\n return (supportsInert() ? inertOthers : hideOthers)(originalTarget, parentNode, markerName);\n};\n","\"use client\";\n\n// src/dialog.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContext, createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { hideOthers } from \"aria-hidden\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar DIALOG_NAME = \"Dialog\";\nvar [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);\nvar [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);\nvar Dialog = (props) => {\n const {\n __scopeDialog,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true\n } = props;\n const triggerRef = React.useRef(null);\n const contentRef = React.useRef(null);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: DIALOG_NAME\n });\n return /* @__PURE__ */ jsx(\n DialogProvider,\n {\n scope: __scopeDialog,\n triggerRef,\n contentRef,\n contentId: useId(),\n titleId: useId(),\n descriptionId: useId(),\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n modal,\n children\n }\n );\n};\nDialog.displayName = DIALOG_NAME;\nvar TRIGGER_NAME = \"DialogTrigger\";\nvar DialogTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...triggerProps } = props;\n const context = useDialogContext(TRIGGER_NAME, __scopeDialog);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.contentId,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n }\n);\nDialogTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"DialogPortal\";\nvar [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar DialogPortal = (props) => {\n const { __scopeDialog, forceMount, children, container } = props;\n const context = useDialogContext(PORTAL_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeDialog, forceMount, children: React.Children.map(children, (child) => /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children: child }) })) });\n};\nDialogPortal.displayName = PORTAL_NAME;\nvar OVERLAY_NAME = \"DialogOverlay\";\nvar DialogOverlay = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);\n return context.modal ? /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;\n }\n);\nDialogOverlay.displayName = OVERLAY_NAME;\nvar Slot = createSlot(\"DialogOverlay.RemoveScroll\");\nvar DialogOverlayImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, __scopeDialog);\n return (\n // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`\n // ie. when `Overlay` and `Content` are siblings\n /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": getState(context.open),\n ...overlayProps,\n ref: forwardedRef,\n style: { pointerEvents: \"auto\", ...overlayProps.style }\n }\n ) })\n );\n }\n);\nvar CONTENT_NAME = \"DialogContent\";\nvar DialogContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nDialogContent.displayName = CONTENT_NAME;\nvar DialogContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (isRightClick) event.preventDefault();\n }),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault()\n )\n }\n );\n }\n);\nvar DialogContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar DialogContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, __scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n useFocusGuards();\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n role: \"dialog\",\n id: context.contentId,\n \"aria-describedby\": context.descriptionId,\n \"aria-labelledby\": context.titleId,\n \"data-state\": getState(context.open),\n ...contentProps,\n ref: composedRefs,\n onDismiss: () => context.onOpenChange(false)\n }\n )\n }\n ),\n /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(TitleWarning, { titleId: context.titleId }),\n /* @__PURE__ */ jsx(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })\n ] })\n ] });\n }\n);\nvar TITLE_NAME = \"DialogTitle\";\nvar DialogTitle = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...titleProps } = props;\n const context = useDialogContext(TITLE_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });\n }\n);\nDialogTitle.displayName = TITLE_NAME;\nvar DESCRIPTION_NAME = \"DialogDescription\";\nvar DialogDescription = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...descriptionProps } = props;\n const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });\n }\n);\nDialogDescription.displayName = DESCRIPTION_NAME;\nvar CLOSE_NAME = \"DialogClose\";\nvar DialogClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...closeProps } = props;\n const context = useDialogContext(CLOSE_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nDialogClose.displayName = CLOSE_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar TITLE_WARNING_NAME = \"DialogTitleWarning\";\nvar [WarningProvider, useWarningContext] = createContext(TITLE_WARNING_NAME, {\n contentName: CONTENT_NAME,\n titleName: TITLE_NAME,\n docsSlug: \"dialog\"\n});\nvar TitleWarning = ({ titleId }) => {\n const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);\n const MESSAGE = `\\`${titleWarningContext.contentName}\\` requires a \\`${titleWarningContext.titleName}\\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \\`${titleWarningContext.titleName}\\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;\n React.useEffect(() => {\n if (titleId) {\n const hasTitle = document.getElementById(titleId);\n if (!hasTitle) console.error(MESSAGE);\n }\n }, [MESSAGE, titleId]);\n return null;\n};\nvar DESCRIPTION_WARNING_NAME = \"DialogDescriptionWarning\";\nvar DescriptionWarning = ({ contentRef, descriptionId }) => {\n const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);\n const MESSAGE = `Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${descriptionWarningContext.contentName}}.`;\n React.useEffect(() => {\n const describedById = contentRef.current?.getAttribute(\"aria-describedby\");\n if (descriptionId && describedById) {\n const hasDescription = document.getElementById(descriptionId);\n if (!hasDescription) console.warn(MESSAGE);\n }\n }, [MESSAGE, contentRef, descriptionId]);\n return null;\n};\nvar Root = Dialog;\nvar Trigger = DialogTrigger;\nvar Portal = DialogPortal;\nvar Overlay = DialogOverlay;\nvar Content = DialogContent;\nvar Title = DialogTitle;\nvar Description = DialogDescription;\nvar Close = DialogClose;\nexport {\n Close,\n Content,\n Description,\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n Overlay,\n Portal,\n Root,\n Title,\n Trigger,\n WarningProvider,\n createDialogScope\n};\n//# sourceMappingURL=index.mjs.map\n","// src/visually-hidden.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar VISUALLY_HIDDEN_STYLES = Object.freeze({\n // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss\n position: \"absolute\",\n border: 0,\n width: 1,\n height: 1,\n padding: 0,\n margin: -1,\n overflow: \"hidden\",\n clip: \"rect(0, 0, 0, 0)\",\n whiteSpace: \"nowrap\",\n wordWrap: \"normal\"\n});\nvar NAME = \"VisuallyHidden\";\nvar VisuallyHidden = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(\n Primitive.span,\n {\n ...props,\n ref: forwardedRef,\n style: { ...VISUALLY_HIDDEN_STYLES, ...props.style }\n }\n );\n }\n);\nVisuallyHidden.displayName = NAME;\nvar Root = VisuallyHidden;\nexport {\n Root,\n VISUALLY_HIDDEN_STYLES,\n VisuallyHidden\n};\n//# sourceMappingURL=index.mjs.map\n","import { cva } from 'class-variance-authority';\n\nexport const modalOverlayStyles = cva(\n 'fixed inset-0 z-50 bg-[rgba(0,6,38,0.5)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0'\n);\n\nexport const modalContainerStyles = cva(\n 'fixed left-[50%] top-[50%] z-50 translate-x-[-50%] translate-y-[-50%] bg-[var(--color-white)] border border-[var(--color-gray-200)] rounded-[12px] shadow-lg p-4 flex flex-col gap-2 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 duration-200',\n {\n variants: {\n size: {\n sm: 'w-[300px] max-w-[calc(100vw-2rem)]',\n md: 'w-[400px] max-w-[calc(100vw-2rem)]',\n lg: 'w-[500px] max-w-[calc(100vw-2rem)]',\n xl: 'w-[600px] max-w-[calc(100vw-2rem)]',\n full: 'w-[calc(100vw-2rem)] h-[calc(100vh-2rem)]',\n },\n },\n defaultVariants: {\n size: 'md',\n },\n }\n);\n\nexport const modalHeaderStyles = cva(\n 'flex flex-col gap-2 items-start justify-center w-full'\n);\n\nexport const modalHeaderTopRowStyles = cva(\n 'flex items-start justify-between w-full pr-6'\n);\n\nexport const modalCloseButtonStyles = cva(\n 'absolute right-4 top-4 flex-shrink-0 w-4 h-4 text-[var(--color-blue-1000)] cursor-pointer bg-transparent border-none p-0 hover:opacity-70 transition-opacity focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] focus-visible:ring-offset-2 rounded-sm'\n);\n\nexport const modalTitleStyles = cva(\n '!font-[Inter,system-ui,-apple-system,sans-serif] font-medium text-[1rem] leading-[1.5rem] text-[var(--color-blue-1000)] w-full'\n);\n\nexport const modalDescriptionStyles = cva(\n 'font-[Inter,system-ui,-apple-system,sans-serif] font-normal text-[0.875rem] leading-[1.25rem] text-[var(--color-gray-800)] w-full'\n);\n\nexport const modalContentStyles = cva('flex flex-col gap-4 items-start w-full', {\n variants: {\n size: {\n sm: 'max-h-[60vh] overflow-y-auto',\n md: 'max-h-[70vh] overflow-y-auto',\n lg: 'max-h-[75vh] overflow-y-auto',\n xl: 'max-h-[80vh] overflow-y-auto',\n full: 'flex-1 overflow-y-auto',\n },\n },\n defaultVariants: {\n size: 'md',\n },\n});\n\nexport const modalFooterStyles = cva('flex gap-2 items-start w-full');\n","// react\nimport { useCallback, useRef } from 'react';\nimport * as Dialog from '@radix-ui/react-dialog';\nimport * as VisuallyHidden from '@radix-ui/react-visually-hidden';\n\n// components\nimport { Button } from '@/components/molecules/Button/Button';\nimport { X } from '@/components/atoms/icons';\n\n// styles\nimport {\n modalOverlayStyles,\n modalContainerStyles,\n modalCloseButtonStyles,\n modalTitleStyles,\n modalDescriptionStyles,\n modalContentStyles,\n modalFooterStyles,\n} from './Modal.styles';\n\n// misc\nimport { cn } from '@/utils/cn';\n\n// types\nimport type { ModalProps } from './Modal.types';\n\nexport const Modal = ({\n open,\n onOpenChange,\n title,\n description,\n showCloseButton = true,\n closeIcon,\n children,\n primaryAction,\n secondaryAction,\n closeOnClickOutside = true,\n closeOnEsc = true,\n onClose,\n className,\n overlayClassName,\n contentClassName,\n footerClassName,\n size = 'md',\n}: ModalProps) => {\n const primaryButtonRef = useRef<HTMLButtonElement>(null);\n const secondaryButtonRef = useRef<HTMLButtonElement>(null);\n\n const handleOpenChange = useCallback(\n (newOpen: boolean) => {\n onOpenChange(newOpen);\n if (!newOpen) {\n onClose?.();\n }\n },\n [onOpenChange, onClose],\n );\n\n const handlePrimaryAction = useCallback(async () => {\n if (primaryAction?.onClick) {\n await primaryAction.onClick();\n }\n }, [primaryAction]);\n\n const handleSecondaryAction = useCallback(async () => {\n if (secondaryAction?.onClick) {\n await secondaryAction.onClick();\n }\n }, [secondaryAction]);\n\n // Handle ESC key\n const handleEscapeKeyDown = useCallback(\n (event: KeyboardEvent) => {\n if (!closeOnEsc) {\n event.preventDefault();\n }\n },\n [closeOnEsc],\n );\n\n // Handle click outside\n const handlePointerDownOutside = useCallback(\n (event: Event) => {\n if (!closeOnClickOutside) {\n event.preventDefault();\n }\n },\n [closeOnClickOutside],\n );\n\n const hasFooter = primaryAction || secondaryAction;\n\n return (\n <Dialog.Root open={open} onOpenChange={handleOpenChange}>\n <Dialog.Portal>\n <Dialog.Overlay\n className={cn(modalOverlayStyles(), overlayClassName)}\n />\n <Dialog.Content\n className={cn(modalContainerStyles({ size }), className)}\n onEscapeKeyDown={handleEscapeKeyDown}\n onPointerDownOutside={handlePointerDownOutside}\n >\n {/* Always render Dialog.Title for accessibility */}\n {title ? (\n <Dialog.Title className={modalTitleStyles()}>{title}</Dialog.Title>\n ) : (\n <VisuallyHidden.Root>\n <Dialog.Title>Modal dialog</Dialog.Title>\n </VisuallyHidden.Root>\n )}\n\n {/* Always render Dialog.Description for accessibility */}\n {description ? (\n <Dialog.Description className={modalDescriptionStyles()}>\n {description}\n </Dialog.Description>\n ) : (\n <VisuallyHidden.Root>\n <Dialog.Description>Modal content</Dialog.Description>\n </VisuallyHidden.Root>\n )}\n\n {/* Close button */}\n {showCloseButton && (\n <Dialog.Close asChild>\n <button\n className={modalCloseButtonStyles()}\n aria-label=\"Close modal\"\n >\n {closeIcon || <X size={16} color=\"currentColor\" />}\n </button>\n </Dialog.Close>\n )}\n\n {/* Content */}\n {children && (\n <div className={cn(modalContentStyles({ size }), contentClassName)}>\n {children}\n </div>\n )}\n\n {/* Footer */}\n {hasFooter && (\n <div className={cn(modalFooterStyles(), footerClassName)}>\n {secondaryAction && (\n <Button\n ref={secondaryButtonRef}\n variant={secondaryAction.variant || 'secondary'}\n size=\"small\"\n onClick={handleSecondaryAction}\n disabled={secondaryAction.disabled || secondaryAction.loading}\n startIcon={secondaryAction.icon}\n className=\"flex-1\"\n >\n {secondaryAction.label}\n </Button>\n )}\n {primaryAction && (\n <Button\n ref={primaryButtonRef}\n variant={primaryAction.variant || 'primary'}\n size=\"small\"\n onClick={handlePrimaryAction}\n disabled={primaryAction.disabled || primaryAction.loading}\n startIcon={primaryAction.icon}\n className=\"flex-1\"\n >\n {primaryAction.label}\n </Button>\n )}\n </div>\n )}\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\n );\n};\n\nModal.displayName = 'Modal';\n"],"names":["r","t","f","n","o","clsx","CLASS_PART_SEPARATOR","createClassGroupUtils","config","classMap","createClassMap","conflictingClassGroups","conflictingClassGroupModifiers","className","classParts","getGroupRecursive","getGroupIdForArbitraryProperty","classGroupId","hasPostfixModifier","conflicts","classPartObject","currentClassPart","nextClassPartObject","classGroupFromNextClassPart","classRest","_a","validator","arbitraryPropertyRegex","arbitraryPropertyClassName","property","theme","classGroups","processClassesRecursively","classGroup","classDefinition","classPartObjectToEdit","getPart","isThemeGetter","key","path","currentClassPartObject","pathPart","func","createLruCache","maxCacheSize","cacheSize","cache","previousCache","update","value","IMPORTANT_MODIFIER","MODIFIER_SEPARATOR","MODIFIER_SEPARATOR_LENGTH","createParseClassName","prefix","experimentalParseClassName","parseClassName","modifiers","bracketDepth","parenDepth","modifierStart","postfixModifierPosition","index","currentCharacter","baseClassNameWithImportantModifier","baseClassName","stripImportantModifier","hasImportantModifier","maybePostfixModifierPosition","fullPrefix","parseClassNameOriginal","createSortModifiers","orderSensitiveModifiers","modifier","sortedModifiers","unsortedModifiers","createConfigUtils","SPLIT_CLASSES_REGEX","mergeClassList","classList","configUtils","getClassGroupId","getConflictingClassGroupIds","sortModifiers","classGroupsInConflict","classNames","result","originalClassName","isExternal","variantModifier","modifierId","classId","conflictGroups","i","group","twJoin","argument","resolvedValue","string","toValue","mix","k","createTailwindMerge","createConfigFirst","createConfigRest","cacheGet","cacheSet","functionToCall","initTailwindMerge","previousConfig","createConfigCurrent","tailwindMerge","cachedResult","fromTheme","themeGetter","arbitraryValueRegex","arbitraryVariableRegex","fractionRegex","tshirtUnitRegex","lengthUnitRegex","colorFunctionRegex","shadowRegex","imageRegex","isFraction","isNumber","isInteger","isPercent","isTshirtSize","isAny","isLengthOnly","isNever","isShadow","isImage","isAnyNonArbitrary","isArbitraryValue","isArbitraryVariable","isArbitrarySize","getIsArbitraryValue","isLabelSize","isArbitraryLength","isLabelLength","isArbitraryNumber","isLabelNumber","isArbitraryPosition","isLabelPosition","isArbitraryImage","isLabelImage","isArbitraryShadow","isLabelShadow","isArbitraryVariableLength","getIsArbitraryVariable","isArbitraryVariableFamilyName","isLabelFamilyName","isArbitraryVariablePosition","isArbitraryVariableSize","isArbitraryVariableImage","isArbitraryVariableShadow","testLabel","testValue","shouldMatchNoLabel","label","getDefaultConfig","themeColor","themeFont","themeText","themeFontWeight","themeTracking","themeLeading","themeBreakpoint","themeContainer","themeSpacing","themeRadius","themeShadow","themeInsetShadow","themeTextShadow","themeDropShadow","themeBlur","themePerspective","themeAspect","themeEase","themeAnimate","scaleBreak","scalePosition","scalePositionWithArbitrary","scaleOverflow","scaleOverscroll","scaleUnambiguousSpacing","scaleInset","scaleGridTemplateColsRows","scaleGridColRowStartAndEnd","scaleGridColRowStartOrEnd","scaleGridAutoColsRows","scaleAlignPrimaryAxis","scaleAlignSecondaryAxis","scaleMargin","scaleSizing","scaleColor","scaleBgPosition","scaleBgRepeat","scaleBgSize","scaleGradientStopPosition","scaleRadius","scaleBorderWidth","scaleLineStyle","scaleBlendMode","scaleMaskImagePosition","scaleBlur","scaleRotate","scaleScale","scaleSkew","scaleTranslate","twMerge","cn","inputs","falsyToString","cx","cva","base","props","_config_compoundVariants","variants","defaultVariants","getVariantClassNames","variant","variantProp","defaultVariantProp","variantKey","propsWithoutUndefined","acc","param","getCompoundVariantClassNames","cvClass","cvClassName","compoundVariantOptions","avatarContainerStyles","avatarTextStyles","avatarImageStyles","generateInitials","name","words","getPlaceholderImage","seed","size","Avatar","forwardRef","type","shape","initials","src","alt","fallbackInitials","ref","imageError","setImageError","useState","placeholderSeed","useMemo","imageSrc","displayInitials","shouldShowImage","handleImageError","textBackgroundStyle","jsx","statusIndicatorContainerStyles","statusIndicatorDotStyles","statusIndicatorPingStyles","variantLabels","StatusIndicator","animated","jsxs","variantClassMap","defaultElementMap","colorClassMap","weightClassMap","fontFamilyClassMap","Typography","as","children","color","weight","fontFamily","Component","variantClass","colorClass","weightClass","fontFamilyClass","colorMap","LogoA","colorVariant","FullLogo","aspectRatio","height","width","SignatureA","animationDuration","animationDelay","uniqueId","useId","mainPathLength","artifactCardStyles","hoverBackgroundStyles","animatedGradientStyles","previewContainerStyles","previewBoxStyles","previewBoxInnerStyles","skeletonLineStyles","contentContainerStyles","titleStyles","subtitleStyles","iconContainerStyles","iconActiveStyles","iconInactiveStyles","iconStyles","errorIconStyles","skeletonLineVariants","contentSlideVariants","iconActiveVariants","iconInactiveVariants","SKELETON_WIDTHS","ArtifactCard","title","subtitle","controlledStatus","onClick","onActionClick","disabled","isHovered","setIsHovered","effectiveStatus","animationState","handleMouseEnter","useCallback","handleMouseLeave","handleClick","handleActionClick","e","handleKeyDown","renderPreview","Loader","TriangleAlert","motion","renderActionIcon","RotateCcw","Fragment","ArrowUp","breadcrumbsStyles","breadcrumbItemStyles","separatorStyles","Breadcrumbs","items","separator","ChevronRight","item","isLast","content","buttonStyles","Button","tone","startIcon","endIcon","iconSize","fileIconContainerStyles","chatFileContainerStyles","chatFileNameStyles","chatFileIconStyles","progressBarStyles","FILE_TYPE_MAP","FileText","Pdf","Grid","Code","WhiteboardView","Archive","Video","Volume2","DEFAULT_FILE_TYPE_CONFIG","getFileExtension","filename","lastDotIndex","getFileTypeConfig","extension","ICON_SIZES","FileIcon","IconComponent","truncateFilename","maxLength","baseName","availableForBase","FileStatus","ChatFile","status","progress","onDelete","isUploading","isProcessing","isError","isDone","statusVariant","renderIcon","X","chipContainerStyles","chipLabelStyles","chipIconStyles","chipProgressBarStyles","chipLeadingIconContainerStyles","ChipStatus","ChipDeleteButton","ChipLeadingContent","chipProps","WorkStream","getChipLabel","getFullLabel","Chip","showProgressBar","showDeleteButton","fullLabel","checkboxLabelStyles","checkboxVisualWrapperStyles","checkboxInputStyles","Checkbox","checked","defaultChecked","onChange","internalChecked","setInternalChecked","isControlled","isChecked","handleChange","Check","circularProgressContainerStyles","circularProgressSvgStyles","circularProgressTrackStyles","circularProgressIndicatorStyles","circularProgressLabelStyles","SIZE_MAP","CircularProgress","max","showLabel","labelFormatter","strokeWidth","percentage","sizePx","radius","circumference","strokeDashoffset","formattedLabel","useClickOutside","handler","useEffect","listener","event","el","dropdownContentStyles","dropdownItemStyles","dropdownLabelStyles","dropdownSeparatorStyles","DropdownContext","createContext","useDropdown","context","useContext","Dropdown","defaultOpen","controlledOpen","onOpenChange","uncontrolledOpen","setUncontrolledOpen","isOpen","dropdownRef","useRef","toggle","newState","close","DropdownTrigger","chevronIcon","ChevronDown","DropdownContent","align","attached","AnimatePresence","DropdownItem","active","closeOnSelect","DropdownLabel","DropdownSeparator","inputStyles","inputContainerStyles","inputIconStyles","inputErrorStyles","Input","error","errorId","startIconPaddingMap","endIconPaddingMap","loadingSpinnerWrapperStyles","spinnerContainerStyles","spinnerBorderStyles","loadingTextStyles","LoadingSpinner","text","textColor","rootStyles","innerContainerStyles","messageContainerStyles","bubbleStyles","contentStyles","headerStyles","textStyles","actionsStyles","actionsIconsStyles","actionButtonStyles","avatarInnerStyles","timestampStyles","loaderStyles","systemContentWrapperStyles","shimmerOverlayStyles","activityIconAnimatedStyles","activityIconGlowStyles","editContainerStyles","editTextareaStyles","editHintStyles","branchNavigatorStyles","branchNavButtonStyles","branchNavTextStyles","EMPTY_ACTIONS","IS_MAC","KEYBOARD_HINT","formatTimestamp","ts","date","diffMs","diffMins","diffHours","ActionButton","memo","Icon","isActive","showSuccessFeedback","SuccessIcon","successDuration","showSuccess","setShowSuccess","DisplayIcon","BranchNavigator","branchInfo","onPrevious","onNext","isLoading","hasPrevious","hasNext","ChevronLeft","AnimatedLoader","setKey","interval","MessageBubble","heading","timestamp","hideAvatar","showTimestamp","isSticky","isInitialPrompt","alignment","actions","enableCopy","copyIcon","onCopySuccess","enableEdit","isEditingProp","initialEditContent","onEditStart","onEditCancel","onEditSave","isSaving","onPreviousBranch","onNextBranch","isBranchLoading","contentRef","textareaRef","isCopied","setIsCopied","internalEditing","setInternalEditing","editContent","setEditContent","isEditing","resolvedAlignment","getTextContent","handleEditStart","handleEditCancel","handleEditSave","prevIsEditingRef","lastInitialContentRef","wasEditing","length","handleCopyInternal","textToCopy","err","handleEditContentChange","hasActions","showActions","showBranchNavigator","Activity","Edit2","action","progressBarTrackStyles","progressBarIndicatorStyles","progressBarLabelStyles","ProgressBar","showValueLabel","valueFormatter","formattedValue","rangeInputStyles","RangeInput","style","min","defaultValue","currentValue","minVal","maxVal","trackColor","backgroundStyle","sidebarItemStyles","sidebarItemIconStyles","sidebarItemLabelStyles","SidebarItem","icon","isCollapsed","styleVariant","tagStyles","tagAvatarStyles","tagIconStyles","Tag","avatarSrc","tabsListStyles","tabsTriggerStyles","tabsContentStyles","tabsBadgeContainerStyles","tabsTagStyles","Tabs","TabsPrimitive","TabsList","React","TabsTrigger","errorCount","configurationCount","Settings","TabsContent","textAreaStyles","textAreaContainerStyles","TextArea","resize","timestampContainerStyles","timestampIconStyles","formatRelativeTime","now","diffSeconds","diffMinutes","diffDays","diffWeeks","diffMonths","diffYears","isFuture","absSeconds","absMinutes","absHours","absDays","absWeeks","absMonths","absYears","formatUnit","unit","plural","formatDate","format","locale","parseDate","Timestamp","showIcon","parsedDate","formattedDate","isoString","iconColor","ClockHistory","toastStyles","descriptionStyles","actionsWrapperStyles","closeButtonStyles","icons","Info","CheckCircle","AlertCircle","Sparks","iconColors","Toast","id","description","secondaryAction","onClose","handleClose","toast","Trash","ToastContainer","position","offset","gap","SonnerToaster","showToast","toggleRowStyles","toggleLabelStyles","toggleButtonStyles","toggleKnobStyles","Toggle","enabled","statusMessageContainerStyles","statusMessageTextStyles","StatusMessage","message","indicatorVariant","autopilotActionContainerStyles","autopilotActionContentStyles","autopilotActionTextStyles","autopilotActionIconContainerStyles","statusColors","actionIconColors","AutopilotAction","hexagonColor","actionIconColor","Hand","Pause","Hexagon","tooltipContentStyles","tooltipArrowStyles","TooltipProvider","delayDuration","TooltipPrimitive","Tooltip","TooltipTrigger","TooltipContent","sideOffset","conversationHeaderStyles","headerRightStyles","actionGroupStyles","iconButtonStyles","tagsGroupStyles","collaboratorsGroupStyles","ConversationHeader","breadcrumbs","tags","collaborators","onAddTag","onAddCollaborator","tagsOverflowCount","addTagDisabled","addCollaboratorDisabled","tag","user","TagPlus","UserPlus","composeEventHandlers","originalEventHandler","ourEventHandler","checkForDefaultPrevented","setRef","composeRefs","refs","node","hasCleanup","cleanups","cleanup","useComposedRefs","createContext2","rootComponentName","defaultContext","Context","Provider","useContext2","consumerName","createContextScope","scopeName","createContextScopeDeps","defaultContexts","createContext3","BaseContext","scope","createScope","scopeContexts","contexts","composeContextScopes","scopes","baseScope","scopeHooks","createScope2","overrideScopes","nextScopes","nextScopes2","useScope","currentScope","useLayoutEffect2","useReactId","count","deterministicId","setId","useLayoutEffect","reactId","useInsertionEffect","useControllableState","prop","defaultProp","caller","uncontrolledProp","setUncontrolledProp","onChangeRef","useUncontrolledState","isControlledRef","wasControlled","setValue","nextValue","value2","isFunction","prevValueRef","createSlot","ownerName","SlotClone","createSlotClone","Slot2","forwardedRef","slotProps","childrenArray","slottable","isSlottable","newElement","newChildren","child","childrenRef","getElementRef","props2","mergeProps","SLOTTABLE_IDENTIFIER","childProps","overrideProps","propName","slotPropValue","childPropValue","args","element","getter","mayWarn","_b","NODES","Primitive","primitive","Slot","Node","asChild","primitiveProps","Comp","dispatchDiscreteCustomEvent","target","ReactDOM","useCallbackRef","callback","callbackRef","useEscapeKeydown","onEscapeKeyDownProp","ownerDocument","onEscapeKeyDown","DISMISSABLE_LAYER_NAME","CONTEXT_UPDATE","POINTER_DOWN_OUTSIDE","FOCUS_OUTSIDE","originalBodyPointerEvents","DismissableLayerContext","DismissableLayer","disableOutsidePointerEvents","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","layerProps","setNode","force","composedRefs","node2","layers","highestLayerWithOutsidePointerEventsDisabled","highestLayerWithOutsidePointerEventsDisabledIndex","isBodyPointerEventsDisabled","isPointerEventsEnabled","pointerDownOutside","usePointerDownOutside","isPointerDownOnBranch","branch","focusOutside","useFocusOutside","dispatchUpdate","handleUpdate","BRANCH_NAME","DismissableLayerBranch","handlePointerDownOutside","isPointerInsideReactTreeRef","handleClickRef","handlePointerDown","handleAndDispatchPointerDownOutsideEvent2","handleAndDispatchCustomEvent","eventDetail","timerId","handleFocusOutside","isFocusInsideReactTreeRef","handleFocus","detail","discrete","AUTOFOCUS_ON_MOUNT","AUTOFOCUS_ON_UNMOUNT","EVENT_OPTIONS","FOCUS_SCOPE_NAME","FocusScope","loop","trapped","onMountAutoFocusProp","onUnmountAutoFocusProp","scopeProps","container","setContainer","onMountAutoFocus","onUnmountAutoFocus","lastFocusedElementRef","focusScope","handleFocusIn2","focus","handleFocusOut2","relatedTarget","handleMutations2","mutations","mutation","mutationObserver","focusScopesStack","previouslyFocusedElement","mountEvent","focusFirst","removeLinks","getTabbableCandidates","unmountEvent","isTabKey","focusedElement","container2","first","last","getTabbableEdges","candidates","select","candidate","findVisible","nodes","walker","isHiddenInput","elements","isHidden","upTo","isSelectableInput","createFocusScopesStack","stack","activeFocusScope","arrayRemove","array","updatedArray","PORTAL_NAME","Portal","containerProp","portalProps","mounted","setMounted","useStateMachine","initialState","machine","state","Presence","present","presence","usePresence","React2","stylesRef","prevPresentRef","prevAnimationNameRef","send","currentAnimationName","getAnimationName","styles","wasPresent","prevAnimationName","timeoutId","ownerWindow","handleAnimationEnd","isCurrentAnimation","currentFillMode","handleAnimationStart","useFocusGuards","edgeGuards","createFocusGuard","__assign","s","p","__rest","__spreadArray","to","from","pack","l","ar","zeroRightClassName","fullWidthClassName","noScrollbarsClassName","removedBarSizeVariable","assignRef","initialValue","useIsomorphicLayoutEffect","currentValues","useMergeRefs","newValue","oldValue","prevRefs_1","nextRefs_1","current_1","ItoI","a","innerCreateMedium","defaults","middleware","buffer","assigned","medium","data","x","cb","cbs","pendingQueue","executeQueue","cycle","filter","createSidecarMedium","options","SideCar","sideCar","rest","Target","exportSidecar","exported","effectCar","nothing","RemoveScroll","parentRef","callbacks","setCallbacks","forwardProps","removeScrollBar","shards","noRelative","noIsolation","inert","allowPinchZoom","Container","gapMode","containerRef","containerProps","getNonce","makeStyleTag","nonce","injectStyles","css","insertStyleTag","head","stylesheetSingleton","counter","stylesheet","styleHookSingleton","sheet","isDynamic","styleSingleton","useStyle","Sheet","dynamic","zeroGap","parse","getOffset","cs","left","top","right","getGapWidth","offsets","documentWidth","windowWidth","Style","lockAttribute","getStyles","allowRelative","important","getCurrentUseCounter","useLockAttribute","newCounter","RemoveScrollBar","noImportant","passiveSupported","nonPassive","alwaysContainsScroll","elementCanBeScrolled","overflow","elementCouldBeVScrolled","elementCouldBeHScrolled","locationCouldBeScrolled","axis","current","isScrollable","elementCouldBeScrolled","getScrollVariables","scrollHeight","clientHeight","getVScrollVariables","scrollTop","getHScrollVariables","scrollLeft","scrollWidth","clientWidth","getDirectionFactor","direction","handleScroll","endTarget","sourceDelta","noOverscroll","directionFactor","delta","targetInLock","shouldCancelScroll","isDeltaPositive","availableScroll","availableScrollTop","scroll_1","capacity","elementScroll","parent_1","getTouchXY","getDeltaXY","extractRef","deltaCompare","y","generateStyle","idCounter","lockStack","RemoveScrollSideCar","shouldPreventQueue","touchStartRef","activeAxis","lastProps","allow_1","shouldCancelEvent","parent","touch","touchStart","deltaX","deltaY","currentAxis","moveDirection","canBeScrolledInMainDirection","cancelingAxis","shouldPrevent","_event","sourceEvent","shardNodes","shouldStop","shouldCancel","should","getOutermostShadowParent","scrollTouchStart","scrollWheel","scrollTouchMove","inst","shadowParent","ReactRemoveScroll","getDefaultParent","originalTarget","sampleTarget","counterMap","uncontrolledNodes","markerMap","lockCount","unwrapHost","correctTargets","targets","correctedTarget","applyAttributeToOthers","parentNode","markerName","controlAttribute","markerCounter","hiddenNodes","elementsToKeep","elementsToStop","keep","deep","attr","alreadyHidden","counterValue","markerValue","hideOthers","activeParentNode","DIALOG_NAME","createDialogContext","DialogProvider","useDialogContext","Dialog","__scopeDialog","openProp","modal","triggerRef","open","setOpen","prevOpen","TRIGGER_NAME","DialogTrigger","triggerProps","composedTriggerRef","getState","PortalProvider","usePortalContext","DialogPortal","forceMount","PortalPrimitive","OVERLAY_NAME","DialogOverlay","portalContext","overlayProps","DialogOverlayImpl","CONTENT_NAME","DialogContent","contentProps","DialogContentModal","DialogContentNonModal","DialogContentImpl","originalEvent","ctrlLeftClick","hasInteractedOutsideRef","hasPointerDownOutsideRef","trapFocus","onOpenAutoFocus","onCloseAutoFocus","TitleWarning","DescriptionWarning","TITLE_NAME","DialogTitle","titleProps","DESCRIPTION_NAME","DialogDescription","descriptionProps","CLOSE_NAME","DialogClose","closeProps","TITLE_WARNING_NAME","WarningProvider","useWarningContext","titleId","titleWarningContext","MESSAGE","DESCRIPTION_WARNING_NAME","descriptionId","describedById","Root","Overlay","Content","Title","Description","Close","VISUALLY_HIDDEN_STYLES","NAME","VisuallyHidden","modalOverlayStyles","modalContainerStyles","modalCloseButtonStyles","modalTitleStyles","modalDescriptionStyles","modalContentStyles","modalFooterStyles","Modal","showCloseButton","closeIcon","primaryAction","closeOnClickOutside","closeOnEsc","overlayClassName","contentClassName","footerClassName","primaryButtonRef","secondaryButtonRef","handleOpenChange","newOpen","handlePrimaryAction","handleSecondaryAction","handleEscapeKeyDown","hasFooter","Dialog.Root","Dialog.Portal","Dialog.Overlay","Dialog.Content","Dialog.Title","VisuallyHidden.Root","Dialog.Description","Dialog.Close"],"mappings":"snBAAA,SAASA,GAAE,EAAE,CAAC,IAAIC,EAAEC,EAAEC,EAAE,GAAG,GAAa,OAAO,GAAjB,UAA8B,OAAO,GAAjB,SAAmBA,GAAG,UAAoB,OAAO,GAAjB,SAAmB,GAAG,MAAM,QAAQ,CAAC,EAAE,CAAC,IAAIC,EAAE,EAAE,OAAO,IAAIH,EAAE,EAAEA,EAAEG,EAAEH,IAAI,EAAEA,CAAC,IAAIC,EAAEF,GAAE,EAAEC,CAAC,CAAC,KAAKE,IAAIA,GAAG,KAAKA,GAAGD,EAAE,KAAM,KAAIA,KAAK,EAAE,EAAEA,CAAC,IAAIC,IAAIA,GAAG,KAAKA,GAAGD,GAAG,OAAOC,CAAC,CAAQ,SAASE,IAAM,CAAC,QAAQ,EAAEJ,EAAEC,EAAE,EAAEC,EAAE,GAAGC,EAAE,UAAU,OAAOF,EAAEE,EAAEF,KAAK,EAAE,UAAUA,CAAC,KAAKD,EAAED,GAAE,CAAC,KAAKG,IAAIA,GAAG,KAAKA,GAAGF,GAAG,OAAOE,CAAC,CCA/W,MAAMG,GAAuB,IACvBC,GAAwBC,GAAU,CACtC,MAAMC,EAAWC,GAAeF,CAAM,EAChC,CACJ,uBAAAG,EACA,+BAAAC,CACJ,EAAMJ,EAgBJ,MAAO,CACL,gBAhBsBK,GAAa,CACnC,MAAMC,EAAaD,EAAU,MAAMP,EAAoB,EAEvD,OAAIQ,EAAW,CAAC,IAAM,IAAMA,EAAW,SAAW,GAChDA,EAAW,MAAK,EAEXC,GAAkBD,EAAYL,CAAQ,GAAKO,GAA+BH,CAAS,CAC5F,EAUE,4BATkC,CAACI,EAAcC,IAAuB,CACxE,MAA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U,CACR,QAAS,CACP,KAAM,GACN,UAAW,GACX,OAAQ,SACR,OAAQ,QAAA,CACV,EAEF,gBAAiB,CACf,QAAS,MAAA,CACX,CAEJ,EAGaqS,GAAqBrS,EAAI,CACpC,OACA,YACA,YACA,0BACA,qBACA,cACF,CAAC,EAEYsS,GAAqBtS,EAChC,uXACA,CACE,SAAU,CACR,SAAU,CACR,KAAM,+BACN,MAAO,EAAA,CACT,EAEF,gBAAiB,CACf,SAAU,EAAA,CACZ,CAEJ,EAEakB,GAAwBlB,EACnC,mDACF,EAEauS,GAAoBvS,EAC/B,uFACF,EAEawS,GAAkBxS,EAC7B,mDACF,EAEayS,GAAezS,EAC1B,kCACF,EAGa0S,GAA6B1S,EACxC,2EACF,EAGa2S,GAAuB3S,EAAI,CACtC,iCACA,kBACA,wHACA,aACA,0BACF,CAAC,EAGY4S,GAA6B5S,EAAI,CAC5C,qDACA,+BACA,wBACA,eACF,CAAC,EAGY6S,GAAyB7S,EAAI,CACxC,mBACA,6BACA,eACA,YACA,oBACA,OACF,CAAC,EAGY8S,GAAsB9S,EAAI,CACrC,OACA,WACA,SACA,0BACA,iBACA,SACA,iCACA,WACA,YACA,oBACA,cACF,CAAC,EAGY+S,GAAqB/S,EAAI,CACpC,SACA,eACA,iBACA,cACA,cACA,mBACA,gCACA,2CACA,qBACA,sBACA,6BACF,CAAC,EAGYgT,GAAiBhT,EAAI,CAChC,cACA,iBACA,8BACF,CAAC,EAGYiT,GAAwBjT,EAAI,CACvC,OACA,eACA,WACF,CAAC,EAGYkT,GAAwBlT,EACnC,CACE,UACA,gBACA,+BACA,oBACA,eACA,qCACA,mCACA,sBACA,8BACA,gCACA,8CACA,uBACA,6CACA,6BAAA,CAEJ,EAGamT,GAAsBnT,EAAI,CACrC,cACA,iBACA,+BACA,cACA,eACA,cACA,eACA,aACF,CAAC,EC7HKoT,GAAiC,CAAA,EAGjCC,GAAS,OAAO,UAAc,KAAe,uBAAuB,KAAK,UAAU,QAAQ,EAC3FC,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AAAA,EAAc,KAAA,CAAA,CACjB,CAAA,CAEJ,CAAA,CAAA,CAAA,CAEJ,CAAA,CACF,CAAA,CACF,CAEJ,EAEAH,GAAM,YAAc","x_google_ignoreList":[0,1,3,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102]}
1
+ {"version":3,"file":"index.cjs","sources":["../src/platform/tokens.ts","../src/brands/index.ts","../src/platform/PlatformProvider.tsx","../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs","../node_modules/.pnpm/tailwind-merge@3.3.0/node_modules/tailwind-merge/dist/bundle-mjs.mjs","../src/utils/cn.ts","../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.mjs","../src/components/atoms/Avatar/Avatar.styles.ts","../src/components/atoms/Avatar/Avatar.tsx","../src/components/atoms/StatusIndicator/StatusIndicator.styles.ts","../src/components/atoms/StatusIndicator/StatusIndicator.tsx","../src/components/atoms/DeltaPill/DeltaPill.tsx","../src/components/atoms/StatusPill/StatusPill.tsx","../src/components/atoms/FootnoteRef/FootnoteRef.tsx","../src/components/atoms/SparklineCell/SparklineCell.tsx","../src/components/atoms/Typography/Typography.tsx","../src/components/atoms/logos/LogoA.tsx","../src/components/atoms/logos/FullLogo.tsx","../src/components/atoms/logos/SignatureA.tsx","../src/components/molecules/ArtifactCard/ArtifactCard.styles.ts","../src/components/molecules/ArtifactCard/ArtifactCard.tsx","../src/components/molecules/Breadcrumbs/Breadcrumbs.styles.ts","../src/components/molecules/Breadcrumbs/Breadcrumbs.tsx","../src/components/molecules/Button/Button.styles.ts","../src/components/molecules/Button/Button.tsx","../src/components/molecules/FileIcon/FileIcon.styles.ts","../src/components/molecules/FileIcon/FileIcon.tsx","../src/components/molecules/Chip/Chip.styles.ts","../src/components/molecules/Chip/Chip.types.ts","../src/components/molecules/Chip/components/ChipDeleteButton.tsx","../src/components/molecules/Chip/components/ChipLeadingContent.tsx","../src/components/molecules/Chip/Chip.tsx","../src/components/molecules/Checkbox/Checkbox.styles.ts","../src/components/molecules/Checkbox/Checkbox.tsx","../src/components/molecules/CircularProgress/CircularProgress.styles.ts","../src/components/molecules/CircularProgress/CircularProgress.tsx","../src/hooks/useClickOutside.ts","../src/components/molecules/Dropdown/Dropdown.styles.ts","../src/components/molecules/Dropdown/Dropdown.tsx","../src/components/molecules/Input/Input.styles.ts","../src/components/molecules/Input/Input.tsx","../src/components/molecules/LoadingSpinner/LoadingSpinner.styles.ts","../src/components/molecules/LoadingSpinner/LoadingSpinner.tsx","../src/components/molecules/MessageBubble/MessageBubble.styles.ts","../src/components/molecules/MessageBubble/useElapsedTime.ts","../src/components/molecules/MessageBubble/MessageBubble.tsx","../src/components/molecules/ProgressBar/ProgressBar.styles.ts","../src/components/molecules/ProgressBar/ProgressBar.tsx","../src/components/molecules/RangeInput/RangeInput.styles.ts","../src/components/molecules/RangeInput/RangeInput.tsx","../src/components/molecules/SidebarItem/SidebarItem.styles.ts","../src/components/molecules/SidebarItem/SidebarItem.tsx","../src/components/molecules/Tag/Tag.styles.ts","../src/components/molecules/Tag/Tag.tsx","../src/components/molecules/Tabs/Tabs.styles.ts","../src/components/molecules/Tabs/Tabs.tsx","../src/components/molecules/TextArea/TextArea.styles.ts","../src/components/molecules/TextArea/TextArea.tsx","../src/components/molecules/Timestamp/Timestamp.styles.ts","../src/components/molecules/Timestamp/Timestamp.tsx","../src/components/molecules/Toast/Toast.styles.ts","../src/components/molecules/Toast/Toast.tsx","../src/components/molecules/Toggle/Toggle.styles.ts","../src/components/molecules/Toggle/Toggle.tsx","../src/components/molecules/StatusMessage/StatusMessage.styles.ts","../src/components/molecules/StatusMessage/StatusMessage.tsx","../src/components/molecules/ReportHeader/ReportHeader.tsx","../src/components/molecules/KpiStrip/KpiStrip.tsx","../src/components/molecules/MetricCard/MetricCard.tsx","../src/components/molecules/BriefingCard/BriefingCard.tsx","../src/components/molecules/ReportBanner/ReportBanner.tsx","../src/components/molecules/EmptyState/EmptyState.tsx","../src/components/molecules/VarianceBand/VarianceBand.tsx","../src/components/molecules/CommentaryBlock/CommentaryBlock.tsx","../src/components/molecules/ReportSection/ReportSection.tsx","../src/components/molecules/PeriodSelector/PeriodSelector.tsx","../src/components/molecules/ComparisonToggle/ComparisonToggle.tsx","../src/components/molecules/ExportBar/ExportBar.tsx","../src/components/molecules/AuditStamp/AuditStamp.tsx","../src/components/molecules/FootnoteList/FootnoteList.tsx","../src/components/molecules/AutopilotAction/AutopilotAction.styles.ts","../src/components/molecules/AutopilotAction/AutopilotAction.tsx","../src/components/molecules/CopyButton/CopyButton.tsx","../src/components/molecules/DataAccordion/DataAccordion.tsx","../src/components/molecules/Tooltip/Tooltip.styles.ts","../src/components/molecules/Tooltip/Tooltip.tsx","../src/components/organisms/ConversationHeader/ConversationHeader.styles.ts","../src/components/organisms/ConversationHeader/ConversationHeader.tsx","../src/components/organisms/Modal/Modal.styles.ts","../src/components/organisms/Modal/Modal.tsx","../src/components/organisms/DrillDownRow/DrillDownRow.tsx","../src/components/organisms/ReportPage/ReportPage.tsx","../src/components/organisms/DataTable/DataTable.tsx","../src/components/organisms/FinancialTable/FinancialTable.tsx","../src/components/organisms/PivotTable/PivotTable.tsx","../src/components/organisms/Charts/types.ts","../src/components/organisms/Charts/utils/colorScheme.ts","../src/components/organisms/Charts/ChartSection/ChartSection.tsx","../src/components/organisms/Charts/utils/scales.ts","../src/components/organisms/Charts/utils/format.ts","../src/components/organisms/Charts/BarChart/BarChart.tsx","../src/components/organisms/Charts/utils/path.ts","../src/components/organisms/Charts/LineChart/LineChart.tsx","../src/components/organisms/Charts/AreaChart/AreaChart.tsx","../src/components/organisms/Charts/WaterfallChart/WaterfallChart.tsx","../src/components/organisms/Charts/HorizontalBarChart/HorizontalBarChart.tsx","../src/components/organisms/Charts/DonutChart/DonutChart.tsx","../src/components/organisms/Charts/ForecastChart/ForecastChart.tsx","../src/components/organisms/Charts/FunnelChart/FunnelChart.tsx","../src/components/organisms/Charts/BulletChart/BulletChart.tsx","../src/components/organisms/Charts/HeatMap/HeatMap.tsx","../src/components/organisms/CoverPage/CoverPage.tsx","../src/components/organisms/KpiResultsTable/KpiResultsTable.tsx","../src/components/organisms/KpiObservations/KpiObservations.tsx","../src/components/organisms/ExecutiveSummaryPage/ExecutiveSummaryPage.tsx","../src/components/organisms/KpiStatCard/KpiStatCard.tsx","../src/components/organisms/KpiWheel/KpiWheel.tsx","../src/components/organisms/BudgetVarianceTable/BudgetVarianceTable.tsx","../src/components/atoms/Badge/Badge.styles.ts","../src/components/atoms/Badge/Badge.tsx","../src/components/molecules/Card/Card.styles.ts","../src/components/molecules/Card/Card.tsx","../src/components/molecules/Select/Select.tsx","../src/components/molecules/PasswordField/PasswordField.tsx","../src/components/molecules/NumberInput/NumberInput.tsx","../src/components/molecules/Banner/Banner.styles.ts","../src/components/molecules/Banner/Banner.tsx","../src/components/molecules/FieldRow/FieldRow.tsx","../src/components/molecules/SettingsNav/SettingsNav.tsx","../src/components/organisms/SettingsSectionCard/SettingsSectionCard.tsx","../src/components/report/KpiStrip.tsx","../src/components/report/MetricCard.tsx","../src/components/report/StatCard.tsx","../src/components/report/FinancialTable.tsx","../src/components/report/DataTable.tsx","../src/components/report/PivotTable.tsx","../src/components/report/ReportHeader.tsx","../src/components/report/ReportToolbar.tsx","../src/components/report/FilterBar.tsx","../src/components/report/BriefingCard.tsx","../src/components/report/SectionCard.tsx","../src/components/report/EntityCard.tsx","../src/components/report/Stack.tsx","../src/components/report/Grid.tsx","../src/components/report/Banner.tsx","../src/components/report/StatusPill.tsx","../src/components/report/EmptyState.tsx","../src/components/report/ProgressBar.tsx","../src/components/report/WorkstreamCard.tsx","../src/components/report/TaskCard.tsx","../src/components/report/ApprovalCard.tsx","../src/components/report/DeltaPill.tsx","../src/components/report/VarianceBand.tsx","../src/components/report/CommentaryBlock.tsx","../src/components/report/ReportSection.tsx","../src/components/report/ReportBanner.tsx","../src/components/report/PeriodSelector.tsx","../src/components/report/ComparisonToggle.tsx","../src/components/report/ExportBar.tsx","../src/components/report/AuditStamp.tsx","../src/components/report/FootnoteList.tsx","../src/components/report/FootnoteRef.tsx","../src/components/report/SparklineCell.tsx","../src/components/report/StackedBarChart.tsx","../src/components/report/DrillDownRow.tsx","../src/components/report/ReportPage.tsx","../src/UIRenderer.tsx"],"sourcesContent":["import type { Platform, PlatformTokens } from './types';\n\nconst WEB_PLATFORM: PlatformTokens = {\n font: \"'Geist', system-ui, sans-serif\",\n monoFont: \"'Geist Mono', monospace\",\n bodySize: 16,\n bodyLineHeight: 24,\n bodyWeight: 300,\n headingWeight: 600,\n buttonHeight: { sm: 32, md: 40, lg: 48 },\n inputHeight: 40,\n radii: { sm: 4, md: 6, lg: 8, xl: 12 },\n shadows: {\n sm: '0 1px 2px rgba(0,0,0,0.05)',\n md: '0 4px 6px rgba(0,0,0,0.07)',\n lg: '0 10px 20px rgba(0,0,0,0.1)',\n },\n spacing: [0, 4, 8, 12, 16, 24, 32, 48, 64],\n animation: { duration: '150ms', easing: 'ease' },\n};\n\nconst MAC_PLATFORM: PlatformTokens = {\n font: \"-apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', system-ui, sans-serif\",\n monoFont: \"'SF Mono', 'Menlo', monospace\",\n bodySize: 13,\n bodyLineHeight: 18,\n bodyWeight: 400,\n headingWeight: 600,\n buttonHeight: { sm: 22, md: 28, lg: 32 },\n inputHeight: 22,\n radii: { sm: 4, md: 6, lg: 10, xl: 14 },\n shadows: {\n sm: '0 0.5px 1px rgba(0,0,0,0.04)',\n md: '0 2px 8px rgba(0,0,0,0.06)',\n lg: '0 8px 24px rgba(0,0,0,0.08)',\n },\n spacing: [0, 4, 8, 12, 16, 20, 24, 32, 40],\n animation: { duration: '300ms', easing: 'cubic-bezier(0.2, 0.8, 0.2, 1)' },\n};\n\nconst WINDOWS_PLATFORM: PlatformTokens = {\n font: \"'Segoe UI Variable', 'Segoe UI', system-ui, sans-serif\",\n monoFont: \"'Cascadia Code', 'Consolas', monospace\",\n bodySize: 14,\n bodyLineHeight: 20,\n bodyWeight: 400,\n headingWeight: 600,\n buttonHeight: { sm: 24, md: 32, lg: 40 },\n inputHeight: 32,\n radii: { sm: 2, md: 4, lg: 6, xl: 8 },\n shadows: {\n sm: '0 1px 2px rgba(0,0,0,0.08), 0 0 1px rgba(0,0,0,0.06)',\n md: '0 2px 4px rgba(0,0,0,0.1), 0 0 1px rgba(0,0,0,0.06)',\n lg: '0 8px 16px rgba(0,0,0,0.14), 0 0 1px rgba(0,0,0,0.06)',\n },\n spacing: [0, 2, 4, 8, 12, 16, 24, 32, 48],\n animation: { duration: '250ms', easing: 'cubic-bezier(0.1, 0.9, 0.2, 1)' },\n};\n\nexport const PLATFORM_TOKENS: Record<Platform, PlatformTokens> = {\n web: WEB_PLATFORM,\n mac: MAC_PLATFORM,\n windows: WINDOWS_PLATFORM,\n};\n","/**\n * Brand Profiles — single source of truth for the Archie Design Language.\n *\n * Each brand x platform combination defines: colors, typography, spacing,\n * radii, shadows. Used by Design Studio stories, design agents, and\n * anywhere brand tokens are needed.\n *\n * To add a new brand/platform: create a JSON file here and add it to BRAND_PROFILES.\n */\n\nimport archieWeb from './archie.web.json';\nimport archieMac from './archie.mac.json';\nimport marthaWeb from './martha.web.json';\nimport marthaMac from './martha.mac.json';\n\nexport interface BrandProfileData {\n id: string;\n platform: string;\n name: string;\n personality?: string;\n colors?: {\n primary?: Record<string, string>;\n accent?: Record<string, string>;\n neutral?: Record<string, string>;\n status?: Record<string, string>;\n entity?: Record<string, { bg: string; text: string }>;\n };\n typography?: {\n heading?: { family: string; weights: string; style?: string };\n body?: { family: string; weights: string };\n scale?: Array<{ name: string; size: string; weight: string; lineHeight: string }>;\n };\n shadows?: Record<string, string>;\n spacing?: number[];\n radii?: Record<string, number>;\n layout?: Record<string, unknown>;\n components?: string;\n figmaCollectionPrefix?: string;\n}\n\nexport const BRAND_PROFILES: Record<string, Record<string, BrandProfileData>> = {\n archie: { web: archieWeb as BrandProfileData, mac: archieMac as BrandProfileData },\n martha: { web: marthaWeb as BrandProfileData, mac: marthaMac as BrandProfileData },\n};\n\nexport const ARCHIE_WEB = archieWeb as BrandProfileData;\nexport const ARCHIE_MAC = archieMac as BrandProfileData;\nexport const MARTHA_WEB = marthaWeb as BrandProfileData;\nexport const MARTHA_MAC = marthaMac as BrandProfileData;\n\nexport const DEFAULT_BRAND: BrandProfileData = archieWeb as BrandProfileData;\n","import { createContext, useContext, type ReactNode } from 'react';\nimport type { Platform, PlatformTokens } from './types';\nimport type { BrandProfileData } from '../brands';\nimport { DEFAULT_BRAND } from '../brands';\nimport { PLATFORM_TOKENS } from './tokens';\n\ninterface PlatformContextValue {\n platform: Platform;\n brand: BrandProfileData | null;\n}\n\nconst PlatformContext = createContext<PlatformContextValue>({\n platform: 'web',\n brand: null,\n});\n\nexport function PlatformProvider({\n platform = 'web',\n brand = null,\n children,\n}: {\n platform?: Platform;\n brand?: BrandProfileData | null;\n children: ReactNode;\n}) {\n return (\n <PlatformContext.Provider value={{ platform, brand }}>\n {children}\n </PlatformContext.Provider>\n );\n}\n\nexport function usePlatform(): Platform {\n return useContext(PlatformContext).platform;\n}\n\nexport function useBrand(): BrandProfileData | null {\n return useContext(PlatformContext).brand;\n}\n\nexport function usePlatformTokens(): PlatformTokens {\n const platform = usePlatform();\n return PLATFORM_TOKENS[platform];\n}\n\n/** Unified design tokens combining brand colors + platform dimensions. */\nexport function useTokens() {\n const brand = useBrand();\n const pt = usePlatformTokens();\n const c = (brand ?? DEFAULT_BRAND).colors ?? {};\n return {\n primary: c.primary?.['800'] ?? '#15b1cd',\n primaryDeep: c.primary?.['1000'] ?? '#022e40',\n primaryLight: c.primary?.['200'] ?? '#d6f4ff',\n accent: c.accent?.['800'] ?? '#ff6f00',\n accentLight: c.accent?.['200'] ?? '#fff2e2',\n n1000: c.neutral?.['1000'] ?? '#000626',\n n800: c.neutral?.['800'] ?? '#595f7a',\n n600: c.neutral?.['600'] ?? '#8c92af',\n n500: c.neutral?.['500'] ?? '#a1a7c4',\n n400: c.neutral?.['400'] ?? '#b5b9d1',\n n300: c.neutral?.['300'] ?? '#cdd0e0',\n n200: c.neutral?.['200'] ?? '#e5e7f0',\n n100: c.neutral?.['100'] ?? '#f5f6fa',\n n50: c.neutral?.['50'] ?? '#fafafc',\n white: c.neutral?.['white'] ?? '#ffffff',\n error: c.status?.['error'] ?? '#fb6060',\n errorBg: c.status?.['error-bg'] ?? '#ffecec',\n success: c.status?.['success'] ?? '#71d481',\n successBg: c.status?.['success-bg'] ?? '#e2f7e5',\n font: pt.font,\n monoFont: pt.monoFont,\n bodySize: pt.bodySize,\n bodyLineHeight: pt.bodyLineHeight,\n bodyWeight: pt.bodyWeight,\n headingWeight: pt.headingWeight,\n buttonHeight: pt.buttonHeight,\n inputHeight: pt.inputHeight,\n shadow: pt.shadows.sm,\n shadowMd: pt.shadows.md,\n shadowLg: pt.shadows.lg,\n radiusSm: pt.radii.sm,\n radiusMd: pt.radii.md,\n radiusLg: pt.radii.lg,\n radiusXl: pt.radii.xl,\n animDuration: pt.animation.duration,\n animEasing: pt.animation.easing,\n };\n}\n","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","const CLASS_PART_SEPARATOR = '-';\nconst createClassGroupUtils = config => {\n const classMap = createClassMap(config);\n const {\n conflictingClassGroups,\n conflictingClassGroupModifiers\n } = config;\n const getClassGroupId = className => {\n const classParts = className.split(CLASS_PART_SEPARATOR);\n // Classes like `-inset-1` produce an empty string as first classPart. We assume that classes for negative values are used correctly and remove it from classParts.\n if (classParts[0] === '' && classParts.length !== 1) {\n classParts.shift();\n }\n return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className);\n };\n const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {\n const conflicts = conflictingClassGroups[classGroupId] || [];\n if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {\n return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]];\n }\n return conflicts;\n };\n return {\n getClassGroupId,\n getConflictingClassGroupIds\n };\n};\nconst getGroupRecursive = (classParts, classPartObject) => {\n if (classParts.length === 0) {\n return classPartObject.classGroupId;\n }\n const currentClassPart = classParts[0];\n const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);\n const classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive(classParts.slice(1), nextClassPartObject) : undefined;\n if (classGroupFromNextClassPart) {\n return classGroupFromNextClassPart;\n }\n if (classPartObject.validators.length === 0) {\n return undefined;\n }\n const classRest = classParts.join(CLASS_PART_SEPARATOR);\n return classPartObject.validators.find(({\n validator\n }) => validator(classRest))?.classGroupId;\n};\nconst arbitraryPropertyRegex = /^\\[(.+)\\]$/;\nconst getGroupIdForArbitraryProperty = className => {\n if (arbitraryPropertyRegex.test(className)) {\n const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];\n const property = arbitraryPropertyClassName?.substring(0, arbitraryPropertyClassName.indexOf(':'));\n if (property) {\n // I use two dots here because one dot is used as prefix for class groups in plugins\n return 'arbitrary..' + property;\n }\n }\n};\n/**\n * Exported for testing only\n */\nconst createClassMap = config => {\n const {\n theme,\n classGroups\n } = config;\n const classMap = {\n nextPart: new Map(),\n validators: []\n };\n for (const classGroupId in classGroups) {\n processClassesRecursively(classGroups[classGroupId], classMap, classGroupId, theme);\n }\n return classMap;\n};\nconst processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {\n classGroup.forEach(classDefinition => {\n if (typeof classDefinition === 'string') {\n const classPartObjectToEdit = classDefinition === '' ? classPartObject : getPart(classPartObject, classDefinition);\n classPartObjectToEdit.classGroupId = classGroupId;\n return;\n }\n if (typeof classDefinition === 'function') {\n if (isThemeGetter(classDefinition)) {\n processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);\n return;\n }\n classPartObject.validators.push({\n validator: classDefinition,\n classGroupId\n });\n return;\n }\n Object.entries(classDefinition).forEach(([key, classGroup]) => {\n processClassesRecursively(classGroup, getPart(classPartObject, key), classGroupId, theme);\n });\n });\n};\nconst getPart = (classPartObject, path) => {\n let currentClassPartObject = classPartObject;\n path.split(CLASS_PART_SEPARATOR).forEach(pathPart => {\n if (!currentClassPartObject.nextPart.has(pathPart)) {\n currentClassPartObject.nextPart.set(pathPart, {\n nextPart: new Map(),\n validators: []\n });\n }\n currentClassPartObject = currentClassPartObject.nextPart.get(pathPart);\n });\n return currentClassPartObject;\n};\nconst isThemeGetter = func => func.isThemeGetter;\n\n// LRU cache inspired from hashlru (https://github.com/dominictarr/hashlru/blob/v1.0.4/index.js) but object replaced with Map to improve performance\nconst createLruCache = maxCacheSize => {\n if (maxCacheSize < 1) {\n return {\n get: () => undefined,\n set: () => {}\n };\n }\n let cacheSize = 0;\n let cache = new Map();\n let previousCache = new Map();\n const update = (key, value) => {\n cache.set(key, value);\n cacheSize++;\n if (cacheSize > maxCacheSize) {\n cacheSize = 0;\n previousCache = cache;\n cache = new Map();\n }\n };\n return {\n get(key) {\n let value = cache.get(key);\n if (value !== undefined) {\n return value;\n }\n if ((value = previousCache.get(key)) !== undefined) {\n update(key, value);\n return value;\n }\n },\n set(key, value) {\n if (cache.has(key)) {\n cache.set(key, value);\n } else {\n update(key, value);\n }\n }\n };\n};\nconst IMPORTANT_MODIFIER = '!';\nconst MODIFIER_SEPARATOR = ':';\nconst MODIFIER_SEPARATOR_LENGTH = MODIFIER_SEPARATOR.length;\nconst createParseClassName = config => {\n const {\n prefix,\n experimentalParseClassName\n } = config;\n /**\n * Parse class name into parts.\n *\n * Inspired by `splitAtTopLevelOnly` used in Tailwind CSS\n * @see https://github.com/tailwindlabs/tailwindcss/blob/v3.2.2/src/util/splitAtTopLevelOnly.js\n */\n let parseClassName = className => {\n const modifiers = [];\n let bracketDepth = 0;\n let parenDepth = 0;\n let modifierStart = 0;\n let postfixModifierPosition;\n for (let index = 0; index < className.length; index++) {\n let currentCharacter = className[index];\n if (bracketDepth === 0 && parenDepth === 0) {\n if (currentCharacter === MODIFIER_SEPARATOR) {\n modifiers.push(className.slice(modifierStart, index));\n modifierStart = index + MODIFIER_SEPARATOR_LENGTH;\n continue;\n }\n if (currentCharacter === '/') {\n postfixModifierPosition = index;\n continue;\n }\n }\n if (currentCharacter === '[') {\n bracketDepth++;\n } else if (currentCharacter === ']') {\n bracketDepth--;\n } else if (currentCharacter === '(') {\n parenDepth++;\n } else if (currentCharacter === ')') {\n parenDepth--;\n }\n }\n const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.substring(modifierStart);\n const baseClassName = stripImportantModifier(baseClassNameWithImportantModifier);\n const hasImportantModifier = baseClassName !== baseClassNameWithImportantModifier;\n const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : undefined;\n return {\n modifiers,\n hasImportantModifier,\n baseClassName,\n maybePostfixModifierPosition\n };\n };\n if (prefix) {\n const fullPrefix = prefix + MODIFIER_SEPARATOR;\n const parseClassNameOriginal = parseClassName;\n parseClassName = className => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.substring(fullPrefix.length)) : {\n isExternal: true,\n modifiers: [],\n hasImportantModifier: false,\n baseClassName: className,\n maybePostfixModifierPosition: undefined\n };\n }\n if (experimentalParseClassName) {\n const parseClassNameOriginal = parseClassName;\n parseClassName = className => experimentalParseClassName({\n className,\n parseClassName: parseClassNameOriginal\n });\n }\n return parseClassName;\n};\nconst stripImportantModifier = baseClassName => {\n if (baseClassName.endsWith(IMPORTANT_MODIFIER)) {\n return baseClassName.substring(0, baseClassName.length - 1);\n }\n /**\n * In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.\n * @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864\n */\n if (baseClassName.startsWith(IMPORTANT_MODIFIER)) {\n return baseClassName.substring(1);\n }\n return baseClassName;\n};\n\n/**\n * Sorts modifiers according to following schema:\n * - Predefined modifiers are sorted alphabetically\n * - When an arbitrary variant appears, it must be preserved which modifiers are before and after it\n */\nconst createSortModifiers = config => {\n const orderSensitiveModifiers = Object.fromEntries(config.orderSensitiveModifiers.map(modifier => [modifier, true]));\n const sortModifiers = modifiers => {\n if (modifiers.length <= 1) {\n return modifiers;\n }\n const sortedModifiers = [];\n let unsortedModifiers = [];\n modifiers.forEach(modifier => {\n const isPositionSensitive = modifier[0] === '[' || orderSensitiveModifiers[modifier];\n if (isPositionSensitive) {\n sortedModifiers.push(...unsortedModifiers.sort(), modifier);\n unsortedModifiers = [];\n } else {\n unsortedModifiers.push(modifier);\n }\n });\n sortedModifiers.push(...unsortedModifiers.sort());\n return sortedModifiers;\n };\n return sortModifiers;\n};\nconst createConfigUtils = config => ({\n cache: createLruCache(config.cacheSize),\n parseClassName: createParseClassName(config),\n sortModifiers: createSortModifiers(config),\n ...createClassGroupUtils(config)\n});\nconst SPLIT_CLASSES_REGEX = /\\s+/;\nconst mergeClassList = (classList, configUtils) => {\n const {\n parseClassName,\n getClassGroupId,\n getConflictingClassGroupIds,\n sortModifiers\n } = configUtils;\n /**\n * Set of classGroupIds in following format:\n * `{importantModifier}{variantModifiers}{classGroupId}`\n * @example 'float'\n * @example 'hover:focus:bg-color'\n * @example 'md:!pr'\n */\n const classGroupsInConflict = [];\n const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);\n let result = '';\n for (let index = classNames.length - 1; index >= 0; index -= 1) {\n const originalClassName = classNames[index];\n const {\n isExternal,\n modifiers,\n hasImportantModifier,\n baseClassName,\n maybePostfixModifierPosition\n } = parseClassName(originalClassName);\n if (isExternal) {\n result = originalClassName + (result.length > 0 ? ' ' + result : result);\n continue;\n }\n let hasPostfixModifier = !!maybePostfixModifierPosition;\n let classGroupId = getClassGroupId(hasPostfixModifier ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);\n if (!classGroupId) {\n if (!hasPostfixModifier) {\n // Not a Tailwind class\n result = originalClassName + (result.length > 0 ? ' ' + result : result);\n continue;\n }\n classGroupId = getClassGroupId(baseClassName);\n if (!classGroupId) {\n // Not a Tailwind class\n result = originalClassName + (result.length > 0 ? ' ' + result : result);\n continue;\n }\n hasPostfixModifier = false;\n }\n const variantModifier = sortModifiers(modifiers).join(':');\n const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;\n const classId = modifierId + classGroupId;\n if (classGroupsInConflict.includes(classId)) {\n // Tailwind class omitted due to conflict\n continue;\n }\n classGroupsInConflict.push(classId);\n const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier);\n for (let i = 0; i < conflictGroups.length; ++i) {\n const group = conflictGroups[i];\n classGroupsInConflict.push(modifierId + group);\n }\n // Tailwind class not in conflict\n result = originalClassName + (result.length > 0 ? ' ' + result : result);\n }\n return result;\n};\n\n/**\n * The code in this file is copied from https://github.com/lukeed/clsx and modified to suit the needs of tailwind-merge better.\n *\n * Specifically:\n * - Runtime code from https://github.com/lukeed/clsx/blob/v1.2.1/src/index.js\n * - TypeScript types from https://github.com/lukeed/clsx/blob/v1.2.1/clsx.d.ts\n *\n * Original code has MIT license: Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)\n */\nfunction twJoin() {\n let index = 0;\n let argument;\n let resolvedValue;\n let string = '';\n while (index < arguments.length) {\n if (argument = arguments[index++]) {\n if (resolvedValue = toValue(argument)) {\n string && (string += ' ');\n string += resolvedValue;\n }\n }\n }\n return string;\n}\nconst toValue = mix => {\n if (typeof mix === 'string') {\n return mix;\n }\n let resolvedValue;\n let string = '';\n for (let k = 0; k < mix.length; k++) {\n if (mix[k]) {\n if (resolvedValue = toValue(mix[k])) {\n string && (string += ' ');\n string += resolvedValue;\n }\n }\n }\n return string;\n};\nfunction createTailwindMerge(createConfigFirst, ...createConfigRest) {\n let configUtils;\n let cacheGet;\n let cacheSet;\n let functionToCall = initTailwindMerge;\n function initTailwindMerge(classList) {\n const config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());\n configUtils = createConfigUtils(config);\n cacheGet = configUtils.cache.get;\n cacheSet = configUtils.cache.set;\n functionToCall = tailwindMerge;\n return tailwindMerge(classList);\n }\n function tailwindMerge(classList) {\n const cachedResult = cacheGet(classList);\n if (cachedResult) {\n return cachedResult;\n }\n const result = mergeClassList(classList, configUtils);\n cacheSet(classList, result);\n return result;\n }\n return function callTailwindMerge() {\n return functionToCall(twJoin.apply(null, arguments));\n };\n}\nconst fromTheme = key => {\n const themeGetter = theme => theme[key] || [];\n themeGetter.isThemeGetter = true;\n return themeGetter;\n};\nconst arbitraryValueRegex = /^\\[(?:(\\w[\\w-]*):)?(.+)\\]$/i;\nconst arbitraryVariableRegex = /^\\((?:(\\w[\\w-]*):)?(.+)\\)$/i;\nconst fractionRegex = /^\\d+\\/\\d+$/;\nconst tshirtUnitRegex = /^(\\d+(\\.\\d+)?)?(xs|sm|md|lg|xl)$/;\nconst lengthUnitRegex = /\\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\\b(calc|min|max|clamp)\\(.+\\)|^0$/;\nconst colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\\(.+\\)$/;\n// Shadow always begins with x and y offset separated by underscore optionally prepended by inset\nconst shadowRegex = /^(inset_)?-?((\\d+)?\\.?(\\d+)[a-z]+|0)_-?((\\d+)?\\.?(\\d+)[a-z]+|0)/;\nconst imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\\(.+\\)$/;\nconst isFraction = value => fractionRegex.test(value);\nconst isNumber = value => !!value && !Number.isNaN(Number(value));\nconst isInteger = value => !!value && Number.isInteger(Number(value));\nconst isPercent = value => value.endsWith('%') && isNumber(value.slice(0, -1));\nconst isTshirtSize = value => tshirtUnitRegex.test(value);\nconst isAny = () => true;\nconst isLengthOnly = value =>\n// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.\n// For example, `hsl(0 0% 0%)` would be classified as a length without this check.\n// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.\nlengthUnitRegex.test(value) && !colorFunctionRegex.test(value);\nconst isNever = () => false;\nconst isShadow = value => shadowRegex.test(value);\nconst isImage = value => imageRegex.test(value);\nconst isAnyNonArbitrary = value => !isArbitraryValue(value) && !isArbitraryVariable(value);\nconst isArbitrarySize = value => getIsArbitraryValue(value, isLabelSize, isNever);\nconst isArbitraryValue = value => arbitraryValueRegex.test(value);\nconst isArbitraryLength = value => getIsArbitraryValue(value, isLabelLength, isLengthOnly);\nconst isArbitraryNumber = value => getIsArbitraryValue(value, isLabelNumber, isNumber);\nconst isArbitraryPosition = value => getIsArbitraryValue(value, isLabelPosition, isNever);\nconst isArbitraryImage = value => getIsArbitraryValue(value, isLabelImage, isImage);\nconst isArbitraryShadow = value => getIsArbitraryValue(value, isLabelShadow, isShadow);\nconst isArbitraryVariable = value => arbitraryVariableRegex.test(value);\nconst isArbitraryVariableLength = value => getIsArbitraryVariable(value, isLabelLength);\nconst isArbitraryVariableFamilyName = value => getIsArbitraryVariable(value, isLabelFamilyName);\nconst isArbitraryVariablePosition = value => getIsArbitraryVariable(value, isLabelPosition);\nconst isArbitraryVariableSize = value => getIsArbitraryVariable(value, isLabelSize);\nconst isArbitraryVariableImage = value => getIsArbitraryVariable(value, isLabelImage);\nconst isArbitraryVariableShadow = value => getIsArbitraryVariable(value, isLabelShadow, true);\n// Helpers\nconst getIsArbitraryValue = (value, testLabel, testValue) => {\n const result = arbitraryValueRegex.exec(value);\n if (result) {\n if (result[1]) {\n return testLabel(result[1]);\n }\n return testValue(result[2]);\n }\n return false;\n};\nconst getIsArbitraryVariable = (value, testLabel, shouldMatchNoLabel = false) => {\n const result = arbitraryVariableRegex.exec(value);\n if (result) {\n if (result[1]) {\n return testLabel(result[1]);\n }\n return shouldMatchNoLabel;\n }\n return false;\n};\n// Labels\nconst isLabelPosition = label => label === 'position' || label === 'percentage';\nconst isLabelImage = label => label === 'image' || label === 'url';\nconst isLabelSize = label => label === 'length' || label === 'size' || label === 'bg-size';\nconst isLabelLength = label => label === 'length';\nconst isLabelNumber = label => label === 'number';\nconst isLabelFamilyName = label => label === 'family-name';\nconst isLabelShadow = label => label === 'shadow';\nconst validators = /*#__PURE__*/Object.defineProperty({\n __proto__: null,\n isAny,\n isAnyNonArbitrary,\n isArbitraryImage,\n isArbitraryLength,\n isArbitraryNumber,\n isArbitraryPosition,\n isArbitraryShadow,\n isArbitrarySize,\n isArbitraryValue,\n isArbitraryVariable,\n isArbitraryVariableFamilyName,\n isArbitraryVariableImage,\n isArbitraryVariableLength,\n isArbitraryVariablePosition,\n isArbitraryVariableShadow,\n isArbitraryVariableSize,\n isFraction,\n isInteger,\n isNumber,\n isPercent,\n isTshirtSize\n}, Symbol.toStringTag, {\n value: 'Module'\n});\nconst getDefaultConfig = () => {\n /**\n * Theme getters for theme variable namespaces\n * @see https://tailwindcss.com/docs/theme#theme-variable-namespaces\n */\n /***/\n const themeColor = fromTheme('color');\n const themeFont = fromTheme('font');\n const themeText = fromTheme('text');\n const themeFontWeight = fromTheme('font-weight');\n const themeTracking = fromTheme('tracking');\n const themeLeading = fromTheme('leading');\n const themeBreakpoint = fromTheme('breakpoint');\n const themeContainer = fromTheme('container');\n const themeSpacing = fromTheme('spacing');\n const themeRadius = fromTheme('radius');\n const themeShadow = fromTheme('shadow');\n const themeInsetShadow = fromTheme('inset-shadow');\n const themeTextShadow = fromTheme('text-shadow');\n const themeDropShadow = fromTheme('drop-shadow');\n const themeBlur = fromTheme('blur');\n const themePerspective = fromTheme('perspective');\n const themeAspect = fromTheme('aspect');\n const themeEase = fromTheme('ease');\n const themeAnimate = fromTheme('animate');\n /**\n * Helpers to avoid repeating the same scales\n *\n * We use functions that create a new array every time they're called instead of static arrays.\n * This ensures that users who modify any scale by mutating the array (e.g. with `array.push(element)`) don't accidentally mutate arrays in other parts of the config.\n */\n /***/\n const scaleBreak = () => ['auto', 'avoid', 'all', 'avoid-page', 'page', 'left', 'right', 'column'];\n const scalePosition = () => ['center', 'top', 'bottom', 'left', 'right', 'top-left',\n // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378\n 'left-top', 'top-right',\n // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378\n 'right-top', 'bottom-right',\n // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378\n 'right-bottom', 'bottom-left',\n // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378\n 'left-bottom'];\n const scalePositionWithArbitrary = () => [...scalePosition(), isArbitraryVariable, isArbitraryValue];\n const scaleOverflow = () => ['auto', 'hidden', 'clip', 'visible', 'scroll'];\n const scaleOverscroll = () => ['auto', 'contain', 'none'];\n const scaleUnambiguousSpacing = () => [isArbitraryVariable, isArbitraryValue, themeSpacing];\n const scaleInset = () => [isFraction, 'full', 'auto', ...scaleUnambiguousSpacing()];\n const scaleGridTemplateColsRows = () => [isInteger, 'none', 'subgrid', isArbitraryVariable, isArbitraryValue];\n const scaleGridColRowStartAndEnd = () => ['auto', {\n span: ['full', isInteger, isArbitraryVariable, isArbitraryValue]\n }, isInteger, isArbitraryVariable, isArbitraryValue];\n const scaleGridColRowStartOrEnd = () => [isInteger, 'auto', isArbitraryVariable, isArbitraryValue];\n const scaleGridAutoColsRows = () => ['auto', 'min', 'max', 'fr', isArbitraryVariable, isArbitraryValue];\n const scaleAlignPrimaryAxis = () => ['start', 'end', 'center', 'between', 'around', 'evenly', 'stretch', 'baseline', 'center-safe', 'end-safe'];\n const scaleAlignSecondaryAxis = () => ['start', 'end', 'center', 'stretch', 'center-safe', 'end-safe'];\n const scaleMargin = () => ['auto', ...scaleUnambiguousSpacing()];\n const scaleSizing = () => [isFraction, 'auto', 'full', 'dvw', 'dvh', 'lvw', 'lvh', 'svw', 'svh', 'min', 'max', 'fit', ...scaleUnambiguousSpacing()];\n const scaleColor = () => [themeColor, isArbitraryVariable, isArbitraryValue];\n const scaleBgPosition = () => [...scalePosition(), isArbitraryVariablePosition, isArbitraryPosition, {\n position: [isArbitraryVariable, isArbitraryValue]\n }];\n const scaleBgRepeat = () => ['no-repeat', {\n repeat: ['', 'x', 'y', 'space', 'round']\n }];\n const scaleBgSize = () => ['auto', 'cover', 'contain', isArbitraryVariableSize, isArbitrarySize, {\n size: [isArbitraryVariable, isArbitraryValue]\n }];\n const scaleGradientStopPosition = () => [isPercent, isArbitraryVariableLength, isArbitraryLength];\n const scaleRadius = () => [\n // Deprecated since Tailwind CSS v4.0.0\n '', 'none', 'full', themeRadius, isArbitraryVariable, isArbitraryValue];\n const scaleBorderWidth = () => ['', isNumber, isArbitraryVariableLength, isArbitraryLength];\n const scaleLineStyle = () => ['solid', 'dashed', 'dotted', 'double'];\n const scaleBlendMode = () => ['normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity'];\n const scaleMaskImagePosition = () => [isNumber, isPercent, isArbitraryVariablePosition, isArbitraryPosition];\n const scaleBlur = () => [\n // Deprecated since Tailwind CSS v4.0.0\n '', 'none', themeBlur, isArbitraryVariable, isArbitraryValue];\n const scaleRotate = () => ['none', isNumber, isArbitraryVariable, isArbitraryValue];\n const scaleScale = () => ['none', isNumber, isArbitraryVariable, isArbitraryValue];\n const scaleSkew = () => [isNumber, isArbitraryVariable, isArbitraryValue];\n const scaleTranslate = () => [isFraction, 'full', ...scaleUnambiguousSpacing()];\n return {\n cacheSize: 500,\n theme: {\n animate: ['spin', 'ping', 'pulse', 'bounce'],\n aspect: ['video'],\n blur: [isTshirtSize],\n breakpoint: [isTshirtSize],\n color: [isAny],\n container: [isTshirtSize],\n 'drop-shadow': [isTshirtSize],\n ease: ['in', 'out', 'in-out'],\n font: [isAnyNonArbitrary],\n 'font-weight': ['thin', 'extralight', 'light', 'normal', 'medium', 'semibold', 'bold', 'extrabold', 'black'],\n 'inset-shadow': [isTshirtSize],\n leading: ['none', 'tight', 'snug', 'normal', 'relaxed', 'loose'],\n perspective: ['dramatic', 'near', 'normal', 'midrange', 'distant', 'none'],\n radius: [isTshirtSize],\n shadow: [isTshirtSize],\n spacing: ['px', isNumber],\n text: [isTshirtSize],\n 'text-shadow': [isTshirtSize],\n tracking: ['tighter', 'tight', 'normal', 'wide', 'wider', 'widest']\n },\n classGroups: {\n // --------------\n // --- Layout ---\n // --------------\n /**\n * Aspect Ratio\n * @see https://tailwindcss.com/docs/aspect-ratio\n */\n aspect: [{\n aspect: ['auto', 'square', isFraction, isArbitraryValue, isArbitraryVariable, themeAspect]\n }],\n /**\n * Container\n * @see https://tailwindcss.com/docs/container\n * @deprecated since Tailwind CSS v4.0.0\n */\n container: ['container'],\n /**\n * Columns\n * @see https://tailwindcss.com/docs/columns\n */\n columns: [{\n columns: [isNumber, isArbitraryValue, isArbitraryVariable, themeContainer]\n }],\n /**\n * Break After\n * @see https://tailwindcss.com/docs/break-after\n */\n 'break-after': [{\n 'break-after': scaleBreak()\n }],\n /**\n * Break Before\n * @see https://tailwindcss.com/docs/break-before\n */\n 'break-before': [{\n 'break-before': scaleBreak()\n }],\n /**\n * Break Inside\n * @see https://tailwindcss.com/docs/break-inside\n */\n 'break-inside': [{\n 'break-inside': ['auto', 'avoid', 'avoid-page', 'avoid-column']\n }],\n /**\n * Box Decoration Break\n * @see https://tailwindcss.com/docs/box-decoration-break\n */\n 'box-decoration': [{\n 'box-decoration': ['slice', 'clone']\n }],\n /**\n * Box Sizing\n * @see https://tailwindcss.com/docs/box-sizing\n */\n box: [{\n box: ['border', 'content']\n }],\n /**\n * Display\n * @see https://tailwindcss.com/docs/display\n */\n display: ['block', 'inline-block', 'inline', 'flex', 'inline-flex', 'table', 'inline-table', 'table-caption', 'table-cell', 'table-column', 'table-column-group', 'table-footer-group', 'table-header-group', 'table-row-group', 'table-row', 'flow-root', 'grid', 'inline-grid', 'contents', 'list-item', 'hidden'],\n /**\n * Screen Reader Only\n * @see https://tailwindcss.com/docs/display#screen-reader-only\n */\n sr: ['sr-only', 'not-sr-only'],\n /**\n * Floats\n * @see https://tailwindcss.com/docs/float\n */\n float: [{\n float: ['right', 'left', 'none', 'start', 'end']\n }],\n /**\n * Clear\n * @see https://tailwindcss.com/docs/clear\n */\n clear: [{\n clear: ['left', 'right', 'both', 'none', 'start', 'end']\n }],\n /**\n * Isolation\n * @see https://tailwindcss.com/docs/isolation\n */\n isolation: ['isolate', 'isolation-auto'],\n /**\n * Object Fit\n * @see https://tailwindcss.com/docs/object-fit\n */\n 'object-fit': [{\n object: ['contain', 'cover', 'fill', 'none', 'scale-down']\n }],\n /**\n * Object Position\n * @see https://tailwindcss.com/docs/object-position\n */\n 'object-position': [{\n object: scalePositionWithArbitrary()\n }],\n /**\n * Overflow\n * @see https://tailwindcss.com/docs/overflow\n */\n overflow: [{\n overflow: scaleOverflow()\n }],\n /**\n * Overflow X\n * @see https://tailwindcss.com/docs/overflow\n */\n 'overflow-x': [{\n 'overflow-x': scaleOverflow()\n }],\n /**\n * Overflow Y\n * @see https://tailwindcss.com/docs/overflow\n */\n 'overflow-y': [{\n 'overflow-y': scaleOverflow()\n }],\n /**\n * Overscroll Behavior\n * @see https://tailwindcss.com/docs/overscroll-behavior\n */\n overscroll: [{\n overscroll: scaleOverscroll()\n }],\n /**\n * Overscroll Behavior X\n * @see https://tailwindcss.com/docs/overscroll-behavior\n */\n 'overscroll-x': [{\n 'overscroll-x': scaleOverscroll()\n }],\n /**\n * Overscroll Behavior Y\n * @see https://tailwindcss.com/docs/overscroll-behavior\n */\n 'overscroll-y': [{\n 'overscroll-y': scaleOverscroll()\n }],\n /**\n * Position\n * @see https://tailwindcss.com/docs/position\n */\n position: ['static', 'fixed', 'absolute', 'relative', 'sticky'],\n /**\n * Top / Right / Bottom / Left\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n inset: [{\n inset: scaleInset()\n }],\n /**\n * Right / Left\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n 'inset-x': [{\n 'inset-x': scaleInset()\n }],\n /**\n * Top / Bottom\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n 'inset-y': [{\n 'inset-y': scaleInset()\n }],\n /**\n * Start\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n start: [{\n start: scaleInset()\n }],\n /**\n * End\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n end: [{\n end: scaleInset()\n }],\n /**\n * Top\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n top: [{\n top: scaleInset()\n }],\n /**\n * Right\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n right: [{\n right: scaleInset()\n }],\n /**\n * Bottom\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n bottom: [{\n bottom: scaleInset()\n }],\n /**\n * Left\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n left: [{\n left: scaleInset()\n }],\n /**\n * Visibility\n * @see https://tailwindcss.com/docs/visibility\n */\n visibility: ['visible', 'invisible', 'collapse'],\n /**\n * Z-Index\n * @see https://tailwindcss.com/docs/z-index\n */\n z: [{\n z: [isInteger, 'auto', isArbitraryVariable, isArbitraryValue]\n }],\n // ------------------------\n // --- Flexbox and Grid ---\n // ------------------------\n /**\n * Flex Basis\n * @see https://tailwindcss.com/docs/flex-basis\n */\n basis: [{\n basis: [isFraction, 'full', 'auto', themeContainer, ...scaleUnambiguousSpacing()]\n }],\n /**\n * Flex Direction\n * @see https://tailwindcss.com/docs/flex-direction\n */\n 'flex-direction': [{\n flex: ['row', 'row-reverse', 'col', 'col-reverse']\n }],\n /**\n * Flex Wrap\n * @see https://tailwindcss.com/docs/flex-wrap\n */\n 'flex-wrap': [{\n flex: ['nowrap', 'wrap', 'wrap-reverse']\n }],\n /**\n * Flex\n * @see https://tailwindcss.com/docs/flex\n */\n flex: [{\n flex: [isNumber, isFraction, 'auto', 'initial', 'none', isArbitraryValue]\n }],\n /**\n * Flex Grow\n * @see https://tailwindcss.com/docs/flex-grow\n */\n grow: [{\n grow: ['', isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Flex Shrink\n * @see https://tailwindcss.com/docs/flex-shrink\n */\n shrink: [{\n shrink: ['', isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Order\n * @see https://tailwindcss.com/docs/order\n */\n order: [{\n order: [isInteger, 'first', 'last', 'none', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Grid Template Columns\n * @see https://tailwindcss.com/docs/grid-template-columns\n */\n 'grid-cols': [{\n 'grid-cols': scaleGridTemplateColsRows()\n }],\n /**\n * Grid Column Start / End\n * @see https://tailwindcss.com/docs/grid-column\n */\n 'col-start-end': [{\n col: scaleGridColRowStartAndEnd()\n }],\n /**\n * Grid Column Start\n * @see https://tailwindcss.com/docs/grid-column\n */\n 'col-start': [{\n 'col-start': scaleGridColRowStartOrEnd()\n }],\n /**\n * Grid Column End\n * @see https://tailwindcss.com/docs/grid-column\n */\n 'col-end': [{\n 'col-end': scaleGridColRowStartOrEnd()\n }],\n /**\n * Grid Template Rows\n * @see https://tailwindcss.com/docs/grid-template-rows\n */\n 'grid-rows': [{\n 'grid-rows': scaleGridTemplateColsRows()\n }],\n /**\n * Grid Row Start / End\n * @see https://tailwindcss.com/docs/grid-row\n */\n 'row-start-end': [{\n row: scaleGridColRowStartAndEnd()\n }],\n /**\n * Grid Row Start\n * @see https://tailwindcss.com/docs/grid-row\n */\n 'row-start': [{\n 'row-start': scaleGridColRowStartOrEnd()\n }],\n /**\n * Grid Row End\n * @see https://tailwindcss.com/docs/grid-row\n */\n 'row-end': [{\n 'row-end': scaleGridColRowStartOrEnd()\n }],\n /**\n * Grid Auto Flow\n * @see https://tailwindcss.com/docs/grid-auto-flow\n */\n 'grid-flow': [{\n 'grid-flow': ['row', 'col', 'dense', 'row-dense', 'col-dense']\n }],\n /**\n * Grid Auto Columns\n * @see https://tailwindcss.com/docs/grid-auto-columns\n */\n 'auto-cols': [{\n 'auto-cols': scaleGridAutoColsRows()\n }],\n /**\n * Grid Auto Rows\n * @see https://tailwindcss.com/docs/grid-auto-rows\n */\n 'auto-rows': [{\n 'auto-rows': scaleGridAutoColsRows()\n }],\n /**\n * Gap\n * @see https://tailwindcss.com/docs/gap\n */\n gap: [{\n gap: scaleUnambiguousSpacing()\n }],\n /**\n * Gap X\n * @see https://tailwindcss.com/docs/gap\n */\n 'gap-x': [{\n 'gap-x': scaleUnambiguousSpacing()\n }],\n /**\n * Gap Y\n * @see https://tailwindcss.com/docs/gap\n */\n 'gap-y': [{\n 'gap-y': scaleUnambiguousSpacing()\n }],\n /**\n * Justify Content\n * @see https://tailwindcss.com/docs/justify-content\n */\n 'justify-content': [{\n justify: [...scaleAlignPrimaryAxis(), 'normal']\n }],\n /**\n * Justify Items\n * @see https://tailwindcss.com/docs/justify-items\n */\n 'justify-items': [{\n 'justify-items': [...scaleAlignSecondaryAxis(), 'normal']\n }],\n /**\n * Justify Self\n * @see https://tailwindcss.com/docs/justify-self\n */\n 'justify-self': [{\n 'justify-self': ['auto', ...scaleAlignSecondaryAxis()]\n }],\n /**\n * Align Content\n * @see https://tailwindcss.com/docs/align-content\n */\n 'align-content': [{\n content: ['normal', ...scaleAlignPrimaryAxis()]\n }],\n /**\n * Align Items\n * @see https://tailwindcss.com/docs/align-items\n */\n 'align-items': [{\n items: [...scaleAlignSecondaryAxis(), {\n baseline: ['', 'last']\n }]\n }],\n /**\n * Align Self\n * @see https://tailwindcss.com/docs/align-self\n */\n 'align-self': [{\n self: ['auto', ...scaleAlignSecondaryAxis(), {\n baseline: ['', 'last']\n }]\n }],\n /**\n * Place Content\n * @see https://tailwindcss.com/docs/place-content\n */\n 'place-content': [{\n 'place-content': scaleAlignPrimaryAxis()\n }],\n /**\n * Place Items\n * @see https://tailwindcss.com/docs/place-items\n */\n 'place-items': [{\n 'place-items': [...scaleAlignSecondaryAxis(), 'baseline']\n }],\n /**\n * Place Self\n * @see https://tailwindcss.com/docs/place-self\n */\n 'place-self': [{\n 'place-self': ['auto', ...scaleAlignSecondaryAxis()]\n }],\n // Spacing\n /**\n * Padding\n * @see https://tailwindcss.com/docs/padding\n */\n p: [{\n p: scaleUnambiguousSpacing()\n }],\n /**\n * Padding X\n * @see https://tailwindcss.com/docs/padding\n */\n px: [{\n px: scaleUnambiguousSpacing()\n }],\n /**\n * Padding Y\n * @see https://tailwindcss.com/docs/padding\n */\n py: [{\n py: scaleUnambiguousSpacing()\n }],\n /**\n * Padding Start\n * @see https://tailwindcss.com/docs/padding\n */\n ps: [{\n ps: scaleUnambiguousSpacing()\n }],\n /**\n * Padding End\n * @see https://tailwindcss.com/docs/padding\n */\n pe: [{\n pe: scaleUnambiguousSpacing()\n }],\n /**\n * Padding Top\n * @see https://tailwindcss.com/docs/padding\n */\n pt: [{\n pt: scaleUnambiguousSpacing()\n }],\n /**\n * Padding Right\n * @see https://tailwindcss.com/docs/padding\n */\n pr: [{\n pr: scaleUnambiguousSpacing()\n }],\n /**\n * Padding Bottom\n * @see https://tailwindcss.com/docs/padding\n */\n pb: [{\n pb: scaleUnambiguousSpacing()\n }],\n /**\n * Padding Left\n * @see https://tailwindcss.com/docs/padding\n */\n pl: [{\n pl: scaleUnambiguousSpacing()\n }],\n /**\n * Margin\n * @see https://tailwindcss.com/docs/margin\n */\n m: [{\n m: scaleMargin()\n }],\n /**\n * Margin X\n * @see https://tailwindcss.com/docs/margin\n */\n mx: [{\n mx: scaleMargin()\n }],\n /**\n * Margin Y\n * @see https://tailwindcss.com/docs/margin\n */\n my: [{\n my: scaleMargin()\n }],\n /**\n * Margin Start\n * @see https://tailwindcss.com/docs/margin\n */\n ms: [{\n ms: scaleMargin()\n }],\n /**\n * Margin End\n * @see https://tailwindcss.com/docs/margin\n */\n me: [{\n me: scaleMargin()\n }],\n /**\n * Margin Top\n * @see https://tailwindcss.com/docs/margin\n */\n mt: [{\n mt: scaleMargin()\n }],\n /**\n * Margin Right\n * @see https://tailwindcss.com/docs/margin\n */\n mr: [{\n mr: scaleMargin()\n }],\n /**\n * Margin Bottom\n * @see https://tailwindcss.com/docs/margin\n */\n mb: [{\n mb: scaleMargin()\n }],\n /**\n * Margin Left\n * @see https://tailwindcss.com/docs/margin\n */\n ml: [{\n ml: scaleMargin()\n }],\n /**\n * Space Between X\n * @see https://tailwindcss.com/docs/margin#adding-space-between-children\n */\n 'space-x': [{\n 'space-x': scaleUnambiguousSpacing()\n }],\n /**\n * Space Between X Reverse\n * @see https://tailwindcss.com/docs/margin#adding-space-between-children\n */\n 'space-x-reverse': ['space-x-reverse'],\n /**\n * Space Between Y\n * @see https://tailwindcss.com/docs/margin#adding-space-between-children\n */\n 'space-y': [{\n 'space-y': scaleUnambiguousSpacing()\n }],\n /**\n * Space Between Y Reverse\n * @see https://tailwindcss.com/docs/margin#adding-space-between-children\n */\n 'space-y-reverse': ['space-y-reverse'],\n // --------------\n // --- Sizing ---\n // --------------\n /**\n * Size\n * @see https://tailwindcss.com/docs/width#setting-both-width-and-height\n */\n size: [{\n size: scaleSizing()\n }],\n /**\n * Width\n * @see https://tailwindcss.com/docs/width\n */\n w: [{\n w: [themeContainer, 'screen', ...scaleSizing()]\n }],\n /**\n * Min-Width\n * @see https://tailwindcss.com/docs/min-width\n */\n 'min-w': [{\n 'min-w': [themeContainer, 'screen', /** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */\n 'none', ...scaleSizing()]\n }],\n /**\n * Max-Width\n * @see https://tailwindcss.com/docs/max-width\n */\n 'max-w': [{\n 'max-w': [themeContainer, 'screen', 'none', /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */\n 'prose', /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */\n {\n screen: [themeBreakpoint]\n }, ...scaleSizing()]\n }],\n /**\n * Height\n * @see https://tailwindcss.com/docs/height\n */\n h: [{\n h: ['screen', 'lh', ...scaleSizing()]\n }],\n /**\n * Min-Height\n * @see https://tailwindcss.com/docs/min-height\n */\n 'min-h': [{\n 'min-h': ['screen', 'lh', 'none', ...scaleSizing()]\n }],\n /**\n * Max-Height\n * @see https://tailwindcss.com/docs/max-height\n */\n 'max-h': [{\n 'max-h': ['screen', 'lh', ...scaleSizing()]\n }],\n // ------------------\n // --- Typography ---\n // ------------------\n /**\n * Font Size\n * @see https://tailwindcss.com/docs/font-size\n */\n 'font-size': [{\n text: ['base', themeText, isArbitraryVariableLength, isArbitraryLength]\n }],\n /**\n * Font Smoothing\n * @see https://tailwindcss.com/docs/font-smoothing\n */\n 'font-smoothing': ['antialiased', 'subpixel-antialiased'],\n /**\n * Font Style\n * @see https://tailwindcss.com/docs/font-style\n */\n 'font-style': ['italic', 'not-italic'],\n /**\n * Font Weight\n * @see https://tailwindcss.com/docs/font-weight\n */\n 'font-weight': [{\n font: [themeFontWeight, isArbitraryVariable, isArbitraryNumber]\n }],\n /**\n * Font Stretch\n * @see https://tailwindcss.com/docs/font-stretch\n */\n 'font-stretch': [{\n 'font-stretch': ['ultra-condensed', 'extra-condensed', 'condensed', 'semi-condensed', 'normal', 'semi-expanded', 'expanded', 'extra-expanded', 'ultra-expanded', isPercent, isArbitraryValue]\n }],\n /**\n * Font Family\n * @see https://tailwindcss.com/docs/font-family\n */\n 'font-family': [{\n font: [isArbitraryVariableFamilyName, isArbitraryValue, themeFont]\n }],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-normal': ['normal-nums'],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-ordinal': ['ordinal'],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-slashed-zero': ['slashed-zero'],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-figure': ['lining-nums', 'oldstyle-nums'],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-spacing': ['proportional-nums', 'tabular-nums'],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-fraction': ['diagonal-fractions', 'stacked-fractions'],\n /**\n * Letter Spacing\n * @see https://tailwindcss.com/docs/letter-spacing\n */\n tracking: [{\n tracking: [themeTracking, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Line Clamp\n * @see https://tailwindcss.com/docs/line-clamp\n */\n 'line-clamp': [{\n 'line-clamp': [isNumber, 'none', isArbitraryVariable, isArbitraryNumber]\n }],\n /**\n * Line Height\n * @see https://tailwindcss.com/docs/line-height\n */\n leading: [{\n leading: [/** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */\n themeLeading, ...scaleUnambiguousSpacing()]\n }],\n /**\n * List Style Image\n * @see https://tailwindcss.com/docs/list-style-image\n */\n 'list-image': [{\n 'list-image': ['none', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * List Style Position\n * @see https://tailwindcss.com/docs/list-style-position\n */\n 'list-style-position': [{\n list: ['inside', 'outside']\n }],\n /**\n * List Style Type\n * @see https://tailwindcss.com/docs/list-style-type\n */\n 'list-style-type': [{\n list: ['disc', 'decimal', 'none', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Text Alignment\n * @see https://tailwindcss.com/docs/text-align\n */\n 'text-alignment': [{\n text: ['left', 'center', 'right', 'justify', 'start', 'end']\n }],\n /**\n * Placeholder Color\n * @deprecated since Tailwind CSS v3.0.0\n * @see https://v3.tailwindcss.com/docs/placeholder-color\n */\n 'placeholder-color': [{\n placeholder: scaleColor()\n }],\n /**\n * Text Color\n * @see https://tailwindcss.com/docs/text-color\n */\n 'text-color': [{\n text: scaleColor()\n }],\n /**\n * Text Decoration\n * @see https://tailwindcss.com/docs/text-decoration\n */\n 'text-decoration': ['underline', 'overline', 'line-through', 'no-underline'],\n /**\n * Text Decoration Style\n * @see https://tailwindcss.com/docs/text-decoration-style\n */\n 'text-decoration-style': [{\n decoration: [...scaleLineStyle(), 'wavy']\n }],\n /**\n * Text Decoration Thickness\n * @see https://tailwindcss.com/docs/text-decoration-thickness\n */\n 'text-decoration-thickness': [{\n decoration: [isNumber, 'from-font', 'auto', isArbitraryVariable, isArbitraryLength]\n }],\n /**\n * Text Decoration Color\n * @see https://tailwindcss.com/docs/text-decoration-color\n */\n 'text-decoration-color': [{\n decoration: scaleColor()\n }],\n /**\n * Text Underline Offset\n * @see https://tailwindcss.com/docs/text-underline-offset\n */\n 'underline-offset': [{\n 'underline-offset': [isNumber, 'auto', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Text Transform\n * @see https://tailwindcss.com/docs/text-transform\n */\n 'text-transform': ['uppercase', 'lowercase', 'capitalize', 'normal-case'],\n /**\n * Text Overflow\n * @see https://tailwindcss.com/docs/text-overflow\n */\n 'text-overflow': ['truncate', 'text-ellipsis', 'text-clip'],\n /**\n * Text Wrap\n * @see https://tailwindcss.com/docs/text-wrap\n */\n 'text-wrap': [{\n text: ['wrap', 'nowrap', 'balance', 'pretty']\n }],\n /**\n * Text Indent\n * @see https://tailwindcss.com/docs/text-indent\n */\n indent: [{\n indent: scaleUnambiguousSpacing()\n }],\n /**\n * Vertical Alignment\n * @see https://tailwindcss.com/docs/vertical-align\n */\n 'vertical-align': [{\n align: ['baseline', 'top', 'middle', 'bottom', 'text-top', 'text-bottom', 'sub', 'super', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Whitespace\n * @see https://tailwindcss.com/docs/whitespace\n */\n whitespace: [{\n whitespace: ['normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap', 'break-spaces']\n }],\n /**\n * Word Break\n * @see https://tailwindcss.com/docs/word-break\n */\n break: [{\n break: ['normal', 'words', 'all', 'keep']\n }],\n /**\n * Overflow Wrap\n * @see https://tailwindcss.com/docs/overflow-wrap\n */\n wrap: [{\n wrap: ['break-word', 'anywhere', 'normal']\n }],\n /**\n * Hyphens\n * @see https://tailwindcss.com/docs/hyphens\n */\n hyphens: [{\n hyphens: ['none', 'manual', 'auto']\n }],\n /**\n * Content\n * @see https://tailwindcss.com/docs/content\n */\n content: [{\n content: ['none', isArbitraryVariable, isArbitraryValue]\n }],\n // -------------------\n // --- Backgrounds ---\n // -------------------\n /**\n * Background Attachment\n * @see https://tailwindcss.com/docs/background-attachment\n */\n 'bg-attachment': [{\n bg: ['fixed', 'local', 'scroll']\n }],\n /**\n * Background Clip\n * @see https://tailwindcss.com/docs/background-clip\n */\n 'bg-clip': [{\n 'bg-clip': ['border', 'padding', 'content', 'text']\n }],\n /**\n * Background Origin\n * @see https://tailwindcss.com/docs/background-origin\n */\n 'bg-origin': [{\n 'bg-origin': ['border', 'padding', 'content']\n }],\n /**\n * Background Position\n * @see https://tailwindcss.com/docs/background-position\n */\n 'bg-position': [{\n bg: scaleBgPosition()\n }],\n /**\n * Background Repeat\n * @see https://tailwindcss.com/docs/background-repeat\n */\n 'bg-repeat': [{\n bg: scaleBgRepeat()\n }],\n /**\n * Background Size\n * @see https://tailwindcss.com/docs/background-size\n */\n 'bg-size': [{\n bg: scaleBgSize()\n }],\n /**\n * Background Image\n * @see https://tailwindcss.com/docs/background-image\n */\n 'bg-image': [{\n bg: ['none', {\n linear: [{\n to: ['t', 'tr', 'r', 'br', 'b', 'bl', 'l', 'tl']\n }, isInteger, isArbitraryVariable, isArbitraryValue],\n radial: ['', isArbitraryVariable, isArbitraryValue],\n conic: [isInteger, isArbitraryVariable, isArbitraryValue]\n }, isArbitraryVariableImage, isArbitraryImage]\n }],\n /**\n * Background Color\n * @see https://tailwindcss.com/docs/background-color\n */\n 'bg-color': [{\n bg: scaleColor()\n }],\n /**\n * Gradient Color Stops From Position\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-from-pos': [{\n from: scaleGradientStopPosition()\n }],\n /**\n * Gradient Color Stops Via Position\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-via-pos': [{\n via: scaleGradientStopPosition()\n }],\n /**\n * Gradient Color Stops To Position\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-to-pos': [{\n to: scaleGradientStopPosition()\n }],\n /**\n * Gradient Color Stops From\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-from': [{\n from: scaleColor()\n }],\n /**\n * Gradient Color Stops Via\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-via': [{\n via: scaleColor()\n }],\n /**\n * Gradient Color Stops To\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-to': [{\n to: scaleColor()\n }],\n // ---------------\n // --- Borders ---\n // ---------------\n /**\n * Border Radius\n * @see https://tailwindcss.com/docs/border-radius\n */\n rounded: [{\n rounded: scaleRadius()\n }],\n /**\n * Border Radius Start\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-s': [{\n 'rounded-s': scaleRadius()\n }],\n /**\n * Border Radius End\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-e': [{\n 'rounded-e': scaleRadius()\n }],\n /**\n * Border Radius Top\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-t': [{\n 'rounded-t': scaleRadius()\n }],\n /**\n * Border Radius Right\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-r': [{\n 'rounded-r': scaleRadius()\n }],\n /**\n * Border Radius Bottom\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-b': [{\n 'rounded-b': scaleRadius()\n }],\n /**\n * Border Radius Left\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-l': [{\n 'rounded-l': scaleRadius()\n }],\n /**\n * Border Radius Start Start\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-ss': [{\n 'rounded-ss': scaleRadius()\n }],\n /**\n * Border Radius Start End\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-se': [{\n 'rounded-se': scaleRadius()\n }],\n /**\n * Border Radius End End\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-ee': [{\n 'rounded-ee': scaleRadius()\n }],\n /**\n * Border Radius End Start\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-es': [{\n 'rounded-es': scaleRadius()\n }],\n /**\n * Border Radius Top Left\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-tl': [{\n 'rounded-tl': scaleRadius()\n }],\n /**\n * Border Radius Top Right\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-tr': [{\n 'rounded-tr': scaleRadius()\n }],\n /**\n * Border Radius Bottom Right\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-br': [{\n 'rounded-br': scaleRadius()\n }],\n /**\n * Border Radius Bottom Left\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-bl': [{\n 'rounded-bl': scaleRadius()\n }],\n /**\n * Border Width\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w': [{\n border: scaleBorderWidth()\n }],\n /**\n * Border Width X\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-x': [{\n 'border-x': scaleBorderWidth()\n }],\n /**\n * Border Width Y\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-y': [{\n 'border-y': scaleBorderWidth()\n }],\n /**\n * Border Width Start\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-s': [{\n 'border-s': scaleBorderWidth()\n }],\n /**\n * Border Width End\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-e': [{\n 'border-e': scaleBorderWidth()\n }],\n /**\n * Border Width Top\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-t': [{\n 'border-t': scaleBorderWidth()\n }],\n /**\n * Border Width Right\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-r': [{\n 'border-r': scaleBorderWidth()\n }],\n /**\n * Border Width Bottom\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-b': [{\n 'border-b': scaleBorderWidth()\n }],\n /**\n * Border Width Left\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-l': [{\n 'border-l': scaleBorderWidth()\n }],\n /**\n * Divide Width X\n * @see https://tailwindcss.com/docs/border-width#between-children\n */\n 'divide-x': [{\n 'divide-x': scaleBorderWidth()\n }],\n /**\n * Divide Width X Reverse\n * @see https://tailwindcss.com/docs/border-width#between-children\n */\n 'divide-x-reverse': ['divide-x-reverse'],\n /**\n * Divide Width Y\n * @see https://tailwindcss.com/docs/border-width#between-children\n */\n 'divide-y': [{\n 'divide-y': scaleBorderWidth()\n }],\n /**\n * Divide Width Y Reverse\n * @see https://tailwindcss.com/docs/border-width#between-children\n */\n 'divide-y-reverse': ['divide-y-reverse'],\n /**\n * Border Style\n * @see https://tailwindcss.com/docs/border-style\n */\n 'border-style': [{\n border: [...scaleLineStyle(), 'hidden', 'none']\n }],\n /**\n * Divide Style\n * @see https://tailwindcss.com/docs/border-style#setting-the-divider-style\n */\n 'divide-style': [{\n divide: [...scaleLineStyle(), 'hidden', 'none']\n }],\n /**\n * Border Color\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color': [{\n border: scaleColor()\n }],\n /**\n * Border Color X\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-x': [{\n 'border-x': scaleColor()\n }],\n /**\n * Border Color Y\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-y': [{\n 'border-y': scaleColor()\n }],\n /**\n * Border Color S\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-s': [{\n 'border-s': scaleColor()\n }],\n /**\n * Border Color E\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-e': [{\n 'border-e': scaleColor()\n }],\n /**\n * Border Color Top\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-t': [{\n 'border-t': scaleColor()\n }],\n /**\n * Border Color Right\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-r': [{\n 'border-r': scaleColor()\n }],\n /**\n * Border Color Bottom\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-b': [{\n 'border-b': scaleColor()\n }],\n /**\n * Border Color Left\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-l': [{\n 'border-l': scaleColor()\n }],\n /**\n * Divide Color\n * @see https://tailwindcss.com/docs/divide-color\n */\n 'divide-color': [{\n divide: scaleColor()\n }],\n /**\n * Outline Style\n * @see https://tailwindcss.com/docs/outline-style\n */\n 'outline-style': [{\n outline: [...scaleLineStyle(), 'none', 'hidden']\n }],\n /**\n * Outline Offset\n * @see https://tailwindcss.com/docs/outline-offset\n */\n 'outline-offset': [{\n 'outline-offset': [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Outline Width\n * @see https://tailwindcss.com/docs/outline-width\n */\n 'outline-w': [{\n outline: ['', isNumber, isArbitraryVariableLength, isArbitraryLength]\n }],\n /**\n * Outline Color\n * @see https://tailwindcss.com/docs/outline-color\n */\n 'outline-color': [{\n outline: scaleColor()\n }],\n // ---------------\n // --- Effects ---\n // ---------------\n /**\n * Box Shadow\n * @see https://tailwindcss.com/docs/box-shadow\n */\n shadow: [{\n shadow: [\n // Deprecated since Tailwind CSS v4.0.0\n '', 'none', themeShadow, isArbitraryVariableShadow, isArbitraryShadow]\n }],\n /**\n * Box Shadow Color\n * @see https://tailwindcss.com/docs/box-shadow#setting-the-shadow-color\n */\n 'shadow-color': [{\n shadow: scaleColor()\n }],\n /**\n * Inset Box Shadow\n * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-shadow\n */\n 'inset-shadow': [{\n 'inset-shadow': ['none', themeInsetShadow, isArbitraryVariableShadow, isArbitraryShadow]\n }],\n /**\n * Inset Box Shadow Color\n * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-shadow-color\n */\n 'inset-shadow-color': [{\n 'inset-shadow': scaleColor()\n }],\n /**\n * Ring Width\n * @see https://tailwindcss.com/docs/box-shadow#adding-a-ring\n */\n 'ring-w': [{\n ring: scaleBorderWidth()\n }],\n /**\n * Ring Width Inset\n * @see https://v3.tailwindcss.com/docs/ring-width#inset-rings\n * @deprecated since Tailwind CSS v4.0.0\n * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158\n */\n 'ring-w-inset': ['ring-inset'],\n /**\n * Ring Color\n * @see https://tailwindcss.com/docs/box-shadow#setting-the-ring-color\n */\n 'ring-color': [{\n ring: scaleColor()\n }],\n /**\n * Ring Offset Width\n * @see https://v3.tailwindcss.com/docs/ring-offset-width\n * @deprecated since Tailwind CSS v4.0.0\n * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158\n */\n 'ring-offset-w': [{\n 'ring-offset': [isNumber, isArbitraryLength]\n }],\n /**\n * Ring Offset Color\n * @see https://v3.tailwindcss.com/docs/ring-offset-color\n * @deprecated since Tailwind CSS v4.0.0\n * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158\n */\n 'ring-offset-color': [{\n 'ring-offset': scaleColor()\n }],\n /**\n * Inset Ring Width\n * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-ring\n */\n 'inset-ring-w': [{\n 'inset-ring': scaleBorderWidth()\n }],\n /**\n * Inset Ring Color\n * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-ring-color\n */\n 'inset-ring-color': [{\n 'inset-ring': scaleColor()\n }],\n /**\n * Text Shadow\n * @see https://tailwindcss.com/docs/text-shadow\n */\n 'text-shadow': [{\n 'text-shadow': ['none', themeTextShadow, isArbitraryVariableShadow, isArbitraryShadow]\n }],\n /**\n * Text Shadow Color\n * @see https://tailwindcss.com/docs/text-shadow#setting-the-shadow-color\n */\n 'text-shadow-color': [{\n 'text-shadow': scaleColor()\n }],\n /**\n * Opacity\n * @see https://tailwindcss.com/docs/opacity\n */\n opacity: [{\n opacity: [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Mix Blend Mode\n * @see https://tailwindcss.com/docs/mix-blend-mode\n */\n 'mix-blend': [{\n 'mix-blend': [...scaleBlendMode(), 'plus-darker', 'plus-lighter']\n }],\n /**\n * Background Blend Mode\n * @see https://tailwindcss.com/docs/background-blend-mode\n */\n 'bg-blend': [{\n 'bg-blend': scaleBlendMode()\n }],\n /**\n * Mask Clip\n * @see https://tailwindcss.com/docs/mask-clip\n */\n 'mask-clip': [{\n 'mask-clip': ['border', 'padding', 'content', 'fill', 'stroke', 'view']\n }, 'mask-no-clip'],\n /**\n * Mask Composite\n * @see https://tailwindcss.com/docs/mask-composite\n */\n 'mask-composite': [{\n mask: ['add', 'subtract', 'intersect', 'exclude']\n }],\n /**\n * Mask Image\n * @see https://tailwindcss.com/docs/mask-image\n */\n 'mask-image-linear-pos': [{\n 'mask-linear': [isNumber]\n }],\n 'mask-image-linear-from-pos': [{\n 'mask-linear-from': scaleMaskImagePosition()\n }],\n 'mask-image-linear-to-pos': [{\n 'mask-linear-to': scaleMaskImagePosition()\n }],\n 'mask-image-linear-from-color': [{\n 'mask-linear-from': scaleColor()\n }],\n 'mask-image-linear-to-color': [{\n 'mask-linear-to': scaleColor()\n }],\n 'mask-image-t-from-pos': [{\n 'mask-t-from': scaleMaskImagePosition()\n }],\n 'mask-image-t-to-pos': [{\n 'mask-t-to': scaleMaskImagePosition()\n }],\n 'mask-image-t-from-color': [{\n 'mask-t-from': scaleColor()\n }],\n 'mask-image-t-to-color': [{\n 'mask-t-to': scaleColor()\n }],\n 'mask-image-r-from-pos': [{\n 'mask-r-from': scaleMaskImagePosition()\n }],\n 'mask-image-r-to-pos': [{\n 'mask-r-to': scaleMaskImagePosition()\n }],\n 'mask-image-r-from-color': [{\n 'mask-r-from': scaleColor()\n }],\n 'mask-image-r-to-color': [{\n 'mask-r-to': scaleColor()\n }],\n 'mask-image-b-from-pos': [{\n 'mask-b-from': scaleMaskImagePosition()\n }],\n 'mask-image-b-to-pos': [{\n 'mask-b-to': scaleMaskImagePosition()\n }],\n 'mask-image-b-from-color': [{\n 'mask-b-from': scaleColor()\n }],\n 'mask-image-b-to-color': [{\n 'mask-b-to': scaleColor()\n }],\n 'mask-image-l-from-pos': [{\n 'mask-l-from': scaleMaskImagePosition()\n }],\n 'mask-image-l-to-pos': [{\n 'mask-l-to': scaleMaskImagePosition()\n }],\n 'mask-image-l-from-color': [{\n 'mask-l-from': scaleColor()\n }],\n 'mask-image-l-to-color': [{\n 'mask-l-to': scaleColor()\n }],\n 'mask-image-x-from-pos': [{\n 'mask-x-from': scaleMaskImagePosition()\n }],\n 'mask-image-x-to-pos': [{\n 'mask-x-to': scaleMaskImagePosition()\n }],\n 'mask-image-x-from-color': [{\n 'mask-x-from': scaleColor()\n }],\n 'mask-image-x-to-color': [{\n 'mask-x-to': scaleColor()\n }],\n 'mask-image-y-from-pos': [{\n 'mask-y-from': scaleMaskImagePosition()\n }],\n 'mask-image-y-to-pos': [{\n 'mask-y-to': scaleMaskImagePosition()\n }],\n 'mask-image-y-from-color': [{\n 'mask-y-from': scaleColor()\n }],\n 'mask-image-y-to-color': [{\n 'mask-y-to': scaleColor()\n }],\n 'mask-image-radial': [{\n 'mask-radial': [isArbitraryVariable, isArbitraryValue]\n }],\n 'mask-image-radial-from-pos': [{\n 'mask-radial-from': scaleMaskImagePosition()\n }],\n 'mask-image-radial-to-pos': [{\n 'mask-radial-to': scaleMaskImagePosition()\n }],\n 'mask-image-radial-from-color': [{\n 'mask-radial-from': scaleColor()\n }],\n 'mask-image-radial-to-color': [{\n 'mask-radial-to': scaleColor()\n }],\n 'mask-image-radial-shape': [{\n 'mask-radial': ['circle', 'ellipse']\n }],\n 'mask-image-radial-size': [{\n 'mask-radial': [{\n closest: ['side', 'corner'],\n farthest: ['side', 'corner']\n }]\n }],\n 'mask-image-radial-pos': [{\n 'mask-radial-at': scalePosition()\n }],\n 'mask-image-conic-pos': [{\n 'mask-conic': [isNumber]\n }],\n 'mask-image-conic-from-pos': [{\n 'mask-conic-from': scaleMaskImagePosition()\n }],\n 'mask-image-conic-to-pos': [{\n 'mask-conic-to': scaleMaskImagePosition()\n }],\n 'mask-image-conic-from-color': [{\n 'mask-conic-from': scaleColor()\n }],\n 'mask-image-conic-to-color': [{\n 'mask-conic-to': scaleColor()\n }],\n /**\n * Mask Mode\n * @see https://tailwindcss.com/docs/mask-mode\n */\n 'mask-mode': [{\n mask: ['alpha', 'luminance', 'match']\n }],\n /**\n * Mask Origin\n * @see https://tailwindcss.com/docs/mask-origin\n */\n 'mask-origin': [{\n 'mask-origin': ['border', 'padding', 'content', 'fill', 'stroke', 'view']\n }],\n /**\n * Mask Position\n * @see https://tailwindcss.com/docs/mask-position\n */\n 'mask-position': [{\n mask: scaleBgPosition()\n }],\n /**\n * Mask Repeat\n * @see https://tailwindcss.com/docs/mask-repeat\n */\n 'mask-repeat': [{\n mask: scaleBgRepeat()\n }],\n /**\n * Mask Size\n * @see https://tailwindcss.com/docs/mask-size\n */\n 'mask-size': [{\n mask: scaleBgSize()\n }],\n /**\n * Mask Type\n * @see https://tailwindcss.com/docs/mask-type\n */\n 'mask-type': [{\n 'mask-type': ['alpha', 'luminance']\n }],\n /**\n * Mask Image\n * @see https://tailwindcss.com/docs/mask-image\n */\n 'mask-image': [{\n mask: ['none', isArbitraryVariable, isArbitraryValue]\n }],\n // ---------------\n // --- Filters ---\n // ---------------\n /**\n * Filter\n * @see https://tailwindcss.com/docs/filter\n */\n filter: [{\n filter: [\n // Deprecated since Tailwind CSS v3.0.0\n '', 'none', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Blur\n * @see https://tailwindcss.com/docs/blur\n */\n blur: [{\n blur: scaleBlur()\n }],\n /**\n * Brightness\n * @see https://tailwindcss.com/docs/brightness\n */\n brightness: [{\n brightness: [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Contrast\n * @see https://tailwindcss.com/docs/contrast\n */\n contrast: [{\n contrast: [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Drop Shadow\n * @see https://tailwindcss.com/docs/drop-shadow\n */\n 'drop-shadow': [{\n 'drop-shadow': [\n // Deprecated since Tailwind CSS v4.0.0\n '', 'none', themeDropShadow, isArbitraryVariableShadow, isArbitraryShadow]\n }],\n /**\n * Drop Shadow Color\n * @see https://tailwindcss.com/docs/filter-drop-shadow#setting-the-shadow-color\n */\n 'drop-shadow-color': [{\n 'drop-shadow': scaleColor()\n }],\n /**\n * Grayscale\n * @see https://tailwindcss.com/docs/grayscale\n */\n grayscale: [{\n grayscale: ['', isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Hue Rotate\n * @see https://tailwindcss.com/docs/hue-rotate\n */\n 'hue-rotate': [{\n 'hue-rotate': [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Invert\n * @see https://tailwindcss.com/docs/invert\n */\n invert: [{\n invert: ['', isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Saturate\n * @see https://tailwindcss.com/docs/saturate\n */\n saturate: [{\n saturate: [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Sepia\n * @see https://tailwindcss.com/docs/sepia\n */\n sepia: [{\n sepia: ['', isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Filter\n * @see https://tailwindcss.com/docs/backdrop-filter\n */\n 'backdrop-filter': [{\n 'backdrop-filter': [\n // Deprecated since Tailwind CSS v3.0.0\n '', 'none', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Blur\n * @see https://tailwindcss.com/docs/backdrop-blur\n */\n 'backdrop-blur': [{\n 'backdrop-blur': scaleBlur()\n }],\n /**\n * Backdrop Brightness\n * @see https://tailwindcss.com/docs/backdrop-brightness\n */\n 'backdrop-brightness': [{\n 'backdrop-brightness': [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Contrast\n * @see https://tailwindcss.com/docs/backdrop-contrast\n */\n 'backdrop-contrast': [{\n 'backdrop-contrast': [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Grayscale\n * @see https://tailwindcss.com/docs/backdrop-grayscale\n */\n 'backdrop-grayscale': [{\n 'backdrop-grayscale': ['', isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Hue Rotate\n * @see https://tailwindcss.com/docs/backdrop-hue-rotate\n */\n 'backdrop-hue-rotate': [{\n 'backdrop-hue-rotate': [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Invert\n * @see https://tailwindcss.com/docs/backdrop-invert\n */\n 'backdrop-invert': [{\n 'backdrop-invert': ['', isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Opacity\n * @see https://tailwindcss.com/docs/backdrop-opacity\n */\n 'backdrop-opacity': [{\n 'backdrop-opacity': [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Saturate\n * @see https://tailwindcss.com/docs/backdrop-saturate\n */\n 'backdrop-saturate': [{\n 'backdrop-saturate': [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Sepia\n * @see https://tailwindcss.com/docs/backdrop-sepia\n */\n 'backdrop-sepia': [{\n 'backdrop-sepia': ['', isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n // --------------\n // --- Tables ---\n // --------------\n /**\n * Border Collapse\n * @see https://tailwindcss.com/docs/border-collapse\n */\n 'border-collapse': [{\n border: ['collapse', 'separate']\n }],\n /**\n * Border Spacing\n * @see https://tailwindcss.com/docs/border-spacing\n */\n 'border-spacing': [{\n 'border-spacing': scaleUnambiguousSpacing()\n }],\n /**\n * Border Spacing X\n * @see https://tailwindcss.com/docs/border-spacing\n */\n 'border-spacing-x': [{\n 'border-spacing-x': scaleUnambiguousSpacing()\n }],\n /**\n * Border Spacing Y\n * @see https://tailwindcss.com/docs/border-spacing\n */\n 'border-spacing-y': [{\n 'border-spacing-y': scaleUnambiguousSpacing()\n }],\n /**\n * Table Layout\n * @see https://tailwindcss.com/docs/table-layout\n */\n 'table-layout': [{\n table: ['auto', 'fixed']\n }],\n /**\n * Caption Side\n * @see https://tailwindcss.com/docs/caption-side\n */\n caption: [{\n caption: ['top', 'bottom']\n }],\n // ---------------------------------\n // --- Transitions and Animation ---\n // ---------------------------------\n /**\n * Transition Property\n * @see https://tailwindcss.com/docs/transition-property\n */\n transition: [{\n transition: ['', 'all', 'colors', 'opacity', 'shadow', 'transform', 'none', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Transition Behavior\n * @see https://tailwindcss.com/docs/transition-behavior\n */\n 'transition-behavior': [{\n transition: ['normal', 'discrete']\n }],\n /**\n * Transition Duration\n * @see https://tailwindcss.com/docs/transition-duration\n */\n duration: [{\n duration: [isNumber, 'initial', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Transition Timing Function\n * @see https://tailwindcss.com/docs/transition-timing-function\n */\n ease: [{\n ease: ['linear', 'initial', themeEase, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Transition Delay\n * @see https://tailwindcss.com/docs/transition-delay\n */\n delay: [{\n delay: [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Animation\n * @see https://tailwindcss.com/docs/animation\n */\n animate: [{\n animate: ['none', themeAnimate, isArbitraryVariable, isArbitraryValue]\n }],\n // ------------------\n // --- Transforms ---\n // ------------------\n /**\n * Backface Visibility\n * @see https://tailwindcss.com/docs/backface-visibility\n */\n backface: [{\n backface: ['hidden', 'visible']\n }],\n /**\n * Perspective\n * @see https://tailwindcss.com/docs/perspective\n */\n perspective: [{\n perspective: [themePerspective, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Perspective Origin\n * @see https://tailwindcss.com/docs/perspective-origin\n */\n 'perspective-origin': [{\n 'perspective-origin': scalePositionWithArbitrary()\n }],\n /**\n * Rotate\n * @see https://tailwindcss.com/docs/rotate\n */\n rotate: [{\n rotate: scaleRotate()\n }],\n /**\n * Rotate X\n * @see https://tailwindcss.com/docs/rotate\n */\n 'rotate-x': [{\n 'rotate-x': scaleRotate()\n }],\n /**\n * Rotate Y\n * @see https://tailwindcss.com/docs/rotate\n */\n 'rotate-y': [{\n 'rotate-y': scaleRotate()\n }],\n /**\n * Rotate Z\n * @see https://tailwindcss.com/docs/rotate\n */\n 'rotate-z': [{\n 'rotate-z': scaleRotate()\n }],\n /**\n * Scale\n * @see https://tailwindcss.com/docs/scale\n */\n scale: [{\n scale: scaleScale()\n }],\n /**\n * Scale X\n * @see https://tailwindcss.com/docs/scale\n */\n 'scale-x': [{\n 'scale-x': scaleScale()\n }],\n /**\n * Scale Y\n * @see https://tailwindcss.com/docs/scale\n */\n 'scale-y': [{\n 'scale-y': scaleScale()\n }],\n /**\n * Scale Z\n * @see https://tailwindcss.com/docs/scale\n */\n 'scale-z': [{\n 'scale-z': scaleScale()\n }],\n /**\n * Scale 3D\n * @see https://tailwindcss.com/docs/scale\n */\n 'scale-3d': ['scale-3d'],\n /**\n * Skew\n * @see https://tailwindcss.com/docs/skew\n */\n skew: [{\n skew: scaleSkew()\n }],\n /**\n * Skew X\n * @see https://tailwindcss.com/docs/skew\n */\n 'skew-x': [{\n 'skew-x': scaleSkew()\n }],\n /**\n * Skew Y\n * @see https://tailwindcss.com/docs/skew\n */\n 'skew-y': [{\n 'skew-y': scaleSkew()\n }],\n /**\n * Transform\n * @see https://tailwindcss.com/docs/transform\n */\n transform: [{\n transform: [isArbitraryVariable, isArbitraryValue, '', 'none', 'gpu', 'cpu']\n }],\n /**\n * Transform Origin\n * @see https://tailwindcss.com/docs/transform-origin\n */\n 'transform-origin': [{\n origin: scalePositionWithArbitrary()\n }],\n /**\n * Transform Style\n * @see https://tailwindcss.com/docs/transform-style\n */\n 'transform-style': [{\n transform: ['3d', 'flat']\n }],\n /**\n * Translate\n * @see https://tailwindcss.com/docs/translate\n */\n translate: [{\n translate: scaleTranslate()\n }],\n /**\n * Translate X\n * @see https://tailwindcss.com/docs/translate\n */\n 'translate-x': [{\n 'translate-x': scaleTranslate()\n }],\n /**\n * Translate Y\n * @see https://tailwindcss.com/docs/translate\n */\n 'translate-y': [{\n 'translate-y': scaleTranslate()\n }],\n /**\n * Translate Z\n * @see https://tailwindcss.com/docs/translate\n */\n 'translate-z': [{\n 'translate-z': scaleTranslate()\n }],\n /**\n * Translate None\n * @see https://tailwindcss.com/docs/translate\n */\n 'translate-none': ['translate-none'],\n // ---------------------\n // --- Interactivity ---\n // ---------------------\n /**\n * Accent Color\n * @see https://tailwindcss.com/docs/accent-color\n */\n accent: [{\n accent: scaleColor()\n }],\n /**\n * Appearance\n * @see https://tailwindcss.com/docs/appearance\n */\n appearance: [{\n appearance: ['none', 'auto']\n }],\n /**\n * Caret Color\n * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities\n */\n 'caret-color': [{\n caret: scaleColor()\n }],\n /**\n * Color Scheme\n * @see https://tailwindcss.com/docs/color-scheme\n */\n 'color-scheme': [{\n scheme: ['normal', 'dark', 'light', 'light-dark', 'only-dark', 'only-light']\n }],\n /**\n * Cursor\n * @see https://tailwindcss.com/docs/cursor\n */\n cursor: [{\n cursor: ['auto', 'default', 'pointer', 'wait', 'text', 'move', 'help', 'not-allowed', 'none', 'context-menu', 'progress', 'cell', 'crosshair', 'vertical-text', 'alias', 'copy', 'no-drop', 'grab', 'grabbing', 'all-scroll', 'col-resize', 'row-resize', 'n-resize', 'e-resize', 's-resize', 'w-resize', 'ne-resize', 'nw-resize', 'se-resize', 'sw-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 'zoom-in', 'zoom-out', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Field Sizing\n * @see https://tailwindcss.com/docs/field-sizing\n */\n 'field-sizing': [{\n 'field-sizing': ['fixed', 'content']\n }],\n /**\n * Pointer Events\n * @see https://tailwindcss.com/docs/pointer-events\n */\n 'pointer-events': [{\n 'pointer-events': ['auto', 'none']\n }],\n /**\n * Resize\n * @see https://tailwindcss.com/docs/resize\n */\n resize: [{\n resize: ['none', '', 'y', 'x']\n }],\n /**\n * Scroll Behavior\n * @see https://tailwindcss.com/docs/scroll-behavior\n */\n 'scroll-behavior': [{\n scroll: ['auto', 'smooth']\n }],\n /**\n * Scroll Margin\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-m': [{\n 'scroll-m': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin X\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-mx': [{\n 'scroll-mx': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin Y\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-my': [{\n 'scroll-my': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin Start\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-ms': [{\n 'scroll-ms': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin End\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-me': [{\n 'scroll-me': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin Top\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-mt': [{\n 'scroll-mt': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin Right\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-mr': [{\n 'scroll-mr': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin Bottom\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-mb': [{\n 'scroll-mb': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin Left\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-ml': [{\n 'scroll-ml': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-p': [{\n 'scroll-p': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding X\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-px': [{\n 'scroll-px': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding Y\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-py': [{\n 'scroll-py': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding Start\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-ps': [{\n 'scroll-ps': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding End\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pe': [{\n 'scroll-pe': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding Top\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pt': [{\n 'scroll-pt': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding Right\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pr': [{\n 'scroll-pr': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding Bottom\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pb': [{\n 'scroll-pb': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding Left\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pl': [{\n 'scroll-pl': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Snap Align\n * @see https://tailwindcss.com/docs/scroll-snap-align\n */\n 'snap-align': [{\n snap: ['start', 'end', 'center', 'align-none']\n }],\n /**\n * Scroll Snap Stop\n * @see https://tailwindcss.com/docs/scroll-snap-stop\n */\n 'snap-stop': [{\n snap: ['normal', 'always']\n }],\n /**\n * Scroll Snap Type\n * @see https://tailwindcss.com/docs/scroll-snap-type\n */\n 'snap-type': [{\n snap: ['none', 'x', 'y', 'both']\n }],\n /**\n * Scroll Snap Type Strictness\n * @see https://tailwindcss.com/docs/scroll-snap-type\n */\n 'snap-strictness': [{\n snap: ['mandatory', 'proximity']\n }],\n /**\n * Touch Action\n * @see https://tailwindcss.com/docs/touch-action\n */\n touch: [{\n touch: ['auto', 'none', 'manipulation']\n }],\n /**\n * Touch Action X\n * @see https://tailwindcss.com/docs/touch-action\n */\n 'touch-x': [{\n 'touch-pan': ['x', 'left', 'right']\n }],\n /**\n * Touch Action Y\n * @see https://tailwindcss.com/docs/touch-action\n */\n 'touch-y': [{\n 'touch-pan': ['y', 'up', 'down']\n }],\n /**\n * Touch Action Pinch Zoom\n * @see https://tailwindcss.com/docs/touch-action\n */\n 'touch-pz': ['touch-pinch-zoom'],\n /**\n * User Select\n * @see https://tailwindcss.com/docs/user-select\n */\n select: [{\n select: ['none', 'text', 'all', 'auto']\n }],\n /**\n * Will Change\n * @see https://tailwindcss.com/docs/will-change\n */\n 'will-change': [{\n 'will-change': ['auto', 'scroll', 'contents', 'transform', isArbitraryVariable, isArbitraryValue]\n }],\n // -----------\n // --- SVG ---\n // -----------\n /**\n * Fill\n * @see https://tailwindcss.com/docs/fill\n */\n fill: [{\n fill: ['none', ...scaleColor()]\n }],\n /**\n * Stroke Width\n * @see https://tailwindcss.com/docs/stroke-width\n */\n 'stroke-w': [{\n stroke: [isNumber, isArbitraryVariableLength, isArbitraryLength, isArbitraryNumber]\n }],\n /**\n * Stroke\n * @see https://tailwindcss.com/docs/stroke\n */\n stroke: [{\n stroke: ['none', ...scaleColor()]\n }],\n // ---------------------\n // --- Accessibility ---\n // ---------------------\n /**\n * Forced Color Adjust\n * @see https://tailwindcss.com/docs/forced-color-adjust\n */\n 'forced-color-adjust': [{\n 'forced-color-adjust': ['auto', 'none']\n }]\n },\n conflictingClassGroups: {\n overflow: ['overflow-x', 'overflow-y'],\n overscroll: ['overscroll-x', 'overscroll-y'],\n inset: ['inset-x', 'inset-y', 'start', 'end', 'top', 'right', 'bottom', 'left'],\n 'inset-x': ['right', 'left'],\n 'inset-y': ['top', 'bottom'],\n flex: ['basis', 'grow', 'shrink'],\n gap: ['gap-x', 'gap-y'],\n p: ['px', 'py', 'ps', 'pe', 'pt', 'pr', 'pb', 'pl'],\n px: ['pr', 'pl'],\n py: ['pt', 'pb'],\n m: ['mx', 'my', 'ms', 'me', 'mt', 'mr', 'mb', 'ml'],\n mx: ['mr', 'ml'],\n my: ['mt', 'mb'],\n size: ['w', 'h'],\n 'font-size': ['leading'],\n 'fvn-normal': ['fvn-ordinal', 'fvn-slashed-zero', 'fvn-figure', 'fvn-spacing', 'fvn-fraction'],\n 'fvn-ordinal': ['fvn-normal'],\n 'fvn-slashed-zero': ['fvn-normal'],\n 'fvn-figure': ['fvn-normal'],\n 'fvn-spacing': ['fvn-normal'],\n 'fvn-fraction': ['fvn-normal'],\n 'line-clamp': ['display', 'overflow'],\n rounded: ['rounded-s', 'rounded-e', 'rounded-t', 'rounded-r', 'rounded-b', 'rounded-l', 'rounded-ss', 'rounded-se', 'rounded-ee', 'rounded-es', 'rounded-tl', 'rounded-tr', 'rounded-br', 'rounded-bl'],\n 'rounded-s': ['rounded-ss', 'rounded-es'],\n 'rounded-e': ['rounded-se', 'rounded-ee'],\n 'rounded-t': ['rounded-tl', 'rounded-tr'],\n 'rounded-r': ['rounded-tr', 'rounded-br'],\n 'rounded-b': ['rounded-br', 'rounded-bl'],\n 'rounded-l': ['rounded-tl', 'rounded-bl'],\n 'border-spacing': ['border-spacing-x', 'border-spacing-y'],\n 'border-w': ['border-w-x', 'border-w-y', 'border-w-s', 'border-w-e', 'border-w-t', 'border-w-r', 'border-w-b', 'border-w-l'],\n 'border-w-x': ['border-w-r', 'border-w-l'],\n 'border-w-y': ['border-w-t', 'border-w-b'],\n 'border-color': ['border-color-x', 'border-color-y', 'border-color-s', 'border-color-e', 'border-color-t', 'border-color-r', 'border-color-b', 'border-color-l'],\n 'border-color-x': ['border-color-r', 'border-color-l'],\n 'border-color-y': ['border-color-t', 'border-color-b'],\n translate: ['translate-x', 'translate-y', 'translate-none'],\n 'translate-none': ['translate', 'translate-x', 'translate-y', 'translate-z'],\n 'scroll-m': ['scroll-mx', 'scroll-my', 'scroll-ms', 'scroll-me', 'scroll-mt', 'scroll-mr', 'scroll-mb', 'scroll-ml'],\n 'scroll-mx': ['scroll-mr', 'scroll-ml'],\n 'scroll-my': ['scroll-mt', 'scroll-mb'],\n 'scroll-p': ['scroll-px', 'scroll-py', 'scroll-ps', 'scroll-pe', 'scroll-pt', 'scroll-pr', 'scroll-pb', 'scroll-pl'],\n 'scroll-px': ['scroll-pr', 'scroll-pl'],\n 'scroll-py': ['scroll-pt', 'scroll-pb'],\n touch: ['touch-x', 'touch-y', 'touch-pz'],\n 'touch-x': ['touch'],\n 'touch-y': ['touch'],\n 'touch-pz': ['touch']\n },\n conflictingClassGroupModifiers: {\n 'font-size': ['leading']\n },\n orderSensitiveModifiers: ['*', '**', 'after', 'backdrop', 'before', 'details-content', 'file', 'first-letter', 'first-line', 'marker', 'placeholder', 'selection']\n };\n};\n\n/**\n * @param baseConfig Config where other config will be merged into. This object will be mutated.\n * @param configExtension Partial config to merge into the `baseConfig`.\n */\nconst mergeConfigs = (baseConfig, {\n cacheSize,\n prefix,\n experimentalParseClassName,\n extend = {},\n override = {}\n}) => {\n overrideProperty(baseConfig, 'cacheSize', cacheSize);\n overrideProperty(baseConfig, 'prefix', prefix);\n overrideProperty(baseConfig, 'experimentalParseClassName', experimentalParseClassName);\n overrideConfigProperties(baseConfig.theme, override.theme);\n overrideConfigProperties(baseConfig.classGroups, override.classGroups);\n overrideConfigProperties(baseConfig.conflictingClassGroups, override.conflictingClassGroups);\n overrideConfigProperties(baseConfig.conflictingClassGroupModifiers, override.conflictingClassGroupModifiers);\n overrideProperty(baseConfig, 'orderSensitiveModifiers', override.orderSensitiveModifiers);\n mergeConfigProperties(baseConfig.theme, extend.theme);\n mergeConfigProperties(baseConfig.classGroups, extend.classGroups);\n mergeConfigProperties(baseConfig.conflictingClassGroups, extend.conflictingClassGroups);\n mergeConfigProperties(baseConfig.conflictingClassGroupModifiers, extend.conflictingClassGroupModifiers);\n mergeArrayProperties(baseConfig, extend, 'orderSensitiveModifiers');\n return baseConfig;\n};\nconst overrideProperty = (baseObject, overrideKey, overrideValue) => {\n if (overrideValue !== undefined) {\n baseObject[overrideKey] = overrideValue;\n }\n};\nconst overrideConfigProperties = (baseObject, overrideObject) => {\n if (overrideObject) {\n for (const key in overrideObject) {\n overrideProperty(baseObject, key, overrideObject[key]);\n }\n }\n};\nconst mergeConfigProperties = (baseObject, mergeObject) => {\n if (mergeObject) {\n for (const key in mergeObject) {\n mergeArrayProperties(baseObject, mergeObject, key);\n }\n }\n};\nconst mergeArrayProperties = (baseObject, mergeObject, key) => {\n const mergeValue = mergeObject[key];\n if (mergeValue !== undefined) {\n baseObject[key] = baseObject[key] ? baseObject[key].concat(mergeValue) : mergeValue;\n }\n};\nconst extendTailwindMerge = (configExtension, ...createConfig) => typeof configExtension === 'function' ? createTailwindMerge(getDefaultConfig, configExtension, ...createConfig) : createTailwindMerge(() => mergeConfigs(getDefaultConfig(), configExtension), ...createConfig);\nconst twMerge = /*#__PURE__*/createTailwindMerge(getDefaultConfig);\nexport { createTailwindMerge, extendTailwindMerge, fromTheme, getDefaultConfig, mergeConfigs, twJoin, twMerge, validators };\n//# sourceMappingURL=bundle-mjs.mjs.map\n","import { type ClassValue, clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\n","/**\n * Copyright 2022 Joe Bell. All rights reserved.\n *\n * This file is licensed to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with the\n * License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or implied. See the\n * License for the specific language governing permissions and limitations under\n * the License.\n */ import { clsx } from \"clsx\";\nconst falsyToString = (value)=>typeof value === \"boolean\" ? `${value}` : value === 0 ? \"0\" : value;\nexport const cx = clsx;\nexport const cva = (base, config)=>(props)=>{\n var _config_compoundVariants;\n if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);\n const { variants, defaultVariants } = config;\n const getVariantClassNames = Object.keys(variants).map((variant)=>{\n const variantProp = props === null || props === void 0 ? void 0 : props[variant];\n const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];\n if (variantProp === null) return null;\n const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);\n return variants[variant][variantKey];\n });\n const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param)=>{\n let [key, value] = param;\n if (value === undefined) {\n return acc;\n }\n acc[key] = value;\n return acc;\n }, {});\n const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param)=>{\n let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;\n return Object.entries(compoundVariantOptions).every((param)=>{\n let [key, value] = param;\n return Array.isArray(value) ? value.includes({\n ...defaultVariants,\n ...propsWithoutUndefined\n }[key]) : ({\n ...defaultVariants,\n ...propsWithoutUndefined\n })[key] === value;\n }) ? [\n ...acc,\n cvClass,\n cvClassName\n ] : acc;\n }, []);\n return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);\n };\n\n","import { cva } from 'class-variance-authority';\n\nexport const avatarContainerStyles = cva(\n 'relative inline-flex items-center justify-center shrink-0 overflow-hidden',\n {\n variants: {\n shape: {\n circular: 'rounded-full',\n square: '',\n },\n size: {\n small: 'size-[16px]',\n md: 'size-[24px]',\n big: 'size-[32px]',\n },\n },\n compoundVariants: [\n {\n shape: 'square',\n size: 'small',\n className: 'rounded-[4px]',\n },\n {\n shape: 'square',\n size: 'md',\n className: 'rounded-[6px]',\n },\n {\n shape: 'square',\n size: 'big',\n className: 'rounded-[8px]',\n },\n ],\n defaultVariants: {\n shape: 'circular',\n size: 'small',\n },\n }\n);\n\nexport const avatarTextStyles = cva(\n 'font-[\"Geist\",system-ui,sans-serif] font-normal text-center text-[var(--color-blue-800)]',\n {\n variants: {\n size: {\n small: 'text-[8px] leading-[16px]',\n md: 'text-[12px] leading-[20px]',\n big: 'text-[16px] leading-[24px]',\n },\n },\n defaultVariants: {\n size: 'small',\n },\n }\n);\n\nexport const avatarImageStyles = cva('absolute inset-0 w-full h-full object-cover');\n\n","// React\nimport { HTMLAttributes, forwardRef, useState, useMemo } from 'react';\n\n// Styles\nimport { cn } from '@/utils/cn';\nimport {\n avatarContainerStyles,\n avatarTextStyles,\n avatarImageStyles,\n} from './Avatar.styles';\n\nexport interface AvatarProps extends HTMLAttributes<HTMLDivElement> {\n /** The type of avatar to display */\n type?: 'text' | 'image';\n /** The shape of the avatar */\n shape?: 'circular' | 'square';\n /** The size of the avatar */\n size?: 'small' | 'md' | 'big';\n /** The initials to display when type is 'text' */\n initials?: string;\n /** The image source URL when type is 'image' */\n src?: string;\n /** Alt text for the image */\n alt?: string;\n /** Fallback initials to show when image fails to load */\n fallbackInitials?: string;\n}\n\n/**\n * Generates initials from a name string\n * Takes the first letter of the first two words\n */\nconst generateInitials = (name: string): string => {\n const words = name.trim().split(/\\s+/);\n if (words.length >= 2) {\n return (words[0][0] + words[1][0]).toUpperCase();\n }\n return name.slice(0, 2).toUpperCase();\n};\n\n/**\n * Generates a random placeholder image URL from picsum.photos\n */\nconst getPlaceholderImage = (seed: number, size: number): string => {\n return `https://picsum.photos/seed/${seed}/${size}/${size}`;\n};\n\nexport const Avatar = forwardRef<HTMLDivElement, AvatarProps>(\n (\n {\n className,\n type = 'text',\n shape = 'circular',\n size = 'small',\n initials = 'AR',\n src,\n alt = 'Avatar',\n fallbackInitials,\n ...props\n },\n ref\n ) => {\n const [imageError, setImageError] = useState(false);\n\n // Generate a stable random seed for placeholder images\n const placeholderSeed = useMemo(() => Math.floor(Math.random() * 1000), []);\n const imageSize = size === 'big' ? 64 : size === 'md' ? 48 : 32; // Use larger size for better quality\n\n // Determine the image source\n const imageSrc = src || getPlaceholderImage(placeholderSeed, imageSize);\n\n // Determine what to display\n const displayInitials = imageError && fallbackInitials\n ? fallbackInitials\n : initials;\n const shouldShowImage = type === 'image' && !imageError;\n\n const handleImageError = () => {\n setImageError(true);\n };\n\n // Background style for text variant (light blue gradient)\n const textBackgroundStyle = {\n backgroundImage:\n 'linear-gradient(90deg, rgba(21, 177, 205, 0.08) 0%, rgba(21, 177, 205, 0.08) 100%), linear-gradient(90deg, rgb(255, 255, 255) 0%, rgb(255, 255, 255) 100%)',\n };\n\n return (\n <div\n ref={ref}\n className={cn(avatarContainerStyles({ shape, size }), className)}\n style={!shouldShowImage ? textBackgroundStyle : undefined}\n role=\"img\"\n aria-label={alt}\n {...props}\n >\n {shouldShowImage ? (\n <img\n src={imageSrc}\n alt={alt}\n className={cn(avatarImageStyles())}\n onError={handleImageError}\n />\n ) : (\n <span className={cn(avatarTextStyles({ size }))}>\n {generateInitials(displayInitials)}\n </span>\n )}\n </div>\n );\n }\n);\n\nAvatar.displayName = 'Avatar';\n\n","import { cva } from 'class-variance-authority';\n\nexport const statusIndicatorContainerStyles = cva(\n 'relative inline-flex items-center justify-center shrink-0',\n {\n variants: {\n size: {\n small: 'w-2 h-2',\n medium: 'w-3 h-3',\n large: 'w-4 h-4',\n },\n },\n defaultVariants: {\n size: 'medium',\n },\n }\n);\n\nexport const statusIndicatorDotStyles = cva(\n 'w-full h-full rounded-full',\n {\n variants: {\n variant: {\n success: 'bg-[var(--color-green-1000)]',\n warning: 'bg-[var(--color-orange-800)]',\n error: 'bg-[var(--color-red-1000)]',\n info: 'bg-[var(--color-blue-800)]',\n neutral: 'bg-[var(--color-gray-600)]',\n },\n },\n defaultVariants: {\n variant: 'neutral',\n },\n }\n);\n\nexport const statusIndicatorPingStyles = cva(\n 'absolute w-full h-full rounded-full opacity-75 animate-ping',\n {\n variants: {\n variant: {\n success: 'bg-[var(--color-green-1000)]',\n warning: 'bg-[var(--color-orange-800)]',\n error: 'bg-[var(--color-red-1000)]',\n info: 'bg-[var(--color-blue-800)]',\n neutral: 'bg-[var(--color-gray-600)]',\n },\n },\n defaultVariants: {\n variant: 'neutral',\n },\n }\n);\n","import { HTMLAttributes, forwardRef } from 'react';\nimport { cn } from '@/utils/cn';\nimport {\n statusIndicatorContainerStyles,\n statusIndicatorDotStyles,\n statusIndicatorPingStyles,\n} from './StatusIndicator.styles';\n\nexport interface StatusIndicatorProps extends HTMLAttributes<HTMLDivElement> {\n variant?: 'success' | 'warning' | 'error' | 'info' | 'neutral';\n size?: 'small' | 'medium' | 'large';\n animated?: boolean;\n}\n\nconst variantLabels: Record<StatusIndicatorProps['variant'] & string, string> = {\n success: 'Success status',\n warning: 'Warning status',\n error: 'Error status',\n info: 'Info status',\n neutral: 'Neutral status',\n};\n\nexport const StatusIndicator = forwardRef<HTMLDivElement, StatusIndicatorProps>(\n (\n {\n className,\n variant = 'neutral',\n size = 'medium',\n animated = false,\n ...props\n },\n ref\n ) => {\n return (\n <div\n ref={ref}\n role=\"status\"\n aria-label={variantLabels[variant]}\n className={cn(statusIndicatorContainerStyles({ size }), className)}\n {...props}\n >\n {animated && (\n <span className={statusIndicatorPingStyles({ variant })} />\n )}\n <span className={statusIndicatorDotStyles({ variant })} />\n </div>\n );\n }\n);\n\nStatusIndicator.displayName = 'StatusIndicator';\n\n","import { cva } from 'class-variance-authority';\nimport { cn } from '@/utils/cn';\n\n/**\n * DeltaPill — Inline badge showing a delta value with direction-coded colour.\n * Used inside KPI cards, table cells, and anywhere a change indicator is needed.\n */\nexport interface DeltaPillProps {\n /** The formatted delta string, e.g. \"+£12,400\" or \"−3.2%\" */\n value: string;\n /** Visual direction: green for up, red for down, gray for flat, orange for warning */\n direction: 'up' | 'down' | 'flat' | 'warning';\n className?: string;\n}\n\nconst deltaPillStyles = cva(\n 'inline-flex items-center px-2 py-[2px] rounded-full text-[11px] font-semibold whitespace-nowrap tabular-nums',\n {\n variants: {\n direction: {\n up: 'bg-[var(--color-green-200)] text-[var(--color-green-1000)]',\n down: 'bg-[var(--color-red-200)] text-[var(--color-red-1000)]',\n flat: 'bg-[var(--color-gray-100)] text-[var(--color-gray-800)]',\n warning: 'bg-[var(--color-orange-200)] text-[var(--color-amber-1000)]',\n },\n },\n defaultVariants: {\n direction: 'flat',\n },\n }\n);\n\nexport function DeltaPill({ value, direction, className }: DeltaPillProps) {\n return (\n <span\n className={cn(deltaPillStyles({ direction }), className)}\n style={{ fontFamily: 'Geist Mono, ui-monospace, monospace' }}\n >\n {value}\n </span>\n );\n}\n","import { ReactNode } from 'react';\nimport { cva } from 'class-variance-authority';\nimport { cn } from '@/utils/cn';\n\n/**\n * StatusPill — Rounded label badge for categorical status values.\n * Variants: success (green), warning (yellow), error (red), info (blue), neutral (gray).\n */\nexport interface StatusPillProps {\n label: string;\n variant?: 'success' | 'warning' | 'error' | 'info' | 'neutral';\n /** Show a colored dot indicator before the label */\n showDot?: boolean;\n /** Optional icon to display before the label (replaces dot when both are set) */\n icon?: ReactNode;\n className?: string;\n}\n\nconst statusPillStyles = cva(\n 'inline-flex items-center gap-[5px] px-[10px] py-[3px] rounded-full text-[11px] font-semibold whitespace-nowrap',\n {\n variants: {\n variant: {\n success: 'bg-[var(--color-green-200)] text-[var(--color-green-1000)]',\n warning: 'bg-[#fef9c3] text-[#854d0e]',\n error: 'bg-[var(--color-red-200)] text-[var(--color-red-1000)]',\n info: 'bg-[var(--color-blue-200)] text-[var(--color-blue-1000)]',\n neutral: 'bg-[var(--color-gray-100)] text-[var(--color-gray-800)]',\n },\n },\n defaultVariants: {\n variant: 'neutral',\n },\n }\n);\n\nexport function StatusPill({ label, variant = 'neutral', showDot, icon, className }: StatusPillProps) {\n return (\n <span className={cn(statusPillStyles({ variant }), className)}>\n {icon ? (\n <span className=\"flex items-center shrink-0\">{icon}</span>\n ) : showDot ? (\n <span className=\"w-[6px] h-[6px] rounded-full bg-current shrink-0\" />\n ) : null}\n {label}\n </span>\n );\n}\n","import { cn } from '@/utils/cn';\n\n/**\n * FootnoteRef — Inline superscript footnote reference.\n * Renders as a clickable numbered superscript that links to the corresponding\n * FootnoteList entry via an anchor. Use alongside FootnoteList at the page bottom.\n */\nexport interface FootnoteRefProps {\n /** The footnote number shown as the superscript */\n number: number;\n /** Scrolls to the matching FootnoteList item when clicked */\n onClick?: (number: number) => void;\n className?: string;\n}\n\nexport function FootnoteRef({ number, onClick, className }: FootnoteRefProps) {\n return (\n <sup\n id={`fnref-${number}`}\n className={cn(\n 'text-[10px] font-semibold text-[var(--color-blue-800)] cursor-pointer select-none leading-none',\n onClick && 'hover:text-[var(--color-blue-1000)] transition-colors duration-150',\n className\n )}\n title={`See footnote ${number}`}\n onClick={() => onClick?.(number)}\n aria-label={`Footnote ${number}`}\n >\n [{number}]\n </sup>\n );\n}\n","import { cn } from '@/utils/cn';\n\n/**\n * SparklineCell — Pure-SVG mini trend line, designed to sit inside a table cell\n * or alongside a KPI value. Zero external dependencies.\n * Direction colours: up=green, down=red, flat=gray (auto-derived from data if omitted).\n */\nexport interface SparklineDataPoint {\n period: string;\n value: number;\n}\n\nexport interface SparklineCellProps {\n data: SparklineDataPoint[];\n /** Override auto-detected direction */\n direction?: 'up' | 'down' | 'flat';\n width?: number;\n height?: number;\n /** Show a filled dot on the last data point */\n showLastDot?: boolean;\n className?: string;\n}\n\nconst DIR_STROKE: Record<string, string> = {\n up: 'var(--color-green-1000)',\n down: 'var(--color-red-1000)',\n flat: 'var(--color-gray-600)',\n};\n\nfunction deriveDirection(data: SparklineDataPoint[]): 'up' | 'down' | 'flat' {\n if (data.length < 2) return 'flat';\n const delta = data[data.length - 1].value - data[0].value;\n if (delta > 0) return 'up';\n if (delta < 0) return 'down';\n return 'flat';\n}\n\nexport function SparklineCell({\n data,\n direction,\n width = 80,\n height = 24,\n showLastDot = true,\n className,\n}: SparklineCellProps) {\n if (data.length < 2) return null;\n\n const dir = direction ?? deriveDirection(data);\n const stroke = DIR_STROKE[dir];\n\n const values = data.map((d) => d.value);\n const min = Math.min(...values);\n const max = Math.max(...values);\n const range = max - min || 1;\n\n const pad = 2;\n const w = width - pad * 2;\n const h = height - pad * 2;\n\n const points = data.map((d, i) => {\n const x = pad + (i / (data.length - 1)) * w;\n const y = pad + h - ((d.value - min) / range) * h;\n return `${x},${y}`;\n });\n\n const polyline = points.join(' ');\n const lastPoint = points[points.length - 1].split(',');\n const lastX = parseFloat(lastPoint[0]);\n const lastY = parseFloat(lastPoint[1]);\n\n return (\n <svg\n width={width}\n height={height}\n viewBox={`0 0 ${width} ${height}`}\n className={cn('overflow-visible', className)}\n aria-hidden=\"true\"\n role=\"img\"\n >\n <polyline\n points={polyline}\n fill=\"none\"\n stroke={stroke}\n strokeWidth={1.5}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n {showLastDot && (\n <circle cx={lastX} cy={lastY} r={2.5} fill={stroke} />\n )}\n </svg>\n );\n}\n","// react / next\nimport { ReactNode, ElementType } from 'react';\n\n// utils\nimport { cn } from '@/utils/cn';\n\nexport type TypographyVariant =\n | 'display'\n | 'h1'\n | 'h2'\n | 'h3'\n | 'h4'\n | 'h5'\n | 'small'\n | 'tiny'\n | 'x-small'\n | 'column-header'\n | 'tag';\n\nexport type TypographyWeight =\n | 'thin'\n | 'extralight'\n | 'light'\n | 'regular'\n | 'medium'\n | 'semibold'\n | 'bold'\n | 'black';\n\nexport type TypographyFontFamily = 'sans' | 'mono';\n\nexport interface TypographyProps {\n variant: TypographyVariant;\n as?: ElementType;\n children: ReactNode;\n className?: string;\n color?: 'primary' | 'secondary' | 'inherit';\n weight?: TypographyWeight;\n fontFamily?: TypographyFontFamily;\n}\n\nconst variantClassMap: Record<TypographyVariant, string> = {\n display: 'typography-display',\n h1: 'typography-h1',\n h2: 'typography-h2',\n h3: 'typography-h3',\n h4: 'typography-h4',\n h5: 'typography-h5',\n small: 'typography-small',\n tiny: 'typography-tiny',\n 'x-small': 'typography-x-small',\n 'column-header': 'typography-column-header',\n tag: 'typography-tag',\n};\n\nconst defaultElementMap: Record<TypographyVariant, ElementType> = {\n display: 'h1',\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h4',\n h5: 'h5',\n small: 'p',\n tiny: 'p',\n 'x-small': 'p',\n 'column-header': 'span',\n tag: 'span',\n};\n\nconst colorClassMap = {\n primary: 'text-[var(--color-gray-1000)]',\n secondary: 'text-[var(--color-gray-600)]',\n inherit: '',\n};\n\nconst weightClassMap: Record<TypographyWeight, string> = {\n thin: 'font-thin',\n extralight: 'font-extralight',\n light: 'font-light',\n regular: 'font-normal',\n medium: 'font-medium',\n semibold: 'font-semibold',\n bold: 'font-bold',\n black: 'font-black',\n};\n\nconst fontFamilyClassMap: Record<TypographyFontFamily, string> = {\n sans: '!font-body',\n mono: '!font-mono',\n};\n\nexport const Typography = ({\n variant,\n as,\n children,\n className,\n color = 'primary',\n weight,\n fontFamily,\n}: TypographyProps) => {\n const Component = as || defaultElementMap[variant];\n const variantClass = variantClassMap[variant];\n const colorClass = colorClassMap[color];\n const weightClass = weight ? weightClassMap[weight] : '';\n const fontFamilyClass = fontFamily ? fontFamilyClassMap[fontFamily] : '';\n\n return (\n <Component\n className={cn(\n variantClass,\n colorClass,\n weightClass,\n fontFamilyClass,\n className\n )}\n >\n {children}\n </Component>\n );\n};\n","import React from 'react';\n\nexport type LogoColorVariant =\n | 'dark'\n | 'darkTeal'\n | 'teal'\n | 'lightTeal'\n | 'orange'\n | 'white';\n\nconst colorMap: Record<LogoColorVariant, string> = {\n dark: 'rgba(0, 6, 38, 1)',\n darkTeal: 'rgba(2, 46, 64, 1)',\n teal: 'rgba(21, 177, 205, 1)',\n lightTeal: 'rgba(106, 234, 253, 1)',\n orange: 'rgba(255, 111, 0, 1)',\n white: 'rgba(255, 255, 255, 1)',\n};\n\nexport interface LogoAProps extends React.SVGProps<SVGSVGElement> {\n size?: number | string;\n colorVariant?: LogoColorVariant;\n}\n\nexport const LogoA: React.FC<LogoAProps> = ({\n size = 256,\n colorVariant = 'dark',\n ...props\n}) => {\n const color = colorMap[colorVariant];\n\n return (\n <svg\n {...props}\n width={size}\n height={size}\n viewBox=\"0 0 256 256\"\n fill=\"none\"\n >\n <path\n d=\"M35.2761 209.996L27.7832 218.211H11V227H79.5141V218.211H53.3838L48.1047 212.422L62.2011 175.529H138.132L151.434 212.289L146.041 218.211H120.914V227H206.306V218.211H192.664L187.404 212.441L115.029 30H79.7412L81.3306 34.872L93.5916 64.7535M46.0234 218.211H45.9098L46.9127 215.575L46.0234 218.211ZM126.496 162.633H73.9891L69.4858 157.703L97.7164 88.5402H103.223L113.383 113.951L126.269 146.182L130.923 157.818L126.515 162.652L126.496 162.633ZM131.548 159.06H131.567L133.024 162.652L131.548 159.06Z\"\n fill={color}\n />\n <path\n d=\"M233.477 227C239.841 227 245 221.791 245 215.365C245 208.938 239.841 203.729 233.477 203.729C227.113 203.729 221.954 208.938 221.954 215.365C221.954 221.791 227.113 227 233.477 227Z\"\n fill={color}\n />\n </svg>\n );\n};\n\nLogoA.displayName = 'LogoA';\n","import React from 'react';\n\nexport type LogoColorVariant =\n | 'dark'\n | 'darkTeal'\n | 'teal'\n | 'lightTeal'\n | 'orange'\n | 'white';\n\nconst colorMap: Record<LogoColorVariant, string> = {\n dark: 'rgba(0, 6, 38, 1)',\n darkTeal: 'rgba(2, 46, 64, 1)',\n teal: 'rgba(21, 177, 205, 1)',\n lightTeal: 'rgba(106, 234, 253, 1)',\n orange: 'rgba(255, 111, 0, 1)',\n white: 'rgba(255, 255, 255, 1)',\n};\n\nexport interface FullLogoProps extends React.SVGProps<SVGSVGElement> {\n size?: number | string;\n colorVariant?: LogoColorVariant;\n}\n\nexport const FullLogo: React.FC<FullLogoProps> = ({\n size = 163,\n colorVariant = 'dark',\n ...props\n}) => {\n const color = colorMap[colorVariant];\n // Original aspect ratio is 603:163\n const aspectRatio = 603 / 163;\n const height = typeof size === 'number' ? size : parseFloat(size);\n const width = height * aspectRatio;\n\n return (\n <svg\n {...props}\n width={width}\n height={height}\n viewBox=\"0 0 603 163\"\n fill=\"none\"\n >\n <g clipPath=\"url(#clip0_full_logo)\">\n <path\n d=\"M303.686 142.03C284.282 142.03 267.966 127.819 267.966 105.332C267.966 84.0925 278.722 69.1137 300.637 67.9807L314.384 93.9439H326.694V59.4543H301.96C284.723 59.4543 270.554 65.5226 260.642 75.2972C250.537 85.2639 244.862 99.0905 244.862 114.3C244.862 142.702 267.506 163.019 293.025 163.019C314.615 163.019 330.107 148.156 332.733 127.416C326.406 136.365 315.727 142.049 303.724 142.049L303.686 142.03Z\"\n fill={color}\n />\n <path\n d=\"M481.48 48.6811C490.204 48.6811 497.183 41.4797 497.183 32.9534C497.183 24.427 490.204 17.2256 481.48 17.2256C472.756 17.2256 465.547 24.2157 465.547 32.9534C465.547 41.691 472.526 48.6811 481.48 48.6811Z\"\n fill={color}\n />\n <path\n d=\"M570.942 141.588C550.868 141.588 534.724 126.072 534.724 102.912V101.376H603C603 78.8691 587.949 59.4351 562.87 59.4351C536.047 59.4351 513.787 84.7838 513.787 112.533C513.787 140.282 534.513 163 561.336 163C581.622 163 598.859 150.114 602.348 126.955C594.487 137.229 583.367 141.588 570.942 141.588ZM558.94 69.9202C570.501 69.9202 578.132 79.0996 578.132 92.6381H535.606C538.654 78.005 548.049 69.9202 558.94 69.9202Z\"\n fill={color}\n />\n <path\n d=\"M198.233 79.0995V57.2459L155.476 73.204L172.502 86.5313V148.866L168.073 153.667H146.81L84.8802 0H55.8901L57.7691 4.53204L67.8351 28.8438L19.9402 146.984L13.7856 153.667H0V160.811H56.2736V153.667H34.8187L30.4855 148.962L42.0662 118.947H104.437L115.366 148.847L110.937 153.667H90.3062V160.811H221.26V153.667H198.233V89.1622L213.725 78.0242L230.961 91.2362H240.088V59.4543H230.079C217.118 59.4543 204.847 64.6585 198.233 79.1188V79.0995ZM28.7791 153.667H28.6641L29.4885 151.516L28.7599 153.667H28.7791ZM51.7487 108.462L48.0483 104.448L71.2288 48.1818H75.7537L84.094 68.8448L94.6777 95.0577L98.4932 104.525L94.8694 108.462H51.7487ZM99.0109 105.543H99.03L100.219 108.462L99.0109 105.543Z\"\n fill={color}\n />\n <path\n d=\"M495.668 153.667V57.2459L452.911 73.204L469.918 86.5313V148.866L465.489 153.667H443.344L438.934 148.885V91.5627C438.934 72.7816 429.328 59.4543 411.229 59.4543H407.394C392.995 59.4543 382.737 68.1919 374.895 76.2766H374.799V1.92035L328.764 16.7839L349.05 29.6695V148.866L344.64 153.667H333.404V160.811H390.253V153.667H379.229L374.819 148.866V84.3421C379.401 80.6358 385.728 76.6991 392.707 76.6991C406.014 76.6991 413.223 84.5726 413.223 98.5528V148.866L408.794 153.667H399.706V160.811H514.745V153.667H495.687H495.668Z\"\n fill={color}\n />\n </g>\n <defs>\n <clipPath id=\"clip0_full_logo\">\n <rect width=\"603\" height=\"163\" fill=\"white\" />\n </clipPath>\n </defs>\n </svg>\n );\n};\n\nFullLogo.displayName = 'FullLogo';\n","import React, { useId } from 'react';\n\nexport type LogoColorVariant =\n | 'dark'\n | 'darkTeal'\n | 'teal'\n | 'lightTeal'\n | 'orange'\n | 'white';\n\nconst colorMap: Record<LogoColorVariant, string> = {\n dark: 'rgba(0, 6, 38, 1)',\n darkTeal: 'rgba(2, 46, 64, 1)',\n teal: 'rgba(21, 177, 205, 1)',\n lightTeal: 'rgba(106, 234, 253, 1)',\n orange: 'rgba(255, 111, 0, 1)',\n white: 'rgba(255, 255, 255, 1)',\n};\n\nexport interface SignatureAProps extends React.SVGProps<SVGSVGElement> {\n size?: number | string;\n colorVariant?: LogoColorVariant;\n animated?: boolean;\n animationDuration?: number;\n animationDelay?: number;\n}\n\nexport const SignatureA: React.FC<SignatureAProps> = ({\n size = 329,\n colorVariant = 'dark',\n animated = false,\n animationDuration = 2,\n animationDelay = 0,\n ...props\n}) => {\n const color = colorMap[colorVariant];\n const uniqueId = useId();\n\n // Path length for stroke animation (approximate value)\n const mainPathLength = 2800;\n\n if (animated) {\n return (\n <svg\n {...props}\n width={size}\n height={size}\n viewBox=\"0 0 329 329\"\n fill=\"none\"\n >\n <style>\n {`\n @keyframes drawSignature-${uniqueId.replace(/:/g, '')} {\n 0% {\n stroke-dashoffset: var(--path-length);\n fill-opacity: 0;\n }\n 80% {\n stroke-dashoffset: 0;\n fill-opacity: 0;\n }\n 100% {\n stroke-dashoffset: 0;\n fill-opacity: 1;\n }\n }\n @keyframes drawDot-${uniqueId.replace(/:/g, '')} {\n 0% {\n opacity: 0;\n transform: scale(0);\n }\n 100% {\n opacity: 1;\n transform: scale(1);\n }\n }\n `}\n </style>\n {/* Dot - appears at the end */}\n <path\n d=\"M239.997 257.024C239.13 256.261 238.348 255.328 237.671 254.268C236.994 253.208 236.55 252.126 236.359 251.066C236.169 250.006 236.359 249.179 236.93 248.585C239.659 245.277 243.233 242.118 247.696 239.107C252.138 236.095 256.601 234.59 261.063 234.59C263.2 234.59 264.595 235.375 265.293 236.922C265.97 238.47 266.309 240.018 266.309 241.587C266.309 244.302 265.568 246.443 264.13 247.991C262.692 249.539 260.831 250.854 258.61 251.914C256.389 252.996 254.062 253.907 251.63 254.692C249.198 255.455 247.04 256.24 245.095 257.024L242.768 258.191C241.795 258.191 240.886 257.809 239.997 257.024Z\"\n fill={color}\n style={{\n transformOrigin: '252px 247px',\n animation: `drawDot-${uniqueId.replace(/:/g, '')} 0.3s ease-out ${animationDelay + animationDuration * 0.9}s forwards`,\n opacity: 0,\n }}\n />\n {/* Main signature path */}\n <path\n d=\"M308.102 176.765C306.453 175.663 304.126 174.963 301.123 174.687C298.119 174.411 294.46 174.433 290.167 174.772C285.873 175.111 281.008 175.578 275.594 176.193C273.648 176.405 271.829 176.617 270.179 176.808L245.793 180.942C242.091 181.536 239.003 182.003 236.486 182.406C233.969 182.808 231.558 182.702 229.232 182.13L193.572 185.777C193.952 184.293 194.587 182.893 195.517 181.6C196.469 180.243 197.548 179.161 198.711 178.398C205.099 169.068 211.254 160.056 217.176 151.299C223.077 142.562 228.639 134.102 233.885 125.959L234.752 121.888L253.936 88.6814C253.936 87.3243 254.422 86.2641 255.395 85.4795C256.368 84.7162 257.045 83.4439 257.425 81.7051L260.344 73.2445C260.915 71.6966 261.465 70.0426 261.93 68.2826C262.417 66.5439 262.671 64.5082 262.671 62.1757C262.671 60.8186 262.459 59.1223 262.1 57.0866C261.698 55.051 261.084 53.1426 260.217 51.4038C259.35 49.6438 258.271 48.1595 257.024 46.8872C255.776 45.615 254.168 45 252.243 45C250.89 45 249.388 45.3817 247.738 46.1663C246.089 46.9509 244.439 47.9263 242.789 49.0925C241.139 50.2588 239.595 51.4674 238.136 52.7397C236.677 54.012 235.471 55.0298 234.498 55.7932L207.468 81.7263L206.008 82.5957L192.641 96.2939C192.429 96.2939 192.112 96.3999 191.626 96.5907C191.139 96.7816 190.801 96.8876 190.61 96.8876L122.04 164.763C120.094 164.763 117.493 163.894 114.193 162.134C110.915 160.374 107.023 159.505 102.56 159.505C101.587 159.505 100.53 159.802 99.3666 160.374C98.2033 160.947 97.3361 161.243 96.7439 161.243C95.9613 161.243 95.2422 160.798 94.5654 159.929C93.8885 159.059 92.7887 158.635 91.2236 158.635C86.5704 159.611 83.567 160.183 82.2134 160.374C80.8597 160.586 79.9714 160.671 79.5907 160.671C77.6448 159.886 76.397 159.696 75.8047 160.098C75.2125 160.501 74.7472 160.777 74.3453 160.968C73.7743 160.586 72.3149 160.247 69.9883 159.95C67.6617 159.674 65.5255 159.505 63.6008 159.505C60.682 159.505 56.6634 159.611 51.5449 159.802C46.4053 159.992 41.3715 160.629 36.4434 161.689C31.5153 162.749 27.2005 164.488 23.5203 166.926C19.8401 169.365 18 172.8 18 177.274C18 181.155 18.9518 184.462 20.8976 187.177C22.8435 189.912 25.3181 192.223 28.3215 194.174C31.3249 196.125 34.6667 197.524 38.3469 198.394C42.0271 199.263 45.6016 199.709 49.0915 199.709C51.2277 200.281 53.1524 200.09 54.9079 199.136C54.6964 199.136 55.7328 199.369 57.9536 199.857C60.1744 200.345 62.9451 200.79 66.2235 201.172C69.523 201.553 72.9494 201.999 76.545 202.465C80.1195 202.953 83.0806 203.207 85.4071 203.207L59.5399 232.915L54.0196 239.319C52.8563 240.294 52.4333 241.948 52.7294 244.281C53.0043 246.613 53.6389 247.779 54.6118 247.779C57.1287 247.779 60.3225 246.083 64.193 242.69C68.0636 239.297 72.1457 235.163 76.397 230.307C80.6694 225.451 84.9207 220.51 89.1931 215.464C93.4444 210.417 97.2303 206.24 100.53 202.932C100.911 202.932 101.312 202.974 101.693 203.08C102.074 203.165 102.455 203.228 102.856 203.228C115.822 203.228 127.878 202.847 139.045 202.062C150.192 201.299 160.407 200.896 169.692 200.896C166.985 205.37 164.066 209.929 160.978 214.594C157.89 219.259 154.591 224.115 151.101 229.162L127.285 264.701C125.932 266.842 124.726 268.984 123.648 271.104C122.569 273.225 122.061 275.366 122.061 277.508C122.061 279.056 122.59 280.371 123.648 281.431C124.705 282.491 125.826 283.042 126.989 283.042C129.316 283.042 131.346 282.364 133.081 281.007C134.815 279.65 136.613 278.038 138.453 276.193C140.293 274.349 142.197 272.44 144.121 270.511C146.046 268.56 148.373 267.012 151.08 265.846L182.467 237.007C182.658 236.414 183.102 235.777 183.758 235.12C184.434 234.442 185.259 233.615 186.232 232.639L197.273 223.33C200.192 220.807 202.941 217.881 205.543 214.573C208.166 211.286 209.477 209.145 209.477 208.169C209.477 206.027 208.229 204.967 205.712 204.967C205.331 204.967 204.697 205.116 203.83 205.413C202.962 205.709 201.947 206.346 200.784 207.3L156.896 248.076L146.152 255.646L149.049 251.575C149.832 250.218 151.186 248.034 153.132 245.023C155.056 242.012 157.192 238.725 159.519 235.12C161.846 231.537 164.32 227.805 166.943 223.903C169.566 220.022 172.019 216.418 174.367 213.11C176.693 209.823 178.724 207.045 180.458 204.819C182.193 202.592 183.44 201.278 184.223 200.875C184.604 200.684 185.386 200.493 186.55 200.302C186.803 200.281 187.121 200.281 187.374 200.239L196.871 199.433C201.672 199.009 206.304 198.161 210.746 196.931C215.166 195.68 219.798 194.853 224.6 194.407C226.122 194.301 228.893 193.983 232.891 193.474C236.909 192.965 241.266 192.393 245.941 191.757C250.615 191.142 254.993 190.527 259.075 189.912C263.157 189.297 265.991 188.852 267.599 188.555C269.206 188.258 270.602 188.025 271.787 187.834C272.971 187.664 274.431 187.516 276.165 187.41C276.313 187.41 276.503 187.177 276.651 187.134L281.579 186.583C284.435 186.265 286.888 186.095 288.961 186.095C291.013 186.095 292.514 186.18 293.445 186.392C292.726 188.152 292.112 189.361 291.563 190.039C291.034 190.718 290.59 191.142 290.23 191.333C289.871 191.524 289.659 191.672 289.596 191.757C289.532 191.842 289.532 192.181 289.596 192.796C289.807 194.768 291.647 195.531 295.116 195.15C295.708 195.086 296.491 194.81 297.421 194.323C298.352 193.835 299.325 193.305 300.319 192.732C301.313 192.16 302.286 191.545 303.195 190.909C304.126 190.272 304.782 189.7 305.184 189.191C306.072 188.937 307.299 188.046 308.885 186.477C310.45 184.929 311.169 183.402 311 181.875C310.746 179.628 309.794 177.931 308.145 176.829L308.102 176.765ZM96.7227 190.039C76.5662 189.276 60.9781 188.088 49.9375 186.54C38.8968 184.993 31.5364 181.981 27.8562 177.507C28.6388 176.15 31.3884 175.026 36.1473 174.157C40.885 173.288 46.0246 172.567 51.5449 171.973C57.0653 171.379 62.1414 170.955 66.7946 170.679C71.4477 170.383 74.0704 170.234 74.6415 170.234H79.2946C88.6009 170.807 96.0882 171.4 101.82 171.973C107.531 172.545 111.549 173.033 113.876 173.436L96.7227 190.039ZM147.146 188.576C136.592 188.958 125.488 189.255 113.876 189.446C115.23 187.495 117.366 184.971 120.263 181.875C123.182 178.78 126.376 175.472 129.845 171.973C133.335 168.474 137.015 164.891 140.885 161.201C144.756 157.511 148.436 154.013 151.926 150.705L172.273 129.14C172.654 127.973 173.33 127.401 174.303 127.401L184.181 118.092C185.154 117.71 186.55 116.629 188.411 114.89C190.251 113.151 192.176 111.201 194.206 109.08C196.237 106.96 198.182 104.818 200.023 102.676C201.863 100.535 203.259 98.902 204.231 97.7146L211.211 93.0496C213.919 90.3354 216.541 87.706 219.058 85.1827C221.575 82.6593 224.092 80.3268 226.609 78.1852L231.262 73.5202C233.99 70.9968 236.74 68.8128 239.553 66.968C242.345 65.1232 246.279 62.727 251.313 59.822V63.0239C251.313 66.3318 250.551 70.1062 248.986 74.3896C247.421 78.6729 245.877 82.3625 244.333 85.4583L184.181 180.137C182.446 181.494 180.881 183.445 179.528 185.968C168.487 187.325 157.679 188.194 147.125 188.597L147.146 188.576Z\"\n stroke={color}\n strokeWidth=\"2\"\n fill={color}\n style={\n {\n '--path-length': mainPathLength,\n strokeDasharray: mainPathLength,\n strokeDashoffset: mainPathLength,\n fillOpacity: 0,\n animation: `drawSignature-${uniqueId.replace(/:/g, '')} ${animationDuration}s ease-out ${animationDelay}s forwards`,\n } as React.CSSProperties\n }\n />\n </svg>\n );\n }\n\n return (\n <svg\n {...props}\n width={size}\n height={size}\n viewBox=\"0 0 329 329\"\n fill=\"none\"\n >\n <path\n d=\"M239.997 257.024C239.13 256.261 238.348 255.328 237.671 254.268C236.994 253.208 236.55 252.126 236.359 251.066C236.169 250.006 236.359 249.179 236.93 248.585C239.659 245.277 243.233 242.118 247.696 239.107C252.138 236.095 256.601 234.59 261.063 234.59C263.2 234.59 264.595 235.375 265.293 236.922C265.97 238.47 266.309 240.018 266.309 241.587C266.309 244.302 265.568 246.443 264.13 247.991C262.692 249.539 260.831 250.854 258.61 251.914C256.389 252.996 254.062 253.907 251.63 254.692C249.198 255.455 247.04 256.24 245.095 257.024L242.768 258.191C241.795 258.191 240.886 257.809 239.997 257.024Z\"\n fill={color}\n />\n <path\n d=\"M308.102 176.765C306.453 175.663 304.126 174.963 301.123 174.687C298.119 174.411 294.46 174.433 290.167 174.772C285.873 175.111 281.008 175.578 275.594 176.193C273.648 176.405 271.829 176.617 270.179 176.808L245.793 180.942C242.091 181.536 239.003 182.003 236.486 182.406C233.969 182.808 231.558 182.702 229.232 182.13L193.572 185.777C193.952 184.293 194.587 182.893 195.517 181.6C196.469 180.243 197.548 179.161 198.711 178.398C205.099 169.068 211.254 160.056 217.176 151.299C223.077 142.562 228.639 134.102 233.885 125.959L234.752 121.888L253.936 88.6814C253.936 87.3243 254.422 86.2641 255.395 85.4795C256.368 84.7162 257.045 83.4439 257.425 81.7051L260.344 73.2445C260.915 71.6966 261.465 70.0426 261.93 68.2826C262.417 66.5439 262.671 64.5082 262.671 62.1757C262.671 60.8186 262.459 59.1223 262.1 57.0866C261.698 55.051 261.084 53.1426 260.217 51.4038C259.35 49.6438 258.271 48.1595 257.024 46.8872C255.776 45.615 254.168 45 252.243 45C250.89 45 249.388 45.3817 247.738 46.1663C246.089 46.9509 244.439 47.9263 242.789 49.0925C241.139 50.2588 239.595 51.4674 238.136 52.7397C236.677 54.012 235.471 55.0298 234.498 55.7932L207.468 81.7263L206.008 82.5957L192.641 96.2939C192.429 96.2939 192.112 96.3999 191.626 96.5907C191.139 96.7816 190.801 96.8876 190.61 96.8876L122.04 164.763C120.094 164.763 117.493 163.894 114.193 162.134C110.915 160.374 107.023 159.505 102.56 159.505C101.587 159.505 100.53 159.802 99.3666 160.374C98.2033 160.947 97.3361 161.243 96.7439 161.243C95.9613 161.243 95.2422 160.798 94.5654 159.929C93.8885 159.059 92.7887 158.635 91.2236 158.635C86.5704 159.611 83.567 160.183 82.2134 160.374C80.8597 160.586 79.9714 160.671 79.5907 160.671C77.6448 159.886 76.397 159.696 75.8047 160.098C75.2125 160.501 74.7472 160.777 74.3453 160.968C73.7743 160.586 72.3149 160.247 69.9883 159.95C67.6617 159.674 65.5255 159.505 63.6008 159.505C60.682 159.505 56.6634 159.611 51.5449 159.802C46.4053 159.992 41.3715 160.629 36.4434 161.689C31.5153 162.749 27.2005 164.488 23.5203 166.926C19.8401 169.365 18 172.8 18 177.274C18 181.155 18.9518 184.462 20.8976 187.177C22.8435 189.912 25.3181 192.223 28.3215 194.174C31.3249 196.125 34.6667 197.524 38.3469 198.394C42.0271 199.263 45.6016 199.709 49.0915 199.709C51.2277 200.281 53.1524 200.09 54.9079 199.136C54.6964 199.136 55.7328 199.369 57.9536 199.857C60.1744 200.345 62.9451 200.79 66.2235 201.172C69.523 201.553 72.9494 201.999 76.545 202.465C80.1195 202.953 83.0806 203.207 85.4071 203.207L59.5399 232.915L54.0196 239.319C52.8563 240.294 52.4333 241.948 52.7294 244.281C53.0043 246.613 53.6389 247.779 54.6118 247.779C57.1287 247.779 60.3225 246.083 64.193 242.69C68.0636 239.297 72.1457 235.163 76.397 230.307C80.6694 225.451 84.9207 220.51 89.1931 215.464C93.4444 210.417 97.2303 206.24 100.53 202.932C100.911 202.932 101.312 202.974 101.693 203.08C102.074 203.165 102.455 203.228 102.856 203.228C115.822 203.228 127.878 202.847 139.045 202.062C150.192 201.299 160.407 200.896 169.692 200.896C166.985 205.37 164.066 209.929 160.978 214.594C157.89 219.259 154.591 224.115 151.101 229.162L127.285 264.701C125.932 266.842 124.726 268.984 123.648 271.104C122.569 273.225 122.061 275.366 122.061 277.508C122.061 279.056 122.59 280.371 123.648 281.431C124.705 282.491 125.826 283.042 126.989 283.042C129.316 283.042 131.346 282.364 133.081 281.007C134.815 279.65 136.613 278.038 138.453 276.193C140.293 274.349 142.197 272.44 144.121 270.511C146.046 268.56 148.373 267.012 151.08 265.846L182.467 237.007C182.658 236.414 183.102 235.777 183.758 235.12C184.434 234.442 185.259 233.615 186.232 232.639L197.273 223.33C200.192 220.807 202.941 217.881 205.543 214.573C208.166 211.286 209.477 209.145 209.477 208.169C209.477 206.027 208.229 204.967 205.712 204.967C205.331 204.967 204.697 205.116 203.83 205.413C202.962 205.709 201.947 206.346 200.784 207.3L156.896 248.076L146.152 255.646L149.049 251.575C149.832 250.218 151.186 248.034 153.132 245.023C155.056 242.012 157.192 238.725 159.519 235.12C161.846 231.537 164.32 227.805 166.943 223.903C169.566 220.022 172.019 216.418 174.367 213.11C176.693 209.823 178.724 207.045 180.458 204.819C182.193 202.592 183.44 201.278 184.223 200.875C184.604 200.684 185.386 200.493 186.55 200.302C186.803 200.281 187.121 200.281 187.374 200.239L196.871 199.433C201.672 199.009 206.304 198.161 210.746 196.931C215.166 195.68 219.798 194.853 224.6 194.407C226.122 194.301 228.893 193.983 232.891 193.474C236.909 192.965 241.266 192.393 245.941 191.757C250.615 191.142 254.993 190.527 259.075 189.912C263.157 189.297 265.991 188.852 267.599 188.555C269.206 188.258 270.602 188.025 271.787 187.834C272.971 187.664 274.431 187.516 276.165 187.41C276.313 187.41 276.503 187.177 276.651 187.134L281.579 186.583C284.435 186.265 286.888 186.095 288.961 186.095C291.013 186.095 292.514 186.18 293.445 186.392C292.726 188.152 292.112 189.361 291.563 190.039C291.034 190.718 290.59 191.142 290.23 191.333C289.871 191.524 289.659 191.672 289.596 191.757C289.532 191.842 289.532 192.181 289.596 192.796C289.807 194.768 291.647 195.531 295.116 195.15C295.708 195.086 296.491 194.81 297.421 194.323C298.352 193.835 299.325 193.305 300.319 192.732C301.313 192.16 302.286 191.545 303.195 190.909C304.126 190.272 304.782 189.7 305.184 189.191C306.072 188.937 307.299 188.046 308.885 186.477C310.45 184.929 311.169 183.402 311 181.875C310.746 179.628 309.794 177.931 308.145 176.829L308.102 176.765ZM96.7227 190.039C76.5662 189.276 60.9781 188.088 49.9375 186.54C38.8968 184.993 31.5364 181.981 27.8562 177.507C28.6388 176.15 31.3884 175.026 36.1473 174.157C40.885 173.288 46.0246 172.567 51.5449 171.973C57.0653 171.379 62.1414 170.955 66.7946 170.679C71.4477 170.383 74.0704 170.234 74.6415 170.234H79.2946C88.6009 170.807 96.0882 171.4 101.82 171.973C107.531 172.545 111.549 173.033 113.876 173.436L96.7227 190.039ZM147.146 188.576C136.592 188.958 125.488 189.255 113.876 189.446C115.23 187.495 117.366 184.971 120.263 181.875C123.182 178.78 126.376 175.472 129.845 171.973C133.335 168.474 137.015 164.891 140.885 161.201C144.756 157.511 148.436 154.013 151.926 150.705L172.273 129.14C172.654 127.973 173.33 127.401 174.303 127.401L184.181 118.092C185.154 117.71 186.55 116.629 188.411 114.89C190.251 113.151 192.176 111.201 194.206 109.08C196.237 106.96 198.182 104.818 200.023 102.676C201.863 100.535 203.259 98.902 204.231 97.7146L211.211 93.0496C213.919 90.3354 216.541 87.706 219.058 85.1827C221.575 82.6593 224.092 80.3268 226.609 78.1852L231.262 73.5202C233.99 70.9968 236.74 68.8128 239.553 66.968C242.345 65.1232 246.279 62.727 251.313 59.822V63.0239C251.313 66.3318 250.551 70.1062 248.986 74.3896C247.421 78.6729 245.877 82.3625 244.333 85.4583L184.181 180.137C182.446 181.494 180.881 183.445 179.528 185.968C168.487 187.325 157.679 188.194 147.125 188.597L147.146 188.576Z\"\n fill={color}\n />\n </svg>\n );\n};\n\nSignatureA.displayName = 'SignatureA';\n","import { cva } from 'class-variance-authority';\n\nexport const artifactCardStyles = cva(\n 'group relative flex items-center rounded-[8px] border box-border cursor-pointer w-full overflow-hidden isolate transition-[border-color] duration-300',\n {\n variants: {\n status: {\n normal: 'bg-[var(--color-white)] border-[var(--color-gray-200)]',\n hover: 'border-[var(--color-blue-800)]',\n generating:\n 'bg-[var(--color-white)] border-[var(--color-gray-200)] cursor-default',\n error: 'border-[var(--color-red-1000)]',\n },\n disabled: {\n true: 'opacity-50 cursor-not-allowed pointer-events-none',\n false: '',\n },\n },\n defaultVariants: {\n status: 'normal',\n disabled: false,\n },\n },\n);\n\n// Background layer for hover effect - solid colors instead of gradients\nexport const hoverBackgroundStyles = cva(\n 'absolute inset-0 -z-10 transition-opacity duration-300',\n {\n variants: {\n status: {\n normal: 'opacity-0 group-hover:opacity-100',\n hover: 'opacity-100',\n generating: 'opacity-0',\n error: 'opacity-100',\n },\n },\n defaultVariants: {\n status: 'normal',\n },\n },\n);\n\n// Solid background color styles\nexport const animatedGradientStyles = cva('absolute inset-0', {\n variants: {\n status: {\n normal: 'bg-[var(--color-blue-200)]',\n hover: 'bg-[var(--color-blue-200)]',\n generating: '',\n error: 'bg-[var(--color-red-200)]',\n },\n },\n defaultVariants: {\n status: 'normal',\n },\n});\n\nexport const previewContainerStyles = cva('flex gap-2 h-[75px] shrink-0', {\n variants: {\n status: {\n normal: 'p-2 items-end',\n hover: 'p-2 items-end',\n generating: 'px-4 py-2 items-center',\n error: 'px-4 py-2 items-center',\n },\n },\n defaultVariants: {\n status: 'normal',\n },\n});\n\nexport const previewBoxStyles = cva(\n 'relative -bottom-2 w-[60px] h-[66px] bg-[var(--color-gray-50)] border border-[var(--color-gray-200)] border-b-0 rounded-t-[4px] overflow-hidden transition-transform duration-300 group-hover:opacity-90 group-hover:shadow-sm',\n);\n\nexport const previewBoxInnerStyles = cva(\n 'w-full h-full bg-[var(--color-blue-200)]/30 p-2 space-y-2 flex flex-col items-start justify-start gap-1',\n);\n\nexport const skeletonLineStyles = cva(\n 'h-1 bg-[var(--color-gray-200)] rounded-full origin-left',\n);\n\nexport const contentContainerStyles = cva(\n 'flex flex-col gap-[4px] grow items-start p-4 min-w-0',\n);\n\nexport const titleStyles = cva(\n 'font-medium text-[14px] leading-[20px] text-[var(--color-blue-1000)]',\n);\n\nexport const subtitleStyles = cva(\n 'text-[12px] leading-[16px] text-[var(--color-gray-600)]',\n);\n\nexport const iconContainerStyles = cva(\n 'px-4 overflow-hidden flex items-center w-[56px] relative',\n);\n\nexport const iconActiveStyles = cva(\n 'absolute w-6 h-6 text-[var(--color-blue-800)]',\n);\n\nexport const iconInactiveStyles = cva('w-6 h-6 text-[var(--color-gray-200)]');\n\nexport const iconStyles = cva('w-4 h-4 shrink-0 transition-all duration-300', {\n variants: {\n status: {\n normal:\n 'text-[var(--color-blue-1000)] group-hover:text-[var(--color-blue-800)] group-hover:translate-x-0.5',\n hover: 'text-[var(--color-blue-800)] translate-x-0.5',\n generating: 'text-[var(--color-gray-600)] animate-spin',\n error: 'text-[var(--color-blue-1000)] group-hover:rotate-[-20deg]',\n },\n },\n defaultVariants: {\n status: 'normal',\n },\n});\n\nexport const errorIconStyles = cva(\n 'w-4 h-4 shrink-0 text-[var(--color-red-1000)] transition-transform duration-300 group-hover:scale-110',\n);\n","// React\nimport { forwardRef, useState, useCallback, useMemo } from 'react';\nimport { motion } from 'framer-motion';\n\n// Components\nimport {\n Loader,\n TriangleAlert,\n RotateCcw,\n ArrowUp,\n} from '@/components/atoms/icons';\n\n// Styles\nimport {\n artifactCardStyles,\n hoverBackgroundStyles,\n animatedGradientStyles,\n previewContainerStyles,\n previewBoxStyles,\n previewBoxInnerStyles,\n contentContainerStyles,\n titleStyles,\n subtitleStyles,\n iconContainerStyles,\n iconStyles,\n errorIconStyles,\n skeletonLineStyles,\n iconActiveStyles,\n iconInactiveStyles,\n} from './ArtifactCard.styles';\n\n// Misc\nimport { cn } from '@/utils/cn';\n\n// Types\nimport type { ArtifactCardProps, ArtifactCardStatus } from './ArtifactCard.types';\n\n// Animation variants\nconst skeletonLineVariants = {\n rest: { scaleX: 1 },\n hover: { scaleX: [0, 1] },\n};\n\nconst contentSlideVariants = {\n rest: { x: 0 },\n hover: { x: 4 },\n};\n\nconst iconActiveVariants = {\n rest: { x: -20, opacity: 0 },\n hover: { x: 0, opacity: 1 },\n};\n\nconst iconInactiveVariants = {\n rest: { x: 0, opacity: 1 },\n hover: { x: 20, opacity: 0 },\n};\n\n// Skeleton line widths for the document preview animation\nconst SKELETON_WIDTHS = [100, 66, 75, 50];\n\nexport const ArtifactCard = forwardRef<HTMLDivElement, ArtifactCardProps>(\n (\n {\n title,\n subtitle,\n status: controlledStatus,\n onClick,\n onActionClick,\n className,\n disabled = false,\n },\n ref,\n ) => {\n const [isHovered, setIsHovered] = useState(false);\n\n // Determine effective status - controlled or internal hover state\n const effectiveStatus: ArtifactCardStatus =\n controlledStatus || (isHovered && !disabled ? 'hover' : 'normal');\n\n // Memoize animation state\n const animationState = useMemo(() => {\n if (effectiveStatus === 'generating' || effectiveStatus === 'error')\n return 'rest';\n return isHovered ? 'hover' : 'rest';\n }, [effectiveStatus, isHovered]);\n\n const handleMouseEnter = useCallback(() => {\n if (!controlledStatus && !disabled) {\n setIsHovered(true);\n }\n }, [controlledStatus, disabled]);\n\n const handleMouseLeave = useCallback(() => {\n if (!controlledStatus && !disabled) {\n setIsHovered(false);\n }\n }, [controlledStatus, disabled]);\n\n const handleClick = useCallback(() => {\n if (!disabled && onClick) {\n onClick();\n }\n }, [disabled, onClick]);\n\n const handleActionClick = useCallback(\n (e: React.MouseEvent) => {\n e.stopPropagation();\n if (!disabled && onActionClick) {\n onActionClick();\n }\n },\n [disabled, onActionClick],\n );\n\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n handleClick();\n }\n },\n [handleClick],\n );\n\n // Render preview with skeleton animation\n const renderPreview = () => {\n if (effectiveStatus === 'generating') {\n return (\n <div className={previewContainerStyles({ status: 'generating' })}>\n <Loader\n size={16}\n className=\"text-[var(--color-gray-600)] animate-spin\"\n />\n </div>\n );\n }\n\n if (effectiveStatus === 'error') {\n return (\n <div className={previewContainerStyles({ status: 'error' })}>\n <TriangleAlert size={16} className={errorIconStyles()} />\n </div>\n );\n }\n\n // Normal or hover - show animated skeleton preview\n return (\n <div className={previewContainerStyles({ status: effectiveStatus })}>\n <div className={previewBoxStyles()}>\n <motion.div\n className={previewBoxInnerStyles()}\n variants={{\n rest: {},\n hover: { transition: { staggerChildren: 0.1 } },\n }}\n >\n {SKELETON_WIDTHS.map((width, i) => (\n <motion.div\n key={i}\n className={skeletonLineStyles()}\n style={{ width: `${width}%` }}\n variants={skeletonLineVariants}\n transition={{ duration: 0.4, ease: 'easeInOut' }}\n />\n ))}\n </motion.div>\n </div>\n </div>\n );\n };\n\n // Render action icon with swap animation\n const renderActionIcon = () => {\n if (effectiveStatus === 'generating') {\n return null;\n }\n\n if (effectiveStatus === 'error') {\n return (\n <button\n type=\"button\"\n onClick={handleActionClick}\n className=\"focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-blue-800)] focus-visible:ring-offset-2 rounded-sm\"\n aria-label=\"Retry\"\n >\n <RotateCcw size={16} className={iconStyles({ status: 'error' })} />\n </button>\n );\n }\n\n // Icon swap animation\n return (\n <>\n <motion.div\n className={iconActiveStyles()}\n variants={iconActiveVariants}\n transition={{ duration: 0.3, ease: 'backOut' }}\n >\n <ArrowUp size={24} className=\"rotate-90\" />\n </motion.div>\n <motion.div\n className={iconInactiveStyles()}\n variants={iconInactiveVariants}\n transition={{ duration: 0.3 }}\n >\n <ArrowUp size={24} className=\"rotate-90\" />\n </motion.div>\n </>\n );\n };\n\n return (\n <motion.div\n ref={ref}\n role=\"button\"\n tabIndex={disabled ? -1 : 0}\n className={cn(\n artifactCardStyles({\n status: effectiveStatus,\n disabled,\n }),\n className,\n )}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n aria-disabled={disabled}\n aria-label={`${title} - ${subtitle}${\n effectiveStatus === 'error' ? ' - Error occurred' : ''\n }${effectiveStatus === 'generating' ? ' - Generating' : ''}`}\n initial=\"rest\"\n whileHover=\"hover\"\n animate={animationState}\n >\n {/* Background Layer - solid color */}\n <div className={hoverBackgroundStyles({ status: effectiveStatus })}>\n <div className={animatedGradientStyles({ status: effectiveStatus })} />\n </div>\n\n {/* Preview Section */}\n {renderPreview()}\n\n {/* Content Section with slide animation */}\n <motion.div\n className={contentContainerStyles()}\n variants={contentSlideVariants}\n >\n <p className={titleStyles()} title={title}>\n {title}\n </p>\n <p className={subtitleStyles()} title={subtitle}>\n {subtitle}\n </p>\n </motion.div>\n\n {/* Action Icon Section with swap animation */}\n <div className={iconContainerStyles()}>{renderActionIcon()}</div>\n </motion.div>\n );\n },\n);\n\nArtifactCard.displayName = 'ArtifactCard';\n","import { cva } from 'class-variance-authority';\n\nexport const breadcrumbsStyles = cva('flex items-center flex-wrap gap-2', {\n variants: {\n size: {\n small: 'text-[0.875rem] leading-[1.25rem]', // typography-tiny\n medium: 'text-[1rem] leading-[1.5rem]', // typography-small\n },\n },\n defaultVariants: {\n size: 'medium',\n },\n});\n\nexport const breadcrumbItemStyles = cva(\n 'inline-flex items-center gap-2 transition-colors duration-200 rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] focus-visible:ring-offset-2',\n {\n variants: {\n state: {\n default:\n 'text-[var(--color-gray-600)] hover:text-[var(--color-blue-1000)] cursor-pointer',\n active: 'text-[var(--color-blue-1000)] font-medium cursor-default',\n inactive: 'text-[var(--color-gray-600)] cursor-default',\n },\n },\n defaultVariants: {\n state: 'default',\n },\n }\n);\n\nexport const separatorStyles = cva(\n 'text-[var(--color-gray-600)] flex items-center justify-center'\n);\n\n","import { ReactNode } from 'react';\n\nimport {\n breadcrumbsStyles,\n breadcrumbItemStyles,\n separatorStyles,\n} from './Breadcrumbs.styles';\n\nimport { cn } from '@/utils/cn';\n\nimport { ChevronRight } from '@/components/atoms/icons';\n\nexport interface BreadcrumbItem {\n label: string;\n href?: string;\n onClick?: () => void;\n icon?: ReactNode;\n}\n\nexport interface BreadcrumbsProps {\n items: BreadcrumbItem[];\n separator?: ReactNode;\n className?: string;\n size?: 'small' | 'medium';\n}\n\nexport const Breadcrumbs = ({\n items,\n separator = <ChevronRight size={16} />,\n className,\n size = 'medium',\n}: BreadcrumbsProps) => {\n return (\n <nav\n aria-label=\"Breadcrumb\"\n className={cn(breadcrumbsStyles({ size }), className)}\n >\n <ol className=\"flex items-center flex-wrap gap-2\">\n {items.map((item, index) => {\n const isLast = index === items.length - 1;\n let content;\n\n if (isLast) {\n content = (\n <span\n className={breadcrumbItemStyles({ state: 'active' })}\n aria-current=\"page\"\n >\n {item.icon}\n {item.label}\n </span>\n );\n } else if (item.href) {\n content = (\n <a\n href={item.href}\n className={breadcrumbItemStyles({ state: 'default' })}\n onClick={item.onClick}\n >\n {item.icon}\n {item.label}\n </a>\n );\n } else if (item.onClick) {\n content = (\n <button\n type=\"button\"\n className={breadcrumbItemStyles({ state: 'default' })}\n onClick={item.onClick}\n >\n {item.icon}\n {item.label}\n </button>\n );\n } else {\n content = (\n <span className={breadcrumbItemStyles({ state: 'inactive' })}>\n {item.icon}\n {item.label}\n </span>\n );\n }\n\n return (\n <li\n key={`${item.label}-${index}`}\n className=\"flex items-center gap-2\"\n >\n {content}\n {!isLast && (\n <span className={separatorStyles()} aria-hidden=\"true\">\n {separator}\n </span>\n )}\n </li>\n );\n })}\n </ol>\n </nav>\n );\n};\n","export type Variant = 'default' | 'secondary' | 'outline' | 'ghost' | 'destructive' | 'link';\nexport type Size = 'sm' | 'default' | 'lg' | 'icon';\n\nexport const SIZE_CLASSES: Record<Size, string> = {\n sm: 'h-8 px-3 text-xs gap-1.5 rounded-md',\n default: 'h-10 px-4 text-sm gap-2 rounded-lg',\n lg: 'h-12 px-6 text-base gap-2.5 rounded-lg',\n icon: 'h-10 w-10 rounded-lg',\n};\n","// React\nimport React, { forwardRef } from 'react';\n\n// Styles\nimport { cn } from '@/utils/cn';\nimport { useTokens } from '@/platform';\nimport { SIZE_CLASSES } from './Button.styles';\n\n// Types\nimport type { Variant, Size } from './Button.styles';\n\nexport interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n variant?: Variant;\n size?: Size;\n loading?: boolean;\n leftIcon?: React.ReactNode;\n rightIcon?: React.ReactNode;\n /** Alias for leftIcon */\n startIcon?: React.ReactNode;\n /** Alias for rightIcon */\n endIcon?: React.ReactNode;\n}\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n variant = 'default',\n size = 'default',\n loading = false,\n disabled,\n leftIcon,\n rightIcon,\n startIcon,\n endIcon,\n children,\n className,\n style,\n onMouseEnter,\n onMouseLeave,\n ...props\n },\n ref\n ) => {\n const tk = useTokens();\n const isDisabled = disabled || loading;\n\n const resolvedLeftIcon = leftIcon ?? startIcon;\n const resolvedRightIcon = rightIcon ?? endIcon;\n\n const variantStyles: Record<Variant, React.CSSProperties> = {\n default: { background: tk.primary, color: tk.white },\n secondary: { background: tk.white, color: tk.primaryDeep, border: `1px solid ${tk.n200}` },\n outline: { background: 'transparent', color: tk.primaryDeep, border: `1px solid ${tk.n200}` },\n ghost: { background: 'transparent', color: tk.n800 },\n destructive: { background: tk.error, color: tk.white },\n link: { background: 'transparent', color: tk.primary, padding: 0, height: 'auto' },\n };\n\n const handleMouseEnter = (e: React.MouseEvent<HTMLButtonElement>) => {\n if (variant === 'link') e.currentTarget.style.textDecoration = 'underline';\n else e.currentTarget.style.opacity = '0.85';\n onMouseEnter?.(e);\n };\n\n const handleMouseLeave = (e: React.MouseEvent<HTMLButtonElement>) => {\n if (variant === 'link') e.currentTarget.style.textDecoration = 'none';\n else e.currentTarget.style.opacity = '1';\n onMouseLeave?.(e);\n };\n\n return (\n <button\n ref={ref}\n className={cn(\n 'inline-flex items-center justify-center font-light transition-all duration-150 cursor-pointer',\n SIZE_CLASSES[size],\n isDisabled && 'opacity-50 cursor-not-allowed pointer-events-none',\n className\n )}\n style={{\n ...variantStyles[variant],\n fontFamily: tk.font,\n ...(variant === 'link' ? { textDecoration: 'none' } : {}),\n ...style,\n }}\n disabled={isDisabled}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n {...props}\n >\n {loading ? (\n <svg className=\"w-4 h-4 animate-spin\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\">\n <path d=\"M21 12a9 9 0 1 1-6.219-8.56\" />\n </svg>\n ) : resolvedLeftIcon ? (\n <span className=\"shrink-0\">{resolvedLeftIcon}</span>\n ) : null}\n {children}\n {!loading && resolvedRightIcon && <span className=\"shrink-0\">{resolvedRightIcon}</span>}\n </button>\n );\n }\n);\n\nButton.displayName = 'Button';\n","import { cva } from 'class-variance-authority';\n\nexport const fileIconContainerStyles = cva(\n 'flex items-center justify-center shrink-0 rounded-[2px]',\n {\n variants: {\n size: {\n sm: 'p-1',\n md: 'p-1.5',\n lg: 'p-2 rounded-[4px]',\n },\n },\n defaultVariants: {\n size: 'sm',\n },\n }\n);\n","// React\nimport React, { forwardRef } from 'react';\n\n// Components\nimport {\n FileText,\n Grid,\n Code,\n WhiteboardView,\n Archive,\n Video,\n Volume2,\n Pdf,\n} from '@/components/atoms/icons';\n\n// Styles\nimport { fileIconContainerStyles } from './FileIcon.styles';\nimport { cn } from '@/utils/cn';\n\n/**\n * Configuration for a file type including its background color, icon color, and icon component.\n */\nexport interface FileTypeConfig {\n background: string;\n iconColor: string;\n icon: React.FC<{ size?: number | string; color?: string; className?: string }>;\n}\n\n/**\n * Map of file extensions to their visual configuration.\n */\nexport const FILE_TYPE_MAP: Record<string, FileTypeConfig> = {\n // Text files\n txt: { background: '#f5f6fa', iconColor: '#8c92af', icon: FileText },\n\n // Documents\n docx: { background: '#E0F2FF', iconColor: '#0369A1', icon: FileText },\n doc: { background: '#E0F2FF', iconColor: '#0369A1', icon: FileText },\n pdf: { background: '#ffecec', iconColor: '#fb6060', icon: Pdf },\n\n // Spreadsheets\n csv: { background: '#e2f7e5', iconColor: '#71d481', icon: Grid },\n xlsx: { background: '#e2f7e5', iconColor: '#71d481', icon: Grid },\n xls: { background: '#e2f7e5', iconColor: '#71d481', icon: Grid },\n\n // Code files\n json: { background: '#fff2e2', iconColor: '#e15713', icon: Code },\n js: { background: '#fff2e2', iconColor: '#ff6f00', icon: Code },\n ts: { background: '#E0F2FF', iconColor: '#0369A1', icon: Code },\n md: { background: '#f5f6fa', iconColor: '#8c92af', icon: Code },\n\n // Presentations\n pptx: { background: '#FFE5D2', iconColor: '#C2410C', icon: WhiteboardView },\n ppt: { background: '#FFE5D2', iconColor: '#C2410C', icon: WhiteboardView },\n\n // Archives\n zip: { background: '#f5f6fa', iconColor: '#8c92af', icon: Archive },\n rar: { background: '#f5f6fa', iconColor: '#8c92af', icon: Archive },\n '7z': { background: '#f5f6fa', iconColor: '#8c92af', icon: Archive },\n\n // Video\n mp4: { background: '#FEE2E5', iconColor: '#BE123C', icon: Video },\n mov: { background: '#FEE2E5', iconColor: '#BE123C', icon: Video },\n avi: { background: '#FEE2E5', iconColor: '#BE123C', icon: Video },\n\n // Audio\n mp3: { background: '#E4E4F8', iconColor: '#6D28D9', icon: Volume2 },\n wav: { background: '#E4E4F8', iconColor: '#6D28D9', icon: Volume2 },\n};\n\n/**\n * Default configuration for unknown file types.\n */\nconst DEFAULT_FILE_TYPE_CONFIG: FileTypeConfig = {\n background: '#f5f6fa',\n iconColor: '#8c92af',\n icon: FileText,\n};\n\n/**\n * Extract the file extension from a filename.\n * Handles edge cases like no extension, double extensions, and case insensitivity.\n * @param filename - The full filename\n * @returns The lowercase extension without the dot, or empty string if none\n */\nexport const getFileExtension = (filename: string): string => {\n if (!filename) return '';\n\n const lastDotIndex = filename.lastIndexOf('.');\n\n // No extension (e.g., \"Dockerfile\") or dot at start (e.g., \".gitignore\")\n if (lastDotIndex <= 0) return '';\n\n return filename.slice(lastDotIndex + 1).toLowerCase();\n};\n\n/**\n * Get the file type configuration for a given filename.\n * @param filename - The full filename\n * @returns The FileTypeConfig for this file type\n */\nexport const getFileTypeConfig = (filename: string): FileTypeConfig => {\n const extension = getFileExtension(filename);\n return FILE_TYPE_MAP[extension] || DEFAULT_FILE_TYPE_CONFIG;\n};\n\nexport interface FileIconProps {\n /** The filename to determine the icon type from */\n filename: string;\n /** Size of the icon container */\n size?: 'sm' | 'md' | 'lg';\n /** Additional CSS classes */\n className?: string;\n}\n\n/**\n * FileIcon renders a file-type icon with a colored background based on the file extension.\n */\nconst ICON_SIZES: Record<'sm' | 'md' | 'lg', number> = {\n sm: 12,\n md: 16,\n lg: 24,\n};\n\nexport const FileIcon = forwardRef<HTMLDivElement, FileIconProps>(\n ({ filename, size = 'sm', className }, ref) => {\n const config = getFileTypeConfig(filename);\n const IconComponent = config.icon;\n const iconSize = ICON_SIZES[size];\n\n return (\n <div\n ref={ref}\n className={cn(fileIconContainerStyles({ size }), className)}\n style={{\n backgroundColor: config.background,\n color: config.iconColor, // Isolate from parent CSS color inheritance\n }}\n >\n <IconComponent size={iconSize} color={config.iconColor} className=\"shrink-0\" />\n </div>\n );\n }\n);\n\nFileIcon.displayName = 'FileIcon';\n","import { cva } from 'class-variance-authority';\n\n/**\n * Container styles for the chip.\n *\n * Type-specific colors (skill/autopilot) are applied via inline styles\n * in Chip.tsx to avoid Tailwind JIT content-scanning issues in monorepo setups.\n */\nexport const chipContainerStyles = cva(\n 'relative inline-flex items-center px-1 py-1 gap-1 rounded-[5px] border overflow-hidden transition-colors',\n {\n variants: {\n status: {\n none: '',\n uploading: 'border-[var(--color-gray-600)] bg-[var(--color-gray-50)]',\n processing: 'border-[var(--color-gray-600)] bg-[var(--color-gray-50)]',\n done: 'border-[var(--color-gray-200)] bg-[var(--color-white)]',\n error: 'border-[var(--color-gray-200)] bg-[var(--color-white)]',\n },\n },\n defaultVariants: {\n status: 'done',\n },\n },\n);\n\n/**\n * Label/name text styles\n */\nexport const chipLabelStyles = cva(\n 'truncate text-[0.75rem] leading-[1rem] font-normal',\n {\n variants: {\n status: {\n none: '',\n uploading: 'text-[var(--color-gray-600)]',\n processing: 'text-[var(--color-gray-800)]',\n done: 'text-[var(--color-gray-800)]',\n error: 'text-[var(--color-gray-800)]',\n },\n },\n defaultVariants: {\n status: 'done',\n },\n },\n);\n\n/**\n * Icon styles (for status icons during upload/processing/error)\n */\nexport const chipIconStyles = cva('shrink-0', {\n variants: {\n status: {\n uploading: 'text-[var(--color-blue-800)]',\n processing: 'text-[var(--color-blue-800)]',\n done: 'text-[var(--color-gray-600)]',\n error: 'text-[var(--color-red-1000)]',\n },\n },\n defaultVariants: {\n status: 'done',\n },\n});\n\n/**\n * Progress bar background styles\n */\nexport const chipProgressBarStyles = cva(\n 'absolute top-0 left-0 bottom-0 bg-[var(--color-gray-200)] z-0 rounded-bl-[4px] rounded-tl-[4px]',\n {\n variants: {\n status: {\n uploading: 'opacity-100',\n processing: 'opacity-100',\n done: 'opacity-0',\n error: 'opacity-0',\n },\n },\n defaultVariants: {\n status: 'uploading',\n },\n },\n);\n\n/**\n * Leading icon container styles (for mention type icons)\n */\nexport const chipLeadingIconContainerStyles = cva(\n 'flex items-center justify-center shrink-0 p-1 rounded-[2px]',\n {\n variants: {\n variant: {\n file: '',\n template: 'bg-[var(--color-entity-sky)]',\n client: '',\n agent: 'bg-[var(--color-entity-sky)]',\n workstream: 'bg-[var(--color-entity-sky)]',\n status: '',\n skill: '',\n autopilot: '',\n },\n },\n defaultVariants: {\n variant: 'file',\n },\n },\n);\n","/**\n * Chip Component Types\n *\n * Discriminated union types for all chip variants used in chat attachments.\n */\n\n/**\n * Status for file chips during upload/processing\n */\nexport enum ChipStatus {\n Uploading = 'uploading',\n Processing = 'processing',\n Done = 'done',\n Error = 'error',\n}\n\n/**\n * Base props shared by all chip types\n */\ninterface ChipBaseProps {\n /** Additional CSS classes */\n className?: string;\n /** Callback when delete button is clicked (shows delete button on hover when provided) */\n onDelete?: () => void;\n}\n\n/**\n * File attachment chip (uploaded/dropped files)\n */\nexport interface FileChipProps extends ChipBaseProps {\n type: 'file';\n /** The filename to display */\n filename: string;\n /** Current status of the file */\n status?: ChipStatus;\n /** Upload/processing progress (0-100) */\n progress?: number;\n}\n\n/**\n * File mention chip (@-referenced files)\n */\nexport interface FileMentionChipProps extends ChipBaseProps {\n type: 'fileMention';\n /** The filename to display */\n filename: string;\n}\n\n/**\n * Template mention chip\n */\nexport interface TemplateMentionChipProps extends ChipBaseProps {\n type: 'templateMention';\n /** The template name to display */\n name: string;\n}\n\n/**\n * Client mention chip (initials generated from name)\n */\nexport interface ClientMentionChipProps extends ChipBaseProps {\n type: 'clientMention';\n /** The client name to display (also used for initials) */\n name: string;\n}\n\n/**\n * Agent mention chip\n */\nexport interface AgentMentionChipProps extends ChipBaseProps {\n type: 'agentMention';\n /** The agent name to display (also used as title/aria fallback) */\n name: string;\n /** Optional icon image URL (e.g. built-in agent logo). Falls back to generic Cpu icon when absent. */\n iconSrc?: string | null;\n /** Optional custom label content (ReactNode). When provided, rendered instead of the plain `name` text. */\n labelContent?: React.ReactNode;\n}\n\n/**\n * Workstream mention chip\n */\nexport interface WorkstreamMentionChipProps extends ChipBaseProps {\n type: 'workstreamMention';\n /** The workstream name to display */\n name: string;\n}\n\n/**\n * Skill chip (injected from Skills expandable menu)\n */\nexport interface SkillChipProps extends ChipBaseProps {\n type: 'skill';\n /** The skill name to display */\n name: string;\n}\n\n/**\n * Autopilot chip (injected from Autopilot expandable menu)\n */\nexport interface AutopilotChipProps extends ChipBaseProps {\n type: 'autopilot';\n /** The autopilot task name to display */\n name: string;\n}\n\n/**\n * Discriminated union of all chip props\n */\nexport type ChipProps =\n | FileChipProps\n | FileMentionChipProps\n | TemplateMentionChipProps\n | ClientMentionChipProps\n | AgentMentionChipProps\n | WorkstreamMentionChipProps\n | SkillChipProps\n | AutopilotChipProps;\n","import React from 'react';\nimport { motion } from 'framer-motion';\nimport { X } from '@/components/atoms/icons';\n\nexport interface ChipDeleteButtonProps {\n /** Callback when button is clicked */\n onClick: () => void;\n}\n\n/**\n * Animated delete button that appears on chip hover.\n * Positioned at top-right corner of parent chip.\n */\nexport const ChipDeleteButton: React.FC<ChipDeleteButtonProps> = ({ onClick }) => {\n const handleClick = (e: React.MouseEvent) => {\n e.stopPropagation();\n onClick();\n };\n\n return (\n <motion.button\n onClick={handleClick}\n className=\"absolute -top-[6px] -right-[6px] hidden group-hover:flex items-center justify-center bg-[var(--color-white)] border border-[var(--color-gray-200)] rounded-[8px] p-[2px] focus:outline-none focus:ring-2 focus:ring-[var(--color-blue-800)] shrink-0 z-20\"\n aria-label=\"Remove\"\n initial={{ scale: 0, opacity: 0 }}\n whileInView={{ scale: 1, opacity: 1 }}\n whileHover={{ scale: 1.1 }}\n whileTap={{ scale: 0.95 }}\n transition={{\n scale: { type: 'spring', stiffness: 400, damping: 17 },\n opacity: { duration: 0.2 },\n }}\n >\n <X size={10} className=\"text-[var(--color-gray-800)]\" />\n </motion.button>\n );\n};\n\nChipDeleteButton.displayName = 'ChipDeleteButton';\n","import React from 'react';\nimport { FileIcon } from '../../FileIcon/FileIcon';\nimport { Avatar } from '@/components/atoms/Avatar/Avatar';\nimport { FileText, WorkStream, Layout, Loader, ArrowUp, TriangleAlert, Cpu } from '@/components/atoms/icons';\nimport { chipIconStyles, chipLeadingIconContainerStyles } from '../Chip.styles';\nimport { ChipStatus, type ChipProps } from '../Chip.types';\nimport { cn } from '@/utils/cn';\n\n/** Size used for FileIcon when shown inside a chip (consistent across file and fileMention). */\nconst CHIP_FILE_ICON_SIZE = 'sm' as const;\n\nexport interface ChipLeadingContentProps {\n /** The chip props to determine what to render */\n chipProps: ChipProps;\n}\n\n/**\n * Returns the filename when the chip has a file reference (file or fileMention), and whether to show FileIcon.\n * For file chips, FileIcon is only shown when status is Done.\n */\nconst getFileLeadingProps = (\n chipProps: ChipProps\n): { filename: string; showFileIcon: boolean } | null => {\n if (chipProps.type === 'file') {\n const status = chipProps.status ?? ChipStatus.Done;\n return {\n filename: chipProps.filename,\n showFileIcon: status === ChipStatus.Done,\n };\n }\n if (chipProps.type === 'fileMention') {\n return { filename: chipProps.filename, showFileIcon: true };\n }\n return null;\n};\n\n/**\n * Renders the appropriate leading content (icon/avatar) based on chip type.\n * Uses the shared FileIcon component for any chip with a file reference (file or fileMention when applicable).\n */\nexport const ChipLeadingContent: React.FC<ChipLeadingContentProps> = ({ chipProps }) => {\n const { type } = chipProps;\n\n // Any chip with a file reference: use FileIcon when we should show the type icon (done or mention)\n const fileLeading = getFileLeadingProps(chipProps);\n if (fileLeading?.showFileIcon) {\n return (\n <FileIcon\n filename={fileLeading.filename}\n size={CHIP_FILE_ICON_SIZE}\n />\n );\n }\n\n // File chip in uploading/processing/error state – status icons only\n if (type === 'file') {\n const { status = ChipStatus.Done } = chipProps;\n const isUploading = status === ChipStatus.Uploading;\n const isProcessing = status === ChipStatus.Processing;\n const isError = status === ChipStatus.Error;\n const statusVariant = isUploading ? 'uploading' : isProcessing ? 'processing' : 'error';\n\n return (\n <div\n className={cn(\n chipLeadingIconContainerStyles({ variant: 'status' }),\n isError && 'bg-[var(--color-red-200)]'\n )}\n >\n {isUploading && (\n <ArrowUp size={12} className={chipIconStyles({ status: statusVariant })} />\n )}\n {isProcessing && (\n <Loader\n size={12}\n className={cn(chipIconStyles({ status: statusVariant }), 'animate-spin')}\n />\n )}\n {isError && (\n <TriangleAlert size={12} className={chipIconStyles({ status: statusVariant })} />\n )}\n </div>\n );\n }\n\n // Template mention - FileText icon\n if (type === 'templateMention') {\n return (\n <div className={chipLeadingIconContainerStyles({ variant: 'template' })}>\n <FileText size={12} className=\"text-[var(--color-gray-600)]\" />\n </div>\n );\n }\n\n // Client mention - Avatar with initials\n if (type === 'clientMention') {\n return (\n <Avatar\n type=\"text\"\n initials={chipProps.name}\n size=\"small\"\n shape=\"circular\"\n />\n );\n }\n\n // Agent mention - custom icon image or fallback Cpu icon\n if (type === 'agentMention') {\n if (chipProps.iconSrc) {\n return (\n <img\n src={chipProps.iconSrc}\n alt=\"\"\n aria-hidden=\"true\"\n // Decorative only: chip label text already conveys the agent identity.\n className=\"w-5 h-5 rounded-[3px] object-cover shrink-0\"\n />\n );\n }\n\n return (\n <div className={chipLeadingIconContainerStyles({ variant: 'agent' })}>\n <Cpu size={12} className=\"text-[var(--color-gray-600)]\" />\n </div>\n );\n }\n\n // Workstream mention - WorkStream icon\n if (type === 'workstreamMention') {\n return (\n <div className={chipLeadingIconContainerStyles({ variant: 'workstream' })}>\n <WorkStream size={12} className=\"text-[var(--color-gray-600)]\" />\n </div>\n );\n }\n\n // Skill chip - FileText icon with teal-tinted background (inline style for reliability)\n if (type === 'skill') {\n return (\n <div\n className={chipLeadingIconContainerStyles({ variant: 'skill' })}\n style={{ backgroundColor: 'var(--color-blue-800-bg)' }}\n >\n <FileText size={12} style={{ color: 'var(--color-blue-800)' }} />\n </div>\n );\n }\n\n // Autopilot chip - Layout icon with teal-tinted background (inline style for reliability)\n if (type === 'autopilot') {\n return (\n <div\n className={chipLeadingIconContainerStyles({ variant: 'autopilot' })}\n style={{ backgroundColor: 'var(--color-blue-800-bg)' }}\n >\n <Layout size={12} style={{ color: 'var(--color-gray-600)' }} />\n </div>\n );\n }\n\n return null;\n};\n\nChipLeadingContent.displayName = 'ChipLeadingContent';\n","import React, { type CSSProperties } from 'react';\nimport { motion } from 'framer-motion';\nimport { cn } from '@/utils/cn';\nimport { chipContainerStyles, chipLabelStyles, chipProgressBarStyles } from './Chip.styles';\nimport { ChipStatus, type ChipProps } from './Chip.types';\nimport { ChipDeleteButton } from './components/ChipDeleteButton';\nimport { ChipLeadingContent } from './components/ChipLeadingContent';\n\n/**\n * Truncate filename while preserving the extension.\n * For long filenames, shows: \"truncated-na….ext\"\n */\nconst truncateFilename = (filename: string, maxLength = 20): string => {\n if (filename.length <= maxLength) return filename;\n\n const lastDotIndex = filename.lastIndexOf('.');\n\n // No extension found, just truncate normally\n if (lastDotIndex === -1 || lastDotIndex === 0) {\n return filename.slice(0, maxLength - 1) + '…';\n }\n\n const baseName = filename.slice(0, lastDotIndex);\n const extension = filename.slice(lastDotIndex); // includes the dot\n\n // If extension is very long, just truncate the whole thing\n if (extension.length >= maxLength - 3) {\n return filename.slice(0, maxLength - 1) + '…';\n }\n\n // Calculate how much space we have for the base name\n const availableForBase = maxLength - extension.length - 1;\n\n if (availableForBase < 3) {\n return filename.slice(0, maxLength - 1) + '…';\n }\n\n return baseName.slice(0, availableForBase) + '…' + extension;\n};\n\n/**\n * Get the display label for a chip\n */\nconst getChipLabel = (props: ChipProps): string => {\n switch (props.type) {\n case 'file':\n case 'fileMention':\n return truncateFilename(props.filename);\n case 'templateMention':\n case 'clientMention':\n case 'agentMention':\n case 'workstreamMention':\n case 'skill':\n case 'autopilot':\n return props.name;\n }\n};\n\n/**\n * Get the full label for title attribute\n */\nconst getFullLabel = (props: ChipProps): string => {\n switch (props.type) {\n case 'file':\n case 'fileMention':\n return props.filename;\n case 'templateMention':\n case 'clientMention':\n case 'agentMention':\n case 'workstreamMention':\n case 'skill':\n case 'autopilot':\n return props.name;\n }\n};\n\n/**\n * Inline styles for chip-type-specific visuals.\n * Applied via style prop to avoid Tailwind JIT content-scanning issues\n * where new arbitrary classes in the UI package dist aren't picked up\n * until the consumer app's dev server is restarted.\n */\nconst CHIP_TYPE_CONTAINER_STYLES: Record<string, CSSProperties> = {\n skill: {\n borderColor: 'var(--color-blue-800)',\n backgroundColor: 'var(--color-blue-800-bg)',\n },\n autopilot: {\n borderColor: 'var(--color-gray-200)',\n backgroundColor: 'var(--color-gray-100)',\n },\n};\n\nconst CHIP_TYPE_LABEL_STYLES: Record<string, CSSProperties> = {\n skill: { color: 'var(--color-blue-800)' },\n autopilot: { color: 'var(--color-gray-600)' },\n};\n\n/**\n * Chip Component\n *\n * A unified component for rendering attachment chips in chat.\n * Supports multiple types: file, fileMention, templateMention, clientMention,\n * agentMention, workstreamMention, skill, autopilot.\n */\nexport const Chip: React.FC<ChipProps> = (props) => {\n const { type, className, onDelete } = props;\n\n // Determine status variant (only applicable for file type)\n const status = type === 'file' ? (props.status ?? ChipStatus.Done) : ChipStatus.Done;\n const isUploading = status === ChipStatus.Uploading;\n const isProcessing = status === ChipStatus.Processing;\n const progress = type === 'file' ? (props.progress ?? 0) : 0;\n\n // Show progress bar only for uploading/processing states\n const showProgressBar = (isUploading || isProcessing) && type === 'file';\n\n // Show delete button only when not uploading/processing and onDelete is provided\n const showDeleteButton = onDelete && !isUploading && !isProcessing;\n\n const label = getChipLabel(props);\n const fullLabel = getFullLabel(props);\n\n // Agent mention chips can supply custom ReactNode content via labelContent\n const customLabelContent =\n type === 'agentMention' ? props.labelContent : undefined;\n\n // For skill/autopilot, skip the status variant to avoid tailwind-merge conflicts\n const isTypedChip = type === 'skill' || type === 'autopilot';\n const containerStatus = isTypedChip ? 'none' as const : status;\n const labelStatus = isTypedChip ? 'none' as const : status;\n\n const containerStyle = isTypedChip ? CHIP_TYPE_CONTAINER_STYLES[type] : undefined;\n const labelStyle = isTypedChip ? CHIP_TYPE_LABEL_STYLES[type] : undefined;\n\n return (\n <div className=\"relative inline-block group\">\n <div\n className={cn(chipContainerStyles({ status: containerStatus }), className)}\n style={containerStyle}\n >\n {/* Progress Bar Background */}\n {showProgressBar && (\n <motion.div\n className={chipProgressBarStyles({ status })}\n initial={{ width: '0%' }}\n animate={{ width: `${progress}%` }}\n transition={{ duration: 0.3, ease: 'easeOut' }}\n />\n )}\n\n {/* Content */}\n <div className=\"relative z-10 flex items-center gap-1 pr-1\">\n <ChipLeadingContent chipProps={props} />\n {customLabelContent ? (\n <span\n className={chipLabelStyles({ status: labelStatus })}\n style={labelStyle}\n title={fullLabel}\n >\n {customLabelContent}\n </span>\n ) : (\n <span\n className={chipLabelStyles({ status: labelStatus })}\n style={labelStyle}\n title={fullLabel}\n >\n {label}\n </span>\n )}\n </div>\n </div>\n\n {/* Delete Button - Shows on Hover */}\n {showDeleteButton && <ChipDeleteButton onClick={onDelete} />}\n </div>\n );\n};\n\nChip.displayName = 'Chip';\n","import { cva } from 'class-variance-authority';\n\nexport const checkboxLabelStyles = cva(\n 'inline-flex items-center gap-2 cursor-pointer select-none group disabled:cursor-not-allowed disabled:opacity-50 w-fit',\n {\n variants: {\n size: {\n medium: 'text-[1rem] leading-[1.5rem] gap-2',\n small: 'gap-1',\n },\n },\n defaultVariants: {\n size: 'medium',\n },\n },\n);\n\nexport const checkboxVisualWrapperStyles = cva(\n 'flex items-center justify-center transition-colors duration-200 ease-in-out rounded-[2px] border shrink-0 peer-focus-visible:ring-2 peer-focus-visible:ring-[var(--color-blue-200)] peer-focus-visible:ring-offset-1',\n {\n variants: {\n checked: {\n true: 'bg-[var(--color-blue-800)] border-[var(--color-blue-800)] text-white',\n false:\n 'bg-white border-[var(--color-gray-200)] group-hover:border-[var(--color-gray-600)]',\n },\n indeterminate: {\n true: 'bg-[var(--color-blue-800)] border-[var(--color-blue-800)]',\n false: '',\n },\n size: {\n medium: 'w-[16px] h-[16px]', // 16px\n small: 'w-[12px] h-[12px]', // 12px\n },\n },\n defaultVariants: {\n checked: false,\n indeterminate: false,\n size: 'medium',\n },\n },\n);\n\n// Invisible input but accessible\nexport const checkboxInputStyles = 'sr-only peer';\n","// 1: react / next\nimport React, { forwardRef, useEffect, useRef, useState } from 'react';\n\n// 2: components\nimport { Typography } from '@/components/atoms/Typography/Typography';\n\n// 3: styles\nimport {\n checkboxInputStyles,\n checkboxLabelStyles,\n checkboxVisualWrapperStyles,\n} from './Checkbox.styles';\n\n// 6: misc\nimport { Check } from '@/components/atoms/icons';\nimport { cn } from '@/utils/cn';\n\nexport interface CheckboxProps\n extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {\n label?: string;\n size?: 'medium' | 'small';\n indeterminate?: boolean;\n}\n\nexport const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(\n (\n {\n className,\n checked,\n defaultChecked,\n onChange,\n label,\n size = 'medium',\n disabled,\n indeterminate = false,\n ...props\n },\n ref,\n ) => {\n const [internalChecked, setInternalChecked] = useState(\n defaultChecked || false,\n );\n const isControlled = checked !== undefined;\n const isChecked = isControlled ? checked : internalChecked;\n\n const internalRef = useRef<HTMLInputElement>(null);\n\n // Sync indeterminate property on the native input\n useEffect(() => {\n const el = internalRef.current;\n if (el) {\n el.indeterminate = indeterminate;\n }\n }, [indeterminate]);\n\n // Merge external ref with internal ref\n const setRefs = (node: HTMLInputElement | null) => {\n (internalRef as React.MutableRefObject<HTMLInputElement | null>).current = node;\n if (typeof ref === 'function') {\n ref(node);\n } else if (ref) {\n (ref as React.MutableRefObject<HTMLInputElement | null>).current = node;\n }\n };\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n if (!isControlled) {\n setInternalChecked(e.target.checked);\n }\n onChange?.(e);\n };\n\n return (\n <label className={checkboxLabelStyles({ size, className })}>\n <input\n type=\"checkbox\"\n className={checkboxInputStyles}\n ref={setRefs}\n checked={isControlled ? checked : undefined}\n defaultChecked={!isControlled ? defaultChecked : undefined}\n onChange={handleChange}\n disabled={disabled}\n {...props}\n />\n <span\n className={checkboxVisualWrapperStyles({\n checked: !!isChecked,\n indeterminate,\n size,\n })}\n >\n {indeterminate && !isChecked ? (\n <span className=\"w-2 h-0.5 rounded-full bg-white\" />\n ) : (\n <Check\n size={size === 'medium' ? 12 : 8}\n strokeWidth={3}\n className={cn(\n 'text-white transition-opacity duration-200',\n isChecked ? 'opacity-100' : 'opacity-0',\n )}\n />\n )}\n </span>\n {label && (\n <Typography\n as=\"span\"\n variant={size === 'medium' ? 'small' : 'x-small'}\n color=\"secondary\"\n >\n {label}\n </Typography>\n )}\n </label>\n );\n },\n);\n\nCheckbox.displayName = 'Checkbox';\n","import { cva } from 'class-variance-authority';\n\nexport const circularProgressContainerStyles = cva(\n 'relative inline-flex items-center justify-center',\n {\n variants: {\n size: {\n xs: 'w-[18px] h-[18px]',\n small: 'w-[24px] h-[24px]',\n medium: 'w-[32px] h-[32px]',\n large: 'w-[40px] h-[40px]',\n },\n },\n defaultVariants: {\n size: 'medium',\n },\n }\n);\n\nexport const circularProgressSvgStyles = cva('transform');\n\nexport const circularProgressTrackStyles = cva(\n 'stroke-[var(--color-gray-200)]'\n);\n\nexport const circularProgressIndicatorStyles = cva(\n 'transition-[stroke-dashoffset] duration-300 ease-in-out',\n {\n variants: {\n variant: {\n default: 'stroke-[var(--color-blue-800)]',\n success: 'stroke-[var(--color-green-1000)]',\n warning: 'stroke-[var(--color-orange-800)]',\n error: 'stroke-[var(--color-red-1000)]',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n }\n);\n\nexport const circularProgressLabelStyles = cva(\n 'absolute inset-0 flex items-center justify-center font-medium text-[var(--color-gray-800)]',\n {\n variants: {\n size: {\n xs: 'text-[6px]',\n small: 'text-[8px]',\n medium: 'text-[10px]',\n large: 'text-[12px]',\n },\n },\n defaultVariants: {\n size: 'medium',\n },\n }\n);\n\n","// React\nimport { forwardRef, HTMLAttributes } from 'react';\n\n// Styles\nimport { cn } from '@/utils/cn';\nimport {\n circularProgressContainerStyles,\n circularProgressSvgStyles,\n circularProgressTrackStyles,\n circularProgressIndicatorStyles,\n circularProgressLabelStyles,\n} from './CircularProgress.styles';\n\nexport interface CircularProgressProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * The current value of the progress.\n * @default 0\n */\n value?: number;\n /**\n * The maximum value of the progress.\n * @default 100\n */\n max?: number;\n /**\n * The size of the circular progress.\n * @default 'medium'\n */\n size?: 'xs' | 'small' | 'medium' | 'large';\n /**\n * The visual variant of the progress indicator.\n * @default 'default'\n */\n variant?: 'default' | 'success' | 'warning' | 'error';\n /**\n * Whether to show the value label in the center.\n * @default true\n */\n showLabel?: boolean;\n /**\n * Custom formatter for the value label.\n */\n labelFormatter?: (value: number, max: number) => string;\n /**\n * The stroke width of the progress ring.\n * @default 3\n */\n strokeWidth?: number;\n}\n\nconst SIZE_MAP = {\n xs: 18,\n small: 24,\n medium: 32,\n large: 40,\n};\n\nexport const CircularProgress = forwardRef<HTMLDivElement, CircularProgressProps>(\n (\n {\n className,\n value = 0,\n max = 100,\n size = 'medium',\n variant = 'default',\n showLabel = true,\n labelFormatter,\n strokeWidth = 3,\n ...props\n },\n ref\n ) => {\n const percentage = Math.min(Math.max((value / max) * 100, 0), 100);\n const sizePx = SIZE_MAP[size];\n const radius = (sizePx - strokeWidth) / 2;\n const circumference = 2 * Math.PI * radius;\n const strokeDashoffset = circumference - (percentage / 100) * circumference;\n\n const formattedLabel = labelFormatter\n ? labelFormatter(value, max)\n : `${Math.round(value)}`;\n\n return (\n <div\n ref={ref}\n className={cn(circularProgressContainerStyles({ size }), className)}\n role=\"progressbar\"\n aria-valuemin={0}\n aria-valuemax={max}\n aria-valuenow={value}\n {...props}\n >\n <svg\n className={circularProgressSvgStyles()}\n width={sizePx}\n height={sizePx}\n viewBox={`0 0 ${sizePx} ${sizePx}`}\n >\n {/* Background track */}\n <circle\n className={circularProgressTrackStyles()}\n cx={sizePx / 2}\n cy={sizePx / 2}\n r={radius}\n fill=\"none\"\n strokeWidth={strokeWidth}\n />\n {/* Progress indicator */}\n <circle\n className={circularProgressIndicatorStyles({ variant })}\n cx={sizePx / 2}\n cy={sizePx / 2}\n r={radius}\n fill=\"none\"\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeDasharray={circumference}\n strokeDashoffset={strokeDashoffset}\n transform={`rotate(-90 ${sizePx / 2} ${sizePx / 2})`}\n />\n </svg>\n {showLabel && (\n <span className={circularProgressLabelStyles({ size })}>\n {formattedLabel}\n </span>\n )}\n </div>\n );\n }\n);\n\nCircularProgress.displayName = 'CircularProgress';\n\n","import { useEffect, RefObject } from 'react';\n\ntype Handler = (event: MouseEvent | TouchEvent) => void;\n\nexport function useClickOutside<T extends HTMLElement = HTMLElement>(\n ref: RefObject<T>,\n handler: Handler\n): void {\n useEffect(() => {\n const listener = (event: MouseEvent | TouchEvent) => {\n const el = ref?.current;\n\n // Do nothing if clicking ref's element or descendent elements\n if (!el || el.contains(event.target as Node)) {\n return;\n }\n\n handler(event);\n };\n\n document.addEventListener('mousedown', listener);\n document.addEventListener('touchstart', listener);\n\n return () => {\n document.removeEventListener('mousedown', listener);\n document.removeEventListener('touchstart', listener);\n };\n }, [ref, handler]);\n}\n\n","import { cva } from 'class-variance-authority';\n\nexport const dropdownContentStyles = cva(\n 'absolute top-full left-0 z-50 w-full min-w-[200px] overflow-hidden rounded-[8px] border border-[var(--color-gray-200)] bg-[var(--color-white)] shadow-lg focus:outline-none',\n {\n variants: {\n align: {\n start: 'left-0',\n end: 'right-0 left-auto',\n center: 'left-1/2 -translate-x-1/2',\n },\n attached: {\n true: 'mt-0 rounded-t-none border-t-0',\n false: 'mt-2',\n },\n },\n defaultVariants: {\n align: 'start',\n attached: false,\n },\n },\n);\n\nexport const dropdownItemStyles = cva(\n 'flex w-full cursor-pointer items-center px-3 py-2 text-[0.875rem] text-[var(--color-gray-800)] transition-colors hover:bg-[var(--color-gray-50)] focus:bg-[var(--color-blue-200)] focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--color-blue-200)] disabled:pointer-events-none disabled:opacity-50',\n {\n variants: {\n active: {\n true: 'bg-[var(--color-blue-200)] text-[var(--color-blue-1000)]',\n },\n variant: {\n default: '',\n destructive:\n 'text-[var(--color-red-1000)] hover:bg-[var(--color-red-200)] focus:bg-[var(--color-red-200)]',\n },\n },\n defaultVariants: {\n variant: 'default',\n active: false,\n },\n },\n);\n\nexport const dropdownLabelStyles = cva(\n 'w-full px-3 py-1 text-[0.625rem] font-bold text-[var(--color-gray-600)] uppercase tracking-wider select-none',\n);\n\nexport const dropdownSeparatorStyles = cva(\n 'w-full h-px bg-[var(--color-gray-200)] my-1',\n);\n","import {\n useState,\n useRef,\n createContext,\n useContext,\n HTMLAttributes,\n forwardRef,\n MouseEvent,\n} from 'react';\nimport { AnimatePresence, motion, HTMLMotionProps } from 'framer-motion';\n\n// Components\nimport { ChevronDown } from '@/components/atoms/icons';\n\n// Hooks\nimport { useClickOutside } from '@/hooks/useClickOutside';\n\n// Styles\nimport { cn } from '@/utils/cn';\nimport {\n dropdownContentStyles,\n dropdownItemStyles,\n dropdownLabelStyles,\n dropdownSeparatorStyles,\n} from './Dropdown.styles';\n\n// Context\ninterface DropdownContextType {\n isOpen: boolean;\n toggle: () => void;\n close: () => void;\n}\nconst DropdownContext = createContext<DropdownContextType | undefined>(\n undefined,\n);\n\nexport const useDropdown = () => {\n const context = useContext(DropdownContext);\n if (!context) {\n throw new Error('useDropdown must be used within a Dropdown');\n }\n return context;\n};\n\n// Dropdown Root\nexport interface DropdownProps extends HTMLAttributes<HTMLDivElement> {\n defaultOpen?: boolean;\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n}\n\nexport const Dropdown = ({\n children,\n defaultOpen = false,\n open: controlledOpen,\n onOpenChange,\n className,\n ...props\n}: DropdownProps) => {\n const [uncontrolledOpen, setUncontrolledOpen] = useState(defaultOpen);\n const isControlled = controlledOpen !== undefined;\n const isOpen = isControlled ? controlledOpen : uncontrolledOpen;\n\n const dropdownRef = useRef<HTMLDivElement>(null);\n\n const toggle = () => {\n const newState = !isOpen;\n if (!isControlled) setUncontrolledOpen(newState);\n onOpenChange?.(newState);\n };\n\n const close = () => {\n if (!isControlled) setUncontrolledOpen(false);\n onOpenChange?.(false);\n };\n\n useClickOutside(dropdownRef, close);\n\n return (\n <DropdownContext.Provider value={{ isOpen, toggle, close }}>\n <div\n ref={dropdownRef}\n className={cn('relative w-full text-left', className)}\n {...props}\n >\n {children}\n </div>\n </DropdownContext.Provider>\n );\n};\n\nDropdown.displayName = 'Dropdown';\n\n// Trigger\nexport interface DropdownTriggerProps extends HTMLAttributes<HTMLDivElement> {\n /** Show a chevron icon positioned absolutely inside the trigger */\n chevronIcon?: boolean;\n}\n\nexport const DropdownTrigger = forwardRef<HTMLDivElement, DropdownTriggerProps>(\n (\n { className, children, onClick, chevronIcon = false, ...props },\n ref,\n ) => {\n const { toggle, isOpen } = useDropdown();\n\n const handleClick = (e: MouseEvent<HTMLDivElement>) => {\n toggle();\n onClick?.(e);\n };\n\n return (\n <div\n ref={ref}\n className={cn('cursor-pointer w-full relative overflow-visible', className)}\n onClick={handleClick}\n aria-haspopup=\"true\"\n aria-expanded={isOpen}\n {...props}\n >\n {children}\n {chevronIcon && (\n <motion.span\n animate={{ rotate: isOpen ? 180 : 0 }}\n transition={{ duration: 0.2, ease: [0.16, 1, 0.3, 1] }}\n className=\"absolute right-3 top-1/2 -translate-y-1/2 z-20 pointer-events-none text-[var(--color-gray-600)]\"\n >\n <ChevronDown size={16} />\n </motion.span>\n )}\n </div>\n );\n },\n);\nDropdownTrigger.displayName = 'DropdownTrigger';\n\n// Content\nexport interface DropdownContentProps\n extends Omit<HTMLMotionProps<'div'>, 'ref'> {\n align?: 'start' | 'end' | 'center';\n attached?: boolean;\n}\n\nexport const DropdownContent = forwardRef<HTMLDivElement, DropdownContentProps>(\n (\n { className, align = 'start', attached = false, children, ...props },\n ref,\n ) => {\n const { isOpen } = useDropdown();\n\n return (\n <AnimatePresence>\n {isOpen && (\n <motion.div\n ref={ref}\n initial={{ opacity: 0, y: -4, scale: 0.98 }}\n animate={{ opacity: 1, y: 0, scale: 1 }}\n exit={{ opacity: 0, y: -4, scale: 0.98 }}\n transition={{ duration: 0.2, ease: [0.16, 1, 0.3, 1] }}\n style={{ transformOrigin: 'top center' }}\n className={cn(\n dropdownContentStyles({ align, attached }),\n className,\n )}\n {...props}\n >\n {children}\n </motion.div>\n )}\n </AnimatePresence>\n );\n },\n);\nDropdownContent.displayName = 'DropdownContent';\n\n// Item\nexport interface DropdownItemProps extends HTMLAttributes<HTMLDivElement> {\n active?: boolean;\n variant?: 'default' | 'destructive';\n closeOnSelect?: boolean;\n}\n\nexport const DropdownItem = forwardRef<HTMLDivElement, DropdownItemProps>(\n (\n {\n className,\n active,\n variant,\n closeOnSelect = true,\n children,\n onClick,\n ...props\n },\n ref,\n ) => {\n const { close } = useDropdown();\n\n const handleClick = (e: MouseEvent<HTMLDivElement>) => {\n onClick?.(e);\n if (closeOnSelect) {\n close();\n }\n };\n\n return (\n <div\n ref={ref}\n className={cn(dropdownItemStyles({ active, variant }), className)}\n onClick={handleClick}\n role=\"menuitem\"\n {...props}\n >\n {children}\n </div>\n );\n },\n);\nDropdownItem.displayName = 'DropdownItem';\n\n// Label\nexport interface DropdownLabelProps extends HTMLAttributes<HTMLDivElement> { }\n\nexport const DropdownLabel = forwardRef<HTMLDivElement, DropdownLabelProps>(\n ({ className, children, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(dropdownLabelStyles(), className)}\n {...props}\n >\n {children}\n </div>\n );\n },\n);\nDropdownLabel.displayName = 'DropdownLabel';\n\n// Separator\nexport interface DropdownSeparatorProps extends HTMLAttributes<HTMLDivElement> {\n animated?: boolean;\n animationDelay?: number;\n}\n\nexport const DropdownSeparator = forwardRef<\n HTMLDivElement,\n DropdownSeparatorProps\n>(({ className, animated = false, animationDelay = 0.2, ...props }, ref) => {\n if (animated) {\n return (\n <div\n ref={ref}\n className={cn('h-px my-1 overflow-hidden', className)}\n {...props}\n >\n <motion.div\n className=\"h-full bg-[var(--color-gray-200)]\"\n initial={{ width: 0 }}\n animate={{ width: '100%' }}\n transition={{\n duration: 0.3,\n ease: [0.16, 1, 0.3, 1],\n delay: animationDelay,\n }}\n />\n </div>\n );\n }\n\n return (\n <div\n ref={ref}\n className={cn(dropdownSeparatorStyles(), className)}\n {...props}\n />\n );\n});\nDropdownSeparator.displayName = 'DropdownSeparator';\n","import { cva } from 'class-variance-authority';\n\nexport const inputStyles = cva(\n 'w-full bg-[var(--color-white)] border border-solid rounded-[8px] font-normal transition-colors duration-200 box-border focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50',\n {\n variants: {\n status: {\n default:\n 'border-[var(--color-gray-200)] text-[var(--color-gray-600)] placeholder:text-[var(--color-gray-600)] hover:border-[var(--color-gray-500)] focus:border-[var(--color-blue-1000)] focus:text-[var(--color-blue-1000)]',\n error:\n 'border-[var(--color-red-1000)] text-[var(--color-red-1000)] placeholder:text-[var(--color-red-1000)] focus:border-[var(--color-red-1000)]',\n success:\n 'border-[var(--color-green-1000)] text-[var(--color-green-1000)] placeholder:text-[var(--color-green-1000)] focus:border-[var(--color-green-1000)]',\n },\n size: {\n medium: 'px-4 py-4 text-[1rem] leading-[1.5rem]', // 16px/24px\n small: 'px-3 py-2 text-[0.875rem] leading-[1.25rem]', // 14px/20px\n tiny: 'p-2 text-[0.75rem] leading-[1rem]', // 12px/16px\n micro: 'px-1.5 py-1 text-[0.6875rem] leading-[0.875rem]', // 11px/14px\n },\n },\n defaultVariants: {\n status: 'default',\n size: 'medium',\n },\n },\n);\n\nexport const inputContainerStyles = cva('relative w-full', {\n variants: {\n size: {\n medium: '',\n small: '',\n tiny: '',\n micro: '',\n },\n },\n defaultVariants: {\n size: 'medium',\n },\n});\n\nexport const inputIconStyles = cva(\n 'absolute top-1/2 -translate-y-1/2 pointer-events-none flex items-center justify-center',\n {\n variants: {\n status: {\n default: 'text-[var(--color-gray-600)]',\n error: 'text-[var(--color-red-1000)]',\n success: 'text-[var(--color-green-1000)]',\n },\n position: {\n start: '',\n end: '',\n },\n size: {\n medium: 'size-[24px]',\n small: 'size-[16px]',\n tiny: 'size-[16px]',\n micro: 'size-[14px]',\n },\n },\n compoundVariants: [\n {\n position: 'start',\n size: 'medium',\n className: 'left-4',\n },\n {\n position: 'start',\n size: 'small',\n className: 'left-3',\n },\n {\n position: 'start',\n size: 'tiny',\n className: 'left-2',\n },\n {\n position: 'start',\n size: 'micro',\n className: 'left-1.5',\n },\n {\n position: 'end',\n size: 'medium',\n className: 'right-4',\n },\n {\n position: 'end',\n size: 'small',\n className: 'right-3',\n },\n {\n position: 'end',\n size: 'tiny',\n className: 'right-2',\n },\n {\n position: 'end',\n size: 'micro',\n className: 'right-1.5',\n },\n ],\n defaultVariants: {\n status: 'default',\n size: 'medium',\n position: 'end',\n },\n },\n);\n\nexport const inputErrorStyles = cva('text-[var(--color-red-1000)]', {\n variants: {\n size: {\n medium: 'text-[0.875rem] leading-[1.25rem]',\n small: 'text-[0.75rem] leading-[1rem]',\n tiny: 'text-[0.75rem] leading-[1rem]',\n micro: 'text-[0.6875rem] leading-[0.875rem]',\n },\n },\n defaultVariants: {\n size: 'medium',\n },\n});\n","import { InputHTMLAttributes, ReactNode, forwardRef, useId } from 'react';\nimport { cn } from '@/utils/cn';\nimport {\n inputStyles,\n inputContainerStyles,\n inputIconStyles,\n inputErrorStyles,\n} from './Input.styles';\n\nexport interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {\n status?: 'default' | 'error' | 'success';\n size?: 'medium' | 'small' | 'tiny' | 'micro';\n startIcon?: ReactNode;\n endIcon?: ReactNode;\n /** Error message to display below the input. When provided, automatically sets status to 'error'. */\n error?: string;\n /** Label displayed above the input */\n label?: string;\n /** Hint text displayed below the input (hidden when error is shown) */\n hint?: string;\n}\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>(\n (\n {\n className,\n status = 'default',\n size = 'medium',\n startIcon,\n endIcon,\n disabled,\n error,\n label,\n hint,\n ...props\n },\n ref\n ) => {\n const errorId = useId();\n\n // Auto-set status to 'error' when error prop is provided\n const effectiveStatus = error ? 'error' : status;\n\n // Size-aware padding\n const startIconPaddingMap = {\n medium: 'pl-12', // 16px (pad) + 24px (icon) + 8px (gap) = 48px -> pl-12\n small: 'pl-9', // 12px (pad) + 16px (icon) + 8px (gap) = 36px -> pl-9\n tiny: 'pl-8', // 8px (pad) + 16px (icon) + 8px (gap) = 32px -> pl-8\n micro: 'pl-7', // 6px (pad) + 14px (icon) + 6px (gap) = 26px -> pl-7\n };\n\n const endIconPaddingMap = {\n medium: 'pr-12',\n small: 'pr-9',\n tiny: 'pr-8',\n micro: 'pr-7',\n };\n\n return (\n <div className=\"flex flex-col gap-1\">\n {label && (\n <label className=\"text-[11px] font-semibold text-[var(--color-gray-800)]\">\n {label}\n </label>\n )}\n <div className={inputContainerStyles({ size })}>\n {startIcon && (\n <span\n className={inputIconStyles({\n status: effectiveStatus,\n size,\n position: 'start',\n })}\n >\n {startIcon}\n </span>\n )}\n <input\n ref={ref}\n className={cn(\n inputStyles({ status: effectiveStatus, size }),\n startIcon && startIconPaddingMap[size],\n endIcon && endIconPaddingMap[size],\n className\n )}\n disabled={disabled}\n aria-invalid={!!error}\n aria-describedby={error ? errorId : undefined}\n {...props}\n />\n {endIcon && (\n <span\n className={inputIconStyles({\n status: effectiveStatus,\n size,\n position: 'end',\n })}\n >\n {endIcon}\n </span>\n )}\n </div>\n {error && (\n <span id={errorId} className={inputErrorStyles({ size })} role=\"alert\">\n {error}\n </span>\n )}\n {!error && hint && (\n <span className=\"text-[11px] text-[var(--color-gray-600)]\">\n {hint}\n </span>\n )}\n </div>\n );\n }\n);\n\nInput.displayName = 'Input';\n","import { cva } from 'class-variance-authority';\n\nexport const loadingSpinnerWrapperStyles = cva('flex flex-col items-center justify-center');\n\nexport const spinnerContainerStyles = cva('relative', {\n variants: {\n size: {\n sm: 'w-8 h-8',\n md: 'w-12 h-12',\n lg: 'w-16 h-16',\n },\n },\n defaultVariants: {\n size: 'lg',\n },\n});\n\nexport const spinnerBorderStyles = cva(\n 'absolute inset-0 rounded-full border-4 border-transparent animate-spin',\n {\n variants: {\n color: {\n primary: 'border-t-[var(--color-blue-800)]',\n secondary: 'border-t-[var(--color-gray-600)]',\n },\n },\n defaultVariants: {\n color: 'primary',\n },\n }\n);\n\nexport const loadingTextStyles = cva('mt-4 typography-small', {\n variants: {\n color: {\n primary: 'text-[var(--color-gray-1000)]',\n muted: 'text-[var(--color-gray-600)]',\n },\n },\n defaultVariants: {\n color: 'muted',\n },\n});\n","import { FC } from 'react';\nimport { cn } from '@/utils/cn';\nimport {\n loadingSpinnerWrapperStyles,\n spinnerContainerStyles,\n spinnerBorderStyles,\n loadingTextStyles,\n} from './LoadingSpinner.styles';\n\ninterface LoadingSpinnerProps {\n size?: 'sm' | 'md' | 'lg';\n color?: 'primary' | 'secondary';\n text?: string;\n textColor?: 'primary' | 'muted';\n className?: string;\n}\n\nexport const LoadingSpinner: FC<LoadingSpinnerProps> = ({\n size = 'lg',\n color = 'primary',\n text,\n textColor = 'muted',\n className,\n}) => {\n return (\n <div className={cn(loadingSpinnerWrapperStyles(), className)}>\n <div className={spinnerContainerStyles({ size })}>\n <div className={spinnerBorderStyles({ color })} />\n </div>\n {text && <p className={loadingTextStyles({ color: textColor })}>{text}</p>}\n </div>\n );\n};\n\n","import { cva } from 'class-variance-authority';\n\nexport const rootStyles = cva(\n 'relative flex flex-col w-full max-w-[668px] transition-colors duration-200 group',\n {\n variants: {\n variant: {\n user: '',\n assistant: '',\n system: '',\n loader: '',\n },\n alignment: {\n left: 'items-start',\n center: 'items-center',\n right: 'items-end',\n },\n isEditing: {\n true: 'items-stretch',\n false: '',\n },\n },\n compoundVariants: [\n // Default alignments based on variant (can be overridden by explicit alignment prop)\n { variant: 'user', alignment: undefined, isEditing: false, className: 'items-end' },\n { variant: 'assistant', alignment: undefined, isEditing: false, className: 'items-start' },\n { variant: 'system', alignment: undefined, className: 'items-start' },\n { variant: 'loader', alignment: undefined, className: 'items-start' },\n ],\n defaultVariants: {\n variant: 'user',\n isEditing: false,\n },\n },\n);\n\nexport const innerContainerStyles = cva('flex gap-[12px] items-start w-full');\n\nexport const messageContainerStyles = cva('flex flex-col flex-1 min-w-0');\n\nexport const bubbleStyles = cva(\n 'flex flex-col w-full transition-colors duration-200',\n {\n variants: {\n variant: {\n user: '[background-image:linear-gradient(var(--color-white),var(--color-white)),linear-gradient(180deg,#B9BCCB_0%,#E5E7F0_100%)] [background-origin:padding-box,border-box] [background-clip:padding-box,border-box] border border-transparent rounded-[16px] p-[16px] overflow-clip shadow-[0px_4px_6px_-2px_rgba(0,0,0,0.03),0px_12px_16px_-4px_rgba(0,0,0,0.05)]',\n // No top padding: alignment with inline avatars is handled by the parent layout (MessageItem)\n assistant: 'bg-transparent px-[8px] pb-[8px] gap-[8px]',\n // No vertical padding: system messages use compact inline layout with external spacing\n system: 'bg-transparent gap-[8px]',\n loader: 'bg-transparent gap-[24px]',\n },\n isSticky: {\n true: 'shadow-[0px_8px_16px_-4px_rgba(0,0,0,0.1),0px_4px_8px_-4px_rgba(0,0,0,0.06)]',\n false: '',\n },\n withTimer: {\n true: '',\n false: '',\n },\n },\n compoundVariants: [\n { variant: 'assistant', withTimer: true, className: 'bg-white p-[16px] rounded-[4px]' },\n { variant: 'user', withTimer: true, className: 'bg-[var(--color-gray-100)] [background-image:none] border-0 rounded-[4px] shadow-none overflow-visible' },\n ],\n defaultVariants: {\n variant: 'user',\n isSticky: false,\n withTimer: false,\n },\n },\n);\n\nexport const contentStyles = cva('flex w-full', {\n variants: {\n variant: {\n user: 'flex-col gap-[8px]',\n assistant: 'flex-col gap-[8px]',\n system: 'flex-row items-center gap-[8px]',\n loader: 'flex-col items-start',\n },\n },\n defaultVariants: {\n variant: 'user',\n },\n});\n\nexport const headerStyles = cva('typography-h4 text-[var(--color-blue-1000)]');\n\nexport const textStyles = cva('typography-small', {\n variants: {\n variant: {\n user: 'text-[var(--color-blue-1000)]',\n assistant: 'text-[var(--color-blue-1000)]',\n system: 'text-[var(--color-gray-600)]',\n loader: '',\n },\n },\n defaultVariants: {\n variant: 'user',\n },\n});\n\nexport const actionsStyles = cva(\n 'flex gap-[8px] p-[4px] rounded-[4px] transition-opacity duration-200',\n {\n variants: {\n variant: {\n user: '',\n assistant: '',\n system: 'hidden',\n loader: 'hidden',\n },\n },\n defaultVariants: {\n variant: 'user',\n },\n },\n);\n\n// Actions icons wrapper - only visible on hover\nexport const actionsIconsStyles = cva([\n 'flex',\n 'gap-[8px]',\n 'opacity-0',\n 'group-hover:opacity-100',\n 'transition-opacity',\n 'duration-200',\n]);\n\nexport const actionButtonStyles = cva(\n 'p-1 rounded-[4px] text-[var(--color-gray-400)] hover:text-[var(--color-gray-800)] hover:drop-shadow-[0_1px_2px_rgba(0,0,0,0.05)] transition-all duration-200 focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] focus-visible:ring-offset-1 disabled:opacity-30 disabled:cursor-not-allowed disabled:hover:text-[var(--color-gray-400)] disabled:hover:drop-shadow-none',\n {\n variants: {\n isActive: {\n true: 'text-[var(--color-blue-800)]',\n false: '',\n },\n },\n defaultVariants: {\n isActive: false,\n },\n },\n);\n\nexport const avatarContainerStyles = cva(\n 'flex items-start justify-center shrink-0 pt-[4px]',\n);\n\nexport const avatarInnerStyles = cva(\n 'flex items-center justify-center size-[32px] rounded-full bg-[var(--color-blue-1000)]',\n);\n\nexport const timestampStyles = cva(\n 'text-[12px] text-[var(--color-gray-600)] mt-[4px]',\n);\n\nexport const loaderStyles = cva(\n 'flex items-center justify-center',\n);\n\n// Container for system message content with shimmer overlay\nexport const systemContentWrapperStyles = cva(\n 'relative overflow-hidden flex items-center gap-[8px] py-[2px] select-none',\n);\n\n// Shine overlay that passes over the content like a skeleton loader\nexport const shimmerOverlayStyles = cva([\n 'absolute -inset-y-2 -inset-x-4',\n 'animate-shimmer',\n 'bg-[linear-gradient(90deg,transparent_0%,transparent_35%,rgba(255,255,255,0.4)_50%,transparent_65%,transparent_100%)]',\n 'blur-[1px]',\n 'z-10 pointer-events-none',\n]);\n\n// Activity icon container with styling and rhythm animation\nexport const activityIconAnimatedStyles = cva([\n 'relative shrink-0 flex items-center justify-center',\n 'text-[var(--color-gray-600)]',\n 'animate-signal-rhythm',\n 'origin-center',\n]);\n\n// Optional subtle glow backdrop for the activity icon\nexport const activityIconGlowStyles = cva([\n 'absolute inset-0',\n 'bg-[var(--color-blue-200)]',\n 'rounded-full',\n 'opacity-0',\n 'animate-ping-slow',\n '-z-10',\n]);\n\n// Edit mode container styles - wraps the bubble with blue border\nexport const editContainerStyles = cva([\n 'flex',\n 'flex-col',\n 'w-full',\n 'bg-[var(--color-white)]',\n 'rounded-[16px]',\n 'border',\n 'border-[var(--color-blue-800)]',\n 'p-[16px]',\n 'gap-[8px]',\n 'transition-colors',\n 'duration-200',\n]);\n\n// Edit mode textarea styles - minimal, no border\nexport const editTextareaStyles = cva([\n 'w-full',\n 'min-h-[60px]',\n 'bg-transparent',\n 'border-none',\n 'resize-none',\n 'typography-small',\n 'text-[var(--color-blue-1000)]',\n 'placeholder:text-[var(--color-gray-600)]',\n 'focus:outline-none',\n 'disabled:opacity-50',\n 'disabled:cursor-not-allowed',\n]);\n\n// Edit mode hint text styles\nexport const editHintStyles = cva([\n 'text-[12px]',\n 'leading-[16px]',\n 'text-[var(--color-gray-600)]',\n]);\n\n// Sender header row: avatar + name + elapsed time\nexport const senderHeaderStyles = cva('flex items-center gap-[8px]');\n\n// Sender avatar container\nexport const senderAvatarStyles = cva('overflow-clip shrink-0 size-[24px]');\n\n// Sender name label\nexport const senderNameStyles = cva(\n 'text-[14px] leading-[20px] font-semibold text-[var(--color-blue-1000)] whitespace-nowrap',\n);\n\n// Elapsed time label\nexport const senderTimeStyles = cva(\n 'text-[14px] leading-[20px] text-[var(--color-gray-400)] whitespace-nowrap',\n);\n\n// Branch navigator container\nexport const branchNavigatorStyles = cva([\n 'flex',\n 'items-center',\n 'gap-[4px]',\n]);\n\n// Branch navigator button\nexport const branchNavButtonStyles = cva(\n [\n 'p-[4px]',\n 'rounded-[4px]',\n 'text-[var(--color-gray-400)]',\n 'transition-colors',\n 'duration-200',\n 'hover:text-[var(--color-gray-800)]',\n 'hover:bg-[var(--color-gray-100)]',\n 'disabled:opacity-30',\n 'disabled:cursor-not-allowed',\n 'disabled:hover:bg-transparent',\n 'disabled:hover:text-[var(--color-gray-400)]',\n 'focus-visible:ring-2',\n 'focus-visible:ring-[var(--color-blue-200)]',\n 'focus-visible:ring-offset-1',\n ]\n);\n\n// Branch navigator text\nexport const branchNavTextStyles = cva([\n 'text-[12px]',\n 'leading-[16px]',\n 'text-[var(--color-gray-600)]',\n 'font-normal',\n 'tabular-nums',\n 'select-none',\n 'min-w-[32px]',\n 'text-center',\n]);\n","import { useState, useEffect } from 'react';\n\nconst formatElapsed = (ts: Date | string): string => {\n const date = typeof ts === 'string' ? new Date(ts) : ts;\n const now = new Date();\n const diffMs = now.getTime() - date.getTime();\n const diffMins = Math.floor(diffMs / 60000);\n\n if (diffMins < 1) return 'Just now';\n if (diffMins === 1) return '1 minute ago';\n if (diffMins < 60) return `${diffMins} minutes ago`;\n\n const diffHours = Math.floor(diffMins / 60);\n if (diffHours === 1) return '1 hour ago';\n if (diffHours < 24) return `${diffHours} hours ago`;\n\n return date.toLocaleDateString();\n};\n\n/**\n * Hook that returns a self-updating elapsed time string from a given timestamp.\n * Updates every 30 seconds.\n */\nexport function useElapsedTime(timestamp: Date | string | undefined): string {\n const [elapsed, setElapsed] = useState(() =>\n timestamp ? formatElapsed(timestamp) : '',\n );\n\n useEffect(() => {\n if (!timestamp) {\n setElapsed('');\n return;\n }\n\n setElapsed(formatElapsed(timestamp));\n\n const interval = setInterval(() => {\n setElapsed(formatElapsed(timestamp));\n }, 30_000);\n\n return () => clearInterval(interval);\n }, [timestamp]);\n\n return elapsed;\n}\n","// React\nimport {\n forwardRef,\n HTMLAttributes,\n ReactNode,\n useState,\n useEffect,\n useRef,\n useCallback,\n useMemo,\n memo,\n ComponentType,\n KeyboardEvent,\n ChangeEvent,\n} from 'react';\n\n// Components\nimport { Check, Activity, ChevronLeft, ChevronRight, Edit2, X } from '@/components/atoms/icons';\nimport { LogoA, SignatureA } from '@/components/atoms/logos';\n\n// Styles\nimport { cn } from '@/utils/cn';\nimport {\n rootStyles,\n bubbleStyles,\n contentStyles,\n actionsStyles,\n avatarContainerStyles,\n innerContainerStyles,\n messageContainerStyles,\n headerStyles,\n textStyles,\n actionButtonStyles,\n avatarInnerStyles,\n timestampStyles,\n loaderStyles,\n systemContentWrapperStyles,\n shimmerOverlayStyles,\n activityIconAnimatedStyles,\n activityIconGlowStyles,\n editContainerStyles,\n editTextareaStyles,\n editHintStyles,\n actionsIconsStyles,\n branchNavigatorStyles,\n branchNavButtonStyles,\n branchNavTextStyles,\n senderHeaderStyles,\n senderAvatarStyles,\n senderNameStyles,\n senderTimeStyles,\n} from './MessageBubble.styles';\nimport { useElapsedTime } from './useElapsedTime';\n\n// Types\nexport interface MessageAction {\n /** Icon component to display */\n icon: ComponentType<{ size?: number | string }>;\n /** Accessible label for the action button */\n label: string;\n /** Click handler - can be async. When resolved, success feedback shows if enabled. */\n onClick?: () => void | Promise<void>;\n /** Whether this action is in an active/highlighted state */\n isActive?: boolean;\n /** Show check icon after onClick completes successfully. Defaults to false. */\n showSuccessFeedback?: boolean;\n /** Custom success icon (defaults to Check icon) */\n successIcon?: ComponentType<{ size?: number | string }>;\n /** Duration to show success feedback in ms (defaults to 2000) */\n successDuration?: number;\n}\n\nexport interface BranchInfo {\n /** Current branch index (1-based for display) */\n currentIndex: number;\n /** Total number of branches */\n totalBranches: number;\n}\n\nexport interface MessageBubbleProps extends HTMLAttributes<HTMLDivElement> {\n variant?: 'user' | 'assistant' | 'system' | 'loader';\n heading?: string;\n isLoading?: boolean;\n /** Hide the Archie logo avatar (only applicable to assistant variant). Defaults to true (hidden). */\n hideAvatar?: boolean;\n /** Show timestamp (not recommended per design). Defaults to false. */\n showTimestamp?: boolean;\n /** Timestamp value to display */\n timestamp?: Date | string;\n /** Sticky mode - adds shadow to bubble, no action controls */\n isSticky?: boolean;\n /** Initial prompt - centers the message (only applies to user variant). Used for the first user message in a conversation. */\n isInitialPrompt?: boolean;\n /** Explicit alignment override - auto determines based on variant and isInitialPrompt */\n alignment?: 'left' | 'center' | 'right';\n /** Custom actions to display on hover. Each action has an icon, label, and onClick handler. */\n actions?: MessageAction[];\n /**\n * Enable built-in copy functionality. When true, adds a copy button that copies the message content.\n * @deprecated Use actions array with showSuccessFeedback instead for consistent success feedback across all actions.\n */\n enableCopy?: boolean;\n /**\n * Icon to use for the copy action (defaults to Clipboard icon from props)\n * @deprecated Use actions array with showSuccessFeedback instead for consistent success feedback across all actions.\n */\n copyIcon?: ComponentType<{ size?: number | string }>;\n /**\n * Callback executed when copy succeeds\n * @deprecated Use actions array with showSuccessFeedback instead for consistent success feedback across all actions.\n */\n onCopySuccess?: () => void;\n /** Enable edit mode functionality for user messages */\n enableEdit?: boolean;\n /** Whether the message is currently in edit mode (controlled) */\n isEditing?: boolean;\n /** Initial content for edit mode (required for controlled mode since contentRef is not available) */\n initialEditContent?: string;\n /** Callback when entering edit mode */\n onEditStart?: () => void;\n /** Callback when cancelling edit mode */\n onEditCancel?: () => void;\n /** Callback when saving edit with the new content */\n onEditSave?: (newContent: string) => void | Promise<void>;\n /** Whether save operation is in progress */\n isSaving?: boolean;\n /** Branch information for navigation */\n branchInfo?: BranchInfo;\n /** Callback when navigating to previous branch */\n onPreviousBranch?: () => void;\n /** Callback when navigating to next branch */\n onNextBranch?: () => void;\n /** Whether branch navigation is loading */\n isBranchLoading?: boolean;\n /** Enables the sender header row with avatar, name and elapsed time. */\n withTimer?: boolean;\n /** Sender display name (\"Archie\", user name, etc.). */\n senderName?: string;\n /** Sender avatar element (ReactNode). Pass <SignatureA />, <Avatar />, <img />, etc. */\n senderAvatar?: ReactNode;\n /** Pre-formatted elapsed time string. When provided, overrides the internal useElapsedTime hook. */\n senderTime?: string;\n}\n\n// Empty array constant to prevent re-renders from default prop\nconst EMPTY_ACTIONS: MessageAction[] = [];\n\n// Platform detection - only needs to run once\nconst IS_MAC = typeof navigator !== 'undefined' && /Mac|iPod|iPhone|iPad/.test(navigator.platform);\nconst KEYBOARD_HINT = IS_MAC ? '⌘+Enter to save, Esc to cancel' : 'Ctrl+Enter to save, Esc to cancel';\n\n// Format timestamp utility - moved outside component to prevent recreation\nconst formatTimestamp = (ts: Date | string): string => {\n const date = typeof ts === 'string' ? new Date(ts) : ts;\n const now = new Date();\n const diffMs = now.getTime() - date.getTime();\n const diffMins = Math.floor(diffMs / 60000);\n\n if (diffMins < 1) return 'Just now';\n if (diffMins < 60) return `${diffMins} min ago`;\n\n const diffHours = Math.floor(diffMins / 60);\n if (diffHours < 24) return `${diffHours}h ago`;\n\n return date.toLocaleDateString();\n};\n\ninterface ActionButtonProps {\n onClick?: () => void | Promise<void>;\n icon: ComponentType<{ size?: number | string }>;\n label: string;\n className?: string;\n isActive?: boolean;\n disabled?: boolean;\n showSuccessFeedback?: boolean;\n successIcon?: ComponentType<{ size?: number | string }>;\n successDuration?: number;\n}\n\nconst ActionButton = memo<ActionButtonProps>(({\n onClick,\n icon: Icon,\n label,\n className,\n isActive = false,\n disabled = false,\n showSuccessFeedback = false,\n successIcon: SuccessIcon = Check,\n successDuration = 2000,\n}) => {\n const [showSuccess, setShowSuccess] = useState(false);\n\n const handleClick = useCallback(async () => {\n if (!onClick || disabled) return;\n\n try {\n await onClick();\n\n if (showSuccessFeedback) {\n setShowSuccess(true);\n setTimeout(() => setShowSuccess(false), successDuration);\n }\n } catch (error) {\n console.error('Action failed:', error);\n }\n }, [onClick, disabled, showSuccessFeedback, successDuration]);\n\n const DisplayIcon = showSuccess ? SuccessIcon : Icon;\n\n return (\n <button\n className={cn(actionButtonStyles({ isActive: isActive || showSuccess }), className)}\n onClick={handleClick}\n type=\"button\"\n aria-label={showSuccess ? 'Success' : label}\n disabled={disabled}\n >\n <DisplayIcon size={12} />\n </button>\n );\n});\n\nActionButton.displayName = 'ActionButton';\n\ninterface BranchNavigatorProps {\n branchInfo: BranchInfo;\n onPrevious?: () => void;\n onNext?: () => void;\n isLoading?: boolean;\n}\n\n/** Branch navigator component for navigating between message versions */\nconst BranchNavigator = memo<BranchNavigatorProps>(({\n branchInfo,\n onPrevious,\n onNext,\n isLoading = false,\n}) => {\n const hasPrevious = branchInfo.currentIndex > 1;\n const hasNext = branchInfo.currentIndex < branchInfo.totalBranches;\n\n if (branchInfo.totalBranches <= 1) {\n return null;\n }\n\n return (\n <div className={cn(branchNavigatorStyles())}>\n <button\n type=\"button\"\n className={cn(branchNavButtonStyles())}\n onClick={onPrevious}\n disabled={!hasPrevious || isLoading}\n aria-label=\"Previous version\"\n >\n <ChevronLeft size={14} />\n </button>\n <span className={cn(branchNavTextStyles())}>\n {branchInfo.currentIndex} / {branchInfo.totalBranches}\n </span>\n <button\n type=\"button\"\n className={cn(branchNavButtonStyles())}\n onClick={onNext}\n disabled={!hasNext || isLoading}\n aria-label=\"Next version\"\n >\n <ChevronRight size={14} />\n </button>\n </div>\n );\n});\n\nBranchNavigator.displayName = 'BranchNavigator';\n\n// Looping animated SignatureA for loader state\nconst AnimatedLoader = () => {\n const [key, setKey] = useState(0);\n\n useEffect(() => {\n // Restart animation every 2.5 seconds (animation duration + small pause)\n const interval = setInterval(() => {\n setKey((k) => k + 1);\n }, 2500);\n\n return () => clearInterval(interval);\n }, []);\n\n return (\n <div className={cn(loaderStyles())}>\n <SignatureA\n key={key}\n size={28}\n colorVariant=\"lightTeal\"\n animated\n animationDuration={2}\n />\n </div>\n );\n};\n\nexport const MessageBubble = forwardRef<HTMLDivElement, MessageBubbleProps>(\n (\n {\n className,\n variant = 'user',\n heading,\n children,\n isLoading,\n timestamp,\n hideAvatar = false,\n showTimestamp = false,\n isSticky = false,\n isInitialPrompt = false,\n alignment,\n actions = EMPTY_ACTIONS,\n enableCopy = false,\n copyIcon,\n onCopySuccess,\n enableEdit = false,\n isEditing: isEditingProp,\n initialEditContent,\n onEditStart,\n onEditCancel,\n onEditSave,\n isSaving = false,\n branchInfo,\n onPreviousBranch,\n onNextBranch,\n isBranchLoading = false,\n withTimer = false,\n senderName,\n senderAvatar,\n senderTime: senderTimeProp,\n ...props\n },\n ref,\n ) => {\n const elapsedTimeInternal = useElapsedTime(withTimer && !senderTimeProp ? timestamp : undefined);\n const elapsedTime = senderTimeProp || elapsedTimeInternal;\n const contentRef = useRef<HTMLDivElement>(null);\n const textareaRef = useRef<HTMLTextAreaElement>(null);\n const [isCopied, setIsCopied] = useState(false);\n const [internalEditing, setInternalEditing] = useState(false);\n const [editContent, setEditContent] = useState(initialEditContent ?? '');\n\n // Use controlled or uncontrolled editing state\n const isEditing = isEditingProp ?? internalEditing;\n\n const resolvedAlignment =\n alignment ??\n (variant === 'user' ? (isInitialPrompt ? 'center' : 'right') : 'left');\n\n // Extract text content from children for editing\n const getTextContent = useCallback((): string => {\n if (contentRef.current) {\n return contentRef.current.innerText;\n }\n if (typeof children === 'string') {\n return children;\n }\n return '';\n }, [children]);\n\n // Handle entering edit mode\n const handleEditStart = useCallback(() => {\n // In controlled mode, don't set editContent here - let the useEffect handle it\n // when isEditing transitions to true. This prevents race conditions.\n if (isEditingProp === undefined) {\n // Uncontrolled mode: set content immediately since we manage the state\n const content = initialEditContent ?? getTextContent();\n setEditContent(content);\n setInternalEditing(true);\n }\n // In controlled mode, the useEffect will handle setting editContent\n // when isEditing transitions from false to true\n onEditStart?.();\n }, [initialEditContent, getTextContent, isEditingProp, onEditStart]);\n\n // Handle cancelling edit mode\n const handleEditCancel = useCallback(() => {\n if (isEditingProp === undefined) {\n setInternalEditing(false);\n }\n setEditContent('');\n onEditCancel?.();\n }, [isEditingProp, onEditCancel]);\n\n // Handle saving edit\n const handleEditSave = useCallback(async () => {\n // Don't save if content is empty, saving in progress, or content hasn't changed\n if (!editContent?.trim() || isSaving) return;\n if (editContent.trim() === initialEditContent?.trim()) return;\n\n try {\n await onEditSave?.(editContent);\n if (isEditingProp === undefined) {\n setInternalEditing(false);\n }\n setEditContent('');\n } catch (error) {\n console.error('Failed to save edit:', error);\n }\n }, [editContent, isSaving, onEditSave, isEditingProp, initialEditContent]);\n\n // Handle keyboard shortcuts in edit mode\n const handleKeyDown = useCallback(\n (e: KeyboardEvent<HTMLTextAreaElement>) => {\n if (e.key === 'Escape') {\n handleEditCancel();\n } else if (e.key === 'Enter' && (e.metaKey || e.ctrlKey)) {\n e.preventDefault();\n handleEditSave();\n }\n },\n [handleEditCancel, handleEditSave],\n );\n\n // Track previous editing state to detect transitions\n const prevIsEditingRef = useRef(false);\n // Keep track of last known initialEditContent for controlled mode\n const lastInitialContentRef = useRef(initialEditContent);\n\n // Update ref whenever initialEditContent changes (before edit mode transition)\n useEffect(() => {\n lastInitialContentRef.current = initialEditContent;\n }, [initialEditContent]);\n\n // Initialize edit content when entering edit mode (controlled mode)\n // In controlled mode, use initialEditContent prop since contentRef won't be available\n useEffect(() => {\n const wasEditing = prevIsEditingRef.current;\n prevIsEditingRef.current = isEditing;\n\n // Only initialize when transitioning from not editing -> editing\n if (isEditing && !wasEditing) {\n // In controlled mode, ALWAYS prefer initialEditContent since contentRef\n // won't be available when isEditing is true (edit UI replaces content)\n // Use the ref to ensure we get the latest value even in race conditions\n const content = initialEditContent || lastInitialContentRef.current || getTextContent() || '';\n setEditContent(content);\n } else if (!isEditing && wasEditing) {\n // Clear content when exiting edit mode\n setEditContent('');\n }\n }, [isEditing, initialEditContent, getTextContent]);\n\n // Focus textarea when entering edit mode\n useEffect(() => {\n if (isEditing && textareaRef.current) {\n textareaRef.current.focus();\n const length = textareaRef.current.value.length;\n textareaRef.current.setSelectionRange(length, length);\n }\n }, [isEditing]);\n\n const handleCopyInternal = useCallback(async () => {\n if (!contentRef.current) return;\n\n const textToCopy = contentRef.current.innerText;\n try {\n if (navigator.clipboard && navigator.clipboard.writeText) {\n await navigator.clipboard.writeText(textToCopy);\n setIsCopied(true);\n\n // Trigger onCopySuccess callback if provided\n onCopySuccess?.();\n\n setTimeout(() => {\n setIsCopied(false);\n }, 2000);\n } else {\n // Fallback for environments where navigator.clipboard is not available\n console.warn('Clipboard API not available');\n }\n } catch (err) {\n console.error('Failed to copy:', err);\n }\n }, [onCopySuccess]);\n\n // Memoized handler for edit content change\n const handleEditContentChange = useCallback(\n (e: ChangeEvent<HTMLTextAreaElement>) => {\n setEditContent(e.target.value);\n },\n [],\n );\n\n // Memoize derived values to prevent unnecessary recalculations\n const hasActions = useMemo(\n () => actions.length > 0 || enableCopy || (enableEdit && variant === 'user'),\n [actions.length, enableCopy, enableEdit, variant],\n );\n\n const showActions = useMemo(\n () => !isSticky && !isEditing && (variant === 'user' || variant === 'assistant') && hasActions,\n [isSticky, isEditing, variant, hasActions],\n );\n\n const showBranchNavigator = useMemo(\n () => !isEditing && branchInfo && branchInfo.totalBranches > 1 && variant === 'user',\n [isEditing, branchInfo, variant],\n );\n\n // Loader variant - uses animated SignatureA drawing in loop\n if (variant === 'loader' || isLoading) {\n return (\n <div\n ref={ref}\n className={cn(\n rootStyles({ variant: 'loader', alignment: 'left', isEditing: false }),\n className,\n )}\n {...props}\n >\n <div className={cn(bubbleStyles({ variant: 'loader', isSticky }))}>\n <AnimatedLoader />\n </div>\n </div>\n );\n }\n\n // Edit mode UI for user messages\n if (isEditing && variant === 'user') {\n return (\n <div\n ref={ref}\n className={cn(\n rootStyles({ variant, alignment: 'right', isEditing: true }),\n 'group',\n className,\n )}\n {...props}\n >\n <div className={cn(editContainerStyles())}>\n <textarea\n ref={textareaRef}\n value={editContent}\n onChange={handleEditContentChange}\n onKeyDown={handleKeyDown}\n className={cn(editTextareaStyles())}\n placeholder=\"Edit your message...\"\n disabled={isSaving}\n aria-label=\"Edit message\"\n />\n </div>\n {/* Edit mode actions - hint on left, icons on right */}\n <div className={cn(actionsStyles({ variant }), 'opacity-100 justify-between')}>\n <span className={cn(editHintStyles())}>{KEYBOARD_HINT}</span>\n <div className=\"flex\">\n <ActionButton\n onClick={handleEditSave}\n icon={Check}\n label=\"Save\"\n disabled={isSaving || !editContent?.trim() || editContent.trim() === initialEditContent?.trim()}\n />\n <ActionButton\n onClick={handleEditCancel}\n icon={X}\n label=\"Cancel\"\n disabled={isSaving}\n />\n </div>\n </div>\n </div>\n );\n }\n\n return (\n <div\n ref={ref}\n className={cn(\n rootStyles({ variant, alignment: resolvedAlignment, isEditing: false }),\n 'group',\n className,\n )}\n {...props}\n >\n {withTimer && senderName && (\n <div className={cn(senderHeaderStyles())}>\n {senderAvatar && (\n <div className={cn(senderAvatarStyles())}>{senderAvatar}</div>\n )}\n <span className={cn(senderNameStyles())}>{senderName}</span>\n {elapsedTime && (\n <span className={cn(senderTimeStyles())}>{elapsedTime}</span>\n )}\n </div>\n )}\n\n <div className={cn(innerContainerStyles())}>\n {!withTimer && !hideAvatar && variant === 'assistant' && (\n <div className={cn(avatarContainerStyles())}>\n <div className={cn(avatarInnerStyles())}>\n <LogoA size={20} colorVariant=\"lightTeal\" />\n </div>\n </div>\n )}\n\n <div className={cn(messageContainerStyles())}>\n <div className={cn(bubbleStyles({ variant, isSticky, withTimer }))}>\n <div className={cn(contentStyles({ variant }))} ref={contentRef}>\n {variant === 'system' ? (\n <div className={cn(systemContentWrapperStyles())}>\n {/* Shimmer overlay that passes over the content */}\n <div className={cn(shimmerOverlayStyles())} />\n {/* Activity icon with rhythm animation */}\n <div className={cn(activityIconAnimatedStyles())}>\n <Activity size={16} />\n {/* Subtle glowing backdrop for active feel */}\n <div className={cn(activityIconGlowStyles())} />\n </div>\n {/* Text content */}\n <span className={cn(textStyles({ variant }))}>\n {children}\n </span>\n </div>\n ) : (\n <>\n {variant === 'assistant' && heading && (\n <h4 className={cn(headerStyles())}>{heading}</h4>\n )}\n <div className={cn(textStyles({ variant }))}>{children}</div>\n </>\n )}\n </div>\n </div>\n\n {/* Timestamp - Only show if explicitly enabled */}\n {showTimestamp && timestamp && (\n <div className={cn(timestampStyles())}>\n {formatTimestamp(timestamp)}\n </div>\n )}\n\n {/* Actions row - actions on left, branch navigator on right */}\n {(showActions || showBranchNavigator) && (\n <div className={cn(actionsStyles({ variant }), 'justify-between')}>\n {/* Left side: actions (visible on hover) */}\n <div className={cn(actionsIconsStyles())}>\n {showActions && (\n <>\n {/* Built-in copy action */}\n {enableCopy && copyIcon && (\n <ActionButton\n onClick={handleCopyInternal}\n icon={isCopied ? Check : copyIcon}\n label={isCopied ? 'Copied' : 'Copy'}\n isActive={isCopied}\n />\n )}\n\n {/* Built-in edit action for user messages */}\n {enableEdit && variant === 'user' && (\n <ActionButton\n onClick={handleEditStart}\n icon={Edit2}\n label=\"Edit\"\n />\n )}\n\n {/* Custom actions */}\n {actions.map((action, index) => (\n <ActionButton\n key={`${action.label}-${index}`}\n onClick={action.onClick}\n icon={action.icon}\n label={action.label}\n isActive={action.isActive}\n showSuccessFeedback={action.showSuccessFeedback}\n successIcon={action.successIcon}\n successDuration={action.successDuration}\n />\n ))}\n </>\n )}\n </div>\n\n {/* Right side: branch navigator (always visible) */}\n {showBranchNavigator && branchInfo && (\n <BranchNavigator\n branchInfo={branchInfo}\n onPrevious={onPreviousBranch}\n onNext={onNextBranch}\n isLoading={isBranchLoading}\n />\n )}\n </div>\n )}\n </div>\n </div>\n </div>\n );\n },\n);\n\nMessageBubble.displayName = 'MessageBubble';\n","import { cva } from 'class-variance-authority';\n\nexport const progressBarTrackStyles = cva(\n 'w-full overflow-hidden rounded-full bg-[var(--color-gray-200)]',\n {\n variants: {\n size: {\n small: 'h-1',\n medium: 'h-2',\n large: 'h-3',\n },\n },\n defaultVariants: {\n size: 'medium',\n },\n }\n);\n\nexport const progressBarIndicatorStyles = cva(\n 'h-full w-full flex-1 transition-all duration-300 ease-in-out rounded-full',\n {\n variants: {\n variant: {\n default: 'bg-[var(--color-blue-800)]',\n success: 'bg-[var(--color-green-1000)]',\n error: 'bg-[var(--color-red-1000)]',\n warning: 'bg-[var(--color-amber-1000)]',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n }\n);\n\nexport const progressBarLabelStyles = cva(\n 'flex justify-between mb-2 text-[var(--color-gray-800)]',\n {\n variants: {\n size: {\n small: 'text-xs',\n medium: 'text-sm',\n large: 'text-base',\n },\n },\n defaultVariants: {\n size: 'medium',\n },\n }\n);\n\n","// React\nimport { forwardRef, HTMLAttributes } from 'react';\n\n// Styles\nimport { cn } from '@/utils/cn';\nimport {\n progressBarTrackStyles,\n progressBarIndicatorStyles,\n progressBarLabelStyles,\n} from './ProgressBar.styles';\n\nexport interface ProgressBarProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * The current value of the progress bar.\n */\n value?: number;\n /**\n * The maximum value of the progress bar.\n * @default 100\n */\n max?: number;\n /**\n * The visual variant of the progress bar.\n * @default 'default'\n */\n variant?: 'default' | 'success' | 'error' | 'warning';\n /**\n * The size of the progress bar.\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n /**\n * Whether to show the value label.\n * @default false\n */\n showValueLabel?: boolean;\n /**\n * Custom label text to display above the progress bar.\n */\n label?: string;\n /**\n * Custom formatter for the value label.\n */\n valueFormatter?: (value: number, max: number) => string;\n}\n\nexport const ProgressBar = forwardRef<HTMLDivElement, ProgressBarProps>(\n (\n {\n className,\n value = 0,\n max = 100,\n variant = 'default',\n size = 'medium',\n showValueLabel = false,\n label,\n valueFormatter,\n ...props\n },\n ref\n ) => {\n const percentage = Math.min(Math.max((value / max) * 100, 0), 100);\n const formattedValue = valueFormatter\n ? valueFormatter(value, max)\n : `${Math.round(percentage)}%`;\n\n return (\n <div\n ref={ref}\n className={cn('w-full', className)}\n role=\"progressbar\"\n aria-valuemin={0}\n aria-valuemax={max}\n aria-valuenow={value}\n {...props}\n >\n {(label || showValueLabel) && (\n <div className={progressBarLabelStyles({ size })}>\n {label && <span className=\"font-medium\">{label}</span>}\n {showValueLabel && <span className=\"ml-auto\">{formattedValue}</span>}\n </div>\n )}\n <div className={progressBarTrackStyles({ size })}>\n <div\n className={progressBarIndicatorStyles({ variant })}\n style={{ transform: `translateX(-${100 - percentage}%)` }}\n />\n </div>\n </div>\n );\n }\n);\n\nProgressBar.displayName = 'ProgressBar';\n\n","import { cva } from 'class-variance-authority';\n\nexport const rangeInputStyles = cva(\n [\n 'w-full h-2 rounded-lg appearance-none cursor-pointer',\n 'focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n\n // Webkit Thumb\n '[&::-webkit-slider-thumb]:appearance-none',\n '[&::-webkit-slider-thumb]:w-5 [&::-webkit-slider-thumb]:h-5',\n '[&::-webkit-slider-thumb]:bg-[var(--color-white)]',\n '[&::-webkit-slider-thumb]:border-2',\n '[&::-webkit-slider-thumb]:rounded-full',\n '[&::-webkit-slider-thumb]:shadow-sm',\n '[&::-webkit-slider-thumb]:transition-all [&::-webkit-slider-thumb]:duration-200',\n '[&::-webkit-slider-thumb]:hover:scale-110',\n\n // Firefox Thumb\n '[&::-moz-range-thumb]:w-5 [&::-moz-range-thumb]:h-5',\n '[&::-moz-range-thumb]:bg-[var(--color-white)]',\n '[&::-moz-range-thumb]:border-2',\n '[&::-moz-range-thumb]:rounded-full',\n '[&::-moz-range-thumb]:shadow-sm',\n '[&::-moz-range-thumb]:transition-all [&::-moz-range-thumb]:duration-200',\n '[&::-moz-range-thumb]:hover:scale-110',\n ].join(' '),\n {\n variants: {\n variant: {\n cyan: [\n 'focus-visible:ring-[var(--color-blue-200)]',\n '[&::-webkit-slider-thumb]:border-[var(--color-gray-200)] [&::-webkit-slider-thumb]:hover:border-[var(--color-blue-800)]',\n '[&::-moz-range-thumb]:border-[var(--color-gray-200)] [&::-moz-range-thumb]:hover:border-[var(--color-blue-800)]',\n ],\n orange: [\n 'focus-visible:ring-[var(--color-orange-200)]',\n '[&::-webkit-slider-thumb]:border-[var(--color-gray-200)] [&::-webkit-slider-thumb]:hover:border-[var(--color-orange-800)]',\n '[&::-moz-range-thumb]:border-[var(--color-gray-200)] [&::-moz-range-thumb]:hover:border-[var(--color-orange-800)]',\n ],\n },\n animated: {\n true: [\n '[&::-webkit-slider-thumb]:animate-pulse',\n '[&::-moz-range-thumb]:animate-pulse',\n ],\n false: [],\n },\n },\n defaultVariants: {\n variant: 'cyan',\n animated: false,\n },\n },\n);\n","// React\nimport { InputHTMLAttributes, forwardRef } from 'react';\n\n// Styles\nimport { cn } from '@/utils/cn';\nimport { rangeInputStyles } from './RangeInput.styles';\n\nexport interface RangeInputProps extends InputHTMLAttributes<HTMLInputElement> {\n variant?: 'cyan' | 'orange';\n animated?: boolean;\n}\n\nexport const RangeInput = forwardRef<HTMLInputElement, RangeInputProps>(\n ({ className, variant = 'cyan', animated = false, style, ...props }, ref) => {\n const { min = 0, max = 100, value, defaultValue } = props;\n const currentValue = Number(value ?? defaultValue ?? 0);\n const minVal = Number(min);\n const maxVal = Number(max);\n\n // Calculate percentage for the gradient fill\n const percentage = Math.min(\n Math.max(((currentValue - minVal) * 100) / (maxVal - minVal), 0),\n 100,\n );\n\n const trackColor =\n variant === 'orange'\n ? 'var(--color-orange-800)'\n : 'var(--color-blue-800)';\n\n // We use a linear gradient to simulate the progress bar\n // The first part is the \"filled\" part (accent color)\n // The second part is the \"empty\" part (gray-200)\n const backgroundStyle = `linear-gradient(to right, ${trackColor} 0%, ${trackColor} ${percentage}%, var(--color-gray-200) ${percentage}%, var(--color-gray-200) 100%)`;\n\n return (\n <input\n ref={ref}\n type=\"range\"\n className={cn(rangeInputStyles({ variant, animated }), className)}\n style={{\n background: backgroundStyle,\n ...style,\n }}\n {...props}\n />\n );\n },\n);\n\nRangeInput.displayName = 'RangeInput';\n","import { cva } from 'class-variance-authority';\n\nexport const sidebarItemStyles = cva(\n 'box-border flex cursor-pointer transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] focus-visible:ring-offset-2',\n {\n variants: {\n type: {\n collapsed: 'flex-col items-center justify-center w-[64px] py-[6px] px-[4px] gap-[4px] rounded-[4px]',\n expanded: 'flex-row items-center w-full h-[32px] px-[4px] py-[6px] gap-[8px] rounded-[4px]',\n },\n variant: {\n default: 'text-[var(--color-gray-800)] hover:bg-[var(--color-gray-100)]',\n active: 'text-[var(--color-blue-800)] bg-[var(--color-blue-200)]',\n brand: 'h-[44px] rounded-[24px] bg-transparent hover:bg-transparent', // Special case for brand logo\n },\n heightAuto: {\n true: 'h-auto',\n },\n disabled: {\n true: 'opacity-50 cursor-not-allowed pointer-events-none',\n },\n },\n compoundVariants: [\n {\n type: 'collapsed',\n variant: 'active',\n className: 'bg-[var(--color-blue-200)]',\n },\n ],\n defaultVariants: {\n type: 'expanded',\n variant: 'default',\n heightAuto: false,\n disabled: false,\n },\n }\n);\n\nexport const sidebarItemIconStyles = cva(\n 'relative shrink-0 flex items-center justify-center',\n {\n variants: {\n type: {\n collapsed: 'size-[16px]',\n expanded: 'size-[16px]',\n },\n variant: {\n default: 'text-[var(--color-gray-800)]',\n active: 'text-[var(--color-blue-800)]',\n brand: 'text-[var(--color-blue-1000)] size-[24px]',\n },\n heightAuto: {\n true: 'size-auto',\n },\n },\n defaultVariants: {\n type: 'expanded',\n variant: 'default',\n heightAuto: false,\n },\n }\n);\n\nexport const sidebarItemLabelStyles = cva(\n 'font-normal whitespace-nowrap shrink-0',\n {\n variants: {\n type: {\n collapsed: 'text-[8px] leading-[10px] text-center min-w-full',\n expanded: 'text-[14px] leading-[20px]',\n },\n variant: {\n default: 'text-[var(--color-gray-800)]',\n active: 'text-[var(--color-blue-800)]',\n brand: 'hidden', // Brand variant usually just shows logo in collapsed, or text in expanded? Figma shows only Logo A in collapsed brand.\n },\n },\n defaultVariants: {\n type: 'expanded',\n variant: 'default',\n },\n }\n);\n","// React\nimport { HTMLAttributes, forwardRef, ReactNode } from 'react';\n\n// Styles\nimport { cn } from '@/utils/cn';\nimport { sidebarItemStyles, sidebarItemIconStyles, sidebarItemLabelStyles } from './SidebarItem.styles';\n\nexport interface SidebarItemProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {\n /** The icon to display */\n icon?: ReactNode;\n /** The label text */\n label: string;\n /** Whether the item is in collapsed state */\n isCollapsed?: boolean;\n /** Whether the item is active/selected */\n isActive?: boolean;\n /** Variant of the item */\n variant?: 'default' | 'brand';\n /** Whether the container height should be auto (useful for larger icons like avatars) */\n heightAuto?: boolean;\n /** Whether the item is disabled */\n disabled?: boolean;\n /** Click handler */\n onClick?: () => void;\n}\n\nexport const SidebarItem = forwardRef<HTMLDivElement, SidebarItemProps>(\n (\n {\n className,\n icon,\n label,\n isCollapsed = false,\n isActive = false,\n variant = 'default',\n heightAuto = false,\n disabled = false,\n onClick,\n children,\n ...props\n },\n ref\n ) => {\n const type = isCollapsed ? 'collapsed' : 'expanded';\n // Map component props to style variant\n const styleVariant = isActive ? 'active' : variant;\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLDivElement>) => {\n if (disabled) return;\n if (onClick && (e.key === 'Enter' || e.key === ' ')) {\n e.preventDefault();\n onClick();\n }\n };\n\n const handleClick = () => {\n if (disabled) return;\n onClick?.();\n };\n\n return (\n <div\n ref={ref}\n className={cn(sidebarItemStyles({ type, variant: styleVariant, heightAuto, disabled }), className)}\n role=\"button\"\n tabIndex={disabled ? -1 : 0}\n aria-label={label}\n aria-disabled={disabled}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n {...props}\n >\n {icon && (\n <div className={cn(sidebarItemIconStyles({ type, variant: styleVariant, heightAuto }))}>\n {icon}\n </div>\n )}\n\n {(variant !== 'brand' || !isCollapsed) && (\n <span className={cn(sidebarItemLabelStyles({ type, variant: styleVariant }))}>\n {label}\n </span>\n )}\n </div>\n );\n }\n);\n\nSidebarItem.displayName = 'SidebarItem';\n","import { cva } from 'class-variance-authority';\n\nexport const tagStyles = cva(\n 'inline-flex items-center justify-center rounded-[4px] whitespace-nowrap transition-colors duration-200 box-border',\n {\n variants: {\n variant: {\n default:\n 'border border-[var(--color-gray-200)] bg-[var(--color-gray-100)] px-2 py-[2px] text-[var(--color-gray-800)] gap-1',\n collaborator:\n 'border border-[var(--color-gray-200)] bg-[var(--color-gray-100)] px-2 py-[2px] text-[var(--color-gray-800)] gap-1',\n indicator:\n 'bg-[var(--color-gray-100)] px-[2px] h-[12px] gap-[4px] text-[var(--color-gray-600)]',\n highlight:\n 'border border-[var(--color-blue-800)] bg-[var(--color-blue-800-subtle)] px-2 py-[2px] text-[var(--color-blue-1000)] gap-1',\n error:\n 'bg-[var(--color-red-200)] px-[2px] h-[12px] gap-[4px] text-[var(--color-red-1000)]',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n }\n);\n\nexport const tagAvatarStyles = cva(\n 'w-4 h-4 rounded-full object-cover shrink-0'\n);\n\nexport const tagIconStyles = cva(\n 'flex items-center justify-center shrink-0'\n);\n","// React\nimport { HTMLAttributes, ReactNode, forwardRef } from 'react';\n\n// Components\nimport { motion } from 'framer-motion';\nimport { Typography } from '@/components/atoms/Typography/Typography';\nimport { X } from '@/components/atoms/icons';\n\n// Styles\nimport { cn } from '@/utils/cn';\nimport { tagStyles, tagAvatarStyles, tagIconStyles } from './Tag.styles';\n\nexport interface TagProps extends HTMLAttributes<HTMLDivElement> {\n variant?: 'default' | 'indicator' | 'collaborator' | 'error' | 'highlight';\n startIcon?: ReactNode;\n endIcon?: ReactNode;\n avatarSrc?: string;\n onDelete?: () => void;\n}\n\nexport const Tag = forwardRef<HTMLDivElement, TagProps>(\n (\n {\n className,\n variant = 'default',\n startIcon,\n endIcon,\n avatarSrc,\n onDelete,\n children,\n ...props\n },\n ref,\n ) => {\n return (\n <div\n ref={ref}\n className={cn(\n onDelete && 'relative group',\n tagStyles({ variant }),\n className\n )}\n {...props}\n >\n {avatarSrc && (\n <img src={avatarSrc} alt=\"avatar\" className={tagAvatarStyles()} />\n )}\n {startIcon && <span className={tagIconStyles()}>{startIcon}</span>}\n <Typography variant=\"tag\" color=\"inherit\" className=\"whitespace-nowrap\">\n {children}\n </Typography>\n {endIcon && <span className={tagIconStyles()}>{endIcon}</span>}\n {onDelete && (\n <motion.button\n onClick={(e) => {\n e.stopPropagation();\n onDelete();\n }}\n className=\"absolute -top-[6px] -right-[6px] hidden group-hover:flex items-center justify-center bg-[var(--color-white)] border border-[var(--color-gray-200)] rounded-[8px] p-[2px] focus:outline-none focus:ring-2 focus:ring-[var(--color-blue-800)] shrink-0 z-20\"\n aria-label=\"Remove\"\n initial={{ scale: 0, opacity: 0 }}\n whileInView={{ scale: 1, opacity: 1 }}\n whileHover={{ scale: 1.1 }}\n whileTap={{ scale: 0.95 }}\n transition={{\n scale: { type: \"spring\", stiffness: 400, damping: 17 },\n opacity: { duration: 0.2 }\n }}\n >\n <X size={10} className=\"text-[var(--color-gray-800)]\" />\n </motion.button>\n )}\n </div>\n );\n },\n);\n\nTag.displayName = 'Tag';\n","import { cva } from 'class-variance-authority';\n\nexport const tabsListStyles = cva(\n 'inline-flex items-center justify-start bg-transparent p-0 w-full',\n {\n variants: {\n variant: {\n default: '',\n underline: 'border-b border-[var(--color-gray-200)] [&>button]:-mb-px',\n pills: 'bg-[var(--color-gray-200)] rounded p-0.5 gap-1 w-auto',\n segmented: 'bg-[var(--color-gray-100)] rounded-lg p-[3px] gap-[2px] w-auto',\n 'filter-pills': 'gap-1.5 flex-wrap w-auto',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n }\n);\n\nexport const tabsTriggerStyles = cva(\n 'inline-flex items-center justify-center whitespace-nowrap focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 transition-colors cursor-pointer group shrink-0',\n {\n variants: {\n variant: {\n default:\n 'p-2 font-[\"Geist\",system-ui,sans-serif] text-[10px] leading-4 font-normal border-b border-[var(--color-gray-200)] text-[var(--color-gray-600)] data-[state=active]:text-[var(--color-blue-1000)] data-[state=active]:border-[var(--color-blue-1000)] data-[state=inactive]:hover:bg-[var(--color-gray-100)] gap-2',\n underline:\n 'p-2 font-[\"Geist\",system-ui,sans-serif] text-[10px] leading-4 font-normal border-b border-[var(--color-gray-200)] text-[var(--color-gray-600)] data-[state=active]:text-[var(--color-blue-1000)] data-[state=active]:border-[var(--color-blue-1000)] data-[state=inactive]:hover:bg-[var(--color-gray-100)] gap-2',\n pills:\n 'px-2 h-6 rounded font-body text-xs leading-4 font-light text-[var(--color-blue-1000)] border border-transparent data-[state=active]:bg-[var(--color-white)] data-[state=active]:border-[var(--color-gray-200)] data-[state=active]:shadow-sm data-[state=inactive]:hover:bg-[var(--color-gray-100)]',\n segmented:\n 'py-[5px] px-3 rounded-md text-xs font-normal text-[var(--color-gray-600)] data-[state=active]:bg-[var(--color-white)] data-[state=active]:text-[var(--color-gray-1000)] data-[state=active]:font-semibold data-[state=active]:shadow-sm data-[state=inactive]:hover:text-[var(--color-gray-800)]',\n 'filter-pills':\n 'py-1 px-3 rounded-full text-xs font-medium text-[var(--color-gray-600)] border border-[var(--color-gray-200)] data-[state=active]:bg-[rgba(21,177,205,0.09)] data-[state=active]:text-[var(--color-blue-800)] data-[state=active]:border-[rgba(21,177,205,0.25)] data-[state=inactive]:hover:bg-[var(--color-gray-100)] capitalize',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n }\n);\n\nexport const tabsContentStyles = cva(\n 'mt-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] focus-visible:ring-offset-2'\n);\n\nexport const tabsBadgeContainerStyles = cva(\n 'flex items-center gap-[2px]'\n);\n\nexport const tabsTagStyles = cva(\n 'group-data-[state=active]:text-[var(--color-blue-1000)]'\n);\n","// react / next\nimport * as React from 'react';\nimport * as TabsPrimitive from '@radix-ui/react-tabs';\n\n// components\nimport { Tag } from '@/components/molecules/Tag/Tag';\nimport { Settings, TriangleAlert } from '@/components/atoms/icons';\n\n// utils\nimport { cn } from '@/utils/cn';\n\n// styles\nimport {\n tabsListStyles,\n tabsTriggerStyles,\n tabsContentStyles,\n tabsBadgeContainerStyles,\n tabsTagStyles\n} from './Tabs.styles';\n\ntype TabsVariant = 'default' | 'underline' | 'pills' | 'segmented' | 'filter-pills';\n\nconst TabsVariantContext = React.createContext<TabsVariant>('default');\n\nconst Tabs = TabsPrimitive.Root;\n\ninterface TabsListProps\n extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.List> {\n variant?: TabsVariant;\n}\n\nconst TabsList = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.List>,\n TabsListProps\n>(({ className, variant = 'default', ...props }, ref) => (\n <TabsVariantContext.Provider value={variant}>\n <TabsPrimitive.List\n ref={ref}\n className={cn(tabsListStyles({ variant }), className)}\n {...props}\n />\n </TabsVariantContext.Provider>\n));\nTabsList.displayName = TabsPrimitive.List.displayName;\n\ninterface TabsTriggerProps\n extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger> {\n errorCount?: number;\n configurationCount?: number;\n children?: React.ReactNode;\n value: string;\n}\n\nconst TabsTrigger = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Trigger>,\n TabsTriggerProps\n>(({ className, children, errorCount, configurationCount, ...props }, ref) => {\n const variant = React.useContext(TabsVariantContext);\n return (\n <TabsPrimitive.Trigger\n ref={ref}\n className={cn(tabsTriggerStyles({ variant }), className)}\n {...props}\n >\n {children}\n {variant !== 'pills' &&\n (configurationCount !== undefined || errorCount !== undefined) && (\n <div className={tabsBadgeContainerStyles()}>\n {configurationCount !== undefined && (\n <Tag\n variant=\"indicator\"\n startIcon={<Settings size={10} className=\"text-[#15B1CD]\" />}\n className={tabsTagStyles()}\n >\n {configurationCount}\n </Tag>\n )}\n {errorCount !== undefined && (\n <Tag\n variant=\"indicator\"\n startIcon={<TriangleAlert size={10} className=\"text-[#FB6060]\" />}\n className={tabsTagStyles()}\n >\n {errorCount}\n </Tag>\n )}\n </div>\n )}\n </TabsPrimitive.Trigger>\n );\n});\nTabsTrigger.displayName = TabsPrimitive.Trigger.displayName;\n\nconst TabsContent = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.Content\n ref={ref}\n className={cn(tabsContentStyles(), className)}\n {...props}\n />\n));\nTabsContent.displayName = TabsPrimitive.Content.displayName;\n\nexport type { TabsVariant };\nexport { Tabs, TabsList, TabsTrigger, TabsContent };\n","import { cva } from 'class-variance-authority';\n\nexport const textAreaStyles = cva(\n 'w-full bg-[var(--color-white)] border border-solid rounded-[8px] font-normal transition-colors duration-200 box-border focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50 min-h-[80px]',\n {\n variants: {\n status: {\n default:\n 'border-[var(--color-gray-200)] text-[var(--color-gray-600)] placeholder:text-[var(--color-gray-600)] hover:border-[var(--color-gray-500)] focus:border-[var(--color-blue-1000)] focus:text-[var(--color-blue-1000)]',\n error:\n 'border-[var(--color-red-1000)] text-[var(--color-red-1000)] placeholder:text-[var(--color-red-1000)] focus:border-[var(--color-red-1000)]',\n success:\n 'border-[var(--color-green-1000)] text-[var(--color-green-1000)] placeholder:text-[var(--color-green-1000)] focus:border-[var(--color-green-1000)]',\n },\n size: {\n medium: 'px-4 py-4 text-[1rem] leading-[1.5rem]', // 16px/24px\n small: 'px-3 py-2 text-[0.875rem] leading-[1.25rem]', // 14px/20px\n tiny: 'p-2 text-[0.75rem] leading-[1rem]', // 12px/16px\n },\n resize: {\n none: 'resize-none',\n vertical: 'resize-y',\n horizontal: 'resize-x',\n both: 'resize',\n },\n },\n defaultVariants: {\n status: 'default',\n size: 'medium',\n resize: 'vertical',\n },\n }\n);\n\nexport const textAreaContainerStyles = cva('relative w-full', {\n variants: {\n size: {\n medium: '',\n small: '',\n tiny: '',\n },\n },\n defaultVariants: {\n size: 'medium',\n },\n});\n","import { TextareaHTMLAttributes, forwardRef } from 'react';\nimport { cn } from '@/utils/cn';\nimport {\n textAreaStyles,\n textAreaContainerStyles,\n} from './TextArea.styles';\n\nexport interface TextAreaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'size'> {\n status?: 'default' | 'error' | 'success';\n size?: 'medium' | 'small' | 'tiny';\n resize?: 'none' | 'vertical' | 'horizontal' | 'both';\n /** Label displayed above the textarea */\n label?: string;\n /** Hint text displayed below the textarea */\n hint?: string;\n}\n\nexport const TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(\n (\n {\n className,\n status = 'default',\n size = 'medium',\n resize = 'vertical',\n disabled,\n label,\n hint,\n ...props\n },\n ref\n ) => {\n return (\n <div className=\"flex flex-col gap-1\">\n {label && (\n <label className=\"text-[11px] font-semibold text-[var(--color-gray-800)]\">\n {label}\n </label>\n )}\n <div className={textAreaContainerStyles({ size })}>\n <textarea\n ref={ref}\n className={cn(\n textAreaStyles({ status, size, resize }),\n className\n )}\n disabled={disabled}\n {...props}\n />\n </div>\n {hint && (\n <span className=\"text-[11px] text-[var(--color-gray-600)]\">\n {hint}\n </span>\n )}\n </div>\n );\n }\n);\n\nTextArea.displayName = 'TextArea';\n","import { cva } from 'class-variance-authority';\n\nexport const timestampContainerStyles = cva(\n 'inline-flex items-center gap-1 font-sans whitespace-nowrap',\n {\n variants: {\n size: {\n small: 'text-[0.625rem] leading-[1rem]', // 10px / 16px\n medium: 'text-[0.75rem] leading-[1rem]', // 12px / 16px\n large: 'text-[0.875rem] leading-[1.25rem]', // 14px / 20px\n },\n variant: {\n default: 'text-[var(--color-gray-600)]',\n primary: 'text-[var(--color-gray-800)]',\n muted: 'text-[var(--color-gray-600)]',\n },\n },\n defaultVariants: {\n size: 'medium',\n variant: 'default',\n },\n },\n);\n\nexport const timestampIconStyles = cva(\n 'flex items-center justify-center shrink-0',\n {\n variants: {\n size: {\n small: '[&>svg]:w-[10px] [&>svg]:h-[10px]',\n medium: '[&>svg]:w-[12px] [&>svg]:h-[12px]',\n large: '[&>svg]:w-[14px] [&>svg]:h-[14px]',\n },\n },\n defaultVariants: {\n size: 'medium',\n },\n },\n);\n","// React\nimport { HTMLAttributes, forwardRef, useMemo } from 'react';\n\n// Components\nimport { ClockHistory } from '@/components/atoms/icons';\n\n// Styles\nimport { cn } from '@/utils/cn';\nimport {\n timestampContainerStyles,\n timestampIconStyles,\n} from './Timestamp.styles';\n\nexport type TimestampFormat =\n | 'relative'\n | 'short'\n | 'long'\n | 'time'\n | 'datetime';\n\nexport interface TimestampProps\n extends Omit<HTMLAttributes<HTMLTimeElement>, 'dateTime'> {\n /** The date to display - can be a Date object, timestamp number, or ISO string */\n date: Date | number | string;\n /** The format to display the timestamp */\n format?: TimestampFormat;\n /** Size variant */\n size?: 'small' | 'medium' | 'large';\n /** Color variant */\n variant?: 'default' | 'primary' | 'muted';\n /** Whether to show the clock icon */\n showIcon?: boolean;\n /** Custom locale for date formatting (default: 'en-US') */\n locale?: string;\n}\n\n/**\n * Formats a relative time string (e.g., \"2 hours ago\", \"in 3 days\")\n */\nconst formatRelativeTime = (date: Date, now: Date): string => {\n const diffMs = now.getTime() - date.getTime();\n const diffSeconds = Math.floor(diffMs / 1000);\n const diffMinutes = Math.floor(diffSeconds / 60);\n const diffHours = Math.floor(diffMinutes / 60);\n const diffDays = Math.floor(diffHours / 24);\n const diffWeeks = Math.floor(diffDays / 7);\n const diffMonths = Math.floor(diffDays / 30);\n const diffYears = Math.floor(diffDays / 365);\n\n const isFuture = diffMs < 0;\n const absSeconds = Math.abs(diffSeconds);\n const absMinutes = Math.abs(diffMinutes);\n const absHours = Math.abs(diffHours);\n const absDays = Math.abs(diffDays);\n const absWeeks = Math.abs(diffWeeks);\n const absMonths = Math.abs(diffMonths);\n const absYears = Math.abs(diffYears);\n\n const formatUnit = (value: number, unit: string): string => {\n const plural = value === 1 ? '' : 's';\n if (isFuture) {\n return `in ${value} ${unit}${plural}`;\n }\n return `${value} ${unit}${plural} ago`;\n };\n\n if (absSeconds < 60) {\n return 'just now';\n }\n if (absMinutes < 60) {\n return formatUnit(absMinutes, 'minute');\n }\n if (absHours < 24) {\n return formatUnit(absHours, 'hour');\n }\n if (absDays === 1) {\n return isFuture ? 'tomorrow' : 'yesterday';\n }\n if (absDays < 7) {\n return formatUnit(absDays, 'day');\n }\n if (absWeeks < 4) {\n return formatUnit(absWeeks, 'week');\n }\n if (absMonths < 12) {\n return formatUnit(absMonths, 'month');\n }\n return formatUnit(absYears, 'year');\n};\n\n/**\n * Formats a date based on the specified format\n */\nconst formatDate = (\n date: Date,\n format: TimestampFormat,\n locale: string,\n): string => {\n switch (format) {\n case 'relative':\n return formatRelativeTime(date, new Date());\n\n case 'short':\n return date.toLocaleDateString(locale, {\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n });\n\n case 'long':\n return date.toLocaleDateString(locale, {\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n });\n\n case 'time':\n return date.toLocaleTimeString(locale, {\n hour: 'numeric',\n minute: '2-digit',\n hour12: true,\n });\n\n case 'datetime':\n return date.toLocaleDateString(locale, {\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n hour: 'numeric',\n minute: '2-digit',\n hour12: true,\n });\n\n default:\n return date.toLocaleDateString(locale);\n }\n};\n\n/**\n * Parses the input date to a Date object\n */\nconst parseDate = (date: Date | number | string): Date => {\n if (date instanceof Date) {\n return date;\n }\n if (typeof date === 'number') {\n return new Date(date);\n }\n return new Date(date);\n};\n\nexport const Timestamp = forwardRef<HTMLTimeElement, TimestampProps>(\n (\n {\n className,\n date,\n format = 'relative',\n size = 'medium',\n variant = 'default',\n showIcon = false,\n locale = 'en-US',\n ...props\n },\n ref,\n ) => {\n const parsedDate = useMemo(() => parseDate(date), [date]);\n const formattedDate = useMemo(\n () => formatDate(parsedDate, format, locale),\n [parsedDate, format, locale],\n );\n const isoString = useMemo(() => parsedDate.toISOString(), [parsedDate]);\n\n // Icon color based on variant\n const iconColor =\n variant === 'primary' ? 'var(--color-gray-800)' : 'var(--color-gray-600)';\n\n // Icon size based on size prop\n const iconSize = size === 'small' ? 10 : size === 'large' ? 14 : 12;\n\n return (\n <time\n ref={ref}\n dateTime={isoString}\n className={cn(timestampContainerStyles({ size, variant }), className)}\n {...props}\n >\n {showIcon && (\n <span className={timestampIconStyles({ size })}>\n <ClockHistory size={iconSize} color={iconColor} />\n </span>\n )}\n {formattedDate}\n </time>\n );\n },\n);\n\nTimestamp.displayName = 'Timestamp';\n","import { cva, type VariantProps } from 'class-variance-authority';\n\nexport const toastStyles = cva(\n 'flex min-w-[420px] w-fit max-w-[850px] pl-4 pr-3 py-3 rounded-[12px] shadow-xl border pointer-events-auto gap-2 relative items-center bg-white',\n {\n variants: {\n variant: {\n info: 'bg-[linear-gradient(90deg,rgba(21,177,205,0.08)_0%,rgba(21,177,205,0.08)_100%),linear-gradient(90deg,rgb(255,255,255)_0%,rgb(255,255,255)_100%)] border-[var(--color-blue-800)]',\n success: 'bg-[linear-gradient(90deg,rgba(113,212,129,0.08)_0%,rgba(113,212,129,0.08)_100%),linear-gradient(90deg,rgb(255,255,255)_0%,rgb(255,255,255)_100%)] border-[var(--color-green-1000)]',\n warning:\n 'bg-[linear-gradient(90deg,rgba(242,229,40,0.08)_0%,rgba(242,229,40,0.08)_100%),linear-gradient(90deg,rgb(255,255,255)_0%,rgb(255,255,255)_100%)] border-[var(--color-orange-800)]',\n error: 'bg-[linear-gradient(90deg,rgba(251,96,96,0.08)_0%,rgba(251,96,96,0.08)_100%),linear-gradient(90deg,rgb(255,255,255)_0%,rgb(255,255,255)_100%)] border-[var(--color-red-1000)]',\n prompt: 'bg-[var(--color-gray-50)] border-[var(--color-blue-1000)]',\n loading: 'bg-[linear-gradient(90deg,rgba(21,177,205,0.06)_0%,rgba(21,177,205,0.06)_100%),linear-gradient(90deg,rgb(255,255,255)_0%,rgb(255,255,255)_100%)] border-[var(--color-blue-800)]',\n },\n },\n defaultVariants: {\n variant: 'info',\n },\n },\n);\n\nexport type ToastVariant = NonNullable<\n VariantProps<typeof toastStyles>['variant']\n>;\n\nexport const iconStyles = cva('flex-shrink-0', {\n variants: {\n variant: {\n info: 'text-[var(--color-blue-800)]',\n success: 'text-[var(--color-green-1000)]',\n warning: 'text-[var(--color-orange-800)]',\n error: 'text-[var(--color-red-1000)]',\n prompt: 'text-[var(--color-blue-1000)]',\n loading: 'text-[var(--color-blue-800)]',\n },\n },\n defaultVariants: {\n variant: 'info',\n },\n});\n\nexport const contentStyles = cva(\n 'flex flex-col gap-0.5 flex-1 min-w-0 overflow-hidden',\n);\n\nexport const titleStyles = cva(\n 'font-bold text-[var(--color-blue-1000)] text-[0.75rem] leading-normal whitespace-nowrap',\n);\n\nexport const descriptionStyles = cva(\n 'font-normal text-[var(--color-gray-600)] text-[0.6875rem] leading-normal line-clamp-2',\n);\n\nexport const actionsWrapperStyles = cva(\n 'flex items-center gap-2 shrink-0',\n);\n\nexport const separatorStyles = cva(\n 'w-[1px] self-stretch flex-shrink-0 bg-current',\n {\n variants: {\n variant: {\n info: 'text-[var(--color-blue-800)]',\n success: 'text-[var(--color-green-1000)]',\n warning: 'text-[var(--color-orange-800)]',\n error: 'text-[var(--color-red-1000)]',\n prompt: 'text-[var(--color-blue-1000)]',\n loading: 'text-[var(--color-blue-800)]',\n },\n },\n defaultVariants: {\n variant: 'info',\n },\n },\n);\n\nexport const closeButtonStyles = cva(\n 'p-0 bg-transparent border-none text-[var(--color-blue-1000)] hover:opacity-70 transition-opacity flex items-center justify-center w-4 h-4 shrink-0 cursor-pointer rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] focus-visible:ring-offset-2',\n);\n","// react\nimport { ReactNode } from 'react';\nimport { toast, Toaster as SonnerToaster, ToasterProps } from 'sonner';\n\n// components\nimport { Button } from '../Button/Button';\nimport {\n Info,\n TriangleAlert,\n X,\n Check,\n CheckCircle,\n AlertCircle,\n Sparks,\n Trash,\n} from '@/components/atoms/icons';\n\n// styles\nimport {\n toastStyles,\n iconStyles,\n contentStyles,\n titleStyles,\n descriptionStyles,\n closeButtonStyles,\n actionsWrapperStyles,\n separatorStyles,\n ToastVariant,\n} from './Toast.styles';\n\n// misc\nimport { cn } from '@/utils/cn';\n\nexport type { ToastVariant };\n\nexport interface ToastAction {\n label: string;\n onClick: (e: React.MouseEvent<HTMLButtonElement>) => void;\n icon?: ReactNode;\n}\n\nexport interface ToastProps {\n id?: string | number;\n variant?: ToastVariant;\n title: string;\n description?: ReactNode;\n icon?: ReactNode;\n action?: ToastAction;\n secondaryAction?: ToastAction;\n onClose?: () => void;\n}\n\nconst icons: Record<string, typeof Info | null> = {\n info: Info,\n success: CheckCircle,\n warning: TriangleAlert,\n error: AlertCircle,\n prompt: Sparks,\n loading: null,\n};\n\nconst iconColors: Record<string, string> = {\n info: 'var(--color-blue-800)',\n success: 'var(--color-green-1000)',\n warning: 'var(--color-orange-800)',\n error: 'var(--color-red-1000)',\n prompt: 'var(--color-blue-800)',\n loading: 'var(--color-blue-800)',\n};\n\nexport const Toast = ({\n id,\n variant = 'info',\n title,\n description,\n icon,\n action,\n secondaryAction,\n onClose,\n}: ToastProps) => {\n const IconComponent = icons[variant];\n const iconColor = iconColors[variant];\n\n const handleClose = () => {\n if (onClose) {\n onClose();\n }\n if (id) {\n toast.dismiss(id);\n }\n };\n\n const handleActionClick = (\n onClick: (e: React.MouseEvent<HTMLButtonElement>) => void,\n ) => {\n return (e: React.MouseEvent<HTMLButtonElement>) => {\n onClick(e);\n if (id) {\n toast.dismiss(id);\n }\n };\n };\n\n const renderIcon = () => {\n if (icon) return icon;\n\n // Loading spinner\n if (variant === 'loading') {\n return (\n <svg className=\"animate-spin\" width={16} height={16} viewBox=\"0 0 16 16\" fill=\"none\">\n <circle cx=\"8\" cy=\"8\" r=\"6\" stroke={iconColor} strokeWidth=\"2\" strokeLinecap=\"round\" strokeDasharray=\"28\" strokeDashoffset=\"8\" />\n </svg>\n );\n }\n\n // Render custom icons with color prop\n if (variant === 'success') {\n return <CheckCircle size={16} color={iconColor} />;\n }\n if (variant === 'error') {\n return <AlertCircle size={16} color={iconColor} />;\n }\n if (variant === 'prompt') {\n return <Sparks size={16} color={iconColor} />;\n }\n\n // Lucide icons inherit color from CSS\n return IconComponent ? <IconComponent size={16} /> : null;\n };\n\n return (\n <div className={cn(toastStyles({ variant }))} role=\"alert\">\n <div className={iconStyles({ variant })}>{renderIcon()}</div>\n\n <div className={contentStyles()}>\n <span className={titleStyles()}>{title}</span>\n {description && (\n <span className={descriptionStyles()}>{description}</span>\n )}\n </div>\n\n <div className={separatorStyles({ variant })} />\n\n <div className={actionsWrapperStyles()}>\n {secondaryAction && (\n <Button\n onClick={handleActionClick(secondaryAction.onClick)}\n variant=\"ghost\"\n size=\"sm\"\n leftIcon={\n secondaryAction.icon || <Trash size={13} color=\"currentColor\" />\n }\n className=\"w-auto\"\n >\n {secondaryAction.label}\n </Button>\n )}\n\n {action && (\n <Button\n onClick={handleActionClick(action.onClick)}\n variant=\"default\"\n size=\"sm\"\n leftIcon={action.icon || <Check size={13} color=\"currentColor\" />}\n className=\"w-auto\"\n >\n {action.label}\n </Button>\n )}\n\n <button\n onClick={handleClose}\n className={closeButtonStyles()}\n aria-label=\"Close\"\n >\n <X size={16} />\n </button>\n </div>\n </div>\n );\n};\n\nexport interface ToastContainerProps extends Omit<ToasterProps, 'position'> {\n /** Position of the toast container */\n position?: ToasterProps['position'];\n /** Offset from the edge of the screen in pixels */\n offset?: number | string;\n /** Gap between toasts in pixels */\n gap?: number;\n /** Custom width for toasts */\n width?: number | string;\n}\n\n// Custom Toast Container configured for our design system\nexport const ToastContainer = ({\n position = 'bottom-right',\n offset = 24,\n gap = 8,\n width,\n ...props\n}: ToastContainerProps) => {\n return (\n <SonnerToaster\n position={position}\n offset={offset}\n gap={gap}\n toastOptions={{\n unstyled: true,\n classNames: {\n toast: cn('bg-transparent p-0', width ? '' : 'w-auto'),\n },\n style: width ? { width: typeof width === 'number' ? `${width}px` : width } : undefined,\n }}\n {...props}\n />\n );\n};\n\n// Helper to show toasts easier\nexport const showToast = {\n success: (title: string, description?: string, action?: ToastAction) =>\n toast.custom((id) => (\n <Toast\n id={id}\n variant=\"success\"\n title={title}\n description={description}\n action={action}\n />\n )),\n error: (title: string, description?: string, action?: ToastAction) =>\n toast.custom((id) => (\n <Toast\n id={id}\n variant=\"error\"\n title={title}\n description={description}\n action={action}\n />\n )),\n warning: (title: string, description?: string, action?: ToastAction) =>\n toast.custom((id) => (\n <Toast\n id={id}\n variant=\"warning\"\n title={title}\n description={description}\n action={action}\n />\n )),\n info: (title: string, description?: string, action?: ToastAction) =>\n toast.custom((id) => (\n <Toast\n id={id}\n variant=\"info\"\n title={title}\n description={description}\n action={action}\n />\n )),\n prompt: (\n title: string,\n description?: string,\n action?: ToastAction,\n secondaryAction?: ToastAction,\n ) =>\n toast.custom((id) => (\n <Toast\n id={id}\n variant=\"prompt\"\n title={title}\n description={description}\n action={action}\n secondaryAction={secondaryAction}\n />\n )),\n loading: (title: string, description?: string) =>\n toast.custom((id) => (\n <Toast\n id={id}\n variant=\"loading\"\n title={title}\n description={description}\n />\n )),\n custom: (props: Omit<ToastProps, 'id'>) =>\n toast.custom((id) => <Toast id={id} {...props} />),\n};\n","import { cva } from 'class-variance-authority';\n\n// Row container: label left, toggle right\nexport const toggleRowStyles = cva('flex items-center justify-between w-full', {\n variants: {\n size: {\n s: 'h-10',\n m: 'min-h-[48px]',\n l: 'min-h-[48px]',\n },\n },\n defaultVariants: {\n size: 'l',\n },\n});\n\n// Label text\nexport const toggleLabelStyles = cva('select-none', {\n variants: {\n size: {\n s: 'text-[var(--color-blue-1000)]',\n m: 'font-medium text-[var(--color-gray-1000)]',\n l: 'font-medium text-[var(--color-gray-1000)]',\n },\n },\n defaultVariants: {\n size: 'l',\n },\n});\n\n// Toggle track (the colored pill)\nexport const toggleButtonStyles = cva(\n 'relative inline-flex shrink-0 cursor-pointer items-center rounded-full transition-colors duration-200 ease-in-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',\n {\n variants: {\n enabled: {\n true: 'bg-[var(--color-blue-800)]',\n false: 'bg-[var(--color-gray-200)]',\n },\n size: {\n s: 'h-4 w-7',\n m: 'h-5 w-9',\n l: 'h-6 w-11',\n },\n },\n defaultVariants: {\n enabled: false,\n size: 'l',\n },\n },\n);\n\n// Toggle knob (the white circle)\nexport const toggleKnobStyles = cva(\n 'pointer-events-none inline-block transform rounded-full bg-white ring-0 transition duration-200 ease-in-out',\n {\n variants: {\n enabled: {\n true: '',\n false: '',\n },\n size: {\n s: 'h-3 w-3 shadow-sm',\n m: 'h-4 w-4 shadow',\n l: 'h-5 w-5 shadow-lg',\n },\n },\n compoundVariants: [\n // s: track 28px, knob 12px → travel = 28 - 12 - 4 = 12\n { enabled: false, size: 's', class: 'translate-x-0.5' },\n { enabled: true, size: 's', class: 'translate-x-[14px]' },\n // m: track 36px, knob 16px → travel = 36 - 16 - 4 = 16\n { enabled: false, size: 'm', class: 'translate-x-0.5' },\n { enabled: true, size: 'm', class: 'translate-x-[18px]' },\n // l: track 44px, knob 20px → travel = 44 - 20 - 4 = 20\n { enabled: false, size: 'l', class: 'translate-x-0.5' },\n { enabled: true, size: 'l', class: 'translate-x-[22px]' },\n ],\n defaultVariants: {\n enabled: false,\n size: 'l',\n },\n },\n);\n\n// ON/OFF status label\nexport const toggleStatusLabelStyles = cva(\n 'font-bold uppercase text-[var(--color-gray-600)]',\n {\n variants: {\n size: {\n s: 'text-[10px] w-5',\n m: 'text-[10px] w-5',\n l: 'text-xs w-6',\n },\n },\n defaultVariants: {\n size: 'l',\n },\n },\n);\n","// React\nimport { forwardRef, ButtonHTMLAttributes } from 'react';\n\n// Styles\nimport { cn } from '@/utils/cn';\nimport {\n toggleRowStyles,\n toggleLabelStyles,\n toggleButtonStyles,\n toggleKnobStyles,\n toggleStatusLabelStyles,\n} from './Toggle.styles';\n\n// Components\nimport { Typography } from '@/components/atoms/Typography/Typography';\n\nexport type ToggleSize = 's' | 'm' | 'l';\n\nexport interface ToggleProps\n extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onChange'> {\n enabled: boolean;\n onChange: (enabled: boolean) => void;\n label?: string;\n /** Size variant: 's' (16x28), 'm' (20x36), 'l' (24x44, default) */\n size?: ToggleSize;\n /** Show ON/OFF status label next to the toggle */\n showStatusLabel?: boolean;\n}\n\nconst labelVariantMap: Record<ToggleSize, 'x-small' | 'small'> = {\n s: 'x-small',\n m: 'small',\n l: 'small',\n};\n\nexport const Toggle = forwardRef<HTMLButtonElement, ToggleProps>(\n (\n {\n enabled,\n onChange,\n label,\n size = 'l',\n showStatusLabel = false,\n className,\n disabled,\n ...props\n },\n ref,\n ) => {\n return (\n <div className={cn(toggleRowStyles({ size }), className)}>\n {label && (\n <Typography\n variant={labelVariantMap[size]}\n className={toggleLabelStyles({ size })}\n >\n {label}\n </Typography>\n )}\n <div className=\"flex items-center gap-1\">\n <button\n ref={ref}\n type=\"button\"\n role=\"switch\"\n aria-checked={enabled}\n disabled={disabled}\n onClick={() => !disabled && onChange(!enabled)}\n className={toggleButtonStyles({ enabled, size })}\n {...props}\n >\n <span className={toggleKnobStyles({ enabled, size })} />\n </button>\n {showStatusLabel && (\n <span className={toggleStatusLabelStyles({ size })}>\n {enabled ? 'ON' : 'OFF'}\n </span>\n )}\n </div>\n </div>\n );\n },\n);\n\nToggle.displayName = 'Toggle';\n","import { cva } from 'class-variance-authority';\n\nexport const statusMessageContainerStyles = cva(\n 'flex items-center justify-between w-full gap-2 min-h-[20px]'\n);\n\nexport const statusMessageTextStyles = cva(\n 'text-xs font-normal font-sans leading-4 whitespace-nowrap',\n {\n variants: {\n status: {\n success: 'text-[var(--color-gray-800)]',\n warning: 'text-[var(--color-gray-800)]',\n error: 'text-[var(--color-gray-800)]',\n info: 'text-[var(--color-gray-800)]',\n neutral: 'text-[var(--color-gray-800)]',\n loading: 'text-[var(--color-gray-800)]',\n },\n },\n defaultVariants: {\n status: 'neutral',\n },\n }\n);\n\nexport const statusMessageIconStyles = cva(\n 'w-4 h-4',\n {\n variants: {\n status: {\n success: 'text-[var(--color-green-1000)]',\n warning: 'text-[var(--color-orange-800)]',\n error: 'text-[var(--color-red-1000)]',\n info: 'text-[var(--color-blue-800)]',\n neutral: 'text-[var(--color-gray-600)]',\n loading: 'text-[var(--color-blue-800)]', // Matches Running/Info color\n },\n },\n defaultVariants: {\n status: 'neutral',\n },\n }\n);\n\n","import { HTMLAttributes, forwardRef } from 'react';\nimport { cn } from '@/utils/cn';\nimport { StatusIndicator } from '@/components/atoms/StatusIndicator/StatusIndicator';\nimport { CheckCircle, AlertCircle, TriangleAlert, Loader, Info } from '@/components/atoms/icons';\nimport {\n statusMessageContainerStyles,\n statusMessageTextStyles,\n} from './StatusMessage.styles';\n\nexport interface StatusMessageProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {\n status?: 'success' | 'warning' | 'error' | 'info' | 'neutral' | 'loading';\n message: string;\n}\n\n// Icon colors matching StatusIndicator dot colors\nconst iconColors = {\n success: 'var(--color-green-1000)',\n warning: 'var(--color-orange-800)',\n error: 'var(--color-red-1000)',\n info: 'var(--color-blue-800)',\n neutral: 'var(--color-gray-600)',\n loading: 'var(--color-blue-800)',\n};\n\nexport const StatusMessage = forwardRef<HTMLDivElement, StatusMessageProps>(\n ({ className, status = 'neutral', message, ...props }, ref) => {\n // Map status to StatusIndicator variant\n const indicatorVariant = status === 'loading' ? 'info' : status;\n const iconColor = iconColors[status];\n\n // Map status to Icon\n const renderIcon = () => {\n if (status === 'loading') {\n return <Loader size={16} color={iconColor} className=\"animate-spin\" />;\n }\n if (status === 'success') {\n return <CheckCircle size={16} color={iconColor} />;\n }\n if (status === 'warning') {\n return <TriangleAlert size={16} color={iconColor} />;\n }\n if (status === 'error') {\n return <AlertCircle size={16} color={iconColor} />;\n }\n if (status === 'info') {\n return <Info size={16} color={iconColor} />;\n }\n return null;\n };\n\n return (\n <div\n ref={ref}\n className={cn(statusMessageContainerStyles(), className)}\n {...props}\n >\n <div className=\"flex items-center gap-2\">\n <StatusIndicator variant={indicatorVariant} size=\"small\" />\n <span className={statusMessageTextStyles({ status })}>{message}</span>\n </div>\n <div className=\"w-4 h-4 flex items-center justify-center\">\n {renderIcon()}\n </div>\n </div>\n );\n }\n);\n\nStatusMessage.displayName = 'StatusMessage';\n\n","import { cva } from 'class-variance-authority';\nimport { cn } from '@/utils/cn';\nimport type { RenderMode } from '@/types/renderMode';\n\n/**\n * ReportHeader — Title block for financial reports and agent-generated documents.\n * Displays title, optional subtitle, period, generated timestamp, and a status badge.\n */\nexport interface ReportHeaderProps {\n title: string;\n subtitle?: string;\n /** Period string, e.g. \"Q1 2025\" or \"January 2025\" */\n period: string;\n /** \"As at\" date when distinct from the report period, e.g. \"31 Mar 2026\" */\n asAtDate?: string;\n /** Human-readable timestamp, e.g. \"7 Apr 2025 at 14:32\" */\n generatedAt?: string;\n status?: 'draft' | 'provisional' | 'final';\n /** Output target — controls layout density and which elements are shown */\n renderMode?: RenderMode;\n className?: string;\n}\n\nconst badgeStyles = cva(\n 'inline-flex items-center px-[10px] py-[3px] rounded-full text-[11px] font-semibold whitespace-nowrap shrink-0',\n {\n variants: {\n status: {\n draft: 'bg-[var(--color-gray-200)] text-[var(--color-gray-800)]',\n provisional: 'bg-[#fef9c3] text-[#854d0e]',\n final: 'bg-[var(--color-green-200)] text-[var(--color-green-1000)]',\n },\n },\n defaultVariants: {\n status: 'draft',\n },\n }\n);\n\nconst STATUS_LABEL: Record<string, string> = {\n draft: 'Draft',\n provisional: 'Provisional',\n final: 'Final',\n};\n\nexport function ReportHeader({\n title,\n subtitle,\n period,\n asAtDate,\n generatedAt,\n status,\n renderMode = 'web',\n className,\n}: ReportHeaderProps) {\n const isPdf = renderMode === 'pdf';\n const isExcel = renderMode === 'excel';\n const showStatus = renderMode === 'web' && status;\n const showGeneratedAt = renderMode === 'web' && generatedAt;\n const padding = isPdf ? '12px 16px' : isExcel ? '8px' : '20px 24px';\n const titleSize = isPdf ? '18px' : '20px';\n\n return (\n <div\n className={cn(\n 'flex items-start justify-between gap-4 bg-[var(--color-white)] border-b border-[var(--color-gray-200)]',\n className\n )}\n style={{ padding }}\n >\n <div className=\"flex flex-col gap-1\">\n <h1\n className=\"m-0 font-bold leading-[1.25] text-[var(--color-gray-1000)]\"\n style={{ fontSize: titleSize }}\n >\n {title}\n </h1>\n {subtitle && (\n <p className=\"m-0 text-[13px] text-[var(--color-gray-800)]\">{subtitle}</p>\n )}\n <div className=\"flex items-center gap-3 mt-1\">\n {period && (\n <span className=\"text-[12px] text-[var(--color-gray-600)]\">{period}</span>\n )}\n {asAtDate && (\n <>\n <span className=\"text-[12px] text-[var(--color-gray-200)]\">·</span>\n <span className=\"text-[12px] text-[var(--color-gray-600)]\">As at {asAtDate}</span>\n </>\n )}\n {period && showGeneratedAt && (\n <span className=\"text-[12px] text-[var(--color-gray-200)]\">·</span>\n )}\n {showGeneratedAt && (\n <span className=\"text-[12px] text-[var(--color-gray-600)]\">\n Generated {generatedAt}\n </span>\n )}\n </div>\n </div>\n {showStatus && (\n <span className={badgeStyles({ status })}>{STATUS_LABEL[status!] ?? status}</span>\n )}\n </div>\n );\n}\n","import { cn } from '@/utils/cn';\nimport type { RenderMode } from '@/types/renderMode';\n\n/**\n * KpiStrip — Responsive grid of 2–4 KPI cards in a horizontal strip.\n * Each card shows a label, large monospace value, and optional colour-coded delta.\n */\nexport interface KpiItem {\n label: string;\n value: string;\n /** Formatted delta string, e.g. \"+£12,400\" or \"−3.2%\" */\n delta?: string;\n deltaDir?: 'up' | 'down' | 'flat' | 'warning';\n}\n\nexport interface KpiStripProps {\n items: KpiItem[];\n /** Number of columns in the grid (default: 4) */\n columns?: 2 | 3 | 4;\n /** Output target — pdf/excel renders as a compact table instead of card grid */\n renderMode?: RenderMode;\n className?: string;\n}\n\nconst COL_CLASS: Record<number, string> = {\n 2: 'grid-cols-2',\n 3: 'grid-cols-3',\n 4: 'grid-cols-4',\n};\n\nconst DELTA_COLOR: Record<string, string> = {\n up: 'var(--color-green-1000)',\n down: 'var(--color-red-1000)',\n flat: 'var(--color-gray-800)',\n warning: 'var(--color-amber-1000)',\n};\n\nconst MONO = 'Geist Mono, ui-monospace, monospace';\n\nexport function KpiStrip({ items, columns = 4, renderMode = 'web', className }: KpiStripProps) {\n // PDF/Excel: compact single-row table instead of tall bordered cards\n if (renderMode === 'pdf' || renderMode === 'excel') {\n return (\n <table\n className={cn(className)}\n style={{\n width: '100%',\n borderCollapse: 'collapse',\n border: renderMode === 'pdf' ? '1px solid var(--color-gray-200)' : undefined,\n }}\n >\n <tbody>\n <tr>\n {items.map((kpi, i) => (\n <td\n key={i}\n style={{\n padding: '8px 12px',\n verticalAlign: 'top',\n borderRight: i < items.length - 1 ? '1px solid var(--color-gray-200)' : undefined,\n }}\n >\n <div\n style={{\n fontSize: 10,\n fontWeight: 700,\n textTransform: 'uppercase',\n letterSpacing: '0.08em',\n color: 'var(--color-gray-600)',\n }}\n >\n {kpi.label}\n </div>\n <div\n style={{\n fontSize: 16,\n fontWeight: 300,\n fontFamily: MONO,\n fontVariantNumeric: 'tabular-nums',\n letterSpacing: '-0.02em',\n color: 'var(--color-gray-1000)',\n lineHeight: 1.3,\n marginTop: 2,\n }}\n >\n {kpi.value}\n </div>\n {kpi.delta && (\n <div\n style={{\n fontSize: 11,\n fontWeight: 600,\n fontFamily: MONO,\n color: DELTA_COLOR[kpi.deltaDir ?? 'flat'] ?? DELTA_COLOR.flat,\n marginTop: 1,\n }}\n >\n {kpi.delta}\n </div>\n )}\n </td>\n ))}\n </tr>\n </tbody>\n </table>\n );\n }\n\n // Web: original card grid\n const colClass = COL_CLASS[columns] ?? 'grid-cols-4';\n\n return (\n <div className={cn(`grid ${colClass} gap-3`, className)}>\n {items.map((kpi, i) => (\n <div\n key={i}\n className=\"bg-[var(--color-white)] border border-[var(--color-gray-200)] rounded-xl flex flex-col gap-1.5\"\n style={{ padding: '18px 20px' }}\n >\n <div className=\"text-[10px] font-bold uppercase tracking-[0.08em] text-[var(--color-gray-600)]\">\n {kpi.label}\n </div>\n <div\n className=\"text-[22px] font-light leading-none text-[var(--color-gray-1000)]\"\n style={{\n fontFamily: MONO,\n fontVariantNumeric: 'tabular-nums',\n letterSpacing: '-0.02em',\n }}\n >\n {kpi.value}\n </div>\n {kpi.delta && (\n <div\n className=\"text-[11px] font-semibold\"\n style={{\n fontFamily: MONO,\n color: DELTA_COLOR[kpi.deltaDir ?? 'flat'] ?? DELTA_COLOR.flat,\n }}\n >\n {kpi.delta}\n </div>\n )}\n </div>\n ))}\n </div>\n );\n}\n","import { cn } from '@/utils/cn';\nimport type { RenderMode } from '@/types/renderMode';\n\n/**\n * MetricCard — Single KPI card with a large monospace value, label, and optional delta.\n * For a grid of cards, use KpiStrip instead.\n */\nexport interface MetricCardProps {\n label: string;\n value: string;\n /** Formatted delta string, e.g. \"+8.3% vs prior month\" */\n delta?: string;\n deltaDir?: 'up' | 'down' | 'flat' | 'warning';\n /** Secondary descriptive text shown below the delta */\n subtext?: string;\n /** Output target — pdf uses smaller value font */\n renderMode?: RenderMode;\n className?: string;\n}\n\nconst DELTA_COLOR: Record<string, string> = {\n up: 'var(--color-green-1000)',\n down: 'var(--color-red-1000)',\n flat: 'var(--color-gray-800)',\n warning: 'var(--color-amber-1000)',\n};\n\nexport function MetricCard({\n label,\n value,\n delta,\n deltaDir = 'flat',\n subtext,\n renderMode = 'web',\n className,\n}: MetricCardProps) {\n const isPdf = renderMode === 'pdf';\n const valueSize = isPdf ? '20px' : '28px';\n const padding = isPdf ? '12px 16px' : '18px 20px';\n\n return (\n <div\n className={cn(\n 'bg-[var(--color-white)] border border-[var(--color-gray-200)] rounded-xl flex flex-col gap-1.5',\n className\n )}\n style={{ padding }}\n >\n <div className=\"text-[10px] font-bold uppercase tracking-[0.08em] text-[var(--color-gray-600)]\">\n {label}\n </div>\n <div\n className=\"font-light leading-none text-[var(--color-gray-1000)]\"\n style={{\n fontSize: valueSize,\n fontFamily: 'Geist Mono, ui-monospace, monospace',\n fontVariantNumeric: 'tabular-nums',\n letterSpacing: '-0.02em',\n }}\n >\n {value}\n </div>\n {delta && (\n <div\n className=\"text-[12px] font-semibold\"\n style={{\n fontFamily: 'Geist Mono, ui-monospace, monospace',\n color: DELTA_COLOR[deltaDir] ?? DELTA_COLOR.flat,\n }}\n >\n {delta}\n </div>\n )}\n {subtext && (\n <div className=\"text-[11px] text-[var(--color-gray-600)]\">{subtext}</div>\n )}\n </div>\n );\n}\n","import { cn } from '@/utils/cn';\nimport type { RenderMode } from '@/types/renderMode';\n\n/**\n * BriefingCard — Summary card with a title, body text, and optional action buttons.\n * Used for agent-generated insights, context blocks, and narrative summaries in reports.\n */\nexport interface BriefingCardAction {\n label: string;\n onClick?: () => void;\n}\n\nexport interface BriefingCardProps {\n title?: string;\n body?: string;\n actions?: BriefingCardAction[];\n /** Output target — pdf/excel hide action buttons */\n renderMode?: RenderMode;\n className?: string;\n}\n\nexport function BriefingCard({ title, body, actions, renderMode = 'web', className }: BriefingCardProps) {\n const showActions = renderMode === 'web' && actions && actions.length > 0;\n const padding = renderMode === 'pdf' ? '16px 20px' : '20px 24px';\n\n return (\n <div\n className={cn(\n 'bg-[var(--color-white)] border border-[var(--color-gray-200)] rounded-xl flex flex-col gap-3',\n className\n )}\n style={{ padding }}\n >\n {title && (\n <h3 className=\"m-0 text-[15px] font-semibold text-[var(--color-gray-1000)]\">\n {title}\n </h3>\n )}\n {body && (\n <p className=\"m-0 text-[13px] leading-[1.6] text-[var(--color-gray-800)]\">\n {body}\n </p>\n )}\n {showActions && (\n <div className=\"flex gap-2 flex-wrap\">\n {actions!.map((action, i) => (\n <button\n key={i}\n onClick={action.onClick}\n className=\"px-4 py-1.5 border border-[var(--color-gray-200)] rounded-lg bg-[var(--color-gray-50)] text-[var(--color-gray-1000)] text-[13px] font-medium cursor-pointer hover:bg-[var(--color-gray-100)] transition-colors duration-150\"\n >\n {action.label}\n </button>\n ))}\n </div>\n )}\n </div>\n );\n}\n","import { cva } from 'class-variance-authority';\nimport { cn } from '@/utils/cn';\nimport type { RenderMode } from '@/types/renderMode';\n\n/**\n * ReportBanner — Contextual alert banner for reports and agent responses.\n * Variants: info (blue), success (green), warning (yellow), error (red).\n *\n * Named ReportBanner to avoid collision with any existing Banner components\n * and to signal its intended use in the reporting context.\n */\nexport interface ReportBannerAction {\n label: string;\n onClick?: () => void;\n}\n\nexport interface ReportBannerProps {\n variant?: 'info' | 'success' | 'warning' | 'error';\n title: string;\n message?: string;\n action?: ReportBannerAction;\n /** Output target — pdf/excel hide action buttons */\n renderMode?: RenderMode;\n className?: string;\n}\n\nconst bannerStyles = cva('flex gap-3 rounded-[10px] border items-start', {\n variants: {\n variant: {\n info: 'bg-[var(--color-blue-200)] border-[var(--color-blue-400)]',\n success: 'bg-[#f0fdf4] border-[#bbf7d0]',\n warning: 'bg-[#fefce8] border-[#fde68a]',\n error: 'bg-[var(--color-red-200)] border-[#fecaca]',\n },\n },\n defaultVariants: {\n variant: 'info',\n },\n});\n\nconst ICON: Record<string, string> = {\n info: '\\u2139',\n success: '\\u2713',\n warning: '\\u26A0',\n error: '\\u2715',\n};\n\nconst TITLE_COLOR: Record<string, string> = {\n info: '#1e40af',\n success: '#166534',\n warning: '#854d0e',\n error: '#991b1b',\n};\n\nconst MSG_COLOR: Record<string, string> = {\n info: '#3b82f6',\n success: '#16a34a',\n warning: '#d97706',\n error: '#dc2626',\n};\n\nconst BORDER_COLOR: Record<string, string> = {\n info: 'var(--color-blue-400)',\n success: '#bbf7d0',\n warning: '#fde68a',\n error: '#fecaca',\n};\n\nexport function ReportBanner({\n variant = 'info',\n title,\n message,\n action,\n renderMode = 'web',\n className,\n}: ReportBannerProps) {\n const showAction = renderMode === 'web' && action;\n const padding = renderMode === 'pdf' ? '10px 14px' : '12px 16px';\n\n return (\n <div\n className={cn(bannerStyles({ variant }), className)}\n style={{ padding }}\n >\n <span\n className=\"text-[14px] shrink-0 mt-[1px]\"\n style={{ color: MSG_COLOR[variant] }}\n >\n {ICON[variant]}\n </span>\n <div className=\"flex-1 flex flex-col gap-[2px]\">\n <span\n className=\"text-[13px] font-semibold\"\n style={{ color: TITLE_COLOR[variant] }}\n >\n {title}\n </span>\n {message && (\n <span className=\"text-[12px]\" style={{ color: MSG_COLOR[variant] }}>\n {message}\n </span>\n )}\n </div>\n {showAction && (\n <button\n onClick={action!.onClick}\n className=\"text-[12px] font-medium cursor-pointer bg-transparent shrink-0\"\n style={{\n padding: '4px 12px',\n border: `1px solid ${BORDER_COLOR[variant]}`,\n borderRadius: 6,\n color: TITLE_COLOR[variant],\n }}\n >\n {action!.label}\n </button>\n )}\n </div>\n );\n}\n","import { cn } from '@/utils/cn';\n\n/**\n * EmptyState — Centred empty-state block for tables, lists, and panels with no data.\n * Supports a title, optional description, and an optional primary action button.\n */\nexport interface EmptyStateProps {\n title: string;\n description?: string;\n action?: {\n label: string;\n onClick?: () => void;\n };\n className?: string;\n}\n\nexport function EmptyState({ title, description, action, className }: EmptyStateProps) {\n return (\n <div\n className={cn(\n 'flex flex-col items-center justify-center gap-3 text-center',\n className\n )}\n style={{ padding: '48px 24px' }}\n >\n <div\n className=\"w-10 h-10 rounded-full bg-[var(--color-gray-50)] border border-[var(--color-gray-200)] flex items-center justify-center text-[18px] text-[var(--color-gray-600)]\"\n >\n ○\n </div>\n <div className=\"flex flex-col gap-1\">\n <h3 className=\"m-0 text-[15px] font-semibold text-[var(--color-gray-1000)]\">\n {title}\n </h3>\n {description && (\n <p\n className=\"m-0 text-[13px] text-[var(--color-gray-800)]\"\n style={{ maxWidth: 360 }}\n >\n {description}\n </p>\n )}\n </div>\n {action && (\n <button\n onClick={action.onClick}\n className=\"px-5 py-2 border-none rounded-lg bg-[var(--color-blue-1000)] text-[var(--color-white)] text-[13px] font-semibold cursor-pointer hover:opacity-90 transition-opacity duration-150\"\n >\n {action.label}\n </button>\n )}\n </div>\n );\n}\n","import { cn } from '@/utils/cn';\nimport type { RenderMode } from '@/types/renderMode';\n\n/**\n * VarianceBand — Horizontal strip of variance items, each with a label and\n * direction-coded value. Used for period-over-period comparisons in financial reports.\n */\nexport interface VarianceBandItem {\n label: string;\n value: string;\n direction?: 'up' | 'down' | 'flat';\n}\n\nexport interface VarianceBandProps {\n items: VarianceBandItem[];\n /** Output target — pdf/excel render as a compact single-line summary */\n renderMode?: RenderMode;\n className?: string;\n}\n\nconst DIR_COLOR: Record<string, string> = {\n up: 'var(--color-green-1000)',\n down: 'var(--color-red-1000)',\n flat: 'var(--color-gray-800)',\n};\n\nconst MONO = 'Geist Mono, ui-monospace, monospace';\n\nexport function VarianceBand({ items, renderMode = 'web', className }: VarianceBandProps) {\n // PDF/Excel: compact single-line rendering to avoid page overflow\n if (renderMode === 'pdf' || renderMode === 'excel') {\n return (\n <div\n className={cn('flex items-center gap-4 flex-wrap', className)}\n style={{\n padding: '6px 0',\n fontSize: 12,\n color: 'var(--color-gray-800)',\n }}\n >\n {items.map((item, i) => (\n <span key={i} style={{ whiteSpace: 'nowrap' }}>\n <span style={{ fontWeight: 600, color: 'var(--color-gray-600)', marginRight: 4 }}>\n {item.label}:\n </span>\n <span\n style={{\n fontFamily: MONO,\n fontVariantNumeric: 'tabular-nums',\n fontWeight: 600,\n color: DIR_COLOR[item.direction ?? 'flat'] ?? DIR_COLOR.flat,\n }}\n >\n {item.value}\n </span>\n {i < items.length - 1 && (\n <span style={{ margin: '0 4px', color: 'var(--color-gray-400)' }}>|</span>\n )}\n </span>\n ))}\n </div>\n );\n }\n\n // Web: original tall flex strip\n return (\n <div\n className={cn(\n 'flex items-stretch bg-[var(--color-gray-50)] border border-[var(--color-gray-200)] rounded-lg overflow-hidden',\n className\n )}\n >\n {items.map((item, i) => (\n <div\n key={i}\n className=\"flex-1 flex flex-col gap-1\"\n style={{\n padding: '12px 16px',\n borderLeft: i > 0 ? '1px solid var(--color-gray-200)' : undefined,\n }}\n >\n <span className=\"text-[10px] font-bold uppercase tracking-[0.08em] text-[var(--color-gray-600)]\">\n {item.label}\n </span>\n <span\n className=\"text-[16px] font-semibold\"\n style={{\n fontFamily: MONO,\n fontVariantNumeric: 'tabular-nums',\n color: DIR_COLOR[item.direction ?? 'flat'] ?? DIR_COLOR.flat,\n }}\n >\n {item.value}\n </span>\n </div>\n ))}\n </div>\n );\n}\n","import { useState } from 'react';\nimport { cn } from '@/utils/cn';\nimport type { RenderMode } from '@/types/renderMode';\n\n/**\n * CommentaryBlock — Narrative text block with author/date metadata stamp.\n * Used for CFO commentary, variance explanations, and board pack narratives.\n * Supports expandable/collapsible long-form content.\n */\nexport interface CommentaryBlockProps {\n content: string;\n author?: string;\n authorRole?: string;\n date?: string;\n /** Section heading label */\n sectionLabel?: string;\n expandable?: boolean;\n defaultExpanded?: boolean;\n variant?: 'default' | 'highlighted' | 'audit';\n /** Output target — pdf/excel disable expand/collapse */\n renderMode?: RenderMode;\n className?: string;\n}\n\nconst VARIANT_STYLES = {\n default: 'bg-[var(--color-white)] border border-[var(--color-gray-200)]',\n highlighted: 'bg-[var(--color-gray-50)] border border-[var(--color-gray-200)]',\n audit: 'bg-[#fffbeb] border border-[#fde68a]',\n};\n\nexport function CommentaryBlock({\n content,\n author,\n authorRole,\n date,\n sectionLabel,\n expandable = false,\n defaultExpanded = true,\n variant = 'default',\n renderMode = 'web',\n className,\n}: CommentaryBlockProps) {\n const [expanded, setExpanded] = useState(defaultExpanded);\n const isWeb = renderMode === 'web';\n const showToggle = isWeb && expandable && content.length > 200;\n\n return (\n <div\n className={cn(\n 'rounded-xl flex flex-col gap-3',\n VARIANT_STYLES[variant],\n className\n )}\n style={{ padding: renderMode === 'pdf' ? '12px 16px' : '16px 20px' }}\n >\n {sectionLabel && (\n <p className=\"m-0 text-[10px] font-bold uppercase tracking-[0.08em] text-[var(--color-gray-600)]\">\n {sectionLabel}\n </p>\n )}\n\n <p\n className={cn(\n 'm-0 text-[13px] leading-[1.65] text-[var(--color-gray-800)]',\n !expanded && showToggle && 'line-clamp-3'\n )}\n >\n {content}\n </p>\n\n {showToggle && (\n <button\n onClick={() => setExpanded((v) => !v)}\n className=\"self-start text-[12px] font-medium text-[var(--color-blue-800)] hover:text-[var(--color-blue-1000)] cursor-pointer transition-colors duration-150 bg-transparent border-none p-0\"\n >\n {expanded ? 'Show less' : 'Read more'}\n </button>\n )}\n\n {(author || date) && (\n <div className=\"flex items-center gap-2 pt-1 border-t border-[var(--color-gray-200)] mt-1 flex-wrap\">\n {author && (\n <div className=\"flex items-center gap-1.5\">\n <div\n className=\"w-5 h-5 rounded-full bg-[var(--color-blue-1000)] flex items-center justify-center text-[9px] font-bold text-[var(--color-white)] shrink-0\"\n aria-hidden=\"true\"\n >\n {author.split(' ').map((n) => n[0]).join('').slice(0, 2).toUpperCase()}\n </div>\n <span className=\"text-[12px] font-medium text-[var(--color-gray-1000)]\">{author}</span>\n {authorRole && (\n <span className=\"text-[12px] text-[var(--color-gray-600)]\">· {authorRole}</span>\n )}\n </div>\n )}\n {date && (\n <span className=\"text-[12px] text-[var(--color-gray-600)] ml-auto\">{date}</span>\n )}\n </div>\n )}\n </div>\n );\n}\n","import { ReactNode } from 'react';\nimport { cn } from '@/utils/cn';\nimport type { RenderMode } from '@/types/renderMode';\n\n/**\n * ReportSection — Labelled section divider that groups related blocks within a report.\n * Provides a visible heading, optional description, and a content slot.\n * The AI assembles reports by wrapping tables and KPI strips in sections.\n */\nexport interface ReportSectionProps {\n label: string;\n description?: string;\n /** Section number for print layout (e.g. \"3.\") */\n sectionNumber?: string;\n children?: ReactNode;\n /** Suppress the top border — use for the first section in a report */\n noBorder?: boolean;\n /** Output target — pdf uses tighter spacing */\n renderMode?: RenderMode;\n className?: string;\n}\n\nexport function ReportSection({\n label,\n description,\n sectionNumber,\n children,\n noBorder = false,\n renderMode = 'web',\n className,\n}: ReportSectionProps) {\n const isPdf = renderMode === 'pdf';\n const isExcel = renderMode === 'excel';\n const compact = isPdf || isExcel;\n\n return (\n <section\n className={cn(\n 'flex flex-col',\n compact ? 'gap-2' : 'gap-4',\n !noBorder && (compact ? 'border-t border-[var(--color-gray-200)] pt-4' : 'border-t border-[var(--color-gray-200)] pt-6'),\n className\n )}\n >\n <div className=\"flex flex-col gap-1\">\n <h2\n className=\"m-0 uppercase flex items-center gap-2\"\n style={{\n fontSize: isPdf ? 11 : 13,\n fontWeight: 700,\n color: 'var(--color-gray-1000)',\n letterSpacing: '0.08em',\n borderLeft: isPdf ? '3px solid var(--color-blue-800)' : undefined,\n paddingLeft: isPdf ? 8 : undefined,\n }}\n >\n {sectionNumber && (\n <span className=\"tabular-nums\">{sectionNumber}</span>\n )}\n {label}\n </h2>\n {description && (\n <p className=\"m-0 text-[13px] text-[var(--color-gray-800)]\">{description}</p>\n )}\n </div>\n {children && <div className={cn('flex flex-col', compact ? 'gap-2' : 'gap-4')}>{children}</div>}\n </section>\n );\n}\n","import { cn } from '@/utils/cn';\n\n/**\n * PeriodSelector — Navigation bar for moving between reporting periods.\n * Provides prev/next arrows, a format toggle (month/quarter/year), and an\n * optional quick-select dropdown. Fully string-based — no date library required.\n */\nexport type PeriodFormat = 'month' | 'quarter' | 'year' | 'custom';\n\nexport interface Period {\n id: string;\n label: string;\n}\n\nexport interface PeriodSelectorProps {\n current: Period;\n available?: Period[];\n format?: PeriodFormat;\n availableFormats?: PeriodFormat[];\n onPeriodChange?: (id: string) => void;\n onFormatChange?: (format: PeriodFormat) => void;\n hasPrev?: boolean;\n hasNext?: boolean;\n compact?: boolean;\n className?: string;\n}\n\nconst FORMAT_LABELS: Record<PeriodFormat, string> = {\n month: 'Monthly',\n quarter: 'Quarterly',\n year: 'Annual',\n custom: 'Custom',\n};\n\nconst NAV_BTN =\n 'inline-flex items-center justify-center w-7 h-7 rounded-md border border-[var(--color-gray-200)] bg-[var(--color-white)] text-[var(--color-gray-800)] hover:bg-[var(--color-gray-100)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors duration-150 cursor-pointer';\n\nexport function PeriodSelector({\n current,\n available = [],\n format,\n availableFormats = [],\n onPeriodChange,\n onFormatChange,\n hasPrev = true,\n hasNext = false,\n compact = false,\n className,\n}: PeriodSelectorProps) {\n const currentIndex = available.findIndex((p) => p.id === current.id);\n\n const handlePrev = () => {\n if (!hasPrev) return;\n const prev = currentIndex > 0 ? available[currentIndex - 1] : null;\n if (prev) onPeriodChange?.(prev.id);\n };\n\n const handleNext = () => {\n if (!hasNext) return;\n const next = currentIndex < available.length - 1 ? available[currentIndex + 1] : null;\n if (next) onPeriodChange?.(next.id);\n };\n\n return (\n <div\n className={cn(\n 'flex items-center gap-2 flex-wrap',\n compact ? 'gap-1' : 'gap-2',\n className\n )}\n >\n {/* Prev arrow */}\n <button\n className={NAV_BTN}\n disabled={!hasPrev}\n onClick={handlePrev}\n aria-label=\"Previous period\"\n title=\"Previous period\"\n >\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M7.5 2L3.5 6L7.5 10\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n </button>\n\n {/* Period label / dropdown */}\n {available.length > 1 ? (\n <select\n className={cn(\n 'border border-[var(--color-gray-200)] rounded-md bg-[var(--color-white)] text-[var(--color-gray-1000)] font-medium cursor-pointer hover:bg-[var(--color-gray-100)] transition-colors duration-150 appearance-none text-center',\n compact ? 'text-[12px] px-2 py-1' : 'text-[13px] px-3 py-1.5'\n )}\n value={current.id}\n onChange={(e) => onPeriodChange?.(e.target.value)}\n aria-label=\"Select period\"\n >\n {available.map((p) => (\n <option key={p.id} value={p.id}>\n {p.label}\n </option>\n ))}\n </select>\n ) : (\n <span\n className={cn(\n 'font-semibold text-[var(--color-gray-1000)] min-w-[80px] text-center',\n compact ? 'text-[12px]' : 'text-[13px]'\n )}\n >\n {current.label}\n </span>\n )}\n\n {/* Next arrow */}\n <button\n className={NAV_BTN}\n disabled={!hasNext}\n onClick={handleNext}\n aria-label=\"Next period\"\n title=\"Next period\"\n >\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M4.5 2L8.5 6L4.5 10\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n </button>\n\n {/* Format toggle */}\n {availableFormats.length > 1 && format && (\n <div\n className=\"flex items-center border border-[var(--color-gray-200)] rounded-md overflow-hidden bg-[var(--color-white)]\"\n role=\"group\"\n aria-label=\"Period format\"\n >\n {availableFormats.map((f) => (\n <button\n key={f}\n onClick={() => onFormatChange?.(f)}\n className={cn(\n 'cursor-pointer transition-colors duration-150',\n compact ? 'px-2 py-1 text-[11px]' : 'px-3 py-1.5 text-[12px]',\n f === format\n ? 'bg-[var(--color-gray-1000)] text-[var(--color-white)] font-semibold'\n : 'text-[var(--color-gray-800)] hover:bg-[var(--color-gray-100)]'\n )}\n aria-pressed={f === format}\n >\n {FORMAT_LABELS[f]}\n </button>\n ))}\n </div>\n )}\n </div>\n );\n}\n","import { cva } from 'class-variance-authority';\nimport { cn } from '@/utils/cn';\n\n/**\n * ComparisonToggle — Button group that switches a report between view modes.\n * e.g. \"Actual only\" / \"vs Budget\" / \"vs Prior Year\".\n * The component is display-only — callers own the column switching logic.\n */\nexport interface ComparisonMode {\n id: string;\n label: string;\n /** Short label for compact mode */\n shortLabel?: string;\n disabled?: boolean;\n}\n\nexport interface ComparisonToggleProps {\n modes: ComparisonMode[];\n activeMode: string;\n onModeChange?: (id: string) => void;\n variant?: 'default' | 'pills';\n compact?: boolean;\n className?: string;\n}\n\nconst toggleWrapperStyles = cva('flex items-center', {\n variants: {\n variant: {\n default: 'border border-[var(--color-gray-200)] rounded-md overflow-hidden bg-[var(--color-white)]',\n pills: 'gap-1',\n },\n },\n defaultVariants: { variant: 'default' },\n});\n\nconst buttonStyles = cva(\n 'cursor-pointer transition-colors duration-150 font-medium whitespace-nowrap disabled:opacity-40 disabled:cursor-not-allowed',\n {\n variants: {\n variant: {\n default: 'px-3 py-1.5 text-[12px]',\n pills: 'px-3 py-1 text-[12px] rounded-full border',\n },\n active: {\n true: '',\n false: '',\n },\n },\n compoundVariants: [\n {\n variant: 'default',\n active: true,\n className: 'bg-[var(--color-gray-1000)] text-[var(--color-white)]',\n },\n {\n variant: 'default',\n active: false,\n className: 'text-[var(--color-gray-800)] hover:bg-[var(--color-gray-100)]',\n },\n {\n variant: 'pills',\n active: true,\n className: 'bg-[var(--color-blue-1000)] border-[var(--color-blue-1000)] text-[var(--color-white)]',\n },\n {\n variant: 'pills',\n active: false,\n className: 'bg-[var(--color-white)] border-[var(--color-gray-200)] text-[var(--color-gray-800)] hover:bg-[var(--color-gray-100)]',\n },\n ],\n defaultVariants: { variant: 'default', active: false },\n }\n);\n\nexport function ComparisonToggle({\n modes,\n activeMode,\n onModeChange,\n variant = 'default',\n compact = false,\n className,\n}: ComparisonToggleProps) {\n return (\n <div\n className={cn(toggleWrapperStyles({ variant }), className)}\n role=\"group\"\n aria-label=\"Comparison mode\"\n >\n {modes.map((mode) => {\n const isActive = mode.id === activeMode;\n const label = compact && mode.shortLabel ? mode.shortLabel : mode.label;\n return (\n <button\n key={mode.id}\n onClick={() => !mode.disabled && onModeChange?.(mode.id)}\n disabled={mode.disabled}\n className={buttonStyles({ variant, active: isActive })}\n aria-pressed={isActive}\n >\n {label}\n </button>\n );\n })}\n </div>\n );\n}\n","import { cn } from '@/utils/cn';\n\n/**\n * ExportBar — Row of export action buttons (PDF, Excel, CSV) placed above a table\n * or at the top of a report. The component fires callbacks — actual export logic\n * lives in the consuming application.\n */\nexport type ExportFormat = 'pdf' | 'excel' | 'csv' | 'print';\n\nexport interface ExportBarAction {\n format: ExportFormat;\n label?: string;\n disabled?: boolean;\n onClick?: () => void;\n}\n\nexport interface ExportBarProps {\n actions: ExportBarAction[];\n /** Optional label shown to the left of the buttons */\n label?: string;\n size?: 'sm' | 'md';\n className?: string;\n}\n\nconst FORMAT_DEFAULTS: Record<ExportFormat, { label: string; icon: string }> = {\n pdf: { label: 'PDF', icon: '⬇' },\n excel: { label: 'Excel', icon: '⬇' },\n csv: { label: 'CSV', icon: '⬇' },\n print: { label: 'Print', icon: '⎙' },\n};\n\nexport function ExportBar({ actions, label, size = 'md', className }: ExportBarProps) {\n const btnClass = cn(\n 'inline-flex items-center gap-1.5 border border-[var(--color-gray-200)] rounded-md bg-[var(--color-white)] text-[var(--color-gray-800)] font-medium cursor-pointer hover:bg-[var(--color-gray-100)] active:bg-[var(--color-gray-200)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors duration-150',\n size === 'sm' ? 'px-2 py-1 text-[11px]' : 'px-3 py-1.5 text-[12px]'\n );\n\n return (\n <div className={cn('flex items-center gap-2 flex-wrap', className)}>\n {label && (\n <span className=\"text-[12px] text-[var(--color-gray-600)] font-medium mr-1\">\n {label}\n </span>\n )}\n {actions.map((action) => {\n const defaults = FORMAT_DEFAULTS[action.format];\n const text = action.label ?? defaults.label;\n return (\n <button\n key={action.format}\n onClick={action.onClick}\n disabled={action.disabled}\n className={btnClass}\n aria-label={`Export as ${text}`}\n >\n <span aria-hidden=\"true\" className=\"text-[var(--color-gray-600)]\">\n {defaults.icon}\n </span>\n {text}\n </button>\n );\n })}\n </div>\n );\n}\n","import { cn } from '@/utils/cn';\nimport type { RenderMode } from '@/types/renderMode';\n\n/**\n * AuditStamp — Sign-off block for audit working papers and finalised reports.\n * Renders firm name, partner/preparer name, date, and a status badge.\n * Used at the bottom of AuditSchedules and formal report pages.\n */\nexport type AuditStampStatus = 'draft' | 'reviewed' | 'signed-off' | 'filed';\n\nexport interface AuditStampProps {\n firmName?: string;\n preparedBy?: string;\n reviewedBy?: string;\n date?: string;\n reference?: string; // Working paper reference, e.g. \"A1 — Lead Schedule\"\n status?: AuditStampStatus;\n /** Output target — pdf hides the status pill, excel renders as plain text */\n renderMode?: RenderMode;\n className?: string;\n}\n\nconst STATUS_STYLES: Record<AuditStampStatus, { label: string; bg: string; color: string }> = {\n 'draft': { label: 'Draft', bg: 'var(--color-gray-200)', color: 'var(--color-gray-800)' },\n 'reviewed': { label: 'Reviewed', bg: '#fef9c3', color: '#854d0e' },\n 'signed-off': { label: 'Signed Off', bg: 'var(--color-green-200)', color: 'var(--color-green-1000)' },\n 'filed': { label: 'Filed', bg: 'var(--color-blue-200)', color: 'var(--color-blue-1000)' },\n};\n\nexport function AuditStamp({\n firmName,\n preparedBy,\n reviewedBy,\n date,\n reference,\n status = 'draft',\n renderMode = 'web',\n className,\n}: AuditStampProps) {\n const s = STATUS_STYLES[status];\n const showPill = renderMode === 'web';\n\n return (\n <div\n className={cn(\n 'flex items-start justify-between gap-6 border-t border-[var(--color-gray-200)] pt-4 mt-2',\n className\n )}\n >\n <div className=\"flex flex-col gap-1.5\">\n {firmName && (\n <p className=\"m-0 text-[13px] font-semibold text-[var(--color-gray-1000)]\">{firmName}</p>\n )}\n {reference && (\n <p className=\"m-0 text-[11px] text-[var(--color-gray-600)] uppercase tracking-[0.06em]\">\n {reference}\n </p>\n )}\n <div className=\"flex items-center gap-4 mt-0.5 flex-wrap\">\n {preparedBy && (\n <span className=\"text-[12px] text-[var(--color-gray-800)]\">\n <span className=\"text-[var(--color-gray-600)] mr-1\">Prepared by</span>\n {preparedBy}\n </span>\n )}\n {reviewedBy && (\n <span className=\"text-[12px] text-[var(--color-gray-800)]\">\n <span className=\"text-[var(--color-gray-600)] mr-1\">Reviewed by</span>\n {reviewedBy}\n </span>\n )}\n {date && (\n <span className=\"text-[12px] text-[var(--color-gray-600)]\">{date}</span>\n )}\n </div>\n </div>\n {showPill && (\n <span\n className=\"inline-flex items-center px-[10px] py-[3px] rounded-full text-[11px] font-semibold whitespace-nowrap shrink-0\"\n style={{ background: s.bg, color: s.color }}\n >\n {s.label}\n </span>\n )}\n </div>\n );\n}\n","import { cn } from '@/utils/cn';\n\n/**\n * FootnoteList — Numbered list of footnotes that sits at the bottom of a report or page.\n * Each entry corresponds to a FootnoteRef superscript in the body. Numbers must match.\n */\nexport interface Footnote {\n number: number;\n text: string;\n}\n\nexport interface FootnoteListProps {\n footnotes: Footnote[];\n className?: string;\n}\n\nexport function FootnoteList({ footnotes, className }: FootnoteListProps) {\n if (footnotes.length === 0) return null;\n\n return (\n <div\n className={cn(\n 'border-t border-[var(--color-gray-200)] pt-4 flex flex-col gap-1.5',\n className\n )}\n aria-label=\"Footnotes\"\n >\n <p className=\"m-0 text-[10px] font-bold uppercase tracking-[0.08em] text-[var(--color-gray-600)] mb-1\">\n Notes\n </p>\n {footnotes.map((fn) => (\n <div\n key={fn.number}\n id={`fn-${fn.number}`}\n className=\"flex items-start gap-2\"\n >\n <span className=\"text-[11px] font-semibold text-[var(--color-blue-800)] shrink-0 w-5 text-right tabular-nums\">\n [{fn.number}]\n </span>\n <p className=\"m-0 text-[12px] text-[var(--color-gray-800)] leading-[1.5]\">\n {fn.text}\n </p>\n </div>\n ))}\n </div>\n );\n}\n","import { cva } from 'class-variance-authority';\n\nexport const autopilotActionContainerStyles = cva(\n 'flex items-center justify-between w-full gap-2 min-h-[20px]'\n);\n\nexport const autopilotActionContentStyles = cva(\n 'flex items-center gap-2'\n);\n\nexport const autopilotActionTextStyles = cva(\n 'text-[12px] font-normal font-sans leading-[16px]',\n {\n variants: {\n status: {\n running: 'text-[var(--color-gray-800)]',\n completed: 'text-[var(--color-gray-800)]',\n stopped: 'text-[var(--color-blue-800)]',\n },\n },\n defaultVariants: {\n status: 'running',\n },\n }\n);\n\nexport const autopilotActionIconContainerStyles = cva(\n 'w-4 h-4 flex items-center justify-center shrink-0'\n);\n","// React\nimport { HTMLAttributes, forwardRef } from 'react';\n\n// Components\nimport { Hexagon, CheckCircle, Pause, Hand } from '@/components/atoms/icons';\n\n// Styles\nimport { cn } from '@/utils/cn';\nimport {\n autopilotActionContainerStyles,\n autopilotActionContentStyles,\n autopilotActionTextStyles,\n autopilotActionIconContainerStyles,\n} from './AutopilotAction.styles';\n\nexport interface AutopilotActionProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {\n /** The status of the autopilot action */\n status?: 'running' | 'completed' | 'stopped';\n /** The message to display */\n message: string;\n}\n\n/** Color mapping for hexagon and action icons based on status */\nconst statusColors = {\n running: 'var(--color-gray-800)',\n completed: 'var(--color-gray-800)',\n stopped: 'var(--color-blue-800)',\n};\n\n/** Color for the action icon on the right side */\nconst actionIconColors = {\n running: 'var(--color-gray-800)',\n completed: 'var(--color-green-1000)',\n stopped: 'var(--color-blue-800)',\n};\n\nexport const AutopilotAction = forwardRef<HTMLDivElement, AutopilotActionProps>(\n ({ className, status = 'running', message, ...props }, ref) => {\n const hexagonColor = statusColors[status];\n const actionIconColor = actionIconColors[status];\n\n /** Renders the appropriate action icon based on status */\n const renderActionIcon = () => {\n if (status === 'completed') {\n return <CheckCircle size={16} color={actionIconColor} />;\n }\n if (status === 'stopped') {\n return <Hand size={16} color={actionIconColor} />;\n }\n // Default: running\n return <Pause size={16} color={actionIconColor} />;\n };\n\n return (\n <div\n ref={ref}\n className={cn(autopilotActionContainerStyles(), className)}\n {...props}\n >\n <div className={autopilotActionContentStyles()}>\n <div className={autopilotActionIconContainerStyles()}>\n <Hexagon size={16} color={hexagonColor} />\n </div>\n <span className={autopilotActionTextStyles({ status })}>{message}</span>\n </div>\n <div className={autopilotActionIconContainerStyles()}>\n {renderActionIcon()}\n </div>\n </div>\n );\n }\n);\n\nAutopilotAction.displayName = 'AutopilotAction';\n","import { useState } from 'react';\nimport { Check, Clipboard } from '@/components/atoms/icons';\n\nexport interface CopyButtonProps {\n text: string;\n label?: string;\n variant?: 'default' | 'accent' | 'bordered' | 'tertiary';\n className?: string;\n}\n\nconst VARIANT_CLASSES: Record<string, string> = {\n default: 'text-[var(--color-gray-600)] hover:bg-[var(--color-gray-200)]',\n accent: 'text-[var(--color-blue-800)] hover:opacity-80',\n bordered:\n 'border border-[rgba(0,13,77,0.45)] rounded-lg px-2 py-1 text-[rgba(0,9,51,0.65)] hover:bg-[rgba(0,13,77,0.05)]',\n tertiary:\n 'border border-[var(--color-blue-800)] rounded-lg px-2 py-1 text-[var(--color-blue-800)] hover:bg-[var(--color-blue-50)]',\n};\n\nexport function CopyButton({ text, label, variant = 'default', className = '' }: CopyButtonProps) {\n const [isCopied, setIsCopied] = useState(false);\n\n const handleCopy = async (e: React.MouseEvent) => {\n e.stopPropagation();\n await navigator.clipboard.writeText(text);\n setIsCopied(true);\n setTimeout(() => setIsCopied(false), 2000);\n };\n\n const iconColor = variant === 'accent' || variant === 'tertiary' ? 'text-[var(--color-blue-800)]' : 'text-[var(--color-gray-500)]';\n\n return (\n <button\n onClick={handleCopy}\n className={`flex items-center gap-1.5 px-2 py-1 rounded text-xs ${VARIANT_CLASSES[variant]} transition-colors ${className}`}\n >\n {isCopied ? (\n <>\n {label ? 'Copied' : null}\n <Check size={13} className={iconColor} />\n </>\n ) : (\n <>\n {label ?? null}\n <Clipboard size={13} />\n </>\n )}\n </button>\n );\n}\n","import { useState } from 'react';\nimport { ChevronRight, Settings } from '@/components/atoms/icons';\nimport { CopyButton } from '../CopyButton/CopyButton';\n\nexport interface DataAccordionProps {\n title: string;\n badge?: number;\n copyText?: string;\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n defaultOpen?: boolean;\n children: React.ReactNode;\n className?: string;\n variant?: 'default' | 'compact';\n}\n\nexport function DataAccordion({\n title,\n badge,\n copyText,\n open: controlledOpen,\n onOpenChange,\n defaultOpen = false,\n children,\n className,\n variant = 'default',\n}: DataAccordionProps) {\n const [internalOpen, setInternalOpen] = useState(defaultOpen);\n const isControlled = controlledOpen !== undefined;\n const isOpen = isControlled ? controlledOpen : internalOpen;\n\n const isCompact = variant === 'compact';\n\n const toggle = () => {\n const next = !isOpen;\n if (!isControlled) setInternalOpen(next);\n onOpenChange?.(next);\n };\n\n return (\n <div className={`rounded-lg border border-[var(--color-gray-200)] bg-white overflow-hidden transition-colors hover:border-[var(--color-blue-800)] ${className ?? ''}`}>\n <button\n type=\"button\"\n onClick={toggle}\n className={`w-full flex items-center justify-between transition-colors text-left ${isCompact ? 'px-3 py-2' : 'px-2 py-1'}`}\n >\n <div className={`flex items-center ${isCompact ? 'gap-[7px]' : 'gap-3'}`}>\n <span\n className=\"text-[var(--color-blue-1000)] flex-shrink-0 transition-transform duration-200\"\n style={{ transform: isOpen ? 'rotate(90deg)' : 'rotate(0deg)' }}\n >\n <ChevronRight size={isCompact ? 20 : 16} />\n </span>\n <span className={`text-[var(--color-blue-1000)] ${isCompact ? 'text-xs leading-4 font-normal' : 'text-sm font-semibold'}`}>\n {title}\n </span>\n {badge !== undefined && (\n isCompact ? (\n <span className=\"text-[10px] leading-none rounded bg-[var(--color-blue-1000)] text-white px-1.5 py-0.5\">\n {badge}\n </span>\n ) : (\n <span className=\"inline-flex items-center gap-1 bg-[var(--color-gray-100)] text-[var(--color-gray-600)] rounded px-[2px] py-[2px] text-[10px] leading-none\">\n <Settings size={14} className=\"text-[var(--color-gray-600)]\" />\n {badge}\n </span>\n )\n )}\n </div>\n {copyText && (\n <div className=\"flex-shrink-0\" onClick={(e) => e.stopPropagation()}>\n <CopyButton text={copyText} label=\"Copy\" variant={isCompact ? 'accent' : 'default'} />\n </div>\n )}\n </button>\n\n <div\n className=\"grid transition-[grid-template-rows] duration-200 ease-in-out motion-reduce:transition-none\"\n style={{\n gridTemplateRows: isOpen ? '1fr' : '0fr',\n contain: 'layout style',\n willChange: 'grid-template-rows',\n }}\n >\n <div className=\"overflow-hidden min-h-0\">\n <div className={`${isOpen ? 'border-t border-[var(--color-gray-200)]' : ''} p-2`}>\n {children}\n </div>\n </div>\n </div>\n </div>\n );\n}\n","import { cva } from 'class-variance-authority';\n\nexport const tooltipContentStyles = cva(\n 'z-50 rounded-[4px] px-3 py-3 shadow-[0px_8px_8px_-4px_rgba(0,0,0,0.04),0px_20px_24px_-4px_rgba(0,0,0,0.08)] max-w-[var(--radix-tooltip-content-available-width)] origin-[var(--radix-tooltip-content-transform-origin)]',\n {\n variants: {\n variant: {\n default: 'bg-[var(--color-blue-1000)] text-[var(--color-gray-50)]',\n light: 'bg-[var(--color-gray-50)] text-[var(--color-gray-1000)]',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n },\n);\n\nexport const tooltipArrowStyles = cva('', {\n variants: {\n variant: {\n default: 'fill-[var(--color-blue-1000)]',\n light: 'fill-[var(--color-gray-50)]',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n});\n","import * as React from 'react';\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip';\nimport { motion } from 'framer-motion';\nimport { cn } from '@/utils/cn';\nimport { tooltipContentStyles, tooltipArrowStyles } from './Tooltip.styles';\nimport { Typography } from '@/components/atoms/Typography/Typography';\nimport { VariantProps } from 'class-variance-authority';\n\n// Set default delay to 0ms for better UX (faster than Radix default of 700ms)\nconst TooltipProvider = ({\n delayDuration = 0,\n ...props\n}: TooltipPrimitive.TooltipProviderProps) => (\n <TooltipPrimitive.Provider delayDuration={delayDuration} {...props} />\n);\n\nconst Tooltip = TooltipPrimitive.Root;\n\nconst TooltipTrigger = TooltipPrimitive.Trigger;\n\ninterface TooltipContentProps\n extends React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>,\n VariantProps<typeof tooltipContentStyles> {}\n\nconst TooltipContent = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Content>,\n TooltipContentProps\n>(({ className, sideOffset = 4, children, variant, ...props }, ref) => (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n asChild\n className={cn(tooltipContentStyles({ variant }), className)}\n {...props}\n >\n <motion.div\n initial={{ opacity: 0, scale: 0.95 }}\n animate={{ opacity: 1, scale: 1 }}\n exit={{ opacity: 0, scale: 0.95 }}\n transition={{ duration: 0.1, ease: 'easeOut' }}\n >\n <Typography\n variant=\"x-small\"\n color=\"inherit\"\n className=\"font-normal relative z-10\"\n >\n {children}\n </Typography>\n <TooltipPrimitive.Arrow className={tooltipArrowStyles({ variant })} />\n </motion.div>\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n));\nTooltipContent.displayName = TooltipPrimitive.Content.displayName;\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };\n","import { cva } from 'class-variance-authority';\n\nexport const conversationHeaderStyles = cva(\n 'w-full h-[48px] box-border flex items-center justify-between px-[16px] py-[12px] bg-[var(--color-white)] border-b border-[var(--color-gray-200)]'\n);\n\nexport const headerRightStyles = cva(\n 'flex items-center gap-[12px] h-[24px]'\n);\n\nexport const actionGroupStyles = cva(\n 'flex items-center gap-[12px] h-[24px] rounded-[8px]'\n);\n\nexport const iconButtonStyles = cva(\n 'flex items-center justify-center size-[16px] overflow-hidden text-[var(--color-gray-800)] hover:text-[var(--color-blue-800)] transition-colors bg-transparent border-none cursor-pointer outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] rounded-sm disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:text-[var(--color-gray-800)]',\n {\n variants: {\n disabled: {\n true: 'opacity-50 cursor-not-allowed hover:text-[var(--color-gray-800)]',\n },\n },\n defaultVariants: {\n disabled: false,\n },\n }\n);\n\nexport const tagsGroupStyles = cva('flex items-center gap-[8px]');\n\nexport const collaboratorsGroupStyles = cva('flex items-center'); // We will handle overlap in the component or child items\n\n","// React\nimport { HTMLAttributes, forwardRef } from 'react';\n\n// Components\nimport { Breadcrumbs, BreadcrumbItem } from '@/components/molecules/Breadcrumbs/Breadcrumbs';\nimport { Tag } from '@/components/molecules/Tag/Tag';\nimport { Avatar } from '@/components/atoms/Avatar/Avatar';\nimport { TagPlus, UserPlus } from '@/components/atoms/icons';\n\n// Styles\nimport { cn } from '@/utils/cn';\nimport {\n conversationHeaderStyles,\n headerRightStyles,\n actionGroupStyles,\n iconButtonStyles,\n tagsGroupStyles,\n collaboratorsGroupStyles,\n} from './ConversationHeader.styles';\n\nexport interface ConversationTag {\n id: string;\n label: string;\n}\n\nexport interface ConversationCollaborator {\n id: string;\n name: string;\n src?: string;\n}\n\nexport interface ConversationHeaderProps extends HTMLAttributes<HTMLDivElement> {\n /** Breadcrumb items to display on the left */\n breadcrumbs: BreadcrumbItem[];\n /** List of tags to display */\n tags?: ConversationTag[];\n /** List of collaborators/users to display */\n collaborators?: ConversationCollaborator[];\n /** Callback when adding a tag */\n onAddTag?: () => void;\n /** Callback when adding a collaborator */\n onAddCollaborator?: () => void;\n /** Additional count for tags if truncated */\n tagsOverflowCount?: number;\n /** Whether the add tag button is disabled */\n addTagDisabled?: boolean;\n /** Whether the add collaborator button is disabled */\n addCollaboratorDisabled?: boolean;\n}\n\nexport const ConversationHeader = forwardRef<HTMLDivElement, ConversationHeaderProps>(\n (\n {\n className,\n breadcrumbs,\n tags = [],\n collaborators = [],\n onAddTag,\n onAddCollaborator,\n tagsOverflowCount = 0,\n addTagDisabled = false,\n addCollaboratorDisabled = false,\n ...props\n },\n ref\n ) => {\n return (\n <div\n ref={ref}\n className={cn(conversationHeaderStyles(), className)}\n {...props}\n >\n <Breadcrumbs items={breadcrumbs} size=\"medium\" />\n\n <div className={headerRightStyles()}>\n {/* Tags & Collaborators Group */}\n <div className={actionGroupStyles()}>\n\n {/* Tags Section */}\n {(tags.length > 0 || tagsOverflowCount > 0) && (\n <div className={tagsGroupStyles()}>\n {tags.map((tag) => (\n <Tag key={tag.id} variant=\"default\" className=\"bg-[var(--color-gray-100)] border border-[var(--color-gray-200)] text-[var(--color-gray-800)] px-[8px] py-[2px] text-[10px] h-[20px]\">\n {tag.label}\n </Tag>\n ))}\n {tagsOverflowCount > 0 && (\n <Tag variant=\"default\" className=\"bg-[var(--color-gray-100)] border border-[var(--color-gray-200)] text-[var(--color-gray-800)] px-[8px] py-[2px] text-[10px] h-[20px]\">\n +{tagsOverflowCount}\n </Tag>\n )}\n </div>\n )}\n\n {/* Collaborators Section (Avatars) */}\n {collaborators.length > 0 && (\n <div className={collaboratorsGroupStyles()}>\n <div className=\"flex items-center flex-row-reverse\">\n {/* Flex row reverse to make the first item on top if using negative margin from left,\n but typically we want the first one on left on top.\n Figma uses negative right margin on the wrapper div for each avatar.\n Let's use negative margin-right on items except the last one.\n */}\n {collaborators.map((user, index) => (\n <div\n key={user.id}\n className=\"relative shrink-0 border-[1.5px] border-white rounded-full\"\n style={{\n zIndex: collaborators.length - index,\n marginRight: index < collaborators.length - 1 ? -4 : 0\n }}\n >\n <Avatar\n initials={user.name}\n src={user.src}\n alt={user.name}\n // Avatar component handles size 'small' as 24px or 32px?\n // Looking at Avatar.tsx: size='small' (default) or 'big'.\n // We need 24px. Let's check Avatar implementation details.\n // Avatar.tsx says: const imageSize = size === 'big' ? 64 : 32;\n // 32px might be too big for this header (Figma shows 24px).\n // I might need to override class/size or add 'tiny' size to Avatar later.\n // For now, I'll use className to force size if needed, or accept 32px.\n // Figma explicitly showed 24px size.\n // I will try to force it via className if Avatar allows, otherwise might need to update Avatar.\n className=\"size-[24px] text-[10px]\"\n />\n </div>\n ))}\n </div>\n </div>\n )}\n\n {/* Add Tag Button */}\n <button\n type=\"button\"\n onClick={onAddTag}\n className={iconButtonStyles({ disabled: addTagDisabled })}\n aria-label=\"Add tag\"\n disabled={addTagDisabled}\n >\n <TagPlus size={16} />\n </button>\n\n {/* Add Collaborator Button */}\n <button\n type=\"button\"\n onClick={onAddCollaborator}\n className={iconButtonStyles({ disabled: addCollaboratorDisabled })}\n aria-label=\"Add collaborator\"\n disabled={addCollaboratorDisabled}\n >\n <UserPlus size={16} />\n </button>\n\n </div>\n </div>\n </div>\n );\n }\n);\n\nConversationHeader.displayName = 'ConversationHeader';\n\n","import { cva } from 'class-variance-authority';\n\nexport const modalOverlayStyles = cva(\n 'fixed inset-0 z-50 bg-[rgba(0,6,38,0.5)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0'\n);\n\nexport const modalContainerStyles = cva(\n 'fixed left-[50%] top-[50%] z-50 translate-x-[-50%] translate-y-[-50%] bg-[var(--color-white)] border border-[var(--color-gray-200)] rounded-[12px] shadow-lg p-4 flex flex-col gap-2 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 duration-200',\n {\n variants: {\n size: {\n sm: 'w-[95vw] sm:w-[300px] max-w-[calc(100vw-2rem)]',\n md: 'w-[95vw] sm:w-[400px] max-w-[calc(100vw-2rem)]',\n lg: 'w-[95vw] sm:w-[500px] max-w-[calc(100vw-2rem)]',\n xl: 'w-[95vw] sm:w-[600px] max-w-[calc(100vw-2rem)]',\n full: 'w-[100vw] h-[100vh] sm:w-[calc(100vw-2rem)] sm:h-[calc(100vh-2rem)] rounded-none sm:rounded-[12px]',\n },\n },\n defaultVariants: {\n size: 'md',\n },\n }\n);\n\nexport const modalHeaderStyles = cva(\n 'flex flex-col gap-2 items-start justify-center w-full'\n);\n\nexport const modalHeaderTopRowStyles = cva(\n 'flex items-start justify-between w-full pr-6'\n);\n\nexport const modalCloseButtonStyles = cva(\n 'absolute right-4 top-4 flex-shrink-0 w-4 h-4 text-[var(--color-blue-1000)] cursor-pointer bg-transparent border-none p-0 hover:opacity-70 transition-opacity focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-blue-200)] focus-visible:ring-offset-2 rounded-sm'\n);\n\nexport const modalTitleStyles = cva(\n '!font-[Geist,system-ui,-apple-system,sans-serif] font-medium text-[1rem] leading-[1.5rem] text-[var(--color-blue-1000)] w-full'\n);\n\nexport const modalDescriptionStyles = cva(\n 'font-[Geist,system-ui,-apple-system,sans-serif] font-normal text-[0.875rem] leading-[1.25rem] text-[var(--color-gray-800)] w-full'\n);\n\nexport const modalContentStyles = cva('flex flex-col gap-4 w-full', {\n variants: {\n size: {\n sm: 'max-h-[60vh] overflow-y-auto',\n md: 'max-h-[70vh] overflow-y-auto',\n lg: 'max-h-[75vh] overflow-y-auto',\n xl: 'max-h-[80vh] overflow-y-auto',\n full: 'flex-1 overflow-y-auto',\n },\n contentAlign: {\n start: 'items-start',\n center: 'items-center',\n end: 'items-end',\n stretch: 'items-stretch',\n },\n },\n defaultVariants: {\n size: 'md',\n contentAlign: 'start',\n },\n});\n\nexport const modalFooterStyles = cva('flex gap-2 items-start w-full');\n","// react\nimport { useCallback, useRef } from 'react';\nimport * as Dialog from '@radix-ui/react-dialog';\nimport * as VisuallyHidden from '@radix-ui/react-visually-hidden';\n\n// components\nimport { Button } from '@/components/molecules/Button/Button';\nimport { X } from '@/components/atoms/icons';\n\n// styles\nimport {\n modalOverlayStyles,\n modalContainerStyles,\n modalCloseButtonStyles,\n modalTitleStyles,\n modalDescriptionStyles,\n modalContentStyles,\n modalFooterStyles,\n} from './Modal.styles';\n\n// misc\nimport { cn } from '@/utils/cn';\n\n// types\nimport type { ModalProps } from './Modal.types';\n\nexport const Modal = ({\n open,\n onOpenChange,\n title,\n description,\n showCloseButton = true,\n closeIcon,\n children,\n primaryAction,\n secondaryAction,\n closeOnClickOutside = true,\n closeOnEsc = true,\n onClose,\n className,\n overlayClassName,\n contentClassName,\n footerClassName,\n size = 'md',\n contentAlign = 'start',\n}: ModalProps) => {\n const primaryButtonRef = useRef<HTMLButtonElement>(null);\n const secondaryButtonRef = useRef<HTMLButtonElement>(null);\n\n const handleOpenChange = useCallback(\n (newOpen: boolean) => {\n onOpenChange(newOpen);\n if (!newOpen) {\n onClose?.();\n }\n },\n [onOpenChange, onClose],\n );\n\n const handlePrimaryAction = useCallback(async () => {\n if (primaryAction?.onClick) {\n await primaryAction.onClick();\n }\n }, [primaryAction]);\n\n const handleSecondaryAction = useCallback(async () => {\n if (secondaryAction?.onClick) {\n await secondaryAction.onClick();\n }\n }, [secondaryAction]);\n\n // Handle ESC key\n const handleEscapeKeyDown = useCallback(\n (event: KeyboardEvent) => {\n if (!closeOnEsc) {\n event.preventDefault();\n }\n },\n [closeOnEsc],\n );\n\n // Handle click outside\n const handlePointerDownOutside = useCallback(\n (event: Event) => {\n if (!closeOnClickOutside) {\n event.preventDefault();\n }\n },\n [closeOnClickOutside],\n );\n\n const hasFooter = primaryAction || secondaryAction;\n\n return (\n <Dialog.Root open={open} onOpenChange={handleOpenChange}>\n <Dialog.Portal>\n <Dialog.Overlay\n className={cn(modalOverlayStyles(), overlayClassName)}\n />\n <Dialog.Content\n className={cn(modalContainerStyles({ size }), className)}\n onEscapeKeyDown={handleEscapeKeyDown}\n onPointerDownOutside={handlePointerDownOutside}\n >\n {/* Always render Dialog.Title for accessibility */}\n {title ? (\n <Dialog.Title className={modalTitleStyles()}>{title}</Dialog.Title>\n ) : (\n <VisuallyHidden.Root>\n <Dialog.Title>Modal dialog</Dialog.Title>\n </VisuallyHidden.Root>\n )}\n\n {/* Always render Dialog.Description for accessibility */}\n {description ? (\n <Dialog.Description className={modalDescriptionStyles()}>\n {description}\n </Dialog.Description>\n ) : (\n <VisuallyHidden.Root>\n <Dialog.Description>Modal content</Dialog.Description>\n </VisuallyHidden.Root>\n )}\n\n {/* Close button */}\n {showCloseButton && (\n <Dialog.Close asChild>\n <button\n className={modalCloseButtonStyles()}\n aria-label=\"Close modal\"\n >\n {closeIcon || <X size={16} color=\"currentColor\" />}\n </button>\n </Dialog.Close>\n )}\n\n {/* Content */}\n {children && (\n <div className={cn(modalContentStyles({ size, contentAlign }), contentClassName)}>\n {children}\n </div>\n )}\n\n {/* Footer */}\n {hasFooter && (\n <div className={cn(modalFooterStyles(), footerClassName)}>\n {secondaryAction && (\n <Button\n ref={secondaryButtonRef}\n variant={secondaryAction.variant || 'secondary'}\n size=\"sm\"\n onClick={handleSecondaryAction}\n disabled={secondaryAction.disabled || secondaryAction.loading}\n leftIcon={secondaryAction.icon}\n className=\"flex-1\"\n >\n {secondaryAction.label}\n </Button>\n )}\n {primaryAction && (\n <Button\n ref={primaryButtonRef}\n variant={primaryAction.variant || 'default'}\n size=\"sm\"\n onClick={handlePrimaryAction}\n disabled={primaryAction.disabled || primaryAction.loading}\n leftIcon={primaryAction.icon}\n className=\"flex-1\"\n >\n {primaryAction.label}\n </Button>\n )}\n </div>\n )}\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\n );\n};\n\nModal.displayName = 'Modal';\n","import { useState, ReactNode } from 'react';\nimport { AnimatePresence, motion } from 'framer-motion';\nimport { cn } from '@/utils/cn';\n\n/**\n * DrillDownRow — Expandable table row that reveals sub-rows on click.\n * Uses framer-motion spring animation for the expand/collapse.\n * Works inside any HTML <table> — renders as <tr> + animated child <tr>s.\n *\n * Use inside FinancialTable or DataTable by providing the trigger row\n * as children, and sub-rows as drillContent.\n */\nexport interface DrillDownRowProps {\n /** The summary row cell contents — rendered inside a <tr> */\n cells: ReactNode[];\n /** Sub-rows revealed on expand — array of cell arrays */\n drillRows: Array<{ cells: ReactNode[]; key: string }>;\n /** Column count needed for the colSpan wrapper */\n colCount: number;\n defaultExpanded?: boolean;\n /** Called when expand state changes */\n onToggle?: (expanded: boolean) => void;\n /** Additional classes for the trigger row */\n rowClassName?: string;\n /** Additional classes for drill rows */\n drillRowClassName?: string;\n}\n\nconst CHEVRON = (expanded: boolean) => (\n <motion.svg\n width=\"10\"\n height=\"10\"\n viewBox=\"0 0 10 10\"\n fill=\"none\"\n animate={{ rotate: expanded ? 90 : 0 }}\n transition={{ duration: 0.15, ease: 'easeOut' }}\n aria-hidden=\"true\"\n style={{ display: 'inline-block', flexShrink: 0 }}\n >\n <path\n d=\"M3 2L7 5L3 8\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </motion.svg>\n);\n\nexport function DrillDownRow({\n cells,\n drillRows,\n colCount,\n defaultExpanded = false,\n onToggle,\n rowClassName,\n drillRowClassName,\n}: DrillDownRowProps) {\n const [expanded, setExpanded] = useState(defaultExpanded);\n\n const toggle = () => {\n const next = !expanded;\n setExpanded(next);\n onToggle?.(next);\n };\n\n return (\n <>\n {/* Trigger row */}\n <tr\n className={cn(\n 'cursor-pointer select-none transition-colors duration-150',\n 'hover:bg-[var(--color-gray-50)] active:bg-[var(--color-gray-100)]',\n expanded && 'bg-[var(--color-gray-50)]',\n rowClassName\n )}\n onClick={toggle}\n tabIndex={0}\n role=\"button\"\n aria-expanded={expanded}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n toggle();\n }\n }}\n >\n {cells.map((cell, i) => (\n <td\n key={i}\n style={{ padding: '10px 16px', fontSize: 13 }}\n >\n {i === 0 ? (\n <span className=\"flex items-center gap-2\">\n <span className=\"text-[var(--color-gray-600)]\">{CHEVRON(expanded)}</span>\n {cell}\n </span>\n ) : (\n cell\n )}\n </td>\n ))}\n </tr>\n\n {/* Animated drill content */}\n <AnimatePresence initial={false}>\n {expanded && (\n <tr key=\"drill-wrapper\">\n <td colSpan={colCount} style={{ padding: 0, border: 'none' }}>\n <motion.div\n initial={{ height: 0, opacity: 0 }}\n animate={{ height: 'auto', opacity: 1 }}\n exit={{ height: 0, opacity: 0 }}\n transition={{ duration: 0.2, ease: [0.4, 0, 0.2, 1] }}\n style={{ overflow: 'hidden' }}\n >\n <table style={{ width: '100%', borderCollapse: 'collapse' }}>\n <tbody>\n {drillRows.map((row) => (\n <tr\n key={row.key}\n className={cn(\n 'border-b border-[var(--color-gray-100)] last:border-0',\n drillRowClassName\n )}\n style={{ background: 'var(--color-gray-50)' }}\n >\n {row.cells.map((cell, ci) => (\n <td\n key={ci}\n style={{\n padding: '8px 16px',\n paddingLeft: ci === 0 ? 36 : 16,\n fontSize: 12,\n color: 'var(--color-gray-800)',\n }}\n >\n {cell}\n </td>\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n </motion.div>\n </td>\n </tr>\n )}\n </AnimatePresence>\n </>\n );\n}\n","import { ReactNode } from 'react';\nimport { cn } from '@/utils/cn';\nimport type { RenderMode } from '@/types/renderMode';\n\n/**\n * ReportPage — Full-page wrapper for financial reports.\n * Handles print layout: page margins, page-number counter, sticky/repeated\n * header and footer across printed pages, and A4 vs US Letter paper size.\n *\n * Wrap an entire report in this component. Add ReportSection children inside.\n * Interactive elements (ExportBar, PeriodSelector) are hidden in print via .no-print.\n */\nexport type PaperSize = 'a4' | 'letter' | 'a4-landscape' | 'letter-landscape';\n\nexport interface ReportPageProps {\n /** Content rendered in the print header (repeated on every page) */\n printHeader?: ReactNode;\n /** Content rendered in the print footer (repeated on every page) */\n printFooter?: ReactNode;\n paperSize?: PaperSize;\n /** Output target — pdf uses narrower margins and tighter gap */\n renderMode?: RenderMode;\n children: ReactNode;\n className?: string;\n}\n\nconst PAPER_WIDTHS: Record<PaperSize, string> = {\n a4: '210mm',\n letter: '216mm',\n 'a4-landscape': '297mm',\n 'letter-landscape': '279mm',\n};\n\nexport function ReportPage({\n printHeader,\n printFooter,\n paperSize = 'a4',\n renderMode = 'web',\n children,\n className,\n}: ReportPageProps) {\n const isPdf = renderMode === 'pdf';\n const isExcel = renderMode === 'excel';\n const isLandscape = paperSize === 'a4-landscape' || paperSize === 'letter-landscape';\n const baseSize = isLandscape ? (paperSize === 'a4-landscape' ? 'a4' : 'letter') : paperSize ?? 'a4';\n\n // PDF: narrower side margins (12mm vs 20mm) for more table space\n const sideMargin = isPdf ? '12mm' : '20mm';\n const padding = `15mm ${sideMargin}`;\n const pageMargin = `15mm ${sideMargin}`;\n const gap = isPdf ? 'gap-6' : isExcel ? 'gap-2' : 'gap-6';\n\n return (\n <>\n {/* Print-only CSS injected as a style tag — scoped to this component */}\n <style>{`\n @media print {\n .report-page {\n width: ${PAPER_WIDTHS[paperSize ?? 'a4']};\n margin: 0 auto;\n padding: ${isPdf ? '0' : padding};\n font-size: 10pt;\n }\n .report-page table {\n font-size: 9pt;\n }\n .report-page thead {\n display: table-header-group;\n }\n .report-page tfoot {\n display: table-footer-group;\n }\n .report-page .total-row,\n .report-page .grand-total-row {\n page-break-inside: avoid;\n break-inside: avoid;\n }\n /* Keep section headings with their content — prevents orphaned \"5 JOURNAL\" headings */\n .report-page section h2 {\n page-break-after: avoid;\n break-after: avoid;\n }\n /* Keep small sections (< ~4 rows) together on one page */\n .report-page section {\n break-inside: avoid;\n }\n /* AuditStamp should not start on its own page */\n .report-page [data-audit-stamp] {\n page-break-before: avoid;\n break-before: avoid;\n }\n .report-page .report-section {\n page-break-before: auto;\n }\n .report-page .page-break-before {\n page-break-before: always;\n break-before: always;\n }\n .no-print {\n display: none !important;\n }\n .print-header {\n display: block !important;\n position: running(header);\n }\n .print-footer {\n display: block !important;\n position: running(footer);\n }\n @page {\n size: ${baseSize === 'a4' ? 'A4' : 'letter'}${isLandscape ? ' landscape' : ' portrait'};\n margin: ${pageMargin};\n @top-center { content: element(header); }\n @bottom-center { content: element(footer); }\n }\n @page:first {\n margin-top: 20mm;\n }\n }\n `}</style>\n\n {/* Print header — hidden on screen, shown only in print via CSS */}\n {printHeader && (\n <div className=\"print-header hidden print:block border-b border-[var(--color-gray-200)] pb-3 mb-4\">\n {printHeader}\n </div>\n )}\n\n <div\n className={cn(\n `report-page flex flex-col ${gap}`,\n className\n )}\n >\n {children}\n </div>\n\n {/* Print footer */}\n {printFooter && (\n <div className=\"print-footer hidden print:block border-t border-[var(--color-gray-200)] pt-3 mt-4 text-[11px] text-[var(--color-gray-600)]\">\n {printFooter}\n </div>\n )}\n </>\n );\n}\n","import { cn } from '@/utils/cn';\nimport type { RenderMode } from '@/types/renderMode';\n\n/**\n * DataTable — Simple flat table for journal entry line items, audit trails,\n * and any tabular data that doesn't require grouping or totals.\n * Shares column definitions with FinancialTable for consistency.\n */\nexport interface ColumnDef {\n key: string;\n label: string;\n align?: 'left' | 'right' | 'center';\n /** Render value in monospace font with tabular-nums (for numeric columns) */\n mono?: boolean;\n /** Column data type — drives formatting and alignment inference */\n type?: 'money' | 'number' | 'percent' | 'hours' | 'text' | 'date';\n /** Currency symbol for money columns */\n currency?: string;\n /** Decimal precision for numeric columns */\n precision?: number;\n}\n\nexport interface TableRow {\n [key: string]: string | number;\n}\n\nexport interface DataTableProps {\n columns: ColumnDef[];\n rows: TableRow[];\n emptyMessage?: string;\n /** Output target — pdf uses tighter spacing */\n renderMode?: RenderMode;\n className?: string;\n}\n\nconst MONO = 'Geist Mono, ui-monospace, monospace';\n\nconst textAlign = (align?: 'left' | 'right' | 'center'): 'left' | 'right' | 'center' =>\n align === 'right' ? 'right' : align === 'center' ? 'center' : 'left';\n\nexport function DataTable({ columns, rows, emptyMessage = 'No data', renderMode = 'web', className }: DataTableProps) {\n const isPdf = renderMode === 'pdf';\n const isExcel = renderMode === 'excel';\n const compact = isPdf || isExcel;\n const cellPad = isPdf ? '6px 10px' : isExcel ? '4px 8px' : '10px 16px';\n const headerPad = isPdf ? '5px 10px' : isExcel ? '4px 8px' : '9px 16px';\n const fontSize = compact ? 12 : 13;\n const headerFontSize = compact ? 9 : 10;\n\n return (\n <div\n className={cn(\n 'border border-[var(--color-gray-200)] overflow-hidden',\n !isExcel && 'rounded-lg',\n className\n )}\n >\n <table className=\"w-full\" style={{ borderCollapse: 'collapse', tableLayout: isPdf ? 'auto' : undefined }}>\n <thead>\n <tr>\n {columns.map((col) => (\n <th\n key={col.key}\n style={{\n padding: headerPad,\n textAlign: textAlign(col.align),\n fontSize: headerFontSize,\n fontWeight: 700,\n textTransform: 'uppercase',\n letterSpacing: '0.08em',\n color: 'var(--color-gray-600)',\n background: 'var(--color-gray-50)',\n borderBottom: '1px solid var(--color-gray-200)',\n whiteSpace: 'nowrap',\n }}\n >\n {col.label}\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {rows.length === 0 ? (\n <tr>\n <td\n colSpan={columns.length}\n style={{\n padding: '24px 16px',\n textAlign: 'center',\n fontSize: 13,\n color: 'var(--color-gray-600)',\n background: 'var(--color-white)',\n }}\n >\n {emptyMessage}\n </td>\n </tr>\n ) : (\n rows.map((row, ri) => (\n <tr\n key={ri}\n style={{\n background: 'var(--color-white)',\n borderBottom:\n ri < rows.length - 1 ? '1px solid var(--color-gray-100)' : undefined,\n }}\n >\n {columns.map((col, ci) => (\n <td\n key={col.key}\n style={{\n padding: cellPad,\n textAlign: textAlign(col.align),\n fontSize,\n color:\n ci === 0\n ? 'var(--color-gray-1000)'\n : 'var(--color-gray-800)',\n fontFamily: col.mono ? MONO : undefined,\n fontVariantNumeric: col.mono ? 'tabular-nums' : undefined,\n whiteSpace: isPdf && (ci === 0 || col.mono) ? 'nowrap' : undefined,\n }}\n >\n {row[col.key] ?? '—'}\n </td>\n ))}\n </tr>\n ))\n )}\n </tbody>\n </table>\n </div>\n );\n}\n","import { cn } from '@/utils/cn';\nimport type { ColumnDef, TableRow } from '../DataTable/DataTable';\nimport type { RenderMode } from '@/types/renderMode';\n\n/**\n * FinancialTable — The primary financial report table. Supports flat rows, grouped\n * rows with section headers and inline subtotals, and grand-total rows.\n *\n * Visual hierarchy (5 levels, strongest → weakest):\n * 1. thead — brand navy bg (#022E40), white text\n * 2. group hdrs — cyan wash bg + 3px cyan left accent\n * 3. data rows — white\n * 4. subtotals — gray-100 lift\n * 5. grand total — light blue-200 tint (#D6F4FF), navy text\n *\n * Layout notes:\n * - totals render in <tfoot> so the browser print engine does NOT repeat the\n * <thead> above them at page breaks — prevents the duplicate-header bug.\n * - Each group (header + rows + subtotal) is wrapped in its own <tbody> so\n * page-break-inside: avoid keeps them together without orphaning.\n * - Subtotal/total empty cells render as blank rather than \"—\".\n */\nexport type { ColumnDef, TableRow };\n\nexport interface TableGroup {\n label: string;\n /** Optional count badge shown next to the section header (web only) */\n count?: number;\n rows: TableRow[];\n /** Subtotal row for this group (first column key used as label fallback: \"Subtotal\") */\n subtotal?: TableRow;\n}\n\nexport interface TotalRow {\n /** Label shown in the first column */\n label: string;\n /** Values keyed by column key for all non-label columns */\n values: Record<string, string>;\n variant?: 'subtotal' | 'section-total' | 'grand-total';\n}\n\nexport interface FinancialTableProps {\n columns: ColumnDef[];\n /** Groups render section headers, indented rows, and optional subtotals */\n groups?: TableGroup[];\n /** Flat rows rendered without grouping (used when groups is omitted) */\n rows?: TableRow[];\n /** Summary rows rendered at the bottom (grand-total gets light blue bg) */\n totals?: TotalRow[];\n /** Output target — pdf uses tighter spacing, no count badges */\n renderMode?: RenderMode;\n className?: string;\n}\n\nconst MONO = 'Geist Mono, ui-monospace, monospace';\n\n// Shared row heights — thead and grand-total tfoot rows use the same value\n// so they are guaranteed pixel-equal regardless of font size or borders.\nconst HEADER_ROW_HEIGHT_PDF = 24;\nconst HEADER_ROW_HEIGHT_WEB = 34;\n\nconst textAlign = (align?: 'left' | 'right' | 'center'): 'left' | 'right' | 'center' =>\n align === 'right' ? 'right' : align === 'center' ? 'center' : 'left';\n\nfunction TotalRowEl({\n row,\n columns,\n renderMode = 'web',\n}: {\n row: TotalRow;\n columns: FinancialTableProps['columns'];\n renderMode?: RenderMode;\n}) {\n const isGrand = row.variant === 'grand-total';\n const isPdf = renderMode === 'pdf';\n const fontSize = isPdf ? 11 : 13;\n const grandFontSize = isPdf ? 12 : 13;\n\n // Grand total: brand light-blue tint (#D6F4FF) with navy text — elegant, not heavy.\n // Other totals (subtotal/section-total): light gray lift.\n const bg = isGrand ? 'var(--color-blue-200)' : 'var(--color-gray-100)';\n const textColor = isGrand ? 'var(--color-blue-1000)' : 'var(--color-gray-1000)';\n const borderTop = isGrand\n ? '2px solid var(--color-blue-800)' // brand cyan rule above grand total\n : '1px solid var(--color-gray-200)';\n\n // Grand total row uses HEADER_ROW_HEIGHT to be pixel-equal with thead.\n // The explicit height on <tr> overrides any padding/font/border differences.\n return (\n <tr style={{ background: bg, borderTop, height: isGrand ? (isPdf ? HEADER_ROW_HEIGHT_PDF : HEADER_ROW_HEIGHT_WEB) : undefined }}>\n {columns.map((col, ci) => {\n const isFirst = ci === 0;\n const val = isFirst ? row.label : (row.values[col.key] ?? '');\n return (\n <td\n key={col.key}\n style={{\n padding: isPdf ? '0 10px' : '0 16px',\n textAlign: textAlign(col.align),\n fontSize: isGrand ? grandFontSize : fontSize,\n fontWeight: isGrand ? 700 : 600,\n color: textColor,\n fontFamily: col.mono || !isFirst ? MONO : undefined,\n fontVariantNumeric: 'tabular-nums',\n whiteSpace: isPdf ? 'nowrap' : undefined,\n }}\n >\n {val}\n </td>\n );\n })}\n </tr>\n );\n}\n\nexport function FinancialTable({\n columns,\n groups,\n rows,\n totals,\n renderMode = 'web',\n className,\n}: FinancialTableProps) {\n const isPdf = renderMode === 'pdf';\n const isExcel = renderMode === 'excel';\n const compact = isPdf || isExcel;\n const cellPad = isPdf ? '6px 10px' : isExcel ? '4px 8px' : '10px 16px';\n const headerRowHeight = isPdf ? HEADER_ROW_HEIGHT_PDF : isExcel ? undefined : HEADER_ROW_HEIGHT_WEB;\n const fontSize = compact ? 12 : 13;\n const headerFontSize = compact ? 9 : 10;\n\n return (\n <div\n className={cn(\n 'border border-[var(--color-gray-200)] overflow-hidden',\n !isExcel && 'rounded-lg',\n className\n )}\n >\n <table className=\"w-full\" style={{ borderCollapse: 'collapse', tableLayout: isPdf ? 'auto' : undefined }}>\n\n {/* thead — brand navy bg, white text. The strongest visual anchor in the table. */}\n <thead>\n <tr style={{ height: headerRowHeight }}>\n {columns.map((col) => (\n <th\n key={col.key}\n style={{\n padding: isPdf ? '0 10px' : isExcel ? '4px 8px' : '0 16px',\n textAlign: textAlign(col.align),\n fontSize: headerFontSize,\n fontWeight: 700,\n textTransform: 'uppercase',\n letterSpacing: '0.08em',\n color: 'var(--color-white)',\n background: 'var(--color-blue-1000)',\n whiteSpace: 'nowrap',\n }}\n >\n {col.label}\n </th>\n ))}\n </tr>\n </thead>\n\n {/* Flat rows (no grouping) — single tbody */}\n {rows && rows.length > 0 && (\n <tbody>\n {rows.map((row, ri) => (\n <tr\n key={ri}\n style={{\n background: 'var(--color-white)',\n borderBottom: '1px solid var(--color-gray-100)',\n }}\n >\n {columns.map((col, ci) => (\n <td\n key={col.key}\n style={{\n padding: cellPad,\n textAlign: textAlign(col.align),\n fontSize,\n color: 'var(--color-gray-1000)',\n fontFamily: col.mono ? MONO : undefined,\n fontVariantNumeric: col.mono ? 'tabular-nums' : undefined,\n whiteSpace: isPdf && (ci === 0 || col.mono) ? 'nowrap' : undefined,\n }}\n >\n {row[col.key] ?? '—'}\n </td>\n ))}\n </tr>\n ))}\n </tbody>\n )}\n\n {/* Grouped rows — each group in its own <tbody> for page-break control */}\n {groups?.map((group, gi) => (\n <tbody\n key={gi}\n style={{ pageBreakInside: 'avoid', breakInside: 'avoid' }}\n >\n {/* Group header — cyan wash bg + cyan left-accent border */}\n <tr\n style={{\n background: 'var(--color-blue-800-bg)',\n borderTop: gi > 0 ? '1px solid var(--color-blue-800-subtle)' : undefined,\n borderBottom: '1px solid var(--color-blue-800-subtle)',\n }}\n >\n <td\n colSpan={columns.length}\n style={{\n padding: compact ? '5px 10px' : '7px 16px',\n paddingLeft: compact ? 16 : 24,\n fontSize: compact ? 9 : 10,\n fontWeight: 700,\n textTransform: 'uppercase',\n letterSpacing: '0.08em',\n color: 'var(--color-blue-1000)',\n }}\n >\n {group.label}\n {renderMode === 'web' && group.count != null && (\n <span\n style={{\n marginLeft: 8,\n padding: '1px 6px',\n borderRadius: 9999,\n fontSize: 10,\n fontWeight: 600,\n background: 'var(--color-blue-800-subtle)',\n color: 'var(--color-blue-1000)',\n }}\n >\n {group.count}\n </span>\n )}\n </td>\n </tr>\n\n {/* Group data rows */}\n {group.rows.map((row, ri) => (\n <tr\n key={ri}\n style={{\n background: 'var(--color-white)',\n borderBottom:\n ri < group.rows.length - 1\n ? '1px solid var(--color-gray-100)'\n : undefined,\n }}\n >\n {columns.map((col, ci) => (\n <td\n key={col.key}\n style={{\n padding: cellPad,\n paddingLeft: ci === 0 ? (compact ? 16 : 24) : undefined,\n textAlign: textAlign(col.align),\n fontSize,\n color: 'var(--color-gray-1000)',\n fontFamily: col.mono ? MONO : undefined,\n fontVariantNumeric: col.mono ? 'tabular-nums' : undefined,\n whiteSpace: isPdf && (ci === 0 || col.mono) ? 'nowrap' : undefined,\n }}\n >\n {row[col.key] ?? '—'}\n </td>\n ))}\n </tr>\n ))}\n\n {/* Subtotal row — gray-100 lift, blank empty cells */}\n {group.subtotal && (\n <tr\n style={{\n background: 'var(--color-gray-100)',\n borderTop: '1px solid var(--color-gray-200)',\n borderBottom: '1px solid var(--color-gray-200)',\n }}\n >\n {columns.map((col, ci) => {\n const val = group.subtotal![col.key];\n const display = ci === 0 ? (val ?? 'Subtotal') : (val ?? '');\n return (\n <td\n key={col.key}\n style={{\n padding: compact ? '5px 10px' : '9px 16px',\n textAlign: textAlign(col.align),\n fontSize: ci === 0 ? (compact ? 10 : 11) : fontSize,\n fontWeight: 600,\n textTransform: ci === 0 ? 'uppercase' : undefined,\n letterSpacing: ci === 0 ? '0.04em' : undefined,\n color: ci === 0 ? 'var(--color-gray-800)' : 'var(--color-gray-1000)',\n fontFamily: col.mono ? MONO : undefined,\n fontVariantNumeric: col.mono ? 'tabular-nums' : undefined,\n whiteSpace: isPdf ? 'nowrap' : undefined,\n }}\n >\n {display}\n </td>\n );\n })}\n </tr>\n )}\n </tbody>\n ))}\n\n {/* Total rows in <tfoot> — print engine does NOT repeat <thead> above <tfoot>,\n fixing the duplicate column-header bug at page breaks. */}\n {totals && totals.length > 0 && (\n <tfoot>\n {totals.map((total, ti) => (\n <TotalRowEl key={ti} row={total} columns={columns} renderMode={renderMode} />\n ))}\n </tfoot>\n )}\n </table>\n </div>\n );\n}\n","import { Fragment } from 'react';\nimport { cn } from '@/utils/cn';\nimport type { TableRow } from '../DataTable/DataTable';\nimport type { RenderMode } from '@/types/renderMode';\n\n/**\n * PivotTable — Cross-tabulation table with a row-label column and multiple\n * period/dimension columns. Supports optional section grouping and highlighted\n * columns (e.g. the current period vs. comparatives).\n */\nexport type { TableRow };\n\nexport interface PivotColumn {\n key: string;\n label: string;\n /** Highlights this column with a subtle blue background (e.g. current period) */\n highlight?: boolean;\n}\n\nexport interface PivotSection {\n label: string;\n rows: TableRow[];\n}\n\nexport interface PivotTableProps {\n /** Header label for the first (row-label) column */\n rowLabel: string;\n columns: PivotColumn[];\n /** Grouped sections (renders section headers between row groups) */\n sections?: PivotSection[];\n /** Flat rows (used when sections is omitted) */\n rows?: TableRow[];\n /** Output target — pdf uses tighter spacing */\n renderMode?: RenderMode;\n className?: string;\n}\n\nconst MONO = 'Geist Mono, ui-monospace, monospace';\nconst HIGHLIGHT_BG = '#f0f9ff';\nconst HIGHLIGHT_HEADER_COLOR = 'var(--color-blue-1000)';\n\nexport function PivotTable({\n rowLabel,\n columns,\n sections,\n rows,\n renderMode = 'web',\n className,\n}: PivotTableProps) {\n const isPdf = renderMode === 'pdf';\n const isExcel = renderMode === 'excel';\n const compact = isPdf || isExcel;\n const cellPad = compact ? '6px 10px' : '10px 16px';\n const headerPad = compact ? '5px 10px' : '9px 16px';\n const fontSize = compact ? 12 : 13;\n const headerFontSize = compact ? 9 : 10;\n\n const allRows = sections\n ? null\n : rows ?? [];\n\n return (\n <div\n className={cn(\n 'border border-[var(--color-gray-200)] overflow-hidden',\n !isExcel && 'rounded-lg',\n className\n )}\n >\n <table className=\"w-full\" style={{ borderCollapse: 'collapse', tableLayout: isPdf ? 'auto' : undefined }}>\n <thead>\n <tr>\n <th\n style={{\n padding: headerPad,\n textAlign: 'left',\n fontSize: headerFontSize,\n fontWeight: 700,\n textTransform: 'uppercase',\n letterSpacing: '0.08em',\n color: 'var(--color-gray-600)',\n background: 'var(--color-gray-50)',\n borderBottom: '1px solid var(--color-gray-200)',\n whiteSpace: 'nowrap',\n }}\n >\n {rowLabel}\n </th>\n {columns.map((col) => (\n <th\n key={col.key}\n style={{\n padding: headerPad,\n textAlign: 'right',\n fontSize: headerFontSize,\n fontWeight: 700,\n textTransform: 'uppercase',\n letterSpacing: '0.08em',\n color: col.highlight ? HIGHLIGHT_HEADER_COLOR : 'var(--color-gray-600)',\n background: col.highlight ? HIGHLIGHT_BG : 'var(--color-gray-50)',\n borderBottom: '1px solid var(--color-gray-200)',\n whiteSpace: 'nowrap',\n }}\n >\n {col.label}\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {/* Flat rows */}\n {allRows?.map((row, ri) => (\n <tr\n key={ri}\n style={{\n background: 'var(--color-white)',\n borderBottom:\n ri < allRows.length - 1 ? '1px solid var(--color-gray-100)' : undefined,\n }}\n >\n <td\n style={{\n padding: cellPad,\n fontSize,\n color: 'var(--color-gray-1000)',\n whiteSpace: isPdf ? 'nowrap' : undefined,\n }}\n >\n {row['account'] ?? row['label'] ?? ''}\n </td>\n {columns.map((col) => (\n <td\n key={col.key}\n style={{\n padding: cellPad,\n textAlign: 'right',\n fontSize,\n fontFamily: MONO,\n fontVariantNumeric: 'tabular-nums',\n color: col.highlight\n ? 'var(--color-gray-1000)'\n : 'var(--color-gray-800)',\n background: col.highlight ? HIGHLIGHT_BG : undefined,\n whiteSpace: isPdf ? 'nowrap' : undefined,\n }}\n >\n {row[col.key] ?? '—'}\n </td>\n ))}\n </tr>\n ))}\n\n {/* Sectioned rows */}\n {sections?.map((section, si) => (\n <Fragment key={si}>\n <tr\n style={{\n background: 'var(--color-gray-50)',\n borderTop: si > 0 ? '1px solid var(--color-gray-200)' : undefined,\n borderBottom: '1px solid var(--color-gray-200)',\n }}\n >\n <td\n colSpan={columns.length + 1}\n style={{\n padding: compact ? '5px 10px' : '7px 16px',\n fontSize: headerFontSize,\n fontWeight: 700,\n textTransform: 'uppercase',\n letterSpacing: '0.08em',\n color: 'var(--color-gray-600)',\n }}\n >\n {section.label}\n </td>\n </tr>\n {section.rows.map((row, ri) => (\n <tr\n key={ri}\n style={{\n background: 'var(--color-white)',\n borderBottom:\n ri < section.rows.length - 1\n ? '1px solid var(--color-gray-100)'\n : undefined,\n }}\n >\n <td\n style={{\n padding: cellPad,\n paddingLeft: compact ? 16 : 24,\n fontSize,\n color: 'var(--color-gray-800)',\n whiteSpace: isPdf ? 'nowrap' : undefined,\n }}\n >\n {row['account'] ?? row['label'] ?? ''}\n </td>\n {columns.map((col) => (\n <td\n key={col.key}\n style={{\n padding: cellPad,\n textAlign: 'right',\n fontSize,\n fontFamily: MONO,\n fontVariantNumeric: 'tabular-nums',\n color: col.highlight\n ? 'var(--color-gray-1000)'\n : 'var(--color-gray-800)',\n background: col.highlight ? HIGHLIGHT_BG : undefined,\n whiteSpace: isPdf ? 'nowrap' : undefined,\n }}\n >\n {row[col.key] ?? '—'}\n </td>\n ))}\n </tr>\n ))}\n </Fragment>\n ))}\n </tbody>\n </table>\n </div>\n );\n}\n","import type { RenderMode } from '@/types/renderMode';\n\nexport type { RenderMode };\n\nexport interface DataPoint {\n label: string;\n value: number;\n priorValue?: number;\n isTotal?: boolean;\n isForecast?: boolean;\n upperBound?: number;\n lowerBound?: number;\n}\n\nexport type ValueType = 'money' | 'percent' | 'number' | 'ratio';\n\nexport type ColorSchemeName =\n | 'archie'\n | 'ocean'\n | 'forest'\n | 'sunset'\n | 'lavender'\n | 'monochrome';\n\nexport interface ChartConfig {\n width: number;\n height: number;\n valueType: ValueType;\n currency?: string;\n renderMode?: RenderMode;\n showDataLabels?: boolean;\n showLegend?: boolean;\n showComparison?: boolean;\n comparisonLabel?: string;\n primaryLabel?: string;\n primaryColor?: string;\n comparisonColor?: string;\n colorScheme?: ColorSchemeName;\n}\n\nexport const C = {\n primary: '#e15713',\n secondary: '#15b1cd',\n positive: '#71d481',\n negative: '#fb6060',\n total: '#000626',\n grid: '#e5e7f0',\n axisLabel: '#8c92af',\n text: '#000626',\n textMuted: '#595f7a',\n priorFill: 'rgba(229, 231, 240, 0.6)',\n areaFill: 'rgba(229, 87, 19, 0.08)',\n areaFill2: 'rgba(21, 177, 205, 0.08)',\n forecastFill: 'rgba(229, 87, 19, 0.04)',\n forecastBand: 'rgba(229, 87, 19, 0.05)',\n} as const;\n\nexport const DONUT_COLORS = [\n C.primary,\n C.secondary,\n C.positive,\n C.total,\n C.axisLabel,\n '#5b21b6',\n '#c2410c',\n] as const;\n\nexport const FONT_MONO = \"'Geist Mono', 'ui-monospace', monospace\";\nexport const FONT_SANS = \"'Geist', 'system-ui', sans-serif\";\n\nexport const PAD = { top: 20, right: 12, bottom: 32, left: 56 } as const;\n","import type { ChartConfig } from '../types';\n\n/* ------------------------------------------------------------------ */\n/* Types */\n/* ------------------------------------------------------------------ */\n\nexport type ColorSchemeName =\n | 'archie'\n | 'ocean'\n | 'forest'\n | 'sunset'\n | 'lavender'\n | 'monochrome';\n\ninterface ColorSchemeDefinition {\n primary: string;\n secondary: string;\n positive: string;\n negative: string;\n total: string;\n series: string[];\n}\n\nexport interface ResolvedChartColors {\n primary: string;\n secondary: string;\n positive: string;\n negative: string;\n total: string;\n series: string[];\n priorFill: string;\n areaFill: string;\n areaFill2: string;\n forecastFill: string;\n forecastBand: string;\n grid: string;\n axisLabel: string;\n text: string;\n textMuted: string;\n}\n\n/* ------------------------------------------------------------------ */\n/* Utility */\n/* ------------------------------------------------------------------ */\n\nexport function hexToRgba(hex: string, alpha: number): string {\n const r = parseInt(hex.slice(1, 3), 16);\n const g = parseInt(hex.slice(3, 5), 16);\n const b = parseInt(hex.slice(5, 7), 16);\n return `rgba(${r}, ${g}, ${b}, ${alpha})`;\n}\n\n/* ------------------------------------------------------------------ */\n/* Scheme definitions — every hex value comes from colors.css tokens */\n/* ------------------------------------------------------------------ */\n\nexport const COLOR_SCHEMES: Record<ColorSchemeName, ColorSchemeDefinition> = {\n archie: {\n primary: '#e15713', // orange-1000\n secondary: '#15b1cd', // blue-800\n positive: '#71d481', // green-1000\n negative: '#fb6060', // red-1000\n total: '#000626', // gray-1000\n series: [\n '#e15713', // orange-1000 — brand primary\n '#15b1cd', // blue-800 — brand secondary\n '#6D28D9', // entity-lavender-text\n '#15803D', // entity-mint-text\n '#BE123C', // entity-rose-text\n '#0369A1', // entity-sky-text\n '#C2410C', // entity-peach-text\n ],\n },\n ocean: {\n primary: '#0369A1',\n secondary: '#15b1cd',\n positive: '#71d481',\n negative: '#fb6060',\n total: '#022e40',\n series: ['#0369A1', '#15b1cd', '#6aeafd', '#022e40', '#8c92af', '#15803D', '#6D28D9'],\n },\n forest: {\n primary: '#15803D',\n secondary: '#0369A1',\n positive: '#71d481',\n negative: '#fb6060',\n total: '#000626',\n series: ['#15803D', '#0369A1', '#71d481', '#000626', '#8c92af', '#6D28D9', '#C2410C'],\n },\n sunset: {\n primary: '#C2410C',\n secondary: '#BE123C',\n positive: '#71d481',\n negative: '#fb6060',\n total: '#000626',\n series: ['#C2410C', '#BE123C', '#8f6c1a', '#000626', '#8c92af', '#e15713', '#6D28D9'],\n },\n lavender: {\n primary: '#6D28D9',\n secondary: '#0369A1',\n positive: '#71d481',\n negative: '#fb6060',\n total: '#000626',\n series: ['#6D28D9', '#0369A1', '#15803D', '#000626', '#8c92af', '#C2410C', '#BE123C'],\n },\n monochrome: {\n primary: '#000626',\n secondary: '#595f7a',\n positive: '#71d481',\n negative: '#fb6060',\n total: '#000626',\n series: ['#000626', '#595f7a', '#8c92af', '#e5e7f0', '#022e40'],\n },\n};\n\n/* ------------------------------------------------------------------ */\n/* Resolver */\n/* ------------------------------------------------------------------ */\n\nexport function resolveChartColors(config: ChartConfig): ResolvedChartColors {\n const scheme = COLOR_SCHEMES[config.colorScheme ?? 'archie'];\n\n const primary = config.primaryColor ?? scheme.primary;\n const secondary = config.comparisonColor ?? scheme.secondary;\n\n return {\n primary,\n secondary,\n positive: scheme.positive,\n negative: scheme.negative,\n total: scheme.total,\n series: [primary, secondary, ...scheme.series.slice(2)],\n priorFill: 'rgba(229, 231, 240, 0.6)',\n areaFill: hexToRgba(primary, 0.08),\n areaFill2: hexToRgba(secondary, 0.08),\n forecastFill: hexToRgba(primary, 0.04),\n forecastBand: hexToRgba(primary, 0.05),\n grid: '#e5e7f0',\n axisLabel: '#8c92af',\n text: '#000626',\n textMuted: '#595f7a',\n };\n}\n","import { ReactNode } from 'react';\nimport { cn } from '@/utils/cn';\nimport type { RenderMode } from '@/types/renderMode';\n\n/**\n * ChartSection — Standard wrapper for every chart in a management report.\n *\n * Matches the visual language of ReportSection:\n * - Title: 11px, 700, uppercase, 0.08em tracking\n * - Subtitle: 11px, 400, gray-600\n * - Divider below header (same 1px gray-200 as FinancialTable group headers)\n * - page-break-inside: avoid for PDF\n */\nexport interface ChartSectionProps {\n title: string;\n subtitle?: string;\n footer?: string;\n renderMode?: RenderMode;\n className?: string;\n children: ReactNode;\n}\n\nexport function ChartSection({\n title,\n subtitle,\n footer,\n renderMode = 'web',\n className,\n children,\n}: ChartSectionProps) {\n const isPdf = renderMode === 'pdf';\n\n return (\n <div\n className={cn('chart-section', className)}\n style={{ breakInside: 'avoid', pageBreakInside: 'avoid' }}\n >\n {/* Header */}\n <div\n style={{\n borderBottom: '1px solid #e5e7f0',\n paddingBottom: isPdf ? 6 : 8,\n marginBottom: isPdf ? 12 : 16,\n }}\n >\n <div\n style={{\n fontSize: 11,\n fontWeight: 700,\n textTransform: 'uppercase',\n letterSpacing: '0.08em',\n color: '#000626',\n fontFamily: \"'Geist', system-ui, sans-serif\",\n }}\n >\n {title}\n </div>\n {subtitle && (\n <div\n style={{\n fontSize: 11,\n fontWeight: 400,\n color: '#8c92af',\n marginTop: 2,\n fontFamily: \"'Geist', system-ui, sans-serif\",\n }}\n >\n {subtitle}\n </div>\n )}\n </div>\n\n {/* Chart content */}\n <div>{children}</div>\n\n {/* Footer */}\n {footer && (\n <div\n style={{\n fontSize: 10,\n fontWeight: 400,\n color: '#8c92af',\n marginTop: isPdf ? 6 : 8,\n fontFamily: \"'Geist', system-ui, sans-serif\",\n lineHeight: 1.5,\n }}\n >\n {footer}\n </div>\n )}\n </div>\n );\n}\n","export function linearScale(\n domain: [number, number],\n range: [number, number],\n): (value: number) => number {\n const [d0, d1] = domain;\n const [r0, r1] = range;\n const domainSpan = d1 - d0 || 1;\n const rangeSpan = r1 - r0;\n return (v: number) => r0 + ((v - d0) / domainSpan) * rangeSpan;\n}\n\nexport interface BandScale {\n (category: string): number;\n bandwidth: number;\n step: number;\n}\n\nexport function bandScale(\n categories: string[],\n totalWidth: number,\n padding = 0.25,\n): BandScale {\n const n = categories.length;\n const step = totalWidth / (n + padding * (n - 1) + padding);\n const bandwidth = step * (1 - padding / (1 + padding));\n const gapWidth = step * (padding / (1 + padding));\n\n const fn = (cat: string) => {\n const idx = categories.indexOf(cat);\n if (idx === -1) return 0;\n return idx * (bandwidth + gapWidth) + gapWidth / 2;\n };\n fn.bandwidth = bandwidth;\n fn.step = bandwidth + gapWidth;\n return fn as BandScale;\n}\n\nexport function niceTickValues(\n min: number,\n max: number,\n count = 5,\n): number[] {\n if (min === max) return [min];\n\n const rawStep = (max - min) / (count - 1);\n const magnitude = Math.pow(10, Math.floor(Math.log10(Math.abs(rawStep))));\n const niceSteps = [1, 2, 2.5, 5, 10];\n let step = magnitude;\n for (const s of niceSteps) {\n if (s * magnitude >= rawStep) {\n step = s * magnitude;\n break;\n }\n }\n\n const niceMin = Math.floor(min / step) * step;\n const ticks: number[] = [];\n let t = niceMin;\n while (t <= max + step * 0.01) {\n ticks.push(t);\n t = parseFloat((t + step).toPrecision(12));\n }\n return ticks;\n}\n\nexport function domainWithZero(values: number[]): [number, number] {\n const min = Math.min(0, ...values);\n const max = Math.max(0, ...values);\n return [min, max];\n}\n","import type { ValueType } from '../types';\n\nexport function formatAxisLabel(\n value: number,\n type: ValueType,\n currency = '$',\n abbreviated = true,\n): string {\n if (type === 'percent') return `${value.toFixed(1)}%`;\n if (type === 'ratio') return `${value.toFixed(2)}\\u00D7`;\n if (type === 'number') {\n if (abbreviated) return abbreviate(value);\n return value.toLocaleString('en', { maximumFractionDigits: 1 });\n }\n const prefix = currency;\n if (abbreviated) return `${prefix}${abbreviate(value)}`;\n return `${prefix}${Math.abs(value).toLocaleString('en', { maximumFractionDigits: 0 })}`;\n}\n\nfunction abbreviate(value: number): string {\n const abs = Math.abs(value);\n const sign = value < 0 ? '-' : '';\n if (abs >= 1_000_000) return `${sign}${(abs / 1_000_000).toFixed(abs >= 10_000_000 ? 0 : 1)}M`;\n if (abs >= 1_000) return `${sign}${(abs / 1_000).toFixed(abs >= 100_000 ? 0 : 1)}K`;\n return `${sign}${abs.toFixed(0)}`;\n}\n\nexport function formatDataLabel(\n value: number,\n type: ValueType,\n currency = '$',\n): string {\n if (type === 'percent') return `${value.toFixed(1)}%`;\n if (type === 'ratio') return `${value.toFixed(2)}\\u00D7`;\n if (type === 'number') return abbreviate(value);\n return `${currency}${abbreviate(value)}`;\n}\n","import { useMemo } from 'react';\nimport { FONT_MONO, FONT_SANS, PAD, type DataPoint, type ChartConfig } from '../types';\nimport { linearScale, bandScale, niceTickValues, domainWithZero } from '../utils/scales';\nimport { formatAxisLabel, formatDataLabel } from '../utils/format';\nimport { resolveChartColors } from '../utils/colorScheme';\n\n/**\n * BarChart — Vertical bars for time-series or category comparison.\n *\n * Features:\n * - Comparison (prior period / budget) bars rendered as ghost behind primary\n * - Negative value bars extend below baseline in red\n * - Total/summary bars rendered in navy\n * - Optional data labels above/below bars\n * - Horizontal grid lines only (no vertical rules)\n * - Smooth rounded top corners via SVG clipPath per bar\n */\nexport interface BarChartProps {\n data: DataPoint[];\n config: ChartConfig;\n}\n\nconst RADIUS = 2;\n\nexport function BarChart({ data, config }: BarChartProps) {\n const {\n width,\n height,\n valueType,\n currency = '$',\n renderMode = 'web',\n showDataLabels = false,\n showLegend = false,\n showComparison = false,\n comparisonLabel = 'Prior Year',\n primaryLabel = 'Current',\n } = config;\n\n const colors = resolveChartColors(config);\n\n const isPdf = renderMode === 'pdf';\n\n const plotW = width - PAD.left - PAD.right;\n const plotH = height - PAD.top - PAD.bottom;\n\n const allValues = useMemo(() => {\n const vals = data.map((d) => d.value);\n if (showComparison) {\n data.forEach((d) => { if (d.priorValue !== undefined) vals.push(d.priorValue); });\n }\n return vals;\n }, [data, showComparison]);\n\n const domain = domainWithZero(allValues);\n const yScale = linearScale(domain, [plotH, 0]);\n const yZero = yScale(0);\n\n const labels = data.map((d) => d.label);\n const xScale = bandScale(labels, plotW, 0.3);\n const bw = xScale.bandwidth;\n\n const ticks = niceTickValues(domain[0], domain[1], 5);\n\n const fmt = (v: number, abbrev = true) => formatAxisLabel(v, valueType, currency, abbrev);\n const fmtLabel = (v: number) => formatDataLabel(v, valueType, currency);\n\n return (\n <svg\n width={width}\n height={height}\n viewBox={`0 0 ${width} ${height}`}\n aria-hidden=\"true\"\n style={{ display: 'block', overflow: 'visible' }}\n >\n <g transform={`translate(${PAD.left},${PAD.top})`}>\n\n {/* Horizontal grid lines + Y-axis labels */}\n {ticks.map((tick) => {\n const y = yScale(tick);\n return (\n <g key={tick}>\n <line\n x1={0} y1={y} x2={plotW} y2={y}\n stroke={colors.grid}\n strokeWidth={1}\n />\n <text\n x={-8} y={y}\n textAnchor=\"end\"\n dominantBaseline=\"middle\"\n style={{ fontSize: 10, fontFamily: FONT_MONO, fill: colors.axisLabel }}\n >\n {fmt(tick)}\n </text>\n </g>\n );\n })}\n\n {/* Baseline (zero line) — slightly darker when domain crosses zero */}\n {domain[0] < 0 && (\n <line\n x1={0} y1={yZero} x2={plotW} y2={yZero}\n stroke={colors.axisLabel}\n strokeWidth={1}\n />\n )}\n\n {/* Bars */}\n {data.map((d, i) => {\n const x = xScale(d.label);\n const barColor = d.isTotal ? colors.total : d.value < 0 ? colors.negative : colors.primary;\n const barTop = Math.min(yScale(d.value), yZero);\n const barH = Math.abs(yScale(d.value) - yZero);\n const isNeg = d.value < 0;\n\n // Comparison bar (behind primary)\n const showPrior = showComparison && d.priorValue !== undefined;\n const priorTop = showPrior ? Math.min(yScale(d.priorValue!), yZero) : 0;\n const priorH = showPrior ? Math.abs(yScale(d.priorValue!) - yZero) : 0;\n\n return (\n <g key={d.label}>\n {/* Clip path for rounded top corners */}\n <defs>\n <clipPath id={`bar-clip-${i}`}>\n <rect\n x={x} y={isNeg ? barTop : barTop - RADIUS}\n width={bw} height={barH + RADIUS + 1}\n rx={RADIUS} ry={RADIUS}\n />\n </clipPath>\n {showPrior && (\n <clipPath id={`prior-clip-${i}`}>\n <rect\n x={x} y={d.priorValue! < 0 ? priorTop : priorTop - RADIUS}\n width={bw} height={priorH + RADIUS + 1}\n rx={RADIUS} ry={RADIUS}\n />\n </clipPath>\n )}\n </defs>\n\n {/* Prior period bar (ghost) */}\n {showPrior && (\n <rect\n x={x} y={priorTop}\n width={bw} height={priorH}\n fill={colors.priorFill}\n clipPath={`url(#prior-clip-${i})`}\n />\n )}\n\n {/* Primary bar */}\n {barH > 0 && (\n <rect\n x={x} y={barTop}\n width={bw} height={barH}\n fill={barColor}\n clipPath={`url(#bar-clip-${i})`}\n />\n )}\n\n {/* Data label */}\n {showDataLabels && barH > 0 && (\n <text\n x={x + bw / 2}\n y={isNeg ? barTop + barH + 12 : barTop - 4}\n textAnchor=\"middle\"\n style={{ fontSize: 10, fontFamily: FONT_MONO, fontWeight: 600, fill: colors.text }}\n >\n {fmtLabel(d.value)}\n </text>\n )}\n </g>\n );\n })}\n\n {/* X-axis labels */}\n {data.map((d) => (\n <text\n key={d.label}\n x={xScale(d.label) + bw / 2}\n y={plotH + 16}\n textAnchor=\"middle\"\n style={{ fontSize: isPdf ? 9 : 10, fontFamily: FONT_SANS, fill: colors.axisLabel }}\n >\n {d.label}\n </text>\n ))}\n\n {/* Legend */}\n {showLegend && showComparison && (\n <g transform={`translate(0, ${plotH + 28})`}>\n <rect width={10} height={10} rx={2} fill={colors.primary} y={-1} />\n <text x={14} y={8} style={{ fontSize: 10, fontFamily: FONT_SANS, fill: colors.axisLabel }}>\n {primaryLabel}\n </text>\n <rect x={80} width={10} height={10} rx={2} fill={colors.priorFill} y={-1} />\n <text x={94} y={8} style={{ fontSize: 10, fontFamily: FONT_SANS, fill: colors.axisLabel }}>\n {comparisonLabel}\n </text>\n </g>\n )}\n </g>\n </svg>\n );\n}\n","export function smoothLinePath(\n points: [number, number][],\n tension = 0.4,\n): string {\n if (points.length === 0) return '';\n if (points.length === 1) return `M ${points[0][0]},${points[0][1]}`;\n if (points.length === 2) {\n return `M ${points[0][0]},${points[0][1]} L ${points[1][0]},${points[1][1]}`;\n }\n\n const d: string[] = [`M ${points[0][0]},${points[0][1]}`];\n\n for (let i = 0; i < points.length - 1; i++) {\n const p0 = points[i - 1] ?? points[i];\n const p1 = points[i];\n const p2 = points[i + 1];\n const p3 = points[i + 2] ?? points[i + 1];\n\n const cp1x = p1[0] + ((p2[0] - p0[0]) / 6) * tension * 3;\n const cp1y = p1[1] + ((p2[1] - p0[1]) / 6) * tension * 3;\n const cp2x = p2[0] - ((p3[0] - p1[0]) / 6) * tension * 3;\n const cp2y = p2[1] - ((p3[1] - p1[1]) / 6) * tension * 3;\n\n d.push(`C ${cp1x},${cp1y} ${cp2x},${cp2y} ${p2[0]},${p2[1]}`);\n }\n\n return d.join(' ');\n}\n\nexport function closeAreaPath(\n linePath: string,\n points: [number, number][],\n baseline: number,\n): string {\n if (points.length === 0) return '';\n const last = points[points.length - 1];\n const first = points[0];\n return `${linePath} L ${last[0]},${baseline} L ${first[0]},${baseline} Z`;\n}\n\nexport interface WaterfallSegment {\n x: number;\n yTop: number;\n yBottom: number;\n kind: 'positive' | 'negative' | 'total';\n connectorX?: number;\n}\n\nexport function waterfallSegments(\n values: number[],\n isTotal: boolean[],\n yScale: (v: number) => number,\n xPositions: number[],\n bandwidth: number,\n): WaterfallSegment[] {\n const segments: WaterfallSegment[] = [];\n let running = 0;\n\n for (let i = 0; i < values.length; i++) {\n const v = values[i];\n const isT = isTotal[i];\n\n if (isT) {\n const yZero = yScale(0);\n const yVal = yScale(running + v);\n segments.push({\n x: xPositions[i],\n yTop: Math.min(yZero, yVal),\n yBottom: Math.max(yZero, yVal),\n kind: 'total',\n });\n running += v;\n } else {\n const start = running;\n const end = running + v;\n const yStart = yScale(start);\n const yEnd = yScale(end);\n segments.push({\n x: xPositions[i],\n yTop: Math.min(yStart, yEnd),\n yBottom: Math.max(yStart, yEnd),\n kind: v >= 0 ? 'positive' : 'negative',\n connectorX: xPositions[i] + bandwidth,\n });\n running = end;\n }\n }\n\n return segments;\n}\n","import { useMemo } from 'react';\nimport { FONT_MONO, FONT_SANS, PAD, type ChartConfig } from '../types';\nimport { linearScale, niceTickValues, domainWithZero } from '../utils/scales';\nimport { smoothLinePath, closeAreaPath } from '../utils/path';\nimport { formatAxisLabel } from '../utils/format';\nimport { resolveChartColors, hexToRgba } from '../utils/colorScheme';\n\n/**\n * LineChart — Smooth cubic Bézier line chart for trend data.\n *\n * Features:\n * - Up to 3 series (primary coral, secondary cyan, tertiary green)\n * - Optional area fill under each line at 8% opacity\n * - End-of-line dot (4px, matching SparklineCell convention)\n * - Multi-series legend\n * - Horizontal grid lines only\n */\nexport interface LineSeries {\n label: string;\n data: number[];\n color?: string;\n showArea?: boolean;\n}\n\nexport interface LineChartProps {\n /** X-axis labels (shared across all series) */\n labels: string[];\n /** One or more data series */\n series: LineSeries[];\n config: ChartConfig;\n}\n\nexport function LineChart({ labels, series, config }: LineChartProps) {\n const {\n width,\n height,\n valueType,\n currency = '$',\n renderMode = 'web',\n showLegend = false,\n } = config;\n\n const colors = resolveChartColors(config);\n\n const isPdf = renderMode === 'pdf';\n const plotW = width - PAD.left - PAD.right;\n const plotH = height - PAD.top - PAD.bottom;\n\n const allValues = useMemo(\n () => series.flatMap((s) => s.data),\n [series],\n );\n\n const domain = domainWithZero(allValues);\n const yScale = linearScale(domain, [plotH, 0]);\n const yZero = yScale(0);\n\n const ticks = niceTickValues(domain[0], domain[1], 5);\n const fmt = (v: number) => formatAxisLabel(v, valueType, currency);\n\n const xStep = labels.length > 1 ? plotW / (labels.length - 1) : 0;\n const xOf = (i: number) => i * xStep;\n\n return (\n <svg\n width={width}\n height={height}\n viewBox={`0 0 ${width} ${height}`}\n aria-hidden=\"true\"\n style={{ display: 'block', overflow: 'visible' }}\n >\n <g transform={`translate(${PAD.left},${PAD.top})`}>\n\n {/* Grid lines + Y labels */}\n {ticks.map((tick) => {\n const y = yScale(tick);\n return (\n <g key={tick}>\n <line x1={0} y1={y} x2={plotW} y2={y} stroke={colors.grid} strokeWidth={1} />\n <text\n x={-8} y={y} textAnchor=\"end\" dominantBaseline=\"middle\"\n style={{ fontSize: 10, fontFamily: FONT_MONO, fill: colors.axisLabel }}\n >\n {fmt(tick)}\n </text>\n </g>\n );\n })}\n\n {/* Zero line */}\n {domain[0] < 0 && (\n <line x1={0} y1={yZero} x2={plotW} y2={yZero} stroke={colors.axisLabel} strokeWidth={1} />\n )}\n\n {/* Series */}\n {series.map((s, si) => {\n const color = s.color ?? colors.series[si % colors.series.length];\n const areaFill = hexToRgba(color.startsWith('#') ? color : colors.series[si % colors.series.length], 0.08);\n const points: [number, number][] = s.data.map((v, i) => [xOf(i), yScale(v)]);\n const linePath = smoothLinePath(points);\n const areaPath = closeAreaPath(linePath, points, yZero);\n const lastPt = points[points.length - 1];\n\n return (\n <g key={s.label}>\n {/* Area fill */}\n {(s.showArea ?? false) && (\n <path d={areaPath} fill={areaFill} stroke=\"none\" />\n )}\n {/* Line */}\n <path d={linePath} fill=\"none\" stroke={color} strokeWidth={2} strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n {/* End dot */}\n {lastPt && (\n <circle cx={lastPt[0]} cy={lastPt[1]} r={4} fill={color} stroke=\"#fff\" strokeWidth={1.5} />\n )}\n </g>\n );\n })}\n\n {/* X-axis labels */}\n {labels.map((label, i) => (\n <text\n key={label}\n x={xOf(i)}\n y={plotH + 16}\n textAnchor=\"middle\"\n style={{ fontSize: isPdf ? 9 : 10, fontFamily: FONT_SANS, fill: colors.axisLabel }}\n >\n {label}\n </text>\n ))}\n\n {/* Legend */}\n {showLegend && series.length > 1 && (\n <g transform={`translate(0, ${plotH + 28})`}>\n {series.map((s, si) => {\n const color = s.color ?? colors.series[si % colors.series.length];\n const xOff = si * 110;\n return (\n <g key={s.label} transform={`translate(${xOff}, 0)`}>\n <line x1={0} y1={5} x2={16} y2={5} stroke={color} strokeWidth={2} strokeLinecap=\"round\" />\n <circle cx={8} cy={5} r={3} fill={color} />\n <text x={20} y={9} style={{ fontSize: 10, fontFamily: FONT_SANS, fill: colors.axisLabel }}>\n {s.label}\n </text>\n </g>\n );\n })}\n </g>\n )}\n </g>\n </svg>\n );\n}\n","import { type DataPoint, type ChartConfig } from '../types';\nimport { LineChart, type LineSeries } from '../LineChart/LineChart';\nimport { resolveChartColors } from '../utils/colorScheme';\n\n/**\n * AreaChart — Line chart variant where the filled area is the primary visual.\n *\n * Wraps LineChart with `showArea: true` and a slightly heavier line stroke.\n * Used for: Profitability trend, Cash position over time.\n *\n * For multiple series, pass a series-based AreaChart — use LineChart directly\n * with showArea on each series.\n */\nexport interface AreaChartProps {\n data: DataPoint[];\n config: ChartConfig;\n /** Override area fill opacity (0–1). Default gives 10% coral fill. */\n areaOpacity?: number;\n color?: string;\n}\n\nexport function AreaChart({ data, config, color }: AreaChartProps) {\n const colors = resolveChartColors(config);\n\n const series: LineSeries[] = [\n {\n label: config.primaryLabel ?? 'Value',\n data: data.map((d) => d.value),\n color: color ?? colors.primary,\n showArea: true,\n },\n ];\n\n // Comparison series\n if (config.showComparison && data.some((d) => d.priorValue !== undefined)) {\n series.push({\n label: config.comparisonLabel ?? 'Prior Year',\n data: data.map((d) => d.priorValue ?? 0),\n color: colors.secondary,\n showArea: false,\n });\n }\n\n return (\n <LineChart\n labels={data.map((d) => d.label)}\n series={series}\n config={{ ...config, showLegend: config.showComparison ? config.showLegend : false }}\n />\n );\n}\n","import { useMemo } from 'react';\nimport { FONT_MONO, FONT_SANS, PAD, type DataPoint, type ChartConfig } from '../types';\nimport { linearScale, bandScale, niceTickValues } from '../utils/scales';\nimport { waterfallSegments } from '../utils/path';\nimport { formatDataLabel, formatAxisLabel } from '../utils/format';\nimport { resolveChartColors } from '../utils/colorScheme';\n\n/**\n * WaterfallChart — Bridge / waterfall chart for cash flow and reconciliation.\n *\n * Features:\n * - Floating bars: each bar starts where the previous ended\n * - Positive: green, Negative: red, Total/net: navy (DataPoint.isTotal = true)\n * - Dashed connector lines between consecutive segments\n * - Value labels above/below each segment\n * - Horizontal grid lines\n */\nexport interface WaterfallChartProps {\n data: DataPoint[];\n config: ChartConfig;\n}\n\nconst RADIUS = 2;\n\nexport function WaterfallChart({ data, config }: WaterfallChartProps) {\n const {\n width,\n height,\n valueType,\n currency = '$',\n renderMode = 'web',\n showDataLabels = true,\n } = config;\n\n const colors = resolveChartColors(config);\n const isPdf = renderMode === 'pdf';\n const plotW = width - PAD.left - PAD.right;\n const plotH = height - PAD.top - PAD.bottom;\n\n // Running total for domain calculation\n const runningValues = useMemo(() => {\n const vals: number[] = [0];\n let running = 0;\n for (const d of data) {\n running += d.value;\n vals.push(running);\n }\n return vals;\n }, [data]);\n\n const minVal = Math.min(0, ...runningValues);\n const maxVal = Math.max(0, ...runningValues);\n const ticks = niceTickValues(minVal, maxVal, 5);\n\n const domain: [number, number] = [Math.min(minVal, ticks[0]), Math.max(maxVal, ticks[ticks.length - 1])];\n const yScale = linearScale(domain, [plotH, 0]);\n\n const labels = data.map((d) => d.label);\n const xScale = bandScale(labels, plotW, 0.35);\n const bw = xScale.bandwidth;\n const xPositions = labels.map((l) => xScale(l));\n\n const segments = waterfallSegments(\n data.map((d) => d.value),\n data.map((d) => !!d.isTotal),\n yScale,\n xPositions,\n bw,\n );\n\n const fmt = (v: number) => formatAxisLabel(v, valueType, currency);\n const fmtLabel = (v: number) => formatDataLabel(v, valueType, currency);\n\n const segColors: Record<string, string> = {\n positive: colors.positive,\n negative: colors.negative,\n total: colors.total,\n };\n\n return (\n <svg\n width={width}\n height={height}\n viewBox={`0 0 ${width} ${height}`}\n aria-hidden=\"true\"\n style={{ display: 'block', overflow: 'visible' }}\n >\n <g transform={`translate(${PAD.left},${PAD.top})`}>\n\n {/* Grid lines + Y labels */}\n {ticks.map((tick) => {\n const y = yScale(tick);\n return (\n <g key={tick}>\n <line x1={0} y1={y} x2={plotW} y2={y} stroke={colors.grid} strokeWidth={1} />\n <text\n x={-8} y={y} textAnchor=\"end\" dominantBaseline=\"middle\"\n style={{ fontSize: 10, fontFamily: FONT_MONO, fill: colors.axisLabel }}\n >\n {fmt(tick)}\n </text>\n </g>\n );\n })}\n\n {/* Bars */}\n {segments.map((seg, i) => {\n const d = data[i];\n const barH = seg.yBottom - seg.yTop;\n const isNeg = d.value < 0;\n const color = segColors[seg.kind];\n const clipId = `wf-clip-${i}`;\n\n // For dashed connector to next segment\n const nextSeg = segments[i + 1];\n const connectorY = seg.kind === 'total' ? seg.yTop : (isNeg ? seg.yTop : seg.yTop);\n\n return (\n <g key={d.label}>\n <defs>\n <clipPath id={clipId}>\n <rect\n x={seg.x}\n y={isNeg || seg.kind === 'total' ? seg.yTop : seg.yTop - RADIUS}\n width={bw}\n height={barH + RADIUS + 1}\n rx={RADIUS}\n ry={RADIUS}\n />\n </clipPath>\n </defs>\n\n {/* Bar */}\n {barH > 0 && (\n <rect\n x={seg.x} y={seg.yTop}\n width={bw} height={barH}\n fill={color}\n clipPath={`url(#${clipId})`}\n />\n )}\n\n {/* Dashed connector to next bar */}\n {nextSeg && seg.connectorX !== undefined && (\n <line\n x1={seg.connectorX} y1={connectorY}\n x2={nextSeg.x} y2={connectorY}\n stroke={colors.grid}\n strokeWidth={1}\n strokeDasharray=\"3,3\"\n />\n )}\n\n {/* Data label */}\n {showDataLabels && (\n <text\n x={seg.x + bw / 2}\n y={isNeg ? seg.yBottom + 12 : seg.yTop - 4}\n textAnchor=\"middle\"\n style={{\n fontSize: isPdf ? 9 : 10,\n fontFamily: FONT_MONO,\n fontWeight: 600,\n fill: colors.text,\n }}\n >\n {d.value >= 0 ? '+' : ''}{fmtLabel(d.value)}\n </text>\n )}\n\n {/* X label */}\n <text\n x={seg.x + bw / 2}\n y={plotH + 16}\n textAnchor=\"middle\"\n style={{ fontSize: isPdf ? 9 : 10, fontFamily: FONT_SANS, fill: colors.axisLabel }}\n >\n {d.label}\n </text>\n </g>\n );\n })}\n </g>\n </svg>\n );\n}\n","import { useMemo } from 'react';\nimport { FONT_MONO, FONT_SANS, type DataPoint, type ChartConfig } from '../types';\nimport { linearScale, niceTickValues, domainWithZero } from '../utils/scales';\nimport { formatDataLabel, formatAxisLabel } from '../utils/format';\nimport { resolveChartColors } from '../utils/colorScheme';\n\n/**\n * HorizontalBarChart — Horizontal bars for category / breakdown comparisons.\n *\n * Features:\n * - Sorted descending by absolute value by default\n * - Positive bars: coral, Negative bars: red\n * - Category labels left-aligned, truncated at 140px\n * - Value labels to the right of each bar (Geist Mono)\n * - Thin bars with generous inter-bar spacing for readability\n * - Used for: Expense breakdown, Revenue by client/product\n */\nexport interface HorizontalBarChartProps {\n data: DataPoint[];\n config: ChartConfig;\n /** Sort bars by absolute value descending. Default true. */\n sorted?: boolean;\n}\n\nconst BAR_HEIGHT = 18;\nconst BAR_GAP = 10;\nconst LABEL_WIDTH = 140;\nconst VALUE_WIDTH = 60;\nconst RADIUS = 2;\n\nexport function HorizontalBarChart({ data, config, sorted = true }: HorizontalBarChartProps) {\n const {\n width,\n height: configHeight,\n valueType,\n currency = '$',\n renderMode = 'web',\n } = config;\n\n const colors = resolveChartColors(config);\n\n const isPdf = renderMode === 'pdf';\n\n const sortedData = useMemo(\n () => sorted\n ? [...data].sort((a, b) => Math.abs(b.value) - Math.abs(a.value))\n : data,\n [data, sorted],\n );\n\n // Derive height from data length if not provided sensibly\n const computedHeight = sortedData.length * (BAR_HEIGHT + BAR_GAP) + BAR_GAP + 8;\n const height = configHeight > 0 ? configHeight : computedHeight;\n\n const plotW = width - LABEL_WIDTH - VALUE_WIDTH - 24; // 24px left padding\n const allValues = sortedData.map((d) => d.value);\n const domain = domainWithZero(allValues);\n const xScale = linearScale(domain, [0, plotW]);\n const xZero = xScale(0);\n\n const fmt = (v: number) => formatDataLabel(v, valueType, currency);\n const axisFmt = (v: number) => formatAxisLabel(v, valueType, currency);\n\n const ticks = niceTickValues(domain[0], domain[1], 4);\n\n return (\n <svg\n width={width}\n height={height}\n viewBox={`0 0 ${width} ${height}`}\n aria-hidden=\"true\"\n style={{ display: 'block', overflow: 'visible' }}\n >\n <g transform={`translate(${LABEL_WIDTH + 12},4)`}>\n\n {/* Vertical grid lines from tick marks */}\n {ticks.map((tick) => {\n const x = xScale(tick);\n return (\n <g key={tick}>\n <line\n x1={x} y1={0}\n x2={x} y2={computedHeight - 8}\n stroke={colors.grid}\n strokeWidth={1}\n />\n <text\n x={x} y={computedHeight - 2}\n textAnchor=\"middle\"\n style={{ fontSize: 9, fontFamily: FONT_MONO, fill: colors.axisLabel }}\n >\n {axisFmt(tick)}\n </text>\n </g>\n );\n })}\n\n {/* Zero line */}\n {domain[0] < 0 && (\n <line x1={xZero} y1={0} x2={xZero} y2={computedHeight - 8} stroke={colors.axisLabel} strokeWidth={1} />\n )}\n\n {/* Bars */}\n {sortedData.map((d, i) => {\n const y = i * (BAR_HEIGHT + BAR_GAP) + BAR_GAP;\n const isNeg = d.value < 0;\n const barStart = isNeg ? xScale(d.value) : xZero;\n const barW = Math.abs(xScale(d.value) - xZero);\n const color = isNeg ? colors.negative : colors.primary;\n\n return (\n <g key={d.label}>\n {/* Category label (left of plot area) */}\n <text\n x={-8} y={y + BAR_HEIGHT / 2}\n textAnchor=\"end\"\n dominantBaseline=\"middle\"\n style={{\n fontSize: isPdf ? 9 : 10,\n fontFamily: FONT_SANS,\n fill: colors.text,\n }}\n >\n {d.label.length > 22 ? d.label.slice(0, 21) + '…' : d.label}\n </text>\n\n {/* Bar */}\n <rect\n x={barStart} y={y}\n width={Math.max(barW, 1)} height={BAR_HEIGHT}\n fill={color}\n rx={RADIUS} ry={RADIUS}\n />\n\n {/* Value label (right of bar) */}\n <text\n x={xScale(Math.max(0, d.value)) + 6}\n y={y + BAR_HEIGHT / 2}\n dominantBaseline=\"middle\"\n style={{\n fontSize: 10,\n fontFamily: FONT_MONO,\n fontWeight: 600,\n fill: colors.text,\n }}\n >\n {fmt(d.value)}\n </text>\n </g>\n );\n })}\n </g>\n </svg>\n );\n}\n","import { useMemo } from 'react';\nimport { FONT_MONO, FONT_SANS, type ChartConfig } from '../types';\nimport { formatDataLabel } from '../utils/format';\nimport { resolveChartColors } from '../utils/colorScheme';\n\n/**\n * DonutChart — SVG donut / ring chart for composition data.\n *\n * Features:\n * - Arc segments with 3° gap between them\n * - Center label: formatted total value (large Geist Mono) + name (small caps)\n * - Legend below: coloured dot + category label + value\n * - Up to 7 segments using DONUT_COLORS palette\n * - Used for: Revenue composition, Expense mix\n */\nexport interface DonutSegment {\n label: string;\n value: number;\n color?: string;\n}\n\nexport interface DonutChartProps {\n segments: DonutSegment[];\n config: ChartConfig;\n /** Label shown in center of donut (e.g. \"Total Revenue\") */\n centerLabel?: string;\n}\n\nconst GAP_DEGREES = 3;\n\nfunction polarToCartesian(cx: number, cy: number, r: number, angleDeg: number) {\n const angle = ((angleDeg - 90) * Math.PI) / 180;\n return {\n x: cx + r * Math.cos(angle),\n y: cy + r * Math.sin(angle),\n };\n}\n\nfunction arcPath(cx: number, cy: number, outerR: number, innerR: number, startDeg: number, endDeg: number) {\n const start = polarToCartesian(cx, cy, outerR, endDeg);\n const end = polarToCartesian(cx, cy, outerR, startDeg);\n const innerStart = polarToCartesian(cx, cy, innerR, endDeg);\n const innerEnd = polarToCartesian(cx, cy, innerR, startDeg);\n const largeArc = endDeg - startDeg > 180 ? 1 : 0;\n return [\n `M ${start.x},${start.y}`,\n `A ${outerR},${outerR} 0 ${largeArc},0 ${end.x},${end.y}`,\n `L ${innerEnd.x},${innerEnd.y}`,\n `A ${innerR},${innerR} 0 ${largeArc},1 ${innerStart.x},${innerStart.y}`,\n 'Z',\n ].join(' ');\n}\n\nexport function DonutChart({ segments, config, centerLabel }: DonutChartProps) {\n const {\n width,\n valueType,\n currency = '$',\n renderMode = 'web',\n } = config;\n\n const colors = resolveChartColors(config);\n const isPdf = renderMode === 'pdf';\n\n const total = useMemo(() => segments.reduce((sum, s) => sum + Math.abs(s.value), 0), [segments]);\n\n const legendHeight = Math.ceil(segments.length / 2) * 20 + 16;\n const donutSize = Math.min(width, 200);\n const height = donutSize + legendHeight;\n\n const cx = donutSize / 2;\n const cy = donutSize / 2;\n const outerR = donutSize / 2 - 8;\n const innerR = outerR * 0.62; // donut hole ~62% of outer radius\n\n // Build arc segments\n const arcs = useMemo(() => {\n let currentDeg = 0;\n const gapDeg = GAP_DEGREES;\n const availableDeg = 360 - segments.length * gapDeg;\n\n return segments.map((seg, i) => {\n const color = seg.color ?? colors.series[i % colors.series.length];\n const proportion = total > 0 ? Math.abs(seg.value) / total : 0;\n const sweepDeg = proportion * availableDeg;\n const startDeg = currentDeg;\n const endDeg = currentDeg + sweepDeg;\n currentDeg = endDeg + gapDeg;\n return { ...seg, startDeg, endDeg, color, proportion };\n });\n }, [segments, total]);\n\n const fmtCenter = (v: number) => formatDataLabel(v, valueType, currency);\n const fmtLegend = (v: number) => formatDataLabel(v, valueType, currency);\n\n return (\n <svg\n width={width}\n height={height}\n viewBox={`0 0 ${width} ${height}`}\n aria-hidden=\"true\"\n style={{ display: 'block' }}\n >\n {/* Donut arcs */}\n <g transform={`translate(${(width - donutSize) / 2}, 0)`}>\n {arcs.map((arc) => (\n <path\n key={arc.label}\n d={arcPath(cx, cy, outerR, innerR, arc.startDeg, arc.endDeg)}\n fill={arc.color}\n />\n ))}\n\n {/* Center label */}\n <text\n x={cx} y={cy - 6}\n textAnchor=\"middle\"\n style={{\n fontSize: 18,\n fontFamily: FONT_MONO,\n fontWeight: 300,\n fill: colors.text,\n }}\n >\n {fmtCenter(total)}\n </text>\n {centerLabel && (\n <text\n x={cx} y={cy + 14}\n textAnchor=\"middle\"\n style={{\n fontSize: 9,\n fontFamily: FONT_SANS,\n fontWeight: 700,\n textTransform: 'uppercase',\n letterSpacing: '0.08em',\n fill: colors.axisLabel,\n }}\n >\n {centerLabel}\n </text>\n )}\n </g>\n\n {/* Legend */}\n <g transform={`translate(12, ${donutSize + 8})`}>\n {arcs.map((arc, i) => {\n const col = i % 2;\n const row = Math.floor(i / 2);\n const x = col * (width / 2 - 6);\n const y = row * 20;\n return (\n <g key={arc.label} transform={`translate(${x}, ${y})`}>\n <circle cx={5} cy={6} r={5} fill={arc.color} />\n <text\n x={14} y={11}\n style={{ fontSize: isPdf ? 9 : 10, fontFamily: FONT_SANS, fill: colors.axisLabel }}\n >\n {arc.label.length > 18 ? arc.label.slice(0, 17) + '…' : arc.label}\n </text>\n <text\n x={width / 2 - 18} y={11}\n textAnchor=\"end\"\n style={{ fontSize: 10, fontFamily: FONT_MONO, fontWeight: 600, fill: colors.text }}\n >\n {fmtLegend(arc.value)}\n </text>\n </g>\n );\n })}\n </g>\n </svg>\n );\n}\n","import { useMemo } from 'react';\nimport { FONT_MONO, FONT_SANS, PAD, type DataPoint, type ChartConfig } from '../types';\nimport { linearScale, niceTickValues, domainWithZero } from '../utils/scales';\nimport { smoothLinePath, closeAreaPath } from '../utils/path';\nimport { formatAxisLabel } from '../utils/format';\nimport { resolveChartColors } from '../utils/colorScheme';\n\n/**\n * ForecastChart — Historical trend + forward projection in one chart.\n *\n * Features:\n * - Historical segment: solid 2px coral line + 8% area fill\n * - Forecast segment: dashed 1.5px coral line + 4% area fill\n * - Optional confidence band (upper/lower bounds): 5% opacity band\n * - Vertical dashed divider at the historical/forecast boundary\n * - \"FORECAST\" label rotated at the divider\n * - End dot on the last historical point\n * - Used for: Revenue forecast, Cash flow projection\n *\n * Mark forecast data points with `isForecast: true`.\n * The first point with isForecast=true defines the divider position.\n */\nexport interface ForecastChartProps {\n data: DataPoint[];\n config: ChartConfig;\n}\n\nexport function ForecastChart({ data, config }: ForecastChartProps) {\n const {\n width,\n height,\n valueType,\n currency = '$',\n renderMode = 'web',\n } = config;\n\n const colors = resolveChartColors(config);\n const isPdf = renderMode === 'pdf';\n const plotW = width - PAD.left - PAD.right;\n const plotH = height - PAD.top - PAD.bottom;\n\n // Separate historical and forecast data\n const forecastStartIdx = data.findIndex((d) => d.isForecast);\n const hasForecasts = forecastStartIdx !== -1;\n const historical = hasForecasts ? data.slice(0, forecastStartIdx) : data;\n const forecasts = hasForecasts ? data.slice(forecastStartIdx) : [];\n\n const allValues = useMemo(() => {\n const vals = data.map((d) => d.value);\n data.forEach((d) => {\n if (d.upperBound !== undefined) vals.push(d.upperBound);\n if (d.lowerBound !== undefined) vals.push(d.lowerBound);\n });\n return vals;\n }, [data]);\n\n const domain = domainWithZero(allValues);\n const yScale = linearScale(domain, [plotH, 0]);\n const yZero = yScale(0);\n const ticks = niceTickValues(domain[0], domain[1], 5);\n\n const xStep = data.length > 1 ? plotW / (data.length - 1) : 0;\n const xOf = (i: number) => i * xStep;\n\n const histPoints: [number, number][] = historical.map((d, i) => [xOf(i), yScale(d.value)]);\n const forecastPoints: [number, number][] = forecasts.map((d, i) => [\n xOf(forecastStartIdx + i),\n yScale(d.value),\n ]);\n\n // Join line: last historical point + all forecast points (for smooth transition)\n const joinPoints: [number, number][] = histPoints.length\n ? [histPoints[histPoints.length - 1], ...forecastPoints]\n : forecastPoints;\n\n const histLinePath = smoothLinePath(histPoints);\n const histAreaPath = closeAreaPath(histLinePath, histPoints, yZero);\n\n const forecastLinePath = smoothLinePath(joinPoints);\n const forecastAreaPath = closeAreaPath(forecastLinePath, joinPoints, yZero);\n\n // Confidence band\n const hasBands = forecasts.some((d) => d.upperBound !== undefined && d.lowerBound !== undefined);\n const bandPoints: { upper: [number, number]; lower: [number, number] }[] = hasBands\n ? forecasts.map((d, i) => ({\n upper: [xOf(forecastStartIdx + i), yScale(d.upperBound ?? d.value)] as [number, number],\n lower: [xOf(forecastStartIdx + i), yScale(d.lowerBound ?? d.value)] as [number, number],\n }))\n : [];\n\n let bandPath = '';\n if (bandPoints.length > 0) {\n const upperPath = smoothLinePath(bandPoints.map((p) => p.upper));\n const lowerReversed = [...bandPoints].reverse().map((p) => p.lower);\n const lowerPath = lowerReversed.map((p, i) => `${i === 0 ? 'L' : 'L'} ${p[0]},${p[1]}`).join(' ');\n bandPath = `${upperPath} ${lowerPath} Z`;\n }\n\n const dividerX = hasForecasts ? xOf(forecastStartIdx) : null;\n const lastHistPt = histPoints[histPoints.length - 1];\n const fmt = (v: number) => formatAxisLabel(v, valueType, currency);\n\n return (\n <svg\n width={width}\n height={height}\n viewBox={`0 0 ${width} ${height}`}\n aria-hidden=\"true\"\n style={{ display: 'block', overflow: 'visible' }}\n >\n <g transform={`translate(${PAD.left},${PAD.top})`}>\n\n {/* Grid lines + Y labels */}\n {ticks.map((tick) => {\n const y = yScale(tick);\n return (\n <g key={tick}>\n <line x1={0} y1={y} x2={plotW} y2={y} stroke={colors.grid} strokeWidth={1} />\n <text\n x={-8} y={y} textAnchor=\"end\" dominantBaseline=\"middle\"\n style={{ fontSize: 10, fontFamily: FONT_MONO, fill: colors.axisLabel }}\n >\n {fmt(tick)}\n </text>\n </g>\n );\n })}\n\n {/* Confidence band */}\n {hasBands && bandPath && (\n <path d={bandPath} fill={colors.forecastBand} stroke=\"none\" />\n )}\n\n {/* Historical area */}\n {histPoints.length > 1 && (\n <path d={histAreaPath} fill={colors.areaFill} stroke=\"none\" />\n )}\n\n {/* Historical line */}\n {histPoints.length > 1 && (\n <path\n d={histLinePath}\n fill=\"none\"\n stroke={colors.primary}\n strokeWidth={2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n )}\n\n {/* Forecast area */}\n {forecastPoints.length > 0 && (\n <path d={forecastAreaPath} fill={colors.forecastFill} stroke=\"none\" />\n )}\n\n {/* Forecast line (dashed) */}\n {forecastPoints.length > 0 && (\n <path\n d={forecastLinePath}\n fill=\"none\"\n stroke={colors.primary}\n strokeWidth={1.5}\n strokeDasharray=\"5,4\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n )}\n\n {/* End dot on last historical point */}\n {lastHistPt && (\n <circle\n cx={lastHistPt[0]} cy={lastHistPt[1]} r={4}\n fill={colors.primary} stroke=\"#fff\" strokeWidth={1.5}\n />\n )}\n\n {/* Divider line at historical/forecast boundary */}\n {dividerX !== null && (\n <line\n x1={dividerX} y1={0}\n x2={dividerX} y2={plotH}\n stroke={colors.grid}\n strokeWidth={1}\n strokeDasharray=\"3,3\"\n />\n )}\n\n {/* \"FORECAST\" label at divider */}\n {dividerX !== null && (\n <text\n x={dividerX + 5}\n y={plotH * 0.2}\n style={{\n fontSize: isPdf ? 8 : 9,\n fontFamily: FONT_SANS,\n fontWeight: 700,\n textTransform: 'uppercase',\n letterSpacing: '0.08em',\n fill: colors.axisLabel,\n }}\n >\n FORECAST\n </text>\n )}\n\n {/* X-axis labels — show every other label if crowded */}\n {data.map((d, i) => {\n const skip = data.length > 14 && i % 2 !== 0;\n if (skip) return null;\n return (\n <text\n key={d.label}\n x={xOf(i)} y={plotH + 16}\n textAnchor=\"middle\"\n style={{ fontSize: isPdf ? 9 : 10, fontFamily: FONT_SANS, fill: colors.axisLabel }}\n >\n {d.label}\n </text>\n );\n })}\n </g>\n </svg>\n );\n}\n","import { useMemo } from 'react';\nimport { FONT_MONO, FONT_SANS, type ChartConfig } from '../types';\nimport { formatAxisLabel } from '../utils/format';\nimport { resolveChartColors } from '../utils/colorScheme';\n\n/**\n * FunnelChart — stage-by-stage funnel for conversion analytics.\n *\n * Use cases: sales pipeline stage flow, lead qualification funnel, onboarding\n * drop-off. Classic tapering silhouette centred on the vertical axis, one\n * trapezoid per stage. Stage labels render on the left, value + conversion\n * rate to next stage on the right.\n */\n\nexport interface FunnelStage {\n /** Stage name e.g. \"Discovery\", \"Qualified\" */\n label: string;\n /** Primary metric — drives the trapezoid width */\n value: number;\n /** Optional count label rendered alongside value */\n count?: number;\n}\n\nexport interface FunnelChartProps {\n data: FunnelStage[];\n config: ChartConfig;\n /**\n * Width of the left label gutter, in px. Default 130.\n * Increase for long stage names.\n */\n labelGutter?: number;\n}\n\nconst ROW_GAP = 6;\nconst CONNECTOR_HEIGHT = 12;\n\nexport function FunnelChart({ data, config, labelGutter = 130 }: FunnelChartProps) {\n const {\n width,\n height,\n valueType,\n currency = '$',\n } = config;\n\n const colors = resolveChartColors(config);\n\n const max = useMemo(() => Math.max(...data.map((s) => s.value), 1), [data]);\n\n // Reserve 110 px on the right for metric readouts.\n const readoutGutter = 110;\n const funnelWidth = Math.max(80, width - labelGutter - readoutGutter);\n const stageCount = data.length;\n\n // Each row = stage body (bar) + connector tapering to next stage. Final\n // stage has no connector.\n const rowTotal = (height - 20) / stageCount;\n const bodyHeight = Math.max(18, rowTotal - CONNECTOR_HEIGHT - ROW_GAP);\n\n const centerX = labelGutter + funnelWidth / 2;\n\n // Pre-compute each stage's bar width + top position.\n const stages = data.map((s, i) => {\n const w = (s.value / max) * funnelWidth;\n const y = 10 + i * rowTotal;\n return { ...s, width: w, y };\n });\n\n return (\n <svg width={width} height={height} style={{ fontFamily: FONT_SANS }} role=\"img\">\n {stages.map((s, i) => {\n const x = centerX - s.width / 2;\n const conversion = i > 0 ? (s.value / stages[i - 1].value) * 100 : null;\n const valueLabel = formatAxisLabel(s.value, valueType, currency, true);\n const next = stages[i + 1];\n\n return (\n <g key={s.label}>\n {/* Stage label — left */}\n <text\n x={labelGutter - 10}\n y={s.y + bodyHeight / 2}\n textAnchor=\"end\"\n dominantBaseline=\"central\"\n fontSize={12}\n fill={colors.text}\n fontWeight={500}\n >\n {s.label}\n </text>\n\n {/* Conversion % — small label above stage bar, except first */}\n {conversion !== null && (\n <text\n x={centerX}\n y={s.y - 4}\n textAnchor=\"middle\"\n fontSize={10}\n fontFamily={FONT_MONO}\n fill={colors.axisLabel}\n >\n {conversion.toFixed(0)}% ↓\n </text>\n )}\n\n {/* Stage body */}\n <rect\n x={x}\n y={s.y}\n width={s.width}\n height={bodyHeight}\n rx={3}\n fill={colors.primary}\n opacity={0.85 - i * 0.08}\n />\n\n {/* Tapering connector to next stage */}\n {next && (\n <path\n d={(() => {\n const tlx = x;\n const trx = x + s.width;\n const nextX = centerX - next.width / 2;\n const nextRight = centerX + next.width / 2;\n const top = s.y + bodyHeight;\n const bot = top + CONNECTOR_HEIGHT;\n return `M${tlx},${top} L${trx},${top} L${nextRight},${bot} L${nextX},${bot} Z`;\n })()}\n fill={colors.primary}\n opacity={0.15}\n />\n )}\n\n {/* Metric readout — right */}\n <text\n x={labelGutter + funnelWidth + 10}\n y={s.y + bodyHeight / 2 - 6}\n fontSize={12}\n fontFamily={FONT_MONO}\n fill={colors.text}\n fontWeight={500}\n >\n {valueLabel}\n </text>\n {s.count !== undefined && (\n <text\n x={labelGutter + funnelWidth + 10}\n y={s.y + bodyHeight / 2 + 8}\n fontSize={10}\n fill={colors.axisLabel}\n >\n {s.count.toLocaleString('en')} {s.count === 1 ? 'deal' : 'deals'}\n </text>\n )}\n </g>\n );\n })}\n </svg>\n );\n}\n","import { FONT_MONO, FONT_SANS, type ChartConfig } from '../types';\nimport { formatAxisLabel } from '../utils/format';\nimport { resolveChartColors } from '../utils/colorScheme';\n\n/**\n * BulletChart — Stephen Few's bullet graph.\n *\n * Each row shows an actual value vs a target, on top of qualitative bands\n * (poor / ok / good) that give context for whether the number is healthy.\n * Ideal for rep attainment against quota, coverage ratio against target,\n * forecast accuracy against healthy bands.\n */\n\nexport interface BulletRow {\n label: string;\n /** Actual realised value */\n actual: number;\n /** Target / goal value (vertical tick) */\n target: number;\n /**\n * Three qualitative thresholds [poorMax, okMax, goodMax]. Values below\n * poorMax are rendered on the lightest band, between poorMax and okMax on\n * the mid band, between okMax and goodMax on the darkest band. Defaults to\n * [60%, 100%, 130%] of target.\n */\n bands?: [number, number, number];\n}\n\nexport interface BulletChartProps {\n data: BulletRow[];\n config: ChartConfig;\n /** Width of the left label gutter in px. Default 140. */\n labelGutter?: number;\n /** Width of the right value readout in px. Default 120. */\n readoutGutter?: number;\n}\n\nconst ROW_HEIGHT = 34;\nconst BAR_HEIGHT = 12;\n\nexport function BulletChart({\n data,\n config,\n labelGutter = 140,\n readoutGutter = 120,\n}: BulletChartProps) {\n const {\n width,\n valueType,\n currency = '$',\n } = config;\n\n const colors = resolveChartColors(config);\n\n const trackX = labelGutter;\n const trackW = Math.max(80, width - labelGutter - readoutGutter);\n\n return (\n <svg\n width={width}\n height={Math.max(config.height, data.length * ROW_HEIGHT + 16)}\n style={{ fontFamily: FONT_SANS }}\n role=\"img\"\n >\n {data.map((row, i) => {\n const bands = row.bands ?? [row.target * 0.6, row.target, row.target * 1.3];\n const trackMax = Math.max(bands[2], row.actual, row.target) * 1.02;\n const scale = (v: number) => (Math.max(0, Math.min(v, trackMax)) / trackMax) * trackW;\n\n const y = 12 + i * ROW_HEIGHT;\n const barY = y + (ROW_HEIGHT - BAR_HEIGHT) / 2;\n\n const poorW = scale(bands[0]);\n const okW = scale(bands[1]);\n const goodW = scale(bands[2]);\n const actualW = scale(row.actual);\n const targetX = trackX + scale(row.target);\n\n return (\n <g key={row.label}>\n {/* Row label */}\n <text\n x={labelGutter - 10}\n y={y + ROW_HEIGHT / 2}\n textAnchor=\"end\"\n dominantBaseline=\"central\"\n fontSize={12}\n fill={colors.text}\n fontWeight={500}\n >\n {row.label}\n </text>\n\n {/* Qualitative bands (poor → ok → good), greyscale for neutrality */}\n <rect x={trackX} y={barY - 6} width={goodW} height={BAR_HEIGHT + 12} fill=\"#d4d8e3\" rx={2} />\n <rect x={trackX} y={barY - 6} width={okW} height={BAR_HEIGHT + 12} fill=\"#e5e7f0\" rx={2} />\n <rect x={trackX} y={barY - 6} width={poorW} height={BAR_HEIGHT + 12} fill=\"#f0f1f7\" rx={2} />\n\n {/* Actual bar */}\n <rect\n x={trackX}\n y={barY}\n width={actualW}\n height={BAR_HEIGHT}\n fill={row.actual >= row.target ? colors.positive : colors.primary}\n rx={2}\n />\n\n {/* Target marker */}\n <line\n x1={targetX}\n x2={targetX}\n y1={barY - 6}\n y2={barY + BAR_HEIGHT + 6}\n stroke={colors.total}\n strokeWidth={2}\n />\n\n {/* Right-hand readout: actual / target */}\n <text\n x={width - 10}\n y={y + ROW_HEIGHT / 2 - 6}\n textAnchor=\"end\"\n fontSize={12}\n fontFamily={FONT_MONO}\n fill={colors.text}\n fontWeight={500}\n >\n {formatAxisLabel(row.actual, valueType, currency, true)}\n </text>\n <text\n x={width - 10}\n y={y + ROW_HEIGHT / 2 + 8}\n textAnchor=\"end\"\n fontSize={10}\n fontFamily={FONT_MONO}\n fill={colors.axisLabel}\n >\n / {formatAxisLabel(row.target, valueType, currency, true)}\n </text>\n </g>\n );\n })}\n </svg>\n );\n}\n","import { useMemo } from 'react';\nimport { FONT_MONO, FONT_SANS, type ChartConfig } from '../types';\nimport { formatAxisLabel } from '../utils/format';\nimport { resolveChartColors } from '../utils/colorScheme';\n\n/**\n * HeatMap — 2D grid of values coloured by intensity.\n *\n * Use cases: deals by stage × age-bucket (stagnation), activity by rep\n * × weekday, win rate by segment × deal size. Cells colour-scaled across\n * the full value range with optional cell-value labels overlaid.\n */\n\nexport interface HeatMapProps {\n /** Row labels (y-axis, top-to-bottom) */\n rows: string[];\n /** Column labels (x-axis, left-to-right) */\n cols: string[];\n /** values[rowIdx][colIdx]. Must match rows.length × cols.length. */\n values: number[][];\n config: ChartConfig;\n /** Width of the left label gutter. Default 110. */\n labelGutter?: number;\n /** Height of the top label row. Default 28. */\n topGutter?: number;\n}\n\n/** Interpolate between two hex colors. t in [0,1]. */\nfunction mix(lo: string, hi: string, t: number): string {\n const parse = (h: string) => [\n parseInt(h.slice(1, 3), 16),\n parseInt(h.slice(3, 5), 16),\n parseInt(h.slice(5, 7), 16),\n ];\n const a = parse(lo);\n const b = parse(hi);\n const out = a.map((v, i) => Math.round(v + (b[i] - v) * t));\n return '#' + out.map((v) => v.toString(16).padStart(2, '0')).join('');\n}\n\nexport function HeatMap({\n rows,\n cols,\n values,\n config,\n labelGutter = 110,\n topGutter = 28,\n}: HeatMapProps) {\n const {\n width,\n height,\n valueType,\n currency = '$',\n showDataLabels = true,\n } = config;\n\n const colors = resolveChartColors(config);\n\n const { min, max } = useMemo(() => {\n let mn = Infinity;\n let mx = -Infinity;\n for (const row of values) {\n for (const v of row) {\n if (v < mn) mn = v;\n if (v > mx) mx = v;\n }\n }\n if (!isFinite(mn)) { mn = 0; mx = 1; }\n if (mn === mx) mx = mn + 1;\n return { min: mn, max: mx };\n }, [values]);\n\n const cellW = (width - labelGutter - 8) / cols.length;\n const cellH = (height - topGutter - 8) / rows.length;\n\n // Low = near-white, high = full primary colour.\n const lo = '#ffffff';\n const hi = colors.primary;\n\n return (\n <svg width={width} height={height} style={{ fontFamily: FONT_SANS }} role=\"img\">\n {/* Top column labels */}\n {cols.map((c, ci) => (\n <text\n key={`col-${c}`}\n x={labelGutter + ci * cellW + cellW / 2}\n y={topGutter - 8}\n textAnchor=\"middle\"\n fontSize={10}\n fontWeight={600}\n fill={colors.axisLabel}\n style={{ letterSpacing: '0.05em', textTransform: 'uppercase' }}\n >\n {c}\n </text>\n ))}\n\n {/* Rows */}\n {rows.map((r, ri) => (\n <g key={`row-${r}`}>\n <text\n x={labelGutter - 8}\n y={topGutter + ri * cellH + cellH / 2}\n textAnchor=\"end\"\n dominantBaseline=\"central\"\n fontSize={11}\n fill={colors.text}\n fontWeight={500}\n >\n {r}\n </text>\n {cols.map((_, ci) => {\n const v = values[ri]?.[ci] ?? 0;\n const t = (v - min) / (max - min);\n const fill = mix(lo, hi, Math.max(0, Math.min(1, t)));\n const x = labelGutter + ci * cellW + 1;\n const y = topGutter + ri * cellH + 1;\n const w = cellW - 2;\n const h = cellH - 2;\n return (\n <g key={`c-${ri}-${ci}`}>\n <rect x={x} y={y} width={w} height={h} rx={2} fill={fill} stroke={colors.grid} />\n {showDataLabels && (\n <text\n x={x + w / 2}\n y={y + h / 2}\n textAnchor=\"middle\"\n dominantBaseline=\"central\"\n fontSize={10}\n fontFamily={FONT_MONO}\n fill={t > 0.55 ? '#fff' : colors.text}\n >\n {formatAxisLabel(v, valueType, currency, true)}\n </text>\n )}\n </g>\n );\n })}\n </g>\n ))}\n </svg>\n );\n}\n","import type { RenderMode } from '@/types/renderMode';\n\n/**\n * CoverPage — Full A4 branded cover for management reports.\n *\n * Layout:\n * - White left panel (~55%): logo top-left, entity name H1, report title, period,\n * \"Prepared by {firm}\" bottom-left\n * - Right panel: hero image/illustration with curved SVG mask + 6px accent stripe\n * along the join\n *\n * Hero styles:\n * - \"curves\" — Abstract curved shapes in coral + navy (default)\n * - \"marina\" — Minimal nautical horizon motif in navy/coral\n * - \"leaves\" — Botanical green shapes\n * - \"abstract\" — Geometric triangles / planes in navy + coral\n *\n * No interactive elements — designed for PDF output.\n * Wrap in <ReportPage size=\"A4\"> when building a full report.\n */\n\nexport type HeroStyle = 'curves' | 'marina' | 'leaves' | 'abstract';\n\nexport interface CoverPageConfig {\n entityName: string;\n reportTitle?: string;\n period: string;\n preparedBy?: string;\n logoUrl?: string | null;\n heroStyle?: HeroStyle;\n accentColor?: string;\n publishedDate?: string | null;\n}\n\nexport interface CoverPageProps {\n config: CoverPageConfig;\n renderMode?: RenderMode;\n /** Fixed height in px for PDF sizing. Defaults to 1122 (A4 @96dpi). */\n height?: number;\n /** Fixed width in px for PDF sizing. Defaults to 794 (A4 @96dpi). */\n width?: number;\n}\n\n// ─── Hero illustrations (inline SVG) ─────────────────────────────────────────\n\nfunction HeroCurves({ accent, width, height }: { accent: string; width: number; height: number }) {\n return (\n <svg viewBox={`0 0 ${width} ${height}`} width={width} height={height} xmlns=\"http://www.w3.org/2000/svg\" preserveAspectRatio=\"xMidYMid slice\">\n <rect width={width} height={height} fill=\"#000626\" />\n {/* Large curved shape — bottom right */}\n <ellipse cx={width * 0.8} cy={height * 0.85} rx={width * 0.7} ry={height * 0.55} fill={accent} opacity=\"0.18\" />\n {/* Mid curve — upper left */}\n <ellipse cx={width * 0.15} cy={height * 0.25} rx={width * 0.55} ry={height * 0.4} fill={accent} opacity=\"0.12\" />\n {/* Bright accent arc */}\n <path\n d={`M ${width * 0.4},0 Q ${width * 1.1},${height * 0.3} ${width * 0.6},${height}`}\n fill=\"none\"\n stroke={accent}\n strokeWidth={width * 0.025}\n opacity=\"0.4\"\n strokeLinecap=\"round\"\n />\n {/* Small circle accent */}\n <circle cx={width * 0.78} cy={height * 0.22} r={width * 0.08} fill={accent} opacity=\"0.25\" />\n <circle cx={width * 0.6} cy={height * 0.55} r={width * 0.04} fill={accent} opacity=\"0.5\" />\n </svg>\n );\n}\n\nfunction HeroMarina({ accent, width, height }: { accent: string; width: number; height: number }) {\n return (\n <svg viewBox={`0 0 ${width} ${height}`} width={width} height={height} xmlns=\"http://www.w3.org/2000/svg\" preserveAspectRatio=\"xMidYMid slice\">\n <rect width={width} height={height} fill=\"#000626\" />\n {/* Horizon */}\n <rect x={0} y={height * 0.6} width={width} height={height * 0.4} fill=\"#01082f\" />\n {/* Sun/moon */}\n <circle cx={width * 0.55} cy={height * 0.38} r={width * 0.14} fill={accent} opacity=\"0.9\" />\n {/* Reflection */}\n <rect x={width * 0.4} y={height * 0.61} width={width * 0.3} height={height * 0.12} fill={accent} opacity=\"0.15\" />\n {/* Mast lines */}\n <line x1={width * 0.3} y1={height * 0.6} x2={width * 0.32} y2={height * 0.3} stroke=\"#fff\" strokeWidth={1.5} opacity=\"0.4\" />\n <line x1={width * 0.7} y1={height * 0.6} x2={width * 0.68} y2={height * 0.2} stroke=\"#fff\" strokeWidth={1.5} opacity=\"0.4\" />\n {/* Horizon grid lines */}\n {[0.65, 0.72, 0.8, 0.9].map((y, i) => (\n <line key={i} x1={0} y1={height * y} x2={width} y2={height * y} stroke=\"#fff\" strokeWidth={0.5} opacity={0.06} />\n ))}\n </svg>\n );\n}\n\nfunction HeroLeaves({ accent, width, height }: { accent: string; width: number; height: number }) {\n return (\n <svg viewBox={`0 0 ${width} ${height}`} width={width} height={height} xmlns=\"http://www.w3.org/2000/svg\" preserveAspectRatio=\"xMidYMid slice\">\n <rect width={width} height={height} fill=\"#01240e\" />\n {/* Large leaf 1 */}\n <path\n d={`M ${width * 0.5},${height * 0.1} C ${width * 1.2},${height * 0.1} ${width * 1.0},${height * 0.9} ${width * 0.5},${height * 0.95} C ${width * 0.0},${height * 0.9} ${width * -0.2},${height * 0.1} ${width * 0.5},${height * 0.1}Z`}\n fill=\"#71d481\"\n opacity=\"0.18\"\n />\n {/* Large leaf 2 */}\n <path\n d={`M ${width * 0.8},${height * -0.05} C ${width * 1.5},${height * 0.3} ${width * 0.9},${height * 0.8} ${width * 0.4},${height * 0.9} C ${width * 0.0},${height * 0.6} ${width * 0.2},${height * -0.1} ${width * 0.8},${height * -0.05}Z`}\n fill=\"#71d481\"\n opacity=\"0.14\"\n />\n {/* Accent detail */}\n <circle cx={width * 0.5} cy={height * 0.5} r={width * 0.03} fill={accent} opacity=\"0.7\" />\n <line x1={width * 0.5} y1={height * 0.1} x2={width * 0.5} y2={height * 0.95} stroke=\"#71d481\" strokeWidth={1.5} opacity=\"0.3\" />\n </svg>\n );\n}\n\nfunction HeroAbstract({ accent, width, height }: { accent: string; width: number; height: number }) {\n return (\n <svg viewBox={`0 0 ${width} ${height}`} width={width} height={height} xmlns=\"http://www.w3.org/2000/svg\" preserveAspectRatio=\"xMidYMid slice\">\n <rect width={width} height={height} fill=\"#000626\" />\n {/* Large triangle */}\n <polygon\n points={`${width * 0.0},${height * 1.0} ${width * 1.0},${height * 0.0} ${width * 1.0},${height * 1.0}`}\n fill={accent}\n opacity=\"0.15\"\n />\n {/* Diagonal stripe */}\n <polygon\n points={`${width * 0.2},${height * 0.0} ${width * 0.6},${height * 0.0} ${width * 0.0},${height * 0.7} ${width * 0.0},${height * 0.3}`}\n fill=\"#fff\"\n opacity=\"0.04\"\n />\n {/* Accent triangle */}\n <polygon\n points={`${width * 0.5},${height * 0.0} ${width * 1.0},${height * 0.4} ${width * 0.5},${height * 0.5}`}\n fill={accent}\n opacity=\"0.25\"\n />\n {/* Grid of dots */}\n {[0.3, 0.5, 0.7, 0.9].map((y) =>\n [0.2, 0.5, 0.8].map((x) => (\n <circle key={`${x}-${y}`} cx={width * x} cy={height * y} r={2} fill=\"#fff\" opacity=\"0.12\" />\n )),\n )}\n </svg>\n );\n}\n\nfunction HeroIllustration({ style, accent, width, height }: {\n style: HeroStyle;\n accent: string;\n width: number;\n height: number;\n}) {\n switch (style) {\n case 'marina': return <HeroMarina accent={accent} width={width} height={height} />;\n case 'leaves': return <HeroLeaves accent={accent} width={width} height={height} />;\n case 'abstract': return <HeroAbstract accent={accent} width={width} height={height} />;\n default: return <HeroCurves accent={accent} width={width} height={height} />;\n }\n}\n\n// ─── Component ────────────────────────────────────────────────────────────────\n\nexport function CoverPage({\n config,\n renderMode = 'pdf',\n width = 794,\n height = 1122,\n}: CoverPageProps) {\n const {\n entityName,\n reportTitle = 'Monthly Management Report',\n period,\n preparedBy,\n logoUrl,\n heroStyle = 'curves',\n accentColor = '#e15713',\n publishedDate,\n } = config;\n\n const isPdf = renderMode === 'pdf';\n const leftW = Math.round(width * 0.52);\n const rightW = width - leftW;\n const accentStripW = 6;\n\n return (\n <div\n style={{\n width,\n height,\n display: 'flex',\n flexDirection: 'row',\n overflow: 'hidden',\n fontFamily: \"'Geist', system-ui, sans-serif\",\n backgroundColor: '#fff',\n position: 'relative',\n }}\n >\n {/* Left white panel */}\n <div\n style={{\n width: leftW,\n height,\n display: 'flex',\n flexDirection: 'column',\n padding: isPdf ? '44px 36px 44px 44px' : '56px 48px 56px 56px',\n boxSizing: 'border-box',\n position: 'relative',\n zIndex: 1,\n backgroundColor: '#fff',\n }}\n >\n {/* Logo or wordmark */}\n <div style={{ marginBottom: 'auto' }}>\n {logoUrl ? (\n <img\n src={logoUrl}\n alt={entityName}\n style={{ maxHeight: isPdf ? 36 : 44, maxWidth: leftW * 0.55, objectFit: 'contain' }}\n />\n ) : (\n <div\n style={{\n fontSize: isPdf ? 14 : 16,\n fontWeight: 700,\n letterSpacing: '0.04em',\n textTransform: 'uppercase',\n color: '#000626',\n }}\n >\n {entityName}\n </div>\n )}\n </div>\n\n {/* Main title block — vertically centred */}\n <div style={{ marginTop: 'auto', marginBottom: 'auto' }}>\n {/* Accent bar */}\n <div\n style={{\n width: 36,\n height: 4,\n borderRadius: 2,\n backgroundColor: accentColor,\n marginBottom: isPdf ? 18 : 24,\n }}\n />\n\n <h1\n style={{\n margin: '0 0 10px 0',\n fontSize: isPdf ? 26 : 32,\n fontWeight: 500,\n color: '#000626',\n lineHeight: 1.15,\n }}\n >\n {entityName}\n </h1>\n\n <div\n style={{\n fontSize: isPdf ? 14 : 17,\n fontWeight: 400,\n color: '#595f7a',\n marginBottom: isPdf ? 6 : 8,\n }}\n >\n {reportTitle}\n </div>\n\n <div\n style={{\n fontSize: isPdf ? 13 : 15,\n fontWeight: 400,\n color: '#8c92af',\n }}\n >\n {period}\n </div>\n </div>\n\n {/* Footer */}\n <div style={{ marginTop: 'auto', paddingTop: 24 }}>\n {preparedBy && (\n <div\n style={{\n fontSize: isPdf ? 8 : 10,\n fontWeight: 700,\n textTransform: 'uppercase',\n letterSpacing: '0.10em',\n color: '#8c92af',\n marginBottom: 4,\n }}\n >\n Prepared by\n </div>\n )}\n {preparedBy && (\n <div style={{ fontSize: isPdf ? 10 : 12, color: '#595f7a' }}>\n {preparedBy}\n </div>\n )}\n {publishedDate && (\n <div\n style={{\n fontSize: isPdf ? 9 : 10,\n color: '#c8cce0',\n marginTop: 4,\n }}\n >\n {publishedDate}\n </div>\n )}\n </div>\n </div>\n\n {/* Accent stripe between panels */}\n <div\n style={{\n width: accentStripW,\n height,\n backgroundColor: accentColor,\n flexShrink: 0,\n }}\n />\n\n {/* Right hero panel */}\n <div\n style={{\n flex: 1,\n height,\n overflow: 'hidden',\n position: 'relative',\n }}\n >\n <HeroIllustration\n style={heroStyle}\n accent={accentColor}\n width={rightW - accentStripW}\n height={height}\n />\n </div>\n </div>\n );\n}\n","import React from 'react';\nimport type { RenderMode } from '@/types/renderMode';\n\n/**\n * KpiResultsTable — Fathom-style KPI results grouped by category.\n *\n * Features:\n * - Category header rows: coloured letter badge (navy pill) + bold uppercase name\n * - Columns: METRIC | RESULT | TARGET | ✓/× | TREND | IMPORTANCE\n * - Target met: ✓ green / × red icon\n * - Trend: coloured ▲▼ + value + period label\n * - Importance: colour-coded text badge\n * - lower_is_better rows: footnote * marker + bottom footnote\n * - page-break-inside: avoid per category group\n */\n\nexport interface KpiResultRow {\n category: string; // \"PROFITABILITY\"\n categoryLetter: string; // \"A\"\n categoryColor: string; // hex\n label: string; // \"Gross Profit Margin\"\n result: string; // \"49.69%\" (pre-formatted)\n target?: string | null; // \"45%\" — null/undefined = no target column value\n targetMet?: boolean | null; // true=✓ false=× null=no indicator\n trendDirection: 'up' | 'down' | 'flat';\n trendValue: string; // \"-0.37%\"\n trendPeriod: string; // \"vs DEC 2024\"\n importance: 'Critical' | 'High' | 'Medium' | 'Low';\n lowerIsBetter?: boolean;\n footnoteMarker?: string; // \"*\"\n}\n\nexport interface KpiResultsTableProps {\n rows: KpiResultRow[];\n renderMode?: RenderMode;\n}\n\nconst IMPORTANCE_COLORS: Record<string, string> = {\n Critical: '#000626',\n High: '#e15713',\n Medium: '#8c92af',\n Low: '#c8cce0',\n};\n\nconst TREND_COLORS = {\n up: '#71d481',\n down: '#fb6060',\n flat: '#8c92af',\n};\n\nconst TREND_ARROWS = {\n up: '▲',\n down: '▼',\n flat: '—',\n};\n\nfunction TargetIcon({ met }: { met: boolean | null | undefined }) {\n if (met === null || met === undefined) return null;\n return (\n <span style={{ color: met ? '#71d481' : '#fb6060', fontWeight: 700, fontSize: 12 }}>\n {met ? '✓' : '×'}\n </span>\n );\n}\n\nexport function KpiResultsTable({ rows, renderMode = 'web' }: KpiResultsTableProps) {\n const isPdf = renderMode === 'pdf';\n const fs = isPdf ? 9 : 11;\n const headerFs = isPdf ? 8 : 10;\n\n // Group rows by category\n const groups = rows.reduce<Map<string, KpiResultRow[]>>((acc, row) => {\n const key = `${row.categoryLetter}:${row.category}`;\n if (!acc.has(key)) acc.set(key, []);\n acc.get(key)!.push(row);\n return acc;\n }, new Map());\n\n const hasTarget = rows.some((r) => r.target !== null && r.target !== undefined);\n const footnoteRows = rows.filter((r) => r.lowerIsBetter && r.footnoteMarker);\n\n const cellPad = isPdf ? '5px 8px' : '7px 10px';\n\n return (\n <div style={{ fontFamily: \"'Geist', system-ui, sans-serif\", breakInside: 'avoid', pageBreakInside: 'avoid' }}>\n <table\n style={{\n width: '100%',\n borderCollapse: 'collapse',\n tableLayout: 'fixed',\n }}\n >\n <colgroup>\n <col style={{ width: '28%' }} />\n <col style={{ width: '14%' }} />\n {hasTarget && <col style={{ width: '12%' }} />}\n {hasTarget && <col style={{ width: '6%' }} />}\n <col style={{ width: hasTarget ? '24%' : '36%' }} />\n <col style={{ width: '16%' }} />\n </colgroup>\n\n {/* Column headers */}\n <thead>\n <tr style={{ borderBottom: '2px solid #e5e7f0' }}>\n {['METRIC', 'RESULT', ...(hasTarget ? ['TARGET', ''] : []), 'TREND', 'IMPORTANCE'].map((h) => (\n <th\n key={h}\n style={{\n padding: cellPad,\n fontSize: headerFs,\n fontWeight: 700,\n textTransform: 'uppercase',\n letterSpacing: '0.08em',\n color: '#8c92af',\n textAlign: h === 'RESULT' || h === 'TARGET' ? 'right' : 'left',\n paddingBottom: 8,\n }}\n >\n {h}\n </th>\n ))}\n </tr>\n </thead>\n\n <tbody>\n {[...groups.entries()].map(([key, groupRows]) => {\n const firstRow = groupRows[0];\n return (\n <React.Fragment key={key}>\n {/* Category header row */}\n <tr\n style={{\n breakInside: 'avoid',\n pageBreakInside: 'avoid',\n borderTop: '1px solid #e5e7f0',\n }}\n >\n <td\n colSpan={hasTarget ? 6 : 4}\n style={{\n padding: `${isPdf ? 6 : 8}px ${isPdf ? 8 : 10}px`,\n paddingTop: isPdf ? 10 : 14,\n }}\n >\n <div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>\n <span\n style={{\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: isPdf ? 16 : 20,\n height: isPdf ? 16 : 20,\n borderRadius: 4,\n backgroundColor: firstRow.categoryColor,\n color: '#fff',\n fontSize: isPdf ? 9 : 11,\n fontWeight: 700,\n flexShrink: 0,\n fontFamily: \"'Geist Mono', monospace\",\n }}\n >\n {firstRow.categoryLetter}\n </span>\n <span\n style={{\n fontSize: isPdf ? 9 : 11,\n fontWeight: 700,\n textTransform: 'uppercase',\n letterSpacing: '0.08em',\n color: '#000626',\n }}\n >\n {firstRow.category}\n </span>\n </div>\n </td>\n </tr>\n\n {/* Metric rows */}\n {groupRows.map((row, i) => (\n <tr\n key={row.label}\n style={{\n backgroundColor: i % 2 === 0 ? 'transparent' : 'rgba(229,231,240,0.2)',\n breakInside: 'avoid',\n pageBreakInside: 'avoid',\n }}\n >\n {/* Metric label */}\n <td style={{ padding: cellPad, fontSize: fs, color: '#000626' }}>\n {row.label}\n {row.footnoteMarker && (\n <sup style={{ color: '#8c92af', fontSize: fs - 2 }}>{row.footnoteMarker}</sup>\n )}\n </td>\n\n {/* Result */}\n <td\n style={{\n padding: cellPad,\n fontSize: fs,\n fontFamily: \"'Geist Mono', monospace\",\n fontWeight: 600,\n color: '#000626',\n textAlign: 'right',\n }}\n >\n {row.result}\n </td>\n\n {/* Target */}\n {hasTarget && (\n <td\n style={{\n padding: cellPad,\n fontSize: fs,\n fontFamily: \"'Geist Mono', monospace\",\n color: '#8c92af',\n textAlign: 'right',\n }}\n >\n {row.target ?? '—'}\n </td>\n )}\n\n {/* Target met icon */}\n {hasTarget && (\n <td style={{ padding: cellPad, textAlign: 'center' }}>\n <TargetIcon met={row.targetMet} />\n </td>\n )}\n\n {/* Trend */}\n <td style={{ padding: cellPad, fontSize: fs }}>\n <span style={{ color: TREND_COLORS[row.trendDirection], fontWeight: 600 }}>\n {TREND_ARROWS[row.trendDirection]}{' '}\n </span>\n <span\n style={{\n fontFamily: \"'Geist Mono', monospace\",\n color: TREND_COLORS[row.trendDirection],\n fontWeight: 600,\n }}\n >\n {row.trendValue}\n </span>\n <span style={{ color: '#8c92af', marginLeft: 4, fontSize: isPdf ? 8 : 9 }}>\n {row.trendPeriod}\n </span>\n </td>\n\n {/* Importance */}\n <td style={{ padding: cellPad }}>\n <span\n style={{\n fontSize: isPdf ? 8 : 10,\n fontWeight: 600,\n color: IMPORTANCE_COLORS[row.importance] ?? '#8c92af',\n textTransform: 'uppercase',\n letterSpacing: '0.06em',\n }}\n >\n {row.importance}\n </span>\n </td>\n </tr>\n ))}\n </React.Fragment>\n );\n })}\n </tbody>\n </table>\n\n {/* Footnotes for lower-is-better metrics */}\n {footnoteRows.length > 0 && (\n <div\n style={{\n marginTop: 12,\n paddingTop: 8,\n borderTop: '1px solid #e5e7f0',\n fontSize: isPdf ? 8 : 9,\n color: '#8c92af',\n }}\n >\n {footnoteRows.map((row) => (\n <div key={row.label}>\n <sup>{row.footnoteMarker}</sup> {row.label}: lower values indicate better performance\n </div>\n ))}\n </div>\n )}\n </div>\n );\n}\n","import type { RenderMode } from '@/types/renderMode';\n\n/**\n * KpiObservations — Executive summary observation blocks.\n *\n * One block per KPI category, each with:\n * - Status icon: thumbs up (positive), thumbs down (negative), dash (neutral)\n * - Category label: 9px uppercase tracking\n * - Headline: bold metric value / label\n * - Context: muted inline text (e.g. \"Last month 26.04%\")\n * - Narrative: LLM-generated 1–2 sentence interpretation\n * - Separator between blocks\n */\n\nexport interface KpiObservation {\n category: string; // \"PROFITABILITY\"\n status: 'positive' | 'negative' | 'neutral';\n headline: string; // \"Profitability Ratio 17.52%\"\n context: string; // \"(Last month 26.04%)\"\n narrative: string; // 1–2 sentences\n}\n\nexport interface KpiObservationsProps {\n observations: KpiObservation[];\n renderMode?: RenderMode;\n}\n\nfunction ThumbsUp({ size }: { size: number }) {\n return (\n <svg width={size} height={size} viewBox=\"0 0 18 18\" fill=\"none\">\n <path\n d=\"M5 9.5V16H3a1 1 0 01-1-1v-4.5a1 1 0 011-1h2zM6 9.5l2.5-7a1.5 1.5 0 013 0v4.5h3.5a1.5 1.5 0 011.5 1.5l-.9 4.5a1.5 1.5 0 01-1.5 1.5H6V9.5z\"\n fill=\"#71d481\"\n />\n </svg>\n );\n}\n\nfunction ThumbsDown({ size }: { size: number }) {\n return (\n <svg width={size} height={size} viewBox=\"0 0 18 18\" fill=\"none\">\n <path\n d=\"M13 8.5V2H15a1 1 0 011 1v4.5a1 1 0 01-1 1h-2zM12 8.5l-2.5 7a1.5 1.5 0 01-3 0v-4.5H3a1.5 1.5 0 01-1.5-1.5l.9-4.5A1.5 1.5 0 013.9 3.5H12V8.5z\"\n fill=\"#fb6060\"\n />\n </svg>\n );\n}\n\nfunction NeutralDash({ size }: { size: number }) {\n return (\n <svg width={size} height={size} viewBox=\"0 0 18 18\" fill=\"none\">\n <rect x=\"3\" y=\"8\" width=\"12\" height=\"2\" rx=\"1\" fill=\"#8c92af\" />\n </svg>\n );\n}\n\nfunction StatusIcon({ status, size }: { status: KpiObservation['status']; size: number }) {\n if (status === 'positive') return <ThumbsUp size={size} />;\n if (status === 'negative') return <ThumbsDown size={size} />;\n return <NeutralDash size={size} />;\n}\n\nexport function KpiObservations({ observations, renderMode = 'web' }: KpiObservationsProps) {\n const isPdf = renderMode === 'pdf';\n const iconSize = isPdf ? 14 : 18;\n\n return (\n <div style={{ fontFamily: \"'Geist', system-ui, sans-serif\" }}>\n {observations.map((obs, i) => (\n <div\n key={obs.category}\n style={{\n display: 'flex',\n gap: isPdf ? 12 : 16,\n alignItems: 'flex-start',\n paddingTop: isPdf ? 10 : 14,\n paddingBottom: isPdf ? 10 : 14,\n borderBottom: i < observations.length - 1 ? '1px solid #e5e7f0' : 'none',\n breakInside: 'avoid',\n pageBreakInside: 'avoid',\n }}\n >\n {/* Status icon */}\n <div style={{ flexShrink: 0, paddingTop: 2 }}>\n <StatusIcon status={obs.status} size={iconSize} />\n </div>\n\n {/* Content */}\n <div style={{ flex: 1, minWidth: 0 }}>\n {/* Category label */}\n <div\n style={{\n fontSize: 9,\n fontWeight: 700,\n textTransform: 'uppercase',\n letterSpacing: '0.10em',\n color: '#8c92af',\n marginBottom: 3,\n }}\n >\n {obs.category}\n </div>\n\n {/* Headline + context */}\n <div style={{ marginBottom: isPdf ? 3 : 4 }}>\n <span\n style={{\n fontSize: isPdf ? 11 : 13,\n fontWeight: 700,\n color: '#000626',\n }}\n >\n {obs.headline}\n </span>\n {obs.context && (\n <span\n style={{\n fontSize: isPdf ? 11 : 13,\n fontWeight: 400,\n color: '#8c92af',\n marginLeft: 6,\n }}\n >\n {obs.context}\n </span>\n )}\n </div>\n\n {/* Narrative */}\n <p\n style={{\n margin: 0,\n fontSize: isPdf ? 10 : 12,\n fontWeight: 400,\n color: '#595f7a',\n lineHeight: 1.6,\n }}\n >\n {obs.narrative}\n </p>\n </div>\n </div>\n ))}\n </div>\n );\n}\n","import type { RenderMode } from '@/types/renderMode';\nimport { KpiObservations, type KpiObservation } from '../KpiObservations/KpiObservations';\n\n/**\n * ExecutiveSummaryPage — Fathom-style executive summary layout.\n *\n * Two-column grid (60% / 40% gap 32px):\n * - Left: Commentary paragraphs (overview narrative)\n * - Right: Actions bullet list — coral bullet • navy text\n *\n * Below (full width): KpiObservations blocks\n *\n * Designed to sit inside a <ReportPage> wrapper.\n */\n\nexport interface SummaryCommentaryBlock {\n heading?: string;\n body: string;\n}\n\nexport interface ExecutiveSummaryPageProps {\n commentary: SummaryCommentaryBlock[];\n actions: string[];\n observations: KpiObservation[];\n renderMode?: RenderMode;\n}\n\nexport function ExecutiveSummaryPage({\n commentary,\n actions,\n observations,\n renderMode = 'web',\n}: ExecutiveSummaryPageProps) {\n const isPdf = renderMode === 'pdf';\n\n return (\n <div style={{ fontFamily: \"'Geist', system-ui, sans-serif\" }}>\n {/* Two-column narrative + actions */}\n <div\n style={{\n display: 'grid',\n gridTemplateColumns: '60% 40%',\n gap: isPdf ? 24 : 32,\n marginBottom: isPdf ? 24 : 32,\n alignItems: 'start',\n }}\n >\n {/* Left: commentary */}\n <div>\n {commentary.map((block, i) => (\n <div key={i} style={{ marginBottom: isPdf ? 12 : 16 }}>\n {block.heading && (\n <div\n style={{\n fontSize: isPdf ? 10 : 12,\n fontWeight: 700,\n textTransform: 'uppercase',\n letterSpacing: '0.08em',\n color: '#000626',\n marginBottom: isPdf ? 4 : 6,\n }}\n >\n {block.heading}\n </div>\n )}\n <p\n style={{\n margin: 0,\n fontSize: isPdf ? 10 : 13,\n lineHeight: 1.65,\n color: '#000626',\n }}\n >\n {block.body}\n </p>\n </div>\n ))}\n </div>\n\n {/* Right: actions */}\n <div>\n <div\n style={{\n fontSize: isPdf ? 9 : 11,\n fontWeight: 700,\n textTransform: 'uppercase',\n letterSpacing: '0.08em',\n color: '#8c92af',\n marginBottom: isPdf ? 8 : 12,\n }}\n >\n Key Actions\n </div>\n <ul style={{ margin: 0, padding: 0, listStyle: 'none' }}>\n {actions.map((action, i) => (\n <li\n key={i}\n style={{\n display: 'flex',\n gap: 10,\n alignItems: 'flex-start',\n marginBottom: isPdf ? 7 : 10,\n fontSize: isPdf ? 10 : 13,\n lineHeight: 1.8,\n color: '#000626',\n }}\n >\n <span\n style={{\n color: '#e15713',\n fontWeight: 700,\n fontSize: 14,\n lineHeight: 1.6,\n flexShrink: 0,\n }}\n >\n •\n </span>\n <span>{action}</span>\n </li>\n ))}\n </ul>\n </div>\n </div>\n\n {/* Full-width KPI observations */}\n {observations.length > 0 && (\n <div>\n <div\n style={{\n fontSize: isPdf ? 9 : 11,\n fontWeight: 700,\n textTransform: 'uppercase',\n letterSpacing: '0.08em',\n color: '#000626',\n borderBottom: '2px solid #e5e7f0',\n paddingBottom: isPdf ? 6 : 8,\n marginBottom: 0,\n }}\n >\n KPI Observations\n </div>\n <KpiObservations observations={observations} renderMode={renderMode} />\n </div>\n )}\n </div>\n );\n}\n","import type { RenderMode } from '@/types/renderMode';\n\n/**\n * KpiStatCard — Large metric spotlight card.\n *\n * Appears in Fathom on Revenue Analysis, Breakeven, and Cash Flow pages.\n * Each card shows: label, large display value, optional comparison, optional\n * trend (colored ▲▼), optional sparkline, optional description.\n *\n * KpiStatStrip wraps 1–3 cards in a bordered, rounded grid row.\n */\n\nconst MONO = \"'Geist Mono', ui-monospace, monospace\";\nconst GREEN = '#71d481';\nconst RED = '#fb6060';\nconst GRAY_600 = '#8c92af';\nconst GRAY_800 = '#595f7a';\nconst GRAY_1000 = '#000626';\nconst GRAY_200 = '#e5e7f0';\n\nexport interface KpiStatCardProps {\n label: string;\n value: string;\n comparison?: string;\n comparisonLabel?: string;\n trend?: {\n direction: 'up' | 'down' | 'flat';\n value: string;\n favorable?: boolean;\n };\n target?: string;\n description?: string;\n sparklineData?: number[];\n renderMode?: RenderMode;\n /** Internal: whether this is the last card in a strip (suppresses right border) */\n _last?: boolean;\n}\n\nexport interface KpiStatStripProps {\n cards: KpiStatCardProps[];\n renderMode?: RenderMode;\n}\n\n// ── Sparkline ────────────────────────────────────────────────────────────────\n\nfunction Sparkline({\n data,\n color,\n width = 80,\n height = 22,\n}: {\n data: number[];\n color: string;\n width?: number;\n height?: number;\n}) {\n if (data.length < 2) return null;\n\n const min = Math.min(...data);\n const max = Math.max(...data);\n const range = max - min || 1;\n const pad = 2;\n\n const pts = data.map((v, i) => ({\n x: pad + (i / (data.length - 1)) * (width - pad * 2),\n y: pad + (1 - (v - min) / range) * (height - pad * 2),\n }));\n\n // Smooth cubic bezier path\n let d = `M ${pts[0].x},${pts[0].y}`;\n for (let i = 1; i < pts.length; i++) {\n const prev = pts[i - 1];\n const curr = pts[i];\n const cpx = (prev.x + curr.x) / 2;\n d += ` C ${cpx},${prev.y} ${cpx},${curr.y} ${curr.x},${curr.y}`;\n }\n\n return (\n <svg\n width={width}\n height={height}\n viewBox={`0 0 ${width} ${height}`}\n style={{ display: 'block', overflow: 'visible' }}\n >\n <path d={d} fill=\"none\" stroke={color} strokeWidth={1.5} strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n );\n}\n\n// ── KpiStatCard ──────────────────────────────────────────────────────────────\n\nexport function KpiStatCard({\n label,\n value,\n comparison,\n comparisonLabel,\n trend,\n target,\n description,\n sparklineData,\n renderMode = 'web',\n _last = false,\n}: KpiStatCardProps) {\n const isPdf = renderMode === 'pdf';\n const pad = isPdf ? '10px 12px' : '16px 20px';\n const valueFontSize = isPdf ? 22 : 28;\n const labelFontSize = isPdf ? 8 : 9;\n\n const trendColor = trend == null\n ? GRAY_600\n : (trend.favorable != null\n ? (trend.favorable ? GREEN : RED)\n : (trend.direction === 'up' ? GREEN : trend.direction === 'down' ? RED : GRAY_600));\n\n const trendArrow = trend == null ? '' : trend.direction === 'up' ? '▲ ' : trend.direction === 'down' ? '▼ ' : '';\n\n return (\n <div\n style={{\n padding: pad,\n background: '#ffffff',\n borderRight: _last ? undefined : `1px solid ${GRAY_200}`,\n display: 'flex',\n flexDirection: 'column',\n gap: isPdf ? 4 : 6,\n }}\n >\n {/* Label */}\n <div\n style={{\n fontSize: labelFontSize,\n fontWeight: 700,\n textTransform: 'uppercase',\n letterSpacing: '0.1em',\n color: GRAY_600,\n }}\n >\n {label}\n </div>\n\n {/* Value row — large display number + optional sparkline */}\n <div style={{ display: 'flex', alignItems: 'flex-end', gap: 12, justifyContent: 'space-between' }}>\n <div\n style={{\n fontSize: valueFontSize,\n fontWeight: 300,\n fontFamily: MONO,\n color: GRAY_1000,\n lineHeight: 1,\n letterSpacing: '-0.01em',\n }}\n >\n {value}\n </div>\n {sparklineData && sparklineData.length >= 2 && (\n <div style={{ marginBottom: 2 }}>\n <Sparkline data={sparklineData} color={trendColor} width={80} height={22} />\n </div>\n )}\n </div>\n\n {/* Trend */}\n {trend && (\n <div style={{ fontSize: 11, fontWeight: 500, color: trendColor, lineHeight: 1.2 }}>\n {trendArrow}{trend.value}\n </div>\n )}\n\n {/* Comparison */}\n {comparison && (\n <div style={{ display: 'flex', alignItems: 'baseline', gap: 6 }}>\n <span style={{ fontSize: 13, fontFamily: MONO, color: GRAY_600 }}>{comparison}</span>\n {comparisonLabel && (\n <span style={{ fontSize: 10, color: GRAY_600 }}>{comparisonLabel}</span>\n )}\n </div>\n )}\n\n {/* Target */}\n {target && (\n <div style={{ fontSize: 11, color: GRAY_600, display: 'flex', gap: 4 }}>\n <span style={{ fontWeight: 600 }}>Target</span>\n <span style={{ fontFamily: MONO }}>{target}</span>\n </div>\n )}\n\n {/* Description */}\n {description && (\n <div style={{ fontSize: 11, color: GRAY_800, lineHeight: 1.5, marginTop: 2 }}>\n {description}\n </div>\n )}\n </div>\n );\n}\n\n// ── KpiStatStrip ─────────────────────────────────────────────────────────────\n\nexport function KpiStatStrip({ cards, renderMode = 'web' }: KpiStatStripProps) {\n if (cards.length === 0) return null;\n\n return (\n <div\n style={{\n display: 'grid',\n gridTemplateColumns: `repeat(${cards.length}, 1fr)`,\n border: `1px solid ${GRAY_200}`,\n borderRadius: 8,\n overflow: 'hidden',\n }}\n >\n {cards.map((card, i) => (\n <KpiStatCard\n key={i}\n {...card}\n renderMode={renderMode}\n _last={i === cards.length - 1}\n />\n ))}\n </div>\n );\n}\n","import type { RenderMode } from '@/types/renderMode';\n\n/**\n * KpiWheel — Radial bar chart showing each KPI as a spoke from the center.\n *\n * Each KPI occupies an equal angular slice. The bar length encodes the score\n * (0–100, where 100 = target met). A faint tinted background sector shows the\n * full 100% extent. Bars sort by importance: Critical → High → Medium → Low,\n * clockwise from the top.\n *\n * Color: green (on track) / red (off track) / gray (no target set).\n * Center shows overall % of targeted KPIs that are on track.\n */\n\nconst MONO = \"'Geist Mono', ui-monospace, monospace\";\nconst GREEN = '#71d481';\nconst RED = '#fb6060';\nconst GRAY_100 = '#f5f6fa';\nconst GRAY_200 = '#e5e7f0';\nconst GRAY_600 = '#8c92af';\nconst NAVY = '#000626';\n\nexport interface KpiWheelItem {\n label: string;\n /** 0–100. Typically (actual / target) × 100, capped at 100. For no-target items, a normalised relative score. */\n score: number;\n targetMet: boolean | null;\n importance: 'Critical' | 'High' | 'Medium' | 'Low';\n}\n\nexport interface KpiWheelProps {\n items: KpiWheelItem[];\n period?: string;\n onTrackCount: number;\n offTrackCount: number;\n renderMode?: RenderMode;\n /** Rendered width in px — height scales proportionally. Default 500. */\n width?: number;\n}\n\nconst IMPORTANCE_ORDER: Record<string, number> = { Critical: 0, High: 1, Medium: 2, Low: 3 };\n\n/** Build an SVG donut-sector path (arc from innerR to outerR, between angles a1 and a2). */\nfunction sectorPath(\n cx: number,\n cy: number,\n innerR: number,\n outerR: number,\n a1: number,\n a2: number,\n): string {\n if (outerR <= innerR + 0.5) return '';\n const large = a2 - a1 > Math.PI ? 1 : 0;\n const c1 = Math.cos(a1), s1 = Math.sin(a1);\n const c2 = Math.cos(a2), s2 = Math.sin(a2);\n const f = (n: number) => n.toFixed(2);\n\n if (innerR <= 0) {\n return [\n `M ${f(cx)},${f(cy)}`,\n `L ${f(cx + outerR * c1)},${f(cy + outerR * s1)}`,\n `A ${outerR},${outerR} 0 ${large} 1 ${f(cx + outerR * c2)},${f(cy + outerR * s2)}`,\n 'Z',\n ].join(' ');\n }\n\n return [\n `M ${f(cx + innerR * c1)},${f(cy + innerR * s1)}`,\n `A ${innerR},${innerR} 0 ${large} 1 ${f(cx + innerR * c2)},${f(cy + innerR * s2)}`,\n `L ${f(cx + outerR * c2)},${f(cy + outerR * s2)}`,\n `A ${outerR},${outerR} 0 ${large} 0 ${f(cx + outerR * c1)},${f(cy + outerR * s1)}`,\n 'Z',\n ].join(' ');\n}\n\nexport function KpiWheel({\n items,\n period,\n onTrackCount,\n offTrackCount,\n renderMode = 'web',\n width = 500,\n}: KpiWheelProps) {\n const isPdf = renderMode === 'pdf';\n const n = items.length;\n if (n === 0) return null;\n\n // Sort: Critical → High → Medium → Low, then alphabetically within group\n const sorted = [...items].sort((a, b) => {\n const imp = (IMPORTANCE_ORDER[a.importance] ?? 3) - (IMPORTANCE_ORDER[b.importance] ?? 3);\n return imp !== 0 ? imp : a.label.localeCompare(b.label);\n });\n\n const total = onTrackCount + offTrackCount;\n const pct = total > 0 ? Math.round((onTrackCount / total) * 100) : 0;\n\n // ── SVG geometry ─────────────────────────────────────────────────────────────\n const VW = 560;\n const VH = 560;\n const cx = 280;\n const cy = 280;\n\n const maxR = 188; // radius at score = 100%\n const innerR = 42; // center hole (where bars start)\n const labelR = maxR + 24; // label anchor radius\n\n // Angular layout: divide full circle equally, with a small gap between bars\n const anglePer = (2 * Math.PI) / n;\n const gapRad = 0.015; // ~0.86° gap on each side of bar\n const halfBar = anglePer / 2 - gapRad;\n\n const svgHeight = Math.round(VH * (width / VW));\n\n // ── Helpers ──────────────────────────────────────────────────────────────────\n\n /** Angle of bar i's midpoint, starting at top and going clockwise */\n function midAngle(i: number) {\n return (i / n) * 2 * Math.PI - Math.PI / 2;\n }\n\n function barFill(item: KpiWheelItem) {\n if (item.targetMet === true) return GREEN;\n if (item.targetMet === false) return RED;\n return GRAY_600;\n }\n\n function bgFill(item: KpiWheelItem) {\n if (item.targetMet === true) return 'rgba(113,212,129,0.10)';\n if (item.targetMet === false) return 'rgba(251,96,96,0.08)';\n return GRAY_100;\n }\n\n return (\n <svg\n width={width}\n height={svgHeight}\n viewBox={`0 0 ${VW} ${VH}`}\n style={{ display: 'block', overflow: 'visible' }}\n >\n {/* ── Radial bars ────────────────────────────────────────────────────── */}\n {sorted.map((item, i) => {\n const mid = midAngle(i);\n const a1 = mid - halfBar;\n const a2 = mid + halfBar;\n\n // Score bar — clamp to [innerR, maxR]\n const scoreR = innerR + Math.max(2, Math.min(item.score / 100, 1) * (maxR - innerR));\n\n // Label at outer edge, tangential (text runs around circumference)\n const lx = cx + labelR * Math.cos(mid);\n const ly = cy + labelR * Math.sin(mid);\n const deg = (mid * 180) / Math.PI + 90;\n const rotDeg = deg > 90 && deg < 270 ? deg + 180 : deg;\n const shortLabel = item.label.length > 22 ? `${item.label.slice(0, 20)}…` : item.label;\n\n return (\n <g key={i}>\n {/* Background: faint tinted sector at full 100% extent */}\n <path d={sectorPath(cx, cy, innerR, maxR, a1, a2)} fill={bgFill(item)} />\n\n {/* Score bar */}\n <path\n d={sectorPath(cx, cy, innerR, scoreR, a1, a2)}\n fill={barFill(item)}\n opacity={item.targetMet === null ? 0.5 : 0.88}\n />\n\n {/* KPI label */}\n <text\n x={0}\n y={0}\n textAnchor=\"middle\"\n dominantBaseline=\"middle\"\n fontSize={isPdf ? 7 : 8.5}\n fill={GRAY_600}\n transform={`translate(${lx.toFixed(1)},${ly.toFixed(1)}) rotate(${rotDeg.toFixed(1)})`}\n >\n {shortLabel}\n </text>\n </g>\n );\n })}\n\n {/* ── Center circle (white, sits on top of bar bases) ─────────────────── */}\n <circle cx={cx} cy={cy} r={innerR - 1} fill=\"white\" />\n\n {/* ── 100% reference ring ──────────────────────────────────────────────── */}\n <circle cx={cx} cy={cy} r={maxR} fill=\"none\" stroke={GRAY_200} strokeWidth={0.75} />\n\n {/* ── Center — % on track ──────────────────────────────────────────────── */}\n <text\n x={cx}\n y={cy - 5}\n textAnchor=\"middle\"\n dominantBaseline=\"auto\"\n fontSize={20}\n fontWeight={300}\n fontFamily={MONO}\n fill={NAVY}\n >\n {pct}%\n </text>\n <text\n x={cx}\n y={cy + 7}\n textAnchor=\"middle\"\n dominantBaseline=\"hanging\"\n fontSize={7}\n letterSpacing=\"0.07em\"\n fill={GRAY_600}\n >\n ON TRACK\n </text>\n\n {/* ── Footer legend ─────────────────────────────────────────────────────── */}\n <text\n x={cx}\n y={VH - 8}\n textAnchor=\"middle\"\n dominantBaseline=\"auto\"\n fontSize={9}\n fill={GRAY_600}\n >\n {`${onTrackCount} on track · ${offTrackCount} off track`}\n {items.length > total ? ` · ${items.length - total} no target` : ''}\n {period ? ` · ${period}` : ''}\n </text>\n </svg>\n );\n}\n","import type { RenderMode } from '@/types/renderMode';\n\n/**\n * BudgetVarianceTable — Budget vs Actuals table for forecasting reports.\n *\n * Columns: ITEM | BUDGET | ACTUAL | (FORECAST) | VARIANCE $ | VARIANCE %\n *\n * Variance $ = Actual − Budget. Variance % = Variance / |Budget| × 100.\n * Color coding:\n * - Revenue rows (isNegativeGood=false, default): positive = green, negative = red\n * - Expense rows (isNegativeGood=true): negative = green, positive = red\n * - No budget set: variance cells show —\n *\n * Visual hierarchy matches FinancialTable:\n * thead → navy bg, white text\n * section hdrs → cyan wash + 3px cyan left accent\n * data rows → white\n * total rows → gray-100 bg\n * grand total → blue-tint (#D6F4FF) bg\n */\n\nconst MONO = \"'Geist Mono', ui-monospace, monospace\";\nconst GREEN = '#71d481';\nconst RED = '#fb6060';\nconst NAVY = '#000626';\nconst GRAY_100 = '#f5f6fa';\nconst GRAY_200 = '#e5e7f0';\nconst GRAY_600 = '#8c92af';\nconst BLUE_TINT = '#D6F4FF';\nconst BLUE_BORDER = '#00bcd4';\nconst CYAN_WASH = 'rgba(0,188,212,0.06)';\nconst CYAN_SUBTLE = 'rgba(0,188,212,0.15)';\n\nexport interface BudgetVarianceRow {\n label: string;\n /** 0 = top-level, 1 = line item, 2 = sub-item. Controls left padding. */\n indent?: number;\n /** Raw number. null or undefined = no budget set. */\n budget?: number | null;\n actual?: number | null;\n /** Only rendered when showForecast=true on the table. */\n forecast?: number | null;\n /** Gray-100 background, bold — for subtotals like \"Gross Profit\". */\n isTotal?: boolean;\n /** Blue-tint background — for the single bottom grand total row. */\n isGrandTotal?: boolean;\n /** Non-numeric section divider row (e.g. \"Revenue\", \"Operating Expenses\"). */\n isSectionHeader?: boolean;\n /** When true, a negative variance is favorable (green). Use for expense rows. */\n isNegativeGood?: boolean;\n}\n\nexport interface BudgetVarianceTableProps {\n rows: BudgetVarianceRow[];\n /** Shown in the header row as a subtitle, e.g. \"YTD Jun 2025\". */\n period?: string;\n /** Adds a Forecast column between Actual and Variance. Default false. */\n showForecast?: boolean;\n /** Currency symbol. Default '$'. */\n currency?: string;\n renderMode?: RenderMode;\n}\n\n// ── Formatting helpers ────────────────────────────────────────────────────────\n\nfunction fmtCurrency(v: number, currency: string): string {\n const abs = Math.abs(v);\n const sign = v < 0 ? '-' : '';\n const formatted = abs.toLocaleString('en-US', { minimumFractionDigits: 0, maximumFractionDigits: 0 });\n return `${sign}${currency}${formatted}`;\n}\n\nfunction fmtVariancePct(pct: number): string {\n const sign = pct > 0 ? '+' : '';\n return `${sign}${pct.toFixed(1)}%`;\n}\n\nfunction fmtVarianceDollar(v: number, currency: string): string {\n const sign = v > 0 ? '+' : '';\n return `${sign}${fmtCurrency(v, currency)}`;\n}\n\n// ── BudgetVarianceTable ───────────────────────────────────────────────────────\n\nexport function BudgetVarianceTable({\n rows,\n period,\n showForecast = false,\n currency = '$',\n renderMode = 'web',\n}: BudgetVarianceTableProps) {\n const isPdf = renderMode === 'pdf';\n const isExcel = renderMode === 'excel';\n const compact = isPdf || isExcel;\n\n const cellPad = compact ? '5px 8px' : '9px 14px';\n const headerPad = compact ? '0 8px' : '0 14px';\n const headerRowHeight = compact ? 24 : 34;\n const fontSize = compact ? 11 : 13;\n const headerFontSize = compact ? 8 : 9;\n\n return (\n <div\n style={{\n border: `1px solid ${GRAY_200}`,\n borderRadius: isExcel ? 0 : 8,\n overflow: 'hidden',\n }}\n >\n <table style={{ width: '100%', borderCollapse: 'collapse' }}>\n\n {/* ── thead ──────────────────────────────────────────────────────── */}\n <thead>\n <tr style={{ height: headerRowHeight, background: NAVY }}>\n {/* Item column */}\n <th\n style={{\n padding: headerPad,\n paddingLeft: compact ? 12 : 20,\n textAlign: 'left',\n fontSize: headerFontSize,\n fontWeight: 700,\n textTransform: 'uppercase',\n letterSpacing: '0.08em',\n color: '#ffffff',\n whiteSpace: 'nowrap',\n }}\n >\n {period ? `Item · ${period}` : 'Item'}\n </th>\n\n {/* Budget */}\n <th style={numHeaderStyle(headerFontSize, headerPad)}>Budget</th>\n\n {/* Actual */}\n <th style={numHeaderStyle(headerFontSize, headerPad)}>Actual</th>\n\n {/* Forecast (optional) */}\n {showForecast && (\n <th style={numHeaderStyle(headerFontSize, headerPad)}>Forecast</th>\n )}\n\n {/* Variance $ */}\n <th style={numHeaderStyle(headerFontSize, headerPad)}>Variance $</th>\n\n {/* Variance % */}\n <th style={numHeaderStyle(headerFontSize, headerPad)}>Variance %</th>\n </tr>\n </thead>\n\n {/* ── tbody ──────────────────────────────────────────────────────── */}\n <tbody>\n {rows.map((row, i) => {\n // ── Section header ─────────────────────────────────────────────\n if (row.isSectionHeader) {\n return (\n <tr\n key={i}\n style={{\n background: CYAN_WASH,\n borderTop: i > 0 ? `1px solid ${CYAN_SUBTLE}` : undefined,\n borderBottom: `1px solid ${CYAN_SUBTLE}`,\n borderLeft: `3px solid ${BLUE_BORDER}`,\n }}\n >\n <td\n colSpan={showForecast ? 6 : 5}\n style={{\n padding: compact ? '4px 8px' : '6px 14px',\n paddingLeft: compact ? 12 : 20,\n fontSize: compact ? 8 : 9,\n fontWeight: 700,\n textTransform: 'uppercase',\n letterSpacing: '0.08em',\n color: NAVY,\n }}\n >\n {row.label}\n </td>\n </tr>\n );\n }\n\n // ── Grand total ────────────────────────────────────────────────\n if (row.isGrandTotal) {\n return (\n <GrandTotalRow\n key={i}\n row={row}\n currency={currency}\n showForecast={showForecast}\n compact={compact}\n fontSize={fontSize}\n />\n );\n }\n\n // ── Total / subtotal ───────────────────────────────────────────\n if (row.isTotal) {\n return (\n <TotalRow\n key={i}\n row={row}\n currency={currency}\n showForecast={showForecast}\n compact={compact}\n fontSize={fontSize}\n />\n );\n }\n\n // ── Regular data row ───────────────────────────────────────────\n const indent = (row.indent ?? 0) * (compact ? 10 : 14);\n const hasBudget = row.budget != null;\n const hasActual = row.actual != null;\n\n const varDollar = hasBudget && hasActual ? (row.actual! - row.budget!) : null;\n const varPct = hasBudget && hasActual && row.budget !== 0\n ? ((row.actual! - row.budget!) / Math.abs(row.budget!)) * 100\n : null;\n\n const favorable = varDollar == null ? null\n : row.isNegativeGood ? varDollar < 0 : varDollar > 0;\n const varColor = favorable == null ? GRAY_600 : favorable ? GREEN : RED;\n\n return (\n <tr\n key={i}\n style={{\n background: '#ffffff',\n borderBottom: `1px solid ${GRAY_100}`,\n }}\n >\n {/* Label */}\n <td\n style={{\n padding: cellPad,\n paddingLeft: (compact ? 12 : 20) + indent,\n fontSize,\n color: NAVY,\n whiteSpace: compact ? 'nowrap' : undefined,\n }}\n >\n {row.label}\n </td>\n\n {/* Budget */}\n <td style={numCellStyle(fontSize, cellPad, GRAY_600)}>\n {hasBudget ? fmtCurrency(row.budget!, currency) : '—'}\n </td>\n\n {/* Actual */}\n <td style={numCellStyle(fontSize, cellPad, NAVY)}>\n {hasActual ? fmtCurrency(row.actual!, currency) : '—'}\n </td>\n\n {/* Forecast */}\n {showForecast && (\n <td style={numCellStyle(fontSize, cellPad, GRAY_600)}>\n {row.forecast != null ? fmtCurrency(row.forecast, currency) : '—'}\n </td>\n )}\n\n {/* Variance $ */}\n <td style={numCellStyle(fontSize, cellPad, varColor)}>\n {varDollar != null ? fmtVarianceDollar(varDollar, currency) : '—'}\n </td>\n\n {/* Variance % — colored badge */}\n <td style={{ padding: cellPad, textAlign: 'right' }}>\n {varPct != null ? (\n <span\n style={{\n display: 'inline-block',\n padding: '1px 5px',\n borderRadius: 4,\n fontSize: compact ? 10 : 11,\n fontWeight: 600,\n fontFamily: MONO,\n color: varColor,\n background: favorable == null\n ? 'transparent'\n : favorable\n ? 'rgba(113,212,129,0.10)'\n : 'rgba(251,96,96,0.09)',\n }}\n >\n {fmtVariancePct(varPct)}\n </span>\n ) : (\n <span style={{ color: GRAY_600, fontSize }}>—</span>\n )}\n </td>\n </tr>\n );\n })}\n </tbody>\n </table>\n </div>\n );\n}\n\n// ── Style helpers ─────────────────────────────────────────────────────────────\n\nfunction numHeaderStyle(fontSize: number, pad: string): React.CSSProperties {\n return {\n padding: pad,\n textAlign: 'right',\n fontSize,\n fontWeight: 700,\n textTransform: 'uppercase',\n letterSpacing: '0.08em',\n color: '#ffffff',\n fontFamily: MONO,\n whiteSpace: 'nowrap',\n };\n}\n\nfunction numCellStyle(fontSize: number, pad: string, color: string): React.CSSProperties {\n return {\n padding: pad,\n textAlign: 'right',\n fontSize,\n fontFamily: MONO,\n fontVariantNumeric: 'tabular-nums',\n color,\n whiteSpace: 'nowrap',\n };\n}\n\n// ── Total row (gray-100 bg) ───────────────────────────────────────────────────\n\nfunction TotalRow({\n row,\n currency,\n showForecast,\n compact,\n fontSize,\n}: {\n row: BudgetVarianceRow;\n currency: string;\n showForecast: boolean;\n compact: boolean;\n fontSize: number;\n}) {\n const hasBudget = row.budget != null;\n const hasActual = row.actual != null;\n const varDollar = hasBudget && hasActual ? (row.actual! - row.budget!) : null;\n const varPct = hasBudget && hasActual && row.budget !== 0\n ? ((row.actual! - row.budget!) / Math.abs(row.budget!)) * 100\n : null;\n const favorable = varDollar == null ? null\n : row.isNegativeGood ? varDollar < 0 : varDollar > 0;\n const varColor = favorable == null ? GRAY_600 : favorable ? GREEN : RED;\n const cellPad = compact ? '5px 8px' : '8px 14px';\n\n return (\n <tr\n style={{\n background: GRAY_100,\n borderTop: `1px solid ${GRAY_200}`,\n borderBottom: `1px solid ${GRAY_200}`,\n }}\n >\n <td\n style={{\n padding: cellPad,\n paddingLeft: compact ? 12 : 20,\n fontSize: compact ? 9 : 10,\n fontWeight: 700,\n textTransform: 'uppercase',\n letterSpacing: '0.04em',\n color: NAVY,\n whiteSpace: compact ? 'nowrap' : undefined,\n }}\n >\n {row.label}\n </td>\n <td style={{ ...numCellStyle(fontSize, cellPad, NAVY), fontWeight: 600 }}>\n {hasBudget ? fmtCurrency(row.budget!, currency) : '—'}\n </td>\n <td style={{ ...numCellStyle(fontSize, cellPad, NAVY), fontWeight: 600 }}>\n {hasActual ? fmtCurrency(row.actual!, currency) : '—'}\n </td>\n {showForecast && (\n <td style={{ ...numCellStyle(fontSize, cellPad, NAVY), fontWeight: 600 }}>\n {row.forecast != null ? fmtCurrency(row.forecast, currency) : '—'}\n </td>\n )}\n <td style={{ ...numCellStyle(fontSize, cellPad, varColor), fontWeight: 600 }}>\n {varDollar != null ? fmtVarianceDollar(varDollar, currency) : '—'}\n </td>\n <td style={{ padding: cellPad, textAlign: 'right' }}>\n {varPct != null ? (\n <span\n style={{\n display: 'inline-block',\n padding: '1px 5px',\n borderRadius: 4,\n fontSize: compact ? 10 : 11,\n fontWeight: 700,\n fontFamily: MONO,\n color: varColor,\n background: favorable == null\n ? 'transparent'\n : favorable\n ? 'rgba(113,212,129,0.10)'\n : 'rgba(251,96,96,0.09)',\n }}\n >\n {fmtVariancePct(varPct)}\n </span>\n ) : (\n <span style={{ color: GRAY_600, fontSize }}>—</span>\n )}\n </td>\n </tr>\n );\n}\n\n// ── Grand total row (blue-tint bg) ────────────────────────────────────────────\n\nfunction GrandTotalRow({\n row,\n currency,\n showForecast,\n compact,\n fontSize,\n}: {\n row: BudgetVarianceRow;\n currency: string;\n showForecast: boolean;\n compact: boolean;\n fontSize: number;\n}) {\n const hasBudget = row.budget != null;\n const hasActual = row.actual != null;\n const varDollar = hasBudget && hasActual ? (row.actual! - row.budget!) : null;\n const varPct = hasBudget && hasActual && row.budget !== 0\n ? ((row.actual! - row.budget!) / Math.abs(row.budget!)) * 100\n : null;\n const favorable = varDollar == null ? null\n : row.isNegativeGood ? varDollar < 0 : varDollar > 0;\n const varColor = favorable == null ? GRAY_600 : favorable ? GREEN : RED;\n const rowHeight = compact ? 24 : 34;\n const cellPad = compact ? '0 8px' : '0 14px';\n\n return (\n <tr\n style={{\n background: BLUE_TINT,\n borderTop: `2px solid ${BLUE_BORDER}`,\n height: rowHeight,\n }}\n >\n <td\n style={{\n padding: cellPad,\n paddingLeft: compact ? 12 : 20,\n fontSize: compact ? 10 : 12,\n fontWeight: 700,\n color: NAVY,\n whiteSpace: compact ? 'nowrap' : undefined,\n }}\n >\n {row.label}\n </td>\n <td style={{ ...numCellStyle(fontSize, cellPad, NAVY), fontWeight: 700 }}>\n {hasBudget ? fmtCurrency(row.budget!, currency) : '—'}\n </td>\n <td style={{ ...numCellStyle(fontSize, cellPad, NAVY), fontWeight: 700 }}>\n {hasActual ? fmtCurrency(row.actual!, currency) : '—'}\n </td>\n {showForecast && (\n <td style={{ ...numCellStyle(fontSize, cellPad, NAVY), fontWeight: 700 }}>\n {row.forecast != null ? fmtCurrency(row.forecast, currency) : '—'}\n </td>\n )}\n <td style={{ ...numCellStyle(fontSize, cellPad, varColor), fontWeight: 700 }}>\n {varDollar != null ? fmtVarianceDollar(varDollar, currency) : '—'}\n </td>\n <td style={{ padding: cellPad, textAlign: 'right' }}>\n {varPct != null ? (\n <span\n style={{\n display: 'inline-block',\n padding: '1px 5px',\n borderRadius: 4,\n fontSize: compact ? 10 : 11,\n fontWeight: 700,\n fontFamily: MONO,\n color: varColor,\n background: favorable == null\n ? 'transparent'\n : favorable\n ? 'rgba(113,212,129,0.13)'\n : 'rgba(251,96,96,0.11)',\n }}\n >\n {fmtVariancePct(varPct)}\n </span>\n ) : (\n <span style={{ color: GRAY_600, fontSize }}>—</span>\n )}\n </td>\n </tr>\n );\n}\n","import { cva } from 'class-variance-authority';\n\nexport const badgeStyles = cva(\n 'inline-flex items-center whitespace-nowrap',\n {\n variants: {\n variant: {\n square: 'px-2 py-0.5 rounded text-[10px] font-bold uppercase tracking-wider',\n pill: 'px-2.5 py-1 rounded-full text-[11px] font-semibold',\n entity: 'px-2 py-0.5 rounded text-[11px] font-medium',\n },\n },\n defaultVariants: {\n variant: 'pill',\n },\n }\n);\n","import { HTMLAttributes, forwardRef } from 'react';\nimport { cn } from '@/utils/cn';\nimport { badgeStyles } from './Badge.styles';\n\nexport interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {\n variant?: 'square' | 'pill' | 'entity';\n /** Custom background color (CSS value) */\n bg?: string;\n /** Custom text color (CSS value) */\n color?: string;\n}\n\nexport const Badge = forwardRef<HTMLSpanElement, BadgeProps>(\n ({ className, variant = 'pill', bg, color, style, children, ...props }, ref) => {\n return (\n <span\n ref={ref}\n className={cn(badgeStyles({ variant }), className)}\n style={{ background: bg, color, ...style }}\n {...props}\n >\n {children}\n </span>\n );\n }\n);\n\nBadge.displayName = 'Badge';\n","import { cva } from 'class-variance-authority';\n\nexport const cardStyles = cva(\n 'bg-[var(--color-white)] border border-[var(--color-gray-200)] rounded-[12px]',\n {\n variants: {\n variant: {\n default: 'shadow-sm',\n elevated: 'shadow-md',\n stat: 'shadow-sm',\n },\n padding: {\n none: '',\n sm: 'p-3',\n md: 'p-4',\n lg: 'p-6',\n },\n },\n defaultVariants: {\n variant: 'default',\n padding: 'md',\n },\n }\n);\n","import { HTMLAttributes, forwardRef } from 'react';\nimport { cn } from '@/utils/cn';\nimport { cardStyles } from './Card.styles';\n\nexport interface CardProps extends HTMLAttributes<HTMLDivElement> {\n variant?: 'default' | 'elevated' | 'stat';\n padding?: 'none' | 'sm' | 'md' | 'lg';\n}\n\nexport const Card = forwardRef<HTMLDivElement, CardProps>(\n ({ className, variant = 'default', padding = 'md', children, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(cardStyles({ variant, padding }), className)}\n {...props}\n >\n {children}\n </div>\n );\n }\n);\n\nCard.displayName = 'Card';\n","import { SelectHTMLAttributes, forwardRef, useId } from 'react';\nimport { cn } from '@/utils/cn';\n\nexport interface SelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, 'size'> {\n /** Label displayed above the select */\n label?: string;\n /** Hint text displayed below the select */\n hint?: string;\n /** Error message (overrides hint) */\n error?: string;\n /** Size variant */\n size?: 'medium' | 'small';\n}\n\nexport const Select = forwardRef<HTMLSelectElement, SelectProps>(\n ({ className, label, hint, error, size = 'medium', disabled, ...props }, ref) => {\n const errorId = useId();\n\n const sizeClasses = size === 'small'\n ? 'h-8 text-xs px-2.5 pr-7'\n : 'h-10 text-[13px] px-3 pr-8';\n\n return (\n <div className=\"flex flex-col gap-1\">\n {label && (\n <label className=\"text-[11px] font-semibold text-[var(--color-gray-800)]\">\n {label}\n </label>\n )}\n <div className=\"relative\">\n <select\n ref={ref}\n className={cn(\n 'w-full appearance-none rounded-[6px] border outline-none transition-colors duration-150',\n 'bg-[var(--color-white)] text-[var(--color-gray-1000)]',\n error\n ? 'border-[var(--color-red-1000)] bg-[var(--color-red-200)]'\n : 'border-[var(--color-gray-200)] focus:border-[var(--color-blue-800)] focus:ring-2 focus:ring-[rgba(21,177,205,0.12)]',\n disabled && 'bg-[var(--color-gray-50)] text-[var(--color-gray-600)] cursor-not-allowed',\n sizeClasses,\n className\n )}\n disabled={disabled}\n aria-invalid={!!error}\n aria-describedby={error ? errorId : undefined}\n {...props}\n />\n <svg\n className=\"pointer-events-none absolute right-2.5 top-1/2 -translate-y-1/2 text-[var(--color-gray-600)]\"\n width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\"\n >\n <path d=\"m6 9 6 6 6-6\" />\n </svg>\n </div>\n {error && (\n <span id={errorId} className=\"text-[11px] text-[var(--color-red-1000)]\" role=\"alert\">\n {error}\n </span>\n )}\n {!error && hint && (\n <span className=\"text-[11px] text-[var(--color-gray-600)]\">\n {hint}\n </span>\n )}\n </div>\n );\n }\n);\n\nSelect.displayName = 'Select';\n","import { InputHTMLAttributes, forwardRef, useState, useId } from 'react';\nimport { cn } from '@/utils/cn';\n\nexport interface PasswordFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> {\n /** Label displayed above the field */\n label?: string;\n /** Hint text displayed below the field */\n hint?: string;\n /** Error message (overrides hint) */\n error?: string;\n /** Show the visibility toggle button (default: true) */\n showToggle?: boolean;\n /** Size variant */\n size?: 'medium' | 'small';\n}\n\nexport const PasswordField = forwardRef<HTMLInputElement, PasswordFieldProps>(\n ({ className, label, hint, error, showToggle = true, size = 'medium', disabled, ...props }, ref) => {\n const [visible, setVisible] = useState(false);\n const errorId = useId();\n\n const sizeClasses = size === 'small'\n ? 'h-8 text-xs'\n : 'h-10 text-[13px]';\n\n return (\n <div className=\"flex flex-col gap-1\">\n {label && (\n <label className=\"text-[11px] font-semibold text-[var(--color-gray-800)]\">\n {label}\n </label>\n )}\n <div\n className={cn(\n 'flex items-center rounded-[6px] border transition-colors duration-150',\n error\n ? 'border-[var(--color-red-1000)]'\n : 'border-[var(--color-gray-200)] focus-within:border-[var(--color-blue-800)] focus-within:ring-2 focus-within:ring-[rgba(21,177,205,0.12)]',\n disabled && 'bg-[var(--color-gray-50)] cursor-not-allowed',\n sizeClasses,\n )}\n >\n <input\n ref={ref}\n type={visible ? 'text' : 'password'}\n className={cn(\n 'flex-1 bg-transparent border-none outline-none px-3 text-[var(--color-gray-1000)]',\n sizeClasses,\n className\n )}\n disabled={disabled}\n aria-invalid={!!error}\n aria-describedby={error ? errorId : undefined}\n {...props}\n />\n {showToggle && (\n <button\n type=\"button\"\n onClick={() => setVisible(!visible)}\n className=\"shrink-0 px-2.5 text-[var(--color-gray-600)] bg-transparent border-none cursor-pointer hover:text-[var(--color-gray-800)] transition-colors\"\n aria-label={visible ? 'Hide password' : 'Show password'}\n tabIndex={-1}\n >\n {visible ? (\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <path d=\"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94\" />\n <path d=\"M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19\" />\n <line x1=\"1\" x2=\"23\" y1=\"1\" y2=\"23\" />\n </svg>\n ) : (\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <path d=\"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z\" />\n <circle cx=\"12\" cy=\"12\" r=\"3\" />\n </svg>\n )}\n </button>\n )}\n </div>\n {error && (\n <span id={errorId} className=\"text-[11px] text-[var(--color-red-1000)]\" role=\"alert\">\n {error}\n </span>\n )}\n {!error && hint && (\n <span className=\"text-[11px] text-[var(--color-gray-600)]\">\n {hint}\n </span>\n )}\n </div>\n );\n }\n);\n\nPasswordField.displayName = 'PasswordField';\n","import { InputHTMLAttributes, forwardRef, useId } from 'react';\nimport { cn } from '@/utils/cn';\n\nexport interface NumberInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> {\n /** Label displayed above the input */\n label?: string;\n /** Hint text displayed below the input */\n hint?: string;\n /** Error message (overrides hint) */\n error?: string;\n /** Suffix text displayed after the input (e.g. \"characters\", \"px\") */\n suffix?: string;\n /** Size variant */\n size?: 'medium' | 'small';\n}\n\nexport const NumberInput = forwardRef<HTMLInputElement, NumberInputProps>(\n ({ className, label, hint, error, suffix, size = 'medium', disabled, style, ...props }, ref) => {\n const errorId = useId();\n\n const sizeClasses = size === 'small'\n ? 'h-8 text-xs px-2'\n : 'h-10 text-[13px] px-2.5';\n\n return (\n <div className=\"flex flex-col gap-1\">\n {label && (\n <label className=\"text-[11px] font-semibold text-[var(--color-gray-800)]\">\n {label}\n </label>\n )}\n <div className=\"flex items-center gap-2\">\n <input\n ref={ref}\n type=\"number\"\n className={cn(\n 'rounded-[6px] border outline-none transition-colors duration-150 text-right',\n 'bg-[var(--color-white)] text-[var(--color-gray-1000)]',\n error\n ? 'border-[var(--color-red-1000)]'\n : 'border-[var(--color-gray-200)] focus:border-[var(--color-blue-800)] focus:ring-2 focus:ring-[rgba(21,177,205,0.12)]',\n disabled && 'bg-[var(--color-gray-50)] text-[var(--color-gray-600)] cursor-not-allowed',\n sizeClasses,\n className\n )}\n disabled={disabled}\n aria-invalid={!!error}\n aria-describedby={error ? errorId : undefined}\n style={{ width: 100, ...style }}\n {...props}\n />\n {suffix && (\n <span className=\"text-[12px] text-[var(--color-gray-600)] shrink-0\">\n {suffix}\n </span>\n )}\n </div>\n {error && (\n <span id={errorId} className=\"text-[11px] text-[var(--color-red-1000)]\" role=\"alert\">\n {error}\n </span>\n )}\n {!error && hint && (\n <span className=\"text-[11px] text-[var(--color-gray-600)]\">\n {hint}\n </span>\n )}\n </div>\n );\n }\n);\n\nNumberInput.displayName = 'NumberInput';\n","import { cva } from 'class-variance-authority';\n\nexport const bannerStyles = cva(\n 'flex gap-3 p-3 rounded-[8px] border',\n {\n variants: {\n variant: {\n success: 'bg-[var(--color-green-200)] border-[rgba(113,212,129,0.25)]',\n error: 'bg-[var(--color-red-200)] border-[rgba(251,96,96,0.19)]',\n warning: 'bg-[#fef3c7] border-[rgba(251,191,36,0.25)]',\n info: 'bg-[rgba(21,177,205,0.07)] border-[rgba(21,177,205,0.19)]',\n },\n },\n defaultVariants: {\n variant: 'info',\n },\n }\n);\n\nexport const bannerTitleStyles = cva(\n 'text-[13px] font-semibold mb-0.5',\n {\n variants: {\n variant: {\n success: 'text-[var(--color-green-1000)]',\n error: 'text-[var(--color-red-1000)]',\n warning: 'text-[#92400e]',\n info: 'text-[var(--color-blue-800)]',\n },\n },\n }\n);\n\nexport const bannerBodyStyles = cva(\n 'text-[12px] leading-[1.4]',\n {\n variants: {\n variant: {\n success: 'text-[rgba(26,122,58,0.8)]',\n error: 'text-[rgba(251,96,96,0.8)]',\n warning: 'text-[rgba(146,64,14,0.8)]',\n info: 'text-[rgba(21,177,205,0.8)]',\n },\n },\n }\n);\n","import { HTMLAttributes, ReactNode, forwardRef } from 'react';\nimport { cn } from '@/utils/cn';\nimport { bannerStyles, bannerTitleStyles, bannerBodyStyles } from './Banner.styles';\n\nexport type BannerVariant = 'success' | 'error' | 'warning' | 'info';\n\nexport interface BannerProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {\n variant?: BannerVariant;\n title: string;\n body?: string;\n icon?: ReactNode;\n dismissible?: boolean;\n onDismiss?: () => void;\n}\n\nconst defaultIcons: Record<BannerVariant, ReactNode> = {\n success: (\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <path d=\"M22 11.08V12a10 10 0 1 1-5.93-9.14\" /><path d=\"m9 11 3 3L22 4\" />\n </svg>\n ),\n error: (\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <circle cx=\"12\" cy=\"12\" r=\"10\" /><line x1=\"12\" x2=\"12\" y1=\"8\" y2=\"12\" /><line x1=\"12\" x2=\"12.01\" y1=\"16\" y2=\"16\" />\n </svg>\n ),\n warning: (\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\" /><path d=\"M12 9v4\" /><path d=\"M12 17h.01\" />\n </svg>\n ),\n info: (\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <circle cx=\"12\" cy=\"12\" r=\"10\" /><path d=\"M12 16v-4\" /><path d=\"M12 8h.01\" />\n </svg>\n ),\n};\n\nexport const Banner = forwardRef<HTMLDivElement, BannerProps>(\n ({ className, variant = 'info', title, body, icon, dismissible, onDismiss, ...props }, ref) => {\n const displayIcon = icon ?? defaultIcons[variant];\n\n return (\n <div\n ref={ref}\n className={cn(bannerStyles({ variant }), className)}\n role=\"alert\"\n {...props}\n >\n <span className={cn(bannerTitleStyles({ variant }), 'shrink-0 mt-0.5')}>\n {displayIcon}\n </span>\n <div className=\"flex-1 min-w-0\">\n <div className={bannerTitleStyles({ variant })}>{title}</div>\n {body && <div className={bannerBodyStyles({ variant })}>{body}</div>}\n </div>\n {dismissible && onDismiss && (\n <button\n onClick={onDismiss}\n className=\"shrink-0 p-1 bg-transparent border-none cursor-pointer opacity-60 hover:opacity-100 transition-opacity\"\n aria-label=\"Dismiss\"\n >\n <svg width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <path d=\"M18 6 6 18\" /><path d=\"m6 6 12 12\" />\n </svg>\n </button>\n )}\n </div>\n );\n }\n);\n\nBanner.displayName = 'Banner';\n","import { HTMLAttributes, forwardRef, ReactNode } from 'react';\nimport { cn } from '@/utils/cn';\n\nexport interface FieldRowProps extends HTMLAttributes<HTMLDivElement> {\n /** Field label */\n label: string;\n /** Optional description below the label */\n description?: string;\n /** The input or control element */\n children: ReactNode;\n}\n\nexport const FieldRow = forwardRef<HTMLDivElement, FieldRowProps>(\n ({ className, label, description, children, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(\n 'flex gap-4 py-[11px] px-4 items-center border-b border-[var(--color-gray-100)]',\n className\n )}\n {...props}\n >\n <div className=\"flex-[0_0_160px]\">\n <span className=\"text-[13px] font-medium text-[var(--color-gray-1000)]\">\n {label}\n </span>\n {description && (\n <span className=\"text-[11px] text-[var(--color-gray-600)] ml-1\">\n {description}\n </span>\n )}\n </div>\n <div className=\"flex-1\">{children}</div>\n </div>\n );\n }\n);\n\nFieldRow.displayName = 'FieldRow';\n","import { HTMLAttributes, ReactNode, forwardRef } from 'react';\nimport { cn } from '@/utils/cn';\n\nexport interface SettingsNavItem {\n id: string;\n label: string;\n icon?: ReactNode;\n}\n\nexport interface SettingsNavSection {\n category: string;\n items: SettingsNavItem[];\n}\n\nexport interface SettingsNavProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onSelect'> {\n sections: SettingsNavSection[];\n activeId: string;\n onSelect: (id: string) => void;\n}\n\nexport const SettingsNav = forwardRef<HTMLDivElement, SettingsNavProps>(\n ({ className, sections, activeId, onSelect, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(\n 'w-[180px] border border-[var(--color-gray-200)] rounded-[12px] overflow-hidden bg-[var(--color-white)]',\n className\n )}\n {...props}\n >\n <div className=\"py-2\">\n {sections.map(({ category, items }) => (\n <div key={category}>\n <div className=\"px-3 py-1.5 text-[9px] font-bold uppercase tracking-[0.1em] text-[var(--color-gray-600)]\">\n {category}\n </div>\n {items.map(({ id, label, icon }) => (\n <button\n key={id}\n onClick={() => onSelect(id)}\n className={cn(\n 'w-full px-3 py-1.5 flex items-center gap-2 text-left text-[12px] border-l-2 cursor-pointer transition-colors duration-150 bg-transparent border-t-0 border-r-0 border-b-0',\n activeId === id\n ? 'bg-[rgba(21,177,205,0.07)] border-l-[var(--color-blue-800)] text-[var(--color-blue-800)] font-semibold'\n : 'border-l-transparent text-[var(--color-gray-800)] font-normal hover:bg-[var(--color-gray-50)]'\n )}\n >\n {icon && <span className=\"shrink-0 flex items-center\">{icon}</span>}\n {label}\n </button>\n ))}\n </div>\n ))}\n </div>\n </div>\n );\n }\n);\n\nSettingsNav.displayName = 'SettingsNav';\n","import { HTMLAttributes, ReactNode, forwardRef } from 'react';\nimport { cn } from '@/utils/cn';\n\nexport interface SettingsSectionCardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {\n /** Section title */\n title: string;\n /** Optional description below the title */\n description?: string;\n /** Content slot for field rows */\n children: ReactNode;\n /** Save handler */\n onSave?: () => void;\n /** Whether there are unsaved changes */\n dirty?: boolean;\n /** Custom save button label */\n saveLabel?: string;\n}\n\nexport const SettingsSectionCard = forwardRef<HTMLDivElement, SettingsSectionCardProps>(\n ({ className, title, description, children, onSave, dirty, saveLabel = 'Save changes', ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(\n 'bg-[var(--color-white)] border border-[var(--color-gray-200)] rounded-[12px] overflow-hidden',\n className\n )}\n {...props}\n >\n {/* Header */}\n <div className=\"px-5 py-4 border-b border-[var(--color-gray-100)]\">\n <div className=\"text-[13px] font-bold text-[var(--color-gray-1000)]\">{title}</div>\n {description && (\n <div className=\"text-[12px] text-[var(--color-gray-600)] mt-0.5\">\n {description}\n </div>\n )}\n </div>\n\n {/* Body */}\n <div className=\"px-5\">\n {children}\n </div>\n\n {/* Footer */}\n {onSave && (\n <div className=\"px-5 py-3 border-t border-[var(--color-gray-100)] flex items-center gap-2.5\">\n <button\n onClick={onSave}\n disabled={!dirty}\n className={cn(\n 'px-3.5 py-1.5 rounded-[6px] text-[13px] font-semibold border-none cursor-pointer transition-all duration-150',\n dirty\n ? 'bg-[var(--color-blue-1000)] text-[var(--color-white)] hover:opacity-90'\n : 'bg-[var(--color-gray-100)] text-[var(--color-gray-600)] cursor-default'\n )}\n >\n {saveLabel}\n </button>\n {dirty && (\n <span className=\"text-[12px] text-[var(--color-gray-600)]\">\n Unsaved changes\n </span>\n )}\n </div>\n )}\n </div>\n );\n }\n);\n\nSettingsSectionCard.displayName = 'SettingsSectionCard';\n","import type { KpiStripProps } from '../../report-types';\n\nconst MONO = 'Geist Mono, ui-monospace, monospace';\n\nexport function KpiStrip({ items, columns = 4 }: KpiStripProps) {\n const colClass = columns === 2 ? 'grid-cols-2' : columns === 3 ? 'grid-cols-3' : 'grid-cols-4';\n\n return (\n <div className={`grid ${colClass} gap-3`}>\n {items.map((kpi, i) => (\n <div\n key={i}\n className=\"bg-[var(--color-bg-primary)] border border-[var(--color-border-default)] rounded-xl p-[18px_20px] flex flex-col gap-1.5\"\n >\n <div className=\"text-[10px] font-bold uppercase tracking-[0.08em] text-[var(--color-text-tertiary)]\">\n {kpi.label}\n </div>\n <div\n className=\"text-[22px] font-light text-[var(--color-text-primary)] leading-none\"\n style={{ fontFamily: MONO, fontVariantNumeric: 'tabular-nums', letterSpacing: '-0.02em' }}\n >\n {kpi.value}\n </div>\n {kpi.delta && (\n <div\n className=\"text-[11px] font-semibold\"\n style={{\n fontFamily: MONO,\n color:\n kpi.deltaDir === 'up' ? 'var(--dl-data-positive)'\n : kpi.deltaDir === 'down' ? 'var(--dl-data-negative)'\n : kpi.deltaDir === 'warning' ? 'var(--dl-data-warning)'\n : 'var(--dl-data-neutral)',\n }}\n >\n {kpi.delta}\n </div>\n )}\n </div>\n ))}\n </div>\n );\n}\n","import type { MetricCardProps } from '../../report-types';\n\nconst MONO = 'Geist Mono, ui-monospace, monospace';\n\nconst DIR_COLOR: Record<string, string> = {\n up: 'var(--dl-data-positive)',\n down: 'var(--dl-data-negative)',\n flat: 'var(--dl-data-neutral)',\n warning: 'var(--dl-data-warning)',\n};\n\nexport function MetricCard({ label, value, delta, deltaDir }: MetricCardProps) {\n return (\n <div\n style={{\n background: 'var(--color-bg-primary)',\n border: '1px solid var(--color-border-default)',\n borderRadius: 12,\n padding: '18px 20px',\n display: 'flex',\n flexDirection: 'column',\n gap: 6,\n }}\n >\n <div style={{ fontSize: 10, fontWeight: 700, textTransform: 'uppercase', letterSpacing: '0.08em', color: 'var(--color-text-tertiary)' }}>\n {label}\n </div>\n <div style={{ fontSize: 28, fontWeight: 300, color: 'var(--color-text-primary)', lineHeight: 1, fontFamily: MONO, fontVariantNumeric: 'tabular-nums', letterSpacing: '-0.02em' }}>\n {value}\n </div>\n {delta && (\n <div style={{ fontSize: 12, fontWeight: 600, fontFamily: MONO, color: DIR_COLOR[deltaDir ?? 'flat'] ?? 'var(--dl-data-neutral)' }}>\n {delta}\n </div>\n )}\n </div>\n );\n}\n","import type { StatCardProps } from '../../report-types';\n\nconst MONO = 'Geist Mono, ui-monospace, monospace';\n\nconst TREND_COLOR: Record<string, string> = {\n up: 'var(--dl-data-positive)',\n down: 'var(--dl-data-negative)',\n flat: 'var(--dl-data-neutral)',\n};\n\nexport function StatCard({ label, value, trend, delta }: StatCardProps) {\n return (\n <div\n style={{\n background: 'var(--color-bg-primary)',\n border: '1px solid var(--color-border-default)',\n borderRadius: 10,\n padding: '14px 16px',\n display: 'flex',\n flexDirection: 'column',\n gap: 4,\n }}\n >\n <div style={{ fontSize: 10, fontWeight: 700, textTransform: 'uppercase', letterSpacing: '0.08em', color: 'var(--color-text-tertiary)' }}>\n {label}\n </div>\n <div style={{ fontSize: 22, fontWeight: 400, color: 'var(--color-text-primary)', lineHeight: 1, fontFamily: MONO, fontVariantNumeric: 'tabular-nums' }}>\n {value}\n </div>\n {delta && (\n <div style={{ fontSize: 11, color: trend ? TREND_COLOR[trend] ?? 'var(--dl-data-neutral)' : 'var(--color-text-tertiary)' }}>\n {delta}\n </div>\n )}\n </div>\n );\n}\n","import { Fragment } from 'react';\nimport type { FinancialTableProps, TotalRow } from '../../report-types';\n\nconst MONO = 'Geist Mono, ui-monospace, monospace';\n\nfunction TotalRowEl({ row, columns }: { row: TotalRow; columns: FinancialTableProps['columns'] }) {\n const isGrand = row.variant === 'grand-total';\n const bg = isGrand ? '#022e40' : 'var(--color-bg-secondary, #f9fafb)';\n const textBase = isGrand ? '#ffffff' : 'var(--color-text-primary, #000626)';\n const textMuted = isGrand ? 'rgba(255,255,255,0.65)' : 'var(--color-text-secondary, #595f7a)';\n return (\n <tr style={{ background: bg, borderTop: isGrand ? 'none' : '1px solid var(--color-border-default, #e5e7eb)' }}>\n {columns.map((col, ci) => {\n const isFirst = ci === 0;\n const val = isFirst ? row.label : row.values[col.key] ?? '—';\n const color = isFirst ? textBase : ci === 1 ? textBase : textMuted;\n return (\n <td key={col.key} style={{ padding: '10px 16px', textAlign: col.align === 'right' ? 'right' : 'left', fontSize: isGrand ? 14 : 13, fontWeight: isGrand ? 700 : 600, color, fontFamily: col.mono || !isFirst ? MONO : undefined, fontVariantNumeric: 'tabular-nums' }}>\n {val}\n </td>\n );\n })}\n </tr>\n );\n}\n\nexport function FinancialTable({ columns, groups, rows, totals }: FinancialTableProps) {\n return (\n <div className=\"border border-[var(--color-border-default,#e5e7eb)] rounded-lg overflow-hidden\">\n <table className=\"w-full\" style={{ borderCollapse: 'collapse' }}>\n <thead>\n <tr>\n {columns.map(col => (\n <th key={col.key} style={{ padding: '9px 16px', textAlign: col.align === 'right' ? 'right' : col.align === 'center' ? 'center' : 'left', fontSize: 10, fontWeight: 700, textTransform: 'uppercase', letterSpacing: '0.08em', color: 'var(--color-text-tertiary, #8c92af)', background: 'var(--color-bg-secondary, #f9fafb)', borderBottom: '1px solid var(--color-border-default, #e5e7eb)' }}>\n {col.label}\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {rows?.map((row, ri) => (\n <tr key={ri} style={{ background: 'var(--color-bg-primary, #fff)', borderBottom: '1px solid var(--color-border-light, #f3f4f6)' }}>\n {columns.map((col, ci) => (\n <td key={col.key} style={{ padding: '10px 16px', textAlign: col.align === 'right' ? 'right' : 'left', fontSize: 13, color: ci === 0 ? 'var(--color-text-primary, #000626)' : 'var(--color-text-secondary, #595f7a)', fontFamily: col.mono ? MONO : undefined, fontVariantNumeric: col.mono ? 'tabular-nums' : undefined }}>\n {String(row[col.key] ?? '—')}\n </td>\n ))}\n </tr>\n ))}\n {groups?.map((group, gi) => (\n <Fragment key={gi}>\n <tr style={{ background: 'var(--color-bg-secondary, #f9fafb)', borderTop: gi > 0 ? '1px solid var(--color-border-default, #e5e7eb)' : undefined, borderBottom: '1px solid var(--color-border-default, #e5e7eb)' }}>\n <td colSpan={columns.length} style={{ padding: '7px 16px', fontSize: 10, fontWeight: 700, textTransform: 'uppercase', letterSpacing: '0.08em', color: 'var(--color-text-tertiary, #8c92af)' }}>\n {group.label}\n {group.count != null && <span style={{ marginLeft: 8, padding: '1px 6px', borderRadius: 9999, fontSize: 10, fontWeight: 600, background: 'var(--color-gray-200, #e5e7eb)', color: 'var(--color-text-tertiary, #8c92af)' }}>{group.count}</span>}\n </td>\n </tr>\n {group.rows.map((row, ri) => (\n <tr key={ri} style={{ background: 'var(--color-bg-primary, #fff)', borderBottom: ri < group.rows.length - 1 ? '1px solid var(--color-border-light, #f3f4f6)' : undefined }}>\n {columns.map((col, ci) => (\n <td key={col.key} style={{ padding: '10px 16px', paddingLeft: ci === 0 ? 24 : 16, textAlign: col.align === 'right' ? 'right' : 'left', fontSize: 13, color: ci === 0 ? 'var(--color-text-secondary, #595f7a)' : 'var(--color-text-primary, #000626)', fontFamily: col.mono ? MONO : undefined, fontVariantNumeric: col.mono ? 'tabular-nums' : undefined }}>\n {String(row[col.key] ?? '—')}\n </td>\n ))}\n </tr>\n ))}\n {group.subtotal && (\n <tr style={{ background: 'var(--color-bg-secondary, #f9fafb)', borderTop: '1px solid var(--color-border-default, #e5e7eb)', borderBottom: '1px solid var(--color-border-default, #e5e7eb)' }}>\n {columns.map((col, ci) => (\n <td key={col.key} style={{ padding: '9px 16px', textAlign: col.align === 'right' ? 'right' : 'left', fontSize: ci === 0 ? 11 : 13, fontWeight: 600, textTransform: ci === 0 ? 'uppercase' : undefined, letterSpacing: ci === 0 ? '0.04em' : undefined, color: ci === 0 ? 'var(--color-text-tertiary, #8c92af)' : 'var(--color-text-primary, #000626)', fontFamily: col.mono ? MONO : undefined, fontVariantNumeric: col.mono ? 'tabular-nums' : undefined }}>\n {String(group.subtotal![col.key] ?? (ci === 0 ? 'Subtotal' : '—'))}\n </td>\n ))}\n </tr>\n )}\n </Fragment>\n ))}\n {totals?.map((total, ti) => <TotalRowEl key={ti} row={total} columns={columns} />)}\n </tbody>\n </table>\n </div>\n );\n}\n","import type { DataTableProps } from '../../report-types';\n\nconst MONO = 'Geist Mono, ui-monospace, monospace';\n\nexport function DataTable({ columns, rows }: DataTableProps) {\n return (\n <div className=\"border border-[var(--color-border-default,#e5e7eb)] rounded-lg overflow-hidden\">\n <table className=\"w-full\" style={{ borderCollapse: 'collapse' }}>\n <thead>\n <tr>\n {columns.map(col => (\n <th key={col.key} style={{ padding: '9px 16px', textAlign: col.align === 'right' ? 'right' : col.align === 'center' ? 'center' : 'left', fontSize: 10, fontWeight: 700, textTransform: 'uppercase', letterSpacing: '0.08em', color: 'var(--color-text-tertiary, #8c92af)', background: 'var(--color-bg-secondary, #f9fafb)', borderBottom: '1px solid var(--color-border-default, #e5e7eb)' }}>\n {col.label}\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {rows.map((row, ri) => (\n <tr key={ri} style={{ background: 'var(--color-bg-primary, #fff)', borderBottom: ri < rows.length - 1 ? '1px solid var(--color-border-light, #f3f4f6)' : undefined }}>\n {columns.map((col, ci) => (\n <td key={col.key} style={{ padding: '10px 16px', textAlign: col.align === 'right' ? 'right' : col.align === 'center' ? 'center' : 'left', fontSize: 13, color: ci === 0 ? 'var(--color-text-primary, #000626)' : 'var(--color-text-secondary, #595f7a)', fontFamily: col.mono ? MONO : undefined, fontVariantNumeric: col.mono ? 'tabular-nums' : undefined }}>\n {String(row[col.key] ?? '—')}\n </td>\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n );\n}\n","import type { PivotTableProps } from '../../report-types';\n\nconst MONO = 'Geist Mono, ui-monospace, monospace';\n\nexport function PivotTable({ rowLabel, columns, rows }: PivotTableProps) {\n return (\n <div className=\"border border-[var(--color-border-default,#e5e7eb)] rounded-lg overflow-hidden\">\n <table className=\"w-full\" style={{ borderCollapse: 'collapse' }}>\n <thead>\n <tr>\n <th style={{ padding: '9px 16px', textAlign: 'left', fontSize: 10, fontWeight: 700, textTransform: 'uppercase', letterSpacing: '0.08em', color: 'var(--color-text-tertiary, #8c92af)', background: 'var(--color-bg-secondary, #f9fafb)', borderBottom: '1px solid var(--color-border-default, #e5e7eb)', whiteSpace: 'nowrap' }}>\n {rowLabel}\n </th>\n {columns.map(col => (\n <th key={col.key} style={{ padding: '9px 16px', textAlign: 'right', fontSize: 10, fontWeight: 700, textTransform: 'uppercase', letterSpacing: '0.08em', color: col.highlight ? '#022e40' : 'var(--color-text-tertiary, #8c92af)', background: col.highlight ? '#f0f9ff' : 'var(--color-bg-secondary, #f9fafb)', borderBottom: '1px solid var(--color-border-default, #e5e7eb)', whiteSpace: 'nowrap' }}>\n {col.label}\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {(rows ?? []).map((row, ri) => (\n <tr key={ri} style={{ background: 'var(--color-bg-primary, #fff)', borderBottom: ri < (rows ?? []).length - 1 ? '1px solid var(--color-border-light, #f3f4f6)' : undefined }}>\n <td style={{ padding: '10px 16px', fontSize: 13, color: 'var(--color-text-primary, #000626)' }}>{String(row['account'] ?? '')}</td>\n {columns.map(col => (\n <td key={col.key} style={{ padding: '10px 16px', textAlign: 'right', fontSize: 13, fontFamily: MONO, fontVariantNumeric: 'tabular-nums', color: col.highlight ? 'var(--color-text-primary, #000626)' : 'var(--color-text-secondary, #595f7a)', background: col.highlight ? '#f0f9ff' : undefined }}>\n {String(row[col.key] ?? '—')}\n </td>\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n );\n}\n","import type { ReportHeaderProps } from '../../report-types';\n\nconst STATUS_STYLES: Record<string, { bg: string; color: string; label: string }> = {\n draft: { bg: 'var(--color-gray-200, #e5e7eb)', color: 'var(--color-text-secondary, #595f7a)', label: 'Draft' },\n provisional: { bg: '#fef9c3', color: '#854d0e', label: 'Provisional' },\n final: { bg: '#dcfce7', color: '#166534', label: 'Final' },\n};\n\nexport function ReportHeader({ title, subtitle, period, generatedAt, status }: ReportHeaderProps) {\n const s = STATUS_STYLES[status ?? ''] ?? STATUS_STYLES.draft;\n return (\n <div className=\"flex items-start justify-between gap-4\" style={{ padding: '20px 24px', background: 'var(--color-bg-primary, #fff)', borderBottom: '1px solid var(--color-border-default, #e5e7eb)' }}>\n <div className=\"flex flex-col gap-1\">\n <h1 style={{ margin: 0, fontSize: 20, fontWeight: 700, color: 'var(--color-text-primary, #000626)', lineHeight: 1.25 }}>{title}</h1>\n {subtitle && <p style={{ margin: 0, fontSize: 13, color: 'var(--color-text-secondary, #595f7a)' }}>{subtitle}</p>}\n <div style={{ display: 'flex', alignItems: 'center', gap: 12, marginTop: 4 }}>\n {period && <span style={{ fontSize: 12, color: 'var(--color-text-tertiary, #8c92af)' }}>{period}</span>}\n {period && generatedAt && <span style={{ fontSize: 12, color: '#e5e7eb' }}>·</span>}\n {generatedAt && <span style={{ fontSize: 12, color: 'var(--color-text-tertiary, #8c92af)' }}>Generated {generatedAt}</span>}\n </div>\n </div>\n {status && <span style={{ padding: '3px 10px', borderRadius: 9999, fontSize: 11, fontWeight: 600, background: s.bg, color: s.color, whiteSpace: 'nowrap', flexShrink: 0 }}>{s.label}</span>}\n </div>\n );\n}\n","import type { ReportToolbarProps } from '../../report-types';\n\nexport function ReportToolbar({ period, prevPeriod, nextPeriod, actions }: ReportToolbarProps) {\n return (\n <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 12, padding: '8px 16px', background: 'var(--color-bg-secondary, #f9fafb)', borderBottom: '1px solid var(--color-border-default, #e5e7eb)', flexWrap: 'wrap' }}>\n <div style={{ display: 'flex', alignItems: 'center', gap: 4 }}>\n {prevPeriod && <button style={{ padding: '4px 10px', border: '1px solid var(--color-border-default, #e5e7eb)', borderRadius: 6, background: '#fff', color: 'var(--color-text-secondary, #595f7a)', fontSize: 12, cursor: 'pointer' }}>← {prevPeriod}</button>}\n <span style={{ padding: '4px 12px', border: '1px solid #022e40', borderRadius: 6, background: '#f0f9ff', color: '#022e40', fontSize: 12, fontWeight: 600 }}>{period}</span>\n {nextPeriod && <button style={{ padding: '4px 10px', border: '1px solid var(--color-border-default, #e5e7eb)', borderRadius: 6, background: '#fff', color: 'var(--color-text-secondary, #595f7a)', fontSize: 12, cursor: 'pointer' }}>{nextPeriod} →</button>}\n </div>\n {actions && actions.length > 0 && (\n <div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>\n {actions.map((action, i) => (\n <button key={i} style={{ padding: '5px 14px', border: action.variant === 'primary' ? 'none' : '1px solid var(--color-border-default, #e5e7eb)', borderRadius: 6, background: action.variant === 'primary' ? '#022e40' : '#fff', color: action.variant === 'primary' ? '#fff' : 'var(--color-text-secondary, #595f7a)', fontSize: 12, fontWeight: 500, cursor: 'pointer' }}>\n {action.label}\n </button>\n ))}\n </div>\n )}\n </div>\n );\n}\n","import type { FilterBarProps } from '../../report-types';\n\nexport function FilterBar({ periods, activePeriod, compareEnabled }: FilterBarProps) {\n return (\n <div style={{ display: 'flex', alignItems: 'center', gap: 8, padding: '8px 16px', background: 'var(--color-bg-secondary, #f9fafb)', borderBottom: '1px solid var(--color-border-default, #e5e7eb)', flexWrap: 'wrap' }}>\n <div style={{ display: 'flex', alignItems: 'center', gap: 2, padding: 2, background: 'var(--color-gray-100, #f3f4f6)', borderRadius: 8, border: '1px solid var(--color-border-light, #f3f4f6)' }}>\n {(periods ?? []).map(p => {\n const isActive = p.id === activePeriod;\n return (\n <button key={p.id} style={{ padding: '4px 12px', borderRadius: 6, border: 'none', background: isActive ? '#fff' : 'transparent', color: isActive ? 'var(--color-text-primary, #000626)' : 'var(--color-text-tertiary, #8c92af)', fontSize: 12, fontWeight: isActive ? 600 : 400, cursor: 'pointer', boxShadow: isActive ? '0 1px 2px rgba(0,0,0,0.08)' : 'none' }}>\n {p.label}\n </button>\n );\n })}\n </div>\n {compareEnabled != null && (\n <label style={{ display: 'flex', alignItems: 'center', gap: 6, cursor: 'pointer', fontSize: 12, color: 'var(--color-text-secondary, #595f7a)' }}>\n <span style={{ display: 'inline-flex', width: 28, height: 16, borderRadius: 9999, background: compareEnabled ? '#022e40' : 'var(--color-gray-300, #d1d5db)', alignItems: 'center', padding: '0 2px' }}>\n <span style={{ width: 12, height: 12, borderRadius: '50%', background: '#fff', transform: compareEnabled ? 'translateX(12px)' : 'translateX(0)', transition: 'transform 0.15s' }} />\n </span>\n Compare to previous\n </label>\n )}\n </div>\n );\n}\n","import type { BriefingCardProps } from '../../report-types';\n\nexport function BriefingCard({ title, body, actions }: BriefingCardProps) {\n return (\n <div style={{ background: 'var(--color-bg-primary, #fff)', border: '1px solid var(--color-border-default, #e5e7eb)', borderRadius: 12, padding: '20px 24px', display: 'flex', flexDirection: 'column', gap: 12 }}>\n {title && <h3 style={{ margin: 0, fontSize: 15, fontWeight: 600, color: 'var(--color-text-primary, #000626)' }}>{title}</h3>}\n {body && <p style={{ margin: 0, fontSize: 13, lineHeight: 1.6, color: 'var(--color-text-secondary, #595f7a)' }}>{body}</p>}\n {actions && actions.length > 0 && (\n <div style={{ display: 'flex', gap: 8, flexWrap: 'wrap' }}>\n {actions.map((action, i) => (\n <button key={i} style={{ padding: '6px 16px', border: '1px solid var(--color-border-default, #e5e7eb)', borderRadius: 8, background: 'var(--color-bg-secondary, #f9fafb)', color: 'var(--color-text-primary, #000626)', fontSize: 13, fontWeight: 500, cursor: 'pointer' }}>\n {action.label}\n </button>\n ))}\n </div>\n )}\n </div>\n );\n}\n","import type { ReactNode } from 'react';\nimport type { SectionCardProps } from '../../report-types';\n\nexport function SectionCard({ title, description, children }: SectionCardProps & { children?: ReactNode }) {\n return (\n <div style={{ background: 'var(--color-bg-primary, #fff)', border: '1px solid var(--color-border-default, #e5e7eb)', borderRadius: 12, overflow: 'hidden' }}>\n {(title || description) && (\n <div style={{ padding: '14px 20px', borderBottom: '1px solid var(--color-border-default, #e5e7eb)', background: 'var(--color-bg-secondary, #f9fafb)' }}>\n {title && <h3 style={{ margin: 0, fontSize: 14, fontWeight: 600, color: 'var(--color-text-primary, #000626)' }}>{title}</h3>}\n {description && <p style={{ margin: title ? '2px 0 0' : 0, fontSize: 12, color: 'var(--color-text-tertiary, #8c92af)' }}>{description}</p>}\n </div>\n )}\n {children && <div style={{ padding: 20 }}>{children}</div>}\n </div>\n );\n}\n","import type { EntityCardProps } from '../../report-types';\n\nconst STATUS_STYLES: Record<string, { bg: string; color: string }> = {\n Active: { bg: '#dcfce7', color: '#15803d' },\n Inactive: { bg: 'var(--color-gray-100, #f3f4f6)', color: 'var(--color-text-tertiary, #8c92af)' },\n Pending: { bg: '#fef9c3', color: '#d97706' },\n Suspended: { bg: '#fee2e2', color: '#dc2626' },\n};\n\nexport function EntityCard({ name, type, status, meta }: EntityCardProps) {\n const s = STATUS_STYLES[status ?? ''] ?? { bg: 'var(--color-gray-100, #f3f4f6)', color: 'var(--color-text-secondary, #595f7a)' };\n return (\n <div style={{ background: 'var(--color-bg-primary, #fff)', border: '1px solid var(--color-border-default, #e5e7eb)', borderRadius: 12, padding: '16px 20px', display: 'flex', flexDirection: 'column', gap: 12 }}>\n <div style={{ display: 'flex', alignItems: 'flex-start', justifyContent: 'space-between', gap: 8 }}>\n <div style={{ display: 'flex', flexDirection: 'column', gap: 2 }}>\n <span style={{ fontSize: 15, fontWeight: 600, color: 'var(--color-text-primary, #000626)' }}>{name}</span>\n {type && <span style={{ fontSize: 12, color: 'var(--color-text-tertiary, #8c92af)' }}>{type}</span>}\n </div>\n {status && <span style={{ padding: '3px 10px', borderRadius: 9999, fontSize: 11, fontWeight: 600, background: s.bg, color: s.color, flexShrink: 0 }}>{status}</span>}\n </div>\n {meta && meta.length > 0 && (\n <div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fill, minmax(140px, 1fr))', gap: '8px 16px', paddingTop: 8, borderTop: '1px solid var(--color-border-light, #f3f4f6)' }}>\n {meta.map((m, i) => (\n <div key={i} style={{ display: 'flex', flexDirection: 'column', gap: 2 }}>\n <span style={{ fontSize: 10, fontWeight: 700, textTransform: 'uppercase', letterSpacing: '0.06em', color: 'var(--color-text-tertiary, #8c92af)' }}>{m.label}</span>\n <span style={{ fontSize: 13, color: 'var(--color-text-primary, #000626)' }}>{m.value}</span>\n </div>\n ))}\n </div>\n )}\n </div>\n );\n}\n","import type { ReactNode } from 'react';\nimport type { StackProps } from '../../report-types';\n\nexport function Stack({ gap = 4, direction = 'vertical', children }: StackProps & { children?: ReactNode }) {\n return (\n <div style={{ display: 'flex', flexDirection: direction === 'horizontal' ? 'row' : 'column', gap: gap * 4, width: '100%' }}>\n {children}\n </div>\n );\n}\n","import type { ReactNode } from 'react';\nimport type { GridProps } from '../../report-types';\n\nexport function Grid({ columns = 2, gap = 4, children }: GridProps & { children?: ReactNode }) {\n return (\n <div style={{ display: 'grid', gridTemplateColumns: `repeat(${columns}, 1fr)`, gap: gap * 4, width: '100%' }}>\n {children}\n </div>\n );\n}\n","import type { BannerProps } from '../../report-types';\n\nconst VARIANT_STYLES: Record<string, { bg: string; border: string; titleColor: string; msgColor: string; icon: string }> = {\n info: { bg: 'var(--color-blue-50, #eff6ff)', border: 'var(--color-blue-200, #bfdbfe)', titleColor: '#1e40af', msgColor: '#3b82f6', icon: 'ℹ' },\n success: { bg: '#f0fdf4', border: '#bbf7d0', titleColor: '#166534', msgColor: '#16a34a', icon: '✓' },\n warning: { bg: '#fefce8', border: '#fde68a', titleColor: '#854d0e', msgColor: '#d97706', icon: '⚠' },\n error: { bg: '#fef2f2', border: '#fecaca', titleColor: '#991b1b', msgColor: '#dc2626', icon: '✕' },\n};\n\nexport function Banner({ variant = 'info', title, message, action }: BannerProps) {\n const s = VARIANT_STYLES[variant] ?? VARIANT_STYLES.info;\n\n return (\n <div style={{ display: 'flex', gap: 12, padding: '12px 16px', background: s.bg, border: `1px solid ${s.border}`, borderRadius: 10, alignItems: 'flex-start' }}>\n <span style={{ fontSize: 14, color: s.msgColor, flexShrink: 0, marginTop: 1 }}>{s.icon}</span>\n <div style={{ flex: 1, display: 'flex', flexDirection: 'column', gap: 2 }}>\n <span style={{ fontSize: 13, fontWeight: 600, color: s.titleColor }}>{title}</span>\n {message && <span style={{ fontSize: 12, color: s.msgColor }}>{message}</span>}\n </div>\n {action && (\n <button style={{ padding: '4px 12px', border: `1px solid ${s.border}`, borderRadius: 6, background: 'transparent', color: s.titleColor, fontSize: 12, fontWeight: 500, cursor: 'pointer', flexShrink: 0 }}>\n {action.label}\n </button>\n )}\n </div>\n );\n}\n","import type { StatusPillProps } from '../../report-types';\n\nconst VARIANT_STYLES: Record<string, { bg: string; color: string }> = {\n success: { bg: 'var(--dl-data-positive-bg, #dcfce7)', color: 'var(--dl-data-positive)' },\n warning: { bg: 'var(--dl-data-warning-bg, #fef9c3)', color: 'var(--dl-data-warning)' },\n error: { bg: 'var(--dl-data-negative-bg, #fee2e2)', color: 'var(--dl-data-negative)' },\n info: { bg: 'var(--color-blue-50, #eff6ff)', color: '#1d4ed8' },\n neutral: { bg: 'var(--color-gray-100, #f3f4f6)', color: 'var(--color-text-secondary, #595f7a)' },\n};\n\nexport function StatusPill({ label, variant = 'neutral' }: StatusPillProps) {\n const s = VARIANT_STYLES[variant] ?? VARIANT_STYLES.neutral;\n return (\n <span style={{ display: 'inline-flex', alignItems: 'center', padding: '3px 10px', borderRadius: 9999, fontSize: 11, fontWeight: 600, background: s.bg, color: s.color, whiteSpace: 'nowrap' }}>\n {label}\n </span>\n );\n}\n","import type { EmptyStateProps } from '../../report-types';\n\nexport function EmptyState({ title, description, action }: EmptyStateProps) {\n return (\n <div style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', gap: 12, padding: '48px 24px', textAlign: 'center' }}>\n <div style={{ width: 40, height: 40, borderRadius: '50%', background: 'var(--color-bg-secondary, #f9fafb)', border: '1px solid var(--color-border-default, #e5e7eb)', display: 'flex', alignItems: 'center', justifyContent: 'center', fontSize: 18, color: 'var(--color-text-tertiary, #8c92af)' }}>\n ○\n </div>\n <div style={{ display: 'flex', flexDirection: 'column', gap: 4 }}>\n <h3 style={{ margin: 0, fontSize: 15, fontWeight: 600, color: 'var(--color-text-primary, #000626)' }}>{title}</h3>\n {description && <p style={{ margin: 0, fontSize: 13, color: 'var(--color-text-secondary, #595f7a)', maxWidth: 360 }}>{description}</p>}\n </div>\n {action && (\n <button style={{ padding: '8px 20px', border: 'none', borderRadius: 8, background: '#022e40', color: '#ffffff', fontSize: 13, fontWeight: 600, cursor: 'pointer' }}>\n {action.label}\n </button>\n )}\n </div>\n );\n}\n","import type { ProgressBarProps } from '../../report-types';\n\nexport function ProgressBar({ value, label }: ProgressBarProps) {\n const pct = Math.min(100, Math.max(0, value));\n return (\n <div style={{ display: 'flex', flexDirection: 'column', gap: 6 }}>\n {label && (\n <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', fontSize: 12, color: 'var(--color-text-secondary, #595f7a)' }}>\n <span>{label}</span>\n <span style={{ fontWeight: 600, color: 'var(--color-text-primary, #000626)' }}>{pct}%</span>\n </div>\n )}\n <div style={{ height: 6, background: 'var(--color-gray-200, #e5e7eb)', borderRadius: 9999, overflow: 'hidden' }}>\n <div style={{ height: '100%', width: `${pct}%`, background: '#022e40', borderRadius: 9999, transition: 'width 0.3s ease' }} />\n </div>\n </div>\n );\n}\n","import type { WorkstreamCardProps } from '../../report-types';\n\nconst STATUS_STYLES: Record<string, { bg: string; color: string; label: string }> = {\n running: { bg: '#eff6ff', color: '#1d4ed8', label: 'Running' },\n paused: { bg: '#fef9c3', color: '#d97706', label: 'Paused' },\n completed: { bg: '#dcfce7', color: '#15803d', label: 'Done' },\n failed: { bg: '#fee2e2', color: '#dc2626', label: 'Failed' },\n pending: { bg: 'var(--color-gray-100, #f3f4f6)', color: 'var(--color-text-secondary, #595f7a)', label: 'Pending' },\n};\n\nexport function WorkstreamCard({ name, status, progressPct, currentStep, completedSteps, totalSteps, clientName }: WorkstreamCardProps) {\n const s = STATUS_STYLES[status] ?? STATUS_STYLES.pending;\n const pct = Math.min(100, Math.max(0, progressPct ?? 0));\n\n return (\n <div style={{ background: 'var(--color-bg-primary, #fff)', border: '1px solid var(--color-border-default, #e5e7eb)', borderRadius: 12, padding: '16px 20px', display: 'flex', flexDirection: 'column', gap: 12 }}>\n <div style={{ display: 'flex', alignItems: 'flex-start', justifyContent: 'space-between', gap: 8 }}>\n <div style={{ display: 'flex', flexDirection: 'column', gap: 2 }}>\n <span style={{ fontSize: 14, fontWeight: 600, color: 'var(--color-text-primary, #000626)' }}>{name}</span>\n {clientName && <span style={{ fontSize: 12, color: 'var(--color-text-tertiary, #8c92af)' }}>{clientName}</span>}\n </div>\n <span style={{ padding: '3px 10px', borderRadius: 9999, fontSize: 11, fontWeight: 600, background: s.bg, color: s.color, flexShrink: 0 }}>{s.label}</span>\n </div>\n {progressPct != null && (\n <div style={{ display: 'flex', flexDirection: 'column', gap: 6 }}>\n <div style={{ display: 'flex', justifyContent: 'space-between', fontSize: 12, color: 'var(--color-text-secondary, #595f7a)' }}>\n {currentStep && <span>{currentStep}</span>}\n {completedSteps != null && totalSteps != null && <span style={{ fontWeight: 600 }}>{completedSteps}/{totalSteps} steps</span>}\n </div>\n <div style={{ height: 4, background: 'var(--color-gray-200, #e5e7eb)', borderRadius: 9999, overflow: 'hidden' }}>\n <div style={{ height: '100%', width: `${pct}%`, background: status === 'failed' ? '#dc2626' : '#022e40', borderRadius: 9999 }} />\n </div>\n </div>\n )}\n </div>\n );\n}\n","import type { TaskCardProps } from '../../report-types';\n\nconst STATUS_STYLES: Record<string, { bg: string; color: string }> = {\n pending: { bg: 'var(--color-gray-100, #f3f4f6)', color: 'var(--color-text-secondary, #595f7a)' },\n running: { bg: '#eff6ff', color: '#1d4ed8' },\n done: { bg: '#dcfce7', color: '#15803d' },\n failed: { bg: '#fee2e2', color: '#dc2626' },\n skipped: { bg: 'var(--color-gray-100, #f3f4f6)', color: 'var(--color-text-tertiary, #8c92af)' },\n awaiting_approval: { bg: '#fef9c3', color: '#d97706' },\n};\n\nconst TYPE_LABEL: Record<string, string> = {\n data_extraction: 'Extraction', analysis: 'Analysis', document_creation: 'Document',\n api_call: 'API', human_review: 'Review', notification: 'Notify',\n};\n\nexport function TaskCard({ name, status, type, outputSummary }: TaskCardProps) {\n const s = STATUS_STYLES[status] ?? STATUS_STYLES.pending;\n const typeLabel = TYPE_LABEL[type ?? ''] ?? type ?? 'Task';\n return (\n <div style={{ background: 'var(--color-bg-primary, #fff)', border: '1px solid var(--color-border-default, #e5e7eb)', borderRadius: 10, padding: '12px 16px', display: 'flex', flexDirection: 'column', gap: 6 }}>\n <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 8 }}>\n <div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>\n <span style={{ padding: '2px 7px', borderRadius: 5, fontSize: 10, fontWeight: 700, textTransform: 'uppercase', letterSpacing: '0.06em', background: 'var(--color-bg-secondary, #f9fafb)', color: 'var(--color-text-tertiary, #8c92af)', flexShrink: 0 }}>{typeLabel}</span>\n <span style={{ fontSize: 13, fontWeight: 500, color: 'var(--color-text-primary, #000626)' }}>{name}</span>\n </div>\n <span style={{ padding: '2px 8px', borderRadius: 9999, fontSize: 11, fontWeight: 600, background: s.bg, color: s.color, flexShrink: 0 }}>{status}</span>\n </div>\n {outputSummary && <p style={{ margin: 0, fontSize: 12, color: 'var(--color-text-secondary, #595f7a)', paddingLeft: 2 }}>{outputSummary}</p>}\n </div>\n );\n}\n","import type { ApprovalCardProps } from '../../report-types';\n\nexport function ApprovalCard({ title, description, context, approveLabel, rejectLabel }: ApprovalCardProps) {\n return (\n <div style={{ background: 'var(--color-bg-primary, #fff)', border: '1px solid var(--color-border-default, #e5e7eb)', borderRadius: 12, padding: '20px 24px', display: 'flex', flexDirection: 'column', gap: 16 }}>\n <div style={{ display: 'flex', flexDirection: 'column', gap: 4 }}>\n <h3 style={{ margin: 0, fontSize: 15, fontWeight: 600, color: 'var(--color-text-primary, #000626)' }}>{title}</h3>\n {description && <p style={{ margin: 0, fontSize: 13, color: 'var(--color-text-secondary, #595f7a)' }}>{description}</p>}\n </div>\n {context && (\n <div style={{ padding: '10px 14px', background: 'var(--color-bg-secondary, #f9fafb)', borderRadius: 8, border: '1px solid var(--color-border-light, #f3f4f6)', fontSize: 12, color: 'var(--color-text-secondary, #595f7a)', fontFamily: 'Geist Mono, ui-monospace, monospace' }}>\n {context}\n </div>\n )}\n <div style={{ display: 'flex', gap: 8, justifyContent: 'flex-end' }}>\n {rejectLabel && (\n <button style={{ padding: '8px 20px', border: '1px solid var(--color-border-default, #e5e7eb)', borderRadius: 8, background: 'var(--color-bg-primary, #fff)', color: 'var(--color-text-secondary, #595f7a)', fontSize: 13, fontWeight: 500, cursor: 'pointer' }}>{rejectLabel}</button>\n )}\n <button style={{ padding: '8px 20px', border: 'none', borderRadius: 8, background: '#022e40', color: '#ffffff', fontSize: 13, fontWeight: 600, cursor: 'pointer' }}>{approveLabel}</button>\n </div>\n </div>\n );\n}\n","import type { DeltaPillProps } from '../../report-types';\n\nconst DIR_STYLES: Record<string, { bg: string; color: string }> = {\n up: { bg: 'var(--dl-data-positive-bg, #dcfce7)', color: 'var(--dl-data-positive)' },\n down: { bg: 'var(--dl-data-negative-bg, #fee2e2)', color: 'var(--dl-data-negative)' },\n flat: { bg: 'var(--color-gray-100, #f3f4f6)', color: 'var(--dl-data-neutral)' },\n warning: { bg: 'var(--dl-data-warning-bg, #fef9c3)', color: 'var(--dl-data-warning)' },\n};\n\nexport function DeltaPill({ value, direction }: DeltaPillProps) {\n const s = DIR_STYLES[direction ?? 'flat'] ?? DIR_STYLES.flat;\n return (\n <span style={{ display: 'inline-flex', alignItems: 'center', padding: '2px 8px', borderRadius: 9999, fontSize: 11, fontWeight: 600, fontFamily: 'Geist Mono, ui-monospace, monospace', background: s.bg, color: s.color, whiteSpace: 'nowrap' }}>\n {value}\n </span>\n );\n}\n","import type { VarianceBandProps } from '../../report-types';\n\nconst DIR_COLOR: Record<string, string> = {\n up: 'var(--dl-data-positive)',\n down: 'var(--dl-data-negative)',\n flat: 'var(--dl-data-neutral)',\n};\n\nconst MONO = 'Geist Mono, ui-monospace, monospace';\n\nexport function VarianceBand({ items }: VarianceBandProps) {\n return (\n <div style={{ display: 'flex', alignItems: 'stretch', background: 'var(--color-bg-secondary, #f9fafb)', border: '1px solid var(--color-border-default, #e5e7eb)', borderRadius: 8, overflow: 'hidden' }}>\n {items.map((item, i) => (\n <div key={i} style={{ flex: 1, display: 'flex', flexDirection: 'column', gap: 4, padding: '12px 16px', borderLeft: i > 0 ? '1px solid var(--color-border-default, #e5e7eb)' : undefined }}>\n <span style={{ fontSize: 10, fontWeight: 700, textTransform: 'uppercase', letterSpacing: '0.08em', color: 'var(--color-text-tertiary, #8c92af)' }}>{item.label}</span>\n <span style={{ fontSize: 16, fontWeight: 600, fontFamily: MONO, fontVariantNumeric: 'tabular-nums', color: DIR_COLOR[item.direction ?? 'flat'] ?? 'var(--dl-data-neutral)' }}>{item.value}</span>\n </div>\n ))}\n </div>\n );\n}\n","import { useState } from 'react';\nimport type { CommentaryBlockProps } from '../../report-types';\n\nconst VARIANT_STYLES: Record<string, { bg: string; border: string }> = {\n default: { bg: '#ffffff', border: 'var(--color-border-default, #e5e7eb)' },\n highlighted: { bg: 'var(--color-bg-secondary, #f9fafb)', border: 'var(--color-border-default, #e5e7eb)' },\n audit: { bg: '#fffbeb', border: '#fde68a' },\n};\n\nexport function CommentaryBlock({ content, author, authorRole, date, sectionLabel, expandable, defaultExpanded = true, variant = 'default', className }: CommentaryBlockProps) {\n const [expanded, setExpanded] = useState(defaultExpanded);\n const s = VARIANT_STYLES[variant] ?? VARIANT_STYLES.default;\n const shouldClamp = expandable && content.length > 200 && !expanded;\n\n return (\n <div className={className} style={{ display: 'flex', flexDirection: 'column', gap: 8, padding: '14px 16px', background: s.bg, border: `1px solid ${s.border}`, borderRadius: 10 }}>\n {sectionLabel && (\n <span style={{ fontSize: 10, fontWeight: 700, textTransform: 'uppercase', letterSpacing: '0.08em', color: 'var(--color-text-tertiary, #8c92af)' }}>{sectionLabel}</span>\n )}\n <p style={{ fontSize: 13, lineHeight: 1.6, color: 'var(--color-text-primary, #000626)', margin: 0, ...(shouldClamp ? { display: '-webkit-box', WebkitLineClamp: 3, WebkitBoxOrient: 'vertical' as const, overflow: 'hidden' } : {}) }}>\n {content}\n </p>\n {expandable && content.length > 200 && (\n <button onClick={() => setExpanded(!expanded)} style={{ background: 'none', border: 'none', cursor: 'pointer', fontSize: 12, fontWeight: 500, color: 'var(--dl-data-neutral, #6b7280)', padding: 0, textAlign: 'left' }}>\n {expanded ? 'Show less' : 'Show more'}\n </button>\n )}\n {(author || date) && (\n <>\n <div style={{ borderTop: '1px solid var(--color-border-light, #f3f4f6)', margin: '4px 0' }} />\n <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 8 }}>\n <div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>\n {author && (\n <div style={{ width: 24, height: 24, borderRadius: '50%', background: 'var(--color-gray-200, #e5e7eb)', display: 'flex', alignItems: 'center', justifyContent: 'center', fontSize: 10, fontWeight: 600, color: 'var(--color-text-secondary, #595f7a)' }}>\n {author.split(' ').map(w => w[0]).join('').slice(0, 2)}\n </div>\n )}\n <div style={{ display: 'flex', flexDirection: 'column' }}>\n {author && <span style={{ fontSize: 12, fontWeight: 500, color: 'var(--color-text-primary, #000626)' }}>{author}</span>}\n {authorRole && <span style={{ fontSize: 11, color: 'var(--color-text-tertiary, #8c92af)' }}>{authorRole}</span>}\n </div>\n </div>\n {date && <span style={{ fontSize: 11, color: 'var(--color-text-tertiary, #8c92af)' }}>{date}</span>}\n </div>\n </>\n )}\n </div>\n );\n}\n","import type { ReactNode } from 'react';\nimport type { ReportSectionProps } from '../../report-types';\n\nexport function ReportSection({ label, description, sectionNumber, children, noBorder, className }: ReportSectionProps & { children?: ReactNode }) {\n return (\n <section className={className} style={{ display: 'flex', flexDirection: 'column', gap: 4, ...(noBorder ? {} : { borderTop: '1px solid var(--color-border-default, #e5e7eb)', paddingTop: 16 }) }}>\n <h2 style={{ fontSize: 13, fontWeight: 700, textTransform: 'uppercase', letterSpacing: '0.08em', color: 'var(--color-text-primary, #000626)', margin: 0 }}>\n {sectionNumber && <span style={{ color: 'var(--color-text-tertiary, #8c92af)', marginRight: 8 }}>{sectionNumber}</span>}\n {label}\n </h2>\n {description && <p style={{ fontSize: 13, color: 'var(--color-text-secondary, #595f7a)', margin: 0 }}>{description}</p>}\n {children && <div style={{ display: 'flex', flexDirection: 'column', gap: 4 }}>{children}</div>}\n </section>\n );\n}\n","import type { ReportBannerProps } from '../../report-types';\n\nconst ICON: Record<string, string> = { info: 'ℹ', success: '✓', warning: '⚠', error: '✕' };\nconst TITLE_CLR: Record<string, string> = { info: '#1e40af', success: '#166534', warning: '#854d0e', error: '#991b1b' };\nconst MSG_CLR: Record<string, string> = { info: '#3b82f6', success: '#16a34a', warning: '#d97706', error: '#dc2626' };\nconst BG: Record<string, string> = { info: '#eff6ff', success: '#f0fdf4', warning: '#fefce8', error: '#fef2f2' };\nconst BORDER: Record<string, string> = { info: '#bfdbfe', success: '#bbf7d0', warning: '#fde68a', error: '#fecaca' };\n\nexport function ReportBanner({ variant = 'info', title, message, action, className }: ReportBannerProps) {\n const v = variant;\n return (\n <div className={className} style={{ display: 'flex', gap: 12, padding: '12px 16px', background: BG[v], border: `1px solid ${BORDER[v]}`, borderRadius: 10, alignItems: 'flex-start' }}>\n <span style={{ fontSize: 14, color: MSG_CLR[v], flexShrink: 0, marginTop: 1 }}>{ICON[v]}</span>\n <div style={{ flex: 1, display: 'flex', flexDirection: 'column', gap: 2 }}>\n <span style={{ fontSize: 13, fontWeight: 600, color: TITLE_CLR[v] }}>{title}</span>\n {message && <span style={{ fontSize: 12, color: MSG_CLR[v] }}>{message}</span>}\n </div>\n {action && (\n <button onClick={action.onClick} style={{ padding: '4px 12px', border: `1px solid ${BORDER[v]}`, borderRadius: 6, background: 'transparent', color: TITLE_CLR[v], fontSize: 12, fontWeight: 500, cursor: 'pointer', flexShrink: 0 }}>\n {action.label}\n </button>\n )}\n </div>\n );\n}\n","import type { PeriodSelectorProps } from '../../report-types';\n\nconst FORMAT_LABELS: Record<string, string> = { month: 'Monthly', quarter: 'Quarterly', year: 'Annual', custom: 'Custom' };\n\nconst NAV_BTN: React.CSSProperties = {\n display: 'inline-flex', alignItems: 'center', justifyContent: 'center',\n width: 28, height: 28, borderRadius: 6,\n border: '1px solid var(--color-border-default, #e5e7eb)',\n background: '#fff', color: 'var(--color-text-primary, #000626)',\n cursor: 'pointer', flexShrink: 0,\n};\n\nexport function PeriodSelector({ current, available = [], format, availableFormats = [], onPeriodChange, onFormatChange, hasPrev = true, hasNext = false, compact, className }: PeriodSelectorProps) {\n return (\n <div className={className} style={{ display: 'flex', alignItems: 'center', gap: compact ? 4 : 8, flexWrap: 'wrap' }}>\n <button style={{ ...NAV_BTN, opacity: hasPrev ? 1 : 0.4 }} disabled={!hasPrev} onClick={() => { if (hasPrev && available.length > 1) { const i = available.findIndex(p => p.id === current.id); if (i > 0) onPeriodChange?.(available[i - 1].id); } }} aria-label=\"Previous period\">\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\"><path d=\"M7.5 2L3.5 6L7.5 10\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" /></svg>\n </button>\n {available.length > 1 ? (\n <select value={current.id} onChange={e => onPeriodChange?.(e.target.value)} style={{ border: '1px solid var(--color-border-default, #e5e7eb)', borderRadius: 6, background: '#fff', fontSize: compact ? 12 : 13, fontWeight: 500, padding: compact ? '4px 8px' : '6px 12px', cursor: 'pointer', textAlign: 'center' as const }} aria-label=\"Select period\">\n {available.map(p => <option key={p.id} value={p.id}>{p.label}</option>)}\n </select>\n ) : (\n <span style={{ fontSize: compact ? 12 : 13, fontWeight: 600, color: 'var(--color-text-primary, #000626)', minWidth: 80, textAlign: 'center' as const }}>{current.label}</span>\n )}\n <button style={{ ...NAV_BTN, opacity: hasNext ? 1 : 0.4 }} disabled={!hasNext} onClick={() => { if (hasNext && available.length > 1) { const i = available.findIndex(p => p.id === current.id); if (i < available.length - 1) onPeriodChange?.(available[i + 1].id); } }} aria-label=\"Next period\">\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\"><path d=\"M4.5 2L8.5 6L4.5 10\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" /></svg>\n </button>\n {availableFormats.length > 1 && format && (\n <div style={{ display: 'flex', border: '1px solid var(--color-border-default, #e5e7eb)', borderRadius: 6, overflow: 'hidden' }} role=\"group\" aria-label=\"Period format\">\n {availableFormats.map(f => (\n <button key={f} onClick={() => onFormatChange?.(f)} aria-pressed={f === format} style={{ padding: compact ? '4px 8px' : '6px 12px', fontSize: compact ? 11 : 12, fontWeight: f === format ? 600 : 400, background: f === format ? 'var(--color-text-primary, #000626)' : '#fff', color: f === format ? '#fff' : 'var(--color-text-secondary, #595f7a)', border: 'none', cursor: 'pointer' }}>\n {FORMAT_LABELS[f] ?? f}\n </button>\n ))}\n </div>\n )}\n </div>\n );\n}\n","import type { ComparisonToggleProps } from '../../report-types';\n\nexport function ComparisonToggle({ modes, activeMode, onModeChange, variant = 'default', compact, className }: ComparisonToggleProps) {\n const isPills = variant === 'pills';\n return (\n <div className={className} role=\"group\" aria-label=\"Comparison mode\" style={{ display: 'flex', ...(isPills ? { gap: 4 } : { border: '1px solid var(--color-border-default, #e5e7eb)', borderRadius: 6, overflow: 'hidden' }) }}>\n {modes.map(m => {\n const active = m.id === activeMode;\n const label = compact && m.shortLabel ? m.shortLabel : m.label;\n const base: React.CSSProperties = { padding: compact ? '4px 8px' : '6px 12px', fontSize: compact ? 11 : 12, cursor: m.disabled ? 'not-allowed' : 'pointer', opacity: m.disabled ? 0.4 : 1, border: 'none', fontWeight: active ? 600 : 400, transition: 'background 0.15s, color 0.15s' };\n const colors: React.CSSProperties = isPills\n ? active ? { background: 'var(--color-text-primary, #000626)', color: '#fff', border: '1px solid var(--color-text-primary, #000626)', borderRadius: 6 } : { background: '#fff', color: 'var(--color-text-secondary, #595f7a)', border: '1px solid var(--color-border-default, #e5e7eb)', borderRadius: 6 }\n : active ? { background: 'var(--color-text-primary, #000626)', color: '#fff' } : { background: '#fff', color: 'var(--color-text-secondary, #595f7a)' };\n return (\n <button key={m.id} onClick={() => !m.disabled && onModeChange?.(m.id)} aria-pressed={active} disabled={m.disabled} style={{ ...base, ...colors }}>\n {label}\n </button>\n );\n })}\n </div>\n );\n}\n","import type { ExportBarProps } from '../../report-types';\n\nconst FORMAT_DEFAULTS: Record<string, { label: string; icon: string }> = {\n pdf: { label: 'PDF', icon: '⬇' },\n excel: { label: 'Excel', icon: '⬇' },\n csv: { label: 'CSV', icon: '⬇' },\n print: { label: 'Print', icon: '⎙' },\n};\n\nexport function ExportBar({ actions, label, size = 'md', className }: ExportBarProps) {\n const sm = size === 'sm';\n return (\n <div className={className} style={{ display: 'flex', alignItems: 'center', gap: 8, flexWrap: 'wrap' }}>\n {label && <span style={{ fontSize: 12, fontWeight: 500, color: 'var(--color-text-tertiary, #8c92af)', marginRight: 4 }}>{label}</span>}\n {actions.map(a => {\n const d = FORMAT_DEFAULTS[a.format] ?? { label: a.format, icon: '⬇' };\n return (\n <button key={a.format} onClick={a.onClick} disabled={a.disabled} style={{ display: 'inline-flex', alignItems: 'center', gap: 6, padding: sm ? '4px 8px' : '6px 12px', border: '1px solid var(--color-border-default, #e5e7eb)', borderRadius: 6, background: '#fff', color: 'var(--color-text-secondary, #595f7a)', fontSize: sm ? 11 : 12, fontWeight: 500, cursor: a.disabled ? 'not-allowed' : 'pointer', opacity: a.disabled ? 0.4 : 1 }}>\n <span style={{ color: 'var(--color-text-tertiary, #8c92af)' }}>{d.icon}</span>\n {a.label ?? d.label}\n </button>\n );\n })}\n </div>\n );\n}\n","import type { AuditStampProps } from '../../report-types';\n\nconst STATUS_STYLES: Record<string, { label: string; bg: string; color: string }> = {\n draft: { label: 'Draft', bg: 'var(--color-gray-200, #e5e7eb)', color: 'var(--color-text-secondary, #595f7a)' },\n reviewed: { label: 'Reviewed', bg: '#fef9c3', color: '#854d0e' },\n 'signed-off': { label: 'Signed Off', bg: '#bbf7d0', color: '#166534' },\n filed: { label: 'Filed', bg: '#bfdbfe', color: '#1e40af' },\n};\n\nexport function AuditStamp({ firmName, preparedBy, reviewedBy, date, reference, status = 'draft', className }: AuditStampProps) {\n const s = STATUS_STYLES[status] ?? STATUS_STYLES.draft;\n return (\n <div className={className} style={{ display: 'flex', alignItems: 'flex-start', justifyContent: 'space-between', borderTop: '1px solid var(--color-border-default, #e5e7eb)', paddingTop: 12 }}>\n <div style={{ display: 'flex', flexDirection: 'column', gap: 4 }}>\n {firmName && <span style={{ fontSize: 13, fontWeight: 600, color: 'var(--color-text-primary, #000626)' }}>{firmName}</span>}\n {reference && <span style={{ fontSize: 11, fontWeight: 700, textTransform: 'uppercase', letterSpacing: '0.08em', color: 'var(--color-text-tertiary, #8c92af)' }}>{reference}</span>}\n <div style={{ display: 'flex', gap: 16, marginTop: 4 }}>\n {preparedBy && <span style={{ fontSize: 12, color: 'var(--color-text-secondary, #595f7a)' }}>Prepared by: <strong>{preparedBy}</strong></span>}\n {reviewedBy && <span style={{ fontSize: 12, color: 'var(--color-text-secondary, #595f7a)' }}>Reviewed by: <strong>{reviewedBy}</strong></span>}\n {date && <span style={{ fontSize: 12, color: 'var(--color-text-tertiary, #8c92af)' }}>{date}</span>}\n </div>\n </div>\n <span style={{ fontSize: 11, fontWeight: 600, padding: '3px 10px', borderRadius: 999, background: s.bg, color: s.color, whiteSpace: 'nowrap' }}>{s.label}</span>\n </div>\n );\n}\n","import type { FootnoteListProps } from '../../report-types';\n\nexport function FootnoteList({ footnotes, className }: FootnoteListProps) {\n if (!footnotes || footnotes.length === 0) return null;\n return (\n <div className={className} style={{ borderTop: '1px solid var(--color-border-default, #e5e7eb)', paddingTop: 16, display: 'flex', flexDirection: 'column', gap: 6 }}>\n <span style={{ fontSize: 10, fontWeight: 700, textTransform: 'uppercase', letterSpacing: '0.08em', color: 'var(--color-text-tertiary, #8c92af)' }}>Notes</span>\n {footnotes.map(fn => (\n <div key={fn.number} style={{ display: 'flex', gap: 8, alignItems: 'flex-start' }}>\n <span style={{ fontSize: 11, fontWeight: 700, color: '#1e40af', minWidth: 20, textAlign: 'right' as const, fontVariantNumeric: 'tabular-nums' }}>[{fn.number}]</span>\n <span style={{ fontSize: 12, color: 'var(--color-text-secondary, #595f7a)', lineHeight: 1.5 }}>{fn.text}</span>\n </div>\n ))}\n </div>\n );\n}\n","import type { FootnoteRefProps } from '../../report-types';\n\nexport function FootnoteRef({ number, onClick, className }: FootnoteRefProps) {\n return (\n <sup\n className={className}\n onClick={() => onClick?.(number)}\n title={`Footnote ${number}`}\n aria-label={`Footnote ${number}`}\n style={{ fontSize: 10, fontWeight: 700, color: '#1e40af', cursor: onClick ? 'pointer' : 'default', marginLeft: 1 }}\n >\n [{number}]\n </sup>\n );\n}\n","import type { SparklineCellProps } from '../../report-types';\n\nconst DIR_STROKE: Record<string, string> = {\n up: '#166534',\n down: '#dc2626',\n flat: '#6b7280',\n};\n\nfunction deriveDirection(data: Array<{ value: number }>): 'up' | 'down' | 'flat' {\n if (data.length < 2) return 'flat';\n const first = data[0].value;\n const last = data[data.length - 1].value;\n if (last > first) return 'up';\n if (last < first) return 'down';\n return 'flat';\n}\n\nexport function SparklineCell({ data, direction, width = 80, height = 24, showLastDot = true, className }: SparklineCellProps) {\n if (!data || data.length < 2) return null;\n\n const dir = direction ?? deriveDirection(data);\n const stroke = DIR_STROKE[dir] ?? DIR_STROKE.flat;\n const values = data.map(d => d.value);\n const min = Math.min(...values);\n const max = Math.max(...values);\n const range = max - min || 1;\n const pad = 3;\n\n const points = values.map((v, i) => {\n const x = pad + (i / (values.length - 1)) * (width - pad * 2);\n const y = pad + (1 - (v - min) / range) * (height - pad * 2);\n return `${x},${y}`;\n }).join(' ');\n\n const lastX = pad + ((values.length - 1) / (values.length - 1)) * (width - pad * 2);\n const lastY = pad + (1 - (values[values.length - 1] - min) / range) * (height - pad * 2);\n\n return (\n <svg className={className} width={width} height={height} viewBox={`0 0 ${width} ${height}`} fill=\"none\" aria-hidden=\"true\">\n <polyline points={points} stroke={stroke} strokeWidth={1.5} fill=\"none\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n {showLastDot && <circle cx={lastX} cy={lastY} r={2.5} fill={stroke} />}\n </svg>\n );\n}\n","import { useRef, useState, useEffect } from 'react';\nimport type { StackedBarChartProps, StackedBarDataPoint, StackedBarSeries } from '../../report-types';\n\nconst ML = 48; // margin left (y-axis labels)\nconst MR = 4; // margin right\nconst MT = 4; // margin top\nconst MB = 24; // margin bottom (x-axis labels)\n\nfunction niceMax(raw: number): number {\n if (raw <= 0) return 100;\n const mag = Math.pow(10, Math.floor(Math.log10(raw)));\n const norm = raw / mag;\n const step = [1, 2, 2.5, 5, 10].find(s => s >= norm) ?? 10;\n return step * mag;\n}\n\nfunction roundedTopRect(x: number, y: number, w: number, h: number, r: number): string {\n const cr = Math.min(r, w / 2, h / 2);\n return `M${x},${y + h} L${x},${y + cr} Q${x},${y} ${x + cr},${y} L${x + w - cr},${y} Q${x + w},${y} ${x + w},${y + cr} L${x + w},${y + h} Z`;\n}\n\nexport function StackedBarChart({\n data,\n series,\n height = 200,\n formatYTick,\n formatXTick,\n formatTooltipHeader,\n formatTooltipValue,\n referenceLine,\n className,\n}: StackedBarChartProps) {\n const containerRef = useRef<HTMLDivElement>(null);\n const [containerWidth, setContainerWidth] = useState(0);\n\n useEffect(() => {\n const el = containerRef.current;\n if (!el || typeof ResizeObserver === 'undefined') return;\n const ro = new ResizeObserver(entries => {\n setContainerWidth(entries[0]?.contentRect.width ?? 0);\n });\n ro.observe(el);\n return () => ro.disconnect();\n }, []);\n\n const [hover, setHover] = useState<{ index: number; mouseX: number; mouseY: number } | null>(null);\n\n if (!data.length || containerWidth === 0) {\n return (\n <div\n ref={containerRef}\n data-testid=\"stacked-bar-chart\"\n className={className}\n style={{ width: '100%', height }}\n />\n );\n }\n\n const plotWidth = containerWidth - ML - MR;\n const plotHeight = height - MT - MB;\n const n = data.length;\n const slotWidth = plotWidth / n;\n const barWidth = Math.max(8, Math.min(28, Math.floor(slotWidth) - 4));\n const barOffset = (slotWidth - barWidth) / 2;\n\n const maxRaw = data.reduce((max, d) => {\n const total = series.reduce((s, sr) => s + Number(d[sr.key] ?? 0), 0);\n return Math.max(max, total);\n }, 0);\n const yMax = niceMax(Math.max(maxRaw, referenceLine?.value ?? 0));\n\n const TICK_COUNT = 5;\n const yTicks = Array.from({ length: TICK_COUNT }, (_, i) => (yMax / (TICK_COUNT - 1)) * i);\n\n function yPixel(v: number): number {\n return MT + plotHeight - (v / yMax) * plotHeight;\n }\n\n function handleMouseMove(e: React.MouseEvent<SVGRectElement>) {\n const svg = e.currentTarget.closest('svg');\n if (!svg) return;\n const rect = svg.getBoundingClientRect();\n const svgX = e.clientX - rect.left;\n const svgY = e.clientY - rect.top;\n const idx = Math.floor((svgX - ML) / slotWidth);\n if (idx >= 0 && idx < n) {\n setHover({ index: idx, mouseX: svgX, mouseY: svgY });\n } else if (hover !== null) {\n // Only clear when transitioning out — avoids redundant null→null updates\n setHover(null);\n }\n }\n\n const tooltipEl = hover !== null ? (() => {\n const d = data[hover.index];\n const total = series.reduce((s: number, sr: StackedBarSeries) => s + Number(d[sr.key] ?? 0), 0);\n const TOOLTIP_WIDTH = 160;\n const leftPos = hover.mouseX + 12 + TOOLTIP_WIDTH > containerWidth\n ? hover.mouseX - 12 - TOOLTIP_WIDTH\n : hover.mouseX + 12;\n return (\n <div\n style={{\n position: 'absolute',\n left: leftPos,\n top: Math.max(0, hover.mouseY - 8),\n pointerEvents: 'none',\n zIndex: 50,\n background: '#fff',\n border: '1px solid #e5e7eb',\n borderRadius: 8,\n boxShadow: '0 4px 12px rgba(0,0,0,0.08)',\n padding: '8px 12px',\n fontSize: 12,\n minWidth: 140,\n }}\n >\n <div style={{ fontWeight: 500, color: '#374151', marginBottom: 6 }}>\n {formatTooltipHeader ? formatTooltipHeader(d.x) : d.x}\n </div>\n {[...series].reverse().map(sr => {\n const val = Number(d[sr.key] ?? 0);\n return (\n <div key={sr.key} style={{ display: 'flex', justifyContent: 'space-between', gap: 16, marginBottom: 2 }}>\n <span style={{ display: 'flex', alignItems: 'center', gap: 6, color: '#6b7280' }}>\n <span style={{ width: 8, height: 8, borderRadius: '50%', background: sr.color, flexShrink: 0, display: 'inline-block' }} />\n {sr.label}\n </span>\n <span style={{ fontWeight: 500, color: '#1f2937', fontVariantNumeric: 'tabular-nums' }}>\n {formatTooltipValue ? formatTooltipValue(val) : String(val)}\n </span>\n </div>\n );\n })}\n {series.length > 1 && (\n <div style={{ marginTop: 6, paddingTop: 6, borderTop: '1px solid #f3f4f6', display: 'flex', justifyContent: 'space-between' }}>\n <span style={{ color: '#9ca3af' }}>Total</span>\n <span style={{ fontWeight: 600, color: '#1f2937', fontVariantNumeric: 'tabular-nums' }}>\n {formatTooltipValue ? formatTooltipValue(total) : String(total)}\n </span>\n </div>\n )}\n </div>\n );\n })() : null;\n\n return (\n <div\n ref={containerRef}\n data-testid=\"stacked-bar-chart\"\n className={className}\n style={{ position: 'relative', width: '100%', height }}\n >\n <svg width=\"100%\" height={height} aria-hidden=\"true\">\n {yTicks.filter(t => t > 0).map(t => (\n <line\n key={t}\n x1={ML} y1={yPixel(t)}\n x2={ML + plotWidth} y2={yPixel(t)}\n stroke=\"#e5e7eb\" strokeWidth={1}\n />\n ))}\n\n {yTicks.map(t => (\n <text\n key={t}\n x={ML - 6} y={yPixel(t)}\n textAnchor=\"end\" dominantBaseline=\"middle\"\n fontSize={11} fill=\"#9ca3af\"\n >\n {formatYTick ? formatYTick(t) : String(t)}\n </text>\n ))}\n\n {hover !== null && (\n <rect\n x={ML + hover.index * slotWidth}\n y={MT}\n width={slotWidth}\n height={plotHeight}\n fill=\"rgba(0,0,0,0.04)\"\n />\n )}\n\n {data.map((d, i) => {\n const bx = ML + i * slotWidth + barOffset;\n let topIdx = -1;\n for (let s = series.length - 1; s >= 0; s--) {\n if (Number(d[series[s].key] ?? 0) > 0) { topIdx = s; break; }\n }\n let cumBase = 0;\n return (\n <g key={d.x}>\n {series.map((sr, si) => {\n const val = Number(d[sr.key] ?? 0);\n if (val <= 0) { return null; }\n const rh = (val / yMax) * plotHeight;\n const ry = yPixel(cumBase + val);\n cumBase += val;\n if (si === topIdx) {\n return <path key={sr.key} d={roundedTopRect(bx, ry, barWidth, rh, 3)} fill={sr.color} />;\n }\n return <rect key={sr.key} x={bx} y={ry} width={barWidth} height={rh} fill={sr.color} />;\n })}\n </g>\n );\n })}\n\n {data.map((d: StackedBarDataPoint, i: number) => (\n <text\n key={d.x}\n x={ML + i * slotWidth + slotWidth / 2}\n y={MT + plotHeight + 14}\n textAnchor=\"middle\"\n fontSize={11} fill=\"#9ca3af\"\n >\n {formatXTick ? formatXTick(d.x) : d.x}\n </text>\n ))}\n\n {referenceLine && (\n <line\n x1={ML} y1={yPixel(referenceLine.value)}\n x2={ML + plotWidth} y2={yPixel(referenceLine.value)}\n stroke={referenceLine.color ?? '#E24B4A'}\n strokeDasharray={referenceLine.strokeDasharray ?? '4 3'}\n strokeWidth={1.5}\n />\n )}\n\n <rect\n x={ML} y={MT}\n width={plotWidth} height={plotHeight}\n fill=\"transparent\"\n onMouseMove={handleMouseMove}\n onMouseLeave={() => setHover(null)}\n />\n </svg>\n\n {tooltipEl}\n </div>\n );\n}\n","import { useState } from 'react';\nimport type { DrillDownRowProps } from '../../report-types';\n\nexport function DrillDownRow({ cells, drillRows, colCount: _colCount, defaultExpanded = false, onToggle, rowClassName, drillRowClassName }: DrillDownRowProps) {\n const [expanded, setExpanded] = useState(defaultExpanded);\n\n const toggle = () => {\n const next = !expanded;\n setExpanded(next);\n onToggle?.(next);\n };\n\n return (\n <>\n <tr\n className={rowClassName}\n onClick={toggle}\n onKeyDown={e => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); toggle(); } }}\n role=\"button\"\n tabIndex={0}\n aria-expanded={expanded}\n style={{ cursor: 'pointer', background: '#fff' }}\n >\n {cells.map((cell, i) => (\n <td key={i} style={{ padding: '10px 16px', fontSize: 13, color: i === 0 ? 'var(--color-text-primary, #000626)' : 'var(--color-text-secondary, #595f7a)' }}>\n {i === 0 ? (\n <span style={{ display: 'flex', alignItems: 'center', gap: 6 }}>\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" style={{ transform: expanded ? 'rotate(90deg)' : 'rotate(0deg)', transition: 'transform 0.15s ease-out', flexShrink: 0 }}>\n <path d=\"M3 1L7 5L3 9\" stroke=\"currentColor\" strokeWidth=\"1.5\" fill=\"none\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n {cell}\n </span>\n ) : cell}\n </td>\n ))}\n </tr>\n {expanded && drillRows.map(row => (\n <tr key={row.key} className={drillRowClassName} style={{ background: 'var(--color-bg-secondary, #f9fafb)', borderBottom: '1px solid var(--color-gray-100, #f3f4f6)' }}>\n {row.cells.map((cell, i) => (\n <td key={i} style={{ padding: '8px 16px', paddingLeft: i === 0 ? 32 : 16, fontSize: 12, color: 'var(--color-text-secondary, #595f7a)' }}>\n {cell}\n </td>\n ))}\n </tr>\n ))}\n </>\n );\n}\n","import type { ReactNode } from 'react';\nimport type { ReportPageProps } from '../../report-types';\n\nconst PRINT_STYLES = `\n@media print {\n .report-page { break-inside: avoid; }\n .no-print { display: none !important; }\n}\n`;\n\nexport function ReportPage({ printHeader, printFooter, children, className }: ReportPageProps & { children?: ReactNode }) {\n return (\n <>\n <style>{PRINT_STYLES}</style>\n {printHeader && <div className=\"hidden print:block\">{printHeader}</div>}\n <div className={`report-page ${className ?? ''}`} style={{ display: 'flex', flexDirection: 'column', gap: 24 }}>\n {children}\n </div>\n {printFooter && <div className=\"hidden print:block\">{printFooter}</div>}\n </>\n );\n}\n","/**\n * UIRenderer — renders Archie UIBlock[] trees.\n *\n * Simplified from Archie's UIRenderer: no Zod validation.\n * Components receive props directly; rendering errors are caught per-block.\n */\n\nimport { createElement, Component, type ComponentType, type ReactNode, type ErrorInfo } from 'react';\nimport type { UIBlock } from './report-types';\nimport { KpiStrip } from './components/report/KpiStrip';\nimport { MetricCard } from './components/report/MetricCard';\nimport { StatCard } from './components/report/StatCard';\nimport { FinancialTable } from './components/report/FinancialTable';\nimport { DataTable } from './components/report/DataTable';\nimport { PivotTable } from './components/report/PivotTable';\nimport { ReportHeader } from './components/report/ReportHeader';\nimport { ReportToolbar } from './components/report/ReportToolbar';\nimport { FilterBar } from './components/report/FilterBar';\nimport { BriefingCard } from './components/report/BriefingCard';\nimport { SectionCard } from './components/report/SectionCard';\nimport { EntityCard } from './components/report/EntityCard';\nimport { Stack } from './components/report/Stack';\nimport { Grid } from './components/report/Grid';\nimport { Banner } from './components/report/Banner';\nimport { StatusPill } from './components/report/StatusPill';\nimport { EmptyState } from './components/report/EmptyState';\nimport { ProgressBar } from './components/report/ProgressBar';\nimport { WorkstreamCard } from './components/report/WorkstreamCard';\nimport { TaskCard } from './components/report/TaskCard';\nimport { ApprovalCard } from './components/report/ApprovalCard';\nimport { DeltaPill } from './components/report/DeltaPill';\nimport { VarianceBand } from './components/report/VarianceBand';\nimport { CommentaryBlock } from './components/report/CommentaryBlock';\nimport { ReportSection } from './components/report/ReportSection';\nimport { ReportBanner } from './components/report/ReportBanner';\nimport { PeriodSelector } from './components/report/PeriodSelector';\nimport { ComparisonToggle } from './components/report/ComparisonToggle';\nimport { ExportBar } from './components/report/ExportBar';\nimport { AuditStamp } from './components/report/AuditStamp';\nimport { FootnoteList } from './components/report/FootnoteList';\nimport { FootnoteRef } from './components/report/FootnoteRef';\nimport { SparklineCell } from './components/report/SparklineCell';\nimport { StackedBarChart } from './components/report/StackedBarChart';\nimport { DrillDownRow } from './components/report/DrillDownRow';\nimport { ReportPage } from './components/report/ReportPage';\n\n// ── Component registry ────────────────────────────────────────────────────────\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst REGISTRY: Record<string, ComponentType<any>> = {\n KpiStrip, MetricCard, StatCard,\n FinancialTable, DataTable, PivotTable,\n ReportHeader, ReportToolbar, FilterBar,\n BriefingCard, SectionCard, EntityCard,\n Stack, Grid,\n Banner, StatusPill, EmptyState, ProgressBar,\n WorkstreamCard, TaskCard, ApprovalCard,\n DeltaPill, VarianceBand,\n CommentaryBlock, ReportSection, ReportBanner,\n PeriodSelector, ComparisonToggle, ExportBar,\n AuditStamp, FootnoteList, FootnoteRef,\n SparklineCell, StackedBarChart, DrillDownRow, ReportPage,\n};\n\n// ── Error boundary (per block) ────────────────────────────────────────────────\n\ninterface BlockErrorBoundaryState { error: Error | null }\n\nclass BlockErrorBoundary extends Component<{ children: ReactNode }, BlockErrorBoundaryState> {\n constructor(props: { children: ReactNode }) {\n super(props);\n this.state = { error: null };\n }\n\n static getDerivedStateFromError(error: Error): BlockErrorBoundaryState {\n return { error };\n }\n\n override componentDidCatch(error: Error, info: ErrorInfo) {\n console.warn('[UIRenderer] block render error:', error, info);\n }\n\n override render() {\n if (this.state.error) {\n return (\n <div style={{ padding: '8px 12px', borderRadius: 6, background: '#fef2f2', border: '1px solid #fecaca', fontSize: 12, color: '#991b1b' }}>\n Render error: {this.state.error.message}\n </div>\n );\n }\n return this.props.children;\n }\n}\n\n// ── UIBlockRenderer ───────────────────────────────────────────────────────────\n\nfunction UIBlockRenderer({ block }: { block: UIBlock }) {\n const Component = REGISTRY[block.component];\n\n if (!Component) {\n return (\n <div style={{ padding: '8px 12px', borderRadius: 6, background: '#f9fafb', border: '1px solid #e5e7eb', fontSize: 12, color: '#6b7280' }}>\n Unknown component: <code>{block.component}</code>\n </div>\n );\n }\n\n const wrapCls =\n block.layout === 'aside'\n ? 'w-72 shrink-0'\n : block.layout === 'inline'\n ? 'inline-flex'\n : 'w-full';\n\n const childContent =\n block.children && block.children.length > 0\n ? <UIRenderer blocks={block.children} />\n : undefined;\n\n return (\n <BlockErrorBoundary>\n <div className={wrapCls}>\n {createElement(\n Component,\n block.props as Record<string, unknown>,\n childContent,\n )}\n </div>\n </BlockErrorBoundary>\n );\n}\n\n// ── UIRenderer ────────────────────────────────────────────────────────────────\n\nexport function UIRenderer({ blocks }: { blocks: UIBlock[] }) {\n if (!blocks || blocks.length === 0) return null;\n\n return (\n <div className=\"flex flex-col gap-3 w-full\">\n {blocks.map(block => (\n <UIBlockRenderer key={block.id} block={block} />\n ))}\n </div>\n );\n}\n"],"names":["WEB_PLATFORM","MAC_PLATFORM","WINDOWS_PLATFORM","PLATFORM_TOKENS","BRAND_PROFILES","archieWeb","archieMac","marthaWeb","marthaMac","ARCHIE_WEB","ARCHIE_MAC","MARTHA_WEB","MARTHA_MAC","DEFAULT_BRAND","PlatformContext","createContext","PlatformProvider","platform","brand","children","jsx","usePlatform","useContext","useBrand","usePlatformTokens","useTokens","pt","c","_a","_b","_c","_d","_e","_f","_g","_h","_i","_j","_k","_l","_m","_n","_o","_p","_q","_r","_s","r","e","f","n","o","clsx","CLASS_PART_SEPARATOR","createClassGroupUtils","config","classMap","createClassMap","conflictingClassGroups","conflictingClassGroupModifiers","className","classParts","getGroupRecursive","getGroupIdForArbitraryProperty","classGroupId","hasPostfixModifier","conflicts","classPartObject","currentClassPart","nextClassPartObject","classGroupFromNextClassPart","classRest","validator","arbitraryPropertyRegex","arbitraryPropertyClassName","property","theme","classGroups","processClassesRecursively","classGroup","classDefinition","classPartObjectToEdit","getPart","isThemeGetter","key","path","currentClassPartObject","pathPart","func","createLruCache","maxCacheSize","cacheSize","cache","previousCache","update","value","IMPORTANT_MODIFIER","MODIFIER_SEPARATOR","MODIFIER_SEPARATOR_LENGTH","createParseClassName","prefix","experimentalParseClassName","parseClassName","modifiers","bracketDepth","parenDepth","modifierStart","postfixModifierPosition","index","currentCharacter","baseClassNameWithImportantModifier","baseClassName","stripImportantModifier","hasImportantModifier","maybePostfixModifierPosition","fullPrefix","parseClassNameOriginal","createSortModifiers","orderSensitiveModifiers","modifier","sortedModifiers","unsortedModifiers","createConfigUtils","SPLIT_CLASSES_REGEX","mergeClassList","classList","configUtils","getClassGroupId","getConflictingClassGroupIds","sortModifiers","classGroupsInConflict","classNames","result","originalClassName","isExternal","variantModifier","modifierId","classId","conflictGroups","i","group","twJoin","argument","resolvedValue","string","toValue","mix","k","createTailwindMerge","createConfigFirst","createConfigRest","cacheGet","cacheSet","functionToCall","initTailwindMerge","previousConfig","createConfigCurrent","tailwindMerge","cachedResult","fromTheme","themeGetter","arbitraryValueRegex","arbitraryVariableRegex","fractionRegex","tshirtUnitRegex","lengthUnitRegex","colorFunctionRegex","shadowRegex","imageRegex","isFraction","isNumber","isInteger","isPercent","isTshirtSize","isAny","isLengthOnly","isNever","isShadow","isImage","isAnyNonArbitrary","isArbitraryValue","isArbitraryVariable","isArbitrarySize","getIsArbitraryValue","isLabelSize","isArbitraryLength","isLabelLength","isArbitraryNumber","isLabelNumber","isArbitraryPosition","isLabelPosition","isArbitraryImage","isLabelImage","isArbitraryShadow","isLabelShadow","isArbitraryVariableLength","getIsArbitraryVariable","isArbitraryVariableFamilyName","isLabelFamilyName","isArbitraryVariablePosition","isArbitraryVariableSize","isArbitraryVariableImage","isArbitraryVariableShadow","testLabel","testValue","shouldMatchNoLabel","label","getDefaultConfig","themeColor","themeFont","themeText","themeFontWeight","themeTracking","themeLeading","themeBreakpoint","themeContainer","themeSpacing","themeRadius","themeShadow","themeInsetShadow","themeTextShadow","themeDropShadow","themeBlur","themePerspective","themeAspect","themeEase","themeAnimate","scaleBreak","scalePosition","scalePositionWithArbitrary","scaleOverflow","scaleOverscroll","scaleUnambiguousSpacing","scaleInset","scaleGridTemplateColsRows","scaleGridColRowStartAndEnd","scaleGridColRowStartOrEnd","scaleGridAutoColsRows","scaleAlignPrimaryAxis","scaleAlignSecondaryAxis","scaleMargin","scaleSizing","scaleColor","scaleBgPosition","scaleBgRepeat","scaleBgSize","scaleGradientStopPosition","scaleRadius","scaleBorderWidth","scaleLineStyle","scaleBlendMode","scaleMaskImagePosition","scaleBlur","scaleRotate","scaleScale","scaleSkew","scaleTranslate","twMerge","cn","inputs","falsyToString","cx","cva","base","props","_config_compoundVariants","variants","defaultVariants","getVariantClassNames","variant","variantProp","defaultVariantProp","variantKey","propsWithoutUndefined","acc","param","getCompoundVariantClassNames","cvClass","cvClassName","compoundVariantOptions","avatarContainerStyles","avatarTextStyles","avatarImageStyles","generateInitials","name","words","getPlaceholderImage","seed","size","Avatar","forwardRef","type","shape","initials","src","alt","fallbackInitials","ref","imageError","setImageError","useState","placeholderSeed","useMemo","imageSrc","displayInitials","shouldShowImage","handleImageError","textBackgroundStyle","statusIndicatorContainerStyles","statusIndicatorDotStyles","statusIndicatorPingStyles","variantLabels","StatusIndicator","animated","jsxs","deltaPillStyles","DeltaPill","direction","statusPillStyles","StatusPill","showDot","icon","FootnoteRef","number","onClick","DIR_STROKE","deriveDirection","data","delta","SparklineCell","width","height","showLastDot","dir","stroke","values","d","min","range","pad","w","h","points","x","y","polyline","lastPoint","lastX","lastY","variantClassMap","defaultElementMap","colorClassMap","weightClassMap","fontFamilyClassMap","Typography","as","color","weight","fontFamily","Component","variantClass","colorClass","weightClass","fontFamilyClass","colorMap","LogoA","colorVariant","FullLogo","aspectRatio","SignatureA","animationDuration","animationDelay","uniqueId","useId","mainPathLength","artifactCardStyles","hoverBackgroundStyles","animatedGradientStyles","previewContainerStyles","previewBoxStyles","previewBoxInnerStyles","skeletonLineStyles","contentContainerStyles","titleStyles","subtitleStyles","iconContainerStyles","iconActiveStyles","iconInactiveStyles","iconStyles","errorIconStyles","skeletonLineVariants","contentSlideVariants","iconActiveVariants","iconInactiveVariants","SKELETON_WIDTHS","ArtifactCard","title","subtitle","controlledStatus","onActionClick","disabled","isHovered","setIsHovered","effectiveStatus","animationState","handleMouseEnter","useCallback","handleMouseLeave","handleClick","handleActionClick","handleKeyDown","renderPreview","Loader","TriangleAlert","motion","renderActionIcon","RotateCcw","Fragment","ArrowUp","breadcrumbsStyles","breadcrumbItemStyles","separatorStyles","Breadcrumbs","items","separator","ChevronRight","item","isLast","content","SIZE_CLASSES","Button","loading","leftIcon","rightIcon","startIcon","endIcon","style","onMouseEnter","onMouseLeave","tk","isDisabled","resolvedLeftIcon","resolvedRightIcon","variantStyles","fileIconContainerStyles","FILE_TYPE_MAP","FileText","Pdf","Grid","Code","WhiteboardView","Archive","Video","Volume2","DEFAULT_FILE_TYPE_CONFIG","getFileExtension","filename","lastDotIndex","getFileTypeConfig","extension","ICON_SIZES","FileIcon","IconComponent","iconSize","chipContainerStyles","chipLabelStyles","chipIconStyles","chipProgressBarStyles","chipLeadingIconContainerStyles","ChipStatus","ChipDeleteButton","X","CHIP_FILE_ICON_SIZE","getFileLeadingProps","chipProps","status","ChipLeadingContent","fileLeading","isUploading","isProcessing","isError","statusVariant","Cpu","WorkStream","Layout","truncateFilename","maxLength","baseName","availableForBase","getChipLabel","getFullLabel","CHIP_TYPE_CONTAINER_STYLES","CHIP_TYPE_LABEL_STYLES","Chip","onDelete","progress","showProgressBar","showDeleteButton","fullLabel","customLabelContent","isTypedChip","containerStatus","labelStatus","containerStyle","labelStyle","checkboxLabelStyles","checkboxVisualWrapperStyles","checkboxInputStyles","Checkbox","checked","defaultChecked","onChange","indeterminate","internalChecked","setInternalChecked","isControlled","isChecked","internalRef","useRef","useEffect","el","setRefs","node","handleChange","Check","circularProgressContainerStyles","circularProgressSvgStyles","circularProgressTrackStyles","circularProgressIndicatorStyles","circularProgressLabelStyles","SIZE_MAP","CircularProgress","max","showLabel","labelFormatter","strokeWidth","percentage","sizePx","radius","circumference","strokeDashoffset","formattedLabel","useClickOutside","handler","listener","event","dropdownContentStyles","dropdownItemStyles","dropdownLabelStyles","dropdownSeparatorStyles","DropdownContext","useDropdown","context","Dropdown","defaultOpen","controlledOpen","onOpenChange","uncontrolledOpen","setUncontrolledOpen","isOpen","dropdownRef","toggle","newState","close","DropdownTrigger","chevronIcon","ChevronDown","DropdownContent","align","attached","AnimatePresence","DropdownItem","active","closeOnSelect","DropdownLabel","DropdownSeparator","inputStyles","inputContainerStyles","inputIconStyles","inputErrorStyles","Input","error","hint","errorId","startIconPaddingMap","endIconPaddingMap","loadingSpinnerWrapperStyles","spinnerContainerStyles","spinnerBorderStyles","loadingTextStyles","LoadingSpinner","text","textColor","rootStyles","innerContainerStyles","messageContainerStyles","bubbleStyles","contentStyles","headerStyles","textStyles","actionsStyles","actionsIconsStyles","actionButtonStyles","avatarInnerStyles","timestampStyles","loaderStyles","systemContentWrapperStyles","shimmerOverlayStyles","activityIconAnimatedStyles","activityIconGlowStyles","editContainerStyles","editTextareaStyles","editHintStyles","senderHeaderStyles","senderAvatarStyles","senderNameStyles","senderTimeStyles","branchNavigatorStyles","branchNavButtonStyles","branchNavTextStyles","formatElapsed","ts","date","diffMs","diffMins","diffHours","useElapsedTime","timestamp","elapsed","setElapsed","interval","EMPTY_ACTIONS","IS_MAC","KEYBOARD_HINT","formatTimestamp","ActionButton","memo","Icon","isActive","showSuccessFeedback","SuccessIcon","successDuration","showSuccess","setShowSuccess","DisplayIcon","BranchNavigator","branchInfo","onPrevious","onNext","isLoading","hasPrevious","hasNext","ChevronLeft","AnimatedLoader","setKey","MessageBubble","heading","hideAvatar","showTimestamp","isSticky","isInitialPrompt","alignment","actions","enableCopy","copyIcon","onCopySuccess","enableEdit","isEditingProp","initialEditContent","onEditStart","onEditCancel","onEditSave","isSaving","onPreviousBranch","onNextBranch","isBranchLoading","withTimer","senderName","senderAvatar","senderTimeProp","elapsedTimeInternal","elapsedTime","contentRef","textareaRef","isCopied","setIsCopied","internalEditing","setInternalEditing","editContent","setEditContent","isEditing","resolvedAlignment","getTextContent","handleEditStart","handleEditCancel","handleEditSave","prevIsEditingRef","lastInitialContentRef","wasEditing","length","handleCopyInternal","textToCopy","err","handleEditContentChange","hasActions","showActions","showBranchNavigator","Activity","Edit2","action","progressBarTrackStyles","progressBarIndicatorStyles","progressBarLabelStyles","ProgressBar","showValueLabel","valueFormatter","formattedValue","rangeInputStyles","RangeInput","defaultValue","currentValue","minVal","maxVal","trackColor","backgroundStyle","sidebarItemStyles","sidebarItemIconStyles","sidebarItemLabelStyles","SidebarItem","isCollapsed","heightAuto","styleVariant","tagStyles","tagAvatarStyles","tagIconStyles","Tag","avatarSrc","tabsListStyles","tabsTriggerStyles","tabsContentStyles","tabsBadgeContainerStyles","tabsTagStyles","TabsVariantContext","React","Tabs","TabsPrimitive","TabsList","TabsTrigger","errorCount","configurationCount","Settings","TabsContent","textAreaStyles","textAreaContainerStyles","TextArea","resize","timestampContainerStyles","timestampIconStyles","formatRelativeTime","now","diffSeconds","diffMinutes","diffDays","diffWeeks","diffMonths","diffYears","isFuture","absSeconds","absMinutes","absHours","absDays","absWeeks","absMonths","absYears","formatUnit","unit","plural","formatDate","format","locale","parseDate","Timestamp","showIcon","parsedDate","formattedDate","isoString","iconColor","ClockHistory","toastStyles","descriptionStyles","actionsWrapperStyles","closeButtonStyles","icons","Info","CheckCircle","AlertCircle","Sparks","iconColors","Toast","id","description","secondaryAction","onClose","handleClose","toast","renderIcon","Trash","ToastContainer","position","offset","gap","SonnerToaster","showToast","toggleRowStyles","toggleLabelStyles","toggleButtonStyles","toggleKnobStyles","toggleStatusLabelStyles","labelVariantMap","Toggle","enabled","showStatusLabel","statusMessageContainerStyles","statusMessageTextStyles","StatusMessage","message","indicatorVariant","badgeStyles","STATUS_LABEL","ReportHeader","period","asAtDate","generatedAt","renderMode","isPdf","isExcel","showStatus","showGeneratedAt","padding","titleSize","COL_CLASS","DELTA_COLOR","MONO","KpiStrip","columns","kpi","colClass","MetricCard","deltaDir","subtext","valueSize","BriefingCard","body","bannerStyles","ICON","TITLE_COLOR","MSG_COLOR","BORDER_COLOR","ReportBanner","showAction","EmptyState","DIR_COLOR","VarianceBand","VARIANT_STYLES","CommentaryBlock","author","authorRole","sectionLabel","expandable","defaultExpanded","expanded","setExpanded","showToggle","v","ReportSection","sectionNumber","noBorder","compact","FORMAT_LABELS","NAV_BTN","PeriodSelector","current","available","availableFormats","onPeriodChange","onFormatChange","hasPrev","currentIndex","p","handlePrev","prev","handleNext","next","toggleWrapperStyles","buttonStyles","ComparisonToggle","modes","activeMode","onModeChange","mode","FORMAT_DEFAULTS","ExportBar","btnClass","defaults","STATUS_STYLES","AuditStamp","firmName","preparedBy","reviewedBy","reference","s","showPill","FootnoteList","footnotes","fn","autopilotActionContainerStyles","autopilotActionContentStyles","autopilotActionTextStyles","autopilotActionIconContainerStyles","statusColors","actionIconColors","AutopilotAction","hexagonColor","actionIconColor","Hand","Pause","Hexagon","VARIANT_CLASSES","CopyButton","handleCopy","Clipboard","DataAccordion","badge","copyText","internalOpen","setInternalOpen","isCompact","tooltipContentStyles","tooltipArrowStyles","TooltipProvider","delayDuration","TooltipPrimitive","Tooltip","TooltipTrigger","TooltipContent","sideOffset","conversationHeaderStyles","headerRightStyles","actionGroupStyles","iconButtonStyles","tagsGroupStyles","collaboratorsGroupStyles","ConversationHeader","breadcrumbs","tags","collaborators","onAddTag","onAddCollaborator","tagsOverflowCount","addTagDisabled","addCollaboratorDisabled","tag","user","TagPlus","UserPlus","modalOverlayStyles","modalContainerStyles","modalCloseButtonStyles","modalTitleStyles","modalDescriptionStyles","modalContentStyles","modalFooterStyles","Modal","open","showCloseButton","closeIcon","primaryAction","closeOnClickOutside","closeOnEsc","overlayClassName","contentClassName","footerClassName","contentAlign","primaryButtonRef","secondaryButtonRef","handleOpenChange","newOpen","handlePrimaryAction","handleSecondaryAction","handleEscapeKeyDown","handlePointerDownOutside","hasFooter","Dialog","VisuallyHidden","CHEVRON","DrillDownRow","cells","drillRows","colCount","onToggle","rowClassName","drillRowClassName","cell","row","ci","PAPER_WIDTHS","ReportPage","printHeader","printFooter","paperSize","isLandscape","baseSize","sideMargin","pageMargin","textAlign","DataTable","rows","emptyMessage","cellPad","headerPad","fontSize","headerFontSize","col","ri","HEADER_ROW_HEIGHT_PDF","HEADER_ROW_HEIGHT_WEB","TotalRowEl","isGrand","grandFontSize","bg","borderTop","isFirst","val","FinancialTable","groups","totals","headerRowHeight","gi","display","total","ti","HIGHLIGHT_BG","HIGHLIGHT_HEADER_COLOR","PivotTable","rowLabel","sections","allRows","section","si","C","DONUT_COLORS","FONT_MONO","FONT_SANS","PAD","hexToRgba","hex","alpha","g","b","COLOR_SCHEMES","resolveChartColors","scheme","primary","secondary","ChartSection","footer","linearScale","domain","d0","d1","r0","r1","domainSpan","rangeSpan","bandScale","categories","totalWidth","step","bandwidth","gapWidth","cat","idx","niceTickValues","count","rawStep","magnitude","niceSteps","niceMin","ticks","t","domainWithZero","formatAxisLabel","currency","abbreviated","abbreviate","abs","sign","formatDataLabel","RADIUS","BarChart","valueType","showDataLabels","showLegend","showComparison","comparisonLabel","primaryLabel","colors","plotW","plotH","allValues","vals","yScale","yZero","labels","xScale","bw","fmt","abbrev","fmtLabel","tick","barColor","barTop","barH","isNeg","showPrior","priorTop","priorH","smoothLinePath","tension","p0","p1","p2","p3","cp1x","cp1y","cp2x","cp2y","closeAreaPath","linePath","baseline","last","first","waterfallSegments","isTotal","xPositions","segments","running","yVal","start","end","yStart","yEnd","LineChart","series","xStep","xOf","areaFill","areaPath","lastPt","xOff","AreaChart","WaterfallChart","runningValues","l","segColors","seg","clipId","nextSeg","connectorY","BAR_HEIGHT","BAR_GAP","LABEL_WIDTH","VALUE_WIDTH","HorizontalBarChart","sorted","configHeight","sortedData","a","computedHeight","xZero","axisFmt","barStart","barW","GAP_DEGREES","polarToCartesian","cy","angleDeg","angle","arcPath","outerR","innerR","startDeg","endDeg","innerStart","innerEnd","largeArc","DonutChart","centerLabel","sum","legendHeight","donutSize","arcs","currentDeg","gapDeg","availableDeg","proportion","sweepDeg","fmtCenter","fmtLegend","arc","ForecastChart","forecastStartIdx","hasForecasts","historical","forecasts","histPoints","forecastPoints","joinPoints","histLinePath","histAreaPath","forecastLinePath","forecastAreaPath","hasBands","bandPoints","bandPath","upperPath","lowerPath","dividerX","lastHistPt","ROW_GAP","CONNECTOR_HEIGHT","FunnelChart","labelGutter","funnelWidth","stageCount","rowTotal","bodyHeight","centerX","stages","conversion","valueLabel","tlx","trx","nextX","nextRight","top","bot","ROW_HEIGHT","BulletChart","readoutGutter","trackX","trackW","bands","trackMax","scale","barY","poorW","okW","goodW","actualW","targetX","lo","hi","parse","HeatMap","cols","topGutter","mn","mx","cellW","cellH","_","fill","HeroCurves","accent","HeroMarina","HeroLeaves","HeroAbstract","HeroIllustration","CoverPage","entityName","reportTitle","logoUrl","heroStyle","accentColor","publishedDate","leftW","rightW","accentStripW","IMPORTANCE_COLORS","TREND_COLORS","TREND_ARROWS","TargetIcon","met","KpiResultsTable","fs","headerFs","hasTarget","footnoteRows","groupRows","firstRow","ThumbsUp","ThumbsDown","NeutralDash","StatusIcon","KpiObservations","observations","obs","ExecutiveSummaryPage","commentary","block","GREEN","RED","GRAY_600","GRAY_800","GRAY_1000","GRAY_200","Sparkline","pts","curr","cpx","KpiStatCard","comparison","trend","target","sparklineData","_last","valueFontSize","labelFontSize","trendColor","trendArrow","KpiStatStrip","cards","card","GRAY_100","NAVY","IMPORTANCE_ORDER","sectorPath","a1","a2","large","c1","s1","c2","s2","KpiWheel","onTrackCount","offTrackCount","imp","pct","VW","VH","maxR","labelR","halfBar","svgHeight","midAngle","barFill","bgFill","mid","scoreR","lx","ly","deg","rotDeg","shortLabel","BLUE_TINT","BLUE_BORDER","CYAN_WASH","CYAN_SUBTLE","fmtCurrency","formatted","fmtVariancePct","fmtVarianceDollar","BudgetVarianceTable","showForecast","numHeaderStyle","GrandTotalRow","TotalRow","indent","hasBudget","hasActual","varDollar","varPct","favorable","varColor","numCellStyle","rowHeight","Badge","cardStyles","Card","Select","sizeClasses","PasswordField","visible","setVisible","NumberInput","suffix","bannerTitleStyles","bannerBodyStyles","defaultIcons","Banner","dismissible","onDismiss","displayIcon","FieldRow","SettingsNav","activeId","onSelect","category","SettingsSectionCard","onSave","dirty","saveLabel","TREND_COLOR","StatCard","textBase","textMuted","ReportToolbar","prevPeriod","nextPeriod","FilterBar","periods","activePeriod","compareEnabled","SectionCard","EntityCard","meta","m","Stack","WorkstreamCard","progressPct","currentStep","completedSteps","totalSteps","clientName","TYPE_LABEL","TaskCard","outputSummary","typeLabel","ApprovalCard","approveLabel","rejectLabel","DIR_STYLES","shouldClamp","TITLE_CLR","MSG_CLR","BG","BORDER","isPills","sm","ML","MR","MT","MB","niceMax","raw","mag","norm","roundedTopRect","cr","StackedBarChart","formatYTick","formatXTick","formatTooltipHeader","formatTooltipValue","referenceLine","containerRef","containerWidth","setContainerWidth","ro","entries","hover","setHover","plotWidth","plotHeight","slotWidth","barWidth","barOffset","maxRaw","sr","yMax","TICK_COUNT","yTicks","yPixel","handleMouseMove","svg","rect","svgX","svgY","tooltipEl","TOOLTIP_WIDTH","leftPos","bx","topIdx","cumBase","rh","ry","_colCount","PRINT_STYLES","REGISTRY","BlockErrorBoundary","info","UIBlockRenderer","wrapCls","childContent","UIRenderer","createElement","blocks"],"mappings":"4rBAEMA,GAA+B,CACnC,KAAM,iCACN,SAAU,0BACV,SAAU,GACV,eAAgB,GAChB,WAAY,IACZ,cAAe,IACf,aAAc,CAAE,GAAI,GAAI,GAAI,GAAI,GAAI,EAAA,EACpC,YAAa,GACb,MAAO,CAAE,GAAI,EAAG,GAAI,EAAG,GAAI,EAAG,GAAI,EAAA,EAClC,QAAS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A,YACA,0BACA,qBACA,cACF,CAAC,EAEYoV,GAAqBpV,EAChC,uXACA,CACE,SAAU,CACR,SAAU,CACR,KAAM,+BACN,MAAO,EAAA,CACT,EAEF,gBAAiB,CACf,SAAU,EAAA,CACZ,CAEJ,EAEakB,GAAwBlB,EACnC,mDACF,EAEaqV,GAAoBrV,EAC/B,uFACF,EAEasV,GAAkBtV,EAC7B,mDACF,EAEauV,GAAevV,EAC1B,kCACF,EAGawV,GAA6BxV,EACxC,2EACF,EAGayV,GAAuBzV,EAAI,CACtC,iCACA,kBACA,wHACA,aACA,0BACF,CAAC,EAGY0V,GAA6B1V,EAAI,CAC5C,qDACA,+BACA,wBACA,eACF,CAAC,EAGY2V,GAAyB3V,EAAI,CACxC,mBACA,6BACA,eACA,YACA,oBACA,OACF,CAAC,EAGY4V,GAAsB5V,EAAI,CACrC,OACA,WACA,SACA,0BACA,iBACA,SACA,iCACA,WACA,YACA,oBACA,cACF,CAAC,EAGY6V,GAAqB7V,EAAI,CACpC,SACA,eACA,iBACA,cACA,cACA,mBACA,gCACA,2CACA,qBACA,sBACA,6BACF,CAAC,EAGY8V,GAAiB9V,EAAI,CAChC,cACA,iBACA,8BACF,CAAC,EAGY+V,GAAqB/V,EAAI,6BAA6B,EAGtDgW,GAAqBhW,EAAI,oCAAoC,EAG7DiW,GAAmBjW,EAC9B,0FACF,EAGakW,GAAmBlW,EAC9B,2EACF,EAGamW,GAAwBnW,EAAI,CACvC,OACA,eACA,WACF,CAAC,EAGYoW,GAAwBpW,EACnC,CACE,UACA,gBACA,+BACA,oBACA,eACA,qCACA,mCACA,sBACA,8BACA,gCACA,8CACA,uBACA,6CACA,6BAAA,CAEJ,EAGaqW,GAAsBrW,EAAI,CACrC,cACA,iBACA,+BACA,cACA,eACA,cACA,eACA,aACF,CAAC,ECzRKsW,GAAiBC,GAA8B,CACnD,MAAMC,EAAO,OAAOD,GAAO,SAAW,IAAI,KAAKA,CAAE,EAAIA,EAE/CE,MADU,KAAA,EACG,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