@aeolus-fleet/console 0.30.0 → 0.31.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 (190) hide show
  1. package/.next/standalone/packages/console/.next/BUILD_ID +1 -1
  2. package/.next/standalone/packages/console/.next/build-manifest.json +3 -3
  3. package/.next/standalone/packages/console/.next/node_modules/import-in-the-middle-ac114f323ad7e863/index.js +221 -0
  4. package/.next/standalone/packages/console/.next/node_modules/import-in-the-middle-ac114f323ad7e863/lib/register.js +285 -0
  5. package/.next/standalone/packages/console/.next/node_modules/import-in-the-middle-ac114f323ad7e863/package.json +66 -0
  6. package/.next/standalone/packages/console/.next/node_modules/require-in-the-middle-2ca7b9c2766f317e/index.js +333 -0
  7. package/.next/standalone/packages/console/.next/node_modules/require-in-the-middle-2ca7b9c2766f317e/package.json +57 -0
  8. package/.next/standalone/packages/console/.next/prerender-manifest.json +3 -3
  9. package/.next/standalone/packages/console/.next/server/app/(console)/fleet-health/[cause]/page/server-reference-manifest.json +14 -14
  10. package/.next/standalone/packages/console/.next/server/app/(console)/fleet-health/[cause]/page.js.nft.json +1 -1
  11. package/.next/standalone/packages/console/.next/server/app/(console)/fleet-health/[cause]/page_client-reference-manifest.js +1 -1
  12. package/.next/standalone/packages/console/.next/server/app/(console)/fleet-health/page/server-reference-manifest.json +14 -14
  13. package/.next/standalone/packages/console/.next/server/app/(console)/fleet-health/page.js.nft.json +1 -1
  14. package/.next/standalone/packages/console/.next/server/app/(console)/fleet-health/page_client-reference-manifest.js +1 -1
  15. package/.next/standalone/packages/console/.next/server/app/(console)/inbox/page/server-reference-manifest.json +14 -14
  16. package/.next/standalone/packages/console/.next/server/app/(console)/inbox/page.js.nft.json +1 -1
  17. package/.next/standalone/packages/console/.next/server/app/(console)/inbox/page_client-reference-manifest.js +1 -1
  18. package/.next/standalone/packages/console/.next/server/app/(console)/labels/page/server-reference-manifest.json +14 -14
  19. package/.next/standalone/packages/console/.next/server/app/(console)/labels/page.js.nft.json +1 -1
  20. package/.next/standalone/packages/console/.next/server/app/(console)/labels/page_client-reference-manifest.js +1 -1
  21. package/.next/standalone/packages/console/.next/server/app/(console)/needs-attention/page/server-reference-manifest.json +14 -14
  22. package/.next/standalone/packages/console/.next/server/app/(console)/needs-attention/page.js.nft.json +1 -1
  23. package/.next/standalone/packages/console/.next/server/app/(console)/needs-attention/page_client-reference-manifest.js +1 -1
  24. package/.next/standalone/packages/console/.next/server/app/(console)/needs-crew/page/server-reference-manifest.json +14 -14
  25. package/.next/standalone/packages/console/.next/server/app/(console)/needs-crew/page.js.nft.json +1 -1
  26. package/.next/standalone/packages/console/.next/server/app/(console)/needs-crew/page_client-reference-manifest.js +1 -1
  27. package/.next/standalone/packages/console/.next/server/app/(console)/network/page/server-reference-manifest.json +14 -14
  28. package/.next/standalone/packages/console/.next/server/app/(console)/network/page.js.nft.json +1 -1
  29. package/.next/standalone/packages/console/.next/server/app/(console)/network/page_client-reference-manifest.js +1 -1
  30. package/.next/standalone/packages/console/.next/server/app/(console)/page/react-loadable-manifest.json +2 -2
  31. package/.next/standalone/packages/console/.next/server/app/(console)/page/server-reference-manifest.json +14 -14
  32. package/.next/standalone/packages/console/.next/server/app/(console)/page.js.nft.json +1 -1
  33. package/.next/standalone/packages/console/.next/server/app/(console)/page_client-reference-manifest.js +1 -1
  34. package/.next/standalone/packages/console/.next/server/app/(console)/settings/page/server-reference-manifest.json +14 -14
  35. package/.next/standalone/packages/console/.next/server/app/(console)/settings/page.js.nft.json +1 -1
  36. package/.next/standalone/packages/console/.next/server/app/(console)/settings/page_client-reference-manifest.js +1 -1
  37. package/.next/standalone/packages/console/.next/server/app/(console)/ships/[shipId]/page/react-loadable-manifest.json +1 -1
  38. package/.next/standalone/packages/console/.next/server/app/(console)/ships/[shipId]/page/server-reference-manifest.json +14 -14
  39. package/.next/standalone/packages/console/.next/server/app/(console)/ships/[shipId]/page.js.nft.json +1 -1
  40. package/.next/standalone/packages/console/.next/server/app/(console)/ships/[shipId]/page_client-reference-manifest.js +1 -1
  41. package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/[squadronId]/page/server-reference-manifest.json +14 -14
  42. package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/[squadronId]/page.js.nft.json +1 -1
  43. package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/[squadronId]/page_client-reference-manifest.js +1 -1
  44. package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/blueprints/[name]/page/react-loadable-manifest.json +2 -2
  45. package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/blueprints/[name]/page/server-reference-manifest.json +14 -14
  46. package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/blueprints/[name]/page.js.nft.json +1 -1
  47. package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/blueprints/[name]/page_client-reference-manifest.js +1 -1
  48. package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/page/react-loadable-manifest.json +2 -2
  49. package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/page/server-reference-manifest.json +14 -14
  50. package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/page.js.nft.json +1 -1
  51. package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/page_client-reference-manifest.js +1 -1
  52. package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/templates/[name]/page/server-reference-manifest.json +14 -14
  53. package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/templates/[name]/page.js.nft.json +1 -1
  54. package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/templates/[name]/page_client-reference-manifest.js +1 -1
  55. package/.next/standalone/packages/console/.next/server/app/(console)/trierarchs/[shipId]/page/server-reference-manifest.json +14 -14
  56. package/.next/standalone/packages/console/.next/server/app/(console)/trierarchs/[shipId]/page.js.nft.json +1 -1
  57. package/.next/standalone/packages/console/.next/server/app/(console)/trierarchs/[shipId]/page_client-reference-manifest.js +1 -1
  58. package/.next/standalone/packages/console/.next/server/app/(console)/trierarchs/page/server-reference-manifest.json +14 -14
  59. package/.next/standalone/packages/console/.next/server/app/(console)/trierarchs/page.js.nft.json +1 -1
  60. package/.next/standalone/packages/console/.next/server/app/(console)/trierarchs/page_client-reference-manifest.js +1 -1
  61. package/.next/standalone/packages/console/.next/server/app/_global-error.html +1 -1
  62. package/.next/standalone/packages/console/.next/server/app/_global-error.rsc +1 -1
  63. package/.next/standalone/packages/console/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  64. package/.next/standalone/packages/console/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  65. package/.next/standalone/packages/console/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  66. package/.next/standalone/packages/console/.next/server/app/_not-found/page.js.nft.json +1 -1
  67. package/.next/standalone/packages/console/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  68. package/.next/standalone/packages/console/.next/server/app/api/reads/[read]/route.js.nft.json +1 -1
  69. package/.next/standalone/packages/console/.next/server/app/sign-in/argo/confirm/page.js.nft.json +1 -1
  70. package/.next/standalone/packages/console/.next/server/app/sign-in/argo/confirm/page_client-reference-manifest.js +1 -1
  71. package/.next/standalone/packages/console/.next/server/app/sign-in/argo/out/route.js.nft.json +1 -1
  72. package/.next/standalone/packages/console/.next/server/app/sign-in/argo/refused/page.js.nft.json +1 -1
  73. package/.next/standalone/packages/console/.next/server/app/sign-in/argo/refused/page_client-reference-manifest.js +1 -1
  74. package/.next/standalone/packages/console/.next/server/app/sign-in/argo/route.js.nft.json +1 -1
  75. package/.next/standalone/packages/console/.next/server/app/sign-in/failed/page.js.nft.json +1 -1
  76. package/.next/standalone/packages/console/.next/server/app/sign-in/failed/page_client-reference-manifest.js +1 -1
  77. package/.next/standalone/packages/console/.next/server/app/sign-in/no-rights/page.js.nft.json +1 -1
  78. package/.next/standalone/packages/console/.next/server/app/sign-in/no-rights/page_client-reference-manifest.js +1 -1
  79. package/.next/standalone/packages/console/.next/server/app/sign-in/nothing-to-manage/page.js.nft.json +1 -1
  80. package/.next/standalone/packages/console/.next/server/app/sign-in/nothing-to-manage/page_client-reference-manifest.js +1 -1
  81. package/.next/standalone/packages/console/.next/server/app/sign-in/page.js.nft.json +1 -1
  82. package/.next/standalone/packages/console/.next/server/app/sign-in/page_client-reference-manifest.js +1 -1
  83. package/.next/standalone/packages/console/.next/server/app/sign-in/unreachable/page.js.nft.json +1 -1
  84. package/.next/standalone/packages/console/.next/server/app/sign-in/unreachable/page_client-reference-manifest.js +1 -1
  85. package/.next/standalone/packages/console/.next/server/app/version/route.js.nft.json +1 -1
  86. package/.next/standalone/packages/console/.next/server/chunks/[root-of-the-server]__0-b_d8j._.js +1 -1
  87. package/.next/standalone/packages/console/.next/server/chunks/[root-of-the-server]__0w4s32w._.js +1 -1
  88. package/.next/standalone/packages/console/.next/server/chunks/[root-of-the-server]__1c0qgbj._.js +1 -1
  89. package/.next/standalone/packages/console/.next/server/chunks/_1uqphll._.js +1 -1
  90. package/.next/standalone/packages/console/.next/server/chunks/ssr/{_1wqk91b._.js → _022r12n._.js} +1 -1
  91. package/.next/standalone/packages/console/.next/server/chunks/ssr/_02sf-6u._.js +1 -1
  92. package/.next/standalone/packages/console/.next/server/chunks/ssr/{_0bzikib._.js → _05noh6w._.js} +2 -2
  93. package/.next/standalone/packages/console/.next/server/chunks/ssr/_07_cqry._.js +1 -1
  94. package/.next/standalone/packages/console/.next/server/chunks/ssr/_0bdsmu0._.js +1 -1
  95. package/.next/standalone/packages/console/.next/server/chunks/ssr/{_1eaafw1._.js → _0is0iyt._.js} +2 -2
  96. package/.next/standalone/packages/console/.next/server/chunks/ssr/_0j-afyt._.js +3 -0
  97. package/.next/standalone/packages/console/.next/server/chunks/ssr/_0nbjb5h._.js +1 -1
  98. package/.next/standalone/packages/console/.next/server/chunks/ssr/_0qux6-9._.js +1 -1
  99. package/.next/standalone/packages/console/.next/server/chunks/ssr/{_0vw3hp0._.js → _0sravq5._.js} +2 -2
  100. package/.next/standalone/packages/console/.next/server/chunks/ssr/_14ww2ld._.js +1 -1
  101. package/.next/standalone/packages/console/.next/server/chunks/ssr/_15whprd._.js +3 -0
  102. package/.next/standalone/packages/console/.next/server/chunks/ssr/_1bc8get._.js +1 -1
  103. package/.next/standalone/packages/console/.next/server/chunks/ssr/_1bmxy9n._.js +3 -0
  104. package/.next/standalone/packages/console/.next/server/chunks/ssr/_1e2tdd6._.js +1 -1
  105. package/.next/standalone/packages/console/.next/server/chunks/ssr/_1fthxzz._.js +3 -0
  106. package/.next/standalone/packages/console/.next/server/chunks/ssr/_1hsu1v2._.js +1 -1
  107. package/.next/standalone/packages/console/.next/server/chunks/ssr/_1u0h4gj._.js +1 -1
  108. package/.next/standalone/packages/console/.next/server/chunks/ssr/{_0bzwxa5._.js → _1vleg6y._.js} +1 -1
  109. package/.next/standalone/packages/console/.next/server/chunks/ssr/_1ymusis._.js +1 -1
  110. package/.next/standalone/packages/console/.next/server/chunks/ssr/_20j7vun._.js +1 -1
  111. package/.next/standalone/packages/console/.next/server/chunks/ssr/node_modules_zod_v4_classic_external_15fmmz3.js +1 -1
  112. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_03-f8b4._.js +1 -1
  113. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_10js6wa._.js +1 -1
  114. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_00qg_s6._.js +1 -1
  115. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_02v53na._.js +1 -1
  116. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_02wkudy._.js +1 -1
  117. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_04rox65._.js +1 -1
  118. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_05zitd2._.js +1 -1
  119. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_065nea1._.js +1 -1
  120. package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_11tdbkt._.js → packages_console_0d8_fed._.js} +1 -1
  121. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_0h_376h._.js +1 -1
  122. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_0ko_ogs._.js +1 -1
  123. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_0sr2-oa._.js +1 -1
  124. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_0ysbad7._.js +1 -1
  125. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_108sez2._.js +1 -1
  126. package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_1pyirkn._.js → packages_console_11f_j7c._.js} +1 -1
  127. package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_1pslvww._.js → packages_console_16ys_pd._.js} +1 -1
  128. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_1jy5-0g._.js +1 -1
  129. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_1n8w8x0._.js +1 -1
  130. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_1oz8iu7._.js +1 -1
  131. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_1rdu3gt._.js +1 -1
  132. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_1yfimad._.js +1 -1
  133. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_app_(console)_fleet-health_page_tsx_0vcosw1._.js +1 -1
  134. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_app_(console)_network_network-page_tsx_0qc3h-9._.js +1 -1
  135. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_app_(console)_ships_[shipId]_ship-page_tsx_0oahz0r._.js +1 -1
  136. package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_components_organisms_crew-line-dialog_tsx_03yc7m2._.js → packages_console_components_organisms_crew-line-dialog_tsx_1l818ht._.js} +1 -1
  137. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_features_ship_ui_organisms_message-sheet_tsx_08bg9ly._.js +1 -1
  138. package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_features_squadrons_organisms_form-squadron-dialog_tsx_080dycl._.js → packages_console_features_squadrons_organisms_form-squadron-dialog_tsx_06m8azk._.js} +1 -1
  139. package/.next/standalone/packages/console/.next/server/middleware-build-manifest.js +3 -3
  140. package/.next/standalone/packages/console/.next/server/pages/500.html +1 -1
  141. package/.next/standalone/packages/console/.next/server/server-reference-manifest.js +1 -1
  142. package/.next/standalone/packages/console/.next/server/server-reference-manifest.json +15 -15
  143. package/.next/standalone/packages/console/.next/static/chunks/0_3x64wrf-bcc.js +1 -0
  144. package/.next/standalone/packages/console/.next/static/chunks/{3v8kvo897cw7g.js → 0kcev3l5eyvux.js} +1 -1
  145. package/.next/standalone/packages/console/.next/static/chunks/{09i8egz-ukq1h.js → 19h1iu002omr_.js} +1 -1
  146. package/.next/standalone/packages/console/.next/static/chunks/{23rmynijvqsdw.js → 1b36z114mad41.js} +1 -1
  147. package/.next/standalone/packages/console/.next/static/chunks/1odi-st5n0w9h.js +1 -0
  148. package/.next/standalone/packages/console/.next/static/chunks/{1z-37z24uifp1.js → 1sm_yeexx288v.js} +1 -1
  149. package/.next/standalone/packages/console/.next/static/chunks/{26lqmfd6v4qb4.js → 1tjv8rgwrbbg_.js} +1 -1
  150. package/.next/standalone/packages/console/.next/static/chunks/{0tzezbiiera4t.js → 1u5mjrw1qk334.js} +1 -1
  151. package/.next/standalone/packages/console/.next/static/chunks/{1q730nbf90lr2.js → 1z1jqbwrruy4-.js} +1 -1
  152. package/.next/standalone/packages/console/.next/static/chunks/{1dwd950z6uq3v.js → 1z9u9wh2b5l6y.js} +1 -1
  153. package/.next/standalone/packages/console/.next/static/chunks/21xp9ny7yw3ug.js +1 -0
  154. package/.next/standalone/packages/console/.next/static/chunks/{2pkfao79haew9.js → 24yl55yxkaeaf.js} +1 -1
  155. package/.next/standalone/packages/console/.next/static/chunks/27qi3k10y-0hf.js +2 -0
  156. package/.next/standalone/packages/console/.next/static/chunks/2_qyhoh1hlhcy.js +1 -0
  157. package/.next/standalone/packages/console/.next/static/chunks/{0742dltqxo7l5.js → 2bid6ecbjoe6s.js} +1 -1
  158. package/.next/standalone/packages/console/.next/static/chunks/{0b8-il10o0ca2.js → 2bqxl5_u1hjjb.js} +1 -1
  159. package/.next/standalone/packages/console/.next/static/chunks/2cfixbtwii9hq.js +1 -0
  160. package/.next/standalone/packages/console/.next/static/chunks/2dkqrqvxmerj9.css +3 -0
  161. package/.next/standalone/packages/console/.next/static/chunks/2ggf3qa9xixed.js +1 -0
  162. package/.next/standalone/packages/console/.next/static/chunks/{3dqw9msbsb0t0.js → 2h98d1zd2s_t5.js} +1 -1
  163. package/.next/standalone/packages/console/.next/static/chunks/{19p4i84gnm2q6.js → 2l01iyjlu686-.js} +1 -1
  164. package/.next/standalone/packages/console/.next/static/chunks/{0rynbs46ao8hb.js → 2qicmwwvgn33n.js} +1 -1
  165. package/.next/standalone/packages/console/.next/static/chunks/{0jy978bstmu2h.js → 2tl2a2wz8thbf.js} +1 -1
  166. package/.next/standalone/packages/console/.next/static/chunks/{06v0wink6h9wc.js → 2xwbclmo1ptlk.js} +1 -1
  167. package/.next/standalone/packages/console/.next/static/chunks/{2u9g6rfau6qkb.js → 3a0odbvtvug2f.js} +1 -1
  168. package/.next/standalone/packages/console/.next/static/chunks/3q-rob7jfhbps.js +1 -0
  169. package/.next/standalone/packages/console/.next/static/chunks/{12tpena_m0td3.js → 3rm6d-05q8id3.js} +1 -1
  170. package/.next/standalone/packages/console/.next/static/chunks/{14t6zl5-m6-cv.js → 3v5kypqchkulb.js} +1 -1
  171. package/.next/standalone/packages/console/.next/static/chunks/{0lerfeqv17y3h.js → 3wn51b0ga8x5c.js} +1 -1
  172. package/.next/standalone/packages/console/.next/static/chunks/{0w5mjb10dj8-h.js → 3ydi8zqssypls.js} +1 -1
  173. package/.next/standalone/packages/console/package.json +3 -3
  174. package/package.json +3 -3
  175. package/.next/standalone/packages/console/.next/server/chunks/ssr/0ysl_console_features_trierarchs_ui_organisms_clear-worktree-dialog_tsx_1rm9l2e._.js +0 -3
  176. package/.next/standalone/packages/console/.next/server/chunks/ssr/_085nqa_._.js +0 -3
  177. package/.next/standalone/packages/console/.next/server/chunks/ssr/_0rdbxnq._.js +0 -3
  178. package/.next/standalone/packages/console/.next/server/chunks/ssr/_1lrul1q._.js +0 -3
  179. package/.next/standalone/packages/console/.next/static/chunks/0bnl87gj176h5.js +0 -1
  180. package/.next/standalone/packages/console/.next/static/chunks/0mcbp_1hunti9.js +0 -1
  181. package/.next/standalone/packages/console/.next/static/chunks/0ofpruu2tcm_6.js +0 -1
  182. package/.next/standalone/packages/console/.next/static/chunks/194ocbg7a-yfj.js +0 -2
  183. package/.next/standalone/packages/console/.next/static/chunks/2_x-45vq7prtl.js +0 -1
  184. package/.next/standalone/packages/console/.next/static/chunks/2tj5-rkl0ps53.js +0 -1
  185. package/.next/standalone/packages/console/.next/static/chunks/3aavctmtw4-fi.js +0 -1
  186. package/.next/standalone/packages/console/.next/static/chunks/3m5g2od7yc5cq.js +0 -1
  187. package/.next/standalone/packages/console/.next/static/chunks/3pbm8tp2tq5mv.css +0 -3
  188. /package/.next/standalone/packages/console/.next/static/{10-qWFsL7UDAGlmmFXFB- → M3UCCsD3-uSl8HVucbFrh}/_buildManifest.js +0 -0
  189. /package/.next/standalone/packages/console/.next/static/{10-qWFsL7UDAGlmmFXFB- → M3UCCsD3-uSl8HVucbFrh}/_clientMiddlewareManifest.js +0 -0
  190. /package/.next/standalone/packages/console/.next/static/{10-qWFsL7UDAGlmmFXFB- → M3UCCsD3-uSl8HVucbFrh}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,395530,e=>{"use strict";var t=e.i(271645),a=e.i(828918),s=e.i(838452),l=e.i(673553);e.s(["useCompositeItem",0,function(e={}){let{highlightItemOnHover:n,highlightedIndex:r,onHighlightedIndexChange:i}=(0,s.useCompositeRootContext)(),{ref:o,index:d}=(0,l.useCompositeListItem)(e),u=r===d,c=t.useRef(null),m=(0,a.useMergedRefs)(o,c);return{compositeProps:{tabIndex:u?0:-1,onFocus(){i(d)},onMouseMove(){let e=c.current;if(!n||!e)return;let t=e.hasAttribute("disabled")||"true"===e.ariaDisabled;u||t||e.focus()}},compositeRef:m,index:d}}])},172410,e=>{"use strict";e.i(247167);var t=e.i(271645);let a=t.createContext(void 0),s={disableStyleElements:!1};e.s(["useCSPContext",0,function(){return t.useContext(a)??s}])},186698,e=>{"use strict";e.s(["serializeValue",0,function(e){if(null==e)return"";if("string"==typeof e)return e;try{return JSON.stringify(e)}catch{return String(e)}}])},590803,e=>{"use strict";e.s(["isElementDisabled",0,function(e){return null==e||e.hasAttribute("disabled")||"true"===e.getAttribute("aria-disabled")}])},713203,265858,484325,42191,450001,818438,e=>{"use strict";var t=e.i(271645);e.s(["useOnFirstRender",0,function(e){let a=t.useRef(!0);a.current&&(a.current=!1,e())}],713203);var a=e.i(229315),s=e.i(883977),l=e.i(146376),n=e.i(388940),r=e.i(990627),i=e.i(46420),o=e.i(156341);e.s(["useFloatingRootContext",0,function(e){let{open:t=!1,onOpenChange:d,elements:u={}}=e,c=(0,s.useId)(),m=null!=(0,i.useFloatingParentNodeId)(),h=(0,n.useRefWithInit)(()=>new o.FloatingRootStore({open:t,transitionStatus:void 0,onOpenChange:d,referenceElement:u.reference??null,floatingElement:u.floating??null,triggerElements:new r.PopupTriggerMap,floatingId:c,syncOnly:!1,nested:m})).current;return(0,l.useIsoLayoutEffect)(()=>{let e={open:t,floatingId:c};void 0!==u.reference&&(e.referenceElement=u.reference,e.domReferenceElement=(0,a.isElement)(u.reference)?u.reference:null),void 0!==u.floating&&(e.floatingElement=u.floating),h.update(e)},[t,c,u.reference,u.floating,h]),h.context.onOpenChange=d,h.context.nested=m,h}],265858);let d=(e,t)=>Object.is(e,t);function u(e,t,a){return null==e||null==t?Object.is(e,t):a(e,t)}function c(e,t,a){return!!e&&e.some(e=>void 0!==e&&u(t,e,a))}function m(e,t,a){return e?e.findIndex(e=>void 0!==e&&u(e,t,a)):-1}function h(e,t,a,s){let l=s&&Array.isArray(t)?e.findIndex(function(e,t){if(t!==d)return a=>c(e,a,t);let a=new Set(e);return a.delete(void 0),t=>a.has(t)&&(0!==t||e.some(e=>Object.is(t,e)))}(t,a)):m(e,t,a);return -1===l?null:l}e.s(["compareItemEquality",0,u,"defaultItemEquality",0,d,"findItemIndex",0,m,"findSelectionIndex",0,h,"isSelectedValueDirty",0,function(e,t,a){return Array.isArray(e)&&Array.isArray(t)?!function(e,t,a=Object.is){let{length:s}=e;if(s!==t.length)return!1;for(let l=0;l<s;l+=1)if(!a(e[l],t[l]))return!1;return!0}(e,t,(e,t)=>u(e,t,a)):e!==t},"removeItem",0,function(e,t,a){return e.filter(e=>!u(t,e,a))},"resolveSelectedIndex",0,function(e,t,a,s,l,n){return c(s,t,l)?null!=n&&e>n&&c(s,a[n],l)?n:e:e===n?h(a,s,l,!0):n},"selectedValueIncludes",0,c],484325);var f=e.i(186698),x=e.i(843476);function p(e){var t;return"object"==typeof(t=e?.[0])&&null!=t&&Array.isArray(t.items)}function g(e){return p(e)?e.flatMap(e=>e.items):e}function b(e,t){if(t&&null!=e)return t(e)??"";if(e&&"object"==typeof e){if("label"in e&&null!=e.label)return String(e.label);if("value"in e)return String(e.value)}return(0,f.serializeValue)(e)}function v(e,t,a){if(a&&null!=e)return a(e);if(e&&"object"==typeof e&&"label"in e&&null!=e.label)return e.label;if(t&&!Array.isArray(t))return(Object.hasOwn(t,e)?t[e]:void 0)??b(e,a);if(Array.isArray(t)){let s=g(t);if(null==e||"object"!=typeof e){let t=s.find(t=>t.value===e);return t&&null!=t.label?t.label:b(e,a)}if("value"in e){let t=s.find(t=>t&&t.value===e.value);if(t&&null!=t.label)return t.label}}return b(e,a)}e.s(["flattenLeafItems",0,g,"hasNullItemLabel",0,function(e){if(!Array.isArray(e))return null!=e&&"null"in e;if(p(e)){for(let t of e)for(let e of t.items)if(e&&null==e.value&&null!=e.label)return!0;return!1}for(let t of e)if(t&&null==t.value&&null!=t.label)return!0;return!1},"isGroupedItems",0,p,"resolveMultipleLabels",0,function(e,a,s){return e.reduce((e,l,n)=>(n>0&&e.push(", "),e.push((0,x.jsx)(t.Fragment,{children:v(l,a,s)},n)),e),[])},"resolveSelectedLabel",0,v,"stringifyAsLabel",0,b,"stringifyAsValue",0,function(e,t){return t&&null!=e?t(e)??"":e&&"object"==typeof e&&"value"in e&&"label"in e?(0,f.serializeValue)(e.value):(0,f.serializeValue)(e)}],42191),e.s(["getDefaultLabelId",0,function(e){return null==e?void 0:`${e}-label`},"resolveAriaLabelledBy",0,function(e,t){return e??t}],450001);var y=e.i(552245);let j=t.forwardRef(function(e,t){let{className:a,render:s,orientation:l="horizontal",style:n,...r}=e;return(0,y.useRenderElement)("div",e,{state:{orientation:l},ref:t,props:[{role:"presentation"},r]})});e.s(["ListboxSeparator",0,j],818438)},792150,e=>{"use strict";var t=e.i(456420);let a={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"}]]};a.node;let s=(0,t.default)(a);e.s(["Boxes",0,s],792150)},24071,e=>{"use strict";var t=e.i(456420);let a={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};a.node;let s=(0,t.default)(a);e.s(["ChevronLeft",0,s],24071)},867927,e=>{"use strict";var t=e.i(456420);let a={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};a.node;let s=(0,t.default)(a);e.s(["ChevronRight",0,s],867927)},275043,446513,e=>{"use strict";var t=e.i(456420);let a={name:"circle-question-mark",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["help-circle","circle-help"]};a.node;let s=(0,t.default)(a);e.s(["default",0,s],275043);let l={name:"monitor",size:24,node:[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]};l.node;let n=(0,t.default)(l);e.s(["Monitor",0,n],446513)},386247,e=>{"use strict";var t=e.i(456420);let a={name:"ellipsis",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],aliases:["more-horizontal"]};a.node;let s=(0,t.default)(a);e.s(["Ellipsis",0,s],386247)},515281,e=>{"use strict";var t=e.i(456420);let a={name:"pencil",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};a.node;let s=(0,t.default)(a);e.s(["Pencil",0,s],515281)},77071,e=>{"use strict";var t=e.i(456420);let a={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};a.node;let s=(0,t.default)(a);e.s(["Plus",0,s],77071)},566595,e=>{"use strict";var t=e.i(456420);let a={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};a.node;let s=(0,t.default)(a);e.s(["Search",0,s],566595)},819759,e=>{"use strict";var t=e.i(456420);let a={name:"square-pen",size:24,node:[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],aliases:["pen-box","edit","pen-square"]};a.node;let s=(0,t.default)(a);e.s(["SquarePen",0,s],819759)},868401,e=>{"use strict";var t=e.i(456420);let a={name:"tags",size:24,node:[["path",{d:"M13.172 2a2 2 0 0 1 1.414.586l6.71 6.71a2.4 2.4 0 0 1 0 3.408l-4.592 4.592a2.4 2.4 0 0 1-3.408 0l-6.71-6.71A2 2 0 0 1 6 9.172V3a1 1 0 0 1 1-1z",key:"16rjxf"}],["path",{d:"M2 7v6.172a2 2 0 0 0 .586 1.414l6.71 6.71a2.4 2.4 0 0 0 3.191.193",key:"178nd4"}],["circle",{cx:"10.5",cy:"6.5",r:".5",fill:"currentColor",key:"12ikhr"}]]};a.node;let s=(0,t.default)(a);e.s(["Tags",0,s],868401)},759659,e=>{"use strict";var t=e.i(456420);let a={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"]};a.node;let s=(0,t.default)(a);e.s(["Trash2",0,s],759659)},298260,e=>{"use strict";var t=e.i(843476),a=e.i(965324);e.s(["Kbd",0,function({className:e,...s}){return(0,t.jsx)("kbd",{"data-slot":"kbd",className:(0,a.classNames)("inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-xs border border-border bg-muted px-1.25 font-sans text-micro font-medium text-muted-foreground max-sm:hidden",e),...s})}])},638919,e=>{"use strict";var t=e.i(843476),a=e.i(353753),s=e.i(225913),l=e.i(560964),n=e.i(965324),r=e.i(574296);let i=(0,s.cva)("fixed z-50 flex flex-col bg-popover text-body text-popover-foreground shadow-lg outline-none duration-(--duration-slow) ease-(--ease-standard) data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",{variants:{side:{right:"inset-y-0 right-0 h-full w-full border-l border-border sm:max-w-(--size-sheet) motion-safe:data-open:slide-in-from-right motion-safe:data-closed:slide-out-to-right",bottom:"inset-x-0 bottom-0 max-h-[90dvh] rounded-t-2xl border-t border-border px-4 pt-2 pb-[max(calc(var(--spacing)*4),env(safe-area-inset-bottom))] motion-safe:data-open:slide-in-from-bottom motion-safe:data-closed:slide-out-to-bottom"}},defaultVariants:{side:"right"}});e.s(["Sheet",0,function(e){return(0,t.jsx)(a.Dialog.Root,{"data-slot":"sheet",...e})},"SheetBody",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"sheet-body",className:(0,n.classNames)("min-h-0 flex-1 overflow-y-auto in-data-[side=right]:p-6",e),...a})},"SheetClose",0,function(e){return(0,t.jsx)(a.Dialog.Close,{"data-slot":"sheet-close",...e})},"SheetContent",0,function({className:e,children:s,side:o="right",...d}){return(0,t.jsxs)(a.Dialog.Portal,{children:[(0,t.jsx)(a.Dialog.Backdrop,{"data-slot":"sheet-overlay",className:"fixed inset-0 z-50 bg-overlay duration-(--duration-slow) data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0"}),(0,t.jsxs)(a.Dialog.Popup,{"data-slot":"sheet-content","data-side":o,className:(0,n.classNames)(i({side:o}),e),...d,children:["bottom"===o?(0,t.jsx)("div",{"aria-hidden":!0,className:"mx-auto mb-3 h-1 w-9 shrink-0 rounded-full bg-border"}):(0,t.jsx)(a.Dialog.Close,{"data-slot":"sheet-close",render:(0,t.jsx)(r.Button,{variant:"ghost",size:"sm",isIconOnly:!0,className:"absolute top-4 right-4","aria-label":"Close"}),children:(0,t.jsx)(l.XIcon,{})}),s]})]})},"SheetDescription",0,function({className:e,...s}){return(0,t.jsx)(a.Dialog.Description,{"data-slot":"sheet-description",className:(0,n.classNames)("text-meta text-muted-foreground",e),...s})},"SheetFooter",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"sheet-footer",className:(0,n.classNames)("flex flex-col-reverse gap-2 pt-3 in-data-[side=right]:flex-row in-data-[side=right]:justify-end in-data-[side=right]:border-t in-data-[side=right]:px-6 in-data-[side=right]:py-4",e),...a})},"SheetHeader",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"sheet-header",className:(0,n.classNames)("flex flex-col gap-0.5 in-data-[side=right]:border-b in-data-[side=right]:px-6 in-data-[side=right]:py-5 in-data-[side=right]:pr-14",e),...a})},"SheetTitle",0,function({className:e,...s}){return(0,t.jsx)(a.Dialog.Title,{"data-slot":"sheet-title",className:(0,n.classNames)("text-heading font-semibold text-foreground in-data-[side=bottom]:py-2 in-data-[side=bottom]:text-section",e),...s})},"SheetTrigger",0,function(e){return(0,t.jsx)(a.Dialog.Trigger,{"data-slot":"sheet-trigger",...e})}])},581785,e=>{"use strict";var t=e.i(843476),a=e.i(77071),s=e.i(271645),l=e.i(574296),n=e.i(792150),r=e.i(386247),i=e.i(515281),o=e.i(566595),d=e.i(749287),u=e.i(586875),c=e.i(868401),m=e.i(759659),h=e.i(522016),f=e.i(965324),x=e.i(407242),p=e.i(34512),g=e.i(280581),b=e.i(212470),v=e.i(946033),y=e.i(414732),j=e.i(67874),w=e.i(817981),N=e.i(188393);let k={"trierarch-plugin":u.ShipWheel,squadrons:n.Boxes,ship:d.Ship};function S(e,t){return`${String(e)} ${1===e?t:`${t}s`}`}function C({value:e}){return(0,t.jsxs)(h.default,{href:`/?label=${e.valueId}`,"data-testid":"labels-value",title:`${e.value}: on ${0===e.shipCount?"no ship":S(e.shipCount,"ship")}`,className:(0,f.classNames)("inline-flex h-6 items-center gap-1.5 rounded-sm border border-border bg-secondary px-2 font-mono text-id hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring",0===e.shipCount?"text-muted-foreground":"text-foreground"),children:[(0,t.jsx)("span",{className:"font-medium",children:e.value}),(0,t.jsx)("span",{className:"font-sans text-caption text-muted-foreground tabular-nums",children:e.shipCount})]})}function I({owner:e}){let a="none"===e.mark?null:k[e.mark];return(0,t.jsxs)("span",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 font-medium [&_svg]:size-(--size-icon-sm) [&_svg]:text-muted-foreground",children:[null===a?null:(0,t.jsx)(a,{"aria-hidden":!0}),e.name,e.isYours?(0,t.jsx)("span",{className:"font-normal text-muted-foreground",children:"(you)"}):null]}),(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:e.isYours?"Only you assign it":`Read-only: only ${e.name} assigns it`})]})}function D({row:e,onChangeValues:a,onDelete:s}){if(!e.owner.isYours||void 0===a&&void 0===s)return null;let n=e.shipCount>0;return(0,t.jsxs)(x.DropdownMenu,{children:[(0,t.jsx)(x.DropdownMenuTrigger,{render:(0,t.jsx)(l.Button,{variant:"ghost",size:"sm",isIconOnly:!0,"aria-label":`Actions for ${e.key}`,icon:(0,t.jsx)(r.Ellipsis,{}),"data-testid":"labels-row-menu"})}),(0,t.jsxs)(x.DropdownMenuContent,{align:"end",children:[void 0===a?null:(0,t.jsxs)(x.DropdownMenuItem,{"data-testid":"labels-change-values",onClick:()=>{a(e)},children:[(0,t.jsx)(i.Pencil,{"aria-hidden":!0}),"Change values…"]}),void 0===s?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(x.DropdownMenuSeparator,{}),(0,t.jsxs)(x.DropdownMenuItem,{variant:"destructive",disabled:n,"data-testid":"labels-delete",className:"h-auto min-h-8.5 py-1.5",onClick:()=>{s(e)},children:[(0,t.jsx)(m.Trash2,{"aria-hidden":!0}),(0,t.jsxs)("span",{className:"flex flex-col",children:["Delete label…",n?(0,t.jsx)("span",{className:"text-caption text-muted-foreground",children:"Only when no ship carries it"}):null]})]})]})]})]})}function R({rows:e,shipTotal:n,error:r,onRetry:i,onDefine:d,onChangeValues:u,onDelete:m}){let h=(0,p.useConsoleConstants)(),[f,x]=(0,s.useState)(""),[k,z]=(0,s.useState)("all");if(void 0!==r)return(0,t.jsx)(w.InlineError,{variant:"page",title:"Couldn’t load labels",description:"This page couldn’t reach the fleet server. Nothing changed; your labels are where you left them.",detail:r,onRetry:i});if(void 0===e)return(0,t.jsx)(N.LoadingSkeleton,{variant:"table",rows:5,label:"Loading labels"});if(0===e.length)return(0,t.jsx)(j.EmptyState,{icon:(0,t.jsx)(c.Tags,{"aria-hidden":!0}),title:"No labels yet",description:"A label is a key with a set of values, like os with macos and linux. Define one, then assign it on ship pages to filter the fleet and to place crew requests on machines.",action:void 0===d?void 0:(0,t.jsx)(l.Button,{variant:"primary",icon:(0,t.jsx)(a.Plus,{}),onClick:d,children:"Define a label"})});let A=[...new Set(e.map(e=>e.owner.name))],T=e.filter(e=>(0,g.matchesLabelQuery)(e,f)&&("all"===k||e.owner.name===k)),L={all:"All",...Object.fromEntries(A.map(e=>[e,e]))};return(0,t.jsxs)("div",{className:"flex flex-col gap-3","data-testid":"labels-table",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)("div",{className:"w-64 max-sm:min-w-0 max-sm:flex-1",children:(0,t.jsx)(b.Input,{type:"search","aria-label":"Find a key or value",placeholder:"Find a key or value",leadingIcon:(0,t.jsx)(o.Search,{}),value:f,className:"h-(--size-control-sm) text-meta max-sm:h-(--size-control-touch) max-sm:text-input-touch","data-testid":"labels-search",onChange:e=>{x(e.target.value)}})}),(0,t.jsxs)(v.Select,{items:L,value:k,onValueChange:e=>{null!==e&&z(e)},children:[(0,t.jsx)(v.SelectTrigger,{size:"sm","aria-label":"Owner",children:(0,t.jsxs)("span",{className:"flex gap-1.5",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"Owner"}),(0,t.jsx)(v.SelectValue,{className:"font-medium"})]})}),(0,t.jsx)(v.SelectContent,{children:Object.entries(L).map(([e,a])=>(0,t.jsx)(v.SelectItem,{value:e,children:a},e))})]}),(0,t.jsxs)("p",{className:"ml-auto text-meta text-muted-foreground tabular-nums max-sm:w-full",children:[S(e.length,"label")," · ",S(A.length,"owner")]})]}),0===T.length?(0,t.jsx)(j.EmptyState,{variant:"no-results",title:`No label matches “${f.trim()}”.`}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"max-sm:hidden",children:(0,t.jsxs)(y.Table,{"aria-label":"Labels",children:[(0,t.jsx)(y.TableHeader,{children:(0,t.jsxs)(y.TableRow,{children:[(0,t.jsx)(y.TableHead,{children:"Key"}),(0,t.jsx)(y.TableHead,{children:"Values and the ships that carry each"}),(0,t.jsx)(y.TableHead,{children:"Owner"}),(0,t.jsx)(y.TableHead,{children:"Ships"}),(0,t.jsx)(y.TableHead,{children:(0,t.jsx)("span",{className:"sr-only",children:"Actions"})})]})}),(0,t.jsx)(y.TableBody,{children:T.map(e=>(0,t.jsxs)(y.TableRow,{"data-testid":`labels-row-${e.key}`,children:[(0,t.jsx)(y.TableCell,{className:"align-top",children:(0,t.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("span",{className:"font-mono text-body font-medium",children:e.key}),(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:S(e.values.length,"value")})]})}),(0,t.jsx)(y.TableCell,{children:(0,t.jsx)("span",{className:"flex flex-wrap gap-1.5",children:e.values.map(e=>(0,t.jsx)(C,{value:e},e.valueId))})}),(0,t.jsx)(y.TableCell,{className:"max-w-60 align-top",children:(0,t.jsx)(I,{owner:e.owner})}),(0,t.jsx)(y.TableCell,{className:"align-top",children:(0,t.jsxs)("span",{className:"flex flex-col gap-0.5 tabular-nums",children:[(0,t.jsx)("span",{children:e.shipCount}),(0,t.jsxs)("span",{className:"text-meta text-muted-foreground",children:["of ",n]})]})}),(0,t.jsx)(y.TableCell,{className:"w-10 text-right align-top",children:(0,t.jsx)(D,{row:e,onChangeValues:u,onDelete:m})})]},e.labelId))})]})}),(0,t.jsx)("ul",{"aria-label":"Labels",className:"overflow-hidden rounded-lg border border-border bg-card sm:hidden",children:T.map(e=>(0,t.jsxs)("li",{className:"flex flex-col gap-2 border-b border-border px-3.5 py-3 last:border-0","data-testid":`labels-card-${e.key}`,children:[(0,t.jsxs)("span",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("span",{className:"font-mono text-body-touch font-medium",children:e.key}),(0,t.jsxs)("span",{className:"flex items-center gap-1 text-meta text-muted-foreground",children:[S(e.shipCount,"ship"),(0,t.jsx)(D,{row:e,onChangeValues:u,onDelete:m})]})]}),(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:e.owner.isYours?"By you":`By ${e.owner.name} \xb7 read-only`}),(0,t.jsx)("span",{className:"flex flex-wrap gap-1.5",children:e.values.map(e=>(0,t.jsx)(C,{value:e},e.valueId))})]},e.labelId))})]}),(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:`A value opens the fleet overview filtered by it. Keys and values use lowercase letters, digits and -, up to ${String(h.labelHandleMaxLength)} characters; a label has at most ${String(h.labelValuesMax)} values and a ship at most ${String(h.shipLabelsMax)} labels (decision 0031).`})]})}var z=e.i(837631),A=e.i(787964),T=e.i(917540),L=e.i(490262),M=e.i(905387),q=e.i(718423),O=e.i(928459),K=e.i(678485);let P=(0,T.lazyDialog)(()=>e.A(302581).then(e=>e.DefineLabelDialog),e=>e.isOpen),E=(0,T.lazyDialog)(()=>e.A(829886).then(e=>e.DeleteLabelDialog),e=>void 0!==e.row),B=(0,T.lazyDialog)(()=>e.A(803877).then(e=>e.LabelValuesDialog),e=>void 0!==e.row);e.s(["default",0,function(){let e=(0,A.useConsoleFrame)(),n=(0,O.useNeedsAttention)(),r=(0,q.useLiveFleet)(),i=(0,L.useAccess)(),o=(0,M.useFleetLabels)(),d=(0,M.useLabelContext)(),u=(0,M.useActiveShipCount)(),c=(0,M.useDefineLabel)(),m=(0,M.useChangeLabelValues)(),h=(0,M.useDeleteLabel)(),[f,x]=(0,s.useState)(!1),[p,b]=(0,s.useState)(void 0),[v,y]=(0,s.useState)(void 0),[j,w]=(0,s.useState)(void 0),[N,k]=(0,s.useState)(void 0);(0,K.useSignInWhenSessionEnds)([n.error,r.error,o.error]);let S=void 0===d?void 0:(0,g.labelRowsOf)(d),C=i.canDefineLabels,I=S?.find(e=>e.labelId===p),D=S?.find(e=>e.labelId===N),T=e=>{void 0!==I&&(y(e.busy),w(void 0),m.mutate({labelId:I.labelId,values:e.values},{onError:t=>{w({...e.refused,message:t.message})},onSettled:()=>{y(void 0)}}))};return(0,t.jsxs)(z.DetailPage,{switcher:e.switcher,account:e.account,onCompose:e.onCompose,onSearch:e.onSearch,banner:e.banner,title:"Labels",parents:[{href:"/",label:"Fleet overview"}],live:r.live,header:(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4 max-sm:gap-3",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-1",children:[(0,t.jsx)("h1",{className:"text-title font-semibold tracking-tight max-sm:text-title-touch",children:"Labels"}),(0,t.jsx)("p",{className:"text-meta text-muted-foreground max-sm:text-body-touch",children:"An owned vocabulary for selecting ships: filter the fleet with them, and crew requests use them to pick a machine. Only a label’s owner assigns it."})]}),C&&void 0!==S&&S.length>0?(0,t.jsx)(l.Button,{variant:"primary",icon:(0,t.jsx)(a.Plus,{}),className:"max-sm:w-full","data-testid":"labels-define",onClick:()=>{c.reset(),x(!0)},children:"Define a label"}):null]}),children:[(0,t.jsx)(R,{rows:S,shipTotal:u??0,error:o.isError?o.error.message:void 0,onRetry:()=>{o.refetch()},onDefine:C?()=>{c.reset(),x(!0)}:void 0,onChangeValues:C?e=>{w(void 0),b(e.labelId)}:void 0,onDelete:C?e=>{h.reset(),k(e.labelId)}:void 0}),C?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(P,{isOpen:f,onOpenChange:x,isPending:c.isPending,error:c.error?.message,onSubmit:e=>{c.mutate(e,{onSuccess:()=>{x(!1)}})}}),(0,t.jsx)(B,{row:I,onOpenChange:e=>{e||b(void 0)},busy:v,error:j,onAdd:e=>{T({values:[...I?.values.map(e=>e.value)??[],e],busy:{action:"add",value:e},refused:{value:e}})},onRemove:e=>{let t=I?.values.find(t=>t.valueId===e);T({values:I?.values.filter(t=>t.valueId!==e).map(e=>e.value)??[],busy:{action:"remove",valueId:e},refused:{valueId:e,value:t?.value??""}})}}),(0,t.jsx)(E,{row:D,onOpenChange:e=>{e||k(void 0)},isPending:h.isPending,error:h.error?.message,onDelete:e=>{h.mutate({labelId:e},{onSuccess:()=>{k(void 0)}})}})]}):null]})}],581785)},219321,e=>{"use strict";var t=e.i(843476),a=e.i(965324);e.s(["Skeleton",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"skeleton","aria-hidden":!0,className:(0,a.classNames)("animate-pulse rounded-sm bg-secondary [animation-duration:var(--duration-pulse)] motion-reduce:animate-none",e),...s})}])},414732,e=>{"use strict";var t=e.i(843476),a=e.i(456420);let s={name:"arrow-down",size:24,node:[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]};s.node;let l=(0,a.default)(s),n={name:"arrow-up",size:24,node:[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]};n.node;let r=(0,a.default)(n),i={name:"chevrons-up-down",size:24,node:[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]};i.node;let o=(0,a.default)(i);var d=e.i(965324);function u({className:e,...a}){return(0,t.jsx)("th",{"data-slot":"table-head",className:(0,d.classNames)("px-4 text-left align-middle text-caption font-medium whitespace-nowrap text-muted-foreground",e),...a})}e.s(["Table",0,function({className:e,...a}){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,d.classNames)("w-full caption-bottom text-body",e),...a})})},"TableBody",0,function({className:e,...a}){return(0,t.jsx)("tbody",{"data-slot":"table-body",className:(0,d.classNames)("[&_tr:last-child]:border-0",e),...a})},"TableCell",0,function({className:e,...a}){return(0,t.jsx)("td",{"data-slot":"table-cell",className:(0,d.classNames)("px-4 align-middle",e),...a})},"TableHead",0,u,"TableHeader",0,function({className:e,...a}){return(0,t.jsx)("thead",{"data-slot":"table-header",className:(0,d.classNames)("bg-muted [&_tr]:border-b",e),...a})},"TableRow",0,function({className:e,...a}){return(0,t.jsx)("tr",{"data-slot":"table-row",className:(0,d.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),...a})},"TableSortHead",0,function({direction:e,onSort:a,children:s,className:n,...i}){return(0,t.jsx)(u,{"aria-sort":e??"none",className:(0,d.classNames)("px-2",n),...i,children:(0,t.jsxs)("button",{type:"button",onClick:a,className:"inline-flex h-7 items-center gap-1 rounded-sm px-2 font-medium hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring data-sorted:text-foreground","data-sorted":null===e?void 0:"",children:[s,(0,t.jsx)("ascending"===e?r:"descending"===e?l:o,{"aria-hidden":!0,className:(0,d.classNames)("size-3.5 shrink-0",null===e?"opacity-50":void 0)})]})})}],414732)},67874,e=>{"use strict";var t=e.i(843476),a=e.i(965324);e.s(["EmptyState",0,function({title:e,description:s,icon:l,action:n,variant:r="page",className:i}){return"section"===r?(0,t.jsxs)("p",{"data-slot":"empty-state","data-variant":r,className:(0,a.classNames)("rounded-lg border border-border px-4 py-3 text-center text-meta text-muted-foreground",i),children:[e,s?(0,t.jsxs)(t.Fragment,{children:[" ",s]}):null]}):"no-results"===r?(0,t.jsxs)("div",{"data-slot":"empty-state","data-variant":r,className:(0,a.classNames)("flex flex-col items-center gap-2.5 rounded-lg border border-border bg-card px-4 py-6 text-center",i),children:[(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:e}),n]}):(0,t.jsxs)("div",{"data-slot":"empty-state","data-variant":r,className:(0,a.classNames)("flex flex-col items-center gap-3 rounded-lg border border-dashed border-border bg-card px-6 py-10 text-center",i),children:[l?(0,t.jsx)("span",{"aria-hidden":!0,className:"flex size-10 items-center justify-center rounded-lg border border-border bg-muted text-muted-foreground [&_svg]:size-(--size-icon-xl)",children:l}):null,(0,t.jsx)("h2",{className:"text-heading font-semibold text-foreground max-sm:text-heading-touch",children:e}),s?(0,t.jsx)("p",{className:"max-w-96 text-meta text-muted-foreground max-sm:text-body-touch",children:s}):null,n?(0,t.jsx)("div",{className:"mt-1 max-sm:w-full max-sm:[&>*]:w-full",children:n}):null]})}])},188393,e=>{"use strict";var t=e.i(843476),a=e.i(965324),s=e.i(219321);function l(e){return Array.from({length:e},(e,t)=>`row-${String(t)}`)}e.s(["LoadingSkeleton",0,function({variant:e,rows:n=4,label:r="Loading",className:i}){return(0,t.jsxs)("div",{role:"status","data-slot":"loading-skeleton","data-variant":e,className:(0,a.classNames)("w-full",i),children:[(0,t.jsx)("span",{className:"sr-only",children:r}),"table"===e?(0,t.jsxs)("div",{className:"overflow-hidden rounded-lg border border-border bg-card shadow-sm",children:[(0,t.jsx)("div",{className:"h-(--size-row-header) border-b border-border bg-muted"}),l(n).map(e=>(0,t.jsxs)("div",{className:"flex h-(--size-row) items-center gap-8 border-b border-border px-4 last:border-0",children:[(0,t.jsx)(s.Skeleton,{className:"h-2.5 w-24"}),(0,t.jsx)(s.Skeleton,{className:"h-5 w-16"}),(0,t.jsx)(s.Skeleton,{className:"h-5 w-20"}),(0,t.jsx)(s.Skeleton,{className:"h-2.5 w-28"})]},e))]}):null,"cards"===e?(0,t.jsx)("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:l(4).map(e=>(0,t.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-4",children:[(0,t.jsx)(s.Skeleton,{className:"h-2.5 w-20"}),(0,t.jsx)(s.Skeleton,{className:"h-6 w-10"}),(0,t.jsx)(s.Skeleton,{className:"h-2.5 w-28"})]},e))}):null,"detail"===e?(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsx)(s.Skeleton,{className:"h-7 w-48"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(s.Skeleton,{className:"h-5 w-20"}),(0,t.jsx)(s.Skeleton,{className:"h-5 w-16"})]}),(0,t.jsx)(s.Skeleton,{className:"h-16 w-full rounded-lg"})]}):null,"list"===e?(0,t.jsx)("div",{className:"overflow-hidden rounded-lg border border-border bg-card",children:l(n).map(e=>(0,t.jsxs)("div",{className:"flex flex-col gap-2.5 border-b border-border px-3.5 py-3 last:border-0",children:[(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)(s.Skeleton,{className:"h-3 w-28"}),(0,t.jsx)(s.Skeleton,{className:"h-5 w-16"})]}),(0,t.jsx)(s.Skeleton,{className:"h-2.5 w-44"})]},e))}):null]})}])},837631,e=>{"use strict";var t=e.i(843476),a=e.i(577880),s=e.i(485538);e.s(["DetailPage",0,function({title:e,parents:l,header:n,children:r,sheet:i,live:o,switcher:d,account:u,onCompose:c,onSearch:m,banner:h}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.Header,{breadcrumb:e,parents:l,live:o,switcher:d,account:u,onCompose:c,onSearch:m}),h,(0,t.jsx)(s.TopBar,{title:e,live:o,back:l[l.length-1]??l[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:[n,r]}),i]})}])},577880,485538,e=>{"use strict";var t=e.i(843476),a=e.i(566595),s=e.i(374368),l=e.i(574296),n=e.i(298260),r=e.i(704974),i=e.i(965324);function o({switcher:e,account:d,onSearch:u,searchLabel:c="Search or jump to",children:m,actions:h,className:f}){return(0,t.jsxs)("header",{"data-slot":"app-header",className:(0,i.classNames)("sticky top-0 z-30 flex h-(--size-header) shrink-0 items-center justify-between gap-4 border-b border-border bg-background px-6",f),children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[void 0===e?(0,t.jsx)("span",{"data-testid":"app-switcher-loading","aria-hidden":!0,className:"h-4 w-36 shrink-0 animate-pulse rounded bg-muted motion-reduce:animate-none"}):(0,t.jsx)(s.AppSwitcher,{switcher:e,layout:"full",className:"shrink-0"}),m]}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-3",children:[h,u?(0,t.jsxs)(l.Button,{size:"sm",icon:(0,t.jsx)(a.Search,{"aria-hidden":!0}),"data-testid":"header-search",className:"w-60 justify-start font-normal text-muted-foreground max-lg:w-auto",onClick:u,children:[(0,t.jsx)("span",{className:"grow text-left max-lg:sr-only",children:c}),(0,t.jsx)(n.Kbd,{children:"⌘K"})]}):null,(0,t.jsx)(r.AvatarMenu,{...d})]})]})}var d=e.i(867927),u=e.i(819759),c=e.i(522016);let m={live:{label:"Live",dot:"bg-tone-ok-fg"},reconnecting:{label:"Reconnecting",dot:"bg-tone-waiting-fg"},offline:{label:"Offline",dot:"bg-tone-attention-fg"}};function h({state:e,className:a}){let{label:s,dot:l}=m[e];return(0,t.jsxs)("span",{"data-slot":"live-status","data-state":e,"aria-live":"polite",className:(0,i.classNames)("inline-flex items-center gap-1.5 text-meta text-muted-foreground",a),children:[(0,t.jsx)("span",{"aria-hidden":!0,className:(0,i.classNames)("size-2 shrink-0 rounded-full",l)}),s]})}e.s(["Header",0,function({breadcrumb:e,parents:a=[],live:s,switcher:n,account:r,onCompose:i,onSearch:m}){return(0,t.jsxs)(o,{switcher:n,account:r,onSearch:m,searchLabel:"Search ships or jump to",className:"hidden sm:flex",actions:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h,{state:s}),i?(0,t.jsx)(l.Button,{size:"sm",icon:(0,t.jsx)(u.SquarePen,{"aria-hidden":!0}),"data-testid":"header-compose",onClick:i,children:"Compose"}):null]}),children:[(0,t.jsx)(d.ChevronRight,{"aria-hidden":!0,className:"size-3.5 shrink-0 text-muted-foreground"}),(0,t.jsx)("nav",{"aria-label":"Breadcrumb","data-testid":"header-breadcrumb",className:"min-w-0 text-body",children:(0,t.jsxs)("ol",{className:"flex min-w-0 items-center gap-1.5",children:[a.map(e=>(0,t.jsxs)("li",{className:"flex shrink-0 items-center gap-1.5",children:[(0,t.jsx)(c.default,{href:e.href,className:"text-muted-foreground hover:text-foreground hover:underline",children:e.label}),(0,t.jsx)(d.ChevronRight,{"aria-hidden":!0,className:"size-3.5 text-muted-foreground"})]},e.href)),(0,t.jsx)("li",{"aria-current":"page",className:"truncate font-medium text-foreground",children:e})]})})]})}],577880);var f=e.i(24071);e.s(["TopBar",0,function({title:e,live:n,actions:i,back:o,switcher:d,account:u,onSearch:m}){let x=m&&!o?m:void 0;return(0,t.jsxs)("header",{"data-slot":"top-bar","data-mode":o?"detail":"root",className:"sticky top-0 z-30 flex h-(--size-header) items-center gap-2.5 border-b border-border bg-background px-4 sm:hidden",children:[o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(c.default,{href:o.href,className:"-ml-1.5 inline-flex h-(--size-control-touch) shrink-0 items-center gap-0.5 rounded-md pr-2 text-body-touch text-foreground focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon)",children:[(0,t.jsx)(f.ChevronLeft,{"aria-hidden":!0}),o.label]}),(0,t.jsx)("p",{className:"min-w-0 flex-1 truncate text-center text-body-touch font-semibold text-foreground",children:e})]}):d?(0,t.jsx)(s.AppSwitcher,{switcher:d,layout:"compact",className:"min-w-0"}):(0,t.jsx)("p",{className:"truncate px-1.5 text-title-touch font-semibold text-foreground",children:"Console"}),(0,t.jsx)(h,{state:n}),i||x||u&&!o?(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[x?(0,t.jsx)(l.Button,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Search ships or jump to","data-testid":"top-bar-search",onClick:x,children:(0,t.jsx)(a.Search,{"aria-hidden":!0})}):null,i,u&&!o?(0,t.jsx)(r.AvatarMenuSheet,{...u}):null]}):null]})}],485538)},718423,e=>{"use strict";var t=e.i(912598),a=e.i(905861),s=e.i(271645),l=e.i(586413),n=e.i(123938),r=e.i(427702);let i=new Set(["FleetInitialised","ShipCommissioned","ShipClaimed","LeaseRevoked","CredentialRevoked","StartingPromptIssued","ShipRetired","DeliveryAcknowledged","DeliveryUndeliverable","ShipReported","CrewRequested","CrewRequestRemoved","CrewAssigned","CrewStatusChanged","CrewRequestExplained","CrewRequestGivenBack","LabelAssigned","LabelUnassigned","LabelRetired"]);function o(e,t){return e.pages.some(e=>e.items.some(e=>e.id===t))}let d=new Set(["LabelDefined","LabelValuesChanged","LabelRetired","LabelAssigned","LabelUnassigned","LabelDeleted"]),u=new Set(["DeliveryUndeliverable","DeliveryNotHandled","DeliveryDismissed"]),c=new Set(["NetworkRulesSet","NetworkRulesDraftSaved","NetworkRulesDraftDiscarded","NetworkRulesDeclared","BuiltInRuleChanged"]);e.s(["useLiveFleet",0,function(){let e=(0,r.useTRPC)(),m=(0,t.useQueryClient)(),[h,f]=(0,s.useState)(new Set),x=(0,n.useIsReopening)(),[p]=(0,s.useState)(()=>{let t,a,s,n;return function(e){var t;let a,s,n,{trpc:r,queryClient:m,reload:h}=e,f=[...r.fleet.list.infiniteQueryKey()],x=()=>m.getQueriesData({queryKey:f}).flatMap(([,e])=>void 0===e?[]:[e]),p=(t={readRow:e=>m.query({...r.fleet.listedShip.queryOptions({shipId:e}),staleTime:0}),writeRow:t=>{let a=x().some(e=>!o(e,t.id));m.setQueriesData({queryKey:f},e=>e&&function(e,t){if(o(e,t.id))return{...e,pages:e.pages.map(e=>{var a;return{...e,items:(a=e.items,a.map(e=>e.id===t.id?t:e))}})};let[a,...s]=e.pages;return void 0===a?e:{...e,pages:[{...a,items:[t,...a.items]},...s]}}(e,t)),a&&e.onPlacedFirst(t.id)}},a=new Set,s=new Set,n=async e=>{a.add(e);try{do s.delete(e),t.writeRow(await t.readRow(e));while(s.has(e))}catch{}finally{a.delete(e),s.delete(e)}},e=>{a.has(e)?s.add(e):n(e)}),g=()=>{h(r.fleet.stuckCount.queryKey()),h(r.fleet.stuckSummary.queryKey()),h(r.fleet.stuck.pathKey())};return e=>{var t,a,s,n,o;if("resync"===e.kind){h(r.fleet.pathKey()),h(l.INBOX_KEY);return}let{event:m}=e;for(let e of new Set([m.shipId,m.actorShipId]))null!==e&&(h(r.fleet.ship.queryKey({shipId:e})),h(r.fleet.shipTimeline.infiniteQueryKey({shipId:e})),h(r.fleet.shipWay.queryKey({shipId:e})));if(null!==m.messageId&&(h(r.fleet.shipMessages.pathKey()),h(r.fleet.shipWay.pathKey()),h(r.fleet.message.queryKey({messageId:m.messageId})),h(r.fleet.inbox.pathKey()),h(r.fleet.inboxCount.queryKey()),h(l.INBOX_KEY),g()),"DeliveryAcknowledged"===m.type&&h(r.fleet.acknowledged.queryKey()),t=m.type,u.has(t)&&h(r.fleet.needsAttention.pathKey()),a=m.type,d.has(a)&&h(r.fleet.labels.queryKey()),"NetworkRulesDeclared"===m.type&&h(r.fleet.declaredNetworkRules.queryKey()),("BuiltInRuleChanged"===(s=m.type)||"NetworkRulesSet"===s)&&h(r.fleet.builtInRules.queryKey()),n=m.type,c.has(n)&&(h(r.fleet.networkRules.queryKey()),h(r.fleet.networkRulesDraftChanges.queryKey()),h(r.fleet.explainReach.pathKey())),o=m.type,i.has(o)){if(x().length>0)for(let e of new Set([m.shipId,m.actorShipId]))null!==e&&p(e);h(r.fleet.shipCounts.pathKey()),g()}}}({trpc:e,queryClient:m,reload:(t=new Set,a=new Set,s=e=>m.invalidateQueries({queryKey:e,exact:!0},{cancelRefetch:!1}),n=async e=>{t.add(e.queryHash);let l=e.isBehind;try{for(await s(e.queryKey);l||a.delete(e.queryHash);)l=!1,await s(e.queryKey)}finally{t.delete(e.queryHash)}},e=>{for(let s of m.getQueryCache().findAll({queryKey:e}))t.has(s.queryHash)?a.add(s.queryHash):n({queryHash:s.queryHash,queryKey:s.queryKey,isBehind:"fetching"===s.state.fetchStatus})}),onPlacedFirst:e=>{f(t=>new Set([...t,e]))}})}),g=(0,a.useSubscription)(e.fleet.events.subscriptionOptions({lastEventId:null},{onData:({data:e})=>{p(e)}}));return{live:"connecting"===g.status&&x?"live":function(e){switch(e){case"pending":return"live";case"connecting":return"reconnecting";case"idle":case"error":return"offline"}}(g.status),placedFirstShipIds:h,error:g.error}}])},928459,e=>{"use strict";var t=e.i(621482),a=e.i(954616),s=e.i(912598),l=e.i(731877),n=e.i(427702);function r(e){let t=String(e.attempts-1);return e.isPushed?`Handed ${t} times, never confirmed; fifth refused: undeliverable.`:`Handed (pulled) ${t} times, never acknowledged; fifth receive refused: undeliverable.`}let i="Acknowledged, then its turn died; handed once more, and that turn died too: not handled.";function o(){let e=(0,n.useTRPC)(),t=(0,s.useQueryClient)();return()=>t.invalidateQueries({queryKey:e.fleet.pathKey()})}e.s(["DISMISSED_TOAST",0,{title:"Delivery dismissed",description:"It stays in the timelines as dismissed."},"attentionReason",0,function(e){switch(e.state){case"undeliverable":return r(e);case"notHandled":return null===e.reason?i:`${i} Its crew said: ${e.reason}.`}},"canResend",0,function(e){return!e.message.isPing},"deliveryWithId",0,function(e,t){return e?.find(e=>e.deliveryId===t)},"resentToast",0,function(e){return{title:"Message resent",description:`A new message went to ${function(e){let{recipient:t}=e.message;return"ship"===t.kind?t.ship.name:`any ship of type ${t.type}`}(e)}. The original is dismissed.`}},"undeliverableReason",0,r,"useDismissDelivery",0,function(){let e=(0,n.useTRPC)(),t=o();return(0,a.useMutation)(e.fleet.dismiss.mutationOptions({onSuccess:t}))},"useNeedsAttention",0,function(e={}){let a=(0,n.useTRPC)();return(0,l.pagedListOf)((0,t.useInfiniteQuery)(a.fleet.needsAttention.infiniteQueryOptions({...e,limit:l.CONSOLE_PAGE_SIZE},{getNextPageParam:l.nextCursorOf})))},"useResendDelivery",0,function(){let e=(0,n.useTRPC)(),t=o();return(0,a.useMutation)(e.fleet.resend.mutationOptions({onSuccess:t}))}])}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,395530,e=>{"use strict";var t=e.i(271645),a=e.i(828918),s=e.i(838452),n=e.i(673553);e.s(["useCompositeItem",0,function(e={}){let{highlightItemOnHover:l,highlightedIndex:r,onHighlightedIndexChange:i}=(0,s.useCompositeRootContext)(),{ref:o,index:d}=(0,n.useCompositeListItem)(e),u=r===d,c=t.useRef(null),m=(0,a.useMergedRefs)(o,c);return{compositeProps:{tabIndex:u?0:-1,onFocus(){i(d)},onMouseMove(){let e=c.current;if(!l||!e)return;let t=e.hasAttribute("disabled")||"true"===e.ariaDisabled;u||t||e.focus()}},compositeRef:m,index:d}}])},172410,e=>{"use strict";e.i(247167);var t=e.i(271645);let a=t.createContext(void 0),s={disableStyleElements:!1};e.s(["useCSPContext",0,function(){return t.useContext(a)??s}])},186698,e=>{"use strict";e.s(["serializeValue",0,function(e){if(null==e)return"";if("string"==typeof e)return e;try{return JSON.stringify(e)}catch{return String(e)}}])},590803,e=>{"use strict";e.s(["isElementDisabled",0,function(e){return null==e||e.hasAttribute("disabled")||"true"===e.getAttribute("aria-disabled")}])},713203,265858,484325,42191,450001,818438,e=>{"use strict";var t=e.i(271645);e.s(["useOnFirstRender",0,function(e){let a=t.useRef(!0);a.current&&(a.current=!1,e())}],713203);var a=e.i(229315),s=e.i(883977),n=e.i(146376),l=e.i(388940),r=e.i(990627),i=e.i(46420),o=e.i(156341);e.s(["useFloatingRootContext",0,function(e){let{open:t=!1,onOpenChange:d,elements:u={}}=e,c=(0,s.useId)(),m=null!=(0,i.useFloatingParentNodeId)(),h=(0,l.useRefWithInit)(()=>new o.FloatingRootStore({open:t,transitionStatus:void 0,onOpenChange:d,referenceElement:u.reference??null,floatingElement:u.floating??null,triggerElements:new r.PopupTriggerMap,floatingId:c,syncOnly:!1,nested:m})).current;return(0,n.useIsoLayoutEffect)(()=>{let e={open:t,floatingId:c};void 0!==u.reference&&(e.referenceElement=u.reference,e.domReferenceElement=(0,a.isElement)(u.reference)?u.reference:null),void 0!==u.floating&&(e.floatingElement=u.floating),h.update(e)},[t,c,u.reference,u.floating,h]),h.context.onOpenChange=d,h.context.nested=m,h}],265858);let d=(e,t)=>Object.is(e,t);function u(e,t,a){return null==e||null==t?Object.is(e,t):a(e,t)}function c(e,t,a){return!!e&&e.some(e=>void 0!==e&&u(t,e,a))}function m(e,t,a){return e?e.findIndex(e=>void 0!==e&&u(e,t,a)):-1}function h(e,t,a,s){let n=s&&Array.isArray(t)?e.findIndex(function(e,t){if(t!==d)return a=>c(e,a,t);let a=new Set(e);return a.delete(void 0),t=>a.has(t)&&(0!==t||e.some(e=>Object.is(t,e)))}(t,a)):m(e,t,a);return -1===n?null:n}e.s(["compareItemEquality",0,u,"defaultItemEquality",0,d,"findItemIndex",0,m,"findSelectionIndex",0,h,"isSelectedValueDirty",0,function(e,t,a){return Array.isArray(e)&&Array.isArray(t)?!function(e,t,a=Object.is){let{length:s}=e;if(s!==t.length)return!1;for(let n=0;n<s;n+=1)if(!a(e[n],t[n]))return!1;return!0}(e,t,(e,t)=>u(e,t,a)):e!==t},"removeItem",0,function(e,t,a){return e.filter(e=>!u(t,e,a))},"resolveSelectedIndex",0,function(e,t,a,s,n,l){return c(s,t,n)?null!=l&&e>l&&c(s,a[l],n)?l:e:e===l?h(a,s,n,!0):l},"selectedValueIncludes",0,c],484325);var f=e.i(186698),x=e.i(843476);function p(e){var t;return"object"==typeof(t=e?.[0])&&null!=t&&Array.isArray(t.items)}function g(e){return p(e)?e.flatMap(e=>e.items):e}function b(e,t){if(t&&null!=e)return t(e)??"";if(e&&"object"==typeof e){if("label"in e&&null!=e.label)return String(e.label);if("value"in e)return String(e.value)}return(0,f.serializeValue)(e)}function v(e,t,a){if(a&&null!=e)return a(e);if(e&&"object"==typeof e&&"label"in e&&null!=e.label)return e.label;if(t&&!Array.isArray(t))return(Object.hasOwn(t,e)?t[e]:void 0)??b(e,a);if(Array.isArray(t)){let s=g(t);if(null==e||"object"!=typeof e){let t=s.find(t=>t.value===e);return t&&null!=t.label?t.label:b(e,a)}if("value"in e){let t=s.find(t=>t&&t.value===e.value);if(t&&null!=t.label)return t.label}}return b(e,a)}e.s(["flattenLeafItems",0,g,"hasNullItemLabel",0,function(e){if(!Array.isArray(e))return null!=e&&"null"in e;if(p(e)){for(let t of e)for(let e of t.items)if(e&&null==e.value&&null!=e.label)return!0;return!1}for(let t of e)if(t&&null==t.value&&null!=t.label)return!0;return!1},"isGroupedItems",0,p,"resolveMultipleLabels",0,function(e,a,s){return e.reduce((e,n,l)=>(l>0&&e.push(", "),e.push((0,x.jsx)(t.Fragment,{children:v(n,a,s)},l)),e),[])},"resolveSelectedLabel",0,v,"stringifyAsLabel",0,b,"stringifyAsValue",0,function(e,t){return t&&null!=e?t(e)??"":e&&"object"==typeof e&&"value"in e&&"label"in e?(0,f.serializeValue)(e.value):(0,f.serializeValue)(e)}],42191),e.s(["getDefaultLabelId",0,function(e){return null==e?void 0:`${e}-label`},"resolveAriaLabelledBy",0,function(e,t){return e??t}],450001);var y=e.i(552245);let j=t.forwardRef(function(e,t){let{className:a,render:s,orientation:n="horizontal",style:l,...r}=e;return(0,y.useRenderElement)("div",e,{state:{orientation:n},ref:t,props:[{role:"presentation"},r]})});e.s(["ListboxSeparator",0,j],818438)},792150,e=>{"use strict";var t=e.i(456420);let a={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"}]]};a.node;let s=(0,t.default)(a);e.s(["Boxes",0,s],792150)},24071,e=>{"use strict";var t=e.i(456420);let a={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};a.node;let s=(0,t.default)(a);e.s(["ChevronLeft",0,s],24071)},867927,e=>{"use strict";var t=e.i(456420);let a={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};a.node;let s=(0,t.default)(a);e.s(["ChevronRight",0,s],867927)},275043,446513,e=>{"use strict";var t=e.i(456420);let a={name:"circle-question-mark",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["help-circle","circle-help"]};a.node;let s=(0,t.default)(a);e.s(["default",0,s],275043);let n={name:"monitor",size:24,node:[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]};n.node;let l=(0,t.default)(n);e.s(["Monitor",0,l],446513)},386247,e=>{"use strict";var t=e.i(456420);let a={name:"ellipsis",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],aliases:["more-horizontal"]};a.node;let s=(0,t.default)(a);e.s(["Ellipsis",0,s],386247)},515281,e=>{"use strict";var t=e.i(456420);let a={name:"pencil",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};a.node;let s=(0,t.default)(a);e.s(["Pencil",0,s],515281)},77071,e=>{"use strict";var t=e.i(456420);let a={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};a.node;let s=(0,t.default)(a);e.s(["Plus",0,s],77071)},566595,e=>{"use strict";var t=e.i(456420);let a={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};a.node;let s=(0,t.default)(a);e.s(["Search",0,s],566595)},819759,e=>{"use strict";var t=e.i(456420);let a={name:"square-pen",size:24,node:[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],aliases:["pen-box","edit","pen-square"]};a.node;let s=(0,t.default)(a);e.s(["SquarePen",0,s],819759)},868401,e=>{"use strict";var t=e.i(456420);let a={name:"tags",size:24,node:[["path",{d:"M13.172 2a2 2 0 0 1 1.414.586l6.71 6.71a2.4 2.4 0 0 1 0 3.408l-4.592 4.592a2.4 2.4 0 0 1-3.408 0l-6.71-6.71A2 2 0 0 1 6 9.172V3a1 1 0 0 1 1-1z",key:"16rjxf"}],["path",{d:"M2 7v6.172a2 2 0 0 0 .586 1.414l6.71 6.71a2.4 2.4 0 0 0 3.191.193",key:"178nd4"}],["circle",{cx:"10.5",cy:"6.5",r:".5",fill:"currentColor",key:"12ikhr"}]]};a.node;let s=(0,t.default)(a);e.s(["Tags",0,s],868401)},759659,e=>{"use strict";var t=e.i(456420);let a={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"]};a.node;let s=(0,t.default)(a);e.s(["Trash2",0,s],759659)},298260,e=>{"use strict";var t=e.i(843476),a=e.i(965324);e.s(["Kbd",0,function({className:e,...s}){return(0,t.jsx)("kbd",{"data-slot":"kbd",className:(0,a.classNames)("inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-xs border border-border bg-muted px-1.25 font-sans text-micro font-medium text-muted-foreground max-sm:hidden",e),...s})}])},638919,e=>{"use strict";var t=e.i(843476),a=e.i(353753),s=e.i(225913),n=e.i(560964),l=e.i(965324),r=e.i(574296);let i=(0,s.cva)("fixed z-50 flex flex-col bg-popover text-body text-popover-foreground shadow-lg outline-none duration-(--duration-slow) ease-(--ease-standard) data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",{variants:{side:{right:"inset-y-0 right-0 h-full w-full border-l border-border sm:max-w-(--size-sheet) motion-safe:data-open:slide-in-from-right motion-safe:data-closed:slide-out-to-right",bottom:"inset-x-0 bottom-0 max-h-[90dvh] rounded-t-2xl border-t border-border px-4 pt-2 pb-[max(calc(var(--spacing)*4),env(safe-area-inset-bottom))] motion-safe:data-open:slide-in-from-bottom motion-safe:data-closed:slide-out-to-bottom"}},defaultVariants:{side:"right"}});e.s(["Sheet",0,function(e){return(0,t.jsx)(a.Dialog.Root,{"data-slot":"sheet",...e})},"SheetBody",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"sheet-body",className:(0,l.classNames)("min-h-0 flex-1 overflow-y-auto in-data-[side=right]:p-6",e),...a})},"SheetClose",0,function(e){return(0,t.jsx)(a.Dialog.Close,{"data-slot":"sheet-close",...e})},"SheetContent",0,function({className:e,children:s,side:o="right",...d}){return(0,t.jsxs)(a.Dialog.Portal,{children:[(0,t.jsx)(a.Dialog.Backdrop,{"data-slot":"sheet-overlay",className:"fixed inset-0 z-50 bg-overlay duration-(--duration-slow) data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0"}),(0,t.jsxs)(a.Dialog.Popup,{"data-slot":"sheet-content","data-side":o,className:(0,l.classNames)(i({side:o}),e),...d,children:["bottom"===o?(0,t.jsx)("div",{"aria-hidden":!0,className:"mx-auto mb-3 h-1 w-9 shrink-0 rounded-full bg-border"}):(0,t.jsx)(a.Dialog.Close,{"data-slot":"sheet-close",render:(0,t.jsx)(r.Button,{variant:"ghost",size:"sm",isIconOnly:!0,className:"absolute top-4 right-4","aria-label":"Close"}),children:(0,t.jsx)(n.XIcon,{})}),s]})]})},"SheetDescription",0,function({className:e,...s}){return(0,t.jsx)(a.Dialog.Description,{"data-slot":"sheet-description",className:(0,l.classNames)("text-meta text-muted-foreground",e),...s})},"SheetFooter",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"sheet-footer",className:(0,l.classNames)("flex flex-col-reverse gap-2 pt-3 in-data-[side=right]:flex-row in-data-[side=right]:justify-end in-data-[side=right]:border-t in-data-[side=right]:px-6 in-data-[side=right]:py-4",e),...a})},"SheetHeader",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"sheet-header",className:(0,l.classNames)("flex flex-col gap-0.5 in-data-[side=right]:border-b in-data-[side=right]:px-6 in-data-[side=right]:py-5 in-data-[side=right]:pr-14",e),...a})},"SheetTitle",0,function({className:e,...s}){return(0,t.jsx)(a.Dialog.Title,{"data-slot":"sheet-title",className:(0,l.classNames)("text-heading font-semibold text-foreground in-data-[side=bottom]:py-2 in-data-[side=bottom]:text-section",e),...s})},"SheetTrigger",0,function(e){return(0,t.jsx)(a.Dialog.Trigger,{"data-slot":"sheet-trigger",...e})}])},581785,e=>{"use strict";var t=e.i(843476),a=e.i(77071),s=e.i(271645),n=e.i(574296),l=e.i(792150),r=e.i(386247),i=e.i(515281),o=e.i(566595),d=e.i(749287),u=e.i(586875),c=e.i(868401),m=e.i(759659),h=e.i(522016),f=e.i(965324),x=e.i(407242),p=e.i(34512),g=e.i(280581),b=e.i(212470),v=e.i(946033),y=e.i(414732),j=e.i(67874),w=e.i(817981),N=e.i(188393);let k={"trierarch-plugin":u.ShipWheel,squadrons:l.Boxes,ship:d.Ship};function S(e,t){return`${String(e)} ${1===e?t:`${t}s`}`}function C({value:e}){return(0,t.jsxs)(h.default,{href:`/?label=${e.valueId}`,"data-testid":"labels-value",title:`${e.value}: on ${0===e.shipCount?"no ship":S(e.shipCount,"ship")}`,className:(0,f.classNames)("inline-flex h-6 items-center gap-1.5 rounded-sm border border-border bg-secondary px-2 font-mono text-id hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring",0===e.shipCount?"text-muted-foreground":"text-foreground"),children:[(0,t.jsx)("span",{className:"font-medium",children:e.value}),(0,t.jsx)("span",{className:"font-sans text-caption text-muted-foreground tabular-nums",children:e.shipCount})]})}function I({owner:e}){let a="none"===e.mark?null:k[e.mark];return(0,t.jsxs)("span",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 font-medium [&_svg]:size-(--size-icon-sm) [&_svg]:text-muted-foreground",children:[null===a?null:(0,t.jsx)(a,{"aria-hidden":!0}),e.name,e.isYours?(0,t.jsx)("span",{className:"font-normal text-muted-foreground",children:"(you)"}):null]}),(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:e.isYours?"Only you assign it":`Read-only: only ${e.name} assigns it`})]})}function D({row:e,onChangeValues:a,onDelete:s}){if(!e.owner.isYours||void 0===a&&void 0===s)return null;let l=e.shipCount>0;return(0,t.jsxs)(x.DropdownMenu,{children:[(0,t.jsx)(x.DropdownMenuTrigger,{render:(0,t.jsx)(n.Button,{variant:"ghost",size:"sm",isIconOnly:!0,"aria-label":`Actions for ${e.key}`,icon:(0,t.jsx)(r.Ellipsis,{}),"data-testid":"labels-row-menu"})}),(0,t.jsxs)(x.DropdownMenuContent,{align:"end",children:[void 0===a?null:(0,t.jsxs)(x.DropdownMenuItem,{"data-testid":"labels-change-values",onClick:()=>{a(e)},children:[(0,t.jsx)(i.Pencil,{"aria-hidden":!0}),"Change values…"]}),void 0===s?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(x.DropdownMenuSeparator,{}),(0,t.jsxs)(x.DropdownMenuItem,{variant:"destructive",disabled:l,"data-testid":"labels-delete",className:"h-auto min-h-8.5 py-1.5",onClick:()=>{s(e)},children:[(0,t.jsx)(m.Trash2,{"aria-hidden":!0}),(0,t.jsxs)("span",{className:"flex flex-col",children:["Delete label…",l?(0,t.jsx)("span",{className:"text-caption text-muted-foreground",children:"Only when no ship carries it"}):null]})]})]})]})]})}function R({rows:e,shipTotal:l,error:r,onRetry:i,onDefine:d,onChangeValues:u,onDelete:m}){let h=(0,p.useConsoleConstants)(),[f,x]=(0,s.useState)(""),[k,z]=(0,s.useState)("all");if(void 0!==r)return(0,t.jsx)(w.InlineError,{variant:"page",title:"Couldn’t load labels",description:"This page couldn’t reach the fleet server. Nothing changed; your labels are where you left them.",detail:r,onRetry:i});if(void 0===e)return(0,t.jsx)(N.LoadingSkeleton,{variant:"table",rows:5,label:"Loading labels"});if(0===e.length)return(0,t.jsx)(j.EmptyState,{icon:(0,t.jsx)(c.Tags,{"aria-hidden":!0}),title:"No labels yet",description:"A label is a key with a set of values, like os with macos and linux. Define one, then assign it on ship pages to filter the fleet and to place crew requests on machines.",action:void 0===d?void 0:(0,t.jsx)(n.Button,{variant:"primary",icon:(0,t.jsx)(a.Plus,{}),onClick:d,children:"Define a label"})});let A=[...new Set(e.map(e=>e.owner.name))],T=e.filter(e=>(0,g.matchesLabelQuery)(e,f)&&("all"===k||e.owner.name===k)),L={all:"All",...Object.fromEntries(A.map(e=>[e,e]))};return(0,t.jsxs)("div",{className:"flex flex-col gap-3","data-testid":"labels-table",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)("div",{className:"w-64 max-sm:min-w-0 max-sm:flex-1",children:(0,t.jsx)(b.Input,{type:"search","aria-label":"Find a key or value",placeholder:"Find a key or value",leadingIcon:(0,t.jsx)(o.Search,{}),value:f,className:"h-(--size-control-sm) text-meta max-sm:h-(--size-control-touch) max-sm:text-input-touch","data-testid":"labels-search",onChange:e=>{x(e.target.value)}})}),(0,t.jsxs)(v.Select,{items:L,value:k,onValueChange:e=>{null!==e&&z(e)},children:[(0,t.jsx)(v.SelectTrigger,{size:"sm","aria-label":"Owner",children:(0,t.jsxs)("span",{className:"flex gap-1.5",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"Owner"}),(0,t.jsx)(v.SelectValue,{className:"font-medium"})]})}),(0,t.jsx)(v.SelectContent,{children:Object.entries(L).map(([e,a])=>(0,t.jsx)(v.SelectItem,{value:e,children:a},e))})]}),(0,t.jsxs)("p",{className:"ml-auto text-meta text-muted-foreground tabular-nums max-sm:w-full",children:[S(e.length,"label")," · ",S(A.length,"owner")]})]}),0===T.length?(0,t.jsx)(j.EmptyState,{variant:"no-results",title:`No label matches “${f.trim()}”.`}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"max-sm:hidden",children:(0,t.jsxs)(y.Table,{"aria-label":"Labels",children:[(0,t.jsx)(y.TableHeader,{children:(0,t.jsxs)(y.TableRow,{children:[(0,t.jsx)(y.TableHead,{children:"Key"}),(0,t.jsx)(y.TableHead,{children:"Values and the ships that carry each"}),(0,t.jsx)(y.TableHead,{children:"Owner"}),(0,t.jsx)(y.TableHead,{children:"Ships"}),(0,t.jsx)(y.TableHead,{children:(0,t.jsx)("span",{className:"sr-only",children:"Actions"})})]})}),(0,t.jsx)(y.TableBody,{children:T.map(e=>(0,t.jsxs)(y.TableRow,{"data-testid":`labels-row-${e.key}`,children:[(0,t.jsx)(y.TableCell,{className:"align-top",children:(0,t.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("span",{className:"font-mono text-body font-medium",children:e.key}),(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:S(e.values.length,"value")})]})}),(0,t.jsx)(y.TableCell,{children:(0,t.jsx)("span",{className:"flex flex-wrap gap-1.5",children:e.values.map(e=>(0,t.jsx)(C,{value:e},e.valueId))})}),(0,t.jsx)(y.TableCell,{className:"max-w-60 align-top",children:(0,t.jsx)(I,{owner:e.owner})}),(0,t.jsx)(y.TableCell,{className:"align-top",children:(0,t.jsxs)("span",{className:"flex flex-col gap-0.5 tabular-nums",children:[(0,t.jsx)("span",{children:e.shipCount}),(0,t.jsxs)("span",{className:"text-meta text-muted-foreground",children:["of ",l]})]})}),(0,t.jsx)(y.TableCell,{className:"w-10 text-right align-top",children:(0,t.jsx)(D,{row:e,onChangeValues:u,onDelete:m})})]},e.labelId))})]})}),(0,t.jsx)("ul",{"aria-label":"Labels",className:"overflow-hidden rounded-lg border border-border bg-card sm:hidden",children:T.map(e=>(0,t.jsxs)("li",{className:"flex flex-col gap-2 border-b border-border px-3.5 py-3 last:border-0","data-testid":`labels-card-${e.key}`,children:[(0,t.jsxs)("span",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("span",{className:"font-mono text-body-touch font-medium",children:e.key}),(0,t.jsxs)("span",{className:"flex items-center gap-1 text-meta text-muted-foreground",children:[S(e.shipCount,"ship"),(0,t.jsx)(D,{row:e,onChangeValues:u,onDelete:m})]})]}),(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:e.owner.isYours?"By you":`By ${e.owner.name} \xb7 read-only`}),(0,t.jsx)("span",{className:"flex flex-wrap gap-1.5",children:e.values.map(e=>(0,t.jsx)(C,{value:e},e.valueId))})]},e.labelId))})]}),(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:`A value opens the fleet overview filtered by it. Keys and values use lowercase letters, digits and -, up to ${String(h.labelHandleMaxLength)} characters; a label has at most ${String(h.labelValuesMax)} values and a ship at most ${String(h.shipLabelsMax)} labels (decision 0031).`})]})}var z=e.i(837631),A=e.i(787964),T=e.i(917540),L=e.i(490262),M=e.i(905387),q=e.i(718423),O=e.i(928459),K=e.i(678485);let P=(0,T.lazyDialog)(()=>e.A(302581).then(e=>e.DefineLabelDialog),e=>e.isOpen),E=(0,T.lazyDialog)(()=>e.A(829886).then(e=>e.DeleteLabelDialog),e=>void 0!==e.row),B=(0,T.lazyDialog)(()=>e.A(803877).then(e=>e.LabelValuesDialog),e=>void 0!==e.row);e.s(["default",0,function(){let e=(0,A.useConsoleFrame)(),l=(0,O.useNeedsAttention)(),r=(0,q.useLiveFleet)(),i=(0,L.useAccess)(),o=(0,M.useFleetLabels)(),d=(0,M.useLabelContext)(),u=(0,M.useActiveShipCount)(),c=(0,M.useDefineLabel)(),m=(0,M.useChangeLabelValues)(),h=(0,M.useDeleteLabel)(),[f,x]=(0,s.useState)(!1),[p,b]=(0,s.useState)(void 0),[v,y]=(0,s.useState)(void 0),[j,w]=(0,s.useState)(void 0),[N,k]=(0,s.useState)(void 0);(0,K.useSignInWhenSessionEnds)([l.error,r.error,o.error]);let S=void 0===d?void 0:(0,g.labelRowsOf)(d),C=i.canDefineLabels,I=S?.find(e=>e.labelId===p),D=S?.find(e=>e.labelId===N),T=e=>{void 0!==I&&(y(e.busy),w(void 0),m.mutate({labelId:I.labelId,values:e.values},{onError:t=>{w({...e.refused,message:t.message})},onSettled:()=>{y(void 0)}}))};return(0,t.jsxs)(z.DetailPage,{switcher:e.switcher,account:e.account,onCompose:e.onCompose,onSearch:e.onSearch,banner:e.banner,title:"Labels",parents:[{href:"/",label:"Fleet overview"}],live:r.live,header:(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4 max-sm:gap-3",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-1",children:[(0,t.jsx)("h1",{className:"text-title font-semibold tracking-tight max-sm:text-title-touch",children:"Labels"}),(0,t.jsx)("p",{className:"text-meta text-muted-foreground max-sm:text-body-touch",children:"An owned vocabulary for selecting ships: filter the fleet with them, and crew requests use them to pick a machine. Only a label’s owner assigns it."})]}),C&&void 0!==S&&S.length>0?(0,t.jsx)(n.Button,{variant:"primary",icon:(0,t.jsx)(a.Plus,{}),className:"max-sm:w-full","data-testid":"labels-define",onClick:()=>{c.reset(),x(!0)},children:"Define a label"}):null]}),children:[(0,t.jsx)(R,{rows:S,shipTotal:u??0,error:o.isError?o.error.message:void 0,onRetry:()=>{o.refetch()},onDefine:C?()=>{c.reset(),x(!0)}:void 0,onChangeValues:C?e=>{w(void 0),b(e.labelId)}:void 0,onDelete:C?e=>{h.reset(),k(e.labelId)}:void 0}),C?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(P,{isOpen:f,onOpenChange:x,isPending:c.isPending,error:c.error?.message,onSubmit:e=>{c.mutate(e,{onSuccess:()=>{x(!1)}})}}),(0,t.jsx)(B,{row:I,onOpenChange:e=>{e||b(void 0)},busy:v,error:j,onAdd:e=>{T({values:[...I?.values.map(e=>e.value)??[],e],busy:{action:"add",value:e},refused:{value:e}})},onRemove:e=>{let t=I?.values.find(t=>t.valueId===e);T({values:I?.values.filter(t=>t.valueId!==e).map(e=>e.value)??[],busy:{action:"remove",valueId:e},refused:{valueId:e,value:t?.value??""}})}}),(0,t.jsx)(E,{row:D,onOpenChange:e=>{e||k(void 0)},isPending:h.isPending,error:h.error?.message,onDelete:e=>{h.mutate({labelId:e},{onSuccess:()=>{k(void 0)}})}})]}):null]})}],581785)},219321,e=>{"use strict";var t=e.i(843476),a=e.i(965324);e.s(["Skeleton",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"skeleton","aria-hidden":!0,className:(0,a.classNames)("animate-pulse rounded-sm bg-secondary [animation-duration:var(--duration-pulse)] motion-reduce:animate-none",e),...s})}])},414732,e=>{"use strict";var t=e.i(843476),a=e.i(456420);let s={name:"arrow-down",size:24,node:[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]};s.node;let n=(0,a.default)(s),l={name:"arrow-up",size:24,node:[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]};l.node;let r=(0,a.default)(l),i={name:"chevrons-up-down",size:24,node:[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]};i.node;let o=(0,a.default)(i);var d=e.i(965324);function u({className:e,...a}){return(0,t.jsx)("th",{"data-slot":"table-head",className:(0,d.classNames)("px-4 text-left align-middle text-caption font-medium whitespace-nowrap text-muted-foreground",e),...a})}e.s(["Table",0,function({className:e,...a}){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,d.classNames)("w-full caption-bottom text-body",e),...a})})},"TableBody",0,function({className:e,...a}){return(0,t.jsx)("tbody",{"data-slot":"table-body",className:(0,d.classNames)("[&_tr:last-child]:border-0",e),...a})},"TableCell",0,function({className:e,...a}){return(0,t.jsx)("td",{"data-slot":"table-cell",className:(0,d.classNames)("px-4 align-middle",e),...a})},"TableHead",0,u,"TableHeader",0,function({className:e,...a}){return(0,t.jsx)("thead",{"data-slot":"table-header",className:(0,d.classNames)("bg-muted [&_tr]:border-b",e),...a})},"TableRow",0,function({className:e,...a}){return(0,t.jsx)("tr",{"data-slot":"table-row",className:(0,d.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),...a})},"TableSortHead",0,function({direction:e,onSort:a,children:s,className:l,...i}){return(0,t.jsx)(u,{"aria-sort":e??"none",className:(0,d.classNames)("px-2",l),...i,children:(0,t.jsxs)("button",{type:"button",onClick:a,className:"inline-flex h-7 items-center gap-1 rounded-sm px-2 font-medium hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring data-sorted:text-foreground","data-sorted":null===e?void 0:"",children:[s,(0,t.jsx)("ascending"===e?r:"descending"===e?n:o,{"aria-hidden":!0,className:(0,d.classNames)("size-3.5 shrink-0",null===e?"opacity-50":void 0)})]})})}],414732)},67874,e=>{"use strict";var t=e.i(843476),a=e.i(965324);e.s(["EmptyState",0,function({title:e,description:s,icon:n,action:l,variant:r="page",className:i}){return"section"===r?(0,t.jsxs)("p",{"data-slot":"empty-state","data-variant":r,className:(0,a.classNames)("rounded-lg border border-border px-4 py-3 text-center text-meta text-muted-foreground",i),children:[e,s?(0,t.jsxs)(t.Fragment,{children:[" ",s]}):null]}):"no-results"===r?(0,t.jsxs)("div",{"data-slot":"empty-state","data-variant":r,className:(0,a.classNames)("flex flex-col items-center gap-2.5 rounded-lg border border-border bg-card px-4 py-6 text-center",i),children:[(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:e}),l]}):(0,t.jsxs)("div",{"data-slot":"empty-state","data-variant":r,className:(0,a.classNames)("flex flex-col items-center gap-3 rounded-lg border border-dashed border-border bg-card px-6 py-10 text-center",i),children:[n?(0,t.jsx)("span",{"aria-hidden":!0,className:"flex size-10 items-center justify-center rounded-lg border border-border bg-muted text-muted-foreground [&_svg]:size-(--size-icon-xl)",children:n}):null,(0,t.jsx)("h2",{className:"text-heading font-semibold text-foreground max-sm:text-heading-touch",children:e}),s?(0,t.jsx)("p",{className:"max-w-96 text-meta text-muted-foreground max-sm:text-body-touch",children:s}):null,l?(0,t.jsx)("div",{className:"mt-1 max-sm:w-full max-sm:[&>*]:w-full",children:l}):null]})}])},188393,e=>{"use strict";var t=e.i(843476),a=e.i(965324),s=e.i(219321);function n(e){return Array.from({length:e},(e,t)=>`row-${String(t)}`)}e.s(["LoadingSkeleton",0,function({variant:e,rows:l=4,label:r="Loading",className:i}){return(0,t.jsxs)("div",{role:"status","data-slot":"loading-skeleton","data-variant":e,className:(0,a.classNames)("w-full",i),children:[(0,t.jsx)("span",{className:"sr-only",children:r}),"table"===e?(0,t.jsxs)("div",{className:"overflow-hidden rounded-lg border border-border bg-card shadow-sm",children:[(0,t.jsx)("div",{className:"h-(--size-row-header) border-b border-border bg-muted"}),n(l).map(e=>(0,t.jsxs)("div",{className:"flex h-(--size-row) items-center gap-8 border-b border-border px-4 last:border-0",children:[(0,t.jsx)(s.Skeleton,{className:"h-2.5 w-24"}),(0,t.jsx)(s.Skeleton,{className:"h-5 w-16"}),(0,t.jsx)(s.Skeleton,{className:"h-5 w-20"}),(0,t.jsx)(s.Skeleton,{className:"h-2.5 w-28"})]},e))]}):null,"cards"===e?(0,t.jsx)("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:n(4).map(e=>(0,t.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-4",children:[(0,t.jsx)(s.Skeleton,{className:"h-2.5 w-20"}),(0,t.jsx)(s.Skeleton,{className:"h-6 w-10"}),(0,t.jsx)(s.Skeleton,{className:"h-2.5 w-28"})]},e))}):null,"detail"===e?(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsx)(s.Skeleton,{className:"h-7 w-48"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(s.Skeleton,{className:"h-5 w-20"}),(0,t.jsx)(s.Skeleton,{className:"h-5 w-16"})]}),(0,t.jsx)(s.Skeleton,{className:"h-16 w-full rounded-lg"})]}):null,"list"===e?(0,t.jsx)("div",{className:"overflow-hidden rounded-lg border border-border bg-card",children:n(l).map(e=>(0,t.jsxs)("div",{className:"flex flex-col gap-2.5 border-b border-border px-3.5 py-3 last:border-0",children:[(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)(s.Skeleton,{className:"h-3 w-28"}),(0,t.jsx)(s.Skeleton,{className:"h-5 w-16"})]}),(0,t.jsx)(s.Skeleton,{className:"h-2.5 w-44"})]},e))}):null]})}])},837631,e=>{"use strict";var t=e.i(843476),a=e.i(577880),s=e.i(485538);e.s(["DetailPage",0,function({title:e,parents:n,header:l,children:r,sheet:i,live:o,switcher:d,account:u,onCompose:c,onSearch:m,banner:h}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.Header,{breadcrumb:e,parents:n,live:o,switcher:d,account:u,onCompose:c,onSearch:m}),h,(0,t.jsx)(s.TopBar,{title:e,live:o,back:n[n.length-1]??n[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,r]}),i]})}])},577880,485538,e=>{"use strict";var t=e.i(843476),a=e.i(566595),s=e.i(374368),n=e.i(574296),l=e.i(298260),r=e.i(704974),i=e.i(965324);function o({switcher:e,account:d,onSearch:u,searchLabel:c="Search or jump to",children:m,actions:h,className:f}){return(0,t.jsxs)("header",{"data-slot":"app-header",className:(0,i.classNames)("sticky top-0 z-30 flex h-(--size-header) shrink-0 items-center justify-between gap-4 border-b border-border bg-background px-6",f),children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[void 0===e?(0,t.jsx)("span",{"data-testid":"app-switcher-loading","aria-hidden":!0,className:"h-4 w-36 shrink-0 animate-pulse rounded bg-muted motion-reduce:animate-none"}):(0,t.jsx)(s.AppSwitcher,{switcher:e,layout:"full",className:"shrink-0"}),m]}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-3",children:[h,u?(0,t.jsxs)(n.Button,{size:"sm",icon:(0,t.jsx)(a.Search,{"aria-hidden":!0}),"data-testid":"header-search",className:"w-60 justify-start font-normal text-muted-foreground max-lg:w-auto",onClick:u,children:[(0,t.jsx)("span",{className:"grow text-left max-lg:sr-only",children:c}),(0,t.jsx)(l.Kbd,{children:"⌘K"})]}):null,(0,t.jsx)(r.AvatarMenu,{...d})]})]})}var d=e.i(867927),u=e.i(819759),c=e.i(522016);let m={live:{label:"Live",dot:"bg-tone-ok-fg"},reconnecting:{label:"Reconnecting",dot:"bg-tone-waiting-fg"},offline:{label:"Offline",dot:"bg-tone-attention-fg"}};function h({state:e,className:a}){let{label:s,dot:n}=m[e];return(0,t.jsxs)("span",{"data-slot":"live-status","data-state":e,"aria-live":"polite",className:(0,i.classNames)("inline-flex items-center gap-1.5 text-meta text-muted-foreground",a),children:[(0,t.jsx)("span",{"aria-hidden":!0,className:(0,i.classNames)("size-2 shrink-0 rounded-full",n)}),s]})}e.s(["Header",0,function({breadcrumb:e,parents:a=[],live:s,switcher:l,account:r,onCompose:i,onSearch:m}){return(0,t.jsxs)(o,{switcher:l,account:r,onSearch:m,searchLabel:"Search ships or jump to",className:"hidden sm:flex",actions:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h,{state:s}),i?(0,t.jsx)(n.Button,{size:"sm",icon:(0,t.jsx)(u.SquarePen,{"aria-hidden":!0}),"data-testid":"header-compose",onClick:i,children:"Compose"}):null]}),children:[(0,t.jsx)(d.ChevronRight,{"aria-hidden":!0,className:"size-3.5 shrink-0 text-muted-foreground"}),(0,t.jsx)("nav",{"aria-label":"Breadcrumb","data-testid":"header-breadcrumb",className:"min-w-0 text-body",children:(0,t.jsxs)("ol",{className:"flex min-w-0 items-center gap-1.5",children:[a.map(e=>(0,t.jsxs)("li",{className:"flex shrink-0 items-center gap-1.5",children:[(0,t.jsx)(c.default,{href:e.href,className:"text-muted-foreground hover:text-foreground hover:underline",children:e.label}),(0,t.jsx)(d.ChevronRight,{"aria-hidden":!0,className:"size-3.5 text-muted-foreground"})]},e.href)),(0,t.jsx)("li",{"aria-current":"page",className:"truncate font-medium text-foreground",children:e})]})})]})}],577880);var f=e.i(24071);e.s(["TopBar",0,function({title:e,live:l,actions:i,back:o,switcher:d,account:u,onSearch:m}){let x=m&&!o?m:void 0;return(0,t.jsxs)("header",{"data-slot":"top-bar","data-mode":o?"detail":"root",className:"sticky top-0 z-30 flex h-(--size-header) items-center gap-2.5 border-b border-border bg-background px-4 sm:hidden",children:[o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(c.default,{href:o.href,className:"-ml-1.5 inline-flex h-(--size-control-touch) shrink-0 items-center gap-0.5 rounded-md pr-2 text-body-touch text-foreground focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon)",children:[(0,t.jsx)(f.ChevronLeft,{"aria-hidden":!0}),o.label]}),(0,t.jsx)("p",{className:"min-w-0 flex-1 truncate text-center text-body-touch font-semibold text-foreground",children:e})]}):d?(0,t.jsx)(s.AppSwitcher,{switcher:d,layout:"compact",className:"min-w-0"}):(0,t.jsx)("p",{className:"truncate px-1.5 text-title-touch font-semibold text-foreground",children:"Console"}),(0,t.jsx)(h,{state:l}),i||x||u&&!o?(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[x?(0,t.jsx)(n.Button,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Search ships or jump to","data-testid":"top-bar-search",onClick:x,children:(0,t.jsx)(a.Search,{"aria-hidden":!0})}):null,i,u&&!o?(0,t.jsx)(r.AvatarMenuSheet,{...u}):null]}):null]})}],485538)},718423,e=>{"use strict";var t=e.i(912598),a=e.i(905861),s=e.i(271645),n=e.i(586413),l=e.i(123938),r=e.i(427702);let i=new Set(["FleetInitialised","ShipCommissioned","ShipClaimed","LeaseRevoked","CredentialRevoked","StartingPromptIssued","ShipRetired","DeliveryAcknowledged","DeliveryUndeliverable","ShipReported","CrewRequested","CrewRequestRemoved","CrewAssigned","CrewStatusChanged","CrewRequestExplained","CrewRequestGivenBack","LabelAssigned","LabelUnassigned","LabelRetired"]);function o(e,t){return e.pages.some(e=>e.items.some(e=>e.id===t))}let d=new Set(["LabelDefined","LabelValuesChanged","LabelRetired","LabelAssigned","LabelUnassigned","LabelDeleted"]),u=new Set(["DeliveryUndeliverable","DeliveryNotHandled","DeliveryDismissed"]),c=new Set(["NetworkRulesSet","NetworkRulesDraftSaved","NetworkRulesDraftDiscarded","NetworkRulesDeclared","BuiltInRuleChanged"]);e.s(["useLiveFleet",0,function(){let e=(0,r.useTRPC)(),m=(0,t.useQueryClient)(),[h,f]=(0,s.useState)(new Set),x=(0,l.useIsReopening)(),[p]=(0,s.useState)(()=>{let t,a,s,l;return function(e){var t;let a,s,l,{trpc:r,queryClient:m,reload:h}=e,f=[...r.fleet.list.infiniteQueryKey()],x=()=>m.getQueriesData({queryKey:f}).flatMap(([,e])=>void 0===e?[]:[e]),p=(t={readRow:e=>m.query({...r.fleet.listedShip.queryOptions({shipId:e}),staleTime:0}),writeRow:t=>{let a=x().some(e=>!o(e,t.id));m.setQueriesData({queryKey:f},e=>e&&function(e,t){if(o(e,t.id))return{...e,pages:e.pages.map(e=>{var a;return{...e,items:(a=e.items,a.map(e=>e.id===t.id?t:e))}})};let[a,...s]=e.pages;return void 0===a?e:{...e,pages:[{...a,items:[t,...a.items]},...s]}}(e,t)),a&&e.onPlacedFirst(t.id)}},a=new Set,s=new Set,l=async e=>{a.add(e);try{do s.delete(e),t.writeRow(await t.readRow(e));while(s.has(e))}catch{}finally{a.delete(e),s.delete(e)}},e=>{a.has(e)?s.add(e):l(e)}),g=()=>{h(r.fleet.stuckCount.queryKey()),h(r.fleet.stuckSummary.queryKey()),h(r.fleet.stuck.pathKey())};return e=>{var t,a,s,l,o;if("resync"===e.kind){h(r.fleet.pathKey()),h(n.INBOX_KEY);return}let{event:m}=e;for(let e of new Set([m.shipId,m.actorShipId]))null!==e&&(h(r.fleet.ship.queryKey({shipId:e})),h(r.fleet.shipTimeline.infiniteQueryKey({shipId:e})),h(r.fleet.shipWay.queryKey({shipId:e})));if(null!==m.messageId&&(h(r.fleet.shipMessages.pathKey()),h(r.fleet.shipWay.pathKey()),h(r.fleet.message.queryKey({messageId:m.messageId})),h(r.fleet.inbox.pathKey()),h(r.fleet.inboxCount.queryKey()),h(n.INBOX_KEY),g()),"DeliveryAcknowledged"===m.type&&h(r.fleet.acknowledged.queryKey()),t=m.type,u.has(t)&&h(r.fleet.needsAttention.pathKey()),a=m.type,d.has(a)&&h(r.fleet.labels.queryKey()),"NetworkRulesDeclared"===m.type&&h(r.fleet.declaredNetworkRules.queryKey()),("BuiltInRuleChanged"===(s=m.type)||"NetworkRulesSet"===s)&&h(r.fleet.builtInRules.queryKey()),l=m.type,c.has(l)&&(h(r.fleet.networkRules.queryKey()),h(r.fleet.networkRulesDraftChanges.queryKey()),h(r.fleet.explainReach.pathKey())),o=m.type,i.has(o)){if(x().length>0)for(let e of new Set([m.shipId,m.actorShipId]))null!==e&&p(e);h(r.fleet.shipCounts.pathKey()),g()}}}({trpc:e,queryClient:m,reload:(t=new Set,a=new Set,s=e=>m.invalidateQueries({queryKey:e,exact:!0},{cancelRefetch:!1}),l=async e=>{t.add(e.queryHash);let n=e.isBehind;try{for(await s(e.queryKey);n||a.delete(e.queryHash);)n=!1,await s(e.queryKey)}finally{t.delete(e.queryHash)}},e=>{for(let s of m.getQueryCache().findAll({queryKey:e}))t.has(s.queryHash)?a.add(s.queryHash):l({queryHash:s.queryHash,queryKey:s.queryKey,isBehind:"fetching"===s.state.fetchStatus})}),onPlacedFirst:e=>{f(t=>new Set([...t,e]))}})}),g=(0,a.useSubscription)(e.fleet.events.subscriptionOptions({lastEventId:null},{onData:({data:e})=>{p(e)}}));return{live:"connecting"===g.status&&x?"live":function(e){switch(e){case"pending":return"live";case"connecting":return"reconnecting";case"idle":case"error":return"offline"}}(g.status),placedFirstShipIds:h,error:g.error}}])},928459,415168,e=>{"use strict";var t=e.i(621482),a=e.i(954616),s=e.i(912598),n=e.i(731877),l=e.i(427702);function r(e){switch(e.kind){case"type":return`any ship of type ${e.type}`;case"meeting":return`every other participant of meeting ${e.meetingId}`}}function i(e){let t=String(e.attempts-1);return e.isPushed?`Handed ${t} times, never confirmed; fifth refused: undeliverable.`:`Handed (pulled) ${t} times, never acknowledged; fifth receive refused: undeliverable.`}e.s(["recipientGroupWords",0,r],415168);let o="Acknowledged, then its turn died; handed once more, and that turn died too: not handled.";function d(){let e=(0,l.useTRPC)(),t=(0,s.useQueryClient)();return()=>t.invalidateQueries({queryKey:e.fleet.pathKey()})}e.s(["DISMISSED_TOAST",0,{title:"Delivery dismissed",description:"It stays in the timelines as dismissed."},"attentionReason",0,function(e){switch(e.state){case"undeliverable":return i(e);case"notHandled":return null===e.reason?o:`${o} Its crew said: ${e.reason}.`}},"canResend",0,function(e){return!e.message.isPing},"deliveryWithId",0,function(e,t){return e?.find(e=>e.deliveryId===t)},"resentToast",0,function(e){return{title:"Message resent",description:`A new message went to ${function(e){let{recipient:t}=e.message;return"ship"===t.kind?t.ship.name:r(t)}(e)}. The original is dismissed.`}},"undeliverableReason",0,i,"useDismissDelivery",0,function(){let e=(0,l.useTRPC)(),t=d();return(0,a.useMutation)(e.fleet.dismiss.mutationOptions({onSuccess:t}))},"useNeedsAttention",0,function(e={}){let a=(0,l.useTRPC)();return(0,n.pagedListOf)((0,t.useInfiniteQuery)(a.fleet.needsAttention.infiniteQueryOptions({...e,limit:n.CONSOLE_PAGE_SIZE},{getNextPageParam:n.nextCursorOf})))},"useResendDelivery",0,function(){let e=(0,l.useTRPC)(),t=d();return(0,a.useMutation)(e.fleet.resend.mutationOptions({onSuccess:t}))}],928459)}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,395530,e=>{"use strict";var t=e.i(271645),a=e.i(828918),r=e.i(838452),n=e.i(673553);e.s(["useCompositeItem",0,function(e={}){let{highlightItemOnHover:s,highlightedIndex:i,onHighlightedIndexChange:l}=(0,r.useCompositeRootContext)(),{ref:o,index:d}=(0,n.useCompositeListItem)(e),c=i===d,u=t.useRef(null),m=(0,a.useMergedRefs)(o,u);return{compositeProps:{tabIndex:c?0:-1,onFocus(){l(d)},onMouseMove(){let e=u.current;if(!s||!e)return;let t=e.hasAttribute("disabled")||"true"===e.ariaDisabled;c||t||e.focus()}},compositeRef:m,index:d}}])},172410,e=>{"use strict";e.i(247167);var t=e.i(271645);let a=t.createContext(void 0),r={disableStyleElements:!1};e.s(["useCSPContext",0,function(){return t.useContext(a)??r}])},381104,e=>{"use strict";var t=e.i(146376),a=e.i(388940),r=e.i(469690);e.s(["useRegisterFieldControl",0,function(e,n,s,i,l=!0,o){let{registerFieldControl:d}=(0,r.useFieldRootContext)(),c=(0,a.useRefWithInit)(()=>Symbol());(0,t.useIsoLayoutEffect)(()=>{let t=c.current;l?d(t,{controlRef:e,getValue:i,id:n,name:o,value:s}):d(t,void 0)},[e,l,i,n,o,d,c,s]),(0,t.useIsoLayoutEffect)(()=>{let e=c.current;return()=>{d(e,void 0)}},[d,c])}])},469690,875812,e=>{"use strict";var t=e.i(733332),a=e.i(271645),r=e.i(956789);let n={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},s={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},i={disabled:!1,...s};e.s(["DEFAULT_FIELD_ROOT_STATE",0,i,"DEFAULT_FIELD_STATE_ATTRIBUTES",0,s,"DEFAULT_VALIDITY_STATE",0,n,"fieldValidityMapping",0,{valid:e=>null===e?null:e?{"data-valid":""}:{"data-invalid":""}}],875812);let l={invalid:void 0,name:void 0,validityData:{state:n,errors:[],error:"",value:"",initialValue:null},setValidityData:r.NOOP,disabled:void 0,setTouched:r.NOOP,setDirty:r.NOOP,setFilled:r.NOOP,setFocused:r.NOOP,validationMode:"onSubmit",shouldValidateOnChange:()=>!1,state:i,registerFieldControl:r.NOOP,validation:{getValidationProps:(e,t=r.EMPTY_OBJECT)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:r.NOOP,getInputControl:()=>null,commit:async()=>{},change:r.NOOP}},o=a.createContext(l);e.s(["DEFAULT_FIELD_ROOT_CONTEXT",0,l,"FieldRootContext",0,o,"useFieldRootContext",0,function(e=!0){let n=a.useContext(o);if(n.setValidityData===r.NOOP&&!e)throw Error((0,t.default)(28));return n}],469690)},884708,e=>{"use strict";e.i(247167);var t=e.i(271645),a=e.i(956789);let r=t.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:a.NOOP,validationMode:"onSubmit",submitCountRef:{current:0}});e.s(["useFormContext",0,function(){return t.useContext(r)}])},247778,e=>{"use strict";e.i(247167);var t=e.i(271645),a=e.i(956789);let r=t.createContext({controlId:void 0,registerControlId:a.NOOP,resetControlId:a.NOOP,labelId:void 0,setLabelId:a.NOOP,messageIds:[],setMessageIds:a.NOOP,getDescriptionProps:e=>e});e.s(["LabelableContext",0,r,"useLabelableContext",0,function(){return t.useContext(r)}])},897886,e=>{"use strict";var t=e.i(229315),a=e.i(108868),r=e.i(667865),n=e.i(584446),s=e.i(146376),i=e.i(788015),l=e.i(247778);e.s(["useLabel",0,function(e={}){let o,{id:d,fallbackControlId:c,native:u=!1,setLabelId:m,focusControl:h}=e,{controlId:f,setLabelId:p}=(0,l.useLabelableContext)(),g=(0,r.useStableCallback)(e=>{p(e),m?.(e)}),b=(o=(0,i.useBaseUiId)(d),(0,s.useIsoLayoutEffect)(()=>(g(o),()=>{g(e=>e===o?void 0:e)}),[o,g]),o),x=f??c;function y(e){let r=(0,n.getTarget)(e.nativeEvent);r?.closest("button,input,select,textarea")||(!e.defaultPrevented&&e.detail>1&&e.preventDefault(),u||function(e){if(h)return h(e,x);if(!x)return;let r=(0,a.ownerDocument)(e.currentTarget).getElementById(x);(0,t.isHTMLElement)(r)&&r.focus({focusVisible:!0})}(e))}return u?{id:b,htmlFor:x,onMouseDown:y}:{id:b,onClick:y,onPointerDown(e){e.preventDefault()}}}],897886)},538489,e=>{"use strict";var t=e.i(271645),a=e.i(146376),r=e.i(667865),n=e.i(388940),s=e.i(956789),i=e.i(788015),l=e.i(247778);e.s(["useLabelableId",0,function(e={}){let{id:o,enabled:d=!0}=e,{controlId:c,registerControlId:u,resetControlId:m}=(0,l.useLabelableContext)(),h=(0,i.useBaseUiId)(),f=(0,n.useRefWithInit)(()=>Symbol()),p=t.useRef(!1),g=t.useRef(!1),b=(0,r.useStableCallback)(()=>{p.current&&u!==s.NOOP&&(p.current=!1,u(f.current,void 0))});return(0,a.useIsoLayoutEffect)(()=>{let e;if(!d||u===s.NOOP)return void b();if(void 0!==o)g.current=!0,e=o;else{if(!g.current)return void m();e=h}void 0===e?b():(p.current=!0,u(f.current,e))},[o,d,u,m,h,f,b]),(0,a.useIsoLayoutEffect)(()=>b,[b]),(d?c:void 0)??o??h}])},186698,e=>{"use strict";e.s(["serializeValue",0,function(e){if(null==e)return"";if("string"==typeof e)return e;try{return JSON.stringify(e)}catch{return String(e)}}])},590803,e=>{"use strict";e.s(["isElementDisabled",0,function(e){return null==e||e.hasAttribute("disabled")||"true"===e.getAttribute("aria-disabled")}])},713203,265858,484325,42191,450001,818438,e=>{"use strict";var t=e.i(271645);e.s(["useOnFirstRender",0,function(e){let a=t.useRef(!0);a.current&&(a.current=!1,e())}],713203);var a=e.i(229315),r=e.i(883977),n=e.i(146376),s=e.i(388940),i=e.i(990627),l=e.i(46420),o=e.i(156341);e.s(["useFloatingRootContext",0,function(e){let{open:t=!1,onOpenChange:d,elements:c={}}=e,u=(0,r.useId)(),m=null!=(0,l.useFloatingParentNodeId)(),h=(0,s.useRefWithInit)(()=>new o.FloatingRootStore({open:t,transitionStatus:void 0,onOpenChange:d,referenceElement:c.reference??null,floatingElement:c.floating??null,triggerElements:new i.PopupTriggerMap,floatingId:u,syncOnly:!1,nested:m})).current;return(0,n.useIsoLayoutEffect)(()=>{let e={open:t,floatingId:u};void 0!==c.reference&&(e.referenceElement=c.reference,e.domReferenceElement=(0,a.isElement)(c.reference)?c.reference:null),void 0!==c.floating&&(e.floatingElement=c.floating),h.update(e)},[t,u,c.reference,c.floating,h]),h.context.onOpenChange=d,h.context.nested=m,h}],265858);let d=(e,t)=>Object.is(e,t);function c(e,t,a){return null==e||null==t?Object.is(e,t):a(e,t)}function u(e,t,a){return!!e&&e.some(e=>void 0!==e&&c(t,e,a))}function m(e,t,a){return e?e.findIndex(e=>void 0!==e&&c(e,t,a)):-1}function h(e,t,a,r){let n=r&&Array.isArray(t)?e.findIndex(function(e,t){if(t!==d)return a=>u(e,a,t);let a=new Set(e);return a.delete(void 0),t=>a.has(t)&&(0!==t||e.some(e=>Object.is(t,e)))}(t,a)):m(e,t,a);return -1===n?null:n}e.s(["compareItemEquality",0,c,"defaultItemEquality",0,d,"findItemIndex",0,m,"findSelectionIndex",0,h,"isSelectedValueDirty",0,function(e,t,a){return Array.isArray(e)&&Array.isArray(t)?!function(e,t,a=Object.is){let{length:r}=e;if(r!==t.length)return!1;for(let n=0;n<r;n+=1)if(!a(e[n],t[n]))return!1;return!0}(e,t,(e,t)=>c(e,t,a)):e!==t},"removeItem",0,function(e,t,a){return e.filter(e=>!c(t,e,a))},"resolveSelectedIndex",0,function(e,t,a,r,n,s){return u(r,t,n)?null!=s&&e>s&&u(r,a[s],n)?s:e:e===s?h(a,r,n,!0):s},"selectedValueIncludes",0,u],484325);var f=e.i(186698),p=e.i(843476);function g(e){var t;return"object"==typeof(t=e?.[0])&&null!=t&&Array.isArray(t.items)}function b(e){return g(e)?e.flatMap(e=>e.items):e}function x(e,t){if(t&&null!=e)return t(e)??"";if(e&&"object"==typeof e){if("label"in e&&null!=e.label)return String(e.label);if("value"in e)return String(e.value)}return(0,f.serializeValue)(e)}function y(e,t,a){if(a&&null!=e)return a(e);if(e&&"object"==typeof e&&"label"in e&&null!=e.label)return e.label;if(t&&!Array.isArray(t))return(Object.hasOwn(t,e)?t[e]:void 0)??x(e,a);if(Array.isArray(t)){let r=b(t);if(null==e||"object"!=typeof e){let t=r.find(t=>t.value===e);return t&&null!=t.label?t.label:x(e,a)}if("value"in e){let t=r.find(t=>t&&t.value===e.value);if(t&&null!=t.label)return t.label}}return x(e,a)}e.s(["flattenLeafItems",0,b,"hasNullItemLabel",0,function(e){if(!Array.isArray(e))return null!=e&&"null"in e;if(g(e)){for(let t of e)for(let e of t.items)if(e&&null==e.value&&null!=e.label)return!0;return!1}for(let t of e)if(t&&null==t.value&&null!=t.label)return!0;return!1},"isGroupedItems",0,g,"resolveMultipleLabels",0,function(e,a,r){return e.reduce((e,n,s)=>(s>0&&e.push(", "),e.push((0,p.jsx)(t.Fragment,{children:y(n,a,r)},s)),e),[])},"resolveSelectedLabel",0,y,"stringifyAsLabel",0,x,"stringifyAsValue",0,function(e,t){return t&&null!=e?t(e)??"":e&&"object"==typeof e&&"value"in e&&"label"in e?(0,f.serializeValue)(e.value):(0,f.serializeValue)(e)}],42191),e.s(["getDefaultLabelId",0,function(e){return null==e?void 0:`${e}-label`},"resolveAriaLabelledBy",0,function(e,t){return e??t}],450001);var v=e.i(552245);let k=t.forwardRef(function(e,t){let{className:a,render:r,orientation:n="horizontal",style:s,...i}=e;return(0,v.useRenderElement)("div",e,{state:{orientation:n},ref:t,props:[{role:"presentation"},i]})});e.s(["ListboxSeparator",0,k],818438)},749655,987255,450092,536604,e=>{"use strict";var t=e.i(456420);let a={name:"alarm-clock",size:24,node:[["circle",{cx:"12",cy:"13",r:"8",key:"3y4lt7"}],["path",{d:"M12 9v4l2 2",key:"1c63tq"}],["path",{d:"M5 3 2 6",key:"18tl5t"}],["path",{d:"m22 6-3-3",key:"1opdir"}],["path",{d:"M6.38 18.7 4 21",key:"17xu3x"}],["path",{d:"M17.64 18.67 20 21",key:"kv2oe2"}]]};a.node;let r=(0,t.default)(a);e.s(["AlarmClock",0,r],749655);let n={name:"anchor",size:24,node:[["path",{d:"M12 6v16",key:"nqf5sj"}],["path",{d:"m19 13 2-1a9 9 0 0 1-18 0l2 1",key:"y7qv08"}],["path",{d:"M9 11h6",key:"1fldmi"}],["circle",{cx:"12",cy:"4",r:"2",key:"muu5ef"}]]};n.node;let s=(0,t.default)(n);e.s(["Anchor",0,s],987255);let i={name:"circle-arrow-right",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m12 16 4-4-4-4",key:"1i9zcv"}],["path",{d:"M8 12h8",key:"1wcyev"}]],aliases:["arrow-right-circle"]};i.node;let l=(0,t.default)(i);e.s(["CircleArrowRight",0,l],450092);let o={name:"circle-check-big",size:24,node:[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],aliases:["check-circle"]};o.node;let d=(0,t.default)(o);e.s(["CircleCheckBig",0,d],536604)},876561,e=>{"use strict";var t=e.i(456420);let a={name:"archive",size:24,node:[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]};a.node;let r=(0,t.default)(a);e.s(["Archive",0,r],876561)},768877,e=>{"use strict";var t=e.i(456420);let a={name:"arrow-right",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]};a.node;let r=(0,t.default)(a);e.s(["ArrowRight",0,r],768877)},847211,e=>{"use strict";var t=e.i(456420);let a={name:"ban",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}]]};a.node;let r=(0,t.default)(a);e.s(["Ban",0,r],847211)},24071,e=>{"use strict";var t=e.i(456420);let a={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};a.node;let r=(0,t.default)(a);e.s(["ChevronLeft",0,r],24071)},867927,e=>{"use strict";var t=e.i(456420);let a={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};a.node;let r=(0,t.default)(a);e.s(["ChevronRight",0,r],867927)},152886,e=>{"use strict";var t=e.i(456420);let a={name:"circle-dashed",size:24,node:[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]]};a.node;let r=(0,t.default)(a);e.s(["CircleDashed",0,r],152886)},119002,e=>{"use strict";var t=e.i(456420);let a={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"]};a.node;let r=(0,t.default)(a);e.s(["CirclePause",0,r],119002)},832297,426391,519647,710001,25799,e=>{"use strict";var t=e.i(456420);let a={name:"circle-play",size:24,node:[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],aliases:["play-circle"]};a.node;let r=(0,t.default)(a);e.s(["CirclePlay",0,r],832297);let n={name:"circle-dot-dashed",size:24,node:[["path",{d:"M10.1 2.18a9.93 9.93 0 0 1 3.8 0",key:"1qdqn0"}],["path",{d:"M17.6 3.71a9.95 9.95 0 0 1 2.69 2.7",key:"1bq7p6"}],["path",{d:"M21.82 10.1a9.93 9.93 0 0 1 0 3.8",key:"1rlaqf"}],["path",{d:"M20.29 17.6a9.95 9.95 0 0 1-2.7 2.69",key:"1xk03u"}],["path",{d:"M13.9 21.82a9.94 9.94 0 0 1-3.8 0",key:"l7re25"}],["path",{d:"M6.4 20.29a9.95 9.95 0 0 1-2.69-2.7",key:"1v18p6"}],["path",{d:"M2.18 13.9a9.93 9.93 0 0 1 0-3.8",key:"xdo6bj"}],["path",{d:"M3.71 6.4a9.95 9.95 0 0 1 2.7-2.69",key:"1jjmaz"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]};n.node;let s=(0,t.default)(n);e.s(["CircleDotDashed",0,s],426391);let i={name:"circle-minus",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}]],aliases:["minus-circle"]};i.node;let l=(0,t.default)(i);e.s(["CircleMinus",0,l],519647);let o={name:"flag-off",size:24,node:[["path",{d:"M16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1q158e"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M4 22V4",key:"1plyxx"}],["path",{d:"M7.656 2H8c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10.347",key:"xj1b71"}]]};o.node;let d=(0,t.default)(o);e.s(["FlagOff",0,d],710001);let c={name:"mail-check",size:24,node:[["path",{d:"M22 13V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h8",key:"12jkf8"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}],["path",{d:"m16 19 2 2 4-4",key:"1b14m6"}]]};c.node;let u=(0,t.default)(c);e.s(["MailCheck",0,u],25799)},275043,446513,e=>{"use strict";var t=e.i(456420);let a={name:"circle-question-mark",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["help-circle","circle-help"]};a.node;let r=(0,t.default)(a);e.s(["default",0,r],275043);let n={name:"monitor",size:24,node:[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]};n.node;let s=(0,t.default)(n);e.s(["Monitor",0,s],446513)},821048,e=>{"use strict";var t=e.i(456420);let a={name:"circle-slash",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"9",x2:"15",y1:"15",y2:"9",key:"1dfufj"}]]};a.node;let r=(0,t.default)(a);e.s(["CircleSlash",0,r],821048)},316984,e=>{"use strict";var t=e.i(456420);let a={name:"circle-x",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],aliases:["x-circle"]};a.node;let r=(0,t.default)(a);e.s(["CircleX",0,r],316984)},474544,e=>{"use strict";var t=e.i(456420);let a={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};a.node;let r=(0,t.default)(a);e.s(["Clock",0,r],474544)},831458,e=>{"use strict";var t=e.i(456420);let a={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"}]]};a.node;let r=(0,t.default)(a);e.s(["Flag",0,r],831458)},671028,e=>{"use strict";var t=e.i(456420);let a={name:"gauge",size:24,node:[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]};a.node;let r=(0,t.default)(a);e.s(["Gauge",0,r],671028)},981658,e=>{"use strict";var t=e.i(456420);let a={name:"hourglass",size:24,node:[["path",{d:"M5 22h14",key:"ehvnwv"}],["path",{d:"M5 2h14",key:"pdyrp9"}],["path",{d:"M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22",key:"1d314k"}],["path",{d:"M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2",key:"1vvvr6"}]]};a.node;let r=(0,t.default)(a);e.s(["Hourglass",0,r],981658)},806537,e=>{"use strict";var t=e.i(456420);let a={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"}]]};a.node;let r=(0,t.default)(a);e.s(["Lock",0,r],806537)},985512,e=>{"use strict";var t=e.i(456420);let a={name:"octagon-alert",size:24,node:[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]],aliases:["alert-octagon"]};a.node;let r=(0,t.default)(a);e.s(["OctagonAlert",0,r],985512)},77071,e=>{"use strict";var t=e.i(456420);let a={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};a.node;let r=(0,t.default)(a);e.s(["Plus",0,r],77071)},457665,e=>{"use strict";var t=e.i(456420);let a={name:"power",size:24,node:[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]};a.node;let r=(0,t.default)(a);e.s(["Power",0,r],457665)},395925,485627,e=>{"use strict";var t=e.i(456420);let a={name:"rotate-ccw",size:24,node:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]};a.node;let r=(0,t.default)(a);e.s(["RotateCcw",0,r],395925);let n={name:"sailboat",size:24,node:[["path",{d:"M10 2v15",key:"1qf71f"}],["path",{d:"M7 22a4 4 0 0 1-4-4 1 1 0 0 1 1-1h16a1 1 0 0 1 1 1 4 4 0 0 1-4 4z",key:"1pxcvx"}],["path",{d:"M9.159 2.46a1 1 0 0 1 1.521-.193l9.977 8.98A1 1 0 0 1 20 13H4a1 1 0 0 1-.824-1.567z",key:"5oog16"}]]};n.node;let s=(0,t.default)(n);e.s(["Sailboat",0,s],485627)},566595,e=>{"use strict";var t=e.i(456420);let a={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};a.node;let r=(0,t.default)(a);e.s(["Search",0,r],566595)},819759,e=>{"use strict";var t=e.i(456420);let a={name:"square-pen",size:24,node:[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],aliases:["pen-box","edit","pen-square"]};a.node;let r=(0,t.default)(a);e.s(["SquarePen",0,r],819759)},466787,e=>{"use strict";var t=e.i(456420);let a={name:"triangle-alert",size:24,node:[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["alert-triangle"]};a.node;let r=(0,t.default)(a);e.s(["TriangleAlert",0,r],466787)},594831,e=>{"use strict";var t=e.i(456420);let a={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"}]]};a.node;let r=(0,t.default)(a);e.s(["Unplug",0,r],594831)},892870,e=>{"use strict";var t=e.i(456420);let a={name:"user-check",size:24,node:[["path",{d:"m16 11 2 2 4-4",key:"9rsbq5"}],["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]};a.node;let r=(0,t.default)(a);e.s(["UserCheck",0,r],892870)},298260,e=>{"use strict";var t=e.i(843476),a=e.i(965324);e.s(["Kbd",0,function({className:e,...r}){return(0,t.jsx)("kbd",{"data-slot":"kbd",className:(0,a.classNames)("inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-xs border border-border bg-muted px-1.25 font-sans text-micro font-medium text-muted-foreground max-sm:hidden",e),...r})}])},638919,e=>{"use strict";var t=e.i(843476),a=e.i(353753),r=e.i(225913),n=e.i(560964),s=e.i(965324),i=e.i(574296);let l=(0,r.cva)("fixed z-50 flex flex-col bg-popover text-body text-popover-foreground shadow-lg outline-none duration-(--duration-slow) ease-(--ease-standard) data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",{variants:{side:{right:"inset-y-0 right-0 h-full w-full border-l border-border sm:max-w-(--size-sheet) motion-safe:data-open:slide-in-from-right motion-safe:data-closed:slide-out-to-right",bottom:"inset-x-0 bottom-0 max-h-[90dvh] rounded-t-2xl border-t border-border px-4 pt-2 pb-[max(calc(var(--spacing)*4),env(safe-area-inset-bottom))] motion-safe:data-open:slide-in-from-bottom motion-safe:data-closed:slide-out-to-bottom"}},defaultVariants:{side:"right"}});e.s(["Sheet",0,function(e){return(0,t.jsx)(a.Dialog.Root,{"data-slot":"sheet",...e})},"SheetBody",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"sheet-body",className:(0,s.classNames)("min-h-0 flex-1 overflow-y-auto in-data-[side=right]:p-6",e),...a})},"SheetClose",0,function(e){return(0,t.jsx)(a.Dialog.Close,{"data-slot":"sheet-close",...e})},"SheetContent",0,function({className:e,children:r,side:o="right",...d}){return(0,t.jsxs)(a.Dialog.Portal,{children:[(0,t.jsx)(a.Dialog.Backdrop,{"data-slot":"sheet-overlay",className:"fixed inset-0 z-50 bg-overlay duration-(--duration-slow) data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0"}),(0,t.jsxs)(a.Dialog.Popup,{"data-slot":"sheet-content","data-side":o,className:(0,s.classNames)(l({side:o}),e),...d,children:["bottom"===o?(0,t.jsx)("div",{"aria-hidden":!0,className:"mx-auto mb-3 h-1 w-9 shrink-0 rounded-full bg-border"}):(0,t.jsx)(a.Dialog.Close,{"data-slot":"sheet-close",render:(0,t.jsx)(i.Button,{variant:"ghost",size:"sm",isIconOnly:!0,className:"absolute top-4 right-4","aria-label":"Close"}),children:(0,t.jsx)(n.XIcon,{})}),r]})]})},"SheetDescription",0,function({className:e,...r}){return(0,t.jsx)(a.Dialog.Description,{"data-slot":"sheet-description",className:(0,s.classNames)("text-meta text-muted-foreground",e),...r})},"SheetFooter",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"sheet-footer",className:(0,s.classNames)("flex flex-col-reverse gap-2 pt-3 in-data-[side=right]:flex-row in-data-[side=right]:justify-end in-data-[side=right]:border-t in-data-[side=right]:px-6 in-data-[side=right]:py-4",e),...a})},"SheetHeader",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"sheet-header",className:(0,s.classNames)("flex flex-col gap-0.5 in-data-[side=right]:border-b in-data-[side=right]:px-6 in-data-[side=right]:py-5 in-data-[side=right]:pr-14",e),...a})},"SheetTitle",0,function({className:e,...r}){return(0,t.jsx)(a.Dialog.Title,{"data-slot":"sheet-title",className:(0,s.classNames)("text-heading font-semibold text-foreground in-data-[side=bottom]:py-2 in-data-[side=bottom]:text-section",e),...r})},"SheetTrigger",0,function(e){return(0,t.jsx)(a.Dialog.Trigger,{"data-slot":"sheet-trigger",...e})}])},250834,e=>{"use strict";var t=e.i(843476),a=e.i(618566),r=e.i(271645),n=e.i(67874),s=e.i(817981),i=e.i(188393),l=e.i(806537),o=e.i(77071),d=e.i(849635),c=e.i(784294),u=e.i(766390),m=e.i(574296),h=e.i(946033),f=e.i(414732),p=e.i(1935),g=e.i(941246),b=e.i(78865);function x({blueprint:e,version:a,onVersionChange:r,templates:n,squadrons:s,onForm:i}){let y=e.versions.find(e=>e.version===a)??e.versions[0];if(!y)return null;let v=e.versions[0]?.version,k=Object.fromEntries(e.versions.map(e=>[String(e.version),`v${String(e.version)}${e.version===v?" (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)(u.Badge,{variant:"secondary",children:"Blueprint"}),(0,t.jsxs)(h.Select,{items:k,value:String(y.version),onValueChange:e=>{r(Number(e))},children:[(0,t.jsxs)(h.SelectTrigger,{"aria-label":"Version","data-testid":"blueprint-version",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"Version"}),(0,t.jsx)(h.SelectValue,{className:"font-medium"})]}),(0,t.jsx)(h.SelectContent,{children:Object.entries(k).map(([e,a])=>(0,t.jsx)(h.SelectItem,{value:e,children:a},e))})]}),(0,t.jsxs)("span",{"data-testid":"blueprint-source",className:"text-meta text-muted-foreground",children:[(0,t.jsx)("span",{className:"font-mono",children:y.file})," at ",(0,t.jsx)("span",{className:"font-mono",children:y.commit.slice(0,7)}),", ",(0,d.dayDate)(new Date(y.committedAt))]}),i&&(0,t.jsx)(m.Button,{variant:"primary",icon:(0,t.jsx)(o.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)(l.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)(f.Table,{children:[(0,t.jsx)(f.TableHeader,{children:(0,t.jsxs)(f.TableRow,{children:[(0,t.jsx)(f.TableHead,{children:"Role"}),(0,t.jsx)(f.TableHead,{children:"Template"}),(0,t.jsx)(f.TableHead,{children:"Members"}),(0,t.jsx)(f.TableHead,{children:"Check-in"}),(0,t.jsx)(f.TableHead,{children:"Launch note"})]})}),(0,t.jsx)(f.TableBody,{children:y.roles.map(e=>{let a,r=(a=e.template,n.find(e=>e.repository===a.repository&&e.name===a.name&&e.version===a.version));return(0,t.jsxs)(f.TableRow,{"data-testid":"blueprint-role",children:[(0,t.jsx)(f.TableCell,{children:(0,t.jsx)(u.Badge,{variant:"type",children:e.name})}),(0,t.jsx)(f.TableCell,{className:"font-mono",children:`${e.template.name}@${String(e.template.version)}`}),(0,t.jsx)(f.TableCell,{children:e.count}),(0,t.jsx)(f.TableCell,{children:r?(0,c.checkInText)(r.checkInMinutes):"unknown"}),(0,t.jsx)(f.TableCell,{className:"max-w-64 truncate text-muted-foreground",children:r?.launchNote??""})]},e.name)})})]})]}),(0,t.jsx)(g.HandoffWiring,{blueprint:y})]}),(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===v&&(0,t.jsx)(u.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===s.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:s.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)(b.StatusBadge,{status:e.state,className:"ml-auto"})]},e.id))})]})]})]})]})}var y=e.i(251442),v=e.i(837631),k=e.i(787964),w=e.i(319846),j=e.i(490262),N=e.i(718423),S=e.i(928459),C=e.i(678485),I=e.i(686165),M=e.i(448695);e.s(["default",0,function({params:e,searchParams:l}){let o=decodeURIComponent((0,r.use)(e).name),d=(0,r.use)(l),u=(0,a.useRouter)(),m=(0,k.useConsoleFrame)(),h=(0,S.useNeedsAttention)(),f=(0,N.useLiveFleet)(),p=(0,M.useCatalogue)(),g=(0,I.useSquadronsConnection)(),b=(0,M.useSquadrons)(),[O,q]=(0,r.useState)(!1),z=(0,j.useAccess)();(0,C.useSignInWhenSessionEnds)([h.error,f.error]);let R=(0,c.blueprintChoices)(p.data??{blueprints:[]}),A=R.find(e=>e.name===o&&(void 0===d.repository||e.repository===d.repository)),L=Number(d.version??A?.versions[0]?.version);return(0,t.jsx)(v.DetailPage,{switcher:m.switcher,account:m.account,onCompose:m.onCompose,onSearch:m.onSearch,banner:m.banner,title:o,parents:[{href:"/squadrons",label:"Squadrons"},{href:"/squadrons?tab=blueprints",label:"Blueprints"}],header:(0,t.jsx)("h1",{className:"text-title font-semibold",children:o}),live:f.live,children:"not-connected"===g?(0,t.jsx)(w.SquadronsNotConnected,{}):p.isError?(0,t.jsx)(s.InlineError,{title:"Couldn’t read the blueprint",description:"The squadron manager couldn’t read the catalogue. Squadrons formed from it keep sailing.",detail:p.error.message,onRetry:()=>{p.refetch()}}):p.data?A?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(x,{blueprint:A,version:L,onVersionChange:e=>{u.replace((0,c.blueprintPath)({repository:A.repository,name:A.name,version:e}))},templates:p.data.templates,squadrons:(0,c.squadronsFromBlueprint)(b.data??[],A),onForm:z.canManage?()=>{q(!0)}:void 0}),(0,t.jsx)(y.FormSquadron,{blueprints:R,templates:p.data.templates,initial:{key:A.key,version:L},isOpen:O,onOpenChange:q,onFormed:e=>{q(!1),u.push(`/squadrons/${e}`)}},`${A.key}@${String(L)}`)]}):(0,t.jsx)(n.EmptyState,{title:"No such blueprint",description:`git holds no blueprint ${o}.`}):(0,t.jsx)(i.LoadingSkeleton,{variant:"detail",label:"Loading the blueprint"})})}],250834)},219321,e=>{"use strict";var t=e.i(843476),a=e.i(965324);e.s(["Skeleton",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"skeleton","aria-hidden":!0,className:(0,a.classNames)("animate-pulse rounded-sm bg-secondary [animation-duration:var(--duration-pulse)] motion-reduce:animate-none",e),...r})}])},414732,e=>{"use strict";var t=e.i(843476),a=e.i(456420);let r={name:"arrow-down",size:24,node:[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]};r.node;let n=(0,a.default)(r),s={name:"arrow-up",size:24,node:[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]};s.node;let i=(0,a.default)(s),l={name:"chevrons-up-down",size:24,node:[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]};l.node;let o=(0,a.default)(l);var d=e.i(965324);function c({className:e,...a}){return(0,t.jsx)("th",{"data-slot":"table-head",className:(0,d.classNames)("px-4 text-left align-middle text-caption font-medium whitespace-nowrap text-muted-foreground",e),...a})}e.s(["Table",0,function({className:e,...a}){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,d.classNames)("w-full caption-bottom text-body",e),...a})})},"TableBody",0,function({className:e,...a}){return(0,t.jsx)("tbody",{"data-slot":"table-body",className:(0,d.classNames)("[&_tr:last-child]:border-0",e),...a})},"TableCell",0,function({className:e,...a}){return(0,t.jsx)("td",{"data-slot":"table-cell",className:(0,d.classNames)("px-4 align-middle",e),...a})},"TableHead",0,c,"TableHeader",0,function({className:e,...a}){return(0,t.jsx)("thead",{"data-slot":"table-header",className:(0,d.classNames)("bg-muted [&_tr]:border-b",e),...a})},"TableRow",0,function({className:e,...a}){return(0,t.jsx)("tr",{"data-slot":"table-row",className:(0,d.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),...a})},"TableSortHead",0,function({direction:e,onSort:a,children:r,className:s,...l}){return(0,t.jsx)(c,{"aria-sort":e??"none",className:(0,d.classNames)("px-2",s),...l,children:(0,t.jsxs)("button",{type:"button",onClick:a,className:"inline-flex h-7 items-center gap-1 rounded-sm px-2 font-medium hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring data-sorted:text-foreground","data-sorted":null===e?void 0:"",children:[r,(0,t.jsx)("ascending"===e?i:"descending"===e?n:o,{"aria-hidden":!0,className:(0,d.classNames)("size-3.5 shrink-0",null===e?"opacity-50":void 0)})]})})}],414732)},67874,e=>{"use strict";var t=e.i(843476),a=e.i(965324);e.s(["EmptyState",0,function({title:e,description:r,icon:n,action:s,variant:i="page",className:l}){return"section"===i?(0,t.jsxs)("p",{"data-slot":"empty-state","data-variant":i,className:(0,a.classNames)("rounded-lg border border-border px-4 py-3 text-center text-meta text-muted-foreground",l),children:[e,r?(0,t.jsxs)(t.Fragment,{children:[" ",r]}):null]}):"no-results"===i?(0,t.jsxs)("div",{"data-slot":"empty-state","data-variant":i,className:(0,a.classNames)("flex flex-col items-center gap-2.5 rounded-lg border border-border bg-card px-4 py-6 text-center",l),children:[(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:e}),s]}):(0,t.jsxs)("div",{"data-slot":"empty-state","data-variant":i,className:(0,a.classNames)("flex flex-col items-center gap-3 rounded-lg border border-dashed border-border bg-card px-6 py-10 text-center",l),children:[n?(0,t.jsx)("span",{"aria-hidden":!0,className:"flex size-10 items-center justify-center rounded-lg border border-border bg-muted text-muted-foreground [&_svg]:size-(--size-icon-xl)",children:n}):null,(0,t.jsx)("h2",{className:"text-heading font-semibold text-foreground max-sm:text-heading-touch",children:e}),r?(0,t.jsx)("p",{className:"max-w-96 text-meta text-muted-foreground max-sm:text-body-touch",children:r}):null,s?(0,t.jsx)("div",{className:"mt-1 max-sm:w-full max-sm:[&>*]:w-full",children:s}):null]})}])},188393,e=>{"use strict";var t=e.i(843476),a=e.i(965324),r=e.i(219321);function n(e){return Array.from({length:e},(e,t)=>`row-${String(t)}`)}e.s(["LoadingSkeleton",0,function({variant:e,rows:s=4,label:i="Loading",className:l}){return(0,t.jsxs)("div",{role:"status","data-slot":"loading-skeleton","data-variant":e,className:(0,a.classNames)("w-full",l),children:[(0,t.jsx)("span",{className:"sr-only",children:i}),"table"===e?(0,t.jsxs)("div",{className:"overflow-hidden rounded-lg border border-border bg-card shadow-sm",children:[(0,t.jsx)("div",{className:"h-(--size-row-header) border-b border-border bg-muted"}),n(s).map(e=>(0,t.jsxs)("div",{className:"flex h-(--size-row) items-center gap-8 border-b border-border px-4 last:border-0",children:[(0,t.jsx)(r.Skeleton,{className:"h-2.5 w-24"}),(0,t.jsx)(r.Skeleton,{className:"h-5 w-16"}),(0,t.jsx)(r.Skeleton,{className:"h-5 w-20"}),(0,t.jsx)(r.Skeleton,{className:"h-2.5 w-28"})]},e))]}):null,"cards"===e?(0,t.jsx)("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:n(4).map(e=>(0,t.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-4",children:[(0,t.jsx)(r.Skeleton,{className:"h-2.5 w-20"}),(0,t.jsx)(r.Skeleton,{className:"h-6 w-10"}),(0,t.jsx)(r.Skeleton,{className:"h-2.5 w-28"})]},e))}):null,"detail"===e?(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsx)(r.Skeleton,{className:"h-7 w-48"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(r.Skeleton,{className:"h-5 w-20"}),(0,t.jsx)(r.Skeleton,{className:"h-5 w-16"})]}),(0,t.jsx)(r.Skeleton,{className:"h-16 w-full rounded-lg"})]}):null,"list"===e?(0,t.jsx)("div",{className:"overflow-hidden rounded-lg border border-border bg-card",children:n(s).map(e=>(0,t.jsxs)("div",{className:"flex flex-col gap-2.5 border-b border-border px-3.5 py-3 last:border-0",children:[(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)(r.Skeleton,{className:"h-3 w-28"}),(0,t.jsx)(r.Skeleton,{className:"h-5 w-16"})]}),(0,t.jsx)(r.Skeleton,{className:"h-2.5 w-44"})]},e))}):null]})}])},1935,e=>{"use strict";var t=e.i(843476),a=e.i(660011),r=e.i(522016),n=e.i(965324);e.s(["SquadronTag",0,function({squadronId:e,role:s,size:i="md",className:l}){return(0,t.jsxs)(r.default,{href:`/squadrons/${e}`,"data-slot":"squadron-tag",className:(0,n.classNames)("inline-flex max-w-full items-center gap-1 rounded-sm bg-secondary px-1.5 text-secondary-foreground hover:underline [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0","sm"===i?"h-5.5 text-meta":"h-6 text-body",l),children:[(0,t.jsx)(a.Shapes,{"aria-hidden":!0}),(0,t.jsx)("span",{className:"truncate font-medium",children:e}),void 0!==s&&(0,t.jsxs)("span",{className:"shrink-0 text-muted-foreground",children:["· ",s]})]})}])},78865,e=>{"use strict";var t=e.i(843476),a=e.i(749655),r=e.i(987255),n=e.i(876561),s=e.i(847211),i=e.i(422768),l=e.i(450092),o=e.i(536604),d=e.i(119002),c=e.i(832297),u=e.i(821048),m=e.i(474544),h=e.i(285595),f=e.i(152886),p=e.i(426391),g=e.i(519647),b=e.i(316984),x=e.i(710001),y=e.i(671028),v=e.i(981658),k=e.i(444594),w=e.i(611568),j=e.i(25799),N=e.i(985512),S=e.i(457665),C=e.i(395925),I=e.i(485627),M=e.i(466787),O=e.i(892870),q=e.i(456420);let z={name:"user-round-search",size:24,node:[["circle",{cx:"10",cy:"8",r:"5",key:"o932ke"}],["path",{d:"M2 21a8 8 0 0 1 10.434-7.62",key:"1yezr2"}],["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["path",{d:"m22 22-1.9-1.9",key:"1e5ubv"}]]};z.node;let R=(0,q.default)(z);var A=e.i(965324),L=e.i(766390);let T={waiting:"border-tone-waiting-border bg-tone-waiting-bg text-tone-waiting-fg",active:"border-tone-active-border bg-tone-active-bg text-tone-active-fg",ok:"border-tone-ok-border bg-tone-ok-bg text-tone-ok-fg",attention:"border-tone-attention-border bg-tone-attention-bg text-tone-attention-fg",ended:"border-tone-ended-border bg-tone-ended-bg text-tone-ended-fg"},D={awaitingCrew:{tone:"waiting",Icon:f.CircleDashed,label:"Awaiting crew"},crewed:{tone:"ok",Icon:O.UserCheck,label:"Crewed"},retired:{tone:"ended",Icon:n.Archive,label:"Retired"},pending:{tone:"waiting",Icon:v.Hourglass,label:"Pending"},received:{tone:"active",Icon:k.Inbox,label:"Received"},handed:{tone:"active",Icon:l.CircleArrowRight,label:"Handed (pulled)"},handedPushed:{tone:"active",Icon:l.CircleArrowRight,label:"Handed"},overdue:{tone:"attention",Icon:a.AlarmClock,label:"Overdue"},acknowledged:{tone:"ok",Icon:h.CircleCheck,label:"Acknowledged"},handled:{tone:"ok",Icon:o.CircleCheckBig,label:"Handled"},notHandled:{tone:"attention",Icon:i.CircleAlert,label:"Not handled"},undeliverable:{tone:"attention",Icon:b.CircleX,label:"Undeliverable"},dismissed:{tone:"ended",Icon:g.CircleMinus,label:"Dismissed"},abandoned:{tone:"ended",Icon:s.Ban,label:"Abandoned"},forming:{tone:"waiting",Icon:p.CircleDotDashed,label:"Forming"},sailing:{tone:"ok",Icon:I.Sailboat,label:"Sailing"},"standing-down":{tone:"active",Icon:r.Anchor,label:"Standing down"},disbanded:{tone:"ended",Icon:x.FlagOff,label:"Disbanded"},"at-limit":{tone:"waiting",Icon:y.Gauge,label:"At limit"},"over-limit":{tone:"attention",Icon:M.TriangleAlert,label:"Over limit"},needsCrew:{tone:"waiting",Icon:m.Clock,label:"Needs crew"},crewedByHand:{tone:"ok",Icon:O.UserCheck,label:"Crewed by hand"},crewing:{tone:"active",Icon:w.LoaderCircle,label:"Crewing"},running:{tone:"ok",Icon:c.CirclePlay,label:"Running"},restarting:{tone:"waiting",Icon:C.RotateCcw,label:"Restarting"},crashed:{tone:"attention",Icon:b.CircleX,label:"Crashed"},releasing:{tone:"active",Icon:S.Power,label:"Releasing"},stuck:{tone:"attention",Icon:N.OctagonAlert,label:"Stuck"},delivering:{tone:"ok",Icon:j.MailCheck,label:"Delivering"},noShipCanTake:{tone:"attention",Icon:u.CircleSlash,label:"No ship can take"},waitingForCrew:{tone:"waiting",Icon:R,label:"Waiting for crew"},stalledInFlight:{tone:"waiting",Icon:d.CirclePause,label:"Stalled in flight"}};e.s(["StatusBadge",0,function({status:e,className:a}){let{tone:r,Icon:n,label:s}=D[e];return(0,t.jsxs)(L.Badge,{variant:"outline","data-slot":"status-badge","data-status":e,className:(0,A.classNames)(T[r],"abandoned"===e?"border-dashed":void 0,a),children:[(0,t.jsx)(n,{"aria-hidden":!0}),s]})},"statusLabel",0,function(e){return D[e].label}],78865)},837631,e=>{"use strict";var t=e.i(843476),a=e.i(577880),r=e.i(485538);e.s(["DetailPage",0,function({title:e,parents:n,header:s,children:i,sheet:l,live:o,switcher:d,account:c,onCompose:u,onSearch:m,banner:h}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.Header,{breadcrumb:e,parents:n,live:o,switcher:d,account:c,onCompose:u,onSearch:m}),h,(0,t.jsx)(r.TopBar,{title:e,live:o,back:n[n.length-1]??n[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:[s,i]}),l]})}])},577880,485538,e=>{"use strict";var t=e.i(843476),a=e.i(566595),r=e.i(374368),n=e.i(574296),s=e.i(298260),i=e.i(704974),l=e.i(965324);function o({switcher:e,account:d,onSearch:c,searchLabel:u="Search or jump to",children:m,actions:h,className:f}){return(0,t.jsxs)("header",{"data-slot":"app-header",className:(0,l.classNames)("sticky top-0 z-30 flex h-(--size-header) shrink-0 items-center justify-between gap-4 border-b border-border bg-background px-6",f),children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[void 0===e?(0,t.jsx)("span",{"data-testid":"app-switcher-loading","aria-hidden":!0,className:"h-4 w-36 shrink-0 animate-pulse rounded bg-muted motion-reduce:animate-none"}):(0,t.jsx)(r.AppSwitcher,{switcher:e,layout:"full",className:"shrink-0"}),m]}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-3",children:[h,c?(0,t.jsxs)(n.Button,{size:"sm",icon:(0,t.jsx)(a.Search,{"aria-hidden":!0}),"data-testid":"header-search",className:"w-60 justify-start font-normal text-muted-foreground max-lg:w-auto",onClick:c,children:[(0,t.jsx)("span",{className:"grow text-left max-lg:sr-only",children:u}),(0,t.jsx)(s.Kbd,{children:"⌘K"})]}):null,(0,t.jsx)(i.AvatarMenu,{...d})]})]})}var d=e.i(867927),c=e.i(819759),u=e.i(522016);let m={live:{label:"Live",dot:"bg-tone-ok-fg"},reconnecting:{label:"Reconnecting",dot:"bg-tone-waiting-fg"},offline:{label:"Offline",dot:"bg-tone-attention-fg"}};function h({state:e,className:a}){let{label:r,dot:n}=m[e];return(0,t.jsxs)("span",{"data-slot":"live-status","data-state":e,"aria-live":"polite",className:(0,l.classNames)("inline-flex items-center gap-1.5 text-meta text-muted-foreground",a),children:[(0,t.jsx)("span",{"aria-hidden":!0,className:(0,l.classNames)("size-2 shrink-0 rounded-full",n)}),r]})}e.s(["Header",0,function({breadcrumb:e,parents:a=[],live:r,switcher:s,account:i,onCompose:l,onSearch:m}){return(0,t.jsxs)(o,{switcher:s,account:i,onSearch:m,searchLabel:"Search ships or jump to",className:"hidden sm:flex",actions:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h,{state:r}),l?(0,t.jsx)(n.Button,{size:"sm",icon:(0,t.jsx)(c.SquarePen,{"aria-hidden":!0}),"data-testid":"header-compose",onClick:l,children:"Compose"}):null]}),children:[(0,t.jsx)(d.ChevronRight,{"aria-hidden":!0,className:"size-3.5 shrink-0 text-muted-foreground"}),(0,t.jsx)("nav",{"aria-label":"Breadcrumb","data-testid":"header-breadcrumb",className:"min-w-0 text-body",children:(0,t.jsxs)("ol",{className:"flex min-w-0 items-center gap-1.5",children:[a.map(e=>(0,t.jsxs)("li",{className:"flex shrink-0 items-center gap-1.5",children:[(0,t.jsx)(u.default,{href:e.href,className:"text-muted-foreground hover:text-foreground hover:underline",children:e.label}),(0,t.jsx)(d.ChevronRight,{"aria-hidden":!0,className:"size-3.5 text-muted-foreground"})]},e.href)),(0,t.jsx)("li",{"aria-current":"page",className:"truncate font-medium text-foreground",children:e})]})})]})}],577880);var f=e.i(24071);e.s(["TopBar",0,function({title:e,live:s,actions:l,back:o,switcher:d,account:c,onSearch:m}){let p=m&&!o?m:void 0;return(0,t.jsxs)("header",{"data-slot":"top-bar","data-mode":o?"detail":"root",className:"sticky top-0 z-30 flex h-(--size-header) items-center gap-2.5 border-b border-border bg-background px-4 sm:hidden",children:[o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(u.default,{href:o.href,className:"-ml-1.5 inline-flex h-(--size-control-touch) shrink-0 items-center gap-0.5 rounded-md pr-2 text-body-touch text-foreground focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon)",children:[(0,t.jsx)(f.ChevronLeft,{"aria-hidden":!0}),o.label]}),(0,t.jsx)("p",{className:"min-w-0 flex-1 truncate text-center text-body-touch font-semibold text-foreground",children:e})]}):d?(0,t.jsx)(r.AppSwitcher,{switcher:d,layout:"compact",className:"min-w-0"}):(0,t.jsx)("p",{className:"truncate px-1.5 text-title-touch font-semibold text-foreground",children:"Console"}),(0,t.jsx)(h,{state:s}),l||p||c&&!o?(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[p?(0,t.jsx)(n.Button,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Search ships or jump to","data-testid":"top-bar-search",onClick:p,children:(0,t.jsx)(a.Search,{"aria-hidden":!0})}):null,l,c&&!o?(0,t.jsx)(i.AvatarMenuSheet,{...c}):null]}):null]})}],485538)},319846,e=>{"use strict";var t=e.i(843476),a=e.i(594831),r=e.i(522016),n=e.i(574296),s=e.i(67874);e.s(["SquadronsNotConnected",0,function(){return(0,t.jsx)(s.EmptyState,{icon:(0,t.jsx)(a.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)(n.Button,{nativeButton:!1,render:(0,t.jsx)(r.default,{href:"/settings"}),"data-testid":"squadrons-open-settings",children:"Open Settings"})})}])},251442,e=>{"use strict";var t=e.i(843476),a=e.i(271645),r=e.i(917540),n=e.i(34512),s=e.i(808041),i=e.i(905387),l=e.i(696994),o=e.i(878608),d=e.i(448695),c=e.i(500265);let u=(0,r.lazyDialog)(()=>e.A(967928).then(e=>e.FormSquadronDialog),e=>e.isOpen);e.s(["FormSquadron",0,function({blueprints:e,templates:r,isOpen:m,onOpenChange:h,initial:f,onFormed:p}){let g=(0,c.useHasTrierarchPlugin)(),b=(0,d.useFormSquadron)(),[x,y]=(0,a.useState)(),v=(0,d.useBlueprintCrew)(g?x:void 0),k=(0,c.useMachines)(),w=(0,i.useLabelContext)(k.data?.map(e=>e.shipId)),{shipLabelsMax:j}=(0,n.useConsoleConstants)(),N=void 0===w||void 0===k.data?void 0:(0,o.machineLabelsInputOf)(w,{machines:k.data,shipLabelsMax:j});return(0,t.jsx)(u,{blueprints:e,templates:r,...void 0===f?{}:{initial:f},isOpen:m,onOpenChange:h,isPending:b.isPending,...null===b.error?{}:{error:b.error.message},onPicked:e=>{b.reset(),y(e)},...g?{crew:{state:v.isError||k.isError?"error":void 0===v.data||void 0===k.data?"loading":"ready",members:v.data??[],offers:(0,s.offersOf)(k.data??[]),...void 0===w?{}:{context:w},...void 0===N?{}:{machineLabels:N},...null===v.error?null===k.error?{}:{error:k.error.message}:{error:v.error.message},onRetry:()=>{v.refetch(),k.refetch()}}}:{},onSubmit:(e,t)=>{b.mutate({blueprint:e,...void 0===t?{}:{members:(0,l.formMembersOf)(t,w)}},{onSuccess:e=>{p(e.squadronId)}})}})}])},941246,e=>{"use strict";var t=e.i(843476),a=e.i(768877),r=e.i(831458),n=e.i(271645),s=e.i(965324),i=e.i(766390);function l({name:e,count:a,onHover:n}){let s={onPointerEnter:()=>{n(e)},onPointerLeave:()=>{n(void 0)}};return"flagship"===e?(0,t.jsxs)(i.Badge,{variant:"kind",...s,children:[(0,t.jsx)(r.Flag,{"aria-hidden":!0}),"flagship"]}):(0,t.jsxs)(i.Badge,{variant:"type",...s,children:[e,void 0!==a&&a>1&&(0,t.jsxs)("span",{className:"text-muted-foreground",children:["×",a]})]})}e.s(["HandoffWiring",0,function({blueprint:e}){let[r,i]=(0,n.useState)(void 0),o=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,s.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)(l,{name:e.role,count:o.get(e.role),onHover:i})}),(0,t.jsxs)("span",{className:"flex items-center gap-1 font-mono text-muted-foreground",children:[e.handoff,(0,t.jsx)(a.ArrowRight,{"aria-label":"goes to",className:"size-(--size-icon-sm)"})]}),(0,t.jsx)("span",{children:(0,t.jsx)(l,{name:e.to,count:o.get(e.to),onHover:i})})]},`${e.role}.${e.handoff}`))})]})}])},808041,e=>{"use strict";var t=e.i(714695);function a(e,t){for(let a of t)e.includes(a)||e.push(a)}function r(e){return Object.fromEntries((e?.options??[]).flatMap(e=>{let t=e.defaultValue??e.values[0];return void 0===t?[]:[[e.name,t]]}))}function n(e){let[t]=e?.repositories??[];if(void 0!==t)return{kind:"worktree",repository:t};let[a]=e?.folders??[];return void 0===a?void 0:{kind:"folder",name:a}}function s(e){let[t]=e;return{harness:t?.harness??"",workspace:n(t),options:r(t),firstPrompt:"",squadron:"",machineLabels:[]}}let i=new TextEncoder;function l(e){return i.encode(e).byteLength}function o(e){return e<1024?`${String(e)} B`:`${(e/1024).toFixed(1).replace(/\.0$/,"")} KB`}e.s(["byteSize",0,o,"defaultValues",0,s,"offersOf",0,function(e){let r=[];for(let n of e)if(!n.isSilent&&null!==n.details)for(let e of n.details.harnesses){let s=r.find(t=>t.harness===e.harness);for(let i of(void 0===s&&(s={harness:e.harness,repositories:[],folders:[],options:[]},r.push(s)),a(s.repositories,n.details.workspaces.repositories),a(s.folders,n.details.workspaces.folders),(0,t.harnessOptions)(e.options))){let e=s.options.find(e=>e.name===i.name);void 0===e?s.options.push({...i,values:[...i.values]}):(a(e.values,i.values),e.defaultValue??=i.defaultValue)}}return r},"promptBytes",0,l,"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}}},"settingsRows",0,function(e){if(null==e)return;let{harness:t,workspace:a,options:r,firstPrompt:n,squadron:s}=e;return[{label:"Harness",value:t??"Trierarch default"},"worktree"===a.kind?{label:"Workspace",value:a.repository,meta:"New worktree"}:{label:"Workspace",value:a.name,meta:"Folder, as it is"},...Object.entries(r).map(([e,t])=>({label:e,value:"string"==typeof t?t:JSON.stringify(t),isMono:!0})),{label:"First prompt",value:void 0===n?null:o(l(n))},{label:"Squadron",value:s??null,isMono:!0}]},"valuesOf",0,function(e,t){if(null==e)return s(t);let{harness:a,workspace:r,options:n,firstPrompt:i,squadron:l,machineLabels:o}=e;return{harness:a??s(t).harness,workspace:"worktree"===r.kind?{kind:"worktree",repository:r.repository}:{kind:"folder",name:r.name},options:Object.fromEntries(Object.entries(n).flatMap(([e,t])=>"string"==typeof t?[[e,t]]:[])),firstPrompt:i??"",squadron:l??"",machineLabels:[...o??[]]}},"withHarness",0,function(e,t){let{harness:a,offers:s}=t,i=s.find(e=>e.harness===a),l=e.workspace,o=void 0!==l&&("worktree"===l.kind?i?.repositories.includes(l.repository)??!1:i?.folders.includes(l.name)??!1);return{...e,harness:a,workspace:o?l:n(i),options:r(i)}}])},696994,e=>{"use strict";var t=e.i(280581);function a(e,t){return t?.labels.find(t=>t.key===e.key)?.values.find(t=>t.value===e.value)?.id}function r(e){return[...void 0===e.workspace?["workspace"]:[],...e.parameters.filter(e=>""===e.value.trim()).map(e=>e.name)]}function n(e,a){return[...void 0===a?[]:(0,t.pickedChips)(e.machineLabels,a).map(e=>({key:e.key,value:e.value})),...e.unknownLabels.map(e=>{let[t="",a=""]=e.split("=");return{key:t,value:a}})]}function s(e){return"worktree"===e.kind?`worktree:${e.repository}`:`folder:${e.name}`}e.s(["formMembersOf",0,function(e,t){return Object.fromEntries(e.map(e=>[e.slot,{crew:{...""===e.harness?{}:{harness:e.harness},...void 0===e.workspace?{}:{workspace:e.workspace},...""===e.firstPrompt.trim()?{}:{firstPrompt:e.firstPrompt},options:e.options,machineLabels:n(e,t)},parameters:Object.fromEntries(e.parameters.map(e=>[e.name,e.value]))}]))},"labelErrorSlot",0,function(e,t){let{members:a,context:r}=t,[,s]=/machine label (\S+?),/.exec(e)??[];if(void 0!==s)return a.find(e=>n(e,r).some(e=>`${e.key}=${e.value}`===s))?.slot},"membersOf",0,function(e,t){return e.map(e=>{let r=e.crew.machineLabels??[];return{slot:e.slot,role:e.role,template:`${e.template.name}@${String(e.template.version)}`,harness:e.crew.harness??"",workspace:function(e){if(void 0!==e)return"worktree"===e.kind?{kind:"worktree",repository:e.repository}:{kind:"folder",name:e.name}}(e.crew.workspace),firstPrompt:e.crew.firstPrompt??"",options:{...e.crew.options},machineLabels:r.flatMap(e=>a(e,t)??[]),unknownLabels:r.filter(e=>void 0===a(e,t)).map(e=>`${e.key}=${e.value}`),parameters:e.parameters.map(e=>({name:e.name,description:e.description,value:e.value??""}))}})},"missingOf",0,r,"readyCount",0,function(e){return{ready:e.filter(e=>0===r(e).length).length,total:e.length}},"withWorkspaceForAll",0,function(e,t){return e.map(e=>void 0===e.workspace?{...e,workspace:t}:e)},"workspaceFromItem",0,function(e){let[t,...a]=e.split(":"),r=a.join(":");return"worktree"===t?{kind:"worktree",repository:r}:"folder"===t?{kind:"folder",name:r}:void 0},"workspaceItemOf",0,s,"workspaceItemsOf",0,function(e,t){let a=new Map;for(let t of e){for(let e of t.repositories)a.set(s({kind:"worktree",repository:e}),`${e} \xb7 new worktree`);for(let e of t.folders)a.set(s({kind:"folder",name:e}),`${e} \xb7 folder, as it is`)}for(let{workspace:e}of t)void 0===e||a.has(s(e))||a.set(s(e),"worktree"===e.kind?`${e.repository} \xb7 new worktree, no machine offers it yet`:`${e.name} \xb7 folder, no machine offers it yet`);return Object.fromEntries(a)}])},718423,e=>{"use strict";var t=e.i(912598),a=e.i(905861),r=e.i(271645),n=e.i(586413),s=e.i(123938),i=e.i(427702);let l=new Set(["FleetInitialised","ShipCommissioned","ShipClaimed","LeaseRevoked","CredentialRevoked","StartingPromptIssued","ShipRetired","DeliveryAcknowledged","DeliveryUndeliverable","ShipReported","CrewRequested","CrewRequestRemoved","CrewAssigned","CrewStatusChanged","CrewRequestExplained","CrewRequestGivenBack","LabelAssigned","LabelUnassigned","LabelRetired"]);function o(e,t){return e.pages.some(e=>e.items.some(e=>e.id===t))}let d=new Set(["LabelDefined","LabelValuesChanged","LabelRetired","LabelAssigned","LabelUnassigned","LabelDeleted"]),c=new Set(["DeliveryUndeliverable","DeliveryNotHandled","DeliveryDismissed"]),u=new Set(["NetworkRulesSet","NetworkRulesDraftSaved","NetworkRulesDraftDiscarded","NetworkRulesDeclared","BuiltInRuleChanged"]);e.s(["useLiveFleet",0,function(){let e=(0,i.useTRPC)(),m=(0,t.useQueryClient)(),[h,f]=(0,r.useState)(new Set),p=(0,s.useIsReopening)(),[g]=(0,r.useState)(()=>{let t,a,r,s;return function(e){var t;let a,r,s,{trpc:i,queryClient:m,reload:h}=e,f=[...i.fleet.list.infiniteQueryKey()],p=()=>m.getQueriesData({queryKey:f}).flatMap(([,e])=>void 0===e?[]:[e]),g=(t={readRow:e=>m.query({...i.fleet.listedShip.queryOptions({shipId:e}),staleTime:0}),writeRow:t=>{let a=p().some(e=>!o(e,t.id));m.setQueriesData({queryKey:f},e=>e&&function(e,t){if(o(e,t.id))return{...e,pages:e.pages.map(e=>{var a;return{...e,items:(a=e.items,a.map(e=>e.id===t.id?t:e))}})};let[a,...r]=e.pages;return void 0===a?e:{...e,pages:[{...a,items:[t,...a.items]},...r]}}(e,t)),a&&e.onPlacedFirst(t.id)}},a=new Set,r=new Set,s=async e=>{a.add(e);try{do r.delete(e),t.writeRow(await t.readRow(e));while(r.has(e))}catch{}finally{a.delete(e),r.delete(e)}},e=>{a.has(e)?r.add(e):s(e)}),b=()=>{h(i.fleet.stuckCount.queryKey()),h(i.fleet.stuckSummary.queryKey()),h(i.fleet.stuck.pathKey())};return e=>{var t,a,r,s,o;if("resync"===e.kind){h(i.fleet.pathKey()),h(n.INBOX_KEY);return}let{event:m}=e;for(let e of new Set([m.shipId,m.actorShipId]))null!==e&&(h(i.fleet.ship.queryKey({shipId:e})),h(i.fleet.shipTimeline.infiniteQueryKey({shipId:e})),h(i.fleet.shipWay.queryKey({shipId:e})));if(null!==m.messageId&&(h(i.fleet.shipMessages.pathKey()),h(i.fleet.shipWay.pathKey()),h(i.fleet.message.queryKey({messageId:m.messageId})),h(i.fleet.inbox.pathKey()),h(i.fleet.inboxCount.queryKey()),h(n.INBOX_KEY),b()),"DeliveryAcknowledged"===m.type&&h(i.fleet.acknowledged.queryKey()),t=m.type,c.has(t)&&h(i.fleet.needsAttention.pathKey()),a=m.type,d.has(a)&&h(i.fleet.labels.queryKey()),"NetworkRulesDeclared"===m.type&&h(i.fleet.declaredNetworkRules.queryKey()),("BuiltInRuleChanged"===(r=m.type)||"NetworkRulesSet"===r)&&h(i.fleet.builtInRules.queryKey()),s=m.type,u.has(s)&&(h(i.fleet.networkRules.queryKey()),h(i.fleet.networkRulesDraftChanges.queryKey()),h(i.fleet.explainReach.pathKey())),o=m.type,l.has(o)){if(p().length>0)for(let e of new Set([m.shipId,m.actorShipId]))null!==e&&g(e);h(i.fleet.shipCounts.pathKey()),b()}}}({trpc:e,queryClient:m,reload:(t=new Set,a=new Set,r=e=>m.invalidateQueries({queryKey:e,exact:!0},{cancelRefetch:!1}),s=async e=>{t.add(e.queryHash);let n=e.isBehind;try{for(await r(e.queryKey);n||a.delete(e.queryHash);)n=!1,await r(e.queryKey)}finally{t.delete(e.queryHash)}},e=>{for(let r of m.getQueryCache().findAll({queryKey:e}))t.has(r.queryHash)?a.add(r.queryHash):s({queryHash:r.queryHash,queryKey:r.queryKey,isBehind:"fetching"===r.state.fetchStatus})}),onPlacedFirst:e=>{f(t=>new Set([...t,e]))}})}),b=(0,a.useSubscription)(e.fleet.events.subscriptionOptions({lastEventId:null},{onData:({data:e})=>{g(e)}}));return{live:"connecting"===b.status&&p?"live":function(e){switch(e){case"pending":return"live";case"connecting":return"reconnecting";case"idle":case"error":return"offline"}}(b.status),placedFirstShipIds:h,error:b.error}}])},878608,e=>{"use strict";var t=e.i(280581);function a(e,t){return e.ships.find(e=>e.id===t.shipId)?.labels.map(e=>e.valueId)??[]}e.s(["machineLabelIdsOf",0,function(e){return[...e?.machineLabels??[]]},"machineLabelsInputOf",0,function(e,r){let{machines:n,shipLabelsMax:s}=r;return{groups:function(e,t){let r=t.map(t=>a(e,t)),n=[],s=[];for(let t of e.labels){let a=t.values.map(e=>({valueId:e.id,value:e.value,shipCount:r.filter(t=>t.includes(e.id)).length})),i={labelId:t.id,key:t.key,mark:e.ownerOf.get(t.id)?.mark??"ship",values:a};(a.some(e=>e.shipCount>0)?n:s).push(i)}let i=(e,t)=>e.key.localeCompare(t.key);return[{title:"On machines",keys:n.toSorted(i)},{title:"On no machine yet",keys:s.toSorted(i)}].filter(e=>e.keys.length>0)}(e,n),max:s,chipsOf:a=>(0,t.pickedChips)(a,e),matchOf:t=>{var r;return{matching:(r={machines:n,valueIds:t}).machines.filter(t=>{let n=a(e,t);return r.valueIds.every(e=>n.includes(e))}).map(e=>e.name),total:r.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,function(e){return 1===e?{these:"this label",carries:"carries it"}:2===e?{these:"both",carries:"carries both"}:{these:"these labels",carries:"carries them all"}}])},928459,e=>{"use strict";var t=e.i(621482),a=e.i(954616),r=e.i(912598),n=e.i(731877),s=e.i(427702);function i(e){let t=String(e.attempts-1);return e.isPushed?`Handed ${t} times, never confirmed; fifth refused: undeliverable.`:`Handed (pulled) ${t} times, never acknowledged; fifth receive refused: undeliverable.`}let l="Acknowledged, then its turn died; handed once more, and that turn died too: not handled.";function o(){let e=(0,s.useTRPC)(),t=(0,r.useQueryClient)();return()=>t.invalidateQueries({queryKey:e.fleet.pathKey()})}e.s(["DISMISSED_TOAST",0,{title:"Delivery dismissed",description:"It stays in the timelines as dismissed."},"attentionReason",0,function(e){switch(e.state){case"undeliverable":return i(e);case"notHandled":return null===e.reason?l:`${l} Its crew said: ${e.reason}.`}},"canResend",0,function(e){return!e.message.isPing},"deliveryWithId",0,function(e,t){return e?.find(e=>e.deliveryId===t)},"resentToast",0,function(e){return{title:"Message resent",description:`A new message went to ${function(e){let{recipient:t}=e.message;return"ship"===t.kind?t.ship.name:`any ship of type ${t.type}`}(e)}. The original is dismissed.`}},"undeliverableReason",0,i,"useDismissDelivery",0,function(){let e=(0,s.useTRPC)(),t=o();return(0,a.useMutation)(e.fleet.dismiss.mutationOptions({onSuccess:t}))},"useNeedsAttention",0,function(e={}){let a=(0,s.useTRPC)();return(0,n.pagedListOf)((0,t.useInfiniteQuery)(a.fleet.needsAttention.infiniteQueryOptions({...e,limit:n.CONSOLE_PAGE_SIZE},{getNextPageParam:n.nextCursorOf})))},"useResendDelivery",0,function(){let e=(0,s.useTRPC)(),t=o();return(0,a.useMutation)(e.fleet.resend.mutationOptions({onSuccess:t}))}])}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,395530,e=>{"use strict";var t=e.i(271645),a=e.i(828918),r=e.i(838452),n=e.i(673553);e.s(["useCompositeItem",0,function(e={}){let{highlightItemOnHover:s,highlightedIndex:i,onHighlightedIndexChange:l}=(0,r.useCompositeRootContext)(),{ref:o,index:d}=(0,n.useCompositeListItem)(e),c=i===d,u=t.useRef(null),m=(0,a.useMergedRefs)(o,u);return{compositeProps:{tabIndex:c?0:-1,onFocus(){l(d)},onMouseMove(){let e=u.current;if(!s||!e)return;let t=e.hasAttribute("disabled")||"true"===e.ariaDisabled;c||t||e.focus()}},compositeRef:m,index:d}}])},172410,e=>{"use strict";e.i(247167);var t=e.i(271645);let a=t.createContext(void 0),r={disableStyleElements:!1};e.s(["useCSPContext",0,function(){return t.useContext(a)??r}])},381104,e=>{"use strict";var t=e.i(146376),a=e.i(388940),r=e.i(469690);e.s(["useRegisterFieldControl",0,function(e,n,s,i,l=!0,o){let{registerFieldControl:d}=(0,r.useFieldRootContext)(),c=(0,a.useRefWithInit)(()=>Symbol());(0,t.useIsoLayoutEffect)(()=>{let t=c.current;l?d(t,{controlRef:e,getValue:i,id:n,name:o,value:s}):d(t,void 0)},[e,l,i,n,o,d,c,s]),(0,t.useIsoLayoutEffect)(()=>{let e=c.current;return()=>{d(e,void 0)}},[d,c])}])},469690,875812,e=>{"use strict";var t=e.i(733332),a=e.i(271645),r=e.i(956789);let n={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},s={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},i={disabled:!1,...s};e.s(["DEFAULT_FIELD_ROOT_STATE",0,i,"DEFAULT_FIELD_STATE_ATTRIBUTES",0,s,"DEFAULT_VALIDITY_STATE",0,n,"fieldValidityMapping",0,{valid:e=>null===e?null:e?{"data-valid":""}:{"data-invalid":""}}],875812);let l={invalid:void 0,name:void 0,validityData:{state:n,errors:[],error:"",value:"",initialValue:null},setValidityData:r.NOOP,disabled:void 0,setTouched:r.NOOP,setDirty:r.NOOP,setFilled:r.NOOP,setFocused:r.NOOP,validationMode:"onSubmit",shouldValidateOnChange:()=>!1,state:i,registerFieldControl:r.NOOP,validation:{getValidationProps:(e,t=r.EMPTY_OBJECT)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:r.NOOP,getInputControl:()=>null,commit:async()=>{},change:r.NOOP}},o=a.createContext(l);e.s(["DEFAULT_FIELD_ROOT_CONTEXT",0,l,"FieldRootContext",0,o,"useFieldRootContext",0,function(e=!0){let n=a.useContext(o);if(n.setValidityData===r.NOOP&&!e)throw Error((0,t.default)(28));return n}],469690)},884708,e=>{"use strict";e.i(247167);var t=e.i(271645),a=e.i(956789);let r=t.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:a.NOOP,validationMode:"onSubmit",submitCountRef:{current:0}});e.s(["useFormContext",0,function(){return t.useContext(r)}])},247778,e=>{"use strict";e.i(247167);var t=e.i(271645),a=e.i(956789);let r=t.createContext({controlId:void 0,registerControlId:a.NOOP,resetControlId:a.NOOP,labelId:void 0,setLabelId:a.NOOP,messageIds:[],setMessageIds:a.NOOP,getDescriptionProps:e=>e});e.s(["LabelableContext",0,r,"useLabelableContext",0,function(){return t.useContext(r)}])},897886,e=>{"use strict";var t=e.i(229315),a=e.i(108868),r=e.i(667865),n=e.i(584446),s=e.i(146376),i=e.i(788015),l=e.i(247778);e.s(["useLabel",0,function(e={}){let o,{id:d,fallbackControlId:c,native:u=!1,setLabelId:m,focusControl:h}=e,{controlId:f,setLabelId:p}=(0,l.useLabelableContext)(),g=(0,r.useStableCallback)(e=>{p(e),m?.(e)}),b=(o=(0,i.useBaseUiId)(d),(0,s.useIsoLayoutEffect)(()=>(g(o),()=>{g(e=>e===o?void 0:e)}),[o,g]),o),x=f??c;function y(e){let r=(0,n.getTarget)(e.nativeEvent);r?.closest("button,input,select,textarea")||(!e.defaultPrevented&&e.detail>1&&e.preventDefault(),u||function(e){if(h)return h(e,x);if(!x)return;let r=(0,a.ownerDocument)(e.currentTarget).getElementById(x);(0,t.isHTMLElement)(r)&&r.focus({focusVisible:!0})}(e))}return u?{id:b,htmlFor:x,onMouseDown:y}:{id:b,onClick:y,onPointerDown(e){e.preventDefault()}}}],897886)},538489,e=>{"use strict";var t=e.i(271645),a=e.i(146376),r=e.i(667865),n=e.i(388940),s=e.i(956789),i=e.i(788015),l=e.i(247778);e.s(["useLabelableId",0,function(e={}){let{id:o,enabled:d=!0}=e,{controlId:c,registerControlId:u,resetControlId:m}=(0,l.useLabelableContext)(),h=(0,i.useBaseUiId)(),f=(0,n.useRefWithInit)(()=>Symbol()),p=t.useRef(!1),g=t.useRef(!1),b=(0,r.useStableCallback)(()=>{p.current&&u!==s.NOOP&&(p.current=!1,u(f.current,void 0))});return(0,a.useIsoLayoutEffect)(()=>{let e;if(!d||u===s.NOOP)return void b();if(void 0!==o)g.current=!0,e=o;else{if(!g.current)return void m();e=h}void 0===e?b():(p.current=!0,u(f.current,e))},[o,d,u,m,h,f,b]),(0,a.useIsoLayoutEffect)(()=>b,[b]),(d?c:void 0)??o??h}])},186698,e=>{"use strict";e.s(["serializeValue",0,function(e){if(null==e)return"";if("string"==typeof e)return e;try{return JSON.stringify(e)}catch{return String(e)}}])},590803,e=>{"use strict";e.s(["isElementDisabled",0,function(e){return null==e||e.hasAttribute("disabled")||"true"===e.getAttribute("aria-disabled")}])},713203,265858,484325,42191,450001,818438,e=>{"use strict";var t=e.i(271645);e.s(["useOnFirstRender",0,function(e){let a=t.useRef(!0);a.current&&(a.current=!1,e())}],713203);var a=e.i(229315),r=e.i(883977),n=e.i(146376),s=e.i(388940),i=e.i(990627),l=e.i(46420),o=e.i(156341);e.s(["useFloatingRootContext",0,function(e){let{open:t=!1,onOpenChange:d,elements:c={}}=e,u=(0,r.useId)(),m=null!=(0,l.useFloatingParentNodeId)(),h=(0,s.useRefWithInit)(()=>new o.FloatingRootStore({open:t,transitionStatus:void 0,onOpenChange:d,referenceElement:c.reference??null,floatingElement:c.floating??null,triggerElements:new i.PopupTriggerMap,floatingId:u,syncOnly:!1,nested:m})).current;return(0,n.useIsoLayoutEffect)(()=>{let e={open:t,floatingId:u};void 0!==c.reference&&(e.referenceElement=c.reference,e.domReferenceElement=(0,a.isElement)(c.reference)?c.reference:null),void 0!==c.floating&&(e.floatingElement=c.floating),h.update(e)},[t,u,c.reference,c.floating,h]),h.context.onOpenChange=d,h.context.nested=m,h}],265858);let d=(e,t)=>Object.is(e,t);function c(e,t,a){return null==e||null==t?Object.is(e,t):a(e,t)}function u(e,t,a){return!!e&&e.some(e=>void 0!==e&&c(t,e,a))}function m(e,t,a){return e?e.findIndex(e=>void 0!==e&&c(e,t,a)):-1}function h(e,t,a,r){let n=r&&Array.isArray(t)?e.findIndex(function(e,t){if(t!==d)return a=>u(e,a,t);let a=new Set(e);return a.delete(void 0),t=>a.has(t)&&(0!==t||e.some(e=>Object.is(t,e)))}(t,a)):m(e,t,a);return -1===n?null:n}e.s(["compareItemEquality",0,c,"defaultItemEquality",0,d,"findItemIndex",0,m,"findSelectionIndex",0,h,"isSelectedValueDirty",0,function(e,t,a){return Array.isArray(e)&&Array.isArray(t)?!function(e,t,a=Object.is){let{length:r}=e;if(r!==t.length)return!1;for(let n=0;n<r;n+=1)if(!a(e[n],t[n]))return!1;return!0}(e,t,(e,t)=>c(e,t,a)):e!==t},"removeItem",0,function(e,t,a){return e.filter(e=>!c(t,e,a))},"resolveSelectedIndex",0,function(e,t,a,r,n,s){return u(r,t,n)?null!=s&&e>s&&u(r,a[s],n)?s:e:e===s?h(a,r,n,!0):s},"selectedValueIncludes",0,u],484325);var f=e.i(186698),p=e.i(843476);function g(e){var t;return"object"==typeof(t=e?.[0])&&null!=t&&Array.isArray(t.items)}function b(e){return g(e)?e.flatMap(e=>e.items):e}function x(e,t){if(t&&null!=e)return t(e)??"";if(e&&"object"==typeof e){if("label"in e&&null!=e.label)return String(e.label);if("value"in e)return String(e.value)}return(0,f.serializeValue)(e)}function y(e,t,a){if(a&&null!=e)return a(e);if(e&&"object"==typeof e&&"label"in e&&null!=e.label)return e.label;if(t&&!Array.isArray(t))return(Object.hasOwn(t,e)?t[e]:void 0)??x(e,a);if(Array.isArray(t)){let r=b(t);if(null==e||"object"!=typeof e){let t=r.find(t=>t.value===e);return t&&null!=t.label?t.label:x(e,a)}if("value"in e){let t=r.find(t=>t&&t.value===e.value);if(t&&null!=t.label)return t.label}}return x(e,a)}e.s(["flattenLeafItems",0,b,"hasNullItemLabel",0,function(e){if(!Array.isArray(e))return null!=e&&"null"in e;if(g(e)){for(let t of e)for(let e of t.items)if(e&&null==e.value&&null!=e.label)return!0;return!1}for(let t of e)if(t&&null==t.value&&null!=t.label)return!0;return!1},"isGroupedItems",0,g,"resolveMultipleLabels",0,function(e,a,r){return e.reduce((e,n,s)=>(s>0&&e.push(", "),e.push((0,p.jsx)(t.Fragment,{children:y(n,a,r)},s)),e),[])},"resolveSelectedLabel",0,y,"stringifyAsLabel",0,x,"stringifyAsValue",0,function(e,t){return t&&null!=e?t(e)??"":e&&"object"==typeof e&&"value"in e&&"label"in e?(0,f.serializeValue)(e.value):(0,f.serializeValue)(e)}],42191),e.s(["getDefaultLabelId",0,function(e){return null==e?void 0:`${e}-label`},"resolveAriaLabelledBy",0,function(e,t){return e??t}],450001);var v=e.i(552245);let k=t.forwardRef(function(e,t){let{className:a,render:r,orientation:n="horizontal",style:s,...i}=e;return(0,v.useRenderElement)("div",e,{state:{orientation:n},ref:t,props:[{role:"presentation"},i]})});e.s(["ListboxSeparator",0,k],818438)},749655,987255,450092,536604,e=>{"use strict";var t=e.i(456420);let a={name:"alarm-clock",size:24,node:[["circle",{cx:"12",cy:"13",r:"8",key:"3y4lt7"}],["path",{d:"M12 9v4l2 2",key:"1c63tq"}],["path",{d:"M5 3 2 6",key:"18tl5t"}],["path",{d:"m22 6-3-3",key:"1opdir"}],["path",{d:"M6.38 18.7 4 21",key:"17xu3x"}],["path",{d:"M17.64 18.67 20 21",key:"kv2oe2"}]]};a.node;let r=(0,t.default)(a);e.s(["AlarmClock",0,r],749655);let n={name:"anchor",size:24,node:[["path",{d:"M12 6v16",key:"nqf5sj"}],["path",{d:"m19 13 2-1a9 9 0 0 1-18 0l2 1",key:"y7qv08"}],["path",{d:"M9 11h6",key:"1fldmi"}],["circle",{cx:"12",cy:"4",r:"2",key:"muu5ef"}]]};n.node;let s=(0,t.default)(n);e.s(["Anchor",0,s],987255);let i={name:"circle-arrow-right",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m12 16 4-4-4-4",key:"1i9zcv"}],["path",{d:"M8 12h8",key:"1wcyev"}]],aliases:["arrow-right-circle"]};i.node;let l=(0,t.default)(i);e.s(["CircleArrowRight",0,l],450092);let o={name:"circle-check-big",size:24,node:[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],aliases:["check-circle"]};o.node;let d=(0,t.default)(o);e.s(["CircleCheckBig",0,d],536604)},876561,e=>{"use strict";var t=e.i(456420);let a={name:"archive",size:24,node:[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]};a.node;let r=(0,t.default)(a);e.s(["Archive",0,r],876561)},768877,e=>{"use strict";var t=e.i(456420);let a={name:"arrow-right",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]};a.node;let r=(0,t.default)(a);e.s(["ArrowRight",0,r],768877)},847211,e=>{"use strict";var t=e.i(456420);let a={name:"ban",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}]]};a.node;let r=(0,t.default)(a);e.s(["Ban",0,r],847211)},24071,e=>{"use strict";var t=e.i(456420);let a={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};a.node;let r=(0,t.default)(a);e.s(["ChevronLeft",0,r],24071)},867927,e=>{"use strict";var t=e.i(456420);let a={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};a.node;let r=(0,t.default)(a);e.s(["ChevronRight",0,r],867927)},152886,e=>{"use strict";var t=e.i(456420);let a={name:"circle-dashed",size:24,node:[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]]};a.node;let r=(0,t.default)(a);e.s(["CircleDashed",0,r],152886)},119002,e=>{"use strict";var t=e.i(456420);let a={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"]};a.node;let r=(0,t.default)(a);e.s(["CirclePause",0,r],119002)},832297,426391,519647,710001,25799,e=>{"use strict";var t=e.i(456420);let a={name:"circle-play",size:24,node:[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],aliases:["play-circle"]};a.node;let r=(0,t.default)(a);e.s(["CirclePlay",0,r],832297);let n={name:"circle-dot-dashed",size:24,node:[["path",{d:"M10.1 2.18a9.93 9.93 0 0 1 3.8 0",key:"1qdqn0"}],["path",{d:"M17.6 3.71a9.95 9.95 0 0 1 2.69 2.7",key:"1bq7p6"}],["path",{d:"M21.82 10.1a9.93 9.93 0 0 1 0 3.8",key:"1rlaqf"}],["path",{d:"M20.29 17.6a9.95 9.95 0 0 1-2.7 2.69",key:"1xk03u"}],["path",{d:"M13.9 21.82a9.94 9.94 0 0 1-3.8 0",key:"l7re25"}],["path",{d:"M6.4 20.29a9.95 9.95 0 0 1-2.69-2.7",key:"1v18p6"}],["path",{d:"M2.18 13.9a9.93 9.93 0 0 1 0-3.8",key:"xdo6bj"}],["path",{d:"M3.71 6.4a9.95 9.95 0 0 1 2.7-2.69",key:"1jjmaz"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]};n.node;let s=(0,t.default)(n);e.s(["CircleDotDashed",0,s],426391);let i={name:"circle-minus",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}]],aliases:["minus-circle"]};i.node;let l=(0,t.default)(i);e.s(["CircleMinus",0,l],519647);let o={name:"flag-off",size:24,node:[["path",{d:"M16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1q158e"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M4 22V4",key:"1plyxx"}],["path",{d:"M7.656 2H8c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10.347",key:"xj1b71"}]]};o.node;let d=(0,t.default)(o);e.s(["FlagOff",0,d],710001);let c={name:"mail-check",size:24,node:[["path",{d:"M22 13V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h8",key:"12jkf8"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}],["path",{d:"m16 19 2 2 4-4",key:"1b14m6"}]]};c.node;let u=(0,t.default)(c);e.s(["MailCheck",0,u],25799)},275043,446513,e=>{"use strict";var t=e.i(456420);let a={name:"circle-question-mark",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["help-circle","circle-help"]};a.node;let r=(0,t.default)(a);e.s(["default",0,r],275043);let n={name:"monitor",size:24,node:[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]};n.node;let s=(0,t.default)(n);e.s(["Monitor",0,s],446513)},821048,e=>{"use strict";var t=e.i(456420);let a={name:"circle-slash",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"9",x2:"15",y1:"15",y2:"9",key:"1dfufj"}]]};a.node;let r=(0,t.default)(a);e.s(["CircleSlash",0,r],821048)},316984,e=>{"use strict";var t=e.i(456420);let a={name:"circle-x",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],aliases:["x-circle"]};a.node;let r=(0,t.default)(a);e.s(["CircleX",0,r],316984)},474544,e=>{"use strict";var t=e.i(456420);let a={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};a.node;let r=(0,t.default)(a);e.s(["Clock",0,r],474544)},831458,e=>{"use strict";var t=e.i(456420);let a={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"}]]};a.node;let r=(0,t.default)(a);e.s(["Flag",0,r],831458)},671028,e=>{"use strict";var t=e.i(456420);let a={name:"gauge",size:24,node:[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]};a.node;let r=(0,t.default)(a);e.s(["Gauge",0,r],671028)},981658,e=>{"use strict";var t=e.i(456420);let a={name:"hourglass",size:24,node:[["path",{d:"M5 22h14",key:"ehvnwv"}],["path",{d:"M5 2h14",key:"pdyrp9"}],["path",{d:"M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22",key:"1d314k"}],["path",{d:"M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2",key:"1vvvr6"}]]};a.node;let r=(0,t.default)(a);e.s(["Hourglass",0,r],981658)},806537,e=>{"use strict";var t=e.i(456420);let a={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"}]]};a.node;let r=(0,t.default)(a);e.s(["Lock",0,r],806537)},985512,e=>{"use strict";var t=e.i(456420);let a={name:"octagon-alert",size:24,node:[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]],aliases:["alert-octagon"]};a.node;let r=(0,t.default)(a);e.s(["OctagonAlert",0,r],985512)},77071,e=>{"use strict";var t=e.i(456420);let a={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};a.node;let r=(0,t.default)(a);e.s(["Plus",0,r],77071)},457665,e=>{"use strict";var t=e.i(456420);let a={name:"power",size:24,node:[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]};a.node;let r=(0,t.default)(a);e.s(["Power",0,r],457665)},395925,485627,e=>{"use strict";var t=e.i(456420);let a={name:"rotate-ccw",size:24,node:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]};a.node;let r=(0,t.default)(a);e.s(["RotateCcw",0,r],395925);let n={name:"sailboat",size:24,node:[["path",{d:"M10 2v15",key:"1qf71f"}],["path",{d:"M7 22a4 4 0 0 1-4-4 1 1 0 0 1 1-1h16a1 1 0 0 1 1 1 4 4 0 0 1-4 4z",key:"1pxcvx"}],["path",{d:"M9.159 2.46a1 1 0 0 1 1.521-.193l9.977 8.98A1 1 0 0 1 20 13H4a1 1 0 0 1-.824-1.567z",key:"5oog16"}]]};n.node;let s=(0,t.default)(n);e.s(["Sailboat",0,s],485627)},566595,e=>{"use strict";var t=e.i(456420);let a={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};a.node;let r=(0,t.default)(a);e.s(["Search",0,r],566595)},819759,e=>{"use strict";var t=e.i(456420);let a={name:"square-pen",size:24,node:[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],aliases:["pen-box","edit","pen-square"]};a.node;let r=(0,t.default)(a);e.s(["SquarePen",0,r],819759)},466787,e=>{"use strict";var t=e.i(456420);let a={name:"triangle-alert",size:24,node:[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["alert-triangle"]};a.node;let r=(0,t.default)(a);e.s(["TriangleAlert",0,r],466787)},594831,e=>{"use strict";var t=e.i(456420);let a={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"}]]};a.node;let r=(0,t.default)(a);e.s(["Unplug",0,r],594831)},892870,e=>{"use strict";var t=e.i(456420);let a={name:"user-check",size:24,node:[["path",{d:"m16 11 2 2 4-4",key:"9rsbq5"}],["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]};a.node;let r=(0,t.default)(a);e.s(["UserCheck",0,r],892870)},298260,e=>{"use strict";var t=e.i(843476),a=e.i(965324);e.s(["Kbd",0,function({className:e,...r}){return(0,t.jsx)("kbd",{"data-slot":"kbd",className:(0,a.classNames)("inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-xs border border-border bg-muted px-1.25 font-sans text-micro font-medium text-muted-foreground max-sm:hidden",e),...r})}])},638919,e=>{"use strict";var t=e.i(843476),a=e.i(353753),r=e.i(225913),n=e.i(560964),s=e.i(965324),i=e.i(574296);let l=(0,r.cva)("fixed z-50 flex flex-col bg-popover text-body text-popover-foreground shadow-lg outline-none duration-(--duration-slow) ease-(--ease-standard) data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",{variants:{side:{right:"inset-y-0 right-0 h-full w-full border-l border-border sm:max-w-(--size-sheet) motion-safe:data-open:slide-in-from-right motion-safe:data-closed:slide-out-to-right",bottom:"inset-x-0 bottom-0 max-h-[90dvh] rounded-t-2xl border-t border-border px-4 pt-2 pb-[max(calc(var(--spacing)*4),env(safe-area-inset-bottom))] motion-safe:data-open:slide-in-from-bottom motion-safe:data-closed:slide-out-to-bottom"}},defaultVariants:{side:"right"}});e.s(["Sheet",0,function(e){return(0,t.jsx)(a.Dialog.Root,{"data-slot":"sheet",...e})},"SheetBody",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"sheet-body",className:(0,s.classNames)("min-h-0 flex-1 overflow-y-auto in-data-[side=right]:p-6",e),...a})},"SheetClose",0,function(e){return(0,t.jsx)(a.Dialog.Close,{"data-slot":"sheet-close",...e})},"SheetContent",0,function({className:e,children:r,side:o="right",...d}){return(0,t.jsxs)(a.Dialog.Portal,{children:[(0,t.jsx)(a.Dialog.Backdrop,{"data-slot":"sheet-overlay",className:"fixed inset-0 z-50 bg-overlay duration-(--duration-slow) data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0"}),(0,t.jsxs)(a.Dialog.Popup,{"data-slot":"sheet-content","data-side":o,className:(0,s.classNames)(l({side:o}),e),...d,children:["bottom"===o?(0,t.jsx)("div",{"aria-hidden":!0,className:"mx-auto mb-3 h-1 w-9 shrink-0 rounded-full bg-border"}):(0,t.jsx)(a.Dialog.Close,{"data-slot":"sheet-close",render:(0,t.jsx)(i.Button,{variant:"ghost",size:"sm",isIconOnly:!0,className:"absolute top-4 right-4","aria-label":"Close"}),children:(0,t.jsx)(n.XIcon,{})}),r]})]})},"SheetDescription",0,function({className:e,...r}){return(0,t.jsx)(a.Dialog.Description,{"data-slot":"sheet-description",className:(0,s.classNames)("text-meta text-muted-foreground",e),...r})},"SheetFooter",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"sheet-footer",className:(0,s.classNames)("flex flex-col-reverse gap-2 pt-3 in-data-[side=right]:flex-row in-data-[side=right]:justify-end in-data-[side=right]:border-t in-data-[side=right]:px-6 in-data-[side=right]:py-4",e),...a})},"SheetHeader",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"sheet-header",className:(0,s.classNames)("flex flex-col gap-0.5 in-data-[side=right]:border-b in-data-[side=right]:px-6 in-data-[side=right]:py-5 in-data-[side=right]:pr-14",e),...a})},"SheetTitle",0,function({className:e,...r}){return(0,t.jsx)(a.Dialog.Title,{"data-slot":"sheet-title",className:(0,s.classNames)("text-heading font-semibold text-foreground in-data-[side=bottom]:py-2 in-data-[side=bottom]:text-section",e),...r})},"SheetTrigger",0,function(e){return(0,t.jsx)(a.Dialog.Trigger,{"data-slot":"sheet-trigger",...e})}])},250834,e=>{"use strict";var t=e.i(843476),a=e.i(618566),r=e.i(271645),n=e.i(67874),s=e.i(817981),i=e.i(188393),l=e.i(806537),o=e.i(77071),d=e.i(849635),c=e.i(784294),u=e.i(766390),m=e.i(574296),h=e.i(946033),f=e.i(414732),p=e.i(1935),g=e.i(941246),b=e.i(78865);function x({blueprint:e,version:a,onVersionChange:r,templates:n,squadrons:s,onForm:i}){let y=e.versions.find(e=>e.version===a)??e.versions[0];if(!y)return null;let v=e.versions[0]?.version,k=Object.fromEntries(e.versions.map(e=>[String(e.version),`v${String(e.version)}${e.version===v?" (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)(u.Badge,{variant:"secondary",children:"Blueprint"}),(0,t.jsxs)(h.Select,{items:k,value:String(y.version),onValueChange:e=>{r(Number(e))},children:[(0,t.jsxs)(h.SelectTrigger,{"aria-label":"Version","data-testid":"blueprint-version",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"Version"}),(0,t.jsx)(h.SelectValue,{className:"font-medium"})]}),(0,t.jsx)(h.SelectContent,{children:Object.entries(k).map(([e,a])=>(0,t.jsx)(h.SelectItem,{value:e,children:a},e))})]}),(0,t.jsxs)("span",{"data-testid":"blueprint-source",className:"text-meta text-muted-foreground",children:[(0,t.jsx)("span",{className:"font-mono",children:y.file})," at ",(0,t.jsx)("span",{className:"font-mono",children:y.commit.slice(0,7)}),", ",(0,d.dayDate)(new Date(y.committedAt))]}),i&&(0,t.jsx)(m.Button,{variant:"primary",icon:(0,t.jsx)(o.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)(l.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)(f.Table,{children:[(0,t.jsx)(f.TableHeader,{children:(0,t.jsxs)(f.TableRow,{children:[(0,t.jsx)(f.TableHead,{children:"Role"}),(0,t.jsx)(f.TableHead,{children:"Template"}),(0,t.jsx)(f.TableHead,{children:"Members"}),(0,t.jsx)(f.TableHead,{children:"Check-in"}),(0,t.jsx)(f.TableHead,{children:"Launch note"})]})}),(0,t.jsx)(f.TableBody,{children:y.roles.map(e=>{let a,r=(a=e.template,n.find(e=>e.repository===a.repository&&e.name===a.name&&e.version===a.version));return(0,t.jsxs)(f.TableRow,{"data-testid":"blueprint-role",children:[(0,t.jsx)(f.TableCell,{children:(0,t.jsx)(u.Badge,{variant:"type",children:e.name})}),(0,t.jsx)(f.TableCell,{className:"font-mono",children:`${e.template.name}@${String(e.template.version)}`}),(0,t.jsx)(f.TableCell,{children:e.count}),(0,t.jsx)(f.TableCell,{children:r?(0,c.checkInText)(r.checkInMinutes):"unknown"}),(0,t.jsx)(f.TableCell,{className:"max-w-64 truncate text-muted-foreground",children:r?.launchNote??""})]},e.name)})})]})]}),(0,t.jsx)(g.HandoffWiring,{blueprint:y})]}),(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===v&&(0,t.jsx)(u.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===s.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:s.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)(b.StatusBadge,{status:e.state,className:"ml-auto"})]},e.id))})]})]})]})]})}var y=e.i(251442),v=e.i(837631),k=e.i(787964),w=e.i(319846),j=e.i(490262),N=e.i(718423),S=e.i(928459),C=e.i(678485),I=e.i(686165),M=e.i(448695);e.s(["default",0,function({params:e,searchParams:l}){let o=decodeURIComponent((0,r.use)(e).name),d=(0,r.use)(l),u=(0,a.useRouter)(),m=(0,k.useConsoleFrame)(),h=(0,S.useNeedsAttention)(),f=(0,N.useLiveFleet)(),p=(0,M.useCatalogue)(),g=(0,I.useSquadronsConnection)(),b=(0,M.useSquadrons)(),[O,q]=(0,r.useState)(!1),z=(0,j.useAccess)();(0,C.useSignInWhenSessionEnds)([h.error,f.error]);let R=(0,c.blueprintChoices)(p.data??{blueprints:[]}),A=R.find(e=>e.name===o&&(void 0===d.repository||e.repository===d.repository)),L=Number(d.version??A?.versions[0]?.version);return(0,t.jsx)(v.DetailPage,{switcher:m.switcher,account:m.account,onCompose:m.onCompose,onSearch:m.onSearch,banner:m.banner,title:o,parents:[{href:"/squadrons",label:"Squadrons"},{href:"/squadrons?tab=blueprints",label:"Blueprints"}],header:(0,t.jsx)("h1",{className:"text-title font-semibold",children:o}),live:f.live,children:"not-connected"===g?(0,t.jsx)(w.SquadronsNotConnected,{}):p.isError?(0,t.jsx)(s.InlineError,{title:"Couldn’t read the blueprint",description:"The squadron manager couldn’t read the catalogue. Squadrons formed from it keep sailing.",detail:p.error.message,onRetry:()=>{p.refetch()}}):p.data?A?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(x,{blueprint:A,version:L,onVersionChange:e=>{u.replace((0,c.blueprintPath)({repository:A.repository,name:A.name,version:e}))},templates:p.data.templates,squadrons:(0,c.squadronsFromBlueprint)(b.data??[],A),onForm:z.canManage?()=>{q(!0)}:void 0}),(0,t.jsx)(y.FormSquadron,{blueprints:R,templates:p.data.templates,initial:{key:A.key,version:L},isOpen:O,onOpenChange:q,onFormed:e=>{q(!1),u.push(`/squadrons/${e}`)}},`${A.key}@${String(L)}`)]}):(0,t.jsx)(n.EmptyState,{title:"No such blueprint",description:`git holds no blueprint ${o}.`}):(0,t.jsx)(i.LoadingSkeleton,{variant:"detail",label:"Loading the blueprint"})})}],250834)},219321,e=>{"use strict";var t=e.i(843476),a=e.i(965324);e.s(["Skeleton",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"skeleton","aria-hidden":!0,className:(0,a.classNames)("animate-pulse rounded-sm bg-secondary [animation-duration:var(--duration-pulse)] motion-reduce:animate-none",e),...r})}])},414732,e=>{"use strict";var t=e.i(843476),a=e.i(456420);let r={name:"arrow-down",size:24,node:[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]};r.node;let n=(0,a.default)(r),s={name:"arrow-up",size:24,node:[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]};s.node;let i=(0,a.default)(s),l={name:"chevrons-up-down",size:24,node:[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]};l.node;let o=(0,a.default)(l);var d=e.i(965324);function c({className:e,...a}){return(0,t.jsx)("th",{"data-slot":"table-head",className:(0,d.classNames)("px-4 text-left align-middle text-caption font-medium whitespace-nowrap text-muted-foreground",e),...a})}e.s(["Table",0,function({className:e,...a}){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,d.classNames)("w-full caption-bottom text-body",e),...a})})},"TableBody",0,function({className:e,...a}){return(0,t.jsx)("tbody",{"data-slot":"table-body",className:(0,d.classNames)("[&_tr:last-child]:border-0",e),...a})},"TableCell",0,function({className:e,...a}){return(0,t.jsx)("td",{"data-slot":"table-cell",className:(0,d.classNames)("px-4 align-middle",e),...a})},"TableHead",0,c,"TableHeader",0,function({className:e,...a}){return(0,t.jsx)("thead",{"data-slot":"table-header",className:(0,d.classNames)("bg-muted [&_tr]:border-b",e),...a})},"TableRow",0,function({className:e,...a}){return(0,t.jsx)("tr",{"data-slot":"table-row",className:(0,d.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),...a})},"TableSortHead",0,function({direction:e,onSort:a,children:r,className:s,...l}){return(0,t.jsx)(c,{"aria-sort":e??"none",className:(0,d.classNames)("px-2",s),...l,children:(0,t.jsxs)("button",{type:"button",onClick:a,className:"inline-flex h-7 items-center gap-1 rounded-sm px-2 font-medium hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring data-sorted:text-foreground","data-sorted":null===e?void 0:"",children:[r,(0,t.jsx)("ascending"===e?i:"descending"===e?n:o,{"aria-hidden":!0,className:(0,d.classNames)("size-3.5 shrink-0",null===e?"opacity-50":void 0)})]})})}],414732)},67874,e=>{"use strict";var t=e.i(843476),a=e.i(965324);e.s(["EmptyState",0,function({title:e,description:r,icon:n,action:s,variant:i="page",className:l}){return"section"===i?(0,t.jsxs)("p",{"data-slot":"empty-state","data-variant":i,className:(0,a.classNames)("rounded-lg border border-border px-4 py-3 text-center text-meta text-muted-foreground",l),children:[e,r?(0,t.jsxs)(t.Fragment,{children:[" ",r]}):null]}):"no-results"===i?(0,t.jsxs)("div",{"data-slot":"empty-state","data-variant":i,className:(0,a.classNames)("flex flex-col items-center gap-2.5 rounded-lg border border-border bg-card px-4 py-6 text-center",l),children:[(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:e}),s]}):(0,t.jsxs)("div",{"data-slot":"empty-state","data-variant":i,className:(0,a.classNames)("flex flex-col items-center gap-3 rounded-lg border border-dashed border-border bg-card px-6 py-10 text-center",l),children:[n?(0,t.jsx)("span",{"aria-hidden":!0,className:"flex size-10 items-center justify-center rounded-lg border border-border bg-muted text-muted-foreground [&_svg]:size-(--size-icon-xl)",children:n}):null,(0,t.jsx)("h2",{className:"text-heading font-semibold text-foreground max-sm:text-heading-touch",children:e}),r?(0,t.jsx)("p",{className:"max-w-96 text-meta text-muted-foreground max-sm:text-body-touch",children:r}):null,s?(0,t.jsx)("div",{className:"mt-1 max-sm:w-full max-sm:[&>*]:w-full",children:s}):null]})}])},188393,e=>{"use strict";var t=e.i(843476),a=e.i(965324),r=e.i(219321);function n(e){return Array.from({length:e},(e,t)=>`row-${String(t)}`)}e.s(["LoadingSkeleton",0,function({variant:e,rows:s=4,label:i="Loading",className:l}){return(0,t.jsxs)("div",{role:"status","data-slot":"loading-skeleton","data-variant":e,className:(0,a.classNames)("w-full",l),children:[(0,t.jsx)("span",{className:"sr-only",children:i}),"table"===e?(0,t.jsxs)("div",{className:"overflow-hidden rounded-lg border border-border bg-card shadow-sm",children:[(0,t.jsx)("div",{className:"h-(--size-row-header) border-b border-border bg-muted"}),n(s).map(e=>(0,t.jsxs)("div",{className:"flex h-(--size-row) items-center gap-8 border-b border-border px-4 last:border-0",children:[(0,t.jsx)(r.Skeleton,{className:"h-2.5 w-24"}),(0,t.jsx)(r.Skeleton,{className:"h-5 w-16"}),(0,t.jsx)(r.Skeleton,{className:"h-5 w-20"}),(0,t.jsx)(r.Skeleton,{className:"h-2.5 w-28"})]},e))]}):null,"cards"===e?(0,t.jsx)("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:n(4).map(e=>(0,t.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-4",children:[(0,t.jsx)(r.Skeleton,{className:"h-2.5 w-20"}),(0,t.jsx)(r.Skeleton,{className:"h-6 w-10"}),(0,t.jsx)(r.Skeleton,{className:"h-2.5 w-28"})]},e))}):null,"detail"===e?(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsx)(r.Skeleton,{className:"h-7 w-48"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(r.Skeleton,{className:"h-5 w-20"}),(0,t.jsx)(r.Skeleton,{className:"h-5 w-16"})]}),(0,t.jsx)(r.Skeleton,{className:"h-16 w-full rounded-lg"})]}):null,"list"===e?(0,t.jsx)("div",{className:"overflow-hidden rounded-lg border border-border bg-card",children:n(s).map(e=>(0,t.jsxs)("div",{className:"flex flex-col gap-2.5 border-b border-border px-3.5 py-3 last:border-0",children:[(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)(r.Skeleton,{className:"h-3 w-28"}),(0,t.jsx)(r.Skeleton,{className:"h-5 w-16"})]}),(0,t.jsx)(r.Skeleton,{className:"h-2.5 w-44"})]},e))}):null]})}])},1935,e=>{"use strict";var t=e.i(843476),a=e.i(660011),r=e.i(522016),n=e.i(965324);e.s(["SquadronTag",0,function({squadronId:e,role:s,size:i="md",className:l}){return(0,t.jsxs)(r.default,{href:`/squadrons/${e}`,"data-slot":"squadron-tag",className:(0,n.classNames)("inline-flex max-w-full items-center gap-1 rounded-sm bg-secondary px-1.5 text-secondary-foreground hover:underline [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0","sm"===i?"h-5.5 text-meta":"h-6 text-body",l),children:[(0,t.jsx)(a.Shapes,{"aria-hidden":!0}),(0,t.jsx)("span",{className:"truncate font-medium",children:e}),void 0!==s&&(0,t.jsxs)("span",{className:"shrink-0 text-muted-foreground",children:["· ",s]})]})}])},78865,e=>{"use strict";var t=e.i(843476),a=e.i(749655),r=e.i(987255),n=e.i(876561),s=e.i(847211),i=e.i(422768),l=e.i(450092),o=e.i(536604),d=e.i(119002),c=e.i(832297),u=e.i(821048),m=e.i(474544),h=e.i(285595),f=e.i(152886),p=e.i(426391),g=e.i(519647),b=e.i(316984),x=e.i(710001),y=e.i(671028),v=e.i(981658),k=e.i(444594),w=e.i(611568),j=e.i(25799),N=e.i(985512),S=e.i(457665),C=e.i(395925),I=e.i(485627),M=e.i(466787),O=e.i(892870),q=e.i(456420);let z={name:"user-round-search",size:24,node:[["circle",{cx:"10",cy:"8",r:"5",key:"o932ke"}],["path",{d:"M2 21a8 8 0 0 1 10.434-7.62",key:"1yezr2"}],["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["path",{d:"m22 22-1.9-1.9",key:"1e5ubv"}]]};z.node;let R=(0,q.default)(z);var A=e.i(965324),L=e.i(766390);let T={waiting:"border-tone-waiting-border bg-tone-waiting-bg text-tone-waiting-fg",active:"border-tone-active-border bg-tone-active-bg text-tone-active-fg",ok:"border-tone-ok-border bg-tone-ok-bg text-tone-ok-fg",attention:"border-tone-attention-border bg-tone-attention-bg text-tone-attention-fg",ended:"border-tone-ended-border bg-tone-ended-bg text-tone-ended-fg"},D={awaitingCrew:{tone:"waiting",Icon:f.CircleDashed,label:"Awaiting crew"},crewed:{tone:"ok",Icon:O.UserCheck,label:"Crewed"},retired:{tone:"ended",Icon:n.Archive,label:"Retired"},pending:{tone:"waiting",Icon:v.Hourglass,label:"Pending"},received:{tone:"active",Icon:k.Inbox,label:"Received"},handed:{tone:"active",Icon:l.CircleArrowRight,label:"Handed (pulled)"},handedPushed:{tone:"active",Icon:l.CircleArrowRight,label:"Handed"},overdue:{tone:"attention",Icon:a.AlarmClock,label:"Overdue"},acknowledged:{tone:"ok",Icon:h.CircleCheck,label:"Acknowledged"},handled:{tone:"ok",Icon:o.CircleCheckBig,label:"Handled"},notHandled:{tone:"attention",Icon:i.CircleAlert,label:"Not handled"},undeliverable:{tone:"attention",Icon:b.CircleX,label:"Undeliverable"},dismissed:{tone:"ended",Icon:g.CircleMinus,label:"Dismissed"},abandoned:{tone:"ended",Icon:s.Ban,label:"Abandoned"},forming:{tone:"waiting",Icon:p.CircleDotDashed,label:"Forming"},sailing:{tone:"ok",Icon:I.Sailboat,label:"Sailing"},"standing-down":{tone:"active",Icon:r.Anchor,label:"Standing down"},disbanded:{tone:"ended",Icon:x.FlagOff,label:"Disbanded"},"at-limit":{tone:"waiting",Icon:y.Gauge,label:"At limit"},"over-limit":{tone:"attention",Icon:M.TriangleAlert,label:"Over limit"},needsCrew:{tone:"waiting",Icon:m.Clock,label:"Needs crew"},crewedByHand:{tone:"ok",Icon:O.UserCheck,label:"Crewed by hand"},crewing:{tone:"active",Icon:w.LoaderCircle,label:"Crewing"},running:{tone:"ok",Icon:c.CirclePlay,label:"Running"},restarting:{tone:"waiting",Icon:C.RotateCcw,label:"Restarting"},crashed:{tone:"attention",Icon:b.CircleX,label:"Crashed"},releasing:{tone:"active",Icon:S.Power,label:"Releasing"},stuck:{tone:"attention",Icon:N.OctagonAlert,label:"Stuck"},delivering:{tone:"ok",Icon:j.MailCheck,label:"Delivering"},noShipCanTake:{tone:"attention",Icon:u.CircleSlash,label:"No ship can take"},waitingForCrew:{tone:"waiting",Icon:R,label:"Waiting for crew"},stalledInFlight:{tone:"waiting",Icon:d.CirclePause,label:"Stalled in flight"}};e.s(["StatusBadge",0,function({status:e,className:a}){let{tone:r,Icon:n,label:s}=D[e];return(0,t.jsxs)(L.Badge,{variant:"outline","data-slot":"status-badge","data-status":e,className:(0,A.classNames)(T[r],"abandoned"===e?"border-dashed":void 0,a),children:[(0,t.jsx)(n,{"aria-hidden":!0}),s]})},"statusLabel",0,function(e){return D[e].label}],78865)},837631,e=>{"use strict";var t=e.i(843476),a=e.i(577880),r=e.i(485538);e.s(["DetailPage",0,function({title:e,parents:n,header:s,children:i,sheet:l,live:o,switcher:d,account:c,onCompose:u,onSearch:m,banner:h}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.Header,{breadcrumb:e,parents:n,live:o,switcher:d,account:c,onCompose:u,onSearch:m}),h,(0,t.jsx)(r.TopBar,{title:e,live:o,back:n[n.length-1]??n[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:[s,i]}),l]})}])},577880,485538,e=>{"use strict";var t=e.i(843476),a=e.i(566595),r=e.i(374368),n=e.i(574296),s=e.i(298260),i=e.i(704974),l=e.i(965324);function o({switcher:e,account:d,onSearch:c,searchLabel:u="Search or jump to",children:m,actions:h,className:f}){return(0,t.jsxs)("header",{"data-slot":"app-header",className:(0,l.classNames)("sticky top-0 z-30 flex h-(--size-header) shrink-0 items-center justify-between gap-4 border-b border-border bg-background px-6",f),children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[void 0===e?(0,t.jsx)("span",{"data-testid":"app-switcher-loading","aria-hidden":!0,className:"h-4 w-36 shrink-0 animate-pulse rounded bg-muted motion-reduce:animate-none"}):(0,t.jsx)(r.AppSwitcher,{switcher:e,layout:"full",className:"shrink-0"}),m]}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-3",children:[h,c?(0,t.jsxs)(n.Button,{size:"sm",icon:(0,t.jsx)(a.Search,{"aria-hidden":!0}),"data-testid":"header-search",className:"w-60 justify-start font-normal text-muted-foreground max-lg:w-auto",onClick:c,children:[(0,t.jsx)("span",{className:"grow text-left max-lg:sr-only",children:u}),(0,t.jsx)(s.Kbd,{children:"⌘K"})]}):null,(0,t.jsx)(i.AvatarMenu,{...d})]})]})}var d=e.i(867927),c=e.i(819759),u=e.i(522016);let m={live:{label:"Live",dot:"bg-tone-ok-fg"},reconnecting:{label:"Reconnecting",dot:"bg-tone-waiting-fg"},offline:{label:"Offline",dot:"bg-tone-attention-fg"}};function h({state:e,className:a}){let{label:r,dot:n}=m[e];return(0,t.jsxs)("span",{"data-slot":"live-status","data-state":e,"aria-live":"polite",className:(0,l.classNames)("inline-flex items-center gap-1.5 text-meta text-muted-foreground",a),children:[(0,t.jsx)("span",{"aria-hidden":!0,className:(0,l.classNames)("size-2 shrink-0 rounded-full",n)}),r]})}e.s(["Header",0,function({breadcrumb:e,parents:a=[],live:r,switcher:s,account:i,onCompose:l,onSearch:m}){return(0,t.jsxs)(o,{switcher:s,account:i,onSearch:m,searchLabel:"Search ships or jump to",className:"hidden sm:flex",actions:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h,{state:r}),l?(0,t.jsx)(n.Button,{size:"sm",icon:(0,t.jsx)(c.SquarePen,{"aria-hidden":!0}),"data-testid":"header-compose",onClick:l,children:"Compose"}):null]}),children:[(0,t.jsx)(d.ChevronRight,{"aria-hidden":!0,className:"size-3.5 shrink-0 text-muted-foreground"}),(0,t.jsx)("nav",{"aria-label":"Breadcrumb","data-testid":"header-breadcrumb",className:"min-w-0 text-body",children:(0,t.jsxs)("ol",{className:"flex min-w-0 items-center gap-1.5",children:[a.map(e=>(0,t.jsxs)("li",{className:"flex shrink-0 items-center gap-1.5",children:[(0,t.jsx)(u.default,{href:e.href,className:"text-muted-foreground hover:text-foreground hover:underline",children:e.label}),(0,t.jsx)(d.ChevronRight,{"aria-hidden":!0,className:"size-3.5 text-muted-foreground"})]},e.href)),(0,t.jsx)("li",{"aria-current":"page",className:"truncate font-medium text-foreground",children:e})]})})]})}],577880);var f=e.i(24071);e.s(["TopBar",0,function({title:e,live:s,actions:l,back:o,switcher:d,account:c,onSearch:m}){let p=m&&!o?m:void 0;return(0,t.jsxs)("header",{"data-slot":"top-bar","data-mode":o?"detail":"root",className:"sticky top-0 z-30 flex h-(--size-header) items-center gap-2.5 border-b border-border bg-background px-4 sm:hidden",children:[o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(u.default,{href:o.href,className:"-ml-1.5 inline-flex h-(--size-control-touch) shrink-0 items-center gap-0.5 rounded-md pr-2 text-body-touch text-foreground focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon)",children:[(0,t.jsx)(f.ChevronLeft,{"aria-hidden":!0}),o.label]}),(0,t.jsx)("p",{className:"min-w-0 flex-1 truncate text-center text-body-touch font-semibold text-foreground",children:e})]}):d?(0,t.jsx)(r.AppSwitcher,{switcher:d,layout:"compact",className:"min-w-0"}):(0,t.jsx)("p",{className:"truncate px-1.5 text-title-touch font-semibold text-foreground",children:"Console"}),(0,t.jsx)(h,{state:s}),l||p||c&&!o?(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[p?(0,t.jsx)(n.Button,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Search ships or jump to","data-testid":"top-bar-search",onClick:p,children:(0,t.jsx)(a.Search,{"aria-hidden":!0})}):null,l,c&&!o?(0,t.jsx)(i.AvatarMenuSheet,{...c}):null]}):null]})}],485538)},319846,e=>{"use strict";var t=e.i(843476),a=e.i(594831),r=e.i(522016),n=e.i(574296),s=e.i(67874);e.s(["SquadronsNotConnected",0,function(){return(0,t.jsx)(s.EmptyState,{icon:(0,t.jsx)(a.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)(n.Button,{nativeButton:!1,render:(0,t.jsx)(r.default,{href:"/settings"}),"data-testid":"squadrons-open-settings",children:"Open Settings"})})}])},251442,e=>{"use strict";var t=e.i(843476),a=e.i(271645),r=e.i(917540),n=e.i(34512),s=e.i(808041),i=e.i(905387),l=e.i(696994),o=e.i(878608),d=e.i(448695),c=e.i(500265);let u=(0,r.lazyDialog)(()=>e.A(967928).then(e=>e.FormSquadronDialog),e=>e.isOpen);e.s(["FormSquadron",0,function({blueprints:e,templates:r,isOpen:m,onOpenChange:h,initial:f,onFormed:p}){let g=(0,c.useHasTrierarchPlugin)(),b=(0,d.useFormSquadron)(),[x,y]=(0,a.useState)(),v=(0,d.useBlueprintCrew)(g?x:void 0),k=(0,c.useMachines)(),w=(0,i.useLabelContext)(k.data?.map(e=>e.shipId)),{shipLabelsMax:j}=(0,n.useConsoleConstants)(),N=void 0===w||void 0===k.data?void 0:(0,o.machineLabelsInputOf)(w,{machines:k.data,shipLabelsMax:j});return(0,t.jsx)(u,{blueprints:e,templates:r,...void 0===f?{}:{initial:f},isOpen:m,onOpenChange:h,isPending:b.isPending,...null===b.error?{}:{error:b.error.message},onPicked:e=>{b.reset(),y(e)},...g?{crew:{state:v.isError||k.isError?"error":void 0===v.data||void 0===k.data?"loading":"ready",members:v.data??[],offers:(0,s.offersOf)(k.data??[]),...void 0===w?{}:{context:w},...void 0===N?{}:{machineLabels:N},...null===v.error?null===k.error?{}:{error:k.error.message}:{error:v.error.message},onRetry:()=>{v.refetch(),k.refetch()}}}:{},onSubmit:(e,t)=>{b.mutate({blueprint:e,...void 0===t?{}:{members:(0,l.formMembersOf)(t,w)}},{onSuccess:e=>{p(e.squadronId)}})}})}])},941246,e=>{"use strict";var t=e.i(843476),a=e.i(768877),r=e.i(831458),n=e.i(271645),s=e.i(965324),i=e.i(766390);function l({name:e,count:a,onHover:n}){let s={onPointerEnter:()=>{n(e)},onPointerLeave:()=>{n(void 0)}};return"flagship"===e?(0,t.jsxs)(i.Badge,{variant:"kind",...s,children:[(0,t.jsx)(r.Flag,{"aria-hidden":!0}),"flagship"]}):(0,t.jsxs)(i.Badge,{variant:"type",...s,children:[e,void 0!==a&&a>1&&(0,t.jsxs)("span",{className:"text-muted-foreground",children:["×",a]})]})}e.s(["HandoffWiring",0,function({blueprint:e}){let[r,i]=(0,n.useState)(void 0),o=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,s.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)(l,{name:e.role,count:o.get(e.role),onHover:i})}),(0,t.jsxs)("span",{className:"flex items-center gap-1 font-mono text-muted-foreground",children:[e.handoff,(0,t.jsx)(a.ArrowRight,{"aria-label":"goes to",className:"size-(--size-icon-sm)"})]}),(0,t.jsx)("span",{children:(0,t.jsx)(l,{name:e.to,count:o.get(e.to),onHover:i})})]},`${e.role}.${e.handoff}`))})]})}])},808041,e=>{"use strict";var t=e.i(714695);function a(e,t){for(let a of t)e.includes(a)||e.push(a)}function r(e){return Object.fromEntries((e?.options??[]).flatMap(e=>{let t=e.defaultValue??e.values[0];return void 0===t?[]:[[e.name,t]]}))}function n(e){let[t]=e?.repositories??[];if(void 0!==t)return{kind:"worktree",repository:t};let[a]=e?.folders??[];return void 0===a?void 0:{kind:"folder",name:a}}function s(e){let[t]=e;return{harness:t?.harness??"",workspace:n(t),options:r(t),firstPrompt:"",squadron:"",machineLabels:[]}}let i=new TextEncoder;function l(e){return i.encode(e).byteLength}function o(e){return e<1024?`${String(e)} B`:`${(e/1024).toFixed(1).replace(/\.0$/,"")} KB`}e.s(["byteSize",0,o,"defaultValues",0,s,"offersOf",0,function(e){let r=[];for(let n of e)if(!n.isSilent&&null!==n.details)for(let e of n.details.harnesses){let s=r.find(t=>t.harness===e.harness);for(let i of(void 0===s&&(s={harness:e.harness,repositories:[],folders:[],options:[]},r.push(s)),a(s.repositories,n.details.workspaces.repositories),a(s.folders,n.details.workspaces.folders),(0,t.harnessOptions)(e.options))){let e=s.options.find(e=>e.name===i.name);void 0===e?s.options.push({...i,values:[...i.values]}):(a(e.values,i.values),e.defaultValue??=i.defaultValue)}}return r},"promptBytes",0,l,"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}}},"settingsRows",0,function(e){if(null==e)return;let{harness:t,workspace:a,options:r,firstPrompt:n,squadron:s}=e;return[{label:"Harness",value:t??"Trierarch default"},"worktree"===a.kind?{label:"Workspace",value:a.repository,meta:"New worktree"}:{label:"Workspace",value:a.name,meta:"Folder, as it is"},...Object.entries(r).map(([e,t])=>({label:e,value:"string"==typeof t?t:JSON.stringify(t),isMono:!0})),{label:"First prompt",value:void 0===n?null:o(l(n))},{label:"Squadron",value:s??null,isMono:!0}]},"valuesOf",0,function(e,t){if(null==e)return s(t);let{harness:a,workspace:r,options:n,firstPrompt:i,squadron:l,machineLabels:o}=e;return{harness:a??s(t).harness,workspace:"worktree"===r.kind?{kind:"worktree",repository:r.repository}:{kind:"folder",name:r.name},options:Object.fromEntries(Object.entries(n).flatMap(([e,t])=>"string"==typeof t?[[e,t]]:[])),firstPrompt:i??"",squadron:l??"",machineLabels:[...o??[]]}},"withHarness",0,function(e,t){let{harness:a,offers:s}=t,i=s.find(e=>e.harness===a),l=e.workspace,o=void 0!==l&&("worktree"===l.kind?i?.repositories.includes(l.repository)??!1:i?.folders.includes(l.name)??!1);return{...e,harness:a,workspace:o?l:n(i),options:r(i)}}])},696994,e=>{"use strict";var t=e.i(280581);function a(e,t){return t?.labels.find(t=>t.key===e.key)?.values.find(t=>t.value===e.value)?.id}function r(e){return[...void 0===e.workspace?["workspace"]:[],...e.parameters.filter(e=>""===e.value.trim()).map(e=>e.name)]}function n(e,a){return[...void 0===a?[]:(0,t.pickedChips)(e.machineLabels,a).map(e=>({key:e.key,value:e.value})),...e.unknownLabels.map(e=>{let[t="",a=""]=e.split("=");return{key:t,value:a}})]}function s(e){return"worktree"===e.kind?`worktree:${e.repository}`:`folder:${e.name}`}e.s(["formMembersOf",0,function(e,t){return Object.fromEntries(e.map(e=>[e.slot,{crew:{...""===e.harness?{}:{harness:e.harness},...void 0===e.workspace?{}:{workspace:e.workspace},...""===e.firstPrompt.trim()?{}:{firstPrompt:e.firstPrompt},options:e.options,machineLabels:n(e,t)},parameters:Object.fromEntries(e.parameters.map(e=>[e.name,e.value]))}]))},"labelErrorSlot",0,function(e,t){let{members:a,context:r}=t,[,s]=/machine label (\S+?),/.exec(e)??[];if(void 0!==s)return a.find(e=>n(e,r).some(e=>`${e.key}=${e.value}`===s))?.slot},"membersOf",0,function(e,t){return e.map(e=>{let r=e.crew.machineLabels??[];return{slot:e.slot,role:e.role,template:`${e.template.name}@${String(e.template.version)}`,harness:e.crew.harness??"",workspace:function(e){if(void 0!==e)return"worktree"===e.kind?{kind:"worktree",repository:e.repository}:{kind:"folder",name:e.name}}(e.crew.workspace),firstPrompt:e.crew.firstPrompt??"",options:{...e.crew.options},machineLabels:r.flatMap(e=>a(e,t)??[]),unknownLabels:r.filter(e=>void 0===a(e,t)).map(e=>`${e.key}=${e.value}`),parameters:e.parameters.map(e=>({name:e.name,description:e.description,value:e.value??""}))}})},"missingOf",0,r,"readyCount",0,function(e){return{ready:e.filter(e=>0===r(e).length).length,total:e.length}},"withWorkspaceForAll",0,function(e,t){return e.map(e=>void 0===e.workspace?{...e,workspace:t}:e)},"workspaceFromItem",0,function(e){let[t,...a]=e.split(":"),r=a.join(":");return"worktree"===t?{kind:"worktree",repository:r}:"folder"===t?{kind:"folder",name:r}:void 0},"workspaceItemOf",0,s,"workspaceItemsOf",0,function(e,t){let a=new Map;for(let t of e){for(let e of t.repositories)a.set(s({kind:"worktree",repository:e}),`${e} \xb7 new worktree`);for(let e of t.folders)a.set(s({kind:"folder",name:e}),`${e} \xb7 folder, as it is`)}for(let{workspace:e}of t)void 0===e||a.has(s(e))||a.set(s(e),"worktree"===e.kind?`${e.repository} \xb7 new worktree, no machine offers it yet`:`${e.name} \xb7 folder, no machine offers it yet`);return Object.fromEntries(a)}])},718423,e=>{"use strict";var t=e.i(912598),a=e.i(905861),r=e.i(271645),n=e.i(586413),s=e.i(123938),i=e.i(427702);let l=new Set(["FleetInitialised","ShipCommissioned","ShipClaimed","LeaseRevoked","CredentialRevoked","StartingPromptIssued","ShipRetired","DeliveryAcknowledged","DeliveryUndeliverable","ShipReported","CrewRequested","CrewRequestRemoved","CrewAssigned","CrewStatusChanged","CrewRequestExplained","CrewRequestGivenBack","LabelAssigned","LabelUnassigned","LabelRetired"]);function o(e,t){return e.pages.some(e=>e.items.some(e=>e.id===t))}let d=new Set(["LabelDefined","LabelValuesChanged","LabelRetired","LabelAssigned","LabelUnassigned","LabelDeleted"]),c=new Set(["DeliveryUndeliverable","DeliveryNotHandled","DeliveryDismissed"]),u=new Set(["NetworkRulesSet","NetworkRulesDraftSaved","NetworkRulesDraftDiscarded","NetworkRulesDeclared","BuiltInRuleChanged"]);e.s(["useLiveFleet",0,function(){let e=(0,i.useTRPC)(),m=(0,t.useQueryClient)(),[h,f]=(0,r.useState)(new Set),p=(0,s.useIsReopening)(),[g]=(0,r.useState)(()=>{let t,a,r,s;return function(e){var t;let a,r,s,{trpc:i,queryClient:m,reload:h}=e,f=[...i.fleet.list.infiniteQueryKey()],p=()=>m.getQueriesData({queryKey:f}).flatMap(([,e])=>void 0===e?[]:[e]),g=(t={readRow:e=>m.query({...i.fleet.listedShip.queryOptions({shipId:e}),staleTime:0}),writeRow:t=>{let a=p().some(e=>!o(e,t.id));m.setQueriesData({queryKey:f},e=>e&&function(e,t){if(o(e,t.id))return{...e,pages:e.pages.map(e=>{var a;return{...e,items:(a=e.items,a.map(e=>e.id===t.id?t:e))}})};let[a,...r]=e.pages;return void 0===a?e:{...e,pages:[{...a,items:[t,...a.items]},...r]}}(e,t)),a&&e.onPlacedFirst(t.id)}},a=new Set,r=new Set,s=async e=>{a.add(e);try{do r.delete(e),t.writeRow(await t.readRow(e));while(r.has(e))}catch{}finally{a.delete(e),r.delete(e)}},e=>{a.has(e)?r.add(e):s(e)}),b=()=>{h(i.fleet.stuckCount.queryKey()),h(i.fleet.stuckSummary.queryKey()),h(i.fleet.stuck.pathKey())};return e=>{var t,a,r,s,o;if("resync"===e.kind){h(i.fleet.pathKey()),h(n.INBOX_KEY);return}let{event:m}=e;for(let e of new Set([m.shipId,m.actorShipId]))null!==e&&(h(i.fleet.ship.queryKey({shipId:e})),h(i.fleet.shipTimeline.infiniteQueryKey({shipId:e})),h(i.fleet.shipWay.queryKey({shipId:e})));if(null!==m.messageId&&(h(i.fleet.shipMessages.pathKey()),h(i.fleet.shipWay.pathKey()),h(i.fleet.message.queryKey({messageId:m.messageId})),h(i.fleet.inbox.pathKey()),h(i.fleet.inboxCount.queryKey()),h(n.INBOX_KEY),b()),"DeliveryAcknowledged"===m.type&&h(i.fleet.acknowledged.queryKey()),t=m.type,c.has(t)&&h(i.fleet.needsAttention.pathKey()),a=m.type,d.has(a)&&h(i.fleet.labels.queryKey()),"NetworkRulesDeclared"===m.type&&h(i.fleet.declaredNetworkRules.queryKey()),("BuiltInRuleChanged"===(r=m.type)||"NetworkRulesSet"===r)&&h(i.fleet.builtInRules.queryKey()),s=m.type,u.has(s)&&(h(i.fleet.networkRules.queryKey()),h(i.fleet.networkRulesDraftChanges.queryKey()),h(i.fleet.explainReach.pathKey())),o=m.type,l.has(o)){if(p().length>0)for(let e of new Set([m.shipId,m.actorShipId]))null!==e&&g(e);h(i.fleet.shipCounts.pathKey()),b()}}}({trpc:e,queryClient:m,reload:(t=new Set,a=new Set,r=e=>m.invalidateQueries({queryKey:e,exact:!0},{cancelRefetch:!1}),s=async e=>{t.add(e.queryHash);let n=e.isBehind;try{for(await r(e.queryKey);n||a.delete(e.queryHash);)n=!1,await r(e.queryKey)}finally{t.delete(e.queryHash)}},e=>{for(let r of m.getQueryCache().findAll({queryKey:e}))t.has(r.queryHash)?a.add(r.queryHash):s({queryHash:r.queryHash,queryKey:r.queryKey,isBehind:"fetching"===r.state.fetchStatus})}),onPlacedFirst:e=>{f(t=>new Set([...t,e]))}})}),b=(0,a.useSubscription)(e.fleet.events.subscriptionOptions({lastEventId:null},{onData:({data:e})=>{g(e)}}));return{live:"connecting"===b.status&&p?"live":function(e){switch(e){case"pending":return"live";case"connecting":return"reconnecting";case"idle":case"error":return"offline"}}(b.status),placedFirstShipIds:h,error:b.error}}])},878608,e=>{"use strict";var t=e.i(280581);function a(e,t){return e.ships.find(e=>e.id===t.shipId)?.labels.map(e=>e.valueId)??[]}e.s(["machineLabelIdsOf",0,function(e){return[...e?.machineLabels??[]]},"machineLabelsInputOf",0,function(e,r){let{machines:n,shipLabelsMax:s}=r;return{groups:function(e,t){let r=t.map(t=>a(e,t)),n=[],s=[];for(let t of e.labels){let a=t.values.map(e=>({valueId:e.id,value:e.value,shipCount:r.filter(t=>t.includes(e.id)).length})),i={labelId:t.id,key:t.key,mark:e.ownerOf.get(t.id)?.mark??"ship",values:a};(a.some(e=>e.shipCount>0)?n:s).push(i)}let i=(e,t)=>e.key.localeCompare(t.key);return[{title:"On machines",keys:n.toSorted(i)},{title:"On no machine yet",keys:s.toSorted(i)}].filter(e=>e.keys.length>0)}(e,n),max:s,chipsOf:a=>(0,t.pickedChips)(a,e),matchOf:t=>{var r;return{matching:(r={machines:n,valueIds:t}).machines.filter(t=>{let n=a(e,t);return r.valueIds.every(e=>n.includes(e))}).map(e=>e.name),total:r.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,function(e){return 1===e?{these:"this label",carries:"carries it"}:2===e?{these:"both",carries:"carries both"}:{these:"these labels",carries:"carries them all"}}])},928459,415168,e=>{"use strict";var t=e.i(621482),a=e.i(954616),r=e.i(912598),n=e.i(731877),s=e.i(427702);function i(e){switch(e.kind){case"type":return`any ship of type ${e.type}`;case"meeting":return`every other participant of meeting ${e.meetingId}`}}function l(e){let t=String(e.attempts-1);return e.isPushed?`Handed ${t} times, never confirmed; fifth refused: undeliverable.`:`Handed (pulled) ${t} times, never acknowledged; fifth receive refused: undeliverable.`}e.s(["recipientGroupWords",0,i],415168);let o="Acknowledged, then its turn died; handed once more, and that turn died too: not handled.";function d(){let e=(0,s.useTRPC)(),t=(0,r.useQueryClient)();return()=>t.invalidateQueries({queryKey:e.fleet.pathKey()})}e.s(["DISMISSED_TOAST",0,{title:"Delivery dismissed",description:"It stays in the timelines as dismissed."},"attentionReason",0,function(e){switch(e.state){case"undeliverable":return l(e);case"notHandled":return null===e.reason?o:`${o} Its crew said: ${e.reason}.`}},"canResend",0,function(e){return!e.message.isPing},"deliveryWithId",0,function(e,t){return e?.find(e=>e.deliveryId===t)},"resentToast",0,function(e){return{title:"Message resent",description:`A new message went to ${function(e){let{recipient:t}=e.message;return"ship"===t.kind?t.ship.name:i(t)}(e)}. The original is dismissed.`}},"undeliverableReason",0,l,"useDismissDelivery",0,function(){let e=(0,s.useTRPC)(),t=d();return(0,a.useMutation)(e.fleet.dismiss.mutationOptions({onSuccess:t}))},"useNeedsAttention",0,function(e={}){let a=(0,s.useTRPC)();return(0,n.pagedListOf)((0,t.useInfiniteQuery)(a.fleet.needsAttention.infiniteQueryOptions({...e,limit:n.CONSOLE_PAGE_SIZE},{getNextPageParam:n.nextCursorOf})))},"useResendDelivery",0,function(){let e=(0,s.useTRPC)(),t=d();return(0,a.useMutation)(e.fleet.resend.mutationOptions({onSuccess:t}))}],928459)}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,967928,e=>{e.v(t=>Promise.all(["static/chunks/0kcev3l5eyvux.js"].map(t=>e.l(t))).then(()=>t(792963)))}]);