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,3503 @@
1
+ "use strict";
2
+ const jsxRuntime = require("react/jsx-runtime");
3
+ const AspectRatioPrimitive = require("@radix-ui/react-aspect-ratio");
4
+ const lucideReact = require("lucide-react");
5
+ const React = require("react");
6
+ const button = require("./button-Bnv9SvYK.cjs");
7
+ const NavigationMenuPrimitive = require("@radix-ui/react-navigation-menu");
8
+ const classVarianceAuthority = require("class-variance-authority");
9
+ const ToggleGroupPrimitive = require("@radix-ui/react-toggle-group");
10
+ const TogglePrimitive = require("@radix-ui/react-toggle");
11
+ const inputOtp = require("input-otp");
12
+ const reactSlot = require("@radix-ui/react-slot");
13
+ const reactHookForm = require("react-hook-form");
14
+ const alertDialog = require("./alert-dialog-BtEuQqrg.cjs");
15
+ const reactDayPicker = require("react-day-picker");
16
+ const DialogPrimitive = require("@radix-ui/react-dialog");
17
+ const vaul = require("vaul");
18
+ const HoverCardPrimitive = require("@radix-ui/react-hover-card");
19
+ const ContextMenuPrimitive = require("@radix-ui/react-context-menu");
20
+ const MenubarPrimitive = require("@radix-ui/react-menubar");
21
+ const cmdk = require("cmdk");
22
+ const richTextEditor = require("./rich-text-editor-bRkNoeZY.cjs");
23
+ const skeleton = require("./skeleton-4zoHiFJ_.cjs");
24
+ const CollapsiblePrimitive = require("@radix-ui/react-collapsible");
25
+ const AccordionPrimitive = require("@radix-ui/react-accordion");
26
+ const useEmblaCarousel = require("embla-carousel-react");
27
+ const googleMapsLoader = require("./google-maps-loader-BKcdgFbu.cjs");
28
+ const RechartsPrimitive = require("recharts");
29
+ var _documentCurrentScript = typeof document !== "undefined" ? document.currentScript : null;
30
+ function _interopNamespaceDefault(e) {
31
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
32
+ if (e) {
33
+ for (const k in e) {
34
+ if (k !== "default") {
35
+ const d = Object.getOwnPropertyDescriptor(e, k);
36
+ Object.defineProperty(n, k, d.get ? d : {
37
+ enumerable: true,
38
+ get: () => e[k]
39
+ });
40
+ }
41
+ }
42
+ }
43
+ n.default = e;
44
+ return Object.freeze(n);
45
+ }
46
+ const AspectRatioPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(AspectRatioPrimitive);
47
+ const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
48
+ const NavigationMenuPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(NavigationMenuPrimitive);
49
+ const ToggleGroupPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(ToggleGroupPrimitive);
50
+ const TogglePrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(TogglePrimitive);
51
+ const DialogPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(DialogPrimitive);
52
+ const HoverCardPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(HoverCardPrimitive);
53
+ const ContextMenuPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(ContextMenuPrimitive);
54
+ const MenubarPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(MenubarPrimitive);
55
+ const CollapsiblePrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(CollapsiblePrimitive);
56
+ const AccordionPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(AccordionPrimitive);
57
+ function AspectRatio({ ...props }) {
58
+ return /* @__PURE__ */ jsxRuntime.jsx(AspectRatioPrimitive__namespace.Root, { "data-slot": "aspect-ratio", ...props });
59
+ }
60
+ const ResizableContext = React__namespace.createContext(null);
61
+ const ResizablePanelGroup = ({
62
+ children,
63
+ className,
64
+ direction = "horizontal",
65
+ id,
66
+ autoSaveId,
67
+ storage,
68
+ onLayout,
69
+ ...props
70
+ }) => {
71
+ const [panels, setPanels] = React__namespace.useState(/* @__PURE__ */ new Map());
72
+ const [handles, setHandles] = React__namespace.useState(/* @__PURE__ */ new Map());
73
+ const [sizes, setSizes] = React__namespace.useState(/* @__PURE__ */ new Map());
74
+ const [isDragging, setIsDragging] = React__namespace.useState(false);
75
+ const containerRef = React__namespace.useRef(null);
76
+ const getSortedItems = React__namespace.useCallback(
77
+ (items) => {
78
+ if (!containerRef.current) return [];
79
+ return Array.from(items.values()).sort((a, b) => {
80
+ if (!a.ref.current || !b.ref.current) return 0;
81
+ const position = a.ref.current.compareDocumentPosition(b.ref.current);
82
+ if (position & Node.DOCUMENT_POSITION_FOLLOWING) return -1;
83
+ if (position & Node.DOCUMENT_POSITION_PRECEDING) return 1;
84
+ return 0;
85
+ });
86
+ },
87
+ []
88
+ );
89
+ React__namespace.useEffect(() => {
90
+ const sortedPanels = getSortedItems(panels);
91
+ if (sortedPanels.length === 0) return;
92
+ const uninitialized = sortedPanels.some((p) => !sizes.has(p.id));
93
+ if (uninitialized) {
94
+ const newSizes = new Map(sizes);
95
+ const remainingSpace = 100;
96
+ const defaultSizeCount = sortedPanels.filter((p) => p.defaultSize).length;
97
+ let usedSpace = 0;
98
+ sortedPanels.forEach((p) => {
99
+ if (p.defaultSize) usedSpace += p.defaultSize;
100
+ });
101
+ const spaceForOthers = Math.max(0, remainingSpace - usedSpace);
102
+ const countOthers = sortedPanels.length - defaultSizeCount;
103
+ const sizeForOthers = countOthers > 0 ? spaceForOthers / countOthers : 0;
104
+ sortedPanels.forEach((p) => {
105
+ if (!newSizes.has(p.id)) {
106
+ newSizes.set(p.id, p.defaultSize ?? sizeForOthers);
107
+ }
108
+ });
109
+ setSizes(newSizes);
110
+ }
111
+ }, [panels, sizes, getSortedItems]);
112
+ const registerPanel = React__namespace.useCallback((data) => {
113
+ setPanels((prev) => {
114
+ const next = new Map(prev);
115
+ next.set(data.id, data);
116
+ return next;
117
+ });
118
+ }, []);
119
+ const unregisterPanel = React__namespace.useCallback((id2) => {
120
+ setPanels((prev) => {
121
+ const next = new Map(prev);
122
+ next.delete(id2);
123
+ return next;
124
+ });
125
+ setSizes((prev) => {
126
+ const next = new Map(prev);
127
+ next.delete(id2);
128
+ return next;
129
+ });
130
+ }, []);
131
+ const registerHandle = React__namespace.useCallback((data) => {
132
+ setHandles((prev) => {
133
+ const next = new Map(prev);
134
+ next.set(data.id, data);
135
+ return next;
136
+ });
137
+ }, []);
138
+ const unregisterHandle = React__namespace.useCallback((id2) => {
139
+ setHandles((prev) => {
140
+ const next = new Map(prev);
141
+ next.delete(id2);
142
+ return next;
143
+ });
144
+ }, []);
145
+ const startDragging = React__namespace.useCallback(
146
+ (handleId, event) => {
147
+ event.preventDefault();
148
+ setIsDragging(true);
149
+ const sortedPanels = getSortedItems(panels);
150
+ const sortedHandles = getSortedItems(handles);
151
+ const handleIndex = sortedHandles.findIndex((h) => h.id === handleId);
152
+ if (handleIndex === -1) return;
153
+ const leftPanel = sortedPanels[handleIndex];
154
+ const rightPanel = sortedPanels[handleIndex + 1];
155
+ if (!leftPanel || !rightPanel) return;
156
+ const startX = "touches" in event ? event.touches[0].clientX : event.clientX;
157
+ const startY = "touches" in event ? event.touches[0].clientY : event.clientY;
158
+ const startSizeLeft = sizes.get(leftPanel.id) || 0;
159
+ const startSizeRight = sizes.get(rightPanel.id) || 0;
160
+ const containerSize = direction === "horizontal" ? containerRef.current?.offsetWidth || 1 : containerRef.current?.offsetHeight || 1;
161
+ const onMove = (e) => {
162
+ const currentX = "touches" in e ? e.touches[0].clientX : e.clientX;
163
+ const currentY = "touches" in e ? e.touches[0].clientY : e.clientY;
164
+ const deltaPixels = direction === "horizontal" ? currentX - startX : currentY - startY;
165
+ const deltaPercent = deltaPixels / containerSize * 100;
166
+ let finalLeft = startSizeLeft + deltaPercent;
167
+ let finalRight = startSizeRight - deltaPercent;
168
+ if (leftPanel.minSize !== void 0 && finalLeft < leftPanel.minSize) {
169
+ const diff = leftPanel.minSize - finalLeft;
170
+ finalLeft = leftPanel.minSize;
171
+ finalRight -= diff;
172
+ }
173
+ if (rightPanel.minSize !== void 0 && finalRight < rightPanel.minSize) {
174
+ const diff = rightPanel.minSize - finalRight;
175
+ finalRight = rightPanel.minSize;
176
+ finalLeft -= diff;
177
+ }
178
+ if (leftPanel.maxSize !== void 0 && finalLeft > leftPanel.maxSize) {
179
+ const diff = finalLeft - leftPanel.maxSize;
180
+ finalLeft = leftPanel.maxSize;
181
+ finalRight += diff;
182
+ }
183
+ if (rightPanel.maxSize !== void 0 && finalRight > rightPanel.maxSize) {
184
+ const diff = finalRight - rightPanel.maxSize;
185
+ finalRight = rightPanel.maxSize;
186
+ finalLeft -= diff;
187
+ }
188
+ finalLeft = Math.max(0, Math.min(100, finalLeft));
189
+ finalRight = Math.max(0, Math.min(100, finalRight));
190
+ setSizes((prev) => {
191
+ const next = new Map(prev);
192
+ next.set(leftPanel.id, finalLeft);
193
+ next.set(rightPanel.id, finalRight);
194
+ return next;
195
+ });
196
+ leftPanel.onResize?.(finalLeft);
197
+ rightPanel.onResize?.(finalRight);
198
+ };
199
+ const onUp = () => {
200
+ setIsDragging(false);
201
+ window.removeEventListener("mousemove", onMove);
202
+ window.removeEventListener("mouseup", onUp);
203
+ window.removeEventListener("touchmove", onMove);
204
+ window.removeEventListener("touchend", onUp);
205
+ if (onLayout) {
206
+ onLayout(sortedPanels.map((p) => sizes.get(p.id) || 0));
207
+ }
208
+ };
209
+ window.addEventListener("mousemove", onMove);
210
+ window.addEventListener("mouseup", onUp);
211
+ window.addEventListener("touchmove", onMove);
212
+ window.addEventListener("touchend", onUp);
213
+ },
214
+ [panels, handles, sizes, direction, getSortedItems, onLayout]
215
+ );
216
+ const getPanelStyle = React__namespace.useCallback(
217
+ (id2) => {
218
+ const size = sizes.get(id2);
219
+ if (size === void 0) return { flex: "1 1 0%", overflow: "hidden" };
220
+ return { flex: `${size} 1 0%`, overflow: "hidden" };
221
+ },
222
+ [sizes]
223
+ );
224
+ const contextValue = React__namespace.useMemo(
225
+ () => ({
226
+ direction,
227
+ registerPanel,
228
+ unregisterPanel,
229
+ registerHandle,
230
+ unregisterHandle,
231
+ isDragging,
232
+ startDragging,
233
+ getPanelStyle
234
+ }),
235
+ [
236
+ direction,
237
+ registerPanel,
238
+ unregisterPanel,
239
+ registerHandle,
240
+ unregisterHandle,
241
+ isDragging,
242
+ startDragging,
243
+ getPanelStyle
244
+ ]
245
+ );
246
+ return /* @__PURE__ */ jsxRuntime.jsx(ResizableContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(
247
+ "div",
248
+ {
249
+ ref: containerRef,
250
+ "data-slot": "resizable-panel-group",
251
+ "data-panel-group-direction": direction,
252
+ className: button.cn(
253
+ "flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
254
+ className
255
+ ),
256
+ ...props,
257
+ children
258
+ }
259
+ ) });
260
+ };
261
+ const ResizablePanel = ({
262
+ className,
263
+ defaultSize,
264
+ minSize = 0,
265
+ maxSize = 100,
266
+ collapsible,
267
+ collapsedSize,
268
+ onCollapse,
269
+ onExpand,
270
+ onResize,
271
+ order,
272
+ tagName,
273
+ id: propId,
274
+ children,
275
+ ...props
276
+ }) => {
277
+ const context = React__namespace.useContext(ResizableContext);
278
+ const ref = React__namespace.useRef(null);
279
+ const [generatedId] = React__namespace.useState(() => Math.random().toString(36).substr(2, 9));
280
+ const id = propId || generatedId;
281
+ const registerPanel = context?.registerPanel;
282
+ const unregisterPanel = context?.unregisterPanel;
283
+ React__namespace.useLayoutEffect(() => {
284
+ if (!registerPanel || !unregisterPanel) return;
285
+ registerPanel({
286
+ id,
287
+ ref,
288
+ defaultSize,
289
+ minSize,
290
+ maxSize,
291
+ collapsible,
292
+ onCollapse,
293
+ onExpand,
294
+ onResize
295
+ });
296
+ return () => unregisterPanel(id);
297
+ }, [
298
+ registerPanel,
299
+ unregisterPanel,
300
+ id,
301
+ defaultSize,
302
+ minSize,
303
+ maxSize,
304
+ collapsible,
305
+ onCollapse,
306
+ onExpand,
307
+ onResize
308
+ ]);
309
+ if (!context) {
310
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: button.cn("flex-1", className), ...props, children });
311
+ }
312
+ return /* @__PURE__ */ jsxRuntime.jsx(
313
+ "div",
314
+ {
315
+ ref,
316
+ "data-slot": "resizable-panel",
317
+ className: button.cn("relative transition-[flex-grow] duration-0", className),
318
+ style: context.getPanelStyle(id),
319
+ ...props,
320
+ children
321
+ }
322
+ );
323
+ };
324
+ const ResizableHandle = ({
325
+ withHandle,
326
+ className,
327
+ id: propId,
328
+ tagName,
329
+ ...props
330
+ }) => {
331
+ const context = React__namespace.useContext(ResizableContext);
332
+ const ref = React__namespace.useRef(null);
333
+ const [generatedId] = React__namespace.useState(() => Math.random().toString(36).substr(2, 9));
334
+ const id = propId || generatedId;
335
+ const registerHandle = context?.registerHandle;
336
+ const unregisterHandle = context?.unregisterHandle;
337
+ React__namespace.useLayoutEffect(() => {
338
+ if (!registerHandle || !unregisterHandle) return;
339
+ registerHandle({ id, ref });
340
+ return () => unregisterHandle(id);
341
+ }, [registerHandle, unregisterHandle, id]);
342
+ const handleMouseDown = (e) => {
343
+ if (context) {
344
+ context.startDragging(id, e);
345
+ }
346
+ };
347
+ if (!context) return null;
348
+ return /* @__PURE__ */ jsxRuntime.jsx(
349
+ "div",
350
+ {
351
+ ref,
352
+ "data-slot": "resizable-handle",
353
+ className: button.cn(
354
+ "bg-border relative flex items-center justify-center focus-visible:outline-hidden",
355
+ "touch-none select-none",
356
+ 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",
357
+ "after:absolute after:z-10",
358
+ className
359
+ ),
360
+ onMouseDown: handleMouseDown,
361
+ onTouchStart: handleMouseDown,
362
+ ...props,
363
+ children: withHandle && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.GripVerticalIcon, { className: "size-2.5" }) })
364
+ }
365
+ );
366
+ };
367
+ function NavigationMenu({
368
+ className,
369
+ children,
370
+ viewport = true,
371
+ ...props
372
+ }) {
373
+ return /* @__PURE__ */ jsxRuntime.jsxs(
374
+ NavigationMenuPrimitive__namespace.Root,
375
+ {
376
+ "data-slot": "navigation-menu",
377
+ className: button.cn("relative z-10 flex w-full flex-1 items-center justify-center", className),
378
+ ...props,
379
+ children: [
380
+ children,
381
+ viewport && /* @__PURE__ */ jsxRuntime.jsx(NavigationMenuViewport, {})
382
+ ]
383
+ }
384
+ );
385
+ }
386
+ function NavigationMenuList({
387
+ className,
388
+ ...props
389
+ }) {
390
+ return /* @__PURE__ */ jsxRuntime.jsx(
391
+ NavigationMenuPrimitive__namespace.List,
392
+ {
393
+ "data-slot": "navigation-menu-list",
394
+ className: button.cn("group flex flex-1 list-none items-center justify-center gap-1", className),
395
+ ...props
396
+ }
397
+ );
398
+ }
399
+ function NavigationMenuItem({
400
+ className,
401
+ ...props
402
+ }) {
403
+ return /* @__PURE__ */ jsxRuntime.jsx(
404
+ NavigationMenuPrimitive__namespace.Item,
405
+ {
406
+ "data-slot": "navigation-menu-item",
407
+ className: button.cn("relative", className),
408
+ ...props
409
+ }
410
+ );
411
+ }
412
+ const navigationMenuTriggerStyle = classVarianceAuthority.cva(
413
+ "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"
414
+ );
415
+ function NavigationMenuTrigger({
416
+ className,
417
+ children,
418
+ ...props
419
+ }) {
420
+ return /* @__PURE__ */ jsxRuntime.jsxs(
421
+ NavigationMenuPrimitive__namespace.Trigger,
422
+ {
423
+ "data-slot": "navigation-menu-trigger",
424
+ className: button.cn(navigationMenuTriggerStyle(), "group", className),
425
+ ...props,
426
+ children: [
427
+ children,
428
+ " ",
429
+ /* @__PURE__ */ jsxRuntime.jsx(
430
+ lucideReact.ChevronDownIcon,
431
+ {
432
+ className: "relative top-[1px] ml-1 size-3 group-data-[state=open]:rotate-180",
433
+ "aria-hidden": "true"
434
+ }
435
+ )
436
+ ]
437
+ }
438
+ );
439
+ }
440
+ function NavigationMenuContent({
441
+ className,
442
+ ...props
443
+ }) {
444
+ return /* @__PURE__ */ jsxRuntime.jsx(
445
+ NavigationMenuPrimitive__namespace.Content,
446
+ {
447
+ "data-slot": "navigation-menu-content",
448
+ className: button.cn("left-0 top-0 w-full md:w-auto", className),
449
+ ...props
450
+ }
451
+ );
452
+ }
453
+ function NavigationMenuViewport({
454
+ className,
455
+ ...props
456
+ }) {
457
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: button.cn("absolute left-0 top-full flex justify-center w-full"), children: /* @__PURE__ */ jsxRuntime.jsx(
458
+ NavigationMenuPrimitive__namespace.Viewport,
459
+ {
460
+ "data-slot": "navigation-menu-viewport",
461
+ className: button.cn(
462
+ "origin-top-center relative mt-1.5 overflow-hidden rounded-[var(--radius)] border border-border bg-popover text-popover-foreground shadow-lg",
463
+ className
464
+ ),
465
+ ...props
466
+ }
467
+ ) });
468
+ }
469
+ function NavigationMenuLink({
470
+ className,
471
+ ...props
472
+ }) {
473
+ return /* @__PURE__ */ jsxRuntime.jsx(
474
+ NavigationMenuPrimitive__namespace.Link,
475
+ {
476
+ "data-slot": "navigation-menu-link",
477
+ className: button.cn(
478
+ "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",
479
+ className
480
+ ),
481
+ ...props
482
+ }
483
+ );
484
+ }
485
+ function NavigationMenuIndicator({
486
+ className,
487
+ ...props
488
+ }) {
489
+ return /* @__PURE__ */ jsxRuntime.jsx(
490
+ NavigationMenuPrimitive__namespace.Indicator,
491
+ {
492
+ "data-slot": "navigation-menu-indicator",
493
+ className: button.cn(
494
+ "top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden",
495
+ className
496
+ ),
497
+ ...props,
498
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md" })
499
+ }
500
+ );
501
+ }
502
+ function Pagination({ className, ...props }) {
503
+ return /* @__PURE__ */ jsxRuntime.jsx(
504
+ "nav",
505
+ {
506
+ role: "navigation",
507
+ "aria-label": "pagination",
508
+ "data-slot": "pagination",
509
+ className: button.cn("mx-auto flex w-full justify-center", className),
510
+ ...props
511
+ }
512
+ );
513
+ }
514
+ function PaginationContent({ className, ...props }) {
515
+ return /* @__PURE__ */ jsxRuntime.jsx(
516
+ "ul",
517
+ {
518
+ "data-slot": "pagination-content",
519
+ className: button.cn("flex flex-row items-center gap-1", className),
520
+ ...props
521
+ }
522
+ );
523
+ }
524
+ function PaginationItem({ ...props }) {
525
+ return /* @__PURE__ */ jsxRuntime.jsx("li", { "data-slot": "pagination-item", ...props });
526
+ }
527
+ function PaginationLink({
528
+ className,
529
+ isActive,
530
+ disabled,
531
+ size = "icon",
532
+ href,
533
+ ...props
534
+ }) {
535
+ return /* @__PURE__ */ jsxRuntime.jsx(
536
+ "a",
537
+ {
538
+ "aria-current": isActive ? "page" : void 0,
539
+ "aria-disabled": disabled || void 0,
540
+ tabIndex: disabled ? -1 : void 0,
541
+ "data-slot": "pagination-link",
542
+ "data-active": isActive,
543
+ href: disabled ? void 0 : href ?? "#",
544
+ className: button.cn(
545
+ button.buttonVariants({
546
+ variant: isActive ? "outline" : "ghost",
547
+ size
548
+ }),
549
+ disabled && "pointer-events-none opacity-50",
550
+ className
551
+ ),
552
+ ...props
553
+ }
554
+ );
555
+ }
556
+ function PaginationPrevious({
557
+ className,
558
+ disabled,
559
+ ...props
560
+ }) {
561
+ return /* @__PURE__ */ jsxRuntime.jsxs(
562
+ PaginationLink,
563
+ {
564
+ "aria-label": "Go to previous page",
565
+ size: "default",
566
+ disabled,
567
+ className: button.cn("gap-1 px-2.5 sm:pl-2.5", className),
568
+ ...props,
569
+ children: [
570
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeftIcon, {}),
571
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden sm:block", children: "Previous" })
572
+ ]
573
+ }
574
+ );
575
+ }
576
+ function PaginationNext({
577
+ className,
578
+ disabled,
579
+ ...props
580
+ }) {
581
+ return /* @__PURE__ */ jsxRuntime.jsxs(
582
+ PaginationLink,
583
+ {
584
+ "aria-label": "Go to next page",
585
+ size: "default",
586
+ disabled,
587
+ className: button.cn("gap-1 px-2.5 sm:pr-2.5", className),
588
+ ...props,
589
+ children: [
590
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden sm:block", children: "Next" }),
591
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRightIcon, {})
592
+ ]
593
+ }
594
+ );
595
+ }
596
+ function PaginationEllipsis({ className, ...props }) {
597
+ return /* @__PURE__ */ jsxRuntime.jsxs(
598
+ "span",
599
+ {
600
+ "aria-hidden": true,
601
+ "data-slot": "pagination-ellipsis",
602
+ className: button.cn("flex size-9 items-center justify-center", className),
603
+ ...props,
604
+ children: [
605
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MoreHorizontalIcon, { className: "size-4" }),
606
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "More pages" })
607
+ ]
608
+ }
609
+ );
610
+ }
611
+ function usePagination({
612
+ totalItems,
613
+ pageSize = 10,
614
+ initialPage = 1,
615
+ page: controlledPage,
616
+ onPageChange,
617
+ siblingCount = 1
618
+ }) {
619
+ const [internalPage, setInternalPage] = React.useState(initialPage);
620
+ const isControlled = controlledPage !== void 0;
621
+ const currentPage = isControlled ? controlledPage : internalPage;
622
+ const totalPages = Math.max(1, Math.ceil(totalItems / pageSize));
623
+ const setPage = React.useCallback(
624
+ (p) => {
625
+ const clamped = Math.min(Math.max(1, p), totalPages);
626
+ if (!isControlled) setInternalPage(clamped);
627
+ onPageChange?.(clamped);
628
+ },
629
+ [isControlled, onPageChange, totalPages]
630
+ );
631
+ const startIndex = (currentPage - 1) * pageSize;
632
+ const endIndex = Math.min(startIndex + pageSize, totalItems);
633
+ const canGoPrev = currentPage > 1;
634
+ const canGoNext = currentPage < totalPages;
635
+ const isFirstPage = currentPage === 1;
636
+ const isLastPage = currentPage === totalPages;
637
+ const items = React.useMemo(() => {
638
+ const pageSet = /* @__PURE__ */ new Set();
639
+ pageSet.add(1);
640
+ if (totalPages > 1) pageSet.add(totalPages);
641
+ for (let p = Math.max(2, currentPage - siblingCount); p <= Math.min(totalPages - 1, currentPage + siblingCount); p++) {
642
+ pageSet.add(p);
643
+ }
644
+ const sorted = Array.from(pageSet).sort((a, b) => a - b);
645
+ const result = [];
646
+ for (let i = 0; i < sorted.length; i++) {
647
+ result.push({ type: "page", page: sorted[i] });
648
+ if (i < sorted.length - 1 && sorted[i + 1] - sorted[i] > 1) {
649
+ result.push({ type: "ellipsis", key: `ellipsis-${sorted[i]}` });
650
+ }
651
+ }
652
+ return result;
653
+ }, [currentPage, siblingCount, totalPages]);
654
+ const goTo = React.useCallback((p) => setPage(p), [setPage]);
655
+ const next = React.useCallback(() => setPage(currentPage + 1), [currentPage, setPage]);
656
+ const prev = React.useCallback(() => setPage(currentPage - 1), [currentPage, setPage]);
657
+ const first = React.useCallback(() => setPage(1), [setPage]);
658
+ const last = React.useCallback(() => setPage(totalPages), [setPage, totalPages]);
659
+ return {
660
+ currentPage,
661
+ totalPages,
662
+ startIndex,
663
+ endIndex,
664
+ canGoPrev,
665
+ canGoNext,
666
+ isFirstPage,
667
+ isLastPage,
668
+ items,
669
+ goTo,
670
+ next,
671
+ prev,
672
+ first,
673
+ last
674
+ };
675
+ }
676
+ const toggleVariants = classVarianceAuthority.cva(
677
+ "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",
678
+ {
679
+ variants: {
680
+ variant: {
681
+ default: "bg-transparent",
682
+ outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"
683
+ },
684
+ size: {
685
+ default: "h-9 px-2 min-w-9",
686
+ sm: "h-8 px-1.5 min-w-8",
687
+ lg: "h-10 px-2.5 min-w-10"
688
+ }
689
+ },
690
+ defaultVariants: {
691
+ variant: "default",
692
+ size: "default"
693
+ }
694
+ }
695
+ );
696
+ const Toggle = React__namespace.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
697
+ TogglePrimitive__namespace.Root,
698
+ {
699
+ ref,
700
+ "data-slot": "toggle",
701
+ className: button.cn(toggleVariants({ variant, size, className })),
702
+ ...props
703
+ }
704
+ ));
705
+ Toggle.displayName = TogglePrimitive__namespace.Root.displayName;
706
+ const ToggleGroupContext = React__namespace.createContext({
707
+ size: "default",
708
+ variant: "default"
709
+ });
710
+ const ToggleGroup = React__namespace.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
711
+ ToggleGroupPrimitive__namespace.Root,
712
+ {
713
+ ref,
714
+ "data-slot": "toggle-group",
715
+ "data-variant": variant,
716
+ "data-size": size,
717
+ className: button.cn(
718
+ "group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",
719
+ className
720
+ ),
721
+ ...props,
722
+ children: /* @__PURE__ */ jsxRuntime.jsx(ToggleGroupContext.Provider, { value: { variant, size }, children })
723
+ }
724
+ ));
725
+ ToggleGroup.displayName = ToggleGroupPrimitive__namespace.Root.displayName;
726
+ const ToggleGroupItem = React__namespace.forwardRef(({ className, children, variant, size, ...props }, ref) => {
727
+ const context = React__namespace.useContext(ToggleGroupContext);
728
+ return /* @__PURE__ */ jsxRuntime.jsx(
729
+ ToggleGroupPrimitive__namespace.Item,
730
+ {
731
+ ref,
732
+ "data-slot": "toggle-group-item",
733
+ "data-variant": context.variant || variant,
734
+ "data-size": context.size || size,
735
+ className: button.cn(
736
+ toggleVariants({
737
+ variant: context.variant || variant,
738
+ size: context.size || size
739
+ }),
740
+ "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",
741
+ className
742
+ ),
743
+ ...props,
744
+ children
745
+ }
746
+ );
747
+ });
748
+ ToggleGroupItem.displayName = ToggleGroupPrimitive__namespace.Item.displayName;
749
+ function InputOTP({
750
+ className,
751
+ containerClassName,
752
+ ...props
753
+ }) {
754
+ return /* @__PURE__ */ jsxRuntime.jsx(
755
+ inputOtp.OTPInput,
756
+ {
757
+ "data-slot": "input-otp",
758
+ containerClassName: button.cn("flex items-center gap-2 has-disabled:opacity-50", containerClassName),
759
+ className: button.cn("disabled:cursor-not-allowed", className),
760
+ ...props
761
+ }
762
+ );
763
+ }
764
+ function InputOTPGroup({ className, ...props }) {
765
+ return /* @__PURE__ */ jsxRuntime.jsx(
766
+ "div",
767
+ {
768
+ "data-slot": "input-otp-group",
769
+ className: button.cn("flex items-center gap-1", className),
770
+ ...props
771
+ }
772
+ );
773
+ }
774
+ function InputOTPSlot({
775
+ index,
776
+ className,
777
+ size = "md",
778
+ ...props
779
+ }) {
780
+ const inputOTPContext = React__namespace.useContext(inputOtp.OTPInputContext);
781
+ const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
782
+ const sizeClasses = {
783
+ sm: "h-8 w-8 text-sm",
784
+ md: "h-10 w-10 text-base",
785
+ lg: "h-12 w-12 text-lg"
786
+ };
787
+ return /* @__PURE__ */ jsxRuntime.jsxs(
788
+ "div",
789
+ {
790
+ "data-slot": "input-otp-slot",
791
+ "data-active": isActive,
792
+ className: button.cn(
793
+ "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",
794
+ sizeClasses[size],
795
+ className
796
+ ),
797
+ ...props,
798
+ children: [
799
+ char,
800
+ hasFakeCaret && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "animate-caret-blink bg-foreground h-4 w-px duration-1000" }) })
801
+ ]
802
+ }
803
+ );
804
+ }
805
+ function InputOTPSeparator({ ...props }) {
806
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "input-otp-separator", role: "separator", ...props, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MinusIcon, {}) });
807
+ }
808
+ const Form = reactHookForm.FormProvider;
809
+ const FormFieldContext = React__namespace.createContext({});
810
+ const FormField = ({
811
+ ...props
812
+ }) => {
813
+ return /* @__PURE__ */ jsxRuntime.jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsxRuntime.jsx(reactHookForm.Controller, { ...props }) });
814
+ };
815
+ const useFormField = () => {
816
+ const fieldContext = React__namespace.useContext(FormFieldContext);
817
+ const itemContext = React__namespace.useContext(FormItemContext);
818
+ const { getFieldState } = reactHookForm.useFormContext();
819
+ const formState = reactHookForm.useFormState({ name: fieldContext.name });
820
+ const fieldState = getFieldState(fieldContext.name, formState);
821
+ if (!fieldContext) {
822
+ throw new Error("useFormField should be used within <FormField>");
823
+ }
824
+ const { id } = itemContext;
825
+ return {
826
+ id,
827
+ name: fieldContext.name,
828
+ formItemId: `${id}-form-item`,
829
+ formDescriptionId: `${id}-form-item-description`,
830
+ formMessageId: `${id}-form-item-message`,
831
+ ...fieldState
832
+ };
833
+ };
834
+ const FormItemContext = React__namespace.createContext({});
835
+ function FormItem({ className, ...props }) {
836
+ const id = React__namespace.useId();
837
+ return /* @__PURE__ */ jsxRuntime.jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "form-item", className: button.cn("grid gap-2", className), ...props }) });
838
+ }
839
+ function FormLabel({ className, ...props }) {
840
+ const { error, formItemId } = useFormField();
841
+ return /* @__PURE__ */ jsxRuntime.jsx(
842
+ alertDialog.Label,
843
+ {
844
+ "data-slot": "form-label",
845
+ "data-error": !!error,
846
+ className: button.cn("data-[error=true]:text-destructive", className),
847
+ htmlFor: formItemId,
848
+ ...props
849
+ }
850
+ );
851
+ }
852
+ function FormControl({ ...props }) {
853
+ const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
854
+ return /* @__PURE__ */ jsxRuntime.jsx(
855
+ reactSlot.Slot,
856
+ {
857
+ "data-slot": "form-control",
858
+ id: formItemId,
859
+ "aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
860
+ "aria-invalid": !!error,
861
+ ...props
862
+ }
863
+ );
864
+ }
865
+ function FormDescription({ className, ...props }) {
866
+ const { formDescriptionId } = useFormField();
867
+ return /* @__PURE__ */ jsxRuntime.jsx(
868
+ "p",
869
+ {
870
+ "data-slot": "form-description",
871
+ id: formDescriptionId,
872
+ className: button.cn("text-muted-foreground text-sm", className),
873
+ ...props
874
+ }
875
+ );
876
+ }
877
+ function FormMessage({ className, ...props }) {
878
+ const { error, formMessageId } = useFormField();
879
+ const body = error ? String(error?.message ?? "") : props.children;
880
+ if (!body) {
881
+ return null;
882
+ }
883
+ return /* @__PURE__ */ jsxRuntime.jsx(
884
+ "p",
885
+ {
886
+ "data-slot": "form-message",
887
+ id: formMessageId,
888
+ className: button.cn("text-destructive text-sm", className),
889
+ ...props,
890
+ children: body
891
+ }
892
+ );
893
+ }
894
+ function Calendar({
895
+ className,
896
+ classNames,
897
+ showOutsideDays = true,
898
+ captionLayout = "label",
899
+ buttonVariant = "ghost",
900
+ formatters,
901
+ components,
902
+ ...props
903
+ }) {
904
+ const defaultClassNames = reactDayPicker.getDefaultClassNames();
905
+ const isDropdownCaption = captionLayout.startsWith("dropdown");
906
+ return /* @__PURE__ */ jsxRuntime.jsx(
907
+ reactDayPicker.DayPicker,
908
+ {
909
+ showOutsideDays,
910
+ className: button.cn(
911
+ "bg-background group/calendar p-4 [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent font-sans",
912
+ String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
913
+ String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
914
+ className
915
+ ),
916
+ captionLayout,
917
+ formatters,
918
+ classNames: {
919
+ root: button.cn("w-fit", defaultClassNames.root),
920
+ months: button.cn("flex gap-6 flex-col md:flex-row relative", defaultClassNames.months),
921
+ month: button.cn("flex flex-col w-full gap-5", defaultClassNames.month),
922
+ nav: button.cn(
923
+ "flex items-center gap-2 w-full absolute top-0 inset-x-0 justify-between",
924
+ defaultClassNames.nav
925
+ ),
926
+ button_previous: button.cn(
927
+ button.buttonVariants({ variant: buttonVariant }),
928
+ "size-(--cell-size) aria-disabled:opacity-40 p-0 select-none hover:bg-accent/50 transition-colors duration-200",
929
+ defaultClassNames.button_previous
930
+ ),
931
+ button_next: button.cn(
932
+ button.buttonVariants({ variant: buttonVariant }),
933
+ "size-(--cell-size) aria-disabled:opacity-40 p-0 select-none hover:bg-accent/50 transition-colors duration-200",
934
+ defaultClassNames.button_next
935
+ ),
936
+ month_caption: button.cn(
937
+ "flex items-center justify-center w-full",
938
+ isDropdownCaption ? "h-auto px-0" : "h-(--cell-size) px-(--cell-size)",
939
+ defaultClassNames.month_caption
940
+ ),
941
+ dropdowns: button.cn(
942
+ "w-full flex items-center justify-center gap-2",
943
+ isDropdownCaption ? "h-auto" : "h-(--cell-size)",
944
+ defaultClassNames.dropdowns
945
+ ),
946
+ dropdown_root: button.cn(
947
+ 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",
948
+ defaultClassNames.dropdown_root
949
+ ),
950
+ dropdown: button.cn(
951
+ isDropdownCaption ? "absolute inset-0 cursor-pointer opacity-0" : "absolute bg-popover inset-0 opacity-0 cursor-pointer",
952
+ defaultClassNames.dropdown
953
+ ),
954
+ caption_label: button.cn(
955
+ "select-none font-[family-name:var(--font-family,Roboto)] tracking-tight transition-all duration-200",
956
+ 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",
957
+ defaultClassNames.caption_label
958
+ ),
959
+ table: "w-full border-collapse mt-1",
960
+ weekdays: button.cn("flex gap-1", defaultClassNames.weekdays),
961
+ weekday: button.cn(
962
+ "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",
963
+ defaultClassNames.weekday
964
+ ),
965
+ week: button.cn("flex w-full gap-1", defaultClassNames.week),
966
+ week_number_header: button.cn("select-none w-(--cell-size)", defaultClassNames.week_number_header),
967
+ week_number: button.cn(
968
+ "select-none text-muted-foreground text-[length:var(--calendar-weekday-size)]",
969
+ defaultClassNames.week_number
970
+ ),
971
+ day: button.cn(
972
+ "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",
973
+ props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)" : "[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)",
974
+ defaultClassNames.day
975
+ ),
976
+ range_start: button.cn(
977
+ "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",
978
+ defaultClassNames.range_start
979
+ ),
980
+ range_middle: button.cn("rounded-none bg-accent/30", defaultClassNames.range_middle),
981
+ range_end: button.cn(
982
+ "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",
983
+ defaultClassNames.range_end
984
+ ),
985
+ today: button.cn(
986
+ "bg-accent/60 text-accent-foreground rounded-(--cell-radius) data-[selected=true]:rounded-none font-[number:var(--font-weight-semibold)]",
987
+ defaultClassNames.today
988
+ ),
989
+ outside: button.cn(
990
+ "text-muted-foreground aria-selected:text-muted-foreground",
991
+ defaultClassNames.outside
992
+ ),
993
+ disabled: button.cn("text-muted-foreground/30 opacity-40", defaultClassNames.disabled),
994
+ hidden: button.cn("invisible", defaultClassNames.hidden),
995
+ ...classNames
996
+ },
997
+ components: {
998
+ Root: ({ className: className2, rootRef, ...props2 }) => {
999
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "calendar", ref: rootRef, className: button.cn(className2), ...props2 });
1000
+ },
1001
+ Chevron: ({ className: className2, orientation, ...props2 }) => {
1002
+ if (orientation === "left") {
1003
+ return /* @__PURE__ */ jsxRuntime.jsx(
1004
+ lucideReact.ChevronLeft,
1005
+ {
1006
+ className: button.cn("size-5 transition-transform group-hover:scale-110", className2),
1007
+ ...props2
1008
+ }
1009
+ );
1010
+ }
1011
+ if (orientation === "right") {
1012
+ return /* @__PURE__ */ jsxRuntime.jsx(
1013
+ lucideReact.ChevronRight,
1014
+ {
1015
+ className: button.cn("size-5 transition-transform group-hover:scale-110", className2),
1016
+ ...props2
1017
+ }
1018
+ );
1019
+ }
1020
+ return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: button.cn("size-4", className2), ...props2 });
1021
+ },
1022
+ DayButton: CalendarDayButton,
1023
+ WeekNumber: ({ children, ...props2 }) => {
1024
+ return /* @__PURE__ */ jsxRuntime.jsx("td", { ...props2, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex size-(--cell-size) items-center justify-center text-center font-[number:var(--font-weight-medium)]", children }) });
1025
+ },
1026
+ ...components
1027
+ },
1028
+ ...props
1029
+ }
1030
+ );
1031
+ }
1032
+ function CalendarDayButton({
1033
+ className,
1034
+ day,
1035
+ modifiers,
1036
+ ...props
1037
+ }) {
1038
+ const defaultClassNames = reactDayPicker.getDefaultClassNames();
1039
+ const ref = React__namespace.useRef(null);
1040
+ React__namespace.useEffect(() => {
1041
+ if (modifiers.focused) ref.current?.focus();
1042
+ }, [modifiers.focused]);
1043
+ return /* @__PURE__ */ jsxRuntime.jsx(
1044
+ button.Button,
1045
+ {
1046
+ ref,
1047
+ variant: "ghost",
1048
+ size: "icon",
1049
+ "data-day": day.date.toLocaleDateString(),
1050
+ "data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
1051
+ "data-range-start": modifiers.range_start,
1052
+ "data-range-end": modifiers.range_end,
1053
+ "data-range-middle": modifiers.range_middle,
1054
+ className: button.cn(
1055
+ "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",
1056
+ "text-[length:var(--calendar-day-size)] font-[number:var(--font-weight-regular)]",
1057
+ "hover:bg-accent/70 hover:text-accent-foreground hover:scale-105",
1058
+ "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",
1059
+ "data-[range-middle=true]:bg-accent/50 data-[range-middle=true]:text-foreground",
1060
+ "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",
1061
+ "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",
1062
+ "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",
1063
+ "data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-r-(--cell-radius)",
1064
+ "data-[range-middle=true]:rounded-none",
1065
+ "data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-l-(--cell-radius)",
1066
+ "[&>span]:opacity-80",
1067
+ defaultClassNames.day,
1068
+ className
1069
+ ),
1070
+ ...props,
1071
+ children: day.date.getDate()
1072
+ }
1073
+ );
1074
+ }
1075
+ function Sheet({ ...props }) {
1076
+ return /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Root, { "data-slot": "sheet", ...props });
1077
+ }
1078
+ function SheetTrigger({ ...props }) {
1079
+ return /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Trigger, { "data-slot": "sheet-trigger", ...props });
1080
+ }
1081
+ function SheetClose({ ...props }) {
1082
+ return /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Close, { "data-slot": "sheet-close", ...props });
1083
+ }
1084
+ function SheetPortal({ ...props }) {
1085
+ return /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Portal, { "data-slot": "sheet-portal", ...props });
1086
+ }
1087
+ const SheetOverlay = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1088
+ DialogPrimitive__namespace.Overlay,
1089
+ {
1090
+ className: button.cn(
1091
+ "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",
1092
+ className
1093
+ ),
1094
+ ...props,
1095
+ ref
1096
+ }
1097
+ ));
1098
+ SheetOverlay.displayName = DialogPrimitive__namespace.Overlay.displayName;
1099
+ function SheetContent({
1100
+ className,
1101
+ children,
1102
+ side = "right",
1103
+ ...props
1104
+ }) {
1105
+ return /* @__PURE__ */ jsxRuntime.jsxs(SheetPortal, { children: [
1106
+ /* @__PURE__ */ jsxRuntime.jsx(SheetOverlay, {}),
1107
+ /* @__PURE__ */ jsxRuntime.jsxs(
1108
+ DialogPrimitive__namespace.Content,
1109
+ {
1110
+ "data-slot": "sheet-content",
1111
+ className: button.cn(
1112
+ "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",
1113
+ 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",
1114
+ 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",
1115
+ 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",
1116
+ 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",
1117
+ className
1118
+ ),
1119
+ ...props,
1120
+ children: [
1121
+ children,
1122
+ /* @__PURE__ */ jsxRuntime.jsxs(DialogPrimitive__namespace.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: [
1123
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.XIcon, { className: "size-4" }),
1124
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
1125
+ ] })
1126
+ ]
1127
+ }
1128
+ )
1129
+ ] });
1130
+ }
1131
+ function SheetHeader({ className, ...props }) {
1132
+ return /* @__PURE__ */ jsxRuntime.jsx(
1133
+ "div",
1134
+ {
1135
+ "data-slot": "sheet-header",
1136
+ className: button.cn("flex flex-col gap-1.5 px-6 pt-6", className),
1137
+ ...props
1138
+ }
1139
+ );
1140
+ }
1141
+ function SheetBody({ className, ...props }) {
1142
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "sheet-body", className: button.cn("flex-1 overflow-auto px-6", className), ...props });
1143
+ }
1144
+ function SheetFooter({ className, ...props }) {
1145
+ return /* @__PURE__ */ jsxRuntime.jsx(
1146
+ "div",
1147
+ {
1148
+ "data-slot": "sheet-footer",
1149
+ className: button.cn("mt-auto flex flex-col gap-2 px-6 pb-6", className),
1150
+ ...props
1151
+ }
1152
+ );
1153
+ }
1154
+ function SheetTitle({ className, ...props }) {
1155
+ return /* @__PURE__ */ jsxRuntime.jsx(
1156
+ DialogPrimitive__namespace.Title,
1157
+ {
1158
+ "data-slot": "sheet-title",
1159
+ className: button.cn("text-foreground font-semibold", className),
1160
+ ...props
1161
+ }
1162
+ );
1163
+ }
1164
+ function SheetDescription({
1165
+ className,
1166
+ ...props
1167
+ }) {
1168
+ return /* @__PURE__ */ jsxRuntime.jsx(
1169
+ DialogPrimitive__namespace.Description,
1170
+ {
1171
+ "data-slot": "sheet-description",
1172
+ className: button.cn("text-muted-foreground text-sm", className),
1173
+ ...props
1174
+ }
1175
+ );
1176
+ }
1177
+ function Drawer({ ...props }) {
1178
+ return /* @__PURE__ */ jsxRuntime.jsx(vaul.Drawer.Root, { "data-slot": "drawer", ...props });
1179
+ }
1180
+ function DrawerTrigger({ ...props }) {
1181
+ return /* @__PURE__ */ jsxRuntime.jsx(vaul.Drawer.Trigger, { "data-slot": "drawer-trigger", ...props });
1182
+ }
1183
+ function DrawerPortal({ ...props }) {
1184
+ return /* @__PURE__ */ jsxRuntime.jsx(vaul.Drawer.Portal, { "data-slot": "drawer-portal", ...props });
1185
+ }
1186
+ function DrawerClose({ ...props }) {
1187
+ return /* @__PURE__ */ jsxRuntime.jsx(vaul.Drawer.Close, { "data-slot": "drawer-close", ...props });
1188
+ }
1189
+ const DrawerOverlay = React__namespace.forwardRef(({ className, ...props }, ref) => {
1190
+ return /* @__PURE__ */ jsxRuntime.jsx(
1191
+ vaul.Drawer.Overlay,
1192
+ {
1193
+ ref,
1194
+ "data-slot": "drawer-overlay",
1195
+ className: button.cn(
1196
+ "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",
1197
+ className
1198
+ ),
1199
+ ...props
1200
+ }
1201
+ );
1202
+ });
1203
+ DrawerOverlay.displayName = vaul.Drawer.Overlay.displayName;
1204
+ function DrawerContent({
1205
+ className,
1206
+ children,
1207
+ ...props
1208
+ }) {
1209
+ return /* @__PURE__ */ jsxRuntime.jsxs(DrawerPortal, { "data-slot": "drawer-portal", children: [
1210
+ /* @__PURE__ */ jsxRuntime.jsx(DrawerOverlay, {}),
1211
+ /* @__PURE__ */ jsxRuntime.jsxs(
1212
+ vaul.Drawer.Content,
1213
+ {
1214
+ "data-slot": "drawer-content",
1215
+ className: button.cn(
1216
+ "group/drawer-content bg-background fixed z-50 flex h-auto flex-col",
1217
+ "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",
1218
+ "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",
1219
+ "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",
1220
+ "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",
1221
+ className
1222
+ ),
1223
+ ...props,
1224
+ children: [
1225
+ /* @__PURE__ */ jsxRuntime.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" }),
1226
+ children
1227
+ ]
1228
+ }
1229
+ )
1230
+ ] });
1231
+ }
1232
+ function DrawerHeader({ className, ...props }) {
1233
+ return /* @__PURE__ */ jsxRuntime.jsx(
1234
+ "div",
1235
+ {
1236
+ "data-slot": "drawer-header",
1237
+ className: button.cn("flex flex-col gap-1.5 p-4", className),
1238
+ ...props
1239
+ }
1240
+ );
1241
+ }
1242
+ function DrawerFooter({ className, ...props }) {
1243
+ return /* @__PURE__ */ jsxRuntime.jsx(
1244
+ "div",
1245
+ {
1246
+ "data-slot": "drawer-footer",
1247
+ className: button.cn("mt-auto flex flex-col gap-2 p-4", className),
1248
+ ...props
1249
+ }
1250
+ );
1251
+ }
1252
+ function DrawerTitle({ className, ...props }) {
1253
+ return /* @__PURE__ */ jsxRuntime.jsx(
1254
+ vaul.Drawer.Title,
1255
+ {
1256
+ "data-slot": "drawer-title",
1257
+ className: button.cn("text-foreground font-semibold", className),
1258
+ ...props
1259
+ }
1260
+ );
1261
+ }
1262
+ function DrawerDescription({
1263
+ className,
1264
+ ...props
1265
+ }) {
1266
+ return /* @__PURE__ */ jsxRuntime.jsx(
1267
+ vaul.Drawer.Description,
1268
+ {
1269
+ "data-slot": "drawer-description",
1270
+ className: button.cn("text-muted-foreground text-sm", className),
1271
+ ...props
1272
+ }
1273
+ );
1274
+ }
1275
+ function DrawerHandle({ className, ...props }) {
1276
+ return /* @__PURE__ */ jsxRuntime.jsx(
1277
+ "div",
1278
+ {
1279
+ "data-slot": "drawer-handle",
1280
+ className: button.cn("bg-muted mx-auto mt-4 h-2 w-[100px] shrink-0 rounded-full", className),
1281
+ ...props
1282
+ }
1283
+ );
1284
+ }
1285
+ function HoverCard({ ...props }) {
1286
+ return /* @__PURE__ */ jsxRuntime.jsx(HoverCardPrimitive__namespace.Root, { "data-slot": "hover-card", ...props });
1287
+ }
1288
+ function HoverCardTrigger({ ...props }) {
1289
+ return /* @__PURE__ */ jsxRuntime.jsx(HoverCardPrimitive__namespace.Trigger, { "data-slot": "hover-card-trigger", ...props });
1290
+ }
1291
+ function HoverCardContent({
1292
+ className,
1293
+ align = "center",
1294
+ sideOffset = 4,
1295
+ ...props
1296
+ }) {
1297
+ return /* @__PURE__ */ jsxRuntime.jsx(HoverCardPrimitive__namespace.Portal, { "data-slot": "hover-card-portal", children: /* @__PURE__ */ jsxRuntime.jsx(
1298
+ HoverCardPrimitive__namespace.Content,
1299
+ {
1300
+ "data-slot": "hover-card-content",
1301
+ align,
1302
+ sideOffset,
1303
+ className: button.cn(
1304
+ "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",
1305
+ className
1306
+ ),
1307
+ ...props
1308
+ }
1309
+ ) });
1310
+ }
1311
+ function ContextMenu({ ...props }) {
1312
+ return /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.Root, { "data-slot": "context-menu", ...props });
1313
+ }
1314
+ function ContextMenuTrigger({
1315
+ ...props
1316
+ }) {
1317
+ return /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.Trigger, { "data-slot": "context-menu-trigger", ...props });
1318
+ }
1319
+ function ContextMenuGroup({ ...props }) {
1320
+ return /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.Group, { "data-slot": "context-menu-group", ...props });
1321
+ }
1322
+ function ContextMenuPortal({ ...props }) {
1323
+ return /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.Portal, { "data-slot": "context-menu-portal", ...props });
1324
+ }
1325
+ function ContextMenuSub({ ...props }) {
1326
+ return /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.Sub, { "data-slot": "context-menu-sub", ...props });
1327
+ }
1328
+ function ContextMenuRadioGroup({
1329
+ ...props
1330
+ }) {
1331
+ return /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.RadioGroup, { "data-slot": "context-menu-radio-group", ...props });
1332
+ }
1333
+ function ContextMenuSubTrigger({
1334
+ className,
1335
+ inset,
1336
+ children,
1337
+ ...props
1338
+ }) {
1339
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1340
+ ContextMenuPrimitive__namespace.SubTrigger,
1341
+ {
1342
+ "data-slot": "context-menu-sub-trigger",
1343
+ "data-inset": inset,
1344
+ className: button.cn(
1345
+ "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",
1346
+ className
1347
+ ),
1348
+ ...props,
1349
+ children: [
1350
+ children,
1351
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRightIcon, { className: "ml-auto" })
1352
+ ]
1353
+ }
1354
+ );
1355
+ }
1356
+ function ContextMenuSubContent({
1357
+ className,
1358
+ ...props
1359
+ }) {
1360
+ return /* @__PURE__ */ jsxRuntime.jsx(
1361
+ ContextMenuPrimitive__namespace.SubContent,
1362
+ {
1363
+ "data-slot": "context-menu-sub-content",
1364
+ className: button.cn(
1365
+ "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",
1366
+ className
1367
+ ),
1368
+ ...props
1369
+ }
1370
+ );
1371
+ }
1372
+ function ContextMenuContent({
1373
+ className,
1374
+ ...props
1375
+ }) {
1376
+ return /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
1377
+ ContextMenuPrimitive__namespace.Content,
1378
+ {
1379
+ "data-slot": "context-menu-content",
1380
+ className: button.cn(
1381
+ "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",
1382
+ className
1383
+ ),
1384
+ ...props
1385
+ }
1386
+ ) });
1387
+ }
1388
+ function ContextMenuItem({
1389
+ className,
1390
+ inset,
1391
+ variant = "default",
1392
+ ...props
1393
+ }) {
1394
+ return /* @__PURE__ */ jsxRuntime.jsx(
1395
+ ContextMenuPrimitive__namespace.Item,
1396
+ {
1397
+ "data-slot": "context-menu-item",
1398
+ "data-inset": inset,
1399
+ "data-variant": variant,
1400
+ className: button.cn(
1401
+ "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",
1402
+ className
1403
+ ),
1404
+ ...props
1405
+ }
1406
+ );
1407
+ }
1408
+ function ContextMenuCheckboxItem({
1409
+ className,
1410
+ children,
1411
+ checked,
1412
+ ...props
1413
+ }) {
1414
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1415
+ ContextMenuPrimitive__namespace.CheckboxItem,
1416
+ {
1417
+ "data-slot": "context-menu-checkbox-item",
1418
+ className: button.cn(
1419
+ "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",
1420
+ className
1421
+ ),
1422
+ checked,
1423
+ ...props,
1424
+ children: [
1425
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckIcon, { className: "size-4" }) }) }),
1426
+ children
1427
+ ]
1428
+ }
1429
+ );
1430
+ }
1431
+ function ContextMenuRadioItem({
1432
+ className,
1433
+ children,
1434
+ ...props
1435
+ }) {
1436
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1437
+ ContextMenuPrimitive__namespace.RadioItem,
1438
+ {
1439
+ "data-slot": "context-menu-radio-item",
1440
+ className: button.cn(
1441
+ "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",
1442
+ className
1443
+ ),
1444
+ ...props,
1445
+ children: [
1446
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CircleIcon, { className: "size-2 fill-current" }) }) }),
1447
+ children
1448
+ ]
1449
+ }
1450
+ );
1451
+ }
1452
+ function ContextMenuLabel({
1453
+ className,
1454
+ inset,
1455
+ ...props
1456
+ }) {
1457
+ return /* @__PURE__ */ jsxRuntime.jsx(
1458
+ ContextMenuPrimitive__namespace.Label,
1459
+ {
1460
+ "data-slot": "context-menu-label",
1461
+ "data-inset": inset,
1462
+ className: button.cn("text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", className),
1463
+ ...props
1464
+ }
1465
+ );
1466
+ }
1467
+ function ContextMenuSeparator({
1468
+ className,
1469
+ ...props
1470
+ }) {
1471
+ return /* @__PURE__ */ jsxRuntime.jsx(
1472
+ ContextMenuPrimitive__namespace.Separator,
1473
+ {
1474
+ "data-slot": "context-menu-separator",
1475
+ className: button.cn("bg-border -mx-1 my-1 h-px", className),
1476
+ ...props
1477
+ }
1478
+ );
1479
+ }
1480
+ function ContextMenuShortcut({ className, ...props }) {
1481
+ return /* @__PURE__ */ jsxRuntime.jsx(
1482
+ "span",
1483
+ {
1484
+ "data-slot": "context-menu-shortcut",
1485
+ className: button.cn("text-muted-foreground ml-auto text-xs tracking-widest", className),
1486
+ ...props
1487
+ }
1488
+ );
1489
+ }
1490
+ function Menubar({ className, ...props }) {
1491
+ return /* @__PURE__ */ jsxRuntime.jsx(
1492
+ MenubarPrimitive__namespace.Root,
1493
+ {
1494
+ "data-slot": "menubar",
1495
+ className: button.cn(
1496
+ "bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs",
1497
+ className
1498
+ ),
1499
+ ...props
1500
+ }
1501
+ );
1502
+ }
1503
+ function MenubarMenu({ ...props }) {
1504
+ return /* @__PURE__ */ jsxRuntime.jsx(MenubarPrimitive__namespace.Menu, { "data-slot": "menubar-menu", ...props });
1505
+ }
1506
+ function MenubarGroup({ ...props }) {
1507
+ return /* @__PURE__ */ jsxRuntime.jsx(MenubarPrimitive__namespace.Group, { "data-slot": "menubar-group", ...props });
1508
+ }
1509
+ function MenubarPortal({ ...props }) {
1510
+ return /* @__PURE__ */ jsxRuntime.jsx(MenubarPrimitive__namespace.Portal, { "data-slot": "menubar-portal", ...props });
1511
+ }
1512
+ function MenubarRadioGroup({ ...props }) {
1513
+ return /* @__PURE__ */ jsxRuntime.jsx(MenubarPrimitive__namespace.RadioGroup, { "data-slot": "menubar-radio-group", ...props });
1514
+ }
1515
+ function MenubarTrigger({
1516
+ className,
1517
+ ...props
1518
+ }) {
1519
+ return /* @__PURE__ */ jsxRuntime.jsx(
1520
+ MenubarPrimitive__namespace.Trigger,
1521
+ {
1522
+ "data-slot": "menubar-trigger",
1523
+ className: button.cn(
1524
+ "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",
1525
+ className
1526
+ ),
1527
+ ...props
1528
+ }
1529
+ );
1530
+ }
1531
+ function MenubarContent({
1532
+ className,
1533
+ align = "start",
1534
+ alignOffset = -4,
1535
+ sideOffset = 8,
1536
+ ...props
1537
+ }) {
1538
+ return /* @__PURE__ */ jsxRuntime.jsx(MenubarPortal, { children: /* @__PURE__ */ jsxRuntime.jsx(
1539
+ MenubarPrimitive__namespace.Content,
1540
+ {
1541
+ "data-slot": "menubar-content",
1542
+ align,
1543
+ alignOffset,
1544
+ sideOffset,
1545
+ className: button.cn(
1546
+ "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",
1547
+ className
1548
+ ),
1549
+ ...props
1550
+ }
1551
+ ) });
1552
+ }
1553
+ function MenubarItem({
1554
+ className,
1555
+ inset,
1556
+ variant = "default",
1557
+ ...props
1558
+ }) {
1559
+ return /* @__PURE__ */ jsxRuntime.jsx(
1560
+ MenubarPrimitive__namespace.Item,
1561
+ {
1562
+ "data-slot": "menubar-item",
1563
+ "data-inset": inset,
1564
+ "data-variant": variant,
1565
+ className: button.cn(
1566
+ "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",
1567
+ className
1568
+ ),
1569
+ ...props
1570
+ }
1571
+ );
1572
+ }
1573
+ function MenubarCheckboxItem({
1574
+ className,
1575
+ children,
1576
+ checked,
1577
+ ...props
1578
+ }) {
1579
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1580
+ MenubarPrimitive__namespace.CheckboxItem,
1581
+ {
1582
+ "data-slot": "menubar-checkbox-item",
1583
+ className: button.cn(
1584
+ "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",
1585
+ className
1586
+ ),
1587
+ checked,
1588
+ ...props,
1589
+ children: [
1590
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(MenubarPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckIcon, { className: "size-4" }) }) }),
1591
+ children
1592
+ ]
1593
+ }
1594
+ );
1595
+ }
1596
+ function MenubarRadioItem({
1597
+ className,
1598
+ children,
1599
+ ...props
1600
+ }) {
1601
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1602
+ MenubarPrimitive__namespace.RadioItem,
1603
+ {
1604
+ "data-slot": "menubar-radio-item",
1605
+ className: button.cn(
1606
+ "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",
1607
+ className
1608
+ ),
1609
+ ...props,
1610
+ children: [
1611
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(MenubarPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CircleIcon, { className: "size-2 fill-current" }) }) }),
1612
+ children
1613
+ ]
1614
+ }
1615
+ );
1616
+ }
1617
+ function MenubarLabel({
1618
+ className,
1619
+ inset,
1620
+ ...props
1621
+ }) {
1622
+ return /* @__PURE__ */ jsxRuntime.jsx(
1623
+ MenubarPrimitive__namespace.Label,
1624
+ {
1625
+ "data-slot": "menubar-label",
1626
+ "data-inset": inset,
1627
+ className: button.cn("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", className),
1628
+ ...props
1629
+ }
1630
+ );
1631
+ }
1632
+ function MenubarSeparator({
1633
+ className,
1634
+ ...props
1635
+ }) {
1636
+ return /* @__PURE__ */ jsxRuntime.jsx(
1637
+ MenubarPrimitive__namespace.Separator,
1638
+ {
1639
+ "data-slot": "menubar-separator",
1640
+ className: button.cn("bg-border -mx-1 my-1 h-px", className),
1641
+ ...props
1642
+ }
1643
+ );
1644
+ }
1645
+ function MenubarShortcut({ className, ...props }) {
1646
+ return /* @__PURE__ */ jsxRuntime.jsx(
1647
+ "span",
1648
+ {
1649
+ "data-slot": "menubar-shortcut",
1650
+ className: button.cn("text-muted-foreground ml-auto text-xs tracking-widest", className),
1651
+ ...props
1652
+ }
1653
+ );
1654
+ }
1655
+ function MenubarSub({ ...props }) {
1656
+ return /* @__PURE__ */ jsxRuntime.jsx(MenubarPrimitive__namespace.Sub, { "data-slot": "menubar-sub", ...props });
1657
+ }
1658
+ function MenubarSubTrigger({
1659
+ className,
1660
+ inset,
1661
+ children,
1662
+ ...props
1663
+ }) {
1664
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1665
+ MenubarPrimitive__namespace.SubTrigger,
1666
+ {
1667
+ "data-slot": "menubar-sub-trigger",
1668
+ "data-inset": inset,
1669
+ className: button.cn(
1670
+ "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",
1671
+ className
1672
+ ),
1673
+ ...props,
1674
+ children: [
1675
+ children,
1676
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRightIcon, { className: "ml-auto h-4 w-4" })
1677
+ ]
1678
+ }
1679
+ );
1680
+ }
1681
+ function MenubarSubContent({
1682
+ className,
1683
+ ...props
1684
+ }) {
1685
+ return /* @__PURE__ */ jsxRuntime.jsx(
1686
+ MenubarPrimitive__namespace.SubContent,
1687
+ {
1688
+ "data-slot": "menubar-sub-content",
1689
+ className: button.cn(
1690
+ "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",
1691
+ className
1692
+ ),
1693
+ ...props
1694
+ }
1695
+ );
1696
+ }
1697
+ function Command({ className, ...props }) {
1698
+ return /* @__PURE__ */ jsxRuntime.jsx(
1699
+ cmdk.Command,
1700
+ {
1701
+ "data-slot": "command",
1702
+ className: button.cn(
1703
+ "bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",
1704
+ className
1705
+ ),
1706
+ ...props
1707
+ }
1708
+ );
1709
+ }
1710
+ function CommandDialog({
1711
+ title = "Command Palette",
1712
+ description = "Search for a command to run...",
1713
+ children,
1714
+ ...props
1715
+ }) {
1716
+ return /* @__PURE__ */ jsxRuntime.jsxs(richTextEditor.Dialog, { ...props, children: [
1717
+ /* @__PURE__ */ jsxRuntime.jsxs(richTextEditor.DialogHeader, { className: "sr-only", children: [
1718
+ /* @__PURE__ */ jsxRuntime.jsx(richTextEditor.DialogTitle, { children: title }),
1719
+ /* @__PURE__ */ jsxRuntime.jsx(richTextEditor.DialogDescription, { children: description })
1720
+ ] }),
1721
+ /* @__PURE__ */ jsxRuntime.jsx(richTextEditor.DialogContent, { className: "overflow-hidden p-0", children: /* @__PURE__ */ jsxRuntime.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 }) })
1722
+ ] });
1723
+ }
1724
+ function CommandInput({
1725
+ className,
1726
+ ...props
1727
+ }) {
1728
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "command-input-wrapper", className: "flex h-9 items-center gap-2 border-b px-3", children: [
1729
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.SearchIcon, { className: "size-4 shrink-0 opacity-50" }),
1730
+ /* @__PURE__ */ jsxRuntime.jsx(
1731
+ cmdk.Command.Input,
1732
+ {
1733
+ "data-slot": "command-input",
1734
+ className: button.cn(
1735
+ "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",
1736
+ className
1737
+ ),
1738
+ ...props
1739
+ }
1740
+ )
1741
+ ] });
1742
+ }
1743
+ function CommandList({ className, ...props }) {
1744
+ return /* @__PURE__ */ jsxRuntime.jsx(
1745
+ cmdk.Command.List,
1746
+ {
1747
+ "data-slot": "command-list",
1748
+ role: "listbox",
1749
+ className: button.cn("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto", className),
1750
+ ...props
1751
+ }
1752
+ );
1753
+ }
1754
+ function CommandEmpty({ ...props }) {
1755
+ return /* @__PURE__ */ jsxRuntime.jsx(
1756
+ cmdk.Command.Empty,
1757
+ {
1758
+ "data-slot": "command-empty",
1759
+ className: "py-6 text-center text-sm",
1760
+ ...props
1761
+ }
1762
+ );
1763
+ }
1764
+ function CommandGroup({
1765
+ className,
1766
+ ...props
1767
+ }) {
1768
+ return /* @__PURE__ */ jsxRuntime.jsx(
1769
+ cmdk.Command.Group,
1770
+ {
1771
+ "data-slot": "command-group",
1772
+ className: button.cn(
1773
+ "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",
1774
+ className
1775
+ ),
1776
+ ...props
1777
+ }
1778
+ );
1779
+ }
1780
+ function CommandSeparator({
1781
+ className,
1782
+ ...props
1783
+ }) {
1784
+ return /* @__PURE__ */ jsxRuntime.jsx(
1785
+ cmdk.Command.Separator,
1786
+ {
1787
+ "data-slot": "command-separator",
1788
+ className: button.cn("bg-border -mx-1 h-px", className),
1789
+ ...props
1790
+ }
1791
+ );
1792
+ }
1793
+ function CommandItem({ className, ...props }) {
1794
+ return /* @__PURE__ */ jsxRuntime.jsx(
1795
+ cmdk.Command.Item,
1796
+ {
1797
+ "data-slot": "command-item",
1798
+ role: "option",
1799
+ className: button.cn(
1800
+ "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",
1801
+ className
1802
+ ),
1803
+ ...props
1804
+ }
1805
+ );
1806
+ }
1807
+ function CommandShortcut({ className, ...props }) {
1808
+ return /* @__PURE__ */ jsxRuntime.jsx(
1809
+ "span",
1810
+ {
1811
+ "data-slot": "command-shortcut",
1812
+ className: button.cn("text-muted-foreground ml-auto text-xs tracking-widest", className),
1813
+ ...props
1814
+ }
1815
+ );
1816
+ }
1817
+ const variantStyles = {
1818
+ default: "bg-primary text-primary-foreground",
1819
+ secondary: "bg-secondary text-secondary-foreground",
1820
+ destructive: "bg-destructive text-destructive-foreground",
1821
+ outline: "border-2 border-primary bg-background text-primary",
1822
+ success: "bg-success text-success-foreground",
1823
+ info: "bg-info text-info-foreground",
1824
+ warning: "bg-warning text-warning-foreground"
1825
+ };
1826
+ const NotificationBadge = React__namespace.forwardRef(
1827
+ ({
1828
+ className,
1829
+ count = 0,
1830
+ max = 99,
1831
+ showZero = false,
1832
+ dot = false,
1833
+ variant = "destructive",
1834
+ children,
1835
+ ...props
1836
+ }, ref) => {
1837
+ const displayCount = count > max ? `${max}+` : count;
1838
+ const shouldShow = count > 0 || showZero;
1839
+ if (!shouldShow && !dot) {
1840
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className, ...props, children });
1841
+ }
1842
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: button.cn("relative inline-block", className), ...props, children: [
1843
+ children,
1844
+ /* @__PURE__ */ jsxRuntime.jsx(
1845
+ "span",
1846
+ {
1847
+ className: button.cn(
1848
+ "absolute -right-1 -top-1 flex items-center justify-center rounded-full",
1849
+ variantStyles[variant],
1850
+ dot ? "h-2 w-2" : "min-w-[1.25rem] h-5 px-1.5"
1851
+ ),
1852
+ children: !dot && shouldShow && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-medium leading-none", children: displayCount })
1853
+ }
1854
+ )
1855
+ ] });
1856
+ }
1857
+ );
1858
+ NotificationBadge.displayName = "NotificationBadge";
1859
+ const StatsCard = React__namespace.forwardRef(
1860
+ ({ className, title, value, description, trend, icon, ...props }, ref) => {
1861
+ const getTrendIcon = () => {
1862
+ if (!trend) return null;
1863
+ if (trend.value > 0) {
1864
+ return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.TrendingUp, { className: "h-4 w-4 text-success" });
1865
+ } else if (trend.value < 0) {
1866
+ return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.TrendingDown, { className: "h-4 w-4 text-destructive" });
1867
+ } else {
1868
+ return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Minus, { className: "h-4 w-4 text-muted-foreground" });
1869
+ }
1870
+ };
1871
+ const getTrendColor = () => {
1872
+ if (!trend) return "";
1873
+ if (trend.value > 0) {
1874
+ return "text-success";
1875
+ } else if (trend.value < 0) {
1876
+ return "text-destructive";
1877
+ } else {
1878
+ return "text-muted-foreground";
1879
+ }
1880
+ };
1881
+ return /* @__PURE__ */ jsxRuntime.jsx(skeleton.Card, { ref, className: button.cn("", className), ...props, children: /* @__PURE__ */ jsxRuntime.jsx(skeleton.CardContent, { className: "p-4 sm:p-6", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-3", children: [
1882
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
1883
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground mb-1 text-sm", children: title }),
1884
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-baseline gap-2", children: [
1885
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-foreground text-xl sm:text-2xl", children: value }),
1886
+ trend && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: button.cn("flex items-center gap-1 text-sm", getTrendColor()), children: [
1887
+ getTrendIcon(),
1888
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
1889
+ Math.abs(trend.value),
1890
+ "%"
1891
+ ] })
1892
+ ] })
1893
+ ] }),
1894
+ (description || trend?.label) && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground mt-1 text-xs sm:text-sm", children: trend?.label || description })
1895
+ ] }),
1896
+ icon && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-[var(--radius)] bg-muted p-2 sm:p-3 text-muted-foreground flex-shrink-0", children: icon })
1897
+ ] }) }) });
1898
+ }
1899
+ );
1900
+ StatsCard.displayName = "StatsCard";
1901
+ function StatsCardSkeleton({
1902
+ showIcon = true,
1903
+ showTrend = true,
1904
+ className,
1905
+ ...props
1906
+ }) {
1907
+ return /* @__PURE__ */ jsxRuntime.jsx(skeleton.Card, { className: button.cn("", className), ...props, children: /* @__PURE__ */ jsxRuntime.jsx(skeleton.CardContent, { className: "p-4 sm:p-6", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-3", children: [
1908
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
1909
+ /* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-3.5 w-28 mb-2" }),
1910
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-baseline gap-2", children: [
1911
+ /* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-7 w-24" }),
1912
+ showTrend && /* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-4 w-14 rounded-full" })
1913
+ ] }),
1914
+ /* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-3 w-32 mt-2" })
1915
+ ] }),
1916
+ showIcon && /* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "size-9 sm:size-11 rounded-[var(--radius)] shrink-0" })
1917
+ ] }) }) });
1918
+ }
1919
+ StatsCardSkeleton.displayName = "StatsCardSkeleton";
1920
+ const Timeline = React__namespace.forwardRef(
1921
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("ol", { ref, className: button.cn("relative border-l border-border", className), ...props })
1922
+ );
1923
+ Timeline.displayName = "Timeline";
1924
+ const TimelineItem = React__namespace.forwardRef(
1925
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("li", { ref, className: button.cn("mb-10 ml-6", className), ...props })
1926
+ );
1927
+ TimelineItem.displayName = "TimelineItem";
1928
+ const TimelineDot = React__namespace.forwardRef(({ className, variant = "default", icon, children, ...props }, ref) => {
1929
+ const variantStyles2 = {
1930
+ default: "bg-muted border-border",
1931
+ primary: "bg-primary border-primary",
1932
+ success: "bg-success border-success",
1933
+ info: "bg-info border-info",
1934
+ warning: "bg-warning border-warning",
1935
+ destructive: "bg-destructive border-destructive",
1936
+ outline: "bg-background border-border"
1937
+ };
1938
+ const iconColorStyles = {
1939
+ default: "text-muted-foreground",
1940
+ primary: "text-primary-foreground",
1941
+ success: "text-success-foreground",
1942
+ info: "text-info-foreground",
1943
+ warning: "text-warning-foreground",
1944
+ destructive: "text-destructive-foreground",
1945
+ outline: "text-foreground"
1946
+ };
1947
+ if (icon || children) {
1948
+ return /* @__PURE__ */ jsxRuntime.jsx(
1949
+ "div",
1950
+ {
1951
+ ref,
1952
+ className: button.cn(
1953
+ "absolute -left-[17px] mt-0.5 h-8 w-8 rounded-full border-2 flex items-center justify-center",
1954
+ variantStyles2[variant],
1955
+ className
1956
+ ),
1957
+ ...props,
1958
+ children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: button.cn("h-4 w-4", iconColorStyles[variant]), children: icon || children })
1959
+ }
1960
+ );
1961
+ }
1962
+ return /* @__PURE__ */ jsxRuntime.jsx(
1963
+ "div",
1964
+ {
1965
+ ref,
1966
+ className: button.cn(
1967
+ "absolute -left-[9px] mt-1.5 h-4 w-4 rounded-full border-2",
1968
+ variantStyles2[variant],
1969
+ className
1970
+ ),
1971
+ ...props
1972
+ }
1973
+ );
1974
+ });
1975
+ TimelineDot.displayName = "TimelineDot";
1976
+ const TimelineContent = React__namespace.forwardRef(
1977
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: button.cn("", className), ...props })
1978
+ );
1979
+ TimelineContent.displayName = "TimelineContent";
1980
+ const TimelineHeading = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("h3", { ref, className: button.cn("mb-1 text-foreground", className), ...props }));
1981
+ TimelineHeading.displayName = "TimelineHeading";
1982
+ const TimelineTime = React__namespace.forwardRef(
1983
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("time", { ref, className: button.cn("mb-2 block text-muted-foreground", className), ...props })
1984
+ );
1985
+ TimelineTime.displayName = "TimelineTime";
1986
+ const TimelineDescription = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("p", { ref, className: button.cn("text-muted-foreground", className), ...props }));
1987
+ TimelineDescription.displayName = "TimelineDescription";
1988
+ function useTreeView({
1989
+ data,
1990
+ defaultExpanded = [],
1991
+ selectedNodeId,
1992
+ onNodeClick,
1993
+ onNodeSelect
1994
+ }) {
1995
+ const [expanded, setExpanded] = React.useState(new Set(defaultExpanded));
1996
+ const [internalSelectedId, setInternalSelectedId] = React.useState(void 0);
1997
+ const nodeRefs = React.useRef(/* @__PURE__ */ new Map());
1998
+ const isControlled = selectedNodeId !== void 0;
1999
+ const effectiveSelectedId = isControlled ? selectedNodeId : internalSelectedId;
2000
+ const getNodeRef = React.useCallback(
2001
+ (nodeId) => (el) => {
2002
+ if (el) nodeRefs.current.set(nodeId, el);
2003
+ else nodeRefs.current.delete(nodeId);
2004
+ },
2005
+ []
2006
+ );
2007
+ const getVisibleNodes = React.useCallback(() => {
2008
+ const result = [];
2009
+ const traverse = (nodes) => {
2010
+ for (const node of nodes) {
2011
+ result.push(node);
2012
+ if (node.children?.length && expanded.has(node.id)) traverse(node.children);
2013
+ }
2014
+ };
2015
+ traverse(data);
2016
+ return result;
2017
+ }, [data, expanded]);
2018
+ const findParent = React.useCallback(
2019
+ (nodes, targetId) => {
2020
+ for (const n of nodes) {
2021
+ if (n.children?.some((c) => c.id === targetId)) return n;
2022
+ if (n.children) {
2023
+ const found = findParent(n.children, targetId);
2024
+ if (found) return found;
2025
+ }
2026
+ }
2027
+ return null;
2028
+ },
2029
+ // findParent is a pure recursive function over `data` — no reactive deps needed
2030
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2031
+ []
2032
+ );
2033
+ const toggleExpand = React.useCallback((nodeId) => {
2034
+ setExpanded((prev) => {
2035
+ const next = new Set(prev);
2036
+ next.has(nodeId) ? next.delete(nodeId) : next.add(nodeId);
2037
+ return next;
2038
+ });
2039
+ }, []);
2040
+ const handleSelect = React.useCallback(
2041
+ (node) => {
2042
+ if (!isControlled) setInternalSelectedId(node.id);
2043
+ onNodeSelect?.(node);
2044
+ onNodeClick?.(node);
2045
+ },
2046
+ [isControlled, onNodeClick, onNodeSelect]
2047
+ );
2048
+ const handleKeyDown = React.useCallback(
2049
+ (e, node) => {
2050
+ const visibleNodes = getVisibleNodes();
2051
+ const idx = visibleNodes.findIndex((n) => n.id === node.id);
2052
+ const hasChildren = !!node.children?.length;
2053
+ const isExpanded = expanded.has(node.id);
2054
+ const focusNode = (id) => {
2055
+ nodeRefs.current.get(id)?.focus();
2056
+ };
2057
+ switch (e.key) {
2058
+ case "ArrowDown": {
2059
+ e.preventDefault();
2060
+ const next = visibleNodes[idx + 1];
2061
+ if (next) focusNode(next.id);
2062
+ break;
2063
+ }
2064
+ case "ArrowUp": {
2065
+ e.preventDefault();
2066
+ const prev = visibleNodes[idx - 1];
2067
+ if (prev) focusNode(prev.id);
2068
+ break;
2069
+ }
2070
+ case "ArrowRight": {
2071
+ e.preventDefault();
2072
+ if (hasChildren && !isExpanded) {
2073
+ toggleExpand(node.id);
2074
+ } else if (hasChildren && isExpanded && node.children?.length) {
2075
+ focusNode(node.children[0].id);
2076
+ }
2077
+ break;
2078
+ }
2079
+ case "ArrowLeft": {
2080
+ e.preventDefault();
2081
+ if (hasChildren && isExpanded) {
2082
+ toggleExpand(node.id);
2083
+ } else {
2084
+ const parent = findParent(data, node.id);
2085
+ if (parent) focusNode(parent.id);
2086
+ }
2087
+ break;
2088
+ }
2089
+ case "Home": {
2090
+ e.preventDefault();
2091
+ if (visibleNodes.length > 0) focusNode(visibleNodes[0].id);
2092
+ break;
2093
+ }
2094
+ case "End": {
2095
+ e.preventDefault();
2096
+ const last = visibleNodes[visibleNodes.length - 1];
2097
+ if (last) focusNode(last.id);
2098
+ break;
2099
+ }
2100
+ case " ": {
2101
+ e.preventDefault();
2102
+ if (hasChildren) {
2103
+ toggleExpand(node.id);
2104
+ } else {
2105
+ handleSelect(node);
2106
+ }
2107
+ break;
2108
+ }
2109
+ case "Enter": {
2110
+ e.preventDefault();
2111
+ if (hasChildren) toggleExpand(node.id);
2112
+ handleSelect(node);
2113
+ break;
2114
+ }
2115
+ }
2116
+ },
2117
+ [data, expanded, findParent, getVisibleNodes, handleSelect, toggleExpand]
2118
+ );
2119
+ return {
2120
+ expanded,
2121
+ effectiveSelectedId,
2122
+ nodeRefs,
2123
+ getNodeRef,
2124
+ toggleExpand,
2125
+ handleSelect,
2126
+ handleKeyDown,
2127
+ getVisibleNodes
2128
+ };
2129
+ }
2130
+ const TreeView = React__namespace.forwardRef(
2131
+ ({
2132
+ className,
2133
+ data,
2134
+ onNodeClick,
2135
+ onNodeSelect,
2136
+ defaultExpanded = [],
2137
+ selectedNodeId,
2138
+ ariaLabel,
2139
+ ...props
2140
+ }, ref) => {
2141
+ const { expanded, effectiveSelectedId, getNodeRef, toggleExpand, handleSelect, handleKeyDown } = useTreeView({ data, defaultExpanded, selectedNodeId, onNodeClick, onNodeSelect });
2142
+ const focusableId = effectiveSelectedId ?? data[0]?.id;
2143
+ return /* @__PURE__ */ jsxRuntime.jsx(
2144
+ "div",
2145
+ {
2146
+ ref,
2147
+ className: button.cn("w-full", className),
2148
+ role: "tree",
2149
+ "aria-label": ariaLabel ?? "Navegação em árvore",
2150
+ ...props,
2151
+ children: data.map((node) => /* @__PURE__ */ jsxRuntime.jsx(
2152
+ TreeNodeComponent,
2153
+ {
2154
+ node,
2155
+ level: 0,
2156
+ expanded,
2157
+ selectedId: effectiveSelectedId,
2158
+ focusableId,
2159
+ onToggle: toggleExpand,
2160
+ onSelect: handleSelect,
2161
+ onKeyDown: handleKeyDown,
2162
+ getNodeRef
2163
+ },
2164
+ node.id
2165
+ ))
2166
+ }
2167
+ );
2168
+ }
2169
+ );
2170
+ TreeView.displayName = "TreeView";
2171
+ const TreeNodeComponent = ({
2172
+ node,
2173
+ level,
2174
+ expanded,
2175
+ selectedId,
2176
+ focusableId,
2177
+ onToggle,
2178
+ onSelect,
2179
+ onKeyDown,
2180
+ getNodeRef
2181
+ }) => {
2182
+ const hasChildren = !!node.children?.length;
2183
+ const isExpanded = expanded.has(node.id);
2184
+ const isSelected = node.id === selectedId;
2185
+ const handleClick = () => {
2186
+ if (hasChildren) onToggle(node.id);
2187
+ onSelect(node);
2188
+ };
2189
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { role: "none", children: [
2190
+ /* @__PURE__ */ jsxRuntime.jsxs(
2191
+ "button",
2192
+ {
2193
+ ref: getNodeRef(node.id),
2194
+ role: "treeitem",
2195
+ "aria-expanded": hasChildren ? isExpanded : void 0,
2196
+ "aria-selected": isSelected,
2197
+ tabIndex: node.id === focusableId ? 0 : -1,
2198
+ onClick: handleClick,
2199
+ onKeyDown: (e) => onKeyDown(e, node),
2200
+ className: button.cn(
2201
+ "flex w-full items-center gap-2 rounded-[var(--radius)] px-2 py-1.5 text-left transition-colors",
2202
+ "hover:bg-muted focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1",
2203
+ isSelected && "bg-primary/10 text-primary font-medium"
2204
+ ),
2205
+ style: { paddingLeft: `${level * 1.5 + 0.5}rem` },
2206
+ children: [
2207
+ hasChildren ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0 text-muted-foreground", children: isExpanded ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "h-4 w-4" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "h-4 w-4" }) }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-4 flex-shrink-0", "aria-hidden": "true" }),
2208
+ node.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0 text-muted-foreground", children: node.icon }),
2209
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 text-foreground", children: node.label })
2210
+ ]
2211
+ }
2212
+ ),
2213
+ hasChildren && isExpanded && /* @__PURE__ */ jsxRuntime.jsx("div", { role: "group", children: node.children.map((child) => /* @__PURE__ */ jsxRuntime.jsx(
2214
+ TreeNodeComponent,
2215
+ {
2216
+ node: child,
2217
+ level: level + 1,
2218
+ expanded,
2219
+ selectedId,
2220
+ focusableId,
2221
+ onToggle,
2222
+ onSelect,
2223
+ onKeyDown,
2224
+ getNodeRef
2225
+ },
2226
+ child.id
2227
+ )) })
2228
+ ] });
2229
+ };
2230
+ function Collapsible({ ...props }) {
2231
+ return /* @__PURE__ */ jsxRuntime.jsx(CollapsiblePrimitive__namespace.Root, { "data-slot": "collapsible", ...props });
2232
+ }
2233
+ function CollapsibleTrigger({
2234
+ ...props
2235
+ }) {
2236
+ return /* @__PURE__ */ jsxRuntime.jsx(CollapsiblePrimitive__namespace.CollapsibleTrigger, { "data-slot": "collapsible-trigger", ...props });
2237
+ }
2238
+ function CollapsibleContent({
2239
+ ...props
2240
+ }) {
2241
+ return /* @__PURE__ */ jsxRuntime.jsx(CollapsiblePrimitive__namespace.CollapsibleContent, { "data-slot": "collapsible-content", ...props });
2242
+ }
2243
+ function Accordion({ ...props }) {
2244
+ return /* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Root, { "data-slot": "accordion", ...props });
2245
+ }
2246
+ function AccordionItem({
2247
+ className,
2248
+ ...props
2249
+ }) {
2250
+ return /* @__PURE__ */ jsxRuntime.jsx(
2251
+ AccordionPrimitive__namespace.Item,
2252
+ {
2253
+ "data-slot": "accordion-item",
2254
+ className: button.cn("border-b last:border-b-0", className),
2255
+ ...props
2256
+ }
2257
+ );
2258
+ }
2259
+ function AccordionTrigger({
2260
+ className,
2261
+ children,
2262
+ ...props
2263
+ }) {
2264
+ return /* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Header, { className: "flex", children: /* @__PURE__ */ jsxRuntime.jsxs(
2265
+ AccordionPrimitive__namespace.Trigger,
2266
+ {
2267
+ "data-slot": "accordion-trigger",
2268
+ className: button.cn(
2269
+ "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",
2270
+ className
2271
+ ),
2272
+ ...props,
2273
+ children: [
2274
+ children,
2275
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" })
2276
+ ]
2277
+ }
2278
+ ) });
2279
+ }
2280
+ function AccordionContent({
2281
+ className,
2282
+ children,
2283
+ ...props
2284
+ }) {
2285
+ return /* @__PURE__ */ jsxRuntime.jsx(
2286
+ AccordionPrimitive__namespace.Content,
2287
+ {
2288
+ "data-slot": "accordion-content",
2289
+ className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
2290
+ ...props,
2291
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: button.cn("pt-0 pb-4", className), children })
2292
+ }
2293
+ );
2294
+ }
2295
+ const CarouselContext = React__namespace.createContext(null);
2296
+ function useCarousel() {
2297
+ const context = React__namespace.useContext(CarouselContext);
2298
+ if (!context) {
2299
+ throw new Error("useCarousel must be used within a <Carousel />");
2300
+ }
2301
+ return context;
2302
+ }
2303
+ function Carousel({
2304
+ orientation = "horizontal",
2305
+ opts,
2306
+ setApi,
2307
+ plugins,
2308
+ className,
2309
+ children,
2310
+ ...props
2311
+ }) {
2312
+ const [carouselRef, api] = useEmblaCarousel(
2313
+ {
2314
+ ...opts,
2315
+ axis: orientation === "horizontal" ? "x" : "y"
2316
+ },
2317
+ plugins
2318
+ );
2319
+ const [canScrollPrev, setCanScrollPrev] = React__namespace.useState(false);
2320
+ const [canScrollNext, setCanScrollNext] = React__namespace.useState(false);
2321
+ const onSelect = React__namespace.useCallback((api2) => {
2322
+ if (!api2) return;
2323
+ setCanScrollPrev(api2.canScrollPrev());
2324
+ setCanScrollNext(api2.canScrollNext());
2325
+ }, []);
2326
+ const scrollPrev = React__namespace.useCallback(() => {
2327
+ api?.scrollPrev();
2328
+ }, [api]);
2329
+ const scrollNext = React__namespace.useCallback(() => {
2330
+ api?.scrollNext();
2331
+ }, [api]);
2332
+ const handleKeyDown = React__namespace.useCallback(
2333
+ (event) => {
2334
+ if (event.key === "ArrowLeft") {
2335
+ event.preventDefault();
2336
+ scrollPrev();
2337
+ } else if (event.key === "ArrowRight") {
2338
+ event.preventDefault();
2339
+ scrollNext();
2340
+ }
2341
+ },
2342
+ [scrollPrev, scrollNext]
2343
+ );
2344
+ React__namespace.useEffect(() => {
2345
+ if (!api || !setApi) return;
2346
+ setApi(api);
2347
+ }, [api, setApi]);
2348
+ React__namespace.useEffect(() => {
2349
+ if (!api) return;
2350
+ onSelect(api);
2351
+ api.on("reInit", onSelect);
2352
+ api.on("select", onSelect);
2353
+ return () => {
2354
+ api?.off("select", onSelect);
2355
+ };
2356
+ }, [api, onSelect]);
2357
+ return /* @__PURE__ */ jsxRuntime.jsx(
2358
+ CarouselContext.Provider,
2359
+ {
2360
+ value: {
2361
+ carouselRef,
2362
+ api,
2363
+ opts,
2364
+ orientation: orientation || (opts?.axis === "y" ? "vertical" : "horizontal"),
2365
+ scrollPrev,
2366
+ scrollNext,
2367
+ canScrollPrev,
2368
+ canScrollNext
2369
+ },
2370
+ children: /* @__PURE__ */ jsxRuntime.jsx(
2371
+ "div",
2372
+ {
2373
+ onKeyDownCapture: handleKeyDown,
2374
+ className: button.cn("relative", className),
2375
+ role: "region",
2376
+ "aria-roledescription": "carousel",
2377
+ "data-slot": "carousel",
2378
+ ...props,
2379
+ children
2380
+ }
2381
+ )
2382
+ }
2383
+ );
2384
+ }
2385
+ function CarouselContent({ className, ...props }) {
2386
+ const { carouselRef, orientation } = useCarousel();
2387
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { ref: carouselRef, className: "overflow-hidden", "data-slot": "carousel-content", children: /* @__PURE__ */ jsxRuntime.jsx(
2388
+ "div",
2389
+ {
2390
+ className: button.cn("flex", orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col", className),
2391
+ ...props
2392
+ }
2393
+ ) });
2394
+ }
2395
+ function CarouselItem({ className, ...props }) {
2396
+ const { orientation } = useCarousel();
2397
+ return /* @__PURE__ */ jsxRuntime.jsx(
2398
+ "div",
2399
+ {
2400
+ role: "group",
2401
+ "aria-roledescription": "slide",
2402
+ "data-slot": "carousel-item",
2403
+ className: button.cn(
2404
+ "min-w-0 shrink-0 grow-0 basis-full",
2405
+ orientation === "horizontal" ? "pl-4" : "pt-4",
2406
+ className
2407
+ ),
2408
+ ...props
2409
+ }
2410
+ );
2411
+ }
2412
+ function CarouselPrevious({
2413
+ className,
2414
+ variant = "outline",
2415
+ size = "icon",
2416
+ ...props
2417
+ }) {
2418
+ const { orientation, scrollPrev, canScrollPrev } = useCarousel();
2419
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2420
+ button.Button,
2421
+ {
2422
+ "data-slot": "carousel-previous",
2423
+ variant,
2424
+ size,
2425
+ className: button.cn(
2426
+ "absolute size-8 rounded-full",
2427
+ orientation === "horizontal" ? "top-1/2 -left-12 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
2428
+ className
2429
+ ),
2430
+ disabled: !canScrollPrev,
2431
+ onClick: scrollPrev,
2432
+ ...props,
2433
+ children: [
2434
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowLeft, {}),
2435
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Previous slide" })
2436
+ ]
2437
+ }
2438
+ );
2439
+ }
2440
+ function CarouselNext({
2441
+ className,
2442
+ variant = "outline",
2443
+ size = "icon",
2444
+ ...props
2445
+ }) {
2446
+ const { orientation, scrollNext, canScrollNext } = useCarousel();
2447
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2448
+ button.Button,
2449
+ {
2450
+ "data-slot": "carousel-next",
2451
+ variant,
2452
+ size,
2453
+ className: button.cn(
2454
+ "absolute size-8 rounded-full",
2455
+ orientation === "horizontal" ? "top-1/2 -right-12 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
2456
+ className
2457
+ ),
2458
+ disabled: !canScrollNext,
2459
+ onClick: scrollNext,
2460
+ ...props,
2461
+ children: [
2462
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowRight, {}),
2463
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Next slide" })
2464
+ ]
2465
+ }
2466
+ );
2467
+ }
2468
+ const StepperContext = React__namespace.createContext(void 0);
2469
+ const useStepperContext = () => {
2470
+ const context = React__namespace.useContext(StepperContext);
2471
+ if (!context) throw new Error("useStepperContext must be used within a Stepper");
2472
+ return context;
2473
+ };
2474
+ const Stepper = React__namespace.forwardRef(
2475
+ ({ currentStep, orientation = "horizontal", className, children, ...props }, ref) => {
2476
+ const totalSteps = React__namespace.Children.count(children);
2477
+ return /* @__PURE__ */ jsxRuntime.jsx(StepperContext.Provider, { value: { currentStep, totalSteps, orientation }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: button.cn("w-full", className), ...props, children: /* @__PURE__ */ jsxRuntime.jsx(
2478
+ "div",
2479
+ {
2480
+ className: button.cn(
2481
+ orientation === "horizontal" ? "flex items-start justify-between" : "flex flex-col gap-0"
2482
+ ),
2483
+ role: "list",
2484
+ "aria-label": `Progresso: etapa ${currentStep} de ${totalSteps}`,
2485
+ children
2486
+ }
2487
+ ) }) });
2488
+ }
2489
+ );
2490
+ Stepper.displayName = "Stepper";
2491
+ const Step = React__namespace.forwardRef(
2492
+ ({ step, label, description, error = false, className, ...props }, ref) => {
2493
+ const { currentStep, totalSteps, orientation } = useStepperContext();
2494
+ const isActive = step === currentStep;
2495
+ const isCompleted = step < currentStep && !error;
2496
+ const isFirst = step === 1;
2497
+ const isLast = step === totalSteps;
2498
+ const circleClasses = button.cn(
2499
+ "relative flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full border-2 transition-colors",
2500
+ isActive && !error && "border-primary bg-primary text-primary-foreground",
2501
+ isCompleted && "border-primary bg-primary text-primary-foreground",
2502
+ error && "border-destructive bg-destructive text-destructive-foreground",
2503
+ !isActive && !isCompleted && !error && "border-muted bg-background text-muted-foreground"
2504
+ );
2505
+ const connectorClasses = (filled) => button.cn("transition-colors", filled ? "bg-primary" : "bg-muted");
2506
+ if (orientation === "vertical") {
2507
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2508
+ "div",
2509
+ {
2510
+ ref,
2511
+ className: button.cn("flex gap-4", className),
2512
+ role: "listitem",
2513
+ "aria-current": isActive ? "step" : void 0,
2514
+ "aria-label": `Etapa ${step}: ${label}${isCompleted ? ", concluída" : isActive ? ", atual" : ""}`,
2515
+ ...props,
2516
+ children: [
2517
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center", children: [
2518
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: circleClasses, children: error ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-5 w-5" }) : isCompleted ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-5 w-5" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { children: step }) }),
2519
+ !isLast && /* @__PURE__ */ jsxRuntime.jsx(
2520
+ "div",
2521
+ {
2522
+ className: button.cn(
2523
+ "w-0.5 flex-1 min-h-[2rem] mt-1",
2524
+ connectorClasses(step < currentStep)
2525
+ )
2526
+ }
2527
+ )
2528
+ ] }),
2529
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: button.cn("pb-6", isLast && "pb-0"), children: [
2530
+ /* @__PURE__ */ jsxRuntime.jsx(
2531
+ "div",
2532
+ {
2533
+ className: button.cn(
2534
+ "transition-colors",
2535
+ isActive || error ? "text-foreground" : "text-muted-foreground"
2536
+ ),
2537
+ children: label
2538
+ }
2539
+ ),
2540
+ description && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1 text-xs text-muted-foreground", children: description })
2541
+ ] })
2542
+ ]
2543
+ }
2544
+ );
2545
+ }
2546
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2547
+ "div",
2548
+ {
2549
+ ref,
2550
+ className: button.cn("flex flex-1 flex-col items-center", className),
2551
+ role: "listitem",
2552
+ "aria-current": isActive ? "step" : void 0,
2553
+ "aria-label": `Etapa ${step}: ${label}${isCompleted ? ", concluída" : isActive ? ", atual" : ""}`,
2554
+ ...props,
2555
+ children: [
2556
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full items-start", children: [
2557
+ step > 1 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: button.cn("h-0.5 flex-1 mt-[18px]", connectorClasses(step <= currentStep)) }),
2558
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: circleClasses, children: error ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-5 w-5" }) : isCompleted ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-5 w-5" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { children: step }) }),
2559
+ step < totalSteps && /* @__PURE__ */ jsxRuntime.jsx("div", { className: button.cn("h-0.5 flex-1 mt-[18px]", connectorClasses(step < currentStep)) })
2560
+ ] }),
2561
+ /* @__PURE__ */ jsxRuntime.jsxs(
2562
+ "div",
2563
+ {
2564
+ className: button.cn(
2565
+ "mt-2 px-1",
2566
+ isFirst && "text-left self-start",
2567
+ isLast && "text-right self-end",
2568
+ !isFirst && !isLast && "text-center w-full"
2569
+ ),
2570
+ children: [
2571
+ /* @__PURE__ */ jsxRuntime.jsx(
2572
+ "div",
2573
+ {
2574
+ className: button.cn(
2575
+ "transition-colors",
2576
+ isActive || error ? "text-foreground" : "text-muted-foreground"
2577
+ ),
2578
+ children: label
2579
+ }
2580
+ ),
2581
+ description && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1 text-xs text-muted-foreground", children: description })
2582
+ ]
2583
+ }
2584
+ )
2585
+ ]
2586
+ }
2587
+ );
2588
+ }
2589
+ );
2590
+ Step.displayName = "Step";
2591
+ function useStepper({
2592
+ totalSteps,
2593
+ initialStep = 1,
2594
+ step: controlledStep,
2595
+ onStepChange,
2596
+ onBeforeNext
2597
+ }) {
2598
+ const [internalStep, setInternalStep] = React.useState(
2599
+ () => Math.min(Math.max(1, initialStep), totalSteps)
2600
+ );
2601
+ const isControlled = controlledStep !== void 0;
2602
+ const currentStep = isControlled ? controlledStep : internalStep;
2603
+ const setStep = React.useCallback(
2604
+ (s) => {
2605
+ const clamped = Math.min(Math.max(1, s), totalSteps);
2606
+ if (!isControlled) setInternalStep(clamped);
2607
+ onStepChange?.(clamped);
2608
+ },
2609
+ [isControlled, onStepChange, totalSteps]
2610
+ );
2611
+ const isFirstStep = currentStep === 1;
2612
+ const isLastStep = currentStep === totalSteps;
2613
+ const canGoPrev = currentStep > 1;
2614
+ const canGoNext = currentStep < totalSteps;
2615
+ const next = React.useCallback(async () => {
2616
+ if (!canGoNext) return;
2617
+ if (onBeforeNext) {
2618
+ const allowed = await onBeforeNext(currentStep);
2619
+ if (!allowed) return;
2620
+ }
2621
+ setStep(currentStep + 1);
2622
+ }, [canGoNext, currentStep, onBeforeNext, setStep]);
2623
+ const prev = React.useCallback(() => {
2624
+ if (!canGoPrev) return;
2625
+ setStep(currentStep - 1);
2626
+ }, [canGoPrev, currentStep, setStep]);
2627
+ const goTo = React.useCallback((s) => setStep(s), [setStep]);
2628
+ const reset = React.useCallback(() => setStep(1), [setStep]);
2629
+ return {
2630
+ currentStep,
2631
+ totalSteps,
2632
+ isFirstStep,
2633
+ isLastStep,
2634
+ canGoPrev,
2635
+ canGoNext,
2636
+ next,
2637
+ prev,
2638
+ goTo,
2639
+ reset
2640
+ };
2641
+ }
2642
+ function useFileUpload({
2643
+ maxFiles = 1,
2644
+ maxSize = 5 * 1024 * 1024,
2645
+ onFilesChange,
2646
+ onError,
2647
+ disabled = false
2648
+ } = {}) {
2649
+ const [files, setFiles] = React.useState([]);
2650
+ const [dragActive, setDragActive] = React.useState(false);
2651
+ const [errorMessage, setErrorMessage] = React.useState(null);
2652
+ const inputRef = React.useRef(null);
2653
+ const handleFiles = React.useCallback(
2654
+ (newFiles) => {
2655
+ if (!newFiles) return;
2656
+ setErrorMessage(null);
2657
+ const filesArray = Array.from(newFiles);
2658
+ const oversized = filesArray.filter((f) => f.size > maxSize);
2659
+ const validFiles = filesArray.filter((f) => f.size <= maxSize);
2660
+ if (oversized.length > 0) {
2661
+ const limitMB = (maxSize / 1024 / 1024).toFixed(0);
2662
+ setErrorMessage(
2663
+ `${oversized.length} file(s) exceed the ${limitMB}MB limit and were not added.`
2664
+ );
2665
+ onError?.(oversized, "size");
2666
+ }
2667
+ const merged = maxFiles === 1 ? validFiles.slice(0, 1) : [...files, ...validFiles].slice(0, maxFiles);
2668
+ const countRejected = maxFiles === 1 ? validFiles.slice(1) : [...files, ...validFiles].slice(maxFiles);
2669
+ if (countRejected.length > 0) {
2670
+ setErrorMessage(
2671
+ `Only ${maxFiles} file(s) allowed. ${countRejected.length} file(s) were not added.`
2672
+ );
2673
+ onError?.(countRejected, "count");
2674
+ }
2675
+ setFiles(merged);
2676
+ onFilesChange?.(merged);
2677
+ },
2678
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2679
+ [files, maxFiles, maxSize, onError, onFilesChange]
2680
+ );
2681
+ const handleDrag = React.useCallback((e) => {
2682
+ e.preventDefault();
2683
+ e.stopPropagation();
2684
+ if (e.type === "dragenter" || e.type === "dragover") {
2685
+ setDragActive(true);
2686
+ } else if (e.type === "dragleave") {
2687
+ setDragActive(false);
2688
+ }
2689
+ }, []);
2690
+ const handleDrop = React.useCallback(
2691
+ (e) => {
2692
+ e.preventDefault();
2693
+ e.stopPropagation();
2694
+ setDragActive(false);
2695
+ if (disabled) return;
2696
+ handleFiles(e.dataTransfer.files);
2697
+ },
2698
+ [disabled, handleFiles]
2699
+ );
2700
+ const handleChange = React.useCallback(
2701
+ (e) => {
2702
+ e.preventDefault();
2703
+ if (disabled) return;
2704
+ handleFiles(e.target.files);
2705
+ },
2706
+ [disabled, handleFiles]
2707
+ );
2708
+ const removeFile = React.useCallback(
2709
+ (index) => {
2710
+ setFiles((prev) => {
2711
+ const updated = prev.filter((_, i) => i !== index);
2712
+ onFilesChange?.(updated);
2713
+ if (updated.length === 0) setErrorMessage(null);
2714
+ return updated;
2715
+ });
2716
+ },
2717
+ [onFilesChange]
2718
+ );
2719
+ const openFileDialog = React.useCallback(() => {
2720
+ if (!disabled) {
2721
+ setErrorMessage(null);
2722
+ inputRef.current?.click();
2723
+ }
2724
+ }, [disabled]);
2725
+ return {
2726
+ files,
2727
+ dragActive,
2728
+ errorMessage,
2729
+ inputRef,
2730
+ handleFiles,
2731
+ handleDrag,
2732
+ handleDrop,
2733
+ handleChange,
2734
+ removeFile,
2735
+ openFileDialog
2736
+ };
2737
+ }
2738
+ const FileUpload = React__namespace.forwardRef(
2739
+ ({
2740
+ className,
2741
+ onFilesChange,
2742
+ maxFiles = 1,
2743
+ maxSize = 5 * 1024 * 1024,
2744
+ // 5MB default
2745
+ showPreview = true,
2746
+ onError,
2747
+ accept,
2748
+ disabled,
2749
+ ...props
2750
+ }, ref) => {
2751
+ const {
2752
+ files,
2753
+ dragActive,
2754
+ errorMessage,
2755
+ inputRef,
2756
+ handleDrag,
2757
+ handleDrop,
2758
+ handleChange,
2759
+ removeFile,
2760
+ openFileDialog
2761
+ } = useFileUpload({ maxFiles, maxSize, onFilesChange, onError, disabled });
2762
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: button.cn("w-full", className), children: [
2763
+ /* @__PURE__ */ jsxRuntime.jsxs(
2764
+ "div",
2765
+ {
2766
+ onDragEnter: handleDrag,
2767
+ onDragLeave: handleDrag,
2768
+ onDragOver: handleDrag,
2769
+ onDrop: handleDrop,
2770
+ onClick: openFileDialog,
2771
+ className: button.cn(
2772
+ "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",
2773
+ dragActive && "border-primary bg-primary/5",
2774
+ errorMessage && "border-destructive/50",
2775
+ disabled && "cursor-not-allowed opacity-50"
2776
+ ),
2777
+ children: [
2778
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Upload, { className: "mb-4 h-10 w-10 text-muted-foreground" }),
2779
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "mb-2 text-foreground", children: [
2780
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: "Click to upload" }),
2781
+ " or drag and drop"
2782
+ ] }),
2783
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-muted-foreground", children: [
2784
+ maxFiles > 1 ? `Up to ${maxFiles} files` : "1 file",
2785
+ " • Max",
2786
+ " ",
2787
+ (maxSize / 1024 / 1024).toFixed(0),
2788
+ "MB"
2789
+ ] }),
2790
+ /* @__PURE__ */ jsxRuntime.jsx(
2791
+ "input",
2792
+ {
2793
+ ...props,
2794
+ ref: inputRef,
2795
+ type: "file",
2796
+ className: "hidden",
2797
+ onChange: handleChange,
2798
+ multiple: maxFiles > 1,
2799
+ accept,
2800
+ disabled
2801
+ }
2802
+ )
2803
+ ]
2804
+ }
2805
+ ),
2806
+ errorMessage && /* @__PURE__ */ jsxRuntime.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: [
2807
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertCircle, { className: "h-4 w-4 shrink-0" }),
2808
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: errorMessage })
2809
+ ] }),
2810
+ showPreview && files.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-4 space-y-2", children: files.map((file, index) => /* @__PURE__ */ jsxRuntime.jsxs(
2811
+ "div",
2812
+ {
2813
+ className: "flex items-center justify-between rounded-[var(--radius)] border border-border bg-card p-3",
2814
+ children: [
2815
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
2816
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.FileIcon, { className: "h-5 w-5 text-muted-foreground" }),
2817
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2818
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-foreground", children: file.name }),
2819
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-muted-foreground", children: [
2820
+ (file.size / 1024).toFixed(2),
2821
+ " KB"
2822
+ ] })
2823
+ ] })
2824
+ ] }),
2825
+ /* @__PURE__ */ jsxRuntime.jsx(
2826
+ button.Button,
2827
+ {
2828
+ type: "button",
2829
+ variant: "ghost",
2830
+ size: "sm",
2831
+ onClick: (e) => {
2832
+ e.stopPropagation();
2833
+ removeFile(index);
2834
+ },
2835
+ disabled,
2836
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" })
2837
+ }
2838
+ )
2839
+ ]
2840
+ },
2841
+ index
2842
+ )) })
2843
+ ] });
2844
+ }
2845
+ );
2846
+ FileUpload.displayName = "FileUpload";
2847
+ const Rating = React__namespace.forwardRef(
2848
+ ({
2849
+ className,
2850
+ value = 0,
2851
+ onChange,
2852
+ max = 5,
2853
+ readonly = false,
2854
+ disabled = false,
2855
+ size = "md",
2856
+ showValue = false,
2857
+ allowHalf = false,
2858
+ getAriaLabel,
2859
+ ...props
2860
+ }, ref) => {
2861
+ const [hoverValue, setHoverValue] = React__namespace.useState(null);
2862
+ const isInteractive = !readonly && !disabled;
2863
+ const sizeStyles = {
2864
+ sm: "h-4 w-4",
2865
+ md: "h-5 w-5",
2866
+ lg: "h-6 w-6"
2867
+ };
2868
+ const handleClick = (rating) => {
2869
+ if (isInteractive) onChange?.(rating);
2870
+ };
2871
+ const handleMouseMove = (e, rating) => {
2872
+ if (!isInteractive) return;
2873
+ if (allowHalf) {
2874
+ const rect = e.currentTarget.getBoundingClientRect();
2875
+ setHoverValue(e.clientX - rect.left < rect.width / 2 ? rating - 0.5 : rating);
2876
+ } else {
2877
+ setHoverValue(rating);
2878
+ }
2879
+ };
2880
+ const handleMouseLeave = () => {
2881
+ if (isInteractive) setHoverValue(null);
2882
+ };
2883
+ const handleClickWithHalf = (e, rating) => {
2884
+ if (!isInteractive) return;
2885
+ if (allowHalf) {
2886
+ const rect = e.currentTarget.getBoundingClientRect();
2887
+ const half = e.clientX - rect.left < rect.width / 2 ? rating - 0.5 : rating;
2888
+ onChange?.(half);
2889
+ } else {
2890
+ handleClick(rating);
2891
+ }
2892
+ };
2893
+ const displayValue = hoverValue ?? value;
2894
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2895
+ "div",
2896
+ {
2897
+ ref,
2898
+ className: button.cn("flex items-center gap-1", disabled && "opacity-50", className),
2899
+ ...props,
2900
+ children: [
2901
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-0.5", role: "group", "aria-label": "Rating", children: Array.from({ length: max }, (_, index) => {
2902
+ const rating = index + 1;
2903
+ const isFull = rating <= displayValue;
2904
+ const isHalf = allowHalf && !isFull && rating - 0.5 <= displayValue;
2905
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2906
+ "button",
2907
+ {
2908
+ type: "button",
2909
+ onClick: (e) => handleClickWithHalf(e, rating),
2910
+ onMouseMove: (e) => handleMouseMove(e, rating),
2911
+ onMouseLeave: handleMouseLeave,
2912
+ disabled: readonly || disabled,
2913
+ "aria-label": getAriaLabel ? getAriaLabel(rating, max) : `${rating} / ${max}`,
2914
+ className: button.cn(
2915
+ "relative transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
2916
+ isInteractive && "cursor-pointer hover:scale-110",
2917
+ !isInteractive && "cursor-default"
2918
+ ),
2919
+ children: [
2920
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Star, { className: button.cn(sizeStyles[size], "fill-none text-muted-foreground") }),
2921
+ (isFull || isHalf) && /* @__PURE__ */ jsxRuntime.jsx(
2922
+ "span",
2923
+ {
2924
+ className: button.cn("absolute inset-0 overflow-hidden", isHalf ? "w-1/2" : "w-full"),
2925
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Star, { className: button.cn(sizeStyles[size], "fill-warning text-warning") })
2926
+ }
2927
+ )
2928
+ ]
2929
+ },
2930
+ index
2931
+ );
2932
+ }) }),
2933
+ showValue && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-2 text-sm text-muted-foreground", children: value % 1 === 0 ? value.toFixed(0) : value.toFixed(1) })
2934
+ ]
2935
+ }
2936
+ );
2937
+ }
2938
+ );
2939
+ Rating.displayName = "Rating";
2940
+ const Search = React__namespace.forwardRef(
2941
+ ({
2942
+ className,
2943
+ containerClassName,
2944
+ onSearch,
2945
+ onClear,
2946
+ onChange,
2947
+ size = "md",
2948
+ searchLabel = "Search",
2949
+ clearLabel = "Clear search",
2950
+ value: controlledValue,
2951
+ defaultValue,
2952
+ ...props
2953
+ }, ref) => {
2954
+ const isControlled = controlledValue !== void 0;
2955
+ const [internalValue, setInternalValue] = React__namespace.useState(
2956
+ isControlled ? "" : defaultValue ?? ""
2957
+ );
2958
+ const displayValue = isControlled ? controlledValue : internalValue;
2959
+ const sizeClasses = {
2960
+ sm: "h-8 px-8 py-1 text-sm",
2961
+ md: "h-10 px-10 py-2 text-base",
2962
+ lg: "h-12 px-12 py-3 text-base"
2963
+ };
2964
+ const iconSizeClasses = {
2965
+ sm: "left-2 h-3.5 w-3.5",
2966
+ md: "left-3 h-4 w-4",
2967
+ lg: "left-4 h-5 w-5"
2968
+ };
2969
+ const clearSizeClasses = {
2970
+ sm: "right-2",
2971
+ md: "right-3",
2972
+ lg: "right-4"
2973
+ };
2974
+ const handleChange = (e) => {
2975
+ const newValue = e.target.value;
2976
+ if (!isControlled) setInternalValue(newValue);
2977
+ onChange?.(e);
2978
+ onSearch?.(newValue);
2979
+ };
2980
+ const handleClear = () => {
2981
+ if (!isControlled) setInternalValue("");
2982
+ onClear?.();
2983
+ onSearch?.("");
2984
+ };
2985
+ const handleKeyDown = (e) => {
2986
+ if (e.key === "Escape") {
2987
+ handleClear();
2988
+ }
2989
+ props.onKeyDown?.(e);
2990
+ };
2991
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: button.cn("relative w-full", containerClassName), children: [
2992
+ /* @__PURE__ */ jsxRuntime.jsx(
2993
+ lucideReact.Search,
2994
+ {
2995
+ "aria-hidden": "true",
2996
+ className: button.cn(
2997
+ "absolute top-1/2 -translate-y-1/2 text-muted-foreground",
2998
+ iconSizeClasses[size]
2999
+ )
3000
+ }
3001
+ ),
3002
+ /* @__PURE__ */ jsxRuntime.jsx(
3003
+ "input",
3004
+ {
3005
+ ref,
3006
+ type: "text",
3007
+ value: displayValue,
3008
+ onChange: handleChange,
3009
+ onKeyDown: handleKeyDown,
3010
+ className: button.cn(
3011
+ "flex w-full rounded-[var(--radius)] border border-border bg-background text-foreground transition-colors outline-none",
3012
+ "placeholder:text-muted-foreground",
3013
+ "focus:ring-2 focus:ring-primary focus:border-transparent",
3014
+ "disabled:cursor-not-allowed disabled:opacity-50",
3015
+ sizeClasses[size],
3016
+ className
3017
+ ),
3018
+ "aria-label": props.placeholder || searchLabel,
3019
+ ...props
3020
+ }
3021
+ ),
3022
+ displayValue && /* @__PURE__ */ jsxRuntime.jsx(
3023
+ "button",
3024
+ {
3025
+ type: "button",
3026
+ onClick: handleClear,
3027
+ "aria-label": clearLabel,
3028
+ className: button.cn(
3029
+ "absolute top-1/2 -translate-y-1/2 text-muted-foreground transition-colors hover:text-foreground focus:outline-none",
3030
+ clearSizeClasses[size]
3031
+ ),
3032
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" })
3033
+ }
3034
+ )
3035
+ ] });
3036
+ }
3037
+ );
3038
+ Search.displayName = "Search";
3039
+ 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" };
3040
+ const RouteMapContent = React.forwardRef(
3041
+ ({ apiKey, ...props }, ref) => {
3042
+ const { isLoaded, loadError, load } = googleMapsLoader.useGoogleMapsLoader();
3043
+ const {
3044
+ origin,
3045
+ destination,
3046
+ waypoints = [],
3047
+ travelMode = "DRIVING",
3048
+ height = "450px",
3049
+ mapContainerClassName,
3050
+ disableDefaultUI = false,
3051
+ zoomControl = true,
3052
+ streetViewControl = false,
3053
+ mapTypeControl = false,
3054
+ fullscreenControl = true,
3055
+ onRouteCalculated,
3056
+ className,
3057
+ ...divProps
3058
+ } = props;
3059
+ const mapRef = React.useRef(null);
3060
+ const gmpMapRef = React.useRef(null);
3061
+ const directionsRendererRef = React.useRef(null);
3062
+ React.useRef(false);
3063
+ const isCalculatingRef = React.useRef(false);
3064
+ React.useEffect(() => {
3065
+ if (!isLoaded && apiKey && !loadError && load) {
3066
+ load(apiKey).catch(console.error);
3067
+ }
3068
+ }, [isLoaded, apiKey, loadError, load]);
3069
+ React.useEffect(() => {
3070
+ if (!isLoaded || !gmpMapRef.current) return;
3071
+ const setupMap = (map) => {
3072
+ mapRef.current = map;
3073
+ const computedStyle = getComputedStyle(document.documentElement);
3074
+ const primaryColor = computedStyle.getPropertyValue("--primary").trim() || "#4F46E5";
3075
+ if (!directionsRendererRef.current) {
3076
+ directionsRendererRef.current = new google.maps.DirectionsRenderer({
3077
+ map,
3078
+ suppressMarkers: false,
3079
+ polylineOptions: {
3080
+ strokeColor: primaryColor,
3081
+ strokeWeight: 5,
3082
+ strokeOpacity: 0.8
3083
+ }
3084
+ });
3085
+ } else {
3086
+ directionsRendererRef.current.setMap(map);
3087
+ }
3088
+ };
3089
+ const gmpMap = gmpMapRef.current;
3090
+ if (gmpMap.innerMap) {
3091
+ setupMap(gmpMap.innerMap);
3092
+ } else {
3093
+ const interval = setInterval(() => {
3094
+ if (gmpMap.innerMap) {
3095
+ setupMap(gmpMap.innerMap);
3096
+ clearInterval(interval);
3097
+ }
3098
+ }, 100);
3099
+ return () => clearInterval(interval);
3100
+ }
3101
+ return () => {
3102
+ if (directionsRendererRef.current) {
3103
+ directionsRendererRef.current.setMap(null);
3104
+ }
3105
+ mapRef.current = null;
3106
+ };
3107
+ }, [isLoaded]);
3108
+ React.useEffect(() => {
3109
+ if (gmpMapRef.current && origin) {
3110
+ gmpMapRef.current.center = origin;
3111
+ }
3112
+ }, [origin.lat, origin.lng]);
3113
+ React.useEffect(() => {
3114
+ if (gmpMapRef.current) {
3115
+ gmpMapRef.current.zoom = 13;
3116
+ }
3117
+ }, []);
3118
+ React.useEffect(() => {
3119
+ const map = mapRef.current;
3120
+ const renderer = directionsRendererRef.current;
3121
+ if (!map || !renderer || !isLoaded || isCalculatingRef.current) return;
3122
+ if (!origin || !destination) return;
3123
+ isCalculatingRef.current = true;
3124
+ const directionsService = new google.maps.DirectionsService();
3125
+ const request = {
3126
+ origin,
3127
+ destination,
3128
+ waypoints: waypoints.map((wp) => ({
3129
+ location: wp,
3130
+ stopover: true
3131
+ })),
3132
+ travelMode: google.maps.TravelMode[travelMode]
3133
+ };
3134
+ directionsService.route(request, (result, status) => {
3135
+ isCalculatingRef.current = false;
3136
+ if (status === "OK" && result) {
3137
+ renderer.setDirections(result);
3138
+ const route = result.routes[0];
3139
+ if (route?.legs?.length > 0 && onRouteCalculated) {
3140
+ let totalDistance = 0;
3141
+ let totalDuration = 0;
3142
+ route.legs.forEach((leg) => {
3143
+ if (leg.distance) totalDistance += leg.distance.value;
3144
+ if (leg.duration) totalDuration += leg.duration.value;
3145
+ });
3146
+ const distanceKm = (totalDistance / 1e3).toFixed(1);
3147
+ const distanceText = `${distanceKm} km`;
3148
+ const hours = Math.floor(totalDuration / 3600);
3149
+ const minutes = Math.floor(totalDuration % 3600 / 60);
3150
+ const durationText = hours > 0 ? `${hours}h ${minutes}min` : `${minutes} min`;
3151
+ onRouteCalculated(distanceText, durationText);
3152
+ }
3153
+ }
3154
+ });
3155
+ }, [
3156
+ isLoaded,
3157
+ origin.lat,
3158
+ origin.lng,
3159
+ destination.lat,
3160
+ destination.lng,
3161
+ travelMode,
3162
+ mapRef.current
3163
+ ]);
3164
+ if (loadError) {
3165
+ return /* @__PURE__ */ jsxRuntime.jsx(
3166
+ "div",
3167
+ {
3168
+ ref,
3169
+ className: button.cn(
3170
+ "relative rounded-[var(--radius-card)] border border-destructive/50 overflow-hidden bg-destructive/5",
3171
+ className
3172
+ ),
3173
+ style: { height },
3174
+ ...divProps,
3175
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center space-y-2 p-6", children: [
3176
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-destructive", children: /* @__PURE__ */ jsxRuntime.jsx(
3177
+ "svg",
3178
+ {
3179
+ className: "w-12 h-12 mx-auto",
3180
+ fill: "none",
3181
+ stroke: "currentColor",
3182
+ viewBox: "0 0 24 24",
3183
+ children: /* @__PURE__ */ jsxRuntime.jsx(
3184
+ "path",
3185
+ {
3186
+ strokeLinecap: "round",
3187
+ strokeLinejoin: "round",
3188
+ strokeWidth: 2,
3189
+ 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"
3190
+ }
3191
+ )
3192
+ }
3193
+ ) }),
3194
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-foreground", children: "Failed to load Google Maps" }),
3195
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: "Check API key in Settings" })
3196
+ ] }) })
3197
+ }
3198
+ );
3199
+ }
3200
+ if (!isLoaded) {
3201
+ return /* @__PURE__ */ jsxRuntime.jsx(
3202
+ "div",
3203
+ {
3204
+ ref,
3205
+ className: button.cn(
3206
+ "relative rounded-[var(--radius-card)] border border-border overflow-hidden bg-muted animate-pulse",
3207
+ className
3208
+ ),
3209
+ style: { height },
3210
+ ...divProps
3211
+ }
3212
+ );
3213
+ }
3214
+ return /* @__PURE__ */ jsxRuntime.jsx(
3215
+ "div",
3216
+ {
3217
+ ref,
3218
+ className: button.cn(
3219
+ "relative rounded-[var(--radius-card)] border border-border overflow-hidden",
3220
+ className
3221
+ ),
3222
+ style: { height },
3223
+ ...divProps,
3224
+ children: /* @__PURE__ */ jsxRuntime.jsx(
3225
+ "gmp-map",
3226
+ {
3227
+ ref: gmpMapRef,
3228
+ style: { height: "100%", width: "100%", display: "block" },
3229
+ "map-id": props.mapId || "xertica-route-map"
3230
+ }
3231
+ )
3232
+ }
3233
+ );
3234
+ }
3235
+ );
3236
+ RouteMapContent.displayName = "RouteMapContent";
3237
+ const RouteMap = React.forwardRef((props, ref) => {
3238
+ const { isLoaded, loadError } = googleMapsLoader.useGoogleMapsLoader();
3239
+ const effectiveApiKey = props.apiKey || typeof { url: typeof document === "undefined" ? require("url").pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === "SCRIPT" && _documentCurrentScript.src || new URL("AssistantChart-D_PTeu8P.cjs", document.baseURI).href } !== "undefined" && __vite_import_meta_env__ && "AIzaSyCj19NndSgZOb8057q24UbJtSsfVJiyVdo" || "";
3240
+ const isValidKey = effectiveApiKey && effectiveApiKey !== "YOUR_GOOGLE_MAPS_API_KEY_HERE" && effectiveApiKey.startsWith("AIza");
3241
+ if (isLoaded || isValidKey || loadError) {
3242
+ return /* @__PURE__ */ jsxRuntime.jsx(RouteMapContent, { ref, ...props, apiKey: effectiveApiKey });
3243
+ }
3244
+ const isScriptInjected = typeof document !== "undefined" && !!document.querySelector('script[src*="maps.googleapis.com/maps/api/js"]');
3245
+ if (isScriptInjected) {
3246
+ return /* @__PURE__ */ jsxRuntime.jsx(RouteMapContent, { ref, ...props, apiKey: effectiveApiKey });
3247
+ }
3248
+ const {
3249
+ origin,
3250
+ destination,
3251
+ waypoints,
3252
+ travelMode,
3253
+ height,
3254
+ apiKey,
3255
+ mapContainerClassName,
3256
+ disableDefaultUI,
3257
+ zoomControl,
3258
+ streetViewControl,
3259
+ mapTypeControl,
3260
+ fullscreenControl,
3261
+ onRouteCalculated,
3262
+ ...divProps
3263
+ } = props;
3264
+ return /* @__PURE__ */ jsxRuntime.jsx(
3265
+ "div",
3266
+ {
3267
+ ref,
3268
+ className: button.cn(
3269
+ "relative rounded-[var(--radius-card)] border border-border overflow-hidden bg-muted",
3270
+ props.className
3271
+ ),
3272
+ style: { height: props.height || "450px" },
3273
+ ...divProps,
3274
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-gradient-to-br from-muted/50 to-muted", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center space-y-3 p-6", children: [
3275
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-16 h-16 mx-auto bg-primary/10 rounded-full flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsxs(
3276
+ "svg",
3277
+ {
3278
+ className: "w-8 h-8 text-primary",
3279
+ fill: "none",
3280
+ stroke: "currentColor",
3281
+ viewBox: "0 0 24 24",
3282
+ children: [
3283
+ /* @__PURE__ */ jsxRuntime.jsx(
3284
+ "path",
3285
+ {
3286
+ strokeLinecap: "round",
3287
+ strokeLinejoin: "round",
3288
+ strokeWidth: 2,
3289
+ 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"
3290
+ }
3291
+ ),
3292
+ /* @__PURE__ */ jsxRuntime.jsx(
3293
+ "path",
3294
+ {
3295
+ strokeLinecap: "round",
3296
+ strokeLinejoin: "round",
3297
+ strokeWidth: 2,
3298
+ d: "M15 11a3 3 0 11-6 0 3 3 0 016 0z"
3299
+ }
3300
+ )
3301
+ ]
3302
+ }
3303
+ ) }),
3304
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: "Configure Google Maps API Key in Settings" })
3305
+ ] }) })
3306
+ }
3307
+ );
3308
+ });
3309
+ RouteMap.displayName = "RouteMap";
3310
+ const SimpleMap = React.forwardRef(
3311
+ ({
3312
+ center,
3313
+ address,
3314
+ markerTitle,
3315
+ markerInfo,
3316
+ showMarker = true,
3317
+ zoom = 15,
3318
+ height = "350px",
3319
+ ...props
3320
+ }, ref) => {
3321
+ const markers = showMarker && center ? [
3322
+ {
3323
+ position: center,
3324
+ title: markerTitle || address || "Location",
3325
+ info: markerInfo || address
3326
+ }
3327
+ ] : [];
3328
+ return /* @__PURE__ */ jsxRuntime.jsx(alertDialog.Map, { ref, center, zoom, height, markers, ...props });
3329
+ }
3330
+ );
3331
+ SimpleMap.displayName = "SimpleMap";
3332
+ function AssistantChart({
3333
+ data,
3334
+ config,
3335
+ categoryKey = "month",
3336
+ bars,
3337
+ xAxisFormatter,
3338
+ className
3339
+ }) {
3340
+ const resolvedBars = bars ?? Object.keys(config).map((key) => ({ dataKey: key }));
3341
+ const formatTick = xAxisFormatter ?? ((value) => value.slice(0, 3));
3342
+ return /* @__PURE__ */ jsxRuntime.jsx(richTextEditor.ChartContainer, { config, className: button.cn("min-h-[200px] w-full", className), children: /* @__PURE__ */ jsxRuntime.jsxs(RechartsPrimitive.BarChart, { accessibilityLayer: true, data, children: [
3343
+ /* @__PURE__ */ jsxRuntime.jsx(RechartsPrimitive.CartesianGrid, { vertical: false }),
3344
+ /* @__PURE__ */ jsxRuntime.jsx(
3345
+ RechartsPrimitive.XAxis,
3346
+ {
3347
+ dataKey: categoryKey,
3348
+ tickLine: false,
3349
+ tickMargin: 10,
3350
+ axisLine: false,
3351
+ tickFormatter: formatTick
3352
+ }
3353
+ ),
3354
+ /* @__PURE__ */ jsxRuntime.jsx(richTextEditor.ChartTooltip, { cursor: false, content: /* @__PURE__ */ jsxRuntime.jsx(richTextEditor.ChartTooltipContent, { indicator: "dashed" }) }),
3355
+ resolvedBars.map((bar) => /* @__PURE__ */ jsxRuntime.jsx(
3356
+ RechartsPrimitive.Bar,
3357
+ {
3358
+ dataKey: bar.dataKey,
3359
+ fill: bar.fill ?? `var(--color-${bar.dataKey})`,
3360
+ radius: bar.radius ?? 4
3361
+ },
3362
+ bar.dataKey
3363
+ ))
3364
+ ] }) });
3365
+ }
3366
+ exports.Accordion = Accordion;
3367
+ exports.AccordionContent = AccordionContent;
3368
+ exports.AccordionItem = AccordionItem;
3369
+ exports.AccordionTrigger = AccordionTrigger;
3370
+ exports.AspectRatio = AspectRatio;
3371
+ exports.AssistantChart = AssistantChart;
3372
+ exports.Calendar = Calendar;
3373
+ exports.CalendarDayButton = CalendarDayButton;
3374
+ exports.Carousel = Carousel;
3375
+ exports.CarouselContent = CarouselContent;
3376
+ exports.CarouselItem = CarouselItem;
3377
+ exports.CarouselNext = CarouselNext;
3378
+ exports.CarouselPrevious = CarouselPrevious;
3379
+ exports.Collapsible = Collapsible;
3380
+ exports.CollapsibleContent = CollapsibleContent;
3381
+ exports.CollapsibleTrigger = CollapsibleTrigger;
3382
+ exports.Command = Command;
3383
+ exports.CommandDialog = CommandDialog;
3384
+ exports.CommandEmpty = CommandEmpty;
3385
+ exports.CommandGroup = CommandGroup;
3386
+ exports.CommandInput = CommandInput;
3387
+ exports.CommandItem = CommandItem;
3388
+ exports.CommandList = CommandList;
3389
+ exports.CommandSeparator = CommandSeparator;
3390
+ exports.CommandShortcut = CommandShortcut;
3391
+ exports.ContextMenu = ContextMenu;
3392
+ exports.ContextMenuCheckboxItem = ContextMenuCheckboxItem;
3393
+ exports.ContextMenuContent = ContextMenuContent;
3394
+ exports.ContextMenuGroup = ContextMenuGroup;
3395
+ exports.ContextMenuItem = ContextMenuItem;
3396
+ exports.ContextMenuLabel = ContextMenuLabel;
3397
+ exports.ContextMenuPortal = ContextMenuPortal;
3398
+ exports.ContextMenuRadioGroup = ContextMenuRadioGroup;
3399
+ exports.ContextMenuRadioItem = ContextMenuRadioItem;
3400
+ exports.ContextMenuSeparator = ContextMenuSeparator;
3401
+ exports.ContextMenuShortcut = ContextMenuShortcut;
3402
+ exports.ContextMenuSub = ContextMenuSub;
3403
+ exports.ContextMenuSubContent = ContextMenuSubContent;
3404
+ exports.ContextMenuSubTrigger = ContextMenuSubTrigger;
3405
+ exports.ContextMenuTrigger = ContextMenuTrigger;
3406
+ exports.Drawer = Drawer;
3407
+ exports.DrawerClose = DrawerClose;
3408
+ exports.DrawerContent = DrawerContent;
3409
+ exports.DrawerDescription = DrawerDescription;
3410
+ exports.DrawerFooter = DrawerFooter;
3411
+ exports.DrawerHandle = DrawerHandle;
3412
+ exports.DrawerHeader = DrawerHeader;
3413
+ exports.DrawerOverlay = DrawerOverlay;
3414
+ exports.DrawerPortal = DrawerPortal;
3415
+ exports.DrawerTitle = DrawerTitle;
3416
+ exports.DrawerTrigger = DrawerTrigger;
3417
+ exports.FileUpload = FileUpload;
3418
+ exports.Form = Form;
3419
+ exports.FormControl = FormControl;
3420
+ exports.FormDescription = FormDescription;
3421
+ exports.FormField = FormField;
3422
+ exports.FormItem = FormItem;
3423
+ exports.FormLabel = FormLabel;
3424
+ exports.FormMessage = FormMessage;
3425
+ exports.HoverCard = HoverCard;
3426
+ exports.HoverCardContent = HoverCardContent;
3427
+ exports.HoverCardTrigger = HoverCardTrigger;
3428
+ exports.InputOTP = InputOTP;
3429
+ exports.InputOTPGroup = InputOTPGroup;
3430
+ exports.InputOTPSeparator = InputOTPSeparator;
3431
+ exports.InputOTPSlot = InputOTPSlot;
3432
+ exports.Menubar = Menubar;
3433
+ exports.MenubarCheckboxItem = MenubarCheckboxItem;
3434
+ exports.MenubarContent = MenubarContent;
3435
+ exports.MenubarGroup = MenubarGroup;
3436
+ exports.MenubarItem = MenubarItem;
3437
+ exports.MenubarLabel = MenubarLabel;
3438
+ exports.MenubarMenu = MenubarMenu;
3439
+ exports.MenubarPortal = MenubarPortal;
3440
+ exports.MenubarRadioGroup = MenubarRadioGroup;
3441
+ exports.MenubarRadioItem = MenubarRadioItem;
3442
+ exports.MenubarSeparator = MenubarSeparator;
3443
+ exports.MenubarShortcut = MenubarShortcut;
3444
+ exports.MenubarSub = MenubarSub;
3445
+ exports.MenubarSubContent = MenubarSubContent;
3446
+ exports.MenubarSubTrigger = MenubarSubTrigger;
3447
+ exports.MenubarTrigger = MenubarTrigger;
3448
+ exports.NavigationMenu = NavigationMenu;
3449
+ exports.NavigationMenuContent = NavigationMenuContent;
3450
+ exports.NavigationMenuIndicator = NavigationMenuIndicator;
3451
+ exports.NavigationMenuItem = NavigationMenuItem;
3452
+ exports.NavigationMenuLink = NavigationMenuLink;
3453
+ exports.NavigationMenuList = NavigationMenuList;
3454
+ exports.NavigationMenuTrigger = NavigationMenuTrigger;
3455
+ exports.NavigationMenuViewport = NavigationMenuViewport;
3456
+ exports.NotificationBadge = NotificationBadge;
3457
+ exports.Pagination = Pagination;
3458
+ exports.PaginationContent = PaginationContent;
3459
+ exports.PaginationEllipsis = PaginationEllipsis;
3460
+ exports.PaginationItem = PaginationItem;
3461
+ exports.PaginationLink = PaginationLink;
3462
+ exports.PaginationNext = PaginationNext;
3463
+ exports.PaginationPrevious = PaginationPrevious;
3464
+ exports.Rating = Rating;
3465
+ exports.ResizableHandle = ResizableHandle;
3466
+ exports.ResizablePanel = ResizablePanel;
3467
+ exports.ResizablePanelGroup = ResizablePanelGroup;
3468
+ exports.RouteMap = RouteMap;
3469
+ exports.Search = Search;
3470
+ exports.Sheet = Sheet;
3471
+ exports.SheetBody = SheetBody;
3472
+ exports.SheetClose = SheetClose;
3473
+ exports.SheetContent = SheetContent;
3474
+ exports.SheetDescription = SheetDescription;
3475
+ exports.SheetFooter = SheetFooter;
3476
+ exports.SheetHeader = SheetHeader;
3477
+ exports.SheetPortal = SheetPortal;
3478
+ exports.SheetTitle = SheetTitle;
3479
+ exports.SheetTrigger = SheetTrigger;
3480
+ exports.SimpleMap = SimpleMap;
3481
+ exports.StatsCard = StatsCard;
3482
+ exports.StatsCardSkeleton = StatsCardSkeleton;
3483
+ exports.Step = Step;
3484
+ exports.Stepper = Stepper;
3485
+ exports.Timeline = Timeline;
3486
+ exports.TimelineContent = TimelineContent;
3487
+ exports.TimelineDescription = TimelineDescription;
3488
+ exports.TimelineDot = TimelineDot;
3489
+ exports.TimelineHeading = TimelineHeading;
3490
+ exports.TimelineItem = TimelineItem;
3491
+ exports.TimelineTime = TimelineTime;
3492
+ exports.Toggle = Toggle;
3493
+ exports.ToggleGroup = ToggleGroup;
3494
+ exports.ToggleGroupItem = ToggleGroupItem;
3495
+ exports.TreeView = TreeView;
3496
+ exports.navigationMenuTriggerStyle = navigationMenuTriggerStyle;
3497
+ exports.toggleVariants = toggleVariants;
3498
+ exports.useFileUpload = useFileUpload;
3499
+ exports.useFormField = useFormField;
3500
+ exports.usePagination = usePagination;
3501
+ exports.useStepper = useStepper;
3502
+ exports.useStepperContext = useStepperContext;
3503
+ exports.useTreeView = useTreeView;