xertica-ui 2.4.0 → 2.4.1

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 (524) hide show
  1. package/CHANGELOG.md +572 -564
  2. package/README.md +417 -417
  3. package/assets/xertica-logo.svg +37 -37
  4. package/assets/xertica-x-logo.svg +20 -20
  5. package/bin/cli.ts +1244 -1244
  6. package/bin/language-config.ts +358 -358
  7. package/components/assistant/code-block/CodeBlock.tsx +268 -268
  8. package/components/assistant/formatted-document/FormattedDocument.tsx +147 -147
  9. package/components/assistant/modern-chat-input/ModernChatInput.tsx +564 -564
  10. package/components/assistant/xertica-assistant/parts/AssistantCollapsedView.tsx +99 -99
  11. package/components/assistant/xertica-assistant/parts/AssistantConversationList.tsx +104 -104
  12. package/components/assistant/xertica-assistant/parts/AssistantDocumentEditor.tsx +81 -81
  13. package/components/assistant/xertica-assistant/parts/AssistantFeedbackDialog.tsx +88 -88
  14. package/components/assistant/xertica-assistant/parts/AssistantHeader.tsx +75 -75
  15. package/components/assistant/xertica-assistant/parts/AssistantMessageBubble.tsx +564 -564
  16. package/components/assistant/xertica-assistant/parts/AssistantTabBar.tsx +67 -67
  17. package/components/assistant/xertica-assistant/parts/AssistantWelcomeScreen.tsx +103 -103
  18. package/components/assistant/xertica-assistant/use-assistant.ts +615 -615
  19. package/components/assistant/xertica-assistant/xertica-assistant.tsx +611 -611
  20. package/components/blocks/card-patterns/ActivityCard.tsx +100 -100
  21. package/components/blocks/card-patterns/ActivityCardSkeleton.tsx +56 -56
  22. package/components/blocks/card-patterns/FeatureCardSkeleton.tsx +58 -58
  23. package/components/blocks/card-patterns/NotificationCard.tsx +140 -140
  24. package/components/blocks/card-patterns/NotificationCardSkeleton.tsx +81 -81
  25. package/components/blocks/card-patterns/ProfileCard.tsx +112 -112
  26. package/components/blocks/card-patterns/ProfileCardSkeleton.tsx +69 -69
  27. package/components/blocks/card-patterns/ProjectCard.tsx +123 -123
  28. package/components/blocks/card-patterns/ProjectCardSkeleton.tsx +67 -67
  29. package/components/blocks/card-patterns/QuickActionCardSkeleton.tsx +44 -44
  30. package/components/blocks/card-patterns/card-patterns.stories.tsx +594 -594
  31. package/components/blocks/card-patterns/index.ts +29 -29
  32. package/components/brand/language-selector/LanguageSelector.tsx +102 -102
  33. package/components/brand/language-selector/language-selector.stories.tsx +111 -111
  34. package/components/brand/language-selector/language-selector.test.tsx +101 -101
  35. package/components/brand/theme-toggle/ThemeToggle.tsx +74 -74
  36. package/components/brand/xertica-provider/XerticaProvider.tsx +109 -109
  37. package/components/brand/xertica-provider/xertica-provider.mdx +61 -61
  38. package/components/index.ts +86 -86
  39. package/components/layout/sidebar/sidebar.mdx +1 -1
  40. package/components/layout/sidebar/sidebar.tsx +1079 -1079
  41. package/components/media/FloatingMediaWrapper.tsx +371 -371
  42. package/components/media/audio-player/AudioPlayer.tsx +768 -768
  43. package/components/media/video-player/VideoPlayer.tsx +310 -310
  44. package/components/pages/forgot-password-page/ForgotPasswordPage.tsx +188 -188
  45. package/components/pages/home-content/HomeContent.tsx +120 -120
  46. package/components/pages/home-content/home-content.mdx +62 -62
  47. package/components/pages/home-page/HomePage.tsx +78 -78
  48. package/components/pages/home-page/home-page.mdx +53 -53
  49. package/components/pages/login-page/LoginPage.tsx +218 -218
  50. package/components/pages/reset-password-page/ResetPasswordPage.tsx +243 -243
  51. package/components/pages/template-content/TemplateContent.tsx +1354 -1354
  52. package/components/pages/template-content/template-content.mdx +61 -61
  53. package/components/pages/template-page/template-page.mdx +53 -53
  54. package/components/pages/verify-email-page/VerifyEmailPage.tsx +206 -206
  55. package/components/shared/error-boundary.stories.tsx +114 -114
  56. package/components/shared/error-boundary.tsx +150 -150
  57. package/components/shared/error-fallbacks.tsx +222 -222
  58. package/components/ui/accordion/accordion.mdx +8 -8
  59. package/components/ui/alert/alert.mdx +8 -8
  60. package/components/ui/alert-dialog/alert-dialog.mdx +8 -8
  61. package/components/ui/aspect-ratio/aspect-ratio.mdx +8 -8
  62. package/components/ui/assistant-chart/assistant-chart.mdx +8 -8
  63. package/components/ui/avatar/avatar.mdx +8 -8
  64. package/components/ui/badge/badge.mdx +8 -8
  65. package/components/ui/breadcrumb/breadcrumb.mdx +8 -8
  66. package/components/ui/button/button.mdx +8 -8
  67. package/components/ui/calendar/calendar.mdx +8 -8
  68. package/components/ui/card/card.mdx +8 -8
  69. package/components/ui/carousel/carousel.mdx +8 -8
  70. package/components/ui/chart/chart.mdx +8 -8
  71. package/components/ui/checkbox/checkbox.mdx +8 -8
  72. package/components/ui/collapsible/collapsible.mdx +8 -8
  73. package/components/ui/command/command.mdx +8 -8
  74. package/components/ui/context-menu/context-menu.mdx +8 -8
  75. package/components/ui/dialog/dialog.mdx +8 -8
  76. package/components/ui/drawer/drawer.mdx +8 -8
  77. package/components/ui/dropdown-menu/dropdown-menu.mdx +8 -8
  78. package/components/ui/empty/empty.mdx +8 -8
  79. package/components/ui/file-upload/file-upload.mdx +8 -8
  80. package/components/ui/hover-card/hover-card.mdx +8 -8
  81. package/components/ui/input/input.mdx +8 -8
  82. package/components/ui/input-otp/input-otp.mdx +8 -8
  83. package/components/ui/label/label.mdx +8 -8
  84. package/components/ui/map/map.mdx +8 -8
  85. package/components/ui/menubar/menubar.mdx +8 -8
  86. package/components/ui/navigation-menu/navigation-menu.mdx +8 -8
  87. package/components/ui/notification-badge/notification-badge.mdx +8 -8
  88. package/components/ui/pagination/pagination.mdx +8 -8
  89. package/components/ui/popover/popover.mdx +8 -8
  90. package/components/ui/progress/progress.mdx +8 -8
  91. package/components/ui/radio-group/radio-group.mdx +8 -8
  92. package/components/ui/rating/rating.mdx +8 -8
  93. package/components/ui/resizable/resizable.mdx +8 -8
  94. package/components/ui/route-map/route-map.mdx +8 -8
  95. package/components/ui/scroll-area/scroll-area.mdx +8 -8
  96. package/components/ui/search/search.mdx +8 -8
  97. package/components/ui/select/select.mdx +8 -8
  98. package/components/ui/separator/separator.mdx +8 -8
  99. package/components/ui/sheet/sheet.mdx +8 -8
  100. package/components/ui/simple-map/simple-map.mdx +8 -8
  101. package/components/ui/skeleton/skeleton.mdx +8 -8
  102. package/components/ui/slider/slider.mdx +8 -8
  103. package/components/ui/sonner/sonner.mdx +8 -8
  104. package/components/ui/stats-card/index.ts +2 -2
  105. package/components/ui/stats-card/stats-card-skeleton.tsx +60 -60
  106. package/components/ui/stats-card/stats-card.mdx +8 -8
  107. package/components/ui/stats-card/stats-card.stories.tsx +117 -99
  108. package/components/ui/stats-card/stats-card.tsx +18 -2
  109. package/components/ui/stepper/stepper.mdx +8 -8
  110. package/components/ui/switch/switch.mdx +8 -8
  111. package/components/ui/table/table.mdx +8 -8
  112. package/components/ui/tabs/tabs.mdx +8 -8
  113. package/components/ui/textarea/textarea.mdx +8 -8
  114. package/components/ui/timeline/timeline.mdx +8 -8
  115. package/components/ui/toggle/toggle.mdx +8 -8
  116. package/components/ui/toggle-group/toggle-group.mdx +8 -8
  117. package/components/ui/tooltip/tooltip.mdx +8 -8
  118. package/components/ui/tree-view/tree-view.mdx +8 -8
  119. package/components.json +153 -533
  120. package/contexts/AuthContext.tsx +121 -121
  121. package/contexts/LanguageContext.test.tsx +121 -121
  122. package/contexts/LanguageContext.tsx +250 -250
  123. package/dist/AssistantChart-BKVtGUKF.js +3383 -0
  124. package/dist/{AssistantChart-BAx9VQvb.cjs → AssistantChart-Bdd44uBn.cjs} +388 -127
  125. package/dist/{AssistantChart-CVko2A1W.js → AssistantChart-CFhDdGyU.js} +391 -130
  126. package/dist/{AssistantChart-CVzmmhx4.js → AssistantChart-C_hwFRRr.js} +4 -4
  127. package/dist/{AssistantChart-BAudAfne.cjs → AssistantChart-CldVCVDe.cjs} +5 -5
  128. package/dist/{AssistantChart-BP8upjMk.js → AssistantChart-Cu3m7RBo.js} +5 -5
  129. package/dist/AssistantChart-CxGjH7Qk.js +3477 -0
  130. package/dist/AssistantChart-DIpshm3i.js +4784 -0
  131. package/dist/AssistantChart-D_PTeu8P.cjs +3503 -0
  132. package/dist/{AssistantChart-9w31gdAb.cjs → AssistantChart-DoZCyS5r.cjs} +4 -4
  133. package/dist/AssistantChart-WeycT5Pd.cjs +3551 -0
  134. package/dist/AssistantChart-zjsy2GaZ.cjs +4810 -0
  135. package/dist/AudioPlayer-B1lt5cPl.cjs +989 -0
  136. package/dist/AudioPlayer-BZ7bibzU.cjs +982 -0
  137. package/dist/AudioPlayer-BpRPS4-1.cjs +1277 -0
  138. package/dist/AudioPlayer-C12BjQBV.cjs +997 -0
  139. package/dist/{AudioPlayer-1ypwE2Wh.cjs → AudioPlayer-CFeV8t-5.cjs} +1 -1
  140. package/dist/{AudioPlayer-DuKXrCfy.js → AudioPlayer-CGRUtUdN.js} +1 -1
  141. package/dist/AudioPlayer-Coly3q5R.js +1278 -0
  142. package/dist/AudioPlayer-CySJIyvL.js +937 -0
  143. package/dist/AudioPlayer-DMcG_c7L.js +990 -0
  144. package/dist/AudioPlayer-DcFKRJE_.js +998 -0
  145. package/dist/AudioPlayer-IAU5q5T1.cjs +936 -0
  146. package/dist/AudioPlayer-e8LfNoqO.js +983 -0
  147. package/dist/BrandColorsContext-565dDHd5.js +660 -0
  148. package/dist/BrandColorsContext-BcJbtkqn.cjs +659 -0
  149. package/dist/{xertica-assistant-Qp3ydksa.cjs → CodeBlock-7TTgmdGG.cjs} +263 -51
  150. package/dist/{xertica-assistant-gnCJdcZY.js → CodeBlock-BeSt1h5P.js} +219 -7
  151. package/dist/CodeBlock-BgfYL_rD.cjs +2094 -0
  152. package/dist/CodeBlock-BlcqlA9M.cjs +2094 -0
  153. package/dist/CodeBlock-Bnmeu5ez.cjs +2094 -0
  154. package/dist/CodeBlock-BtfPlbAI.js +2078 -0
  155. package/dist/CodeBlock-CIySIuYr.js +2078 -0
  156. package/dist/CodeBlock-CuPtUM-7.cjs +2094 -0
  157. package/dist/CodeBlock-D6ffWXgc.js +2078 -0
  158. package/dist/CodeBlock-D8dcwbit.cjs +2094 -0
  159. package/dist/CodeBlock-DMZrFnlw.cjs +2094 -0
  160. package/dist/CodeBlock-DlBehYN8.js +2078 -0
  161. package/dist/CodeBlock-DnYNI8rQ.js +2078 -0
  162. package/dist/CodeBlock-DvKWbSnE.cjs +2094 -0
  163. package/dist/CodeBlock-DwMCfkFY.js +2078 -0
  164. package/dist/CodeBlock-Dy6CNYyj.js +2078 -0
  165. package/dist/CodeBlock-U1pPOQI7.cjs +2094 -0
  166. package/dist/CodeBlock-f_GpNhEB.js +2078 -0
  167. package/dist/CodeBlock-oB6u8nI1.js +2078 -0
  168. package/dist/CodeBlock-tZC31B73.cjs +2094 -0
  169. package/dist/FeatureCard-CxC-7C-C.cjs +300 -0
  170. package/dist/FeatureCard-DbHWCb4E.js +301 -0
  171. package/dist/ImageWithFallback-CGtidP6B.cjs +4542 -0
  172. package/dist/ImageWithFallback-lsg3pdFg.js +4508 -0
  173. package/dist/{LanguageContext-DvUt5jBg.cjs → LanguageContext-B_KFTCzT.cjs} +2 -2
  174. package/dist/{LanguageContext-BwhwC3G2.js → LanguageContext-CS14yCpi.js} +2 -2
  175. package/dist/{XerticaXLogo-DHz5SugF.js → LanguageSelector-B5YfbHra.js} +115 -136
  176. package/dist/{XerticaXLogo-DTee_y8X.cjs → LanguageSelector-D6uacAIM.cjs} +115 -136
  177. package/dist/LayoutContext-B45-e9DI.cjs +93 -0
  178. package/dist/LayoutContext-BAql6ZRY.js +97 -0
  179. package/dist/LayoutContext-Bav3UMEA.js +94 -0
  180. package/dist/LayoutContext-BvK-ggDa.cjs +96 -0
  181. package/dist/{ThemeContext-Bo-W2WZH.js → ThemeContext-BWq9ACPo.js} +8 -13
  182. package/dist/{ThemeContext-ept8jhXI.js → ThemeContext-BXjrgUjW.js} +261 -200
  183. package/dist/{ThemeContext-BblcjQup.cjs → ThemeContext-Bmod0Cg2.cjs} +8 -13
  184. package/dist/ThemeContext-BoH4NLfN.js +734 -0
  185. package/dist/{ThemeContext-BbBNoFTG.js → ThemeContext-C2EwAPDt.js} +2 -2
  186. package/dist/{ThemeContext-U4dEYc6C.cjs → ThemeContext-CGk3KK0k.cjs} +1 -8
  187. package/dist/{ThemeContext-D3LzacmG.js → ThemeContext-CQSo4Iwc.js} +1 -8
  188. package/dist/{ThemeContext-CP3a0jxy.cjs → ThemeContext-j5aGtPky.cjs} +262 -193
  189. package/dist/ThemeContext-r69W20Xg.cjs +733 -0
  190. package/dist/{ThemeContext-Cmr8Ex8H.cjs → ThemeContext-vTjumZeM.cjs} +2 -2
  191. package/dist/{VerifyEmailPage-BRSP-Pwt.cjs → VerifyEmailPage--1Vurewl.cjs} +3 -3
  192. package/dist/{VerifyEmailPage-CbgjOF0v.js → VerifyEmailPage-1WwWczAn.js} +12 -22
  193. package/dist/{VerifyEmailPage-DF2ilhum.cjs → VerifyEmailPage-B4peJjAT.cjs} +356 -334
  194. package/dist/{VerifyEmailPage-CR7kb5df.cjs → VerifyEmailPage-BComraR7.cjs} +12 -22
  195. package/dist/{VerifyEmailPage-u_Dn7t1U.cjs → VerifyEmailPage-Bp1XXl3H.cjs} +4 -4
  196. package/dist/{VerifyEmailPage-CkBYfsNy.cjs → VerifyEmailPage-By3Jf__L.cjs} +4 -4
  197. package/dist/{VerifyEmailPage-Bv8Ah_TK.cjs → VerifyEmailPage-ByerOcm4.cjs} +20 -23
  198. package/dist/{VerifyEmailPage-BE-L9mB7.js → VerifyEmailPage-C0c2e5n0.js} +7 -7
  199. package/dist/{VerifyEmailPage-EhudUdqF.js → VerifyEmailPage-C5TNQTBa.js} +355 -343
  200. package/dist/{VerifyEmailPage-Dt7zgA4w.cjs → VerifyEmailPage-CFLMls1p.cjs} +4 -4
  201. package/dist/{VerifyEmailPage-Cyl55sJb.js → VerifyEmailPage-CJLz3jrn.js} +20 -23
  202. package/dist/VerifyEmailPage-COiyNl1y.js +2825 -0
  203. package/dist/{VerifyEmailPage-DMBh4NM9.cjs → VerifyEmailPage-CYXtbKi3.cjs} +1 -1
  204. package/dist/{VerifyEmailPage-DTtFfC-J.js → VerifyEmailPage-CgMxRb4z.js} +3 -3
  205. package/dist/VerifyEmailPage-CqKsR2v8.js +2827 -0
  206. package/dist/{VerifyEmailPage-Bae2cBXT.cjs → VerifyEmailPage-Cwi3kbol.cjs} +7 -7
  207. package/dist/{VerifyEmailPage-X14vhdyl.js → VerifyEmailPage-DGhuIqkb.js} +4 -4
  208. package/dist/{VerifyEmailPage-BIBOKV7Z.js → VerifyEmailPage-DSBMRHtl.js} +36 -41
  209. package/dist/{VerifyEmailPage-D-FRj5TU.cjs → VerifyEmailPage-De6bQjrz.cjs} +36 -41
  210. package/dist/{VerifyEmailPage-BJjAMUTW.js → VerifyEmailPage-DgIid028.js} +4 -4
  211. package/dist/VerifyEmailPage-DjQKRlUS.cjs +2824 -0
  212. package/dist/{VerifyEmailPage-CdYPSJoO.js → VerifyEmailPage-DvMLZgFt.js} +1 -1
  213. package/dist/{VerifyEmailPage-C_ihbcth.js → VerifyEmailPage-MTD7AG1Z.js} +4 -4
  214. package/dist/VerifyEmailPage-s-1X3LDJ.cjs +2826 -0
  215. package/dist/XerticaOrbe-KL1RBHzw.cjs +1354 -0
  216. package/dist/XerticaOrbe-zwS1p2a8.js +1355 -0
  217. package/dist/XerticaProvider-6btlAlzc.js +17 -0
  218. package/dist/{XerticaProvider-siSt9uG2.js → XerticaProvider-B7EVH-NF.js} +2 -2
  219. package/dist/{XerticaProvider-AbWlr7Af.cjs → XerticaProvider-BIrqfZ-i.cjs} +11 -8
  220. package/dist/XerticaProvider-BNoNOxQ5.cjs +16 -0
  221. package/dist/XerticaProvider-BlY2limY.cjs +38 -0
  222. package/dist/{XerticaProvider-CWgby5mY.js → XerticaProvider-C1DKnvLh.js} +4 -4
  223. package/dist/{XerticaProvider-AChwphCO.cjs → XerticaProvider-CBGc4EMA.cjs} +4 -4
  224. package/dist/{XerticaProvider-BITjgC5p.js → XerticaProvider-CEoWMTxu.js} +2 -2
  225. package/dist/{XerticaProvider-By8q3Roe.cjs → XerticaProvider-CllrbMEJ.cjs} +2 -2
  226. package/dist/{XerticaProvider-B8CaV7xu.cjs → XerticaProvider-D-yNhF94.cjs} +1 -1
  227. package/dist/XerticaProvider-DDuiIcKo.js +39 -0
  228. package/dist/{XerticaProvider-DQtvJU7m.js → XerticaProvider-DYq4JWtg.js} +1 -1
  229. package/dist/{XerticaProvider-CWs6EwNa.js → XerticaProvider-Dt5HEzbQ.js} +10 -10
  230. package/dist/{XerticaProvider-CW9hpCdF.cjs → XerticaProvider-ET0ihewn.cjs} +2 -2
  231. package/dist/XerticaProvider-cI9hSs27.cjs +38 -0
  232. package/dist/XerticaProvider-hSwhNQex.js +39 -0
  233. package/dist/{XerticaXLogo-ChryA6xj.js → XerticaXLogo-B7xQ5dhi.js} +1 -1
  234. package/dist/{XerticaXLogo-CziKMQil.cjs → XerticaXLogo-CQUUjXoH.cjs} +8 -8
  235. package/dist/{XerticaXLogo-DfUvz-lD.js → XerticaXLogo-Cmsp-Eey.js} +9 -9
  236. package/dist/{XerticaXLogo-CFuIlYFH.js → XerticaXLogo-DZbo4vOE.js} +12 -12
  237. package/dist/{XerticaXLogo-8TTzBjHw.cjs → XerticaXLogo-Zw2B276b.cjs} +1 -1
  238. package/dist/{XerticaXLogo-kslQ8Tk_.cjs → XerticaXLogo-bvZSgwGF.cjs} +13 -7
  239. package/dist/alert-dialog-BOje--vD.js +847 -0
  240. package/dist/alert-dialog-BtEuQqrg.cjs +870 -0
  241. package/dist/{alert-dialog-yckpaOpy.cjs → alert-dialog-DSKByiKZ.cjs} +3 -3
  242. package/dist/{alert-dialog-iDe5VE5o.js → alert-dialog-s-vmNkJ_.js} +3 -3
  243. package/dist/breadcrumb-CqJ7bHY5.js +161 -0
  244. package/dist/breadcrumb-m9Hb2_XN.cjs +177 -0
  245. package/dist/components/assistant/xertica-assistant/hooks/index.d.ts +6 -0
  246. package/dist/components/assistant/xertica-assistant/hooks/use-assistant-conversations.d.ts +21 -0
  247. package/dist/components/assistant/xertica-assistant/hooks/use-assistant-messages.d.ts +49 -0
  248. package/dist/components/assistant/xertica-assistant/hooks/use-assistant-suggestions.d.ts +16 -0
  249. package/dist/components/blocks/audio-player/AudioPlayer.d.ts +35 -0
  250. package/dist/components/blocks/audio-player/index.d.ts +1 -0
  251. package/dist/components/blocks/document-editor/DocumentEditor.d.ts +26 -0
  252. package/dist/components/blocks/document-editor/index.d.ts +1 -0
  253. package/dist/components/blocks/podcast-player/PodcastPlayer.d.ts +41 -0
  254. package/dist/components/blocks/podcast-player/index.d.ts +1 -0
  255. package/dist/components/ui/chart/parts/chart-dashboard.d.ts +113 -0
  256. package/dist/components/ui/chart/parts/chart-metric.d.ts +118 -0
  257. package/dist/components/ui/chart/parts/chart-primitives.d.ts +101 -0
  258. package/dist/components/ui/chart/parts/chart-shared.d.ts +20 -0
  259. package/dist/components/ui/chart/parts/chart-utils.d.ts +12 -0
  260. package/dist/components/ui/chart/parts/index.d.ts +5 -0
  261. package/dist/components/ui/stats-card/stats-card.d.ts +10 -0
  262. package/dist/dropdown-menu-BDB5CmQs.cjs +247 -0
  263. package/dist/dropdown-menu-DQidbKBD.js +231 -0
  264. package/dist/google-maps-loader-BFWp6VPd.js +287 -0
  265. package/dist/google-maps-loader-BKcdgFbu.cjs +312 -0
  266. package/dist/{google-maps-loader-t2IlYBzw.js → google-maps-loader-CTYySAun.js} +4 -0
  267. package/dist/google-maps-loader-CumCNXeG.js +312 -0
  268. package/dist/{google-maps-loader-BqsYL48U.cjs → google-maps-loader-Y-QkD-Li.cjs} +5 -0
  269. package/dist/google-maps-loader-eS3uQ5TA.cjs +287 -0
  270. package/dist/header-Cgy6vYPk.cjs +731 -0
  271. package/dist/header-DRlT4jgI.js +715 -0
  272. package/dist/header-Dux00SI4.cjs +731 -0
  273. package/dist/header-EkGKXPsD.js +715 -0
  274. package/dist/header-WfEywpyc.cjs +731 -0
  275. package/dist/header-tifNQn2U.js +715 -0
  276. package/dist/index-BhapVLVj.js +8 -0
  277. package/dist/{index-D3RLKRAs.cjs → index-COtD8bRW.cjs} +1 -1
  278. package/dist/index-D6fxYEY8.cjs +7 -0
  279. package/dist/index-DAIp0_HK.js +8 -0
  280. package/dist/index-DW5tYe26.js +8 -0
  281. package/dist/index-GA__GvnG.cjs +7 -0
  282. package/dist/index.cjs.js +2 -2
  283. package/dist/index.es.js +2 -2
  284. package/dist/index.umd.js +1043 -470
  285. package/dist/input-2R4loU86.js +127 -0
  286. package/dist/input-DWANSKGb.cjs +145 -0
  287. package/dist/pages.cjs.js +1 -1
  288. package/dist/pages.es.js +1 -1
  289. package/dist/progress-DPtzoVV8.js +175 -0
  290. package/dist/progress-EeaoqqUs.cjs +191 -0
  291. package/dist/rich-text-editor-0mraWT5y.cjs +2376 -0
  292. package/dist/rich-text-editor-B-IkcPD0.js +2874 -0
  293. package/dist/rich-text-editor-B6jMRLzk.cjs +1939 -0
  294. package/dist/rich-text-editor-B8_oYcIR.js +1730 -0
  295. package/dist/rich-text-editor-B9UbSXNb.js +1203 -0
  296. package/dist/rich-text-editor-BYuRBNBU.js +2373 -0
  297. package/dist/rich-text-editor-Bb9pySTs.cjs +2374 -0
  298. package/dist/rich-text-editor-BcL6L3cm.cjs +2374 -0
  299. package/dist/rich-text-editor-BoVZYtTs.cjs +2391 -0
  300. package/dist/rich-text-editor-Bp3zQqMC.js +2954 -0
  301. package/dist/rich-text-editor-CMgSN_w2.js +1189 -0
  302. package/dist/rich-text-editor-CPV1lEPH.cjs +1748 -0
  303. package/dist/rich-text-editor-CeucBdIv.cjs +2971 -0
  304. package/dist/rich-text-editor-CoKqbCtu.cjs +1799 -0
  305. package/dist/rich-text-editor-Cw56T_mB.js +2356 -0
  306. package/dist/rich-text-editor-Cyt8qs2b.js +1921 -0
  307. package/dist/rich-text-editor-D6H84OcX.cjs +1220 -0
  308. package/dist/rich-text-editor-D76gD-QI.js +2328 -0
  309. package/dist/rich-text-editor-DKkokOnA.js +1781 -0
  310. package/dist/rich-text-editor-DNsdpN64.cjs +2359 -0
  311. package/dist/rich-text-editor-DfG8bCyY.js +2358 -0
  312. package/dist/rich-text-editor-Dxjw31Z4.js +2341 -0
  313. package/dist/rich-text-editor-DzP0Epmb.js +2356 -0
  314. package/dist/rich-text-editor-bRkNoeZY.cjs +2891 -0
  315. package/dist/rich-text-editor-lyYE2ZG5.cjs +1207 -0
  316. package/dist/rich-text-editor-skplNlBM.cjs +2345 -0
  317. package/dist/select-Bkbr0f-Z.cjs +162 -0
  318. package/dist/select-CvIVdX2n.js +145 -0
  319. package/dist/{sidebar-CA6_ek3f.js → sidebar-B6SlKZYN.js} +40 -49
  320. package/dist/{sidebar-CmvwjnVb.js → sidebar-BViy8Eeu.js} +17 -9
  321. package/dist/{sidebar-Dz7bd3zP.js → sidebar-BbVIQvlP.js} +1 -1
  322. package/dist/{sidebar-CVUGHOS_.cjs → sidebar-BxGXsDAd.cjs} +16 -8
  323. package/dist/sidebar-CK_0ZQHj.cjs +803 -0
  324. package/dist/sidebar-CUuOvYhK.js +787 -0
  325. package/dist/{sidebar-KIS0C2JH.js → sidebar-CrQDDdcz.js} +24 -33
  326. package/dist/{sidebar-zowjejT2.cjs → sidebar-DAaY8bRU.cjs} +24 -33
  327. package/dist/{sidebar-B3EYhli0.cjs → sidebar-DQj1z3jG.cjs} +227 -269
  328. package/dist/{sidebar-B9NR0lCe.cjs → sidebar-Djn5syhi.cjs} +295 -309
  329. package/dist/{sidebar-CplprZpM.js → sidebar-LluMXfam.js} +227 -269
  330. package/dist/sidebar-_rT7rBMk.js +787 -0
  331. package/dist/{sidebar-BvF5I2Ue.cjs → sidebar-nzPoVHBQ.cjs} +41 -46
  332. package/dist/{sidebar-C5B_LHek.cjs → sidebar-q7P2Godd.cjs} +1 -1
  333. package/dist/slider-Bc5Hd0y1.js +56 -0
  334. package/dist/slider-N7hFFj6X.cjs +73 -0
  335. package/dist/tooltip-Ded96neP.cjs +137 -0
  336. package/dist/tooltip-HDOoD2-0.js +120 -0
  337. package/dist/ui.cjs.js +1 -1
  338. package/dist/ui.es.js +1 -1
  339. package/dist/use-audio-player-B31J-aqh.cjs +187 -0
  340. package/dist/use-audio-player-BkmEmj8Q.js +185 -0
  341. package/dist/use-audio-player-CLFTWFW1.cjs +184 -0
  342. package/dist/use-audio-player-CLLn00I6.js +188 -0
  343. package/dist/{use-audio-player-Dn1NR9xN.cjs → use-audio-player-NKsWyjWu.cjs} +7 -3
  344. package/dist/{use-audio-player-Bkh23vQ3.js → use-audio-player-nv8ZSGa1.js} +7 -3
  345. package/dist/use-file-upload-BcjEo2S5.js +404 -0
  346. package/dist/use-file-upload-CRJR68Tj.cjs +403 -0
  347. package/dist/use-mobile-B0hNy_Y6.cjs +4303 -0
  348. package/dist/use-mobile-BXuYROXM.js +4202 -0
  349. package/dist/use-mobile-Bbd51ASU.cjs +4392 -0
  350. package/dist/use-mobile-Bk6CX-TC.js +4359 -0
  351. package/dist/use-mobile-BvYdisLP.js +4202 -0
  352. package/dist/use-mobile-BzuxjzNX.cjs +4392 -0
  353. package/dist/use-mobile-CG2-SdXV.cjs +4235 -0
  354. package/dist/use-mobile-CKb5pqTs.js +4269 -0
  355. package/dist/use-mobile-CYuAuGDl.js +4202 -0
  356. package/dist/use-mobile-CaENcqm-.js +4508 -0
  357. package/dist/use-mobile-CbrYgJGJ.js +4203 -0
  358. package/dist/use-mobile-Cd4xPrKq.cjs +46 -0
  359. package/dist/use-mobile-DMOvImGQ.cjs +4542 -0
  360. package/dist/use-mobile-DRB3BQgD.cjs +4235 -0
  361. package/dist/use-mobile-DZvv7QMR.js +4359 -0
  362. package/dist/use-mobile-DdI_TXam.cjs +4235 -0
  363. package/dist/use-mobile-DlceKf8a.js +4359 -0
  364. package/dist/use-mobile-DsOnow1o.cjs +4236 -0
  365. package/dist/use-mobile-Kcj6jSnK.cjs +4392 -0
  366. package/dist/use-mobile-bnKcua_i.js +4202 -0
  367. package/dist/use-mobile-j4w2Jrf1.js +30 -0
  368. package/dist/use-mobile-ncXBeE2z.cjs +4235 -0
  369. package/dist/use-rich-text-editor-DjiddBGv.js +282 -0
  370. package/dist/use-rich-text-editor-lpeswbCs.cjs +281 -0
  371. package/dist/xertica-assistant-BdiZag0h.js +2187 -0
  372. package/dist/xertica-assistant-CrgTb6Hs.cjs +2155 -0
  373. package/dist/xertica-assistant-DCsnQyi5.js +2156 -0
  374. package/dist/xertica-assistant-DUBpmEgo.cjs +2186 -0
  375. package/dist/{xertica-assistant-Bj3vBCq_.cjs → xertica-assistant-V_IdW4WF.cjs} +27 -9
  376. package/dist/{xertica-assistant-BMqdyRVi.js → xertica-assistant-ciJaWqm1.js} +28 -10
  377. package/dist/{xertica-assistant-B1IaHXnB.cjs → xertica-assistant-dyP7KHM5.cjs} +533 -392
  378. package/dist/{xertica-assistant-DPsESB6t.js → xertica-assistant-yX1CFBBo.js} +535 -394
  379. package/dist/xertica-ui.css +2 -2
  380. package/docs/architecture-improvements.md +456 -456
  381. package/docs/architecture.md +312 -312
  382. package/docs/components/assistant.md +428 -428
  383. package/docs/components/branding.md +252 -252
  384. package/docs/components/card-patterns.md +447 -447
  385. package/docs/components/error-boundary.md +201 -201
  386. package/docs/components/hooks.md +432 -432
  387. package/docs/components/language-selector.md +176 -176
  388. package/docs/components/pages.md +323 -323
  389. package/docs/components/stats-card.md +20 -2
  390. package/docs/doc-audit.md +244 -244
  391. package/docs/getting-started.md +616 -616
  392. package/docs/guidelines.md +330 -330
  393. package/docs/i18n.md +480 -480
  394. package/docs/installation.md +268 -268
  395. package/docs/llms.md +295 -295
  396. package/docs/state-management.md +289 -289
  397. package/guidelines/Guidelines.md +409 -409
  398. package/llms-compact.txt +1 -1
  399. package/llms-full.txt +11553 -7133
  400. package/llms.txt +1 -1
  401. package/package.json +219 -219
  402. package/styles/xertica/base.css +90 -90
  403. package/templates/.prettierignore +4 -4
  404. package/templates/.prettierrc +10 -10
  405. package/templates/CLAUDE.md +180 -180
  406. package/templates/guidelines/Guidelines.md +577 -577
  407. package/templates/package.json +69 -69
  408. package/templates/src/app/App.tsx +46 -46
  409. package/templates/src/app/components/AuthGuard.tsx +131 -131
  410. package/templates/src/features/assistant/data/mock.ts +75 -75
  411. package/templates/src/features/assistant/hooks/useAssistantConfig.ts +20 -20
  412. package/templates/src/features/assistant/index.ts +5 -5
  413. package/templates/src/features/auth/ui/AuthPageShell.tsx +32 -32
  414. package/templates/src/features/auth/ui/ForgotPasswordContent.tsx +70 -70
  415. package/templates/src/features/auth/ui/LoginContent.tsx +92 -92
  416. package/templates/src/features/auth/ui/ResetPasswordContent.tsx +183 -183
  417. package/templates/src/features/auth/ui/SocialLoginButtons.tsx +78 -78
  418. package/templates/src/features/auth/ui/VerifyEmailContent.tsx +80 -80
  419. package/templates/src/features/home/data/mock.ts +41 -41
  420. package/templates/src/features/home/hooks/useFeatureCards.ts +20 -20
  421. package/templates/src/features/home/index.ts +11 -11
  422. package/templates/src/features/home/ui/HomeContent.tsx +117 -117
  423. package/templates/src/features/template/ui/CrudTemplate.tsx +112 -112
  424. package/templates/src/features/template/ui/DashboardTemplate.tsx +110 -110
  425. package/templates/src/features/template/ui/FormTemplate.tsx +117 -117
  426. package/templates/src/features/template/ui/LoginTemplate.tsx +59 -59
  427. package/templates/src/features/template/ui/TemplateContent.tsx +1322 -1322
  428. package/templates/src/i18n.ts +124 -124
  429. package/templates/src/locales/en/common.json +21 -21
  430. package/templates/src/locales/en/components/activityCard.json +10 -10
  431. package/templates/src/locales/en/components/assistant.json +119 -119
  432. package/templates/src/locales/en/components/media.json +29 -29
  433. package/templates/src/locales/en/components/notificationCard.json +5 -5
  434. package/templates/src/locales/en/components/profileCard.json +8 -8
  435. package/templates/src/locales/en/components/projectCard.json +10 -10
  436. package/templates/src/locales/en/components/sidebar.json +14 -14
  437. package/templates/src/locales/en/components/stats.json +8 -8
  438. package/templates/src/locales/en/components/team.json +14 -14
  439. package/templates/src/locales/en/errors.json +9 -9
  440. package/templates/src/locales/en/languageSelector.json +7 -7
  441. package/templates/src/locales/en/nav.json +6 -6
  442. package/templates/src/locales/en/pages/crudTemplate.json +25 -25
  443. package/templates/src/locales/en/pages/dashboardTemplate.json +20 -20
  444. package/templates/src/locales/en/pages/forgotPassword.json +10 -10
  445. package/templates/src/locales/en/pages/formTemplate.json +16 -16
  446. package/templates/src/locales/en/pages/home.json +7 -7
  447. package/templates/src/locales/en/pages/login.json +15 -15
  448. package/templates/src/locales/en/pages/loginTemplate.json +9 -9
  449. package/templates/src/locales/en/pages/resetPassword.json +18 -18
  450. package/templates/src/locales/en/pages/templates.json +317 -317
  451. package/templates/src/locales/en/pages/verifyEmail.json +12 -12
  452. package/templates/src/locales/en/themeToggle.json +6 -6
  453. package/templates/src/locales/es/common.json +21 -21
  454. package/templates/src/locales/es/components/activityCard.json +10 -10
  455. package/templates/src/locales/es/components/assistant.json +119 -119
  456. package/templates/src/locales/es/components/media.json +29 -29
  457. package/templates/src/locales/es/components/notificationCard.json +5 -5
  458. package/templates/src/locales/es/components/profileCard.json +8 -8
  459. package/templates/src/locales/es/components/projectCard.json +10 -10
  460. package/templates/src/locales/es/components/sidebar.json +14 -14
  461. package/templates/src/locales/es/components/stats.json +8 -8
  462. package/templates/src/locales/es/components/team.json +14 -14
  463. package/templates/src/locales/es/errors.json +9 -9
  464. package/templates/src/locales/es/languageSelector.json +7 -7
  465. package/templates/src/locales/es/nav.json +6 -6
  466. package/templates/src/locales/es/pages/crudTemplate.json +25 -25
  467. package/templates/src/locales/es/pages/dashboardTemplate.json +20 -20
  468. package/templates/src/locales/es/pages/forgotPassword.json +10 -10
  469. package/templates/src/locales/es/pages/formTemplate.json +16 -16
  470. package/templates/src/locales/es/pages/home.json +7 -7
  471. package/templates/src/locales/es/pages/login.json +15 -15
  472. package/templates/src/locales/es/pages/loginTemplate.json +9 -9
  473. package/templates/src/locales/es/pages/resetPassword.json +18 -18
  474. package/templates/src/locales/es/pages/templates.json +317 -317
  475. package/templates/src/locales/es/pages/verifyEmail.json +12 -12
  476. package/templates/src/locales/es/themeToggle.json +6 -6
  477. package/templates/src/locales/pt-BR/common.json +21 -21
  478. package/templates/src/locales/pt-BR/components/activityCard.json +10 -10
  479. package/templates/src/locales/pt-BR/components/assistant.json +119 -119
  480. package/templates/src/locales/pt-BR/components/media.json +29 -29
  481. package/templates/src/locales/pt-BR/components/notificationCard.json +5 -5
  482. package/templates/src/locales/pt-BR/components/profileCard.json +8 -8
  483. package/templates/src/locales/pt-BR/components/projectCard.json +10 -10
  484. package/templates/src/locales/pt-BR/components/sidebar.json +14 -14
  485. package/templates/src/locales/pt-BR/components/stats.json +8 -8
  486. package/templates/src/locales/pt-BR/components/team.json +14 -14
  487. package/templates/src/locales/pt-BR/errors.json +9 -9
  488. package/templates/src/locales/pt-BR/languageSelector.json +7 -7
  489. package/templates/src/locales/pt-BR/nav.json +6 -6
  490. package/templates/src/locales/pt-BR/pages/crudTemplate.json +25 -25
  491. package/templates/src/locales/pt-BR/pages/dashboardTemplate.json +20 -20
  492. package/templates/src/locales/pt-BR/pages/forgotPassword.json +10 -10
  493. package/templates/src/locales/pt-BR/pages/formTemplate.json +16 -16
  494. package/templates/src/locales/pt-BR/pages/home.json +7 -7
  495. package/templates/src/locales/pt-BR/pages/login.json +15 -15
  496. package/templates/src/locales/pt-BR/pages/loginTemplate.json +9 -9
  497. package/templates/src/locales/pt-BR/pages/resetPassword.json +18 -18
  498. package/templates/src/locales/pt-BR/pages/templates.json +317 -317
  499. package/templates/src/locales/pt-BR/pages/verifyEmail.json +12 -12
  500. package/templates/src/locales/pt-BR/themeToggle.json +6 -6
  501. package/templates/src/pages/AssistantPage.tsx +470 -470
  502. package/templates/src/pages/HomePage.tsx +53 -53
  503. package/templates/src/shared/error-boundary.tsx +150 -150
  504. package/templates/src/shared/error-fallbacks.tsx +222 -222
  505. package/templates/vite.config.js +20 -20
  506. package/templates/vite.config.ts +55 -55
  507. package/dist/ThemeContext-CpqYShLq.cjs +0 -324
  508. package/dist/ThemeContext-Du2nE1PL.js +0 -325
  509. package/dist/ThemeContext-GeEBTJ3q.cjs +0 -1621
  510. package/dist/ThemeContext-JyLK9B1o.js +0 -1622
  511. package/dist/VerifyEmailPage-BiRm7Nh4.cjs +0 -3213
  512. package/dist/VerifyEmailPage-Bvfv8HVQ.js +0 -3214
  513. package/dist/VerifyEmailPage-hdB8JQGv.cjs +0 -3213
  514. package/dist/VerifyEmailPage-vYHbYK3q.js +0 -3214
  515. package/dist/XerticaProvider-CUYJZc32.js +0 -49
  516. package/dist/XerticaProvider-CjQAQPcn.cjs +0 -48
  517. package/dist/XerticaProvider-D5lLumH-.js +0 -49
  518. package/dist/XerticaProvider-qQUDop71.cjs +0 -48
  519. package/dist/XerticaXLogo-BWaag64t.js +0 -252
  520. package/dist/XerticaXLogo-CU-U-GP4.cjs +0 -251
  521. package/dist/index-CkTUgOwX.js +0 -8
  522. package/dist/sidebar-OTO_up7Z.js +0 -801
  523. package/dist/{rich-text-editor-BmsjY03B.js → rich-text-editor-DgF8s7xW.js} +26 -26
  524. package/dist/{rich-text-editor-GS2kpTAK.cjs → rich-text-editor-mWoaSCE4.cjs} +26 -26
