@aeolus-fleet/console 0.19.0 → 0.20.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 (252) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +6 -0
  3. package/.next/build-manifest.json +3 -3
  4. package/.next/fallback-build-manifest.json +3 -3
  5. package/.next/prerender-manifest.json +3 -3
  6. package/.next/routes-manifest.json +40 -0
  7. package/.next/server/app/_global-error/page.js.nft.json +1 -1
  8. package/.next/server/app/_global-error.html +1 -1
  9. package/.next/server/app/_global-error.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  12. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  13. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  14. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  15. package/.next/server/app/api/squadrons/[procedure]/route.js +1 -1
  16. package/.next/server/app/api/squadrons/[procedure]/route.js.nft.json +1 -1
  17. package/.next/server/app/api/trierarch-plugin/[procedure]/route/app-paths-manifest.json +3 -0
  18. package/.next/server/app/api/trierarch-plugin/[procedure]/route/build-manifest.json +12 -0
  19. package/.next/server/app/api/trierarch-plugin/[procedure]/route/server-reference-manifest.json +4 -0
  20. package/.next/server/app/api/trierarch-plugin/[procedure]/route.js +6 -0
  21. package/.next/server/app/api/trierarch-plugin/[procedure]/route.js.nft.json +1 -0
  22. package/.next/server/app/api/trierarch-plugin/[procedure]/route_client-reference-manifest.js +3 -0
  23. package/.next/server/app/health/route.js +1 -1
  24. package/.next/server/app/health/route.js.nft.json +1 -1
  25. package/.next/server/app/inbox/page.js.nft.json +1 -1
  26. package/.next/server/app/inbox/page_client-reference-manifest.js +1 -1
  27. package/.next/server/app/labels/page/app-paths-manifest.json +3 -0
  28. package/.next/server/app/labels/page/build-manifest.json +20 -0
  29. package/.next/server/app/labels/page/next-font-manifest.json +11 -0
  30. package/.next/server/app/labels/page/react-loadable-manifest.json +1 -0
  31. package/.next/server/app/labels/page/server-reference-manifest.json +4 -0
  32. package/.next/server/app/labels/page.js +14 -0
  33. package/.next/server/app/labels/page.js.nft.json +1 -0
  34. package/.next/server/app/labels/page_client-reference-manifest.js +3 -0
  35. package/.next/server/app/needs-attention/page.js.nft.json +1 -1
  36. package/.next/server/app/needs-attention/page_client-reference-manifest.js +1 -1
  37. package/.next/server/app/needs-crew/page/app-paths-manifest.json +3 -0
  38. package/.next/server/app/needs-crew/page/build-manifest.json +20 -0
  39. package/.next/server/app/needs-crew/page/next-font-manifest.json +11 -0
  40. package/.next/server/app/needs-crew/page/react-loadable-manifest.json +1 -0
  41. package/.next/server/app/needs-crew/page/server-reference-manifest.json +4 -0
  42. package/.next/server/app/needs-crew/page.js +14 -0
  43. package/.next/server/app/needs-crew/page.js.nft.json +1 -0
  44. package/.next/server/app/needs-crew/page_client-reference-manifest.js +3 -0
  45. package/.next/server/app/page.js.nft.json +1 -1
  46. package/.next/server/app/page_client-reference-manifest.js +1 -1
  47. package/.next/server/app/settings/page.js.nft.json +1 -1
  48. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  49. package/.next/server/app/ships/[shipId]/page.js.nft.json +1 -1
  50. package/.next/server/app/ships/[shipId]/page_client-reference-manifest.js +1 -1
  51. package/.next/server/app/sign-in/failed/page.js.nft.json +1 -1
  52. package/.next/server/app/sign-in/failed/page_client-reference-manifest.js +1 -1
  53. package/.next/server/app/sign-in/page.js.nft.json +1 -1
  54. package/.next/server/app/sign-in/page_client-reference-manifest.js +1 -1
  55. package/.next/server/app/squadrons/[squadronId]/page.js.nft.json +1 -1
  56. package/.next/server/app/squadrons/[squadronId]/page_client-reference-manifest.js +1 -1
  57. package/.next/server/app/squadrons/blueprints/[name]/page.js.nft.json +1 -1
  58. package/.next/server/app/squadrons/blueprints/[name]/page_client-reference-manifest.js +1 -1
  59. package/.next/server/app/squadrons/connection/route.js +3 -3
  60. package/.next/server/app/squadrons/connection/route.js.nft.json +1 -1
  61. package/.next/server/app/squadrons/page.js.nft.json +1 -1
  62. package/.next/server/app/squadrons/page_client-reference-manifest.js +1 -1
  63. package/.next/server/app/squadrons/templates/[name]/page.js.nft.json +1 -1
  64. package/.next/server/app/squadrons/templates/[name]/page_client-reference-manifest.js +1 -1
  65. package/.next/server/app/trierarch-plugin/connection/route/app-paths-manifest.json +3 -0
  66. package/.next/server/app/trierarch-plugin/connection/route/build-manifest.json +12 -0
  67. package/.next/server/app/trierarch-plugin/connection/route/server-reference-manifest.json +4 -0
  68. package/.next/server/app/trierarch-plugin/connection/route.js +8 -0
  69. package/.next/server/app/trierarch-plugin/connection/route.js.nft.json +1 -0
  70. package/.next/server/app/trierarch-plugin/connection/route_client-reference-manifest.js +3 -0
  71. package/.next/server/app/trierarchs/[shipId]/page/app-paths-manifest.json +3 -0
  72. package/.next/server/app/trierarchs/[shipId]/page/build-manifest.json +20 -0
  73. package/.next/server/app/trierarchs/[shipId]/page/next-font-manifest.json +11 -0
  74. package/.next/server/app/trierarchs/[shipId]/page/react-loadable-manifest.json +1 -0
  75. package/.next/server/app/trierarchs/[shipId]/page/server-reference-manifest.json +4 -0
  76. package/.next/server/app/trierarchs/[shipId]/page.js +14 -0
  77. package/.next/server/app/trierarchs/[shipId]/page.js.nft.json +1 -0
  78. package/.next/server/app/trierarchs/[shipId]/page_client-reference-manifest.js +3 -0
  79. package/.next/server/app/trierarchs/page/app-paths-manifest.json +3 -0
  80. package/.next/server/app/trierarchs/page/build-manifest.json +20 -0
  81. package/.next/server/app/trierarchs/page/next-font-manifest.json +11 -0
  82. package/.next/server/app/trierarchs/page/react-loadable-manifest.json +1 -0
  83. package/.next/server/app/trierarchs/page/server-reference-manifest.json +4 -0
  84. package/.next/server/app/trierarchs/page.js +14 -0
  85. package/.next/server/app/trierarchs/page.js.nft.json +1 -0
  86. package/.next/server/app/trierarchs/page_client-reference-manifest.js +3 -0
  87. package/.next/server/app/version/route.js +3 -2
  88. package/.next/server/app/version/route.js.nft.json +1 -1
  89. package/.next/server/app-paths-manifest.json +6 -0
  90. package/.next/server/chunks/04lx_next-internal_server_app_api_trierarch-plugin_[procedure]_route_actions_0pov8t_.js +3 -0
  91. package/.next/server/chunks/1eui__next-internal_server_app_trierarch-plugin_connection_route_actions_1jgdi18.js +3 -0
  92. package/.next/server/chunks/{[root-of-the-server]__0w2mqex._.js → [root-of-the-server]__14rtv1n._.js} +2 -2
  93. package/.next/server/chunks/[root-of-the-server]__1c6takz._.js +3 -0
  94. package/.next/server/chunks/[root-of-the-server]__1f7engf._.js +3 -0
  95. package/.next/server/chunks/[root-of-the-server]__1f_8ohl._.js +3 -0
  96. package/.next/server/chunks/[root-of-the-server]__1h3r48l._.js +3 -0
  97. package/.next/server/chunks/[root-of-the-server]__1kc3njk._.js +3 -0
  98. package/.next/server/chunks/_0h366h9._.js +3 -0
  99. package/.next/server/chunks/packages_console_lib_connect-plugin_ts_197hf-1._.js +3 -0
  100. package/.next/server/chunks/ssr/0ysl_console__next-internal_server_app_trierarchs_[shipId]_page_actions_0e_rw4u.js +3 -0
  101. package/.next/server/chunks/ssr/[root-of-the-server]__0qbhnxj._.js +3 -0
  102. package/.next/server/chunks/ssr/[root-of-the-server]__18derwo._.js +3 -0
  103. package/.next/server/chunks/ssr/[root-of-the-server]__18g_7b-._.js +3 -0
  104. package/.next/server/chunks/ssr/[root-of-the-server]__1m1u7bl._.js +3 -0
  105. package/.next/server/chunks/ssr/[root-of-the-server]__1uan58j._.js +3 -3
  106. package/.next/server/chunks/ssr/_01f7zv3._.js +3 -0
  107. package/.next/server/chunks/ssr/_06c6zlg._.js +3 -0
  108. package/.next/server/chunks/ssr/_08f4mzr._.js +3 -0
  109. package/.next/server/chunks/ssr/_0bmd2ey._.js +3 -0
  110. package/.next/server/chunks/ssr/{_0plfddz._.js → _0dogq79._.js} +2 -2
  111. package/.next/server/chunks/ssr/_0exrpxl._.js +3 -0
  112. package/.next/server/chunks/ssr/_0gt230s._.js +3 -0
  113. package/.next/server/chunks/ssr/_0i0_i88._.js +3 -0
  114. package/.next/server/chunks/ssr/_0mob-i2._.js +3 -0
  115. package/.next/server/chunks/ssr/_0n4kirm._.js +3 -0
  116. package/.next/server/chunks/ssr/_0rvujxo._.js +3 -0
  117. package/.next/server/chunks/ssr/{_00yiulp._.js → _0s2b6hb._.js} +2 -2
  118. package/.next/server/chunks/ssr/{_050suap._.js → _0sko-kt._.js} +2 -2
  119. package/.next/server/chunks/ssr/_0snpwr0._.js +3 -0
  120. package/.next/server/chunks/ssr/_0t1jjxf._.js +1 -1
  121. package/.next/server/chunks/ssr/_0udw2gs._.js +3 -0
  122. package/.next/server/chunks/ssr/{_0-rsrfr._.js → _0wtj0e-._.js} +2 -2
  123. package/.next/server/chunks/ssr/_0xi2v5k._.js +3 -0
  124. package/.next/server/chunks/ssr/{_0igx2qf._.js → _0xvm1ng._.js} +2 -2
  125. package/.next/server/chunks/ssr/_0ziovn_._.js +3 -0
  126. package/.next/server/chunks/ssr/_1442xyx._.js +3 -0
  127. package/.next/server/chunks/ssr/_16jiag3._.js +3 -0
  128. package/.next/server/chunks/ssr/_181kpys._.js +3 -0
  129. package/.next/server/chunks/ssr/_19e0e-9._.js +3 -3
  130. package/.next/server/chunks/ssr/_1bqclkf._.js +3 -0
  131. package/.next/server/chunks/ssr/_1cn9_0f._.js +3 -0
  132. package/.next/server/chunks/ssr/_1d6cgif._.js +3 -0
  133. package/.next/server/chunks/ssr/_1g2wuzd._.js +1 -1
  134. package/.next/server/chunks/ssr/_1hcta3c._.js +3 -0
  135. package/.next/server/chunks/ssr/_1kv8ma5._.js +3 -0
  136. package/.next/server/chunks/ssr/{_1s07u90._.js → _1lu1eda._.js} +2 -2
  137. package/.next/server/chunks/ssr/_1ntb2un._.js +3 -0
  138. package/.next/server/chunks/ssr/_1ommvbv._.js +3 -0
  139. package/.next/server/chunks/ssr/_1oofkty._.js +3 -0
  140. package/.next/server/chunks/ssr/_1oqoc4e._.js +3 -0
  141. package/.next/server/chunks/ssr/_1r6ce_7._.js +3 -0
  142. package/.next/server/chunks/ssr/_1tsejml._.js +3 -0
  143. package/.next/server/chunks/ssr/{_1s8-j5t._.js → _1ub6rp3._.js} +2 -2
  144. package/.next/server/chunks/ssr/_20pku2-._.js +3 -0
  145. package/.next/server/chunks/ssr/packages_console_023iioa._.js +3 -0
  146. package/.next/server/chunks/ssr/packages_console_03isfmy._.js +3 -0
  147. package/.next/server/chunks/ssr/packages_console_0lv43wr._.js +3 -0
  148. package/.next/server/chunks/ssr/packages_console_10fqil_._.js +1 -1
  149. package/.next/server/chunks/ssr/packages_console__next-internal_server_app_labels_page_actions_0-7_20w.js +3 -0
  150. package/.next/server/chunks/ssr/packages_console__next-internal_server_app_needs-crew_page_actions_0rw7fgn.js +3 -0
  151. package/.next/server/chunks/ssr/packages_console__next-internal_server_app_trierarchs_page_actions_1zds6hw.js +3 -0
  152. package/.next/server/chunks/ssr/packages_console_app_inbox_page_tsx_1bpmlpx._.js +1 -1
  153. package/.next/server/chunks/ssr/packages_console_app_labels_page_tsx_0xxovjk._.js +3 -0
  154. package/.next/server/chunks/ssr/packages_console_app_needs-attention_page_tsx_1agfico._.js +1 -1
  155. package/.next/server/chunks/ssr/packages_console_app_page_tsx_16ln4px._.js +1 -1
  156. package/.next/server/chunks/ssr/packages_console_app_providers_tsx_06ai92n._.js +1 -1
  157. package/.next/server/chunks/ssr/packages_console_app_settings_page_tsx_1zqt7sk._.js +1 -1
  158. package/.next/server/chunks/ssr/packages_console_app_ships_[shipId]_page_tsx_0fudjay._.js +1 -1
  159. package/.next/server/chunks/ssr/packages_console_app_squadrons_[squadronId]_page_tsx_1umxs1g._.js +1 -1
  160. package/.next/server/chunks/ssr/packages_console_app_squadrons_page_tsx_1w6ym6z._.js +1 -1
  161. package/.next/server/chunks/ssr/packages_console_app_trierarchs_[shipId]_page_tsx_1rqyoj3._.js +3 -0
  162. package/.next/server/chunks/ssr/{packages_console_components_1_4zc74._.js → packages_console_components_1-5gwzg._.js} +2 -2
  163. package/.next/server/chunks/ssr/packages_console_components_atoms_select_tsx_1v_3j3i._.js +1 -1
  164. package/.next/server/chunks/ssr/packages_console_lib_crew-settings-form_ts_1_mrtph._.js +3 -0
  165. package/.next/server/middleware-build-manifest.js +3 -3
  166. package/.next/server/next-font-manifest.js +1 -1
  167. package/.next/server/next-font-manifest.json +16 -0
  168. package/.next/server/pages/500.html +1 -1
  169. package/.next/server/server-reference-manifest.js +1 -1
  170. package/.next/server/server-reference-manifest.json +1 -1
  171. package/.next/static/chunks/00pjrzynt0in-.js +1 -0
  172. package/.next/static/chunks/038sk3qwghvto.js +1 -0
  173. package/.next/static/chunks/{1cbzjk-qf984o.js → 0e6zs-5ou_ra4.js} +1 -1
  174. package/.next/static/chunks/0ez9e35zkfaz5.js +1 -0
  175. package/.next/static/chunks/0f5-vxw1bk8ym.js +1 -0
  176. package/.next/static/chunks/0vlyibw4rexm7.js +1 -0
  177. package/.next/static/chunks/{2ff-56ohrio7h.js → 0z1nza3zgavbi.js} +1 -1
  178. package/.next/static/chunks/16o3i61aw3cj2.js +1 -0
  179. package/.next/static/chunks/177iv_tzmr_0a.js +1 -0
  180. package/.next/static/chunks/17quvh6filhxh.js +1 -0
  181. package/.next/static/chunks/19x_u3cmb9s_j.js +1 -0
  182. package/.next/static/chunks/1auwxv_urmljv.js +1 -0
  183. package/.next/static/chunks/1mbia-jrmgpuu.js +1 -0
  184. package/.next/static/chunks/1zuzmwfsw_7q0.js +1 -0
  185. package/.next/static/chunks/{2z2hhi291ems4.js → 21jwgqx67q8ql.js} +12 -12
  186. package/.next/static/chunks/26dg2z_6kosr0.js +1 -0
  187. package/.next/static/chunks/2_txjvbug4b86.js +1 -0
  188. package/.next/static/chunks/2c1daktq2hun-.css +3 -0
  189. package/.next/static/chunks/{04p19br-6pr3q.js → 2k5tcu7bvrhet.js} +1 -1
  190. package/.next/static/chunks/2ne-qdcv-7ck1.js +1 -0
  191. package/.next/static/chunks/2r01e5tqyyrsv.js +1 -0
  192. package/.next/static/chunks/{0hl9b82m3b_kf.js → 2zu1o4z0tmf0-.js} +1 -1
  193. package/.next/static/chunks/{22wd2oyjf0iq_.js → 30ux5-xn650iq.js} +1 -1
  194. package/.next/static/chunks/32oc7qg77tpjj.js +1 -0
  195. package/.next/static/chunks/36_a72wj7_f-y.js +1 -0
  196. package/.next/static/chunks/39-cyg4qvxgbm.js +1 -0
  197. package/.next/static/chunks/3b5uomyz3knol.js +1 -0
  198. package/.next/static/chunks/3e1veij7vs6ao.js +1 -0
  199. package/.next/static/chunks/3eaxbdj-y982h.js +1 -0
  200. package/.next/static/chunks/{0nchi43nyih52.js → 3evbxrltn9tcu.js} +1 -1
  201. package/.next/static/chunks/3jsj5ozfio3me.js +1 -0
  202. package/.next/static/chunks/3pkfx52bufv4g.js +1 -0
  203. package/.next/static/chunks/{2quoh5csh67oz.js → 3t2amxc2hojri.js} +1 -1
  204. package/.next/static/chunks/3x_52f9if0z-8.js +1 -0
  205. package/.next/static/chunks/42y_hgylfwlq5.js +1 -0
  206. package/README.md +1 -0
  207. package/package.json +3 -3
  208. package/.next/server/chunks/[root-of-the-server]__0eg7gro._.js +0 -3
  209. package/.next/server/chunks/[root-of-the-server]__11ajlfh._.js +0 -3
  210. package/.next/server/chunks/[root-of-the-server]__1w1vtvn._.js +0 -3
  211. package/.next/server/chunks/_1mul6_v._.js +0 -3
  212. package/.next/server/chunks/ssr/_01eh2h5._.js +0 -3
  213. package/.next/server/chunks/ssr/_05wjy-d._.js +0 -3
  214. package/.next/server/chunks/ssr/_09pq8b7._.js +0 -3
  215. package/.next/server/chunks/ssr/_0_6abve._.js +0 -3
  216. package/.next/server/chunks/ssr/_0aqa8e3._.js +0 -3
  217. package/.next/server/chunks/ssr/_0c1ebla._.js +0 -3
  218. package/.next/server/chunks/ssr/_0g98qoq._.js +0 -3
  219. package/.next/server/chunks/ssr/_0k0kffc._.js +0 -3
  220. package/.next/server/chunks/ssr/_0ksc8ky._.js +0 -3
  221. package/.next/server/chunks/ssr/_0nxk8e5._.js +0 -3
  222. package/.next/server/chunks/ssr/_0sh180u._.js +0 -3
  223. package/.next/server/chunks/ssr/_0vz-_zq._.js +0 -3
  224. package/.next/server/chunks/ssr/_0y_ez3b._.js +0 -3
  225. package/.next/server/chunks/ssr/_0zz00ec._.js +0 -3
  226. package/.next/server/chunks/ssr/_101_mtq._.js +0 -3
  227. package/.next/server/chunks/ssr/_10vocmg._.js +0 -3
  228. package/.next/server/chunks/ssr/_16klr-g._.js +0 -3
  229. package/.next/server/chunks/ssr/_1_hm4gt._.js +0 -3
  230. package/.next/server/chunks/ssr/_1c2ijn5._.js +0 -3
  231. package/.next/server/chunks/ssr/_1jgnfkf._.js +0 -3
  232. package/.next/server/chunks/ssr/_1m_b36m._.js +0 -3
  233. package/.next/server/chunks/ssr/_1pif908._.js +0 -3
  234. package/.next/server/chunks/ssr/_20fp5al._.js +0 -3
  235. package/.next/static/chunks/05xsztb02v-3h.js +0 -1
  236. package/.next/static/chunks/0atm4wesk-4u8.js +0 -1
  237. package/.next/static/chunks/0es5vdu6lt-lm.css +0 -3
  238. package/.next/static/chunks/0jkliy--t1bbh.js +0 -1
  239. package/.next/static/chunks/0oh4dxohbk7m8.js +0 -1
  240. package/.next/static/chunks/0w8wux_7extu3.js +0 -1
  241. package/.next/static/chunks/0xdkx7wg739q7.js +0 -1
  242. package/.next/static/chunks/1q-shkfypoia-.js +0 -1
  243. package/.next/static/chunks/1t5mkoni0wrc0.js +0 -1
  244. package/.next/static/chunks/21py3ha_f_e3-.js +0 -1
  245. package/.next/static/chunks/2t6jzvnrf9ejw.js +0 -1
  246. package/.next/static/chunks/32-17dotvltga.js +0 -1
  247. package/.next/static/chunks/3m4-wgj579r4x.js +0 -1
  248. package/.next/static/chunks/3tsjbqptivphr.js +0 -1
  249. package/.next/static/chunks/42-u_9nvmdste.js +0 -1
  250. /package/.next/static/{4BHf_wBvFUce1tC4Uw_GD → LHmQaS8aizP80vXh3K-ws}/_buildManifest.js +0 -0
  251. /package/.next/static/{4BHf_wBvFUce1tC4Uw_GD → LHmQaS8aizP80vXh3K-ws}/_clientMiddlewareManifest.js +0 -0
  252. /package/.next/static/{4BHf_wBvFUce1tC4Uw_GD → LHmQaS8aizP80vXh3K-ws}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,92150,e=>{"use strict";var t=e.i(56420);let s={name:"boxes",size:24,node:[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]};s.node;let i=(0,t.default)(s);e.s(["Boxes",0,i],92150)},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 i=(0,t.default)(s);e.s(["FolderOpen",0,i],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 a=(0,t.default)(n);e.s(["GitBranch",0,a],69846)},59659,e=>{"use strict";var t=e.i(56420);let s={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};s.node;let i=(0,t.default)(s);e.s(["Trash2",0,i],59659)},96773,e=>{"use strict";var t=e.i(43476),s=e.i(71645),i=e.i(44824),n=e.i(45608),a=e.i(95475),r=e.i(2767),l=e.i(15905),o=e.i(24010),d=e.i(94945),c=e.i(17981);function u({worktree:e,onOpenChange:s,isPending:i,error:n,onClear:a}){return(0,t.jsx)(o.AlertDialog,{open:void 0!==e,onOpenChange:e=>{i||s(e)},children:(0,t.jsxs)(o.AlertDialogContent,{"data-testid":"clear-worktree-dialog",className:d.dialogSurface.phoneSheet,children:[(0,t.jsxs)(o.AlertDialogHeader,{children:[(0,t.jsxs)(o.AlertDialogTitle,{children:["Delete the kept ",(0,t.jsx)("span",{className:"font-mono",children:e?.repository})," worktree of ",e?.shipName,"?"]}),(0,t.jsx)(o.AlertDialogDescription,{children:void 0===e?null:`${e.machineName} removes it on its next pass, with its uncommitted changes. They can't be recovered, and the request can't be withdrawn.`})]}),void 0===n?null:(0,t.jsx)(c.InlineError,{title:"Couldn’t delete the worktree",description:`Refused: ${n}. Nothing changed.`}),(0,t.jsxs)(o.AlertDialogFooter,{children:[(0,t.jsx)(o.AlertDialogClose,{render:(0,t.jsx)(l.Button,{disabled:i}),children:"Cancel"}),(0,t.jsx)(l.Button,{variant:"destructive",isLoading:i,"data-testid":"clear-worktree-confirm",onClick:a,children:"Delete worktree"})]})]})})}var h=e.i(22768),m=e.i(16984),p=e.i(56420);let x={name:"folder-x",size:24,node:[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"m9.5 10.5 5 5",key:"ra9qjz"}],["path",{d:"m14.5 10.5-5 5",key:"l2rkpq"}]]};x.node;let g=(0,p.default)(x);var f=e.i(11568),v=e.i(49287),b=e.i(86875),j=e.i(59659),w=e.i(22016),y=e.i(54616),k=e.i(66027),N=e.i(12598),C=e.i(27702),S=e.i(54492),T=e.i(49635),R=e.i(61966),O=e.i(19321),M=e.i(54422),D=e.i(67874),A=e.i(99261),I=e.i(63481),q=e.i(78865),E=e.i(94313);function z({spot:e,now:s}){let i="running"===e.status?e.startedAt:null,n=(0,S.restartWords)(e);return null===i&&void 0===n?null:(0,t.jsxs)("span",{className:"text-meta text-muted-foreground","data-testid":"machine-spot-session",children:[null===i?null:(0,t.jsxs)(t.Fragment,{children:["since"," ",(0,t.jsx)("time",{dateTime:i,title:(0,T.fullDateTime)(new Date(i)),className:"tabular-nums",children:(0,T.sinceTime)(new Date(i),s)})]}),null!==i&&void 0!==n?" · ":null,n]})}function B({label:e,children:s}){return(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-1 bg-card px-3.5 py-3",children:[(0,t.jsx)("dt",{className:"text-meta text-muted-foreground",children:e}),(0,t.jsx)("dd",{className:"flex min-w-0 items-center gap-1.5 text-body text-foreground",children:s})]})}function L({title:e,count:s,note:i,children:n}){return(0,t.jsxs)("section",{"aria-label":e,className:"flex flex-col gap-2.5",children:[(0,t.jsxs)("h2",{className:"flex items-baseline gap-2 text-section font-semibold",children:[e,void 0===s?null:(0,t.jsx)("span",{className:"text-meta font-normal text-muted-foreground tabular-nums",children:s}),void 0===i?null:(0,t.jsx)("span",{className:"text-meta font-normal text-muted-foreground",children:i})]}),n]})}function _({icon:e,name:s,meta:i,action:n}){return(0,t.jsxs)("li",{className:"flex items-start gap-2 px-3.5 py-2.5 [&_svg]:mt-0.5 [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0 [&_svg]:text-muted-foreground",children:[e,(0,t.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col",children:[(0,t.jsx)("span",{className:"truncate font-mono text-id",children:s}),(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:i})]}),n]})}function $({kept:e,shipName:s,isBeingCleared:i,onClear:n}){let a=i?(0,t.jsx)(H,{}):void 0===n?void 0:(0,t.jsx)(l.Button,{size:"xs",variant:"ghost",icon:(0,t.jsx)(j.Trash2,{"aria-hidden":!0}),"aria-label":`Delete the kept ${e.repository} worktree of ${s}`,"data-testid":"machine-worktree-delete",onClick:()=>{n({...e,shipName:s})},children:"Delete"});return(0,t.jsx)(_,{icon:(0,t.jsx)(g,{"aria-hidden":!0}),name:`${e.repository}/${s}`,meta:"Kept after release, with uncommitted changes",action:a})}function H(){return(0,t.jsxs)("span",{"data-testid":"machine-worktree-clearing",className:"inline-flex shrink-0 items-center gap-1 rounded-md border border-tone-waiting-border bg-tone-waiting-bg px-1.5 py-0.5 text-meta text-tone-waiting-fg [&_svg]:mt-0 [&_svg]:text-tone-waiting-fg",children:[(0,t.jsx)(f.LoaderCircle,{"aria-hidden":!0}),"Clearing"]})}function Q({machine:e,state:s,spots:i,location:n,labels:a,now:r,shipNames:o,clearRequests:d=[],onClearKept:c}){if("loading"===s||"ready"===s&&void 0===e)return(0,t.jsxs)("div",{"aria-busy":!0,"data-testid":"machine-detail",className:"flex flex-col gap-4",children:[(0,t.jsx)("span",{className:"sr-only",children:"Loading the machine"}),(0,t.jsx)(O.Skeleton,{className:"h-8 w-48"}),(0,t.jsx)(O.Skeleton,{className:"h-16 w-full rounded-lg"}),(0,t.jsx)(O.Skeleton,{className:"h-40 w-full rounded-lg"})]});if("not-found"===s||void 0===e)return(0,t.jsx)("div",{"data-testid":"machine-detail",children:(0,t.jsx)(D.EmptyState,{variant:"section",icon:(0,t.jsx)(h.CircleAlert,{}),title:"Machine not found",description:"The trierarch plugin lists no machine with this ship id. The link may be incomplete.",action:(0,t.jsx)(l.Button,{size:"sm",nativeButton:!1,render:(0,t.jsx)(w.default,{href:"/trierarchs"}),children:"Back to Trierarchs"})})});let{details:u,report:p}=e,x=null===p?null:new Date(p.reportedAt),f=e.isSilent&&null!==e.lastSeenAt,j=f&&null!==x?`As of ${(0,T.clockTime)(x)}`:void 0;return(0,t.jsxs)("div",{"data-testid":"machine-detail",className:"flex flex-col gap-5 max-sm:gap-3.5",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2.5",children:[(0,t.jsxs)("h1",{className:"inline-flex items-center gap-2 text-title font-semibold [&_svg]:size-(--size-icon-lg) [&_svg]:text-muted-foreground",children:[(0,t.jsx)(b.ShipWheel,{"aria-hidden":!0}),e.name]}),(0,t.jsx)(E.MachineLiveness,{machine:e,now:r})]}),(0,t.jsx)(l.Button,{size:"xs",icon:(0,t.jsx)(v.Ship,{"aria-hidden":!0}),nativeButton:!1,render:(0,t.jsx)(w.default,{href:`/ships/${e.shipId}`}),"data-testid":"machine-ship-page",children:"Ship page"})]}),(0,t.jsxs)("dl",{className:"grid grid-cols-5 gap-px overflow-hidden rounded-lg border border-border bg-border max-lg:grid-cols-2",children:[(0,t.jsx)(B,{label:"Capacity",children:(0,t.jsx)(M.CapacityBar,{spots:i,caps:u?.caps,unknownText:null===x?"Unknown until it answers":`Unknown since ${(0,T.clockTime)(x)}`})}),(0,t.jsx)(B,{label:"Machine",children:(0,t.jsx)(I.LocationTag,{kind:n?.kind??null,description:n?.description,size:"md"})}),(0,t.jsx)(B,{label:"Version",children:null===u?(0,t.jsx)("span",{className:"text-muted-foreground",children:"Unknown"}):(0,t.jsxs)("span",{className:"font-mono text-id",children:["@aeolus-fleet/trierarch@",u.version]})}),(0,t.jsx)(B,{label:"Last answer",children:null===x?(0,t.jsx)("span",{className:"text-muted-foreground",children:"None yet"}):(0,t.jsx)("time",{dateTime:p?.reportedAt,title:(0,T.fullDateTime)(x),className:"tabular-nums",children:(0,E.lastAnswer)(x,r)})}),(0,t.jsxs)(B,{label:"Ship id",children:[(0,t.jsx)("span",{className:"truncate font-mono text-id",children:e.shipId}),(0,t.jsx)(R.CopyButton,{value:e.shipId,label:"Copy ship id"})]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1.5","data-testid":"machine-labels-row",children:[(0,t.jsx)("span",{className:"text-caption font-medium text-muted-foreground",children:"Labels"}),void 0===a?(0,t.jsx)(O.Skeleton,{className:"h-5.5 w-40"}):(0,t.jsx)(A.ShipLabels,{chips:a}),(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"Read-only here. Crew requests that ask for machine labels go only to machines carrying all of them."})]}),f&&null!==e.lastSeenAt?(0,t.jsxs)("p",{role:"alert","data-testid":"machine-silent",className:"flex gap-2 rounded-lg border border-tone-attention-border bg-tone-attention-bg px-3.5 py-2.5 text-meta text-tone-attention-fg [&_svg]:mt-0.5 [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",children:[(0,t.jsx)(m.CircleX,{"aria-hidden":!0}),(0,t.jsxs)("span",{children:[(0,t.jsxs)("strong",{className:"font-medium",children:[e.name," has not answered since ",(0,T.clockTime)(new Date(e.lastSeenAt)),"."]})," ","It is probably not running",n?.description?` on ${n.description}`:"",". Until it answers, nothing restarts its sessions; everything below is its last answer."]})]}):null,(0,t.jsx)(L,{title:"Running here",count:i.length,note:j,children:0===i.length?(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"No ship is assigned to this trierarch."}):(0,t.jsx)("ul",{className:"divide-y divide-border rounded-lg border border-border bg-card","data-testid":"machine-spots",children:i.map(e=>(0,t.jsxs)("li",{className:"flex items-center justify-between gap-3 px-3.5 py-2.5",children:[(0,t.jsxs)("span",{className:"flex min-w-0 flex-col",children:[(0,t.jsx)(w.default,{href:`/ships/${e.shipId}`,className:"truncate text-body font-medium hover:underline",children:e.name}),void 0===e.workspace?null:(0,t.jsxs)("span",{className:"truncate text-meta text-muted-foreground","data-testid":"machine-spot-workspace",children:[(0,t.jsx)("span",{className:"sr-only",children:"Workspace: "}),(0,t.jsx)("span",{className:"font-mono text-id",children:e.workspace.name})," · ","worktree"===e.workspace.kind?"new worktree":"folder, as it is"]})]}),(0,t.jsxs)("span",{className:"flex shrink-0 items-center gap-2.5",children:[(0,t.jsx)(z,{spot:e,now:r}),(0,t.jsx)(q.StatusBadge,{status:e.status})]})]},e.shipId))})}),(0,t.jsx)(L,{title:"Harnesses",count:u?.harnesses.length,note:j,children:null===u?(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"Unknown until it answers."}):(0,t.jsx)("div",{className:"rounded-lg border border-border bg-card px-3.5 py-3",children:u.harnesses.map(e=>(0,t.jsx)(E.HarnessOffer,{harness:e},e.harness))})}),(0,t.jsx)(L,{title:"Workspaces",count:null===u?void 0:u.workspaces.repositories.length+u.workspaces.folders.length,children:null===u?(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"Unknown until it answers."}):(0,t.jsx)("div",{className:"rounded-lg border border-border bg-card px-3.5 py-3",children:(0,t.jsx)(E.WorkspaceOffer,{workspaces:u.workspaces})})}),null===u||0===u.kept.length&&0===u.orphans.length?null:(0,t.jsxs)(L,{title:"Worktrees",children:[(0,t.jsxs)("ul",{className:"divide-y divide-border rounded-lg border border-border bg-card","data-testid":"machine-worktrees",children:[u.kept.map(s=>{var i;return(0,t.jsx)($,{kept:s,shipName:o?.get(s.shipId)??s.shipId,isBeingCleared:(i={trierarchShipId:e.shipId,...s},d.some(e=>e.trierarchShipId===i.trierarchShipId&&e.shipId===i.shipId&&e.repository===i.repository)),onClear:c},`${s.shipId}/${s.repository}`)}),u.orphans.map(e=>(0,t.jsx)(_,{icon:(0,t.jsx)(g,{"aria-hidden":!0}),name:`${e.repository}/${e.name}`,meta:"No crew request"},`${e.repository}/${e.name}`))]}),(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"The trierarch never deletes these on its own."})]})]})}var P=e.i(42383),U=e.i(274),W=e.i(90262),F=e.i(88721),V=e.i(5387),K=e.i(80581),G=e.i(86413),Z=e.i(18423),J=e.i(14695),X=e.i(28459),Y=e.i(96676),ee=e.i(3979),et=e.i(78485),es=e.i(53573),ei=e.i(265);e.s(["default",0,function({params:e}){let l,o,d,{shipId:c}=(0,s.use)(e),h=(0,Y.useNow)(),m=(0,F.useAccountMenu)(h),p=(0,G.useOpenInboxCount)(),x=(0,X.useNeedsAttention)(),g=(0,X.useAttentionCount)(),f=(0,Z.useLiveFleet)(),v=(0,V.useFleetSnapshot)(),b=(0,V.useLabelContext)(),j=(0,ei.useTrierarchPluginConnection)(),w=(0,ei.useMachines)(),S=(0,W.useAccess)(),T=(0,ee.usePluginNav)(),[R,O]=(0,s.useState)(!1),[M,D]=(0,s.useState)(!1),[A,I]=(0,s.useState)(void 0),q=(l=(0,C.useTRPC)(),(0,k.useQuery)(l.fleet.clearRequests.queryOptions(void 0,{refetchInterval:1e4}))),E=(o=(0,C.useTRPC)(),d=(0,N.useQueryClient)(),(0,y.useMutation)(o.fleet.clearWorktree.mutationOptions({onSuccess:()=>d.invalidateQueries({queryKey:o.fleet.clearRequests.queryKey()})})));(0,et.useSignInWhenSessionEnds)([x.error,f.error]);let z=w.data?.find(e=>e.shipId===c),B=v.data??[],L=void 0===z?[]:(0,J.spotsOf)(z,B),_=B.find(e=>e.id===c),$=new Map([...(0,es.useShips)(L.map(e=>e.shipId))].map(([e,t])=>[e,t.crewRequest?.settings]));return(0,t.jsxs)(U.DetailLayout,{title:z?.name??"Machine",parents:[{href:"/trierarchs",label:"Trierarchs"}],live:f.live,nav:{active:"trierarchs",inboxCount:p,attentionCount:g,...T},onCompose:S.canSend?()=>{O(!0)}:void 0,onSearch:()=>{D(!0)},account:m,banner:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.ConsoleNotices,{}),(0,t.jsx)(a.ConsoleGuide,{})]}),header:"connected"!==j||w.isError?(0,t.jsx)(P.MachineList,{connection:j,machines:w.data,ships:B,error:w.isError?w.error.message:void 0,onRetry:()=>{w.refetch()},now:h}):(0,t.jsx)(Q,{machine:z,state:void 0===w.data?"loading":void 0===z?"not-found":"ready",spots:(0,J.withWorkspaces)(L,$),location:_?.location??null,...void 0===b||void 0===_?{}:{labels:(0,K.chipsOf)(_,b)},now:h,shipNames:new Map(B.map(e=>[e.id,e.name])),clearRequests:q.data??[],...S.canManage&&void 0!==z?{onClearKept:e=>{E.reset(),I({...e,trierarchShipId:z.shipId,machineName:z.name})}}:{}}),children:[(0,t.jsx)(u,{worktree:A,onOpenChange:e=>{e||I(void 0)},isPending:E.isPending,...null===E.error?{}:{error:E.error.message},onClear:()=>{void 0!==A&&E.mutate({trierarchShipId:A.trierarchShipId,shipId:A.shipId,repository:A.repository},{onSuccess:()=>{I(void 0)}})}}),(0,t.jsx)(i.ComposeMessage,{isOpen:R,onOpenChange:O}),(0,t.jsx)(n.ConsoleCommands,{isOpen:M,onOpenChange:D,onCompose:()=>{O(!0)}})]})}],96773)},24010,e=>{"use strict";var t=e.i(43476);e.s([],58762),e.i(58762);var s=e.i(66250),i=e.i(2820),n=e.i(56736),a=e.i(9793),r=e.i(84324),l=e.i(64951),o=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",()=>i.DialogBackdrop,"Close",()=>n.DialogClose,"Description",()=>a.DialogDescription,"Handle",0,h,"Popup",()=>r.DialogPopup,"Portal",()=>l.DialogPortal,"Root",0,function(e){return(0,s.useRenderDialogRoot)("alert-dialog",e)},"Title",()=>o.DialogTitle,"Trigger",0,d,"Viewport",()=>c.DialogViewport,"createHandle",0,function(){return new h}],34604);var m=e.i(34604),m=m,p=e.i(90063),x=e.i(94945);e.s(["AlertDialog",0,function(e){return(0,t.jsx)(m.Root,{"data-slot":"alert-dialog",...e})},"AlertDialogClose",0,function(e){return(0,t.jsx)(m.Close,{"data-slot":"alert-dialog-close",...e})},"AlertDialogContent",0,function({className:e,size:s,children:i,...n}){return(0,t.jsxs)(m.Portal,{children:[(0,t.jsx)(m.Backdrop,{"data-slot":"alert-dialog-overlay",className:x.dialogSurface.overlay}),(0,t.jsx)(m.Popup,{"data-slot":"alert-dialog-content",className:(0,p.classNames)(x.dialogSurface.popup({size:s}),e),...n,children:i})]})},"AlertDialogDescription",0,function({className:e,...s}){return(0,t.jsx)(m.Description,{"data-slot":"alert-dialog-description",className:(0,p.classNames)(x.dialogSurface.description,e),...s})},"AlertDialogFooter",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,p.classNames)(x.dialogSurface.footer,e),...s})},"AlertDialogHeader",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,p.classNames)(x.dialogSurface.header,e),...s})},"AlertDialogTitle",0,function({className:e,...s}){return(0,t.jsx)(m.Title,{"data-slot":"alert-dialog-title",className:(0,p.classNames)(x.dialogSurface.title,e),...s})}],24010)},54422,e=>{"use strict";var t=e.i(43476),s=e.i(90063),i=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:a,unknownText:r="Unknown",testId:l}){let o=(0,i.capacityLine)(e,a);if(void 0===a||void 0===o)return(0,t.jsx)("span",{"data-testid":l,className:"text-meta text-muted-foreground",children:r});let d=Math.max(0,a.ships-e.length);return(0,t.jsxs)("span",{role:"img","aria-label":o,"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,i)=>(0,t.jsx)("span",{title:`Spot ${String(i+1)}: ${e.name}, ${e.status}`,className:(0,s.classNames)("h-2 w-3 rounded-xs",n[e.status])},e.shipId)),Array.from({length:d},(s,i)=>(0,t.jsx)("span",{title:`Spot ${String(e.length+i+1)}: vacant`,className:"h-2 w-3 rounded-xs border border-input"},`free-${String(i)}`))]}),(0,t.jsx)("span",{className:"text-meta tabular-nums",children:o})]})}])},95960,e=>{"use strict";var t=e.i(43476),s=e.i(92150),i=e.i(49287),n=e.i(86875),a=e.i(63676),r=e.i(90063);let l={"trierarch-plugin":n.ShipWheel,squadrons:s.Boxes,ship:i.Ship};e.s(["LabelChip",0,function({chip:e,onRemove:s,testId:i,className:n,trailing:o}){let d="none"===e.mark?null:l[e.mark],c=`${e.key}=${e.value}`,u="none"===e.mark?"you":e.ownerName;return(0,t.jsxs)("span",{"data-slot":"label-chip","data-testid":i,title:`${c}, by ${u}`,className:(0,r.classNames)("inline-flex h-5.5 max-w-full min-w-0 shrink-0 items-center gap-1 rounded-sm border border-border bg-secondary px-1.5 font-mono text-id whitespace-nowrap text-foreground [&_svg]:size-3 [&_svg]:shrink-0 [&_svg]:text-muted-foreground",n),children:[null===d?null:(0,t.jsx)(d,{"aria-hidden":!0}),(0,t.jsxs)("span",{className:"truncate",children:[(0,t.jsxs)("span",{className:"text-muted-foreground",children:[e.key,"="]}),(0,t.jsx)("span",{className:"font-medium",children:e.value})]}),o,void 0===s?null:(0,t.jsx)("button",{type:"button","aria-label":`Remove ${c}`,onClick:s,className:"-mr-1 ml-0.5 inline-flex size-4 items-center justify-center rounded-xs text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring",children:(0,t.jsx)(a.X,{"aria-hidden":!0})})]})}])},99261,56539,e=>{"use strict";var t=e.i(43476),s=e.i(56420);let i={name:"chevron-up",size:24,node:[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]};i.node;let n=(0,s.default)(i);e.s(["ChevronUp",0,n],56539);var a=e.i(71645),r=e.i(95960);e.s(["ShipLabels",0,function({chips:e}){let[s,i]=(0,a.useState)(!1);return 0===e.length?(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"No labels"}):!s&&e.length>2?(0,t.jsxs)("span",{className:"flex min-w-0 flex-wrap items-center gap-1.5",children:[e.slice(0,2).map(e=>(0,t.jsx)(r.LabelChip,{chip:e,testId:"ship-label"},e.valueId)),(0,t.jsxs)("button",{type:"button","aria-label":`Show all ${String(e.length)} labels`,"data-testid":"ship-labels-more",className:"inline-flex h-5.5 items-center rounded-sm bg-secondary px-1.5 text-caption font-medium tabular-nums hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring",onClick:()=>{i(!0)},children:["+",e.length-2]})]}):(0,t.jsxs)("span",{className:"flex min-w-0 flex-wrap items-center gap-1.5",children:[(function(e){let t=[];for(let s of e){let e="none"===s.mark?null:s.ownerName,i=t.find(t=>t.owner===e);void 0===i?t.push({owner:e,chips:[s]}):i.chips.push(s)}return t})(e).map(e=>(0,t.jsxs)("span",{className:"inline-flex flex-wrap items-center gap-1.5",children:[null===e.owner?null:(0,t.jsxs)("span",{className:"text-meta text-muted-foreground",children:["by ",e.owner]}),e.chips.map(e=>(0,t.jsx)(r.LabelChip,{chip:e,testId:"ship-label"},e.valueId))]},e.owner??"")),e.length>2?(0,t.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1 rounded-sm px-1 text-meta hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon-sm)",onClick:()=>{i(!1)},children:[(0,t.jsx)(n,{"aria-hidden":!0}),"Show fewer"]}):null]})}],99261)},42383,94313,e=>{"use strict";var t=e.i(43476),s=e.i(77071),i=e.i(86875),n=e.i(94831),a=e.i(22016),r=e.i(14695),l=e.i(31513),o=e.i(15905),d=e.i(67874),c=e.i(17981),u=e.i(88393),h=e.i(71567),m=e.i(52886),p=e.i(69644),x=e.i(69846),g=e.i(66787),f=e.i(66616),v=e.i(49635),b=e.i(66390),j=e.i(54422),w=e.i(63481);let y={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"},k={alive:"Alive",silent:"Not answering","not-started":"Not started"};function N({machine:e,now:s}){let n=(0,r.machineLiveness)(e),a=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)(b.Badge,{variant:"outline",className:y[n],children:["alive"===n?(0,t.jsx)(i.ShipWheel,{"aria-hidden":!0}):(0,t.jsx)(m.CircleDashed,{"aria-hidden":!0}),k[n]]}),null===a?(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,v.fullDateTime)(a),className:"text-muted-foreground tabular-nums",children:["· ","silent"===n?`since ${(0,v.clockTime)(a)}`:(0,v.lastSeen)(a,s).replace("Last seen","seen")]})]})}function C(e,t){let s=(0,v.relativeTime)(e,t);return"Just now"===s?"just now":s}function S({title:e,children:s,className:i}){return(0,t.jsxs)("div",{className:`flex min-w-0 flex-col gap-2 px-4.5 py-4 ${i??""}`,children:[(0,t.jsx)("span",{className:"text-caption font-medium text-muted-foreground",children:e}),s]})}function T({harness:e}){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)(h.Bot,{"aria-hidden":!0}),(0,f.harnessWord)(e.harness)]}),(0,r.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)(g.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 R({title:e,icon:s,names:i}){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===i.length?(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"None"}):i.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 O({workspaces:e}){return(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsx)(R,{title:"Repositories · a new worktree per ship",icon:(0,t.jsx)(x.GitBranch,{"aria-hidden":!0}),names:e.repositories}),(0,t.jsx)(R,{title:"Folders · used as they are",icon:(0,t.jsx)(p.FolderOpen,{"aria-hidden":!0}),names:e.folders})]})}function M({machine:e,spots:s,location:n,now:r}){let{details:l,report:o}=e,d=null===o?null:new Date(o.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)(a.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)(i.ShipWheel,{"aria-hidden":!0}),e.name]}),(0,t.jsx)(N,{machine:e,now:r}),(0,t.jsxs)("span",{className:"flex flex-wrap items-center gap-1.5 text-meta text-muted-foreground",children:[(0,t.jsx)(w.LocationTag,{kind:n?.kind??null,description:n?.description}),null===l?null:(0,t.jsxs)("span",{className:"font-mono text-id",children:["· trierarch ",l.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)(j.CapacityBar,{spots:s,caps:l?.caps,testId:"machine-card-capacity",unknownText:null===d?"Unknown until it answers":`Unknown since ${(0,v.clockTime)(d)}`}),null===d?null:(0,t.jsxs)("time",{dateTime:o?.reportedAt,title:(0,v.fullDateTime)(d),className:"text-meta text-muted-foreground",children:["Last answer ",C(d,r)]})]}),(0,t.jsx)(S,{title:"Harnesses, options and flags",children:null===l?(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"Unknown until it answers"}):l.harnesses.map(e=>(0,t.jsx)(T,{harness:e},e.harness))}),(0,t.jsx)(S,{title:"Workspaces",children:null===l?(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"Unknown until it answers"}):(0,t.jsx)(O,{workspaces:l.workspaces})})]})}e.s(["HarnessOffer",0,T,"MachineCard",0,M,"MachineLiveness",0,N,"WorkspaceOffer",0,O,"lastAnswer",0,C],94313);let D=`${l.SOURCE_URL}/tree/main/packages/trierarch-plugin#readme`;e.s(["MachineList",0,function({connection:e,machines:l,ships:h,error:m,onRetry:p,onJoin:x,now:g}){return"none"===e?(0,t.jsx)(d.EmptyState,{icon:(0,t.jsx)(i.ShipWheel,{"aria-hidden":!0}),title:"The trierarch plugin is not set up for this fleet",description:"Crew requests work without it: they wait on Needs crew and you crew each ship by hand with its starting prompt. With the plugin, trierarchs on your machines start, restart and stop those sessions for you.",action:(0,t.jsx)(o.Button,{nativeButton:!1,render:({children:e,...s})=>(0,t.jsx)("a",{href:D,target:"_blank",rel:"noreferrer",...s,children:e}),"data-testid":"trierarchs-setup",children:"How to set up the trierarch plugin"})}):"not-connected"===e?(0,t.jsx)(d.EmptyState,{icon:(0,t.jsx)(n.Unplug,{"aria-hidden":!0}),title:"The trierarch plugin is not connected",description:"Connect it in Settings; its machines show up here then.",action:(0,t.jsx)(o.Button,{nativeButton:!1,render:(0,t.jsx)(a.default,{href:"/settings"}),"data-testid":"trierarchs-open-settings",children:"Open Settings"})}):void 0!==m?(0,t.jsx)(c.InlineError,{variant:"page",title:"Couldn’t read the machines",description:"Nothing changed.",detail:m,onRetry:p}):void 0===l||"unknown"===e?(0,t.jsx)(u.LoadingSkeleton,{variant:"cards",rows:2,label:"Loading the machines"}):0===l.length?(0,t.jsx)(d.EmptyState,{icon:(0,t.jsx)(i.ShipWheel,{"aria-hidden":!0}),title:"No machines yet",description:"Join a machine: its trierarch then starts sessions there for the crew requests the plugin gives it.",action:x?(0,t.jsx)(o.Button,{variant:"primary",icon:(0,t.jsx)(s.Plus,{"aria-hidden":!0}),onClick:x,"data-testid":"trierarchs-join-empty",children:"Join a machine"}):void 0}):(0,t.jsx)("div",{className:"flex flex-col gap-4","data-testid":"machine-list",children:l.map(e=>(0,t.jsx)(M,{machine:e,spots:(0,r.spotsOf)(e,h),location:h.find(t=>t.id===e.shipId)?.location??null,now:g},e.shipId))})}],42383)},274,e=>{"use strict";var t=e.i(43476),s=e.i(77880),i=e.i(36779),n=e.i(15034),a=e.i(85538);e.s(["DetailLayout",0,function({title:e,parents:r,header:l,children:o,sheet:d,live:c,nav:u,onCompose:h,onSearch:m,account:p,banner:x}){return(0,t.jsxs)("div",{className:"flex min-h-dvh bg-background",children:[(0,t.jsx)(i.Sidebar,{active:u.active,inboxCount:u.inboxCount,attentionCount:u.attentionCount,needsCrewCount:u.needsCrewCount,hasSquadrons:u.hasSquadrons,hasTrierarchs:u.hasTrierarchs,trierarchsCount:u.trierarchsCount,hasSettings:u.hasSettings,...p}),(0,t.jsxs)("div",{className:"flex min-w-0 grow flex-col",children:[(0,t.jsx)(s.Header,{breadcrumb:e,parents:r,live:c,onCompose:h,onSearch:m}),x,(0,t.jsx)(a.TopBar,{title:e,live:c,back:r[r.length-1]??r[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:[l,o]})]}),d,(0,t.jsx)(n.TabBar,{active:"overview"===u.active||"needs-crew"===u.active?"fleet":"settings"===u.active?void 0:u.active,hasSquadrons:u.hasSquadrons,hasTrierarchs:u.hasTrierarchs,trierarchsCount:u.trierarchsCount,inboxCount:u.inboxCount,attentionCount:u.attentionCount})]})}])},66616,e=>{"use strict";let t={"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 s(e){return t[e]?.word??e}e.s(["crewLineHarnessWord",0,function(e){return"chat"===e?"Chat":s(e)},"harnessKind",0,function(e){return t[e]?.kind},"harnessWord",0,s])},53573,e=>{"use strict";e.i(31627);var t=e.i(83615),s=e.i(19273),i=e.i(12598),n=e.i(81384),a=e.i(73664),r=e.i(27001),l=e.i(54440),o=e.i(71645),d=e.i(15823),c=e.i(40143),u=e.i(69230);function h(e,t){let s=new Set(t);return e.filter(e=>!s.has(e))}var m=class extends d.Subscribable{#e;#t;#s;#i;#n;#a;#r;#l;#o;#d=[];constructor(e,t,s){super(),this.#e=e,this.#i=s,this.#s=[],this.#n=[],this.#t=[],this.setQueries(t)}onSubscribe(){1===this.listeners.size&&this.#n.forEach(e=>{e.subscribe(t=>{this.#c(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#n.forEach(e=>{e.destroy()})}setQueries(e,t){this.#s=e,this.#i=t,c.notifyManager.batch(()=>{let e=this.#n,t=this.#u(this.#s);t.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions));let i=t.map(e=>e.observer),n=i.map(e=>e.getCurrentResult()),a=e.length!==i.length,r=i.some((t,s)=>t!==e[s]),l=a||r,o=!!l||n.some((e,t)=>{let i=this.#t[t];return!i||!(0,s.shallowEqualObjects)(e,i)});(l||o)&&(l&&(this.#d=t,this.#n=i),this.#t=n,this.hasListeners()&&(l&&(h(e,i).forEach(e=>{e.destroy()}),h(i,e).forEach(e=>{e.subscribe(t=>{this.#c(e,t)})})),this.#h()))})}getCurrentResult(){return this.#t}getQueries(){return this.#n.map(e=>e.getCurrentQuery())}getObservers(){return this.#n}getOptimisticResult(e,t){let s=this.#u(e),i=s.map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions)),n=s.map(e=>e.defaultedQueryOptions.queryHash);return[i,e=>this.#m(e??i,t,n),()=>this.#p(i,s)]}#p(e,t){let s=new Set;return t.map((i,n)=>{let a=e[n];return i.defaultedQueryOptions.notifyOnChangeProps?a:i.observer.trackResult(a,e=>{s.has(e)||(s.add(e),t.forEach(t=>{t.observer.trackProp(e)}))})})}#m(e,t,i){if(t){let n=this.#o,a=void 0!==i&&void 0!==n&&(n.length!==i.length||i.some((e,t)=>e!==n[t]));return(this.#t!==this.#l||a||t!==this.#r)&&(this.#r=t,this.#l=this.#t,void 0!==i&&(this.#o=i),this.#a=(0,s.replaceEqualDeep)(this.#a,t(e))),this.#a}return e}#x(){return!this.#i?.combine||this.#n.some((e,t)=>e.options.suspense&&this.#t[t]?.data===void 0)}#u(e){let t=new Map;this.#n.forEach(e=>{let s=e.options.queryHash;if(!s)return;let i=t.get(s);i?i.push(e):t.set(s,[e])});let s=[];return e.forEach(e=>{let i=this.#e.defaultQueryOptions(e),n=t.get(i.queryHash)?.shift()??new u.QueryObserver(this.#e,i);s.push({defaultedQueryOptions:i,observer:n})}),s}#c(e,t){let s=this.#n.indexOf(e);-1!==s&&(this.#t=this.#t.slice(),this.#t[s]=t,this.#h())}#h(){if(this.hasListeners()){let e=this.#x(),t=this.#a,s=e?t:this.#m(this.#p(this.#t,this.#d),this.#i?.combine);(e||t!==s)&&c.notifyManager.batch(()=>{this.listeners.forEach(e=>{e(this.#t)})})}}},p=e.i(66027),x=e.i(5387),g=e.i(27702);e.s(["useMessage",0,function(e){let t=(0,g.useTRPC)();return(0,p.useQuery)(t.fleet.message.queryOptions(void 0===e?s.skipToken:{messageId:e}))},"useShip",0,function(e){let t=(0,g.useTRPC)();return(0,p.useQuery)(t.fleet.ship.queryOptions(void 0===e?s.skipToken:{shipId:e},{refetchInterval:x.LAST_SEEN_REFRESH_MS}))},"useShipMessages",0,function(e){let t=(0,g.useTRPC)();return(0,p.useQuery)(t.fleet.shipMessages.queryOptions({shipId:e}))},"useShipTimeline",0,function(e){let t=(0,g.useTRPC)();return(0,p.useQuery)(t.fleet.shipTimeline.queryOptions({shipId:e}))},"useShips",0,function(e){let d=(0,g.useTRPC)(),h=function({queries:e,...t}){let d=(0,i.useQueryClient)(void 0),h=(0,n.useIsRestoring)(),p=(0,a.useQueryErrorResetBoundary)(),x=!1!==t.subscribed,g=o.useMemo(()=>e.map(e=>{let t=d.defaultQueryOptions(e);return t._optimisticResults=h?"isRestoring":x?"optimistic":void 0,t}),[e,d,h,x]);g.forEach(e=>{(0,l.ensureSuspenseTimers)(e);let t=d.getQueryCache().get(e.queryHash);(0,r.ensurePreventErrorBoundaryRetry)(e,p,t)}),(0,r.useClearResetErrorBoundary)(p);let[f]=o.useState(()=>new m(d,g,t)),[v,b,j]=f.getOptimisticResult(g,t.combine),w=!h&&x;o.useSyncExternalStore(o.useCallback(e=>w?f.subscribe(c.notifyManager.batchCalls(e)):s.noop,[f,w]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),o.useEffect(()=>{f.setQueries(g,t)},[g,t,f]);let y=v.some((e,t)=>(0,l.shouldSuspend)(g[t],e))?v.flatMap((e,t)=>{let s=g[t];if(s&&(0,l.shouldSuspend)(s,e)){let e=new u.QueryObserver(d,s);return(0,l.fetchOptimistic)(s,e,p)}return[]}):[];if(y.length>0)throw Promise.all(y);let k=v.find((e,t)=>{let s=g[t];return s&&(0,r.getHasError)({result:e,errorResetBoundary:p,throwOnError:s.throwOnError,query:d.getQueryCache().get(s.queryHash),suspense:s.suspense})});if(k)throw k.error;return b(j())}({queries:e.flatMap(e=>{let s=(0,t.idSchema)("ship").safeParse(e);return s.success?[s.data]:[]}).map(e=>d.fleet.ship.queryOptions({shipId:e},{refetchInterval:x.LAST_SEEN_REFRESH_MS}))}),p=new Map;for(let e of h)e.data&&p.set(e.data.id,e.data);return p}],53573)}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,79432,19002,11147,e=>{"use strict";var t=e.i(56420);let s={name:"activity",size:24,node:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]};s.node;let i=(0,t.default)(s);e.s(["Activity",0,i],79432);let r={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"]};r.node;let n=(0,t.default)(r);e.s(["CirclePause",0,n],19002);let a={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"]};a.node;let l=(0,t.default)(a);e.s(["OctagonPause",0,l],11147)},92150,e=>{"use strict";var t=e.i(56420);let s={name:"boxes",size:24,node:[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]};s.node;let i=(0,t.default)(s);e.s(["Boxes",0,i],92150)},26091,e=>{"use strict";var t=e.i(56420);let s={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};s.node;let i=(0,t.default)(s);e.s(["FileText",0,i],26091)},31458,e=>{"use strict";var t=e.i(56420);let s={name:"flag",size:24,node:[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]]};s.node;let i=(0,t.default)(s);e.s(["Flag",0,i],31458)},24010,e=>{"use strict";var t=e.i(43476);e.s([],58762),e.i(58762);var s=e.i(66250),i=e.i(2820),r=e.i(56736),n=e.i(9793),a=e.i(84324),l=e.i(64951),o=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",()=>i.DialogBackdrop,"Close",()=>r.DialogClose,"Description",()=>n.DialogDescription,"Handle",0,h,"Popup",()=>a.DialogPopup,"Portal",()=>l.DialogPortal,"Root",0,function(e){return(0,s.useRenderDialogRoot)("alert-dialog",e)},"Title",()=>o.DialogTitle,"Trigger",0,d,"Viewport",()=>c.DialogViewport,"createHandle",0,function(){return new h}],34604);var m=e.i(34604),m=m,p=e.i(90063),f=e.i(94945);e.s(["AlertDialog",0,function(e){return(0,t.jsx)(m.Root,{"data-slot":"alert-dialog",...e})},"AlertDialogClose",0,function(e){return(0,t.jsx)(m.Close,{"data-slot":"alert-dialog-close",...e})},"AlertDialogContent",0,function({className:e,size:s,children:i,...r}){return(0,t.jsxs)(m.Portal,{children:[(0,t.jsx)(m.Backdrop,{"data-slot":"alert-dialog-overlay",className:f.dialogSurface.overlay}),(0,t.jsx)(m.Popup,{"data-slot":"alert-dialog-content",className:(0,p.classNames)(f.dialogSurface.popup({size:s}),e),...r,children:i})]})},"AlertDialogDescription",0,function({className:e,...s}){return(0,t.jsx)(m.Description,{"data-slot":"alert-dialog-description",className:(0,p.classNames)(f.dialogSurface.description,e),...s})},"AlertDialogFooter",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,p.classNames)(f.dialogSurface.footer,e),...s})},"AlertDialogHeader",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,p.classNames)(f.dialogSurface.header,e),...s})},"AlertDialogTitle",0,function({className:e,...s}){return(0,t.jsx)(m.Title,{"data-slot":"alert-dialog-title",className:(0,p.classNames)(f.dialogSurface.title,e),...s})}],24010)},95960,e=>{"use strict";var t=e.i(43476),s=e.i(92150),i=e.i(49287),r=e.i(86875),n=e.i(63676),a=e.i(90063);let l={"trierarch-plugin":r.ShipWheel,squadrons:s.Boxes,ship:i.Ship};e.s(["LabelChip",0,function({chip:e,onRemove:s,testId:i,className:r,trailing:o}){let d="none"===e.mark?null:l[e.mark],c=`${e.key}=${e.value}`,u="none"===e.mark?"you":e.ownerName;return(0,t.jsxs)("span",{"data-slot":"label-chip","data-testid":i,title:`${c}, by ${u}`,className:(0,a.classNames)("inline-flex h-5.5 max-w-full min-w-0 shrink-0 items-center gap-1 rounded-sm border border-border bg-secondary px-1.5 font-mono text-id whitespace-nowrap text-foreground [&_svg]:size-3 [&_svg]:shrink-0 [&_svg]:text-muted-foreground",r),children:[null===d?null:(0,t.jsx)(d,{"aria-hidden":!0}),(0,t.jsxs)("span",{className:"truncate",children:[(0,t.jsxs)("span",{className:"text-muted-foreground",children:[e.key,"="]}),(0,t.jsx)("span",{className:"font-medium",children:e.value})]}),o,void 0===s?null:(0,t.jsx)("button",{type:"button","aria-label":`Remove ${c}`,onClick:s,className:"-mr-1 ml-0.5 inline-flex size-4 items-center justify-center rounded-xs text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring",children:(0,t.jsx)(n.X,{"aria-hidden":!0})})]})}])},81830,e=>{"use strict";var t=e.i(43476),s=e.i(79432),i=e.i(19002),r=e.i(11147),n=e.i(90063),a=e.i(49635),l=e.i(93361);let o={working:s.Activity,blocked:r.OctagonPause,idle:i.CirclePause},d={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:i,isTimeInTitle:r=!1,testId:c}){let u="full"===i,h=(0,n.classNames)("flex min-w-0 items-center gap-1.5",u?"text-body":"text-meta");if(null===e)return(0,t.jsx)("span",{"data-testid":c,"data-state":"none",className:(0,n.classNames)(h,"text-muted-foreground"),children:"No report yet"});let m=o[e.state],p=d[l.REPORT_TONES[e.state]],f=new Date(e.reportedAt);return(0,t.jsxs)("span",{"data-testid":c,"data-state":e.state,title:r?`${(0,l.reportText)(e)} \xb7 ${(0,l.reportedWhen)(f,s)}`:(0,l.reportText)(e),className:h,children:[(0,t.jsx)(m,{"aria-hidden":!0,className:(0,n.classNames)("size-(--size-icon-sm) shrink-0",p)}),(0,t.jsx)("span",{className:(0,n.classNames)("shrink-0 font-medium",p),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}),r?null:(0,t.jsx)("time",{dateTime:e.reportedAt,title:(0,a.fullDateTime)(f),className:"shrink-0 text-muted-foreground tabular-nums",children:u?`\xb7 ${(0,l.reportedWhen)(f,s)}`:(0,l.reportAge)(f,s)})]})}])},39874,26808,82880,3067,42211,e=>{"use strict";var t=e.i(43476),s=e.i(71645),i=e.i(46150);let r={one:"delivery",many:"deliveries"};function n(e){if(0===e)return"Nothing is in flight, so no delivery moves.";let t=1===e?"returns":"return";return`${(0,i.counted)(e,{one:"in-flight delivery",many:"in-flight deliveries"})} ${t} to pending. Nothing is lost.`}function a(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}. ${n(e.inFlightDeliveries)}`}if(null!==e.startingPrompt&&!e.startingPrompt.isClaimed)return"The crew line issued earlier, not claimed yet, stops working."}e.s(["abandonedLine",0,function(e){return`${(0,i.counted)(e,r)} will be abandoned`},"inFlightLine",0,n,"isTypedMatch",0,function(e,t){return t===e},"newCrewLineReplaced",0,a,"retireButtonLabel",0,function(e){return 0===e?"Retire ship":`Retire and abandon ${(0,i.counted)(e,r)}`}],26808);var l=e.i(48695),o=e.i(15905),d=e.i(10818),c=e.i(25398),u=e.i(22212),h=e.i(94945),m=e.i(19321),p=e.i(66616),f=e.i(61966),g=e.i(60592);function x({crewLines:e,subject:i,testIdPrefix:r,onCopied:n,onCopyFailed:a}){let[l,o]=(0,s.useState)(e[0]?.harness),d=e.find(e=>e.harness===l)??e[0];if(!d)return null;let c=(0,p.crewLineHarnessWord)(d.harness);return(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2 max-sm:flex-col max-sm:items-stretch",children:[(0,t.jsx)(g.Tabs,{value:d.harness,onValueChange:t=>{let s=e.find(e=>e.harness===t);s&&o(s.harness)},children:(0,t.jsx)(g.TabsList,{"aria-label":`Crew ${i} from`,children:e.map(e=>(0,t.jsx)(g.TabsTrigger,{value:e.harness,"data-testid":`${r}-${e.harness}-tab`,children:(0,p.crewLineHarnessWord)(e.harness)},e.harness))})}),(0,t.jsx)("code",{"data-testid":`${r}-${d.harness}`,title:d.line,className:"min-w-0 grow truncate rounded-md bg-muted px-2 py-1 font-mono text-code text-foreground",children:d.line}),(0,t.jsx)(f.CopyButton,{value:d.line,label:`Copy the ${c} crew line for ${i}`,isLabeled:!0,onCopied:n,onCopyFailed:a,"data-testid":`${r}-${d.harness}-copy`})]})}e.s(["CompactCrewLine",0,x],82880);var b=e.i(17981),v=e.i(26091);function y({note:e,model:s,template:i,testId:r}){return null===e&&null===s?null:(0,t.jsxs)("div",{className:"flex items-start gap-2 rounded-md bg-muted px-3 py-2 text-meta",children:[(0,t.jsx)(v.FileText,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0 text-muted-foreground"}),(0,t.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,t.jsxs)("span",{className:"text-muted-foreground",children:["Launch note",void 0===i?"":` \xb7 ${i}`]}),null!==e&&(0,t.jsx)("span",{"data-testid":r,children:e}),null!==s&&(0,t.jsxs)("span",{children:["Runs ",(0,t.jsx)("span",{className:"font-mono",children:s})]})]})]})}function w({memberName:e,template:s,launchNote:i,model:r,crewLines:n}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y,{note:i,model:r,template:s,testId:"crew-line-launch-note"}),(0,t.jsx)(x,{crewLines:n,subject:e,testIdPrefix:"crew-line-text"}),(0,t.jsxs)("p",{className:"flex items-center gap-1.5 text-meta text-muted-foreground",children:[(0,t.jsx)(d.Info,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"font-medium",children:"Shown once."})," Paste the crew line into Claude Code or Codex started where the launch note says, or into a chat client with the fleet’s connector. A new crew line stops it working."]})]})]})}function k({memberName:e,state:s,template:i,launchNote:r=null,model:n=null,crewLines:a,error:l,isOpen:d,onOpenChange:p,onConfirm:f}){let g="issuing"===s;return(0,t.jsx)(u.Dialog,{open:d,onOpenChange:e=>{g||p(e)},children:(0,t.jsxs)(u.DialogContent,{size:"md","data-testid":"crew-line-dialog",className:h.dialogSurface.phoneFullScreen,children:[(0,t.jsxs)(u.DialogHeader,{children:[(0,t.jsxs)(u.DialogTitle,{children:["Crew line for ",e]}),(0,t.jsx)(u.DialogDescription,{children:"Start Claude Code or Codex where the launch note says, or open a chat client with the fleet’s connector, then paste its crew line. The member is on station once its session checks in."})]}),g&&(0,t.jsxs)("div",{"aria-busy":!0,className:"flex flex-col gap-3",children:[(0,t.jsx)("span",{className:"sr-only",children:"Issuing a crew line..."}),(0,t.jsx)(m.Skeleton,{className:"h-10 w-full rounded-lg"}),(0,t.jsx)(m.Skeleton,{className:"h-28 w-full rounded-lg"})]}),"shown"===s&&void 0!==a&&(0,t.jsx)(w,{memberName:e,template:i,launchNote:r,model:n,crewLines:a}),"error"===s&&(0,t.jsx)(b.InlineError,{title:"Couldn’t issue a crew line",description:`${l??"The squadron manager did not answer."} No new secret was created; an earlier crew line still works.`}),(0,t.jsxs)(u.DialogFooter,{children:[("shown"===s||g)&&(0,t.jsx)(u.DialogClose,{render:(0,t.jsx)(o.Button,{variant:"primary","data-testid":"crew-line-done",disabled:g}),children:"Done"}),"error"===s&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.DialogClose,{render:(0,t.jsx)(o.Button,{}),children:"Close"}),(0,t.jsx)(o.Button,{variant:"primary",icon:(0,t.jsx)(c.RotateCw,{"aria-hidden":!0}),"data-testid":"crew-line-retry",onClick:f,children:"Try again"})]})]})]})})}e.s(["LaunchNote",0,y],3067),e.s(["CrewLineDialog",0,k],42211);var j=e.i(24010);function N({memberName:e,replacedText:s,isOpen:i,onOpenChange:r,onConfirm:n}){return(0,t.jsx)(j.AlertDialog,{open:i,onOpenChange:r,children:(0,t.jsxs)(j.AlertDialogContent,{"data-testid":"new-crew-line-confirm",className:h.dialogSurface.phoneSheet,children:[(0,t.jsxs)(j.AlertDialogHeader,{children:[(0,t.jsxs)(j.AlertDialogTitle,{children:["Get a new crew line for ",e,"?"]}),(0,t.jsx)(j.AlertDialogDescription,{children:s??"Its new secret is shown once, with its launch note."})]}),(0,t.jsxs)(j.AlertDialogFooter,{children:[(0,t.jsx)(j.AlertDialogClose,{render:(0,t.jsx)(o.Button,{}),children:"Cancel"}),(0,t.jsx)(o.Button,{variant:"primary","data-testid":"new-crew-line-confirm-submit",onClick:n,children:"Get new crew line"})]})]})})}function C(e){let i=(0,l.useNewCrewLine)(),[r,n]=(0,s.useState)(!1),[o,d]=(0,s.useState)(!1),[c,u]=(0,s.useState)(void 0),h=()=>{e&&i.mutate({squadronId:e.squadronId,shipId:e.member.shipId})},m=i.data?"shown":i.isError?"error":"issuing";return{isReady:e?.ship!==void 0,start:()=>{e?.ship&&(i.reset(),u(a(e.ship)),d(!0))},dialog:e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(N,{memberName:e.member.name,replacedText:c,isOpen:o,onOpenChange:d,onConfirm:()=>{d(!1),n(!0),h()}}),(0,t.jsx)(k,{memberName:e.member.name,state:m,template:e.template,launchNote:i.data?.launchNote,model:i.data?.model,crewLines:i.data?.crewLines,error:i.error?.message,isOpen:r,onOpenChange:e=>{n(e),e||i.reset()},onConfirm:h})]}):null}}e.s(["GetNewCrewLine",0,function({isPrimary:e=!1,testId:s,...i}){let r=C(i);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.Button,{size:"xs",variant:e?"primary":"secondary",disabled:!r.isReady,"data-testid":s,onClick:r.start,children:"Get new crew line"}),r.dialog]})},"useNewCrewLineFlow",0,C],39874)},10649,78608,87851,75774,e=>{"use strict";e.i(31627);var t=e.i(9677),s=e.i(83615),i=e.i(14695);function r(e,t){for(let s of t)e.includes(s)||e.push(s)}function n(e){return Object.fromEntries((e?.options??[]).flatMap(e=>{let t=e.defaultValue??e.values[0];return void 0===t?[]:[[e.name,t]]}))}function a(e){let[t]=e?.repositories??[];if(void 0!==t)return{kind:"worktree",repository:t};let[s]=e?.folders??[];return void 0===s?void 0:{kind:"folder",name:s}}function l(e){let[t]=e;return{harness:t?.harness??"",workspace:a(t),options:n(t),firstPrompt:"",squadron:"",machineLabels:[]}}function o(e,t){let{harness:s,offers:i}=t,r=i.find(e=>e.harness===s),l=e.workspace,o=void 0!==l&&("worktree"===l.kind?r?.repositories.includes(l.repository)??!1:r?.folders.includes(l.name)??!1);return{...e,harness:s,workspace:o?l:a(r),options:n(r)}}let d=new TextEncoder;function c(e){return d.encode(e).byteLength}function u(e){return e<1024?`${String(e)} B`:`${(e/1024).toFixed(1).replace(/\.0$/,"")} KB`}e.s(["byteSize",0,u,"defaultValues",0,l,"offersOf",0,function(e){let t=[];for(let s of e)if(!s.isSilent&&null!==s.details)for(let e of s.details.harnesses){let n=t.find(t=>t.harness===e.harness);for(let a of(void 0===n&&(n={harness:e.harness,repositories:[],folders:[],options:[]},t.push(n)),r(n.repositories,s.details.workspaces.repositories),r(n.folders,s.details.workspaces.folders),(0,i.harnessOptions)(e.options))){let e=n.options.find(e=>e.name===a.name);void 0===e?n.options.push({...a,values:[...a.values]}):(r(e.values,a.values),e.defaultValue??=a.defaultValue)}}return t},"promptBytes",0,c,"settingsOf",0,function(e){if(""!==e.harness&&void 0!==e.workspace)return{harness:e.harness,workspace:e.workspace,options:e.options,...""===e.firstPrompt?{}:{firstPrompt:e.firstPrompt},...""===e.squadron?{}:{squadron:e.squadron},...0===e.machineLabels.length?{}:{machineLabels:e.machineLabels.flatMap(e=>{let t=(0,s.idSchema)("labelValue").safeParse(e);return t.success?[t.data]:[]})}}},"settingsRows",0,function(e){let s=t.crewSettingsSchema.safeParse(e);if(!s.success)return;let{harness:i,workspace:r,options:n,firstPrompt:a,squadron:l}=s.data;return[{label:"Harness",value:i},"worktree"===r.kind?{label:"Workspace",value:r.repository,meta:"New worktree"}:{label:"Workspace",value:r.name,meta:"Folder, as it is"},...Object.entries(n).map(([e,t])=>({label:e,value:"string"==typeof t?t:JSON.stringify(t),isMono:!0})),{label:"First prompt",value:void 0===a?null:u(c(a))},{label:"Squadron",value:l??null,isMono:!0}]},"valuesOf",0,function(e,s){let i=t.crewSettingsSchema.safeParse(e);if(!i.success)return l(s);let{harness:r,workspace:n,options:a,firstPrompt:o,squadron:d,machineLabels:c}=i.data;return{harness:r,workspace:"worktree"===n.kind?{kind:"worktree",repository:n.repository}:{kind:"folder",name:n.name},options:Object.fromEntries(Object.entries(a).flatMap(([e,t])=>"string"==typeof t?[[e,t]]:[])),firstPrompt:o??"",squadron:d??"",machineLabels:[...c??[]]}},"withHarness",0,o],10649);var h=e.i(80581);function m(e,t){return e.ships.find(e=>e.id===t.shipId)?.labels.map(e=>e.valueId)??[]}function p(e){return 1===e?{these:"this label",carries:"carries it"}:2===e?{these:"both",carries:"carries both"}:{these:"these labels",carries:"carries them all"}}e.s(["machineLabelIdsOf",0,function(e){let s=t.crewSettingsSchema.safeParse(e);return s.success?[...s.data.machineLabels??[]]:[]},"machineLabelsInputOf",0,function(e,t){return{groups:function(e,t){let s=t.map(t=>m(e,t)),i=[],r=[];for(let t of e.labels){let n=t.values.map(e=>({valueId:e.id,value:e.value,shipCount:s.filter(t=>t.includes(e.id)).length})),a={labelId:t.id,key:t.key,mark:e.ownerOf.get(t.id)?.mark??"ship",values:n};(n.some(e=>e.shipCount>0)?i:r).push(a)}let n=(e,t)=>e.key.localeCompare(t.key);return[{title:"On machines",keys:i.toSorted(n)},{title:"On no machine yet",keys:r.toSorted(n)}].filter(e=>e.keys.length>0)}(e,t),chipsOf:t=>(0,h.pickedChips)(t,e),matchOf:s=>{var i;return{matching:(i={machines:t,valueIds:s}).machines.filter(t=>{let s=m(e,t);return i.valueIds.every(e=>s.includes(e))}).map(e=>e.name),total:i.machines.length}}}},"machineLabelsText",0,function(e){let t=e.map(e=>`${e.key}=${e.value}`);return t.length<=2?t.join(" and "):`${t.slice(0,-1).join(", ")} and ${t.at(-1)??""}`},"noMatchWords",0,p],78608);var f=e.i(43476),g=e.i(71645),x=e.i(66616),b=e.i(91727),v=e.i(46033),y=e.i(43988),w=e.i(17981),k=e.i(93669),j=e.i(74544),N=e.i(77071),C=e.i(22016),S=e.i(15905),O=e.i(6734),T=e.i(95960),R=e.i(92150),P=e.i(24071),M=e.i(67927),$=e.i(66595),D=e.i(49287),L=e.i(86875),E=e.i(90063),A=e.i(12470);let I={"trierarch-plugin":L.ShipWheel,squadrons:R.Boxes,ship:D.Ship};function q(e,t){return`${String(e)} ${1===e?t:`${t}s`}`}function z({groups:e,pickedValueIds:t,onPick:s,size:i="sm",pickedWord:r="Picked",countWord:n="ship"}){let[a,l]=(0,g.useState)(""),[o,d]=(0,g.useState)(void 0),c="touch"===i,u=(0,E.classNames)("flex w-full items-center gap-2 rounded-sm px-2 text-left hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50",c?"min-h-(--size-control-touch) text-body-touch":"h-(--size-control-sm) text-body");if(void 0!==o)return(0,f.jsxs)("div",{className:"flex flex-col gap-1","data-testid":"label-picker-values",children:[(0,f.jsxs)("div",{className:"flex items-center justify-between gap-2 px-1 pb-1",children:[(0,f.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1 rounded-sm px-1 font-mono text-body hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon-sm)",onClick:()=>{d(void 0)},"aria-label":`Back to the keys, from ${o.key}`,children:[(0,f.jsx)(P.ChevronLeft,{"aria-hidden":!0}),o.key,"="]}),(0,f.jsxs)("span",{className:"text-meta text-muted-foreground",children:["ship"===n?"Ships":"Machines"," with each"]})]}),(0,f.jsx)("ul",{className:"flex flex-col",children:o.values.map(e=>{let i=t.includes(e.valueId);return(0,f.jsx)("li",{children:(0,f.jsxs)("button",{type:"button",className:u,disabled:i,"data-testid":"label-picker-value",onClick:()=>{s(e.valueId),d(void 0),l("")},children:[(0,f.jsx)("span",{className:"min-w-0 grow truncate font-mono",children:e.value}),(0,f.jsx)("span",{className:"shrink-0 text-meta text-muted-foreground tabular-nums",children:i?r:q(e.shipCount,n)})]})},e.valueId)})})]});let h=a.trim().toLowerCase(),m=e.map(e=>({...e,keys:e.keys.filter(e=>""===h||e.key.includes(h))})).filter(e=>e.keys.length>0);return(0,f.jsxs)("div",{className:"flex flex-col gap-2","data-testid":"label-picker",children:[(0,f.jsx)(A.Input,{type:"search","aria-label":"Find a key",placeholder:"Find a key",size:c?"touch":"md",leadingIcon:(0,f.jsx)($.Search,{}),value:a,onChange:e=>{l(e.target.value)}}),0===m.length?(0,f.jsx)("p",{className:"px-2 py-3 text-meta text-muted-foreground",children:0===e.length?"The fleet has no labels yet.":`No key matches “${a.trim()}”.`}):m.map(e=>(0,f.jsxs)("div",{className:"flex flex-col",children:[(0,f.jsx)("span",{className:"px-2 pt-1 pb-0.5 text-caption text-muted-foreground",children:e.title}),(0,f.jsx)("ul",{className:"flex flex-col",children:e.keys.map(e=>{let t="none"===e.mark?null:I[e.mark];return(0,f.jsx)("li",{children:(0,f.jsxs)("button",{type:"button",className:(0,E.classNames)(u,"[&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0 [&_svg]:text-muted-foreground"),"data-testid":"label-picker-key",onClick:()=>{d(e)},children:[null===t?null:(0,f.jsx)(t,{"aria-hidden":!0}),(0,f.jsx)("span",{className:"font-mono",children:e.key}),(0,f.jsx)("span",{className:"min-w-0 grow truncate text-meta text-muted-foreground",children:q(e.values.length,"value")}),(0,f.jsx)(M.ChevronRight,{"aria-hidden":!0})]})},e.labelId)})})]},e.title))]})}function _({groups:e,picked:t,isDisabled:s,onAdd:i}){let[r,n]=(0,g.useState)(!1);return(0,f.jsxs)(O.Popover,{open:r,onOpenChange:n,children:[(0,f.jsx)(O.PopoverTrigger,{render:(0,f.jsx)(S.Button,{type:"button",variant:"ghost",size:"xs",icon:(0,f.jsx)(N.Plus,{}),disabled:s,"data-testid":"machine-labels-add"}),children:"Add label"}),(0,f.jsxs)(O.PopoverContent,{align:"start",sideOffset:6,className:"w-80 p-2","data-testid":"machine-labels-popover",children:[(0,f.jsx)("span",{className:"block px-2 pt-1 pb-2 text-body font-medium",children:"Machine label"}),(0,f.jsx)(z,{groups:e,pickedValueIds:t.map(e=>e.valueId),countWord:"machine",onPick:e=>{n(!1),i(e)}}),(0,f.jsxs)("p",{className:"mt-2 flex items-center justify-between gap-2 border-t border-border px-2 pt-2 text-meta text-muted-foreground",children:["Exact matches, all must hold.",(0,f.jsx)(C.default,{href:"/labels",className:"font-medium text-foreground hover:underline",children:"Manage labels"})]})]})]})}function B({shipName:e,picked:t,groups:s,match:i,isDisabled:r,onAdd:n,onRemove:a}){let l=p(t.length);return(0,f.jsxs)("div",{className:"flex flex-col gap-1.5","data-testid":"machine-labels",children:[(0,f.jsxs)("span",{className:"text-body font-medium",children:["Machine labels",(0,f.jsx)("span",{className:"font-normal text-muted-foreground",children:" optional"})]}),(0,f.jsxs)("div",{className:"flex min-h-(--size-control-sm) flex-wrap items-center gap-1.5",children:[0===t.length?(0,f.jsx)("span",{className:"text-meta text-muted-foreground",children:"Any machine"}):null,t.map((e,t)=>(0,f.jsxs)(g.Fragment,{children:[0===t?null:(0,f.jsx)("span",{className:"text-meta text-muted-foreground",children:"and"}),(0,f.jsx)(T.LabelChip,{chip:e,testId:"machine-label",...r?{}:{onRemove:()=>{a(e.valueId)}}})]},e.valueId)),t.length>=k.SHIP_LABELS_MAX?null:(0,f.jsx)(_,{groups:s,picked:t,isDisabled:r,onAdd:n})]}),0===t.length?null:0===i.matching.length?(0,f.jsxs)("p",{role:"status","data-testid":"machine-labels-match",className:"flex items-start gap-2 rounded-lg border border-tone-waiting-border bg-tone-waiting-bg px-3 py-2 text-meta text-tone-waiting-fg [&_svg]:mt-0.5 [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",children:[(0,f.jsx)(j.Clock,{"aria-hidden":!0}),(0,f.jsxs)("span",{children:["No machine matches ",l.these,". You can still request: it waits on Needs crew until a machine ",l.carries,"."]})]}):(0,f.jsxs)("p",{className:"text-meta","data-testid":"machine-labels-match",children:["Matches ",i.matching.length," of ",i.total," ",1===i.total?"machine":"machines",": ",i.matching.join(", "),"."]}),(0,f.jsxs)("p",{className:"text-meta text-muted-foreground",children:["The plugin places ",e," only on a machine that carries every label here. Leave it empty for any machine."]})]})}function F({id:e,label:t,isOptional:s,hint:i,error:r,children:n}){return(0,f.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,f.jsxs)(b.Label,{htmlFor:e,children:[t,s?(0,f.jsx)("span",{className:"font-normal text-muted-foreground",children:" optional"}):null]}),n,void 0===i?null:(0,f.jsx)("p",{className:"text-meta text-muted-foreground",children:i}),void 0===r?null:(0,f.jsx)(w.InlineError,{variant:"field",title:r})]})}function H({id:e,items:t,value:s,onPick:i,isDisabled:r,testId:n}){return(0,f.jsxs)(v.Select,{items:t,value:s,disabled:r,onValueChange:e=>{"string"==typeof e&&i(e)},children:[(0,f.jsx)(v.SelectTrigger,{id:e,className:"h-(--size-control) w-full","data-testid":n,children:(0,f.jsx)(v.SelectValue,{})}),(0,f.jsx)(v.SelectContent,{children:Object.entries(t).map(([e,t])=>(0,f.jsx)(v.SelectItem,{value:e,children:t},e))})]})}e.s(["LabelPicker",0,z],87851),e.s(["CrewSettingsFields",0,function({offers:e,values:s,onChange:i,squadrons:r,refusal:n,isDisabled:a=!1,machineLabels:l}){var d;let h={harness:(0,g.useId)(),workspace:(0,g.useId)(),options:(0,g.useId)(),firstPrompt:(0,g.useId)(),squadron:(0,g.useId)()},m=e.find(e=>e.harness===s.harness),p=e=>n?.field===e?n.reason:void 0,b=c(s.firstPrompt),v=b>t.FIRST_PROMPT_MAX_BYTES,w=Object.fromEntries([...(m?.repositories??[]).map(e=>[`worktree:${e}`,`${e} \xb7 new worktree`]),...(m?.folders??[]).map(e=>[`folder:${e}`,`${e} \xb7 folder, as it is`])]);return(0,f.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"crew-settings-fields",children:[(0,f.jsx)(F,{id:h.harness,label:"Harness",error:p("harness"),children:(0,f.jsx)(H,{id:h.harness,items:Object.fromEntries(e.map(e=>[e.harness,(0,x.harnessWord)(e.harness)])),value:s.harness,isDisabled:a,testId:"crew-settings-harness",onPick:t=>{i(o(s,{harness:t,offers:e}))}})}),(0,f.jsx)(F,{id:h.workspace,label:"Workspace",hint:"A repository gets a new git worktree for this ship; a folder is used as it is, shared by the ships in it.",error:p("workspace"),children:(0,f.jsx)(H,{id:h.workspace,items:w,value:void 0===(d=s.workspace)?"":"worktree"===d.kind?`worktree:${d.repository}`:`folder:${d.name}`,isDisabled:a,testId:"crew-settings-workspace",onPick:e=>{i({...s,workspace:function(e){let[t,...s]=e.split(":"),i=s.join(":");return"worktree"===t?{kind:"worktree",repository:i}:"folder"===t?{kind:"folder",name:i}:void 0}(e)})}})}),void 0===l?null:(0,f.jsx)(B,{shipName:l.shipName,picked:l.chipsOf(s.machineLabels),groups:l.groups,match:l.matchOf(s.machineLabels),isDisabled:a,onAdd:e=>{i({...s,machineLabels:[...s.machineLabels,e]})},onRemove:e=>{i({...s,machineLabels:s.machineLabels.filter(t=>t!==e)})}}),(m?.options??[]).map((e,t)=>(0,f.jsx)(F,{id:`${h.options}-${String(t)}`,label:e.name,error:0===t?p("options"):void 0,children:(0,f.jsx)(H,{id:`${h.options}-${String(t)}`,items:Object.fromEntries(e.values.map(t=>[t,t===e.defaultValue?`${t} (default)`:t])),value:s.options[e.name]??"",isDisabled:a,testId:`crew-settings-option-${e.name}`,onPick:t=>{i({...s,options:{...s.options,[e.name]:t}})}})},e.name)),(0,f.jsx)(F,{id:h.firstPrompt,label:"First prompt",isOptional:!0,hint:(0,f.jsxs)("span",{className:"flex justify-between gap-3",children:[(0,f.jsx)("span",{children:"The session starts with it, on its first start only."}),(0,f.jsxs)("span",{className:"tabular-nums",children:[u(b)," of ",u(t.FIRST_PROMPT_MAX_BYTES)]})]}),error:v?`A first prompt is at most ${u(t.FIRST_PROMPT_MAX_BYTES)}.`:p("firstPrompt"),children:(0,f.jsx)(y.Textarea,{id:h.firstPrompt,rows:3,disabled:a,"aria-invalid":!!v||void 0,"data-testid":"crew-settings-first-prompt",value:s.firstPrompt,onChange:e=>{i({...s,firstPrompt:e.target.value})}})}),void 0===r?null:(0,f.jsx)(F,{id:h.squadron,label:"Squadron",isOptional:!0,hint:"The session starts with that squadron’s crew line and template.",error:p("squadron"),children:(0,f.jsx)(H,{id:h.squadron,items:{"":"None",...Object.fromEntries(r.map(e=>[e,e]))},value:s.squadron,isDisabled:a,testId:"crew-settings-squadron",onPick:e=>{i({...s,squadron:e})}})})]})}],75774)},66616,e=>{"use strict";let t={"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 s(e){return t[e]?.word??e}e.s(["crewLineHarnessWord",0,function(e){return"chat"===e?"Chat":s(e)},"harnessKind",0,function(e){return t[e]?.kind},"harnessWord",0,s])},93361,e=>{"use strict";e.i(31627);var t=e.i(94661),s=e.i(49635);let i={working:"Working",blocked:"Blocked",idle:"Idle"};e.s(["REPORT_STATE_WORDS",0,i,"REPORT_TONES",0,{working:"active",blocked:"waiting",idle:"ended"},"reportAge",0,function(e,t){let i=Math.max(0,t.getTime()-e.getTime());return i<6e4?`${String(Math.floor(i/1e3))} s`:i<36e5?`${String(Math.floor(i/6e4))} min`:i<864e5?`${String(Math.floor(i/36e5))} h`:(0,s.relativeTime)(e,t)},"reportDetailsJson",0,function(e){return JSON.stringify(e,null,2)},"reportDetailsLabel",0,function(e){return`JSON \xb7 ${String((0,t.reportDetailsBytes)(e))} bytes`},"reportText",0,function(e){let t=i[e.state];return null===e.note?t:`${t}: ${e.note}`},"reportedWhen",0,function(e,t){let i=(0,s.relativeTime)(e,t);return`reported ${"Just now"===i?"just now":i}`}])},53573,e=>{"use strict";e.i(31627);var t=e.i(83615),s=e.i(19273),i=e.i(12598),r=e.i(81384),n=e.i(73664),a=e.i(27001),l=e.i(54440),o=e.i(71645),d=e.i(15823),c=e.i(40143),u=e.i(69230);function h(e,t){let s=new Set(t);return e.filter(e=>!s.has(e))}var m=class extends d.Subscribable{#e;#t;#s;#i;#r;#n;#a;#l;#o;#d=[];constructor(e,t,s){super(),this.#e=e,this.#i=s,this.#s=[],this.#r=[],this.#t=[],this.setQueries(t)}onSubscribe(){1===this.listeners.size&&this.#r.forEach(e=>{e.subscribe(t=>{this.#c(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#r.forEach(e=>{e.destroy()})}setQueries(e,t){this.#s=e,this.#i=t,c.notifyManager.batch(()=>{let e=this.#r,t=this.#u(this.#s);t.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions));let i=t.map(e=>e.observer),r=i.map(e=>e.getCurrentResult()),n=e.length!==i.length,a=i.some((t,s)=>t!==e[s]),l=n||a,o=!!l||r.some((e,t)=>{let i=this.#t[t];return!i||!(0,s.shallowEqualObjects)(e,i)});(l||o)&&(l&&(this.#d=t,this.#r=i),this.#t=r,this.hasListeners()&&(l&&(h(e,i).forEach(e=>{e.destroy()}),h(i,e).forEach(e=>{e.subscribe(t=>{this.#c(e,t)})})),this.#h()))})}getCurrentResult(){return this.#t}getQueries(){return this.#r.map(e=>e.getCurrentQuery())}getObservers(){return this.#r}getOptimisticResult(e,t){let s=this.#u(e),i=s.map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions)),r=s.map(e=>e.defaultedQueryOptions.queryHash);return[i,e=>this.#m(e??i,t,r),()=>this.#p(i,s)]}#p(e,t){let s=new Set;return t.map((i,r)=>{let n=e[r];return i.defaultedQueryOptions.notifyOnChangeProps?n:i.observer.trackResult(n,e=>{s.has(e)||(s.add(e),t.forEach(t=>{t.observer.trackProp(e)}))})})}#m(e,t,i){if(t){let r=this.#o,n=void 0!==i&&void 0!==r&&(r.length!==i.length||i.some((e,t)=>e!==r[t]));return(this.#t!==this.#l||n||t!==this.#a)&&(this.#a=t,this.#l=this.#t,void 0!==i&&(this.#o=i),this.#n=(0,s.replaceEqualDeep)(this.#n,t(e))),this.#n}return e}#f(){return!this.#i?.combine||this.#r.some((e,t)=>e.options.suspense&&this.#t[t]?.data===void 0)}#u(e){let t=new Map;this.#r.forEach(e=>{let s=e.options.queryHash;if(!s)return;let i=t.get(s);i?i.push(e):t.set(s,[e])});let s=[];return e.forEach(e=>{let i=this.#e.defaultQueryOptions(e),r=t.get(i.queryHash)?.shift()??new u.QueryObserver(this.#e,i);s.push({defaultedQueryOptions:i,observer:r})}),s}#c(e,t){let s=this.#r.indexOf(e);-1!==s&&(this.#t=this.#t.slice(),this.#t[s]=t,this.#h())}#h(){if(this.hasListeners()){let e=this.#f(),t=this.#n,s=e?t:this.#m(this.#p(this.#t,this.#d),this.#i?.combine);(e||t!==s)&&c.notifyManager.batch(()=>{this.listeners.forEach(e=>{e(this.#t)})})}}},p=e.i(66027),f=e.i(5387),g=e.i(27702);e.s(["useMessage",0,function(e){let t=(0,g.useTRPC)();return(0,p.useQuery)(t.fleet.message.queryOptions(void 0===e?s.skipToken:{messageId:e}))},"useShip",0,function(e){let t=(0,g.useTRPC)();return(0,p.useQuery)(t.fleet.ship.queryOptions(void 0===e?s.skipToken:{shipId:e},{refetchInterval:f.LAST_SEEN_REFRESH_MS}))},"useShipMessages",0,function(e){let t=(0,g.useTRPC)();return(0,p.useQuery)(t.fleet.shipMessages.queryOptions({shipId:e}))},"useShipTimeline",0,function(e){let t=(0,g.useTRPC)();return(0,p.useQuery)(t.fleet.shipTimeline.queryOptions({shipId:e}))},"useShips",0,function(e){let d=(0,g.useTRPC)(),h=function({queries:e,...t}){let d=(0,i.useQueryClient)(void 0),h=(0,r.useIsRestoring)(),p=(0,n.useQueryErrorResetBoundary)(),f=!1!==t.subscribed,g=o.useMemo(()=>e.map(e=>{let t=d.defaultQueryOptions(e);return t._optimisticResults=h?"isRestoring":f?"optimistic":void 0,t}),[e,d,h,f]);g.forEach(e=>{(0,l.ensureSuspenseTimers)(e);let t=d.getQueryCache().get(e.queryHash);(0,a.ensurePreventErrorBoundaryRetry)(e,p,t)}),(0,a.useClearResetErrorBoundary)(p);let[x]=o.useState(()=>new m(d,g,t)),[b,v,y]=x.getOptimisticResult(g,t.combine),w=!h&&f;o.useSyncExternalStore(o.useCallback(e=>w?x.subscribe(c.notifyManager.batchCalls(e)):s.noop,[x,w]),()=>x.getCurrentResult(),()=>x.getCurrentResult()),o.useEffect(()=>{x.setQueries(g,t)},[g,t,x]);let k=b.some((e,t)=>(0,l.shouldSuspend)(g[t],e))?b.flatMap((e,t)=>{let s=g[t];if(s&&(0,l.shouldSuspend)(s,e)){let e=new u.QueryObserver(d,s);return(0,l.fetchOptimistic)(s,e,p)}return[]}):[];if(k.length>0)throw Promise.all(k);let j=b.find((e,t)=>{let s=g[t];return s&&(0,a.getHasError)({result:e,errorResetBoundary:p,throwOnError:s.throwOnError,query:d.getQueryCache().get(s.queryHash),suspense:s.suspense})});if(j)throw j.error;return v(y())}({queries:e.flatMap(e=>{let s=(0,t.idSchema)("ship").safeParse(e);return s.success?[s.data]:[]}).map(e=>d.fleet.ship.queryOptions({shipId:e},{refetchInterval:f.LAST_SEEN_REFRESH_MS}))}),p=new Map;for(let e of h)e.data&&p.set(e.data.id,e.data);return p}],53573)}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,52376,e=>{"use strict";e.s([],4824),e.i(4824);var t=e.i(71645),r=e.i(52245),n=e.i(33332);let s=t.createContext(void 0);function a(){let e=t.useContext(s);if(void 0===e)throw Error((0,n.default)(13));return e}let i={imageLoadingStatus:()=>null};var o=e.i(43476);let l=t.forwardRef(function(e,n){let{className:a,render:l,style:d,...u}=e,[c,f]=t.useState("idle"),m=t.useMemo(()=>({imageLoadingStatus:c,setImageLoadingStatus:f}),[c,f]),h=(0,r.useRenderElement)("span",e,{state:{imageLoadingStatus:c},ref:n,props:u,stateAttributesMapping:i});return(0,o.jsx)(s.Provider,{value:m,children:h})});var d=e.i(67865),u=e.i(46376),c=e.i(37584),f=e.i(74354),m=e.i(23910),h=e.i(56789);let p={...i,...f.transitionStatusMapping},x=t.forwardRef(function(e,n){let{className:s,render:i,onLoadingStatusChange:o,keepMounted:l=!1,style:f,sizes:x,srcSet:g,src:b,...v}=e,{setImageLoadingStatus:j}=a(),[y,S]=function(e,{referrerPolicy:r,crossOrigin:n,sizes:s,srcSet:a},i){let o=t.useState("idle"),l=o[1];return(0,u.useIsoLayoutEffect)(()=>{if(!i)return h.NOOP;if(!e&&!a)return l("error"),h.NOOP;let t=!0,o=new window.Image,d=e=>()=>{t&&l(e)};return l("loading"),o.onload=d("loaded"),o.onerror=d("error"),r&&(o.referrerPolicy=r),o.crossOrigin=n??null,s&&(o.sizes=s),a&&(o.srcset=a),e&&(o.src=e),o.complete&&l(o.naturalWidth>0?"loaded":"error"),()=>{t=!1}},[i,e,a,s,n,r,l]),o}(b,e,!l),N="loaded"===y,{mounted:k,transitionStatus:C,setMounted:T}=(0,m.useTransitionStatus)(N),w=t.useRef(null),E=t.useRef(!0);(0,u.useIsoLayoutEffect)(()=>{if(!l)return;let e=E.current;E.current=!1;let t=w.current;if(!t)return;if(!t.complete)return void S("loading");let r=t.naturalWidth>0?"loaded":"error";S(r),"loaded"===r&&e&&T(!0)},[l,b,g,x,v.crossOrigin,v.referrerPolicy,i,S,T]);let I=l?{"data-loading":"loading"===y?"":void 0,"data-error":"error"===y?"":void 0,"aria-hidden":"loaded"!==y||void 0,onLoad(){S("loaded")},onError(){S("error")}}:void 0,q=(0,d.useStableCallback)(e=>{o?.(e),j(e)});(0,u.useIsoLayoutEffect)(()=>{"idle"!==y&&q(y)},[y,q]),(0,u.useIsoLayoutEffect)(()=>()=>j("idle"),[j]),(0,c.useOpenChangeComplete)({enabled:!N,open:N,ref:w,onComplete(){N||T(!1)}});let O=l||k,A={};void 0!==x&&(A.sizes=x),void 0!==g&&(A.srcSet=g),void 0!==b&&(A.src=b);let P=(0,r.useRenderElement)("img",e,{state:{imageLoadingStatus:y,transitionStatus:l&&"ending"===C?void 0:C},ref:[n,w],props:[I,v,A],stateAttributesMapping:p,enabled:O});return O?P:null});var g=e.i(39957);let b=t.forwardRef(function(e,n){let{className:s,render:o,delay:l=0,style:d,...u}=e,{imageLoadingStatus:c}=a(),[f,m]=t.useState(0===l),h=(0,g.useTimeout)();return t.useEffect(()=>(l>0?h.start(l,()=>m(!0)):m(!0),h.clear),[h,l]),(0,r.useRenderElement)("span",e,{state:{imageLoadingStatus:c},ref:n,props:u,stateAttributesMapping:i,enabled:"loaded"!==c&&(0===l||f)})});e.s(["Fallback",0,b,"Image",0,x,"Root",0,l],14751);var v=e.i(14751);e.s(["Avatar",0,v],52376)},80862,e=>{"use strict";e.s(["endingStyle",0,"data-ending-style","startingStyle",0,"data-starting-style"])},74354,e=>{"use strict";var t=e.i(80862);let r={[t.startingStyle]:""},n={[t.endingStyle]:""};e.s(["transitionStatusMapping",0,{transitionStatus:e=>"starting"===e?r:"ending"===e?n:null}])},37584,22640,e=>{"use strict";var t=e.i(71645),r=e.i(67865),n=e.i(74080),s=e.i(8445),a=e.i(94603),i=e.i(80862);let o=null;function l(e,t=!1,d=!1){let u=(0,s.useAnimationFrame)();return(0,r.useStableCallback)((r,s=null)=>{u.cancel();let l=(0,a.resolveRef)(e);if(null==l)return;let c=()=>{if(!d)return void n.flushSync(r);if(!o){let e=[];o=e,queueMicrotask(()=>{o=null,n.flushSync(()=>{for(let t of e)t()})})}o.push(()=>{s?.aborted||r()})};if("function"!=typeof l.getAnimations||globalThis.BASE_UI_ANIMATIONS_DISABLED)return void r();function f(){Promise.all(l.getAnimations().map(e=>e.finished)).then(()=>{s?.aborted||c()},()=>{s?.aborted||(l.getAnimations().some(e=>e.pending||"finished"!==e.playState)?f():c())})}if(t){let e=i.startingStyle;if(!l.hasAttribute(e))return void u.request(f);let t=new MutationObserver(()=>{l.hasAttribute(e)||(t.disconnect(),f())});return t.observe(l,{attributes:!0,attributeFilter:[e]}),void s?.addEventListener("abort",()=>t.disconnect(),{once:!0})}u.request(f)})}e.s(["useAnimationsFinished",0,l],22640),e.s(["useOpenChangeComplete",0,function(e){let{enabled:n=!0,open:s,ref:a,batch:i=!1,onComplete:o}=e,d=(0,r.useStableCallback)(o),u=l(a,s,i);t.useEffect(()=>{if(!n)return;let e=new AbortController;return u(d,e.signal),()=>{e.abort()}},[n,s,d,u])}],37584)},23910,e=>{"use strict";var t=e.i(71645),r=e.i(46376),n=e.i(8445);e.s(["useTransitionStatus",0,function(e,s=!1,a=!1,i=!1){let[o,l]=t.useState(e&&s?"idle":void 0),[d,u]=t.useState(e&&!i);return e&&!d&&(u(!0),l("starting")),e||!d||"ending"===o||a||l("ending"),e||d||"ending"!==o||l(void 0),(0,r.useIsoLayoutEffect)(()=>{if(!e&&d&&"ending"!==o&&a){let e=n.AnimationFrame.request(()=>{l("ending")});return()=>{n.AnimationFrame.cancel(e)}}},[e,d,o,a]),(0,r.useIsoLayoutEffect)(()=>{if(!e||s)return;let t=n.AnimationFrame.request(()=>{l(void 0)});return()=>{n.AnimationFrame.cancel(t)}},[s,e]),(0,r.useIsoLayoutEffect)(()=>{if(!e||!s)return;e&&d&&"idle"!==o&&l("starting");let t=n.AnimationFrame.request(()=>{l("idle")});return()=>{n.AnimationFrame.cancel(t)}},[s,e,d,o]),{mounted:d,setMounted:u,transitionStatus:o}}])},94603,e=>{"use strict";e.s(["resolveRef",0,function(e){return null==e?e:"current"in e?e.current:e}])},8445,e=>{"use strict";e.i(47167);var t=e.i(88940),r=e.i(26300);let n=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let r=0;r<t.length;r+=1)t[r]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||(requestAnimationFrame(this.tick),this.isScheduled=!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||null!==this.callbacks[t]&&(this.callbacks[t]=null,this.callbacksCount-=1)}};class s{static create(){return new s}static request(e){return n.request(e)}static cancel(e){return n.cancel(e)}currentId=null;request(e){this.cancel(),this.currentId=n.request(()=>{this.currentId=null,e()})}cancel=()=>{null!==this.currentId&&(n.cancel(this.currentId),this.currentId=null)};disposeEffect=()=>this.cancel}e.s(["AnimationFrame",0,s,"useAnimationFrame",0,function(){let e=(0,t.useRefWithInit)(s.create).current;return(0,r.useOnMount)(e.disposeEffect),e}])},26300,e=>{"use strict";var t=e.i(71645),r=e.i(56789);e.s(["useOnMount",0,function(e){t.useEffect(e,r.EMPTY_ARRAY)}])},39957,e=>{"use strict";var t=e.i(88940),r=e.i(26300);class n{static create(){return new n}currentId=0;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=0,t()},e)}isStarted(){return 0!==this.currentId}clear=()=>{0!==this.currentId&&(clearTimeout(this.currentId),this.currentId=0)};disposeEffect=()=>this.clear}e.s(["Timeout",0,n,"useTimeout",0,function(){let e=(0,t.useRefWithInit)(n.create).current;return(0,r.useOnMount)(e.disposeEffect),e}])},31458,e=>{"use strict";var t=e.i(56420);let r={name:"flag",size:24,node:[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]]};r.node;let n=(0,t.default)(r);e.s(["Flag",0,n],31458)},29870,e=>{"use strict";var t=e.i(56420);let r={name:"lock",size:24,node:[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]};r.node;let n=(0,t.default)(r);e.s(["Lock",0,n],29870)},49287,e=>{"use strict";var t=e.i(56420);let r={name:"ship",size:24,node:[["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 9.189V13",key:"yp40p3"}],["path",{d:"M19 12V6a2 2 0 00-2-2H7a2 2 0 00-2 2v6",key:"1wcigf"}],["path",{d:"M19.38 19A11.6 11.6 0 0021 13l-8.188-3.639a2 2 0 00-1.624 0L3 13.001a11.6 11.6 0 002.81 7.76",key:"1kdp0u"}],["path",{d:"M2 20c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"1l8w7g"}]]};r.node;let n=(0,t.default)(r);e.s(["Ship",0,n],49287)},94831,e=>{"use strict";var t=e.i(56420);let r={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"}]]};r.node;let n=(0,t.default)(r);e.s(["Unplug",0,n],94831)},22016,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return g},useLinkStatus:function(){return v}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let a=e.r(90809),i=e.r(43476),o=a._(e.r(71645)),l=e.r(95057),d=e.r(8372),u=e.r(18581),c=e.r(18967),f=e.r(5550),m=e.r(88540),h=e.r(91949),p=e.r(73668),x=e.r(9396);function g(t){var r;let n,s,a,[g,v]=(0,o.useOptimistic)(h.IDLE_LINK_STATUS),j=(0,o.useRef)(null),{href:y,as:S,children:N,prefetch:k=null,passHref:C,replace:T,shallow:w,scroll:E,onClick:I,onMouseEnter:q,onTouchStart:O,legacyBehavior:A=!1,onNavigate:P,transitionTypes:R,ref:M,unstable_dynamicOnHover:_,...L}=t;n=N,A&&("string"==typeof n||"number"==typeof n)&&(n=(0,i.jsx)("a",{children:n}));let F=o.default.useContext(d.AppRouterContext),z=!1!==k,B=!1===k?"none":!0===k?"full":"auto",D="none"!==B?"auto"===B?x.FetchStrategy.PPR:x.FetchStrategy.Full:x.FetchStrategy.PPR,$="string"==typeof(r=S||y)?r:(0,l.formatUrl)(r);if(A){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});s=o.default.Children.only(n)}let U=A?s&&"object"==typeof s&&s.ref:M,H,V=o.default.useCallback(e=>(null!==F&&(j.current=(0,h.mountLinkInstance)(e,$,F,D,z,v,H)),()=>{j.current&&((0,h.unmountLinkForCurrentNavigation)(j.current),j.current=null),(0,h.unmountPrefetchableInstance)(e)}),[z,$,F,D,v,H]),W={ref:(0,u.useMergedRef)(V,U),onClick(t){A||"function"!=typeof I||I(t),A&&s.props&&"function"==typeof s.props.onClick&&s.props.onClick(t),!F||t.defaultPrevented||function(t,r,n,s,a,i,l,d="none"){if("u">typeof window){let u,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((u=t.currentTarget.getAttribute("target"))&&"_self"!==u||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,p.isLocalURL)(r)){s&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),i){let e=!1;if(i({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:f}=e.r(99781);o.default.startTransition(()=>{f(r,s?"replace":"push",!1===a?m.ScrollBehavior.NoScroll:m.ScrollBehavior.Default,n.current,l,d)})}}(t,$,j,T,E,P,R,B)},onMouseEnter(e){A||"function"!=typeof q||q(e),A&&s.props&&"function"==typeof s.props.onMouseEnter&&s.props.onMouseEnter(e),F&&z&&(0,h.onNavigationIntent)(e.currentTarget,!0===_)},onTouchStart:function(e){A||"function"!=typeof O||O(e),A&&s.props&&"function"==typeof s.props.onTouchStart&&s.props.onTouchStart(e),F&&z&&(0,h.onNavigationIntent)(e.currentTarget,!0===_)}};return(0,c.isAbsoluteUrl)($)?W.href=$:A&&!C&&("a"!==s.type||"href"in s.props)||(W.href=(0,f.addBasePath)($)),a=A?o.default.cloneElement(s,W):(0,i.jsx)("a",{...L,...W,children:n}),(0,i.jsx)(b.Provider,{value:g,children:a})}let b=(0,o.createContext)(h.IDLE_LINK_STATUS),v=()=>(0,o.useContext)(b);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return s}});let n=e.r(71645);function s(e,t){let r=(0,n.useRef)(null),s=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=s.current;t&&(s.current=null,t())}else e&&(r.current=a(e,n)),t&&(s.current=a(t,n))},[e,t])}function a(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18967,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return g},MiddlewareNotFoundError:function(){return y},MissingStaticPage:function(){return j},NormalizeError:function(){return b},PageNotFoundError:function(){return v},SP:function(){return p},ST:function(){return x},WEB_VITALS:function(){return a},execOnce:function(){return i},getDisplayName:function(){return c},getLocationOrigin:function(){return d},getURL:function(){return u},isAbsoluteUrl:function(){return l},isResSent:function(){return f},loadGetInitialProps:function(){return h},normalizeRepeatedSlashes:function(){return m},stringifyError:function(){return S}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let a=["CLS","FCP","FID","INP","LCP","TTFB"];function i(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let o=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,l=e=>{let t=e.charCodeAt(0);return!!(t>=65&&t<=90||t>=97&&t<=122)&&o.test(e)};function d(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function u(){let{href:e}=window.location,t=d();return e.substring(t.length)}function c(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function f(e){return e.finished||e.headersSent}function m(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function h(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await h(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&f(r))return n;if(!n)throw Object.defineProperty(Error(`"${c(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return n}let p="u">typeof performance,x=p&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class g extends Error{}class b extends Error{}class v extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class j extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class y extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function S(e){return JSON.stringify({message:e.message,stack:e.stack})}},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return a}});let n=e.r(18967),s=e.r(52817);function a(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,s.hasBasePath)(r.pathname)}catch(e){return!1}}},98183,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={assign:function(){return l},searchParamsToUrlQuery:function(){return a},urlQueryToSearchParams:function(){return o}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});function a(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function i(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function o(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,i(e));else t.set(r,i(n));return t}function l(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,n]of r.entries())e.append(t,n)}return e}},95057,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return o},formatWithValidation:function(){return d},urlObjectKeys:function(){return l}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let a=e.r(90809)._(e.r(98183)),i=/https?|ftp|gopher|file/;function o(e){let{auth:t,hostname:r}=e,n=e.protocol||"",s=e.pathname||"",o=e.hash||"",l=e.query||"",d=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?d=t+e.host:r&&(d=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(d+=":"+e.port)),l&&"object"==typeof l&&(l=String(a.urlQueryToSearchParams(l)));let u=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||i.test(n))&&!1!==d?(d="//"+(d||""),s&&"/"!==s[0]&&(s="/"+s)):d||(d=""),o&&"#"!==o[0]&&(o="#"+o),u&&"?"!==u[0]&&(u="?"+u),s=s.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${n}${d}${s}${u}${o}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function d(e){return o(e)}},98274,e=>{"use strict";var t=e.i(43476),r=e.i(18566),n=e.i(71645),s=e.i(67874),a=e.i(17981),i=e.i(88393),o=e.i(29870),l=e.i(77071),d=e.i(49635),u=e.i(84294),c=e.i(66390),f=e.i(15905),m=e.i(46033),h=e.i(14732),p=e.i(1935),x=e.i(67551),g=e.i(78865);function b({blueprint:e,version:r,onVersionChange:n,templates:s,squadrons:a,onForm:i}){let v=e.versions.find(e=>e.version===r)??e.versions[0];if(!v)return null;let j=e.versions[0]?.version,y=Object.fromEntries(e.versions.map(e=>[String(e.version),`v${String(e.version)}${e.version===j?" (latest)":""}`]));return(0,t.jsxs)("div",{"data-testid":"blueprint-view",className:"flex flex-col gap-5",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsx)(c.Badge,{variant:"secondary",children:"Blueprint"}),(0,t.jsxs)(m.Select,{items:y,value:String(v.version),onValueChange:e=>{n(Number(e))},children:[(0,t.jsxs)(m.SelectTrigger,{"aria-label":"Version","data-testid":"blueprint-version",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"Version"}),(0,t.jsx)(m.SelectValue,{className:"font-medium"})]}),(0,t.jsx)(m.SelectContent,{children:Object.entries(y).map(([e,r])=>(0,t.jsx)(m.SelectItem,{value:e,children:r},e))})]}),(0,t.jsxs)("span",{"data-testid":"blueprint-source",className:"text-meta text-muted-foreground",children:[(0,t.jsx)("span",{className:"font-mono",children:v.file})," at ",(0,t.jsx)("span",{className:"font-mono",children:v.commit.slice(0,7)}),", ",(0,d.dayDate)(new Date(v.committedAt))]}),i&&(0,t.jsx)(f.Button,{variant:"primary",icon:(0,t.jsx)(l.Plus,{"aria-hidden":!0}),onClick:i,className:"ml-auto","data-testid":"blueprint-form",children:"Form squadron"})]}),(0,t.jsxs)("p",{className:"flex items-center gap-2 rounded-md bg-muted px-3 py-2 text-meta text-muted-foreground",children:[(0,t.jsx)(o.Lock,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),"Read-only. Blueprints are edited in git; new tags show up here as new versions."]}),(0,t.jsxs)("div",{className:"grid gap-5 lg:grid-cols-[minmax(0,2fr)_minmax(0,1fr)]",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,t.jsxs)("section",{"aria-labelledby":"blueprint-roles",className:"flex flex-col gap-2",children:[(0,t.jsx)("h2",{id:"blueprint-roles",className:"text-body font-semibold",children:"Roles"}),(0,t.jsxs)(h.Table,{children:[(0,t.jsx)(h.TableHeader,{children:(0,t.jsxs)(h.TableRow,{children:[(0,t.jsx)(h.TableHead,{children:"Role"}),(0,t.jsx)(h.TableHead,{children:"Template"}),(0,t.jsx)(h.TableHead,{children:"Members"}),(0,t.jsx)(h.TableHead,{children:"Check-in"}),(0,t.jsx)(h.TableHead,{children:"Launch note"})]})}),(0,t.jsx)(h.TableBody,{children:v.roles.map(e=>{let r,n=(r=e.template,s.find(e=>e.repository===r.repository&&e.name===r.name&&e.version===r.version));return(0,t.jsxs)(h.TableRow,{"data-testid":"blueprint-role",children:[(0,t.jsx)(h.TableCell,{children:(0,t.jsx)(c.Badge,{variant:"type",children:e.name})}),(0,t.jsx)(h.TableCell,{className:"font-mono",children:`${e.template.name}@${String(e.template.version)}`}),(0,t.jsx)(h.TableCell,{children:e.count}),(0,t.jsx)(h.TableCell,{children:n?(0,u.checkInText)(n.checkInMinutes):"unknown"}),(0,t.jsx)(h.TableCell,{className:"max-w-64 truncate text-muted-foreground",children:n?.launchNote??""})]},e.name)})})]})]}),(0,t.jsx)(x.HandoffWiring,{blueprint:v})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,t.jsxs)("section",{"aria-labelledby":"blueprint-versions",className:"flex flex-col gap-2",children:[(0,t.jsx)("h2",{id:"blueprint-versions",className:"text-body font-semibold",children:"Versions"}),(0,t.jsx)("ul",{className:"divide-y divide-border overflow-hidden rounded-lg border border-border",children:e.versions.map(e=>(0,t.jsxs)("li",{className:"flex gap-3 px-3 py-2 text-meta",children:[(0,t.jsxs)("span",{className:"font-mono font-medium",children:["v",e.version]}),(0,t.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,t.jsxs)("span",{children:[e.description," ",e.version===j&&(0,t.jsx)(c.Badge,{variant:"outline",children:"Latest"})]}),(0,t.jsxs)("span",{className:"text-muted-foreground",children:[(0,d.dayDate)(new Date(e.committedAt))," · ",(0,t.jsx)("span",{className:"font-mono",children:e.commit.slice(0,7)})]})]})]},e.version))})]}),(0,t.jsxs)("section",{"aria-labelledby":"blueprint-squadrons",className:"flex flex-col gap-2",children:[(0,t.jsx)("h2",{id:"blueprint-squadrons",className:"text-body font-semibold",children:"Squadrons from this blueprint"}),0===a.length?(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"None yet."}):(0,t.jsx)("ul",{className:"flex flex-col gap-1.5 rounded-lg border border-border p-3",children:a.map(e=>(0,t.jsxs)("li",{className:"flex items-center gap-2 text-meta",children:[(0,t.jsx)(p.SquadronTag,{squadronId:e.id,size:"sm"}),(0,t.jsxs)("span",{className:"text-muted-foreground",children:["v",e.blueprint.version]}),(0,t.jsx)(g.StatusBadge,{status:e.state,className:"ml-auto"})]},e.id))})]})]})]})]})}var v=e.i(44824),j=e.i(45608),y=e.i(95475),S=e.i(2767),N=e.i(85307),k=e.i(274),C=e.i(33939),T=e.i(90262),w=e.i(88721),E=e.i(86413),I=e.i(18423),q=e.i(28459),O=e.i(96676),A=e.i(78485),P=e.i(86165),R=e.i(48695);e.s(["default",0,function({params:e,searchParams:o}){let l=decodeURIComponent((0,n.use)(e).name),d=(0,n.use)(o),c=(0,r.useRouter)(),f=(0,O.useNow)(),m=(0,w.useAccountMenu)(f),h=(0,P.useHasSquadrons)(),p=(0,E.useOpenInboxCount)(),x=(0,q.useNeedsAttention)(),g=(0,q.useAttentionCount)(),M=(0,I.useLiveFleet)(),_=(0,R.useCatalogue)(),L=(0,P.useSquadronsConnection)(),F=(0,R.useSquadrons)(),z=(0,R.useFormSquadron)(),[B,D]=(0,n.useState)(!1),$=(0,T.useAccess)(),[U,H]=(0,n.useState)(!1),[V,W]=(0,n.useState)(!1);(0,A.useSignInWhenSessionEnds)([x.error,M.error]);let K=(0,u.blueprintChoices)(_.data??{blueprints:[]}),Z=K.find(e=>e.name===l&&(void 0===d.repository||e.repository===d.repository)),Q=Number(d.version??Z?.versions[0]?.version);return(0,t.jsxs)(k.DetailLayout,{title:l,parents:[{href:"/squadrons",label:"Squadrons"},{href:"/squadrons?tab=blueprints",label:"Blueprints"}],header:(0,t.jsx)("h1",{className:"text-title font-semibold",children:l}),live:M.live,nav:{active:"squadrons",inboxCount:p,attentionCount:g,hasSquadrons:h,hasSettings:h&&$.canManage},onCompose:$.canSend?()=>{H(!0)}:void 0,onSearch:()=>{W(!0)},account:m,banner:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(S.ConsoleNotices,{}),(0,t.jsx)(y.ConsoleGuide,{})]}),children:["not-connected"===L?(0,t.jsx)(C.SquadronsNotConnected,{}):_.isError?(0,t.jsx)(a.InlineError,{title:"Couldn’t read the blueprint",description:"The squadron manager couldn’t read the catalogue. Squadrons formed from it keep sailing.",detail:_.error.message,onRetry:()=>{_.refetch()}}):_.data?Z?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(b,{blueprint:Z,version:Q,onVersionChange:e=>{c.replace((0,u.blueprintPath)({repository:Z.repository,name:Z.name,version:e}))},templates:_.data.templates,squadrons:(0,u.squadronsFromBlueprint)(F.data??[],Z),onForm:$.canManage?()=>{z.reset(),D(!0)}:void 0}),(0,t.jsx)(N.FormSquadronDialog,{blueprints:K,templates:_.data.templates,initial:{key:Z.key,version:Q},isOpen:B,onOpenChange:D,isPending:z.isPending,error:z.error?.message,onSubmit:e=>{z.mutate(e,{onSuccess:e=>{D(!1),c.push(`/squadrons/${e.squadronId}`)}})}},`${Z.key}@${String(Q)}`)]}):(0,t.jsx)(s.EmptyState,{title:"No such blueprint",description:`git holds no blueprint ${l}.`}):(0,t.jsx)(i.LoadingSkeleton,{variant:"detail",label:"Loading the blueprint"}),(0,t.jsx)(v.ComposeMessage,{isOpen:U,onOpenChange:H}),(0,t.jsx)(j.ConsoleCommands,{isOpen:V,onOpenChange:W,onCompose:()=>{H(!0)}})]})}],98274)},94859,26478,e=>{"use strict";var t=e.i(43476),r=e.i(52376),n=e.i(25913),s=e.i(49287),a=e.i(56420);let i={name:"user-round",size:24,node:[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],aliases:["user-2"]};i.node;let o=(0,a.default)(i);e.s(["UserRound",0,o],26478);var l=e.i(90063);let d=(0,n.cva)("inline-flex shrink-0 items-center justify-center overflow-hidden font-semibold uppercase select-none",{variants:{kind:{app:"rounded-sm bg-primary text-primary-foreground",account:"rounded-full bg-secondary font-sans text-foreground",ship:"rounded-sm bg-secondary font-mono text-foreground",argo:"rounded-sm bg-highlight text-primary",retired:"rounded-sm border border-dashed border-input font-mono font-medium text-muted-foreground"},size:{20:"size-5 text-micro [&_svg]:size-3",28:"size-7 text-micro [&_svg]:size-(--size-icon-sm)",36:"size-9 text-caption [&_svg]:size-(--size-icon)"}},defaultVariants:{kind:"ship",size:28}});e.s(["Avatar",0,function({kind:e="ship",size:n,name:a="",className:i}){let u=e??"ship";return(0,t.jsx)(r.Avatar.Root,{"aria-hidden":!0,"data-slot":"avatar",className:(0,l.classNames)(d({kind:e,size:n}),i),children:(0,t.jsx)(r.Avatar.Fallback,{children:"app"===u?(0,t.jsx)(s.Ship,{"aria-hidden":!0}):"argo"===u?(0,t.jsx)(o,{"aria-hidden":!0}):a.replaceAll("-","").slice(0,2)})})}],94859)},14732,e=>{"use strict";var t=e.i(43476),r=e.i(90063);e.s(["Table",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto rounded-lg border border-border bg-card shadow-sm",children:(0,t.jsx)("table",{"data-slot":"table",className:(0,r.classNames)("w-full caption-bottom text-body",e),...n})})},"TableBody",0,function({className:e,...n}){return(0,t.jsx)("tbody",{"data-slot":"table-body",className:(0,r.classNames)("[&_tr:last-child]:border-0",e),...n})},"TableCell",0,function({className:e,...n}){return(0,t.jsx)("td",{"data-slot":"table-cell",className:(0,r.classNames)("px-4 align-middle",e),...n})},"TableHead",0,function({className:e,...n}){return(0,t.jsx)("th",{"data-slot":"table-head",className:(0,r.classNames)("px-4 text-left align-middle text-caption font-medium whitespace-nowrap text-muted-foreground",e),...n})},"TableHeader",0,function({className:e,...n}){return(0,t.jsx)("thead",{"data-slot":"table-header",className:(0,r.classNames)("bg-muted [&_tr]:border-b",e),...n})},"TableRow",0,function({className:e,...n}){return(0,t.jsx)("tr",{"data-slot":"table-row",className:(0,r.classNames)("h-(--size-row) border-b border-border transition-colors duration-(--duration-fast) hover:bg-muted has-focus-visible:outline-2 has-focus-visible:-outline-offset-2 has-focus-visible:outline-ring data-new:animate-highlight [thead_&]:h-(--size-row-header) [thead_&]:hover:bg-transparent",e),...n})}])},1935,e=>{"use strict";var t=e.i(43476),r=e.i(60011),n=e.i(22016),s=e.i(90063);e.s(["SquadronTag",0,function({squadronId:e,role:a,size:i="md",className:o}){return(0,t.jsxs)(n.default,{href:`/squadrons/${e}`,"data-slot":"squadron-tag",className:(0,s.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"===i?"h-5.5 text-meta":"h-6 text-body",o),children:[(0,t.jsx)(r.Shapes,{"aria-hidden":!0}),(0,t.jsx)("span",{className:"truncate font-medium",children:e}),void 0!==a&&(0,t.jsxs)("span",{className:"shrink-0 text-muted-foreground",children:["· ",a]})]})}])},33939,e=>{"use strict";var t=e.i(43476),r=e.i(94831),n=e.i(22016),s=e.i(15905),a=e.i(67874);e.s(["SquadronsNotConnected",0,function(){return(0,t.jsx)(a.EmptyState,{icon:(0,t.jsx)(r.Unplug,{"aria-hidden":!0}),title:"Squadrons is not connected",description:"Connect it in Settings; squadrons, blueprints and templates show up here then.",action:(0,t.jsx)(s.Button,{nativeButton:!1,render:(0,t.jsx)(n.default,{href:"/settings"}),"data-testid":"squadrons-open-settings",children:"Open Settings"})})}])},85307,e=>{"use strict";var t=e.i(43476),r=e.i(10818),n=e.i(71645),s=e.i(84294),a=e.i(15905),i=e.i(22212),o=e.i(94945),l=e.i(91727),d=e.i(46033),u=e.i(14732),c=e.i(17981);function f({blueprints:e,templates:o,isPending:m,error:h,onSubmit:p,initial:x}){let[g,b]=(0,n.useState)(1),[v,j]=(0,n.useState)(x?.key??e[0]?.key),y=e.find(e=>e.key===v)??e[0],[S,N]=(0,n.useState)(x?.version??y?.versions[0]?.version),k=y?.versions.find(e=>e.version===S)??y?.versions[0];if(!y||!k)return null;if(1===g){let r=Object.fromEntries(y.versions.map((e,t)=>[String(e.version),`v${String(e.version)}${0===t?" (latest)":""}`]));return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(i.DialogHeader,{children:[(0,t.jsx)(i.DialogTitle,{children:"Form a squadron"}),(0,t.jsx)(i.DialogDescription,{children:"Step 1 of 2. Pick a blueprint and the version to form it from."})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("span",{className:"text-meta font-medium",children:"Blueprint"}),(0,t.jsx)("div",{role:"radiogroup","aria-label":"Blueprint",className:"flex flex-col gap-2",children:e.map(e=>{let r=e.versions[0],n=e.key===y.key;return(0,t.jsxs)("button",{type:"button",role:"radio","aria-checked":n,"data-testid":"form-squadron-blueprint",onClick:()=>{j(e.key),N(e.versions[0]?.version)},className:"flex flex-col items-start gap-0.5 rounded-md border border-border px-3 py-2 text-left aria-checked:border-primary aria-checked:ring-1 aria-checked:ring-primary",children:[(0,t.jsxs)("span",{className:"text-body font-medium",children:[e.name," ",(0,t.jsxs)("span",{className:"font-mono text-meta text-muted-foreground",children:["v",r?.version,", latest"]})]}),(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:r?.description})]},e.key)})})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(l.Label,{htmlFor:"form-squadron-version",children:"Version"}),(0,t.jsxs)(d.Select,{items:r,value:String(k.version),onValueChange:e=>{N(Number(e))},children:[(0,t.jsx)(d.SelectTrigger,{id:"form-squadron-version","aria-label":"Version",children:(0,t.jsx)(d.SelectValue,{})}),(0,t.jsx)(d.SelectContent,{children:Object.entries(r).map(([e,r])=>(0,t.jsx)(d.SelectItem,{value:e,children:r},e))})]}),(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"Older versions stay available. Squadrons keep the version they were formed with."})]}),(0,t.jsxs)(i.DialogFooter,{children:[(0,t.jsx)(i.DialogClose,{render:(0,t.jsx)(a.Button,{type:"button"}),children:"Cancel"}),(0,t.jsx)(a.Button,{variant:"primary","data-testid":"form-squadron-preview",onClick:()=>{b(2)},children:"Preview roles"})]})]})}let C=(0,s.rolePreviews)(k,o);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(i.DialogHeader,{children:[(0,t.jsxs)(i.DialogTitle,{children:["Form a squadron from ",k.name," v",k.version]}),(0,t.jsxs)(i.DialogDescription,{children:["Step 2 of 2. ",(0,s.memberCount)(k)," member ships and a flagship are commissioned when you confirm."]})]}),(0,t.jsxs)(u.Table,{children:[(0,t.jsx)(u.TableHeader,{children:(0,t.jsxs)(u.TableRow,{children:[(0,t.jsx)(u.TableHead,{children:"Role"}),(0,t.jsx)(u.TableHead,{children:"Template"}),(0,t.jsx)(u.TableHead,{children:"Members"}),(0,t.jsx)(u.TableHead,{children:"Check-in"})]})}),(0,t.jsx)(u.TableBody,{children:C.map(e=>(0,t.jsxs)(u.TableRow,{children:[(0,t.jsx)(u.TableCell,{className:"font-mono",children:e.role}),(0,t.jsx)(u.TableCell,{className:"font-mono",children:e.template}),(0,t.jsx)(u.TableCell,{children:e.count}),(0,t.jsx)(u.TableCell,{children:void 0===e.checkInMinutes?"unknown":(0,s.checkInText)(e.checkInMinutes)})]},e.role))})]}),(0,t.jsxs)("p",{className:"flex items-start gap-2 rounded-md bg-muted px-3 py-2 text-meta text-muted-foreground",children:[(0,t.jsx)(r.Info,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0"}),(0,t.jsxs)("span",{children:["The flagship is named as the squadron, ",(0,t.jsxs)("span",{className:"font-mono",children:[k.name,"-"]})," plus six random characters: the squadron's address. Members are named by role."]})]}),(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"Next you get crew lines and a launch note per member. You start each session by hand; the squadron sails once every member is on station."}),void 0!==h&&(0,t.jsx)(c.InlineError,{variant:"field",title:"Couldn’t form the squadron",description:h}),(0,t.jsxs)(i.DialogFooter,{children:[(0,t.jsx)(a.Button,{type:"button",disabled:m,onClick:()=>{b(1)},children:"Back"}),(0,t.jsx)(a.Button,{variant:"primary",isLoading:m,"data-testid":"form-squadron-submit",onClick:()=>{p({repository:k.repository,name:k.name,version:k.version})},children:m?"Forming":"Form squadron"})]})]})}e.s(["FormSquadronDialog",0,function(e){let{isOpen:r,onOpenChange:n,isPending:s}=e;return(0,t.jsx)(i.Dialog,{open:r,onOpenChange:e=>{s||n(e)},children:(0,t.jsx)(i.DialogContent,{size:"md","data-testid":"form-squadron-dialog",className:o.dialogSurface.phoneFullScreen,children:(0,t.jsx)(f,{...e})})})}])},67551,e=>{"use strict";var t=e.i(43476),r=e.i(56420);let n={name:"arrow-right",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]};n.node;let s=(0,r.default)(n);var a=e.i(31458),i=e.i(71645),o=e.i(90063),l=e.i(66390);function d({name:e,count:r,onHover:n}){let s={onPointerEnter:()=>{n(e)},onPointerLeave:()=>{n(void 0)}};return"flagship"===e?(0,t.jsxs)(l.Badge,{variant:"kind",...s,children:[(0,t.jsx)(a.Flag,{"aria-hidden":!0}),"flagship"]}):(0,t.jsxs)(l.Badge,{variant:"type",...s,children:[e,void 0!==r&&r>1&&(0,t.jsxs)("span",{className:"text-muted-foreground",children:["×",r]})]})}e.s(["HandoffWiring",0,function({blueprint:e}){let[r,n]=(0,i.useState)(void 0),a=new Map(e.roles.map(e=>[e.name,e.count]));return(0,t.jsxs)("section",{"aria-labelledby":"handoff-wiring","data-testid":"handoff-wiring",className:"flex flex-col gap-2 rounded-lg border border-border p-3",children:[(0,t.jsxs)("div",{className:"flex items-baseline justify-between gap-2",children:[(0,t.jsx)("h2",{id:"handoff-wiring",className:"text-body font-semibold",children:"Hand-offs"}),(0,t.jsxs)("span",{className:"text-meta text-muted-foreground",children:["from blueprint ",e.name," v",e.version]})]}),0===e.handoffs.length?(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"No hand-offs. Members only hear from the flagship and from each other by name."}):(0,t.jsx)("ul",{className:"grid grid-cols-[auto_auto_1fr] items-center gap-x-4 text-meta",children:e.handoffs.map(e=>(0,t.jsxs)("li",{"data-testid":"handoff-row",className:(0,o.classNames)("col-span-3 grid grid-cols-subgrid items-center rounded-md px-1.5 py-1",void 0!==r&&(e.role===r||e.to===r)?"bg-muted":void 0),children:[(0,t.jsx)("span",{children:(0,t.jsx)(d,{name:e.role,count:a.get(e.role),onHover:n})}),(0,t.jsxs)("span",{className:"flex items-center gap-1 font-mono text-muted-foreground",children:[e.handoff,(0,t.jsx)(s,{"aria-label":"goes to",className:"size-(--size-icon-sm)"})]}),(0,t.jsx)("span",{children:(0,t.jsx)(d,{name:e.to,count:a.get(e.to),onHover:n})})]},`${e.role}.${e.handoff}`))})]})}],67551)},274,e=>{"use strict";var t=e.i(43476),r=e.i(77880),n=e.i(36779),s=e.i(15034),a=e.i(85538);e.s(["DetailLayout",0,function({title:e,parents:i,header:o,children:l,sheet:d,live:u,nav:c,onCompose:f,onSearch:m,account:h,banner:p}){return(0,t.jsxs)("div",{className:"flex min-h-dvh bg-background",children:[(0,t.jsx)(n.Sidebar,{active:c.active,inboxCount:c.inboxCount,attentionCount:c.attentionCount,hasSquadrons:c.hasSquadrons,hasSettings:c.hasSettings,...h}),(0,t.jsxs)("div",{className:"flex min-w-0 grow flex-col",children:[(0,t.jsx)(r.Header,{breadcrumb:e,parents:i,live:u,onCompose:f,onSearch:m}),p,(0,t.jsx)(a.TopBar,{title:e,live:u,back:i[i.length-1]??i[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:[o,l]})]}),d,(0,t.jsx)(s.TabBar,{active:"overview"===c.active?"fleet":"settings"===c.active?void 0:c.active,hasSquadrons:c.hasSquadrons,inboxCount:c.inboxCount,attentionCount:c.attentionCount})]})}])}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,52376,e=>{"use strict";e.s([],4824),e.i(4824);var t=e.i(71645),r=e.i(52245),n=e.i(33332);let s=t.createContext(void 0);function a(){let e=t.useContext(s);if(void 0===e)throw Error((0,n.default)(13));return e}let i={imageLoadingStatus:()=>null};var o=e.i(43476);let l=t.forwardRef(function(e,n){let{className:a,render:l,style:d,...u}=e,[c,f]=t.useState("idle"),m=t.useMemo(()=>({imageLoadingStatus:c,setImageLoadingStatus:f}),[c,f]),h=(0,r.useRenderElement)("span",e,{state:{imageLoadingStatus:c},ref:n,props:u,stateAttributesMapping:i});return(0,o.jsx)(s.Provider,{value:m,children:h})});var d=e.i(67865),u=e.i(46376),c=e.i(37584),f=e.i(74354),m=e.i(23910),h=e.i(56789);let p={...i,...f.transitionStatusMapping},x=t.forwardRef(function(e,n){let{className:s,render:i,onLoadingStatusChange:o,keepMounted:l=!1,style:f,sizes:x,srcSet:g,src:b,...v}=e,{setImageLoadingStatus:j}=a(),[y,S]=function(e,{referrerPolicy:r,crossOrigin:n,sizes:s,srcSet:a},i){let o=t.useState("idle"),l=o[1];return(0,u.useIsoLayoutEffect)(()=>{if(!i)return h.NOOP;if(!e&&!a)return l("error"),h.NOOP;let t=!0,o=new window.Image,d=e=>()=>{t&&l(e)};return l("loading"),o.onload=d("loaded"),o.onerror=d("error"),r&&(o.referrerPolicy=r),o.crossOrigin=n??null,s&&(o.sizes=s),a&&(o.srcset=a),e&&(o.src=e),o.complete&&l(o.naturalWidth>0?"loaded":"error"),()=>{t=!1}},[i,e,a,s,n,r,l]),o}(b,e,!l),N="loaded"===y,{mounted:C,transitionStatus:k,setMounted:T}=(0,m.useTransitionStatus)(N),w=t.useRef(null),E=t.useRef(!0);(0,u.useIsoLayoutEffect)(()=>{if(!l)return;let e=E.current;E.current=!1;let t=w.current;if(!t)return;if(!t.complete)return void S("loading");let r=t.naturalWidth>0?"loaded":"error";S(r),"loaded"===r&&e&&T(!0)},[l,b,g,x,v.crossOrigin,v.referrerPolicy,i,S,T]);let I=l?{"data-loading":"loading"===y?"":void 0,"data-error":"error"===y?"":void 0,"aria-hidden":"loaded"!==y||void 0,onLoad(){S("loaded")},onError(){S("error")}}:void 0,q=(0,d.useStableCallback)(e=>{o?.(e),j(e)});(0,u.useIsoLayoutEffect)(()=>{"idle"!==y&&q(y)},[y,q]),(0,u.useIsoLayoutEffect)(()=>()=>j("idle"),[j]),(0,c.useOpenChangeComplete)({enabled:!N,open:N,ref:w,onComplete(){N||T(!1)}});let O=l||C,A={};void 0!==x&&(A.sizes=x),void 0!==g&&(A.srcSet=g),void 0!==b&&(A.src=b);let P=(0,r.useRenderElement)("img",e,{state:{imageLoadingStatus:y,transitionStatus:l&&"ending"===k?void 0:k},ref:[n,w],props:[I,v,A],stateAttributesMapping:p,enabled:O});return O?P:null});var g=e.i(39957);let b=t.forwardRef(function(e,n){let{className:s,render:o,delay:l=0,style:d,...u}=e,{imageLoadingStatus:c}=a(),[f,m]=t.useState(0===l),h=(0,g.useTimeout)();return t.useEffect(()=>(l>0?h.start(l,()=>m(!0)):m(!0),h.clear),[h,l]),(0,r.useRenderElement)("span",e,{state:{imageLoadingStatus:c},ref:n,props:u,stateAttributesMapping:i,enabled:"loaded"!==c&&(0===l||f)})});e.s(["Fallback",0,b,"Image",0,x,"Root",0,l],14751);var v=e.i(14751);e.s(["Avatar",0,v],52376)},80862,e=>{"use strict";e.s(["endingStyle",0,"data-ending-style","startingStyle",0,"data-starting-style"])},74354,e=>{"use strict";var t=e.i(80862);let r={[t.startingStyle]:""},n={[t.endingStyle]:""};e.s(["transitionStatusMapping",0,{transitionStatus:e=>"starting"===e?r:"ending"===e?n:null}])},37584,22640,e=>{"use strict";var t=e.i(71645),r=e.i(67865),n=e.i(74080),s=e.i(8445),a=e.i(94603),i=e.i(80862);let o=null;function l(e,t=!1,d=!1){let u=(0,s.useAnimationFrame)();return(0,r.useStableCallback)((r,s=null)=>{u.cancel();let l=(0,a.resolveRef)(e);if(null==l)return;let c=()=>{if(!d)return void n.flushSync(r);if(!o){let e=[];o=e,queueMicrotask(()=>{o=null,n.flushSync(()=>{for(let t of e)t()})})}o.push(()=>{s?.aborted||r()})};if("function"!=typeof l.getAnimations||globalThis.BASE_UI_ANIMATIONS_DISABLED)return void r();function f(){Promise.all(l.getAnimations().map(e=>e.finished)).then(()=>{s?.aborted||c()},()=>{s?.aborted||(l.getAnimations().some(e=>e.pending||"finished"!==e.playState)?f():c())})}if(t){let e=i.startingStyle;if(!l.hasAttribute(e))return void u.request(f);let t=new MutationObserver(()=>{l.hasAttribute(e)||(t.disconnect(),f())});return t.observe(l,{attributes:!0,attributeFilter:[e]}),void s?.addEventListener("abort",()=>t.disconnect(),{once:!0})}u.request(f)})}e.s(["useAnimationsFinished",0,l],22640),e.s(["useOpenChangeComplete",0,function(e){let{enabled:n=!0,open:s,ref:a,batch:i=!1,onComplete:o}=e,d=(0,r.useStableCallback)(o),u=l(a,s,i);t.useEffect(()=>{if(!n)return;let e=new AbortController;return u(d,e.signal),()=>{e.abort()}},[n,s,d,u])}],37584)},23910,e=>{"use strict";var t=e.i(71645),r=e.i(46376),n=e.i(8445);e.s(["useTransitionStatus",0,function(e,s=!1,a=!1,i=!1){let[o,l]=t.useState(e&&s?"idle":void 0),[d,u]=t.useState(e&&!i);return e&&!d&&(u(!0),l("starting")),e||!d||"ending"===o||a||l("ending"),e||d||"ending"!==o||l(void 0),(0,r.useIsoLayoutEffect)(()=>{if(!e&&d&&"ending"!==o&&a){let e=n.AnimationFrame.request(()=>{l("ending")});return()=>{n.AnimationFrame.cancel(e)}}},[e,d,o,a]),(0,r.useIsoLayoutEffect)(()=>{if(!e||s)return;let t=n.AnimationFrame.request(()=>{l(void 0)});return()=>{n.AnimationFrame.cancel(t)}},[s,e]),(0,r.useIsoLayoutEffect)(()=>{if(!e||!s)return;e&&d&&"idle"!==o&&l("starting");let t=n.AnimationFrame.request(()=>{l("idle")});return()=>{n.AnimationFrame.cancel(t)}},[s,e,d,o]),{mounted:d,setMounted:u,transitionStatus:o}}])},94603,e=>{"use strict";e.s(["resolveRef",0,function(e){return null==e?e:"current"in e?e.current:e}])},8445,e=>{"use strict";e.i(47167);var t=e.i(88940),r=e.i(26300);let n=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let r=0;r<t.length;r+=1)t[r]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||(requestAnimationFrame(this.tick),this.isScheduled=!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||null!==this.callbacks[t]&&(this.callbacks[t]=null,this.callbacksCount-=1)}};class s{static create(){return new s}static request(e){return n.request(e)}static cancel(e){return n.cancel(e)}currentId=null;request(e){this.cancel(),this.currentId=n.request(()=>{this.currentId=null,e()})}cancel=()=>{null!==this.currentId&&(n.cancel(this.currentId),this.currentId=null)};disposeEffect=()=>this.cancel}e.s(["AnimationFrame",0,s,"useAnimationFrame",0,function(){let e=(0,t.useRefWithInit)(s.create).current;return(0,r.useOnMount)(e.disposeEffect),e}])},26300,e=>{"use strict";var t=e.i(71645),r=e.i(56789);e.s(["useOnMount",0,function(e){t.useEffect(e,r.EMPTY_ARRAY)}])},39957,e=>{"use strict";var t=e.i(88940),r=e.i(26300);class n{static create(){return new n}currentId=0;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=0,t()},e)}isStarted(){return 0!==this.currentId}clear=()=>{0!==this.currentId&&(clearTimeout(this.currentId),this.currentId=0)};disposeEffect=()=>this.clear}e.s(["Timeout",0,n,"useTimeout",0,function(){let e=(0,t.useRefWithInit)(n.create).current;return(0,r.useOnMount)(e.disposeEffect),e}])},31458,e=>{"use strict";var t=e.i(56420);let r={name:"flag",size:24,node:[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]]};r.node;let n=(0,t.default)(r);e.s(["Flag",0,n],31458)},29870,e=>{"use strict";var t=e.i(56420);let r={name:"lock",size:24,node:[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]};r.node;let n=(0,t.default)(r);e.s(["Lock",0,n],29870)},49287,e=>{"use strict";var t=e.i(56420);let r={name:"ship",size:24,node:[["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 9.189V13",key:"yp40p3"}],["path",{d:"M19 12V6a2 2 0 00-2-2H7a2 2 0 00-2 2v6",key:"1wcigf"}],["path",{d:"M19.38 19A11.6 11.6 0 0021 13l-8.188-3.639a2 2 0 00-1.624 0L3 13.001a11.6 11.6 0 002.81 7.76",key:"1kdp0u"}],["path",{d:"M2 20c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"1l8w7g"}]]};r.node;let n=(0,t.default)(r);e.s(["Ship",0,n],49287)},94831,e=>{"use strict";var t=e.i(56420);let r={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"}]]};r.node;let n=(0,t.default)(r);e.s(["Unplug",0,n],94831)},22016,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return g},useLinkStatus:function(){return v}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let a=e.r(90809),i=e.r(43476),o=a._(e.r(71645)),l=e.r(95057),d=e.r(8372),u=e.r(18581),c=e.r(18967),f=e.r(5550),m=e.r(88540),h=e.r(91949),p=e.r(73668),x=e.r(9396);function g(t){var r;let n,s,a,[g,v]=(0,o.useOptimistic)(h.IDLE_LINK_STATUS),j=(0,o.useRef)(null),{href:y,as:S,children:N,prefetch:C=null,passHref:k,replace:T,shallow:w,scroll:E,onClick:I,onMouseEnter:q,onTouchStart:O,legacyBehavior:A=!1,onNavigate:P,transitionTypes:R,ref:M,unstable_dynamicOnHover:_,...L}=t;n=N,A&&("string"==typeof n||"number"==typeof n)&&(n=(0,i.jsx)("a",{children:n}));let F=o.default.useContext(d.AppRouterContext),z=!1!==C,B=!1===C?"none":!0===C?"full":"auto",D="none"!==B?"auto"===B?x.FetchStrategy.PPR:x.FetchStrategy.Full:x.FetchStrategy.PPR,$="string"==typeof(r=S||y)?r:(0,l.formatUrl)(r);if(A){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});s=o.default.Children.only(n)}let U=A?s&&"object"==typeof s&&s.ref:M,H,V=o.default.useCallback(e=>(null!==F&&(j.current=(0,h.mountLinkInstance)(e,$,F,D,z,v,H)),()=>{j.current&&((0,h.unmountLinkForCurrentNavigation)(j.current),j.current=null),(0,h.unmountPrefetchableInstance)(e)}),[z,$,F,D,v,H]),W={ref:(0,u.useMergedRef)(V,U),onClick(t){A||"function"!=typeof I||I(t),A&&s.props&&"function"==typeof s.props.onClick&&s.props.onClick(t),!F||t.defaultPrevented||function(t,r,n,s,a,i,l,d="none"){if("u">typeof window){let u,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((u=t.currentTarget.getAttribute("target"))&&"_self"!==u||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,p.isLocalURL)(r)){s&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),i){let e=!1;if(i({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:f}=e.r(99781);o.default.startTransition(()=>{f(r,s?"replace":"push",!1===a?m.ScrollBehavior.NoScroll:m.ScrollBehavior.Default,n.current,l,d)})}}(t,$,j,T,E,P,R,B)},onMouseEnter(e){A||"function"!=typeof q||q(e),A&&s.props&&"function"==typeof s.props.onMouseEnter&&s.props.onMouseEnter(e),F&&z&&(0,h.onNavigationIntent)(e.currentTarget,!0===_)},onTouchStart:function(e){A||"function"!=typeof O||O(e),A&&s.props&&"function"==typeof s.props.onTouchStart&&s.props.onTouchStart(e),F&&z&&(0,h.onNavigationIntent)(e.currentTarget,!0===_)}};return(0,c.isAbsoluteUrl)($)?W.href=$:A&&!k&&("a"!==s.type||"href"in s.props)||(W.href=(0,f.addBasePath)($)),a=A?o.default.cloneElement(s,W):(0,i.jsx)("a",{...L,...W,children:n}),(0,i.jsx)(b.Provider,{value:g,children:a})}let b=(0,o.createContext)(h.IDLE_LINK_STATUS),v=()=>(0,o.useContext)(b);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return s}});let n=e.r(71645);function s(e,t){let r=(0,n.useRef)(null),s=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=s.current;t&&(s.current=null,t())}else e&&(r.current=a(e,n)),t&&(s.current=a(t,n))},[e,t])}function a(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18967,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return g},MiddlewareNotFoundError:function(){return y},MissingStaticPage:function(){return j},NormalizeError:function(){return b},PageNotFoundError:function(){return v},SP:function(){return p},ST:function(){return x},WEB_VITALS:function(){return a},execOnce:function(){return i},getDisplayName:function(){return c},getLocationOrigin:function(){return d},getURL:function(){return u},isAbsoluteUrl:function(){return l},isResSent:function(){return f},loadGetInitialProps:function(){return h},normalizeRepeatedSlashes:function(){return m},stringifyError:function(){return S}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let a=["CLS","FCP","FID","INP","LCP","TTFB"];function i(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let o=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,l=e=>{let t=e.charCodeAt(0);return!!(t>=65&&t<=90||t>=97&&t<=122)&&o.test(e)};function d(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function u(){let{href:e}=window.location,t=d();return e.substring(t.length)}function c(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function f(e){return e.finished||e.headersSent}function m(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function h(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await h(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&f(r))return n;if(!n)throw Object.defineProperty(Error(`"${c(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return n}let p="u">typeof performance,x=p&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class g extends Error{}class b extends Error{}class v extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class j extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class y extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function S(e){return JSON.stringify({message:e.message,stack:e.stack})}},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return a}});let n=e.r(18967),s=e.r(52817);function a(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,s.hasBasePath)(r.pathname)}catch(e){return!1}}},98183,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={assign:function(){return l},searchParamsToUrlQuery:function(){return a},urlQueryToSearchParams:function(){return o}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});function a(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function i(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function o(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,i(e));else t.set(r,i(n));return t}function l(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,n]of r.entries())e.append(t,n)}return e}},95057,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return o},formatWithValidation:function(){return d},urlObjectKeys:function(){return l}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let a=e.r(90809)._(e.r(98183)),i=/https?|ftp|gopher|file/;function o(e){let{auth:t,hostname:r}=e,n=e.protocol||"",s=e.pathname||"",o=e.hash||"",l=e.query||"",d=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?d=t+e.host:r&&(d=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(d+=":"+e.port)),l&&"object"==typeof l&&(l=String(a.urlQueryToSearchParams(l)));let u=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||i.test(n))&&!1!==d?(d="//"+(d||""),s&&"/"!==s[0]&&(s="/"+s)):d||(d=""),o&&"#"!==o[0]&&(o="#"+o),u&&"?"!==u[0]&&(u="?"+u),s=s.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${n}${d}${s}${u}${o}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function d(e){return o(e)}},98274,e=>{"use strict";var t=e.i(43476),r=e.i(18566),n=e.i(71645),s=e.i(67874),a=e.i(17981),i=e.i(88393),o=e.i(29870),l=e.i(77071),d=e.i(49635),u=e.i(84294),c=e.i(66390),f=e.i(15905),m=e.i(46033),h=e.i(14732),p=e.i(1935),x=e.i(67551),g=e.i(78865);function b({blueprint:e,version:r,onVersionChange:n,templates:s,squadrons:a,onForm:i}){let v=e.versions.find(e=>e.version===r)??e.versions[0];if(!v)return null;let j=e.versions[0]?.version,y=Object.fromEntries(e.versions.map(e=>[String(e.version),`v${String(e.version)}${e.version===j?" (latest)":""}`]));return(0,t.jsxs)("div",{"data-testid":"blueprint-view",className:"flex flex-col gap-5",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsx)(c.Badge,{variant:"secondary",children:"Blueprint"}),(0,t.jsxs)(m.Select,{items:y,value:String(v.version),onValueChange:e=>{n(Number(e))},children:[(0,t.jsxs)(m.SelectTrigger,{"aria-label":"Version","data-testid":"blueprint-version",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"Version"}),(0,t.jsx)(m.SelectValue,{className:"font-medium"})]}),(0,t.jsx)(m.SelectContent,{children:Object.entries(y).map(([e,r])=>(0,t.jsx)(m.SelectItem,{value:e,children:r},e))})]}),(0,t.jsxs)("span",{"data-testid":"blueprint-source",className:"text-meta text-muted-foreground",children:[(0,t.jsx)("span",{className:"font-mono",children:v.file})," at ",(0,t.jsx)("span",{className:"font-mono",children:v.commit.slice(0,7)}),", ",(0,d.dayDate)(new Date(v.committedAt))]}),i&&(0,t.jsx)(f.Button,{variant:"primary",icon:(0,t.jsx)(l.Plus,{"aria-hidden":!0}),onClick:i,className:"ml-auto","data-testid":"blueprint-form",children:"Form squadron"})]}),(0,t.jsxs)("p",{className:"flex items-center gap-2 rounded-md bg-muted px-3 py-2 text-meta text-muted-foreground",children:[(0,t.jsx)(o.Lock,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),"Read-only. Blueprints are edited in git; new tags show up here as new versions."]}),(0,t.jsxs)("div",{className:"grid gap-5 lg:grid-cols-[minmax(0,2fr)_minmax(0,1fr)]",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,t.jsxs)("section",{"aria-labelledby":"blueprint-roles",className:"flex flex-col gap-2",children:[(0,t.jsx)("h2",{id:"blueprint-roles",className:"text-body font-semibold",children:"Roles"}),(0,t.jsxs)(h.Table,{children:[(0,t.jsx)(h.TableHeader,{children:(0,t.jsxs)(h.TableRow,{children:[(0,t.jsx)(h.TableHead,{children:"Role"}),(0,t.jsx)(h.TableHead,{children:"Template"}),(0,t.jsx)(h.TableHead,{children:"Members"}),(0,t.jsx)(h.TableHead,{children:"Check-in"}),(0,t.jsx)(h.TableHead,{children:"Launch note"})]})}),(0,t.jsx)(h.TableBody,{children:v.roles.map(e=>{let r,n=(r=e.template,s.find(e=>e.repository===r.repository&&e.name===r.name&&e.version===r.version));return(0,t.jsxs)(h.TableRow,{"data-testid":"blueprint-role",children:[(0,t.jsx)(h.TableCell,{children:(0,t.jsx)(c.Badge,{variant:"type",children:e.name})}),(0,t.jsx)(h.TableCell,{className:"font-mono",children:`${e.template.name}@${String(e.template.version)}`}),(0,t.jsx)(h.TableCell,{children:e.count}),(0,t.jsx)(h.TableCell,{children:n?(0,u.checkInText)(n.checkInMinutes):"unknown"}),(0,t.jsx)(h.TableCell,{className:"max-w-64 truncate text-muted-foreground",children:n?.launchNote??""})]},e.name)})})]})]}),(0,t.jsx)(x.HandoffWiring,{blueprint:v})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,t.jsxs)("section",{"aria-labelledby":"blueprint-versions",className:"flex flex-col gap-2",children:[(0,t.jsx)("h2",{id:"blueprint-versions",className:"text-body font-semibold",children:"Versions"}),(0,t.jsx)("ul",{className:"divide-y divide-border overflow-hidden rounded-lg border border-border",children:e.versions.map(e=>(0,t.jsxs)("li",{className:"flex gap-3 px-3 py-2 text-meta",children:[(0,t.jsxs)("span",{className:"font-mono font-medium",children:["v",e.version]}),(0,t.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,t.jsxs)("span",{children:[e.description," ",e.version===j&&(0,t.jsx)(c.Badge,{variant:"outline",children:"Latest"})]}),(0,t.jsxs)("span",{className:"text-muted-foreground",children:[(0,d.dayDate)(new Date(e.committedAt))," · ",(0,t.jsx)("span",{className:"font-mono",children:e.commit.slice(0,7)})]})]})]},e.version))})]}),(0,t.jsxs)("section",{"aria-labelledby":"blueprint-squadrons",className:"flex flex-col gap-2",children:[(0,t.jsx)("h2",{id:"blueprint-squadrons",className:"text-body font-semibold",children:"Squadrons from this blueprint"}),0===a.length?(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"None yet."}):(0,t.jsx)("ul",{className:"flex flex-col gap-1.5 rounded-lg border border-border p-3",children:a.map(e=>(0,t.jsxs)("li",{className:"flex items-center gap-2 text-meta",children:[(0,t.jsx)(p.SquadronTag,{squadronId:e.id,size:"sm"}),(0,t.jsxs)("span",{className:"text-muted-foreground",children:["v",e.blueprint.version]}),(0,t.jsx)(g.StatusBadge,{status:e.state,className:"ml-auto"})]},e.id))})]})]})]})]})}var v=e.i(44824),j=e.i(45608),y=e.i(95475),S=e.i(2767),N=e.i(85307),C=e.i(274),k=e.i(33939),T=e.i(90262),w=e.i(88721),E=e.i(86413),I=e.i(18423),q=e.i(28459),O=e.i(96676),A=e.i(78485),P=e.i(86165),R=e.i(48695),M=e.i(3979);e.s(["default",0,function({params:e,searchParams:o}){let l=decodeURIComponent((0,n.use)(e).name),d=(0,n.use)(o),c=(0,r.useRouter)(),f=(0,O.useNow)(),m=(0,w.useAccountMenu)(f),h=(0,E.useOpenInboxCount)(),p=(0,q.useNeedsAttention)(),x=(0,q.useAttentionCount)(),g=(0,I.useLiveFleet)(),_=(0,R.useCatalogue)(),L=(0,P.useSquadronsConnection)(),F=(0,R.useSquadrons)(),z=(0,R.useFormSquadron)(),[B,D]=(0,n.useState)(!1),$=(0,T.useAccess)(),U=(0,M.usePluginNav)(),[H,V]=(0,n.useState)(!1),[W,K]=(0,n.useState)(!1);(0,A.useSignInWhenSessionEnds)([p.error,g.error]);let Z=(0,u.blueprintChoices)(_.data??{blueprints:[]}),Q=Z.find(e=>e.name===l&&(void 0===d.repository||e.repository===d.repository)),X=Number(d.version??Q?.versions[0]?.version);return(0,t.jsxs)(C.DetailLayout,{title:l,parents:[{href:"/squadrons",label:"Squadrons"},{href:"/squadrons?tab=blueprints",label:"Blueprints"}],header:(0,t.jsx)("h1",{className:"text-title font-semibold",children:l}),live:g.live,nav:{active:"squadrons",inboxCount:h,attentionCount:x,...U},onCompose:$.canSend?()=>{V(!0)}:void 0,onSearch:()=>{K(!0)},account:m,banner:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(S.ConsoleNotices,{}),(0,t.jsx)(y.ConsoleGuide,{})]}),children:["not-connected"===L?(0,t.jsx)(k.SquadronsNotConnected,{}):_.isError?(0,t.jsx)(a.InlineError,{title:"Couldn’t read the blueprint",description:"The squadron manager couldn’t read the catalogue. Squadrons formed from it keep sailing.",detail:_.error.message,onRetry:()=>{_.refetch()}}):_.data?Q?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(b,{blueprint:Q,version:X,onVersionChange:e=>{c.replace((0,u.blueprintPath)({repository:Q.repository,name:Q.name,version:e}))},templates:_.data.templates,squadrons:(0,u.squadronsFromBlueprint)(F.data??[],Q),onForm:$.canManage?()=>{z.reset(),D(!0)}:void 0}),(0,t.jsx)(N.FormSquadronDialog,{blueprints:Z,templates:_.data.templates,initial:{key:Q.key,version:X},isOpen:B,onOpenChange:D,isPending:z.isPending,error:z.error?.message,onSubmit:e=>{z.mutate(e,{onSuccess:e=>{D(!1),c.push(`/squadrons/${e.squadronId}`)}})}},`${Q.key}@${String(X)}`)]}):(0,t.jsx)(s.EmptyState,{title:"No such blueprint",description:`git holds no blueprint ${l}.`}):(0,t.jsx)(i.LoadingSkeleton,{variant:"detail",label:"Loading the blueprint"}),(0,t.jsx)(v.ComposeMessage,{isOpen:H,onOpenChange:V}),(0,t.jsx)(j.ConsoleCommands,{isOpen:W,onOpenChange:K,onCompose:()=>{V(!0)}})]})}],98274)},94859,26478,e=>{"use strict";var t=e.i(43476),r=e.i(52376),n=e.i(25913),s=e.i(49287),a=e.i(56420);let i={name:"user-round",size:24,node:[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],aliases:["user-2"]};i.node;let o=(0,a.default)(i);e.s(["UserRound",0,o],26478);var l=e.i(90063);let d=(0,n.cva)("inline-flex shrink-0 items-center justify-center overflow-hidden font-semibold uppercase select-none",{variants:{kind:{app:"rounded-sm bg-primary text-primary-foreground",account:"rounded-full bg-secondary font-sans text-foreground",ship:"rounded-sm bg-secondary font-mono text-foreground",argo:"rounded-sm bg-highlight text-primary",retired:"rounded-sm border border-dashed border-input font-mono font-medium text-muted-foreground"},size:{20:"size-5 text-micro [&_svg]:size-3",28:"size-7 text-micro [&_svg]:size-(--size-icon-sm)",36:"size-9 text-caption [&_svg]:size-(--size-icon)"}},defaultVariants:{kind:"ship",size:28}});e.s(["Avatar",0,function({kind:e="ship",size:n,name:a="",className:i}){let u=e??"ship";return(0,t.jsx)(r.Avatar.Root,{"aria-hidden":!0,"data-slot":"avatar",className:(0,l.classNames)(d({kind:e,size:n}),i),children:(0,t.jsx)(r.Avatar.Fallback,{children:"app"===u?(0,t.jsx)(s.Ship,{"aria-hidden":!0}):"argo"===u?(0,t.jsx)(o,{"aria-hidden":!0}):a.replaceAll("-","").slice(0,2)})})}],94859)},14732,e=>{"use strict";var t=e.i(43476),r=e.i(90063);e.s(["Table",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto rounded-lg border border-border bg-card shadow-sm",children:(0,t.jsx)("table",{"data-slot":"table",className:(0,r.classNames)("w-full caption-bottom text-body",e),...n})})},"TableBody",0,function({className:e,...n}){return(0,t.jsx)("tbody",{"data-slot":"table-body",className:(0,r.classNames)("[&_tr:last-child]:border-0",e),...n})},"TableCell",0,function({className:e,...n}){return(0,t.jsx)("td",{"data-slot":"table-cell",className:(0,r.classNames)("px-4 align-middle",e),...n})},"TableHead",0,function({className:e,...n}){return(0,t.jsx)("th",{"data-slot":"table-head",className:(0,r.classNames)("px-4 text-left align-middle text-caption font-medium whitespace-nowrap text-muted-foreground",e),...n})},"TableHeader",0,function({className:e,...n}){return(0,t.jsx)("thead",{"data-slot":"table-header",className:(0,r.classNames)("bg-muted [&_tr]:border-b",e),...n})},"TableRow",0,function({className:e,...n}){return(0,t.jsx)("tr",{"data-slot":"table-row",className:(0,r.classNames)("h-(--size-row) border-b border-border transition-colors duration-(--duration-fast) hover:bg-muted has-focus-visible:outline-2 has-focus-visible:-outline-offset-2 has-focus-visible:outline-ring data-new:animate-highlight [thead_&]:h-(--size-row-header) [thead_&]:hover:bg-transparent",e),...n})}])},1935,e=>{"use strict";var t=e.i(43476),r=e.i(60011),n=e.i(22016),s=e.i(90063);e.s(["SquadronTag",0,function({squadronId:e,role:a,size:i="md",className:o}){return(0,t.jsxs)(n.default,{href:`/squadrons/${e}`,"data-slot":"squadron-tag",className:(0,s.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"===i?"h-5.5 text-meta":"h-6 text-body",o),children:[(0,t.jsx)(r.Shapes,{"aria-hidden":!0}),(0,t.jsx)("span",{className:"truncate font-medium",children:e}),void 0!==a&&(0,t.jsxs)("span",{className:"shrink-0 text-muted-foreground",children:["· ",a]})]})}])},33939,e=>{"use strict";var t=e.i(43476),r=e.i(94831),n=e.i(22016),s=e.i(15905),a=e.i(67874);e.s(["SquadronsNotConnected",0,function(){return(0,t.jsx)(a.EmptyState,{icon:(0,t.jsx)(r.Unplug,{"aria-hidden":!0}),title:"Squadrons is not connected",description:"Connect it in Settings; squadrons, blueprints and templates show up here then.",action:(0,t.jsx)(s.Button,{nativeButton:!1,render:(0,t.jsx)(n.default,{href:"/settings"}),"data-testid":"squadrons-open-settings",children:"Open Settings"})})}])},85307,e=>{"use strict";var t=e.i(43476),r=e.i(10818),n=e.i(71645),s=e.i(84294),a=e.i(15905),i=e.i(22212),o=e.i(94945),l=e.i(91727),d=e.i(46033),u=e.i(14732),c=e.i(17981);function f({blueprints:e,templates:o,isPending:m,error:h,onSubmit:p,initial:x}){let[g,b]=(0,n.useState)(1),[v,j]=(0,n.useState)(x?.key??e[0]?.key),y=e.find(e=>e.key===v)??e[0],[S,N]=(0,n.useState)(x?.version??y?.versions[0]?.version),C=y?.versions.find(e=>e.version===S)??y?.versions[0];if(!y||!C)return null;if(1===g){let r=Object.fromEntries(y.versions.map((e,t)=>[String(e.version),`v${String(e.version)}${0===t?" (latest)":""}`]));return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(i.DialogHeader,{children:[(0,t.jsx)(i.DialogTitle,{children:"Form a squadron"}),(0,t.jsx)(i.DialogDescription,{children:"Step 1 of 2. Pick a blueprint and the version to form it from."})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("span",{className:"text-meta font-medium",children:"Blueprint"}),(0,t.jsx)("div",{role:"radiogroup","aria-label":"Blueprint",className:"flex flex-col gap-2",children:e.map(e=>{let r=e.versions[0],n=e.key===y.key;return(0,t.jsxs)("button",{type:"button",role:"radio","aria-checked":n,"data-testid":"form-squadron-blueprint",onClick:()=>{j(e.key),N(e.versions[0]?.version)},className:"flex flex-col items-start gap-0.5 rounded-md border border-border px-3 py-2 text-left aria-checked:border-primary aria-checked:ring-1 aria-checked:ring-primary",children:[(0,t.jsxs)("span",{className:"text-body font-medium",children:[e.name," ",(0,t.jsxs)("span",{className:"font-mono text-meta text-muted-foreground",children:["v",r?.version,", latest"]})]}),(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:r?.description})]},e.key)})})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(l.Label,{htmlFor:"form-squadron-version",children:"Version"}),(0,t.jsxs)(d.Select,{items:r,value:String(C.version),onValueChange:e=>{N(Number(e))},children:[(0,t.jsx)(d.SelectTrigger,{id:"form-squadron-version","aria-label":"Version",children:(0,t.jsx)(d.SelectValue,{})}),(0,t.jsx)(d.SelectContent,{children:Object.entries(r).map(([e,r])=>(0,t.jsx)(d.SelectItem,{value:e,children:r},e))})]}),(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"Older versions stay available. Squadrons keep the version they were formed with."})]}),(0,t.jsxs)(i.DialogFooter,{children:[(0,t.jsx)(i.DialogClose,{render:(0,t.jsx)(a.Button,{type:"button"}),children:"Cancel"}),(0,t.jsx)(a.Button,{variant:"primary","data-testid":"form-squadron-preview",onClick:()=>{b(2)},children:"Preview roles"})]})]})}let k=(0,s.rolePreviews)(C,o);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(i.DialogHeader,{children:[(0,t.jsxs)(i.DialogTitle,{children:["Form a squadron from ",C.name," v",C.version]}),(0,t.jsxs)(i.DialogDescription,{children:["Step 2 of 2. ",(0,s.memberCount)(C)," member ships and a flagship are commissioned when you confirm."]})]}),(0,t.jsxs)(u.Table,{children:[(0,t.jsx)(u.TableHeader,{children:(0,t.jsxs)(u.TableRow,{children:[(0,t.jsx)(u.TableHead,{children:"Role"}),(0,t.jsx)(u.TableHead,{children:"Template"}),(0,t.jsx)(u.TableHead,{children:"Members"}),(0,t.jsx)(u.TableHead,{children:"Check-in"})]})}),(0,t.jsx)(u.TableBody,{children:k.map(e=>(0,t.jsxs)(u.TableRow,{children:[(0,t.jsx)(u.TableCell,{className:"font-mono",children:e.role}),(0,t.jsx)(u.TableCell,{className:"font-mono",children:e.template}),(0,t.jsx)(u.TableCell,{children:e.count}),(0,t.jsx)(u.TableCell,{children:void 0===e.checkInMinutes?"unknown":(0,s.checkInText)(e.checkInMinutes)})]},e.role))})]}),(0,t.jsxs)("p",{className:"flex items-start gap-2 rounded-md bg-muted px-3 py-2 text-meta text-muted-foreground",children:[(0,t.jsx)(r.Info,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0"}),(0,t.jsxs)("span",{children:["The flagship is named as the squadron, ",(0,t.jsxs)("span",{className:"font-mono",children:[C.name,"-"]})," plus six random characters: the squadron's address. Members are named by role."]})]}),(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"Next you get crew lines and a launch note per member. You start each session by hand; the squadron sails once every member is on station."}),void 0!==h&&(0,t.jsx)(c.InlineError,{variant:"field",title:"Couldn’t form the squadron",description:h}),(0,t.jsxs)(i.DialogFooter,{children:[(0,t.jsx)(a.Button,{type:"button",disabled:m,onClick:()=>{b(1)},children:"Back"}),(0,t.jsx)(a.Button,{variant:"primary",isLoading:m,"data-testid":"form-squadron-submit",onClick:()=>{p({repository:C.repository,name:C.name,version:C.version})},children:m?"Forming":"Form squadron"})]})]})}e.s(["FormSquadronDialog",0,function(e){let{isOpen:r,onOpenChange:n,isPending:s}=e;return(0,t.jsx)(i.Dialog,{open:r,onOpenChange:e=>{s||n(e)},children:(0,t.jsx)(i.DialogContent,{size:"md","data-testid":"form-squadron-dialog",className:o.dialogSurface.phoneFullScreen,children:(0,t.jsx)(f,{...e})})})}])},67551,e=>{"use strict";var t=e.i(43476),r=e.i(56420);let n={name:"arrow-right",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]};n.node;let s=(0,r.default)(n);var a=e.i(31458),i=e.i(71645),o=e.i(90063),l=e.i(66390);function d({name:e,count:r,onHover:n}){let s={onPointerEnter:()=>{n(e)},onPointerLeave:()=>{n(void 0)}};return"flagship"===e?(0,t.jsxs)(l.Badge,{variant:"kind",...s,children:[(0,t.jsx)(a.Flag,{"aria-hidden":!0}),"flagship"]}):(0,t.jsxs)(l.Badge,{variant:"type",...s,children:[e,void 0!==r&&r>1&&(0,t.jsxs)("span",{className:"text-muted-foreground",children:["×",r]})]})}e.s(["HandoffWiring",0,function({blueprint:e}){let[r,n]=(0,i.useState)(void 0),a=new Map(e.roles.map(e=>[e.name,e.count]));return(0,t.jsxs)("section",{"aria-labelledby":"handoff-wiring","data-testid":"handoff-wiring",className:"flex flex-col gap-2 rounded-lg border border-border p-3",children:[(0,t.jsxs)("div",{className:"flex items-baseline justify-between gap-2",children:[(0,t.jsx)("h2",{id:"handoff-wiring",className:"text-body font-semibold",children:"Hand-offs"}),(0,t.jsxs)("span",{className:"text-meta text-muted-foreground",children:["from blueprint ",e.name," v",e.version]})]}),0===e.handoffs.length?(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"No hand-offs. Members only hear from the flagship and from each other by name."}):(0,t.jsx)("ul",{className:"grid grid-cols-[auto_auto_1fr] items-center gap-x-4 text-meta",children:e.handoffs.map(e=>(0,t.jsxs)("li",{"data-testid":"handoff-row",className:(0,o.classNames)("col-span-3 grid grid-cols-subgrid items-center rounded-md px-1.5 py-1",void 0!==r&&(e.role===r||e.to===r)?"bg-muted":void 0),children:[(0,t.jsx)("span",{children:(0,t.jsx)(d,{name:e.role,count:a.get(e.role),onHover:n})}),(0,t.jsxs)("span",{className:"flex items-center gap-1 font-mono text-muted-foreground",children:[e.handoff,(0,t.jsx)(s,{"aria-label":"goes to",className:"size-(--size-icon-sm)"})]}),(0,t.jsx)("span",{children:(0,t.jsx)(d,{name:e.to,count:a.get(e.to),onHover:n})})]},`${e.role}.${e.handoff}`))})]})}],67551)},274,e=>{"use strict";var t=e.i(43476),r=e.i(77880),n=e.i(36779),s=e.i(15034),a=e.i(85538);e.s(["DetailLayout",0,function({title:e,parents:i,header:o,children:l,sheet:d,live:u,nav:c,onCompose:f,onSearch:m,account:h,banner:p}){return(0,t.jsxs)("div",{className:"flex min-h-dvh bg-background",children:[(0,t.jsx)(n.Sidebar,{active:c.active,inboxCount:c.inboxCount,attentionCount:c.attentionCount,needsCrewCount:c.needsCrewCount,hasSquadrons:c.hasSquadrons,hasTrierarchs:c.hasTrierarchs,trierarchsCount:c.trierarchsCount,hasSettings:c.hasSettings,...h}),(0,t.jsxs)("div",{className:"flex min-w-0 grow flex-col",children:[(0,t.jsx)(r.Header,{breadcrumb:e,parents:i,live:u,onCompose:f,onSearch:m}),p,(0,t.jsx)(a.TopBar,{title:e,live:u,back:i[i.length-1]??i[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:[o,l]})]}),d,(0,t.jsx)(s.TabBar,{active:"overview"===c.active||"needs-crew"===c.active?"fleet":"settings"===c.active?void 0:c.active,hasSquadrons:c.hasSquadrons,hasTrierarchs:c.hasTrierarchs,trierarchsCount:c.trierarchsCount,inboxCount:c.inboxCount,attentionCount:c.attentionCount})]})}])}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,52376,e=>{"use strict";e.s([],4824),e.i(4824);var t=e.i(71645),r=e.i(52245),n=e.i(33332);let s=t.createContext(void 0);function i(){let e=t.useContext(s);if(void 0===e)throw Error((0,n.default)(13));return e}let o={imageLoadingStatus:()=>null};var a=e.i(43476);let u=t.forwardRef(function(e,n){let{className:i,render:u,style:l,...c}=e,[d,f]=t.useState("idle"),h=t.useMemo(()=>({imageLoadingStatus:d,setImageLoadingStatus:f}),[d,f]),p=(0,r.useRenderElement)("span",e,{state:{imageLoadingStatus:d},ref:n,props:c,stateAttributesMapping:o});return(0,a.jsx)(s.Provider,{value:h,children:p})});var l=e.i(67865),c=e.i(46376),d=e.i(37584),f=e.i(74354),h=e.i(23910),p=e.i(56789);let g={...o,...f.transitionStatusMapping},m=t.forwardRef(function(e,n){let{className:s,render:o,onLoadingStatusChange:a,keepMounted:u=!1,style:f,sizes:m,srcSet:y,src:b,...v}=e,{setImageLoadingStatus:S}=i(),[C,E]=function(e,{referrerPolicy:r,crossOrigin:n,sizes:s,srcSet:i},o){let a=t.useState("idle"),u=a[1];return(0,c.useIsoLayoutEffect)(()=>{if(!o)return p.NOOP;if(!e&&!i)return u("error"),p.NOOP;let t=!0,a=new window.Image,l=e=>()=>{t&&u(e)};return u("loading"),a.onload=l("loaded"),a.onerror=l("error"),r&&(a.referrerPolicy=r),a.crossOrigin=n??null,s&&(a.sizes=s),i&&(a.srcset=i),e&&(a.src=e),a.complete&&u(a.naturalWidth>0?"loaded":"error"),()=>{t=!1}},[o,e,i,s,n,r,u]),a}(b,e,!u),R="loaded"===C,{mounted:k,transitionStatus:O,setMounted:P}=(0,h.useTransitionStatus)(R),x=t.useRef(null),w=t.useRef(!0);(0,c.useIsoLayoutEffect)(()=>{if(!u)return;let e=w.current;w.current=!1;let t=x.current;if(!t)return;if(!t.complete)return void E("loading");let r=t.naturalWidth>0?"loaded":"error";E(r),"loaded"===r&&e&&P(!0)},[u,b,y,m,v.crossOrigin,v.referrerPolicy,o,E,P]);let T=u?{"data-loading":"loading"===C?"":void 0,"data-error":"error"===C?"":void 0,"aria-hidden":"loaded"!==C||void 0,onLoad(){E("loaded")},onError(){E("error")}}:void 0,A=(0,l.useStableCallback)(e=>{a?.(e),S(e)});(0,c.useIsoLayoutEffect)(()=>{"idle"!==C&&A(C)},[C,A]),(0,c.useIsoLayoutEffect)(()=>()=>S("idle"),[S]),(0,d.useOpenChangeComplete)({enabled:!R,open:R,ref:x,onComplete(){R||P(!1)}});let I=u||k,M={};void 0!==m&&(M.sizes=m),void 0!==y&&(M.srcSet=y),void 0!==b&&(M.src=b);let j=(0,r.useRenderElement)("img",e,{state:{imageLoadingStatus:C,transitionStatus:u&&"ending"===O?void 0:O},ref:[n,x],props:[T,v,M],stateAttributesMapping:g,enabled:I});return I?j:null});var y=e.i(39957);let b=t.forwardRef(function(e,n){let{className:s,render:a,delay:u=0,style:l,...c}=e,{imageLoadingStatus:d}=i(),[f,h]=t.useState(0===u),p=(0,y.useTimeout)();return t.useEffect(()=>(u>0?p.start(u,()=>h(!0)):h(!0),p.clear),[p,u]),(0,r.useRenderElement)("span",e,{state:{imageLoadingStatus:d},ref:n,props:c,stateAttributesMapping:o,enabled:"loaded"!==d&&(0===u||f)})});e.s(["Fallback",0,b,"Image",0,m,"Root",0,u],14751);var v=e.i(14751);e.s(["Avatar",0,v],52376)},80862,e=>{"use strict";e.s(["endingStyle",0,"data-ending-style","startingStyle",0,"data-starting-style"])},74354,e=>{"use strict";var t=e.i(80862);let r={[t.startingStyle]:""},n={[t.endingStyle]:""};e.s(["transitionStatusMapping",0,{transitionStatus:e=>"starting"===e?r:"ending"===e?n:null}])},37584,22640,e=>{"use strict";var t=e.i(71645),r=e.i(67865),n=e.i(74080),s=e.i(8445),i=e.i(94603),o=e.i(80862);let a=null;function u(e,t=!1,l=!1){let c=(0,s.useAnimationFrame)();return(0,r.useStableCallback)((r,s=null)=>{c.cancel();let u=(0,i.resolveRef)(e);if(null==u)return;let d=()=>{if(!l)return void n.flushSync(r);if(!a){let e=[];a=e,queueMicrotask(()=>{a=null,n.flushSync(()=>{for(let t of e)t()})})}a.push(()=>{s?.aborted||r()})};if("function"!=typeof u.getAnimations||globalThis.BASE_UI_ANIMATIONS_DISABLED)return void r();function f(){Promise.all(u.getAnimations().map(e=>e.finished)).then(()=>{s?.aborted||d()},()=>{s?.aborted||(u.getAnimations().some(e=>e.pending||"finished"!==e.playState)?f():d())})}if(t){let e=o.startingStyle;if(!u.hasAttribute(e))return void c.request(f);let t=new MutationObserver(()=>{u.hasAttribute(e)||(t.disconnect(),f())});return t.observe(u,{attributes:!0,attributeFilter:[e]}),void s?.addEventListener("abort",()=>t.disconnect(),{once:!0})}c.request(f)})}e.s(["useAnimationsFinished",0,u],22640),e.s(["useOpenChangeComplete",0,function(e){let{enabled:n=!0,open:s,ref:i,batch:o=!1,onComplete:a}=e,l=(0,r.useStableCallback)(a),c=u(i,s,o);t.useEffect(()=>{if(!n)return;let e=new AbortController;return c(l,e.signal),()=>{e.abort()}},[n,s,l,c])}],37584)},23910,e=>{"use strict";var t=e.i(71645),r=e.i(46376),n=e.i(8445);e.s(["useTransitionStatus",0,function(e,s=!1,i=!1,o=!1){let[a,u]=t.useState(e&&s?"idle":void 0),[l,c]=t.useState(e&&!o);return e&&!l&&(c(!0),u("starting")),e||!l||"ending"===a||i||u("ending"),e||l||"ending"!==a||u(void 0),(0,r.useIsoLayoutEffect)(()=>{if(!e&&l&&"ending"!==a&&i){let e=n.AnimationFrame.request(()=>{u("ending")});return()=>{n.AnimationFrame.cancel(e)}}},[e,l,a,i]),(0,r.useIsoLayoutEffect)(()=>{if(!e||s)return;let t=n.AnimationFrame.request(()=>{u(void 0)});return()=>{n.AnimationFrame.cancel(t)}},[s,e]),(0,r.useIsoLayoutEffect)(()=>{if(!e||!s)return;e&&l&&"idle"!==a&&u("starting");let t=n.AnimationFrame.request(()=>{u("idle")});return()=>{n.AnimationFrame.cancel(t)}},[s,e,l,a]),{mounted:l,setMounted:c,transitionStatus:a}}])},94603,e=>{"use strict";e.s(["resolveRef",0,function(e){return null==e?e:"current"in e?e.current:e}])},8445,e=>{"use strict";e.i(47167);var t=e.i(88940),r=e.i(26300);let n=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let r=0;r<t.length;r+=1)t[r]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||(requestAnimationFrame(this.tick),this.isScheduled=!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||null!==this.callbacks[t]&&(this.callbacks[t]=null,this.callbacksCount-=1)}};class s{static create(){return new s}static request(e){return n.request(e)}static cancel(e){return n.cancel(e)}currentId=null;request(e){this.cancel(),this.currentId=n.request(()=>{this.currentId=null,e()})}cancel=()=>{null!==this.currentId&&(n.cancel(this.currentId),this.currentId=null)};disposeEffect=()=>this.cancel}e.s(["AnimationFrame",0,s,"useAnimationFrame",0,function(){let e=(0,t.useRefWithInit)(s.create).current;return(0,r.useOnMount)(e.disposeEffect),e}])},26300,e=>{"use strict";var t=e.i(71645),r=e.i(56789);e.s(["useOnMount",0,function(e){t.useEffect(e,r.EMPTY_ARRAY)}])},39957,e=>{"use strict";var t=e.i(88940),r=e.i(26300);class n{static create(){return new n}currentId=0;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=0,t()},e)}isStarted(){return 0!==this.currentId}clear=()=>{0!==this.currentId&&(clearTimeout(this.currentId),this.currentId=0)};disposeEffect=()=>this.clear}e.s(["Timeout",0,n,"useTimeout",0,function(){let e=(0,t.useRefWithInit)(n.create).current;return(0,r.useOnMount)(e.disposeEffect),e}])},49287,e=>{"use strict";var t=e.i(56420);let r={name:"ship",size:24,node:[["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 9.189V13",key:"yp40p3"}],["path",{d:"M19 12V6a2 2 0 00-2-2H7a2 2 0 00-2 2v6",key:"1wcigf"}],["path",{d:"M19.38 19A11.6 11.6 0 0021 13l-8.188-3.639a2 2 0 00-1.624 0L3 13.001a11.6 11.6 0 002.81 7.76",key:"1kdp0u"}],["path",{d:"M2 20c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"1l8w7g"}]]};r.node;let n=(0,t.default)(r);e.s(["Ship",0,n],49287)},22016,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return y},useLinkStatus:function(){return v}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let i=e.r(90809),o=e.r(43476),a=i._(e.r(71645)),u=e.r(95057),l=e.r(8372),c=e.r(18581),d=e.r(18967),f=e.r(5550),h=e.r(88540),p=e.r(91949),g=e.r(73668),m=e.r(9396);function y(t){var r;let n,s,i,[y,v]=(0,a.useOptimistic)(p.IDLE_LINK_STATUS),S=(0,a.useRef)(null),{href:C,as:E,children:R,prefetch:k=null,passHref:O,replace:P,shallow:x,scroll:w,onClick:T,onMouseEnter:A,onTouchStart:I,legacyBehavior:M=!1,onNavigate:j,transitionTypes:_,ref:N,unstable_dynamicOnHover:L,...D}=t;n=R,M&&("string"==typeof n||"number"==typeof n)&&(n=(0,o.jsx)("a",{children:n}));let q=a.default.useContext(l.AppRouterContext),F=!1!==k,Q=!1===k?"none":!0===k?"full":"auto",z="none"!==Q?"auto"===Q?m.FetchStrategy.PPR:m.FetchStrategy.Full:m.FetchStrategy.PPR,U="string"==typeof(r=E||C)?r:(0,u.formatUrl)(r);if(M){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});s=a.default.Children.only(n)}let B=M?s&&"object"==typeof s&&s.ref:N,$,H=a.default.useCallback(e=>(null!==q&&(S.current=(0,p.mountLinkInstance)(e,U,q,z,F,v,$)),()=>{S.current&&((0,p.unmountLinkForCurrentNavigation)(S.current),S.current=null),(0,p.unmountPrefetchableInstance)(e)}),[F,U,q,z,v,$]),K={ref:(0,c.useMergedRef)(H,B),onClick(t){M||"function"!=typeof T||T(t),M&&s.props&&"function"==typeof s.props.onClick&&s.props.onClick(t),!q||t.defaultPrevented||function(t,r,n,s,i,o,u,l="none"){if("u">typeof window){let c,{nodeName:d}=t.currentTarget;if("A"===d.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,g.isLocalURL)(r)){s&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),o){let e=!1;if(o({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:f}=e.r(99781);a.default.startTransition(()=>{f(r,s?"replace":"push",!1===i?h.ScrollBehavior.NoScroll:h.ScrollBehavior.Default,n.current,u,l)})}}(t,U,S,P,w,j,_,Q)},onMouseEnter(e){M||"function"!=typeof A||A(e),M&&s.props&&"function"==typeof s.props.onMouseEnter&&s.props.onMouseEnter(e),q&&F&&(0,p.onNavigationIntent)(e.currentTarget,!0===L)},onTouchStart:function(e){M||"function"!=typeof I||I(e),M&&s.props&&"function"==typeof s.props.onTouchStart&&s.props.onTouchStart(e),q&&F&&(0,p.onNavigationIntent)(e.currentTarget,!0===L)}};return(0,d.isAbsoluteUrl)(U)?K.href=U:M&&!O&&("a"!==s.type||"href"in s.props)||(K.href=(0,f.addBasePath)(U)),i=M?a.default.cloneElement(s,K):(0,o.jsx)("a",{...D,...K,children:n}),(0,o.jsx)(b.Provider,{value:y,children:i})}let b=(0,a.createContext)(p.IDLE_LINK_STATUS),v=()=>(0,a.useContext)(b);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return s}});let n=e.r(71645);function s(e,t){let r=(0,n.useRef)(null),s=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=s.current;t&&(s.current=null,t())}else e&&(r.current=i(e,n)),t&&(s.current=i(t,n))},[e,t])}function i(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18967,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return y},MiddlewareNotFoundError:function(){return C},MissingStaticPage:function(){return S},NormalizeError:function(){return b},PageNotFoundError:function(){return v},SP:function(){return g},ST:function(){return m},WEB_VITALS:function(){return i},execOnce:function(){return o},getDisplayName:function(){return d},getLocationOrigin:function(){return l},getURL:function(){return c},isAbsoluteUrl:function(){return u},isResSent:function(){return f},loadGetInitialProps:function(){return p},normalizeRepeatedSlashes:function(){return h},stringifyError:function(){return E}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let i=["CLS","FCP","FID","INP","LCP","TTFB"];function o(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let a=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,u=e=>{let t=e.charCodeAt(0);return!!(t>=65&&t<=90||t>=97&&t<=122)&&a.test(e)};function l(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function c(){let{href:e}=window.location,t=l();return e.substring(t.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function f(e){return e.finished||e.headersSent}function h(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function p(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await p(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&f(r))return n;if(!n)throw Object.defineProperty(Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return n}let g="u">typeof performance,m=g&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class y extends Error{}class b extends Error{}class v extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class S extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class C extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function E(e){return JSON.stringify({message:e.message,stack:e.stack})}},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return i}});let n=e.r(18967),s=e.r(52817);function i(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,s.hasBasePath)(r.pathname)}catch(e){return!1}}},98183,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={assign:function(){return u},searchParamsToUrlQuery:function(){return i},urlQueryToSearchParams:function(){return a}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});function i(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function o(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function a(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,o(e));else t.set(r,o(n));return t}function u(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,n]of r.entries())e.append(t,n)}return e}},95057,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return a},formatWithValidation:function(){return l},urlObjectKeys:function(){return u}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let i=e.r(90809)._(e.r(98183)),o=/https?|ftp|gopher|file/;function a(e){let{auth:t,hostname:r}=e,n=e.protocol||"",s=e.pathname||"",a=e.hash||"",u=e.query||"",l=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?l=t+e.host:r&&(l=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(l+=":"+e.port)),u&&"object"==typeof u&&(u=String(i.urlQueryToSearchParams(u)));let c=e.search||u&&`?${u}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||o.test(n))&&!1!==l?(l="//"+(l||""),s&&"/"!==s[0]&&(s="/"+s)):l||(l=""),a&&"#"!==a[0]&&(a="#"+a),c&&"?"!==c[0]&&(c="?"+c),s=s.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${l}${s}${c}${a}`}let u=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function l(e){return a(e)}},24010,e=>{"use strict";var t=e.i(43476);e.s([],58762),e.i(58762);var r=e.i(66250),n=e.i(2820),s=e.i(56736),i=e.i(9793),o=e.i(84324),a=e.i(64951),u=e.i(77173);let l=e.i(13488).DialogTrigger;var c=e.i(74217),d=e.i(25326);class f extends d.DialogHandle{}e.s(["Backdrop",()=>n.DialogBackdrop,"Close",()=>s.DialogClose,"Description",()=>i.DialogDescription,"Handle",0,f,"Popup",()=>o.DialogPopup,"Portal",()=>a.DialogPortal,"Root",0,function(e){return(0,r.useRenderDialogRoot)("alert-dialog",e)},"Title",()=>u.DialogTitle,"Trigger",0,l,"Viewport",()=>c.DialogViewport,"createHandle",0,function(){return new f}],34604);var h=e.i(34604),h=h,p=e.i(90063),g=e.i(94945);e.s(["AlertDialog",0,function(e){return(0,t.jsx)(h.Root,{"data-slot":"alert-dialog",...e})},"AlertDialogClose",0,function(e){return(0,t.jsx)(h.Close,{"data-slot":"alert-dialog-close",...e})},"AlertDialogContent",0,function({className:e,size:r,children:n,...s}){return(0,t.jsxs)(h.Portal,{children:[(0,t.jsx)(h.Backdrop,{"data-slot":"alert-dialog-overlay",className:g.dialogSurface.overlay}),(0,t.jsx)(h.Popup,{"data-slot":"alert-dialog-content",className:(0,p.classNames)(g.dialogSurface.popup({size:r}),e),...s,children:n})]})},"AlertDialogDescription",0,function({className:e,...r}){return(0,t.jsx)(h.Description,{"data-slot":"alert-dialog-description",className:(0,p.classNames)(g.dialogSurface.description,e),...r})},"AlertDialogFooter",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,p.classNames)(g.dialogSurface.footer,e),...r})},"AlertDialogHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,p.classNames)(g.dialogSurface.header,e),...r})},"AlertDialogTitle",0,function({className:e,...r}){return(0,t.jsx)(h.Title,{"data-slot":"alert-dialog-title",className:(0,p.classNames)(g.dialogSurface.title,e),...r})}],24010)},94859,26478,e=>{"use strict";var t=e.i(43476),r=e.i(52376),n=e.i(25913),s=e.i(49287),i=e.i(56420);let o={name:"user-round",size:24,node:[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],aliases:["user-2"]};o.node;let a=(0,i.default)(o);e.s(["UserRound",0,a],26478);var u=e.i(90063);let l=(0,n.cva)("inline-flex shrink-0 items-center justify-center overflow-hidden font-semibold uppercase select-none",{variants:{kind:{app:"rounded-sm bg-primary text-primary-foreground",account:"rounded-full bg-secondary font-sans text-foreground",ship:"rounded-sm bg-secondary font-mono text-foreground",argo:"rounded-sm bg-highlight text-primary",retired:"rounded-sm border border-dashed border-input font-mono font-medium text-muted-foreground"},size:{20:"size-5 text-micro [&_svg]:size-3",28:"size-7 text-micro [&_svg]:size-(--size-icon-sm)",36:"size-9 text-caption [&_svg]:size-(--size-icon)"}},defaultVariants:{kind:"ship",size:28}});e.s(["Avatar",0,function({kind:e="ship",size:n,name:i="",className:o}){let c=e??"ship";return(0,t.jsx)(r.Avatar.Root,{"aria-hidden":!0,"data-slot":"avatar",className:(0,u.classNames)(l({kind:e,size:n}),o),children:(0,t.jsx)(r.Avatar.Fallback,{children:"app"===c?(0,t.jsx)(s.Ship,{"aria-hidden":!0}):"argo"===c?(0,t.jsx)(a,{"aria-hidden":!0}):i.replaceAll("-","").slice(0,2)})})}],94859)},61966,8734,e=>{"use strict";var t=e.i(43476),r=e.i(89664),n=e.i(56420);let s={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]};s.node;let i=(0,n.default)(s);e.s(["Copy",0,i],8734);var o=e.i(71645),a=e.i(15905);e.s(["CopyButton",0,function({value:e,label:n,size:s="xs",isLabeled:u=!1,onCopied:l,onCopyFailed:c,className:d,"data-testid":f}){let[h,p]=(0,o.useState)(!1);async function g(){try{await navigator.clipboard.writeText(e)}catch{c?.();return}p(!0),l?.(),setTimeout(()=>{p(!1)},1500)}return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.Button,{variant:"ghost",size:s,isIconOnly:!u,"aria-label":n,title:u?void 0:n,icon:h?(0,t.jsx)(r.Check,{"aria-hidden":!0}):(0,t.jsx)(i,{"aria-hidden":!0}),className:d,"data-testid":f,onClick:()=>{g()},children:u?h?"Copied":"Copy":null}),(0,t.jsx)("span",{role:"status",className:"sr-only",children:h?"Copied.":""})]})}],61966)},66616,e=>{"use strict";let t={"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 r(e){return t[e]?.word??e}e.s(["crewLineHarnessWord",0,function(e){return"chat"===e?"Chat":r(e)},"harnessKind",0,function(e){return t[e]?.kind},"harnessWord",0,r])},53573,e=>{"use strict";e.i(31627);var t=e.i(83615),r=e.i(19273),n=e.i(12598),s=e.i(81384),i=e.i(73664),o=e.i(27001),a=e.i(54440),u=e.i(71645),l=e.i(15823),c=e.i(40143),d=e.i(69230);function f(e,t){let r=new Set(t);return e.filter(e=>!r.has(e))}var h=class extends l.Subscribable{#e;#t;#r;#n;#s;#i;#o;#a;#u;#l=[];constructor(e,t,r){super(),this.#e=e,this.#n=r,this.#r=[],this.#s=[],this.#t=[],this.setQueries(t)}onSubscribe(){1===this.listeners.size&&this.#s.forEach(e=>{e.subscribe(t=>{this.#c(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#s.forEach(e=>{e.destroy()})}setQueries(e,t){this.#r=e,this.#n=t,c.notifyManager.batch(()=>{let e=this.#s,t=this.#d(this.#r);t.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions));let n=t.map(e=>e.observer),s=n.map(e=>e.getCurrentResult()),i=e.length!==n.length,o=n.some((t,r)=>t!==e[r]),a=i||o,u=!!a||s.some((e,t)=>{let n=this.#t[t];return!n||!(0,r.shallowEqualObjects)(e,n)});(a||u)&&(a&&(this.#l=t,this.#s=n),this.#t=s,this.hasListeners()&&(a&&(f(e,n).forEach(e=>{e.destroy()}),f(n,e).forEach(e=>{e.subscribe(t=>{this.#c(e,t)})})),this.#f()))})}getCurrentResult(){return this.#t}getQueries(){return this.#s.map(e=>e.getCurrentQuery())}getObservers(){return this.#s}getOptimisticResult(e,t){let r=this.#d(e),n=r.map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions)),s=r.map(e=>e.defaultedQueryOptions.queryHash);return[n,e=>this.#h(e??n,t,s),()=>this.#p(n,r)]}#p(e,t){let r=new Set;return t.map((n,s)=>{let i=e[s];return n.defaultedQueryOptions.notifyOnChangeProps?i:n.observer.trackResult(i,e=>{r.has(e)||(r.add(e),t.forEach(t=>{t.observer.trackProp(e)}))})})}#h(e,t,n){if(t){let s=this.#u,i=void 0!==n&&void 0!==s&&(s.length!==n.length||n.some((e,t)=>e!==s[t]));return(this.#t!==this.#a||i||t!==this.#o)&&(this.#o=t,this.#a=this.#t,void 0!==n&&(this.#u=n),this.#i=(0,r.replaceEqualDeep)(this.#i,t(e))),this.#i}return e}#g(){return!this.#n?.combine||this.#s.some((e,t)=>e.options.suspense&&this.#t[t]?.data===void 0)}#d(e){let t=new Map;this.#s.forEach(e=>{let r=e.options.queryHash;if(!r)return;let n=t.get(r);n?n.push(e):t.set(r,[e])});let r=[];return e.forEach(e=>{let n=this.#e.defaultQueryOptions(e),s=t.get(n.queryHash)?.shift()??new d.QueryObserver(this.#e,n);r.push({defaultedQueryOptions:n,observer:s})}),r}#c(e,t){let r=this.#s.indexOf(e);-1!==r&&(this.#t=this.#t.slice(),this.#t[r]=t,this.#f())}#f(){if(this.hasListeners()){let e=this.#g(),t=this.#i,r=e?t:this.#h(this.#p(this.#t,this.#l),this.#n?.combine);(e||t!==r)&&c.notifyManager.batch(()=>{this.listeners.forEach(e=>{e(this.#t)})})}}},p=e.i(66027),g=e.i(5387),m=e.i(27702);e.s(["useMessage",0,function(e){let t=(0,m.useTRPC)();return(0,p.useQuery)(t.fleet.message.queryOptions(void 0===e?r.skipToken:{messageId:e}))},"useShip",0,function(e){let t=(0,m.useTRPC)();return(0,p.useQuery)(t.fleet.ship.queryOptions(void 0===e?r.skipToken:{shipId:e},{refetchInterval:g.LAST_SEEN_REFRESH_MS}))},"useShipMessages",0,function(e){let t=(0,m.useTRPC)();return(0,p.useQuery)(t.fleet.shipMessages.queryOptions({shipId:e}))},"useShipTimeline",0,function(e){let t=(0,m.useTRPC)();return(0,p.useQuery)(t.fleet.shipTimeline.queryOptions({shipId:e}))},"useShips",0,function(e){let l=(0,m.useTRPC)(),f=function({queries:e,...t}){let l=(0,n.useQueryClient)(void 0),f=(0,s.useIsRestoring)(),p=(0,i.useQueryErrorResetBoundary)(),g=!1!==t.subscribed,m=u.useMemo(()=>e.map(e=>{let t=l.defaultQueryOptions(e);return t._optimisticResults=f?"isRestoring":g?"optimistic":void 0,t}),[e,l,f,g]);m.forEach(e=>{(0,a.ensureSuspenseTimers)(e);let t=l.getQueryCache().get(e.queryHash);(0,o.ensurePreventErrorBoundaryRetry)(e,p,t)}),(0,o.useClearResetErrorBoundary)(p);let[y]=u.useState(()=>new h(l,m,t)),[b,v,S]=y.getOptimisticResult(m,t.combine),C=!f&&g;u.useSyncExternalStore(u.useCallback(e=>C?y.subscribe(c.notifyManager.batchCalls(e)):r.noop,[y,C]),()=>y.getCurrentResult(),()=>y.getCurrentResult()),u.useEffect(()=>{y.setQueries(m,t)},[m,t,y]);let E=b.some((e,t)=>(0,a.shouldSuspend)(m[t],e))?b.flatMap((e,t)=>{let r=m[t];if(r&&(0,a.shouldSuspend)(r,e)){let e=new d.QueryObserver(l,r);return(0,a.fetchOptimistic)(r,e,p)}return[]}):[];if(E.length>0)throw Promise.all(E);let R=b.find((e,t)=>{let r=m[t];return r&&(0,o.getHasError)({result:e,errorResetBoundary:p,throwOnError:r.throwOnError,query:l.getQueryCache().get(r.queryHash),suspense:r.suspense})});if(R)throw R.error;return v(S())}({queries:e.flatMap(e=>{let r=(0,t.idSchema)("ship").safeParse(e);return r.success?[r.data]:[]}).map(e=>l.fleet.ship.queryOptions({shipId:e},{refetchInterval:g.LAST_SEEN_REFRESH_MS}))}),p=new Map;for(let e of f)e.data&&p.set(e.data.id,e.data);return p}],53573)}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,29870,e=>{"use strict";var s=e.i(56420);let t={name:"lock",size:24,node:[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]};t.node;let n=(0,s.default)(t);e.s(["Lock",0,n],29870)},18006,e=>{"use strict";var s=e.i(43476),t=e.i(18566),n=e.i(71645),a=e.i(67874),i=e.i(17981),r=e.i(33939),l=e.i(88393),o=e.i(44824),d=e.i(45608),c=e.i(95475),m=e.i(2767),x=e.i(77913),p=e.i(26091),h=e.i(56420);let u={name:"git-commit-horizontal",size:24,node:[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]],aliases:["git-commit"]};u.node;let f=(0,h.default)(u);var g=e.i(29870),j=e.i(22016),v=e.i(49635),N=e.i(84294),b=e.i(66390),y=e.i(91703),C=e.i(46033);function S({template:e,version:t,onVersionChange:n,blueprints:a}){var i;let r=e.versions.find(e=>e.version===t)??e.versions[0];if(!r)return null;let l=e.versions[0]?.version,o=`${r.name}@${String(r.version)}`,d=Object.fromEntries(e.versions.map(e=>[String(e.version),`v${String(e.version)}${e.version===l?" (latest)":""}`])),c=(0,N.blueprintsUsing)(a,r);return(0,s.jsxs)("div",{"data-testid":"template-view",className:"flex flex-col gap-5",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsx)(b.Badge,{variant:"secondary",children:"Template"}),(0,s.jsxs)(C.Select,{items:d,value:String(r.version),onValueChange:e=>{n(Number(e))},children:[(0,s.jsxs)(C.SelectTrigger,{"aria-label":"Version","data-testid":"template-version",children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"Version"}),(0,s.jsx)(C.SelectValue,{className:"font-medium"})]}),(0,s.jsx)(C.SelectContent,{children:Object.entries(d).map(([e,t])=>(0,s.jsx)(C.SelectItem,{value:e,children:t},e))})]}),(0,s.jsxs)("span",{"data-testid":"template-source",className:"flex items-center gap-1 text-meta text-muted-foreground",children:[(0,s.jsx)(f,{"aria-hidden":!0,className:"size-(--size-icon-sm)"}),(0,s.jsx)("span",{className:"font-mono",children:r.file})," at ",(0,s.jsx)("span",{className:"font-mono",children:r.commit.slice(0,7)}),", ",(0,v.dayDate)(new Date(r.committedAt))]})]}),(0,s.jsxs)("p",{className:"flex items-center gap-2 rounded-md bg-muted px-3 py-2 text-meta text-muted-foreground",children:[(0,s.jsx)(g.Lock,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),"Read-only. Templates are edited in git; new tags show up here as new versions."]}),(0,s.jsxs)("div",{className:"grid gap-5 lg:grid-cols-[minmax(0,2fr)_minmax(0,1fr)]",children:[(0,s.jsxs)("section",{"aria-labelledby":"template-charter",className:"flex flex-col gap-2",children:[(0,s.jsx)("h2",{id:"template-charter",className:"text-body font-semibold",children:"Charter"}),(0,s.jsx)(y.CodeBlock,{label:`Charter \xb7 ${o}`,code:r.charter,isWrapped:!0,codeTestId:"template-charter-text"})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,s.jsxs)("section",{"aria-label":"Check-in and launch",className:"flex flex-col gap-3 rounded-lg border border-border p-3 text-meta",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"Check-in interval"}),(0,s.jsx)("span",{className:"font-medium","data-testid":"template-check-in",children:(i=(0,N.checkInText)(r.checkInMinutes),`${i.charAt(0).toUpperCase()}${i.slice(1)}`)}),(0,s.jsxs)("span",{className:"text-muted-foreground",children:[(0,N.thresholdsText)(r.checkInMinutes),"."]})]}),null!==r.model&&(0,s.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"Model"}),(0,s.jsx)("span",{className:"font-mono",children:r.model})]}),null!==r.launchNote&&(0,s.jsxs)("div",{className:"flex items-start gap-2 rounded-md bg-muted px-3 py-2",children:[(0,s.jsx)(p.FileText,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0 text-muted-foreground"}),(0,s.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,s.jsxs)("span",{className:"text-muted-foreground",children:["Launch note · ",o]}),(0,s.jsx)("span",{children:r.launchNote})]})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"Used by"}),0===c.length?(0,s.jsx)("span",{className:"text-muted-foreground",children:"No blueprint uses this version."}):(0,s.jsx)("span",{className:"flex flex-wrap gap-1.5",children:c.map(e=>(0,s.jsxs)(b.Badge,{variant:"type",render:(0,s.jsx)(j.default,{href:(0,N.blueprintPath)(e)}),children:[(0,s.jsx)(x.DraftingCompass,{"aria-hidden":!0}),e.name," v",e.version]},`${e.repository}#${e.name}@${String(e.version)}`))})]})]}),(0,s.jsxs)("section",{"aria-labelledby":"template-handoffs",className:"flex flex-col gap-2",children:[(0,s.jsx)("h2",{id:"template-handoffs",className:"text-body font-semibold",children:"Hand-offs"}),0===r.handoffs.length?(0,s.jsx)("p",{className:"text-meta text-muted-foreground",children:"None: its charter hands nothing to other roles."}):(0,s.jsx)("ul",{className:"flex flex-col gap-1.5 rounded-lg border border-border p-3 text-meta",children:r.handoffs.map(e=>(0,s.jsxs)("li",{"data-testid":"template-handoff",className:"flex flex-wrap items-baseline gap-2",children:[(0,s.jsx)("span",{className:"font-mono",children:e.name}),(0,s.jsx)("span",{className:"text-muted-foreground",children:e.carries})]},e.name))})]}),(0,s.jsxs)("section",{"aria-labelledby":"template-versions",className:"flex flex-col gap-2",children:[(0,s.jsx)("h2",{id:"template-versions",className:"text-body font-semibold",children:"Versions"}),(0,s.jsx)("ul",{className:"divide-y divide-border overflow-hidden rounded-lg border border-border",children:e.versions.map(e=>{let t=(0,N.blueprintsUsing)(a,e);return(0,s.jsxs)("li",{className:"flex gap-3 px-3 py-2 text-meta",children:[(0,s.jsxs)("span",{className:"font-medium",children:["v",e.version]}),(0,s.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,s.jsxs)("span",{className:"flex items-center gap-2",children:[e.description,e.version===l&&(0,s.jsx)(b.Badge,{variant:"secondary",children:"Latest"})]}),(0,s.jsxs)("span",{className:"text-muted-foreground",children:[(0,v.dayMonth)(new Date(e.committedAt))," · ",(0,s.jsx)("span",{className:"font-mono",children:e.commit.slice(0,7)}),t.length>0&&` \xb7 ${t.map(e=>`${e.name} v${String(e.version)}`).join(", ")}`]})]})]},e.version)})})]})]})]})]})}var k=e.i(274),w=e.i(90262),$=e.i(88721),T=e.i(86413),q=e.i(18423),z=e.i(28459),O=e.i(96676),A=e.i(78485),I=e.i(86165),B=e.i(48695),L=e.i(3979);e.s(["default",0,function({params:e,searchParams:x}){let p=decodeURIComponent((0,n.use)(e).name),h=(0,n.use)(x),u=(0,t.useRouter)(),f=(0,O.useNow)(),g=(0,$.useAccountMenu)(f),j=(0,T.useOpenInboxCount)(),v=(0,z.useNeedsAttention)(),b=(0,z.useAttentionCount)(),y=(0,q.useLiveFleet)(),C=(0,B.useCatalogue)(),M=(0,I.useSquadronsConnection)(),U=(0,w.useAccess)(),V=(0,L.usePluginNav)(),[E,R]=(0,n.useState)(!1),[D,P]=(0,n.useState)(!1);(0,A.useSignInWhenSessionEnds)([v.error,y.error]);let F=(0,N.templateChoices)(C.data??{templates:[]}).find(e=>e.name===p&&(void 0===h.repository||e.repository===h.repository)),K=Number(h.version??F?.versions[0]?.version);return(0,s.jsxs)(k.DetailLayout,{title:p,parents:[{href:"/squadrons",label:"Squadrons"},{href:"/squadrons?tab=templates",label:"Templates"}],header:(0,s.jsx)("h1",{className:"text-title font-semibold",children:p}),live:y.live,nav:{active:"squadrons",inboxCount:j,attentionCount:b,...V},onCompose:U.canSend?()=>{R(!0)}:void 0,onSearch:()=>{P(!0)},account:g,banner:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(m.ConsoleNotices,{}),(0,s.jsx)(c.ConsoleGuide,{})]}),children:["not-connected"===M?(0,s.jsx)(r.SquadronsNotConnected,{}):C.isError?(0,s.jsx)(i.InlineError,{title:"Couldn’t read the template",description:"The squadron manager couldn’t read the catalogue. Members using it keep working.",detail:C.error.message,onRetry:()=>{C.refetch()}}):C.data?F?(0,s.jsx)(S,{template:F,version:K,onVersionChange:e=>{u.replace((0,N.templatePath)({repository:F.repository,name:F.name,version:e}))},blueprints:C.data.blueprints}):(0,s.jsx)(a.EmptyState,{title:"No such template",description:`git holds no template ${p}.`}):(0,s.jsx)(l.LoadingSkeleton,{variant:"detail",label:"Loading the template"}),(0,s.jsx)(o.ComposeMessage,{isOpen:E,onOpenChange:R}),(0,s.jsx)(d.ConsoleCommands,{isOpen:D,onOpenChange:P,onCompose:()=>{R(!0)}})]})}],18006)},33939,e=>{"use strict";var s=e.i(43476),t=e.i(94831),n=e.i(22016),a=e.i(15905),i=e.i(67874);e.s(["SquadronsNotConnected",0,function(){return(0,s.jsx)(i.EmptyState,{icon:(0,s.jsx)(t.Unplug,{"aria-hidden":!0}),title:"Squadrons is not connected",description:"Connect it in Settings; squadrons, blueprints and templates show up here then.",action:(0,s.jsx)(a.Button,{nativeButton:!1,render:(0,s.jsx)(n.default,{href:"/settings"}),"data-testid":"squadrons-open-settings",children:"Open Settings"})})}])}]);