@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.
- package/.next/standalone/packages/console/.next/BUILD_ID +1 -1
- package/.next/standalone/packages/console/.next/build-manifest.json +3 -3
- package/.next/standalone/packages/console/.next/node_modules/import-in-the-middle-ac114f323ad7e863/index.js +221 -0
- package/.next/standalone/packages/console/.next/node_modules/import-in-the-middle-ac114f323ad7e863/lib/register.js +285 -0
- package/.next/standalone/packages/console/.next/node_modules/import-in-the-middle-ac114f323ad7e863/package.json +66 -0
- package/.next/standalone/packages/console/.next/node_modules/require-in-the-middle-2ca7b9c2766f317e/index.js +333 -0
- package/.next/standalone/packages/console/.next/node_modules/require-in-the-middle-2ca7b9c2766f317e/package.json +57 -0
- package/.next/standalone/packages/console/.next/prerender-manifest.json +3 -3
- package/.next/standalone/packages/console/.next/server/app/(console)/fleet-health/[cause]/page/server-reference-manifest.json +14 -14
- package/.next/standalone/packages/console/.next/server/app/(console)/fleet-health/[cause]/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/fleet-health/[cause]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/fleet-health/page/server-reference-manifest.json +14 -14
- package/.next/standalone/packages/console/.next/server/app/(console)/fleet-health/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/fleet-health/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/inbox/page/server-reference-manifest.json +14 -14
- package/.next/standalone/packages/console/.next/server/app/(console)/inbox/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/inbox/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/labels/page/server-reference-manifest.json +14 -14
- package/.next/standalone/packages/console/.next/server/app/(console)/labels/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/labels/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/needs-attention/page/server-reference-manifest.json +14 -14
- package/.next/standalone/packages/console/.next/server/app/(console)/needs-attention/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/needs-attention/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/needs-crew/page/server-reference-manifest.json +14 -14
- package/.next/standalone/packages/console/.next/server/app/(console)/needs-crew/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/needs-crew/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/network/page/server-reference-manifest.json +14 -14
- package/.next/standalone/packages/console/.next/server/app/(console)/network/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/network/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/page/react-loadable-manifest.json +2 -2
- package/.next/standalone/packages/console/.next/server/app/(console)/page/server-reference-manifest.json +14 -14
- package/.next/standalone/packages/console/.next/server/app/(console)/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/settings/page/server-reference-manifest.json +14 -14
- package/.next/standalone/packages/console/.next/server/app/(console)/settings/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/ships/[shipId]/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/ships/[shipId]/page/server-reference-manifest.json +14 -14
- package/.next/standalone/packages/console/.next/server/app/(console)/ships/[shipId]/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/ships/[shipId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/[squadronId]/page/server-reference-manifest.json +14 -14
- package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/[squadronId]/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/[squadronId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/blueprints/[name]/page/react-loadable-manifest.json +2 -2
- package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/blueprints/[name]/page/server-reference-manifest.json +14 -14
- package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/blueprints/[name]/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/blueprints/[name]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/page/react-loadable-manifest.json +2 -2
- package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/page/server-reference-manifest.json +14 -14
- package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/templates/[name]/page/server-reference-manifest.json +14 -14
- package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/templates/[name]/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/templates/[name]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/trierarchs/[shipId]/page/server-reference-manifest.json +14 -14
- package/.next/standalone/packages/console/.next/server/app/(console)/trierarchs/[shipId]/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/trierarchs/[shipId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/trierarchs/page/server-reference-manifest.json +14 -14
- package/.next/standalone/packages/console/.next/server/app/(console)/trierarchs/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/trierarchs/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/packages/console/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/packages/console/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/packages/console/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/packages/console/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/packages/console/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/api/reads/[read]/route.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/sign-in/argo/confirm/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/sign-in/argo/confirm/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/sign-in/argo/out/route.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/sign-in/argo/refused/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/sign-in/argo/refused/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/sign-in/argo/route.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/sign-in/failed/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/sign-in/failed/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/sign-in/no-rights/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/sign-in/no-rights/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/sign-in/nothing-to-manage/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/sign-in/nothing-to-manage/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/sign-in/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/sign-in/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/sign-in/unreachable/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/sign-in/unreachable/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/version/route.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/[root-of-the-server]__0-b_d8j._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/[root-of-the-server]__0w4s32w._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/[root-of-the-server]__1c0qgbj._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/_1uqphll._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/{_1wqk91b._.js → _022r12n._.js} +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/_02sf-6u._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/{_0bzikib._.js → _05noh6w._.js} +2 -2
- package/.next/standalone/packages/console/.next/server/chunks/ssr/_07_cqry._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/_0bdsmu0._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/{_1eaafw1._.js → _0is0iyt._.js} +2 -2
- package/.next/standalone/packages/console/.next/server/chunks/ssr/_0j-afyt._.js +3 -0
- package/.next/standalone/packages/console/.next/server/chunks/ssr/_0nbjb5h._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/_0qux6-9._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/{_0vw3hp0._.js → _0sravq5._.js} +2 -2
- package/.next/standalone/packages/console/.next/server/chunks/ssr/_14ww2ld._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/_15whprd._.js +3 -0
- package/.next/standalone/packages/console/.next/server/chunks/ssr/_1bc8get._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/_1bmxy9n._.js +3 -0
- package/.next/standalone/packages/console/.next/server/chunks/ssr/_1e2tdd6._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/_1fthxzz._.js +3 -0
- package/.next/standalone/packages/console/.next/server/chunks/ssr/_1hsu1v2._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/_1u0h4gj._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/{_0bzwxa5._.js → _1vleg6y._.js} +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/_1ymusis._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/_20j7vun._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/node_modules_zod_v4_classic_external_15fmmz3.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_03-f8b4._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_10js6wa._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_00qg_s6._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_02v53na._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_02wkudy._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_04rox65._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_05zitd2._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_065nea1._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_11tdbkt._.js → packages_console_0d8_fed._.js} +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_0h_376h._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_0ko_ogs._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_0sr2-oa._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_0ysbad7._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_108sez2._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_1pyirkn._.js → packages_console_11f_j7c._.js} +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_1pslvww._.js → packages_console_16ys_pd._.js} +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_1jy5-0g._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_1n8w8x0._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_1oz8iu7._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_1rdu3gt._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_1yfimad._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_app_(console)_fleet-health_page_tsx_0vcosw1._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_app_(console)_network_network-page_tsx_0qc3h-9._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_app_(console)_ships_[shipId]_ship-page_tsx_0oahz0r._.js +1 -1
- 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
- package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_features_ship_ui_organisms_message-sheet_tsx_08bg9ly._.js +1 -1
- 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
- package/.next/standalone/packages/console/.next/server/middleware-build-manifest.js +3 -3
- package/.next/standalone/packages/console/.next/server/pages/500.html +1 -1
- package/.next/standalone/packages/console/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/server-reference-manifest.json +15 -15
- package/.next/standalone/packages/console/.next/static/chunks/0_3x64wrf-bcc.js +1 -0
- package/.next/standalone/packages/console/.next/static/chunks/{3v8kvo897cw7g.js → 0kcev3l5eyvux.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/{09i8egz-ukq1h.js → 19h1iu002omr_.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/{23rmynijvqsdw.js → 1b36z114mad41.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/1odi-st5n0w9h.js +1 -0
- package/.next/standalone/packages/console/.next/static/chunks/{1z-37z24uifp1.js → 1sm_yeexx288v.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/{26lqmfd6v4qb4.js → 1tjv8rgwrbbg_.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/{0tzezbiiera4t.js → 1u5mjrw1qk334.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/{1q730nbf90lr2.js → 1z1jqbwrruy4-.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/{1dwd950z6uq3v.js → 1z9u9wh2b5l6y.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/21xp9ny7yw3ug.js +1 -0
- package/.next/standalone/packages/console/.next/static/chunks/{2pkfao79haew9.js → 24yl55yxkaeaf.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/27qi3k10y-0hf.js +2 -0
- package/.next/standalone/packages/console/.next/static/chunks/2_qyhoh1hlhcy.js +1 -0
- package/.next/standalone/packages/console/.next/static/chunks/{0742dltqxo7l5.js → 2bid6ecbjoe6s.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/{0b8-il10o0ca2.js → 2bqxl5_u1hjjb.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/2cfixbtwii9hq.js +1 -0
- package/.next/standalone/packages/console/.next/static/chunks/2dkqrqvxmerj9.css +3 -0
- package/.next/standalone/packages/console/.next/static/chunks/2ggf3qa9xixed.js +1 -0
- package/.next/standalone/packages/console/.next/static/chunks/{3dqw9msbsb0t0.js → 2h98d1zd2s_t5.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/{19p4i84gnm2q6.js → 2l01iyjlu686-.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/{0rynbs46ao8hb.js → 2qicmwwvgn33n.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/{0jy978bstmu2h.js → 2tl2a2wz8thbf.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/{06v0wink6h9wc.js → 2xwbclmo1ptlk.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/{2u9g6rfau6qkb.js → 3a0odbvtvug2f.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/3q-rob7jfhbps.js +1 -0
- package/.next/standalone/packages/console/.next/static/chunks/{12tpena_m0td3.js → 3rm6d-05q8id3.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/{14t6zl5-m6-cv.js → 3v5kypqchkulb.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/{0lerfeqv17y3h.js → 3wn51b0ga8x5c.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/{0w5mjb10dj8-h.js → 3ydi8zqssypls.js} +1 -1
- package/.next/standalone/packages/console/package.json +3 -3
- package/package.json +3 -3
- package/.next/standalone/packages/console/.next/server/chunks/ssr/0ysl_console_features_trierarchs_ui_organisms_clear-worktree-dialog_tsx_1rm9l2e._.js +0 -3
- package/.next/standalone/packages/console/.next/server/chunks/ssr/_085nqa_._.js +0 -3
- package/.next/standalone/packages/console/.next/server/chunks/ssr/_0rdbxnq._.js +0 -3
- package/.next/standalone/packages/console/.next/server/chunks/ssr/_1lrul1q._.js +0 -3
- package/.next/standalone/packages/console/.next/static/chunks/0bnl87gj176h5.js +0 -1
- package/.next/standalone/packages/console/.next/static/chunks/0mcbp_1hunti9.js +0 -1
- package/.next/standalone/packages/console/.next/static/chunks/0ofpruu2tcm_6.js +0 -1
- package/.next/standalone/packages/console/.next/static/chunks/194ocbg7a-yfj.js +0 -2
- package/.next/standalone/packages/console/.next/static/chunks/2_x-45vq7prtl.js +0 -1
- package/.next/standalone/packages/console/.next/static/chunks/2tj5-rkl0ps53.js +0 -1
- package/.next/standalone/packages/console/.next/static/chunks/3aavctmtw4-fi.js +0 -1
- package/.next/standalone/packages/console/.next/static/chunks/3m5g2od7yc5cq.js +0 -1
- package/.next/standalone/packages/console/.next/static/chunks/3pbm8tp2tq5mv.css +0 -3
- /package/.next/standalone/packages/console/.next/static/{10-qWFsL7UDAGlmmFXFB- → M3UCCsD3-uSl8HVucbFrh}/_buildManifest.js +0 -0
- /package/.next/standalone/packages/console/.next/static/{10-qWFsL7UDAGlmmFXFB- → M3UCCsD3-uSl8HVucbFrh}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/packages/console/.next/static/{10-qWFsL7UDAGlmmFXFB- → M3UCCsD3-uSl8HVucbFrh}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,915860,e=>{"use strict";var t=e.i(843476),s=e.i(618566),n=e.i(271645),a=e.i(60592),i=e.i(748955),r=e.i(456420);let d={name:"arrow-down-left",size:24,node:[["path",{d:"M17 7 7 17",key:"15tmo1"}],["path",{d:"M17 17H7V7",key:"1org7z"}]]};d.node;let o=(0,r.default)(d),l={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};l.node;let c=(0,r.default)(l),u={name:"mail",size:24,node:[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]};u.node;let m=(0,r.default)(u);var h=e.i(825398),p=e.i(574296),x=e.i(965324),g=e.i(369693);function f(e,t){return RegExp(`"${t}"\\s*:\\s*"((?:[^"\\\\]|\\\\.)*)"`).exec(e)?.[1]}let v={"application/vnd.aeolus.squadron.check-in+json":()=>"Checked in at its flagship","application/vnd.aeolus.squadron.role+json":e=>{let t=f(e,"role");return void 0===t?"Given its role":`Given the role: ${t}`},"application/vnd.aeolus.squadron.on-station+json":e=>{let t=f(e,"role");return void 0===t?"Took up its role":`Took up the role: ${t}`},"application/vnd.aeolus.squadron.stand-down+json":()=>"Asked to stand down","application/vnd.aeolus.squadron.stood-down+json":()=>"Stood down"};var b=e.i(379369),w=e.i(849635),j=e.i(890135);function y(e,t){return e.sentAt.localeCompare(t.sentAt)||e.id.localeCompare(t.id)}var N=e.i(67874),k=e.i(817981),C=e.i(188393),S=e.i(639124),T=e.i(78865),R=e.i(415168);function $({message:e,shipId:s,now:n,onOpenMessage:a}){var i,r,d;let l,u,m=e.sender.id===s,h=new Date(e.sentAt),p=void 0!==(u=v[r=(i=e).contentType,r.split(";")[0]?.trim().toLowerCase()??""])?{text:u(i.preview),isCode:!1}:(0,g.isJson)(i.contentType)?{text:0===(l=function(e){let t,s=[],n=0,a=0;for(;a<e.length;){let i=e[a]??"";if('"'===i){let{value:i,end:r}=function(e,t){let s=t+1;for(;s<e.length&&'"'!==e[s];)s+="\\"===e[s]?2:1;return{value:e.slice(t+1,s),end:s+1}}(e,a);1===n&&void 0===t&&e.slice(r).trimStart().startsWith(":")?t=i:1===n&&void 0!==t&&r<=e.length&&'"'===e[r-1]&&(s.push([t,i]),t=void 0),a=r;continue}if("{"===i||"["===i)1===n&&void 0!==t&&(s.push([t,"…"]),t=void 0),n+=1;else if("}"===i||"]"===i)n-=1;else if(1===n&&void 0!==t&&/[-\dtfn]/.test(i)){let n=/^(-?\d[\d.eE+-]*|true|false|null)/.exec(e.slice(a))?.[1];if(void 0!==n){s.push([t,n]),t=void 0,a+=n.length;continue}}a+=1}return s}(d=i.preview)).length?d:l.map(([e,t])=>`${e} ${t}`).join(" · "),isCode:!0}:{text:i.preview,isCode:!1};return(0,t.jsx)("li",{className:"border-b border-border last:border-b-0",children:(0,t.jsxs)("button",{type:"button","data-testid":"message-row","data-message-id":e.id,"aria-label":`${m?"Sent":"Received"} message: ${p.text}`,className:"flex w-full items-start gap-3 px-3.5 py-3 text-left transition-colors duration-(--duration-fast) hover:bg-accent",onClick:()=>{a(e.id)},children:[(0,t.jsx)("span",{"aria-hidden":!0,className:"mt-0.5 flex size-7 shrink-0 items-center justify-center rounded-md border border-tone-ended-border bg-tone-ended-bg text-tone-ended-fg [&_svg]:size-(--size-icon-sm)",children:(0,t.jsx)(m?c:o,{})}),(0,t.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,t.jsxs)("span",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,t.jsx)(S.Sentence,{parts:m?"ship"===e.recipient.kind?[(0,j.text)("To "),(0,j.ship)(e.recipient.ship)]:[(0,j.text)(`To ${(0,R.recipientGroupWords)(e.recipient)}`)]:[(0,j.text)("From "),(0,j.ship)(e.sender)],className:"text-body text-foreground max-sm:text-body-touch"}),(0,t.jsx)(T.StatusBadge,{status:(0,b.deliveryStatus)(e.delivery)})]}),(0,t.jsx)("span",{"data-testid":"message-line",className:(0,x.classNames)("truncate text-muted-foreground",p.isCode?"font-mono text-id":"text-meta"),children:p.text}),(0,t.jsx)("time",{dateTime:e.sentAt,title:(0,w.fullDateTime)(h),className:"text-meta text-muted-foreground tabular-nums",children:(0,w.relativeTime)(h,n)})]})]})})}function I({shipId:e,messages:s,state:n,onRetry:a,more:i,now:r,onOpenMessage:d}){return"loading"===n?(0,t.jsx)(C.LoadingSkeleton,{variant:"list",rows:3,label:"Loading the messages"}):"error"===n?(0,t.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-3",children:[(0,t.jsx)(k.InlineError,{title:"Couldn’t load the messages",description:"The rest of the page is current. Try again in a moment."}),a?(0,t.jsx)(p.Button,{size:"sm",icon:(0,t.jsx)(h.RotateCw,{"aria-hidden":!0}),onClick:a,className:"self-start",children:"Try again"}):null]}):0!==s.length||i?(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(function(e){let t=new Map(e.map(e=>[e.id,e])),s=new Map;for(let n of e){let e=function(e,t){let s=new Set([e.id]),n=e,a=null===n.inReplyTo?void 0:t.get(n.inReplyTo);for(;a&&!s.has(a.id);)s.add(a.id),a=null===(n=a).inReplyTo?void 0:t.get(n.inReplyTo);return n}(n,t);s.set(e.id,[...s.get(e.id)??[],n])}return[...s.entries()].map(([e,t])=>{let s=t.toSorted(y);return{id:e,messages:s,lastSentAt:s.at(-1)?.sentAt??""}}).toSorted((e,t)=>t.lastSentAt.localeCompare(e.lastSentAt)||t.id.localeCompare(e.id))})(s).map(s=>(0,t.jsx)("section",{"data-testid":"message-thread","aria-label":`Thread of ${String(s.messages.length)} ${1===s.messages.length?"message":"messages"}`,className:"overflow-hidden rounded-lg border border-border bg-card",children:(0,t.jsx)("ol",{children:s.messages.map(s=>(0,t.jsx)($,{message:s,shipId:e,now:r,onOpenMessage:d},s.id))})},s.id)),i]}):(0,t.jsx)(N.EmptyState,{variant:"section",icon:(0,t.jsx)(m,{}),title:"No messages yet",description:"Messages this ship sends or receives appear here as they happen."})}var q=e.i(917540),A=e.i(490262),L=e.i(54492),D=e.i(808041),O=e.i(905387),M=e.i(280581),z=e.i(510921),P=e.i(878608),B=e.i(684156),E=e.i(500265),F=e.i(341880),H=e.i(316984),V=e.i(474544),W=e.i(758925),_=e.i(218964),U=e.i(611568),G=e.i(668997),K=e.i(457665),J=e.i(395925),Y=e.i(586875),X=e.i(522016),Q=e.i(34512),Z=e.i(866616),ee=e.i(695960);let et={request:"Couldn’t request crew",remove:"Couldn’t remove the request",restart:"Couldn’t restart the crew"};function es({at:e,now:s,children:n}){return(0,t.jsx)("time",{dateTime:e,title:(0,w.fullDateTime)(new Date(e)),className:"tabular-nums",children:n??(0,w.sinceTime)(new Date(e),s)})}function en({trierarch:e,hasTrierarchs:s}){return(0,t.jsxs)(X.default,{href:s?`/trierarchs/${e.id}`:`/ships/${e.id}`,"data-testid":"crew-request-trierarch",className:"inline-flex min-w-0 items-center gap-1.5 font-medium text-foreground underline decoration-input underline-offset-3 [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0 [&_svg]:text-muted-foreground",children:[(0,t.jsx)(Y.ShipWheel,{"aria-hidden":!0}),(0,t.jsx)("span",{className:"truncate",children:e.name})]})}function ea({requestedBy:e,requestedAt:s,now:n}){let a=null===e?null:e.name===j.OPERATOR_NAME?"you":e.name;return(0,t.jsxs)("span",{"data-testid":"crew-request-requested-by",children:[null===a?"Requested ":`Requested by ${a} `,(0,t.jsx)(es,{at:s,now:n,children:(0,w.relativeTime)(new Date(s),n)}),"."]})}let ei={note:"border-border bg-muted text-muted-foreground",waiting:"border-tone-waiting-border bg-tone-waiting-bg text-tone-waiting-fg",attention:"border-tone-attention-border bg-tone-attention-bg text-tone-attention-fg"};function er({tone:e,icon:s,children:n}){return(0,t.jsxs)("div",{role:"attention"===e?"alert":"waiting"===e?"status":"note","data-testid":"crew-request-note",className:`flex items-start gap-2 rounded-lg border px-3 py-2.5 text-meta [&_svg]:mt-0.5 [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0 ${ei[e]}`,children:[s,(0,t.jsx)("span",{children:n})]})}function ed({stage:e,now:s}){let n="running"===e.status?e.startedAt:null,a=(0,L.restartWords)(e);return null===n&&void 0===a?null:(0,t.jsxs)("span",{className:"text-meta text-muted-foreground","data-testid":"crew-request-session",children:[null===n?null:(0,t.jsxs)(t.Fragment,{children:["since ",(0,t.jsx)(es,{at:n,now:s})]}),null!==n&&void 0!==a?" · ":null,a]})}function eo({rows:e,machineLabels:s=[]}){return(0,t.jsxs)("dl",{"data-testid":"crew-request-settings",className:"grid grid-cols-[repeat(auto-fill,minmax(8.5rem,1fr))] gap-x-5 gap-y-3 border-t border-border pt-3",children:[e.map(e=>(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,t.jsx)("dt",{className:"text-caption font-medium text-muted-foreground",children:e.label}),(0,t.jsxs)("dd",{className:"flex min-w-0 flex-wrap items-baseline gap-x-1.5 text-body font-medium",children:[null===e.value?(0,t.jsx)("span",{className:"font-normal text-muted-foreground",children:"None"}):(0,t.jsx)("span",{className:e.isMono?"truncate font-mono text-id":"truncate",children:"Harness"===e.label?(0,Z.harnessWord)(e.value):e.value}),void 0===e.meta?null:(0,t.jsx)("span",{className:"text-meta font-normal text-muted-foreground",children:e.meta})]})]},e.label)),0===s.length?null:(0,t.jsxs)("div",{className:"col-span-full flex min-w-0 flex-col gap-0.5","data-testid":"crew-request-machine-labels",children:[(0,t.jsx)("dt",{className:"text-caption font-medium text-muted-foreground",children:"Machine labels"}),(0,t.jsx)("dd",{className:"flex min-w-0 flex-wrap items-center gap-1.5",children:s.map((e,s)=>(0,t.jsxs)(n.Fragment,{children:[0===s?null:(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"and"}),(0,t.jsx)(ee.LabelChip,{chip:e})]},e.valueId))})]})]})}function el(){return(0,t.jsxs)("span",{className:"inline-flex items-center gap-2",children:[(0,t.jsx)(_.ListChecks,{"aria-hidden":!0,className:"size-(--size-icon) text-muted-foreground"}),(0,t.jsx)("h2",{className:"text-section font-semibold",children:"Crew request"})]})}function ec(e){let{noMachineMatchesReason:s}=(0,Q.useConsoleConstants)(),{stage:n,requestedBy:a,now:i,canManage:r,isAwaitingCrew:d,busy:o,error:l}=e,c=void 0===l?null:(0,t.jsx)(k.InlineError,{title:et[l.action],description:`${l.message} Nothing changed.`});if("none"===n.kind)return(0,t.jsxs)("section",{"aria-label":"Crew request","data-testid":"crew-request",className:"flex flex-col gap-2.5 rounded-lg border border-border bg-card px-4 py-3.5 shadow-sm",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3.5",children:[(0,t.jsx)(el,{}),(0,t.jsx)("p",{className:"min-w-0 flex-1 text-meta text-muted-foreground",children:e.hasTrierarchs?"No crew request. A crew request keeps this ship crewed: a trierarch starts a session for it and restarts it when it stops.":"No crew request. A crew request puts this ship on your Needs crew list until you crew it by hand."}),r?(0,t.jsx)(p.Button,{size:"sm",icon:(0,t.jsx)(_.ListChecks,{}),isLoading:"request"===o,onClick:e.onRequest,"data-testid":"crew-request-request",children:"Request crew"}):null]}),c]});let u=(0,L.crewRequestAction)(n),m=void 0!==o;return(0,t.jsxs)("section",{"aria-label":"Crew request","data-testid":"crew-request",className:"flex flex-col gap-2.5 rounded-lg border border-border bg-card px-4 py-3.5 shadow-sm",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsx)(el,{}),(0,t.jsxs)("span",{className:"inline-flex min-w-0 items-center gap-2","data-testid":"crew-request-state",children:["assigned"===n.kind?(0,t.jsx)(T.StatusBadge,{status:n.status}):(0,t.jsx)(T.StatusBadge,{status:n.kind}),"needsCrew"===n.kind?(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:e.hasTrierarchs?"not assigned yet":n.reason??(0,t.jsxs)(t.Fragment,{children:["since ",(0,t.jsx)(es,{at:n.requestedAt,now:i})]})}):null,"crewedByHand"===n.kind&&null!==n.since?(0,t.jsxs)("span",{className:"text-meta text-muted-foreground",children:["since ",(0,t.jsx)(es,{at:n.since,now:i})]}):null,"assigned"===n.kind?(0,t.jsx)(ed,{stage:n,now:i}):null,"assigned"===n.kind&&"releasing"===n.status&&void 0!==e.statusChangedAt?(0,t.jsxs)("span",{className:"text-meta text-muted-foreground",children:["asked ",(0,t.jsx)(es,{at:e.statusChangedAt,now:i})]}):null]}),"assigned"===n.kind?(0,t.jsxs)("span",{className:"inline-flex min-w-0 items-center gap-1 text-meta",children:["on ",(0,t.jsx)(en,{trierarch:n.trierarch,hasTrierarchs:e.hasTrierarchs??!1})]}):null,(0,t.jsx)("span",{className:"flex-1"}),"assigned"===n.kind&&"releasing"===n.status?(0,t.jsxs)("span",{className:"text-meta text-muted-foreground",children:["Waiting for ",n.trierarch.name]}):null,r?(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:["remove"===u?(0,t.jsx)(p.Button,{size:"sm",variant:"ghost",isLoading:"remove"===o,disabled:m,onClick:e.onRemove,"data-testid":"crew-request-remove",children:"Remove request"}):null,(0,L.isRestartable)(n)?(0,t.jsx)(p.Button,{size:"sm",icon:(0,t.jsx)(J.RotateCcw,{}),isLoading:"restart"===o,disabled:m,onClick:e.onRestart,"data-testid":"crew-request-restart",children:"Restart"}):null,void 0!==e.onEdit&&void 0!==u?(0,t.jsx)(p.Button,{size:"sm",icon:(0,t.jsx)(G.Pen,{}),disabled:m,onClick:e.onEdit,"data-testid":"crew-request-edit",children:"Edit…"}):null,"release"===u?(0,t.jsx)(p.Button,{size:"sm",icon:(0,t.jsx)(K.Power,{}),disabled:m,onClick:e.onRelease,"data-testid":"crew-request-release",children:"Release…"}):null,"needsCrew"===n.kind&&d&&!e.hasTrierarchs?(0,t.jsx)(p.Button,{size:"sm",variant:"primary",icon:(0,t.jsx)(W.KeyRound,{}),disabled:m,onClick:e.onGetStartingPrompt,"data-testid":"crew-request-prompt",children:"Get starting prompt"}):null]}):null]}),"assigned"===n.kind?function(e,s){let{trierarch:n}=e,a=void 0===s.statusChangedAt?null:(0,t.jsx)(es,{at:s.statusChangedAt,now:s.now});switch(e.status){case"crewing":return(0,t.jsxs)(er,{tone:"note",icon:(0,t.jsx)(U.LoaderCircle,{"aria-hidden":!0}),children:[n.name," is starting the session."]});case"running":return null;case"restarting":return(0,t.jsxs)(er,{tone:"waiting",icon:(0,t.jsx)(J.RotateCcw,{"aria-hidden":!0}),children:[(0,t.jsx)("strong",{className:"font-medium",children:null===a?"The session stopped.":(0,t.jsxs)(t.Fragment,{children:["The session stopped at ",a,"."]})})," ",n.name," is starting it again. Once its restarts are used up it stops trying and the request shows Crashed."]});case"crashed":return(0,t.jsxs)(er,{tone:"attention",icon:(0,t.jsx)(H.CircleX,{"aria-hidden":!0}),children:[(0,t.jsx)("strong",{className:"font-medium",children:null===a?"Crashed.":(0,t.jsxs)(t.Fragment,{children:["Crashed at ",a,"."]})})," The session kept stopping and ",n.name," ","stopped trying. The lease still holds, so new deliveries wait in the inbox. Restart crews it again with the same settings."]});case"releasing":return(0,t.jsxs)(er,{tone:"note",icon:(0,t.jsx)(K.Power,{"aria-hidden":!0}),children:["Releasing: ",n.name," is stopping the session and cleaning up. The request goes away once it confirms."]})}}(n,{statusChangedAt:e.statusChangedAt,now:i}):null,"needsCrew"===n.kind&&e.hasTrierarchs?null===n.reason?(0,t.jsx)(er,{tone:"note",icon:(0,t.jsx)(U.LoaderCircle,{"aria-hidden":!0}),children:"Waiting for the trierarch plugin to assign a trierarch."}):n.reason===s&&void 0!==e.machineLabels&&e.machineLabels.length>0?(0,t.jsxs)(er,{tone:"waiting",icon:(0,t.jsx)(V.Clock,{"aria-hidden":!0}),children:[(0,t.jsx)("strong",{className:"font-medium",children:"No machine matches these labels."})," The plugin places this ship only on a machine with ",(0,P.machineLabelsText)(e.machineLabels),", and none"," ",(0,P.noMatchWords)(e.machineLabels.length).carries,". It assigns a trierarch as soon as one does; until then this ship is on Needs crew."]}):(0,t.jsxs)(er,{tone:"waiting",icon:(0,t.jsx)(V.Clock,{"aria-hidden":!0}),children:[(0,t.jsxs)("strong",{className:"font-medium",children:[(0,j.capitalised)(n.reason),"."]})," The plugin assigns a trierarch as soon as one fits. Until then this ship is on Needs crew."]}):null,c,void 0===e.settingsRows?null:(0,t.jsx)(eo,{rows:e.settingsRows,machineLabels:e.machineLabels}),(0,t.jsxs)("p",{className:"text-meta text-muted-foreground",children:["needsCrew"!==n.kind||e.hasTrierarchs?null:"On your Needs crew list. Crew it by hand: get a starting prompt and start a session with it. Crewing it fulfils the request; the request stays until you remove it. ","crewedByHand"===n.kind?`${n.crewedBy.name===j.OPERATOR_NAME?"You":n.crewedBy.name} crewed it by hand. The request stands: if the lease ends, the ship is back on Needs crew until you crew it again or release it. `:null,(0,t.jsx)(ea,{requestedBy:a,requestedAt:n.requestedAt,now:i}),"assigned"===n.kind&&"releasing"!==n.status?" The trierarch keeps it crewed until you release it.":null]})]})}var eu=e.i(686165),em=e.i(448695);let eh=(0,q.lazyDialog)(()=>e.A(823569).then(e=>e.RequestCrewDialog),e=>e.isOpen),ep=(0,q.lazyDialog)(()=>e.A(705419).then(e=>e.CrewReleaseDialog),e=>e.isOpen),ex=(0,q.lazyDialog)(()=>e.A(495953).then(e=>e.StartingPromptDialog),e=>e.isOpen);function eg({ship:e,timeline:s,now:a}){let i=(0,A.useAccess)(),r=(0,E.useHasTrierarchPlugin)(),d=(0,O.useRequestCrew)(),o=(0,O.useLabelContext)(),l=(0,O.useRemoveCrewRequest)(),c=(0,O.useReleaseShip)(),u=(0,O.useGetStartingPrompt)(),[m,h]=(0,n.useState)(),[p,x]=(0,n.useState)(),[g,f]=(0,n.useState)(!1),[v,b]=(0,n.useState)(),[w,j]=(0,n.useState)(!1),[y,N]=(0,n.useState)(),[k]=(0,z.useCrewSettings)(null===e.crewRequest?[]:[e.crewRequest.settings])??[],C=function(e){let s=(0,E.useMachines)(),a=(0,eu.useSquadronsConnection)(),i=(0,em.useSquadrons)(),r=(0,O.useRequestCrew)(),d=(0,O.useLabelContext)(s.data?.map(e=>e.shipId)),[o,l]=(0,n.useState)(),[c,u]=(0,n.useState)(null),[m,h]=(0,n.useState)(),p=(0,D.offersOf)(s.data??[]),{shipLabelsMax:x}=(0,Q.useConsoleConstants)(),g=void 0===d||void 0===s.data?void 0:(0,P.machineLabelsInputOf)(d,{machines:s.data,shipLabelsMax:x}),f=(0,z.useCrewSettings)(e?.heldSettings===void 0?[]:[e.heldSettings]),v=f?.[0]??null,b=(0,D.settingsOf)("edit"===o?(0,D.valuesOf)(v,p):(0,D.defaultValues)(p)),w=void 0!==o&&void 0!==e&&("edit"!==o||void 0!==f),j=(0,E.useCrewSettingsCheck)(w&&void 0!==s.data?null===c?b:c:void 0),y=async t=>{if(void 0!==e&&void 0!==o){r.reset();try{let e=await j.checkNow();if("refused"===e.kind)return void h(new Date)}catch{}r.mutate({shipId:e.shipId,settings:t},{onSuccess:()=>{l(void 0),(0,F.showToast)("edit"===o?{title:`Settings saved for ${e.shipName}`,description:"Its trierarch restarts the session with them.",tone:"success"}:{title:`Crew requested for ${e.shipName}`,description:"The trierarch plugin assigns a trierarch that fits.",tone:"success"})}})}};return{open:e=>{r.reset(),u(null),h(void 0),l(e)},dialog:void 0===e?null:(0,t.jsx)(eh,{shipName:e.shipName,mode:o??"request",state:s.isError?"unreachable":void 0===s.data?"loading":"ready",offers:p,heldSettings:v,squadrons:"connected"===a?(i.data??[]).filter(e=>"disbanded"!==e.state).map(e=>e.id):void 0,...void 0===g?{}:{machineLabels:g},check:j.data,refusedAt:m,error:r.error?.message,isPending:r.isPending,isOpen:w,onOpenChange:e=>{e||l(void 0)},onSettingsChange:e=>{u(e),h(void 0)},onSubmit:e=>void y(e),onRetry:()=>{s.refetch()}})}}("agent"===e.kind&&"retired"!==e.status?{shipId:e.id,shipName:e.name,heldSettings:e.crewRequest?.settings}:void 0);if("agent"!==e.kind||"retired"===e.status)return null;let S=(0,L.crewRequestStage)(e),T=e.crewRequest,R=async(e,t)=>{h(e),x(void 0);try{return await t(),!0}catch(t){return x({action:e,message:t instanceof Error?t.message:String(t)}),!1}finally{h(void 0)}},$=()=>{u.reset(),N((0,B.isUnclaimedPromptOut)(e)&&e.startingPrompt?{issuedAt:e.startingPrompt.issuedAt}:void 0),j(!0),u.mutate({shipId:e.id})},I=async()=>{await R("request",()=>d.mutateAsync({shipId:e.id,settings:{}}))&&(0,F.showToast)({title:`${e.name} needs crew`,description:"It is on your Needs crew list until you crew it.",tone:"success",..."awaitingCrew"===e.status&&i.canManage?{action:{label:"Get starting prompt",onClick:$}}:{}})},q=async()=>{null===T||"assigned"!==S.kind||await R("restart",()=>d.mutateAsync({shipId:e.id,settings:T.settings}))&&(0,F.showToast)({title:`Restarting ${e.name}`,description:`${S.trierarch.name} starts its session again with the same settings.`,tone:"success"})},H=async t=>{b(void 0);let s=(0,L.releaseSteps)(t),n=0;try{for(let t of s)await ("removeCrewRequest"===t?l.mutateAsync({shipId:e.id}):c.mutateAsync({shipId:e.id})),n+=1;f(!1)}catch(t){let e=t instanceof Error?t.message:String(t);b(0===n?`${e} Nothing changed.`:`${e} Its crew request is removed; the session still holds the ship. Try again to end its lease.`)}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ec,{stage:S,requestedBy:(0,L.requestedBy)(s),statusChangedAt:(0,L.statusChangedAt)(s),now:a,canManage:i.canManage,isAwaitingCrew:"awaitingCrew"===e.status,hasTrierarchs:r,busy:m,error:p,settingsRows:null===T?void 0:(0,D.settingsRows)(k),...null===T||void 0===o?{}:{machineLabels:(0,M.pickedChips)((0,P.machineLabelIdsOf)(k),o)},onRequest:()=>{r?C.open("request"):I()},...r?{onEdit:()=>{C.open("edit")}}:{},onRemove:()=>void R("remove",()=>l.mutateAsync({shipId:e.id})),onRelease:()=>{b(void 0),f(!0)},onRestart:()=>void q(),onGetStartingPrompt:$}),C.dialog,"crewedByHand"===S.kind||"assigned"===S.kind?(0,t.jsx)(ep,{shipName:e.name,stage:S,sessionLocation:null===e.location?null:e.location.description??e.location.kind.toLowerCase(),inFlightCount:e.inFlightDeliveries,isOpen:g,onOpenChange:f,isPending:l.isPending||c.isPending,error:v,onConfirm:()=>void H(S)}):null,(0,t.jsx)(ex,{shipName:e.name,state:u.data?"shown":u.isError?"error":"issuing",prompt:u.data?.prompt,crewLines:u.data?.crewLines,replacesUnclaimed:y,error:u.error?.message,isOpen:w,onOpenChange:e=>{e||(u.reset(),j(!1))},onConfirm:()=>{u.mutate({shipId:e.id})}})]})}var ef=e.i(784294),ev=e.i(219249);function eb({label:e,children:s}){return(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-1 bg-card px-3.5 py-3",children:[(0,t.jsx)("dt",{className:"text-meta text-muted-foreground",children:e}),(0,t.jsx)("dd",{className:"flex min-w-0 flex-wrap items-center gap-1.5 text-body text-foreground",children:s})]})}function ew({shipId:e,now:s}){let n=(0,em.useSquadrons)(),a=(0,em.useCatalogue)(),i=n.data?.find(t=>t.flagship.shipId===e||t.members.some(t=>t.shipId===e));if(!i)return null;let r=(0,t.jsx)(X.default,{href:`/squadrons/${i.id}`,className:"font-mono hover:underline","data-testid":"ship-squadron-link",children:i.id});if(i.flagship.shipId===e)return(0,t.jsxs)("div",{role:"note","data-testid":"ship-flagship-note",className:"flex flex-wrap items-center gap-3 rounded-lg border border-border bg-muted px-3.5 py-3 text-meta text-foreground",children:[(0,t.jsxs)("span",{className:"grow",children:["Flagship of squadron ",r,": the address for work sent to the team. The squadron manager crews it, so it can’t be released, renamed or retired; it retires when the squadron disbands."]}),(0,t.jsx)(p.Button,{size:"xs",nativeButton:!1,render:(0,t.jsx)(X.default,{href:`/squadrons/${i.id}`}),"data-testid":"ship-open-squadron",children:"Open squadron"})]});let d=i.members.find(t=>t.shipId===e);if(!d)return null;let o=a.data?.blueprints.find(e=>e.repository===i.blueprint.repository&&e.name===i.blueprint.name&&e.version===i.blueprint.version),l=o?.roles.find(e=>e.name===d.role)?.template,c=null===d.crew.lastSeenAt?void 0:(0,w.duration)(new Date(d.crew.lastSeenAt),s);return(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:["silent"===d.health&&"disbanded"!==i.state&&(0,t.jsxs)("div",{role:"alert","data-testid":"ship-silent-alert",className:"rounded-lg border border-tone-attention-border bg-tone-attention-bg px-3.5 py-3 text-meta text-foreground",children:[(0,t.jsx)("strong",{className:"font-semibold text-tone-attention-fg",children:void 0===c?"Silent.":`Silent: not seen for ${c}.`})," It checks in"," ",(0,ef.checkInText)(d.checkInMinutes),", so its session has probably stopped. Get a new crew line and start a new session; the old crew line then stops working."]}),(0,t.jsxs)("dl",{"data-testid":"ship-squadron-facts",className:"grid grid-cols-4 gap-px overflow-hidden rounded-lg border border-border bg-border max-sm:grid-cols-2",children:[(0,t.jsxs)(eb,{label:"Squadron",children:[r,(0,t.jsx)(T.StatusBadge,{status:i.state})]}),(0,t.jsxs)(eb,{label:"Role and template",children:[(0,t.jsx)("span",{className:"rounded-sm bg-secondary px-1.5 font-mono text-id",children:d.role}),l&&(0,t.jsxs)(X.default,{href:(0,ef.templatePath)(l),className:"font-mono text-meta hover:underline",children:[l.name,"@",l.version]})]}),(0,t.jsx)(eb,{label:"Health",children:(0,t.jsx)(ev.HealthIndicator,{health:d.health,detail:"silent"===d.health||"late"===d.health?c:void 0})}),(0,t.jsx)(eb,{label:"Hand-offs",children:o?(0,t.jsx)("span",{className:"text-meta",children:(0,ef.handoffsText)((0,ef.handoffsOf)(o,d.role))}):(0,t.jsx)(X.default,{href:(0,ef.blueprintPath)(i.blueprint),className:"text-meta text-muted-foreground hover:underline",children:"See its blueprint"})})]})]})}var ej=e.i(221959),ey=e.i(215327),eN=e.i(876561),ek=e.i(422768),eC=e.i(810818),eS=e.i(869309),eT=e.i(765649),eR=e.i(766390),e$=e.i(861966),eI=e.i(219321),eq=e.i(763481);function eA({harness:e,model:s,testId:n}){return null===e&&null===s?null:(0,t.jsxs)("span",{"data-testid":n,className:"flex min-w-0 flex-wrap items-center gap-x-1 text-meta text-muted-foreground",children:[null===e?null:(0,t.jsx)("span",{children:(0,Z.harnessWord)(e)}),null!==e&&null!==s?(0,t.jsx)("span",{"aria-hidden":!0,children:"·"}):null,null===s?null:(0,t.jsx)("span",{className:"truncate font-mono text-id",children:s})]})}var eL=e.i(73330);function eD({ping:e,now:s,testId:n}){return null===e?null:(0,t.jsx)("span",{title:`Pinged ${(0,w.fullDateTime)(new Date(e.sentAt))}`,"data-testid":n,"data-state":e.state,className:"text-meta text-muted-foreground tabular-nums",children:(0,eL.pingLine)(e,s)})}var eO=e.i(867927),eM=e.i(793361),ez=e.i(591703);function eP({details:e,bytes:s,version:n,testId:a}){return(0,t.jsxs)("details",{"data-testid":a,className:"group rounded-lg border border-border bg-card",children:[(0,t.jsxs)("summary",{className:"flex cursor-pointer list-none items-center gap-1.5 px-3.5 py-2.5 text-meta text-muted-foreground [&::-webkit-details-marker]:hidden",children:[(0,t.jsx)(eO.ChevronRight,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0 transition-transform group-open:rotate-90"}),(0,t.jsx)("span",{className:"font-medium text-foreground",children:"Report details"}),(0,t.jsxs)("span",{className:"tabular-nums",children:["· version ",n]})]}),(0,t.jsx)("div",{className:"px-3.5 pb-3.5",children:(0,t.jsx)(ez.CodeBlock,{label:(0,eM.reportDetailsLabel)(s),code:(0,eM.reportDetailsJson)(e),copyLabel:"Copy report details",codeTestId:`${a}-code`})})]})}function eB({statement:e,testId:s}){return null===e?(0,t.jsx)("span",{"data-testid":s,className:"text-meta text-muted-foreground",children:"No statement"}):"commission"===e.by?(0,t.jsxs)("span",{"data-testid":s,className:"flex min-w-0 flex-col gap-0.5",children:[(0,t.jsx)("span",{className:"text-body text-foreground",children:e.note}),(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"Commission note, until a crew states one"})]}):(0,t.jsxs)("span",{"data-testid":s,className:"flex min-w-0 flex-col gap-1.5",children:[(0,t.jsx)("span",{className:"text-body text-foreground",children:e.summary}),0===e.capabilities.length?null:(0,t.jsx)("ul",{"aria-label":"Offers",className:"flex min-w-0 flex-col gap-1",children:e.capabilities.map(e=>(0,t.jsxs)("li",{className:"flex min-w-0 flex-wrap items-baseline gap-x-1.5 text-meta",children:[(0,t.jsx)("span",{className:"font-mono text-id text-foreground",children:e.name}),void 0===e.title?null:(0,t.jsx)("span",{className:"text-foreground",children:e.title}),void 0===e.description?null:(0,t.jsx)("span",{className:"text-muted-foreground",children:e.description})]},e.name))}),(0,t.jsxs)("span",{className:"text-meta text-muted-foreground",children:["Stated by its crew · version ",e.version]})]})}var eE=e.i(781830),eF=e.i(539448);function eH({label:e,children:s}){return(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-1 bg-card px-3.5 py-3",children:[(0,t.jsx)("dt",{className:"text-meta text-muted-foreground",children:e}),(0,t.jsx)("dd",{className:"flex min-w-0 items-center gap-1.5 text-body text-foreground",children:s})]})}function eV({ship:e,now:s,labels:n,way:a}){let i,r="operator"===e.kind,d=null===e.crewedSince?null:new Date(e.crewedSince),o=new Date(e.commissionedAt);return(0,t.jsxs)("dl",{className:"grid grid-cols-4 gap-px overflow-hidden rounded-lg border border-border bg-border max-sm:grid-cols-2",children:[(0,t.jsx)(eH,{label:"Location",children:(0,t.jsxs)("span",{className:"inline-flex min-w-0 flex-col gap-0.5",children:[(0,t.jsx)(eq.LocationTag,{kind:e.location?.kind??null,description:e.location?.description,size:"md"}),(0,t.jsx)(eA,{harness:e.harness,model:e.model?.id??null,testId:"ship-model"}),null===e.lastSeenAt?null:(0,t.jsx)("time",{dateTime:e.lastSeenAt,title:(0,w.fullDateTime)(new Date(e.lastSeenAt)),"data-testid":"ship-last-seen",className:"text-meta text-muted-foreground tabular-nums",children:(0,w.lastSeen)(new Date(e.lastSeenAt),s)}),(0,t.jsx)(eD,{ping:e.ping,now:s,testId:"ship-ping-status"}),"agent"!==e.kind&&"plugin"!==e.kind?null:(0,t.jsx)(eE.ReportLine,{report:e.report,now:s,variant:"full",testId:"ship-report"})]})}),(0,t.jsx)(eH,{label:"Crewed since",children:d?(0,t.jsx)("time",{dateTime:e.crewedSince??void 0,title:(0,w.fullDateTime)(d),className:"tabular-nums",children:(i=s.getTime()-d.getTime()<864e5?(0,w.clockTime)(d):(0,w.shortDateTime)(d),`${i} \xb7 ${(0,w.duration)(d,s)}`)}):(0,t.jsx)("span",{className:"text-muted-foreground",children:"Not crewed"})}),(0,t.jsx)(eH,{label:"Commissioned",children:(0,t.jsx)("time",{dateTime:e.commissionedAt,title:(0,w.fullDateTime)(o),children:r?`Fleet created ${(0,w.dayDate)(o)}`:(0,w.dayDate)(o)})}),(0,t.jsxs)(eH,{label:"Ship id",children:[(0,t.jsx)("span",{className:"truncate font-mono text-id",children:e.id}),(0,t.jsx)(e$.CopyButton,{value:e.id,label:"Copy ship id"})]}),void 0===a?null:(0,t.jsxs)("div",{className:"col-span-4 flex min-w-0 items-start gap-4 bg-card px-3.5 py-2.5 max-sm:col-span-2 max-sm:flex-col max-sm:gap-1.5","data-testid":"ship-delivery",children:[(0,t.jsx)("dt",{className:"shrink-0 text-meta text-muted-foreground",children:"Delivery"}),(0,t.jsx)("dd",{className:"min-w-0 flex-1",children:a})]}),r?null:(0,t.jsxs)("div",{className:"col-span-4 flex min-w-0 items-start gap-4 bg-card px-3.5 py-2.5 max-sm:col-span-2 max-sm:flex-col max-sm:gap-1.5",children:[(0,t.jsx)("dt",{className:"shrink-0 text-meta text-muted-foreground",children:"Statement"}),(0,t.jsx)("dd",{className:"min-w-0 flex-1",children:(0,t.jsx)(eB,{statement:e.statement,testId:"ship-statement"})})]}),void 0===n?null:(0,t.jsxs)("div",{className:"col-span-4 flex min-w-0 items-center gap-4 bg-card px-3.5 py-2.5 max-sm:col-span-2 max-sm:flex-col max-sm:items-start max-sm:gap-1.5","data-testid":"ship-labels",children:[(0,t.jsx)("dt",{className:"shrink-0 text-meta text-muted-foreground",children:"Labels"}),(0,t.jsx)("dd",{className:"min-w-0 flex-1",children:n})]})]})}function eW({icon:e,children:s}){return(0,t.jsxs)("p",{className:"flex items-center gap-2 rounded-lg border border-border bg-muted px-3.5 py-2.5 text-meta text-muted-foreground [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",children:[e,(0,t.jsx)("span",{children:s})]})}function e_({ship:e,shipId:s,state:n,actions:a,crewRequest:i,now:r,backHref:d="/",labels:o,isPluginShip:l=!1,way:c}){let{fleetScopes:u}=(0,Q.useConsoleConstants)();if("loading"===n||"ready"===n&&void 0===e)return(0,t.jsxs)("div",{"aria-busy":!0,"data-testid":"ship-header",className:"flex flex-col gap-4",children:[(0,t.jsx)("span",{className:"sr-only",children:"Loading the ship"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(eI.Skeleton,{className:"h-8 w-40"}),(0,t.jsx)(eI.Skeleton,{className:"h-6 w-20"}),(0,t.jsx)(eI.Skeleton,{className:"h-6 w-16"})]}),(0,t.jsx)(eI.Skeleton,{className:"h-16 w-full rounded-lg"})]});if("not-found"===n||void 0===e)return(0,t.jsx)("div",{"data-testid":"ship-header",children:(0,t.jsx)(N.EmptyState,{variant:"section",icon:(0,t.jsx)(ek.CircleAlert,{}),title:"Ship not found",description:(0,t.jsxs)(t.Fragment,{children:["No ship with the id ",s?(0,t.jsx)("span",{className:"font-mono text-id",children:s}):"given"," exists in this fleet. The link may be incomplete. Retired ships keep their page."]}),action:(0,t.jsx)(p.Button,{size:"sm",nativeButton:!1,render:({children:e,...s})=>(0,t.jsx)(X.default,{href:d,...s,children:e}),children:"Back to fleet overview"})})});let m="operator"===e.kind,h="retired"===e.status;return(0,t.jsxs)("div",{"data-testid":"ship-header",className:"flex flex-col gap-4 max-sm:gap-3",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2.5 max-sm:flex-col max-sm:items-start max-sm:gap-1.5",children:[(0,t.jsx)("h1",{className:"min-w-0",children:(0,t.jsx)(eF.ShipName,{name:e.name,shipId:e.id,size:"title",isSuffixShown:h})}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)(T.StatusBadge,{status:e.status}),m?(0,t.jsxs)(eR.Badge,{variant:"kind",children:[(0,t.jsx)(eT.UserRound,{"aria-hidden":!0}),"operator"]}):(0,t.jsxs)(t.Fragment,{children:[l?(0,t.jsxs)(eR.Badge,{variant:"kind","data-testid":"ship-plugin",children:[(0,t.jsx)(eS.Plug,{"aria-hidden":!0}),"plugin"]}):null,(0,t.jsx)(eR.Badge,{variant:"type",children:e.type}),e.scopes.filter(e=>u.some(t=>t===e)).map(e=>(0,t.jsx)(eR.Badge,{variant:"kind","data-testid":"ship-fleet-scope",children:e},e))]}),"awaitingCrew"===e.status&&null===e.startingPrompt?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-meta text-muted-foreground [&_svg]:size-(--size-icon-sm)",children:[(0,t.jsx)(W.KeyRound,{"aria-hidden":!0}),"No starting prompt issued"]}):null,"awaitingCrew"===e.status&&null!==e.startingPrompt?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-meta text-muted-foreground [&_svg]:size-(--size-icon-sm)",children:[(0,t.jsx)(W.KeyRound,{"aria-hidden":!0}),(0,t.jsxs)("span",{children:["Prompt issued"," ",(0,t.jsx)("time",{dateTime:e.startingPrompt.issuedAt,title:(0,w.fullDateTime)(new Date(e.startingPrompt.issuedAt)),children:(0,w.relativeTime)(new Date(e.startingPrompt.issuedAt),r)}),e.startingPrompt.isClaimed?", claimed":", not claimed yet"]})]}):null]})]}),a&&!h?(0,t.jsx)("div",{className:(0,x.classNames)("flex flex-wrap items-center gap-2","max-sm:w-full max-sm:[&>*]:flex-1"),children:a}):null]}),m?(0,t.jsx)(eW,{icon:(0,t.jsx)(eC.Info,{"aria-hidden":!0}),children:"argo is your ship. This console session crews it. It can’t be released, renamed or retired."}):null,h&&null!==e.retiredAt?(0,t.jsxs)(eW,{icon:(0,t.jsx)(eN.Archive,{"aria-hidden":!0}),children:["Retired on ",(0,w.fullDateTime)(new Date(e.retiredAt)),". Read-only."]}):null,i,(0,t.jsx)(eV,{ship:e,now:r,labels:o,way:c}),("agent"===e.kind||"plugin"===e.kind)&&e.report?.details&&null!==e.report.detailsBytes?(0,t.jsx)(eP,{details:e.report.details,bytes:e.report.detailsBytes,version:e.report.detailsVersion,testId:"ship-report-details"}):null]})}var eU=e.i(749655),eG=e.i(446157);function eK({view:e,onOpenMessage:s}){let{lines:n,oldest:a}=e;return(0,t.jsxs)("ul",{"data-testid":"ship-way","aria-label":"Its side of the way",className:"flex flex-col gap-1",children:[n.map(e=>(0,t.jsx)(eG.WayLineItem,{line:e,testId:"ship-way-line"},e.text)),a?(0,t.jsx)("li",{children:(0,t.jsxs)("button",{type:"button","data-testid":"ship-way-oldest","aria-label":`Open the oldest message waiting: ${a.text}`,onClick:()=>{s(a.messageId)},className:"inline-flex flex-wrap items-center gap-1.5 rounded-xs text-left text-meta hover:underline focus-visible:outline-2 focus-visible:outline-ring max-sm:text-body-touch",children:[(0,t.jsx)(T.StatusBadge,{status:a.status}),a.isOverdue?(0,t.jsx)(eU.AlarmClock,{"aria-hidden":!0,className:"size-3.5 shrink-0 text-tone-attention-fg"}):null,(0,t.jsx)("span",{className:(0,x.classNames)(a.isOverdue?"text-tone-attention-fg":"text-muted-foreground"),children:a.text}),(0,t.jsx)(eO.ChevronRight,{"aria-hidden":!0,className:"size-(--size-icon-sm)"})]})}):null]})}var eJ=e.i(699261),eY=e.i(689664),eX=e.i(716327),eQ=e.i(456539),eZ=e.i(77071),e0=e.i(263676),e1=e.i(770703),e2=e.i(406734);let e5=(0,e1.default)(()=>e.A(867858).then(e=>e.LabelPicker),{loadableGenerated:{modules:[259068]},ssr:!1});function e3({chip:e,labelKey:s,isBusy:a,onUnassign:i,onChange:r}){let[d,o]=(0,n.useState)(!1);return(0,t.jsxs)(e2.Popover,{open:d,onOpenChange:o,children:[(0,t.jsx)(e2.PopoverTrigger,{render:(0,t.jsx)("button",{type:"button","aria-label":`Change or remove ${e.key}=${e.value}`,"data-testid":"ship-label-yours",disabled:a,className:"inline-flex items-center rounded-sm focus-visible:outline-2 focus-visible:outline-ring disabled:opacity-60"}),children:(0,t.jsx)(ee.LabelChip,{chip:e,trailing:(0,t.jsx)(eX.ChevronDown,{"aria-hidden":!0}),className:"hover:bg-accent"})}),(0,t.jsxs)(e2.PopoverContent,{align:"start",sideOffset:6,className:"w-72 p-1.5","data-testid":"ship-label-menu",children:[(0,t.jsxs)("span",{className:"flex items-center justify-between px-2 pt-1 pb-1.5 text-meta",children:[(0,t.jsxs)("span",{className:"font-mono",children:[e.key,"=",(0,t.jsx)("span",{className:"text-muted-foreground",children:e.value})]}),(0,t.jsx)("span",{className:"text-muted-foreground",children:"Change the value"})]}),(0,t.jsx)("ul",{className:"flex flex-col",children:(s?.values??[]).map(n=>{let a=n.valueId===e.valueId,i=s?.carriedValueIds.includes(n.valueId)??!1;return(0,t.jsx)("li",{children:(0,t.jsxs)("button",{type:"button",disabled:i,"data-testid":"ship-label-value",className:"flex h-(--size-control-sm) w-full items-center gap-2 rounded-sm px-2 text-left text-body hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring disabled:pointer-events-none [&_svg]:size-(--size-icon-sm)",onClick:()=>{o(!1),r({from:e.valueId,to:n.valueId})},children:[(0,t.jsx)("span",{className:"w-4",children:i?(0,t.jsx)(eY.Check,{"aria-hidden":!0}):null}),(0,t.jsx)("span",{className:(0,x.classNames)("min-w-0 grow truncate font-mono",i&&!a?"text-muted-foreground":void 0),children:n.value}),(0,t.jsx)("span",{className:"text-meta text-muted-foreground tabular-nums",children:i&&!a?"Carried":`${String(n.shipCount)} ${1===n.shipCount?"ship":"ships"}`})]})},n.valueId)})}),(0,t.jsx)("div",{className:"mt-1 border-t border-border pt-1",children:(0,t.jsxs)("button",{type:"button","data-testid":"ship-label-remove",className:"flex h-(--size-control-sm) w-full items-center gap-2 rounded-sm px-2 text-body text-destructive-text hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon-sm)",onClick:()=>{o(!1),i(e.valueId)},children:[(0,t.jsx)(e0.X,{"aria-hidden":!0}),"Remove label"]})})]})]})}function e7({keys:e,isBusy:s,onAssign:a}){let[i,r]=(0,n.useState)(!1);return(0,t.jsxs)(e2.Popover,{open:i,onOpenChange:r,children:[(0,t.jsx)(e2.PopoverTrigger,{render:(0,t.jsx)(p.Button,{variant:"ghost",size:"xs",icon:(0,t.jsx)(eZ.Plus,{}),disabled:s,"data-testid":"ship-labels-add"}),children:"Add label"}),(0,t.jsxs)(e2.PopoverContent,{align:"start",sideOffset:6,className:"w-80 p-2","data-testid":"ship-labels-add-popover",children:[(0,t.jsxs)("span",{className:"flex items-center justify-between px-2 pt-1 pb-2 text-body font-medium",children:["Add a label",(0,t.jsx)("span",{className:"text-meta font-normal text-muted-foreground",children:"Yours"})]}),0===e.length?(0,t.jsx)("p",{className:"px-2 py-2 text-meta text-muted-foreground",children:"You have no labels yet. Define one on the Labels page, then put it on ships here."}):(0,t.jsx)(e5,{groups:[{title:"Yours",keys:[...e]}],pickedValueIds:e.flatMap(e=>e.carriedValueIds),pickedWord:"Carried",onPick:e=>{r(!1),a(e)}}),(0,t.jsx)("p",{className:"mt-2 flex items-center justify-between border-t border-border px-2 pt-2 text-meta",children:(0,t.jsx)(X.default,{href:"/labels",className:"font-medium hover:underline",children:0===e.length?"Define a label":"Manage labels"})})]})]})}function e6({chips:e,keys:s,limit:a,isBusy:i,error:r,onAssign:d,onUnassign:o,onChange:l}){let[c,u]=(0,n.useState)(!1),m=!c&&e.length>3,h=m?e.slice(0,2):e,p=[...new Set(h.filter(e=>"none"!==e.mark).map(e=>e.ownerName))];return(0,t.jsxs)("span",{className:"flex min-w-0 flex-col gap-2","data-testid":"ship-labels-edit",children:[(0,t.jsxs)("span",{className:"flex min-w-0 flex-wrap items-center gap-1.5",children:[0===e.length?(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"No labels"}):null,h.filter(e=>"none"===e.mark).map(e=>(0,t.jsx)(e3,{chip:e,labelKey:s.find(t=>t.labelId===e.labelId),isBusy:i,onUnassign:o,onChange:l},e.valueId)),m?(0,t.jsxs)("button",{type:"button","aria-label":`Show all ${String(e.length)} labels`,"data-testid":"ship-labels-more",className:"inline-flex h-5.5 items-center rounded-sm bg-secondary px-1.5 text-caption font-medium tabular-nums hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring",onClick:()=>{u(!0)},children:["+",e.length-2]}):null,a.isAtLimit?null:(0,t.jsx)(e7,{keys:s,isBusy:i,onAssign:d}),p.map(e=>(0,t.jsxs)("span",{className:"inline-flex flex-wrap items-center gap-1.5",children:[(0,t.jsxs)("span",{className:"text-meta text-muted-foreground",children:["by ",e]}),h.filter(t=>"none"!==t.mark&&t.ownerName===e).map(e=>(0,t.jsx)(ee.LabelChip,{chip:e,testId:"ship-label"},e.valueId))]},e)),c&&e.length>3?(0,t.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1 rounded-sm px-1 text-meta hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon-sm)",onClick:()=>{u(!1)},children:[(0,t.jsx)(eQ.ChevronUp,{"aria-hidden":!0}),"Show fewer"]}):null,a.isAtLimit?(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"At the limit: a ship carries at most 20 labels (decision 0031)."}):null,void 0===a.count?null:(0,t.jsx)("span",{className:"ml-auto text-meta text-muted-foreground tabular-nums","data-testid":"ship-labels-count",children:a.count})]}),void 0===r?null:(0,t.jsx)(k.InlineError,{title:r.title,description:`Refused: ${r.message}. Nothing changed.`})]})}function e4(e,t){for(let s of e){let e=s.values.find(e=>e.valueId===t);if(void 0!==e)return`${s.key}=${e.value}`}return"the label"}function e8({ship:e}){let{shipLabelsMax:s}=(0,Q.useConsoleConstants)(),a=(0,O.useLabelContext)(),i=(0,A.useAccess)(),r=(0,O.useAssignLabel)(),d=(0,O.useUnassignLabel)(),[o,l]=(0,n.useState)(void 0);if(void 0===a)return(0,t.jsx)(eI.Skeleton,{className:"h-5.5 w-40"});let c=(0,M.chipsOf)(e,a);if(!(0,M.canAssignLabelsTo)(e,i))return(0,t.jsx)(eJ.ShipLabels,{chips:c});let u=(0,M.assignKeysOf)(e,a),m=e=>t=>{l({title:e,message:t.message})};return(0,t.jsx)(e6,{chips:c,keys:u,limit:(0,M.labelLimitOf)(e,s),isBusy:r.isPending||d.isPending,error:o,onAssign:t=>{l(void 0),r.mutate({shipId:e.id,valueId:t},{onError:m(`Couldn’t add ${e4(u,t)}`)})},onUnassign:t=>{l(void 0),d.mutate({shipId:e.id,valueId:t},{onError:m(`Couldn’t remove ${e4(u,t)}`)})},onChange:({from:t,to:s})=>{l(void 0),d.mutate({shipId:e.id,valueId:t},{onSuccess:()=>{r.mutate({shipId:e.id,valueId:s},{onError:n=>{r.mutate({shipId:e.id,valueId:t}),m(`Couldn’t change ${e4(u,t)} to ${e4(u,s)}`)(n)}})},onError:m(`Couldn’t change ${e4(u,t)}`)})}})}var e9=e.i(987255),te=e.i(831458);let tt={name:"lock-keyhole",size:24,node:[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]]};tt.node;let ts=(0,r.default)(tt),tn={name:"log-in",size:24,node:[["path",{d:"m10 17 5-5-5-5",key:"1bsop3"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}]]};tn.node;let ta=(0,r.default)(tn);var ti=e.i(367784),tr=e.i(25799);let td={name:"mail-minus",size:24,node:[["path",{d:"M22 15V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h8",key:"fuxbkv"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}],["path",{d:"M16 19h6",key:"xwg31i"}]]};td.node;let to=(0,r.default)(td),tl={name:"mail-x",size:24,node:[["path",{d:"M22 12.532V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8.792",key:"8lpqwp"}],["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["path",{d:"m16.5 16.5 5 5",key:"zc9lw7"}],["path",{d:"m21.5 16.5-5 5",key:"1empo3"}]]};tl.node;let tc=(0,r.default)(tl),tu={name:"message-square-text",size:24,node:[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M7 11h10",key:"1twpyw"}],["path",{d:"M7 15h6",key:"d9of3u"}],["path",{d:"M7 7h8",key:"af5zfr"}]]};tu.node;let tm=(0,r.default)(tu),th={name:"package-x",size:24,node:[["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m16.5 14.5 5 5",key:"ozpm51"}],["path",{d:"m16.5 19.5 5-5",key:"syf6b9"}],["path",{d:"M21 10.5V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.729l7 4a2 2 0 0 0 2 .001l.13-.074",key:"isw6gs"}],["path",{d:"M3.29 7 12 12l8.71-5",key:"19ckod"}],["path",{d:"m7.5 4.27 8.997 5.148",key:"9yrvtv"}]]};th.node;let tp=(0,r.default)(th),tx={name:"pen-line",size:24,node:[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],aliases:["edit-3"]};tx.node;let tg=(0,r.default)(tx),tf={name:"shield-alert",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]};tf.node;let tv=(0,r.default)(tf);var tb=e.i(837817),tw=e.i(127361);function tj(e,t){let s=e.details[t];return"string"==typeof s?s:void 0}function ty(e){return tj(e,"key")??""}function tN(e){return(tj(e,"values")??"").split(",").join(", ")}function tk(e){return e?[(0,j.text)(" by "),(0,j.ship)(e)]:[]}let tC={deregistered:"Its session deregistered.",takenOver:"Taken over by a new console session.",signedOut:"The operator signed out.",passwordReset:"Its session ended with the operator password reset.",accountCutOff:"Its session ended: the account signed in as argo was cut off.",retired:"Its session ended: the ship was retired."};function tS(e){return e.message?.isPing===!0}function tT(e){return e.message?[(0,j.text)(tS(e)?"a ping from ":"a message from "),(0,j.ship)(e.message.sender)]:[(0,j.text)("a message")]}function tR(e){let[t,...s]=tT(e);return t?.kind==="text"?[(0,j.text)((0,j.capitalised)(t.text)),...s]:tT(e)}function t$(e,t){let{shipId:s,verb:n}=t,a=e.actor;return[...null===a||a.id===s?[(0,j.text)((0,j.capitalised)(n))]:[(0,j.ship)(a),(0,j.text)(` ${n}`)],(0,j.text)(" "),...tT(e)]}let tI={received:o,sent:c,claimed:ta,released:ti.LogOut,prompt:W.KeyRound,commissioned:te.Flag,acknowledged:tr.MailCheck,returned:tb.Undo2,undeliverable:tc,secret:ts,fleet:e9.Anchor,password:tv,retired:eN.Archive,abandoned:tp,dismissed:to,renamed:tg,reported:tm},tq={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"},tA="flex w-full gap-3 px-3.5 py-3 text-left";function tL({entry:e,shipId:s,now:n,onOpenMessage:a,accountNames:i={}}){let{parts:r,tone:d,icon:o}=function(e,t){switch(e.type){case"FleetInitialised":return{parts:[(0,j.text)("Fleet initialised")],tone:"ended",icon:"fleet"};case"ShipCommissioned":{let t=tj(e,"type");return{parts:[(0,j.text)("Commissioned"),...tk(e.actor),...void 0===t?[]:[(0,j.text)(` as ${t}`)]],tone:"ended",icon:"commissioned"}}case"OwnerSet":let s;return{parts:"inherited"===(s=tj(e,"how"))?[(0,j.text)("Owner set: its commissioner's owner")]:"named"===s?[(0,j.text)("Owner set: named"),...tk(e.actor)]:[(0,j.text)("Owner set: argo by default")],tone:"ended",icon:"commissioned"};case"OwnerChanged":return{parts:"ownerRetired"===tj(e,"why")?[(0,j.text)("Owner retired: argo owns it now")]:[(0,j.text)("Owner changed"),...tk(e.actor)],tone:"ended",icon:"renamed"};case"StartingPromptIssued":return{parts:[(0,j.text)("Starting prompt issued")],tone:"ended",icon:"prompt"};case"ShipClaimed":return{parts:[(0,j.text)(`Claimed by a session on ${function(e){let t=tj(e,"locationDescription");if(void 0!==t&&""!==t)return t;let s=tj(e,"location");return"DEVICE"===s||"CLOUD"===s||"SERVER"===s||"OTHER"===s?(0,tw.locationKindWord)(s):"an unknown location"}(e)}`)],tone:"ok",icon:"claimed"};case"LeaseRevoked":let n,a;return{parts:[..."released"===(n=tj(e,"reason")??"")?[(0,j.text)("Released"),...tk(e.actor),(0,j.text)(".")]:[(0,j.text)(tC[n]??"Its session ended.")],..."number"==typeof(a=e.details.returnedDeliveries)&&a>0?[(0,j.text)(` ${(0,j.counted)(a,{one:"in-flight delivery",many:"in-flight deliveries"})} went back to pending.`)]:[]],tone:"waiting",icon:"released"};case"CredentialRevoked":return{parts:[(0,j.text)("Secret invalidated")],tone:"ended",icon:"secret"};case"OperatorLoginSet":return{parts:[(0,j.text)("Email and password set")],tone:"waiting",icon:"password"};case"OperatorPasswordReset":return{parts:[(0,j.text)("Operator password reset")],tone:"waiting",icon:"password"};case"FleetLimitsChanged":return{parts:[(0,j.text)("Fleet limits changed")],tone:"ended",icon:"fleet"};case"SignInTicketIssued":return{parts:[(0,j.text)("Sign-in ticket issued")],tone:"ended",icon:"password"};case"ViewerSessionStarted":return{parts:[(0,j.text)("Someone started viewing the fleet")],tone:"ended",icon:"password"};case"CrewRequested":return{parts:[(0,j.text)("Crew requested"),...tk(e.actor)],tone:"waiting",icon:"claimed"};case"CrewRequestRemoved":return{parts:[(0,j.text)("Crew request removed"),...tk(e.actor)],tone:"ended",icon:"released"};case"CrewRequestExplained":{let t=tj(e,"reason");return{parts:[(0,j.text)(void 0===t?"Crew request can not be placed yet":`Crew request can not be placed: ${t}`),...tk(e.actor)],tone:"waiting",icon:"reported"}}case"CrewRequestGivenBack":{let t=tj(e,"reason");return{parts:[(0,j.text)(void 0===t?"Crew request given back":`Crew request given back: ${t}`),...tk(e.actor)],tone:"waiting",icon:"released"}}case"WorktreeClearRequested":return{parts:[(0,j.text)(`Clearing of the kept ${tj(e,"repository")??""} worktree requested`),...tk(e.actor)],tone:"waiting",icon:"reported"};case"WorktreeCleared":return{parts:[(0,j.text)("not-kept"===tj(e,"outcome")?`Kept ${tj(e,"repository")??""} worktree cleared (none was kept)`:`Kept ${tj(e,"repository")??""} worktree cleared`),...tk(e.actor)],tone:"ended",icon:"retired"};case"WorktreeClearRemoved":return{parts:[(0,j.text)(`Clearing of the kept ${tj(e,"repository")??""} worktree dropped`),...tk(e.actor)],tone:"ended",icon:"released"};case"CrewAssigned":return{parts:[(0,j.text)("Crew request assigned"),...tk(e.actor)],tone:"waiting",icon:"claimed"};case"CrewStatusChanged":{let t=tj(e,"status");return{parts:[(0,j.text)(void 0===t?"Crew status changed":`Crew ${t}`),...tk(e.actor)],tone:"crashed"===t?"attention":"active",icon:"reported"}}case"LabelDefined":return{parts:[(0,j.text)(`Label ${ty(e)} defined: ${tN(e)}`)],tone:"ended",icon:"reported"};case"LabelValuesChanged":return{parts:[(0,j.text)(`Label ${ty(e)} values changed: ${tN(e)}`)],tone:"ended",icon:"reported"};case"LabelRetired":return{parts:[(0,j.text)(`Label ${ty(e)} retired`)],tone:"ended",icon:"retired"};case"NetworkRulesSet":{let t=e.details.rules,s=String(e.details.version??""),n="number"==typeof t?`Network rules set: ${String(t)} rules`:"Network rules cleared: every ship reaches every ship";return{parts:[(0,j.text)(`${n}, version ${s}`),...tk(e.actor)],tone:"ended",icon:"fleet"}}case"NetworkRulesDraftSaved":{let t=e.details.rules,s="number"==typeof t?`${String(t)} rules`:"every ship reaches every ship";return{parts:[(0,j.text)(`Network rules draft saved: ${s}, against version ${String(e.details.savedAgainstVersion??"")}`),...tk(e.actor)],tone:"ended",icon:"fleet"}}case"NetworkRulesDraftDiscarded":return{parts:[(0,j.text)("Network rules draft discarded"),...tk(e.actor)],tone:"ended",icon:"fleet"};case"NetworkRulesDeclared":{let t=e.details.rules,s="number"==typeof t&&t>0?`Network rules declared: ${String(t)} rules`:"Declared network rules withdrawn";return{parts:[(0,j.text)(s),...tk(e.actor)],tone:"ended",icon:"fleet"}}case"ScopesDeclared":{let t="number"==typeof e.details.scopes?e.details.scopes:0;return{parts:[(0,j.text)(`Scopes declared: namespace ${tj(e,"namespace")??""}, ${String(t)} ${1===t?"scope":"scopes"}`),...tk(e.actor)],tone:"ended",icon:"fleet"}}case"ScopesChanged":{let t=tj(e,"added")??"",s=tj(e,"removed")??"",n=[...""===t?[]:[`granted ${t}`],...""===s?[]:[`revoked ${s}`]];return{parts:[(0,j.text)(`Scopes changed: ${n.join(", ")}`),...tk(e.actor)],tone:"ended",icon:"fleet"}}case"PluginConnected":return{parts:[(0,j.text)("Connected as a plugin: reads every ship"),...tk(e.actor)],tone:"ended",icon:"fleet"};case"PluginDisconnected":return{parts:[(0,j.text)(`No longer a connected plugin: ${tj(e,"why")??""}`),...tk(e.actor)],tone:"ended",icon:"fleet"};case"MeetingOpened":{let t=e.details.participants;return{parts:[(0,j.text)(`Opened a meeting of ${"number"==typeof t?(0,j.counted)(t,{one:"ship",many:"ships"}):"ships"}`)],tone:"ok",icon:"sent"}}case"ParticipantAdded":return{parts:[(0,j.text)("Joined a meeting"),...e.actor?[(0,j.text)(", added by "),(0,j.ship)(e.actor)]:[]],tone:"ok",icon:"received"};case"MicRequested":return{parts:[(0,j.text)("Requested the mic in a meeting")],tone:"ok",icon:"sent"};case"MicRequestWithdrawn":return{parts:[(0,j.text)("Withdrew its mic request in a meeting")],tone:"ok",icon:"sent"};case"MicGiven":return{parts:"fifo"===e.details.pattern?[(0,j.text)("Got the mic in a meeting, first in line")]:[(0,j.text)("Got the mic in a meeting"),...e.actor?[(0,j.text)(", given by "),(0,j.ship)(e.actor)]:[]],tone:"ok",icon:"received"};case"MicReleased":return{parts:[(0,j.text)("Released the mic in a meeting")],tone:"ok",icon:"sent"};case"MicTaken":return{parts:[(0,j.text)("Lost the mic in a meeting"),...e.actor?[(0,j.text)(", taken by "),(0,j.ship)(e.actor)]:[]],tone:"ok",icon:"received"};case"MicPatternSet":return{parts:[(0,j.text)("fifo"===e.details.pattern?"Set a meeting's mic to first in line":"Set a meeting's mic to the moderator's pick")],tone:"ok",icon:"sent"};case"ParticipantLeft":return{parts:[(0,j.text)("Left a meeting")],tone:"ok",icon:"sent"};case"ParticipantRejoined":return{parts:[(0,j.text)("Rejoined a meeting")],tone:"ok",icon:"sent"};case"ParticipantRevoked":return{parts:[(0,j.text)("Taken off a meeting"),...e.actor?[(0,j.text)(", by "),(0,j.ship)(e.actor)]:[]],tone:"ok",icon:"received"};case"OwnershipTransferred":return{parts:[(0,j.text)("Got the ownership of a meeting"),...e.actor?[(0,j.text)(", from "),(0,j.ship)(e.actor)]:[]],tone:"ok",icon:"received"};case"ModeratorNamed":return{parts:[(0,j.text)("Became the moderator of a meeting"),...e.actor?[(0,j.text)(", named by "),(0,j.ship)(e.actor)]:[]],tone:"ok",icon:"received"};case"MeetingEnded":return{parts:[(0,j.text)("Ended a meeting")],tone:"ok",icon:"sent"};case"VerifiedFactsRemoved":return{parts:[(0,j.text)(`Verified facts removed: ${String(e.details.facts??"")}, ${"writerRetired"===tj(e,"why")?"their writer retired":"the ship retired"}`)],tone:"ended",icon:"reported"};case"VerifiedFactsSet":{let t=e.details.facts;return{parts:[(0,j.text)(0===t?"Verified facts withdrawn":`Verified facts set: ${String(t??"")}`),...tk(e.actor)],tone:"ended",icon:"reported"}}case"NetworkPluginRegistered":return{parts:[(0,j.text)(`Networking plugin registered: while unavailable ${tj(e,"whileUnavailable")??""}, version ${String(e.details.version??"")}`),...tk(e.actor)],tone:"ended",icon:"fleet"};case"NetworkPluginUnregistered":return{parts:[(0,j.text)(`Networking plugin unregistered: every ship reaches every ship, version ${String(e.details.version??"")}`),...tk(e.actor)],tone:"ended",icon:"fleet"};case"BuiltInRuleChanged":{let t=tj(e,"verb"),s="viewerRead"===e.details.rule?"viewer read":`${tj(e,"rule")??""}${void 0===t?"":` for ${t}`}`,n=!0===e.details.isOn?"on":"off";return{parts:[(0,j.text)(`Built-in rule ${s} turned ${n}, version ${String(e.details.version??"")}`),...tk(e.actor)],tone:"ended",icon:"fleet"}}case"LabelDeleted":return{parts:[(0,j.text)(`Label ${ty(e)} deleted`)],tone:"ended",icon:"retired"};case"LabelAssigned":return{parts:[(0,j.text)(`Labelled ${ty(e)}=${tj(e,"value")??""}`),...tk(e.actor)],tone:"ended",icon:"reported"};case"LabelUnassigned":return{parts:[(0,j.text)(`Label ${ty(e)}=${tj(e,"value")??""} removed`),...tk(e.actor)],tone:"ended",icon:"reported"};case"MessageAccepted":let i;return{parts:(i=e.message)?tS(e)&&"ship"===i.recipient.kind?i.sender.id===t?[(0,j.text)("Pinged "),(0,j.ship)(i.recipient.ship)]:[(0,j.text)("Pinged by "),(0,j.ship)(i.sender)]:i.sender.id===t?"ship"===i.recipient.kind?[(0,j.text)("Sent a message to "),(0,j.ship)(i.recipient.ship)]:[(0,j.text)(`Sent a message to ${(0,R.recipientGroupWords)(i.recipient)}`)]:[(0,j.text)("Received a message from "),(0,j.ship)(i.sender)]:[(0,j.text)("A message was sent")],tone:"ended",icon:e.message?.sender.id===t?"sent":"received"};case"LeasePushed":return{parts:[(0,j.text)("Pushed: its trierarch or plugin watcher receives for its session")],tone:"ok",icon:"received"};case"DeliveryReceived":return{parts:t$(e,{shipId:t,verb:!0===e.details.again?"received again":"received"}),tone:"active",icon:"received"};case"DeliveryHanded":return{parts:t$(e,{shipId:t,verb:!0===e.details.onceMore?"took once more":"took"}),tone:"active",icon:"received"};case"DeliveryHandled":return{parts:t$(e,{shipId:t,verb:"handled"}),tone:"ok",icon:"acknowledged"};case"DeliveryNotHandled":return{parts:[...tR(e),(0,j.text)(" was not handled: its turn died twice")],tone:"attention",icon:"undeliverable"};case"DeliveryOverdue":let r,d,o;return{parts:[...tR(e),(0,j.text)(` is overdue: ${(d="number"==typeof(r=e.details.minutes)?`${String(r)} min`:"too long","notConfirmed"===(o=tj(e,"clock"))?`handed, not confirmed for ${d}`:`waiting ${d} while its session is ${"busy"===o?"busy":"idle"}`)}, argo told`)],tone:"attention",icon:"undeliverable"};case"DeliveryAcknowledged":return{parts:"pong"===tj(e,"answer")?[...t$(e,{shipId:t,verb:"answered"}),(0,j.text)(" with pong")]:t$(e,{shipId:t,verb:"acknowledged"}),tone:"ok",icon:"acknowledged"};case"DeliveryReturned":return{parts:[...tR(e),(0,j.text)(" went back to pending")],tone:"waiting",icon:"returned"};case"DeliveryUndeliverable":return{parts:[...tR(e),(0,j.text)(" became undeliverable")],tone:"attention",icon:"undeliverable"};case"ShipRetired":{let t=e.details.abandonedDeliveries;return{parts:[(0,j.text)("Retired"),...tk(e.actor),(0,j.text)("."),..."number"==typeof t&&t>0?[(0,j.text)(` ${(0,j.counted)(t,{one:"delivery",many:"deliveries"})} abandoned.`)]:[]],tone:"ended",icon:"retired"}}case"DeliveryAbandoned":return{parts:[...tR(e),(0,j.text)(" was abandoned")],tone:"ended",icon:"abandoned"};case"ShipReported":{let t=tj(e,"state")??"in",s=tj(e,"note");return{parts:[(0,j.text)(void 0===s?`Reported ${t}`:`Reported ${t}: ${s}`)],tone:Object.hasOwn(eM.REPORT_TONES,t)?eM.REPORT_TONES[t]:"ended",icon:"reported"}}case"StatementSet":return{parts:[(0,j.text)(`Stated what it is and offers: ${String(e.details.capabilities??"")} capabilities, version ${String(e.details.version??"")}`)],tone:"ended",icon:"reported"};case"TurnReported":{let t=tj(e,"turn");return{parts:[(0,j.text)("busy"===t?"Turn started: busy":"Turn ended: idle")],tone:"busy"===t?"active":"ended",icon:"reported"}}case"ShipRenamed":{let t=tj(e,"from"),s=tj(e,"to");return{parts:[(0,j.text)(void 0===t||void 0===s?"Renamed":`Renamed from ${t} to ${s}`),...tk(e.actor)],tone:"ended",icon:"renamed"}}case"DeliveryDismissed":return{parts:[...tR(e),(0,j.text)(" was dismissed"),...tk(e.actor)],tone:"ended",icon:"dismissed"}}}(e,s),l=tI[o],c=new Date(e.occurredAt),u=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{"aria-hidden":!0,className:(0,x.classNames)("flex size-7 shrink-0 items-center justify-center rounded-md border [&_svg]:size-(--size-icon-sm)",tq[d]),children:(0,t.jsx)(l,{})}),(0,t.jsxs)("span",{className:"flex min-w-0 flex-col gap-1",children:[(0,t.jsx)(S.Sentence,{parts:r,className:"text-body text-foreground max-sm:text-body-touch"}),(0,t.jsxs)("span",{className:"text-meta text-muted-foreground",children:[(0,t.jsx)("time",{dateTime:e.occurredAt,title:(0,w.fullDateTime)(c),className:"tabular-nums",children:(0,w.relativeTime)(c,n)}),null===e.signedInAccountId?null:(0,t.jsxs)("span",{"data-testid":"ship-timeline-account",children:[" · by ",i[e.signedInAccountId]??e.signedInAccountId]})]})]})]}),{message:m}=e;return(0,t.jsx)("li",{"data-testid":"ship-timeline-entry","data-type":e.type,className:"border-b border-border last:border-b-0",children:m?(0,t.jsx)("button",{type:"button",className:(0,x.classNames)(tA,"transition-colors duration-(--duration-fast) hover:bg-accent"),onClick:()=>{a(m.id)},children:u}):(0,t.jsx)("div",{className:tA,children:u})})}function tD({shipId:e,entries:s,state:n,onRetry:a,more:i,now:r,onOpenMessage:d,accountNames:o}){return"loading"===n?(0,t.jsx)(C.LoadingSkeleton,{variant:"list",rows:4,label:"Loading the timeline"}):"error"===n?(0,t.jsxs)("div",{"data-testid":"ship-timeline",className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-3",children:[(0,t.jsx)(k.InlineError,{title:"Couldn’t load the timeline",description:"The rest of the page is current. Try again in a moment."}),a?(0,t.jsx)(p.Button,{size:"sm",icon:(0,t.jsx)(h.RotateCw,{"aria-hidden":!0}),onClick:a,className:"self-start",children:"Try again"}):null]}):(0,t.jsxs)("div",{"data-testid":"ship-timeline",className:"overflow-hidden rounded-lg border border-border bg-card",children:[(0,t.jsx)("ol",{"aria-label":"Timeline",children:s.map(s=>(0,t.jsx)(tL,{entry:s,shipId:e,now:r,onOpenMessage:d,accountNames:o},s.id))}),i,s.length<=1&&!i?(0,t.jsx)("p",{className:"border-t border-border px-3.5 py-3 text-center text-meta text-muted-foreground first:border-t-0",children:"Nothing else yet. Claims, releases and messages appear here as they happen."}):null]})}var tO=e.i(298421),tM=e.i(976580),tz=e.i(994070),tP=e.i(837631),tB=e.i(787964),tE=e.i(46929),tF=e.i(718423),tH=e.i(296676),tV=e.i(609176),tW=e.i(678485),t_=e.i(853573),tU=e.i(285595),tG=e.i(928459),tK=e.i(414732);function tJ({party:e}){let s=e.name===j.OPERATOR_NAME;return(0,t.jsx)(eF.ShipName,{name:e.name,shipId:e.id,size:"meta",isOperator:s,isSuffixShown:!s})}function tY({delivery:e}){let{sender:s,recipient:n}=e.message;return(0,t.jsxs)("span",{className:"flex min-w-0 flex-wrap items-baseline gap-x-1.5 text-meta text-muted-foreground",children:[(0,t.jsx)(tJ,{party:s}),(0,t.jsx)("span",{"aria-hidden":!0,children:"→"}),(0,t.jsx)("span",{className:"sr-only",children:"to"}),"ship"===n.kind?(0,t.jsx)(tJ,{party:n.ship}):(0,t.jsx)("span",{children:(0,R.recipientGroupWords)(n)})]})}function tX({delivery:e}){let{payload:s,contentType:n}=e.message;return(0,t.jsx)("span",{className:(0,x.classNames)("block min-w-0 truncate text-foreground",(0,g.isJson)(n)?"font-mono text-id":"text-body max-sm:text-body-touch"),title:s,children:s.split("\n")[0]})}function tQ(e){return(0,tG.attentionReason)(e)}function tZ(e){var t;return`the message from ${e.message.sender.name} to ${"ship"===(t=e.message.recipient).kind?t.ship.name:(0,R.recipientGroupWords)(t)}`}function t0({delivery:e,onResend:s,onDismiss:n,pendingIds:a,layout:i}){let r=a.has(e.deliveryId),d="phone"===i;if(void 0===s&&void 0===n)return null;let o=void 0!==s&&(0,tG.canResend)(e)?(0,t.jsx)(p.Button,{size:d?"touch":"sm",variant:d?"primary":"secondary",icon:(0,t.jsx)(h.RotateCw,{"aria-hidden":!0}),isLoading:r,"data-testid":"attention-resend","aria-label":`Resend ${tZ(e)}`,onClick:()=>{s(e.deliveryId)},className:d?"flex-1":void 0,children:"Resend"}):null,l=void 0===n?null:(0,t.jsx)(p.Button,{size:d?"touch":"sm",variant:d?"secondary":"ghost",disabled:r,"data-testid":"attention-dismiss","aria-label":`Dismiss ${tZ(e)}`,onClick:()=>{n(e.deliveryId)},className:d?"flex-1":void 0,children:"Dismiss"});return d?(0,t.jsxs)("div",{className:"flex gap-2 pt-1",children:[l,o]}):(0,t.jsxs)("div",{className:"flex items-center justify-end gap-1.5",children:[o,l]})}function t1({deliveries:e,onOpen:s,now:n,...a}){return(0,t.jsxs)("div",{className:"flex flex-col gap-2 max-sm:hidden",children:[(0,t.jsxs)(tK.Table,{"aria-label":"Undeliverable and not handled deliveries",children:[(0,t.jsx)(tK.TableHeader,{children:(0,t.jsxs)(tK.TableRow,{children:[(0,t.jsx)(tK.TableHead,{children:"State"}),(0,t.jsx)(tK.TableHead,{children:"Message"}),(0,t.jsx)(tK.TableHead,{children:"Reason"}),(0,t.jsx)(tK.TableHead,{children:"Since"}),(0,t.jsx)(tK.TableHead,{children:"Actions"})]})}),(0,t.jsx)(tK.TableBody,{children:e.map(e=>{let i=new Date(e.since);return(0,t.jsxs)(tK.TableRow,{"data-testid":"attention-row","data-delivery-id":e.deliveryId,children:[(0,t.jsx)(tK.TableCell,{className:"align-top",children:(0,t.jsx)(T.StatusBadge,{status:e.state})}),(0,t.jsx)(tK.TableCell,{className:"max-w-96 align-top",children:(0,t.jsxs)("button",{type:"button","aria-label":`Open ${tZ(e)}`,onClick:()=>{s(e)},className:"flex w-full min-w-0 flex-col gap-0.5 rounded-xs text-left focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",children:[(0,t.jsx)(tX,{delivery:e}),(0,t.jsx)(tY,{delivery:e})]})}),(0,t.jsx)(tK.TableCell,{className:"max-w-48 align-top text-meta whitespace-normal text-muted-foreground",children:tQ(e)}),(0,t.jsx)(tK.TableCell,{className:"align-top",children:(0,t.jsxs)("span",{className:"flex flex-col gap-0.5 tabular-nums",children:[(0,t.jsx)("time",{dateTime:e.since,title:(0,w.fullDateTime)(i),className:"text-body text-foreground",children:(0,w.shortDateTime)(i)}),(0,t.jsxs)("span",{className:"text-meta text-muted-foreground",children:[(0,w.duration)(i,n)," ago"]})]})}),(0,t.jsx)(tK.TableCell,{className:"align-top",children:(0,t.jsx)(t0,{delivery:e,layout:"table",...a})})]},e.deliveryId)})})]}),(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"Resend creates a new message with the same payload, linked to the original. Dismiss marks the delivery resolved. Abandoned deliveries are not listed here."})]})}function t2({deliveries:e,onOpen:s,now:n,...a}){return(0,t.jsx)("ul",{"aria-label":"Undeliverable and not handled deliveries",className:"flex flex-col gap-3 sm:hidden",children:e.map(e=>{let i=new Date(e.since),r=n.getTime()-i.getTime()<864e5?(0,w.clockTime)(i):(0,w.shortDateTime)(i);return(0,t.jsxs)("li",{"data-testid":"attention-row","data-delivery-id":e.deliveryId,className:"flex flex-col gap-1.5 rounded-lg border border-border bg-card px-3.5 py-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)(T.StatusBadge,{status:e.state}),(0,t.jsxs)("button",{type:"button","aria-label":`Open ${tZ(e)}`,onClick:()=>{s(e)},className:"inline-flex items-center gap-1 rounded-xs text-meta text-muted-foreground tabular-nums focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon-sm)",children:[(0,w.duration)(i,n),(0,t.jsx)(eO.ChevronRight,{"aria-hidden":!0})]})]}),(0,t.jsx)(tX,{delivery:e}),(0,t.jsx)(tY,{delivery:e}),(0,t.jsxs)("p",{className:"text-meta text-muted-foreground",children:[tQ(e)," Since"," ",(0,t.jsx)("time",{dateTime:e.since,title:(0,w.fullDateTime)(i),className:"tabular-nums",children:r}),"."]}),(0,t.jsx)(t0,{delivery:e,layout:"phone",...a})]},e.deliveryId)})})}function t5({deliveries:e,state:s,onRetry:n,...a}){return"loading"===s?(0,t.jsxs)("div",{"data-slot":"needs-attention-list","data-state":"loading",children:[(0,t.jsx)(C.LoadingSkeleton,{variant:"table",rows:2,label:"Loading Needs attention",className:"max-sm:hidden"}),(0,t.jsx)(C.LoadingSkeleton,{variant:"list",rows:2,label:"Loading Needs attention",className:"sm:hidden"})]}):"error"===s?(0,t.jsx)("div",{"data-slot":"needs-attention-list","data-state":"error","data-testid":"attention-error",children:(0,t.jsx)(k.InlineError,{variant:"page",title:"Couldn’t load Needs attention",description:"This page couldn’t reach the fleet server. Undeliverable deliveries are kept on the server, so nothing is lost.",onRetry:n})}):0===e.length?(0,t.jsx)("div",{"data-slot":"needs-attention-list","data-state":"empty","data-testid":"attention-empty",children:(0,t.jsx)(N.EmptyState,{icon:(0,t.jsx)(tU.CircleCheck,{className:"text-tone-ok-fg"}),title:"Nothing needs your attention",description:"Undeliverable deliveries show up here as soon as they happen."})}):(0,t.jsxs)("div",{"data-slot":"needs-attention-list","data-state":"ready",className:"flex flex-col gap-3",children:[(0,t.jsx)(t1,{deliveries:e,...a}),(0,t.jsx)(t2,{deliveries:e,...a})]})}function t3({shipId:e}){let a=(0,s.useRouter)(),i=(0,tH.useNow)(),r=(0,tG.useNeedsAttention)({shipId:e,state:"notHandled"}),d=(0,tG.useResendDelivery)(),o=(0,tG.useDismissDelivery)(),l=(0,A.useAccess)(),[c,u]=(0,n.useState)(new Set),m=r.items??[],h=(e,t)=>{u(t=>new Set([...t,e])),t().finally(()=>{u(t=>new Set([...t].filter(t=>t!==e)))})};return 0===m.length?null:(0,t.jsxs)("section",{"aria-labelledby":"ship-not-handled","data-testid":"ship-not-handled",className:"flex flex-col gap-2",children:[(0,t.jsxs)("h2",{id:"ship-not-handled",className:"text-body font-semibold",children:["Not handled (",m.length,")"]}),(0,t.jsx)(t5,{deliveries:m,state:"ready",onRetry:r.retry,onResend:l.canResend?e=>{let t=(0,tG.deliveryWithId)(m,e);h(e,async()=>{try{await d.mutateAsync({deliveryId:e}),t&&(0,F.showToast)({...(0,tG.resentToast)(t),tone:"success"})}catch(e){(0,F.showToast)({title:"Couldn’t resend the message",description:t7(e),tone:"error"})}})}:void 0,onDismiss:l.canResend?e=>{h(e,async()=>{try{await o.mutateAsync({deliveryId:e}),(0,F.showToast)({...tG.DISMISSED_TOAST,tone:"success"})}catch(e){(0,F.showToast)({title:"Couldn’t dismiss the delivery",description:t7(e),tone:"error"})}})}:void 0,onOpen:t=>{a.replace(`/ships/${e}?tab=messages&message=${t.message.id}`,{scroll:!1})},pendingIds:c,now:i}),r.hasMore?(0,t.jsx)(tO.LoadMore,{what:"more not handled",isLoading:r.isLoadingMore,isFailed:r.isLoadMoreFailed,onLoad:r.loadMore,area:"ship-not-handled"}):null]})}function t7(e){return e instanceof Error?e.message:"Try again in a moment."}let t6="timeline",t4="messages",t8=(0,q.lazyDialog)(()=>e.A(665030).then(e=>e.MessageSheet),e=>e.isOpen);e.s(["ShipPageFor",0,function({shipId:e,tab:r,messageId:d}){let o,l=(0,s.useRouter)(),c=(0,tH.useNow)(),u=(0,tV.usePluginShipIds)(),m=(0,t_.useShip)(e),h=(0,t_.useShipTimeline)(e),p=(o=[...new Set((h.items??[]).flatMap(e=>null===e.signedInAccountId?[]:[e.signedInAccountId]))].sort(),(0,tM.useConsoleRead)({queryKey:["account-names",...o],queryFn:()=>(0,tz.fetchConsoleRead)({read:"account-names",input:{accountIds:o}}),enabled:o.length>0}).data??{}),x=(0,t_.useShipMessages)(e),g=(0,t_.useMessage)(d),f=(0,t_.useShipWay)(e),v=(0,E.useMachines)(),j=(0,tF.useLiveFleet)(),y=(0,tB.useConsoleFrame)(),N=(0,em.useSquadrons)(),k=(0,A.useAccess)(),[C,S]=(0,n.useState)();(0,tW.useSignInWhenSessionEnds)([m.error,h.error,x.error,g.error,j.error]);let T=t=>{let s,n;l.replace((s=new URLSearchParams,t.tab!==t6&&s.set("tab",t.tab),void 0!==t.messageId&&s.set("message",t.messageId),""===(n=s.toString())?`/ships/${e}`:`/ships/${e}?${n}`),{scroll:!1})},R=e=>{T({tab:r,messageId:e})},$="NOT_FOUND"===(0,tE.trpcErrorCode)(m.error)||null===m.data,q=f.data&&m.data?.kind==="agent"?function(e,t){let{now:s,machines:n=[]}=t;if(null===e.lease)return{lines:[],oldest:null};let{by:a,turn:i}=e.lease,r=0===e.waiting?[{icon:"time",tone:"neutral",text:"Nothing waiting"}]:[];return{lines:[null===a?{icon:"pull",tone:"neutral",text:"Pull: nobody wakes it"}:{...(0,b.holderWordsOf)(a),tone:"neutral"},...function(e,t){if(e?.kind!=="trierarch")return[];let s=t.machines.find(t=>t.shipId===e.trierarch.id);if(!s?.isSilent)return[];let n=null===s.lastSeenAt?"":` since ${(0,w.sinceTime)(new Date(s.lastSeenAt),t.now)}`;return[{icon:"silent",tone:"attention",text:`Trierarch on ${e.trierarch.name} silent${n}`}]}(a,{now:s,machines:n}),...function(e,t){if(null===e)return[];let s=(0,w.sinceTime)(new Date(e.at),t);return"busy"===e.turn?[{icon:"busy",tone:"active",text:`Busy since ${s}`}]:[{icon:"idle",tone:"neutral",text:`Idle since ${s}`}]}(i,s),...r],oldest:function(e,t){let{oldest:s,waiting:n}=e;if(null===s)return null;let{state:a,way:i}=s.delivery,r=[(0,w.relativeTime)(new Date(i.since),t).toLowerCase()];return"handed"===a&&r.push(i.isPulled?"not acknowledged":"not confirmed"),i.overdue&&r.push(`argo told at ${String(i.overdue.minutes)} min`),n>1&&r.push(`oldest of ${String(n)}`),{messageId:s.messageId,status:(0,b.deliveryStatus)({state:a,isPulled:i.isPulled}),isOverdue:null!==i.overdue,text:r.join(" · ")}}(e,s)}}(f.data,{now:c,machines:v.data??[]}):void 0,L=(0,ef.shipsInSquadrons)(N.data??[]).get(e);return(0,t.jsx)(tP.DetailPage,{switcher:y.switcher,account:y.account,onCompose:y.onCompose,onSearch:y.onSearch,banner:y.banner,title:m.data?.name??"Ship",parents:L?[{href:"/squadrons",label:"Squadrons"},{href:`/squadrons/${L.squadronId}`,label:L.squadronId}]:[{href:"/",label:"Fleet overview"}],live:j.live,header:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(e_,{ship:m.data??void 0,shipId:e,state:$?"not-found":m.data?"ready":"loading",now:c,actions:m.data?(0,t.jsx)(ej.ShipActions,{ship:m.data,compose:i.ComposeMessage,crewLineFlow:ey.NewCrewLineFlow}):void 0,crewRequest:m.data?(0,t.jsx)(eg,{ship:m.data,timeline:h.items??[],now:c}):void 0,labels:m.data?(0,t.jsx)(e8,{ship:m.data}):void 0,isPluginShip:u.has(e),way:q&&f.data?.lease?(0,t.jsx)(eK,{view:q,onOpenMessage:R}):void 0}),$?null:(0,t.jsx)(ew,{shipId:e,now:c}),$?null:(0,t.jsx)(t3,{shipId:e})]}),sheet:(0,t.jsx)(t8,{message:g.data,messageId:d,state:"NOT_FOUND"===(0,tE.trpcErrorCode)(g.error)?"not-found":g.data?"ready":"loading",isOpen:void 0!==d,now:c,machines:v.data??[],onOpenMessage:R,onOpenChange:e=>{e||T({tab:r})},onReply:k.canSend?e=>{S({messageId:e.id,sender:e.sender})}:void 0}),children:(0,t.jsxs)(t.Fragment,{children:[$?null:(0,t.jsxs)(a.Tabs,{value:r,onValueChange:e=>{T({tab:e===t4?t4:t6,messageId:d})},children:[(0,t.jsxs)(a.TabsList,{variant:"line","aria-label":`${m.data?.name??"Ship"} history`,children:[(0,t.jsx)(a.TabsTrigger,{variant:"line",value:t6,children:"Timeline"}),(0,t.jsx)(a.TabsTrigger,{variant:"line",value:t4,children:"Messages"})]}),(0,t.jsx)(a.TabsContent,{value:t6,className:"pt-4",children:(0,t.jsx)(tD,{shipId:e,entries:h.items??[],state:h.isFailed?"error":h.items?"ready":"loading",onRetry:h.retry,more:h.hasMore?(0,t.jsx)(tO.LoadMore,{what:"older events",isLoading:h.isLoadingMore,isFailed:h.isLoadMoreFailed,onLoad:h.loadMore,area:"ship-timeline"}):null,now:c,onOpenMessage:R,accountNames:p})}),(0,t.jsx)(a.TabsContent,{value:t4,className:"pt-4",children:(0,t.jsx)(I,{shipId:e,messages:x.items??[],state:x.isFailed?"error":x.items?"ready":"loading",onRetry:x.retry,more:x.hasMore?(0,t.jsx)(tO.LoadMore,{what:"older messages",isLoading:x.isLoadingMore,isFailed:x.isLoadMoreFailed,onLoad:x.loadMore,area:"message-threads"}):null,now:c,onOpenMessage:R})})]}),(0,t.jsx)(i.ComposeMessage,{isOpen:void 0!==C,onOpenChange:e=>{e||S(void 0)},replyTo:C})]})})}],915860)}]);
|
package/.next/standalone/packages/console/.next/static/chunks/{12tpena_m0td3.js → 3rm6d-05q8id3.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,395530,e=>{"use strict";var t=e.i(271645),s=e.i(828918),a=e.i(838452),i=e.i(673553);e.s(["useCompositeItem",0,function(e={}){let{highlightItemOnHover:r,highlightedIndex:n,onHighlightedIndexChange:o}=(0,a.useCompositeRootContext)(),{ref:l,index:d}=(0,i.useCompositeListItem)(e),c=n===d,u=t.useRef(null),m=(0,s.useMergedRefs)(l,u);return{compositeProps:{tabIndex:c?0:-1,onFocus(){o(d)},onMouseMove(){let e=u.current;if(!r||!e)return;let t=e.hasAttribute("disabled")||"true"===e.ariaDisabled;c||t||e.focus()}},compositeRef:m,index:d}}])},24071,e=>{"use strict";var t=e.i(456420);let s={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};s.node;let a=(0,t.default)(s);e.s(["ChevronLeft",0,a],24071)},867927,e=>{"use strict";var t=e.i(456420);let s={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};s.node;let a=(0,t.default)(s);e.s(["ChevronRight",0,a],867927)},275043,446513,e=>{"use strict";var t=e.i(456420);let s={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"]};s.node;let a=(0,t.default)(s);e.s(["default",0,a],275043);let i={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"}]]};i.node;let r=(0,t.default)(i);e.s(["Monitor",0,r],446513)},77071,e=>{"use strict";var t=e.i(456420);let s={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};s.node;let a=(0,t.default)(s);e.s(["Plus",0,a],77071)},566595,e=>{"use strict";var t=e.i(456420);let s={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};s.node;let a=(0,t.default)(s);e.s(["Search",0,a],566595)},819759,e=>{"use strict";var t=e.i(456420);let s={name:"square-pen",size:24,node:[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],aliases:["pen-box","edit","pen-square"]};s.node;let a=(0,t.default)(s);e.s(["SquarePen",0,a],819759)},466787,e=>{"use strict";var t=e.i(456420);let s={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"]};s.node;let a=(0,t.default)(s);e.s(["TriangleAlert",0,a],466787)},298260,e=>{"use strict";var t=e.i(843476),s=e.i(965324);e.s(["Kbd",0,function({className:e,...a}){return(0,t.jsx)("kbd",{"data-slot":"kbd",className:(0,s.classNames)("inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-xs border border-border bg-muted px-1.25 font-sans text-micro font-medium text-muted-foreground max-sm:hidden",e),...a})}])},638919,e=>{"use strict";var t=e.i(843476),s=e.i(353753),a=e.i(225913),i=e.i(560964),r=e.i(965324),n=e.i(574296);let o=(0,a.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)(s.Dialog.Root,{"data-slot":"sheet",...e})},"SheetBody",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"sheet-body",className:(0,r.classNames)("min-h-0 flex-1 overflow-y-auto in-data-[side=right]:p-6",e),...s})},"SheetClose",0,function(e){return(0,t.jsx)(s.Dialog.Close,{"data-slot":"sheet-close",...e})},"SheetContent",0,function({className:e,children:a,side:l="right",...d}){return(0,t.jsxs)(s.Dialog.Portal,{children:[(0,t.jsx)(s.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)(s.Dialog.Popup,{"data-slot":"sheet-content","data-side":l,className:(0,r.classNames)(o({side:l}),e),...d,children:["bottom"===l?(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)(s.Dialog.Close,{"data-slot":"sheet-close",render:(0,t.jsx)(n.Button,{variant:"ghost",size:"sm",isIconOnly:!0,className:"absolute top-4 right-4","aria-label":"Close"}),children:(0,t.jsx)(i.XIcon,{})}),a]})]})},"SheetDescription",0,function({className:e,...a}){return(0,t.jsx)(s.Dialog.Description,{"data-slot":"sheet-description",className:(0,r.classNames)("text-meta text-muted-foreground",e),...a})},"SheetFooter",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"sheet-footer",className:(0,r.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),...s})},"SheetHeader",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"sheet-header",className:(0,r.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),...s})},"SheetTitle",0,function({className:e,...a}){return(0,t.jsx)(s.Dialog.Title,{"data-slot":"sheet-title",className:(0,r.classNames)("text-heading font-semibold text-foreground in-data-[side=bottom]:py-2 in-data-[side=bottom]:text-section",e),...a})},"SheetTrigger",0,function(e){return(0,t.jsx)(s.Dialog.Trigger,{"data-slot":"sheet-trigger",...e})}])},889275,e=>{"use strict";var t=e.i(843476),s=e.i(188393),a=e.i(954616),i=e.i(266027),r=e.i(912598),n=e.i(427702),o=e.i(267760),l=e.i(285595),d=e.i(758925),c=e.i(653145),u=e.i(574296),m=e.i(212470),h=e.i(791727),g=e.i(817981);let p="text-meta text-destructive-text";function x({email:e,hasPassword:s,isSaving:a,isSaved:i,saveError:r,onSave:n}){let{register:f,handleSubmit:v,getValues:y,formState:{errors:j}}=(0,c.useForm)({defaultValues:{currentPassword:"",email:e??"",password:"",repeat:""}}),b=v(e=>{n(s?{email:e.email,password:e.password,currentPassword:e.currentPassword}:{email:e.email,password:e.password})});return(0,t.jsxs)("section",{"aria-labelledby":"settings-sign-in","data-testid":"settings-sign-in",className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-4",children:[(0,t.jsxs)("h2",{id:"settings-sign-in",className:"flex items-center gap-2 text-body font-semibold [&_svg]:size-(--size-icon) [&_svg]:text-muted-foreground",children:[(0,t.jsx)(d.KeyRound,{"aria-hidden":!0}),"Sign-in"]}),(0,t.jsx)("p",{className:"text-body text-muted-foreground","data-testid":"settings-sign-in-state",children:null===e?"argo has no email and password yet: you signed in with a link from npx aeolus-core sign-in. Set them to sign in with them instead.":"The email and password you sign in to this console with, as argo."}),(0,t.jsxs)("form",{noValidate:!0,"data-testid":"settings-sign-in-form",className:"flex max-w-sm flex-col gap-4",onSubmit:e=>{b(e)},children:[s?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(h.Label,{htmlFor:"settings-sign-in-current",children:"Current password"}),(0,t.jsx)(m.Input,{id:"settings-sign-in-current",type:"password",autoComplete:"current-password","aria-invalid":!!j.currentPassword||void 0,"aria-describedby":j.currentPassword?"settings-sign-in-current-error":void 0,...f("currentPassword",{validate:e=>""!==e||"Enter your current password"})}),j.currentPassword?(0,t.jsx)("span",{id:"settings-sign-in-current-error",className:p,children:j.currentPassword.message}):null]}):null,(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(h.Label,{htmlFor:"settings-sign-in-email",children:"Email"}),(0,t.jsx)(m.Input,{id:"settings-sign-in-email",type:"email",autoComplete:"username",placeholder:"you@example.com","aria-invalid":!!j.email||void 0,"aria-describedby":j.email?"settings-sign-in-email-error":void 0,...f("email",{validate:e=>(0,o.signInEmailProblem)(e)??!0})}),j.email?(0,t.jsx)("span",{id:"settings-sign-in-email-error",className:p,children:j.email.message}):null]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(h.Label,{htmlFor:"settings-sign-in-password",children:"New password"}),(0,t.jsx)(m.Input,{id:"settings-sign-in-password",type:"password",autoComplete:"new-password","aria-invalid":!!j.password||void 0,"aria-describedby":j.password?"settings-sign-in-password-error":void 0,...f("password",{validate:e=>(0,o.newOperatorPasswordProblem)(e)??!0})}),j.password?(0,t.jsx)("span",{id:"settings-sign-in-password-error",className:p,children:j.password.message}):null]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(h.Label,{htmlFor:"settings-sign-in-repeat",children:"Repeat the password"}),(0,t.jsx)(m.Input,{id:"settings-sign-in-repeat",type:"password",autoComplete:"new-password","aria-invalid":!!j.repeat||void 0,"aria-describedby":j.repeat?"settings-sign-in-repeat-error":void 0,...f("repeat",{validate:e=>e===y("password")||"The two passwords differ"})}),j.repeat?(0,t.jsx)("span",{id:"settings-sign-in-repeat-error",className:p,children:j.repeat.message}):null]}),(0,t.jsx)("div",{children:(0,t.jsx)(u.Button,{type:"submit",variant:"primary",isLoading:a,"data-testid":"settings-sign-in-save",children:a?"Saving…":"Save email and password"})}),void 0!==r&&(0,t.jsx)(g.InlineError,{variant:"section",title:"Couldn’t save the email and password",description:r}),i&&void 0===r&&!a?(0,t.jsxs)("p",{role:"status","data-testid":"settings-sign-in-saved",className:"flex items-center gap-1.5 text-meta text-tone-ok-fg [&_svg]:size-(--size-icon-sm)",children:[(0,t.jsx)(l.CircleCheck,{"aria-hidden":!0}),"Saved. Sign in with this email and password from now on."]}):null]})]})}function f(){let e,o,l,d,{email:c,...u}=(e=(0,n.useTRPC)(),o=(0,r.useQueryClient)(),l=(0,i.useQuery)(e.console.account.queryOptions()),d=(0,a.useMutation)(e.console.setLogin.mutationOptions({onSuccess:()=>o.invalidateQueries({queryKey:e.console.account.queryKey()})})),{email:l.data?.kind==="operator"?l.data.email:void 0,hasPassword:l.data?.kind==="operator"&&l.data.hasPassword,isSaving:d.isPending,isSaved:d.isSuccess,saveError:d.error?.message,onSave:e=>{d.mutate(e)}});return void 0===c?(0,t.jsx)(s.LoadingSkeleton,{variant:"detail",rows:3,label:"Loading the sign-in"}):(0,t.jsx)(x,{email:c,...u})}var v=e.i(456420);let y={name:"globe",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]};y.node;let j=(0,v.default)(y),b={name:"link-2",size:24,node:[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]};b.node;let w=(0,v.default)(b);function N({settings:e,loadError:a,onRetry:i,isConnecting:r,connectError:n,onConnect:o}){return void 0!==a?(0,t.jsx)(g.InlineError,{title:"Couldn’t read the gateway",description:a,onRetry:i}):void 0===e?(0,t.jsx)(s.LoadingSkeleton,{variant:"detail",rows:2,label:"Loading the gateway"}):"none"===e.state?null:(0,t.jsxs)("section",{"aria-labelledby":"settings-gateway","data-testid":"settings-gateway",className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-4",children:[(0,t.jsxs)("h2",{id:"settings-gateway",className:"flex items-center gap-2 text-body font-semibold [&_svg]:size-(--size-icon) [&_svg]:text-muted-foreground",children:[(0,t.jsx)(j,{"aria-hidden":!0}),"Gateway"]}),"connected"===e.state?(0,t.jsxs)("p",{className:"text-body","data-testid":"settings-gateway-state",children:["Connected as ",(0,t.jsx)("span",{className:"font-mono",children:e.ship?.name})," ",(0,t.jsxs)("span",{className:"font-mono text-muted-foreground",children:["(",e.ship?.shipId,")"]}),". It commissions an app ship for each outside party you approve."]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"text-body","data-testid":"settings-gateway-state",children:"Not connected. Connecting commissions the ship gateway, which reads the fleet and commissions an app ship for each outside party you approve, or gives it a new starting prompt, and hands its secret to the gateway. No one sees the secret."}),(0,t.jsx)("div",{children:(0,t.jsx)(u.Button,{variant:"primary",icon:(0,t.jsx)(w,{"aria-hidden":!0}),isLoading:r,onClick:o,"data-testid":"settings-gateway-connect",children:"Connect gateway"})}),void 0!==n&&(0,t.jsx)(g.InlineError,{variant:"field",title:"Couldn’t connect the gateway",description:n})]})]})}function S({settings:e,loadError:a,onRetry:i,isConnecting:r,connectError:n,onConnect:o}){return void 0!==a?(0,t.jsx)(g.InlineError,{title:"Couldn’t read squadrons",description:a,onRetry:i}):void 0===e?(0,t.jsx)(s.LoadingSkeleton,{variant:"detail",rows:2,label:"Loading squadrons"}):"none"===e.state?null:(0,t.jsxs)("section",{"aria-labelledby":"settings-squadrons","data-testid":"settings-squadrons",className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-4",children:[(0,t.jsx)("h2",{id:"settings-squadrons",className:"text-body font-semibold",children:"Squadrons"}),"connected"===e.state?(0,t.jsxs)("p",{className:"text-body","data-testid":"settings-squadrons-state",children:["Connected as ",(0,t.jsx)("span",{className:"font-mono",children:e.ship?.name})," ",(0,t.jsxs)("span",{className:"font-mono text-muted-foreground",children:["(",e.ship?.shipId,")"]})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"text-body","data-testid":"settings-squadrons-state",children:"Not connected. Connecting commissions the ship squadrons, with fleet read and manage, or gives it a new starting prompt, and hands its secret to squadrons. No one sees the secret."}),(0,t.jsx)("div",{children:(0,t.jsx)(u.Button,{variant:"primary",icon:(0,t.jsx)(w,{"aria-hidden":!0}),isLoading:r,onClick:o,"data-testid":"settings-squadrons-connect",children:"Connect squadrons"})}),void 0!==n&&(0,t.jsx)(g.InlineError,{variant:"field",title:"Couldn’t connect squadrons",description:n})]})]})}var k=e.i(422768),C=e.i(77071),R=e.i(825398),q=e.i(466787),D=e.i(271645),I=e.i(849635),z=e.i(818310),P=e.i(424010),L=e.i(746675),A=e.i(67874),E=e.i(351588);let T=".aeolus/squadrons";function K({isAdding:e,addError:s,onAdd:a}){let i=(0,D.useId)(),r=(0,D.useId)(),n=(0,D.useId)(),[o,l]=(0,D.useState)(""),[d,c]=(0,D.useState)(""),[p,x]=(0,D.useState)("");return(0,t.jsxs)("form",{noValidate:!0,"data-testid":"repositories-add",className:"flex flex-col gap-3 rounded-md border border-border p-3",onSubmit:e=>{e.preventDefault();let t=d.trim(),s=p.trim();a({url:o.trim(),...""===t?{}:{path:t},...""===s?{}:{token:s}},()=>{l(""),c(""),x("")})},children:[(0,t.jsxs)("div",{className:"grid gap-3 sm:grid-cols-[minmax(0,2fr)_minmax(0,1fr)]",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(h.Label,{htmlFor:i,children:"Repository URL"}),(0,t.jsx)(m.Input,{id:i,isMono:!0,autoComplete:"off",spellCheck:!1,placeholder:"https://github.com/acme/squadron-templates.git","data-testid":"repositories-url",value:o,onChange:e=>{l(e.target.value)}})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(h.Label,{htmlFor:r,children:"Path (optional)"}),(0,t.jsx)(m.Input,{id:r,isMono:!0,autoComplete:"off",spellCheck:!1,placeholder:T,"data-testid":"repositories-path",value:d,onChange:e=>{c(e.target.value)}})]})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(h.Label,{htmlFor:n,children:"Read token (optional, for a private repository)"}),(0,t.jsx)(m.Input,{id:n,type:"password",autoComplete:"new-password","data-testid":"repositories-token",value:p,onChange:e=>{x(e.target.value)}}),(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"Entered once and never shown again. To change it, remove the repository and add it again."})]}),void 0===s?null:(0,t.jsx)(g.InlineError,{title:"Couldn’t add the repository",description:`${s} The list shows what squadrons holds.`}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)(u.Button,{type:"submit",variant:"primary",icon:(0,t.jsx)(C.Plus,{"aria-hidden":!0}),isLoading:e,disabled:""===o.trim(),"data-testid":"repositories-add-submit",children:e?"Adding":"Add repository"})})]})}function B(e,t){return e.map(({name:e,versions:s})=>"template"===t?`${e}@${s.join(", ")}`:`${e} v${s.join(", v")}`).join(" · ")}function F({contents:e,path:s}){let{templates:a,blueprints:i,leftOut:r}=e;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("dl",{"data-testid":"repositories-found",className:"grid grid-cols-[auto_minmax(0,1fr)] gap-x-3 gap-y-0.5 text-meta",children:0===a.length&&0===i.length?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("dt",{className:"text-muted-foreground",children:"Found"}),(0,t.jsxs)("dd",{children:["No templates or blueprints under ",s]})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("dt",{className:"text-muted-foreground",children:"Templates"}),(0,t.jsx)("dd",{className:"font-mono",children:0===a.length?"None":B(a,"template")}),(0,t.jsx)("dt",{className:"text-muted-foreground",children:"Blueprints"}),(0,t.jsx)("dd",{className:"font-mono",children:0===i.length?"None":B(i,"blueprint")})]})}),0===r.length?null:(0,t.jsxs)("div",{"data-testid":"repositories-left-out",className:"flex flex-col gap-1.5 rounded-md border border-tone-attention-border bg-tone-attention-bg p-2.5 text-tone-attention-fg",children:[(0,t.jsxs)("p",{className:"flex items-center gap-1.5 text-meta font-medium",children:[(0,t.jsx)(q.TriangleAlert,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),"Left out: ",r.length,". Fix ",1===r.length?"it":"them"," in git, tag again, then refresh."]}),(0,t.jsx)("ul",{className:"flex flex-col gap-1",children:r.map(e=>(0,t.jsxs)("li",{"data-testid":"repositories-left-out-item",className:"text-meta text-foreground",children:[(0,t.jsx)("span",{className:"font-mono",children:(0,z.leftOutLabel)(e)}),": ",e.message]},`${e.kind} ${e.name}@${String(e.version)}`))})]})]})}function M({repository:e,contents:s,now:a,onRemove:i}){let{lastFetch:r}=e;return(0,t.jsxs)("li",{"data-testid":"repositories-row",className:"flex flex-col gap-1.5 px-3 py-2.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(E.RepositoryName,{name:e.name}),e.path===T?null:(0,t.jsx)("span",{className:"font-mono text-meta text-muted-foreground",children:e.path}),e.hasToken?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 text-meta text-muted-foreground",children:[(0,t.jsx)(d.KeyRound,{"aria-hidden":!0,className:"size-(--size-icon-sm)"}),"Token"]}):null,(0,t.jsx)("span",{className:"ml-auto text-meta text-muted-foreground","data-testid":"repositories-fetched",children:null===r?"Not fetched yet":`Fetched ${(0,I.relativeTime)(new Date(r.at),a)}`}),(0,t.jsx)(u.Button,{size:"xs",variant:"ghost","data-testid":"repositories-remove",onClick:i,children:"Remove"})]}),r?.error?(0,t.jsxs)("p",{"data-testid":"repositories-error",className:"flex items-start gap-1.5 text-meta text-destructive-text",children:[(0,t.jsx)(k.CircleAlert,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0"}),(0,t.jsxs)("span",{children:["The last fetch failed: ",(0,t.jsx)("span",{className:"font-mono",children:r.error})]})]}):null,void 0===s||null===r||null!==r.error&&s.templates.length+s.blueprints.length+s.leftOut.length===0?null:(0,t.jsx)(F,{contents:s,path:e.path})]})}function H(e){let{repositories:a,catalogue:i,state:r,error:n,onRetry:o,isRemoving:l,removeError:d,onRemove:c,onRemoveClosed:m,isRefreshing:h,refreshError:p,onRefresh:x,now:f}=e,[v,y]=(0,D.useState)(void 0);return(0,t.jsxs)("section",{"aria-labelledby":"settings-repositories","data-testid":"settings-repositories",className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("h2",{id:"settings-repositories",className:"text-body font-semibold",children:"Repositories"}),(0,t.jsx)(u.Button,{size:"xs",icon:(0,t.jsx)(R.RotateCw,{"aria-hidden":!0}),isLoading:h,disabled:0===a.length,onClick:x,"data-testid":"repositories-refresh",children:"Refresh"})]}),(0,t.jsxs)("p",{className:"text-meta text-muted-foreground",children:["squadrons reads templates and blueprints from these repositories, under ",T," unless a repository sets its own path. It fetches one when you add it, when you refresh, and once each time squadrons connects or starts."]}),void 0===p?null:(0,t.jsx)(g.InlineError,{variant:"section",title:"Couldn’t refresh",description:p}),"loading"===r?(0,t.jsx)(s.LoadingSkeleton,{variant:"list",rows:2,label:"Loading the repositories"}):"error"===r?(0,t.jsx)(g.InlineError,{title:"Couldn’t read the repositories",description:n,onRetry:o}):0===a.length?(0,t.jsx)(A.EmptyState,{variant:"section",title:"No repositories yet",description:"Add one to read its templates and blueprints."}):(0,t.jsx)("ul",{className:"divide-y divide-border overflow-hidden rounded-md border border-border",children:a.map(e=>(0,t.jsx)(M,{repository:e,...void 0===i?{}:{contents:(0,z.repositoryContents)(i,e.name)},now:f,onRemove:()=>{y(e.name)}},e.name))}),(0,t.jsx)(K,{isAdding:e.isAdding,addError:e.addError,onAdd:e.onAdd}),(0,t.jsx)(P.AlertDialog,{open:void 0!==v,onOpenChange:e=>{e||l||(y(void 0),m())},children:(0,t.jsxs)(P.AlertDialogContent,{"data-testid":"repositories-remove-dialog",className:L.dialogSurface.phoneSheet,children:[(0,t.jsxs)(P.AlertDialogHeader,{children:[(0,t.jsxs)(P.AlertDialogTitle,{children:["Remove ",v,"?"]}),(0,t.jsx)(P.AlertDialogDescription,{children:"Its templates and blueprints leave the catalogue at once. Squadrons formed from them keep the versions they formed from."})]}),void 0===d?null:(0,t.jsx)(g.InlineError,{title:"Couldn’t remove the repository",description:`${d} The list shows what squadrons holds.`}),(0,t.jsxs)(P.AlertDialogFooter,{children:[(0,t.jsx)(P.AlertDialogClose,{render:(0,t.jsx)(u.Button,{disabled:l}),children:"Cancel"}),(0,t.jsx)(u.Button,{variant:"destructive",isLoading:l,"data-testid":"repositories-remove-confirm",onClick:()=>{void 0!==v&&c(v,()=>{y(void 0),m()})},children:"Remove repository"})]})]})})]})}var O=e.i(586875),$=e.i(522016);function _({settings:e,loadError:a,onRetry:i,isConnecting:r,connectError:n,onConnect:o}){return void 0!==a?(0,t.jsx)(g.InlineError,{title:"Couldn’t read the trierarch plugin",description:a,onRetry:i}):void 0===e?(0,t.jsx)(s.LoadingSkeleton,{variant:"detail",rows:2,label:"Loading the trierarch plugin"}):(0,t.jsxs)("section",{"aria-labelledby":"settings-trierarchs","data-testid":"settings-trierarchs",className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-4",children:[(0,t.jsxs)("h2",{id:"settings-trierarchs",className:"flex items-center gap-2 text-body font-semibold [&_svg]:size-(--size-icon) [&_svg]:text-muted-foreground",children:[(0,t.jsx)(O.ShipWheel,{"aria-hidden":!0}),"Trierarchs"]}),"none"===e.state?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"text-body","data-testid":"settings-trierarchs-state",children:["Not set up. ","Starts, restarts and stops sessions for crew requests on your machines. Without it, crew requests wait on Needs crew for you to crew by hand."]}),(0,t.jsx)("div",{children:(0,t.jsx)(u.Button,{size:"sm",nativeButton:!1,render:(0,t.jsx)($.default,{href:"/trierarchs"}),"data-testid":"settings-trierarchs-how",children:"How to set it up"})})]}):"connected"===e.state?(0,t.jsxs)("p",{className:"text-body","data-testid":"settings-trierarchs-state",children:["Connected as ",(0,t.jsx)("span",{className:"font-mono",children:e.ship?.name})," ",(0,t.jsxs)("span",{className:"font-mono text-muted-foreground",children:["(",e.ship?.shipId,")"]})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"text-body","data-testid":"settings-trierarchs-state",children:"Not connected. Connecting commissions the ship trierarch-plugin, which reads and manages the fleet and assigns crew requests, or gives it a new starting prompt, and hands its secret to the trierarch plugin. No one sees the secret."}),(0,t.jsx)("div",{children:(0,t.jsx)(u.Button,{variant:"primary",icon:(0,t.jsx)(w,{"aria-hidden":!0}),isLoading:r,onClick:o,"data-testid":"settings-trierarchs-connect",children:"Connect trierarch plugin"})}),void 0!==n&&(0,t.jsx)(g.InlineError,{variant:"field",title:"Couldn’t connect the trierarch plugin",description:n})]})]})}var Q=e.i(509892),U=e.i(787964),V=e.i(750980),G=e.i(928459),W=e.i(296676),X=e.i(473837),Y=e.i(678485),Z=e.i(718423),J=e.i(686165),ee=e.i(448695),et=e.i(303979),es=e.i(500265);e.s(["default",0,function(){let e=(0,W.useNow)(),s=(0,U.useConsoleFrame)(),a=(0,J.useHasSquadrons)(),i=(0,G.useNeedsAttention)(),r=(0,J.useSquadronsSettings)(),n=(0,J.useConnectSquadrons)(),o=(0,es.useTrierarchPluginSettings)(),l=(0,es.useConnectTrierarchPlugin)(),d=(0,V.useGatewaySettings)(),c=(0,V.useConnectGateway)(),u=(0,Z.useLiveFleet)(),m=(0,J.useSquadronsConnection)(),h=(0,ee.useRepositories)(),g=(0,ee.useCatalogue)(),p=(0,ee.useAddRepository)(),x=(0,ee.useRemoveRepository)(),v=(0,ee.useRefreshCatalogue)(),y=(0,et.usePluginNav)(),j=(0,X.useHasOwnSignIn)();return(0,Y.useSignInWhenSessionEnds)([i.error,u.error]),(0,t.jsxs)(Q.ListPage,{...s,title:"Settings",description:"How this installation runs. Only argo, the operator, sees this page.",live:u.live,children:[j&&(0,t.jsx)(f,{}),a&&(0,t.jsx)(S,{settings:r.data,loadError:r.isError?r.error.message:void 0,onRetry:()=>{r.refetch()},isConnecting:n.isPending,connectError:n.isError?n.error.message:void 0,onConnect:()=>{n.mutate()}}),y.hasSettings&&(0,t.jsx)(_,{settings:o.data,loadError:o.isError?o.error.message:void 0,onRetry:()=>{o.refetch()},isConnecting:l.isPending,connectError:l.isError?l.error.message:void 0,onConnect:()=>{l.mutate()}}),y.hasSettings&&(0,t.jsx)(N,{settings:d.data,loadError:d.isError?d.error.message:void 0,onRetry:()=>{d.refetch()},isConnecting:c.isPending,connectError:c.isError?c.error.message:void 0,onConnect:()=>{c.mutate()}}),"connected"===m&&(0,t.jsx)(H,{repositories:h.data??[],...void 0===g.data?{}:{catalogue:g.data},state:h.isError?"error":h.data?"ready":"loading",error:h.error?.message,onRetry:()=>{h.refetch()},isAdding:p.isPending,addError:p.error?.message,onAdd:(e,t)=>{p.mutate(e,{onSuccess:t})},isRemoving:x.isPending,removeError:x.error?.message,onRemove:(e,t)=>{x.mutate(e,{onSuccess:t})},onRemoveClosed:()=>{x.reset()},isRefreshing:v.isPending,refreshError:v.error?.message,onRefresh:()=>{v.mutate()},now:e})]})}],889275)},424010,e=>{"use strict";var t=e.i(843476);e.s([],558762),e.i(558762);var s=e.i(366250),a=e.i(402820),i=e.i(156736),r=e.i(209793),n=e.i(784324),o=e.i(264951),l=e.i(77173);let d=e.i(313488).DialogTrigger;var c=e.i(974217),u=e.i(325326);class m extends u.DialogHandle{}e.s(["Backdrop",()=>a.DialogBackdrop,"Close",()=>i.DialogClose,"Description",()=>r.DialogDescription,"Handle",0,m,"Popup",()=>n.DialogPopup,"Portal",()=>o.DialogPortal,"Root",0,function(e){return(0,s.useRenderDialogRoot)("alert-dialog",e)},"Title",()=>l.DialogTitle,"Trigger",0,d,"Viewport",()=>c.DialogViewport,"createHandle",0,function(){return new m}],734604);var h=e.i(734604),h=h,g=e.i(965324),p=e.i(746675);e.s(["AlertDialog",0,function(e){return(0,t.jsx)(h.Root,{"data-slot":"alert-dialog",...e})},"AlertDialogClose",0,function(e){return(0,t.jsx)(h.Close,{"data-slot":"alert-dialog-close",...e})},"AlertDialogContent",0,function({className:e,size:s,children:a,...i}){return(0,t.jsxs)(h.Portal,{children:[(0,t.jsx)(h.Backdrop,{"data-slot":"alert-dialog-overlay",className:p.dialogSurface.overlay}),(0,t.jsx)(h.Popup,{"data-slot":"alert-dialog-content",className:(0,g.classNames)(p.dialogSurface.popup({size:s}),e),...i,children:a})]})},"AlertDialogDescription",0,function({className:e,...s}){return(0,t.jsx)(h.Description,{"data-slot":"alert-dialog-description",className:(0,g.classNames)(p.dialogSurface.description,e),...s})},"AlertDialogFooter",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,g.classNames)(p.dialogSurface.footer,e),...s})},"AlertDialogHeader",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,g.classNames)(p.dialogSurface.header,e),...s})},"AlertDialogTitle",0,function({className:e,...s}){return(0,t.jsx)(h.Title,{"data-slot":"alert-dialog-title",className:(0,g.classNames)(p.dialogSurface.title,e),...s})}],424010)},791727,e=>{"use strict";var t=e.i(843476),s=e.i(965324);e.s(["Label",0,function({className:e,htmlFor:a,...i}){return(0,t.jsx)("label",{"data-slot":"label",htmlFor:a,className:(0,s.classNames)("text-body font-medium text-foreground select-none",e),...i})}])},219321,e=>{"use strict";var t=e.i(843476),s=e.i(965324);e.s(["Skeleton",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"skeleton","aria-hidden":!0,className:(0,s.classNames)("animate-pulse rounded-sm bg-secondary [animation-duration:var(--duration-pulse)] motion-reduce:animate-none",e),...a})}])},67874,e=>{"use strict";var t=e.i(843476),s=e.i(965324);e.s(["EmptyState",0,function({title:e,description:a,icon:i,action:r,variant:n="page",className:o}){return"section"===n?(0,t.jsxs)("p",{"data-slot":"empty-state","data-variant":n,className:(0,s.classNames)("rounded-lg border border-border px-4 py-3 text-center text-meta text-muted-foreground",o),children:[e,a?(0,t.jsxs)(t.Fragment,{children:[" ",a]}):null]}):"no-results"===n?(0,t.jsxs)("div",{"data-slot":"empty-state","data-variant":n,className:(0,s.classNames)("flex flex-col items-center gap-2.5 rounded-lg border border-border bg-card px-4 py-6 text-center",o),children:[(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:e}),r]}):(0,t.jsxs)("div",{"data-slot":"empty-state","data-variant":n,className:(0,s.classNames)("flex flex-col items-center gap-3 rounded-lg border border-dashed border-border bg-card px-6 py-10 text-center",o),children:[i?(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:i}):null,(0,t.jsx)("h2",{className:"text-heading font-semibold text-foreground max-sm:text-heading-touch",children:e}),a?(0,t.jsx)("p",{className:"max-w-96 text-meta text-muted-foreground max-sm:text-body-touch",children:a}):null,r?(0,t.jsx)("div",{className:"mt-1 max-sm:w-full max-sm:[&>*]:w-full",children:r}):null]})}])},188393,e=>{"use strict";var t=e.i(843476),s=e.i(965324),a=e.i(219321);function i(e){return Array.from({length:e},(e,t)=>`row-${String(t)}`)}e.s(["LoadingSkeleton",0,function({variant:e,rows:r=4,label:n="Loading",className:o}){return(0,t.jsxs)("div",{role:"status","data-slot":"loading-skeleton","data-variant":e,className:(0,s.classNames)("w-full",o),children:[(0,t.jsx)("span",{className:"sr-only",children:n}),"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"}),i(r).map(e=>(0,t.jsxs)("div",{className:"flex h-(--size-row) items-center gap-8 border-b border-border px-4 last:border-0",children:[(0,t.jsx)(a.Skeleton,{className:"h-2.5 w-24"}),(0,t.jsx)(a.Skeleton,{className:"h-5 w-16"}),(0,t.jsx)(a.Skeleton,{className:"h-5 w-20"}),(0,t.jsx)(a.Skeleton,{className:"h-2.5 w-28"})]},e))]}):null,"cards"===e?(0,t.jsx)("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:i(4).map(e=>(0,t.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-4",children:[(0,t.jsx)(a.Skeleton,{className:"h-2.5 w-20"}),(0,t.jsx)(a.Skeleton,{className:"h-6 w-10"}),(0,t.jsx)(a.Skeleton,{className:"h-2.5 w-28"})]},e))}):null,"detail"===e?(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsx)(a.Skeleton,{className:"h-7 w-48"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(a.Skeleton,{className:"h-5 w-20"}),(0,t.jsx)(a.Skeleton,{className:"h-5 w-16"})]}),(0,t.jsx)(a.Skeleton,{className:"h-16 w-full rounded-lg"})]}):null,"list"===e?(0,t.jsx)("div",{className:"overflow-hidden rounded-lg border border-border bg-card",children:i(r).map(e=>(0,t.jsxs)("div",{className:"flex flex-col gap-2.5 border-b border-border px-3.5 py-3 last:border-0",children:[(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)(a.Skeleton,{className:"h-3 w-28"}),(0,t.jsx)(a.Skeleton,{className:"h-5 w-16"})]}),(0,t.jsx)(a.Skeleton,{className:"h-2.5 w-44"})]},e))}):null]})}])},577880,485538,e=>{"use strict";var t=e.i(843476),s=e.i(566595),a=e.i(374368),i=e.i(574296),r=e.i(298260),n=e.i(704974),o=e.i(965324);function l({switcher:e,account:d,onSearch:c,searchLabel:u="Search or jump to",children:m,actions:h,className:g}){return(0,t.jsxs)("header",{"data-slot":"app-header",className:(0,o.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",g),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)(a.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)(i.Button,{size:"sm",icon:(0,t.jsx)(s.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)(r.Kbd,{children:"⌘K"})]}):null,(0,t.jsx)(n.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:s}){let{label:a,dot:i}=m[e];return(0,t.jsxs)("span",{"data-slot":"live-status","data-state":e,"aria-live":"polite",className:(0,o.classNames)("inline-flex items-center gap-1.5 text-meta text-muted-foreground",s),children:[(0,t.jsx)("span",{"aria-hidden":!0,className:(0,o.classNames)("size-2 shrink-0 rounded-full",i)}),a]})}e.s(["Header",0,function({breadcrumb:e,parents:s=[],live:a,switcher:r,account:n,onCompose:o,onSearch:m}){return(0,t.jsxs)(l,{switcher:r,account:n,onSearch:m,searchLabel:"Search ships or jump to",className:"hidden sm:flex",actions:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h,{state:a}),o?(0,t.jsx)(i.Button,{size:"sm",icon:(0,t.jsx)(c.SquarePen,{"aria-hidden":!0}),"data-testid":"header-compose",onClick:o,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:[s.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 g=e.i(24071);e.s(["TopBar",0,function({title:e,live:r,actions:o,back:l,switcher:d,account:c,onSearch:m}){let p=m&&!l?m:void 0;return(0,t.jsxs)("header",{"data-slot":"top-bar","data-mode":l?"detail":"root",className:"sticky top-0 z-30 flex h-(--size-header) items-center gap-2.5 border-b border-border bg-background px-4 sm:hidden",children:[l?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(u.default,{href:l.href,className:"-ml-1.5 inline-flex h-(--size-control-touch) shrink-0 items-center gap-0.5 rounded-md pr-2 text-body-touch text-foreground focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon)",children:[(0,t.jsx)(g.ChevronLeft,{"aria-hidden":!0}),l.label]}),(0,t.jsx)("p",{className:"min-w-0 flex-1 truncate text-center text-body-touch font-semibold text-foreground",children:e})]}):d?(0,t.jsx)(a.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:r}),o||p||c&&!l?(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[p?(0,t.jsx)(i.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)(s.Search,{"aria-hidden":!0})}):null,o,c&&!l?(0,t.jsx)(n.AvatarMenuSheet,{...c}):null]}):null]})}],485538)},509892,e=>{"use strict";var t=e.i(843476),s=e.i(819759),a=e.i(574296),i=e.i(577880),r=e.i(485538);e.s(["ListPage",0,function({title:e,description:n,titleMeta:o,primaryAction:l,toolbar:d,live:c,onCompose:u,onSearch:m,switcher:h,account:g,banner:p,phoneTopBar:x,children:f}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.Header,{breadcrumb:e,live:c,switcher:h,account:g,onCompose:u,onSearch:m}),p,x??(0,t.jsx)(r.TopBar,{title:e,live:c,switcher:h,account:g,onSearch:m,actions:u?(0,t.jsx)(a.Button,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Compose","data-testid":"top-bar-compose",onClick:u,children:(0,t.jsx)(s.SquarePen,{"aria-hidden":!0})}):void 0}),(0,t.jsxs)("main",{className:"flex grow flex-col gap-5 px-8 py-6 max-sm:gap-3.5 max-sm:px-4 max-sm:pt-3.5 max-sm:pb-[calc(var(--size-tabbar)+var(--spacing)*4)]",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4 max-sm:gap-3",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-1",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-x-2.5 gap-y-1",children:[(0,t.jsx)("h1",{className:"text-title font-semibold tracking-tight text-foreground max-sm:text-title-touch",children:e}),o]}),n?(0,t.jsx)("p",{className:"text-meta text-muted-foreground max-sm:text-body-touch",children:n}):null]}),l?(0,t.jsx)("div",{className:"shrink-0 max-sm:w-full max-sm:[&>*]:w-full",children:l}):null]}),d,f]})]})}])},718423,e=>{"use strict";var t=e.i(912598),s=e.i(905861),a=e.i(271645),i=e.i(586413),r=e.i(123938),n=e.i(427702);let o=new Set(["FleetInitialised","ShipCommissioned","ShipClaimed","LeaseRevoked","CredentialRevoked","StartingPromptIssued","ShipRetired","DeliveryAcknowledged","DeliveryUndeliverable","ShipReported","CrewRequested","CrewRequestRemoved","CrewAssigned","CrewStatusChanged","CrewRequestExplained","CrewRequestGivenBack","LabelAssigned","LabelUnassigned","LabelRetired"]);function l(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,n.useTRPC)(),m=(0,t.useQueryClient)(),[h,g]=(0,a.useState)(new Set),p=(0,r.useIsReopening)(),[x]=(0,a.useState)(()=>{let t,s,a,r;return function(e){var t;let s,a,r,{trpc:n,queryClient:m,reload:h}=e,g=[...n.fleet.list.infiniteQueryKey()],p=()=>m.getQueriesData({queryKey:g}).flatMap(([,e])=>void 0===e?[]:[e]),x=(t={readRow:e=>m.query({...n.fleet.listedShip.queryOptions({shipId:e}),staleTime:0}),writeRow:t=>{let s=p().some(e=>!l(e,t.id));m.setQueriesData({queryKey:g},e=>e&&function(e,t){if(l(e,t.id))return{...e,pages:e.pages.map(e=>{var s;return{...e,items:(s=e.items,s.map(e=>e.id===t.id?t:e))}})};let[s,...a]=e.pages;return void 0===s?e:{...e,pages:[{...s,items:[t,...s.items]},...a]}}(e,t)),s&&e.onPlacedFirst(t.id)}},s=new Set,a=new Set,r=async e=>{s.add(e);try{do a.delete(e),t.writeRow(await t.readRow(e));while(a.has(e))}catch{}finally{s.delete(e),a.delete(e)}},e=>{s.has(e)?a.add(e):r(e)}),f=()=>{h(n.fleet.stuckCount.queryKey()),h(n.fleet.stuckSummary.queryKey()),h(n.fleet.stuck.pathKey())};return e=>{var t,s,a,r,l;if("resync"===e.kind){h(n.fleet.pathKey()),h(i.INBOX_KEY);return}let{event:m}=e;for(let e of new Set([m.shipId,m.actorShipId]))null!==e&&(h(n.fleet.ship.queryKey({shipId:e})),h(n.fleet.shipTimeline.infiniteQueryKey({shipId:e})),h(n.fleet.shipWay.queryKey({shipId:e})));if(null!==m.messageId&&(h(n.fleet.shipMessages.pathKey()),h(n.fleet.shipWay.pathKey()),h(n.fleet.message.queryKey({messageId:m.messageId})),h(n.fleet.inbox.pathKey()),h(n.fleet.inboxCount.queryKey()),h(i.INBOX_KEY),f()),"DeliveryAcknowledged"===m.type&&h(n.fleet.acknowledged.queryKey()),t=m.type,c.has(t)&&h(n.fleet.needsAttention.pathKey()),s=m.type,d.has(s)&&h(n.fleet.labels.queryKey()),"NetworkRulesDeclared"===m.type&&h(n.fleet.declaredNetworkRules.queryKey()),("BuiltInRuleChanged"===(a=m.type)||"NetworkRulesSet"===a)&&h(n.fleet.builtInRules.queryKey()),r=m.type,u.has(r)&&(h(n.fleet.networkRules.queryKey()),h(n.fleet.networkRulesDraftChanges.queryKey()),h(n.fleet.explainReach.pathKey())),l=m.type,o.has(l)){if(p().length>0)for(let e of new Set([m.shipId,m.actorShipId]))null!==e&&x(e);h(n.fleet.shipCounts.pathKey()),f()}}}({trpc:e,queryClient:m,reload:(t=new Set,s=new Set,a=e=>m.invalidateQueries({queryKey:e,exact:!0},{cancelRefetch:!1}),r=async e=>{t.add(e.queryHash);let i=e.isBehind;try{for(await a(e.queryKey);i||s.delete(e.queryHash);)i=!1,await a(e.queryKey)}finally{t.delete(e.queryHash)}},e=>{for(let a of m.getQueryCache().findAll({queryKey:e}))t.has(a.queryHash)?s.add(a.queryHash):r({queryHash:a.queryHash,queryKey:a.queryKey,isBehind:"fetching"===a.state.fetchStatus})}),onPlacedFirst:e=>{g(t=>new Set([...t,e]))}})}),f=(0,s.useSubscription)(e.fleet.events.subscriptionOptions({lastEventId:null},{onData:({data:e})=>{x(e)}}));return{live:"connecting"===f.status&&p?"live":function(e){switch(e){case"pending":return"live";case"connecting":return"reconnecting";case"idle":case"error":return"offline"}}(f.status),placedFirstShipIds:h,error:f.error}}])},928459,e=>{"use strict";var t=e.i(621482),s=e.i(954616),a=e.i(912598),i=e.i(731877),r=e.i(427702);function n(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 o="Acknowledged, then its turn died; handed once more, and that turn died too: not handled.";function l(){let e=(0,r.useTRPC)(),t=(0,a.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 n(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:`any ship of type ${t.type}`}(e)}. The original is dismissed.`}},"undeliverableReason",0,n,"useDismissDelivery",0,function(){let e=(0,r.useTRPC)(),t=l();return(0,s.useMutation)(e.fleet.dismiss.mutationOptions({onSuccess:t}))},"useNeedsAttention",0,function(e={}){let s=(0,r.useTRPC)();return(0,i.pagedListOf)((0,t.useInfiniteQuery)(s.fleet.needsAttention.infiniteQueryOptions({...e,limit:i.CONSOLE_PAGE_SIZE},{getNextPageParam:i.nextCursorOf})))},"useResendDelivery",0,function(){let e=(0,r.useTRPC)(),t=l();return(0,s.useMutation)(e.fleet.resend.mutationOptions({onSuccess:t}))}])},818310,351588,e=>{"use strict";function t(e){let t=/^github\.com\/([^/]+\/[^/]+)$/.exec(e);return t?.[1]===void 0?{label:e,isGitHub:!1}:{label:t[1],isGitHub:!0}}function s(e,t){let s=new Map;for(let{name:a,version:i}of e.filter(e=>e.repository===t))s.set(a,[...s.get(a)??[],i]);return[...s].map(([e,t])=>({name:e,versions:t.toSorted((e,t)=>e-t)})).toSorted((e,t)=>e.name.localeCompare(t.name))}e.s(["leftOutLabel",0,function(e){let{kind:t,name:s,version:a}=e;return"blueprint"===t?`blueprint ${s} v${String(a)}`:`${t} ${s}@${String(a)}`},"repositoryContents",0,function(e,t){return{templates:s(e.templates,t),blueprints:s(e.blueprints,t),leftOut:e.problems.filter(e=>e.repository===t)}},"repositoryLabel",0,t,"versionFileUrl",0,function(e){let{label:s,isGitHub:a}=t(e.repository);return a?`https://github.com/${s}/blob/${e.commit}/${encodeURI(e.file)}`:void 0}],818310);var a=e.i(843476),i=e.i(456420);let r={name:"folder-git-2",size:24,node:[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]};r.node;let n=(0,i.default)(r);function o(){return(0,a.jsx)("svg",{"aria-hidden":!0,viewBox:"0 0 16 16",fill:"currentColor",className:"size-(--size-icon-sm) shrink-0",children:(0,a.jsx)("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"})})}e.s(["RepositoryName",0,function({name:e,href:s}){let{label:i,isGitHub:r}=t(e),l=(0,a.jsxs)(a.Fragment,{children:[r?(0,a.jsx)(o,{}):(0,a.jsx)(n,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0 text-muted-foreground"}),(0,a.jsx)("span",{className:"truncate",children:i})]}),d="inline-flex min-w-0 items-center gap-1.5 font-medium";return void 0===s?(0,a.jsx)("span",{title:e,className:d,children:l}):(0,a.jsx)("a",{href:s,target:"_blank",rel:"noreferrer",title:e,className:`${d} hover:underline`,children:l})}],351588)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,395530,e=>{"use strict";var t=e.i(271645),s=e.i(828918),a=e.i(838452),i=e.i(673553);e.s(["useCompositeItem",0,function(e={}){let{highlightItemOnHover:r,highlightedIndex:n,onHighlightedIndexChange:o}=(0,a.useCompositeRootContext)(),{ref:l,index:d}=(0,i.useCompositeListItem)(e),c=n===d,u=t.useRef(null),m=(0,s.useMergedRefs)(l,u);return{compositeProps:{tabIndex:c?0:-1,onFocus(){o(d)},onMouseMove(){let e=u.current;if(!r||!e)return;let t=e.hasAttribute("disabled")||"true"===e.ariaDisabled;c||t||e.focus()}},compositeRef:m,index:d}}])},24071,e=>{"use strict";var t=e.i(456420);let s={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};s.node;let a=(0,t.default)(s);e.s(["ChevronLeft",0,a],24071)},867927,e=>{"use strict";var t=e.i(456420);let s={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};s.node;let a=(0,t.default)(s);e.s(["ChevronRight",0,a],867927)},275043,446513,e=>{"use strict";var t=e.i(456420);let s={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"]};s.node;let a=(0,t.default)(s);e.s(["default",0,a],275043);let i={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"}]]};i.node;let r=(0,t.default)(i);e.s(["Monitor",0,r],446513)},77071,e=>{"use strict";var t=e.i(456420);let s={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};s.node;let a=(0,t.default)(s);e.s(["Plus",0,a],77071)},566595,e=>{"use strict";var t=e.i(456420);let s={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};s.node;let a=(0,t.default)(s);e.s(["Search",0,a],566595)},819759,e=>{"use strict";var t=e.i(456420);let s={name:"square-pen",size:24,node:[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],aliases:["pen-box","edit","pen-square"]};s.node;let a=(0,t.default)(s);e.s(["SquarePen",0,a],819759)},466787,e=>{"use strict";var t=e.i(456420);let s={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"]};s.node;let a=(0,t.default)(s);e.s(["TriangleAlert",0,a],466787)},298260,e=>{"use strict";var t=e.i(843476),s=e.i(965324);e.s(["Kbd",0,function({className:e,...a}){return(0,t.jsx)("kbd",{"data-slot":"kbd",className:(0,s.classNames)("inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-xs border border-border bg-muted px-1.25 font-sans text-micro font-medium text-muted-foreground max-sm:hidden",e),...a})}])},638919,e=>{"use strict";var t=e.i(843476),s=e.i(353753),a=e.i(225913),i=e.i(560964),r=e.i(965324),n=e.i(574296);let o=(0,a.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)(s.Dialog.Root,{"data-slot":"sheet",...e})},"SheetBody",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"sheet-body",className:(0,r.classNames)("min-h-0 flex-1 overflow-y-auto in-data-[side=right]:p-6",e),...s})},"SheetClose",0,function(e){return(0,t.jsx)(s.Dialog.Close,{"data-slot":"sheet-close",...e})},"SheetContent",0,function({className:e,children:a,side:l="right",...d}){return(0,t.jsxs)(s.Dialog.Portal,{children:[(0,t.jsx)(s.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)(s.Dialog.Popup,{"data-slot":"sheet-content","data-side":l,className:(0,r.classNames)(o({side:l}),e),...d,children:["bottom"===l?(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)(s.Dialog.Close,{"data-slot":"sheet-close",render:(0,t.jsx)(n.Button,{variant:"ghost",size:"sm",isIconOnly:!0,className:"absolute top-4 right-4","aria-label":"Close"}),children:(0,t.jsx)(i.XIcon,{})}),a]})]})},"SheetDescription",0,function({className:e,...a}){return(0,t.jsx)(s.Dialog.Description,{"data-slot":"sheet-description",className:(0,r.classNames)("text-meta text-muted-foreground",e),...a})},"SheetFooter",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"sheet-footer",className:(0,r.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),...s})},"SheetHeader",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"sheet-header",className:(0,r.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),...s})},"SheetTitle",0,function({className:e,...a}){return(0,t.jsx)(s.Dialog.Title,{"data-slot":"sheet-title",className:(0,r.classNames)("text-heading font-semibold text-foreground in-data-[side=bottom]:py-2 in-data-[side=bottom]:text-section",e),...a})},"SheetTrigger",0,function(e){return(0,t.jsx)(s.Dialog.Trigger,{"data-slot":"sheet-trigger",...e})}])},889275,e=>{"use strict";var t=e.i(843476),s=e.i(188393),a=e.i(954616),i=e.i(266027),r=e.i(912598),n=e.i(427702),o=e.i(267760),l=e.i(285595),d=e.i(758925),c=e.i(653145),u=e.i(574296),m=e.i(212470),h=e.i(791727),g=e.i(817981);let p="text-meta text-destructive-text";function x({email:e,hasPassword:s,isSaving:a,isSaved:i,saveError:r,onSave:n}){let{register:f,handleSubmit:v,getValues:y,formState:{errors:j}}=(0,c.useForm)({defaultValues:{currentPassword:"",email:e??"",password:"",repeat:""}}),b=v(e=>{n(s?{email:e.email,password:e.password,currentPassword:e.currentPassword}:{email:e.email,password:e.password})});return(0,t.jsxs)("section",{"aria-labelledby":"settings-sign-in","data-testid":"settings-sign-in",className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-4",children:[(0,t.jsxs)("h2",{id:"settings-sign-in",className:"flex items-center gap-2 text-body font-semibold [&_svg]:size-(--size-icon) [&_svg]:text-muted-foreground",children:[(0,t.jsx)(d.KeyRound,{"aria-hidden":!0}),"Sign-in"]}),(0,t.jsx)("p",{className:"text-body text-muted-foreground","data-testid":"settings-sign-in-state",children:null===e?"argo has no email and password yet: you signed in with a link from npx aeolus-core sign-in. Set them to sign in with them instead.":"The email and password you sign in to this console with, as argo."}),(0,t.jsxs)("form",{noValidate:!0,"data-testid":"settings-sign-in-form",className:"flex max-w-sm flex-col gap-4",onSubmit:e=>{b(e)},children:[s?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(h.Label,{htmlFor:"settings-sign-in-current",children:"Current password"}),(0,t.jsx)(m.Input,{id:"settings-sign-in-current",type:"password",autoComplete:"current-password","aria-invalid":!!j.currentPassword||void 0,"aria-describedby":j.currentPassword?"settings-sign-in-current-error":void 0,...f("currentPassword",{validate:e=>""!==e||"Enter your current password"})}),j.currentPassword?(0,t.jsx)("span",{id:"settings-sign-in-current-error",className:p,children:j.currentPassword.message}):null]}):null,(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(h.Label,{htmlFor:"settings-sign-in-email",children:"Email"}),(0,t.jsx)(m.Input,{id:"settings-sign-in-email",type:"email",autoComplete:"username",placeholder:"you@example.com","aria-invalid":!!j.email||void 0,"aria-describedby":j.email?"settings-sign-in-email-error":void 0,...f("email",{validate:e=>(0,o.signInEmailProblem)(e)??!0})}),j.email?(0,t.jsx)("span",{id:"settings-sign-in-email-error",className:p,children:j.email.message}):null]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(h.Label,{htmlFor:"settings-sign-in-password",children:"New password"}),(0,t.jsx)(m.Input,{id:"settings-sign-in-password",type:"password",autoComplete:"new-password","aria-invalid":!!j.password||void 0,"aria-describedby":j.password?"settings-sign-in-password-error":void 0,...f("password",{validate:e=>(0,o.newOperatorPasswordProblem)(e)??!0})}),j.password?(0,t.jsx)("span",{id:"settings-sign-in-password-error",className:p,children:j.password.message}):null]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(h.Label,{htmlFor:"settings-sign-in-repeat",children:"Repeat the password"}),(0,t.jsx)(m.Input,{id:"settings-sign-in-repeat",type:"password",autoComplete:"new-password","aria-invalid":!!j.repeat||void 0,"aria-describedby":j.repeat?"settings-sign-in-repeat-error":void 0,...f("repeat",{validate:e=>e===y("password")||"The two passwords differ"})}),j.repeat?(0,t.jsx)("span",{id:"settings-sign-in-repeat-error",className:p,children:j.repeat.message}):null]}),(0,t.jsx)("div",{children:(0,t.jsx)(u.Button,{type:"submit",variant:"primary",isLoading:a,"data-testid":"settings-sign-in-save",children:a?"Saving…":"Save email and password"})}),void 0!==r&&(0,t.jsx)(g.InlineError,{variant:"section",title:"Couldn’t save the email and password",description:r}),i&&void 0===r&&!a?(0,t.jsxs)("p",{role:"status","data-testid":"settings-sign-in-saved",className:"flex items-center gap-1.5 text-meta text-tone-ok-fg [&_svg]:size-(--size-icon-sm)",children:[(0,t.jsx)(l.CircleCheck,{"aria-hidden":!0}),"Saved. Sign in with this email and password from now on."]}):null]})]})}function f(){let e,o,l,d,{email:c,...u}=(e=(0,n.useTRPC)(),o=(0,r.useQueryClient)(),l=(0,i.useQuery)(e.console.account.queryOptions()),d=(0,a.useMutation)(e.console.setLogin.mutationOptions({onSuccess:()=>o.invalidateQueries({queryKey:e.console.account.queryKey()})})),{email:l.data?.kind==="operator"?l.data.email:void 0,hasPassword:l.data?.kind==="operator"&&l.data.hasPassword,isSaving:d.isPending,isSaved:d.isSuccess,saveError:d.error?.message,onSave:e=>{d.mutate(e)}});return void 0===c?(0,t.jsx)(s.LoadingSkeleton,{variant:"detail",rows:3,label:"Loading the sign-in"}):(0,t.jsx)(x,{email:c,...u})}var v=e.i(456420);let y={name:"globe",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]};y.node;let j=(0,v.default)(y),b={name:"link-2",size:24,node:[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]};b.node;let w=(0,v.default)(b);function N({settings:e,loadError:a,onRetry:i,isConnecting:r,connectError:n,onConnect:o}){return void 0!==a?(0,t.jsx)(g.InlineError,{title:"Couldn’t read the gateway",description:a,onRetry:i}):void 0===e?(0,t.jsx)(s.LoadingSkeleton,{variant:"detail",rows:2,label:"Loading the gateway"}):"none"===e.state?null:(0,t.jsxs)("section",{"aria-labelledby":"settings-gateway","data-testid":"settings-gateway",className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-4",children:[(0,t.jsxs)("h2",{id:"settings-gateway",className:"flex items-center gap-2 text-body font-semibold [&_svg]:size-(--size-icon) [&_svg]:text-muted-foreground",children:[(0,t.jsx)(j,{"aria-hidden":!0}),"Gateway"]}),"connected"===e.state?(0,t.jsxs)("p",{className:"text-body","data-testid":"settings-gateway-state",children:["Connected as ",(0,t.jsx)("span",{className:"font-mono",children:e.ship?.name})," ",(0,t.jsxs)("span",{className:"font-mono text-muted-foreground",children:["(",e.ship?.shipId,")"]}),". It commissions an app ship for each outside party you approve."]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"text-body","data-testid":"settings-gateway-state",children:"Not connected. Connecting commissions the ship gateway, which reads the fleet and commissions an app ship for each outside party you approve, or gives it a new starting prompt, and hands its secret to the gateway. No one sees the secret."}),(0,t.jsx)("div",{children:(0,t.jsx)(u.Button,{variant:"primary",icon:(0,t.jsx)(w,{"aria-hidden":!0}),isLoading:r,onClick:o,"data-testid":"settings-gateway-connect",children:"Connect gateway"})}),void 0!==n&&(0,t.jsx)(g.InlineError,{variant:"field",title:"Couldn’t connect the gateway",description:n})]})]})}function S({settings:e,loadError:a,onRetry:i,isConnecting:r,connectError:n,onConnect:o}){return void 0!==a?(0,t.jsx)(g.InlineError,{title:"Couldn’t read squadrons",description:a,onRetry:i}):void 0===e?(0,t.jsx)(s.LoadingSkeleton,{variant:"detail",rows:2,label:"Loading squadrons"}):"none"===e.state?null:(0,t.jsxs)("section",{"aria-labelledby":"settings-squadrons","data-testid":"settings-squadrons",className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-4",children:[(0,t.jsx)("h2",{id:"settings-squadrons",className:"text-body font-semibold",children:"Squadrons"}),"connected"===e.state?(0,t.jsxs)("p",{className:"text-body","data-testid":"settings-squadrons-state",children:["Connected as ",(0,t.jsx)("span",{className:"font-mono",children:e.ship?.name})," ",(0,t.jsxs)("span",{className:"font-mono text-muted-foreground",children:["(",e.ship?.shipId,")"]})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"text-body","data-testid":"settings-squadrons-state",children:"Not connected. Connecting commissions the ship squadrons, with fleet read and manage, or gives it a new starting prompt, and hands its secret to squadrons. No one sees the secret."}),(0,t.jsx)("div",{children:(0,t.jsx)(u.Button,{variant:"primary",icon:(0,t.jsx)(w,{"aria-hidden":!0}),isLoading:r,onClick:o,"data-testid":"settings-squadrons-connect",children:"Connect squadrons"})}),void 0!==n&&(0,t.jsx)(g.InlineError,{variant:"field",title:"Couldn’t connect squadrons",description:n})]})]})}var k=e.i(422768),C=e.i(77071),R=e.i(825398),q=e.i(466787),D=e.i(271645),I=e.i(849635),z=e.i(818310),P=e.i(424010),L=e.i(746675),A=e.i(67874),E=e.i(351588);let T=".aeolus/squadrons";function K({isAdding:e,addError:s,onAdd:a}){let i=(0,D.useId)(),r=(0,D.useId)(),n=(0,D.useId)(),[o,l]=(0,D.useState)(""),[d,c]=(0,D.useState)(""),[p,x]=(0,D.useState)("");return(0,t.jsxs)("form",{noValidate:!0,"data-testid":"repositories-add",className:"flex flex-col gap-3 rounded-md border border-border p-3",onSubmit:e=>{e.preventDefault();let t=d.trim(),s=p.trim();a({url:o.trim(),...""===t?{}:{path:t},...""===s?{}:{token:s}},()=>{l(""),c(""),x("")})},children:[(0,t.jsxs)("div",{className:"grid gap-3 sm:grid-cols-[minmax(0,2fr)_minmax(0,1fr)]",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(h.Label,{htmlFor:i,children:"Repository URL"}),(0,t.jsx)(m.Input,{id:i,isMono:!0,autoComplete:"off",spellCheck:!1,placeholder:"https://github.com/acme/squadron-templates.git","data-testid":"repositories-url",value:o,onChange:e=>{l(e.target.value)}})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(h.Label,{htmlFor:r,children:"Path (optional)"}),(0,t.jsx)(m.Input,{id:r,isMono:!0,autoComplete:"off",spellCheck:!1,placeholder:T,"data-testid":"repositories-path",value:d,onChange:e=>{c(e.target.value)}})]})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(h.Label,{htmlFor:n,children:"Read token (optional, for a private repository)"}),(0,t.jsx)(m.Input,{id:n,type:"password",autoComplete:"new-password","data-testid":"repositories-token",value:p,onChange:e=>{x(e.target.value)}}),(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"Entered once and never shown again. To change it, remove the repository and add it again."})]}),void 0===s?null:(0,t.jsx)(g.InlineError,{title:"Couldn’t add the repository",description:`${s} The list shows what squadrons holds.`}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)(u.Button,{type:"submit",variant:"primary",icon:(0,t.jsx)(C.Plus,{"aria-hidden":!0}),isLoading:e,disabled:""===o.trim(),"data-testid":"repositories-add-submit",children:e?"Adding":"Add repository"})})]})}function B(e,t){return e.map(({name:e,versions:s})=>"template"===t?`${e}@${s.join(", ")}`:`${e} v${s.join(", v")}`).join(" · ")}function F({contents:e,path:s}){let{templates:a,blueprints:i,leftOut:r}=e;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("dl",{"data-testid":"repositories-found",className:"grid grid-cols-[auto_minmax(0,1fr)] gap-x-3 gap-y-0.5 text-meta",children:0===a.length&&0===i.length?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("dt",{className:"text-muted-foreground",children:"Found"}),(0,t.jsxs)("dd",{children:["No templates or blueprints under ",s]})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("dt",{className:"text-muted-foreground",children:"Templates"}),(0,t.jsx)("dd",{className:"font-mono",children:0===a.length?"None":B(a,"template")}),(0,t.jsx)("dt",{className:"text-muted-foreground",children:"Blueprints"}),(0,t.jsx)("dd",{className:"font-mono",children:0===i.length?"None":B(i,"blueprint")})]})}),0===r.length?null:(0,t.jsxs)("div",{"data-testid":"repositories-left-out",className:"flex flex-col gap-1.5 rounded-md border border-tone-attention-border bg-tone-attention-bg p-2.5 text-tone-attention-fg",children:[(0,t.jsxs)("p",{className:"flex items-center gap-1.5 text-meta font-medium",children:[(0,t.jsx)(q.TriangleAlert,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),"Left out: ",r.length,". Fix ",1===r.length?"it":"them"," in git, tag again, then refresh."]}),(0,t.jsx)("ul",{className:"flex flex-col gap-1",children:r.map(e=>(0,t.jsxs)("li",{"data-testid":"repositories-left-out-item",className:"text-meta text-foreground",children:[(0,t.jsx)("span",{className:"font-mono",children:(0,z.leftOutLabel)(e)}),": ",e.message]},`${e.kind} ${e.name}@${String(e.version)}`))})]})]})}function M({repository:e,contents:s,now:a,onRemove:i}){let{lastFetch:r}=e;return(0,t.jsxs)("li",{"data-testid":"repositories-row",className:"flex flex-col gap-1.5 px-3 py-2.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(E.RepositoryName,{name:e.name}),e.path===T?null:(0,t.jsx)("span",{className:"font-mono text-meta text-muted-foreground",children:e.path}),e.hasToken?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 text-meta text-muted-foreground",children:[(0,t.jsx)(d.KeyRound,{"aria-hidden":!0,className:"size-(--size-icon-sm)"}),"Token"]}):null,(0,t.jsx)("span",{className:"ml-auto text-meta text-muted-foreground","data-testid":"repositories-fetched",children:null===r?"Not fetched yet":`Fetched ${(0,I.relativeTime)(new Date(r.at),a)}`}),(0,t.jsx)(u.Button,{size:"xs",variant:"ghost","data-testid":"repositories-remove",onClick:i,children:"Remove"})]}),r?.error?(0,t.jsxs)("p",{"data-testid":"repositories-error",className:"flex items-start gap-1.5 text-meta text-destructive-text",children:[(0,t.jsx)(k.CircleAlert,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0"}),(0,t.jsxs)("span",{children:["The last fetch failed: ",(0,t.jsx)("span",{className:"font-mono",children:r.error})]})]}):null,void 0===s||null===r||null!==r.error&&s.templates.length+s.blueprints.length+s.leftOut.length===0?null:(0,t.jsx)(F,{contents:s,path:e.path})]})}function H(e){let{repositories:a,catalogue:i,state:r,error:n,onRetry:o,isRemoving:l,removeError:d,onRemove:c,onRemoveClosed:m,isRefreshing:h,refreshError:p,onRefresh:x,now:f}=e,[v,y]=(0,D.useState)(void 0);return(0,t.jsxs)("section",{"aria-labelledby":"settings-repositories","data-testid":"settings-repositories",className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("h2",{id:"settings-repositories",className:"text-body font-semibold",children:"Repositories"}),(0,t.jsx)(u.Button,{size:"xs",icon:(0,t.jsx)(R.RotateCw,{"aria-hidden":!0}),isLoading:h,disabled:0===a.length,onClick:x,"data-testid":"repositories-refresh",children:"Refresh"})]}),(0,t.jsxs)("p",{className:"text-meta text-muted-foreground",children:["squadrons reads templates and blueprints from these repositories, under ",T," unless a repository sets its own path. It fetches one when you add it, when you refresh, and once each time squadrons connects or starts."]}),void 0===p?null:(0,t.jsx)(g.InlineError,{variant:"section",title:"Couldn’t refresh",description:p}),"loading"===r?(0,t.jsx)(s.LoadingSkeleton,{variant:"list",rows:2,label:"Loading the repositories"}):"error"===r?(0,t.jsx)(g.InlineError,{title:"Couldn’t read the repositories",description:n,onRetry:o}):0===a.length?(0,t.jsx)(A.EmptyState,{variant:"section",title:"No repositories yet",description:"Add one to read its templates and blueprints."}):(0,t.jsx)("ul",{className:"divide-y divide-border overflow-hidden rounded-md border border-border",children:a.map(e=>(0,t.jsx)(M,{repository:e,...void 0===i?{}:{contents:(0,z.repositoryContents)(i,e.name)},now:f,onRemove:()=>{y(e.name)}},e.name))}),(0,t.jsx)(K,{isAdding:e.isAdding,addError:e.addError,onAdd:e.onAdd}),(0,t.jsx)(P.AlertDialog,{open:void 0!==v,onOpenChange:e=>{e||l||(y(void 0),m())},children:(0,t.jsxs)(P.AlertDialogContent,{"data-testid":"repositories-remove-dialog",className:L.dialogSurface.phoneSheet,children:[(0,t.jsxs)(P.AlertDialogHeader,{children:[(0,t.jsxs)(P.AlertDialogTitle,{children:["Remove ",v,"?"]}),(0,t.jsx)(P.AlertDialogDescription,{children:"Its templates and blueprints leave the catalogue at once. Squadrons formed from them keep the versions they formed from."})]}),void 0===d?null:(0,t.jsx)(g.InlineError,{title:"Couldn’t remove the repository",description:`${d} The list shows what squadrons holds.`}),(0,t.jsxs)(P.AlertDialogFooter,{children:[(0,t.jsx)(P.AlertDialogClose,{render:(0,t.jsx)(u.Button,{disabled:l}),children:"Cancel"}),(0,t.jsx)(u.Button,{variant:"destructive",isLoading:l,"data-testid":"repositories-remove-confirm",onClick:()=>{void 0!==v&&c(v,()=>{y(void 0),m()})},children:"Remove repository"})]})]})})]})}var O=e.i(586875),$=e.i(522016);function _({settings:e,loadError:a,onRetry:i,isConnecting:r,connectError:n,onConnect:o}){return void 0!==a?(0,t.jsx)(g.InlineError,{title:"Couldn’t read the trierarch plugin",description:a,onRetry:i}):void 0===e?(0,t.jsx)(s.LoadingSkeleton,{variant:"detail",rows:2,label:"Loading the trierarch plugin"}):(0,t.jsxs)("section",{"aria-labelledby":"settings-trierarchs","data-testid":"settings-trierarchs",className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-4",children:[(0,t.jsxs)("h2",{id:"settings-trierarchs",className:"flex items-center gap-2 text-body font-semibold [&_svg]:size-(--size-icon) [&_svg]:text-muted-foreground",children:[(0,t.jsx)(O.ShipWheel,{"aria-hidden":!0}),"Trierarchs"]}),"none"===e.state?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"text-body","data-testid":"settings-trierarchs-state",children:["Not set up. ","Starts, restarts and stops sessions for crew requests on your machines. Without it, crew requests wait on Needs crew for you to crew by hand."]}),(0,t.jsx)("div",{children:(0,t.jsx)(u.Button,{size:"sm",nativeButton:!1,render:(0,t.jsx)($.default,{href:"/trierarchs"}),"data-testid":"settings-trierarchs-how",children:"How to set it up"})})]}):"connected"===e.state?(0,t.jsxs)("p",{className:"text-body","data-testid":"settings-trierarchs-state",children:["Connected as ",(0,t.jsx)("span",{className:"font-mono",children:e.ship?.name})," ",(0,t.jsxs)("span",{className:"font-mono text-muted-foreground",children:["(",e.ship?.shipId,")"]})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"text-body","data-testid":"settings-trierarchs-state",children:"Not connected. Connecting commissions the ship trierarch-plugin, which reads and manages the fleet and assigns crew requests, or gives it a new starting prompt, and hands its secret to the trierarch plugin. No one sees the secret."}),(0,t.jsx)("div",{children:(0,t.jsx)(u.Button,{variant:"primary",icon:(0,t.jsx)(w,{"aria-hidden":!0}),isLoading:r,onClick:o,"data-testid":"settings-trierarchs-connect",children:"Connect trierarch plugin"})}),void 0!==n&&(0,t.jsx)(g.InlineError,{variant:"field",title:"Couldn’t connect the trierarch plugin",description:n})]})]})}var Q=e.i(509892),U=e.i(787964),G=e.i(750980),V=e.i(928459),W=e.i(296676),X=e.i(473837),Y=e.i(678485),Z=e.i(718423),J=e.i(686165),ee=e.i(448695),et=e.i(303979),es=e.i(500265);e.s(["default",0,function(){let e=(0,W.useNow)(),s=(0,U.useConsoleFrame)(),a=(0,J.useHasSquadrons)(),i=(0,V.useNeedsAttention)(),r=(0,J.useSquadronsSettings)(),n=(0,J.useConnectSquadrons)(),o=(0,es.useTrierarchPluginSettings)(),l=(0,es.useConnectTrierarchPlugin)(),d=(0,G.useGatewaySettings)(),c=(0,G.useConnectGateway)(),u=(0,Z.useLiveFleet)(),m=(0,J.useSquadronsConnection)(),h=(0,ee.useRepositories)(),g=(0,ee.useCatalogue)(),p=(0,ee.useAddRepository)(),x=(0,ee.useRemoveRepository)(),v=(0,ee.useRefreshCatalogue)(),y=(0,et.usePluginNav)(),j=(0,X.useHasOwnSignIn)();return(0,Y.useSignInWhenSessionEnds)([i.error,u.error]),(0,t.jsxs)(Q.ListPage,{...s,title:"Settings",description:"How this installation runs. Only argo, the operator, sees this page.",live:u.live,children:[j&&(0,t.jsx)(f,{}),a&&(0,t.jsx)(S,{settings:r.data,loadError:r.isError?r.error.message:void 0,onRetry:()=>{r.refetch()},isConnecting:n.isPending,connectError:n.isError?n.error.message:void 0,onConnect:()=>{n.mutate()}}),y.hasSettings&&(0,t.jsx)(_,{settings:o.data,loadError:o.isError?o.error.message:void 0,onRetry:()=>{o.refetch()},isConnecting:l.isPending,connectError:l.isError?l.error.message:void 0,onConnect:()=>{l.mutate()}}),y.hasSettings&&(0,t.jsx)(N,{settings:d.data,loadError:d.isError?d.error.message:void 0,onRetry:()=>{d.refetch()},isConnecting:c.isPending,connectError:c.isError?c.error.message:void 0,onConnect:()=>{c.mutate()}}),"connected"===m&&(0,t.jsx)(H,{repositories:h.data??[],...void 0===g.data?{}:{catalogue:g.data},state:h.isError?"error":h.data?"ready":"loading",error:h.error?.message,onRetry:()=>{h.refetch()},isAdding:p.isPending,addError:p.error?.message,onAdd:(e,t)=>{p.mutate(e,{onSuccess:t})},isRemoving:x.isPending,removeError:x.error?.message,onRemove:(e,t)=>{x.mutate(e,{onSuccess:t})},onRemoveClosed:()=>{x.reset()},isRefreshing:v.isPending,refreshError:v.error?.message,onRefresh:()=>{v.mutate()},now:e})]})}],889275)},424010,e=>{"use strict";var t=e.i(843476);e.s([],558762),e.i(558762);var s=e.i(366250),a=e.i(402820),i=e.i(156736),r=e.i(209793),n=e.i(784324),o=e.i(264951),l=e.i(77173);let d=e.i(313488).DialogTrigger;var c=e.i(974217),u=e.i(325326);class m extends u.DialogHandle{}e.s(["Backdrop",()=>a.DialogBackdrop,"Close",()=>i.DialogClose,"Description",()=>r.DialogDescription,"Handle",0,m,"Popup",()=>n.DialogPopup,"Portal",()=>o.DialogPortal,"Root",0,function(e){return(0,s.useRenderDialogRoot)("alert-dialog",e)},"Title",()=>l.DialogTitle,"Trigger",0,d,"Viewport",()=>c.DialogViewport,"createHandle",0,function(){return new m}],734604);var h=e.i(734604),h=h,g=e.i(965324),p=e.i(746675);e.s(["AlertDialog",0,function(e){return(0,t.jsx)(h.Root,{"data-slot":"alert-dialog",...e})},"AlertDialogClose",0,function(e){return(0,t.jsx)(h.Close,{"data-slot":"alert-dialog-close",...e})},"AlertDialogContent",0,function({className:e,size:s,children:a,...i}){return(0,t.jsxs)(h.Portal,{children:[(0,t.jsx)(h.Backdrop,{"data-slot":"alert-dialog-overlay",className:p.dialogSurface.overlay}),(0,t.jsx)(h.Popup,{"data-slot":"alert-dialog-content",className:(0,g.classNames)(p.dialogSurface.popup({size:s}),e),...i,children:a})]})},"AlertDialogDescription",0,function({className:e,...s}){return(0,t.jsx)(h.Description,{"data-slot":"alert-dialog-description",className:(0,g.classNames)(p.dialogSurface.description,e),...s})},"AlertDialogFooter",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,g.classNames)(p.dialogSurface.footer,e),...s})},"AlertDialogHeader",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,g.classNames)(p.dialogSurface.header,e),...s})},"AlertDialogTitle",0,function({className:e,...s}){return(0,t.jsx)(h.Title,{"data-slot":"alert-dialog-title",className:(0,g.classNames)(p.dialogSurface.title,e),...s})}],424010)},791727,e=>{"use strict";var t=e.i(843476),s=e.i(965324);e.s(["Label",0,function({className:e,htmlFor:a,...i}){return(0,t.jsx)("label",{"data-slot":"label",htmlFor:a,className:(0,s.classNames)("text-body font-medium text-foreground select-none",e),...i})}])},219321,e=>{"use strict";var t=e.i(843476),s=e.i(965324);e.s(["Skeleton",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"skeleton","aria-hidden":!0,className:(0,s.classNames)("animate-pulse rounded-sm bg-secondary [animation-duration:var(--duration-pulse)] motion-reduce:animate-none",e),...a})}])},67874,e=>{"use strict";var t=e.i(843476),s=e.i(965324);e.s(["EmptyState",0,function({title:e,description:a,icon:i,action:r,variant:n="page",className:o}){return"section"===n?(0,t.jsxs)("p",{"data-slot":"empty-state","data-variant":n,className:(0,s.classNames)("rounded-lg border border-border px-4 py-3 text-center text-meta text-muted-foreground",o),children:[e,a?(0,t.jsxs)(t.Fragment,{children:[" ",a]}):null]}):"no-results"===n?(0,t.jsxs)("div",{"data-slot":"empty-state","data-variant":n,className:(0,s.classNames)("flex flex-col items-center gap-2.5 rounded-lg border border-border bg-card px-4 py-6 text-center",o),children:[(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:e}),r]}):(0,t.jsxs)("div",{"data-slot":"empty-state","data-variant":n,className:(0,s.classNames)("flex flex-col items-center gap-3 rounded-lg border border-dashed border-border bg-card px-6 py-10 text-center",o),children:[i?(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:i}):null,(0,t.jsx)("h2",{className:"text-heading font-semibold text-foreground max-sm:text-heading-touch",children:e}),a?(0,t.jsx)("p",{className:"max-w-96 text-meta text-muted-foreground max-sm:text-body-touch",children:a}):null,r?(0,t.jsx)("div",{className:"mt-1 max-sm:w-full max-sm:[&>*]:w-full",children:r}):null]})}])},188393,e=>{"use strict";var t=e.i(843476),s=e.i(965324),a=e.i(219321);function i(e){return Array.from({length:e},(e,t)=>`row-${String(t)}`)}e.s(["LoadingSkeleton",0,function({variant:e,rows:r=4,label:n="Loading",className:o}){return(0,t.jsxs)("div",{role:"status","data-slot":"loading-skeleton","data-variant":e,className:(0,s.classNames)("w-full",o),children:[(0,t.jsx)("span",{className:"sr-only",children:n}),"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"}),i(r).map(e=>(0,t.jsxs)("div",{className:"flex h-(--size-row) items-center gap-8 border-b border-border px-4 last:border-0",children:[(0,t.jsx)(a.Skeleton,{className:"h-2.5 w-24"}),(0,t.jsx)(a.Skeleton,{className:"h-5 w-16"}),(0,t.jsx)(a.Skeleton,{className:"h-5 w-20"}),(0,t.jsx)(a.Skeleton,{className:"h-2.5 w-28"})]},e))]}):null,"cards"===e?(0,t.jsx)("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:i(4).map(e=>(0,t.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-4",children:[(0,t.jsx)(a.Skeleton,{className:"h-2.5 w-20"}),(0,t.jsx)(a.Skeleton,{className:"h-6 w-10"}),(0,t.jsx)(a.Skeleton,{className:"h-2.5 w-28"})]},e))}):null,"detail"===e?(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsx)(a.Skeleton,{className:"h-7 w-48"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(a.Skeleton,{className:"h-5 w-20"}),(0,t.jsx)(a.Skeleton,{className:"h-5 w-16"})]}),(0,t.jsx)(a.Skeleton,{className:"h-16 w-full rounded-lg"})]}):null,"list"===e?(0,t.jsx)("div",{className:"overflow-hidden rounded-lg border border-border bg-card",children:i(r).map(e=>(0,t.jsxs)("div",{className:"flex flex-col gap-2.5 border-b border-border px-3.5 py-3 last:border-0",children:[(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)(a.Skeleton,{className:"h-3 w-28"}),(0,t.jsx)(a.Skeleton,{className:"h-5 w-16"})]}),(0,t.jsx)(a.Skeleton,{className:"h-2.5 w-44"})]},e))}):null]})}])},577880,485538,e=>{"use strict";var t=e.i(843476),s=e.i(566595),a=e.i(374368),i=e.i(574296),r=e.i(298260),n=e.i(704974),o=e.i(965324);function l({switcher:e,account:d,onSearch:c,searchLabel:u="Search or jump to",children:m,actions:h,className:g}){return(0,t.jsxs)("header",{"data-slot":"app-header",className:(0,o.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",g),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)(a.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)(i.Button,{size:"sm",icon:(0,t.jsx)(s.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)(r.Kbd,{children:"⌘K"})]}):null,(0,t.jsx)(n.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:s}){let{label:a,dot:i}=m[e];return(0,t.jsxs)("span",{"data-slot":"live-status","data-state":e,"aria-live":"polite",className:(0,o.classNames)("inline-flex items-center gap-1.5 text-meta text-muted-foreground",s),children:[(0,t.jsx)("span",{"aria-hidden":!0,className:(0,o.classNames)("size-2 shrink-0 rounded-full",i)}),a]})}e.s(["Header",0,function({breadcrumb:e,parents:s=[],live:a,switcher:r,account:n,onCompose:o,onSearch:m}){return(0,t.jsxs)(l,{switcher:r,account:n,onSearch:m,searchLabel:"Search ships or jump to",className:"hidden sm:flex",actions:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h,{state:a}),o?(0,t.jsx)(i.Button,{size:"sm",icon:(0,t.jsx)(c.SquarePen,{"aria-hidden":!0}),"data-testid":"header-compose",onClick:o,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:[s.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 g=e.i(24071);e.s(["TopBar",0,function({title:e,live:r,actions:o,back:l,switcher:d,account:c,onSearch:m}){let p=m&&!l?m:void 0;return(0,t.jsxs)("header",{"data-slot":"top-bar","data-mode":l?"detail":"root",className:"sticky top-0 z-30 flex h-(--size-header) items-center gap-2.5 border-b border-border bg-background px-4 sm:hidden",children:[l?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(u.default,{href:l.href,className:"-ml-1.5 inline-flex h-(--size-control-touch) shrink-0 items-center gap-0.5 rounded-md pr-2 text-body-touch text-foreground focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon)",children:[(0,t.jsx)(g.ChevronLeft,{"aria-hidden":!0}),l.label]}),(0,t.jsx)("p",{className:"min-w-0 flex-1 truncate text-center text-body-touch font-semibold text-foreground",children:e})]}):d?(0,t.jsx)(a.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:r}),o||p||c&&!l?(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[p?(0,t.jsx)(i.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)(s.Search,{"aria-hidden":!0})}):null,o,c&&!l?(0,t.jsx)(n.AvatarMenuSheet,{...c}):null]}):null]})}],485538)},509892,e=>{"use strict";var t=e.i(843476),s=e.i(819759),a=e.i(574296),i=e.i(577880),r=e.i(485538);e.s(["ListPage",0,function({title:e,description:n,titleMeta:o,primaryAction:l,toolbar:d,live:c,onCompose:u,onSearch:m,switcher:h,account:g,banner:p,phoneTopBar:x,children:f}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.Header,{breadcrumb:e,live:c,switcher:h,account:g,onCompose:u,onSearch:m}),p,x??(0,t.jsx)(r.TopBar,{title:e,live:c,switcher:h,account:g,onSearch:m,actions:u?(0,t.jsx)(a.Button,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Compose","data-testid":"top-bar-compose",onClick:u,children:(0,t.jsx)(s.SquarePen,{"aria-hidden":!0})}):void 0}),(0,t.jsxs)("main",{className:"flex grow flex-col gap-5 px-8 py-6 max-sm:gap-3.5 max-sm:px-4 max-sm:pt-3.5 max-sm:pb-[calc(var(--size-tabbar)+var(--spacing)*4)]",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4 max-sm:gap-3",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-1",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-x-2.5 gap-y-1",children:[(0,t.jsx)("h1",{className:"text-title font-semibold tracking-tight text-foreground max-sm:text-title-touch",children:e}),o]}),n?(0,t.jsx)("p",{className:"text-meta text-muted-foreground max-sm:text-body-touch",children:n}):null]}),l?(0,t.jsx)("div",{className:"shrink-0 max-sm:w-full max-sm:[&>*]:w-full",children:l}):null]}),d,f]})]})}])},718423,e=>{"use strict";var t=e.i(912598),s=e.i(905861),a=e.i(271645),i=e.i(586413),r=e.i(123938),n=e.i(427702);let o=new Set(["FleetInitialised","ShipCommissioned","ShipClaimed","LeaseRevoked","CredentialRevoked","StartingPromptIssued","ShipRetired","DeliveryAcknowledged","DeliveryUndeliverable","ShipReported","CrewRequested","CrewRequestRemoved","CrewAssigned","CrewStatusChanged","CrewRequestExplained","CrewRequestGivenBack","LabelAssigned","LabelUnassigned","LabelRetired"]);function l(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,n.useTRPC)(),m=(0,t.useQueryClient)(),[h,g]=(0,a.useState)(new Set),p=(0,r.useIsReopening)(),[x]=(0,a.useState)(()=>{let t,s,a,r;return function(e){var t;let s,a,r,{trpc:n,queryClient:m,reload:h}=e,g=[...n.fleet.list.infiniteQueryKey()],p=()=>m.getQueriesData({queryKey:g}).flatMap(([,e])=>void 0===e?[]:[e]),x=(t={readRow:e=>m.query({...n.fleet.listedShip.queryOptions({shipId:e}),staleTime:0}),writeRow:t=>{let s=p().some(e=>!l(e,t.id));m.setQueriesData({queryKey:g},e=>e&&function(e,t){if(l(e,t.id))return{...e,pages:e.pages.map(e=>{var s;return{...e,items:(s=e.items,s.map(e=>e.id===t.id?t:e))}})};let[s,...a]=e.pages;return void 0===s?e:{...e,pages:[{...s,items:[t,...s.items]},...a]}}(e,t)),s&&e.onPlacedFirst(t.id)}},s=new Set,a=new Set,r=async e=>{s.add(e);try{do a.delete(e),t.writeRow(await t.readRow(e));while(a.has(e))}catch{}finally{s.delete(e),a.delete(e)}},e=>{s.has(e)?a.add(e):r(e)}),f=()=>{h(n.fleet.stuckCount.queryKey()),h(n.fleet.stuckSummary.queryKey()),h(n.fleet.stuck.pathKey())};return e=>{var t,s,a,r,l;if("resync"===e.kind){h(n.fleet.pathKey()),h(i.INBOX_KEY);return}let{event:m}=e;for(let e of new Set([m.shipId,m.actorShipId]))null!==e&&(h(n.fleet.ship.queryKey({shipId:e})),h(n.fleet.shipTimeline.infiniteQueryKey({shipId:e})),h(n.fleet.shipWay.queryKey({shipId:e})));if(null!==m.messageId&&(h(n.fleet.shipMessages.pathKey()),h(n.fleet.shipWay.pathKey()),h(n.fleet.message.queryKey({messageId:m.messageId})),h(n.fleet.inbox.pathKey()),h(n.fleet.inboxCount.queryKey()),h(i.INBOX_KEY),f()),"DeliveryAcknowledged"===m.type&&h(n.fleet.acknowledged.queryKey()),t=m.type,c.has(t)&&h(n.fleet.needsAttention.pathKey()),s=m.type,d.has(s)&&h(n.fleet.labels.queryKey()),"NetworkRulesDeclared"===m.type&&h(n.fleet.declaredNetworkRules.queryKey()),("BuiltInRuleChanged"===(a=m.type)||"NetworkRulesSet"===a)&&h(n.fleet.builtInRules.queryKey()),r=m.type,u.has(r)&&(h(n.fleet.networkRules.queryKey()),h(n.fleet.networkRulesDraftChanges.queryKey()),h(n.fleet.explainReach.pathKey())),l=m.type,o.has(l)){if(p().length>0)for(let e of new Set([m.shipId,m.actorShipId]))null!==e&&x(e);h(n.fleet.shipCounts.pathKey()),f()}}}({trpc:e,queryClient:m,reload:(t=new Set,s=new Set,a=e=>m.invalidateQueries({queryKey:e,exact:!0},{cancelRefetch:!1}),r=async e=>{t.add(e.queryHash);let i=e.isBehind;try{for(await a(e.queryKey);i||s.delete(e.queryHash);)i=!1,await a(e.queryKey)}finally{t.delete(e.queryHash)}},e=>{for(let a of m.getQueryCache().findAll({queryKey:e}))t.has(a.queryHash)?s.add(a.queryHash):r({queryHash:a.queryHash,queryKey:a.queryKey,isBehind:"fetching"===a.state.fetchStatus})}),onPlacedFirst:e=>{g(t=>new Set([...t,e]))}})}),f=(0,s.useSubscription)(e.fleet.events.subscriptionOptions({lastEventId:null},{onData:({data:e})=>{x(e)}}));return{live:"connecting"===f.status&&p?"live":function(e){switch(e){case"pending":return"live";case"connecting":return"reconnecting";case"idle":case"error":return"offline"}}(f.status),placedFirstShipIds:h,error:f.error}}])},928459,415168,e=>{"use strict";var t=e.i(621482),s=e.i(954616),a=e.i(912598),i=e.i(731877),r=e.i(427702);function n(e){switch(e.kind){case"type":return`any ship of type ${e.type}`;case"meeting":return`every other participant of meeting ${e.meetingId}`}}function o(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,n],415168);let l="Acknowledged, then its turn died; handed once more, and that turn died too: not handled.";function d(){let e=(0,r.useTRPC)(),t=(0,a.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 o(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:n(t)}(e)}. The original is dismissed.`}},"undeliverableReason",0,o,"useDismissDelivery",0,function(){let e=(0,r.useTRPC)(),t=d();return(0,s.useMutation)(e.fleet.dismiss.mutationOptions({onSuccess:t}))},"useNeedsAttention",0,function(e={}){let s=(0,r.useTRPC)();return(0,i.pagedListOf)((0,t.useInfiniteQuery)(s.fleet.needsAttention.infiniteQueryOptions({...e,limit:i.CONSOLE_PAGE_SIZE},{getNextPageParam:i.nextCursorOf})))},"useResendDelivery",0,function(){let e=(0,r.useTRPC)(),t=d();return(0,s.useMutation)(e.fleet.resend.mutationOptions({onSuccess:t}))}],928459)},818310,351588,e=>{"use strict";function t(e){let t=/^github\.com\/([^/]+\/[^/]+)$/.exec(e);return t?.[1]===void 0?{label:e,isGitHub:!1}:{label:t[1],isGitHub:!0}}function s(e,t){let s=new Map;for(let{name:a,version:i}of e.filter(e=>e.repository===t))s.set(a,[...s.get(a)??[],i]);return[...s].map(([e,t])=>({name:e,versions:t.toSorted((e,t)=>e-t)})).toSorted((e,t)=>e.name.localeCompare(t.name))}e.s(["leftOutLabel",0,function(e){let{kind:t,name:s,version:a}=e;return"blueprint"===t?`blueprint ${s} v${String(a)}`:`${t} ${s}@${String(a)}`},"repositoryContents",0,function(e,t){return{templates:s(e.templates,t),blueprints:s(e.blueprints,t),leftOut:e.problems.filter(e=>e.repository===t)}},"repositoryLabel",0,t,"versionFileUrl",0,function(e){let{label:s,isGitHub:a}=t(e.repository);return a?`https://github.com/${s}/blob/${e.commit}/${encodeURI(e.file)}`:void 0}],818310);var a=e.i(843476),i=e.i(456420);let r={name:"folder-git-2",size:24,node:[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]};r.node;let n=(0,i.default)(r);function o(){return(0,a.jsx)("svg",{"aria-hidden":!0,viewBox:"0 0 16 16",fill:"currentColor",className:"size-(--size-icon-sm) shrink-0",children:(0,a.jsx)("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"})})}e.s(["RepositoryName",0,function({name:e,href:s}){let{label:i,isGitHub:r}=t(e),l=(0,a.jsxs)(a.Fragment,{children:[r?(0,a.jsx)(o,{}):(0,a.jsx)(n,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0 text-muted-foreground"}),(0,a.jsx)("span",{className:"truncate",children:i})]}),d="inline-flex min-w-0 items-center gap-1.5 font-medium";return void 0===s?(0,a.jsx)("span",{title:e,className:d,children:l}):(0,a.jsx)("a",{href:s,target:"_blank",rel:"noreferrer",title:e,className:`${d} hover:underline`,children:l})}],351588)}]);
|