@tyroneross/navgator 0.2.0 → 0.2.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 (338) hide show
  1. package/dist/cli/index.js +1 -1
  2. package/package.json +1 -1
  3. package/web/.next/standalone/web/.next/BUILD_ID +1 -0
  4. package/web/.next/standalone/web/.next/app-path-routes-manifest.json +13 -0
  5. package/web/.next/standalone/web/.next/build-manifest.json +20 -0
  6. package/web/.next/standalone/web/.next/package.json +1 -0
  7. package/web/.next/standalone/web/.next/prerender-manifest.json +88 -0
  8. package/web/.next/standalone/web/.next/required-server-files.json +317 -0
  9. package/web/.next/standalone/web/.next/routes-manifest.json +110 -0
  10. package/web/.next/standalone/web/.next/server/app/_global-error/page/app-paths-manifest.json +3 -0
  11. package/web/.next/standalone/web/.next/server/app/_global-error/page/build-manifest.json +17 -0
  12. package/web/.next/standalone/web/.next/server/app/_global-error/page/next-font-manifest.json +6 -0
  13. package/web/.next/standalone/web/.next/server/app/_global-error/page/react-loadable-manifest.json +1 -0
  14. package/web/.next/standalone/web/.next/server/app/_global-error/page/server-reference-manifest.json +4 -0
  15. package/web/.next/standalone/web/.next/server/app/_global-error/page.js +10 -0
  16. package/web/.next/standalone/web/.next/server/app/_global-error/page.js.map +5 -0
  17. package/web/.next/standalone/web/.next/server/app/_global-error/page.js.nft.json +1 -0
  18. package/web/.next/standalone/web/.next/server/app/_global-error/page_client-reference-manifest.js +2 -0
  19. package/web/.next/standalone/web/.next/server/app/_global-error.html +2 -0
  20. package/web/.next/standalone/web/.next/server/app/_global-error.meta +15 -0
  21. package/web/.next/standalone/web/.next/server/app/_global-error.rsc +12 -0
  22. package/web/.next/standalone/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +5 -0
  23. package/web/.next/standalone/web/.next/server/app/_global-error.segments/_full.segment.rsc +12 -0
  24. package/web/.next/standalone/web/.next/server/app/_global-error.segments/_head.segment.rsc +7 -0
  25. package/web/.next/standalone/web/.next/server/app/_global-error.segments/_index.segment.rsc +4 -0
  26. package/web/.next/standalone/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -0
  27. package/web/.next/standalone/web/.next/server/app/_not-found/page/app-paths-manifest.json +3 -0
  28. package/web/.next/standalone/web/.next/server/app/_not-found/page/build-manifest.json +17 -0
  29. package/web/.next/standalone/web/.next/server/app/_not-found/page/next-font-manifest.json +11 -0
  30. package/web/.next/standalone/web/.next/server/app/_not-found/page/react-loadable-manifest.json +1 -0
  31. package/web/.next/standalone/web/.next/server/app/_not-found/page/server-reference-manifest.json +4 -0
  32. package/web/.next/standalone/web/.next/server/app/_not-found/page.js +13 -0
  33. package/web/.next/standalone/web/.next/server/app/_not-found/page.js.map +5 -0
  34. package/web/.next/standalone/web/.next/server/app/_not-found/page.js.nft.json +1 -0
  35. package/web/.next/standalone/web/.next/server/app/_not-found/page_client-reference-manifest.js +2 -0
  36. package/web/.next/standalone/web/.next/server/app/_not-found.html +1 -0
  37. package/web/.next/standalone/web/.next/server/app/_not-found.meta +16 -0
  38. package/web/.next/standalone/web/.next/server/app/_not-found.rsc +17 -0
  39. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_full.segment.rsc +17 -0
  40. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_head.segment.rsc +8 -0
  41. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_index.segment.rsc +8 -0
  42. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -0
  43. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +4 -0
  44. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_tree.segment.rsc +3 -0
  45. package/web/.next/standalone/web/.next/server/app/api/components/route/app-paths-manifest.json +3 -0
  46. package/web/.next/standalone/web/.next/server/app/api/components/route/build-manifest.json +11 -0
  47. package/web/.next/standalone/web/.next/server/app/api/components/route/server-reference-manifest.json +4 -0
  48. package/web/.next/standalone/web/.next/server/app/api/components/route.js +6 -0
  49. package/web/.next/standalone/web/.next/server/app/api/components/route.js.map +5 -0
  50. package/web/.next/standalone/web/.next/server/app/api/components/route.js.nft.json +1 -0
  51. package/web/.next/standalone/web/.next/server/app/api/components/route_client-reference-manifest.js +2 -0
  52. package/web/.next/standalone/web/.next/server/app/api/connections/route/app-paths-manifest.json +3 -0
  53. package/web/.next/standalone/web/.next/server/app/api/connections/route/build-manifest.json +11 -0
  54. package/web/.next/standalone/web/.next/server/app/api/connections/route/server-reference-manifest.json +4 -0
  55. package/web/.next/standalone/web/.next/server/app/api/connections/route.js +6 -0
  56. package/web/.next/standalone/web/.next/server/app/api/connections/route.js.map +5 -0
  57. package/web/.next/standalone/web/.next/server/app/api/connections/route.js.nft.json +1 -0
  58. package/web/.next/standalone/web/.next/server/app/api/connections/route_client-reference-manifest.js +2 -0
  59. package/web/.next/standalone/web/.next/server/app/api/graph/route/app-paths-manifest.json +3 -0
  60. package/web/.next/standalone/web/.next/server/app/api/graph/route/build-manifest.json +11 -0
  61. package/web/.next/standalone/web/.next/server/app/api/graph/route/server-reference-manifest.json +4 -0
  62. package/web/.next/standalone/web/.next/server/app/api/graph/route.js +6 -0
  63. package/web/.next/standalone/web/.next/server/app/api/graph/route.js.map +5 -0
  64. package/web/.next/standalone/web/.next/server/app/api/graph/route.js.nft.json +1 -0
  65. package/web/.next/standalone/web/.next/server/app/api/graph/route_client-reference-manifest.js +2 -0
  66. package/web/.next/standalone/web/.next/server/app/api/projects/route/app-paths-manifest.json +3 -0
  67. package/web/.next/standalone/web/.next/server/app/api/projects/route/build-manifest.json +11 -0
  68. package/web/.next/standalone/web/.next/server/app/api/projects/route/server-reference-manifest.json +4 -0
  69. package/web/.next/standalone/web/.next/server/app/api/projects/route.js +6 -0
  70. package/web/.next/standalone/web/.next/server/app/api/projects/route.js.map +5 -0
  71. package/web/.next/standalone/web/.next/server/app/api/projects/route.js.nft.json +1 -0
  72. package/web/.next/standalone/web/.next/server/app/api/projects/route_client-reference-manifest.js +2 -0
  73. package/web/.next/standalone/web/.next/server/app/api/prompts/route/app-paths-manifest.json +3 -0
  74. package/web/.next/standalone/web/.next/server/app/api/prompts/route/build-manifest.json +11 -0
  75. package/web/.next/standalone/web/.next/server/app/api/prompts/route/server-reference-manifest.json +4 -0
  76. package/web/.next/standalone/web/.next/server/app/api/prompts/route.js +7 -0
  77. package/web/.next/standalone/web/.next/server/app/api/prompts/route.js.map +5 -0
  78. package/web/.next/standalone/web/.next/server/app/api/prompts/route.js.nft.json +1 -0
  79. package/web/.next/standalone/web/.next/server/app/api/prompts/route_client-reference-manifest.js +2 -0
  80. package/web/.next/standalone/web/.next/server/app/api/scan/route/app-paths-manifest.json +3 -0
  81. package/web/.next/standalone/web/.next/server/app/api/scan/route/build-manifest.json +11 -0
  82. package/web/.next/standalone/web/.next/server/app/api/scan/route/server-reference-manifest.json +4 -0
  83. package/web/.next/standalone/web/.next/server/app/api/scan/route.js +6 -0
  84. package/web/.next/standalone/web/.next/server/app/api/scan/route.js.map +5 -0
  85. package/web/.next/standalone/web/.next/server/app/api/scan/route.js.nft.json +1 -0
  86. package/web/.next/standalone/web/.next/server/app/api/scan/route_client-reference-manifest.js +2 -0
  87. package/web/.next/standalone/web/.next/server/app/api/settings/route/app-paths-manifest.json +3 -0
  88. package/web/.next/standalone/web/.next/server/app/api/settings/route/build-manifest.json +11 -0
  89. package/web/.next/standalone/web/.next/server/app/api/settings/route/server-reference-manifest.json +4 -0
  90. package/web/.next/standalone/web/.next/server/app/api/settings/route.js +6 -0
  91. package/web/.next/standalone/web/.next/server/app/api/settings/route.js.map +5 -0
  92. package/web/.next/standalone/web/.next/server/app/api/settings/route.js.nft.json +1 -0
  93. package/web/.next/standalone/web/.next/server/app/api/settings/route_client-reference-manifest.js +2 -0
  94. package/web/.next/standalone/web/.next/server/app/api/status/route/app-paths-manifest.json +3 -0
  95. package/web/.next/standalone/web/.next/server/app/api/status/route/build-manifest.json +11 -0
  96. package/web/.next/standalone/web/.next/server/app/api/status/route/server-reference-manifest.json +4 -0
  97. package/web/.next/standalone/web/.next/server/app/api/status/route.js +6 -0
  98. package/web/.next/standalone/web/.next/server/app/api/status/route.js.map +5 -0
  99. package/web/.next/standalone/web/.next/server/app/api/status/route.js.nft.json +1 -0
  100. package/web/.next/standalone/web/.next/server/app/api/status/route_client-reference-manifest.js +2 -0
  101. package/web/.next/standalone/web/.next/server/app/index.html +1 -0
  102. package/web/.next/standalone/web/.next/server/app/index.meta +14 -0
  103. package/web/.next/standalone/web/.next/server/app/index.rsc +23 -0
  104. package/web/.next/standalone/web/.next/server/app/index.segments/__PAGE__.segment.rsc +9 -0
  105. package/web/.next/standalone/web/.next/server/app/index.segments/_full.segment.rsc +23 -0
  106. package/web/.next/standalone/web/.next/server/app/index.segments/_head.segment.rsc +8 -0
  107. package/web/.next/standalone/web/.next/server/app/index.segments/_index.segment.rsc +8 -0
  108. package/web/.next/standalone/web/.next/server/app/index.segments/_tree.segment.rsc +5 -0
  109. package/web/.next/standalone/web/.next/server/app/page/app-paths-manifest.json +3 -0
  110. package/web/.next/standalone/web/.next/server/app/page/build-manifest.json +17 -0
  111. package/web/.next/standalone/web/.next/server/app/page/next-font-manifest.json +11 -0
  112. package/web/.next/standalone/web/.next/server/app/page/react-loadable-manifest.json +1 -0
  113. package/web/.next/standalone/web/.next/server/app/page/server-reference-manifest.json +4 -0
  114. package/web/.next/standalone/web/.next/server/app/page.js +15 -0
  115. package/web/.next/standalone/web/.next/server/app/page.js.map +5 -0
  116. package/web/.next/standalone/web/.next/server/app/page.js.nft.json +1 -0
  117. package/web/.next/standalone/web/.next/server/app/page_client-reference-manifest.js +2 -0
  118. package/web/.next/standalone/web/.next/server/app-paths-manifest.json +13 -0
  119. package/web/.next/standalone/web/.next/server/chunks/2374f_next_dist_esm_build_templates_app-route_0bb4e66a.js +19 -0
  120. package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__006b837d._.js +3 -0
  121. package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__1ab91221._.js +3 -0
  122. package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__2e09fec9._.js +3 -0
  123. package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__38d0390f._.js +3 -0
  124. package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__539ef30d._.js +3 -0
  125. package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__594bcf20._.js +3 -0
  126. package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__b888fadf._.js +3 -0
  127. package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__f3450c22._.js +21 -0
  128. package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__fa2ec862._.js +3 -0
  129. package/web/.next/standalone/web/.next/server/chunks/[turbopack]_runtime.js +770 -0
  130. package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_e6039567._.js +6 -0
  131. package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_09351209._.js +6 -0
  132. package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_222be7ae._.js +6 -0
  133. package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_2346e1b3._.js +3 -0
  134. package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_cec86455._.js +4 -0
  135. package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_client_components_9c5d1a14._.js +3 -0
  136. package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_client_components_builtin_forbidden_8eae0c85.js +3 -0
  137. package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_client_components_builtin_global-error_81159d60.js +3 -0
  138. package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_client_components_builtin_unauthorized_7d34a31c.js +3 -0
  139. package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_e03afa0e._.js +3 -0
  140. package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_esm_build_templates_app-page_2c8d71b9.js +4 -0
  141. package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_server_route-modules_app-page_vendored_ssr_react-dom_8910f04c.js +3 -0
  142. package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__1a0663e6._.js +3 -0
  143. package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__4306eafc._.js +3 -0
  144. package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__44903626._.js +3 -0
  145. package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__60278e3f._.js +3 -0
  146. package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__61942f24._.js +4 -0
  147. package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__8c45c3c9._.js +3 -0
  148. package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__9a2f110d._.js +3 -0
  149. package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__ed07bd88._.js +3 -0
  150. package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__f2db61af._.js +3 -0
  151. package/web/.next/standalone/web/.next/server/chunks/ssr/[turbopack]_runtime.js +770 -0
  152. package/web/.next/standalone/web/.next/server/chunks/ssr/web_0103e631._.js +4 -0
  153. package/web/.next/standalone/web/.next/server/chunks/ssr/web_171de0df._.js +14 -0
  154. package/web/.next/standalone/web/.next/server/chunks/ssr/web__next-internal_server_app__global-error_page_actions_2a1e94d4.js +3 -0
  155. package/web/.next/standalone/web/.next/server/chunks/ssr/web__next-internal_server_app__not-found_page_actions_9eaa9845.js +3 -0
  156. package/web/.next/standalone/web/.next/server/chunks/ssr/web__next-internal_server_app_page_actions_ec26bf28.js +3 -0
  157. package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_components_route_actions_c88bf2a6.js +3 -0
  158. package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_connections_route_actions_b1d5e95a.js +3 -0
  159. package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_graph_route_actions_e2dd052c.js +3 -0
  160. package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_projects_route_actions_3f671cbb.js +3 -0
  161. package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_prompts_route_actions_85b56166.js +3 -0
  162. package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_scan_route_actions_861cde8d.js +3 -0
  163. package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_settings_route_actions_e19026ae.js +3 -0
  164. package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_status_route_actions_8b8c6c89.js +3 -0
  165. package/web/.next/standalone/web/.next/server/functions-config-manifest.json +4 -0
  166. package/web/.next/standalone/web/.next/server/middleware-build-manifest.js +21 -0
  167. package/web/.next/standalone/web/.next/server/middleware-manifest.json +6 -0
  168. package/web/.next/standalone/web/.next/server/next-font-manifest.js +1 -0
  169. package/web/.next/standalone/web/.next/server/next-font-manifest.json +15 -0
  170. package/web/.next/standalone/web/.next/server/pages/404.html +1 -0
  171. package/web/.next/standalone/web/.next/server/pages/500.html +2 -0
  172. package/web/.next/standalone/web/.next/server/pages-manifest.json +4 -0
  173. package/web/.next/standalone/web/.next/server/server-reference-manifest.js +1 -0
  174. package/web/.next/standalone/web/.next/server/server-reference-manifest.json +5 -0
  175. package/web/.next/standalone/web/.next/static/WH0NvTGUEDs9QVUjcPJKx/_buildManifest.js +11 -0
  176. package/web/.next/standalone/web/.next/static/WH0NvTGUEDs9QVUjcPJKx/_clientMiddlewareManifest.json +1 -0
  177. package/web/.next/standalone/web/.next/static/WH0NvTGUEDs9QVUjcPJKx/_ssgManifest.js +1 -0
  178. package/web/.next/standalone/web/.next/static/chunks/062ae79751df2759.js +1 -0
  179. package/web/.next/standalone/web/.next/static/chunks/159889e17b2cf1f8.js +2 -0
  180. package/web/.next/standalone/web/.next/static/chunks/458d6f37339fc069.js +1 -0
  181. package/web/.next/standalone/web/.next/static/chunks/6d3d39425a878d7f.js +1 -0
  182. package/web/.next/standalone/web/.next/static/chunks/8a80e7184ad3a13f.css +2 -0
  183. package/web/.next/standalone/web/.next/static/chunks/a6dad97d9634a72d.js +1 -0
  184. package/web/.next/standalone/web/.next/static/chunks/c056475f5f4424b6.css +1 -0
  185. package/web/.next/standalone/web/.next/static/chunks/c57fee8cce8d7cb9.js +1 -0
  186. package/web/.next/standalone/web/.next/static/chunks/cb3513192b63e480.js +12 -0
  187. package/web/.next/standalone/web/.next/static/chunks/dd22b5f2beb2cc31.js +1 -0
  188. package/web/.next/standalone/web/.next/static/chunks/e0affeef0ddb9a97.js +4 -0
  189. package/web/.next/standalone/web/.next/static/chunks/f74a6859e1c4d5e3.js +1 -0
  190. package/web/.next/standalone/web/.next/static/chunks/turbopack-c0c89f9e6f0a38c4.js +3 -0
  191. package/web/.next/standalone/web/.next/static/media/4fa387ec64143e14-s.c1fdd6c2.woff2 +0 -0
  192. package/web/.next/standalone/web/.next/static/media/7178b3e590c64307-s.b97b3418.woff2 +0 -0
  193. package/web/.next/standalone/web/.next/static/media/797e433ab948586e-s.p.dbea232f.woff2 +0 -0
  194. package/web/.next/standalone/web/.next/static/media/8a480f0b521d4e75-s.8e0177b5.woff2 +0 -0
  195. package/web/.next/standalone/web/.next/static/media/bbc41e54d2fcbd21-s.799d8ef8.woff2 +0 -0
  196. package/web/.next/standalone/web/.next/static/media/caa3a2e1cccd8315-s.p.853070df.woff2 +0 -0
  197. package/web/.next/standalone/web/app/api/components/route.ts +252 -0
  198. package/web/.next/standalone/web/app/api/connections/route.ts +319 -0
  199. package/web/.next/standalone/web/app/api/graph/route.ts +235 -0
  200. package/web/.next/standalone/web/app/api/projects/route.ts +221 -0
  201. package/web/.next/standalone/web/app/api/prompts/route.ts +328 -0
  202. package/web/.next/standalone/web/app/api/scan/route.ts +108 -0
  203. package/web/.next/standalone/web/app/api/settings/route.ts +198 -0
  204. package/web/.next/standalone/web/app/api/status/route.ts +169 -0
  205. package/web/.next/standalone/web/app/globals.css +99 -0
  206. package/web/.next/standalone/web/app/layout.tsx +49 -0
  207. package/web/.next/standalone/web/app/page.tsx +94 -0
  208. package/web/.next/standalone/web/components/components-panel.tsx +240 -0
  209. package/web/.next/standalone/web/components/connections-panel.tsx +220 -0
  210. package/web/.next/standalone/web/components/diagram-view.tsx +735 -0
  211. package/web/.next/standalone/web/components/header.tsx +225 -0
  212. package/web/.next/standalone/web/components/impact-analysis.tsx +358 -0
  213. package/web/.next/standalone/web/components/llm-tracking-panel.tsx +1483 -0
  214. package/web/.next/standalone/web/components/settings-panel.tsx +671 -0
  215. package/web/.next/standalone/web/components/sidebar.tsx +74 -0
  216. package/web/.next/standalone/web/components/status-overview.tsx +326 -0
  217. package/web/.next/standalone/web/components/theme-provider.tsx +11 -0
  218. package/web/.next/standalone/web/components/ui/accordion.tsx +66 -0
  219. package/web/.next/standalone/web/components/ui/alert-dialog.tsx +157 -0
  220. package/web/.next/standalone/web/components/ui/alert.tsx +66 -0
  221. package/web/.next/standalone/web/components/ui/aspect-ratio.tsx +11 -0
  222. package/web/.next/standalone/web/components/ui/avatar.tsx +53 -0
  223. package/web/.next/standalone/web/components/ui/badge.tsx +46 -0
  224. package/web/.next/standalone/web/components/ui/breadcrumb.tsx +109 -0
  225. package/web/.next/standalone/web/components/ui/button-group.tsx +83 -0
  226. package/web/.next/standalone/web/components/ui/button.tsx +60 -0
  227. package/web/.next/standalone/web/components/ui/calendar.tsx +213 -0
  228. package/web/.next/standalone/web/components/ui/card.tsx +92 -0
  229. package/web/.next/standalone/web/components/ui/carousel.tsx +241 -0
  230. package/web/.next/standalone/web/components/ui/chart.tsx +353 -0
  231. package/web/.next/standalone/web/components/ui/checkbox.tsx +32 -0
  232. package/web/.next/standalone/web/components/ui/collapsible.tsx +33 -0
  233. package/web/.next/standalone/web/components/ui/command.tsx +184 -0
  234. package/web/.next/standalone/web/components/ui/context-menu.tsx +252 -0
  235. package/web/.next/standalone/web/components/ui/dialog.tsx +143 -0
  236. package/web/.next/standalone/web/components/ui/drawer.tsx +135 -0
  237. package/web/.next/standalone/web/components/ui/dropdown-menu.tsx +257 -0
  238. package/web/.next/standalone/web/components/ui/empty.tsx +104 -0
  239. package/web/.next/standalone/web/components/ui/field.tsx +244 -0
  240. package/web/.next/standalone/web/components/ui/form.tsx +167 -0
  241. package/web/.next/standalone/web/components/ui/hover-card.tsx +44 -0
  242. package/web/.next/standalone/web/components/ui/input-group.tsx +169 -0
  243. package/web/.next/standalone/web/components/ui/input-otp.tsx +77 -0
  244. package/web/.next/standalone/web/components/ui/input.tsx +21 -0
  245. package/web/.next/standalone/web/components/ui/item.tsx +193 -0
  246. package/web/.next/standalone/web/components/ui/kbd.tsx +28 -0
  247. package/web/.next/standalone/web/components/ui/label.tsx +24 -0
  248. package/web/.next/standalone/web/components/ui/menubar.tsx +276 -0
  249. package/web/.next/standalone/web/components/ui/navigation-menu.tsx +166 -0
  250. package/web/.next/standalone/web/components/ui/pagination.tsx +127 -0
  251. package/web/.next/standalone/web/components/ui/popover.tsx +48 -0
  252. package/web/.next/standalone/web/components/ui/progress.tsx +31 -0
  253. package/web/.next/standalone/web/components/ui/radio-group.tsx +45 -0
  254. package/web/.next/standalone/web/components/ui/resizable.tsx +56 -0
  255. package/web/.next/standalone/web/components/ui/scroll-area.tsx +58 -0
  256. package/web/.next/standalone/web/components/ui/select.tsx +185 -0
  257. package/web/.next/standalone/web/components/ui/separator.tsx +28 -0
  258. package/web/.next/standalone/web/components/ui/sheet.tsx +139 -0
  259. package/web/.next/standalone/web/components/ui/sidebar.tsx +726 -0
  260. package/web/.next/standalone/web/components/ui/skeleton.tsx +13 -0
  261. package/web/.next/standalone/web/components/ui/slider.tsx +63 -0
  262. package/web/.next/standalone/web/components/ui/sonner.tsx +25 -0
  263. package/web/.next/standalone/web/components/ui/spinner.tsx +16 -0
  264. package/web/.next/standalone/web/components/ui/switch.tsx +31 -0
  265. package/web/.next/standalone/web/components/ui/table.tsx +116 -0
  266. package/web/.next/standalone/web/components/ui/tabs.tsx +66 -0
  267. package/web/.next/standalone/web/components/ui/textarea.tsx +18 -0
  268. package/web/.next/standalone/web/components/ui/toast.tsx +129 -0
  269. package/web/.next/standalone/web/components/ui/toaster.tsx +35 -0
  270. package/web/.next/standalone/web/components/ui/toggle-group.tsx +73 -0
  271. package/web/.next/standalone/web/components/ui/toggle.tsx +47 -0
  272. package/web/.next/standalone/web/components/ui/tooltip.tsx +61 -0
  273. package/web/.next/standalone/web/components/ui/use-mobile.tsx +19 -0
  274. package/web/.next/standalone/web/components/ui/use-toast.ts +191 -0
  275. package/web/.next/standalone/web/components.json +21 -0
  276. package/web/.next/standalone/web/hooks/use-mobile.ts +19 -0
  277. package/web/.next/standalone/web/hooks/use-toast.ts +191 -0
  278. package/web/.next/standalone/web/lib/hooks/index.ts +8 -0
  279. package/web/.next/standalone/web/lib/hooks/use-components.ts +83 -0
  280. package/web/.next/standalone/web/lib/hooks/use-connections.ts +83 -0
  281. package/web/.next/standalone/web/lib/hooks/use-projects.ts +116 -0
  282. package/web/.next/standalone/web/lib/hooks/use-prompts.ts +122 -0
  283. package/web/.next/standalone/web/lib/hooks/use-settings.ts +135 -0
  284. package/web/.next/standalone/web/lib/hooks/use-status.ts +80 -0
  285. package/web/.next/standalone/web/lib/project-context.tsx +46 -0
  286. package/web/.next/standalone/web/lib/transform.ts +625 -0
  287. package/web/.next/standalone/web/lib/types.ts +198 -0
  288. package/web/.next/standalone/web/lib/utils.ts +6 -0
  289. package/web/.next/standalone/web/next.config.mjs +12 -0
  290. package/web/.next/standalone/web/package-lock.json +3987 -0
  291. package/web/.next/standalone/web/package.json +73 -0
  292. package/web/.next/standalone/web/pnpm-lock.yaml +5 -0
  293. package/web/.next/standalone/web/postcss.config.mjs +8 -0
  294. package/web/.next/standalone/web/public/apple-icon.png +0 -0
  295. package/web/.next/standalone/web/public/icon-dark-32x32.png +0 -0
  296. package/web/.next/standalone/web/public/icon-light-32x32.png +0 -0
  297. package/web/.next/standalone/web/public/icon.svg +26 -0
  298. package/web/.next/standalone/web/public/navgator-logo.png +0 -0
  299. package/web/.next/standalone/web/public/placeholder-logo.png +0 -0
  300. package/web/.next/standalone/web/public/placeholder-logo.svg +1 -0
  301. package/web/.next/standalone/web/public/placeholder-user.jpg +0 -0
  302. package/web/.next/standalone/web/public/placeholder.jpg +0 -0
  303. package/web/.next/standalone/web/public/placeholder.svg +1 -0
  304. package/web/.next/standalone/web/public/public/apple-icon.png +0 -0
  305. package/web/.next/standalone/web/public/public/icon-dark-32x32.png +0 -0
  306. package/web/.next/standalone/web/public/public/icon-light-32x32.png +0 -0
  307. package/web/.next/standalone/web/public/public/icon.svg +26 -0
  308. package/web/.next/standalone/web/public/public/navgator-logo.png +0 -0
  309. package/web/.next/standalone/web/public/public/placeholder-logo.png +0 -0
  310. package/web/.next/standalone/web/public/public/placeholder-logo.svg +1 -0
  311. package/web/.next/standalone/web/public/public/placeholder-user.jpg +0 -0
  312. package/web/.next/standalone/web/public/public/placeholder.jpg +0 -0
  313. package/web/.next/standalone/web/public/public/placeholder.svg +1 -0
  314. package/web/.next/standalone/web/server.js +38 -0
  315. package/web/.next/standalone/web/styles/globals.css +125 -0
  316. package/web/.next/standalone/web/tsconfig.json +41 -0
  317. package/web/.next/static/WH0NvTGUEDs9QVUjcPJKx/_buildManifest.js +11 -0
  318. package/web/.next/static/WH0NvTGUEDs9QVUjcPJKx/_clientMiddlewareManifest.json +1 -0
  319. package/web/.next/static/WH0NvTGUEDs9QVUjcPJKx/_ssgManifest.js +1 -0
  320. package/web/.next/static/chunks/062ae79751df2759.js +1 -0
  321. package/web/.next/static/chunks/159889e17b2cf1f8.js +2 -0
  322. package/web/.next/static/chunks/458d6f37339fc069.js +1 -0
  323. package/web/.next/static/chunks/6d3d39425a878d7f.js +1 -0
  324. package/web/.next/static/chunks/8a80e7184ad3a13f.css +2 -0
  325. package/web/.next/static/chunks/a6dad97d9634a72d.js +1 -0
  326. package/web/.next/static/chunks/c056475f5f4424b6.css +1 -0
  327. package/web/.next/static/chunks/c57fee8cce8d7cb9.js +1 -0
  328. package/web/.next/static/chunks/cb3513192b63e480.js +12 -0
  329. package/web/.next/static/chunks/dd22b5f2beb2cc31.js +1 -0
  330. package/web/.next/static/chunks/e0affeef0ddb9a97.js +4 -0
  331. package/web/.next/static/chunks/f74a6859e1c4d5e3.js +1 -0
  332. package/web/.next/static/chunks/turbopack-c0c89f9e6f0a38c4.js +3 -0
  333. package/web/.next/static/media/4fa387ec64143e14-s.c1fdd6c2.woff2 +0 -0
  334. package/web/.next/static/media/7178b3e590c64307-s.b97b3418.woff2 +0 -0
  335. package/web/.next/static/media/797e433ab948586e-s.p.dbea232f.woff2 +0 -0
  336. package/web/.next/static/media/8a480f0b521d4e75-s.8e0177b5.woff2 +0 -0
  337. package/web/.next/static/media/bbc41e54d2fcbd21-s.799d8ef8.woff2 +0 -0
  338. package/web/.next/static/media/caa3a2e1cccd8315-s.p.853070df.woff2 +0 -0
@@ -0,0 +1,12 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,75069,(e,t,r)=>{"use strict";function n({widthInt:e,heightInt:t,blurWidth:r,blurHeight:n,blurDataURL:s,objectFit:a}){let o=r?40*r:e,l=n?40*n:t,i=o&&l?`viewBox='0 0 ${o} ${l}'`:"";return`%3Csvg xmlns='http://www.w3.org/2000/svg' ${i}%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='${i?"none":"contain"===a?"xMidYMid":"cover"===a?"xMidYMid slice":"none"}' style='filter: url(%23b);' href='${s}'/%3E%3C/svg%3E`}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"getImageBlurSvg",{enumerable:!0,get:function(){return n}})},52652,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={VALID_LOADERS:function(){return a},imageConfigDefault:function(){return o}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let a=["default","imgix","cloudinary","akamai","custom"],o={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:14400,formats:["image/webp"],maximumRedirects:3,dangerouslyAllowLocalIP:!1,dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"attachment",localPatterns:void 0,remotePatterns:[],qualities:[75],unoptimized:!1}},72420,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"getImgProps",{enumerable:!0,get:function(){return i}}),e.r(19609);let n=e.r(75069),s=e.r(52652),a=["-moz-initial","fill","none","scale-down",void 0];function o(e){return void 0!==e.default}function l(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function i({src:e,sizes:t,unoptimized:r=!1,priority:i=!1,preload:c=!1,loading:d,className:u,quality:m,width:f,height:p,fill:h=!1,style:x,overrideSrc:g,onLoad:v,onLoadingComplete:b,placeholder:y="empty",blurDataURL:w,fetchPriority:j,decoding:N="async",layout:k,objectFit:C,objectPosition:S,lazyBoundary:E,lazyRoot:R,...P},M){var T;let L,D,A,{imgConf:_,showAltText:O,blurComplete:z,defaultLoader:I}=M,F=_||s.imageConfigDefault;if("allSizes"in F)L=F;else{let e=[...F.deviceSizes,...F.imageSizes].sort((e,t)=>e-t),t=F.deviceSizes.sort((e,t)=>e-t),r=F.qualities?.sort((e,t)=>e-t);L={...F,allSizes:e,deviceSizes:t,qualities:r}}if(void 0===I)throw Object.defineProperty(Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config"),"__NEXT_ERROR_CODE",{value:"E163",enumerable:!1,configurable:!0});let $=P.loader||I;delete P.loader,delete P.srcSet;let B="__next_img_default"in $;if(B){if("custom"===L.loader)throw Object.defineProperty(Error(`Image with src "${e}" is missing "loader" prop.
2
+ Read more: https://nextjs.org/docs/messages/next-image-missing-loader`),"__NEXT_ERROR_CODE",{value:"E252",enumerable:!1,configurable:!0})}else{let e=$;$=t=>{let{config:r,...n}=t;return e(n)}}if(k){"fill"===k&&(h=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[k];e&&(x={...x,...e});let r={responsive:"100vw",fill:"100vw"}[k];r&&!t&&(t=r)}let W="",H=l(f),V=l(p);if((T=e)&&"object"==typeof T&&(o(T)||void 0!==T.src)){let t=o(e)?e.default:e;if(!t.src)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E460",enumerable:!1,configurable:!0});if(!t.height||!t.width)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E48",enumerable:!1,configurable:!0});if(D=t.blurWidth,A=t.blurHeight,w=w||t.blurDataURL,W=t.src,!h)if(H||V){if(H&&!V){let e=H/t.width;V=Math.round(t.height*e)}else if(!H&&V){let e=V/t.height;H=Math.round(t.width*e)}}else H=t.width,V=t.height}let q=!i&&!c&&("lazy"===d||void 0===d);(!(e="string"==typeof e?e:W)||e.startsWith("data:")||e.startsWith("blob:"))&&(r=!0,q=!1),L.unoptimized&&(r=!0),B&&!L.dangerouslyAllowSVG&&e.split("?",1)[0].endsWith(".svg")&&(r=!0);let U=l(m),K=Object.assign(h?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:C,objectPosition:S}:{},O?{}:{color:"transparent"},x),G=z||"empty"===y?null:"blur"===y?`url("data:image/svg+xml;charset=utf-8,${(0,n.getImageBlurSvg)({widthInt:H,heightInt:V,blurWidth:D,blurHeight:A,blurDataURL:w||"",objectFit:K.objectFit})}")`:`url("${y}")`,X=a.includes(K.objectFit)?"fill"===K.objectFit?"100% 100%":"cover":K.objectFit,Y=G?{backgroundSize:X,backgroundPosition:K.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:G}:{},Z=function({config:e,src:t,unoptimized:r,width:n,quality:s,sizes:a,loader:o}){if(r)return{src:t,srcSet:void 0,sizes:void 0};let{widths:l,kind:i}=function({deviceSizes:e,allSizes:t},r,n){if(n){let r=/(^|\s)(1?\d?\d)vw/g,s=[];for(let e;e=r.exec(n);)s.push(parseInt(e[2]));if(s.length){let r=.01*Math.min(...s);return{widths:t.filter(t=>t>=e[0]*r),kind:"w"}}return{widths:t,kind:"w"}}return"number"!=typeof r?{widths:e,kind:"w"}:{widths:[...new Set([r,2*r].map(e=>t.find(t=>t>=e)||t[t.length-1]))],kind:"x"}}(e,n,a),c=l.length-1;return{sizes:a||"w"!==i?a:"100vw",srcSet:l.map((r,n)=>`${o({config:e,src:t,quality:s,width:r})} ${"w"===i?r:n+1}${i}`).join(", "),src:o({config:e,src:t,quality:s,width:l[c]})}}({config:L,src:e,unoptimized:r,width:H,quality:U,sizes:t,loader:$}),Q=q?"lazy":d;return{props:{...P,loading:Q,fetchPriority:j,width:H,height:V,decoding:N,className:u,style:{...K,...Y},sizes:Z.sizes,srcSet:Z.srcSet,src:g||Z.src},meta:{unoptimized:r,preload:c||i,placeholder:y,fill:h}}}},16648,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return l}});let n=e.r(30878),s="undefined"==typeof window,a=s?()=>{}:n.useLayoutEffect,o=s?()=>{}:n.useEffect;function l(e){let{headManager:t,reduceComponentsToState:r}=e;function l(){if(t&&t.mountedInstances){let e=n.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(r(e))}}return s&&(t?.mountedInstances?.add(e.children),l()),a(()=>(t?.mountedInstances?.add(e.children),()=>{t?.mountedInstances?.delete(e.children)})),a(()=>(t&&(t._pendingUpdate=l),()=>{t&&(t._pendingUpdate=l)})),o(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},13484,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return h},defaultHead:function(){return u}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let a=e.r(63212),o=e.r(79510),l=e.r(14294),i=o._(e.r(30878)),c=a._(e.r(16648)),d=e.r(56890);function u(){return[(0,l.jsx)("meta",{charSet:"utf-8"},"charset"),(0,l.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")]}function m(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===i.default.Fragment?e.concat(i.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}e.r(19609);let f=["name","httpEquiv","charSet","itemProp"];function p(e){let t,r,n,s;return e.reduce(m,[]).reverse().concat(u().reverse()).filter((t=new Set,r=new Set,n=new Set,s={},e=>{let a=!0,o=!1;if(e.key&&"number"!=typeof e.key&&e.key.indexOf("$")>0){o=!0;let r=e.key.slice(e.key.indexOf("$")+1);t.has(r)?a=!1:t.add(r)}switch(e.type){case"title":case"base":r.has(e.type)?a=!1:r.add(e.type);break;case"meta":for(let t=0,r=f.length;t<r;t++){let r=f[t];if(e.props.hasOwnProperty(r))if("charSet"===r)n.has(r)?a=!1:n.add(r);else{let t=e.props[r],n=s[r]||new Set;("name"!==r||!o)&&n.has(t)?a=!1:(n.add(t),s[r]=n)}}}return a})).reverse().map((e,t)=>{let r=e.key||t;return i.default.cloneElement(e,{key:r})})}let h=function({children:e}){let t=(0,i.useContext)(d.HeadManagerContext);return(0,l.jsx)(c.default,{reduceComponentsToState:p,headManager:t,children:e})};("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},61273,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ImageConfigContext",{enumerable:!0,get:function(){return a}});let n=e.r(63212)._(e.r(30878)),s=e.r(52652),a=n.default.createContext(s.imageConfigDefault)},89832,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"RouterContext",{enumerable:!0,get:function(){return n}});let n=e.r(63212)._(e.r(30878)).default.createContext(null)},85952,(e,t,r)=>{"use strict";function n(e,t){let r=e||75;return t?.qualities?.length?t.qualities.reduce((e,t)=>Math.abs(t-r)<Math.abs(e-r)?t:e,0):r}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"findClosestQuality",{enumerable:!0,get:function(){return n}})},51393,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return a}});let n=e.r(85952);function s({config:e,src:t,width:r,quality:s}){if(t.startsWith("/")&&t.includes("?")&&e.localPatterns?.length===1&&"**"===e.localPatterns[0].pathname&&""===e.localPatterns[0].search)throw Object.defineProperty(Error(`Image with src "${t}" is using a query string which is not configured in images.localPatterns.
3
+ Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`),"__NEXT_ERROR_CODE",{value:"E871",enumerable:!1,configurable:!0});let a=(0,n.findClosestQuality)(s,e);return`${e.path}?url=${encodeURIComponent(t)}&w=${r}&q=${a}${t.startsWith("/_next/static/media/"),""}`}s.__next_img_default=!0;let a=s},15232,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return s}});let n=e.r(30878);function s(e,t){let r=(0,n.useRef)(null),s=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=s.current;t&&(s.current=null,t())}else e&&(r.current=a(e,n)),t&&(s.current=a(t,n))},[e,t])}function a(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},69537,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"Image",{enumerable:!0,get:function(){return y}});let n=e.r(63212),s=e.r(79510),a=e.r(14294),o=s._(e.r(30878)),l=n._(e.r(73340)),i=n._(e.r(13484)),c=e.r(72420),d=e.r(52652),u=e.r(61273);e.r(19609);let m=e.r(89832),f=n._(e.r(51393)),p=e.r(15232),h={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0};function x(e,t,r,n,s,a,o){let l=e?.src;e&&e["data-loaded-src"]!==l&&(e["data-loaded-src"]=l,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&s(!0),r?.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let n=!1,s=!1;r.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>n,isPropagationStopped:()=>s,persist:()=>{},preventDefault:()=>{n=!0,t.preventDefault()},stopPropagation:()=>{s=!0,t.stopPropagation()}})}n?.current&&n.current(e)}}))}function g(e){return o.use?{fetchPriority:e}:{fetchpriority:e}}"undefined"==typeof window&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);let v=(0,o.forwardRef)(({src:e,srcSet:t,sizes:r,height:n,width:s,decoding:l,className:i,style:c,fetchPriority:d,placeholder:u,loading:m,unoptimized:f,fill:h,onLoadRef:v,onLoadingCompleteRef:b,setBlurComplete:y,setShowAltText:w,sizesInput:j,onLoad:N,onError:k,...C},S)=>{let E=(0,o.useCallback)(e=>{e&&(k&&(e.src=e.src),e.complete&&x(e,u,v,b,y,f,j))},[e,u,v,b,y,k,f,j]),R=(0,p.useMergedRef)(S,E);return(0,a.jsx)("img",{...C,...g(d),loading:m,width:s,height:n,decoding:l,"data-nimg":h?"fill":"1",className:i,style:c,sizes:r,srcSet:t,src:e,ref:R,onLoad:e=>{x(e.currentTarget,u,v,b,y,f,j)},onError:e=>{w(!0),"empty"!==u&&y(!0),k&&k(e)}})});function b({isAppRouter:e,imgAttributes:t}){let r={as:"image",imageSrcSet:t.srcSet,imageSizes:t.sizes,crossOrigin:t.crossOrigin,referrerPolicy:t.referrerPolicy,...g(t.fetchPriority)};return e&&l.default.preload?(l.default.preload(t.src,r),null):(0,a.jsx)(i.default,{children:(0,a.jsx)("link",{rel:"preload",href:t.srcSet?void 0:t.src,...r},"__nimg-"+t.src+t.srcSet+t.sizes)})}let y=(0,o.forwardRef)((e,t)=>{let r=(0,o.useContext)(m.RouterContext),n=(0,o.useContext)(u.ImageConfigContext),s=(0,o.useMemo)(()=>{let e=h||n||d.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),r=e.deviceSizes.sort((e,t)=>e-t),s=e.qualities?.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:r,qualities:s,localPatterns:"undefined"==typeof window?n?.localPatterns:e.localPatterns}},[n]),{onLoad:l,onLoadingComplete:i}=e,p=(0,o.useRef)(l);(0,o.useEffect)(()=>{p.current=l},[l]);let x=(0,o.useRef)(i);(0,o.useEffect)(()=>{x.current=i},[i]);let[g,y]=(0,o.useState)(!1),[w,j]=(0,o.useState)(!1),{props:N,meta:k}=(0,c.getImgProps)(e,{defaultLoader:f.default,imgConf:s,blurComplete:g,showAltText:w});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(v,{...N,unoptimized:k.unoptimized,placeholder:k.placeholder,fill:k.fill,onLoadRef:p,onLoadingCompleteRef:x,setBlurComplete:y,setShowAltText:j,sizesInput:e.sizes,ref:t}),k.preload?(0,a.jsx)(b,{isAppRouter:!r,imgAttributes:N}):null]})});("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},41628,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return d},getImageProps:function(){return c}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let a=e.r(63212),o=e.r(72420),l=e.r(69537),i=a._(e.r(51393));function c(e){let{props:t}=(0,o.getImgProps)(e,{defaultLoader:i.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0}});for(let[e,r]of Object.entries(t))void 0===r&&delete t[e];return{props:t}}let d=l.Image},92623,(e,t,r)=>{t.exports=e.r(41628)},48478,e=>{"use strict";let t,r,n;var s,a,o,l,i,c,d,u,m,f=e.i(14294),p=e.i(30878),h=e.i(92623);let x=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim();var g={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let v=(0,p.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:a,iconNode:o,...l},i)=>(0,p.createElement)("svg",{ref:i,...g,width:t,height:t,stroke:e,strokeWidth:n?24*Number(r)/Number(t):r,className:x("lucide",s),...l},[...o.map(([e,t])=>(0,p.createElement)(e,t)),...Array.isArray(a)?a:[a]])),b=(e,t)=>{let r=(0,p.forwardRef)(({className:r,...n},s)=>(0,p.createElement)(v,{ref:s,iconNode:t,className:x(`lucide-${e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,r),...n}));return r.displayName=`${e}`,r},y=b("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),w=b("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]),j=b("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),N=b("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]),k=b("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),C=b("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function S(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function E(...e){return t=>{let r=!1,n=e.map(e=>{let n=S(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){let r=n[t];"function"==typeof r?r():S(e[t],null)}}}}function R(...e){return p.useCallback(E(...e),e)}var P=p.forwardRef((e,t)=>{let{children:r,...n}=e,s=p.Children.toArray(r),a=s.find(L);if(a){let e=a.props.children,r=s.map(t=>t!==a?t:p.Children.count(e)>1?p.Children.only(null):p.isValidElement(e)?e.props.children:null);return(0,f.jsx)(M,{...n,ref:t,children:p.isValidElement(e)?p.cloneElement(e,void 0,r):null})}return(0,f.jsx)(M,{...n,ref:t,children:r})});P.displayName="Slot";var M=p.forwardRef((e,t)=>{let{children:r,...n}=e;if(p.isValidElement(r)){var s;let e,a,o=(s=r,(a=(e=Object.getOwnPropertyDescriptor(s.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?s.ref:(a=(e=Object.getOwnPropertyDescriptor(s,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?s.props.ref:s.props.ref||s.ref);return p.cloneElement(r,{...function(e,t){let r={...t};for(let n in t){let s=e[n],a=t[n];/^on[A-Z]/.test(n)?s&&a?r[n]=(...e)=>{a(...e),s(...e)}:s&&(r[n]=s):"style"===n?r[n]={...s,...a}:"className"===n&&(r[n]=[s,a].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props),ref:t?E(t,o):o})}return p.Children.count(r)>1?p.Children.only(null):null});M.displayName="SlotClone";var T=({children:e})=>(0,f.jsx)(f.Fragment,{children:e});function L(e){return p.isValidElement(e)&&e.type===T}function D(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=function e(t){var r,n,s="";if("string"==typeof t||"number"==typeof t)s+=t;else if("object"==typeof t)if(Array.isArray(t)){var a=t.length;for(r=0;r<a;r++)t[r]&&(n=e(t[r]))&&(s&&(s+=" "),s+=n)}else for(n in t)t[n]&&(s&&(s+=" "),s+=n);return s}(e))&&(n&&(n+=" "),n+=t);return n}let A=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,_=(e,t)=>r=>{var n;if((null==t?void 0:t.variants)==null)return D(e,null==r?void 0:r.class,null==r?void 0:r.className);let{variants:s,defaultVariants:a}=t,o=Object.keys(s).map(e=>{let t=null==r?void 0:r[e],n=null==a?void 0:a[e];if(null===t)return null;let o=A(t)||A(n);return s[e][o]}),l=r&&Object.entries(r).reduce((e,t)=>{let[r,n]=t;return void 0===n||(e[r]=n),e},{});return D(e,o,null==t||null==(n=t.compoundVariants)?void 0:n.reduce((e,t)=>{let{class:r,className:n,...s}=t;return Object.entries(s).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...a,...l}[t]):({...a,...l})[t]===r})?[...e,r,n]:e},[]),null==r?void 0:r.class,null==r?void 0:r.className)},O=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),z=[],I=(e,t,r)=>{if(0==e.length-t)return r.classGroupId;let n=e[t],s=r.nextPart.get(n);if(s){let r=I(e,t+1,s);if(r)return r}let a=r.validators;if(null===a)return;let o=0===t?e.join("-"):e.slice(t).join("-"),l=a.length;for(let e=0;e<l;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},F=(e,t)=>{let r=O();for(let n in e)$(e[n],r,n,t);return r},$=(e,t,r,n)=>{let s=e.length;for(let a=0;a<s;a++)B(e[a],t,r,n)},B=(e,t,r,n)=>{"string"==typeof e?W(e,t,r):"function"==typeof e?H(e,t,r,n):V(e,t,r,n)},W=(e,t,r)=>{(""===e?t:q(t,e)).classGroupId=r},H=(e,t,r,n)=>{U(e)?$(e(n),t,r,n):(null===t.validators&&(t.validators=[]),t.validators.push({classGroupId:r,validator:e}))},V=(e,t,r,n)=>{let s=Object.entries(e),a=s.length;for(let e=0;e<a;e++){let[a,o]=s[e];$(o,q(t,a),r,n)}},q=(e,t)=>{let r=e,n=t.split("-"),s=n.length;for(let e=0;e<s;e++){let t=n[e],s=r.nextPart.get(t);s||(s=O(),r.nextPart.set(t,s)),r=s}return r},U=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,K=[],G=(e,t,r,n,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:s}),X=/\s+/,Y=e=>{let t;if("string"==typeof e)return e;let r="";for(let n=0;n<e.length;n++)e[n]&&(t=Y(e[n]))&&(r&&(r+=" "),r+=t);return r},Z=[],Q=e=>{let t=t=>t[e]||Z;return t.isThemeGetter=!0,t},J=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ee=/^\((?:(\w[\w-]*):)?(.+)\)$/i,et=/^\d+\/\d+$/,er=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,en=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,es=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ea=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,eo=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,el=e=>et.test(e),ei=e=>!!e&&!Number.isNaN(Number(e)),ec=e=>!!e&&Number.isInteger(Number(e)),ed=e=>e.endsWith("%")&&ei(e.slice(0,-1)),eu=e=>er.test(e),em=()=>!0,ef=e=>en.test(e)&&!es.test(e),ep=()=>!1,eh=e=>ea.test(e),ex=e=>eo.test(e),eg=e=>!eb(e)&&!eC(e),ev=e=>eL(e,eO,ep),eb=e=>J.test(e),ey=e=>eL(e,ez,ef),ew=e=>eL(e,eI,ei),ej=e=>eL(e,eA,ep),eN=e=>eL(e,e_,ex),ek=e=>eL(e,e$,eh),eC=e=>ee.test(e),eS=e=>eD(e,ez),eE=e=>eD(e,eF),eR=e=>eD(e,eA),eP=e=>eD(e,eO),eM=e=>eD(e,e_),eT=e=>eD(e,e$,!0),eL=(e,t,r)=>{let n=J.exec(e);return!!n&&(n[1]?t(n[1]):r(n[2]))},eD=(e,t,r=!1)=>{let n=ee.exec(e);return!!n&&(n[1]?t(n[1]):r)},eA=e=>"position"===e||"percentage"===e,e_=e=>"image"===e||"url"===e,eO=e=>"length"===e||"size"===e||"bg-size"===e,ez=e=>"length"===e,eI=e=>"number"===e,eF=e=>"family-name"===e,e$=e=>"shadow"===e,eB=((e,...t)=>{let r,n,s,a,o=e=>{let t=n(e);if(t)return t;let a=((e,t)=>{let{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s,sortModifiers:a}=t,o=[],l=e.trim().split(X),i="";for(let e=l.length-1;e>=0;e-=1){let t=l[e],{isExternal:c,modifiers:d,hasImportantModifier:u,baseClassName:m,maybePostfixModifierPosition:f}=r(t);if(c){i=t+(i.length>0?" "+i:i);continue}let p=!!f,h=n(p?m.substring(0,f):m);if(!h){if(!p||!(h=n(m))){i=t+(i.length>0?" "+i:i);continue}p=!1}let x=0===d.length?"":1===d.length?d[0]:a(d).join(":"),g=u?x+"!":x,v=g+h;if(o.indexOf(v)>-1)continue;o.push(v);let b=s(h,p);for(let e=0;e<b.length;++e){let t=b[e];o.push(g+t)}i=t+(i.length>0?" "+i:i)}return i})(e,r);return s(e,a),a};return a=l=>{var i;let c;return n=(r={cache:(e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null),s=(s,a)=>{r[s]=a,++t>e&&(t=0,n=r,r=Object.create(null))};return{get(e){let t=r[e];return void 0!==t?t:void 0!==(t=n[e])?(s(e,t),t):void 0},set(e,t){e in r?r[e]=t:s(e,t)}}})((i=t.reduce((e,t)=>t(e),e())).cacheSize),parseClassName:(e=>{let{prefix:t,experimentalParseClassName:r}=e,n=e=>{let t,r=[],n=0,s=0,a=0,o=e.length;for(let l=0;l<o;l++){let o=e[l];if(0===n&&0===s){if(":"===o){r.push(e.slice(a,l)),a=l+1;continue}if("/"===o){t=l;continue}}"["===o?n++:"]"===o?n--:"("===o?s++:")"===o&&s--}let l=0===r.length?e:e.slice(a),i=l,c=!1;return l.endsWith("!")?(i=l.slice(0,-1),c=!0):l.startsWith("!")&&(i=l.slice(1),c=!0),G(r,c,i,t&&t>a?t-a:void 0)};if(t){let e=t+":",r=n;n=t=>t.startsWith(e)?r(t.slice(e.length)):G(K,!1,t,void 0,!0)}if(r){let e=n;n=t=>r({className:t,parseClassName:e})}return n})(i),sortModifiers:(c=new Map,i.orderSensitiveModifiers.forEach((e,t)=>{c.set(e,1e6+t)}),e=>{let t=[],r=[];for(let n=0;n<e.length;n++){let s=e[n],a="["===s[0],o=c.has(s);a||o?(r.length>0&&(r.sort(),t.push(...r),r=[]),t.push(s)):r.push(s)}return r.length>0&&(r.sort(),t.push(...r)),t}),...(e=>{let t=(e=>{let{theme:t,classGroups:r}=e;return F(r,t)})(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]")){var r;let t,n,s;return -1===(r=e).slice(1,-1).indexOf(":")?void 0:(n=(t=r.slice(1,-1)).indexOf(":"),(s=t.slice(0,n))?"arbitrary.."+s:void 0)}let n=e.split("-"),s=+(""===n[0]&&n.length>1);return I(n,s,t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=n[e],s=r[e];if(t){if(s){let e=Array(s.length+t.length);for(let t=0;t<s.length;t++)e[t]=s[t];for(let r=0;r<t.length;r++)e[s.length+r]=t[r];return e}return t}return s||z}return r[e]||z}}})(i)}).cache.get,s=r.cache.set,a=o,o(l)},(...e)=>a(((...e)=>{let t,r,n=0,s="";for(;n<e.length;)(t=e[n++])&&(r=Y(t))&&(s&&(s+=" "),s+=r);return s})(...e))})(()=>{let e=Q("color"),t=Q("font"),r=Q("text"),n=Q("font-weight"),s=Q("tracking"),a=Q("leading"),o=Q("breakpoint"),l=Q("container"),i=Q("spacing"),c=Q("radius"),d=Q("shadow"),u=Q("inset-shadow"),m=Q("text-shadow"),f=Q("drop-shadow"),p=Q("blur"),h=Q("perspective"),x=Q("aspect"),g=Q("ease"),v=Q("animate"),b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],y=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],w=()=>[...y(),eC,eb],j=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],k=()=>[eC,eb,i],C=()=>[el,"full","auto",...k()],S=()=>[ec,"none","subgrid",eC,eb],E=()=>["auto",{span:["full",ec,eC,eb]},ec,eC,eb],R=()=>[ec,"auto",eC,eb],P=()=>["auto","min","max","fr",eC,eb],M=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],T=()=>["start","end","center","stretch","center-safe","end-safe"],L=()=>["auto",...k()],D=()=>[el,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],A=()=>[e,eC,eb],_=()=>[...y(),eR,ej,{position:[eC,eb]}],O=()=>["no-repeat",{repeat:["","x","y","space","round"]}],z=()=>["auto","cover","contain",eP,ev,{size:[eC,eb]}],I=()=>[ed,eS,ey],F=()=>["","none","full",c,eC,eb],$=()=>["",ei,eS,ey],B=()=>["solid","dashed","dotted","double"],W=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H=()=>[ei,ed,eR,ej],V=()=>["","none",p,eC,eb],q=()=>["none",ei,eC,eb],U=()=>["none",ei,eC,eb],K=()=>[ei,eC,eb],G=()=>[el,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[eu],breakpoint:[eu],color:[em],container:[eu],"drop-shadow":[eu],ease:["in","out","in-out"],font:[eg],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[eu],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[eu],shadow:[eu],spacing:["px",ei],text:[eu],"text-shadow":[eu],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",el,eb,eC,x]}],container:["container"],columns:[{columns:[ei,eb,eC,l]}],"break-after":[{"break-after":b()}],"break-before":[{"break-before":b()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:w()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:C()}],"inset-x":[{"inset-x":C()}],"inset-y":[{"inset-y":C()}],start:[{start:C()}],end:[{end:C()}],top:[{top:C()}],right:[{right:C()}],bottom:[{bottom:C()}],left:[{left:C()}],visibility:["visible","invisible","collapse"],z:[{z:[ec,"auto",eC,eb]}],basis:[{basis:[el,"full","auto",l,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ei,el,"auto","initial","none",eb]}],grow:[{grow:["",ei,eC,eb]}],shrink:[{shrink:["",ei,eC,eb]}],order:[{order:[ec,"first","last","none",eC,eb]}],"grid-cols":[{"grid-cols":S()}],"col-start-end":[{col:E()}],"col-start":[{"col-start":R()}],"col-end":[{"col-end":R()}],"grid-rows":[{"grid-rows":S()}],"row-start-end":[{row:E()}],"row-start":[{"row-start":R()}],"row-end":[{"row-end":R()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":P()}],"auto-rows":[{"auto-rows":P()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...M(),"normal"]}],"justify-items":[{"justify-items":[...T(),"normal"]}],"justify-self":[{"justify-self":["auto",...T()]}],"align-content":[{content:["normal",...M()]}],"align-items":[{items:[...T(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...T(),{baseline:["","last"]}]}],"place-content":[{"place-content":M()}],"place-items":[{"place-items":[...T(),"baseline"]}],"place-self":[{"place-self":["auto",...T()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:L()}],mx:[{mx:L()}],my:[{my:L()}],ms:[{ms:L()}],me:[{me:L()}],mt:[{mt:L()}],mr:[{mr:L()}],mb:[{mb:L()}],ml:[{ml:L()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:D()}],w:[{w:[l,"screen",...D()]}],"min-w":[{"min-w":[l,"screen","none",...D()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[o]},...D()]}],h:[{h:["screen","lh",...D()]}],"min-h":[{"min-h":["screen","lh","none",...D()]}],"max-h":[{"max-h":["screen","lh",...D()]}],"font-size":[{text:["base",r,eS,ey]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,eC,ew]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ed,eb]}],"font-family":[{font:[eE,eb,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,eC,eb]}],"line-clamp":[{"line-clamp":[ei,"none",eC,ew]}],leading:[{leading:[a,...k()]}],"list-image":[{"list-image":["none",eC,eb]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",eC,eb]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:[ei,"from-font","auto",eC,ey]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[ei,"auto",eC,eb]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",eC,eb]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",eC,eb]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:_()}],"bg-repeat":[{bg:O()}],"bg-size":[{bg:z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ec,eC,eb],radial:["",eC,eb],conic:[ec,eC,eb]},eM,eN]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:I()}],"gradient-via-pos":[{via:I()}],"gradient-to-pos":[{to:I()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:F()}],"rounded-s":[{"rounded-s":F()}],"rounded-e":[{"rounded-e":F()}],"rounded-t":[{"rounded-t":F()}],"rounded-r":[{"rounded-r":F()}],"rounded-b":[{"rounded-b":F()}],"rounded-l":[{"rounded-l":F()}],"rounded-ss":[{"rounded-ss":F()}],"rounded-se":[{"rounded-se":F()}],"rounded-ee":[{"rounded-ee":F()}],"rounded-es":[{"rounded-es":F()}],"rounded-tl":[{"rounded-tl":F()}],"rounded-tr":[{"rounded-tr":F()}],"rounded-br":[{"rounded-br":F()}],"rounded-bl":[{"rounded-bl":F()}],"border-w":[{border:$()}],"border-w-x":[{"border-x":$()}],"border-w-y":[{"border-y":$()}],"border-w-s":[{"border-s":$()}],"border-w-e":[{"border-e":$()}],"border-w-t":[{"border-t":$()}],"border-w-r":[{"border-r":$()}],"border-w-b":[{"border-b":$()}],"border-w-l":[{"border-l":$()}],"divide-x":[{"divide-x":$()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":$()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...B(),"hidden","none"]}],"divide-style":[{divide:[...B(),"hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...B(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ei,eC,eb]}],"outline-w":[{outline:["",ei,eS,ey]}],"outline-color":[{outline:A()}],shadow:[{shadow:["","none",d,eT,ek]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",u,eT,ek]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:$()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[ei,ey]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":$()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":["none",m,eT,ek]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[ei,eC,eb]}],"mix-blend":[{"mix-blend":[...W(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":W()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ei]}],"mask-image-linear-from-pos":[{"mask-linear-from":H()}],"mask-image-linear-to-pos":[{"mask-linear-to":H()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":H()}],"mask-image-t-to-pos":[{"mask-t-to":H()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":H()}],"mask-image-r-to-pos":[{"mask-r-to":H()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":H()}],"mask-image-b-to-pos":[{"mask-b-to":H()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":H()}],"mask-image-l-to-pos":[{"mask-l-to":H()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":H()}],"mask-image-x-to-pos":[{"mask-x-to":H()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":H()}],"mask-image-y-to-pos":[{"mask-y-to":H()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[eC,eb]}],"mask-image-radial-from-pos":[{"mask-radial-from":H()}],"mask-image-radial-to-pos":[{"mask-radial-to":H()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":y()}],"mask-image-conic-pos":[{"mask-conic":[ei]}],"mask-image-conic-from-pos":[{"mask-conic-from":H()}],"mask-image-conic-to-pos":[{"mask-conic-to":H()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:_()}],"mask-repeat":[{mask:O()}],"mask-size":[{mask:z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",eC,eb]}],filter:[{filter:["","none",eC,eb]}],blur:[{blur:V()}],brightness:[{brightness:[ei,eC,eb]}],contrast:[{contrast:[ei,eC,eb]}],"drop-shadow":[{"drop-shadow":["","none",f,eT,ek]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:["",ei,eC,eb]}],"hue-rotate":[{"hue-rotate":[ei,eC,eb]}],invert:[{invert:["",ei,eC,eb]}],saturate:[{saturate:[ei,eC,eb]}],sepia:[{sepia:["",ei,eC,eb]}],"backdrop-filter":[{"backdrop-filter":["","none",eC,eb]}],"backdrop-blur":[{"backdrop-blur":V()}],"backdrop-brightness":[{"backdrop-brightness":[ei,eC,eb]}],"backdrop-contrast":[{"backdrop-contrast":[ei,eC,eb]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ei,eC,eb]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ei,eC,eb]}],"backdrop-invert":[{"backdrop-invert":["",ei,eC,eb]}],"backdrop-opacity":[{"backdrop-opacity":[ei,eC,eb]}],"backdrop-saturate":[{"backdrop-saturate":[ei,eC,eb]}],"backdrop-sepia":[{"backdrop-sepia":["",ei,eC,eb]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",eC,eb]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ei,"initial",eC,eb]}],ease:[{ease:["linear","initial",g,eC,eb]}],delay:[{delay:[ei,eC,eb]}],animate:[{animate:["none",v,eC,eb]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,eC,eb]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:q()}],"rotate-x":[{"rotate-x":q()}],"rotate-y":[{"rotate-y":q()}],"rotate-z":[{"rotate-z":q()}],scale:[{scale:U()}],"scale-x":[{"scale-x":U()}],"scale-y":[{"scale-y":U()}],"scale-z":[{"scale-z":U()}],"scale-3d":["scale-3d"],skew:[{skew:K()}],"skew-x":[{"skew-x":K()}],"skew-y":[{"skew-y":K()}],transform:[{transform:[eC,eb,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:G()}],"translate-x":[{"translate-x":G()}],"translate-y":[{"translate-y":G()}],"translate-z":[{"translate-z":G()}],"translate-none":["translate-none"],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",eC,eb]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",eC,eb]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[ei,eS,ey,ew]}],stroke:[{stroke:["none",...A()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function eW(...e){return eB(D(e))}let eH=_("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function eV({className:e,variant:t,size:r,asChild:n=!1,...s}){let a=n?P:"button";return(0,f.jsx)(a,{"data-slot":"button",className:eW(eH({variant:t,size:r,className:e})),...s})}function eq({className:e,type:t,...r}){return(0,f.jsx)("input",{type:t,"data-slot":"input",className:eW("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...r})}function eU(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}function eK(e,t=[]){let r=[],n=()=>{let t=r.map(e=>p.createContext(e));return function(r){let n=r?.[e]||t;return p.useMemo(()=>({[`__scope${e}`]:{...r,[e]:n}}),[r,n])}};return n.scopeName=e,[function(t,n){let s=p.createContext(n),a=r.length;r=[...r,n];let o=t=>{let{scope:r,children:n,...o}=t,l=r?.[e]?.[a]||s,i=p.useMemo(()=>o,Object.values(o));return(0,f.jsx)(l.Provider,{value:i,children:n})};return o.displayName=t+"Provider",[o,function(r,o){let l=o?.[e]?.[a]||s,i=p.useContext(l);if(i)return i;if(void 0!==n)return n;throw Error(`\`${r}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let r=()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let n=r.reduce((t,{useScope:r,scopeName:n})=>{let s=r(e)[`__scope${n}`];return{...t,...s}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:n}),[n])}};return r.scopeName=t.scopeName,r}(n,...t)]}function eG(e){let t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...e)=>t.current?.(...e),[])}function eX({prop:e,defaultProp:t,onChange:r=()=>{}}){let[n,s]=function({defaultProp:e,onChange:t}){let r=p.useState(e),[n]=r,s=p.useRef(n),a=eG(t);return p.useEffect(()=>{s.current!==n&&(a(n),s.current=n)},[n,s,a]),r}({defaultProp:t,onChange:r}),a=void 0!==e,o=a?e:n,l=eG(r);return[o,p.useCallback(t=>{if(a){let r="function"==typeof t?t(e):t;r!==e&&l(r)}else s(t)},[a,e,s,l])]}var eY=e.i(73340),eZ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{let r=p.forwardRef((e,r)=>{let{asChild:n,...s}=e,a=n?P:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,f.jsx)(a,{...s,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function eQ(e,t){e&&eY.flushSync(()=>e.dispatchEvent(t))}function eJ(e){let t=e+"CollectionProvider",[r,n]=eK(t),[s,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:r}=e,n=p.default.useRef(null),a=p.default.useRef(new Map).current;return(0,f.jsx)(s,{scope:t,itemMap:a,collectionRef:n,children:r})};o.displayName=t;let l=e+"CollectionSlot",i=p.default.forwardRef((e,t)=>{let{scope:r,children:n}=e,s=R(t,a(l,r).collectionRef);return(0,f.jsx)(P,{ref:s,children:n})});i.displayName=l;let c=e+"CollectionItemSlot",d="data-radix-collection-item",u=p.default.forwardRef((e,t)=>{let{scope:r,children:n,...s}=e,o=p.default.useRef(null),l=R(t,o),i=a(c,r);return p.default.useEffect(()=>(i.itemMap.set(o,{ref:o,...s}),()=>void i.itemMap.delete(o))),(0,f.jsx)(P,{...{[d]:""},ref:l,children:n})});return u.displayName=c,[{Provider:o,Slot:i,ItemSlot:u},function(t){let r=a(e+"CollectionConsumer",t);return p.default.useCallback(()=>{let e=r.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(r.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[r.collectionRef,r.itemMap])},n]}var e0=p.createContext(void 0);function e1(e){let t=p.useContext(e0);return e||t||"ltr"}var e2="dismissableLayer.update",e4=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),e3=p.forwardRef((e,t)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:a,onInteractOutside:o,onDismiss:l,...i}=e,c=p.useContext(e4),[d,m]=p.useState(null),h=d?.ownerDocument??globalThis?.document,[,x]=p.useState({}),g=R(t,e=>m(e)),v=Array.from(c.layers),[b]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=v.indexOf(b),w=d?v.indexOf(d):-1,j=c.layersWithOutsidePointerEventsDisabled.size>0,N=w>=y,k=function(e,t=globalThis?.document){let r=eG(e),n=p.useRef(!1),s=p.useRef(()=>{});return p.useEffect(()=>{let e=e=>{if(e.target&&!n.current){let n=function(){e6("dismissableLayer.pointerDownOutside",r,a,{discrete:!0})},a={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",s.current),s.current=n,t.addEventListener("click",s.current,{once:!0})):n()}else t.removeEventListener("click",s.current);n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",e),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}(e=>{let t=e.target,r=[...c.branches].some(e=>e.contains(t));N&&!r&&(s?.(e),o?.(e),e.defaultPrevented||l?.())},h),C=function(e,t=globalThis?.document){let r=eG(e),n=p.useRef(!1);return p.useEffect(()=>{let e=e=>{e.target&&!n.current&&e6("dismissableLayer.focusOutside",r,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}(e=>{let t=e.target;![...c.branches].some(e=>e.contains(t))&&(a?.(e),o?.(e),e.defaultPrevented||l?.())},h);return!function(e,t=globalThis?.document){let r=eG(e);p.useEffect(()=>{let e=e=>{"Escape"===e.key&&r(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[r,t])}(e=>{w===c.layers.size-1&&(n?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))},h),p.useEffect(()=>{if(d)return r&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(u=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),e5(),()=>{r&&1===c.layersWithOutsidePointerEventsDisabled.size&&(h.body.style.pointerEvents=u)}},[d,h,r,c]),p.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),e5())},[d,c]),p.useEffect(()=>{let e=()=>x({});return document.addEventListener(e2,e),()=>document.removeEventListener(e2,e)},[]),(0,f.jsx)(eZ.div,{...i,ref:g,style:{pointerEvents:j?N?"auto":"none":void 0,...e.style},onFocusCapture:eU(e.onFocusCapture,C.onFocusCapture),onBlurCapture:eU(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:eU(e.onPointerDownCapture,k.onPointerDownCapture)})});function e5(){let e=new CustomEvent(e2);document.dispatchEvent(e)}function e6(e,t,r,{discrete:n}){let s=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?eQ(s,a):s.dispatchEvent(a)}e3.displayName="DismissableLayer",p.forwardRef((e,t)=>{let r=p.useContext(e4),n=p.useRef(null),s=R(t,n);return p.useEffect(()=>{let e=n.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}},[r.branches]),(0,f.jsx)(eZ.div,{...e,ref:s})}).displayName="DismissableLayerBranch";var e8=0;function e7(){p.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??e9()),document.body.insertAdjacentElement("beforeend",e[1]??e9()),e8++,()=>{1===e8&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),e8--}},[])}function e9(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var te="focusScope.autoFocusOnMount",tt="focusScope.autoFocusOnUnmount",tr={bubbles:!1,cancelable:!0},tn=p.forwardRef((e,t)=>{let{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:a,...o}=e,[l,i]=p.useState(null),c=eG(s),d=eG(a),u=p.useRef(null),m=R(t,e=>i(e)),h=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(n){let e=function(e){if(h.paused||!l)return;let t=e.target;l.contains(t)?u.current=t:to(u.current,{select:!0})},t=function(e){if(h.paused||!l)return;let t=e.relatedTarget;null!==t&&(l.contains(t)||to(u.current,{select:!0}))};document.addEventListener("focusin",e),document.addEventListener("focusout",t);let r=new MutationObserver(function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&to(l)});return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[n,l,h.paused]),p.useEffect(()=>{if(l){tl.add(h);let e=document.activeElement;if(!l.contains(e)){let t=new CustomEvent(te,tr);l.addEventListener(te,c),l.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){let r=document.activeElement;for(let n of e)if(to(n,{select:t}),document.activeElement!==r)return}(ts(l).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&to(l))}return()=>{l.removeEventListener(te,c),setTimeout(()=>{let t=new CustomEvent(tt,tr);l.addEventListener(tt,d),l.dispatchEvent(t),t.defaultPrevented||to(e??document.body,{select:!0}),l.removeEventListener(tt,d),tl.remove(h)},0)}}},[l,c,d,h]);let x=p.useCallback(e=>{if(!r&&!n||h.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,s=document.activeElement;if(t&&s){var a;let t,n=e.currentTarget,[o,l]=[ta(t=ts(a=n),a),ta(t.reverse(),a)];o&&l?e.shiftKey||s!==l?e.shiftKey&&s===o&&(e.preventDefault(),r&&to(l,{select:!0})):(e.preventDefault(),r&&to(o,{select:!0})):s===n&&e.preventDefault()}},[r,n,h.paused]);return(0,f.jsx)(eZ.div,{tabIndex:-1,...o,ref:m,onKeyDown:x})});function ts(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function ta(e,t){for(let r of e)if(!function(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===t||e!==t);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(r,{upTo:t}))return r}function to(e,{select:t=!1}={}){if(e&&e.focus){var r;let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&(r=e)instanceof HTMLInputElement&&"select"in r&&t&&e.select()}}tn.displayName="FocusScope";var tl=(n=[],{add(e){let t=n[0];e!==t&&t?.pause(),(n=ti(n,e)).unshift(e)},remove(e){n=ti(n,e),n[0]?.resume()}});function ti(e,t){let r=[...e],n=r.indexOf(t);return -1!==n&&r.splice(n,1),r}var tc=globalThis?.document?p.useLayoutEffect:()=>{},td=p["useId".toString()]||(()=>void 0),tu=0;function tm(e){let[t,r]=p.useState(td());return tc(()=>{e||r(e=>e??String(tu++))},[e]),e||(t?`radix-${t}`:"")}let tf=["top","right","bottom","left"],tp=Math.min,th=Math.max,tx=Math.round,tg=Math.floor,tv=e=>({x:e,y:e}),tb={left:"right",right:"left",bottom:"top",top:"bottom"},ty={start:"end",end:"start"};function tw(e,t){return"function"==typeof e?e(t):e}function tj(e){return e.split("-")[0]}function tN(e){return e.split("-")[1]}function tk(e){return"x"===e?"y":"x"}function tC(e){return"y"===e?"height":"width"}let tS=new Set(["top","bottom"]);function tE(e){return tS.has(tj(e))?"y":"x"}function tR(e){return e.replace(/start|end/g,e=>ty[e])}let tP=["left","right"],tM=["right","left"],tT=["top","bottom"],tL=["bottom","top"];function tD(e){return e.replace(/left|right|bottom|top/g,e=>tb[e])}function tA(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function t_(e){let{x:t,y:r,width:n,height:s}=e;return{width:n,height:s,top:r,left:t,right:t+n,bottom:r+s,x:t,y:r}}function tO(e,t,r){let n,{reference:s,floating:a}=e,o=tE(t),l=tk(tE(t)),i=tC(l),c=tj(t),d="y"===o,u=s.x+s.width/2-a.width/2,m=s.y+s.height/2-a.height/2,f=s[i]/2-a[i]/2;switch(c){case"top":n={x:u,y:s.y-a.height};break;case"bottom":n={x:u,y:s.y+s.height};break;case"right":n={x:s.x+s.width,y:m};break;case"left":n={x:s.x-a.width,y:m};break;default:n={x:s.x,y:s.y}}switch(tN(t)){case"start":n[l]-=f*(r&&d?-1:1);break;case"end":n[l]+=f*(r&&d?-1:1)}return n}let tz=async(e,t,r)=>{let{placement:n="bottom",strategy:s="absolute",middleware:a=[],platform:o}=r,l=a.filter(Boolean),i=await (null==o.isRTL?void 0:o.isRTL(t)),c=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:d,y:u}=tO(c,n,i),m=n,f={},p=0;for(let r=0;r<l.length;r++){let{name:a,fn:h}=l[r],{x:x,y:g,data:v,reset:b}=await h({x:d,y:u,initialPlacement:n,placement:m,strategy:s,middlewareData:f,rects:c,platform:o,elements:{reference:e,floating:t}});d=null!=x?x:d,u=null!=g?g:u,f={...f,[a]:{...f[a],...v}},b&&p<=50&&(p++,"object"==typeof b&&(b.placement&&(m=b.placement),b.rects&&(c=!0===b.rects?await o.getElementRects({reference:e,floating:t,strategy:s}):b.rects),{x:d,y:u}=tO(c,m,i)),r=-1)}return{x:d,y:u,placement:m,strategy:s,middlewareData:f}};async function tI(e,t){var r;void 0===t&&(t={});let{x:n,y:s,platform:a,rects:o,elements:l,strategy:i}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:m=!1,padding:f=0}=tw(t,e),p=tA(f),h=l[m?"floating"===u?"reference":"floating":u],x=t_(await a.getClippingRect({element:null==(r=await (null==a.isElement?void 0:a.isElement(h)))||r?h:h.contextElement||await (null==a.getDocumentElement?void 0:a.getDocumentElement(l.floating)),boundary:c,rootBoundary:d,strategy:i})),g="floating"===u?{x:n,y:s,width:o.floating.width,height:o.floating.height}:o.reference,v=await (null==a.getOffsetParent?void 0:a.getOffsetParent(l.floating)),b=await (null==a.isElement?void 0:a.isElement(v))&&await (null==a.getScale?void 0:a.getScale(v))||{x:1,y:1},y=t_(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:g,offsetParent:v,strategy:i}):g);return{top:(x.top-y.top+p.top)/b.y,bottom:(y.bottom-x.bottom+p.bottom)/b.y,left:(x.left-y.left+p.left)/b.x,right:(y.right-x.right+p.right)/b.x}}function tF(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function t$(e){return tf.some(t=>e[t]>=0)}let tB=new Set(["left","top"]);async function tW(e,t){let{placement:r,platform:n,elements:s}=e,a=await (null==n.isRTL?void 0:n.isRTL(s.floating)),o=tj(r),l=tN(r),i="y"===tE(r),c=tB.has(o)?-1:1,d=a&&i?-1:1,u=tw(t,e),{mainAxis:m,crossAxis:f,alignmentAxis:p}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return l&&"number"==typeof p&&(f="end"===l?-1*p:p),i?{x:f*d,y:m*c}:{x:m*c,y:f*d}}function tH(){return"undefined"!=typeof window}function tV(e){return tK(e)?(e.nodeName||"").toLowerCase():"#document"}function tq(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function tU(e){var t;return null==(t=(tK(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function tK(e){return!!tH()&&(e instanceof Node||e instanceof tq(e).Node)}function tG(e){return!!tH()&&(e instanceof Element||e instanceof tq(e).Element)}function tX(e){return!!tH()&&(e instanceof HTMLElement||e instanceof tq(e).HTMLElement)}function tY(e){return!!tH()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof tq(e).ShadowRoot)}let tZ=new Set(["inline","contents"]);function tQ(e){let{overflow:t,overflowX:r,overflowY:n,display:s}=t9(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!tZ.has(s)}let tJ=new Set(["table","td","th"]),t0=[":popover-open",":modal"];function t1(e){return t0.some(t=>{try{return e.matches(t)}catch(e){return!1}})}let t2=["transform","translate","scale","rotate","perspective"],t4=["transform","translate","scale","rotate","perspective","filter"],t3=["paint","layout","strict","content"];function t5(e){let t=t6(),r=tG(e)?t9(e):e;return t2.some(e=>!!r[e]&&"none"!==r[e])||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||t4.some(e=>(r.willChange||"").includes(e))||t3.some(e=>(r.contain||"").includes(e))}function t6(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}let t8=new Set(["html","body","#document"]);function t7(e){return t8.has(tV(e))}function t9(e){return tq(e).getComputedStyle(e)}function re(e){return tG(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function rt(e){if("html"===tV(e))return e;let t=e.assignedSlot||e.parentNode||tY(e)&&e.host||tU(e);return tY(t)?t.host:t}function rr(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);let s=function e(t){let r=rt(t);return t7(r)?t.ownerDocument?t.ownerDocument.body:t.body:tX(r)&&tQ(r)?r:e(r)}(e),a=s===(null==(n=e.ownerDocument)?void 0:n.body),o=tq(s);if(a){let e=rn(o);return t.concat(o,o.visualViewport||[],tQ(s)?s:[],e&&r?rr(e):[])}return t.concat(s,rr(s,[],r))}function rn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function rs(e){let t=t9(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,s=tX(e),a=s?e.offsetWidth:r,o=s?e.offsetHeight:n,l=tx(r)!==a||tx(n)!==o;return l&&(r=a,n=o),{width:r,height:n,$:l}}function ra(e){return tG(e)?e:e.contextElement}function ro(e){let t=ra(e);if(!tX(t))return tv(1);let r=t.getBoundingClientRect(),{width:n,height:s,$:a}=rs(t),o=(a?tx(r.width):r.width)/n,l=(a?tx(r.height):r.height)/s;return o&&Number.isFinite(o)||(o=1),l&&Number.isFinite(l)||(l=1),{x:o,y:l}}let rl=tv(0);function ri(e){let t=tq(e);return t6()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:rl}function rc(e,t,r,n){var s;void 0===t&&(t=!1),void 0===r&&(r=!1);let a=e.getBoundingClientRect(),o=ra(e),l=tv(1);t&&(n?tG(n)&&(l=ro(n)):l=ro(e));let i=(void 0===(s=r)&&(s=!1),n&&(!s||n===tq(o))&&s)?ri(o):tv(0),c=(a.left+i.x)/l.x,d=(a.top+i.y)/l.y,u=a.width/l.x,m=a.height/l.y;if(o){let e=tq(o),t=n&&tG(n)?tq(n):n,r=e,s=rn(r);for(;s&&n&&t!==r;){let e=ro(s),t=s.getBoundingClientRect(),n=t9(s),a=t.left+(s.clientLeft+parseFloat(n.paddingLeft))*e.x,o=t.top+(s.clientTop+parseFloat(n.paddingTop))*e.y;c*=e.x,d*=e.y,u*=e.x,m*=e.y,c+=a,d+=o,s=rn(r=tq(s))}}return t_({width:u,height:m,x:c,y:d})}function rd(e,t){let r=re(e).scrollLeft;return t?t.left+r:rc(tU(e)).left+r}function ru(e,t){let r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-rd(e,r),y:r.top+t.scrollTop}}let rm=new Set(["absolute","fixed"]);function rf(e,t,r){var n;let s;if("viewport"===t)s=function(e,t){let r=tq(e),n=tU(e),s=r.visualViewport,a=n.clientWidth,o=n.clientHeight,l=0,i=0;if(s){a=s.width,o=s.height;let e=t6();(!e||e&&"fixed"===t)&&(l=s.offsetLeft,i=s.offsetTop)}let c=rd(n);if(c<=0){let e=n.ownerDocument,t=e.body,r=getComputedStyle(t),s="CSS1Compat"===e.compatMode&&parseFloat(r.marginLeft)+parseFloat(r.marginRight)||0,o=Math.abs(n.clientWidth-t.clientWidth-s);o<=25&&(a-=o)}else c<=25&&(a+=c);return{width:a,height:o,x:l,y:i}}(e,r);else if("document"===t){let t,r,a,o,l,i,c;n=tU(e),t=tU(n),r=re(n),a=n.ownerDocument.body,o=th(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),l=th(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight),i=-r.scrollLeft+rd(n),c=-r.scrollTop,"rtl"===t9(a).direction&&(i+=th(t.clientWidth,a.clientWidth)-o),s={width:o,height:l,x:i,y:c}}else if(tG(t)){let e,n,a,o,l,i;n=(e=rc(t,!0,"fixed"===r)).top+t.clientTop,a=e.left+t.clientLeft,o=tX(t)?ro(t):tv(1),l=t.clientWidth*o.x,i=t.clientHeight*o.y,s={width:l,height:i,x:a*o.x,y:n*o.y}}else{let r=ri(e);s={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return t_(s)}function rp(e){return"static"===t9(e).position}function rh(e,t){if(!tX(e)||"fixed"===t9(e).position)return null;if(t)return t(e);let r=e.offsetParent;return tU(e)===r&&(r=r.ownerDocument.body),r}function rx(e,t){var r;let n=tq(e);if(t1(e))return n;if(!tX(e)){let t=rt(e);for(;t&&!t7(t);){if(tG(t)&&!rp(t))return t;t=rt(t)}return n}let s=rh(e,t);for(;s&&(r=s,tJ.has(tV(r)))&&rp(s);)s=rh(s,t);return s&&t7(s)&&rp(s)&&!t5(s)?n:s||function(e){let t=rt(e);for(;tX(t)&&!t7(t);){if(t5(t))return t;if(t1(t))break;t=rt(t)}return null}(e)||n}let rg=async function(e){let t=this.getOffsetParent||rx,r=this.getDimensions,n=await r(e.floating);return{reference:function(e,t,r){let n=tX(t),s=tU(t),a="fixed"===r,o=rc(e,!0,a,t),l={scrollLeft:0,scrollTop:0},i=tv(0);if(n||!n&&!a)if(("body"!==tV(t)||tQ(s))&&(l=re(t)),n){let e=rc(t,!0,a,t);i.x=e.x+t.clientLeft,i.y=e.y+t.clientTop}else s&&(i.x=rd(s));a&&!n&&s&&(i.x=rd(s));let c=!s||n||a?tv(0):ru(s,l);return{x:o.left+l.scrollLeft-i.x-c.x,y:o.top+l.scrollTop-i.y-c.y,width:o.width,height:o.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},rv={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e,a="fixed"===s,o=tU(n),l=!!t&&t1(t.floating);if(n===o||l&&a)return r;let i={scrollLeft:0,scrollTop:0},c=tv(1),d=tv(0),u=tX(n);if((u||!u&&!a)&&(("body"!==tV(n)||tQ(o))&&(i=re(n)),tX(n))){let e=rc(n);c=ro(n),d.x=e.x+n.clientLeft,d.y=e.y+n.clientTop}let m=!o||u||a?tv(0):ru(o,i);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-i.scrollLeft*c.x+d.x+m.x,y:r.y*c.y-i.scrollTop*c.y+d.y+m.y}},getDocumentElement:tU,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e,a=[..."clippingAncestors"===r?t1(t)?[]:function(e,t){let r=t.get(e);if(r)return r;let n=rr(e,[],!1).filter(e=>tG(e)&&"body"!==tV(e)),s=null,a="fixed"===t9(e).position,o=a?rt(e):e;for(;tG(o)&&!t7(o);){let t=t9(o),r=t5(o);r||"fixed"!==t.position||(s=null),(a?!r&&!s:!r&&"static"===t.position&&!!s&&rm.has(s.position)||tQ(o)&&!r&&function e(t,r){let n=rt(t);return!(n===r||!tG(n)||t7(n))&&("fixed"===t9(n).position||e(n,r))}(e,o))?n=n.filter(e=>e!==o):s=t,o=rt(o)}return t.set(e,n),n}(t,this._c):[].concat(r),n],o=a[0],l=a.reduce((e,r)=>{let n=rf(t,r,s);return e.top=th(n.top,e.top),e.right=tp(n.right,e.right),e.bottom=tp(n.bottom,e.bottom),e.left=th(n.left,e.left),e},rf(t,o,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:rx,getElementRects:rg,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:r}=rs(e);return{width:t,height:r}},getScale:ro,isElement:tG,isRTL:function(e){return"rtl"===t9(e).direction}};function rb(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}let ry=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:n,placement:s,rects:a,platform:o,elements:l,middlewareData:i}=t,{element:c,padding:d=0}=tw(e,t)||{};if(null==c)return{};let u=tA(d),m={x:r,y:n},f=tk(tE(s)),p=tC(f),h=await o.getDimensions(c),x="y"===f,g=x?"clientHeight":"clientWidth",v=a.reference[p]+a.reference[f]-m[f]-a.floating[p],b=m[f]-a.reference[f],y=await (null==o.getOffsetParent?void 0:o.getOffsetParent(c)),w=y?y[g]:0;w&&await (null==o.isElement?void 0:o.isElement(y))||(w=l.floating[g]||a.floating[p]);let j=w/2-h[p]/2-1,N=tp(u[x?"top":"left"],j),k=tp(u[x?"bottom":"right"],j),C=w-h[p]-k,S=w/2-h[p]/2+(v/2-b/2),E=th(N,tp(S,C)),R=!i.arrow&&null!=tN(s)&&S!==E&&a.reference[p]/2-(S<N?N:k)-h[p]/2<0,P=R?S<N?S-N:S-C:0;return{[f]:m[f]+P,data:{[f]:E,centerOffset:S-E-P,...R&&{alignmentOffset:P}},reset:R}}});var rw="undefined"!=typeof document?p.useLayoutEffect:function(){};function rj(e,t){let r,n,s;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((r=e.length)!==t.length)return!1;for(n=r;0!=n--;)if(!rj(e[n],t[n]))return!1;return!0}if((r=(s=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!({}).hasOwnProperty.call(t,s[n]))return!1;for(n=r;0!=n--;){let r=s[n];if(("_owner"!==r||!e.$$typeof)&&!rj(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function rN(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function rk(e,t){let r=rN(e);return Math.round(t*r)/r}function rC(e){let t=p.useRef(e);return rw(()=>{t.current=e}),t}var rS=p.forwardRef((e,t)=>{let{children:r,width:n=10,height:s=5,...a}=e;return(0,f.jsx)(eZ.svg,{...a,ref:t,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:(0,f.jsx)("polygon",{points:"0,0 30,0 15,10"})})});function rE(e){let[t,r]=p.useState(void 0);return tc(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let n,s;if(!Array.isArray(t)||!t.length)return;let a=t[0];if("borderBoxSize"in a){let e=a.borderBoxSize,t=Array.isArray(e)?e[0]:e;n=t.inlineSize,s=t.blockSize}else n=e.offsetWidth,s=e.offsetHeight;r({width:n,height:s})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}r(void 0)},[e]),t}rS.displayName="Arrow";var rR="Popper",[rP,rM]=eK(rR),[rT,rL]=rP(rR),rD=e=>{let{__scopePopper:t,children:r}=e,[n,s]=p.useState(null);return(0,f.jsx)(rT,{scope:t,anchor:n,onAnchorChange:s,children:r})};rD.displayName=rR;var rA="PopperAnchor",r_=p.forwardRef((e,t)=>{let{__scopePopper:r,virtualRef:n,...s}=e,a=rL(rA,r),o=p.useRef(null),l=R(t,o);return p.useEffect(()=>{a.onAnchorChange(n?.current||o.current)}),n?null:(0,f.jsx)(eZ.div,{...s,ref:l})});r_.displayName=rA;var rO="PopperContent",[rz,rI]=rP(rO),rF=p.forwardRef((e,t)=>{var r,n,s,a,o,l,i,c,d,u,m,h,x,g,v,b,y,w,j,N,k;let{__scopePopper:C,side:S="bottom",sideOffset:E=0,align:P="center",alignOffset:M=0,arrowPadding:T=0,avoidCollisions:L=!0,collisionBoundary:D=[],collisionPadding:A=0,sticky:_="partial",hideWhenDetached:O=!1,updatePositionStrategy:z="optimized",onPlaced:I,...F}=e,$=rL(rO,C),[B,W]=p.useState(null),H=R(t,e=>W(e)),[V,q]=p.useState(null),U=rE(V),K=U?.width??0,G=U?.height??0,X="number"==typeof A?A:{top:0,right:0,bottom:0,left:0,...A},Y=Array.isArray(D)?D:[D],Z=Y.length>0,Q={padding:X,boundary:Y.filter(rH),altBoundary:Z},{refs:J,floatingStyles:ee,placement:et,isPositioned:er,middlewareData:en}=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:a,floating:o}={},transform:l=!0,whileElementsMounted:i,open:c}=e,[d,u]=p.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,f]=p.useState(n);rj(m,n)||f(n);let[h,x]=p.useState(null),[g,v]=p.useState(null),b=p.useCallback(e=>{e!==N.current&&(N.current=e,x(e))},[]),y=p.useCallback(e=>{e!==k.current&&(k.current=e,v(e))},[]),w=a||h,j=o||g,N=p.useRef(null),k=p.useRef(null),C=p.useRef(d),S=null!=i,E=rC(i),R=rC(s),P=rC(c),M=p.useCallback(()=>{var e,n;let s,a,o;if(!N.current||!k.current)return;let l={placement:t,strategy:r,middleware:m};R.current&&(l.platform=R.current),(e=N.current,n=k.current,s=new Map,o={...(a={platform:rv,...l}).platform,_c:s},tz(e,n,{...a,platform:o})).then(e=>{let t={...e,isPositioned:!1!==P.current};T.current&&!rj(C.current,t)&&(C.current=t,eY.flushSync(()=>{u(t)}))})},[m,t,r,R,P]);rw(()=>{!1===c&&C.current.isPositioned&&(C.current.isPositioned=!1,u(e=>({...e,isPositioned:!1})))},[c]);let T=p.useRef(!1);rw(()=>(T.current=!0,()=>{T.current=!1}),[]),rw(()=>{if(w&&(N.current=w),j&&(k.current=j),w&&j){if(E.current)return E.current(w,j,M);M()}},[w,j,M,E,S]);let L=p.useMemo(()=>({reference:N,floating:k,setReference:b,setFloating:y}),[b,y]),D=p.useMemo(()=>({reference:w,floating:j}),[w,j]),A=p.useMemo(()=>{let e={position:r,left:0,top:0};if(!D.floating)return e;let t=rk(D.floating,d.x),n=rk(D.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+n+"px)",...rN(D.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}},[r,l,D.floating,d.x,d.y]);return p.useMemo(()=>({...d,update:M,refs:L,elements:D,floatingStyles:A}),[d,M,L,D,A])}({strategy:"fixed",placement:S+("center"!==P?"-"+P:""),whileElementsMounted:(...e)=>(function(e,t,r,n){let s;void 0===n&&(n={});let{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:i="function"==typeof IntersectionObserver,animationFrame:c=!1}=n,d=ra(e),u=a||o?[...d?rr(d):[],...rr(t)]:[];u.forEach(e=>{a&&e.addEventListener("scroll",r,{passive:!0}),o&&e.addEventListener("resize",r)});let m=d&&i?function(e,t){let r,n=null,s=tU(e);function a(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return!function o(l,i){void 0===l&&(l=!1),void 0===i&&(i=1),a();let c=e.getBoundingClientRect(),{left:d,top:u,width:m,height:f}=c;if(l||t(),!m||!f)return;let p={rootMargin:-tg(u)+"px "+-tg(s.clientWidth-(d+m))+"px "+-tg(s.clientHeight-(u+f))+"px "+-tg(d)+"px",threshold:th(0,tp(1,i))||1},h=!0;function x(t){let n=t[0].intersectionRatio;if(n!==i){if(!h)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}1!==n||rb(c,e.getBoundingClientRect())||o(),h=!1}try{n=new IntersectionObserver(x,{...p,root:s.ownerDocument})}catch(e){n=new IntersectionObserver(x,p)}n.observe(e)}(!0),a}(d,r):null,f=-1,p=null;l&&(p=new ResizeObserver(e=>{let[n]=e;n&&n.target===d&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;null==(e=p)||e.observe(t)})),r()}),d&&!c&&p.observe(d),p.observe(t));let h=c?rc(e):null;return c&&function t(){let n=rc(e);h&&!rb(h,n)&&r(),h=n,s=requestAnimationFrame(t)}(),r(),()=>{var e;u.forEach(e=>{a&&e.removeEventListener("scroll",r),o&&e.removeEventListener("resize",r)}),null==m||m(),null==(e=p)||e.disconnect(),p=null,c&&cancelAnimationFrame(s)}})(...e,{animationFrame:"always"===z}),elements:{reference:$.anchor},middleware:[{...{name:"offset",options:s=r={mainAxis:E+G,alignmentAxis:M},async fn(e){var t,r;let{x:n,y:a,placement:o,middlewareData:l}=e,i=await tW(e,s);return o===(null==(t=l.offset)?void 0:t.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:n+i.x,y:a+i.y,data:{...i,placement:o}}}},options:[r,n]},L&&{...{name:"shift",options:d=i={mainAxis:!0,crossAxis:!1,limiter:"partial"===_?{...(void 0===(l=a)&&(l={}),{options:l,fn(e){let{x:t,y:r,placement:n,rects:s,middlewareData:a}=e,{offset:o=0,mainAxis:i=!0,crossAxis:c=!0}=tw(l,e),d={x:t,y:r},u=tE(n),m=tk(u),f=d[m],p=d[u],h=tw(o,e),x="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(i){let e="y"===m?"height":"width",t=s.reference[m]-s.floating[e]+x.mainAxis,r=s.reference[m]+s.reference[e]-x.mainAxis;f<t?f=t:f>r&&(f=r)}if(c){var g,v;let e="y"===m?"width":"height",t=tB.has(tj(n)),r=s.reference[u]-s.floating[e]+(t&&(null==(g=a.offset)?void 0:g[u])||0)+(t?0:x.crossAxis),o=s.reference[u]+s.reference[e]+(t?0:(null==(v=a.offset)?void 0:v[u])||0)-(t?x.crossAxis:0);p<r?p=r:p>o&&(p=o)}return{[m]:f,[u]:p}}}),options:[a,o]}:void 0,...Q},async fn(e){let{x:t,y:r,placement:n}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:o={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...l}=tw(d,e),i={x:t,y:r},c=await tI(e,l),u=tE(tj(n)),m=tk(u),f=i[m],p=i[u];if(s){let e="y"===m?"top":"left",t="y"===m?"bottom":"right",r=f+c[e],n=f-c[t];f=th(r,tp(f,n))}if(a){let e="y"===u?"top":"left",t="y"===u?"bottom":"right",r=p+c[e],n=p-c[t];p=th(r,tp(p,n))}let h=o.fn({...e,[m]:f,[u]:p});return{...h,data:{x:h.x-t,y:h.y-r,enabled:{[m]:s,[u]:a}}}}},options:[i,c]},L&&{...{name:"flip",options:h=u={...Q},async fn(e){var t,r,n,s,a,o,l,i;let c,d,u,{placement:m,middlewareData:f,rects:p,initialPlacement:x,platform:g,elements:v}=e,{mainAxis:b=!0,crossAxis:y=!0,fallbackPlacements:w,fallbackStrategy:j="bestFit",fallbackAxisSideDirection:N="none",flipAlignment:k=!0,...C}=tw(h,e);if(null!=(t=f.arrow)&&t.alignmentOffset)return{};let S=tj(m),E=tE(x),R=tj(x)===x,P=await (null==g.isRTL?void 0:g.isRTL(v.floating)),M=w||(R||!k?[tD(x)]:(c=tD(x),[tR(x),c,tR(c)])),T="none"!==N;!w&&T&&M.push(...(d=tN(x),u=function(e,t,r){switch(e){case"top":case"bottom":if(r)return t?tM:tP;return t?tP:tM;case"left":case"right":return t?tT:tL;default:return[]}}(tj(x),"start"===N,P),d&&(u=u.map(e=>e+"-"+d),k&&(u=u.concat(u.map(tR)))),u));let L=[x,...M],D=await tI(e,C),A=[],_=(null==(r=f.flip)?void 0:r.overflows)||[];if(b&&A.push(D[S]),y){let e,t,r,n,s=(o=m,l=p,void 0===(i=P)&&(i=!1),e=tN(o),r=tC(t=tk(tE(o))),n="x"===t?e===(i?"end":"start")?"right":"left":"start"===e?"bottom":"top",l.reference[r]>l.floating[r]&&(n=tD(n)),[n,tD(n)]);A.push(D[s[0]],D[s[1]])}if(_=[..._,{placement:m,overflows:A}],!A.every(e=>e<=0)){let e=((null==(n=f.flip)?void 0:n.index)||0)+1,t=L[e];if(t&&("alignment"!==y||E===tE(t)||_.every(e=>tE(e.placement)!==E||e.overflows[0]>0)))return{data:{index:e,overflows:_},reset:{placement:t}};let r=null==(s=_.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:s.placement;if(!r)switch(j){case"bestFit":{let e=null==(a=_.filter(e=>{if(T){let t=tE(e.placement);return t===E||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:a[0];e&&(r=e);break}case"initialPlacement":r=x}if(m!==r)return{reset:{placement:r}}}return{}}},options:[u,m]},{...{name:"size",options:v=x={...Q,apply:({elements:e,rects:t,availableWidth:r,availableHeight:n})=>{let{width:s,height:a}=t.reference,o=e.floating.style;o.setProperty("--radix-popper-available-width",`${r}px`),o.setProperty("--radix-popper-available-height",`${n}px`),o.setProperty("--radix-popper-anchor-width",`${s}px`),o.setProperty("--radix-popper-anchor-height",`${a}px`)}},async fn(e){var t,r;let n,s,{placement:a,rects:o,platform:l,elements:i}=e,{apply:c=()=>{},...d}=tw(v,e),u=await tI(e,d),m=tj(a),f=tN(a),p="y"===tE(a),{width:h,height:x}=o.floating;"top"===m||"bottom"===m?(n=m,s=f===(await (null==l.isRTL?void 0:l.isRTL(i.floating))?"start":"end")?"left":"right"):(s=m,n="end"===f?"top":"bottom");let g=x-u.top-u.bottom,b=h-u.left-u.right,y=tp(x-u[n],g),w=tp(h-u[s],b),j=!e.middlewareData.shift,N=y,k=w;if(null!=(t=e.middlewareData.shift)&&t.enabled.x&&(k=b),null!=(r=e.middlewareData.shift)&&r.enabled.y&&(N=g),j&&!f){let e=th(u.left,0),t=th(u.right,0),r=th(u.top,0),n=th(u.bottom,0);p?k=h-2*(0!==e||0!==t?e+t:th(u.left,u.right)):N=x-2*(0!==r||0!==n?r+n:th(u.top,u.bottom))}await c({...e,availableWidth:k,availableHeight:N});let C=await l.getDimensions(i.floating);return h!==C.width||x!==C.height?{reset:{rects:!0}}:{}}},options:[x,g]},V&&{...{name:"arrow",options:w=b={element:V,padding:T},fn(e){let{element:t,padding:r}="function"==typeof w?w(e):w;return t&&({}).hasOwnProperty.call(t,"current")?null!=t.current?ry({element:t.current,padding:r}).fn(e):{}:t?ry({element:t,padding:r}).fn(e):{}}},options:[b,y]},rV({arrowWidth:K,arrowHeight:G}),O&&{...{name:"hide",options:k=j={strategy:"referenceHidden",...Q},async fn(e){let{rects:t}=e,{strategy:r="referenceHidden",...n}=tw(k,e);switch(r){case"referenceHidden":{let r=tF(await tI(e,{...n,elementContext:"reference"}),t.reference);return{data:{referenceHiddenOffsets:r,referenceHidden:t$(r)}}}case"escaped":{let r=tF(await tI(e,{...n,altBoundary:!0}),t.floating);return{data:{escapedOffsets:r,escaped:t$(r)}}}default:return{}}}},options:[j,N]}]}),[es,ea]=rq(et),eo=eG(I);tc(()=>{er&&eo?.()},[er,eo]);let el=en.arrow?.x,ei=en.arrow?.y,ec=en.arrow?.centerOffset!==0,[ed,eu]=p.useState();return tc(()=>{B&&eu(window.getComputedStyle(B).zIndex)},[B]),(0,f.jsx)("div",{ref:J.setFloating,"data-radix-popper-content-wrapper":"",style:{...ee,transform:er?ee.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ed,"--radix-popper-transform-origin":[en.transformOrigin?.x,en.transformOrigin?.y].join(" "),...en.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,f.jsx)(rz,{scope:C,placedSide:es,onArrowChange:q,arrowX:el,arrowY:ei,shouldHideArrow:ec,children:(0,f.jsx)(eZ.div,{"data-side":es,"data-align":ea,...F,ref:H,style:{...F.style,animation:er?void 0:"none"}})})})});rF.displayName=rO;var r$="PopperArrow",rB={top:"bottom",right:"left",bottom:"top",left:"right"},rW=p.forwardRef(function(e,t){let{__scopePopper:r,...n}=e,s=rI(r$,r),a=rB[s.placedSide];return(0,f.jsx)("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:(0,f.jsx)(rS,{...n,ref:t,style:{...n.style,display:"block"}})})});function rH(e){return null!==e}rW.displayName=r$;var rV=e=>({name:"transformOrigin",options:e,fn(t){let{placement:r,rects:n,middlewareData:s}=t,a=s.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[i,c]=rq(r),d={start:"0%",center:"50%",end:"100%"}[c],u=(s.arrow?.x??0)+o/2,m=(s.arrow?.y??0)+l/2,f="",p="";return"bottom"===i?(f=a?d:`${u}px`,p=`${-l}px`):"top"===i?(f=a?d:`${u}px`,p=`${n.floating.height+l}px`):"right"===i?(f=`${-l}px`,p=a?d:`${m}px`):"left"===i&&(f=`${n.floating.width+l}px`,p=a?d:`${m}px`),{data:{x:f,y:p}}}});function rq(e){let[t,r="center"]=e.split("-");return[t,r]}var rU=p.forwardRef((e,t)=>{let{container:r,...n}=e,[s,a]=p.useState(!1);tc(()=>a(!0),[]);let o=r||s&&globalThis?.document?.body;return o?eY.default.createPortal((0,f.jsx)(eZ.div,{...n,ref:t}),o):null});rU.displayName="Portal";var rK=e=>{var t;let r,n,{present:s,children:a}=e,o=function(e){var t,r;let[n,s]=p.useState(),a=p.useRef({}),o=p.useRef(e),l=p.useRef("none"),[i,c]=(t=e?"mounted":"unmounted",r={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},p.useReducer((e,t)=>r[e][t]??e,t));return p.useEffect(()=>{let e=rG(a.current);l.current="mounted"===i?e:"none"},[i]),tc(()=>{let t=a.current,r=o.current;if(r!==e){let n=l.current,s=rG(t);e?c("MOUNT"):"none"===s||t?.display==="none"?c("UNMOUNT"):r&&n!==s?c("ANIMATION_OUT"):c("UNMOUNT"),o.current=e}},[e,c]),tc(()=>{if(n){let e,t=n.ownerDocument.defaultView??window,r=r=>{let s=rG(a.current).includes(r.animationName);if(r.target===n&&s&&(c("ANIMATION_END"),!o.current)){let r=n.style.animationFillMode;n.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===n.style.animationFillMode&&(n.style.animationFillMode=r)})}},s=e=>{e.target===n&&(l.current=rG(a.current))};return n.addEventListener("animationstart",s),n.addEventListener("animationcancel",r),n.addEventListener("animationend",r),()=>{t.clearTimeout(e),n.removeEventListener("animationstart",s),n.removeEventListener("animationcancel",r),n.removeEventListener("animationend",r)}}c("ANIMATION_END")},[n,c]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:p.useCallback(e=>{e&&(a.current=getComputedStyle(e)),s(e)},[])}}(s),l="function"==typeof a?a({present:o.isPresent}):p.Children.only(a),i=R(o.ref,(t=l,(n=(r=Object.getOwnPropertyDescriptor(t.props,"ref")?.get)&&"isReactWarning"in r&&r.isReactWarning)?t.ref:(n=(r=Object.getOwnPropertyDescriptor(t,"ref")?.get)&&"isReactWarning"in r&&r.isReactWarning)?t.props.ref:t.props.ref||t.ref));return"function"==typeof a||o.isPresent?p.cloneElement(l,{ref:i}):null};function rG(e){return e?.animationName||"none"}rK.displayName="Presence";var rX="rovingFocusGroup.onEntryFocus",rY={bubbles:!1,cancelable:!0},rZ="RovingFocusGroup",[rQ,rJ,r0]=eJ(rZ),[r1,r2]=eK(rZ,[r0]),[r4,r3]=r1(rZ),r5=p.forwardRef((e,t)=>(0,f.jsx)(rQ.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,f.jsx)(rQ.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,f.jsx)(r6,{...e,ref:t})})}));r5.displayName=rZ;var r6=p.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,orientation:n,loop:s=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:i,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...u}=e,m=p.useRef(null),h=R(t,m),x=e1(a),[g=null,v]=eX({prop:o,defaultProp:l,onChange:i}),[b,y]=p.useState(!1),w=eG(c),j=rJ(r),N=p.useRef(!1),[k,C]=p.useState(0);return p.useEffect(()=>{let e=m.current;if(e)return e.addEventListener(rX,w),()=>e.removeEventListener(rX,w)},[w]),(0,f.jsx)(r4,{scope:r,orientation:n,dir:x,loop:s,currentTabStopId:g,onItemFocus:p.useCallback(e=>v(e),[v]),onItemShiftTab:p.useCallback(()=>y(!0),[]),onFocusableItemAdd:p.useCallback(()=>C(e=>e+1),[]),onFocusableItemRemove:p.useCallback(()=>C(e=>e-1),[]),children:(0,f.jsx)(eZ.div,{tabIndex:b||0===k?-1:0,"data-orientation":n,...u,ref:h,style:{outline:"none",...e.style},onMouseDown:eU(e.onMouseDown,()=>{N.current=!0}),onFocus:eU(e.onFocus,e=>{let t=!N.current;if(e.target===e.currentTarget&&t&&!b){let t=new CustomEvent(rX,rY);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=j().filter(e=>e.focusable);ne([e.find(e=>e.active),e.find(e=>e.id===g),...e].filter(Boolean).map(e=>e.ref.current),d)}}N.current=!1}),onBlur:eU(e.onBlur,()=>y(!1))})})}),r8="RovingFocusGroupItem",r7=p.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,focusable:n=!0,active:s=!1,tabStopId:a,...o}=e,l=tm(),i=a||l,c=r3(r8,r),d=c.currentTabStopId===i,u=rJ(r),{onFocusableItemAdd:m,onFocusableItemRemove:h}=c;return p.useEffect(()=>{if(n)return m(),()=>h()},[n,m,h]),(0,f.jsx)(rQ.ItemSlot,{scope:r,id:i,focusable:n,active:s,children:(0,f.jsx)(eZ.span,{tabIndex:d?0:-1,"data-orientation":c.orientation,...o,ref:t,onMouseDown:eU(e.onMouseDown,e=>{n?c.onItemFocus(i):e.preventDefault()}),onFocus:eU(e.onFocus,()=>c.onItemFocus(i)),onKeyDown:eU(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void c.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,r){var n;let s=(n=e.key,"rtl"!==r?n:"ArrowLeft"===n?"ArrowRight":"ArrowRight"===n?"ArrowLeft":n);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(s))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(s)))return r9[s]}(e,c.orientation,c.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let s=u().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)s.reverse();else if("prev"===t||"next"===t){var r,n;"prev"===t&&s.reverse();let a=s.indexOf(e.currentTarget);s=c.loop?(r=s,n=a+1,r.map((e,t)=>r[(n+t)%r.length])):s.slice(a+1)}setTimeout(()=>ne(s))}})})})});r7.displayName=r8;var r9={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ne(e,t=!1){let r=document.activeElement;for(let n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}var nt=new WeakMap,nr=new WeakMap,nn={},ns=0,na=function(e){return e&&(e.host||na(e.parentNode))},no=function(e,t,r,n){var s=(Array.isArray(e)?e:[e]).map(function(e){if(t.contains(e))return e;var r=na(e);return r&&t.contains(r)?r:(console.error("aria-hidden",e,"in not contained inside",t,". Doing nothing"),null)}).filter(function(e){return!!e});nn[r]||(nn[r]=new WeakMap);var a=nn[r],o=[],l=new Set,i=new Set(s),c=function(e){!e||l.has(e)||(l.add(e),c(e.parentNode))};s.forEach(c);var d=function(e){!e||i.has(e)||Array.prototype.forEach.call(e.children,function(e){if(l.has(e))d(e);else try{var t=e.getAttribute(n),s=null!==t&&"false"!==t,i=(nt.get(e)||0)+1,c=(a.get(e)||0)+1;nt.set(e,i),a.set(e,c),o.push(e),1===i&&s&&nr.set(e,!0),1===c&&e.setAttribute(r,"true"),s||e.setAttribute(n,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return d(t),l.clear(),ns++,function(){o.forEach(function(e){var t=nt.get(e)-1,s=a.get(e)-1;nt.set(e,t),a.set(e,s),t||(nr.has(e)||e.removeAttribute(n),nr.delete(e)),s||e.removeAttribute(r)}),--ns||(nt=new WeakMap,nt=new WeakMap,nr=new WeakMap,nn={})}},nl=function(e,t,r){void 0===r&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=t||("undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live], script"))),no(n,s,r,"aria-hidden")):function(){return null}},ni=function(){return(ni=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)};function nc(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)0>t.indexOf(n[s])&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]]);return r}var nd=("function"==typeof SuppressedError&&SuppressedError,"right-scroll-bar-position"),nu="width-before-scroll-bar";function nm(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var nf="undefined"!=typeof window?p.useLayoutEffect:p.useEffect,np=new WeakMap,nh=(void 0===s&&(s={}),(void 0===a&&(a=function(e){return e}),o=[],l=!1,i={read:function(){if(l)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return o.length?o[o.length-1]:null},useMedium:function(e){var t=a(e,l);return o.push(t),function(){o=o.filter(function(e){return e!==t})}},assignSyncMedium:function(e){for(l=!0;o.length;){var t=o;o=[],t.forEach(e)}o={push:function(t){return e(t)},filter:function(){return o}}},assignMedium:function(e){l=!0;var t=[];if(o.length){var r=o;o=[],r.forEach(e),t=o}var n=function(){var r=t;t=[],r.forEach(e)},s=function(){return Promise.resolve().then(n)};s(),o={push:function(e){t.push(e),s()},filter:function(e){return t=t.filter(e),o}}}}).options=ni({async:!0,ssr:!1},s),i),nx=function(){},ng=p.forwardRef(function(e,t){var r,n,s,a,o=p.useRef(null),l=p.useState({onScrollCapture:nx,onWheelCapture:nx,onTouchMoveCapture:nx}),i=l[0],c=l[1],d=e.forwardProps,u=e.children,m=e.className,f=e.removeScrollBar,h=e.enabled,x=e.shards,g=e.sideCar,v=e.noRelative,b=e.noIsolation,y=e.inert,w=e.allowPinchZoom,j=e.as,N=e.gapMode,k=nc(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=(r=[o,t],n=function(e){return r.forEach(function(t){return nm(t,e)})},(s=(0,p.useState)(function(){return{value:null,callback:n,facade:{get current(){return s.value},set current(value){var e=s.value;e!==value&&(s.value=value,s.callback(value,e))}}}})[0]).callback=n,a=s.facade,nf(function(){var e=np.get(a);if(e){var t=new Set(e),n=new Set(r),s=a.current;t.forEach(function(e){n.has(e)||nm(e,null)}),n.forEach(function(e){t.has(e)||nm(e,s)})}np.set(a,r)},[r]),a),S=ni(ni({},k),i);return p.createElement(p.Fragment,null,h&&p.createElement(g,{sideCar:nh,removeScrollBar:f,shards:x,noRelative:v,noIsolation:b,inert:y,setCallbacks:c,allowPinchZoom:!!w,lockRef:o,gapMode:N}),d?p.cloneElement(p.Children.only(u),ni(ni({},S),{ref:C})):p.createElement(void 0===j?"div":j,ni({},S,{className:m,ref:C}),u))});ng.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},ng.classNames={fullWidth:nu,zeroRight:nd};var nv=function(e){var t=e.sideCar,r=nc(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw Error("Sidecar medium not found");return p.createElement(n,ni({},r))};nv.isSideCarExport=!0;var nb=function(){var e=0,t=null;return{add:function(r){if(0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=m||("undefined"!=typeof __webpack_nonce__?__webpack_nonce__:void 0);return t&&e.setAttribute("nonce",t),e}())){var n,s;(n=t).styleSheet?n.styleSheet.cssText=r:n.appendChild(document.createTextNode(r)),s=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(s)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ny=function(){var e=nb();return function(t,r){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},nw=function(){var e=ny();return function(t){return e(t.styles,t.dynamic),null}},nj={left:0,top:0,right:0,gap:0},nN=function(e){return parseInt(e||"",10)||0},nk=function(e){var t=window.getComputedStyle(document.body),r=t["padding"===e?"paddingLeft":"marginLeft"],n=t["padding"===e?"paddingTop":"marginTop"],s=t["padding"===e?"paddingRight":"marginRight"];return[nN(r),nN(n),nN(s)]},nC=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return nj;var t=nk(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},nS=nw(),nE="data-scroll-locked",nR=function(e,t,r,n){var s=e.left,a=e.top,o=e.right,l=e.gap;return void 0===r&&(r="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(n,";\n padding-right: ").concat(l,"px ").concat(n,";\n }\n body[").concat(nE,"] {\n overflow: hidden ").concat(n,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(n,";"),"margin"===r&&"\n padding-left: ".concat(s,"px;\n padding-top: ").concat(a,"px;\n padding-right: ").concat(o,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(l,"px ").concat(n,";\n "),"padding"===r&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),"\n }\n \n .").concat(nd," {\n right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(nu," {\n margin-right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(nd," .").concat(nd," {\n right: 0 ").concat(n,";\n }\n \n .").concat(nu," .").concat(nu," {\n margin-right: 0 ").concat(n,";\n }\n \n body[").concat(nE,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(l,"px;\n }\n")},nP=function(){var e=parseInt(document.body.getAttribute(nE)||"0",10);return isFinite(e)?e:0},nM=function(){p.useEffect(function(){return document.body.setAttribute(nE,(nP()+1).toString()),function(){var e=nP()-1;e<=0?document.body.removeAttribute(nE):document.body.setAttribute(nE,e.toString())}},[])},nT=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,s=void 0===n?"margin":n;nM();var a=p.useMemo(function(){return nC(s)},[s]);return p.createElement(nS,{styles:nR(a,!t,s,r?"":"!important")})},nL=!1;if("undefined"!=typeof window)try{var nD=Object.defineProperty({},"passive",{get:function(){return nL=!0,!0}});window.addEventListener("test",nD,nD),window.removeEventListener("test",nD,nD)}catch(e){nL=!1}var nA=!!nL&&{passive:!1},n_=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return"hidden"!==r[t]&&(r.overflowY!==r.overflowX||"TEXTAREA"===e.tagName||"visible"!==r[t])},nO=function(e,t){var r=t.ownerDocument,n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),nz(e,n)){var s=nI(e,n);if(s[1]>s[2])return!0}n=n.parentNode}while(n&&n!==r.body)return!1},nz=function(e,t){return"v"===e?n_(t,"overflowY"):n_(t,"overflowX")},nI=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},nF=function(e,t,r,n,s){var a,o=(a=window.getComputedStyle(t).direction,"h"===e&&"rtl"===a?-1:1),l=o*n,i=r.target,c=t.contains(i),d=!1,u=l>0,m=0,f=0;do{if(!i)break;var p=nI(e,i),h=p[0],x=p[1]-p[2]-o*h;(h||x)&&nz(e,i)&&(m+=x,f+=h);var g=i.parentNode;i=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&i!==document.body||c&&(t.contains(i)||t===i))return u&&(s&&1>Math.abs(m)||!s&&l>m)?d=!0:!u&&(s&&1>Math.abs(f)||!s&&-l>f)&&(d=!0),d},n$=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},nB=function(e){return[e.deltaX,e.deltaY]},nW=function(e){return e&&"current"in e?e.current:e},nH=0,nV=[];let nq=(c=function(e){var t=p.useRef([]),r=p.useRef([0,0]),n=p.useRef(),s=p.useState(nH++)[0],a=p.useState(nw)[0],o=p.useRef(e);p.useEffect(function(){o.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var t=(function(e,t,r){if(r||2==arguments.length)for(var n,s=0,a=t.length;s<a;s++)!n&&s in t||(n||(n=Array.prototype.slice.call(t,0,s)),n[s]=t[s]);return e.concat(n||Array.prototype.slice.call(t))})([e.lockRef.current],(e.shards||[]).map(nW),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var l=p.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!o.current.allowPinchZoom;var s,a=n$(e),l=r.current,i="deltaX"in e?e.deltaX:l[0]-a[0],c="deltaY"in e?e.deltaY:l[1]-a[1],d=e.target,u=Math.abs(i)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===u&&"range"===d.type)return!1;var m=window.getSelection(),f=m&&m.anchorNode;if(f&&(f===d||f.contains(d)))return!1;var p=nO(u,d);if(!p)return!0;if(p?s=u:(s="v"===u?"h":"v",p=nO(u,d)),!p)return!1;if(!n.current&&"changedTouches"in e&&(i||c)&&(n.current=s),!s)return!0;var h=n.current||s;return nF(h,t,e,"h"===h?i:c,!0)},[]),i=p.useCallback(function(e){if(nV.length&&nV[nV.length-1]===a){var r="deltaY"in e?nB(e):n$(e),n=t.current.filter(function(t){var n;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(n=t.delta,n[0]===r[0]&&n[1]===r[1])})[0];if(n&&n.should){e.cancelable&&e.preventDefault();return}if(!n){var s=(o.current.shards||[]).map(nW).filter(Boolean).filter(function(t){return t.contains(e.target)});(s.length>0?l(e,s[0]):!o.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),c=p.useCallback(function(e,r,n,s){var a={name:e,delta:r,target:n,should:s,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(n)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),d=p.useCallback(function(e){r.current=n$(e),n.current=void 0},[]),u=p.useCallback(function(t){c(t.type,nB(t),t.target,l(t,e.lockRef.current))},[]),m=p.useCallback(function(t){c(t.type,n$(t),t.target,l(t,e.lockRef.current))},[]);p.useEffect(function(){return nV.push(a),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:m}),document.addEventListener("wheel",i,nA),document.addEventListener("touchmove",i,nA),document.addEventListener("touchstart",d,nA),function(){nV=nV.filter(function(e){return e!==a}),document.removeEventListener("wheel",i,nA),document.removeEventListener("touchmove",i,nA),document.removeEventListener("touchstart",d,nA)}},[]);var f=e.removeScrollBar,h=e.inert;return p.createElement(p.Fragment,null,h?p.createElement(a,{styles:"\n .block-interactivity-".concat(s," {pointer-events: none;}\n .allow-interactivity-").concat(s," {pointer-events: all;}\n")}):null,f?p.createElement(nT,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},nh.useMedium(c),nv);var nU=p.forwardRef(function(e,t){return p.createElement(ng,ni({},e,{ref:t,sideCar:nq}))});nU.classNames=ng.classNames;var nK=["Enter"," "],nG=["ArrowUp","PageDown","End"],nX=["ArrowDown","PageUp","Home",...nG],nY={ltr:[...nK,"ArrowRight"],rtl:[...nK,"ArrowLeft"]},nZ={ltr:["ArrowLeft"],rtl:["ArrowRight"]},nQ="Menu",[nJ,n0,n1]=eJ(nQ),[n2,n4]=eK(nQ,[n1,rM,r2]),n3=rM(),n5=r2(),[n6,n8]=n2(nQ),[n7,n9]=n2(nQ),se=e=>{let{__scopeMenu:t,open:r=!1,children:n,dir:s,onOpenChange:a,modal:o=!0}=e,l=n3(t),[i,c]=p.useState(null),d=p.useRef(!1),u=eG(a),m=e1(s);return p.useEffect(()=>{let e=()=>{d.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>d.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}},[]),(0,f.jsx)(rD,{...l,children:(0,f.jsx)(n6,{scope:t,open:r,onOpenChange:u,content:i,onContentChange:c,children:(0,f.jsx)(n7,{scope:t,onClose:p.useCallback(()=>u(!1),[u]),isUsingKeyboardRef:d,dir:m,modal:o,children:n})})})};se.displayName=nQ;var st=p.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e,s=n3(r);return(0,f.jsx)(r_,{...s,...n,ref:t})});st.displayName="MenuAnchor";var sr="MenuPortal",[sn,ss]=n2(sr,{forceMount:void 0}),sa=e=>{let{__scopeMenu:t,forceMount:r,children:n,container:s}=e,a=n8(sr,t);return(0,f.jsx)(sn,{scope:t,forceMount:r,children:(0,f.jsx)(rK,{present:r||a.open,children:(0,f.jsx)(rU,{asChild:!0,container:s,children:n})})})};sa.displayName=sr;var so="MenuContent",[sl,si]=n2(so),sc=p.forwardRef((e,t)=>{let r=ss(so,e.__scopeMenu),{forceMount:n=r.forceMount,...s}=e,a=n8(so,e.__scopeMenu),o=n9(so,e.__scopeMenu);return(0,f.jsx)(nJ.Provider,{scope:e.__scopeMenu,children:(0,f.jsx)(rK,{present:n||a.open,children:(0,f.jsx)(nJ.Slot,{scope:e.__scopeMenu,children:o.modal?(0,f.jsx)(sd,{...s,ref:t}):(0,f.jsx)(su,{...s,ref:t})})})})}),sd=p.forwardRef((e,t)=>{let r=n8(so,e.__scopeMenu),n=p.useRef(null),s=R(t,n);return p.useEffect(()=>{let e=n.current;if(e)return nl(e)},[]),(0,f.jsx)(sm,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:eU(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),su=p.forwardRef((e,t)=>{let r=n8(so,e.__scopeMenu);return(0,f.jsx)(sm,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),sm=p.forwardRef((e,t)=>{let{__scopeMenu:r,loop:n=!1,trapFocus:s,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:l,onEntryFocus:i,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:u,onInteractOutside:m,onDismiss:h,disableOutsideScroll:x,...g}=e,v=n8(so,r),b=n9(so,r),y=n3(r),w=n5(r),j=n0(r),[N,k]=p.useState(null),C=p.useRef(null),S=R(t,C,v.onContentChange),E=p.useRef(0),M=p.useRef(""),T=p.useRef(0),L=p.useRef(null),D=p.useRef("right"),A=p.useRef(0),_=x?nU:p.Fragment,O=x?{as:P,allowPinchZoom:!0}:void 0;p.useEffect(()=>()=>window.clearTimeout(E.current),[]),e7();let z=p.useCallback(e=>{var t,r;return D.current===L.current?.side&&(t=e,!!(r=L.current?.area)&&function(e,t){let{x:r,y:n}=e,s=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e].x,l=t[e].y,i=t[a].x,c=t[a].y;l>n!=c>n&&r<(i-o)*(n-l)/(c-l)+o&&(s=!s)}return s}({x:t.clientX,y:t.clientY},r))},[]);return(0,f.jsx)(sl,{scope:r,searchRef:M,onItemEnter:p.useCallback(e=>{z(e)&&e.preventDefault()},[z]),onItemLeave:p.useCallback(e=>{z(e)||(C.current?.focus(),k(null))},[z]),onTriggerLeave:p.useCallback(e=>{z(e)&&e.preventDefault()},[z]),pointerGraceTimerRef:T,onPointerGraceIntentChange:p.useCallback(e=>{L.current=e},[]),children:(0,f.jsx)(_,{...O,children:(0,f.jsx)(tn,{asChild:!0,trapped:s,onMountAutoFocus:eU(a,e=>{e.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,f.jsx)(e3,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:u,onInteractOutside:m,onDismiss:h,children:(0,f.jsx)(r5,{asChild:!0,...w,dir:b.dir,orientation:"vertical",loop:n,currentTabStopId:N,onCurrentTabStopIdChange:k,onEntryFocus:eU(i,e=>{b.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,f.jsx)(rF,{role:"menu","aria-orientation":"vertical","data-state":sI(v.open),"data-radix-menu-content":"",dir:b.dir,...y,...g,ref:S,style:{outline:"none",...g.style},onKeyDown:eU(g.onKeyDown,e=>{let t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,r=e.ctrlKey||e.altKey||e.metaKey,n=1===e.key.length;if(t){var s;let t,a,o,l,i,c;"Tab"===e.key&&e.preventDefault(),!r&&n&&(s=e.key,t=M.current+s,a=j().filter(e=>!e.disabled),o=document.activeElement,l=a.find(e=>e.ref.current===o)?.textValue,i=function(e,t,r){var n;let s=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,a=r?e.indexOf(r):-1,o=(n=Math.max(a,0),e.map((t,r)=>e[(n+r)%e.length]));1===s.length&&(o=o.filter(e=>e!==r));let l=o.find(e=>e.toLowerCase().startsWith(s.toLowerCase()));return l!==r?l:void 0}(a.map(e=>e.textValue),t,l),c=a.find(e=>e.textValue===i)?.ref.current,function e(t){M.current=t,window.clearTimeout(E.current),""!==t&&(E.current=window.setTimeout(()=>e(""),1e3))}(t),c&&setTimeout(()=>c.focus()))}let a=C.current;if(e.target!==a||!nX.includes(e.key))return;e.preventDefault();let o=j().filter(e=>!e.disabled).map(e=>e.ref.current);nG.includes(e.key)&&o.reverse(),function(e){let t=document.activeElement;for(let r of e)if(r===t||(r.focus(),document.activeElement!==t))return}(o)}),onBlur:eU(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(E.current),M.current="")}),onPointerMove:eU(e.onPointerMove,sB(e=>{let t=e.target,r=A.current!==e.clientX;e.currentTarget.contains(t)&&r&&(D.current=e.clientX>A.current?"right":"left",A.current=e.clientX)}))})})})})})})});sc.displayName=so;var sf=p.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e;return(0,f.jsx)(eZ.div,{role:"group",...n,ref:t})});sf.displayName="MenuGroup";var sp=p.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e;return(0,f.jsx)(eZ.div,{...n,ref:t})});sp.displayName="MenuLabel";var sh="MenuItem",sx="menu.itemSelect",sg=p.forwardRef((e,t)=>{let{disabled:r=!1,onSelect:n,...s}=e,a=p.useRef(null),o=n9(sh,e.__scopeMenu),l=si(sh,e.__scopeMenu),i=R(t,a),c=p.useRef(!1);return(0,f.jsx)(sv,{...s,ref:i,disabled:r,onClick:eU(e.onClick,()=>{let e=a.current;if(!r&&e){let t=new CustomEvent(sx,{bubbles:!0,cancelable:!0});e.addEventListener(sx,e=>n?.(e),{once:!0}),eQ(e,t),t.defaultPrevented?c.current=!1:o.onClose()}}),onPointerDown:t=>{e.onPointerDown?.(t),c.current=!0},onPointerUp:eU(e.onPointerUp,e=>{c.current||e.currentTarget?.click()}),onKeyDown:eU(e.onKeyDown,e=>{let t=""!==l.searchRef.current;r||t&&" "===e.key||nK.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});sg.displayName=sh;var sv=p.forwardRef((e,t)=>{let{__scopeMenu:r,disabled:n=!1,textValue:s,...a}=e,o=si(sh,r),l=n5(r),i=p.useRef(null),c=R(t,i),[d,u]=p.useState(!1),[m,h]=p.useState("");return p.useEffect(()=>{let e=i.current;e&&h((e.textContent??"").trim())},[a.children]),(0,f.jsx)(nJ.ItemSlot,{scope:r,disabled:n,textValue:s??m,children:(0,f.jsx)(r7,{asChild:!0,...l,focusable:!n,children:(0,f.jsx)(eZ.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...a,ref:c,onPointerMove:eU(e.onPointerMove,sB(e=>{n?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:eU(e.onPointerLeave,sB(e=>o.onItemLeave(e))),onFocus:eU(e.onFocus,()=>u(!0)),onBlur:eU(e.onBlur,()=>u(!1))})})})}),sb=p.forwardRef((e,t)=>{let{checked:r=!1,onCheckedChange:n,...s}=e;return(0,f.jsx)(sE,{scope:e.__scopeMenu,checked:r,children:(0,f.jsx)(sg,{role:"menuitemcheckbox","aria-checked":sF(r)?"mixed":r,...s,ref:t,"data-state":s$(r),onSelect:eU(s.onSelect,()=>n?.(!!sF(r)||!r),{checkForDefaultPrevented:!1})})})});sb.displayName="MenuCheckboxItem";var sy="MenuRadioGroup",[sw,sj]=n2(sy,{value:void 0,onValueChange:()=>{}}),sN=p.forwardRef((e,t)=>{let{value:r,onValueChange:n,...s}=e,a=eG(n);return(0,f.jsx)(sw,{scope:e.__scopeMenu,value:r,onValueChange:a,children:(0,f.jsx)(sf,{...s,ref:t})})});sN.displayName=sy;var sk="MenuRadioItem",sC=p.forwardRef((e,t)=>{let{value:r,...n}=e,s=sj(sk,e.__scopeMenu),a=r===s.value;return(0,f.jsx)(sE,{scope:e.__scopeMenu,checked:a,children:(0,f.jsx)(sg,{role:"menuitemradio","aria-checked":a,...n,ref:t,"data-state":s$(a),onSelect:eU(n.onSelect,()=>s.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});sC.displayName=sk;var sS="MenuItemIndicator",[sE,sR]=n2(sS,{checked:!1}),sP=p.forwardRef((e,t)=>{let{__scopeMenu:r,forceMount:n,...s}=e,a=sR(sS,r);return(0,f.jsx)(rK,{present:n||sF(a.checked)||!0===a.checked,children:(0,f.jsx)(eZ.span,{...s,ref:t,"data-state":s$(a.checked)})})});sP.displayName=sS;var sM=p.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e;return(0,f.jsx)(eZ.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});sM.displayName="MenuSeparator";var sT=p.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e,s=n3(r);return(0,f.jsx)(rW,{...s,...n,ref:t})});sT.displayName="MenuArrow";var[sL,sD]=n2("MenuSub"),sA="MenuSubTrigger",s_=p.forwardRef((e,t)=>{let r=n8(sA,e.__scopeMenu),n=n9(sA,e.__scopeMenu),s=sD(sA,e.__scopeMenu),a=si(sA,e.__scopeMenu),o=p.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:i}=a,c={__scopeMenu:e.__scopeMenu},d=p.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return p.useEffect(()=>d,[d]),p.useEffect(()=>{let e=l.current;return()=>{window.clearTimeout(e),i(null)}},[l,i]),(0,f.jsx)(st,{asChild:!0,...c,children:(0,f.jsx)(sv,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":s.contentId,"data-state":sI(r.open),...e,ref:E(t,s.onTriggerChange),onClick:t=>{e.onClick?.(t),e.disabled||t.defaultPrevented||(t.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:eU(e.onPointerMove,sB(t=>{a.onItemEnter(t),!t.defaultPrevented&&(e.disabled||r.open||o.current||(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{r.onOpenChange(!0),d()},100)))})),onPointerLeave:eU(e.onPointerLeave,sB(e=>{d();let t=r.content?.getBoundingClientRect();if(t){let n=r.content?.dataset.side,s="right"===n,o=t[s?"left":"right"],i=t[s?"right":"left"];a.onPointerGraceIntentChange({area:[{x:e.clientX+(s?-5:5),y:e.clientY},{x:o,y:t.top},{x:i,y:t.top},{x:i,y:t.bottom},{x:o,y:t.bottom}],side:n}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:eU(e.onKeyDown,t=>{let s=""!==a.searchRef.current;e.disabled||s&&" "===t.key||nY[n.dir].includes(t.key)&&(r.onOpenChange(!0),r.content?.focus(),t.preventDefault())})})})});s_.displayName=sA;var sO="MenuSubContent",sz=p.forwardRef((e,t)=>{let r=ss(so,e.__scopeMenu),{forceMount:n=r.forceMount,...s}=e,a=n8(so,e.__scopeMenu),o=n9(so,e.__scopeMenu),l=sD(sO,e.__scopeMenu),i=p.useRef(null),c=R(t,i);return(0,f.jsx)(nJ.Provider,{scope:e.__scopeMenu,children:(0,f.jsx)(rK,{present:n||a.open,children:(0,f.jsx)(nJ.Slot,{scope:e.__scopeMenu,children:(0,f.jsx)(sm,{id:l.contentId,"aria-labelledby":l.triggerId,...s,ref:c,align:"start",side:"rtl"===o.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{o.isUsingKeyboardRef.current&&i.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:eU(e.onFocusOutside,e=>{e.target!==l.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:eU(e.onEscapeKeyDown,e=>{o.onClose(),e.preventDefault()}),onKeyDown:eU(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),r=nZ[o.dir].includes(e.key);t&&r&&(a.onOpenChange(!1),l.trigger?.focus(),e.preventDefault())})})})})})});function sI(e){return e?"open":"closed"}function sF(e){return"indeterminate"===e}function s$(e){return sF(e)?"indeterminate":e?"checked":"unchecked"}function sB(e){return t=>"mouse"===t.pointerType?e(t):void 0}sz.displayName=sO;var sW="DropdownMenu",[sH,sV]=eK(sW,[n4]),sq=n4(),[sU,sK]=sH(sW),sG=e=>{let{__scopeDropdownMenu:t,children:r,dir:n,open:s,defaultOpen:a,onOpenChange:o,modal:l=!0}=e,i=sq(t),c=p.useRef(null),[d=!1,u]=eX({prop:s,defaultProp:a,onChange:o});return(0,f.jsx)(sU,{scope:t,triggerId:tm(),triggerRef:c,contentId:tm(),open:d,onOpenChange:u,onOpenToggle:p.useCallback(()=>u(e=>!e),[u]),modal:l,children:(0,f.jsx)(se,{...i,open:d,onOpenChange:u,dir:n,modal:l,children:r})})};sG.displayName=sW;var sX="DropdownMenuTrigger",sY=p.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,disabled:n=!1,...s}=e,a=sK(sX,r),o=sq(r);return(0,f.jsx)(st,{asChild:!0,...o,children:(0,f.jsx)(eZ.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...s,ref:E(t,a.triggerRef),onPointerDown:eU(e.onPointerDown,e=>{!n&&0===e.button&&!1===e.ctrlKey&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:eU(e.onKeyDown,e=>{!n&&(["Enter"," "].includes(e.key)&&a.onOpenToggle(),"ArrowDown"===e.key&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())})})})});sY.displayName=sX;var sZ=e=>{let{__scopeDropdownMenu:t,...r}=e,n=sq(t);return(0,f.jsx)(sa,{...n,...r})};sZ.displayName="DropdownMenuPortal";var sQ="DropdownMenuContent",sJ=p.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,s=sK(sQ,r),a=sq(r),o=p.useRef(!1);return(0,f.jsx)(sc,{id:s.contentId,"aria-labelledby":s.triggerId,...a,...n,ref:t,onCloseAutoFocus:eU(e.onCloseAutoFocus,e=>{o.current||s.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:eU(e.onInteractOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey,n=2===t.button||r;(!s.modal||n)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});sJ.displayName=sQ,p.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,s=sq(r);return(0,f.jsx)(sf,{...s,...n,ref:t})}).displayName="DropdownMenuGroup",p.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,s=sq(r);return(0,f.jsx)(sp,{...s,...n,ref:t})}).displayName="DropdownMenuLabel";var s0=p.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,s=sq(r);return(0,f.jsx)(sg,{...s,...n,ref:t})});s0.displayName="DropdownMenuItem";var s1=p.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,s=sq(r);return(0,f.jsx)(sb,{...s,...n,ref:t})});s1.displayName="DropdownMenuCheckboxItem",p.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,s=sq(r);return(0,f.jsx)(sN,{...s,...n,ref:t})}).displayName="DropdownMenuRadioGroup",p.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,s=sq(r);return(0,f.jsx)(sC,{...s,...n,ref:t})}).displayName="DropdownMenuRadioItem";var s2=p.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,s=sq(r);return(0,f.jsx)(sP,{...s,...n,ref:t})});s2.displayName="DropdownMenuItemIndicator";var s4=p.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,s=sq(r);return(0,f.jsx)(sM,{...s,...n,ref:t})});s4.displayName="DropdownMenuSeparator",p.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,s=sq(r);return(0,f.jsx)(sT,{...s,...n,ref:t})}).displayName="DropdownMenuArrow",p.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,s=sq(r);return(0,f.jsx)(s_,{...s,...n,ref:t})}).displayName="DropdownMenuSubTrigger",p.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,s=sq(r);return(0,f.jsx)(sz,{...s,...n,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})}).displayName="DropdownMenuSubContent";let s3=b("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),s5=b("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),s6=b("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);function s8({...e}){return(0,f.jsx)(sG,{"data-slot":"dropdown-menu",...e})}function s7({...e}){return(0,f.jsx)(sY,{"data-slot":"dropdown-menu-trigger",...e})}function s9({className:e,sideOffset:t=4,...r}){return(0,f.jsx)(sZ,{children:(0,f.jsx)(sJ,{"data-slot":"dropdown-menu-content",sideOffset:t,className:eW("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-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...r})})}function ae({className:e,inset:t,variant:r="default",...n}){return(0,f.jsx)(s0,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":r,className:eW("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",e),...n})}function at({className:e,children:t,checked:r,...n}){return(0,f.jsxs)(s1,{"data-slot":"dropdown-menu-checkbox-item",className:eW("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",e),checked:r,...n,children:[(0,f.jsx)("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:(0,f.jsx)(s2,{children:(0,f.jsx)(s3,{className:"size-4"})})}),t]})}function ar({className:e,...t}){return(0,f.jsx)(s4,{"data-slot":"dropdown-menu-separator",className:eW("bg-border -mx-1 my-1 h-px",e),...t})}var an=p.forwardRef((e,t)=>(0,f.jsx)(eZ.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));an.displayName="VisuallyHidden";var[as,aa]=eK("Tooltip",[rM]),ao=rM(),al="TooltipProvider",ai="tooltip.open",[ac,ad]=as(al),au=e=>{let{__scopeTooltip:t,delayDuration:r=700,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:a}=e,[o,l]=p.useState(!0),i=p.useRef(!1),c=p.useRef(0);return p.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,f.jsx)(ac,{scope:t,isOpenDelayed:o,delayDuration:r,onOpen:p.useCallback(()=>{window.clearTimeout(c.current),l(!1)},[]),onClose:p.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>l(!0),n)},[n]),isPointerInTransitRef:i,onPointerInTransitChange:p.useCallback(e=>{i.current=e},[]),disableHoverableContent:s,children:a})};au.displayName=al;var am="Tooltip",[af,ap]=as(am),ah=e=>{let{__scopeTooltip:t,children:r,open:n,defaultOpen:s=!1,onOpenChange:a,disableHoverableContent:o,delayDuration:l}=e,i=ad(am,e.__scopeTooltip),c=ao(t),[d,u]=p.useState(null),m=tm(),h=p.useRef(0),x=o??i.disableHoverableContent,g=l??i.delayDuration,v=p.useRef(!1),[b=!1,y]=eX({prop:n,defaultProp:s,onChange:e=>{e?(i.onOpen(),document.dispatchEvent(new CustomEvent(ai))):i.onClose(),a?.(e)}}),w=p.useMemo(()=>b?v.current?"delayed-open":"instant-open":"closed",[b]),j=p.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,y(!0)},[y]),N=p.useCallback(()=>{window.clearTimeout(h.current),h.current=0,y(!1)},[y]),k=p.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,y(!0),h.current=0},g)},[g,y]);return p.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),(0,f.jsx)(rD,{...c,children:(0,f.jsx)(af,{scope:t,contentId:m,open:b,stateAttribute:w,trigger:d,onTriggerChange:u,onTriggerEnter:p.useCallback(()=>{i.isOpenDelayed?k():j()},[i.isOpenDelayed,k,j]),onTriggerLeave:p.useCallback(()=>{x?N():(window.clearTimeout(h.current),h.current=0)},[N,x]),onOpen:j,onClose:N,disableHoverableContent:x,children:r})})};ah.displayName=am;var ax="TooltipTrigger",ag=p.forwardRef((e,t)=>{let{__scopeTooltip:r,...n}=e,s=ap(ax,r),a=ad(ax,r),o=ao(r),l=R(t,p.useRef(null),s.onTriggerChange),i=p.useRef(!1),c=p.useRef(!1),d=p.useCallback(()=>i.current=!1,[]);return p.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),(0,f.jsx)(r_,{asChild:!0,...o,children:(0,f.jsx)(eZ.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:l,onPointerMove:eU(e.onPointerMove,e=>{"touch"!==e.pointerType&&(c.current||a.isPointerInTransitRef.current||(s.onTriggerEnter(),c.current=!0))}),onPointerLeave:eU(e.onPointerLeave,()=>{s.onTriggerLeave(),c.current=!1}),onPointerDown:eU(e.onPointerDown,()=>{i.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:eU(e.onFocus,()=>{i.current||s.onOpen()}),onBlur:eU(e.onBlur,s.onClose),onClick:eU(e.onClick,s.onClose)})})});ag.displayName=ax;var av="TooltipPortal",[ab,ay]=as(av,{forceMount:void 0}),aw=e=>{let{__scopeTooltip:t,forceMount:r,children:n,container:s}=e,a=ap(av,t);return(0,f.jsx)(ab,{scope:t,forceMount:r,children:(0,f.jsx)(rK,{present:r||a.open,children:(0,f.jsx)(rU,{asChild:!0,container:s,children:n})})})};aw.displayName=av;var aj="TooltipContent",aN=p.forwardRef((e,t)=>{let r=ay(aj,e.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...a}=e,o=ap(aj,e.__scopeTooltip);return(0,f.jsx)(rK,{present:n||o.open,children:o.disableHoverableContent?(0,f.jsx)(aE,{side:s,...a,ref:t}):(0,f.jsx)(ak,{side:s,...a,ref:t})})}),ak=p.forwardRef((e,t)=>{let r=ap(aj,e.__scopeTooltip),n=ad(aj,e.__scopeTooltip),s=p.useRef(null),a=R(t,s),[o,l]=p.useState(null),{trigger:i,onClose:c}=r,d=s.current,{onPointerInTransitChange:u}=n,m=p.useCallback(()=>{l(null),u(!1)},[u]),h=p.useCallback((e,t)=>{let r,n=e.currentTarget,s={x:e.clientX,y:e.clientY},a=function(e,t){let r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,n,s,a)){case a:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw Error("unreachable")}}(s,n.getBoundingClientRect());l(((r=[...function(e,t,r=5){let n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r})}return n}(s,a),...function(e){let{top:t,right:r,bottom:n,left:s}=e;return[{x:s,y:t},{x:r,y:t},{x:r,y:n},{x:s,y:n}]}(t.getBoundingClientRect())].slice()).sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:1*!!(e.y>t.y)),function(e){if(e.length<=1)return e.slice();let t=[];for(let r=0;r<e.length;r++){let n=e[r];for(;t.length>=2;){let e=t[t.length-1],r=t[t.length-2];if((e.x-r.x)*(n.y-r.y)>=(e.y-r.y)*(n.x-r.x))t.pop();else break}t.push(n)}t.pop();let r=[];for(let t=e.length-1;t>=0;t--){let n=e[t];for(;r.length>=2;){let e=r[r.length-1],t=r[r.length-2];if((e.x-t.x)*(n.y-t.y)>=(e.y-t.y)*(n.x-t.x))r.pop();else break}r.push(n)}return(r.pop(),1===t.length&&1===r.length&&t[0].x===r[0].x&&t[0].y===r[0].y)?t:t.concat(r)}(r))),u(!0)},[u]);return p.useEffect(()=>()=>m(),[m]),p.useEffect(()=>{if(i&&d){let e=e=>h(e,d),t=e=>h(e,i);return i.addEventListener("pointerleave",e),d.addEventListener("pointerleave",t),()=>{i.removeEventListener("pointerleave",e),d.removeEventListener("pointerleave",t)}}},[i,d,h,m]),p.useEffect(()=>{if(o){let e=e=>{let t=e.target,r={x:e.clientX,y:e.clientY},n=i?.contains(t)||d?.contains(t),s=!function(e,t){let{x:r,y:n}=e,s=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e].x,l=t[e].y,i=t[a].x,c=t[a].y;l>n!=c>n&&r<(i-o)*(n-l)/(c-l)+o&&(s=!s)}return s}(r,o);n?m():s&&(m(),c())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[i,d,o,c,m]),(0,f.jsx)(aE,{...e,ref:a})}),[aC,aS]=as(am,{isInside:!1}),aE=p.forwardRef((e,t)=>{let{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:a,onPointerDownOutside:o,...l}=e,i=ap(aj,r),c=ao(r),{onClose:d}=i;return p.useEffect(()=>(document.addEventListener(ai,d),()=>document.removeEventListener(ai,d)),[d]),p.useEffect(()=>{if(i.trigger){let e=e=>{let t=e.target;t?.contains(i.trigger)&&d()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[i.trigger,d]),(0,f.jsx)(e3,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:d,children:(0,f.jsxs)(rF,{"data-state":i.stateAttribute,...c,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,f.jsx)(T,{children:n}),(0,f.jsx)(aC,{scope:r,isInside:!0,children:(0,f.jsx)(an,{id:i.contentId,role:"tooltip",children:s||n})})]})})});aN.displayName=aj;var aR="TooltipArrow",aP=p.forwardRef((e,t)=>{let{__scopeTooltip:r,...n}=e,s=ao(r);return aS(aR,r).isInside?null:(0,f.jsx)(rW,{...s,...n,ref:t})});function aM({delayDuration:e=0,...t}){return(0,f.jsx)(au,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function aT({...e}){return(0,f.jsx)(aM,{children:(0,f.jsx)(ah,{"data-slot":"tooltip",...e})})}function aL({...e}){return(0,f.jsx)(ag,{"data-slot":"tooltip-trigger",...e})}function aD({className:e,sideOffset:t=0,children:r,...n}){return(0,f.jsx)(aw,{children:(0,f.jsxs)(aN,{"data-slot":"tooltip-content",sideOffset:t,className:eW("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...n,children:[r,(0,f.jsx)(aP,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}function aA({activeProject:e,projectName:t,projectPath:r,projects:n,onSelectProject:s,onAddProject:a,onRemoveProject:o,isLoadingProjects:l}){let[i,c]=(0,p.useState)(!1),[d,u]=(0,p.useState)(!1),[m,x]=(0,p.useState)(""),g=(0,p.useRef)(null);(0,p.useEffect)(()=>{d&&g.current&&g.current.focus()},[d]);let v=async()=>{c(!0);try{await fetch("/api/scan",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e})}),window.location.reload()}catch(e){console.error("Scan failed:",e)}finally{c(!1)}},b=async()=>{m.trim()&&(await a(m.trim()),s(m.trim()),x(""),u(!1))};return(0,f.jsxs)("header",{className:"flex h-14 items-center justify-between border-b border-border bg-card px-4",children:[(0,f.jsxs)("div",{className:"flex items-center gap-4",children:[(0,f.jsxs)("div",{className:"flex items-center gap-2",children:[(0,f.jsx)(h.default,{src:"/navgator-logo.png",alt:"NavGator",width:36,height:36,className:"rounded-lg"}),(0,f.jsx)("span",{className:"font-semibold text-foreground",children:"NavGator"})]}),(0,f.jsxs)("div",{className:"hidden items-center gap-1 text-sm text-muted-foreground md:flex",children:[(0,f.jsx)("span",{children:"/"}),(0,f.jsxs)(s8,{children:[(0,f.jsx)(s7,{asChild:!0,children:(0,f.jsxs)(eV,{variant:"ghost",size:"sm",className:"h-auto gap-1 px-2 py-1 text-foreground",children:[l?(0,f.jsx)("span",{className:"animate-pulse",children:"Loading..."}):t||"No Project",(0,f.jsx)(j,{className:"h-3 w-3 text-muted-foreground"})]})}),(0,f.jsxs)(s9,{align:"start",className:"w-72",children:[0===n.length&&!d&&(0,f.jsx)("div",{className:"px-3 py-2 text-sm text-muted-foreground",children:"No projects registered"}),n.map(t=>(0,f.jsxs)(ae,{className:"flex items-center justify-between gap-2 py-2",onSelect:()=>s(t.path),children:[(0,f.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,f.jsx)("span",{className:`text-sm font-medium truncate ${t.path===e?"text-blue-700 dark:text-blue-400":""}`,children:t.name}),(0,f.jsx)("span",{className:"text-xs text-muted-foreground truncate",children:t.hasArchitecture?`${t.componentCount} components \xb7 ${t.lastScanFormatted||"never scanned"}`:"Not scanned yet"})]}),(0,f.jsx)(eV,{variant:"ghost",size:"sm",className:"h-5 w-5 shrink-0 p-0 text-muted-foreground hover:text-red-600",onClick:e=>{e.stopPropagation(),o(t.path)},children:(0,f.jsx)(C,{className:"h-3 w-3"})})]},t.path)),n.length>0&&(0,f.jsx)(ar,{}),d?(0,f.jsxs)("div",{className:"flex items-center gap-1 px-2 py-1.5",onClick:e=>e.stopPropagation(),children:[(0,f.jsx)(eq,{ref:g,value:m,onChange:e=>x(e.target.value),onKeyDown:e=>{"Enter"===e.key&&b(),"Escape"===e.key&&(u(!1),x(""))},placeholder:"/path/to/project",className:"h-7 text-xs"}),(0,f.jsx)(eV,{variant:"ghost",size:"sm",className:"h-7 shrink-0 px-2 text-xs",onClick:b,children:"Add"})]}):(0,f.jsxs)(ae,{onSelect:()=>u(!0),children:[(0,f.jsx)(k,{className:"mr-2 h-4 w-4"}),"Add project"]})]})]}),r&&(0,f.jsx)(aM,{children:(0,f.jsxs)(aT,{children:[(0,f.jsx)(aL,{asChild:!0,children:(0,f.jsx)(N,{className:"h-3.5 w-3.5 text-muted-foreground"})}),(0,f.jsx)(aD,{side:"bottom",className:"max-w-md",children:(0,f.jsx)("p",{className:"font-mono text-xs",children:r})})]})})]})]}),(0,f.jsxs)("div",{className:"flex items-center gap-3",children:[(0,f.jsxs)("div",{className:"relative hidden w-64 md:block",children:[(0,f.jsx)(y,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),(0,f.jsx)(eq,{placeholder:"Search components...",className:"h-8 bg-secondary pl-9 text-sm"})]}),(0,f.jsxs)(eV,{variant:"outline",size:"sm",onClick:v,disabled:i,className:"gap-2 bg-transparent",children:[(0,f.jsx)(w,{className:`h-4 w-4 ${i?"animate-spin":""}`}),(0,f.jsx)("span",{className:"hidden sm:inline",children:i?"Scanning...":"Scan"})]})]})]})}aP.displayName=aR;let a_=b("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]),aO=b("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]),az=b("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]),aI=b("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]),aF=b("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]),a$=b("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),aB=b("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]),aW=[{id:"overview",label:"Overview",icon:a_},{id:"components",label:"Components",icon:aO},{id:"connections",label:"Connections",icon:az},{id:"impact",label:"Impact",icon:aI},{id:"diagram",label:"Diagram",icon:aF},{id:"llm",label:"LLM Tracking",icon:aB}];function aH({activeView:e,setActiveView:t}){return(0,f.jsx)("aside",{className:"hidden w-56 shrink-0 border-r border-border bg-sidebar md:block",children:(0,f.jsxs)("nav",{className:"flex h-full flex-col p-3",children:[(0,f.jsx)("div",{className:"space-y-1",children:aW.map(r=>(0,f.jsxs)("button",{onClick:()=>t(r.id),className:eW("flex w-full items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition-colors",e===r.id?"bg-sidebar-accent text-sidebar-primary":"text-sidebar-foreground/70 hover:bg-sidebar-accent/50 hover:text-sidebar-foreground"),children:[(0,f.jsx)(r.icon,{className:"h-4 w-4"}),r.label,e===r.id&&(0,f.jsx)("span",{className:"ml-auto h-1.5 w-1.5 rounded-full bg-sidebar-primary"})]},r.id))}),(0,f.jsx)("div",{className:"mt-auto space-y-1 border-t border-sidebar-border pt-3",children:(0,f.jsxs)("button",{onClick:()=>t("settings"),className:eW("flex w-full items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition-colors","settings"===e?"bg-sidebar-accent text-sidebar-primary":"text-sidebar-foreground/70 hover:bg-sidebar-accent/50 hover:text-sidebar-foreground"),children:[(0,f.jsx)(a$,{className:"h-4 w-4"}),"Settings","settings"===e&&(0,f.jsx)("span",{className:"ml-auto h-1.5 w-1.5 rounded-full bg-sidebar-primary"})]})})]})})}let aV=b("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),aq=b("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]),aU=b("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]),aK=b("Cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]),aG=b("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]),aX=b("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),aY=b("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]),aZ=b("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),aQ=b("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);function aJ({className:e,...t}){return(0,f.jsx)("div",{"data-slot":"card",className:eW("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...t})}function a0({className:e,...t}){return(0,f.jsx)("div",{"data-slot":"card-header",className:eW("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function a1({className:e,...t}){return(0,f.jsx)("div",{"data-slot":"card-title",className:eW("leading-none font-semibold",e),...t})}function a2({className:e,...t}){return(0,f.jsx)("div",{"data-slot":"card-description",className:eW("text-muted-foreground text-sm",e),...t})}function a4({className:e,...t}){return(0,f.jsx)("div",{"data-slot":"card-content",className:eW("px-6",e),...t})}let a3=_("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function a5({className:e,variant:t,asChild:r=!1,...n}){let s=r?P:"span";return(0,f.jsx)(s,{"data-slot":"badge",className:eW(a3({variant:t}),e),...n})}var a6=e.i(9390);function a8(e={}){let{demoMode:t=!1,autoFetch:r=!0,projectPath:n}=e,{activeProjectPath:s}=(0,a6.useActiveProject)(),a=n||s||void 0,[o,l]=(0,p.useState)([]),[i,c]=(0,p.useState)([]),[d,u]=(0,p.useState)(null),[m,f]=(0,p.useState)(!1),[h,x]=(0,p.useState)(null),[g,v]=(0,p.useState)(null),b=(0,p.useCallback)(async(e=!1)=>{f(!0),x(null);try{let r=new URLSearchParams;t&&r.set("demo","true"),e&&r.set("refresh","true"),a&&r.set("path",a);let n=await fetch(`/api/prompts?${r.toString()}`),s=await n.json();s.success&&s.data?(l(s.data.calls),c(s.data.prompts),u(s.data.summary),v(s.source)):x(s.error||"Failed to fetch data")}catch(e){x(e instanceof Error?e.message:"Network error")}finally{f(!1)}},[t,a]),y=(0,p.useCallback)(async()=>{await b(!0)},[b]),w=(0,p.useCallback)(async e=>{f(!0),x(null);try{let t=await fetch("/api/prompts",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e||a})}),r=await t.json();r.success&&r.data?(l(r.data.calls),c(r.data.prompts),u(r.data.summary),v(r.source)):x(r.error||"Scan failed")}catch(e){x(e instanceof Error?e.message:"Network error")}finally{f(!1)}},[a]);return(0,p.useEffect)(()=>{r&&b()},[r,b]),{calls:o,prompts:i,summary:d,isLoading:m,error:h,source:g,refresh:y,scan:w}}function a7(e={}){let{demoMode:t=!1,autoFetch:r=!0,projectPath:n}=e,{activeProjectPath:s}=(0,a6.useActiveProject)(),a=n||s||void 0,[o,l]=(0,p.useState)([]),[i,c]=(0,p.useState)(null),[d,u]=(0,p.useState)(!1),[m,f]=(0,p.useState)(null),[h,x]=(0,p.useState)(null),g=(0,p.useCallback)(async(e=!1)=>{u(!0),f(null);try{let r=new URLSearchParams;t&&r.set("demo","true"),e&&r.set("refresh","true"),a&&r.set("path",a);let n=await fetch(`/api/components?${r.toString()}`),s=await n.json();s.success&&s.data?(l(s.data.components),c(s.data.summary),x(s.source)):f(s.error||"Failed to fetch data")}catch(e){f(e instanceof Error?e.message:"Network error")}finally{u(!1)}},[t,a]),v=(0,p.useCallback)(async()=>{await g(!0)},[g]);return(0,p.useEffect)(()=>{r&&g()},[r,g]),{components:o,summary:i,isLoading:d,error:m,source:h,refresh:v}}function a9(e={}){let{autoFetch:t=!0,projectPath:r}=e,{activeProjectPath:n}=(0,a6.useActiveProject)(),s=r||n||void 0,[a,o]=(0,p.useState)(null),[l,i]=(0,p.useState)(!1),[c,d]=(0,p.useState)(null),[u,m]=(0,p.useState)(null),f=(0,p.useCallback)(async(e=!1)=>{i(!0),d(null);try{let t=new URLSearchParams;e&&t.set("refresh","true"),s&&t.set("path",s);let r=await fetch(`/api/status?${t.toString()}`),n=await r.json();n.success&&n.data?(o(n.data),m(n.source),n.error&&d(n.error)):d(n.error||"Failed to fetch status")}catch(e){d(e instanceof Error?e.message:"Network error")}finally{i(!1)}},[s]),h=(0,p.useCallback)(async()=>{await f(!0)},[f]);return(0,p.useEffect)(()=>{t&&f()},[t,f]),{status:a,isLoading:l,error:c,source:u,refresh:h}}let oe="navgator-active-project",ot={npm:aq,pip:aq,cargo:aq,service:aK,database:aU,queue:aG,infra:aG,framework:aO,prompt:aB},or={npm:"text-chart-1",pip:"text-chart-1",cargo:"text-chart-1",service:"text-chart-2",database:"text-chart-3",queue:"text-chart-4",infra:"text-chart-5",framework:"text-primary",prompt:"text-info"},on=[{label:"Run Full Scan",description:"Analyze entire codebase",icon:aY,view:"settings"},{label:"View Diagram",description:"Architecture visualization",icon:az,view:"diagram"},{label:"Impact Analysis",description:"Check change effects",icon:aX,view:"impact"}];function os({onSelectComponent:e,onNavigate:t,onNavigateToType:r}){let{status:n,isLoading:s,error:a}=a9({autoFetch:!0}),{components:o,summary:l,isLoading:i}=a7({autoFetch:!0}),{calls:c,prompts:d,isLoading:u}=a8({autoFetch:!0}),m=(()=>{let e=0;for(let t of c)"unknown"===t.provider&&e++,"unknown"===t.model&&e++;for(let t of d)0===t.usedBy.length&&e++;return e})(),p=[{label:"Components",value:n?.stats.total_components?.toString()||"0",icon:aO,trend:l?.outdatedCount?`${l.outdatedCount} outdated`:void 0,view:"components"},{label:"Connections",value:n?.stats.total_connections?.toString()||"0",icon:az,view:"connections"},{label:"LLM Calls",value:c.length.toString(),icon:aB,trend:m>0?`${m} issues`:void 0,view:"llm"},{label:"Health",value:n?.stats.vulnerable_count===0?"Good":"Issues",icon:aV,status:n?.stats.vulnerable_count===0?"success":"warning",view:"settings"}],h=Object.entries(n?.stats.components_by_type||{}).map(([e,t])=>({type:e,count:t,icon:ot[e]||aq,color:or[e]||"text-muted-foreground"})).sort((e,t)=>t.count-e.count).slice(0,6),x=o.map(e=>({name:e.name,type:e.type,layer:e.layer,connections:e.connections})).sort((e,t)=>t.connections-e.connections).slice(0,5);if((s||i||u)&&!n)return(0,f.jsx)("div",{className:"flex h-64 items-center justify-center",children:(0,f.jsx)(aZ,{className:"h-8 w-8 animate-spin text-muted-foreground"})});let g=n&&n.stats.total_components>0;return(0,f.jsxs)("div",{className:"space-y-6",children:[(0,f.jsxs)("div",{children:[(0,f.jsx)("h1",{className:"text-2xl font-semibold text-foreground",children:"Architecture Status"}),(0,f.jsx)("p",{className:"text-sm text-muted-foreground",children:n?.project_name?`Overview of ${n.project_name} architecture and connections`:"Overview of your project architecture and connections"})]}),!g&&(0,f.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-info/30 bg-info/10 p-4",children:[(0,f.jsx)(aQ,{className:"h-5 w-5 text-info"}),(0,f.jsxs)("div",{children:[(0,f.jsx)("p",{className:"text-sm font-medium text-info",children:"No scan data found"}),(0,f.jsxs)("p",{className:"text-xs text-info/80",children:["Run ",(0,f.jsx)("code",{className:"rounded bg-info/20 px-1.5 py-0.5",children:"navgator setup"})," to scan your project."]})]})]}),(0,f.jsx)("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:p.map(e=>(0,f.jsx)("button",{onClick:()=>e.view&&t(e.view),className:"group text-left",children:(0,f.jsx)(aJ,{className:"bg-card transition-all duration-200 group-hover:border-primary/50 group-hover:bg-secondary/50",children:(0,f.jsxs)(a4,{className:"p-4",children:[(0,f.jsxs)("div",{className:"flex items-center justify-between",children:[(0,f.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-lg bg-secondary transition-colors group-hover:bg-primary/10",children:(0,f.jsx)(e.icon,{className:"h-5 w-5 text-primary"})}),(0,f.jsxs)("div",{className:"flex items-center gap-2",children:[e.trend&&(0,f.jsx)(a5,{variant:"secondary",className:"bg-primary/10 text-primary",children:e.trend}),"success"===e.status&&(0,f.jsx)(a5,{variant:"secondary",className:"bg-success/10 text-success",children:"Healthy"}),"warning"===e.status&&(0,f.jsx)(a5,{variant:"secondary",className:"bg-warning/10 text-warning",children:"Issues"}),(0,f.jsx)(s5,{className:"h-4 w-4 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100"})]})]}),(0,f.jsxs)("div",{className:"mt-3",children:[(0,f.jsx)("p",{className:"text-2xl font-semibold text-card-foreground",children:e.value}),(0,f.jsx)("p",{className:"text-sm text-muted-foreground",children:e.label})]})]})})},e.label))}),(0,f.jsx)("div",{className:"grid gap-3 sm:grid-cols-3",children:on.map(e=>(0,f.jsxs)("button",{onClick:()=>t(e.view),className:"group flex items-center gap-3 rounded-lg border border-border bg-card p-4 text-left transition-all hover:border-primary/50 hover:bg-secondary/50",children:[(0,f.jsx)("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-secondary transition-colors group-hover:bg-primary/10",children:(0,f.jsx)(e.icon,{className:"h-5 w-5 text-primary"})}),(0,f.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,f.jsx)("p",{className:"text-sm font-medium text-card-foreground",children:e.label}),(0,f.jsx)("p",{className:"truncate text-xs text-muted-foreground",children:e.description})]}),(0,f.jsx)(s5,{className:"h-4 w-4 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100"})]},e.label))}),(0,f.jsxs)("div",{className:"grid gap-6 lg:grid-cols-2",children:[(0,f.jsxs)(aJ,{className:"bg-card",children:[(0,f.jsxs)(a0,{className:"flex flex-row items-center justify-between pb-3",children:[(0,f.jsx)(a1,{className:"text-base font-medium",children:"Components by Type"}),(0,f.jsx)("button",{onClick:()=>t("components"),className:"text-xs text-muted-foreground transition-colors hover:text-primary",children:"View all"})]}),(0,f.jsx)(a4,{children:0===h.length?(0,f.jsx)("p",{className:"py-4 text-center text-sm text-muted-foreground",children:"No components scanned yet"}):(0,f.jsx)("div",{className:"space-y-2",children:h.map(e=>(0,f.jsxs)("button",{onClick:()=>r?r(e.type):t("components"),className:"group flex w-full items-center gap-3 rounded-md p-2 transition-colors hover:bg-secondary",children:[(0,f.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded bg-secondary transition-colors group-hover:bg-primary/10",children:(0,f.jsx)(e.icon,{className:`h-4 w-4 ${e.color}`})}),(0,f.jsxs)("div",{className:"flex-1",children:[(0,f.jsxs)("div",{className:"flex items-center justify-between",children:[(0,f.jsx)("span",{className:"text-sm font-medium text-card-foreground capitalize",children:e.type}),(0,f.jsxs)("div",{className:"flex items-center gap-2",children:[(0,f.jsx)("span",{className:"text-sm text-muted-foreground",children:e.count}),(0,f.jsx)(s5,{className:"h-3 w-3 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100"})]})]}),(0,f.jsx)("div",{className:"mt-1 h-1.5 overflow-hidden rounded-full bg-secondary",children:(0,f.jsx)("div",{className:"h-full rounded-full bg-primary transition-all",style:{width:`${Math.min(100,e.count/Math.max(...h.map(e=>e.count),1)*100)}%`}})})]})]},e.type))})})]}),(0,f.jsxs)(aJ,{className:"bg-card",children:[(0,f.jsx)(a0,{className:"pb-3",children:(0,f.jsx)(a1,{className:"text-base font-medium",children:"Top Connected Components"})}),(0,f.jsx)(a4,{children:0===x.length?(0,f.jsx)("p",{className:"py-4 text-center text-sm text-muted-foreground",children:"No components scanned yet"}):(0,f.jsx)("div",{className:"space-y-2",children:x.map(t=>(0,f.jsxs)("button",{onClick:()=>e(t.name),className:"flex w-full items-center justify-between rounded-md px-3 py-2 text-left transition-colors hover:bg-secondary",children:[(0,f.jsxs)("div",{className:"flex items-center gap-3",children:[(0,f.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded bg-primary/10",children:(0,f.jsx)("span",{className:"text-xs font-medium text-primary",children:t.name.slice(0,2).toUpperCase()})}),(0,f.jsxs)("div",{children:[(0,f.jsx)("p",{className:"text-sm font-medium text-card-foreground",children:t.name}),(0,f.jsxs)("p",{className:"text-xs text-muted-foreground",children:[t.type," · ",t.layer]})]})]}),(0,f.jsxs)("div",{className:"flex items-center gap-2",children:[(0,f.jsx)(az,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,f.jsx)("span",{className:"text-sm text-muted-foreground",children:t.connections})]})]},t.name))})})]})]})]})}let oa=b("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]),oo=b("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]),ol={npm:aq,service:aK,database:aU,infra:aG,queue:oa,framework:oa},oi={npm:"text-chart-1",service:"text-chart-2",database:"text-chart-3",infra:"text-chart-4",queue:"text-chart-5",framework:"text-primary"};function oc({onSelectComponent:e,initialTypeFilter:t}){let{components:r,isLoading:n,source:s,refresh:a}=a7({autoFetch:!0}),[o,l]=(0,p.useState)(""),[i,c]=(0,p.useState)(t?[t]:[]),[d,u]=(0,p.useState)([]),m=[...new Set(r.map(e=>e.type))],h=[...new Set(r.map(e=>e.layer))],x=r.filter(e=>{let t=e.name.toLowerCase().includes(o.toLowerCase()),r=0===i.length||i.includes(e.type),n=0===d.length||d.includes(e.layer);return t&&r&&n}).reduce((e,t)=>(e[t.type]||(e[t.type]=[]),e[t.type].push(t),e),{});return(0,f.jsxs)("div",{className:"space-y-6",children:[(0,f.jsxs)("div",{className:"flex items-center justify-between",children:[(0,f.jsxs)("div",{children:[(0,f.jsx)("h1",{className:"text-2xl font-semibold text-foreground",children:"Components"}),(0,f.jsxs)("p",{className:"text-sm text-muted-foreground",children:["All detected packages, services, and infrastructure","mock"===s&&(0,f.jsx)("span",{className:"ml-2 text-info",children:"(Demo data)"})]})]}),(0,f.jsxs)(eV,{variant:"outline",size:"sm",onClick:()=>a(),disabled:n,children:[n?(0,f.jsx)(aZ,{className:"h-4 w-4 animate-spin"}):(0,f.jsx)(w,{className:"h-4 w-4"}),(0,f.jsx)("span",{className:"ml-2",children:"Refresh"})]})]}),"mock"===s&&(0,f.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-info/30 bg-info/10 p-3",children:[(0,f.jsx)(aQ,{className:"h-4 w-4 text-info"}),(0,f.jsxs)("p",{className:"text-sm text-info",children:["Run ",(0,f.jsx)("code",{className:"rounded bg-info/20 px-1",children:"navgator scan"})," to scan your project for real data."]})]}),(0,f.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[(0,f.jsxs)("div",{className:"relative flex-1",children:[(0,f.jsx)(y,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),(0,f.jsx)(eq,{placeholder:"Filter components...",value:o,onChange:e=>l(e.target.value),className:"bg-card pl-9"})]}),(0,f.jsxs)("div",{className:"flex gap-2",children:[(0,f.jsxs)(s8,{children:[(0,f.jsx)(s7,{asChild:!0,children:(0,f.jsxs)(eV,{variant:"outline",size:"sm",className:"gap-2 bg-transparent",children:[(0,f.jsx)(oo,{className:"h-4 w-4"}),"Type",i.length>0&&(0,f.jsx)(a5,{variant:"secondary",className:"ml-1 h-5 px-1.5",children:i.length})]})}),(0,f.jsx)(s9,{align:"end",children:m.map(e=>(0,f.jsx)(at,{checked:i.includes(e),onCheckedChange:t=>{t?c([...i,e]):c(i.filter(t=>t!==e))},children:(0,f.jsx)("span",{className:"capitalize",children:e})},e))})]}),(0,f.jsxs)(s8,{children:[(0,f.jsx)(s7,{asChild:!0,children:(0,f.jsxs)(eV,{variant:"outline",size:"sm",className:"gap-2 bg-transparent",children:[(0,f.jsx)(oo,{className:"h-4 w-4"}),"Layer",d.length>0&&(0,f.jsx)(a5,{variant:"secondary",className:"ml-1 h-5 px-1.5",children:d.length})]})}),(0,f.jsx)(s9,{align:"end",children:h.map(e=>(0,f.jsx)(at,{checked:d.includes(e),onCheckedChange:t=>{t?u([...d,e]):u(d.filter(t=>t!==e))},children:(0,f.jsx)("span",{className:"capitalize",children:e})},e))})]})]})]}),(0,f.jsx)("div",{className:"grid gap-4 lg:grid-cols-2",children:Object.entries(x).map(([t,r])=>{let n=ol[t]||oa,s=oi[t]||"text-muted-foreground";return(0,f.jsxs)(aJ,{className:"bg-card",children:[(0,f.jsx)(a0,{className:"pb-2",children:(0,f.jsxs)(a1,{className:"flex items-center gap-2 text-base font-medium",children:[(0,f.jsx)(n,{className:eW("h-4 w-4",s)}),(0,f.jsx)("span",{className:"capitalize",children:t}),(0,f.jsx)(a5,{variant:"secondary",className:"ml-auto",children:r.length})]})}),(0,f.jsx)(a4,{children:(0,f.jsx)("div",{className:"divide-y divide-border",children:r.map(t=>(0,f.jsxs)("button",{onClick:()=>e(t.name),className:"flex w-full items-center justify-between py-2.5 text-left transition-colors hover:bg-secondary/50 -mx-2 px-2 rounded",children:[(0,f.jsxs)("div",{children:[(0,f.jsx)("p",{className:"text-sm font-medium text-card-foreground",children:t.name}),(0,f.jsxs)("p",{className:"text-xs text-muted-foreground",children:[t.version?`v${t.version}`:t.purpose," ·"," ",t.layer]})]}),(0,f.jsxs)("div",{className:"flex items-center gap-2",children:[(0,f.jsxs)("span",{className:"text-xs text-muted-foreground",children:[t.connections," conn"]}),(0,f.jsx)(s5,{className:"h-4 w-4 text-muted-foreground"})]})]},`${t.type}-${t.name}`))})})]},t)})})]})}let od=b("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),ou=b("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]),om=b("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]),of=b("FileCode",[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]]);var op="Tabs",[oh,ox]=eK(op,[r2]),og=r2(),[ov,ob]=oh(op),oy=p.forwardRef((e,t)=>{let{__scopeTabs:r,value:n,onValueChange:s,defaultValue:a,orientation:o="horizontal",dir:l,activationMode:i="automatic",...c}=e,d=e1(l),[u,m]=eX({prop:n,onChange:s,defaultProp:a});return(0,f.jsx)(ov,{scope:r,baseId:tm(),value:u,onValueChange:m,orientation:o,dir:d,activationMode:i,children:(0,f.jsx)(eZ.div,{dir:d,"data-orientation":o,...c,ref:t})})});oy.displayName=op;var ow="TabsList",oj=p.forwardRef((e,t)=>{let{__scopeTabs:r,loop:n=!0,...s}=e,a=ob(ow,r),o=og(r);return(0,f.jsx)(r5,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:n,children:(0,f.jsx)(eZ.div,{role:"tablist","aria-orientation":a.orientation,...s,ref:t})})});oj.displayName=ow;var oN="TabsTrigger",ok=p.forwardRef((e,t)=>{let{__scopeTabs:r,value:n,disabled:s=!1,...a}=e,o=ob(oN,r),l=og(r),i=oE(o.baseId,n),c=oR(o.baseId,n),d=n===o.value;return(0,f.jsx)(r7,{asChild:!0,...l,focusable:!s,active:d,children:(0,f.jsx)(eZ.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":c,"data-state":d?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:i,...a,ref:t,onMouseDown:eU(e.onMouseDown,e=>{s||0!==e.button||!1!==e.ctrlKey?e.preventDefault():o.onValueChange(n)}),onKeyDown:eU(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&o.onValueChange(n)}),onFocus:eU(e.onFocus,()=>{let e="manual"!==o.activationMode;d||s||!e||o.onValueChange(n)})})})});ok.displayName=oN;var oC="TabsContent",oS=p.forwardRef((e,t)=>{let{__scopeTabs:r,value:n,forceMount:s,children:a,...o}=e,l=ob(oC,r),i=oE(l.baseId,n),c=oR(l.baseId,n),d=n===l.value,u=p.useRef(d);return p.useEffect(()=>{let e=requestAnimationFrame(()=>u.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,f.jsx)(rK,{present:s||d,children:({present:r})=>(0,f.jsx)(eZ.div,{"data-state":d?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":i,hidden:!r,id:c,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:u.current?"0s":void 0},children:r&&a})})});function oE(e,t){return`${e}-trigger-${t}`}function oR(e,t){return`${e}-content-${t}`}function oP({className:e,...t}){return(0,f.jsx)(oy,{"data-slot":"tabs",className:eW("flex flex-col gap-2",e),...t})}function oM({className:e,...t}){return(0,f.jsx)(oj,{"data-slot":"tabs-list",className:eW("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function oT({className:e,...t}){return(0,f.jsx)(ok,{"data-slot":"tabs-trigger",className:eW("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function oL({className:e,...t}){return(0,f.jsx)(oS,{"data-slot":"tabs-content",className:eW("flex-1 outline-none",e),...t})}oS.displayName=oC;let oD={"service-call":"bg-chart-2/20 text-chart-2 border-chart-2/30","api-calls-db":"bg-chart-3/20 text-chart-3 border-chart-3/30","frontend-calls-api":"bg-chart-1/20 text-chart-1 border-chart-1/30","queue-triggers":"bg-chart-4/20 text-chart-4 border-chart-4/30",observes:"bg-info/20 text-info border-info/30","conforms-to":"bg-primary/20 text-primary border-primary/30",notifies:"bg-chart-5/20 text-chart-5 border-chart-5/30",stores:"bg-warning/20 text-warning border-warning/30","navigates-to":"bg-chart-1/20 text-chart-1 border-chart-1/30","requires-entitlement":"bg-destructive/20 text-destructive border-destructive/30","target-contains":"bg-chart-4/20 text-chart-4 border-chart-4/30",generates:"bg-chart-3/20 text-chart-3 border-chart-3/30",imports:"bg-muted text-muted-foreground border-muted","prompt-usage":"bg-warning/20 text-warning border-warning/30","deploys-to":"bg-info/20 text-info border-info/30","uses-package":"bg-chart-1/20 text-chart-1 border-chart-1/30",other:"bg-muted text-muted-foreground border-muted"},oA={"service-call":"Service Calls","api-calls-db":"DB Queries","frontend-calls-api":"API Calls","queue-triggers":"Queue Triggers",observes:"Observes","conforms-to":"Conforms To",notifies:"Notifies",stores:"Stores","navigates-to":"Navigates","requires-entitlement":"Entitlements","target-contains":"Target Contains",generates:"Generates",imports:"Imports","prompt-usage":"Prompt Usage","deploys-to":"Deploys To","uses-package":"Uses Package",other:"Other"};function o_({selectedComponent:e,onSelectComponent:t}){let{connections:r,isLoading:n,source:s,refresh:a}=function(e={}){let{demoMode:t=!1,autoFetch:r=!0,projectPath:n}=e,{activeProjectPath:s}=(0,a6.useActiveProject)(),a=n||s||void 0,[o,l]=(0,p.useState)([]),[i,c]=(0,p.useState)(null),[d,u]=(0,p.useState)(!1),[m,f]=(0,p.useState)(null),[h,x]=(0,p.useState)(null),g=(0,p.useCallback)(async(e=!1)=>{u(!0),f(null);try{let r=new URLSearchParams;t&&r.set("demo","true"),e&&r.set("refresh","true"),a&&r.set("path",a);let n=await fetch(`/api/connections?${r.toString()}`),s=await n.json();s.success&&s.data?(l(s.data.connections),c(s.data.summary),x(s.source)):f(s.error||"Failed to fetch data")}catch(e){f(e instanceof Error?e.message:"Network error")}finally{u(!1)}},[t,a]),v=(0,p.useCallback)(async()=>{await g(!0)},[g]);return(0,p.useEffect)(()=>{r&&g()},[r,g]),{connections:o,summary:i,isLoading:d,error:m,source:h,refresh:v}}({autoFetch:!0}),[o,l]=(0,p.useState)(""),[i,c]=(0,p.useState)("all"),d=r.filter(e=>{let t=e.from.toLowerCase().includes(o.toLowerCase())||e.to.toLowerCase().includes(o.toLowerCase())||e.symbol.toLowerCase().includes(o.toLowerCase());return"all"===i?t:t&&e.type===i}),u=r.reduce((e,t)=>(e[t.type]=(e[t.type]||0)+1,e),{}),m=Object.entries(u).sort((e,t)=>t[1]-e[1]).map(([e])=>e);return(0,f.jsxs)("div",{className:"space-y-6",children:[(0,f.jsxs)("div",{className:"flex items-center justify-between",children:[(0,f.jsxs)("div",{children:[(0,f.jsx)("h1",{className:"text-2xl font-semibold text-foreground",children:"Connections"}),(0,f.jsxs)("p",{className:"text-sm text-muted-foreground",children:["All detected relationships between components","mock"===s&&(0,f.jsx)("span",{className:"ml-2 text-info",children:"(Demo data)"})]})]}),(0,f.jsxs)(eV,{variant:"outline",size:"sm",onClick:()=>a(),disabled:n,children:[n?(0,f.jsx)(aZ,{className:"h-4 w-4 animate-spin"}):(0,f.jsx)(w,{className:"h-4 w-4"}),(0,f.jsx)("span",{className:"ml-2",children:"Refresh"})]})]}),"mock"===s&&(0,f.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-info/30 bg-info/10 p-3",children:[(0,f.jsx)(aQ,{className:"h-4 w-4 text-info"}),(0,f.jsxs)("p",{className:"text-sm text-info",children:["Run ",(0,f.jsx)("code",{className:"rounded bg-info/20 px-1",children:"navgator scan"})," to scan your project for real data."]})]}),(0,f.jsxs)("div",{className:"relative max-w-md",children:[(0,f.jsx)(y,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),(0,f.jsx)(eq,{placeholder:"Search connections...",value:o,onChange:e=>l(e.target.value),className:"bg-card pl-9"})]}),(0,f.jsxs)(oP,{value:i,onValueChange:c,children:[(0,f.jsxs)(oM,{className:"bg-secondary flex-wrap h-auto gap-1 p-1",children:[(0,f.jsxs)(oT,{value:"all",children:["All",(0,f.jsx)(a5,{variant:"secondary",className:"ml-2 h-5 px-1.5 bg-muted",children:d.length})]}),m.map(e=>(0,f.jsxs)(oT,{value:e,children:[oA[e]||e.replace(/-/g," "),(0,f.jsx)(a5,{variant:"secondary",className:"ml-2 h-5 px-1.5 bg-muted",children:u[e]})]},e))]}),(0,f.jsx)(oL,{value:i,className:"mt-4",children:(0,f.jsxs)("div",{className:"space-y-3",children:[d.map((e,r)=>(0,f.jsx)(aJ,{className:"bg-card transition-colors hover:bg-card/80",children:(0,f.jsxs)(a4,{className:"p-4",children:[(0,f.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,f.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,f.jsxs)("button",{onClick:()=>{t(e.from.split("/").pop()?.replace(/\.(ts|tsx|js|jsx)$/,"")||e.from)},className:"flex items-center gap-1.5 rounded bg-secondary px-2 py-1 font-mono text-xs text-foreground hover:bg-secondary/80",children:[(0,f.jsx)(of,{className:"h-3.5 w-3.5 text-muted-foreground"}),e.from]}),(0,f.jsx)(od,{className:"h-4 w-4 text-muted-foreground"}),(0,f.jsx)("button",{onClick:()=>t(e.to),className:"flex items-center gap-1.5 rounded bg-primary/10 px-2 py-1 font-mono text-xs text-primary hover:bg-primary/20",children:e.to})]}),(0,f.jsx)(a5,{variant:"outline",className:eW("text-xs",oD[e.type]),children:e.type.replace(/-/g," ")})]}),(0,f.jsxs)("div",{className:"mt-3 rounded-md bg-secondary/50 p-3",children:[(0,f.jsxs)("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[(0,f.jsx)(om,{className:"h-3.5 w-3.5"}),(0,f.jsx)("span",{className:"font-medium text-foreground",children:e.symbol}),(0,f.jsxs)("span",{children:["at line ",e.line]})]}),(0,f.jsx)("pre",{className:"mt-2 font-mono text-xs text-muted-foreground overflow-x-auto",children:e.code})]})]})},`${e.id}-${r}`)),0===d.length&&(0,f.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,f.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-secondary",children:(0,f.jsx)(ou,{className:"h-6 w-6 text-muted-foreground"})}),(0,f.jsx)("p",{className:"mt-4 text-sm text-muted-foreground",children:"No connections found"})]})]})})]})]})}let oO=b("ArrowDownToLine",[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]]),oz=b("ArrowUpFromLine",[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]]);function oI({componentName:e,onSelectComponent:t}){let[r,n]=(0,p.useState)(""),[s,a]=(0,p.useState)([]),[o,l]=(0,p.useState)([]),[i,c]=(0,p.useState)(!0),[d,u]=(0,p.useState)(null);(0,p.useEffect)(()=>{!async function(){c(!0),u(null);try{let[e,t]=await Promise.all([fetch("/api/components?refresh=true"),fetch("/api/connections?refresh=true")]),r=await e.json(),n=await t.json();r.success&&r.data?.components&&a(r.data.components),n.success&&n.data?.connections&&l(n.data.connections),r.error&&u(r.error)}catch(e){u(e instanceof Error?e.message:"Failed to load data")}finally{c(!1)}}()},[]);let m=s.filter(e=>e.name.toLowerCase().includes(r.toLowerCase()));if(i)return(0,f.jsxs)("div",{className:"flex items-center justify-center py-12",children:[(0,f.jsx)(aZ,{className:"h-8 w-8 animate-spin text-muted-foreground"}),(0,f.jsx)("span",{className:"ml-3 text-muted-foreground",children:"Loading components..."})]});if(d&&0===s.length)return(0,f.jsxs)("div",{className:"space-y-6",children:[(0,f.jsxs)("div",{children:[(0,f.jsx)("h1",{className:"text-2xl font-semibold text-foreground",children:"Impact Analysis"}),(0,f.jsx)("p",{className:"text-sm text-muted-foreground",children:"Select a component to see what would be affected by changes"})]}),(0,f.jsx)(aJ,{className:"bg-card border-warning/50",children:(0,f.jsx)(a4,{className:"p-6",children:(0,f.jsxs)("div",{className:"flex items-start gap-3",children:[(0,f.jsx)(aX,{className:"h-5 w-5 text-warning mt-0.5"}),(0,f.jsxs)("div",{children:[(0,f.jsx)("p",{className:"font-medium text-card-foreground",children:"No scan data found"}),(0,f.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:d}),(0,f.jsxs)("p",{className:"text-sm text-muted-foreground mt-2",children:["Run ",(0,f.jsx)("code",{className:"bg-secondary px-1.5 py-0.5 rounded text-xs",children:"navgator scan"})," in your project to generate architecture data."]})]})]})})})]});let h=e?(e=>{let t=s.find(t=>t.name===e);if(!t)return null;let r=o.filter(r=>r.toComponent===e||r.to?.includes(t.id)||r.to===e),n=o.filter(r=>r.fromComponent===e||r.from?.includes(t.id)||r.from===e);return{component:t,incoming:r,outgoing:n}})(e):null;if(!e||!h)return(0,f.jsxs)("div",{className:"space-y-6",children:[(0,f.jsxs)("div",{children:[(0,f.jsx)("h1",{className:"text-2xl font-semibold text-foreground",children:"Impact Analysis"}),(0,f.jsx)("p",{className:"text-sm text-muted-foreground",children:"Select a component to see what would be affected by changes"})]}),(0,f.jsxs)("div",{className:"relative max-w-md",children:[(0,f.jsx)(y,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),(0,f.jsx)(eq,{placeholder:"Search components...",value:r,onChange:e=>n(e.target.value),className:"bg-card pl-9"})]}),0===m.length?(0,f.jsx)(aJ,{className:"bg-card",children:(0,f.jsx)(a4,{className:"p-6 text-center",children:(0,f.jsx)("p",{className:"text-muted-foreground",children:"No components found"})})}):(0,f.jsx)("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:m.map(e=>(0,f.jsxs)("button",{onClick:()=>t(e.name),className:"flex items-center gap-3 rounded-lg border border-border bg-card p-4 text-left transition-colors hover:bg-secondary",children:[(0,f.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-lg bg-primary/10",children:(0,f.jsx)(aI,{className:"h-5 w-5 text-primary"})}),(0,f.jsxs)("div",{children:[(0,f.jsx)("p",{className:"font-medium text-card-foreground",children:e.name}),(0,f.jsxs)("p",{className:"text-xs text-muted-foreground",children:[e.type," · ",e.layer]})]})]},e.id))})]});let x=h.incoming.length>=5?"high":h.incoming.length>=3?"medium":"low";return(0,f.jsxs)("div",{className:"space-y-6",children:[(0,f.jsxs)("div",{className:"flex items-start justify-between",children:[(0,f.jsxs)("div",{children:[(0,f.jsxs)("div",{className:"flex items-center gap-3",children:[(0,f.jsx)("h1",{className:"text-2xl font-semibold text-foreground",children:e}),(0,f.jsxs)(a5,{variant:"outline",className:eW("text-xs","high"===x&&"border-destructive/50 bg-destructive/10 text-destructive","medium"===x&&"border-warning/50 bg-warning/10 text-warning","low"===x&&"border-success/50 bg-success/10 text-success"),children:["high"===x&&(0,f.jsx)(aX,{className:"mr-1 h-3 w-3"}),"low"===x&&(0,f.jsx)(aV,{className:"mr-1 h-3 w-3"}),x," impact risk"]})]}),(0,f.jsxs)("p",{className:"text-sm text-muted-foreground",children:[h.component.type," · ",h.component.layer," · ",h.component.purpose||"No description"]})]}),(0,f.jsx)("button",{onClick:()=>t(""),className:"text-sm text-muted-foreground hover:text-foreground",children:"Clear selection"})]}),(0,f.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2",children:[(0,f.jsx)(aJ,{className:"bg-card",children:(0,f.jsx)(a4,{className:"p-4",children:(0,f.jsxs)("div",{className:"flex items-center gap-3",children:[(0,f.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-lg bg-chart-1/10",children:(0,f.jsx)(oO,{className:"h-5 w-5 text-chart-1"})}),(0,f.jsxs)("div",{children:[(0,f.jsx)("p",{className:"text-2xl font-semibold text-card-foreground",children:h.incoming.length}),(0,f.jsx)("p",{className:"text-sm text-muted-foreground",children:"Incoming connections"})]})]})})}),(0,f.jsx)(aJ,{className:"bg-card",children:(0,f.jsx)(a4,{className:"p-4",children:(0,f.jsxs)("div",{className:"flex items-center gap-3",children:[(0,f.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-lg bg-chart-2/10",children:(0,f.jsx)(oz,{className:"h-5 w-5 text-chart-2"})}),(0,f.jsxs)("div",{children:[(0,f.jsx)("p",{className:"text-2xl font-semibold text-card-foreground",children:h.outgoing.length}),(0,f.jsx)("p",{className:"text-sm text-muted-foreground",children:"Outgoing connections"})]})]})})})]}),h.incoming.length>0&&(0,f.jsxs)(aJ,{className:"bg-card",children:[(0,f.jsxs)(a0,{className:"pb-3",children:[(0,f.jsxs)(a1,{className:"flex items-center gap-2 text-base font-medium",children:[(0,f.jsx)(oO,{className:"h-4 w-4 text-chart-1"}),"Files that USE this component",(0,f.jsx)(a5,{variant:"secondary",className:"ml-auto",children:h.incoming.length})]}),(0,f.jsxs)("p",{className:"text-xs text-muted-foreground",children:["These files may need changes if you modify ",e]})]}),(0,f.jsx)(a4,{children:(0,f.jsx)("div",{className:"space-y-3",children:h.incoming.map((e,t)=>(0,f.jsxs)("div",{className:"rounded-lg border border-border bg-secondary/30 p-3",children:[(0,f.jsxs)("div",{className:"flex items-center gap-2",children:[(0,f.jsx)(of,{className:"h-4 w-4 text-muted-foreground"}),(0,f.jsx)("span",{className:"font-mono text-sm text-foreground",children:e.from}),(0,f.jsxs)("span",{className:"text-xs text-muted-foreground",children:[":",e.line]})]}),(0,f.jsxs)("div",{className:"mt-2 flex items-center gap-2 text-xs text-muted-foreground",children:[(0,f.jsx)(om,{className:"h-3.5 w-3.5"}),(0,f.jsx)("span",{className:"font-medium text-foreground",children:e.symbol})]}),e.code&&(0,f.jsx)("pre",{className:"mt-2 rounded bg-background p-2 font-mono text-xs text-muted-foreground overflow-x-auto",children:e.code})]},t))})})]}),h.outgoing.length>0&&(0,f.jsxs)(aJ,{className:"bg-card",children:[(0,f.jsxs)(a0,{className:"pb-3",children:[(0,f.jsxs)(a1,{className:"flex items-center gap-2 text-base font-medium",children:[(0,f.jsx)(oz,{className:"h-4 w-4 text-chart-2"}),"Components this CALLS",(0,f.jsx)(a5,{variant:"secondary",className:"ml-auto",children:h.outgoing.length})]}),(0,f.jsxs)("p",{className:"text-xs text-muted-foreground",children:["External dependencies of ",e]})]}),(0,f.jsx)(a4,{children:(0,f.jsx)("div",{className:"space-y-3",children:h.outgoing.map((e,r)=>(0,f.jsxs)("button",{onClick:()=>e.toComponent&&t(e.toComponent),className:"w-full rounded-lg border border-border bg-secondary/30 p-3 text-left transition-colors hover:bg-secondary/50",children:[(0,f.jsxs)("div",{className:"flex items-center gap-2",children:[(0,f.jsx)(a5,{variant:"outline",className:"bg-primary/10 text-primary",children:e.toComponent||e.to}),(0,f.jsxs)("span",{className:"text-xs text-muted-foreground",children:[":",e.line]})]}),(0,f.jsxs)("div",{className:"mt-2 flex items-center gap-2 text-xs text-muted-foreground",children:[(0,f.jsx)(om,{className:"h-3.5 w-3.5"}),(0,f.jsx)("span",{className:"font-medium text-foreground",children:e.symbol})]}),e.code&&(0,f.jsx)("pre",{className:"mt-2 rounded bg-background p-2 font-mono text-xs text-muted-foreground overflow-x-auto",children:e.code})]},r))})})]}),0===h.incoming.length&&0===h.outgoing.length&&(0,f.jsx)(aJ,{className:"bg-card",children:(0,f.jsx)(a4,{className:"p-6 text-center",children:(0,f.jsx)("p",{className:"text-muted-foreground",children:"No connections found for this component"})})})]})}let oF=b("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]),o$=b("ZoomIn",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),oB=b("ZoomOut",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),oW=b("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);function oH(e,[t,r]){return Math.min(r,Math.max(t,e))}function oV(e){let t=p.useRef({value:e,previous:e});return p.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var oq=[" ","Enter","ArrowUp","ArrowDown"],oU=[" ","Enter"],oK="Select",[oG,oX,oY]=eJ(oK),[oZ,oQ]=eK(oK,[oY,rM]),oJ=rM(),[o0,o1]=oZ(oK),[o2,o4]=oZ(oK),o3=e=>{let{__scopeSelect:t,children:r,open:n,defaultOpen:s,onOpenChange:a,value:o,defaultValue:l,onValueChange:i,dir:c,name:d,autoComplete:u,disabled:m,required:h,form:x}=e,g=oJ(t),[v,b]=p.useState(null),[y,w]=p.useState(null),[j,N]=p.useState(!1),k=e1(c),[C=!1,S]=eX({prop:n,defaultProp:s,onChange:a}),[E,R]=eX({prop:o,defaultProp:l,onChange:i}),P=p.useRef(null),M=!v||x||!!v.closest("form"),[T,L]=p.useState(new Set),D=Array.from(T).map(e=>e.props.value).join(";");return(0,f.jsx)(rD,{...g,children:(0,f.jsxs)(o0,{required:h,scope:t,trigger:v,onTriggerChange:b,valueNode:y,onValueNodeChange:w,valueNodeHasChildren:j,onValueNodeHasChildrenChange:N,contentId:tm(),value:E,onValueChange:R,open:C,onOpenChange:S,dir:k,triggerPointerDownPosRef:P,disabled:m,children:[(0,f.jsx)(oG.Provider,{scope:t,children:(0,f.jsx)(o2,{scope:e.__scopeSelect,onNativeOptionAdd:p.useCallback(e=>{L(t=>new Set(t).add(e))},[]),onNativeOptionRemove:p.useCallback(e=>{L(t=>{let r=new Set(t);return r.delete(e),r})},[]),children:r})}),M?(0,f.jsxs)(lT,{"aria-hidden":!0,required:h,tabIndex:-1,name:d,autoComplete:u,value:E,onChange:e=>R(e.target.value),disabled:m,form:x,children:[void 0===E?(0,f.jsx)("option",{value:""}):null,Array.from(T)]},D):null]})})};o3.displayName=oK;var o5="SelectTrigger",o6=p.forwardRef((e,t)=>{let{__scopeSelect:r,disabled:n=!1,...s}=e,a=oJ(r),o=o1(o5,r),l=o.disabled||n,i=R(t,o.onTriggerChange),c=oX(r),d=p.useRef("touch"),[u,m,h]=lL(e=>{let t=c().filter(e=>!e.disabled),r=t.find(e=>e.value===o.value),n=lD(t,e,r);void 0!==n&&o.onValueChange(n.value)}),x=e=>{l||(o.onOpenChange(!0),h()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,f.jsx)(r_,{asChild:!0,...a,children:(0,f.jsx)(eZ.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":lM(o.value)?"":void 0,...s,ref:i,onClick:eU(s.onClick,e=>{e.currentTarget.focus(),"mouse"!==d.current&&x(e)}),onPointerDown:eU(s.onPointerDown,e=>{d.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(x(e),e.preventDefault())}),onKeyDown:eU(s.onKeyDown,e=>{let t=""!==u.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||m(e.key),(!t||" "!==e.key)&&oq.includes(e.key)&&(x(),e.preventDefault())})})})});o6.displayName=o5;var o8="SelectValue",o7=p.forwardRef((e,t)=>{let{__scopeSelect:r,className:n,style:s,children:a,placeholder:o="",...l}=e,i=o1(o8,r),{onValueNodeHasChildrenChange:c}=i,d=void 0!==a,u=R(t,i.onValueNodeChange);return tc(()=>{c(d)},[c,d]),(0,f.jsx)(eZ.span,{...l,ref:u,style:{pointerEvents:"none"},children:lM(i.value)?(0,f.jsx)(f.Fragment,{children:o}):a})});o7.displayName=o8;var o9=p.forwardRef((e,t)=>{let{__scopeSelect:r,children:n,...s}=e;return(0,f.jsx)(eZ.span,{"aria-hidden":!0,...s,ref:t,children:n||"▼"})});o9.displayName="SelectIcon";var le=e=>(0,f.jsx)(rU,{asChild:!0,...e});le.displayName="SelectPortal";var lt="SelectContent",lr=p.forwardRef((e,t)=>{let r=o1(lt,e.__scopeSelect),[n,s]=p.useState();return(tc(()=>{s(new DocumentFragment)},[]),r.open)?(0,f.jsx)(la,{...e,ref:t}):n?eY.createPortal((0,f.jsx)(ln,{scope:e.__scopeSelect,children:(0,f.jsx)(oG.Slot,{scope:e.__scopeSelect,children:(0,f.jsx)("div",{children:e.children})})}),n):null});lr.displayName=lt;var[ln,ls]=oZ(lt),la=p.forwardRef((e,t)=>{let{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:a,onPointerDownOutside:o,side:l,sideOffset:i,align:c,alignOffset:d,arrowPadding:u,collisionBoundary:m,collisionPadding:h,sticky:x,hideWhenDetached:g,avoidCollisions:v,...b}=e,y=o1(lt,r),[w,j]=p.useState(null),[N,k]=p.useState(null),C=R(t,e=>j(e)),[S,E]=p.useState(null),[M,T]=p.useState(null),L=oX(r),[D,A]=p.useState(!1),_=p.useRef(!1);p.useEffect(()=>{if(w)return nl(w)},[w]),e7();let O=p.useCallback(e=>{let[t,...r]=L().map(e=>e.ref.current),[n]=r.slice(-1),s=document.activeElement;for(let r of e)if(r===s||(r?.scrollIntoView({block:"nearest"}),r===t&&N&&(N.scrollTop=0),r===n&&N&&(N.scrollTop=N.scrollHeight),r?.focus(),document.activeElement!==s))return},[L,N]),z=p.useCallback(()=>O([S,w]),[O,S,w]);p.useEffect(()=>{D&&z()},[D,z]);let{onOpenChange:I,triggerPointerDownPosRef:F}=y;p.useEffect(()=>{if(w){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(F.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(F.current?.y??0))}},r=r=>{e.x<=10&&e.y<=10?r.preventDefault():w.contains(r.target)||I(!1),document.removeEventListener("pointermove",t),F.current=null};return null!==F.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",r,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",r,{capture:!0})}}},[w,I,F]),p.useEffect(()=>{let e=()=>I(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[I]);let[$,B]=lL(e=>{let t=L().filter(e=>!e.disabled),r=t.find(e=>e.ref.current===document.activeElement),n=lD(t,e,r);n&&setTimeout(()=>n.ref.current.focus())}),W=p.useCallback((e,t,r)=>{let n=!_.current&&!r;(void 0!==y.value&&y.value===t||n)&&(E(e),n&&(_.current=!0))},[y.value]),H=p.useCallback(()=>w?.focus(),[w]),V=p.useCallback((e,t,r)=>{let n=!_.current&&!r;(void 0!==y.value&&y.value===t||n)&&T(e)},[y.value]),q="popper"===n?ll:lo,U=q===ll?{side:l,sideOffset:i,align:c,alignOffset:d,arrowPadding:u,collisionBoundary:m,collisionPadding:h,sticky:x,hideWhenDetached:g,avoidCollisions:v}:{};return(0,f.jsx)(ln,{scope:r,content:w,viewport:N,onViewportChange:k,itemRefCallback:W,selectedItem:S,onItemLeave:H,itemTextRefCallback:V,focusSelectedItem:z,selectedItemText:M,position:n,isPositioned:D,searchRef:$,children:(0,f.jsx)(nU,{as:P,allowPinchZoom:!0,children:(0,f.jsx)(tn,{asChild:!0,trapped:y.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:eU(s,e=>{y.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,f.jsx)(e3,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:(0,f.jsx)(q,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:e=>e.preventDefault(),...b,...U,onPlaced:()=>A(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:eU(b.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||B(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=L().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){let r=e.target,n=t.indexOf(r);t=t.slice(n+1)}setTimeout(()=>O(t)),e.preventDefault()}})})})})})})});la.displayName="SelectContentImpl";var lo=p.forwardRef((e,t)=>{let{__scopeSelect:r,onPlaced:n,...s}=e,a=o1(lt,r),o=ls(lt,r),[l,i]=p.useState(null),[c,d]=p.useState(null),u=R(t,e=>d(e)),m=oX(r),h=p.useRef(!1),x=p.useRef(!0),{viewport:g,selectedItem:v,selectedItemText:b,focusSelectedItem:y}=o,w=p.useCallback(()=>{if(a.trigger&&a.valueNode&&l&&c&&g&&v&&b){let e=a.trigger.getBoundingClientRect(),t=c.getBoundingClientRect(),r=a.valueNode.getBoundingClientRect(),s=b.getBoundingClientRect();if("rtl"!==a.dir){let n=s.left-t.left,a=r.left-n,o=e.left-a,i=e.width+o,c=Math.max(i,t.width),d=oH(a,[10,Math.max(10,window.innerWidth-10-c)]);l.style.minWidth=i+"px",l.style.left=d+"px"}else{let n=t.right-s.right,a=window.innerWidth-r.right-n,o=window.innerWidth-e.right-a,i=e.width+o,c=Math.max(i,t.width),d=oH(a,[10,Math.max(10,window.innerWidth-10-c)]);l.style.minWidth=i+"px",l.style.right=d+"px"}let o=m(),i=window.innerHeight-20,d=g.scrollHeight,u=window.getComputedStyle(c),f=parseInt(u.borderTopWidth,10),p=parseInt(u.paddingTop,10),x=parseInt(u.borderBottomWidth,10),y=f+p+d+parseInt(u.paddingBottom,10)+x,w=Math.min(5*v.offsetHeight,y),j=window.getComputedStyle(g),N=parseInt(j.paddingTop,10),k=parseInt(j.paddingBottom,10),C=e.top+e.height/2-10,S=v.offsetHeight/2,E=f+p+(v.offsetTop+S);if(E<=C){let e=o.length>0&&v===o[o.length-1].ref.current;l.style.bottom="0px";let t=Math.max(i-C,S+(e?k:0)+(c.clientHeight-g.offsetTop-g.offsetHeight)+x);l.style.height=E+t+"px"}else{let e=o.length>0&&v===o[0].ref.current;l.style.top="0px";let t=Math.max(C,f+g.offsetTop+(e?N:0)+S);l.style.height=t+(y-E)+"px",g.scrollTop=E-C+g.offsetTop}l.style.margin="10px 0",l.style.minHeight=w+"px",l.style.maxHeight=i+"px",n?.(),requestAnimationFrame(()=>h.current=!0)}},[m,a.trigger,a.valueNode,l,c,g,v,b,a.dir,n]);tc(()=>w(),[w]);let[j,N]=p.useState();tc(()=>{c&&N(window.getComputedStyle(c).zIndex)},[c]);let k=p.useCallback(e=>{e&&!0===x.current&&(w(),y?.(),x.current=!1)},[w,y]);return(0,f.jsx)(li,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:h,onScrollButtonChange:k,children:(0,f.jsx)("div",{ref:i,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:j},children:(0,f.jsx)(eZ.div,{...s,ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});lo.displayName="SelectItemAlignedPosition";var ll=p.forwardRef((e,t)=>{let{__scopeSelect:r,align:n="start",collisionPadding:s=10,...a}=e,o=oJ(r);return(0,f.jsx)(rF,{...o,...a,ref:t,align:n,collisionPadding:s,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});ll.displayName="SelectPopperPosition";var[li,lc]=oZ(lt,{}),ld="SelectViewport",lu=p.forwardRef((e,t)=>{let{__scopeSelect:r,nonce:n,...s}=e,a=ls(ld,r),o=lc(ld,r),l=R(t,a.onViewportChange),i=p.useRef(0);return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),(0,f.jsx)(oG.Slot,{scope:r,children:(0,f.jsx)(eZ.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:eU(s.onScroll,e=>{let t=e.currentTarget,{contentWrapper:r,shouldExpandOnScrollRef:n}=o;if(n?.current&&r){let e=Math.abs(i.current-t.scrollTop);if(e>0){let n=window.innerHeight-20,s=Math.max(parseFloat(r.style.minHeight),parseFloat(r.style.height));if(s<n){let a=s+e,o=Math.min(n,a),l=a-o;r.style.height=o+"px","0px"===r.style.bottom&&(t.scrollTop=l>0?l:0,r.style.justifyContent="flex-end")}}}i.current=t.scrollTop})})})]})});lu.displayName=ld;var lm="SelectGroup",[lf,lp]=oZ(lm);p.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e,s=tm();return(0,f.jsx)(lf,{scope:r,id:s,children:(0,f.jsx)(eZ.div,{role:"group","aria-labelledby":s,...n,ref:t})})}).displayName=lm;var lh="SelectLabel";p.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e,s=lp(lh,r);return(0,f.jsx)(eZ.div,{id:s.id,...n,ref:t})}).displayName=lh;var lx="SelectItem",[lg,lv]=oZ(lx),lb=p.forwardRef((e,t)=>{let{__scopeSelect:r,value:n,disabled:s=!1,textValue:a,...o}=e,l=o1(lx,r),i=ls(lx,r),c=l.value===n,[d,u]=p.useState(a??""),[m,h]=p.useState(!1),x=R(t,e=>i.itemRefCallback?.(e,n,s)),g=tm(),v=p.useRef("touch"),b=()=>{s||(l.onValueChange(n),l.onOpenChange(!1))};if(""===n)throw Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,f.jsx)(lg,{scope:r,value:n,disabled:s,textId:g,isSelected:c,onItemTextChange:p.useCallback(e=>{u(t=>t||(e?.textContent??"").trim())},[]),children:(0,f.jsx)(oG.ItemSlot,{scope:r,value:n,disabled:s,textValue:d,children:(0,f.jsx)(eZ.div,{role:"option","aria-labelledby":g,"data-highlighted":m?"":void 0,"aria-selected":c&&m,"data-state":c?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...o,ref:x,onFocus:eU(o.onFocus,()=>h(!0)),onBlur:eU(o.onBlur,()=>h(!1)),onClick:eU(o.onClick,()=>{"mouse"!==v.current&&b()}),onPointerUp:eU(o.onPointerUp,()=>{"mouse"===v.current&&b()}),onPointerDown:eU(o.onPointerDown,e=>{v.current=e.pointerType}),onPointerMove:eU(o.onPointerMove,e=>{v.current=e.pointerType,s?i.onItemLeave?.():"mouse"===v.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:eU(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&i.onItemLeave?.()}),onKeyDown:eU(o.onKeyDown,e=>{(i.searchRef?.current===""||" "!==e.key)&&(oU.includes(e.key)&&b()," "===e.key&&e.preventDefault())})})})})});lb.displayName=lx;var ly="SelectItemText",lw=p.forwardRef((e,t)=>{let{__scopeSelect:r,className:n,style:s,...a}=e,o=o1(ly,r),l=ls(ly,r),i=lv(ly,r),c=o4(ly,r),[d,u]=p.useState(null),m=R(t,e=>u(e),i.onItemTextChange,e=>l.itemTextRefCallback?.(e,i.value,i.disabled)),h=d?.textContent,x=p.useMemo(()=>(0,f.jsx)("option",{value:i.value,disabled:i.disabled,children:h},i.value),[i.disabled,i.value,h]),{onNativeOptionAdd:g,onNativeOptionRemove:v}=c;return tc(()=>(g(x),()=>v(x)),[g,v,x]),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(eZ.span,{id:i.textId,...a,ref:m}),i.isSelected&&o.valueNode&&!o.valueNodeHasChildren?eY.createPortal(a.children,o.valueNode):null]})});lw.displayName=ly;var lj="SelectItemIndicator",lN=p.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e;return lv(lj,r).isSelected?(0,f.jsx)(eZ.span,{"aria-hidden":!0,...n,ref:t}):null});lN.displayName=lj;var lk="SelectScrollUpButton",lC=p.forwardRef((e,t)=>{let r=ls(lk,e.__scopeSelect),n=lc(lk,e.__scopeSelect),[s,a]=p.useState(!1),o=R(t,n.onScrollButtonChange);return tc(()=>{if(r.viewport&&r.isPositioned){let e=function(){a(t.scrollTop>0)},t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),s?(0,f.jsx)(lR,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});lC.displayName=lk;var lS="SelectScrollDownButton",lE=p.forwardRef((e,t)=>{let r=ls(lS,e.__scopeSelect),n=lc(lS,e.__scopeSelect),[s,a]=p.useState(!1),o=R(t,n.onScrollButtonChange);return tc(()=>{if(r.viewport&&r.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;a(Math.ceil(t.scrollTop)<e)},t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),s?(0,f.jsx)(lR,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});lE.displayName=lS;var lR=p.forwardRef((e,t)=>{let{__scopeSelect:r,onAutoScroll:n,...s}=e,a=ls("SelectScrollButton",r),o=p.useRef(null),l=oX(r),i=p.useCallback(()=>{null!==o.current&&(window.clearInterval(o.current),o.current=null)},[]);return p.useEffect(()=>()=>i(),[i]),tc(()=>{let e=l().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[l]),(0,f.jsx)(eZ.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:eU(s.onPointerDown,()=>{null===o.current&&(o.current=window.setInterval(n,50))}),onPointerMove:eU(s.onPointerMove,()=>{a.onItemLeave?.(),null===o.current&&(o.current=window.setInterval(n,50))}),onPointerLeave:eU(s.onPointerLeave,()=>{i()})})});p.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e;return(0,f.jsx)(eZ.div,{"aria-hidden":!0,...n,ref:t})}).displayName="SelectSeparator";var lP="SelectArrow";function lM(e){return""===e||void 0===e}p.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e,s=oJ(r),a=o1(lP,r),o=ls(lP,r);return a.open&&"popper"===o.position?(0,f.jsx)(rW,{...s,...n,ref:t}):null}).displayName=lP;var lT=p.forwardRef((e,t)=>{let{value:r,...n}=e,s=p.useRef(null),a=R(t,s),o=oV(r);return p.useEffect(()=>{let e=s.current,t=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(o!==r&&t){let n=new Event("change",{bubbles:!0});t.call(e,r),e.dispatchEvent(n)}},[o,r]),(0,f.jsx)(an,{asChild:!0,children:(0,f.jsx)("select",{...n,ref:a,defaultValue:r})})});function lL(e){let t=eG(e),r=p.useRef(""),n=p.useRef(0),s=p.useCallback(e=>{let s=r.current+e;t(s),function e(t){r.current=t,window.clearTimeout(n.current),""!==t&&(n.current=window.setTimeout(()=>e(""),1e3))}(s)},[t]),a=p.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,s,a]}function lD(e,t,r){var n,s;let a=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,o=r?e.indexOf(r):-1,l=(n=e,s=Math.max(o,0),n.map((e,t)=>n[(s+t)%n.length]));1===a.length&&(l=l.filter(e=>e!==r));let i=l.find(e=>e.textValue.toLowerCase().startsWith(a.toLowerCase()));return i!==r?i:void 0}lT.displayName="BubbleSelect";let lA=b("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);function l_({...e}){return(0,f.jsx)(o3,{"data-slot":"select",...e})}function lO({...e}){return(0,f.jsx)(o7,{"data-slot":"select-value",...e})}function lz({className:e,size:t="default",children:r,...n}){return(0,f.jsxs)(o6,{"data-slot":"select-trigger","data-size":t,className:eW("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[r,(0,f.jsx)(o9,{asChild:!0,children:(0,f.jsx)(j,{className:"size-4 opacity-50"})})]})}function lI({className:e,children:t,position:r="popper",...n}){return(0,f.jsx)(le,{children:(0,f.jsxs)(lr,{"data-slot":"select-content",className:eW("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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md","popper"===r&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...n,children:[(0,f.jsx)(l$,{}),(0,f.jsx)(lu,{className:eW("p-1","popper"===r&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),(0,f.jsx)(lB,{})]})})}function lF({className:e,children:t,...r}){return(0,f.jsxs)(lb,{"data-slot":"select-item",className:eW("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 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 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...r,children:[(0,f.jsx)("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:(0,f.jsx)(lN,{children:(0,f.jsx)(s3,{className:"size-4"})})}),(0,f.jsx)(lw,{children:t})]})}function l$({className:e,...t}){return(0,f.jsx)(lC,{"data-slot":"select-scroll-up-button",className:eW("flex cursor-default items-center justify-center py-1",e),...t,children:(0,f.jsx)(lA,{className:"size-4"})})}function lB({className:e,...t}){return(0,f.jsx)(lE,{"data-slot":"select-scroll-down-button",className:eW("flex cursor-default items-center justify-center py-1",e),...t,children:(0,f.jsx)(j,{className:"size-4"})})}let lW=[{id:"nextjs",name:"Next.js",type:"framework",layer:"frontend"},{id:"react",name:"React",type:"npm",layer:"frontend"},{id:"payments",name:"payments.ts",type:"service",layer:"backend"},{id:"users",name:"users.ts",type:"service",layer:"backend"},{id:"postgres",name:"PostgreSQL",type:"database",layer:"database"},{id:"redis",name:"Redis",type:"database",layer:"database"},{id:"openai",name:"OpenAI",type:"llm",layer:"external"},{id:"stripe",name:"Stripe",type:"service",layer:"external"}],lH=[{id:"e1",source:"nextjs",target:"payments",type:"service-call",label:"API"},{id:"e2",source:"nextjs",target:"users",type:"service-call",label:"API"},{id:"e3",source:"payments",target:"postgres",type:"service-call",label:"query"},{id:"e4",source:"payments",target:"stripe",type:"service-call",label:"call"},{id:"e5",source:"users",target:"postgres",type:"service-call",label:"query"},{id:"e6",source:"users",target:"redis",type:"service-call",label:"cache"},{id:"e7",source:"users",target:"openai",type:"service-call",label:"call"}],lV=["frontend","backend","database","queue","infra","external"],lq={frontend:"Frontend",backend:"Backend",database:"Data Layer",queue:"Queue / Workers",infra:"Infrastructure",external:"External Services"},lU={framework:{bg:"fill-chart-1/20",border:"stroke-chart-1",text:"fill-chart-1"},npm:{bg:"fill-chart-1/10",border:"stroke-chart-1/50",text:"fill-foreground"},service:{bg:"fill-chart-2/20",border:"stroke-chart-2",text:"fill-chart-2"},database:{bg:"fill-chart-3/20",border:"stroke-chart-3",text:"fill-chart-3"},queue:{bg:"fill-chart-4/20",border:"stroke-chart-4",text:"fill-chart-4"},llm:{bg:"fill-warning/20",border:"stroke-warning",text:"fill-warning"},infra:{bg:"fill-info/20",border:"stroke-info",text:"fill-info"}};function lK({node:e,allNodes:t,edges:r,position:n,onClose:s}){let a=(0,p.useMemo)(()=>{let e=new Map;for(let r of t)e.set(r.id,r);return e},[t]),o=r.filter(t=>t.source===e.id),l=r.filter(t=>t.target===e.id),i=e.hosts?.map(e=>a.get(e)).filter(Boolean)||[],c=e.hostedBy?a.get(e.hostedBy):null;return(0,f.jsxs)("div",{className:"absolute z-50 w-72 rounded-lg border border-border bg-card shadow-lg",style:{left:n.x,top:n.y},children:[(0,f.jsxs)("div",{className:"flex items-center justify-between border-b border-border px-4 py-3",children:[(0,f.jsxs)("div",{className:"flex items-center gap-2",children:[(0,f.jsx)("span",{className:"font-mono text-sm font-medium text-foreground",children:e.name}),e.version&&(0,f.jsxs)(a5,{variant:"outline",className:"text-xs",children:["v",e.version]})]}),(0,f.jsx)("button",{onClick:s,className:"text-muted-foreground hover:text-foreground",children:(0,f.jsx)(C,{className:"h-4 w-4"})})]}),(0,f.jsxs)("div",{className:"space-y-3 px-4 py-3",children:[(0,f.jsxs)("div",{className:"flex items-center gap-2",children:[(0,f.jsx)(a5,{variant:"outline",className:"text-xs capitalize",children:e.type}),(0,f.jsx)(a5,{variant:"outline",className:"text-xs capitalize",children:e.layer})]}),e.purpose&&(0,f.jsx)("p",{className:"text-xs text-muted-foreground",children:e.purpose}),c&&(0,f.jsxs)("div",{children:[(0,f.jsx)("p",{className:"text-xs font-medium text-muted-foreground",children:"Hosted on"}),(0,f.jsxs)("div",{className:"mt-1 flex items-center gap-1.5",children:[(0,f.jsx)(aG,{className:"h-3 w-3 text-info"}),(0,f.jsx)("span",{className:"text-xs text-foreground",children:c.name})]})]}),i.length>0&&(0,f.jsxs)("div",{children:[(0,f.jsx)("p",{className:"text-xs font-medium text-muted-foreground",children:"Hosts"}),(0,f.jsx)("div",{className:"mt-1 flex flex-wrap gap-1",children:i.map(e=>(0,f.jsx)(a5,{variant:"outline",className:"text-xs",children:e.name},e.id))})]}),o.length>0&&(0,f.jsxs)("div",{children:[(0,f.jsxs)("p",{className:"text-xs font-medium text-muted-foreground",children:["Connects to (",o.length,")"]}),(0,f.jsxs)("div",{className:"mt-1 space-y-1",children:[o.slice(0,5).map(e=>{let t=a.get(e.target);return(0,f.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-foreground",children:[(0,f.jsx)(od,{className:"h-3 w-3 text-muted-foreground"}),(0,f.jsx)("span",{children:t?.name||e.target}),e.label&&(0,f.jsxs)("span",{className:"text-muted-foreground",children:["(",e.label,")"]})]},e.id)}),o.length>5&&(0,f.jsxs)("p",{className:"text-xs text-muted-foreground",children:["+",o.length-5," more"]})]})]}),l.length>0&&(0,f.jsxs)("div",{children:[(0,f.jsxs)("p",{className:"text-xs font-medium text-muted-foreground",children:["Connected from (",l.length,")"]}),(0,f.jsxs)("div",{className:"mt-1 space-y-1",children:[l.slice(0,5).map(e=>{let t=a.get(e.source);return(0,f.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-foreground",children:[(0,f.jsx)(od,{className:"h-3 w-3 rotate-180 text-muted-foreground"}),(0,f.jsx)("span",{children:t?.name||e.source}),e.label&&(0,f.jsxs)("span",{className:"text-muted-foreground",children:["(",e.label,")"]})]},e.id)}),l.length>5&&(0,f.jsxs)("p",{className:"text-xs text-muted-foreground",children:["+",l.length-5," more"]})]})]}),e.configFiles&&e.configFiles.length>0&&(0,f.jsxs)("div",{children:[(0,f.jsx)("p",{className:"text-xs font-medium text-muted-foreground",children:"Config files"}),(0,f.jsx)("div",{className:"mt-1 space-y-0.5",children:e.configFiles.slice(0,3).map((e,t)=>(0,f.jsx)("p",{className:"truncate font-mono text-xs text-muted-foreground",children:e.split("/").pop()},t))})]}),e.tags&&e.tags.length>0&&(0,f.jsx)("div",{className:"flex flex-wrap gap-1",children:[...new Set(e.tags)].slice(0,6).map(e=>(0,f.jsx)("span",{className:"rounded bg-secondary px-1.5 py-0.5 text-xs text-muted-foreground",children:e},e))})]})]})}function lG({selectedComponent:e}){let[t,r]=(0,p.useState)(!1),[n,s]=(0,p.useState)(1),[a,o]=(0,p.useState)("TB"),[l,i]=(0,p.useState)(null),[c,d]=(0,p.useState)(!0),[u,m]=(0,p.useState)(!1),[h,x]=(0,p.useState)(!0),[g,v]=(0,p.useState)(null),b=(0,p.useRef)(null),{activeProjectPath:y}=(0,a6.useActiveProject)();(0,p.useEffect)(()=>{!async function(){d(!0);try{let e=new URLSearchParams;y&&e.set("path",y);let t=await fetch(`/api/graph?${e}`),r=await t.json();r.success&&r.data&&r.data.nodes?.length>0?(i(r.data),m(!1)):(i({nodes:lW,edges:lH}),m(!0))}catch{i({nodes:lW,edges:lH}),m(!0)}d(!1)}()},[y]);let w=l?.nodes||lW,j=l?.edges||lH,N=(0,p.useMemo)(()=>(function(e,t){let r=new Map;for(let t of e){let e=t.layer||"backend";r.has(e)||r.set(e,[]),r.get(e).push(t)}let n=lV.filter(e=>(r.get(e)?.length||0)>0),s=[],a=[],o=40;for(let e of n){let t=r.get(e)||[],n=t.slice(0,12),l=Math.max(130*n.length-20+80,200);s.push({id:e,label:lq[e]||e,x:40,y:o,width:l,height:100});n.forEach((e,t)=>{a.push({id:e.id,label:e.name,type:e.type,layer:e.layer,x:80+130*t,y:o+30,node:e})}),t.length>12&&a.push({id:`${e}_overflow`,label:`+${t.length-12} more`,type:"overflow",layer:e,x:1640,y:o+30,node:{id:`${e}_overflow`,name:`+${t.length-12} more`,type:"overflow",layer:e}}),o+=130}let l=Math.max(...s.map(e=>e.x+e.width),600)+40;return{layers:s,nodes:a,svgWidth:l,svgHeight:o+20}})(w,0),[w,a]),k=(0,p.useMemo)(()=>{let e=new Set(N.nodes.map(e=>e.id));return j.filter(t=>t.source!==t.target&&e.has(t.source)&&e.has(t.target))},[j,N.nodes]),C=(0,p.useMemo)(()=>{let e=[];for(let t of w)if(t.hosts&&t.hosts.length>0){let r=t.hosts.map(e=>w.find(t=>t.id===e)).filter(Boolean);r.length>0&&e.push({host:t,hosted:r})}return e},[w]),S=(0,p.useCallback)(()=>{let e=`flowchart ${a}
4
+ `,t=new Map;for(let e of w){let r=e.layer||"backend";t.has(r)||t.set(r,[]),t.get(r).push(e)}for(let[r,n]of t){let t=lq[r]||r;for(let r of(e+=` subgraph ${t}
5
+ `,n)){let t="database"===r.type?`[(${r.name})]`:`[${r.name}]`;e+=` ${r.id}${t}
6
+ `}e+=` end
7
+ `}for(let t of(e+="\n",k)){let r=t.label||t.type;e+=` ${t.source} -->|${r}| ${t.target}
8
+ `}navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),2e3)},[w,k,a]),E=e=>{let t=N.nodes.find(t=>t.id===e);return t?{x:t.x,y:t.y}:null};return(0,f.jsxs)("div",{className:"space-y-6",children:[(0,f.jsx)("div",{className:"flex items-start justify-between",children:(0,f.jsxs)("div",{children:[(0,f.jsx)("h1",{className:"text-2xl font-semibold text-foreground",children:"Architecture Diagram"}),(0,f.jsx)("p",{className:"text-sm text-muted-foreground",children:u?"Demo data — run a scan to see your real architecture":`${w.length} components, ${k.length} connections`})]})}),u&&(0,f.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-info/30 bg-info/10 p-3",children:[(0,f.jsx)(aQ,{className:"h-4 w-4 text-info"}),(0,f.jsxs)("p",{className:"text-sm text-info",children:["Showing demo data. Run ",(0,f.jsx)("code",{className:"rounded bg-info/20 px-1",children:"navgator scan"})," to visualize your project."]})]}),C.length>0&&(0,f.jsx)("div",{className:"flex flex-wrap gap-3",children:C.map(e=>(0,f.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-info/20 bg-info/5 px-3 py-1.5",children:[(0,f.jsx)(aG,{className:"h-3.5 w-3.5 text-info"}),(0,f.jsx)("span",{className:"text-xs font-medium text-foreground",children:e.host.name}),(0,f.jsx)("span",{className:"text-xs text-muted-foreground",children:"hosts"}),e.hosted.map(e=>(0,f.jsx)(a5,{variant:"outline",className:"text-xs",children:e.name},e.id))]},e.host.id))}),(0,f.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,f.jsxs)("div",{className:"flex items-center gap-1 rounded-lg border border-border bg-card p-1",children:[(0,f.jsx)(eV,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:()=>s(e=>Math.max(.5,e-.1)),children:(0,f.jsx)(oB,{className:"h-4 w-4"})}),(0,f.jsxs)("span",{className:"w-12 text-center text-sm text-muted-foreground",children:[Math.round(100*n),"%"]}),(0,f.jsx)(eV,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:()=>s(e=>Math.min(2,e+.1)),children:(0,f.jsx)(o$,{className:"h-4 w-4"})}),(0,f.jsx)(eV,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:()=>s(1),children:(0,f.jsx)(oW,{className:"h-4 w-4"})})]}),(0,f.jsxs)(l_,{value:a,onValueChange:e=>o(e),children:[(0,f.jsx)(lz,{className:"w-32 bg-card",children:(0,f.jsx)(lO,{})}),(0,f.jsxs)(lI,{children:[(0,f.jsx)(lF,{value:"TB",children:"Top to Bottom"}),(0,f.jsx)(lF,{value:"LR",children:"Left to Right"})]})]}),(0,f.jsxs)(eV,{variant:h?"default":"outline",size:"sm",className:"gap-2",onClick:()=>x(!h),children:[(0,f.jsx)(od,{className:"h-4 w-4"}),"Flow Arrows"]}),(0,f.jsx)("div",{className:"flex-1"}),(0,f.jsxs)(eV,{variant:"outline",size:"sm",className:"gap-2 bg-transparent",onClick:S,children:[t?(0,f.jsx)(s3,{className:"h-4 w-4"}):(0,f.jsx)(oF,{className:"h-4 w-4"}),t?"Copied":"Copy Mermaid"]})]}),(0,f.jsx)(aJ,{className:"bg-card overflow-hidden",children:(0,f.jsx)(a4,{className:"p-0",children:(0,f.jsx)("div",{className:"relative overflow-auto bg-background/50",style:{minHeight:400},children:c?(0,f.jsx)("div",{className:"flex h-96 items-center justify-center",children:(0,f.jsx)(aZ,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("svg",{ref:b,width:N.svgWidth*n,height:N.svgHeight*n,className:"mx-auto",children:(0,f.jsxs)("g",{transform:`scale(${n})`,children:[N.layers.map(e=>(0,f.jsxs)("g",{children:[(0,f.jsx)("rect",{x:e.x,y:e.y,width:e.width,height:e.height,rx:8,className:"fill-secondary/30 stroke-border/50",strokeWidth:1,strokeDasharray:"4 2"}),(0,f.jsx)("text",{x:e.x+12,y:e.y+18,className:"fill-muted-foreground font-medium uppercase tracking-wider",style:{fontSize:10},children:e.label})]},e.id)),C.map(e=>{let t=N.nodes.find(t=>t.id===e.host.id),r=e.hosted.map(e=>N.nodes.find(t=>t.id===e.id)).filter(Boolean);if(!t||0===r.length)return null;let n=[t,...r],s=Math.min(...n.map(e=>e.x))-8,a=Math.min(...n.map(e=>e.y))-8,o=Math.max(...n.map(e=>e.x))+118,l=Math.max(...n.map(e=>e.y))+48;return(0,f.jsx)("rect",{x:s,y:a,width:o-s,height:l-a,rx:10,className:"fill-none stroke-info/40",strokeWidth:2,strokeDasharray:"6 3"},`host-${e.host.id}`)}),h&&k.map((e,t)=>{let r=E(e.source),n=E(e.target);if(!r||!n)return null;let s=r.x+55,a=r.y+20,o=n.x+55,l=n.y+20,i=(a+l)/2,c=`M ${s} ${a} C ${s} ${i}, ${o} ${i}, ${o} ${l}`;return(0,f.jsxs)("g",{children:[(0,f.jsx)("path",{d:c,className:"stroke-border",fill:"none",strokeWidth:1.5,markerEnd:"url(#arrowhead)"}),e.label&&(0,f.jsx)("text",{x:(s+o)/2,y:i-4,textAnchor:"middle",className:"fill-muted-foreground",style:{fontSize:9},children:e.label})]},t)}),(0,f.jsx)("defs",{children:(0,f.jsx)("marker",{id:"arrowhead",markerWidth:"10",markerHeight:"7",refX:"9",refY:"3.5",orient:"auto",children:(0,f.jsx)("polygon",{points:"0 0, 10 3.5, 0 7",className:"fill-border"})})}),N.nodes.map(t=>{let r=lU[t.type]||lU.service||{bg:"fill-secondary",border:"stroke-border",text:"fill-foreground"},n=e?.toLowerCase()===t.label.toLowerCase(),s=g?.node.id===t.id,a=t.node.hosts&&t.node.hosts.length>0;return"overflow"===t.type?(0,f.jsx)("g",{children:(0,f.jsx)("text",{x:t.x+55,y:t.y+24,textAnchor:"middle",className:"fill-muted-foreground",style:{fontSize:11},children:t.label})},t.id):(0,f.jsxs)("g",{className:"cursor-pointer",onClick:e=>((e,t)=>{if("overflow"===e.type)return;let r=b.current?.getBoundingClientRect();r&&v({node:e,x:t.clientX-r.left+10,y:t.clientY-r.top+10})})(t.node,e),children:[(0,f.jsx)("rect",{x:t.x,y:t.y,width:110,height:40,rx:6,className:`${r.bg} ${r.border} ${s?"stroke-primary stroke-[2.5]":n?"stroke-primary stroke-2":"stroke-1"}`}),a&&(0,f.jsx)("circle",{cx:t.x+104,cy:t.y+6,r:5,className:"fill-info stroke-card",strokeWidth:1.5}),(0,f.jsx)("text",{x:t.x+55,y:t.y+24,textAnchor:"middle",className:`${r.text} font-medium`,style:{fontSize:11},children:t.label.length>14?t.label.slice(0,12)+"…":t.label})]},t.id)})]})}),g&&(0,f.jsx)(lK,{node:g.node,allNodes:w,edges:j,position:{x:g.x,y:g.y},onClose:()=>v(null)})]})})})}),(0,f.jsxs)(aJ,{className:"bg-card",children:[(0,f.jsx)(a0,{className:"pb-2",children:(0,f.jsx)(a1,{className:"text-sm font-medium",children:"Legend"})}),(0,f.jsx)(a4,{children:(0,f.jsxs)("div",{className:"flex flex-wrap gap-4",children:[Object.entries(lU).map(([e,t])=>(0,f.jsxs)("div",{className:"flex items-center gap-2",children:[(0,f.jsx)("div",{className:`h-4 w-4 rounded border ${t.bg.replace("fill-","bg-")} ${t.border.replace("stroke-","border-")}`}),(0,f.jsx)("span",{className:"text-sm capitalize text-muted-foreground",children:e})]},e)),(0,f.jsxs)("div",{className:"flex items-center gap-2",children:[(0,f.jsx)("div",{className:"h-4 w-4 rounded border-2 border-dashed border-info/40"}),(0,f.jsx)("span",{className:"text-sm text-muted-foreground",children:"Hosting group"})]})]})})]})]})}var lX="ScrollArea",[lY,lZ]=eK(lX),[lQ,lJ]=lY(lX),l0=p.forwardRef((e,t)=>{let{__scopeScrollArea:r,type:n="hover",dir:s,scrollHideDelay:a=600,...o}=e,[l,i]=p.useState(null),[c,d]=p.useState(null),[u,m]=p.useState(null),[h,x]=p.useState(null),[g,v]=p.useState(null),[b,y]=p.useState(0),[w,j]=p.useState(0),[N,k]=p.useState(!1),[C,S]=p.useState(!1),E=R(t,e=>i(e)),P=e1(s);return(0,f.jsx)(lQ,{scope:r,type:n,dir:P,scrollHideDelay:a,scrollArea:l,viewport:c,onViewportChange:d,content:u,onContentChange:m,scrollbarX:h,onScrollbarXChange:x,scrollbarXEnabled:N,onScrollbarXEnabledChange:k,scrollbarY:g,onScrollbarYChange:v,scrollbarYEnabled:C,onScrollbarYEnabledChange:S,onCornerWidthChange:y,onCornerHeightChange:j,children:(0,f.jsx)(eZ.div,{dir:P,...o,ref:E,style:{position:"relative","--radix-scroll-area-corner-width":b+"px","--radix-scroll-area-corner-height":w+"px",...e.style}})})});l0.displayName=lX;var l1="ScrollAreaViewport",l2=p.forwardRef((e,t)=>{let{__scopeScrollArea:r,children:n,nonce:s,...a}=e,o=lJ(l1,r),l=R(t,p.useRef(null),o.onViewportChange);return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),(0,f.jsx)(eZ.div,{"data-radix-scroll-area-viewport":"",...a,ref:l,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...e.style},children:(0,f.jsx)("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});l2.displayName=l1;var l4="ScrollAreaScrollbar",l3=p.forwardRef((e,t)=>{let{forceMount:r,...n}=e,s=lJ(l4,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:o}=s,l="horizontal"===e.orientation;return p.useEffect(()=>(l?a(!0):o(!0),()=>{l?a(!1):o(!1)}),[l,a,o]),"hover"===s.type?(0,f.jsx)(l5,{...n,ref:t,forceMount:r}):"scroll"===s.type?(0,f.jsx)(l6,{...n,ref:t,forceMount:r}):"auto"===s.type?(0,f.jsx)(l8,{...n,ref:t,forceMount:r}):"always"===s.type?(0,f.jsx)(l7,{...n,ref:t}):null});l3.displayName=l4;var l5=p.forwardRef((e,t)=>{let{forceMount:r,...n}=e,s=lJ(l4,e.__scopeScrollArea),[a,o]=p.useState(!1);return p.useEffect(()=>{let e=s.scrollArea,t=0;if(e){let r=()=>{window.clearTimeout(t),o(!0)},n=()=>{t=window.setTimeout(()=>o(!1),s.scrollHideDelay)};return e.addEventListener("pointerenter",r),e.addEventListener("pointerleave",n),()=>{window.clearTimeout(t),e.removeEventListener("pointerenter",r),e.removeEventListener("pointerleave",n)}}},[s.scrollArea,s.scrollHideDelay]),(0,f.jsx)(rK,{present:r||a,children:(0,f.jsx)(l8,{"data-state":a?"visible":"hidden",...n,ref:t})})}),l6=p.forwardRef((e,t)=>{var r;let{forceMount:n,...s}=e,a=lJ(l4,e.__scopeScrollArea),o="horizontal"===e.orientation,l=iv(()=>c("SCROLL_END"),100),[i,c]=(r={hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}},p.useReducer((e,t)=>r[e][t]??e,"hidden"));return p.useEffect(()=>{if("idle"===i){let e=window.setTimeout(()=>c("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(e)}},[i,a.scrollHideDelay,c]),p.useEffect(()=>{let e=a.viewport,t=o?"scrollLeft":"scrollTop";if(e){let r=e[t],n=()=>{let n=e[t];r!==n&&(c("SCROLL"),l()),r=n};return e.addEventListener("scroll",n),()=>e.removeEventListener("scroll",n)}},[a.viewport,o,c,l]),(0,f.jsx)(rK,{present:n||"hidden"!==i,children:(0,f.jsx)(l7,{"data-state":"hidden"===i?"hidden":"visible",...s,ref:t,onPointerEnter:eU(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:eU(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),l8=p.forwardRef((e,t)=>{let r=lJ(l4,e.__scopeScrollArea),{forceMount:n,...s}=e,[a,o]=p.useState(!1),l="horizontal"===e.orientation,i=iv(()=>{if(r.viewport){let e=r.viewport.offsetWidth<r.viewport.scrollWidth,t=r.viewport.offsetHeight<r.viewport.scrollHeight;o(l?e:t)}},10);return ib(r.viewport,i),ib(r.content,i),(0,f.jsx)(rK,{present:n||a,children:(0,f.jsx)(l7,{"data-state":a?"visible":"hidden",...s,ref:t})})}),l7=p.forwardRef((e,t)=>{let{orientation:r="vertical",...n}=e,s=lJ(l4,e.__scopeScrollArea),a=p.useRef(null),o=p.useRef(0),[l,i]=p.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=im(l.viewport,l.content),d={...n,sizes:l,onSizesChange:i,hasThumb:!!(c>0&&c<1),onThumbChange:e=>a.current=e,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:e=>o.current=e};function u(e,t){return function(e,t,r,n="ltr"){let s=ip(r),a=t||s/2,o=r.scrollbar.paddingStart+a,l=r.scrollbar.size-r.scrollbar.paddingEnd-(s-a),i=r.content-r.viewport;return ix([o,l],"ltr"===n?[0,i]:[-1*i,0])(e)}(e,o.current,l,t)}return"horizontal"===r?(0,f.jsx)(l9,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&a.current){let e=ih(s.viewport.scrollLeft,l,s.dir);a.current.style.transform=`translate3d(${e}px, 0, 0)`}},onWheelScroll:e=>{s.viewport&&(s.viewport.scrollLeft=e)},onDragScroll:e=>{s.viewport&&(s.viewport.scrollLeft=u(e,s.dir))}}):"vertical"===r?(0,f.jsx)(ie,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&a.current){let e=ih(s.viewport.scrollTop,l);a.current.style.transform=`translate3d(0, ${e}px, 0)`}},onWheelScroll:e=>{s.viewport&&(s.viewport.scrollTop=e)},onDragScroll:e=>{s.viewport&&(s.viewport.scrollTop=u(e))}}):null}),l9=p.forwardRef((e,t)=>{let{sizes:r,onSizesChange:n,...s}=e,a=lJ(l4,e.__scopeScrollArea),[o,l]=p.useState(),i=p.useRef(null),c=R(t,i,a.onScrollbarXChange);return p.useEffect(()=>{i.current&&l(getComputedStyle(i.current))},[i]),(0,f.jsx)(is,{"data-orientation":"horizontal",...s,ref:c,sizes:r,style:{bottom:0,left:"rtl"===a.dir?"var(--radix-scroll-area-corner-width)":0,right:"ltr"===a.dir?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":ip(r)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,r)=>{if(a.viewport){var n,s;let o=a.viewport.scrollLeft+t.deltaX;e.onWheelScroll(o),n=o,s=r,n>0&&n<s&&t.preventDefault()}},onResize:()=>{i.current&&a.viewport&&o&&n({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:i.current.clientWidth,paddingStart:iu(o.paddingLeft),paddingEnd:iu(o.paddingRight)}})}})}),ie=p.forwardRef((e,t)=>{let{sizes:r,onSizesChange:n,...s}=e,a=lJ(l4,e.__scopeScrollArea),[o,l]=p.useState(),i=p.useRef(null),c=R(t,i,a.onScrollbarYChange);return p.useEffect(()=>{i.current&&l(getComputedStyle(i.current))},[i]),(0,f.jsx)(is,{"data-orientation":"vertical",...s,ref:c,sizes:r,style:{top:0,right:"ltr"===a.dir?0:void 0,left:"rtl"===a.dir?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":ip(r)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,r)=>{if(a.viewport){var n,s;let o=a.viewport.scrollTop+t.deltaY;e.onWheelScroll(o),n=o,s=r,n>0&&n<s&&t.preventDefault()}},onResize:()=>{i.current&&a.viewport&&o&&n({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:i.current.clientHeight,paddingStart:iu(o.paddingTop),paddingEnd:iu(o.paddingBottom)}})}})}),[it,ir]=lY(l4),is=p.forwardRef((e,t)=>{let{__scopeScrollArea:r,sizes:n,hasThumb:s,onThumbChange:a,onThumbPointerUp:o,onThumbPointerDown:l,onThumbPositionChange:i,onDragScroll:c,onWheelScroll:d,onResize:u,...m}=e,h=lJ(l4,r),[x,g]=p.useState(null),v=R(t,e=>g(e)),b=p.useRef(null),y=p.useRef(""),w=h.viewport,j=n.content-n.viewport,N=eG(d),k=eG(i),C=iv(u,10);function S(e){b.current&&c({x:e.clientX-b.current.left,y:e.clientY-b.current.top})}return p.useEffect(()=>{let e=e=>{let t=e.target;x?.contains(t)&&N(e,j)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})},[w,x,j,N]),p.useEffect(k,[n,k]),ib(x,C),ib(h.content,C),(0,f.jsx)(it,{scope:r,scrollbar:x,hasThumb:s,onThumbChange:eG(a),onThumbPointerUp:eG(o),onThumbPositionChange:k,onThumbPointerDown:eG(l),children:(0,f.jsx)(eZ.div,{...m,ref:v,style:{position:"absolute",...m.style},onPointerDown:eU(e.onPointerDown,e=>{0===e.button&&(e.target.setPointerCapture(e.pointerId),b.current=x.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",h.viewport&&(h.viewport.style.scrollBehavior="auto"),S(e))}),onPointerMove:eU(e.onPointerMove,S),onPointerUp:eU(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=y.current,h.viewport&&(h.viewport.style.scrollBehavior=""),b.current=null})})})}),ia="ScrollAreaThumb",io=p.forwardRef((e,t)=>{let{forceMount:r,...n}=e,s=ir(ia,e.__scopeScrollArea);return(0,f.jsx)(rK,{present:r||s.hasThumb,children:(0,f.jsx)(il,{ref:t,...n})})}),il=p.forwardRef((e,t)=>{let{__scopeScrollArea:r,style:n,...s}=e,a=lJ(ia,r),o=ir(ia,r),{onThumbPositionChange:l}=o,i=R(t,e=>o.onThumbChange(e)),c=p.useRef(void 0),d=iv(()=>{c.current&&(c.current(),c.current=void 0)},100);return p.useEffect(()=>{let e=a.viewport;if(e){let t=()=>{d(),c.current||(c.current=ig(e,l),l())};return l(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}},[a.viewport,d,l]),(0,f.jsx)(eZ.div,{"data-state":o.hasThumb?"visible":"hidden",...s,ref:i,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:eU(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),r=e.clientX-t.left,n=e.clientY-t.top;o.onThumbPointerDown({x:r,y:n})}),onPointerUp:eU(e.onPointerUp,o.onThumbPointerUp)})});io.displayName=ia;var ii="ScrollAreaCorner",ic=p.forwardRef((e,t)=>{let r=lJ(ii,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return"scroll"!==r.type&&n?(0,f.jsx)(id,{...e,ref:t}):null});ic.displayName=ii;var id=p.forwardRef((e,t)=>{let{__scopeScrollArea:r,...n}=e,s=lJ(ii,r),[a,o]=p.useState(0),[l,i]=p.useState(0),c=!!(a&&l);return ib(s.scrollbarX,()=>{let e=s.scrollbarX?.offsetHeight||0;s.onCornerHeightChange(e),i(e)}),ib(s.scrollbarY,()=>{let e=s.scrollbarY?.offsetWidth||0;s.onCornerWidthChange(e),o(e)}),c?(0,f.jsx)(eZ.div,{...n,ref:t,style:{width:a,height:l,position:"absolute",right:"ltr"===s.dir?0:void 0,left:"rtl"===s.dir?0:void 0,bottom:0,...e.style}}):null});function iu(e){return e?parseInt(e,10):0}function im(e,t){let r=e/t;return isNaN(r)?0:r}function ip(e){let t=im(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd;return Math.max((e.scrollbar.size-r)*t,18)}function ih(e,t,r="ltr"){let n=ip(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-s,o=t.content-t.viewport,l=oH(e,"ltr"===r?[0,o]:[-1*o,0]);return ix([0,o],[0,a-n])(l)}function ix(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}var ig=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return!function s(){let a={left:e.scrollLeft,top:e.scrollTop},o=r.left!==a.left,l=r.top!==a.top;(o||l)&&t(),r=a,n=window.requestAnimationFrame(s)}(),()=>window.cancelAnimationFrame(n)};function iv(e,t){let r=eG(e),n=p.useRef(0);return p.useEffect(()=>()=>window.clearTimeout(n.current),[]),p.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function ib(e,t){let r=eG(t);tc(()=>{let t=0;if(e){let n=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(r)});return n.observe(e),()=>{window.cancelAnimationFrame(t),n.unobserve(e)}}},[e,r])}function iy({className:e,children:t,...r}){return(0,f.jsxs)(l0,{"data-slot":"scroll-area",className:eW("relative",e),...r,children:[(0,f.jsx)(l2,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:t}),(0,f.jsx)(iw,{}),(0,f.jsx)(ic,{})]})}function iw({className:e,orientation:t="vertical",...r}){return(0,f.jsx)(l3,{"data-slot":"scroll-area-scrollbar",orientation:t,className:eW("flex touch-none p-px transition-colors select-none","vertical"===t&&"h-full w-2.5 border-l border-l-transparent","horizontal"===t&&"h-2.5 flex-col border-t border-t-transparent",e),...r,children:(0,f.jsx)(io,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}var ij="Dialog",[iN,ik]=eK(ij),[iC,iS]=iN(ij),iE=e=>{let{__scopeDialog:t,children:r,open:n,defaultOpen:s,onOpenChange:a,modal:o=!0}=e,l=p.useRef(null),i=p.useRef(null),[c=!1,d]=eX({prop:n,defaultProp:s,onChange:a});return(0,f.jsx)(iC,{scope:t,triggerRef:l,contentRef:i,contentId:tm(),titleId:tm(),descriptionId:tm(),open:c,onOpenChange:d,onOpenToggle:p.useCallback(()=>d(e=>!e),[d]),modal:o,children:r})};iE.displayName=ij;var iR="DialogTrigger";p.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,s=iS(iR,r),a=R(t,s.triggerRef);return(0,f.jsx)(eZ.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":iU(s.open),...n,ref:a,onClick:eU(e.onClick,s.onOpenToggle)})}).displayName=iR;var iP="DialogPortal",[iM,iT]=iN(iP,{forceMount:void 0}),iL=e=>{let{__scopeDialog:t,forceMount:r,children:n,container:s}=e,a=iS(iP,t);return(0,f.jsx)(iM,{scope:t,forceMount:r,children:p.Children.map(n,e=>(0,f.jsx)(rK,{present:r||a.open,children:(0,f.jsx)(rU,{asChild:!0,container:s,children:e})}))})};iL.displayName=iP;var iD="DialogOverlay",iA=p.forwardRef((e,t)=>{let r=iT(iD,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,a=iS(iD,e.__scopeDialog);return a.modal?(0,f.jsx)(rK,{present:n||a.open,children:(0,f.jsx)(i_,{...s,ref:t})}):null});iA.displayName=iD;var i_=p.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,s=iS(iD,r);return(0,f.jsx)(nU,{as:P,allowPinchZoom:!0,shards:[s.contentRef],children:(0,f.jsx)(eZ.div,{"data-state":iU(s.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),iO="DialogContent",iz=p.forwardRef((e,t)=>{let r=iT(iO,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,a=iS(iO,e.__scopeDialog);return(0,f.jsx)(rK,{present:n||a.open,children:a.modal?(0,f.jsx)(iI,{...s,ref:t}):(0,f.jsx)(iF,{...s,ref:t})})});iz.displayName=iO;var iI=p.forwardRef((e,t)=>{let r=iS(iO,e.__scopeDialog),n=p.useRef(null),s=R(t,r.contentRef,n);return p.useEffect(()=>{let e=n.current;if(e)return nl(e)},[]),(0,f.jsx)(i$,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:eU(e.onCloseAutoFocus,e=>{e.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:eU(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;(2===t.button||r)&&e.preventDefault()}),onFocusOutside:eU(e.onFocusOutside,e=>e.preventDefault())})}),iF=p.forwardRef((e,t)=>{let r=iS(iO,e.__scopeDialog),n=p.useRef(!1),s=p.useRef(!1);return(0,f.jsx)(i$,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(n.current||r.triggerRef.current?.focus(),t.preventDefault()),n.current=!1,s.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(n.current=!0,"pointerdown"===t.detail.originalEvent.type&&(s.current=!0));let a=t.target;r.triggerRef.current?.contains(a)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&s.current&&t.preventDefault()}})}),i$=p.forwardRef((e,t)=>{let{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:a,...o}=e,l=iS(iO,r),i=p.useRef(null),c=R(t,i);return e7(),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(tn,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:a,children:(0,f.jsx)(e3,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":iU(l.open),...o,ref:c,onDismiss:()=>l.onOpenChange(!1)})}),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(iY,{titleId:l.titleId}),(0,f.jsx)(iZ,{contentRef:i,descriptionId:l.descriptionId})]})]})}),iB="DialogTitle",iW=p.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,s=iS(iB,r);return(0,f.jsx)(eZ.h2,{id:s.titleId,...n,ref:t})});iW.displayName=iB;var iH="DialogDescription";p.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,s=iS(iH,r);return(0,f.jsx)(eZ.p,{id:s.descriptionId,...n,ref:t})}).displayName=iH;var iV="DialogClose",iq=p.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,s=iS(iV,r);return(0,f.jsx)(eZ.button,{type:"button",...n,ref:t,onClick:eU(e.onClick,()=>s.onOpenChange(!1))})});function iU(e){return e?"open":"closed"}iq.displayName=iV;var iK="DialogTitleWarning",[iG,iX]=(d={contentName:iO,titleName:iB,docsSlug:"dialog"},t=p.createContext(d),(r=e=>{let{children:r,...n}=e,s=p.useMemo(()=>n,Object.values(n));return(0,f.jsx)(t.Provider,{value:s,children:r})}).displayName=iK+"Provider",[r,function(e){let r=p.useContext(t);if(r)return r;if(void 0!==d)return d;throw Error(`\`${e}\` must be used within \`${iK}\``)}]),iY=({titleId:e})=>{let t=iX(iK),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
9
+
10
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
11
+
12
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return p.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},iZ=({contentRef:e,descriptionId:t})=>{let r=iX("DialogDescriptionWarning"),n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${r.contentName}}.`;return p.useEffect(()=>{let r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null};function iQ({...e}){return(0,f.jsx)(iE,{"data-slot":"sheet",...e})}function iJ({...e}){return(0,f.jsx)(iL,{"data-slot":"sheet-portal",...e})}function i0({className:e,...t}){return(0,f.jsx)(iA,{"data-slot":"sheet-overlay",className:eW("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",e),...t})}function i1({className:e,children:t,side:r="right",...n}){return(0,f.jsxs)(iJ,{children:[(0,f.jsx)(i0,{}),(0,f.jsxs)(iz,{"data-slot":"sheet-content",className:eW("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","right"===r&&"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","left"===r&&"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","top"===r&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b","bottom"===r&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",e),...n,children:[t,(0,f.jsxs)(iq,{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:[(0,f.jsx)(C,{className:"size-4"}),(0,f.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function i2({className:e,...t}){return(0,f.jsx)("div",{"data-slot":"sheet-header",className:eW("flex flex-col gap-1.5 p-4",e),...t})}function i4({className:e,...t}){return(0,f.jsx)(iW,{"data-slot":"sheet-title",className:eW("text-foreground font-semibold",e),...t})}let i3=b("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]),i5=b("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]),i6=b("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),i8=b("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]),i7=b("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]),i9={chat:"bg-info/20 text-info border-info/30",completion:"bg-primary/20 text-primary border-primary/30",embedding:"bg-chart-3/20 text-chart-3 border-chart-3/30",function:"bg-chart-4/20 text-chart-4 border-chart-4/30",agent:"bg-warning/20 text-warning border-warning/30",image:"bg-chart-3/20 text-chart-3 border-chart-3/30",audio:"bg-chart-4/20 text-chart-4 border-chart-4/30"},ce={system:"bg-info/20 text-info border-info/30",user:"bg-primary/20 text-primary border-primary/30",assistant:"bg-chart-3/20 text-chart-3 border-chart-3/30",function:"bg-chart-4/20 text-chart-4 border-chart-4/30"};function ct(){let e,{calls:t,prompts:r,summary:n,isLoading:s,error:a,source:o,refresh:l,scan:i}=a8({autoFetch:!0}),[c,d]=(0,p.useState)(""),[u,m]=(0,p.useState)(null),[h,x]=(0,p.useState)(null),[g,v]=(0,p.useState)(new Set),[b,N]=(0,p.useState)(null),[k,S]=(0,p.useState)("all"),[E,R]=(0,p.useState)("all"),[P,M]=(0,p.useState)("calls"),[T,L]=(0,p.useState)(null),[D,A]=(0,p.useState)(new Set),[_,O]=(0,p.useState)(new Set),[z,I]=(0,p.useState)(null),F=e=>{I(e),M("prompts");let t=r.find(t=>t.file===e);t&&x(t)},$=t.filter(e=>{let t=e.name.toLowerCase().includes(c.toLowerCase())||e.model.toLowerCase().includes(c.toLowerCase())||e.file.toLowerCase().includes(c.toLowerCase()),r="all"===k||e.category===k,n="all"===E||e.provider===E;return t&&r&&n}),B=r.filter(e=>{let t=e.name.toLowerCase().includes(c.toLowerCase())||e.content.toLowerCase().includes(c.toLowerCase())||e.file.toLowerCase().includes(c.toLowerCase()),r=!z||e.file===z;return t&&r}),W=(e,t)=>{navigator.clipboard.writeText(e),N(t),setTimeout(()=>N(null),2e3)},H=[...new Set(t.map(e=>e.provider))],V=[...new Set(t.map(e=>e.category))],q=new Set(t.map(e=>e.file)).size,U=(0,p.useMemo)(()=>{let e=[];for(let r of t)"unknown"===r.provider&&e.push({type:"unknown-provider",message:`${r.name}: unknown provider`,id:r.id,tab:"calls"}),"unknown"===r.model&&e.push({type:"unknown-model",message:`${r.name}: unknown model`,id:r.id,tab:"calls"}),r.promptTemplate||r.systemPrompt||e.push({type:"no-prompt",message:`${r.name}: no visible prompt`,id:r.id,tab:"calls"});for(let t of r)0===t.usedBy.length&&e.push({type:"orphan",message:`${t.name}: defined but never called`,id:t.id,tab:"prompts"});return e},[t,r]),K=(0,p.useMemo)(()=>{let e={};for(let t of U)e[t.type]=(e[t.type]||0)+1;return e},[U]),G=(0,p.useMemo)(()=>{let e=[];return K["unknown-provider"]&&e.push(`${K["unknown-provider"]} unknown provider${K["unknown-provider"]>1?"s":""}`),K["unknown-model"]&&e.push(`${K["unknown-model"]} unknown model${K["unknown-model"]>1?"s":""}`),K["no-prompt"]&&e.push(`${K["no-prompt"]} call${K["no-prompt"]>1?"s":""} without prompt`),K.orphan&&e.push(`${K.orphan} orphan prompt${K.orphan>1?"s":""}`),e.join(", ")},[K]),X=(0,p.useMemo)(()=>{let e={};for(let r of t)e[r.provider]||(e[r.provider]={}),e[r.provider][r.model]||(e[r.provider][r.model]=[]),e[r.provider][r.model].push(r);return e},[t]),Y=(0,p.useMemo)(()=>{let e={};for(let t in X){let r=X[t],n=Object.keys(r).length,s=Object.values(r).flat().length;e[t]={modelCount:n,callSiteCount:s}}return e},[X]),Z=(0,p.useMemo)(()=>{let e={};for(let t in X)for(let r in X[t])e[`${t}:${r}`]=X[t][r].length;return e},[X]),Q=e=>{L(e)},J=()=>{L(null)},ee=(e,t)=>{"calls"===e?(m(t),M("calls")):(x(t),M("prompts")),J()};return(0,f.jsxs)("div",{className:"flex flex-col gap-6",children:["mock"===o&&(0,f.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-info/30 bg-info/10 p-3",children:[(0,f.jsx)(aQ,{className:"h-4 w-4 text-info"}),(0,f.jsxs)("p",{className:"text-sm text-info",children:["Showing demo data. Run ",(0,f.jsx)("code",{className:"rounded bg-info/20 px-1",children:"navgator scan --prompts"})," to scan your project."]}),(0,f.jsxs)(eV,{variant:"outline",size:"sm",className:"ml-auto",onClick:()=>i(),disabled:s,children:[s?(0,f.jsx)(aZ,{className:"h-4 w-4 animate-spin"}):(0,f.jsx)(w,{className:"h-4 w-4"}),(0,f.jsx)("span",{className:"ml-2",children:"Scan Now"})]})]}),a&&(0,f.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-destructive/30 bg-destructive/10 p-3",children:[(0,f.jsx)(aX,{className:"h-4 w-4 text-destructive"}),(0,f.jsx)("p",{className:"text-sm text-destructive",children:a})]}),(0,f.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,f.jsx)(aJ,{className:"border-border bg-card cursor-pointer transition-colors hover:bg-secondary/50",onClick:()=>Q("calls"),children:(0,f.jsx)(a4,{className:"p-4",children:(0,f.jsxs)("div",{className:"flex items-center gap-3",children:[(0,f.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-lg bg-primary/10",children:s?(0,f.jsx)(aZ,{className:"h-5 w-5 animate-spin text-primary"}):(0,f.jsx)(aB,{className:"h-5 w-5 text-primary"})}),(0,f.jsxs)("div",{children:[(0,f.jsx)("p",{className:"text-sm text-muted-foreground",children:"LLM Call Sites"}),(0,f.jsx)("p",{className:"text-2xl font-semibold text-foreground",children:t.length})]})]})})}),(0,f.jsx)(aJ,{className:"border-border bg-card cursor-pointer transition-colors hover:bg-secondary/50",onClick:()=>Q("prompts"),children:(0,f.jsx)(a4,{className:"p-4",children:(0,f.jsxs)("div",{className:"flex items-center gap-3",children:[(0,f.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-lg bg-info/10",children:(0,f.jsx)(i5,{className:"h-5 w-5 text-info"})}),(0,f.jsxs)("div",{children:[(0,f.jsx)("p",{className:"text-sm text-muted-foreground",children:"Prompts"}),(0,f.jsx)("p",{className:"text-2xl font-semibold text-foreground",children:r.length})]})]})})}),(0,f.jsx)(aJ,{className:"border-border bg-card",children:(0,f.jsx)(a4,{className:"p-4",children:(0,f.jsxs)("div",{className:"flex items-center gap-3",children:[(0,f.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-lg bg-warning/10",children:(0,f.jsx)(i7,{className:"h-5 w-5 text-warning"})}),(0,f.jsxs)("div",{children:[(0,f.jsx)("p",{className:"text-sm text-muted-foreground",children:"Providers"}),(0,f.jsx)("p",{className:"text-2xl font-semibold text-foreground",children:H.length}),(0,f.jsxs)("p",{className:"text-xs text-muted-foreground",children:[q," file",1!==q?"s":""," with AI"]})]})]})})})]}),U.length>0&&(0,f.jsxs)("div",{className:"flex items-center gap-2",children:[(0,f.jsx)(aX,{className:"h-4 w-4 text-warning"}),(0,f.jsxs)("p",{className:"text-sm text-warning",children:[U.length," item",1!==U.length?"s":""," need attention: ",G]})]}),(0,f.jsx)(iQ,{open:null!==T,onOpenChange:e=>!e&&J(),children:(0,f.jsxs)(i1,{side:"right",className:"w-[400px] sm:w-[540px]",children:[(0,f.jsx)(i2,{children:(0,f.jsxs)(i4,{children:["calls"===T&&"All LLM Call Sites","prompts"===T&&"All Prompts"]})}),(0,f.jsx)(iy,{className:"h-[calc(100vh-80px)] mt-6",children:(0,f.jsxs)("div",{className:"rounded-lg border border-border",children:["calls"===T&&t.map((e,r)=>(0,f.jsxs)("button",{type:"button",onClick:()=>ee("calls",e),className:`w-full text-left p-4 transition-colors hover:bg-secondary/50 ${r!==t.length-1?"border-b border-border":""}`,children:[(0,f.jsx)("div",{className:"font-medium text-sm",children:e.name}),(0,f.jsxs)("div",{className:"text-xs text-muted-foreground mt-1",children:[e.model," · ",e.provider]}),(0,f.jsxs)("div",{className:"font-mono text-xs text-muted-foreground mt-1",children:[e.file,":",e.line]})]},`${e.id}-sheet-${r}`)),"prompts"===T&&r.map((e,t)=>(0,f.jsxs)("button",{type:"button",onClick:()=>ee("prompts",e),className:`w-full text-left p-4 transition-colors hover:bg-secondary/50 ${t!==r.length-1?"border-b border-border":""}`,children:[(0,f.jsx)("div",{className:"font-medium text-sm",children:e.name}),(0,f.jsx)("div",{className:"text-xs text-muted-foreground mt-1",children:e.type}),(0,f.jsxs)("div",{className:"font-mono text-xs text-muted-foreground mt-1",children:[e.file,":",e.line]})]},`${e.id}-sheet-${t}`))]})})]})}),(0,f.jsxs)(oP,{value:P,onValueChange:M,className:"w-full",children:[(0,f.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,f.jsxs)(oM,{className:"bg-secondary",children:[(0,f.jsxs)(oT,{value:"calls",className:"gap-2",children:[(0,f.jsx)(i6,{className:"h-4 w-4"}),"LLM Call Sites"]}),(0,f.jsxs)(oT,{value:"prompts",className:"gap-2",children:[(0,f.jsx)(i3,{className:"h-4 w-4"}),"Prompts"]}),(0,f.jsxs)(oT,{value:"flow",className:"gap-2",children:[(0,f.jsx)(az,{className:"h-4 w-4"}),"AI Flow"]}),(0,f.jsxs)(oT,{value:"providers",className:"gap-2",children:[(0,f.jsx)(i7,{className:"h-4 w-4"}),"By Provider"]})]}),(0,f.jsxs)("div",{className:"flex items-center gap-2",children:[(0,f.jsxs)("div",{className:"relative",children:[(0,f.jsx)(y,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),(0,f.jsx)(eq,{placeholder:"Search...",value:c,onChange:e=>d(e.target.value),className:"w-64 bg-secondary pl-9"})]}),(0,f.jsx)(eV,{variant:"outline",size:"sm",onClick:()=>l(),disabled:s,title:"Refresh data",children:s?(0,f.jsx)(aZ,{className:"h-4 w-4 animate-spin"}):(0,f.jsx)(w,{className:"h-4 w-4"})})]})]}),(0,f.jsxs)(oL,{value:"calls",className:"mt-4",children:[(0,f.jsxs)("div",{className:"mb-4 flex items-center gap-3",children:[(0,f.jsx)(oo,{className:"h-4 w-4 text-muted-foreground"}),(0,f.jsxs)("div",{className:"flex gap-2",children:[(0,f.jsx)(eV,{variant:"all"===k?"default":"outline",size:"sm",onClick:()=>S("all"),children:"All Types"}),V.map(e=>(0,f.jsx)(eV,{variant:k===e?"default":"outline",size:"sm",onClick:()=>S(e),className:"capitalize",children:e},e))]}),(0,f.jsxs)("div",{className:"ml-4 flex gap-2",children:[(0,f.jsx)(eV,{variant:"all"===E?"default":"outline",size:"sm",onClick:()=>R("all"),children:"All Providers"}),H.map(e=>(0,f.jsx)(eV,{variant:E===e?"default":"outline",size:"sm",onClick:()=>R(e),className:"capitalize",children:e},e))]})]}),(0,f.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,f.jsxs)(aJ,{className:"border-border bg-card",children:[(0,f.jsx)(a0,{className:"pb-3",children:(0,f.jsxs)(a1,{className:"text-base font-medium",children:["Detected Call Sites (",$.length,")"]})}),(0,f.jsx)(a4,{className:"p-0",children:(0,f.jsx)(iy,{className:"h-[500px]",children:(0,f.jsx)("div",{className:"flex flex-col",children:$.map((e,t)=>{let r;return(0,f.jsxs)("div",{children:[(0,f.jsxs)("button",{type:"button",onClick:()=>{var t;let r;m(e),t=e.id,(r=new Set(g)).has(t)?r.delete(t):r.add(t),v(r)},className:`flex w-full items-start gap-3 border-b border-border p-4 text-left transition-colors hover:bg-secondary/50 ${u?.id===e.id?"bg-secondary":""}`,children:[(0,f.jsx)("div",{className:"mt-0.5",children:g.has(e.id)?(0,f.jsx)(j,{className:"h-4 w-4 text-muted-foreground"}):(0,f.jsx)(s5,{className:"h-4 w-4 text-muted-foreground"})}),(0,f.jsxs)("div",{className:"flex-1",children:[(0,f.jsxs)("div",{className:"flex items-center gap-2",children:[(0,f.jsx)("span",{className:"font-mono text-sm text-foreground",children:e.name}),(r=e.id,U.some(e=>e.id===r&&"calls"===e.tab)&&(0,f.jsx)(aX,{className:"h-3.5 w-3.5 text-warning"})),(0,f.jsx)(a5,{variant:"outline",className:`text-xs ${i9[e.category]}`,children:e.category})]}),(0,f.jsxs)("div",{className:"mt-1 flex items-center gap-3 text-xs text-muted-foreground",children:[(0,f.jsx)("span",{children:e.model}),(0,f.jsx)("span",{children:"·"}),(0,f.jsx)("span",{children:e.provider}),e.method&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("span",{children:"·"}),(0,f.jsx)("span",{className:"font-mono",children:e.method})]})]}),(0,f.jsxs)("span",{role:"button",tabIndex:0,onClick:t=>{t.stopPropagation(),F(e.file)},onKeyDown:t=>{"Enter"===t.key&&(t.stopPropagation(),F(e.file))},className:"mt-1 font-mono text-xs text-muted-foreground hover:text-primary hover:underline transition-colors cursor-pointer",children:[e.file,":",e.line]})]})]}),g.has(e.id)&&(0,f.jsxs)("div",{className:"border-b border-border bg-secondary/30 p-4",children:[(0,f.jsxs)("div",{className:"grid grid-cols-3 gap-4 text-sm",children:[e.method&&(0,f.jsxs)("div",{children:[(0,f.jsx)("p",{className:"text-muted-foreground",children:"SDK Method"}),(0,f.jsx)("p",{className:"font-mono text-foreground",children:e.method})]}),e.sdk&&(0,f.jsxs)("div",{children:[(0,f.jsx)("p",{className:"text-muted-foreground",children:"SDK"}),(0,f.jsx)("p",{className:"font-mono text-foreground",children:e.sdk})]}),(0,f.jsxs)("div",{children:[(0,f.jsx)("p",{className:"text-muted-foreground",children:"Confidence"}),(0,f.jsxs)("p",{className:"font-mono text-foreground",children:[(100*e.confidence).toFixed(0),"%"]})]})]}),e.configExtracted&&(0,f.jsxs)("div",{className:"mt-3 grid grid-cols-3 gap-4 text-sm",children:[void 0!==e.configExtracted.temperature&&(0,f.jsxs)("div",{children:[(0,f.jsx)("p",{className:"text-muted-foreground",children:"Temperature"}),(0,f.jsx)("p",{className:"font-mono text-foreground",children:e.configExtracted.temperature})]}),void 0!==e.configExtracted.maxTokens&&(0,f.jsxs)("div",{children:[(0,f.jsx)("p",{className:"text-muted-foreground",children:"Max Tokens"}),(0,f.jsx)("p",{className:"font-mono text-foreground",children:e.configExtracted.maxTokens})]}),void 0!==e.configExtracted.stream&&(0,f.jsxs)("div",{children:[(0,f.jsx)("p",{className:"text-muted-foreground",children:"Streaming"}),(0,f.jsx)("p",{className:"font-mono text-foreground",children:e.configExtracted.stream?"Yes":"No"})]})]}),e.promptVariables.length>0&&(0,f.jsx)("div",{className:"mt-3",children:(0,f.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Variables:"," ",e.promptVariables.map(e=>(0,f.jsx)("code",{className:"mx-1 rounded bg-secondary px-1 py-0.5",children:`{{${e}}}`},e))]})})]})]},`${e.id}-${t}`)})})})})]}),(0,f.jsxs)(aJ,{className:"border-border bg-card",children:[(0,f.jsx)(a0,{className:"pb-3",children:(0,f.jsx)(a1,{className:"text-base font-medium",children:"Call Site Details"})}),(0,f.jsx)(a4,{children:u?(0,f.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,f.jsxs)("div",{className:"flex items-center justify-between",children:[(0,f.jsxs)("div",{children:[(0,f.jsx)("h3",{className:"font-mono text-lg text-foreground",children:u.name}),(0,f.jsxs)("button",{type:"button",onClick:()=>F(u.file),className:"text-sm text-muted-foreground hover:text-primary hover:underline transition-colors text-left",children:[u.file,":",u.line]})]}),(0,f.jsx)(a5,{variant:"outline",className:i9[u.category],children:u.category})]}),(0,f.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,f.jsxs)("div",{className:"rounded-lg bg-secondary p-3",children:[(0,f.jsx)("p",{className:"text-xs text-muted-foreground",children:"Model"}),(0,f.jsx)("p",{className:"font-mono text-sm text-foreground",children:u.model}),"unknown"===u.model&&(0,f.jsx)("p",{className:"text-xs text-warning mt-1",children:"Model name not detected"})]}),(0,f.jsxs)("div",{className:"rounded-lg bg-secondary p-3",children:[(0,f.jsx)("p",{className:"text-xs text-muted-foreground",children:"Provider"}),(0,f.jsx)("p",{className:"font-mono text-sm capitalize text-foreground",children:u.provider}),"unknown"===u.provider&&(0,f.jsx)("p",{className:"text-xs text-warning mt-1",children:"Provider could not be identified from code patterns"})]})]}),(u.method||u.sdk)&&(0,f.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[u.method&&(0,f.jsxs)("div",{className:"rounded-lg bg-secondary p-3",children:[(0,f.jsx)("p",{className:"text-xs text-muted-foreground",children:"SDK Method"}),(0,f.jsx)("p",{className:"font-mono text-sm text-foreground",children:u.method})]}),u.sdk&&(0,f.jsxs)("div",{className:"rounded-lg bg-secondary p-3",children:[(0,f.jsx)("p",{className:"text-xs text-muted-foreground",children:"SDK Package"}),(0,f.jsx)("p",{className:"font-mono text-sm text-foreground",children:u.sdk})]})]}),(0,f.jsxs)("div",{className:"rounded-lg bg-secondary p-3",children:[(0,f.jsx)("p",{className:"text-xs text-muted-foreground",children:"Confidence"}),(0,f.jsxs)("p",{className:"font-mono text-sm text-foreground",children:[(100*u.confidence).toFixed(0),"%"]})]}),u.systemPrompt&&(0,f.jsxs)("div",{children:[(0,f.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[(0,f.jsx)("p",{className:"text-sm font-medium text-foreground",children:"System Prompt"}),(0,f.jsx)(eV,{variant:"ghost",size:"sm",onClick:()=>W(u.systemPrompt||"",`sys-${u.id}`),children:b===`sys-${u.id}`?(0,f.jsx)(s3,{className:"h-4 w-4 text-primary"}):(0,f.jsx)(oF,{className:"h-4 w-4"})})]}),(0,f.jsx)("pre",{className:"rounded-lg bg-secondary p-3 font-mono text-xs text-muted-foreground",children:u.systemPrompt})]}),(0,f.jsxs)("div",{children:[(0,f.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[(0,f.jsx)("p",{className:"text-sm font-medium text-foreground",children:"Prompt Template"}),(0,f.jsx)(eV,{variant:"ghost",size:"sm",onClick:()=>W(u.promptTemplate,`tpl-${u.id}`),children:b===`tpl-${u.id}`?(0,f.jsx)(s3,{className:"h-4 w-4 text-primary"}):(0,f.jsx)(oF,{className:"h-4 w-4"})})]}),(0,f.jsx)("pre",{className:"rounded-lg bg-secondary p-3 font-mono text-xs text-muted-foreground",children:u.promptTemplate})]})]}):(0,f.jsx)("div",{className:"flex h-[400px] items-center justify-center text-muted-foreground",children:(0,f.jsx)("p",{children:"Select an LLM call to view details"})})})]})]})]}),(0,f.jsxs)(oL,{value:"prompts",className:"mt-4",children:[z&&(0,f.jsxs)("div",{className:"mb-3 flex items-center gap-2",children:[(0,f.jsx)("span",{className:"text-xs text-muted-foreground",children:"Filtered by file:"}),(0,f.jsxs)("button",{type:"button",onClick:()=>{I(null),x(null)},className:"inline-flex items-center gap-1.5 rounded-md bg-secondary px-2.5 py-1 text-xs font-mono text-foreground hover:bg-secondary/80 transition-colors",children:[z.split("/").pop(),(0,f.jsx)(C,{className:"h-3 w-3 text-muted-foreground"})]})]}),(0,f.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,f.jsxs)(aJ,{className:"border-border bg-card",children:[(0,f.jsx)(a0,{className:"pb-3",children:(0,f.jsxs)(a1,{className:"text-base font-medium",children:["Prompt Library (",B.length,")"]})}),(0,f.jsx)(a4,{className:"p-0",children:(0,f.jsx)(iy,{className:"h-[500px]",children:(0,f.jsx)("div",{className:"flex flex-col",children:B.map((e,r)=>{let n,s=t.find(t=>t.promptTemplate?.includes(e.name)||t.systemPrompt?.includes(e.name)||e.usedBy.includes(t.name));return(0,f.jsx)("button",{type:"button",onClick:()=>x(e),className:`flex w-full items-start gap-3 border-b border-border p-4 text-left transition-colors hover:bg-secondary/50 ${h?.id===e.id?"bg-secondary":""}`,children:(0,f.jsxs)("div",{className:"flex-1",children:[(0,f.jsxs)("div",{className:"flex items-center gap-2",children:[(0,f.jsx)("span",{className:"font-mono text-sm text-foreground",children:e.name}),(n=e.id,U.some(e=>e.id===n&&"prompts"===e.tab)&&(0,f.jsx)(aX,{className:"h-3.5 w-3.5 text-warning"})),(0,f.jsx)(a5,{variant:"outline",className:`text-xs ${ce[e.type]}`,children:e.type}),s&&(0,f.jsxs)("span",{className:"text-xs text-muted-foreground",children:[s.provider," · ",s.model]})]}),(0,f.jsx)("p",{className:"mt-1 line-clamp-2 text-xs text-muted-foreground",children:e.content}),(0,f.jsxs)("div",{className:"mt-2 flex items-center gap-3 text-xs text-muted-foreground",children:[(0,f.jsxs)("span",{children:[e.tokenCount," tokens"]}),(0,f.jsx)("span",{children:"·"}),(0,f.jsxs)("span",{children:["v",e.version]}),(0,f.jsx)("span",{children:"·"}),(0,f.jsx)("span",{children:e.lastModified})]})]})},`${e.id}-${r}`)})})})})]}),(0,f.jsxs)(aJ,{className:"border-border bg-card",children:[(0,f.jsx)(a0,{className:"pb-3",children:(0,f.jsx)(a1,{className:"text-base font-medium",children:"Prompt Details"})}),(0,f.jsx)(a4,{children:h?(0,f.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,f.jsxs)("div",{className:"flex items-center justify-between",children:[(0,f.jsxs)("div",{children:[(0,f.jsx)("h3",{className:"font-mono text-lg text-foreground",children:h.name}),(0,f.jsxs)("button",{type:"button",onClick:()=>F(h.file),className:"text-sm text-muted-foreground hover:text-primary hover:underline transition-colors text-left",children:[h.file,":",h.line]})]}),(0,f.jsxs)("div",{className:"flex items-center gap-2",children:[(0,f.jsxs)(a5,{variant:"outline",className:"text-xs",children:["v",h.version]}),(0,f.jsx)(a5,{variant:"outline",className:ce[h.type],children:h.type})]})]}),(e=t.find(e=>e.promptTemplate?.includes(h.name)||e.systemPrompt?.includes(h.name)||h.usedBy.includes(e.name)))?(0,f.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,f.jsxs)("div",{className:"rounded-lg bg-secondary p-3",children:[(0,f.jsx)("p",{className:"text-xs text-muted-foreground",children:"Provider"}),(0,f.jsx)("button",{type:"button",onClick:()=>{M("providers"),A(new Set([e.provider]))},className:`font-mono text-sm text-foreground hover:text-primary transition-colors ${"unknown"===e.provider?"text-warning":""}`,children:e.provider})]}),(0,f.jsxs)("div",{className:"rounded-lg bg-secondary p-3",children:[(0,f.jsx)("p",{className:"text-xs text-muted-foreground",children:"Model"}),(0,f.jsx)("p",{className:"font-mono text-sm text-foreground",children:e.model})]})]}):null,(0,f.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,f.jsxs)("div",{className:"rounded-lg bg-secondary p-3",children:[(0,f.jsx)("p",{className:"text-xs text-muted-foreground",children:"Token Count"}),(0,f.jsx)("p",{className:"font-mono text-sm text-foreground",children:h.tokenCount})]}),(0,f.jsxs)("div",{className:"rounded-lg bg-secondary p-3",children:[(0,f.jsx)("p",{className:"text-xs text-muted-foreground",children:"Last Modified"}),(0,f.jsx)("p",{className:"font-mono text-sm text-foreground",children:h.lastModified})]})]}),(0,f.jsxs)("div",{children:[(0,f.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[(0,f.jsx)("p",{className:"text-sm font-medium text-foreground",children:"Content"}),(0,f.jsx)(eV,{variant:"ghost",size:"sm",onClick:()=>W(h.content,`content-${h.id}`),children:b===`content-${h.id}`?(0,f.jsx)(s3,{className:"h-4 w-4 text-primary"}):(0,f.jsx)(oF,{className:"h-4 w-4"})})]}),(0,f.jsx)("pre",{className:"max-h-[200px] overflow-auto rounded-lg bg-secondary p-3 font-mono text-xs text-muted-foreground",children:h.content})]}),h.variables.length>0&&(0,f.jsxs)("div",{children:[(0,f.jsx)("p",{className:"mb-2 text-sm font-medium text-foreground",children:"Variables"}),(0,f.jsx)("div",{className:"flex flex-wrap gap-2",children:h.variables.map(e=>(0,f.jsx)("code",{className:"rounded bg-secondary px-2 py-1 font-mono text-xs text-muted-foreground",children:`{{${e}}}`},e))})]}),(0,f.jsxs)("div",{children:[(0,f.jsx)("p",{className:"mb-2 text-sm font-medium text-foreground",children:"Used By"}),(0,f.jsx)("div",{className:"flex flex-wrap gap-2",children:h.usedBy.length>0?h.usedBy.map(e=>(0,f.jsxs)(a5,{variant:"outline",className:"font-mono",children:[e,"()"]},e)):(0,f.jsx)("p",{className:"text-xs text-warning",children:"Not used by any detected calls"})})]})]}):(0,f.jsx)("div",{className:"flex h-[400px] items-center justify-center text-muted-foreground",children:(0,f.jsx)("p",{children:"Select a prompt to view details"})})})]})]})]}),(0,f.jsx)(oL,{value:"flow",className:"mt-4",children:(0,f.jsx)(cr,{prompts:r,calls:t,onFileClick:F})}),(0,f.jsx)(oL,{value:"providers",className:"mt-4",children:(0,f.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,f.jsxs)(aJ,{className:"border-border bg-card",children:[(0,f.jsx)(a0,{className:"pb-3",children:(0,f.jsxs)(a1,{className:"text-base font-medium",children:["By Provider (",Object.keys(X).length,")"]})}),(0,f.jsx)(a4,{className:"p-0",children:(0,f.jsx)(iy,{className:"h-[500px]",children:(0,f.jsx)("div",{className:"flex flex-col",children:Object.entries(X).map(([e,t],r)=>(0,f.jsxs)("div",{children:[(0,f.jsxs)("button",{type:"button",onClick:()=>{let t;(t=new Set(D)).has(e)?t.delete(e):t.add(e),A(t)},className:"flex w-full items-start gap-3 border-b border-border p-4 text-left transition-colors hover:bg-secondary/50",children:[(0,f.jsx)("div",{className:"mt-0.5",children:D.has(e)?(0,f.jsx)(j,{className:"h-4 w-4 text-muted-foreground"}):(0,f.jsx)(s5,{className:"h-4 w-4 text-muted-foreground"})}),(0,f.jsxs)("div",{className:"flex-1",children:[(0,f.jsx)("div",{className:"flex items-center gap-2",children:(0,f.jsx)("span",{className:`font-medium text-sm ${"unknown"===e?"text-warning":"text-foreground"}`,children:e})}),(0,f.jsxs)("div",{className:"mt-1 text-xs text-muted-foreground",children:[Y[e].modelCount," model",1!==Y[e].modelCount?"s":""," · ",Y[e].callSiteCount," call site",1!==Y[e].callSiteCount?"s":""]})]})]}),D.has(e)&&(0,f.jsx)("div",{className:"border-b border-border bg-secondary/30",children:Object.entries(t).map(([t,r])=>{let n=`${e}:${t}`;return(0,f.jsxs)("div",{children:[(0,f.jsxs)("button",{type:"button",onClick:()=>{let e;(e=new Set(_)).has(n)?e.delete(n):e.add(n),O(e)},className:"flex w-full items-start gap-3 border-b border-border p-4 pl-12 text-left transition-colors hover:bg-secondary/50",children:[(0,f.jsx)("div",{className:"mt-0.5",children:_.has(n)?(0,f.jsx)(j,{className:"h-4 w-4 text-muted-foreground"}):(0,f.jsx)(s5,{className:"h-4 w-4 text-muted-foreground"})}),(0,f.jsxs)("div",{className:"flex-1",children:[(0,f.jsx)("div",{className:"flex items-center gap-2",children:(0,f.jsx)("span",{className:"font-mono text-sm text-foreground",children:t})}),(0,f.jsxs)("div",{className:"mt-1 text-xs text-muted-foreground",children:[Z[n]," call site",1!==Z[n]?"s":""]})]})]}),_.has(n)&&(0,f.jsx)("div",{className:"border-b border-border bg-secondary/50",children:r.map((e,t)=>(0,f.jsx)("button",{type:"button",onClick:()=>{m(e)},className:`flex w-full items-start gap-3 border-b border-border p-4 pl-20 text-left transition-colors hover:bg-secondary/70 ${u?.id===e.id?"bg-secondary":""}`,children:(0,f.jsxs)("div",{className:"flex-1",children:[(0,f.jsx)("div",{className:"flex items-center gap-2",children:(0,f.jsx)("span",{className:"font-mono text-sm text-foreground",children:e.name})}),(0,f.jsxs)("p",{className:"mt-1 font-mono text-xs text-muted-foreground",children:[e.file,":",e.line]})]})},`${e.id}-prov-${t}`))})]},n)})})]},e))})})})]}),(0,f.jsxs)(aJ,{className:"border-border bg-card",children:[(0,f.jsx)(a0,{className:"pb-3",children:(0,f.jsx)(a1,{className:"text-base font-medium",children:"Call Site Details"})}),(0,f.jsx)(a4,{children:u?(0,f.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,f.jsxs)("div",{className:"flex items-center justify-between",children:[(0,f.jsxs)("div",{children:[(0,f.jsx)("h3",{className:"font-mono text-lg text-foreground",children:u.name}),(0,f.jsxs)("button",{type:"button",onClick:()=>F(u.file),className:"text-sm text-muted-foreground hover:text-primary hover:underline transition-colors text-left",children:[u.file,":",u.line]})]}),(0,f.jsx)(a5,{variant:"outline",className:i9[u.category],children:u.category})]}),(0,f.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,f.jsxs)("div",{className:"rounded-lg bg-secondary p-3",children:[(0,f.jsx)("p",{className:"text-xs text-muted-foreground",children:"Model"}),(0,f.jsx)("p",{className:"font-mono text-sm text-foreground",children:u.model})]}),(0,f.jsxs)("div",{className:"rounded-lg bg-secondary p-3",children:[(0,f.jsx)("p",{className:"text-xs text-muted-foreground",children:"Provider"}),(0,f.jsx)("p",{className:"font-mono text-sm capitalize text-foreground",children:u.provider})]})]}),(u.method||u.sdk)&&(0,f.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[u.method&&(0,f.jsxs)("div",{className:"rounded-lg bg-secondary p-3",children:[(0,f.jsx)("p",{className:"text-xs text-muted-foreground",children:"SDK Method"}),(0,f.jsx)("p",{className:"font-mono text-sm text-foreground",children:u.method})]}),u.sdk&&(0,f.jsxs)("div",{className:"rounded-lg bg-secondary p-3",children:[(0,f.jsx)("p",{className:"text-xs text-muted-foreground",children:"SDK Package"}),(0,f.jsx)("p",{className:"font-mono text-sm text-foreground",children:u.sdk})]})]}),u.systemPrompt&&(0,f.jsxs)("div",{children:[(0,f.jsx)("p",{className:"mb-2 text-sm font-medium text-foreground",children:"System Prompt"}),(0,f.jsx)("pre",{className:"rounded-lg bg-secondary p-3 font-mono text-xs text-muted-foreground",children:u.systemPrompt})]}),(0,f.jsxs)("div",{children:[(0,f.jsx)("p",{className:"mb-2 text-sm font-medium text-foreground",children:"Prompt Template"}),(0,f.jsx)("pre",{className:"rounded-lg bg-secondary p-3 font-mono text-xs text-muted-foreground",children:u.promptTemplate})]})]}):(0,f.jsx)("div",{className:"flex h-[400px] items-center justify-center text-muted-foreground",children:(0,f.jsx)("p",{children:"Select a call site to view details"})})})]})]})})]})]})}function cr({prompts:e,calls:t,onFileClick:r}){let n=e.reduce((e,t)=>{let r=t.file;return e[r]||(e[r]=[]),e[r].push(t),e},{}),s=Object.entries(n).map(([e,t])=>{let r,n=(r=e.toLowerCase()).includes("router")||r.includes("query")||r.includes("classify")||r.includes("input")||r.includes("parse")?"input":r.includes("summar")||r.includes("output")||r.includes("response")||r.includes("format")||r.includes("render")?"output":t.some(e=>e.purpose?.toLowerCase().includes("classif")||e.purpose?.toLowerCase().includes("rout")||e.category?.toLowerCase().includes("input"))?"input":t.some(e=>e.purpose?.toLowerCase().includes("summar")||e.purpose?.toLowerCase().includes("format")||e.category?.toLowerCase().includes("output"))?"output":"process",s=e.split("/").pop()||e;return{id:e,name:s.replace(/\.(ts|js|tsx|jsx|py)$/,""),file:e,type:n,category:t[0]?.category,purpose:t[0]?.purpose,prompts:t}}),a={input:0,process:1,output:2};s.sort((e,t)=>a[e.type]-a[t.type]);let o=s.filter(e=>"input"===e.type),l=s.filter(e=>"process"===e.type),i=s.filter(e=>"output"===e.type),c={input:"border-info bg-info/10 text-info",process:"border-primary bg-primary/10 text-primary",output:"border-chart-3 bg-chart-3/10 text-chart-3"};return 0===e.length?(0,f.jsx)(aJ,{className:"border-border bg-card",children:(0,f.jsxs)(a4,{className:"flex flex-col items-center justify-center py-16",children:[(0,f.jsx)(az,{className:"h-12 w-12 text-muted-foreground/50"}),(0,f.jsx)("p",{className:"mt-4 text-muted-foreground",children:"No AI prompts detected"}),(0,f.jsxs)("p",{className:"mt-1 text-xs text-muted-foreground/80",children:["Run ",(0,f.jsx)("code",{className:"rounded bg-secondary px-1.5",children:"navgator scan --prompts"})," to detect AI flows"]})]})}):(0,f.jsxs)("div",{className:"space-y-6",children:[(0,f.jsxs)("div",{className:"flex items-center gap-6 text-xs",children:[(0,f.jsxs)("div",{className:"flex items-center gap-2",children:[(0,f.jsx)("div",{className:"h-3 w-3 rounded-full border-2 border-info bg-info/30"}),(0,f.jsx)("span",{className:"text-muted-foreground",children:"Input/Routing"})]}),(0,f.jsxs)("div",{className:"flex items-center gap-2",children:[(0,f.jsx)("div",{className:"h-3 w-3 rounded-full border-2 border-primary bg-primary/30"}),(0,f.jsx)("span",{className:"text-muted-foreground",children:"Processing"})]}),(0,f.jsxs)("div",{className:"flex items-center gap-2",children:[(0,f.jsx)("div",{className:"h-3 w-3 rounded-full border-2 border-chart-3 bg-chart-3/30"}),(0,f.jsx)("span",{className:"text-muted-foreground",children:"Output/Summary"})]})]}),(0,f.jsx)(aJ,{className:"border-border bg-card",children:(0,f.jsx)(a4,{className:"p-6",children:(0,f.jsxs)("div",{className:"relative flex flex-col items-center gap-2",children:[(0,f.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-border bg-secondary px-4 py-2",children:[(0,f.jsx)(s6,{className:"h-4 w-4 text-muted-foreground"}),(0,f.jsx)("span",{className:"text-sm font-medium text-foreground",children:"User Input"})]}),o.length>0&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(i8,{className:"h-5 w-5 text-muted-foreground"}),(0,f.jsx)(cn,{label:"Input / Routing",nodes:o,colorClass:c.input,onNodeClick:r})]}),l.length>0&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(i8,{className:"h-5 w-5 text-muted-foreground"}),(0,f.jsx)(cn,{label:"Processing / Analysis",nodes:l,colorClass:c.process,onNodeClick:r})]}),i.length>0&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(i8,{className:"h-5 w-5 text-muted-foreground"}),(0,f.jsx)(cn,{label:"Output / Summary",nodes:i,colorClass:c.output,onNodeClick:r})]}),(0,f.jsx)(i8,{className:"h-5 w-5 text-muted-foreground"}),(0,f.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-border bg-secondary px-4 py-2",children:[(0,f.jsx)(s6,{className:"h-4 w-4 text-muted-foreground"}),(0,f.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Response"})]})]})})}),(0,f.jsxs)(aJ,{className:"border-border bg-card",children:[(0,f.jsx)(a0,{className:"pb-3",children:(0,f.jsxs)(a1,{className:"text-base font-medium",children:["Files with AI Prompts (",Object.keys(n).length,")"]})}),(0,f.jsx)(a4,{children:(0,f.jsx)(iy,{className:"h-[300px]",children:(0,f.jsx)("div",{className:"space-y-2",children:s.map(e=>(0,f.jsxs)("button",{type:"button",onClick:()=>r?.(e.file),className:`w-full text-left rounded-lg border p-3 transition-colors hover:opacity-80 ${c[e.type]}`,children:[(0,f.jsxs)("div",{className:"flex items-center justify-between",children:[(0,f.jsxs)("div",{className:"flex items-center gap-2",children:[(0,f.jsx)("span",{className:"font-mono text-sm font-medium",children:e.name}),(0,f.jsxs)(a5,{variant:"outline",className:"text-xs",children:[e.prompts.length," prompt",1!==e.prompts.length?"s":""]})]}),(0,f.jsx)(a5,{variant:"outline",className:"text-xs capitalize",children:e.type})]}),(0,f.jsx)("p",{className:"mt-1 font-mono text-xs opacity-70",children:e.file}),e.purpose&&(0,f.jsx)("p",{className:"mt-2 text-xs",children:e.purpose})]},e.id))})})})]})]})}function cn({label:e,nodes:t,colorClass:r,onNodeClick:n}){return(0,f.jsxs)("div",{className:"w-full max-w-2xl",children:[(0,f.jsx)("div",{className:"mb-2 text-center text-xs font-medium text-muted-foreground",children:e}),(0,f.jsx)("div",{className:`rounded-lg border-2 p-4 ${r}`,children:(0,f.jsx)("div",{className:"flex flex-wrap justify-center gap-3",children:t.map(e=>(0,f.jsxs)("button",{type:"button",onClick:()=>n?.(e.file),className:"flex items-center gap-2 rounded-md bg-background/50 px-3 py-1.5 transition-colors hover:bg-background/80",children:[(0,f.jsx)(i5,{className:"h-3.5 w-3.5"}),(0,f.jsx)("span",{className:"font-mono text-xs",children:e.name}),(0,f.jsxs)("span",{className:"text-xs opacity-60",children:["(",e.prompts.length,")"]})]},e.id))})})]})}var cs=p.forwardRef((e,t)=>(0,f.jsx)(eZ.label,{...e,ref:t,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));function ca({className:e,...t}){return(0,f.jsx)(cs,{"data-slot":"label",className:eW("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}cs.displayName="Label";var co="Switch",[cl,ci]=eK(co),[cc,cd]=cl(co),cu=p.forwardRef((e,t)=>{let{__scopeSwitch:r,name:n,checked:s,defaultChecked:a,required:o,disabled:l,value:i="on",onCheckedChange:c,form:d,...u}=e,[m,h]=p.useState(null),x=R(t,e=>h(e)),g=p.useRef(!1),v=!m||d||!!m.closest("form"),[b=!1,y]=eX({prop:s,defaultProp:a,onChange:c});return(0,f.jsxs)(cc,{scope:r,checked:b,disabled:l,children:[(0,f.jsx)(eZ.button,{type:"button",role:"switch","aria-checked":b,"aria-required":o,"data-state":ch(b),"data-disabled":l?"":void 0,disabled:l,value:i,...u,ref:x,onClick:eU(e.onClick,e=>{y(e=>!e),v&&(g.current=e.isPropagationStopped(),g.current||e.stopPropagation())})}),v&&(0,f.jsx)(cp,{control:m,bubbles:!g.current,name:n,value:i,checked:b,required:o,disabled:l,form:d,style:{transform:"translateX(-100%)"}})]})});cu.displayName=co;var cm="SwitchThumb",cf=p.forwardRef((e,t)=>{let{__scopeSwitch:r,...n}=e,s=cd(cm,r);return(0,f.jsx)(eZ.span,{"data-state":ch(s.checked),"data-disabled":s.disabled?"":void 0,...n,ref:t})});cf.displayName=cm;var cp=e=>{let{control:t,checked:r,bubbles:n=!0,...s}=e,a=p.useRef(null),o=oV(r),l=rE(t);return p.useEffect(()=>{let e=a.current,t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(o!==r&&t){let s=new Event("click",{bubbles:n});t.call(e,r),e.dispatchEvent(s)}},[o,r,n]),(0,f.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:a,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function ch(e){return e?"checked":"unchecked"}function cx({className:e,...t}){return(0,f.jsx)(cu,{"data-slot":"switch",className:eW("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:(0,f.jsx)(cf,{"data-slot":"switch-thumb",className:"bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"})})}let cg=b("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]),cv=b("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]),cb=b("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]),cy=b("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]),cw=b("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]),cj=b("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]),cN={rootPath:"./src",excludePaths:["node_modules",".git","dist","build",".next"],includePatterns:["**/*.ts","**/*.tsx","**/*.js","**/*.jsx"],scanDepth:10,watchMode:!1,autoScanOnChange:!0},ck={npm:!0,database:!0,service:!0,queue:!0,cache:!0,storage:!0,auth:!0,llm:!0,staticAnalysis:!0,environmentVariables:!0,configFiles:!0},cC={enabled:!0,onNewConnection:!1,onBreakingChange:!0,onSecurityIssue:!0,slackWebhook:""},cS={theme:"dark",compactMode:!1,showLineNumbers:!0,diagramDirection:"TB",maxVisibleConnections:50};function cE(){let{settings:e,isLoading:t,isSaving:r,save:n}=function(e={}){let{autoFetch:t=!0}=e,[r,n]=(0,p.useState)(null),[s,a]=(0,p.useState)(!1),[o,l]=(0,p.useState)(!1),[i,c]=(0,p.useState)(null),[d,u]=(0,p.useState)(null),m=(0,p.useCallback)(async(e=!1)=>{a(!0),c(null);try{let t=new URLSearchParams;e&&t.set("refresh","true");let r=await fetch(`/api/settings?${t.toString()}`),s=await r.json();s.success&&s.data?(n(s.data),u(s.source)):c(s.error||"Failed to fetch settings")}catch(e){c(e instanceof Error?e.message:"Network error")}finally{a(!1)}},[]),f=(0,p.useCallback)(async e=>{l(!0),c(null);try{let t=await fetch("/api/settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),r=await t.json();if(r.success&&r.data)return n(r.data),!0;return c(r.error||"Failed to save settings"),!1}catch(e){return c(e instanceof Error?e.message:"Network error"),!1}finally{l(!1)}},[]),h=(0,p.useCallback)(async()=>{await m(!0)},[m]);return(0,p.useEffect)(()=>{t&&m()},[t,m]),{settings:r,isLoading:s,isSaving:o,error:i,source:d,save:f,refresh:h}}({autoFetch:!0}),[s,a]=(0,p.useState)(!1),[o,l]=(0,p.useState)(cN),[i,c]=(0,p.useState)(ck),[d,u]=(0,p.useState)(cC),[m,h]=(0,p.useState)(cS);(0,p.useEffect)(()=>{e&&(l(e.scan),c(e.detection),u(e.notifications),h(e.display))},[e]);let x=async()=>{await n({scan:o,detection:i,notifications:d,display:m})&&(a(!0),setTimeout(()=>a(!1),2e3))},g=async()=>{l(cN),c(ck),u(cC),h(cS),await n({scan:cN,detection:ck,notifications:cC,display:cS})};return t&&!e?(0,f.jsx)("div",{className:"flex h-64 items-center justify-center",children:(0,f.jsx)(aZ,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):(0,f.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,f.jsxs)("div",{className:"flex items-start justify-between",children:[(0,f.jsxs)("div",{children:[(0,f.jsx)("h1",{className:"text-2xl font-semibold text-foreground",children:"Settings"}),(0,f.jsx)("p",{className:"text-sm text-muted-foreground",children:"Configure NavGator scanning behavior and display preferences"})]}),(0,f.jsxs)("div",{className:"flex items-center gap-2",children:[(0,f.jsxs)(eV,{variant:"outline",size:"sm",className:"gap-2 bg-transparent",onClick:g,children:[(0,f.jsx)(oW,{className:"h-4 w-4"}),"Reset"]}),(0,f.jsxs)(eV,{size:"sm",className:"gap-2",onClick:x,disabled:r,children:[s?(0,f.jsx)(s3,{className:"h-4 w-4"}):r?(0,f.jsx)(aZ,{className:"h-4 w-4 animate-spin"}):(0,f.jsx)(cw,{className:"h-4 w-4"}),s?"Saved":r?"Saving...":"Save Changes"]})]})]}),(0,f.jsxs)(oP,{defaultValue:"scanning",className:"w-full",children:[(0,f.jsxs)(oM,{className:"bg-secondary",children:[(0,f.jsxs)(oT,{value:"scanning",className:"gap-2",children:[(0,f.jsx)(N,{className:"h-4 w-4"}),"Scanning"]}),(0,f.jsxs)(oT,{value:"detection",className:"gap-2",children:[(0,f.jsx)(az,{className:"h-4 w-4"}),"Detection"]}),(0,f.jsxs)(oT,{value:"notifications",className:"gap-2",children:[(0,f.jsx)(cg,{className:"h-4 w-4"}),"Notifications"]}),(0,f.jsxs)(oT,{value:"display",className:"gap-2",children:[(0,f.jsx)(cb,{className:"h-4 w-4"}),"Display"]})]}),(0,f.jsx)(oL,{value:"scanning",className:"mt-4",children:(0,f.jsxs)("div",{className:"grid gap-4",children:[(0,f.jsxs)(aJ,{className:"border-border bg-card",children:[(0,f.jsxs)(a0,{children:[(0,f.jsx)(a1,{className:"text-base",children:"Scan Configuration"}),(0,f.jsx)(a2,{children:"Configure which files and directories NavGator should analyze"})]}),(0,f.jsxs)(a4,{className:"flex flex-col gap-6",children:[(0,f.jsxs)("div",{className:"grid gap-2",children:[(0,f.jsx)(ca,{htmlFor:"rootPath",children:"Root Path"}),(0,f.jsx)(eq,{id:"rootPath",value:o.rootPath,onChange:e=>l(t=>({...t,rootPath:e.target.value})),className:"bg-secondary font-mono",placeholder:"./src"}),(0,f.jsx)("p",{className:"text-xs text-muted-foreground",children:"Base directory for scanning (relative to project root)"})]}),(0,f.jsxs)("div",{className:"grid gap-2",children:[(0,f.jsx)(ca,{children:"Exclude Paths"}),(0,f.jsxs)("div",{className:"flex flex-wrap gap-2",children:[o.excludePaths.map((e,t)=>(0,f.jsxs)(a5,{variant:"secondary",className:"gap-1 font-mono text-xs",children:[e,(0,f.jsx)("button",{type:"button",className:"ml-1 hover:text-destructive",onClick:()=>l(e=>({...e,excludePaths:e.excludePaths.filter((e,r)=>r!==t)})),children:"x"})]},t)),(0,f.jsx)(eq,{placeholder:"Add path...",className:"h-6 w-32 bg-secondary text-xs",onKeyDown:e=>{if("Enter"===e.key){let t=e.currentTarget.value.trim();t&&(l(e=>({...e,excludePaths:[...e.excludePaths,t]})),e.currentTarget.value="")}}})]})]}),(0,f.jsxs)("div",{className:"grid gap-2",children:[(0,f.jsx)(ca,{children:"Include Patterns"}),(0,f.jsx)("div",{className:"flex flex-wrap gap-2",children:o.includePatterns.map((e,t)=>(0,f.jsxs)(a5,{variant:"outline",className:"gap-1 font-mono text-xs",children:[e,(0,f.jsx)("button",{type:"button",className:"ml-1 hover:text-destructive",onClick:()=>l(e=>({...e,includePatterns:e.includePatterns.filter((e,r)=>r!==t)})),children:"x"})]},t))}),(0,f.jsx)("p",{className:"text-xs text-muted-foreground",children:"Glob patterns for files to include in analysis"})]}),(0,f.jsxs)("div",{className:"grid gap-2",children:[(0,f.jsx)(ca,{htmlFor:"scanDepth",children:"Scan Depth"}),(0,f.jsxs)(l_,{value:o.scanDepth.toString(),onValueChange:e=>l(t=>({...t,scanDepth:Number.parseInt(e)})),children:[(0,f.jsx)(lz,{className:"w-32 bg-secondary",children:(0,f.jsx)(lO,{})}),(0,f.jsxs)(lI,{children:[(0,f.jsx)(lF,{value:"5",children:"5 levels"}),(0,f.jsx)(lF,{value:"10",children:"10 levels"}),(0,f.jsx)(lF,{value:"15",children:"15 levels"}),(0,f.jsx)(lF,{value:"20",children:"20 levels"}),(0,f.jsx)(lF,{value:"-1",children:"Unlimited"})]})]}),(0,f.jsx)("p",{className:"text-xs text-muted-foreground",children:"Maximum directory depth to traverse"})]})]})]}),(0,f.jsxs)(aJ,{className:"border-border bg-card",children:[(0,f.jsxs)(a0,{children:[(0,f.jsx)(a1,{className:"text-base",children:"Watch Mode"}),(0,f.jsx)(a2,{children:"Automatically detect changes in your codebase"})]}),(0,f.jsxs)(a4,{className:"flex flex-col gap-4",children:[(0,f.jsxs)("div",{className:"flex items-center justify-between",children:[(0,f.jsxs)("div",{children:[(0,f.jsx)(ca,{children:"Enable Watch Mode"}),(0,f.jsx)("p",{className:"text-xs text-muted-foreground",children:"Monitor file changes in real-time"})]}),(0,f.jsx)(cx,{checked:o.watchMode,onCheckedChange:e=>l(t=>({...t,watchMode:e}))})]}),(0,f.jsxs)("div",{className:"flex items-center justify-between",children:[(0,f.jsxs)("div",{children:[(0,f.jsx)(ca,{children:"Auto-scan on Change"}),(0,f.jsx)("p",{className:"text-xs text-muted-foreground",children:"Automatically re-analyze when files change"})]}),(0,f.jsx)(cx,{checked:o.autoScanOnChange,onCheckedChange:e=>l(t=>({...t,autoScanOnChange:e}))})]})]})]})]})}),(0,f.jsx)(oL,{value:"detection",className:"mt-4",children:(0,f.jsxs)("div",{className:"grid gap-4",children:[(0,f.jsxs)(aJ,{className:"border-border bg-card",children:[(0,f.jsxs)(a0,{children:[(0,f.jsx)(a1,{className:"text-base",children:"Component Detection"}),(0,f.jsx)(a2,{children:"Configure what types of components NavGator should detect"})]}),(0,f.jsx)(a4,{className:"flex flex-col gap-4",children:(0,f.jsx)("div",{className:"grid grid-cols-2 gap-4",children:[{id:"npm",label:"NPM Packages",desc:"Detect package.json dependencies"},{id:"database",label:"Databases",desc:"PostgreSQL, MySQL, MongoDB, etc."},{id:"service",label:"External Services",desc:"APIs, webhooks, third-party services"},{id:"queue",label:"Message Queues",desc:"Redis, RabbitMQ, SQS, etc."},{id:"cache",label:"Caching",desc:"Redis, Memcached, CDN caches"},{id:"storage",label:"File Storage",desc:"S3, GCS, local filesystem"},{id:"auth",label:"Authentication",desc:"OAuth, JWT, session providers"},{id:"llm",label:"LLM Calls",desc:"AI/ML model invocations"}].map(e=>(0,f.jsxs)("div",{className:"flex items-start justify-between rounded-lg border border-border bg-secondary/50 p-3",children:[(0,f.jsxs)("div",{children:[(0,f.jsx)(ca,{children:e.label}),(0,f.jsx)("p",{className:"text-xs text-muted-foreground",children:e.desc})]}),(0,f.jsx)(cx,{checked:i[e.id],onCheckedChange:t=>c(r=>({...r,[e.id]:t}))})]},e.id))})})]}),(0,f.jsxs)(aJ,{className:"border-border bg-card",children:[(0,f.jsxs)(a0,{children:[(0,f.jsx)(a1,{className:"text-base",children:"Connection Analysis"}),(0,f.jsx)(a2,{children:"How NavGator identifies relationships between components"})]}),(0,f.jsxs)(a4,{className:"flex flex-col gap-4",children:[(0,f.jsxs)("div",{className:"flex items-center justify-between",children:[(0,f.jsxs)("div",{children:[(0,f.jsx)(ca,{children:"Static Analysis"}),(0,f.jsx)("p",{className:"text-xs text-muted-foreground",children:"Analyze imports, function calls, and type references"})]}),(0,f.jsx)(cx,{checked:i.staticAnalysis,onCheckedChange:e=>c(t=>({...t,staticAnalysis:e}))})]}),(0,f.jsxs)("div",{className:"flex items-center justify-between",children:[(0,f.jsxs)("div",{children:[(0,f.jsx)(ca,{children:"Environment Variables"}),(0,f.jsx)("p",{className:"text-xs text-muted-foreground",children:"Detect service URLs from env vars"})]}),(0,f.jsx)(cx,{checked:i.environmentVariables,onCheckedChange:e=>c(t=>({...t,environmentVariables:e}))})]}),(0,f.jsxs)("div",{className:"flex items-center justify-between",children:[(0,f.jsxs)("div",{children:[(0,f.jsx)(ca,{children:"Config Files"}),(0,f.jsx)("p",{className:"text-xs text-muted-foreground",children:"Parse docker-compose, terraform, k8s manifests"})]}),(0,f.jsx)(cx,{checked:i.configFiles,onCheckedChange:e=>c(t=>({...t,configFiles:e}))})]})]})]})]})}),(0,f.jsx)(oL,{value:"notifications",className:"mt-4",children:(0,f.jsxs)("div",{className:"grid gap-4",children:[(0,f.jsxs)(aJ,{className:"border-border bg-card",children:[(0,f.jsxs)(a0,{children:[(0,f.jsx)(a1,{className:"text-base",children:"Alert Preferences"}),(0,f.jsx)(a2,{children:"Configure when and how you receive notifications"})]}),(0,f.jsxs)(a4,{className:"flex flex-col gap-4",children:[(0,f.jsxs)("div",{className:"flex items-center justify-between",children:[(0,f.jsxs)("div",{children:[(0,f.jsx)(ca,{children:"Enable Notifications"}),(0,f.jsx)("p",{className:"text-xs text-muted-foreground",children:"Receive alerts for architecture changes"})]}),(0,f.jsx)(cx,{checked:d.enabled,onCheckedChange:e=>u(t=>({...t,enabled:e}))})]}),(0,f.jsxs)("div",{className:"border-t border-border pt-4",children:[(0,f.jsx)(ca,{className:"mb-3 block text-muted-foreground",children:"Notify me when..."}),(0,f.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,f.jsxs)("div",{className:"flex items-center justify-between",children:[(0,f.jsxs)("div",{className:"flex items-center gap-2",children:[(0,f.jsx)(aQ,{className:"h-4 w-4 text-info"}),(0,f.jsx)("span",{className:"text-sm",children:"New connection detected"})]}),(0,f.jsx)(cx,{checked:d.onNewConnection,onCheckedChange:e=>u(t=>({...t,onNewConnection:e})),disabled:!d.enabled})]}),(0,f.jsxs)("div",{className:"flex items-center justify-between",children:[(0,f.jsxs)("div",{className:"flex items-center gap-2",children:[(0,f.jsx)(cj,{className:"h-4 w-4 text-warning"}),(0,f.jsx)("span",{className:"text-sm",children:"Breaking change detected"})]}),(0,f.jsx)(cx,{checked:d.onBreakingChange,onCheckedChange:e=>u(t=>({...t,onBreakingChange:e})),disabled:!d.enabled})]}),(0,f.jsxs)("div",{className:"flex items-center justify-between",children:[(0,f.jsxs)("div",{className:"flex items-center gap-2",children:[(0,f.jsx)(cv,{className:"h-4 w-4 text-destructive"}),(0,f.jsx)("span",{className:"text-sm",children:"Security issue found"})]}),(0,f.jsx)(cx,{checked:d.onSecurityIssue,onCheckedChange:e=>u(t=>({...t,onSecurityIssue:e})),disabled:!d.enabled})]})]})]})]})]}),(0,f.jsxs)(aJ,{className:"border-border bg-card",children:[(0,f.jsxs)(a0,{children:[(0,f.jsx)(a1,{className:"text-base",children:"Integrations"}),(0,f.jsx)(a2,{children:"Connect to external services for notifications"})]}),(0,f.jsxs)(a4,{className:"flex flex-col gap-4",children:[(0,f.jsxs)("div",{className:"grid gap-2",children:[(0,f.jsx)(ca,{htmlFor:"slack",children:"Slack Webhook URL"}),(0,f.jsx)(eq,{id:"slack",type:"url",value:d.slackWebhook,onChange:e=>u(t=>({...t,slackWebhook:e.target.value})),className:"bg-secondary font-mono",placeholder:"https://hooks.slack.com/services/..."})]}),(0,f.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-border bg-secondary/50 p-3",children:[(0,f.jsx)(cy,{className:"h-4 w-4 text-muted-foreground"}),(0,f.jsx)("code",{className:"text-xs text-muted-foreground",children:"navgator config set slack-webhook <url>"})]})]})]})]})}),(0,f.jsx)(oL,{value:"display",className:"mt-4",children:(0,f.jsxs)("div",{className:"grid gap-4",children:[(0,f.jsxs)(aJ,{className:"border-border bg-card",children:[(0,f.jsxs)(a0,{children:[(0,f.jsx)(a1,{className:"text-base",children:"Appearance"}),(0,f.jsx)(a2,{children:"Customize how NavGator looks and displays information"})]}),(0,f.jsxs)(a4,{className:"flex flex-col gap-4",children:[(0,f.jsxs)("div",{className:"grid gap-2",children:[(0,f.jsx)(ca,{children:"Theme"}),(0,f.jsxs)(l_,{value:m.theme,onValueChange:e=>h(t=>({...t,theme:e})),children:[(0,f.jsx)(lz,{className:"w-40 bg-secondary",children:(0,f.jsx)(lO,{})}),(0,f.jsxs)(lI,{children:[(0,f.jsx)(lF,{value:"dark",children:"Dark"}),(0,f.jsx)(lF,{value:"light",children:"Light"}),(0,f.jsx)(lF,{value:"system",children:"System"})]})]})]}),(0,f.jsxs)("div",{className:"flex items-center justify-between",children:[(0,f.jsxs)("div",{children:[(0,f.jsx)(ca,{children:"Compact Mode"}),(0,f.jsx)("p",{className:"text-xs text-muted-foreground",children:"Reduce padding and spacing for more content"})]}),(0,f.jsx)(cx,{checked:m.compactMode,onCheckedChange:e=>h(t=>({...t,compactMode:e}))})]}),(0,f.jsxs)("div",{className:"flex items-center justify-between",children:[(0,f.jsxs)("div",{children:[(0,f.jsx)(ca,{children:"Show Line Numbers"}),(0,f.jsx)("p",{className:"text-xs text-muted-foreground",children:"Display line numbers in code snippets"})]}),(0,f.jsx)(cx,{checked:m.showLineNumbers,onCheckedChange:e=>h(t=>({...t,showLineNumbers:e}))})]})]})]}),(0,f.jsxs)(aJ,{className:"border-border bg-card",children:[(0,f.jsxs)(a0,{children:[(0,f.jsx)(a1,{className:"text-base",children:"Diagram Preferences"}),(0,f.jsx)(a2,{children:"Configure architecture diagram visualization"})]}),(0,f.jsxs)(a4,{className:"flex flex-col gap-4",children:[(0,f.jsxs)("div",{className:"grid gap-2",children:[(0,f.jsx)(ca,{children:"Default Direction"}),(0,f.jsxs)(l_,{value:m.diagramDirection,onValueChange:e=>h(t=>({...t,diagramDirection:e})),children:[(0,f.jsx)(lz,{className:"w-40 bg-secondary",children:(0,f.jsx)(lO,{})}),(0,f.jsxs)(lI,{children:[(0,f.jsx)(lF,{value:"TB",children:"Top to Bottom"}),(0,f.jsx)(lF,{value:"LR",children:"Left to Right"})]})]})]}),(0,f.jsxs)("div",{className:"grid gap-2",children:[(0,f.jsx)(ca,{children:"Max Visible Connections"}),(0,f.jsxs)(l_,{value:m.maxVisibleConnections.toString(),onValueChange:e=>h(t=>({...t,maxVisibleConnections:Number.parseInt(e)})),children:[(0,f.jsx)(lz,{className:"w-40 bg-secondary",children:(0,f.jsx)(lO,{})}),(0,f.jsxs)(lI,{children:[(0,f.jsx)(lF,{value:"25",children:"25"}),(0,f.jsx)(lF,{value:"50",children:"50"}),(0,f.jsx)(lF,{value:"100",children:"100"}),(0,f.jsx)(lF,{value:"200",children:"200"})]})]}),(0,f.jsx)("p",{className:"text-xs text-muted-foreground",children:"Limit connections shown to improve performance"})]})]})]})]})})]})]})}function cR(){let[e,t]=(0,p.useState)("overview"),[r,n]=(0,p.useState)(null),[s,a]=(0,p.useState)(null),{activeProjectPath:o,setActiveProjectPath:l}=(0,a6.useActiveProject)(),{projects:i,isLoading:c,addProject:d,removeProject:u}=function(){let[e,t]=(0,p.useState)([]),[r,n]=(0,p.useState)(null),[s,a]=(0,p.useState)(!1),[o,l]=(0,p.useState)(null),i=(0,p.useCallback)(async()=>{a(!0),l(null);try{let e=await fetch("/api/projects"),r=await e.json();r.success?t(r.data.projects):l(r.error||"Failed to fetch projects")}catch(e){l(e instanceof Error?e.message:"Network error")}finally{a(!1)}},[]),c=(0,p.useCallback)(e=>{n(e),localStorage.setItem(oe,e),window.dispatchEvent(new CustomEvent("navgator-project-changed",{detail:{path:e}}))},[]),d=(0,p.useCallback)(async e=>{try{await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"add",path:e})}),await i()}catch(e){l(e instanceof Error?e.message:"Failed to add project")}},[i]),u=(0,p.useCallback)(async e=>{try{await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"remove",path:e})}),e===r&&(n(null),localStorage.removeItem(oe)),await i()}catch(e){l(e instanceof Error?e.message:"Failed to remove project")}},[i,r]);return(0,p.useEffect)(()=>{let e=localStorage.getItem(oe);e&&n(e)},[]),(0,p.useEffect)(()=>{i()},[i]),{projects:e,activeProject:r,isLoading:s,error:o,setActiveProject:c,addProject:d,removeProject:u,refresh:i}}(),{status:m}=a9({autoFetch:!0});return(0,f.jsxs)("div",{className:"flex min-h-screen flex-col bg-background",children:[(0,f.jsx)(aA,{activeProject:o,projectName:m?.project_name||null,projectPath:m?.project_path||o,projects:i,onSelectProject:e=>{l(e),t("overview"),n(null)},onAddProject:d,onRemoveProject:u,isLoadingProjects:c}),(0,f.jsxs)("div",{className:"flex flex-1",children:[(0,f.jsx)(aH,{activeView:e,setActiveView:t}),(0,f.jsxs)("main",{className:"flex-1 overflow-auto p-6",children:["overview"===e&&(0,f.jsx)(os,{onSelectComponent:e=>{n(e),t("impact")},onNavigate:t,onNavigateToType:e=>{a(e),t("components")}}),"components"===e&&(0,f.jsx)(oc,{initialTypeFilter:s,onSelectComponent:e=>{n(e),a(null),t("impact")}}),"connections"===e&&(0,f.jsx)(o_,{selectedComponent:r,onSelectComponent:n}),"impact"===e&&(0,f.jsx)(oI,{componentName:r,onSelectComponent:n}),"diagram"===e&&(0,f.jsx)(lG,{selectedComponent:r}),"llm"===e&&(0,f.jsx)(ct,{}),"settings"===e&&(0,f.jsx)(cE,{})]})]})]})}e.s(["default",()=>cR],48478)}]);