@aeolus-fleet/console 0.20.0 → 0.20.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +3 -3
  3. package/.next/fallback-build-manifest.json +3 -3
  4. package/.next/prerender-manifest.json +3 -3
  5. package/.next/server/app/_global-error.html +1 -1
  6. package/.next/server/app/_global-error.rsc +1 -1
  7. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  8. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  9. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  10. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  11. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  12. package/.next/server/app/api/squadrons/[procedure]/route.js.nft.json +1 -1
  13. package/.next/server/app/inbox/page.js.nft.json +1 -1
  14. package/.next/server/app/inbox/page_client-reference-manifest.js +1 -1
  15. package/.next/server/app/labels/page.js.nft.json +1 -1
  16. package/.next/server/app/labels/page_client-reference-manifest.js +1 -1
  17. package/.next/server/app/needs-attention/page.js.nft.json +1 -1
  18. package/.next/server/app/needs-attention/page_client-reference-manifest.js +1 -1
  19. package/.next/server/app/needs-crew/page.js.nft.json +1 -1
  20. package/.next/server/app/needs-crew/page_client-reference-manifest.js +1 -1
  21. package/.next/server/app/page.js.nft.json +1 -1
  22. package/.next/server/app/page_client-reference-manifest.js +1 -1
  23. package/.next/server/app/settings/page.js.nft.json +1 -1
  24. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  25. package/.next/server/app/ships/[shipId]/page.js.nft.json +1 -1
  26. package/.next/server/app/ships/[shipId]/page_client-reference-manifest.js +1 -1
  27. package/.next/server/app/sign-in/failed/page.js.nft.json +1 -1
  28. package/.next/server/app/sign-in/failed/page_client-reference-manifest.js +1 -1
  29. package/.next/server/app/sign-in/page.js.nft.json +1 -1
  30. package/.next/server/app/sign-in/page_client-reference-manifest.js +1 -1
  31. package/.next/server/app/squadrons/[squadronId]/page.js.nft.json +1 -1
  32. package/.next/server/app/squadrons/[squadronId]/page_client-reference-manifest.js +1 -1
  33. package/.next/server/app/squadrons/blueprints/[name]/page.js.nft.json +1 -1
  34. package/.next/server/app/squadrons/blueprints/[name]/page_client-reference-manifest.js +1 -1
  35. package/.next/server/app/squadrons/connection/route.js.nft.json +1 -1
  36. package/.next/server/app/squadrons/page.js.nft.json +1 -1
  37. package/.next/server/app/squadrons/page_client-reference-manifest.js +1 -1
  38. package/.next/server/app/squadrons/templates/[name]/page.js.nft.json +1 -1
  39. package/.next/server/app/squadrons/templates/[name]/page_client-reference-manifest.js +1 -1
  40. package/.next/server/app/trierarch-plugin/connection/route.js.nft.json +1 -1
  41. package/.next/server/app/trierarchs/[shipId]/page.js.nft.json +1 -1
  42. package/.next/server/app/trierarchs/[shipId]/page_client-reference-manifest.js +1 -1
  43. package/.next/server/app/trierarchs/page.js.nft.json +1 -1
  44. package/.next/server/app/trierarchs/page_client-reference-manifest.js +1 -1
  45. package/.next/server/app/version/route.js.nft.json +1 -1
  46. package/.next/server/chunks/[root-of-the-server]__1f_8ohl._.js +1 -1
  47. package/.next/server/chunks/_0h366h9._.js +1 -1
  48. package/.next/server/chunks/packages_console_lib_connect-plugin_ts_197hf-1._.js +1 -1
  49. package/.next/server/chunks/ssr/_0dogq79._.js +1 -1
  50. package/.next/server/chunks/ssr/_0rvujxo._.js +1 -1
  51. package/.next/server/chunks/ssr/_0s2b6hb._.js +1 -1
  52. package/.next/server/chunks/ssr/_0sko-kt._.js +1 -1
  53. package/.next/server/chunks/ssr/{_1bqclkf._.js → _0sv2xqb._.js} +2 -2
  54. package/.next/server/chunks/ssr/_0wr_wnm._.js +3 -0
  55. package/.next/server/chunks/ssr/_0wtj0e-._.js +1 -1
  56. package/.next/server/chunks/ssr/{_0n4kirm._.js → _0xc3etp._.js} +2 -2
  57. package/.next/server/chunks/ssr/_0xvm1ng._.js +1 -1
  58. package/.next/server/chunks/ssr/_0ziovn_._.js +1 -1
  59. package/.next/server/chunks/ssr/_11cgy8n._.js +3 -0
  60. package/.next/server/chunks/ssr/_1442xyx._.js +1 -1
  61. package/.next/server/chunks/ssr/_14rijy-._.js +3 -0
  62. package/.next/server/chunks/ssr/{_08f4mzr._.js → _17u4fan._.js} +2 -2
  63. package/.next/server/chunks/ssr/_181kpys._.js +1 -1
  64. package/.next/server/chunks/ssr/_19e0e-9._.js +1 -1
  65. package/.next/server/chunks/ssr/_1_h504-._.js +3 -0
  66. package/.next/server/chunks/ssr/_1al_cqt._.js +3 -0
  67. package/.next/server/chunks/ssr/_1bmk6y_._.js +3 -0
  68. package/.next/server/chunks/ssr/{_1oqoc4e._.js → _1ejhqt9._.js} +2 -2
  69. package/.next/server/chunks/ssr/_1ezhc7m._.js +3 -0
  70. package/.next/server/chunks/ssr/_1kv8ma5._.js +1 -1
  71. package/.next/server/chunks/ssr/_1ommvbv._.js +1 -1
  72. package/.next/server/chunks/ssr/{_0mob-i2._.js → _1on9mjs._.js} +2 -2
  73. package/.next/server/chunks/ssr/_1oofkty._.js +1 -1
  74. package/.next/server/chunks/ssr/_1r6ce_7._.js +1 -1
  75. package/.next/server/chunks/ssr/{_1tsejml._.js → _208q2q8._.js} +1 -1
  76. package/.next/server/chunks/ssr/node_modules_next_dist_0kq7z60._.js +1 -1
  77. package/.next/server/chunks/ssr/packages_console_0edevze._.js +3 -0
  78. package/.next/server/chunks/ssr/packages_console_0oso305._.js +3 -0
  79. package/.next/server/chunks/ssr/packages_console_0y7h5dm._.js +3 -0
  80. package/.next/server/chunks/ssr/packages_console_1stwpsk._.js +3 -0
  81. package/.next/server/chunks/ssr/packages_console_app_page_tsx_16ln4px._.js +1 -1
  82. package/.next/server/chunks/ssr/packages_console_app_ships_[shipId]_page_tsx_0fudjay._.js +1 -1
  83. package/.next/server/chunks/ssr/packages_console_app_squadrons_[squadronId]_page_tsx_1umxs1g._.js +1 -1
  84. package/.next/server/chunks/ssr/packages_console_app_squadrons_page_tsx_1w6ym6z._.js +1 -1
  85. package/.next/server/chunks/ssr/packages_console_app_trierarchs_[shipId]_page_tsx_1rqyoj3._.js +1 -1
  86. package/.next/server/chunks/ssr/packages_console_components_1-5gwzg._.js +1 -1
  87. package/.next/server/chunks/ssr/packages_console_components_organisms_form-squadron_tsx_1-qlsje._.js +3 -0
  88. package/.next/server/middleware-build-manifest.js +3 -3
  89. package/.next/server/pages/500.html +1 -1
  90. package/.next/server/server-reference-manifest.js +1 -1
  91. package/.next/server/server-reference-manifest.json +1 -1
  92. package/.next/static/chunks/{26dg2z_6kosr0.js → 0r8dost92fvd7.js} +1 -1
  93. package/.next/static/chunks/0y1nvhxr03jkb.js +1 -0
  94. package/.next/static/chunks/1dj9u_t1hus9k.js +1 -0
  95. package/.next/static/chunks/1ntkufzth29k5.js +1 -0
  96. package/.next/static/chunks/{39-cyg4qvxgbm.js → 21y50ct8e_pis.js} +1 -1
  97. package/.next/static/chunks/{21jwgqx67q8ql.js → 23hfit3epwjh0.js} +1 -1
  98. package/.next/static/chunks/25amuen1qm2o7.js +1 -0
  99. package/.next/static/chunks/28vyyv4krlzx3.js +1 -0
  100. package/.next/static/chunks/2b-ho-tbr3sac.js +1 -0
  101. package/.next/static/chunks/{3jsj5ozfio3me.js → 2c6e9e-s7rbf3.js} +1 -1
  102. package/.next/static/chunks/2ie6mvt-ssazt.js +1 -0
  103. package/.next/static/chunks/2n90taswwrii-.js +1 -0
  104. package/.next/static/chunks/{2_txjvbug4b86.js → 2r2aklt62ojhs.js} +1 -1
  105. package/.next/static/chunks/3061rp6nl670n.js +1 -0
  106. package/.next/static/chunks/3ba10-qig9f07.js +1 -0
  107. package/.next/static/chunks/3drxrwegn5v1p.css +3 -0
  108. package/.next/static/chunks/3jhje-hiar2ex.js +1 -0
  109. package/.next/static/chunks/3plldogn92kay.js +1 -0
  110. package/.next/static/chunks/3pu5ywtisj_fp.js +1 -0
  111. package/.next/static/chunks/3vl7dc6v-u8w0.js +1 -0
  112. package/.next/static/chunks/3x1-acncumcu6.js +1 -0
  113. package/.next/static/chunks/{3b5uomyz3knol.js → 3z61krti-vbu2.js} +1 -1
  114. package/.next/static/chunks/{0e6zs-5ou_ra4.js → 414186x82sxkk.js} +1 -1
  115. package/package.json +3 -3
  116. package/.next/server/chunks/ssr/_01f7zv3._.js +0 -3
  117. package/.next/server/chunks/ssr/_0bmd2ey._.js +0 -3
  118. package/.next/server/chunks/ssr/_0i0_i88._.js +0 -3
  119. package/.next/server/chunks/ssr/_0t1jjxf._.js +0 -3
  120. package/.next/server/chunks/ssr/_20pku2-._.js +0 -3
  121. package/.next/server/chunks/ssr/packages_console_023iioa._.js +0 -3
  122. package/.next/server/chunks/ssr/packages_console_0lv43wr._.js +0 -3
  123. package/.next/server/chunks/ssr/packages_console_lib_crew-settings-form_ts_1_mrtph._.js +0 -3
  124. package/.next/static/chunks/00pjrzynt0in-.js +0 -1
  125. package/.next/static/chunks/0ez9e35zkfaz5.js +0 -1
  126. package/.next/static/chunks/0vlyibw4rexm7.js +0 -1
  127. package/.next/static/chunks/16o3i61aw3cj2.js +0 -1
  128. package/.next/static/chunks/17quvh6filhxh.js +0 -1
  129. package/.next/static/chunks/19x_u3cmb9s_j.js +0 -1
  130. package/.next/static/chunks/1mbia-jrmgpuu.js +0 -1
  131. package/.next/static/chunks/2c1daktq2hun-.css +0 -3
  132. package/.next/static/chunks/2k5tcu7bvrhet.js +0 -1
  133. package/.next/static/chunks/2mvb-x6v93lfc.js +0 -1
  134. package/.next/static/chunks/2ne-qdcv-7ck1.js +0 -1
  135. package/.next/static/chunks/30ux5-xn650iq.js +0 -1
  136. package/.next/static/chunks/3e1veij7vs6ao.js +0 -1
  137. package/.next/static/chunks/3eaxbdj-y982h.js +0 -1
  138. package/.next/static/chunks/3evbxrltn9tcu.js +0 -1
  139. /package/.next/static/{LHmQaS8aizP80vXh3K-ws → va-oYqdgsZx7jVoPSVC3a}/_buildManifest.js +0 -0
  140. /package/.next/static/{LHmQaS8aizP80vXh3K-ws → va-oYqdgsZx7jVoPSVC3a}/_clientMiddlewareManifest.js +0 -0
  141. /package/.next/static/{LHmQaS8aizP80vXh3K-ws → va-oYqdgsZx7jVoPSVC3a}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,52376,e=>{"use strict";e.s([],4824),e.i(4824);var t=e.i(71645),n=e.i(52245),r=e.i(33332);let i=t.createContext(void 0);function s(){let e=t.useContext(i);if(void 0===e)throw Error((0,r.default)(13));return e}let a={imageLoadingStatus:()=>null};var o=e.i(43476);let l=t.forwardRef(function(e,r){let{className:s,render:l,style:u,...c}=e,[d,f]=t.useState("idle"),h=t.useMemo(()=>({imageLoadingStatus:d,setImageLoadingStatus:f}),[d,f]),p=(0,n.useRenderElement)("span",e,{state:{imageLoadingStatus:d},ref:r,props:c,stateAttributesMapping:a});return(0,o.jsx)(i.Provider,{value:h,children:p})});var u=e.i(67865),c=e.i(46376),d=e.i(37584),f=e.i(74354),h=e.i(23910),p=e.i(56789);let m={...a,...f.transitionStatusMapping},g=t.forwardRef(function(e,r){let{className:i,render:a,onLoadingStatusChange:o,keepMounted:l=!1,style:f,sizes:g,srcSet:b,src:v,...y}=e,{setImageLoadingStatus:x}=s(),[k,j]=function(e,{referrerPolicy:n,crossOrigin:r,sizes:i,srcSet:s},a){let o=t.useState("idle"),l=o[1];return(0,c.useIsoLayoutEffect)(()=>{if(!a)return p.NOOP;if(!e&&!s)return l("error"),p.NOOP;let t=!0,o=new window.Image,u=e=>()=>{t&&l(e)};return l("loading"),o.onload=u("loaded"),o.onerror=u("error"),n&&(o.referrerPolicy=n),o.crossOrigin=r??null,i&&(o.sizes=i),s&&(o.srcset=s),e&&(o.src=e),o.complete&&l(o.naturalWidth>0?"loaded":"error"),()=>{t=!1}},[a,e,s,i,r,n,l]),o}(v,e,!l),w="loaded"===k,{mounted:S,transitionStatus:C,setMounted:N}=(0,h.useTransitionStatus)(w),I=t.useRef(null),P=t.useRef(!0);(0,c.useIsoLayoutEffect)(()=>{if(!l)return;let e=P.current;P.current=!1;let t=I.current;if(!t)return;if(!t.complete)return void j("loading");let n=t.naturalWidth>0?"loaded":"error";j(n),"loaded"===n&&e&&N(!0)},[l,v,b,g,y.crossOrigin,y.referrerPolicy,a,j,N]);let E=l?{"data-loading":"loading"===k?"":void 0,"data-error":"error"===k?"":void 0,"aria-hidden":"loaded"!==k||void 0,onLoad(){j("loaded")},onError(){j("error")}}:void 0,O=(0,u.useStableCallback)(e=>{o?.(e),x(e)});(0,c.useIsoLayoutEffect)(()=>{"idle"!==k&&O(k)},[k,O]),(0,c.useIsoLayoutEffect)(()=>()=>x("idle"),[x]),(0,d.useOpenChangeComplete)({enabled:!w,open:w,ref:I,onComplete(){w||N(!1)}});let A=l||S,L={};void 0!==g&&(L.sizes=g),void 0!==b&&(L.srcSet=b),void 0!==v&&(L.src=v);let M=(0,n.useRenderElement)("img",e,{state:{imageLoadingStatus:k,transitionStatus:l&&"ending"===C?void 0:C},ref:[r,I],props:[E,y,L],stateAttributesMapping:m,enabled:A});return A?M:null});var b=e.i(39957);let v=t.forwardRef(function(e,r){let{className:i,render:o,delay:l=0,style:u,...c}=e,{imageLoadingStatus:d}=s(),[f,h]=t.useState(0===l),p=(0,b.useTimeout)();return t.useEffect(()=>(l>0?p.start(l,()=>h(!0)):h(!0),p.clear),[p,l]),(0,n.useRenderElement)("span",e,{state:{imageLoadingStatus:d},ref:r,props:c,stateAttributesMapping:a,enabled:"loaded"!==d&&(0===l||f)})});e.s(["Fallback",0,v,"Image",0,g,"Root",0,l],14751);var y=e.i(14751);e.s(["Avatar",0,y],52376)},80862,e=>{"use strict";e.s(["endingStyle",0,"data-ending-style","startingStyle",0,"data-starting-style"])},74354,e=>{"use strict";var t=e.i(80862);let n={[t.startingStyle]:""},r={[t.endingStyle]:""};e.s(["transitionStatusMapping",0,{transitionStatus:e=>"starting"===e?n:"ending"===e?r:null}])},37584,22640,e=>{"use strict";var t=e.i(71645),n=e.i(67865),r=e.i(74080),i=e.i(8445),s=e.i(94603),a=e.i(80862);let o=null;function l(e,t=!1,u=!1){let c=(0,i.useAnimationFrame)();return(0,n.useStableCallback)((n,i=null)=>{c.cancel();let l=(0,s.resolveRef)(e);if(null==l)return;let d=()=>{if(!u)return void r.flushSync(n);if(!o){let e=[];o=e,queueMicrotask(()=>{o=null,r.flushSync(()=>{for(let t of e)t()})})}o.push(()=>{i?.aborted||n()})};if("function"!=typeof l.getAnimations||globalThis.BASE_UI_ANIMATIONS_DISABLED)return void n();function f(){Promise.all(l.getAnimations().map(e=>e.finished)).then(()=>{i?.aborted||d()},()=>{i?.aborted||(l.getAnimations().some(e=>e.pending||"finished"!==e.playState)?f():d())})}if(t){let e=a.startingStyle;if(!l.hasAttribute(e))return void c.request(f);let t=new MutationObserver(()=>{l.hasAttribute(e)||(t.disconnect(),f())});return t.observe(l,{attributes:!0,attributeFilter:[e]}),void i?.addEventListener("abort",()=>t.disconnect(),{once:!0})}c.request(f)})}e.s(["useAnimationsFinished",0,l],22640),e.s(["useOpenChangeComplete",0,function(e){let{enabled:r=!0,open:i,ref:s,batch:a=!1,onComplete:o}=e,u=(0,n.useStableCallback)(o),c=l(s,i,a);t.useEffect(()=>{if(!r)return;let e=new AbortController;return c(u,e.signal),()=>{e.abort()}},[r,i,u,c])}],37584)},23910,e=>{"use strict";var t=e.i(71645),n=e.i(46376),r=e.i(8445);e.s(["useTransitionStatus",0,function(e,i=!1,s=!1,a=!1){let[o,l]=t.useState(e&&i?"idle":void 0),[u,c]=t.useState(e&&!a);return e&&!u&&(c(!0),l("starting")),e||!u||"ending"===o||s||l("ending"),e||u||"ending"!==o||l(void 0),(0,n.useIsoLayoutEffect)(()=>{if(!e&&u&&"ending"!==o&&s){let e=r.AnimationFrame.request(()=>{l("ending")});return()=>{r.AnimationFrame.cancel(e)}}},[e,u,o,s]),(0,n.useIsoLayoutEffect)(()=>{if(!e||i)return;let t=r.AnimationFrame.request(()=>{l(void 0)});return()=>{r.AnimationFrame.cancel(t)}},[i,e]),(0,n.useIsoLayoutEffect)(()=>{if(!e||!i)return;e&&u&&"idle"!==o&&l("starting");let t=r.AnimationFrame.request(()=>{l("idle")});return()=>{r.AnimationFrame.cancel(t)}},[i,e,u,o]),{mounted:u,setMounted:c,transitionStatus:o}}])},94603,e=>{"use strict";e.s(["resolveRef",0,function(e){return null==e?e:"current"in e?e.current:e}])},8445,e=>{"use strict";e.i(47167);var t=e.i(88940),n=e.i(26300);let r=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||(requestAnimationFrame(this.tick),this.isScheduled=!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||null!==this.callbacks[t]&&(this.callbacks[t]=null,this.callbacksCount-=1)}};class i{static create(){return new i}static request(e){return r.request(e)}static cancel(e){return r.cancel(e)}currentId=null;request(e){this.cancel(),this.currentId=r.request(()=>{this.currentId=null,e()})}cancel=()=>{null!==this.currentId&&(r.cancel(this.currentId),this.currentId=null)};disposeEffect=()=>this.cancel}e.s(["AnimationFrame",0,i,"useAnimationFrame",0,function(){let e=(0,t.useRefWithInit)(i.create).current;return(0,n.useOnMount)(e.disposeEffect),e}])},26300,e=>{"use strict";var t=e.i(71645),n=e.i(56789);e.s(["useOnMount",0,function(e){t.useEffect(e,n.EMPTY_ARRAY)}])},39957,e=>{"use strict";var t=e.i(88940),n=e.i(26300);class r{static create(){return new r}currentId=0;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=0,t()},e)}isStarted(){return 0!==this.currentId}clear=()=>{0!==this.currentId&&(clearTimeout(this.currentId),this.currentId=0)};disposeEffect=()=>this.clear}e.s(["Timeout",0,r,"useTimeout",0,function(){let e=(0,t.useRefWithInit)(r.create).current;return(0,n.useOnMount)(e.disposeEffect),e}])},92150,e=>{"use strict";var t=e.i(56420);let n={name:"boxes",size:24,node:[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]};n.node;let r=(0,t.default)(n);e.s(["Boxes",0,r],92150)},49287,e=>{"use strict";var t=e.i(56420);let n={name:"ship",size:24,node:[["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 9.189V13",key:"yp40p3"}],["path",{d:"M19 12V6a2 2 0 00-2-2H7a2 2 0 00-2 2v6",key:"1wcigf"}],["path",{d:"M19.38 19A11.6 11.6 0 0021 13l-8.188-3.639a2 2 0 00-1.624 0L3 13.001a11.6 11.6 0 002.81 7.76",key:"1kdp0u"}],["path",{d:"M2 20c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"1l8w7g"}]]};n.node;let r=(0,t.default)(n);e.s(["Ship",0,r],49287)},94831,e=>{"use strict";var t=e.i(56420);let n={name:"unplug",size:24,node:[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]]};n.node;let r=(0,t.default)(n);e.s(["Unplug",0,r],94831)},22016,(e,t,n)=>{"use strict";e.i(47167),Object.defineProperty(n,"__esModule",{value:!0});var r={default:function(){return b},useLinkStatus:function(){return y}};for(var i in r)Object.defineProperty(n,i,{enumerable:!0,get:r[i]});let s=e.r(90809),a=e.r(43476),o=s._(e.r(71645)),l=e.r(95057),u=e.r(8372),c=e.r(18581),d=e.r(18967),f=e.r(5550),h=e.r(88540),p=e.r(91949),m=e.r(73668),g=e.r(9396);function b(t){var n;let r,i,s,[b,y]=(0,o.useOptimistic)(p.IDLE_LINK_STATUS),x=(0,o.useRef)(null),{href:k,as:j,children:w,prefetch:S=null,passHref:C,replace:N,shallow:I,scroll:P,onClick:E,onMouseEnter:O,onTouchStart:A,legacyBehavior:L=!1,onNavigate:M,transitionTypes:_,ref:R,unstable_dynamicOnHover:T,...z}=t;r=w,L&&("string"==typeof r||"number"==typeof r)&&(r=(0,a.jsx)("a",{children:r}));let $=o.default.useContext(u.AppRouterContext),F=!1!==S,q=!1===S?"none":!0===S?"full":"auto",B="none"!==q?"auto"===q?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,U="string"==typeof(n=j||k)?n:(0,l.formatUrl)(n);if(L){if(r?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});i=o.default.Children.only(r)}let D=L?i&&"object"==typeof i&&i.ref:R,W,V=o.default.useCallback(e=>(null!==$&&(x.current=(0,p.mountLinkInstance)(e,U,$,B,F,y,W)),()=>{x.current&&((0,p.unmountLinkForCurrentNavigation)(x.current),x.current=null),(0,p.unmountPrefetchableInstance)(e)}),[F,U,$,B,y,W]),K={ref:(0,c.useMergedRef)(V,D),onClick(t){L||"function"!=typeof E||E(t),L&&i.props&&"function"==typeof i.props.onClick&&i.props.onClick(t),!$||t.defaultPrevented||function(t,n,r,i,s,a,l,u="none"){if("u">typeof window){let c,{nodeName:d}=t.currentTarget;if("A"===d.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(n)){i&&(t.preventDefault(),location.replace(n));return}if(t.preventDefault(),a){let e=!1;if(a({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:f}=e.r(99781);o.default.startTransition(()=>{f(n,i?"replace":"push",!1===s?h.ScrollBehavior.NoScroll:h.ScrollBehavior.Default,r.current,l,u)})}}(t,U,x,N,P,M,_,q)},onMouseEnter(e){L||"function"!=typeof O||O(e),L&&i.props&&"function"==typeof i.props.onMouseEnter&&i.props.onMouseEnter(e),$&&F&&(0,p.onNavigationIntent)(e.currentTarget,!0===T)},onTouchStart:function(e){L||"function"!=typeof A||A(e),L&&i.props&&"function"==typeof i.props.onTouchStart&&i.props.onTouchStart(e),$&&F&&(0,p.onNavigationIntent)(e.currentTarget,!0===T)}};return(0,d.isAbsoluteUrl)(U)?K.href=U:L&&!C&&("a"!==i.type||"href"in i.props)||(K.href=(0,f.addBasePath)(U)),s=L?o.default.cloneElement(i,K):(0,a.jsx)("a",{...z,...K,children:r}),(0,a.jsx)(v.Provider,{value:b,children:s})}let v=(0,o.createContext)(p.IDLE_LINK_STATUS),y=()=>(0,o.useContext)(v);("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},18581,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"useMergedRef",{enumerable:!0,get:function(){return i}});let r=e.r(71645);function i(e,t){let n=(0,r.useRef)(null),i=(0,r.useRef)(null);return(0,r.useCallback)(r=>{if(null===r){let e=n.current;e&&(n.current=null,e());let t=i.current;t&&(i.current=null,t())}else e&&(n.current=s(e,r)),t&&(i.current=s(t,r))},[e,t])}function s(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let n=e(t);return"function"==typeof n?n:()=>e(null)}}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},18967,(e,t,n)=>{"use strict";e.i(47167),Object.defineProperty(n,"__esModule",{value:!0});var r={DecodeError:function(){return b},MiddlewareNotFoundError:function(){return k},MissingStaticPage:function(){return x},NormalizeError:function(){return v},PageNotFoundError:function(){return y},SP:function(){return m},ST:function(){return g},WEB_VITALS:function(){return s},execOnce:function(){return a},getDisplayName:function(){return d},getLocationOrigin:function(){return u},getURL:function(){return c},isAbsoluteUrl:function(){return l},isResSent:function(){return f},loadGetInitialProps:function(){return p},normalizeRepeatedSlashes:function(){return h},stringifyError:function(){return j}};for(var i in r)Object.defineProperty(n,i,{enumerable:!0,get:r[i]});let s=["CLS","FCP","FID","INP","LCP","TTFB"];function a(e){let t,n=!1;return(...r)=>(n||(n=!0,t=e(...r)),t)}let o=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,l=e=>{let t=e.charCodeAt(0);return!!(t>=65&&t<=90||t>=97&&t<=122)&&o.test(e)};function u(){let{protocol:e,hostname:t,port:n}=window.location;return`${e}//${t}${n?":"+n:""}`}function c(){let{href:e}=window.location,t=u();return e.substring(t.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function f(e){return e.finished||e.headersSent}function h(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function p(e,t){let n=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await p(t.Component,t.ctx)}:{};let r=await e.getInitialProps(t);if(n&&f(n))return r;if(!r)throw Object.defineProperty(Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${r}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return r}let m="u">typeof performance,g=m&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class b extends Error{}class v extends Error{}class y extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class x extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class k extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function j(e){return JSON.stringify({message:e.message,stack:e.stack})}},73668,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"isLocalURL",{enumerable:!0,get:function(){return s}});let r=e.r(18967),i=e.r(52817);function s(e){if(!(0,r.isAbsoluteUrl)(e))return!0;try{let t=(0,r.getLocationOrigin)(),n=new URL(e,t);return n.origin===t&&(0,i.hasBasePath)(n.pathname)}catch(e){return!1}}},98183,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={assign:function(){return l},searchParamsToUrlQuery:function(){return s},urlQueryToSearchParams:function(){return o}};for(var i in r)Object.defineProperty(n,i,{enumerable:!0,get:r[i]});function s(e){let t={};for(let[n,r]of e.entries()){let e=t[n];void 0===e?t[n]=r:Array.isArray(e)?e.push(r):t[n]=[e,r]}return t}function a(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function o(e){let t=new URLSearchParams;for(let[n,r]of Object.entries(e))if(Array.isArray(r))for(let e of r)t.append(n,a(e));else t.set(n,a(r));return t}function l(e,...t){for(let n of t){for(let t of n.keys())e.delete(t);for(let[t,r]of n.entries())e.append(t,r)}return e}},95057,(e,t,n)=>{"use strict";e.i(47167),Object.defineProperty(n,"__esModule",{value:!0});var r={formatUrl:function(){return o},formatWithValidation:function(){return u},urlObjectKeys:function(){return l}};for(var i in r)Object.defineProperty(n,i,{enumerable:!0,get:r[i]});let s=e.r(90809)._(e.r(98183)),a=/https?|ftp|gopher|file/;function o(e){let{auth:t,hostname:n}=e,r=e.protocol||"",i=e.pathname||"",o=e.hash||"",l=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:n&&(u=t+(~n.indexOf(":")?`[${n}]`:n),e.port&&(u+=":"+e.port)),l&&"object"==typeof l&&(l=String(s.urlQueryToSearchParams(l)));let c=e.search||l&&`?${l}`||"";return r&&!r.endsWith(":")&&(r+=":"),e.slashes||(!r||a.test(r))&&!1!==u?(u="//"+(u||""),i&&"/"!==i[0]&&(i="/"+i)):u||(u=""),o&&"#"!==o[0]&&(o="#"+o),c&&"?"!==c[0]&&(c="?"+c),i=i.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${r}${u}${i}${c}${o}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return o(e)}},94859,26478,e=>{"use strict";var t=e.i(43476),n=e.i(52376),r=e.i(25913),i=e.i(49287),s=e.i(56420);let a={name:"user-round",size:24,node:[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],aliases:["user-2"]};a.node;let o=(0,s.default)(a);e.s(["UserRound",0,o],26478);var l=e.i(90063);let u=(0,r.cva)("inline-flex shrink-0 items-center justify-center overflow-hidden font-semibold uppercase select-none",{variants:{kind:{app:"rounded-sm bg-primary text-primary-foreground",account:"rounded-full bg-secondary font-sans text-foreground",ship:"rounded-sm bg-secondary font-mono text-foreground",argo:"rounded-sm bg-highlight text-primary",retired:"rounded-sm border border-dashed border-input font-mono font-medium text-muted-foreground"},size:{20:"size-5 text-micro [&_svg]:size-3",28:"size-7 text-micro [&_svg]:size-(--size-icon-sm)",36:"size-9 text-caption [&_svg]:size-(--size-icon)"}},defaultVariants:{kind:"ship",size:28}});e.s(["Avatar",0,function({kind:e="ship",size:r,name:s="",className:a}){let c=e??"ship";return(0,t.jsx)(n.Avatar.Root,{"aria-hidden":!0,"data-slot":"avatar",className:(0,l.classNames)(u({kind:e,size:r}),a),children:(0,t.jsx)(n.Avatar.Fallback,{children:"app"===c?(0,t.jsx)(i.Ship,{"aria-hidden":!0}):"argo"===c?(0,t.jsx)(o,{"aria-hidden":!0}):s.replaceAll("-","").slice(0,2)})})}],94859)},95960,e=>{"use strict";var t=e.i(43476),n=e.i(92150),r=e.i(49287),i=e.i(86875),s=e.i(63676),a=e.i(90063);let o={"trierarch-plugin":i.ShipWheel,squadrons:n.Boxes,ship:r.Ship};e.s(["LabelChip",0,function({chip:e,onRemove:n,testId:r,className:i,trailing:l}){let u="none"===e.mark?null:o[e.mark],c=`${e.key}=${e.value}`,d="none"===e.mark?"you":e.ownerName;return(0,t.jsxs)("span",{"data-slot":"label-chip","data-testid":r,title:`${c}, by ${d}`,className:(0,a.classNames)("inline-flex h-5.5 max-w-full min-w-0 shrink-0 items-center gap-1 rounded-sm border border-border bg-secondary px-1.5 font-mono text-id whitespace-nowrap text-foreground [&_svg]:size-3 [&_svg]:shrink-0 [&_svg]:text-muted-foreground",i),children:[null===u?null:(0,t.jsx)(u,{"aria-hidden":!0}),(0,t.jsxs)("span",{className:"truncate",children:[(0,t.jsxs)("span",{className:"text-muted-foreground",children:[e.key,"="]}),(0,t.jsx)("span",{className:"font-medium",children:e.value})]}),l,void 0===n?null:(0,t.jsx)("button",{type:"button","aria-label":`Remove ${c}`,onClick:n,className:"-mr-1 ml-0.5 inline-flex size-4 items-center justify-center rounded-xs text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring",children:(0,t.jsx)(s.X,{"aria-hidden":!0})})]})}])},10649,78608,87851,4032,e=>{"use strict";e.i(31627);var t=e.i(9677),n=e.i(83615),r=e.i(14695);function i(e,t){for(let n of t)e.includes(n)||e.push(n)}function s(e){return Object.fromEntries((e?.options??[]).flatMap(e=>{let t=e.defaultValue??e.values[0];return void 0===t?[]:[[e.name,t]]}))}function a(e){let[t]=e?.repositories??[];if(void 0!==t)return{kind:"worktree",repository:t};let[n]=e?.folders??[];return void 0===n?void 0:{kind:"folder",name:n}}function o(e){let[t]=e;return{harness:t?.harness??"",workspace:a(t),options:s(t),firstPrompt:"",squadron:"",machineLabels:[]}}let l=new TextEncoder;function u(e){return l.encode(e).byteLength}function c(e){return e<1024?`${String(e)} B`:`${(e/1024).toFixed(1).replace(/\.0$/,"")} KB`}e.s(["byteSize",0,c,"defaultValues",0,o,"offersOf",0,function(e){let t=[];for(let n of e)if(!n.isSilent&&null!==n.details)for(let e of n.details.harnesses){let s=t.find(t=>t.harness===e.harness);for(let a of(void 0===s&&(s={harness:e.harness,repositories:[],folders:[],options:[]},t.push(s)),i(s.repositories,n.details.workspaces.repositories),i(s.folders,n.details.workspaces.folders),(0,r.harnessOptions)(e.options))){let e=s.options.find(e=>e.name===a.name);void 0===e?s.options.push({...a,values:[...a.values]}):(i(e.values,a.values),e.defaultValue??=a.defaultValue)}}return t},"promptBytes",0,u,"settingsOf",0,function(e){if(""!==e.harness&&void 0!==e.workspace)return{harness:e.harness,workspace:e.workspace,options:e.options,...""===e.firstPrompt?{}:{firstPrompt:e.firstPrompt},...""===e.squadron?{}:{squadron:e.squadron},...0===e.machineLabels.length?{}:{machineLabels:e.machineLabels.flatMap(e=>{let t=(0,n.idSchema)("labelValue").safeParse(e);return t.success?[t.data]:[]})}}},"settingsRows",0,function(e){let n=t.crewSettingsSchema.safeParse(e);if(!n.success)return;let{harness:r,workspace:i,options:s,firstPrompt:a,squadron:o}=n.data;return[{label:"Harness",value:r??"Trierarch default"},"worktree"===i.kind?{label:"Workspace",value:i.repository,meta:"New worktree"}:{label:"Workspace",value:i.name,meta:"Folder, as it is"},...Object.entries(s).map(([e,t])=>({label:e,value:"string"==typeof t?t:JSON.stringify(t),isMono:!0})),{label:"First prompt",value:void 0===a?null:c(u(a))},{label:"Squadron",value:o??null,isMono:!0}]},"valuesOf",0,function(e,n){let r=t.crewSettingsSchema.safeParse(e);if(!r.success)return o(n);let{harness:i,workspace:s,options:a,firstPrompt:l,squadron:u,machineLabels:c}=r.data;return{harness:i??o(n).harness,workspace:"worktree"===s.kind?{kind:"worktree",repository:s.repository}:{kind:"folder",name:s.name},options:Object.fromEntries(Object.entries(a).flatMap(([e,t])=>"string"==typeof t?[[e,t]]:[])),firstPrompt:l??"",squadron:u??"",machineLabels:[...c??[]]}},"withHarness",0,function(e,t){let{harness:n,offers:r}=t,i=r.find(e=>e.harness===n),o=e.workspace,l=void 0!==o&&("worktree"===o.kind?i?.repositories.includes(o.repository)??!1:i?.folders.includes(o.name)??!1);return{...e,harness:n,workspace:l?o:a(i),options:s(i)}}],10649);var d=e.i(80581);function f(e,t){return e.ships.find(e=>e.id===t.shipId)?.labels.map(e=>e.valueId)??[]}function h(e){return 1===e?{these:"this label",carries:"carries it"}:2===e?{these:"both",carries:"carries both"}:{these:"these labels",carries:"carries them all"}}e.s(["machineLabelIdsOf",0,function(e){let n=t.crewSettingsSchema.safeParse(e);return n.success?[...n.data.machineLabels??[]]:[]},"machineLabelsInputOf",0,function(e,t){return{groups:function(e,t){let n=t.map(t=>f(e,t)),r=[],i=[];for(let t of e.labels){let s=t.values.map(e=>({valueId:e.id,value:e.value,shipCount:n.filter(t=>t.includes(e.id)).length})),a={labelId:t.id,key:t.key,mark:e.ownerOf.get(t.id)?.mark??"ship",values:s};(s.some(e=>e.shipCount>0)?r:i).push(a)}let s=(e,t)=>e.key.localeCompare(t.key);return[{title:"On machines",keys:r.toSorted(s)},{title:"On no machine yet",keys:i.toSorted(s)}].filter(e=>e.keys.length>0)}(e,t),chipsOf:t=>(0,d.pickedChips)(t,e),matchOf:n=>{var r;return{matching:(r={machines:t,valueIds:n}).machines.filter(t=>{let n=f(e,t);return r.valueIds.every(e=>n.includes(e))}).map(e=>e.name),total:r.machines.length}}}},"machineLabelsText",0,function(e){let t=e.map(e=>`${e.key}=${e.value}`);return t.length<=2?t.join(" and "):`${t.slice(0,-1).join(", ")} and ${t.at(-1)??""}`},"noMatchWords",0,h],78608);var p=e.i(43476),m=e.i(93669),g=e.i(22768),b=e.i(74544),v=e.i(77071),y=e.i(63676),x=e.i(22016),k=e.i(71645),j=e.i(15905),w=e.i(6734),S=e.i(95960),C=e.i(92150),N=e.i(24071),I=e.i(67927),P=e.i(66595),E=e.i(49287),O=e.i(86875),A=e.i(90063),L=e.i(12470);let M={"trierarch-plugin":O.ShipWheel,squadrons:C.Boxes,ship:E.Ship};function _(e,t){return`${String(e)} ${1===e?t:`${t}s`}`}function R({groups:e,pickedValueIds:t,onPick:n,size:r="sm",pickedWord:i="Picked",countWord:s="ship"}){let[a,o]=(0,k.useState)(""),[l,u]=(0,k.useState)(void 0),c="touch"===r,d=(0,A.classNames)("flex w-full items-center gap-2 rounded-sm px-2 text-left hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50",c?"min-h-(--size-control-touch) text-body-touch":"h-(--size-control-sm) text-body");if(void 0!==l)return(0,p.jsxs)("div",{className:"flex flex-col gap-1","data-testid":"label-picker-values",children:[(0,p.jsxs)("div",{className:"flex items-center justify-between gap-2 px-1 pb-1",children:[(0,p.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1 rounded-sm px-1 font-mono text-body hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon-sm)",onClick:()=>{u(void 0)},"aria-label":`Back to the keys, from ${l.key}`,children:[(0,p.jsx)(N.ChevronLeft,{"aria-hidden":!0}),l.key,"="]}),(0,p.jsxs)("span",{className:"text-meta text-muted-foreground",children:["ship"===s?"Ships":"Machines"," with each"]})]}),(0,p.jsx)("ul",{className:"flex flex-col",children:l.values.map(e=>{let r=t.includes(e.valueId);return(0,p.jsx)("li",{children:(0,p.jsxs)("button",{type:"button",className:d,disabled:r,"data-testid":"label-picker-value",onClick:()=>{n(e.valueId),u(void 0),o("")},children:[(0,p.jsx)("span",{className:"min-w-0 grow truncate font-mono",children:e.value}),(0,p.jsx)("span",{className:"shrink-0 text-meta text-muted-foreground tabular-nums",children:r?i:_(e.shipCount,s)})]})},e.valueId)})})]});let f=a.trim().toLowerCase(),h=e.map(e=>({...e,keys:e.keys.filter(e=>""===f||e.key.includes(f))})).filter(e=>e.keys.length>0);return(0,p.jsxs)("div",{className:"flex flex-col gap-2","data-testid":"label-picker",children:[(0,p.jsx)(L.Input,{type:"search","aria-label":"Find a key",placeholder:"Find a key",size:c?"touch":"md",leadingIcon:(0,p.jsx)(P.Search,{}),value:a,onChange:e=>{o(e.target.value)}}),0===h.length?(0,p.jsx)("p",{className:"px-2 py-3 text-meta text-muted-foreground",children:0===e.length?"The fleet has no labels yet.":`No key matches “${a.trim()}”.`}):h.map(e=>(0,p.jsxs)("div",{className:"flex flex-col",children:[(0,p.jsx)("span",{className:"px-2 pt-1 pb-0.5 text-caption text-muted-foreground",children:e.title}),(0,p.jsx)("ul",{className:"flex flex-col",children:e.keys.map(e=>{let t="none"===e.mark?null:M[e.mark];return(0,p.jsx)("li",{children:(0,p.jsxs)("button",{type:"button",className:(0,A.classNames)(d,"[&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0 [&_svg]:text-muted-foreground"),"data-testid":"label-picker-key",onClick:()=>{u(e)},children:[null===t?null:(0,p.jsx)(t,{"aria-hidden":!0}),(0,p.jsx)("span",{className:"font-mono",children:e.key}),(0,p.jsx)("span",{className:"min-w-0 grow truncate text-meta text-muted-foreground",children:_(e.values.length,"value")}),(0,p.jsx)(I.ChevronRight,{"aria-hidden":!0})]})},e.labelId)})})]},e.title))]})}function T({groups:e,picked:t,isDisabled:n,onAdd:r}){let[i,s]=(0,k.useState)(!1);return(0,p.jsxs)(w.Popover,{open:i,onOpenChange:s,children:[(0,p.jsx)(w.PopoverTrigger,{render:(0,p.jsx)(j.Button,{type:"button",variant:"ghost",size:"xs",icon:(0,p.jsx)(v.Plus,{}),disabled:n,"data-testid":"machine-labels-add"}),children:"Add label"}),(0,p.jsxs)(w.PopoverContent,{align:"start",sideOffset:6,className:"w-80 p-2","data-testid":"machine-labels-popover",children:[(0,p.jsx)("span",{className:"block px-2 pt-1 pb-2 text-body font-medium",children:"Machine label"}),(0,p.jsx)(R,{groups:e,pickedValueIds:t.map(e=>e.valueId),countWord:"machine",onPick:e=>{s(!1),r(e)}}),(0,p.jsxs)("p",{className:"mt-2 flex items-center justify-between gap-2 border-t border-border px-2 pt-2 text-meta text-muted-foreground",children:["Exact matches, all must hold.",(0,p.jsx)(x.default,{href:"/labels",className:"font-medium text-foreground hover:underline",children:"Manage labels"})]})]})]})}e.s(["LabelPicker",0,R],87851),e.s(["MachineLabelsField",0,function({shipName:e,picked:t,groups:n,match:r,isDisabled:i,onAdd:s,onRemove:a,unknown:o=[],onRemoveUnknown:l}){let u=h(t.length);return(0,p.jsxs)("div",{className:"flex flex-col gap-1.5","data-testid":"machine-labels",children:[(0,p.jsxs)("span",{className:"text-body font-medium",children:["Machine labels",(0,p.jsx)("span",{className:"font-normal text-muted-foreground",children:" optional"})]}),(0,p.jsxs)("div",{className:"flex min-h-(--size-control-sm) flex-wrap items-center gap-1.5",children:[0===t.length?(0,p.jsx)("span",{className:"text-meta text-muted-foreground",children:"Any machine"}):null,t.map((e,t)=>(0,p.jsxs)(k.Fragment,{children:[0===t?null:(0,p.jsx)("span",{className:"text-meta text-muted-foreground",children:"and"}),(0,p.jsx)(S.LabelChip,{chip:e,testId:"machine-label",...i?{}:{onRemove:()=>{a(e.valueId)}}})]},e.valueId)),o.map(e=>(0,p.jsxs)("span",{"data-testid":"machine-label-unknown",title:`${e}: not in this fleet`,className:"inline-flex h-5.5 items-center gap-1 rounded-sm border border-tone-attention-border bg-tone-attention-bg px-1.5 font-mono text-id text-tone-attention-fg [&_svg]:size-3",children:[(0,p.jsx)(g.CircleAlert,{"aria-hidden":!0}),e,void 0===l||i?null:(0,p.jsx)("button",{type:"button","aria-label":`Remove ${e}`,onClick:()=>{l(e)},className:"-mr-1 ml-0.5 inline-flex size-4 items-center justify-center rounded-xs hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring",children:(0,p.jsx)(y.X,{"aria-hidden":!0})})]},e)),t.length+o.length>=m.SHIP_LABELS_MAX?null:(0,p.jsx)(T,{groups:n,picked:t,isDisabled:i,onAdd:s})]}),0===o.length?null:(0,p.jsxs)("p",{role:"alert","data-testid":"machine-labels-unknown-note",className:"text-meta text-tone-attention-fg",children:["Not in this fleet: ",o.join(", "),". Forming refuses ",1===o.length?"it":"them",": define ",1===o.length?"it":"them"," on the Labels page, or remove ",1===o.length?"it":"them"," here."]}),0===t.length?null:0===r.matching.length?(0,p.jsxs)("p",{role:"status","data-testid":"machine-labels-match",className:"flex items-start gap-2 rounded-lg border border-tone-waiting-border bg-tone-waiting-bg px-3 py-2 text-meta text-tone-waiting-fg [&_svg]:mt-0.5 [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",children:[(0,p.jsx)(b.Clock,{"aria-hidden":!0}),(0,p.jsxs)("span",{children:["No machine matches ",u.these,". You can still request: it waits on Needs crew until a machine ",u.carries,"."]})]}):(0,p.jsxs)("p",{className:"text-meta","data-testid":"machine-labels-match",children:["Matches ",r.matching.length," of ",r.total," ",1===r.total?"machine":"machines",": ",r.matching.join(", "),"."]}),(0,p.jsxs)("p",{className:"text-meta text-muted-foreground",children:["The plugin places ",e," only on a machine that carries every label here. Leave it empty for any machine."]})]})}],4032)},66616,e=>{"use strict";var t=e.i(49635);let n={"claude-code":{word:"Claude Code",kind:"coding"},codex:{word:"Codex",kind:"coding"},"claude-chat":{word:"Claude chat",kind:"chat"},chatgpt:{word:"ChatGPT",kind:"chat"},grok:{word:"Grok",kind:"chat"},grokbot:{word:"Grokbot",kind:"bot"},console:{word:"Console",kind:"console"}};function r(e){return n[e]?.word??e}e.s(["crewLineHarnessWord",0,function(e){return"chat"===e?"Chat":r(e)},"harnessDetection",0,function(e,n){if(void 0===e.version)return;if(void 0===e.modelsConfirmedAt||null===e.modelsConfirmedAt)return`${e.version} \xb7 no model confirmed`;let r=(0,t.relativeTime)(new Date(e.modelsConfirmedAt),n);return`${e.version} \xb7 models confirmed ${"Just now"===r?"just now":r}`},"harnessKind",0,function(e){return n[e]?.kind},"harnessWord",0,r])}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,86247,e=>{"use strict";var t=e.i(56420);let i={name:"ellipsis",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],aliases:["more-horizontal"]};i.node;let s=(0,t.default)(i);e.s(["Ellipsis",0,s],86247)},18236,e=>{"use strict";var t=e.i(56420);let i={name:"file-key",size:24,node:[["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M4 12v6",key:"bg1pfk"}],["path",{d:"M4 14h2",key:"1sf9f8"}],["path",{d:"M9.65 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v4",key:"d56i0q"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],aliases:["file-key-2"]};i.node;let s=(0,t.default)(i);e.s(["FileKey",0,s],18236)},26091,e=>{"use strict";var t=e.i(56420);let i={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};i.node;let s=(0,t.default)(i);e.s(["FileText",0,s],26091)},58925,e=>{"use strict";var t=e.i(56420);let i={name:"key-round",size:24,node:[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]};i.node;let s=(0,t.default)(i);e.s(["KeyRound",0,s],58925)},68997,e=>{"use strict";var t=e.i(56420);let i={name:"pen",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],aliases:["edit-2"]};i.node;let s=(0,t.default)(i);e.s(["Pen",0,s],68997)},15331,71139,73330,e=>{"use strict";var t=e.i(56420);let i={name:"radio",size:24,node:[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]};i.node;let s=(0,t.default)(i);e.s(["Radio",0,s],15331);let n={name:"user-x",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"17",x2:"22",y1:"8",y2:"13",key:"3nzzx3"}],["line",{x1:"22",x2:"17",y1:"8",y2:"13",key:"1swrse"}]]};n.node;let a=(0,t.default)(n);e.s(["UserX",0,a],71139);var r=e.i(49635);e.s(["canPing",0,function(e){return"agent"===e.kind&&"crewed"===e.status},"pingLine",0,function(e,t){let i=new Date(e.sentAt);switch(e.state){case"waiting":{let e=(0,r.relativeTime)(i,t);return`Pinged ${"Just now"===e?"just now":e}, no answer yet`}case"answered":var s;let n;return null===e.answeredAt?"Answered ping":`Answered ping in ${(n=Math.max(0,(s=new Date(e.answeredAt)).getTime()-i.getTime()))<6e4?`${String(Math.round(n/1e3))} s`:(0,r.duration)(i,s)}`;case"received":return"Received, not answered with pong";case"undeliverable":return"Ping not answered: undeliverable"}}],73330)},83035,e=>{"use strict";var t=e.i(56420);let i={name:"square-terminal",size:24,node:[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],aliases:["terminal-square"]};i.node;let s=(0,t.default)(i);e.s(["SquareTerminal",0,s],83035)},68401,e=>{"use strict";var t=e.i(56420);let i={name:"tags",size:24,node:[["path",{d:"M13.172 2a2 2 0 0 1 1.414.586l6.71 6.71a2.4 2.4 0 0 1 0 3.408l-4.592 4.592a2.4 2.4 0 0 1-3.408 0l-6.71-6.71A2 2 0 0 1 6 9.172V3a1 1 0 0 1 1-1z",key:"16rjxf"}],["path",{d:"M2 7v6.172a2 2 0 0 0 .586 1.414l6.71 6.71a2.4 2.4 0 0 0 3.191.193",key:"178nd4"}],["circle",{cx:"10.5",cy:"6.5",r:".5",fill:"currentColor",key:"12ikhr"}]]};i.node;let s=(0,t.default)(i);e.s(["Tags",0,s],68401)},37817,e=>{"use strict";var t=e.i(56420);let i={name:"undo-2",size:24,node:[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]};i.node;let s=(0,t.default)(i);e.s(["Undo2",0,s],37817)},49319,e=>{"use strict";var t=e.i(56420);let i={name:"user-minus",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]};i.node;let s=(0,t.default)(i);e.s(["UserMinus",0,s],49319)},82303,e=>{"use strict";var t=e.i(56420);let i={name:"users",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]};i.node;let s=(0,t.default)(i);e.s(["Users",0,s],82303)},91703,e=>{"use strict";var t=e.i(43476),i=e.i(83035),s=e.i(90063),n=e.i(61966);e.s(["CodeBlock",0,function({label:e,code:a,isWrapped:r=!1,copyValue:o,copyLabel:l=`Copy ${e.toLowerCase()}`,onCopied:d,onCopyFailed:c,codeTestId:h,copyTestId:u}){return(0,t.jsxs)("div",{"data-slot":"code-block",className:"overflow-hidden rounded-lg border border-border bg-muted",children:[(0,t.jsxs)("div",{className:"flex h-9 items-center justify-between gap-2 border-b border-border pr-1.5 pl-3",children:[(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5 text-caption text-muted-foreground",children:[(0,t.jsx)(i.SquareTerminal,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:e})]}),(0,t.jsx)(n.CopyButton,{value:o??a,label:l,isLabeled:!0,onCopied:d,onCopyFailed:c,"data-testid":u})]}),(0,t.jsx)("pre",{"data-testid":h,className:(0,s.classNames)("overflow-x-auto px-3 py-3 font-mono text-code text-foreground",r?"break-all whitespace-pre-wrap":"whitespace-pre"),children:a})]})}])},61966,8734,e=>{"use strict";var t=e.i(43476),i=e.i(89664),s=e.i(56420);let n={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]};n.node;let a=(0,s.default)(n);e.s(["Copy",0,a],8734);var r=e.i(71645),o=e.i(15905);e.s(["CopyButton",0,function({value:e,label:s,size:n="xs",isLabeled:l=!1,onCopied:d,onCopyFailed:c,className:h,"data-testid":u}){let[p,m]=(0,r.useState)(!1);async function x(){try{await navigator.clipboard.writeText(e)}catch{c?.();return}m(!0),d?.(),setTimeout(()=>{m(!1)},1500)}return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.Button,{variant:"ghost",size:n,isIconOnly:!l,"aria-label":s,title:l?void 0:s,icon:p?(0,t.jsx)(i.Check,{"aria-hidden":!0}):(0,t.jsx)(a,{"aria-hidden":!0}),className:h,"data-testid":u,onClick:()=>{x()},children:l?p?"Copied":"Copy":null}),(0,t.jsx)("span",{role:"status",className:"sr-only",children:p?"Copied.":""})]})}],61966)},1009,e=>{"use strict";var t=e.i(43476);e.s(["ConsequenceList",0,function({consequences:e}){return(0,t.jsx)("ul",{className:"flex flex-col gap-2 rounded-lg border border-border bg-muted p-3 text-meta text-foreground",children:e.map(({icon:e,text:i})=>(0,t.jsxs)("li",{className:"flex gap-2",children:[(0,t.jsx)(e,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{children:i})]},i))})}])},56478,e=>{"use strict";var t=e.i(43476),i=e.i(66616),s=e.i(91703);e.s(["CrewLines",0,function({crewLines:e,subject:n,testIdPrefix:a,onCopied:r,onCopyFailed:o}){return e.map(({harness:e,line:l})=>(0,t.jsx)(s.CodeBlock,{label:`Crew line, ${(0,i.harnessWord)(e)} with the aeolus plugin`,code:l,isWrapped:!0,copyLabel:`Copy the ${(0,i.harnessWord)(e)} crew line for ${n}`,codeTestId:`${a}-${e}`,copyTestId:`${a}-${e}-copy`,onCopied:r,onCopyFailed:o},e))}])},69374,e=>{"use strict";var t=e.i(43476),i=e.i(71645),s=e.i(26808),n=e.i(12470),a=e.i(91727);e.s(["TypedConfirm",0,function({expected:e,value:r,onValueChange:o,"data-testid":l="retire-typed-confirm"}){let d=(0,i.useId)(),c=(0,i.useId)();return(0,t.jsxs)("div",{"data-testid":l,className:"flex flex-col gap-1.5",children:[(0,t.jsxs)(a.Label,{htmlFor:d,className:"text-meta",children:["Type ",(0,t.jsx)("code",{className:"rounded-xs bg-muted px-1 py-0.5 font-mono text-id",children:e})," to confirm"]}),(0,t.jsx)(n.Input,{id:d,isMono:!0,autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:!1,"aria-describedby":c,className:"max-sm:h-(--size-control-touch) max-sm:text-input-touch",value:r,onChange:e=>{o(e.target.value)}}),(0,t.jsx)("p",{id:c,"aria-live":"polite",className:"text-meta text-muted-foreground",children:""===r?"Case and hyphens must match.":(0,s.isTypedMatch)(e,r)?"Matches. The button is now active.":"Doesn’t match yet."})]})}])},39874,26808,82880,3067,42211,e=>{"use strict";var t=e.i(43476),i=e.i(71645),s=e.i(46150);let n={one:"delivery",many:"deliveries"};function a(e){if(0===e)return"Nothing is in flight, so no delivery moves.";let t=1===e?"returns":"return";return`${(0,s.counted)(e,{one:"in-flight delivery",many:"in-flight deliveries"})} ${t} to pending. Nothing is lost.`}function r(e){if("crewed"===e.status){let t=null===e.location?"the session crewing it":`the session on ${e.location.description??e.location.kind.toLowerCase()}`;return`This ends ${t}. ${a(e.inFlightDeliveries)}`}if(null!==e.startingPrompt&&!e.startingPrompt.isClaimed)return"The crew line issued earlier, not claimed yet, stops working."}e.s(["abandonedLine",0,function(e){return`${(0,s.counted)(e,n)} will be abandoned`},"inFlightLine",0,a,"isTypedMatch",0,function(e,t){return t===e},"newCrewLineReplaced",0,r,"retireButtonLabel",0,function(e){return 0===e?"Retire ship":`Retire and abandon ${(0,s.counted)(e,n)}`}],26808);var o=e.i(48695),l=e.i(15905),d=e.i(10818),c=e.i(25398),h=e.i(22212),u=e.i(94945),p=e.i(19321),m=e.i(66616),x=e.i(61966),g=e.i(60592);function f({crewLines:e,subject:s,testIdPrefix:n,onCopied:a,onCopyFailed:r}){let[o,l]=(0,i.useState)(e[0]?.harness),d=e.find(e=>e.harness===o)??e[0];if(!d)return null;let c=(0,m.crewLineHarnessWord)(d.harness);return(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2 max-sm:flex-col max-sm:items-stretch",children:[(0,t.jsx)(g.Tabs,{value:d.harness,onValueChange:t=>{let i=e.find(e=>e.harness===t);i&&l(i.harness)},children:(0,t.jsx)(g.TabsList,{"aria-label":`Crew ${s} from`,children:e.map(e=>(0,t.jsx)(g.TabsTrigger,{value:e.harness,"data-testid":`${n}-${e.harness}-tab`,children:(0,m.crewLineHarnessWord)(e.harness)},e.harness))})}),(0,t.jsx)("code",{"data-testid":`${n}-${d.harness}`,title:d.line,className:"min-w-0 grow truncate rounded-md bg-muted px-2 py-1 font-mono text-code text-foreground",children:d.line}),(0,t.jsx)(x.CopyButton,{value:d.line,label:`Copy the ${c} crew line for ${s}`,isLabeled:!0,onCopied:a,onCopyFailed:r,"data-testid":`${n}-${d.harness}-copy`})]})}e.s(["CompactCrewLine",0,f],82880);var j=e.i(17981),y=e.i(26091);function b({note:e,model:i,template:s,testId:n}){return null===e&&null===i?null:(0,t.jsxs)("div",{className:"flex items-start gap-2 rounded-md bg-muted px-3 py-2 text-meta",children:[(0,t.jsx)(y.FileText,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0 text-muted-foreground"}),(0,t.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,t.jsxs)("span",{className:"text-muted-foreground",children:["Launch note",void 0===s?"":` \xb7 ${s}`]}),null!==e&&(0,t.jsx)("span",{"data-testid":n,children:e}),null!==i&&(0,t.jsxs)("span",{children:["Runs ",(0,t.jsx)("span",{className:"font-mono",children:i})]})]})]})}function w({memberName:e,template:i,launchNote:s,model:n,crewLines:a}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(b,{note:s,model:n,template:i,testId:"crew-line-launch-note"}),(0,t.jsx)(f,{crewLines:a,subject:e,testIdPrefix:"crew-line-text"}),(0,t.jsxs)("p",{className:"flex items-center gap-1.5 text-meta text-muted-foreground",children:[(0,t.jsx)(d.Info,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"font-medium",children:"Shown once."})," Paste the crew line into Claude Code or Codex started where the launch note says, or into a chat client with the fleet’s connector. A new crew line stops it working."]})]})]})}function v({memberName:e,state:i,template:s,launchNote:n=null,model:a=null,crewLines:r,error:o,isOpen:d,onOpenChange:m,onConfirm:x}){let g="issuing"===i;return(0,t.jsx)(h.Dialog,{open:d,onOpenChange:e=>{g||m(e)},children:(0,t.jsxs)(h.DialogContent,{size:"md","data-testid":"crew-line-dialog",className:u.dialogSurface.phoneFullScreen,children:[(0,t.jsxs)(h.DialogHeader,{children:[(0,t.jsxs)(h.DialogTitle,{children:["Crew line for ",e]}),(0,t.jsx)(h.DialogDescription,{children:"Start Claude Code or Codex where the launch note says, or open a chat client with the fleet’s connector, then paste its crew line. The member is on station once its session checks in."})]}),g&&(0,t.jsxs)("div",{"aria-busy":!0,className:"flex flex-col gap-3",children:[(0,t.jsx)("span",{className:"sr-only",children:"Issuing a crew line..."}),(0,t.jsx)(p.Skeleton,{className:"h-10 w-full rounded-lg"}),(0,t.jsx)(p.Skeleton,{className:"h-28 w-full rounded-lg"})]}),"shown"===i&&void 0!==r&&(0,t.jsx)(w,{memberName:e,template:s,launchNote:n,model:a,crewLines:r}),"error"===i&&(0,t.jsx)(j.InlineError,{title:"Couldn’t issue a crew line",description:`${o??"The squadron manager did not answer."} No new secret was created; an earlier crew line still works.`}),(0,t.jsxs)(h.DialogFooter,{children:[("shown"===i||g)&&(0,t.jsx)(h.DialogClose,{render:(0,t.jsx)(l.Button,{variant:"primary","data-testid":"crew-line-done",disabled:g}),children:"Done"}),"error"===i&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.DialogClose,{render:(0,t.jsx)(l.Button,{}),children:"Close"}),(0,t.jsx)(l.Button,{variant:"primary",icon:(0,t.jsx)(c.RotateCw,{"aria-hidden":!0}),"data-testid":"crew-line-retry",onClick:x,children:"Try again"})]})]})]})})}e.s(["LaunchNote",0,b],3067),e.s(["CrewLineDialog",0,v],42211);var C=e.i(24010);function k({memberName:e,replacedText:i,isOpen:s,onOpenChange:n,onConfirm:a}){return(0,t.jsx)(C.AlertDialog,{open:s,onOpenChange:n,children:(0,t.jsxs)(C.AlertDialogContent,{"data-testid":"new-crew-line-confirm",className:u.dialogSurface.phoneSheet,children:[(0,t.jsxs)(C.AlertDialogHeader,{children:[(0,t.jsxs)(C.AlertDialogTitle,{children:["Get a new crew line for ",e,"?"]}),(0,t.jsx)(C.AlertDialogDescription,{children:i??"Its new secret is shown once, with its launch note."})]}),(0,t.jsxs)(C.AlertDialogFooter,{children:[(0,t.jsx)(C.AlertDialogClose,{render:(0,t.jsx)(l.Button,{}),children:"Cancel"}),(0,t.jsx)(l.Button,{variant:"primary","data-testid":"new-crew-line-confirm-submit",onClick:a,children:"Get new crew line"})]})]})})}function N(e){let s=(0,o.useNewCrewLine)(),[n,a]=(0,i.useState)(!1),[l,d]=(0,i.useState)(!1),[c,h]=(0,i.useState)(void 0),u=()=>{e&&s.mutate({squadronId:e.squadronId,shipId:e.member.shipId})},p=s.data?"shown":s.isError?"error":"issuing";return{isReady:e?.ship!==void 0,start:()=>{e?.ship&&(s.reset(),h(r(e.ship)),d(!0))},dialog:e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(k,{memberName:e.member.name,replacedText:c,isOpen:l,onOpenChange:d,onConfirm:()=>{d(!1),a(!0),u()}}),(0,t.jsx)(v,{memberName:e.member.name,state:p,template:e.template,launchNote:s.data?.launchNote,model:s.data?.model,crewLines:s.data?.crewLines,error:s.error?.message,isOpen:n,onOpenChange:e=>{a(e),e||s.reset()},onConfirm:u})]}):null}}e.s(["GetNewCrewLine",0,function({isPrimary:e=!1,testId:i,...s}){let n=N(s);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.Button,{size:"xs",variant:e?"primary":"secondary",disabled:!n.isReady,"data-testid":i,onClick:n.start,children:"Get new crew line"}),n.dialog]})},"useNewCrewLineFlow",0,N],39874)},29244,88280,39844,e=>{"use strict";var t=e.i(43476),i=e.i(52886),s=e.i(18236),n=e.i(58925),a=e.i(37817),r=e.i(26808),o=e.i(24010),l=e.i(15905),d=e.i(94945),c=e.i(1009),h=e.i(17981);let u={release:{title:"Release",action:"Release ship",busy:"Releasing",failed:"Couldn’t release the ship",testId:"release-dialog"},recrew:{title:"Re-crew",action:"Re-crew ship",busy:"Re-crewing",failed:"Couldn’t re-crew the ship",testId:"recrew-dialog"}};e.s(["ReleaseDialog",0,function(e){let{shipName:p,sessionLocation:m,mode:x="release",isOpen:g,onOpenChange:f,isPending:j,error:y,onConfirm:b}=e,w=u[x],v=m?`The session on ${m}`:"The session crewing it";return(0,t.jsx)(o.AlertDialog,{open:g,onOpenChange:e=>{j||f(e)},children:(0,t.jsxs)(o.AlertDialogContent,{"data-testid":w.testId,className:d.dialogSurface.phoneSheet,children:[(0,t.jsxs)(o.AlertDialogHeader,{children:[(0,t.jsxs)(o.AlertDialogTitle,{children:[w.title," ",p,"?"]}),(0,t.jsxs)(o.AlertDialogDescription,{children:[v," loses this ship now."]})]}),(0,t.jsx)(c.ConsequenceList,{consequences:function(e){let{shipName:t,inFlightCount:o,mode:l="release"}=e;return[{icon:n.KeyRound,text:"Its secret and crew token stop working, so that session cannot come back."},{icon:a.Undo2,text:(0,r.inFlightLine)(o)},"release"===l?{icon:i.CircleDashed,text:`${t} shows as Awaiting crew until you get a new starting prompt.`}:{icon:s.FileKey,text:"A new starting prompt and its crew lines are shown once, for the new crew."}]}(e)}),void 0===y?null:(0,t.jsx)(h.InlineError,{title:w.failed,description:`${y} Nothing changed; the session still holds the ship.`}),(0,t.jsxs)(o.AlertDialogFooter,{children:[(0,t.jsx)(o.AlertDialogClose,{render:(0,t.jsx)(l.Button,{disabled:j}),children:"Cancel"}),(0,t.jsx)(l.Button,{variant:"primary",isLoading:j,onClick:b,children:j?w.busy:w.action})]})]})})}],29244),e.i(31627);var p=e.i(44827),m=e.i(85595),x=e.i(16984),g=e.i(66787),f=e.i(71645),j=e.i(90063),y=e.i(65160),b=e.i(22212),w=e.i(12470),v=e.i(91727);function C({shipName:e,activeNames:i,isPending:s,error:n,onSubmit:a}){let r=(0,f.useId)(),o=(0,f.useId)(),[d,c]=(0,f.useState)(""),u=(0,y.checkShipName)(d,{activeNames:i,current:e}),k="invalid"===u.kind||"reserved"===u.kind||"taken"===u.kind,N="available"===u.kind;return(0,t.jsxs)("form",{noValidate:!0,className:"contents",onSubmit:e=>{e.preventDefault(),N&&a(d)},children:[(0,t.jsxs)(b.DialogHeader,{children:[(0,t.jsxs)(b.DialogTitle,{children:["Rename ",e]}),(0,t.jsx)(b.DialogDescription,{children:"The ship keeps its id, inbox and history."})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsxs)("div",{className:"flex items-baseline justify-between",children:[(0,t.jsx)(v.Label,{htmlFor:r,children:"New name"}),(0,t.jsxs)("span",{className:"text-caption text-muted-foreground tabular-nums",children:[d.length," / ",p.SHIP_HANDLE_MAX_LENGTH]})]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(w.Input,{id:r,isMono:!0,autoComplete:"off",autoCapitalize:"off",spellCheck:!1,placeholder:e,"data-testid":"rename-name","aria-invalid":!!k||void 0,"aria-describedby":o,className:"pr-9 max-sm:h-(--size-control-touch) max-sm:text-input-touch",value:d,onChange:e=>{c((0,y.asHandle)(e.target.value))}}),"available"===u.kind?(0,t.jsx)(m.CircleCheck,{"aria-hidden":!0,className:"absolute top-1/2 right-3 size-(--size-icon) -translate-y-1/2 text-tone-ok-fg"}):k?(0,t.jsx)(x.CircleX,{"aria-hidden":!0,className:"absolute top-1/2 right-3 size-(--size-icon) -translate-y-1/2 text-destructive-text"}):null]}),(0,t.jsx)("p",{id:o,"aria-live":"polite",className:(0,j.classNames)("text-meta",k?"text-destructive-text":"text-muted-foreground"),children:u.message})]}),(0,t.jsxs)("div",{className:"flex gap-2 rounded-lg border border-tone-waiting-border bg-tone-waiting-bg p-3 text-tone-waiting-fg",children:[(0,t.jsx)(g.TriangleAlert,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon) shrink-0"}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsxs)("p",{className:"text-body font-medium",children:["Ships that address ",e," by name stop reaching it"]}),(0,t.jsx)("p",{className:"text-meta text-foreground",children:"Messages already sent are unaffected, because they are stored by ship id."})]})]}),void 0===n?null:(0,t.jsx)(h.InlineError,{title:"Couldn’t rename the ship",description:`${n} Nothing changed.`}),(0,t.jsxs)(b.DialogFooter,{children:[(0,t.jsx)(b.DialogClose,{render:(0,t.jsx)(l.Button,{type:"button",disabled:s}),children:"Cancel"}),(0,t.jsx)(l.Button,{type:"submit",variant:"primary",isLoading:s,disabled:!N,"data-testid":"rename-submit",children:s?"Renaming":"Rename ship"})]})]})}e.s(["RenameDialog",0,function(e){let{isOpen:i,onOpenChange:s,isPending:n}=e;return(0,t.jsx)(b.Dialog,{open:i,onOpenChange:e=>{n||s(e)},children:(0,t.jsx)(b.DialogContent,{"data-testid":"rename-dialog",className:d.dialogSurface.phoneFullScreen,children:(0,t.jsx)(C,{...e})})})}],88280);var k=e.i(80799),N=e.i(68401),D=e.i(71139),S=e.i(82303),I=e.i(69374);function L({openDeliveries:e}){return 0===e?(0,t.jsxs)("p",{className:"flex items-center gap-2 rounded-lg border border-tone-ok-border bg-tone-ok-bg px-3 py-2 text-meta text-tone-ok-fg",children:[(0,t.jsx)(m.CircleCheck,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),"Its inbox is empty, so no deliveries are affected."]}):(0,t.jsxs)("div",{className:"flex gap-2 rounded-lg border border-tone-attention-border bg-tone-attention-bg p-3 text-tone-attention-fg",children:[(0,t.jsx)(g.TriangleAlert,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon) shrink-0"}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("p",{className:"text-body font-medium",children:(0,r.abandonedLine)(e)}),(0,t.jsx)("p",{className:"text-meta text-foreground",children:"Each is marked Abandoned and its sender can see that."})]})]})}function T(e){var i;let{shipName:s,openDeliveries:a,isCrewed:d,isPending:u,error:p,onConfirm:m}=e,[x,g]=(0,f.useState)(""),j=a>0,y=!j||(0,r.isTypedMatch)(s,x);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(o.AlertDialogHeader,{children:[(0,t.jsxs)(o.AlertDialogTitle,{children:["Retire ",s,"?"]}),(0,t.jsx)(o.AlertDialogDescription,{children:"Retiring ends this ship for good. Its history stays available read-only. This can’t be undone."})]}),(0,t.jsx)(L,{openDeliveries:a}),(0,t.jsx)(c.ConsequenceList,{consequences:(i=e.labelLines??[],[...d?[{icon:D.UserX,text:"The session crewing it loses it now."}]:[],...i.map(e=>({icon:N.Tags,text:e})),{icon:n.KeyRound,text:"Its secret stops working."},{icon:k.Tag,text:"It is never crewed or messaged again, and its name is free for a new ship."},{icon:S.Users,text:"Deliveries to its type stay, for the other ships of the type."}])}),j?(0,t.jsx)(I.TypedConfirm,{expected:s,value:x,onValueChange:g}):null,void 0===p?null:(0,t.jsx)(h.InlineError,{title:"Couldn’t retire the ship",description:`${p} Nothing changed.`}),(0,t.jsxs)(o.AlertDialogFooter,{children:[(0,t.jsx)(o.AlertDialogClose,{render:(0,t.jsx)(l.Button,{disabled:u}),children:"Cancel"}),(0,t.jsx)(l.Button,{variant:"destructive",isLoading:u,disabled:!y,onClick:m,children:(0,r.retireButtonLabel)(a)})]})]})}e.s(["RetireDialog",0,function(e){let{isOpen:i,onOpenChange:s,isPending:n}=e;return(0,t.jsx)(o.AlertDialog,{open:i,onOpenChange:e=>{n||s(e)},children:(0,t.jsx)(o.AlertDialogContent,{"data-testid":"retire-dialog",className:d.dialogSurface.phoneSheet,children:(0,t.jsx)(T,{...e})})})}],39844)},48287,e=>{"use strict";var t=e.i(43476),i=e.i(76561),s=e.i(85595),n=e.i(66787),a=e.i(82303),r=e.i(71645),o=e.i(26808),l=e.i(46150),d=e.i(24010),c=e.i(15905),h=e.i(94945),u=e.i(1009),p=e.i(17981),m=e.i(69374);let x={one:"delivery",many:"deliveries"};function g({role:e,othersOfRole:t,blueprint:i}){let s=0===t.length?`no ${e}`:`${String(t.length)} ${e}`;return void 0===i?`The squadron then has ${s}.`:`The squadron then has ${s}; blueprint ${i.label} has ${String(i.count)}.`}function f(e){let{squadronId:h,member:f,othersOfRole:j,blueprint:y,openDeliveries:b,inFlightDeliveries:w,isPending:v,error:C,onConfirm:k}=e,[N,D]=(0,r.useState)(""),S=b>0,I=!S||(0,o.isTypedMatch)(f.name,N),L=0===j.length;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(d.AlertDialogHeader,{children:[(0,t.jsxs)(d.AlertDialogTitle,{children:["Remove ",f.name," from ",h,"?"]}),(0,t.jsx)(d.AlertDialogDescription,{children:S?(0,t.jsx)(t.Fragment,{children:"Its ship is retired for good. This can't be undone."}):(0,t.jsx)(t.Fragment,{children:"This can't be undone. Add a member to get the role back."})})]}),S?(0,t.jsxs)("div",{role:"alert",className:"flex gap-2 rounded-lg border border-tone-attention-border bg-tone-attention-bg p-3 text-meta text-tone-attention-fg",children:[(0,t.jsx)(n.TriangleAlert,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0"}),(0,t.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("p",{className:"font-medium",children:(0,o.abandonedLine)(b)}),(0,t.jsxs)("p",{className:"text-foreground",children:[b-w," pending, ",w," in flight in its inbox. Each is marked Abandoned and its sender can see that."]})]})]}):(0,t.jsx)(u.ConsequenceList,{consequences:[{icon:i.Archive,text:`Its ship ${f.name} is retired. Its history stays read-only.`},{icon:a.Users,text:g({role:f.role,othersOfRole:j,blueprint:y})}]}),L&&(0,t.jsxs)("p",{"data-testid":"remove-member-last-of-role",className:"flex items-start gap-2 rounded-lg border border-tone-waiting-border bg-tone-waiting-bg px-3 py-2 text-meta text-tone-waiting-fg",children:[(0,t.jsx)(n.TriangleAlert,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0"}),(0,t.jsxs)("span",{children:[(0,t.jsxs)("span",{className:"font-medium",children:["The last ",f.role,"."]})," ",(0,t.jsxs)("span",{className:"text-foreground",children:[g({role:f.role,othersOfRole:j,blueprint:y})," Work for the role waits until a member is added."]})]})]}),!S&&(0,t.jsxs)("p",{className:"flex items-center gap-2 rounded-lg border border-tone-ok-border bg-tone-ok-bg px-3 py-2 text-meta text-tone-ok-fg",children:[(0,t.jsx)(s.CircleCheck,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),"Its inbox is empty, so no deliveries are affected."]}),S?(0,t.jsx)(m.TypedConfirm,{expected:f.name,value:N,onValueChange:D}):null,void 0!==C&&(0,t.jsx)(p.InlineError,{title:"Couldn’t remove the member",description:`${C} Nothing changed.`}),(0,t.jsxs)(d.AlertDialogFooter,{children:[(0,t.jsx)(d.AlertDialogClose,{render:(0,t.jsx)(c.Button,{disabled:v}),children:"Cancel"}),(0,t.jsx)(c.Button,{variant:"destructive",isLoading:v,disabled:!I,onClick:k,"data-testid":"remove-member-confirm",children:S?`Remove and abandon ${(0,l.counted)(b,x)}`:"Remove member"})]})]})}e.s(["RemoveMemberDialog",0,function(e){let{isOpen:i,onOpenChange:s,isPending:n}=e;return(0,t.jsx)(d.AlertDialog,{open:i,onOpenChange:e=>{n||s(e)},children:(0,t.jsx)(d.AlertDialogContent,{"data-testid":"remove-member-dialog",className:h.dialogSurface.phoneSheet,children:(0,t.jsx)(f,{...e})})})}])},5894,e=>{"use strict";var t=e.i(43476),i=e.i(76561),s=e.i(8734),n=e.i(86247),a=e.i(44594),r=e.i(58925),o=e.i(68997),l=e.i(15331),d=e.i(60011),c=e.i(19759),h=e.i(49319),u=e.i(57443),p=e.i(71139),m=e.i(22016),x=e.i(71645),g=e.i(5387),f=e.i(90262),j=e.i(80581),y=e.i(73330),b=e.i(53573),w=e.i(86165),v=e.i(48695),C=e.i(84294),k=e.i(84156),N=e.i(15905),D=e.i(57334),S=e.i(75305),I=e.i(41880),L=e.i(44824),T=e.i(29244),z=e.i(39874),M=e.i(48287),A=e.i(88280),R=e.i(39844),$=e.i(82532);function F({action:e,className:i}){let s=e.isPrimary?"primary":e.isDestructive||"rename"===e.key?"ghost":"secondary";return void 0!==e.href?(0,t.jsx)(N.Button,{size:"xs",variant:s,nativeButton:!1,"data-testid":e.testId,className:i,render:(0,t.jsx)(m.default,{href:e.href}),children:e.label}):(0,t.jsx)(N.Button,{size:"xs",variant:s,"data-testid":e.testId,disabled:e.isDisabled,isLoading:e.isLoading,className:i,onClick:e.onSelect,children:e.label})}function P(e,t){let i=e[t-1],s=e[t];return void 0!==i&&void 0!==s&&(!0===i.isMenuOnly&&!0!==s.isMenuOnly||!0===s.isDestructive&&!0!==i.isDestructive)}function O({layout:e,ship:i,actions:s}){if("next"===e){let e=s.find(e=>"prompt"===e.key||"crew-line"===e.key&&!0===e.isPrimary);return e?(0,t.jsx)(F,{action:{...e,isPrimary:!1},className:"max-sm:h-(--size-control-touch) max-sm:w-full max-sm:text-body-touch"}):null}if("buttons"===e){let e=s.filter(e=>!0!==e.isMenuOnly);return 0===e.length?null:(0,t.jsx)("div",{className:"flex flex-wrap items-center justify-end gap-2 max-sm:justify-start",children:e.map(e=>(0,t.jsx)(F,{action:e},e.key))})}let a=(0,t.jsx)(N.Button,{size:"sheet"===e?"touch":"xs",variant:"ghost",isIconOnly:!0,"aria-label":`Actions for ${i.name}`,icon:(0,t.jsx)(n.Ellipsis,{}),"data-testid":"fleet-actions"});return"sheet"===e?(0,t.jsxs)(S.Sheet,{children:[(0,t.jsx)(S.SheetTrigger,{render:a}),(0,t.jsxs)(S.SheetContent,{side:"bottom","data-testid":"fleet-row-sheet",children:[(0,t.jsx)(S.SheetHeader,{children:(0,t.jsx)(S.SheetTitle,{children:i.name})}),(0,t.jsx)("ul",{className:"flex flex-col pb-2",children:s.map((e,i)=>(0,t.jsx)("li",{className:P(s,i)?"mt-1 border-t border-border pt-1":void 0,children:(0,t.jsxs)(S.SheetClose,{render:void 0===e.href?(0,t.jsx)("button",{type:"button",disabled:e.isDisabled,onClick:e.onSelect}):(0,t.jsx)(m.default,{href:e.href}),"data-testid":e.testId,className:`flex h-(--size-control-touch) w-full items-center gap-3 px-4 text-left text-body-touch disabled:opacity-45 [&_svg]:size-(--size-icon) [&_svg]:shrink-0 ${e.isDestructive?"text-destructive-text":"text-foreground"}`,children:[(0,t.jsx)(e.icon,{"aria-hidden":!0}),e.menuLabel.replace(/…$/,"")]})},e.key))}),(0,t.jsx)("div",{className:"px-4 pb-4",children:(0,t.jsx)(S.SheetClose,{render:(0,t.jsx)(N.Button,{size:"touch",className:"w-full"}),children:"Cancel"})})]})]}):(0,t.jsxs)(D.DropdownMenu,{children:[(0,t.jsx)(D.DropdownMenuTrigger,{render:a}),(0,t.jsx)(D.DropdownMenuContent,{children:s.map((e,i)=>(0,t.jsxs)(x.Fragment,{children:[P(s,i)?(0,t.jsx)(D.DropdownMenuSeparator,{}):null,void 0===e.href?(0,t.jsxs)(D.DropdownMenuItem,{"data-testid":e.testId,disabled:e.isDisabled,variant:e.isDestructive?"destructive":"default",onClick:e.onSelect,children:[(0,t.jsx)(e.icon,{"aria-hidden":!0}),e.menuLabel]}):(0,t.jsxs)(D.DropdownMenuItem,{"data-testid":e.testId,render:(0,t.jsx)(m.default,{href:e.href}),children:[(0,t.jsx)(e.icon,{"aria-hidden":!0}),e.menuLabel]})]},e.key))})]})}e.s(["ShipActions",0,function({ship:e,layout:n="buttons"}){var m,N;let D=(0,f.useAccess)(),[S,F]=(0,x.useState)(),[P,q]=(0,x.useState)(!1),[B,H]=(0,x.useState)(void 0),U=(0,g.useGetStartingPrompt)(),E=(0,g.useReleaseShip)(),G=(0,g.useRetireShip)(),K=(0,g.useRecrewShip)(),V=(0,g.useRenameShip)(),W=(0,g.usePingShip)(),X=(0,g.useFleetSnapshot)(),_=(0,g.useLabelContext)(),J=(0,b.useShip)("release"===S||"recrew"===S||"retire"===S||"remove"===S?e.id:void 0),Q=(0,w.useSquadronsConnection)(),Y=(0,v.useSquadrons)(),Z=(0,v.useRemoveMember)(),ee=Y.data?.find(t=>"disbanded"!==t.state&&(t.flagship.shipId===e.id||t.members.some(t=>t.shipId===e.id))),et=void 0!==ee&&ee.flagship.shipId!==e.id,ei=(0,b.useShip)(et&&"retired"!==e.status?e.id:void 0),es=ee?.members.find(t=>t.shipId===e.id),en=(0,z.useNewCrewLineFlow)(ee&&es?{squadronId:ee.id,member:es,ship:ei.data}:void 0),ea="unknown"===Q||"connected"===Q&&!Y.isFetched,er=()=>{F(void 0)},eo=U.data??K.data,el=eo?"shown":U.isError?"error":"issuing",ed=e=>()=>{E.reset(),G.reset(),K.reset(),V.reset(),Z.reset(),F(e)},ec=async()=>{try{await navigator.clipboard.writeText(e.id),(0,I.showToast)({title:"Ship id copied",description:e.id,tone:"success"})}catch{(0,I.showToast)({title:"Couldn’t copy the ship id",description:e.id,tone:"error"})}},eh=ee?.flagship.shipId===e.id,eu={key:"message",label:"Message",menuLabel:"Message this ship…",icon:c.SquarePen,testId:"fleet-ship-message",onSelect:()=>{q(!0)},isMenuOnly:!0,needs:"canSend"},ep={key:"copy",label:"Copy ship id",menuLabel:"Copy ship id",icon:s.Copy,testId:"fleet-ship-copy-id",onSelect:()=>{ec()},isMenuOnly:!0},em=(0,y.canPing)(e)?[{key:"ping",label:"Ping",menuLabel:"Ping",icon:l.Radio,testId:"fleet-ship-ping",onSelect:()=>{W.mutate({shipId:e.id},{onSuccess:({isNew:t})=>{(0,I.showToast)(t?{title:`Pinged ${e.name}`,description:"Its session answers with pong on its next turn.",tone:"success"}:{title:`A ping already waits for ${e.name}`,description:"Pings never stack: this is the one shown.",tone:"info"})},onError:t=>{(0,I.showToast)({title:`Couldn’t ping ${e.name}`,description:t.message,tone:"error"})}})},isLoading:W.isPending,needs:"canManage"}]:[],ex=[];return"operator"===e.kind?ex.push({key:"inbox",label:"Open inbox",menuLabel:"Open inbox",icon:a.Inbox,testId:"fleet-ship-open-inbox",href:"/inbox",isMenuOnly:!0},ep):"retired"===e.status||"viewer"===e.kind?ex.push(ep):eh?ex.push({key:"squadron",label:"Open squadron",menuLabel:"Open squadron",icon:d.Shapes,testId:"fleet-ship-open-squadron",href:`/squadrons/${ee.id}`}):ea?ex.push(eu,ep,...em):es&&ee?(ex.push(eu,ep,...em,{key:"crew-line",label:"Get new crew line",menuLabel:"Get new crew line…",icon:r.KeyRound,testId:"fleet-ship-new-crew-line",onSelect:en.start,needs:"canManage",isDisabled:!en.isReady,isPrimary:"silent"===es.health}),"crewed"===e.status&&ex.push({key:"release",label:"Release",menuLabel:"Release ship…",icon:p.UserX,testId:"fleet-ship-release",onSelect:ed("release"),needs:"canManage"}),("sailing"===ee.state||"standing-down"===ee.state)&&ex.push({key:"remove",label:"Remove from squadron",menuLabel:"Remove from squadron…",icon:h.UserMinus,testId:"fleet-ship-remove",onSelect:ed("remove"),isDestructive:!0,needs:"canManage"})):(ex.push(eu,ep),"awaitingCrew"===e.status?ex.push({key:"prompt",label:"Get starting prompt",menuLabel:"Get starting prompt…",icon:r.KeyRound,testId:"fleet-ship-prompt",onSelect:()=>{U.reset(),K.reset(),H((0,k.isUnclaimedPromptOut)(e)&&e.startingPrompt?{issuedAt:e.startingPrompt.issuedAt}:void 0),F("prompt"),U.mutate({shipId:e.id})},needs:"canManage"}):ex.push(...em,{key:"recrew",label:"Re-crew",menuLabel:"Re-crew…",icon:u.UserPlus,testId:"fleet-ship-recrew",onSelect:ed("recrew"),needs:"canManage"},{key:"release",label:"Release",menuLabel:"Release ship…",icon:p.UserX,testId:"fleet-ship-release",onSelect:ed("release"),needs:"canManage"}),ex.push({key:"rename",label:"Rename",menuLabel:"Rename…",icon:o.Pen,testId:"fleet-ship-rename",onSelect:ed("rename"),needs:"canManage"},{key:"retire",label:"Retire",menuLabel:"Retire ship…",icon:i.Archive,testId:"fleet-ship-retire",onSelect:ed("retire"),isDestructive:!0,needs:"canManage"})),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(O,{layout:n,ship:e,actions:(m=ex,N=D,m.filter(e=>void 0===e.needs||N[e.needs]))}),(0,t.jsx)(T.ReleaseDialog,{shipName:e.name,sessionLocation:null===e.location?null:e.location.description??e.location.kind.toLowerCase(),inFlightCount:J.data?.inFlightDeliveries??0,mode:"recrew"===S?"recrew":"release",isOpen:("release"===S||"recrew"===S)&&void 0!==J.data,onOpenChange:e=>{e||er()},isPending:E.isPending||K.isPending,error:("recrew"===S?K.error:E.error)?.message,onConfirm:()=>{"recrew"===S?K.mutate({shipId:e.id},{onSuccess:()=>{H(void 0),F("prompt")}}):E.mutate({shipId:e.id},{onSuccess:er})}}),(0,t.jsx)(R.RetireDialog,{shipName:e.name,openDeliveries:J.data?.openDeliveries??0,isCrewed:"crewed"===e.status,isOpen:"retire"===S&&void 0!==J.data,onOpenChange:e=>{e||er()},isPending:G.isPending,error:G.error?.message,onConfirm:()=>{G.mutate({shipId:e.id},{onSuccess:er})},labelLines:void 0===_?void 0:(0,j.retireLabelLines)((0,j.retiredLabelsOf)(e,_))}),ee&&es&&(0,t.jsx)(M.RemoveMemberDialog,{squadronId:ee.id,member:es,othersOfRole:(0,C.otherMembersOfRole)(ee,es.shipId),openDeliveries:J.data?.openDeliveries??0,inFlightDeliveries:J.data?.inFlightDeliveries??0,isOpen:"remove"===S&&void 0!==J.data,onOpenChange:e=>{e||er()},isPending:Z.isPending,error:Z.error?.message,onConfirm:()=>{Z.mutate({squadronId:ee.id,shipId:es.shipId},{onSuccess:er})}}),(0,t.jsx)(A.RenameDialog,{shipName:e.name,activeNames:(X.data??[]).filter(e=>"retired"!==e.status).map(e=>e.name),isOpen:"rename"===S,onOpenChange:e=>{e||er()},isPending:V.isPending,error:V.error?.message,onSubmit:t=>{V.mutate({shipId:e.id,name:t},{onSuccess:er})}}),(0,t.jsx)($.StartingPromptDialog,{shipName:e.name,state:el,prompt:eo?.prompt,crewLines:eo?.crewLines,replacesUnclaimed:B,error:U.error?.message,isOpen:"prompt"===S,onOpenChange:e=>{e||(U.reset(),K.reset(),er())},onConfirm:()=>{K.reset(),U.mutate({shipId:e.id})}}),en.dialog,P&&(0,t.jsx)(L.ComposeMessage,{isOpen:!0,onOpenChange:q,toShipId:e.id})]})}])},82532,e=>{"use strict";var t=e.i(43476),i=e.i(22768),s=e.i(10818),n=e.i(25398),a=e.i(71645),r=e.i(49635),o=e.i(15905),l=e.i(91703),d=e.i(22212),c=e.i(94945),h=e.i(19321),u=e.i(56478),p=e.i(17981);function m({shipName:e,prompt:n,crewLines:r}){let[o,d]=(0,a.useState)(!1),c=()=>{d(!1)},h=()=>{d(!0)};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"flex gap-2 rounded-lg border border-border bg-muted px-3 py-2 text-meta text-foreground",children:[(0,t.jsx)(s.Info,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0 text-muted-foreground"}),(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"font-medium",children:"Shown once. Copy it now."})," If you lose it, get a new one; this one then stops working."]})]}),(0,t.jsx)(l.CodeBlock,{label:`Starting prompt for ${e}`,code:n,isWrapped:!0,copyLabel:`Copy the starting prompt for ${e}`,codeTestId:"starting-prompt-text",copyTestId:"starting-prompt-copy",onCopied:c,onCopyFailed:h}),(0,t.jsx)(u.CrewLines,{crewLines:r,subject:e,testIdPrefix:"starting-prompt-crew-line",onCopied:c,onCopyFailed:h}),(0,t.jsx)("p",{role:"status",className:"flex items-center gap-1.5 text-meta text-destructive-text empty:hidden",children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.CircleAlert,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),"Could not copy: select the text and copy it by hand."]}):null})]})}e.s(["StartingPromptDialog",0,function(e){let{shipName:i,state:s,prompt:a,crewLines:l,replacesUnclaimed:u,error:x,isOpen:g,onOpenChange:f,onConfirm:j}=e,y="issuing"===s;return(0,t.jsx)(d.Dialog,{open:g,onOpenChange:e=>{y||f(e)},children:(0,t.jsxs)(d.DialogContent,{size:"md","data-testid":"starting-prompt-dialog",className:c.dialogSurface.phoneFullScreen,children:[(0,t.jsxs)(d.DialogHeader,{children:[(0,t.jsxs)(d.DialogTitle,{children:["Starting prompt for ",i]}),(0,t.jsxs)(d.DialogDescription,{children:["Paste it into the agent session that should crew this ship, or a crew line into Claude Code or Codex with the aeolus plugin. Any earlier prompt for ",i," stops working now."]})]}),"error"!==s&&u?(0,t.jsxs)("p",{className:"rounded-lg border border-tone-waiting-border bg-tone-waiting-bg px-3 py-2 text-meta text-tone-waiting-fg",children:["This prompt stops the one issued"," ",(0,t.jsx)("time",{dateTime:u.issuedAt,children:(0,r.shortDateTime)(new Date(u.issuedAt))})," ","working."]}):null,y?(0,t.jsxs)("div",{"aria-busy":!0,className:"flex flex-col gap-3",children:[(0,t.jsx)("span",{className:"sr-only",children:"Issuing a starting prompt..."}),(0,t.jsx)(h.Skeleton,{className:"h-10 w-full rounded-lg"}),(0,t.jsx)(h.Skeleton,{className:"h-40 w-full rounded-lg"})]}):null,"shown"===s&&void 0!==a&&void 0!==l?(0,t.jsx)(m,{shipName:i,prompt:a,crewLines:l}):null,"error"===s?(0,t.jsx)(p.InlineError,{title:"Couldn’t issue a starting prompt",description:`${x??"The server did not answer."} No new secret was created; any earlier prompt still works.`}):null,(0,t.jsxs)(d.DialogFooter,{children:["issuing"===s||"shown"===s?(0,t.jsx)(d.DialogClose,{render:(0,t.jsx)(o.Button,{variant:"primary",disabled:y}),children:"Done"}):null,"error"===s?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.DialogClose,{render:(0,t.jsx)(o.Button,{}),children:"Close"}),(0,t.jsx)(o.Button,{variant:"primary",icon:(0,t.jsx)(n.RotateCw,{}),onClick:j,children:"Try again"})]}):null]})]})})}])},84156,e=>{"use strict";e.s(["isUnclaimedPromptOut",0,function(e){return null!==e.startingPrompt&&!e.startingPrompt.isClaimed}])}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,31458,e=>{"use strict";var s=e.i(56420);let r={name:"flag",size:24,node:[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]]};r.node;let t=(0,s.default)(r);e.s(["Flag",0,t],31458)},29870,e=>{"use strict";var s=e.i(56420);let r={name:"lock",size:24,node:[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]};r.node;let t=(0,s.default)(r);e.s(["Lock",0,t],29870)},98274,e=>{"use strict";var s=e.i(43476),r=e.i(18566),t=e.i(71645),a=e.i(67874),n=e.i(17981),i=e.i(88393),o=e.i(29870),l=e.i(77071),d=e.i(49635),c=e.i(84294),m=e.i(66390),u=e.i(15905),h=e.i(46033),x=e.i(14732),p=e.i(1935),f=e.i(67551),b=e.i(78865);function g({blueprint:e,version:r,onVersionChange:t,templates:a,squadrons:n,onForm:i}){let j=e.versions.find(e=>e.version===r)??e.versions[0];if(!j)return null;let v=e.versions[0]?.version,w=Object.fromEntries(e.versions.map(e=>[String(e.version),`v${String(e.version)}${e.version===v?" (latest)":""}`]));return(0,s.jsxs)("div",{"data-testid":"blueprint-view",className:"flex flex-col gap-5",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsx)(m.Badge,{variant:"secondary",children:"Blueprint"}),(0,s.jsxs)(h.Select,{items:w,value:String(j.version),onValueChange:e=>{t(Number(e))},children:[(0,s.jsxs)(h.SelectTrigger,{"aria-label":"Version","data-testid":"blueprint-version",children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"Version"}),(0,s.jsx)(h.SelectValue,{className:"font-medium"})]}),(0,s.jsx)(h.SelectContent,{children:Object.entries(w).map(([e,r])=>(0,s.jsx)(h.SelectItem,{value:e,children:r},e))})]}),(0,s.jsxs)("span",{"data-testid":"blueprint-source",className:"text-meta text-muted-foreground",children:[(0,s.jsx)("span",{className:"font-mono",children:j.file})," at ",(0,s.jsx)("span",{className:"font-mono",children:j.commit.slice(0,7)}),", ",(0,d.dayDate)(new Date(j.committedAt))]}),i&&(0,s.jsx)(u.Button,{variant:"primary",icon:(0,s.jsx)(l.Plus,{"aria-hidden":!0}),onClick:i,className:"ml-auto","data-testid":"blueprint-form",children:"Form squadron"})]}),(0,s.jsxs)("p",{className:"flex items-center gap-2 rounded-md bg-muted px-3 py-2 text-meta text-muted-foreground",children:[(0,s.jsx)(o.Lock,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),"Read-only. Blueprints are edited in git; new tags show up here as new versions."]}),(0,s.jsxs)("div",{className:"grid gap-5 lg:grid-cols-[minmax(0,2fr)_minmax(0,1fr)]",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,s.jsxs)("section",{"aria-labelledby":"blueprint-roles",className:"flex flex-col gap-2",children:[(0,s.jsx)("h2",{id:"blueprint-roles",className:"text-body font-semibold",children:"Roles"}),(0,s.jsxs)(x.Table,{children:[(0,s.jsx)(x.TableHeader,{children:(0,s.jsxs)(x.TableRow,{children:[(0,s.jsx)(x.TableHead,{children:"Role"}),(0,s.jsx)(x.TableHead,{children:"Template"}),(0,s.jsx)(x.TableHead,{children:"Members"}),(0,s.jsx)(x.TableHead,{children:"Check-in"}),(0,s.jsx)(x.TableHead,{children:"Launch note"})]})}),(0,s.jsx)(x.TableBody,{children:j.roles.map(e=>{let r,t=(r=e.template,a.find(e=>e.repository===r.repository&&e.name===r.name&&e.version===r.version));return(0,s.jsxs)(x.TableRow,{"data-testid":"blueprint-role",children:[(0,s.jsx)(x.TableCell,{children:(0,s.jsx)(m.Badge,{variant:"type",children:e.name})}),(0,s.jsx)(x.TableCell,{className:"font-mono",children:`${e.template.name}@${String(e.template.version)}`}),(0,s.jsx)(x.TableCell,{children:e.count}),(0,s.jsx)(x.TableCell,{children:t?(0,c.checkInText)(t.checkInMinutes):"unknown"}),(0,s.jsx)(x.TableCell,{className:"max-w-64 truncate text-muted-foreground",children:t?.launchNote??""})]},e.name)})})]})]}),(0,s.jsx)(f.HandoffWiring,{blueprint:j})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,s.jsxs)("section",{"aria-labelledby":"blueprint-versions",className:"flex flex-col gap-2",children:[(0,s.jsx)("h2",{id:"blueprint-versions",className:"text-body font-semibold",children:"Versions"}),(0,s.jsx)("ul",{className:"divide-y divide-border overflow-hidden rounded-lg border border-border",children:e.versions.map(e=>(0,s.jsxs)("li",{className:"flex gap-3 px-3 py-2 text-meta",children:[(0,s.jsxs)("span",{className:"font-mono font-medium",children:["v",e.version]}),(0,s.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,s.jsxs)("span",{children:[e.description," ",e.version===v&&(0,s.jsx)(m.Badge,{variant:"outline",children:"Latest"})]}),(0,s.jsxs)("span",{className:"text-muted-foreground",children:[(0,d.dayDate)(new Date(e.committedAt))," · ",(0,s.jsx)("span",{className:"font-mono",children:e.commit.slice(0,7)})]})]})]},e.version))})]}),(0,s.jsxs)("section",{"aria-labelledby":"blueprint-squadrons",className:"flex flex-col gap-2",children:[(0,s.jsx)("h2",{id:"blueprint-squadrons",className:"text-body font-semibold",children:"Squadrons from this blueprint"}),0===n.length?(0,s.jsx)("p",{className:"text-meta text-muted-foreground",children:"None yet."}):(0,s.jsx)("ul",{className:"flex flex-col gap-1.5 rounded-lg border border-border p-3",children:n.map(e=>(0,s.jsxs)("li",{className:"flex items-center gap-2 text-meta",children:[(0,s.jsx)(p.SquadronTag,{squadronId:e.id,size:"sm"}),(0,s.jsxs)("span",{className:"text-muted-foreground",children:["v",e.blueprint.version]}),(0,s.jsx)(b.StatusBadge,{status:e.state,className:"ml-auto"})]},e.id))})]})]})]})]})}var j=e.i(44824),v=e.i(45608),w=e.i(95475),y=e.i(2767),k=e.i(71164),N=e.i(274),C=e.i(33939),S=e.i(90262),T=e.i(88721),q=e.i(86413),F=e.i(18423),B=e.i(28459),L=e.i(96676),O=e.i(78485),$=e.i(86165),D=e.i(48695),I=e.i(3979);e.s(["default",0,function({params:e,searchParams:o}){let l=decodeURIComponent((0,t.use)(e).name),d=(0,t.use)(o),m=(0,r.useRouter)(),u=(0,L.useNow)(),h=(0,T.useAccountMenu)(u),x=(0,q.useOpenInboxCount)(),p=(0,B.useNeedsAttention)(),f=(0,B.useAttentionCount)(),b=(0,F.useLiveFleet)(),P=(0,D.useCatalogue)(),H=(0,$.useSquadronsConnection)(),R=(0,D.useSquadrons)(),[z,E]=(0,t.useState)(!1),M=(0,S.useAccess)(),V=(0,I.usePluginNav)(),[A,_]=(0,t.useState)(!1),[W,U]=(0,t.useState)(!1);(0,O.useSignInWhenSessionEnds)([p.error,b.error]);let J=(0,c.blueprintChoices)(P.data??{blueprints:[]}),K=J.find(e=>e.name===l&&(void 0===d.repository||e.repository===d.repository)),G=Number(d.version??K?.versions[0]?.version);return(0,s.jsxs)(N.DetailLayout,{title:l,parents:[{href:"/squadrons",label:"Squadrons"},{href:"/squadrons?tab=blueprints",label:"Blueprints"}],header:(0,s.jsx)("h1",{className:"text-title font-semibold",children:l}),live:b.live,nav:{active:"squadrons",inboxCount:x,attentionCount:f,...V},onCompose:M.canSend?()=>{_(!0)}:void 0,onSearch:()=>{U(!0)},account:h,banner:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(y.ConsoleNotices,{}),(0,s.jsx)(w.ConsoleGuide,{})]}),children:["not-connected"===H?(0,s.jsx)(C.SquadronsNotConnected,{}):P.isError?(0,s.jsx)(n.InlineError,{title:"Couldn’t read the blueprint",description:"The squadron manager couldn’t read the catalogue. Squadrons formed from it keep sailing.",detail:P.error.message,onRetry:()=>{P.refetch()}}):P.data?K?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(g,{blueprint:K,version:G,onVersionChange:e=>{m.replace((0,c.blueprintPath)({repository:K.repository,name:K.name,version:e}))},templates:P.data.templates,squadrons:(0,c.squadronsFromBlueprint)(R.data??[],K),onForm:M.canManage?()=>{E(!0)}:void 0}),(0,s.jsx)(k.FormSquadron,{blueprints:J,templates:P.data.templates,initial:{key:K.key,version:G},isOpen:z,onOpenChange:E,onFormed:e=>{E(!1),m.push(`/squadrons/${e}`)}},`${K.key}@${String(G)}`)]}):(0,s.jsx)(a.EmptyState,{title:"No such blueprint",description:`git holds no blueprint ${l}.`}):(0,s.jsx)(i.LoadingSkeleton,{variant:"detail",label:"Loading the blueprint"}),(0,s.jsx)(j.ComposeMessage,{isOpen:A,onOpenChange:_}),(0,s.jsx)(v.ConsoleCommands,{isOpen:W,onOpenChange:U,onCompose:()=>{_(!0)}})]})}],98274)},14732,e=>{"use strict";var s=e.i(43476),r=e.i(90063);e.s(["Table",0,function({className:e,...t}){return(0,s.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto rounded-lg border border-border bg-card shadow-sm",children:(0,s.jsx)("table",{"data-slot":"table",className:(0,r.classNames)("w-full caption-bottom text-body",e),...t})})},"TableBody",0,function({className:e,...t}){return(0,s.jsx)("tbody",{"data-slot":"table-body",className:(0,r.classNames)("[&_tr:last-child]:border-0",e),...t})},"TableCell",0,function({className:e,...t}){return(0,s.jsx)("td",{"data-slot":"table-cell",className:(0,r.classNames)("px-4 align-middle",e),...t})},"TableHead",0,function({className:e,...t}){return(0,s.jsx)("th",{"data-slot":"table-head",className:(0,r.classNames)("px-4 text-left align-middle text-caption font-medium whitespace-nowrap text-muted-foreground",e),...t})},"TableHeader",0,function({className:e,...t}){return(0,s.jsx)("thead",{"data-slot":"table-header",className:(0,r.classNames)("bg-muted [&_tr]:border-b",e),...t})},"TableRow",0,function({className:e,...t}){return(0,s.jsx)("tr",{"data-slot":"table-row",className:(0,r.classNames)("h-(--size-row) border-b border-border transition-colors duration-(--duration-fast) hover:bg-muted has-focus-visible:outline-2 has-focus-visible:-outline-offset-2 has-focus-visible:outline-ring data-new:animate-highlight [thead_&]:h-(--size-row-header) [thead_&]:hover:bg-transparent",e),...t})}])},1935,e=>{"use strict";var s=e.i(43476),r=e.i(60011),t=e.i(22016),a=e.i(90063);e.s(["SquadronTag",0,function({squadronId:e,role:n,size:i="md",className:o}){return(0,s.jsxs)(t.default,{href:`/squadrons/${e}`,"data-slot":"squadron-tag",className:(0,a.classNames)("inline-flex max-w-full items-center gap-1 rounded-sm bg-secondary px-1.5 text-secondary-foreground hover:underline [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0","sm"===i?"h-5.5 text-meta":"h-6 text-body",o),children:[(0,s.jsx)(r.Shapes,{"aria-hidden":!0}),(0,s.jsx)("span",{className:"truncate font-medium",children:e}),void 0!==n&&(0,s.jsxs)("span",{className:"shrink-0 text-muted-foreground",children:["· ",n]})]})}])},33939,e=>{"use strict";var s=e.i(43476),r=e.i(94831),t=e.i(22016),a=e.i(15905),n=e.i(67874);e.s(["SquadronsNotConnected",0,function(){return(0,s.jsx)(n.EmptyState,{icon:(0,s.jsx)(r.Unplug,{"aria-hidden":!0}),title:"Squadrons is not connected",description:"Connect it in Settings; squadrons, blueprints and templates show up here then.",action:(0,s.jsx)(a.Button,{nativeButton:!1,render:(0,s.jsx)(t.default,{href:"/settings"}),"data-testid":"squadrons-open-settings",children:"Open Settings"})})}])},71164,e=>{"use strict";var s=e.i(43476),r=e.i(71645),t=e.i(10649),a=e.i(5387),n=e.i(80581);function i(e,s){return s?.labels.find(s=>s.key===e.key)?.values.find(s=>s.value===e.value)?.id}function o(e,s){return e.map(e=>{let r=e.crew.machineLabels??[];return{slot:e.slot,role:e.role,template:`${e.template.name}@${String(e.template.version)}`,harness:e.crew.harness??"",workspace:function(e){if(void 0!==e)return"worktree"===e.kind?{kind:"worktree",repository:e.repository}:{kind:"folder",name:e.name}}(e.crew.workspace),firstPrompt:e.crew.firstPrompt??"",options:{...e.crew.options},machineLabels:r.flatMap(e=>i(e,s)??[]),unknownLabels:r.filter(e=>void 0===i(e,s)).map(e=>`${e.key}=${e.value}`),parameters:e.parameters.map(e=>({name:e.name,description:e.description,value:e.value??""}))}})}function l(e){return[...void 0===e.workspace?["workspace"]:[],...e.parameters.filter(e=>""===e.value.trim()).map(e=>e.name)]}function d(e,s){return[...void 0===s?[]:(0,n.pickedChips)(e.machineLabels,s).map(e=>({key:e.key,value:e.value})),...e.unknownLabels.map(e=>{let[s="",r=""]=e.split("=");return{key:s,value:r}})]}function c(e){return"worktree"===e.kind?`worktree:${e.repository}`:`folder:${e.name}`}function m(e){let[s,...r]=e.split(":"),t=r.join(":");return"worktree"===s?{kind:"worktree",repository:t}:"folder"===s?{kind:"folder",name:t}:void 0}var u=e.i(78608),h=e.i(48695),x=e.i(265),p=e.i(10818),f=e.i(25398),b=e.i(84294),g=e.i(15905),j=e.i(22212),v=e.i(94945),w=e.i(91727),y=e.i(46033),k=e.i(14732),N=e.i(17981),C=e.i(16327),S=e.i(67927),T=e.i(85595),q=e.i(52886),F=e.i(90063),B=e.i(66616),L=e.i(12470),O=e.i(43988),$=e.i(4032);function D({id:e,label:r,isRequired:t,hint:a,children:n}){return(0,s.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,s.jsxs)(w.Label,{htmlFor:e,children:[r,(0,s.jsx)("span",{className:"font-normal text-muted-foreground",children:t?" required":" optional"})]}),n,void 0===a?null:(0,s.jsx)("p",{className:"text-meta text-muted-foreground",children:a})]})}function I({id:e,items:r,value:t,onPick:a,isDisabled:n,testId:i}){return(0,s.jsxs)(y.Select,{items:r,value:t,disabled:n,onValueChange:e=>{a("string"==typeof e?e:"")},children:[(0,s.jsx)(y.SelectTrigger,{id:e,"data-testid":i,children:(0,s.jsx)(y.SelectValue,{})}),(0,s.jsx)(y.SelectContent,{children:Object.entries(r).map(([e,r])=>(0,s.jsx)(y.SelectItem,{value:e,children:r},e))})]})}function P(e){return"string"==typeof e?e:JSON.stringify(e)}function H({member:e,offers:t,workspaces:a,machineLabels:n,isOpen:i,onOpenChange:o,isDisabled:d,error:u,onChange:h}){let x={workspace:(0,r.useId)(),harness:(0,r.useId)(),options:(0,r.useId)(),firstPrompt:(0,r.useId)(),parameters:(0,r.useId)()},p=l(e),f=t.find(s=>s.harness===e.harness),b={"":"The trierarch’s default",...Object.fromEntries(t.map(e=>[e.harness,(0,B.harnessWord)(e.harness)])),...""===e.harness||f?{}:{[e.harness]:(0,B.harnessWord)(e.harness)}},g=new Set((f?.options??[]).map(e=>e.name)),j=Object.entries(e.options).filter(([e])=>!g.has(e)),v=i?C.ChevronDown:S.ChevronRight;return(0,s.jsxs)("section",{"aria-label":e.slot,"data-testid":"member-crew-section",className:(0,F.classNames)("flex flex-col rounded-lg border bg-card",void 0===u?"border-border":"border-tone-attention-border"),children:[(0,s.jsxs)("button",{type:"button","aria-expanded":i,"data-testid":"member-crew-toggle",className:"flex min-h-11 items-center gap-2.5 px-3.5 py-2 text-left focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",onClick:()=>{o(!i)},children:[(0,s.jsx)(v,{"aria-hidden":!0,className:"text-muted-foreground"}),(0,s.jsx)("span",{className:"font-mono text-body font-medium",children:e.slot}),(0,s.jsx)("span",{className:"font-mono text-meta text-muted-foreground",children:e.template}),(0,s.jsx)("span",{className:"flex-1"}),0===p.length?(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 text-meta text-tone-ok-fg","data-testid":"member-crew-ready",children:[(0,s.jsx)(T.CircleCheck,{"aria-hidden":!0}),"Ready"]}):(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 text-meta text-tone-waiting-fg","data-testid":"member-crew-missing",children:[(0,s.jsx)(q.CircleDashed,{"aria-hidden":!0}),"Needs ",p.join(", ")]})]}),void 0===u?null:(0,s.jsx)("div",{className:"px-3.5 pb-3",children:(0,s.jsx)(N.InlineError,{variant:"field",title:u})}),i?(0,s.jsxs)("div",{className:"flex flex-col gap-4 border-t border-border px-3.5 py-3.5",children:[(0,s.jsx)(D,{id:x.workspace,label:"Workspace",isRequired:!0,hint:"A repository gets a new git worktree for this ship; a folder is used as it is.",children:(0,s.jsx)(I,{id:x.workspace,items:a,value:void 0===e.workspace?"":c(e.workspace),isDisabled:d,testId:"member-crew-workspace",onPick:s=>{h({...e,workspace:m(s)})}})}),(0,s.jsx)(D,{id:x.harness,label:"Harness",children:(0,s.jsx)(I,{id:x.harness,items:b,value:e.harness,isDisabled:d,testId:"member-crew-harness",onPick:s=>{h({...e,harness:s})}})}),(f?.options??[]).map((r,t)=>(0,s.jsx)(D,{id:`${x.options}-${String(t)}`,label:r.name,children:(0,s.jsx)(I,{id:`${x.options}-${String(t)}`,items:{"":"The trierarch’s default",...Object.fromEntries(r.values.map(e=>[e,e===r.defaultValue?`${e} (default)`:e])),..."string"==typeof e.options[r.name]&&!r.values.includes(P(e.options[r.name]))?{[P(e.options[r.name])]:P(e.options[r.name])}:{}},value:void 0===e.options[r.name]?"":P(e.options[r.name]),isDisabled:d,testId:"member-crew-option",onPick:s=>{let t=Object.fromEntries(Object.entries(e.options).filter(([e])=>e!==r.name));h({...e,options:""===s?t:{...t,[r.name]:s}})}})},r.name)),0===j.length?null:(0,s.jsxs)("div",{className:"flex flex-col gap-1","data-testid":"member-crew-file-options",children:[(0,s.jsx)("span",{className:"text-body font-medium",children:"From its files"}),(0,s.jsx)("ul",{className:"flex flex-wrap gap-1.5",children:j.map(([e,r])=>(0,s.jsxs)("li",{className:"rounded-sm bg-secondary px-1.5 py-0.5 font-mono text-id",children:[e,"=",P(r)]},e))})]}),void 0===n?null:(0,s.jsx)($.MachineLabelsField,{shipName:e.slot,picked:n.chipsOf(e.machineLabels),groups:n.groups,match:n.matchOf(e.machineLabels),isDisabled:d,unknown:e.unknownLabels,onAdd:s=>{h({...e,machineLabels:[...e.machineLabels,s]})},onRemove:s=>{h({...e,machineLabels:e.machineLabels.filter(e=>e!==s)})},onRemoveUnknown:s=>{h({...e,unknownLabels:e.unknownLabels.filter(e=>e!==s)})}}),(0,s.jsx)(D,{id:x.firstPrompt,label:"First prompt",hint:"The session starts with it, on its first start only.",children:(0,s.jsx)(O.Textarea,{id:x.firstPrompt,value:e.firstPrompt,disabled:d,"data-testid":"member-crew-first-prompt",rows:2,onChange:s=>{h({...e,firstPrompt:s.target.value})}})}),e.parameters.map((r,t)=>(0,s.jsx)(D,{id:`${x.parameters}-${String(t)}`,label:r.name,isRequired:!0,hint:r.description,children:(0,s.jsx)(L.Input,{id:`${x.parameters}-${String(t)}`,value:r.value,disabled:d,"aria-invalid":""===r.value.trim()||void 0,"data-testid":"member-crew-parameter",onChange:s=>{h({...e,parameters:e.parameters.map(e=>e.name===r.name?{...e,value:s.target.value}:e)})}})},r.name))]}):null]})}function R({drafts:e,crew:t,isPending:a,error:n,onBack:i,onSubmit:u}){let h=(0,r.useId)(),[x,p]=(0,r.useState)(()=>o(e,t.context)),[f,b]=(0,r.useState)(()=>new Set(o(e,t.context).filter(e=>l(e).length>0).map(e=>e.slot))),v=function(e,s){let r=new Map;for(let s of e){for(let e of s.repositories)r.set(c({kind:"worktree",repository:e}),`${e} \xb7 new worktree`);for(let e of s.folders)r.set(c({kind:"folder",name:e}),`${e} \xb7 folder, as it is`)}for(let{workspace:e}of s)void 0===e||r.has(c(e))||r.set(c(e),"worktree"===e.kind?`${e.repository} \xb7 new worktree, no machine offers it yet`:`${e.name} \xb7 folder, no machine offers it yet`);return Object.fromEntries(r)}(t.offers,x),{ready:k,total:C}={ready:x.filter(e=>0===l(e).length).length,total:x.length},S=k===C,T=void 0===n?void 0:function(e,s){let{members:r,context:t}=s,[,a]=/machine label (\S+?),/.exec(e)??[];if(void 0!==a)return r.find(e=>d(e,t).some(e=>`${e.key}=${e.value}`===a))?.slot}(n,{members:x,context:t.context}),q=x.some(e=>void 0===e.workspace);return(0,s.jsxs)(s.Fragment,{children:[0===t.offers.length?(0,s.jsx)("p",{role:"status",className:"rounded-md border border-tone-waiting-border bg-tone-waiting-bg px-3 py-2 text-meta text-tone-waiting-fg",children:"No machine answers with what it offers yet, so there is no workspace to pick. Join a machine under Trierarchs, or wait for its trierarch to report."}):null,q&&Object.keys(v).length>0?(0,s.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,s.jsx)(w.Label,{htmlFor:h,children:"Workspace for every member without one"}),(0,s.jsxs)(y.Select,{items:{"":"Pick a workspace",...v},value:"",disabled:a,onValueChange:e=>{let s="string"==typeof e?m(e):void 0;void 0!==s&&p(e=>e.map(e=>void 0===e.workspace?{...e,workspace:s}:e))},children:[(0,s.jsx)(y.SelectTrigger,{id:h,"data-testid":"form-squadron-workspace-all",children:(0,s.jsx)(y.SelectValue,{})}),(0,s.jsx)(y.SelectContent,{children:Object.entries(v).map(([e,r])=>(0,s.jsx)(y.SelectItem,{value:e,children:r},e))})]})]}):null,(0,s.jsx)("div",{className:"-mx-1 flex max-h-[55vh] flex-col gap-2 overflow-y-auto px-1 max-sm:max-h-none max-sm:flex-1","data-testid":"form-squadron-members",children:x.map(e=>(0,s.jsx)(H,{member:e,offers:t.offers,workspaces:v,...void 0===t.machineLabels?{}:{machineLabels:t.machineLabels},isOpen:f.has(e.slot)||T===e.slot,onOpenChange:s=>{b(r=>{let t=new Set(r);return s?t.add(e.slot):t.delete(e.slot),t})},isDisabled:a,...T===e.slot&&void 0!==n?{error:n}:{},onChange:e=>{p(s=>s.map(s=>s.slot===e.slot?e:s))}},e.slot))}),void 0!==n&&void 0===T?(0,s.jsx)(N.InlineError,{variant:"field",title:"Couldn’t form the squadron",description:n}):null,(0,s.jsxs)(j.DialogFooter,{className:"items-center border-t border-border pt-3",children:[(0,s.jsxs)("span",{className:"mr-auto text-meta tabular-nums","data-testid":"form-squadron-ready","aria-live":"polite",children:[k," of ",C," ",1===C?"member":"members"," ready"]}),(0,s.jsx)(g.Button,{type:"button",disabled:a,onClick:i,children:"Back"}),(0,s.jsx)(g.Button,{variant:"primary",isLoading:a,disabled:!S,"data-testid":"form-squadron-submit",onClick:()=>{u(x)},children:a?"Forming":"Form squadron"})]})]})}function z({blueprints:e,templates:t,isPending:a,error:n,onSubmit:i,initial:o,crew:l,onPicked:d}){let[c,m]=(0,r.useState)(1),[u,h]=(0,r.useState)(o?.key??e[0]?.key),x=e.find(e=>e.key===u)??e[0],[v,C]=(0,r.useState)(o?.version??x?.versions[0]?.version),S=x?.versions.find(e=>e.version===v)??x?.versions[0];if(!x||!S)return null;if(1===c){let r=Object.fromEntries(x.versions.map((e,s)=>[String(e.version),`v${String(e.version)}${0===s?" (latest)":""}`]));return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(j.DialogHeader,{children:[(0,s.jsx)(j.DialogTitle,{children:"Form a squadron"}),(0,s.jsx)(j.DialogDescription,{children:"Step 1 of 2. Pick a blueprint and the version to form it from."})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)("span",{className:"text-meta font-medium",children:"Blueprint"}),(0,s.jsx)("div",{role:"radiogroup","aria-label":"Blueprint",className:"flex flex-col gap-2",children:e.map(e=>{let r=e.versions[0],t=e.key===x.key;return(0,s.jsxs)("button",{type:"button",role:"radio","aria-checked":t,"data-testid":"form-squadron-blueprint",onClick:()=>{h(e.key),C(e.versions[0]?.version)},className:"flex flex-col items-start gap-0.5 rounded-md border border-border px-3 py-2 text-left aria-checked:border-primary aria-checked:ring-1 aria-checked:ring-primary",children:[(0,s.jsxs)("span",{className:"text-body font-medium",children:[e.name," ",(0,s.jsxs)("span",{className:"font-mono text-meta text-muted-foreground",children:["v",r?.version,", latest"]})]}),(0,s.jsx)("span",{className:"text-meta text-muted-foreground",children:r?.description})]},e.key)})})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,s.jsx)(w.Label,{htmlFor:"form-squadron-version",children:"Version"}),(0,s.jsxs)(y.Select,{items:r,value:String(S.version),onValueChange:e=>{C(Number(e))},children:[(0,s.jsx)(y.SelectTrigger,{id:"form-squadron-version","aria-label":"Version",children:(0,s.jsx)(y.SelectValue,{})}),(0,s.jsx)(y.SelectContent,{children:Object.entries(r).map(([e,r])=>(0,s.jsx)(y.SelectItem,{value:e,children:r},e))})]}),(0,s.jsx)("p",{className:"text-meta text-muted-foreground",children:"Older versions stay available. Squadrons keep the version they were formed with."})]}),(0,s.jsxs)(j.DialogFooter,{children:[(0,s.jsx)(j.DialogClose,{render:(0,s.jsx)(g.Button,{type:"button"}),children:"Cancel"}),(0,s.jsx)(g.Button,{variant:"primary","data-testid":"form-squadron-preview",onClick:()=>{d?.({repository:S.repository,name:S.name,version:S.version}),m(2)},children:void 0===l?"Preview roles":"Next: the members"})]})]})}let T={repository:S.repository,name:S.name,version:S.version};if(void 0!==l)return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(j.DialogHeader,{children:[(0,s.jsxs)(j.DialogTitle,{children:["Form a squadron from ",S.name," v",S.version]}),(0,s.jsxs)(j.DialogDescription,{children:["Step 2 of 2. Each member, prefilled from its template and the blueprint. A workspace and every parameter are needed; the rest is optional. Forming commissions ",(0,b.memberCount)(S)," member ships and a flagship, and requests a crew for each member."]})]}),"ready"===l.state?(0,s.jsx)(R,{drafts:l.members,crew:l,isPending:a,...void 0===n?{}:{error:n},onBack:()=>{m(1)},onSubmit:e=>{i(T,e)}}):(0,s.jsxs)(s.Fragment,{children:["loading"===l.state?(0,s.jsx)("p",{className:"text-meta text-muted-foreground","data-testid":"form-squadron-members-loading",children:"Reading each member’s crew settings from its files."}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(N.InlineError,{variant:"field",title:"Couldn’t read the members’ crew settings",description:l.error??"Try again in a moment."}),(0,s.jsx)("div",{children:(0,s.jsx)(g.Button,{size:"sm",icon:(0,s.jsx)(f.RotateCw,{}),onClick:l.onRetry,children:"Try again"})})]}),(0,s.jsxs)(j.DialogFooter,{children:[(0,s.jsx)(g.Button,{type:"button",onClick:()=>{m(1)},children:"Back"}),(0,s.jsx)(g.Button,{variant:"primary",disabled:!0,"data-testid":"form-squadron-submit",children:"Form squadron"})]})]})]});let q=(0,b.rolePreviews)(S,t);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(j.DialogHeader,{children:[(0,s.jsxs)(j.DialogTitle,{children:["Form a squadron from ",S.name," v",S.version]}),(0,s.jsxs)(j.DialogDescription,{children:["Step 2 of 2. ",(0,b.memberCount)(S)," member ships and a flagship are commissioned when you confirm."]})]}),(0,s.jsxs)(k.Table,{children:[(0,s.jsx)(k.TableHeader,{children:(0,s.jsxs)(k.TableRow,{children:[(0,s.jsx)(k.TableHead,{children:"Role"}),(0,s.jsx)(k.TableHead,{children:"Template"}),(0,s.jsx)(k.TableHead,{children:"Members"}),(0,s.jsx)(k.TableHead,{children:"Check-in"})]})}),(0,s.jsx)(k.TableBody,{children:q.map(e=>(0,s.jsxs)(k.TableRow,{children:[(0,s.jsx)(k.TableCell,{className:"font-mono",children:e.role}),(0,s.jsx)(k.TableCell,{className:"font-mono",children:e.template}),(0,s.jsx)(k.TableCell,{children:e.count}),(0,s.jsx)(k.TableCell,{children:void 0===e.checkInMinutes?"unknown":(0,b.checkInText)(e.checkInMinutes)})]},e.role))})]}),(0,s.jsxs)("p",{className:"flex items-start gap-2 rounded-md bg-muted px-3 py-2 text-meta text-muted-foreground",children:[(0,s.jsx)(p.Info,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0"}),(0,s.jsxs)("span",{children:["The flagship is named as the squadron, ",(0,s.jsxs)("span",{className:"font-mono",children:[S.name,"-"]})," plus six random characters: the squadron's address. Members are named by role."]})]}),(0,s.jsx)("p",{className:"text-meta text-muted-foreground",children:"Next you get crew lines and a launch note per member. You start each session by hand; the squadron sails once every member is on station."}),void 0!==n&&(0,s.jsx)(N.InlineError,{variant:"field",title:"Couldn’t form the squadron",description:n}),(0,s.jsxs)(j.DialogFooter,{children:[(0,s.jsx)(g.Button,{type:"button",disabled:a,onClick:()=>{m(1)},children:"Back"}),(0,s.jsx)(g.Button,{variant:"primary",isLoading:a,"data-testid":"form-squadron-submit",onClick:()=>{i(T)},children:a?"Forming":"Form squadron"})]})]})}function E(e){let{isOpen:r,onOpenChange:t,isPending:a}=e;return(0,s.jsx)(j.Dialog,{open:r,onOpenChange:e=>{a||t(e)},children:(0,s.jsx)(j.DialogContent,{size:"md","data-testid":"form-squadron-dialog",className:v.dialogSurface.phoneFullScreen,children:(0,s.jsx)(z,{...e})})})}e.s(["FormSquadron",0,function({blueprints:e,templates:n,isOpen:i,onOpenChange:o,initial:l,onFormed:c}){let m=(0,x.useHasTrierarchPlugin)(),p=(0,h.useFormSquadron)(),[f,b]=(0,r.useState)(),g=(0,h.useBlueprintCrew)(m?f:void 0),j=(0,x.useMachines)(),v=(0,a.useLabelContext)(),w=void 0===v||void 0===j.data?void 0:(0,u.machineLabelsInputOf)(v,j.data);return(0,s.jsx)(E,{blueprints:e,templates:n,...void 0===l?{}:{initial:l},isOpen:i,onOpenChange:o,isPending:p.isPending,...null===p.error?{}:{error:p.error.message},onPicked:e=>{p.reset(),b(e)},...m?{crew:{state:g.isError||j.isError?"error":void 0===g.data||void 0===j.data?"loading":"ready",members:g.data??[],offers:(0,t.offersOf)(j.data??[]),...void 0===v?{}:{context:v},...void 0===w?{}:{machineLabels:w},...null===g.error?null===j.error?{}:{error:j.error.message}:{error:g.error.message},onRetry:()=>{g.refetch(),j.refetch()}}}:{},onSubmit:(e,s)=>{p.mutate({blueprint:e,...void 0===s?{}:{members:Object.fromEntries(s.map(e=>[e.slot,{crew:{...""===e.harness?{}:{harness:e.harness},...void 0===e.workspace?{}:{workspace:e.workspace},...""===e.firstPrompt.trim()?{}:{firstPrompt:e.firstPrompt},options:e.options,machineLabels:d(e,v)},parameters:Object.fromEntries(e.parameters.map(e=>[e.name,e.value]))}]))}},{onSuccess:e=>{c(e.squadronId)}})}})}],71164)},67551,e=>{"use strict";var s=e.i(43476),r=e.i(56420);let t={name:"arrow-right",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]};t.node;let a=(0,r.default)(t);var n=e.i(31458),i=e.i(71645),o=e.i(90063),l=e.i(66390);function d({name:e,count:r,onHover:t}){let a={onPointerEnter:()=>{t(e)},onPointerLeave:()=>{t(void 0)}};return"flagship"===e?(0,s.jsxs)(l.Badge,{variant:"kind",...a,children:[(0,s.jsx)(n.Flag,{"aria-hidden":!0}),"flagship"]}):(0,s.jsxs)(l.Badge,{variant:"type",...a,children:[e,void 0!==r&&r>1&&(0,s.jsxs)("span",{className:"text-muted-foreground",children:["×",r]})]})}e.s(["HandoffWiring",0,function({blueprint:e}){let[r,t]=(0,i.useState)(void 0),n=new Map(e.roles.map(e=>[e.name,e.count]));return(0,s.jsxs)("section",{"aria-labelledby":"handoff-wiring","data-testid":"handoff-wiring",className:"flex flex-col gap-2 rounded-lg border border-border p-3",children:[(0,s.jsxs)("div",{className:"flex items-baseline justify-between gap-2",children:[(0,s.jsx)("h2",{id:"handoff-wiring",className:"text-body font-semibold",children:"Hand-offs"}),(0,s.jsxs)("span",{className:"text-meta text-muted-foreground",children:["from blueprint ",e.name," v",e.version]})]}),0===e.handoffs.length?(0,s.jsx)("p",{className:"text-meta text-muted-foreground",children:"No hand-offs. Members only hear from the flagship and from each other by name."}):(0,s.jsx)("ul",{className:"grid grid-cols-[auto_auto_1fr] items-center gap-x-4 text-meta",children:e.handoffs.map(e=>(0,s.jsxs)("li",{"data-testid":"handoff-row",className:(0,o.classNames)("col-span-3 grid grid-cols-subgrid items-center rounded-md px-1.5 py-1",void 0!==r&&(e.role===r||e.to===r)?"bg-muted":void 0),children:[(0,s.jsx)("span",{children:(0,s.jsx)(d,{name:e.role,count:n.get(e.role),onHover:t})}),(0,s.jsxs)("span",{className:"flex items-center gap-1 font-mono text-muted-foreground",children:[e.handoff,(0,s.jsx)(a,{"aria-label":"goes to",className:"size-(--size-icon-sm)"})]}),(0,s.jsx)("span",{children:(0,s.jsx)(d,{name:e.to,count:n.get(e.to),onHover:t})})]},`${e.role}.${e.handoff}`))})]})}],67551)},274,e=>{"use strict";var s=e.i(43476),r=e.i(77880),t=e.i(36779),a=e.i(15034),n=e.i(85538);e.s(["DetailLayout",0,function({title:e,parents:i,header:o,children:l,sheet:d,live:c,nav:m,onCompose:u,onSearch:h,account:x,banner:p}){return(0,s.jsxs)("div",{className:"flex min-h-dvh bg-background",children:[(0,s.jsx)(t.Sidebar,{active:m.active,inboxCount:m.inboxCount,attentionCount:m.attentionCount,needsCrewCount:m.needsCrewCount,hasSquadrons:m.hasSquadrons,hasTrierarchs:m.hasTrierarchs,trierarchsCount:m.trierarchsCount,hasSettings:m.hasSettings,...x}),(0,s.jsxs)("div",{className:"flex min-w-0 grow flex-col",children:[(0,s.jsx)(r.Header,{breadcrumb:e,parents:i,live:c,onCompose:u,onSearch:h}),p,(0,s.jsx)(n.TopBar,{title:e,live:c,back:i[i.length-1]??i[0]}),(0,s.jsxs)("main",{className:"flex grow flex-col gap-5 px-8 py-6 max-sm:gap-3.5 max-sm:px-4 max-sm:pt-3.5 max-sm:pb-[calc(var(--size-tabbar)+var(--spacing)*4)]",children:[o,l]})]}),d,(0,s.jsx)(a.TabBar,{active:"overview"===m.active||"needs-crew"===m.active?"fleet":"settings"===m.active?void 0:m.active,hasSquadrons:m.hasSquadrons,hasTrierarchs:m.hasTrierarchs,trierarchsCount:m.trierarchsCount,inboxCount:m.inboxCount,attentionCount:m.attentionCount})]})}])}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,69644,69846,e=>{"use strict";var t=e.i(56420);let s={name:"folder-open",size:24,node:[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]};s.node;let n=(0,t.default)(s);e.s(["FolderOpen",0,n],69644);let i={name:"git-branch",size:24,node:[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]]};i.node;let a=(0,t.default)(i);e.s(["GitBranch",0,a],69846)},59659,e=>{"use strict";var t=e.i(56420);let s={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};s.node;let n=(0,t.default)(s);e.s(["Trash2",0,n],59659)},96773,e=>{"use strict";var t=e.i(43476),s=e.i(71645),n=e.i(44824),i=e.i(45608),a=e.i(95475),r=e.i(2767),l=e.i(15905),o=e.i(24010),d=e.i(94945),c=e.i(17981);function h({worktree:e,onOpenChange:s,isPending:n,error:i,onClear:a}){return(0,t.jsx)(o.AlertDialog,{open:void 0!==e,onOpenChange:e=>{n||s(e)},children:(0,t.jsxs)(o.AlertDialogContent,{"data-testid":"clear-worktree-dialog",className:d.dialogSurface.phoneSheet,children:[(0,t.jsxs)(o.AlertDialogHeader,{children:[(0,t.jsxs)(o.AlertDialogTitle,{children:["Delete the kept ",(0,t.jsx)("span",{className:"font-mono",children:e?.repository})," worktree of ",e?.shipName,"?"]}),(0,t.jsx)(o.AlertDialogDescription,{children:void 0===e?null:`${e.machineName} removes it on its next pass, with its uncommitted changes. They can't be recovered, and the request can't be withdrawn.`})]}),void 0===i?null:(0,t.jsx)(c.InlineError,{title:"Couldn’t delete the worktree",description:`Refused: ${i}. Nothing changed.`}),(0,t.jsxs)(o.AlertDialogFooter,{children:[(0,t.jsx)(o.AlertDialogClose,{render:(0,t.jsx)(l.Button,{disabled:n}),children:"Cancel"}),(0,t.jsx)(l.Button,{variant:"destructive",isLoading:n,"data-testid":"clear-worktree-confirm",onClick:a,children:"Delete worktree"})]})]})})}var m=e.i(22768),u=e.i(16984),x=e.i(56420);let p={name:"folder-x",size:24,node:[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"m9.5 10.5 5 5",key:"ra9qjz"}],["path",{d:"m14.5 10.5-5 5",key:"l2rkpq"}]]};p.node;let g=(0,x.default)(p);var f=e.i(11568),j=e.i(49287),v=e.i(86875),w=e.i(59659),b=e.i(22016),N=e.i(54616),y=e.i(66027),k=e.i(12598),C=e.i(27702),S=e.i(54492),T=e.i(49635),I=e.i(61966),A=e.i(19321),z=e.i(54422),$=e.i(67874),B=e.i(99261),L=e.i(63481),D=e.i(78865),_=e.i(94313);function M({spot:e,now:s}){let n="running"===e.status?e.startedAt:null,i=(0,S.restartWords)(e);return null===n&&void 0===i?null:(0,t.jsxs)("span",{className:"text-meta text-muted-foreground","data-testid":"machine-spot-session",children:[null===n?null:(0,t.jsxs)(t.Fragment,{children:["since"," ",(0,t.jsx)("time",{dateTime:n,title:(0,T.fullDateTime)(new Date(n)),className:"tabular-nums",children:(0,T.sinceTime)(new Date(n),s)})]}),null!==n&&void 0!==i?" · ":null,i]})}function O({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 q({title:e,count:s,note:n,children:i}){return(0,t.jsxs)("section",{"aria-label":e,className:"flex flex-col gap-2.5",children:[(0,t.jsxs)("h2",{className:"flex items-baseline gap-2 text-section font-semibold",children:[e,void 0===s?null:(0,t.jsx)("span",{className:"text-meta font-normal text-muted-foreground tabular-nums",children:s}),void 0===n?null:(0,t.jsx)("span",{className:"text-meta font-normal text-muted-foreground",children:n})]}),i]})}function R({icon:e,name:s,meta:n,action:i}){return(0,t.jsxs)("li",{className:"flex items-start gap-2 px-3.5 py-2.5 [&_svg]:mt-0.5 [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0 [&_svg]:text-muted-foreground",children:[e,(0,t.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col",children:[(0,t.jsx)("span",{className:"truncate font-mono text-id",children:s}),(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:n})]}),i]})}function U({kept:e,shipName:s,isBeingCleared:n,onClear:i}){let a=n?(0,t.jsx)(W,{}):void 0===i?void 0:(0,t.jsx)(l.Button,{size:"xs",variant:"ghost",icon:(0,t.jsx)(w.Trash2,{"aria-hidden":!0}),"aria-label":`Delete the kept ${e.repository} worktree of ${s}`,"data-testid":"machine-worktree-delete",onClick:()=>{i({...e,shipName:s})},children:"Delete"});return(0,t.jsx)(R,{icon:(0,t.jsx)(g,{"aria-hidden":!0}),name:`${e.repository}/${s}`,meta:"Kept after release, with uncommitted changes",action:a})}function W(){return(0,t.jsxs)("span",{"data-testid":"machine-worktree-clearing",className:"inline-flex shrink-0 items-center gap-1 rounded-md border border-tone-waiting-border bg-tone-waiting-bg px-1.5 py-0.5 text-meta text-tone-waiting-fg [&_svg]:mt-0 [&_svg]:text-tone-waiting-fg",children:[(0,t.jsx)(f.LoaderCircle,{"aria-hidden":!0}),"Clearing"]})}function H({machine:e,state:s,spots:n,location:i,labels:a,now:r,shipNames:o,clearRequests:d=[],onClearKept:c}){if("loading"===s||"ready"===s&&void 0===e)return(0,t.jsxs)("div",{"aria-busy":!0,"data-testid":"machine-detail",className:"flex flex-col gap-4",children:[(0,t.jsx)("span",{className:"sr-only",children:"Loading the machine"}),(0,t.jsx)(A.Skeleton,{className:"h-8 w-48"}),(0,t.jsx)(A.Skeleton,{className:"h-16 w-full rounded-lg"}),(0,t.jsx)(A.Skeleton,{className:"h-40 w-full rounded-lg"})]});if("not-found"===s||void 0===e)return(0,t.jsx)("div",{"data-testid":"machine-detail",children:(0,t.jsx)($.EmptyState,{variant:"section",icon:(0,t.jsx)(m.CircleAlert,{}),title:"Machine not found",description:"The trierarch plugin lists no machine with this ship id. The link may be incomplete.",action:(0,t.jsx)(l.Button,{size:"sm",nativeButton:!1,render:(0,t.jsx)(b.default,{href:"/trierarchs"}),children:"Back to Trierarchs"})})});let{details:h,report:x}=e,p=null===x?null:new Date(x.reportedAt),f=e.isSilent&&null!==e.lastSeenAt,w=f&&null!==p?`As of ${(0,T.clockTime)(p)}`:void 0;return(0,t.jsxs)("div",{"data-testid":"machine-detail",className:"flex flex-col gap-5 max-sm:gap-3.5",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2.5",children:[(0,t.jsxs)("h1",{className:"inline-flex items-center gap-2 text-title font-semibold [&_svg]:size-(--size-icon-lg) [&_svg]:text-muted-foreground",children:[(0,t.jsx)(v.ShipWheel,{"aria-hidden":!0}),e.name]}),(0,t.jsx)(_.MachineLiveness,{machine:e,now:r})]}),(0,t.jsx)(l.Button,{size:"xs",icon:(0,t.jsx)(j.Ship,{"aria-hidden":!0}),nativeButton:!1,render:(0,t.jsx)(b.default,{href:`/ships/${e.shipId}`}),"data-testid":"machine-ship-page",children:"Ship page"})]}),(0,t.jsxs)("dl",{className:"grid grid-cols-5 gap-px overflow-hidden rounded-lg border border-border bg-border max-lg:grid-cols-2",children:[(0,t.jsx)(O,{label:"Capacity",children:(0,t.jsx)(z.CapacityBar,{spots:n,caps:h?.caps,unknownText:null===p?"Unknown until it answers":`Unknown since ${(0,T.clockTime)(p)}`})}),(0,t.jsx)(O,{label:"Machine",children:(0,t.jsx)(L.LocationTag,{kind:i?.kind??null,description:i?.description,size:"md"})}),(0,t.jsx)(O,{label:"Version",children:null===h?(0,t.jsx)("span",{className:"text-muted-foreground",children:"Unknown"}):(0,t.jsxs)("span",{className:"font-mono text-id",children:["@aeolus-fleet/trierarch@",h.version]})}),(0,t.jsx)(O,{label:"Last answer",children:null===p?(0,t.jsx)("span",{className:"text-muted-foreground",children:"None yet"}):(0,t.jsx)("time",{dateTime:x?.reportedAt,title:(0,T.fullDateTime)(p),className:"tabular-nums",children:(0,_.lastAnswer)(p,r)})}),(0,t.jsxs)(O,{label:"Ship id",children:[(0,t.jsx)("span",{className:"truncate font-mono text-id",children:e.shipId}),(0,t.jsx)(I.CopyButton,{value:e.shipId,label:"Copy ship id"})]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1.5","data-testid":"machine-labels-row",children:[(0,t.jsx)("span",{className:"text-caption font-medium text-muted-foreground",children:"Labels"}),void 0===a?(0,t.jsx)(A.Skeleton,{className:"h-5.5 w-40"}):(0,t.jsx)(B.ShipLabels,{chips:a}),(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"Read-only here. Crew requests that ask for machine labels go only to machines carrying all of them."})]}),f&&null!==e.lastSeenAt?(0,t.jsxs)("p",{role:"alert","data-testid":"machine-silent",className:"flex gap-2 rounded-lg border border-tone-attention-border bg-tone-attention-bg px-3.5 py-2.5 text-meta text-tone-attention-fg [&_svg]:mt-0.5 [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",children:[(0,t.jsx)(u.CircleX,{"aria-hidden":!0}),(0,t.jsxs)("span",{children:[(0,t.jsxs)("strong",{className:"font-medium",children:[e.name," has not answered since ",(0,T.clockTime)(new Date(e.lastSeenAt)),"."]})," ","It is probably not running",i?.description?` on ${i.description}`:"",". Until it answers, nothing restarts its sessions; everything below is its last answer."]})]}):null,(0,t.jsx)(q,{title:"Running here",count:n.length,note:w,children:0===n.length?(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"No ship is assigned to this trierarch."}):(0,t.jsx)("ul",{className:"divide-y divide-border rounded-lg border border-border bg-card","data-testid":"machine-spots",children:n.map(e=>(0,t.jsxs)("li",{className:"flex items-center justify-between gap-3 px-3.5 py-2.5",children:[(0,t.jsxs)("span",{className:"flex min-w-0 flex-col",children:[(0,t.jsx)(b.default,{href:`/ships/${e.shipId}`,className:"truncate text-body font-medium hover:underline",children:e.name}),void 0===e.workspace?null:(0,t.jsxs)("span",{className:"truncate text-meta text-muted-foreground","data-testid":"machine-spot-workspace",children:[(0,t.jsx)("span",{className:"sr-only",children:"Workspace: "}),(0,t.jsx)("span",{className:"font-mono text-id",children:e.workspace.name})," · ","worktree"===e.workspace.kind?"new worktree":"folder, as it is"]})]}),(0,t.jsxs)("span",{className:"flex shrink-0 items-center gap-2.5",children:[(0,t.jsx)(M,{spot:e,now:r}),(0,t.jsx)(D.StatusBadge,{status:e.status})]})]},e.shipId))})}),(0,t.jsx)(q,{title:"Harnesses",count:h?.harnesses.length,note:w,children:null===h?(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"Unknown until it answers."}):(0,t.jsx)("div",{className:"rounded-lg border border-border bg-card px-3.5 py-3",children:h.harnesses.map(e=>(0,t.jsx)(_.HarnessOffer,{harness:e,now:r},e.harness))})}),(0,t.jsx)(q,{title:"Workspaces",count:null===h?void 0:h.workspaces.repositories.length+h.workspaces.folders.length,children:null===h?(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"Unknown until it answers."}):(0,t.jsx)("div",{className:"rounded-lg border border-border bg-card px-3.5 py-3",children:(0,t.jsx)(_.WorkspaceOffer,{workspaces:h.workspaces})})}),null===h||0===h.kept.length&&0===h.orphans.length?null:(0,t.jsxs)(q,{title:"Worktrees",children:[(0,t.jsxs)("ul",{className:"divide-y divide-border rounded-lg border border-border bg-card","data-testid":"machine-worktrees",children:[h.kept.map(s=>{var n;return(0,t.jsx)(U,{kept:s,shipName:o?.get(s.shipId)??s.shipId,isBeingCleared:(n={trierarchShipId:e.shipId,...s},d.some(e=>e.trierarchShipId===n.trierarchShipId&&e.shipId===n.shipId&&e.repository===n.repository)),onClear:c},`${s.shipId}/${s.repository}`)}),h.orphans.map(e=>(0,t.jsx)(R,{icon:(0,t.jsx)(g,{"aria-hidden":!0}),name:`${e.repository}/${e.name}`,meta:"No crew request"},`${e.repository}/${e.name}`))]}),(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"The trierarch never deletes these on its own."})]})]})}var E=e.i(42383),F=e.i(274),P=e.i(90262),V=e.i(88721),K=e.i(5387),G=e.i(80581),J=e.i(86413),Q=e.i(18423),X=e.i(14695),Z=e.i(28459),Y=e.i(96676),ee=e.i(3979),et=e.i(78485),es=e.i(53573),en=e.i(265);e.s(["default",0,function({params:e}){let l,o,d,{shipId:c}=(0,s.use)(e),m=(0,Y.useNow)(),u=(0,V.useAccountMenu)(m),x=(0,J.useOpenInboxCount)(),p=(0,Z.useNeedsAttention)(),g=(0,Z.useAttentionCount)(),f=(0,Q.useLiveFleet)(),j=(0,K.useFleetSnapshot)(),v=(0,K.useLabelContext)(),w=(0,en.useTrierarchPluginConnection)(),b=(0,en.useMachines)(),S=(0,P.useAccess)(),T=(0,ee.usePluginNav)(),[I,A]=(0,s.useState)(!1),[z,$]=(0,s.useState)(!1),[B,L]=(0,s.useState)(void 0),D=(l=(0,C.useTRPC)(),(0,y.useQuery)(l.fleet.clearRequests.queryOptions(void 0,{refetchInterval:1e4}))),_=(o=(0,C.useTRPC)(),d=(0,k.useQueryClient)(),(0,N.useMutation)(o.fleet.clearWorktree.mutationOptions({onSuccess:()=>d.invalidateQueries({queryKey:o.fleet.clearRequests.queryKey()})})));(0,et.useSignInWhenSessionEnds)([p.error,f.error]);let M=b.data?.find(e=>e.shipId===c),O=j.data??[],q=void 0===M?[]:(0,X.spotsOf)(M,O),R=O.find(e=>e.id===c),U=new Map([...(0,es.useShips)(q.map(e=>e.shipId))].map(([e,t])=>[e,t.crewRequest?.settings]));return(0,t.jsxs)(F.DetailLayout,{title:M?.name??"Machine",parents:[{href:"/trierarchs",label:"Trierarchs"}],live:f.live,nav:{active:"trierarchs",inboxCount:x,attentionCount:g,...T},onCompose:S.canSend?()=>{A(!0)}:void 0,onSearch:()=>{$(!0)},account:u,banner:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.ConsoleNotices,{}),(0,t.jsx)(a.ConsoleGuide,{})]}),header:"connected"!==w||b.isError?(0,t.jsx)(E.MachineList,{connection:w,machines:b.data,ships:O,error:b.isError?b.error.message:void 0,onRetry:()=>{b.refetch()},now:m}):(0,t.jsx)(H,{machine:M,state:void 0===b.data?"loading":void 0===M?"not-found":"ready",spots:(0,X.withWorkspaces)(q,U),location:R?.location??null,...void 0===v||void 0===R?{}:{labels:(0,G.chipsOf)(R,v)},now:m,shipNames:new Map(O.map(e=>[e.id,e.name])),clearRequests:D.data??[],...S.canManage&&void 0!==M?{onClearKept:e=>{_.reset(),L({...e,trierarchShipId:M.shipId,machineName:M.name})}}:{}}),children:[(0,t.jsx)(h,{worktree:B,onOpenChange:e=>{e||L(void 0)},isPending:_.isPending,...null===_.error?{}:{error:_.error.message},onClear:()=>{void 0!==B&&_.mutate({trierarchShipId:B.trierarchShipId,shipId:B.shipId,repository:B.repository},{onSuccess:()=>{L(void 0)}})}}),(0,t.jsx)(n.ComposeMessage,{isOpen:I,onOpenChange:A}),(0,t.jsx)(i.ConsoleCommands,{isOpen:z,onOpenChange:$,onCompose:()=>{A(!0)}})]})}],96773)},54422,e=>{"use strict";var t=e.i(43476),s=e.i(90063),n=e.i(14695);let i={running:"bg-tone-ok-fg",crewing:"bg-tone-active-fg",releasing:"bg-tone-active-fg",restarting:"bg-tone-waiting-fg",crashed:"bg-tone-attention-fg"};e.s(["CapacityBar",0,function({spots:e,caps:a,unknownText:r="Unknown",testId:l}){let o=(0,n.capacityLine)(e,a);if(void 0===a||void 0===o)return(0,t.jsx)("span",{"data-testid":l,className:"text-meta text-muted-foreground",children:r});let d=Math.max(0,a.ships-e.length);return(0,t.jsxs)("span",{role:"img","aria-label":o,"data-testid":l,className:"inline-flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1",children:[(0,t.jsxs)("span",{"aria-hidden":!0,className:"inline-flex shrink-0 gap-0.5",children:[e.map((e,n)=>(0,t.jsx)("span",{title:`Spot ${String(n+1)}: ${e.name}, ${e.status}`,className:(0,s.classNames)("h-2 w-3 rounded-xs",i[e.status])},e.shipId)),Array.from({length:d},(s,n)=>(0,t.jsx)("span",{title:`Spot ${String(e.length+n+1)}: vacant`,className:"h-2 w-3 rounded-xs border border-input"},`free-${String(n)}`))]}),(0,t.jsx)("span",{className:"text-meta tabular-nums",children:o})]})}])},99261,56539,e=>{"use strict";var t=e.i(43476),s=e.i(56420);let n={name:"chevron-up",size:24,node:[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]};n.node;let i=(0,s.default)(n);e.s(["ChevronUp",0,i],56539);var a=e.i(71645),r=e.i(95960);e.s(["ShipLabels",0,function({chips:e}){let[s,n]=(0,a.useState)(!1);return 0===e.length?(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"No labels"}):!s&&e.length>2?(0,t.jsxs)("span",{className:"flex min-w-0 flex-wrap items-center gap-1.5",children:[e.slice(0,2).map(e=>(0,t.jsx)(r.LabelChip,{chip:e,testId:"ship-label"},e.valueId)),(0,t.jsxs)("button",{type:"button","aria-label":`Show all ${String(e.length)} labels`,"data-testid":"ship-labels-more",className:"inline-flex h-5.5 items-center rounded-sm bg-secondary px-1.5 text-caption font-medium tabular-nums hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring",onClick:()=>{n(!0)},children:["+",e.length-2]})]}):(0,t.jsxs)("span",{className:"flex min-w-0 flex-wrap items-center gap-1.5",children:[(function(e){let t=[];for(let s of e){let e="none"===s.mark?null:s.ownerName,n=t.find(t=>t.owner===e);void 0===n?t.push({owner:e,chips:[s]}):n.chips.push(s)}return t})(e).map(e=>(0,t.jsxs)("span",{className:"inline-flex flex-wrap items-center gap-1.5",children:[null===e.owner?null:(0,t.jsxs)("span",{className:"text-meta text-muted-foreground",children:["by ",e.owner]}),e.chips.map(e=>(0,t.jsx)(r.LabelChip,{chip:e,testId:"ship-label"},e.valueId))]},e.owner??"")),e.length>2?(0,t.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1 rounded-sm px-1 text-meta hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon-sm)",onClick:()=>{n(!1)},children:[(0,t.jsx)(i,{"aria-hidden":!0}),"Show fewer"]}):null]})}],99261)},42383,94313,e=>{"use strict";var t=e.i(43476),s=e.i(77071),n=e.i(86875),i=e.i(94831),a=e.i(22016),r=e.i(14695),l=e.i(31513),o=e.i(15905),d=e.i(67874),c=e.i(17981),h=e.i(88393),m=e.i(71567),u=e.i(52886),x=e.i(69644),p=e.i(69846),g=e.i(66787),f=e.i(66616),j=e.i(49635),v=e.i(66390),w=e.i(54422),b=e.i(63481);let N={alive:"border-tone-ok-border bg-tone-ok-bg text-tone-ok-fg",silent:"border-tone-attention-border bg-tone-attention-bg text-tone-attention-fg","not-started":"border-tone-waiting-border bg-tone-waiting-bg text-tone-waiting-fg"},y={alive:"Alive",silent:"Not answering","not-started":"Not started"};function k({machine:e,now:s}){let i=(0,r.machineLiveness)(e),a=null===e.lastSeenAt?null:new Date(e.lastSeenAt);return(0,t.jsxs)("span",{className:"inline-flex flex-wrap items-center gap-x-2 gap-y-1 text-meta","data-testid":"machine-liveness","data-liveness":i,children:[(0,t.jsxs)(v.Badge,{variant:"outline",className:N[i],children:["alive"===i?(0,t.jsx)(n.ShipWheel,{"aria-hidden":!0}):(0,t.jsx)(u.CircleDashed,{"aria-hidden":!0}),y[i]]}),null===a?(0,t.jsx)("span",{className:"text-muted-foreground",children:"· run its setup line on the machine"}):(0,t.jsxs)("time",{dateTime:e.lastSeenAt??void 0,title:(0,j.fullDateTime)(a),className:"text-muted-foreground tabular-nums",children:["· ","silent"===i?`since ${(0,j.clockTime)(a)}`:(0,j.lastSeen)(a,s).replace("Last seen","seen")]})]})}function C(e,t){let s=(0,j.relativeTime)(e,t);return"Just now"===s?"just now":s}function S({title:e,children:s,className:n}){return(0,t.jsxs)("div",{className:`flex min-w-0 flex-col gap-2 px-4.5 py-4 ${n??""}`,children:[(0,t.jsx)("span",{className:"text-caption font-medium text-muted-foreground",children:e}),s]})}function T({harness:e,now:s}){let n=(0,f.harnessDetection)(e,s);return(0,t.jsxs)("div",{className:"flex flex-col gap-1.5 border-t border-border py-2.5 first-of-type:border-t-0 first-of-type:pt-0",children:[(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-body font-medium [&_svg]:size-(--size-icon-sm) [&_svg]:text-muted-foreground",children:[(0,t.jsx)(m.Bot,{"aria-hidden":!0}),(0,f.harnessWord)(e.harness),void 0===n?null:(0,t.jsx)("span",{className:"font-normal text-meta text-muted-foreground",children:n})]}),(0,r.harnessOptions)(e.options).map(e=>(0,t.jsxs)("span",{className:"flex flex-wrap items-center gap-x-2.5 gap-y-1 text-meta",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:e.name}),e.values.map(s=>(0,t.jsxs)("span",{className:"font-mono text-id whitespace-nowrap",children:[s,s===e.defaultValue?(0,t.jsx)("span",{className:"font-sans text-muted-foreground",children:" (default)"}):null]},s))]},e.name)),0===e.flags.length?null:(0,t.jsx)("span",{className:"flex flex-wrap items-center gap-1.5",children:e.flags.map(s=>e.riskyFlags?.includes(s)===!0?(0,t.jsxs)("code",{"data-testid":"machine-risky-flag",title:"Risky: every launch runs without its harness's safeguards",className:"inline-flex items-center gap-1 rounded-sm border border-tone-waiting-border bg-tone-waiting-bg px-1.5 font-mono text-id text-tone-waiting-fg [&_svg]:size-(--size-icon-sm)",children:[(0,t.jsx)(g.TriangleAlert,{"aria-hidden":!0}),s,(0,t.jsx)("span",{className:"sr-only",children:" (risky)"})]},s):(0,t.jsx)("code",{className:"rounded-sm bg-muted px-1.5 font-mono text-id",children:s},s))})]})}function I({title:e,icon:s,names:n}){return(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-caption text-muted-foreground",children:e}),0===n.length?(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"None"}):n.map(e=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-meta [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0 [&_svg]:text-muted-foreground",children:[s,e]},e))]})}function A({workspaces:e}){return(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsx)(I,{title:"Repositories · a new worktree per ship",icon:(0,t.jsx)(p.GitBranch,{"aria-hidden":!0}),names:e.repositories}),(0,t.jsx)(I,{title:"Folders · used as they are",icon:(0,t.jsx)(x.FolderOpen,{"aria-hidden":!0}),names:e.folders})]})}function z({machine:e,spots:s,location:i,now:r}){let{details:l,report:o}=e,d=null===o?null:new Date(o.reportedAt);return(0,t.jsxs)("section",{"aria-label":e.name,"data-testid":"machine-card",className:"grid grid-cols-[minmax(0,18.75rem)_minmax(0,1.25fr)_minmax(0,1fr)] divide-x divide-border rounded-lg border border-border bg-card shadow-sm max-lg:grid-cols-1 max-lg:divide-x-0 max-lg:divide-y",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-2.5 px-4.5 py-4",children:[(0,t.jsxs)(a.default,{href:`/trierarchs/${e.shipId}`,"data-testid":"machine-card-name",className:"inline-flex items-center gap-2 text-section font-semibold hover:underline [&_svg]:size-(--size-icon) [&_svg]:text-muted-foreground",children:[(0,t.jsx)(n.ShipWheel,{"aria-hidden":!0}),e.name]}),(0,t.jsx)(k,{machine:e,now:r}),(0,t.jsxs)("span",{className:"flex flex-wrap items-center gap-1.5 text-meta text-muted-foreground",children:[(0,t.jsx)(b.LocationTag,{kind:i?.kind??null,description:i?.description}),null===l?null:(0,t.jsxs)("span",{className:"font-mono text-id",children:["· trierarch ",l.version]})]}),(0,t.jsx)("div",{role:"separator",className:"h-px bg-border"}),(0,t.jsx)("span",{className:"text-caption font-medium text-muted-foreground",children:"Capacity"}),(0,t.jsx)(w.CapacityBar,{spots:s,caps:l?.caps,testId:"machine-card-capacity",unknownText:null===d?"Unknown until it answers":`Unknown since ${(0,j.clockTime)(d)}`}),null===d?null:(0,t.jsxs)("time",{dateTime:o?.reportedAt,title:(0,j.fullDateTime)(d),className:"text-meta text-muted-foreground",children:["Last answer ",C(d,r)]})]}),(0,t.jsx)(S,{title:"Harnesses, options and flags",children:null===l?(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"Unknown until it answers"}):l.harnesses.map(e=>(0,t.jsx)(T,{harness:e,now:r},e.harness))}),(0,t.jsx)(S,{title:"Workspaces",children:null===l?(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"Unknown until it answers"}):(0,t.jsx)(A,{workspaces:l.workspaces})})]})}e.s(["HarnessOffer",0,T,"MachineCard",0,z,"MachineLiveness",0,k,"WorkspaceOffer",0,A,"lastAnswer",0,C],94313);let $=`${l.SOURCE_URL}/tree/main/packages/trierarch-plugin#readme`;e.s(["MachineList",0,function({connection:e,machines:l,ships:m,error:u,onRetry:x,onJoin:p,now:g}){return"none"===e?(0,t.jsx)(d.EmptyState,{icon:(0,t.jsx)(n.ShipWheel,{"aria-hidden":!0}),title:"The trierarch plugin is not set up for this fleet",description:"Crew requests work without it: they wait on Needs crew and you crew each ship by hand with its starting prompt. With the plugin, trierarchs on your machines start, restart and stop those sessions for you.",action:(0,t.jsx)(o.Button,{nativeButton:!1,render:({children:e,...s})=>(0,t.jsx)("a",{href:$,target:"_blank",rel:"noreferrer",...s,children:e}),"data-testid":"trierarchs-setup",children:"How to set up the trierarch plugin"})}):"not-connected"===e?(0,t.jsx)(d.EmptyState,{icon:(0,t.jsx)(i.Unplug,{"aria-hidden":!0}),title:"The trierarch plugin is not connected",description:"Connect it in Settings; its machines show up here then.",action:(0,t.jsx)(o.Button,{nativeButton:!1,render:(0,t.jsx)(a.default,{href:"/settings"}),"data-testid":"trierarchs-open-settings",children:"Open Settings"})}):void 0!==u?(0,t.jsx)(c.InlineError,{variant:"page",title:"Couldn’t read the machines",description:"Nothing changed.",detail:u,onRetry:x}):void 0===l||"unknown"===e?(0,t.jsx)(h.LoadingSkeleton,{variant:"cards",rows:2,label:"Loading the machines"}):0===l.length?(0,t.jsx)(d.EmptyState,{icon:(0,t.jsx)(n.ShipWheel,{"aria-hidden":!0}),title:"No machines yet",description:"Join a machine: its trierarch then starts sessions there for the crew requests the plugin gives it.",action:p?(0,t.jsx)(o.Button,{variant:"primary",icon:(0,t.jsx)(s.Plus,{"aria-hidden":!0}),onClick:p,"data-testid":"trierarchs-join-empty",children:"Join a machine"}):void 0}):(0,t.jsx)("div",{className:"flex flex-col gap-4","data-testid":"machine-list",children:l.map(e=>(0,t.jsx)(z,{machine:e,spots:(0,r.spotsOf)(e,m),location:m.find(t=>t.id===e.shipId)?.location??null,now:g},e.shipId))})}],42383)},274,e=>{"use strict";var t=e.i(43476),s=e.i(77880),n=e.i(36779),i=e.i(15034),a=e.i(85538);e.s(["DetailLayout",0,function({title:e,parents:r,header:l,children:o,sheet:d,live:c,nav:h,onCompose:m,onSearch:u,account:x,banner:p}){return(0,t.jsxs)("div",{className:"flex min-h-dvh bg-background",children:[(0,t.jsx)(n.Sidebar,{active:h.active,inboxCount:h.inboxCount,attentionCount:h.attentionCount,needsCrewCount:h.needsCrewCount,hasSquadrons:h.hasSquadrons,hasTrierarchs:h.hasTrierarchs,trierarchsCount:h.trierarchsCount,hasSettings:h.hasSettings,...x}),(0,t.jsxs)("div",{className:"flex min-w-0 grow flex-col",children:[(0,t.jsx)(s.Header,{breadcrumb:e,parents:r,live:c,onCompose:m,onSearch:u}),p,(0,t.jsx)(a.TopBar,{title:e,live:c,back:r[r.length-1]??r[0]}),(0,t.jsxs)("main",{className:"flex grow flex-col gap-5 px-8 py-6 max-sm:gap-3.5 max-sm:px-4 max-sm:pt-3.5 max-sm:pb-[calc(var(--size-tabbar)+var(--spacing)*4)]",children:[l,o]})]}),d,(0,t.jsx)(i.TabBar,{active:"overview"===h.active||"needs-crew"===h.active?"fleet":"settings"===h.active?void 0:h.active,hasSquadrons:h.hasSquadrons,hasTrierarchs:h.hasTrierarchs,trierarchsCount:h.trierarchsCount,inboxCount:h.inboxCount,attentionCount:h.attentionCount})]})}])}]);