railwatch 0.1.4 → 0.2.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 (302) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +212 -0
  3. data/README.md +10 -0
  4. data/app/channels/railwatch/environment_channel.rb +28 -0
  5. data/app/controllers/concerns/railwatch/telemetry_identity.rb +25 -0
  6. data/app/controllers/railwatch/alerts_controller.rb +48 -0
  7. data/app/controllers/railwatch/anomaly_rules_controller.rb +31 -0
  8. data/app/controllers/railwatch/attachments_controller.rb +22 -0
  9. data/app/controllers/railwatch/beacon_controller.rb +67 -7
  10. data/app/controllers/railwatch/broadcasts_controller.rb +15 -0
  11. data/app/controllers/railwatch/cache_events_controller.rb +30 -0
  12. data/app/controllers/railwatch/commands_controller.rb +16 -0
  13. data/app/controllers/railwatch/comments_controller.rb +11 -0
  14. data/app/controllers/railwatch/dashboard_controller.rb +69 -0
  15. data/app/controllers/railwatch/deploys_controller.rb +34 -0
  16. data/app/controllers/railwatch/deprecations_controller.rb +54 -0
  17. data/app/controllers/railwatch/environment_scoped.rb +99 -0
  18. data/app/controllers/railwatch/exceptions_controller.rb +53 -0
  19. data/app/controllers/railwatch/executions_controller.rb +13 -0
  20. data/app/controllers/railwatch/issues_controller.rb +258 -0
  21. data/app/controllers/railwatch/jobs_controller.rb +63 -0
  22. data/app/controllers/railwatch/llm_calls_controller.rb +124 -0
  23. data/app/controllers/railwatch/logs_controller.rb +40 -0
  24. data/app/controllers/railwatch/mails_controller.rb +19 -0
  25. data/app/controllers/railwatch/notifications_controller.rb +11 -0
  26. data/app/controllers/railwatch/outgoing_requests_controller.rb +19 -0
  27. data/app/controllers/railwatch/overview_controller.rb +38 -0
  28. data/app/controllers/railwatch/people_controller.rb +25 -0
  29. data/app/controllers/railwatch/processes_controller.rb +33 -0
  30. data/app/controllers/railwatch/profiles_controller.rb +50 -0
  31. data/app/controllers/railwatch/queries_controller.rb +59 -0
  32. data/app/controllers/railwatch/releases_controller.rb +75 -0
  33. data/app/controllers/railwatch/requests_controller.rb +55 -0
  34. data/app/controllers/railwatch/saved_views_controller.rb +53 -0
  35. data/app/controllers/railwatch/scheduled_tasks_controller.rb +45 -0
  36. data/app/controllers/railwatch/spans_controller.rb +47 -0
  37. data/app/controllers/railwatch/storage_ops_controller.rb +15 -0
  38. data/app/controllers/railwatch/tenants_controller.rb +44 -0
  39. data/app/controllers/railwatch/thresholds_controller.rb +40 -0
  40. data/app/controllers/railwatch/traces_controller.rb +72 -0
  41. data/app/controllers/railwatch/transactions_controller.rb +21 -0
  42. data/app/controllers/railwatch/view_renders_controller.rb +28 -0
  43. data/app/controllers/railwatch/visits_controller.rb +53 -0
  44. data/app/helpers/railwatch/assets_helper.rb +52 -0
  45. data/app/jobs/railwatch/anomaly_scan_job.rb +11 -0
  46. data/app/jobs/railwatch/application_job.rb +7 -0
  47. data/app/jobs/railwatch/auto_resolve_issues_job.rb +19 -0
  48. data/app/jobs/railwatch/check_scheduled_tasks_job.rb +113 -0
  49. data/app/jobs/railwatch/detect_anomalies_job.rb +171 -0
  50. data/app/jobs/railwatch/detect_performance_issues_job.rb +85 -0
  51. data/app/jobs/railwatch/group_exceptions_job.rb +91 -0
  52. data/app/jobs/railwatch/optimize_telemetry_job.rb +23 -0
  53. data/app/jobs/railwatch/performance_scan_job.rb +11 -0
  54. data/app/jobs/railwatch/prune_telemetry_job.rb +110 -0
  55. data/app/jobs/railwatch/release_health_rollup_job.rb +64 -0
  56. data/app/jobs/railwatch/rollup_catchup_job.rb +21 -0
  57. data/app/jobs/railwatch/rollup_job.rb +130 -0
  58. data/app/jobs/railwatch/scheduled_task_scan_job.rb +11 -0
  59. data/app/models/concerns/railwatch/detection_snapshotting.rb +20 -0
  60. data/app/models/railwatch/alert.rb +229 -0
  61. data/app/models/railwatch/alert_rule.rb +121 -0
  62. data/app/models/railwatch/anomaly_rule.rb +33 -0
  63. data/app/models/railwatch/application.rb +44 -0
  64. data/app/models/railwatch/application_record.rb +33 -0
  65. data/app/models/railwatch/comment.rb +36 -0
  66. data/app/models/railwatch/deploy.rb +67 -0
  67. data/app/models/railwatch/environment.rb +54 -0
  68. data/app/models/railwatch/execution_presenter.rb +185 -0
  69. data/app/models/railwatch/filter_query.rb +143 -0
  70. data/app/models/railwatch/followup_receipt.rb +27 -0
  71. data/app/models/railwatch/ingest/batch.rb +305 -0
  72. data/app/models/railwatch/ingest/mapper.rb +575 -0
  73. data/app/models/railwatch/ingest/payload.rb +96 -0
  74. data/app/models/railwatch/ingest/rollup_absorber.rb +170 -0
  75. data/app/models/railwatch/ingest/writer.rb +137 -0
  76. data/app/models/railwatch/issue.rb +277 -0
  77. data/app/models/railwatch/issue_activity.rb +23 -0
  78. data/app/models/railwatch/issue_detection_presenter.rb +309 -0
  79. data/app/models/railwatch/issue_detection_snapshot.rb +77 -0
  80. data/app/models/railwatch/maintenance_task.rb +53 -0
  81. data/app/models/railwatch/saved_view.rb +63 -0
  82. data/app/models/railwatch/telemetry/aggregations.rb +116 -0
  83. data/app/models/railwatch/telemetry/attachment.rb +31 -0
  84. data/app/models/railwatch/telemetry/bounded_gzip.rb +101 -0
  85. data/app/models/railwatch/telemetry/broadcast.rb +13 -0
  86. data/app/models/railwatch/telemetry/cache_event.rb +16 -0
  87. data/app/models/railwatch/telemetry/child.rb +53 -0
  88. data/app/models/railwatch/telemetry/cursor_page.rb +99 -0
  89. data/app/models/railwatch/telemetry/deprecation.rb +13 -0
  90. data/app/models/railwatch/telemetry/enqueued_job.rb +13 -0
  91. data/app/models/railwatch/telemetry/exception.rb +21 -0
  92. data/app/models/railwatch/telemetry/execution.rb +71 -0
  93. data/app/models/railwatch/telemetry/health_sample.rb +72 -0
  94. data/app/models/railwatch/telemetry/ingest_batch.rb +31 -0
  95. data/app/models/railwatch/telemetry/llm_call.rb +37 -0
  96. data/app/models/railwatch/telemetry/log.rb +85 -0
  97. data/app/models/railwatch/telemetry/mail.rb +13 -0
  98. data/app/models/railwatch/telemetry/n_plus_one.rb +92 -0
  99. data/app/models/railwatch/telemetry/notification.rb +13 -0
  100. data/app/models/railwatch/telemetry/outgoing_request.rb +13 -0
  101. data/app/models/railwatch/telemetry/person.rb +50 -0
  102. data/app/models/railwatch/telemetry/process.rb +10 -0
  103. data/app/models/railwatch/telemetry/profile.rb +37 -0
  104. data/app/models/railwatch/telemetry/query.rb +50 -0
  105. data/app/models/railwatch/telemetry/query_shape.rb +45 -0
  106. data/app/models/railwatch/telemetry/release_health.rb +63 -0
  107. data/app/models/railwatch/telemetry/rollup.rb +78 -0
  108. data/app/models/railwatch/telemetry/session.rb +24 -0
  109. data/app/models/railwatch/telemetry/span.rb +19 -0
  110. data/app/models/railwatch/telemetry/storage_op.rb +13 -0
  111. data/app/models/railwatch/telemetry/tenant.rb +221 -0
  112. data/app/models/railwatch/telemetry/transaction.rb +13 -0
  113. data/app/models/railwatch/telemetry/view_render.rb +13 -0
  114. data/app/models/railwatch/telemetry/visit.rb +24 -0
  115. data/app/models/railwatch/telemetry_record.rb +57 -0
  116. data/app/models/railwatch/threshold.rb +29 -0
  117. data/app/models/railwatch/user.rb +47 -0
  118. data/app/models/railwatch/viewer.rb +13 -0
  119. data/app/views/layouts/railwatch/dashboard.html.erb +25 -0
  120. data/config/routes.rb +59 -0
  121. data/db/railwatch_migrate/20260916000000_create_railwatch_tables.rb +151 -0
  122. data/db/railwatch_migrate/20260917000000_create_railwatch_maintenance_tasks.rb +18 -0
  123. data/db/railwatch_migrate/20260917120000_create_railwatch_followup_receipts.rb +20 -0
  124. data/db/railwatch_migrate/20260918120000_widen_host_user_ids.rb +71 -0
  125. data/db/railwatch_telemetry_migrate/20260903000001_create_telemetry.rb +481 -0
  126. data/db/railwatch_telemetry_migrate/20260903000002_rename_tenant_to_app_tenant.rb +14 -0
  127. data/db/railwatch_telemetry_migrate/20260903000003_add_statement_count_to_transactions.rb +9 -0
  128. data/db/railwatch_telemetry_migrate/20260903000004_add_role_and_channel.rb +10 -0
  129. data/db/railwatch_telemetry_migrate/20260903000005_add_locals_to_exceptions.rb +9 -0
  130. data/db/railwatch_telemetry_migrate/20260903000006_add_spans_health_vitals_and_fts.rb +82 -0
  131. data/db/railwatch_telemetry_migrate/20260903000007_rename_span_attributes_to_payload.rb +10 -0
  132. data/db/railwatch_telemetry_migrate/20260903000008_add_profiles_and_attachments.rb +60 -0
  133. data/db/railwatch_telemetry_migrate/20260903000009_add_truncated_to_attachments.rb +9 -0
  134. data/db/railwatch_telemetry_migrate/20260903000010_create_sessions_and_release_health.rb +51 -0
  135. data/db/railwatch_telemetry_migrate/20260903000011_add_fingerprint_to_exceptions.rb +11 -0
  136. data/db/railwatch_telemetry_migrate/20260904000012_add_failed_to_broadcasts.rb +10 -0
  137. data/db/railwatch_telemetry_migrate/20260904010000_add_filter_cursor_indexes.rb +37 -0
  138. data/db/railwatch_telemetry_migrate/20260904020000_add_n_plus_ones_execution_id_index.rb +11 -0
  139. data/db/railwatch_telemetry_migrate/20260904120000_create_query_shapes.rb +15 -0
  140. data/db/railwatch_telemetry_migrate/20260906120000_add_backpressure_factor_to_ingest_batches.rb +9 -0
  141. data/db/railwatch_telemetry_migrate/20260907000000_rename_lantern_version_on_processes.rb +10 -0
  142. data/db/railwatch_telemetry_migrate/20260913000000_rename_nightrail_version_on_processes.rb +9 -0
  143. data/db/railwatch_telemetry_migrate/20260914000000_drop_orphan_durable_ingest_tables.rb +18 -0
  144. data/db/railwatch_telemetry_migrate/20260914010000_drop_orphan_durable_ingest_columns.rb +25 -0
  145. data/db/railwatch_telemetry_migrate/20260915000000_create_llm_calls.rb +55 -0
  146. data/db/railwatch_telemetry_migrate/20260915120000_add_detail_to_llm_calls.rb +21 -0
  147. data/db/railwatch_telemetry_migrate/20260915200000_add_explained_index_to_queries.rb +16 -0
  148. data/db/railwatch_telemetry_migrate/20260915210000_add_slowest_index_to_queries.rb +18 -0
  149. data/db/railwatch_telemetry_migrate/20260917010000_add_batch_ledger_to_ingest_batches.rb +16 -0
  150. data/docs/configuration.md +26 -0
  151. data/docs/embedded.md +352 -0
  152. data/docs/getting-started.md +5 -0
  153. data/lib/generators/railwatch/install/install_generator.rb +222 -1
  154. data/lib/generators/railwatch/install/templates/{initializer.rb → initializer.rb.tt} +39 -0
  155. data/lib/generators/railwatch/install/templates/post-deploy +8 -0
  156. data/lib/puma/plugin/railwatch.rb +170 -0
  157. data/lib/railwatch/authentication.rb +83 -0
  158. data/lib/railwatch/configuration.rb +134 -3
  159. data/lib/railwatch/dashboard_assets.rb +45 -0
  160. data/lib/railwatch/embedded.rb +54 -0
  161. data/lib/railwatch/engine.rb +89 -1
  162. data/lib/railwatch/ingest_request_body_limit.rb +10 -0
  163. data/lib/railwatch/json_compat.rb +60 -0
  164. data/lib/railwatch/maintenance.rb +183 -0
  165. data/lib/railwatch/patches/runner_command.rb +21 -1
  166. data/lib/railwatch/record.rb +33 -8
  167. data/lib/railwatch/reporter.rb +16 -0
  168. data/lib/railwatch/subscribers/process_info.rb +2 -1
  169. data/lib/railwatch/transport/local.rb +78 -0
  170. data/lib/railwatch/transport/socket.rb +183 -0
  171. data/lib/railwatch/version.rb +1 -1
  172. data/lib/railwatch/writer.rb +370 -0
  173. data/lib/railwatch.rb +38 -1
  174. data/lib/tasks/railwatch_tasks.rake +128 -0
  175. data/public/railwatch/assets/CommitMono-Bold-D6h61ieg.woff2 +0 -0
  176. data/public/railwatch/assets/CommitMono-Regular-zr8w7Obm.woff2 +0 -0
  177. data/public/railwatch/assets/Roboto-Black-auA4GeOK.woff2 +0 -0
  178. data/public/railwatch/assets/Roboto-Bold-CJLnO8j1.woff2 +0 -0
  179. data/public/railwatch/assets/Roboto-Medium-Cm2bwKpj.woff2 +0 -0
  180. data/public/railwatch/assets/Roboto-Regular-Chaq1-PV.woff2 +0 -0
  181. data/public/railwatch/assets/app-layout-yh-sPWgK.js +1 -0
  182. data/public/railwatch/assets/app-wordmark-nbjkzxwQ.js +1 -0
  183. data/public/railwatch/assets/appearance-CDuRvQTB.js +1 -0
  184. data/public/railwatch/assets/application-C_kpBdnf.css +1 -0
  185. data/public/railwatch/assets/arrow-up-DVtOGdVA.js +1 -0
  186. data/public/railwatch/assets/auth-layout-TCwPpS1K.js +1 -0
  187. data/public/railwatch/assets/badge-Daw4Hvr8.js +1 -0
  188. data/public/railwatch/assets/braces-DhFbHPsz.js +1 -0
  189. data/public/railwatch/assets/card-BX_3HXcJ.js +1 -0
  190. data/public/railwatch/assets/chart-B14-N9g7.js +39 -0
  191. data/public/railwatch/assets/chart-hover-Vy52H4uD.js +1 -0
  192. data/public/railwatch/assets/chart-panel-Cb4S_ej_.js +1 -0
  193. data/public/railwatch/assets/checkbox-D3aRSsBj.js +1 -0
  194. data/public/railwatch/assets/code-KvW8k7Jr.js +1 -0
  195. data/public/railwatch/assets/copy-DaQMJWoT.js +1 -0
  196. data/public/railwatch/assets/copy-block-BKFGd11J.js +1 -0
  197. data/public/railwatch/assets/copy-id-Djks1fXB.js +1 -0
  198. data/public/railwatch/assets/cursor-load-more-BXV0f1D_.js +1 -0
  199. data/public/railwatch/assets/data-table-iv1bdF6u.js +1 -0
  200. data/public/railwatch/assets/edit-BZc_Iawe.js +1 -0
  201. data/public/railwatch/assets/edit-DMKUF8Zi.js +8 -0
  202. data/public/railwatch/assets/edit-__9yJlO3.js +1 -0
  203. data/public/railwatch/assets/empty-state-6j_0AaQQ.js +1 -0
  204. data/public/railwatch/assets/env-layout-DrT8rO6P.js +1 -0
  205. data/public/railwatch/assets/execution-path-CzgBUi5e.js +1 -0
  206. data/public/railwatch/assets/filter-bar-9SU5NrzX.js +1 -0
  207. data/public/railwatch/assets/flamegraph-qcekju8V.js +2 -0
  208. data/public/railwatch/assets/format-B9SDkrWj.js +1 -0
  209. data/public/railwatch/assets/frames-Cyu7KMxZ.js +1 -0
  210. data/public/railwatch/assets/google-sign-in-button-DsTSfmzY.js +1 -0
  211. data/public/railwatch/assets/index-1ol1-QWI.js +1 -0
  212. data/public/railwatch/assets/index-5jI4aFzC.js +1 -0
  213. data/public/railwatch/assets/index-9KTrVnrc.js +1 -0
  214. data/public/railwatch/assets/index-B0-8lcTp.js +1 -0
  215. data/public/railwatch/assets/index-B7jjfNfO.js +1 -0
  216. data/public/railwatch/assets/index-BBchRy0M.js +1 -0
  217. data/public/railwatch/assets/index-BRiq3SNR.js +1 -0
  218. data/public/railwatch/assets/index-BgKj9xhr.js +1 -0
  219. data/public/railwatch/assets/index-BkTZqqOu.js +1 -0
  220. data/public/railwatch/assets/index-BprKx8QO.js +1 -0
  221. data/public/railwatch/assets/index-C3jzvPs3.js +1 -0
  222. data/public/railwatch/assets/index-Cbs6gGyQ.js +1 -0
  223. data/public/railwatch/assets/index-CdRZ6AWF.js +1 -0
  224. data/public/railwatch/assets/index-CeYKnapu.js +1 -0
  225. data/public/railwatch/assets/index-Cmlwy1-V.js +1 -0
  226. data/public/railwatch/assets/index-Cwx6058d.js +1 -0
  227. data/public/railwatch/assets/index-D4CSdbHv.js +1 -0
  228. data/public/railwatch/assets/index-DEFMSkdG.js +1 -0
  229. data/public/railwatch/assets/index-DFiHEBSh.js +1 -0
  230. data/public/railwatch/assets/index-DL4vWdWJ.js +1 -0
  231. data/public/railwatch/assets/index-DU9F5b5d.js +1 -0
  232. data/public/railwatch/assets/index-DaXgPcGL.js +1 -0
  233. data/public/railwatch/assets/index-DbtaU-EE.js +1 -0
  234. data/public/railwatch/assets/index-DeOe83F4.js +1 -0
  235. data/public/railwatch/assets/index-DiucHN4B.js +1 -0
  236. data/public/railwatch/assets/index-DlnR_l9o.js +1 -0
  237. data/public/railwatch/assets/index-DlumCsWY.js +2 -0
  238. data/public/railwatch/assets/index-DmRd7aIG.js +1 -0
  239. data/public/railwatch/assets/index-DxSh2UpM.js +1 -0
  240. data/public/railwatch/assets/index-MIMGuFNt.js +1 -0
  241. data/public/railwatch/assets/index-OqI59zPb.js +1 -0
  242. data/public/railwatch/assets/index-P4rC7IlX.js +1 -0
  243. data/public/railwatch/assets/index-gpPOcFWq.js +1 -0
  244. data/public/railwatch/assets/index-oVkururr.js +1 -0
  245. data/public/railwatch/assets/index-p9puqVge.js +1 -0
  246. data/public/railwatch/assets/inertia-TViv6kNv.js +97 -0
  247. data/public/railwatch/assets/input-error-LxImUkxv.js +1 -0
  248. data/public/railwatch/assets/json-viewer-Ar4cjPDW.js +1 -0
  249. data/public/railwatch/assets/klass-CJ-J4INB.js +1 -0
  250. data/public/railwatch/assets/label-COUKWqE_.js +1 -0
  251. data/public/railwatch/assets/layout-DNSLAkw_.js +1 -0
  252. data/public/railwatch/assets/live-dot-ChfUtY3p.js +41 -0
  253. data/public/railwatch/assets/nav-CNnDqPlm.js +1 -0
  254. data/public/railwatch/assets/new-84S8ZJq9.js +1 -0
  255. data/public/railwatch/assets/new-Be55nmt9.js +1 -0
  256. data/public/railwatch/assets/new-Bi_xQiIb.js +1 -0
  257. data/public/railwatch/assets/new-BvCT8TMg.js +1 -0
  258. data/public/railwatch/assets/new-D05SajFR.js +1 -0
  259. data/public/railwatch/assets/new-D4uewYC8.js +1 -0
  260. data/public/railwatch/assets/onboarding-CYZi5Cqc.js +1 -0
  261. data/public/railwatch/assets/origin-identity-6q1-CBts.js +1 -0
  262. data/public/railwatch/assets/percentile-picker-gFZCXtdb.js +1 -0
  263. data/public/railwatch/assets/relative-time-IOOgl5n2.js +1 -0
  264. data/public/railwatch/assets/release-health-DC8oc7uw.js +1 -0
  265. data/public/railwatch/assets/route-Dv6LAWvT.js +1 -0
  266. data/public/railwatch/assets/segmented-h1VdDTqE.js +1 -0
  267. data/public/railwatch/assets/select-_AJsUa7X.js +1 -0
  268. data/public/railwatch/assets/separator-BwwTYtCF.js +1 -0
  269. data/public/railwatch/assets/series-chart-DaFPefku.js +1 -0
  270. data/public/railwatch/assets/show-B7NCgkEo.js +1 -0
  271. data/public/railwatch/assets/show-BKqyKjBK.js +1 -0
  272. data/public/railwatch/assets/show-BM6X2Mpo.js +1 -0
  273. data/public/railwatch/assets/show-BNw4tN5q.js +1 -0
  274. data/public/railwatch/assets/show-BO3bnG5h.js +1 -0
  275. data/public/railwatch/assets/show-BhrAVAEA.js +1 -0
  276. data/public/railwatch/assets/show-C4Ltf5i9.js +2 -0
  277. data/public/railwatch/assets/show-C8sHalnw.js +1 -0
  278. data/public/railwatch/assets/show-CeTL4B37.js +2 -0
  279. data/public/railwatch/assets/show-CpfgV1jP.js +1 -0
  280. data/public/railwatch/assets/show-DACku6AD.js +3 -0
  281. data/public/railwatch/assets/show-DIOSGcXV.js +6 -0
  282. data/public/railwatch/assets/show-DQp_1n-B.js +1 -0
  283. data/public/railwatch/assets/show-DVNz46RI.js +1 -0
  284. data/public/railwatch/assets/show-DYteoYWW.js +1 -0
  285. data/public/railwatch/assets/show-DgSIoRvA.js +1 -0
  286. data/public/railwatch/assets/show-JxFtB4eK.js +2 -0
  287. data/public/railwatch/assets/sort-header-DpFzXblu.js +1 -0
  288. data/public/railwatch/assets/source-link-B2183i2-.js +1 -0
  289. data/public/railwatch/assets/sparkline-cell-C3-5vFkP.js +1 -0
  290. data/public/railwatch/assets/stat-s4RpOS9w.js +1 -0
  291. data/public/railwatch/assets/status-badge-8jVV-LA4.js +1 -0
  292. data/public/railwatch/assets/tenant-path-G-6u9A-o.js +1 -0
  293. data/public/railwatch/assets/text-link-DfsiaCcP.js +1 -0
  294. data/public/railwatch/assets/textarea-Dye72uP7.js +1 -0
  295. data/public/railwatch/assets/timeline-CD7WHnbo.js +1 -0
  296. data/public/railwatch/assets/transition-B_AW8rMK.js +5 -0
  297. data/public/railwatch/assets/use-clipboard-ColgLyQ2.js +1 -0
  298. data/public/railwatch/icon.png +0 -0
  299. data/public/railwatch/icon.svg +5 -0
  300. data/public/railwatch/manifest.json +2171 -0
  301. data/public/railwatch/rails-vite.json +1 -0
  302. metadata +314 -4
