@aeolus-fleet/console 0.20.4 → 0.20.5

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 (107) hide show
  1. package/.next/standalone/packages/console/.next/BUILD_ID +1 -1
  2. package/.next/standalone/packages/console/.next/build-manifest.json +3 -3
  3. package/.next/standalone/packages/console/.next/prerender-manifest.json +3 -3
  4. package/.next/standalone/packages/console/.next/server/app/_global-error.html +1 -1
  5. package/.next/standalone/packages/console/.next/server/app/_global-error.rsc +1 -1
  6. package/.next/standalone/packages/console/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  7. package/.next/standalone/packages/console/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  8. package/.next/standalone/packages/console/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  9. package/.next/standalone/packages/console/.next/server/app/_not-found/page.js.nft.json +1 -1
  10. package/.next/standalone/packages/console/.next/server/app/inbox/page/server-reference-manifest.json +22 -22
  11. package/.next/standalone/packages/console/.next/server/app/inbox/page.js.nft.json +1 -1
  12. package/.next/standalone/packages/console/.next/server/app/inbox/page_client-reference-manifest.js +1 -1
  13. package/.next/standalone/packages/console/.next/server/app/labels/page/server-reference-manifest.json +22 -22
  14. package/.next/standalone/packages/console/.next/server/app/labels/page.js.nft.json +1 -1
  15. package/.next/standalone/packages/console/.next/server/app/labels/page_client-reference-manifest.js +1 -1
  16. package/.next/standalone/packages/console/.next/server/app/needs-attention/page/server-reference-manifest.json +22 -22
  17. package/.next/standalone/packages/console/.next/server/app/needs-attention/page.js.nft.json +1 -1
  18. package/.next/standalone/packages/console/.next/server/app/needs-attention/page_client-reference-manifest.js +1 -1
  19. package/.next/standalone/packages/console/.next/server/app/needs-crew/page/server-reference-manifest.json +22 -22
  20. package/.next/standalone/packages/console/.next/server/app/needs-crew/page.js.nft.json +1 -1
  21. package/.next/standalone/packages/console/.next/server/app/needs-crew/page_client-reference-manifest.js +1 -1
  22. package/.next/standalone/packages/console/.next/server/app/page/server-reference-manifest.json +22 -22
  23. package/.next/standalone/packages/console/.next/server/app/page.js.nft.json +1 -1
  24. package/.next/standalone/packages/console/.next/server/app/page_client-reference-manifest.js +1 -1
  25. package/.next/standalone/packages/console/.next/server/app/settings/page/server-reference-manifest.json +22 -22
  26. package/.next/standalone/packages/console/.next/server/app/settings/page.js.nft.json +1 -1
  27. package/.next/standalone/packages/console/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  28. package/.next/standalone/packages/console/.next/server/app/ships/[shipId]/page/server-reference-manifest.json +23 -23
  29. package/.next/standalone/packages/console/.next/server/app/ships/[shipId]/page.js.nft.json +1 -1
  30. package/.next/standalone/packages/console/.next/server/app/ships/[shipId]/page_client-reference-manifest.js +1 -1
  31. package/.next/standalone/packages/console/.next/server/app/sign-in/failed/page.js.nft.json +1 -1
  32. package/.next/standalone/packages/console/.next/server/app/sign-in/page.js.nft.json +1 -1
  33. package/.next/standalone/packages/console/.next/server/app/squadrons/[squadronId]/page/server-reference-manifest.json +22 -22
  34. package/.next/standalone/packages/console/.next/server/app/squadrons/[squadronId]/page.js.nft.json +1 -1
  35. package/.next/standalone/packages/console/.next/server/app/squadrons/[squadronId]/page_client-reference-manifest.js +1 -1
  36. package/.next/standalone/packages/console/.next/server/app/squadrons/blueprints/[name]/page/server-reference-manifest.json +22 -22
  37. package/.next/standalone/packages/console/.next/server/app/squadrons/blueprints/[name]/page.js.nft.json +1 -1
  38. package/.next/standalone/packages/console/.next/server/app/squadrons/blueprints/[name]/page_client-reference-manifest.js +1 -1
  39. package/.next/standalone/packages/console/.next/server/app/squadrons/page/server-reference-manifest.json +22 -22
  40. package/.next/standalone/packages/console/.next/server/app/squadrons/page.js.nft.json +1 -1
  41. package/.next/standalone/packages/console/.next/server/app/squadrons/page_client-reference-manifest.js +1 -1
  42. package/.next/standalone/packages/console/.next/server/app/squadrons/templates/[name]/page/server-reference-manifest.json +22 -22
  43. package/.next/standalone/packages/console/.next/server/app/squadrons/templates/[name]/page.js.nft.json +1 -1
  44. package/.next/standalone/packages/console/.next/server/app/squadrons/templates/[name]/page_client-reference-manifest.js +1 -1
  45. package/.next/standalone/packages/console/.next/server/app/trierarchs/[shipId]/page/server-reference-manifest.json +23 -23
  46. package/.next/standalone/packages/console/.next/server/app/trierarchs/[shipId]/page.js.nft.json +1 -1
  47. package/.next/standalone/packages/console/.next/server/app/trierarchs/[shipId]/page_client-reference-manifest.js +1 -1
  48. package/.next/standalone/packages/console/.next/server/app/trierarchs/page/server-reference-manifest.json +22 -22
  49. package/.next/standalone/packages/console/.next/server/app/trierarchs/page.js.nft.json +1 -1
  50. package/.next/standalone/packages/console/.next/server/app/trierarchs/page_client-reference-manifest.js +1 -1
  51. package/.next/standalone/packages/console/.next/server/app/version/route.js.nft.json +1 -1
  52. package/.next/standalone/packages/console/.next/server/chunks/[root-of-the-server]__0hu0iqd._.js +1 -1
  53. package/.next/standalone/packages/console/.next/server/chunks/ssr/0ysl_console__next-internal_server_app_squadrons_[squadronId]_page_actions_1cw3j40.js +1 -1
  54. package/.next/standalone/packages/console/.next/server/chunks/ssr/1eui__next-internal_server_app_squadrons_blueprints_[name]_page_actions_1hfd4me.js +1 -1
  55. package/.next/standalone/packages/console/.next/server/chunks/ssr/1eui__next-internal_server_app_squadrons_templates_[name]_page_actions_1hgb-ut.js +1 -1
  56. package/.next/standalone/packages/console/.next/server/chunks/ssr/_05ksnb-._.js +1 -1
  57. package/.next/standalone/packages/console/.next/server/chunks/ssr/_0a6pcoo._.js +1 -1
  58. package/.next/standalone/packages/console/.next/server/chunks/ssr/_0dhese8._.js +1 -1
  59. package/.next/standalone/packages/console/.next/server/chunks/ssr/_0en25st._.js +1 -1
  60. package/.next/standalone/packages/console/.next/server/chunks/ssr/_0fl_ns8._.js +1 -1
  61. package/.next/standalone/packages/console/.next/server/chunks/ssr/{_1bj_zgh._.js → _0mv8stb._.js} +1 -1
  62. package/.next/standalone/packages/console/.next/server/chunks/ssr/_0qyqhge._.js +1 -1
  63. package/.next/standalone/packages/console/.next/server/chunks/ssr/_0v9mwjs._.js +1 -1
  64. package/.next/standalone/packages/console/.next/server/chunks/ssr/{_14una6o._.js → _0w5u2i7._.js} +2 -2
  65. package/.next/standalone/packages/console/.next/server/chunks/ssr/_11c1r54._.js +1 -1
  66. package/.next/standalone/packages/console/.next/server/chunks/ssr/_1btdo11._.js +1 -1
  67. package/.next/standalone/packages/console/.next/server/chunks/ssr/_1l_w8k3._.js +1 -1
  68. package/.next/standalone/packages/console/.next/server/chunks/ssr/_1okigzt._.js +1 -1
  69. package/.next/standalone/packages/console/.next/server/chunks/ssr/{_1u-kjqn._.js → _1s1ck1t._.js} +1 -1
  70. package/.next/standalone/packages/console/.next/server/chunks/ssr/_1t0m5y7._.js +1 -1
  71. package/.next/standalone/packages/console/.next/server/chunks/ssr/_1u0h4gj._.js +1 -1
  72. package/.next/standalone/packages/console/.next/server/chunks/ssr/{_1s5olco._.js → _1w-keha._.js} +1 -1
  73. package/.next/standalone/packages/console/.next/server/chunks/ssr/_1zlk1yd._.js +1 -1
  74. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_common_dist_0pnhra3._.js +1 -1
  75. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_0d42vt9._.js +1 -1
  76. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_0qhbgyx._.js +1 -1
  77. package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_0h859xr._.js → packages_console_1qpeh28._.js} +1 -1
  78. package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_1xesm3g._.js → packages_console_1tqlqqa._.js} +1 -1
  79. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console__next-internal_server_app_inbox_page_actions_0ncsrni.js +1 -1
  80. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console__next-internal_server_app_labels_page_actions_19uj0zd.js +1 -1
  81. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console__next-internal_server_app_needs-attention_page_actions_0j2c_pm.js +1 -1
  82. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console__next-internal_server_app_needs-crew_page_actions_0e6al-u.js +1 -1
  83. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console__next-internal_server_app_page_actions_1bqipz7.js +1 -1
  84. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console__next-internal_server_app_settings_page_actions_11kiv0g.js +1 -1
  85. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console__next-internal_server_app_squadrons_page_actions_01247vf.js +1 -1
  86. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console__next-internal_server_app_trierarchs_page_actions_12_sk9e.js +1 -1
  87. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_app_ships_[shipId]_ship-page_tsx_01_8-y-._.js +1 -1
  88. package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_components_organisms_0tqv4zg._.js → packages_console_components_organisms_06vroue._.js} +1 -1
  89. package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_components_organisms_1u7ydd7._.js → packages_console_components_organisms_0rdn-zg._.js} +1 -1
  90. package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_components_organisms_1gih-e9._.js → packages_console_components_organisms_1d0cp6v._.js} +1 -1
  91. package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_components_organisms_1bclhsm._.js → packages_console_components_organisms_1sfbi3z._.js} +1 -1
  92. package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_components_organisms_0sowhyt._.js → packages_console_components_organisms_1uq6gyi._.js} +1 -1
  93. package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_components_organisms_0q9gf2-._.js → packages_console_components_organisms_1zpx5-7._.js} +1 -1
  94. package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_components_organisms_0yhyvte._.js → packages_console_components_organisms_20v8n64._.js} +1 -1
  95. package/.next/standalone/packages/console/.next/server/middleware-build-manifest.js +3 -3
  96. package/.next/standalone/packages/console/.next/server/pages/500.html +1 -1
  97. package/.next/standalone/packages/console/.next/server/server-reference-manifest.js +1 -1
  98. package/.next/standalone/packages/console/.next/server/server-reference-manifest.json +24 -24
  99. package/.next/standalone/packages/console/.next/static/chunks/{2z71yhji_sft6.js → 0ih2rt1vqphqh.js} +1 -1
  100. package/.next/standalone/packages/console/.next/static/chunks/{36vpydmztyyrm.js → 0y3-nh130w7q3.js} +1 -1
  101. package/.next/standalone/packages/console/.next/static/chunks/{2dr6lbqw7w4j4.js → 18u0s3k_cvoux.js} +1 -1
  102. package/.next/standalone/packages/console/.next/static/chunks/{0tpvy68crfx04.js → 27t2_u0fgzfs7.js} +1 -1
  103. package/.next/standalone/packages/console/package.json +3 -3
  104. package/package.json +3 -3
  105. /package/.next/standalone/packages/console/.next/static/{5yTKf_YX3Fi6w_x6e5ZsY → qFLS8pomKhiP426IeIut7}/_buildManifest.js +0 -0
  106. /package/.next/standalone/packages/console/.next/static/{5yTKf_YX3Fi6w_x6e5ZsY → qFLS8pomKhiP426IeIut7}/_clientMiddlewareManifest.js +0 -0
  107. /package/.next/standalone/packages/console/.next/static/{5yTKf_YX3Fi6w_x6e5ZsY → qFLS8pomKhiP426IeIut7}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,13082,e=>{"use strict";var t=e.i(71645),n=e.i(74735),r=e.i(28744),s=e.i(65420),i=e.i(8868),a=e.i(39957),o=e.i(29315),u=e.i(51321),l=e.i(84446),d=e.i(96296),c=e.i(75606),p=e.i(56434);let f=r.platform.os.mac&&r.platform.engine.webkit;e.s(["useFocus",0,function(e,r={}){let{enabled:h=!0,delay:m}=r,g="rootStore"in e?e.rootStore:e,{events:v,dataRef:b}=g.context,x=t.useRef(!1),y=t.useRef(null),S=t.useRef(!0),R=(0,a.useTimeout)();t.useEffect(()=>{let e=g.select("domReferenceElement");if(!h)return;let t=(0,o.getWindow)(e);return(0,s.mergeCleanups)((0,n.addEventListener)(t,"blur",function(){let e=g.select("domReferenceElement");!g.select("open")&&(0,o.isHTMLElement)(e)&&e===(0,l.activeElement)((0,i.ownerDocument)(e))&&(x.current=!0,y.current=e)}),f&&(0,n.addEventListener)(t,"keydown",function(){S.current=!0},!0),f&&(0,n.addEventListener)(t,"pointerdown",function(){S.current=!1},!0))},[g,h]),t.useEffect(()=>{if(h)return v.on("openchange",e),()=>{v.off("openchange",e)};function e(e){if(e.reason===p.REASONS.triggerPress||e.reason===p.REASONS.escapeKey){let e=g.select("domReferenceElement");(0,o.isElement)(e)&&(y.current=e,x.current=!0)}}},[v,h,g]);let w=t.useMemo(()=>{function e(){x.current=!1,y.current=null}return{onMouseLeave(){e()},onFocus(t){let n=t.currentTarget;if(x.current){if(y.current===n)return;e()}let r=(0,l.getTarget)(t.nativeEvent);if((0,o.isElement)(r)){if(f&&!t.relatedTarget){if(!S.current&&!(0,d.isTypeableElement)(r))return}else if(!(0,d.matchesFocusVisible)(r))return}let s=(0,d.isTargetInsideEnabledTrigger)(t.relatedTarget,g.context.triggerElements),{nativeEvent:i,currentTarget:a}=t,u="function"==typeof m?m():m;g.select("open")&&s||0===u||void 0===u?g.setOpen(!0,(0,c.createChangeEventDetails)(p.REASONS.triggerFocus,i,a)):R.start(u,()=>{x.current||g.setOpen(!0,(0,c.createChangeEventDetails)(p.REASONS.triggerFocus,i,a))})},onBlur(t){e();let n=t.relatedTarget,r=t.nativeEvent,s=(0,o.isElement)(n)&&n.hasAttribute((0,u.createAttribute)("focus-guard"))&&"outside"===n.getAttribute("data-type");R.start(0,()=>{let e=g.select("domReferenceElement"),t=(0,l.activeElement)((0,i.ownerDocument)(e));if(!n&&t===e||(0,l.contains)(b.current.floatingContext?.refs.floating.current,t)||(0,l.contains)(e,t)||s)return;let a=n??t;(0,d.isTargetInsideEnabledTrigger)(a,g.context.triggerElements)||g.setOpen(!1,(0,c.createChangeEventDetails)(p.REASONS.triggerFocus,r))})}}},[b,m,g,R]);return t.useMemo(()=>h?{reference:w,trigger:w}:{},[h,w])}])},61027,3414,78921,82370,89554,66506,85996,71714,81194,1545,91384,58307,64270,19712,82264,62050,82593,5953,7447,36481,74671,63947,77450,e=>{"use strict";e.s([],61027);var t=e.i(71645),n=e.i(33332);let r=t.createContext(void 0);function s(e){let s=t.useContext(r);if(void 0===s&&!e)throw Error((0,n.default)(33));return s}e.s(["MenuPositionerContext",0,r,"useMenuPositionerContext",0,s],3414);let i=t.createContext(void 0);function a(e){let r=t.useContext(i);if(void 0===r&&!e)throw Error((0,n.default)(36));return r}e.s(["MenuRootContext",0,i,"useMenuRootContext",0,a],78921);var o=e.i(52245),u=e.i(79938);let l=t.forwardRef(function(e,t){let{render:n,className:r,style:i,...l}=e,{store:d}=a(),{arrowRef:c,side:p,align:f,arrowUncentered:h,arrowStyles:m}=s(),g=d.useState("open");return(0,o.useRenderElement)("div",e,{ref:[c,t],stateAttributesMapping:u.popupStateMapping,state:{open:g,side:p,align:f,uncentered:h},props:{style:m,"aria-hidden":!0,...l}})});e.s(["MenuArrow",0,l],82370);let d=t.createContext(void 0);function c(e=!0){let r=t.useContext(d);if(void 0===r&&!e)throw Error((0,n.default)(25));return r}var p=e.i(56434);let f=t.forwardRef(function(e,t){let{render:n,className:r,style:s,...i}=e,{store:l}=a(),d=l.useState("open"),f=l.useState("mounted"),h=l.useState("transitionStatus"),m=l.useState("lastOpenChangeReason"),g=c();return(0,o.useRenderElement)("div",e,{ref:g?.backdropRef?[t,g.backdropRef]:t,state:{open:d,transitionStatus:h},stateAttributesMapping:u.popupTransitionStateMapping,props:[{role:"presentation",hidden:!f,style:{pointerEvents:m===p.REASONS.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},i]})});e.s(["MenuBackdrop",0,f],89554);var h=e.i(51437),m=e.i(56789);let g=t.createContext(void 0);var v=e.i(28918),b=e.i(40886),x=e.i(76782),y=e.i(28744),S=e.i(64350);function R(e){let{closeOnClick:n,highlighted:r,id:s,nodeId:i,store:a,typingRef:o,itemRef:u,itemMetadata:l}=e,{events:d}=a.useState("floatingTreeRoot"),f=a.useState("open"),h=c(!0),m=void 0!==h;return t.useMemo(()=>({id:s,role:"menuitem",tabIndex:f&&r?0:-1,onKeyDown(e){" "===e.key&&o?.current&&e.preventDefault()},onMouseMove(e){i&&d.emit("itemhover",{nodeId:i,target:e.currentTarget})},onClick(e){n&&d.emit("close",{domEvent:e,reason:p.REASONS.itemPress})},onMouseUp(e){if(h){let t=h.initialCursorPointRef.current;if(h.initialCursorPointRef.current=null,m&&t&&1>=Math.abs(e.clientX-t.x)&&1>=Math.abs(e.clientY-t.y)||m&&!y.platform.os.mac&&2===e.button)return}u.current&&a.context.allowMouseUpTriggerRef.current&&(!m||2===e.button)&&"regular-item"===l.type&&(0,S.dispatchClickWithModifiers)(u.current,e,{detail:1})}}),[n,r,s,d,i,f,a,o,u,h,m,l])}let w={type:"regular-item"};function C(e){let{closeOnClick:n,disabled:r,highlighted:s,id:i,store:a,typingRef:o=a.context.typingRef,nativeButton:u,itemMetadata:l,nodeId:d}=e,c=t.useRef(null),{getButtonProps:p,buttonRef:f}=(0,b.useButton)({disabled:r,focusableWhenDisabled:!0,native:u,composite:!0}),h=R({closeOnClick:n,highlighted:s,id:i,nodeId:d,store:a,typingRef:o,itemRef:c,itemMetadata:l}),m=t.useCallback(e=>(0,x.mergeProps)(h,{onMouseEnter(){"submenu-trigger"===l.type&&l.setActive()}},e,p),[h,p,l]),g=(0,v.useMergedRefs)(c,f);return t.useMemo(()=>({getItemProps:m,itemRef:g}),[m,g])}e.s(["REGULAR_ITEM",0,w,"useMenuItem",0,C],66506);var M=e.i(73553),k=e.i(88015);let T={checked:e=>e?{"data-checked":""}:{"data-unchecked":""},...e.i(74354).transitionStatusMapping};var E=e.i(75606),j=e.i(43476);let I=t.forwardRef(function(e,n){let{render:r,className:i,id:u,label:l,nativeButton:d=!1,disabled:c=!1,closeOnClick:f=!1,checked:v,defaultChecked:b,onCheckedChange:x,style:y,...S}=e,R=(0,M.useCompositeListItem)({guess:!0,label:l}),I=s(!0),O=(0,k.useBaseUiId)(u),{store:N}=a(),P=N.useState("disabled"),A=c||P,L=N.useState("isActive",R.index),q=N.useState("itemProps"),[D,Q]=(0,h.useControlled)({controlled:v,default:b??!1,name:"MenuCheckboxItem",state:"checked"}),{getItemProps:F,itemRef:z}=C({closeOnClick:f,disabled:A,highlighted:L,id:O,store:N,nativeButton:d,nodeId:I?.context.nodeId,itemMetadata:w}),U=t.useMemo(()=>({disabled:A,highlighted:L,checked:D}),[A,L,D]),B=(0,o.useRenderElement)("div",e,{state:U,stateAttributesMapping:T,props:[q,{role:"menuitemcheckbox","aria-checked":D,onClick:function(e){let t=(0,E.createChangeEventDetails)(p.REASONS.itemPress,e.nativeEvent,void 0,{preventUnmountOnClose:m.NOOP});x?.(!D,t),t.isCanceled||Q(e=>!e)}},S,F],ref:[z,n,R.ref]});return(0,j.jsx)(g.Provider,{value:U,children:B})});e.s(["MenuCheckboxItem",0,I],85996);var O=e.i(23910),N=e.i(37584);let P=t.forwardRef(function(e,r){let{render:s,className:i,style:a,keepMounted:u=!1,...l}=e,d=function(){let e=t.useContext(g);if(void 0===e)throw Error((0,n.default)(30));return e}(),c=t.useRef(null),{transitionStatus:p,mounted:f,setMounted:h}=(0,O.useTransitionStatus)(d.checked);(0,N.useOpenChangeComplete)({batch:!0,enabled:!d.checked,open:d.checked,ref:c,onComplete(){d.checked||h(!1)}});let m={checked:d.checked,disabled:d.disabled,highlighted:d.highlighted,transitionStatus:p};return(0,o.useRenderElement)("span",e,{state:m,ref:[r,c],stateAttributesMapping:T,props:{"aria-hidden":!0,...l},enabled:u||f})});e.s(["MenuCheckboxItemIndicator",0,P],71714);let A=t.createContext(void 0),L=t.forwardRef(function(e,n){let{render:r,className:s,style:i,...a}=e,[u,l]=t.useState(void 0),d=(0,o.useRenderElement)("div",e,{ref:n,props:{role:"group","aria-labelledby":u,...a}});return(0,j.jsx)(A.Provider,{value:l,children:d})});e.s(["MenuGroup",0,L],81194);var q=e.i(46376);let D=t.forwardRef(function(e,r){let{render:s,className:i,style:a,id:u,...l}=e,d=(0,k.useBaseUiId)(u),c=function(){let e=t.useContext(A);if(void 0===e)throw Error((0,n.default)(31));return e}();return(0,q.useIsoLayoutEffect)(()=>(c(d),()=>{c(e=>e===d?void 0:e)}),[c,d]),(0,o.useRenderElement)("div",e,{ref:r,props:{id:d,"aria-hidden":!0,...l}})});e.s(["MenuGroupLabel",0,D],1545);let Q=t.forwardRef(function(e,t){let{render:n,className:r,id:i,label:u,nativeButton:l=!1,disabled:d=!1,closeOnClick:c=!0,style:p,...f}=e,h=(0,M.useCompositeListItem)({guess:!0,label:u}),m=s(!0),g=(0,k.useBaseUiId)(i),{store:v}=a(),b=v.useState("disabled"),x=d||b,y=v.useState("isActive",h.index),S=v.useState("itemProps"),{getItemProps:R,itemRef:T}=C({closeOnClick:c,disabled:x,highlighted:y,id:g,store:v,nativeButton:l,nodeId:m?.context.nodeId,itemMetadata:w});return(0,o.useRenderElement)("div",e,{state:{disabled:x,highlighted:y},props:[S,f,R],ref:[T,t,h.ref]})});e.s(["MenuItem",0,Q],91384);let F=t.forwardRef(function(e,n){let{render:r,className:i,id:u,label:l,closeOnClick:d=!1,style:c,...p}=e,f=t.useRef(null),h=(0,M.useCompositeListItem)({guess:!0,label:l}),m=s(!0),g=m?.context.nodeId,v=(0,k.useBaseUiId)(u),{store:y}=a(),S=y.useState("isActive",h.index),C=y.useState("itemProps"),T=y.context.typingRef,{getButtonProps:E,buttonRef:j}=(0,b.useButton)({native:!1,composite:!0}),I=R({closeOnClick:d,highlighted:S,id:v,nodeId:g,store:y,typingRef:T,itemRef:f,itemMetadata:w});return(0,o.useRenderElement)("a",e,{state:{highlighted:S},props:[C,p,function(e){return(0,x.mergeProps)(I,e,E)}],ref:[f,j,n,h.ref]})});e.s(["MenuLinkItem",0,F],58307);var z=e.i(61487),U=e.i(31157),B=e.i(96533),_=e.i(73327),K=e.i(53984);let H=t.forwardRef(function(e,n){let{render:r,className:i,style:l,finalFocus:d,...c}=e,{store:f}=a(),{side:h,align:m}=s(),g=null!=(0,B.useToolbarRootContext)(!0),v=f.useState("open"),b=f.useState("transitionStatus"),x=f.useState("popupProps"),y=f.useState("mounted"),S=f.useState("instantType"),R=f.useState("activeTriggerElement"),w=f.useState("parent"),C=f.useState("lastOpenChangeReason"),M=f.useState("rootId"),k=f.useState("floatingRootContext"),T=f.useState("floatingTreeRoot"),I=f.useState("closeDelay"),O=f.useState("hoverEnabled"),P=f.useState("disabled"),A=f.useState("openMethod"),L="context-menu"===w.type;(0,N.useOpenChangeComplete)({open:v,ref:f.context.popupRef,onComplete(){v&&f.context.onOpenChangeComplete?.(!0)}}),t.useEffect(()=>{function e(e){f.setOpen(!1,(0,E.createChangeEventDetails)(e.reason,e.domEvent))}return T.events.on("close",e),()=>{T.events.off("close",e)}},[T.events,f]),(0,U.useHoverFloatingInteraction)(k,{enabled:O&&!P&&!L&&"menubar"!==w.type,closeDelay:I});let q=f.useStateSetter("popupElement"),D={transitionStatus:b,side:h,align:m,open:v,nested:"menu"===w.type,instant:S},Q=(0,o.useRenderElement)("div",e,{state:D,ref:[n,f.context.popupRef,q],stateAttributesMapping:u.popupTransitionStateMapping,props:[x,{onKeyDown(e){g&&_.COMPOSITE_KEYS.has(e.key)&&e.stopPropagation()}},(0,K.getDisabledMountTransitionStyles)(b),c,{"data-rootownerid":M}]}),F=void 0===w.type||L;return(R||"menubar"===w.type&&C!==p.REASONS.outsidePress)&&(F=!0),(0,j.jsx)(z.FloatingFocusManager,{context:k,openInteractionType:A,modal:L,disabled:!y,returnFocus:void 0===d?F:d,initialFocus:"menu"!==w.type,restoreFocus:!0,externalTree:"menubar"!==w.type?T:void 0,previousFocusableElement:R,nextFocusableElement:void 0===w.type?f.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:void 0===w.type?f.context.beforeContentFocusGuardRef:void 0,children:Q})});e.s(["MenuPopup",0,H],64270);var V=e.i(26674);let G=t.createContext(void 0),$=t.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:s,parent:i}=a();if(!(s.useState("mounted")||n))return null;let o="menu"===i.type||"menubar"===i.type?"group":void 0;return(0,j.jsx)(G.Provider,{value:n,children:(0,j.jsx)(V.FloatingPortal,{ref:t,...r,portalOwnerRole:o})})});e.s(["MenuPortal",0,$],19712);var W=e.i(44394),Y=e.i(39957),J=e.i(46420),X=e.i(23706),Z=e.i(53687),ee=e.i(426),et=e.i(38396),en=e.i(22640),er=e.i(89579),es=e.i(33383);let ei=t.forwardRef(function(e,s){let{anchor:i,positionMethod:o="absolute",className:u,render:l,side:d,align:f,sideOffset:h=0,alignOffset:m=0,collisionBoundary:g="clipping-ancestors",collisionPadding:v=5,arrowPadding:b=5,sticky:x=!1,disableAnchorTracking:y=!1,collisionAvoidance:S=et.DROPDOWN_COLLISION_AVOIDANCE,style:R,...w}=e,{store:C}=a(),M=function(){let e=t.useContext(G);if(void 0===e)throw Error((0,n.default)(32));return e}(),k=c(!0),T=C.useState("parent"),I=C.useState("floatingRootContext"),O=C.useState("floatingTreeRoot"),N=C.useState("mounted"),P=C.useState("open"),A=C.useState("modal"),L=C.useState("openMethod"),D=C.useState("activeTriggerElement"),Q=C.useState("transitionStatus"),F=C.useState("positionerElement"),z=C.useState("instantType"),U=C.useState("adaptiveOrigin"),B=C.useState("lastOpenChangeReason"),_=C.useState("floatingNodeId"),K=C.useState("floatingParentNodeId"),H=I.useState("domReferenceElement"),V=t.useRef(null),$=(0,en.useAnimationsFinished)(F),ei=i,ea=h,eo=m,eu=f,el=S;"context-menu"===T.type&&(ei=i??T.context?.anchor,eu=eu??"start",d||"center"===eu||(eo=e.alignOffset??2,ea=e.sideOffset??-5));let ed=d,ec=eu;"menu"===T.type?(ed=ed??"inline-end",ec=ec??"start",el=e.collisionAvoidance??et.POPUP_COLLISION_AVOIDANCE):"menubar"===T.type&&(ed=ed??("vertical"===T.context.orientation?"inline-end":"bottom"),ec=ec??"start");let ep="context-menu"===T.type,ef=(0,X.useAnchorPositioning)({anchor:ei,floatingRootContext:I,positionMethod:k?"fixed":o,mounted:N,side:ed,sideOffset:ea,align:ec,alignOffset:eo,arrowPadding:ep?0:b,collisionBoundary:g,collisionPadding:v,sticky:x,nodeId:_,keepMounted:M,disableAnchorTracking:y,collisionAvoidance:el,shift:ep?{crossAxis:!("side"in el&&"flip"===el.side),rootBoundary:"layoutViewport"}:void 0,externalTree:O,adaptiveOrigin:U});t.useEffect(()=>{function e(e){e.open&&(e.parentNodeId===_&&C.set("hoverEnabled",!1),e.nodeId!==_&&e.parentNodeId===C.select("floatingParentNodeId")&&C.setOpen(!1,(0,E.createChangeEventDetails)(p.REASONS.siblingOpen)))}return O.events.on("menuopenchange",e),()=>{O.events.off("menuopenchange",e)}},[C,O.events,_]),t.useEffect(()=>{if(null!=C.select("floatingParentNodeId"))return O.events.on("menuopenchange",e),()=>{O.events.off("menuopenchange",e)};function e(e){if(e.open||e.nodeId!==C.select("floatingParentNodeId"))return;let t=e.reason??p.REASONS.siblingOpen;C.setOpen(!1,(0,E.createChangeEventDetails)(t))}},[O.events,C]);let eh=(0,Y.useTimeout)();t.useEffect(()=>{P||eh.clear()},[P,eh]),t.useEffect(()=>{function e(e){if(P&&e.nodeId===C.select("floatingParentNodeId"))if(e.target&&D&&D!==e.target){let e=C.select("closeDelay");e>0?eh.isStarted()||eh.start(e,()=>{C.setOpen(!1,(0,E.createChangeEventDetails)(p.REASONS.siblingOpen))}):C.setOpen(!1,(0,E.createChangeEventDetails)(p.REASONS.siblingOpen))}else eh.clear()}return O.events.on("itemhover",e),()=>{O.events.off("itemhover",e)}},[O.events,P,D,C,eh]),t.useEffect(()=>{let e={open:P,nodeId:_,parentNodeId:K,reason:C.select("lastOpenChangeReason")};O.events.emit("menuopenchange",e)},[O.events,P,C,_,K]),(0,q.useIsoLayoutEffect)(()=>{let e=V.current;if(H&&(V.current=H),e&&H&&H!==e){C.set("instantType",void 0);let e=new AbortController;return $(()=>{C.set("instantType","trigger-change")},e.signal),()=>{e.abort()}}},[H,$,C]);let em={open:P,side:ef.side,align:ef.align,anchorHidden:ef.anchorHidden,nested:"menu"===T.type,instant:z},eg="menubar"===T.type&&T.context.modal,ev=A&&B!==p.REASONS.triggerHover;(0,es.useAnchoredPopupScrollLock)(P&&(eg||ev),"touch"===L,F,D);let eb=(0,er.usePositioner)(e,em,{styles:ef.positionerStyles,transitionStatus:Q,props:w,refs:[s,C.useStateSetter("positionerElement")],hidden:!N,inert:!P}),ex=N&&"menu"!==T.type&&("menubar"!==T.type&&A&&B!==p.REASONS.triggerHover||"menubar"===T.type&&T.context.modal),ey=null;return"menubar"===T.type?ey=T.context.contentElement:void 0===T.type&&(ey=D),(0,j.jsxs)(r.Provider,{value:ef,children:[ex&&(0,j.jsx)(ee.InternalBackdrop,{ref:"context-menu"===T.type||"nested-context-menu"===T.type?T.context.internalBackdropRef:null,inert:(0,W.inertValue)(!P),cutout:ey}),(0,j.jsx)(J.FloatingNode,{id:_,children:(0,j.jsx)(Z.CompositeList,{elementsRef:C.context.itemDomElements,labelsRef:C.context.itemLabels,children:eb})})]})});e.s(["MenuPositioner",0,ei],82264);var ea=e.i(67865);let eo=t.createContext(void 0),eu=t.memo(t.forwardRef(function(e,n){let{render:r,className:s,value:i,defaultValue:a,onValueChange:u,disabled:l=!1,style:d,"aria-labelledby":c,...p}=e,[f,m]=t.useState(void 0),[g,v]=(0,h.useControlled)({controlled:i,default:a,name:"MenuRadioGroup"}),b=(0,ea.useStableCallback)((e,t)=>{u?.(e,t),t.isCanceled||v(e)}),x=(0,o.useRenderElement)("div",e,{state:{disabled:l},ref:n,props:{role:"group","aria-labelledby":c??f,"aria-disabled":l||void 0,...p}}),y=t.useMemo(()=>({value:g,setValue:b,disabled:l}),[g,b,l]);return(0,j.jsx)(A.Provider,{value:m,children:(0,j.jsx)(eo.Provider,{value:y,children:x})})}));e.s(["MenuRadioGroup",0,eu],62050);let el=t.createContext(void 0),ed=t.forwardRef(function(e,r){let{render:i,className:u,id:l,label:d,nativeButton:c=!1,disabled:f=!1,closeOnClick:h=!1,value:g,style:v,...b}=e,x=(0,M.useCompositeListItem)({guess:!0,label:d}),y=s(!0),S=(0,k.useBaseUiId)(l),{store:R}=a(),I=R.useState("isActive",x.index),O=R.useState("itemProps"),{value:N,setValue:P,disabled:A}=function(){let e=t.useContext(eo);if(void 0===e)throw Error((0,n.default)(34));return e}(),L=R.useState("disabled"),q=f||A||L,D=N===g,{getItemProps:Q,itemRef:F}=C({closeOnClick:h,disabled:q,highlighted:I,id:S,store:R,nativeButton:c,nodeId:y?.context.nodeId,itemMetadata:w}),z=t.useMemo(()=>({disabled:q,highlighted:I,checked:D}),[q,I,D]),U=(0,o.useRenderElement)("div",e,{state:z,stateAttributesMapping:T,props:[O,{role:"menuitemradio","aria-checked":D,onClick:function(e){P(g,(0,E.createChangeEventDetails)(p.REASONS.itemPress,e.nativeEvent,void 0,{preventUnmountOnClose:m.NOOP}))}},b,Q],ref:[F,r,x.ref]});return(0,j.jsx)(el.Provider,{value:z,children:U})});e.s(["MenuRadioItem",0,ed],82593);let ec=t.forwardRef(function(e,r){let{render:s,className:i,style:a,keepMounted:u=!1,...l}=e,d=function(){let e=t.useContext(el);if(void 0===e)throw Error((0,n.default)(35));return e}(),c=t.useRef(null),{transitionStatus:p,mounted:f,setMounted:h}=(0,O.useTransitionStatus)(d.checked);(0,N.useOpenChangeComplete)({batch:!0,enabled:!d.checked,open:d.checked,ref:c,onComplete(){d.checked||h(!1)}});let m={checked:d.checked,disabled:d.disabled,highlighted:d.highlighted,transitionStatus:p};return(0,o.useRenderElement)("span",e,{state:m,stateAttributesMapping:T,ref:[r,c],props:{"aria-hidden":!0,...l},enabled:u||f})});e.s(["MenuRadioItemIndicator",0,ec],5953);var ep=e.i(83977),ef=e.i(88940),eh=e.i(96499),em=e.i(17989),eg=e.i(60891),ev=e.i(5049),eb=e.i(50527);let ex=t.createContext(null);function ey(e){let r=t.useContext(ex);if(null===r&&!e)throw Error((0,n.default)(5));return r}e.s(["useMenubarContext",0,ey],7447);var eS=e.i(72855),eR=e.i(32199),ew=e.i(26352),eC=e.i(79248),eM=e.i(18478),ek=e.i(16786),eT=e.i(90627);let eE={...ek.popupStoreSelectors,disabled:e=>"menubar"===e.parent.type&&e.parent.context.disabled||e.disabled,modal:e=>(void 0===e.parent.type||"context-menu"===e.parent.type)&&(e.modal??!0),openMethod:e=>e.openMethod,allowMouseEnter:e=>e.allowMouseEnter,highlightItemOnHover:e=>e.highlightItemOnHover,parent:e=>e.parent,rootId:e=>"menu"===e.parent.type?e.parent.store.select("rootId"):void 0!==e.parent.type?e.parent.context.rootId:e.rootId,activeIndex:e=>e.activeIndex,isActive:(e,t)=>e.activeIndex===t,hoverEnabled:e=>e.hoverEnabled,instantType:e=>e.instantType,lastOpenChangeReason:e=>e.openChangeReason,floatingTreeRoot:e=>"menu"===e.parent.type?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot,floatingNodeId:e=>e.floatingNodeId,floatingParentNodeId:e=>e.floatingParentNodeId,itemProps:e=>e.itemProps,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin,keyboardEventRelay:e=>e.keyboardEventRelay?e.keyboardEventRelay:"menu"===e.parent.type?e.parent.store.select("keyboardEventRelay"):void 0};class ej extends ew.ReactStore{constructor(e,t,n=!1){const r=new eT.PopupTriggerMap;super(eO(r,t,n,e),eI(r),eE),this.unsubscribeParentListener=this.observe("parent",e=>{if(this.unsubscribeParentListener?.(),"menu"===e.type){let t=e.store.select("rootId"),n=e.store.select("floatingTreeRoot"),r=e.store.select("keyboardEventRelay");this.unsubscribeParentListener=e.store.subscribe(()=>{let s=e.store.select("rootId"),i=e.store.select("floatingTreeRoot"),a=e.store.select("keyboardEventRelay");(t!==s||n!==i||r!==a)&&(t=s,n=i,r=a,this.notifyAll())}),this.context.allowMouseUpTriggerRef=e.store.context.allowMouseUpTriggerRef;return}void 0!==e.type&&(this.context.allowMouseUpTriggerRef=e.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(e,t){this.state.floatingRootContext.context.events.emit("setOpen",{open:e,eventDetails:t})}unsubscribeParentListener=null}function eI(e){return{positionerRef:t.createRef(),popupRef:t.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:t.createRef(),beforeContentFocusGuardRef:t.createRef(),onOpenChangeComplete:void 0,triggerElements:e}}function eO(e,t,n=!1,r){return{...(0,ek.createInitialPopupStoreState)(e,t,n),disabled:!1,modal:!0,openMethod:null,allowMouseEnter:!1,highlightItemOnHover:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new eC.FloatingTreeStore,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:m.EMPTY_OBJECT,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0,...r}}e.s(["MenuStore",0,ej,"createNullMenuStore",0,function(){let e=new eT.PopupTriggerMap;return Object.assign(new eM.NullStore(Object.freeze(eO(e)),Object.freeze(eI(e)),eE),{setOpen:m.NOOP})}],36481);var eN=e.i(64111);let eP=t.createContext(void 0);function eA(){return t.useContext(eP)}e.s(["MenuSubmenuRootContext",0,eP,"useMenuSubmenuRootContext",0,eA],74671);let eL=(0,eh.fastComponent)(function(e){var n,r,s;let o,{children:u,open:l,onOpenChange:d,onOpenChangeComplete:f,defaultOpen:h=!1,disabled:g=!1,modal:v,loopFocus:b=!0,orientation:y="vertical",actionsRef:S,closeParentOnEsc:R=!1,handle:w,triggerId:C,defaultTriggerId:M=null,highlightItemOnHover:k=!0}=e,T=c(!0),I=a(!0),O=ey(!0),N=eA(),P=t.useMemo(()=>N&&I?{type:"menu",store:I.store}:O?{type:"menubar",context:O}:T&&!I?{type:"context-menu",context:T}:{type:void 0},[T,I,O,N]),A=(0,ep.useId)(),L=(0,ep.useId)(),D=(0,J.useFloatingParentNodeId)(),Q="menu"===P.type?P.store:void 0,F=(l??h)&&Q?.state.transitionStatus==="starting",z=(0,ef.useRefWithInit)(()=>F?Q?.state.instantType:void 0).current,U=(n={open:h,openProp:l,activeTriggerId:M,triggerIdProp:C,parent:P,disabled:g,highlightItemOnHover:k,modal:void 0===P.type?v:void 0,rootId:A,instantType:z},r=L,s=null!=D,(0,ef.useRefWithInit)(()=>new ej(n,r,s)).current);U.useControlledProp("openProp",l),U.useControlledProp("triggerIdProp",C),U.useContextCallback("onOpenChangeComplete",f);let B=U.useState("floatingTreeRoot"),_=(0,J.useFloatingNodeId)(B),K=U.useState("open"),H=U.useState("activeTriggerElement"),V=U.useState("positionerElement"),G=U.useState("hoverEnabled"),$=U.useState("disabled"),W=U.useState("lastOpenChangeReason"),X=U.useState("parent"),Z=U.useState("activeIndex"),ee=U.useState("payload"),er=U.useState("floatingParentNodeId"),es=t.useRef(null),ei=t.useRef("context-menu"!==X.type),eo=(0,Y.useTimeout)(),eu=t.useRef(!0),el=(0,Y.useTimeout)(),ed=null!=er,{openMethod:ec,triggerProps:eh}=(0,eR.useOpenInteractionType)(K);U.useSyncedValues({disabled:g,highlightItemOnHover:k,modal:void 0===X.type?v:void 0,openMethod:ec,rootId:A}),(0,eN.useImplicitActiveTrigger)(U);let{forceUnmount:ex,transitionStatus:ew}=(0,eN.useOpenStateTransitions)(K,U,()=>{U.set("allowMouseEnter",!1)},F),eC=(0,en.useAnimationsFinished)(U.context.popupRef);t.useEffect(()=>{if(void 0===z)return;let e=()=>{U.state.instantType===z&&U.set("instantType",void 0)};if(!K)return void e();if(void 0!==ew)return;if(null==U.context.popupRef.current)return void e();let t=new AbortController;return eC(e,t.signal),()=>{t.abort()}},[z,K,ew,eC,U]),(0,q.useIsoLayoutEffect)(()=>{T&&!I?U.update({parent:{type:"context-menu",context:T},floatingNodeId:_,floatingParentNodeId:D}):I&&U.update({floatingNodeId:_,floatingParentNodeId:D})},[T,I,_,D,U]),t.useEffect(()=>{if(K||(es.current=null),"context-menu"===X.type){if(!K){eo.clear(),ei.current=!1;return}eo.start(500,()=>{ei.current=!0})}},[eo,K,X.type]),(0,q.useIsoLayoutEffect)(()=>{K||G||U.set("hoverEnabled",!0)},[K,G,U]);let eM=(0,ea.useStableCallback)((e,t)=>{let n=t.reason;if(!e&&!U.select("open")||K===e&&t.trigger===H&&W===n)return;let r=(0,eN.attachPreventUnmountOnClose)(t);if(e||null!=t.trigger||(t.trigger=H??void 0),d?.(e,t),t.isCanceled)return;U.state.floatingRootContext.dispatchOpenChange(e,t);let s=t.event;if(!1===e&&s?.type==="click"&&"touch"===s.pointerType&&!eu.current)return;e&&n===p.REASONS.triggerFocus?(eu.current=!1,el.start(300,()=>{eu.current=!0})):(eu.current=!0,el.clear());let i=(n===p.REASONS.triggerPress||n===p.REASONS.itemPress)&&0===s.detail,a=!e&&(n===p.REASONS.escapeKey||null==n);es.current=t.event;let o=(0,eN.createPopupOpenState)(U.state,e,t.trigger,r());o.openChangeReason=n,"menubar"===X.type&&(n===p.REASONS.triggerFocus||n===p.REASONS.focusOut||n===p.REASONS.triggerHover||n===p.REASONS.listNavigation||n===p.REASONS.siblingOpen)?o.instantType="group":i||a?o.instantType=i?"click":"dismiss":o.instantType=void 0,U.update(o)}),ek=(0,eb.useSyncedFloatingRootContext)({popupStore:U,floatingRootContext:U.state.floatingRootContext,floatingId:L,nested:null!=D,onOpenChange:eM}),eT=ek.context.events;(0,q.useIsoLayoutEffect)(()=>{let e=({open:e,eventDetails:t})=>eM(e,t);return eT.on("setOpen",e),()=>{eT?.off("setOpen",e)}},[eT,eM]);let eE=t.useCallback(()=>{U.setOpen(!1,(0,E.createChangeEventDetails)(p.REASONS.imperativeAction))},[U]);t.useImperativeHandle(S,()=>({unmount:ex,close:eE}),[ex,eE]),"context-menu"===X.type&&(o=X.context),t.useImperativeHandle(o?.positionerRef,()=>V,[V]),t.useImperativeHandle(o?.actionsRef,()=>({setOpen:eM}),[eM]);let eI=(0,em.useDismiss)(ek,{enabled:!$,bubbles:{escapeKey:R&&"menu"===X.type},outsidePress:()=>"context-menu"!==X.type||es.current?.type==="contextmenu"||ei.current,externalTree:ed?B:void 0}),eO=(0,eS.useDirection)(),eP=t.useCallback(e=>{U.select("activeIndex")!==e&&U.set("activeIndex",e)},[U]),eL=(0,eg.useListNavigation)(ek,{enabled:!$,listRef:U.context.itemDomElements,activeIndex:Z,nested:void 0!==X.type,loopFocus:b,orientation:y,parentOrientation:"menubar"===X.type?X.context.orientation:void 0,rtl:"rtl"===eO,disabledIndices:m.EMPTY_ARRAY,onNavigate:eP,openOnArrowKeyDown:"context-menu"!==X.type,externalTree:ed?B:void 0,focusItemOnHover:k}),eq=t.useCallback(e=>{U.context.typingRef.current=e},[U]),eD=(0,ev.useTypeahead)(ek,{enabled:!$,listRef:U.context.itemLabels,elementsRef:U.context.itemDomElements,activeIndex:Z,resetMs:et.TYPEAHEAD_RESET_MS,onMatch:e=>{K&&e!==Z&&U.set("activeIndex",e)},onTyping:eq}),eQ=t.useMemo(()=>{let e=(0,x.mergeProps)(eD.reference,eL.reference,eI.reference,{onMouseMove(){U.set("allowMouseEnter",!0)}},eh);return e["aria-haspopup"]="menu",e["aria-expanded"]=K,e},[U,eD.reference,eL.reference,eI.reference,eh,K]),eF=t.useMemo(()=>{let e=(0,x.mergeProps)(eL.trigger,eI.trigger,eh);return e["aria-haspopup"]="menu",e["aria-expanded"]=!1,e},[eL.trigger,eI.trigger,eh]);(0,ef.useRefWithInit)(()=>(U.update({inactiveTriggerProps:eF}),null));let ez=t.useMemo(()=>(0,x.mergeProps)(eN.FOCUSABLE_POPUP_PROPS,{id:L,role:"menu","aria-orientation":"horizontal"===y?"horizontal":void 0,"aria-labelledby":H?.id,onMouseMove(){U.set("allowMouseEnter",!0),"menu"===X.type&&U.set("hoverEnabled",!1)},onClick(){U.select("hoverEnabled")&&U.set("hoverEnabled",!1)},onKeyDown(e){let t=U.select("keyboardEventRelay");t&&!e.isPropagationStopped()&&t(e)}},eD.floating,eL.floating,eI.floating),[H,L,y,X.type,U,eD.floating,eL.floating,eI.floating]),eU=eL.item??m.EMPTY_OBJECT;(0,eN.usePopupInteractionProps)(U,{floatingRootContext:ek,activeTriggerProps:eQ,inactiveTriggerProps:eF,popupProps:ez,itemProps:eU});let eB=t.useMemo(()=>({store:U,parent:P}),[U,P]),e_=(0,j.jsxs)(i.Provider,{value:eB,children:[w&&(0,j.jsx)(eN.PopupHandleAttachment,{handle:w,store:U}),"function"==typeof u?u({payload:ee}):u]});return void 0===X.type||"context-menu"===X.type?(0,j.jsx)(J.FloatingTree,{externalTree:B,children:e_}):e_});e.s(["MenuRoot",0,eL],63947),e.s(["MenuSubmenuRoot",0,function(e){let n=a().store,r=t.useMemo(()=>({parentMenu:n}),[n]);return(0,j.jsx)(eP.Provider,{value:r,children:(0,j.jsx)(eL,{...e})})}],77450)},63707,8619,28276,91772,e=>{"use strict";var t=e.i(56420);let n={name:"chevrons-up-down",size:24,node:[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]};n.node;let r=(0,t.default)(n);e.s(["ChevronsUpDown",0,r],63707);let s={name:"circle-user-round",size:24,node:[["path",{d:"M17.925 20.056a6 6 0 0 0-11.851.001",key:"z69sun"}],["circle",{cx:"12",cy:"11",r:"4",key:"1gt34v"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],aliases:["user-circle-2"]};s.node;let i=(0,t.default)(s);e.s(["CircleUserRound",0,i],8619);let a={name:"compass",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}]]};a.node;let o=(0,t.default)(a);e.s(["Compass",0,o],28276);let u={name:"laptop-minimal",size:24,node:[["rect",{width:"18",height:"12",x:"3",y:"4",rx:"2",ry:"2",key:"1qhy41"}],["line",{x1:"2",x2:"22",y1:"20",y2:"20",key:"ni3hll"}]],aliases:["laptop-2"]};u.node;let l=(0,t.default)(u);e.s(["LaptopMinimal",0,l],91772)},18964,e=>{"use strict";var t=e.i(56420);let n={name:"list-checks",size:24,node:[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]]};n.node;let r=(0,t.default)(n);e.s(["ListChecks",0,r],18964)},67784,e=>{"use strict";var t=e.i(56420);let n={name:"log-out",size:24,node:[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]};n.node;let r=(0,t.default)(n);e.s(["LogOut",0,r],67784)},46513,96699,35965,95014,e=>{"use strict";var t=e.i(56420);let n={name:"monitor",size:24,node:[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]};n.node;let r=(0,t.default)(n);e.s(["Monitor",0,r],46513);let s={name:"moon",size:24,node:[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]};s.node;let i=(0,t.default)(s);e.s(["Moon",0,i],96699);let a={name:"sun",size:24,node:[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]};a.node;let o=(0,t.default)(a);e.s(["Sun",0,o],35965);var u=e.i(49635);e.s(["THEME_LABELS",0,{light:"Light",dark:"Dark",system:"System"},"applyTheme",0,function(e){let t=document.documentElement;t.dataset.theme=e;let n="dark"===e||"system"===e&&window.matchMedia("(prefers-color-scheme: dark)").matches;t.classList.toggle("dark",n)},"sessionSince",0,function(e,t){let n=new Date(e.since),r=n.toDateString()===t.toDateString()?(0,u.clockTime)(n):(0,u.shortDateTime)(n);return`Device \xb7 ${e.device}, since ${r}`}],95014)},66794,e=>{"use strict";var t=e.i(56420);let n={name:"settings",size:24,node:[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};n.node;let r=(0,t.default)(n);e.s(["Settings",0,r],66794)},95187,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={callServer:function(){return i.callServer},createServerReference:function(){return o.createServerReference},findSourceMapURL:function(){return a.findSourceMapURL}};for(var s in r)Object.defineProperty(n,s,{enumerable:!0,get:r[s]});let i=e.r(32120),a=e.r(92245),o=e.r(35326)},57334,e=>{"use strict";var t=e.i(43476);e.i(61027);var n=e.i(82370),r=e.i(89554),s=e.i(85996),i=e.i(71714),a=e.i(81194),o=e.i(1545),u=e.i(91384),l=e.i(58307),d=e.i(64270),c=e.i(19712),p=e.i(82264),f=e.i(62050),h=e.i(82593),m=e.i(5953),g=e.i(63947),v=e.i(77450),b=e.i(33332),x=e.i(71645),y=e.i(39957),S=e.i(8868),R=e.i(96499),w=e.i(67865),C=e.i(46376),M=e.i(56789),k=e.i(50316),T=e.i(85689),E=e.i(46420),j=e.i(13082),I=e.i(72135),O=e.i(79248),N=e.i(84446),P=e.i(78921),A=e.i(79938),L=e.i(52245),q=e.i(40886),D=e.i(64042),Q=e.i(95530);function F(e){let{render:t,className:n,style:r,state:s=M.EMPTY_OBJECT,props:i=M.EMPTY_ARRAY,refs:a=M.EMPTY_ARRAY,metadata:o,stateAttributesMapping:u,tag:l="div",...d}=e,{compositeProps:c,compositeRef:p}=(0,Q.useCompositeItem)({metadata:o});return(0,L.useRenderElement)(l,e,{state:s,ref:[p,...a],props:[c,...i,d],stateAttributesMapping:u})}var z=e.i(38452),U=e.i(29315),B=e.i(59636),_=e.i(64111),K=e.i(46570),H=e.i(88015),V=e.i(56434),G=e.i(7447),$=e.i(38396),W=e.i(52535),Y=e.i(76782);let J=(0,R.fastComponentRef)(function(e,n){let r,{render:s,className:i,style:a,disabled:o=!1,nativeButton:u=!0,id:l,openOnHover:d,delay:c=100,closeDelay:p=0,handle:f,payload:h,...m}=e,g=(0,P.useMenuRootContext)(!0),v=(0,B.usePopupHandleStore)(f)??g?.store;if(!v)throw Error((0,b.default)(85));let R=(0,H.useBaseUiId)(l),Q=v.useState("isTriggerActive",R),J=v.useState("floatingRootContext"),X=v.useState("isOpenedByTrigger",R),Z=v.useState("triggerPopupId",R),ee=x.useRef(null),et=(r=(0,G.useMenubarContext)(!0),x.useMemo(()=>r?{type:"menubar",context:r}:{type:void 0},[r])),en=(0,z.useCompositeRootContext)(!0),er=(0,E.useFloatingTree)(),es=x.useMemo(()=>er??new O.FloatingTreeStore,[er]),ei=(0,E.useFloatingNodeId)(es),ea=(0,E.useFloatingParentNodeId)(),{registerTrigger:eo,isMountedByThisTrigger:eu}=(0,_.useTriggerDataForwarding)(R,ee,v,{payload:h,closeDelay:p,parent:et,floatingTreeRoot:es,floatingNodeId:ei,floatingParentNodeId:ea,keyboardEventRelay:en?.relayKeyboardEvent}),el="menubar"===et.type,ed=v.useState("disabled"),ec=o||ed||el&&et.context.disabled,{getButtonProps:ep,buttonRef:ef}=(0,q.useButton)({disabled:ec,native:u});x.useEffect(()=>{X||void 0!==et.type||(v.context.allowMouseUpTriggerRef.current=!1)},[v,X,et.type]);let eh=x.useRef(null),em=(0,y.useTimeout)(),eg=(0,w.useStableCallback)(e=>{if(!eh.current)return;em.clear(),v.context.allowMouseUpTriggerRef.current=!1;let t=e.target;(0,N.contains)(eh.current,t)||(0,N.contains)(v.select("positionerElement"),t)||t===eh.current||null!=t&&function e(t){return(0,U.isHTMLElement)(t)&&t.hasAttribute("data-rootownerid")?t.getAttribute("data-rootownerid"):(0,U.isLastTraversableNode)(t)?void 0:e((0,U.getParentNode)(t))}(t)===v.select("rootId")||(0,D.isMouseWithinBounds)(e,eh.current)||es.events.emit("close",{domEvent:e,reason:V.REASONS.cancelOpen})});x.useEffect(()=>{X&&v.select("lastOpenChangeReason")===V.REASONS.triggerHover&&(0,S.ownerDocument)(eh.current).addEventListener("mouseup",eg,{once:!0})},[X,eg,v]);let ev=el&&et.context.hasSubmenuOpen,eb=d??ev,ex=(0,I.useHoverReferenceInteraction)(J,{enabled:eb&&!ec&&(!el||ev&&!eu),handleClose:(0,k.safePolygon)({blockPointerEvents:!el}),mouseOnly:!0,move:!1,restMs:void 0===et.type?c:void 0,delay:{close:p},triggerElementRef:ee,externalTree:es,isActiveTrigger:Q,isClosing:()=>"ending"===v.select("transitionStatus")}),ey=function(e,t){let n=(0,y.useTimeout)(),[r,s]=x.useState(!1);return(0,C.useIsoLayoutEffect)(()=>{e&&t===V.REASONS.triggerHover?(s(!0),n.start($.PATIENT_CLICK_THRESHOLD,()=>{s(!1)})):e||(n.clear(),s(!1))},[e,t,n]),r}(X,v.select("lastOpenChangeReason")),eS=(0,T.useClick)(J,{enabled:!ec,event:X&&el?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:void 0===et.type&&ey}),eR=(0,j.useFocus)(J,{enabled:!ec&&ev}),ew=function(e){let{enabled:t=!0,mouseDownAction:n,open:r}=e,s=x.useRef(!1);return x.useMemo(()=>t?{onMouseDown:e=>{("open"===n&&!r||"close"===n&&r)&&(s.current=!0,(0,S.ownerDocument)(e.currentTarget).addEventListener("click",()=>{s.current=!1},{once:!0}))},onClick:e=>{s.current&&(s.current=!1,e.preventBaseUIHandler())}}:M.EMPTY_OBJECT,[t,n,r])}({open:X,enabled:el,mouseDownAction:"open"}),eC=x.useMemo(()=>(0,Y.mergeProps)(eR.reference,eS.reference),[eR.reference,eS.reference]),eM=v.useState("triggerProps",eu),{preFocusGuardRef:ek,handlePreFocusGuardFocus:eT,handleFocusTargetFocus:eE}=(0,K.useTriggerFocusGuards)(v,ee),ej={disabled:ec,open:X},eI=[eh,n,ef,eo,ee],eO=[eC,ex??M.EMPTY_OBJECT,eM,{"aria-haspopup":"menu","aria-controls":Z,id:R,onMouseDown:e=>{v.select("open")||(em.start(200,()=>{v.context.allowMouseUpTriggerRef.current=!0}),(0,S.ownerDocument)(e.currentTarget).addEventListener("mouseup",eg,{once:!0}))}},el?{role:"menuitem"}:{},ew,m,ep],eN=(0,L.useRenderElement)("button",e,{enabled:!el,stateAttributesMapping:A.pressableTriggerOpenStateMapping,state:ej,ref:eI,props:eO});return el?(0,t.jsx)(F,{tag:"button",render:s,className:i,style:a,state:ej,refs:eI,props:eO,stateAttributesMapping:A.pressableTriggerOpenStateMapping}):X?(0,t.jsxs)(x.Fragment,{children:[(0,t.jsx)(W.FocusGuard,{ref:ek,onFocus:eT},`${R}-pre-focus-guard`),(0,t.jsx)(x.Fragment,{children:eN},R),(0,t.jsx)(W.FocusGuard,{ref:v.context.triggerFocusTargetRef,onFocus:eE},`${R}-post-focus-guard`)]}):(0,t.jsx)(x.Fragment,{children:eN},R)});var X=e.i(3414),Z=e.i(18390);let ee=x.forwardRef(function(e,t){let{render:n,className:r,style:s,children:i,...a}=e,{store:o}=(0,P.useMenuRootContext)(),{side:u}=(0,X.useMenuPositionerContext)(),l=o.useState("instantType"),{children:d,state:c}=(0,Z.usePopupViewport)({store:o,side:u,children:i}),p={activationDirection:c.activationDirection,transitioning:c.transitioning,instant:l};return(0,L.useRenderElement)("div",e,{state:p,ref:t,props:[a,{children:d}],stateAttributesMapping:Z.popupViewportStateMapping})}),et=x.forwardRef(function(e,t){let{className:n,render:r,orientation:s="horizontal",style:i,...a}=e;return(0,L.useRenderElement)("div",e,{state:{orientation:s},ref:t,props:[{role:"separator","aria-orientation":s},a]})});var en=e.i(28744),er=e.i(73553),es=e.i(66506),ei=e.i(74671);let ea={"aria-expanded":void 0},eo=x.forwardRef(function(e,t){let{render:n,className:r,style:s,label:i,id:a,nativeButton:o=!1,openOnHover:u=!0,delay:l=100,closeDelay:d=0,disabled:c=!1,...p}=e,f=(0,ei.useMenuSubmenuRootContext)();if(!f?.parentMenu)throw Error((0,b.default)(37));let h=(0,er.useCompositeListItem)({guess:!0,label:i}),m=(0,X.useMenuPositionerContext)(),{store:g}=(0,P.useMenuRootContext)(),v=(0,H.useBaseUiId)(a),y=g.useState("open"),S=g.useState("floatingRootContext"),R=g.useState("floatingTreeRoot"),E=g.useState("triggerPopupId",v),j=(0,_.useTriggerRegistration)(v,g),O=(0,w.useStableCallback)(e=>{j(e),null!==e&&g.select("open")&&null==g.select("activeTriggerId")&&g.update({activeTriggerId:v??null,activeTriggerElement:e,closeDelay:d})}),N=x.useRef(null),q=x.useCallback(e=>{N.current=e,g.set("activeTriggerElement",e)},[g]);(0,C.useIsoLayoutEffect)(()=>(O(N.current),()=>O(null)),[O,v,g]),g.useSyncedValue("closeDelay",d);let D=f.parentMenu,Q=g.useState("disabled"),F=D.useState("disabled"),z=c||Q||F,U=D.useState("itemProps"),B=D.useState("isActive",h.index),K=x.useMemo(()=>({type:"submenu-trigger",setActive(){D.select("highlightItemOnHover")&&D.set("activeIndex",h.index)}}),[D,h.index]),{getItemProps:G,itemRef:$}=(0,es.useMenuItem)({closeOnClick:!1,disabled:z,highlighted:B,id:v,store:g,typingRef:D.context.typingRef,nativeButton:o,itemMetadata:K,nodeId:m?.context.nodeId}),W=g.useState("hoverEnabled"),Y=(0,I.useHoverReferenceInteraction)(S,{enabled:W&&u&&!z,handleClose:(0,k.safePolygon)({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:l,delay:{open:l,close:d},shouldOpen:l>0?()=>D.select("allowMouseEnter"):void 0,triggerElementRef:N,externalTree:R,isClosing:()=>"ending"===g.select("transitionStatus"),guardStaleOpen:!0}),J=(0,T.useClick)(S,{enabled:!z,event:"mousedown",toggle:!u,ignoreMouse:u,stickIfOpen:!1}).reference??M.EMPTY_OBJECT,Z=g.useState("triggerProps",!0);delete Z.id;let ee=g.useState("openMethod"),et=g.useState("lastOpenChangeReason")===V.REASONS.listNavigation||"keyboard"===ee,eo=y&&et&&en.platform.screenReader.voiceOver;return(0,L.useRenderElement)("div",e,{state:{disabled:z,highlighted:B,open:y},stateAttributesMapping:A.triggerOpenStateMapping,props:[J,Y,Z,U,eo?ea:void 0,{"aria-controls":E,tabIndex:y||B?0:-1,onBlur(){B&&D.set("activeIndex",null)}},p,G],ref:[t,h.ref,$,O,q]})});var eu=e.i(36481),el=e.i(64170);class ed extends el.BasePopupHandle{constructor(){super((0,eu.createNullMenuStore)(),"Menu")}open(e){this.openByTrigger(e)}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select("open")??!1}}e.s(["Arrow",()=>n.MenuArrow,"Backdrop",()=>r.MenuBackdrop,"CheckboxItem",()=>s.MenuCheckboxItem,"CheckboxItemIndicator",()=>i.MenuCheckboxItemIndicator,"Group",()=>a.MenuGroup,"GroupLabel",()=>o.MenuGroupLabel,"Handle",0,ed,"Item",()=>u.MenuItem,"LinkItem",()=>l.MenuLinkItem,"Popup",()=>d.MenuPopup,"Portal",()=>c.MenuPortal,"Positioner",()=>p.MenuPositioner,"RadioGroup",()=>f.MenuRadioGroup,"RadioItem",()=>h.MenuRadioItem,"RadioItemIndicator",()=>m.MenuRadioItemIndicator,"Root",()=>g.MenuRoot,"Separator",0,et,"SubmenuRoot",()=>v.MenuSubmenuRoot,"SubmenuTrigger",0,eo,"Trigger",0,J,"Viewport",0,ee,"createHandle",0,function(){return new ed}],60948);var ec=e.i(60948),ec=ec,ep=e.i(89664),ef=e.i(90063);e.s(["DropdownMenu",0,function(e){return(0,t.jsx)(ec.Root,{"data-slot":"dropdown-menu",...e})},"DropdownMenuContent",0,function({align:e="end",side:n="bottom",sideOffset:r=4,className:s,...i}){return(0,t.jsx)(ec.Portal,{children:(0,t.jsx)(ec.Positioner,{className:"isolate z-50 outline-none",align:e,side:n,sideOffset:r,children:(0,t.jsx)(ec.Popup,{"data-slot":"dropdown-menu-content",className:(0,ef.classNames)("max-h-(--available-height) min-w-48 origin-(--transform-origin) overflow-y-auto rounded-xl border border-border bg-popover p-1 text-popover-foreground shadow-lg duration-(--duration-fast) outline-none data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",s),...i})})})},"DropdownMenuGroup",0,function(e){return(0,t.jsx)(ec.Group,{"data-slot":"dropdown-menu-group",...e})},"DropdownMenuItem",0,function({className:e,variant:n="default",...r}){return(0,t.jsx)(ec.Item,{"data-slot":"dropdown-menu-item","data-variant":n,className:(0,ef.classNames)("relative flex h-8.5 items-center gap-2.5 rounded-sm px-2.5 text-body text-foreground outline-none select-none data-highlighted:bg-accent focus-visible:outline-2 focus-visible:outline-ring data-disabled:pointer-events-none data-disabled:opacity-45 data-[variant=destructive]:text-destructive-text [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-(--size-icon) [&_svg]:text-muted-foreground data-[variant=destructive]:[&_svg]:text-destructive-text",e),...r})},"DropdownMenuLabel",0,function({className:e,...n}){return(0,t.jsx)(ec.GroupLabel,{"data-slot":"dropdown-menu-label",className:(0,ef.classNames)("px-2.5 pt-1.5 pb-1 text-caption text-muted-foreground",e),...n})},"DropdownMenuRadioGroup",0,function(e){return(0,t.jsx)(ec.RadioGroup,{"data-slot":"dropdown-menu-radio-group",...e})},"DropdownMenuRadioItem",0,function({className:e,children:n,...r}){return(0,t.jsxs)(ec.RadioItem,{"data-slot":"dropdown-menu-radio-item",className:(0,ef.classNames)("relative flex h-8.5 items-center gap-2.5 rounded-sm px-2.5 text-body text-foreground outline-none select-none data-highlighted:bg-accent focus-visible:outline-2 focus-visible:outline-ring data-disabled:pointer-events-none data-disabled:opacity-45 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-(--size-icon) [&_svg]:text-muted-foreground",e),...r,children:[n,(0,t.jsx)(ec.RadioItemIndicator,{className:"ml-auto flex",children:(0,t.jsx)(ep.Check,{"aria-hidden":!0,className:"text-foreground"})})]})},"DropdownMenuSeparator",0,function({className:e,...n}){return(0,t.jsx)(ec.Separator,{"data-slot":"dropdown-menu-separator",className:(0,ef.classNames)("-mx-1 my-1 h-px bg-border",e),...n})},"DropdownMenuTrigger",0,function(e){return(0,t.jsx)(ec.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}],57334)},88393,e=>{"use strict";var t=e.i(43476),n=e.i(90063),r=e.i(19321);function s(e){return Array.from({length:e},(e,t)=>`row-${String(t)}`)}e.s(["LoadingSkeleton",0,function({variant:e,rows:i=4,label:a="Loading",className:o}){return(0,t.jsxs)("div",{role:"status","data-slot":"loading-skeleton","data-variant":e,className:(0,n.classNames)("w-full",o),children:[(0,t.jsx)("span",{className:"sr-only",children:a}),"table"===e?(0,t.jsxs)("div",{className:"overflow-hidden rounded-lg border border-border bg-card shadow-sm",children:[(0,t.jsx)("div",{className:"h-(--size-row-header) border-b border-border bg-muted"}),s(i).map(e=>(0,t.jsxs)("div",{className:"flex h-(--size-row) items-center gap-8 border-b border-border px-4 last:border-0",children:[(0,t.jsx)(r.Skeleton,{className:"h-2.5 w-24"}),(0,t.jsx)(r.Skeleton,{className:"h-5 w-16"}),(0,t.jsx)(r.Skeleton,{className:"h-5 w-20"}),(0,t.jsx)(r.Skeleton,{className:"h-2.5 w-28"})]},e))]}):null,"cards"===e?(0,t.jsx)("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:s(4).map(e=>(0,t.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-4",children:[(0,t.jsx)(r.Skeleton,{className:"h-2.5 w-20"}),(0,t.jsx)(r.Skeleton,{className:"h-6 w-10"}),(0,t.jsx)(r.Skeleton,{className:"h-2.5 w-28"})]},e))}):null,"detail"===e?(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsx)(r.Skeleton,{className:"h-7 w-48"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(r.Skeleton,{className:"h-5 w-20"}),(0,t.jsx)(r.Skeleton,{className:"h-5 w-16"})]}),(0,t.jsx)(r.Skeleton,{className:"h-16 w-full rounded-lg"})]}):null,"list"===e?(0,t.jsx)("div",{className:"overflow-hidden rounded-lg border border-border bg-card",children:s(i).map(e=>(0,t.jsxs)("div",{className:"flex flex-col gap-2.5 border-b border-border px-3.5 py-3 last:border-0",children:[(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)(r.Skeleton,{className:"h-3 w-28"}),(0,t.jsx)(r.Skeleton,{className:"h-5 w-16"})]}),(0,t.jsx)(r.Skeleton,{className:"h-2.5 w-44"})]},e))}):null]})}])},44824,17540,81384,73664,27001,54440,69230,66027,90262,5387,49092,2660,86165,48695,45608,77155,95475,2767,e=>{"use strict";let t;var n=e.i(43476),r=e.i(71645),s=e.i(70703);function i(e,t){let i=(0,s.default)(e,{ssr:!1});return function(e){let s=t(e),[a,o]=(0,r.useState)(s);return s&&!a&&o(!0),a||s?(0,n.jsx)(i,{...e}):null}}e.s(["lazyDialog",0,i],17540);var a=e.i(54616),o=e.i(12598),u=e.i(27702);let l=r.createContext(!1),d=()=>r.useContext(l);l.Provider,e.s(["useIsRestoring",0,d],81384);let c=r.createContext((t=!1,{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t})),p=()=>r.useContext(c);e.s(["useQueryErrorResetBoundary",0,p],73664);var f=e.i(19273);let h=(e,t,n)=>{let r=n?.state.error&&"function"==typeof e.throwOnError?(0,f.shouldThrowError)(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&!t.isReset()&&(e.retryOnMount=!1)},m=e=>{r.useEffect(()=>{e.clearReset()},[e])},g=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(s&&void 0===e.data||(0,f.shouldThrowError)(n,[e.error,r]));e.s(["ensurePreventErrorBoundaryRetry",0,h,"getHasError",0,g,"useClearResetErrorBoundary",0,m],27001);let v=e=>{if(e.suspense){let t=e=>"static"===e?e:Math.max(e??1e3,1e3),n=e.staleTime;e.staleTime="function"==typeof n?(...e)=>t(n(...e)):t(n),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,1e3))}},b=(e,t)=>e?.suspense&&t.isPending,x=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});e.s(["ensureSuspenseTimers",0,v,"fetchOptimistic",0,x,"shouldSuspend",0,b],54440);var y=e.i(40143),S=e.i(80166),R=e.i(73911),w=e.i(15823),C=e.i(75555),M=e.i(86491),k=class extends w.Subscribable{#e;#t=void 0;#n=void 0;#r=void 0;#s;#i;#a;#o;#u;#l;#d;#c;#p;#f=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#a=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#t.addObserver(this),T(this.#t,this.options)?this.#h():this.updateResult(),this.#m())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return E(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return E(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#g(),this.#v(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,f.resolveQueryValue)(this.options.enabled,this.#t))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#b(),this.#t.setOptions(this.options),t._defaulted&&!(0,f.shallowEqualObjects)(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});let r=this.hasListeners();r&&j(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||(0,f.resolveQueryValue)(this.options.enabled,this.#t)!==(0,f.resolveQueryValue)(t.enabled,this.#t)||(0,f.resolveQueryValue)(this.options.staleTime,this.#t)!==(0,f.resolveQueryValue)(t.staleTime,this.#t))&&this.#x();let s=this.#y();r&&(this.#t!==n||(0,f.resolveQueryValue)(this.options.enabled,this.#t)!==(0,f.resolveQueryValue)(t.enabled,this.#t)||s!==this.#p)&&this.#S(s)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return(0,f.shallowEqualObjects)(this.getCurrentResult(),n)||(this.#r=n,this.#i=this.options,this.#s=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#f.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t,n=this.#e.defaultQueryOptions(e),r=this.#e.getQueryCache().build(this.#e,n),s=()=>{},i=new Promise(e=>{t=e,s=this.#e.getQueryCache().subscribe(t=>{"updated"===t.type&&t.query.queryHash===r.queryHash&&void 0!==r.state.data&&(s(),e(this.createResult(r,n)))})});return Promise.race([r.fetch().then(()=>{let e=this.createResult(r,n);return t?.(e),e}).finally(()=>{s()}),i])}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#b();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(f.noop)),t}#R(e){return!(0,R.isServer)()&&!1!==(0,f.resolveQueryValue)(this.options.enabled,this.#t)&&(0,f.isValidTimeout)(e)}#x(){this.#g();let e=(0,f.resolveQueryValue)(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#R(e))return;let t=(0,f.timeUntilStale)(this.#r.dataUpdatedAt,e)+1;this.#d=S.timeoutManager.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#y(){return(0,f.resolveQueryValue)(this.options.refetchInterval,this.#t)??!1}#S(e){this.#v(),this.#p=e,0!==this.#p&&this.#R(this.#p)&&(this.#c=S.timeoutManager.setInterval(()=>{(this.options.refetchIntervalInBackground||C.focusManager.isFocused())&&this.#h()},this.#p))}#m(){this.#x(),this.#S(this.#y())}#g(){void 0!==this.#d&&(S.timeoutManager.clearTimeout(this.#d),this.#d=void 0)}#v(){void 0!==this.#c&&(S.timeoutManager.clearInterval(this.#c),this.#c=void 0)}createResult(e,t){let n,r=this.#t,s=this.options,i=this.#r,a=this.#s,o=this.#i,u=e!==r?e.state:this.#n,{state:l}=e,d={...l},c=!1;if(t._optimisticResults){let n=this.hasListeners(),i=!n&&T(e,t),a=n&&j(e,r,t,s);(i||a)&&(d={...d,...(0,M.fetchState)(l.data,e.options)}),"isRestoring"===t._optimisticResults&&(d.fetchStatus="idle")}let{error:p,errorUpdatedAt:h,status:m}=d;n=d.data;let g=!1;if(void 0!==t.placeholderData&&void 0===n&&"pending"===m){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,g=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,void 0!==e&&(m="success",n=(0,f.replaceData)(i?.data,e,t),c=!0)}if(t.select&&void 0!==n&&!g)if(i&&n===a?.data&&t.select===this.#o)n=this.#u;else try{this.#o=t.select,n=t.select(n),n=(0,f.replaceData)(i?.data,n,t),this.#u=n,this.#a=null}catch(e){this.#a=e}else void 0===n&&(this.#a=null);this.#a&&(p=this.#a,n=this.#u,h=Date.now(),m="error",c=!1);let v="fetching"===d.fetchStatus,b="pending"===m,x="error"===m,y=b&&v,S=void 0!==n;return{status:m,fetchStatus:d.fetchStatus,isPending:b,isSuccess:"success"===m,isError:x,isInitialLoading:y,isLoading:y,data:n,dataUpdatedAt:d.dataUpdatedAt,error:p,errorUpdatedAt:h,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:d.dataUpdateCount>u.dataUpdateCount||d.errorUpdateCount>u.errorUpdateCount,isFetching:v,isRefetching:v&&!b,isLoadingError:x&&!S,isPaused:"paused"===d.fetchStatus,isPlaceholderData:c,isRefetchError:x&&S,isStale:I(e,t),refetch:this.refetch,isEnabled:!1!==(0,f.resolveQueryValue)(t.enabled,e)}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#s=this.#t.state,this.#i=this.options,void 0!==this.#s.data&&(this.#l=this.#t),(0,f.shallowEqualObjects)(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n="function"==typeof t?t():t;if("all"===n||!n&&!this.#f.size)return!0;let r=new Set(n??this.#f);return this.options.throwOnError&&r.add("error"),Object.keys(this.#r).some(t=>this.#r[t]!==e[t]&&r.has(t))})();y.notifyManager.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}#b(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#m()}};function T(e,t){return!1!==(0,f.resolveQueryValue)(t.enabled,e)&&void 0===e.state.data&&("error"!==e.state.status||!1!==(0,f.resolveQueryValue)(t.retryOnMount,e))||void 0!==e.state.data&&E(e,t,t.refetchOnMount)}function E(e,t,n){if(!1!==(0,f.resolveQueryValue)(t.enabled,e)&&"static"!==(0,f.resolveQueryValue)(t.staleTime,e)){let r=(0,f.resolveQueryValue)(n,e);return"always"===r||!1!==r&&I(e,t)}return!1}function j(e,t,n,r){return(e!==t||!1===(0,f.resolveQueryValue)(r.enabled,e))&&(!n.suspense||"error"!==e.state.status)&&I(e,n)}function I(e,t){return!1!==(0,f.resolveQueryValue)(t.enabled,e)&&e.isStaleByTime((0,f.resolveQueryValue)(t.staleTime,e))}function O(e,t){return function(e,t,n){let s=d(),i=p(),a=(0,o.useQueryClient)(n),u=a.defaultQueryOptions(e),l=a.getQueryCache().get(u.queryHash),c=!1!==e.subscribed;u._optimisticResults=s?"isRestoring":c?"optimistic":void 0,v(u),h(u,i,l),m(i);let[S]=r.useState(()=>new t(a,u)),R=S.getOptimisticResult(u),w=!s&&c;if(r.useSyncExternalStore(r.useCallback(e=>{let t=w?S.subscribe(y.notifyManager.batchCalls(e)):f.noop;return S.updateResult(),t},[S,w]),()=>S.getCurrentResult(),()=>S.getCurrentResult()),r.useEffect(()=>{S.setOptions(u)},[u,S]),b(u,R))throw x(u,S,i);if(g({result:R,errorResetBoundary:i,throwOnError:u.throwOnError,query:l,suspense:u.suspense}))throw R.error;return u.notifyOnChangeProps?R:S.trackResult(R)}(e,k,t)}e.s(["QueryObserver",0,k],69230),e.s(["useQuery",0,O],66027);let N={canManage:!1,canSend:!1,canReceive:!1,canDefineLabels:!1,canAssignLabels:!1,isViewer:!1};function P(){return function(e){return void 0===e?N:{canManage:e.scopes.includes("fleet:manage"),canSend:e.scopes.includes("messages:send"),canReceive:e.scopes.includes("messages:receive"),canDefineLabels:e.scopes.includes("labels:define"),canAssignLabels:e.scopes.includes("labels:assign"),isViewer:"viewer"===e.kind}}(O((0,u.useTRPC)().console.session.queryOptions()).data)}e.s(["useAccess",0,P],90262);var A=e.i(32150),L=e.i(80581);function q(){return O((0,u.useTRPC)().fleet.list.queryOptions(void 0,{refetchInterval:3e4}))}function D(){return O((0,u.useTRPC)().fleet.labels.queryOptions())}function Q(){let e=(0,u.useTRPC)(),t=(0,o.useQueryClient)();return()=>t.invalidateQueries({queryKey:e.fleet.pathKey()})}e.s(["LAST_SEEN_REFRESH_MS",0,3e4,"useAssignLabel",0,function(){let e=(0,u.useTRPC)(),t=Q();return(0,a.useMutation)(e.fleet.assignLabel.mutationOptions({onSuccess:t}))},"useChangeLabelValues",0,function(){let e=(0,u.useTRPC)(),t=Q();return(0,a.useMutation)(e.fleet.changeLabelValues.mutationOptions({onSuccess:t}))},"useCommissionShip",0,function(){let e=(0,u.useTRPC)(),t=Q(),{track:n}=(0,A.useAnalytics)();return(0,a.useMutation)(e.fleet.commission.mutationOptions({onSuccess:async()=>{n({name:"ship_commissioned"}),await t()}}))},"useDefineLabel",0,function(){let e=(0,u.useTRPC)(),t=Q();return(0,a.useMutation)(e.fleet.defineLabel.mutationOptions({onSuccess:t}))},"useDeleteLabel",0,function(){let e=(0,u.useTRPC)(),t=Q();return(0,a.useMutation)(e.fleet.deleteLabel.mutationOptions({onSuccess:t}))},"useFleetLabels",0,D,"useFleetSnapshot",0,q,"useGetStartingPrompt",0,function(){let e=(0,u.useTRPC)(),t=Q();return(0,a.useMutation)(e.fleet.getStartingPrompt.mutationOptions({onSuccess:t}))},"useLabelContext",0,function(){let e=D(),t=q(),n=P();if(void 0!==e.data&&void 0!==t.data)return(0,L.labelContextOf)(e.data,{ships:t.data,isOperator:!n.isViewer})},"usePingShip",0,function(){let e=(0,u.useTRPC)(),t=Q();return(0,a.useMutation)(e.fleet.ping.mutationOptions({onSuccess:t}))},"useRecrewShip",0,function(){let e=(0,u.useTRPC)(),t=Q();return(0,a.useMutation)(e.fleet.recrew.mutationOptions({onSuccess:t}))},"useReleaseShip",0,function(){let e=(0,u.useTRPC)(),t=Q();return(0,a.useMutation)(e.fleet.release.mutationOptions({onSuccess:t}))},"useRemoveCrewRequest",0,function(){let e=(0,u.useTRPC)(),t=Q();return(0,a.useMutation)(e.fleet.removeCrewRequest.mutationOptions({onSuccess:t}))},"useRenameShip",0,function(){let e=(0,u.useTRPC)(),t=Q();return(0,a.useMutation)(e.fleet.rename.mutationOptions({onSuccess:t}))},"useRequestCrew",0,function(){let e=(0,u.useTRPC)(),t=Q();return(0,a.useMutation)(e.fleet.crewRequest.mutationOptions({onSuccess:t}))},"useRetireShip",0,function(){let e=(0,u.useTRPC)(),t=Q();return(0,a.useMutation)(e.fleet.retire.mutationOptions({onSuccess:t}))},"useUnassignLabel",0,function(){let e=(0,u.useTRPC)(),t=Q();return(0,a.useMutation)(e.fleet.unassignLabel.mutationOptions({onSuccess:t}))}],5387);var F=e.i(41880);function z(){return O((0,u.useTRPC)().fleet.limits.queryOptions(void 0,{refetchInterval:6e4}))}e.s(["useFleetLimits",0,z],49092);var U=e.i(87600),B=e.i(16752);let _=i(()=>e.A(46207).then(e=>e.ComposeDialog),e=>e.isOpen);e.s(["ComposeMessage",0,function({isOpen:e,onOpenChange:t,replyTo:s,toShipId:i}){let l,d,c,p=q(),f=(l=(0,u.useTRPC)(),d=(0,o.useQueryClient)(),(0,a.useMutation)(l.ship.send.mutationOptions({onSuccess:()=>d.invalidateQueries({queryKey:l.fleet.pathKey()})}))),h=z(),m=(0,U.useHostedAccountUrl)(),[g,v]=(0,r.useState)(()=>crypto.randomUUID()),{ships:b,types:x}={ships:c=(p.data??[]).filter(e=>"agent"===e.kind&&"retired"!==e.status),types:[...new Set(c.map(e=>e.type))].sort()};return(0,n.jsx)(_,{isOpen:e,onOpenChange:e=>{e||f.reset(),t(e)},ships:b,types:x,state:f.isPending?"sending":f.isError?"failed":"editing",error:f.error?.message,messageLimit:f.isError?(0,B.messageLimitReached)(h.data):void 0,accountUrl:m,draft:s?{selector:{kind:"ship",shipId:s.sender.id},payload:""}:i&&{selector:{kind:"ship",shipId:i},payload:""},onSend:e=>{f.mutate(function(e,t){let{selector:n,payload:r,inReplyTo:s}=e;return{selector:n,payload:r,contentType:"text/plain",idempotencyKey:t,...void 0===s?{}:{inReplyTo:s}}}({...e,inReplyTo:s?.messageId},g),{onSuccess:()=>{v(crypto.randomUUID()),f.reset(),t(!1),(0,F.showToast)({title:"Message sent",description:"It waits in the inbox until a ship receives it.",tone:"success"})},onError:()=>{h.refetch()}})}})}],44824);var K=e.i(18566),H=e.i(76145);function V(e){if("refused"===e.kind)throw Error(e.message);return e.data}e.s(["dataOf",0,V],2660);var G=e.i(95187);let $=(0,G.createServerReference)("00355ad7ad6764cb4b6ee5aab5d4048f88808ba780",G.callServer,void 0,G.findSourceMapURL,"connectSquadrons"),W=(0,G.createServerReference)("00d941bed9979340b10f0a9f495e63c899ce66a89d",G.callServer,void 0,G.findSourceMapURL,"readSquadronsConnection"),Y=["squadrons","connection"];function J(){return O({queryKey:Y,queryFn:async()=>V(await W())})}function X(){let e=J();return void 0!==e.data&&"none"!==e.data.state}function Z(){let e=J();return void 0===e.data?e.isError?"not-connected":"unknown":e.data.state}e.s(["useConnectSquadrons",0,function(){let e=(0,o.useQueryClient)();return(0,a.useMutation)({mutationFn:async()=>V(await $()),onSuccess:t=>{e.setQueryData(Y,t)}})},"useHasSquadrons",0,X,"useSquadronsConnection",0,Z,"useSquadronsSettings",0,J],86165);let ee=(0,G.createServerReference)("403645e78cd154948c86538a57593a2741f1a193d7",G.callServer,void 0,G.findSourceMapURL,"addMember"),et=(0,G.createServerReference)("40f9746e79ecc1db1ebd0e46cbd0faf4f565b06a18",G.callServer,void 0,G.findSourceMapURL,"addRepository"),en=(0,G.createServerReference)("408d0f4c7563d4d7e99aa0a0e58d24a9ed57a92651",G.callServer,void 0,G.findSourceMapURL,"forceStandDown"),er=(0,G.createServerReference)("40f4ca0a57995fceeeb7091a54efe3876aa033bd55",G.callServer,void 0,G.findSourceMapURL,"formSquadron"),es=(0,G.createServerReference)("006988700969ea41e2a42aa9bdb3a71d57917c15ca",G.callServer,void 0,G.findSourceMapURL,"listRepositories"),ei=(0,G.createServerReference)("00a5a62f97c9b6b78098fe0333f26cd7ace50d0509",G.callServer,void 0,G.findSourceMapURL,"listSquadrons"),ea=(0,G.createServerReference)("4053419458add12b3a23a885b90db45400d89fa22b",G.callServer,void 0,G.findSourceMapURL,"newCrewLine"),eo=(0,G.createServerReference)("40a68f99ddbe090bb8bc5264554dcb3692b4a48e56",G.callServer,void 0,G.findSourceMapURL,"readBlueprintCrew"),eu=(0,G.createServerReference)("00d180577b59be99e6a2e139cfc4c52dc0f6df09e4",G.callServer,void 0,G.findSourceMapURL,"readCatalogue"),el=(0,G.createServerReference)("40ce0bcabe25fc07ff1db0893f372a3a0e2af9a432",G.callServer,void 0,G.findSourceMapURL,"readKeptMessages"),ed=(0,G.createServerReference)("00d48cb73a06266c5a2989bbebe0feb9580685c48d",G.callServer,void 0,G.findSourceMapURL,"refreshCatalogue"),ec=(0,G.createServerReference)("40bb1c476c12fb82da5a6f1b4ee7bd4dd1760353c6",G.callServer,void 0,G.findSourceMapURL,"removeMember"),ep=(0,G.createServerReference)("405b153067d83df9ed77b9916d87f68be818cfe783",G.callServer,void 0,G.findSourceMapURL,"removeRepository"),ef=(0,G.createServerReference)("4023f1c8a2afb6bb89043b32e93ada6feb4ac0298a",G.callServer,void 0,G.findSourceMapURL,"standDown"),eh=["squadrons","list"];function em(){return O({queryKey:eh,queryFn:async()=>V(await ei()),refetchInterval:5e3,enabled:"connected"===Z()})}function eg(){return O({queryKey:["squadrons","catalogue"],queryFn:async()=>V(await eu()),enabled:"connected"===Z()})}function ev(e){return["squadrons","crew-lines",e]}let eb=["squadrons","repositories"];function ex(){let e=(0,o.useQueryClient)();return async()=>{await Promise.all([e.invalidateQueries({queryKey:eb}),e.invalidateQueries({queryKey:["squadrons","catalogue"]})])}}e.s(["useAddMember",0,function(){let e=(0,o.useQueryClient)();return(0,a.useMutation)({mutationFn:async e=>V(await ee(e)),onSuccess:async()=>{await e.invalidateQueries({queryKey:eh})}})},"useAddRepository",0,function(){let e=ex();return(0,a.useMutation)({mutationFn:async e=>V(await et(e)),onSettled:e})},"useBlueprintCrew",0,function(e){return O({queryKey:["squadrons","blueprint-crew",e],queryFn:async()=>void 0===e?[]:V(await eo(e)),enabled:"connected"===Z()&&void 0!==e})},"useCatalogue",0,eg,"useForceStandDown",0,function(){let e=(0,o.useQueryClient)();return(0,a.useMutation)({mutationFn:async e=>V(await en(e)),onSuccess:async()=>{await e.invalidateQueries({queryKey:eh})}})},"useFormSquadron",0,function(){let e=(0,o.useQueryClient)(),{track:t}=(0,A.useAnalytics)();return(0,a.useMutation)({mutationFn:async({blueprint:e,members:t})=>V(await er({blueprint:e,...void 0===t?{}:{members:t}})),onSuccess:async n=>{t({name:"squadron_formed",roleCount:new Set(n.members.map(e=>e.role)).size}),e.setQueryData(ev(n.squadronId),n.members),await e.invalidateQueries({queryKey:eh})}})},"useIssuedCrewLines",0,function(e){return new Map(((0,o.useQueryClient)().getQueryData(ev(e))??[]).map(e=>[e.shipId,{crewLines:e.crewLines,launchNote:e.launchNote,model:e.model}]))},"useKeptMessages",0,function(e){return O({queryKey:["squadrons","messages",e],queryFn:async()=>V(await el(e)),refetchInterval:5e3,enabled:"connected"===Z()})},"useNewCrewLine",0,function(){let e=(0,o.useQueryClient)();return(0,a.useMutation)({mutationFn:async e=>V(await ea(e)),onSuccess:async()=>{await e.invalidateQueries({queryKey:eh})}})},"useRefreshCatalogue",0,function(){let e=ex();return(0,a.useMutation)({mutationFn:async()=>V(await ed()),onSuccess:e})},"useRemoveMember",0,function(){let e=(0,o.useQueryClient)();return(0,a.useMutation)({mutationFn:async e=>V(await ec(e)),onSuccess:async()=>{await e.invalidateQueries({queryKey:eh})}})},"useRemoveRepository",0,function(){let e=ex();return(0,a.useMutation)({mutationFn:async e=>V(await ep(e)),onSettled:e})},"useRepositories",0,function(){return O({queryKey:eb,queryFn:async()=>V(await es()),enabled:"connected"===Z()})},"useSquadrons",0,em,"useStandDown",0,function(){let e=(0,o.useQueryClient)();return(0,a.useMutation)({mutationFn:async e=>V(await ef(e)),onSuccess:async()=>{await e.invalidateQueries({queryKey:eh})}})}],48695);var ey=e.i(84294);let eS=i(()=>e.A(10393).then(e=>e.CommandPalette),e=>e.isOpen);function eR(e){return e.split(/[?#]/)[0]??e}function ew(e){let t=new MutationObserver(e);return t.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class","hidden","style"]}),window.addEventListener("resize",e),()=>{t.disconnect(),window.removeEventListener("resize",e)}}function eC(e){let t=(0,K.usePathname)(),n=e?void 0!==e.anchor&&eR(e.path)===t?`[data-testid="${e.anchor}"]`:void 0:void 0;return(0,r.useSyncExternalStore)(ew,()=>void 0===n?null:[...document.querySelectorAll(n)].find(e=>e.getClientRects().length>0)??null,()=>null)}function eM(e){let{track:t}=(0,A.useAnalytics)(),n=(0,r.useRef)(!1),s=void 0!==e,i=e?.index===0;(0,r.useEffect)(()=>{s&&!n.current&&i&&t({name:"tour_started"}),n.current=s},[s,i,t])}function ek(){let e=(0,u.useTRPC)(),t=(0,K.useRouter)(),n=(0,K.usePathname)(),r=(0,o.useQueryClient)(),s=O(e.console.guide.queryOptions()),i=e.console.guide.queryKey(),l=(0,a.useMutation)(e.console.recordGuideProgress.mutationOptions({onMutate:e=>{r.setQueryData(i,t=>t?{...t,progress:e}:t)},onError:()=>{(0,F.showToast)({title:"Couldn’t keep your place in the tour",description:"The server did not answer. Try again.",tone:"error"})},onSettled:()=>r.invalidateQueries({queryKey:i})})),{track:d}=(0,A.useAnalytics)(),c=s.data?.steps??[],p=s.data?.progress.step??0,f=function(e){if(e?.progress.state!=="open")return;let t=e.steps[e.progress.step];return void 0===t?void 0:{step:t,index:e.progress.step,total:e.steps.length}}(s.data??void 0),h=e=>{l.mutate(e);let r=c[e.step];"open"===e.state&&void 0!==r&&eR(r.path)!==n&&t.push(r.path)},m=e=>{h({step:e,state:"open"}),d({name:"tour_step_reached",step:e+1,total:c.length})};return{view:f,onBack:()=>{m(Math.max(p-1,0))},onNext:()=>{m(Math.min(p+1,c.length-1))},onSkip:()=>{h({step:p,state:"skipped"}),d({name:"tour_skipped",step:p+1})},onFinish:()=>{h({step:p,state:"finished"}),d({name:"tour_finished"})},onTakeTour:0===c.length?void 0:()=>{h({step:0,state:"open"})}}}e.s(["ConsoleCommands",0,function({isOpen:e,onOpenChange:t,onCompose:s}){let i=(0,K.useRouter)(),a=q(),o=X(),u=em(),l=eg(),d=P();return(0,r.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&"k"===e.key.toLowerCase()&&(e.preventDefault(),t(!0))};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[t]),(0,n.jsx)(eS,{isOpen:e,onOpenChange:t,items:(0,H.allowedPaletteItems)((0,H.paletteItemsOf)(a.data??[],o?{squadrons:u.data??[],blueprints:(0,ey.blueprintChoices)(l.data??{blueprints:[]})}:void 0),d),onSelect:e=>{switch(e.kind){case"ship":case"page":case"squadron":case"squadron-action":case"blueprint":i.push(e.href);return;case"action":"compose"===e.id?s():"form-squadron"===e.id?i.push("/squadrons?form=new"):i.push("/?commission=new")}}})}],45608),e.s(["useConsoleGuide",0,ek,"useGuideAnchor",0,eC,"useTourStarted",0,eM],77155);var eT=e.i(15905),eE=e.i(6734);function ej({index:e,total:t,onBack:r,onNext:s,onSkip:i,onFinish:a,children:o}){let u=e===t-1;return(0,n.jsxs)("div",{className:"flex w-80 max-w-[calc(100vw-2rem)] flex-col gap-2 p-4",children:[(0,n.jsxs)("p",{className:"text-caption text-muted-foreground","data-testid":"tour-step-count",children:[e+1," of ",t]}),o,(0,n.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[u?null:(0,n.jsx)(eT.Button,{size:"sm",variant:"ghost","data-testid":"tour-step-skip",onClick:i,children:"Skip"}),(0,n.jsx)("span",{className:"grow"}),0===e?null:(0,n.jsx)(eT.Button,{size:"sm","data-testid":"tour-step-back",onClick:r,children:"Back"}),u?(0,n.jsx)(eT.Button,{size:"sm",variant:"primary","data-testid":"tour-step-finish",onClick:a,children:"Finish"}):(0,n.jsx)(eT.Button,{size:"sm",variant:"primary","data-testid":"tour-step-next",onClick:s,children:"Next"})]})]})}function eI(e){let{title:t,text:r,anchor:s}=e;return null===s?(0,n.jsx)("div",{role:"dialog","aria-labelledby":"tour-step-title","aria-describedby":"tour-step-text","data-testid":"tour-step","data-placement":"centred",className:"fixed top-1/2 left-1/2 z-50 -translate-1/2 rounded-xl border border-border bg-popover text-popover-foreground shadow-lg",children:(0,n.jsxs)(ej,{...e,children:[(0,n.jsx)("h2",{id:"tour-step-title",className:"text-body font-semibold text-foreground",children:t}),(0,n.jsx)("p",{id:"tour-step-text",className:"text-body text-muted-foreground",children:r})]})}):(0,n.jsx)(eE.Popover,{open:!0,modal:!1,children:(0,n.jsx)(eE.PopoverContent,{anchor:s,"data-testid":"tour-step","data-placement":"anchored",children:(0,n.jsxs)(ej,{...e,children:[(0,n.jsx)(eE.PopoverTitle,{className:"text-body font-semibold text-foreground",children:t}),(0,n.jsx)(eE.PopoverDescription,{className:"text-body text-muted-foreground",children:r})]})})})}e.s(["ConsoleGuide",0,function(){let{view:e,onBack:t,onNext:r,onSkip:s,onFinish:i}=ek(),a=eC(e?.step);return(eM(e),e)?(0,n.jsx)(eI,{title:e.step.title,text:e.step.text,index:e.index,total:e.total,anchor:a,onBack:t,onNext:r,onSkip:s,onFinish:i}):null}],95475);var eO=e.i(10818),eN=e.i(63676);function eP({notice:e,onDismiss:t,onSignOut:r}){return(0,n.jsxs)("div",{role:"status","data-testid":"notice","data-notice-id":e.id,className:"flex items-start gap-2 border-b border-border bg-muted px-8 py-2.5 max-sm:px-4",children:[(0,n.jsx)(eO.Info,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon) shrink-0 text-muted-foreground"}),(0,n.jsxs)("div",{className:"flex min-w-0 grow flex-wrap items-baseline gap-x-3 gap-y-1",children:[(0,n.jsx)("p",{className:"text-meta text-foreground",children:e.text}),e.links.map(e=>!0===e.isSignOut?(0,n.jsx)("button",{type:"button","data-testid":"notice-link",className:"text-meta font-medium text-foreground underline underline-offset-2",onClick:()=>r?.(e),children:e.label},e.label):(0,n.jsx)("a",{href:e.url,"data-testid":"notice-link",className:"text-meta font-medium text-foreground underline underline-offset-2",children:e.label},e.label))]}),e.isDismissible&&t?(0,n.jsx)(eT.Button,{variant:"ghost",size:"xs",isIconOnly:!0,"aria-label":"Dismiss","data-testid":"notice-dismiss",onClick:t,children:(0,n.jsx)(eN.X,{"aria-hidden":!0})}):null]})}e.s(["ConsoleNotices",0,function(){let e,t,r,s,i,l,{notices:d,onDismiss:c,onSignOut:p}=(e=(0,u.useTRPC)(),t=(0,K.useRouter)(),r=(0,o.useQueryClient)(),s=O(e.console.notices.queryOptions()),i=(0,a.useMutation)(e.console.dismissNotice.mutationOptions({onSuccess:()=>r.invalidateQueries({queryKey:e.console.notices.queryKey()}),onError:()=>{(0,F.showToast)({title:"Couldn’t dismiss the notice",description:"The server did not answer. Try again.",tone:"error"})}})),l=(0,a.useMutation)(e.console.signOut.mutationOptions({onError:()=>{(0,F.showToast)({title:"Couldn’t sign out",description:"The server did not answer. You are still signed in.",tone:"error"})}})),{notices:s.data??[],onDismiss:e=>{i.mutate({noticeId:e})},onSignOut:e=>{l.mutate(void 0,{onSuccess:()=>{r.clear();let n=e.url??"/sign-in";n.startsWith("/")?t.replace(n):window.location.assign(n)}})}});return 0===d.length?null:(0,n.jsx)("div",{"data-testid":"notices",children:d.map(e=>(0,n.jsx)(eP,{notice:e,onDismiss:()=>{c(e.id)},onSignOut:p},e.id))})}],2767)},77880,24262,83140,e=>{"use strict";var t=e.i(43476),n=e.i(67927),r=e.i(66595),s=e.i(19759),i=e.i(22016),a=e.i(15905),o=e.i(36651),u=e.i(90063);let l={live:{label:"Live",dot:"bg-tone-ok-fg"},reconnecting:{label:"Reconnecting",dot:"bg-tone-waiting-fg"},offline:{label:"Offline",dot:"bg-tone-attention-fg"}};function d({state:e,className:n}){let{label:r,dot:s}=l[e];return(0,t.jsxs)("span",{"data-slot":"live-status","data-state":e,"aria-live":"polite",className:(0,u.classNames)("inline-flex items-center gap-1.5 text-meta text-muted-foreground",n),children:[(0,t.jsx)("span",{"aria-hidden":!0,className:(0,u.classNames)("size-2 shrink-0 rounded-full",s)}),r]})}e.s(["LiveStatus",0,d],24262),e.s(["Header",0,function({breadcrumb:e,parents:u=[],live:l,onCompose:c,onSearch:p}){return(0,t.jsxs)("header",{"data-slot":"header",className:"sticky top-0 z-30 hidden h-(--size-header) shrink-0 items-center justify-between gap-4 border-b border-border bg-background px-6 sm:flex",children:[(0,t.jsx)("nav",{"aria-label":"Breadcrumb","data-testid":"header-breadcrumb",className:"min-w-0 text-body",children:(0,t.jsxs)("ol",{className:"flex min-w-0 items-center gap-1.5",children:[u.map(e=>(0,t.jsxs)("li",{className:"flex shrink-0 items-center gap-1.5",children:[(0,t.jsx)(i.default,{href:e.href,className:"text-muted-foreground hover:text-foreground hover:underline",children:e.label}),(0,t.jsx)(n.ChevronRight,{"aria-hidden":!0,className:"size-3.5 text-muted-foreground"})]},e.href)),(0,t.jsx)("li",{"aria-current":"page",className:"truncate font-medium text-foreground",children:e})]})}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(d,{state:l}),p?(0,t.jsxs)(a.Button,{size:"sm",icon:(0,t.jsx)(r.Search,{"aria-hidden":!0}),"data-testid":"header-search",className:"w-60 justify-start font-normal text-muted-foreground",onClick:p,children:[(0,t.jsx)("span",{className:"grow text-left",children:"Search ships or jump to"}),(0,t.jsx)(o.Kbd,{children:"⌘K"})]}):null,c?(0,t.jsx)(a.Button,{size:"sm",icon:(0,t.jsx)(s.SquarePen,{"aria-hidden":!0}),"data-testid":"header-compose",onClick:c,children:"Compose"}):null]})]})}],77880);var c=e.i(56420);let p={name:"code-xml",size:24,node:[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],aliases:["code-2"]};p.node;let f=(0,c.default)(p);e.s(["CodeXml",0,f],83140)},36779,15034,85538,e=>{"use strict";var t=e.i(43476),n=e.i(83140),r=e.i(44594),s=e.i(18964),i=e.i(66794),a=e.i(60011),o=e.i(49287),u=e.i(86875),l=e.i(66787),d=e.i(22016),c=e.i(94859),p=e.i(66390),f=e.i(31513),h=e.i(63707),m=e.i(8619),g=e.i(28276),v=e.i(91772),b=e.i(11568),x=e.i(67784),y=e.i(46513),S=e.i(96699),R=e.i(35965),w=e.i(71645),C=e.i(90063),M=e.i(95014),k=e.i(15905),T=e.i(57334),E=e.i(75305),j=e.i(60592);let I="Your account",O="Take the tour",N={light:R.Sun,dark:S.Moon,system:y.Monitor};function P(e){return e?.kind==="viewer"?{name:"viewer",detail:"Read-only"}:{name:"Operator",detail:e?.email??" "}}function A(e){return e?.kind!=="viewer"}function L(e,t){return t.find(t=>t===e)}function q({account:e,now:n}){let{name:r,detail:s}=P(e);return(0,t.jsxs)("div",{className:"flex flex-col gap-2 px-2.5 pt-2 pb-2.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,t.jsx)(c.Avatar,{kind:"account",size:28,name:r}),(0,t.jsxs)("span",{className:"flex min-w-0 flex-col",children:[(0,t.jsx)("span",{className:"truncate text-body font-medium text-foreground",children:r}),(0,t.jsx)("span",{"data-testid":"account-detail",className:"truncate text-caption text-muted-foreground",children:e?.kind==="viewer"?"Sees the whole fleet, changes nothing":s})]})]}),(0,t.jsxs)("p",{"data-testid":"account-session",className:"flex items-start gap-1.5 text-caption text-muted-foreground",children:[(0,t.jsx)(v.LaptopMinimal,{"aria-hidden":!0,className:"mt-px size-(--size-icon-sm) shrink-0"}),e?(0,t.jsxs)("span",{children:["This session: ",(0,t.jsx)("span",{className:"font-medium text-foreground",children:(0,M.sessionSince)(e.session,n)})]}):(0,t.jsx)("span",{children:"This session"})]})]})}function D({isSigningOut:e}){return e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(b.LoaderCircle,{"aria-hidden":!0,className:"animate-spin motion-reduce:animate-none"}),"Signing out"]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(x.LogOut,{"aria-hidden":!0}),"Sign out"]})}function Q({account:e,themes:n,onThemeChange:r,onSignOut:s,isSigningOut:i,now:a,accountUrl:o,onTakeTour:u}){let{name:l,detail:d}=P(e),p=e?.kind==="operator"?e.theme:void 0;return(0,t.jsxs)(T.DropdownMenu,{children:[(0,t.jsxs)(T.DropdownMenuTrigger,{"data-testid":"account-menu","aria-label":`Account menu, ${l}${e?`, ${d}`:""}`,className:"flex w-full items-center gap-2.5 rounded-md p-1.5 text-left transition-colors duration-(--duration-fast) outline-none hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring aria-expanded:bg-accent max-lg:justify-center",children:[(0,t.jsx)(c.Avatar,{kind:"account",size:28,name:l}),(0,t.jsxs)("span",{className:"flex min-w-0 grow flex-col max-lg:sr-only",children:[(0,t.jsx)("span",{className:"truncate text-body font-medium text-foreground",children:l}),(0,t.jsx)("span",{className:"truncate text-caption text-muted-foreground",children:d})]}),(0,t.jsx)(h.ChevronsUpDown,{"aria-hidden":!0,className:"size-(--size-icon) shrink-0 text-muted-foreground max-lg:hidden"})]}),(0,t.jsxs)(T.DropdownMenuContent,{side:"top",align:"start",className:"w-64",children:[(0,t.jsx)(q,{account:e,now:a}),void 0===o||e?.kind==="viewer"?null:(0,t.jsxs)(T.DropdownMenuItem,{"data-testid":"account-hosted",render:e=>(0,t.jsx)("a",{...e,href:o,children:e.children}),children:[(0,t.jsx)(m.CircleUserRound,{"aria-hidden":!0}),I]}),void 0===u?null:(0,t.jsxs)(T.DropdownMenuItem,{"data-testid":"account-take-tour",onClick:u,children:[(0,t.jsx)(g.Compass,{"aria-hidden":!0}),O]}),A(e)&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(T.DropdownMenuSeparator,{}),(0,t.jsxs)(T.DropdownMenuGroup,{children:[(0,t.jsx)(T.DropdownMenuLabel,{children:"Theme"}),(0,t.jsx)(T.DropdownMenuRadioGroup,{value:p,onValueChange:e=>{let t=L(e,n);void 0!==t&&r(t)},children:n.map(n=>{let r=N[n];return(0,t.jsxs)(T.DropdownMenuRadioItem,{value:n,disabled:void 0===e,closeOnClick:!1,"data-testid":`account-theme-${n}`,children:[(0,t.jsx)(r,{"aria-hidden":!0}),M.THEME_LABELS[n]]},n)})})]})]}),(0,t.jsx)(T.DropdownMenuSeparator,{}),(0,t.jsx)(T.DropdownMenuItem,{"data-testid":"account-sign-out",disabled:i,closeOnClick:!1,onClick:s,children:(0,t.jsx)(D,{isSigningOut:i})})]})]})}function F({account:e,themes:r,onThemeChange:s,onSignOut:a,isSigningOut:o,now:u,accountUrl:l,onTakeTour:p,settingsHref:h}){let[v,b]=(0,w.useState)(!1),{name:x,detail:y}=P(e),S=e?.kind==="operator"?e.theme:void 0;return(0,t.jsxs)(E.Sheet,{open:v,onOpenChange:b,children:[(0,t.jsx)(E.SheetTrigger,{"data-testid":"account-menu","aria-label":`Account menu, ${x}${e?`, ${y}`:""}`,className:"inline-flex size-(--size-control-touch) shrink-0 items-center justify-center rounded-full outline-none focus-visible:outline-2 focus-visible:outline-ring",children:(0,t.jsx)(c.Avatar,{kind:"account",size:28,name:x})}),(0,t.jsxs)(E.SheetContent,{side:"bottom","data-testid":"account-sheet",className:"gap-3",children:[(0,t.jsx)(E.SheetTitle,{className:"sr-only",children:"Account"}),(0,t.jsx)(q,{account:e,now:u}),void 0===l||e?.kind==="viewer"?null:(0,t.jsxs)("a",{href:l,"data-testid":"account-hosted",className:"flex h-(--size-control-touch) items-center gap-2.5 border-t border-border pt-3 text-body-touch text-foreground outline-none focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon) [&_svg]:text-muted-foreground",children:[(0,t.jsx)(m.CircleUserRound,{"aria-hidden":!0}),I]}),void 0===p?null:(0,t.jsxs)("button",{type:"button","data-testid":"account-take-tour",onClick:()=>{b(!1),p()},className:"flex h-(--size-control-touch) items-center gap-2.5 border-t border-border pt-3 text-body-touch text-foreground outline-none focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon) [&_svg]:text-muted-foreground",children:[(0,t.jsx)(g.Compass,{"aria-hidden":!0}),O]}),void 0===h?null:(0,t.jsxs)(d.default,{href:h,"data-testid":"account-settings",onClick:()=>{b(!1)},className:"flex h-(--size-control-touch) items-center gap-2.5 border-t border-border pt-3 text-body-touch text-foreground outline-none focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon) [&_svg]:text-muted-foreground",children:[(0,t.jsx)(i.Settings,{"aria-hidden":!0}),"Settings"]}),A(e)&&(0,t.jsxs)("div",{className:"flex flex-col gap-1.5 border-t border-border pt-3",children:[(0,t.jsx)("p",{className:"text-caption text-muted-foreground",children:"Theme"}),(0,t.jsx)(j.Tabs,{value:S,onValueChange:e=>{let t=L(e,r);void 0!==t&&s(t)},children:(0,t.jsx)(j.TabsList,{"aria-label":"Theme",className:"w-full",children:r.map(n=>{let r=N[n];return(0,t.jsxs)(j.TabsTrigger,{value:n,disabled:void 0===e,"data-testid":`account-theme-${n}`,className:"grow",children:[(0,t.jsx)(r,{"aria-hidden":!0}),M.THEME_LABELS[n]]},n)})})})]}),(0,t.jsxs)("a",{href:f.SOURCE_URL,target:"_blank",rel:"noreferrer","data-testid":"account-source",className:"flex h-(--size-control-touch) items-center gap-2.5 border-t border-border pt-3 text-body-touch text-foreground outline-none focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon) [&_svg]:text-muted-foreground",children:[(0,t.jsx)(n.CodeXml,{"aria-hidden":!0}),"Source on GitHub",(0,t.jsx)("span",{className:"sr-only",children:" (opens in a new tab)"})]}),(0,t.jsx)("button",{type:"button","data-testid":"account-sign-out",disabled:o,onClick:a,className:(0,C.classNames)("flex h-(--size-control-touch) items-center gap-2.5 border-t border-border pt-3 text-body-touch text-foreground outline-none focus-visible:outline-2 focus-visible:outline-ring disabled:opacity-60 [&_svg]:size-(--size-icon) [&_svg]:text-muted-foreground"),children:(0,t.jsx)(D,{isSigningOut:o})}),(0,t.jsx)(E.SheetClose,{render:(0,t.jsx)(k.Button,{size:"touch",className:"w-full"}),children:"Cancel"})]})]})}let z="relative flex h-(--size-control) items-center gap-2.5 rounded-md px-2.5 text-body text-muted-foreground transition-colors duration-(--duration-fast) hover:bg-accent hover:text-foreground aria-[current=page]:bg-accent aria-[current=page]:font-medium aria-[current=page]:text-foreground max-lg:justify-center max-lg:px-0 [&_svg]:size-(--size-icon) [&_svg]:shrink-0";function U({href:e,label:n,icon:r,isActive:s,testId:i,count:a}){return(0,t.jsxs)(d.default,{href:e,"aria-current":s?"page":void 0,"data-testid":i,className:z,children:[r,(0,t.jsx)("span",{className:"grow max-lg:sr-only",children:n}),a]})}function B({count:e}){return void 0===e||0===e?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(p.Badge,{variant:"count","data-testid":"nav-inbox-count",className:"max-lg:sr-only",children:[e,(0,t.jsx)("span",{className:"sr-only",children:" open"})]}),(0,t.jsx)("span",{"aria-hidden":!0,className:"absolute top-1.5 right-4 size-1.5 rounded-full bg-primary lg:hidden"})]})}function _({count:e}){return void 0===e||0===e?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(p.Badge,{variant:"count-neutral","data-testid":"nav-needs-crew-count",className:"max-lg:sr-only",children:[e,(0,t.jsx)("span",{className:"sr-only",children:" need crew"})]}),(0,t.jsx)("span",{"aria-hidden":!0,className:"absolute top-1.5 right-4 size-1.5 rounded-full bg-muted-foreground lg:hidden"})]})}function K({count:e,testId:n="nav-attention-count"}){return void 0===e||0===e?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(p.Badge,{variant:"count-attention","data-testid":n,className:"max-lg:sr-only",children:[e,(0,t.jsx)("span",{className:"sr-only",children:" need attention"})]}),(0,t.jsx)("span",{"aria-hidden":!0,className:"absolute top-1.5 right-4 size-1.5 rounded-full bg-tone-attention-fg lg:hidden"})]})}function H({href:e,label:n,icon:r,isActive:s,testId:i,count:a}){let o=a?.value!==void 0&&a.value>0;return(0,t.jsxs)(d.default,{href:e,"aria-current":s?"page":void 0,"data-testid":i,className:"flex grow flex-col items-center justify-center gap-1 text-micro text-muted-foreground outline-none focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring aria-[current=page]:font-medium aria-[current=page]:text-primary [&_svg]:size-(--size-icon-tab)",children:[(0,t.jsxs)("span",{className:"relative",children:[r,o?(0,t.jsxs)("span",{"data-testid":`${i}-count`,className:(0,C.classNames)("absolute -top-1.5 -right-2 flex h-4 min-w-4 items-center justify-center rounded-full px-1 text-micro font-semibold tabular-nums","primary"===a.tone?"bg-primary text-primary-foreground":"bg-destructive text-destructive-foreground"),children:[a.value,(0,t.jsxs)("span",{className:"sr-only",children:[" ",a.words]})]}):null]}),n]})}e.s(["Sidebar",0,function({active:e,inboxCount:d,attentionCount:p,needsCrewCount:h,hasSquadrons:m=!1,hasTrierarchs:g=!1,trierarchsCount:v,hasSettings:b=!1,...x}){return(0,t.jsxs)("aside",{"data-slot":"sidebar",className:"sticky top-0 hidden h-dvh w-(--size-rail) shrink-0 flex-col border-r border-border bg-sidebar text-sidebar-foreground sm:flex lg:w-(--size-sidebar)",children:[(0,t.jsxs)("div",{className:"flex h-(--size-header) items-center gap-2.5 px-4 max-lg:justify-center max-lg:px-0",children:[(0,t.jsx)(c.Avatar,{kind:"app",size:28}),(0,t.jsxs)("div",{className:"flex flex-col max-lg:sr-only",children:[(0,t.jsx)("span",{className:"text-body font-semibold text-foreground",children:"Aeolus"}),(0,t.jsx)("span",{className:"text-caption text-muted-foreground",children:"Operator console"})]})]}),(0,t.jsxs)("nav",{"aria-label":"Console",className:"flex grow flex-col gap-0.5 px-2.5 py-2",children:[(0,t.jsx)(U,{href:"/",label:"Fleet overview",icon:(0,t.jsx)(o.Ship,{"aria-hidden":!0}),isActive:"overview"===e,testId:"nav-overview"}),(0,t.jsx)(U,{href:"/needs-crew",label:"Needs crew",icon:(0,t.jsx)(s.ListChecks,{"aria-hidden":!0}),isActive:"needs-crew"===e,testId:"nav-needs-crew",count:(0,t.jsx)(_,{count:h})}),m&&(0,t.jsx)(U,{href:"/squadrons",label:"Squadrons",icon:(0,t.jsx)(a.Shapes,{"aria-hidden":!0}),isActive:"squadrons"===e,testId:"nav-squadrons"}),g&&(0,t.jsx)(U,{href:"/trierarchs",label:"Trierarchs",icon:(0,t.jsx)(u.ShipWheel,{"aria-hidden":!0}),isActive:"trierarchs"===e,testId:"nav-trierarchs",count:(0,t.jsx)(K,{count:v,testId:"nav-trierarchs-count"})}),(0,t.jsx)(U,{href:"/inbox",label:"Operator inbox",icon:(0,t.jsx)(r.Inbox,{"aria-hidden":!0}),isActive:"inbox"===e,testId:"nav-inbox",count:(0,t.jsx)(B,{count:d})}),(0,t.jsx)(U,{href:"/needs-attention",label:"Needs attention",icon:(0,t.jsx)(l.TriangleAlert,{"aria-hidden":!0}),isActive:"attention"===e,testId:"nav-attention",count:(0,t.jsx)(K,{count:p})})]}),(0,t.jsxs)("div",{className:"px-2.5 pb-2",children:[b&&(0,t.jsx)(U,{href:"/settings",label:"Settings",icon:(0,t.jsx)(i.Settings,{"aria-hidden":!0}),isActive:"settings"===e,testId:"nav-settings"}),(0,t.jsxs)("a",{href:f.SOURCE_URL,target:"_blank",rel:"noreferrer","data-testid":"nav-source",className:z,children:[(0,t.jsx)(n.CodeXml,{"aria-hidden":!0}),(0,t.jsx)("span",{className:"grow max-lg:sr-only",children:"Source on GitHub"}),(0,t.jsx)("span",{className:"sr-only",children:" (opens in a new tab)"})]})]}),(0,t.jsx)("div",{className:"border-t border-border p-2.5",children:(0,t.jsx)(Q,{...x})})]})}],36779),e.s(["TabBar",0,function({active:e,inboxCount:n,attentionCount:s,hasSquadrons:i=!1,hasTrierarchs:d=!1,trierarchsCount:c}){return(0,t.jsxs)("nav",{"aria-label":"Console","data-slot":"tab-bar",className:"fixed inset-x-0 bottom-0 z-40 flex min-h-(--size-tabbar) border-t border-border bg-background pb-[env(safe-area-inset-bottom)] sm:hidden",children:[(0,t.jsx)(H,{href:"/",label:"Fleet",icon:(0,t.jsx)(o.Ship,{"aria-hidden":!0}),isActive:"fleet"===e,testId:"tab-fleet"}),i&&(0,t.jsx)(H,{href:"/squadrons",label:"Squadrons",icon:(0,t.jsx)(a.Shapes,{"aria-hidden":!0}),isActive:"squadrons"===e,testId:"tab-squadrons"}),d&&(0,t.jsx)(H,{href:"/trierarchs",label:"Trierarchs",icon:(0,t.jsx)(u.ShipWheel,{"aria-hidden":!0}),isActive:"trierarchs"===e,testId:"tab-trierarchs",count:{value:c,tone:"attention",words:"silent"}}),(0,t.jsx)(H,{href:"/inbox",label:"Inbox",icon:(0,t.jsx)(r.Inbox,{"aria-hidden":!0}),isActive:"inbox"===e,testId:"tab-inbox",count:{value:n,tone:"primary",words:"open"}}),(0,t.jsx)(H,{href:"/needs-attention",label:"Attention",icon:(0,t.jsx)(l.TriangleAlert,{"aria-hidden":!0}),isActive:"attention"===e,testId:"tab-attention",count:{value:s,tone:"attention",words:"need attention"}})]})}],15034);var V=e.i(24071),G=e.i(66595),$=e.i(24262);e.s(["TopBar",0,function({title:e,live:n,actions:r,back:s,account:i,onSearch:a}){let o=a&&!s?a:void 0;return(0,t.jsxs)("header",{"data-slot":"top-bar","data-mode":s?"detail":"root",className:"sticky top-0 z-30 flex h-(--size-header) items-center gap-2.5 border-b border-border bg-background px-4 sm:hidden",children:[s?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(d.default,{href:s.href,className:"-ml-1.5 inline-flex h-(--size-control-touch) shrink-0 items-center gap-0.5 rounded-md pr-2 text-body-touch text-foreground focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon)",children:[(0,t.jsx)(V.ChevronLeft,{"aria-hidden":!0}),s.label]}),(0,t.jsx)("p",{className:"min-w-0 flex-1 truncate text-center text-body-touch font-semibold text-foreground",children:e})]}):(0,t.jsx)("h1",{className:"truncate text-title-touch font-semibold tracking-tight text-foreground",children:e}),(0,t.jsx)($.LiveStatus,{state:n}),r||o||i&&!s?(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[o?(0,t.jsx)(k.Button,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Search ships or jump to","data-testid":"top-bar-search",onClick:o,children:(0,t.jsx)(G.Search,{"aria-hidden":!0})}):null,r,i&&!s?(0,t.jsx)(F,{...i}):null]}):null]})}],85538)},88721,3979,e=>{"use strict";var t=e.i(54616),n=e.i(66027),r=e.i(12598),s=e.i(18566),i=e.i(41880),a=e.i(87600),o=e.i(95014),u=e.i(25242),l=e.i(77155),d=e.i(27702),c=e.i(90262),p=e.i(5387),f=e.i(49841),h=e.i(86165),m=e.i(14695),g=e.i(265);function v(){let e=(0,c.useAccess)(),t=(0,h.useHasSquadrons)(),n=(0,g.useHasTrierarchPlugin)(),r=(0,g.useMachines)(),s=(0,p.useFleetSnapshot)();return{...void 0===s.data?{}:{needsCrewCount:(0,f.needsCrew)(s.data,{hasTrierarchs:n}).length},hasSquadrons:t,hasTrierarchs:n,...void 0===r.data?{}:{trierarchsCount:(0,m.silentCount)(r.data)},hasSettings:e.canManage&&(t||n)}}e.s(["usePluginNav",0,v],3979),e.s(["useAccountMenu",0,function(e){let c=(0,d.useTRPC)(),p=(0,s.useRouter)(),f=(0,r.useQueryClient)(),h=(0,n.useQuery)(c.console.account.queryOptions()),m=(0,a.useHostedAccountUrl)(),{themes:g}=(0,u.useConsoleConstants)(),b=(0,l.useConsoleGuide)(),x=v(),y=(0,t.useMutation)(c.console.setTheme.mutationOptions({onMutate:({theme:e})=>{(0,o.applyTheme)(e),f.setQueryData(c.console.account.queryKey(),t=>t?.kind!=="operator"?t:{...t,theme:e})},onError:()=>{(0,i.showToast)({title:"Couldn’t save the theme",description:"It applies here until the page reloads.",tone:"error"})}})),S=(0,t.useMutation)(c.console.signOut.mutationOptions({onSuccess:()=>{f.clear(),p.replace("/sign-in")}})),R=()=>{S.mutate(void 0,{onError:()=>{(0,i.showToast)({title:"Couldn’t sign out",description:"The server did not answer. You are still signed in.",tone:"error",action:{label:"Try again",onClick:R}})}})};return{...x.hasTrierarchs&&x.hasSettings?{settingsHref:"/settings"}:{},account:h.data,themes:g,onThemeChange:e=>{y.mutate({theme:e})},onSignOut:R,isSigningOut:S.isPending,now:e,...void 0===m?{}:{accountUrl:m},...void 0===b.onTakeTour?{}:{onTakeTour:b.onTakeTour}}}],88721)},54492,e=>{"use strict";e.s(["crewRequestAction",0,function(e){switch(e.kind){case"none":return;case"needsCrew":return"remove";case"crewedByHand":return"release";case"assigned":return"releasing"===e.status?void 0:"release"}},"crewRequestStage",0,function(e){let t=e.crewRequest;return null===t?{kind:"none"}:null!==t.assignedTo?{kind:"assigned",requestedAt:t.requestedAt,trierarch:t.assignedTo,status:t.status??"crewing",attempt:t.attempt,startedAt:t.startedAt}:null!==t.crewedBy?{kind:"crewedByHand",requestedAt:t.requestedAt,crewedBy:t.crewedBy,since:e.crewedSince??null}:{kind:"needsCrew",requestedAt:t.requestedAt,reason:t.reason}},"isRestartable",0,function(e){return"assigned"===e.kind&&"crashed"===e.status},"releaseSteps",0,function(e){return"crewedByHand"===e.kind?["removeCrewRequest","release"]:["removeCrewRequest"]},"requestedBy",0,function(e){return e.find(e=>"CrewRequested"===e.type)?.actor??null},"restartWords",0,function({status:e,attempt:t}){let n=`${String(t)} ${1===t?"restart":"restarts"}`;switch(e){case"restarting":return`attempt ${String(t)}`;case"crashed":return n;case"running":return 0===t?void 0:n;case"crewing":case"releasing":return}},"statusChangedAt",0,function(e){return e.find(e=>"CrewStatusChanged"===e.type)?.occurredAt}])},86413,e=>{"use strict";var t=e.i(54616),n=e.i(66027),r=e.i(12598),s=e.i(27702);function i(){let e=(0,s.useTRPC)();return(0,n.useQuery)(e.fleet.inbox.queryOptions({filter:"all"}))}function a(e){return"pending"===e.state||"delivered"===e.state}function o(e,t){switch(t){case"open":return e.filter(a);case"done":return e.filter(e=>"acknowledged"===e.state);case"all":return[...e]}}function u(){let e=(0,s.useTRPC)(),t=(0,r.useQueryClient)();return()=>t.invalidateQueries({queryKey:e.fleet.pathKey()})}e.s(["filterCounts",0,function(e){return{open:o(e,"open").length,done:o(e,"done").length,all:e.length}},"inboxPathOf",0,function(e){let t=new URLSearchParams;"open"!==e.filter&&t.set("filter",e.filter),void 0!==e.deliveryId&&t.set("message",e.deliveryId);let n=t.toString();return""===n?"/inbox":`/inbox?${n}`},"messagesFor",0,o,"readInboxFilter",0,function(e){return"done"===e||"all"===e?e:"open"},"useInbox",0,i,"useMarkDone",0,function(){let e=(0,s.useTRPC)(),n=u();return(0,t.useMutation)(e.fleet.markDone.mutationOptions({onSuccess:n}))},"useMarkRead",0,function(){let e=(0,s.useTRPC)(),n=u();return(0,t.useMutation)(e.fleet.markRead.mutationOptions({onSuccess:n}))},"useOpenInboxCount",0,function(){let e=i().data;return void 0===e?void 0:e.filter(a).length},"useReply",0,function(){let e=(0,s.useTRPC)(),n=u();return(0,t.useMutation)(e.fleet.reply.mutationOptions({onSuccess:n}))}])},18423,e=>{"use strict";var t=e.i(12598),n=e.i(5861),r=e.i(71645),s=e.i(27702);let i=new Set(["FleetInitialised","ShipCommissioned","ShipClaimed","LeaseRevoked","CredentialRevoked","StartingPromptIssued","ShipRetired","DeliveryAcknowledged","DeliveryUndeliverable","ShipReported","CrewRequested","CrewRequestRemoved","CrewAssigned","CrewStatusChanged","CrewRequestExplained","CrewRequestGivenBack","LabelAssigned","LabelUnassigned","LabelRetired"]);async function a(e,t){await e.cancelQueries({queryKey:t,predicate:e=>void 0===e.state.data&&"fetching"===e.state.fetchStatus}),await e.invalidateQueries({queryKey:t})}let o=new Set(["LabelDefined","LabelValuesChanged","LabelRetired","LabelAssigned","LabelUnassigned","LabelDeleted"]),u=new Set(["DeliveryUndeliverable","DeliveryDismissed"]);e.s(["useLiveFleet",0,function(){let e=(0,s.useTRPC)(),l=(0,t.useQueryClient)(),[d,c]=(0,r.useState)(new Set),p=e=>{a(l,e)},f=(0,n.useSubscription)(e.fleet.events.subscriptionOptions({lastEventId:null},{onData:({data:t})=>{var n,r,s;if("resync"===t.kind)return void p(e.fleet.pathKey());let{event:a}=t;for(let t of new Set([a.shipId,a.actorShipId]))null!==t&&(p(e.fleet.ship.queryKey({shipId:t})),p(e.fleet.shipTimeline.queryKey({shipId:t})));if(null!==a.messageId&&(p(e.fleet.shipMessages.pathKey()),p(e.fleet.message.queryKey({messageId:a.messageId})),p(e.fleet.inbox.pathKey())),n=a.type,u.has(n)&&p(e.fleet.needsAttention.queryKey()),r=a.type,o.has(r)&&p(e.fleet.labels.queryKey()),s=a.type,!i.has(s))return;p(e.fleet.list.queryKey());let{shipId:l}=a;"ShipCommissioned"===a.type&&null!==l&&c(e=>new Set([...e,l]))}}));return{live:function(e){switch(e){case"pending":return"live";case"connecting":return"reconnecting";case"idle":case"error":return"offline"}}(f.status),newShipIds:d,error:f.error}}])},28459,e=>{"use strict";var t=e.i(54616),n=e.i(66027),r=e.i(12598),s=e.i(48695),i=e.i(84294),a=e.i(27702);function o(){let e=(0,a.useTRPC)();return(0,n.useQuery)(e.fleet.needsAttention.queryOptions())}function u(){let e=(0,a.useTRPC)(),t=(0,r.useQueryClient)();return()=>t.invalidateQueries({queryKey:e.fleet.pathKey()})}e.s(["DISMISSED_TOAST",0,{title:"Delivery dismissed",description:"It stays in the timelines as dismissed."},"canResend",0,function(e){return!e.message.isPing},"deliveryWithId",0,function(e,t){return e?.find(e=>e.deliveryId===t)},"messagePathOf",0,function(e){let{message:t}=e;return`/ships/${t.sender.id}?tab=messages&message=${t.id}`},"resentToast",0,function(e){return{title:"Message resent",description:`A new message went to ${function(e){let{recipient:t}=e.message;return"ship"===t.kind?t.ship.name:`any ship of type ${t.type}`}(e)}. The original is dismissed.`}},"useAttentionCount",0,function(){let e=o().data?.length,t=(0,s.useSquadrons)();return void 0===e?void 0:e+(0,i.silentMembers)(t.data??[]).length},"useDismissDelivery",0,function(){let e=(0,a.useTRPC)(),n=u();return(0,t.useMutation)(e.fleet.dismiss.mutationOptions({onSuccess:n}))},"useNeedsAttention",0,o,"useResendDelivery",0,function(){let e=(0,a.useTRPC)(),n=u();return(0,t.useMutation)(e.fleet.resend.mutationOptions({onSuccess:n}))}])},49841,e=>{"use strict";var t=e.i(54492);let n={crewing:{tone:"active",word:"Crewing"},running:{tone:"ok",word:"Running"},restarting:{tone:"waiting",word:"Restarting"},crashed:{tone:"attention",word:"Crashed"},releasing:{tone:"active",word:"Releasing"}};e.s(["crewRequestCell",0,function(e){switch(e.kind){case"none":return;case"needsCrew":return{tone:"waiting",word:"Needs crew"};case"crewedByHand":return{tone:"ok",word:"Crewed by hand"};case"assigned":return n[e.status]}},"crewRequestKey",0,function(e){return"assigned"===e.kind?e.status:e.kind},"crewRequestKeyWord",0,function(e){return"none"===e?"No request":"needsCrew"===e?"Needs crew":"crewedByHand"===e?"Crewed by hand":n[e].word},"crewRequestKeysOf",0,function(e){return["none","needsCrew","crewedByHand",...e]},"handCrewOf",0,function(e){return null===e.startingPrompt?{kind:"no-prompt"}:e.startingPrompt.isClaimed?{kind:"crew-ended",endedAt:e.awaitingCrewSince}:{kind:"prompt-unclaimed",issuedAt:e.startingPrompt.issuedAt}},"needsCrew",0,function(e,n){return e.filter(e=>(function(e,n){if("retired"===e.status)return!1;let r=(0,t.crewRequestStage)(e);return n.hasTrierarchs?"needsCrew"===r.kind||"assigned"===r.kind&&"running"!==r.status&&"releasing"!==r.status:"needsCrew"===r.kind&&"awaitingCrew"===e.status})(e,n)).toSorted((e,t)=>(e.crewRequest?.requestedAt??"").localeCompare(t.crewRequest?.requestedAt??""))}])},96676,e=>{"use strict";let t;var n=e.i(71645);let r=Date.now(),s=new Set;function i(e){return s.add(e),t??=setInterval(()=>{for(let e of(r=Date.now(),s))e()},1e4),()=>{s.delete(e),0===s.size&&(clearInterval(t),t=void 0)}}function a(){return r}e.s(["useNow",0,function(){return new Date((0,n.useSyncExternalStore)(i,a,a))}])},78485,e=>{"use strict";var t=e.i(12598),n=e.i(18566),r=e.i(71645),s=e.i(46929);e.s(["useSignInWhenSessionEnds",0,function(e){let i=(0,n.useRouter)(),a=(0,t.useQueryClient)(),o=e.find(e=>"UNAUTHORIZED"===(0,s.trpcErrorCode)(e)),u=void 0===o?void 0:(0,s.isSignedInElsewhere)(o)?"/sign-in?notice=signed-in-elsewhere":"/sign-in";(0,r.useEffect)(()=>{void 0!==u&&(a.clear(),i.replace(u))},[u,a,i])}])},31513,e=>{"use strict";e.s(["SOURCE_URL",0,"https://github.com/ThomasHendrickx/aeolus-fleet"])},265,e=>{"use strict";var t=e.i(54616),n=e.i(66027),r=e.i(12598),s=e.i(2660),i=e.i(95187);let a=(0,i.createServerReference)("401598a8fdcc7c8cf234973ed94d67df6569283e07",i.callServer,void 0,i.findSourceMapURL,"checkCrewSettings"),o=(0,i.createServerReference)("004521f21c1bbcdef2eb2cf09e9637cbbe6ae5226c",i.callServer,void 0,i.findSourceMapURL,"connectTrierarchPlugin"),u=(0,i.createServerReference)("4023f9ca1c1c4e7e336bbf2f0870d9fd2cb57aa90a",i.callServer,void 0,i.findSourceMapURL,"joinMachine"),l=(0,i.createServerReference)("0007680b1d56b56a8d075e1643cbc9b2eb7f19093c",i.callServer,void 0,i.findSourceMapURL,"listMachines"),d=(0,i.createServerReference)("0069251ab564f68cd3893ca3caca77a5deb6a30481",i.callServer,void 0,i.findSourceMapURL,"readTrierarchPluginConnection"),c=(0,i.createServerReference)("00f4e5ae7dfc698900aef367ab7d4ccaf6d5c39da3",i.callServer,void 0,i.findSourceMapURL,"readTrierarchPluginVersion"),p=["trierarch-plugin","connection"];function f(){return(0,n.useQuery)({queryKey:p,queryFn:async()=>(0,s.dataOf)(await d())})}function h(){let e=f();return void 0===e.data?e.isError?"not-connected":"unknown":e.data.state}function m(){let e=f();return void 0!==e.data&&"none"!==e.data.state}let g=["trierarch-plugin","machines"],v=e=>["trierarch-plugin","check",JSON.stringify(e)];e.s(["useConnectTrierarchPlugin",0,function(){let e=(0,r.useQueryClient)();return(0,t.useMutation)({mutationFn:async()=>(0,s.dataOf)(await o()),onSuccess:t=>{e.setQueryData(p,t)}})},"useCrewSettingsCheck",0,function(e){let t=(0,r.useQueryClient)(),i=async()=>(0,s.dataOf)(await a(e));return{...(0,n.useQuery)({queryKey:v(e),queryFn:i,enabled:void 0!==e}),checkNow:()=>t.query({queryKey:v(e),queryFn:i,staleTime:0})}},"useHasTrierarchPlugin",0,m,"useJoinMachine",0,function(){let e=(0,r.useQueryClient)();return(0,t.useMutation)({mutationFn:async e=>(0,s.dataOf)(await u(e)),onSuccess:async()=>{await e.invalidateQueries({queryKey:g})}})},"useMachines",0,function(){let e="connected"===h();return(0,n.useQuery)({queryKey:g,queryFn:async()=>(0,s.dataOf)(await l()),refetchInterval:1e4,enabled:e})},"useTrierarchPluginConnection",0,h,"useTrierarchPluginSettings",0,f,"useTrierarchPluginVersion",0,function(){let e=m();return(0,n.useQuery)({queryKey:["console-version","trierarch-plugin"],queryFn:async()=>await c()??null,enabled:e}).data??void 0}],265)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,13082,e=>{"use strict";var t=e.i(71645),n=e.i(74735),r=e.i(28744),s=e.i(65420),i=e.i(8868),a=e.i(39957),o=e.i(29315),u=e.i(51321),l=e.i(84446),d=e.i(96296),c=e.i(75606),p=e.i(56434);let f=r.platform.os.mac&&r.platform.engine.webkit;e.s(["useFocus",0,function(e,r={}){let{enabled:h=!0,delay:m}=r,g="rootStore"in e?e.rootStore:e,{events:v,dataRef:x}=g.context,b=t.useRef(!1),y=t.useRef(null),S=t.useRef(!0),R=(0,a.useTimeout)();t.useEffect(()=>{let e=g.select("domReferenceElement");if(!h)return;let t=(0,o.getWindow)(e);return(0,s.mergeCleanups)((0,n.addEventListener)(t,"blur",function(){let e=g.select("domReferenceElement");!g.select("open")&&(0,o.isHTMLElement)(e)&&e===(0,l.activeElement)((0,i.ownerDocument)(e))&&(b.current=!0,y.current=e)}),f&&(0,n.addEventListener)(t,"keydown",function(){S.current=!0},!0),f&&(0,n.addEventListener)(t,"pointerdown",function(){S.current=!1},!0))},[g,h]),t.useEffect(()=>{if(h)return v.on("openchange",e),()=>{v.off("openchange",e)};function e(e){if(e.reason===p.REASONS.triggerPress||e.reason===p.REASONS.escapeKey){let e=g.select("domReferenceElement");(0,o.isElement)(e)&&(y.current=e,b.current=!0)}}},[v,h,g]);let w=t.useMemo(()=>{function e(){b.current=!1,y.current=null}return{onMouseLeave(){e()},onFocus(t){let n=t.currentTarget;if(b.current){if(y.current===n)return;e()}let r=(0,l.getTarget)(t.nativeEvent);if((0,o.isElement)(r)){if(f&&!t.relatedTarget){if(!S.current&&!(0,d.isTypeableElement)(r))return}else if(!(0,d.matchesFocusVisible)(r))return}let s=(0,d.isTargetInsideEnabledTrigger)(t.relatedTarget,g.context.triggerElements),{nativeEvent:i,currentTarget:a}=t,u="function"==typeof m?m():m;g.select("open")&&s||0===u||void 0===u?g.setOpen(!0,(0,c.createChangeEventDetails)(p.REASONS.triggerFocus,i,a)):R.start(u,()=>{b.current||g.setOpen(!0,(0,c.createChangeEventDetails)(p.REASONS.triggerFocus,i,a))})},onBlur(t){e();let n=t.relatedTarget,r=t.nativeEvent,s=(0,o.isElement)(n)&&n.hasAttribute((0,u.createAttribute)("focus-guard"))&&"outside"===n.getAttribute("data-type");R.start(0,()=>{let e=g.select("domReferenceElement"),t=(0,l.activeElement)((0,i.ownerDocument)(e));if(!n&&t===e||(0,l.contains)(x.current.floatingContext?.refs.floating.current,t)||(0,l.contains)(e,t)||s)return;let a=n??t;(0,d.isTargetInsideEnabledTrigger)(a,g.context.triggerElements)||g.setOpen(!1,(0,c.createChangeEventDetails)(p.REASONS.triggerFocus,r))})}}},[x,m,g,R]);return t.useMemo(()=>h?{reference:w,trigger:w}:{},[h,w])}])},61027,3414,78921,82370,89554,66506,85996,71714,81194,1545,91384,58307,64270,19712,82264,62050,82593,5953,7447,36481,74671,63947,77450,e=>{"use strict";e.s([],61027);var t=e.i(71645),n=e.i(33332);let r=t.createContext(void 0);function s(e){let s=t.useContext(r);if(void 0===s&&!e)throw Error((0,n.default)(33));return s}e.s(["MenuPositionerContext",0,r,"useMenuPositionerContext",0,s],3414);let i=t.createContext(void 0);function a(e){let r=t.useContext(i);if(void 0===r&&!e)throw Error((0,n.default)(36));return r}e.s(["MenuRootContext",0,i,"useMenuRootContext",0,a],78921);var o=e.i(52245),u=e.i(79938);let l=t.forwardRef(function(e,t){let{render:n,className:r,style:i,...l}=e,{store:d}=a(),{arrowRef:c,side:p,align:f,arrowUncentered:h,arrowStyles:m}=s(),g=d.useState("open");return(0,o.useRenderElement)("div",e,{ref:[c,t],stateAttributesMapping:u.popupStateMapping,state:{open:g,side:p,align:f,uncentered:h},props:{style:m,"aria-hidden":!0,...l}})});e.s(["MenuArrow",0,l],82370);let d=t.createContext(void 0);function c(e=!0){let r=t.useContext(d);if(void 0===r&&!e)throw Error((0,n.default)(25));return r}var p=e.i(56434);let f=t.forwardRef(function(e,t){let{render:n,className:r,style:s,...i}=e,{store:l}=a(),d=l.useState("open"),f=l.useState("mounted"),h=l.useState("transitionStatus"),m=l.useState("lastOpenChangeReason"),g=c();return(0,o.useRenderElement)("div",e,{ref:g?.backdropRef?[t,g.backdropRef]:t,state:{open:d,transitionStatus:h},stateAttributesMapping:u.popupTransitionStateMapping,props:[{role:"presentation",hidden:!f,style:{pointerEvents:m===p.REASONS.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},i]})});e.s(["MenuBackdrop",0,f],89554);var h=e.i(51437),m=e.i(56789);let g=t.createContext(void 0);var v=e.i(28918),x=e.i(40886),b=e.i(76782),y=e.i(28744),S=e.i(64350);function R(e){let{closeOnClick:n,highlighted:r,id:s,nodeId:i,store:a,typingRef:o,itemRef:u,itemMetadata:l}=e,{events:d}=a.useState("floatingTreeRoot"),f=a.useState("open"),h=c(!0),m=void 0!==h;return t.useMemo(()=>({id:s,role:"menuitem",tabIndex:f&&r?0:-1,onKeyDown(e){" "===e.key&&o?.current&&e.preventDefault()},onMouseMove(e){i&&d.emit("itemhover",{nodeId:i,target:e.currentTarget})},onClick(e){n&&d.emit("close",{domEvent:e,reason:p.REASONS.itemPress})},onMouseUp(e){if(h){let t=h.initialCursorPointRef.current;if(h.initialCursorPointRef.current=null,m&&t&&1>=Math.abs(e.clientX-t.x)&&1>=Math.abs(e.clientY-t.y)||m&&!y.platform.os.mac&&2===e.button)return}u.current&&a.context.allowMouseUpTriggerRef.current&&(!m||2===e.button)&&"regular-item"===l.type&&(0,S.dispatchClickWithModifiers)(u.current,e,{detail:1})}}),[n,r,s,d,i,f,a,o,u,h,m,l])}let w={type:"regular-item"};function C(e){let{closeOnClick:n,disabled:r,highlighted:s,id:i,store:a,typingRef:o=a.context.typingRef,nativeButton:u,itemMetadata:l,nodeId:d}=e,c=t.useRef(null),{getButtonProps:p,buttonRef:f}=(0,x.useButton)({disabled:r,focusableWhenDisabled:!0,native:u,composite:!0}),h=R({closeOnClick:n,highlighted:s,id:i,nodeId:d,store:a,typingRef:o,itemRef:c,itemMetadata:l}),m=t.useCallback(e=>(0,b.mergeProps)(h,{onMouseEnter(){"submenu-trigger"===l.type&&l.setActive()}},e,p),[h,p,l]),g=(0,v.useMergedRefs)(c,f);return t.useMemo(()=>({getItemProps:m,itemRef:g}),[m,g])}e.s(["REGULAR_ITEM",0,w,"useMenuItem",0,C],66506);var M=e.i(73553),k=e.i(88015);let T={checked:e=>e?{"data-checked":""}:{"data-unchecked":""},...e.i(74354).transitionStatusMapping};var E=e.i(75606),j=e.i(43476);let I=t.forwardRef(function(e,n){let{render:r,className:i,id:u,label:l,nativeButton:d=!1,disabled:c=!1,closeOnClick:f=!1,checked:v,defaultChecked:x,onCheckedChange:b,style:y,...S}=e,R=(0,M.useCompositeListItem)({guess:!0,label:l}),I=s(!0),O=(0,k.useBaseUiId)(u),{store:N}=a(),P=N.useState("disabled"),A=c||P,L=N.useState("isActive",R.index),q=N.useState("itemProps"),[D,Q]=(0,h.useControlled)({controlled:v,default:x??!1,name:"MenuCheckboxItem",state:"checked"}),{getItemProps:F,itemRef:z}=C({closeOnClick:f,disabled:A,highlighted:L,id:O,store:N,nativeButton:d,nodeId:I?.context.nodeId,itemMetadata:w}),U=t.useMemo(()=>({disabled:A,highlighted:L,checked:D}),[A,L,D]),B=(0,o.useRenderElement)("div",e,{state:U,stateAttributesMapping:T,props:[q,{role:"menuitemcheckbox","aria-checked":D,onClick:function(e){let t=(0,E.createChangeEventDetails)(p.REASONS.itemPress,e.nativeEvent,void 0,{preventUnmountOnClose:m.NOOP});b?.(!D,t),t.isCanceled||Q(e=>!e)}},S,F],ref:[z,n,R.ref]});return(0,j.jsx)(g.Provider,{value:U,children:B})});e.s(["MenuCheckboxItem",0,I],85996);var O=e.i(23910),N=e.i(37584);let P=t.forwardRef(function(e,r){let{render:s,className:i,style:a,keepMounted:u=!1,...l}=e,d=function(){let e=t.useContext(g);if(void 0===e)throw Error((0,n.default)(30));return e}(),c=t.useRef(null),{transitionStatus:p,mounted:f,setMounted:h}=(0,O.useTransitionStatus)(d.checked);(0,N.useOpenChangeComplete)({batch:!0,enabled:!d.checked,open:d.checked,ref:c,onComplete(){d.checked||h(!1)}});let m={checked:d.checked,disabled:d.disabled,highlighted:d.highlighted,transitionStatus:p};return(0,o.useRenderElement)("span",e,{state:m,ref:[r,c],stateAttributesMapping:T,props:{"aria-hidden":!0,...l},enabled:u||f})});e.s(["MenuCheckboxItemIndicator",0,P],71714);let A=t.createContext(void 0),L=t.forwardRef(function(e,n){let{render:r,className:s,style:i,...a}=e,[u,l]=t.useState(void 0),d=(0,o.useRenderElement)("div",e,{ref:n,props:{role:"group","aria-labelledby":u,...a}});return(0,j.jsx)(A.Provider,{value:l,children:d})});e.s(["MenuGroup",0,L],81194);var q=e.i(46376);let D=t.forwardRef(function(e,r){let{render:s,className:i,style:a,id:u,...l}=e,d=(0,k.useBaseUiId)(u),c=function(){let e=t.useContext(A);if(void 0===e)throw Error((0,n.default)(31));return e}();return(0,q.useIsoLayoutEffect)(()=>(c(d),()=>{c(e=>e===d?void 0:e)}),[c,d]),(0,o.useRenderElement)("div",e,{ref:r,props:{id:d,"aria-hidden":!0,...l}})});e.s(["MenuGroupLabel",0,D],1545);let Q=t.forwardRef(function(e,t){let{render:n,className:r,id:i,label:u,nativeButton:l=!1,disabled:d=!1,closeOnClick:c=!0,style:p,...f}=e,h=(0,M.useCompositeListItem)({guess:!0,label:u}),m=s(!0),g=(0,k.useBaseUiId)(i),{store:v}=a(),x=v.useState("disabled"),b=d||x,y=v.useState("isActive",h.index),S=v.useState("itemProps"),{getItemProps:R,itemRef:T}=C({closeOnClick:c,disabled:b,highlighted:y,id:g,store:v,nativeButton:l,nodeId:m?.context.nodeId,itemMetadata:w});return(0,o.useRenderElement)("div",e,{state:{disabled:b,highlighted:y},props:[S,f,R],ref:[T,t,h.ref]})});e.s(["MenuItem",0,Q],91384);let F=t.forwardRef(function(e,n){let{render:r,className:i,id:u,label:l,closeOnClick:d=!1,style:c,...p}=e,f=t.useRef(null),h=(0,M.useCompositeListItem)({guess:!0,label:l}),m=s(!0),g=m?.context.nodeId,v=(0,k.useBaseUiId)(u),{store:y}=a(),S=y.useState("isActive",h.index),C=y.useState("itemProps"),T=y.context.typingRef,{getButtonProps:E,buttonRef:j}=(0,x.useButton)({native:!1,composite:!0}),I=R({closeOnClick:d,highlighted:S,id:v,nodeId:g,store:y,typingRef:T,itemRef:f,itemMetadata:w});return(0,o.useRenderElement)("a",e,{state:{highlighted:S},props:[C,p,function(e){return(0,b.mergeProps)(I,e,E)}],ref:[f,j,n,h.ref]})});e.s(["MenuLinkItem",0,F],58307);var z=e.i(61487),U=e.i(31157),B=e.i(96533),_=e.i(73327),K=e.i(53984);let H=t.forwardRef(function(e,n){let{render:r,className:i,style:l,finalFocus:d,...c}=e,{store:f}=a(),{side:h,align:m}=s(),g=null!=(0,B.useToolbarRootContext)(!0),v=f.useState("open"),x=f.useState("transitionStatus"),b=f.useState("popupProps"),y=f.useState("mounted"),S=f.useState("instantType"),R=f.useState("activeTriggerElement"),w=f.useState("parent"),C=f.useState("lastOpenChangeReason"),M=f.useState("rootId"),k=f.useState("floatingRootContext"),T=f.useState("floatingTreeRoot"),I=f.useState("closeDelay"),O=f.useState("hoverEnabled"),P=f.useState("disabled"),A=f.useState("openMethod"),L="context-menu"===w.type;(0,N.useOpenChangeComplete)({open:v,ref:f.context.popupRef,onComplete(){v&&f.context.onOpenChangeComplete?.(!0)}}),t.useEffect(()=>{function e(e){f.setOpen(!1,(0,E.createChangeEventDetails)(e.reason,e.domEvent))}return T.events.on("close",e),()=>{T.events.off("close",e)}},[T.events,f]),(0,U.useHoverFloatingInteraction)(k,{enabled:O&&!P&&!L&&"menubar"!==w.type,closeDelay:I});let q=f.useStateSetter("popupElement"),D={transitionStatus:x,side:h,align:m,open:v,nested:"menu"===w.type,instant:S},Q=(0,o.useRenderElement)("div",e,{state:D,ref:[n,f.context.popupRef,q],stateAttributesMapping:u.popupTransitionStateMapping,props:[b,{onKeyDown(e){g&&_.COMPOSITE_KEYS.has(e.key)&&e.stopPropagation()}},(0,K.getDisabledMountTransitionStyles)(x),c,{"data-rootownerid":M}]}),F=void 0===w.type||L;return(R||"menubar"===w.type&&C!==p.REASONS.outsidePress)&&(F=!0),(0,j.jsx)(z.FloatingFocusManager,{context:k,openInteractionType:A,modal:L,disabled:!y,returnFocus:void 0===d?F:d,initialFocus:"menu"!==w.type,restoreFocus:!0,externalTree:"menubar"!==w.type?T:void 0,previousFocusableElement:R,nextFocusableElement:void 0===w.type?f.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:void 0===w.type?f.context.beforeContentFocusGuardRef:void 0,children:Q})});e.s(["MenuPopup",0,H],64270);var V=e.i(26674);let G=t.createContext(void 0),$=t.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:s,parent:i}=a();if(!(s.useState("mounted")||n))return null;let o="menu"===i.type||"menubar"===i.type?"group":void 0;return(0,j.jsx)(G.Provider,{value:n,children:(0,j.jsx)(V.FloatingPortal,{ref:t,...r,portalOwnerRole:o})})});e.s(["MenuPortal",0,$],19712);var W=e.i(44394),Y=e.i(39957),J=e.i(46420),X=e.i(23706),Z=e.i(53687),ee=e.i(426),et=e.i(38396),en=e.i(22640),er=e.i(89579),es=e.i(33383);let ei=t.forwardRef(function(e,s){let{anchor:i,positionMethod:o="absolute",className:u,render:l,side:d,align:f,sideOffset:h=0,alignOffset:m=0,collisionBoundary:g="clipping-ancestors",collisionPadding:v=5,arrowPadding:x=5,sticky:b=!1,disableAnchorTracking:y=!1,collisionAvoidance:S=et.DROPDOWN_COLLISION_AVOIDANCE,style:R,...w}=e,{store:C}=a(),M=function(){let e=t.useContext(G);if(void 0===e)throw Error((0,n.default)(32));return e}(),k=c(!0),T=C.useState("parent"),I=C.useState("floatingRootContext"),O=C.useState("floatingTreeRoot"),N=C.useState("mounted"),P=C.useState("open"),A=C.useState("modal"),L=C.useState("openMethod"),D=C.useState("activeTriggerElement"),Q=C.useState("transitionStatus"),F=C.useState("positionerElement"),z=C.useState("instantType"),U=C.useState("adaptiveOrigin"),B=C.useState("lastOpenChangeReason"),_=C.useState("floatingNodeId"),K=C.useState("floatingParentNodeId"),H=I.useState("domReferenceElement"),V=t.useRef(null),$=(0,en.useAnimationsFinished)(F),ei=i,ea=h,eo=m,eu=f,el=S;"context-menu"===T.type&&(ei=i??T.context?.anchor,eu=eu??"start",d||"center"===eu||(eo=e.alignOffset??2,ea=e.sideOffset??-5));let ed=d,ec=eu;"menu"===T.type?(ed=ed??"inline-end",ec=ec??"start",el=e.collisionAvoidance??et.POPUP_COLLISION_AVOIDANCE):"menubar"===T.type&&(ed=ed??("vertical"===T.context.orientation?"inline-end":"bottom"),ec=ec??"start");let ep="context-menu"===T.type,ef=(0,X.useAnchorPositioning)({anchor:ei,floatingRootContext:I,positionMethod:k?"fixed":o,mounted:N,side:ed,sideOffset:ea,align:ec,alignOffset:eo,arrowPadding:ep?0:x,collisionBoundary:g,collisionPadding:v,sticky:b,nodeId:_,keepMounted:M,disableAnchorTracking:y,collisionAvoidance:el,shift:ep?{crossAxis:!("side"in el&&"flip"===el.side),rootBoundary:"layoutViewport"}:void 0,externalTree:O,adaptiveOrigin:U});t.useEffect(()=>{function e(e){e.open&&(e.parentNodeId===_&&C.set("hoverEnabled",!1),e.nodeId!==_&&e.parentNodeId===C.select("floatingParentNodeId")&&C.setOpen(!1,(0,E.createChangeEventDetails)(p.REASONS.siblingOpen)))}return O.events.on("menuopenchange",e),()=>{O.events.off("menuopenchange",e)}},[C,O.events,_]),t.useEffect(()=>{if(null!=C.select("floatingParentNodeId"))return O.events.on("menuopenchange",e),()=>{O.events.off("menuopenchange",e)};function e(e){if(e.open||e.nodeId!==C.select("floatingParentNodeId"))return;let t=e.reason??p.REASONS.siblingOpen;C.setOpen(!1,(0,E.createChangeEventDetails)(t))}},[O.events,C]);let eh=(0,Y.useTimeout)();t.useEffect(()=>{P||eh.clear()},[P,eh]),t.useEffect(()=>{function e(e){if(P&&e.nodeId===C.select("floatingParentNodeId"))if(e.target&&D&&D!==e.target){let e=C.select("closeDelay");e>0?eh.isStarted()||eh.start(e,()=>{C.setOpen(!1,(0,E.createChangeEventDetails)(p.REASONS.siblingOpen))}):C.setOpen(!1,(0,E.createChangeEventDetails)(p.REASONS.siblingOpen))}else eh.clear()}return O.events.on("itemhover",e),()=>{O.events.off("itemhover",e)}},[O.events,P,D,C,eh]),t.useEffect(()=>{let e={open:P,nodeId:_,parentNodeId:K,reason:C.select("lastOpenChangeReason")};O.events.emit("menuopenchange",e)},[O.events,P,C,_,K]),(0,q.useIsoLayoutEffect)(()=>{let e=V.current;if(H&&(V.current=H),e&&H&&H!==e){C.set("instantType",void 0);let e=new AbortController;return $(()=>{C.set("instantType","trigger-change")},e.signal),()=>{e.abort()}}},[H,$,C]);let em={open:P,side:ef.side,align:ef.align,anchorHidden:ef.anchorHidden,nested:"menu"===T.type,instant:z},eg="menubar"===T.type&&T.context.modal,ev=A&&B!==p.REASONS.triggerHover;(0,es.useAnchoredPopupScrollLock)(P&&(eg||ev),"touch"===L,F,D);let ex=(0,er.usePositioner)(e,em,{styles:ef.positionerStyles,transitionStatus:Q,props:w,refs:[s,C.useStateSetter("positionerElement")],hidden:!N,inert:!P}),eb=N&&"menu"!==T.type&&("menubar"!==T.type&&A&&B!==p.REASONS.triggerHover||"menubar"===T.type&&T.context.modal),ey=null;return"menubar"===T.type?ey=T.context.contentElement:void 0===T.type&&(ey=D),(0,j.jsxs)(r.Provider,{value:ef,children:[eb&&(0,j.jsx)(ee.InternalBackdrop,{ref:"context-menu"===T.type||"nested-context-menu"===T.type?T.context.internalBackdropRef:null,inert:(0,W.inertValue)(!P),cutout:ey}),(0,j.jsx)(J.FloatingNode,{id:_,children:(0,j.jsx)(Z.CompositeList,{elementsRef:C.context.itemDomElements,labelsRef:C.context.itemLabels,children:ex})})]})});e.s(["MenuPositioner",0,ei],82264);var ea=e.i(67865);let eo=t.createContext(void 0),eu=t.memo(t.forwardRef(function(e,n){let{render:r,className:s,value:i,defaultValue:a,onValueChange:u,disabled:l=!1,style:d,"aria-labelledby":c,...p}=e,[f,m]=t.useState(void 0),[g,v]=(0,h.useControlled)({controlled:i,default:a,name:"MenuRadioGroup"}),x=(0,ea.useStableCallback)((e,t)=>{u?.(e,t),t.isCanceled||v(e)}),b=(0,o.useRenderElement)("div",e,{state:{disabled:l},ref:n,props:{role:"group","aria-labelledby":c??f,"aria-disabled":l||void 0,...p}}),y=t.useMemo(()=>({value:g,setValue:x,disabled:l}),[g,x,l]);return(0,j.jsx)(A.Provider,{value:m,children:(0,j.jsx)(eo.Provider,{value:y,children:b})})}));e.s(["MenuRadioGroup",0,eu],62050);let el=t.createContext(void 0),ed=t.forwardRef(function(e,r){let{render:i,className:u,id:l,label:d,nativeButton:c=!1,disabled:f=!1,closeOnClick:h=!1,value:g,style:v,...x}=e,b=(0,M.useCompositeListItem)({guess:!0,label:d}),y=s(!0),S=(0,k.useBaseUiId)(l),{store:R}=a(),I=R.useState("isActive",b.index),O=R.useState("itemProps"),{value:N,setValue:P,disabled:A}=function(){let e=t.useContext(eo);if(void 0===e)throw Error((0,n.default)(34));return e}(),L=R.useState("disabled"),q=f||A||L,D=N===g,{getItemProps:Q,itemRef:F}=C({closeOnClick:h,disabled:q,highlighted:I,id:S,store:R,nativeButton:c,nodeId:y?.context.nodeId,itemMetadata:w}),z=t.useMemo(()=>({disabled:q,highlighted:I,checked:D}),[q,I,D]),U=(0,o.useRenderElement)("div",e,{state:z,stateAttributesMapping:T,props:[O,{role:"menuitemradio","aria-checked":D,onClick:function(e){P(g,(0,E.createChangeEventDetails)(p.REASONS.itemPress,e.nativeEvent,void 0,{preventUnmountOnClose:m.NOOP}))}},x,Q],ref:[F,r,b.ref]});return(0,j.jsx)(el.Provider,{value:z,children:U})});e.s(["MenuRadioItem",0,ed],82593);let ec=t.forwardRef(function(e,r){let{render:s,className:i,style:a,keepMounted:u=!1,...l}=e,d=function(){let e=t.useContext(el);if(void 0===e)throw Error((0,n.default)(35));return e}(),c=t.useRef(null),{transitionStatus:p,mounted:f,setMounted:h}=(0,O.useTransitionStatus)(d.checked);(0,N.useOpenChangeComplete)({batch:!0,enabled:!d.checked,open:d.checked,ref:c,onComplete(){d.checked||h(!1)}});let m={checked:d.checked,disabled:d.disabled,highlighted:d.highlighted,transitionStatus:p};return(0,o.useRenderElement)("span",e,{state:m,stateAttributesMapping:T,ref:[r,c],props:{"aria-hidden":!0,...l},enabled:u||f})});e.s(["MenuRadioItemIndicator",0,ec],5953);var ep=e.i(83977),ef=e.i(88940),eh=e.i(96499),em=e.i(17989),eg=e.i(60891),ev=e.i(5049),ex=e.i(50527);let eb=t.createContext(null);function ey(e){let r=t.useContext(eb);if(null===r&&!e)throw Error((0,n.default)(5));return r}e.s(["useMenubarContext",0,ey],7447);var eS=e.i(72855),eR=e.i(32199),ew=e.i(26352),eC=e.i(79248),eM=e.i(18478),ek=e.i(16786),eT=e.i(90627);let eE={...ek.popupStoreSelectors,disabled:e=>"menubar"===e.parent.type&&e.parent.context.disabled||e.disabled,modal:e=>(void 0===e.parent.type||"context-menu"===e.parent.type)&&(e.modal??!0),openMethod:e=>e.openMethod,allowMouseEnter:e=>e.allowMouseEnter,highlightItemOnHover:e=>e.highlightItemOnHover,parent:e=>e.parent,rootId:e=>"menu"===e.parent.type?e.parent.store.select("rootId"):void 0!==e.parent.type?e.parent.context.rootId:e.rootId,activeIndex:e=>e.activeIndex,isActive:(e,t)=>e.activeIndex===t,hoverEnabled:e=>e.hoverEnabled,instantType:e=>e.instantType,lastOpenChangeReason:e=>e.openChangeReason,floatingTreeRoot:e=>"menu"===e.parent.type?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot,floatingNodeId:e=>e.floatingNodeId,floatingParentNodeId:e=>e.floatingParentNodeId,itemProps:e=>e.itemProps,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin,keyboardEventRelay:e=>e.keyboardEventRelay?e.keyboardEventRelay:"menu"===e.parent.type?e.parent.store.select("keyboardEventRelay"):void 0};class ej extends ew.ReactStore{constructor(e,t,n=!1){const r=new eT.PopupTriggerMap;super(eO(r,t,n,e),eI(r),eE),this.unsubscribeParentListener=this.observe("parent",e=>{if(this.unsubscribeParentListener?.(),"menu"===e.type){let t=e.store.select("rootId"),n=e.store.select("floatingTreeRoot"),r=e.store.select("keyboardEventRelay");this.unsubscribeParentListener=e.store.subscribe(()=>{let s=e.store.select("rootId"),i=e.store.select("floatingTreeRoot"),a=e.store.select("keyboardEventRelay");(t!==s||n!==i||r!==a)&&(t=s,n=i,r=a,this.notifyAll())}),this.context.allowMouseUpTriggerRef=e.store.context.allowMouseUpTriggerRef;return}void 0!==e.type&&(this.context.allowMouseUpTriggerRef=e.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(e,t){this.state.floatingRootContext.context.events.emit("setOpen",{open:e,eventDetails:t})}unsubscribeParentListener=null}function eI(e){return{positionerRef:t.createRef(),popupRef:t.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:t.createRef(),beforeContentFocusGuardRef:t.createRef(),onOpenChangeComplete:void 0,triggerElements:e}}function eO(e,t,n=!1,r){return{...(0,ek.createInitialPopupStoreState)(e,t,n),disabled:!1,modal:!0,openMethod:null,allowMouseEnter:!1,highlightItemOnHover:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new eC.FloatingTreeStore,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:m.EMPTY_OBJECT,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0,...r}}e.s(["MenuStore",0,ej,"createNullMenuStore",0,function(){let e=new eT.PopupTriggerMap;return Object.assign(new eM.NullStore(Object.freeze(eO(e)),Object.freeze(eI(e)),eE),{setOpen:m.NOOP})}],36481);var eN=e.i(64111);let eP=t.createContext(void 0);function eA(){return t.useContext(eP)}e.s(["MenuSubmenuRootContext",0,eP,"useMenuSubmenuRootContext",0,eA],74671);let eL=(0,eh.fastComponent)(function(e){var n,r,s;let o,{children:u,open:l,onOpenChange:d,onOpenChangeComplete:f,defaultOpen:h=!1,disabled:g=!1,modal:v,loopFocus:x=!0,orientation:y="vertical",actionsRef:S,closeParentOnEsc:R=!1,handle:w,triggerId:C,defaultTriggerId:M=null,highlightItemOnHover:k=!0}=e,T=c(!0),I=a(!0),O=ey(!0),N=eA(),P=t.useMemo(()=>N&&I?{type:"menu",store:I.store}:O?{type:"menubar",context:O}:T&&!I?{type:"context-menu",context:T}:{type:void 0},[T,I,O,N]),A=(0,ep.useId)(),L=(0,ep.useId)(),D=(0,J.useFloatingParentNodeId)(),Q="menu"===P.type?P.store:void 0,F=(l??h)&&Q?.state.transitionStatus==="starting",z=(0,ef.useRefWithInit)(()=>F?Q?.state.instantType:void 0).current,U=(n={open:h,openProp:l,activeTriggerId:M,triggerIdProp:C,parent:P,disabled:g,highlightItemOnHover:k,modal:void 0===P.type?v:void 0,rootId:A,instantType:z},r=L,s=null!=D,(0,ef.useRefWithInit)(()=>new ej(n,r,s)).current);U.useControlledProp("openProp",l),U.useControlledProp("triggerIdProp",C),U.useContextCallback("onOpenChangeComplete",f);let B=U.useState("floatingTreeRoot"),_=(0,J.useFloatingNodeId)(B),K=U.useState("open"),H=U.useState("activeTriggerElement"),V=U.useState("positionerElement"),G=U.useState("hoverEnabled"),$=U.useState("disabled"),W=U.useState("lastOpenChangeReason"),X=U.useState("parent"),Z=U.useState("activeIndex"),ee=U.useState("payload"),er=U.useState("floatingParentNodeId"),es=t.useRef(null),ei=t.useRef("context-menu"!==X.type),eo=(0,Y.useTimeout)(),eu=t.useRef(!0),el=(0,Y.useTimeout)(),ed=null!=er,{openMethod:ec,triggerProps:eh}=(0,eR.useOpenInteractionType)(K);U.useSyncedValues({disabled:g,highlightItemOnHover:k,modal:void 0===X.type?v:void 0,openMethod:ec,rootId:A}),(0,eN.useImplicitActiveTrigger)(U);let{forceUnmount:eb,transitionStatus:ew}=(0,eN.useOpenStateTransitions)(K,U,()=>{U.set("allowMouseEnter",!1)},F),eC=(0,en.useAnimationsFinished)(U.context.popupRef);t.useEffect(()=>{if(void 0===z)return;let e=()=>{U.state.instantType===z&&U.set("instantType",void 0)};if(!K)return void e();if(void 0!==ew)return;if(null==U.context.popupRef.current)return void e();let t=new AbortController;return eC(e,t.signal),()=>{t.abort()}},[z,K,ew,eC,U]),(0,q.useIsoLayoutEffect)(()=>{T&&!I?U.update({parent:{type:"context-menu",context:T},floatingNodeId:_,floatingParentNodeId:D}):I&&U.update({floatingNodeId:_,floatingParentNodeId:D})},[T,I,_,D,U]),t.useEffect(()=>{if(K||(es.current=null),"context-menu"===X.type){if(!K){eo.clear(),ei.current=!1;return}eo.start(500,()=>{ei.current=!0})}},[eo,K,X.type]),(0,q.useIsoLayoutEffect)(()=>{K||G||U.set("hoverEnabled",!0)},[K,G,U]);let eM=(0,ea.useStableCallback)((e,t)=>{let n=t.reason;if(!e&&!U.select("open")||K===e&&t.trigger===H&&W===n)return;let r=(0,eN.attachPreventUnmountOnClose)(t);if(e||null!=t.trigger||(t.trigger=H??void 0),d?.(e,t),t.isCanceled)return;U.state.floatingRootContext.dispatchOpenChange(e,t);let s=t.event;if(!1===e&&s?.type==="click"&&"touch"===s.pointerType&&!eu.current)return;e&&n===p.REASONS.triggerFocus?(eu.current=!1,el.start(300,()=>{eu.current=!0})):(eu.current=!0,el.clear());let i=(n===p.REASONS.triggerPress||n===p.REASONS.itemPress)&&0===s.detail,a=!e&&(n===p.REASONS.escapeKey||null==n);es.current=t.event;let o=(0,eN.createPopupOpenState)(U.state,e,t.trigger,r());o.openChangeReason=n,"menubar"===X.type&&(n===p.REASONS.triggerFocus||n===p.REASONS.focusOut||n===p.REASONS.triggerHover||n===p.REASONS.listNavigation||n===p.REASONS.siblingOpen)?o.instantType="group":i||a?o.instantType=i?"click":"dismiss":o.instantType=void 0,U.update(o)}),ek=(0,ex.useSyncedFloatingRootContext)({popupStore:U,floatingRootContext:U.state.floatingRootContext,floatingId:L,nested:null!=D,onOpenChange:eM}),eT=ek.context.events;(0,q.useIsoLayoutEffect)(()=>{let e=({open:e,eventDetails:t})=>eM(e,t);return eT.on("setOpen",e),()=>{eT?.off("setOpen",e)}},[eT,eM]);let eE=t.useCallback(()=>{U.setOpen(!1,(0,E.createChangeEventDetails)(p.REASONS.imperativeAction))},[U]);t.useImperativeHandle(S,()=>({unmount:eb,close:eE}),[eb,eE]),"context-menu"===X.type&&(o=X.context),t.useImperativeHandle(o?.positionerRef,()=>V,[V]),t.useImperativeHandle(o?.actionsRef,()=>({setOpen:eM}),[eM]);let eI=(0,em.useDismiss)(ek,{enabled:!$,bubbles:{escapeKey:R&&"menu"===X.type},outsidePress:()=>"context-menu"!==X.type||es.current?.type==="contextmenu"||ei.current,externalTree:ed?B:void 0}),eO=(0,eS.useDirection)(),eP=t.useCallback(e=>{U.select("activeIndex")!==e&&U.set("activeIndex",e)},[U]),eL=(0,eg.useListNavigation)(ek,{enabled:!$,listRef:U.context.itemDomElements,activeIndex:Z,nested:void 0!==X.type,loopFocus:x,orientation:y,parentOrientation:"menubar"===X.type?X.context.orientation:void 0,rtl:"rtl"===eO,disabledIndices:m.EMPTY_ARRAY,onNavigate:eP,openOnArrowKeyDown:"context-menu"!==X.type,externalTree:ed?B:void 0,focusItemOnHover:k}),eq=t.useCallback(e=>{U.context.typingRef.current=e},[U]),eD=(0,ev.useTypeahead)(ek,{enabled:!$,listRef:U.context.itemLabels,elementsRef:U.context.itemDomElements,activeIndex:Z,resetMs:et.TYPEAHEAD_RESET_MS,onMatch:e=>{K&&e!==Z&&U.set("activeIndex",e)},onTyping:eq}),eQ=t.useMemo(()=>{let e=(0,b.mergeProps)(eD.reference,eL.reference,eI.reference,{onMouseMove(){U.set("allowMouseEnter",!0)}},eh);return e["aria-haspopup"]="menu",e["aria-expanded"]=K,e},[U,eD.reference,eL.reference,eI.reference,eh,K]),eF=t.useMemo(()=>{let e=(0,b.mergeProps)(eL.trigger,eI.trigger,eh);return e["aria-haspopup"]="menu",e["aria-expanded"]=!1,e},[eL.trigger,eI.trigger,eh]);(0,ef.useRefWithInit)(()=>(U.update({inactiveTriggerProps:eF}),null));let ez=t.useMemo(()=>(0,b.mergeProps)(eN.FOCUSABLE_POPUP_PROPS,{id:L,role:"menu","aria-orientation":"horizontal"===y?"horizontal":void 0,"aria-labelledby":H?.id,onMouseMove(){U.set("allowMouseEnter",!0),"menu"===X.type&&U.set("hoverEnabled",!1)},onClick(){U.select("hoverEnabled")&&U.set("hoverEnabled",!1)},onKeyDown(e){let t=U.select("keyboardEventRelay");t&&!e.isPropagationStopped()&&t(e)}},eD.floating,eL.floating,eI.floating),[H,L,y,X.type,U,eD.floating,eL.floating,eI.floating]),eU=eL.item??m.EMPTY_OBJECT;(0,eN.usePopupInteractionProps)(U,{floatingRootContext:ek,activeTriggerProps:eQ,inactiveTriggerProps:eF,popupProps:ez,itemProps:eU});let eB=t.useMemo(()=>({store:U,parent:P}),[U,P]),e_=(0,j.jsxs)(i.Provider,{value:eB,children:[w&&(0,j.jsx)(eN.PopupHandleAttachment,{handle:w,store:U}),"function"==typeof u?u({payload:ee}):u]});return void 0===X.type||"context-menu"===X.type?(0,j.jsx)(J.FloatingTree,{externalTree:B,children:e_}):e_});e.s(["MenuRoot",0,eL],63947),e.s(["MenuSubmenuRoot",0,function(e){let n=a().store,r=t.useMemo(()=>({parentMenu:n}),[n]);return(0,j.jsx)(eP.Provider,{value:r,children:(0,j.jsx)(eL,{...e})})}],77450)},63707,8619,28276,91772,e=>{"use strict";var t=e.i(56420);let n={name:"chevrons-up-down",size:24,node:[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]};n.node;let r=(0,t.default)(n);e.s(["ChevronsUpDown",0,r],63707);let s={name:"circle-user-round",size:24,node:[["path",{d:"M17.925 20.056a6 6 0 0 0-11.851.001",key:"z69sun"}],["circle",{cx:"12",cy:"11",r:"4",key:"1gt34v"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],aliases:["user-circle-2"]};s.node;let i=(0,t.default)(s);e.s(["CircleUserRound",0,i],8619);let a={name:"compass",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}]]};a.node;let o=(0,t.default)(a);e.s(["Compass",0,o],28276);let u={name:"laptop-minimal",size:24,node:[["rect",{width:"18",height:"12",x:"3",y:"4",rx:"2",ry:"2",key:"1qhy41"}],["line",{x1:"2",x2:"22",y1:"20",y2:"20",key:"ni3hll"}]],aliases:["laptop-2"]};u.node;let l=(0,t.default)(u);e.s(["LaptopMinimal",0,l],91772)},18964,e=>{"use strict";var t=e.i(56420);let n={name:"list-checks",size:24,node:[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]]};n.node;let r=(0,t.default)(n);e.s(["ListChecks",0,r],18964)},67784,e=>{"use strict";var t=e.i(56420);let n={name:"log-out",size:24,node:[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]};n.node;let r=(0,t.default)(n);e.s(["LogOut",0,r],67784)},46513,96699,35965,95014,e=>{"use strict";var t=e.i(56420);let n={name:"monitor",size:24,node:[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]};n.node;let r=(0,t.default)(n);e.s(["Monitor",0,r],46513);let s={name:"moon",size:24,node:[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]};s.node;let i=(0,t.default)(s);e.s(["Moon",0,i],96699);let a={name:"sun",size:24,node:[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]};a.node;let o=(0,t.default)(a);e.s(["Sun",0,o],35965);var u=e.i(49635);e.s(["THEME_LABELS",0,{light:"Light",dark:"Dark",system:"System"},"applyTheme",0,function(e){let t=document.documentElement;t.dataset.theme=e;let n="dark"===e||"system"===e&&window.matchMedia("(prefers-color-scheme: dark)").matches;t.classList.toggle("dark",n)},"sessionSince",0,function(e,t){let n=new Date(e.since),r=n.toDateString()===t.toDateString()?(0,u.clockTime)(n):(0,u.shortDateTime)(n);return`Device \xb7 ${e.device}, since ${r}`}],95014)},66794,e=>{"use strict";var t=e.i(56420);let n={name:"settings",size:24,node:[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};n.node;let r=(0,t.default)(n);e.s(["Settings",0,r],66794)},95187,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={callServer:function(){return i.callServer},createServerReference:function(){return o.createServerReference},findSourceMapURL:function(){return a.findSourceMapURL}};for(var s in r)Object.defineProperty(n,s,{enumerable:!0,get:r[s]});let i=e.r(32120),a=e.r(92245),o=e.r(35326)},57334,e=>{"use strict";var t=e.i(43476);e.i(61027);var n=e.i(82370),r=e.i(89554),s=e.i(85996),i=e.i(71714),a=e.i(81194),o=e.i(1545),u=e.i(91384),l=e.i(58307),d=e.i(64270),c=e.i(19712),p=e.i(82264),f=e.i(62050),h=e.i(82593),m=e.i(5953),g=e.i(63947),v=e.i(77450),x=e.i(33332),b=e.i(71645),y=e.i(39957),S=e.i(8868),R=e.i(96499),w=e.i(67865),C=e.i(46376),M=e.i(56789),k=e.i(50316),T=e.i(85689),E=e.i(46420),j=e.i(13082),I=e.i(72135),O=e.i(79248),N=e.i(84446),P=e.i(78921),A=e.i(79938),L=e.i(52245),q=e.i(40886),D=e.i(64042),Q=e.i(95530);function F(e){let{render:t,className:n,style:r,state:s=M.EMPTY_OBJECT,props:i=M.EMPTY_ARRAY,refs:a=M.EMPTY_ARRAY,metadata:o,stateAttributesMapping:u,tag:l="div",...d}=e,{compositeProps:c,compositeRef:p}=(0,Q.useCompositeItem)({metadata:o});return(0,L.useRenderElement)(l,e,{state:s,ref:[p,...a],props:[c,...i,d],stateAttributesMapping:u})}var z=e.i(38452),U=e.i(29315),B=e.i(59636),_=e.i(64111),K=e.i(46570),H=e.i(88015),V=e.i(56434),G=e.i(7447),$=e.i(38396),W=e.i(52535),Y=e.i(76782);let J=(0,R.fastComponentRef)(function(e,n){let r,{render:s,className:i,style:a,disabled:o=!1,nativeButton:u=!0,id:l,openOnHover:d,delay:c=100,closeDelay:p=0,handle:f,payload:h,...m}=e,g=(0,P.useMenuRootContext)(!0),v=(0,B.usePopupHandleStore)(f)??g?.store;if(!v)throw Error((0,x.default)(85));let R=(0,H.useBaseUiId)(l),Q=v.useState("isTriggerActive",R),J=v.useState("floatingRootContext"),X=v.useState("isOpenedByTrigger",R),Z=v.useState("triggerPopupId",R),ee=b.useRef(null),et=(r=(0,G.useMenubarContext)(!0),b.useMemo(()=>r?{type:"menubar",context:r}:{type:void 0},[r])),en=(0,z.useCompositeRootContext)(!0),er=(0,E.useFloatingTree)(),es=b.useMemo(()=>er??new O.FloatingTreeStore,[er]),ei=(0,E.useFloatingNodeId)(es),ea=(0,E.useFloatingParentNodeId)(),{registerTrigger:eo,isMountedByThisTrigger:eu}=(0,_.useTriggerDataForwarding)(R,ee,v,{payload:h,closeDelay:p,parent:et,floatingTreeRoot:es,floatingNodeId:ei,floatingParentNodeId:ea,keyboardEventRelay:en?.relayKeyboardEvent}),el="menubar"===et.type,ed=v.useState("disabled"),ec=o||ed||el&&et.context.disabled,{getButtonProps:ep,buttonRef:ef}=(0,q.useButton)({disabled:ec,native:u});b.useEffect(()=>{X||void 0!==et.type||(v.context.allowMouseUpTriggerRef.current=!1)},[v,X,et.type]);let eh=b.useRef(null),em=(0,y.useTimeout)(),eg=(0,w.useStableCallback)(e=>{if(!eh.current)return;em.clear(),v.context.allowMouseUpTriggerRef.current=!1;let t=e.target;(0,N.contains)(eh.current,t)||(0,N.contains)(v.select("positionerElement"),t)||t===eh.current||null!=t&&function e(t){return(0,U.isHTMLElement)(t)&&t.hasAttribute("data-rootownerid")?t.getAttribute("data-rootownerid"):(0,U.isLastTraversableNode)(t)?void 0:e((0,U.getParentNode)(t))}(t)===v.select("rootId")||(0,D.isMouseWithinBounds)(e,eh.current)||es.events.emit("close",{domEvent:e,reason:V.REASONS.cancelOpen})});b.useEffect(()=>{X&&v.select("lastOpenChangeReason")===V.REASONS.triggerHover&&(0,S.ownerDocument)(eh.current).addEventListener("mouseup",eg,{once:!0})},[X,eg,v]);let ev=el&&et.context.hasSubmenuOpen,ex=d??ev,eb=(0,I.useHoverReferenceInteraction)(J,{enabled:ex&&!ec&&(!el||ev&&!eu),handleClose:(0,k.safePolygon)({blockPointerEvents:!el}),mouseOnly:!0,move:!1,restMs:void 0===et.type?c:void 0,delay:{close:p},triggerElementRef:ee,externalTree:es,isActiveTrigger:Q,isClosing:()=>"ending"===v.select("transitionStatus")}),ey=function(e,t){let n=(0,y.useTimeout)(),[r,s]=b.useState(!1);return(0,C.useIsoLayoutEffect)(()=>{e&&t===V.REASONS.triggerHover?(s(!0),n.start($.PATIENT_CLICK_THRESHOLD,()=>{s(!1)})):e||(n.clear(),s(!1))},[e,t,n]),r}(X,v.select("lastOpenChangeReason")),eS=(0,T.useClick)(J,{enabled:!ec,event:X&&el?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:void 0===et.type&&ey}),eR=(0,j.useFocus)(J,{enabled:!ec&&ev}),ew=function(e){let{enabled:t=!0,mouseDownAction:n,open:r}=e,s=b.useRef(!1);return b.useMemo(()=>t?{onMouseDown:e=>{("open"===n&&!r||"close"===n&&r)&&(s.current=!0,(0,S.ownerDocument)(e.currentTarget).addEventListener("click",()=>{s.current=!1},{once:!0}))},onClick:e=>{s.current&&(s.current=!1,e.preventBaseUIHandler())}}:M.EMPTY_OBJECT,[t,n,r])}({open:X,enabled:el,mouseDownAction:"open"}),eC=b.useMemo(()=>(0,Y.mergeProps)(eR.reference,eS.reference),[eR.reference,eS.reference]),eM=v.useState("triggerProps",eu),{preFocusGuardRef:ek,handlePreFocusGuardFocus:eT,handleFocusTargetFocus:eE}=(0,K.useTriggerFocusGuards)(v,ee),ej={disabled:ec,open:X},eI=[eh,n,ef,eo,ee],eO=[eC,eb??M.EMPTY_OBJECT,eM,{"aria-haspopup":"menu","aria-controls":Z,id:R,onMouseDown:e=>{v.select("open")||(em.start(200,()=>{v.context.allowMouseUpTriggerRef.current=!0}),(0,S.ownerDocument)(e.currentTarget).addEventListener("mouseup",eg,{once:!0}))}},el?{role:"menuitem"}:{},ew,m,ep],eN=(0,L.useRenderElement)("button",e,{enabled:!el,stateAttributesMapping:A.pressableTriggerOpenStateMapping,state:ej,ref:eI,props:eO});return el?(0,t.jsx)(F,{tag:"button",render:s,className:i,style:a,state:ej,refs:eI,props:eO,stateAttributesMapping:A.pressableTriggerOpenStateMapping}):X?(0,t.jsxs)(b.Fragment,{children:[(0,t.jsx)(W.FocusGuard,{ref:ek,onFocus:eT},`${R}-pre-focus-guard`),(0,t.jsx)(b.Fragment,{children:eN},R),(0,t.jsx)(W.FocusGuard,{ref:v.context.triggerFocusTargetRef,onFocus:eE},`${R}-post-focus-guard`)]}):(0,t.jsx)(b.Fragment,{children:eN},R)});var X=e.i(3414),Z=e.i(18390);let ee=b.forwardRef(function(e,t){let{render:n,className:r,style:s,children:i,...a}=e,{store:o}=(0,P.useMenuRootContext)(),{side:u}=(0,X.useMenuPositionerContext)(),l=o.useState("instantType"),{children:d,state:c}=(0,Z.usePopupViewport)({store:o,side:u,children:i}),p={activationDirection:c.activationDirection,transitioning:c.transitioning,instant:l};return(0,L.useRenderElement)("div",e,{state:p,ref:t,props:[a,{children:d}],stateAttributesMapping:Z.popupViewportStateMapping})}),et=b.forwardRef(function(e,t){let{className:n,render:r,orientation:s="horizontal",style:i,...a}=e;return(0,L.useRenderElement)("div",e,{state:{orientation:s},ref:t,props:[{role:"separator","aria-orientation":s},a]})});var en=e.i(28744),er=e.i(73553),es=e.i(66506),ei=e.i(74671);let ea={"aria-expanded":void 0},eo=b.forwardRef(function(e,t){let{render:n,className:r,style:s,label:i,id:a,nativeButton:o=!1,openOnHover:u=!0,delay:l=100,closeDelay:d=0,disabled:c=!1,...p}=e,f=(0,ei.useMenuSubmenuRootContext)();if(!f?.parentMenu)throw Error((0,x.default)(37));let h=(0,er.useCompositeListItem)({guess:!0,label:i}),m=(0,X.useMenuPositionerContext)(),{store:g}=(0,P.useMenuRootContext)(),v=(0,H.useBaseUiId)(a),y=g.useState("open"),S=g.useState("floatingRootContext"),R=g.useState("floatingTreeRoot"),E=g.useState("triggerPopupId",v),j=(0,_.useTriggerRegistration)(v,g),O=(0,w.useStableCallback)(e=>{j(e),null!==e&&g.select("open")&&null==g.select("activeTriggerId")&&g.update({activeTriggerId:v??null,activeTriggerElement:e,closeDelay:d})}),N=b.useRef(null),q=b.useCallback(e=>{N.current=e,g.set("activeTriggerElement",e)},[g]);(0,C.useIsoLayoutEffect)(()=>(O(N.current),()=>O(null)),[O,v,g]),g.useSyncedValue("closeDelay",d);let D=f.parentMenu,Q=g.useState("disabled"),F=D.useState("disabled"),z=c||Q||F,U=D.useState("itemProps"),B=D.useState("isActive",h.index),K=b.useMemo(()=>({type:"submenu-trigger",setActive(){D.select("highlightItemOnHover")&&D.set("activeIndex",h.index)}}),[D,h.index]),{getItemProps:G,itemRef:$}=(0,es.useMenuItem)({closeOnClick:!1,disabled:z,highlighted:B,id:v,store:g,typingRef:D.context.typingRef,nativeButton:o,itemMetadata:K,nodeId:m?.context.nodeId}),W=g.useState("hoverEnabled"),Y=(0,I.useHoverReferenceInteraction)(S,{enabled:W&&u&&!z,handleClose:(0,k.safePolygon)({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:l,delay:{open:l,close:d},shouldOpen:l>0?()=>D.select("allowMouseEnter"):void 0,triggerElementRef:N,externalTree:R,isClosing:()=>"ending"===g.select("transitionStatus"),guardStaleOpen:!0}),J=(0,T.useClick)(S,{enabled:!z,event:"mousedown",toggle:!u,ignoreMouse:u,stickIfOpen:!1}).reference??M.EMPTY_OBJECT,Z=g.useState("triggerProps",!0);delete Z.id;let ee=g.useState("openMethod"),et=g.useState("lastOpenChangeReason")===V.REASONS.listNavigation||"keyboard"===ee,eo=y&&et&&en.platform.screenReader.voiceOver;return(0,L.useRenderElement)("div",e,{state:{disabled:z,highlighted:B,open:y},stateAttributesMapping:A.triggerOpenStateMapping,props:[J,Y,Z,U,eo?ea:void 0,{"aria-controls":E,tabIndex:y||B?0:-1,onBlur(){B&&D.set("activeIndex",null)}},p,G],ref:[t,h.ref,$,O,q]})});var eu=e.i(36481),el=e.i(64170);class ed extends el.BasePopupHandle{constructor(){super((0,eu.createNullMenuStore)(),"Menu")}open(e){this.openByTrigger(e)}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select("open")??!1}}e.s(["Arrow",()=>n.MenuArrow,"Backdrop",()=>r.MenuBackdrop,"CheckboxItem",()=>s.MenuCheckboxItem,"CheckboxItemIndicator",()=>i.MenuCheckboxItemIndicator,"Group",()=>a.MenuGroup,"GroupLabel",()=>o.MenuGroupLabel,"Handle",0,ed,"Item",()=>u.MenuItem,"LinkItem",()=>l.MenuLinkItem,"Popup",()=>d.MenuPopup,"Portal",()=>c.MenuPortal,"Positioner",()=>p.MenuPositioner,"RadioGroup",()=>f.MenuRadioGroup,"RadioItem",()=>h.MenuRadioItem,"RadioItemIndicator",()=>m.MenuRadioItemIndicator,"Root",()=>g.MenuRoot,"Separator",0,et,"SubmenuRoot",()=>v.MenuSubmenuRoot,"SubmenuTrigger",0,eo,"Trigger",0,J,"Viewport",0,ee,"createHandle",0,function(){return new ed}],60948);var ec=e.i(60948),ec=ec,ep=e.i(89664),ef=e.i(90063);e.s(["DropdownMenu",0,function(e){return(0,t.jsx)(ec.Root,{"data-slot":"dropdown-menu",...e})},"DropdownMenuContent",0,function({align:e="end",side:n="bottom",sideOffset:r=4,className:s,...i}){return(0,t.jsx)(ec.Portal,{children:(0,t.jsx)(ec.Positioner,{className:"isolate z-50 outline-none",align:e,side:n,sideOffset:r,children:(0,t.jsx)(ec.Popup,{"data-slot":"dropdown-menu-content",className:(0,ef.classNames)("max-h-(--available-height) min-w-48 origin-(--transform-origin) overflow-y-auto rounded-xl border border-border bg-popover p-1 text-popover-foreground shadow-lg duration-(--duration-fast) outline-none data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",s),...i})})})},"DropdownMenuGroup",0,function(e){return(0,t.jsx)(ec.Group,{"data-slot":"dropdown-menu-group",...e})},"DropdownMenuItem",0,function({className:e,variant:n="default",...r}){return(0,t.jsx)(ec.Item,{"data-slot":"dropdown-menu-item","data-variant":n,className:(0,ef.classNames)("relative flex h-8.5 items-center gap-2.5 rounded-sm px-2.5 text-body text-foreground outline-none select-none data-highlighted:bg-accent focus-visible:outline-2 focus-visible:outline-ring data-disabled:pointer-events-none data-disabled:opacity-45 data-[variant=destructive]:text-destructive-text [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-(--size-icon) [&_svg]:text-muted-foreground data-[variant=destructive]:[&_svg]:text-destructive-text",e),...r})},"DropdownMenuLabel",0,function({className:e,...n}){return(0,t.jsx)(ec.GroupLabel,{"data-slot":"dropdown-menu-label",className:(0,ef.classNames)("px-2.5 pt-1.5 pb-1 text-caption text-muted-foreground",e),...n})},"DropdownMenuRadioGroup",0,function(e){return(0,t.jsx)(ec.RadioGroup,{"data-slot":"dropdown-menu-radio-group",...e})},"DropdownMenuRadioItem",0,function({className:e,children:n,...r}){return(0,t.jsxs)(ec.RadioItem,{"data-slot":"dropdown-menu-radio-item",className:(0,ef.classNames)("relative flex h-8.5 items-center gap-2.5 rounded-sm px-2.5 text-body text-foreground outline-none select-none data-highlighted:bg-accent focus-visible:outline-2 focus-visible:outline-ring data-disabled:pointer-events-none data-disabled:opacity-45 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-(--size-icon) [&_svg]:text-muted-foreground",e),...r,children:[n,(0,t.jsx)(ec.RadioItemIndicator,{className:"ml-auto flex",children:(0,t.jsx)(ep.Check,{"aria-hidden":!0,className:"text-foreground"})})]})},"DropdownMenuSeparator",0,function({className:e,...n}){return(0,t.jsx)(ec.Separator,{"data-slot":"dropdown-menu-separator",className:(0,ef.classNames)("-mx-1 my-1 h-px bg-border",e),...n})},"DropdownMenuTrigger",0,function(e){return(0,t.jsx)(ec.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}],57334)},88393,e=>{"use strict";var t=e.i(43476),n=e.i(90063),r=e.i(19321);function s(e){return Array.from({length:e},(e,t)=>`row-${String(t)}`)}e.s(["LoadingSkeleton",0,function({variant:e,rows:i=4,label:a="Loading",className:o}){return(0,t.jsxs)("div",{role:"status","data-slot":"loading-skeleton","data-variant":e,className:(0,n.classNames)("w-full",o),children:[(0,t.jsx)("span",{className:"sr-only",children:a}),"table"===e?(0,t.jsxs)("div",{className:"overflow-hidden rounded-lg border border-border bg-card shadow-sm",children:[(0,t.jsx)("div",{className:"h-(--size-row-header) border-b border-border bg-muted"}),s(i).map(e=>(0,t.jsxs)("div",{className:"flex h-(--size-row) items-center gap-8 border-b border-border px-4 last:border-0",children:[(0,t.jsx)(r.Skeleton,{className:"h-2.5 w-24"}),(0,t.jsx)(r.Skeleton,{className:"h-5 w-16"}),(0,t.jsx)(r.Skeleton,{className:"h-5 w-20"}),(0,t.jsx)(r.Skeleton,{className:"h-2.5 w-28"})]},e))]}):null,"cards"===e?(0,t.jsx)("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:s(4).map(e=>(0,t.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-4",children:[(0,t.jsx)(r.Skeleton,{className:"h-2.5 w-20"}),(0,t.jsx)(r.Skeleton,{className:"h-6 w-10"}),(0,t.jsx)(r.Skeleton,{className:"h-2.5 w-28"})]},e))}):null,"detail"===e?(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsx)(r.Skeleton,{className:"h-7 w-48"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(r.Skeleton,{className:"h-5 w-20"}),(0,t.jsx)(r.Skeleton,{className:"h-5 w-16"})]}),(0,t.jsx)(r.Skeleton,{className:"h-16 w-full rounded-lg"})]}):null,"list"===e?(0,t.jsx)("div",{className:"overflow-hidden rounded-lg border border-border bg-card",children:s(i).map(e=>(0,t.jsxs)("div",{className:"flex flex-col gap-2.5 border-b border-border px-3.5 py-3 last:border-0",children:[(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)(r.Skeleton,{className:"h-3 w-28"}),(0,t.jsx)(r.Skeleton,{className:"h-5 w-16"})]}),(0,t.jsx)(r.Skeleton,{className:"h-2.5 w-44"})]},e))}):null]})}])},44824,17540,81384,73664,27001,54440,69230,66027,90262,5387,49092,2660,86165,48695,45608,77155,95475,2767,e=>{"use strict";let t;var n=e.i(43476),r=e.i(71645),s=e.i(70703);function i(e,t){let i=(0,s.default)(e,{ssr:!1});return function(e){let s=t(e),[a,o]=(0,r.useState)(s);return s&&!a&&o(!0),a||s?(0,n.jsx)(i,{...e}):null}}e.s(["lazyDialog",0,i],17540);var a=e.i(54616),o=e.i(12598),u=e.i(27702);let l=r.createContext(!1),d=()=>r.useContext(l);l.Provider,e.s(["useIsRestoring",0,d],81384);let c=r.createContext((t=!1,{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t})),p=()=>r.useContext(c);e.s(["useQueryErrorResetBoundary",0,p],73664);var f=e.i(19273);let h=(e,t,n)=>{let r=n?.state.error&&"function"==typeof e.throwOnError?(0,f.shouldThrowError)(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&!t.isReset()&&(e.retryOnMount=!1)},m=e=>{r.useEffect(()=>{e.clearReset()},[e])},g=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(s&&void 0===e.data||(0,f.shouldThrowError)(n,[e.error,r]));e.s(["ensurePreventErrorBoundaryRetry",0,h,"getHasError",0,g,"useClearResetErrorBoundary",0,m],27001);let v=e=>{if(e.suspense){let t=e=>"static"===e?e:Math.max(e??1e3,1e3),n=e.staleTime;e.staleTime="function"==typeof n?(...e)=>t(n(...e)):t(n),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,1e3))}},x=(e,t)=>e?.suspense&&t.isPending,b=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});e.s(["ensureSuspenseTimers",0,v,"fetchOptimistic",0,b,"shouldSuspend",0,x],54440);var y=e.i(40143),S=e.i(80166),R=e.i(73911),w=e.i(15823),C=e.i(75555),M=e.i(86491),k=class extends w.Subscribable{#e;#t=void 0;#n=void 0;#r=void 0;#s;#i;#a;#o;#u;#l;#d;#c;#p;#f=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#a=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#t.addObserver(this),T(this.#t,this.options)?this.#h():this.updateResult(),this.#m())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return E(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return E(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#g(),this.#v(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,f.resolveQueryValue)(this.options.enabled,this.#t))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#x(),this.#t.setOptions(this.options),t._defaulted&&!(0,f.shallowEqualObjects)(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});let r=this.hasListeners();r&&j(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||(0,f.resolveQueryValue)(this.options.enabled,this.#t)!==(0,f.resolveQueryValue)(t.enabled,this.#t)||(0,f.resolveQueryValue)(this.options.staleTime,this.#t)!==(0,f.resolveQueryValue)(t.staleTime,this.#t))&&this.#b();let s=this.#y();r&&(this.#t!==n||(0,f.resolveQueryValue)(this.options.enabled,this.#t)!==(0,f.resolveQueryValue)(t.enabled,this.#t)||s!==this.#p)&&this.#S(s)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return(0,f.shallowEqualObjects)(this.getCurrentResult(),n)||(this.#r=n,this.#i=this.options,this.#s=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#f.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t,n=this.#e.defaultQueryOptions(e),r=this.#e.getQueryCache().build(this.#e,n),s=()=>{},i=new Promise(e=>{t=e,s=this.#e.getQueryCache().subscribe(t=>{"updated"===t.type&&t.query.queryHash===r.queryHash&&void 0!==r.state.data&&(s(),e(this.createResult(r,n)))})});return Promise.race([r.fetch().then(()=>{let e=this.createResult(r,n);return t?.(e),e}).finally(()=>{s()}),i])}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#x();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(f.noop)),t}#R(e){return!(0,R.isServer)()&&!1!==(0,f.resolveQueryValue)(this.options.enabled,this.#t)&&(0,f.isValidTimeout)(e)}#b(){this.#g();let e=(0,f.resolveQueryValue)(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#R(e))return;let t=(0,f.timeUntilStale)(this.#r.dataUpdatedAt,e)+1;this.#d=S.timeoutManager.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#y(){return(0,f.resolveQueryValue)(this.options.refetchInterval,this.#t)??!1}#S(e){this.#v(),this.#p=e,0!==this.#p&&this.#R(this.#p)&&(this.#c=S.timeoutManager.setInterval(()=>{(this.options.refetchIntervalInBackground||C.focusManager.isFocused())&&this.#h()},this.#p))}#m(){this.#b(),this.#S(this.#y())}#g(){void 0!==this.#d&&(S.timeoutManager.clearTimeout(this.#d),this.#d=void 0)}#v(){void 0!==this.#c&&(S.timeoutManager.clearInterval(this.#c),this.#c=void 0)}createResult(e,t){let n,r=this.#t,s=this.options,i=this.#r,a=this.#s,o=this.#i,u=e!==r?e.state:this.#n,{state:l}=e,d={...l},c=!1;if(t._optimisticResults){let n=this.hasListeners(),i=!n&&T(e,t),a=n&&j(e,r,t,s);(i||a)&&(d={...d,...(0,M.fetchState)(l.data,e.options)}),"isRestoring"===t._optimisticResults&&(d.fetchStatus="idle")}let{error:p,errorUpdatedAt:h,status:m}=d;n=d.data;let g=!1;if(void 0!==t.placeholderData&&void 0===n&&"pending"===m){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,g=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,void 0!==e&&(m="success",n=(0,f.replaceData)(i?.data,e,t),c=!0)}if(t.select&&void 0!==n&&!g)if(i&&n===a?.data&&t.select===this.#o)n=this.#u;else try{this.#o=t.select,n=t.select(n),n=(0,f.replaceData)(i?.data,n,t),this.#u=n,this.#a=null}catch(e){this.#a=e}else void 0===n&&(this.#a=null);this.#a&&(p=this.#a,n=this.#u,h=Date.now(),m="error",c=!1);let v="fetching"===d.fetchStatus,x="pending"===m,b="error"===m,y=x&&v,S=void 0!==n;return{status:m,fetchStatus:d.fetchStatus,isPending:x,isSuccess:"success"===m,isError:b,isInitialLoading:y,isLoading:y,data:n,dataUpdatedAt:d.dataUpdatedAt,error:p,errorUpdatedAt:h,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:d.dataUpdateCount>u.dataUpdateCount||d.errorUpdateCount>u.errorUpdateCount,isFetching:v,isRefetching:v&&!x,isLoadingError:b&&!S,isPaused:"paused"===d.fetchStatus,isPlaceholderData:c,isRefetchError:b&&S,isStale:I(e,t),refetch:this.refetch,isEnabled:!1!==(0,f.resolveQueryValue)(t.enabled,e)}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#s=this.#t.state,this.#i=this.options,void 0!==this.#s.data&&(this.#l=this.#t),(0,f.shallowEqualObjects)(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n="function"==typeof t?t():t;if("all"===n||!n&&!this.#f.size)return!0;let r=new Set(n??this.#f);return this.options.throwOnError&&r.add("error"),Object.keys(this.#r).some(t=>this.#r[t]!==e[t]&&r.has(t))})();y.notifyManager.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}#x(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#m()}};function T(e,t){return!1!==(0,f.resolveQueryValue)(t.enabled,e)&&void 0===e.state.data&&("error"!==e.state.status||!1!==(0,f.resolveQueryValue)(t.retryOnMount,e))||void 0!==e.state.data&&E(e,t,t.refetchOnMount)}function E(e,t,n){if(!1!==(0,f.resolveQueryValue)(t.enabled,e)&&"static"!==(0,f.resolveQueryValue)(t.staleTime,e)){let r=(0,f.resolveQueryValue)(n,e);return"always"===r||!1!==r&&I(e,t)}return!1}function j(e,t,n,r){return(e!==t||!1===(0,f.resolveQueryValue)(r.enabled,e))&&(!n.suspense||"error"!==e.state.status)&&I(e,n)}function I(e,t){return!1!==(0,f.resolveQueryValue)(t.enabled,e)&&e.isStaleByTime((0,f.resolveQueryValue)(t.staleTime,e))}function O(e,t){return function(e,t,n){let s=d(),i=p(),a=(0,o.useQueryClient)(n),u=a.defaultQueryOptions(e),l=a.getQueryCache().get(u.queryHash),c=!1!==e.subscribed;u._optimisticResults=s?"isRestoring":c?"optimistic":void 0,v(u),h(u,i,l),m(i);let[S]=r.useState(()=>new t(a,u)),R=S.getOptimisticResult(u),w=!s&&c;if(r.useSyncExternalStore(r.useCallback(e=>{let t=w?S.subscribe(y.notifyManager.batchCalls(e)):f.noop;return S.updateResult(),t},[S,w]),()=>S.getCurrentResult(),()=>S.getCurrentResult()),r.useEffect(()=>{S.setOptions(u)},[u,S]),x(u,R))throw b(u,S,i);if(g({result:R,errorResetBoundary:i,throwOnError:u.throwOnError,query:l,suspense:u.suspense}))throw R.error;return u.notifyOnChangeProps?R:S.trackResult(R)}(e,k,t)}e.s(["QueryObserver",0,k],69230),e.s(["useQuery",0,O],66027);let N={canManage:!1,canSend:!1,canReceive:!1,canDefineLabels:!1,canAssignLabels:!1,isViewer:!1};function P(){return function(e){return void 0===e?N:{canManage:e.scopes.includes("fleet:manage"),canSend:e.scopes.includes("messages:send"),canReceive:e.scopes.includes("messages:receive"),canDefineLabels:e.scopes.includes("labels:define"),canAssignLabels:e.scopes.includes("labels:assign"),isViewer:"viewer"===e.kind}}(O((0,u.useTRPC)().console.session.queryOptions()).data)}e.s(["useAccess",0,P],90262);var A=e.i(32150),L=e.i(80581);function q(){return O((0,u.useTRPC)().fleet.list.queryOptions(void 0,{refetchInterval:3e4}))}function D(){return O((0,u.useTRPC)().fleet.labels.queryOptions())}function Q(){let e=(0,u.useTRPC)(),t=(0,o.useQueryClient)();return()=>t.invalidateQueries({queryKey:e.fleet.pathKey()})}e.s(["LAST_SEEN_REFRESH_MS",0,3e4,"useAssignLabel",0,function(){let e=(0,u.useTRPC)(),t=Q();return(0,a.useMutation)(e.fleet.assignLabel.mutationOptions({onSuccess:t}))},"useChangeLabelValues",0,function(){let e=(0,u.useTRPC)(),t=Q();return(0,a.useMutation)(e.fleet.changeLabelValues.mutationOptions({onSuccess:t}))},"useCommissionShip",0,function(){let e=(0,u.useTRPC)(),t=Q(),{track:n}=(0,A.useAnalytics)();return(0,a.useMutation)(e.fleet.commission.mutationOptions({onSuccess:async()=>{n({name:"ship_commissioned"}),await t()}}))},"useDefineLabel",0,function(){let e=(0,u.useTRPC)(),t=Q();return(0,a.useMutation)(e.fleet.defineLabel.mutationOptions({onSuccess:t}))},"useDeleteLabel",0,function(){let e=(0,u.useTRPC)(),t=Q();return(0,a.useMutation)(e.fleet.deleteLabel.mutationOptions({onSuccess:t}))},"useFleetLabels",0,D,"useFleetSnapshot",0,q,"useGetStartingPrompt",0,function(){let e=(0,u.useTRPC)(),t=Q();return(0,a.useMutation)(e.fleet.getStartingPrompt.mutationOptions({onSuccess:t}))},"useLabelContext",0,function(){let e=D(),t=q(),n=P();if(void 0!==e.data&&void 0!==t.data)return(0,L.labelContextOf)(e.data,{ships:t.data,isOperator:!n.isViewer})},"usePingShip",0,function(){let e=(0,u.useTRPC)(),t=Q();return(0,a.useMutation)(e.fleet.ping.mutationOptions({onSuccess:t}))},"useRecrewShip",0,function(){let e=(0,u.useTRPC)(),t=Q();return(0,a.useMutation)(e.fleet.recrew.mutationOptions({onSuccess:t}))},"useReleaseShip",0,function(){let e=(0,u.useTRPC)(),t=Q();return(0,a.useMutation)(e.fleet.release.mutationOptions({onSuccess:t}))},"useRemoveCrewRequest",0,function(){let e=(0,u.useTRPC)(),t=Q();return(0,a.useMutation)(e.fleet.removeCrewRequest.mutationOptions({onSuccess:t}))},"useRenameShip",0,function(){let e=(0,u.useTRPC)(),t=Q();return(0,a.useMutation)(e.fleet.rename.mutationOptions({onSuccess:t}))},"useRequestCrew",0,function(){let e=(0,u.useTRPC)(),t=Q();return(0,a.useMutation)(e.fleet.crewRequest.mutationOptions({onSuccess:t}))},"useRetireShip",0,function(){let e=(0,u.useTRPC)(),t=Q();return(0,a.useMutation)(e.fleet.retire.mutationOptions({onSuccess:t}))},"useUnassignLabel",0,function(){let e=(0,u.useTRPC)(),t=Q();return(0,a.useMutation)(e.fleet.unassignLabel.mutationOptions({onSuccess:t}))}],5387);var F=e.i(41880);function z(){return O((0,u.useTRPC)().fleet.limits.queryOptions(void 0,{refetchInterval:6e4}))}e.s(["useFleetLimits",0,z],49092);var U=e.i(87600),B=e.i(16752);let _=i(()=>e.A(46207).then(e=>e.ComposeDialog),e=>e.isOpen);e.s(["ComposeMessage",0,function({isOpen:e,onOpenChange:t,replyTo:s,toShipId:i}){let l,d,c,p=q(),f=(l=(0,u.useTRPC)(),d=(0,o.useQueryClient)(),(0,a.useMutation)(l.ship.send.mutationOptions({onSuccess:()=>d.invalidateQueries({queryKey:l.fleet.pathKey()})}))),h=z(),m=(0,U.useHostedAccountUrl)(),[g,v]=(0,r.useState)(()=>crypto.randomUUID()),{ships:x,types:b}={ships:c=(p.data??[]).filter(e=>"agent"===e.kind&&"retired"!==e.status),types:[...new Set(c.map(e=>e.type))].sort()};return(0,n.jsx)(_,{isOpen:e,onOpenChange:e=>{e||f.reset(),t(e)},ships:x,types:b,state:f.isPending?"sending":f.isError?"failed":"editing",error:f.error?.message,messageLimit:f.isError?(0,B.messageLimitReached)(h.data):void 0,accountUrl:m,draft:s?{selector:{kind:"ship",shipId:s.sender.id},payload:""}:i&&{selector:{kind:"ship",shipId:i},payload:""},onSend:e=>{f.mutate(function(e,t){let{selector:n,payload:r,inReplyTo:s}=e;return{selector:n,payload:r,contentType:"text/plain",idempotencyKey:t,...void 0===s?{}:{inReplyTo:s}}}({...e,inReplyTo:s?.messageId},g),{onSuccess:()=>{v(crypto.randomUUID()),f.reset(),t(!1),(0,F.showToast)({title:"Message sent",description:"It waits in the inbox until a ship receives it.",tone:"success"})},onError:()=>{h.refetch()}})}})}],44824);var K=e.i(18566),H=e.i(76145);function V(e){if("refused"===e.kind)throw Error(e.message);return e.data}e.s(["dataOf",0,V],2660);var G=e.i(95187);let $=(0,G.createServerReference)("00fe649ae957656832195a9f55f8decbeeeb8cc094",G.callServer,void 0,G.findSourceMapURL,"connectSquadrons"),W=(0,G.createServerReference)("00380680ed4276fbf11117c7e675aed9f68973993d",G.callServer,void 0,G.findSourceMapURL,"readSquadronsConnection"),Y=["squadrons","connection"];function J(){return O({queryKey:Y,queryFn:async()=>V(await W())})}function X(){let e=J();return void 0!==e.data&&"none"!==e.data.state}function Z(){let e=J();return void 0===e.data?e.isError?"not-connected":"unknown":e.data.state}e.s(["useConnectSquadrons",0,function(){let e=(0,o.useQueryClient)();return(0,a.useMutation)({mutationFn:async()=>V(await $()),onSuccess:t=>{e.setQueryData(Y,t)}})},"useHasSquadrons",0,X,"useSquadronsConnection",0,Z,"useSquadronsSettings",0,J],86165);let ee=(0,G.createServerReference)("40f9297145fcbb4fc0106e40ba96c9688b7e91e1df",G.callServer,void 0,G.findSourceMapURL,"addMember"),et=(0,G.createServerReference)("40180d1d32a1167a83e5581feaaff329b2bdf7e12d",G.callServer,void 0,G.findSourceMapURL,"addRepository"),en=(0,G.createServerReference)("40a2a5eeeba0f16a50819126c47825bf9423c91ff7",G.callServer,void 0,G.findSourceMapURL,"forceStandDown"),er=(0,G.createServerReference)("40aa0992091af3d896da7c798f0e48939a2953e379",G.callServer,void 0,G.findSourceMapURL,"formSquadron"),es=(0,G.createServerReference)("00292700e5eb870894e0024f495318c49b752f7457",G.callServer,void 0,G.findSourceMapURL,"listRepositories"),ei=(0,G.createServerReference)("0089fb83e561503f97c3840da0526e13b05313fcf4",G.callServer,void 0,G.findSourceMapURL,"listSquadrons"),ea=(0,G.createServerReference)("408f2f4322614fd8fd446ddfd00c55c073aa5dc5f3",G.callServer,void 0,G.findSourceMapURL,"newCrewLine"),eo=(0,G.createServerReference)("40d0e3d2378960fcdf95f9e3214834c998e358e23b",G.callServer,void 0,G.findSourceMapURL,"readBlueprintCrew"),eu=(0,G.createServerReference)("003cd7815c2b076be66f1b401636fec07a4941487e",G.callServer,void 0,G.findSourceMapURL,"readCatalogue"),el=(0,G.createServerReference)("407c2c28ea850fe8fc2c4a20868121fe475e4c44bb",G.callServer,void 0,G.findSourceMapURL,"readKeptMessages"),ed=(0,G.createServerReference)("007ac581e8a90380911d61bf37bbbb4d34d48eea60",G.callServer,void 0,G.findSourceMapURL,"refreshCatalogue"),ec=(0,G.createServerReference)("401adac3510ac8b97ff96d8f7c6d0892940661ec4d",G.callServer,void 0,G.findSourceMapURL,"removeMember"),ep=(0,G.createServerReference)("40f92570d15be80207c5c805e8928396e1ef4bdd74",G.callServer,void 0,G.findSourceMapURL,"removeRepository"),ef=(0,G.createServerReference)("403bd90c677ae336fcdc8b54b609f940d62a8d94a7",G.callServer,void 0,G.findSourceMapURL,"standDown"),eh=["squadrons","list"];function em(){return O({queryKey:eh,queryFn:async()=>V(await ei()),refetchInterval:5e3,enabled:"connected"===Z()})}function eg(){return O({queryKey:["squadrons","catalogue"],queryFn:async()=>V(await eu()),enabled:"connected"===Z()})}function ev(e){return["squadrons","crew-lines",e]}let ex=["squadrons","repositories"];function eb(){let e=(0,o.useQueryClient)();return async()=>{await Promise.all([e.invalidateQueries({queryKey:ex}),e.invalidateQueries({queryKey:["squadrons","catalogue"]})])}}e.s(["useAddMember",0,function(){let e=(0,o.useQueryClient)();return(0,a.useMutation)({mutationFn:async e=>V(await ee(e)),onSuccess:async()=>{await e.invalidateQueries({queryKey:eh})}})},"useAddRepository",0,function(){let e=eb();return(0,a.useMutation)({mutationFn:async e=>V(await et(e)),onSettled:e})},"useBlueprintCrew",0,function(e){return O({queryKey:["squadrons","blueprint-crew",e],queryFn:async()=>void 0===e?[]:V(await eo(e)),enabled:"connected"===Z()&&void 0!==e})},"useCatalogue",0,eg,"useForceStandDown",0,function(){let e=(0,o.useQueryClient)();return(0,a.useMutation)({mutationFn:async e=>V(await en(e)),onSuccess:async()=>{await e.invalidateQueries({queryKey:eh})}})},"useFormSquadron",0,function(){let e=(0,o.useQueryClient)(),{track:t}=(0,A.useAnalytics)();return(0,a.useMutation)({mutationFn:async({blueprint:e,members:t})=>V(await er({blueprint:e,...void 0===t?{}:{members:t}})),onSuccess:async n=>{t({name:"squadron_formed",roleCount:new Set(n.members.map(e=>e.role)).size}),e.setQueryData(ev(n.squadronId),n.members),await e.invalidateQueries({queryKey:eh})}})},"useIssuedCrewLines",0,function(e){return new Map(((0,o.useQueryClient)().getQueryData(ev(e))??[]).map(e=>[e.shipId,{crewLines:e.crewLines,launchNote:e.launchNote,model:e.model}]))},"useKeptMessages",0,function(e){return O({queryKey:["squadrons","messages",e],queryFn:async()=>V(await el(e)),refetchInterval:5e3,enabled:"connected"===Z()})},"useNewCrewLine",0,function(){let e=(0,o.useQueryClient)();return(0,a.useMutation)({mutationFn:async e=>V(await ea(e)),onSuccess:async()=>{await e.invalidateQueries({queryKey:eh})}})},"useRefreshCatalogue",0,function(){let e=eb();return(0,a.useMutation)({mutationFn:async()=>V(await ed()),onSuccess:e})},"useRemoveMember",0,function(){let e=(0,o.useQueryClient)();return(0,a.useMutation)({mutationFn:async e=>V(await ec(e)),onSuccess:async()=>{await e.invalidateQueries({queryKey:eh})}})},"useRemoveRepository",0,function(){let e=eb();return(0,a.useMutation)({mutationFn:async e=>V(await ep(e)),onSettled:e})},"useRepositories",0,function(){return O({queryKey:ex,queryFn:async()=>V(await es()),enabled:"connected"===Z()})},"useSquadrons",0,em,"useStandDown",0,function(){let e=(0,o.useQueryClient)();return(0,a.useMutation)({mutationFn:async e=>V(await ef(e)),onSuccess:async()=>{await e.invalidateQueries({queryKey:eh})}})}],48695);var ey=e.i(84294);let eS=i(()=>e.A(10393).then(e=>e.CommandPalette),e=>e.isOpen);function eR(e){return e.split(/[?#]/)[0]??e}function ew(e){let t=new MutationObserver(e);return t.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class","hidden","style"]}),window.addEventListener("resize",e),()=>{t.disconnect(),window.removeEventListener("resize",e)}}function eC(e){let t=(0,K.usePathname)(),n=e?void 0!==e.anchor&&eR(e.path)===t?`[data-testid="${e.anchor}"]`:void 0:void 0;return(0,r.useSyncExternalStore)(ew,()=>void 0===n?null:[...document.querySelectorAll(n)].find(e=>e.getClientRects().length>0)??null,()=>null)}function eM(e){let{track:t}=(0,A.useAnalytics)(),n=(0,r.useRef)(!1),s=void 0!==e,i=e?.index===0;(0,r.useEffect)(()=>{s&&!n.current&&i&&t({name:"tour_started"}),n.current=s},[s,i,t])}function ek(){let e=(0,u.useTRPC)(),t=(0,K.useRouter)(),n=(0,K.usePathname)(),r=(0,o.useQueryClient)(),s=O(e.console.guide.queryOptions()),i=e.console.guide.queryKey(),l=(0,a.useMutation)(e.console.recordGuideProgress.mutationOptions({onMutate:e=>{r.setQueryData(i,t=>t?{...t,progress:e}:t)},onError:()=>{(0,F.showToast)({title:"Couldn’t keep your place in the tour",description:"The server did not answer. Try again.",tone:"error"})},onSettled:()=>r.invalidateQueries({queryKey:i})})),{track:d}=(0,A.useAnalytics)(),c=s.data?.steps??[],p=s.data?.progress.step??0,f=function(e){if(e?.progress.state!=="open")return;let t=e.steps[e.progress.step];return void 0===t?void 0:{step:t,index:e.progress.step,total:e.steps.length}}(s.data??void 0),h=e=>{l.mutate(e);let r=c[e.step];"open"===e.state&&void 0!==r&&eR(r.path)!==n&&t.push(r.path)},m=e=>{h({step:e,state:"open"}),d({name:"tour_step_reached",step:e+1,total:c.length})};return{view:f,onBack:()=>{m(Math.max(p-1,0))},onNext:()=>{m(Math.min(p+1,c.length-1))},onSkip:()=>{h({step:p,state:"skipped"}),d({name:"tour_skipped",step:p+1})},onFinish:()=>{h({step:p,state:"finished"}),d({name:"tour_finished"})},onTakeTour:0===c.length?void 0:()=>{h({step:0,state:"open"})}}}e.s(["ConsoleCommands",0,function({isOpen:e,onOpenChange:t,onCompose:s}){let i=(0,K.useRouter)(),a=q(),o=X(),u=em(),l=eg(),d=P();return(0,r.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&"k"===e.key.toLowerCase()&&(e.preventDefault(),t(!0))};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[t]),(0,n.jsx)(eS,{isOpen:e,onOpenChange:t,items:(0,H.allowedPaletteItems)((0,H.paletteItemsOf)(a.data??[],o?{squadrons:u.data??[],blueprints:(0,ey.blueprintChoices)(l.data??{blueprints:[]})}:void 0),d),onSelect:e=>{switch(e.kind){case"ship":case"page":case"squadron":case"squadron-action":case"blueprint":i.push(e.href);return;case"action":"compose"===e.id?s():"form-squadron"===e.id?i.push("/squadrons?form=new"):i.push("/?commission=new")}}})}],45608),e.s(["useConsoleGuide",0,ek,"useGuideAnchor",0,eC,"useTourStarted",0,eM],77155);var eT=e.i(15905),eE=e.i(6734);function ej({index:e,total:t,onBack:r,onNext:s,onSkip:i,onFinish:a,children:o}){let u=e===t-1;return(0,n.jsxs)("div",{className:"flex w-80 max-w-[calc(100vw-2rem)] flex-col gap-2 p-4",children:[(0,n.jsxs)("p",{className:"text-caption text-muted-foreground","data-testid":"tour-step-count",children:[e+1," of ",t]}),o,(0,n.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[u?null:(0,n.jsx)(eT.Button,{size:"sm",variant:"ghost","data-testid":"tour-step-skip",onClick:i,children:"Skip"}),(0,n.jsx)("span",{className:"grow"}),0===e?null:(0,n.jsx)(eT.Button,{size:"sm","data-testid":"tour-step-back",onClick:r,children:"Back"}),u?(0,n.jsx)(eT.Button,{size:"sm",variant:"primary","data-testid":"tour-step-finish",onClick:a,children:"Finish"}):(0,n.jsx)(eT.Button,{size:"sm",variant:"primary","data-testid":"tour-step-next",onClick:s,children:"Next"})]})]})}function eI(e){let{title:t,text:r,anchor:s}=e;return null===s?(0,n.jsx)("div",{role:"dialog","aria-labelledby":"tour-step-title","aria-describedby":"tour-step-text","data-testid":"tour-step","data-placement":"centred",className:"fixed top-1/2 left-1/2 z-50 -translate-1/2 rounded-xl border border-border bg-popover text-popover-foreground shadow-lg",children:(0,n.jsxs)(ej,{...e,children:[(0,n.jsx)("h2",{id:"tour-step-title",className:"text-body font-semibold text-foreground",children:t}),(0,n.jsx)("p",{id:"tour-step-text",className:"text-body text-muted-foreground",children:r})]})}):(0,n.jsx)(eE.Popover,{open:!0,modal:!1,children:(0,n.jsx)(eE.PopoverContent,{anchor:s,"data-testid":"tour-step","data-placement":"anchored",children:(0,n.jsxs)(ej,{...e,children:[(0,n.jsx)(eE.PopoverTitle,{className:"text-body font-semibold text-foreground",children:t}),(0,n.jsx)(eE.PopoverDescription,{className:"text-body text-muted-foreground",children:r})]})})})}e.s(["ConsoleGuide",0,function(){let{view:e,onBack:t,onNext:r,onSkip:s,onFinish:i}=ek(),a=eC(e?.step);return(eM(e),e)?(0,n.jsx)(eI,{title:e.step.title,text:e.step.text,index:e.index,total:e.total,anchor:a,onBack:t,onNext:r,onSkip:s,onFinish:i}):null}],95475);var eO=e.i(10818),eN=e.i(63676);function eP({notice:e,onDismiss:t,onSignOut:r}){return(0,n.jsxs)("div",{role:"status","data-testid":"notice","data-notice-id":e.id,className:"flex items-start gap-2 border-b border-border bg-muted px-8 py-2.5 max-sm:px-4",children:[(0,n.jsx)(eO.Info,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon) shrink-0 text-muted-foreground"}),(0,n.jsxs)("div",{className:"flex min-w-0 grow flex-wrap items-baseline gap-x-3 gap-y-1",children:[(0,n.jsx)("p",{className:"text-meta text-foreground",children:e.text}),e.links.map(e=>!0===e.isSignOut?(0,n.jsx)("button",{type:"button","data-testid":"notice-link",className:"text-meta font-medium text-foreground underline underline-offset-2",onClick:()=>r?.(e),children:e.label},e.label):(0,n.jsx)("a",{href:e.url,"data-testid":"notice-link",className:"text-meta font-medium text-foreground underline underline-offset-2",children:e.label},e.label))]}),e.isDismissible&&t?(0,n.jsx)(eT.Button,{variant:"ghost",size:"xs",isIconOnly:!0,"aria-label":"Dismiss","data-testid":"notice-dismiss",onClick:t,children:(0,n.jsx)(eN.X,{"aria-hidden":!0})}):null]})}e.s(["ConsoleNotices",0,function(){let e,t,r,s,i,l,{notices:d,onDismiss:c,onSignOut:p}=(e=(0,u.useTRPC)(),t=(0,K.useRouter)(),r=(0,o.useQueryClient)(),s=O(e.console.notices.queryOptions()),i=(0,a.useMutation)(e.console.dismissNotice.mutationOptions({onSuccess:()=>r.invalidateQueries({queryKey:e.console.notices.queryKey()}),onError:()=>{(0,F.showToast)({title:"Couldn’t dismiss the notice",description:"The server did not answer. Try again.",tone:"error"})}})),l=(0,a.useMutation)(e.console.signOut.mutationOptions({onError:()=>{(0,F.showToast)({title:"Couldn’t sign out",description:"The server did not answer. You are still signed in.",tone:"error"})}})),{notices:s.data??[],onDismiss:e=>{i.mutate({noticeId:e})},onSignOut:e=>{l.mutate(void 0,{onSuccess:()=>{r.clear();let n=e.url??"/sign-in";n.startsWith("/")?t.replace(n):window.location.assign(n)}})}});return 0===d.length?null:(0,n.jsx)("div",{"data-testid":"notices",children:d.map(e=>(0,n.jsx)(eP,{notice:e,onDismiss:()=>{c(e.id)},onSignOut:p},e.id))})}],2767)},77880,24262,83140,e=>{"use strict";var t=e.i(43476),n=e.i(67927),r=e.i(66595),s=e.i(19759),i=e.i(22016),a=e.i(15905),o=e.i(36651),u=e.i(90063);let l={live:{label:"Live",dot:"bg-tone-ok-fg"},reconnecting:{label:"Reconnecting",dot:"bg-tone-waiting-fg"},offline:{label:"Offline",dot:"bg-tone-attention-fg"}};function d({state:e,className:n}){let{label:r,dot:s}=l[e];return(0,t.jsxs)("span",{"data-slot":"live-status","data-state":e,"aria-live":"polite",className:(0,u.classNames)("inline-flex items-center gap-1.5 text-meta text-muted-foreground",n),children:[(0,t.jsx)("span",{"aria-hidden":!0,className:(0,u.classNames)("size-2 shrink-0 rounded-full",s)}),r]})}e.s(["LiveStatus",0,d],24262),e.s(["Header",0,function({breadcrumb:e,parents:u=[],live:l,onCompose:c,onSearch:p}){return(0,t.jsxs)("header",{"data-slot":"header",className:"sticky top-0 z-30 hidden h-(--size-header) shrink-0 items-center justify-between gap-4 border-b border-border bg-background px-6 sm:flex",children:[(0,t.jsx)("nav",{"aria-label":"Breadcrumb","data-testid":"header-breadcrumb",className:"min-w-0 text-body",children:(0,t.jsxs)("ol",{className:"flex min-w-0 items-center gap-1.5",children:[u.map(e=>(0,t.jsxs)("li",{className:"flex shrink-0 items-center gap-1.5",children:[(0,t.jsx)(i.default,{href:e.href,className:"text-muted-foreground hover:text-foreground hover:underline",children:e.label}),(0,t.jsx)(n.ChevronRight,{"aria-hidden":!0,className:"size-3.5 text-muted-foreground"})]},e.href)),(0,t.jsx)("li",{"aria-current":"page",className:"truncate font-medium text-foreground",children:e})]})}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(d,{state:l}),p?(0,t.jsxs)(a.Button,{size:"sm",icon:(0,t.jsx)(r.Search,{"aria-hidden":!0}),"data-testid":"header-search",className:"w-60 justify-start font-normal text-muted-foreground",onClick:p,children:[(0,t.jsx)("span",{className:"grow text-left",children:"Search ships or jump to"}),(0,t.jsx)(o.Kbd,{children:"⌘K"})]}):null,c?(0,t.jsx)(a.Button,{size:"sm",icon:(0,t.jsx)(s.SquarePen,{"aria-hidden":!0}),"data-testid":"header-compose",onClick:c,children:"Compose"}):null]})]})}],77880);var c=e.i(56420);let p={name:"code-xml",size:24,node:[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],aliases:["code-2"]};p.node;let f=(0,c.default)(p);e.s(["CodeXml",0,f],83140)},36779,15034,85538,e=>{"use strict";var t=e.i(43476),n=e.i(83140),r=e.i(44594),s=e.i(18964),i=e.i(66794),a=e.i(60011),o=e.i(49287),u=e.i(86875),l=e.i(66787),d=e.i(22016),c=e.i(94859),p=e.i(66390),f=e.i(31513),h=e.i(63707),m=e.i(8619),g=e.i(28276),v=e.i(91772),x=e.i(11568),b=e.i(67784),y=e.i(46513),S=e.i(96699),R=e.i(35965),w=e.i(71645),C=e.i(90063),M=e.i(95014),k=e.i(15905),T=e.i(57334),E=e.i(75305),j=e.i(60592);let I="Your account",O="Take the tour",N={light:R.Sun,dark:S.Moon,system:y.Monitor};function P(e){return e?.kind==="viewer"?{name:"viewer",detail:"Read-only"}:{name:"Operator",detail:e?.email??" "}}function A(e){return e?.kind!=="viewer"}function L(e,t){return t.find(t=>t===e)}function q({account:e,now:n}){let{name:r,detail:s}=P(e);return(0,t.jsxs)("div",{className:"flex flex-col gap-2 px-2.5 pt-2 pb-2.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,t.jsx)(c.Avatar,{kind:"account",size:28,name:r}),(0,t.jsxs)("span",{className:"flex min-w-0 flex-col",children:[(0,t.jsx)("span",{className:"truncate text-body font-medium text-foreground",children:r}),(0,t.jsx)("span",{"data-testid":"account-detail",className:"truncate text-caption text-muted-foreground",children:e?.kind==="viewer"?"Sees the whole fleet, changes nothing":s})]})]}),(0,t.jsxs)("p",{"data-testid":"account-session",className:"flex items-start gap-1.5 text-caption text-muted-foreground",children:[(0,t.jsx)(v.LaptopMinimal,{"aria-hidden":!0,className:"mt-px size-(--size-icon-sm) shrink-0"}),e?(0,t.jsxs)("span",{children:["This session: ",(0,t.jsx)("span",{className:"font-medium text-foreground",children:(0,M.sessionSince)(e.session,n)})]}):(0,t.jsx)("span",{children:"This session"})]})]})}function D({isSigningOut:e}){return e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(x.LoaderCircle,{"aria-hidden":!0,className:"animate-spin motion-reduce:animate-none"}),"Signing out"]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(b.LogOut,{"aria-hidden":!0}),"Sign out"]})}function Q({account:e,themes:n,onThemeChange:r,onSignOut:s,isSigningOut:i,now:a,accountUrl:o,onTakeTour:u}){let{name:l,detail:d}=P(e),p=e?.kind==="operator"?e.theme:void 0;return(0,t.jsxs)(T.DropdownMenu,{children:[(0,t.jsxs)(T.DropdownMenuTrigger,{"data-testid":"account-menu","aria-label":`Account menu, ${l}${e?`, ${d}`:""}`,className:"flex w-full items-center gap-2.5 rounded-md p-1.5 text-left transition-colors duration-(--duration-fast) outline-none hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring aria-expanded:bg-accent max-lg:justify-center",children:[(0,t.jsx)(c.Avatar,{kind:"account",size:28,name:l}),(0,t.jsxs)("span",{className:"flex min-w-0 grow flex-col max-lg:sr-only",children:[(0,t.jsx)("span",{className:"truncate text-body font-medium text-foreground",children:l}),(0,t.jsx)("span",{className:"truncate text-caption text-muted-foreground",children:d})]}),(0,t.jsx)(h.ChevronsUpDown,{"aria-hidden":!0,className:"size-(--size-icon) shrink-0 text-muted-foreground max-lg:hidden"})]}),(0,t.jsxs)(T.DropdownMenuContent,{side:"top",align:"start",className:"w-64",children:[(0,t.jsx)(q,{account:e,now:a}),void 0===o||e?.kind==="viewer"?null:(0,t.jsxs)(T.DropdownMenuItem,{"data-testid":"account-hosted",render:e=>(0,t.jsx)("a",{...e,href:o,children:e.children}),children:[(0,t.jsx)(m.CircleUserRound,{"aria-hidden":!0}),I]}),void 0===u?null:(0,t.jsxs)(T.DropdownMenuItem,{"data-testid":"account-take-tour",onClick:u,children:[(0,t.jsx)(g.Compass,{"aria-hidden":!0}),O]}),A(e)&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(T.DropdownMenuSeparator,{}),(0,t.jsxs)(T.DropdownMenuGroup,{children:[(0,t.jsx)(T.DropdownMenuLabel,{children:"Theme"}),(0,t.jsx)(T.DropdownMenuRadioGroup,{value:p,onValueChange:e=>{let t=L(e,n);void 0!==t&&r(t)},children:n.map(n=>{let r=N[n];return(0,t.jsxs)(T.DropdownMenuRadioItem,{value:n,disabled:void 0===e,closeOnClick:!1,"data-testid":`account-theme-${n}`,children:[(0,t.jsx)(r,{"aria-hidden":!0}),M.THEME_LABELS[n]]},n)})})]})]}),(0,t.jsx)(T.DropdownMenuSeparator,{}),(0,t.jsx)(T.DropdownMenuItem,{"data-testid":"account-sign-out",disabled:i,closeOnClick:!1,onClick:s,children:(0,t.jsx)(D,{isSigningOut:i})})]})]})}function F({account:e,themes:r,onThemeChange:s,onSignOut:a,isSigningOut:o,now:u,accountUrl:l,onTakeTour:p,settingsHref:h}){let[v,x]=(0,w.useState)(!1),{name:b,detail:y}=P(e),S=e?.kind==="operator"?e.theme:void 0;return(0,t.jsxs)(E.Sheet,{open:v,onOpenChange:x,children:[(0,t.jsx)(E.SheetTrigger,{"data-testid":"account-menu","aria-label":`Account menu, ${b}${e?`, ${y}`:""}`,className:"inline-flex size-(--size-control-touch) shrink-0 items-center justify-center rounded-full outline-none focus-visible:outline-2 focus-visible:outline-ring",children:(0,t.jsx)(c.Avatar,{kind:"account",size:28,name:b})}),(0,t.jsxs)(E.SheetContent,{side:"bottom","data-testid":"account-sheet",className:"gap-3",children:[(0,t.jsx)(E.SheetTitle,{className:"sr-only",children:"Account"}),(0,t.jsx)(q,{account:e,now:u}),void 0===l||e?.kind==="viewer"?null:(0,t.jsxs)("a",{href:l,"data-testid":"account-hosted",className:"flex h-(--size-control-touch) items-center gap-2.5 border-t border-border pt-3 text-body-touch text-foreground outline-none focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon) [&_svg]:text-muted-foreground",children:[(0,t.jsx)(m.CircleUserRound,{"aria-hidden":!0}),I]}),void 0===p?null:(0,t.jsxs)("button",{type:"button","data-testid":"account-take-tour",onClick:()=>{x(!1),p()},className:"flex h-(--size-control-touch) items-center gap-2.5 border-t border-border pt-3 text-body-touch text-foreground outline-none focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon) [&_svg]:text-muted-foreground",children:[(0,t.jsx)(g.Compass,{"aria-hidden":!0}),O]}),void 0===h?null:(0,t.jsxs)(d.default,{href:h,"data-testid":"account-settings",onClick:()=>{x(!1)},className:"flex h-(--size-control-touch) items-center gap-2.5 border-t border-border pt-3 text-body-touch text-foreground outline-none focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon) [&_svg]:text-muted-foreground",children:[(0,t.jsx)(i.Settings,{"aria-hidden":!0}),"Settings"]}),A(e)&&(0,t.jsxs)("div",{className:"flex flex-col gap-1.5 border-t border-border pt-3",children:[(0,t.jsx)("p",{className:"text-caption text-muted-foreground",children:"Theme"}),(0,t.jsx)(j.Tabs,{value:S,onValueChange:e=>{let t=L(e,r);void 0!==t&&s(t)},children:(0,t.jsx)(j.TabsList,{"aria-label":"Theme",className:"w-full",children:r.map(n=>{let r=N[n];return(0,t.jsxs)(j.TabsTrigger,{value:n,disabled:void 0===e,"data-testid":`account-theme-${n}`,className:"grow",children:[(0,t.jsx)(r,{"aria-hidden":!0}),M.THEME_LABELS[n]]},n)})})})]}),(0,t.jsxs)("a",{href:f.SOURCE_URL,target:"_blank",rel:"noreferrer","data-testid":"account-source",className:"flex h-(--size-control-touch) items-center gap-2.5 border-t border-border pt-3 text-body-touch text-foreground outline-none focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon) [&_svg]:text-muted-foreground",children:[(0,t.jsx)(n.CodeXml,{"aria-hidden":!0}),"Source on GitHub",(0,t.jsx)("span",{className:"sr-only",children:" (opens in a new tab)"})]}),(0,t.jsx)("button",{type:"button","data-testid":"account-sign-out",disabled:o,onClick:a,className:(0,C.classNames)("flex h-(--size-control-touch) items-center gap-2.5 border-t border-border pt-3 text-body-touch text-foreground outline-none focus-visible:outline-2 focus-visible:outline-ring disabled:opacity-60 [&_svg]:size-(--size-icon) [&_svg]:text-muted-foreground"),children:(0,t.jsx)(D,{isSigningOut:o})}),(0,t.jsx)(E.SheetClose,{render:(0,t.jsx)(k.Button,{size:"touch",className:"w-full"}),children:"Cancel"})]})]})}let z="relative flex h-(--size-control) items-center gap-2.5 rounded-md px-2.5 text-body text-muted-foreground transition-colors duration-(--duration-fast) hover:bg-accent hover:text-foreground aria-[current=page]:bg-accent aria-[current=page]:font-medium aria-[current=page]:text-foreground max-lg:justify-center max-lg:px-0 [&_svg]:size-(--size-icon) [&_svg]:shrink-0";function U({href:e,label:n,icon:r,isActive:s,testId:i,count:a}){return(0,t.jsxs)(d.default,{href:e,"aria-current":s?"page":void 0,"data-testid":i,className:z,children:[r,(0,t.jsx)("span",{className:"grow max-lg:sr-only",children:n}),a]})}function B({count:e}){return void 0===e||0===e?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(p.Badge,{variant:"count","data-testid":"nav-inbox-count",className:"max-lg:sr-only",children:[e,(0,t.jsx)("span",{className:"sr-only",children:" open"})]}),(0,t.jsx)("span",{"aria-hidden":!0,className:"absolute top-1.5 right-4 size-1.5 rounded-full bg-primary lg:hidden"})]})}function _({count:e}){return void 0===e||0===e?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(p.Badge,{variant:"count-neutral","data-testid":"nav-needs-crew-count",className:"max-lg:sr-only",children:[e,(0,t.jsx)("span",{className:"sr-only",children:" need crew"})]}),(0,t.jsx)("span",{"aria-hidden":!0,className:"absolute top-1.5 right-4 size-1.5 rounded-full bg-muted-foreground lg:hidden"})]})}function K({count:e,testId:n="nav-attention-count"}){return void 0===e||0===e?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(p.Badge,{variant:"count-attention","data-testid":n,className:"max-lg:sr-only",children:[e,(0,t.jsx)("span",{className:"sr-only",children:" need attention"})]}),(0,t.jsx)("span",{"aria-hidden":!0,className:"absolute top-1.5 right-4 size-1.5 rounded-full bg-tone-attention-fg lg:hidden"})]})}function H({href:e,label:n,icon:r,isActive:s,testId:i,count:a}){let o=a?.value!==void 0&&a.value>0;return(0,t.jsxs)(d.default,{href:e,"aria-current":s?"page":void 0,"data-testid":i,className:"flex grow flex-col items-center justify-center gap-1 text-micro text-muted-foreground outline-none focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring aria-[current=page]:font-medium aria-[current=page]:text-primary [&_svg]:size-(--size-icon-tab)",children:[(0,t.jsxs)("span",{className:"relative",children:[r,o?(0,t.jsxs)("span",{"data-testid":`${i}-count`,className:(0,C.classNames)("absolute -top-1.5 -right-2 flex h-4 min-w-4 items-center justify-center rounded-full px-1 text-micro font-semibold tabular-nums","primary"===a.tone?"bg-primary text-primary-foreground":"bg-destructive text-destructive-foreground"),children:[a.value,(0,t.jsxs)("span",{className:"sr-only",children:[" ",a.words]})]}):null]}),n]})}e.s(["Sidebar",0,function({active:e,inboxCount:d,attentionCount:p,needsCrewCount:h,hasSquadrons:m=!1,hasTrierarchs:g=!1,trierarchsCount:v,hasSettings:x=!1,...b}){return(0,t.jsxs)("aside",{"data-slot":"sidebar",className:"sticky top-0 hidden h-dvh w-(--size-rail) shrink-0 flex-col border-r border-border bg-sidebar text-sidebar-foreground sm:flex lg:w-(--size-sidebar)",children:[(0,t.jsxs)("div",{className:"flex h-(--size-header) items-center gap-2.5 px-4 max-lg:justify-center max-lg:px-0",children:[(0,t.jsx)(c.Avatar,{kind:"app",size:28}),(0,t.jsxs)("div",{className:"flex flex-col max-lg:sr-only",children:[(0,t.jsx)("span",{className:"text-body font-semibold text-foreground",children:"Aeolus"}),(0,t.jsx)("span",{className:"text-caption text-muted-foreground",children:"Operator console"})]})]}),(0,t.jsxs)("nav",{"aria-label":"Console",className:"flex grow flex-col gap-0.5 px-2.5 py-2",children:[(0,t.jsx)(U,{href:"/",label:"Fleet overview",icon:(0,t.jsx)(o.Ship,{"aria-hidden":!0}),isActive:"overview"===e,testId:"nav-overview"}),(0,t.jsx)(U,{href:"/needs-crew",label:"Needs crew",icon:(0,t.jsx)(s.ListChecks,{"aria-hidden":!0}),isActive:"needs-crew"===e,testId:"nav-needs-crew",count:(0,t.jsx)(_,{count:h})}),m&&(0,t.jsx)(U,{href:"/squadrons",label:"Squadrons",icon:(0,t.jsx)(a.Shapes,{"aria-hidden":!0}),isActive:"squadrons"===e,testId:"nav-squadrons"}),g&&(0,t.jsx)(U,{href:"/trierarchs",label:"Trierarchs",icon:(0,t.jsx)(u.ShipWheel,{"aria-hidden":!0}),isActive:"trierarchs"===e,testId:"nav-trierarchs",count:(0,t.jsx)(K,{count:v,testId:"nav-trierarchs-count"})}),(0,t.jsx)(U,{href:"/inbox",label:"Operator inbox",icon:(0,t.jsx)(r.Inbox,{"aria-hidden":!0}),isActive:"inbox"===e,testId:"nav-inbox",count:(0,t.jsx)(B,{count:d})}),(0,t.jsx)(U,{href:"/needs-attention",label:"Needs attention",icon:(0,t.jsx)(l.TriangleAlert,{"aria-hidden":!0}),isActive:"attention"===e,testId:"nav-attention",count:(0,t.jsx)(K,{count:p})})]}),(0,t.jsxs)("div",{className:"px-2.5 pb-2",children:[x&&(0,t.jsx)(U,{href:"/settings",label:"Settings",icon:(0,t.jsx)(i.Settings,{"aria-hidden":!0}),isActive:"settings"===e,testId:"nav-settings"}),(0,t.jsxs)("a",{href:f.SOURCE_URL,target:"_blank",rel:"noreferrer","data-testid":"nav-source",className:z,children:[(0,t.jsx)(n.CodeXml,{"aria-hidden":!0}),(0,t.jsx)("span",{className:"grow max-lg:sr-only",children:"Source on GitHub"}),(0,t.jsx)("span",{className:"sr-only",children:" (opens in a new tab)"})]})]}),(0,t.jsx)("div",{className:"border-t border-border p-2.5",children:(0,t.jsx)(Q,{...b})})]})}],36779),e.s(["TabBar",0,function({active:e,inboxCount:n,attentionCount:s,hasSquadrons:i=!1,hasTrierarchs:d=!1,trierarchsCount:c}){return(0,t.jsxs)("nav",{"aria-label":"Console","data-slot":"tab-bar",className:"fixed inset-x-0 bottom-0 z-40 flex min-h-(--size-tabbar) border-t border-border bg-background pb-[env(safe-area-inset-bottom)] sm:hidden",children:[(0,t.jsx)(H,{href:"/",label:"Fleet",icon:(0,t.jsx)(o.Ship,{"aria-hidden":!0}),isActive:"fleet"===e,testId:"tab-fleet"}),i&&(0,t.jsx)(H,{href:"/squadrons",label:"Squadrons",icon:(0,t.jsx)(a.Shapes,{"aria-hidden":!0}),isActive:"squadrons"===e,testId:"tab-squadrons"}),d&&(0,t.jsx)(H,{href:"/trierarchs",label:"Trierarchs",icon:(0,t.jsx)(u.ShipWheel,{"aria-hidden":!0}),isActive:"trierarchs"===e,testId:"tab-trierarchs",count:{value:c,tone:"attention",words:"silent"}}),(0,t.jsx)(H,{href:"/inbox",label:"Inbox",icon:(0,t.jsx)(r.Inbox,{"aria-hidden":!0}),isActive:"inbox"===e,testId:"tab-inbox",count:{value:n,tone:"primary",words:"open"}}),(0,t.jsx)(H,{href:"/needs-attention",label:"Attention",icon:(0,t.jsx)(l.TriangleAlert,{"aria-hidden":!0}),isActive:"attention"===e,testId:"tab-attention",count:{value:s,tone:"attention",words:"need attention"}})]})}],15034);var V=e.i(24071),G=e.i(66595),$=e.i(24262);e.s(["TopBar",0,function({title:e,live:n,actions:r,back:s,account:i,onSearch:a}){let o=a&&!s?a:void 0;return(0,t.jsxs)("header",{"data-slot":"top-bar","data-mode":s?"detail":"root",className:"sticky top-0 z-30 flex h-(--size-header) items-center gap-2.5 border-b border-border bg-background px-4 sm:hidden",children:[s?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(d.default,{href:s.href,className:"-ml-1.5 inline-flex h-(--size-control-touch) shrink-0 items-center gap-0.5 rounded-md pr-2 text-body-touch text-foreground focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon)",children:[(0,t.jsx)(V.ChevronLeft,{"aria-hidden":!0}),s.label]}),(0,t.jsx)("p",{className:"min-w-0 flex-1 truncate text-center text-body-touch font-semibold text-foreground",children:e})]}):(0,t.jsx)("h1",{className:"truncate text-title-touch font-semibold tracking-tight text-foreground",children:e}),(0,t.jsx)($.LiveStatus,{state:n}),r||o||i&&!s?(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[o?(0,t.jsx)(k.Button,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Search ships or jump to","data-testid":"top-bar-search",onClick:o,children:(0,t.jsx)(G.Search,{"aria-hidden":!0})}):null,r,i&&!s?(0,t.jsx)(F,{...i}):null]}):null]})}],85538)},88721,3979,e=>{"use strict";var t=e.i(54616),n=e.i(66027),r=e.i(12598),s=e.i(18566),i=e.i(41880),a=e.i(87600),o=e.i(95014),u=e.i(25242),l=e.i(77155),d=e.i(27702),c=e.i(90262),p=e.i(5387),f=e.i(49841),h=e.i(86165),m=e.i(14695),g=e.i(265);function v(){let e=(0,c.useAccess)(),t=(0,h.useHasSquadrons)(),n=(0,g.useHasTrierarchPlugin)(),r=(0,g.useMachines)(),s=(0,p.useFleetSnapshot)();return{...void 0===s.data?{}:{needsCrewCount:(0,f.needsCrew)(s.data,{hasTrierarchs:n}).length},hasSquadrons:t,hasTrierarchs:n,...void 0===r.data?{}:{trierarchsCount:(0,m.silentCount)(r.data)},hasSettings:e.canManage&&(t||n)}}e.s(["usePluginNav",0,v],3979),e.s(["useAccountMenu",0,function(e){let c=(0,d.useTRPC)(),p=(0,s.useRouter)(),f=(0,r.useQueryClient)(),h=(0,n.useQuery)(c.console.account.queryOptions()),m=(0,a.useHostedAccountUrl)(),{themes:g}=(0,u.useConsoleConstants)(),x=(0,l.useConsoleGuide)(),b=v(),y=(0,t.useMutation)(c.console.setTheme.mutationOptions({onMutate:({theme:e})=>{(0,o.applyTheme)(e),f.setQueryData(c.console.account.queryKey(),t=>t?.kind!=="operator"?t:{...t,theme:e})},onError:()=>{(0,i.showToast)({title:"Couldn’t save the theme",description:"It applies here until the page reloads.",tone:"error"})}})),S=(0,t.useMutation)(c.console.signOut.mutationOptions({onSuccess:()=>{f.clear(),p.replace("/sign-in")}})),R=()=>{S.mutate(void 0,{onError:()=>{(0,i.showToast)({title:"Couldn’t sign out",description:"The server did not answer. You are still signed in.",tone:"error",action:{label:"Try again",onClick:R}})}})};return{...b.hasTrierarchs&&b.hasSettings?{settingsHref:"/settings"}:{},account:h.data,themes:g,onThemeChange:e=>{y.mutate({theme:e})},onSignOut:R,isSigningOut:S.isPending,now:e,...void 0===m?{}:{accountUrl:m},...void 0===x.onTakeTour?{}:{onTakeTour:x.onTakeTour}}}],88721)},54492,e=>{"use strict";e.s(["crewRequestAction",0,function(e){switch(e.kind){case"none":return;case"needsCrew":return"remove";case"crewedByHand":return"release";case"assigned":return"releasing"===e.status?void 0:"release"}},"crewRequestStage",0,function(e){let t=e.crewRequest;return null===t?{kind:"none"}:null!==t.assignedTo?{kind:"assigned",requestedAt:t.requestedAt,trierarch:t.assignedTo,status:t.status??"crewing",attempt:t.attempt,startedAt:t.startedAt}:null!==t.crewedBy?{kind:"crewedByHand",requestedAt:t.requestedAt,crewedBy:t.crewedBy,since:e.crewedSince??null}:{kind:"needsCrew",requestedAt:t.requestedAt,reason:t.reason}},"isRestartable",0,function(e){return"assigned"===e.kind&&"crashed"===e.status},"releaseSteps",0,function(e){return"crewedByHand"===e.kind?["removeCrewRequest","release"]:["removeCrewRequest"]},"requestedBy",0,function(e){return e.find(e=>"CrewRequested"===e.type)?.actor??null},"restartWords",0,function({status:e,attempt:t}){let n=`${String(t)} ${1===t?"restart":"restarts"}`;switch(e){case"restarting":return`attempt ${String(t)}`;case"crashed":return n;case"running":return 0===t?void 0:n;case"crewing":case"releasing":return}},"statusChangedAt",0,function(e){return e.find(e=>"CrewStatusChanged"===e.type)?.occurredAt}])},86413,e=>{"use strict";var t=e.i(54616),n=e.i(66027),r=e.i(12598),s=e.i(27702);function i(){let e=(0,s.useTRPC)();return(0,n.useQuery)(e.fleet.inbox.queryOptions({filter:"all"}))}function a(e){return"pending"===e.state||"delivered"===e.state}function o(e,t){switch(t){case"open":return e.filter(a);case"done":return e.filter(e=>"acknowledged"===e.state);case"all":return[...e]}}function u(){let e=(0,s.useTRPC)(),t=(0,r.useQueryClient)();return()=>t.invalidateQueries({queryKey:e.fleet.pathKey()})}e.s(["filterCounts",0,function(e){return{open:o(e,"open").length,done:o(e,"done").length,all:e.length}},"inboxPathOf",0,function(e){let t=new URLSearchParams;"open"!==e.filter&&t.set("filter",e.filter),void 0!==e.deliveryId&&t.set("message",e.deliveryId);let n=t.toString();return""===n?"/inbox":`/inbox?${n}`},"messagesFor",0,o,"readInboxFilter",0,function(e){return"done"===e||"all"===e?e:"open"},"useInbox",0,i,"useMarkDone",0,function(){let e=(0,s.useTRPC)(),n=u();return(0,t.useMutation)(e.fleet.markDone.mutationOptions({onSuccess:n}))},"useMarkRead",0,function(){let e=(0,s.useTRPC)(),n=u();return(0,t.useMutation)(e.fleet.markRead.mutationOptions({onSuccess:n}))},"useOpenInboxCount",0,function(){let e=i().data;return void 0===e?void 0:e.filter(a).length},"useReply",0,function(){let e=(0,s.useTRPC)(),n=u();return(0,t.useMutation)(e.fleet.reply.mutationOptions({onSuccess:n}))}])},18423,e=>{"use strict";var t=e.i(12598),n=e.i(5861),r=e.i(71645),s=e.i(27702);let i=new Set(["FleetInitialised","ShipCommissioned","ShipClaimed","LeaseRevoked","CredentialRevoked","StartingPromptIssued","ShipRetired","DeliveryAcknowledged","DeliveryUndeliverable","ShipReported","CrewRequested","CrewRequestRemoved","CrewAssigned","CrewStatusChanged","CrewRequestExplained","CrewRequestGivenBack","LabelAssigned","LabelUnassigned","LabelRetired"]);async function a(e,t){await e.cancelQueries({queryKey:t,predicate:e=>void 0===e.state.data&&"fetching"===e.state.fetchStatus}),await e.invalidateQueries({queryKey:t})}let o=new Set(["LabelDefined","LabelValuesChanged","LabelRetired","LabelAssigned","LabelUnassigned","LabelDeleted"]),u=new Set(["DeliveryUndeliverable","DeliveryDismissed"]);e.s(["useLiveFleet",0,function(){let e=(0,s.useTRPC)(),l=(0,t.useQueryClient)(),[d,c]=(0,r.useState)(new Set),p=e=>{a(l,e)},f=(0,n.useSubscription)(e.fleet.events.subscriptionOptions({lastEventId:null},{onData:({data:t})=>{var n,r,s;if("resync"===t.kind)return void p(e.fleet.pathKey());let{event:a}=t;for(let t of new Set([a.shipId,a.actorShipId]))null!==t&&(p(e.fleet.ship.queryKey({shipId:t})),p(e.fleet.shipTimeline.queryKey({shipId:t})));if(null!==a.messageId&&(p(e.fleet.shipMessages.pathKey()),p(e.fleet.message.queryKey({messageId:a.messageId})),p(e.fleet.inbox.pathKey())),n=a.type,u.has(n)&&p(e.fleet.needsAttention.queryKey()),r=a.type,o.has(r)&&p(e.fleet.labels.queryKey()),s=a.type,!i.has(s))return;p(e.fleet.list.queryKey());let{shipId:l}=a;"ShipCommissioned"===a.type&&null!==l&&c(e=>new Set([...e,l]))}}));return{live:function(e){switch(e){case"pending":return"live";case"connecting":return"reconnecting";case"idle":case"error":return"offline"}}(f.status),newShipIds:d,error:f.error}}])},28459,e=>{"use strict";var t=e.i(54616),n=e.i(66027),r=e.i(12598),s=e.i(48695),i=e.i(84294),a=e.i(27702);function o(){let e=(0,a.useTRPC)();return(0,n.useQuery)(e.fleet.needsAttention.queryOptions())}function u(){let e=(0,a.useTRPC)(),t=(0,r.useQueryClient)();return()=>t.invalidateQueries({queryKey:e.fleet.pathKey()})}e.s(["DISMISSED_TOAST",0,{title:"Delivery dismissed",description:"It stays in the timelines as dismissed."},"canResend",0,function(e){return!e.message.isPing},"deliveryWithId",0,function(e,t){return e?.find(e=>e.deliveryId===t)},"messagePathOf",0,function(e){let{message:t}=e;return`/ships/${t.sender.id}?tab=messages&message=${t.id}`},"resentToast",0,function(e){return{title:"Message resent",description:`A new message went to ${function(e){let{recipient:t}=e.message;return"ship"===t.kind?t.ship.name:`any ship of type ${t.type}`}(e)}. The original is dismissed.`}},"useAttentionCount",0,function(){let e=o().data?.length,t=(0,s.useSquadrons)();return void 0===e?void 0:e+(0,i.silentMembers)(t.data??[]).length},"useDismissDelivery",0,function(){let e=(0,a.useTRPC)(),n=u();return(0,t.useMutation)(e.fleet.dismiss.mutationOptions({onSuccess:n}))},"useNeedsAttention",0,o,"useResendDelivery",0,function(){let e=(0,a.useTRPC)(),n=u();return(0,t.useMutation)(e.fleet.resend.mutationOptions({onSuccess:n}))}])},49841,e=>{"use strict";var t=e.i(54492);let n={crewing:{tone:"active",word:"Crewing"},running:{tone:"ok",word:"Running"},restarting:{tone:"waiting",word:"Restarting"},crashed:{tone:"attention",word:"Crashed"},releasing:{tone:"active",word:"Releasing"}};e.s(["crewRequestCell",0,function(e){switch(e.kind){case"none":return;case"needsCrew":return{tone:"waiting",word:"Needs crew"};case"crewedByHand":return{tone:"ok",word:"Crewed by hand"};case"assigned":return n[e.status]}},"crewRequestKey",0,function(e){return"assigned"===e.kind?e.status:e.kind},"crewRequestKeyWord",0,function(e){return"none"===e?"No request":"needsCrew"===e?"Needs crew":"crewedByHand"===e?"Crewed by hand":n[e].word},"crewRequestKeysOf",0,function(e){return["none","needsCrew","crewedByHand",...e]},"handCrewOf",0,function(e){return null===e.startingPrompt?{kind:"no-prompt"}:e.startingPrompt.isClaimed?{kind:"crew-ended",endedAt:e.awaitingCrewSince}:{kind:"prompt-unclaimed",issuedAt:e.startingPrompt.issuedAt}},"needsCrew",0,function(e,n){return e.filter(e=>(function(e,n){if("retired"===e.status)return!1;let r=(0,t.crewRequestStage)(e);return n.hasTrierarchs?"needsCrew"===r.kind||"assigned"===r.kind&&"running"!==r.status&&"releasing"!==r.status:"needsCrew"===r.kind&&"awaitingCrew"===e.status})(e,n)).toSorted((e,t)=>(e.crewRequest?.requestedAt??"").localeCompare(t.crewRequest?.requestedAt??""))}])},96676,e=>{"use strict";let t;var n=e.i(71645);let r=Date.now(),s=new Set;function i(e){return s.add(e),t??=setInterval(()=>{for(let e of(r=Date.now(),s))e()},1e4),()=>{s.delete(e),0===s.size&&(clearInterval(t),t=void 0)}}function a(){return r}e.s(["useNow",0,function(){return new Date((0,n.useSyncExternalStore)(i,a,a))}])},78485,e=>{"use strict";var t=e.i(12598),n=e.i(18566),r=e.i(71645),s=e.i(46929);e.s(["useSignInWhenSessionEnds",0,function(e){let i=(0,n.useRouter)(),a=(0,t.useQueryClient)(),o=e.find(e=>"UNAUTHORIZED"===(0,s.trpcErrorCode)(e)),u=void 0===o?void 0:(0,s.isSignedInElsewhere)(o)?"/sign-in?notice=signed-in-elsewhere":"/sign-in";(0,r.useEffect)(()=>{void 0!==u&&(a.clear(),i.replace(u))},[u,a,i])}])},31513,e=>{"use strict";e.s(["SOURCE_URL",0,"https://github.com/ThomasHendrickx/aeolus-fleet"])},265,e=>{"use strict";var t=e.i(54616),n=e.i(66027),r=e.i(12598),s=e.i(2660),i=e.i(95187);let a=(0,i.createServerReference)("403802c763f5684ad1227e79fa8cee4512ef5fbe67",i.callServer,void 0,i.findSourceMapURL,"checkCrewSettings"),o=(0,i.createServerReference)("00e0d6206b6859bae3530f10c274725bce49802c2a",i.callServer,void 0,i.findSourceMapURL,"connectTrierarchPlugin"),u=(0,i.createServerReference)("40585ce5d2df6de69099cd24d698dd57d0df94af16",i.callServer,void 0,i.findSourceMapURL,"joinMachine"),l=(0,i.createServerReference)("003a76b2ae8600e9f4b533c719e0f53a2f0ca56c76",i.callServer,void 0,i.findSourceMapURL,"listMachines"),d=(0,i.createServerReference)("00855409dc64aa27b1f39130a77143fd90109742fc",i.callServer,void 0,i.findSourceMapURL,"readTrierarchPluginConnection"),c=(0,i.createServerReference)("001e5d078fe6caaa18f77275a83be2e5050bc1e775",i.callServer,void 0,i.findSourceMapURL,"readTrierarchPluginVersion"),p=["trierarch-plugin","connection"];function f(){return(0,n.useQuery)({queryKey:p,queryFn:async()=>(0,s.dataOf)(await d())})}function h(){let e=f();return void 0===e.data?e.isError?"not-connected":"unknown":e.data.state}function m(){let e=f();return void 0!==e.data&&"none"!==e.data.state}let g=["trierarch-plugin","machines"],v=e=>["trierarch-plugin","check",JSON.stringify(e)];e.s(["useConnectTrierarchPlugin",0,function(){let e=(0,r.useQueryClient)();return(0,t.useMutation)({mutationFn:async()=>(0,s.dataOf)(await o()),onSuccess:t=>{e.setQueryData(p,t)}})},"useCrewSettingsCheck",0,function(e){let t=(0,r.useQueryClient)(),i=async()=>(0,s.dataOf)(await a(e));return{...(0,n.useQuery)({queryKey:v(e),queryFn:i,enabled:void 0!==e}),checkNow:()=>t.query({queryKey:v(e),queryFn:i,staleTime:0})}},"useHasTrierarchPlugin",0,m,"useJoinMachine",0,function(){let e=(0,r.useQueryClient)();return(0,t.useMutation)({mutationFn:async e=>(0,s.dataOf)(await u(e)),onSuccess:async()=>{await e.invalidateQueries({queryKey:g})}})},"useMachines",0,function(){let e="connected"===h();return(0,n.useQuery)({queryKey:g,queryFn:async()=>(0,s.dataOf)(await l()),refetchInterval:1e4,enabled:e})},"useTrierarchPluginConnection",0,h,"useTrierarchPluginSettings",0,f,"useTrierarchPluginVersion",0,function(){let e=m();return(0,n.useQuery)({queryKey:["console-version","trierarch-plugin"],queryFn:async()=>await c()??null,enabled:e}).data??void 0}],265)}]);