@aeolus-fleet/console 0.26.1 → 0.27.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 (213) hide show
  1. package/.next/standalone/packages/console/.next/BUILD_ID +1 -1
  2. package/.next/standalone/packages/console/.next/build-manifest.json +3 -3
  3. package/.next/standalone/packages/console/.next/prerender-manifest.json +3 -3
  4. package/.next/standalone/packages/console/.next/server/app/(console)/fleet-health/[cause]/page/server-reference-manifest.json +16 -16
  5. package/.next/standalone/packages/console/.next/server/app/(console)/fleet-health/[cause]/page.js.nft.json +1 -1
  6. package/.next/standalone/packages/console/.next/server/app/(console)/fleet-health/[cause]/page_client-reference-manifest.js +1 -1
  7. package/.next/standalone/packages/console/.next/server/app/(console)/fleet-health/page/server-reference-manifest.json +16 -16
  8. package/.next/standalone/packages/console/.next/server/app/(console)/fleet-health/page.js.nft.json +1 -1
  9. package/.next/standalone/packages/console/.next/server/app/(console)/fleet-health/page_client-reference-manifest.js +1 -1
  10. package/.next/standalone/packages/console/.next/server/app/(console)/inbox/page/server-reference-manifest.json +16 -16
  11. package/.next/standalone/packages/console/.next/server/app/(console)/inbox/page.js.nft.json +1 -1
  12. package/.next/standalone/packages/console/.next/server/app/(console)/inbox/page_client-reference-manifest.js +1 -1
  13. package/.next/standalone/packages/console/.next/server/app/(console)/labels/page/server-reference-manifest.json +16 -16
  14. package/.next/standalone/packages/console/.next/server/app/(console)/labels/page.js.nft.json +1 -1
  15. package/.next/standalone/packages/console/.next/server/app/(console)/labels/page_client-reference-manifest.js +1 -1
  16. package/.next/standalone/packages/console/.next/server/app/(console)/needs-attention/page/server-reference-manifest.json +16 -16
  17. package/.next/standalone/packages/console/.next/server/app/(console)/needs-attention/page.js.nft.json +1 -1
  18. package/.next/standalone/packages/console/.next/server/app/(console)/needs-attention/page_client-reference-manifest.js +1 -1
  19. package/.next/standalone/packages/console/.next/server/app/(console)/needs-crew/page/server-reference-manifest.json +16 -16
  20. package/.next/standalone/packages/console/.next/server/app/(console)/needs-crew/page.js.nft.json +1 -1
  21. package/.next/standalone/packages/console/.next/server/app/(console)/needs-crew/page_client-reference-manifest.js +1 -1
  22. package/.next/standalone/packages/console/.next/server/app/(console)/network/page/server-reference-manifest.json +16 -16
  23. package/.next/standalone/packages/console/.next/server/app/(console)/network/page.js.nft.json +1 -1
  24. package/.next/standalone/packages/console/.next/server/app/(console)/network/page_client-reference-manifest.js +1 -1
  25. package/.next/standalone/packages/console/.next/server/app/(console)/page/react-loadable-manifest.json +2 -1
  26. package/.next/standalone/packages/console/.next/server/app/(console)/page/server-reference-manifest.json +16 -16
  27. package/.next/standalone/packages/console/.next/server/app/(console)/page.js.nft.json +1 -1
  28. package/.next/standalone/packages/console/.next/server/app/(console)/page_client-reference-manifest.js +1 -1
  29. package/.next/standalone/packages/console/.next/server/app/(console)/settings/page/server-reference-manifest.json +16 -16
  30. package/.next/standalone/packages/console/.next/server/app/(console)/settings/page.js.nft.json +1 -1
  31. package/.next/standalone/packages/console/.next/server/app/(console)/settings/page_client-reference-manifest.js +1 -1
  32. package/.next/standalone/packages/console/.next/server/app/(console)/ships/[shipId]/page/react-loadable-manifest.json +1 -1
  33. package/.next/standalone/packages/console/.next/server/app/(console)/ships/[shipId]/page/server-reference-manifest.json +16 -16
  34. package/.next/standalone/packages/console/.next/server/app/(console)/ships/[shipId]/page.js.nft.json +1 -1
  35. package/.next/standalone/packages/console/.next/server/app/(console)/ships/[shipId]/page_client-reference-manifest.js +1 -1
  36. package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/[squadronId]/page/server-reference-manifest.json +16 -16
  37. package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/[squadronId]/page.js.nft.json +1 -1
  38. package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/[squadronId]/page_client-reference-manifest.js +1 -1
  39. package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/blueprints/[name]/page/react-loadable-manifest.json +2 -1
  40. package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/blueprints/[name]/page/server-reference-manifest.json +16 -16
  41. package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/blueprints/[name]/page.js.nft.json +1 -1
  42. package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/blueprints/[name]/page_client-reference-manifest.js +1 -1
  43. package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/page/react-loadable-manifest.json +2 -1
  44. package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/page/server-reference-manifest.json +16 -16
  45. package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/page.js.nft.json +1 -1
  46. package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/page_client-reference-manifest.js +1 -1
  47. package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/templates/[name]/page/server-reference-manifest.json +16 -16
  48. package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/templates/[name]/page.js.nft.json +1 -1
  49. package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/templates/[name]/page_client-reference-manifest.js +1 -1
  50. package/.next/standalone/packages/console/.next/server/app/(console)/trierarchs/[shipId]/page/server-reference-manifest.json +16 -16
  51. package/.next/standalone/packages/console/.next/server/app/(console)/trierarchs/[shipId]/page.js.nft.json +1 -1
  52. package/.next/standalone/packages/console/.next/server/app/(console)/trierarchs/[shipId]/page_client-reference-manifest.js +1 -1
  53. package/.next/standalone/packages/console/.next/server/app/(console)/trierarchs/page/server-reference-manifest.json +16 -16
  54. package/.next/standalone/packages/console/.next/server/app/(console)/trierarchs/page.js.nft.json +1 -1
  55. package/.next/standalone/packages/console/.next/server/app/(console)/trierarchs/page_client-reference-manifest.js +1 -1
  56. package/.next/standalone/packages/console/.next/server/app/_global-error.html +1 -1
  57. package/.next/standalone/packages/console/.next/server/app/_global-error.rsc +1 -1
  58. package/.next/standalone/packages/console/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  59. package/.next/standalone/packages/console/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  60. package/.next/standalone/packages/console/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  61. package/.next/standalone/packages/console/.next/server/app/_not-found/page.js.nft.json +1 -1
  62. package/.next/standalone/packages/console/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  63. package/.next/standalone/packages/console/.next/server/app/api/reads/[read]/route.js.nft.json +1 -1
  64. package/.next/standalone/packages/console/.next/server/app/sign-in/failed/page.js.nft.json +1 -1
  65. package/.next/standalone/packages/console/.next/server/app/sign-in/failed/page_client-reference-manifest.js +1 -1
  66. package/.next/standalone/packages/console/.next/server/app/sign-in/page.js.nft.json +1 -1
  67. package/.next/standalone/packages/console/.next/server/app/sign-in/page_client-reference-manifest.js +1 -1
  68. package/.next/standalone/packages/console/.next/server/app/version/route.js.nft.json +1 -1
  69. package/.next/standalone/packages/console/.next/server/chunks/[root-of-the-server]__06f_104._.js +1 -1
  70. package/.next/standalone/packages/console/.next/server/chunks/[root-of-the-server]__1cfwaji._.js +1 -1
  71. package/.next/standalone/packages/console/.next/server/chunks/_1uqphll._.js +1 -1
  72. package/.next/standalone/packages/console/.next/server/chunks/ssr/0mxb_server_app_(console)_squadrons_blueprints_[name]_page_actions_170owr_.js +1 -1
  73. package/.next/standalone/packages/console/.next/server/chunks/ssr/0mxb_server_app_(console)_squadrons_templates_[name]_page_actions_09abrr0.js +1 -1
  74. package/.next/standalone/packages/console/.next/server/chunks/ssr/0ysl_console__next-internal_server_app_(console)_fleet-health_page_actions_1gb6-fk.js +1 -1
  75. package/.next/standalone/packages/console/.next/server/chunks/ssr/0ysl_console__next-internal_server_app_(console)_needs-crew_page_actions_08gu8-f.js +1 -1
  76. package/.next/standalone/packages/console/.next/server/chunks/ssr/0ysl_console__next-internal_server_app_(console)_network_page_actions_1muuv-j.js +1 -1
  77. package/.next/standalone/packages/console/.next/server/chunks/ssr/0ysl_console__next-internal_server_app_(console)_settings_page_actions_0b6qztr.js +1 -1
  78. package/.next/standalone/packages/console/.next/server/chunks/ssr/0ysl_console__next-internal_server_app_(console)_ships_[shipId]_page_actions_0g2nd1p.js +1 -1
  79. package/.next/standalone/packages/console/.next/server/chunks/ssr/0ysl_console__next-internal_server_app_(console)_squadrons_page_actions_1x3afts.js +1 -1
  80. package/.next/standalone/packages/console/.next/server/chunks/ssr/0ysl_console__next-internal_server_app_(console)_trierarchs_page_actions_1ow37mz.js +1 -1
  81. package/.next/standalone/packages/console/.next/server/chunks/ssr/1eui__next-internal_server_app_(console)_fleet-health_[cause]_page_actions_1kltvcl.js +1 -1
  82. package/.next/standalone/packages/console/.next/server/chunks/ssr/1eui__next-internal_server_app_(console)_needs-attention_page_actions_1jfgclw.js +1 -1
  83. package/.next/standalone/packages/console/.next/server/chunks/ssr/1eui__next-internal_server_app_(console)_squadrons_[squadronId]_page_actions_1lzqlye.js +1 -1
  84. package/.next/standalone/packages/console/.next/server/chunks/ssr/1eui__next-internal_server_app_(console)_trierarchs_[shipId]_page_actions_0l7bxva.js +1 -1
  85. package/.next/standalone/packages/console/.next/server/chunks/ssr/_0-lk0hi._.js +1 -1
  86. package/.next/standalone/packages/console/.next/server/chunks/ssr/{_1dr4sxv._.js → _050ulkd._.js} +1 -1
  87. package/.next/standalone/packages/console/.next/server/chunks/ssr/_06472wf._.js +1 -1
  88. package/.next/standalone/packages/console/.next/server/chunks/ssr/_065633k._.js +1 -1
  89. package/.next/standalone/packages/console/.next/server/chunks/ssr/_0bx9rsi._.js +1 -1
  90. package/.next/standalone/packages/console/.next/server/chunks/ssr/_0dq16_0._.js +1 -1
  91. package/.next/standalone/packages/console/.next/server/chunks/ssr/_0eeox-9._.js +1 -1
  92. package/.next/standalone/packages/console/.next/server/chunks/ssr/_0ibcqy0._.js +1 -1
  93. package/.next/standalone/packages/console/.next/server/chunks/ssr/_0q3cblh._.js +1 -1
  94. package/.next/standalone/packages/console/.next/server/chunks/ssr/_0qft7s4._.js +1 -1
  95. package/.next/standalone/packages/console/.next/server/chunks/ssr/_0qo94ne._.js +1 -1
  96. package/.next/standalone/packages/console/.next/server/chunks/ssr/_0txw0_-._.js +1 -1
  97. package/.next/standalone/packages/console/.next/server/chunks/ssr/_0vwj8z1._.js +3 -0
  98. package/.next/standalone/packages/console/.next/server/chunks/ssr/{_15d37tz._.js → _0wmw6gw._.js} +1 -1
  99. package/.next/standalone/packages/console/.next/server/chunks/ssr/_0z9_vmu._.js +1 -1
  100. package/.next/standalone/packages/console/.next/server/chunks/ssr/_1150wmd._.js +1 -1
  101. package/.next/standalone/packages/console/.next/server/chunks/ssr/_15_xzod._.js +1 -1
  102. package/.next/standalone/packages/console/.next/server/chunks/ssr/{_1m4ivsp._.js → _167gn91._.js} +1 -1
  103. package/.next/standalone/packages/console/.next/server/chunks/ssr/_1_9jlty._.js +3 -0
  104. package/.next/standalone/packages/console/.next/server/chunks/ssr/{_0_2b2as._.js → _1bvkf-u._.js} +1 -1
  105. package/.next/standalone/packages/console/.next/server/chunks/ssr/_1cak3vp._.js +1 -1
  106. package/.next/standalone/packages/console/.next/server/chunks/ssr/_1hb5q4e._.js +3 -0
  107. package/.next/standalone/packages/console/.next/server/chunks/ssr/{_1rm79p_._.js → _1j1ejbw._.js} +1 -1
  108. package/.next/standalone/packages/console/.next/server/chunks/ssr/_1khnccn._.js +1 -1
  109. package/.next/standalone/packages/console/.next/server/chunks/ssr/{_0um_0ko._.js → _1m738ix._.js} +1 -1
  110. package/.next/standalone/packages/console/.next/server/chunks/ssr/_1q4-osx._.js +1 -1
  111. package/.next/standalone/packages/console/.next/server/chunks/ssr/_1svohzj._.js +1 -1
  112. package/.next/standalone/packages/console/.next/server/chunks/ssr/_1t4d5qx._.js +1 -1
  113. package/.next/standalone/packages/console/.next/server/chunks/ssr/_1tmr0q5._.js +1 -1
  114. package/.next/standalone/packages/console/.next/server/chunks/ssr/_1u0h4gj._.js +1 -1
  115. package/.next/standalone/packages/console/.next/server/chunks/ssr/{_0mx1tkz._.js → _1vc4auf._.js} +1 -1
  116. package/.next/standalone/packages/console/.next/server/chunks/ssr/_1yjxbcr._.js +1 -1
  117. package/.next/standalone/packages/console/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_0nwj88l._.js +3 -0
  118. package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_common_dist_schemas_ping_043mvb2.js → node_modules_zod_v4_classic_external_15fmmz3.js} +3 -3
  119. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_1t6joug._.js +3 -0
  120. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_common_dist_1_gq_cl._.js +1 -1
  121. package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_1mg652q._.js → packages_console_0969g9_._.js} +2 -2
  122. package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_0-cynql._.js → packages_console_11eh-8v._.js} +2 -2
  123. package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_1phsut4._.js → packages_console_18f93ie._.js} +1 -1
  124. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_1bm_b0f._.js +1 -1
  125. package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_1932jy8._.js → packages_console_1clix79._.js} +2 -2
  126. package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_0hcloef._.js → packages_console_2004f3v._.js} +1 -1
  127. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console__next-internal_server_app_(console)_inbox_page_actions_0q9_xye.js +1 -1
  128. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console__next-internal_server_app_(console)_labels_page_actions_0tk7mqs.js +1 -1
  129. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console__next-internal_server_app_(console)_page_actions_1ftjjyq.js +1 -1
  130. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_app_(console)_network_network-page_tsx_0qc3h-9._.js +1 -1
  131. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_app_(console)_overview-page_tsx_15siba6._.js +1 -1
  132. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_app_(console)_ships_[shipId]_ship-page_tsx_0oahz0r._.js +1 -1
  133. package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_components_organisms_crew-line-dialog_tsx_1wiepn9._.js → packages_console_components_organisms_crew-line-dialog_tsx_1qorkk0._.js} +1 -1
  134. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_features_ship_ui_organisms_message-sheet_tsx_08bg9ly._.js +3 -0
  135. package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_features_squadrons_organisms_form-squadron-dialog_tsx_0uvng9u._.js → packages_console_features_squadrons_organisms_form-squadron-dialog_tsx_0ditu5u._.js} +1 -1
  136. package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_features_squadrons_organisms_form-squadron-dialog_tsx_0o-4rcz._.js → packages_console_features_squadrons_organisms_form-squadron-dialog_tsx_13oketj._.js} +1 -1
  137. package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_features_trierarchs_organisms_clear-worktree-dialog_tsx_1vo-jvm._.js → packages_console_features_trierarchs_organisms_clear-worktree-dialog_tsx_1vigea_._.js} +1 -1
  138. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_lib_1b-azvo._.js +1 -1
  139. package/.next/standalone/packages/console/.next/server/middleware-build-manifest.js +3 -3
  140. package/.next/standalone/packages/console/.next/server/pages/500.html +1 -1
  141. package/.next/standalone/packages/console/.next/server/server-reference-manifest.js +1 -1
  142. package/.next/standalone/packages/console/.next/server/server-reference-manifest.json +17 -17
  143. package/.next/standalone/packages/console/.next/static/chunks/061rac_vo9o5d.js +1 -0
  144. package/.next/standalone/packages/console/.next/static/chunks/09d3pvbsjtshj.js +1 -0
  145. package/.next/standalone/packages/console/.next/static/chunks/0c7bjft6zc04t.js +1 -0
  146. package/.next/standalone/packages/console/.next/static/chunks/{40z-3somzsrdu.js → 0fa8e9n5fw6ti.js} +1 -1
  147. package/.next/standalone/packages/console/.next/static/chunks/{2r6qbt-3eyyx0.js → 0fj5fpwgxkqx6.js} +1 -1
  148. package/.next/standalone/packages/console/.next/static/chunks/{0dym46wdgyr8s.js → 0ht5wi5oe5_za.js} +1 -1
  149. package/.next/standalone/packages/console/.next/static/chunks/{3b-s07jfktn4h.js → 0k-zw0ldc55vf.js} +1 -1
  150. package/.next/standalone/packages/console/.next/static/chunks/0o8q0d16-yt3a.js +1 -0
  151. package/.next/standalone/packages/console/.next/static/chunks/{1-qb94mliowen.js → 0of7ho03vihb8.js} +1 -1
  152. package/.next/standalone/packages/console/.next/static/chunks/0sagpcmh6omoj.js +1 -0
  153. package/.next/standalone/packages/console/.next/static/chunks/{3tgyz9diu6s8b.js → 101ihp2v2np_3.js} +1 -1
  154. package/.next/standalone/packages/console/.next/static/chunks/{13dlsye_vo200.js → 126uqxulir3hs.js} +1 -1
  155. package/.next/standalone/packages/console/.next/static/chunks/14e-f0w_cfqhg.js +1 -0
  156. package/.next/standalone/packages/console/.next/static/chunks/{27w_ak-u49z7c.js → 169-oge56q06i.js} +1 -1
  157. package/.next/standalone/packages/console/.next/static/chunks/{3xpa57z5k1j9u.js → 18rsibme2venq.js} +1 -1
  158. package/.next/standalone/packages/console/.next/static/chunks/{3l9d_pyzbdymw.js → 1a9zf8kv0co9n.js} +1 -1
  159. package/.next/standalone/packages/console/.next/static/chunks/1bra8hyy6r84a.js +1 -0
  160. package/.next/standalone/packages/console/.next/static/chunks/{3ndsjj121oi4m.css → 1qpq5_mt8o9ya.css} +1 -1
  161. package/.next/standalone/packages/console/.next/static/chunks/{1l8zdqmp_9rf5.js → 1rnej87ue7-0n.js} +1 -1
  162. package/.next/standalone/packages/console/.next/static/chunks/{0f4gp6zc0v7ff.js → 1splzlg79ytml.js} +1 -1
  163. package/.next/standalone/packages/console/.next/static/chunks/{1da369dzazef6.js → 1wfdv058l23gm.js} +1 -1
  164. package/.next/standalone/packages/console/.next/static/chunks/20l4-ecv_oo2h.js +1 -0
  165. package/.next/standalone/packages/console/.next/static/chunks/24bvw3_s7h3f3.js +1 -0
  166. package/.next/standalone/packages/console/.next/static/chunks/25l_2rj6pvegd.js +1 -0
  167. package/.next/standalone/packages/console/.next/static/chunks/2600yzum9pa4e.js +1 -0
  168. package/.next/standalone/packages/console/.next/static/chunks/28pbrg59hx8sb.js +1 -0
  169. package/.next/standalone/packages/console/.next/static/chunks/2fkwzi80oyuv-.js +1 -0
  170. package/.next/standalone/packages/console/.next/static/chunks/2k8crfymkve8d.js +1 -0
  171. package/.next/standalone/packages/console/.next/static/chunks/2n_dccp7oi2ad.js +1 -0
  172. package/.next/standalone/packages/console/.next/static/chunks/{0m5y3s3tz9qdy.js → 2qc_m8dbgxc8w.js} +1 -1
  173. package/.next/standalone/packages/console/.next/static/chunks/{1rdp_b6odjqw0.js → 323r-smxvi-fc.js} +1 -1
  174. package/.next/standalone/packages/console/.next/static/chunks/{03ktpgapfr1fd.js → 32f8-4_7znbir.js} +1 -1
  175. package/.next/standalone/packages/console/.next/static/chunks/{08kmb58ulpuue.js → 38klmgk3bgj3s.js} +1 -1
  176. package/.next/standalone/packages/console/.next/static/chunks/{17odvid17s2tw.js → 3cae8s07yzv_o.js} +1 -1
  177. package/.next/standalone/packages/console/.next/static/chunks/3jszhx5rvbjvw.js +1 -0
  178. package/.next/standalone/packages/console/.next/static/chunks/{2l8wcne7b1_zj.js → 3k61es128845f.js} +1 -1
  179. package/.next/standalone/packages/console/.next/static/chunks/3kvklsjp8y-7e.js +1 -0
  180. package/.next/standalone/packages/console/.next/static/chunks/{3qr3u05dpx3ge.js → 3vr80dn3nyqqi.js} +2 -2
  181. package/.next/standalone/packages/console/.next/static/chunks/{2t433o8fl-ml0.js → 3wqzb_30qmu4l.js} +1 -1
  182. package/.next/standalone/packages/console/.next/static/chunks/3yjner-hzsvhr.js +1 -0
  183. package/.next/standalone/packages/console/.next/static/chunks/{1o0gz-w01gi32.js → 40js517zsadm9.js} +1 -1
  184. package/.next/standalone/packages/console/.next/static/chunks/{44uzs2qr-cee1.js → 40kwaybl7nu8j.js} +1 -1
  185. package/.next/standalone/packages/console/.next/static/chunks/{1hl55s9nte__6.js → 41ur4zm093e1l.js} +1 -1
  186. package/.next/standalone/packages/console/package.json +3 -3
  187. package/package.json +3 -3
  188. package/.next/standalone/packages/console/.next/server/chunks/ssr/_007hyay._.js +0 -3
  189. package/.next/standalone/packages/console/.next/server/chunks/ssr/_0v442oo._.js +0 -3
  190. package/.next/standalone/packages/console/.next/server/chunks/ssr/_10t_dof._.js +0 -3
  191. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_17dse8h._.js +0 -3
  192. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_features_ship_organisms_message-sheet_tsx_0quy9k0._.js +0 -3
  193. package/.next/standalone/packages/console/.next/static/chunks/0774ajv3n2sec.js +0 -1
  194. package/.next/standalone/packages/console/.next/static/chunks/0c17wq4vgezhs.js +0 -1
  195. package/.next/standalone/packages/console/.next/static/chunks/0dv6nkmic67qu.js +0 -1
  196. package/.next/standalone/packages/console/.next/static/chunks/0v7urhig04x47.js +0 -1
  197. package/.next/standalone/packages/console/.next/static/chunks/0vf_ufda6f5_a.js +0 -1
  198. package/.next/standalone/packages/console/.next/static/chunks/1_6o6fps43670.js +0 -1
  199. package/.next/standalone/packages/console/.next/static/chunks/1imn88cebly66.js +0 -1
  200. package/.next/standalone/packages/console/.next/static/chunks/2a-1xtmi1hx3h.js +0 -1
  201. package/.next/standalone/packages/console/.next/static/chunks/2egdjg_8otxoe.js +0 -1
  202. package/.next/standalone/packages/console/.next/static/chunks/2ihkzqv4yg9le.js +0 -1
  203. package/.next/standalone/packages/console/.next/static/chunks/2kzhuwq53l7ml.js +0 -1
  204. package/.next/standalone/packages/console/.next/static/chunks/2wmpsx0-ppato.js +0 -1
  205. package/.next/standalone/packages/console/.next/static/chunks/2ybp2gr6g0hjh.js +0 -1
  206. package/.next/standalone/packages/console/.next/static/chunks/3fl8vffzef7ta.js +0 -1
  207. package/.next/standalone/packages/console/.next/static/chunks/3flwn71cq8_6u.js +0 -1
  208. package/.next/standalone/packages/console/.next/static/chunks/3v_rd25hyqdcr.js +0 -1
  209. package/.next/standalone/packages/console/.next/static/chunks/425ol2sav0q-i.js +0 -1
  210. package/.next/standalone/packages/console/.next/static/chunks/43wzzfkiwha23.js +0 -1
  211. /package/.next/standalone/packages/console/.next/static/{7ilR2JMt_PkXHhRu_RUkU → ZV7FLBaZ7IVExYMj-OJbA}/_buildManifest.js +0 -0
  212. /package/.next/standalone/packages/console/.next/static/{7ilR2JMt_PkXHhRu_RUkU → ZV7FLBaZ7IVExYMj-OJbA}/_clientMiddlewareManifest.js +0 -0
  213. /package/.next/standalone/packages/console/.next/static/{7ilR2JMt_PkXHhRu_RUkU → ZV7FLBaZ7IVExYMj-OJbA}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,86448,e=>{"use strict";var t=e.i(12598),i=e.i(81384),s=e.i(73664),a=e.i(27001),n=e.i(54440),r=e.i(71645),o=e.i(19273),l=e.i(15823),d=e.i(40143),c=e.i(69230);function u(e,t){let i=new Set(t);return e.filter(e=>!i.has(e))}var h=class extends l.Subscribable{#e;#t;#i;#s;#a;#n;#r;#o;#l;#d=[];constructor(e,t,i){super(),this.#e=e,this.#s=i,this.#i=[],this.#a=[],this.#t=[],this.setQueries(t)}onSubscribe(){1===this.listeners.size&&this.#a.forEach(e=>{e.subscribe(t=>{this.#c(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#a.forEach(e=>{e.destroy()})}setQueries(e,t){this.#i=e,this.#s=t,d.notifyManager.batch(()=>{let e=this.#a,t=this.#u(this.#i);t.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions));let i=t.map(e=>e.observer),s=i.map(e=>e.getCurrentResult()),a=e.length!==i.length,n=i.some((t,i)=>t!==e[i]),r=a||n,l=!!r||s.some((e,t)=>{let i=this.#t[t];return!i||!(0,o.shallowEqualObjects)(e,i)});(r||l)&&(r&&(this.#d=t,this.#a=i),this.#t=s,this.hasListeners()&&(r&&(u(e,i).forEach(e=>{e.destroy()}),u(i,e).forEach(e=>{e.subscribe(t=>{this.#c(e,t)})})),this.#h()))})}getCurrentResult(){return this.#t}getQueries(){return this.#a.map(e=>e.getCurrentQuery())}getObservers(){return this.#a}getOptimisticResult(e,t){let i=this.#u(e),s=i.map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions)),a=i.map(e=>e.defaultedQueryOptions.queryHash);return[s,e=>this.#p(e??s,t,a),()=>this.#m(s,i)]}#m(e,t){let i=new Set;return t.map((s,a)=>{let n=e[a];return s.defaultedQueryOptions.notifyOnChangeProps?n:s.observer.trackResult(n,e=>{i.has(e)||(i.add(e),t.forEach(t=>{t.observer.trackProp(e)}))})})}#p(e,t,i){if(t){let s=this.#l,a=void 0!==i&&void 0!==s&&(s.length!==i.length||i.some((e,t)=>e!==s[t]));return(this.#t!==this.#o||a||t!==this.#r)&&(this.#r=t,this.#o=this.#t,void 0!==i&&(this.#l=i),this.#n=(0,o.replaceEqualDeep)(this.#n,t(e))),this.#n}return e}#g(){return!this.#s?.combine||this.#a.some((e,t)=>e.options.suspense&&this.#t[t]?.data===void 0)}#u(e){let t=new Map;this.#a.forEach(e=>{let i=e.options.queryHash;if(!i)return;let s=t.get(i);s?s.push(e):t.set(i,[e])});let i=[];return e.forEach(e=>{let s=this.#e.defaultQueryOptions(e),a=t.get(s.queryHash)?.shift()??new c.QueryObserver(this.#e,s);i.push({defaultedQueryOptions:s,observer:a})}),i}#c(e,t){let i=this.#a.indexOf(e);-1!==i&&(this.#t=this.#t.slice(),this.#t[i]=t,this.#h())}#h(){if(this.hasListeners()){let e=this.#g(),t=this.#n,i=e?t:this.#p(this.#m(this.#t,this.#d),this.#s?.combine);(e||t!==i)&&d.notifyManager.batch(()=>{this.listeners.forEach(e=>{e(this.#t)})})}}};e.s(["useQueries",0,function({queries:e,...l},u){let p=(0,t.useQueryClient)(u),m=(0,i.useIsRestoring)(),g=(0,s.useQueryErrorResetBoundary)(),y=!1!==l.subscribed,f=r.useMemo(()=>e.map(e=>{let t=p.defaultQueryOptions(e);return t._optimisticResults=m?"isRestoring":y?"optimistic":void 0,t}),[e,p,m,y]);f.forEach(e=>{(0,n.ensureSuspenseTimers)(e);let t=p.getQueryCache().get(e.queryHash);(0,a.ensurePreventErrorBoundaryRetry)(e,g,t)}),(0,a.useClearResetErrorBoundary)(g);let[b]=r.useState(()=>new h(p,f,l)),[x,v,k]=b.getOptimisticResult(f,l.combine),w=!m&&y;r.useSyncExternalStore(r.useCallback(e=>w?b.subscribe(d.notifyManager.batchCalls(e)):o.noop,[b,w]),()=>b.getCurrentResult(),()=>b.getCurrentResult()),r.useEffect(()=>{b.setQueries(f,l)},[f,l,b]);let C=x.some((e,t)=>(0,n.shouldSuspend)(f[t],e))?x.flatMap((e,t)=>{let i=f[t];if(i&&(0,n.shouldSuspend)(i,e)){let e=new c.QueryObserver(p,i);return(0,n.fetchOptimistic)(i,e,g)}return[]}):[];if(C.length>0)throw Promise.all(C);let M=x.find((e,t)=>{let i=f[t];return i&&(0,a.getHasError)({result:e,errorResetBoundary:g,throwOnError:i.throwOnError,query:p.getQueryCache().get(i.queryHash),suspense:i.suspense})});if(M)throw M.error;return v(k())}],86448)},49655,87255,50092,36604,e=>{"use strict";var t=e.i(56420);let i={name:"alarm-clock",size:24,node:[["circle",{cx:"12",cy:"13",r:"8",key:"3y4lt7"}],["path",{d:"M12 9v4l2 2",key:"1c63tq"}],["path",{d:"M5 3 2 6",key:"18tl5t"}],["path",{d:"m22 6-3-3",key:"1opdir"}],["path",{d:"M6.38 18.7 4 21",key:"17xu3x"}],["path",{d:"M17.64 18.67 20 21",key:"kv2oe2"}]]};i.node;let s=(0,t.default)(i);e.s(["AlarmClock",0,s],49655);let a={name:"anchor",size:24,node:[["path",{d:"M12 6v16",key:"nqf5sj"}],["path",{d:"m19 13 2-1a9 9 0 0 1-18 0l2 1",key:"y7qv08"}],["path",{d:"M9 11h6",key:"1fldmi"}],["circle",{cx:"12",cy:"4",r:"2",key:"muu5ef"}]]};a.node;let n=(0,t.default)(a);e.s(["Anchor",0,n],87255);let r={name:"circle-arrow-right",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m12 16 4-4-4-4",key:"1i9zcv"}],["path",{d:"M8 12h8",key:"1wcyev"}]],aliases:["arrow-right-circle"]};r.node;let o=(0,t.default)(r);e.s(["CircleArrowRight",0,o],50092);let l={name:"circle-check-big",size:24,node:[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],aliases:["check-circle"]};l.node;let d=(0,t.default)(l);e.s(["CircleCheckBig",0,d],36604)},76561,e=>{"use strict";var t=e.i(56420);let i={name:"archive",size:24,node:[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]};i.node;let s=(0,t.default)(i);e.s(["Archive",0,s],76561)},47211,e=>{"use strict";var t=e.i(56420);let i={name:"ban",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}]]};i.node;let s=(0,t.default)(i);e.s(["Ban",0,s],47211)},52886,e=>{"use strict";var t=e.i(56420);let i={name:"circle-dashed",size:24,node:[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]]};i.node;let s=(0,t.default)(i);e.s(["CircleDashed",0,s],52886)},19002,e=>{"use strict";var t=e.i(56420);let i={name:"circle-pause",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]],aliases:["pause-circle"]};i.node;let s=(0,t.default)(i);e.s(["CirclePause",0,s],19002)},32297,26391,19647,10001,25799,e=>{"use strict";var t=e.i(56420);let i={name:"circle-play",size:24,node:[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],aliases:["play-circle"]};i.node;let s=(0,t.default)(i);e.s(["CirclePlay",0,s],32297);let a={name:"circle-dot-dashed",size:24,node:[["path",{d:"M10.1 2.18a9.93 9.93 0 0 1 3.8 0",key:"1qdqn0"}],["path",{d:"M17.6 3.71a9.95 9.95 0 0 1 2.69 2.7",key:"1bq7p6"}],["path",{d:"M21.82 10.1a9.93 9.93 0 0 1 0 3.8",key:"1rlaqf"}],["path",{d:"M20.29 17.6a9.95 9.95 0 0 1-2.7 2.69",key:"1xk03u"}],["path",{d:"M13.9 21.82a9.94 9.94 0 0 1-3.8 0",key:"l7re25"}],["path",{d:"M6.4 20.29a9.95 9.95 0 0 1-2.69-2.7",key:"1v18p6"}],["path",{d:"M2.18 13.9a9.93 9.93 0 0 1 0-3.8",key:"xdo6bj"}],["path",{d:"M3.71 6.4a9.95 9.95 0 0 1 2.7-2.69",key:"1jjmaz"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]};a.node;let n=(0,t.default)(a);e.s(["CircleDotDashed",0,n],26391);let r={name:"circle-minus",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}]],aliases:["minus-circle"]};r.node;let o=(0,t.default)(r);e.s(["CircleMinus",0,o],19647);let l={name:"flag-off",size:24,node:[["path",{d:"M16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1q158e"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M4 22V4",key:"1plyxx"}],["path",{d:"M7.656 2H8c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10.347",key:"xj1b71"}]]};l.node;let d=(0,t.default)(l);e.s(["FlagOff",0,d],10001);let c={name:"mail-check",size:24,node:[["path",{d:"M22 13V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h8",key:"12jkf8"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}],["path",{d:"m16 19 2 2 4-4",key:"1b14m6"}]]};c.node;let u=(0,t.default)(c);e.s(["MailCheck",0,u],25799)},21048,e=>{"use strict";var t=e.i(56420);let i={name:"circle-slash",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"9",x2:"15",y1:"15",y2:"9",key:"1dfufj"}]]};i.node;let s=(0,t.default)(i);e.s(["CircleSlash",0,s],21048)},16984,e=>{"use strict";var t=e.i(56420);let i={name:"circle-x",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],aliases:["x-circle"]};i.node;let s=(0,t.default)(i);e.s(["CircleX",0,s],16984)},74544,e=>{"use strict";var t=e.i(56420);let i={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};i.node;let s=(0,t.default)(i);e.s(["Clock",0,s],74544)},36518,e=>{"use strict";var t=e.i(56420);let i={name:"cloud-off",size:24,node:[["path",{d:"M10.94 5.274A7 7 0 0 1 15.71 10h1.79a4.5 4.5 0 0 1 4.222 6.057",key:"1uxyv8"}],["path",{d:"M18.796 18.81A4.5 4.5 0 0 1 17.5 19H9A7 7 0 0 1 5.79 5.78",key:"99tcn7"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]};i.node;let s=(0,t.default)(i);e.s(["CloudOff",0,s],36518)},86247,e=>{"use strict";var t=e.i(56420);let i={name:"ellipsis",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],aliases:["more-horizontal"]};i.node;let s=(0,t.default)(i);e.s(["Ellipsis",0,s],86247)},71028,e=>{"use strict";var t=e.i(56420);let i={name:"gauge",size:24,node:[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]};i.node;let s=(0,t.default)(i);e.s(["Gauge",0,s],71028)},81658,e=>{"use strict";var t=e.i(56420);let i={name:"hourglass",size:24,node:[["path",{d:"M5 22h14",key:"ehvnwv"}],["path",{d:"M5 2h14",key:"pdyrp9"}],["path",{d:"M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22",key:"1d314k"}],["path",{d:"M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2",key:"1vvvr6"}]]};i.node;let s=(0,t.default)(i);e.s(["Hourglass",0,s],81658)},58925,e=>{"use strict";var t=e.i(56420);let i={name:"key-round",size:24,node:[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]};i.node;let s=(0,t.default)(i);e.s(["KeyRound",0,s],58925)},85512,e=>{"use strict";var t=e.i(56420);let i={name:"octagon-alert",size:24,node:[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]],aliases:["alert-octagon"]};i.node;let s=(0,t.default)(i);e.s(["OctagonAlert",0,s],85512)},68997,73330,e=>{"use strict";var t=e.i(56420);let i={name:"pen",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],aliases:["edit-2"]};i.node;let s=(0,t.default)(i);e.s(["Pen",0,s],68997);var a=e.i(49635);e.s(["canPing",0,function(e){return"agent"===e.kind&&"crewed"===e.status},"pingLine",0,function(e,t){let i=new Date(e.sentAt);switch(e.state){case"waiting":{let e=(0,a.relativeTime)(i,t);return`Pinged ${"Just now"===e?"just now":e}, no answer yet`}case"answered":var s;let n;return null===e.answeredAt?"Answered ping":`Answered ping in ${(n=Math.max(0,(s=new Date(e.answeredAt)).getTime()-i.getTime()))<6e4?`${String(Math.round(n/1e3))} s`:(0,a.duration)(i,s)}`;case"acknowledged":return"Received, not answered with pong";case"undeliverable":return"Ping not answered: undeliverable"}}],73330)},57665,e=>{"use strict";var t=e.i(56420);let i={name:"power",size:24,node:[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]};i.node;let s=(0,t.default)(i);e.s(["Power",0,s],57665)},95925,85627,e=>{"use strict";var t=e.i(56420);let i={name:"rotate-ccw",size:24,node:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]};i.node;let s=(0,t.default)(i);e.s(["RotateCcw",0,s],95925);let a={name:"sailboat",size:24,node:[["path",{d:"M10 2v15",key:"1qf71f"}],["path",{d:"M7 22a4 4 0 0 1-4-4 1 1 0 0 1 1-1h16a1 1 0 0 1 1 1 4 4 0 0 1-4 4z",key:"1pxcvx"}],["path",{d:"M9.159 2.46a1 1 0 0 1 1.521-.193l9.977 8.98A1 1 0 0 1 20 13H4a1 1 0 0 1-.824-1.567z",key:"5oog16"}]]};a.node;let n=(0,t.default)(a);e.s(["Sailboat",0,n],85627)},25398,e=>{"use strict";var t=e.i(56420);let i={name:"rotate-cw",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]};i.node;let s=(0,t.default)(i);e.s(["RotateCw",0,s],25398)},66787,e=>{"use strict";var t=e.i(56420);let i={name:"triangle-alert",size:24,node:[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["alert-triangle"]};i.node;let s=(0,t.default)(i);e.s(["TriangleAlert",0,s],66787)},92870,e=>{"use strict";var t=e.i(56420);let i={name:"user-check",size:24,node:[["path",{d:"m16 11 2 2 4-4",key:"9rsbq5"}],["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]};i.node;let s=(0,t.default)(i);e.s(["UserCheck",0,s],92870)},49319,e=>{"use strict";var t=e.i(56420);let i={name:"user-minus",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]};i.node;let s=(0,t.default)(i);e.s(["UserMinus",0,s],49319)},57443,e=>{"use strict";var t=e.i(56420);let i={name:"user-plus",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]};i.node;let s=(0,t.default)(i);e.s(["UserPlus",0,s],57443)},71139,e=>{"use strict";var t=e.i(56420);let i={name:"user-x",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"17",x2:"22",y1:"8",y2:"13",key:"3nzzx3"}],["line",{x1:"22",x2:"17",y1:"8",y2:"13",key:"1swrse"}]]};i.node;let s=(0,t.default)(i);e.s(["UserX",0,s],71139)},24010,e=>{"use strict";var t=e.i(43476);e.s([],58762),e.i(58762);var i=e.i(66250),s=e.i(2820),a=e.i(56736),n=e.i(9793),r=e.i(84324),o=e.i(64951),l=e.i(77173);let d=e.i(13488).DialogTrigger;var c=e.i(74217),u=e.i(25326);class h extends u.DialogHandle{}e.s(["Backdrop",()=>s.DialogBackdrop,"Close",()=>a.DialogClose,"Description",()=>n.DialogDescription,"Handle",0,h,"Popup",()=>r.DialogPopup,"Portal",()=>o.DialogPortal,"Root",0,function(e){return(0,i.useRenderDialogRoot)("alert-dialog",e)},"Title",()=>l.DialogTitle,"Trigger",0,d,"Viewport",()=>c.DialogViewport,"createHandle",0,function(){return new h}],34604);var p=e.i(34604),p=p,m=e.i(90063),g=e.i(94945);e.s(["AlertDialog",0,function(e){return(0,t.jsx)(p.Root,{"data-slot":"alert-dialog",...e})},"AlertDialogClose",0,function(e){return(0,t.jsx)(p.Close,{"data-slot":"alert-dialog-close",...e})},"AlertDialogContent",0,function({className:e,size:i,children:s,...a}){return(0,t.jsxs)(p.Portal,{children:[(0,t.jsx)(p.Backdrop,{"data-slot":"alert-dialog-overlay",className:g.dialogSurface.overlay}),(0,t.jsx)(p.Popup,{"data-slot":"alert-dialog-content",className:(0,m.classNames)(g.dialogSurface.popup({size:i}),e),...a,children:s})]})},"AlertDialogDescription",0,function({className:e,...i}){return(0,t.jsx)(p.Description,{"data-slot":"alert-dialog-description",className:(0,m.classNames)(g.dialogSurface.description,e),...i})},"AlertDialogFooter",0,function({className:e,...i}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,m.classNames)(g.dialogSurface.footer,e),...i})},"AlertDialogHeader",0,function({className:e,...i}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,m.classNames)(g.dialogSurface.header,e),...i})},"AlertDialogTitle",0,function({className:e,...i}){return(0,t.jsx)(p.Title,{"data-slot":"alert-dialog-title",className:(0,m.classNames)(g.dialogSurface.title,e),...i})}],24010)},94945,e=>{"use strict";let t={overlay:"fixed inset-0 isolate z-50 bg-overlay duration-(--duration-base) data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",popup:(0,e.i(25913).cva)("fixed top-1/2 left-1/2 z-50 grid max-h-[calc(100dvh-var(--spacing)*8)] w-full max-w-[calc(100%-var(--spacing)*8)] -translate-x-1/2 -translate-y-1/2 gap-4 overflow-y-auto rounded-xl border border-border bg-popover p-6 text-body text-popover-foreground shadow-lg duration-(--duration-base) outline-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:data-open:zoom-in-100 motion-reduce:data-closed:zoom-out-100",{variants:{size:{sm:"sm:max-w-(--size-dialog-sm)",md:"sm:max-w-(--size-dialog-md)"}},defaultVariants:{size:"sm"}}),header:"flex flex-col gap-2",footer:"flex flex-col-reverse gap-2 pt-1 sm:flex-row sm:justify-end",title:"text-heading font-semibold text-foreground",description:"text-body text-muted-foreground",phoneSheet:"max-sm:top-auto max-sm:bottom-0 max-sm:left-0 max-sm:max-w-full max-sm:translate-x-0 max-sm:translate-y-0 max-sm:rounded-none max-sm:rounded-t-2xl max-sm:border-x-0 max-sm:border-b-0 max-sm:px-4 max-sm:pb-[max(calc(var(--spacing)*4),env(safe-area-inset-bottom))] max-sm:[&_[data-slot=button]]:h-(--size-control-touch) max-sm:[&_[data-slot=button]]:w-full",phoneFullScreen:"max-sm:top-0 max-sm:left-0 max-sm:h-dvh max-sm:max-w-full max-sm:translate-x-0 max-sm:translate-y-0 max-sm:content-start max-sm:overflow-y-auto max-sm:rounded-none max-sm:border-0"};e.s(["dialogSurface",0,t])},17981,e=>{"use strict";var t=e.i(43476),i=e.i(22768),s=e.i(36518),a=e.i(25398),n=e.i(90063),r=e.i(15905);e.s(["InlineError",0,function({title:e,description:o,detail:l,onRetry:d,variant:c="section",id:u,className:h}){return"field"===c?(0,t.jsxs)("p",{id:u,"data-slot":"inline-error","data-variant":c,className:(0,n.classNames)("flex items-center gap-1.5 text-meta text-destructive-text [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",h),children:[(0,t.jsx)(i.CircleAlert,{"aria-hidden":!0}),e]}):"section"===c?(0,t.jsxs)("div",{role:"alert","data-slot":"inline-error","data-variant":c,className:(0,n.classNames)("flex gap-2 rounded-lg border border-tone-attention-border bg-tone-attention-bg p-3 text-tone-attention-fg",h),children:[(0,t.jsx)(i.CircleAlert,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon) shrink-0"}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("p",{className:"text-body font-medium",children:e}),o?(0,t.jsx)("p",{className:"text-meta text-foreground",children:o}):null,d?(0,t.jsx)(r.Button,{size:"xs",icon:(0,t.jsx)(a.RotateCw,{"aria-hidden":!0}),onClick:d,className:"self-start",children:"Try again"}):null]})]}):(0,t.jsxs)("div",{role:"alert","data-slot":"inline-error","data-variant":c,className:(0,n.classNames)("flex flex-col items-center gap-3 rounded-lg border border-border bg-card px-6 py-10 text-center",h),children:[(0,t.jsx)("span",{"aria-hidden":!0,className:"flex size-10 items-center justify-center rounded-lg border border-tone-attention-border bg-tone-attention-bg text-tone-attention-fg [&_svg]:size-(--size-icon-xl)",children:(0,t.jsx)(s.CloudOff,{})}),(0,t.jsx)("h2",{className:"text-heading font-semibold text-foreground max-sm:text-heading-touch",children:e}),o?(0,t.jsx)("p",{className:"max-w-96 text-meta text-muted-foreground max-sm:text-body-touch",children:o}):null,l?(0,t.jsx)("code",{className:"rounded-sm border border-border bg-muted px-2 py-0.5 font-mono text-id text-muted-foreground",children:l}):null,d?(0,t.jsx)("div",{className:"flex items-center gap-2 max-sm:w-full max-sm:flex-col",children:(0,t.jsx)(r.Button,{size:"sm",icon:(0,t.jsx)(a.RotateCw,{"aria-hidden":!0}),onClick:d,className:"max-sm:w-full",children:"Try again"})}):null]})}])},78865,e=>{"use strict";var t=e.i(43476),i=e.i(49655),s=e.i(87255),a=e.i(76561),n=e.i(47211),r=e.i(22768),o=e.i(50092),l=e.i(36604),d=e.i(19002),c=e.i(32297),u=e.i(21048),h=e.i(74544),p=e.i(85595),m=e.i(52886),g=e.i(26391),y=e.i(19647),f=e.i(16984),b=e.i(10001),x=e.i(71028),v=e.i(81658),k=e.i(44594),w=e.i(11568),C=e.i(25799),M=e.i(85512),S=e.i(57665),j=e.i(95925),R=e.i(85627),z=e.i(66787),I=e.i(92870),O=e.i(56420);let D={name:"user-round-search",size:24,node:[["circle",{cx:"10",cy:"8",r:"5",key:"o932ke"}],["path",{d:"M2 21a8 8 0 0 1 10.434-7.62",key:"1yezr2"}],["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["path",{d:"m22 22-1.9-1.9",key:"1e5ubv"}]]};D.node;let A=(0,O.default)(D);var P=e.i(90063),N=e.i(66390);let L={waiting:"border-tone-waiting-border bg-tone-waiting-bg text-tone-waiting-fg",active:"border-tone-active-border bg-tone-active-bg text-tone-active-fg",ok:"border-tone-ok-border bg-tone-ok-bg text-tone-ok-fg",attention:"border-tone-attention-border bg-tone-attention-bg text-tone-attention-fg",ended:"border-tone-ended-border bg-tone-ended-bg text-tone-ended-fg"},q={awaitingCrew:{tone:"waiting",Icon:m.CircleDashed,label:"Awaiting crew"},crewed:{tone:"ok",Icon:I.UserCheck,label:"Crewed"},retired:{tone:"ended",Icon:a.Archive,label:"Retired"},pending:{tone:"waiting",Icon:v.Hourglass,label:"Pending"},received:{tone:"active",Icon:k.Inbox,label:"Received"},handed:{tone:"active",Icon:o.CircleArrowRight,label:"Handed (pulled)"},handedPushed:{tone:"active",Icon:o.CircleArrowRight,label:"Handed"},overdue:{tone:"attention",Icon:i.AlarmClock,label:"Overdue"},acknowledged:{tone:"ok",Icon:p.CircleCheck,label:"Acknowledged"},handled:{tone:"ok",Icon:l.CircleCheckBig,label:"Handled"},notHandled:{tone:"attention",Icon:r.CircleAlert,label:"Not handled"},undeliverable:{tone:"attention",Icon:f.CircleX,label:"Undeliverable"},dismissed:{tone:"ended",Icon:y.CircleMinus,label:"Dismissed"},abandoned:{tone:"ended",Icon:n.Ban,label:"Abandoned"},forming:{tone:"waiting",Icon:g.CircleDotDashed,label:"Forming"},sailing:{tone:"ok",Icon:R.Sailboat,label:"Sailing"},"standing-down":{tone:"active",Icon:s.Anchor,label:"Standing down"},disbanded:{tone:"ended",Icon:b.FlagOff,label:"Disbanded"},"at-limit":{tone:"waiting",Icon:x.Gauge,label:"At limit"},"over-limit":{tone:"attention",Icon:z.TriangleAlert,label:"Over limit"},needsCrew:{tone:"waiting",Icon:h.Clock,label:"Needs crew"},crewedByHand:{tone:"ok",Icon:I.UserCheck,label:"Crewed by hand"},crewing:{tone:"active",Icon:w.LoaderCircle,label:"Crewing"},running:{tone:"ok",Icon:c.CirclePlay,label:"Running"},restarting:{tone:"waiting",Icon:j.RotateCcw,label:"Restarting"},crashed:{tone:"attention",Icon:f.CircleX,label:"Crashed"},releasing:{tone:"active",Icon:S.Power,label:"Releasing"},stuck:{tone:"attention",Icon:M.OctagonAlert,label:"Stuck"},delivering:{tone:"ok",Icon:C.MailCheck,label:"Delivering"},noShipCanTake:{tone:"attention",Icon:u.CircleSlash,label:"No ship can take"},waitingForCrew:{tone:"waiting",Icon:A,label:"Waiting for crew"},stalledInFlight:{tone:"waiting",Icon:d.CirclePause,label:"Stalled in flight"}};e.s(["StatusBadge",0,function({status:e,className:i}){let{tone:s,Icon:a,label:n}=q[e];return(0,t.jsxs)(N.Badge,{variant:"outline","data-slot":"status-badge","data-status":e,className:(0,P.classNames)(L[s],"abandoned"===e?"border-dashed":void 0,i),children:[(0,t.jsx)(a,{"aria-hidden":!0}),n]})},"statusLabel",0,function(e){return q[e].label}],78865)},21959,e=>{"use strict";var t=e.i(43476),i=e.i(76561),s=e.i(8734),a=e.i(86247),n=e.i(44594),r=e.i(58925),o=e.i(68997),l=e.i(15331),d=e.i(60011),c=e.i(19759),u=e.i(49319),h=e.i(57443),p=e.i(71139),m=e.i(22016),g=e.i(71645),y=e.i(5387),f=e.i(17540),b=e.i(90262),x=e.i(80581),v=e.i(73330),k=e.i(53573),w=e.i(86165),C=e.i(48695),M=e.i(84294),S=e.i(84156),j=e.i(15905),R=e.i(57334),z=e.i(75305),I=e.i(41880);let O=(0,f.lazyDialog)(()=>e.A(26403).then(e=>e.ReleaseDialog),e=>e.isOpen),D=(0,f.lazyDialog)(()=>e.A(88138).then(e=>e.RemoveMemberDialog),e=>e.isOpen),A=(0,f.lazyDialog)(()=>e.A(57993).then(e=>e.RenameDialog),e=>e.isOpen),P=(0,f.lazyDialog)(()=>e.A(41585).then(e=>e.RetireDialog),e=>e.isOpen),N=(0,f.lazyDialog)(()=>e.A(95953).then(e=>e.StartingPromptDialog),e=>e.isOpen);function L({ship:e,layout:a,compose:m,squadron:f,member:w,isMembershipPending:j,crewLine:R}){var z,q;let T=(0,b.useAccess)(),[H,Q]=(0,g.useState)(),[B,F]=(0,g.useState)(!1),[U,$]=(0,g.useState)(void 0),_=(0,y.useGetStartingPrompt)(),G=(0,y.useReleaseShip)(),V=(0,y.useRetireShip)(),X=(0,y.useRecrewShip)(),K=(0,y.useRenameShip)(),W=(0,y.usePingShip)(),J=(0,y.useFleetSnapshot)(),Y=(0,y.useLabelContext)(),Z=(0,k.useShip)("release"===H||"recrew"===H||"retire"===H||"remove"===H?e.id:void 0),ee=(0,C.useRemoveMember)(),et=()=>{Q(void 0)},ei=_.data??X.data,es=ei?"shown":_.isError?"error":"issuing",ea=e=>()=>{G.reset(),V.reset(),X.reset(),K.reset(),ee.reset(),Q(e)},en=async()=>{try{await navigator.clipboard.writeText(e.id),(0,I.showToast)({title:"Ship id copied",description:e.id,tone:"success"})}catch{(0,I.showToast)({title:"Couldn’t copy the ship id",description:e.id,tone:"error"})}},er=f?.flagship.shipId===e.id,eo={key:"message",label:"Message",menuLabel:"Message this ship…",icon:c.SquarePen,testId:"fleet-ship-message",onSelect:()=>{F(!0)},isMenuOnly:!0,needs:"canSend"},el={key:"copy",label:"Copy ship id",menuLabel:"Copy ship id",icon:s.Copy,testId:"fleet-ship-copy-id",onSelect:()=>{en()},isMenuOnly:!0},ed=(0,v.canPing)(e)?[{key:"ping",label:"Ping",menuLabel:"Ping",icon:l.Radio,testId:"fleet-ship-ping",onSelect:()=>{W.mutate({shipId:e.id},{onSuccess:({isNew:t})=>{(0,I.showToast)(t?{title:`Pinged ${e.name}`,description:"Its session answers with pong on its next turn.",tone:"success"}:{title:`A ping already waits for ${e.name}`,description:"Pings never stack: this is the one shown.",tone:"info"})},onError:t=>{(0,I.showToast)({title:`Couldn’t ping ${e.name}`,description:t.message,tone:"error"})}})},isLoading:W.isPending,needs:"canManage"}]:[],ec=[];return"operator"===e.kind?ec.push({key:"inbox",label:"Open inbox",menuLabel:"Open inbox",icon:n.Inbox,testId:"fleet-ship-open-inbox",href:"/inbox",isMenuOnly:!0},el):"retired"===e.status||"viewer"===e.kind?ec.push(el):er?ec.push({key:"squadron",label:"Open squadron",menuLabel:"Open squadron",icon:d.Shapes,testId:"fleet-ship-open-squadron",href:`/squadrons/${f.id}`}):j?ec.push(eo,el,...ed):w&&f?(ec.push(eo,el,...ed,{key:"crew-line",label:"Get new crew line",menuLabel:"Get new crew line…",icon:r.KeyRound,testId:"fleet-ship-new-crew-line",onSelect:R.start,needs:"canManage",isDisabled:!R.isReady,isPrimary:"silent"===w.health}),"crewed"===e.status&&ec.push({key:"release",label:"Release",menuLabel:"Release ship…",icon:p.UserX,testId:"fleet-ship-release",onSelect:ea("release"),needs:"canManage"}),("sailing"===f.state||"standing-down"===f.state)&&ec.push({key:"remove",label:"Remove from squadron",menuLabel:"Remove from squadron…",icon:u.UserMinus,testId:"fleet-ship-remove",onSelect:ea("remove"),isDestructive:!0,needs:"canManage"})):(ec.push(eo,el),"awaitingCrew"===e.status?ec.push({key:"prompt",label:"Get starting prompt",menuLabel:"Get starting prompt…",icon:r.KeyRound,testId:"fleet-ship-prompt",onSelect:()=>{_.reset(),X.reset(),$((0,S.isUnclaimedPromptOut)(e)&&e.startingPrompt?{issuedAt:e.startingPrompt.issuedAt}:void 0),Q("prompt"),_.mutate({shipId:e.id})},needs:"canManage"}):ec.push(...ed,{key:"recrew",label:"Re-crew",menuLabel:"Re-crew…",icon:h.UserPlus,testId:"fleet-ship-recrew",onSelect:ea("recrew"),needs:"canManage"},{key:"release",label:"Release",menuLabel:"Release ship…",icon:p.UserX,testId:"fleet-ship-release",onSelect:ea("release"),needs:"canManage"}),ec.push({key:"rename",label:"Rename",menuLabel:"Rename…",icon:o.Pen,testId:"fleet-ship-rename",onSelect:ea("rename"),needs:"canManage"},{key:"retire",label:"Retire",menuLabel:"Retire ship…",icon:i.Archive,testId:"fleet-ship-retire",onSelect:ea("retire"),isDestructive:!0,needs:"canManage"})),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(E,{layout:a,ship:e,actions:(z=ec,q=T,z.filter(e=>void 0===e.needs||q[e.needs]))}),(0,t.jsx)(O,{shipName:e.name,sessionLocation:null===e.location?null:e.location.description??e.location.kind.toLowerCase(),inFlightCount:Z.data?.inFlightDeliveries??0,mode:"recrew"===H?"recrew":"release",isOpen:("release"===H||"recrew"===H)&&void 0!==Z.data,onOpenChange:e=>{e||et()},isPending:G.isPending||X.isPending,error:("recrew"===H?X.error:G.error)?.message,onConfirm:()=>{"recrew"===H?X.mutate({shipId:e.id},{onSuccess:()=>{$(void 0),Q("prompt")}}):G.mutate({shipId:e.id},{onSuccess:et})}}),(0,t.jsx)(P,{shipName:e.name,openDeliveries:Z.data?.openDeliveries??0,isCrewed:"crewed"===e.status,isOpen:"retire"===H&&void 0!==Z.data,onOpenChange:e=>{e||et()},isPending:V.isPending,error:V.error?.message,onConfirm:()=>{V.mutate({shipId:e.id},{onSuccess:et})},labelLines:void 0===Y?void 0:(0,x.retireLabelLines)((0,x.retiredLabelsOf)(e,Y))}),f&&w&&(0,t.jsx)(D,{squadronId:f.id,member:w,othersOfRole:(0,M.otherMembersOfRole)(f,w.shipId),openDeliveries:Z.data?.openDeliveries??0,inFlightDeliveries:Z.data?.inFlightDeliveries??0,isOpen:"remove"===H&&void 0!==Z.data,onOpenChange:e=>{e||et()},isPending:ee.isPending,error:ee.error?.message,onConfirm:()=>{ee.mutate({squadronId:f.id,shipId:w.shipId},{onSuccess:et})}}),(0,t.jsx)(A,{shipName:e.name,activeNames:(J.data??[]).filter(e=>"retired"!==e.status).map(e=>e.name),isOpen:"rename"===H,onOpenChange:e=>{e||et()},isPending:K.isPending,error:K.error?.message,onSubmit:t=>{K.mutate({shipId:e.id,name:t},{onSuccess:et})}}),(0,t.jsx)(N,{shipName:e.name,state:es,prompt:ei?.prompt,crewLines:ei?.crewLines,replacesUnclaimed:U,error:_.error?.message,isOpen:"prompt"===H,onOpenChange:e=>{e||(_.reset(),X.reset(),et())},onConfirm:()=>{X.reset(),_.mutate({shipId:e.id})}}),R.dialog,B&&(0,t.jsx)(m,{isOpen:!0,onOpenChange:F,toShipId:e.id})]})}function q({action:e,className:i}){let s=e.isPrimary?"primary":e.isDestructive||"rename"===e.key?"ghost":"secondary";return void 0!==e.href?(0,t.jsx)(j.Button,{size:"xs",variant:s,nativeButton:!1,"data-testid":e.testId,className:i,render:(0,t.jsx)(m.default,{href:e.href}),children:e.label}):(0,t.jsx)(j.Button,{size:"xs",variant:s,"data-testid":e.testId,disabled:e.isDisabled,isLoading:e.isLoading,className:i,onClick:e.onSelect,children:e.label})}function T(e,t){let i=e[t-1],s=e[t];return void 0!==i&&void 0!==s&&(!0===i.isMenuOnly&&!0!==s.isMenuOnly||!0===s.isDestructive&&!0!==i.isDestructive)}function E({layout:e,ship:i,actions:s}){if("next"===e){let e=s.find(e=>"prompt"===e.key||"crew-line"===e.key&&!0===e.isPrimary);return e?(0,t.jsx)(q,{action:{...e,isPrimary:!1},className:"max-sm:h-(--size-control-touch) max-sm:w-full max-sm:text-body-touch"}):null}if("buttons"===e){let e=s.filter(e=>!0!==e.isMenuOnly);return 0===e.length?null:(0,t.jsx)("div",{className:"flex flex-wrap items-center justify-end gap-2 max-sm:justify-start",children:e.map(e=>(0,t.jsx)(q,{action:e},e.key))})}let n=(0,t.jsx)(j.Button,{size:"sheet"===e?"touch":"xs",variant:"ghost",isIconOnly:!0,"aria-label":`Actions for ${i.name}`,icon:(0,t.jsx)(a.Ellipsis,{}),"data-testid":"fleet-actions"});return"sheet"===e?(0,t.jsxs)(z.Sheet,{children:[(0,t.jsx)(z.SheetTrigger,{render:n}),(0,t.jsxs)(z.SheetContent,{side:"bottom","data-testid":"fleet-row-sheet",children:[(0,t.jsx)(z.SheetHeader,{children:(0,t.jsx)(z.SheetTitle,{children:i.name})}),(0,t.jsx)("ul",{className:"flex flex-col pb-2",children:s.map((e,i)=>(0,t.jsx)("li",{className:T(s,i)?"mt-1 border-t border-border pt-1":void 0,children:(0,t.jsxs)(z.SheetClose,{render:void 0===e.href?(0,t.jsx)("button",{type:"button",disabled:e.isDisabled,onClick:e.onSelect}):(0,t.jsx)(m.default,{href:e.href}),"data-testid":e.testId,className:`flex h-(--size-control-touch) w-full items-center gap-3 px-4 text-left text-body-touch disabled:opacity-45 [&_svg]:size-(--size-icon) [&_svg]:shrink-0 ${e.isDestructive?"text-destructive-text":"text-foreground"}`,children:[(0,t.jsx)(e.icon,{"aria-hidden":!0}),e.menuLabel.replace(/…$/,"")]})},e.key))}),(0,t.jsx)("div",{className:"px-4 pb-4",children:(0,t.jsx)(z.SheetClose,{render:(0,t.jsx)(j.Button,{size:"touch",className:"w-full"}),children:"Cancel"})})]})]}):(0,t.jsxs)(R.DropdownMenu,{children:[(0,t.jsx)(R.DropdownMenuTrigger,{render:n}),(0,t.jsx)(R.DropdownMenuContent,{children:s.map((e,i)=>(0,t.jsxs)(g.Fragment,{children:[T(s,i)?(0,t.jsx)(R.DropdownMenuSeparator,{}):null,void 0===e.href?(0,t.jsxs)(R.DropdownMenuItem,{"data-testid":e.testId,disabled:e.isDisabled,variant:e.isDestructive?"destructive":"default",onClick:e.onSelect,children:[(0,t.jsx)(e.icon,{"aria-hidden":!0}),e.menuLabel]}):(0,t.jsxs)(R.DropdownMenuItem,{"data-testid":e.testId,render:(0,t.jsx)(m.default,{href:e.href}),children:[(0,t.jsx)(e.icon,{"aria-hidden":!0}),e.menuLabel]})]},e.key))})]})}e.s(["ShipActions",0,function({ship:e,layout:i="buttons",compose:s,crewLineFlow:a}){let n=(0,w.useSquadronsConnection)(),r=(0,C.useSquadrons)(),o=r.data?.find(t=>"disbanded"!==t.state&&(t.flagship.shipId===e.id||t.members.some(t=>t.shipId===e.id))),l=void 0!==o&&o.flagship.shipId!==e.id,d=(0,k.useShip)(l&&"retired"!==e.status?e.id:void 0),c=o?.members.find(t=>t.shipId===e.id),u="unknown"===n||"connected"===n&&!r.isFetched;return(0,t.jsx)(a,{of:o&&c?{squadronId:o.id,member:c,ship:d.data??void 0}:void 0,children:a=>(0,t.jsx)(L,{ship:e,layout:i,compose:s,squadron:o,member:c,isMembershipPending:u,crewLine:a})})}])},15327,e=>{"use strict";var t=e.i(43476),i=e.i(71645),s=e.i(17540),a=e.i(26808),n=e.i(48695),r=e.i(15905),o=e.i(24010),l=e.i(94945);function d({memberName:e,replacedText:i,isOpen:s,onOpenChange:a,onConfirm:n}){return(0,t.jsx)(o.AlertDialog,{open:s,onOpenChange:a,children:(0,t.jsxs)(o.AlertDialogContent,{"data-testid":"new-crew-line-confirm",className:l.dialogSurface.phoneSheet,children:[(0,t.jsxs)(o.AlertDialogHeader,{children:[(0,t.jsxs)(o.AlertDialogTitle,{children:["Get a new crew line for ",e,"?"]}),(0,t.jsx)(o.AlertDialogDescription,{children:i??"Its new secret is shown once, with its launch note."})]}),(0,t.jsxs)(o.AlertDialogFooter,{children:[(0,t.jsx)(o.AlertDialogClose,{render:(0,t.jsx)(r.Button,{}),children:"Cancel"}),(0,t.jsx)(r.Button,{variant:"primary","data-testid":"new-crew-line-confirm-submit",onClick:n,children:"Get new crew line"})]})]})})}let c=(0,s.lazyDialog)(()=>e.A(88207).then(e=>e.CrewLineDialog),e=>e.isOpen);function u(e){let s=(0,n.useNewCrewLine)(),[r,o]=(0,i.useState)(!1),[l,u]=(0,i.useState)(!1),[h,p]=(0,i.useState)(void 0),m=()=>{e&&s.mutate({squadronId:e.squadronId,shipId:e.member.shipId})},g=s.data?"shown":s.isError?"error":"issuing";return{isReady:e?.ship!==void 0,start:()=>{e?.ship&&(s.reset(),p((0,a.newCrewLineReplaced)(e.ship)),u(!0))},dialog:e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d,{memberName:e.member.name,replacedText:h,isOpen:l,onOpenChange:u,onConfirm:()=>{u(!1),o(!0),m()}}),(0,t.jsx)(c,{memberName:e.member.name,state:g,template:e.template,launchNote:s.data?.launchNote,model:s.data?.model,crewLines:s.data?.crewLines,error:s.error?.message,isOpen:r,onOpenChange:e=>{o(e),e||s.reset()},onConfirm:m})]}):null}}e.s(["GetNewCrewLine",0,function({isPrimary:e=!1,testId:i,...s}){let a=u(s);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.Button,{size:"xs",variant:e?"primary":"secondary",disabled:!a.isReady,"data-testid":i,onClick:a.start,children:"Get new crew line"}),a.dialog]})},"NewCrewLineFlow",0,function({of:e,children:t}){return t(u(e))},"useNewCrewLineFlow",0,u],15327)},46150,e=>{"use strict";e.s(["OPERATOR_NAME",0,"argo","capitalised",0,function(e){return e.charAt(0).toUpperCase()+e.slice(1)},"counted",0,function(e,t){return`${String(e)} ${1===e?t.one:t.many}`},"ship",0,function(e){return{kind:"ship",party:e}},"text",0,function(e){return{kind:"text",text:e}}])},26808,e=>{"use strict";var t=e.i(46150);let i={one:"delivery",many:"deliveries"};function s(e){if(0===e)return"Nothing is in flight, so no delivery moves.";let i=1===e?"returns":"return";return`${(0,t.counted)(e,{one:"in-flight delivery",many:"in-flight deliveries"})} ${i} to pending. Nothing is lost.`}e.s(["abandonedLine",0,function(e){return`${(0,t.counted)(e,i)} will be abandoned`},"inFlightLine",0,s,"isTypedMatch",0,function(e,t){return t===e},"newCrewLineReplaced",0,function(e){if("crewed"===e.status){let t=null===e.location?"the session crewing it":`the session on ${e.location.description??e.location.kind.toLowerCase()}`;return`This ends ${t}. ${s(e.inFlightDeliveries)}`}if(null!==e.startingPrompt&&!e.startingPrompt.isClaimed)return"The crew line issued earlier, not claimed yet, stops working."},"retireButtonLabel",0,function(e){return 0===e?"Retire ship":`Retire and abandon ${(0,t.counted)(e,i)}`}])},53573,e=>{"use strict";var t=e.i(70597),i=e.i(19273),s=e.i(86448),a=e.i(66027),n=e.i(5387),r=e.i(27702);e.s(["useMessage",0,function(e){let t=(0,r.useTRPC)();return(0,a.useQuery)(t.fleet.message.queryOptions(void 0===e?i.skipToken:{messageId:e}))},"useShip",0,function(e){let s=(0,r.useTRPC)();return(0,a.useQuery)(s.fleet.ship.queryOptions(void 0===e?i.skipToken:{shipId:e},{refetchInterval:n.LAST_SEEN_REFRESH_MS,select:e=>(0,t.isInReadReach)(e)?e:null}))},"useShipMessages",0,function(e){let t=(0,r.useTRPC)();return(0,a.useQuery)(t.fleet.shipMessages.queryOptions({shipId:e}))},"useShipTimeline",0,function(e){let t=(0,r.useTRPC)();return(0,a.useQuery)(t.fleet.shipTimeline.queryOptions({shipId:e}))},"useShipWay",0,function(e){let t=(0,r.useTRPC)();return(0,a.useQuery)(t.fleet.shipWay.queryOptions({shipId:e},{refetchInterval:n.LAST_SEEN_REFRESH_MS}))},"useShips",0,function(e){let i=(0,r.useTRPC)(),a=(0,s.useQueries)({queries:e.map(e=>i.fleet.ship.queryOptions({shipId:e},{refetchInterval:n.LAST_SEEN_REFRESH_MS}))}),o=new Map;for(let e of a)e.data&&(0,t.isInReadReach)(e.data)&&o.set(e.data.id,e.data);return o}])},84156,e=>{"use strict";e.s(["isUnclaimedPromptOut",0,function(e){return null!==e.startingPrompt&&!e.startingPrompt.isClaimed}])}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,24071,e=>{"use strict";var s=e.i(56420);let t={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};t.node;let a=(0,s.default)(t);e.s(["ChevronLeft",0,a],24071)},67927,e=>{"use strict";var s=e.i(56420);let t={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};t.node;let a=(0,s.default)(t);e.s(["ChevronRight",0,a],67927)},66595,e=>{"use strict";var s=e.i(56420);let t={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};t.node;let a=(0,s.default)(t);e.s(["Search",0,a],66595)},19759,e=>{"use strict";var s=e.i(56420);let t={name:"square-pen",size:24,node:[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],aliases:["pen-box","edit","pen-square"]};t.node;let a=(0,s.default)(t);e.s(["SquarePen",0,a],19759)},39334,e=>{"use strict";var s=e.i(43476),t=e.i(62687),a=e.i(65041),r=e.i(57665),n=e.i(71645),i=e.i(17540),l=e.i(90262),d=e.i(54492),o=e.i(5387),c=e.i(53573),u=e.i(15905);let m=(0,i.lazyDialog)(()=>e.A(5419).then(e=>e.CrewReleaseDialog),e=>e.isOpen);function h({ship:e}){let t=(0,l.useAccess)(),a=(0,o.useRemoveCrewRequest)(),[i,x]=(0,n.useState)(!1),p=(0,c.useShip)(i?e.id:void 0),f=(0,d.crewRequestStage)(e);return t.canManage&&"assigned"===f.kind&&"crashed"===f.status?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.Button,{size:"xs",icon:(0,s.jsx)(r.Power,{}),"data-testid":"needs-crew-release",onClick:()=>{a.reset(),x(!0)},children:"Release…"}),(0,s.jsx)(m,{shipName:e.name,stage:f,inFlightCount:p.data?.inFlightDeliveries??0,isOpen:i&&void 0!==p.data,onOpenChange:x,isPending:a.isPending,error:null===a.error?void 0:`${a.error.message} Nothing changed.`,onConfirm:()=>{a.mutate({shipId:e.id},{onSuccess:()=>{x(!1)}})}})]}):null}var x=e.i(21959),p=e.i(15327),f=e.i(18964),g=e.i(86875),j=e.i(22016),v=e.i(49841),b=e.i(49635),w=e.i(66390),y=e.i(67874),N=e.i(17981),k=e.i(88393),S=e.i(78865);function C({at:e,now:t}){let a=new Date(e);return(0,s.jsx)("time",{dateTime:e,title:(0,b.fullDateTime)(a),className:"tabular-nums",children:t.getTime()-a.getTime()<864e5?`Today, ${(0,b.clockTime)(a)}`:(0,b.shortDateTime)(a)})}function q({ship:e,now:t}){let a=(0,v.handCrewOf)(e);switch(a.kind){case"no-prompt":return(0,s.jsx)("span",{className:"text-muted-foreground",children:"No starting prompt issued"});case"prompt-unclaimed":return(0,s.jsxs)("span",{className:"flex flex-col",children:[(0,s.jsxs)("span",{children:["Prompt issued ",(0,s.jsx)(C,{at:a.issuedAt,now:t})]}),(0,s.jsx)("span",{className:"text-muted-foreground",children:"No session has taken it yet"})]});case"crew-ended":return(0,s.jsxs)("span",{className:"flex flex-col",children:[(0,s.jsx)("span",{children:"Was crewed by hand"}),null===a.endedAt?null:(0,s.jsxs)("span",{className:"text-muted-foreground",children:["Lease ended ",(0,s.jsx)(C,{at:a.endedAt,now:t})]})]})}}function R({ship:e}){let t=(0,d.crewRequestStage)(e);return"assigned"===t.kind?(0,s.jsxs)("span",{className:"flex flex-wrap items-center gap-x-2 gap-y-1",children:[(0,s.jsx)(S.StatusBadge,{status:t.status}),(0,s.jsxs)("span",{className:"inline-flex items-center gap-1",children:["on",(0,s.jsxs)(j.default,{href:`/trierarchs/${t.trierarch.id}`,className:"inline-flex items-center gap-1 font-medium underline decoration-input underline-offset-3 [&_svg]:size-(--size-icon-sm) [&_svg]:text-muted-foreground",children:[(0,s.jsx)(g.ShipWheel,{"aria-hidden":!0}),t.trierarch.name]})]})]}):(0,s.jsxs)("span",{className:"flex flex-wrap items-center gap-x-2 gap-y-1",children:[(0,s.jsx)(S.StatusBadge,{status:"needsCrew"}),(0,s.jsx)("span",{className:"text-muted-foreground",children:"needsCrew"===t.kind&&null!==t.reason?t.reason:"Not assigned yet"})]})}let z="grid items-center gap-x-4 gap-y-1.5 px-4 py-3 max-sm:grid-cols-1 max-sm:px-3.5 sm:grid-cols-[minmax(0,1fr)_minmax(0,1.6fr)_minmax(0,1fr)_minmax(0,11rem)]";function T({ships:e,hasTrierarchs:t,error:a,onRetry:r,actionOf:n,now:i}){return void 0!==a?(0,s.jsx)(N.InlineError,{variant:"page",title:"Couldn’t read the fleet",description:"Nothing changed.",detail:a,onRetry:r}):void 0===e?(0,s.jsx)(k.LoadingSkeleton,{variant:"table",rows:3,label:"Loading Needs crew"}):0===e.length?(0,s.jsx)(y.EmptyState,{icon:(0,s.jsx)(f.ListChecks,{"aria-hidden":!0}),title:"Nothing needs crew",description:t?"Every crew request is running. A request shows here while it waits for a trierarch, is crewing, restarting or crashed.":"No ship with a crew request awaits crew. Request a crew on a ship’s page to put it here."}):(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)("div",{className:"overflow-hidden rounded-lg border border-border bg-card","data-testid":"needs-crew-list",children:[(0,s.jsxs)("div",{className:`${z} border-b border-border bg-muted py-2.5 text-caption font-medium text-muted-foreground max-sm:hidden`,"aria-hidden":!0,children:[(0,s.jsx)("span",{children:"Ship"}),(0,s.jsx)("span",{children:t?"Status":"Crew"}),(0,s.jsx)("span",{children:"Requested"}),(0,s.jsx)("span",{className:"sr-only",children:"Next step"})]}),(0,s.jsx)("ul",{className:"divide-y divide-border",children:e.map(e=>(0,s.jsxs)("li",{className:`${z} text-body`,"data-testid":"needs-crew-row",children:[(0,s.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[(0,s.jsx)(j.default,{href:`/ships/${e.id}`,className:"truncate font-medium hover:underline","data-testid":"needs-crew-ship",children:e.name}),(0,s.jsx)(w.Badge,{variant:"type",children:e.type})]}),(0,s.jsx)("span",{className:"min-w-0 text-meta",children:t?(0,s.jsx)(R,{ship:e}):(0,s.jsx)(q,{ship:e,now:i})}),(0,s.jsx)("span",{className:"flex flex-col text-meta",children:null===e.crewRequest?null:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(C,{at:e.crewRequest.requestedAt,now:i}),i.getTime()-new Date(e.crewRequest.requestedAt).getTime()<864e5?(0,s.jsx)("span",{className:"text-muted-foreground",children:(0,b.relativeTime)(new Date(e.crewRequest.requestedAt),i)}):null]})}),(0,s.jsx)("span",{className:"flex justify-end max-sm:justify-start",children:n?.(e)})]},e.id))})]}),(0,s.jsx)("p",{className:"text-meta text-muted-foreground",children:t?"Running requests are not listed here; the fleet overview shows them. A request stays until you release the ship.":"A request stays until you remove it or release the ship. With the trierarch plugin, trierarchs crew these for you."})]})}var A=e.i(77821),P=e.i(87964),K=e.i(18423),L=e.i(28459),D=e.i(96676),I=e.i(3979),F=e.i(78485);e.s(["default",0,function(){let e=(0,D.useNow)(),r=(0,P.useConsoleFrame)(),n=(0,L.useNeedsAttention)(),i=(0,K.useLiveFleet)(),l=(0,o.useFleetSnapshot)(),d=(0,I.usePluginNav)();(0,F.useSignInWhenSessionEnds)([n.error,i.error,l.error]);let{hasTrierarchs:c}=d;return(0,s.jsx)(A.ListPage,{...r,title:"Needs crew",description:c?"Ships with a crew request that are not running. Trierarchs crew them; you step in when one crashes or waits for room.":"Ships you asked to keep crewed that have no crew. Crew each one by hand; crewing it fulfils the request.",live:i.live,toolbar:(0,s.jsx)(t.FleetSegments,{active:"needs-crew",needsCrewCount:d.needsCrewCount}),children:(0,s.jsx)(T,{ships:void 0===l.data?void 0:(0,v.needsCrew)(l.data,{hasTrierarchs:c}),hasTrierarchs:c,error:l.isError?l.error.message:void 0,onRetry:()=>{l.refetch()},actionOf:e=>c?(0,s.jsx)(h,{ship:e}):(0,s.jsx)(x.ShipActions,{ship:e,layout:"next",compose:a.ComposeMessage,crewLineFlow:p.NewCrewLineFlow}),now:e})})}],39334)},36651,e=>{"use strict";var s=e.i(43476),t=e.i(90063);e.s(["Kbd",0,function({className:e,...a}){return(0,s.jsx)("kbd",{"data-slot":"kbd",className:(0,t.classNames)("inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-xs border border-border bg-muted px-1.25 font-sans text-micro font-medium text-muted-foreground max-sm:hidden",e),...a})}])},19321,e=>{"use strict";var s=e.i(43476),t=e.i(90063);e.s(["Skeleton",0,function({className:e,...a}){return(0,s.jsx)("div",{"data-slot":"skeleton","aria-hidden":!0,className:(0,t.classNames)("animate-pulse rounded-sm bg-secondary [animation-duration:var(--duration-pulse)] motion-reduce:animate-none",e),...a})}])},67874,e=>{"use strict";var s=e.i(43476),t=e.i(90063);e.s(["EmptyState",0,function({title:e,description:a,icon:r,action:n,variant:i="page",className:l}){return"section"===i?(0,s.jsxs)("p",{"data-slot":"empty-state","data-variant":i,className:(0,t.classNames)("rounded-lg border border-border px-4 py-3 text-center text-meta text-muted-foreground",l),children:[e,a?(0,s.jsxs)(s.Fragment,{children:[" ",a]}):null]}):"no-results"===i?(0,s.jsxs)("div",{"data-slot":"empty-state","data-variant":i,className:(0,t.classNames)("flex flex-col items-center gap-2.5 rounded-lg border border-border bg-card px-4 py-6 text-center",l),children:[(0,s.jsx)("p",{className:"text-meta text-muted-foreground",children:e}),n]}):(0,s.jsxs)("div",{"data-slot":"empty-state","data-variant":i,className:(0,t.classNames)("flex flex-col items-center gap-3 rounded-lg border border-dashed border-border bg-card px-6 py-10 text-center",l),children:[r?(0,s.jsx)("span",{"aria-hidden":!0,className:"flex size-10 items-center justify-center rounded-lg border border-border bg-muted text-muted-foreground [&_svg]:size-(--size-icon-xl)",children:r}):null,(0,s.jsx)("h2",{className:"text-heading font-semibold text-foreground max-sm:text-heading-touch",children:e}),a?(0,s.jsx)("p",{className:"max-w-96 text-meta text-muted-foreground max-sm:text-body-touch",children:a}):null,n?(0,s.jsx)("div",{className:"mt-1 max-sm:w-full max-sm:[&>*]:w-full",children:n}):null]})}])},62687,e=>{"use strict";var s=e.i(43476),t=e.i(22016),a=e.i(90063);e.s(["FleetSegments",0,function({active:e,needsCrewCount:r}){let n=e=>(0,a.classNames)("flex h-(--size-control-touch) grow items-center justify-center gap-1.5 rounded-md text-body-touch font-medium",e?"bg-card text-foreground shadow-sm":"text-muted-foreground");return(0,s.jsxs)("nav",{"aria-label":"Fleet views",className:"flex gap-0.5 rounded-lg border border-border bg-muted p-0.5 sm:hidden","data-testid":"fleet-segments",children:[(0,s.jsx)(t.default,{href:"/","aria-current":"ships"===e?"page":void 0,className:n("ships"===e),"data-testid":"fleet-segment-ships",children:"Ships"}),(0,s.jsxs)(t.default,{href:"/needs-crew","aria-current":"needs-crew"===e?"page":void 0,className:n("needs-crew"===e),"data-testid":"fleet-segment-needs-crew",children:["Needs crew",void 0===r||0===r?null:(0,s.jsx)("span",{className:"text-micro tabular-nums",children:r})]})]})}])},88393,e=>{"use strict";var s=e.i(43476),t=e.i(90063),a=e.i(19321);function r(e){return Array.from({length:e},(e,s)=>`row-${String(s)}`)}e.s(["LoadingSkeleton",0,function({variant:e,rows:n=4,label:i="Loading",className:l}){return(0,s.jsxs)("div",{role:"status","data-slot":"loading-skeleton","data-variant":e,className:(0,t.classNames)("w-full",l),children:[(0,s.jsx)("span",{className:"sr-only",children:i}),"table"===e?(0,s.jsxs)("div",{className:"overflow-hidden rounded-lg border border-border bg-card shadow-sm",children:[(0,s.jsx)("div",{className:"h-(--size-row-header) border-b border-border bg-muted"}),r(n).map(e=>(0,s.jsxs)("div",{className:"flex h-(--size-row) items-center gap-8 border-b border-border px-4 last:border-0",children:[(0,s.jsx)(a.Skeleton,{className:"h-2.5 w-24"}),(0,s.jsx)(a.Skeleton,{className:"h-5 w-16"}),(0,s.jsx)(a.Skeleton,{className:"h-5 w-20"}),(0,s.jsx)(a.Skeleton,{className:"h-2.5 w-28"})]},e))]}):null,"cards"===e?(0,s.jsx)("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:r(4).map(e=>(0,s.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-4",children:[(0,s.jsx)(a.Skeleton,{className:"h-2.5 w-20"}),(0,s.jsx)(a.Skeleton,{className:"h-6 w-10"}),(0,s.jsx)(a.Skeleton,{className:"h-2.5 w-28"})]},e))}):null,"detail"===e?(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsx)(a.Skeleton,{className:"h-7 w-48"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(a.Skeleton,{className:"h-5 w-20"}),(0,s.jsx)(a.Skeleton,{className:"h-5 w-16"})]}),(0,s.jsx)(a.Skeleton,{className:"h-16 w-full rounded-lg"})]}):null,"list"===e?(0,s.jsx)("div",{className:"overflow-hidden rounded-lg border border-border bg-card",children:r(n).map(e=>(0,s.jsxs)("div",{className:"flex flex-col gap-2.5 border-b border-border px-3.5 py-3 last:border-0",children:[(0,s.jsxs)("div",{className:"flex justify-between",children:[(0,s.jsx)(a.Skeleton,{className:"h-3 w-28"}),(0,s.jsx)(a.Skeleton,{className:"h-5 w-16"})]}),(0,s.jsx)(a.Skeleton,{className:"h-2.5 w-44"})]},e))}):null]})}])},88207,e=>{e.v(s=>Promise.all(["static/chunks/13adqemu7o09r.js"].map(s=>e.l(s))).then(()=>s(42211)))},5419,e=>{e.v(s=>Promise.all(["static/chunks/40x7asvp3p80z.js"].map(s=>e.l(s))).then(()=>s(4510)))},77880,85538,e=>{"use strict";var s=e.i(43476),t=e.i(67927),a=e.i(66595),r=e.i(19759),n=e.i(22016),i=e.i(15905),l=e.i(36651),d=e.i(90063);let o={live:{label:"Live",dot:"bg-tone-ok-fg"},reconnecting:{label:"Reconnecting",dot:"bg-tone-waiting-fg"},offline:{label:"Offline",dot:"bg-tone-attention-fg"}};function c({state:e,className:t}){let{label:a,dot:r}=o[e];return(0,s.jsxs)("span",{"data-slot":"live-status","data-state":e,"aria-live":"polite",className:(0,d.classNames)("inline-flex items-center gap-1.5 text-meta text-muted-foreground",t),children:[(0,s.jsx)("span",{"aria-hidden":!0,className:(0,d.classNames)("size-2 shrink-0 rounded-full",r)}),a]})}e.s(["Header",0,function({breadcrumb:e,parents:d=[],live:o,onCompose:u,onSearch:m}){return(0,s.jsxs)("header",{"data-slot":"header",className:"sticky top-0 z-30 hidden h-(--size-header) shrink-0 items-center justify-between gap-4 border-b border-border bg-background px-6 sm:flex",children:[(0,s.jsx)("nav",{"aria-label":"Breadcrumb","data-testid":"header-breadcrumb",className:"min-w-0 text-body",children:(0,s.jsxs)("ol",{className:"flex min-w-0 items-center gap-1.5",children:[d.map(e=>(0,s.jsxs)("li",{className:"flex shrink-0 items-center gap-1.5",children:[(0,s.jsx)(n.default,{href:e.href,className:"text-muted-foreground hover:text-foreground hover:underline",children:e.label}),(0,s.jsx)(t.ChevronRight,{"aria-hidden":!0,className:"size-3.5 text-muted-foreground"})]},e.href)),(0,s.jsx)("li",{"aria-current":"page",className:"truncate font-medium text-foreground",children:e})]})}),(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)(c,{state:o}),m?(0,s.jsxs)(i.Button,{size:"sm",icon:(0,s.jsx)(a.Search,{"aria-hidden":!0}),"data-testid":"header-search",className:"w-60 justify-start font-normal text-muted-foreground",onClick:m,children:[(0,s.jsx)("span",{className:"grow text-left",children:"Search ships or jump to"}),(0,s.jsx)(l.Kbd,{children:"⌘K"})]}):null,u?(0,s.jsx)(i.Button,{size:"sm",icon:(0,s.jsx)(r.SquarePen,{"aria-hidden":!0}),"data-testid":"header-compose",onClick:u,children:"Compose"}):null]})]})}],77880);var u=e.i(24071),m=e.i(57957);e.s(["TopBar",0,function({title:e,live:t,actions:r,back:l,account:d,onSearch:o}){let h=o&&!l?o:void 0;return(0,s.jsxs)("header",{"data-slot":"top-bar","data-mode":l?"detail":"root",className:"sticky top-0 z-30 flex h-(--size-header) items-center gap-2.5 border-b border-border bg-background px-4 sm:hidden",children:[l?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.default,{href:l.href,className:"-ml-1.5 inline-flex h-(--size-control-touch) shrink-0 items-center gap-0.5 rounded-md pr-2 text-body-touch text-foreground focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon)",children:[(0,s.jsx)(u.ChevronLeft,{"aria-hidden":!0}),l.label]}),(0,s.jsx)("p",{className:"min-w-0 flex-1 truncate text-center text-body-touch font-semibold text-foreground",children:e})]}):(0,s.jsx)("h1",{className:"truncate text-title-touch font-semibold tracking-tight text-foreground",children:e}),(0,s.jsx)(c,{state:t}),r||h||d&&!l?(0,s.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[h?(0,s.jsx)(i.Button,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Search ships or jump to","data-testid":"top-bar-search",onClick:h,children:(0,s.jsx)(a.Search,{"aria-hidden":!0})}):null,r,d&&!l?(0,s.jsx)(m.AccountMenuSheet,{...d}):null]}):null]})}],85538)},77821,e=>{"use strict";var s=e.i(43476),t=e.i(19759),a=e.i(15905),r=e.i(77880),n=e.i(85538);e.s(["ListPage",0,function({title:e,description:i,titleMeta:l,primaryAction:d,toolbar:o,live:c,onCompose:u,onSearch:m,account:h,banner:x,phoneTopBar:p,children:f}){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.Header,{breadcrumb:e,live:c,onCompose:u,onSearch:m}),x,p??(0,s.jsx)(n.TopBar,{title:e,live:c,account:h,onSearch:m,actions:u?(0,s.jsx)(a.Button,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Compose","data-testid":"top-bar-compose",onClick:u,children:(0,s.jsx)(t.SquarePen,{"aria-hidden":!0})}):void 0}),(0,s.jsxs)("main",{className:"flex grow flex-col gap-5 px-8 py-6 max-sm:gap-3.5 max-sm:px-4 max-sm:pt-3.5 max-sm:pb-[calc(var(--size-tabbar)+var(--spacing)*4)]",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4 max-sm:gap-3",children:[(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-1",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-x-2.5 gap-y-1",children:[(0,s.jsx)("h1",{className:"text-title font-semibold tracking-tight text-foreground max-sm:hidden",children:e}),l]}),i?(0,s.jsx)("p",{className:"text-meta text-muted-foreground max-sm:text-body-touch",children:i}):null]}),d?(0,s.jsx)("div",{className:"shrink-0 max-sm:w-full max-sm:[&>*]:w-full",children:d}):null]}),o,f]})]})}])},88138,e=>{e.v(s=>Promise.all(["static/chunks/01ew2ssfbg4fk.js","static/chunks/2-ncr8s35g33z.js"].map(s=>e.l(s))).then(()=>s(48287)))},95953,e=>{e.v(s=>Promise.all(["static/chunks/3nkqw06zkp9-v.js"].map(s=>e.l(s))).then(()=>s(82532)))},26403,e=>{e.v(s=>Promise.all(["static/chunks/3ratrwsbommzd.js"].map(s=>e.l(s))).then(()=>s(54988)))},57993,e=>{e.v(s=>Promise.all(["static/chunks/00i6q5loemcdb.js","static/chunks/2-ncr8s35g33z.js"].map(s=>e.l(s))).then(()=>s(75027)))},41585,e=>{e.v(s=>Promise.all(["static/chunks/32eiz8wfxjh13.js","static/chunks/2-ncr8s35g33z.js"].map(s=>e.l(s))).then(()=>s(11896)))},18423,e=>{"use strict";var s=e.i(12598),t=e.i(5861),a=e.i(71645),r=e.i(86413),n=e.i(27702);let i=new Set(["FleetInitialised","ShipCommissioned","ShipClaimed","LeaseRevoked","CredentialRevoked","StartingPromptIssued","ShipRetired","DeliveryAcknowledged","DeliveryUndeliverable","ShipReported","CrewRequested","CrewRequestRemoved","CrewAssigned","CrewStatusChanged","CrewRequestExplained","CrewRequestGivenBack","LabelAssigned","LabelUnassigned","LabelRetired"]);async function l(e,s){await e.cancelQueries({queryKey:s,predicate:e=>void 0===e.state.data&&"fetching"===e.state.fetchStatus}),await e.invalidateQueries({queryKey:s})}let d=new Set(["LabelDefined","LabelValuesChanged","LabelRetired","LabelAssigned","LabelUnassigned","LabelDeleted"]),o=new Set(["DeliveryUndeliverable","DeliveryNotHandled","DeliveryDismissed"]);e.s(["useLiveFleet",0,function(){let e=(0,n.useTRPC)(),c=(0,s.useQueryClient)(),[u,m]=(0,a.useState)(new Set),h=e=>{l(c,e)},x=(0,t.useSubscription)(e.fleet.events.subscriptionOptions({lastEventId:null},{onData:({data:s})=>{var t,a,n;if("resync"===s.kind){h(e.fleet.pathKey()),h(r.INBOX_KEY);return}let{event:l}=s;for(let s of new Set([l.shipId,l.actorShipId]))null!==s&&(h(e.fleet.ship.queryKey({shipId:s})),h(e.fleet.shipTimeline.queryKey({shipId:s})),h(e.fleet.shipWay.queryKey({shipId:s})));if(null!==l.messageId&&(h(e.fleet.shipMessages.pathKey()),h(e.fleet.shipWay.pathKey()),h(e.fleet.overdue.queryKey()),h(e.fleet.message.queryKey({messageId:l.messageId})),h(e.fleet.inbox.pathKey()),h(r.INBOX_KEY),h(e.fleet.noShipCanTake.queryKey()),h(e.fleet.health.queryKey())),t=l.type,o.has(t)&&h(e.fleet.needsAttention.queryKey()),a=l.type,d.has(a)&&h(e.fleet.labels.queryKey()),"NetworkRulesDeclared"===l.type&&h(e.fleet.declaredNetworkRules.queryKey()),n=l.type,!i.has(n))return;h(e.fleet.list.queryKey()),h(e.fleet.noShipCanTake.queryKey()),h(e.fleet.health.queryKey());let{shipId:c}=l;"ShipCommissioned"===l.type&&null!==c&&m(e=>new Set([...e,c]))}}));return{live:function(e){switch(e){case"pending":return"live";case"connecting":return"reconnecting";case"idle":case"error":return"offline"}}(x.status),newShipIds:u,error:x.error}}])},28459,e=>{"use strict";var s=e.i(54616),t=e.i(66027),a=e.i(12598),r=e.i(27702);function n(e){let s=String(e.attempts-1);return e.isPushed?`Handed ${s} times, never confirmed; fifth refused: undeliverable.`:`Handed (pulled) ${s} times, never acknowledged; fifth receive refused: undeliverable.`}let i="Acknowledged, then its turn died; handed once more, and that turn died too: not handled.";function l(){let e=(0,r.useTRPC)(),s=(0,a.useQueryClient)();return()=>s.invalidateQueries({queryKey:e.fleet.pathKey()})}e.s(["DISMISSED_TOAST",0,{title:"Delivery dismissed",description:"It stays in the timelines as dismissed."},"attentionReason",0,function(e){switch(e.state){case"undeliverable":return n(e);case"notHandled":return null===e.reason?i:`${i} Its crew said: ${e.reason}.`}},"canResend",0,function(e){return!e.message.isPing},"deliveryWithId",0,function(e,s){return e?.find(e=>e.deliveryId===s)},"resentToast",0,function(e){return{title:"Message resent",description:`A new message went to ${function(e){let{recipient:s}=e.message;return"ship"===s.kind?s.ship.name:`any ship of type ${s.type}`}(e)}. The original is dismissed.`}},"undeliverableReason",0,n,"useDismissDelivery",0,function(){let e=(0,r.useTRPC)(),t=l();return(0,s.useMutation)(e.fleet.dismiss.mutationOptions({onSuccess:t}))},"useNeedsAttention",0,function(){let e=(0,r.useTRPC)();return(0,t.useQuery)(e.fleet.needsAttention.queryOptions())},"useResendDelivery",0,function(){let e=(0,r.useTRPC)(),t=l();return(0,s.useMutation)(e.fleet.resend.mutationOptions({onSuccess:t}))}])}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,24071,e=>{"use strict";var s=e.i(56420);let t={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};t.node;let a=(0,s.default)(t);e.s(["ChevronLeft",0,a],24071)},67927,e=>{"use strict";var s=e.i(56420);let t={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};t.node;let a=(0,s.default)(t);e.s(["ChevronRight",0,a],67927)},66595,e=>{"use strict";var s=e.i(56420);let t={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};t.node;let a=(0,s.default)(t);e.s(["Search",0,a],66595)},19759,e=>{"use strict";var s=e.i(56420);let t={name:"square-pen",size:24,node:[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],aliases:["pen-box","edit","pen-square"]};t.node;let a=(0,s.default)(t);e.s(["SquarePen",0,a],19759)},39334,e=>{"use strict";var s=e.i(43476),t=e.i(62687),a=e.i(65041),r=e.i(57665),n=e.i(71645),i=e.i(17540),l=e.i(90262),d=e.i(54492),o=e.i(5387),c=e.i(53573),u=e.i(15905);let m=(0,i.lazyDialog)(()=>e.A(5419).then(e=>e.CrewReleaseDialog),e=>e.isOpen);function h({ship:e}){let t=(0,l.useAccess)(),a=(0,o.useRemoveCrewRequest)(),[i,x]=(0,n.useState)(!1),p=(0,c.useShip)(i?e.id:void 0),f=(0,d.crewRequestStage)(e);return t.canManage&&"assigned"===f.kind&&"crashed"===f.status?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.Button,{size:"xs",icon:(0,s.jsx)(r.Power,{}),"data-testid":"needs-crew-release",onClick:()=>{a.reset(),x(!0)},children:"Release…"}),(0,s.jsx)(m,{shipName:e.name,stage:f,inFlightCount:p.data?.inFlightDeliveries??0,isOpen:i&&void 0!==p.data,onOpenChange:x,isPending:a.isPending,error:null===a.error?void 0:`${a.error.message} Nothing changed.`,onConfirm:()=>{a.mutate({shipId:e.id},{onSuccess:()=>{x(!1)}})}})]}):null}var x=e.i(21959),p=e.i(15327),f=e.i(18964),g=e.i(86875),j=e.i(22016),b=e.i(49841),v=e.i(49635),w=e.i(66390),y=e.i(67874),N=e.i(17981),k=e.i(88393),S=e.i(78865);function C({at:e,now:t}){let a=new Date(e);return(0,s.jsx)("time",{dateTime:e,title:(0,v.fullDateTime)(a),className:"tabular-nums",children:t.getTime()-a.getTime()<864e5?`Today, ${(0,v.clockTime)(a)}`:(0,v.shortDateTime)(a)})}function q({ship:e,now:t}){let a=(0,b.handCrewOf)(e);switch(a.kind){case"no-prompt":return(0,s.jsx)("span",{className:"text-muted-foreground",children:"No starting prompt issued"});case"prompt-unclaimed":return(0,s.jsxs)("span",{className:"flex flex-col",children:[(0,s.jsxs)("span",{children:["Prompt issued ",(0,s.jsx)(C,{at:a.issuedAt,now:t})]}),(0,s.jsx)("span",{className:"text-muted-foreground",children:"No session has taken it yet"})]});case"crew-ended":return(0,s.jsxs)("span",{className:"flex flex-col",children:[(0,s.jsx)("span",{children:"Was crewed by hand"}),null===a.endedAt?null:(0,s.jsxs)("span",{className:"text-muted-foreground",children:["Lease ended ",(0,s.jsx)(C,{at:a.endedAt,now:t})]})]})}}function R({ship:e}){let t=(0,d.crewRequestStage)(e);return"assigned"===t.kind?(0,s.jsxs)("span",{className:"flex flex-wrap items-center gap-x-2 gap-y-1",children:[(0,s.jsx)(S.StatusBadge,{status:t.status}),(0,s.jsxs)("span",{className:"inline-flex items-center gap-1",children:["on",(0,s.jsxs)(j.default,{href:`/trierarchs/${t.trierarch.id}`,className:"inline-flex items-center gap-1 font-medium underline decoration-input underline-offset-3 [&_svg]:size-(--size-icon-sm) [&_svg]:text-muted-foreground",children:[(0,s.jsx)(g.ShipWheel,{"aria-hidden":!0}),t.trierarch.name]})]})]}):(0,s.jsxs)("span",{className:"flex flex-wrap items-center gap-x-2 gap-y-1",children:[(0,s.jsx)(S.StatusBadge,{status:"needsCrew"}),(0,s.jsx)("span",{className:"text-muted-foreground",children:"needsCrew"===t.kind&&null!==t.reason?t.reason:"Not assigned yet"})]})}let z="grid items-center gap-x-4 gap-y-1.5 px-4 py-3 max-sm:grid-cols-1 max-sm:px-3.5 sm:grid-cols-[minmax(0,1fr)_minmax(0,1.6fr)_minmax(0,1fr)_minmax(0,11rem)]";function P({ships:e,hasTrierarchs:t,error:a,onRetry:r,actionOf:n,now:i}){return void 0!==a?(0,s.jsx)(N.InlineError,{variant:"page",title:"Couldn’t read the fleet",description:"Nothing changed.",detail:a,onRetry:r}):void 0===e?(0,s.jsx)(k.LoadingSkeleton,{variant:"table",rows:3,label:"Loading Needs crew"}):0===e.length?(0,s.jsx)(y.EmptyState,{icon:(0,s.jsx)(f.ListChecks,{"aria-hidden":!0}),title:"Nothing needs crew",description:t?"Every crew request is running. A request shows here while it waits for a trierarch, is crewing, restarting or crashed.":"No ship with a crew request awaits crew. Request a crew on a ship’s page to put it here."}):(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)("div",{className:"overflow-hidden rounded-lg border border-border bg-card","data-testid":"needs-crew-list",children:[(0,s.jsxs)("div",{className:`${z} border-b border-border bg-muted py-2.5 text-caption font-medium text-muted-foreground max-sm:hidden`,"aria-hidden":!0,children:[(0,s.jsx)("span",{children:"Ship"}),(0,s.jsx)("span",{children:t?"Status":"Crew"}),(0,s.jsx)("span",{children:"Requested"}),(0,s.jsx)("span",{className:"sr-only",children:"Next step"})]}),(0,s.jsx)("ul",{className:"divide-y divide-border",children:e.map(e=>(0,s.jsxs)("li",{className:`${z} text-body`,"data-testid":"needs-crew-row",children:[(0,s.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[(0,s.jsx)(j.default,{href:`/ships/${e.id}`,className:"truncate font-medium hover:underline","data-testid":"needs-crew-ship",children:e.name}),(0,s.jsx)(w.Badge,{variant:"type",children:e.type})]}),(0,s.jsx)("span",{className:"min-w-0 text-meta",children:t?(0,s.jsx)(R,{ship:e}):(0,s.jsx)(q,{ship:e,now:i})}),(0,s.jsx)("span",{className:"flex flex-col text-meta",children:null===e.crewRequest?null:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(C,{at:e.crewRequest.requestedAt,now:i}),i.getTime()-new Date(e.crewRequest.requestedAt).getTime()<864e5?(0,s.jsx)("span",{className:"text-muted-foreground",children:(0,v.relativeTime)(new Date(e.crewRequest.requestedAt),i)}):null]})}),(0,s.jsx)("span",{className:"flex justify-end max-sm:justify-start",children:n?.(e)})]},e.id))})]}),(0,s.jsx)("p",{className:"text-meta text-muted-foreground",children:t?"Running requests are not listed here; the fleet overview shows them. A request stays until you release the ship.":"A request stays until you remove it or release the ship. With the trierarch plugin, trierarchs crew these for you."})]})}var T=e.i(77821),A=e.i(87964),I=e.i(18423),L=e.i(28459),D=e.i(96676),K=e.i(3979),B=e.i(78485);e.s(["default",0,function(){let e=(0,D.useNow)(),r=(0,A.useConsoleFrame)(),n=(0,L.useNeedsAttention)(),i=(0,I.useLiveFleet)(),l=(0,o.useFleetSnapshot)(),d=(0,K.usePluginNav)();(0,B.useSignInWhenSessionEnds)([n.error,i.error,l.error]);let{hasTrierarchs:c}=d;return(0,s.jsx)(T.ListPage,{...r,title:"Needs crew",description:c?"Ships with a crew request that are not running. Trierarchs crew them; you step in when one crashes or waits for room.":"Ships you asked to keep crewed that have no crew. Crew each one by hand; crewing it fulfils the request.",live:i.live,toolbar:(0,s.jsx)(t.FleetSegments,{active:"needs-crew",needsCrewCount:d.needsCrewCount}),children:(0,s.jsx)(P,{ships:void 0===l.data?void 0:(0,b.needsCrew)(l.data,{hasTrierarchs:c}),hasTrierarchs:c,error:l.isError?l.error.message:void 0,onRetry:()=>{l.refetch()},actionOf:e=>c?(0,s.jsx)(h,{ship:e}):(0,s.jsx)(x.ShipActions,{ship:e,layout:"next",compose:a.ComposeMessage,crewLineFlow:p.NewCrewLineFlow}),now:e})})}],39334)},36651,e=>{"use strict";var s=e.i(43476),t=e.i(90063);e.s(["Kbd",0,function({className:e,...a}){return(0,s.jsx)("kbd",{"data-slot":"kbd",className:(0,t.classNames)("inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-xs border border-border bg-muted px-1.25 font-sans text-micro font-medium text-muted-foreground max-sm:hidden",e),...a})}])},19321,e=>{"use strict";var s=e.i(43476),t=e.i(90063);e.s(["Skeleton",0,function({className:e,...a}){return(0,s.jsx)("div",{"data-slot":"skeleton","aria-hidden":!0,className:(0,t.classNames)("animate-pulse rounded-sm bg-secondary [animation-duration:var(--duration-pulse)] motion-reduce:animate-none",e),...a})}])},67874,e=>{"use strict";var s=e.i(43476),t=e.i(90063);e.s(["EmptyState",0,function({title:e,description:a,icon:r,action:n,variant:i="page",className:l}){return"section"===i?(0,s.jsxs)("p",{"data-slot":"empty-state","data-variant":i,className:(0,t.classNames)("rounded-lg border border-border px-4 py-3 text-center text-meta text-muted-foreground",l),children:[e,a?(0,s.jsxs)(s.Fragment,{children:[" ",a]}):null]}):"no-results"===i?(0,s.jsxs)("div",{"data-slot":"empty-state","data-variant":i,className:(0,t.classNames)("flex flex-col items-center gap-2.5 rounded-lg border border-border bg-card px-4 py-6 text-center",l),children:[(0,s.jsx)("p",{className:"text-meta text-muted-foreground",children:e}),n]}):(0,s.jsxs)("div",{"data-slot":"empty-state","data-variant":i,className:(0,t.classNames)("flex flex-col items-center gap-3 rounded-lg border border-dashed border-border bg-card px-6 py-10 text-center",l),children:[r?(0,s.jsx)("span",{"aria-hidden":!0,className:"flex size-10 items-center justify-center rounded-lg border border-border bg-muted text-muted-foreground [&_svg]:size-(--size-icon-xl)",children:r}):null,(0,s.jsx)("h2",{className:"text-heading font-semibold text-foreground max-sm:text-heading-touch",children:e}),a?(0,s.jsx)("p",{className:"max-w-96 text-meta text-muted-foreground max-sm:text-body-touch",children:a}):null,n?(0,s.jsx)("div",{className:"mt-1 max-sm:w-full max-sm:[&>*]:w-full",children:n}):null]})}])},62687,e=>{"use strict";var s=e.i(43476),t=e.i(22016),a=e.i(90063);e.s(["FleetSegments",0,function({active:e,needsCrewCount:r}){let n=e=>(0,a.classNames)("flex h-(--size-control-touch) grow items-center justify-center gap-1.5 rounded-md text-body-touch font-medium",e?"bg-card text-foreground shadow-sm":"text-muted-foreground");return(0,s.jsxs)("nav",{"aria-label":"Fleet views",className:"flex gap-0.5 rounded-lg border border-border bg-muted p-0.5 sm:hidden","data-testid":"fleet-segments",children:[(0,s.jsx)(t.default,{href:"/","aria-current":"ships"===e?"page":void 0,className:n("ships"===e),"data-testid":"fleet-segment-ships",children:"Ships"}),(0,s.jsxs)(t.default,{href:"/needs-crew","aria-current":"needs-crew"===e?"page":void 0,className:n("needs-crew"===e),"data-testid":"fleet-segment-needs-crew",children:["Needs crew",void 0===r||0===r?null:(0,s.jsx)("span",{className:"text-micro tabular-nums",children:r})]})]})}])},88393,e=>{"use strict";var s=e.i(43476),t=e.i(90063),a=e.i(19321);function r(e){return Array.from({length:e},(e,s)=>`row-${String(s)}`)}e.s(["LoadingSkeleton",0,function({variant:e,rows:n=4,label:i="Loading",className:l}){return(0,s.jsxs)("div",{role:"status","data-slot":"loading-skeleton","data-variant":e,className:(0,t.classNames)("w-full",l),children:[(0,s.jsx)("span",{className:"sr-only",children:i}),"table"===e?(0,s.jsxs)("div",{className:"overflow-hidden rounded-lg border border-border bg-card shadow-sm",children:[(0,s.jsx)("div",{className:"h-(--size-row-header) border-b border-border bg-muted"}),r(n).map(e=>(0,s.jsxs)("div",{className:"flex h-(--size-row) items-center gap-8 border-b border-border px-4 last:border-0",children:[(0,s.jsx)(a.Skeleton,{className:"h-2.5 w-24"}),(0,s.jsx)(a.Skeleton,{className:"h-5 w-16"}),(0,s.jsx)(a.Skeleton,{className:"h-5 w-20"}),(0,s.jsx)(a.Skeleton,{className:"h-2.5 w-28"})]},e))]}):null,"cards"===e?(0,s.jsx)("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:r(4).map(e=>(0,s.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-4",children:[(0,s.jsx)(a.Skeleton,{className:"h-2.5 w-20"}),(0,s.jsx)(a.Skeleton,{className:"h-6 w-10"}),(0,s.jsx)(a.Skeleton,{className:"h-2.5 w-28"})]},e))}):null,"detail"===e?(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsx)(a.Skeleton,{className:"h-7 w-48"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(a.Skeleton,{className:"h-5 w-20"}),(0,s.jsx)(a.Skeleton,{className:"h-5 w-16"})]}),(0,s.jsx)(a.Skeleton,{className:"h-16 w-full rounded-lg"})]}):null,"list"===e?(0,s.jsx)("div",{className:"overflow-hidden rounded-lg border border-border bg-card",children:r(n).map(e=>(0,s.jsxs)("div",{className:"flex flex-col gap-2.5 border-b border-border px-3.5 py-3 last:border-0",children:[(0,s.jsxs)("div",{className:"flex justify-between",children:[(0,s.jsx)(a.Skeleton,{className:"h-3 w-28"}),(0,s.jsx)(a.Skeleton,{className:"h-5 w-16"})]}),(0,s.jsx)(a.Skeleton,{className:"h-2.5 w-44"})]},e))}):null]})}])},88207,e=>{e.v(s=>Promise.all(["static/chunks/13adqemu7o09r.js"].map(s=>e.l(s))).then(()=>s(42211)))},5419,e=>{e.v(s=>Promise.all(["static/chunks/40x7asvp3p80z.js"].map(s=>e.l(s))).then(()=>s(4510)))},77880,85538,e=>{"use strict";var s=e.i(43476),t=e.i(67927),a=e.i(66595),r=e.i(19759),n=e.i(22016),i=e.i(15905),l=e.i(36651),d=e.i(90063);let o={live:{label:"Live",dot:"bg-tone-ok-fg"},reconnecting:{label:"Reconnecting",dot:"bg-tone-waiting-fg"},offline:{label:"Offline",dot:"bg-tone-attention-fg"}};function c({state:e,className:t}){let{label:a,dot:r}=o[e];return(0,s.jsxs)("span",{"data-slot":"live-status","data-state":e,"aria-live":"polite",className:(0,d.classNames)("inline-flex items-center gap-1.5 text-meta text-muted-foreground",t),children:[(0,s.jsx)("span",{"aria-hidden":!0,className:(0,d.classNames)("size-2 shrink-0 rounded-full",r)}),a]})}e.s(["Header",0,function({breadcrumb:e,parents:d=[],live:o,onCompose:u,onSearch:m}){return(0,s.jsxs)("header",{"data-slot":"header",className:"sticky top-0 z-30 hidden h-(--size-header) shrink-0 items-center justify-between gap-4 border-b border-border bg-background px-6 sm:flex",children:[(0,s.jsx)("nav",{"aria-label":"Breadcrumb","data-testid":"header-breadcrumb",className:"min-w-0 text-body",children:(0,s.jsxs)("ol",{className:"flex min-w-0 items-center gap-1.5",children:[d.map(e=>(0,s.jsxs)("li",{className:"flex shrink-0 items-center gap-1.5",children:[(0,s.jsx)(n.default,{href:e.href,className:"text-muted-foreground hover:text-foreground hover:underline",children:e.label}),(0,s.jsx)(t.ChevronRight,{"aria-hidden":!0,className:"size-3.5 text-muted-foreground"})]},e.href)),(0,s.jsx)("li",{"aria-current":"page",className:"truncate font-medium text-foreground",children:e})]})}),(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)(c,{state:o}),m?(0,s.jsxs)(i.Button,{size:"sm",icon:(0,s.jsx)(a.Search,{"aria-hidden":!0}),"data-testid":"header-search",className:"w-60 justify-start font-normal text-muted-foreground",onClick:m,children:[(0,s.jsx)("span",{className:"grow text-left",children:"Search ships or jump to"}),(0,s.jsx)(l.Kbd,{children:"⌘K"})]}):null,u?(0,s.jsx)(i.Button,{size:"sm",icon:(0,s.jsx)(r.SquarePen,{"aria-hidden":!0}),"data-testid":"header-compose",onClick:u,children:"Compose"}):null]})]})}],77880);var u=e.i(24071),m=e.i(57957);e.s(["TopBar",0,function({title:e,live:t,actions:r,back:l,account:d,onSearch:o}){let h=o&&!l?o:void 0;return(0,s.jsxs)("header",{"data-slot":"top-bar","data-mode":l?"detail":"root",className:"sticky top-0 z-30 flex h-(--size-header) items-center gap-2.5 border-b border-border bg-background px-4 sm:hidden",children:[l?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.default,{href:l.href,className:"-ml-1.5 inline-flex h-(--size-control-touch) shrink-0 items-center gap-0.5 rounded-md pr-2 text-body-touch text-foreground focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon)",children:[(0,s.jsx)(u.ChevronLeft,{"aria-hidden":!0}),l.label]}),(0,s.jsx)("p",{className:"min-w-0 flex-1 truncate text-center text-body-touch font-semibold text-foreground",children:e})]}):(0,s.jsx)("h1",{className:"truncate text-title-touch font-semibold tracking-tight text-foreground",children:e}),(0,s.jsx)(c,{state:t}),r||h||d&&!l?(0,s.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[h?(0,s.jsx)(i.Button,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Search ships or jump to","data-testid":"top-bar-search",onClick:h,children:(0,s.jsx)(a.Search,{"aria-hidden":!0})}):null,r,d&&!l?(0,s.jsx)(m.AccountMenuSheet,{...d}):null]}):null]})}],85538)},77821,e=>{"use strict";var s=e.i(43476),t=e.i(19759),a=e.i(15905),r=e.i(77880),n=e.i(85538);e.s(["ListPage",0,function({title:e,description:i,titleMeta:l,primaryAction:d,toolbar:o,live:c,onCompose:u,onSearch:m,account:h,banner:x,phoneTopBar:p,children:f}){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.Header,{breadcrumb:e,live:c,onCompose:u,onSearch:m}),x,p??(0,s.jsx)(n.TopBar,{title:e,live:c,account:h,onSearch:m,actions:u?(0,s.jsx)(a.Button,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Compose","data-testid":"top-bar-compose",onClick:u,children:(0,s.jsx)(t.SquarePen,{"aria-hidden":!0})}):void 0}),(0,s.jsxs)("main",{className:"flex grow flex-col gap-5 px-8 py-6 max-sm:gap-3.5 max-sm:px-4 max-sm:pt-3.5 max-sm:pb-[calc(var(--size-tabbar)+var(--spacing)*4)]",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4 max-sm:gap-3",children:[(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-1",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-x-2.5 gap-y-1",children:[(0,s.jsx)("h1",{className:"text-title font-semibold tracking-tight text-foreground max-sm:hidden",children:e}),l]}),i?(0,s.jsx)("p",{className:"text-meta text-muted-foreground max-sm:text-body-touch",children:i}):null]}),d?(0,s.jsx)("div",{className:"shrink-0 max-sm:w-full max-sm:[&>*]:w-full",children:d}):null]}),o,f]})]})}])},88138,e=>{e.v(s=>Promise.all(["static/chunks/01ew2ssfbg4fk.js","static/chunks/2-ncr8s35g33z.js"].map(s=>e.l(s))).then(()=>s(48287)))},95953,e=>{e.v(s=>Promise.all(["static/chunks/3nkqw06zkp9-v.js"].map(s=>e.l(s))).then(()=>s(82532)))},26403,e=>{e.v(s=>Promise.all(["static/chunks/3ratrwsbommzd.js"].map(s=>e.l(s))).then(()=>s(54988)))},57993,e=>{e.v(s=>Promise.all(["static/chunks/00i6q5loemcdb.js","static/chunks/2-ncr8s35g33z.js"].map(s=>e.l(s))).then(()=>s(75027)))},41585,e=>{e.v(s=>Promise.all(["static/chunks/32eiz8wfxjh13.js","static/chunks/2-ncr8s35g33z.js"].map(s=>e.l(s))).then(()=>s(11896)))},18423,e=>{"use strict";var s=e.i(12598),t=e.i(5861),a=e.i(71645),r=e.i(86413),n=e.i(27702);let i=new Set(["FleetInitialised","ShipCommissioned","ShipClaimed","LeaseRevoked","CredentialRevoked","StartingPromptIssued","ShipRetired","DeliveryAcknowledged","DeliveryUndeliverable","ShipReported","CrewRequested","CrewRequestRemoved","CrewAssigned","CrewStatusChanged","CrewRequestExplained","CrewRequestGivenBack","LabelAssigned","LabelUnassigned","LabelRetired"]);async function l(e,s){await e.cancelQueries({queryKey:s,predicate:e=>void 0===e.state.data&&"fetching"===e.state.fetchStatus}),await e.invalidateQueries({queryKey:s})}let d=new Set(["LabelDefined","LabelValuesChanged","LabelRetired","LabelAssigned","LabelUnassigned","LabelDeleted"]),o=new Set(["DeliveryUndeliverable","DeliveryNotHandled","DeliveryDismissed"]);e.s(["useLiveFleet",0,function(){let e=(0,n.useTRPC)(),c=(0,s.useQueryClient)(),[u,m]=(0,a.useState)(new Set),h=e=>{l(c,e)},x=(0,t.useSubscription)(e.fleet.events.subscriptionOptions({lastEventId:null},{onData:({data:s})=>{var t,a,n,l;if("resync"===s.kind){h(e.fleet.pathKey()),h(r.INBOX_KEY);return}let{event:c}=s;for(let s of new Set([c.shipId,c.actorShipId]))null!==s&&(h(e.fleet.ship.queryKey({shipId:s})),h(e.fleet.shipTimeline.queryKey({shipId:s})),h(e.fleet.shipWay.queryKey({shipId:s})));if(null!==c.messageId&&(h(e.fleet.shipMessages.pathKey()),h(e.fleet.shipWay.pathKey()),h(e.fleet.message.queryKey({messageId:c.messageId})),h(e.fleet.inbox.pathKey()),h(r.INBOX_KEY),h(e.fleet.health.queryKey())),t=c.type,o.has(t)&&h(e.fleet.needsAttention.queryKey()),a=c.type,d.has(a)&&h(e.fleet.labels.queryKey()),"NetworkRulesDeclared"===c.type&&h(e.fleet.declaredNetworkRules.queryKey()),("BuiltInRuleChanged"===(n=c.type)||"NetworkPluginUnregistered"===n)&&h(e.fleet.builtInRules.queryKey()),l=c.type,!i.has(l))return;h(e.fleet.list.queryKey()),h(e.fleet.health.queryKey());let{shipId:u}=c;"ShipCommissioned"===c.type&&null!==u&&m(e=>new Set([...e,u]))}}));return{live:function(e){switch(e){case"pending":return"live";case"connecting":return"reconnecting";case"idle":case"error":return"offline"}}(x.status),newShipIds:u,error:x.error}}])},28459,e=>{"use strict";var s=e.i(54616),t=e.i(66027),a=e.i(12598),r=e.i(27702);function n(e){let s=String(e.attempts-1);return e.isPushed?`Handed ${s} times, never confirmed; fifth refused: undeliverable.`:`Handed (pulled) ${s} times, never acknowledged; fifth receive refused: undeliverable.`}let i="Acknowledged, then its turn died; handed once more, and that turn died too: not handled.";function l(){let e=(0,r.useTRPC)(),s=(0,a.useQueryClient)();return()=>s.invalidateQueries({queryKey:e.fleet.pathKey()})}e.s(["DISMISSED_TOAST",0,{title:"Delivery dismissed",description:"It stays in the timelines as dismissed."},"attentionReason",0,function(e){switch(e.state){case"undeliverable":return n(e);case"notHandled":return null===e.reason?i:`${i} Its crew said: ${e.reason}.`}},"canResend",0,function(e){return!e.message.isPing},"deliveryWithId",0,function(e,s){return e?.find(e=>e.deliveryId===s)},"resentToast",0,function(e){return{title:"Message resent",description:`A new message went to ${function(e){let{recipient:s}=e.message;return"ship"===s.kind?s.ship.name:`any ship of type ${s.type}`}(e)}. The original is dismissed.`}},"undeliverableReason",0,n,"useDismissDelivery",0,function(){let e=(0,r.useTRPC)(),t=l();return(0,s.useMutation)(e.fleet.dismiss.mutationOptions({onSuccess:t}))},"useNeedsAttention",0,function(){let e=(0,r.useTRPC)();return(0,t.useQuery)(e.fleet.needsAttention.queryOptions())},"useResendDelivery",0,function(){let e=(0,r.useTRPC)(),t=l();return(0,s.useMutation)(e.fleet.resend.mutationOptions({onSuccess:t}))}])}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,71567,e=>{"use strict";var t=e.i(56420);let s={name:"bot",size:24,node:[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]};s.node;let a=(0,t.default)(s);e.s(["Bot",0,a],71567)},24071,e=>{"use strict";var t=e.i(56420);let s={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};s.node;let a=(0,t.default)(s);e.s(["ChevronLeft",0,a],24071)},67927,e=>{"use strict";var t=e.i(56420);let s={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};s.node;let a=(0,t.default)(s);e.s(["ChevronRight",0,a],67927)},69644,69846,e=>{"use strict";var t=e.i(56420);let s={name:"folder-open",size:24,node:[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]};s.node;let a=(0,t.default)(s);e.s(["FolderOpen",0,a],69644);let n={name:"git-branch",size:24,node:[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]]};n.node;let i=(0,t.default)(n);e.s(["GitBranch",0,i],69846)},11147,e=>{"use strict";var t=e.i(56420);let s={name:"octagon-pause",size:24,node:[["path",{d:"M10 15V9",key:"1lckn7"}],["path",{d:"M14 15V9",key:"1muqhk"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}]],aliases:["pause-octagon"]};s.node;let a=(0,t.default)(s);e.s(["OctagonPause",0,a],11147)},66595,e=>{"use strict";var t=e.i(56420);let s={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};s.node;let a=(0,t.default)(s);e.s(["Search",0,a],66595)},41220,e=>{"use strict";var t=e.i(56420);let s={name:"server",size:24,node:[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]};s.node;let a=(0,t.default)(s);e.s(["Server",0,a],41220)},19759,e=>{"use strict";var t=e.i(56420);let s={name:"square-pen",size:24,node:[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],aliases:["pen-box","edit","pen-square"]};s.node;let a=(0,t.default)(s);e.s(["SquarePen",0,a],19759)},83035,e=>{"use strict";var t=e.i(56420);let s={name:"square-terminal",size:24,node:[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],aliases:["terminal-square"]};s.node;let a=(0,t.default)(s);e.s(["SquareTerminal",0,a],83035)},94831,e=>{"use strict";var t=e.i(56420);let s={name:"unplug",size:24,node:[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]]};s.node;let a=(0,t.default)(s);e.s(["Unplug",0,a],94831)},46980,e=>{"use strict";var t=e.i(43476),s=e.i(77821),a=e.i(5387),n=e.i(90437),i=e.i(14695),r=e.i(96676),l=e.i(49635),d=e.i(265),o=e.i(16634),c=e.i(17981),m=e.i(88393),u=e.i(67927),h=e.i(22016),x=e.i(66390),p=e.i(15905),g=e.i(78865),f=e.i(38614);function b({place:e}){return"ship"===e.kind?(0,t.jsx)("span",{className:"font-medium text-foreground",children:e.ship.name}):(0,t.jsx)(x.Badge,{variant:"type",children:e.type})}function j({group:e,notes:s,now:a}){let{cause:n,count:i,places:r}=e;return(0,t.jsxs)("section",{"aria-label":(0,g.statusLabel)(n),"data-testid":"health-cause","data-cause":n,className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-4 shadow-sm max-sm:rounded-xl",children:[(0,t.jsxs)("header",{className:"flex items-start justify-between gap-3",children:[(0,t.jsxs)(h.default,{href:(0,o.causePathOf)(n),className:"group inline-flex items-center gap-1.5 rounded-md","data-testid":"health-cause-open",children:[(0,t.jsx)(g.StatusBadge,{status:n}),(0,t.jsx)(u.ChevronRight,{"aria-hidden":!0,className:"size-(--size-icon-sm) text-muted-foreground group-hover:text-foreground"}),(0,t.jsxs)("span",{className:"sr-only",children:["Open the deliveries ",(0,g.statusLabel)(n).toLowerCase()]})]}),(0,t.jsx)("span",{className:"text-metric font-semibold tabular-nums text-foreground max-sm:text-title-touch",children:i})]}),(0,t.jsx)("p",{className:"text-body text-muted-foreground max-sm:text-body-touch",children:o.CAUSE_SENTENCES[n]}),(0,t.jsxs)("div",{className:"grid grid-cols-[minmax(0,1fr)_minmax(0,1.2fr)_auto] gap-x-4 max-sm:grid-cols-1",children:[(0,t.jsxs)("div",{className:"col-span-3 grid grid-cols-subgrid items-center text-caption font-medium text-muted-foreground max-sm:col-span-1",children:[(0,t.jsx)("span",{className:"max-sm:hidden",children:"Where, how long"}),(0,t.jsx)(f.WaitAxis,{}),(0,t.jsx)("span",{className:"text-right max-sm:hidden",children:"Next step"})]}),(0,t.jsx)("ul",{className:"col-span-3 grid grid-cols-subgrid divide-y divide-border max-sm:col-span-1",children:r.map(e=>{let n=(0,o.nextStepOf)(e),i=s.get(e),r=(0,l.duration)(new Date(e.oldestSince),a);return(0,t.jsxs)("li",{"data-testid":"health-place",className:"col-span-3 grid grid-cols-subgrid items-center gap-y-2 py-3 last:pb-0 max-sm:col-span-1",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,t.jsx)(b,{place:e.place}),(0,t.jsxs)("span",{className:"text-meta tabular-nums text-muted-foreground",children:[e.count," · oldest ",r]})]}),(0,t.jsx)(f.WaitStrip,{waits:e.deliveries.map(e=>(0,o.waitMinutes)(e.since,a)),label:`${String(e.count)} waiting, the oldest ${r}`}),(0,t.jsx)(p.Button,{variant:"secondary",size:"sm",nativeButton:!1,render:(0,t.jsx)(h.default,{href:n.href}),className:"max-sm:h-(--size-control-touch) max-sm:w-full max-sm:text-body-touch","data-testid":"health-next-step",children:n.label}),void 0!==i&&(0,t.jsx)("p",{className:"col-span-3 text-meta text-muted-foreground max-sm:col-span-1",children:i})]},`${e.cause}-${"ship"===e.place.kind?e.place.ship.id:e.place.type}`)})})]})]})}function v({perHour:e}){let s=Math.max(1,...e.map(e=>e.count));return(0,t.jsx)("div",{role:"img","aria-label":`Acknowledged per hour over the last 24 hours, at most ${Math.max(0,...e.map(e=>e.count))} in an hour`,"data-testid":"health-acknowledged-bars",className:"flex h-8 w-full items-end gap-0.5 sm:w-48",children:e.map(e=>(0,t.jsx)("span",{className:"min-h-0.5 flex-1 rounded-xs bg-tone-ok-fg opacity-75",style:{height:`${e.count/s*100}%`}},e.at))})}function y({acknowledged:e}){return(0,t.jsxs)("section",{"aria-label":"Delivering","data-testid":"health-delivering",className:"flex items-center gap-4 rounded-lg border border-border bg-card p-4 shadow-sm max-sm:flex-col max-sm:items-start max-sm:gap-3 max-sm:rounded-xl",children:[(0,t.jsx)(g.StatusBadge,{status:"delivering"}),(0,t.jsx)("p",{className:"flex-1 text-body text-foreground max-sm:text-body-touch",children:null===e.medianMs?"Nothing acknowledged in the last 24 h.":(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"font-semibold tabular-nums",children:e.count})," acknowledged in the last 24 h, median"," ",(0,t.jsx)("span",{className:"font-semibold tabular-nums",children:(0,o.medianText)(e.medianMs,l.duration)})," from send to acknowledgement."]})}),(0,t.jsx)(v,{perHour:e.perHour})]})}function N({perHour:e,marks:s}){let a=Math.max(5,5*Math.ceil(Math.max(0,...e.map(e=>e.count))/5)),n=Math.max(e.length-1,1),i=e=>100-e/a*100,[r]=e,d=e.slice(1).map((e,t)=>`H${(t+1)/n*1e3} V${i(e.count)}`),o=[`M0 ${i(r?.count??0)}`,...d].join(" "),c=`${o} H1000 V100 H0 Z`,m=e.at(-1)?.count??0,u=e.flatMap((e,t)=>t%24==12?[{index:t,label:(0,l.dayMonth)(new Date(e.at))}]:[]);return(0,t.jsxs)("figure",{"data-testid":"health-trend",className:"flex min-w-0 flex-col gap-2",children:[(0,t.jsx)("figcaption",{className:"text-meta font-medium text-foreground",children:"Stuck deliveries, last 7 days, per hour"}),(0,t.jsxs)("div",{className:"grid grid-cols-[auto_1fr] gap-x-2",children:[(0,t.jsx)("div",{"aria-hidden":!0,className:"relative h-36 w-5 text-caption tabular-nums text-muted-foreground",children:[a,a/2,0].map(e=>(0,t.jsx)("span",{className:"absolute right-0 -translate-y-1/2",style:{top:`${100-e/a*100}%`},children:e},e))}),(0,t.jsxs)("div",{className:"relative h-36",children:[(0,t.jsxs)("svg",{role:"img","aria-label":`Stuck deliveries per hour over the last 7 days: ${m} now, at most ${Math.max(0,...e.map(e=>e.count))}`,viewBox:"0 0 1000 100",preserveAspectRatio:"none",className:"size-full overflow-visible",children:[[0,a/2,a].map(e=>(0,t.jsx)("line",{x1:0,x2:1e3,y1:i(e),y2:i(e),className:"stroke-border",vectorEffect:"non-scaling-stroke"},e)),(0,t.jsx)("path",{d:c,className:"fill-tone-waiting-bg"}),(0,t.jsx)("path",{d:o,className:"fill-none stroke-tone-waiting-fg",strokeWidth:2,strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"})]}),s.map(s=>(0,t.jsx)("span",{"aria-hidden":!0,"data-testid":"health-trend-mark",className:"absolute flex size-4 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-full border-2 border-foreground bg-card text-micro font-semibold text-foreground max-sm:hidden",style:{left:`${s.hour/n*100}%`,top:`${i(e[s.hour]?.count??0)/100*100}%`},children:s.number},s.number)),(0,t.jsx)("span",{"aria-hidden":!0,className:"absolute size-2 -translate-1/2 rounded-full bg-tone-waiting-fg",style:{left:"100%",top:`${i(m)/100*100}%`}})]}),(0,t.jsx)("div",{"aria-hidden":!0,className:"relative col-start-2 h-4 text-caption text-muted-foreground",children:u.map(e=>(0,t.jsx)("span",{className:"absolute -translate-x-1/2 whitespace-nowrap max-sm:[&:nth-child(even)]:hidden",style:{left:`${e.index/n*100}%`},children:e.label},e.index))})]}),s.length>0&&(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:s.map((e,s)=>(0,t.jsxs)("span",{children:[s>0&&" · ",(0,t.jsx)("span",{className:"font-semibold text-foreground",children:e.number})," ",e.label]},e.number))})]})}function w({health:e}){let s=(0,o.verdictOf)(e);return(0,t.jsxs)("section",{"aria-label":"Verdict","data-testid":"health-verdict","data-verdict":s.kind,className:"grid gap-6 rounded-lg border border-border bg-card p-4 shadow-sm lg:grid-cols-[minmax(0,2fr)_minmax(0,3fr)] max-sm:gap-4 max-sm:rounded-xl",children:[(0,t.jsxs)("div",{className:"flex flex-col items-start gap-3",children:[(0,t.jsx)(g.StatusBadge,{status:s.kind}),"stuck"===s.kind?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"text-section font-semibold text-foreground",children:[(0,t.jsx)("span",{className:"text-metric tabular-nums max-sm:text-title-touch","data-testid":"health-stuck-count",children:s.count})," ",1===s.count?"delivery":"deliveries"," stuck in ",s.places," ",1===s.places?"place":"places"]}),(0,t.jsxs)("p",{className:"text-body text-muted-foreground max-sm:text-body-touch",children:["Stuck since ",(0,l.shortDateTime)(new Date(s.since)),". ",(0,o.trendSentence)(s)]}),(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"Nothing is lost: each one is stored and moves on as soon as its cause is gone."})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"text-section font-semibold text-foreground",children:"Delivering. Nothing is stuck."}),(0,t.jsx)("p",{className:"text-body text-muted-foreground max-sm:text-body-touch",children:"Every delivery waits only on its ship to take it."})]})]}),(0,t.jsx)(N,{perHour:e.stuckPerHour,marks:(0,o.marksOf)(e)})]})}var k=e.i(41220);function S({machines:e,stuckByMachine:s,renderLiveness:a}){return(0,t.jsxs)("section",{"aria-labelledby":"health-machines","data-testid":"health-machines",className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-4 shadow-sm max-sm:rounded-xl",children:[(0,t.jsxs)("header",{className:"flex flex-wrap items-baseline justify-between gap-2",children:[(0,t.jsx)("h2",{id:"health-machines",className:"text-section font-semibold text-foreground",children:"Machines"}),(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"Each machine runs a trierarch that crews ships."})]}),(0,t.jsx)("ul",{className:"flex flex-col divide-y divide-border",children:e.map(e=>{let n=s.get(e.id)??0;return(0,t.jsxs)("li",{"data-testid":"health-machine",className:"flex items-center gap-4 py-3 first:pt-0 last:pb-0 max-sm:flex-wrap max-sm:gap-2",children:[(0,t.jsxs)("span",{className:"inline-flex min-w-40 items-center gap-2 font-medium text-foreground",children:[(0,t.jsx)(k.Server,{"aria-hidden":!0,className:"size-(--size-icon) text-muted-foreground"}),e.name]}),(0,t.jsx)("span",{className:"min-w-0 flex-1",children:a(e)}),(0,t.jsxs)("span",{className:"text-meta text-muted-foreground",children:[e.ships," ",1===e.ships?"ship":"ships",n>0&&(0,t.jsxs)(t.Fragment,{children:[" · ",(0,t.jsxs)("span",{className:"font-semibold text-foreground",children:[n," ",1===n?"delivery":"deliveries"," stuck on its ships"]})]})]}),n>0&&(0,t.jsx)(p.Button,{variant:"secondary",size:"sm",nativeButton:!1,render:(0,t.jsx)(h.default,{href:`/trierarchs/${e.id}`}),className:"max-sm:h-(--size-control-touch) max-sm:w-full",children:"Open machine"})]},e.id)})})]})}function C({state:e,health:s,onRetry:a,notes:n,machines:i,renderLiveness:r,children:l,now:d}){if("error"===e)return(0,t.jsx)(c.InlineError,{variant:"page",title:"Couldn’t load the fleet’s health",description:"Nothing changed in the fleet. The page tries again by itself.",onRetry:a});if("loading"===e||void 0===s)return(0,t.jsx)(m.LoadingSkeleton,{variant:"cards",rows:4,label:"Loading the fleet’s health"});let u=(0,o.causeGroupsOf)(s);return(0,t.jsxs)("div",{"data-testid":"health-board",className:"flex flex-col gap-5 max-sm:gap-3.5",children:[(0,t.jsx)(w,{health:s}),(0,t.jsx)(y,{acknowledged:s.acknowledged}),u.length>0&&(0,t.jsx)("div",{className:"grid gap-5 lg:grid-cols-2 max-sm:gap-3.5",children:u.map(e=>(0,t.jsx)(j,{group:e,notes:n,now:d},e.cause))}),void 0!==i&&i.length>0&&(0,t.jsx)(S,{machines:i,stuckByMachine:(0,o.stuckByMachine)(s),renderLiveness:r}),l]})}function $({renderLiveness:e,children:s}){let c=(0,r.useNow)(),m=(0,n.useFleetHealth)(),u=(0,a.useFleetSnapshot)(),h=(0,d.useMachines)(),x=u.data??[],p=new Map(x.map(e=>[e.id,e])),g=new Map;for(let e of m.data?.stuck??[]){let t="ship"===e.place.kind?p.get(e.place.ship.id):void 0,s=(0,o.placeNote)(e,{facts:t&&{lastSeenAt:t.lastSeenAt},since:e=>(0,l.relativeTime)(e,c)});null!==s&&g.set(e,s)}let f=new Map((h.data??[]).map(e=>[e.shipId,e])),b=h.data?.map(e=>({id:e.shipId,name:e.name,ships:(0,i.spotsOf)(e,x).length}));return(0,t.jsx)(C,{state:m.isError?"error":m.data?"ready":"loading",health:m.data,onRetry:()=>{m.refetch()},notes:g,machines:b,renderLiveness:t=>{let s=f.get(t.id);return void 0===s?null:e(s)},now:c,children:s})}var z=e.i(84294),M=e.i(19249),T=e.i(81830),A=e.i(1935);function O({members:e,ships:s,now:a,renderAction:n}){return(0,t.jsx)("ul",{"data-testid":"silent-members",className:"divide-y divide-border overflow-hidden rounded-lg border border-border",children:e.map(({squadronId:e,member:i})=>{let{lastSeenAt:r}=i.crew;return(0,t.jsxs)("li",{"data-testid":"silent-member",className:"flex flex-wrap items-center gap-x-4 gap-y-1.5 px-3 py-2.5",children:[(0,t.jsxs)("span",{className:"flex min-w-0 flex-col gap-1",children:[(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)(M.HealthIndicator,{health:"silent"}),(0,t.jsx)("span",{className:"font-medium",children:i.name})]}),(0,t.jsx)(A.SquadronTag,{squadronId:e,role:i.role,size:"sm"})]}),(0,t.jsxs)("span",{className:"flex flex-col text-meta",children:[(0,t.jsx)("span",{children:null===r?"never seen":`not seen for ${(0,l.duration)(new Date(r),a)}`}),(0,t.jsxs)("span",{className:"text-muted-foreground",children:["checks in ",(0,z.checkInText)(i.checkInMinutes)]})]}),(0,t.jsx)("span",{className:"grow",children:(0,t.jsx)(T.ReportLine,{report:s.get(i.shipId)?.report??null,now:a,variant:"row",testId:"silent-member-report"})}),n?.({squadronId:e,member:i}),(0,t.jsxs)(h.default,{href:`/squadrons/${e}`,className:"inline-flex items-center gap-1 text-meta font-medium hover:underline",children:["Open",(0,t.jsx)(u.ChevronRight,{"aria-hidden":!0,className:"size-(--size-icon-sm)"})]})]},i.shipId)})})}var I=e.i(15327),L=e.i(49050),R=e.i(90262),q=e.i(87964),D=e.i(18423),E=e.i(78485),B=e.i(53573),H=e.i(48695);e.s(["default",0,function(){let e=(0,r.useNow)(),i=(0,q.useConsoleFrame)(),l=(0,D.useLiveFleet)(),d=(0,n.useFleetHealth)(),o=(0,R.useAccess)(),c=(0,H.useSquadrons)(),m=(0,z.silentMembers)(c.data??[]),u=(0,B.useShips)(m.map(({member:e})=>e.shipId)),h=new Map(((0,a.useFleetSnapshot)().data??[]).map(e=>[e.id,e]));return(0,E.useSignInWhenSessionEnds)([d.error,l.error]),(0,t.jsx)(s.ListPage,{...i,title:"Health",description:"Where deliveries wait, since when, and what lets them move.",live:l.live,children:(0,t.jsx)($,{renderLiveness:s=>(0,t.jsx)(L.MachineLiveness,{machine:s,now:e}),children:m.length>0?(0,t.jsxs)("section",{"aria-labelledby":"health-silent",className:"flex flex-col gap-2",children:[(0,t.jsxs)("h2",{id:"health-silent",className:"text-section font-semibold text-foreground",children:["Silent members (",m.length,")"]}),(0,t.jsx)(O,{members:m,ships:h,now:e,renderAction:o.canManage?({squadronId:e,member:s})=>(0,t.jsx)(I.GetNewCrewLine,{squadronId:e,member:s,ship:u.get(s.shipId),isPrimary:!0,testId:"silent-member-new-crew-line"}):void 0}),(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"A member is silent after 3 missed check-ins; only you can start its new session. Late members and blocked reports stay on their squadron page."})]}):null})})}],46980)},36651,e=>{"use strict";var t=e.i(43476),s=e.i(90063);e.s(["Kbd",0,function({className:e,...a}){return(0,t.jsx)("kbd",{"data-slot":"kbd",className:(0,s.classNames)("inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-xs border border-border bg-muted px-1.25 font-sans text-micro font-medium text-muted-foreground max-sm:hidden",e),...a})}])},19321,e=>{"use strict";var t=e.i(43476),s=e.i(90063);e.s(["Skeleton",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"skeleton","aria-hidden":!0,className:(0,s.classNames)("animate-pulse rounded-sm bg-secondary [animation-duration:var(--duration-pulse)] motion-reduce:animate-none",e),...a})}])},19249,e=>{"use strict";var t=e.i(43476),s=e.i(90063);let a={"on-time":{label:"On time",dot:"bg-tone-ok-fg",text:"text-tone-ok-fg"},late:{label:"Late",dot:"bg-tone-waiting-fg",text:"text-tone-waiting-fg"},silent:{label:"Silent",dot:"bg-tone-attention-fg",text:"text-tone-attention-fg"},"standing-down":{label:"Standing down",dot:"bg-tone-active-fg",text:"text-tone-active-fg"},"not-on-station":{label:"Not on station",dot:"border border-dashed border-muted-foreground",text:"text-foreground"}};function n({health:e}){return(0,t.jsx)("span",{"aria-hidden":!0,className:(0,s.classNames)("size-2 shrink-0 rounded-full",a[e].dot)})}e.s(["HealthIndicator",0,function({health:e,detail:i,className:r}){return(0,t.jsxs)("span",{"data-slot":"health-indicator","data-health":e,className:(0,s.classNames)("inline-flex items-center gap-1.5 text-meta",r),children:[(0,t.jsx)(n,{health:e}),(0,t.jsx)("span",{className:(0,s.classNames)("font-medium",a[e].text),children:a[e].label}),void 0!==i&&(0,t.jsx)("span",{className:"text-muted-foreground",children:i})]})},"HealthSummary",0,function({counts:e,className:i}){return(0,t.jsx)("span",{"data-slot":"health-summary",className:(0,s.classNames)("inline-flex flex-wrap items-center gap-x-3 gap-y-1 text-meta",i),children:e.map(({health:e,count:s})=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,t.jsx)(n,{health:e}),(0,t.jsxs)("span",{children:[s," ",a[e].label.toLowerCase()]})]},e))})}])},88393,e=>{"use strict";var t=e.i(43476),s=e.i(90063),a=e.i(19321);function n(e){return Array.from({length:e},(e,t)=>`row-${String(t)}`)}e.s(["LoadingSkeleton",0,function({variant:e,rows:i=4,label:r="Loading",className:l}){return(0,t.jsxs)("div",{role:"status","data-slot":"loading-skeleton","data-variant":e,className:(0,s.classNames)("w-full",l),children:[(0,t.jsx)("span",{className:"sr-only",children:r}),"table"===e?(0,t.jsxs)("div",{className:"overflow-hidden rounded-lg border border-border bg-card shadow-sm",children:[(0,t.jsx)("div",{className:"h-(--size-row-header) border-b border-border bg-muted"}),n(i).map(e=>(0,t.jsxs)("div",{className:"flex h-(--size-row) items-center gap-8 border-b border-border px-4 last:border-0",children:[(0,t.jsx)(a.Skeleton,{className:"h-2.5 w-24"}),(0,t.jsx)(a.Skeleton,{className:"h-5 w-16"}),(0,t.jsx)(a.Skeleton,{className:"h-5 w-20"}),(0,t.jsx)(a.Skeleton,{className:"h-2.5 w-28"})]},e))]}):null,"cards"===e?(0,t.jsx)("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:n(4).map(e=>(0,t.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-4",children:[(0,t.jsx)(a.Skeleton,{className:"h-2.5 w-20"}),(0,t.jsx)(a.Skeleton,{className:"h-6 w-10"}),(0,t.jsx)(a.Skeleton,{className:"h-2.5 w-28"})]},e))}):null,"detail"===e?(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsx)(a.Skeleton,{className:"h-7 w-48"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(a.Skeleton,{className:"h-5 w-20"}),(0,t.jsx)(a.Skeleton,{className:"h-5 w-16"})]}),(0,t.jsx)(a.Skeleton,{className:"h-16 w-full rounded-lg"})]}):null,"list"===e?(0,t.jsx)("div",{className:"overflow-hidden rounded-lg border border-border bg-card",children:n(i).map(e=>(0,t.jsxs)("div",{className:"flex flex-col gap-2.5 border-b border-border px-3.5 py-3 last:border-0",children:[(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)(a.Skeleton,{className:"h-3 w-28"}),(0,t.jsx)(a.Skeleton,{className:"h-5 w-16"})]}),(0,t.jsx)(a.Skeleton,{className:"h-2.5 w-44"})]},e))}):null]})}])},63481,e=>{"use strict";var t=e.i(43476),s=e.i(56420);let a={name:"app-window",size:24,node:[["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}],["path",{d:"M10 4v4",key:"pp8u80"}],["path",{d:"M2 8h20",key:"d11cs7"}],["path",{d:"M6 4v4",key:"1svtjw"}]]};a.node;let n=(0,s.default)(a);var i=e.i(71567);let r={name:"cloud",size:24,node:[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]};r.node;let l=(0,s.default)(r),d={name:"laptop",size:24,node:[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]]};d.node;let o=(0,s.default)(d),c={name:"map-pin",size:24,node:[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]};c.node;let m=(0,s.default)(c),u={name:"message-circle",size:24,node:[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]};u.node;let h=(0,s.default)(u);var x=e.i(41220),p=e.i(83035),g=e.i(94831),f=e.i(90063),b=e.i(66616),j=e.i(40798);let v={DEVICE:o,CLOUD:l,SERVER:x.Server,OTHER:m},y={coding:p.SquareTerminal,chat:h,bot:i.Bot,console:n},N={md:"text-body",sm:"text-meta"};e.s(["LocationTag",0,function({kind:e,description:s=null,harness:a=null,isCompact:n=!1,size:i="md",className:r}){let l=(0,f.classNames)("inline-flex min-w-0 items-center gap-1.5 text-muted-foreground [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",N[i],r);if(null===e)return(0,t.jsxs)("span",{"data-slot":"location-tag",className:l,children:[(0,t.jsx)(g.Unplug,{"aria-hidden":!0}),"No session"]});let d=v[e],o=(0,j.locationKindWord)(e),c=null===s?o:`${o} \xb7 ${s}`;if(null!==a){let e=(0,b.harnessKind)(a),n=void 0===e?void 0:y[e],i=(0,b.harnessWord)(a);return(0,t.jsxs)("span",{"data-slot":"location-tag",className:l,title:null===s?`${i} \xb7 ${o}`:`${i} \xb7 ${o}: ${s}`,children:[void 0===n?null:(0,t.jsx)(n,{"aria-hidden":!0}),(0,t.jsx)("span",{className:"truncate text-foreground",children:i}),(0,t.jsx)("span",{"aria-hidden":!0,children:"·"}),(0,t.jsx)(d,{"aria-hidden":!0}),(0,t.jsx)("span",{className:"truncate",children:o}),null===s?null:(0,t.jsxs)("span",{className:"sr-only",children:[": ",s]})]})}return n?(0,t.jsxs)("span",{"data-slot":"location-tag",className:l,title:c,children:[(0,t.jsx)(d,{"aria-hidden":!0}),(0,t.jsxs)("span",{className:"sr-only",children:[o,": "]}),(0,t.jsx)("span",{className:"truncate text-foreground",children:s??o})]}):(0,t.jsxs)("span",{"data-slot":"location-tag",className:l,children:[(0,t.jsx)(d,{"aria-hidden":!0}),(0,t.jsxs)("span",{className:"truncate",children:[o,null===s?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{"aria-hidden":!0,children:" · "}),(0,t.jsx)("span",{className:"sr-only",children:", "}),(0,t.jsx)("span",{className:"text-foreground",children:s})]})]})]})}],63481)},81830,e=>{"use strict";var t=e.i(43476),s=e.i(79432),a=e.i(19002),n=e.i(11147),i=e.i(90063),r=e.i(49635),l=e.i(93361);let d={working:s.Activity,blocked:n.OctagonPause,idle:a.CirclePause},o={active:"text-tone-active-fg",waiting:"text-tone-waiting-fg",ended:"text-tone-ended-fg"};e.s(["ReportLine",0,function({report:e,now:s,variant:a,isTimeInTitle:n=!1,testId:c}){let m="full"===a,u=(0,i.classNames)("flex min-w-0 items-center gap-1.5",m?"text-body":"text-meta");if(null===e)return(0,t.jsx)("span",{"data-testid":c,"data-state":"none",className:(0,i.classNames)(u,"text-muted-foreground"),children:"No report yet"});let h=d[e.state],x=o[l.REPORT_TONES[e.state]],p=new Date(e.reportedAt);return(0,t.jsxs)("span",{"data-testid":c,"data-state":e.state,title:n?`${(0,l.reportText)(e)} \xb7 ${(0,l.reportedWhen)(p,s)}`:(0,l.reportText)(e),className:u,children:[(0,t.jsx)(h,{"aria-hidden":!0,className:(0,i.classNames)("size-(--size-icon-sm) shrink-0",x)}),(0,t.jsx)("span",{className:(0,i.classNames)("shrink-0 font-medium",x),children:l.REPORT_STATE_WORDS[e.state]}),null===e.note?null:(0,t.jsx)("span",{className:"min-w-0 truncate text-foreground",children:e.note}),n?null:(0,t.jsx)("time",{dateTime:e.reportedAt,title:(0,r.fullDateTime)(p),className:"shrink-0 text-muted-foreground tabular-nums",children:m?`\xb7 ${(0,l.reportedWhen)(p,s)}`:(0,l.reportAge)(p,s)})]})}])},1935,e=>{"use strict";var t=e.i(43476),s=e.i(60011),a=e.i(22016),n=e.i(90063);e.s(["SquadronTag",0,function({squadronId:e,role:i,size:r="md",className:l}){return(0,t.jsxs)(a.default,{href:`/squadrons/${e}`,"data-slot":"squadron-tag",className:(0,n.classNames)("inline-flex max-w-full items-center gap-1 rounded-sm bg-secondary px-1.5 text-secondary-foreground hover:underline [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0","sm"===r?"h-5.5 text-meta":"h-6 text-body",l),children:[(0,t.jsx)(s.Shapes,{"aria-hidden":!0}),(0,t.jsx)("span",{className:"truncate font-medium",children:e}),void 0!==i&&(0,t.jsxs)("span",{className:"shrink-0 text-muted-foreground",children:["· ",i]})]})}])},77880,85538,e=>{"use strict";var t=e.i(43476),s=e.i(67927),a=e.i(66595),n=e.i(19759),i=e.i(22016),r=e.i(15905),l=e.i(36651),d=e.i(90063);let o={live:{label:"Live",dot:"bg-tone-ok-fg"},reconnecting:{label:"Reconnecting",dot:"bg-tone-waiting-fg"},offline:{label:"Offline",dot:"bg-tone-attention-fg"}};function c({state:e,className:s}){let{label:a,dot:n}=o[e];return(0,t.jsxs)("span",{"data-slot":"live-status","data-state":e,"aria-live":"polite",className:(0,d.classNames)("inline-flex items-center gap-1.5 text-meta text-muted-foreground",s),children:[(0,t.jsx)("span",{"aria-hidden":!0,className:(0,d.classNames)("size-2 shrink-0 rounded-full",n)}),a]})}e.s(["Header",0,function({breadcrumb:e,parents:d=[],live:o,onCompose:m,onSearch:u}){return(0,t.jsxs)("header",{"data-slot":"header",className:"sticky top-0 z-30 hidden h-(--size-header) shrink-0 items-center justify-between gap-4 border-b border-border bg-background px-6 sm:flex",children:[(0,t.jsx)("nav",{"aria-label":"Breadcrumb","data-testid":"header-breadcrumb",className:"min-w-0 text-body",children:(0,t.jsxs)("ol",{className:"flex min-w-0 items-center gap-1.5",children:[d.map(e=>(0,t.jsxs)("li",{className:"flex shrink-0 items-center gap-1.5",children:[(0,t.jsx)(i.default,{href:e.href,className:"text-muted-foreground hover:text-foreground hover:underline",children:e.label}),(0,t.jsx)(s.ChevronRight,{"aria-hidden":!0,className:"size-3.5 text-muted-foreground"})]},e.href)),(0,t.jsx)("li",{"aria-current":"page",className:"truncate font-medium text-foreground",children:e})]})}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(c,{state:o}),u?(0,t.jsxs)(r.Button,{size:"sm",icon:(0,t.jsx)(a.Search,{"aria-hidden":!0}),"data-testid":"header-search",className:"w-60 justify-start font-normal text-muted-foreground",onClick:u,children:[(0,t.jsx)("span",{className:"grow text-left",children:"Search ships or jump to"}),(0,t.jsx)(l.Kbd,{children:"⌘K"})]}):null,m?(0,t.jsx)(r.Button,{size:"sm",icon:(0,t.jsx)(n.SquarePen,{"aria-hidden":!0}),"data-testid":"header-compose",onClick:m,children:"Compose"}):null]})]})}],77880);var m=e.i(24071),u=e.i(57957);e.s(["TopBar",0,function({title:e,live:s,actions:n,back:l,account:d,onSearch:o}){let h=o&&!l?o:void 0;return(0,t.jsxs)("header",{"data-slot":"top-bar","data-mode":l?"detail":"root",className:"sticky top-0 z-30 flex h-(--size-header) items-center gap-2.5 border-b border-border bg-background px-4 sm:hidden",children:[l?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(i.default,{href:l.href,className:"-ml-1.5 inline-flex h-(--size-control-touch) shrink-0 items-center gap-0.5 rounded-md pr-2 text-body-touch text-foreground focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon)",children:[(0,t.jsx)(m.ChevronLeft,{"aria-hidden":!0}),l.label]}),(0,t.jsx)("p",{className:"min-w-0 flex-1 truncate text-center text-body-touch font-semibold text-foreground",children:e})]}):(0,t.jsx)("h1",{className:"truncate text-title-touch font-semibold tracking-tight text-foreground",children:e}),(0,t.jsx)(c,{state:s}),n||h||d&&!l?(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[h?(0,t.jsx)(r.Button,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Search ships or jump to","data-testid":"top-bar-search",onClick:h,children:(0,t.jsx)(a.Search,{"aria-hidden":!0})}):null,n,d&&!l?(0,t.jsx)(u.AccountMenuSheet,{...d}):null]}):null]})}],85538)},77821,e=>{"use strict";var t=e.i(43476),s=e.i(19759),a=e.i(15905),n=e.i(77880),i=e.i(85538);e.s(["ListPage",0,function({title:e,description:r,titleMeta:l,primaryAction:d,toolbar:o,live:c,onCompose:m,onSearch:u,account:h,banner:x,phoneTopBar:p,children:g}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.Header,{breadcrumb:e,live:c,onCompose:m,onSearch:u}),x,p??(0,t.jsx)(i.TopBar,{title:e,live:c,account:h,onSearch:u,actions:m?(0,t.jsx)(a.Button,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Compose","data-testid":"top-bar-compose",onClick:m,children:(0,t.jsx)(s.SquarePen,{"aria-hidden":!0})}):void 0}),(0,t.jsxs)("main",{className:"flex grow flex-col gap-5 px-8 py-6 max-sm:gap-3.5 max-sm:px-4 max-sm:pt-3.5 max-sm:pb-[calc(var(--size-tabbar)+var(--spacing)*4)]",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4 max-sm:gap-3",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-1",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-x-2.5 gap-y-1",children:[(0,t.jsx)("h1",{className:"text-title font-semibold tracking-tight text-foreground max-sm:hidden",children:e}),l]}),r?(0,t.jsx)("p",{className:"text-meta text-muted-foreground max-sm:text-body-touch",children:r}):null]}),d?(0,t.jsx)("div",{className:"shrink-0 max-sm:w-full max-sm:[&>*]:w-full",children:d}):null]}),o,g]})]})}])},16634,38614,e=>{"use strict";let t=["noShipCanTake","waitingForCrew","stalledInFlight","undeliverable"];function s(e){return`/fleet-health/${e}`}function a(e){return"ship"===e.kind?e.ship.name:e.type}let n={noShipCanTake:"no ship can take",waitingForCrew:"waiting for crew",stalledInFlight:"stalled in flight",undeliverable:"undeliverable"},i=[{minutes:1,label:"1 min"},{minutes:10,label:"10 min"},{minutes:60,label:"1 h"},{minutes:1440,label:"1 d"},{minutes:10080,label:"7 d"}],r=Math.log(1),l=Math.log(10080);function d(e){return Math.min(Math.max((Math.log(Math.max(e,1))-r)/(l-r),0),1)}let o={pending:"pending",received:"received",handed:"handed (pulled)",undeliverable:"undeliverable"};e.s(["CAUSE_SENTENCES",0,{noShipCanTake:"Sent to a type with no active ship. Waits until you commission one.",waitingForCrew:"Sent to a ship no session crews. Waits until it is crewed.",stalledInFlight:"Taken by a session that went quiet. Waits until it acknowledges or the ship is released.",undeliverable:"Taken five times, never acknowledged. Waits for you to resend or dismiss."},"WAIT_TICKS",0,i,"causeGroupsOf",0,function(e){return t.flatMap(t=>{let s=e.stuck.filter(e=>e.cause===t).toSorted((e,t)=>e.oldestSince.localeCompare(t.oldestSince));return 0===s.length?[]:[{cause:t,count:s.reduce((e,t)=>e+t.count,0),places:s}]})},"causePathOf",0,s,"marksOf",0,function(e){let[t]=e.stuckPerHour;return void 0===t?[]:e.stuck.filter(e=>e.oldestSince>t.at).toSorted((e,t)=>e.oldestSince.localeCompare(t.oldestSince)).map((t,s)=>({number:s+1,hour:e.stuckPerHour.findIndex(e=>e.at>=t.oldestSince),label:`${a(t.place)}: ${n[t.cause]}`}))},"medianText",0,function(e,t){let s=Math.round(e/1e3);return s<60?`${String(s)} s`:t(new Date(0),new Date(e))},"messagePathOn",0,function(e,t){return`/ships/${e}?tab=messages&message=${t}`},"nextStepOf",0,function(e){let t=e.place;switch(e.cause){case"noShipCanTake":return{label:`Commission a ${a(t)}`,href:"/?commission=new"};case"waitingForCrew":return"ship"===t.kind?{label:"Get starting prompt",href:`/ships/${t.ship.id}`}:{label:"Open ships of type",href:`/?type=${encodeURIComponent(t.type)}`};case"stalledInFlight":if("ship"===t.kind&&null!==t.machine)return{label:"Open machine",href:`/trierarchs/${t.machine.id}`};return"ship"===t.kind?{label:"Open ship",href:`/ships/${t.ship.id}`}:{label:"Open ships of type",href:`/?type=${encodeURIComponent(t.type)}`};case"undeliverable":return{label:"Resend or dismiss",href:s("undeliverable")}}},"placeName",0,a,"placeNote",0,function(e,t){let s=e.place;if("stalledInFlight"!==e.cause||"ship"!==s.kind)return null;let a=[...new Set(e.deliveries.map(e=>o[e.state]))].join(", ");if(null!==s.machine){let e=null===s.machine.lastSeenAt?"never seen":`last seen ${t.since(new Date(s.machine.lastSeenAt))}`;return`${a}, machine ${s.machine.name} ${e}`}let n=t.facts?.lastSeenAt??null;return null===n?a:`${a}, session last seen ${t.since(new Date(n))}`},"previewOf",0,function(e){return e.split("\n",1)[0]?.trim()??""},"stuckByMachine",0,function(e){let t=new Map;for(let s of e.stuck)"ship"===s.place.kind&&null!==s.place.machine&&t.set(s.place.machine.id,(t.get(s.place.machine.id)??0)+s.count);return t},"trendSentence",0,function(e){return e.count>e.dayAgo?`Up from ${String(e.dayAgo)} a day ago.`:e.count<e.dayAgo?`Down from ${String(e.dayAgo)} a day ago.`:"As many as a day ago."},"verdictOf",0,function(e){let[t]=e.stuck.map(e=>e.oldestSince).toSorted();if(void 0===t)return{kind:"delivering"};let s=e.stuckPerHour.at(-25)?.count??0;return{kind:"stuck",count:e.stuck.reduce((e,t)=>e+t.count,0),places:e.stuck.length,since:t,dayAgo:s}},"waitMinutes",0,function(e,t){return Math.max(0,(t.getTime()-Date.parse(e))/6e4)},"waitPosition",0,d],16634);var c=e.i(43476),m=e.i(90063);function u(e){return`${100*d(e)}%`}e.s(["WaitAxis",0,function({className:e}){return(0,c.jsx)("div",{"aria-hidden":!0,className:(0,m.classNames)("relative h-4 w-full text-micro text-muted-foreground",e),children:i.map((e,t)=>(0,c.jsx)("span",{className:(0,m.classNames)("absolute whitespace-nowrap",0===t?"":t===i.length-1?"-translate-x-full":"-translate-x-1/2"),style:{left:u(e.minutes)},children:e.label},e.minutes))})},"WaitStrip",0,function({waits:e,label:t,className:s}){let a=Math.max(0,...e);return(0,c.jsxs)("div",{role:"img","aria-label":t,"data-testid":"health-wait-strip",className:(0,m.classNames)("relative h-4 w-full",s),children:[(0,c.jsx)("span",{"aria-hidden":!0,className:"absolute inset-y-0 rounded-xs bg-muted",style:{left:u(10),right:`calc(100% - ${u(60)})`}}),(0,c.jsx)("span",{"aria-hidden":!0,className:"absolute inset-x-0 top-1/2 h-px bg-border"}),i.map(e=>(0,c.jsx)("span",{"aria-hidden":!0,className:"absolute top-1/4 h-1/2 w-px bg-border",style:{left:u(e.minutes)}},e.minutes)),(0,c.jsx)("span",{"aria-hidden":!0,className:"absolute top-1/2 h-0.5 -translate-y-1/2 rounded-full bg-foreground opacity-35",style:{left:0,width:u(a)}}),e.map((e,t)=>(0,c.jsx)("span",{"aria-hidden":!0,className:"absolute top-1/2 size-2.5 -translate-1/2 rounded-full border-2 border-card bg-foreground",style:{left:u(e)}},`${e}-${String(t)}`))]})}],38614)},23612,e=>{"use strict";var t=e.i(43476),s=e.i(90063),a=e.i(14695);let n={running:"bg-tone-ok-fg",crewing:"bg-tone-active-fg",releasing:"bg-tone-active-fg",restarting:"bg-tone-waiting-fg",crashed:"bg-tone-attention-fg"};e.s(["CapacityBar",0,function({spots:e,caps:i,unknownText:r="Unknown",testId:l}){let d=(0,a.capacityLine)(e,i);if(void 0===i||void 0===d)return(0,t.jsx)("span",{"data-testid":l,className:"text-meta text-muted-foreground",children:r});let o=Math.max(0,i.ships-e.length);return(0,t.jsxs)("span",{role:"img","aria-label":d,"data-testid":l,className:"inline-flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1",children:[(0,t.jsxs)("span",{"aria-hidden":!0,className:"inline-flex shrink-0 gap-0.5",children:[e.map((e,a)=>(0,t.jsx)("span",{title:`Spot ${String(a+1)}: ${e.name}, ${e.status}`,className:(0,s.classNames)("h-2 w-3 rounded-xs",n[e.status])},e.shipId)),Array.from({length:o},(s,a)=>(0,t.jsx)("span",{title:`Spot ${String(e.length+a+1)}: vacant`,className:"h-2 w-3 rounded-xs border border-input"},`free-${String(a)}`))]}),(0,t.jsx)("span",{className:"text-meta tabular-nums",children:d})]})}])},49050,e=>{"use strict";var t=e.i(43476),s=e.i(71567),a=e.i(52886),n=e.i(69644),i=e.i(69846),r=e.i(86875),l=e.i(66787),d=e.i(22016),o=e.i(66616),c=e.i(14695),m=e.i(49635),u=e.i(66390),h=e.i(23612),x=e.i(63481);let p={alive:"border-tone-ok-border bg-tone-ok-bg text-tone-ok-fg",silent:"border-tone-attention-border bg-tone-attention-bg text-tone-attention-fg","not-started":"border-tone-waiting-border bg-tone-waiting-bg text-tone-waiting-fg"},g={alive:"Alive",silent:"Not answering","not-started":"Not started"};function f({machine:e,now:s}){let n=(0,c.machineLiveness)(e),i=null===e.lastSeenAt?null:new Date(e.lastSeenAt);return(0,t.jsxs)("span",{className:"inline-flex flex-wrap items-center gap-x-2 gap-y-1 text-meta","data-testid":"machine-liveness","data-liveness":n,children:[(0,t.jsxs)(u.Badge,{variant:"outline",className:p[n],children:["alive"===n?(0,t.jsx)(r.ShipWheel,{"aria-hidden":!0}):(0,t.jsx)(a.CircleDashed,{"aria-hidden":!0}),g[n]]}),null===i?(0,t.jsx)("span",{className:"text-muted-foreground",children:"· run its setup line on the machine"}):(0,t.jsxs)("time",{dateTime:e.lastSeenAt??void 0,title:(0,m.fullDateTime)(i),className:"text-muted-foreground tabular-nums",children:["· ","silent"===n?`since ${(0,m.clockTime)(i)}`:(0,m.lastSeen)(i,s).replace("Last seen","seen")]})]})}function b(e,t){let s=(0,m.relativeTime)(e,t);return"Just now"===s?"just now":s}function j({title:e,children:s,className:a}){return(0,t.jsxs)("div",{className:`flex min-w-0 flex-col gap-2 px-4.5 py-4 ${a??""}`,children:[(0,t.jsx)("span",{className:"text-caption font-medium text-muted-foreground",children:e}),s]})}function v({harness:e,now:a}){let n=(0,o.harnessDetection)(e,a);return(0,t.jsxs)("div",{className:"flex flex-col gap-1.5 border-t border-border py-2.5 first-of-type:border-t-0 first-of-type:pt-0",children:[(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-body font-medium [&_svg]:size-(--size-icon-sm) [&_svg]:text-muted-foreground",children:[(0,t.jsx)(s.Bot,{"aria-hidden":!0}),(0,o.harnessWord)(e.harness),void 0===n?null:(0,t.jsx)("span",{className:"font-normal text-meta text-muted-foreground",children:n})]}),(0,c.harnessOptions)(e.options).map(e=>(0,t.jsxs)("span",{className:"flex flex-wrap items-center gap-x-2.5 gap-y-1 text-meta",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:e.name}),e.values.map(s=>(0,t.jsxs)("span",{className:"font-mono text-id whitespace-nowrap",children:[s,s===e.defaultValue?(0,t.jsx)("span",{className:"font-sans text-muted-foreground",children:" (default)"}):null]},s))]},e.name)),0===e.flags.length?null:(0,t.jsx)("span",{className:"flex flex-wrap items-center gap-1.5",children:e.flags.map(s=>e.riskyFlags?.includes(s)===!0?(0,t.jsxs)("code",{"data-testid":"machine-risky-flag",title:"Risky: every launch runs without its harness's safeguards",className:"inline-flex items-center gap-1 rounded-sm border border-tone-waiting-border bg-tone-waiting-bg px-1.5 font-mono text-id text-tone-waiting-fg [&_svg]:size-(--size-icon-sm)",children:[(0,t.jsx)(l.TriangleAlert,{"aria-hidden":!0}),s,(0,t.jsx)("span",{className:"sr-only",children:" (risky)"})]},s):(0,t.jsx)("code",{className:"rounded-sm bg-muted px-1.5 font-mono text-id",children:s},s))})]})}function y({title:e,icon:s,names:a}){return(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-caption text-muted-foreground",children:e}),0===a.length?(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"None"}):a.map(e=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-meta [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0 [&_svg]:text-muted-foreground",children:[s,e]},e))]})}function N({workspaces:e}){return(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsx)(y,{title:"Repositories · a new worktree per ship",icon:(0,t.jsx)(i.GitBranch,{"aria-hidden":!0}),names:e.repositories}),(0,t.jsx)(y,{title:"Folders · used as they are",icon:(0,t.jsx)(n.FolderOpen,{"aria-hidden":!0}),names:e.folders})]})}e.s(["HarnessOffer",0,v,"MachineCard",0,function({machine:e,spots:s,location:a,now:n}){let{details:i,report:l}=e,o=null===l?null:new Date(l.reportedAt);return(0,t.jsxs)("section",{"aria-label":e.name,"data-testid":"machine-card",className:"grid grid-cols-[minmax(0,18.75rem)_minmax(0,1.25fr)_minmax(0,1fr)] divide-x divide-border rounded-lg border border-border bg-card shadow-sm max-lg:grid-cols-1 max-lg:divide-x-0 max-lg:divide-y",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-2.5 px-4.5 py-4",children:[(0,t.jsxs)(d.default,{href:`/trierarchs/${e.shipId}`,"data-testid":"machine-card-name",className:"inline-flex items-center gap-2 text-section font-semibold hover:underline [&_svg]:size-(--size-icon) [&_svg]:text-muted-foreground",children:[(0,t.jsx)(r.ShipWheel,{"aria-hidden":!0}),e.name]}),(0,t.jsx)(f,{machine:e,now:n}),(0,t.jsxs)("span",{className:"flex flex-wrap items-center gap-1.5 text-meta text-muted-foreground",children:[(0,t.jsx)(x.LocationTag,{kind:a?.kind??null,description:a?.description}),null===i?null:(0,t.jsxs)("span",{className:"font-mono text-id",children:["· trierarch ",i.version]})]}),(0,t.jsx)("div",{role:"separator",className:"h-px bg-border"}),(0,t.jsx)("span",{className:"text-caption font-medium text-muted-foreground",children:"Capacity"}),(0,t.jsx)(h.CapacityBar,{spots:s,caps:i?.caps,testId:"machine-card-capacity",unknownText:null===o?"Unknown until it answers":`Unknown since ${(0,m.clockTime)(o)}`}),null===o?null:(0,t.jsxs)("time",{dateTime:l?.reportedAt,title:(0,m.fullDateTime)(o),className:"text-meta text-muted-foreground",children:["Last answer ",b(o,n)]})]}),(0,t.jsx)(j,{title:"Harnesses, options and flags",children:null===i?(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"Unknown until it answers"}):i.harnesses.map(e=>(0,t.jsx)(v,{harness:e,now:n},e.harness))}),(0,t.jsx)(j,{title:"Workspaces",children:null===i?(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"Unknown until it answers"}):(0,t.jsx)(N,{workspaces:i.workspaces})})]})},"MachineLiveness",0,f,"WorkspaceOffer",0,N,"lastAnswer",0,b])},66616,e=>{"use strict";var t=e.i(49635);let s={"claude-code":{word:"Claude Code",kind:"coding"},codex:{word:"Codex",kind:"coding"},"claude-chat":{word:"Claude chat",kind:"chat"},chatgpt:{word:"ChatGPT",kind:"chat"},grok:{word:"Grok",kind:"chat"},grokbot:{word:"Grokbot",kind:"bot"},console:{word:"Console",kind:"console"}};function a(e){return s[e]?.word??e}e.s(["crewLineHarnessWord",0,function(e){return"chat"===e?"Chat":a(e)},"harnessDetection",0,function(e,s){if(void 0===e.version)return;if(void 0===e.modelsConfirmedAt||null===e.modelsConfirmedAt)return`${e.version} \xb7 no model confirmed`;let a=(0,t.relativeTime)(new Date(e.modelsConfirmedAt),s);return`${e.version} \xb7 models confirmed ${"Just now"===a?"just now":a}`},"harnessKind",0,function(e){return s[e]?.kind},"harnessWord",0,a])},18423,e=>{"use strict";var t=e.i(12598),s=e.i(5861),a=e.i(71645),n=e.i(86413),i=e.i(27702);let r=new Set(["FleetInitialised","ShipCommissioned","ShipClaimed","LeaseRevoked","CredentialRevoked","StartingPromptIssued","ShipRetired","DeliveryAcknowledged","DeliveryUndeliverable","ShipReported","CrewRequested","CrewRequestRemoved","CrewAssigned","CrewStatusChanged","CrewRequestExplained","CrewRequestGivenBack","LabelAssigned","LabelUnassigned","LabelRetired"]);async function l(e,t){await e.cancelQueries({queryKey:t,predicate:e=>void 0===e.state.data&&"fetching"===e.state.fetchStatus}),await e.invalidateQueries({queryKey:t})}let d=new Set(["LabelDefined","LabelValuesChanged","LabelRetired","LabelAssigned","LabelUnassigned","LabelDeleted"]),o=new Set(["DeliveryUndeliverable","DeliveryNotHandled","DeliveryDismissed"]);e.s(["useLiveFleet",0,function(){let e=(0,i.useTRPC)(),c=(0,t.useQueryClient)(),[m,u]=(0,a.useState)(new Set),h=e=>{l(c,e)},x=(0,s.useSubscription)(e.fleet.events.subscriptionOptions({lastEventId:null},{onData:({data:t})=>{var s,a,i;if("resync"===t.kind){h(e.fleet.pathKey()),h(n.INBOX_KEY);return}let{event:l}=t;for(let t of new Set([l.shipId,l.actorShipId]))null!==t&&(h(e.fleet.ship.queryKey({shipId:t})),h(e.fleet.shipTimeline.queryKey({shipId:t})),h(e.fleet.shipWay.queryKey({shipId:t})));if(null!==l.messageId&&(h(e.fleet.shipMessages.pathKey()),h(e.fleet.shipWay.pathKey()),h(e.fleet.overdue.queryKey()),h(e.fleet.message.queryKey({messageId:l.messageId})),h(e.fleet.inbox.pathKey()),h(n.INBOX_KEY),h(e.fleet.noShipCanTake.queryKey()),h(e.fleet.health.queryKey())),s=l.type,o.has(s)&&h(e.fleet.needsAttention.queryKey()),a=l.type,d.has(a)&&h(e.fleet.labels.queryKey()),"NetworkRulesDeclared"===l.type&&h(e.fleet.declaredNetworkRules.queryKey()),i=l.type,!r.has(i))return;h(e.fleet.list.queryKey()),h(e.fleet.noShipCanTake.queryKey()),h(e.fleet.health.queryKey());let{shipId:c}=l;"ShipCommissioned"===l.type&&null!==c&&u(e=>new Set([...e,c]))}}));return{live:function(e){switch(e){case"pending":return"live";case"connecting":return"reconnecting";case"idle":case"error":return"offline"}}(x.status),newShipIds:m,error:x.error}}])},40798,e=>{"use strict";let t={DEVICE:"Device",CLOUD:"Cloud",SERVER:"Server",OTHER:"Other"};e.s(["locationKindWord",0,function(e){return t[e]}])},93361,e=>{"use strict";var t=e.i(49635);let s={working:"Working",blocked:"Blocked",idle:"Idle"};e.s(["REPORT_STATE_WORDS",0,s,"REPORT_TONES",0,{working:"active",blocked:"waiting",idle:"ended"},"reportAge",0,function(e,s){let a=Math.max(0,s.getTime()-e.getTime());return a<6e4?`${String(Math.floor(a/1e3))} s`:a<36e5?`${String(Math.floor(a/6e4))} min`:a<864e5?`${String(Math.floor(a/36e5))} h`:(0,t.relativeTime)(e,s)},"reportDetailsJson",0,function(e){return JSON.stringify(e,null,2)},"reportDetailsLabel",0,function(e){return`JSON \xb7 ${String(e)} bytes`},"reportText",0,function(e){let t=s[e.state];return null===e.note?t:`${t}: ${e.note}`},"reportedWhen",0,function(e,s){let a=(0,t.relativeTime)(e,s);return`reported ${"Just now"===a?"just now":a}`}])}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,71567,e=>{"use strict";var t=e.i(56420);let s={name:"bot",size:24,node:[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]};s.node;let a=(0,t.default)(s);e.s(["Bot",0,a],71567)},24071,e=>{"use strict";var t=e.i(56420);let s={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};s.node;let a=(0,t.default)(s);e.s(["ChevronLeft",0,a],24071)},67927,e=>{"use strict";var t=e.i(56420);let s={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};s.node;let a=(0,t.default)(s);e.s(["ChevronRight",0,a],67927)},69644,69846,e=>{"use strict";var t=e.i(56420);let s={name:"folder-open",size:24,node:[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]};s.node;let a=(0,t.default)(s);e.s(["FolderOpen",0,a],69644);let n={name:"git-branch",size:24,node:[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]]};n.node;let i=(0,t.default)(n);e.s(["GitBranch",0,i],69846)},11147,e=>{"use strict";var t=e.i(56420);let s={name:"octagon-pause",size:24,node:[["path",{d:"M10 15V9",key:"1lckn7"}],["path",{d:"M14 15V9",key:"1muqhk"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}]],aliases:["pause-octagon"]};s.node;let a=(0,t.default)(s);e.s(["OctagonPause",0,a],11147)},66595,e=>{"use strict";var t=e.i(56420);let s={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};s.node;let a=(0,t.default)(s);e.s(["Search",0,a],66595)},41220,e=>{"use strict";var t=e.i(56420);let s={name:"server",size:24,node:[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]};s.node;let a=(0,t.default)(s);e.s(["Server",0,a],41220)},19759,e=>{"use strict";var t=e.i(56420);let s={name:"square-pen",size:24,node:[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],aliases:["pen-box","edit","pen-square"]};s.node;let a=(0,t.default)(s);e.s(["SquarePen",0,a],19759)},83035,e=>{"use strict";var t=e.i(56420);let s={name:"square-terminal",size:24,node:[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],aliases:["terminal-square"]};s.node;let a=(0,t.default)(s);e.s(["SquareTerminal",0,a],83035)},94831,e=>{"use strict";var t=e.i(56420);let s={name:"unplug",size:24,node:[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]]};s.node;let a=(0,t.default)(s);e.s(["Unplug",0,a],94831)},46980,e=>{"use strict";var t=e.i(43476),s=e.i(77821),a=e.i(5387),n=e.i(90437),i=e.i(14695),r=e.i(96676),l=e.i(49635),d=e.i(265),o=e.i(16634),c=e.i(17981),m=e.i(88393),u=e.i(67927),h=e.i(22016),x=e.i(66390),p=e.i(15905),g=e.i(78865),f=e.i(38614);function b({place:e}){return"ship"===e.kind?(0,t.jsx)("span",{className:"font-medium text-foreground",children:e.ship.name}):(0,t.jsx)(x.Badge,{variant:"type",children:e.type})}function j({group:e,notes:s,now:a}){let{cause:n,count:i,places:r}=e;return(0,t.jsxs)("section",{"aria-label":(0,g.statusLabel)(n),"data-testid":"health-cause","data-cause":n,className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-4 shadow-sm max-sm:rounded-xl",children:[(0,t.jsxs)("header",{className:"flex items-start justify-between gap-3",children:[(0,t.jsxs)(h.default,{href:(0,o.causePathOf)(n),className:"group inline-flex items-center gap-1.5 rounded-md","data-testid":"health-cause-open",children:[(0,t.jsx)(g.StatusBadge,{status:n}),(0,t.jsx)(u.ChevronRight,{"aria-hidden":!0,className:"size-(--size-icon-sm) text-muted-foreground group-hover:text-foreground"}),(0,t.jsxs)("span",{className:"sr-only",children:["Open the deliveries ",(0,g.statusLabel)(n).toLowerCase()]})]}),(0,t.jsx)("span",{className:"text-metric font-semibold tabular-nums text-foreground max-sm:text-title-touch",children:i})]}),(0,t.jsx)("p",{className:"text-body text-muted-foreground max-sm:text-body-touch",children:o.CAUSE_SENTENCES[n]}),(0,t.jsxs)("div",{className:"grid grid-cols-[minmax(0,1fr)_minmax(0,1.2fr)_auto] gap-x-4 max-sm:grid-cols-1",children:[(0,t.jsxs)("div",{className:"col-span-3 grid grid-cols-subgrid items-center text-caption font-medium text-muted-foreground max-sm:col-span-1",children:[(0,t.jsx)("span",{className:"max-sm:hidden",children:"Where, how long"}),(0,t.jsx)(f.WaitAxis,{}),(0,t.jsx)("span",{className:"text-right max-sm:hidden",children:"Next step"})]}),(0,t.jsx)("ul",{className:"col-span-3 grid grid-cols-subgrid divide-y divide-border max-sm:col-span-1",children:r.map(e=>{let n=(0,o.nextStepOf)(e),i=s.get(e),r=(0,l.duration)(new Date(e.oldestSince),a);return(0,t.jsxs)("li",{"data-testid":"health-place",className:"col-span-3 grid grid-cols-subgrid items-center gap-y-2 py-3 last:pb-0 max-sm:col-span-1",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,t.jsx)(b,{place:e.place}),(0,t.jsxs)("span",{className:"text-meta tabular-nums text-muted-foreground",children:[e.count," · oldest ",r]})]}),(0,t.jsx)(f.WaitStrip,{waits:e.deliveries.map(e=>(0,o.waitMinutes)(e.since,a)),label:`${String(e.count)} waiting, the oldest ${r}`}),(0,t.jsx)(p.Button,{variant:"secondary",size:"sm",nativeButton:!1,render:(0,t.jsx)(h.default,{href:n.href}),className:"max-sm:h-(--size-control-touch) max-sm:w-full max-sm:text-body-touch","data-testid":"health-next-step",children:n.label}),void 0!==i&&(0,t.jsx)("p",{className:"col-span-3 text-meta text-muted-foreground max-sm:col-span-1",children:i})]},`${e.cause}-${"ship"===e.place.kind?e.place.ship.id:e.place.type}`)})})]})]})}function v({perHour:e}){let s=Math.max(1,...e.map(e=>e.count));return(0,t.jsx)("div",{role:"img","aria-label":`Acknowledged per hour over the last 24 hours, at most ${Math.max(0,...e.map(e=>e.count))} in an hour`,"data-testid":"health-acknowledged-bars",className:"flex h-8 w-full items-end gap-0.5 sm:w-48",children:e.map(e=>(0,t.jsx)("span",{className:"min-h-0.5 flex-1 rounded-xs bg-tone-ok-fg opacity-75",style:{height:`${e.count/s*100}%`}},e.at))})}function N({acknowledged:e}){return(0,t.jsxs)("section",{"aria-label":"Delivering","data-testid":"health-delivering",className:"flex items-center gap-4 rounded-lg border border-border bg-card p-4 shadow-sm max-sm:flex-col max-sm:items-start max-sm:gap-3 max-sm:rounded-xl",children:[(0,t.jsx)(g.StatusBadge,{status:"delivering"}),(0,t.jsx)("p",{className:"flex-1 text-body text-foreground max-sm:text-body-touch",children:null===e.medianMs?"Nothing acknowledged in the last 24 h.":(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"font-semibold tabular-nums",children:e.count})," acknowledged in the last 24 h, median"," ",(0,t.jsx)("span",{className:"font-semibold tabular-nums",children:(0,o.medianText)(e.medianMs,l.duration)})," from send to acknowledgement."]})}),(0,t.jsx)(v,{perHour:e.perHour})]})}function w({perHour:e,marks:s}){let a=Math.max(5,5*Math.ceil(Math.max(0,...e.map(e=>e.count))/5)),n=Math.max(e.length-1,1),i=e=>100-e/a*100,[r]=e,d=e.slice(1).map((e,t)=>`H${(t+1)/n*1e3} V${i(e.count)}`),o=[`M0 ${i(r?.count??0)}`,...d].join(" "),c=`${o} H1000 V100 H0 Z`,m=e.at(-1)?.count??0,u=e.flatMap((e,t)=>t%24==12?[{index:t,label:(0,l.dayMonth)(new Date(e.at))}]:[]);return(0,t.jsxs)("figure",{"data-testid":"health-trend",className:"flex min-w-0 flex-col gap-2",children:[(0,t.jsx)("figcaption",{className:"text-meta font-medium text-foreground",children:"Stuck deliveries, last 7 days, per hour"}),(0,t.jsxs)("div",{className:"grid grid-cols-[auto_1fr] gap-x-2",children:[(0,t.jsx)("div",{"aria-hidden":!0,className:"relative h-36 w-5 text-caption tabular-nums text-muted-foreground",children:[a,a/2,0].map(e=>(0,t.jsx)("span",{className:"absolute right-0 -translate-y-1/2",style:{top:`${100-e/a*100}%`},children:e},e))}),(0,t.jsxs)("div",{className:"relative h-36",children:[(0,t.jsxs)("svg",{role:"img","aria-label":`Stuck deliveries per hour over the last 7 days: ${m} now, at most ${Math.max(0,...e.map(e=>e.count))}`,viewBox:"0 0 1000 100",preserveAspectRatio:"none",className:"size-full overflow-visible",children:[[0,a/2,a].map(e=>(0,t.jsx)("line",{x1:0,x2:1e3,y1:i(e),y2:i(e),className:"stroke-border",vectorEffect:"non-scaling-stroke"},e)),(0,t.jsx)("path",{d:c,className:"fill-tone-waiting-bg"}),(0,t.jsx)("path",{d:o,className:"fill-none stroke-tone-waiting-fg",strokeWidth:2,strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"})]}),s.map(s=>(0,t.jsx)("span",{"aria-hidden":!0,"data-testid":"health-trend-mark",className:"absolute flex size-4 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-full border-2 border-foreground bg-card text-micro font-semibold text-foreground max-sm:hidden",style:{left:`${s.hour/n*100}%`,top:`${i(e[s.hour]?.count??0)/100*100}%`},children:s.number},s.number)),(0,t.jsx)("span",{"aria-hidden":!0,className:"absolute size-2 -translate-1/2 rounded-full bg-tone-waiting-fg",style:{left:"100%",top:`${i(m)/100*100}%`}})]}),(0,t.jsx)("div",{"aria-hidden":!0,className:"relative col-start-2 h-4 text-caption text-muted-foreground",children:u.map(e=>(0,t.jsx)("span",{className:"absolute -translate-x-1/2 whitespace-nowrap max-sm:[&:nth-child(even)]:hidden",style:{left:`${e.index/n*100}%`},children:e.label},e.index))})]}),s.length>0&&(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:s.map((e,s)=>(0,t.jsxs)("span",{children:[s>0&&" · ",(0,t.jsx)("span",{className:"font-semibold text-foreground",children:e.number})," ",e.label]},e.number))})]})}function y({health:e}){let s=(0,o.verdictOf)(e);return(0,t.jsxs)("section",{"aria-label":"Verdict","data-testid":"health-verdict","data-verdict":s.kind,className:"grid gap-6 rounded-lg border border-border bg-card p-4 shadow-sm lg:grid-cols-[minmax(0,2fr)_minmax(0,3fr)] max-sm:gap-4 max-sm:rounded-xl",children:[(0,t.jsxs)("div",{className:"flex flex-col items-start gap-3",children:[(0,t.jsx)(g.StatusBadge,{status:s.kind}),"stuck"===s.kind?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"text-section font-semibold text-foreground",children:[(0,t.jsx)("span",{className:"text-metric tabular-nums max-sm:text-title-touch","data-testid":"health-stuck-count",children:s.count})," ",1===s.count?"delivery":"deliveries"," stuck in ",s.places," ",1===s.places?"place":"places"]}),(0,t.jsxs)("p",{className:"text-body text-muted-foreground max-sm:text-body-touch",children:["Stuck since ",(0,l.shortDateTime)(new Date(s.since)),". ",(0,o.trendSentence)(s)]}),(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"Nothing is lost: each one is stored and moves on as soon as its cause is gone."})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"text-section font-semibold text-foreground",children:"Delivering. Nothing is stuck."}),(0,t.jsx)("p",{className:"text-body text-muted-foreground max-sm:text-body-touch",children:"Every delivery waits only on its ship to take it."})]})]}),(0,t.jsx)(w,{perHour:e.stuckPerHour,marks:(0,o.marksOf)(e)})]})}var k=e.i(41220);function S({machines:e,stuckByMachine:s,renderLiveness:a}){return(0,t.jsxs)("section",{"aria-labelledby":"health-machines","data-testid":"health-machines",className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-4 shadow-sm max-sm:rounded-xl",children:[(0,t.jsxs)("header",{className:"flex flex-wrap items-baseline justify-between gap-2",children:[(0,t.jsx)("h2",{id:"health-machines",className:"text-section font-semibold text-foreground",children:"Machines"}),(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"Each machine runs a trierarch that crews ships."})]}),(0,t.jsx)("ul",{className:"flex flex-col divide-y divide-border",children:e.map(e=>{let n=s.get(e.id)??0;return(0,t.jsxs)("li",{"data-testid":"health-machine",className:"flex items-center gap-4 py-3 first:pt-0 last:pb-0 max-sm:flex-wrap max-sm:gap-2",children:[(0,t.jsxs)("span",{className:"inline-flex min-w-40 items-center gap-2 font-medium text-foreground",children:[(0,t.jsx)(k.Server,{"aria-hidden":!0,className:"size-(--size-icon) text-muted-foreground"}),e.name]}),(0,t.jsx)("span",{className:"min-w-0 flex-1",children:a(e)}),(0,t.jsxs)("span",{className:"text-meta text-muted-foreground",children:[e.ships," ",1===e.ships?"ship":"ships",n>0&&(0,t.jsxs)(t.Fragment,{children:[" · ",(0,t.jsxs)("span",{className:"font-semibold text-foreground",children:[n," ",1===n?"delivery":"deliveries"," stuck on its ships"]})]})]}),n>0&&(0,t.jsx)(p.Button,{variant:"secondary",size:"sm",nativeButton:!1,render:(0,t.jsx)(h.default,{href:`/trierarchs/${e.id}`}),className:"max-sm:h-(--size-control-touch) max-sm:w-full",children:"Open machine"})]},e.id)})})]})}function C({state:e,health:s,onRetry:a,notes:n,machines:i,renderLiveness:r,children:l,now:d}){if("error"===e)return(0,t.jsx)(c.InlineError,{variant:"page",title:"Couldn’t load the fleet’s health",description:"Nothing changed in the fleet. The page tries again by itself.",onRetry:a});if("loading"===e||void 0===s)return(0,t.jsx)(m.LoadingSkeleton,{variant:"cards",rows:4,label:"Loading the fleet’s health"});let u=(0,o.causeGroupsOf)(s);return(0,t.jsxs)("div",{"data-testid":"health-board",className:"flex flex-col gap-5 max-sm:gap-3.5",children:[(0,t.jsx)(y,{health:s}),(0,t.jsx)(N,{acknowledged:s.acknowledged}),u.length>0&&(0,t.jsx)("div",{className:"grid gap-5 lg:grid-cols-2 max-sm:gap-3.5",children:u.map(e=>(0,t.jsx)(j,{group:e,notes:n,now:d},e.cause))}),void 0!==i&&i.length>0&&(0,t.jsx)(S,{machines:i,stuckByMachine:(0,o.stuckByMachine)(s),renderLiveness:r}),l]})}function $({renderLiveness:e,children:s}){let c=(0,r.useNow)(),m=(0,n.useFleetHealth)(),u=(0,a.useFleetSnapshot)(),h=(0,d.useMachines)(),x=u.data??[],p=new Map(x.map(e=>[e.id,e])),g=new Map;for(let e of m.data?.stuck??[]){let t="ship"===e.place.kind?p.get(e.place.ship.id):void 0,s=(0,o.placeNote)(e,{facts:t&&{lastSeenAt:t.lastSeenAt},since:e=>(0,l.relativeTime)(e,c)});null!==s&&g.set(e,s)}let f=new Map((h.data??[]).map(e=>[e.shipId,e])),b=h.data?.map(e=>({id:e.shipId,name:e.name,ships:(0,i.spotsOf)(e,x).length}));return(0,t.jsx)(C,{state:m.isError?"error":m.data?"ready":"loading",health:m.data,onRetry:()=>{m.refetch()},notes:g,machines:b,renderLiveness:t=>{let s=f.get(t.id);return void 0===s?null:e(s)},now:c,children:s})}var z=e.i(84294),M=e.i(19249),T=e.i(81830),A=e.i(1935);function O({members:e,ships:s,now:a,renderAction:n}){return(0,t.jsx)("ul",{"data-testid":"silent-members",className:"divide-y divide-border overflow-hidden rounded-lg border border-border",children:e.map(({squadronId:e,member:i})=>{let{lastSeenAt:r}=i.crew;return(0,t.jsxs)("li",{"data-testid":"silent-member",className:"flex flex-wrap items-center gap-x-4 gap-y-1.5 px-3 py-2.5",children:[(0,t.jsxs)("span",{className:"flex min-w-0 flex-col gap-1",children:[(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)(M.HealthIndicator,{health:"silent"}),(0,t.jsx)("span",{className:"font-medium",children:i.name})]}),(0,t.jsx)(A.SquadronTag,{squadronId:e,role:i.role,size:"sm"})]}),(0,t.jsxs)("span",{className:"flex flex-col text-meta",children:[(0,t.jsx)("span",{children:null===r?"never seen":`not seen for ${(0,l.duration)(new Date(r),a)}`}),(0,t.jsxs)("span",{className:"text-muted-foreground",children:["checks in ",(0,z.checkInText)(i.checkInMinutes)]})]}),(0,t.jsx)("span",{className:"grow",children:(0,t.jsx)(T.ReportLine,{report:s.get(i.shipId)?.report??null,now:a,variant:"row",testId:"silent-member-report"})}),n?.({squadronId:e,member:i}),(0,t.jsxs)(h.default,{href:`/squadrons/${e}`,className:"inline-flex items-center gap-1 text-meta font-medium hover:underline",children:["Open",(0,t.jsx)(u.ChevronRight,{"aria-hidden":!0,className:"size-(--size-icon-sm)"})]})]},i.shipId)})})}var I=e.i(15327),R=e.i(49050),L=e.i(90262),D=e.i(87964),q=e.i(18423),E=e.i(78485),B=e.i(53573),H=e.i(48695);e.s(["default",0,function(){let e=(0,r.useNow)(),i=(0,D.useConsoleFrame)(),l=(0,q.useLiveFleet)(),d=(0,n.useFleetHealth)(),o=(0,L.useAccess)(),c=(0,H.useSquadrons)(),m=(0,z.silentMembers)(c.data??[]),u=(0,B.useShips)(m.map(({member:e})=>e.shipId)),h=new Map(((0,a.useFleetSnapshot)().data??[]).map(e=>[e.id,e]));return(0,E.useSignInWhenSessionEnds)([d.error,l.error]),(0,t.jsx)(s.ListPage,{...i,title:"Health",description:"Where deliveries wait, since when, and what lets them move.",live:l.live,children:(0,t.jsx)($,{renderLiveness:s=>(0,t.jsx)(R.MachineLiveness,{machine:s,now:e}),children:m.length>0?(0,t.jsxs)("section",{"aria-labelledby":"health-silent",className:"flex flex-col gap-2",children:[(0,t.jsxs)("h2",{id:"health-silent",className:"text-section font-semibold text-foreground",children:["Silent members (",m.length,")"]}),(0,t.jsx)(O,{members:m,ships:h,now:e,renderAction:o.canManage?({squadronId:e,member:s})=>(0,t.jsx)(I.GetNewCrewLine,{squadronId:e,member:s,ship:u.get(s.shipId),isPrimary:!0,testId:"silent-member-new-crew-line"}):void 0}),(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"A member is silent after 3 missed check-ins; only you can start its new session. Late members and blocked reports stay on their squadron page."})]}):null})})}],46980)},36651,e=>{"use strict";var t=e.i(43476),s=e.i(90063);e.s(["Kbd",0,function({className:e,...a}){return(0,t.jsx)("kbd",{"data-slot":"kbd",className:(0,s.classNames)("inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-xs border border-border bg-muted px-1.25 font-sans text-micro font-medium text-muted-foreground max-sm:hidden",e),...a})}])},19321,e=>{"use strict";var t=e.i(43476),s=e.i(90063);e.s(["Skeleton",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"skeleton","aria-hidden":!0,className:(0,s.classNames)("animate-pulse rounded-sm bg-secondary [animation-duration:var(--duration-pulse)] motion-reduce:animate-none",e),...a})}])},19249,e=>{"use strict";var t=e.i(43476),s=e.i(90063);let a={"on-time":{label:"On time",dot:"bg-tone-ok-fg",text:"text-tone-ok-fg"},late:{label:"Late",dot:"bg-tone-waiting-fg",text:"text-tone-waiting-fg"},silent:{label:"Silent",dot:"bg-tone-attention-fg",text:"text-tone-attention-fg"},"standing-down":{label:"Standing down",dot:"bg-tone-active-fg",text:"text-tone-active-fg"},"not-on-station":{label:"Not on station",dot:"border border-dashed border-muted-foreground",text:"text-foreground"}};function n({health:e}){return(0,t.jsx)("span",{"aria-hidden":!0,className:(0,s.classNames)("size-2 shrink-0 rounded-full",a[e].dot)})}e.s(["HealthIndicator",0,function({health:e,detail:i,className:r}){return(0,t.jsxs)("span",{"data-slot":"health-indicator","data-health":e,className:(0,s.classNames)("inline-flex items-center gap-1.5 text-meta",r),children:[(0,t.jsx)(n,{health:e}),(0,t.jsx)("span",{className:(0,s.classNames)("font-medium",a[e].text),children:a[e].label}),void 0!==i&&(0,t.jsx)("span",{className:"text-muted-foreground",children:i})]})},"HealthSummary",0,function({counts:e,className:i}){return(0,t.jsx)("span",{"data-slot":"health-summary",className:(0,s.classNames)("inline-flex flex-wrap items-center gap-x-3 gap-y-1 text-meta",i),children:e.map(({health:e,count:s})=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,t.jsx)(n,{health:e}),(0,t.jsxs)("span",{children:[s," ",a[e].label.toLowerCase()]})]},e))})}])},88393,e=>{"use strict";var t=e.i(43476),s=e.i(90063),a=e.i(19321);function n(e){return Array.from({length:e},(e,t)=>`row-${String(t)}`)}e.s(["LoadingSkeleton",0,function({variant:e,rows:i=4,label:r="Loading",className:l}){return(0,t.jsxs)("div",{role:"status","data-slot":"loading-skeleton","data-variant":e,className:(0,s.classNames)("w-full",l),children:[(0,t.jsx)("span",{className:"sr-only",children:r}),"table"===e?(0,t.jsxs)("div",{className:"overflow-hidden rounded-lg border border-border bg-card shadow-sm",children:[(0,t.jsx)("div",{className:"h-(--size-row-header) border-b border-border bg-muted"}),n(i).map(e=>(0,t.jsxs)("div",{className:"flex h-(--size-row) items-center gap-8 border-b border-border px-4 last:border-0",children:[(0,t.jsx)(a.Skeleton,{className:"h-2.5 w-24"}),(0,t.jsx)(a.Skeleton,{className:"h-5 w-16"}),(0,t.jsx)(a.Skeleton,{className:"h-5 w-20"}),(0,t.jsx)(a.Skeleton,{className:"h-2.5 w-28"})]},e))]}):null,"cards"===e?(0,t.jsx)("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:n(4).map(e=>(0,t.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-4",children:[(0,t.jsx)(a.Skeleton,{className:"h-2.5 w-20"}),(0,t.jsx)(a.Skeleton,{className:"h-6 w-10"}),(0,t.jsx)(a.Skeleton,{className:"h-2.5 w-28"})]},e))}):null,"detail"===e?(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsx)(a.Skeleton,{className:"h-7 w-48"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(a.Skeleton,{className:"h-5 w-20"}),(0,t.jsx)(a.Skeleton,{className:"h-5 w-16"})]}),(0,t.jsx)(a.Skeleton,{className:"h-16 w-full rounded-lg"})]}):null,"list"===e?(0,t.jsx)("div",{className:"overflow-hidden rounded-lg border border-border bg-card",children:n(i).map(e=>(0,t.jsxs)("div",{className:"flex flex-col gap-2.5 border-b border-border px-3.5 py-3 last:border-0",children:[(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)(a.Skeleton,{className:"h-3 w-28"}),(0,t.jsx)(a.Skeleton,{className:"h-5 w-16"})]}),(0,t.jsx)(a.Skeleton,{className:"h-2.5 w-44"})]},e))}):null]})}])},63481,e=>{"use strict";var t=e.i(43476),s=e.i(56420);let a={name:"app-window",size:24,node:[["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}],["path",{d:"M10 4v4",key:"pp8u80"}],["path",{d:"M2 8h20",key:"d11cs7"}],["path",{d:"M6 4v4",key:"1svtjw"}]]};a.node;let n=(0,s.default)(a);var i=e.i(71567);let r={name:"cloud",size:24,node:[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]};r.node;let l=(0,s.default)(r),d={name:"laptop",size:24,node:[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]]};d.node;let o=(0,s.default)(d),c={name:"map-pin",size:24,node:[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]};c.node;let m=(0,s.default)(c),u={name:"message-circle",size:24,node:[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]};u.node;let h=(0,s.default)(u);var x=e.i(41220),p=e.i(83035),g=e.i(94831),f=e.i(90063),b=e.i(66616),j=e.i(40798);let v={DEVICE:o,CLOUD:l,SERVER:x.Server,OTHER:m},N={coding:p.SquareTerminal,chat:h,bot:i.Bot,console:n},w={md:"text-body",sm:"text-meta"};e.s(["LocationTag",0,function({kind:e,description:s=null,harness:a=null,isCompact:n=!1,size:i="md",className:r}){let l=(0,f.classNames)("inline-flex min-w-0 items-center gap-1.5 text-muted-foreground [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",w[i],r);if(null===e)return(0,t.jsxs)("span",{"data-slot":"location-tag",className:l,children:[(0,t.jsx)(g.Unplug,{"aria-hidden":!0}),"No session"]});let d=v[e],o=(0,j.locationKindWord)(e),c=null===s?o:`${o} \xb7 ${s}`;if(null!==a){let e=(0,b.harnessKind)(a),n=void 0===e?void 0:N[e],i=(0,b.harnessWord)(a);return(0,t.jsxs)("span",{"data-slot":"location-tag",className:l,title:null===s?`${i} \xb7 ${o}`:`${i} \xb7 ${o}: ${s}`,children:[void 0===n?null:(0,t.jsx)(n,{"aria-hidden":!0}),(0,t.jsx)("span",{className:"truncate text-foreground",children:i}),(0,t.jsx)("span",{"aria-hidden":!0,children:"·"}),(0,t.jsx)(d,{"aria-hidden":!0}),(0,t.jsx)("span",{className:"truncate",children:o}),null===s?null:(0,t.jsxs)("span",{className:"sr-only",children:[": ",s]})]})}return n?(0,t.jsxs)("span",{"data-slot":"location-tag",className:l,title:c,children:[(0,t.jsx)(d,{"aria-hidden":!0}),(0,t.jsxs)("span",{className:"sr-only",children:[o,": "]}),(0,t.jsx)("span",{className:"truncate text-foreground",children:s??o})]}):(0,t.jsxs)("span",{"data-slot":"location-tag",className:l,children:[(0,t.jsx)(d,{"aria-hidden":!0}),(0,t.jsxs)("span",{className:"truncate",children:[o,null===s?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{"aria-hidden":!0,children:" · "}),(0,t.jsx)("span",{className:"sr-only",children:", "}),(0,t.jsx)("span",{className:"text-foreground",children:s})]})]})]})}],63481)},81830,e=>{"use strict";var t=e.i(43476),s=e.i(79432),a=e.i(19002),n=e.i(11147),i=e.i(90063),r=e.i(49635),l=e.i(93361);let d={working:s.Activity,blocked:n.OctagonPause,idle:a.CirclePause},o={active:"text-tone-active-fg",waiting:"text-tone-waiting-fg",ended:"text-tone-ended-fg"};e.s(["ReportLine",0,function({report:e,now:s,variant:a,isTimeInTitle:n=!1,testId:c}){let m="full"===a,u=(0,i.classNames)("flex min-w-0 items-center gap-1.5",m?"text-body":"text-meta");if(null===e)return(0,t.jsx)("span",{"data-testid":c,"data-state":"none",className:(0,i.classNames)(u,"text-muted-foreground"),children:"No report yet"});let h=d[e.state],x=o[l.REPORT_TONES[e.state]],p=new Date(e.reportedAt);return(0,t.jsxs)("span",{"data-testid":c,"data-state":e.state,title:n?`${(0,l.reportText)(e)} \xb7 ${(0,l.reportedWhen)(p,s)}`:(0,l.reportText)(e),className:u,children:[(0,t.jsx)(h,{"aria-hidden":!0,className:(0,i.classNames)("size-(--size-icon-sm) shrink-0",x)}),(0,t.jsx)("span",{className:(0,i.classNames)("shrink-0 font-medium",x),children:l.REPORT_STATE_WORDS[e.state]}),null===e.note?null:(0,t.jsx)("span",{className:"min-w-0 truncate text-foreground",children:e.note}),n?null:(0,t.jsx)("time",{dateTime:e.reportedAt,title:(0,r.fullDateTime)(p),className:"shrink-0 text-muted-foreground tabular-nums",children:m?`\xb7 ${(0,l.reportedWhen)(p,s)}`:(0,l.reportAge)(p,s)})]})}])},1935,e=>{"use strict";var t=e.i(43476),s=e.i(60011),a=e.i(22016),n=e.i(90063);e.s(["SquadronTag",0,function({squadronId:e,role:i,size:r="md",className:l}){return(0,t.jsxs)(a.default,{href:`/squadrons/${e}`,"data-slot":"squadron-tag",className:(0,n.classNames)("inline-flex max-w-full items-center gap-1 rounded-sm bg-secondary px-1.5 text-secondary-foreground hover:underline [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0","sm"===r?"h-5.5 text-meta":"h-6 text-body",l),children:[(0,t.jsx)(s.Shapes,{"aria-hidden":!0}),(0,t.jsx)("span",{className:"truncate font-medium",children:e}),void 0!==i&&(0,t.jsxs)("span",{className:"shrink-0 text-muted-foreground",children:["· ",i]})]})}])},77880,85538,e=>{"use strict";var t=e.i(43476),s=e.i(67927),a=e.i(66595),n=e.i(19759),i=e.i(22016),r=e.i(15905),l=e.i(36651),d=e.i(90063);let o={live:{label:"Live",dot:"bg-tone-ok-fg"},reconnecting:{label:"Reconnecting",dot:"bg-tone-waiting-fg"},offline:{label:"Offline",dot:"bg-tone-attention-fg"}};function c({state:e,className:s}){let{label:a,dot:n}=o[e];return(0,t.jsxs)("span",{"data-slot":"live-status","data-state":e,"aria-live":"polite",className:(0,d.classNames)("inline-flex items-center gap-1.5 text-meta text-muted-foreground",s),children:[(0,t.jsx)("span",{"aria-hidden":!0,className:(0,d.classNames)("size-2 shrink-0 rounded-full",n)}),a]})}e.s(["Header",0,function({breadcrumb:e,parents:d=[],live:o,onCompose:m,onSearch:u}){return(0,t.jsxs)("header",{"data-slot":"header",className:"sticky top-0 z-30 hidden h-(--size-header) shrink-0 items-center justify-between gap-4 border-b border-border bg-background px-6 sm:flex",children:[(0,t.jsx)("nav",{"aria-label":"Breadcrumb","data-testid":"header-breadcrumb",className:"min-w-0 text-body",children:(0,t.jsxs)("ol",{className:"flex min-w-0 items-center gap-1.5",children:[d.map(e=>(0,t.jsxs)("li",{className:"flex shrink-0 items-center gap-1.5",children:[(0,t.jsx)(i.default,{href:e.href,className:"text-muted-foreground hover:text-foreground hover:underline",children:e.label}),(0,t.jsx)(s.ChevronRight,{"aria-hidden":!0,className:"size-3.5 text-muted-foreground"})]},e.href)),(0,t.jsx)("li",{"aria-current":"page",className:"truncate font-medium text-foreground",children:e})]})}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(c,{state:o}),u?(0,t.jsxs)(r.Button,{size:"sm",icon:(0,t.jsx)(a.Search,{"aria-hidden":!0}),"data-testid":"header-search",className:"w-60 justify-start font-normal text-muted-foreground",onClick:u,children:[(0,t.jsx)("span",{className:"grow text-left",children:"Search ships or jump to"}),(0,t.jsx)(l.Kbd,{children:"⌘K"})]}):null,m?(0,t.jsx)(r.Button,{size:"sm",icon:(0,t.jsx)(n.SquarePen,{"aria-hidden":!0}),"data-testid":"header-compose",onClick:m,children:"Compose"}):null]})]})}],77880);var m=e.i(24071),u=e.i(57957);e.s(["TopBar",0,function({title:e,live:s,actions:n,back:l,account:d,onSearch:o}){let h=o&&!l?o:void 0;return(0,t.jsxs)("header",{"data-slot":"top-bar","data-mode":l?"detail":"root",className:"sticky top-0 z-30 flex h-(--size-header) items-center gap-2.5 border-b border-border bg-background px-4 sm:hidden",children:[l?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(i.default,{href:l.href,className:"-ml-1.5 inline-flex h-(--size-control-touch) shrink-0 items-center gap-0.5 rounded-md pr-2 text-body-touch text-foreground focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon)",children:[(0,t.jsx)(m.ChevronLeft,{"aria-hidden":!0}),l.label]}),(0,t.jsx)("p",{className:"min-w-0 flex-1 truncate text-center text-body-touch font-semibold text-foreground",children:e})]}):(0,t.jsx)("h1",{className:"truncate text-title-touch font-semibold tracking-tight text-foreground",children:e}),(0,t.jsx)(c,{state:s}),n||h||d&&!l?(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[h?(0,t.jsx)(r.Button,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Search ships or jump to","data-testid":"top-bar-search",onClick:h,children:(0,t.jsx)(a.Search,{"aria-hidden":!0})}):null,n,d&&!l?(0,t.jsx)(u.AccountMenuSheet,{...d}):null]}):null]})}],85538)},77821,e=>{"use strict";var t=e.i(43476),s=e.i(19759),a=e.i(15905),n=e.i(77880),i=e.i(85538);e.s(["ListPage",0,function({title:e,description:r,titleMeta:l,primaryAction:d,toolbar:o,live:c,onCompose:m,onSearch:u,account:h,banner:x,phoneTopBar:p,children:g}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.Header,{breadcrumb:e,live:c,onCompose:m,onSearch:u}),x,p??(0,t.jsx)(i.TopBar,{title:e,live:c,account:h,onSearch:u,actions:m?(0,t.jsx)(a.Button,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Compose","data-testid":"top-bar-compose",onClick:m,children:(0,t.jsx)(s.SquarePen,{"aria-hidden":!0})}):void 0}),(0,t.jsxs)("main",{className:"flex grow flex-col gap-5 px-8 py-6 max-sm:gap-3.5 max-sm:px-4 max-sm:pt-3.5 max-sm:pb-[calc(var(--size-tabbar)+var(--spacing)*4)]",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4 max-sm:gap-3",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-1",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-x-2.5 gap-y-1",children:[(0,t.jsx)("h1",{className:"text-title font-semibold tracking-tight text-foreground max-sm:hidden",children:e}),l]}),r?(0,t.jsx)("p",{className:"text-meta text-muted-foreground max-sm:text-body-touch",children:r}):null]}),d?(0,t.jsx)("div",{className:"shrink-0 max-sm:w-full max-sm:[&>*]:w-full",children:d}):null]}),o,g]})]})}])},16634,38614,e=>{"use strict";let t=["noShipCanTake","waitingForCrew","stalledInFlight","undeliverable"];function s(e){return`/fleet-health/${e}`}function a(e){return"ship"===e.kind?e.ship.name:e.type}let n={noShipCanTake:"no ship can take",waitingForCrew:"waiting for crew",stalledInFlight:"stalled in flight",undeliverable:"undeliverable"},i=[{minutes:1,label:"1 min"},{minutes:10,label:"10 min"},{minutes:60,label:"1 h"},{minutes:1440,label:"1 d"},{minutes:10080,label:"7 d"}],r=Math.log(1),l=Math.log(10080);function d(e){return Math.min(Math.max((Math.log(Math.max(e,1))-r)/(l-r),0),1)}let o={pending:"pending",received:"received",handed:"handed (pulled)",undeliverable:"undeliverable"};e.s(["CAUSE_SENTENCES",0,{noShipCanTake:"Sent to a type with no active ship. Waits until you commission one.",waitingForCrew:"Sent to a ship no session crews. Waits until it is crewed.",stalledInFlight:"Taken by a session that went quiet. Waits until it acknowledges or the ship is released.",undeliverable:"Taken five times, never acknowledged. Waits for you to resend or dismiss."},"WAIT_TICKS",0,i,"causeGroupsOf",0,function(e){return t.flatMap(t=>{let s=e.stuck.filter(e=>e.cause===t).toSorted((e,t)=>e.oldestSince.localeCompare(t.oldestSince));return 0===s.length?[]:[{cause:t,count:s.reduce((e,t)=>e+t.count,0),places:s}]})},"causePathOf",0,s,"marksOf",0,function(e){let[t]=e.stuckPerHour;return void 0===t?[]:e.stuck.filter(e=>e.oldestSince>t.at).toSorted((e,t)=>e.oldestSince.localeCompare(t.oldestSince)).map((t,s)=>({number:s+1,hour:e.stuckPerHour.findIndex(e=>e.at>=t.oldestSince),label:`${a(t.place)}: ${n[t.cause]}`}))},"medianText",0,function(e,t){let s=Math.round(e/1e3);return s<60?`${String(s)} s`:t(new Date(0),new Date(e))},"messagePathOn",0,function(e,t){return`/ships/${e}?tab=messages&message=${t}`},"nextStepOf",0,function(e){let t=e.place;switch(e.cause){case"noShipCanTake":return{label:`Commission a ${a(t)}`,href:"/?commission=new"};case"waitingForCrew":return"ship"===t.kind?{label:"Get starting prompt",href:`/ships/${t.ship.id}`}:{label:"Open ships of type",href:`/?type=${encodeURIComponent(t.type)}`};case"stalledInFlight":if("ship"===t.kind&&null!==t.machine)return{label:"Open machine",href:`/trierarchs/${t.machine.id}`};return"ship"===t.kind?{label:"Open ship",href:`/ships/${t.ship.id}`}:{label:"Open ships of type",href:`/?type=${encodeURIComponent(t.type)}`};case"undeliverable":return{label:"Resend or dismiss",href:s("undeliverable")}}},"placeName",0,a,"placeNote",0,function(e,t){let s=e.place;if("stalledInFlight"!==e.cause||"ship"!==s.kind)return null;let a=[...new Set(e.deliveries.map(e=>o[e.state]))].join(", ");if(null!==s.machine){let e=null===s.machine.lastSeenAt?"never seen":`last seen ${t.since(new Date(s.machine.lastSeenAt))}`;return`${a}, machine ${s.machine.name} ${e}`}let n=t.facts?.lastSeenAt??null;return null===n?a:`${a}, session last seen ${t.since(new Date(n))}`},"previewOf",0,function(e){return e.split("\n",1)[0]?.trim()??""},"stuckByMachine",0,function(e){let t=new Map;for(let s of e.stuck)"ship"===s.place.kind&&null!==s.place.machine&&t.set(s.place.machine.id,(t.get(s.place.machine.id)??0)+s.count);return t},"trendSentence",0,function(e){return e.count>e.dayAgo?`Up from ${String(e.dayAgo)} a day ago.`:e.count<e.dayAgo?`Down from ${String(e.dayAgo)} a day ago.`:"As many as a day ago."},"verdictOf",0,function(e){let[t]=e.stuck.map(e=>e.oldestSince).toSorted();if(void 0===t)return{kind:"delivering"};let s=e.stuckPerHour.at(-25)?.count??0;return{kind:"stuck",count:e.stuck.reduce((e,t)=>e+t.count,0),places:e.stuck.length,since:t,dayAgo:s}},"waitMinutes",0,function(e,t){return Math.max(0,(t.getTime()-Date.parse(e))/6e4)},"waitPosition",0,d],16634);var c=e.i(43476),m=e.i(90063);function u(e){return`${100*d(e)}%`}e.s(["WaitAxis",0,function({className:e}){return(0,c.jsx)("div",{"aria-hidden":!0,className:(0,m.classNames)("relative h-4 w-full text-micro text-muted-foreground",e),children:i.map((e,t)=>(0,c.jsx)("span",{className:(0,m.classNames)("absolute whitespace-nowrap",0===t?"":t===i.length-1?"-translate-x-full":"-translate-x-1/2"),style:{left:u(e.minutes)},children:e.label},e.minutes))})},"WaitStrip",0,function({waits:e,label:t,className:s}){let a=Math.max(0,...e);return(0,c.jsxs)("div",{role:"img","aria-label":t,"data-testid":"health-wait-strip",className:(0,m.classNames)("relative h-4 w-full",s),children:[(0,c.jsx)("span",{"aria-hidden":!0,className:"absolute inset-y-0 rounded-xs bg-muted",style:{left:u(10),right:`calc(100% - ${u(60)})`}}),(0,c.jsx)("span",{"aria-hidden":!0,className:"absolute inset-x-0 top-1/2 h-px bg-border"}),i.map(e=>(0,c.jsx)("span",{"aria-hidden":!0,className:"absolute top-1/4 h-1/2 w-px bg-border",style:{left:u(e.minutes)}},e.minutes)),(0,c.jsx)("span",{"aria-hidden":!0,className:"absolute top-1/2 h-0.5 -translate-y-1/2 rounded-full bg-foreground opacity-35",style:{left:0,width:u(a)}}),e.map((e,t)=>(0,c.jsx)("span",{"aria-hidden":!0,className:"absolute top-1/2 size-2.5 -translate-1/2 rounded-full border-2 border-card bg-foreground",style:{left:u(e)}},`${e}-${String(t)}`))]})}],38614)},23612,e=>{"use strict";var t=e.i(43476),s=e.i(90063),a=e.i(14695);let n={running:"bg-tone-ok-fg",crewing:"bg-tone-active-fg",releasing:"bg-tone-active-fg",restarting:"bg-tone-waiting-fg",crashed:"bg-tone-attention-fg"};e.s(["CapacityBar",0,function({spots:e,caps:i,unknownText:r="Unknown",testId:l}){let d=(0,a.capacityLine)(e,i);if(void 0===i||void 0===d)return(0,t.jsx)("span",{"data-testid":l,className:"text-meta text-muted-foreground",children:r});let o=Math.max(0,i.ships-e.length);return(0,t.jsxs)("span",{role:"img","aria-label":d,"data-testid":l,className:"inline-flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1",children:[(0,t.jsxs)("span",{"aria-hidden":!0,className:"inline-flex shrink-0 gap-0.5",children:[e.map((e,a)=>(0,t.jsx)("span",{title:`Spot ${String(a+1)}: ${e.name}, ${e.status}`,className:(0,s.classNames)("h-2 w-3 rounded-xs",n[e.status])},e.shipId)),Array.from({length:o},(s,a)=>(0,t.jsx)("span",{title:`Spot ${String(e.length+a+1)}: vacant`,className:"h-2 w-3 rounded-xs border border-input"},`free-${String(a)}`))]}),(0,t.jsx)("span",{className:"text-meta tabular-nums",children:d})]})}])},49050,e=>{"use strict";var t=e.i(43476),s=e.i(71567),a=e.i(52886),n=e.i(69644),i=e.i(69846),r=e.i(86875),l=e.i(66787),d=e.i(22016),o=e.i(66616),c=e.i(14695),m=e.i(49635),u=e.i(66390),h=e.i(23612),x=e.i(63481);let p={alive:"border-tone-ok-border bg-tone-ok-bg text-tone-ok-fg",silent:"border-tone-attention-border bg-tone-attention-bg text-tone-attention-fg","not-started":"border-tone-waiting-border bg-tone-waiting-bg text-tone-waiting-fg"},g={alive:"Alive",silent:"Not answering","not-started":"Not started"};function f({machine:e,now:s}){let n=(0,c.machineLiveness)(e),i=null===e.lastSeenAt?null:new Date(e.lastSeenAt);return(0,t.jsxs)("span",{className:"inline-flex flex-wrap items-center gap-x-2 gap-y-1 text-meta","data-testid":"machine-liveness","data-liveness":n,children:[(0,t.jsxs)(u.Badge,{variant:"outline",className:p[n],children:["alive"===n?(0,t.jsx)(r.ShipWheel,{"aria-hidden":!0}):(0,t.jsx)(a.CircleDashed,{"aria-hidden":!0}),g[n]]}),null===i?(0,t.jsx)("span",{className:"text-muted-foreground",children:"· run its setup line on the machine"}):(0,t.jsxs)("time",{dateTime:e.lastSeenAt??void 0,title:(0,m.fullDateTime)(i),className:"text-muted-foreground tabular-nums",children:["· ","silent"===n?`since ${(0,m.clockTime)(i)}`:(0,m.lastSeen)(i,s).replace("Last seen","seen")]})]})}function b(e,t){let s=(0,m.relativeTime)(e,t);return"Just now"===s?"just now":s}function j({title:e,children:s,className:a}){return(0,t.jsxs)("div",{className:`flex min-w-0 flex-col gap-2 px-4.5 py-4 ${a??""}`,children:[(0,t.jsx)("span",{className:"text-caption font-medium text-muted-foreground",children:e}),s]})}function v({harness:e,now:a}){let n=(0,o.harnessDetection)(e,a);return(0,t.jsxs)("div",{className:"flex flex-col gap-1.5 border-t border-border py-2.5 first-of-type:border-t-0 first-of-type:pt-0",children:[(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-body font-medium [&_svg]:size-(--size-icon-sm) [&_svg]:text-muted-foreground",children:[(0,t.jsx)(s.Bot,{"aria-hidden":!0}),(0,o.harnessWord)(e.harness),void 0===n?null:(0,t.jsx)("span",{className:"font-normal text-meta text-muted-foreground",children:n})]}),(0,c.harnessOptions)(e.options).map(e=>(0,t.jsxs)("span",{className:"flex flex-wrap items-center gap-x-2.5 gap-y-1 text-meta",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:e.name}),e.values.map(s=>(0,t.jsxs)("span",{className:"font-mono text-id whitespace-nowrap",children:[s,s===e.defaultValue?(0,t.jsx)("span",{className:"font-sans text-muted-foreground",children:" (default)"}):null]},s))]},e.name)),0===e.flags.length?null:(0,t.jsx)("span",{className:"flex flex-wrap items-center gap-1.5",children:e.flags.map(s=>e.riskyFlags?.includes(s)===!0?(0,t.jsxs)("code",{"data-testid":"machine-risky-flag",title:"Risky: every launch runs without its harness's safeguards",className:"inline-flex items-center gap-1 rounded-sm border border-tone-waiting-border bg-tone-waiting-bg px-1.5 font-mono text-id text-tone-waiting-fg [&_svg]:size-(--size-icon-sm)",children:[(0,t.jsx)(l.TriangleAlert,{"aria-hidden":!0}),s,(0,t.jsx)("span",{className:"sr-only",children:" (risky)"})]},s):(0,t.jsx)("code",{className:"rounded-sm bg-muted px-1.5 font-mono text-id",children:s},s))})]})}function N({title:e,icon:s,names:a}){return(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-caption text-muted-foreground",children:e}),0===a.length?(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"None"}):a.map(e=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-meta [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0 [&_svg]:text-muted-foreground",children:[s,e]},e))]})}function w({workspaces:e}){return(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsx)(N,{title:"Repositories · a new worktree per ship",icon:(0,t.jsx)(i.GitBranch,{"aria-hidden":!0}),names:e.repositories}),(0,t.jsx)(N,{title:"Folders · used as they are",icon:(0,t.jsx)(n.FolderOpen,{"aria-hidden":!0}),names:e.folders})]})}e.s(["HarnessOffer",0,v,"MachineCard",0,function({machine:e,spots:s,location:a,now:n}){let{details:i,report:l}=e,o=null===l?null:new Date(l.reportedAt);return(0,t.jsxs)("section",{"aria-label":e.name,"data-testid":"machine-card",className:"grid grid-cols-[minmax(0,18.75rem)_minmax(0,1.25fr)_minmax(0,1fr)] divide-x divide-border rounded-lg border border-border bg-card shadow-sm max-lg:grid-cols-1 max-lg:divide-x-0 max-lg:divide-y",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-2.5 px-4.5 py-4",children:[(0,t.jsxs)(d.default,{href:`/trierarchs/${e.shipId}`,"data-testid":"machine-card-name",className:"inline-flex items-center gap-2 text-section font-semibold hover:underline [&_svg]:size-(--size-icon) [&_svg]:text-muted-foreground",children:[(0,t.jsx)(r.ShipWheel,{"aria-hidden":!0}),e.name]}),(0,t.jsx)(f,{machine:e,now:n}),(0,t.jsxs)("span",{className:"flex flex-wrap items-center gap-1.5 text-meta text-muted-foreground",children:[(0,t.jsx)(x.LocationTag,{kind:a?.kind??null,description:a?.description}),null===i?null:(0,t.jsxs)("span",{className:"font-mono text-id",children:["· trierarch ",i.version]})]}),(0,t.jsx)("div",{role:"separator",className:"h-px bg-border"}),(0,t.jsx)("span",{className:"text-caption font-medium text-muted-foreground",children:"Capacity"}),(0,t.jsx)(h.CapacityBar,{spots:s,caps:i?.caps,testId:"machine-card-capacity",unknownText:null===o?"Unknown until it answers":`Unknown since ${(0,m.clockTime)(o)}`}),null===o?null:(0,t.jsxs)("time",{dateTime:l?.reportedAt,title:(0,m.fullDateTime)(o),className:"text-meta text-muted-foreground",children:["Last answer ",b(o,n)]})]}),(0,t.jsx)(j,{title:"Harnesses, options and flags",children:null===i?(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"Unknown until it answers"}):i.harnesses.map(e=>(0,t.jsx)(v,{harness:e,now:n},e.harness))}),(0,t.jsx)(j,{title:"Workspaces",children:null===i?(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"Unknown until it answers"}):(0,t.jsx)(w,{workspaces:i.workspaces})})]})},"MachineLiveness",0,f,"WorkspaceOffer",0,w,"lastAnswer",0,b])},66616,e=>{"use strict";var t=e.i(49635);let s={"claude-code":{word:"Claude Code",kind:"coding"},codex:{word:"Codex",kind:"coding"},"claude-chat":{word:"Claude chat",kind:"chat"},chatgpt:{word:"ChatGPT",kind:"chat"},grok:{word:"Grok",kind:"chat"},grokbot:{word:"Grokbot",kind:"bot"},console:{word:"Console",kind:"console"}};function a(e){return s[e]?.word??e}e.s(["crewLineHarnessWord",0,function(e){return"chat"===e?"Chat":a(e)},"harnessDetection",0,function(e,s){if(void 0===e.version)return;if(void 0===e.modelsConfirmedAt||null===e.modelsConfirmedAt)return`${e.version} \xb7 no model confirmed`;let a=(0,t.relativeTime)(new Date(e.modelsConfirmedAt),s);return`${e.version} \xb7 models confirmed ${"Just now"===a?"just now":a}`},"harnessKind",0,function(e){return s[e]?.kind},"harnessWord",0,a])},18423,e=>{"use strict";var t=e.i(12598),s=e.i(5861),a=e.i(71645),n=e.i(86413),i=e.i(27702);let r=new Set(["FleetInitialised","ShipCommissioned","ShipClaimed","LeaseRevoked","CredentialRevoked","StartingPromptIssued","ShipRetired","DeliveryAcknowledged","DeliveryUndeliverable","ShipReported","CrewRequested","CrewRequestRemoved","CrewAssigned","CrewStatusChanged","CrewRequestExplained","CrewRequestGivenBack","LabelAssigned","LabelUnassigned","LabelRetired"]);async function l(e,t){await e.cancelQueries({queryKey:t,predicate:e=>void 0===e.state.data&&"fetching"===e.state.fetchStatus}),await e.invalidateQueries({queryKey:t})}let d=new Set(["LabelDefined","LabelValuesChanged","LabelRetired","LabelAssigned","LabelUnassigned","LabelDeleted"]),o=new Set(["DeliveryUndeliverable","DeliveryNotHandled","DeliveryDismissed"]);e.s(["useLiveFleet",0,function(){let e=(0,i.useTRPC)(),c=(0,t.useQueryClient)(),[m,u]=(0,a.useState)(new Set),h=e=>{l(c,e)},x=(0,s.useSubscription)(e.fleet.events.subscriptionOptions({lastEventId:null},{onData:({data:t})=>{var s,a,i,l;if("resync"===t.kind){h(e.fleet.pathKey()),h(n.INBOX_KEY);return}let{event:c}=t;for(let t of new Set([c.shipId,c.actorShipId]))null!==t&&(h(e.fleet.ship.queryKey({shipId:t})),h(e.fleet.shipTimeline.queryKey({shipId:t})),h(e.fleet.shipWay.queryKey({shipId:t})));if(null!==c.messageId&&(h(e.fleet.shipMessages.pathKey()),h(e.fleet.shipWay.pathKey()),h(e.fleet.message.queryKey({messageId:c.messageId})),h(e.fleet.inbox.pathKey()),h(n.INBOX_KEY),h(e.fleet.health.queryKey())),s=c.type,o.has(s)&&h(e.fleet.needsAttention.queryKey()),a=c.type,d.has(a)&&h(e.fleet.labels.queryKey()),"NetworkRulesDeclared"===c.type&&h(e.fleet.declaredNetworkRules.queryKey()),("BuiltInRuleChanged"===(i=c.type)||"NetworkPluginUnregistered"===i)&&h(e.fleet.builtInRules.queryKey()),l=c.type,!r.has(l))return;h(e.fleet.list.queryKey()),h(e.fleet.health.queryKey());let{shipId:m}=c;"ShipCommissioned"===c.type&&null!==m&&u(e=>new Set([...e,m]))}}));return{live:function(e){switch(e){case"pending":return"live";case"connecting":return"reconnecting";case"idle":case"error":return"offline"}}(x.status),newShipIds:m,error:x.error}}])},40798,e=>{"use strict";let t={DEVICE:"Device",CLOUD:"Cloud",SERVER:"Server",OTHER:"Other"};e.s(["locationKindWord",0,function(e){return t[e]}])},93361,e=>{"use strict";var t=e.i(49635);let s={working:"Working",blocked:"Blocked",idle:"Idle"};e.s(["REPORT_STATE_WORDS",0,s,"REPORT_TONES",0,{working:"active",blocked:"waiting",idle:"ended"},"reportAge",0,function(e,s){let a=Math.max(0,s.getTime()-e.getTime());return a<6e4?`${String(Math.floor(a/1e3))} s`:a<36e5?`${String(Math.floor(a/6e4))} min`:a<864e5?`${String(Math.floor(a/36e5))} h`:(0,t.relativeTime)(e,s)},"reportDetailsJson",0,function(e){return JSON.stringify(e,null,2)},"reportDetailsLabel",0,function(e){return`JSON \xb7 ${String(e)} bytes`},"reportText",0,function(e){let t=s[e.state];return null===e.note?t:`${t}: ${e.note}`},"reportedWhen",0,function(e,s){let a=(0,t.relativeTime)(e,s);return`reported ${"Just now"===a?"just now":a}`}])}]);