@@ -0,0 +1 @@
1
+ import{r as c,c as i,j as v}from"./inertia-TViv6kNv.js";const x=()=>{},d={hoveredKey:null,setHoveredKey:x},a=c.createContext(d);function C(l){const e=i.c(5),{children:r}=l,[s,u]=c.useState(null);let t;e[0]!==s?(t={hoveredKey:s,setHoveredKey:u},e[0]=s,e[1]=t):t=e[1];const n=t;let o;return e[2]!==r||e[3]!==n?(o=v.jsx(a.Provider,{value:n,children:r}),e[2]=r,e[3]=n,e[4]=o):o=e[4],o}function f(){return c.useContext(a)}export{C,f as u};
@@ -0,0 +1 @@
1
+ import{c as M,C as P,j as u}from"./inertia-TViv6kNv.js";import{T as R,L as T}from"./series-chart-DaFPefku.js";import{c as E,m as L}from"./format-B9SDkrWj.js";function q(s){const e=M.c(18),{label:l,value:d,legend:p,children:v,className:g}=s;let t;e[0]!==g?(t=P("bg-card rounded-lg border p-4",g),e[0]=g,e[1]=t):t=e[1];let c;e[2]!==l?(c=u.jsx("div",{className:"label-caps",children:l}),e[2]=l,e[3]=c):c=e[3];let i;e[4]!==d?(i=u.jsx("div",{className:"mt-0.5 text-xl font-semibold tracking-tight tabular-nums",children:d}),e[4]=d,e[5]=i):i=e[5];let a;e[6]!==c||e[7]!==i?(a=u.jsxs("div",{className:"min-w-0",children:[c,i]}),e[6]=c,e[7]=i,e[8]=a):a=e[8];let n;e[9]!==p?(n=p&&u.jsx("div",{className:"flex shrink-0 gap-4",children:p.map(V)}),e[9]=p,e[10]=n):n=e[10];let o;e[11]!==a||e[12]!==n?(o=u.jsxs("div",{className:"mb-3 flex items-start justify-between gap-4",children:[a,n]}),e[11]=a,e[12]=n,e[13]=o):o=e[13];let r;return e[14]!==v||e[15]!==t||e[16]!==o?(r=u.jsxs("div",{className:t,children:[o,v]}),e[14]=v,e[15]=t,e[16]=o,e[17]=r):r=e[17],r}function V(s){return u.jsxs("div",{className:"text-right",children:[u.jsxs("div",{className:"label-caps flex items-center justify-end gap-1.5",children:[u.jsx("span",{className:"inline-block h-2.5 w-1 rounded-sm",style:{background:s.color}}),s.label]}),u.jsx("div",{className:"mt-0.5 font-mono text-sm tabular-nums",children:s.value})]},s.key)}function $(s,e){return s.reduce((l,d)=>l+d[e],0)}const B={request:{ok:"1/2/3xx",warn:"4xx",error:"5xx"},job:{ok:"processed",warn:"released",error:"failed"},outcome:{ok:"ok",warn:null,error:"failed"},exception:{ok:"handled",warn:null,error:"unhandled"},cache:{ok:"hit",warn:"miss",error:"write"}};function H(s){const e=M.c(27),{data:l,deploys:d,label:p,seriesLabel:v,legend:g,className:t}=s,c=p===void 0?"Requests":p,i=g===void 0?"request":g;let a,n,o,r;if(e[0]!==l||e[1]!==c||e[2]!==i){const j=$(l,"count"),w=$(l,"errors"),N=$(l,"client_errors"),m=B[i],y=m.ok,k=j-w-N;let x;e[7]!==k?(x=E(k),e[7]=k,e[8]=x):x=e[8];let f;e[9]!==x||e[10]!==m.ok?(f={key:"ok",label:y,value:x,color:"var(--ok)"},e[9]=x,e[10]=m.ok,e[11]=f):f=e[11];const _=m.warn&&{key:"warn",label:m.warn,value:E(N),color:"var(--warning)"},C={key:"error",label:m.error,value:E(w),color:"var(--danger)"};let D;e[12]!==C||e[13]!==f||e[14]!==_?(D=[f,_,C].filter(G),e[12]=C,e[13]=f,e[14]=_,e[15]=D):D=e[15],n=D,a=q,o=c,r=E(j),e[0]=l,e[1]=c,e[2]=i,e[3]=a,e[4]=n,e[5]=o,e[6]=r}else a=e[3],n=e[4],o=e[5],r=e[6];let b;e[16]!==l||e[17]!==d||e[18]!==v?(b=u.jsx(R,{data:l,deploys:d,label:v}),e[16]=l,e[17]=d,e[18]=v,e[19]=b):b=e[19];let h;return e[20]!==a||e[21]!==t||e[22]!==n||e[23]!==o||e[24]!==r||e[25]!==b?(h=u.jsx(a,{label:o,value:r,className:t,legend:n,children:b}),e[20]=a,e[21]=t,e[22]=n,e[23]=o,e[24]=r,e[25]=b,e[26]=h):h=e[26],h}function G(s){return!!s}function I(s){const e=M.c(35),{data:l,deploys:d,percentile:p,label:v,className:g}=s,t=p===void 0?"p95":p,c=v===void 0?"Duration":v;let i,a,n,o,r;if(e[0]!==l||e[1]!==t){r=l.filter(U);const f=r.map(S);let _;e[7]!==t?(_=D=>D[t],e[7]=t,e[8]=_):_=e[8];const C=r.map(_);i=f.length?f.reduce(O,0)/f.length:0,n=C.length?Math.max(...C):0,a=f.length?Math.min(...f):0,o=C.length?Math.max(...C):0,e[0]=l,e[1]=t,e[2]=i,e[3]=a,e[4]=n,e[5]=o,e[6]=r}else i=e[2],a=e[3],n=e[4],o=e[5],r=e[6];const b=o;let h;e[9]!==b||e[10]!==a||e[11]!==r.length?(h=r.length?`${L(a)} — ${L(b)}`:"—",e[9]=b,e[10]=a,e[11]=r.length,e[12]=h):h=e[12];let j;e[13]!==i?(j=L(i),e[13]=i,e[14]=j):j=e[14];let w;e[15]!==j?(w={key:"avg",label:"avg",value:j,color:"var(--warning)"},e[15]=j,e[16]=w):w=e[16];let N;e[17]!==n?(N=L(n),e[17]=n,e[18]=N):N=e[18];let m;e[19]!==t||e[20]!==N?(m={key:t,label:t,value:N,color:"var(--primary)"},e[19]=t,e[20]=N,e[21]=m):m=e[21];let y;e[22]!==w||e[23]!==m?(y=[w,m],e[22]=w,e[23]=m,e[24]=y):y=e[24];let k;e[25]!==l||e[26]!==d||e[27]!==t?(k=u.jsx(T,{data:l,deploys:d,percentile:t}),e[25]=l,e[26]=d,e[27]=t,e[28]=k):k=e[28];let x;return e[29]!==g||e[30]!==c||e[31]!==k||e[32]!==h||e[33]!==y?(x=u.jsx(q,{label:c,value:h,className:g,legend:y,children:k}),e[29]=g,e[30]=c,e[31]=k,e[32]=h,e[33]=y,e[34]=x):x=e[34],x}function O(s,e){return s+e}function S(s){return s.avg}function U(s){return s.count>0}export{q as C,I as D,H as V};
@@ -0,0 +1 @@
1
+ import{r as i,j as u,c as L,C as H}from"./inertia-TViv6kNv.js";import{u as U}from"./app-wordmark-nbjkzxwQ.js";import{c as G,d as K,a as j,u as X,P as $,C as J}from"./index-1ol1-QWI.js";import{P as S}from"./index-OqI59zPb.js";var Q=Object.defineProperty,k=(o,e)=>Q(o,"name",{value:e,configurable:!0}),w="Checkbox",[V,ue]=G(w),[W,B]=V(w);function q(o){const{__scopeCheckbox:e,checked:c,children:r,defaultChecked:n,disabled:d,form:t,name:l,onCheckedChange:s,required:f,value:v="on",internal_do_not_use_render:C}=o,[b,x]=X({prop:c,defaultProp:n??!1,onChange:s,caller:w}),[g,I]=i.useState(null),[R,_]=i.useState(null),P=i.useRef(!1),[a,p]=i.useReducer(m=>m+1,0),E=g?!!t||!!g.closest("form"):!0,y={checked:b,disabled:d,setChecked:x,control:g,setControl:I,name:l,form:t,value:v,hasConsumerStoppedPropagationRef:P,userInteractionCount:a,onUserInteraction:p,required:f,defaultChecked:h(n)?!1:n,isFormControl:E,bubbleInput:R,setBubbleInput:_};return u.jsx(W,{scope:e,...y,children:A(C)?C(y):r})}k(q,"CheckboxProvider");var Y="CheckboxTrigger",Z=i.forwardRef(k(function({__scopeCheckbox:e,onKeyDown:c,onClick:r,...n},d){const{control:t,value:l,disabled:s,checked:f,required:v,setControl:C,setChecked:b,hasConsumerStoppedPropagationRef:x,onUserInteraction:g,isFormControl:I,bubbleInput:R}=B(Y,e),_=U(d,C),P=i.useRef(f);return i.useEffect(()=>{const a=t?.form;if(a){const p=k(()=>b(P.current),"reset");return a.addEventListener("reset",p),()=>a.removeEventListener("reset",p)}},[t,b]),u.jsx(S.button,{type:"button",role:"checkbox","aria-checked":h(f)?"mixed":f,"aria-required":v,"data-state":N(f),"data-disabled":s?"":void 0,disabled:s,value:l,...n,ref:_,onKeyDown:j(c,a=>{a.key==="Enter"&&a.preventDefault()}),onClick:j(r,a=>{g(),b(p=>h(p)?!0:!p),R&&I&&(x.current=a.isPropagationStopped(),x.current||a.stopPropagation())})})},"CheckboxTrigger")),ee=i.forwardRef(k(function(e,c){const{__scopeCheckbox:r,name:n,checked:d,defaultChecked:t,required:l,disabled:s,value:f,onCheckedChange:v,form:C,...b}=e;return u.jsx(q,{__scopeCheckbox:r,checked:d,defaultChecked:t,disabled:s,required:l,onCheckedChange:v,name:n,form:C,value:f,internal_do_not_use_render:({isFormControl:x})=>u.jsxs(u.Fragment,{children:[u.jsx(Z,{...b,ref:c,__scopeCheckbox:r}),x&&u.jsx(ne,{__scopeCheckbox:r})]})})},"Checkbox")),te="CheckboxIndicator",re=i.forwardRef(k(function(e,c){const{__scopeCheckbox:r,forceMount:n,...d}=e,t=B(te,r);return u.jsx($,{present:n||h(t.checked)||t.checked===!0,children:u.jsx(S.span,{"data-state":N(t.checked),"data-disabled":t.disabled?"":void 0,...d,ref:c,style:{pointerEvents:"none",...e.style}})})},"CheckboxIndicator")),oe="CheckboxBubbleInput",ne=i.forwardRef(k(function({__scopeCheckbox:e,onClick:c,...r},n){const{control:d,hasConsumerStoppedPropagationRef:t,userInteractionCount:l,checked:s,defaultChecked:f,required:v,disabled:C,name:b,value:x,form:g,bubbleInput:I,setBubbleInput:R}=B(oe,e),_=U(n,R),P=K(d),a=i.useRef(!1),p=i.useRef(s),E=i.useRef(l);i.useEffect(()=>{const m=I;if(!m)return;const F=window.HTMLInputElement.prototype,T=Object.getOwnPropertyDescriptor(F,"checked").set,M=l!==E.current;E.current=l;const O=p.current!==s;p.current=s;const z=!(M&&t.current);if(O&&T){a.current=!M;const D=new Event("click",{bubbles:z});m.indeterminate=h(s),T.call(m,h(s)?!1:s),m.dispatchEvent(D),a.current=!1}},[I,s,t,l]);const y=i.useRef(h(s)?!1:s);return u.jsx(S.input,{type:"checkbox","aria-hidden":!0,defaultChecked:f??y.current,required:v,disabled:C,name:b,value:x,form:g,...r,tabIndex:-1,ref:_,onClick:j(c,m=>{a.current&&m.stopPropagation()}),style:{...r.style,...P,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"CheckboxBubbleInput"));function A(o){return typeof o=="function"}k(A,"isFunction");function h(o){return o==="indeterminate"}k(h,"isIndeterminate");function N(o){return h(o)?"indeterminate":o?"checked":"unchecked"}k(N,"getState");function le(o){const e=L.c(9);let c,r;e[0]!==o?({className:c,...r}=o,e[0]=o,e[1]=c,e[2]=r):(c=e[1],r=e[2]);let n;e[3]!==c?(n=H("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",c),e[3]=c,e[4]=n):n=e[4];let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=u.jsx(re,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none",children:u.jsx(J,{className:"size-3.5"})}),e[5]=d):d=e[5];let t;return e[6]!==r||e[7]!==n?(t=u.jsx(ee,{"data-slot":"checkbox",className:n,...r,children:d}),e[6]=r,e[7]=n,e[8]=t):t=e[8],t}export{le as C};
@@ -0,0 +1 @@
1
+ import{c as l,C as a,j as i}from"./inertia-TViv6kNv.js";function m(c){const t=l.c(5),{children:n,className:o}=c;let e;t[0]!==o?(e=a("block max-w-full truncate font-mono text-xs",o),t[0]=o,t[1]=e):e=t[1];let s;return t[2]!==n||t[3]!==e?(s=i.jsx("code",{className:e,title:n,children:n}),t[2]=n,t[3]=e,t[4]=s):s=t[4],s}function x(c){const t=l.c(5),{children:n,className:o}=c;let e;t[0]!==o?(e=a("font-mono text-xs",o),t[0]=o,t[1]=e):e=t[1];let s;return t[2]!==n||t[3]!==e?(s=i.jsx("span",{className:e,children:n}),t[2]=n,t[3]=e,t[4]=s):s=t[4],s}export{x as M,m as S};
@@ -0,0 +1 @@
1
+ const e="Monitoring Rails ",s="deserves.",n="First-class monitoring for Rails. Every request, job, query, and exception, linked into one timeline.";export{e as H,s as a,n as b};
@@ -0,0 +1 @@
1
+ import{c as h,r as j,C as y,j as l}from"./inertia-TViv6kNv.js";import{B as E}from"./app-wordmark-nbjkzxwQ.js";import{u as N,C as b}from"./use-clipboard-ColgLyQ2.js";import{C as v}from"./index-1ol1-QWI.js";const z=1500;function R(C){const e=h.c(17),{code:t,className:p}=C,[,m]=N(),[r,f]=j.useState(!1);let c;e[0]!==t||e[1]!==m?(c=()=>{m(t).then(x=>{x&&(f(!0),window.setTimeout(()=>f(!1),z))})},e[0]=t,e[1]=m,e[2]=c):c=e[2];const u=c;let s;e[3]!==p?(s=y("relative",p),e[3]=p,e[4]=s):s=e[4];let o;e[5]!==t?(o=l.jsx("pre",{className:"bg-muted overflow-x-auto rounded p-3 pr-10 font-mono text-xs",children:t}),e[5]=t,e[6]=o):o=e[6];const d=r?"Copied code":"Copy code";let a;e[7]!==r?(a=r?l.jsx(v,{className:"size-3.5 text-emerald-500"}):l.jsx(b,{className:"size-3.5 opacity-60"}),e[7]=r,e[8]=a):a=e[8];let i;e[9]!==u||e[10]!==d||e[11]!==a?(i=l.jsx(E,{type:"button","aria-label":d,variant:"ghost",size:"icon",className:"absolute top-1.5 right-1.5 size-6",onClick:u,children:a}),e[9]=u,e[10]=d,e[11]=a,e[12]=i):i=e[12];let n;return e[13]!==s||e[14]!==o||e[15]!==i?(n=l.jsxs("div",{className:s,children:[o,i]}),e[13]=s,e[14]=o,e[15]=i,e[16]=n):n=e[16],n}export{R as C};
@@ -0,0 +1 @@
1
+ import{c as d,r as y,C as h,j as m}from"./inertia-TViv6kNv.js";import{B as j}from"./app-wordmark-nbjkzxwQ.js";import{u as E,C as N}from"./use-clipboard-ColgLyQ2.js";import{C as b}from"./index-1ol1-QWI.js";const z=1500;function v(f){const t=d.c(12),{value:o,label:C,className:n}=f,[,r]=E(),[l,u]=y.useState(!1);let a;t[0]!==r||t[1]!==o?(a=()=>{r(o).then(x=>{x&&(u(!0),window.setTimeout(()=>u(!1),z))})},t[0]=r,t[1]=o,t[2]=a):a=t[2];const c=a;let s;t[3]!==n?(s=h("h-auto gap-1.5 px-1.5 py-0.5 font-mono text-xs",n),t[3]=n,t[4]=s):s=t[4];const p=C??o;let e;t[5]!==l?(e=l?m.jsx(b,{className:"size-3 text-emerald-500"}):m.jsx(N,{className:"size-3 opacity-60"}),t[5]=l,t[6]=e):e=t[6];let i;return t[7]!==c||t[8]!==s||t[9]!==p||t[10]!==e?(i=m.jsxs(j,{type:"button",variant:"ghost",size:"sm",className:s,onClick:c,children:[p,e]}),t[7]=c,t[8]=s,t[9]=p,t[10]=e,t[11]=i):i=t[11],i}export{v as C};
@@ -0,0 +1 @@
1
+ import{c as m,r as x,e as f,j as u}from"./inertia-TViv6kNv.js";import{B as p}from"./app-wordmark-nbjkzxwQ.js";function j(c){const t=m.c(8),{meta:e,href:n,only:i}=c,[o,l]=x.useState(!1);if(!e.has_more||!e.next_cursor)return null;let r;t[0]!==n||t[1]!==e.next_cursor||t[2]!==i?(r=()=>f.visit(n(e.next_cursor),{only:i,preserveState:!0,preserveScroll:!0,onStart:()=>l(!0),onFinish:()=>l(!1)}),t[0]=n,t[1]=e.next_cursor,t[2]=i,t[3]=r):r=t[3];const a=o?"Loading…":"Load "+e.limit+" more";let s;return t[4]!==o||t[5]!==r||t[6]!==a?(s=u.jsx("div",{className:"flex justify-center pt-3",children:u.jsx(p,{type:"button",variant:"outline",disabled:o,onClick:r,children:a})}),t[4]=o,t[5]=r,t[6]=a,t[7]=s):s=t[7],s}export{j as C};
@@ -0,0 +1 @@
1
+ import{c as j,C as h,j as o,r as d}from"./inertia-TViv6kNv.js";import{u as C}from"./chart-hover-Vy52H4uD.js";import{E as D}from"./empty-state-6j_0AaQQ.js";function _(n){const e=j.c(8);let s,t;e[0]!==n?({className:s,...t}=n,e[0]=n,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let l;e[3]!==s?(l=h("w-full caption-bottom text-sm",s),e[3]=s,e[4]=l):l=e[4];let r;return e[5]!==t||e[6]!==l?(r=o.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:o.jsx("table",{"data-slot":"table",className:l,...t})}),e[5]=t,e[6]=l,e[7]=r):r=e[7],r}function M(n){const e=j.c(8);let s,t;e[0]!==n?({className:s,...t}=n,e[0]=n,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let l;e[3]!==s?(l=h("[&_tr]:border-b",s),e[3]=s,e[4]=l):l=e[4];let r;return e[5]!==t||e[6]!==l?(r=o.jsx("thead",{"data-slot":"table-header",className:l,...t}),e[5]=t,e[6]=l,e[7]=r):r=e[7],r}function S(n){const e=j.c(8);let s,t;e[0]!==n?({className:s,...t}=n,e[0]=n,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let l;e[3]!==s?(l=h("[&_tr:last-child]:border-0",s),e[3]=s,e[4]=l):l=e[4];let r;return e[5]!==t||e[6]!==l?(r=o.jsx("tbody",{"data-slot":"table-body",className:l,...t}),e[5]=t,e[6]=l,e[7]=r):r=e[7],r}function T(n){const e=j.c(8);let s,t;e[0]!==n?({className:s,...t}=n,e[0]=n,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let l;e[3]!==s?(l=h("hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",s),e[3]=s,e[4]=l):l=e[4];let r;return e[5]!==t||e[6]!==l?(r=o.jsx("tr",{"data-slot":"table-row",className:l,...t}),e[5]=t,e[6]=l,e[7]=r):r=e[7],r}function I(n){const e=j.c(8);let s,t;e[0]!==n?({className:s,...t}=n,e[0]=n,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let l;e[3]!==s?(l=h("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",s),e[3]=s,e[4]=l):l=e[4];let r;return e[5]!==t||e[6]!==l?(r=o.jsx("th",{"data-slot":"table-head",className:l,...t}),e[5]=t,e[6]=l,e[7]=r):r=e[7],r}function H(n){const e=j.c(8);let s,t;e[0]!==n?({className:s,...t}=n,e[0]=n,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let l;e[3]!==s?(l=h("px-3 py-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",s),e[3]=s,e[4]=l):l=e[4];let r;return e[5]!==t||e[6]!==l?(r=o.jsx("td",{"data-slot":"table-cell",className:l,...t}),e[5]=t,e[6]=l,e[7]=r):r=e[7],r}function K(n){return n.defaultPrevented||n.isComposing||n.repeat||n.metaKey||n.ctrlKey||n.altKey||n.shiftKey||n.target instanceof Element&&!!n.target.closest('input, textarea, select, button, a, [contenteditable]:not([contenteditable="false"]), [role="button"], [role="combobox"], [role="textbox"], [role="menu"], [role="listbox"], [role="dialog"]')}const N=new Map;let x;function $({rows:n,rowKey:e,onOpen:s,enabled:t=!0}){const[l,r]=d.useState(null),[u]=d.useState(()=>Symbol("row-nav"));function v(){!t||x===u||(x&&N.get(x)?.(),x=u)}d.useEffect(()=>{if(t)return N.set(u,()=>r(null)),x??=u,()=>{N.delete(u),x===u&&(x=N.keys().next().value)}},[t,u]);const w=d.useRef(n),m=d.useRef(e),g=d.useRef(s);return d.useEffect(()=>{w.current=n,m.current=e,g.current=s}),d.useEffect(()=>{if(!t)return;function b(c){if(x!==u||K(c))return;if(c.key==="/"){const i=document.querySelector("[data-filter-bar-input]");i&&(c.preventDefault(),i.focus());return}const f=w.current,y=m.current,a=f.findIndex(i=>y(i)===l);if(c.key==="j"){if(f.length===0)return;c.preventDefault();const i=Math.min(a+1,f.length-1);r(y(f[i]))}else if(c.key==="k"){if(f.length===0)return;c.preventDefault();const i=a<0?0:Math.max(a-1,0);r(y(f[i]))}else c.key==="Enter"?a>=0&&(c.preventDefault(),g.current(f[a])):c.key==="o"?a>=0&&(c.preventDefault(),g.current(f[a],{newTab:!0})):c.key==="Escape"&&r(null)}return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[l,t,u]),{highlighted:l,setHighlighted:r,activate:v}}const B='a, button, input, select, textarea, [role="button"], [role="link"], [contenteditable="true"]';function L(n){return n instanceof Element&&n.closest(B)}function V({rows:n,columns:e,rowKey:s,empty:t="Nothing here yet.",onRowClick:l,keyboardNav:r,hoverKey:u,rowClassName:v,className:w}){const{highlighted:m,activate:g}=$({rows:n,rowKey:s,onOpen:r?.onOpen??(()=>{}),enabled:!!r&&r?.enabled!==!1}),b=d.useRef(new Map);d.useEffect(()=>{m!=null&&b.current.get(m)?.scrollIntoView({block:"nearest"})},[m]),d.useEffect(()=>{if(!r?.onHighlightChange)return;const a=n.find(i=>s(i)===m)??null;r.onHighlightChange(a)},[m]);const{hoveredKey:c,setHoveredKey:f}=C(),y=a=>h(a.align==="right"&&"text-right",a.hideOnMobile&&"hidden md:table-cell",a.grow&&"w-full max-w-0 truncate",a.className);return o.jsx("div",{tabIndex:r&&r.enabled!==!1?0:void 0,onFocusCapture:g,onPointerDownCapture:g,className:h("bg-card -mx-3 overflow-x-auto border-y md:mx-0 md:rounded-lg md:border",w),children:o.jsxs(_,{children:[o.jsx(M,{children:o.jsx(T,{className:"hover:bg-transparent",children:e.map(a=>o.jsx(I,{className:y(a),children:a.header},a.key))})}),o.jsxs(S,{children:[n.length===0&&o.jsx(T,{children:o.jsx(H,{colSpan:e.length,className:"p-0 whitespace-normal",children:typeof t=="string"?o.jsx(D,{title:t}):o.jsx("div",{className:"text-muted-foreground min-h-24 text-center",children:t})})}),n.map(a=>{const i=s(a),R=!!r&&m===i,E=u?.(a),k=E!=null&&c===E;return o.jsx(T,{ref:p=>{p?b.current.set(i,p):b.current.delete(i)},"data-state":R?"highlighted":void 0,"data-hovered":k||void 0,className:h(l&&"cursor-pointer",v?.(a),R&&"bg-accent shadow-[inset_2px_0_0_0_var(--primary)]",k&&!R&&"bg-accent/50"),onClick:l?p=>{L(p.target)||l(a)}:void 0,onMouseEnter:E?()=>f(E):void 0,onMouseLeave:E?()=>f(null):void 0,children:e.map(p=>o.jsx(H,{className:h("py-1.5 text-xs",p.align==="right"&&"font-mono tabular-nums",y(p)),children:p.cell(a)},p.key))},i)})]})]})})}export{V as D,K as i};
@@ -0,0 +1 @@
1
+ import{c as h,R as j,j as e,H as _,F as g}from"./inertia-TViv6kNv.js";import{I as p}from"./input-error-LxImUkxv.js";import{B as y}from"./app-wordmark-nbjkzxwQ.js";import{L as w,I as f}from"./label-COUKWqE_.js";import{S as b,A as N}from"./auth-layout-TCwPpS1K.js";import"./index-OqI59zPb.js";import"./copy-DaQMJWoT.js";import"./empty-state-6j_0AaQQ.js";function k(x){const s=h.c(11),{sid:d,email:a}=x;let t;s[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx(_,{title:"Reset password"}),s[0]=t):t=s[0];let l;s[1]===Symbol.for("react.memo_cache_sentinel")?(l=j(),s[1]=l):l=s[1];let r;s[2]!==a||s[3]!==d?(r=n=>({...n,sid:d,email:a}),s[2]=a,s[3]=d,s[4]=r):r=s[4];let i;s[5]===Symbol.for("react.memo_cache_sentinel")?(i=["password","password_confirmation"],s[5]=i):i=s[5];let o;s[6]!==a?(o=n=>{const{processing:u,errors:c}=n;return e.jsxs("div",{className:"grid gap-6",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(w,{htmlFor:"email",children:"Email"}),e.jsx(f,{id:"email",type:"email",name:"email",autoComplete:"email",value:a,className:"mt-1 block w-full",readOnly:!0}),e.jsx(p,{messages:c.email,className:"mt-2"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(w,{htmlFor:"password",children:"Password"}),e.jsx(f,{id:"password",type:"password",name:"password",autoComplete:"new-password",className:"mt-1 block w-full",autoFocus:!0,placeholder:"Password"}),e.jsx(p,{messages:c.password})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(w,{htmlFor:"password_confirmation",children:"Confirm password"}),e.jsx(f,{id:"password_confirmation",type:"password",name:"password_confirmation",autoComplete:"new-password",className:"mt-1 block w-full",placeholder:"Confirm password"}),e.jsx(p,{messages:c.password_confirmation,className:"mt-2"})]}),e.jsxs(y,{type:"submit",className:"mt-4 w-full",disabled:u,children:[u&&e.jsx(b,{}),"Reset password"]})]})},s[6]=a,s[7]=o):o=s[7];let m;return s[8]!==r||s[9]!==o?(m=e.jsxs(N,{title:"Reset password",description:"Please enter your new password below",children:[t,e.jsx(g,{method:"put",action:l,transform:r,resetOnSuccess:i,children:o})]}),s[8]=r,s[9]=o,s[10]=m):m=s[10],m}export{k as default};
@@ -0,0 +1,8 @@
1
+ import{c as L,g as K,s as P,j as s,C as F,H as O,F as D}from"./inertia-TViv6kNv.js";import{I as E}from"./input-error-LxImUkxv.js";import{R as W}from"./relative-time-IOOgl5n2.js";import{B}from"./app-wordmark-nbjkzxwQ.js";import{b as k,c as A,C as T,a as C}from"./card-BX_3HXcJ.js";import{L as S,I}from"./label-COUKWqE_.js";import{T as M}from"./textarea-Dye72uP7.js";import{A as $}from"./app-layout-yh-sPWgK.js";import"./live-dot-ChfUtY3p.js";import"./index-OqI59zPb.js";import"./index-1ol1-QWI.js";import"./format-B9SDkrWj.js";import"./checkbox-D3aRSsBj.js";const q=`# Nothing to add under Kamal: the gem already stamps records with
2
+ # KAMAL_HOST, the same host the post-deploy hook registers here.
3
+ # Anywhere else, name the host yourself:
4
+ Railwatch.configure do |c|
5
+ c.server = ENV["RAILWATCH_SERVER"] || Socket.gethostname
6
+ end`;function oe(t){const e=L.c(50),r=t.environment.kamal_config,n=t.environment.expected_servers,V=t.application.name;let a;e[0]!==t.application.id?(a=K(t.application.id),e[0]=t.application.id,e[1]=a):a=e[1];let o;e[2]!==t.application.name||e[3]!==a?(o={title:V,href:a},e[2]=t.application.name,e[3]=a,e[4]=o):o=e[4];let i;e[5]!==t.environment.name?(i={title:t.environment.name,href:"#"},e[5]=t.environment.name,e[6]=i):i=e[6];let l;e[7]!==o||e[8]!==i?(l=[o,i],e[7]=o,e[8]=i,e[9]=l):l=e[9];const R=`Edit ${t.environment.name}`;let m;e[10]!==R?(m=s.jsx(O,{title:R}),e[10]=R,e[11]=m):m=e[11];let _;e[12]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(k,{children:s.jsx(A,{children:"Edit environment"})}),e[12]=_):_=e[12];let c;e[13]!==t.application.id||e[14]!==t.environment.id?(c=P(t.application.id,t.environment.id),e[13]=t.application.id,e[14]=t.environment.id,e[15]=c):c=e[15];let d;e[16]!==n||e[17]!==t.environment.crash_free_threshold||e[18]!==t.environment.name||e[19]!==t.environment.slug||e[20]!==t.environment.token_prefix?(d=j=>{const{errors:v,processing:H}=j;return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid gap-2",children:[s.jsx(S,{htmlFor:"name",children:"Name"}),s.jsx(I,{id:"name",name:"name",defaultValue:t.environment.name,required:!0}),s.jsx(E,{messages:v.name})]}),s.jsxs("div",{className:"grid gap-2",children:[s.jsx(S,{htmlFor:"expected_servers",children:"Expected servers"}),s.jsx(M,{id:"expected_servers",name:"expected_servers",rows:4,className:"font-mono text-xs",defaultValue:n.join(`
7
+ `),placeholder:`web-1
8
+ web-2`}),s.jsx("p",{className:"text-muted-foreground text-xs",children:"One host per line. Railwatch alerts (silent host) when one of these stops reporting for 10 minutes. The Kamal post-deploy hook rewrites this list after every deploy."}),s.jsx(E,{messages:v.expected_servers})]}),s.jsxs("div",{className:"grid gap-2",children:[s.jsx(S,{htmlFor:"crash_free_threshold",children:"Crash-free session threshold"}),s.jsx(I,{id:"crash_free_threshold",name:"crash_free_threshold",type:"number",step:"0.1",min:"0",max:"100",defaultValue:t.environment.crash_free_threshold??""}),s.jsx("p",{className:"text-muted-foreground text-xs",children:"Percent. Railwatch alerts (crash-free drop) when the current release falls below this over an hour, with at least 20 sessions."}),s.jsx(E,{messages:v.crash_free_threshold})]}),s.jsxs("p",{className:"text-muted-foreground text-xs",children:["Tenant slug"," ",s.jsx("span",{className:"font-mono",children:t.environment.slug})," · token ",t.environment.token_prefix,"…"]}),s.jsx(B,{disabled:H,children:"Save"})]})},e[16]=n,e[17]=t.environment.crash_free_threshold,e[18]=t.environment.name,e[19]=t.environment.slug,e[20]=t.environment.token_prefix,e[21]=d):d=e[21];let h;e[22]!==c||e[23]!==d?(h=s.jsxs(T,{children:[_,s.jsx(C,{children:s.jsx(D,{method:"patch",action:c,className:"space-y-4",children:d})})]}),e[22]=c,e[23]=d,e[24]=h):h=e[24];let g;e[25]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(k,{children:s.jsx(A,{children:"Kamal"})}),e[25]=g):g=e[25];let x;e[26]!==r.destination||e[27]!==r.performer||e[28]!==r.received_at||e[29]!==r.recorded_at||e[30]!==r.roles||e[31]!==r.service||e[32]!==r.version?(x=r.version?s.jsxs("dl",{className:"grid grid-cols-2 gap-3 text-sm md:grid-cols-3",children:[[["Service",r.service],["Destination",r.destination],["Version",r.version],["Performer",r.performer],["Roles",r.roles?.join(", ")]].map(z),s.jsxs("div",{children:[s.jsx("dt",{className:"label-caps",children:"Deployed"}),s.jsx("dd",{className:"font-mono text-xs",children:s.jsx(W,{iso:r.recorded_at??r.received_at})})]})]}):s.jsxs("p",{className:"text-muted-foreground text-sm",children:["No deploy reported yet. Run"," ",s.jsx("span",{className:"font-mono",children:"bin/rails generate railwatch:install"})," ","to create"," ",s.jsx("span",{className:"font-mono",children:".kamal/hooks/post-deploy"}),"; it posts the host list after every deploy."]}),e[26]=r.destination,e[27]=r.performer,e[28]=r.received_at,e[29]=r.recorded_at,e[30]=r.roles,e[31]=r.service,e[32]=r.version,e[33]=x):x=e[33];let f;e[34]!==n||e[35]!==t.silent_servers?(f=n.length>0&&s.jsx("ul",{className:"space-y-1",children:n.map(j=>{const v=t.silent_servers.includes(j);return s.jsxs("li",{className:"flex items-center gap-2 font-mono text-xs",children:[s.jsx("span",{className:F("size-2 shrink-0 rounded-full",v?"bg-warning":"bg-live")}),s.jsx("span",{className:"truncate",children:j}),s.jsx("span",{className:"text-muted-foreground",children:v?"silent":"reporting"})]},j)})}),e[34]=n,e[35]=t.silent_servers,e[36]=f):f=e[36];let N,y;e[37]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx("p",{className:"text-muted-foreground text-xs",children:"Kamal deploys to hosts by IP or DNS name, and the gem stamps records with that host (KAMAL_HOST). Off Kamal, a container reports its own hostname, so set RAILWATCH_SERVER to the name listed here or the host looks silent."}),y=s.jsx("pre",{className:"bg-muted overflow-x-auto rounded p-3 font-mono text-xs",children:q}),e[37]=N,e[38]=y):(N=e[37],y=e[38]);let b;e[39]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsxs("div",{className:"space-y-2",children:[N,y,s.jsxs("p",{className:"text-muted-foreground text-xs",children:["Setting ",s.jsx("span",{className:"font-mono",children:"RAILWATCH_SERVER"})," in the container does the same thing."]})]}),e[39]=b):b=e[39];let p;e[40]!==x||e[41]!==f?(p=s.jsxs(T,{children:[g,s.jsxs(C,{className:"space-y-4",children:[x,f,b]})]}),e[40]=x,e[41]=f,e[42]=p):p=e[42];let u;e[43]!==h||e[44]!==p?(u=s.jsxs("div",{className:"mx-auto w-full max-w-2xl space-y-4 p-4 md:p-6",children:[h,p]}),e[43]=h,e[44]=p,e[45]=u):u=e[45];let w;return e[46]!==u||e[47]!==l||e[48]!==m?(w=s.jsxs($,{breadcrumbs:l,children:[m,u]}),e[46]=u,e[47]=l,e[48]=m,e[49]=w):w=e[49],w}function z(t){const[e,r]=t;return s.jsxs("div",{children:[s.jsx("dt",{className:"label-caps",children:e}),s.jsx("dd",{className:"truncate font-mono text-xs",children:r?.length?r:"—"})]},e)}export{oe as default};
@@ -0,0 +1 @@
1
+ import{c as L,g as b,j as s,H as V,F as k,e as D}from"./inertia-TViv6kNv.js";import{I as y}from"./input-error-LxImUkxv.js";import{B as N}from"./app-wordmark-nbjkzxwQ.js";import{b as A,c as w,C as F,a as C}from"./card-BX_3HXcJ.js";import{L as u,I as g}from"./label-COUKWqE_.js";import{A as H}from"./app-layout-yh-sPWgK.js";import"./index-OqI59zPb.js";import"./live-dot-ChfUtY3p.js";import"./index-1ol1-QWI.js";import"./checkbox-D3aRSsBj.js";function K(p){const e=L.c(32),t=p.application,E=t.name;let r;e[0]!==t.id?(r=b(t.id),e[0]=t.id,e[1]=r):r=e[1];let a;e[2]!==t.name||e[3]!==r?(a={title:E,href:r},e[2]=t.name,e[3]=r,e[4]=a):a=e[4];let h;e[5]===Symbol.for("react.memo_cache_sentinel")?(h={title:"Edit",href:"#"},e[5]=h):h=e[5];let i;e[6]!==a?(i=[a,h],e[6]=a,e[7]=i):i=e[7];const v=`Edit ${t.name}`;let l;e[8]!==v?(l=s.jsx(V,{title:v}),e[8]=v,e[9]=l):l=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(A,{children:s.jsx(w,{children:"Edit application"})}),e[10]=f):f=e[10];let o;e[11]!==t.id?(o=b(t.id),e[11]=t.id,e[12]=o):o=e[12];let n;e[13]!==t.default_branch||e[14]!==t.issue_prefix||e[15]!==t.name||e[16]!==t.repository_url||e[17]!==p.auto_resolve_after_days?(n=S=>{const{errors:j,processing:I}=S;return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid gap-2",children:[s.jsx(u,{htmlFor:"name",children:"Name"}),s.jsx(g,{id:"name",name:"name",defaultValue:t.name,required:!0}),s.jsx(y,{messages:j.name})]}),s.jsxs("div",{className:"grid gap-2",children:[s.jsx(u,{htmlFor:"issue_prefix",children:"Issue prefix"}),s.jsx(g,{id:"issue_prefix",name:"issue_prefix",defaultValue:t.issue_prefix,maxLength:8}),s.jsx(y,{messages:j.issue_prefix})]}),s.jsxs("div",{className:"grid gap-2",children:[s.jsx(u,{htmlFor:"repository_url",children:"Repository URL"}),s.jsx(g,{id:"repository_url",name:"repository_url",defaultValue:t.repository_url??"",placeholder:"https://github.com/org/repo"}),s.jsx(y,{messages:j.repository_url})]}),s.jsxs("div",{className:"grid gap-2",children:[s.jsx(u,{htmlFor:"default_branch",children:"Default branch"}),s.jsx(g,{id:"default_branch",name:"default_branch",defaultValue:t.default_branch}),s.jsx(y,{messages:j.default_branch}),s.jsx("p",{className:"text-muted-foreground text-xs",children:"Stack frames link into this repository at the deploy's git SHA when one was recorded, and at this branch otherwise."})]}),s.jsxs("div",{className:"grid gap-2",children:[s.jsx(u,{htmlFor:"auto_resolve_after_days",children:"Auto-resolve issues"}),s.jsxs("select",{id:"auto_resolve_after_days",name:"auto_resolve_after_days",defaultValue:p.auto_resolve_after_days??"",className:"border-input bg-background h-9 rounded-md border px-3 text-sm",children:[s.jsx("option",{value:"",children:"Never"}),s.jsx("option",{value:"7",children:"After 7 days without a recurrence"}),s.jsx("option",{value:"14",children:"After 14 days without a recurrence"}),s.jsx("option",{value:"30",children:"After 30 days without a recurrence"})]}),s.jsx("p",{className:"text-muted-foreground text-xs",children:"Applies to every application in this account."})]}),s.jsx(N,{disabled:I,children:"Save"})]})},e[13]=t.default_branch,e[14]=t.issue_prefix,e[15]=t.name,e[16]=t.repository_url,e[17]=p.auto_resolve_after_days,e[18]=n):n=e[18];let d;e[19]!==o||e[20]!==n?(d=s.jsxs(F,{children:[f,s.jsx(C,{children:s.jsx(k,{method:"patch",action:o,className:"space-y-4",children:n})})]}),e[19]=o,e[20]=n,e[21]=d):d=e[21];let x;e[22]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(A,{children:s.jsx(w,{children:"Danger zone"})}),e[22]=x):x=e[22];let c;e[23]!==t.id?(c=s.jsxs(F,{className:"border-destructive/40",children:[x,s.jsx(C,{children:s.jsx(N,{variant:"destructive",size:"sm",onClick:()=>confirm("Delete this application, its environments, telemetry, and issues?")&&D.delete(b(t.id)),children:"Delete application"})})]}),e[23]=t.id,e[24]=c):c=e[24];let m;e[25]!==d||e[26]!==c?(m=s.jsxs("div",{className:"mx-auto w-full max-w-md space-y-4 p-6",children:[d,c]}),e[25]=d,e[26]=c,e[27]=m):m=e[27];let _;return e[28]!==m||e[29]!==i||e[30]!==l?(_=s.jsxs(H,{breadcrumbs:i,children:[l,m]}),e[28]=m,e[29]=i,e[30]=l,e[31]=_):_=e[31],_}export{K as default};
@@ -0,0 +1 @@
1
+ import{c as y,C as N,r as b,j as t}from"./inertia-TViv6kNv.js";function v(g){const e=y.c(13),{className:a}=g,c=b.useId();let r;e[0]!==a?(r=N("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%)]",a),e[0]=a,e[1]=r):r=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("rect",{x:"9",y:"9",width:"4",height:"30",rx:"1",fill:"currentColor"}),e[2]=i):i=e[2];let l;e[3]!==c?(l=t.jsx("defs",{children:t.jsx("pattern",{id:c,width:"22",height:"48",patternUnits:"userSpaceOnUse",children:i})}),e[3]=c,e[4]=l):l=e[4];const n=`url(#${c})`;let s;e[5]!==n?(s=t.jsx("rect",{width:"100%",height:"100%",fill:n}),e[5]=n,e[6]=s):s=e[6];let o,d;e[7]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("rect",{y:"16",width:"100%",height:"2.5",fill:"currentColor"}),d=t.jsx("rect",{y:"29.5",width:"100%",height:"2.5",fill:"currentColor"}),e[7]=o,e[8]=d):(o=e[7],d=e[8]);let x;return e[9]!==r||e[10]!==l||e[11]!==s?(x=t.jsxs("svg",{"aria-hidden":!0,className:r,preserveAspectRatio:"none",children:[l,s,o,d]}),e[9]=r,e[10]=l,e[11]=s,e[12]=x):x=e[12],x}const k={clear:"text-live",caution:"text-warning",stop:"text-danger"},j={stop:8,caution:17,clear:26},w=["stop","caution","clear"];function C(g){const e=y.c(8),{aspect:a,className:c}=g;let r;e[0]!==c?(r=N("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)]",c),e[0]=c,e[1]=r):r=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsxs("g",{className:"text-foreground/35 dark:text-foreground/40",children:[t.jsx("rect",{x:"9",y:"33",width:"2",height:"26",rx:"1",fill:"currentColor"}),t.jsx("rect",{x:"5",y:"58",width:"10",height:"2",rx:"1",fill:"currentColor"}),t.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]=i):i=e[2];let l;e[3]!==a?(l=w.map(s=>s===a?t.jsxs("g",{className:k[s],"data-lamp":s,children:[t.jsx("circle",{cx:"10",cy:j[s],r:"6",fill:"currentColor",opacity:"0.2",className:"blur-[2px]"}),t.jsx("circle",{cx:"10",cy:j[s],r:"3",fill:"currentColor"})]},s):t.jsx("circle",{cx:"10",cy:j[s],r:"3",className:"text-foreground/15",fill:"currentColor"},s)),e[3]=a,e[4]=l):l=e[4];let n;return e[5]!==r||e[6]!==l?(n=t.jsxs("svg",{"aria-hidden":!0,viewBox:"0 0 20 64",className:r,children:[i,l]}),e[5]=r,e[6]=l,e[7]=n):n=e[7],n}function E(g){const e=y.c(22),{icon:a,title:c,description:r,action:i,signal:l,className:n}=g,s=l===void 0?"clear":l;let o;e[0]!==n?(o=N("relative flex min-h-48 items-center justify-center overflow-hidden px-4 py-8 text-center",n),e[0]=n,e[1]=o):o=e[1];let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(v,{}),e[2]=d):d=e[2];let x;e[3]!==s?(x=t.jsx(C,{aspect:s}),e[3]=s,e[4]=x):x=e[4];let f;e[5]!==a?(f=a&&t.jsx("span",{className:"bg-muted text-muted-foreground mb-1 flex size-9 items-center justify-center rounded-md",children:t.jsx(a,{className:"size-4"})}),e[5]=a,e[6]=f):f=e[6];let m;e[7]!==c?(m=t.jsx("span",{className:"text-sm font-medium",children:c}),e[7]=c,e[8]=m):m=e[8];let h;e[9]!==r?(h=r&&t.jsx("span",{className:"text-muted-foreground text-xs leading-relaxed",children:r}),e[9]=r,e[10]=h):h=e[10];let u;e[11]!==i?(u=i&&t.jsx("div",{className:"mt-2",children:i}),e[11]=i,e[12]=u):u=e[12];let p;e[13]!==f||e[14]!==m||e[15]!==h||e[16]!==u?(p=t.jsxs("div",{className:"relative flex max-w-xs flex-col items-center gap-1.5",children:[f,m,h,u]}),e[13]=f,e[14]=m,e[15]=h,e[16]=u,e[17]=p):p=e[17];let _;return e[18]!==o||e[19]!==x||e[20]!==p?(_=t.jsxs("div",{className:o,"aria-live":"polite",children:[d,x,p]}),e[18]=o,e[19]=x,e[20]=p,e[21]=_):_=e[21],_}export{E,C as S,v as T};
@@ -0,0 +1 @@
1
+ import{r as m,j as r,c as L,C as me,e as se,u as te,g as Ae,o as je,H as Te}from"./inertia-TViv6kNv.js";import{b as Oe}from"./badge-Daw4Hvr8.js";import{t as ke,v as De,w as Ee,x as $e,A as Ne}from"./app-layout-yh-sPWgK.js";import{d as ve,R as Ie,u as Me,A as Le,P as Fe,h as We,g as Ge,f as He,F as ze,e as Be,C as Ue,t as Ve,L as Je}from"./live-dot-ChfUtY3p.js";import{a as ne}from"./format-B9SDkrWj.js";import{a as ue,S as Ke}from"./segmented-h1VdDTqE.js";import{u as be,a as Ye,B as de}from"./app-wordmark-nbjkzxwQ.js";import{L as pe,I as fe}from"./label-COUKWqE_.js";import{c as qe,u as Ze,a as X,P as Se}from"./index-1ol1-QWI.js";import{P as Qe}from"./index-OqI59zPb.js";var Xe=Object.defineProperty,H=(t,e)=>Xe(t,"name",{value:e,configurable:!0}),ie="Popover",[xe,qt]=qe(ie,[ve]),re=ve(),[et,U]=xe(ie),tt=H(t=>{const{__scopePopover:e,children:n,open:o,defaultOpen:s,onOpenChange:i,modal:l=!1}=t,c=re(e),a=m.useRef(null),[d,u]=m.useState(!1),[f,h]=Ze({prop:o,defaultProp:s??!1,onChange:i,caller:ie});return r.jsx(Ie,{...c,children:r.jsx(et,{scope:e,contentId:Me(),triggerRef:a,open:f,onOpenChange:h,onOpenToggle:m.useCallback(()=>h(p=>!p),[h]),hasCustomAnchor:d,onCustomAnchorAdd:m.useCallback(()=>u(!0),[]),onCustomAnchorRemove:m.useCallback(()=>u(!1),[]),modal:l,children:n})})},"Popover"),nt="PopoverTrigger",ot=m.forwardRef(H(function(e,n){const{__scopePopover:o,...s}=e,i=U(nt,o),l=re(o),c=be(n,i.triggerRef),a=r.jsx(Qe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":ce(i.open),...s,ref:c,onClick:X(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?a:r.jsx(Le,{asChild:!0,...l,children:a})},"PopoverTrigger")),Pe="PopoverPortal",[st,it]=xe(Pe,{forceMount:void 0}),rt=H(t=>{const{__scopePopover:e,forceMount:n,children:o,container:s}=t,i=U(Pe,e);return r.jsx(st,{scope:e,forceMount:n,children:r.jsx(Se,{present:n||i.open,children:r.jsx(Fe,{asChild:!0,container:s,children:o})})})},"PopoverPortal"),K="PopoverContent",ct=m.forwardRef(H(function(e,n){const o=it(K,e.__scopePopover),{forceMount:s=o.forceMount,...i}=e,l=U(K,e.__scopePopover);return r.jsx(Se,{present:s||l.open,children:l.modal?r.jsx(lt,{...i,ref:n}):r.jsx(ut,{...i,ref:n})})},"PopoverContent")),at=Ye("PopoverContent.RemoveScroll"),lt=m.forwardRef(H(function(e,n){const o=U(K,e.__scopePopover),s=m.useRef(null),i=be(n,s),l=m.useRef(!1);return m.useEffect(()=>{const c=s.current;if(c)return We(c)},[]),r.jsx(Ge,{as:at,allowPinchZoom:!0,children:r.jsx(we,{...e,ref:i,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:X(e.onCloseAutoFocus,c=>{c.preventDefault(),l.current||o.triggerRef.current?.focus()}),onPointerDownOutside:X(e.onPointerDownOutside,c=>{const a=c.detail.originalEvent,d=a.button===0&&a.ctrlKey===!0,u=a.button===2||d;l.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:X(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})},"PopoverContentModal")),ut=m.forwardRef(H(function(e,n){const o=U(K,e.__scopePopover),s=m.useRef(!1),i=m.useRef(!1);return r.jsx(we,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{e.onCloseAutoFocus?.(l),l.defaultPrevented||(s.current||o.triggerRef.current?.focus(),l.preventDefault()),s.current=!1,i.current=!1},onInteractOutside:l=>{e.onInteractOutside?.(l),l.defaultPrevented||(s.current=!0,l.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const c=l.target;o.triggerRef.current?.contains(c)&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&i.current&&l.preventDefault()}})},"PopoverContentNonModal")),we=m.forwardRef(H(function(e,n){const{__scopePopover:o,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:l,disableOutsidePointerEvents:c,onEscapeKeyDown:a,onPointerDownOutside:d,onFocusOutside:u,onInteractOutside:f,...h}=e,p=U(K,o),g=re(o);return He(),r.jsx(ze,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:i,onUnmountAutoFocus:l,children:r.jsx(Be,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:f,onEscapeKeyDown:a,onPointerDownOutside:d,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1),deferPointerDownOutside:!0,children:r.jsx(Ue,{"data-state":ce(p.open),role:"dialog",id:p.contentId,...g,...h,ref:n,style:{...h.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})},"PopoverContentImpl"));function ce(t){return t?"open":"closed"}H(ce,"getState");var dt=tt,pt=ot,ft=rt,ht=ct;function gt(t){const e=L.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let o;return e[2]!==n?(o=r.jsx(dt,{"data-slot":"popover",...n}),e[2]=n,e[3]=o):o=e[3],o}function mt(t){const e=L.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let o;return e[2]!==n?(o=r.jsx(pt,{"data-slot":"popover-trigger",...n}),e[2]=n,e[3]=o):o=e[3],o}function vt(t){const e=L.c(12);let n,o,s,i;e[0]!==t?({className:n,align:s,sideOffset:i,...o}=t,e[0]=t,e[1]=n,e[2]=o,e[3]=s,e[4]=i):(n=e[1],o=e[2],s=e[3],i=e[4]);const l=s===void 0?"center":s,c=i===void 0?4:i;let a;e[5]!==n?(a=me("bg-popover text-popover-foreground 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 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",n),e[5]=n,e[6]=a):a=e[6];let d;return e[7]!==l||e[8]!==o||e[9]!==c||e[10]!==a?(d=r.jsx(ft,{children:r.jsx(ht,{"data-slot":"popover-content",align:l,sideOffset:c,className:a,...o})}),e[7]=l,e[8]=o,e[9]=c,e[10]=a,e[11]=d):d=e[11],d}var ee={logger:typeof console<"u"?console:void 0,WebSocket:typeof WebSocket<"u"?WebSocket:void 0},b={log(...t){this.enabled&&(t.push(Date.now()),ee.logger.log("[ActionCable]",...t))}};const J=()=>new Date().getTime(),q=t=>(J()-t)/1e3;class ae{constructor(e){this.visibilityDidChange=this.visibilityDidChange.bind(this),this.connection=e,this.reconnectAttempts=0}start(){this.isRunning()||(this.startedAt=J(),delete this.stoppedAt,this.startPolling(),addEventListener("visibilitychange",this.visibilityDidChange),b.log(`ConnectionMonitor started. stale threshold = ${this.constructor.staleThreshold} s`))}stop(){this.isRunning()&&(this.stoppedAt=J(),this.stopPolling(),removeEventListener("visibilitychange",this.visibilityDidChange),b.log("ConnectionMonitor stopped"))}isRunning(){return this.startedAt&&!this.stoppedAt}recordMessage(){this.pingedAt=J()}recordConnect(){this.reconnectAttempts=0,delete this.disconnectedAt,b.log("ConnectionMonitor recorded connect")}recordDisconnect(){this.disconnectedAt=J(),b.log("ConnectionMonitor recorded disconnect")}startPolling(){this.stopPolling(),this.poll()}stopPolling(){clearTimeout(this.pollTimeout)}poll(){this.pollTimeout=setTimeout((()=>{this.reconnectIfStale(),this.poll()}),this.getPollInterval())}getPollInterval(){const{staleThreshold:e,reconnectionBackoffRate:n}=this.constructor,o=Math.pow(1+n,Math.min(this.reconnectAttempts,10)),i=(this.reconnectAttempts===0?1:n)*Math.random();return e*1e3*o*(1+i)}reconnectIfStale(){this.connectionIsStale()&&(b.log(`ConnectionMonitor detected stale connection. reconnectAttempts = ${this.reconnectAttempts}, time stale = ${q(this.refreshedAt)} s, stale threshold = ${this.constructor.staleThreshold} s`),this.reconnectAttempts++,this.disconnectedRecently()?b.log(`ConnectionMonitor skipping reopening recent disconnect. time disconnected = ${q(this.disconnectedAt)} s`):(b.log("ConnectionMonitor reopening"),this.connection.reopen()))}get refreshedAt(){return this.pingedAt?this.pingedAt:this.startedAt}connectionIsStale(){return q(this.refreshedAt)>this.constructor.staleThreshold}disconnectedRecently(){return this.disconnectedAt&&q(this.disconnectedAt)<this.constructor.staleThreshold}visibilityDidChange(){document.visibilityState==="visible"&&setTimeout((()=>{(this.connectionIsStale()||!this.connection.isOpen())&&(b.log(`ConnectionMonitor reopening stale connection on visibilitychange. visibilityState = ${document.visibilityState}`),this.connection.reopen())}),200)}}ae.staleThreshold=6;ae.reconnectionBackoffRate=.15;var ye={message_types:{welcome:"welcome",disconnect:"disconnect",ping:"ping",confirmation:"confirm_subscription",rejection:"reject_subscription"},default_mount_path:"/cable",protocols:["actioncable-v1-json","actioncable-unsupported"]};const{message_types:V,protocols:oe}=ye,bt=oe.slice(0,oe.length-1),he=[].indexOf;class le{constructor(e){this.open=this.open.bind(this),this.consumer=e,this.subscriptions=this.consumer.subscriptions,this.monitor=new ae(this),this.disconnected=!0}send(e){return this.isOpen()?(this.webSocket.send(JSON.stringify(e)),!0):!1}open(){if(this.isActive())return b.log(`Attempted to open WebSocket, but existing socket is ${this.getState()}`),!1;{const e=[...oe,...this.consumer.subprotocols||[]];return b.log(`Opening WebSocket, current state is ${this.getState()}, subprotocols: ${e}`),this.webSocket&&this.uninstallEventHandlers(),this.webSocket=new ee.WebSocket(this.consumer.url,e),this.installEventHandlers(),this.monitor.start(),!0}}close({allowReconnect:e}={allowReconnect:!0}){if(e||this.monitor.stop(),this.isOpen())return this.webSocket.close()}reopen(){if(b.log(`Reopening WebSocket, current state is ${this.getState()}`),this.isActive())try{return this.close()}catch(e){b.log("Failed to reopen WebSocket",e)}finally{b.log(`Reopening WebSocket in ${this.constructor.reopenDelay}ms`),setTimeout(this.open,this.constructor.reopenDelay)}else return this.open()}getProtocol(){if(this.webSocket)return this.webSocket.protocol}isOpen(){return this.isState("open")}isActive(){return this.isState("open","connecting")}triedToReconnect(){return this.monitor.reconnectAttempts>0}isProtocolSupported(){return he.call(bt,this.getProtocol())>=0}isState(...e){return he.call(e,this.getState())>=0}getState(){if(this.webSocket){for(let e in ee.WebSocket)if(ee.WebSocket[e]===this.webSocket.readyState)return e.toLowerCase()}return null}installEventHandlers(){for(let e in this.events){const n=this.events[e].bind(this);this.webSocket[`on${e}`]=n}}uninstallEventHandlers(){for(let e in this.events)this.webSocket[`on${e}`]=function(){}}}le.reopenDelay=500;le.prototype.events={message(t){if(!this.isProtocolSupported())return;const{identifier:e,message:n,reason:o,reconnect:s,type:i}=JSON.parse(t.data);switch(this.monitor.recordMessage(),i){case V.welcome:return this.triedToReconnect()&&(this.reconnectAttempted=!0),this.monitor.recordConnect(),this.subscriptions.reload();case V.disconnect:return b.log(`Disconnecting. Reason: ${o}`),this.close({allowReconnect:s});case V.ping:return null;case V.confirmation:return this.subscriptions.confirmSubscription(e),this.reconnectAttempted?(this.reconnectAttempted=!1,this.subscriptions.notify(e,"connected",{reconnected:!0})):this.subscriptions.notify(e,"connected",{reconnected:!1});case V.rejection:return this.subscriptions.reject(e);default:return this.subscriptions.notify(e,"received",n)}},open(){if(b.log(`WebSocket onopen event, using '${this.getProtocol()}' subprotocol`),this.disconnected=!1,!this.isProtocolSupported())return b.log("Protocol is unsupported. Stopping monitor and disconnecting."),this.close({allowReconnect:!1})},close(t){if(b.log("WebSocket onclose event"),!this.disconnected)return this.disconnected=!0,this.monitor.recordDisconnect(),this.subscriptions.notifyAll("disconnected",{willAttemptReconnect:this.monitor.isRunning()})},error(){b.log("WebSocket onerror event")}};const St=function(t,e){if(e!=null)for(let n in e){const o=e[n];t[n]=o}return t};class xt{constructor(e,n={},o){this.consumer=e,this.identifier=JSON.stringify(n),St(this,o)}perform(e,n={}){return n.action=e,this.send(n)}send(e){return this.consumer.send({command:"message",identifier:this.identifier,data:JSON.stringify(e)})}unsubscribe(){return this.consumer.subscriptions.remove(this)}}class Pt{constructor(e){this.subscriptions=e,this.pendingSubscriptions=[]}guarantee(e){this.pendingSubscriptions.indexOf(e)==-1?(b.log(`SubscriptionGuarantor guaranteeing ${e.identifier}`),this.pendingSubscriptions.push(e)):b.log(`SubscriptionGuarantor already guaranteeing ${e.identifier}`),this.startGuaranteeing()}forget(e){b.log(`SubscriptionGuarantor forgetting ${e.identifier}`),this.pendingSubscriptions=this.pendingSubscriptions.filter((n=>n!==e))}startGuaranteeing(){this.stopGuaranteeing(),this.retrySubscribing()}stopGuaranteeing(){clearTimeout(this.retryTimeout)}retrySubscribing(){this.retryTimeout=setTimeout((()=>{this.subscriptions&&typeof this.subscriptions.subscribe=="function"&&this.pendingSubscriptions.map((e=>{b.log(`SubscriptionGuarantor resubscribing ${e.identifier}`),this.subscriptions.subscribe(e)}))}),500)}}class wt{constructor(e){this.consumer=e,this.guarantor=new Pt(this),this.subscriptions=[]}create(e,n){const o=e,s=typeof o=="object"?o:{channel:o},i=new xt(this.consumer,s,n);return this.add(i)}add(e){return this.subscriptions.push(e),this.consumer.ensureActiveConnection(),this.notify(e,"initialized"),this.subscribe(e),e}remove(e){return this.forget(e),this.findAll(e.identifier).length||this.sendCommand(e,"unsubscribe"),e}reject(e){return this.findAll(e).map((n=>(this.forget(n),this.notify(n,"rejected"),n)))}forget(e){return this.guarantor.forget(e),this.subscriptions=this.subscriptions.filter((n=>n!==e)),e}findAll(e){return this.subscriptions.filter((n=>n.identifier===e))}reload(){return this.subscriptions.map((e=>this.subscribe(e)))}notifyAll(e,...n){return this.subscriptions.map((o=>this.notify(o,e,...n)))}notify(e,n,...o){let s;return typeof e=="string"?s=this.findAll(e):s=[e],s.map((i=>typeof i[n]=="function"?i[n](...o):void 0))}subscribe(e){this.sendCommand(e,"subscribe")&&this.guarantor.guarantee(e)}confirmSubscription(e){b.log(`Subscription confirmed ${e}`),this.findAll(e).map((n=>this.guarantor.forget(n)))}sendCommand(e,n){const{identifier:o}=e;return this.consumer.send({command:n,identifier:o})}}class yt{constructor(e){this._url=e,this.subscriptions=new wt(this),this.connection=new le(this),this.subprotocols=[]}get url(){return Ct(this._url)}send(e){return this.connection.send(e)}connect(){return this.connection.open()}disconnect(){return this.connection.close({allowReconnect:!1})}ensureActiveConnection(){if(!this.connection.isActive())return this.connection.open()}addSubProtocol(e){this.subprotocols=[...this.subprotocols,e]}}function Ct(t){if(typeof t=="function"&&(t=t()),t&&!/^wss?:/i.test(t)){const e=document.createElement("a");return e.href=t,e.href=e.href,e.protocol=e.protocol.replace("http","ws"),e.href}else return t}function _t(t=Rt("url")||ye.default_mount_path){return new yt(t)}function Rt(t){const e=document.head.querySelector(`meta[name='action-cable-${t}']`);if(e)return e.getAttribute("content")}let ge;function At(){return ge??=_t(),ge}const jt=5e3,Ce="railwatch:live-paused";function Tt(t,e){const n=L.c(15);let o;n[0]!==e?(o={},n[0]=e,n[1]=o):o=n[1];const{only:s,onEvent:i}=o,[l,c]=m.useState(!1),[a,d]=m.useState(null),[u,f]=m.useState(null),[h,p]=m.useState(t);h!==t&&(p(t),c(!1),d(null),f(null));const[g,S]=m.useState(Dt),v=m.useRef(s),R=m.useRef(i),A=m.useRef(g);let w;n[2]!==i||n[3]!==s||n[4]!==g?(w=()=>{v.current=s,R.current=i,A.current=g},n[2]=i,n[3]=s,n[4]=g,n[5]=w):w=n[5],m.useEffect(w);const j=m.useRef(kt);let T;n[6]===Symbol.for("react.memo_cache_sentinel")?(T=function(x){A.current=x,localStorage.setItem(Ce,x?"1":"0"),S(x),j.current()},n[6]=T):T=n[6];const I=T;let D,y;n[7]!==t?(D=()=>{let C=!1,x=!1,E=!1,O=-1/0,N,F;const B=function(){x=!1,E=!0,O=Date.now(),se.reload({only:v.current,onCancelToken:G=>{F=()=>G.cancel()},onSuccess:()=>{C||f(Date.now())},onFinish:()=>{F=void 0,E=!1,$()}})};function $(){if(clearTimeout(N),N=void 0,C||!x||E||A.current||document.visibilityState!=="visible")return;const k=jt-(Date.now()-O);k>0?N=setTimeout($,k):B()}const M=function(){$()};document.addEventListener("visibilitychange",M),j.current=$;const W=At().subscriptions.create({channel:"EnvironmentChannel",id:t},{connected:()=>{C||c(!0)},disconnected:()=>{C||c(!1)},received:k=>{C||(d(Date.now()),R.current?.(k),x=!0,$())}});return()=>{C=!0,F?.(),clearTimeout(N),j.current=Ot,document.removeEventListener("visibilitychange",M),W.unsubscribe()}},y=[t],n[7]=t,n[8]=D,n[9]=y):(D=n[8],y=n[9]),m.useEffect(D,y);let _;return n[10]!==l||n[11]!==a||n[12]!==u||n[13]!==g?(_={connected:l,lastEventAt:a,lastRefreshedAt:u,paused:g,setPaused:I},n[10]=l,n[11]=a,n[12]=u,n[13]=g,n[14]=_):_=n[14],_}function Ot(){}function kt(){}function Dt(){return typeof window>"u"?!1:localStorage.getItem(Ce)==="1"}function Et(t){const e=L.c(46),{environmentId:n}=t;Ve();const{environment:o,telemetry_freshness:s}=te().props,{connected:i,lastEventAt:l,lastRefreshedAt:c,paused:a,setPaused:d}=Tt(n);let u;e[0]!==o?.last_seen_at||e[1]!==s?.received_at||e[2]!==l?(u=l!=null?new Date(l).toISOString():s?.received_at??o?.last_seen_at??null,e[0]=o?.last_seen_at,e[1]=s?.received_at,e[2]=l,e[3]=u):u=e[3];const f=u;let h,p,g,S,v;if(e[4]!==i||e[5]!==f||e[6]!==c||e[7]!==a||e[8]!==d){const I=c!=null?new Date(c).toISOString():null;p=ke;const D=a?"Resume live updates":"Pause live updates";let y;e[14]!==a||e[15]!==d?(y=()=>d(!a),e[14]=a,e[15]=d,e[16]=y):y=e[16];let _;e[17]===Symbol.for("react.memo_cache_sentinel")?(_=me(Oe({variant:"outline"}),"hover:bg-accent h-7 cursor-pointer gap-1.5 rounded-md font-mono text-[11px] tracking-wide uppercase"),e[17]=_):_=e[17];const C=i?f:null;let x;e[18]!==C?(x=r.jsx(Je,{lastSeenAt:C,thresholdMs:1e4}),e[18]=C,e[19]=x):x=e[19];const E=a?"Paused":i?"Live":"Disconnected";e[20]!==a||e[21]!==E||e[22]!==D||e[23]!==y||e[24]!==x?(v=r.jsx(De,{asChild:!0,children:r.jsxs("button",{type:"button","aria-pressed":a,"aria-label":D,onClick:y,className:_,children:[x,E]})}),e[20]=a,e[21]=E,e[22]=D,e[23]=y,e[24]=x,e[25]=v):v=e[25],h=Ee;let O;e[26]!==f?(O=f?`Telemetry received ${ne(f)}`:"No telemetry received yet",e[26]=f,e[27]=O):O=e[27],e[28]!==O?(S=r.jsx("p",{children:O}),e[28]=O,e[29]=S):S=e[29],g=I?`Page refreshed ${ne(I)}`:"No live refresh yet",e[4]=i,e[5]=f,e[6]=c,e[7]=a,e[8]=d,e[9]=h,e[10]=p,e[11]=g,e[12]=S,e[13]=v}else h=e[9],p=e[10],g=e[11],S=e[12],v=e[13];let R;e[30]!==g?(R=r.jsx("p",{children:g}),e[30]=g,e[31]=R):R=e[31];let A;e[32]!==s?(A=s?.processing_lag_seconds!=null&&r.jsxs("p",{children:["Ingest processing pending:"," ",Math.round(s.processing_lag_seconds),"s"]}),e[32]=s,e[33]=A):A=e[33];let w;e[34]!==s?(w=s?.aggregated_at&&r.jsxs("p",{children:["Charts updated ",ne(s.aggregated_at)]}),e[34]=s,e[35]=w):w=e[35];let j;e[36]!==h||e[37]!==S||e[38]!==R||e[39]!==A||e[40]!==w?(j=r.jsxs(h,{children:[S,R,A,w]}),e[36]=h,e[37]=S,e[38]=R,e[39]=A,e[40]=w,e[41]=j):j=e[41];let T;return e[42]!==p||e[43]!==v||e[44]!==j?(T=r.jsxs(p,{children:[v,j]}),e[42]=p,e[43]=v,e[44]=j,e[45]=T):T=e[45],T}const _e=[{value:"1h",label:"1 hour"},{value:"6h",label:"6 hours"},{value:"24h",label:"24 hours"},{value:"7d",label:"7 days"},{value:"30d",label:"30 days"}];function $t(t,e){const n={month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"};return`${new Date(t).toLocaleString(void 0,n)} – ${new Date(e).toLocaleString(void 0,n)}`}function Nt(){const t=L.c(8),{window:e,range:n}=te().props,o=e===void 0?"24h":e,s=Mt,i=It;let l;t[0]!==o||t[1]!==n?(l=o==="custom"&&n?$t(n.from,n.to):_e.find(f=>f.value===o)?.label??o,t[0]=o,t[1]=n,t[2]=l):l=t[2];const c=l,a=n?.from,d=n?.to;let u;return t[3]!==o||t[4]!==c||t[5]!==a||t[6]!==d?(u={window:o,from:a,to:d,set:s,setRange:i,label:c},t[3]=o,t[4]=c,t[5]=a,t[6]=d,t[7]=u):u=t[7],u}function It(t,e){const n=new URL(globalThis.location.href);n.searchParams.set("from",t),n.searchParams.set("to",e),n.searchParams.delete("window"),se.visit(n.toString(),{preserveScroll:!0,preserveState:!0})}function Mt(t){const e=new URL(globalThis.location.href);e.searchParams.set("window",t),e.searchParams.delete("from"),e.searchParams.delete("to"),se.visit(e.toString(),{preserveScroll:!0,preserveState:!0})}function Z(t){const e=new Date(t),n=o=>String(o).padStart(2,"0");return`${e.getFullYear()}-${n(e.getMonth()+1)}-${n(e.getDate())}T${n(e.getHours())}:${n(e.getMinutes())}`}function Q(t){const e=new Date(t);return e.setHours(0,0,0,0),e}const Lt=[{label:"Today",range:()=>[Q(new Date),new Date]},{label:"Yesterday",range:()=>{const t=Q(new Date);return[Q(new Date(t.getTime()-1440*60*1e3)),t]}},{label:"This week",range:()=>{const t=Q(new Date);return t.setDate(t.getDate()-t.getDay()),[t,new Date]}}];function Ft(){const t=L.c(48),{window:e,from:n,to:o,set:s,setRange:i,label:l}=Nt(),[c,a]=m.useState(!1);let d;t[0]!==n?(d=()=>Z(n??new Date(Date.now()-864e5).toISOString()),t[0]=n,t[1]=d):d=t[1];const[u,f]=m.useState(d);let h;t[2]!==o?(h=()=>Z(o??new Date().toISOString()),t[2]=o,t[3]=h):h=t[3];const[p,g]=m.useState(h);let S;t[4]!==i?(S=(P,z)=>{f(Z(P.toISOString())),g(Z(z.toISOString())),i(P.toISOString(),z.toISOString()),a(!1)},t[4]=i,t[5]=S):S=t[5];const v=S;let R;t[6]!==v||t[7]!==u||t[8]!==p?(R=()=>{const P=new Date(u),z=new Date(p);!Number.isNaN(P.getTime())&&!Number.isNaN(z.getTime())&&v(P,z)},t[6]=v,t[7]=u,t[8]=p,t[9]=R):R=t[9];const A=R;let w;t[10]!==s||t[11]!==e?(w=_e.map(P=>r.jsx(ue,{active:e===P.value,onClick:()=>s(P.value),"aria-label":P.label,children:P.value},P.value)),t[10]=s,t[11]=e,t[12]=w):w=t[12];const j=e==="custom";let T;t[13]===Symbol.for("react.memo_cache_sentinel")?(T=()=>a(!0),t[13]=T):T=t[13];let I;t[14]===Symbol.for("react.memo_cache_sentinel")?(I=r.jsx($e,{className:"size-3"}),t[14]=I):I=t[14];const D=e==="custom"?l:"Custom";let y;t[15]!==D?(y=r.jsx("span",{className:"hidden sm:inline",children:D}),t[15]=D,t[16]=y):y=t[16];let _;t[17]!==j||t[18]!==y?(_=r.jsx(mt,{asChild:!0,children:r.jsxs(ue,{active:j,onClick:T,"aria-label":"Custom range",className:"px-2",children:[I,y]})}),t[17]=j,t[18]=y,t[19]=_):_=t[19];let C;t[20]!==v?(C=Lt.map(P=>r.jsx(de,{type:"button",variant:"outline",size:"sm",onClick:()=>{const[z,Re]=P.range();v(z,Re)},children:P.label},P.label)),t[20]=v,t[21]=C):C=t[21];let x;t[22]!==C?(x=r.jsx("div",{className:"flex flex-wrap gap-1",children:C}),t[22]=C,t[23]=x):x=t[23];let E;t[24]===Symbol.for("react.memo_cache_sentinel")?(E=r.jsx(pe,{htmlFor:"window-picker-from",className:"text-xs",children:"From"}),t[24]=E):E=t[24];let O;t[25]===Symbol.for("react.memo_cache_sentinel")?(O=P=>f(P.target.value),t[25]=O):O=t[25];let N;t[26]!==u?(N=r.jsx(fe,{id:"window-picker-from",type:"datetime-local",value:u,onChange:O}),t[26]=u,t[27]=N):N=t[27];let F;t[28]===Symbol.for("react.memo_cache_sentinel")?(F=r.jsx(pe,{htmlFor:"window-picker-to",className:"text-xs",children:"To"}),t[28]=F):F=t[28];let B;t[29]===Symbol.for("react.memo_cache_sentinel")?(B=P=>g(P.target.value),t[29]=B):B=t[29];let $;t[30]!==p?($=r.jsx(fe,{id:"window-picker-to",type:"datetime-local",value:p,onChange:B}),t[30]=p,t[31]=$):$=t[31];let M;t[32]!==N||t[33]!==$?(M=r.jsxs("div",{className:"flex flex-col gap-2",children:[E,N,F,$]}),t[32]=N,t[33]=$,t[34]=M):M=t[34];let W;t[35]!==A?(W=r.jsx(de,{type:"button",size:"sm",onClick:A,children:"Apply"}),t[35]=A,t[36]=W):W=t[36];let k;t[37]!==x||t[38]!==M||t[39]!==W?(k=r.jsx(vt,{className:"w-72",align:"end",children:r.jsxs("div",{className:"flex flex-col gap-3",children:[x,M,W]})}),t[37]=x,t[38]=M,t[39]=W,t[40]=k):k=t[40];let G;t[41]!==c||t[42]!==_||t[43]!==k?(G=r.jsxs(gt,{open:c,onOpenChange:a,children:[_,k]}),t[41]=c,t[42]=_,t[43]=k,t[44]=G):G=t[44];let Y;return t[45]!==G||t[46]!==w?(Y=r.jsxs(Ke,{children:[w,G]}),t[45]=G,t[46]=w,t[47]=Y):Y=t[47],Y}function Zt(t){const e=L.c(18),{title:n,description:o,actions:s,withWindow:i}=t,l=i===void 0?!0:i,{environment:c}=te().props;let a;e[0]!==n?(a=r.jsx("h1",{className:"truncate text-xl font-semibold tracking-tight md:text-2xl",children:n}),e[0]=n,e[1]=a):a=e[1];let d;e[2]!==o?(d=o&&r.jsx("p",{className:"text-muted-foreground mt-0.5 text-sm",children:o}),e[2]=o,e[3]=d):d=e[3];let u;e[4]!==a||e[5]!==d?(u=r.jsxs("div",{className:"min-w-0",children:[a,d]}),e[4]=a,e[5]=d,e[6]=u):u=e[6];let f;e[7]!==c?(f=c&&r.jsx(Et,{environmentId:c.id}),e[7]=c,e[8]=f):f=e[8];let h;e[9]!==l?(h=l&&r.jsx(Ft,{}),e[9]=l,e[10]=h):h=e[10];let p;e[11]!==s||e[12]!==f||e[13]!==h?(p=r.jsxs("div",{className:"flex flex-wrap items-center gap-2 md:shrink-0 md:justify-end",children:[f,s,h]}),e[11]=s,e[12]=f,e[13]=h,e[14]=p):p=e[14];let g;return e[15]!==u||e[16]!==p?(g=r.jsxs("div",{className:"flex flex-col gap-3 md:flex-row md:items-start md:justify-between md:gap-4",children:[u,p]}),e[15]=u,e[16]=p,e[17]=g):g=e[17],g}function Qt(t){const e=L.c(18),{title:n,children:o,crumbs:s}=t;let i;e[0]!==s?(i=s===void 0?[]:s,e[0]=s,e[1]=i):i=e[1];const l=i,{environment:c}=te().props;let a;e[2]!==c?(a=c?[{title:c.application_name,href:Ae(c.application_id)},{title:c.name,href:je(c.application_id,c.id)}]:[],e[2]=c,e[3]=a):a=e[3];const d=a;let u;e[4]!==l||e[5]!==n?(u=l.length?l:[{title:n,href:"#"}],e[4]=l,e[5]=n,e[6]=u):u=e[6];let f;e[7]!==d||e[8]!==u?(f=[...d,...u],e[7]=d,e[8]=u,e[9]=f):f=e[9];const h=f,p=c?`${n} · ${c.application_name} ${c.name}`:n;let g;e[10]!==p?(g=r.jsx(Te,{title:p}),e[10]=p,e[11]=g):g=e[11];let S;e[12]!==o?(S=r.jsx("div",{className:"flex flex-1 flex-col gap-4 p-3 md:gap-5 md:p-6",children:o}),e[12]=o,e[13]=S):S=e[13];let v;return e[14]!==h||e[15]!==g||e[16]!==S?(v=r.jsxs(Ne,{breadcrumbs:h,children:[g,S]}),e[14]=h,e[15]=g,e[16]=S,e[17]=v):v=e[17],v}export{Qt as E,Zt as P,gt as a,mt as b,vt as c,Nt as u};
@@ -0,0 +1 @@
1
+ import{ax as e,w as n,ay as h,K as u,t as m}from"./inertia-TViv6kNv.js";function c({applicationId:t,environmentId:r,source:s,executionId:a}){if(!a||s==="browser")return null;switch(s){case"request":return m(t,r,a);case"job":case"job_attempt":return u(t,r,a);case"scheduled_task":return h(t,r,a);case"command":return n(t,r,a);default:return e(t,r,a)}}export{c as e};
@@ -0,0 +1 @@
1
+ import{B as U,c as Y,r as I,j as s,a5 as Z}from"./inertia-TViv6kNv.js";import{B as ee}from"./badge-Daw4Hvr8.js";import{B as te}from"./app-wordmark-nbjkzxwQ.js";import{f as V,g as G,e as se,s as ne,m as le,l as oe}from"./app-layout-yh-sPWgK.js";import{a as ae,b as ie,c as re}from"./env-layout-DrT8rO6P.js";const ce=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],me=U("funnel",ce),de=/^([a-z_]+):(\S+)$/;function fe(m){const e=[],l={};for(const a of m.trim().split(/\s+/)){if(!a)continue;const o=de.exec(a);o?l[o[1]]=o[2]:e.push(a)}return{text:e.join(" "),fields:l}}function H(m){const e=Object.entries(m.fields).map(([l,a])=>`${l}:${a}`);return m.text&&e.push(m.text),e.join(" ")}function be(m){const e=Y.c(57),{value:l,fields:a,onChange:o,placeholder:K}=m,$=K===void 0?"Filter...":K,[i,z]=I.useState(l),[R,D]=I.useState(!1),[M,W]=I.useState(l);l!==M&&(W(l),z(l));let f,x,p,u,h,r,j,b,y,g,_,c,v;if(e[0]!==i||e[1]!==a||e[2]!==o||e[3]!==R||e[4]!==$||e[5]!==l){const B=fe(l),X=t=>{const n={...B.fields};delete n[t];const d=H({text:B.text,fields:n});z(d),o(d)},J=(t,n)=>{const d=H({text:B.text,fields:{...B.fields,[t]:n}});z(d),o(d),D(!1)};let E;e[19]===Symbol.for("react.memo_cache_sentinel")?(E=t=>{z(n=>`${n}${n&&!n.endsWith(" ")?" ":""}${t}:`),D(!1)},e[19]=E):E=e[19];const Q=E;let O;e[20]!==i||e[21]!==o?(O=()=>o(i),e[20]=i,e[21]=o,e[22]=O):O=e[22];const w=O;v="flex flex-wrap items-center gap-2";let A;e[23]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(se,{className:"text-muted-foreground size-3.5 shrink-0"}),e[23]=A):A=e[23];let q;e[24]===Symbol.for("react.memo_cache_sentinel")?(q=t=>z(t.target.value),e[24]=q):q=e[24];let T;e[25]!==w?(T=t=>t.key==="Enter"&&w(),e[25]=w,e[26]=T):T=e[26];let L;e[27]!==w||e[28]!==i||e[29]!==$||e[30]!==T?(L=s.jsx("input",{"data-filter-bar-input":!0,value:i,onChange:q,onKeyDown:T,onBlur:w,placeholder:$,className:"placeholder:text-muted-foreground min-w-0 flex-1 bg-transparent font-mono text-xs outline-none"}),e[27]=w,e[28]=i,e[29]=$,e[30]=T,e[31]=L):L=e[31];let P;e[32]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx("kbd",{className:"bg-muted text-muted-foreground hidden rounded px-1 font-mono text-[10px] md:inline",children:"/"}),e[32]=P):P=e[32],h=s.jsxs("div",{className:"bg-card focus-within:border-ring flex h-8 min-w-0 flex-1 items-center gap-1.5 rounded-md border px-2 md:max-w-md md:flex-none md:basis-80",children:[A,Object.entries(B.fields).map(t=>{const[n,d]=t;return s.jsxs(ee,{variant:"secondary",className:"shrink-0 gap-1 rounded-sm px-1.5 font-mono text-[10px]",children:[n,":",d,s.jsx("button",{type:"button",onClick:()=>X(n),className:"hover:text-destructive","aria-label":`Remove ${n} filter`,children:s.jsx(Z,{className:"size-3"})})]},n)}),L,P]}),u=ae,g=R,_=D,e[33]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(ie,{asChild:!0,children:s.jsx(te,{type:"button",variant:"outline",size:"sm",className:"h-8 px-2","aria-label":"Add filter",children:s.jsx(me,{className:"size-3.5"})})}),e[33]=c):c=e[33],p=re,b="w-56 p-0",y="start",x=ne,f=le,e[34]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(oe,{children:"No fields."}),e[34]=r):r=e[34],j=a.map(t=>t.options?s.jsx(V,{heading:t.label,children:t.options.map(n=>s.jsx(G,{onSelect:()=>J(t.key,n),children:n},n))},t.key):s.jsx(V,{heading:t.label,children:s.jsxs(G,{onSelect:()=>Q(t.key),children:[t.key,":…"]})},t.key)),e[0]=i,e[1]=a,e[2]=o,e[3]=R,e[4]=$,e[5]=l,e[6]=f,e[7]=x,e[8]=p,e[9]=u,e[10]=h,e[11]=r,e[12]=j,e[13]=b,e[14]=y,e[15]=g,e[16]=_,e[17]=c,e[18]=v}else f=e[6],x=e[7],p=e[8],u=e[9],h=e[10],r=e[11],j=e[12],b=e[13],y=e[14],g=e[15],_=e[16],c=e[17],v=e[18];let k;e[35]!==f||e[36]!==r||e[37]!==j?(k=s.jsxs(f,{children:[r,j]}),e[35]=f,e[36]=r,e[37]=j,e[38]=k):k=e[38];let N;e[39]!==x||e[40]!==k?(N=s.jsx(x,{children:k}),e[39]=x,e[40]=k,e[41]=N):N=e[41];let S;e[42]!==p||e[43]!==N||e[44]!==b||e[45]!==y?(S=s.jsx(p,{className:b,align:y,children:N}),e[42]=p,e[43]=N,e[44]=b,e[45]=y,e[46]=S):S=e[46];let C;e[47]!==u||e[48]!==S||e[49]!==g||e[50]!==_||e[51]!==c?(C=s.jsxs(u,{open:g,onOpenChange:_,children:[c,S]}),e[47]=u,e[48]=S,e[49]=g,e[50]=_,e[51]=c,e[52]=C):C=e[52];let F;return e[53]!==h||e[54]!==C||e[55]!==v?(F=s.jsxs("div",{className:v,children:[h,C]}),e[53]=h,e[54]=C,e[55]=v,e[56]=F):F=e[56],F}export{be as F,fe as p,H as s};
@@ -0,0 +1,2 @@
1
+ import{r as j,j as o,C,c as $}from"./inertia-TViv6kNv.js";import{D as E}from"./data-table-iv1bdF6u.js";import{S as V,a as z}from"./segmented-h1VdDTqE.js";import{I as W}from"./label-COUKWqE_.js";import{c as M,p as T}from"./format-B9SDkrWj.js";function L(s){let e=0;const t=a=>({id:e++,name:a,value:0,self:0,children:[]}),n=t("all"),m=new Map;for(const a of s.split(`
2
+ `)){const f=a.trim(),x=f.lastIndexOf(" ");if(x<=0)continue;const i=Number(f.slice(x+1));if(!Number.isFinite(i)||i<=0)continue;const r=f.slice(0,x).split(";").filter(u=>u.length>0);if(r.length===0)continue;n.value+=i;let c=n,h="";for(const u of r){h+=";"+u;let d=m.get(h);d||(d=t(u),c.children.push(d),m.set(h,d)),d.value+=i,c=d}c.self+=i}return n}function A(s,e){const t=[],n=s.value>0?e/s.value:0,m=(a,f,x,i)=>{t.push({id:a.id,node:a,x:f,width:a.value*n,depth:x,parentValue:i});let r=f;for(const c of a.children)m(c,r,x+1,a.value),r+=c.value*n};return m(s,0,0,s.value),t}function F(s){const e=new Map,t=(n,m)=>{if(!m){const a=e.get(n.name)??{name:n.name,self:0,total:0};a.self+=n.self,a.total+=n.value,e.set(n.name,a)}for(const a of n.children)t(a,!1)};return t(s,!0),e}function B(s,e){return[...F(s).values()].sort((t,n)=>n.self-t.self||n.total-t.total).slice(0,e)}function D(s,e){return[...F(s).values()].sort((t,n)=>n.total-t.total||n.self-t.self).slice(0,e)}function H(s,e){const t=new Set,n=e.trim().toLowerCase();if(n==="")return t;const m=a=>{a.name.toLowerCase().includes(n)&&t.add(a.id);for(const f of a.children)m(f)};return m(s),t}const y=18,R=15;function X(s){const e=s.lastIndexOf(" ("),t=e>=0?s.slice(e+2):"";return/^(app|lib|config|db|engines)\//.test(t)}function q(s){let e=0;for(let t=0;t<s.length;t++)e=e*31+s.charCodeAt(t)|0;return Math.abs(e)}function K(s){const e=q(s);return X(s)?`hsl(${[24,34,14,44,4][e%5]} 78% ${52+e%3*6}%)`:`hsl(${[215,220,210][e%3]} 14% ${58+e%3*7}%)`}function Q(s,e){const t=Math.floor((e-8)/5.6);return t<4?"":s.length<=t?s:s.slice(0,t-1)+"…"}function Y(s){const e=$.c(30),{rect:t,total:n,x:m,y:a}=s,f=Math.max(0,m-8),x=a+14;let i;e[0]!==f||e[1]!==x?(i={left:f,top:x},e[0]=f,e[1]=x,e[2]=i):i=e[2];let r;e[3]!==t.node.name?(r=o.jsx("div",{className:"font-mono text-[11px] break-all",children:t.node.name}),e[3]=t.node.name,e[4]=r):r=e[4];let c;e[5]!==t.node.value?(c=M(t.node.value),e[5]=t.node.value,e[6]=c):c=e[6];let h;e[7]!==c?(h=o.jsxs("span",{children:[c," samples"]}),e[7]=c,e[8]=h):h=e[8];let u;e[9]!==t.node.value||e[10]!==n?(u=T(t.node.value,n),e[9]=t.node.value,e[10]=n,e[11]=u):u=e[11];let d;e[12]!==u?(d=o.jsxs("span",{children:[u," of total"]}),e[12]=u,e[13]=d):d=e[13];let p;e[14]!==t.node.value||e[15]!==t.parentValue?(p=T(t.node.value,t.parentValue),e[14]=t.node.value,e[15]=t.parentValue,e[16]=p):p=e[16];let w;e[17]!==p?(w=o.jsxs("span",{children:[p," of parent"]}),e[17]=p,e[18]=w):w=e[18];let v;e[19]!==t.node.self?(v=t.node.self>0&&o.jsxs("span",{children:[M(t.node.self)," self"]}),e[19]=t.node.self,e[20]=v):v=e[20];let b;e[21]!==w||e[22]!==v||e[23]!==h||e[24]!==d?(b=o.jsxs("div",{className:"text-muted-foreground mt-1 flex flex-wrap gap-x-3 font-mono text-[10px] tabular-nums",children:[h,d,w,v]}),e[21]=w,e[22]=v,e[23]=h,e[24]=d,e[25]=b):b=e[25];let N;return e[26]!==b||e[27]!==i||e[28]!==r?(N=o.jsxs("div",{className:"bg-popover text-popover-foreground pointer-events-none absolute z-10 max-w-[min(22rem,90vw)] rounded-md border p-2 shadow-md",style:i,children:[r,b]}),e[26]=b,e[27]=i,e[28]=r,e[29]=N):N=e[29],N}function _({collapsed:s,className:e}){const t=j.useMemo(()=>L(s),[s]),[n,m]=j.useState(""),[a,f]=j.useState("self"),[x,i]=j.useState({tree:t,zoom:[],hovered:null}),r=x.tree===t?x:{tree:t,zoom:[],hovered:null},c=r.zoom,h=j.useRef(null),[u,d]=j.useState(0);j.useEffect(()=>{const l=h.current;if(!l)return;d(l.clientWidth);const g=new ResizeObserver(([k])=>d(k.contentRect.width));return g.observe(l),()=>g.disconnect()},[]);const p=c[c.length-1]??t,w=j.useMemo(()=>A(p,u),[p,u]),v=j.useMemo(()=>H(t,n),[t,n]),b=j.useMemo(()=>a==="self"?B(p,R):D(p,R),[p,a]),N=w.reduce((l,g)=>Math.max(l,g.depth),0),O=v.size>0;return t.value===0?o.jsx("p",{className:"text-muted-foreground py-6 text-center text-sm",children:"This profile recorded no samples."}):o.jsxs("div",{className:C("space-y-3",e),children:[o.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[o.jsx(W,{value:n,onChange:l=>m(l.target.value),placeholder:"Search frames",className:"h-8 max-w-56 font-mono text-xs","aria-label":"Search frames"}),n!==""&&o.jsxs("span",{className:"text-muted-foreground font-mono text-[11px]",children:[v.size," match",v.size===1?"":"es"]}),o.jsx("div",{className:"ml-auto flex flex-wrap items-center gap-1 font-mono text-[11px]",children:[t,...c].map((l,g)=>o.jsxs("span",{className:"flex items-center gap-1",children:[g>0&&o.jsx("span",{className:"text-muted-foreground",children:"/"}),o.jsx("button",{type:"button",onClick:()=>i({...r,zoom:c.slice(0,g)}),disabled:g===c.length,className:C("max-w-40 truncate",g===c.length?"text-foreground font-semibold":"text-muted-foreground hover:underline"),children:l.name})]},l.id))})]}),o.jsxs("div",{ref:h,className:"bg-muted/20 relative overflow-hidden rounded-lg border",onMouseLeave:()=>i({...r,hovered:null}),children:[o.jsx("svg",{width:u,height:(N+1)*y,role:"img","aria-label":`Flamegraph of ${t.value} samples`,children:w.map(l=>{const g=Q(l.node.name,l.width);return o.jsxs("g",{onClick:()=>i({...r,zoom:[...c,...I(p,l.node)]}),onMouseMove:k=>{const S=h.current?.getBoundingClientRect();i({...r,hovered:{rect:l,x:k.clientX-(S?.left??0),y:k.clientY-(S?.top??0)}})},className:"cursor-pointer",children:[o.jsx("rect",{x:l.x,y:l.depth*y,width:Math.max(0,l.width-1),height:y-1,rx:2,fill:K(l.node.name),opacity:O?v.has(l.id)?1:.18:r.hovered?.rect.id===l.id?1:.88,stroke:v.has(l.id)?"currentColor":"none",strokeWidth:1}),g!==""&&o.jsx("text",{x:l.x+4,y:l.depth*y+y/2,dominantBaseline:"central",className:"pointer-events-none fill-black/85 font-mono text-[10px]",children:g})]},l.id)})}),r.hovered&&o.jsx(Y,{rect:r.hovered.rect,total:t.value,x:r.hovered.x,y:r.hovered.y})]}),o.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[o.jsx("h3",{className:"label-caps",children:"Hottest frames"}),o.jsxs(V,{children:[o.jsx(z,{active:a==="self",onClick:()=>f("self"),children:"Self"}),o.jsx(z,{active:a==="total",onClick:()=>f("total"),children:"Total"})]})]}),o.jsx(E,{rows:b,rowKey:l=>l.name,empty:"No frames in this view.",columns:[{key:"name",header:"Frame",className:"max-w-0",cell:l=>o.jsx("span",{className:"block truncate font-mono text-xs",title:l.name,children:l.name})},{key:"self",header:"Self",align:"right",cell:l=>o.jsx("span",{className:a==="self"?"font-semibold":"",children:M(l.self)})},{key:"total",header:"Total",align:"right",cell:l=>o.jsx("span",{className:a==="total"?"font-semibold":"",children:M(l.total)})}]})]})}function I(s,e){if(s===e)return[];for(const t of s.children){const n=I(t,e);if(n.length>0||t===e)return[t,...n]}return[]}export{_ as F};
@@ -0,0 +1 @@
1
+ function n(r,t=1){return r==null?"–":r>=1e3?`${(r/1e3).toFixed(2)}s`:r<1&&r>0?`${(r*1e3).toFixed(0)}µs`:`${r.toFixed(t)}ms`}function i(r){return r==null?"–":r>=1e6?`${(r/1e6).toFixed(1)}M`:r>=1e4?`${(r/1e3).toFixed(1)}k`:r.toLocaleString()}function e(r){return r?r>=1<<30?`${(r/(1<<30)).toFixed(1)} GB`:r>=1<<20?`${(r/(1<<20)).toFixed(1)} MB`:r>=1024?`${(r/1024).toFixed(1)} KB`:`${r} B`:"–"}function o(r){return r==null?"–":r===0?"$0":r<.01?`$${r.toFixed(4)}`:r<1e3?`$${r.toFixed(2)}`:`$${Math.round(r).toLocaleString()}`}function f(r,t){return t?`${(r/t*100).toFixed(1)}%`:"0%"}function d(r){if(!r)return"never";const t=(Date.now()-new Date(r).getTime())/1e3;return t<60?`${Math.max(0,Math.floor(t))}s ago`:t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:`${Math.floor(t/86400)}d ago`}function u(r){return r?new Date(r).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"–"}function c(r,t){return t==="failed"?"destructive":t==="processed"?"success":r?r>=500?"destructive":r>=400?"warning":r>=300?"muted":"success":"muted"}export{d as a,e as b,i as c,n as m,f as p,c as s,o as u,u as w};
@@ -0,0 +1 @@
1
+ import{B as S,c as _,u as C,C as N,j as s,r as w}from"./inertia-TViv6kNv.js";import{s as E}from"./source-link-B2183i2-.js";import{B as $}from"./badge-Daw4Hvr8.js";const q=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]],Z=S("clipboard-copy",q);const M=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],F=S("external-link",M);function A(m){const e=_.c(26),{location:t,deploy:o,className:l}=m,{auth:r,environment:n}=C().props;let x,c,a;if(e[0]!==r||e[1]!==l||e[2]!==o||e[3]!==n?.default_branch||e[4]!==n?.repository_url||e[5]!==t){c=Symbol.for("react.early_return_sentinel");e:{const g=/^(.*):(\d+)$/.exec(t);if(a=g?E({file:g[1],line:Number(g[2]),repositoryUrl:n?.repository_url,ref:o,defaultBranch:n?.default_branch,editor:r.user.editor,editorRoot:r.user.editor_root}):null,!a){let d;e[9]!==l?(d=N("truncate font-mono text-xs",l),e[9]=l,e[10]=d):d=e[10];let j;e[11]!==t||e[12]!==d?(j=s.jsx("span",{className:d,children:t}),e[11]=t,e[12]=d,e[13]=j):j=e[13],c=j;break e}x=a.startsWith("http")}e[0]=r,e[1]=l,e[2]=o,e[3]=n?.default_branch,e[4]=n?.repository_url,e[5]=t,e[6]=x,e[7]=c,e[8]=a}else x=e[6],c=e[7],a=e[8];if(c!==Symbol.for("react.early_return_sentinel"))return c;const b=x;let i;e[14]!==b?(i=b?{target:"_blank",rel:"noreferrer"}:{},e[14]=b,e[15]=i):i=e[15];let f;e[16]!==l?(f=N("inline-flex min-w-0 items-center gap-1 font-mono text-xs hover:underline",l),e[16]=l,e[17]=f):f=e[17];let h;e[18]!==t?(h=s.jsx("span",{className:"truncate",children:t}),e[18]=t,e[19]=h):h=e[19];let u;e[20]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(F,{className:"size-3 shrink-0 opacity-60"}),e[20]=u):u=e[20];let p;return e[21]!==i||e[22]!==f||e[23]!==h||e[24]!==a?(p=s.jsxs("a",{href:a,...i,className:f,children:[h,u]}),e[21]=i,e[22]=f,e[23]=h,e[24]=a,e[25]=p):p=e[25],p}const H=/-[A-Za-z0-9_-]{8,}\.(?:js|mjs|cjs|css)$/;function O(m){const e=_.c(36),{frame:t,deploy:o,open:l,onToggle:r}=m;let n;e[0]!==t.code?(n=t.code?Object.entries(t.code):[],e[0]=t.code,e[1]=n):n=e[1];const x=n;let c;e[2]!==t.file||e[3]!==t.in_app?(c=t.in_app&&!H.test(t.file),e[2]=t.file,e[3]=t.in_app,e[4]=c):c=e[4];const a=c,b=t.in_app?"bg-background":"bg-muted/40";let i;e[5]!==b?(i=N("border-b last:border-b-0",b),e[5]=b,e[6]=i):i=e[6];let f;e[7]!==o||e[8]!==t.file||e[9]!==t.line||e[10]!==a?(f=a&&s.jsx(A,{location:`${t.file}:${t.line}`,deploy:o}),e[7]=o,e[8]=t.file,e[9]=t.line,e[10]=a,e[11]=f):f=e[11];let h;e[12]!==t.file||e[13]!==t.line||e[14]!==a?(h=!a&&s.jsxs("span",{className:"text-muted-foreground truncate",children:[t.file,":",t.line]}),e[12]=t.file,e[13]=t.line,e[14]=a,e[15]=h):h=e[15];let u;e[16]!==t.function?(u=s.jsxs("span",{className:"text-muted-foreground ml-auto truncate",children:["in ",t.function]}),e[16]=t.function,e[17]=u):u=e[17];let p;e[18]!==t.in_app?(p=t.in_app&&s.jsx($,{variant:"outline",className:"shrink-0 text-[10px]",children:"app"}),e[18]=t.in_app,e[19]=p):p=e[19];let g;e[20]!==r||e[21]!==h||e[22]!==u||e[23]!==p?(g=s.jsxs("button",{type:"button",onClick:r,className:"flex min-w-0 flex-1 items-center gap-2 text-left",children:[h,u,p]}),e[20]=r,e[21]=h,e[22]=u,e[23]=p,e[24]=g):g=e[24];let d;e[25]!==f||e[26]!==g?(d=s.jsxs("div",{className:"hover:bg-muted/60 flex w-full items-center gap-2 px-3 py-1.5 font-mono text-xs",children:[f,g]}),e[25]=f,e[26]=g,e[27]=d):d=e[27];let j;e[28]!==t.line||e[29]!==x||e[30]!==l?(j=l&&x.length>0&&s.jsx("pre",{className:"bg-muted/60 overflow-x-auto px-3 py-2 font-mono text-xs leading-5",children:x.map(v=>{const[k,B]=v;return s.jsxs("div",{className:N("flex gap-3 border-l-2 border-transparent pl-2",Number(k)===t.line&&"border-destructive bg-destructive/10 font-semibold"),children:[s.jsx("span",{className:"text-muted-foreground w-10 shrink-0 text-right select-none",children:k}),s.jsx("span",{className:"whitespace-pre",children:B})]},k)})}),e[28]=t.line,e[29]=x,e[30]=l,e[31]=j):j=e[31];let y;return e[32]!==d||e[33]!==j||e[34]!==i?(y=s.jsxs("div",{className:i,children:[d,j]}),e[32]=d,e[33]=j,e[34]=i,e[35]=y):y=e[35],y}function z(m){const e=_.c(22),{frames:t,deploy:o}=m;let l,r;if(e[0]!==t){const d=t.flatMap(R);l=w.useState,r=new Set(d.length>0?d:[0]),e[0]=t,e[1]=l,e[2]=r}else l=e[1],r=e[2];const[n,x]=l(r),[c,a]=w.useState(!1);let b;e[3]!==t||e[4]!==c?(b=c?t:t.filter(L),e[3]=t,e[4]=c,e[5]=b):b=e[5];const i=b;let f;e[6]===Symbol.for("react.memo_cache_sentinel")?(f=function(j){x(y=>{const v=new Set(y);return v.has(j)?v.delete(j):v.add(j),v})},e[6]=f):f=e[6];const h=f;let u;if(e[7]!==o||e[8]!==t||e[9]!==n||e[10]!==i){let d;e[12]!==o||e[13]!==t||e[14]!==n?(d=j=>{const y=t.indexOf(j);return s.jsx(O,{frame:j,deploy:o,open:n.has(y),onToggle:()=>h(y)},y)},e[12]=o,e[13]=t,e[14]=n,e[15]=d):d=e[15],u=i.map(d),e[7]=o,e[8]=t,e[9]=n,e[10]=i,e[11]=u}else u=e[11];let p;e[16]!==t.length||e[17]!==i.length?(p=i.length<t.length&&s.jsxs("button",{type:"button",className:"text-muted-foreground w-full px-3 py-1.5 text-left text-xs hover:underline",onClick:()=>a(!0),children:["Show ",t.length-i.length," framework frames"]}),e[16]=t.length,e[17]=i.length,e[18]=p):p=e[18];let g;return e[19]!==u||e[20]!==p?(g=s.jsxs("div",{className:"overflow-hidden rounded-lg border",children:[u,p]}),e[19]=u,e[20]=p,e[21]=g):g=e[21],g}function L(m,e){return m.in_app||e<3}function R(m,e){return m.in_app?[e]:[]}function G(m){const e=_.c(34),{exception:t,deploy:o}=m;let l;e[0]!==t.class_name?(l=s.jsx("span",{className:"font-mono text-sm font-semibold",children:t.class_name}),e[0]=t.class_name,e[1]=l):l=e[1];const r=t.handled?"secondary":"destructive",n=t.handled?"handled":"unhandled";let x;e[2]!==r||e[3]!==n?(x=s.jsx($,{variant:r,children:n}),e[2]=r,e[3]=n,e[4]=x):x=e[4];let c;e[5]!==t.severity?(c=t.severity&&s.jsx($,{variant:"outline",children:t.severity}),e[5]=t.severity,e[6]=c):c=e[6];let a;e[7]!==t.source?(a=t.source&&s.jsx("span",{className:"text-muted-foreground font-mono text-xs",children:t.source}),e[7]=t.source,e[8]=a):a=e[8];let b;e[9]!==l||e[10]!==x||e[11]!==c||e[12]!==a?(b=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l,x,c,a]}),e[9]=l,e[10]=x,e[11]=c,e[12]=a,e[13]=b):b=e[13];let i;e[14]!==t.message?(i=s.jsx("p",{className:"mt-1 font-mono text-sm break-words",children:t.message}),e[14]=t.message,e[15]=i):i=e[15];let f;e[16]!==t.cause?(f=t.cause&&s.jsxs("p",{className:"text-muted-foreground mt-1 font-mono text-xs",children:["caused by ",t.cause.class,": ",t.cause.message]}),e[16]=t.cause,e[17]=f):f=e[17];let h;e[18]!==b||e[19]!==i||e[20]!==f?(h=s.jsxs("div",{children:[b,i,f]}),e[18]=b,e[19]=i,e[20]=f,e[21]=h):h=e[21];let u;e[22]!==o||e[23]!==t.frames?(u=s.jsx(z,{frames:t.frames,deploy:o}),e[22]=o,e[23]=t.frames,e[24]=u):u=e[24];let p;e[25]!==t.locals?(p=t.locals&&Object.keys(t.locals).length>0&&s.jsxs("div",{className:"overflow-hidden rounded-lg border",children:[s.jsx("div",{className:"label-caps border-b px-3 py-1.5",children:"Local variables at the raise site"}),s.jsx("dl",{className:"grid grid-cols-[max-content_1fr] gap-x-4 gap-y-1 px-3 py-2 font-mono text-xs",children:Object.entries(t.locals).map(T)})]}),e[25]=t.locals,e[26]=p):p=e[26];let g;e[27]!==t.context?(g=t.context&&t.context!=="{}"&&s.jsx("pre",{className:"bg-muted/60 overflow-x-auto rounded-lg p-3 font-mono text-xs",children:t.context}),e[27]=t.context,e[28]=g):g=e[28];let d;return e[29]!==h||e[30]!==u||e[31]!==p||e[32]!==g?(d=s.jsxs("div",{className:"space-y-3",children:[h,u,p,g]}),e[29]=h,e[30]=u,e[31]=p,e[32]=g,e[33]=d):d=e[33],d}function T(m){const[e,t]=m;return s.jsxs(w.Fragment,{children:[s.jsx("dt",{className:"text-muted-foreground",children:e}),s.jsx("dd",{className:"break-all",children:t})]},e)}const I={query:"bg-sky-500",transaction:"bg-sky-300",cache_event:"bg-violet-500",outgoing_request:"bg-orange-500",mail:"bg-pink-500",broadcast:"bg-teal-500",enqueued_job:"bg-amber-500",view_render:"bg-emerald-500",storage_op:"bg-indigo-500",exception:"bg-red-500",log:"bg-neutral-400"};function J(m){const e=_.c(9),{entries:t}=m;if(t.length===0)return null;let o;e[0]!==t.length?(o=s.jsxs("div",{className:"label-caps border-b px-3 py-1.5",children:["Breadcrumbs · ",t.length," events before the exception"]}),e[0]=t.length,e[1]=o):o=e[1];let l;e[2]!==t?(l=t.map(U),e[2]=t,e[3]=l):l=e[3];let r;e[4]!==l?(r=s.jsx("ol",{className:"divide-y",children:l}),e[4]=l,e[5]=r):r=e[5];let n;return e[6]!==o||e[7]!==r?(n=s.jsxs("div",{className:"overflow-hidden rounded-lg border",children:[o,r]}),e[6]=o,e[7]=r,e[8]=n):n=e[8],n}function U(m){return s.jsxs("li",{className:"grid grid-cols-[3.5rem_5rem_1fr_4rem] items-center gap-2 px-3 py-1 font-mono text-xs",children:[s.jsxs("span",{className:"text-muted-foreground tabular-nums",children:["+",m.offset.toFixed(1),"ms"]}),s.jsxs("span",{className:"text-muted-foreground flex items-center gap-1.5 truncate",children:[s.jsx("span",{className:N("inline-block size-1.5 shrink-0 rounded-full",I[m.type]??"bg-neutral-500")}),m.type.replace("_"," ")]}),s.jsx("span",{className:"truncate",children:m.label}),s.jsx("span",{className:"text-muted-foreground text-right tabular-nums",children:m.duration!=null?`${m.duration.toFixed(1)}ms`:""})]},`${m.type}-${m.id}`)}const D={console:"bg-red-500",click:"bg-violet-500",navigate:"bg-sky-500"};function K(m){const e=_.c(12),{crumbs:t}=m;if(t.length===0)return null;const o=t[0].at;let l;e[0]!==t.length?(l=s.jsxs("div",{className:"label-caps border-b px-3 py-1.5",children:["Breadcrumbs · ",t.length," events before the error"]}),e[0]=t.length,e[1]=l):l=e[1];let r;if(e[2]!==t||e[3]!==o){let c;e[5]!==o?(c=(a,b)=>s.jsxs("li",{className:"grid grid-cols-[3.5rem_5rem_1fr] items-center gap-2 px-3 py-1 font-mono text-xs",children:[s.jsxs("span",{className:"text-muted-foreground tabular-nums",children:["+",((a.at-o)/1e3).toFixed(1),"s"]}),s.jsxs("span",{className:"text-muted-foreground flex items-center gap-1.5 truncate",children:[s.jsx("span",{className:N("inline-block size-1.5 shrink-0 rounded-full",D[a.kind]??"bg-neutral-500")}),a.kind]}),s.jsx("span",{className:"truncate",children:a.text})]},`${a.at}-${a.kind}-${b}`),e[5]=o,e[6]=c):c=e[6],r=t.map(c),e[2]=t,e[3]=o,e[4]=r}else r=e[4];let n;e[7]!==r?(n=s.jsx("ol",{className:"divide-y",children:r}),e[7]=r,e[8]=n):n=e[8];let x;return e[9]!==l||e[10]!==n?(x=s.jsxs("div",{className:"overflow-hidden rounded-lg border",children:[l,n]}),e[9]=l,e[10]=n,e[11]=x):x=e[11],x}export{J as B,Z as C,G as E,A as S,K as a};
@@ -0,0 +1 @@
1
+ import{c as h,j as t}from"./inertia-TViv6kNv.js";import{B as p}from"./app-wordmark-nbjkzxwQ.js";import{S as x}from"./separator-BwwTYtCF.js";function j(m){const e=h.c(6);let n,s,i,a;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1Z",fill:"#4285F4"}),s=t.jsx("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.99.66-2.25 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.85A11 11 0 0 0 12 23Z",fill:"#34A853"}),i=t.jsx("path",{d:"M5.84 14.09A6.6 6.6 0 0 1 5.5 12c0-.73.13-1.43.34-2.09V7.06H2.18A11 11 0 0 0 1 12c0 1.77.42 3.45 1.18 4.94l3.66-2.85Z",fill:"#FBBC05"}),a=t.jsx("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1a11 11 0 0 0-9.82 6.06l3.66 2.85C6.71 7.31 9.14 5.38 12 5.38Z",fill:"#EA4335"}),e[0]=n,e[1]=s,e[2]=i,e[3]=a):(n=e[0],s=e[1],i=e[2],a=e[3]);let l;return e[4]!==m?(l=t.jsxs("svg",{viewBox:"0 0 24 24",...m,children:[n,s,i,a]}),e[4]=m,e[5]=l):l=e[5],l}function v(){return typeof document>"u"?"":document.querySelector('meta[name="csrf-token"]')?.getAttribute("content")??""}function _(m){const e=h.c(14),{label:n,reauthenticateFor:s,separated:i}=m,a=i===void 0?!0:i;let l;e[0]!==a?(l=a&&t.jsxs("div",{className:"relative text-center text-sm",children:[t.jsx(x,{className:"absolute top-1/2"}),t.jsx("span",{className:"bg-background text-muted-foreground relative px-2",children:"Or"})]}),e[0]=a,e[1]=l):l=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("input",{type:"hidden",name:"authenticity_token",value:v()}),e[2]=u):u=e[2];let o;e[3]!==s?(o=s&&t.jsxs(t.Fragment,{children:[t.jsx("input",{type:"hidden",name:"reauthenticate",value:s}),t.jsx("input",{type:"hidden",name:"prompt",value:"select_account"})]}),e[3]=s,e[4]=o):o=e[4];let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(j,{className:"size-4"}),e[5]=d):d=e[5];let c;e[6]!==n?(c=t.jsxs(p,{type:"submit",variant:"outline",className:"w-full",children:[d,n]}),e[6]=n,e[7]=c):c=e[7];let r;e[8]!==o||e[9]!==c?(r=t.jsxs("form",{method:"post",action:"/auth/google_oauth2",children:[u,o,c]}),e[8]=o,e[9]=c,e[10]=r):r=e[10];let f;return e[11]!==l||e[12]!==r?(f=t.jsxs("div",{className:"grid gap-6",children:[l,r]}),e[11]=l,e[12]=r,e[13]=f):f=e[13],f}export{_ as G};
@@ -0,0 +1 @@
1
+ import{B as H,r as c,j as T,a3 as x}from"./inertia-TViv6kNv.js";const V=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ae=H("check",V);var Y=Object.defineProperty,w=(e,t)=>Y(e,"name",{value:t,configurable:!0}),I=!!(typeof window<"u"&&window.document&&window.document.createElement);function X(e,t,{checkForDefaultPrevented:n=!0}={}){return w(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},"handleEvent")}w(X,"composeEventHandlers");function q(e){if(!I)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}w(q,"getOwnerWindow");function R(e){if(!I)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}w(R,"getOwnerDocument");function $(e,t=!1){const{activeElement:n}=R(e);if(!n?.nodeName)return null;if(j(n)&&n.contentDocument)return $(n.contentDocument.body,t);if(t){const o=n.getAttribute("aria-activedescendant");if(o){const r=R(n).getElementById(o);if(r)return r}}return n}w($,"getActiveElement");function j(e){return e.tagName==="IFRAME"}w(j,"isFrame");var G=Object.defineProperty,S=(e,t)=>G(e,"name",{value:t,configurable:!0});function J(e,t){const n=c.createContext(t);n.displayName=e+"Context";const o=S(i=>{const{children:s,...u}=i,a=c.useMemo(()=>u,Object.values(u));return T.jsx(n.Provider,{value:a,children:s})},"Provider");o.displayName=e+"Provider";function r(i,s={}){const{optional:u=!1}=s,a=c.useContext(n);if(a)return a;if(t!==void 0)return t;if(!u)throw new Error(`\`${i}\` must be used within \`${e}\``)}return S(r,"useContext"),[o,r]}S(J,"createContext");function K(e,t=[]){let n=[];function o(i,s){const u=c.createContext(s);u.displayName=i+"Context";const a=n.length;n=[...n,s];const d=S(f=>{const{scope:v,children:p,...m}=f,E=v?.[e]?.[a]||u,g=c.useMemo(()=>m,Object.values(m));return T.jsx(E.Provider,{value:g,children:p})},"Provider");d.displayName=i+"Provider";function l(f,v,p={}){const{optional:m=!1}=p,E=v?.[e]?.[a]||u,g=c.useContext(E);if(g)return g;if(s!==void 0)return s;if(!m)throw new Error(`\`${f}\` must be used within \`${i}\``)}return S(l,"useContext"),[d,l]}S(o,"createContext");const r=S(()=>{const i=n.map(s=>c.createContext(s));return S(function(u){const a=u?.[e]||i;return c.useMemo(()=>({[`__scope${e}`]:{...u,[e]:a}}),[u,a])},"useScope")},"createScope");return r.scopeName=e,[o,D(r,...t)]}S(K,"createContextScope");function D(...e){const t=e[0];if(e.length===1)return t;const n=S(()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return S(function(i){const s=o.reduce((u,{useScope:a,scopeName:d})=>{const f=a(i)[`__scope${d}`];return{...u,...f}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}S(D,"composeContextScopes");var b=globalThis?.document?c.useLayoutEffect:()=>{},Q=Object.defineProperty,Z=(e,t)=>Q(e,"name",{value:t,configurable:!0}),A=x[" useEffectEvent ".trim().toString()],O=x[" useInsertionEffect ".trim().toString()];function U(e){if(typeof A=="function")return A(e);const t=c.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof O=="function"?O(()=>{t.current=e}):b(()=>{t.current=e}),c.useMemo(()=>((...n)=>t.current?.(...n)),[])}Z(U,"useEffectEvent");var ee=Object.defineProperty,P=(e,t)=>ee(e,"name",{value:t,configurable:!0}),te=x[" useInsertionEffect ".trim().toString()]||b;function ne({prop:e,defaultProp:t,onChange:n=P(()=>{},"onChange"),caller:o}){const[r,i,s]=z({defaultProp:t,onChange:n}),u=e!==void 0,a=u?e:r,d=c.useCallback(l=>{if(u){const f=F(l)?l(e):l;f!==e&&s.current?.(f)}else i(l)},[u,e,i,s]);return[a,d]}P(ne,"useControllableState");function z({defaultProp:e,onChange:t}){const[n,o]=c.useState(e),r=c.useRef(n),i=c.useRef(t);return te(()=>{i.current=t},[t]),c.useEffect(()=>{r.current!==n&&(i.current?.(n),r.current=n)},[n,r]),[n,o,i]}P(z,"useUncontrolledState");function F(e){return typeof e=="function"}P(F,"isFunction");var M=Symbol("RADIX:SYNC_STATE");function re(e,t,n,o){const{prop:r,defaultProp:i,onChange:s,caller:u}=t,a=r!==void 0,d=U(s),l=[{...n,state:i}];o&&l.push(o);const[f,v]=c.useReducer((g,y)=>{if(y.type===M)return{...g,state:y.state};const N=e(g,y);return a&&!Object.is(N.state,g.state)&&d(N.state),N},...l),p=f.state,m=c.useRef(p);c.useEffect(()=>{m.current!==p&&(m.current=p,a||d(p))},[p,m,a]);const E=c.useMemo(()=>r!==void 0?{...f,state:r}:f,[f,r]);return c.useEffect(()=>{a&&!Object.is(r,f.state)&&v({type:M,state:r})},[r,f.state,a]),[E,v]}P(re,"useControllableStateReducer");var oe=Object.defineProperty,h=(e,t)=>oe(e,"name",{value:t,configurable:!0});function W(e,t){return c.useReducer((n,o)=>t[n][o]??n,e)}h(W,"useStateMachine");var fe=h(e=>{const{present:t,children:n}=e,o=L(t),r=typeof n=="function"?n({present:o.isPresent}):c.Children.only(n),i=k(o.ref,B(r));return typeof n=="function"||o.isPresent?c.cloneElement(r,{ref:i}):null},"Presence");function L(e){const[t,n]=c.useState(),o=c.useRef(null),r=c.useRef(e),i=c.useRef("none"),s=c.useRef(void 0),u=e?"mounted":"unmounted",[a,d]=W(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{a==="mounted"?(i.current=s.current??C(o.current),s.current=void 0):i.current="none"},[a]),b(()=>{const l=o.current,f=r.current;if(f!==e){const p=i.current,m=C(l);e?(s.current=m,d("MOUNT")):m==="none"||l?.display==="none"?d("UNMOUNT"):d(f&&p!==m?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,d]),b(()=>{if(t){let l;const f=t.ownerDocument.defaultView??window,v=h(m=>{const g=C(o.current).includes(CSS.escape(m.animationName));if(m.target===t&&g&&(d("ANIMATION_END"),!r.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",l=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},"handleAnimationEnd"),p=h(m=>{m.target===t&&(i.current=C(o.current))},"handleAnimationStart");return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",v),t.addEventListener("animationend",v),()=>{f.clearTimeout(l),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",v),t.removeEventListener("animationend",v)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:c.useCallback(l=>{if(l){const f=getComputedStyle(l);o.current=f,s.current=C(f)}else o.current=null;n(l)},[])}}h(L,"usePresence");function _(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}h(_,"setRef");function k(...e){const t=c.useRef(e);return t.current=e,c.useCallback(n=>{const o=t.current;let r=!1;const i=o.map(s=>{const u=_(s,n);return!r&&typeof u=="function"&&(r=!0),u});if(r)return()=>{for(let s=0;s<i.length;s++){const u=i[s];typeof u=="function"?u():_(o[s],null)}}},[])}h(k,"useStableComposedRefs");function C(e){return e?.animationName||"none"}h(C,"getAnimationName");function B(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}h(B,"getElementRef");var se=Object.defineProperty,ce=(e,t)=>se(e,"name",{value:t,configurable:!0});function ie(e){const[t,n]=c.useState(void 0);return b(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const i=r[0];let s,u;if("borderBoxSize"in i){const a=i.borderBoxSize,d=Array.isArray(a)?a[0]:a;s=d.inlineSize,u=d.blockSize}else s=e.offsetWidth,u=e.offsetHeight;n({width:s,height:u})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}ce(ie,"useSize");export{ae as C,fe as P,X as a,b,K as c,ie as d,ne as u};
@@ -0,0 +1 @@
1
+ import{c as ee,u as re,j as r,e as X,ai as Y,L as ie}from"./inertia-TViv6kNv.js";import{D as ne}from"./chart-panel-Cb4S_ej_.js";import{D as Z}from"./data-table-iv1bdF6u.js";import{F as se}from"./filter-bar-9SU5NrzX.js";import{P as oe,E as le}from"./env-layout-DrT8rO6P.js";import{u as ae,P as ce}from"./percentile-picker-gFZCXtdb.js";import{S as F}from"./sort-header-DpFzXblu.js";import{S as de}from"./sparkline-cell-C3-5vFkP.js";import{B as me}from"./badge-Daw4Hvr8.js";import{e as ue}from"./execution-path-CzgBUi5e.js";import{m as H,c as fe,w as he}from"./format-B9SDkrWj.js";import"./series-chart-DaFPefku.js";import"./chart-hover-Vy52H4uD.js";import"./chart-B14-N9g7.js";import"./empty-state-6j_0AaQQ.js";import"./app-wordmark-nbjkzxwQ.js";import"./app-layout-yh-sPWgK.js";import"./live-dot-ChfUtY3p.js";import"./index-OqI59zPb.js";import"./index-1ol1-QWI.js";import"./checkbox-D3aRSsBj.js";import"./label-COUKWqE_.js";import"./segmented-h1VdDTqE.js";import"./arrow-up-DVtOGdVA.js";function te(t){const e=ee.c(3),{kind:l}=t;if(!l)return null;const o=l==="partial"?"secondary":l==="layout"?"outline":"default";let i;return e[0]!==l||e[1]!==o?(i=r.jsx(me,{variant:o,className:"font-mono",children:l}),e[0]=l,e[1]=o,e[2]=i):i=e[2],i}function Ye(t){const e=ee.c(81),{environment:l,window:o}=re().props,{percentile:i}=ae(),a=l.application_id,c=l.id;let q;e[0]!==a||e[1]!==c||e[2]!==t.dir||e[3]!==t.q||e[4]!==t.sort||e[5]!==o?(q=s=>X.visit(Y(a,c,{window:o,sort:s,dir:t.sort===s&&t.dir==="desc"?"asc":"desc",q:t.q||void 0}),{preserveState:!0}),e[0]=a,e[1]=c,e[2]=t.dir,e[3]=t.q,e[4]=t.sort,e[5]=o,e[6]=q):q=e[6];const n=q;let M;e[7]===Symbol.for("react.memo_cache_sentinel")?(M=r.jsx(oe,{title:"View renders",description:"Every template your app rendered, grouped by identifier.",actions:r.jsx(ce,{})}),e[7]=M):M=e[7];let d;e[8]!==t.series||e[9]!==i?(d=r.jsx(ne,{label:"Duration",data:t.series,percentile:i}),e[8]=t.series,e[9]=i,e[10]=d):d=e[10];let C;e[11]===Symbol.for("react.memo_cache_sentinel")?(C=[{key:"template",label:"Template"}],e[11]=C):C=e[11];let m;e[12]!==a||e[13]!==c||e[14]!==o?(m=s=>X.visit(Y(a,c,{window:o,q:s||void 0}),{preserveState:!0}),e[12]=a,e[13]=c,e[14]=o,e[15]=m):m=e[15];let u;e[16]!==t.q||e[17]!==m?(u=r.jsx(se,{value:t.q,fields:C,onChange:m,placeholder:"template:widgets/_row"}),e[16]=t.q,e[17]=m,e[18]=u):u=e[18];let O,D,E;e[19]===Symbol.for("react.memo_cache_sentinel")?(O={key:"id",header:"Template",grow:!0,cell:Ne},D={key:"kind",hideOnMobile:!0,header:"Kind",cell:Se},E={key:"trend",hideOnMobile:!0,header:"Trend",cell:be},e[19]=O,e[20]=D,e[21]=E):(O=e[19],D=e[20],E=e[21]);const $=t.sort==="count",A=t.dir==="asc"?"asc":"desc";let f;e[22]!==n?(f=()=>n("count"),e[22]=n,e[23]=f):f=e[23];let h;e[24]!==A||e[25]!==f||e[26]!==$?(h={key:"n",header:r.jsx(F,{label:"Count",active:$,dir:A,onClick:f}),align:"right",cell:ve},e[24]=A,e[25]=f,e[26]=$,e[27]=h):h=e[27];const W=t.sort==="avg",z=t.dir==="asc"?"asc":"desc";let x;e[28]!==n?(x=()=>n("avg"),e[28]=n,e[29]=x):x=e[29];let p;e[30]!==W||e[31]!==z||e[32]!==x?(p={key:"avg",hideOnMobile:!0,header:r.jsx(F,{label:"Avg",active:W,dir:z,onClick:x}),align:"right",cell:je},e[30]=W,e[31]=z,e[32]=x,e[33]=p):p=e[33];const G=t.sort===i,J=t.dir==="asc"?"asc":"desc";let y;e[34]!==i||e[35]!==n?(y=()=>n(i),e[34]=i,e[35]=n,e[36]=y):y=e[36];let _;e[37]!==i||e[38]!==G||e[39]!==J||e[40]!==y?(_=r.jsx(F,{label:i,active:G,dir:J,onClick:y}),e[37]=i,e[38]=G,e[39]=J,e[40]=y,e[41]=_):_=e[41];let k;e[42]!==i?(k=s=>r.jsx("span",{className:"font-semibold",children:H(s[i],2)}),e[42]=i,e[43]=k):k=e[43];let g;e[44]!==i||e[45]!==_||e[46]!==k?(g={key:i,header:_,align:"right",cell:k},e[44]=i,e[45]=_,e[46]=k,e[47]=g):g=e[47];const Q=t.sort==="max",U=t.dir==="asc"?"asc":"desc";let w;e[48]!==n?(w=()=>n("max"),e[48]=n,e[49]=w):w=e[49];let j;e[50]!==Q||e[51]!==U||e[52]!==w?(j={key:"max",hideOnMobile:!0,header:r.jsx(F,{label:"Max",active:Q,dir:U,onClick:w}),align:"right",cell:we},e[50]=Q,e[51]=U,e[52]=w,e[53]=j):j=e[53];let v;e[54]!==h||e[55]!==p||e[56]!==g||e[57]!==j?(v=[O,D,E,h,p,g,j],e[54]=h,e[55]=p,e[56]=g,e[57]=j,e[58]=v):v=e[58];let b;e[59]!==t.renders||e[60]!==v?(b=r.jsx(Z,{rows:t.renders,rowKey:Pe,empty:"No view renders in this window.",columns:v}),e[59]=t.renders,e[60]=v,e[61]=b):b=e[61];let B;e[62]===Symbol.for("react.memo_cache_sentinel")?(B=r.jsx("h2",{className:"text-sm font-semibold",children:"Slowest recent renders"}),e[62]=B):B=e[62];let K,T,I,L;e[63]===Symbol.for("react.memo_cache_sentinel")?(K={key:"when",header:"When",className:"w-40",cell:ke},T={key:"id",header:"Template",grow:!0,cell:_e},I={key:"kind",hideOnMobile:!0,header:"Kind",cell:ye},L={key:"layout",hideOnMobile:!0,header:"Layout",cell:pe},e[63]=K,e[64]=T,e[65]=I,e[66]=L):(K=e[63],T=e[64],I=e[65],L=e[66]);let S;e[67]!==a||e[68]!==c?(S={key:"in",hideOnMobile:!0,header:"In",cell:s=>s.execution_id?r.jsx(ie,{className:"font-mono text-xs hover:underline",href:ue({applicationId:a,environmentId:c,source:s.execution_source,executionId:s.execution_id}),children:s.execution_preview}):r.jsx("span",{className:"text-muted-foreground text-xs",children:"–"})},e[67]=a,e[68]=c,e[69]=S):S=e[69];let R;e[70]===Symbol.for("react.memo_cache_sentinel")?(R={key:"d",header:"Duration",align:"right",cell:xe},e[70]=R):R=e[70];let N;e[71]!==S?(N=[K,T,I,L,S,R],e[71]=S,e[72]=N):N=e[72];let P;e[73]!==t.slowest||e[74]!==N?(P=r.jsx(Z,{rows:t.slowest,rowKey:ge,columns:N}),e[73]=t.slowest,e[74]=N,e[75]=P):P=e[75];let V;return e[76]!==d||e[77]!==b||e[78]!==P||e[79]!==u?(V=r.jsxs(le,{title:"View renders",children:[M,d,u,b,B,P]}),e[76]=d,e[77]=b,e[78]=P,e[79]=u,e[80]=V):V=e[80],V}function xe(t){return H(t.duration,2)}function pe(t){return r.jsx("span",{className:"text-muted-foreground font-mono text-xs",children:t.layout??""})}function ye(t){return r.jsx(te,{kind:t.kind})}function _e(t){return r.jsx("span",{className:"font-mono text-xs",children:t.identifier})}function ke(t){return r.jsx("span",{className:"text-xs tabular-nums",children:he(t.occurred_at)})}function ge(t){return t.id}function we(t){return H(t.max,2)}function je(t){return H(t.avg,2)}function ve(t){return fe(t.count)}function be(t){return r.jsx(de,{data:t.sparkline})}function Se(t){return r.jsx(te,{kind:t.kind})}function Ne(t){return r.jsx("span",{className:"font-mono text-xs",children:t.name})}function Pe(t){return t.group_hash}export{Ye as default};
@@ -0,0 +1 @@
1
+ import{c as _,u as x,j as r,e as k,v as b}from"./inertia-TViv6kNv.js";import{V as v}from"./chart-panel-Cb4S_ej_.js";import{D as j}from"./data-table-iv1bdF6u.js";import{E as S}from"./empty-state-6j_0AaQQ.js";import{F as C}from"./filter-bar-9SU5NrzX.js";import{P as E,E as w}from"./env-layout-DrT8rO6P.js";import{S as M}from"./sparkline-cell-C3-5vFkP.js";import{c as f,m as O}from"./format-B9SDkrWj.js";import{L as P}from"./app-layout-yh-sPWgK.js";import"./series-chart-DaFPefku.js";import"./chart-hover-Vy52H4uD.js";import"./chart-B14-N9g7.js";import"./badge-Daw4Hvr8.js";import"./app-wordmark-nbjkzxwQ.js";import"./live-dot-ChfUtY3p.js";import"./index-OqI59zPb.js";import"./index-1ol1-QWI.js";import"./segmented-h1VdDTqE.js";import"./label-COUKWqE_.js";import"./checkbox-D3aRSsBj.js";function ae(t){const e=_.c(19),{environment:y,window:h}=x().props,u=y.application_id,d=y.id;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=r.jsx(E,{title:"Cache",description:"Rails.cache reads, writes, and hit rates by key shape (ids collapsed)."}),e[0]=n):n=e[0];let i;e[1]!==t.series?(i=r.jsx(v,{legend:"cache",label:"Cache ops",seriesLabel:"Cache ops",data:t.series}),e[1]=t.series,e[2]=i):i=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=[{key:"store",label:"Store"}],e[3]=l):l=e[3];let s;e[4]!==u||e[5]!==d||e[6]!==h?(s=g=>k.visit(b(u,d,{window:h,q:g||void 0}),{preserveState:!0}),e[4]=u,e[5]=d,e[6]=h,e[7]=s):s=e[7];let a;e[8]!==t.q||e[9]!==s?(a=r.jsx(C,{value:t.q,fields:l,onChange:s,placeholder:"store:MemoryStore"}),e[8]=t.q,e[9]=s,e[10]=a):a=e[10];let m,c;e[11]===Symbol.for("react.memo_cache_sentinel")?(m=r.jsx(S,{icon:P,title:"No cache activity in this window",description:"Cache reads and writes instrumented by the gem appear here."}),c=[{key:"k",header:"Store · key",cell:F},{key:"trend",hideOnMobile:!0,header:"Trend",cell:D},{key:"n",header:"Ops",align:"right",cell:R},{key:"h",header:"Hits",align:"right",cell:N},{key:"m",hideOnMobile:!0,header:"Misses",align:"right",cell:H},{key:"r",hideOnMobile:!0,header:"Hit rate",align:"right",cell:L},{key:"avg",hideOnMobile:!0,header:"Avg",align:"right",cell:q}],e[11]=m,e[12]=c):(m=e[11],c=e[12]);let o;e[13]!==t.keys?(o=r.jsx(j,{rows:t.keys,rowKey:T,empty:m,columns:c}),e[13]=t.keys,e[14]=o):o=e[14];let p;return e[15]!==i||e[16]!==a||e[17]!==o?(p=r.jsxs(w,{title:"Cache",children:[n,i,a,o]}),e[15]=i,e[16]=a,e[17]=o,e[18]=p):p=e[18],p}function q(t){return O(t.avg,3)}function L(t){return t.hit_rate==null?"–":r.jsxs("span",{className:t.hit_rate<50?"text-amber-600":"",children:[t.hit_rate,"%"]})}function H(t){return f(t.misses)}function N(t){return f(t.hits)}function R(t){return f(t.count)}function D(t){return r.jsx(M,{data:t.sparkline})}function F(t){return r.jsx("span",{className:"font-mono text-xs",children:t.key})}function T(t){return t.group_hash}export{ae as default};
@@ -0,0 +1 @@
1
+ import{c as le,u as ae,j as r,e as oe,ab as ne,a1 as ce,L as de}from"./inertia-TViv6kNv.js";import{C as me}from"./chart-hover-Vy52H4uD.js";import{V as ue,D as fe}from"./chart-panel-Cb4S_ej_.js";import{D as he}from"./data-table-iv1bdF6u.js";import{E as xe}from"./empty-state-6j_0AaQQ.js";import{F as pe}from"./filter-bar-9SU5NrzX.js";import{P as ye,E as ge}from"./env-layout-DrT8rO6P.js";import{u as ve,P as be}from"./percentile-picker-gFZCXtdb.js";import{S as ke,H as je}from"./app-layout-yh-sPWgK.js";import{S as M}from"./sort-header-DpFzXblu.js";import{S as _e}from"./sparkline-cell-C3-5vFkP.js";import{m as re,c as $,p as qe}from"./format-B9SDkrWj.js";import"./series-chart-DaFPefku.js";import"./chart-B14-N9g7.js";import"./badge-Daw4Hvr8.js";import"./app-wordmark-nbjkzxwQ.js";import"./live-dot-ChfUtY3p.js";import"./index-OqI59zPb.js";import"./index-1ol1-QWI.js";import"./segmented-h1VdDTqE.js";import"./label-COUKWqE_.js";import"./checkbox-D3aRSsBj.js";import"./arrow-up-DVtOGdVA.js";function ot(t){const e=le.c(95),{environment:se,window:a}=ae().props,{percentile:o}=ve(),n=se.application_id,c=se.id;let O;e[0]!==n||e[1]!==c||e[2]!==t.dir||e[3]!==t.q||e[4]!==t.sort||e[5]!==a?(O=s=>oe.visit(ne(n,c,{window:a,sort:t.sort,dir:t.dir,q:t.q||void 0,...s}),{preserveState:!0}),e[0]=n,e[1]=c,e[2]=t.dir,e[3]=t.q,e[4]=t.sort,e[5]=a,e[6]=O):O=e[6];const d=O;let H;e[7]!==t.dir||e[8]!==t.sort||e[9]!==d?(H=s=>d({sort:s,dir:t.sort===s&&t.dir==="desc"?"asc":"desc"}),e[7]=t.dir,e[8]=t.sort,e[9]=d,e[10]=H):H=e[10];const i=H;let N;e[11]!==n||e[12]!==c||e[13]!==a?(N=s=>ce(n,c,s.group_hash,{window:a}),e[11]=n,e[12]=c,e[13]=a,e[14]=N):N=e[14];const l=N;let D;e[15]===Symbol.for("react.memo_cache_sentinel")?(D=r.jsx(ye,{title:"Requests",description:"Every route your app served, with error rates and percentiles.",actions:r.jsxs(r.Fragment,{children:[r.jsx(ke,{page:"requests"}),r.jsx(be,{})]})}),e[15]=D):D=e[15];let L;e[16]===Symbol.for("react.memo_cache_sentinel")?(L={key:"method",label:"Method",options:["GET","POST","PUT","PATCH","DELETE"]},e[16]=L):L=e[16];let A;e[17]===Symbol.for("react.memo_cache_sentinel")?(A=[L,{key:"status",label:"Status",options:["2xx","3xx","4xx","5xx"]},{key:"route",label:"Route"}],e[17]=A):A=e[17];let m;e[18]!==d?(m=s=>d({q:s||void 0}),e[18]=d,e[19]=m):m=e[19];let u;e[20]!==t.q||e[21]!==m?(u=r.jsx(pe,{value:t.q,fields:A,onChange:m,placeholder:"method:GET status:5xx route:/widgets"}),e[20]=t.q,e[21]=m,e[22]=u):u=e[22];let f;e[23]!==t.deploys||e[24]!==t.series?(f=r.jsx(ue,{label:"Requests",data:t.series,deploys:t.deploys}),e[23]=t.deploys,e[24]=t.series,e[25]=f):f=e[25];let h;e[26]!==t.deploys||e[27]!==t.series||e[28]!==o?(h=r.jsx(fe,{label:"Latency",data:t.series,deploys:t.deploys,percentile:o}),e[26]=t.deploys,e[27]=t.series,e[28]=o,e[29]=h):h=e[29];let x;e[30]!==f||e[31]!==h?(x=r.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[f,h]}),e[30]=f,e[31]=h,e[32]=x):x=e[32];let F;e[33]===Symbol.for("react.memo_cache_sentinel")?(F=r.jsx(xe,{icon:je,title:"No requests in this window",description:"HTTP requests to your app appear here as they're reported."}),e[33]=F):F=e[33];let p;e[34]!==l?(p={onOpen:(s,ie)=>ie?.newTab?globalThis.window.open(l(s),"_blank"):oe.visit(l(s))},e[34]=l,e[35]=p):p=e[35];let y;e[36]!==l?(y={key:"name",header:"Route",grow:!0,cell:s=>r.jsx(de,{className:"font-mono text-xs hover:underline",href:l(s),title:s.name,children:s.name})},e[36]=l,e[37]=y):y=e[37];let K,V,B;e[38]===Symbol.for("react.memo_cache_sentinel")?(K={key:"trend",hideOnMobile:!0,header:"Trend",cell:Me},V={key:"ok",hideOnMobile:!0,header:"2xx",align:"right",cell:Re},B={key:"4xx",hideOnMobile:!0,header:"4xx",align:"right",cell:Ce},e[38]=K,e[39]=V,e[40]=B):(K=e[38],V=e[39],B=e[40]);const z=t.sort==="errors",I=t.dir==="asc"?"asc":"desc";let g;e[41]!==i?(g=()=>i("errors"),e[41]=i,e[42]=g):g=e[42];let v;e[43]!==z||e[44]!==I||e[45]!==g?(v={key:"5xx",header:r.jsx(M,{label:"5xx",active:z,dir:I,onClick:g}),align:"right",cell:Te},e[43]=z,e[44]=I,e[45]=g,e[46]=v):v=e[46];const J=t.sort==="count",Q=t.dir==="asc"?"asc":"desc";let b;e[47]!==i?(b=()=>i("count"),e[47]=i,e[48]=b):b=e[48];let k;e[49]!==J||e[50]!==Q||e[51]!==b?(k={key:"total",header:r.jsx(M,{label:"Total",active:J,dir:Q,onClick:b}),align:"right",cell:we},e[49]=J,e[50]=Q,e[51]=b,e[52]=k):k=e[52];let G;e[53]===Symbol.for("react.memo_cache_sentinel")?(G={key:"err",hideOnMobile:!0,header:"Error %",align:"right",cell:Ee},e[53]=G):G=e[53];const W=t.sort==="avg",X=t.dir==="asc"?"asc":"desc";let j;e[54]!==i?(j=()=>i("avg"),e[54]=i,e[55]=j):j=e[55];let _;e[56]!==W||e[57]!==X||e[58]!==j?(_={key:"avg",hideOnMobile:!0,header:r.jsx(M,{label:"Avg",active:W,dir:X,onClick:j}),align:"right",cell:Se},e[56]=W,e[57]=X,e[58]=j,e[59]=_):_=e[59];const Y=t.sort===o,Z=t.dir==="asc"?"asc":"desc";let q;e[60]!==o||e[61]!==i?(q=()=>i(o),e[60]=o,e[61]=i,e[62]=q):q=e[62];let P;e[63]!==o||e[64]!==Y||e[65]!==Z||e[66]!==q?(P=r.jsx(M,{label:o,active:Y,dir:Z,onClick:q}),e[63]=o,e[64]=Y,e[65]=Z,e[66]=q,e[67]=P):P=e[67];let S;e[68]!==o?(S=s=>r.jsx("span",{className:"font-semibold",children:re(s[o])}),e[68]=o,e[69]=S):S=e[69];let E;e[70]!==o||e[71]!==P||e[72]!==S?(E={key:o,header:P,align:"right",cell:S},e[70]=o,e[71]=P,e[72]=S,e[73]=E):E=e[73];const ee=t.sort==="max",te=t.dir==="asc"?"asc":"desc";let w;e[74]!==i?(w=()=>i("max"),e[74]=i,e[75]=w):w=e[75];let T;e[76]!==ee||e[77]!==te||e[78]!==w?(T={key:"max",hideOnMobile:!0,header:r.jsx(M,{label:"Max",active:ee,dir:te,onClick:w}),align:"right",cell:Pe},e[76]=ee,e[77]=te,e[78]=w,e[79]=T):T=e[79];let C;e[80]!==y||e[81]!==v||e[82]!==k||e[83]!==_||e[84]!==E||e[85]!==T?(C=[y,K,V,B,v,k,G,_,E,T],e[80]=y,e[81]=v,e[82]=k,e[83]=_,e[84]=E,e[85]=T,e[86]=C):C=e[86];let R;e[87]!==t.routes||e[88]!==p||e[89]!==C?(R=r.jsx(he,{rows:t.routes,rowKey:He,empty:F,hoverKey:Oe,keyboardNav:p,columns:C}),e[87]=t.routes,e[88]=p,e[89]=C,e[90]=R):R=e[90];let U;return e[91]!==x||e[92]!==R||e[93]!==u?(U=r.jsx(ge,{title:"Requests",children:r.jsxs(me,{children:[D,u,x,R]})}),e[91]=x,e[92]=R,e[93]=u,e[94]=U):U=e[94],U}function Pe(t){return re(t.max)}function Se(t){return re(t.avg)}function Ee(t){return qe(t.errors,t.count)}function we(t){return $(t.count)}function Te(t){return r.jsx("span",{className:t.errors?"text-destructive":"",children:$(t.errors)})}function Ce(t){return $(t.client_errors)}function Re(t){return $(t.count-t.errors-t.client_errors)}function Me(t){return r.jsx(_e,{data:t.sparkline,hoverKey:t.group_hash})}function Oe(t){return t.group_hash}function He(t){return t.group_hash}export{ot as default};
@@ -0,0 +1 @@
1
+ import{c as B,u as C,j as n,ay as D,e as R,L as H,i as K}from"./inertia-TViv6kNv.js";import{D as T}from"./data-table-iv1bdF6u.js";import{E as W}from"./empty-state-6j_0AaQQ.js";import{O as I}from"./origin-identity-6q1-CBts.js";import{P as A,E as F}from"./env-layout-DrT8rO6P.js";import{R as J}from"./relative-time-IOOgl5n2.js";import{S as Q}from"./status-badge-8jVV-LA4.js";import{B as $}from"./badge-Daw4Hvr8.js";import{m as P,a as q,w as z}from"./format-B9SDkrWj.js";import{x as G}from"./app-layout-yh-sPWgK.js";import"./chart-hover-Vy52H4uD.js";import"./tenant-path-G-6u9A-o.js";import"./live-dot-ChfUtY3p.js";import"./index-OqI59zPb.js";import"./app-wordmark-nbjkzxwQ.js";import"./index-1ol1-QWI.js";import"./segmented-h1VdDTqE.js";import"./label-COUKWqE_.js";import"./checkbox-D3aRSsBj.js";function Re(t){const e=B.c(42),{environment:M,range:a,window:l}=C().props,s=M.application_id,i=M.id;let k;e[0]!==s||e[1]!==i?(k=r=>D(s,i,r.execution_id),e[0]=s,e[1]=i,e[2]=k):k=e[2];const x=k;let _;e[3]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(A,{title:"Scheduled tasks",description:"Solid Queue recurring tasks from config/recurring.yml: runs, failures, and missed schedules."}),e[3]=_):_=e[3];let o;e[4]!==t.missed?(o=t.missed.length>0&&n.jsx("div",{className:"flex flex-wrap gap-2",children:t.missed.map(de)}),e[4]=t.missed,e[5]=o):o=e[5];let y,g;e[6]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsx(W,{icon:G,title:"No scheduled task has run in this window",description:"Recurring and scheduled job runs appear here as they execute."}),g=[{key:"k",header:"Task",cell:oe},{key:"s",header:"Schedule",cell:le},{key:"next",hideOnMobile:!0,header:"Next run",cell:ae},{key:"n",header:"Runs",align:"right",cell:ie},{key:"f",hideOnMobile:!0,header:"Failed",align:"right",cell:se},{key:"avg",hideOnMobile:!0,header:"Avg",align:"right",cell:re},{key:"last",header:"Last run",align:"right",cell:ne}],e[6]=y,e[7]=g):(y=e[6],g=e[7]);let c;e[8]!==t.tasks?(c=n.jsx(T,{rows:t.tasks,rowKey:ce,empty:y,columns:g}),e[8]=t.tasks,e[9]=c):c=e[9];let j;e[10]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx("h2",{className:"text-sm font-semibold",children:"Recent runs"}),e[10]=j):j=e[10];let d,u;e[11]!==x?(d=r=>R.visit(x(r)),u={onOpen:(r,L)=>L?.newTab?window.open(x(r),"_blank"):R.visit(x(r))},e[11]=x,e[12]=d,e[13]=u):(d=e[12],u=e[13]);let w,b,v,O;e[14]===Symbol.for("react.memo_cache_sentinel")?(O={key:"when",header:"When",cell:ee},w={key:"k",header:"Task",cell:Z},b={key:"job",hideOnMobile:!0,header:"Job",cell:Y},v={key:"o",header:"Outcome",cell:X},e[14]=w,e[15]=b,e[16]=v,e[17]=O):(w=e[14],b=e[15],v=e[16],O=e[17]);let m;e[18]!==s||e[19]!==i||e[20]!==a||e[21]!==l?(m={key:"user",hideOnMobile:!0,header:"Origin user",cell:r=>n.jsx(I,{...r,applicationId:s,environmentId:i,kind:"user",range:a,window:l})},e[18]=s,e[19]=i,e[20]=a,e[21]=l,e[22]=m):m=e[22];let h;e[23]!==s||e[24]!==i||e[25]!==a||e[26]!==l?(h={key:"tenant",hideOnMobile:!0,header:"Origin tenant",cell:r=>n.jsx(I,{...r,applicationId:s,environmentId:i,kind:"tenant",range:a,window:l})},e[23]=s,e[24]=i,e[25]=a,e[26]=l,e[27]=h):h=e[27];let S,N;e[28]===Symbol.for("react.memo_cache_sentinel")?(S={key:"d",hideOnMobile:!0,header:"Duration",align:"right",cell:V},N={key:"ex",hideOnMobile:!0,header:"Exception",cell:U},e[28]=S,e[29]=N):(S=e[28],N=e[29]);let f;e[30]!==m||e[31]!==h?(f=[O,w,b,v,m,h,S,N],e[30]=m,e[31]=h,e[32]=f):f=e[32];let p;e[33]!==t.runs||e[34]!==f||e[35]!==d||e[36]!==u?(p=n.jsx(T,{rows:t.runs,rowKey:te,onRowClick:d,keyboardNav:u,columns:f}),e[33]=t.runs,e[34]=f,e[35]=d,e[36]=u,e[37]=p):p=e[37];let E;return e[38]!==p||e[39]!==o||e[40]!==c?(E=n.jsxs(F,{title:"Scheduled tasks",children:[_,o,c,j,p]}),e[38]=p,e[39]=o,e[40]=c,e[41]=E):E=e[41],E}function U(t){return n.jsx("span",{className:"text-destructive line-clamp-1 text-xs",children:t.exception_preview??""})}function V(t){return P(t.duration)}function X(t){return n.jsx(Q,{outcome:t.outcome})}function Y(t){return n.jsx("span",{className:"font-mono text-xs",children:t.name})}function Z(t){return n.jsx("span",{className:"font-mono text-xs",children:t.task_key})}function ee(t){return n.jsx("span",{className:"text-xs",children:z(t.occurred_at)})}function te(t){return t.execution_id}function ne(t){return q(t.last_run_at)}function re(t){return P(t.avg)}function se(t){return n.jsx("span",{className:t.failed?"text-destructive":"",children:t.failed})}function ie(t){return t.runs}function ae(t){return n.jsx("span",{className:"text-muted-foreground text-xs",children:t.next_run_at?n.jsx(J,{iso:t.next_run_at}):"–"})}function le(t){return n.jsx("span",{className:"text-muted-foreground font-mono text-xs",children:t.schedule??"–"})}function oe(t){return n.jsx("span",{className:"font-mono text-xs",children:t.task_key})}function ce(t){return t.task_key}function de(t){return n.jsx(H,{href:K(t.id),children:n.jsxs($,{variant:"destructive",children:[t.key," · ",t.title]})},t.id)}export{Re as default};
@@ -0,0 +1 @@
1
+ import{c as D,u as P,j as i,t as L,e as A,L as B}from"./inertia-TViv6kNv.js";import{D as M}from"./data-table-iv1bdF6u.js";import{E as O}from"./empty-state-6j_0AaQQ.js";import{P as F,E as H}from"./env-layout-DrT8rO6P.js";import{c as R,m as j,w as K}from"./format-B9SDkrWj.js";import{B as S}from"./app-layout-yh-sPWgK.js";import"./chart-hover-Vy52H4uD.js";import"./badge-Daw4Hvr8.js";import"./app-wordmark-nbjkzxwQ.js";import"./live-dot-ChfUtY3p.js";import"./index-OqI59zPb.js";import"./index-1ol1-QWI.js";import"./segmented-h1VdDTqE.js";import"./label-COUKWqE_.js";import"./checkbox-D3aRSsBj.js";function fe(t){const e=D.c(26),{environment:E}=P().props,N=E.application_id,w=E.id;let c;e[0]!==N||e[1]!==w?(c=n=>n.execution_id?L(N,w,n.execution_id):null,e[0]=N,e[1]=w,e[2]=c):c=e[2];const r=c;let m;e[3]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(F,{title:"Notifications",description:"ActionMailer/Noticed deliveries, grouped by notifier and delivery method."}),e[3]=m):m=e[3];let u,f;e[4]===Symbol.for("react.memo_cache_sentinel")?(u=i.jsx(O,{icon:S,title:"No notifications in this window",description:"Notifications delivered by your app appear here as they're sent."}),f=[{key:"n",header:"Notifier",cell:U},{key:"c",hideOnMobile:!0,header:"Count",align:"right",cell:Q},{key:"f",hideOnMobile:!0,header:"Failed",align:"right",cell:J},{key:"avg",hideOnMobile:!0,header:"Avg",align:"right",cell:G},{key:"p95",header:"p95",align:"right",cell:z}],e[4]=u,e[5]=f):(u=e[4],f=e[5]);let o;e[6]!==t.groups?(o=i.jsx(M,{rows:t.groups,rowKey:V,empty:u,columns:f}),e[6]=t.groups,e[7]=o):o=e[7];let d;e[8]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx("h2",{className:"text-sm font-semibold",children:"Recent"}),e[8]=d):d=e[8];let p;e[9]===Symbol.for("react.memo_cache_sentinel")?(p=i.jsx(O,{icon:S,title:"No notifications in this window",description:"Notifications delivered by your app appear here as they're sent."}),e[9]=p):p=e[9];let l;e[10]!==r?(l={onOpen:(n,v)=>{const k=r(n);k&&(v?.newTab?window.open(k,"_blank"):A.visit(k))}},e[10]=r,e[11]=l):l=e[11];let h,y,_,x,g;e[12]===Symbol.for("react.memo_cache_sentinel")?(x={key:"when",header:"When",cell:W},g={key:"n",header:"Notifier",cell:I},h={key:"dm",hideOnMobile:!0,header:"Delivery method",cell:C},y={key:"f",hideOnMobile:!0,header:"Failed",cell:q},_={key:"d",header:"Duration",align:"right",cell:T},e[12]=h,e[13]=y,e[14]=_,e[15]=x,e[16]=g):(h=e[12],y=e[13],_=e[14],x=e[15],g=e[16]);let s;e[17]!==r?(s=[x,g,h,y,_,{key:"in",hideOnMobile:!0,header:"In",cell:n=>{const v=r(n);return v?i.jsx(B,{className:"font-mono text-xs hover:underline",href:v,children:n.execution_preview}):null}}],e[17]=r,e[18]=s):s=e[18];let a;e[19]!==t.recent||e[20]!==s||e[21]!==l?(a=i.jsx(M,{rows:t.recent,rowKey:$,empty:p,keyboardNav:l,columns:s}),e[19]=t.recent,e[20]=s,e[21]=l,e[22]=a):a=e[22];let b;return e[23]!==a||e[24]!==o?(b=i.jsxs(H,{title:"Notifications",children:[m,o,d,a]}),e[23]=a,e[24]=o,e[25]=b):b=e[25],b}function T(t){return j(t.duration,3)}function q(t){return t.failed?"yes":""}function C(t){return t.delivery_method}function I(t){return i.jsx("span",{className:"font-mono text-xs",children:t.notifier})}function W(t){return i.jsx("span",{className:"text-xs",children:K(t.occurred_at)})}function $(t){return t.id}function z(t){return j(t.p95,3)}function G(t){return j(t.avg,3)}function J(t){return R(t.errors)}function Q(t){return R(t.count)}function U(t){return i.jsx("span",{className:"font-mono text-xs",children:t.name})}function V(t){return t.group_hash}export{fe as default};
@@ -0,0 +1 @@
1
+ import{c as D,u as A,au as I,j as s,F as M,aR as G,H,e as p,aS as B,aT as L,aU as $,aV as K}from"./inertia-TViv6kNv.js";import{G as O}from"./google-sign-in-button-DsTSfmzY.js";import{I as k}from"./input-error-LxImUkxv.js";import{D as T}from"./data-table-iv1bdF6u.js";import{B as z}from"./badge-Daw4Hvr8.js";import{B as x}from"./app-wordmark-nbjkzxwQ.js";import{C as P,b as S,c as F,a as R}from"./card-BX_3HXcJ.js";import{L as N,I as E}from"./label-COUKWqE_.js";import{A as q}from"./app-layout-yh-sPWgK.js";import{a as U}from"./format-B9SDkrWj.js";import"./separator-BwwTYtCF.js";import"./index-OqI59zPb.js";import"./chart-hover-Vy52H4uD.js";import"./empty-state-6j_0AaQQ.js";import"./live-dot-ChfUtY3p.js";import"./index-1ol1-QWI.js";import"./checkbox-D3aRSsBj.js";function ve(t){const e=D.c(31),{account:a,auth:n}=A().props;let f,j;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=[{title:"Members",href:I()}],j=s.jsx(H,{title:"Members"}),e[0]=f,e[1]=j):(f=e[0],j=e[1]);let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-semibold",children:"Members"}),s.jsx("p",{className:"text-muted-foreground text-sm",children:"People who can see this account's applications and issues."})]}),e[2]=g):g=e[2];let w;e[3]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(S,{children:s.jsx(F,{className:"text-sm",children:"Add member"})}),e[3]=w):w=e[3];let b;e[4]===Symbol.for("react.memo_cache_sentinel")?(b=I(),e[4]=b):b=e[4];let i;e[5]!==t.roles?(i=s.jsxs(P,{className:"max-w-lg",children:[w,s.jsx(R,{children:s.jsx(M,{method:"post",action:b,className:"flex flex-wrap items-end gap-3",resetOnSuccess:!0,children:r=>{const{errors:u,processing:C}=r;return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid flex-1 gap-1",children:[s.jsx(N,{htmlFor:"email",children:"Email"}),s.jsx(E,{id:"email",name:"email",type:"email",required:!0}),s.jsx(k,{messages:u.email})]}),s.jsxs("div",{className:"grid gap-1",children:[s.jsx(N,{htmlFor:"role",children:"Role"}),s.jsx("select",{id:"role",name:"role",className:"border-input h-9 rounded-md border bg-transparent px-2 text-sm",children:t.roles.filter(ne).map(re)})]}),s.jsx(x,{disabled:C,children:"Invite"})]})}})})]}),e[5]=t.roles,e[6]=i):i=e[6];let l;e[7]!==t.invitations?(l=t.invitations.length>0&&s.jsxs(P,{children:[s.jsx(S,{children:s.jsx(F,{children:"Pending invitations"})}),s.jsx(R,{children:s.jsx(T,{rows:t.invitations,rowKey:te,columns:[{key:"e",header:"Email",cell:se},{key:"r",header:"Role",cell:ee},{key:"x",header:"Expires",cell:Z},{key:"a",header:"",align:"right",cell:X}]})})]}),e[7]=t.invitations,e[8]=l):l=e[8];let _,v;e[9]===Symbol.for("react.memo_cache_sentinel")?(_={key:"n",header:"Name",cell:J},v={key:"e",header:"Email",cell:Y},e[9]=_,e[10]=v):(_=e[9],v=e[10]);let o;e[11]!==t.roles?(o={key:"r",header:"Role",cell:r=>r.role==="owner"?s.jsx(z,{variant:"outline",children:"owner"}):s.jsx("select",{value:r.role,"aria-label":`Role for ${r.name}`,onChange:u=>p.patch(B(r.id),{role:u.target.value}),className:"border-input bg-background h-7 rounded-md border px-2 text-xs",children:t.roles.filter(W).map(V)})},e[11]=t.roles,e[12]=o):o=e[12];let c;e[13]!==t.ownership.can_transfer||e[14]!==t.ownership.current_user_id?(c={key:"x",header:"",align:"right",cell:r=>s.jsxs("span",{className:"flex justify-end gap-1",children:[t.ownership.can_transfer&&r.user_id!==t.ownership.current_user_id&&s.jsx(x,{size:"sm",variant:"outline",onClick:()=>{window.confirm(`Transfer ownership to ${r.name}? Your role will become admin.`)&&p.post(L(r.id))},children:"Transfer ownership"}),r.role!=="owner"&&s.jsx(x,{size:"sm",variant:"ghost",className:"text-destructive",onClick:()=>p.delete(B(r.id)),children:"Remove"})]})},e[13]=t.ownership.can_transfer,e[14]=t.ownership.current_user_id,e[15]=c):c=e[15];let d;e[16]!==c||e[17]!==o?(d=[_,v,o,c],e[16]=c,e[17]=o,e[18]=d):d=e[18];let m;e[19]!==t.members||e[20]!==d?(m=s.jsx(T,{rows:t.members,rowKey:Q,columns:d}),e[19]=t.members,e[20]=d,e[21]=m):m=e[21];let h;e[22]!==a||e[23]!==n||e[24]!==t.ownership.can_delete_account?(h=t.ownership.can_delete_account&&a&&s.jsxs(P,{className:"border-destructive/30 max-w-lg",children:[s.jsx(S,{children:s.jsx(F,{className:"text-destructive text-sm",children:"Delete account"})}),s.jsxs(R,{className:"space-y-4",children:[s.jsxs("p",{className:"text-muted-foreground text-sm",children:["Permanently deletes ",a.name,", its applications, ingest tokens, alerts, and telemetry databases. This cannot be undone."]}),n.user.provider&&!n.session.recently_authenticated&&s.jsx(O,{label:"Confirm with Google",reauthenticateFor:"account",separated:!1}),s.jsx(M,{method:"delete",action:G(a.id),className:"grid gap-3",children:r=>{const{errors:u,processing:C}=r;return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid gap-1",children:[s.jsxs(N,{htmlFor:"account-deletion-confirmation",children:["Enter ",a.name," to confirm"]}),s.jsx(E,{id:"account-deletion-confirmation",name:"confirmation",autoComplete:"off"}),s.jsx(k,{messages:u.confirmation})]}),!n.user.provider&&s.jsxs("div",{className:"grid gap-1",children:[s.jsx(N,{htmlFor:"account-password-challenge",children:"Current password"}),s.jsx(E,{id:"account-password-challenge",type:"password",name:"password_challenge",autoComplete:"current-password"}),s.jsx(k,{messages:u.password_challenge})]}),s.jsx(x,{variant:"destructive",className:"w-fit",disabled:C||!!n.user.provider&&!n.session.recently_authenticated,children:"Delete account and telemetry"})]})}})]})]}),e[22]=a,e[23]=n,e[24]=t.ownership.can_delete_account,e[25]=h):h=e[25];let y;return e[26]!==m||e[27]!==h||e[28]!==i||e[29]!==l?(y=s.jsxs(q,{breadcrumbs:f,children:[j,s.jsxs("div",{className:"flex flex-1 flex-col gap-6 p-4 md:p-6",children:[g,i,l,m,h]})]}),e[26]=m,e[27]=h,e[28]=i,e[29]=l,e[30]=y):y=e[30],y}function V(t){return s.jsx("option",{value:t,children:t},t)}function W(t){return t!=="owner"}function Y(t){return s.jsx("span",{className:"font-mono text-xs",children:t.email})}function J(t){return t.name}function Q(t){return t.id}function X(t){return s.jsxs("span",{className:"flex justify-end gap-1",children:[s.jsx(x,{size:"sm",variant:"ghost",onClick:()=>p.post($(t.id)),children:"Resend"}),s.jsx(x,{size:"sm",variant:"ghost",className:"text-destructive",onClick:()=>p.delete(K(t.id)),children:"Withdraw"})]})}function Z(t){return s.jsx("span",{className:"text-muted-foreground text-xs",children:U(t.expires_at)})}function ee(t){return s.jsx(z,{variant:"outline",children:t.role})}function se(t){return s.jsx("span",{className:"font-mono text-xs",children:t.email})}function te(t){return t.id}function re(t){return s.jsx("option",{value:t,children:t},t)}function ne(t){return t!=="owner"}export{ve as default};
@@ -0,0 +1 @@
1
+ import{c as M,u as T,j as l,L as N,G as O}from"./inertia-TViv6kNv.js";import{D as $}from"./data-table-iv1bdF6u.js";import{E as D}from"./empty-state-6j_0AaQQ.js";import{P as F,E as H}from"./env-layout-DrT8rO6P.js";import{R as I}from"./relative-time-IOOgl5n2.js";import{S as R,a as C}from"./stat-s4RpOS9w.js";import{c as d,p as G,m as K}from"./format-B9SDkrWj.js";import{y as W}from"./app-layout-yh-sPWgK.js";import"./chart-hover-Vy52H4uD.js";import"./badge-Daw4Hvr8.js";import"./app-wordmark-nbjkzxwQ.js";import"./live-dot-ChfUtY3p.js";import"./index-OqI59zPb.js";import"./index-1ol1-QWI.js";import"./segmented-h1VdDTqE.js";import"./label-COUKWqE_.js";import"./arrow-up-DVtOGdVA.js";import"./checkbox-D3aRSsBj.js";function ue(i){const e=M.c(40),{environment:A,window:b}=T().props,S=A.application_id,k=A.id,t=i.summary;let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=l.jsx(F,{title:"Profiles",description:"Sampled stack profiles, grouped by the execution they profiled."}),e[0]=h):h=e[0];let o;e[1]!==t.profiles?(o=d(t.profiles),e[1]=t.profiles,e[2]=o):o=e[2];let s;e[3]!==o?(s=l.jsx(R,{label:"Profiles",value:o}),e[3]=o,e[4]=s):s=e[4];let r;e[5]!==t.executions||e[6]!==t.profiled?(r=G(t.profiled,t.executions),e[5]=t.executions,e[6]=t.profiled,e[7]=r):r=e[7];let x;e[8]!==t.profiled?(x=d(t.profiled),e[8]=t.profiled,e[9]=x):x=e[9];let _;e[10]!==t.executions?(_=d(t.executions),e[10]=t.executions,e[11]=_):_=e[11];const w=`${x} of ${_}`;let a;e[12]!==r||e[13]!==w?(a=l.jsx(R,{label:"Executions profiled",value:r,hint:w}),e[12]=r,e[13]=w,e[14]=a):a=e[14];let n;e[15]!==t.avg_samples?(n=d(t.avg_samples),e[15]=t.avg_samples,e[16]=n):n=e[16];let m;e[17]!==n?(m=l.jsx(R,{label:"Avg samples",value:n}),e[17]=n,e[18]=m):m=e[18];let p;e[19]!==s||e[20]!==a||e[21]!==m?(p=l.jsxs(C,{children:[s,a,m]}),e[19]=s,e[20]=a,e[21]=m,e[22]=p):p=e[22];let g;e[23]===Symbol.for("react.memo_cache_sentinel")?(g=l.jsx(D,{icon:W,title:"No profiles in this window",description:"Set RAILWATCH_PROFILE_SAMPLE_RATE in the app to profile slow executions."}),e[23]=g):g=e[23];let f;e[24]!==S||e[25]!==k||e[26]!==b?(f={key:"name",header:"Execution",className:"max-w-0",cell:L=>l.jsx(N,{href:O(S,k,L.profile_id,{window:b}),className:"block truncate font-mono text-xs hover:underline",children:L.name??L.group_hash})},e[24]=S,e[25]=k,e[26]=b,e[27]=f):f=e[27];let y,v,j,E;e[28]===Symbol.for("react.memo_cache_sentinel")?(y={key:"n",header:"Profiles",align:"right",cell:J},v={key:"avg",header:"Avg duration",align:"right",cell:B},j={key:"samples",hideOnMobile:!0,header:"Max samples",align:"right",cell:z},E={key:"last",hideOnMobile:!0,header:"Last seen",align:"right",cell:q},e[28]=y,e[29]=v,e[30]=j,e[31]=E):(y=e[28],v=e[29],j=e[30],E=e[31]);let c;e[32]!==f?(c=[f,y,v,j,E],e[32]=f,e[33]=c):c=e[33];let u;e[34]!==i.profiles||e[35]!==c?(u=l.jsx($,{rows:i.profiles,rowKey:Q,empty:g,columns:c}),e[34]=i.profiles,e[35]=c,e[36]=u):u=e[36];let P;return e[37]!==p||e[38]!==u?(P=l.jsxs(H,{title:"Profiles",children:[h,p,u]}),e[37]=p,e[38]=u,e[39]=P):P=e[39],P}function q(i){return l.jsx(I,{iso:i.last_seen_at})}function z(i){return d(i.max_samples)}function B(i){return K(i.avg_duration)}function J(i){return d(i.count)}function Q(i){return i.group_hash}export{ue as default};
@@ -0,0 +1 @@
1
+ import{B as ae,c as F,u as he,j as l,t as fe,e as le,Z as pe,L as xe,C as ge,r as re}from"./inertia-TViv6kNv.js";import{V as se,D as ne}from"./chart-panel-Cb4S_ej_.js";import{D as ee}from"./data-table-iv1bdF6u.js";import{E as ie}from"./empty-state-6j_0AaQQ.js";import{F as _e}from"./filter-bar-9SU5NrzX.js";import{P as ke,E as je}from"./env-layout-DrT8rO6P.js";import{S as ce}from"./sparkline-cell-C3-5vFkP.js";import{S as ye}from"./status-badge-8jVV-LA4.js";import{c as f,u as de,p as te,m as q,w as be}from"./format-B9SDkrWj.js";import{p as me,C as Ne,a as we}from"./app-layout-yh-sPWgK.js";import"./series-chart-DaFPefku.js";import"./chart-hover-Vy52H4uD.js";import"./chart-B14-N9g7.js";import"./badge-Daw4Hvr8.js";import"./app-wordmark-nbjkzxwQ.js";import"./live-dot-ChfUtY3p.js";import"./index-OqI59zPb.js";import"./index-1ol1-QWI.js";import"./segmented-h1VdDTqE.js";import"./label-COUKWqE_.js";import"./checkbox-D3aRSsBj.js";const ve=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],Me=ae("paperclip",ve);const Se=[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]],Oe=ae("scissors",Se),oe=l.jsx(ie,{icon:me,title:"No model calls in this window",description:"Chats, embeddings, and other model calls your app makes through RubyLLM appear here, with the request or job that made them."}),Ce=l.jsx(ie,{icon:me,title:"No tool calls in this window",description:"Tools your models invoke appear here, timed separately from the calls that asked for them."});function Le(t){const e=F.c(7),{reason:s}=t;if(!s||s==="stop"||s==="tool_calls")return null;const a=s==="max_tokens"||s==="content_filter"?"text-destructive":"text-muted-foreground";let n;e[0]!==a?(n=ge("ml-2 inline-flex items-center gap-1 text-xs",a),e[0]=a,e[1]=n):n=e[1];const r=s==="max_tokens"?"The answer was cut off at the output token limit":`Model stopped: ${s}`;let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsx(Oe,{className:"size-3"}),e[2]=i):i=e[2];let c;return e[3]!==s||e[4]!==n||e[5]!==r?(c=l.jsxs("span",{className:n,title:r,children:[i,s]}),e[3]=s,e[4]=n,e[5]=r,e[6]=c):c=e[6],c}function Te(t){const e=F.c(4),{call:s}=t;if(!s.attachments)return null;const o=s.attachment_names??`${s.attachments} file(s): ${s.attachment_types}`;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=l.jsx(Me,{className:"size-3"}),e[0]=a):a=e[0];const n=s.attachment_types??s.attachments;let r;return e[1]!==o||e[2]!==n?(r=l.jsxs("span",{className:"text-muted-foreground ml-2 inline-flex items-center gap-1 text-xs",title:o,children:[a,n]}),e[1]=o,e[2]=n,e[3]=r):r=e[3],r}function Fe(t){const e=F.c(19),{call:s}=t,[o,a]=re.useState(!1),{prompt:n,completion:r,params:i,provider_request_id:c,tools:p}=s;if(!(n!==null||r!==null||c!==null||p!==null||i!==null&&Object.keys(i).length>0)){let g;return e[0]===Symbol.for("react.memo_cache_sentinel")?(g=l.jsx("span",{className:"text-muted-foreground",children:"–"}),e[0]=g):g=e[0],g}const _=o?Ne:we;let d;e[1]!==o?(d=()=>a(!o),e[1]=o,e[2]=d):d=e[2];let m;e[3]!==_?(m=l.jsx(_,{className:"size-3"}),e[3]=_,e[4]=m):m=e[4];let u;e[5]!==o||e[6]!==d||e[7]!==m?(u=l.jsxs("button",{type:"button",onClick:d,"aria-expanded":o,className:"text-muted-foreground hover:text-foreground inline-flex items-center gap-1",children:[m,"Detail"]}),e[5]=o,e[6]=d,e[7]=m,e[8]=u):u=e[8];let h;e[9]!==r||e[10]!==o||e[11]!==i||e[12]!==n||e[13]!==c||e[14]!==p?(h=o&&l.jsxs("div",{className:"w-[70vw] max-w-[36rem] space-y-2 text-left",children:[l.jsxs("dl",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 font-mono text-[10px]",children:[c&&l.jsxs(l.Fragment,{children:[l.jsx("dt",{className:"text-muted-foreground",children:"provider id"}),l.jsx("dd",{className:"break-all",children:c})]}),p&&l.jsxs(l.Fragment,{children:[l.jsx("dt",{className:"text-muted-foreground",children:"tools"}),l.jsx("dd",{className:"break-all",children:p})]}),i&&Object.entries(i).map(qe)]}),[["Prompt",n],["Completion",r]].map($e)]}),e[9]=r,e[10]=o,e[11]=i,e[12]=n,e[13]=c,e[14]=p,e[15]=h):h=e[15];let x;return e[16]!==u||e[17]!==h?(x=l.jsxs("div",{className:"flex flex-col items-end gap-1",children:[u,h]}),e[16]=u,e[17]=h,e[18]=x):x=e[18],x}function $e(t){const[e,s]=t;return s?l.jsxs("div",{children:[l.jsx("div",{className:"text-muted-foreground text-[10px] tracking-wide uppercase",children:e}),l.jsx("pre",{className:"bg-muted max-h-64 overflow-auto rounded p-2 font-mono text-[10px] break-all whitespace-pre-wrap",children:s})]},e):null}function qe(t){const[e,s]=t;return l.jsxs(re.Fragment,{children:[l.jsx("dt",{className:"text-muted-foreground",children:e}),l.jsx("dd",{className:"break-all",children:typeof s=="string"||typeof s=="number"?s:JSON.stringify(s)})]},e)}function ue(t){const e=F.c(9),{cost:s,unpriced:o}=t;if(s===null){let i;return e[0]!==o?(i=o>0?l.jsx("span",{className:"text-muted-foreground",title:"No registry pricing",children:"unpriced"}):l.jsx("span",{className:"text-muted-foreground",title:"Nothing here has a price",children:"–"}),e[0]=o,e[1]=i):i=e[1],i}let a;e[2]!==s?(a=de(s),e[2]=s,e[3]=a):a=e[3];let n;e[4]!==o?(n=o>0&&l.jsxs("span",{className:"text-muted-foreground ml-1 text-xs font-normal",title:`${o} call${o===1?"":"s"} had no registry pricing and are not in this total`,children:["+",f(o)," unpriced"]}),e[4]=o,e[5]=n):n=e[5];let r;return e[6]!==a||e[7]!==n?(r=l.jsxs("span",{className:"font-semibold",children:[a,n]}),e[6]=a,e[7]=n,e[8]=r):r=e[8],r}function $(t){const e=F.c(7),{label:s,children:o}=t;let a;e[0]!==s?(a=l.jsx("div",{className:"text-muted-foreground text-xs",children:s}),e[0]=s,e[1]=a):a=e[1];let n;e[2]!==o?(n=l.jsx("div",{className:"truncate text-lg",children:o}),e[2]=o,e[3]=n):n=e[3];let r;return e[4]!==a||e[5]!==n?(r=l.jsxs("div",{className:"min-w-0",children:[a,n]}),e[4]=a,e[5]=n,e[6]=r):r=e[6],r}function Tt(t){const e=F.c(79),{environment:s,window:o}=he().props,a=s.application_id,n=s.id;let r;e[0]!==a||e[1]!==n?(r=k=>k.execution_id?fe(a,n,k.execution_id):null,e[0]=a,e[1]=n,e[2]=r):r=e[2];const i=r;let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=l.jsx(ke,{title:"LLM",description:"Model calls and tool invocations through RubyLLM, by model and by the request or job that made them."}),e[3]=c):c=e[3];let p;e[4]!==t.totals.count?(p=f(t.totals.count),e[4]=t.totals.count,e[5]=p):p=e[5];let j;e[6]!==p?(j=l.jsx($,{label:"Model calls",children:p}),e[6]=p,e[7]=j):j=e[7];let _;e[8]!==t.totals.tool_count?(_=f(t.totals.tool_count),e[8]=t.totals.tool_count,e[9]=_):_=e[9];let d;e[10]!==_?(d=l.jsx($,{label:"Tool calls",children:_}),e[10]=_,e[11]=d):d=e[11];let m;e[12]!==t.totals.cost||e[13]!==t.totals.unpriced?(m=l.jsx($,{label:"Spend",children:l.jsx(ue,{cost:t.totals.cost,unpriced:t.totals.unpriced})}),e[12]=t.totals.cost,e[13]=t.totals.unpriced,e[14]=m):m=e[14];let u;e[15]!==t.totals.input_tokens?(u=f(t.totals.input_tokens),e[15]=t.totals.input_tokens,e[16]=u):u=e[16];let h;e[17]!==u?(h=l.jsx($,{label:"Tokens in",children:u}),e[17]=u,e[18]=h):h=e[18];let x;e[19]!==t.totals.output_tokens?(x=f(t.totals.output_tokens),e[19]=t.totals.output_tokens,e[20]=x):x=e[20];let g;e[21]!==x?(g=l.jsx($,{label:"Tokens out",children:x}),e[21]=x,e[22]=g):g=e[22];let y;e[23]!==g||e[24]!==j||e[25]!==d||e[26]!==m||e[27]!==h?(y=l.jsxs("div",{className:"grid grid-cols-2 gap-4 lg:grid-cols-5",children:[j,d,m,h,g]}),e[23]=g,e[24]=j,e[25]=d,e[26]=m,e[27]=h,e[28]=y):y=e[28];let b;e[29]!==t.series?(b=l.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[l.jsx(se,{legend:"request",label:"Model calls",seriesLabel:"Calls",data:t.series}),l.jsx(ne,{label:"Model latency",data:t.series,percentile:"p95"})]}),e[29]=t.series,e[30]=b):b=e[30];let N;e[31]!==t.tool_series||e[32]!==t.totals.tool_count?(N=t.totals.tool_count>0&&l.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[l.jsx(se,{legend:"request",label:"Tool calls",seriesLabel:"Calls",data:t.tool_series}),l.jsx(ne,{label:"Tool latency",data:t.tool_series,percentile:"p95"})]}),e[31]=t.tool_series,e[32]=t.totals.tool_count,e[33]=N):N=e[33];let D;e[34]===Symbol.for("react.memo_cache_sentinel")?(D=[{key:"m",header:"Model",cell:it},{key:"trend",hideOnMobile:!0,header:"Trend",cell:rt},{key:"n",header:"Calls",align:"right",cell:at},{key:"f",hideOnMobile:!0,header:"Failed",align:"right",cell:ot},{key:"cut",hideOnMobile:!0,header:"Cut off",align:"right",cell:nt},{key:"att",hideOnMobile:!0,header:"With files",align:"right",cell:st},{key:"in",hideOnMobile:!0,header:"Tokens in",align:"right",cell:lt},{key:"out",hideOnMobile:!0,header:"Tokens out",align:"right",cell:tt},{key:"cached",hideOnMobile:!0,header:"Cached",align:"right",cell:et},{key:"p95",hideOnMobile:!0,header:"p95",align:"right",cell:Ye},{key:"cost",header:"Spend",align:"right",cell:Xe}],e[34]=D):D=e[34];let w;e[35]!==t.models?(w=l.jsx(ee,{rows:t.models,rowKey:ct,empty:oe,columns:D}),e[35]=t.models,e[36]=w):w=e[36];let v;e[37]!==t.tools?(v=t.tools.length>0&&l.jsxs(l.Fragment,{children:[l.jsx("h2",{className:"text-sm font-semibold",children:"Tools"}),l.jsx(ee,{rows:t.tools,rowKey:Ue,empty:Ce,columns:[{key:"t",header:"Tool",cell:Qe},{key:"trend",hideOnMobile:!0,header:"Trend",cell:Ge},{key:"n",header:"Calls",align:"right",cell:Ze},{key:"f",hideOnMobile:!0,header:"Failed",align:"right",cell:Je},{key:"avg",hideOnMobile:!0,header:"Avg",align:"right",cell:He},{key:"p95",header:"p95",align:"right",cell:Ve},{key:"max",hideOnMobile:!0,header:"Max",align:"right",cell:Ie}]})]}),e[37]=t.tools,e[38]=v):v=e[38];let E;e[39]===Symbol.for("react.memo_cache_sentinel")?(E=l.jsx("h2",{className:"text-sm font-semibold",children:"Recent"}),e[39]=E):E=e[39];let P,R;e[40]===Symbol.for("react.memo_cache_sentinel")?(P={key:"model",label:"Model"},R={key:"provider",label:"Provider"},e[40]=P,e[41]=R):(P=e[40],R=e[41]);let W,z;e[42]===Symbol.for("react.memo_cache_sentinel")?(W={key:"operation",label:"Operation",options:["chat","tool","embedding","image","speech","transcription","moderation","rerank","ocr"]},z={key:"workflow",label:"Workflow"},e[42]=W,e[43]=z):(W=e[42],z=e[43]);let A;e[44]===Symbol.for("react.memo_cache_sentinel")?(A={key:"finish",label:"Finish",options:["stop","max_tokens","tool_calls","content_filter"]},e[44]=A):A=e[44];let B;e[45]===Symbol.for("react.memo_cache_sentinel")?(B=[P,R,W,z,A,{key:"attachments",label:"Files",options:["any","image","pdf","audio","video"]}],e[45]=B):B=e[45];let M;e[46]!==a||e[47]!==n||e[48]!==o?(M=k=>le.visit(pe(a,n,{window:o,q:k||void 0}),{preserveState:!0}),e[46]=a,e[47]=n,e[48]=o,e[49]=M):M=e[49];let S;e[50]!==t.q||e[51]!==M?(S=l.jsx(_e,{value:t.q,fields:B,onChange:M,placeholder:"model:claude-opus-5 operation:chat"}),e[50]=t.q,e[51]=M,e[52]=S):S=e[52];let O;e[53]!==i?(O={onOpen:(k,X)=>{const Y=i(k);Y&&(X?.newTab?globalThis.window.open(Y,"_blank"):le.visit(Y))}},e[53]=i,e[54]=O):O=e[54];let K,I,V,H,J,Z,G;e[55]===Symbol.for("react.memo_cache_sentinel")?(K={key:"when",header:"When",cell:Be},I={key:"st",header:"Status",cell:Ae},V={key:"what",header:"Call",cell:ze},H={key:"wf",hideOnMobile:!0,header:"Workflow",cell:We},J={key:"tok",hideOnMobile:!0,header:"Tokens",align:"right",cell:Re},Z={key:"d",header:"Duration",align:"right",cell:Pe},G={key:"cost",header:"Cost",align:"right",cell:Ee},e[55]=K,e[56]=I,e[57]=V,e[58]=H,e[59]=J,e[60]=Z,e[61]=G):(K=e[55],I=e[56],V=e[57],H=e[58],J=e[59],Z=e[60],G=e[61]);let C;e[62]!==i?(C={key:"in",hideOnMobile:!0,header:"In",cell:k=>{const X=i(k);return X?l.jsx(xe,{className:"font-mono text-xs hover:underline",href:X,children:k.execution_preview}):null}},e[62]=i,e[63]=C):C=e[63];let Q;e[64]===Symbol.for("react.memo_cache_sentinel")?(Q={key:"content",header:"Detail",align:"right",cell:De},e[64]=Q):Q=e[64];let L;e[65]!==C?(L=[K,I,V,H,J,Z,G,C,Q],e[65]=C,e[66]=L):L=e[66];let T;e[67]!==t.recent||e[68]!==O||e[69]!==L?(T=l.jsx(ee,{rows:t.recent,rowKey:Ke,empty:oe,keyboardNav:O,columns:L}),e[67]=t.recent,e[68]=O,e[69]=L,e[70]=T):T=e[70];let U;return e[71]!==y||e[72]!==b||e[73]!==N||e[74]!==w||e[75]!==v||e[76]!==S||e[77]!==T?(U=l.jsxs(je,{title:"LLM",children:[c,y,b,N,w,v,E,S,T]}),e[71]=y,e[72]=b,e[73]=N,e[74]=w,e[75]=v,e[76]=S,e[77]=T,e[78]=U):U=e[78],U}function De(t){return l.jsx(Fe,{call:t})}function Ee(t){return t.cost===null&&t.operation!=="tool"?l.jsx("span",{className:"text-muted-foreground",title:"No registry pricing",children:"unpriced"}):de(t.cost)}function Pe(t){return q(t.duration)}function Re(t){return t.input_tokens===null&&t.output_tokens===null?l.jsx("span",{className:"text-muted-foreground",children:"–"}):l.jsxs("span",{className:"font-mono text-xs",children:[f(t.input_tokens??0)," / ",f(t.output_tokens??0)]})}function We(t){return t.workflow_name?l.jsxs("span",{className:"text-xs",children:[t.workflow_name,t.workflow_step_name&&l.jsxs("span",{className:"text-muted-foreground",children:[" · ",t.workflow_step_name]})]}):null}function ze(t){return l.jsxs("span",{className:"font-mono text-xs",children:[t.operation==="tool"?t.tool_name:l.jsxs(l.Fragment,{children:[l.jsxs("span",{className:"text-muted-foreground",children:[t.provider,"/"]}),l.jsx("span",{className:"font-semibold",children:t.model})]}),t.error&&l.jsx("span",{className:"text-destructive ml-2",children:t.error}),l.jsx(Le,{reason:t.finish_reason}),l.jsx(Te,{call:t})]})}function Ae(t){return l.jsx(ye,{status:null,label:t.status==="failed"?"error":t.operation,outcome:t.status==="failed"?"failed":void 0})}function Be(t){return l.jsx("span",{className:"text-xs",children:be(t.occurred_at)})}function Ke(t){return t.id}function Ie(t){return q(t.max)}function Ve(t){return l.jsx("span",{className:"font-semibold",children:q(t.p95)})}function He(t){return q(t.avg)}function Je(t){return l.jsx("span",{className:t.errors?"text-destructive":"",children:te(t.errors,t.count)})}function Ze(t){return f(t.count)}function Ge(t){return l.jsx(ce,{data:t.sparkline})}function Qe(t){return l.jsx("span",{className:"font-mono text-xs",children:t.name})}function Ue(t){return t.group_hash}function Xe(t){return l.jsx(ue,{cost:t.cost,unpriced:t.unpriced})}function Ye(t){return q(t.p95)}function et(t){return f(t.cache_read_tokens)}function tt(t){return f(t.output_tokens)}function lt(t){return f(t.input_tokens)}function st(t){return t.with_attachments?f(t.with_attachments):l.jsx("span",{className:"text-muted-foreground",children:"–"})}function nt(t){return t.truncated?l.jsx("span",{className:"text-destructive",title:"Answers stopped at the output token limit",children:te(t.truncated,t.count)}):l.jsx("span",{className:"text-muted-foreground",children:"–"})}function ot(t){return l.jsx("span",{className:t.errors?"text-destructive":"",children:te(t.errors,t.count)})}function at(t){return f(t.count)}function rt(t){return l.jsx(ce,{data:t.sparkline})}function it(t){return l.jsx("span",{className:"font-mono text-xs",children:t.name})}function ct(t){return t.group_hash}export{Tt as default};
@@ -0,0 +1 @@
1
+ import{c as U,u as V,j as o,e as X,ah as Y,L as Z}from"./inertia-TViv6kNv.js";import{D as ee}from"./chart-panel-Cb4S_ej_.js";import{D as Q}from"./data-table-iv1bdF6u.js";import{P as te,E as ne}from"./env-layout-DrT8rO6P.js";import{u as oe,P as re}from"./percentile-picker-gFZCXtdb.js";import{S as L}from"./sort-header-DpFzXblu.js";import{S as se}from"./sparkline-cell-C3-5vFkP.js";import{B as ie}from"./badge-Daw4Hvr8.js";import{e as ce}from"./execution-path-CzgBUi5e.js";import{m as G,c as J,w as ae}from"./format-B9SDkrWj.js";import"./series-chart-DaFPefku.js";import"./chart-hover-Vy52H4uD.js";import"./chart-B14-N9g7.js";import"./empty-state-6j_0AaQQ.js";import"./app-layout-yh-sPWgK.js";import"./app-wordmark-nbjkzxwQ.js";import"./live-dot-ChfUtY3p.js";import"./index-OqI59zPb.js";import"./index-1ol1-QWI.js";import"./checkbox-D3aRSsBj.js";import"./label-COUKWqE_.js";import"./segmented-h1VdDTqE.js";import"./arrow-up-DVtOGdVA.js";function le(t){const e=U.c(3),{outcome:c}=t,a=c==="rollback"?"destructive":c==="restart"?"secondary":c==="commit"?"outline":"secondary",n=c||"open";let s;return e[0]!==n||e[1]!==a?(s=o.jsx(ie,{variant:a,className:"font-mono",children:n}),e[0]=n,e[1]=a,e[2]=s):s=e[2],s}function Fe(t){const e=U.c(70),{environment:c,window:a}=V().props,{percentile:n}=oe(),s=c.application_id,l=c.id;let N;e[0]!==s||e[1]!==l||e[2]!==t.dir||e[3]!==t.sort||e[4]!==a?(N=i=>X.visit(Y(s,l,{window:a,sort:i,dir:t.sort===i&&t.dir==="desc"?"asc":"desc"}),{preserveState:!0}),e[0]=s,e[1]=l,e[2]=t.dir,e[3]=t.sort,e[4]=a,e[5]=N):N=e[5];const r=N;let P;e[6]===Symbol.for("react.memo_cache_sentinel")?(P=o.jsx(te,{title:"Transactions",description:"ActiveRecord transactions, grouped by connection and outcome.",actions:o.jsx(re,{})}),e[6]=P):P=e[6];let m;e[7]!==t.series||e[8]!==n?(m=o.jsx(ee,{label:"Duration",data:t.series,percentile:n}),e[7]=t.series,e[8]=n,e[9]=m):m=e[9];let C,O;e[10]===Symbol.for("react.memo_cache_sentinel")?(C={key:"name",header:"Connection · outcome",cell:be},O={key:"trend",hideOnMobile:!0,header:"Trend",cell:ge},e[10]=C,e[11]=O):(C=e[10],O=e[11]);const A=t.sort==="count",H=t.dir==="asc"?"asc":"desc";let u;e[12]!==r?(u=()=>r("count"),e[12]=r,e[13]=u):u=e[13];let d;e[14]!==A||e[15]!==H||e[16]!==u?(d={key:"n",header:o.jsx(L,{label:"Count",active:A,dir:H,onClick:u}),align:"right",cell:ye},e[14]=A,e[15]=H,e[16]=u,e[17]=d):d=e[17];const K=t.sort==="errors",$=t.dir==="asc"?"asc":"desc";let f;e[18]!==r?(f=()=>r("errors"),e[18]=r,e[19]=f):f=e[19];let h;e[20]!==$||e[21]!==f||e[22]!==K?(h={key:"errors",hideOnMobile:!0,header:o.jsx(L,{label:"Rollbacks",active:K,dir:$,onClick:f}),align:"right",cell:_e},e[20]=$,e[21]=f,e[22]=K,e[23]=h):h=e[23];const W=t.sort==="avg",q=t.dir==="asc"?"asc":"desc";let x;e[24]!==r?(x=()=>r("avg"),e[24]=r,e[25]=x):x=e[25];let p;e[26]!==W||e[27]!==q||e[28]!==x?(p={key:"avg",hideOnMobile:!0,header:o.jsx(L,{label:"Avg",active:W,dir:q,onClick:x}),align:"right",cell:pe},e[26]=W,e[27]=q,e[28]=x,e[29]=p):p=e[29];const z=t.sort===n,F=t.dir==="asc"?"asc":"desc";let _;e[30]!==n||e[31]!==r?(_=()=>r(n),e[30]=n,e[31]=r,e[32]=_):_=e[32];let y;e[33]!==n||e[34]!==z||e[35]!==F||e[36]!==_?(y=o.jsx(L,{label:n,active:z,dir:F,onClick:_}),e[33]=n,e[34]=z,e[35]=F,e[36]=_,e[37]=y):y=e[37];let g;e[38]!==n?(g=i=>o.jsx("span",{className:"font-semibold",children:G(i[n],2)}),e[38]=n,e[39]=g):g=e[39];let b;e[40]!==n||e[41]!==y||e[42]!==g?(b={key:n,header:y,align:"right",cell:g},e[40]=n,e[41]=y,e[42]=g,e[43]=b):b=e[43];let j;e[44]!==h||e[45]!==p||e[46]!==b||e[47]!==d?(j=[C,O,d,h,p,b],e[44]=h,e[45]=p,e[46]=b,e[47]=d,e[48]=j):j=e[48];let k;e[49]!==t.transactions||e[50]!==j?(k=o.jsx(Q,{rows:t.transactions,rowKey:je,empty:"No transactions in this window.",columns:j}),e[49]=t.transactions,e[50]=j,e[51]=k):k=e[51];let D;e[52]===Symbol.for("react.memo_cache_sentinel")?(D=o.jsx("h2",{className:"text-sm font-semibold",children:"Recent transactions"}),e[52]=D):D=e[52];let M,T,E,R;e[53]===Symbol.for("react.memo_cache_sentinel")?(M={key:"when",header:"When",className:"w-40",cell:he},T={key:"conn",hideOnMobile:!0,header:"Connection",cell:fe},E={key:"outcome",header:"Outcome",cell:de},R={key:"statements",hideOnMobile:!0,header:"Statements",align:"right",cell:ue},e[53]=M,e[54]=T,e[55]=E,e[56]=R):(M=e[53],T=e[54],E=e[55],R=e[56]);let v;e[57]!==s||e[58]!==l?(v={key:"in",hideOnMobile:!0,header:"In",cell:i=>i.execution_id?o.jsx(Z,{className:"font-mono text-xs hover:underline",href:ce({applicationId:s,environmentId:l,source:i.execution_source,executionId:i.execution_id}),children:i.execution_preview}):o.jsx("span",{className:"text-muted-foreground text-xs",children:"–"})},e[57]=s,e[58]=l,e[59]=v):v=e[59];let B;e[60]===Symbol.for("react.memo_cache_sentinel")?(B={key:"d",header:"Duration",align:"right",cell:me},e[60]=B):B=e[60];let w;e[61]!==v?(w=[M,T,E,R,v,B],e[61]=v,e[62]=w):w=e[62];let S;e[63]!==t.recent||e[64]!==w?(S=o.jsx(Q,{rows:t.recent,rowKey:xe,columns:w}),e[63]=t.recent,e[64]=w,e[65]=S):S=e[65];let I;return e[66]!==m||e[67]!==k||e[68]!==S?(I=o.jsxs(ne,{title:"Transactions",children:[P,m,k,D,S]}),e[66]=m,e[67]=k,e[68]=S,e[69]=I):I=e[69],I}function me(t){return G(t.duration,2)}function ue(t){return t.statement_count===null?"—":J(t.statement_count)}function de(t){return o.jsx(le,{outcome:t.outcome})}function fe(t){return o.jsx("span",{className:"font-mono text-xs",children:t.connection??""})}function he(t){return o.jsx("span",{className:"text-xs tabular-nums",children:ae(t.occurred_at)})}function xe(t){return t.id}function pe(t){return G(t.avg,2)}function _e(t){return J(t.errors)}function ye(t){return J(t.count)}function ge(t){return o.jsx(se,{data:t.sparkline})}function be(t){return o.jsx("span",{className:"font-mono text-xs",children:t.name})}function je(t){return t.group_hash}export{Fe as default};
@@ -0,0 +1 @@
1
+ import{c as x,u as _,j as o,y as b,e as h}from"./inertia-TViv6kNv.js";import{D as k}from"./data-table-iv1bdF6u.js";import{E as w}from"./empty-state-6j_0AaQQ.js";import{E as j,P as v}from"./env-layout-DrT8rO6P.js";import{w as N,c as R}from"./format-B9SDkrWj.js";import{R as D}from"./app-layout-yh-sPWgK.js";import"./chart-hover-Vy52H4uD.js";import"./badge-Daw4Hvr8.js";import"./app-wordmark-nbjkzxwQ.js";import"./live-dot-ChfUtY3p.js";import"./index-OqI59zPb.js";import"./index-1ol1-QWI.js";import"./segmented-h1VdDTqE.js";import"./label-COUKWqE_.js";import"./checkbox-D3aRSsBj.js";function V(t){const e=x.c(13),{environment:y}=_().props,d=y.application_id,f=y.id;let s;e[0]!==d||e[1]!==f?(s=i=>b(d,f,i.id),e[0]=d,e[1]=f,e[2]=s):s=e[2];const l=s;let a;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx(v,{withWindow:!1,title:"Deploys",description:"Recorded by bin/rails railwatch:deploy or the Kamal post-deploy hook. Click one to compare the hour before and after."}),e[3]=a):a=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx(w,{icon:D,title:"No deploys recorded",description:"Run bin/rails railwatch:deploy or install the Kamal hook to track deploys."}),e[4]=c):c=e[4];let r,n;e[5]!==l?(r=i=>h.visit(l(i)),n={onOpen:(i,u)=>u?.newTab?window.open(l(i),"_blank"):h.visit(l(i))},e[5]=l,e[6]=r,e[7]=n):(r=e[6],n=e[7]);let m;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=[{key:"when",header:"When",cell:C},{key:"d",header:"Deploy",cell:P},{key:"r",hideOnMobile:!0,header:"Ref",cell:M},{key:"n",hideOnMobile:!0,header:"Name",cell:g},{key:"by",hideOnMobile:!0,header:"By",cell:S},{key:"c",hideOnMobile:!0,header:"Commits",align:"right",cell:O},{key:"s",header:"Server",cell:E}],e[8]=m):m=e[8];let p;return e[9]!==t.deploys||e[10]!==r||e[11]!==n?(p=o.jsxs(j,{title:"Deploys",children:[a,o.jsx(k,{rows:t.deploys,rowKey:K,empty:c,onRowClick:r,keyboardNav:n,columns:m})]}),e[9]=t.deploys,e[10]=r,e[11]=n,e[12]=p):p=e[12],p}function E(t){return o.jsx("span",{className:"font-mono text-xs",children:t.server})}function O(t){return R(t.commits_count)}function S(t){return o.jsx("span",{className:"text-xs",children:t.performer})}function g(t){return t.name}function M(t){return o.jsx("span",{className:"font-mono text-xs",children:t.ref})}function P(t){return o.jsx("span",{className:"font-mono text-xs",children:t.deploy})}function C(t){return o.jsx("span",{className:"text-xs",children:N(t.deployed_at)})}function K(t){return t.id}export{V as default};
@@ -0,0 +1 @@
1
+ import{c as Je,u as Ce,j as l,X as je,K as Me,Y as Ee,e as fe,L as Ae}from"./inertia-TViv6kNv.js";import{C as Te}from"./chart-hover-Vy52H4uD.js";import{V as Ie}from"./chart-panel-Cb4S_ej_.js";import{C as Fe}from"./cursor-load-more-BXV0f1D_.js";import{D as xe}from"./data-table-iv1bdF6u.js";import{E as ke}from"./empty-state-6j_0AaQQ.js";import{F as Ke}from"./filter-bar-9SU5NrzX.js";import{O as ve}from"./origin-identity-6q1-CBts.js";import{P as He,E as Le}from"./env-layout-DrT8rO6P.js";import{u as De,P as Re}from"./percentile-picker-gFZCXtdb.js";import{S as Be,W as we}from"./app-layout-yh-sPWgK.js";import{S as Qe}from"./sparkline-cell-C3-5vFkP.js";import{S as ge}from"./status-badge-8jVV-LA4.js";import{C as Se,a as qe,b as Oe,c as Ne}from"./card-BX_3HXcJ.js";import{m as he,c as Pe,w as Ve,p as We}from"./format-B9SDkrWj.js";import"./series-chart-DaFPefku.js";import"./chart-B14-N9g7.js";import"./app-wordmark-nbjkzxwQ.js";import"./badge-Daw4Hvr8.js";import"./tenant-path-G-6u9A-o.js";import"./live-dot-ChfUtY3p.js";import"./index-OqI59zPb.js";import"./index-1ol1-QWI.js";import"./segmented-h1VdDTqE.js";import"./label-COUKWqE_.js";import"./checkbox-D3aRSsBj.js";function Kt(t){const e=Je.c(114),{environment:_e,window:s,range:n}=Ce().props,{percentile:c}=De(),r=_e.application_id,i=_e.id;let C;e[0]!==n?.from||e[1]!==n?.to||e[2]!==s?(C=s==="custom"?{from:n?.from,to:n?.to}:{window:s},e[0]=n?.from,e[1]=n?.to,e[2]=s,e[3]=C):C=e[3];const a=C;let M;e[4]!==n||e[5]!==a?(M=n?{from:n.from,to:n.to}:a,e[4]=n,e[5]=a,e[6]=M):M=e[6];const pe=M;let E;e[7]!==r||e[8]!==pe||e[9]!==i||e[10]!==t.pagination.limit||e[11]!==t.q?(E=o=>je(r,i,{...pe,q:t.q||void 0,cursor:o,limit:t.pagination.limit}),e[7]=r,e[8]=pe,e[9]=i,e[10]=t.pagination.limit,e[11]=t.q,e[12]=E):E=e[12];const be=E;let A;e[13]!==r||e[14]!==i?(A=o=>Me(r,i,o.execution_id),e[13]=r,e[14]=i,e[15]=A):A=e[15];const J=A;let T;e[16]!==r||e[17]!==i||e[18]!==t.q||e[19]!==a?(T=o=>Ee(r,i,o.group_hash,{...a,q:t.q||void 0}),e[16]=r,e[17]=i,e[18]=t.q,e[19]=a,e[20]=T):T=e[20];const m=T;let I;e[21]===Symbol.for("react.memo_cache_sentinel")?(I=l.jsx(He,{title:"Jobs",description:"Active Job attempts by class and queue, with queue latency and failures.",actions:l.jsxs(l.Fragment,{children:[l.jsx(Be,{page:"jobs"}),l.jsx(Re,{})]})}),e[21]=I):I=e[21];let u;e[22]!==t.deploys||e[23]!==t.series?(u=l.jsx(Ie,{legend:"job",label:"Job attempts",seriesLabel:"Attempts",data:t.series,deploys:t.deploys}),e[22]=t.deploys,e[23]=t.series,e[24]=u):u=e[24];let F;e[25]===Symbol.for("react.memo_cache_sentinel")?(F=l.jsx(Oe,{children:l.jsx(Ne,{children:"Queues"})}),e[25]=F):F=e[25];let K;e[26]===Symbol.for("react.memo_cache_sentinel")?(K=[{key:"q",header:"Queue",cell:mt},{key:"n",header:"Attempts",align:"right",cell:ct},{key:"lat",hideOnMobile:!0,header:"Avg wait",align:"right",cell:at},{key:"f",header:"Failed",align:"right",cell:st}],e[26]=K):K=e[26];let d;e[27]!==t.queues?(d=l.jsxs(Se,{className:"lg:col-span-1",children:[F,l.jsx(qe,{children:l.jsx(xe,{rows:t.queues,rowKey:ut,columns:K})})]}),e[27]=t.queues,e[28]=d):d=e[28];let H;e[29]===Symbol.for("react.memo_cache_sentinel")?(H=l.jsx(Oe,{children:l.jsx(Ne,{children:"Recent runs"})}),e[29]=H):H=e[29];let L,D,R,B,Q;e[30]===Symbol.for("react.memo_cache_sentinel")?(L={key:"after",label:"After"},D={key:"before",label:"Before"},R={key:"user",label:"User"},B={key:"tenant",label:"Tenant"},Q={key:"deploy",label:"Deploy"},e[30]=L,e[31]=D,e[32]=R,e[33]=B,e[34]=Q):(L=e[30],D=e[31],R=e[32],B=e[33],Q=e[34]);let V,W,U,X;e[35]===Symbol.for("react.memo_cache_sentinel")?(V={key:"kind",label:"Execution kind",options:["job"]},W={key:"queue",label:"Queue"},U={key:"class",label:"Job class"},X={key:"job_id",label:"Job ID"},e[35]=V,e[36]=W,e[37]=U,e[38]=X):(V=e[35],W=e[36],U=e[37],X=e[38]);let Y;e[39]===Symbol.for("react.memo_cache_sentinel")?(Y=[L,D,R,B,Q,V,W,U,X,{key:"outcome",label:"Outcome",options:["processed","failed"]}],e[39]=Y):Y=e[39];let f;e[40]!==r||e[41]!==i||e[42]!==a?(f=o=>fe.visit(je(r,i,{...a,q:o||void 0}),{only:["recent","pagination","q"],preserveState:!0,reset:["recent"]}),e[40]=r,e[41]=i,e[42]=a,e[43]=f):f=e[43];let h;e[44]!==t.q||e[45]!==f?(h=l.jsx(Ke,{value:t.q,fields:Y,onChange:f,placeholder:"queue:default outcome:failed"}),e[44]=t.q,e[45]=f,e[46]=h):h=e[46];let $;e[47]===Symbol.for("react.memo_cache_sentinel")?($=l.jsx(ke,{icon:we,title:"No job runs in this window",description:"Job classes appear here once Active Job executions are reported."}),e[47]=$):$=e[47];let p,b;e[48]!==J?(p=o=>fe.visit(J(o)),b={onOpen:(o,ye)=>ye?.newTab?globalThis.window.open(J(o),"_blank"):fe.visit(J(o))},e[48]=J,e[49]=p,e[50]=b):(p=e[49],b=e[50]);let z,G,Z,ee;e[51]===Symbol.for("react.memo_cache_sentinel")?(z={key:"when",header:"When",cell:it},G={key:"name",header:"Job",grow:!0,cell:rt},Z={key:"st",header:"Outcome",cell:ot},ee={key:"att",hideOnMobile:!0,header:"Attempt",align:"right",cell:lt},e[51]=z,e[52]=G,e[53]=Z,e[54]=ee):(z=e[51],G=e[52],Z=e[53],ee=e[54]);let y;e[55]!==r||e[56]!==i||e[57]!==n||e[58]!==s?(y={key:"user",hideOnMobile:!0,header:"Origin user",cell:o=>l.jsx(ve,{...o,applicationId:r,environmentId:i,kind:"user",range:n,window:s})},e[55]=r,e[56]=i,e[57]=n,e[58]=s,e[59]=y):y=e[59];let x;e[60]!==r||e[61]!==i||e[62]!==n||e[63]!==s?(x={key:"tenant",hideOnMobile:!0,header:"Origin tenant",cell:o=>l.jsx(ve,{...o,applicationId:r,environmentId:i,kind:"tenant",range:n,window:s})},e[60]=r,e[61]=i,e[62]=n,e[63]=s,e[64]=x):x=e[64];let te;e[65]===Symbol.for("react.memo_cache_sentinel")?(te={key:"ex",hideOnMobile:!0,header:"Exception",cell:tt},e[65]=te):te=e[65];let g;e[66]!==y||e[67]!==x?(g=[z,G,Z,ee,y,x,te],e[66]=y,e[67]=x,e[68]=g):g=e[68];let _;e[69]!==t.recent||e[70]!==p||e[71]!==b||e[72]!==g?(_=l.jsx(xe,{rows:t.recent,rowKey:nt,empty:$,onRowClick:p,keyboardNav:b,columns:g}),e[69]=t.recent,e[70]=p,e[71]=b,e[72]=g,e[73]=_):_=e[73];let le;e[74]===Symbol.for("react.memo_cache_sentinel")?(le=["recent","pagination"],e[74]=le):le=e[74];let j;e[75]!==t.pagination||e[76]!==be?(j=l.jsx(Fe,{meta:t.pagination,href:be,only:le}),e[75]=t.pagination,e[76]=be,e[77]=j):j=e[77];let k;e[78]!==h||e[79]!==_||e[80]!==j?(k=l.jsxs(Se,{className:"lg:col-span-2",children:[H,l.jsxs(qe,{className:"space-y-3",children:[h,_,j]})]}),e[78]=h,e[79]=_,e[80]=j,e[81]=k):k=e[81];let v;e[82]!==k||e[83]!==d?(v=l.jsxs("div",{className:"grid gap-4 lg:grid-cols-3",children:[d,k]}),e[82]=k,e[83]=d,e[84]=v):v=e[84];let oe;e[85]===Symbol.for("react.memo_cache_sentinel")?(oe=l.jsx(ke,{icon:we,title:"No job attempts in this window",description:"Individual job executions appear here as they run."}),e[85]=oe):oe=e[85];let w;e[86]!==m?(w={onOpen:(o,ye)=>ye?.newTab?globalThis.window.open(m(o),"_blank"):fe.visit(m(o))},e[86]=m,e[87]=w):w=e[87];let S;e[88]!==m?(S={key:"name",header:"Job",grow:!0,cell:o=>l.jsx(Ae,{className:"font-mono text-xs hover:underline",href:m(o),children:o.name})},e[88]=m,e[89]=S):S=e[89];let re,ie,ne,se,ae;e[90]===Symbol.for("react.memo_cache_sentinel")?(re={key:"trend",hideOnMobile:!0,header:"Trend",cell:Ge},ie={key:"n",header:"Attempts",align:"right",cell:ze},ne={key:"f",header:"Failed",align:"right",cell:$e},se={key:"fr",hideOnMobile:!0,header:"Failure %",align:"right",cell:Ye},ae={key:"avg",hideOnMobile:!0,header:"Avg",align:"right",cell:Xe},e[90]=re,e[91]=ie,e[92]=ne,e[93]=se,e[94]=ae):(re=e[90],ie=e[91],ne=e[92],se=e[93],ae=e[94]);let q;e[95]!==c?(q=o=>l.jsx("span",{className:"font-semibold",children:he(o[c])}),e[95]=c,e[96]=q):q=e[96];let O;e[97]!==c||e[98]!==q?(O={key:c,header:c,align:"right",cell:q},e[97]=c,e[98]=q,e[99]=O):O=e[99];let ce;e[100]===Symbol.for("react.memo_cache_sentinel")?(ce={key:"max",hideOnMobile:!0,header:"Max",align:"right",cell:Ue},e[100]=ce):ce=e[100];let N;e[101]!==S||e[102]!==O?(N=[S,re,ie,ne,se,ae,O,ce],e[101]=S,e[102]=O,e[103]=N):N=e[103];let P;e[104]!==t.classes||e[105]!==w||e[106]!==N?(P=l.jsx(xe,{rows:t.classes,rowKey:et,empty:oe,hoverKey:Ze,keyboardNav:w,columns:N}),e[104]=t.classes,e[105]=w,e[106]=N,e[107]=P):P=e[107];let me;e[108]===Symbol.for("react.memo_cache_sentinel")?(me=l.jsx(ge,{outcome:"processed"}),e[108]=me):me=e[108];let ue;e[109]===Symbol.for("react.memo_cache_sentinel")?(ue=l.jsxs("p",{className:"text-muted-foreground text-xs",children:[me," processed ·"," ",l.jsx(ge,{outcome:"failed"})," failed"]}),e[109]=ue):ue=e[109];let de;return e[110]!==v||e[111]!==P||e[112]!==u?(de=l.jsx(Le,{title:"Jobs",children:l.jsxs(Te,{children:[I,u,v,P,ue]})}),e[110]=v,e[111]=P,e[112]=u,e[113]=de):de=e[113],de}function Ue(t){return he(t.max)}function Xe(t){return he(t.avg)}function Ye(t){return We(t.errors,t.count)}function $e(t){return l.jsx("span",{className:t.errors?"text-destructive":"",children:t.errors})}function ze(t){return Pe(t.count)}function Ge(t){return l.jsx(Qe,{data:t.sparkline,hoverKey:t.group_hash})}function Ze(t){return t.group_hash}function et(t){return t.group_hash}function tt(t){return l.jsx("span",{className:"text-destructive line-clamp-1 text-xs",children:t.exception_preview})}function lt(t){return t.attempt}function ot(t){return l.jsx(ge,{outcome:t.outcome})}function rt(t){return l.jsx("span",{className:"font-mono text-xs",children:t.name})}function it(t){return l.jsx("span",{className:"text-xs",children:Ve(t.occurred_at)})}function nt(t){return t.execution_id}function st(t){return t.failed}function at(t){return he(t.avg_latency)}function ct(t){return Pe(t.count)}function mt(t){return l.jsx("span",{className:"font-mono text-xs",children:t.queue})}function ut(t){return t.queue??"-"}export{Kt as default};
@@ -0,0 +1 @@
1
+ import{c as O,j as s,C as R,aa as H}from"./inertia-TViv6kNv.js";import{C as w}from"./chart-panel-Cb4S_ej_.js";import{D as C}from"./data-table-iv1bdF6u.js";import{E as q}from"./empty-state-6j_0AaQQ.js";import{C as U,X as G,Y as I,a as W,b as X,c as Y}from"./chart-B14-N9g7.js";import{A as J,a as V}from"./series-chart-DaFPefku.js";import{E as Z,P as ee}from"./env-layout-DrT8rO6P.js";import{a as te,S as _}from"./stat-s4RpOS9w.js";import{C as A,b as L,c as P,a as $}from"./card-BX_3HXcJ.js";import{c as j,m as T,b as se,a as K,w as Q}from"./format-B9SDkrWj.js";import{r as B}from"./app-layout-yh-sPWgK.js";import"./chart-hover-Vy52H4uD.js";import"./badge-Daw4Hvr8.js";import"./app-wordmark-nbjkzxwQ.js";import"./live-dot-ChfUtY3p.js";import"./index-OqI59zPb.js";import"./index-1ol1-QWI.js";import"./segmented-h1VdDTqE.js";import"./label-COUKWqE_.js";import"./arrow-up-DVtOGdVA.js";import"./checkbox-D3aRSsBj.js";const E={fontSize:10,fontFamily:"var(--font-mono)"};function re(t){return new Date(t).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}function D(t){return new Date(t).toLocaleString(void 0,{day:"2-digit",month:"short",hour:"2-digit",minute:"2-digit"})}function N(t){const e=O.c(24),{label:a,data:r,format:o,color:p,className:l}=t,c=p===void 0?"var(--primary)":p,x=l===void 0?"h-32":l;let m;e[0]!==c||e[1]!==a?(m={value:{label:a,color:c}},e[0]=c,e[1]=a,e[2]=m):m=e[2];const b=m,h=`${x} w-full`;let n,u;e[3]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(U,{vertical:!1,strokeDasharray:"2 4"}),u=s.jsx(G,{dataKey:"t",tickFormatter:re,tickLine:!1,axisLine:!1,minTickGap:40,tick:E}),e[3]=n,e[4]=u):(n=e[3],u=e[4]);let i;e[5]!==o?(i=s.jsx(I,{width:44,tickLine:!1,axisLine:!1,tick:E,tickFormatter:S=>o(Number(S))}),e[5]=o,e[6]=i):i=e[6];let d;e[7]!==o||e[8]!==a?(d=s.jsx(W,{content:s.jsx(X,{labelFormatter:ae,formatter:S=>[o(Number(S)),a]})}),e[7]=o,e[8]=a,e[9]=d):d=e[9];let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(J,{dataKey:"value",stroke:"var(--color-value)",fill:"var(--color-value)",fillOpacity:.15,strokeWidth:1.75,isAnimationActive:!1}),e[10]=g):g=e[10];let f;e[11]!==r||e[12]!==i||e[13]!==d?(f=s.jsxs(V,{data:r,children:[n,u,i,d,g]}),e[11]=r,e[12]=i,e[13]=d,e[14]=f):f=e[14];let v;e[15]!==b||e[16]!==f||e[17]!==h?(v=s.jsx(Y,{config:b,className:h,children:f}),e[15]=b,e[16]=f,e[17]=h,e[18]=v):v=e[18];let y;e[19]!==r?(y=r.length>0&&s.jsxs("div",{className:"text-muted-foreground mt-1 flex justify-between font-mono text-[10px]",children:[s.jsx("span",{children:D(r[0].t)}),s.jsx("span",{children:D(r[r.length-1].t)})]}),e[19]=r,e[20]=y):y=e[20];let k;return e[21]!==v||e[22]!==y?(k=s.jsxs("div",{children:[v,y]}),e[21]=v,e[22]=y,e[23]=k):k=e[23],k}function ae(t){return D(String(t))}function z(t){const e=O.c(21),{busy:a,max:r,className:o}=t;if(!r){let f;return e[0]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("span",{className:"text-muted-foreground",children:"–"}),e[0]=f):f=e[0],f}const p=Math.min(1,(a??0)/r);let l;e[1]!==o?(l=R("flex items-center gap-1.5",o),e[1]=o,e[2]=l):l=e[2];const c=a??0,x=p>=.9?"bg-danger":p>=.7?"bg-warning":"bg-live";let m;e[3]!==x?(m=R("absolute inset-y-0 left-0 rounded-full",x),e[3]=x,e[4]=m):m=e[4];const b=`${Math.max(4,p*100)}%`;let h;e[5]!==b?(h={width:b},e[5]=b,e[6]=h):h=e[6];let n;e[7]!==m||e[8]!==h?(n=s.jsx("span",{className:m,style:h}),e[7]=m,e[8]=h,e[9]=n):n=e[9];let u;e[10]!==r||e[11]!==c||e[12]!==n?(u=s.jsx("span",{role:"meter","aria-label":"Utilisation","aria-valuenow":c,"aria-valuemin":0,"aria-valuemax":r,className:"bg-muted-foreground/25 relative h-1.5 w-10 shrink-0 overflow-hidden rounded-full",children:n}),e[10]=r,e[11]=c,e[12]=n,e[13]=u):u=e[13];const i=a??0;let d;e[14]!==r||e[15]!==i?(d=s.jsxs("span",{className:"font-mono tabular-nums",children:[i,"/",r]}),e[14]=r,e[15]=i,e[16]=d):d=e[16];let g;return e[17]!==l||e[18]!==d||e[19]!==u?(g=s.jsxs("span",{className:l,children:[u,d]}),e[17]=l,e[18]=d,e[19]=u,e[20]=g):g=e[20],g}const M=t=>`${t.toFixed(0)}%`;function le(t){return t.reduce((e,a)=>e+(a??0),0)}function F(t){return t.reduce((e,a)=>Math.max(e,a??0),0)}function at(t){const e=O.c(27);let a;if(e[0]!==t.samples){const i=t.samples.flatMap(Pe);a=i.length?i.reduce(Le,0)/i.length:0,e[0]=t.samples,e[1]=a}else a=e[1];const r=a;let o,p,l,c,x;if(e[2]!==t.queues||e[3]!==t.samples||e[4]!==t.series||e[5]!==t.silent_servers||e[6]!==r){const i=le(t.samples.map(Ae)),d=F(t.samples.map(Re)),g=F(t.samples.map(Oe)),f=t.samples.length>0||t.series.length>0;o=Z,p="Processes",e[12]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(ee,{title:"Processes",description:"What every web and worker process is doing right now: thread pools, socket backlog, queue depth, and the boots behind them."}),e[12]=l):l=e[12],e[13]!==t.silent_servers?(c=t.silent_servers.length>0&&s.jsxs(A,{className:"border-warning/40",children:[s.jsx(L,{children:s.jsxs(P,{className:"flex items-center gap-2",children:[s.jsx(H,{className:"text-warning size-4"}),t.silent_servers.length===1?"1 expected host is silent":`${t.silent_servers.length} expected hosts are silent`]})}),s.jsxs($,{className:"space-y-2",children:[s.jsx("div",{className:"flex flex-wrap gap-1.5",children:t.silent_servers.map(De)}),s.jsx("p",{className:"text-muted-foreground text-xs",children:"No health sample or execution from these hosts in the last 10 minutes. Expected hosts come from your Kamal post-deploy hook, or from the environment settings if you set them by hand."})]})]}),e[13]=t.silent_servers,e[14]=c):c=e[14],x=f?s.jsxs(s.Fragment,{children:[s.jsxs(te,{children:[s.jsx(_,{label:"Live processes",value:t.samples.length}),s.jsx(_,{label:"Thread utilisation",value:M(r),tone:r>=90?"destructive":r>=70?"warning":void 0,hint:"averaged across live processes"}),s.jsx(_,{label:"Backlog",value:j(i)}),s.jsx(_,{label:"Queue depth",value:j(d)}),s.jsx(_,{label:"Oldest job",value:T(g)})]}),s.jsx(C,{rows:t.samples,rowKey:Te,empty:s.jsx(q,{title:"No process reported in the last 10 minutes",description:"Health samples are older than the live window."}),columns:[{key:"server",header:"Server",cell:Me},{key:"role",header:"Role",cell:qe},{key:"pid",hideOnMobile:!0,header:"PID",align:"right",cell:Ce},{key:"threads",header:"Threads",cell:Se},{key:"pool",hideOnMobile:!0,header:"DB pool",cell:Ne},{key:"mem",hideOnMobile:!0,header:"Memory",align:"right",cell:we},{key:"seen",header:"Last sample",align:"right",cell:ke}]}),t.queues.length>0&&s.jsxs(A,{children:[s.jsx(L,{children:s.jsx(P,{children:"Queue depth"})}),s.jsx($,{children:s.jsx(C,{rows:t.queues,rowKey:_e,columns:[{key:"q",header:"Queue",cell:ye},{key:"d",header:"Ready jobs",align:"right",cell:ve}]})})]}),s.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[s.jsx(w,{label:"Thread utilisation",value:M(r),children:s.jsx(N,{label:"Utilisation",format:M,data:t.series.map(je)})}),s.jsx(w,{label:"Backlog",value:j(i),children:s.jsx(N,{label:"Backlog",color:"var(--warning)",format:j,data:t.series.map(ge)})}),s.jsx(w,{label:"Queue depth",value:j(d),children:s.jsx(N,{label:"Ready jobs",format:j,data:t.series.map(be)})}),s.jsx(w,{label:"Oldest job",value:T(g),children:s.jsx(N,{label:"Oldest job",color:"var(--danger)",format:xe,data:t.series.map(fe)})})]})]}):s.jsx(q,{icon:B,title:"No health samples yet",description:"The gem reports thread pool, backlog and queue health every 15s from each web and worker process."}),e[2]=t.queues,e[3]=t.samples,e[4]=t.series,e[5]=t.silent_servers,e[6]=r,e[7]=o,e[8]=p,e[9]=l,e[10]=c,e[11]=x}else o=e[7],p=e[8],l=e[9],c=e[10],x=e[11];let m;e[15]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("h2",{className:"text-sm font-semibold",children:"Process boots"}),e[15]=m):m=e[15];let b,h;e[16]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(q,{icon:B,title:"No process has booted with Railwatch yet",description:"Server processes report here once they boot with the gem installed."}),h=[{key:"b",header:"Booted",cell:he},{key:"s",header:"Server",cell:de},{key:"r",header:"Role",cell:ue},{key:"pid",hideOnMobile:!0,header:"PID",align:"right",cell:me},{key:"d",header:"Deploy",cell:ce},{key:"v",hideOnMobile:!0,header:"Ruby / Rails / Railwatch",cell:ie},{key:"ad",hideOnMobile:!0,header:"DB / queue / cache",cell:oe},{key:"boot",hideOnMobile:!0,header:"Boot",align:"right",cell:ne}],e[16]=b,e[17]=h):(b=e[16],h=e[17]);let n;e[18]!==t.processes?(n=s.jsx(C,{rows:t.processes,rowKey:pe,empty:b,columns:h}),e[18]=t.processes,e[19]=n):n=e[19];let u;return e[20]!==o||e[21]!==p||e[22]!==l||e[23]!==c||e[24]!==x||e[25]!==n?(u=s.jsxs(o,{title:p,children:[l,c,x,m,n]}),e[20]=o,e[21]=p,e[22]=l,e[23]=c,e[24]=x,e[25]=n,e[26]=u):u=e[26],u}function ne(t){return t.boot_seconds?`${t.boot_seconds.toFixed(1)}s`:"–"}function oe(t){return s.jsxs("span",{className:"font-mono text-xs",children:[t.detail.database_adapter," / ",t.detail.queue_adapter," /"," ",t.detail.cache_store?.replace("ActiveSupport::Cache::","")]})}function ie(t){return s.jsxs("span",{className:"font-mono text-xs",children:[t.ruby_version," / ",t.rails_version," / ",t.railwatch_version]})}function ce(t){return s.jsx("span",{className:"font-mono text-xs",children:t.deploy?.slice(0,12)})}function me(t){return t.pid}function ue(t){return t.role}function de(t){return s.jsx("span",{className:"font-mono text-xs",children:t.server})}function he(t){return s.jsx("span",{className:"text-xs",title:Q(t.booted_at),children:K(t.booted_at)})}function pe(t){return t.id}function fe(t){return{t:t.t,value:t.queue_latency}}function xe(t){return T(t)}function be(t){return{t:t.t,value:t.queue_depth}}function ge(t){return{t:t.t,value:t.backlog}}function je(t){return{t:t.t,value:t.utilisation}}function ve(t){return j(t.depth)}function ye(t){return t.queue}function _e(t){return t.queue}function ke(t){return s.jsx("span",{title:Q(t.sampled_at),children:K(t.sampled_at)})}function we(t){return se(t.memory)}function Ne(t){return s.jsx(z,{busy:t.pool_busy,max:t.pool_size})}function Se(t){return s.jsx(z,{busy:t.threads_busy,max:t.threads_max})}function Ce(t){return t.pid}function qe(t){return t.role}function Me(t){return s.jsx("span",{className:"font-mono text-xs",children:t.server})}function Te(t){return t.id}function De(t){return s.jsx("span",{className:"border-warning/40 bg-warning/10 text-warning rounded-sm border px-1.5 font-mono text-[11px]",children:t},t)}function Oe(t){return t.queue_latency}function Re(t){return t.queue_depth}function Ae(t){return t.backlog}function Le(t,e){return t+e}function Pe(t){return t.threads_max?[(t.threads_busy??0)/t.threads_max*100]:[]}export{at as default};