railwatch 0.9.4 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (452) hide show
  1. checksums.yaml +4 -4
  2. data/AGENTS.md +37 -33
  3. data/CHANGELOG.md +50 -0
  4. data/README.md +51 -60
  5. data/config/routes.rb +0 -59
  6. data/docs/ai-and-mcp.md +9 -8
  7. data/docs/configuration.md +35 -66
  8. data/docs/faq.md +17 -25
  9. data/docs/getting-started.md +105 -117
  10. data/docs/replacing-nightwatch.md +8 -7
  11. data/docs/replacing-sentry.md +12 -16
  12. data/docs/security.md +14 -20
  13. data/docs/self-hosting.md +24 -22
  14. data/docs/testing.md +6 -14
  15. data/docs/troubleshooting.md +12 -46
  16. data/lib/generators/railwatch/install/install_generator.rb +12 -240
  17. data/lib/generators/railwatch/install/templates/initializer.rb.tt +10 -40
  18. data/lib/generators/railwatch/install/templates/post-deploy +0 -7
  19. data/lib/railwatch/authentication.rb +6 -5
  20. data/lib/railwatch/configuration.rb +21 -151
  21. data/lib/railwatch/engine.rb +9 -118
  22. data/lib/railwatch/patches.rb +0 -11
  23. data/lib/railwatch/reporter.rb +3 -19
  24. data/lib/railwatch/subscribers/process_info.rb +1 -2
  25. data/lib/railwatch/version.rb +1 -1
  26. data/lib/railwatch.rb +4 -62
  27. data/lib/tasks/railwatch_tasks.rake +3 -325
  28. data/llms.txt +23 -25
  29. metadata +3 -453
  30. data/app/channels/railwatch/environment_channel.rb +0 -62
  31. data/app/controllers/concerns/railwatch/telemetry_identity.rb +0 -25
  32. data/app/controllers/railwatch/alerts_controller.rb +0 -48
  33. data/app/controllers/railwatch/anomaly_rules_controller.rb +0 -31
  34. data/app/controllers/railwatch/attachments_controller.rb +0 -22
  35. data/app/controllers/railwatch/broadcasts_controller.rb +0 -15
  36. data/app/controllers/railwatch/cache_events_controller.rb +0 -30
  37. data/app/controllers/railwatch/commands_controller.rb +0 -16
  38. data/app/controllers/railwatch/comments_controller.rb +0 -11
  39. data/app/controllers/railwatch/dashboard_controller.rb +0 -70
  40. data/app/controllers/railwatch/deploys_controller.rb +0 -34
  41. data/app/controllers/railwatch/deprecations_controller.rb +0 -54
  42. data/app/controllers/railwatch/environment_scoped.rb +0 -81
  43. data/app/controllers/railwatch/exceptions_controller.rb +0 -52
  44. data/app/controllers/railwatch/executions_controller.rb +0 -13
  45. data/app/controllers/railwatch/issues_controller.rb +0 -258
  46. data/app/controllers/railwatch/jobs_controller.rb +0 -63
  47. data/app/controllers/railwatch/llm_calls_controller.rb +0 -124
  48. data/app/controllers/railwatch/logs_controller.rb +0 -40
  49. data/app/controllers/railwatch/mails_controller.rb +0 -19
  50. data/app/controllers/railwatch/notifications_controller.rb +0 -11
  51. data/app/controllers/railwatch/outgoing_requests_controller.rb +0 -19
  52. data/app/controllers/railwatch/overview_controller.rb +0 -38
  53. data/app/controllers/railwatch/people_controller.rb +0 -25
  54. data/app/controllers/railwatch/processes_controller.rb +0 -33
  55. data/app/controllers/railwatch/profiles_controller.rb +0 -65
  56. data/app/controllers/railwatch/queries_controller.rb +0 -59
  57. data/app/controllers/railwatch/releases_controller.rb +0 -75
  58. data/app/controllers/railwatch/requests_controller.rb +0 -37
  59. data/app/controllers/railwatch/saved_views_controller.rb +0 -53
  60. data/app/controllers/railwatch/scheduled_tasks_controller.rb +0 -45
  61. data/app/controllers/railwatch/spans_controller.rb +0 -47
  62. data/app/controllers/railwatch/storage_ops_controller.rb +0 -15
  63. data/app/controllers/railwatch/tenants_controller.rb +0 -44
  64. data/app/controllers/railwatch/thresholds_controller.rb +0 -47
  65. data/app/controllers/railwatch/traces_controller.rb +0 -72
  66. data/app/controllers/railwatch/transactions_controller.rb +0 -21
  67. data/app/controllers/railwatch/view_renders_controller.rb +0 -28
  68. data/app/controllers/railwatch/visits_controller.rb +0 -53
  69. data/app/frontend/components/app-content.tsx +0 -26
  70. data/app/frontend/components/app-logo-icon.tsx +0 -23
  71. data/app/frontend/components/app-logo.tsx +0 -14
  72. data/app/frontend/components/app-shell.tsx +0 -38
  73. data/app/frontend/components/app-sidebar-header.tsx +0 -54
  74. data/app/frontend/components/app-sidebar.tsx +0 -94
  75. data/app/frontend/components/app-wordmark.tsx +0 -29
  76. data/app/frontend/components/breadcrumbs.tsx +0 -46
  77. data/app/frontend/components/icon.tsx +0 -16
  78. data/app/frontend/components/input-error.tsx +0 -18
  79. data/app/frontend/components/nav-footer.tsx +0 -46
  80. data/app/frontend/components/nav-main.tsx +0 -41
  81. data/app/frontend/components/nav-user.tsx +0 -50
  82. data/app/frontend/components/railwatch/chart-hover.tsx +0 -34
  83. data/app/frontend/components/railwatch/chart-panel.tsx +0 -170
  84. data/app/frontend/components/railwatch/code.tsx +0 -28
  85. data/app/frontend/components/railwatch/command-palette.tsx +0 -132
  86. data/app/frontend/components/railwatch/copy-block.tsx +0 -52
  87. data/app/frontend/components/railwatch/copy-id.tsx +0 -49
  88. data/app/frontend/components/railwatch/cursor-load-more.tsx +0 -39
  89. data/app/frontend/components/railwatch/data-table.tsx +0 -195
  90. data/app/frontend/components/railwatch/digit-roll.tsx +0 -312
  91. data/app/frontend/components/railwatch/empty-state.tsx +0 -159
  92. data/app/frontend/components/railwatch/env-nav.tsx +0 -130
  93. data/app/frontend/components/railwatch/env-switcher.tsx +0 -145
  94. data/app/frontend/components/railwatch/filter-bar.tsx +0 -153
  95. data/app/frontend/components/railwatch/flamegraph.tsx +0 -324
  96. data/app/frontend/components/railwatch/frames.tsx +0 -295
  97. data/app/frontend/components/railwatch/json-viewer.tsx +0 -159
  98. data/app/frontend/components/railwatch/live-dot.tsx +0 -78
  99. data/app/frontend/components/railwatch/live-toggle.tsx +0 -76
  100. data/app/frontend/components/railwatch/metric-chart.tsx +0 -112
  101. data/app/frontend/components/railwatch/mobile-page-switcher.tsx +0 -89
  102. data/app/frontend/components/railwatch/onboarding.tsx +0 -91
  103. data/app/frontend/components/railwatch/origin-identity.tsx +0 -84
  104. data/app/frontend/components/railwatch/page-header.tsx +0 -42
  105. data/app/frontend/components/railwatch/percentile-picker.tsx +0 -18
  106. data/app/frontend/components/railwatch/relative-time.tsx +0 -18
  107. data/app/frontend/components/railwatch/saved-views.tsx +0 -232
  108. data/app/frontend/components/railwatch/segmented.tsx +0 -64
  109. data/app/frontend/components/railwatch/series-chart.tsx +0 -400
  110. data/app/frontend/components/railwatch/shortcuts-dialog.tsx +0 -89
  111. data/app/frontend/components/railwatch/signal-toast.tsx +0 -121
  112. data/app/frontend/components/railwatch/sort-header.tsx +0 -37
  113. data/app/frontend/components/railwatch/source-link.tsx +0 -57
  114. data/app/frontend/components/railwatch/sparkline-cell.tsx +0 -14
  115. data/app/frontend/components/railwatch/sql-block.tsx +0 -116
  116. data/app/frontend/components/railwatch/stat.tsx +0 -185
  117. data/app/frontend/components/railwatch/status-badge.tsx +0 -79
  118. data/app/frontend/components/railwatch/step-picker.tsx +0 -57
  119. data/app/frontend/components/railwatch/timeline.tsx +0 -405
  120. data/app/frontend/components/railwatch/utilisation-bar.tsx +0 -44
  121. data/app/frontend/components/railwatch/window-picker.tsx +0 -147
  122. data/app/frontend/components/ui/avatar.tsx +0 -51
  123. data/app/frontend/components/ui/badge.tsx +0 -46
  124. data/app/frontend/components/ui/breadcrumb.tsx +0 -109
  125. data/app/frontend/components/ui/button.tsx +0 -60
  126. data/app/frontend/components/ui/card.tsx +0 -92
  127. data/app/frontend/components/ui/chart.tsx +0 -374
  128. data/app/frontend/components/ui/checkbox.tsx +0 -32
  129. data/app/frontend/components/ui/collapsible.tsx +0 -31
  130. data/app/frontend/components/ui/command.tsx +0 -182
  131. data/app/frontend/components/ui/dialog.tsx +0 -158
  132. data/app/frontend/components/ui/dropdown-menu.tsx +0 -255
  133. data/app/frontend/components/ui/hover-card.tsx +0 -42
  134. data/app/frontend/components/ui/input.tsx +0 -21
  135. data/app/frontend/components/ui/label.tsx +0 -24
  136. data/app/frontend/components/ui/popover.tsx +0 -87
  137. data/app/frontend/components/ui/select.tsx +0 -185
  138. data/app/frontend/components/ui/separator.tsx +0 -28
  139. data/app/frontend/components/ui/sheet.tsx +0 -137
  140. data/app/frontend/components/ui/sidebar.tsx +0 -726
  141. data/app/frontend/components/ui/skeleton.tsx +0 -13
  142. data/app/frontend/components/ui/sonner.tsx +0 -41
  143. data/app/frontend/components/ui/table.tsx +0 -114
  144. data/app/frontend/components/ui/tabs.tsx +0 -91
  145. data/app/frontend/components/ui/textarea.tsx +0 -18
  146. data/app/frontend/components/ui/tooltip.tsx +0 -61
  147. data/app/frontend/components/user-info.tsx +0 -32
  148. data/app/frontend/components/user-menu-content.tsx +0 -94
  149. data/app/frontend/entrypoints/application.css +0 -244
  150. data/app/frontend/entrypoints/inertia.tsx +0 -92
  151. data/app/frontend/fonts/CommitMono-Bold.woff2 +0 -0
  152. data/app/frontend/fonts/CommitMono-Regular.woff2 +0 -0
  153. data/app/frontend/fonts/Roboto-Black.woff2 +0 -0
  154. data/app/frontend/fonts/Roboto-Bold.woff2 +0 -0
  155. data/app/frontend/fonts/Roboto-Medium.woff2 +0 -0
  156. data/app/frontend/fonts/Roboto-Regular.woff2 +0 -0
  157. data/app/frontend/hooks/use-appearance.tsx +0 -67
  158. data/app/frontend/hooks/use-clipboard.ts +0 -32
  159. data/app/frontend/hooks/use-flash.tsx +0 -23
  160. data/app/frontend/hooks/use-hotkeys.ts +0 -63
  161. data/app/frontend/hooks/use-initials.tsx +0 -15
  162. data/app/frontend/hooks/use-live.ts +0 -205
  163. data/app/frontend/hooks/use-mobile-navigation.ts +0 -8
  164. data/app/frontend/hooks/use-mobile.ts +0 -21
  165. data/app/frontend/hooks/use-percentile.ts +0 -24
  166. data/app/frontend/hooks/use-reduced-motion.ts +0 -25
  167. data/app/frontend/hooks/use-row-nav.ts +0 -106
  168. data/app/frontend/hooks/use-step.ts +0 -27
  169. data/app/frontend/hooks/use-ticker.ts +0 -12
  170. data/app/frontend/hooks/use-window.ts +0 -58
  171. data/app/frontend/layouts/app/app-sidebar-layout.tsx +0 -107
  172. data/app/frontend/layouts/app-layout.tsx +0 -21
  173. data/app/frontend/layouts/env-layout.tsx +0 -53
  174. data/app/frontend/layouts/persistent-layout.tsx +0 -18
  175. data/app/frontend/lib/cable.ts +0 -10
  176. data/app/frontend/lib/env-pages.ts +0 -236
  177. data/app/frontend/lib/execution-path.ts +0 -55
  178. data/app/frontend/lib/explain.ts +0 -50
  179. data/app/frontend/lib/filter.ts +0 -25
  180. data/app/frontend/lib/flamegraph.ts +0 -155
  181. data/app/frontend/lib/format.ts +0 -71
  182. data/app/frontend/lib/keyboard.ts +0 -18
  183. data/app/frontend/lib/mount.ts +0 -23
  184. data/app/frontend/lib/source-link.ts +0 -217
  185. data/app/frontend/lib/utils.ts +0 -6
  186. data/app/frontend/pages/alerts/index.tsx +0 -171
  187. data/app/frontend/pages/broadcasts/index.tsx +0 -171
  188. data/app/frontend/pages/cache_events/index.tsx +0 -127
  189. data/app/frontend/pages/commands/index.tsx +0 -143
  190. data/app/frontend/pages/deploys/index.tsx +0 -94
  191. data/app/frontend/pages/deploys/show.tsx +0 -309
  192. data/app/frontend/pages/deprecations/index.tsx +0 -176
  193. data/app/frontend/pages/exceptions/index.tsx +0 -271
  194. data/app/frontend/pages/executions/show.tsx +0 -821
  195. data/app/frontend/pages/issues/index.tsx +0 -399
  196. data/app/frontend/pages/issues/show.tsx +0 -1367
  197. data/app/frontend/pages/jobs/index.tsx +0 -381
  198. data/app/frontend/pages/jobs/klass.tsx +0 -215
  199. data/app/frontend/pages/llm_calls/index.tsx +0 -664
  200. data/app/frontend/pages/logs/index.tsx +0 -303
  201. data/app/frontend/pages/mails/index.tsx +0 -218
  202. data/app/frontend/pages/notifications/index.tsx +0 -161
  203. data/app/frontend/pages/outgoing_requests/index.tsx +0 -309
  204. data/app/frontend/pages/overview/show.tsx +0 -333
  205. data/app/frontend/pages/people/index.tsx +0 -102
  206. data/app/frontend/pages/people/show.tsx +0 -149
  207. data/app/frontend/pages/processes/index.tsx +0 -335
  208. data/app/frontend/pages/profiles/index.tsx +0 -110
  209. data/app/frontend/pages/profiles/show.tsx +0 -105
  210. data/app/frontend/pages/queries/index.tsx +0 -492
  211. data/app/frontend/pages/queries/show.tsx +0 -276
  212. data/app/frontend/pages/releases/index.tsx +0 -190
  213. data/app/frontend/pages/releases/release-health.tsx +0 -68
  214. data/app/frontend/pages/releases/release-path.ts +0 -25
  215. data/app/frontend/pages/releases/show.tsx +0 -262
  216. data/app/frontend/pages/requests/index.tsx +0 -235
  217. data/app/frontend/pages/requests/route.tsx +0 -159
  218. data/app/frontend/pages/scheduled_tasks/index.tsx +0 -220
  219. data/app/frontend/pages/spans/index.tsx +0 -229
  220. data/app/frontend/pages/spans/show.tsx +0 -220
  221. data/app/frontend/pages/storage_ops/index.tsx +0 -150
  222. data/app/frontend/pages/tenants/index.tsx +0 -236
  223. data/app/frontend/pages/tenants/show.tsx +0 -477
  224. data/app/frontend/pages/tenants/tenant-path.ts +0 -26
  225. data/app/frontend/pages/thresholds/index.tsx +0 -414
  226. data/app/frontend/pages/traces/show.tsx +0 -208
  227. data/app/frontend/pages/transactions/index.tsx +0 -220
  228. data/app/frontend/pages/view_renders/index.tsx +0 -241
  229. data/app/frontend/pages/visits/index.tsx +0 -321
  230. data/app/frontend/public/icon.png +0 -0
  231. data/app/frontend/public/icon.svg +0 -5
  232. data/app/frontend/routes/index.d.ts +0 -2136
  233. data/app/frontend/routes/index.js +0 -2112
  234. data/app/frontend/types/globals.d.ts +0 -9
  235. data/app/frontend/types/index.ts +0 -288
  236. data/app/frontend/types/vite-env.d.ts +0 -9
  237. data/app/helpers/railwatch/assets_helper.rb +0 -52
  238. data/app/jobs/railwatch/anomaly_scan_job.rb +0 -11
  239. data/app/jobs/railwatch/application_job.rb +0 -7
  240. data/app/jobs/railwatch/auto_resolve_issues_job.rb +0 -19
  241. data/app/jobs/railwatch/check_scheduled_tasks_job.rb +0 -113
  242. data/app/jobs/railwatch/detect_anomalies_job.rb +0 -171
  243. data/app/jobs/railwatch/detect_performance_issues_job.rb +0 -95
  244. data/app/jobs/railwatch/group_exceptions_job.rb +0 -91
  245. data/app/jobs/railwatch/optimize_telemetry_job.rb +0 -23
  246. data/app/jobs/railwatch/performance_scan_job.rb +0 -11
  247. data/app/jobs/railwatch/prune_telemetry_job.rb +0 -129
  248. data/app/jobs/railwatch/release_health_rollup_job.rb +0 -64
  249. data/app/jobs/railwatch/rollup_catchup_job.rb +0 -21
  250. data/app/jobs/railwatch/rollup_job.rb +0 -132
  251. data/app/jobs/railwatch/scheduled_task_scan_job.rb +0 -11
  252. data/app/models/concerns/railwatch/detection_snapshotting.rb +0 -20
  253. data/app/models/railwatch/alert.rb +0 -229
  254. data/app/models/railwatch/alert_rule.rb +0 -121
  255. data/app/models/railwatch/anomaly_rule.rb +0 -51
  256. data/app/models/railwatch/application.rb +0 -44
  257. data/app/models/railwatch/application_record.rb +0 -33
  258. data/app/models/railwatch/comment.rb +0 -36
  259. data/app/models/railwatch/deploy.rb +0 -67
  260. data/app/models/railwatch/environment.rb +0 -68
  261. data/app/models/railwatch/execution_presenter.rb +0 -185
  262. data/app/models/railwatch/filter_query.rb +0 -184
  263. data/app/models/railwatch/followup_receipt.rb +0 -27
  264. data/app/models/railwatch/ingest/batch.rb +0 -355
  265. data/app/models/railwatch/ingest/mapper.rb +0 -585
  266. data/app/models/railwatch/ingest/payload.rb +0 -96
  267. data/app/models/railwatch/ingest/rollup_absorber.rb +0 -170
  268. data/app/models/railwatch/ingest/writer.rb +0 -137
  269. data/app/models/railwatch/issue.rb +0 -277
  270. data/app/models/railwatch/issue_activity.rb +0 -23
  271. data/app/models/railwatch/issue_detection_presenter.rb +0 -309
  272. data/app/models/railwatch/issue_detection_snapshot.rb +0 -77
  273. data/app/models/railwatch/maintenance_task.rb +0 -53
  274. data/app/models/railwatch/saved_view.rb +0 -63
  275. data/app/models/railwatch/telemetry/aggregations.rb +0 -251
  276. data/app/models/railwatch/telemetry/attachment.rb +0 -31
  277. data/app/models/railwatch/telemetry/bounded_gzip.rb +0 -101
  278. data/app/models/railwatch/telemetry/broadcast.rb +0 -13
  279. data/app/models/railwatch/telemetry/cache_event.rb +0 -16
  280. data/app/models/railwatch/telemetry/child.rb +0 -53
  281. data/app/models/railwatch/telemetry/cursor_page.rb +0 -99
  282. data/app/models/railwatch/telemetry/deprecation.rb +0 -13
  283. data/app/models/railwatch/telemetry/enqueued_job.rb +0 -13
  284. data/app/models/railwatch/telemetry/exception.rb +0 -28
  285. data/app/models/railwatch/telemetry/execution.rb +0 -152
  286. data/app/models/railwatch/telemetry/export_delivery.rb +0 -32
  287. data/app/models/railwatch/telemetry/export_destination.rb +0 -66
  288. data/app/models/railwatch/telemetry/health_sample.rb +0 -72
  289. data/app/models/railwatch/telemetry/ingest_batch.rb +0 -31
  290. data/app/models/railwatch/telemetry/llm_call.rb +0 -37
  291. data/app/models/railwatch/telemetry/log.rb +0 -91
  292. data/app/models/railwatch/telemetry/mail.rb +0 -13
  293. data/app/models/railwatch/telemetry/n_plus_one.rb +0 -92
  294. data/app/models/railwatch/telemetry/notification.rb +0 -13
  295. data/app/models/railwatch/telemetry/outgoing_request.rb +0 -13
  296. data/app/models/railwatch/telemetry/person.rb +0 -50
  297. data/app/models/railwatch/telemetry/process.rb +0 -10
  298. data/app/models/railwatch/telemetry/profile.rb +0 -37
  299. data/app/models/railwatch/telemetry/query.rb +0 -57
  300. data/app/models/railwatch/telemetry/query_shape.rb +0 -45
  301. data/app/models/railwatch/telemetry/release_health.rb +0 -69
  302. data/app/models/railwatch/telemetry/rollup.rb +0 -157
  303. data/app/models/railwatch/telemetry/session.rb +0 -24
  304. data/app/models/railwatch/telemetry/span.rb +0 -19
  305. data/app/models/railwatch/telemetry/storage_op.rb +0 -13
  306. data/app/models/railwatch/telemetry/tenant.rb +0 -240
  307. data/app/models/railwatch/telemetry/transaction.rb +0 -13
  308. data/app/models/railwatch/telemetry/view_render.rb +0 -13
  309. data/app/models/railwatch/telemetry/visit.rb +0 -24
  310. data/app/models/railwatch/telemetry_record.rb +0 -107
  311. data/app/models/railwatch/threshold.rb +0 -66
  312. data/app/models/railwatch/user.rb +0 -47
  313. data/app/models/railwatch/viewer.rb +0 -13
  314. data/app/models/railwatch/window.rb +0 -66
  315. data/app/views/layouts/railwatch/dashboard.html.erb +0 -25
  316. data/db/railwatch_migrate/20260916000000_create_railwatch_tables.rb +0 -151
  317. data/db/railwatch_migrate/20260917000000_create_railwatch_maintenance_tasks.rb +0 -18
  318. data/db/railwatch_migrate/20260917120000_create_railwatch_followup_receipts.rb +0 -20
  319. data/db/railwatch_migrate/20260918120000_widen_host_user_ids.rb +0 -71
  320. data/db/railwatch_telemetry_migrate/20260903000000_enable_incremental_vacuum.rb +0 -62
  321. data/db/railwatch_telemetry_migrate/20260903000001_create_telemetry.rb +0 -481
  322. data/db/railwatch_telemetry_migrate/20260903000002_rename_tenant_to_app_tenant.rb +0 -14
  323. data/db/railwatch_telemetry_migrate/20260903000003_add_statement_count_to_transactions.rb +0 -9
  324. data/db/railwatch_telemetry_migrate/20260903000004_add_role_and_channel.rb +0 -10
  325. data/db/railwatch_telemetry_migrate/20260903000005_add_locals_to_exceptions.rb +0 -9
  326. data/db/railwatch_telemetry_migrate/20260903000006_add_spans_health_vitals_and_fts.rb +0 -82
  327. data/db/railwatch_telemetry_migrate/20260903000007_rename_span_attributes_to_payload.rb +0 -10
  328. data/db/railwatch_telemetry_migrate/20260903000008_add_profiles_and_attachments.rb +0 -60
  329. data/db/railwatch_telemetry_migrate/20260903000009_add_truncated_to_attachments.rb +0 -9
  330. data/db/railwatch_telemetry_migrate/20260903000010_create_sessions_and_release_health.rb +0 -51
  331. data/db/railwatch_telemetry_migrate/20260903000011_add_fingerprint_to_exceptions.rb +0 -11
  332. data/db/railwatch_telemetry_migrate/20260904000012_add_failed_to_broadcasts.rb +0 -10
  333. data/db/railwatch_telemetry_migrate/20260904010000_add_filter_cursor_indexes.rb +0 -37
  334. data/db/railwatch_telemetry_migrate/20260904020000_add_n_plus_ones_execution_id_index.rb +0 -11
  335. data/db/railwatch_telemetry_migrate/20260904120000_create_query_shapes.rb +0 -15
  336. data/db/railwatch_telemetry_migrate/20260906120000_add_backpressure_factor_to_ingest_batches.rb +0 -9
  337. data/db/railwatch_telemetry_migrate/20260907000000_rename_lantern_version_on_processes.rb +0 -10
  338. data/db/railwatch_telemetry_migrate/20260913000000_rename_nightrail_version_on_processes.rb +0 -9
  339. data/db/railwatch_telemetry_migrate/20260914000000_drop_orphan_durable_ingest_tables.rb +0 -18
  340. data/db/railwatch_telemetry_migrate/20260914010000_drop_orphan_durable_ingest_columns.rb +0 -25
  341. data/db/railwatch_telemetry_migrate/20260915000000_create_llm_calls.rb +0 -55
  342. data/db/railwatch_telemetry_migrate/20260915120000_add_detail_to_llm_calls.rb +0 -21
  343. data/db/railwatch_telemetry_migrate/20260915200000_add_explained_index_to_queries.rb +0 -16
  344. data/db/railwatch_telemetry_migrate/20260915210000_add_slowest_index_to_queries.rb +0 -18
  345. data/db/railwatch_telemetry_migrate/20260917010000_add_batch_ledger_to_ingest_batches.rb +0 -16
  346. data/db/railwatch_telemetry_migrate/20260919000100_create_export_queue.rb +0 -146
  347. data/db/railwatch_telemetry_migrate/20260922000000_add_covering_indexes_for_dashboard_aggregates.rb +0 -34
  348. data/db/railwatch_telemetry_migrate/20260923000000_add_people_index.rb +0 -15
  349. data/db/railwatch_telemetry_migrate/20260925000000_add_tenant_summary_index.rb +0 -17
  350. data/db/railwatch_telemetry_migrate/20261008000000_add_in_transaction_to_outgoing_requests.rb +0 -10
  351. data/docs/embedded.md +0 -503
  352. data/lib/puma/plugin/railwatch.rb +0 -215
  353. data/lib/railwatch/dashboard_assets.rb +0 -45
  354. data/lib/railwatch/embedded.rb +0 -50
  355. data/lib/railwatch/export/client.rb +0 -124
  356. data/lib/railwatch/export/lease.rb +0 -56
  357. data/lib/railwatch/export/outbox.rb +0 -361
  358. data/lib/railwatch/export/policy.rb +0 -79
  359. data/lib/railwatch/export/sender.rb +0 -130
  360. data/lib/railwatch/ingest_request_body_limit.rb +0 -10
  361. data/lib/railwatch/maintenance.rb +0 -194
  362. data/lib/railwatch/patches/migration_busy_timeout.rb +0 -73
  363. data/lib/railwatch/transport/local.rb +0 -78
  364. data/lib/railwatch/transport/socket.rb +0 -183
  365. data/lib/railwatch/writer.rb +0 -370
  366. data/public/railwatch/assets/CommitMono-Bold-D6h61ieg.woff2 +0 -0
  367. data/public/railwatch/assets/CommitMono-Regular-zr8w7Obm.woff2 +0 -0
  368. data/public/railwatch/assets/Roboto-Black-auA4GeOK.woff2 +0 -0
  369. data/public/railwatch/assets/Roboto-Bold-CJLnO8j1.woff2 +0 -0
  370. data/public/railwatch/assets/Roboto-Medium-Cm2bwKpj.woff2 +0 -0
  371. data/public/railwatch/assets/Roboto-Regular-Chaq1-PV.woff2 +0 -0
  372. data/public/railwatch/assets/app-layout-by7G3sa1.js +0 -41
  373. data/public/railwatch/assets/application-Cc5v_Vk9.css +0 -1
  374. data/public/railwatch/assets/arrow-up-DCZ7emux.js +0 -1
  375. data/public/railwatch/assets/braces-CykT5_5u.js +0 -1
  376. data/public/railwatch/assets/card-C-PPSA0g.js +0 -1
  377. data/public/railwatch/assets/chart-Cov79YC5.js +0 -39
  378. data/public/railwatch/assets/chart-hover-DdK4E-2h.js +0 -1
  379. data/public/railwatch/assets/chart-panel-BPaYRXJB.js +0 -1
  380. data/public/railwatch/assets/code-BYjC4YZ_.js +0 -1
  381. data/public/railwatch/assets/copy-id-LPfoj9cC.js +0 -1
  382. data/public/railwatch/assets/cursor-load-more-DSdhgpGl.js +0 -1
  383. data/public/railwatch/assets/data-table-CQ_YRWQs.js +0 -1
  384. data/public/railwatch/assets/env-layout-CdMWbUkm.js +0 -1
  385. data/public/railwatch/assets/execution-path-7MYt-Qbn.js +0 -1
  386. data/public/railwatch/assets/filter-bar-CrzpQ_vD.js +0 -1
  387. data/public/railwatch/assets/flamegraph-BIFEdTAg.js +0 -2
  388. data/public/railwatch/assets/format-B9SDkrWj.js +0 -1
  389. data/public/railwatch/assets/frames-C5t-x4f0.js +0 -1
  390. data/public/railwatch/assets/index--NQ7us-L.js +0 -1
  391. data/public/railwatch/assets/index-2kgYe_99.js +0 -1
  392. data/public/railwatch/assets/index-4YEPHxtO.js +0 -1
  393. data/public/railwatch/assets/index-AOCC1GDJ.js +0 -1
  394. data/public/railwatch/assets/index-BEo-u0eO.js +0 -1
  395. data/public/railwatch/assets/index-BJ1V3w2N.js +0 -1
  396. data/public/railwatch/assets/index-BPoHsBKb.js +0 -1
  397. data/public/railwatch/assets/index-BZzyGUM3.js +0 -1
  398. data/public/railwatch/assets/index-BgVq7yKL.js +0 -1
  399. data/public/railwatch/assets/index-BqFGEZvW.js +0 -1
  400. data/public/railwatch/assets/index-ByuHJ1CH.js +0 -1
  401. data/public/railwatch/assets/index-C2j50AL2.js +0 -1
  402. data/public/railwatch/assets/index-CLEdTkvW.js +0 -1
  403. data/public/railwatch/assets/index-CWgq8qBu.js +0 -1
  404. data/public/railwatch/assets/index-CXQ7_oVj.js +0 -2
  405. data/public/railwatch/assets/index-CmyYrjS2.js +0 -1
  406. data/public/railwatch/assets/index-Cn9_HjDo.js +0 -1
  407. data/public/railwatch/assets/index-CsMAm9UK.js +0 -1
  408. data/public/railwatch/assets/index-D0Kk_oGY.js +0 -1
  409. data/public/railwatch/assets/index-DC9ZptJh.js +0 -1
  410. data/public/railwatch/assets/index-DNzg7jmV.js +0 -1
  411. data/public/railwatch/assets/index-DQ8uJO5f.js +0 -1
  412. data/public/railwatch/assets/index-Deq14BxB.js +0 -1
  413. data/public/railwatch/assets/index-IaV3Blzp.js +0 -1
  414. data/public/railwatch/assets/index-TYNWcJQs.js +0 -1
  415. data/public/railwatch/assets/index-WonH2fcZ.js +0 -1
  416. data/public/railwatch/assets/index-WxWUaH_d.js +0 -1
  417. data/public/railwatch/assets/index-mUNrl4ky.js +0 -1
  418. data/public/railwatch/assets/inertia-DfNRARuA.js +0 -97
  419. data/public/railwatch/assets/json-viewer-DMsF5glp.js +0 -1
  420. data/public/railwatch/assets/klass-CmHYk5rz.js +0 -1
  421. data/public/railwatch/assets/origin-identity-1R3bqa3R.js +0 -1
  422. data/public/railwatch/assets/percentile-picker-73z5PAps.js +0 -1
  423. data/public/railwatch/assets/relative-time-Dsc_cCdX.js +0 -1
  424. data/public/railwatch/assets/release-health-BV5OaOWd.js +0 -1
  425. data/public/railwatch/assets/route-CWh58C7K.js +0 -1
  426. data/public/railwatch/assets/segmented-DB4zh-Am.js +0 -1
  427. data/public/railwatch/assets/select-DBKjFlOX.js +0 -1
  428. data/public/railwatch/assets/series-chart-BaiDG795.js +0 -1
  429. data/public/railwatch/assets/show-B4ICCFGh.js +0 -1
  430. data/public/railwatch/assets/show-B5lOU9Gv.js +0 -1
  431. data/public/railwatch/assets/show-BYPB74t4.js +0 -2
  432. data/public/railwatch/assets/show-C7A0m2M8.js +0 -1
  433. data/public/railwatch/assets/show-DT5X1zqE.js +0 -1
  434. data/public/railwatch/assets/show-D_NBdXsn.js +0 -2
  435. data/public/railwatch/assets/show-DgPCnRg8.js +0 -1
  436. data/public/railwatch/assets/show-Yl69HF0x.js +0 -1
  437. data/public/railwatch/assets/show-_QxuUQCm.js +0 -3
  438. data/public/railwatch/assets/show-g__jnN36.js +0 -1
  439. data/public/railwatch/assets/show-l4ztfjl9.js +0 -1
  440. data/public/railwatch/assets/sort-header-BcG8ulEH.js +0 -1
  441. data/public/railwatch/assets/source-link-B2183i2-.js +0 -1
  442. data/public/railwatch/assets/sparkline-cell-B47ipscB.js +0 -1
  443. data/public/railwatch/assets/stat-DT2hhsqS.js +0 -1
  444. data/public/railwatch/assets/status-badge-CmbRKlY7.js +0 -1
  445. data/public/railwatch/assets/tenant-path-C4rNGauE.js +0 -1
  446. data/public/railwatch/assets/use-clipboard-oTNeP4ax.js +0 -1
  447. data/public/railwatch/assets/use-live-CLZZj245.js +0 -1
  448. data/public/railwatch/icon.png +0 -0
  449. data/public/railwatch/icon.svg +0 -5
  450. data/public/railwatch/manifest.json +0 -1245
  451. data/public/railwatch/rails-vite.json +0 -1
  452. /data/{app/frontend/lib → lib/generators/railwatch/install/templates}/railwatch.ts +0 -0