@@ -0,0 +1,4784 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import React__default, { useRef, useEffect } from "react";
4
+ import * as RechartsPrimitive from "recharts";
5
+ import { BarChart, CartesianGrid, XAxis, Bar } from "recharts";
6
+ import { c as cn, B as Button, b as buttonVariants } from "./button-qkz7Icqf.js";
7
+ import { S as Select, h as SelectTrigger, i as SelectValue, a as SelectContent, c as SelectItem } from "./select-En8DkoaQ.js";
8
+ import { K as chartBarSizes, L as defaultChartColors, A as Alert, b as AlertTitle, a as AlertDescription, E as Empty, t as EmptyIcon, v as EmptyTitle, s as EmptyDescription, r as EmptyAction, C as ChartContainer, f as ChartTooltip, g as ChartTooltipContent, c as ChartLegend, d as ChartLegendContent, M as defaultPeriods, D as Dialog, m as DialogHeader, p as DialogTitle, k as DialogDescription, j as DialogContent } from "./rich-text-editor-CMgSN_w2.js";
9
+ import { C as Card, e as CardHeader, f as CardTitle, c as CardDescription, a as CardAction, b as CardContent, d as CardFooter } from "./progress-DPtzoVV8.js";
10
+ import { RefreshCw, BarChart3, WifiOff, GripVerticalIcon, ChevronDownIcon, MoreHorizontalIcon, ChevronRightIcon, ChevronLeftIcon, MinusIcon, ChevronLeft, ChevronRight, ChevronDown, XIcon, CheckIcon, CircleIcon, SearchIcon, TrendingUp, TrendingDown, Minus, ArrowRight, ArrowLeft, X, Check, Upload, AlertCircle, FileIcon, Star, Search as Search$1 } from "lucide-react";
11
+ import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio";
12
+ import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
13
+ import { cva } from "class-variance-authority";
14
+ import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
15
+ import * as TogglePrimitive from "@radix-ui/react-toggle";
16
+ import { OTPInput, OTPInputContext } from "input-otp";
17
+ import { Slot } from "@radix-ui/react-slot";
18
+ import { FormProvider, Controller, useFormContext, useFormState } from "react-hook-form";
19
+ import { L as Label, M as Map$1 } from "./alert-dialog-s-vmNkJ_.js";
20
+ import { getDefaultClassNames, DayPicker } from "react-day-picker";
21
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
22
+ import { Drawer as Drawer$1 } from "vaul";
23
+ import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
24
+ import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
25
+ import * as MenubarPrimitive from "@radix-ui/react-menubar";
26
+ import { Command as Command$1 } from "cmdk";
27
+ import { c as useTreeView, u as useFileUpload } from "./use-file-upload-BcjEo2S5.js";
28
+ import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
29
+ import * as AccordionPrimitive from "@radix-ui/react-accordion";
30
+ import useEmblaCarousel from "embla-carousel-react";
31
+ import { u as useGoogleMapsLoader } from "./google-maps-loader-CTYySAun.js";
32
+ function getChartSeries(config, series) {
33
+ if (series == null ? void 0 : series.length) {
34
+ return series;
35
+ }
36
+ return Object.entries(config).map(([key, item]) => ({
37
+ key,
38
+ label: item.label
39
+ }));
40
+ }
41
+ function getSeriesColor(key, index, colors) {
42
+ if (Array.isArray(colors)) {
43
+ return colors[index] || defaultChartColors[index % defaultChartColors.length];
44
+ }
45
+ return (colors == null ? void 0 : colors[key]) || defaultChartColors[index % defaultChartColors.length];
46
+ }
47
+ function getChartConfigWithColors(config, keys, colors) {
48
+ return keys.reduce((nextConfig, key, index) => {
49
+ const item = config[key];
50
+ if ((item == null ? void 0 : item.theme) && !colors) {
51
+ nextConfig[key] = item;
52
+ return nextConfig;
53
+ }
54
+ nextConfig[key] = {
55
+ label: (item == null ? void 0 : item.label) || key,
56
+ icon: item == null ? void 0 : item.icon,
57
+ color: colors ? getSeriesColor(key, index, colors) : (item == null ? void 0 : item.color) || getSeriesColor(key, index)
58
+ };
59
+ return nextConfig;
60
+ }, {});
61
+ }
62
+ function buildChartConfig(keys, colors) {
63
+ return keys.reduce((cfg, key, index) => {
64
+ cfg[key] = {
65
+ label: key,
66
+ color: getSeriesColor(key, index, colors)
67
+ };
68
+ return cfg;
69
+ }, {});
70
+ }
71
+ function formatTick(value) {
72
+ if (typeof value !== "number") {
73
+ return value;
74
+ }
75
+ return Intl.NumberFormat("en", {
76
+ notation: "compact",
77
+ maximumFractionDigits: 1
78
+ }).format(value);
79
+ }
80
+ function defaultFilterData(data, period) {
81
+ const match = period.match(/^(\d+)/);
82
+ if (!match) {
83
+ return data;
84
+ }
85
+ const limit = Number(match[1]);
86
+ return data.slice(Math.max(data.length - limit, 0));
87
+ }
88
+ function getErrorDescription(error) {
89
+ if (typeof error === "string") {
90
+ return error;
91
+ }
92
+ if (error instanceof Error) {
93
+ return error.message;
94
+ }
95
+ return void 0;
96
+ }
97
+ function getBarSize(barSize = "md") {
98
+ return typeof barSize === "number" ? barSize : chartBarSizes[barSize];
99
+ }
100
+ function hasChartData(data, series) {
101
+ if (!data.length || !series.length) {
102
+ return false;
103
+ }
104
+ return data.some(
105
+ (item) => series.some((serie) => {
106
+ const value = item[serie.key];
107
+ return value !== null && value !== void 0 && value !== "";
108
+ })
109
+ );
110
+ }
111
+ function hasPieData(data, nameKey, valueKey) {
112
+ return data.some((item) => {
113
+ const name = item[nameKey];
114
+ const value = item[valueKey];
115
+ return name !== null && name !== void 0 && name !== "" && value !== null && value !== void 0 && value !== "";
116
+ });
117
+ }
118
+ function Skeleton({ className, ...props }) {
119
+ return /* @__PURE__ */ jsx(
120
+ "div",
121
+ {
122
+ "data-slot": "skeleton",
123
+ className: cn("bg-accent animate-pulse rounded-md", className),
124
+ ...props
125
+ }
126
+ );
127
+ }
128
+ function ChartState({
129
+ type,
130
+ className,
131
+ error,
132
+ onRetry,
133
+ retryLabel = "Try again",
134
+ emptyTitle = "No data available",
135
+ emptyDescription = "There is no data available for this chart yet.",
136
+ errorTitle = "Connection error",
137
+ errorDescription,
138
+ loadingLabel = "Loading chart data"
139
+ }) {
140
+ if (type === "loading") {
141
+ return /* @__PURE__ */ jsxs(
142
+ "div",
143
+ {
144
+ className: cn(
145
+ "flex min-h-[240px] flex-col justify-end gap-3 rounded-[var(--radius-card)] border border-border p-6",
146
+ className
147
+ ),
148
+ "aria-label": typeof loadingLabel === "string" ? loadingLabel : void 0,
149
+ children: [
150
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-8 w-2/5" }),
151
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-14 w-3/5" }),
152
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-24 w-4/5" }),
153
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-36 w-full" })
154
+ ]
155
+ }
156
+ );
157
+ }
158
+ if (type === "error") {
159
+ return /* @__PURE__ */ jsx(
160
+ "div",
161
+ {
162
+ className: cn(
163
+ "flex min-h-[240px] items-center justify-center rounded-[var(--radius-card)] border border-border p-6",
164
+ className
165
+ ),
166
+ children: /* @__PURE__ */ jsxs(Alert, { variant: "destructive", className: "max-w-xl", children: [
167
+ /* @__PURE__ */ jsx(AlertTitle, { children: errorTitle }),
168
+ /* @__PURE__ */ jsx(AlertDescription, { children: errorDescription || getErrorDescription(error) || "Unable to load chart data. Check your connection and try again." }),
169
+ onRetry ? /* @__PURE__ */ jsx("div", { className: "mt-3", children: /* @__PURE__ */ jsxs(Button, { size: "sm", variant: "outline", onClick: onRetry, children: [
170
+ /* @__PURE__ */ jsx(RefreshCw, { className: "size-4" }),
171
+ retryLabel
172
+ ] }) }) : null
173
+ ] })
174
+ }
175
+ );
176
+ }
177
+ return /* @__PURE__ */ jsxs(Empty, { className: cn("min-h-[240px]", className), children: [
178
+ /* @__PURE__ */ jsx(EmptyIcon, { children: /* @__PURE__ */ jsx(BarChart3, { className: "size-10 text-muted-foreground" }) }),
179
+ /* @__PURE__ */ jsx(EmptyTitle, { children: emptyTitle }),
180
+ /* @__PURE__ */ jsx(EmptyDescription, { children: emptyDescription }),
181
+ onRetry ? /* @__PURE__ */ jsx(EmptyAction, { children: /* @__PURE__ */ jsxs(Button, { size: "sm", variant: "outline", onClick: onRetry, children: [
182
+ /* @__PURE__ */ jsx(WifiOff, { className: "size-4" }),
183
+ retryLabel
184
+ ] }) }) : null
185
+ ] });
186
+ }
187
+ function getChartState(state, hasData, className) {
188
+ if (state.isLoading) {
189
+ return /* @__PURE__ */ jsx(ChartState, { ...state, type: "loading", className });
190
+ }
191
+ if (state.error) {
192
+ return /* @__PURE__ */ jsx(ChartState, { ...state, type: "error", className });
193
+ }
194
+ if (!hasData) {
195
+ return /* @__PURE__ */ jsx(ChartState, { ...state, type: "empty", className });
196
+ }
197
+ return null;
198
+ }
199
+ function ChartCard({
200
+ title,
201
+ description,
202
+ action,
203
+ footer,
204
+ children,
205
+ className,
206
+ contentClassName,
207
+ ...props
208
+ }) {
209
+ return /* @__PURE__ */ jsxs(Card, { className: cn("w-full min-w-0 overflow-hidden", className), ...props, children: [
210
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
211
+ /* @__PURE__ */ jsx(CardTitle, { children: title }),
212
+ description ? /* @__PURE__ */ jsx(CardDescription, { children: description }) : null,
213
+ action ? /* @__PURE__ */ jsx(CardAction, { children: action }) : null
214
+ ] }),
215
+ /* @__PURE__ */ jsx(CardContent, { className: contentClassName, children }),
216
+ footer ? /* @__PURE__ */ jsx(CardFooter, { children: footer }) : null
217
+ ] });
218
+ }
219
+ function AreaGradientDefs({
220
+ seriesKeys,
221
+ opacity = 0.3
222
+ }) {
223
+ return /* @__PURE__ */ jsx("defs", { children: seriesKeys.map((key) => /* @__PURE__ */ jsxs(
224
+ "linearGradient",
225
+ {
226
+ id: `gradient-${key}`,
227
+ x1: "0",
228
+ y1: "0",
229
+ x2: "0",
230
+ y2: "1",
231
+ children: [
232
+ /* @__PURE__ */ jsx(
233
+ "stop",
234
+ {
235
+ offset: "5%",
236
+ stopColor: `var(--color-${key})`,
237
+ stopOpacity: opacity
238
+ }
239
+ ),
240
+ /* @__PURE__ */ jsx(
241
+ "stop",
242
+ {
243
+ offset: "95%",
244
+ stopColor: `var(--color-${key})`,
245
+ stopOpacity: 0
246
+ }
247
+ )
248
+ ]
249
+ },
250
+ key
251
+ )) });
252
+ }
253
+ function DashboardBarChart({
254
+ data,
255
+ config,
256
+ indexKey = "name",
257
+ series,
258
+ colors,
259
+ barSize = "md",
260
+ stacked = false,
261
+ showGrid = true,
262
+ showLegend = true,
263
+ valueFormatter = formatTick,
264
+ isLoading,
265
+ error,
266
+ onRetry,
267
+ retryLabel,
268
+ emptyTitle,
269
+ emptyDescription,
270
+ errorTitle,
271
+ errorDescription,
272
+ loadingLabel,
273
+ stateClassName,
274
+ className,
275
+ ...props
276
+ }) {
277
+ const chartSeries = getChartSeries(config, series);
278
+ const chartConfig = getChartConfigWithColors(
279
+ config,
280
+ chartSeries.map((item) => item.key),
281
+ colors
282
+ );
283
+ const topOfStack = React.useMemo(() => {
284
+ const result = /* @__PURE__ */ new Set();
285
+ if (stacked) {
286
+ const lastByStack = /* @__PURE__ */ new Map();
287
+ chartSeries.forEach((s) => lastByStack.set(s.stackId || "total", s.key));
288
+ lastByStack.forEach((key) => result.add(key));
289
+ }
290
+ return result;
291
+ }, [stacked, chartSeries]);
292
+ const chartState = getChartState(
293
+ {
294
+ isLoading,
295
+ error,
296
+ onRetry,
297
+ retryLabel,
298
+ emptyTitle,
299
+ emptyDescription,
300
+ errorTitle,
301
+ errorDescription,
302
+ loadingLabel
303
+ },
304
+ hasChartData(data, chartSeries),
305
+ cn("h-[320px] w-full", stateClassName)
306
+ );
307
+ if (chartState) {
308
+ return chartState;
309
+ }
310
+ return /* @__PURE__ */ jsx(
311
+ ChartContainer,
312
+ {
313
+ config: chartConfig,
314
+ className: cn("h-[320px] w-full", className),
315
+ ...props,
316
+ children: /* @__PURE__ */ jsxs(RechartsPrimitive.BarChart, { data, accessibilityLayer: true, barGap: 4, children: [
317
+ showGrid ? /* @__PURE__ */ jsx(
318
+ RechartsPrimitive.CartesianGrid,
319
+ {
320
+ vertical: false,
321
+ strokeDasharray: "3 3",
322
+ stroke: "var(--border)",
323
+ strokeOpacity: 0.5
324
+ }
325
+ ) : null,
326
+ /* @__PURE__ */ jsx(
327
+ RechartsPrimitive.XAxis,
328
+ {
329
+ dataKey: indexKey,
330
+ tickLine: false,
331
+ axisLine: false,
332
+ tickMargin: 8
333
+ }
334
+ ),
335
+ /* @__PURE__ */ jsx(
336
+ RechartsPrimitive.YAxis,
337
+ {
338
+ tickLine: false,
339
+ axisLine: false,
340
+ tickMargin: 8,
341
+ tickFormatter: valueFormatter
342
+ }
343
+ ),
344
+ /* @__PURE__ */ jsx(
345
+ ChartTooltip,
346
+ {
347
+ cursor: { fill: "var(--muted)", opacity: 0.4, radius: 4 },
348
+ content: /* @__PURE__ */ jsx(ChartTooltipContent, {})
349
+ }
350
+ ),
351
+ showLegend ? /* @__PURE__ */ jsx(ChartLegend, { content: /* @__PURE__ */ jsx(ChartLegendContent, {}) }) : null,
352
+ chartSeries.map((item) => {
353
+ const isTop = !stacked || topOfStack.has(item.key);
354
+ return /* @__PURE__ */ jsx(
355
+ RechartsPrimitive.Bar,
356
+ {
357
+ dataKey: item.key,
358
+ fill: `var(--color-${item.key})`,
359
+ radius: isTop ? [4, 4, 0, 0] : [0, 0, 0, 0],
360
+ barSize: getBarSize(barSize),
361
+ stackId: stacked ? item.stackId || "total" : item.stackId,
362
+ isAnimationActive: true,
363
+ animationDuration: 600,
364
+ animationEasing: "ease-out"
365
+ },
366
+ item.key
367
+ );
368
+ })
369
+ ] })
370
+ }
371
+ );
372
+ }
373
+ function DashboardLineChart({
374
+ data,
375
+ config,
376
+ indexKey = "name",
377
+ series,
378
+ colors,
379
+ showDots = false,
380
+ showGrid = true,
381
+ showLegend = true,
382
+ curveType = "monotone",
383
+ strokeWidth = 2,
384
+ valueFormatter = formatTick,
385
+ isLoading,
386
+ error,
387
+ onRetry,
388
+ retryLabel,
389
+ emptyTitle,
390
+ emptyDescription,
391
+ errorTitle,
392
+ errorDescription,
393
+ loadingLabel,
394
+ stateClassName,
395
+ className,
396
+ ...props
397
+ }) {
398
+ const chartSeries = getChartSeries(config, series);
399
+ const chartConfig = getChartConfigWithColors(
400
+ config,
401
+ chartSeries.map((item) => item.key),
402
+ colors
403
+ );
404
+ const chartState = getChartState(
405
+ {
406
+ isLoading,
407
+ error,
408
+ onRetry,
409
+ retryLabel,
410
+ emptyTitle,
411
+ emptyDescription,
412
+ errorTitle,
413
+ errorDescription,
414
+ loadingLabel
415
+ },
416
+ hasChartData(data, chartSeries),
417
+ cn("h-[320px] w-full", stateClassName)
418
+ );
419
+ if (chartState) {
420
+ return chartState;
421
+ }
422
+ return /* @__PURE__ */ jsx(
423
+ ChartContainer,
424
+ {
425
+ config: chartConfig,
426
+ className: cn("h-[320px] w-full", className),
427
+ ...props,
428
+ children: /* @__PURE__ */ jsxs(RechartsPrimitive.LineChart, { data, accessibilityLayer: true, children: [
429
+ showGrid ? /* @__PURE__ */ jsx(
430
+ RechartsPrimitive.CartesianGrid,
431
+ {
432
+ vertical: false,
433
+ strokeDasharray: "3 3",
434
+ stroke: "var(--border)",
435
+ strokeOpacity: 0.5
436
+ }
437
+ ) : null,
438
+ /* @__PURE__ */ jsx(
439
+ RechartsPrimitive.XAxis,
440
+ {
441
+ dataKey: indexKey,
442
+ tickLine: false,
443
+ axisLine: false,
444
+ tickMargin: 8
445
+ }
446
+ ),
447
+ /* @__PURE__ */ jsx(
448
+ RechartsPrimitive.YAxis,
449
+ {
450
+ tickLine: false,
451
+ axisLine: false,
452
+ tickMargin: 8,
453
+ tickFormatter: valueFormatter
454
+ }
455
+ ),
456
+ /* @__PURE__ */ jsx(ChartTooltip, { content: /* @__PURE__ */ jsx(ChartTooltipContent, { indicator: "line" }) }),
457
+ showLegend ? /* @__PURE__ */ jsx(ChartLegend, { content: /* @__PURE__ */ jsx(ChartLegendContent, {}) }) : null,
458
+ chartSeries.map((item) => /* @__PURE__ */ jsx(
459
+ RechartsPrimitive.Line,
460
+ {
461
+ type: curveType,
462
+ dataKey: item.key,
463
+ stroke: `var(--color-${item.key})`,
464
+ strokeWidth,
465
+ dot: showDots ? { r: 3, fill: `var(--color-${item.key})`, strokeWidth: 0 } : false,
466
+ activeDot: { r: 5, strokeWidth: 0 },
467
+ yAxisId: item.yAxisId,
468
+ isAnimationActive: true,
469
+ animationDuration: 600,
470
+ animationEasing: "ease-out"
471
+ },
472
+ item.key
473
+ ))
474
+ ] })
475
+ }
476
+ );
477
+ }
478
+ function HorizontalBarChart({
479
+ data,
480
+ config,
481
+ indexKey = "name",
482
+ series,
483
+ colors,
484
+ barSize = "md",
485
+ stacked = false,
486
+ categoryWidth = 96,
487
+ showGrid = true,
488
+ showLegend = true,
489
+ valueFormatter = formatTick,
490
+ isLoading,
491
+ error,
492
+ onRetry,
493
+ retryLabel,
494
+ emptyTitle,
495
+ emptyDescription,
496
+ errorTitle,
497
+ errorDescription,
498
+ loadingLabel,
499
+ stateClassName,
500
+ className,
501
+ ...props
502
+ }) {
503
+ const chartSeries = getChartSeries(config, series);
504
+ const chartConfig = getChartConfigWithColors(
505
+ config,
506
+ chartSeries.map((item) => item.key),
507
+ colors
508
+ );
509
+ const chartState = getChartState(
510
+ {
511
+ isLoading,
512
+ error,
513
+ onRetry,
514
+ retryLabel,
515
+ emptyTitle,
516
+ emptyDescription,
517
+ errorTitle,
518
+ errorDescription,
519
+ loadingLabel
520
+ },
521
+ hasChartData(data, chartSeries),
522
+ cn("h-[320px] w-full", stateClassName)
523
+ );
524
+ if (chartState) {
525
+ return chartState;
526
+ }
527
+ return /* @__PURE__ */ jsx(
528
+ ChartContainer,
529
+ {
530
+ config: chartConfig,
531
+ className: cn("h-[320px] w-full", className),
532
+ ...props,
533
+ children: /* @__PURE__ */ jsxs(
534
+ RechartsPrimitive.BarChart,
535
+ {
536
+ data,
537
+ layout: "vertical",
538
+ accessibilityLayer: true,
539
+ margin: { left: 8, right: 16 },
540
+ children: [
541
+ showGrid ? /* @__PURE__ */ jsx(
542
+ RechartsPrimitive.CartesianGrid,
543
+ {
544
+ horizontal: false,
545
+ strokeDasharray: "3 3",
546
+ stroke: "var(--border)",
547
+ strokeOpacity: 0.5
548
+ }
549
+ ) : null,
550
+ /* @__PURE__ */ jsx(
551
+ RechartsPrimitive.XAxis,
552
+ {
553
+ type: "number",
554
+ tickLine: false,
555
+ axisLine: false,
556
+ tickMargin: 8,
557
+ tickFormatter: valueFormatter
558
+ }
559
+ ),
560
+ /* @__PURE__ */ jsx(
561
+ RechartsPrimitive.YAxis,
562
+ {
563
+ dataKey: indexKey,
564
+ type: "category",
565
+ tickLine: false,
566
+ axisLine: false,
567
+ tickMargin: 8,
568
+ width: categoryWidth
569
+ }
570
+ ),
571
+ /* @__PURE__ */ jsx(ChartTooltip, { content: /* @__PURE__ */ jsx(ChartTooltipContent, {}) }),
572
+ showLegend ? /* @__PURE__ */ jsx(ChartLegend, { content: /* @__PURE__ */ jsx(ChartLegendContent, {}) }) : null,
573
+ chartSeries.map((item) => /* @__PURE__ */ jsx(
574
+ RechartsPrimitive.Bar,
575
+ {
576
+ dataKey: item.key,
577
+ fill: `var(--color-${item.key})`,
578
+ radius: [0, 4, 4, 0],
579
+ barSize: getBarSize(barSize),
580
+ stackId: stacked ? item.stackId || "total" : item.stackId,
581
+ isAnimationActive: true,
582
+ animationDuration: 600,
583
+ animationEasing: "ease-out"
584
+ },
585
+ item.key
586
+ ))
587
+ ]
588
+ }
589
+ )
590
+ }
591
+ );
592
+ }
593
+ function InteractiveTimeSeriesChart({
594
+ data,
595
+ config,
596
+ indexKey = "date",
597
+ series,
598
+ colors,
599
+ periods = defaultPeriods,
600
+ defaultPeriod = ((_a) => (_a = periods[1]) == null ? void 0 : _a.value)() || ((_b) => (_b = periods[0]) == null ? void 0 : _b.value)() || "30d",
601
+ defaultSeries,
602
+ filterData = defaultFilterData,
603
+ showGrid = true,
604
+ showLegend = false,
605
+ showDots = false,
606
+ gradientFill = true,
607
+ curveType = "monotone",
608
+ strokeWidth = 2,
609
+ valueFormatter = formatTick,
610
+ isLoading,
611
+ error,
612
+ onRetry,
613
+ retryLabel,
614
+ emptyTitle,
615
+ emptyDescription,
616
+ errorTitle,
617
+ errorDescription,
618
+ loadingLabel,
619
+ stateClassName,
620
+ className,
621
+ ...props
622
+ }) {
623
+ var _a2;
624
+ const chartSeries = getChartSeries(config, series);
625
+ const chartConfig = getChartConfigWithColors(
626
+ config,
627
+ chartSeries.map((item) => item.key),
628
+ colors
629
+ );
630
+ const [period, setPeriod] = React.useState(defaultPeriod);
631
+ const [activeSeries, setActiveSeries] = React.useState(
632
+ defaultSeries || ((_a2 = chartSeries[0]) == null ? void 0 : _a2.key) || ""
633
+ );
634
+ const filteredData = React.useMemo(
635
+ () => filterData(data, period),
636
+ [data, filterData, period]
637
+ );
638
+ const visibleSeries = chartSeries.length > 1 ? chartSeries.filter((item) => item.key === activeSeries) : chartSeries;
639
+ const chartState = getChartState(
640
+ {
641
+ isLoading,
642
+ error,
643
+ onRetry,
644
+ retryLabel,
645
+ emptyTitle,
646
+ emptyDescription,
647
+ errorTitle,
648
+ errorDescription,
649
+ loadingLabel
650
+ },
651
+ hasChartData(filteredData, visibleSeries),
652
+ cn("h-[320px] w-full", stateClassName)
653
+ );
654
+ return /* @__PURE__ */ jsxs("div", { className: "w-full space-y-4", children: [
655
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between", children: [
656
+ chartSeries.length > 1 ? /* @__PURE__ */ jsx(
657
+ "div",
658
+ {
659
+ className: "inline-flex h-10 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",
660
+ role: "group",
661
+ "aria-label": "Selecionar metrica do grafico",
662
+ children: chartSeries.map((item) => {
663
+ var _a3;
664
+ const label = item.label || ((_a3 = config[item.key]) == null ? void 0 : _a3.label) || item.key;
665
+ return /* @__PURE__ */ jsx(
666
+ Button,
667
+ {
668
+ type: "button",
669
+ variant: "ghost",
670
+ size: "sm",
671
+ "aria-pressed": activeSeries === item.key,
672
+ onClick: () => setActiveSeries(item.key),
673
+ className: cn(
674
+ "h-8 px-3 text-sm font-medium transition-all",
675
+ activeSeries === item.key ? "bg-background text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"
676
+ ),
677
+ children: label
678
+ },
679
+ item.key
680
+ );
681
+ })
682
+ }
683
+ ) : /* @__PURE__ */ jsx("div", {}),
684
+ /* @__PURE__ */ jsxs(Select, { value: period, onValueChange: setPeriod, children: [
685
+ /* @__PURE__ */ jsx(SelectTrigger, { className: "w-full sm:w-[160px]", size: "sm", "aria-label": "Selecionar periodo do grafico", children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "Period" }) }),
686
+ /* @__PURE__ */ jsx(SelectContent, { children: periods.map((item) => /* @__PURE__ */ jsx(SelectItem, { value: item.value, children: item.label }, item.value)) })
687
+ ] })
688
+ ] }),
689
+ chartState || /* @__PURE__ */ jsx(
690
+ ChartContainer,
691
+ {
692
+ config: chartConfig,
693
+ className: cn("h-[320px] w-full", className),
694
+ ...props,
695
+ children: /* @__PURE__ */ jsxs(RechartsPrimitive.AreaChart, { data: filteredData, accessibilityLayer: true, children: [
696
+ gradientFill && /* @__PURE__ */ jsx(
697
+ AreaGradientDefs,
698
+ {
699
+ seriesKeys: visibleSeries.map((s) => s.key),
700
+ opacity: 0.4
701
+ }
702
+ ),
703
+ showGrid ? /* @__PURE__ */ jsx(
704
+ RechartsPrimitive.CartesianGrid,
705
+ {
706
+ vertical: false,
707
+ strokeDasharray: "3 3",
708
+ stroke: "var(--border)",
709
+ strokeOpacity: 0.5
710
+ }
711
+ ) : null,
712
+ /* @__PURE__ */ jsx(
713
+ RechartsPrimitive.XAxis,
714
+ {
715
+ dataKey: indexKey,
716
+ tickLine: false,
717
+ axisLine: false,
718
+ tickMargin: 8
719
+ }
720
+ ),
721
+ /* @__PURE__ */ jsx(
722
+ RechartsPrimitive.YAxis,
723
+ {
724
+ tickLine: false,
725
+ axisLine: false,
726
+ tickMargin: 8,
727
+ tickFormatter: valueFormatter
728
+ }
729
+ ),
730
+ /* @__PURE__ */ jsx(ChartTooltip, { content: /* @__PURE__ */ jsx(ChartTooltipContent, { indicator: "line" }) }),
731
+ showLegend ? /* @__PURE__ */ jsx(ChartLegend, { content: /* @__PURE__ */ jsx(ChartLegendContent, {}) }) : null,
732
+ visibleSeries.map((item) => /* @__PURE__ */ jsx(
733
+ RechartsPrimitive.Area,
734
+ {
735
+ type: curveType,
736
+ dataKey: item.key,
737
+ stroke: `var(--color-${item.key})`,
738
+ fill: gradientFill ? `url(#gradient-${item.key})` : `var(--color-${item.key})`,
739
+ fillOpacity: gradientFill ? 1 : 0.16,
740
+ strokeWidth,
741
+ dot: showDots ? { r: 3, fill: `var(--color-${item.key})`, strokeWidth: 0 } : false,
742
+ activeDot: { r: 5, strokeWidth: 0 },
743
+ isAnimationActive: true,
744
+ animationDuration: 600,
745
+ animationEasing: "ease-out"
746
+ },
747
+ item.key
748
+ ))
749
+ ] })
750
+ }
751
+ )
752
+ ] });
753
+ }
754
+ function ComboMetricChart({
755
+ data,
756
+ config,
757
+ indexKey = "name",
758
+ series,
759
+ colors,
760
+ barSize = "md",
761
+ showGrid = true,
762
+ showLegend = true,
763
+ gradientFill = false,
764
+ curveType = "monotone",
765
+ valueFormatter = formatTick,
766
+ isLoading,
767
+ error,
768
+ onRetry,
769
+ retryLabel,
770
+ emptyTitle,
771
+ emptyDescription,
772
+ errorTitle,
773
+ errorDescription,
774
+ loadingLabel,
775
+ stateClassName,
776
+ className,
777
+ ...props
778
+ }) {
779
+ const chartSeries = getChartSeries(config, series);
780
+ const chartConfig = getChartConfigWithColors(
781
+ config,
782
+ chartSeries.map((item) => item.key),
783
+ colors
784
+ );
785
+ const chartState = getChartState(
786
+ {
787
+ isLoading,
788
+ error,
789
+ onRetry,
790
+ retryLabel,
791
+ emptyTitle,
792
+ emptyDescription,
793
+ errorTitle,
794
+ errorDescription,
795
+ loadingLabel
796
+ },
797
+ hasChartData(data, chartSeries),
798
+ cn("h-[340px] w-full", stateClassName)
799
+ );
800
+ if (chartState) {
801
+ return chartState;
802
+ }
803
+ const areaSeries = gradientFill ? chartSeries.filter((s) => s.type === "area").map((s) => s.key) : [];
804
+ return /* @__PURE__ */ jsx(
805
+ ChartContainer,
806
+ {
807
+ config: chartConfig,
808
+ className: cn("h-[340px] w-full", className),
809
+ ...props,
810
+ children: /* @__PURE__ */ jsxs(RechartsPrimitive.ComposedChart, { data, accessibilityLayer: true, children: [
811
+ gradientFill && areaSeries.length > 0 && /* @__PURE__ */ jsx(AreaGradientDefs, { seriesKeys: areaSeries, opacity: 0.35 }),
812
+ showGrid ? /* @__PURE__ */ jsx(
813
+ RechartsPrimitive.CartesianGrid,
814
+ {
815
+ vertical: false,
816
+ strokeDasharray: "3 3",
817
+ stroke: "var(--border)",
818
+ strokeOpacity: 0.5
819
+ }
820
+ ) : null,
821
+ /* @__PURE__ */ jsx(
822
+ RechartsPrimitive.XAxis,
823
+ {
824
+ dataKey: indexKey,
825
+ tickLine: false,
826
+ axisLine: false,
827
+ tickMargin: 8
828
+ }
829
+ ),
830
+ /* @__PURE__ */ jsx(
831
+ RechartsPrimitive.YAxis,
832
+ {
833
+ tickLine: false,
834
+ axisLine: false,
835
+ tickMargin: 8,
836
+ tickFormatter: valueFormatter
837
+ }
838
+ ),
839
+ /* @__PURE__ */ jsx(ChartTooltip, { content: /* @__PURE__ */ jsx(ChartTooltipContent, {}) }),
840
+ showLegend ? /* @__PURE__ */ jsx(ChartLegend, { content: /* @__PURE__ */ jsx(ChartLegendContent, {}) }) : null,
841
+ chartSeries.map(
842
+ (item) => item.type === "line" ? /* @__PURE__ */ jsx(
843
+ RechartsPrimitive.Line,
844
+ {
845
+ type: curveType,
846
+ dataKey: item.key,
847
+ stroke: `var(--color-${item.key})`,
848
+ strokeWidth: 2,
849
+ dot: false,
850
+ activeDot: { r: 5, strokeWidth: 0 },
851
+ yAxisId: item.yAxisId,
852
+ isAnimationActive: true,
853
+ animationDuration: 600,
854
+ animationEasing: "ease-out"
855
+ },
856
+ item.key
857
+ ) : item.type === "area" ? /* @__PURE__ */ jsx(
858
+ RechartsPrimitive.Area,
859
+ {
860
+ type: curveType,
861
+ dataKey: item.key,
862
+ stroke: `var(--color-${item.key})`,
863
+ fill: gradientFill ? `url(#gradient-${item.key})` : `var(--color-${item.key})`,
864
+ fillOpacity: gradientFill ? 1 : 0.12,
865
+ strokeWidth: 2,
866
+ dot: false,
867
+ activeDot: { r: 5, strokeWidth: 0 },
868
+ yAxisId: item.yAxisId,
869
+ isAnimationActive: true,
870
+ animationDuration: 600,
871
+ animationEasing: "ease-out"
872
+ },
873
+ item.key
874
+ ) : /* @__PURE__ */ jsx(
875
+ RechartsPrimitive.Bar,
876
+ {
877
+ dataKey: item.key,
878
+ fill: `var(--color-${item.key})`,
879
+ radius: [4, 4, 0, 0],
880
+ barSize: getBarSize(barSize),
881
+ yAxisId: item.yAxisId,
882
+ isAnimationActive: true,
883
+ animationDuration: 600,
884
+ animationEasing: "ease-out"
885
+ },
886
+ item.key
887
+ )
888
+ )
889
+ ] })
890
+ }
891
+ );
892
+ }
893
+ function DonutBreakdownChart({
894
+ data,
895
+ config,
896
+ nameKey = "name",
897
+ valueKey = "value",
898
+ colors,
899
+ centerLabel,
900
+ centerValue,
901
+ showLegend = true,
902
+ innerRadius = "58%",
903
+ outerRadius = "82%",
904
+ isLoading,
905
+ error,
906
+ onRetry,
907
+ retryLabel,
908
+ emptyTitle,
909
+ emptyDescription,
910
+ errorTitle,
911
+ errorDescription,
912
+ loadingLabel,
913
+ stateClassName,
914
+ className,
915
+ ...props
916
+ }) {
917
+ const [activeIndex, setActiveIndex] = React.useState(0);
918
+ const chartKeys = data.map(
919
+ (entry, index) => String(entry[nameKey] || `segment-${index}`)
920
+ );
921
+ const chartConfig = getChartConfigWithColors(config, chartKeys, colors);
922
+ const chartState = getChartState(
923
+ {
924
+ isLoading,
925
+ error,
926
+ onRetry,
927
+ retryLabel,
928
+ emptyTitle,
929
+ emptyDescription,
930
+ errorTitle,
931
+ errorDescription,
932
+ loadingLabel
933
+ },
934
+ hasPieData(data, nameKey, valueKey),
935
+ cn("h-[320px] w-full", stateClassName)
936
+ );
937
+ if (chartState) {
938
+ return chartState;
939
+ }
940
+ return /* @__PURE__ */ jsx(
941
+ ChartContainer,
942
+ {
943
+ config: chartConfig,
944
+ className: cn("h-[320px] w-full", className),
945
+ ...props,
946
+ children: /* @__PURE__ */ jsxs(RechartsPrimitive.PieChart, { accessibilityLayer: true, children: [
947
+ /* @__PURE__ */ jsx(
948
+ ChartTooltip,
949
+ {
950
+ cursor: false,
951
+ content: /* @__PURE__ */ jsx(ChartTooltipContent, { hideLabel: true, nameKey })
952
+ }
953
+ ),
954
+ showLegend ? /* @__PURE__ */ jsx(
955
+ ChartLegend,
956
+ {
957
+ content: /* @__PURE__ */ jsx(ChartLegendContent, { nameKey }),
958
+ verticalAlign: "bottom"
959
+ }
960
+ ) : null,
961
+ /* @__PURE__ */ jsxs(
962
+ RechartsPrimitive.Pie,
963
+ {
964
+ data,
965
+ dataKey: valueKey,
966
+ nameKey,
967
+ innerRadius,
968
+ outerRadius,
969
+ paddingAngle: 3,
970
+ activeIndex,
971
+ onMouseEnter: (_, index) => setActiveIndex(index),
972
+ isAnimationActive: true,
973
+ animationDuration: 600,
974
+ animationEasing: "ease-out",
975
+ children: [
976
+ data.map((entry, index) => {
977
+ const key = String(entry[nameKey] || `segment-${index}`);
978
+ return /* @__PURE__ */ jsx(
979
+ RechartsPrimitive.Cell,
980
+ {
981
+ fill: `var(--color-${key})`,
982
+ opacity: index === activeIndex ? 1 : 0.7,
983
+ stroke: "transparent"
984
+ },
985
+ key
986
+ );
987
+ }),
988
+ centerValue || centerLabel ? /* @__PURE__ */ jsx(
989
+ RechartsPrimitive.Label,
990
+ {
991
+ position: "center",
992
+ content: ({ viewBox }) => {
993
+ if (!viewBox || !("cx" in viewBox) || !("cy" in viewBox)) {
994
+ return null;
995
+ }
996
+ return /* @__PURE__ */ jsxs(
997
+ "text",
998
+ {
999
+ x: viewBox.cx,
1000
+ y: viewBox.cy,
1001
+ textAnchor: "middle",
1002
+ dominantBaseline: "middle",
1003
+ children: [
1004
+ centerValue ? /* @__PURE__ */ jsx(
1005
+ "tspan",
1006
+ {
1007
+ x: viewBox.cx,
1008
+ y: viewBox.cy,
1009
+ className: "fill-foreground text-2xl font-semibold",
1010
+ children: centerValue
1011
+ }
1012
+ ) : null,
1013
+ centerLabel ? /* @__PURE__ */ jsx(
1014
+ "tspan",
1015
+ {
1016
+ x: viewBox.cx,
1017
+ y: Number(viewBox.cy) + 22,
1018
+ className: "fill-muted-foreground text-xs",
1019
+ children: centerLabel
1020
+ }
1021
+ ) : null
1022
+ ]
1023
+ }
1024
+ );
1025
+ }
1026
+ }
1027
+ ) : null
1028
+ ]
1029
+ }
1030
+ )
1031
+ ] })
1032
+ }
1033
+ );
1034
+ }
1035
+ function SparklineChart({
1036
+ data,
1037
+ dataKey,
1038
+ color = "var(--chart-1)",
1039
+ filled = true,
1040
+ showEndDot = true,
1041
+ curveType = "monotone",
1042
+ strokeWidth = 2,
1043
+ className
1044
+ }) {
1045
+ const sparkId = React.useId().replace(/:/g, "");
1046
+ const lastPoint = data[data.length - 1];
1047
+ const lastValue = lastPoint ? lastPoint[dataKey] : void 0;
1048
+ return /* @__PURE__ */ jsxs("div", { className: cn("relative h-12 w-full min-w-0", className), children: [
1049
+ /* @__PURE__ */ jsx(RechartsPrimitive.ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs(
1050
+ RechartsPrimitive.AreaChart,
1051
+ {
1052
+ data,
1053
+ margin: { top: 4, right: showEndDot ? 8 : 0, bottom: 0, left: 0 },
1054
+ children: [
1055
+ filled && /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs(
1056
+ "linearGradient",
1057
+ {
1058
+ id: `spark-gradient-${sparkId}`,
1059
+ x1: "0",
1060
+ y1: "0",
1061
+ x2: "0",
1062
+ y2: "1",
1063
+ children: [
1064
+ /* @__PURE__ */ jsx("stop", { offset: "5%", stopColor: color, stopOpacity: 0.3 }),
1065
+ /* @__PURE__ */ jsx("stop", { offset: "95%", stopColor: color, stopOpacity: 0 })
1066
+ ]
1067
+ }
1068
+ ) }),
1069
+ /* @__PURE__ */ jsx(
1070
+ RechartsPrimitive.Area,
1071
+ {
1072
+ type: curveType,
1073
+ dataKey,
1074
+ stroke: color,
1075
+ strokeWidth,
1076
+ fill: filled ? `url(#spark-gradient-${sparkId})` : "none",
1077
+ fillOpacity: 1,
1078
+ dot: false,
1079
+ activeDot: false,
1080
+ isAnimationActive: true,
1081
+ animationDuration: 600,
1082
+ animationEasing: "ease-out"
1083
+ }
1084
+ )
1085
+ ]
1086
+ }
1087
+ ) }),
1088
+ showEndDot && lastValue !== void 0 && lastValue !== null && /* @__PURE__ */ jsx(
1089
+ "div",
1090
+ {
1091
+ className: "pointer-events-none absolute right-0 top-1/2 h-2.5 w-2.5 -translate-y-1/2 rounded-full ring-2 ring-background",
1092
+ style: { backgroundColor: color }
1093
+ }
1094
+ )
1095
+ ] });
1096
+ }
1097
+ function RadarMetricChart({
1098
+ data,
1099
+ labelKey,
1100
+ series,
1101
+ colors,
1102
+ filled = true,
1103
+ fillOpacity = 0.25,
1104
+ showDots = false,
1105
+ showGrid = true,
1106
+ showLegend,
1107
+ valueFormatter,
1108
+ isLoading,
1109
+ error,
1110
+ onRetry,
1111
+ retryLabel,
1112
+ emptyTitle,
1113
+ emptyDescription,
1114
+ errorTitle,
1115
+ errorDescription,
1116
+ loadingLabel,
1117
+ stateClassName,
1118
+ className
1119
+ }) {
1120
+ const chartConfig = React.useMemo(
1121
+ () => buildChartConfig(series.map((s) => s.key), colors),
1122
+ [series, colors]
1123
+ );
1124
+ const hasData = data.length > 0 && series.length > 0;
1125
+ const chartState = getChartState(
1126
+ { isLoading, error, emptyTitle, emptyDescription, errorTitle, errorDescription, loadingLabel, stateClassName, onRetry, retryLabel },
1127
+ hasData
1128
+ );
1129
+ const displayLegend = showLegend ?? series.length > 1;
1130
+ return /* @__PURE__ */ jsx(ChartContainer, { config: chartConfig, className: cn("h-[300px] w-full", className), children: chartState ?? /* @__PURE__ */ jsxs(RechartsPrimitive.RadarChart, { data, accessibilityLayer: true, children: [
1131
+ showGrid && /* @__PURE__ */ jsx(
1132
+ RechartsPrimitive.PolarGrid,
1133
+ {
1134
+ stroke: "var(--border)",
1135
+ strokeOpacity: 0.6
1136
+ }
1137
+ ),
1138
+ /* @__PURE__ */ jsx(
1139
+ RechartsPrimitive.PolarAngleAxis,
1140
+ {
1141
+ dataKey: labelKey,
1142
+ tick: { fill: "var(--muted-foreground)", fontSize: 12 }
1143
+ }
1144
+ ),
1145
+ /* @__PURE__ */ jsx(
1146
+ RechartsPrimitive.PolarRadiusAxis,
1147
+ {
1148
+ tick: false,
1149
+ axisLine: false,
1150
+ tickFormatter: valueFormatter
1151
+ }
1152
+ ),
1153
+ /* @__PURE__ */ jsx(
1154
+ ChartTooltip,
1155
+ {
1156
+ content: /* @__PURE__ */ jsx(
1157
+ ChartTooltipContent,
1158
+ {
1159
+ formatter: valueFormatter ? (v) => valueFormatter(v) : void 0
1160
+ }
1161
+ )
1162
+ }
1163
+ ),
1164
+ displayLegend && /* @__PURE__ */ jsx(ChartLegend, { content: /* @__PURE__ */ jsx(ChartLegendContent, {}) }),
1165
+ series.map((s) => /* @__PURE__ */ jsx(
1166
+ RechartsPrimitive.Radar,
1167
+ {
1168
+ name: s.label ?? s.key,
1169
+ dataKey: s.key,
1170
+ stroke: `var(--color-${s.key})`,
1171
+ fill: filled ? `var(--color-${s.key})` : "none",
1172
+ fillOpacity: filled ? fillOpacity : 0,
1173
+ dot: showDots ? { r: 3, fill: `var(--color-${s.key})` } : false,
1174
+ isAnimationActive: true,
1175
+ animationDuration: 600,
1176
+ animationEasing: "ease-out"
1177
+ },
1178
+ s.key
1179
+ ))
1180
+ ] }) });
1181
+ }
1182
+ function PieMetricChart({
1183
+ data,
1184
+ nameKey,
1185
+ valueKey,
1186
+ colors,
1187
+ outerRadius = "80%",
1188
+ innerRadius = 0,
1189
+ showLabels = false,
1190
+ showLegend = true,
1191
+ explodeIndex,
1192
+ explodeOffset = 12,
1193
+ valueFormatter,
1194
+ isLoading,
1195
+ error,
1196
+ onRetry,
1197
+ retryLabel,
1198
+ emptyTitle,
1199
+ emptyDescription,
1200
+ errorTitle,
1201
+ errorDescription,
1202
+ loadingLabel,
1203
+ stateClassName,
1204
+ className
1205
+ }) {
1206
+ const names = React.useMemo(
1207
+ () => data.map((d) => String(d[nameKey] ?? "")),
1208
+ [data, nameKey]
1209
+ );
1210
+ const chartConfig = React.useMemo(
1211
+ () => buildChartConfig(names, colors),
1212
+ [names, colors]
1213
+ );
1214
+ const hasData = hasPieData(data, nameKey, valueKey);
1215
+ const chartState = getChartState(
1216
+ { isLoading, error, emptyTitle, emptyDescription, errorTitle, errorDescription, loadingLabel, stateClassName, onRetry, retryLabel },
1217
+ hasData
1218
+ );
1219
+ return /* @__PURE__ */ jsx(ChartContainer, { config: chartConfig, className: cn("h-[300px] w-full", className), children: chartState ?? /* @__PURE__ */ jsxs(RechartsPrimitive.PieChart, { accessibilityLayer: true, children: [
1220
+ /* @__PURE__ */ jsx(
1221
+ ChartTooltip,
1222
+ {
1223
+ content: /* @__PURE__ */ jsx(
1224
+ ChartTooltipContent,
1225
+ {
1226
+ nameKey,
1227
+ formatter: valueFormatter ? (v) => valueFormatter(v) : void 0
1228
+ }
1229
+ )
1230
+ }
1231
+ ),
1232
+ showLegend && /* @__PURE__ */ jsx(ChartLegend, { content: /* @__PURE__ */ jsx(ChartLegendContent, { nameKey }) }),
1233
+ /* @__PURE__ */ jsx(
1234
+ RechartsPrimitive.Pie,
1235
+ {
1236
+ data,
1237
+ dataKey: valueKey,
1238
+ nameKey,
1239
+ outerRadius,
1240
+ innerRadius,
1241
+ paddingAngle: 2,
1242
+ label: showLabels ? ({ cx, cy, midAngle, innerRadius: ir, outerRadius: or, percent }) => {
1243
+ const RADIAN = Math.PI / 180;
1244
+ const radius = Number(ir) + (Number(or) - Number(ir)) * 1.35;
1245
+ const x = Number(cx) + radius * Math.cos(-midAngle * RADIAN);
1246
+ const y = Number(cy) + radius * Math.sin(-midAngle * RADIAN);
1247
+ return percent > 0.04 ? /* @__PURE__ */ jsx(
1248
+ "text",
1249
+ {
1250
+ x,
1251
+ y,
1252
+ fill: "var(--foreground)",
1253
+ textAnchor: x > Number(cx) ? "start" : "end",
1254
+ dominantBaseline: "central",
1255
+ fontSize: 12,
1256
+ fontWeight: 500,
1257
+ children: `${(percent * 100).toFixed(0)}%`
1258
+ }
1259
+ ) : null;
1260
+ } : false,
1261
+ labelLine: false,
1262
+ isAnimationActive: true,
1263
+ animationDuration: 600,
1264
+ animationEasing: "ease-out",
1265
+ children: data.map((entry, index) => {
1266
+ var _a, _b;
1267
+ const name = String(entry[nameKey] ?? "");
1268
+ const isExploded = index === explodeIndex;
1269
+ return /* @__PURE__ */ jsx(
1270
+ RechartsPrimitive.Cell,
1271
+ {
1272
+ fill: ((_a = chartConfig[name]) == null ? void 0 : _a.color) ?? `var(--chart-${index % 8 + 1})`,
1273
+ stroke: "var(--background)",
1274
+ strokeWidth: 2,
1275
+ style: isExploded ? { filter: `drop-shadow(0 4px 8px color-mix(in srgb, ${((_b = chartConfig[name]) == null ? void 0 : _b.color) ?? "var(--chart-1)"} 40%, transparent))` } : void 0
1276
+ },
1277
+ `cell-${index}`
1278
+ );
1279
+ })
1280
+ }
1281
+ )
1282
+ ] }) });
1283
+ }
1284
+ function RadialBarMetricChart({
1285
+ data,
1286
+ dataKey = "value",
1287
+ nameKey = "name",
1288
+ colors,
1289
+ innerRadius = "30%",
1290
+ outerRadius = "100%",
1291
+ startAngle = 90,
1292
+ endAngle = -270,
1293
+ showBackground = true,
1294
+ showLegend = true,
1295
+ valueFormatter,
1296
+ isLoading,
1297
+ error,
1298
+ onRetry,
1299
+ retryLabel,
1300
+ emptyTitle,
1301
+ emptyDescription,
1302
+ errorTitle,
1303
+ errorDescription,
1304
+ loadingLabel,
1305
+ stateClassName,
1306
+ className
1307
+ }) {
1308
+ const names = React.useMemo(
1309
+ () => data.map((d) => String(d[nameKey] ?? "")),
1310
+ [data, nameKey]
1311
+ );
1312
+ const chartConfig = React.useMemo(
1313
+ () => buildChartConfig(names, colors),
1314
+ [names, colors]
1315
+ );
1316
+ const hasData = data.length > 0;
1317
+ const chartState = getChartState(
1318
+ { isLoading, error, emptyTitle, emptyDescription, errorTitle, errorDescription, loadingLabel, stateClassName, onRetry, retryLabel },
1319
+ hasData
1320
+ );
1321
+ const coloredData = React.useMemo(
1322
+ () => data.map((item, index) => {
1323
+ var _a;
1324
+ const name = String(item[nameKey] ?? "");
1325
+ return {
1326
+ ...item,
1327
+ fill: ((_a = chartConfig[name]) == null ? void 0 : _a.color) ?? `var(--chart-${index % 8 + 1})`
1328
+ };
1329
+ }),
1330
+ [data, nameKey, chartConfig]
1331
+ );
1332
+ return /* @__PURE__ */ jsxs("div", { className: cn("flex w-full flex-col gap-3", className), children: [
1333
+ /* @__PURE__ */ jsx(ChartContainer, { config: chartConfig, className: "h-[260px] w-full", children: chartState ?? /* @__PURE__ */ jsxs(
1334
+ RechartsPrimitive.RadialBarChart,
1335
+ {
1336
+ data: coloredData,
1337
+ innerRadius,
1338
+ outerRadius,
1339
+ startAngle,
1340
+ endAngle,
1341
+ accessibilityLayer: true,
1342
+ children: [
1343
+ /* @__PURE__ */ jsx(
1344
+ ChartTooltip,
1345
+ {
1346
+ cursor: false,
1347
+ content: /* @__PURE__ */ jsx(
1348
+ ChartTooltipContent,
1349
+ {
1350
+ nameKey,
1351
+ formatter: valueFormatter ? (v) => valueFormatter(v) : void 0
1352
+ }
1353
+ )
1354
+ }
1355
+ ),
1356
+ /* @__PURE__ */ jsx(
1357
+ RechartsPrimitive.RadialBar,
1358
+ {
1359
+ dataKey,
1360
+ background: showBackground ? { fill: "var(--muted)" } : false,
1361
+ cornerRadius: 6,
1362
+ isAnimationActive: true,
1363
+ animationDuration: 700,
1364
+ animationEasing: "ease-out"
1365
+ }
1366
+ )
1367
+ ]
1368
+ }
1369
+ ) }),
1370
+ showLegend && !chartState && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap justify-center gap-x-4 gap-y-1.5 px-2", children: coloredData.map((item, index) => {
1371
+ const d = item;
1372
+ const name = String(d[nameKey] ?? "");
1373
+ const fillColor = d.fill ?? `var(--chart-${index % 8 + 1})`;
1374
+ const val = d[dataKey];
1375
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
1376
+ /* @__PURE__ */ jsx(
1377
+ "span",
1378
+ {
1379
+ className: "inline-block h-2.5 w-2.5 shrink-0 rounded-full",
1380
+ style: { backgroundColor: fillColor }
1381
+ }
1382
+ ),
1383
+ /* @__PURE__ */ jsxs("span", { className: "text-xs text-muted-foreground", children: [
1384
+ name,
1385
+ val !== void 0 && val !== null && /* @__PURE__ */ jsx("span", { className: "ml-1 font-medium text-foreground", children: valueFormatter ? valueFormatter(val) : String(val) })
1386
+ ] })
1387
+ ] }, name);
1388
+ }) })
1389
+ ] });
1390
+ }
1391
+ function GaugeChart({
1392
+ value,
1393
+ min = 0,
1394
+ max = 100,
1395
+ thresholds,
1396
+ label,
1397
+ valueFormatter,
1398
+ showNeedle = true,
1399
+ className
1400
+ }) {
1401
+ const percent = Math.min(1, Math.max(0, (value - min) / (max - min)));
1402
+ const percentInt = Math.round(percent * 100);
1403
+ const activeColor = React.useMemo(() => {
1404
+ if (!thresholds || thresholds.length === 0) return "var(--chart-1)";
1405
+ for (const t of thresholds) {
1406
+ if (percentInt <= t.value) return t.color;
1407
+ }
1408
+ return thresholds[thresholds.length - 1].color;
1409
+ }, [thresholds, percentInt]);
1410
+ const displayText = valueFormatter ? valueFormatter(value, percentInt) : `${percentInt}%`;
1411
+ const cx = 100;
1412
+ const cy = 100;
1413
+ const R = 80;
1414
+ const r = 54;
1415
+ const polar = (angleDeg, radius) => {
1416
+ const rad = angleDeg * Math.PI / 180;
1417
+ return {
1418
+ x: cx + radius * Math.cos(rad),
1419
+ y: cy - radius * Math.sin(rad)
1420
+ };
1421
+ };
1422
+ const trackStart = polar(180, R);
1423
+ const trackEnd = polar(0, R);
1424
+ const trackStartI = polar(180, r);
1425
+ const trackEndI = polar(0, r);
1426
+ const trackPath = [
1427
+ `M ${trackStart.x} ${trackStart.y}`,
1428
+ `A ${R} ${R} 0 0 1 ${trackEnd.x} ${trackEnd.y}`,
1429
+ `L ${trackEndI.x} ${trackEndI.y}`,
1430
+ `A ${r} ${r} 0 0 0 ${trackStartI.x} ${trackStartI.y}`,
1431
+ "Z"
1432
+ ].join(" ");
1433
+ const valueAngle = 180 - percent * 180;
1434
+ const valueEnd = polar(valueAngle, R);
1435
+ const valueEndI = polar(valueAngle, r);
1436
+ const valuePath = percent <= 0 ? "" : percent >= 1 ? trackPath : [
1437
+ `M ${trackStart.x} ${trackStart.y}`,
1438
+ `A ${R} ${R} 0 0 1 ${valueEnd.x} ${valueEnd.y}`,
1439
+ `L ${valueEndI.x} ${valueEndI.y}`,
1440
+ `A ${r} ${r} 0 0 0 ${trackStartI.x} ${trackStartI.y}`,
1441
+ "Z"
1442
+ ].join(" ");
1443
+ const needleAngle = 180 - percent * 180;
1444
+ const needleTip = polar(needleAngle, r - 6);
1445
+ const needleBase1 = polar(needleAngle + 90, 5);
1446
+ const needleBase2 = polar(needleAngle - 90, 5);
1447
+ return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col items-center gap-2", className), children: [
1448
+ /* @__PURE__ */ jsx("div", { className: "relative w-full max-w-[260px]", children: /* @__PURE__ */ jsxs(
1449
+ "svg",
1450
+ {
1451
+ viewBox: "0 0 200 130",
1452
+ className: "w-full",
1453
+ "aria-label": `Gauge: ${displayText}`,
1454
+ children: [
1455
+ /* @__PURE__ */ jsx("path", { d: trackPath, fill: "var(--muted)" }),
1456
+ valuePath && /* @__PURE__ */ jsx("path", { d: valuePath, fill: activeColor }),
1457
+ showNeedle && /* @__PURE__ */ jsxs("g", { children: [
1458
+ /* @__PURE__ */ jsx(
1459
+ "polygon",
1460
+ {
1461
+ points: `${needleTip.x},${needleTip.y} ${needleBase1.x},${needleBase1.y} ${needleBase2.x},${needleBase2.y}`,
1462
+ fill: "var(--foreground)",
1463
+ opacity: 0.85
1464
+ }
1465
+ ),
1466
+ /* @__PURE__ */ jsx("circle", { cx, cy, r: 5, fill: "var(--foreground)" })
1467
+ ] }),
1468
+ /* @__PURE__ */ jsx(
1469
+ "text",
1470
+ {
1471
+ x: cx,
1472
+ y: cy + 18,
1473
+ textAnchor: "middle",
1474
+ dominantBaseline: "middle",
1475
+ fontSize: 22,
1476
+ fontWeight: 700,
1477
+ fill: "currentColor",
1478
+ className: "fill-foreground",
1479
+ children: displayText
1480
+ }
1481
+ ),
1482
+ label && /* @__PURE__ */ jsx(
1483
+ "text",
1484
+ {
1485
+ x: cx,
1486
+ y: cy + 36,
1487
+ textAnchor: "middle",
1488
+ dominantBaseline: "middle",
1489
+ fontSize: 10,
1490
+ fill: "currentColor",
1491
+ className: "fill-muted-foreground",
1492
+ children: label
1493
+ }
1494
+ )
1495
+ ]
1496
+ }
1497
+ ) }),
1498
+ thresholds && thresholds.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap justify-center gap-x-3 gap-y-1", children: thresholds.map((t, i) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
1499
+ /* @__PURE__ */ jsx(
1500
+ "span",
1501
+ {
1502
+ className: "inline-block h-2 w-2 shrink-0 rounded-full",
1503
+ style: { backgroundColor: t.color }
1504
+ }
1505
+ ),
1506
+ /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: t.label })
1507
+ ] }, i)) })
1508
+ ] });
1509
+ }
1510
+ function AspectRatio({
1511
+ ...props
1512
+ }) {
1513
+ return /* @__PURE__ */ jsx(AspectRatioPrimitive.Root, { "data-slot": "aspect-ratio", ...props });
1514
+ }
1515
+ const ResizableContext = React.createContext(null);
1516
+ const ResizablePanelGroup = ({
1517
+ children,
1518
+ className,
1519
+ direction = "horizontal",
1520
+ id,
1521
+ autoSaveId,
1522
+ storage,
1523
+ onLayout,
1524
+ ...props
1525
+ }) => {
1526
+ const [panels, setPanels] = React.useState(/* @__PURE__ */ new Map());
1527
+ const [handles, setHandles] = React.useState(/* @__PURE__ */ new Map());
1528
+ const [sizes, setSizes] = React.useState(/* @__PURE__ */ new Map());
1529
+ const [isDragging, setIsDragging] = React.useState(false);
1530
+ const containerRef = React.useRef(null);
1531
+ const getSortedItems = React.useCallback((items) => {
1532
+ if (!containerRef.current) return [];
1533
+ return Array.from(items.values()).sort((a, b) => {
1534
+ if (!a.ref.current || !b.ref.current) return 0;
1535
+ const position = a.ref.current.compareDocumentPosition(b.ref.current);
1536
+ if (position & Node.DOCUMENT_POSITION_FOLLOWING) return -1;
1537
+ if (position & Node.DOCUMENT_POSITION_PRECEDING) return 1;
1538
+ return 0;
1539
+ });
1540
+ }, []);
1541
+ React.useEffect(() => {
1542
+ const sortedPanels = getSortedItems(panels);
1543
+ if (sortedPanels.length === 0) return;
1544
+ const uninitialized = sortedPanels.some((p) => !sizes.has(p.id));
1545
+ if (uninitialized) {
1546
+ const newSizes = new Map(sizes);
1547
+ const remainingSpace = 100;
1548
+ const defaultSizeCount = sortedPanels.filter((p) => p.defaultSize).length;
1549
+ let usedSpace = 0;
1550
+ sortedPanels.forEach((p) => {
1551
+ if (p.defaultSize) usedSpace += p.defaultSize;
1552
+ });
1553
+ const spaceForOthers = Math.max(0, remainingSpace - usedSpace);
1554
+ const countOthers = sortedPanels.length - defaultSizeCount;
1555
+ const sizeForOthers = countOthers > 0 ? spaceForOthers / countOthers : 0;
1556
+ sortedPanels.forEach((p) => {
1557
+ if (!newSizes.has(p.id)) {
1558
+ newSizes.set(p.id, p.defaultSize ?? sizeForOthers);
1559
+ }
1560
+ });
1561
+ setSizes(newSizes);
1562
+ }
1563
+ }, [panels, sizes, getSortedItems]);
1564
+ const registerPanel = React.useCallback((data) => {
1565
+ setPanels((prev) => {
1566
+ const next = new Map(prev);
1567
+ next.set(data.id, data);
1568
+ return next;
1569
+ });
1570
+ }, []);
1571
+ const unregisterPanel = React.useCallback((id2) => {
1572
+ setPanels((prev) => {
1573
+ const next = new Map(prev);
1574
+ next.delete(id2);
1575
+ return next;
1576
+ });
1577
+ setSizes((prev) => {
1578
+ const next = new Map(prev);
1579
+ next.delete(id2);
1580
+ return next;
1581
+ });
1582
+ }, []);
1583
+ const registerHandle = React.useCallback((data) => {
1584
+ setHandles((prev) => {
1585
+ const next = new Map(prev);
1586
+ next.set(data.id, data);
1587
+ return next;
1588
+ });
1589
+ }, []);
1590
+ const unregisterHandle = React.useCallback((id2) => {
1591
+ setHandles((prev) => {
1592
+ const next = new Map(prev);
1593
+ next.delete(id2);
1594
+ return next;
1595
+ });
1596
+ }, []);
1597
+ const startDragging = React.useCallback((handleId, event) => {
1598
+ var _a, _b;
1599
+ event.preventDefault();
1600
+ setIsDragging(true);
1601
+ const sortedPanels = getSortedItems(panels);
1602
+ const sortedHandles = getSortedItems(handles);
1603
+ const handleIndex = sortedHandles.findIndex((h) => h.id === handleId);
1604
+ if (handleIndex === -1) return;
1605
+ const leftPanel = sortedPanels[handleIndex];
1606
+ const rightPanel = sortedPanels[handleIndex + 1];
1607
+ if (!leftPanel || !rightPanel) return;
1608
+ const startX = "touches" in event ? event.touches[0].clientX : event.clientX;
1609
+ const startY = "touches" in event ? event.touches[0].clientY : event.clientY;
1610
+ const startSizeLeft = sizes.get(leftPanel.id) || 0;
1611
+ const startSizeRight = sizes.get(rightPanel.id) || 0;
1612
+ const containerSize = direction === "horizontal" ? ((_a = containerRef.current) == null ? void 0 : _a.offsetWidth) || 1 : ((_b = containerRef.current) == null ? void 0 : _b.offsetHeight) || 1;
1613
+ const onMove = (e) => {
1614
+ var _a2, _b2;
1615
+ const currentX = "touches" in e ? e.touches[0].clientX : e.clientX;
1616
+ const currentY = "touches" in e ? e.touches[0].clientY : e.clientY;
1617
+ const deltaPixels = direction === "horizontal" ? currentX - startX : currentY - startY;
1618
+ const deltaPercent = deltaPixels / containerSize * 100;
1619
+ let finalLeft = startSizeLeft + deltaPercent;
1620
+ let finalRight = startSizeRight - deltaPercent;
1621
+ if (leftPanel.minSize !== void 0 && finalLeft < leftPanel.minSize) {
1622
+ const diff = leftPanel.minSize - finalLeft;
1623
+ finalLeft = leftPanel.minSize;
1624
+ finalRight -= diff;
1625
+ }
1626
+ if (rightPanel.minSize !== void 0 && finalRight < rightPanel.minSize) {
1627
+ const diff = rightPanel.minSize - finalRight;
1628
+ finalRight = rightPanel.minSize;
1629
+ finalLeft -= diff;
1630
+ }
1631
+ if (leftPanel.maxSize !== void 0 && finalLeft > leftPanel.maxSize) {
1632
+ const diff = finalLeft - leftPanel.maxSize;
1633
+ finalLeft = leftPanel.maxSize;
1634
+ finalRight += diff;
1635
+ }
1636
+ if (rightPanel.maxSize !== void 0 && finalRight > rightPanel.maxSize) {
1637
+ const diff = finalRight - rightPanel.maxSize;
1638
+ finalRight = rightPanel.maxSize;
1639
+ finalLeft -= diff;
1640
+ }
1641
+ finalLeft = Math.max(0, Math.min(100, finalLeft));
1642
+ finalRight = Math.max(0, Math.min(100, finalRight));
1643
+ setSizes((prev) => {
1644
+ const next = new Map(prev);
1645
+ next.set(leftPanel.id, finalLeft);
1646
+ next.set(rightPanel.id, finalRight);
1647
+ return next;
1648
+ });
1649
+ (_a2 = leftPanel.onResize) == null ? void 0 : _a2.call(leftPanel, finalLeft);
1650
+ (_b2 = rightPanel.onResize) == null ? void 0 : _b2.call(rightPanel, finalRight);
1651
+ };
1652
+ const onUp = () => {
1653
+ setIsDragging(false);
1654
+ window.removeEventListener("mousemove", onMove);
1655
+ window.removeEventListener("mouseup", onUp);
1656
+ window.removeEventListener("touchmove", onMove);
1657
+ window.removeEventListener("touchend", onUp);
1658
+ if (onLayout) {
1659
+ onLayout(sortedPanels.map((p) => sizes.get(p.id) || 0));
1660
+ }
1661
+ };
1662
+ window.addEventListener("mousemove", onMove);
1663
+ window.addEventListener("mouseup", onUp);
1664
+ window.addEventListener("touchmove", onMove);
1665
+ window.addEventListener("touchend", onUp);
1666
+ }, [panels, handles, sizes, direction, getSortedItems, onLayout]);
1667
+ const getPanelStyle = React.useCallback((id2) => {
1668
+ const size = sizes.get(id2);
1669
+ if (size === void 0) return { flex: "1 1 0%", overflow: "hidden" };
1670
+ return { flex: `${size} 1 0%`, overflow: "hidden" };
1671
+ }, [sizes]);
1672
+ const contextValue = React.useMemo(() => ({
1673
+ direction,
1674
+ registerPanel,
1675
+ unregisterPanel,
1676
+ registerHandle,
1677
+ unregisterHandle,
1678
+ isDragging,
1679
+ startDragging,
1680
+ getPanelStyle
1681
+ }), [direction, registerPanel, unregisterPanel, registerHandle, unregisterHandle, isDragging, startDragging, getPanelStyle]);
1682
+ return /* @__PURE__ */ jsx(ResizableContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(
1683
+ "div",
1684
+ {
1685
+ ref: containerRef,
1686
+ "data-slot": "resizable-panel-group",
1687
+ "data-panel-group-direction": direction,
1688
+ className: cn(
1689
+ "flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
1690
+ className
1691
+ ),
1692
+ ...props,
1693
+ children
1694
+ }
1695
+ ) });
1696
+ };
1697
+ const ResizablePanel = ({
1698
+ className,
1699
+ defaultSize,
1700
+ minSize = 0,
1701
+ maxSize = 100,
1702
+ collapsible,
1703
+ collapsedSize,
1704
+ onCollapse,
1705
+ onExpand,
1706
+ onResize,
1707
+ order,
1708
+ tagName,
1709
+ id: propId,
1710
+ children,
1711
+ ...props
1712
+ }) => {
1713
+ const context = React.useContext(ResizableContext);
1714
+ const ref = React.useRef(null);
1715
+ const [generatedId] = React.useState(() => Math.random().toString(36).substr(2, 9));
1716
+ const id = propId || generatedId;
1717
+ const registerPanel = context == null ? void 0 : context.registerPanel;
1718
+ const unregisterPanel = context == null ? void 0 : context.unregisterPanel;
1719
+ React.useLayoutEffect(() => {
1720
+ if (!registerPanel || !unregisterPanel) return;
1721
+ registerPanel({
1722
+ id,
1723
+ ref,
1724
+ defaultSize,
1725
+ minSize,
1726
+ maxSize,
1727
+ collapsible,
1728
+ onCollapse,
1729
+ onExpand,
1730
+ onResize
1731
+ });
1732
+ return () => unregisterPanel(id);
1733
+ }, [registerPanel, unregisterPanel, id, defaultSize, minSize, maxSize, collapsible, onCollapse, onExpand, onResize]);
1734
+ if (!context) {
1735
+ return /* @__PURE__ */ jsx("div", { className: cn("flex-1", className), ...props, children });
1736
+ }
1737
+ return /* @__PURE__ */ jsx(
1738
+ "div",
1739
+ {
1740
+ ref,
1741
+ "data-slot": "resizable-panel",
1742
+ className: cn("relative transition-[flex-grow] duration-0", className),
1743
+ style: context.getPanelStyle(id),
1744
+ ...props,
1745
+ children
1746
+ }
1747
+ );
1748
+ };
1749
+ const ResizableHandle = ({
1750
+ withHandle,
1751
+ className,
1752
+ id: propId,
1753
+ tagName,
1754
+ ...props
1755
+ }) => {
1756
+ const context = React.useContext(ResizableContext);
1757
+ const ref = React.useRef(null);
1758
+ const [generatedId] = React.useState(() => Math.random().toString(36).substr(2, 9));
1759
+ const id = propId || generatedId;
1760
+ const registerHandle = context == null ? void 0 : context.registerHandle;
1761
+ const unregisterHandle = context == null ? void 0 : context.unregisterHandle;
1762
+ React.useLayoutEffect(() => {
1763
+ if (!registerHandle || !unregisterHandle) return;
1764
+ registerHandle({ id, ref });
1765
+ return () => unregisterHandle(id);
1766
+ }, [registerHandle, unregisterHandle, id]);
1767
+ const handleMouseDown = (e) => {
1768
+ if (context) {
1769
+ context.startDragging(id, e);
1770
+ }
1771
+ };
1772
+ if (!context) return null;
1773
+ return /* @__PURE__ */ jsx(
1774
+ "div",
1775
+ {
1776
+ ref,
1777
+ "data-slot": "resizable-handle",
1778
+ className: cn(
1779
+ "bg-border relative flex items-center justify-center focus-visible:outline-hidden",
1780
+ "touch-none select-none",
1781
+ context.direction === "vertical" ? "h-px w-full cursor-row-resize after:left-0 after:h-1 after:w-full after:-translate-y-1/2 hover:after:h-4" : "w-px h-full cursor-col-resize after:top-0 after:w-1 after:h-full after:-translate-x-1/2 hover:after:w-4",
1782
+ "after:absolute after:z-10",
1783
+ className
1784
+ ),
1785
+ onMouseDown: handleMouseDown,
1786
+ onTouchStart: handleMouseDown,
1787
+ ...props,
1788
+ children: withHandle && /* @__PURE__ */ jsx("div", { className: "bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border", children: /* @__PURE__ */ jsx(GripVerticalIcon, { className: "size-2.5" }) })
1789
+ }
1790
+ );
1791
+ };
1792
+ function NavigationMenu({
1793
+ className,
1794
+ children,
1795
+ viewport = true,
1796
+ ...props
1797
+ }) {
1798
+ return /* @__PURE__ */ jsxs(
1799
+ NavigationMenuPrimitive.Root,
1800
+ {
1801
+ "data-slot": "navigation-menu",
1802
+ className: cn(
1803
+ "relative z-10 flex w-full flex-1 items-center justify-center",
1804
+ className
1805
+ ),
1806
+ ...props,
1807
+ children: [
1808
+ children,
1809
+ viewport && /* @__PURE__ */ jsx(NavigationMenuViewport, {})
1810
+ ]
1811
+ }
1812
+ );
1813
+ }
1814
+ function NavigationMenuList({
1815
+ className,
1816
+ ...props
1817
+ }) {
1818
+ return /* @__PURE__ */ jsx(
1819
+ NavigationMenuPrimitive.List,
1820
+ {
1821
+ "data-slot": "navigation-menu-list",
1822
+ className: cn(
1823
+ "group flex flex-1 list-none items-center justify-center gap-1",
1824
+ className
1825
+ ),
1826
+ ...props
1827
+ }
1828
+ );
1829
+ }
1830
+ function NavigationMenuItem({
1831
+ className,
1832
+ ...props
1833
+ }) {
1834
+ return /* @__PURE__ */ jsx(
1835
+ NavigationMenuPrimitive.Item,
1836
+ {
1837
+ "data-slot": "navigation-menu-item",
1838
+ className: cn("relative", className),
1839
+ ...props
1840
+ }
1841
+ );
1842
+ }
1843
+ const navigationMenuTriggerStyle = cva(
1844
+ "group inline-flex h-10 w-max items-center justify-center rounded-[var(--radius)] bg-background px-4 py-2 text-[var(--text-p)] font-[var(--font-weight-medium)] hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=open]:bg-accent/50 outline-none focus-visible:ring-2 focus-visible:ring-ring"
1845
+ );
1846
+ function NavigationMenuTrigger({
1847
+ className,
1848
+ children,
1849
+ ...props
1850
+ }) {
1851
+ return /* @__PURE__ */ jsxs(
1852
+ NavigationMenuPrimitive.Trigger,
1853
+ {
1854
+ "data-slot": "navigation-menu-trigger",
1855
+ className: cn(navigationMenuTriggerStyle(), "group", className),
1856
+ ...props,
1857
+ children: [
1858
+ children,
1859
+ " ",
1860
+ /* @__PURE__ */ jsx(
1861
+ ChevronDownIcon,
1862
+ {
1863
+ className: "relative top-[1px] ml-1 size-3 group-data-[state=open]:rotate-180",
1864
+ "aria-hidden": "true"
1865
+ }
1866
+ )
1867
+ ]
1868
+ }
1869
+ );
1870
+ }
1871
+ function NavigationMenuContent({
1872
+ className,
1873
+ ...props
1874
+ }) {
1875
+ return /* @__PURE__ */ jsx(
1876
+ NavigationMenuPrimitive.Content,
1877
+ {
1878
+ "data-slot": "navigation-menu-content",
1879
+ className: cn(
1880
+ "left-0 top-0 w-full md:w-auto",
1881
+ className
1882
+ ),
1883
+ ...props
1884
+ }
1885
+ );
1886
+ }
1887
+ function NavigationMenuViewport({
1888
+ className,
1889
+ ...props
1890
+ }) {
1891
+ return /* @__PURE__ */ jsx("div", { className: cn("absolute left-0 top-full flex justify-center w-full"), children: /* @__PURE__ */ jsx(
1892
+ NavigationMenuPrimitive.Viewport,
1893
+ {
1894
+ "data-slot": "navigation-menu-viewport",
1895
+ className: cn(
1896
+ "origin-top-center relative mt-1.5 overflow-hidden rounded-[var(--radius)] border border-border bg-popover text-popover-foreground shadow-lg",
1897
+ className
1898
+ ),
1899
+ ...props
1900
+ }
1901
+ ) });
1902
+ }
1903
+ function NavigationMenuLink({
1904
+ className,
1905
+ ...props
1906
+ }) {
1907
+ return /* @__PURE__ */ jsx(
1908
+ NavigationMenuPrimitive.Link,
1909
+ {
1910
+ "data-slot": "navigation-menu-link",
1911
+ className: cn(
1912
+ "block select-none space-y-1 rounded-[var(--radius)] p-3 leading-none no-underline outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",
1913
+ className
1914
+ ),
1915
+ ...props
1916
+ }
1917
+ );
1918
+ }
1919
+ function NavigationMenuIndicator({
1920
+ className,
1921
+ ...props
1922
+ }) {
1923
+ return /* @__PURE__ */ jsx(
1924
+ NavigationMenuPrimitive.Indicator,
1925
+ {
1926
+ "data-slot": "navigation-menu-indicator",
1927
+ className: cn(
1928
+ "top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden",
1929
+ className
1930
+ ),
1931
+ ...props,
1932
+ children: /* @__PURE__ */ jsx("div", { className: "bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md" })
1933
+ }
1934
+ );
1935
+ }
1936
+ function Pagination({ className, ...props }) {
1937
+ return /* @__PURE__ */ jsx(
1938
+ "nav",
1939
+ {
1940
+ role: "navigation",
1941
+ "aria-label": "pagination",
1942
+ "data-slot": "pagination",
1943
+ className: cn("mx-auto flex w-full justify-center", className),
1944
+ ...props
1945
+ }
1946
+ );
1947
+ }
1948
+ function PaginationContent({
1949
+ className,
1950
+ ...props
1951
+ }) {
1952
+ return /* @__PURE__ */ jsx(
1953
+ "ul",
1954
+ {
1955
+ "data-slot": "pagination-content",
1956
+ className: cn("flex flex-row items-center gap-1", className),
1957
+ ...props
1958
+ }
1959
+ );
1960
+ }
1961
+ function PaginationItem({ ...props }) {
1962
+ return /* @__PURE__ */ jsx("li", { "data-slot": "pagination-item", ...props });
1963
+ }
1964
+ function PaginationLink({
1965
+ className,
1966
+ isActive,
1967
+ disabled,
1968
+ size = "icon",
1969
+ href,
1970
+ onClick,
1971
+ ...props
1972
+ }) {
1973
+ return /* @__PURE__ */ jsx(
1974
+ "a",
1975
+ {
1976
+ "aria-current": isActive ? "page" : void 0,
1977
+ "aria-disabled": disabled ? "true" : void 0,
1978
+ tabIndex: disabled ? -1 : void 0,
1979
+ "data-slot": "pagination-link",
1980
+ "data-active": isActive,
1981
+ href: disabled ? void 0 : href ?? "#",
1982
+ onClick: disabled ? (e) => e.preventDefault() : onClick,
1983
+ className: cn(
1984
+ buttonVariants({
1985
+ variant: isActive ? "outline" : "ghost",
1986
+ size
1987
+ }),
1988
+ disabled && "pointer-events-none opacity-50",
1989
+ className
1990
+ ),
1991
+ ...props
1992
+ }
1993
+ );
1994
+ }
1995
+ function PaginationPrevious({
1996
+ className,
1997
+ disabled,
1998
+ ...props
1999
+ }) {
2000
+ return /* @__PURE__ */ jsxs(
2001
+ PaginationLink,
2002
+ {
2003
+ "aria-label": "Go to previous page",
2004
+ size: "default",
2005
+ disabled,
2006
+ className: cn("gap-1 px-2.5 sm:pl-2.5", className),
2007
+ ...props,
2008
+ children: [
2009
+ /* @__PURE__ */ jsx(ChevronLeftIcon, {}),
2010
+ /* @__PURE__ */ jsx("span", { className: "hidden sm:block", children: "Previous" })
2011
+ ]
2012
+ }
2013
+ );
2014
+ }
2015
+ function PaginationNext({
2016
+ className,
2017
+ disabled,
2018
+ ...props
2019
+ }) {
2020
+ return /* @__PURE__ */ jsxs(
2021
+ PaginationLink,
2022
+ {
2023
+ "aria-label": "Go to next page",
2024
+ size: "default",
2025
+ disabled,
2026
+ className: cn("gap-1 px-2.5 sm:pr-2.5", className),
2027
+ ...props,
2028
+ children: [
2029
+ /* @__PURE__ */ jsx("span", { className: "hidden sm:block", children: "Next" }),
2030
+ /* @__PURE__ */ jsx(ChevronRightIcon, {})
2031
+ ]
2032
+ }
2033
+ );
2034
+ }
2035
+ function PaginationEllipsis({
2036
+ className,
2037
+ ...props
2038
+ }) {
2039
+ return /* @__PURE__ */ jsxs(
2040
+ "span",
2041
+ {
2042
+ "aria-hidden": true,
2043
+ "data-slot": "pagination-ellipsis",
2044
+ className: cn("flex size-9 items-center justify-center", className),
2045
+ ...props,
2046
+ children: [
2047
+ /* @__PURE__ */ jsx(MoreHorizontalIcon, { className: "size-4" }),
2048
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "More pages" })
2049
+ ]
2050
+ }
2051
+ );
2052
+ }
2053
+ const toggleVariants = cva(
2054
+ "inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",
2055
+ {
2056
+ variants: {
2057
+ variant: {
2058
+ default: "bg-transparent",
2059
+ outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"
2060
+ },
2061
+ size: {
2062
+ default: "h-9 px-2 min-w-9",
2063
+ sm: "h-8 px-1.5 min-w-8",
2064
+ lg: "h-10 px-2.5 min-w-10"
2065
+ }
2066
+ },
2067
+ defaultVariants: {
2068
+ variant: "default",
2069
+ size: "default"
2070
+ }
2071
+ }
2072
+ );
2073
+ const Toggle = React.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsx(
2074
+ TogglePrimitive.Root,
2075
+ {
2076
+ ref,
2077
+ "data-slot": "toggle",
2078
+ className: cn(toggleVariants({ variant, size, className })),
2079
+ ...props
2080
+ }
2081
+ ));
2082
+ Toggle.displayName = TogglePrimitive.Root.displayName;
2083
+ const ToggleGroupContext = React.createContext({
2084
+ size: "default",
2085
+ variant: "default"
2086
+ });
2087
+ const ToggleGroup = React.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsx(
2088
+ ToggleGroupPrimitive.Root,
2089
+ {
2090
+ ref,
2091
+ "data-slot": "toggle-group",
2092
+ "data-variant": variant,
2093
+ "data-size": size,
2094
+ className: cn(
2095
+ "group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",
2096
+ className
2097
+ ),
2098
+ ...props,
2099
+ children: /* @__PURE__ */ jsx(ToggleGroupContext.Provider, { value: { variant, size }, children })
2100
+ }
2101
+ ));
2102
+ ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
2103
+ const ToggleGroupItem = React.forwardRef(({ className, children, variant, size, ...props }, ref) => {
2104
+ const context = React.useContext(ToggleGroupContext);
2105
+ return /* @__PURE__ */ jsx(
2106
+ ToggleGroupPrimitive.Item,
2107
+ {
2108
+ ref,
2109
+ "data-slot": "toggle-group-item",
2110
+ "data-variant": context.variant || variant,
2111
+ "data-size": context.size || size,
2112
+ className: cn(
2113
+ toggleVariants({
2114
+ variant: context.variant || variant,
2115
+ size: context.size || size
2116
+ }),
2117
+ "min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",
2118
+ className
2119
+ ),
2120
+ ...props,
2121
+ children
2122
+ }
2123
+ );
2124
+ });
2125
+ ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
2126
+ function InputOTP({
2127
+ className,
2128
+ containerClassName,
2129
+ ...props
2130
+ }) {
2131
+ return /* @__PURE__ */ jsx(
2132
+ OTPInput,
2133
+ {
2134
+ "data-slot": "input-otp",
2135
+ containerClassName: cn(
2136
+ "flex items-center gap-2 has-disabled:opacity-50",
2137
+ containerClassName
2138
+ ),
2139
+ className: cn("disabled:cursor-not-allowed", className),
2140
+ ...props
2141
+ }
2142
+ );
2143
+ }
2144
+ function InputOTPGroup({ className, ...props }) {
2145
+ return /* @__PURE__ */ jsx(
2146
+ "div",
2147
+ {
2148
+ "data-slot": "input-otp-group",
2149
+ className: cn("flex items-center gap-1", className),
2150
+ ...props
2151
+ }
2152
+ );
2153
+ }
2154
+ function InputOTPSlot({
2155
+ index,
2156
+ className,
2157
+ size = "md",
2158
+ ...props
2159
+ }) {
2160
+ const inputOTPContext = React.useContext(OTPInputContext);
2161
+ const { char, hasFakeCaret, isActive } = (inputOTPContext == null ? void 0 : inputOTPContext.slots[index]) ?? {};
2162
+ const sizeClasses = {
2163
+ sm: "h-8 w-8 text-sm",
2164
+ md: "h-10 w-10 text-base",
2165
+ lg: "h-12 w-12 text-lg"
2166
+ };
2167
+ return /* @__PURE__ */ jsxs(
2168
+ "div",
2169
+ {
2170
+ "data-slot": "input-otp-slot",
2171
+ "data-active": isActive,
2172
+ className: cn(
2173
+ "data-[active=true]:border-primary data-[active=true]:ring-primary/20 data-[active=true]:aria-invalid:ring-destructive/20 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive relative flex items-center justify-center border border-border rounded-[var(--radius)] bg-background transition-all outline-none data-[active=true]:z-10 data-[active=true]:ring-2",
2174
+ sizeClasses[size],
2175
+ className
2176
+ ),
2177
+ ...props,
2178
+ children: [
2179
+ char,
2180
+ hasFakeCaret && /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx("div", { className: "animate-caret-blink bg-foreground h-4 w-px duration-1000" }) })
2181
+ ]
2182
+ }
2183
+ );
2184
+ }
2185
+ function InputOTPSeparator({ ...props }) {
2186
+ return /* @__PURE__ */ jsx("div", { "data-slot": "input-otp-separator", role: "separator", ...props, children: /* @__PURE__ */ jsx(MinusIcon, {}) });
2187
+ }
2188
+ const Form = FormProvider;
2189
+ const FormFieldContext = React.createContext(
2190
+ {}
2191
+ );
2192
+ const FormField = ({
2193
+ ...props
2194
+ }) => {
2195
+ return /* @__PURE__ */ jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx(Controller, { ...props }) });
2196
+ };
2197
+ const useFormField = () => {
2198
+ const fieldContext = React.useContext(FormFieldContext);
2199
+ const itemContext = React.useContext(FormItemContext);
2200
+ const { getFieldState } = useFormContext();
2201
+ const formState = useFormState({ name: fieldContext.name });
2202
+ const fieldState = getFieldState(
2203
+ fieldContext.name,
2204
+ formState
2205
+ );
2206
+ if (!fieldContext) {
2207
+ throw new Error(
2208
+ "useFormField should be used within <FormField>"
2209
+ );
2210
+ }
2211
+ const { id } = itemContext;
2212
+ return {
2213
+ id,
2214
+ name: fieldContext.name,
2215
+ formItemId: `${id}-form-item`,
2216
+ formDescriptionId: `${id}-form-item-description`,
2217
+ formMessageId: `${id}-form-item-message`,
2218
+ ...fieldState
2219
+ };
2220
+ };
2221
+ const FormItemContext = React.createContext(
2222
+ {}
2223
+ );
2224
+ function FormItem({
2225
+ className,
2226
+ ...props
2227
+ }) {
2228
+ const id = React.useId();
2229
+ return /* @__PURE__ */ jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx(
2230
+ "div",
2231
+ {
2232
+ "data-slot": "form-item",
2233
+ className: cn("grid gap-2", className),
2234
+ ...props
2235
+ }
2236
+ ) });
2237
+ }
2238
+ function FormLabel({
2239
+ className,
2240
+ ...props
2241
+ }) {
2242
+ const { error, formItemId } = useFormField();
2243
+ return /* @__PURE__ */ jsx(
2244
+ Label,
2245
+ {
2246
+ "data-slot": "form-label",
2247
+ "data-error": !!error,
2248
+ className: cn(
2249
+ "data-[error=true]:text-destructive",
2250
+ className
2251
+ ),
2252
+ htmlFor: formItemId,
2253
+ ...props
2254
+ }
2255
+ );
2256
+ }
2257
+ function FormControl({
2258
+ ...props
2259
+ }) {
2260
+ const {
2261
+ error,
2262
+ formItemId,
2263
+ formDescriptionId,
2264
+ formMessageId
2265
+ } = useFormField();
2266
+ return /* @__PURE__ */ jsx(
2267
+ Slot,
2268
+ {
2269
+ "data-slot": "form-control",
2270
+ id: formItemId,
2271
+ "aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
2272
+ "aria-invalid": !!error,
2273
+ ...props
2274
+ }
2275
+ );
2276
+ }
2277
+ function FormDescription({
2278
+ className,
2279
+ ...props
2280
+ }) {
2281
+ const { formDescriptionId } = useFormField();
2282
+ return /* @__PURE__ */ jsx(
2283
+ "p",
2284
+ {
2285
+ "data-slot": "form-description",
2286
+ id: formDescriptionId,
2287
+ className: cn("text-muted-foreground text-sm", className),
2288
+ ...props
2289
+ }
2290
+ );
2291
+ }
2292
+ function FormMessage({
2293
+ className,
2294
+ ...props
2295
+ }) {
2296
+ const { error, formMessageId } = useFormField();
2297
+ const body = error ? String((error == null ? void 0 : error.message) ?? "") : props.children;
2298
+ if (!body) {
2299
+ return null;
2300
+ }
2301
+ return /* @__PURE__ */ jsx(
2302
+ "p",
2303
+ {
2304
+ "data-slot": "form-message",
2305
+ id: formMessageId,
2306
+ className: cn("text-destructive text-sm", className),
2307
+ ...props,
2308
+ children: body
2309
+ }
2310
+ );
2311
+ }
2312
+ function Calendar({
2313
+ className,
2314
+ classNames,
2315
+ showOutsideDays = true,
2316
+ captionLayout = "label",
2317
+ buttonVariant = "ghost",
2318
+ formatters,
2319
+ components,
2320
+ ...props
2321
+ }) {
2322
+ const defaultClassNames = getDefaultClassNames();
2323
+ const isDropdownCaption = captionLayout.startsWith("dropdown");
2324
+ return /* @__PURE__ */ jsx(
2325
+ DayPicker,
2326
+ {
2327
+ showOutsideDays,
2328
+ className: cn(
2329
+ "bg-background group/calendar p-4 [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent font-sans",
2330
+ String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
2331
+ String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
2332
+ className
2333
+ ),
2334
+ captionLayout,
2335
+ formatters,
2336
+ classNames: {
2337
+ root: cn("w-fit", defaultClassNames.root),
2338
+ months: cn(
2339
+ "flex gap-6 flex-col md:flex-row relative",
2340
+ defaultClassNames.months
2341
+ ),
2342
+ month: cn("flex flex-col w-full gap-5", defaultClassNames.month),
2343
+ nav: cn(
2344
+ "flex items-center gap-2 w-full absolute top-0 inset-x-0 justify-between",
2345
+ defaultClassNames.nav
2346
+ ),
2347
+ button_previous: cn(
2348
+ buttonVariants({ variant: buttonVariant }),
2349
+ "size-(--cell-size) aria-disabled:opacity-40 p-0 select-none hover:bg-accent/50 transition-colors duration-200",
2350
+ defaultClassNames.button_previous
2351
+ ),
2352
+ button_next: cn(
2353
+ buttonVariants({ variant: buttonVariant }),
2354
+ "size-(--cell-size) aria-disabled:opacity-40 p-0 select-none hover:bg-accent/50 transition-colors duration-200",
2355
+ defaultClassNames.button_next
2356
+ ),
2357
+ month_caption: cn(
2358
+ "flex items-center justify-center w-full",
2359
+ isDropdownCaption ? "h-auto px-0" : "h-(--cell-size) px-(--cell-size)",
2360
+ defaultClassNames.month_caption
2361
+ ),
2362
+ dropdowns: cn(
2363
+ "w-full flex items-center justify-center gap-2",
2364
+ isDropdownCaption ? "h-auto" : "h-(--cell-size)",
2365
+ defaultClassNames.dropdowns
2366
+ ),
2367
+ dropdown_root: cn(
2368
+ isDropdownCaption ? "relative flex min-w-[7rem] items-center rounded-[var(--radius)] border border-border bg-background text-foreground transition-colors outline-none focus-within:ring-2 focus-within:ring-primary focus-within:border-transparent data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50 px-2.5 py-1" : "relative rounded-[var(--radius)] hover:bg-accent transition-colors",
2369
+ defaultClassNames.dropdown_root
2370
+ ),
2371
+ dropdown: cn(
2372
+ isDropdownCaption ? "absolute inset-0 cursor-pointer opacity-0" : "absolute bg-popover inset-0 opacity-0 cursor-pointer",
2373
+ defaultClassNames.dropdown
2374
+ ),
2375
+ caption_label: cn(
2376
+ "select-none font-[family-name:var(--font-family,Roboto)] tracking-tight transition-all duration-200",
2377
+ captionLayout === "label" ? "rounded-[var(--radius)] px-2 py-1 text-[length:var(--calendar-caption-size)] font-[number:var(--font-weight-semibold)] hover:bg-accent hover:text-accent-foreground" : "flex h-full w-full items-center justify-between gap-2 rounded-[var(--radius)] text-[length:var(--calendar-caption-size)] font-[number:var(--font-weight-semibold)] [&>svg]:text-muted-foreground [&>svg]:size-4",
2378
+ defaultClassNames.caption_label
2379
+ ),
2380
+ table: "w-full border-collapse mt-1",
2381
+ weekdays: cn("flex gap-1", defaultClassNames.weekdays),
2382
+ weekday: cn(
2383
+ "text-muted-foreground rounded-(--cell-radius) flex-1 select-none text-[length:var(--calendar-weekday-size)] font-[number:var(--font-weight-medium)] uppercase tracking-wider",
2384
+ defaultClassNames.weekday
2385
+ ),
2386
+ week: cn("flex w-full gap-1", defaultClassNames.week),
2387
+ week_number_header: cn(
2388
+ "select-none w-(--cell-size)",
2389
+ defaultClassNames.week_number_header
2390
+ ),
2391
+ week_number: cn(
2392
+ "select-none text-muted-foreground text-[length:var(--calendar-weekday-size)]",
2393
+ defaultClassNames.week_number
2394
+ ),
2395
+ day: cn(
2396
+ "relative w-full rounded-(--cell-radius) h-full p-0 text-center [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius) group/day aspect-square select-none",
2397
+ props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)" : "[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)",
2398
+ defaultClassNames.day
2399
+ ),
2400
+ range_start: cn(
2401
+ "rounded-l-(--cell-radius) bg-accent/50 relative after:bg-accent/50 after:absolute after:inset-y-0 after:w-2 after:right-0 -z-0 isolate",
2402
+ defaultClassNames.range_start
2403
+ ),
2404
+ range_middle: cn(
2405
+ "rounded-none bg-accent/30",
2406
+ defaultClassNames.range_middle
2407
+ ),
2408
+ range_end: cn(
2409
+ "rounded-r-(--cell-radius) bg-accent/50 relative after:bg-accent/50 after:absolute after:inset-y-0 after:w-2 after:left-0 -z-0 isolate",
2410
+ defaultClassNames.range_end
2411
+ ),
2412
+ today: cn(
2413
+ "bg-accent/60 text-accent-foreground rounded-(--cell-radius) data-[selected=true]:rounded-none font-[number:var(--font-weight-semibold)]",
2414
+ defaultClassNames.today
2415
+ ),
2416
+ outside: cn(
2417
+ "text-muted-foreground aria-selected:text-muted-foreground",
2418
+ defaultClassNames.outside
2419
+ ),
2420
+ disabled: cn(
2421
+ "text-muted-foreground/30 opacity-40",
2422
+ defaultClassNames.disabled
2423
+ ),
2424
+ hidden: cn("invisible", defaultClassNames.hidden),
2425
+ ...classNames
2426
+ },
2427
+ components: {
2428
+ Root: ({ className: className2, rootRef, ...props2 }) => {
2429
+ return /* @__PURE__ */ jsx(
2430
+ "div",
2431
+ {
2432
+ "data-slot": "calendar",
2433
+ ref: rootRef,
2434
+ className: cn(className2),
2435
+ ...props2
2436
+ }
2437
+ );
2438
+ },
2439
+ Chevron: ({ className: className2, orientation, ...props2 }) => {
2440
+ if (orientation === "left") {
2441
+ return /* @__PURE__ */ jsx(
2442
+ ChevronLeft,
2443
+ {
2444
+ className: cn("size-5 transition-transform group-hover:scale-110", className2),
2445
+ ...props2
2446
+ }
2447
+ );
2448
+ }
2449
+ if (orientation === "right") {
2450
+ return /* @__PURE__ */ jsx(
2451
+ ChevronRight,
2452
+ {
2453
+ className: cn("size-5 transition-transform group-hover:scale-110", className2),
2454
+ ...props2
2455
+ }
2456
+ );
2457
+ }
2458
+ return /* @__PURE__ */ jsx(
2459
+ ChevronDown,
2460
+ {
2461
+ className: cn("size-4", className2),
2462
+ ...props2
2463
+ }
2464
+ );
2465
+ },
2466
+ DayButton: CalendarDayButton,
2467
+ WeekNumber: ({ children, ...props2 }) => {
2468
+ return /* @__PURE__ */ jsx("td", { ...props2, children: /* @__PURE__ */ jsx("div", { className: "flex size-(--cell-size) items-center justify-center text-center font-[number:var(--font-weight-medium)]", children }) });
2469
+ },
2470
+ ...components
2471
+ },
2472
+ ...props
2473
+ }
2474
+ );
2475
+ }
2476
+ function CalendarDayButton({
2477
+ className,
2478
+ day,
2479
+ modifiers,
2480
+ ...props
2481
+ }) {
2482
+ const defaultClassNames = getDefaultClassNames();
2483
+ const ref = React.useRef(null);
2484
+ React.useEffect(() => {
2485
+ var _a;
2486
+ if (modifiers.focused) (_a = ref.current) == null ? void 0 : _a.focus();
2487
+ }, [modifiers.focused]);
2488
+ return /* @__PURE__ */ jsx(
2489
+ Button,
2490
+ {
2491
+ ref,
2492
+ variant: "ghost",
2493
+ size: "icon",
2494
+ "data-day": day.date.toLocaleDateString(),
2495
+ "data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
2496
+ "data-range-start": modifiers.range_start,
2497
+ "data-range-end": modifiers.range_end,
2498
+ "data-range-middle": modifiers.range_middle,
2499
+ className: cn(
2500
+ "relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col items-center justify-center gap-1 border-0 leading-none transition-all duration-200 cursor-pointer disabled:cursor-not-allowed",
2501
+ "text-[length:var(--calendar-day-size)] font-[number:var(--font-weight-regular)]",
2502
+ "hover:bg-accent/70 hover:text-accent-foreground hover:scale-105",
2503
+ "data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[selected-single=true]:font-[number:var(--font-weight-semibold)] data-[selected-single=true]:shadow-sm",
2504
+ "data-[range-middle=true]:bg-accent/50 data-[range-middle=true]:text-foreground",
2505
+ "data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-start=true]:font-[number:var(--font-weight-semibold)] data-[range-start=true]:shadow-sm",
2506
+ "data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-end=true]:font-[number:var(--font-weight-semibold)] data-[range-end=true]:shadow-sm",
2507
+ "group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 group-data-[focused=true]/day:ring-2 group-data-[focused=true]/day:ring-offset-2 group-data-[focused=true]/day:ring-offset-background",
2508
+ "data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-r-(--cell-radius)",
2509
+ "data-[range-middle=true]:rounded-none",
2510
+ "data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-l-(--cell-radius)",
2511
+ "[&>span]:opacity-80",
2512
+ defaultClassNames.day,
2513
+ className
2514
+ ),
2515
+ ...props,
2516
+ children: day.date.getDate()
2517
+ }
2518
+ );
2519
+ }
2520
+ function Sheet({ ...props }) {
2521
+ return /* @__PURE__ */ jsx(DialogPrimitive.Root, { "data-slot": "sheet", ...props });
2522
+ }
2523
+ function SheetTrigger({
2524
+ ...props
2525
+ }) {
2526
+ return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
2527
+ }
2528
+ function SheetClose({
2529
+ ...props
2530
+ }) {
2531
+ return /* @__PURE__ */ jsx(DialogPrimitive.Close, { "data-slot": "sheet-close", ...props });
2532
+ }
2533
+ function SheetPortal({
2534
+ ...props
2535
+ }) {
2536
+ return /* @__PURE__ */ jsx(DialogPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
2537
+ }
2538
+ const SheetOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2539
+ DialogPrimitive.Overlay,
2540
+ {
2541
+ className: cn(
2542
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
2543
+ className
2544
+ ),
2545
+ ...props,
2546
+ ref
2547
+ }
2548
+ ));
2549
+ SheetOverlay.displayName = DialogPrimitive.Overlay.displayName;
2550
+ function SheetContent({
2551
+ className,
2552
+ children,
2553
+ side = "right",
2554
+ ...props
2555
+ }) {
2556
+ return /* @__PURE__ */ jsxs(SheetPortal, { children: [
2557
+ /* @__PURE__ */ jsx(SheetOverlay, {}),
2558
+ /* @__PURE__ */ jsxs(
2559
+ DialogPrimitive.Content,
2560
+ {
2561
+ "data-slot": "sheet-content",
2562
+ className: cn(
2563
+ "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
2564
+ side === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
2565
+ side === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
2566
+ side === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
2567
+ side === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
2568
+ className
2569
+ ),
2570
+ ...props,
2571
+ children: [
2572
+ children,
2573
+ /* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
2574
+ /* @__PURE__ */ jsx(XIcon, { className: "size-4" }),
2575
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
2576
+ ] })
2577
+ ]
2578
+ }
2579
+ )
2580
+ ] });
2581
+ }
2582
+ function SheetHeader({ className, ...props }) {
2583
+ return /* @__PURE__ */ jsx(
2584
+ "div",
2585
+ {
2586
+ "data-slot": "sheet-header",
2587
+ className: cn("flex flex-col gap-1.5 px-6 pt-6", className),
2588
+ ...props
2589
+ }
2590
+ );
2591
+ }
2592
+ function SheetBody({ className, ...props }) {
2593
+ return /* @__PURE__ */ jsx(
2594
+ "div",
2595
+ {
2596
+ "data-slot": "sheet-body",
2597
+ className: cn("flex-1 overflow-auto px-6", className),
2598
+ ...props
2599
+ }
2600
+ );
2601
+ }
2602
+ function SheetFooter({ className, ...props }) {
2603
+ return /* @__PURE__ */ jsx(
2604
+ "div",
2605
+ {
2606
+ "data-slot": "sheet-footer",
2607
+ className: cn("mt-auto flex flex-col gap-2 px-6 pb-6", className),
2608
+ ...props
2609
+ }
2610
+ );
2611
+ }
2612
+ function SheetTitle({
2613
+ className,
2614
+ ...props
2615
+ }) {
2616
+ return /* @__PURE__ */ jsx(
2617
+ DialogPrimitive.Title,
2618
+ {
2619
+ "data-slot": "sheet-title",
2620
+ className: cn("text-foreground font-semibold", className),
2621
+ ...props
2622
+ }
2623
+ );
2624
+ }
2625
+ function SheetDescription({
2626
+ className,
2627
+ ...props
2628
+ }) {
2629
+ return /* @__PURE__ */ jsx(
2630
+ DialogPrimitive.Description,
2631
+ {
2632
+ "data-slot": "sheet-description",
2633
+ className: cn("text-muted-foreground text-sm", className),
2634
+ ...props
2635
+ }
2636
+ );
2637
+ }
2638
+ function Drawer({
2639
+ ...props
2640
+ }) {
2641
+ return /* @__PURE__ */ jsx(Drawer$1.Root, { "data-slot": "drawer", ...props });
2642
+ }
2643
+ function DrawerTrigger({
2644
+ ...props
2645
+ }) {
2646
+ return /* @__PURE__ */ jsx(Drawer$1.Trigger, { "data-slot": "drawer-trigger", ...props });
2647
+ }
2648
+ function DrawerPortal({
2649
+ ...props
2650
+ }) {
2651
+ return /* @__PURE__ */ jsx(Drawer$1.Portal, { "data-slot": "drawer-portal", ...props });
2652
+ }
2653
+ function DrawerClose({
2654
+ ...props
2655
+ }) {
2656
+ return /* @__PURE__ */ jsx(Drawer$1.Close, { "data-slot": "drawer-close", ...props });
2657
+ }
2658
+ const DrawerOverlay = React.forwardRef(({ className, ...props }, ref) => {
2659
+ return /* @__PURE__ */ jsx(
2660
+ Drawer$1.Overlay,
2661
+ {
2662
+ ref,
2663
+ "data-slot": "drawer-overlay",
2664
+ className: cn(
2665
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
2666
+ className
2667
+ ),
2668
+ ...props
2669
+ }
2670
+ );
2671
+ });
2672
+ DrawerOverlay.displayName = Drawer$1.Overlay.displayName;
2673
+ function DrawerContent({
2674
+ className,
2675
+ children,
2676
+ ...props
2677
+ }) {
2678
+ return /* @__PURE__ */ jsxs(DrawerPortal, { "data-slot": "drawer-portal", children: [
2679
+ /* @__PURE__ */ jsx(DrawerOverlay, {}),
2680
+ /* @__PURE__ */ jsxs(
2681
+ Drawer$1.Content,
2682
+ {
2683
+ "data-slot": "drawer-content",
2684
+ className: cn(
2685
+ "group/drawer-content bg-background fixed z-50 flex h-auto flex-col",
2686
+ "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b",
2687
+ "data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t",
2688
+ "data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm",
2689
+ "data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",
2690
+ className
2691
+ ),
2692
+ ...props,
2693
+ children: [
2694
+ /* @__PURE__ */ jsx("div", { className: "bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }),
2695
+ children
2696
+ ]
2697
+ }
2698
+ )
2699
+ ] });
2700
+ }
2701
+ function DrawerHeader({ className, ...props }) {
2702
+ return /* @__PURE__ */ jsx(
2703
+ "div",
2704
+ {
2705
+ "data-slot": "drawer-header",
2706
+ className: cn("flex flex-col gap-1.5 p-4", className),
2707
+ ...props
2708
+ }
2709
+ );
2710
+ }
2711
+ function DrawerFooter({ className, ...props }) {
2712
+ return /* @__PURE__ */ jsx(
2713
+ "div",
2714
+ {
2715
+ "data-slot": "drawer-footer",
2716
+ className: cn("mt-auto flex flex-col gap-2 p-4", className),
2717
+ ...props
2718
+ }
2719
+ );
2720
+ }
2721
+ function DrawerTitle({
2722
+ className,
2723
+ ...props
2724
+ }) {
2725
+ return /* @__PURE__ */ jsx(
2726
+ Drawer$1.Title,
2727
+ {
2728
+ "data-slot": "drawer-title",
2729
+ className: cn("text-foreground font-semibold", className),
2730
+ ...props
2731
+ }
2732
+ );
2733
+ }
2734
+ function DrawerDescription({
2735
+ className,
2736
+ ...props
2737
+ }) {
2738
+ return /* @__PURE__ */ jsx(
2739
+ Drawer$1.Description,
2740
+ {
2741
+ "data-slot": "drawer-description",
2742
+ className: cn("text-muted-foreground text-sm", className),
2743
+ ...props
2744
+ }
2745
+ );
2746
+ }
2747
+ function DrawerHandle({ className, ...props }) {
2748
+ return /* @__PURE__ */ jsx(
2749
+ "div",
2750
+ {
2751
+ "data-slot": "drawer-handle",
2752
+ className: cn("bg-muted mx-auto mt-4 h-2 w-[100px] shrink-0 rounded-full", className),
2753
+ ...props
2754
+ }
2755
+ );
2756
+ }
2757
+ function HoverCard({
2758
+ ...props
2759
+ }) {
2760
+ return /* @__PURE__ */ jsx(HoverCardPrimitive.Root, { "data-slot": "hover-card", ...props });
2761
+ }
2762
+ function HoverCardTrigger({
2763
+ ...props
2764
+ }) {
2765
+ return /* @__PURE__ */ jsx(HoverCardPrimitive.Trigger, { "data-slot": "hover-card-trigger", ...props });
2766
+ }
2767
+ function HoverCardContent({
2768
+ className,
2769
+ align = "center",
2770
+ sideOffset = 4,
2771
+ ...props
2772
+ }) {
2773
+ return /* @__PURE__ */ jsx(HoverCardPrimitive.Portal, { "data-slot": "hover-card-portal", children: /* @__PURE__ */ jsx(
2774
+ HoverCardPrimitive.Content,
2775
+ {
2776
+ "data-slot": "hover-card-content",
2777
+ align,
2778
+ sideOffset,
2779
+ className: cn(
2780
+ "bg-popover text-popover-foreground 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 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
2781
+ className
2782
+ ),
2783
+ ...props
2784
+ }
2785
+ ) });
2786
+ }
2787
+ function ContextMenu({
2788
+ ...props
2789
+ }) {
2790
+ return /* @__PURE__ */ jsx(ContextMenuPrimitive.Root, { "data-slot": "context-menu", ...props });
2791
+ }
2792
+ function ContextMenuTrigger({
2793
+ ...props
2794
+ }) {
2795
+ return /* @__PURE__ */ jsx(ContextMenuPrimitive.Trigger, { "data-slot": "context-menu-trigger", ...props });
2796
+ }
2797
+ function ContextMenuGroup({
2798
+ ...props
2799
+ }) {
2800
+ return /* @__PURE__ */ jsx(ContextMenuPrimitive.Group, { "data-slot": "context-menu-group", ...props });
2801
+ }
2802
+ function ContextMenuPortal({
2803
+ ...props
2804
+ }) {
2805
+ return /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { "data-slot": "context-menu-portal", ...props });
2806
+ }
2807
+ function ContextMenuSub({
2808
+ ...props
2809
+ }) {
2810
+ return /* @__PURE__ */ jsx(ContextMenuPrimitive.Sub, { "data-slot": "context-menu-sub", ...props });
2811
+ }
2812
+ function ContextMenuRadioGroup({
2813
+ ...props
2814
+ }) {
2815
+ return /* @__PURE__ */ jsx(
2816
+ ContextMenuPrimitive.RadioGroup,
2817
+ {
2818
+ "data-slot": "context-menu-radio-group",
2819
+ ...props
2820
+ }
2821
+ );
2822
+ }
2823
+ function ContextMenuSubTrigger({
2824
+ className,
2825
+ inset,
2826
+ children,
2827
+ ...props
2828
+ }) {
2829
+ return /* @__PURE__ */ jsxs(
2830
+ ContextMenuPrimitive.SubTrigger,
2831
+ {
2832
+ "data-slot": "context-menu-sub-trigger",
2833
+ "data-inset": inset,
2834
+ className: cn(
2835
+ "focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
2836
+ className
2837
+ ),
2838
+ ...props,
2839
+ children: [
2840
+ children,
2841
+ /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto" })
2842
+ ]
2843
+ }
2844
+ );
2845
+ }
2846
+ function ContextMenuSubContent({
2847
+ className,
2848
+ ...props
2849
+ }) {
2850
+ return /* @__PURE__ */ jsx(
2851
+ ContextMenuPrimitive.SubContent,
2852
+ {
2853
+ "data-slot": "context-menu-sub-content",
2854
+ className: cn(
2855
+ "bg-popover text-popover-foreground 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 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
2856
+ className
2857
+ ),
2858
+ ...props
2859
+ }
2860
+ );
2861
+ }
2862
+ function ContextMenuContent({
2863
+ className,
2864
+ ...props
2865
+ }) {
2866
+ return /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
2867
+ ContextMenuPrimitive.Content,
2868
+ {
2869
+ "data-slot": "context-menu-content",
2870
+ className: cn(
2871
+ "bg-popover text-popover-foreground 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 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
2872
+ className
2873
+ ),
2874
+ ...props
2875
+ }
2876
+ ) });
2877
+ }
2878
+ function ContextMenuItem({
2879
+ className,
2880
+ inset,
2881
+ variant = "default",
2882
+ ...props
2883
+ }) {
2884
+ return /* @__PURE__ */ jsx(
2885
+ ContextMenuPrimitive.Item,
2886
+ {
2887
+ "data-slot": "context-menu-item",
2888
+ "data-inset": inset,
2889
+ "data-variant": variant,
2890
+ className: cn(
2891
+ "focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
2892
+ className
2893
+ ),
2894
+ ...props
2895
+ }
2896
+ );
2897
+ }
2898
+ function ContextMenuCheckboxItem({
2899
+ className,
2900
+ children,
2901
+ checked,
2902
+ ...props
2903
+ }) {
2904
+ return /* @__PURE__ */ jsxs(
2905
+ ContextMenuPrimitive.CheckboxItem,
2906
+ {
2907
+ "data-slot": "context-menu-checkbox-item",
2908
+ className: cn(
2909
+ "focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
2910
+ className
2911
+ ),
2912
+ checked,
2913
+ ...props,
2914
+ children: [
2915
+ /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) }) }),
2916
+ children
2917
+ ]
2918
+ }
2919
+ );
2920
+ }
2921
+ function ContextMenuRadioItem({
2922
+ className,
2923
+ children,
2924
+ ...props
2925
+ }) {
2926
+ return /* @__PURE__ */ jsxs(
2927
+ ContextMenuPrimitive.RadioItem,
2928
+ {
2929
+ "data-slot": "context-menu-radio-item",
2930
+ className: cn(
2931
+ "focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
2932
+ className
2933
+ ),
2934
+ ...props,
2935
+ children: [
2936
+ /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CircleIcon, { className: "size-2 fill-current" }) }) }),
2937
+ children
2938
+ ]
2939
+ }
2940
+ );
2941
+ }
2942
+ function ContextMenuLabel({
2943
+ className,
2944
+ inset,
2945
+ ...props
2946
+ }) {
2947
+ return /* @__PURE__ */ jsx(
2948
+ ContextMenuPrimitive.Label,
2949
+ {
2950
+ "data-slot": "context-menu-label",
2951
+ "data-inset": inset,
2952
+ className: cn(
2953
+ "text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
2954
+ className
2955
+ ),
2956
+ ...props
2957
+ }
2958
+ );
2959
+ }
2960
+ function ContextMenuSeparator({
2961
+ className,
2962
+ ...props
2963
+ }) {
2964
+ return /* @__PURE__ */ jsx(
2965
+ ContextMenuPrimitive.Separator,
2966
+ {
2967
+ "data-slot": "context-menu-separator",
2968
+ className: cn("bg-border -mx-1 my-1 h-px", className),
2969
+ ...props
2970
+ }
2971
+ );
2972
+ }
2973
+ function ContextMenuShortcut({
2974
+ className,
2975
+ ...props
2976
+ }) {
2977
+ return /* @__PURE__ */ jsx(
2978
+ "span",
2979
+ {
2980
+ "data-slot": "context-menu-shortcut",
2981
+ className: cn(
2982
+ "text-muted-foreground ml-auto text-xs tracking-widest",
2983
+ className
2984
+ ),
2985
+ ...props
2986
+ }
2987
+ );
2988
+ }
2989
+ function Menubar({
2990
+ className,
2991
+ ...props
2992
+ }) {
2993
+ return /* @__PURE__ */ jsx(
2994
+ MenubarPrimitive.Root,
2995
+ {
2996
+ "data-slot": "menubar",
2997
+ className: cn(
2998
+ "bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs",
2999
+ className
3000
+ ),
3001
+ ...props
3002
+ }
3003
+ );
3004
+ }
3005
+ function MenubarMenu({
3006
+ ...props
3007
+ }) {
3008
+ return /* @__PURE__ */ jsx(MenubarPrimitive.Menu, { "data-slot": "menubar-menu", ...props });
3009
+ }
3010
+ function MenubarGroup({
3011
+ ...props
3012
+ }) {
3013
+ return /* @__PURE__ */ jsx(MenubarPrimitive.Group, { "data-slot": "menubar-group", ...props });
3014
+ }
3015
+ function MenubarPortal({
3016
+ ...props
3017
+ }) {
3018
+ return /* @__PURE__ */ jsx(MenubarPrimitive.Portal, { "data-slot": "menubar-portal", ...props });
3019
+ }
3020
+ function MenubarRadioGroup({
3021
+ ...props
3022
+ }) {
3023
+ return /* @__PURE__ */ jsx(MenubarPrimitive.RadioGroup, { "data-slot": "menubar-radio-group", ...props });
3024
+ }
3025
+ function MenubarTrigger({
3026
+ className,
3027
+ ...props
3028
+ }) {
3029
+ return /* @__PURE__ */ jsx(
3030
+ MenubarPrimitive.Trigger,
3031
+ {
3032
+ "data-slot": "menubar-trigger",
3033
+ className: cn(
3034
+ "focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none",
3035
+ className
3036
+ ),
3037
+ ...props
3038
+ }
3039
+ );
3040
+ }
3041
+ function MenubarContent({
3042
+ className,
3043
+ align = "start",
3044
+ alignOffset = -4,
3045
+ sideOffset = 8,
3046
+ ...props
3047
+ }) {
3048
+ return /* @__PURE__ */ jsx(MenubarPortal, { children: /* @__PURE__ */ jsx(
3049
+ MenubarPrimitive.Content,
3050
+ {
3051
+ "data-slot": "menubar-content",
3052
+ align,
3053
+ alignOffset,
3054
+ sideOffset,
3055
+ className: cn(
3056
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-md",
3057
+ className
3058
+ ),
3059
+ ...props
3060
+ }
3061
+ ) });
3062
+ }
3063
+ function MenubarItem({
3064
+ className,
3065
+ inset,
3066
+ variant = "default",
3067
+ ...props
3068
+ }) {
3069
+ return /* @__PURE__ */ jsx(
3070
+ MenubarPrimitive.Item,
3071
+ {
3072
+ "data-slot": "menubar-item",
3073
+ "data-inset": inset,
3074
+ "data-variant": variant,
3075
+ className: cn(
3076
+ "focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
3077
+ className
3078
+ ),
3079
+ ...props
3080
+ }
3081
+ );
3082
+ }
3083
+ function MenubarCheckboxItem({
3084
+ className,
3085
+ children,
3086
+ checked,
3087
+ ...props
3088
+ }) {
3089
+ return /* @__PURE__ */ jsxs(
3090
+ MenubarPrimitive.CheckboxItem,
3091
+ {
3092
+ "data-slot": "menubar-checkbox-item",
3093
+ className: cn(
3094
+ "focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
3095
+ className
3096
+ ),
3097
+ checked,
3098
+ ...props,
3099
+ children: [
3100
+ /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) }) }),
3101
+ children
3102
+ ]
3103
+ }
3104
+ );
3105
+ }
3106
+ function MenubarRadioItem({
3107
+ className,
3108
+ children,
3109
+ ...props
3110
+ }) {
3111
+ return /* @__PURE__ */ jsxs(
3112
+ MenubarPrimitive.RadioItem,
3113
+ {
3114
+ "data-slot": "menubar-radio-item",
3115
+ className: cn(
3116
+ "focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
3117
+ className
3118
+ ),
3119
+ ...props,
3120
+ children: [
3121
+ /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CircleIcon, { className: "size-2 fill-current" }) }) }),
3122
+ children
3123
+ ]
3124
+ }
3125
+ );
3126
+ }
3127
+ function MenubarLabel({
3128
+ className,
3129
+ inset,
3130
+ ...props
3131
+ }) {
3132
+ return /* @__PURE__ */ jsx(
3133
+ MenubarPrimitive.Label,
3134
+ {
3135
+ "data-slot": "menubar-label",
3136
+ "data-inset": inset,
3137
+ className: cn(
3138
+ "px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
3139
+ className
3140
+ ),
3141
+ ...props
3142
+ }
3143
+ );
3144
+ }
3145
+ function MenubarSeparator({
3146
+ className,
3147
+ ...props
3148
+ }) {
3149
+ return /* @__PURE__ */ jsx(
3150
+ MenubarPrimitive.Separator,
3151
+ {
3152
+ "data-slot": "menubar-separator",
3153
+ className: cn("bg-border -mx-1 my-1 h-px", className),
3154
+ ...props
3155
+ }
3156
+ );
3157
+ }
3158
+ function MenubarShortcut({
3159
+ className,
3160
+ ...props
3161
+ }) {
3162
+ return /* @__PURE__ */ jsx(
3163
+ "span",
3164
+ {
3165
+ "data-slot": "menubar-shortcut",
3166
+ className: cn(
3167
+ "text-muted-foreground ml-auto text-xs tracking-widest",
3168
+ className
3169
+ ),
3170
+ ...props
3171
+ }
3172
+ );
3173
+ }
3174
+ function MenubarSub({
3175
+ ...props
3176
+ }) {
3177
+ return /* @__PURE__ */ jsx(MenubarPrimitive.Sub, { "data-slot": "menubar-sub", ...props });
3178
+ }
3179
+ function MenubarSubTrigger({
3180
+ className,
3181
+ inset,
3182
+ children,
3183
+ ...props
3184
+ }) {
3185
+ return /* @__PURE__ */ jsxs(
3186
+ MenubarPrimitive.SubTrigger,
3187
+ {
3188
+ "data-slot": "menubar-sub-trigger",
3189
+ "data-inset": inset,
3190
+ className: cn(
3191
+ "focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[inset]:pl-8",
3192
+ className
3193
+ ),
3194
+ ...props,
3195
+ children: [
3196
+ children,
3197
+ /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto h-4 w-4" })
3198
+ ]
3199
+ }
3200
+ );
3201
+ }
3202
+ function MenubarSubContent({
3203
+ className,
3204
+ ...props
3205
+ }) {
3206
+ return /* @__PURE__ */ jsx(
3207
+ MenubarPrimitive.SubContent,
3208
+ {
3209
+ "data-slot": "menubar-sub-content",
3210
+ className: cn(
3211
+ "bg-popover text-popover-foreground 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 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
3212
+ className
3213
+ ),
3214
+ ...props
3215
+ }
3216
+ );
3217
+ }
3218
+ function Command({
3219
+ className,
3220
+ ...props
3221
+ }) {
3222
+ return /* @__PURE__ */ jsx(
3223
+ Command$1,
3224
+ {
3225
+ "data-slot": "command",
3226
+ className: cn(
3227
+ "bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",
3228
+ className
3229
+ ),
3230
+ ...props
3231
+ }
3232
+ );
3233
+ }
3234
+ function CommandDialog({
3235
+ title = "Command Palette",
3236
+ description = "Search for a command to run...",
3237
+ children,
3238
+ ...props
3239
+ }) {
3240
+ return /* @__PURE__ */ jsxs(Dialog, { ...props, children: [
3241
+ /* @__PURE__ */ jsxs(DialogHeader, { className: "sr-only", children: [
3242
+ /* @__PURE__ */ jsx(DialogTitle, { children: title }),
3243
+ /* @__PURE__ */ jsx(DialogDescription, { children: description })
3244
+ ] }),
3245
+ /* @__PURE__ */ jsx(DialogContent, { className: "overflow-hidden p-0", children: /* @__PURE__ */ jsx(Command, { className: "[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children }) })
3246
+ ] });
3247
+ }
3248
+ function CommandInput({
3249
+ className,
3250
+ ...props
3251
+ }) {
3252
+ return /* @__PURE__ */ jsxs(
3253
+ "div",
3254
+ {
3255
+ "data-slot": "command-input-wrapper",
3256
+ className: "flex h-9 items-center gap-2 border-b px-3",
3257
+ children: [
3258
+ /* @__PURE__ */ jsx(SearchIcon, { className: "size-4 shrink-0 opacity-50" }),
3259
+ /* @__PURE__ */ jsx(
3260
+ Command$1.Input,
3261
+ {
3262
+ "data-slot": "command-input",
3263
+ className: cn(
3264
+ "placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
3265
+ className
3266
+ ),
3267
+ ...props
3268
+ }
3269
+ )
3270
+ ]
3271
+ }
3272
+ );
3273
+ }
3274
+ function CommandList({
3275
+ className,
3276
+ ...props
3277
+ }) {
3278
+ return /* @__PURE__ */ jsx(
3279
+ Command$1.List,
3280
+ {
3281
+ "data-slot": "command-list",
3282
+ role: "listbox",
3283
+ className: cn(
3284
+ "max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",
3285
+ className
3286
+ ),
3287
+ ...props
3288
+ }
3289
+ );
3290
+ }
3291
+ function CommandEmpty({
3292
+ ...props
3293
+ }) {
3294
+ return /* @__PURE__ */ jsx(
3295
+ Command$1.Empty,
3296
+ {
3297
+ "data-slot": "command-empty",
3298
+ className: "py-6 text-center text-sm",
3299
+ ...props
3300
+ }
3301
+ );
3302
+ }
3303
+ function CommandGroup({
3304
+ className,
3305
+ ...props
3306
+ }) {
3307
+ return /* @__PURE__ */ jsx(
3308
+ Command$1.Group,
3309
+ {
3310
+ "data-slot": "command-group",
3311
+ className: cn(
3312
+ "text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",
3313
+ className
3314
+ ),
3315
+ ...props
3316
+ }
3317
+ );
3318
+ }
3319
+ function CommandSeparator({
3320
+ className,
3321
+ ...props
3322
+ }) {
3323
+ return /* @__PURE__ */ jsx(
3324
+ Command$1.Separator,
3325
+ {
3326
+ "data-slot": "command-separator",
3327
+ className: cn("bg-border -mx-1 h-px", className),
3328
+ ...props
3329
+ }
3330
+ );
3331
+ }
3332
+ function CommandItem({
3333
+ className,
3334
+ ...props
3335
+ }) {
3336
+ return /* @__PURE__ */ jsx(
3337
+ Command$1.Item,
3338
+ {
3339
+ "data-slot": "command-item",
3340
+ role: "option",
3341
+ className: cn(
3342
+ "data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
3343
+ className
3344
+ ),
3345
+ ...props
3346
+ }
3347
+ );
3348
+ }
3349
+ function CommandShortcut({
3350
+ className,
3351
+ ...props
3352
+ }) {
3353
+ return /* @__PURE__ */ jsx(
3354
+ "span",
3355
+ {
3356
+ "data-slot": "command-shortcut",
3357
+ className: cn(
3358
+ "text-muted-foreground ml-auto text-xs tracking-widest",
3359
+ className
3360
+ ),
3361
+ ...props
3362
+ }
3363
+ );
3364
+ }
3365
+ const variantStyles = {
3366
+ default: "bg-primary text-primary-foreground",
3367
+ secondary: "bg-secondary text-secondary-foreground",
3368
+ destructive: "bg-destructive text-destructive-foreground",
3369
+ outline: "border-2 border-primary bg-background text-primary",
3370
+ success: "bg-success text-success-foreground",
3371
+ info: "bg-info text-info-foreground",
3372
+ warning: "bg-warning text-warning-foreground"
3373
+ };
3374
+ const NotificationBadge = React.forwardRef(
3375
+ ({
3376
+ className,
3377
+ count = 0,
3378
+ max = 99,
3379
+ showZero = false,
3380
+ dot = false,
3381
+ variant = "destructive",
3382
+ children,
3383
+ ...props
3384
+ }, ref) => {
3385
+ const displayCount = count > max ? `${max}+` : count;
3386
+ const shouldShow = count > 0 || showZero;
3387
+ if (!shouldShow && !dot) {
3388
+ return /* @__PURE__ */ jsx("div", { ref, className, ...props, children });
3389
+ }
3390
+ return /* @__PURE__ */ jsxs("div", { ref, className: cn("relative inline-block", className), ...props, children: [
3391
+ children,
3392
+ /* @__PURE__ */ jsx(
3393
+ "span",
3394
+ {
3395
+ className: cn(
3396
+ "absolute -right-1 -top-1 flex items-center justify-center rounded-full",
3397
+ variantStyles[variant],
3398
+ dot ? "h-2 w-2" : "min-w-[1.25rem] h-5 px-1.5"
3399
+ ),
3400
+ children: !dot && shouldShow && /* @__PURE__ */ jsx("span", { className: "text-[10px] font-medium leading-none", children: displayCount })
3401
+ }
3402
+ )
3403
+ ] });
3404
+ }
3405
+ );
3406
+ NotificationBadge.displayName = "NotificationBadge";
3407
+ const StatsCard = React.forwardRef(
3408
+ ({ className, title, value, description, trend, icon, ...props }, ref) => {
3409
+ const getTrendIcon = () => {
3410
+ if (!trend) return null;
3411
+ if (trend.value > 0) {
3412
+ return /* @__PURE__ */ jsx(TrendingUp, { className: "h-4 w-4 text-success" });
3413
+ } else if (trend.value < 0) {
3414
+ return /* @__PURE__ */ jsx(TrendingDown, { className: "h-4 w-4 text-destructive" });
3415
+ } else {
3416
+ return /* @__PURE__ */ jsx(Minus, { className: "h-4 w-4 text-muted-foreground" });
3417
+ }
3418
+ };
3419
+ const getTrendColor = () => {
3420
+ if (!trend) return "";
3421
+ if (trend.value > 0) {
3422
+ return "text-success";
3423
+ } else if (trend.value < 0) {
3424
+ return "text-destructive";
3425
+ } else {
3426
+ return "text-muted-foreground";
3427
+ }
3428
+ };
3429
+ return /* @__PURE__ */ jsx(Card, { ref, className: cn("", className), ...props, children: /* @__PURE__ */ jsx(CardContent, { className: "p-4 sm:p-6", children: /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-3", children: [
3430
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
3431
+ /* @__PURE__ */ jsx("p", { className: "text-muted-foreground mb-1 text-sm", children: title }),
3432
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-baseline gap-2", children: [
3433
+ /* @__PURE__ */ jsx("h3", { className: "text-foreground text-xl sm:text-2xl", children: value }),
3434
+ trend && /* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-1 text-sm", getTrendColor()), children: [
3435
+ getTrendIcon(),
3436
+ /* @__PURE__ */ jsxs("span", { children: [
3437
+ Math.abs(trend.value),
3438
+ "%"
3439
+ ] })
3440
+ ] })
3441
+ ] }),
3442
+ (description || (trend == null ? void 0 : trend.label)) && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground mt-1 text-xs sm:text-sm", children: (trend == null ? void 0 : trend.label) || description })
3443
+ ] }),
3444
+ icon && /* @__PURE__ */ jsx("div", { className: "rounded-[var(--radius)] bg-muted p-2 sm:p-3 text-muted-foreground flex-shrink-0", children: icon })
3445
+ ] }) }) });
3446
+ }
3447
+ );
3448
+ StatsCard.displayName = "StatsCard";
3449
+ const Timeline = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3450
+ "ol",
3451
+ {
3452
+ ref,
3453
+ className: cn("relative border-l border-border", className),
3454
+ ...props
3455
+ }
3456
+ ));
3457
+ Timeline.displayName = "Timeline";
3458
+ const TimelineItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3459
+ "li",
3460
+ {
3461
+ ref,
3462
+ className: cn("mb-10 ml-6", className),
3463
+ ...props
3464
+ }
3465
+ ));
3466
+ TimelineItem.displayName = "TimelineItem";
3467
+ const TimelineDot = React.forwardRef(({ className, variant = "default", icon, children, ...props }, ref) => {
3468
+ const variantStyles2 = {
3469
+ default: "bg-muted border-border",
3470
+ primary: "bg-primary border-primary",
3471
+ success: "bg-success border-success",
3472
+ info: "bg-info border-info",
3473
+ warning: "bg-warning border-warning",
3474
+ destructive: "bg-destructive border-destructive",
3475
+ outline: "bg-background border-border"
3476
+ };
3477
+ const iconColorStyles = {
3478
+ default: "text-muted-foreground",
3479
+ primary: "text-primary-foreground",
3480
+ success: "text-success-foreground",
3481
+ info: "text-info-foreground",
3482
+ warning: "text-warning-foreground",
3483
+ destructive: "text-destructive-foreground",
3484
+ outline: "text-foreground"
3485
+ };
3486
+ if (icon || children) {
3487
+ return /* @__PURE__ */ jsx(
3488
+ "div",
3489
+ {
3490
+ ref,
3491
+ className: cn(
3492
+ "absolute -left-[17px] mt-0.5 h-8 w-8 rounded-full border-2 flex items-center justify-center",
3493
+ variantStyles2[variant],
3494
+ className
3495
+ ),
3496
+ ...props,
3497
+ children: /* @__PURE__ */ jsx("span", { className: cn("h-4 w-4", iconColorStyles[variant]), children: icon || children })
3498
+ }
3499
+ );
3500
+ }
3501
+ return /* @__PURE__ */ jsx(
3502
+ "div",
3503
+ {
3504
+ ref,
3505
+ className: cn(
3506
+ "absolute -left-[9px] mt-1.5 h-4 w-4 rounded-full border-2",
3507
+ variantStyles2[variant],
3508
+ className
3509
+ ),
3510
+ ...props
3511
+ }
3512
+ );
3513
+ });
3514
+ TimelineDot.displayName = "TimelineDot";
3515
+ const TimelineContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3516
+ "div",
3517
+ {
3518
+ ref,
3519
+ className: cn("", className),
3520
+ ...props
3521
+ }
3522
+ ));
3523
+ TimelineContent.displayName = "TimelineContent";
3524
+ const TimelineHeading = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3525
+ "h3",
3526
+ {
3527
+ ref,
3528
+ className: cn("mb-1 text-foreground", className),
3529
+ ...props
3530
+ }
3531
+ ));
3532
+ TimelineHeading.displayName = "TimelineHeading";
3533
+ const TimelineTime = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3534
+ "time",
3535
+ {
3536
+ ref,
3537
+ className: cn("mb-2 block text-muted-foreground", className),
3538
+ ...props
3539
+ }
3540
+ ));
3541
+ TimelineTime.displayName = "TimelineTime";
3542
+ const TimelineDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3543
+ "p",
3544
+ {
3545
+ ref,
3546
+ className: cn("text-muted-foreground", className),
3547
+ ...props
3548
+ }
3549
+ ));
3550
+ TimelineDescription.displayName = "TimelineDescription";
3551
+ const TreeView = React.forwardRef(
3552
+ ({ className, data, onNodeClick, onNodeSelect, defaultExpanded = [], selectedNodeId, "aria-label": ariaLabel, ...props }, ref) => {
3553
+ var _a;
3554
+ const {
3555
+ expanded,
3556
+ effectiveSelectedId,
3557
+ getNodeRef,
3558
+ toggleExpand,
3559
+ handleSelect,
3560
+ handleKeyDown
3561
+ } = useTreeView({ data, defaultExpanded, selectedNodeId, onNodeClick, onNodeSelect });
3562
+ const firstRootId = (_a = data[0]) == null ? void 0 : _a.id;
3563
+ const focusableId = effectiveSelectedId ?? firstRootId;
3564
+ return (
3565
+ // TV-2: aria-label is required on role="tree" (WCAG 4.1.2)
3566
+ /* @__PURE__ */ jsx(
3567
+ "div",
3568
+ {
3569
+ ref,
3570
+ className: cn("w-full", className),
3571
+ role: "tree",
3572
+ "aria-label": ariaLabel ?? "Navegação em árvore",
3573
+ ...props,
3574
+ children: data.map((node) => /* @__PURE__ */ jsx(
3575
+ TreeNodeComponent,
3576
+ {
3577
+ node,
3578
+ level: 0,
3579
+ expanded,
3580
+ selectedId: effectiveSelectedId,
3581
+ focusableId,
3582
+ onToggle: toggleExpand,
3583
+ onSelect: handleSelect,
3584
+ onKeyDown: handleKeyDown,
3585
+ getNodeRef
3586
+ },
3587
+ node.id
3588
+ ))
3589
+ }
3590
+ )
3591
+ );
3592
+ }
3593
+ );
3594
+ TreeView.displayName = "TreeView";
3595
+ const TreeNodeComponent = ({
3596
+ node,
3597
+ level,
3598
+ expanded,
3599
+ selectedId,
3600
+ focusableId,
3601
+ onToggle,
3602
+ onSelect,
3603
+ onKeyDown,
3604
+ getNodeRef
3605
+ }) => {
3606
+ var _a;
3607
+ const hasChildren = !!((_a = node.children) == null ? void 0 : _a.length);
3608
+ const isExpanded = expanded.has(node.id);
3609
+ const isSelected = node.id === selectedId;
3610
+ const handleClick = () => {
3611
+ if (hasChildren) onToggle(node.id);
3612
+ onSelect(node);
3613
+ };
3614
+ return (
3615
+ // TV-3: WAI-ARIA tree pattern requires role="group" to be a child of role="treeitem".
3616
+ // The outer wrapper uses role="none" to neutralise the div's implicit role;
3617
+ // the button carries role="treeitem" and wraps its own children group.
3618
+ // Since HTML does not allow a div inside a button, the group is a sibling
3619
+ // of the button, both inside the role="none" wrapper — this is the accepted
3620
+ // pattern when the treeitem cannot literally contain the group element.
3621
+ /* @__PURE__ */ jsxs("div", { role: "none", children: [
3622
+ /* @__PURE__ */ jsxs(
3623
+ "button",
3624
+ {
3625
+ ref: getNodeRef(node.id),
3626
+ role: "treeitem",
3627
+ "aria-expanded": hasChildren ? isExpanded : void 0,
3628
+ "aria-selected": isSelected,
3629
+ tabIndex: node.id === focusableId ? 0 : -1,
3630
+ onClick: handleClick,
3631
+ onKeyDown: (e) => onKeyDown(e, node),
3632
+ className: cn(
3633
+ "flex w-full items-center gap-2 rounded-[var(--radius)] px-2 py-1.5 text-left transition-colors",
3634
+ "hover:bg-muted focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1",
3635
+ isSelected && "bg-primary/10 text-primary font-medium"
3636
+ ),
3637
+ style: { paddingLeft: `${level * 1.5 + 0.5}rem` },
3638
+ children: [
3639
+ hasChildren ? /* @__PURE__ */ jsx("span", { className: "flex-shrink-0 text-muted-foreground", children: isExpanded ? /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" }) }) : /* @__PURE__ */ jsx("span", { className: "w-4 flex-shrink-0", "aria-hidden": "true" }),
3640
+ node.icon && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0 text-muted-foreground", children: node.icon }),
3641
+ /* @__PURE__ */ jsx("span", { className: "flex-1 text-foreground", children: node.label })
3642
+ ]
3643
+ }
3644
+ ),
3645
+ hasChildren && isExpanded && /* @__PURE__ */ jsx("div", { role: "group", children: node.children.map((child) => /* @__PURE__ */ jsx(
3646
+ TreeNodeComponent,
3647
+ {
3648
+ node: child,
3649
+ level: level + 1,
3650
+ expanded,
3651
+ selectedId,
3652
+ focusableId,
3653
+ onToggle,
3654
+ onSelect,
3655
+ onKeyDown,
3656
+ getNodeRef
3657
+ },
3658
+ child.id
3659
+ )) })
3660
+ ] })
3661
+ );
3662
+ };
3663
+ function Collapsible({
3664
+ ...props
3665
+ }) {
3666
+ return /* @__PURE__ */ jsx(CollapsiblePrimitive.Root, { "data-slot": "collapsible", ...props });
3667
+ }
3668
+ function CollapsibleTrigger({
3669
+ ...props
3670
+ }) {
3671
+ return /* @__PURE__ */ jsx(
3672
+ CollapsiblePrimitive.CollapsibleTrigger,
3673
+ {
3674
+ "data-slot": "collapsible-trigger",
3675
+ ...props
3676
+ }
3677
+ );
3678
+ }
3679
+ function CollapsibleContent({
3680
+ ...props
3681
+ }) {
3682
+ return /* @__PURE__ */ jsx(
3683
+ CollapsiblePrimitive.CollapsibleContent,
3684
+ {
3685
+ "data-slot": "collapsible-content",
3686
+ ...props
3687
+ }
3688
+ );
3689
+ }
3690
+ function Accordion({
3691
+ ...props
3692
+ }) {
3693
+ return /* @__PURE__ */ jsx(AccordionPrimitive.Root, { "data-slot": "accordion", ...props });
3694
+ }
3695
+ function AccordionItem({
3696
+ className,
3697
+ ...props
3698
+ }) {
3699
+ return /* @__PURE__ */ jsx(
3700
+ AccordionPrimitive.Item,
3701
+ {
3702
+ "data-slot": "accordion-item",
3703
+ className: cn("border-b last:border-b-0", className),
3704
+ ...props
3705
+ }
3706
+ );
3707
+ }
3708
+ function AccordionTrigger({
3709
+ className,
3710
+ children,
3711
+ ...props
3712
+ }) {
3713
+ return /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
3714
+ AccordionPrimitive.Trigger,
3715
+ {
3716
+ "data-slot": "accordion-trigger",
3717
+ className: cn(
3718
+ "focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
3719
+ className
3720
+ ),
3721
+ ...props,
3722
+ children: [
3723
+ children,
3724
+ /* @__PURE__ */ jsx(ChevronDownIcon, { className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" })
3725
+ ]
3726
+ }
3727
+ ) });
3728
+ }
3729
+ function AccordionContent({
3730
+ className,
3731
+ children,
3732
+ ...props
3733
+ }) {
3734
+ return /* @__PURE__ */ jsx(
3735
+ AccordionPrimitive.Content,
3736
+ {
3737
+ "data-slot": "accordion-content",
3738
+ className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
3739
+ ...props,
3740
+ children: /* @__PURE__ */ jsx("div", { className: cn("pt-0 pb-4", className), children })
3741
+ }
3742
+ );
3743
+ }
3744
+ const CarouselContext = React.createContext(null);
3745
+ function useCarousel() {
3746
+ const context = React.useContext(CarouselContext);
3747
+ if (!context) {
3748
+ throw new Error("useCarousel must be used within a <Carousel />");
3749
+ }
3750
+ return context;
3751
+ }
3752
+ function Carousel({
3753
+ orientation = "horizontal",
3754
+ opts,
3755
+ setApi,
3756
+ plugins,
3757
+ className,
3758
+ children,
3759
+ ...props
3760
+ }) {
3761
+ const [carouselRef, api] = useEmblaCarousel(
3762
+ {
3763
+ ...opts,
3764
+ axis: orientation === "horizontal" ? "x" : "y"
3765
+ },
3766
+ plugins
3767
+ );
3768
+ const [canScrollPrev, setCanScrollPrev] = React.useState(false);
3769
+ const [canScrollNext, setCanScrollNext] = React.useState(false);
3770
+ const onSelect = React.useCallback((api2) => {
3771
+ if (!api2) return;
3772
+ setCanScrollPrev(api2.canScrollPrev());
3773
+ setCanScrollNext(api2.canScrollNext());
3774
+ }, []);
3775
+ const scrollPrev = React.useCallback(() => {
3776
+ api == null ? void 0 : api.scrollPrev();
3777
+ }, [api]);
3778
+ const scrollNext = React.useCallback(() => {
3779
+ api == null ? void 0 : api.scrollNext();
3780
+ }, [api]);
3781
+ const handleKeyDown = React.useCallback(
3782
+ (event) => {
3783
+ if (event.key === "ArrowLeft") {
3784
+ event.preventDefault();
3785
+ scrollPrev();
3786
+ } else if (event.key === "ArrowRight") {
3787
+ event.preventDefault();
3788
+ scrollNext();
3789
+ }
3790
+ },
3791
+ [scrollPrev, scrollNext]
3792
+ );
3793
+ React.useEffect(() => {
3794
+ if (!api || !setApi) return;
3795
+ setApi(api);
3796
+ }, [api, setApi]);
3797
+ React.useEffect(() => {
3798
+ if (!api) return;
3799
+ onSelect(api);
3800
+ api.on("reInit", onSelect);
3801
+ api.on("select", onSelect);
3802
+ return () => {
3803
+ api == null ? void 0 : api.off("select", onSelect);
3804
+ };
3805
+ }, [api, onSelect]);
3806
+ return /* @__PURE__ */ jsx(
3807
+ CarouselContext.Provider,
3808
+ {
3809
+ value: {
3810
+ carouselRef,
3811
+ api,
3812
+ opts,
3813
+ orientation: orientation || ((opts == null ? void 0 : opts.axis) === "y" ? "vertical" : "horizontal"),
3814
+ scrollPrev,
3815
+ scrollNext,
3816
+ canScrollPrev,
3817
+ canScrollNext
3818
+ },
3819
+ children: /* @__PURE__ */ jsx(
3820
+ "div",
3821
+ {
3822
+ onKeyDownCapture: handleKeyDown,
3823
+ className: cn("relative", className),
3824
+ role: "region",
3825
+ "aria-roledescription": "carousel",
3826
+ "data-slot": "carousel",
3827
+ ...props,
3828
+ children
3829
+ }
3830
+ )
3831
+ }
3832
+ );
3833
+ }
3834
+ function CarouselContent({ className, ...props }) {
3835
+ const { carouselRef, orientation } = useCarousel();
3836
+ return /* @__PURE__ */ jsx(
3837
+ "div",
3838
+ {
3839
+ ref: carouselRef,
3840
+ className: "overflow-hidden",
3841
+ "data-slot": "carousel-content",
3842
+ children: /* @__PURE__ */ jsx(
3843
+ "div",
3844
+ {
3845
+ className: cn(
3846
+ "flex",
3847
+ orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col",
3848
+ className
3849
+ ),
3850
+ ...props
3851
+ }
3852
+ )
3853
+ }
3854
+ );
3855
+ }
3856
+ function CarouselItem({ className, ...props }) {
3857
+ const { orientation } = useCarousel();
3858
+ return /* @__PURE__ */ jsx(
3859
+ "div",
3860
+ {
3861
+ role: "group",
3862
+ "aria-roledescription": "slide",
3863
+ "data-slot": "carousel-item",
3864
+ className: cn(
3865
+ "min-w-0 shrink-0 grow-0 basis-full",
3866
+ orientation === "horizontal" ? "pl-4" : "pt-4",
3867
+ className
3868
+ ),
3869
+ ...props
3870
+ }
3871
+ );
3872
+ }
3873
+ function CarouselPrevious({
3874
+ className,
3875
+ variant = "outline",
3876
+ size = "icon",
3877
+ ...props
3878
+ }) {
3879
+ const { orientation, scrollPrev, canScrollPrev } = useCarousel();
3880
+ return /* @__PURE__ */ jsxs(
3881
+ Button,
3882
+ {
3883
+ "data-slot": "carousel-previous",
3884
+ variant,
3885
+ size,
3886
+ className: cn(
3887
+ "absolute size-8 rounded-full",
3888
+ orientation === "horizontal" ? "top-1/2 -left-12 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
3889
+ className
3890
+ ),
3891
+ disabled: !canScrollPrev,
3892
+ onClick: scrollPrev,
3893
+ ...props,
3894
+ children: [
3895
+ /* @__PURE__ */ jsx(ArrowLeft, {}),
3896
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Previous slide" })
3897
+ ]
3898
+ }
3899
+ );
3900
+ }
3901
+ function CarouselNext({
3902
+ className,
3903
+ variant = "outline",
3904
+ size = "icon",
3905
+ ...props
3906
+ }) {
3907
+ const { orientation, scrollNext, canScrollNext } = useCarousel();
3908
+ return /* @__PURE__ */ jsxs(
3909
+ Button,
3910
+ {
3911
+ "data-slot": "carousel-next",
3912
+ variant,
3913
+ size,
3914
+ className: cn(
3915
+ "absolute size-8 rounded-full",
3916
+ orientation === "horizontal" ? "top-1/2 -right-12 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
3917
+ className
3918
+ ),
3919
+ disabled: !canScrollNext,
3920
+ onClick: scrollNext,
3921
+ ...props,
3922
+ children: [
3923
+ /* @__PURE__ */ jsx(ArrowRight, {}),
3924
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Next slide" })
3925
+ ]
3926
+ }
3927
+ );
3928
+ }
3929
+ const StepperContext = React.createContext(void 0);
3930
+ const useStepperContext = () => {
3931
+ const context = React.useContext(StepperContext);
3932
+ if (!context) throw new Error("useStepperContext must be used within a Stepper");
3933
+ return context;
3934
+ };
3935
+ const Stepper = React.forwardRef(
3936
+ ({ currentStep, orientation = "horizontal", className, children, ...props }, ref) => {
3937
+ const totalSteps = React.Children.count(children);
3938
+ return /* @__PURE__ */ jsx(StepperContext.Provider, { value: { currentStep, totalSteps, orientation }, children: /* @__PURE__ */ jsx(
3939
+ "div",
3940
+ {
3941
+ ref,
3942
+ className: cn("w-full", className),
3943
+ role: "list",
3944
+ "aria-label": `Progresso: etapa ${currentStep} de ${totalSteps}`,
3945
+ ...props,
3946
+ children: /* @__PURE__ */ jsx("div", { className: cn(
3947
+ orientation === "horizontal" ? "flex items-start justify-between" : "flex flex-col gap-0"
3948
+ ), children })
3949
+ }
3950
+ ) });
3951
+ }
3952
+ );
3953
+ Stepper.displayName = "Stepper";
3954
+ const Step = React.forwardRef(
3955
+ ({ step, label, description, error = false, className, ...props }, ref) => {
3956
+ const { currentStep, totalSteps, orientation } = useStepperContext();
3957
+ const isActive = step === currentStep;
3958
+ const isCompleted = step < currentStep && !error;
3959
+ const isFirst = step === 1;
3960
+ const isLast = step === totalSteps;
3961
+ const circleClasses = cn(
3962
+ "relative flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full border-2 transition-colors",
3963
+ isActive && !error && "border-primary bg-primary text-primary-foreground",
3964
+ isCompleted && "border-primary bg-primary text-primary-foreground",
3965
+ error && "border-destructive bg-destructive text-destructive-foreground",
3966
+ !isActive && !isCompleted && !error && "border-muted bg-background text-muted-foreground"
3967
+ );
3968
+ const connectorClasses = (filled) => cn("transition-colors", filled ? "bg-primary" : "bg-muted");
3969
+ if (orientation === "vertical") {
3970
+ return (
3971
+ // ST-2: role="listitem" + aria-current="step" communicate state to screen readers
3972
+ /* @__PURE__ */ jsxs(
3973
+ "div",
3974
+ {
3975
+ ref,
3976
+ role: "listitem",
3977
+ "aria-current": isActive ? "step" : void 0,
3978
+ "aria-label": `Etapa ${step} de ${totalSteps}: ${label}${isCompleted ? ", concluída" : ""}${error ? ", erro" : ""}`,
3979
+ className: cn("flex gap-4", className),
3980
+ ...props,
3981
+ children: [
3982
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center", children: [
3983
+ /* @__PURE__ */ jsx("div", { className: circleClasses, children: error ? /* @__PURE__ */ jsx(X, { className: "h-5 w-5" }) : isCompleted ? /* @__PURE__ */ jsx(Check, { className: "h-5 w-5" }) : /* @__PURE__ */ jsx("span", { children: step }) }),
3984
+ !isLast && /* @__PURE__ */ jsx("div", { className: cn("w-0.5 flex-1 min-h-[2rem] mt-1", connectorClasses(step < currentStep)) })
3985
+ ] }),
3986
+ /* @__PURE__ */ jsxs("div", { className: cn("pb-6", isLast && "pb-0"), children: [
3987
+ /* @__PURE__ */ jsx("div", { className: cn("transition-colors", isActive || error ? "text-foreground" : "text-muted-foreground"), children: label }),
3988
+ description && /* @__PURE__ */ jsx("div", { className: "mt-1 text-xs text-muted-foreground", children: description })
3989
+ ] })
3990
+ ]
3991
+ }
3992
+ )
3993
+ );
3994
+ }
3995
+ return (
3996
+ // ST-2: role="listitem" + aria-current="step" communicate state to screen readers
3997
+ /* @__PURE__ */ jsxs(
3998
+ "div",
3999
+ {
4000
+ ref,
4001
+ role: "listitem",
4002
+ "aria-current": isActive ? "step" : void 0,
4003
+ "aria-label": `Etapa ${step} de ${totalSteps}: ${label}${isCompleted ? ", concluída" : ""}${error ? ", erro" : ""}`,
4004
+ className: cn("flex flex-1 flex-col items-center", className),
4005
+ ...props,
4006
+ children: [
4007
+ /* @__PURE__ */ jsxs("div", { className: "flex w-full items-start", children: [
4008
+ step > 1 && /* @__PURE__ */ jsx("div", { className: cn("h-0.5 flex-1 mt-[18px]", connectorClasses(step <= currentStep)) }),
4009
+ /* @__PURE__ */ jsx("div", { className: circleClasses, children: error ? /* @__PURE__ */ jsx(X, { className: "h-5 w-5" }) : isCompleted ? /* @__PURE__ */ jsx(Check, { className: "h-5 w-5" }) : /* @__PURE__ */ jsx("span", { children: step }) }),
4010
+ step < totalSteps && /* @__PURE__ */ jsx("div", { className: cn("h-0.5 flex-1 mt-[18px]", connectorClasses(step < currentStep)) })
4011
+ ] }),
4012
+ /* @__PURE__ */ jsxs("div", { className: cn(
4013
+ "mt-2 px-1",
4014
+ isFirst && "text-left self-start",
4015
+ isLast && "text-right self-end",
4016
+ !isFirst && !isLast && "text-center w-full"
4017
+ ), children: [
4018
+ /* @__PURE__ */ jsx("div", { className: cn("transition-colors", isActive || error ? "text-foreground" : "text-muted-foreground"), children: label }),
4019
+ description && /* @__PURE__ */ jsx("div", { className: "mt-1 text-xs text-muted-foreground", children: description })
4020
+ ] })
4021
+ ]
4022
+ }
4023
+ )
4024
+ );
4025
+ }
4026
+ );
4027
+ Step.displayName = "Step";
4028
+ const FileUpload = React.forwardRef(
4029
+ ({
4030
+ className,
4031
+ onFilesChange,
4032
+ maxFiles = 1,
4033
+ maxSize = 5 * 1024 * 1024,
4034
+ // 5MB default
4035
+ showPreview = true,
4036
+ onError,
4037
+ accept,
4038
+ disabled,
4039
+ ...props
4040
+ }, ref) => {
4041
+ const {
4042
+ files,
4043
+ dragActive,
4044
+ errorMessage,
4045
+ inputRef,
4046
+ handleDrag,
4047
+ handleDrop,
4048
+ handleChange,
4049
+ removeFile,
4050
+ openFileDialog
4051
+ } = useFileUpload({ maxFiles, maxSize, onFilesChange, onError, disabled, accept });
4052
+ return /* @__PURE__ */ jsxs("div", { ref, className: cn("w-full", className), children: [
4053
+ /* @__PURE__ */ jsxs(
4054
+ "div",
4055
+ {
4056
+ role: "button",
4057
+ tabIndex: disabled ? -1 : 0,
4058
+ "aria-label": "Área de upload de arquivos. Clique ou pressione Enter para selecionar arquivos, ou arraste e solte.",
4059
+ onDragEnter: handleDrag,
4060
+ onDragLeave: handleDrag,
4061
+ onDragOver: handleDrag,
4062
+ onDrop: handleDrop,
4063
+ onClick: openFileDialog,
4064
+ onKeyDown: (e) => {
4065
+ if (!disabled && (e.key === "Enter" || e.key === " ")) {
4066
+ e.preventDefault();
4067
+ openFileDialog();
4068
+ }
4069
+ },
4070
+ className: cn(
4071
+ "relative flex cursor-pointer flex-col items-center justify-center rounded-[var(--radius)] border-2 border-dashed border-border bg-background p-8 transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
4072
+ dragActive && "border-primary bg-primary/5",
4073
+ errorMessage && "border-destructive/50",
4074
+ disabled && "cursor-not-allowed opacity-50"
4075
+ ),
4076
+ children: [
4077
+ /* @__PURE__ */ jsx(Upload, { className: "mb-4 h-10 w-10 text-muted-foreground" }),
4078
+ /* @__PURE__ */ jsxs("p", { className: "mb-2 text-foreground", children: [
4079
+ /* @__PURE__ */ jsx("span", { className: "text-primary", children: "Clique para enviar" }),
4080
+ " ou arraste e solte"
4081
+ ] }),
4082
+ /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground", children: [
4083
+ maxFiles > 1 ? `Até ${maxFiles} arquivos` : "1 arquivo",
4084
+ " • Máx. ",
4085
+ (maxSize / 1024 / 1024).toFixed(0),
4086
+ "MB"
4087
+ ] }),
4088
+ /* @__PURE__ */ jsx(
4089
+ "input",
4090
+ {
4091
+ ...props,
4092
+ ref: inputRef,
4093
+ type: "file",
4094
+ className: "hidden",
4095
+ onChange: handleChange,
4096
+ multiple: maxFiles > 1,
4097
+ accept,
4098
+ disabled
4099
+ }
4100
+ )
4101
+ ]
4102
+ }
4103
+ ),
4104
+ errorMessage && /* @__PURE__ */ jsxs("div", { className: "mt-2 flex items-center gap-2 rounded-[var(--radius)] border border-destructive/30 bg-destructive/5 px-3 py-2 text-sm text-destructive", children: [
4105
+ /* @__PURE__ */ jsx(AlertCircle, { className: "h-4 w-4 shrink-0" }),
4106
+ /* @__PURE__ */ jsx("span", { children: errorMessage })
4107
+ ] }),
4108
+ showPreview && files.length > 0 && /* @__PURE__ */ jsx("div", { className: "mt-4 space-y-2", children: files.map((file, index) => /* @__PURE__ */ jsxs(
4109
+ "div",
4110
+ {
4111
+ className: "flex items-center justify-between rounded-[var(--radius)] border border-border bg-card p-3",
4112
+ children: [
4113
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
4114
+ /* @__PURE__ */ jsx(FileIcon, { className: "h-5 w-5 text-muted-foreground" }),
4115
+ /* @__PURE__ */ jsxs("div", { children: [
4116
+ /* @__PURE__ */ jsx("p", { className: "text-foreground", children: file.name }),
4117
+ /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: file.size >= 1024 * 1024 ? `${(file.size / 1024 / 1024).toFixed(2)} MB` : `${(file.size / 1024).toFixed(2)} KB` })
4118
+ ] })
4119
+ ] }),
4120
+ /* @__PURE__ */ jsx(
4121
+ Button,
4122
+ {
4123
+ type: "button",
4124
+ variant: "ghost",
4125
+ size: "sm",
4126
+ onClick: (e) => {
4127
+ e.stopPropagation();
4128
+ removeFile(index);
4129
+ },
4130
+ disabled,
4131
+ children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" })
4132
+ }
4133
+ )
4134
+ ]
4135
+ },
4136
+ index
4137
+ )) })
4138
+ ] });
4139
+ }
4140
+ );
4141
+ FileUpload.displayName = "FileUpload";
4142
+ const Rating = React.forwardRef(
4143
+ ({
4144
+ className,
4145
+ value = 0,
4146
+ onChange,
4147
+ max = 5,
4148
+ readonly = false,
4149
+ disabled = false,
4150
+ size = "md",
4151
+ showValue = false,
4152
+ allowHalf = false,
4153
+ getAriaLabel,
4154
+ ...props
4155
+ }, ref) => {
4156
+ const [hoverValue, setHoverValue] = React.useState(null);
4157
+ const isInteractive = !readonly && !disabled;
4158
+ const sizeStyles = {
4159
+ sm: "h-4 w-4",
4160
+ md: "h-5 w-5",
4161
+ lg: "h-6 w-6"
4162
+ };
4163
+ const handleClick = (rating) => {
4164
+ if (isInteractive) onChange == null ? void 0 : onChange(rating);
4165
+ };
4166
+ const handleMouseMove = (e, rating) => {
4167
+ if (!isInteractive) return;
4168
+ if (allowHalf) {
4169
+ const rect = e.currentTarget.getBoundingClientRect();
4170
+ setHoverValue(e.clientX - rect.left < rect.width / 2 ? rating - 0.5 : rating);
4171
+ } else {
4172
+ setHoverValue(rating);
4173
+ }
4174
+ };
4175
+ const handleMouseLeave = () => {
4176
+ if (isInteractive) setHoverValue(null);
4177
+ };
4178
+ const handleClickWithHalf = (e, rating) => {
4179
+ if (!isInteractive) return;
4180
+ if (allowHalf) {
4181
+ const rect = e.currentTarget.getBoundingClientRect();
4182
+ const half = e.clientX - rect.left < rect.width / 2 ? rating - 0.5 : rating;
4183
+ onChange == null ? void 0 : onChange(half);
4184
+ } else {
4185
+ handleClick(rating);
4186
+ }
4187
+ };
4188
+ const displayValue = hoverValue ?? value;
4189
+ return /* @__PURE__ */ jsxs(
4190
+ "div",
4191
+ {
4192
+ ref,
4193
+ className: cn("flex items-center gap-1", disabled && "opacity-50", className),
4194
+ ...props,
4195
+ children: [
4196
+ /* @__PURE__ */ jsx("div", { className: "flex items-center gap-0.5", role: "group", "aria-label": "Rating", children: Array.from({ length: max }, (_, index) => {
4197
+ const rating = index + 1;
4198
+ const isFull = rating <= displayValue;
4199
+ const isHalf = allowHalf && !isFull && rating - 0.5 <= displayValue;
4200
+ return /* @__PURE__ */ jsxs(
4201
+ "button",
4202
+ {
4203
+ type: "button",
4204
+ onClick: (e) => handleClickWithHalf(e, rating),
4205
+ onMouseMove: (e) => handleMouseMove(e, rating),
4206
+ onMouseLeave: handleMouseLeave,
4207
+ disabled: readonly || disabled,
4208
+ "aria-label": getAriaLabel ? getAriaLabel(rating, max) : `${rating} / ${max}`,
4209
+ className: cn(
4210
+ "relative transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
4211
+ isInteractive && "cursor-pointer hover:scale-110",
4212
+ !isInteractive && "cursor-default"
4213
+ ),
4214
+ children: [
4215
+ /* @__PURE__ */ jsx(Star, { className: cn(sizeStyles[size], "fill-none text-muted-foreground") }),
4216
+ (isFull || isHalf) && /* @__PURE__ */ jsx(
4217
+ "span",
4218
+ {
4219
+ className: cn(
4220
+ "absolute inset-0 overflow-hidden",
4221
+ isHalf ? "w-1/2" : "w-full"
4222
+ ),
4223
+ children: /* @__PURE__ */ jsx(Star, { className: cn(sizeStyles[size], "fill-warning text-warning") })
4224
+ }
4225
+ )
4226
+ ]
4227
+ },
4228
+ index
4229
+ );
4230
+ }) }),
4231
+ showValue && /* @__PURE__ */ jsx("span", { className: "ml-2 text-sm text-muted-foreground", children: value % 1 === 0 ? value.toFixed(0) : value.toFixed(1) })
4232
+ ]
4233
+ }
4234
+ );
4235
+ }
4236
+ );
4237
+ Rating.displayName = "Rating";
4238
+ const Search = React.forwardRef(
4239
+ ({
4240
+ className,
4241
+ containerClassName,
4242
+ onSearch,
4243
+ onClear,
4244
+ onChange,
4245
+ size = "md",
4246
+ searchLabel = "Search",
4247
+ clearLabel = "Clear search",
4248
+ value: controlledValue,
4249
+ defaultValue,
4250
+ ...props
4251
+ }, ref) => {
4252
+ const isControlled = controlledValue !== void 0;
4253
+ const [internalValue, setInternalValue] = React.useState(
4254
+ isControlled ? "" : defaultValue ?? ""
4255
+ );
4256
+ const displayValue = isControlled ? controlledValue : internalValue;
4257
+ const sizeClasses = {
4258
+ sm: "h-8 px-8 py-1 text-sm",
4259
+ md: "h-10 px-10 py-2 text-base",
4260
+ lg: "h-12 px-12 py-3 text-base"
4261
+ };
4262
+ const iconSizeClasses = {
4263
+ sm: "left-2 h-3.5 w-3.5",
4264
+ md: "left-3 h-4 w-4",
4265
+ lg: "left-4 h-5 w-5"
4266
+ };
4267
+ const clearSizeClasses = {
4268
+ sm: "right-2",
4269
+ md: "right-3",
4270
+ lg: "right-4"
4271
+ };
4272
+ const handleChange = (e) => {
4273
+ const newValue = e.target.value;
4274
+ if (!isControlled) setInternalValue(newValue);
4275
+ onChange == null ? void 0 : onChange(e);
4276
+ onSearch == null ? void 0 : onSearch(newValue);
4277
+ };
4278
+ const handleClear = () => {
4279
+ if (!isControlled) setInternalValue("");
4280
+ onClear == null ? void 0 : onClear();
4281
+ onSearch == null ? void 0 : onSearch("");
4282
+ };
4283
+ const handleKeyDown = (e) => {
4284
+ var _a;
4285
+ if (e.key === "Escape") {
4286
+ handleClear();
4287
+ }
4288
+ (_a = props.onKeyDown) == null ? void 0 : _a.call(props, e);
4289
+ };
4290
+ return /* @__PURE__ */ jsxs("div", { className: cn("relative w-full", containerClassName), children: [
4291
+ /* @__PURE__ */ jsx(
4292
+ Search$1,
4293
+ {
4294
+ "aria-hidden": "true",
4295
+ className: cn("absolute top-1/2 -translate-y-1/2 text-muted-foreground", iconSizeClasses[size])
4296
+ }
4297
+ ),
4298
+ /* @__PURE__ */ jsx(
4299
+ "input",
4300
+ {
4301
+ ref,
4302
+ type: "text",
4303
+ value: displayValue,
4304
+ onChange: handleChange,
4305
+ onKeyDown: handleKeyDown,
4306
+ className: cn(
4307
+ "flex w-full rounded-[var(--radius)] border border-border bg-background text-foreground transition-colors outline-none",
4308
+ "placeholder:text-muted-foreground",
4309
+ "focus:ring-2 focus:ring-primary focus:border-transparent",
4310
+ "disabled:cursor-not-allowed disabled:opacity-50",
4311
+ sizeClasses[size],
4312
+ className
4313
+ ),
4314
+ "aria-label": props.placeholder || searchLabel,
4315
+ ...props
4316
+ }
4317
+ ),
4318
+ displayValue && /* @__PURE__ */ jsx(
4319
+ "button",
4320
+ {
4321
+ type: "button",
4322
+ onClick: handleClear,
4323
+ "aria-label": clearLabel,
4324
+ className: cn(
4325
+ "absolute top-1/2 -translate-y-1/2 text-muted-foreground transition-colors hover:text-foreground focus:outline-none",
4326
+ clearSizeClasses[size]
4327
+ ),
4328
+ children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" })
4329
+ }
4330
+ )
4331
+ ] });
4332
+ }
4333
+ );
4334
+ Search.displayName = "Search";
4335
+ const __vite_import_meta_env__ = { "BASE_URL": "/", "DEV": false, "MODE": "production", "PROD": true, "SSR": false, "VITE_GEMINI_API_KEY": "AIzaSyBnoWKe4LjQzlIklON_dVXMXNUl2gvfH6U", "VITE_GOOGLE_MAPS_API_KEY": "AIzaSyCj19NndSgZOb8057q24UbJtSsfVJiyVdo" };
4336
+ const RouteMapContent = React__default.forwardRef(
4337
+ ({ apiKey, ...props }, ref) => {
4338
+ const { isLoaded, loadError, load } = useGoogleMapsLoader();
4339
+ const {
4340
+ origin,
4341
+ destination,
4342
+ waypoints = [],
4343
+ travelMode = "DRIVING",
4344
+ height = "450px",
4345
+ mapContainerClassName,
4346
+ disableDefaultUI = false,
4347
+ zoomControl = true,
4348
+ streetViewControl = false,
4349
+ mapTypeControl = false,
4350
+ fullscreenControl = true,
4351
+ onRouteCalculated,
4352
+ className,
4353
+ ...divProps
4354
+ } = props;
4355
+ const mapRef = useRef(null);
4356
+ const gmpMapRef = useRef(null);
4357
+ const directionsRendererRef = useRef(null);
4358
+ useRef(false);
4359
+ const isCalculatingRef = useRef(false);
4360
+ useEffect(() => {
4361
+ if (!isLoaded && apiKey && !loadError && load) {
4362
+ load(apiKey).catch(console.error);
4363
+ }
4364
+ }, [isLoaded, apiKey, loadError, load]);
4365
+ useEffect(() => {
4366
+ if (!isLoaded || !gmpMapRef.current) return;
4367
+ const setupMap = (map) => {
4368
+ mapRef.current = map;
4369
+ const computedStyle = getComputedStyle(document.documentElement);
4370
+ const primaryColor = computedStyle.getPropertyValue("--primary").trim() || "#4F46E5";
4371
+ if (!directionsRendererRef.current) {
4372
+ directionsRendererRef.current = new google.maps.DirectionsRenderer({
4373
+ map,
4374
+ suppressMarkers: false,
4375
+ polylineOptions: {
4376
+ strokeColor: primaryColor,
4377
+ strokeWeight: 5,
4378
+ strokeOpacity: 0.8
4379
+ }
4380
+ });
4381
+ } else {
4382
+ directionsRendererRef.current.setMap(map);
4383
+ }
4384
+ };
4385
+ const gmpMap = gmpMapRef.current;
4386
+ if (gmpMap.innerMap) {
4387
+ setupMap(gmpMap.innerMap);
4388
+ } else {
4389
+ const interval = setInterval(() => {
4390
+ if (gmpMap.innerMap) {
4391
+ setupMap(gmpMap.innerMap);
4392
+ clearInterval(interval);
4393
+ }
4394
+ }, 100);
4395
+ return () => clearInterval(interval);
4396
+ }
4397
+ return () => {
4398
+ if (directionsRendererRef.current) {
4399
+ directionsRendererRef.current.setMap(null);
4400
+ }
4401
+ mapRef.current = null;
4402
+ };
4403
+ }, [isLoaded]);
4404
+ useEffect(() => {
4405
+ if (gmpMapRef.current && origin) {
4406
+ gmpMapRef.current.center = origin;
4407
+ }
4408
+ }, [origin.lat, origin.lng]);
4409
+ useEffect(() => {
4410
+ if (gmpMapRef.current) {
4411
+ gmpMapRef.current.zoom = 13;
4412
+ }
4413
+ }, []);
4414
+ useEffect(() => {
4415
+ const map = mapRef.current;
4416
+ const renderer = directionsRendererRef.current;
4417
+ if (!map || !renderer || !isLoaded || isCalculatingRef.current) return;
4418
+ if (!origin || !destination) return;
4419
+ isCalculatingRef.current = true;
4420
+ const directionsService = new google.maps.DirectionsService();
4421
+ const request = {
4422
+ origin,
4423
+ destination,
4424
+ waypoints: waypoints.map((wp) => ({
4425
+ location: wp,
4426
+ stopover: true
4427
+ })),
4428
+ travelMode: google.maps.TravelMode[travelMode]
4429
+ };
4430
+ directionsService.route(request, (result, status) => {
4431
+ var _a;
4432
+ isCalculatingRef.current = false;
4433
+ if (status === "OK" && result) {
4434
+ renderer.setDirections(result);
4435
+ const route = result.routes[0];
4436
+ if (((_a = route == null ? void 0 : route.legs) == null ? void 0 : _a.length) > 0 && onRouteCalculated) {
4437
+ let totalDistance = 0;
4438
+ let totalDuration = 0;
4439
+ route.legs.forEach((leg) => {
4440
+ if (leg.distance) totalDistance += leg.distance.value;
4441
+ if (leg.duration) totalDuration += leg.duration.value;
4442
+ });
4443
+ const distanceKm = (totalDistance / 1e3).toFixed(1);
4444
+ const distanceText = `${distanceKm} km`;
4445
+ const hours = Math.floor(totalDuration / 3600);
4446
+ const minutes = Math.floor(totalDuration % 3600 / 60);
4447
+ const durationText = hours > 0 ? `${hours}h ${minutes}min` : `${minutes} min`;
4448
+ onRouteCalculated(distanceText, durationText);
4449
+ }
4450
+ }
4451
+ });
4452
+ }, [isLoaded, origin.lat, origin.lng, destination.lat, destination.lng, travelMode, mapRef.current]);
4453
+ if (loadError) {
4454
+ return /* @__PURE__ */ jsx(
4455
+ "div",
4456
+ {
4457
+ ref,
4458
+ className: cn(
4459
+ "relative rounded-[var(--radius-card)] border border-destructive/50 overflow-hidden bg-destructive/5",
4460
+ className
4461
+ ),
4462
+ style: { height },
4463
+ ...divProps,
4464
+ children: /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsxs("div", { className: "text-center space-y-2 p-6", children: [
4465
+ /* @__PURE__ */ jsx("div", { className: "text-destructive", children: /* @__PURE__ */ jsx("svg", { className: "w-12 h-12 mx-auto", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" }) }) }),
4466
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-foreground", children: "Failed to load Google Maps" }),
4467
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "Check API key in Settings" })
4468
+ ] }) })
4469
+ }
4470
+ );
4471
+ }
4472
+ if (!isLoaded) {
4473
+ return /* @__PURE__ */ jsx(
4474
+ "div",
4475
+ {
4476
+ ref,
4477
+ className: cn(
4478
+ "relative rounded-[var(--radius-card)] border border-border overflow-hidden bg-muted animate-pulse",
4479
+ className
4480
+ ),
4481
+ style: { height },
4482
+ ...divProps
4483
+ }
4484
+ );
4485
+ }
4486
+ return /* @__PURE__ */ jsx(
4487
+ "div",
4488
+ {
4489
+ ref,
4490
+ className: cn(
4491
+ "relative rounded-[var(--radius-card)] border border-border overflow-hidden",
4492
+ className
4493
+ ),
4494
+ style: { height },
4495
+ ...divProps,
4496
+ children: /* @__PURE__ */ jsx(
4497
+ "gmp-map",
4498
+ {
4499
+ ref: gmpMapRef,
4500
+ style: { height: "100%", width: "100%", display: "block" },
4501
+ "map-id": props.mapId || "xertica-route-map"
4502
+ }
4503
+ )
4504
+ }
4505
+ );
4506
+ }
4507
+ );
4508
+ RouteMapContent.displayName = "RouteMapContent";
4509
+ const RouteMap = React__default.forwardRef(
4510
+ (props, ref) => {
4511
+ const { isLoaded, loadError } = useGoogleMapsLoader();
4512
+ const effectiveApiKey = props.apiKey || typeof import.meta !== "undefined" && __vite_import_meta_env__ && "AIzaSyCj19NndSgZOb8057q24UbJtSsfVJiyVdo" || "";
4513
+ const isValidKey = effectiveApiKey && effectiveApiKey !== "YOUR_GOOGLE_MAPS_API_KEY_HERE" && effectiveApiKey.startsWith("AIza");
4514
+ if (isLoaded || isValidKey || loadError) {
4515
+ return /* @__PURE__ */ jsx(RouteMapContent, { ref, ...props, apiKey: effectiveApiKey });
4516
+ }
4517
+ const isScriptInjected = typeof document !== "undefined" && !!document.querySelector('script[src*="maps.googleapis.com/maps/api/js"]');
4518
+ if (isScriptInjected) {
4519
+ return /* @__PURE__ */ jsx(RouteMapContent, { ref, ...props, apiKey: effectiveApiKey });
4520
+ }
4521
+ const {
4522
+ origin,
4523
+ destination,
4524
+ waypoints,
4525
+ travelMode,
4526
+ height,
4527
+ apiKey,
4528
+ mapContainerClassName,
4529
+ disableDefaultUI,
4530
+ zoomControl,
4531
+ streetViewControl,
4532
+ mapTypeControl,
4533
+ fullscreenControl,
4534
+ onRouteCalculated,
4535
+ ...divProps
4536
+ } = props;
4537
+ return /* @__PURE__ */ jsx(
4538
+ "div",
4539
+ {
4540
+ ref,
4541
+ className: cn(
4542
+ "relative rounded-[var(--radius-card)] border border-border overflow-hidden bg-muted",
4543
+ props.className
4544
+ ),
4545
+ style: { height: props.height || "450px" },
4546
+ ...divProps,
4547
+ children: /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-gradient-to-br from-muted/50 to-muted", children: /* @__PURE__ */ jsxs("div", { className: "text-center space-y-3 p-6", children: [
4548
+ /* @__PURE__ */ jsx("div", { className: "w-16 h-16 mx-auto bg-primary/10 rounded-full flex items-center justify-center", children: /* @__PURE__ */ jsxs("svg", { className: "w-8 h-8 text-primary", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: [
4549
+ /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z" }),
4550
+ /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 11a3 3 0 11-6 0 3 3 0 016 0z" })
4551
+ ] }) }),
4552
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "Configure Google Maps API Key in Settings" })
4553
+ ] }) })
4554
+ }
4555
+ );
4556
+ }
4557
+ );
4558
+ RouteMap.displayName = "RouteMap";
4559
+ const SimpleMap = React__default.forwardRef(
4560
+ ({
4561
+ center,
4562
+ address,
4563
+ markerTitle,
4564
+ markerInfo,
4565
+ showMarker = true,
4566
+ zoom = 15,
4567
+ height = "350px",
4568
+ ...props
4569
+ }, ref) => {
4570
+ const markers = showMarker && center ? [
4571
+ {
4572
+ position: center,
4573
+ title: markerTitle || address || "Location",
4574
+ info: markerInfo || address
4575
+ }
4576
+ ] : [];
4577
+ return /* @__PURE__ */ jsx(
4578
+ Map$1,
4579
+ {
4580
+ ref,
4581
+ center,
4582
+ zoom,
4583
+ height,
4584
+ markers,
4585
+ ...props
4586
+ }
4587
+ );
4588
+ }
4589
+ );
4590
+ SimpleMap.displayName = "SimpleMap";
4591
+ function AssistantChart({
4592
+ data,
4593
+ config,
4594
+ categoryKey = "month",
4595
+ bars,
4596
+ xAxisFormatter,
4597
+ className
4598
+ }) {
4599
+ const resolvedBars = bars ?? Object.keys(config).map((key) => ({ dataKey: key }));
4600
+ const formatTick2 = xAxisFormatter ?? ((value) => value.slice(0, 3));
4601
+ return /* @__PURE__ */ jsx(ChartContainer, { config, className: cn("min-h-[200px] w-full", className), children: /* @__PURE__ */ jsxs(BarChart, { accessibilityLayer: true, data, children: [
4602
+ /* @__PURE__ */ jsx(CartesianGrid, { vertical: false }),
4603
+ /* @__PURE__ */ jsx(
4604
+ XAxis,
4605
+ {
4606
+ dataKey: categoryKey,
4607
+ tickLine: false,
4608
+ tickMargin: 10,
4609
+ axisLine: false,
4610
+ tickFormatter: formatTick2
4611
+ }
4612
+ ),
4613
+ /* @__PURE__ */ jsx(ChartTooltip, { cursor: false, content: /* @__PURE__ */ jsx(ChartTooltipContent, { indicator: "dashed" }) }),
4614
+ resolvedBars.map((bar) => /* @__PURE__ */ jsx(
4615
+ Bar,
4616
+ {
4617
+ dataKey: bar.dataKey,
4618
+ fill: bar.fill ?? `var(--color-${bar.dataKey})`,
4619
+ radius: bar.radius ?? 4
4620
+ },
4621
+ bar.dataKey
4622
+ ))
4623
+ ] }) });
4624
+ }
4625
+ export {
4626
+ DrawerOverlay as $,
4627
+ Accordion as A,
4628
+ ContextMenu as B,
4629
+ Calendar as C,
4630
+ ContextMenuCheckboxItem as D,
4631
+ ContextMenuContent as E,
4632
+ ContextMenuGroup as F,
4633
+ ContextMenuItem as G,
4634
+ ContextMenuLabel as H,
4635
+ ContextMenuPortal as I,
4636
+ ContextMenuRadioGroup as J,
4637
+ ContextMenuRadioItem as K,
4638
+ ContextMenuSeparator as L,
4639
+ ContextMenuShortcut as M,
4640
+ ContextMenuSub as N,
4641
+ ContextMenuSubContent as O,
4642
+ ContextMenuSubTrigger as P,
4643
+ ContextMenuTrigger as Q,
4644
+ DashboardBarChart as R,
4645
+ DashboardLineChart as S,
4646
+ DonutBreakdownChart as T,
4647
+ Drawer as U,
4648
+ DrawerClose as V,
4649
+ DrawerContent as W,
4650
+ DrawerDescription as X,
4651
+ DrawerFooter as Y,
4652
+ DrawerHandle as Z,
4653
+ DrawerHeader as _,
4654
+ AccordionContent as a,
4655
+ SheetBody as a$,
4656
+ DrawerPortal as a0,
4657
+ DrawerTitle as a1,
4658
+ DrawerTrigger as a2,
4659
+ FileUpload as a3,
4660
+ Form as a4,
4661
+ FormControl as a5,
4662
+ FormDescription as a6,
4663
+ FormField as a7,
4664
+ FormItem as a8,
4665
+ FormLabel as a9,
4666
+ MenubarTrigger as aA,
4667
+ NavigationMenu as aB,
4668
+ NavigationMenuContent as aC,
4669
+ NavigationMenuIndicator as aD,
4670
+ NavigationMenuItem as aE,
4671
+ NavigationMenuLink as aF,
4672
+ NavigationMenuList as aG,
4673
+ NavigationMenuTrigger as aH,
4674
+ NavigationMenuViewport as aI,
4675
+ NotificationBadge as aJ,
4676
+ Pagination as aK,
4677
+ PaginationContent as aL,
4678
+ PaginationEllipsis as aM,
4679
+ PaginationItem as aN,
4680
+ PaginationLink as aO,
4681
+ PaginationNext as aP,
4682
+ PaginationPrevious as aQ,
4683
+ PieMetricChart as aR,
4684
+ RadarMetricChart as aS,
4685
+ RadialBarMetricChart as aT,
4686
+ Rating as aU,
4687
+ ResizableHandle as aV,
4688
+ ResizablePanel as aW,
4689
+ ResizablePanelGroup as aX,
4690
+ RouteMap as aY,
4691
+ Search as aZ,
4692
+ Sheet as a_,
4693
+ FormMessage as aa,
4694
+ GaugeChart as ab,
4695
+ HorizontalBarChart as ac,
4696
+ HoverCard as ad,
4697
+ HoverCardContent as ae,
4698
+ HoverCardTrigger as af,
4699
+ InputOTP as ag,
4700
+ InputOTPGroup as ah,
4701
+ InputOTPSeparator as ai,
4702
+ InputOTPSlot as aj,
4703
+ InteractiveTimeSeriesChart as ak,
4704
+ Menubar as al,
4705
+ MenubarCheckboxItem as am,
4706
+ MenubarContent as an,
4707
+ MenubarGroup as ao,
4708
+ MenubarItem as ap,
4709
+ MenubarLabel as aq,
4710
+ MenubarMenu as ar,
4711
+ MenubarPortal as as,
4712
+ MenubarRadioGroup as at,
4713
+ MenubarRadioItem as au,
4714
+ MenubarSeparator as av,
4715
+ MenubarShortcut as aw,
4716
+ MenubarSub as ax,
4717
+ MenubarSubContent as ay,
4718
+ MenubarSubTrigger as az,
4719
+ AccordionItem as b,
4720
+ SheetClose as b0,
4721
+ SheetContent as b1,
4722
+ SheetDescription as b2,
4723
+ SheetFooter as b3,
4724
+ SheetHeader as b4,
4725
+ SheetPortal as b5,
4726
+ SheetTitle as b6,
4727
+ SheetTrigger as b7,
4728
+ SimpleMap as b8,
4729
+ Skeleton as b9,
4730
+ navigationMenuTriggerStyle as bA,
4731
+ toggleVariants as bB,
4732
+ useFormField as bC,
4733
+ useStepperContext as bD,
4734
+ SparklineChart as ba,
4735
+ StatsCard as bb,
4736
+ Step as bc,
4737
+ Stepper as bd,
4738
+ Timeline as be,
4739
+ TimelineContent as bf,
4740
+ TimelineDescription as bg,
4741
+ TimelineDot as bh,
4742
+ TimelineHeading as bi,
4743
+ TimelineItem as bj,
4744
+ TimelineTime as bk,
4745
+ Toggle as bl,
4746
+ ToggleGroup as bm,
4747
+ ToggleGroupItem as bn,
4748
+ TreeView as bo,
4749
+ buildChartConfig as bp,
4750
+ defaultFilterData as bq,
4751
+ formatTick as br,
4752
+ getBarSize as bs,
4753
+ getChartConfigWithColors as bt,
4754
+ getChartSeries as bu,
4755
+ getChartState as bv,
4756
+ getErrorDescription as bw,
4757
+ getSeriesColor as bx,
4758
+ hasChartData as by,
4759
+ hasPieData as bz,
4760
+ AccordionTrigger as c,
4761
+ AreaGradientDefs as d,
4762
+ AspectRatio as e,
4763
+ AssistantChart as f,
4764
+ CalendarDayButton as g,
4765
+ Carousel as h,
4766
+ CarouselContent as i,
4767
+ CarouselItem as j,
4768
+ CarouselNext as k,
4769
+ CarouselPrevious as l,
4770
+ ChartCard as m,
4771
+ Collapsible as n,
4772
+ CollapsibleContent as o,
4773
+ CollapsibleTrigger as p,
4774
+ ComboMetricChart as q,
4775
+ Command as r,
4776
+ CommandDialog as s,
4777
+ CommandEmpty as t,
4778
+ CommandGroup as u,
4779
+ CommandInput as v,
4780
+ CommandItem as w,
4781
+ CommandList as x,
4782
+ CommandSeparator as y,
4783
+ CommandShortcut as z
4784
+ };