@@ -1,41 +0,0 @@
1
- var _o=t=>{throw TypeError(t)};var Eo=(t,e,n)=>e.has(t)||_o("Cannot "+n);var le=(t,e,n)=>(Eo(t,e,"read from private field"),n?n.call(t):e.get(t)),ko=(t,e,n)=>e.has(t)?_o("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Dn=(t,e,n,r)=>(Eo(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);import{x as F,c as P,o as A,j as l,r as d,U as Rt,V as Ia,A as Sr,X as as,u as be,L as Ae,d as ie,W as Oa,J as Da,Y as Ta,Z as $a,_ as La,T as Fa,$ as Dt,S as ls,B as cs,a0 as za,a1 as Ba,n as Va,P as us,a2 as Ha,O as Ua,a3 as Wa,a4 as Ga,g as Ka,G as qa,a5 as Ya,a6 as Xa,I as Za,D as Qa,a7 as Ja,E as el,m as tl,a8 as nl,N as rl,a9 as ol,l as sl,R as il,aa as al,a as ll,ab as cl,ac as ul,ad as dl,ae as mn,v as Tt,b as fl,af as ds,ag as fs}from"./inertia-DfNRARuA.js";const pl=[["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"}]],ml=F("activity",pl);const hl=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],vl=F("arrow-up-right",hl);const gl=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M22 8c0-2.3-.8-4.3-2-6",key:"5bb3ad"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}],["path",{d:"M4 2C2.8 3.7 2 5.7 2 8",key:"tap9e0"}]],ps=F("bell-ring",gl);const xl=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],bl=F("bell",xl);const yl=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],Cl=F("book-open",yl);const wl=[["path",{d:"M12 7v6",key:"lw1j43"}],["path",{d:"M15 10H9",key:"o6yqo3"}],["path",{d:"M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",key:"oz39mx"}]],Sl=F("bookmark-plus",wl);const _l=[["path",{d:"M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",key:"oz39mx"}]],_r=F("bookmark",_l);const El=[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]],kl=F("bug",El);const jl=[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]],ms=F("building-2",jl);const Pl=[["path",{d:"M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z",key:"trhst0"}],["path",{d:"M17 21v-2",key:"ds4u3f"}],["path",{d:"M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10",key:"1mo9zo"}],["path",{d:"M21 21v-2",key:"eo0ou"}],["path",{d:"M3 5V3",key:"1k5hjh"}],["path",{d:"M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z",key:"1dd30t"}],["path",{d:"M7 5V3",key:"1t1388"}]],Rl=F("cable",Pl);const Ml=[["path",{d:"M16 14v2.2l1.6 1",key:"fo4ql5"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]],Nl=F("calendar-clock",Ml);const Al=[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",key:"pzmjnu"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}]],Il=F("chart-pie",Al);const Ol=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],hn=F("check",Ol);const Dl=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],hs=F("chevron-down",Dl);const Tl=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],vs=F("chevron-right",Tl);const $l=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],gs=F("chevrons-up-down",$l);const Ll=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Fl=F("circle",Ll);const zl=[["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"}]],Bl=F("database",zl);const Vl=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Hl=F("file-text",Vl);const Ul=[["path",{d:"M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4",key:"1slcih"}]],Wl=F("flame",Ul);const Gl=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],Kl=F("gauge",Gl);const ql=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]],Yl=F("git-commit-horizontal",ql);const Xl=[["path",{d:"M10 16h.01",key:"1bzywj"}],["path",{d:"M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"18tbho"}],["path",{d:"M21.946 12.013H2.054",key:"zqlbp7"}],["path",{d:"M6 16h.01",key:"1pmjb7"}]],Zl=F("hard-drive",Xl);const Ql=[["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:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],Jl=F("layers",Ql);const ec=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],xs=F("layout-grid",ec);const tc=[["rect",{width:"18",height:"7",x:"3",y:"3",rx:"1",key:"f1a2em"}],["rect",{width:"9",height:"7",x:"3",y:"14",rx:"1",key:"jqznyg"}],["rect",{width:"5",height:"7",x:"16",y:"14",rx:"1",key:"q5h2i8"}]],nc=F("layout-template",tc);const rc=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],oc=F("link-2",rc);const sc=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],ic=F("log-out",sc);const ac=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],lc=F("mail",ac);const cc=[["path",{d:"M18 8V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h8",key:"10dyio"}],["path",{d:"M10 19v-3.96 3.15",key:"1irgej"}],["path",{d:"M7 19h5",key:"qswx4l"}],["rect",{width:"6",height:"10",x:"16",y:"12",rx:"2",key:"1egngj"}]],uc=F("monitor-smartphone",cc);const dc=[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]],bs=F("octagon-alert",dc);const fc=[["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"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],pc=F("package",fc);const mc=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],hc=F("panel-left",mc);const vc=[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]],gc=F("pin-off",vc);const xc=[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]],bc=F("pin",xc);const yc=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]],ys=F("plug",yc);const Cc=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],wc=F("plus",Cc);const Sc=[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",key:"u4xsad"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",key:"676m9"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05",key:"92ym6u"}]],_c=F("rocket",Sc);const Ec=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Er=F("search",Ec);const kc=[["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"}]],jc=F("server",kc);const Pc=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Rc=F("settings",Pc);const Mc=[["path",{d:"M7 18v-6a5 5 0 1 1 10 0v6",key:"pcx96s"}],["path",{d:"M5 21a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-1a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2z",key:"1b4s83"}],["path",{d:"M21 12h1",key:"jtio3y"}],["path",{d:"M18.5 4.5 18 5",key:"g5sp9y"}],["path",{d:"M2 12h1",key:"1uaihz"}],["path",{d:"M12 2v1",key:"11qlp1"}],["path",{d:"m4.929 4.929.707.707",key:"1i51kw"}],["path",{d:"M12 12v6",key:"3ahymv"}]],Nc=F("siren",Mc);const Ac=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],Ic=F("sparkles",Ac);const Oc=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Dc=F("terminal",Oc);const Tc=[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]],$c=F("timer",Tc);const Lc=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Fc=F("trash-2",Lc);const zc=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],kr=F("users",zc);const Bc=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]],Vc=F("workflow",Bc);function Hc(t){const e=P.c(13),{className:n}=t,r=d.useId();let o;e[0]!==n?(o=A("text-foreground/35 dark:text-foreground/40 pointer-events-none absolute inset-x-0 top-1/2 h-12 w-full -translate-y-1/2","[mask-composite:intersect]","[mask-image:linear-gradient(to_right,transparent,black_10%,black_90%,transparent),radial-gradient(ellipse_200px_160%_at_50%_50%,transparent_20%,black_100%)]","md:[mask-image:linear-gradient(to_right,transparent,black_10%,black_90%,transparent),radial-gradient(ellipse_300px_160%_at_50%_50%,transparent_35%,black_100%)]",n),e[0]=n,e[1]=o):o=e[1];let s;e[2]===Symbol.for("react.memo_cache_sentinel")?(s=l.jsx("rect",{x:"9",y:"9",width:"4",height:"30",rx:"1",fill:"currentColor"}),e[2]=s):s=e[2];let i;e[3]!==r?(i=l.jsx("defs",{children:l.jsx("pattern",{id:r,width:"22",height:"48",patternUnits:"userSpaceOnUse",children:s})}),e[3]=r,e[4]=i):i=e[4];const a=`url(#${r})`;let c;e[5]!==a?(c=l.jsx("rect",{width:"100%",height:"100%",fill:a}),e[5]=a,e[6]=c):c=e[6];let u,f;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=l.jsx("rect",{y:"16",width:"100%",height:"2.5",fill:"currentColor"}),f=l.jsx("rect",{y:"29.5",width:"100%",height:"2.5",fill:"currentColor"}),e[7]=u,e[8]=f):(u=e[7],f=e[8]);let p;return e[9]!==o||e[10]!==i||e[11]!==c?(p=l.jsxs("svg",{"aria-hidden":!0,className:o,preserveAspectRatio:"none",children:[i,c,u,f]}),e[9]=o,e[10]=i,e[11]=c,e[12]=p):p=e[12],p}const Uc={clear:"text-live",caution:"text-warning",stop:"text-danger"},Tn={stop:8,caution:17,clear:26},Wc=["stop","caution","clear"];function Gc(t){const e=P.c(8),{aspect:n,className:r}=t;let o;e[0]!==r?(o=A("pointer-events-none absolute top-1/2 h-16 w-5 -translate-y-[calc(50%+8px)]","left-[calc(50%+100px)] md:left-[calc(50%+150px)]",r),e[0]=r,e[1]=o):o=e[1];let s;e[2]===Symbol.for("react.memo_cache_sentinel")?(s=l.jsxs("g",{className:"text-foreground/35 dark:text-foreground/40",children:[l.jsx("rect",{x:"9",y:"33",width:"2",height:"26",rx:"1",fill:"currentColor"}),l.jsx("rect",{x:"5",y:"58",width:"10",height:"2",rx:"1",fill:"currentColor"}),l.jsx("rect",{x:"4.75",y:"1.75",width:"10.5",height:"31.5",rx:"5.25",fill:"none",stroke:"currentColor",strokeWidth:"1.5"})]}),e[2]=s):s=e[2];let i;e[3]!==n?(i=Wc.map(c=>c===n?l.jsxs("g",{className:Uc[c],"data-lamp":c,children:[l.jsx("circle",{cx:"10",cy:Tn[c],r:"6",fill:"currentColor",opacity:"0.2",className:"blur-[2px]"}),l.jsx("circle",{cx:"10",cy:Tn[c],r:"3",fill:"currentColor"})]},c):l.jsx("circle",{cx:"10",cy:Tn[c],r:"3",className:"text-foreground/15",fill:"currentColor"},c)),e[3]=n,e[4]=i):i=e[4];let a;return e[5]!==o||e[6]!==i?(a=l.jsxs("svg",{"aria-hidden":!0,viewBox:"0 0 20 64",className:o,children:[s,i]}),e[5]=o,e[6]=i,e[7]=a):a=e[7],a}function Jm(t){const e=P.c(22),{icon:n,title:r,description:o,action:s,signal:i,className:a}=t,c=i===void 0?"clear":i;let u;e[0]!==a?(u=A("relative flex min-h-48 items-center justify-center overflow-hidden px-4 py-8 text-center",a),e[0]=a,e[1]=u):u=e[1];let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=l.jsx(Hc,{}),e[2]=f):f=e[2];let p;e[3]!==c?(p=l.jsx(Gc,{aspect:c}),e[3]=c,e[4]=p):p=e[4];let m;e[5]!==n?(m=n&&l.jsx("span",{className:"bg-muted text-muted-foreground mb-1 flex size-9 items-center justify-center rounded-md",children:l.jsx(n,{className:"size-4"})}),e[5]=n,e[6]=m):m=e[6];let h;e[7]!==r?(h=l.jsx("span",{className:"text-sm font-medium",children:r}),e[7]=r,e[8]=h):h=e[8];let g;e[9]!==o?(g=o&&l.jsx("span",{className:"text-muted-foreground text-xs leading-relaxed",children:o}),e[9]=o,e[10]=g):g=e[10];let v;e[11]!==s?(v=s&&l.jsx("div",{className:"mt-2",children:s}),e[11]=s,e[12]=v):v=e[12];let x;e[13]!==m||e[14]!==h||e[15]!==g||e[16]!==v?(x=l.jsxs("div",{className:"relative flex max-w-xs flex-col items-center gap-1.5",children:[m,h,g,v]}),e[13]=m,e[14]=h,e[15]=g,e[16]=v,e[17]=x):x=e[17];let y;return e[18]!==u||e[19]!==p||e[20]!==x?(y=l.jsxs("div",{className:u,"aria-live":"polite",children:[f,p,x]}),e[18]=u,e[19]=p,e[20]=x,e[21]=y):y=e[21],y}var Kc=Object.defineProperty,jr=(t,e)=>Kc(t,"name",{value:e,configurable:!0});function er(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}jr(er,"setRef");function Je(...t){return e=>{let n=!1;const r=t.map(o=>{const s=er(o,e);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():er(t[o],null)}}}}jr(Je,"composeRefs");function ee(...t){return d.useCallback(Je(...t),t)}jr(ee,"useComposedRefs");var qc=Object.defineProperty,ye=(t,e)=>qc(t,"name",{value:e,configurable:!0});function $e(t){const e=d.forwardRef((n,r)=>{let{children:o,...s}=n,i=null,a=!1;const c=[];tr(o)&&typeof Yt=="function"&&(o=Yt(o._payload)),d.Children.forEach(o,m=>{if(Es(m)){a=!0;const h=m;let g="child"in h.props?h.props.child:h.props.children;tr(g)&&typeof Yt=="function"&&(g=Yt(g._payload)),i=Yc(h,g),c.push(i?.props?.children)}else c.push(m)}),i?i=d.cloneElement(i,void 0,c):!a&&d.Children.count(o)===1&&d.isValidElement(o)&&(i=o);const u=i?_s(i):void 0,f=ee(r,u);if(!i){if(o||o===0)throw new Error(a?Qc(t):Zc(t));return o}const p=Ss(s,i.props??{});return i.type!==d.Fragment&&(p.ref=r?f:u),d.cloneElement(i,p)});return e.displayName=`${t}.Slot`,e}ye($e,"createSlot");var Mt=$e("Slot"),Cs=Symbol.for("radix.slottable");function ws(t){const e=ye(n=>"child"in n?n.children(n.child):n.children,"Slottable");return e.displayName=`${t}.Slottable`,e.__radixId=Cs,e}ye(ws,"createSlottable");var Yc=ye((t,e)=>{if("child"in t.props){const n=t.props.child;return d.isValidElement(n)?d.cloneElement(n,void 0,t.props.children(n.props.children)):null}return d.isValidElement(e)?e:null},"getSlottableElementFromSlottable");function Ss(t,e){const n={...e};for(const r in e){const o=t[r],s=e[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...t,...n}}ye(Ss,"mergeProps");function _s(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}ye(_s,"getElementRef");function Es(t){return d.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Cs}ye(Es,"isSlottable");var Xc=Symbol.for("react.lazy");function tr(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===Xc&&"_payload"in t&&ks(t._payload)}ye(tr,"isLazyComponent");function ks(t){return typeof t=="object"&&t!==null&&"then"in t}ye(ks,"isPromiseLike");var Zc=ye(t=>`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),Qc=ye(t=>`${t} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),Yt=Rt[" use ".trim().toString()];const jo=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Po=Ia,Pr=(t,e)=>n=>{var r;if(e?.variants==null)return Po(t,n?.class,n?.className);const{variants:o,defaultVariants:s}=e,i=Object.keys(o).map(u=>{const f=n?.[u],p=s?.[u];if(f===null)return null;const m=jo(f)||jo(p);return o[u][m]}),a=n&&Object.entries(n).reduce((u,f)=>{let[p,m]=f;return m===void 0||(u[p]=m),u},{}),c=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((u,f)=>{let{class:p,className:m,...h}=f;return Object.entries(h).every(g=>{let[v,x]=g;return Array.isArray(x)?x.includes({...s,...a}[v]):{...s,...a}[v]===x})?[...u,p,m]:u},[]);return Po(t,i,c,n?.class,n?.className)},Jc=Pr("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 eh(t){const e=P.c(12);let n,r,o,s;e[0]!==t?({className:n,variant:s,asChild:o,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=o,e[4]=s):(n=e[1],r=e[2],o=e[3],s=e[4]);const a=(o===void 0?!1:o)?Mt:"span";let c;e[5]!==n||e[6]!==s?(c=A(Jc({variant:s}),n),e[5]=n,e[6]=s,e[7]=c):c=e[7];let u;return e[8]!==a||e[9]!==r||e[10]!==c?(u=l.jsx(a,{"data-slot":"badge",className:c,...r}),e[8]=a,e[9]=r,e[10]=c,e[11]=u):u=e[11],u}const eu=Pr("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 Et(t){const e=P.c(14);let n,r,o,s,i;e[0]!==t?({className:n,variant:i,size:o,asChild:s,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=o,e[4]=s,e[5]=i):(n=e[1],r=e[2],o=e[3],s=e[4],i=e[5]);const c=(s===void 0?!1:s)?Mt:"button";let u;e[6]!==n||e[7]!==o||e[8]!==i?(u=A(eu({variant:i,size:o,className:n})),e[6]=n,e[7]=o,e[8]=i,e[9]=u):u=e[9];let f;return e[10]!==c||e[11]!==r||e[12]!==u?(f=l.jsx(c,{"data-slot":"button",className:u,...r}),e[10]=c,e[11]=r,e[12]=u,e[13]=f):f=e[13],f}var Ro=1,tu=.9,nu=.8,ru=.17,$n=.1,Ln=.999,ou=.9999,su=.99,iu=/[\\\/_+.#"@\[\(\{&]/,au=/[\\\/_+.#"@\[\(\{&]/g,lu=/[\s-]/,js=/[\s-]/g;function nr(t,e,n,r,o,s,i){if(s===e.length)return o===t.length?Ro:su;var a=`${o},${s}`;if(i[a]!==void 0)return i[a];for(var c=r.charAt(s),u=n.indexOf(c,o),f=0,p,m,h,g;u>=0;)p=nr(t,e,n,r,u+1,s+1,i),p>f&&(u===o?p*=Ro:iu.test(t.charAt(u-1))?(p*=nu,h=t.slice(o,u-1).match(au),h&&o>0&&(p*=Math.pow(Ln,h.length))):lu.test(t.charAt(u-1))?(p*=tu,g=t.slice(o,u-1).match(js),g&&o>0&&(p*=Math.pow(Ln,g.length))):(p*=ru,o>0&&(p*=Math.pow(Ln,u-o))),t.charAt(u)!==e.charAt(s)&&(p*=ou)),(p<$n&&n.charAt(u-1)===r.charAt(s+1)||r.charAt(s+1)===r.charAt(s)&&n.charAt(u-1)!==r.charAt(s))&&(m=nr(t,e,n,r,u+1,s+2,i),m*$n>p&&(p=m*$n)),p>f&&(f=p),u=n.indexOf(c,u+1);return i[a]=f,f}function Mo(t){return t.toLowerCase().replace(js," ")}function cu(t,e,n){return t=n&&n.length>0?`${t+" "+n.join(" ")}`:t,nr(t,e,Mo(t),Mo(e),0,0,{})}var uu=Object.defineProperty,Nt=(t,e)=>uu(t,"name",{value:e,configurable:!0}),Ps=!!(typeof window<"u"&&window.document&&window.document.createElement);function V(t,e,{checkForDefaultPrevented:n=!0}={}){return Nt(function(o){if(t?.(o),n===!1||!o||!o.defaultPrevented)return e?.(o)},"handleEvent")}Nt(V,"composeEventHandlers");function du(t){if(!Ps)throw new Error("Cannot access window outside of the DOM");return t?.ownerDocument?.defaultView??window}Nt(du,"getOwnerWindow");function rr(t){if(!Ps)throw new Error("Cannot access document outside of the DOM");return t?.ownerDocument??document}Nt(rr,"getOwnerDocument");function Rs(t,e=!1){const{activeElement:n}=rr(t);if(!n?.nodeName)return null;if(Ms(n)&&n.contentDocument)return Rs(n.contentDocument.body,e);if(e){const r=n.getAttribute("aria-activedescendant");if(r){const o=rr(n).getElementById(r);if(o)return o}}return n}Nt(Rs,"getActiveElement");function Ms(t){return t.tagName==="IFRAME"}Nt(Ms,"isFrame");var fu=Object.defineProperty,me=(t,e)=>fu(t,"name",{value:e,configurable:!0});function pu(t,e){const n=d.createContext(e);n.displayName=t+"Context";const r=me(s=>{const{children:i,...a}=s,c=d.useMemo(()=>a,Object.values(a));return l.jsx(n.Provider,{value:c,children:i})},"Provider");r.displayName=t+"Provider";function o(s,i={}){const{optional:a=!1}=i,c=d.useContext(n);if(c)return c;if(e!==void 0)return e;if(!a)throw new Error(`\`${s}\` must be used within \`${t}\``)}return me(o,"useContext"),[r,o]}me(pu,"createContext");function he(t,e=[]){let n=[];function r(s,i){const a=d.createContext(i);a.displayName=s+"Context";const c=n.length;n=[...n,i];const u=me(p=>{const{scope:m,children:h,...g}=p,v=m?.[t]?.[c]||a,x=d.useMemo(()=>g,Object.values(g));return l.jsx(v.Provider,{value:x,children:h})},"Provider");u.displayName=s+"Provider";function f(p,m,h={}){const{optional:g=!1}=h,v=m?.[t]?.[c]||a,x=d.useContext(v);if(x)return x;if(i!==void 0)return i;if(!g)throw new Error(`\`${p}\` must be used within \`${s}\``)}return me(f,"useContext"),[u,f]}me(r,"createContext");const o=me(()=>{const s=n.map(i=>d.createContext(i));return me(function(a){const c=a?.[t]||s;return d.useMemo(()=>({[`__scope${t}`]:{...a,[t]:c}}),[a,c])},"useScope")},"createScope");return o.scopeName=t,[r,Ns(o,...e)]}me(he,"createContextScope");function Ns(...t){const e=t[0];if(t.length===1)return e;const n=me(()=>{const r=t.map(o=>({useScope:o(),scopeName:o.scopeName}));return me(function(s){const i=r.reduce((a,{useScope:c,scopeName:u})=>{const p=c(s)[`__scope${u}`];return{...a,...p}},{});return d.useMemo(()=>({[`__scope${e.scopeName}`]:i}),[i])},"useComposedScopes")},"createScope");return n.scopeName=e.scopeName,n}me(Ns,"composeContextScopes");var ae=globalThis?.document?d.useLayoutEffect:()=>{},mu=Object.defineProperty,hu=(t,e)=>mu(t,"name",{value:e,configurable:!0}),vu=Rt[" useId ".trim().toString()]||(()=>{}),gu=0;function ue(t){const[e,n]=d.useState(vu());return ae(()=>{t||n(r=>r??String(gu++))},[t]),t||(e?`radix-${e}`:"")}hu(ue,"useId");var xu=Object.defineProperty,bu=(t,e)=>xu(t,"name",{value:e,configurable:!0}),No=Rt[" useEffectEvent ".trim().toString()],Ao=Rt[" useInsertionEffect ".trim().toString()];function As(t){if(typeof No=="function")return No(t);const e=d.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof Ao=="function"?Ao(()=>{e.current=t}):ae(()=>{e.current=t}),d.useMemo(()=>((...n)=>e.current?.(...n)),[])}bu(As,"useEffectEvent");var yu=Object.defineProperty,Vt=(t,e)=>yu(t,"name",{value:e,configurable:!0}),Cu=Rt[" useInsertionEffect ".trim().toString()]||ae;function ot({prop:t,defaultProp:e,onChange:n=Vt(()=>{},"onChange"),caller:r}){const[o,s,i]=Is({defaultProp:e,onChange:n}),a=t!==void 0,c=a?t:o,u=d.useCallback(f=>{if(a){const p=Os(f)?f(t):f;p!==t&&i.current?.(p)}else s(f)},[a,t,s,i]);return[c,u]}Vt(ot,"useControllableState");function Is({defaultProp:t,onChange:e}){const[n,r]=d.useState(t),o=d.useRef(n),s=d.useRef(e);return Cu(()=>{s.current=e},[e]),d.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}Vt(Is,"useUncontrolledState");function Os(t){return typeof t=="function"}Vt(Os,"isFunction");var Io=Symbol("RADIX:SYNC_STATE");function wu(t,e,n,r){const{prop:o,defaultProp:s,onChange:i,caller:a}=e,c=o!==void 0,u=As(i),f=[{...n,state:s}];r&&f.push(r);const[p,m]=d.useReducer((x,y)=>{if(y.type===Io)return{...x,state:y.state};const C=t(x,y);return c&&!Object.is(C.state,x.state)&&u(C.state),C},...f),h=p.state,g=d.useRef(h);d.useEffect(()=>{g.current!==h&&(g.current=h,c||u(h))},[h,g,c]);const v=d.useMemo(()=>o!==void 0?{...p,state:o}:p,[p,o]);return d.useEffect(()=>{c&&!Object.is(o,p.state)&&m({type:Io,state:o})},[o,p.state,c]),[v,m]}Vt(wu,"useControllableStateReducer");var Su=Object.defineProperty,_u=(t,e)=>Su(t,"name",{value:e,configurable:!0}),Eu=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],K=Eu.reduce((t,e)=>{const n=$e(`Primitive.${e}`),r=d.forwardRef((o,s)=>{const{asChild:i,...a}=o,c=i?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...a,ref:s})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function Rr(t,e){t&&Sr.flushSync(()=>t.dispatchEvent(e))}_u(Rr,"dispatchDiscreteCustomEvent");var ku=Object.defineProperty,ju=(t,e)=>ku(t,"name",{value:e,configurable:!0});function xe(t){const e=d.useRef(t);return d.useEffect(()=>{e.current=t}),d.useMemo(()=>((...n)=>e.current?.(...n)),[])}ju(xe,"useCallbackRef");var Pu=Object.defineProperty,re=(t,e)=>Pu(t,"name",{value:e,configurable:!0}),or="dismissableLayer.update",Ru="dismissableLayer.pointerDownOutside",Mu="dismissableLayer.focusOutside",Oo,Ds=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Mr=d.forwardRef(re(function(e,n){const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:o=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:c,onDismiss:u,...f}=e,p=d.useContext(Ds),[m,h]=d.useState(null),g=m?.ownerDocument??globalThis?.document,[,v]=d.useState({}),x=ee(n,h),y=Array.from(p.layers),[C]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),b=C?y.indexOf(C):-1,w=m?y.indexOf(m):-1,_=p.layersWithOutsidePointerEventsDisabled.size>0,S=w>=b,E=d.useRef(!1),R=$s(N=>{i?.(N),c?.(N),N.defaultPrevented||u?.()},{ownerDocument:g,deferPointerDownOutside:o,isDeferredPointerDownOutsideRef:E,dismissableSurfaces:p.dismissableSurfaces,shouldHandlePointerDownOutside:d.useCallback(N=>{if(!(N instanceof Node))return!1;const $=[...p.branches].some(L=>L.contains(N));return S&&!$},[p.branches,S])}),j=Ls(N=>{if(o&&E.current)return;const $=N.target;[...p.branches].some(B=>B.contains($))||(a?.(N),c?.(N),N.defaultPrevented||u?.())},g),M=m?w===y.length-1:!1,I=xe(N=>{N.key==="Escape"&&(s?.(N),!N.defaultPrevented&&u&&(N.preventDefault(),u()))});return d.useEffect(()=>{if(M)return g.addEventListener("keydown",I,{capture:!0}),()=>g.removeEventListener("keydown",I,{capture:!0})},[g,M,I]),d.useEffect(()=>{if(m)return r&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(Oo=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(m)),p.layers.add(m),sr(),()=>{r&&(p.layersWithOutsidePointerEventsDisabled.delete(m),p.layersWithOutsidePointerEventsDisabled.size===0&&(g.body.style.pointerEvents=Oo))}},[m,g,r,p]),d.useEffect(()=>()=>{m&&(p.layers.delete(m),p.layersWithOutsidePointerEventsDisabled.delete(m),sr())},[m,p]),d.useEffect(()=>{const N=re(()=>v({}),"handleUpdate");return document.addEventListener(or,N),()=>document.removeEventListener(or,N)},[]),l.jsx(K.div,{...f,ref:x,style:{pointerEvents:_?S?"auto":"none":void 0,...e.style},onFocusCapture:V(e.onFocusCapture,j.onFocusCapture),onBlurCapture:V(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:V(e.onPointerDownCapture,R.onPointerDownCapture)})},"DismissableLayer"));function Ts(){const t=d.useContext(Ds),[e,n]=d.useState(null);return d.useEffect(()=>{if(e)return t.dismissableSurfaces.add(e),()=>{t.dismissableSurfaces.delete(e)}},[e,t.dismissableSurfaces]),n}re(Ts,"useDismissableLayerSurface");var Nu=re(()=>!0,"IS_TRUE");function $s(t,e){const{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:o,dismissableSurfaces:s,shouldHandlePointerDownOutside:i=Nu}=e,a=xe(t),c=d.useRef(!1),u=d.useRef(!1),f=d.useRef(new Map),p=d.useRef(()=>{});return d.useEffect(()=>{function m(){u.current=!1,o.current=!1,f.current.clear()}re(m,"resetOutsideInteraction");function h(){return Array.from(f.current.values()).some(Boolean)}re(h,"isOutsideInteractionIntercepted");function g(b){if(!u.current)return;const w=b.target;w instanceof Node&&[...s].some(S=>S.contains(w))||f.current.set(b.type,!0),b.type==="click"&&window.setTimeout(()=>{u.current&&p.current()},0)}re(g,"handleInteractionCapture");function v(b){u.current&&f.current.set(b.type,!1)}re(v,"handleInteractionBubble");const x=re(b=>{if(b.target&&!c.current){let w=function(){n.removeEventListener("click",p.current);const S=h();m(),S||Nr(Ru,a,_,{discrete:!0})};if(re(w,"handleAndDispatchPointerDownOutsideEvent"),!i(b.target)){n.removeEventListener("click",p.current),m(),c.current=!1;return}const _={originalEvent:b};u.current=!0,o.current=r&&b.button===0,f.current.clear(),!r||b.button!==0?w():(n.removeEventListener("click",p.current),p.current=w,n.addEventListener("click",p.current,{once:!0}))}else n.removeEventListener("click",p.current),m();c.current=!1},"handlePointerDown"),y=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const b of y)n.addEventListener(b,g,!0),n.addEventListener(b,v);const C=window.setTimeout(()=>{n.addEventListener("pointerdown",x)},0);return()=>{window.clearTimeout(C),n.removeEventListener("pointerdown",x),n.removeEventListener("click",p.current);for(const b of y)n.removeEventListener(b,g,!0),n.removeEventListener(b,v)}},[n,a,r,o,s,i]),{onPointerDownCapture:re(()=>c.current=!0,"onPointerDownCapture")}}re($s,"usePointerDownOutside");function Ls(t,e=globalThis?.document){const n=xe(t),r=d.useRef(!1);return d.useEffect(()=>{const o=re(s=>{s.target&&!r.current&&Nr(Mu,n,{originalEvent:s},{discrete:!1})},"handleFocus");return e.addEventListener("focusin",o),()=>e.removeEventListener("focusin",o)},[e,n]),{onFocusCapture:re(()=>r.current=!0,"onFocusCapture"),onBlurCapture:re(()=>r.current=!1,"onBlurCapture")}}re(Ls,"useFocusOutside");function sr(){const t=new CustomEvent(or);document.dispatchEvent(t)}re(sr,"dispatchUpdate");function Nr(t,e,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&o.addEventListener(t,e,{once:!0}),r?Rr(o,s):o.dispatchEvent(s)}re(Nr,"handleAndDispatchCustomEvent");var Au=Object.defineProperty,ce=(t,e)=>Au(t,"name",{value:e,configurable:!0}),Fn="focusScope.autoFocusOnMount",zn="focusScope.autoFocusOnUnmount",Do={bubbles:!1,cancelable:!0},Fs=d.forwardRef(ce(function(e,n){const{loop:r=!1,trapped:o=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...a}=e,[c,u]=d.useState(null),f=xe(s),p=xe(i),m=d.useRef(null),h=ee(n,u),g=d.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;d.useEffect(()=>{if(o){let x=function(w){if(g.paused||!c)return;const _=w.target;c.contains(_)?m.current=_:Ne(m.current,{select:!0})},y=function(w){if(g.paused||!c)return;const _=w.relatedTarget;_!==null&&(c.contains(_)||Ne(m.current,{select:!0}))},C=function(w){if(document.activeElement===document.body)for(const S of w)S.removedNodes.length>0&&Ne(c)};ce(x,"handleFocusIn"),ce(y,"handleFocusOut"),ce(C,"handleMutations"),document.addEventListener("focusin",x),document.addEventListener("focusout",y);const b=new MutationObserver(C);return c&&b.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",y),b.disconnect()}}},[o,c,g.paused]),d.useEffect(()=>{if(c){To.add(g);const x=document.activeElement;if(!c.contains(x)){const C=new CustomEvent(Fn,Do);c.addEventListener(Fn,f),c.dispatchEvent(C),C.defaultPrevented||(zs(Ws(Ar(c)),{select:!0}),document.activeElement===x&&Ne(c))}return()=>{c.removeEventListener(Fn,f),setTimeout(()=>{const C=new CustomEvent(zn,Do);c.addEventListener(zn,p),c.dispatchEvent(C),C.defaultPrevented||Ne(x??document.body,{select:!0}),c.removeEventListener(zn,p),To.remove(g)},0)}}},[c,f,p,g]);const v=d.useCallback(x=>{if(!r&&!o||g.paused)return;const y=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,C=document.activeElement;if(y&&C){const b=x.currentTarget,[w,_]=Bs(b);w&&_?!x.shiftKey&&C===_?(x.preventDefault(),r&&Ne(w,{select:!0})):x.shiftKey&&C===w&&(x.preventDefault(),r&&Ne(_,{select:!0})):C===b&&x.preventDefault()}},[r,o,g.paused]);return l.jsx(K.div,{tabIndex:-1,...a,ref:h,onKeyDown:v})},"FocusScope"));function zs(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(Ne(r,{select:e}),document.activeElement!==n)return}ce(zs,"focusFirst");function Bs(t){const e=Ar(t),n=ir(e,t),r=ir(e.reverse(),t);return[n,r]}ce(Bs,"getTabbableEdges");function Ar(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:ce(r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)e.push(n.currentNode);return e}ce(Ar,"getTabbableCandidates");function ir(t,e){const n=typeof e.checkVisibility=="function"&&e.checkVisibility({checkVisibilityCSS:!0});for(const r of t)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):Vs(r,{upTo:e})))return r}ce(ir,"findVisible");function Vs(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}ce(Vs,"isHidden");function Hs(t){return t instanceof HTMLInputElement&&"select"in t}ce(Hs,"isSelectableInput");function Ne(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&Hs(t)&&e&&t.select()}}ce(Ne,"focus");var To=Us();function Us(){let t=[];return{add(e){const n=t[0];e!==n&&n?.pause(),t=ar(t,e),t.unshift(e)},remove(e){t=ar(t,e),t[0]?.resume()}}}ce(Us,"createFocusScopesStack");function ar(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}ce(ar,"arrayRemove");function Ws(t){return t.filter(e=>e.tagName!=="A")}ce(Ws,"removeLinks");var Iu=Object.defineProperty,Ou=(t,e)=>Iu(t,"name",{value:e,configurable:!0}),Ir=d.forwardRef(Ou(function(e,n){const{container:r,...o}=e,[s,i]=d.useState(!1);ae(()=>i(!0),[]);const a=r||s&&globalThis?.document?.body;return a?Sr.createPortal(l.jsx(K.div,{...o,ref:n}),a):null},"Portal")),Du=Object.defineProperty,Le=(t,e)=>Du(t,"name",{value:e,configurable:!0});function Gs(t,e){return d.useReducer((n,r)=>e[n][r]??n,t)}Le(Gs,"useStateMachine");var Pe=Le(t=>{const{present:e,children:n}=t,r=Ks(e),o=typeof n=="function"?n({present:r.isPresent}):d.Children.only(n),s=qs(r.ref,Ys(o));return typeof n=="function"||r.isPresent?d.cloneElement(o,{ref:s}):null},"Presence");function Ks(t){const[e,n]=d.useState(),r=d.useRef(null),o=d.useRef(t),s=d.useRef("none"),i=d.useRef(void 0),a=t?"mounted":"unmounted",[c,u]=Gs(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{c==="mounted"?(s.current=i.current??wt(r.current),i.current=void 0):s.current="none"},[c]),ae(()=>{const f=r.current,p=o.current;if(p!==t){const h=s.current,g=wt(f);t?(i.current=g,u("MOUNT")):g==="none"||f?.display==="none"?u("UNMOUNT"):u(p&&h!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=t}},[t,u]),ae(()=>{if(e){let f;const p=e.ownerDocument.defaultView??window,m=Le(g=>{const x=wt(r.current).includes(CSS.escape(g.animationName));if(g.target===e&&x&&(u("ANIMATION_END"),!o.current)){const y=e.style.animationFillMode;e.style.animationFillMode="forwards",f=p.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=y)})}},"handleAnimationEnd"),h=Le(g=>{g.target===e&&(s.current=wt(r.current))},"handleAnimationStart");return e.addEventListener("animationstart",h),e.addEventListener("animationcancel",m),e.addEventListener("animationend",m),()=>{p.clearTimeout(f),e.removeEventListener("animationstart",h),e.removeEventListener("animationcancel",m),e.removeEventListener("animationend",m)}}else u("ANIMATION_END")},[e,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:d.useCallback(f=>{if(f){const p=getComputedStyle(f);r.current=p,i.current=wt(p)}else r.current=null;n(f)},[])}}Le(Ks,"usePresence");function lr(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}Le(lr,"setRef");function qs(...t){const e=d.useRef(t);return e.current=t,d.useCallback(n=>{const r=e.current;let o=!1;const s=r.map(i=>{const a=lr(i,n);return!o&&typeof a=="function"&&(o=!0),a});if(o)return()=>{for(let i=0;i<s.length;i++){const a=s[i];typeof a=="function"?a():lr(r[i],null)}}},[])}Le(qs,"useStableComposedRefs");function wt(t){return t?.animationName||"none"}Le(wt,"getAnimationName");function Ys(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}Le(Ys,"getElementRef");var Tu=Object.defineProperty,Or=(t,e)=>Tu(t,"name",{value:e,configurable:!0}),Xt=0,xt=null;function $u(t){return vn(),t.children}Or($u,"FocusGuards");function vn(){d.useEffect(()=>{xt||(xt={start:cr(),end:cr()});const{start:t,end:e}=xt;return document.body.firstElementChild!==t&&document.body.insertAdjacentElement("afterbegin",t),document.body.lastElementChild!==e&&document.body.insertAdjacentElement("beforeend",e),Xt++,()=>{Xt===1&&(xt?.start.remove(),xt?.end.remove(),xt=null),Xt=Math.max(0,Xt-1)}},[])}Or(vn,"useFocusGuards");function cr(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}Or(cr,"createFocusGuard");var Se=function(){return Se=Object.assign||function(e){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},Se.apply(this,arguments)};function Xs(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n}function Lu(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,s;r<o;r++)(s||!(r in e))&&(s||(s=Array.prototype.slice.call(e,0,r)),s[r]=e[r]);return t.concat(s||Array.prototype.slice.call(e))}var on="right-scroll-bar-position",sn="width-before-scroll-bar",Fu="with-scroll-bars-hidden",zu="--removed-body-scroll-bar-size";function Bn(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function Bu(t,e){var n=d.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=e,n.facade}var Vu=typeof window<"u"?d.useLayoutEffect:d.useEffect,$o=new WeakMap;function Hu(t,e){var n=Bu(null,function(r){return t.forEach(function(o){return Bn(o,r)})});return Vu(function(){var r=$o.get(n);if(r){var o=new Set(r),s=new Set(t),i=n.current;o.forEach(function(a){s.has(a)||Bn(a,null)}),s.forEach(function(a){o.has(a)||Bn(a,i)})}$o.set(n,t)},[t]),n}function Uu(t){return t}function Wu(t,e){e===void 0&&(e=Uu);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(s){var i=e(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var c=function(){var f=i;i=[],f.forEach(s)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(f){i.push(f),u()},filter:function(f){return i=i.filter(f),n}}}};return o}function Gu(t){t===void 0&&(t={});var e=Wu(null);return e.options=Se({async:!0,ssr:!1},t),e}var Zs=function(t){var e=t.sideCar,n=Xs(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return d.createElement(r,Se({},n))};Zs.isSideCarExport=!0;function Ku(t,e){return t.useMedium(e),Zs}var Qs=Gu(),Vn=function(){},gn=d.forwardRef(function(t,e){var n=d.useRef(null),r=d.useState({onScrollCapture:Vn,onWheelCapture:Vn,onTouchMoveCapture:Vn}),o=r[0],s=r[1],i=t.forwardProps,a=t.children,c=t.className,u=t.removeScrollBar,f=t.enabled,p=t.shards,m=t.sideCar,h=t.noRelative,g=t.noIsolation,v=t.inert,x=t.allowPinchZoom,y=t.as,C=y===void 0?"div":y,b=t.gapMode,w=Xs(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=m,S=Hu([n,e]),E=Se(Se({},w),o);return d.createElement(d.Fragment,null,f&&d.createElement(_,{sideCar:Qs,removeScrollBar:u,shards:p,noRelative:h,noIsolation:g,inert:v,setCallbacks:s,allowPinchZoom:!!x,lockRef:n,gapMode:b}),i?d.cloneElement(d.Children.only(a),Se(Se({},E),{ref:S})):d.createElement(C,Se({},E,{className:c,ref:S}),a))});gn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};gn.classNames={fullWidth:sn,zeroRight:on};var qu=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Yu(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=qu();return e&&t.setAttribute("nonce",e),t}function Xu(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function Zu(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var Qu=function(){var t=0,e=null;return{add:function(n){t==0&&(e=Yu())&&(Xu(e,n),Zu(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},Ju=function(){var t=Qu();return function(e,n){d.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},Js=function(){var t=Ju(),e=function(n){var r=n.styles,o=n.dynamic;return t(r,o),null};return e},ed={left:0,top:0,right:0,gap:0},Hn=function(t){return parseInt(t||"",10)||0},td=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],o=e[t==="padding"?"paddingRight":"marginRight"];return[Hn(n),Hn(r),Hn(o)]},nd=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return ed;var e=td(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},rd=Js(),kt="data-scroll-locked",od=function(t,e,n,r){var o=t.left,s=t.top,i=t.right,a=t.gap;return n===void 0&&(n="margin"),`
2
- .`.concat(Fu,` {
3
- overflow: hidden `).concat(r,`;
4
- padding-right: `).concat(a,"px ").concat(r,`;
5
- }
6
- body[`).concat(kt,`] {
7
- overflow: hidden `).concat(r,`;
8
- overscroll-behavior: contain;
9
- `).concat([e&&"position: relative ".concat(r,";"),n==="margin"&&`
10
- padding-left: `.concat(o,`px;
11
- padding-top: `).concat(s,`px;
12
- padding-right: `).concat(i,`px;
13
- margin-left:0;
14
- margin-top:0;
15
- margin-right: `).concat(a,"px ").concat(r,`;
16
- `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
17
- }
18
-
19
- .`).concat(on,` {
20
- right: `).concat(a,"px ").concat(r,`;
21
- }
22
-
23
- .`).concat(sn,` {
24
- margin-right: `).concat(a,"px ").concat(r,`;
25
- }
26
-
27
- .`).concat(on," .").concat(on,` {
28
- right: 0 `).concat(r,`;
29
- }
30
-
31
- .`).concat(sn," .").concat(sn,` {
32
- margin-right: 0 `).concat(r,`;
33
- }
34
-
35
- body[`).concat(kt,`] {
36
- `).concat(zu,": ").concat(a,`px;
37
- }
38
- `)},Lo=function(){var t=parseInt(document.body.getAttribute(kt)||"0",10);return isFinite(t)?t:0},sd=function(){d.useEffect(function(){return document.body.setAttribute(kt,(Lo()+1).toString()),function(){var t=Lo()-1;t<=0?document.body.removeAttribute(kt):document.body.setAttribute(kt,t.toString())}},[])},id=function(t){var e=t.noRelative,n=t.noImportant,r=t.gapMode,o=r===void 0?"margin":r;sd();var s=d.useMemo(function(){return nd(o)},[o]);return d.createElement(rd,{styles:od(s,!e,o,n?"":"!important")})},ur=!1;if(typeof window<"u")try{var Zt=Object.defineProperty({},"passive",{get:function(){return ur=!0,!0}});window.addEventListener("test",Zt,Zt),window.removeEventListener("test",Zt,Zt)}catch{ur=!1}var bt=ur?{passive:!1}:!1,ad=function(t){return t.tagName==="TEXTAREA"},ei=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!ad(t)&&n[e]==="visible")},ld=function(t){return ei(t,"overflowY")},cd=function(t){return ei(t,"overflowX")},Fo=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=ti(t,r);if(o){var s=ni(t,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},ud=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},dd=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},ti=function(t,e){return t==="v"?ld(e):cd(e)},ni=function(t,e){return t==="v"?ud(e):dd(e)},fd=function(t,e){return t==="h"&&e==="rtl"?-1:1},pd=function(t,e,n,r,o){var s=fd(t,window.getComputedStyle(e).direction),i=s*r,a=n.target,c=e.contains(a),u=!1,f=i>0,p=0,m=0;do{if(!a)break;var h=ni(t,a),g=h[0],v=h[1],x=h[2],y=v-x-s*g;(g||y)&&ti(t,a)&&(p+=y,m+=g);var C=a.parentNode;a=C&&C.nodeType===Node.DOCUMENT_FRAGMENT_NODE?C.host:C}while(!c&&a!==document.body||c&&(e.contains(a)||e===a));return(f&&Math.abs(p)<1||!f&&Math.abs(m)<1)&&(u=!0),u},Qt=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},zo=function(t){return[t.deltaX,t.deltaY]},Bo=function(t){return t&&"current"in t?t.current:t},md=function(t,e){return t[0]===e[0]&&t[1]===e[1]},hd=function(t){return`
39
- .block-interactivity-`.concat(t,` {pointer-events: none;}
40
- .allow-interactivity-`).concat(t,` {pointer-events: all;}
41
- `)},vd=0,yt=[];function gd(t){var e=d.useRef([]),n=d.useRef([0,0]),r=d.useRef(),o=d.useState(vd++)[0],s=d.useState(Js)[0],i=d.useRef(t);d.useEffect(function(){i.current=t},[t]),d.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(o));var v=Lu([t.lockRef.current],(t.shards||[]).map(Bo),!0).filter(Boolean);return v.forEach(function(x){return x.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),v.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(o))})}}},[t.inert,t.lockRef.current,t.shards]);var a=d.useCallback(function(v,x){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!i.current.allowPinchZoom;var y=Qt(v),C=n.current,b="deltaX"in v?v.deltaX:C[0]-y[0],w="deltaY"in v?v.deltaY:C[1]-y[1],_,S=v.target,E=Math.abs(b)>Math.abs(w)?"h":"v";if("touches"in v&&E==="h"&&S.type==="range")return!1;var R=window.getSelection(),j=R&&R.anchorNode,M=j?j===S||j.contains(S):!1;if(M)return!1;var I=Fo(E,S);if(!I)return!0;if(I?_=E:(_=E==="v"?"h":"v",I=Fo(E,S)),!I)return!1;if(!r.current&&"changedTouches"in v&&(b||w)&&(r.current=_),!_)return!0;var N=r.current||_;return pd(N,x,v,N==="h"?b:w)},[]),c=d.useCallback(function(v){var x=v;if(!(!yt.length||yt[yt.length-1]!==s)){var y="deltaY"in x?zo(x):Qt(x),C=e.current.filter(function(_){return _.name===x.type&&(_.target===x.target||x.target===_.shadowParent)&&md(_.delta,y)})[0];if(C&&C.should){x.cancelable&&x.preventDefault();return}if(!C){var b=(i.current.shards||[]).map(Bo).filter(Boolean).filter(function(_){return _.contains(x.target)}),w=b.length>0?a(x,b[0]):!i.current.noIsolation;w&&x.cancelable&&x.preventDefault()}}},[]),u=d.useCallback(function(v,x,y,C){var b={name:v,delta:x,target:y,should:C,shadowParent:xd(y)};e.current.push(b),setTimeout(function(){e.current=e.current.filter(function(w){return w!==b})},1)},[]),f=d.useCallback(function(v){n.current=Qt(v),r.current=void 0},[]),p=d.useCallback(function(v){u(v.type,zo(v),v.target,a(v,t.lockRef.current))},[]),m=d.useCallback(function(v){u(v.type,Qt(v),v.target,a(v,t.lockRef.current))},[]);d.useEffect(function(){return yt.push(s),t.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:m}),document.addEventListener("wheel",c,bt),document.addEventListener("touchmove",c,bt),document.addEventListener("touchstart",f,bt),function(){yt=yt.filter(function(v){return v!==s}),document.removeEventListener("wheel",c,bt),document.removeEventListener("touchmove",c,bt),document.removeEventListener("touchstart",f,bt)}},[]);var h=t.removeScrollBar,g=t.inert;return d.createElement(d.Fragment,null,g?d.createElement(s,{styles:hd(o)}):null,h?d.createElement(id,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function xd(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const bd=Ku(Qs,gd);var Dr=d.forwardRef(function(t,e){return d.createElement(gn,Se({},t,{ref:e,sideCar:bd}))});Dr.classNames=gn.classNames;var yd=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Ct=new WeakMap,Jt=new WeakMap,en={},Un=0,ri=function(t){return t&&(t.host||ri(t.parentNode))},Cd=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=ri(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},wd=function(t,e,n,r){var o=Cd(e,Array.isArray(t)?t:[t]);en[n]||(en[n]=new WeakMap);var s=en[n],i=[],a=new Set,c=new Set(o),u=function(p){!p||a.has(p)||(a.add(p),u(p.parentNode))};o.forEach(u);var f=function(p){!p||c.has(p)||Array.prototype.forEach.call(p.children,function(m){if(a.has(m))f(m);else try{var h=m.getAttribute(r),g=h!==null&&h!=="false",v=(Ct.get(m)||0)+1,x=(s.get(m)||0)+1;Ct.set(m,v),s.set(m,x),i.push(m),v===1&&g&&Jt.set(m,!0),x===1&&m.setAttribute(n,"true"),g||m.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",m,y)}})};return f(e),a.clear(),Un++,function(){i.forEach(function(p){var m=Ct.get(p)-1,h=s.get(p)-1;Ct.set(p,m),s.set(p,h),m||(Jt.has(p)||p.removeAttribute(r),Jt.delete(p)),h||p.removeAttribute(n)}),Un--,Un||(Ct=new WeakMap,Ct=new WeakMap,Jt=new WeakMap,en={})}},oi=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),o=yd(t);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),wd(r,o,n,"aria-hidden")):function(){return null}},Sd=Object.defineProperty,ve=(t,e)=>Sd(t,"name",{value:e,configurable:!0}),Tr="Dialog",[si,th]=he(Tr),[_d,Re]=si(Tr),$r=ve(t=>{const{__scopeDialog:e,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!0}=t,a=d.useRef(null),c=d.useRef(null),[u,f]=ot({prop:r,defaultProp:o??!1,onChange:s,caller:Tr}),[p,m]=d.useState(0),[h,g]=d.useState(0);return l.jsx(_d,{scope:e,triggerRef:a,contentRef:c,contentId:ue(),titleId:ue(),descriptionId:ue(),titlePresent:p>0,descriptionPresent:h>0,setTitleCount:m,setDescriptionCount:g,open:u,onOpenChange:f,onOpenToggle:d.useCallback(()=>f(v=>!v),[f]),modal:i,children:n})},"Dialog"),ii="DialogPortal",[Ed,ai]=si(ii,{forceMount:void 0}),Lr=ve(t=>{const{__scopeDialog:e,forceMount:n,children:r,container:o}=t,s=Re(ii,e);return l.jsx(Ed,{scope:e,forceMount:n,children:d.Children.map(r,i=>l.jsx(Pe,{present:n||s.open,children:l.jsx(Ir,{asChild:!0,container:o,children:i})}))})},"DialogPortal"),dr="DialogOverlay",Fr=d.forwardRef(ve(function(e,n){const r=ai(dr,e.__scopeDialog),{forceMount:o=r.forceMount,...s}=e,i=Re(dr,e.__scopeDialog);return i.modal?l.jsx(Pe,{present:o||i.open,children:l.jsx(jd,{...s,ref:n})}):null},"DialogOverlay")),kd=$e("DialogOverlay.RemoveScroll"),jd=d.forwardRef(ve(function(e,n){const{__scopeDialog:r,...o}=e,s=Re(dr,r),i=Ts(),a=ee(n,i);return l.jsx(Dr,{as:kd,allowPinchZoom:!0,shards:[s.contentRef],children:l.jsx(K.div,{"data-state":Vr(s.open),...o,ref:a,style:{pointerEvents:"auto",...o.style}})})},"DialogOverlayImpl")),$t="DialogContent",zr=d.forwardRef(ve(function(e,n){const r=ai($t,e.__scopeDialog),{forceMount:o=r.forceMount,...s}=e,i=Re($t,e.__scopeDialog);return l.jsx(Pe,{present:o||i.open,children:i.modal?l.jsx(Pd,{...s,ref:n}):l.jsx(Rd,{...s,ref:n})})},"DialogContent")),Pd=d.forwardRef(ve(function(e,n){const r=Re($t,e.__scopeDialog),o=d.useRef(null),s=ee(n,r.contentRef,o);return d.useEffect(()=>{const i=o.current;if(i)return oi(i)},[]),l.jsx(li,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:V(e.onCloseAutoFocus,i=>{i.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:V(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0;(a.button===2||c)&&i.preventDefault()}),onFocusOutside:V(e.onFocusOutside,i=>i.preventDefault())})},"DialogContentModal")),Rd=d.forwardRef(ve(function(e,n){const r=Re($t,e.__scopeDialog),o=d.useRef(!1),s=d.useRef(!1);return l.jsx(li,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),i.defaultPrevented||(o.current||r.triggerRef.current?.focus(),i.preventDefault()),o.current=!1,s.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),i.defaultPrevented||(o.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const a=i.target;r.triggerRef.current?.contains(a)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})},"DialogContentNonModal")),li=d.forwardRef(ve(function(e,n){const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:i,...a}=e,c=Re($t,r);return vn(),l.jsx(l.Fragment,{children:l.jsx(Fs,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:s,onUnmountAutoFocus:i,children:l.jsx(Mr,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionPresent?c.descriptionId:void 0,"aria-labelledby":c.titlePresent?c.titleId:void 0,"data-state":Vr(c.open),...a,ref:n,deferPointerDownOutside:!0,onDismiss:()=>c.onOpenChange(!1)})})})},"DialogContentImpl")),Md="DialogTitle",ci=d.forwardRef(ve(function(e,n){const{__scopeDialog:r,...o}=e,s=Re(Md,r),{setTitleCount:i}=s;return ae(()=>(i(a=>a+1),()=>i(a=>a-1)),[i]),l.jsx(K.h2,{id:s.titleId,...o,ref:n})},"DialogTitle")),Nd="DialogDescription",ui=d.forwardRef(ve(function(e,n){const{__scopeDialog:r,...o}=e,s=Re(Nd,r),{setDescriptionCount:i}=s;return ae(()=>(i(a=>a+1),()=>i(a=>a-1)),[i]),l.jsx(K.p,{id:s.descriptionId,...o,ref:n})},"DialogDescription")),Ad="DialogClose",Br=d.forwardRef(ve(function(e,n){const{__scopeDialog:r,...o}=e,s=Re(Ad,r);return l.jsx(K.button,{type:"button",...o,ref:n,onClick:V(e.onClick,()=>s.onOpenChange(!1))})},"DialogClose"));function Vr(t){return t?"open":"closed"}ve(Vr,"getState");var Ot='[cmdk-group=""]',Wn='[cmdk-group-items=""]',Id='[cmdk-group-heading=""]',di='[cmdk-item=""]',Vo=`${di}:not([aria-disabled="true"])`,fr="cmdk-item-select",St="data-value",Od=(t,e,n)=>cu(t,e,n),fi=d.createContext(void 0),Ht=()=>d.useContext(fi),pi=d.createContext(void 0),Hr=()=>d.useContext(pi),mi=d.createContext(void 0),hi=d.forwardRef((t,e)=>{let n=_t(()=>{var k,T;return{search:"",value:(T=(k=t.value)!=null?k:t.defaultValue)!=null?T:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=_t(()=>new Set),o=_t(()=>new Map),s=_t(()=>new Map),i=_t(()=>new Set),a=vi(t),{label:c,children:u,value:f,onValueChange:p,filter:m,shouldFilter:h,loop:g,disablePointerSelection:v=!1,vimBindings:x=!0,...y}=t,C=ue(),b=ue(),w=ue(),_=d.useRef(null),S=Wd();et(()=>{if(f!==void 0){let k=f.trim();n.current.value=k,E.emit()}},[f]),et(()=>{S(6,$)},[]);let E=d.useMemo(()=>({subscribe:k=>(i.current.add(k),()=>i.current.delete(k)),snapshot:()=>n.current,setState:(k,T,z)=>{var O,W,G,Y;if(!Object.is(n.current[k],T)){if(n.current[k]=T,k==="search")N(),M(),S(1,I);else if(k==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let Q=document.getElementById(w);Q?Q.focus():(O=document.getElementById(C))==null||O.focus()}if(S(7,()=>{var Q;n.current.selectedItemId=(Q=L())==null?void 0:Q.id,E.emit()}),z||S(5,$),((W=a.current)==null?void 0:W.value)!==void 0){let Q=T??"";(Y=(G=a.current).onValueChange)==null||Y.call(G,Q);return}}E.emit()}},emit:()=>{i.current.forEach(k=>k())}}),[]),R=d.useMemo(()=>({value:(k,T,z)=>{var O;T!==((O=s.current.get(k))==null?void 0:O.value)&&(s.current.set(k,{value:T,keywords:z}),n.current.filtered.items.set(k,j(T,z)),S(2,()=>{M(),E.emit()}))},item:(k,T)=>(r.current.add(k),T&&(o.current.has(T)?o.current.get(T).add(k):o.current.set(T,new Set([k]))),S(3,()=>{N(),M(),n.current.value||I(),E.emit()}),()=>{s.current.delete(k),r.current.delete(k),n.current.filtered.items.delete(k);let z=L();S(4,()=>{N(),z?.getAttribute("id")===k&&I(),E.emit()})}),group:k=>(o.current.has(k)||o.current.set(k,new Set),()=>{s.current.delete(k),o.current.delete(k)}),filter:()=>a.current.shouldFilter,label:c||t["aria-label"],getDisablePointerSelection:()=>a.current.disablePointerSelection,listId:C,inputId:w,labelId:b,listInnerRef:_}),[]);function j(k,T){var z,O;let W=(O=(z=a.current)==null?void 0:z.filter)!=null?O:Od;return k?W(k,n.current.search,T):0}function M(){if(!n.current.search||a.current.shouldFilter===!1)return;let k=n.current.filtered.items,T=[];n.current.filtered.groups.forEach(O=>{let W=o.current.get(O),G=0;W.forEach(Y=>{let Q=k.get(Y);G=Math.max(Q,G)}),T.push([O,G])});let z=_.current;B().sort((O,W)=>{var G,Y;let Q=O.getAttribute("id"),de=W.getAttribute("id");return((G=k.get(de))!=null?G:0)-((Y=k.get(Q))!=null?Y:0)}).forEach(O=>{let W=O.closest(Wn);W?W.appendChild(O.parentElement===W?O:O.closest(`${Wn} > *`)):z.appendChild(O.parentElement===z?O:O.closest(`${Wn} > *`))}),T.sort((O,W)=>W[1]-O[1]).forEach(O=>{var W;let G=(W=_.current)==null?void 0:W.querySelector(`${Ot}[${St}="${encodeURIComponent(O[0])}"]`);G?.parentElement.appendChild(G)})}function I(){let k=B().find(z=>z.getAttribute("aria-disabled")!=="true"),T=k?.getAttribute(St);E.setState("value",T||void 0)}function N(){var k,T,z,O;if(!n.current.search||a.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let W=0;for(let G of r.current){let Y=(T=(k=s.current.get(G))==null?void 0:k.value)!=null?T:"",Q=(O=(z=s.current.get(G))==null?void 0:z.keywords)!=null?O:[],de=j(Y,Q);n.current.filtered.items.set(G,de),de>0&&W++}for(let[G,Y]of o.current)for(let Q of Y)if(n.current.filtered.items.get(Q)>0){n.current.filtered.groups.add(G);break}n.current.filtered.count=W}function $(){var k,T,z;let O=L();O&&(((k=O.parentElement)==null?void 0:k.firstChild)===O&&((z=(T=O.closest(Ot))==null?void 0:T.querySelector(Id))==null||z.scrollIntoView({block:"nearest"})),O.scrollIntoView({block:"nearest"}))}function L(){var k;return(k=_.current)==null?void 0:k.querySelector(`${di}[aria-selected="true"]`)}function B(){var k;return Array.from(((k=_.current)==null?void 0:k.querySelectorAll(Vo))||[])}function X(k){let T=B()[k];T&&E.setState("value",T.getAttribute(St))}function H(k){var T;let z=L(),O=B(),W=O.findIndex(Y=>Y===z),G=O[W+k];(T=a.current)!=null&&T.loop&&(G=W+k<0?O[O.length-1]:W+k===O.length?O[0]:O[W+k]),G&&E.setState("value",G.getAttribute(St))}function U(k){let T=L(),z=T?.closest(Ot),O;for(;z&&!O;)z=k>0?Hd(z,Ot):Ud(z,Ot),O=z?.querySelector(Vo);O?E.setState("value",O.getAttribute(St)):H(k)}let q=()=>X(B().length-1),D=k=>{k.preventDefault(),k.metaKey?q():k.altKey?U(1):H(1)},se=k=>{k.preventDefault(),k.metaKey?X(0):k.altKey?U(-1):H(-1)};return d.createElement(K.div,{ref:e,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:k=>{var T;(T=y.onKeyDown)==null||T.call(y,k);let z=k.nativeEvent.isComposing||k.keyCode===229;if(!(k.defaultPrevented||z))switch(k.key){case"n":case"j":{x&&k.ctrlKey&&D(k);break}case"ArrowDown":{D(k);break}case"p":case"k":{x&&k.ctrlKey&&se(k);break}case"ArrowUp":{se(k);break}case"Home":{k.preventDefault(),X(0);break}case"End":{k.preventDefault(),q();break}case"Enter":{k.preventDefault();let O=L();if(O){let W=new Event(fr);O.dispatchEvent(W)}}}}},d.createElement("label",{"cmdk-label":"",htmlFor:R.inputId,id:R.labelId,style:Kd},c),xn(t,k=>d.createElement(pi.Provider,{value:E},d.createElement(fi.Provider,{value:R},k))))}),Dd=d.forwardRef((t,e)=>{var n,r;let o=ue(),s=d.useRef(null),i=d.useContext(mi),a=Ht(),c=vi(t),u=(r=(n=c.current)==null?void 0:n.forceMount)!=null?r:i?.forceMount;et(()=>{if(!u)return a.item(o,i?.id)},[u]);let f=gi(o,s,[t.value,t.children,s],t.keywords),p=Hr(),m=Ge(S=>S.value&&S.value===f.current),h=Ge(S=>u||a.filter()===!1?!0:S.search?S.filtered.items.get(o)>0:!0);d.useEffect(()=>{let S=s.current;if(!(!S||t.disabled))return S.addEventListener(fr,g),()=>S.removeEventListener(fr,g)},[h,t.onSelect,t.disabled]);function g(){var S,E;v(),(E=(S=c.current).onSelect)==null||E.call(S,f.current)}function v(){p.setState("value",f.current,!0)}if(!h)return null;let{disabled:x,value:y,onSelect:C,forceMount:b,keywords:w,..._}=t;return d.createElement(K.div,{ref:Je(s,e),..._,id:o,"cmdk-item":"",role:"option","aria-disabled":!!x,"aria-selected":!!m,"data-disabled":!!x,"data-selected":!!m,onPointerMove:x||a.getDisablePointerSelection()?void 0:v,onClick:x?void 0:g},t.children)}),Td=d.forwardRef((t,e)=>{let{heading:n,children:r,forceMount:o,...s}=t,i=ue(),a=d.useRef(null),c=d.useRef(null),u=ue(),f=Ht(),p=Ge(h=>o||f.filter()===!1?!0:h.search?h.filtered.groups.has(i):!0);et(()=>f.group(i),[]),gi(i,a,[t.value,t.heading,c]);let m=d.useMemo(()=>({id:i,forceMount:o}),[o]);return d.createElement(K.div,{ref:Je(a,e),...s,"cmdk-group":"",role:"presentation",hidden:p?void 0:!0},n&&d.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),xn(t,h=>d.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},d.createElement(mi.Provider,{value:m},h))))}),$d=d.forwardRef((t,e)=>{let{alwaysRender:n,...r}=t,o=d.useRef(null),s=Ge(i=>!i.search);return!n&&!s?null:d.createElement(K.div,{ref:Je(o,e),...r,"cmdk-separator":"",role:"separator"})}),Ld=d.forwardRef((t,e)=>{let{onValueChange:n,...r}=t,o=t.value!=null,s=Hr(),i=Ge(u=>u.search),a=Ge(u=>u.selectedItemId),c=Ht();return d.useEffect(()=>{t.value!=null&&s.setState("search",t.value)},[t.value]),d.createElement(K.input,{ref:e,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":a,id:c.inputId,type:"text",value:o?t.value:i,onChange:u=>{o||s.setState("search",u.target.value),n?.(u.target.value)}})}),Fd=d.forwardRef((t,e)=>{let{children:n,label:r="Suggestions",...o}=t,s=d.useRef(null),i=d.useRef(null),a=Ge(u=>u.selectedItemId),c=Ht();return d.useEffect(()=>{if(i.current&&s.current){let u=i.current,f=s.current,p,m=new ResizeObserver(()=>{p=requestAnimationFrame(()=>{let h=u.offsetHeight;f.style.setProperty("--cmdk-list-height",h.toFixed(1)+"px")})});return m.observe(u),()=>{cancelAnimationFrame(p),m.unobserve(u)}}},[]),d.createElement(K.div,{ref:Je(s,e),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":a,"aria-label":r,id:c.listId},xn(t,u=>d.createElement("div",{ref:Je(i,c.listInnerRef),"cmdk-list-sizer":""},u)))}),zd=d.forwardRef((t,e)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:s,container:i,...a}=t;return d.createElement($r,{open:n,onOpenChange:r},d.createElement(Lr,{container:i},d.createElement(Fr,{"cmdk-overlay":"",className:o}),d.createElement(zr,{"aria-label":t.label,"cmdk-dialog":"",className:s},d.createElement(hi,{ref:e,...a}))))}),Bd=d.forwardRef((t,e)=>Ge(n=>n.filtered.count===0)?d.createElement(K.div,{ref:e,...t,"cmdk-empty":"",role:"presentation"}):null),Vd=d.forwardRef((t,e)=>{let{progress:n,children:r,label:o="Loading...",...s}=t;return d.createElement(K.div,{ref:e,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},xn(t,i=>d.createElement("div",{"aria-hidden":!0},i)))}),st=Object.assign(hi,{List:Fd,Item:Dd,Input:Ld,Group:Td,Separator:$d,Dialog:zd,Empty:Bd,Loading:Vd});function Hd(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return n;n=n.nextElementSibling}}function Ud(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return n;n=n.previousElementSibling}}function vi(t){let e=d.useRef(t);return et(()=>{e.current=t}),e}var et=typeof window>"u"?d.useEffect:d.useLayoutEffect;function _t(t){let e=d.useRef();return e.current===void 0&&(e.current=t()),e}function Ge(t){let e=Hr(),n=()=>t(e.snapshot());return d.useSyncExternalStore(e.subscribe,n,n)}function gi(t,e,n,r=[]){let o=d.useRef(),s=Ht();return et(()=>{var i;let a=(()=>{var u;for(let f of n){if(typeof f=="string")return f.trim();if(typeof f=="object"&&"current"in f)return f.current?(u=f.current.textContent)==null?void 0:u.trim():o.current}})(),c=r.map(u=>u.trim());s.value(t,a,c),(i=e.current)==null||i.setAttribute(St,a),o.current=a}),o}var Wd=()=>{let[t,e]=d.useState(),n=_t(()=>new Map);return et(()=>{n.current.forEach(r=>r()),n.current=new Map},[t]),(r,o)=>{n.current.set(r,o),e({})}};function Gd(t){let e=t.type;return typeof e=="function"?e(t.props):"render"in e?e.render(t.props):t}function xn({asChild:t,children:e},n){return t&&d.isValidElement(e)?d.cloneElement(Gd(e),{ref:e.ref},n(e.props.children)):n(e)}var Kd={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"},qd=Object.defineProperty,Yd=(t,e)=>qd(t,"name",{value:e,configurable:!0}),Xd=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Zd=d.forwardRef(Yd(function(e,n){return l.jsx(K.span,{...e,ref:n,style:{...Xd,...e.style}})},"VisuallyHidden")),Qd=Zd,Jd=Object.defineProperty,oe=(t,e)=>Jd(t,"name",{value:e,configurable:!0});function Ur(t){const e=t+"CollectionProvider",[n,r]=he(e),[o,s]=n(e,{collectionRef:{current:null},itemMap:new Map}),i=oe(v=>{const{scope:x,children:y}=v,C=d.useRef(null),b=d.useRef(new Map).current;return l.jsx(o,{scope:x,itemMap:b,collectionRef:C,children:y})},"CollectionProvider");i.displayName=e;const a=t+"CollectionSlot",c=$e(a),u=d.forwardRef((v,x)=>{const{scope:y,children:C}=v,b=s(a,y),w=ee(x,b.collectionRef);return l.jsx(c,{ref:w,children:C})});u.displayName=a;const f=t+"CollectionItemSlot",p="data-radix-collection-item",m=$e(f),h=d.forwardRef((v,x)=>{const{scope:y,children:C,...b}=v,w=d.useRef(null),_=ee(x,w),S=s(f,y);return d.useEffect(()=>(S.itemMap.set(w,{ref:w,...b}),()=>{S.itemMap.delete(w)})),l.jsx(m,{[p]:"",ref:_,children:C})});h.displayName=f;function g(v){const x=s(t+"CollectionConsumer",v);return d.useCallback(()=>{const C=x.collectionRef.current;if(!C)return[];const b=Array.from(C.querySelectorAll(`[${p}]`));return Array.from(x.itemMap.values()).sort((S,E)=>b.indexOf(S.ref.current)-b.indexOf(E.ref.current))},[x.collectionRef,x.itemMap])}return oe(g,"useCollection"),[{Provider:i,Slot:u,ItemSlot:h},g,r]}oe(Ur,"createCollection");var Ho=new WeakMap,te,pe,Gn=(pe=class extends Map{constructor(n){super(n);ko(this,te);Dn(this,te,[...super.keys()]),Ho.set(this,!0)}set(n,r){return Ho.get(this)&&(this.has(n)?le(this,te)[le(this,te).indexOf(n)]=n:le(this,te).push(n)),super.set(n,r),this}insert(n,r,o){const s=this.has(r),i=le(this,te).length,a=Wr(n);let c=a>=0?a:i+a;const u=c<0||c>=i?-1:c;if(u===this.size||s&&u===this.size-1||u===-1)return this.set(r,o),this;const f=this.size+(s?0:1);a<0&&c++;const p=[...le(this,te)];let m,h=!1;for(let g=c;g<f;g++)if(c===g){let v=p[g];p[g]===r&&(v=p[g+1]),s&&this.delete(r),m=this.get(v),this.set(r,o)}else{!h&&p[g-1]===r&&(h=!0);const v=p[h?g:g-1],x=m;m=this.get(v),this.delete(v),this.set(v,x)}return this}with(n,r,o){const s=new pe(this);return s.insert(n,r,o),s}before(n){const r=le(this,te).indexOf(n)-1;if(!(r<0))return this.entryAt(r)}setBefore(n,r,o){const s=le(this,te).indexOf(n);return s===-1?this:this.insert(s,r,o)}after(n){let r=le(this,te).indexOf(n);if(r=r===-1||r===this.size-1?-1:r+1,r!==-1)return this.entryAt(r)}setAfter(n,r,o){const s=le(this,te).indexOf(n);return s===-1?this:this.insert(s+1,r,o)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return Dn(this,te,[]),super.clear()}delete(n){const r=super.delete(n);return r&&le(this,te).splice(le(this,te).indexOf(n),1),r}deleteAt(n){const r=this.keyAt(n);return r!==void 0?this.delete(r):!1}at(n){const r=an(le(this,te),n);if(r!==void 0)return this.get(r)}entryAt(n){const r=an(le(this,te),n);if(r!==void 0)return[r,this.get(r)]}indexOf(n){return le(this,te).indexOf(n)}keyAt(n){return an(le(this,te),n)}from(n,r){const o=this.indexOf(n);if(o===-1)return;let s=o+r;return s<0&&(s=0),s>=this.size&&(s=this.size-1),this.at(s)}keyFrom(n,r){const o=this.indexOf(n);if(o===-1)return;let s=o+r;return s<0&&(s=0),s>=this.size&&(s=this.size-1),this.keyAt(s)}find(n,r){let o=0;for(const s of this){if(Reflect.apply(n,r,[s,o,this]))return s;o++}}findIndex(n,r){let o=0;for(const s of this){if(Reflect.apply(n,r,[s,o,this]))return o;o++}return-1}filter(n,r){const o=[];let s=0;for(const i of this)Reflect.apply(n,r,[i,s,this])&&o.push(i),s++;return new pe(o)}map(n,r){const o=[];let s=0;for(const i of this)o.push([i[0],Reflect.apply(n,r,[i,s,this])]),s++;return new pe(o)}reduce(...n){const[r,o]=n;let s=0,i=o??this.at(0);for(const a of this)s===0&&n.length===1?i=a:i=Reflect.apply(r,this,[i,a,s,this]),s++;return i}reduceRight(...n){const[r,o]=n;let s=o??this.at(-1);for(let i=this.size-1;i>=0;i--){const a=this.at(i);i===this.size-1&&n.length===1?s=a:s=Reflect.apply(r,this,[s,a,i,this])}return s}toSorted(n){const r=[...this.entries()].sort(n);return new pe(r)}toReversed(){const n=new pe;for(let r=this.size-1;r>=0;r--){const o=this.keyAt(r),s=this.get(o);n.set(o,s)}return n}toSpliced(...n){const r=[...this.entries()];return r.splice(...n),new pe(r)}slice(n,r){const o=new pe;let s=this.size-1;if(n===void 0)return o;n<0&&(n=n+this.size),r!==void 0&&r>0&&(s=r-1);for(let i=n;i<=s;i++){const a=this.keyAt(i),c=this.get(a);o.set(a,c)}return o}every(n,r){let o=0;for(const s of this){if(!Reflect.apply(n,r,[s,o,this]))return!1;o++}return!0}some(n,r){let o=0;for(const s of this){if(Reflect.apply(n,r,[s,o,this]))return!0;o++}return!1}},te=new WeakMap,oe(pe,"OrderedDict"),pe);function an(t,e){if("at"in Array.prototype)return Array.prototype.at.call(t,e);const n=xi(t,e);return n===-1?void 0:t[n]}oe(an,"at");function xi(t,e){const n=t.length,r=Wr(e),o=r>=0?r:n+r;return o<0||o>=n?-1:o}oe(xi,"toSafeIndex");function Wr(t){return t!==t||t===0?0:Math.trunc(t)}oe(Wr,"toSafeInteger");function ef(t){const e=t+"CollectionProvider",[n,r]=he(e),[o,s]=n(e,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new Gn,setItemMap:oe(()=>{},"setItemMap")}),i=oe(({state:b,...w})=>b?l.jsx(c,{...w,state:b}):l.jsx(a,{...w}),"CollectionProvider");i.displayName=e;const a=oe(b=>{const w=x();return l.jsx(c,{...b,state:w})},"CollectionInit");a.displayName=e+"Init";const c=oe(b=>{const{scope:w,children:_,state:S}=b,E=d.useRef(null),[R,j]=d.useState(null),M=ee(E,j),[I,N]=S;return d.useEffect(()=>{if(!R)return;const $=Ci(()=>{});return $.observe(R,{childList:!0,subtree:!0}),()=>{$.disconnect()}},[R]),l.jsx(o,{scope:w,itemMap:I,setItemMap:N,collectionRef:M,collectionRefObject:E,collectionElement:R,children:_})},"CollectionProviderImpl");c.displayName=e+"Impl";const u=t+"CollectionSlot",f=$e(u),p=d.forwardRef((b,w)=>{const{scope:_,children:S}=b,E=s(u,_),R=ee(w,E.collectionRef);return l.jsx(f,{ref:R,children:S})});p.displayName=u;const m=t+"CollectionItemSlot",h="data-radix-collection-item",g=$e(m),v=d.forwardRef((b,w)=>{const{scope:_,children:S,...E}=b,R=d.useRef(null),[j,M]=d.useState(null),I=ee(w,R,M),N=s(m,_),{setItemMap:$}=N,L=d.useRef(E);bi(L.current,E)||(L.current=E);const B=L.current;return d.useEffect(()=>{const X=B;return $(H=>j?H.has(j)?H.set(j,{...X,element:j}).toSorted(pr):(H.set(j,{...X,element:j}),H.toSorted(pr)):H),()=>{$(H=>!j||!H.has(j)?H:(H.delete(j),new Gn(H)))}},[j,B,$]),l.jsx(g,{[h]:"",ref:I,children:S})});v.displayName=m;function x(){return d.useState(new Gn)}oe(x,"useInitCollection");function y(b){const{itemMap:w}=s(t+"CollectionConsumer",b);return w}return oe(y,"useCollection"),[{Provider:i,Slot:p,ItemSlot:v},{createCollectionScope:r,useCollection:y,useInitCollection:x}]}oe(ef,"createCollection");function bi(t,e){if(t===e)return!0;if(typeof t!="object"||typeof e!="object"||t==null||e==null)return!1;const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(const o of n)if(!Object.prototype.hasOwnProperty.call(e,o)||t[o]!==e[o])return!1;return!0}oe(bi,"shallowEqual");function yi(t,e){return!!(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING)}oe(yi,"isElementPreceding");function pr(t,e){return!t[1].element||!e[1].element?0:yi(t[1].element,e[1].element)?-1:1}oe(pr,"sortByDocumentPosition");function Ci(t){return new MutationObserver(n=>{for(const r of n)if(r.type==="childList"){t();return}})}oe(Ci,"getChildListObserver");var tf=Object.defineProperty,Ut=(t,e)=>tf(t,"name",{value:e,configurable:!0}),Gr="Collapsible",[nf,nh]=he(Gr),[rf,Kr]=nf(Gr),of=d.forwardRef(Ut(function(e,n){const{__scopeCollapsible:r,open:o,defaultOpen:s,disabled:i,onOpenChange:a,...c}=e,[u,f]=ot({prop:o,defaultProp:s??!1,onChange:a,caller:Gr});return l.jsx(rf,{scope:r,disabled:i,contentId:ue(),open:u,onOpenToggle:d.useCallback(()=>f(p=>!p),[f]),children:l.jsx(K.div,{"data-state":bn(u),"data-disabled":i?"":void 0,...c,ref:n})})},"Collapsible")),sf="CollapsibleTrigger",af=d.forwardRef(Ut(function(e,n){const{__scopeCollapsible:r,...o}=e,s=Kr(sf,r);return l.jsx(K.button,{type:"button","aria-controls":s.open?s.contentId:void 0,"aria-expanded":s.open||!1,"data-state":bn(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...o,ref:n,onClick:V(e.onClick,s.onOpenToggle)})},"CollapsibleTrigger")),wi="CollapsibleContent",lf=d.forwardRef(Ut(function(e,n){const{forceMount:r,...o}=e,s=Kr(wi,e.__scopeCollapsible);return l.jsx(Pe,{present:r||s.open,children:({present:i})=>l.jsx(cf,{...o,ref:n,present:i})})},"CollapsibleContent")),cf=d.forwardRef(Ut(function(e,n){const{__scopeCollapsible:r,present:o,children:s,...i}=e,a=Kr(wi,r),[c,u]=d.useState(o),f=d.useRef(null),p=ee(n,f),m=d.useRef(0),h=m.current,g=d.useRef(0),v=g.current,x=a.open||c,y=d.useRef(x),C=d.useRef(void 0);return d.useEffect(()=>{const b=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(b)},[]),ae(()=>{const b=f.current;if(b){C.current=C.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const w=b.getBoundingClientRect();m.current=w.height,g.current=w.width,y.current||(b.style.transitionDuration=C.current.transitionDuration,b.style.animationName=C.current.animationName),u(o)}},[a.open,o]),l.jsx(K.div,{"data-state":bn(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!x,...i,ref:p,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...e.style},children:x&&s})},"CollapsibleContentImpl"));function bn(t){return t?"open":"closed"}Ut(bn,"getState");var uf=of,df=Object.defineProperty,ff=(t,e)=>df(t,"name",{value:e,configurable:!0}),pf=d.createContext(void 0);function qr(t){const e=d.useContext(pf);return t||e||"ltr"}ff(qr,"useDirection");var mf=Object.defineProperty,Fe=(t,e)=>mf(t,"name",{value:e,configurable:!0}),Si="Avatar",[hf,rh]=he(Si),vf=[0,()=>{}],[gf,_i]=hf(Si),xf=d.forwardRef(Fe(function(e,n){const{__scopeAvatar:r,...o}=e,[s,i]=d.useState("idle"),[a,c]=ki();return l.jsx(gf,{scope:r,imageLoadingStatus:s,setImageLoadingStatus:i,imageCount:a,setImageCount:c,children:l.jsx(K.span,{...o,ref:n})})},"Avatar")),bf="AvatarImage",yf=d.forwardRef(Fe(function(e,n){const{__scopeAvatar:r,src:o,onLoadingStatusChange:s,...i}=e,a=_i(bf,r);a.setImageCount;const c=Ei(o,{referrerPolicy:i.referrerPolicy,crossOrigin:i.crossOrigin,loadingStatus:a.imageLoadingStatus,setLoadingStatus:a.setImageLoadingStatus}),u=xe(p=>{s?.(p)}),f=d.useRef(c);return ae(()=>{const p=f.current;f.current=c,c!==p&&u(c)},[c,u]),c==="loaded"?l.jsx(K.img,{...i,ref:n,src:o}):null},"AvatarImage")),Cf="AvatarFallback",wf=d.forwardRef(Fe(function(e,n){const{__scopeAvatar:r,delayMs:o,...s}=e,i=_i(Cf,r),[a,c]=d.useState(o===void 0);return d.useEffect(()=>{if(o!==void 0){const u=window.setTimeout(()=>c(!0),o);return()=>window.clearTimeout(u)}},[o]),a&&i.imageLoadingStatus!=="loaded"?l.jsx(K.span,{...s,ref:n}):null},"AvatarFallback"));function Ei(t,{loadingStatus:e,setLoadingStatus:n,referrerPolicy:r,crossOrigin:o}){return ae(()=>{if(!t){n("error");return}const s=new window.Image,i=Fe(c=>{const u=c.currentTarget;n(mr(u))},"handleLoad"),a=Fe(()=>n("error"),"handleError");return s.addEventListener("load",i),s.addEventListener("error",a),r&&(s.referrerPolicy=r),s.crossOrigin=o??null,s.src=t,n(mr(s)),()=>{s.removeEventListener("load",i),s.removeEventListener("error",a),n("idle")}},[t,o,r,n]),e}Fe(Ei,"useImageLoadingStatus");function mr(t){return t.complete?t.naturalWidth>0?"loaded":"error":"loading"}Fe(mr,"getImageLoadingStatus");function ki(){return vf}Fe(ki,"useImageCount");function Sf(t){}Fe(Sf,"useUpdateImageCount");var _f=Object.defineProperty,Ef=(t,e)=>_f(t,"name",{value:e,configurable:!0});function Yr(t){const[e,n]=d.useState(void 0);return ae(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const c=s.borderBoxSize,u=Array.isArray(c)?c[0]:c;i=u.inlineSize,a=u.blockSize}else i=t.offsetWidth,a=t.offsetHeight;n({width:i,height:a})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}Ef(Yr,"useSize");var kf=Object.defineProperty,ze=(t,e)=>kf(t,"name",{value:e,configurable:!0}),Xr="Checkbox",[jf,oh]=he(Xr),[Pf,Zr]=jf(Xr);function ji(t){const{__scopeCheckbox:e,checked:n,children:r,defaultChecked:o,disabled:s,form:i,name:a,onCheckedChange:c,required:u,value:f="on",internal_do_not_use_render:p}=t,[m,h]=ot({prop:n,defaultProp:o??!1,onChange:c,caller:Xr}),[g,v]=d.useState(null),[x,y]=d.useState(null),C=d.useRef(!1),[b,w]=d.useReducer(E=>E+1,0),_=g?!!i||!!g.closest("form"):!0,S={checked:m,disabled:s,setChecked:h,control:g,setControl:v,name:a,form:i,value:f,hasConsumerStoppedPropagationRef:C,userInteractionCount:b,onUserInteraction:w,required:u,defaultChecked:Ie(o)?!1:o,isFormControl:_,bubbleInput:x,setBubbleInput:y};return l.jsx(Pf,{scope:e,...S,children:Pi(p)?p(S):r})}ze(ji,"CheckboxProvider");var Rf="CheckboxTrigger",Mf=d.forwardRef(ze(function({__scopeCheckbox:e,onKeyDown:n,onClick:r,...o},s){const{control:i,value:a,disabled:c,checked:u,required:f,setControl:p,setChecked:m,hasConsumerStoppedPropagationRef:h,onUserInteraction:g,isFormControl:v,bubbleInput:x}=Zr(Rf,e),y=ee(s,p),C=d.useRef(u);return d.useEffect(()=>{const b=i?.form;if(b){const w=ze(()=>m(C.current),"reset");return b.addEventListener("reset",w),()=>b.removeEventListener("reset",w)}},[i,m]),l.jsx(K.button,{type:"button",role:"checkbox","aria-checked":Ie(u)?"mixed":u,"aria-required":f,"data-state":Qr(u),"data-disabled":c?"":void 0,disabled:c,value:a,...o,ref:y,onKeyDown:V(n,b=>{b.key==="Enter"&&b.preventDefault()}),onClick:V(r,b=>{g(),m(w=>Ie(w)?!0:!w),x&&v&&(h.current=b.isPropagationStopped(),h.current||b.stopPropagation())})})},"CheckboxTrigger")),Nf=d.forwardRef(ze(function(e,n){const{__scopeCheckbox:r,name:o,checked:s,defaultChecked:i,required:a,disabled:c,value:u,onCheckedChange:f,form:p,...m}=e;return l.jsx(ji,{__scopeCheckbox:r,checked:s,defaultChecked:i,disabled:c,required:a,onCheckedChange:f,name:o,form:p,value:u,internal_do_not_use_render:({isFormControl:h})=>l.jsxs(l.Fragment,{children:[l.jsx(Mf,{...m,ref:n,__scopeCheckbox:r}),h&&l.jsx(Df,{__scopeCheckbox:r})]})})},"Checkbox")),Af="CheckboxIndicator",If=d.forwardRef(ze(function(e,n){const{__scopeCheckbox:r,forceMount:o,...s}=e,i=Zr(Af,r);return l.jsx(Pe,{present:o||Ie(i.checked)||i.checked===!0,children:l.jsx(K.span,{"data-state":Qr(i.checked),"data-disabled":i.disabled?"":void 0,...s,ref:n,style:{pointerEvents:"none",...e.style}})})},"CheckboxIndicator")),Of="CheckboxBubbleInput",Df=d.forwardRef(ze(function({__scopeCheckbox:e,onClick:n,...r},o){const{control:s,hasConsumerStoppedPropagationRef:i,userInteractionCount:a,checked:c,defaultChecked:u,required:f,disabled:p,name:m,value:h,form:g,bubbleInput:v,setBubbleInput:x}=Zr(Of,e),y=ee(o,x),C=Yr(s),b=d.useRef(!1),w=d.useRef(c),_=d.useRef(a);d.useEffect(()=>{const E=v;if(!E)return;const R=window.HTMLInputElement.prototype,M=Object.getOwnPropertyDescriptor(R,"checked").set,I=a!==_.current;_.current=a;const N=w.current!==c;w.current=c;const $=!(I&&i.current);if(N&&M){b.current=!I;const L=new Event("click",{bubbles:$});E.indeterminate=Ie(c),M.call(E,Ie(c)?!1:c),E.dispatchEvent(L),b.current=!1}},[v,c,i,a]);const S=d.useRef(Ie(c)?!1:c);return l.jsx(K.input,{type:"checkbox","aria-hidden":!0,defaultChecked:u??S.current,required:f,disabled:p,name:m,value:h,form:g,...r,tabIndex:-1,ref:y,onClick:V(n,E=>{b.current&&E.stopPropagation()}),style:{...r.style,...C,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"CheckboxBubbleInput"));function Pi(t){return typeof t=="function"}ze(Pi,"isFunction");function Ie(t){return t==="indeterminate"}ze(Ie,"isIndeterminate");function Qr(t){return Ie(t)?"indeterminate":t?"checked":"unchecked"}ze(Qr,"getState");const Tf=["top","right","bottom","left"],Ke=Math.min,Oe=Math.max,cn=Math.round,tn=Math.floor,De=t=>({x:t,y:t}),$f={left:"right",right:"left",bottom:"top",top:"bottom"};function Ri(t,e,n){return Oe(t,Ke(e,n))}function Be(t,e){return typeof t=="function"?t(e):t}function qe(t){return t.split("-")[0]}function At(t){return t.split("-")[1]}function Jr(t){return t==="x"?"y":"x"}function eo(t){return t==="y"?"height":"width"}function _e(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function to(t){return Jr(_e(t))}function Lf(t,e,n){n===void 0&&(n=!1);const r=At(t),o=to(t),s=eo(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(i=un(i)),[i,un(i)]}function Ff(t){const e=un(t);return[hr(t),e,hr(e)]}function hr(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const Uo=["left","right"],Wo=["right","left"],zf=["top","bottom"],Bf=["bottom","top"];function Vf(t,e,n){switch(t){case"top":case"bottom":return n?e?Wo:Uo:e?Uo:Wo;case"left":case"right":return e?zf:Bf;default:return[]}}function Hf(t,e,n,r){const o=At(t);let s=Vf(qe(t),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),e&&(s=s.concat(s.map(hr)))),s}function un(t){const e=qe(t);return $f[e]+t.slice(e.length)}function Uf(t){var e,n,r,o;return{top:(e=t.top)!=null?e:0,right:(n=t.right)!=null?n:0,bottom:(r=t.bottom)!=null?r:0,left:(o=t.left)!=null?o:0}}function Mi(t){return typeof t!="number"?Uf(t):{top:t,right:t,bottom:t,left:t}}function dn(t){const{x:e,y:n,width:r,height:o}=t;return{width:r,height:o,top:n,left:e,right:e+r,bottom:n+o,x:e,y:n}}function Go(t,e,n){let{reference:r,floating:o}=t;const s=_e(e),i=to(e),a=eo(i),c=qe(e),u=s==="y",f=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,m=r[a]/2-o[a]/2;let h;switch(c){case"top":h={x:f,y:r.y-o.height};break;case"bottom":h={x:f,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:p};break;case"left":h={x:r.x-o.width,y:p};break;default:h={x:r.x,y:r.y}}const g=At(e);return g&&(h[i]+=m*(g==="end"?1:-1)*(n&&u?-1:1)),h}async function Wf(t,e){var n;e===void 0&&(e={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:c}=t,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:m=!1,padding:h=0}=Be(e,t),g=Mi(h),x=a[m?p==="floating"?"reference":"floating":p],y=dn(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(x)))==null||n?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:f,strategy:c})),C=p==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),w=await(s.isElement==null?void 0:s.isElement(b))&&await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1},_=dn(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:C,offsetParent:b,strategy:c}):C);return{top:(y.top-_.top+g.top)/w.y,bottom:(_.bottom-y.bottom+g.bottom)/w.y,left:(y.left-_.left+g.left)/w.x,right:(_.right-y.right+g.right)/w.x}}const Gf=50,Kf=async(t,e,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=i.detectOverflow?i:{...i,detectOverflow:Wf},c=await(i.isRTL==null?void 0:i.isRTL(e));let u=await i.getElementRects({reference:t,floating:e,strategy:o}),{x:f,y:p}=Go(u,r,c),m=r,h=0;const g={};for(let v=0;v<s.length;v++){const x=s[v];if(!x)continue;const{name:y,fn:C}=x,{x:b,y:w,data:_,reset:S}=await C({x:f,y:p,initialPlacement:r,placement:m,strategy:o,middlewareData:g,rects:u,platform:a,elements:{reference:t,floating:e}});f=b??f,p=w??p,g[y]={...g[y],..._},S&&h<Gf&&(h++,typeof S=="object"&&(S.placement&&(m=S.placement),S.rects&&(u=S.rects===!0?await i.getElementRects({reference:t,floating:e,strategy:o}):S.rects),{x:f,y:p}=Go(u,m,c)),v=-1)}return{x:f,y:p,placement:m,strategy:o,middlewareData:g}},qf=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:c}=e,{element:u,padding:f=0}=Be(t,e)||{};if(u==null)return{};const p=Mi(f),m={x:n,y:r},h=to(o),g=eo(h),v=await i.getDimensions(u),x=h==="y",y=x?"top":"left",C=x?"bottom":"right",b=x?"clientHeight":"clientWidth",w=s.reference[g]+s.reference[h]-m[h]-s.floating[g],_=m[h]-s.reference[h],S=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let E=S?S[b]:0;(!E||!await(i.isElement==null?void 0:i.isElement(S)))&&(E=a.floating[b]||s.floating[g]);const R=w/2-_/2,j=E/2-v[g]/2-1,M=Ke(p[y],j),I=Ke(p[C],j),N=E-v[g]-I,$=E/2-v[g]/2+R,L=Ri(M,$,N),B=!c.arrow&&At(o)!=null&&$!==L&&s.reference[g]/2-($<M?M:I)-v[g]/2<0,X=B?$<M?$-M:$-N:0;return{[h]:m[h]+X,data:{[h]:L,centerOffset:$-L-X,...B&&{alignmentOffset:X}},reset:B}}}),Yf=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:c,elements:u}=e,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0,...x}=Be(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=qe(o),C=_e(a),b=qe(a)===a,w=await(c.isRTL==null?void 0:c.isRTL(u.floating)),_=m||(b||!v?[un(a)]:Ff(a)),S=g!=="none";!m&&S&&_.push(...Hf(a,v,g,w));const E=[a,..._],R=await c.detectOverflow(e,x),j=[];let M=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&j.push(R[y]),p){const L=Lf(o,i,w);j.push(R[L[0]],R[L[1]])}if(M=[...M,{placement:o,overflows:j}],!j.every(L=>L<=0)){var I,N;const L=(((I=s.flip)==null?void 0:I.index)||0)+1,B=E[L];if(B&&(!(p==="alignment"?C!==_e(B):!1)||M.every(U=>_e(U.placement)===C?U.overflows[0]>0:!0)))return{data:{index:L,overflows:M},reset:{placement:B}};let X=(N=M.filter(H=>H.overflows[0]<=0).sort((H,U)=>H.overflows[1]-U.overflows[1])[0])==null?void 0:N.placement;if(!X)switch(h){case"bestFit":{var $;const H=($=M.filter(U=>{if(S){const q=_e(U.placement);return q===C||q==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(q=>q>0).reduce((q,D)=>q+D,0)]).sort((U,q)=>U[1]-q[1])[0])==null?void 0:$[0];H&&(X=H);break}case"initialPlacement":X=a;break}if(o!==X)return{reset:{placement:X}}}return{}}}};function Ko(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function qo(t){return Tf.some(e=>t[e]>=0)}const Xf=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:r}=e,{strategy:o="referenceHidden",...s}=Be(t,e);switch(o){case"referenceHidden":{const i=await r.detectOverflow(e,{...s,elementContext:"reference"}),a=Ko(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:qo(a)}}}case"escaped":{const i=await r.detectOverflow(e,{...s,altBoundary:!0}),a=Ko(i,n.floating);return{data:{escapedOffsets:a,escaped:qo(a)}}}default:return{}}}}},Ni=new Set(["left","top"]);async function Zf(t,e){const{placement:n,platform:r,elements:o}=t,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=qe(n),a=At(n),c=_e(n)==="y",u=Ni.has(i)?-1:1,f=s&&c?-1:1,p=Be(e,t);let{mainAxis:m,crossAxis:h,alignmentAxis:g}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return a&&typeof g=="number"&&(h=a==="end"?g*-1:g),c?{x:h*f,y:m*u}:{x:m*u,y:h*f}}const Qf=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=e,c=await Zf(e,t);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:i}}}}},Jf=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:o,platform:s}=e,{mainAxis:i=!0,crossAxis:a=!1,limiter:c={fn:C=>{let{x:b,y:w}=C;return{x:b,y:w}}},...u}=Be(t,e),f={x:n,y:r},p=await s.detectOverflow(e,u),m=_e(o),h=Jr(m);let g=f[h],v=f[m];const x=(C,b)=>Ri(b+p[C==="y"?"top":"left"],b,b-p[C==="y"?"bottom":"right"]);i&&(g=x(h,g)),a&&(v=x(m,v));const y=c.fn({...e,[h]:g,[m]:v});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[h]:i,[m]:a}}}}}},e1=function(t){return t===void 0&&(t={}),{options:t,fn(e){var n,r;const{x:o,y:s,placement:i,rects:a,middlewareData:c}=e,{offset:u=0,mainAxis:f=!0,crossAxis:p=!0}=Be(t,e),m={x:o,y:s},h=_e(i),g=Jr(h);let v=m[g],x=m[h];const y=Be(u,e),C=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:(n=y.mainAxis)!=null?n:0,crossAxis:(r=y.crossAxis)!=null?r:0};if(f){const _=g==="y"?"height":"width",S=a.reference[g]-a.floating[_]+C.mainAxis,E=a.reference[g]+a.reference[_]-C.mainAxis;v<S?v=S:v>E&&(v=E)}if(p){var b,w;const _=g==="y"?"width":"height",S=Ni.has(qe(i)),E=a.reference[h]-a.floating[_]+(S&&((b=c.offset)==null?void 0:b[h])||0)+(S?0:C.crossAxis),R=a.reference[h]+a.reference[_]+(S?0:((w=c.offset)==null?void 0:w[h])||0)-(S?C.crossAxis:0);x<E?x=E:x>R&&(x=R)}return{[g]:v,[h]:x}}}},t1=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:r,platform:o,elements:s}=e,{apply:i=()=>{},...a}=Be(t,e),c=await o.detectOverflow(e,a),u=qe(n),f=At(n),p=_e(n)==="y",{width:m,height:h}=r.floating;let g,v;u==="top"||u==="bottom"?(g=u,v=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(v=u,g=f==="end"?"top":"bottom");const x=h-c.top-c.bottom,y=m-c.left-c.right,C=Ke(h-c[g],x),b=Ke(m-c[v],y),w=e.middlewareData.shift,_=!w;let S=C,E=b;w!=null&&w.enabled.x&&(E=y),w!=null&&w.enabled.y&&(S=x),_&&!f&&(p?E=m-2*Oe(c.left,c.right):S=h-2*Oe(c.top,c.bottom)),await i({...e,availableWidth:E,availableHeight:S});const R=await o.getDimensions(s.floating);return m!==R.width||h!==R.height?{reset:{rects:!0}}:{}}}};function yn(){return typeof window<"u"}function It(t){return Ai(t)?(t.nodeName||"").toLowerCase():"#document"}function fe(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Ve(t){var e;return(e=(Ai(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Ai(t){return yn()?t instanceof Node||t instanceof fe(t).Node:!1}function ke(t){return yn()?t instanceof Element||t instanceof fe(t).Element:!1}function Ze(t){return yn()?t instanceof HTMLElement||t instanceof fe(t).HTMLElement:!1}function Yo(t){return!yn()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof fe(t).ShadowRoot}function Cn(t){const{overflow:e,overflowX:n,overflowY:r,display:o}=je(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&o!=="inline"&&o!=="contents"}function n1(t){return/^(table|td|th)$/.test(It(t))}function wn(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const r1=/transform|translate|scale|rotate|perspective|filter/,o1=/paint|layout|strict|content/,Qe=t=>!!t&&t!=="none";let Kn;function no(t){const e=ke(t)?je(t):t;return Qe(e.transform)||Qe(e.translate)||Qe(e.scale)||Qe(e.rotate)||Qe(e.perspective)||!ro()&&(Qe(e.backdropFilter)||Qe(e.filter))||r1.test(e.willChange||"")||o1.test(e.contain||"")}function s1(t){let e=tt(t);for(;Ze(e)&&!Lt(e);){if(no(e))return e;if(wn(e))return null;e=tt(e)}return null}function ro(){return Kn==null&&(Kn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Kn}function Lt(t){return/^(html|body|#document)$/.test(It(t))}function je(t){return fe(t).getComputedStyle(t)}function Sn(t){return ke(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function tt(t){if(It(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Yo(t)&&t.host||Ve(t);return Yo(e)?e.host:e}function Ii(t){const e=tt(t);return Lt(e)?(t.ownerDocument||t).body:Ze(e)&&Cn(e)?e:Ii(e)}function Ft(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const o=Ii(t),s=o===((r=t.ownerDocument)==null?void 0:r.body),i=fe(o);if(s){const a=vr(i);return e.concat(i,i.visualViewport||[],Cn(o)?o:[],a&&n?Ft(a):[])}else return e.concat(o,Ft(o,[],n))}function vr(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Oi(t){const e=je(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const o=Ze(t),s=o?t.offsetWidth:n,i=o?t.offsetHeight:r,a=cn(n)!==s||cn(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function oo(t){return ke(t)?t:t.contextElement}function jt(t){const e=oo(t);if(!Ze(e))return De(1);const n=e.getBoundingClientRect(),{width:r,height:o,$:s}=Oi(e);let i=(s?cn(n.width):n.width)/r,a=(s?cn(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const i1=De(0);function Di(t){const e=fe(t);return!ro()||!e.visualViewport?i1:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function a1(t,e,n){return e===void 0&&(e=!1),!!n&&e&&n===fe(t)}function nt(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const o=t.getBoundingClientRect(),s=oo(t);let i=De(1);e&&(r?ke(r)&&(i=jt(r)):i=jt(t));const a=a1(s,n,r)?Di(s):De(0);let c=(o.left+a.x)/i.x,u=(o.top+a.y)/i.y,f=o.width/i.x,p=o.height/i.y;if(s&&r){const m=fe(s),h=ke(r)?fe(r):r;let g=m,v=vr(g);for(;v&&h!==g;){const x=jt(v),y=v.getBoundingClientRect(),C=je(v),b=y.left+(v.clientLeft+parseFloat(C.paddingLeft))*x.x,w=y.top+(v.clientTop+parseFloat(C.paddingTop))*x.y;c*=x.x,u*=x.y,f*=x.x,p*=x.y,c+=b,u+=w,g=fe(v),v=vr(g)}}return dn({width:f,height:p,x:c,y:u})}function _n(t,e){const n=Sn(t).scrollLeft;return e?e.left+n:nt(Ve(t)).left+n}function Ti(t,e){const n=t.getBoundingClientRect(),r=n.left+e.scrollLeft-_n(t,n),o=n.top+e.scrollTop;return{x:r,y:o}}function l1(t){let{elements:e,rect:n,offsetParent:r,strategy:o}=t;const s=o==="fixed",i=Ve(r),a=e?wn(e.floating):!1;if(r===i||a&&s)return n;let c={scrollLeft:0,scrollTop:0},u=De(1);const f=De(0),p=Ze(r);if((p||!s)&&((It(r)!=="body"||Cn(i))&&(c=Sn(r)),p)){const h=nt(r);u=jt(r),f.x=h.x+r.clientLeft,f.y=h.y+r.clientTop}const m=i&&!p&&!s?Ti(i,c):De(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+f.x+m.x,y:n.y*u.y-c.scrollTop*u.y+f.y+m.y}}function c1(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function u1(t){const e=Sn(t),n=t.ownerDocument.body,r=Oe(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=Oe(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-e.scrollLeft+_n(t);const i=-e.scrollTop;return je(n).direction==="rtl"&&(s+=Oe(t.clientWidth,n.clientWidth)-r),{width:r,height:o,x:s,y:i}}const d1=25;function f1(t,e,n){n===void 0&&(n="viewport");const r=n==="layoutViewport",o=fe(t),s=Ve(t),i=o.visualViewport;let a=s.clientWidth,c=s.clientHeight,u=0,f=0;if(i){const m=!ro()||e==="fixed";r?m||(u=-i.offsetLeft,f=-i.offsetTop):(a=i.width,c=i.height,m&&(u=i.offsetLeft,f=i.offsetTop))}if(_n(s)<=0){const m=s.ownerDocument,h=m.body,g=getComputedStyle(h),v=m.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,x=Math.abs(s.clientWidth-h.clientWidth-v),y=getComputedStyle(s).scrollbarGutter==="stable both-edges"?x/2:x;y<=d1&&(a-=y)}return{width:a,height:c,x:u,y:f}}function p1(t,e){const n=nt(t,!0,e==="fixed"),r=n.top+t.clientTop,o=n.left+t.clientLeft,s=jt(t),i=t.clientWidth*s.x,a=t.clientHeight*s.y,c=o*s.x,u=r*s.y;return{width:i,height:a,x:c,y:u}}function Xo(t,e,n){let r;if(e==="viewport"||e==="layoutViewport")r=f1(t,n,e);else if(e==="document")r=u1(Ve(t));else if(ke(e))r=p1(e,n);else{const o=Di(t);r={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return dn(r)}function m1(t,e){const n=e.get(t);if(n)return n;let r=Ft(t,[],!1).filter(a=>ke(a)&&It(a)!=="body"),o=null;const s=je(t).position==="fixed";let i=s?tt(t):t;for(;ke(i)&&!Lt(i);){const a=je(i),c=no(i),u=o?o.position:s?"fixed":"";!c&&(u==="fixed"||u==="absolute"&&a.position==="static")?r=r.filter(p=>p!==i):o=a,i=tt(i)}return e.set(t,r),r}function h1(t){let{element:e,boundary:n,rootBoundary:r,strategy:o}=t;const i=[...n==="clippingAncestors"?wn(e)?[]:m1(e,this._c):[].concat(n),r],a=Xo(e,i[0],o);let c=a.top,u=a.right,f=a.bottom,p=a.left;for(let m=1;m<i.length;m++){const h=Xo(e,i[m],o);c=Oe(h.top,c),u=Ke(h.right,u),f=Ke(h.bottom,f),p=Oe(h.left,p)}return{width:u-p,height:f-c,x:p,y:c}}function v1(t){const{width:e,height:n}=Oi(t);return{width:e,height:n}}function g1(t,e,n){const r=Ze(e),o=Ve(e),s=n==="fixed",i=nt(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const c=De(0);if((r||!s)&&((It(e)!=="body"||Cn(o))&&(a=Sn(e)),r)){const m=nt(e,!0,s,e);c.x=m.x+e.clientLeft,c.y=m.y+e.clientTop}!r&&o&&(c.x=_n(o));const u=o&&!r&&!s?Ti(o,a):De(0),f=i.left+a.scrollLeft-c.x-u.x,p=i.top+a.scrollTop-c.y-u.y;return{x:f,y:p,width:i.width,height:i.height}}function qn(t){return je(t).position==="static"}function Zo(t,e){if(!Ze(t)||je(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Ve(t)===n&&(n=n.ownerDocument.body),n}function $i(t,e){const n=fe(t);if(wn(t))return n;if(!Ze(t)){let o=tt(t);for(;o&&!Lt(o);){if(ke(o)&&!qn(o))return o;o=tt(o)}return n}let r=Zo(t,e);for(;r&&n1(r)&&qn(r);)r=Zo(r,e);return r&&Lt(r)&&qn(r)&&!no(r)?n:r||s1(t)||n}const x1=async function(t){const e=this.getOffsetParent||$i,n=this.getDimensions,r=await n(t.floating);return{reference:g1(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function b1(t){return je(t).direction==="rtl"}const y1={convertOffsetParentRelativeRectToViewportRelativeRect:l1,getDocumentElement:Ve,getClippingRect:h1,getOffsetParent:$i,getElementRects:x1,getClientRects:c1,getDimensions:v1,getScale:jt,isElement:ke,isRTL:b1};function Li(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function C1(t,e,n){let r=null,o;const s=Ve(t);function i(){var f;clearTimeout(o),(f=r)==null||f.disconnect(),r=null}function a(f,p){f===void 0&&(f=!1),p===void 0&&(p=1),i();const m=t.getBoundingClientRect(),{left:h,top:g,width:v,height:x}=m;if(f||e(),!v||!x)return;const y=tn(g),C=tn(s.clientWidth-(h+v)),b=tn(s.clientHeight-(g+x)),w=tn(h),S={rootMargin:-y+"px "+-C+"px "+-b+"px "+-w+"px",threshold:Oe(0,Ke(1,p))||1};let E=!0;function R(j){const M=j[0].intersectionRatio;if(!Li(m,t.getBoundingClientRect()))return a();if(M!==p){if(!E)return a();M?a(!1,M):o=setTimeout(()=>{a(!1,1e-7)},1e3)}E=!1}try{r=new IntersectionObserver(R,{...S,root:s.ownerDocument})}catch{r=new IntersectionObserver(R,S)}r.observe(t)}const c=fe(t),u=()=>a(n);return c.addEventListener("resize",u),a(!0),()=>{c.removeEventListener("resize",u),i()}}function w1(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=oo(t),f=o||s?[...u?Ft(u):[],...e?Ft(e):[]]:[];f.forEach(y=>{o&&y.addEventListener("scroll",n),s&&y.addEventListener("resize",n)});const p=u&&a?C1(u,n,s):null;let m=-1,h=null;i&&(h=new ResizeObserver(y=>{let[C]=y;C&&C.target===u&&h&&e&&(h.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var b;(b=h)==null||b.observe(e)})),n()}),u&&!c&&h.observe(u),e&&h.observe(e));let g,v=c?nt(t):null;c&&x();function x(){const y=nt(t);v&&!Li(v,y)&&n(),v=y,g=requestAnimationFrame(x)}return n(),()=>{var y;f.forEach(C=>{o&&C.removeEventListener("scroll",n),s&&C.removeEventListener("resize",n)}),p?.(),(y=h)==null||y.disconnect(),h=null,c&&cancelAnimationFrame(g)}}const S1=Qf,_1=Jf,E1=Yf,k1=t1,j1=Xf,Qo=qf,P1=e1,R1=(t,e,n)=>{const r=new Map,o=n??{},s={...y1,...o.platform,_c:r};return Kf(t,e,{...o,platform:s})};var M1=typeof document<"u",N1=function(){},ln=M1?d.useLayoutEffect:N1;function fn(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,o;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!fn(t[r],e[r]))return!1;return!0}if(o=Object.keys(t),n=o.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&t.$$typeof)&&!fn(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function Fi(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Jo(t,e){const n=Fi(t);return Math.round(e*n)/n}function Yn(t){const e=d.useRef(t);return ln(()=>{e.current=t}),e}function A1(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:c,open:u}=t,[f,p]=d.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[m,h]=d.useState(r);fn(m,r)||h(r);const[g,v]=d.useState(null),[x,y]=d.useState(null),C=d.useCallback(U=>{U!==S.current&&(S.current=U,v(U))},[]),b=d.useCallback(U=>{U!==E.current&&(E.current=U,y(U))},[]),w=s||g,_=i||x,S=d.useRef(null),E=d.useRef(null),R=d.useRef(f),j=c!=null,M=Yn(c),I=Yn(o),N=Yn(u),$=d.useCallback(()=>{if(!S.current||!E.current)return;const U={placement:e,strategy:n,middleware:m};I.current&&(U.platform=I.current),R1(S.current,E.current,U).then(q=>{const D={...q,isPositioned:N.current!==!1};L.current&&!fn(R.current,D)&&(R.current=D,Sr.flushSync(()=>{p(D)}))})},[m,e,n,I,N]);ln(()=>{u===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,p(U=>({...U,isPositioned:!1})))},[u]);const L=d.useRef(!1);ln(()=>(L.current=!0,()=>{L.current=!1}),[]),ln(()=>{if(w&&(S.current=w),_&&(E.current=_),w&&_){if(M.current)return M.current(w,_,$);$()}},[w,_,$,M,j]);const B=d.useMemo(()=>({reference:S,floating:E,setReference:C,setFloating:b}),[C,b]),X=d.useMemo(()=>({reference:w,floating:_}),[w,_]),H=d.useMemo(()=>{const U={position:n,left:0,top:0};if(!X.floating)return U;const q=Jo(X.floating,f.x),D=Jo(X.floating,f.y);return a?{...U,transform:"translate("+q+"px, "+D+"px)",...Fi(X.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:q,top:D}},[n,a,X.floating,f.x,f.y]);return d.useMemo(()=>({...f,update:$,refs:B,elements:X,floatingStyles:H}),[f,$,B,X,H])}const I1=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:o}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?Qo({element:r.current,padding:o}).fn(n):{}:r?Qo({element:r,padding:o}).fn(n):{}}}},O1=(t,e)=>{const n=S1(t);return{name:n.name,fn:n.fn,options:[t,e]}},D1=(t,e)=>{const n=_1(t);return{name:n.name,fn:n.fn,options:[t,e]}},T1=(t,e)=>({fn:P1(t).fn,options:[t,e]}),$1=(t,e)=>{const n=E1(t);return{name:n.name,fn:n.fn,options:[t,e]}},L1=(t,e)=>{const n=k1(t);return{name:n.name,fn:n.fn,options:[t,e]}},F1=(t,e)=>{const n=j1(t);return{name:n.name,fn:n.fn,options:[t,e]}},z1=(t,e)=>{const n=I1(t);return{name:n.name,fn:n.fn,options:[t,e]}};var B1=Object.defineProperty,V1=(t,e)=>B1(t,"name",{value:e,configurable:!0}),H1=d.forwardRef(V1(function(e,n){const{children:r,width:o=10,height:s=5,...i}=e;return l.jsx(K.svg,{...i,ref:n,width:o,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:l.jsx("polygon",{points:"0,0 30,0 15,10"})})},"Arrow")),U1=H1,W1=Object.defineProperty,Te=(t,e)=>W1(t,"name",{value:e,configurable:!0}),zi="Popper",[Bi,En]=he(zi),[G1,Vi]=Bi(zi),K1=Te(t=>{const{__scopePopper:e,children:n}=t,[r,o]=d.useState(null),[s,i]=d.useState(void 0);return l.jsx(G1,{scope:e,anchor:r,onAnchorChange:o,placementState:s,setPlacementState:i,children:n})},"Popper"),q1="PopperAnchor",Y1=d.forwardRef(Te(function(e,n){const{__scopePopper:r,virtualRef:o,...s}=e,i=Vi(q1,r),a=d.useRef(null),c=i.onAnchorChange,u=d.useCallback(v=>{a.current=v,v&&c(v)},[c]),f=ee(n,u),p=d.useRef(null);d.useEffect(()=>{if(!o)return;const v=p.current;p.current=o.current,v!==p.current&&c(p.current)});const m=i.placementState&&kn(i.placementState),h=m?.[0],g=m?.[1];return o?null:l.jsx(K.div,{"data-radix-popper-side":h,"data-radix-popper-align":g,...s,ref:f})},"PopperAnchor")),Hi="PopperContent",[X1,Z1]=Bi(Hi),Q1=d.forwardRef(Te(function(e,n){const{__scopePopper:r,side:o="bottom",sideOffset:s=0,align:i="center",alignOffset:a=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:f=[],collisionPadding:p=0,sticky:m="partial",hideWhenDetached:h=!1,updatePositionStrategy:g="optimized",onPlaced:v,...x}=e,y=Vi(Hi,r),[C,b]=d.useState(null),w=ee(n,b),[_,S]=d.useState(null),E=Yr(_),R=E?.width??0,j=E?.height??0,M=o+(i!=="center"?"-"+i:""),I=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},N=Array.isArray(f)?f:[f],$=N.length>0,L={padding:I,boundary:N.filter(Ui),altBoundary:$},{refs:B,floatingStyles:X,placement:H,isPositioned:U,middlewareData:q}=A1({strategy:"fixed",placement:M,whileElementsMounted:Te((...Q)=>w1(...Q,{animationFrame:g==="always"}),"whileElementsMounted"),elements:{reference:y.anchor},middleware:[O1({mainAxis:s+j,alignmentAxis:a}),u&&D1({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?T1():void 0,...L}),u&&$1({...L}),L1({...L,apply:Te(({elements:Q,rects:de,availableWidth:He,availableHeight:lt})=>{const{width:ct,height:Ue}=de.reference,ge=Q.floating.style;ge.setProperty("--radix-popper-available-width",`${He}px`),ge.setProperty("--radix-popper-available-height",`${lt}px`),ge.setProperty("--radix-popper-anchor-width",`${ct}px`),ge.setProperty("--radix-popper-anchor-height",`${Ue}px`)},"apply")}),_&&z1({element:_,padding:c}),n0({arrowWidth:R,arrowHeight:j}),h&&F1({strategy:"referenceHidden",...L,boundary:$?L.boundary:void 0})]}),D=y.setPlacementState;ae(()=>(D(H),()=>{D(void 0)}),[H,D]);const[se,k]=kn(H),T=xe(v);ae(()=>{U&&T?.()},[U,T]);const z=q.arrow?.x,O=q.arrow?.y,W=q.arrow?.centerOffset!==0,[G,Y]=d.useState();return ae(()=>{C&&Y(window.getComputedStyle(C).zIndex)},[C]),l.jsx("div",{ref:B.setFloating,"data-radix-popper-content-wrapper":"",style:{...X,transform:U?X.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:G,"--radix-popper-transform-origin":[q.transformOrigin?.x,q.transformOrigin?.y].join(" "),...q.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(X1,{scope:r,placedSide:se,placedAlign:k,onArrowChange:S,arrowX:z,arrowY:O,shouldHideArrow:W,children:l.jsx(K.div,{"data-side":se,"data-align":k,...x,ref:w,style:{...x.style,animation:U?x.style?.animation:"none"}})})})},"PopperContent")),J1="PopperArrow",e0={top:"bottom",right:"left",bottom:"top",left:"right"},t0=d.forwardRef(Te(function(e,n){const{__scopePopper:r,...o}=e,s=Z1(J1,r),i=e0[s.placedSide];return l.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]: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:l.jsx(U1,{...o,ref:n,style:{...o.style,display:"block"}})})},"PopperArrow"));function Ui(t){return t!==null}Te(Ui,"isNotNull");var n0=Te(t=>({name:"transformOrigin",options:t,fn(e){const{placement:n,rects:r,middlewareData:o}=e,i=o.arrow?.centerOffset!==0,a=i?0:t.arrowWidth,c=i?0:t.arrowHeight,[u,f]=kn(n),p={start:"0%",center:"50%",end:"100%"}[f],m=(o.arrow?.x??0)+a/2,h=(o.arrow?.y??0)+c/2;let g="",v="";return u==="bottom"?(g=i?p:`${m}px`,v=`${-c}px`):u==="top"?(g=i?p:`${m}px`,v=`${r.floating.height+c}px`):u==="right"?(g=`${-c}px`,v=i?p:`${h}px`):u==="left"&&(g=`${r.floating.width+c}px`,v=i?p:`${h}px`),{data:{x:g,y:v}}}}),"transformOrigin");function kn(t){const[e,n="center"]=t.split("-");return[e,n]}Te(kn,"getSideAndAlignFromPlacement");var Wi=K1,Gi=Y1,Ki=Q1,r0=t0,o0=Object.defineProperty,so=(t,e)=>o0(t,"name",{value:e,configurable:!0}),Xn=!1;function qi(){const[t,e]=d.useState(Xn);return d.useEffect(()=>{Xn||(Xn=!0,e(!0))},[]),t}so(qi,"useIsHydrated");var Yi=Rt[" useSyncExternalStore ".trim().toString()];function Xi(){return()=>{}}so(Xi,"subscribe");function Zi(){return Yi(Xi,()=>!0,()=>!1)}so(Zi,"useIsHydratedModern");var s0=typeof Yi=="function"?Zi:qi,i0=Object.defineProperty,it=(t,e)=>i0(t,"name",{value:e,configurable:!0}),Zn="rovingFocusGroup.onEntryFocus",a0={bubbles:!1,cancelable:!0},jn="RovingFocusGroup",[gr,Qi,l0]=Ur(jn),[c0,Ji]=he(jn,[l0]),[u0,d0]=c0(jn),f0=d.forwardRef(it(function(e,n){return l.jsx(gr.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(gr.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(p0,{...e,ref:n})})})},"RovingFocusGroup")),p0=d.forwardRef(it(function(e,n){const{__scopeRovingFocusGroup:r,orientation:o,loop:s=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:f,preventScrollOnEntryFocus:p=!1,...m}=e,h=d.useRef(null),g=ee(n,h),v=qr(i),[x,y]=ot({prop:a,defaultProp:c??null,onChange:u,caller:jn}),[C,b]=d.useState(!1),w=xe(f),_=Qi(r),S=d.useRef(!1),[E,R]=d.useState(0);return d.useEffect(()=>{const j=h.current;if(j)return j.addEventListener(Zn,w),()=>j.removeEventListener(Zn,w)},[w]),l.jsx(u0,{scope:r,orientation:o,dir:v,loop:s,currentTabStopId:x,onItemFocus:d.useCallback(j=>y(j),[y]),onItemShiftTab:d.useCallback(()=>b(!0),[]),onFocusableItemAdd:d.useCallback(()=>R(j=>j+1),[]),onFocusableItemRemove:d.useCallback(()=>R(j=>j-1),[]),children:l.jsx(K.div,{tabIndex:C||E===0?-1:0,"data-orientation":o,...m,ref:g,style:{outline:"none",...e.style},onMouseDown:V(e.onMouseDown,()=>{S.current=!0}),onFocus:V(e.onFocus,j=>{const M=!S.current;if(j.target===j.currentTarget&&M&&!C){const I=new CustomEvent(Zn,a0);if(j.currentTarget.dispatchEvent(I),!I.defaultPrevented){const N=_().filter(H=>H.focusable),$=N.find(H=>H.active),L=N.find(H=>H.id===x),X=[$,L,...N].filter(Boolean).map(H=>H.ref.current);io(X,p)}}S.current=!1}),onBlur:V(e.onBlur,()=>b(!1))})})},"RovingFocusGroupImpl")),m0="RovingFocusGroupItem",h0=d.forwardRef(it(function(e,n){const{__scopeRovingFocusGroup:r,focusable:o=!0,active:s=!1,tabStopId:i,children:a,...c}=e,u=ue(),f=i||u,p=d0(m0,r),m=p.currentTabStopId===f,h=Qi(r),{onFocusableItemAdd:g,onFocusableItemRemove:v,currentTabStopId:x}=p,y=s0();return ae(()=>{if(!(!y||!o))return g(),()=>v()},[y,o,g,v]),d.useEffect(()=>{if(!(y||!o))return g(),()=>v()},[y,o,g,v]),l.jsx(gr.ItemSlot,{scope:r,id:f,focusable:o,active:s,children:l.jsx(K.span,{tabIndex:m?0:-1,"data-orientation":p.orientation,...c,ref:n,onMouseDown:V(e.onMouseDown,C=>{o?p.onItemFocus(f):C.preventDefault()}),onFocus:V(e.onFocus,()=>p.onItemFocus(f)),onKeyDown:V(e.onKeyDown,C=>{if(C.key==="Tab"&&C.shiftKey){p.onItemShiftTab();return}if(C.target!==C.currentTarget)return;const b=ta(C,p.orientation,p.dir);if(b!==void 0){if(C.metaKey||C.ctrlKey||C.altKey||C.shiftKey)return;C.preventDefault();let _=h().filter(S=>S.focusable).map(S=>S.ref.current);if(b==="last")_.reverse();else if(b==="prev"||b==="next"){b==="prev"&&_.reverse();const S=_.indexOf(C.currentTarget);_=p.loop?na(_,S+1):_.slice(S+1)}setTimeout(()=>io(_))}}),children:typeof a=="function"?a({isCurrentTabStop:m,hasTabStop:x!=null}):a})})},"RovingFocusGroupItem")),v0={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ea(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}it(ea,"getDirectionAwareKey");function ta(t,e,n){const r=ea(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return v0[r]}it(ta,"getFocusIntent");function io(t,e=!1){const n=document.activeElement;for(const r of t)if(r===n||(r.focus({preventScroll:e}),document.activeElement!==n))return}it(io,"focusFirst");function na(t,e){return t.map((n,r)=>t[(e+r)%t.length])}it(na,"wrapArray");var g0=f0,x0=h0,b0=Object.defineProperty,Z=(t,e)=>b0(t,"name",{value:e,configurable:!0}),y0=["Enter"," "],C0=["ArrowDown","PageUp","Home"],ra=["ArrowUp","PageDown","End"],w0=[...C0,...ra],Pn="Menu",[xr,S0,_0]=Ur(Pn),[at,oa]=he(Pn,[_0,En,Ji]),ao=En(),sa=Ji(),[E0,Wt]=at(Pn),[k0,lo]=at(Pn),j0=Z(t=>{const{__scopeMenu:e,open:n=!1,children:r,dir:o,onOpenChange:s,modal:i=!0}=t,a=ao(e),[c,u]=d.useState(null),f=d.useRef(!1),p=xe(s),m=qr(o);return d.useEffect(()=>{const h=Z(()=>{f.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},"handleKeyDown"),g=Z(()=>f.current=!1,"handlePointer");return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),d.useEffect(()=>{if(!n)return;const h=Z(()=>p(!1),"handleBlur");return window.addEventListener("blur",h),()=>window.removeEventListener("blur",h)},[n,p]),l.jsx(Wi,{...a,children:l.jsx(E0,{scope:e,open:n,onOpenChange:p,content:c,onContentChange:u,children:l.jsx(k0,{scope:e,onClose:d.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:m,modal:i,children:r})})})},"Menu"),P0=d.forwardRef(Z(function(e,n){const{__scopeMenu:r,...o}=e,s=ao(r);return l.jsx(Gi,{...s,...o,ref:n})},"MenuAnchor")),ia="MenuPortal",[R0,M0]=at(ia,{forceMount:void 0}),N0=Z(t=>{const{__scopeMenu:e,forceMount:n,children:r,container:o}=t,s=Wt(ia,e);return l.jsx(R0,{scope:e,forceMount:n,children:l.jsx(Pe,{present:n||s.open,children:l.jsx(Ir,{asChild:!0,container:o,children:r})})})},"MenuPortal"),We="MenuContent",[A0,aa]=at(We),I0=d.forwardRef(Z(function(e,n){const r=M0(We,e.__scopeMenu),{forceMount:o=r.forceMount,...s}=e,i=Wt(We,e.__scopeMenu),a=lo(We,e.__scopeMenu);return l.jsx(xr.Provider,{scope:e.__scopeMenu,children:l.jsx(Pe,{present:o||i.open,children:l.jsx(xr.Slot,{scope:e.__scopeMenu,children:a.modal?l.jsx(O0,{...s,ref:n}):l.jsx(D0,{...s,ref:n})})})})},"MenuContent")),O0=d.forwardRef(Z(function(e,n){const r=Wt(We,e.__scopeMenu),o=d.useRef(null),s=ee(n,o);return d.useEffect(()=>{const i=o.current;if(i)return oi(i)},[]),l.jsx(la,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:V(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})},"MenuRootContentModal")),D0=d.forwardRef(Z(function(e,n){const r=Wt(We,e.__scopeMenu);return l.jsx(la,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})},"MenuRootContentNonModal")),T0=$e("MenuContent.ScrollLock"),la=d.forwardRef(Z(function(e,n){const{__scopeMenu:r,loop:o=!1,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:c,onEntryFocus:u,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:m,onInteractOutside:h,onDismiss:g,disableOutsideScroll:v,...x}=e,y=Wt(We,r),C=lo(We,r),b=ao(r),w=sa(r),_=S0(r),[S,E]=d.useState(null),R=d.useRef(null),j=ee(n,R,y.onContentChange),M=d.useRef(0),I=d.useRef(""),N=d.useRef(0),$=d.useRef(null),L=d.useRef("right"),B=d.useRef(0),X=v?Dr:d.Fragment,H=v?{as:T0,allowPinchZoom:!0}:void 0,U=Z(D=>{const se=I.current+D,k=_().filter(Y=>!Y.disabled),T=document.activeElement,z=k.find(Y=>Y.ref.current===T)?.textValue,O=k.map(Y=>Y.textValue),W=ha(O,se,z),G=k.find(Y=>Y.textValue===W)?.ref.current;Z((function Y(Q){I.current=Q,window.clearTimeout(M.current),Q!==""&&(M.current=window.setTimeout(()=>Y(""),1e3))}),"updateSearch")(se),G&&setTimeout(()=>G.focus())},"handleTypeaheadSearch");d.useEffect(()=>()=>window.clearTimeout(M.current),[]),vn();const q=d.useCallback(D=>L.current===$.current?.side&&ga(D,$.current?.area),[]);return l.jsx(A0,{scope:r,searchRef:I,onItemEnter:d.useCallback(D=>{q(D)&&D.preventDefault()},[q]),onItemLeave:d.useCallback(D=>{q(D)||(R.current?.focus(),E(null))},[q]),onTriggerLeave:d.useCallback(D=>{q(D)&&D.preventDefault()},[q]),pointerGraceTimerRef:N,onPointerGraceIntentChange:d.useCallback(D=>{$.current=D},[]),children:l.jsx(X,{...H,children:l.jsx(Fs,{asChild:!0,trapped:s,onMountAutoFocus:V(i,D=>{D.preventDefault(),R.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:l.jsx(Mr,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:m,onInteractOutside:h,onDismiss:g,children:l.jsx(g0,{asChild:!0,...w,dir:C.dir,orientation:"vertical",loop:o,currentTabStopId:S,onCurrentTabStopIdChange:E,onEntryFocus:V(u,D=>{C.isUsingKeyboardRef.current||D.preventDefault()}),preventScrollOnEntryFocus:!0,children:l.jsx(Ki,{role:"menu","aria-orientation":"vertical","data-state":fa(y.open),"data-radix-menu-content":"",dir:C.dir,...b,...x,ref:j,style:{outline:"none",...x.style},onKeyDown:V(x.onKeyDown,D=>{const k=D.target.closest("[data-radix-menu-content]")===D.currentTarget,T=D.ctrlKey||D.altKey||D.metaKey,z=D.key.length===1;k&&(D.key==="Tab"&&D.preventDefault(),!T&&z&&U(D.key));const O=R.current;if(D.target!==O||!w0.includes(D.key))return;D.preventDefault();const G=_().filter(Y=>!Y.disabled).map(Y=>Y.ref.current);ra.includes(D.key)&&G.reverse(),pa(G)}),onBlur:V(e.onBlur,D=>{D.currentTarget.contains(D.target)||(window.clearTimeout(M.current),I.current="")}),onPointerMove:V(e.onPointerMove,pn(D=>{const se=D.target,k=B.current!==D.clientX;if(D.currentTarget.contains(se)&&k){const T=D.clientX>B.current?"right":"left";L.current=T,B.current=D.clientX}}))})})})})})})},"MenuContentImpl")),ca=d.forwardRef(Z(function(e,n){const{__scopeMenu:r,...o}=e;return l.jsx(K.div,{role:"group",...o,ref:n})},"MenuGroup")),$0=d.forwardRef(Z(function(e,n){const{__scopeMenu:r,...o}=e;return l.jsx(K.div,{...o,ref:n})},"MenuLabel")),br="MenuItem",es="menu.itemSelect",ua=d.forwardRef(Z(function(e,n){const{disabled:r=!1,onSelect:o,...s}=e,i=d.useRef(null),a=lo(br,e.__scopeMenu),c=aa(br,e.__scopeMenu),u=ee(n,i),f=d.useRef(!1),p=Z(()=>{const m=i.current;if(!r&&m){const h=new CustomEvent(es,{bubbles:!0,cancelable:!0});m.addEventListener(es,g=>o?.(g),{once:!0}),Rr(m,h),h.defaultPrevented?f.current=!1:a.onClose()}},"handleSelect");return l.jsx(L0,{...s,ref:u,disabled:r,onClick:V(e.onClick,p),onPointerDown:m=>{e.onPointerDown?.(m),f.current=!0},onPointerUp:V(e.onPointerUp,m=>{f.current||m.currentTarget?.click()}),onKeyDown:V(e.onKeyDown,m=>{r||m.target!==m.currentTarget||c.searchRef.current!==""&&m.key===" "||y0.includes(m.key)&&(m.currentTarget.click(),m.preventDefault())})})},"MenuItem")),L0=d.forwardRef(Z(function(e,n){const{__scopeMenu:r,disabled:o=!1,textValue:s,...i}=e,a=aa(br,r),c=sa(r),u=d.useRef(null),f=ee(n,u),[p,m]=d.useState(!1),[h,g]=d.useState("");return d.useEffect(()=>{const v=u.current;v&&g((v.textContent??"").trim())},[i.children]),l.jsx(xr.ItemSlot,{scope:r,disabled:o,textValue:s??h,children:l.jsx(x0,{asChild:!0,...c,focusable:!o,children:l.jsx(K.div,{role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...i,ref:f,onPointerMove:V(e.onPointerMove,pn(v=>{o?a.onItemLeave(v):(a.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:V(e.onPointerLeave,pn(v=>a.onItemLeave(v))),onFocus:V(e.onFocus,()=>m(!0)),onBlur:V(e.onBlur,()=>m(!1))})})})},"MenuItemImpl")),F0="MenuRadioGroup",[z0,B0]=at(F0,{value:void 0,onValueChange:Z(()=>{},"onValueChange")}),V0=d.forwardRef(Z(function(e,n){const{value:r,onValueChange:o,...s}=e,i=xe(o);return l.jsx(z0,{scope:e.__scopeMenu,value:r,onValueChange:i,children:l.jsx(ca,{...s,ref:n})})},"MenuRadioGroup")),H0="MenuRadioItem",U0=d.forwardRef(Z(function(e,n){const{value:r,...o}=e,s=B0(H0,e.__scopeMenu),i=r===s.value;return l.jsx(W0,{scope:e.__scopeMenu,checked:i,children:l.jsx(ua,{role:"menuitemradio","aria-checked":i,...o,ref:n,"data-state":uo(i),onSelect:V(o.onSelect,()=>s.onValueChange?.(r),{checkForDefaultPrevented:!1})})})},"MenuRadioItem")),da="MenuItemIndicator",[W0,G0]=at(da,{checked:!1}),K0=d.forwardRef(Z(function(e,n){const{__scopeMenu:r,forceMount:o,...s}=e,i=G0(da,r);return l.jsx(Pe,{present:o||co(i.checked)||i.checked===!0,children:l.jsx(K.span,{...s,ref:n,"data-state":uo(i.checked)})})},"MenuItemIndicator")),q0=d.forwardRef(Z(function(e,n){const{__scopeMenu:r,...o}=e;return l.jsx(K.div,{role:"separator","aria-orientation":"horizontal",...o,ref:n})},"MenuSeparator")),Y0="MenuSub",[sh,ih]=at(Y0);function fa(t){return t?"open":"closed"}Z(fa,"getOpenState");function co(t){return t==="indeterminate"}Z(co,"isIndeterminate");function uo(t){return co(t)?"indeterminate":t?"checked":"unchecked"}Z(uo,"getCheckedState");function pa(t){const e=document.activeElement;for(const n of t)if(n===e||(n.focus(),document.activeElement!==e))return}Z(pa,"focusFirst");function ma(t,e){return t.map((n,r)=>t[(e+r)%t.length])}Z(ma,"wrapArray");function ha(t,e,n){const o=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,s=n?t.indexOf(n):-1;let i=ma(t,Math.max(s,0));o.length===1&&(i=i.filter(u=>u!==n));const c=i.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}Z(ha,"getNextMatch");function va(t,e){const{x:n,y:r}=t;let o=!1;for(let s=0,i=e.length-1;s<e.length;i=s++){const a=e[s],c=e[i],u=a.x,f=a.y,p=c.x,m=c.y;f>r!=m>r&&n<(p-u)*(r-f)/(m-f)+u&&(o=!o)}return o}Z(va,"isPointInPolygon");function ga(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return va(n,e)}Z(ga,"isPointerInGraceArea");function pn(t){return e=>e.pointerType==="mouse"?t(e):void 0}Z(pn,"whenMouse");var X0=j0,Z0=P0,Q0=N0,J0=I0,e2=ca,t2=$0,n2=ua,r2=V0,o2=U0,s2=K0,i2=q0,a2=Object.defineProperty,Ce=(t,e)=>a2(t,"name",{value:e,configurable:!0}),fo="DropdownMenu",[l2,ah]=he(fo,[oa]),we=oa(),[c2,xa]=l2(fo),u2=Ce(t=>{const{__scopeDropdownMenu:e,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:i,modal:a=!0}=t,c=we(e),u=d.useRef(null),[f,p]=ot({prop:o,defaultProp:s??!1,onChange:i,caller:fo});return l.jsx(c2,{scope:e,triggerId:ue(),triggerRef:u,contentId:ue(),open:f,onOpenChange:p,onOpenToggle:d.useCallback(()=>p(m=>!m),[p]),modal:a,children:l.jsx(X0,{...c,open:f,onOpenChange:p,dir:r,modal:a,children:n})})},"DropdownMenu"),d2="DropdownMenuTrigger",f2=d.forwardRef(Ce(function(e,n){const{__scopeDropdownMenu:r,disabled:o=!1,...s}=e,i=xa(d2,r),a=we(r),c=ee(n,i.triggerRef);return l.jsx(Z0,{asChild:!0,...a,children:l.jsx(K.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...s,ref:c,onPointerDown:V(e.onPointerDown,u=>{!o&&u.button===0&&u.ctrlKey===!1&&(i.onOpenToggle(),i.open||u.preventDefault())}),onKeyDown:V(e.onKeyDown,u=>{o||(["Enter"," "].includes(u.key)&&i.onOpenToggle(),u.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(u.key)&&u.preventDefault())})})})},"DropdownMenuTrigger")),p2=Ce(t=>{const{__scopeDropdownMenu:e,...n}=t,r=we(e);return l.jsx(Q0,{...r,...n})},"DropdownMenuPortal"),m2="DropdownMenuContent",h2=d.forwardRef(Ce(function(e,n){const{__scopeDropdownMenu:r,...o}=e,s=xa(m2,r),i=we(r),a=d.useRef(!1);return l.jsx(J0,{id:s.contentId,"aria-labelledby":s.triggerId,...i,...o,ref:n,onCloseAutoFocus:V(e.onCloseAutoFocus,c=>{a.current||s.triggerRef.current?.focus(),a.current=!1,c.preventDefault()}),onInteractOutside:V(e.onInteractOutside,c=>{const u=c.detail.originalEvent,f=u.button===0&&u.ctrlKey===!0,p=u.button===2||f;(!s.modal||p)&&(a.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)"}})},"DropdownMenuContent")),v2=d.forwardRef(Ce(function(e,n){const{__scopeDropdownMenu:r,...o}=e,s=we(r);return l.jsx(e2,{...s,...o,ref:n})},"DropdownMenuGroup")),g2=d.forwardRef(Ce(function(e,n){const{__scopeDropdownMenu:r,...o}=e,s=we(r);return l.jsx(t2,{...s,...o,ref:n})},"DropdownMenuLabel")),x2=d.forwardRef(Ce(function(e,n){const{__scopeDropdownMenu:r,...o}=e,s=we(r);return l.jsx(n2,{...s,...o,ref:n})},"DropdownMenuItem")),b2=d.forwardRef(Ce(function(e,n){const{__scopeDropdownMenu:r,...o}=e,s=we(r);return l.jsx(r2,{...s,...o,ref:n})},"DropdownMenuRadioGroup")),y2=d.forwardRef(Ce(function(e,n){const{__scopeDropdownMenu:r,...o}=e,s=we(r);return l.jsx(o2,{...s,...o,ref:n})},"DropdownMenuRadioItem")),C2=d.forwardRef(Ce(function(e,n){const{__scopeDropdownMenu:r,...o}=e,s=we(r);return l.jsx(s2,{...s,...o,ref:n})},"DropdownMenuItemIndicator")),w2=d.forwardRef(Ce(function(e,n){const{__scopeDropdownMenu:r,...o}=e,s=we(r);return l.jsx(i2,{...s,...o,ref:n})},"DropdownMenuSeparator")),S2=u2,_2=f2,E2=p2,k2=h2,j2=v2,P2=g2,R2=x2,M2=b2,N2=y2,A2=C2,I2=w2,O2=Object.defineProperty,D2=(t,e)=>O2(t,"name",{value:e,configurable:!0}),T2=d.forwardRef(D2(function(e,n){return l.jsx(K.label,{...e,ref:n,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}})},"Label")),$2=T2,L2=Object.defineProperty,ne=(t,e)=>L2(t,"name",{value:e,configurable:!0}),[po,lh]=he("Tooltip",[En]),Rn=En(),F2="TooltipProvider",z2=700,yr="tooltip.open",[B2,mo]=po(F2),V2=ne(t=>{const{__scopeTooltip:e,delayDuration:n=z2,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=t,i=d.useRef(!0),a=d.useRef(!1),c=d.useRef(0);return d.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),l.jsx(B2,{scope:e,isOpenDelayedRef:i,delayDuration:n,onOpen:d.useCallback(()=>{r<=0||(window.clearTimeout(c.current),i.current=!1)},[r]),onClose:d.useCallback(()=>{r<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.current=!0,r))},[r]),isPointerInTransitRef:a,onPointerInTransitChange:d.useCallback(u=>{a.current=u},[]),disableHoverableContent:o,children:s})},"TooltipProvider"),Cr="Tooltip",[H2,Gt]=po(Cr),U2=ne(t=>{const{__scopeTooltip:e,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:i,delayDuration:a}=t,c=mo(Cr,t.__scopeTooltip),u=Rn(e),[f,p]=d.useState(null),[m,h]=d.useState(void 0),g=ue(),v=d.useRef(0),x=i??c.disableHoverableContent,y=a??c.delayDuration,C=d.useRef(!1),[b,w]=ot({prop:r,defaultProp:o??!1,onChange:ne(M=>{M?(c.onOpen(),document.dispatchEvent(new CustomEvent(yr))):c.onClose(),s?.(M)},"onChange"),caller:Cr}),_=d.useMemo(()=>b?C.current?"delayed-open":"instant-open":"closed",[b]),S=d.useCallback(()=>{window.clearTimeout(v.current),v.current=0,C.current=!1,w(!0)},[w]),E=d.useCallback(()=>{window.clearTimeout(v.current),v.current=0,w(!1)},[w]),R=d.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{C.current=!0,w(!0),v.current=0},y)},[y,w]);d.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]);const j=m??g;return l.jsx(Wi,{...u,children:l.jsx(H2,{scope:e,contentId:j,setContentId:h,open:b,stateAttribute:_,trigger:f,onTriggerChange:p,onTriggerEnter:d.useCallback(()=>{c.isOpenDelayedRef.current?R():S()},[c.isOpenDelayedRef,R,S]),onTriggerLeave:d.useCallback(()=>{x?E():(window.clearTimeout(v.current),v.current=0)},[E,x]),onOpen:S,onClose:E,disableHoverableContent:x,children:n})})},"Tooltip"),ts="TooltipTrigger",W2=d.forwardRef(ne(function(e,n){const{__scopeTooltip:r,...o}=e,s=Gt(ts,r),i=mo(ts,r),a=Rn(r),c=d.useRef(null),u=ee(n,c,s.onTriggerChange),f=d.useRef(!1),p=d.useRef(!1),m=d.useCallback(()=>f.current=!1,[]);return d.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),l.jsx(Gi,{asChild:!0,...a,children:l.jsx(K.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...o,ref:u,onPointerMove:V(e.onPointerMove,h=>{h.pointerType!=="touch"&&!p.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),p.current=!0)}),onPointerLeave:V(e.onPointerLeave,()=>{s.onTriggerLeave(),p.current=!1}),onPointerDown:V(e.onPointerDown,()=>{s.open&&s.onClose(),f.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:V(e.onFocus,()=>{f.current||s.onOpen()}),onBlur:V(e.onBlur,s.onClose),onClick:V(e.onClick,s.onClose)})})},"TooltipTrigger")),ba="TooltipPortal",[G2,K2]=po(ba,{forceMount:void 0}),q2=ne(t=>{const{__scopeTooltip:e,forceMount:n,children:r,container:o}=t,s=Gt(ba,e);return l.jsx(G2,{scope:e,forceMount:n,children:l.jsx(Pe,{present:n||s.open,children:l.jsx(Ir,{asChild:!0,container:o,children:r})})})},"TooltipPortal"),zt="TooltipContent",Y2=d.forwardRef(ne(function(e,n){const r=K2(zt,e.__scopeTooltip),{forceMount:o=r.forceMount,side:s="top",...i}=e,a=Gt(zt,e.__scopeTooltip);return l.jsx(Pe,{present:o||a.open,children:a.disableHoverableContent?l.jsx(ya,{side:s,...i,ref:n}):l.jsx(X2,{side:s,...i,ref:n})})},"TooltipContent")),X2=d.forwardRef(ne(function(e,n){const r=Gt(zt,e.__scopeTooltip),o=mo(zt,e.__scopeTooltip),s=d.useRef(null),i=ee(n,s),[a,c]=d.useState(null),{trigger:u,onClose:f}=r,p=s.current,{onPointerInTransitChange:m}=o,h=d.useCallback(()=>{c(null),m(!1)},[m]),g=d.useCallback((v,x)=>{const y=v.currentTarget,C={x:v.clientX,y:v.clientY},b=Ca(C,y.getBoundingClientRect()),w=wa(C,b),_=Sa(x.getBoundingClientRect()),S=Ea([...w,..._]);c(S),m(!0)},[m]);return d.useEffect(()=>()=>h(),[h]),d.useEffect(()=>{if(u&&p){const v=ne(y=>g(y,p),"handleTriggerLeave"),x=ne(y=>g(y,u),"handleContentLeave");return u.addEventListener("pointerleave",v),p.addEventListener("pointerleave",x),()=>{u.removeEventListener("pointerleave",v),p.removeEventListener("pointerleave",x)}}},[u,p,g,h]),d.useEffect(()=>{if(a){const v=ne(x=>{const y=x.target,C={x:x.clientX,y:x.clientY},b=u?.contains(y)||p?.contains(y),w=!_a(C,a);b?h():w&&(h(),f())},"handleTrackPointerGrace");return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[u,p,a,f,h]),l.jsx(ya,{...e,ref:i})},"TooltipContentHoverable")),Z2=ws("TooltipContent"),ya=d.forwardRef(ne(function(e,n){const{__scopeTooltip:r,children:o,"aria-label":s,id:i,onEscapeKeyDown:a,onPointerDownOutside:c,...u}=e,f=Gt(zt,r),p=Rn(r),{onClose:m}=f;d.useEffect(()=>(document.addEventListener(yr,m),()=>document.removeEventListener(yr,m)),[m]),d.useEffect(()=>{if(f.trigger){const g=ne(v=>{v.target instanceof Node&&v.target.contains(f.trigger)&&m()},"handleScroll");return window.addEventListener("scroll",g,{capture:!0}),()=>window.removeEventListener("scroll",g,{capture:!0})}},[f.trigger,m]);const{setContentId:h}=f;return ae(()=>(h(i),()=>{h(void 0)}),[i,h]),l.jsx(Mr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:g=>g.preventDefault(),onDismiss:m,children:l.jsxs(Ki,{"data-state":f.stateAttribute,role:s?void 0:"tooltip",id:s?void 0:f.contentId,...p,...u,ref:n,style:{...u.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:[l.jsx(Z2,{children:o}),s?l.jsx(Qd,{id:f.contentId,role:"tooltip",children:s}):null]})})},"TooltipContentImpl")),Q2=d.forwardRef(ne(function(e,n){const{__scopeTooltip:r,...o}=e,s=Rn(r);return l.jsx(r0,{...s,...o,ref:n})},"TooltipArrow"));function Ca(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),o=Math.abs(e.right-t.x),s=Math.abs(e.left-t.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}ne(Ca,"getExitSideFromRect");function wa(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}ne(wa,"getPaddedExitPoints");function Sa(t){const{top:e,right:n,bottom:r,left:o}=t;return[{x:o,y:e},{x:n,y:e},{x:n,y:r},{x:o,y:r}]}ne(Sa,"getPointsFromRect");function _a(t,e){const{x:n,y:r}=t;let o=!1;for(let s=0,i=e.length-1;s<e.length;i=s++){const a=e[s],c=e[i],u=a.x,f=a.y,p=c.x,m=c.y;f>r!=m>r&&n<(p-u)*(r-f)/(m-f)+u&&(o=!o)}return o}ne(_a,"isPointInPolygon");function Ea(t){const e=t.slice();return e.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),ka(e)}ne(Ea,"getHull");function ka(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r<t.length;r++){const o=t[r];for(;e.length>=2;){const s=e[e.length-1],i=e[e.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))e.pop();else break}e.push(o)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const o=t[r];for(;n.length>=2;){const s=n[n.length-1],i=n[n.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}ne(ka,"getHullPresorted");var J2=V2,ep=U2,tp=W2,np=q2,rp=Y2,op=Q2;function ho(t){const e=P.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=l.jsx($r,{"data-slot":"dialog",...n}),e[2]=n,e[3]=r):r=e[3],r}function sp(t){const e=P.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=l.jsx(Lr,{"data-slot":"dialog-portal",...n}),e[2]=n,e[3]=r):r=e[3],r}function ip(t){const e=P.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let o;e[3]!==n?(o=A("data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",n),e[3]=n,e[4]=o):o=e[4];let s;return e[5]!==r||e[6]!==o?(s=l.jsx(Fr,{"data-slot":"dialog-overlay",className:o,...r}),e[5]=r,e[6]=o,e[7]=s):s=e[7],s}function vo(t){const e=P.c(15);let n,r,o,s;e[0]!==t?({className:r,children:n,showCloseButton:s,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=o,e[4]=s):(n=e[1],r=e[2],o=e[3],s=e[4]);const i=s===void 0?!0:s;let a;e[5]===Symbol.for("react.memo_cache_sentinel")?(a=l.jsx(ip,{}),e[5]=a):a=e[5];let c;e[6]!==r?(c=A("bg-background data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 outline-none sm:max-w-lg",r),e[6]=r,e[7]=c):c=e[7];let u;e[8]!==i?(u=i&&l.jsxs(Br,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground 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 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[l.jsx(as,{}),l.jsx("span",{className:"sr-only",children:"Close"})]}),e[8]=i,e[9]=u):u=e[9];let f;return e[10]!==n||e[11]!==o||e[12]!==c||e[13]!==u?(f=l.jsxs(sp,{"data-slot":"dialog-portal",children:[a,l.jsxs(zr,{"data-slot":"dialog-content",className:c,...o,children:[n,u]})]}),e[10]=n,e[11]=o,e[12]=c,e[13]=u,e[14]=f):f=e[14],f}function go(t){const e=P.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let o;e[3]!==n?(o=A("flex flex-col gap-2 text-center sm:text-left",n),e[3]=n,e[4]=o):o=e[4];let s;return e[5]!==r||e[6]!==o?(s=l.jsx("div",{"data-slot":"dialog-header",className:o,...r}),e[5]=r,e[6]=o,e[7]=s):s=e[7],s}function ap(t){const e=P.c(14);let n,r,o,s;e[0]!==t?({className:r,showCloseButton:s,children:n,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=o,e[4]=s):(n=e[1],r=e[2],o=e[3],s=e[4]);const i=s===void 0?!1:s;let a;e[5]!==r?(a=A("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",r),e[5]=r,e[6]=a):a=e[6];let c;e[7]!==i?(c=i&&l.jsx(Br,{asChild:!0,children:l.jsx(Et,{variant:"outline",children:"Close"})}),e[7]=i,e[8]=c):c=e[8];let u;return e[9]!==n||e[10]!==o||e[11]!==a||e[12]!==c?(u=l.jsxs("div",{"data-slot":"dialog-footer",className:a,...o,children:[n,c]}),e[9]=n,e[10]=o,e[11]=a,e[12]=c,e[13]=u):u=e[13],u}function xo(t){const e=P.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let o;e[3]!==n?(o=A("text-lg leading-none font-semibold",n),e[3]=n,e[4]=o):o=e[4];let s;return e[5]!==r||e[6]!==o?(s=l.jsx(ci,{"data-slot":"dialog-title",className:o,...r}),e[5]=r,e[6]=o,e[7]=s):s=e[7],s}function bo(t){const e=P.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let o;e[3]!==n?(o=A("text-muted-foreground text-sm",n),e[3]=n,e[4]=o):o=e[4];let s;return e[5]!==r||e[6]!==o?(s=l.jsx(ui,{"data-slot":"dialog-description",className:o,...r}),e[5]=r,e[6]=o,e[7]=s):s=e[7],s}function lp(t){const e=P.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let o;e[3]!==n?(o=A("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",n),e[3]=n,e[4]=o):o=e[4];let s;return e[5]!==r||e[6]!==o?(s=l.jsx(st,{"data-slot":"command",className:o,...r}),e[5]=r,e[6]=o,e[7]=s):s=e[7],s}function cp(t){const e=P.c(26);let n,r,o,s,i,a;e[0]!==t?({title:s,description:i,children:n,className:r,showCloseButton:a,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=o,e[4]=s,e[5]=i,e[6]=a):(n=e[1],r=e[2],o=e[3],s=e[4],i=e[5],a=e[6]);const c=s===void 0?"Command Palette":s,u=i===void 0?"Search for a command to run...":i,f=a===void 0?!0:a;let p;e[7]!==c?(p=l.jsx(xo,{children:c}),e[7]=c,e[8]=p):p=e[8];let m;e[9]!==u?(m=l.jsx(bo,{children:u}),e[9]=u,e[10]=m):m=e[10];let h;e[11]!==p||e[12]!==m?(h=l.jsxs(go,{className:"sr-only",children:[p,m]}),e[11]=p,e[12]=m,e[13]=h):h=e[13];let g;e[14]!==r?(g=A("overflow-hidden p-0",r),e[14]=r,e[15]=g):g=e[15];let v;e[16]!==n?(v=l.jsx(lp,{className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:n}),e[16]=n,e[17]=v):v=e[17];let x;e[18]!==f||e[19]!==g||e[20]!==v?(x=l.jsx(vo,{className:g,showCloseButton:f,children:v}),e[18]=f,e[19]=g,e[20]=v,e[21]=x):x=e[21];let y;return e[22]!==o||e[23]!==h||e[24]!==x?(y=l.jsxs(ho,{...o,children:[h,x]}),e[22]=o,e[23]=h,e[24]=x,e[25]=y):y=e[25],y}function up(t){const e=P.c(9);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=l.jsx(Er,{className:"size-4 shrink-0 opacity-50"}),e[3]=o):o=e[3];let s;e[4]!==n?(s=A("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",n),e[4]=n,e[5]=s):s=e[5];let i;return e[6]!==r||e[7]!==s?(i=l.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[o,l.jsx(st.Input,{"data-slot":"command-input",className:s,...r})]}),e[6]=r,e[7]=s,e[8]=i):i=e[8],i}function dp(t){const e=P.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let o;e[3]!==n?(o=A("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",n),e[3]=n,e[4]=o):o=e[4];let s;return e[5]!==r||e[6]!==o?(s=l.jsx(st.List,{"data-slot":"command-list",className:o,...r}),e[5]=r,e[6]=o,e[7]=s):s=e[7],s}function fp(t){const e=P.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=l.jsx(st.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...n}),e[2]=n,e[3]=r):r=e[3],r}function nn(t){const e=P.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let o;e[3]!==n?(o=A("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",n),e[3]=n,e[4]=o):o=e[4];let s;return e[5]!==r||e[6]!==o?(s=l.jsx(st.Group,{"data-slot":"command-group",className:o,...r}),e[5]=r,e[6]=o,e[7]=s):s=e[7],s}function pp(t){const e=P.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let o;e[3]!==n?(o=A("bg-border -mx-1 h-px",n),e[3]=n,e[4]=o):o=e[4];let s;return e[5]!==r||e[6]!==o?(s=l.jsx(st.Separator,{"data-slot":"command-separator",className:o,...r}),e[5]=r,e[6]=o,e[7]=s):s=e[7],s}function rn(t){const e=P.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let o;e[3]!==n?(o=A("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),e[3]=n,e[4]=o):o=e[4];let s;return e[5]!==r||e[6]!==o?(s=l.jsx(st.Item,{"data-slot":"command-item",className:o,...r}),e[5]=r,e[6]=o,e[7]=s):s=e[7],s}function ja(t){const e=P.c(6);let n,r;e[0]!==t?({delayDuration:r,...n}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);const o=r===void 0?0:r;let s;return e[3]!==o||e[4]!==n?(s=l.jsx(J2,{"data-slot":"tooltip-provider",delayDuration:o,...n}),e[3]=o,e[4]=n,e[5]=s):s=e[5],s}function mp(t){const e=P.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=l.jsx(ja,{children:l.jsx(ep,{"data-slot":"tooltip",...n})}),e[2]=n,e[3]=r):r=e[3],r}function hp(t){const e=P.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=l.jsx(tp,{"data-slot":"tooltip-trigger",...n}),e[2]=n,e[3]=r):r=e[3],r}function vp(t){const e=P.c(13);let n,r,o,s;e[0]!==t?({className:r,sideOffset:s,children:n,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=o,e[4]=s):(n=e[1],r=e[2],o=e[3],s=e[4]);const i=s===void 0?0:s;let a;e[5]!==r?(a=A("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",r),e[5]=r,e[6]=a):a=e[6];let c;e[7]===Symbol.for("react.memo_cache_sentinel")?(c=l.jsx(op,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"}),e[7]=c):c=e[7];let u;return e[8]!==n||e[9]!==o||e[10]!==i||e[11]!==a?(u=l.jsx(np,{children:l.jsxs(rp,{"data-slot":"tooltip-content",sideOffset:i,className:a,...o,children:[n,c]})}),e[8]=n,e[9]=o,e[10]=i,e[11]=a,e[12]=u):u=e[12],u}function gp(t){const e=P.c(5),n=3e4,[,r]=d.useState(0);let o;e[0]!==n||e[1]!==r?(o=()=>{const i=window.setInterval(()=>r(xp),n);return()=>window.clearInterval(i)},e[0]=n,e[1]=r,e[2]=o):o=e[2];let s;e[3]!==n?(s=[n],e[3]=n,e[4]=s):s=e[4],d.useEffect(o,s)}function xp(t){return t+1}function bp(t,e){return t===null?!1:Date.now()-new Date(t).getTime()<e}const Qn="bg-neutral-400/15";function yp(t){const e=P.c(30),{lastSeenAt:n,thresholdMs:r,erroring:o,className:s}=t,i=r===void 0?6e4:r,a=o===void 0?!1:o;gp();const c=bp(n,i),u=n===null?"none":a?"stop":c?"clear":"caution";let f;e[0]!==s?(f=A("border-foreground/30 bg-background/60 inline-flex w-2.5 shrink-0 flex-col items-center justify-between rounded-full border px-px py-[3px]",s),e[0]=s,e[1]=f):f=e[1];let p;e[2]===Symbol.for("react.memo_cache_sentinel")?(p={height:24},e[2]=p):p=e[2];let m;e[3]!==u?(m=u==="stop"&&l.jsx("span",{className:"bg-danger absolute inline-flex h-full w-full animate-ping rounded-full opacity-75"}),e[3]=u,e[4]=m):m=e[4];const h=u==="stop"?"bg-danger":Qn;let g;e[5]!==h?(g=A("relative inline-flex size-1.5 rounded-full transition-colors duration-300",h),e[5]=h,e[6]=g):g=e[6];let v;e[7]!==g?(v=l.jsx("span",{className:g}),e[7]=g,e[8]=v):v=e[8];let x;e[9]!==m||e[10]!==v?(x=l.jsxs("span",{className:"relative inline-flex size-1.5",children:[m,v]}),e[9]=m,e[10]=v,e[11]=x):x=e[11];const y=u==="caution"?"bg-warning":Qn;let C;e[12]!==y?(C=A("inline-flex size-1.5 rounded-full transition-colors duration-300",y),e[12]=y,e[13]=C):C=e[13];let b;e[14]!==C?(b=l.jsx("span",{className:C}),e[14]=C,e[15]=b):b=e[15];let w;e[16]!==u?(w=u==="clear"&&l.jsx("span",{className:"bg-live absolute inline-flex h-full w-full animate-ping rounded-full opacity-75"}),e[16]=u,e[17]=w):w=e[17];const _=u==="clear"?"bg-live":Qn;let S;e[18]!==_?(S=A("relative inline-flex size-1.5 rounded-full transition-colors duration-300",_),e[18]=_,e[19]=S):S=e[19];let E;e[20]!==S?(E=l.jsx("span",{className:S}),e[20]=S,e[21]=E):E=e[21];let R;e[22]!==w||e[23]!==E?(R=l.jsxs("span",{className:"relative inline-flex size-1.5",children:[w,E]}),e[22]=w,e[23]=E,e[24]=R):R=e[24];let j;return e[25]!==b||e[26]!==R||e[27]!==f||e[28]!==x?(j=l.jsxs("span",{className:f,style:p,children:[x,b,R]}),e[25]=b,e[26]=R,e[27]=f,e[28]=x,e[29]=j):j=e[29],j}function Mn(t){const e=P.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=l.jsx(S2,{"data-slot":"dropdown-menu",...n}),e[2]=n,e[3]=r):r=e[3],r}function Nn(t){const e=P.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=l.jsx(_2,{"data-slot":"dropdown-menu-trigger",...n}),e[2]=n,e[3]=r):r=e[3],r}function An(t){const e=P.c(10);let n,r,o;e[0]!==t?({className:n,sideOffset:o,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=o):(n=e[1],r=e[2],o=e[3]);const s=o===void 0?4:o;let i;e[4]!==n?(i=A("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",n),e[4]=n,e[5]=i):i=e[5];let a;return e[6]!==r||e[7]!==s||e[8]!==i?(a=l.jsx(E2,{children:l.jsx(k2,{"data-slot":"dropdown-menu-content",sideOffset:s,className:i,...r})}),e[6]=r,e[7]=s,e[8]=i,e[9]=a):a=e[9],a}function ns(t){const e=P.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=l.jsx(j2,{"data-slot":"dropdown-menu-group",...n}),e[2]=n,e[3]=r):r=e[3],r}function Ee(t){const e=P.c(12);let n,r,o,s;e[0]!==t?({className:n,inset:r,variant:s,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=o,e[4]=s):(n=e[1],r=e[2],o=e[3],s=e[4]);const i=s===void 0?"default":s;let a;e[5]!==n?(a=A("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",n),e[5]=n,e[6]=a):a=e[6];let c;return e[7]!==r||e[8]!==o||e[9]!==a||e[10]!==i?(c=l.jsx(R2,{"data-slot":"dropdown-menu-item","data-inset":r,"data-variant":i,className:a,...o}),e[7]=r,e[8]=o,e[9]=a,e[10]=i,e[11]=c):c=e[11],c}function ch(t){const e=P.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=l.jsx(M2,{"data-slot":"dropdown-menu-radio-group",...n}),e[2]=n,e[3]=r):r=e[3],r}function uh(t){const e=P.c(11);let n,r,o;e[0]!==t?({className:r,children:n,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=o):(n=e[1],r=e[2],o=e[3]);let s;e[4]!==r?(s=A("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",r),e[4]=r,e[5]=s):s=e[5];let i;e[6]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:l.jsx(A2,{children:l.jsx(Fl,{className:"size-2 fill-current"})})}),e[6]=i):i=e[6];let a;return e[7]!==n||e[8]!==o||e[9]!==s?(a=l.jsxs(N2,{"data-slot":"dropdown-menu-radio-item",className:s,...o,children:[i,n]}),e[7]=n,e[8]=o,e[9]=s,e[10]=a):a=e[10],a}function Bt(t){const e=P.c(10);let n,r,o;e[0]!==t?({className:n,inset:r,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=o):(n=e[1],r=e[2],o=e[3]);let s;e[4]!==n?(s=A("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",n),e[4]=n,e[5]=s):s=e[5];let i;return e[6]!==r||e[7]!==o||e[8]!==s?(i=l.jsx(P2,{"data-slot":"dropdown-menu-label","data-inset":r,className:s,...o}),e[6]=r,e[7]=o,e[8]=s,e[9]=i):i=e[9],i}function Pt(t){const e=P.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let o;e[3]!==n?(o=A("bg-border -mx-1 my-1 h-px",n),e[3]=n,e[4]=o):o=e[4];let s;return e[5]!==r||e[6]!==o?(s=l.jsx(I2,{"data-slot":"dropdown-menu-separator",className:o,...r}),e[5]=r,e[6]=o,e[7]=s):s=e[7],s}function Cp(t){const e=P.c(10);let n,r,o;e[0]!==t?({className:n,type:o,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=o):(n=e[1],r=e[2],o=e[3]);let s;e[4]!==n?(s=A("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",n),e[4]=n,e[5]=s):s=e[5];let i;return e[6]!==r||e[7]!==s||e[8]!==o?(i=l.jsx("input",{type:o,"data-slot":"input",className:s,...r}),e[6]=r,e[7]=s,e[8]=o,e[9]=i):i=e[9],i}function Jn(t){const e=P.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let o;e[3]!==n?(o=A("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",n),e[3]=n,e[4]=o):o=e[4];let s;return e[5]!==r||e[6]!==o?(s=l.jsx($2,{"data-slot":"label",className:o,...r}),e[5]=r,e[6]=o,e[7]=s):s=e[7],s}function wp(t){const e=P.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=l.jsx($r,{"data-slot":"sheet",...n}),e[2]=n,e[3]=r):r=e[3],r}function Sp(t){const e=P.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=l.jsx(Lr,{"data-slot":"sheet-portal",...n}),e[2]=n,e[3]=r):r=e[3],r}function _p(t){const e=P.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let o;e[3]!==n?(o=A("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",n),e[3]=n,e[4]=o):o=e[4];let s;return e[5]!==r||e[6]!==o?(s=l.jsx(Fr,{"data-slot":"sheet-overlay",className:o,...r}),e[5]=r,e[6]=o,e[7]=s):s=e[7],s}function Ep(t){const e=P.c(17);let n,r,o,s;e[0]!==t?({className:r,children:n,side:s,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=o,e[4]=s):(n=e[1],r=e[2],o=e[3],s=e[4]);const i=s===void 0?"right":s;let a;e[5]===Symbol.for("react.memo_cache_sentinel")?(a=l.jsx(_p,{}),e[5]=a):a=e[5];const c=i==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",u=i==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",f=i==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",p=i==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let m;e[6]!==r||e[7]!==c||e[8]!==u||e[9]!==f||e[10]!==p?(m=A("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",c,u,f,p,r),e[6]=r,e[7]=c,e[8]=u,e[9]=f,e[10]=p,e[11]=m):m=e[11];let h;e[12]===Symbol.for("react.memo_cache_sentinel")?(h=l.jsxs(Br,{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:[l.jsx(as,{className:"size-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]}),e[12]=h):h=e[12];let g;return e[13]!==n||e[14]!==o||e[15]!==m?(g=l.jsxs(Sp,{children:[a,l.jsxs(zr,{"data-slot":"sheet-content",className:m,...o,children:[n,h]})]}),e[13]=n,e[14]=o,e[15]=m,e[16]=g):g=e[16],g}function kp(t){const e=P.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let o;e[3]!==n?(o=A("flex flex-col gap-1.5 p-4",n),e[3]=n,e[4]=o):o=e[4];let s;return e[5]!==r||e[6]!==o?(s=l.jsx("div",{"data-slot":"sheet-header",className:o,...r}),e[5]=r,e[6]=o,e[7]=s):s=e[7],s}function jp(t){const e=P.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let o;e[3]!==n?(o=A("text-foreground font-semibold",n),e[3]=n,e[4]=o):o=e[4];let s;return e[5]!==r||e[6]!==o?(s=l.jsx(ci,{"data-slot":"sheet-title",className:o,...r}),e[5]=r,e[6]=o,e[7]=s):s=e[7],s}function Pp(t){const e=P.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let o;e[3]!==n?(o=A("text-muted-foreground text-sm",n),e[3]=n,e[4]=o):o=e[4];let s;return e[5]!==r||e[6]!==o?(s=l.jsx(ui,{"data-slot":"sheet-description",className:o,...r}),e[5]=r,e[6]=o,e[7]=s):s=e[7],s}const Rp=768,wr=window.matchMedia(`(max-width: ${Rp-1}px)`);function Mp(t){return wr.addEventListener("change",t),()=>{wr.removeEventListener("change",t)}}function Np(){return wr.matches}function Pa(){return d.useSyncExternalStore(Mp,Np)}const Ap="sidebar_state",Ip=3600*24*7,Op="14.25rem",Dp="18rem",Tp="3rem",$p="b",Ra=d.createContext(null);function In(){const t=d.useContext(Ra);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function Lp(t){const e=P.c(36);let n,r,o,s,i,a,c;e[0]!==t?({defaultOpen:c,open:o,onOpenChange:i,className:r,style:a,children:n,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=o,e[4]=s,e[5]=i,e[6]=a,e[7]=c):(n=e[1],r=e[2],o=e[3],s=e[4],i=e[5],a=e[6],c=e[7]);const u=c===void 0?!0:c,f=Pa(),[p,m]=d.useState(!1),[h,g]=d.useState(u),v=o??h;let x;e[8]!==v||e[9]!==i?(x=L=>{const B=typeof L=="function"?L(v):L;i?i(B):g(B),document.cookie=`${Ap}=${B}; path=/; max-age=${Ip}`},e[8]=v,e[9]=i,e[10]=x):x=e[10];const y=x;let C;e[11]!==f||e[12]!==y?(C=()=>f?m(zp):y(Fp),e[11]=f,e[12]=y,e[13]=C):C=e[13];const b=C;let w,_;e[14]!==b?(w=()=>{const L=B=>{B.key===$p&&(B.metaKey||B.ctrlKey)&&(B.preventDefault(),b())};return window.addEventListener("keydown",L),()=>window.removeEventListener("keydown",L)},_=[b],e[14]=b,e[15]=w,e[16]=_):(w=e[15],_=e[16]),d.useEffect(w,_);const S=v?"expanded":"collapsed";let E;e[17]!==f||e[18]!==v||e[19]!==p||e[20]!==y||e[21]!==S||e[22]!==b?(E={state:S,open:v,setOpen:y,isMobile:f,openMobile:p,setOpenMobile:m,toggleSidebar:b},e[17]=f,e[18]=v,e[19]=p,e[20]=y,e[21]=S,e[22]=b,e[23]=E):E=e[23];const R=E;let j;e[24]!==a?(j={"--sidebar-width":Op,"--sidebar-width-icon":Tp,...a},e[24]=a,e[25]=j):j=e[25];const M=j;let I;e[26]!==r?(I=A("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",r),e[26]=r,e[27]=I):I=e[27];let N;e[28]!==n||e[29]!==s||e[30]!==M||e[31]!==I?(N=l.jsx(ja,{delayDuration:0,children:l.jsx("div",{"data-slot":"sidebar-wrapper",style:M,className:I,...s,children:n})}),e[28]=n,e[29]=s,e[30]=M,e[31]=I,e[32]=N):N=e[32];let $;return e[33]!==R||e[34]!==N?($=l.jsx(Ra.Provider,{value:R,children:N}),e[33]=R,e[34]=N,e[35]=$):$=e[35],$}function Fp(t){return!t}function zp(t){return!t}function Bp(t){const e=P.c(46);let n,r,o,s,i,a;e[0]!==t?({side:s,variant:i,collapsible:a,className:r,children:n,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=o,e[4]=s,e[5]=i,e[6]=a):(n=e[1],r=e[2],o=e[3],s=e[4],i=e[5],a=e[6]);const c=s===void 0?"left":s,u=i===void 0?"sidebar":i,f=a===void 0?"offcanvas":a,{isMobile:p,state:m,openMobile:h,setOpenMobile:g}=In();if(f==="none"){let j;e[7]!==r?(j=A("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",r),e[7]=r,e[8]=j):j=e[8];let M;return e[9]!==n||e[10]!==o||e[11]!==j?(M=l.jsx("div",{"data-slot":"sidebar",className:j,...o,children:n}),e[9]=n,e[10]=o,e[11]=j,e[12]=M):M=e[12],M}if(p){let j;e[13]===Symbol.for("react.memo_cache_sentinel")?(j={"--sidebar-width":Dp},e[13]=j):j=e[13];let M;e[14]===Symbol.for("react.memo_cache_sentinel")?(M=l.jsxs(kp,{className:"sr-only",children:[l.jsx(jp,{children:"Sidebar"}),l.jsx(Pp,{children:"Displays the mobile sidebar."})]}),e[14]=M):M=e[14];let I;e[15]!==n?(I=l.jsx("div",{className:"flex h-full w-full flex-col",children:n}),e[15]=n,e[16]=I):I=e[16];let N;e[17]!==c||e[18]!==I?(N=l.jsxs(Ep,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:j,side:c,children:[M,I]}),e[17]=c,e[18]=I,e[19]=N):N=e[19];let $;return e[20]!==h||e[21]!==o||e[22]!==g||e[23]!==N?($=l.jsx(wp,{open:h,onOpenChange:g,...o,children:N}),e[20]=h,e[21]=o,e[22]=g,e[23]=N,e[24]=$):$=e[24],$}const v=m==="collapsed"?f:"",x=u==="floating"||u==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let y;e[25]!==x?(y=A("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",x),e[25]=x,e[26]=y):y=e[26];let C;e[27]!==y?(C=l.jsx("div",{"data-slot":"sidebar-gap",className:y}),e[27]=y,e[28]=C):C=e[28];const b=c==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",w=u==="floating"||u==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l";let _;e[29]!==r||e[30]!==b||e[31]!==w?(_=A("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",b,w,r),e[29]=r,e[30]=b,e[31]=w,e[32]=_):_=e[32];let S;e[33]!==n?(S=l.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:n}),e[33]=n,e[34]=S):S=e[34];let E;e[35]!==o||e[36]!==_||e[37]!==S?(E=l.jsx("div",{"data-slot":"sidebar-container",className:_,...o,children:S}),e[35]=o,e[36]=_,e[37]=S,e[38]=E):E=e[38];let R;return e[39]!==c||e[40]!==m||e[41]!==E||e[42]!==v||e[43]!==C||e[44]!==u?(R=l.jsxs("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":m,"data-collapsible":v,"data-variant":u,"data-side":c,"data-slot":"sidebar",children:[C,E]}),e[39]=c,e[40]=m,e[41]=E,e[42]=v,e[43]=C,e[44]=u,e[45]=R):R=e[45],R}function Vp(t){const e=P.c(15);let n,r,o;e[0]!==t?({className:n,onClick:r,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=o):(n=e[1],r=e[2],o=e[3]);const{toggleSidebar:s}=In();let i;e[4]!==n?(i=A("size-7",n),e[4]=n,e[5]=i):i=e[5];let a;e[6]!==r||e[7]!==s?(a=p=>{r?.(p),s()},e[6]=r,e[7]=s,e[8]=a):a=e[8];let c,u;e[9]===Symbol.for("react.memo_cache_sentinel")?(c=l.jsx(hc,{}),u=l.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=c,e[10]=u):(c=e[9],u=e[10]);let f;return e[11]!==o||e[12]!==i||e[13]!==a?(f=l.jsxs(Et,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:i,onClick:a,...o,children:[c,u]}),e[11]=o,e[12]=i,e[13]=a,e[14]=f):f=e[14],f}function Hp(t){const e=P.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let o;e[3]!==n?(o=A("bg-background relative flex w-full flex-1 flex-col","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",n),e[3]=n,e[4]=o):o=e[4];let s;return e[5]!==r||e[6]!==o?(s=l.jsx("main",{"data-slot":"sidebar-inset",className:o,...r}),e[5]=r,e[6]=o,e[7]=s):s=e[7],s}function Up(t){const e=P.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let o;e[3]!==n?(o=A("flex flex-col gap-2 p-2",n),e[3]=n,e[4]=o):o=e[4];let s;return e[5]!==r||e[6]!==o?(s=l.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:o,...r}),e[5]=r,e[6]=o,e[7]=s):s=e[7],s}function Wp(t){const e=P.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let o;e[3]!==n?(o=A("flex flex-col gap-2 p-2",n),e[3]=n,e[4]=o):o=e[4];let s;return e[5]!==r||e[6]!==o?(s=l.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:o,...r}),e[5]=r,e[6]=o,e[7]=s):s=e[7],s}function Gp(t){const e=P.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let o;e[3]!==n?(o=A("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",n),e[3]=n,e[4]=o):o=e[4];let s;return e[5]!==r||e[6]!==o?(s=l.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:o,...r}),e[5]=r,e[6]=o,e[7]=s):s=e[7],s}function yo(t){const e=P.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let o;e[3]!==n?(o=A("relative flex w-full min-w-0 flex-col p-2",n),e[3]=n,e[4]=o):o=e[4];let s;return e[5]!==r||e[6]!==o?(s=l.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:o,...r}),e[5]=r,e[6]=o,e[7]=s):s=e[7],s}function Kp(t){const e=P.c(10);let n,r,o;e[0]!==t?({className:n,asChild:o,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=o):(n=e[1],r=e[2],o=e[3]);const i=(o===void 0?!1:o)?Mt:"div";let a;e[4]!==n?(a=A("text-muted-foreground ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 pt-2 text-xs font-semibold outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",n),e[4]=n,e[5]=a):a=e[5];let c;return e[6]!==i||e[7]!==r||e[8]!==a?(c=l.jsx(i,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:a,...r}),e[6]=i,e[7]=r,e[8]=a,e[9]=c):c=e[9],c}function qp(t){const e=P.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let o;e[3]!==n?(o=A("w-full text-sm",n),e[3]=n,e[4]=o):o=e[4];let s;return e[5]!==r||e[6]!==o?(s=l.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:o,...r}),e[5]=r,e[6]=o,e[7]=s):s=e[7],s}function rt(t){const e=P.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let o;e[3]!==n?(o=A("flex w-full min-w-0 flex-col gap-1",n),e[3]=n,e[4]=o):o=e[4];let s;return e[5]!==r||e[6]!==o?(s=l.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:o,...r}),e[5]=r,e[6]=o,e[7]=s):s=e[7],s}function Ye(t){const e=P.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let o;e[3]!==n?(o=A("group/menu-item relative",n),e[3]=n,e[4]=o):o=e[4];let s;return e[5]!==r||e[6]!==o?(s=l.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:o,...r}),e[5]=r,e[6]=o,e[7]=s):s=e[7],s}const Yp=Pr("peer/menu-button flex w-full items-center gap-3 overflow-hidden rounded-md border border-transparent px-2 text-left text-sm text-sidebar-foreground outline-hidden ring-sidebar-ring transition-colors hover:text-sidebar-accent-foreground focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:border-sidebar-border data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[active=true]:shadow-lg data-[active=true]:shadow-black/4 data-[state=open]:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:opacity-70 data-[active=true]:[&>svg]:opacity-100",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-9 text-sm",sm:"h-7 text-xs",lg:"h-14 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Xe(t){const e=P.c(28);let n,r,o,s,i,a,c;e[0]!==t?({asChild:o,isActive:s,variant:i,size:a,tooltip:c,className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=o,e[4]=s,e[5]=i,e[6]=a,e[7]=c):(n=e[1],r=e[2],o=e[3],s=e[4],i=e[5],a=e[6],c=e[7]);const u=o===void 0?!1:o,f=s===void 0?!1:s,p=i===void 0?"default":i,m=a===void 0?"default":a,h=u?Mt:"button",{isMobile:g,state:v}=In();let x;e[8]!==n||e[9]!==m||e[10]!==p?(x=A(Yp({variant:p,size:m}),n),e[8]=n,e[9]=m,e[10]=p,e[11]=x):x=e[11];let y;e[12]!==h||e[13]!==f||e[14]!==r||e[15]!==m||e[16]!==x?(y=l.jsx(h,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":m,"data-active":f,className:x,...r}),e[12]=h,e[13]=f,e[14]=r,e[15]=m,e[16]=x,e[17]=y):y=e[17];const C=y;if(!c)return C;if(typeof c=="string"){let E;e[18]!==c?(E={children:c},e[18]=c,e[19]=E):E=e[19],c=E}let b;e[20]!==C?(b=l.jsx(hp,{asChild:!0,children:C}),e[20]=C,e[21]=b):b=e[21];const w=v!=="collapsed"||g;let _;e[22]!==w||e[23]!==c?(_=l.jsx(vp,{side:"right",align:"center",hidden:w,...c}),e[22]=w,e[23]=c,e[24]=_):_=e[24];let S;return e[25]!==b||e[26]!==_?(S=l.jsxs(mp,{children:[b,_]}),e[25]=b,e[26]=_,e[27]=S):S=e[27],S}function Xp(t){const e=P.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let o;e[3]!==n?(o=A("flex min-w-0 flex-col gap-0.5 py-0.5 pl-6","group-data-[collapsible=icon]:hidden",n),e[3]=n,e[4]=o):o=e[4];let s;return e[5]!==r||e[6]!==o?(s=l.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:o,...r}),e[5]=r,e[6]=o,e[7]=s):s=e[7],s}function Zp(t){const e=P.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let o;e[3]!==n?(o=A("group/menu-sub-item relative",n),e[3]=n,e[4]=o):o=e[4];let s;return e[5]!==r||e[6]!==o?(s=l.jsx("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:o,...r}),e[5]=r,e[6]=o,e[7]=s):s=e[7],s}function rs(t){const e=P.c(16);let n,r,o,s,i;e[0]!==t?({asChild:o,size:s,isActive:i,className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=o,e[4]=s,e[5]=i):(n=e[1],r=e[2],o=e[3],s=e[4],i=e[5]);const a=o===void 0?!1:o,c=s===void 0?"md":s,u=i===void 0?!1:i,f=a?Mt:"a",p=c==="sm"&&"text-xs",m=c==="md"&&"text-sm";let h;e[6]!==n||e[7]!==p||e[8]!==m?(h=A("text-sidebar-foreground ring-sidebar-ring hover:text-sidebar-accent-foreground flex h-8 min-w-0 items-center gap-2 overflow-hidden rounded-md border border-transparent px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0","data-[active=true]:border-sidebar-border data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[active=true]:shadow-lg data-[active=true]:shadow-black/4",p,m,"group-data-[collapsible=icon]:hidden",n),e[6]=n,e[7]=p,e[8]=m,e[9]=h):h=e[9];let g;return e[10]!==f||e[11]!==u||e[12]!==r||e[13]!==c||e[14]!==h?(g=l.jsx(f,{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button","data-size":c,"data-active":u,className:h,...r}),e[10]=f,e[11]=u,e[12]=r,e[13]=c,e[14]=h,e[15]=g):g=e[15],g}function Qp(t){const e=P.c(10);let n,r,o;if(e[0]!==t?({variant:o,children:n,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=o):(n=e[1],r=e[2],o=e[3]),(o===void 0?"header":o)==="sidebar"){let a;return e[4]!==n||e[5]!==r?(a=l.jsx(Hp,{...r,children:n}),e[4]=n,e[5]=r,e[6]=a):a=e[6],a}let i;return e[7]!==n||e[8]!==r?(i=l.jsx("main",{className:"mx-auto flex h-full w-full max-w-7xl flex-1 flex-col gap-4 rounded-xl",...r,children:n}),e[7]=n,e[8]=r,e[9]=i):i=e[9],i}function Jp(t){const e=P.c(6),{children:n,variant:r}=t,o=r===void 0?"header":r,[s,i]=d.useState(em);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=f=>{i(f),typeof window<"u"&&localStorage.setItem("sidebar",String(f))},e[0]=a):a=e[0];const c=a;if(o==="header"){let f;return e[1]!==n?(f=l.jsx("div",{className:"flex min-h-screen w-full flex-col",children:n}),e[1]=n,e[2]=f):f=e[2],f}let u;return e[3]!==n||e[4]!==s?(u=l.jsx(Lp,{defaultOpen:s,open:s,onOpenChange:c,children:n}),e[3]=n,e[4]=s,e[5]=u):u=e[5],u}function em(){return typeof window<"u"?localStorage.getItem("sidebar")!=="false":!0}function tm(t){const e=P.c(10);let n,r,o;e[0]!==t?({iconNode:n,className:r,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=o):(n=e[1],r=e[2],o=e[3]);let s;e[4]!==r?(s=A("h-4 w-4",r),e[4]=r,e[5]=s):s=e[5];let i;return e[6]!==n||e[7]!==o||e[8]!==s?(i=l.jsx(n,{className:s,...o}),e[6]=n,e[7]=o,e[8]=s,e[9]=i):i=e[9],i}function nm(t){const e=P.c(12);let n,r,o;e[0]!==t?({items:r,className:n,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=o):(n=e[1],r=e[2],o=e[3]);const s=`group-data-[collapsible=icon]:p-0 ${n??""}`;let i;e[4]!==r?(i=r.map(rm),e[4]=r,e[5]=i):i=e[5];let a;e[6]!==i?(a=l.jsx(qp,{children:l.jsx(rt,{children:i})}),e[6]=i,e[7]=a):a=e[7];let c;return e[8]!==o||e[9]!==s||e[10]!==a?(c=l.jsx(yo,{...o,className:s,children:a}),e[8]=o,e[9]=s,e[10]=a,e[11]=c):c=e[11],c}function rm(t){return l.jsx(Ye,{children:l.jsx(Xe,{asChild:!0,className:"text-neutral-600 hover:text-neutral-800 dark:text-neutral-300 dark:hover:text-neutral-100",children:l.jsxs("a",{href:t.href,target:"_blank",rel:"noopener noreferrer",children:[t.icon&&l.jsx(tm,{iconNode:t.icon,className:"h-5 w-5"}),l.jsx("span",{children:t.title})]})})},t.title)}function om(t){const e=P.c(14),{items:n,label:r}=t;let o;e[0]!==n?(o=n===void 0?[]:n,e[0]=n,e[1]=o):o=e[1];const s=o,i=r===void 0?"Platform":r,a=be();let c;e[2]!==i?(c=i&&l.jsx(Kp,{children:i}),e[2]=i,e[3]=c):c=e[3];let u;if(e[4]!==s||e[5]!==a){let m;e[7]!==a?(m=h=>l.jsx(Ye,{children:l.jsx(Xe,{asChild:!0,isActive:a.url.startsWith(h.href),tooltip:{children:h.title},children:l.jsxs(Ae,{href:h.href,prefetch:!0,children:[h.icon&&l.jsx(h.icon,{}),l.jsx("span",{children:h.title})]})})},h.title),e[7]=a,e[8]=m):m=e[8],u=s.map(m),e[4]=s,e[5]=a,e[6]=u}else u=e[6];let f;e[9]!==u?(f=l.jsx(rt,{children:u}),e[9]=u,e[10]=f):f=e[10];let p;return e[11]!==c||e[12]!==f?(p=l.jsxs(yo,{className:"p-0",children:[c,f]}),e[11]=c,e[12]=f,e[13]=p):p=e[13],p}function sm(t){const e=P.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let o;e[3]!==n?(o=A("relative flex size-8 shrink-0 overflow-hidden rounded-full",n),e[3]=n,e[4]=o):o=e[4];let s;return e[5]!==r||e[6]!==o?(s=l.jsx(xf,{"data-slot":"avatar",className:o,...r}),e[5]=r,e[6]=o,e[7]=s):s=e[7],s}function im(t){const e=P.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let o;e[3]!==n?(o=A("aspect-square size-full",n),e[3]=n,e[4]=o):o=e[4];let s;return e[5]!==r||e[6]!==o?(s=l.jsx(yf,{"data-slot":"avatar-image",className:o,...r}),e[5]=r,e[6]=o,e[7]=s):s=e[7],s}function am(t){const e=P.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let o;e[3]!==n?(o=A("bg-muted flex size-full items-center justify-center rounded-full",n),e[3]=n,e[4]=o):o=e[4];let s;return e[5]!==r||e[6]!==o?(s=l.jsx(wf,{"data-slot":"avatar-fallback",className:o,...r}),e[5]=r,e[6]=o,e[7]=s):s=e[7],s}function lm(){return cm}function cm(t){const e=t.trim().split(" ");if(e.length===0)return"";if(e.length===1)return e[0].charAt(0).toUpperCase();const n=e[0].charAt(0),r=e[e.length-1].charAt(0);return`${n}${r}`.toUpperCase()}function Ma(t){const e=P.c(22),{user:n,showEmail:r}=t,o=r===void 0?!1:r,s=lm();let i;e[0]!==n.avatar||e[1]!==n.name?(i=l.jsx(im,{src:n.avatar,alt:n.name}),e[0]=n.avatar,e[1]=n.name,e[2]=i):i=e[2];let a;e[3]!==s||e[4]!==n.name?(a=s(n.name),e[3]=s,e[4]=n.name,e[5]=a):a=e[5];let c;e[6]!==a?(c=l.jsx(am,{className:"bg-muted text-foreground rounded-full text-[11px] font-medium",children:a}),e[6]=a,e[7]=c):c=e[7];let u;e[8]!==i||e[9]!==c?(u=l.jsxs(sm,{className:"size-6 overflow-hidden rounded-full",children:[i,c]}),e[8]=i,e[9]=c,e[10]=u):u=e[10];let f;e[11]!==n.name?(f=l.jsx("span",{className:"truncate font-medium",children:n.name}),e[11]=n.name,e[12]=f):f=e[12];let p;e[13]!==o||e[14]!==n.email?(p=o&&l.jsx("span",{className:"text-muted-foreground truncate text-xs",children:n.email}),e[13]=o,e[14]=n.email,e[15]=p):p=e[15];let m;e[16]!==f||e[17]!==p?(m=l.jsxs("div",{className:"grid flex-1 text-left text-sm leading-tight",children:[f,p]}),e[16]=f,e[17]=p,e[18]=m):m=e[18];let h;return e[19]!==u||e[20]!==m?(h=l.jsxs(l.Fragment,{children:[u,m]}),e[19]=u,e[20]=m,e[21]=h):h=e[21],h}function um(){return dm}function dm(){document.body.style.removeProperty("pointer-events")}function fm(t){const e=P.c(25),{auth:n}=t,{session:r,user:o}=n,{account:s,accounts:i}=be().props,a=um();let c;e[0]!==a?(c=()=>{a(),ie.flushAll()},e[0]=a,e[1]=c):c=e[1];const u=c;let f;e[2]!==o?(f=l.jsx(Bt,{className:"p-0 font-normal",children:l.jsx("div",{className:"flex items-center gap-2 px-1 py-1.5 text-left text-sm",children:l.jsx(Ma,{user:o,showEmail:!0})})}),e[2]=o,e[3]=f):f=e[3];let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=l.jsx(Pt,{}),e[4]=p):p=e[4];let m;e[5]!==s?.id||e[6]!==i||e[7]!==a?(m=i.length>1&&l.jsxs(l.Fragment,{children:[l.jsxs(ns,{children:[l.jsx(Bt,{className:"text-muted-foreground text-xs",children:"Accounts"}),i.map(_=>l.jsxs(Ee,{onSelect:()=>{a(),ie.post(Oa(_.id))},children:[l.jsx(ms,{className:"mr-2"}),l.jsx("span",{className:"flex-1",children:_.name}),s?.id===_.id&&l.jsx(hn,{className:"size-4"})]},_.id))]}),l.jsx(Pt,{})]}),e[5]=s?.id,e[6]=i,e[7]=a,e[8]=m):m=e[8];let h;e[9]===Symbol.for("react.memo_cache_sentinel")?(h=Da(),e[9]=h):h=e[9];let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=l.jsx(Rc,{className:"mr-2"}),e[10]=g):g=e[10];let v;e[11]!==a?(v=l.jsx(ns,{children:l.jsx(Ee,{asChild:!0,children:l.jsxs(Ae,{className:"block w-full",href:h,as:"button",prefetch:!0,onClick:a,children:[g,"Settings"]})})}),e[11]=a,e[12]=v):v=e[12];let x;e[13]===Symbol.for("react.memo_cache_sentinel")?(x=l.jsx(Pt,{}),e[13]=x):x=e[13];let y;e[14]!==r.id?(y=Ta({id:r.id}),e[14]=r.id,e[15]=y):y=e[15];let C;e[16]===Symbol.for("react.memo_cache_sentinel")?(C=l.jsx(ic,{className:"mr-2"}),e[16]=C):C=e[16];let b;e[17]!==u||e[18]!==y?(b=l.jsx(Ee,{asChild:!0,children:l.jsxs(Ae,{className:"block w-full",method:"delete",href:y,as:"button",onClick:u,children:[C,"Log out"]})}),e[17]=u,e[18]=y,e[19]=b):b=e[19];let w;return e[20]!==b||e[21]!==f||e[22]!==m||e[23]!==v?(w=l.jsxs(l.Fragment,{children:[f,p,m,v,x,b]}),e[20]=b,e[21]=f,e[22]=m,e[23]=v,e[24]=w):w=e[24],w}function pm(){const t=P.c(13),{auth:e}=be().props,{state:n}=In(),r=Pa();let o;t[0]!==e.user?(o=l.jsx(Ma,{user:e.user}),t[0]=e.user,t[1]=o):o=t[1];let s;t[2]===Symbol.for("react.memo_cache_sentinel")?(s=l.jsx(gs,{className:"ml-auto size-4"}),t[2]=s):s=t[2];let i;t[3]!==o?(i=l.jsx(Nn,{asChild:!0,children:l.jsxs(Xe,{size:"default",className:"data-[state=open]:bg-sidebar-accent group gap-2",children:[o,s]})}),t[3]=o,t[4]=i):i=t[4];const a=r?"bottom":n==="collapsed"?"left":"bottom";let c;t[5]!==e?(c=l.jsx(fm,{auth:e}),t[5]=e,t[6]=c):c=t[6];let u;t[7]!==a||t[8]!==c?(u=l.jsx(An,{className:"w-(--radix-dropdown-menu-trigger-width) min-w-56 rounded-lg",align:"end",side:a,children:c}),t[7]=a,t[8]=c,t[9]=u):u=t[9];let f;return t[10]!==i||t[11]!==u?(f=l.jsx(rt,{children:l.jsx(Ye,{children:l.jsxs(Mn,{children:[i,u]})})}),t[10]=i,t[11]=u,t[12]=f):f=t[12],f}function os(t){const e=P.c(9);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let o;e[3]!==n?(o=A("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",n),e[3]=n,e[4]=o):o=e[4];let s;e[5]===Symbol.for("react.memo_cache_sentinel")?(s=l.jsx(If,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none",children:l.jsx(hn,{className:"size-3.5"})}),e[5]=s):s=e[5];let i;return e[6]!==r||e[7]!==o?(i=l.jsx(Nf,{"data-slot":"checkbox",className:o,...r,children:s}),e[6]=r,e[7]=o,e[8]=i):i=e[8],i}function ss(t){const[e,n]=t.split("?"),r=[...new URLSearchParams(n)].filter(([,o])=>o!=="").sort(([o],[s])=>o.localeCompare(s));return`${e}?${new URLSearchParams(r).toString()}`}function Co(t,e){return ss(t)===ss(e)}function Na(t,e){return t.split("?")[0]===e.split("?")[0]}function dh(t){const e=P.c(84),{page:n}=t,r=be(),{environment:o,saved_views:s}=r.props,i=s===void 0?[]:s,[a,c]=d.useState(!1),[u,f]=d.useState(""),[p,m]=d.useState(!0),[h,g]=d.useState(!0),[v,x]=d.useState(!1),y=o.application_id,C=o.id;let b;e[0]!==n?(b=J=>J.page===n,e[0]=n,e[1]=b):b=e[1];const w=i.filter(b);let _;e[2]!==r.url?(_=new URLSearchParams(r.url.split("?")[1]??""),e[2]=r.url,e[3]=_):_=e[3];const S=_;let E;e[4]!==y||e[5]!==C?(E=J=>$a(y,C,J.id),e[4]=y,e[5]=C,e[6]=E):E=e[6];const R=E;let j;e[7]!==y||e[8]!==C||e[9]!==r.props.window||e[10]!==u||e[11]!==n||e[12]!==p||e[13]!==S||e[14]!==f||e[15]!==c||e[16]!==h?(j=()=>{const J={};for(const[Me,So]of S)Me!=="window"&&Me!=="q"&&So&&(J[Me]=So);ie.post(La(y,C),{name:u.trim(),page:n,query:S.get("q")??"",window:S.get("window")??r.props.window??"",pinned:p,shared:h,params:J},{preserveScroll:!0}),c(!1),f("")},e[7]=y,e[8]=C,e[9]=r.props.window,e[10]=u,e[11]=n,e[12]=p,e[13]=S,e[14]=f,e[15]=c,e[16]=h,e[17]=j):j=e[17];const M=j;let I;e[18]===Symbol.for("react.memo_cache_sentinel")?(I=()=>{navigator.clipboard?.writeText(globalThis.location.href),x(!0),globalThis.setTimeout(()=>x(!1),1500)},e[18]=I):I=e[18];const N=I,$="flex shrink-0 items-center gap-1",L=Mn;let B;e[19]===Symbol.for("react.memo_cache_sentinel")?(B=l.jsx(Nn,{asChild:!0,children:l.jsxs(Et,{variant:"outline",size:"sm",className:"h-8 gap-1.5 px-2",children:[l.jsx(_r,{className:"size-3.5"}),l.jsx("span",{className:"label-caps text-foreground",children:"Views"}),l.jsx(hs,{className:"size-3 opacity-60"})]})}),e[19]=B):B=e[19];const X=An,H="end",U="w-64";let q;e[20]===Symbol.for("react.memo_cache_sentinel")?(q=l.jsx(Bt,{className:"label-caps",children:"Saved views"}),e[20]=q):q=e[20];const D=w.length===0&&l.jsx(Ee,{disabled:!0,children:"No saved views yet"});let se;e[21]!==r.url||e[22]!==R?(se=J=>l.jsxs(Ee,{onSelect:()=>ie.visit(J.url),className:A(Co(r.url,J.url)&&"bg-accent"),children:[l.jsx("span",{className:"truncate",children:J.name}),J.mine&&l.jsxs("span",{className:"ml-auto flex shrink-0 items-center gap-0.5",children:[l.jsx("button",{type:"button","aria-label":`${J.pinned?"Unpin":"Pin"} ${J.name}`,className:"text-muted-foreground hover:text-foreground p-0.5",onClick:Me=>{Me.preventDefault(),Me.stopPropagation(),ie.patch(R(J),{pinned:!J.pinned},{preserveScroll:!0})},children:J.pinned?l.jsx(gc,{className:"size-3.5"}):l.jsx(bc,{className:"size-3.5"})}),l.jsx("button",{type:"button","aria-label":`Delete ${J.name}`,className:"text-muted-foreground hover:text-destructive p-0.5",onClick:Me=>{Me.preventDefault(),Me.stopPropagation(),ie.delete(R(J),{preserveScroll:!0})},children:l.jsx(Fc,{className:"size-3.5"})})]})]},J.id),e[21]=r.url,e[22]=R,e[23]=se):se=e[23];const k=w.map(se);let T;e[24]===Symbol.for("react.memo_cache_sentinel")?(T=l.jsx(Pt,{}),e[24]=T):T=e[24];let z;e[25]!==c?(z=()=>c(!0),e[25]=c,e[26]=z):z=e[26];let O;e[27]===Symbol.for("react.memo_cache_sentinel")?(O=l.jsx(Sl,{className:"size-3.5"}),e[27]=O):O=e[27];let W;e[28]!==z?(W=l.jsxs(Ee,{onSelect:z,children:[O,"Save current view…"]}),e[28]=z,e[29]=W):W=e[29];let G;e[30]!==X||e[31]!==q||e[32]!==D||e[33]!==k||e[34]!==W?(G=l.jsxs(X,{align:H,className:U,children:[q,D,k,T,W]}),e[30]=X,e[31]=q,e[32]=D,e[33]=k,e[34]=W,e[35]=G):G=e[35];let Y;e[36]!==L||e[37]!==G||e[38]!==B?(Y=l.jsxs(L,{children:[B,G]}),e[36]=L,e[37]=G,e[38]=B,e[39]=Y):Y=e[39];let Q;e[40]!==v?(Q=v?l.jsx(hn,{className:"size-3.5"}):l.jsx(oc,{className:"size-3.5"}),e[40]=v,e[41]=Q):Q=e[41];let de;e[42]!==N||e[43]!==Q?(de=l.jsx(Et,{variant:"outline",size:"sm",className:"h-8 px-2","aria-label":"Copy link to this view",onClick:N,children:Q}),e[42]=N,e[43]=Q,e[44]=de):de=e[44];let He;e[45]!==Y||e[46]!==de?(He=l.jsxs("div",{className:$,children:[Y,de]}),e[45]=Y,e[46]=de,e[47]=He):He=e[47];let lt;e[48]===Symbol.for("react.memo_cache_sentinel")?(lt=l.jsxs(go,{children:[l.jsx(xo,{children:"Save this view"}),l.jsx(bo,{children:"Keeps the filters, window, and sort currently in the URL under a name you can link to."})]}),e[48]=lt):lt=e[48];let ct;e[49]===Symbol.for("react.memo_cache_sentinel")?(ct=l.jsx(Jn,{htmlFor:"saved-view-name",children:"Name"}),e[49]=ct):ct=e[49];let Ue;e[50]!==f?(Ue=J=>f(J.target.value),e[50]=f,e[51]=Ue):Ue=e[51];let ge;e[52]!==u||e[53]!==Ue?(ge=l.jsxs("div",{className:"grid gap-1.5",children:[ct,l.jsx(Cp,{id:"saved-view-name",value:u,onChange:Ue,placeholder:"5xx checkout requests"})]}),e[52]=u,e[53]=Ue,e[54]=ge):ge=e[54];let ut;e[55]!==m?(ut=J=>m(J===!0),e[55]=m,e[56]=ut):ut=e[56];let dt;e[57]!==p||e[58]!==ut?(dt=l.jsxs(Jn,{className:"gap-2 font-normal",children:[l.jsx(os,{checked:p,onCheckedChange:ut}),"Pin to the sidebar"]}),e[57]=p,e[58]=ut,e[59]=dt):dt=e[59];let ft;e[60]!==g?(ft=J=>g(J===!0),e[60]=g,e[61]=ft):ft=e[61];let pt;e[62]!==h||e[63]!==ft?(pt=l.jsxs(Jn,{className:"gap-2 font-normal",children:[l.jsx(os,{checked:h,onCheckedChange:ft}),"Share with the team"]}),e[62]=h,e[63]=ft,e[64]=pt):pt=e[64];let mt;e[65]!==ge||e[66]!==dt||e[67]!==pt?(mt=l.jsxs("div",{className:"flex flex-col gap-3",children:[ge,dt,pt]}),e[65]=ge,e[66]=dt,e[67]=pt,e[68]=mt):mt=e[68];let Kt;e[69]!==u?(Kt=u.trim(),e[69]=u,e[70]=Kt):Kt=e[70];const On=!Kt;let ht;e[71]!==M||e[72]!==On?(ht=l.jsx(ap,{children:l.jsx(Et,{size:"sm",onClick:M,disabled:On,children:"Save view"})}),e[71]=M,e[72]=On,e[73]=ht):ht=e[73];let vt;e[74]!==mt||e[75]!==ht?(vt=l.jsxs(vo,{className:"sm:max-w-sm",children:[lt,mt,ht]}),e[74]=mt,e[75]=ht,e[76]=vt):vt=e[76];let gt;e[77]!==a||e[78]!==c||e[79]!==vt?(gt=l.jsx(ho,{open:a,onOpenChange:c,children:vt}),e[77]=a,e[78]=c,e[79]=vt,e[80]=gt):gt=e[80];let qt;return e[81]!==He||e[82]!==gt?(qt=l.jsxs(l.Fragment,{children:[He,gt]}),e[81]=He,e[82]=gt,e[83]=qt):qt=e[83],qt}function mm(t){const e=P.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=l.jsx(uf,{"data-slot":"collapsible",...n}),e[2]=n,e[3]=r):r=e[3],r}function hm(t){const e=P.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=l.jsx(af,{"data-slot":"collapsible-trigger",...n}),e[2]=n,e[3]=r):r=e[3],r}function vm(t){const e=P.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=l.jsx(lf,{"data-slot":"collapsible-content",...n}),e[2]=n,e[3]=r):r=e[3],r}function wo(t,e,n){const r=t,o=e,s={window:n};return[{title:"Overview",href:Dt(r,o,s),icon:Kl,group:"activity"},{title:"Requests",href:ls(r,o,s),icon:ml,group:"activity"},{title:"Jobs",href:cs(r,o,s),icon:Vc,group:"activity"},{title:"Scheduled tasks",href:za(r,o,s),icon:Nl,group:"activity"},{title:"Commands",href:Ba(r,o,s),icon:Dc,group:"activity"},{title:"Exceptions",href:Va(r,o,s),icon:kl,group:"activity"},{title:"Queries",href:us(r,o,s),icon:Bl,group:"activity"},{title:"Spans",href:Ha(r,o,s),icon:$c,group:"activity"},{title:"Profiles",href:Ua(r,o,s),icon:Wl,group:"activity"},{title:"Transactions",href:Wa(r,o,s),icon:Yl,group:"activity"},{title:"View renders",href:Ga(r,o,s),icon:nc,group:"activity"},{title:"Cache",href:Ka(r,o,s),icon:Jl,group:"activity"},{title:"Mail",href:qa(r,o,s),icon:lc,group:"activity"},{title:"Notifications",href:Ya(r,o,s),icon:ps,group:"activity"},{title:"Broadcasts",href:Xa(r,o,s),icon:Rl,group:"activity"},{title:"Outgoing requests",href:Za(r,o,s),icon:vl,group:"activity"},{title:"LLM",href:Qa(r,o,s),icon:Ic,group:"activity"},{title:"Storage",href:Ja(r,o,s),icon:Zl,group:"activity"},{title:"Logs",href:el(r,o,s),icon:Hl,group:"activity"},{title:"Deprecations",href:tl(r,o,s),icon:Fa,group:"activity"},{title:"Visits",href:nl(r,o,s),icon:uc,group:"monitoring"},{title:"Users",href:rl(r,o,s),icon:kr,group:"monitoring"},{title:"Tenants",href:ol(r,o,s),icon:ms,group:"monitoring"},{title:"Deploys",href:sl(r,o),icon:_c,group:"monitoring"},{title:"Releases",href:il(r,o,s),icon:pc,group:"monitoring"},{title:"Processes",href:al(r,o),icon:jc,group:"monitoring"},{title:"Alerts",href:ll(r,o),icon:Nc,group:"monitoring"},{title:"Thresholds",href:cl(r,o),icon:bl,group:"settings"},{title:"Usage",href:ul(r,o),icon:Il,group:"settings"}]}const Aa=[{key:"activity",title:"Activity"},{key:"monitoring",title:"Monitoring"},{key:"settings",title:"Settings"}];function gm(){const t=P.c(1),e=be(),{environment:n}=e.props,r=e.url.split("?")[0];let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={},t[0]=o):o=t[0];const[s,i]=d.useState(o);if(!n)return null;const a=wo(n.application_id,n.id,e.props.window),c=(e.props.saved_views??[]).filter(xm),u=p=>{const m=p.split("?")[0];return r===m||r.startsWith(m+"/")},f=a[0];return l.jsx(yo,{className:"p-0",children:l.jsxs(rt,{children:[l.jsx(Ye,{children:l.jsx(Xe,{asChild:!0,isActive:r===f.href.split("?")[0],tooltip:{children:f.title},children:l.jsxs(Ae,{href:f.href,prefetch:!0,children:[f.icon&&l.jsx(f.icon,{}),l.jsx("span",{children:f.title})]})})}),Aa.map(p=>{const m=a.filter(x=>x.group===p.key&&x!==f),h=m.some(x=>u(x.href)),g=s[p.key]??h,v=m[0]?.icon;return l.jsx(mm,{open:g,onOpenChange:x=>i(y=>({...y,[p.key]:x})),className:"group/collapsible",children:l.jsxs(Ye,{children:[l.jsx(hm,{asChild:!0,children:l.jsxs(Xe,{tooltip:{children:p.title},className:A(h&&"text-sidebar-foreground"),children:[v&&l.jsx(v,{}),l.jsx("span",{children:p.title}),l.jsx(vs,{className:"ml-auto size-3.5 opacity-60 transition-transform group-data-[state=open]/collapsible:rotate-90"})]})}),l.jsx(vm,{children:l.jsx(Xp,{className:"mr-0 gap-0.5 pr-0",children:m.map(x=>l.jsxs(Zp,{children:[l.jsx(rs,{asChild:!0,isActive:u(x.href),children:l.jsx(Ae,{href:x.href,prefetch:!0,children:l.jsx("span",{children:x.title})})}),c.filter(y=>Na(y.url,x.href)).map(y=>l.jsx(rs,{asChild:!0,size:"sm",className:"pl-4",isActive:Co(e.url,y.url),children:l.jsxs(Ae,{href:y.url,children:[l.jsx(_r,{className:"opacity-60"}),l.jsx("span",{children:y.name})]})},y.id))]},x.title))})})]})},p.key)})]})})}function xm(t){return t.pinned}function is(t){const e=P.c(7),{name:n,className:r}=t;let o;e[0]!==r?(o=A("bg-muted text-foreground flex size-8 shrink-0 items-center justify-center rounded-md font-mono text-xs font-semibold",r),e[0]=r,e[1]=o):o=e[1];let s;e[2]!==n?(s=n.slice(0,2).toUpperCase(),e[2]=n,e[3]=s):s=e[3];let i;return e[4]!==o||e[5]!==s?(i=l.jsx("span",{className:o,children:s}),e[4]=o,e[5]=s,e[6]=i):i=e[6],i}function bm(){const t=P.c(44),{applications:e,environment:n,embedded:r}=be().props;if(e.length===0)return null;let o;t[0]!==e||t[1]!==n?.application_id?(o=e.find(C=>C.id===n?.application_id)??e[0],t[0]=e,t[1]=n?.application_id,t[2]=o):o=t[2];const s=o;if(r){const C=n??s.environments[0];let b;t[3]!==s.id||t[4]!==C.id?(b=Dt(s.id,C.id),t[3]=s.id,t[4]=C.id,t[5]=b):b=t[5];let w;t[6]!==s.name?(w=l.jsx(is,{name:s.name}),t[6]=s.name,t[7]=w):w=t[7];let _;t[8]!==s.name?(_=l.jsx("span",{className:"truncate text-sm font-semibold",children:s.name}),t[8]=s.name,t[9]=_):_=t[9];let S;t[10]!==C.name?(S=l.jsx("span",{className:"text-muted-foreground truncate text-xs",children:C.name}),t[10]=C.name,t[11]=S):S=t[11];let E;t[12]!==_||t[13]!==S?(E=l.jsxs("span",{className:"grid flex-1 text-left leading-tight",children:[_,S]}),t[12]=_,t[13]=S,t[14]=E):E=t[14];let R;return t[15]!==b||t[16]!==w||t[17]!==E?(R=l.jsx(rt,{children:l.jsx(Ye,{children:l.jsx(Xe,{size:"lg",asChild:!0,className:"border-0 py-2 pr-3 pl-2 hover:bg-transparent",children:l.jsxs(Ae,{href:b,prefetch:!0,children:[w,E]})})})}),t[15]=b,t[16]=w,t[17]=E,t[18]=R):R=t[18],R}let i;t[19]!==s.name?(i=l.jsx(is,{name:s.name}),t[19]=s.name,t[20]=i):i=t[20];let a;t[21]!==s.name?(a=l.jsx("span",{className:"truncate text-sm font-semibold",children:s.name}),t[21]=s.name,t[22]=a):a=t[22];const c=n?n.name:`${s.environments.length} environment${s.environments.length===1?"":"s"}`;let u;t[23]!==c?(u=l.jsx("span",{className:"text-muted-foreground truncate text-xs",children:c}),t[23]=c,t[24]=u):u=t[24];let f;t[25]!==a||t[26]!==u?(f=l.jsxs("span",{className:"grid flex-1 text-left leading-tight",children:[a,u]}),t[25]=a,t[26]=u,t[27]=f):f=t[27];let p;t[28]===Symbol.for("react.memo_cache_sentinel")?(p=l.jsx(gs,{className:"size-3.5 opacity-60"}),t[28]=p):p=t[28];let m;t[29]!==i||t[30]!==f?(m=l.jsx(Nn,{asChild:!0,children:l.jsxs(Xe,{size:"lg",className:"data-[state=open]:bg-sidebar-accent hover:bg-sidebar-accent border-0 py-2 pr-3 pl-2",children:[i,f,p]})}),t[29]=i,t[30]=f,t[31]=m):m=t[31];let h;if(t[32]!==e||t[33]!==n?.id){let C;t[35]!==n?.id?(C=b=>l.jsxs("div",{children:[l.jsx(Bt,{className:"label-caps",children:b.name}),b.environments.map(w=>l.jsxs(Ee,{onSelect:()=>ie.visit(Dt(b.id,w.id)),children:[l.jsx(yp,{lastSeenAt:w.paused?null:w.last_seen_at,thresholdMs:6e5}),l.jsx("span",{className:"flex-1",children:w.name}),w.id===n?.id&&l.jsx(hn,{className:"size-3.5"})]},w.id))]},b.id),t[35]=n?.id,t[36]=C):C=t[36],h=e.map(C),t[32]=e,t[33]=n?.id,t[34]=h}else h=t[34];let g;t[37]===Symbol.for("react.memo_cache_sentinel")?(g=l.jsx(Pt,{}),t[37]=g):g=t[37];let v;t[38]===Symbol.for("react.memo_cache_sentinel")?(v=l.jsxs(Ee,{onSelect:ym,children:[l.jsx(wc,{className:"size-3.5"}),"Add application"]}),t[38]=v):v=t[38];let x;t[39]!==h?(x=l.jsxs(An,{align:"start",className:"w-(--radix-dropdown-menu-trigger-width) min-w-64",children:[h,g,v]}),t[39]=h,t[40]=x):x=t[40];let y;return t[41]!==x||t[42]!==m?(y=l.jsx(rt,{children:l.jsx(Ye,{children:l.jsxs(Mn,{children:[m,x]})})}),t[41]=x,t[42]=m,t[43]=y):y=t[43],y}function ym(){return ie.visit(dl())}function Cm(t){const e=P.c(4);let n,r;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=l.jsx("path",{d:"M 236 324.989 L 236 404.978 496.750 405.239 L 757.500 405.500 765.665 408.577 C 777.060 412.870, 784.110 417.355, 792.381 425.574 C 833.878 466.807, 812.048 538.520, 752.263 557.363 C 737.593 561.987, 732.018 562.115, 560.250 561.798 C 471.562 561.634, 399 561.557, 399 561.626 C 399 561.695, 406.313 568.648, 415.250 577.077 C 436.108 596.747, 508.719 665.823, 525 681.483 C 612.468 765.614, 693.318 845.033, 770.500 922.639 L 840.500 993.023 951.250 993.011 C 1012.163 993.005, 1062 992.732, 1062 992.404 C 1062 992.076, 1056.942 986.113, 1050.761 979.154 C 1039.889 966.913, 1035.649 962.220, 1005.428 928.979 C 997.688 920.465, 984.624 906.075, 976.396 897 C 933.021 849.161, 888.142 799.872, 868.953 779 C 857.071 766.075, 841.562 749.200, 834.490 741.500 C 827.417 733.800, 814.456 719.721, 805.686 710.213 C 796.916 700.705, 789.994 692.673, 790.303 692.363 C 790.613 692.054, 795.578 690.983, 801.338 689.983 C 895.506 673.637, 967.601 596.363, 980.578 497.866 C 982.637 482.242, 982.086 446.289, 979.576 432.500 C 960.757 329.105, 884.022 255.740, 784.576 246.063 C 777.168 245.342, 687.144 245, 504.826 245 L 236 245 236 324.989",fill:"currentColor"}),r=l.jsx("path",{d:"M 243.550 507.838 C 244.072 508.299, 247.425 510.859, 251 513.526 C 294.327 545.849, 358.703 617.861, 503.521 796 C 560.192 865.711, 593.994 908.954, 627.414 954.500 L 642.090 974.500 689.045 975 C 714.871 975.275, 736 975.275, 735.999 975 C 735.994 973.773, 698.564 930.428, 663.901 891.507 C 571.946 788.257, 436.131 649.261, 367.500 588.162 C 325.285 550.581, 286.033 524.106, 252.457 510.567 C 243.188 506.829, 241.991 506.462, 243.550 507.838 M 236 520 C 236 521.800, 236.667 522, 242.655 522 C 249.247 522, 249.293 521.981, 247.500 520 C 246.164 518.524, 244.420 518, 240.845 518 C 236.667 518, 236 518.275, 236 520 M 236 532.500 L 236 537 249.067 537 L 262.134 537 258.446 532.500 L 254.759 528 245.380 528 L 236 528 236 532.500 M 236 553.500 L 236 562 258.500 562 C 270.875 562, 280.991 561.663, 280.981 561.250 C 280.970 560.837, 278.237 557.013, 274.908 552.750 L 268.854 545 252.427 545 L 236 545 236 553.500 M 235.909 585 C 235.859 589.950, 235.777 595.462, 235.727 597.250 L 235.636 600.500 273.840 600.762 L 312.044 601.024 302.772 588.569 L 293.500 576.114 264.750 576.057 L 236 576 235.909 585 M 235.570 627.477 C 235.212 629.389, 234.979 637.714, 235.053 645.977 L 235.188 661 295.571 661 L 355.955 661 342.326 642.500 L 328.698 624 282.460 624 L 236.223 624 235.570 627.477 M 236 717.750 L 236 741.500 324.591 741.326 C 373.315 741.230, 413.343 740.990, 413.541 740.792 C 413.739 740.594, 406.184 729.985, 396.752 717.216 L 379.603 694 307.802 694 L 236 694 236 717.750 M 236.235 813.250 L 236.500 842.500 362.358 842.754 C 472.189 842.975, 488.146 842.822, 487.658 841.552 C 487.351 840.751, 477.621 827.475, 466.036 812.048 L 444.973 784 340.471 784 L 235.970 784 236.235 813.250 M 235.683 898.750 C 234.872 900.147, 235.511 973.844, 236.341 974.675 C 237.491 975.825, 392.185 976.287, 495.665 975.450 L 581.829 974.753 578.959 970.126 C 575.681 964.845, 552.884 930.825, 539.500 911.243 L 530.500 898.075 383.309 898.038 C 302.354 898.017, 235.922 898.337, 235.683 898.750",fill:"#FFC22B"}),e[0]=n,e[1]=r):(n=e[0],r=e[1]);let o;return e[2]!==t?(o=l.jsxs("svg",{viewBox:"213 184 870 870",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:[n,r]}),e[2]=t,e[3]=o):o=e[3],o}function wm(t){const e=P.c(4);let n,r;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=l.jsx("path",{d:"M 1705.500 462.476 C 1679.632 468.154, 1662.773 487.210, 1661.280 512.458 C 1658.996 551.096, 1698.019 578.895, 1735.898 565.612 C 1760.384 557.027, 1775.688 532.957, 1772.167 508.569 C 1767.609 476.994, 1736.704 455.627, 1705.500 462.476 M 755 505 L 755 547 910.750 547.020 C 1008.152 547.032, 1069.122 547.411, 1073.500 548.031 C 1090.559 550.446, 1105.444 563.017, 1111.948 580.500 C 1115.051 588.843, 1115.127 606.469, 1112.101 616.072 C 1107.936 629.289, 1099.155 639.541, 1087 645.378 L 1080.500 648.500 986.833 649 C 935.316 649.275, 892.822 649.844, 892.401 650.265 C 891.981 650.686, 892.986 652.486, 894.636 654.265 C 903.408 663.727, 947.003 709.994, 950 713.023 C 951.925 714.969, 955.957 719.247, 958.960 722.530 C 967.637 732.017, 990.350 756.177, 1004.500 770.971 C 1011.650 778.447, 1027.400 795.119, 1039.500 808.021 C 1051.600 820.923, 1066.450 836.708, 1072.500 843.099 C 1113.697 886.618, 1120.661 893.869, 1122 894.638 C 1123.933 895.748, 1249 896.342, 1249 895.241 C 1249 894.303, 1212.449 854.365, 1176 815.478 C 1171.325 810.490, 1160.075 798.356, 1151 788.513 C 1141.925 778.671, 1124.600 760.080, 1112.500 747.201 C 1100.400 734.322, 1090.500 723.114, 1090.500 722.295 C 1090.500 721.107, 1092.523 720.710, 1100.500 720.333 C 1134.395 718.731, 1158.080 708.248, 1180.583 684.890 C 1197.777 667.042, 1209.845 643.641, 1214.564 619 C 1216.806 607.291, 1216.484 581.201, 1213.942 568.657 C 1203.036 514.829, 1164.112 476.027, 1109.947 464.989 C 1100.426 463.049, 1095.935 463, 927.593 463 L 755 463 755 505 M 1810.462 469.250 C 1810.201 469.938, 1810.103 563.425, 1810.244 677 L 1810.500 883.500 1860.250 883.759 L 1910 884.019 1910.061 875.259 C 1910.115 867.540, 1910.104 759.829, 1910.024 536.250 L 1910 468 1860.469 468 C 1821.764 468, 1810.833 468.273, 1810.462 469.250 M 1406.500 587.119 C 1386.693 588.773, 1375.094 590.376, 1355.500 594.169 C 1343.274 596.536, 1322.956 601.933, 1321.250 603.267 C 1320.291 604.017, 1320 612.608, 1320 640.122 C 1320 659.855, 1320.151 676, 1320.335 676 C 1320.519 676, 1323.332 675.159, 1326.585 674.130 C 1338.275 670.434, 1352.109 667.492, 1369 665.108 C 1387.180 662.542, 1402.440 661.667, 1430 661.607 C 1460.588 661.542, 1468.932 662.249, 1483.990 666.182 C 1504.644 671.577, 1521 687.839, 1521 702.978 C 1521 707.882, 1520.414 708.216, 1513.958 706.992 C 1491.021 702.642, 1408.872 700.655, 1384 703.848 C 1369.947 705.653, 1347.904 710.311, 1338.527 713.459 C 1292.218 729.005, 1269.982 767.734, 1279.656 816 C 1285.454 844.931, 1307.512 868.053, 1339.521 878.754 C 1347.519 881.428, 1350.554 882.273, 1360 884.454 C 1381.201 889.349, 1428.115 889.182, 1456 884.112 C 1476.908 880.311, 1500.740 870.482, 1517.319 858.821 C 1522.302 855.316, 1522.910 856.540, 1523.220 870.707 L 1523.500 883.500 1573.500 883.500 L 1623.500 883.500 1623.810 796.500 C 1624.174 694.503, 1623.863 689.383, 1615.998 667.831 C 1602.496 630.835, 1572.134 606.310, 1525.388 594.638 C 1509.615 590.700, 1505.054 589.984, 1476.830 587.017 C 1465.598 585.836, 1421.096 585.901, 1406.500 587.119 M 1667.462 598.250 C 1667.200 598.938, 1667.102 663.400, 1667.243 741.500 L 1667.500 883.500 1717.500 883.500 L 1767.500 883.500 1767.753 740.250 L 1768.007 597 1717.972 597 C 1678.865 597, 1667.833 597.273, 1667.462 598.250 M 1399.500 762.492 C 1380.658 766.022, 1372 774.922, 1372 790.761 C 1372 808.458, 1382.796 816.328, 1410.705 818.975 C 1453.844 823.065, 1491.426 814.703, 1508.908 797.124 C 1518.898 787.078, 1521.148 782.186, 1520.790 771.292 L 1520.500 762.500 1511.500 761.856 C 1493.821 760.591, 1407.017 761.084, 1399.500 762.492",fill:"currentColor",fillRule:"evenodd"}),r=l.jsx("path",{d:"M 3277 681.471 L 3277 883.962 3279.250 884.508 C 3280.488 884.809, 3302.425 884.930, 3328 884.777 L 3374.500 884.500 3375 801 C 3375.561 707.275, 3374.748 716.403, 3383.496 705.665 C 3398.294 687.498, 3427.881 678.722, 3458.500 683.416 C 3481.414 686.928, 3493.243 697.343, 3500.156 720.088 C 3502.389 727.434, 3502.414 728.202, 3502.954 806 L 3503.500 884.500 3551.386 884.760 C 3587.861 884.958, 3599.621 884.729, 3600.738 883.802 C 3602.008 882.749, 3602.174 872.227, 3601.972 805.542 C 3601.746 730.884, 3601.066 705.568, 3598.922 692 C 3591.087 642.414, 3561.598 608.653, 3515.500 596.494 C 3512.200 595.624, 3504.100 594.261, 3497.500 593.465 C 3453.429 588.150, 3408.594 598.669, 3381.195 620.754 C 3378.828 622.662, 3376.578 623.911, 3376.195 623.529 C 3375.813 623.147, 3375.275 590.584, 3375 551.167 L 3374.500 479.500 3325.750 479.240 L 3277 478.981 3277 681.471 M 2783.667 520.667 C 2783.300 521.033, 2782.993 537.571, 2782.985 557.417 C 2782.976 577.263, 2782.624 594.043, 2782.203 594.706 C 2781.730 595.450, 2778.191 596.025, 2772.968 596.206 L 2764.500 596.500 2764.500 636.500 L 2764.500 676.500 2773.500 677.500 L 2782.500 678.500 2783.096 738.500 L 2783.692 798.500 2786.283 808.029 C 2791.367 826.728, 2795.423 835.943, 2803.236 846.542 C 2820.599 870.098, 2845.897 882.626, 2885.031 887.049 C 2896.314 888.324, 2951.623 887.765, 2960 886.292 L 2964.500 885.500 2964.500 846 L 2964.500 806.500 2937 805.958 C 2921.875 805.660, 2908.600 805.056, 2907.500 804.616 C 2896.677 800.280, 2889.616 793.637, 2885.804 784.202 C 2883.520 778.550, 2883.497 778.059, 2883.207 728.250 L 2882.913 678 2890.707 677.938 C 2894.993 677.904, 2913 677.781, 2930.723 677.665 C 2951.390 677.529, 2963.319 677.081, 2963.985 676.415 C 2964.677 675.723, 2964.936 662.218, 2964.762 635.938 L 2964.500 596.500 2924 596 L 2883.500 595.500 2883.237 559.087 C 2883.058 534.244, 2882.622 522.250, 2881.865 521.337 C 2880.967 520.255, 2871.570 520, 2832.544 520 C 2806.028 520, 2784.033 520.300, 2783.667 520.667 M 2552.634 587.091 C 2532.447 588.455, 2498.837 593.631, 2489 596.892 C 2485.941 597.906, 2481.069 599.349, 2474.653 601.140 C 2471.987 601.885, 2469.429 603.199, 2468.967 604.061 C 2468.506 604.923, 2468.212 621.349, 2468.314 640.564 C 2468.496 674.841, 2468.538 675.496, 2470.500 675.310 C 2471.600 675.206, 2477.675 673.712, 2484 671.990 C 2524.918 660.853, 2590.443 658.407, 2618.201 666.980 C 2635.175 672.223, 2648.165 686.509, 2649.728 701.654 L 2650.312 707.315 2645.406 706.623 C 2614.219 702.227, 2605.307 701.646, 2568.500 701.613 C 2528.271 701.576, 2520.140 702.366, 2496.919 708.571 C 2461.607 718.006, 2439.538 737.562, 2430.375 767.537 C 2426.496 780.227, 2426.196 807.961, 2429.802 820.500 C 2438.335 850.170, 2459.511 870.834, 2492.249 881.437 C 2508.248 886.619, 2522.958 888.422, 2549 888.392 C 2584.859 888.350, 2600.010 885.483, 2624 874.198 C 2629.879 871.432, 2647.278 860.213, 2647.833 858.831 C 2648.017 858.374, 2649.029 858, 2650.083 858 C 2651.873 858, 2652 858.854, 2652 870.893 C 2652 881.727, 2652.253 883.883, 2653.582 884.393 C 2655.648 885.186, 2741.352 885.186, 2743.418 884.393 C 2745.743 883.501, 2745.806 706.951, 2743.487 691.500 C 2734.995 634.926, 2698.185 600.772, 2634.081 589.988 C 2612.643 586.381, 2580.217 585.228, 2552.634 587.091 M 3109.500 591.528 C 3050.867 599.169, 3012.062 625.971, 2991.003 673.372 C 2987.539 681.169, 2984.395 691.815, 2981.514 705.500 C 2979.558 714.792, 2978.433 737.644, 2979.177 752.957 C 2982.872 828.974, 3024.942 875.495, 3100.500 887.116 C 3118.626 889.904, 3238.002 887.990, 3244.262 884.812 C 3245.905 883.977, 3246.006 881.319, 3245.762 845.209 L 3245.500 806.500 3183.500 805.964 C 3115.053 805.372, 3116.340 805.488, 3103.203 798.736 C 3079.639 786.626, 3069.485 756.900, 3076.649 721 C 3080.873 699.835, 3095.018 685.070, 3117.573 678.283 C 3122.970 676.659, 3128.861 676.498, 3183.500 676.472 C 3216.500 676.457, 3244.063 676.344, 3244.750 676.222 C 3245.725 676.049, 3246 667.242, 3246 636.137 L 3246 596.274 3238.750 595.175 C 3208.583 590.601, 3132.986 588.467, 3109.500 591.528 M 786.700 607.747 C 799.602 620.538, 811.920 633.724, 817.297 640.500 C 818.170 641.600, 821.751 646.100, 825.256 650.500 C 833.834 661.268, 873.458 714.122, 897.977 747.500 C 911.675 766.147, 917.863 774.803, 938.725 804.500 C 942.202 809.450, 948.749 818.617, 953.274 824.871 C 957.798 831.125, 963.490 839, 965.923 842.371 C 970.909 849.280, 974.415 854.082, 985.080 868.605 C 989.161 874.163, 995.200 882.600, 998.500 887.354 L 1004.500 895.998 1033.250 895.999 C 1050.407 896, 1062 895.623, 1062 895.066 C 1062 894.013, 1052.705 882.084, 1043.569 871.410 C 1035.523 862.010, 1027.543 852.531, 1012.917 835 C 1006.264 827.025, 999.847 819.375, 998.657 818 C 997.466 816.625, 988.182 805.825, 978.024 794 C 954.829 766.998, 957.339 769.897, 943.389 754 C 936.874 746.575, 930.362 739.150, 928.919 737.500 C 927.476 735.850, 920.717 728.223, 913.898 720.550 C 907.079 712.878, 897.922 702.528, 893.549 697.550 C 867.814 668.257, 840.996 640.571, 826.500 628.330 C 809.107 613.643, 785.722 598.317, 773.660 593.698 C 772.647 593.310, 778.515 599.632, 786.700 607.747 M 1933 596.589 C 1933 597.224, 1941.582 622.737, 1956.011 665 C 1960.987 679.575, 1967.721 699.375, 1970.976 709 C 1974.230 718.625, 1978.743 731.675, 1981.003 738 C 1983.264 744.325, 1986.868 754.675, 1989.012 761 C 1991.156 767.325, 1994.345 776.550, 1996.099 781.500 C 1997.853 786.450, 2001.880 797.925, 2005.048 807 C 2008.216 816.075, 2013.137 830.025, 2015.983 838 C 2018.829 845.975, 2021.992 854.975, 2023.011 858 C 2029.988 878.698, 2030.270 879.160, 2037.718 882.164 C 2043.327 884.426, 2044.399 884.496, 2073.500 884.498 C 2096.305 884.500, 2104.339 884.176, 2107 883.149 C 2121.304 877.628, 2121.835 876.967, 2129.987 854.500 C 2130.985 851.750, 2133.241 845.675, 2135 841 C 2136.759 836.325, 2139.054 830.138, 2140.099 827.250 C 2141.145 824.362, 2142.900 819.525, 2144 816.500 C 2145.100 813.475, 2146.857 808.638, 2147.903 805.750 C 2148.950 802.862, 2152.594 793.300, 2156 784.500 C 2159.406 775.700, 2163.012 766.250, 2164.012 763.500 C 2168.216 751.948, 2180.288 721.440, 2180.937 720.730 C 2182.009 719.556, 2184.572 725.539, 2190.045 742 C 2193.147 751.329, 2199.029 767.779, 2203.989 781 C 2205.743 785.675, 2207.546 790.625, 2207.995 792 C 2208.444 793.375, 2211.142 801.025, 2213.991 809 C 2216.840 816.975, 2222.678 833.850, 2226.966 846.500 C 2238.226 879.723, 2237.044 877.428, 2244.859 881.251 L 2251.500 884.500 2280.207 884.830 C 2310.645 885.180, 2315.755 884.696, 2324.521 880.632 C 2330.841 877.702, 2335.123 873.449, 2336.821 868.416 C 2339.121 861.600, 2343.766 849.181, 2352.498 826.500 C 2353.980 822.650, 2355.878 817.480, 2356.717 815.012 C 2357.555 812.544, 2359.537 807.695, 2361.120 804.237 C 2362.704 800.779, 2364 797.664, 2364 797.315 C 2364 796.563, 2372.662 773.280, 2377.697 760.500 C 2383.071 746.861, 2388.951 731.143, 2390.978 725 C 2391.977 721.975, 2393.792 717.025, 2395.012 714 C 2397.931 706.763, 2402.698 693.873, 2404.997 687 C 2406.009 683.975, 2408.714 676.550, 2411.008 670.500 C 2413.303 664.450, 2417.348 653.425, 2419.997 646 C 2424.731 632.733, 2430.370 617.144, 2435.303 603.681 C 2437.033 598.960, 2437.448 596.726, 2436.651 596.420 C 2436.018 596.178, 2414.125 596.096, 2388 596.240 L 2340.500 596.500 2334.387 615 C 2331.025 625.175, 2324.563 644.975, 2320.027 659 C 2315.490 673.025, 2309.172 692.375, 2305.986 702 C 2300.651 718.117, 2298.580 724.593, 2290.394 750.748 C 2288.802 755.834, 2286.987 759.997, 2286.360 759.998 C 2285.733 759.999, 2283.107 753.362, 2280.525 745.250 C 2277.942 737.138, 2274.271 726, 2272.367 720.500 C 2270.462 715, 2265.795 701.275, 2261.996 690 C 2258.196 678.725, 2252.336 661.625, 2248.973 652 C 2245.610 642.375, 2242.026 632.025, 2241.008 629 C 2235.846 613.659, 2232.744 606.338, 2230.724 604.727 C 2227.108 601.844, 2218.930 598.411, 2212.500 597.078 C 2203.416 595.195, 2160.419 596.098, 2152.667 598.335 C 2145.581 600.379, 2138.252 605.237, 2136.812 608.841 C 2136.229 610.304, 2135.389 612.400, 2134.947 613.500 C 2133.941 616, 2129.369 629.002, 2127.387 635 C 2126.569 637.475, 2125.514 640.400, 2125.043 641.500 C 2123.520 645.055, 2120.831 652.363, 2118.972 658 C 2117.974 661.025, 2115.737 667.325, 2114 672 C 2112.263 676.675, 2110.013 682.975, 2109 686 C 2107.987 689.025, 2105.746 695.325, 2104.022 700 C 2098.368 715.326, 2096.889 719.429, 2095.011 725 C 2093.992 728.025, 2091.813 734.100, 2090.170 738.500 C 2083.814 755.523, 2082 760.508, 2082 760.946 C 2082 764.084, 2078.346 754.155, 2075.028 742 C 2073.096 734.922, 2069.768 723.430, 2068.948 721 C 2068.484 719.625, 2067.148 715.125, 2065.979 711 C 2064.810 706.875, 2061.675 696.525, 2059.012 688 C 2056.349 679.475, 2052.735 667.775, 2050.980 662 C 2045.369 643.528, 2043.847 638.620, 2041.991 633 C 2040.992 629.975, 2039.188 624.125, 2037.983 620 C 2036.778 615.875, 2035.441 611.375, 2035.012 610 C 2034.583 608.625, 2033.677 605.475, 2032.998 603 C 2032.319 600.525, 2031.606 597.938, 2031.413 597.250 C 2031.049 595.950, 1933 595.291, 1933 596.589 M 751.380 603.452 C 750.295 606.281, 752.143 607, 760.500 607 C 769.264 607, 771.840 605.818, 768.462 603.348 C 765.814 601.412, 752.131 601.496, 751.380 603.452 M 751.667 612.667 C 750.752 613.581, 750.822 618.966, 751.750 619.145 C 755.748 619.916, 780 619.494, 780 618.654 C 780 618.080, 778.791 616.347, 777.313 614.805 C 774.684 612.060, 774.386 612, 763.480 612 C 757.349 612, 752.033 612.300, 751.667 612.667 M 750.321 630.606 C 749.982 631.490, 750.108 634.302, 750.602 636.856 L 751.500 641.500 774.250 641.769 C 786.763 641.917, 797 641.772, 797 641.447 C 797 640.238, 791.627 631.454, 790.150 630.250 C 787.598 628.168, 751.131 628.495, 750.321 630.606 M 750 665.861 L 750 676.721 755.250 677.352 C 762.948 678.277, 820.796 678.139, 821.379 677.195 C 821.828 676.470, 812.191 660.345, 809.040 656.549 C 807.934 655.216, 803.730 655, 778.878 655 L 750 655 750 665.861 M 750.444 697.285 C 750.168 698.004, 750.068 705.096, 750.221 713.046 L 750.500 727.500 803.250 727.759 C 862.431 728.049, 858.469 728.634, 852.750 720.448 C 850.962 717.890, 846.564 711.454, 842.975 706.148 L 836.450 696.500 793.698 696.239 C 759.243 696.029, 750.848 696.232, 750.444 697.285 M 760.500 754 C 752.556 754.361, 749.528 754.847, 749.600 755.750 C 749.655 756.438, 749.768 766.225, 749.850 777.500 L 750 798 826 798 C 873.668 798, 902 797.644, 902 797.044 C 902 795.717, 877.923 756.924, 875.284 754 C 875.036 753.725, 851.583 753.500, 823.167 753.500 C 794.750 753.500, 766.550 753.725, 760.500 754 M 2554 762.028 C 2539.188 763.176, 2531.544 765.819, 2525.351 771.932 C 2515.443 781.711, 2515.449 800.283, 2525.363 808.664 C 2534.138 816.083, 2543.018 817.974, 2569.142 817.988 C 2605.793 818.008, 2624.677 812.484, 2639.266 797.474 C 2647.120 789.393, 2650 782.751, 2650 772.717 C 2650 765.764, 2649.701 764.099, 2648.363 763.586 C 2646.597 762.908, 2584.680 760.959, 2571.500 761.165 C 2567.100 761.234, 2559.225 761.622, 2554 762.028 M 749.454 831.259 C 749.188 831.952, 749.090 846.689, 749.235 864.009 L 749.500 895.500 857.750 895.754 C 926.455 895.916, 966 895.658, 966 895.048 C 966 893.753, 961.842 886.805, 952.804 873 C 942.983 857.998, 929.818 837.362, 927.445 833.250 L 925.569 830 837.753 830 C 768.081 830, 749.837 830.260, 749.454 831.259",fill:"#FFC22B",fillRule:"evenodd"}),e[0]=n,e[1]=r):(n=e[0],r=e[1]);let o;return e[2]!==t?(o=l.jsxs("svg",{viewBox:"736 448 2880 462",fill:"none",role:"img","aria-label":"Railwatch",xmlns:"http://www.w3.org/2000/svg",...t,children:[n,r]}),e[2]=t,e[3]=o):o=e[3],o}function Sm(){const t=P.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"hidden aspect-square size-8 shrink-0 items-center justify-center rounded-md bg-[#0F1729] text-white group-data-[collapsible=icon]:flex",children:l.jsx(Cm,{className:"size-6"})}),l.jsx(wm,{className:"h-4 w-auto group-data-[collapsible=icon]:hidden"})]}),t[0]=e):e=t[0],e}const _m=t=>[...t?[]:[{title:"Dashboard",href:mn(),icon:xs}],{title:"Issues",href:Tt(),icon:bs},{title:"Alerts",href:fl(),icon:ps},...t?[]:[{title:"Integrations",href:ds(),icon:ys},{title:"Members",href:fs(),icon:kr}]],Em=t=>[{title:"Documentation",href:t?"https://railwatch.rebulk.com/docs":"/docs",icon:Cl}];function km(){const t=P.c(23),{environment:e,applications:n,embedded:r}=be().props;let o;t[0]!==n.length?(o=l.jsx(Up,{className:"border-sidebar-border gap-0 border-b p-1.5",children:n.length>0?l.jsx(bm,{}):l.jsx(rt,{children:l.jsx(Ye,{children:l.jsx(Xe,{size:"lg",asChild:!0,children:l.jsx(Ae,{href:mn(),prefetch:!0,children:l.jsx(Sm,{})})})})})}),t[0]=n.length,t[1]=o):o=t[1];let s;t[2]!==e?(s=e&&l.jsx(gm,{}),t[2]=e,t[3]=s):s=t[3];const i=!!r;let a;t[4]!==i?(a=_m(i),t[4]=i,t[5]=a):a=t[5];const c=e?"Account":"";let u;t[6]!==a||t[7]!==c?(u=l.jsx(om,{items:a,label:c}),t[6]=a,t[7]=c,t[8]=u):u=t[8];let f;t[9]!==s||t[10]!==u?(f=l.jsxs(Gp,{className:"gap-0 p-1.5",children:[s,u]}),t[9]=s,t[10]=u,t[11]=f):f=t[11];const p=!!r;let m;t[12]!==p?(m=Em(p),t[12]=p,t[13]=m):m=t[13];let h;t[14]!==m?(h=l.jsx(nm,{items:m,className:"mt-auto"}),t[14]=m,t[15]=h):h=t[15];let g;t[16]===Symbol.for("react.memo_cache_sentinel")?(g=l.jsx(pm,{}),t[16]=g):g=t[16];let v;t[17]!==h?(v=l.jsxs(Wp,{children:[h,g]}),t[17]=h,t[18]=v):v=t[18];let x;return t[19]!==o||t[20]!==v||t[21]!==f?(x=l.jsxs(Bp,{collapsible:"icon",variant:"sidebar",children:[o,f,v]}),t[19]=o,t[20]=v,t[21]=f,t[22]=x):x=t[22],x}function jm(t){const e=P.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=l.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",...n}),e[2]=n,e[3]=r):r=e[3],r}function Pm(t){const e=P.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let o;e[3]!==n?(o=A("text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",n),e[3]=n,e[4]=o):o=e[4];let s;return e[5]!==r||e[6]!==o?(s=l.jsx("ol",{"data-slot":"breadcrumb-list",className:o,...r}),e[5]=r,e[6]=o,e[7]=s):s=e[7],s}function Rm(t){const e=P.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let o;e[3]!==n?(o=A("inline-flex items-center gap-1.5",n),e[3]=n,e[4]=o):o=e[4];let s;return e[5]!==r||e[6]!==o?(s=l.jsx("li",{"data-slot":"breadcrumb-item",className:o,...r}),e[5]=r,e[6]=o,e[7]=s):s=e[7],s}function Mm(t){const e=P.c(10);let n,r,o;e[0]!==t?({asChild:n,className:r,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=o):(n=e[1],r=e[2],o=e[3]);const s=n?Mt:"a";let i;e[4]!==r?(i=A("hover:text-foreground transition-colors",r),e[4]=r,e[5]=i):i=e[5];let a;return e[6]!==s||e[7]!==o||e[8]!==i?(a=l.jsx(s,{"data-slot":"breadcrumb-link",className:i,...o}),e[6]=s,e[7]=o,e[8]=i,e[9]=a):a=e[9],a}function Nm(t){const e=P.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let o;e[3]!==n?(o=A("text-foreground font-normal",n),e[3]=n,e[4]=o):o=e[4];let s;return e[5]!==r||e[6]!==o?(s=l.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:o,...r}),e[5]=r,e[6]=o,e[7]=s):s=e[7],s}function Am(t){const e=P.c(12);let n,r,o;e[0]!==t?({children:n,className:r,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=o):(n=e[1],r=e[2],o=e[3]);let s;e[4]!==r?(s=A("[&>svg]:size-3.5",r),e[4]=r,e[5]=s):s=e[5];let i;e[6]!==n?(i=n??l.jsx(vs,{}),e[6]=n,e[7]=i):i=e[7];let a;return e[8]!==o||e[9]!==s||e[10]!==i?(a=l.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:s,...o,children:i}),e[8]=o,e[9]=s,e[10]=i,e[11]=a):a=e[11],a}function Im(t){const e=P.c(4),{breadcrumbs:n}=t;let r;e[0]!==n?(r=n.length>0&&l.jsx(jm,{children:l.jsx(Pm,{children:n.map((s,i)=>{const a=i===n.length-1;return l.jsxs(d.Fragment,{children:[l.jsx(Rm,{children:a?l.jsx(Nm,{children:s.title}):l.jsx(Mm,{asChild:!0,children:l.jsx(Ae,{href:s.href,children:s.title})})}),!a&&l.jsx(Am,{})]},i)})})}),e[0]=n,e[1]=r):r=e[1];let o;return e[2]!==r?(o=l.jsx(l.Fragment,{children:r}),e[2]=r,e[3]=o):o=e[3],o}function Om(){const t=P.c(21),e=be(),{environment:n}=e.props;if(!n)return null;let r,o,s,i,a,c;if(t[0]!==n.application_id||t[1]!==n.id||t[2]!==e.props.saved_views||t[3]!==e.props.window||t[4]!==e.url){const p=wo(n.application_id,n.id,e.props.window),m=e.url.split("?")[0],h=(e.props.saved_views??[]).filter(Tm),g=p.filter(x=>{const y=x.href.split("?")[0];return m===y||m.startsWith(y+"/")}).sort(Dm)[0]??p[0];o=Mn;let v;t[11]===Symbol.for("react.memo_cache_sentinel")?(v=l.jsx(hs,{className:"size-3.5 shrink-0 opacity-60"}),t[11]=v):v=t[11],c=l.jsxs(Nn,{className:"flex min-w-0 items-center gap-1 text-sm font-medium",children:[g.icon&&l.jsx(g.icon,{className:"size-4 shrink-0 opacity-70"}),l.jsx("span",{className:"truncate",children:g.title}),v]}),r=An,s="start",i="max-h-[70vh] w-60 overflow-y-auto",a=Aa.map((x,y)=>l.jsxs("div",{children:[y>0&&l.jsx(Pt,{}),l.jsx(Bt,{className:"label-caps",children:x.title}),p.filter(C=>C.group===x.key).map(C=>l.jsxs("div",{children:[l.jsxs(Ee,{onSelect:()=>ie.visit(C.href),className:C===g?"bg-accent":void 0,children:[C.icon&&l.jsx(C.icon,{className:"size-4"}),C.title]}),h.filter(b=>Na(b.url,C.href)).map(b=>l.jsxs(Ee,{onSelect:()=>ie.visit(b.url),className:A("pl-8 text-xs",Co(e.url,b.url)&&"bg-accent"),children:[l.jsx(_r,{className:"size-3.5 opacity-60"}),b.name]},b.id))]},C.title))]},x.key)),t[0]=n.application_id,t[1]=n.id,t[2]=e.props.saved_views,t[3]=e.props.window,t[4]=e.url,t[5]=r,t[6]=o,t[7]=s,t[8]=i,t[9]=a,t[10]=c}else r=t[5],o=t[6],s=t[7],i=t[8],a=t[9],c=t[10];let u;t[12]!==r||t[13]!==s||t[14]!==i||t[15]!==a?(u=l.jsx(r,{align:s,className:i,children:a}),t[12]=r,t[13]=s,t[14]=i,t[15]=a,t[16]=u):u=t[16];let f;return t[17]!==o||t[18]!==c||t[19]!==u?(f=l.jsxs(o,{children:[c,u]}),t[17]=o,t[18]=c,t[19]=u,t[20]=f):f=t[20],f}function Dm(t,e){return e.href.length-t.href.length}function Tm(t){return t.pinned}function $m(t){const e=P.c(16),{breadcrumbs:n,onOpenCommandPalette:r}=t;let o;e[0]!==n?(o=n===void 0?[]:n,e[0]=n,e[1]=o):o=e[1];const s=o,{environment:i}=be().props;let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=l.jsx(Vp,{className:"text-muted-foreground -ml-1"}),e[2]=a):a=e[2];let c;e[3]!==s?(c=l.jsx("div",{className:"text-muted-foreground hidden min-w-0 text-xs md:block",children:l.jsx(Im,{breadcrumbs:s})}),e[3]=s,e[4]=c):c=e[4];let u;e[5]!==s||e[6]!==i?(u=l.jsx("div",{className:"min-w-0 md:hidden",children:i?l.jsx(Om,{}):l.jsx("span",{className:"truncate text-sm font-medium",children:s[s.length-1]?.title})}),e[5]=s,e[6]=i,e[7]=u):u=e[7];let f;e[8]!==c||e[9]!==u?(f=l.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[a,c,u]}),e[8]=c,e[9]=u,e[10]=f):f=e[10];let p;e[11]!==r?(p=r&&l.jsxs(Et,{type:"button",variant:"outline",size:"sm",className:"text-muted-foreground h-8 gap-1.5",onClick:r,children:[l.jsx(Er,{className:"size-3.5"}),l.jsx("span",{className:"hidden sm:inline",children:"Search"}),l.jsx("kbd",{className:"bg-muted hidden rounded px-1 py-0.5 font-mono text-[10px] sm:inline",children:"⌘K"})]}),e[11]=r,e[12]=p):p=e[12];let m;return e[13]!==f||e[14]!==p?(m=l.jsxs("header",{className:"bg-background/80 sticky top-0 z-20 flex h-12 shrink-0 items-center justify-between gap-2 border-b px-3 backdrop-blur md:h-11 md:border-0 md:bg-transparent md:px-6 md:pt-2 md:backdrop-blur-none",children:[f,p]}),e[13]=f,e[14]=p,e[15]=m):m=e[15],m}const Lm=t=>[...t?[]:[{title:"Dashboard",href:mn(),icon:xs}],{title:"Issues",href:Tt(),icon:bs},...t?[]:[{title:"Integrations",href:ds(),icon:ys},{title:"Members",href:fs(),icon:kr}]];function Fm(t){const e=P.c(47),{open:n,onOpenChange:r}=t,[o,s]=d.useState(""),{applications:i,environment:a,embedded:c,window:u}=be().props;let f;e[0]!==r?(f=R=>{r(!1),ie.visit(R)},e[0]=r,e[1]=f):f=e[1];const p=f;let m,h,g,v,x,y,C,b;if(e[2]!==u||e[3]!==c||e[4]!==a||e[5]!==p||e[6]!==r||e[7]!==n||e[8]!==o){const R=a?wo(a.application_id,a.id,u??"24h"):[];h=cp,y=n,C=r,e[17]!==o?(b=l.jsx(up,{placeholder:"Search pages, applications, issues…",value:o,onValueChange:s}),e[17]=o,e[18]=b):b=e[18],m=dp,e[19]===Symbol.for("react.memo_cache_sentinel")?(g=l.jsx(fp,{children:"No results found."}),e[19]=g):g=e[19];let j;if(e[20]!==c||e[21]!==p){let M;e[23]!==p?(M=I=>l.jsxs(rn,{onSelect:()=>p(I.href),children:[I.icon&&l.jsx(I.icon,{}),l.jsx("span",{children:I.title})]},I.title),e[23]=p,e[24]=M):M=e[24],j=Lm(!!c).map(M),e[20]=c,e[21]=p,e[22]=j}else j=e[22];e[25]!==j?(v=l.jsx(nn,{heading:"Navigation",children:j}),e[25]=j,e[26]=v):v=e[26],x=R.length>0&&l.jsx(nn,{heading:`${a.application_name} · ${a.name}`,children:R.map(M=>l.jsxs(rn,{onSelect:()=>p(M.href),children:[M.icon&&l.jsx(M.icon,{}),l.jsx("span",{children:M.title})]},M.title))}),e[2]=u,e[3]=c,e[4]=a,e[5]=p,e[6]=r,e[7]=n,e[8]=o,e[9]=m,e[10]=h,e[11]=g,e[12]=v,e[13]=x,e[14]=y,e[15]=C,e[16]=b}else m=e[9],h=e[10],g=e[11],v=e[12],x=e[13],y=e[14],C=e[15],b=e[16];let w;e[27]!==i||e[28]!==c||e[29]!==p?(w=!c&&l.jsx(nn,{heading:"Applications",children:i.flatMap(R=>R.environments.map(j=>l.jsx(rn,{value:`${R.name} ${j.name}`,onSelect:()=>p(Dt(R.id,j.id)),children:l.jsxs("span",{children:[R.name," · ",j.name]})},`${R.id}-${j.id}`)))}),e[27]=i,e[28]=c,e[29]=p,e[30]=w):w=e[30];let _;e[31]!==p||e[32]!==o?(_=o.trim()&&l.jsxs(l.Fragment,{children:[l.jsx(pp,{}),l.jsx(nn,{heading:"Search",children:l.jsxs(rn,{value:o,onSelect:()=>p(`${Tt()}?q=${encodeURIComponent(o)}`),children:[l.jsx(Er,{}),l.jsxs("span",{children:["Search issues for “",o,"”"]})]})})]}),e[31]=p,e[32]=o,e[33]=_):_=e[33];let S;e[34]!==m||e[35]!==g||e[36]!==v||e[37]!==x||e[38]!==w||e[39]!==_?(S=l.jsxs(m,{children:[g,v,x,w,_]}),e[34]=m,e[35]=g,e[36]=v,e[37]=x,e[38]=w,e[39]=_,e[40]=S):S=e[40];let E;return e[41]!==h||e[42]!==S||e[43]!==y||e[44]!==C||e[45]!==b?(E=l.jsxs(h,{open:y,onOpenChange:C,children:[b,S]}),e[41]=h,e[42]=S,e[43]=y,e[44]=C,e[45]=b,e[46]=E):E=e[46],E}const zm=[{title:"Navigation",shortcuts:[{keys:["⌘","K"],description:"Open command palette"},{keys:["g","d"],description:"Go to dashboard"},{keys:["g","o"],description:"Go to Overview"},{keys:["g","r"],description:"Go to Requests"},{keys:["g","j"],description:"Go to Jobs"},{keys:["g","q"],description:"Go to Queries"},{keys:["g","i"],description:"Go to Issues"},{keys:["?"],description:"Show this help"}]},{title:"Lists (requests, jobs, queries, issues, logs, …)",shortcuts:[{keys:["j"],description:"Move highlight down"},{keys:["k"],description:"Move highlight up"},{keys:["↵"],description:"Open highlighted row"},{keys:["o"],description:"Open highlighted row in a new tab"},{keys:["Esc"],description:"Clear highlight"},{keys:["/"],description:"Focus the filter bar"}]}];function Bm(t){const e=P.c(5),{open:n,onOpenChange:r}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=l.jsxs(go,{children:[l.jsx(xo,{children:"Keyboard shortcuts"}),l.jsx(bo,{children:"Available anywhere in the app."})]}),e[0]=o):o=e[0];let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=l.jsxs(vo,{className:"sm:max-w-sm",children:[o,l.jsx("div",{className:"flex flex-col gap-4",children:zm.map(Vm)})]}),e[1]=s):s=e[1];let i;return e[2]!==r||e[3]!==n?(i=l.jsx(ho,{open:n,onOpenChange:r,children:s}),e[2]=r,e[3]=n,e[4]=i):i=e[4],i}function Vm(t){return l.jsxs("div",{className:"flex flex-col gap-2",children:[l.jsx("div",{className:"text-muted-foreground text-xs font-medium tracking-wide uppercase",children:t.title}),l.jsx("ul",{className:"flex flex-col gap-2",children:t.shortcuts.map(Hm)})]},t.title)}function Hm(t){return l.jsxs("li",{className:"flex items-center justify-between text-sm",children:[l.jsx("span",{className:"text-muted-foreground",children:t.description}),l.jsx("span",{className:"flex items-center gap-1",children:t.keys.map(Um)})]},t.description)}function Um(t,e){return l.jsx("kbd",{className:"bg-muted rounded border px-1.5 py-0.5 font-mono text-xs",children:t},e)}const Wm=800;function Gm(t){const e=P.c(4),n=d.useRef(t);let r;e[0]!==t?(r=()=>{n.current=t},e[0]=t,e[1]=r):r=e[1],d.useEffect(r);const o=d.useRef(null),s=d.useRef(void 0);let i,a;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=()=>{const c=u=>{const f=u.target;if(!(f.tagName==="INPUT"||f.tagName==="TEXTAREA"||f.tagName==="SELECT"||f.isContentEditable)&&!(u.metaKey||u.ctrlKey||u.altKey)){if(o.current){const p=`${o.current} ${u.key}`;if(window.clearTimeout(s.current),o.current=null,n.current[p]){u.preventDefault(),n.current[p]();return}}if(n.current[u.key]){u.preventDefault(),n.current[u.key]();return}u.key==="g"&&(o.current="g",s.current=window.setTimeout(()=>{o.current=null},Wm))}};return document.addEventListener("keydown",c),()=>{document.removeEventListener("keydown",c),window.clearTimeout(s.current)}},a=[],e[2]=i,e[3]=a):(i=e[2],a=e[3]),d.useEffect(i,a)}function Km(t){const e=P.c(28),{children:n,breadcrumbs:r}=t;let o;e[0]!==r?(o=r===void 0?[]:r,e[0]=r,e[1]=o):o=e[1];const s=o,[i,a]=d.useState(!1),[c,u]=d.useState(!1),{environment:f,window:p}=be().props;let m,h;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=()=>{const j=M=>{M.key==="k"&&(M.metaKey||M.ctrlKey)&&(M.preventDefault(),a(Xm))};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},h=[],e[2]=m,e[3]=h):(m=e[2],h=e[3]),d.useEffect(m,h);let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=()=>u(Ym),e[4]=g):g=e[4];let v;e[5]!==f?(v=()=>ie.visit(f?Tt({application_id:f.application_id,environment_id:f.id}):Tt()),e[5]=f,e[6]=v):v=e[6];let x;e[7]!==f||e[8]!==p?(x=f&&{"g o":()=>ie.visit(Dt(f.application_id,f.id,{window:p})),"g r":()=>ie.visit(ls(f.application_id,f.id,{window:p})),"g j":()=>ie.visit(cs(f.application_id,f.id,{window:p})),"g q":()=>ie.visit(us(f.application_id,f.id,{window:p}))},e[7]=f,e[8]=p,e[9]=x):x=e[9];let y;e[10]!==v||e[11]!==x?(y={"?":g,"g d":qm,"g i":v,...x},e[10]=v,e[11]=x,e[12]=y):y=e[12],Gm(y);let C;e[13]===Symbol.for("react.memo_cache_sentinel")?(C=l.jsx(km,{}),e[13]=C):C=e[13];let b;e[14]===Symbol.for("react.memo_cache_sentinel")?(b=()=>a(!0),e[14]=b):b=e[14];let w;e[15]!==s?(w=l.jsx($m,{breadcrumbs:s,onOpenCommandPalette:b}),e[15]=s,e[16]=w):w=e[16];let _;e[17]!==n||e[18]!==w?(_=l.jsxs(Qp,{variant:"sidebar",className:"overflow-x-hidden",children:[w,n]}),e[17]=n,e[18]=w,e[19]=_):_=e[19];let S;e[20]!==i?(S=l.jsx(Fm,{open:i,onOpenChange:a}),e[20]=i,e[21]=S):S=e[21];let E;e[22]!==c?(E=l.jsx(Bm,{open:c,onOpenChange:u}),e[22]=c,e[23]=E):E=e[23];let R;return e[24]!==_||e[25]!==S||e[26]!==E?(R=l.jsxs(Jp,{variant:"sidebar",children:[C,_,S,E]}),e[24]=_,e[25]=S,e[26]=E,e[27]=R):R=e[27],R}function qm(){return ie.visit(mn())}function Ym(t){return!t}function Xm(t){return!t}function fh(t){const e=P.c(8);let n,r,o;e[0]!==t?({children:r,breadcrumbs:n,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=o):(n=e[1],r=e[2],o=e[3]);let s;return e[4]!==n||e[5]!==r||e[6]!==o?(s=l.jsx(Km,{breadcrumbs:n,...o,children:r}),e[4]=n,e[5]=r,e[6]=o,e[7]=s):s=e[7],s}export{Ic as $,Gi as A,eh as B,hs as C,Mr as D,Jm as E,up as F,Yl as G,fp as H,x0 as I,dp as J,cp as K,Jl as L,ae as M,oi as N,bs as O,K as P,vn as Q,_c as R,dh as S,Dc as T,Dr as U,Fs as V,xe as W,Xd as X,Ur as Y,$e as Z,Vc as _,vs as a,Hl as a0,lc as a1,ps as a2,vl as a3,yp as a4,jc as a5,kr as a6,Wl as a7,Cp as a8,Bl as a9,pc as aa,uc as ab,ml as ac,lp as ad,gp as ae,Jc as af,mp as ag,hp as ah,vp as ai,uh as aj,Nn as ak,Bt as al,Pt as am,An as an,ch as ao,Mn as ap,Nl as aq,Jn as ar,Zl as as,ms as at,bl as au,Et as b,Rl as c,he as d,En as e,Wi as f,V as g,Pe as h,Ir as i,ee as j,Ki as k,Ji as l,qr as m,ue as n,g0 as o,Pr as p,hn as q,Er as r,os as s,fh as t,ot as u,nn as v,rn as w,sm as x,am as y,lm as z};