@spencerboucher/switchyard 0.22.0 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -1
- package/dist/bridge/switchyard-terminal.js +2 -0
- package/dist/switchyard.mjs +21 -51
- package/package.json +1 -1
- package/web-dist/assets/AutomationView-BFZ5tGrI.js +2 -0
- package/web-dist/assets/AutomationView-BFZ5tGrI.js.map +1 -0
- package/web-dist/assets/{Checkbox-DR78wXsg.js → Checkbox-Bh46F55q.js} +2 -2
- package/web-dist/assets/{Checkbox-DR78wXsg.js.map → Checkbox-Bh46F55q.js.map} +1 -1
- package/web-dist/assets/{DangerZone-CBnW9h0p.js → DangerZone-K_oXMpbq.js} +2 -2
- package/web-dist/assets/{DangerZone-CBnW9h0p.js.map → DangerZone-K_oXMpbq.js.map} +1 -1
- package/web-dist/assets/Field-DRcZixOF.js +2 -0
- package/web-dist/assets/{Field-DS2BMoqA.js.map → Field-DRcZixOF.js.map} +1 -1
- package/web-dist/assets/{Markdown-BIO6MBTM.js → Markdown-BaCvc-cI.js} +5 -5
- package/web-dist/assets/{Markdown-BIO6MBTM.js.map → Markdown-BaCvc-cI.js.map} +1 -1
- package/web-dist/assets/{NavigationEditor-C0J7vDXL.js → NavigationEditor-BfNZ411c.js} +2 -2
- package/web-dist/assets/{NavigationEditor-C0J7vDXL.js.map → NavigationEditor-BfNZ411c.js.map} +1 -1
- package/web-dist/assets/{Overlay-DPZqU_vB.js → Overlay-wZFuaSA5.js} +2 -2
- package/web-dist/assets/{Overlay-DPZqU_vB.js.map → Overlay-wZFuaSA5.js.map} +1 -1
- package/web-dist/assets/{Priority-0hv1Vpg7.js → Priority-Ce4btFLm.js} +2 -2
- package/web-dist/assets/{Priority-0hv1Vpg7.js.map → Priority-Ce4btFLm.js.map} +1 -1
- package/web-dist/assets/{RadioCards-CN5xELnc.js → RadioCards-DR-fWNLB.js} +2 -2
- package/web-dist/assets/{RadioCards-CN5xELnc.js.map → RadioCards-DR-fWNLB.js.map} +1 -1
- package/web-dist/assets/ScopeSelect-B1RxBDV7.js +2 -0
- package/web-dist/assets/ScopeSelect-B1RxBDV7.js.map +1 -0
- package/web-dist/assets/SegmentedControl-M7WpGnaN.js +2 -0
- package/web-dist/assets/SegmentedControl-M7WpGnaN.js.map +1 -0
- package/web-dist/assets/{Select-CN7M29ap.js → Select-CvbSg3M1.js} +2 -2
- package/web-dist/assets/{Select-CN7M29ap.js.map → Select-CvbSg3M1.js.map} +1 -1
- package/web-dist/assets/StructuredValue-By3sh_00.js +5 -0
- package/web-dist/assets/StructuredValue-By3sh_00.js.map +1 -0
- package/web-dist/assets/{Switch-CZMY83Fw.js → Switch-B89oAK_3.js} +2 -2
- package/web-dist/assets/{Switch-CZMY83Fw.js.map → Switch-B89oAK_3.js.map} +1 -1
- package/web-dist/assets/Tabs-CzGFkSHO.js +2 -0
- package/web-dist/assets/{Tabs-_1w3hoAR.js.map → Tabs-CzGFkSHO.js.map} +1 -1
- package/web-dist/assets/TextLink-irMcg7Xz.js +2 -0
- package/web-dist/assets/{TextLink-BpF2vLiL.js.map → TextLink-irMcg7Xz.js.map} +1 -1
- package/web-dist/assets/{UINodeRenderer-DqIkLhF8.js → UINodeRenderer-_99GFFDS.js} +3 -3
- package/web-dist/assets/{UINodeRenderer-DqIkLhF8.js.map → UINodeRenderer-_99GFFDS.js.map} +1 -1
- package/web-dist/assets/{UnfilteredNote-22-Qjb-f.js → UnfilteredNote-iQIfVXkA.js} +2 -2
- package/web-dist/assets/{UnfilteredNote-22-Qjb-f.js.map → UnfilteredNote-iQIfVXkA.js.map} +1 -1
- package/web-dist/assets/api-CzS9UH7Q.js +2 -0
- package/web-dist/assets/{api-RftVSu44.js.map → api-CzS9UH7Q.js.map} +1 -1
- package/web-dist/assets/{arrow-down-CzjHSpfM.js → arrow-down-BKhm3D2d.js} +2 -2
- package/web-dist/assets/{arrow-down-CzjHSpfM.js.map → arrow-down-BKhm3D2d.js.map} +1 -1
- package/web-dist/assets/{arrow-up-B4YU8Bg0.js → arrow-up-poMxdOwI.js} +2 -2
- package/web-dist/assets/{arrow-up-B4YU8Bg0.js.map → arrow-up-poMxdOwI.js.map} +1 -1
- package/web-dist/assets/attention-UZIRcx_k.js +2 -0
- package/web-dist/assets/attention-UZIRcx_k.js.map +1 -0
- package/web-dist/assets/{automations-DnydDML9.js → automations-DWz_Lxch.js} +2 -2
- package/web-dist/assets/{automations-DnydDML9.js.map → automations-DWz_Lxch.js.map} +1 -1
- package/web-dist/assets/board-BqGDwbGB.js +6 -0
- package/web-dist/assets/{board-BPxxc8G4.js.map → board-BqGDwbGB.js.map} +1 -1
- package/web-dist/assets/{calendar-clock-B3bQkNKq.js → calendar-clock-U5kMaB5u.js} +2 -2
- package/web-dist/assets/{calendar-clock-B3bQkNKq.js.map → calendar-clock-U5kMaB5u.js.map} +1 -1
- package/web-dist/assets/chevron-right-B-aa_CvO.js +2 -0
- package/web-dist/assets/{chevron-right-DuAbbYQ-.js.map → chevron-right-B-aa_CvO.js.map} +1 -1
- package/web-dist/assets/code-Di_a0pVO.js +28 -0
- package/web-dist/assets/code-Di_a0pVO.js.map +1 -0
- package/web-dist/assets/{core.esm-BbOnWvFK.js → core.esm-CHa4oRMo.js} +2 -2
- package/web-dist/assets/{core.esm-BbOnWvFK.js.map → core.esm-CHa4oRMo.js.map} +1 -1
- package/web-dist/assets/{describe-DWsoiUix.js → describe-C5NtR2LE.js} +2 -2
- package/web-dist/assets/describe-C5NtR2LE.js.map +1 -0
- package/web-dist/assets/{enroll-CV77Sk6h.js → enroll-DlZYKudD.js} +2 -2
- package/web-dist/assets/{enroll-CV77Sk6h.js.map → enroll-DlZYKudD.js.map} +1 -1
- package/web-dist/assets/{git-branch-Dr8PvfHN.js → git-branch-CltFrgh4.js} +2 -2
- package/web-dist/assets/{git-branch-Dr8PvfHN.js.map → git-branch-CltFrgh4.js.map} +1 -1
- package/web-dist/assets/{grip-vertical-Bc5pJHHF.js → grip-vertical-QSdwyQ9C.js} +2 -2
- package/web-dist/assets/{grip-vertical-Bc5pJHHF.js.map → grip-vertical-QSdwyQ9C.js.map} +1 -1
- package/web-dist/assets/{hand-B2TrADIv.js → hand-5eeZJSl_.js} +2 -2
- package/web-dist/assets/{hand-B2TrADIv.js.map → hand-5eeZJSl_.js.map} +1 -1
- package/web-dist/assets/index-CbdB9RE5.js +17 -0
- package/web-dist/assets/{index-cmIcNnnF.js.map → index-CbdB9RE5.js.map} +1 -1
- package/web-dist/assets/index-XQGPQuFK.css +2 -0
- package/web-dist/assets/{link-2-M5ENDPWT.js → link-2-DXaJEVgz.js} +2 -2
- package/web-dist/assets/{link-2-M5ENDPWT.js.map → link-2-DXaJEVgz.js.map} +1 -1
- package/web-dist/assets/{logic-D_vBBkcD.js → logic-4hQwsm8w.js} +4 -4
- package/web-dist/assets/logic-4hQwsm8w.js.map +1 -0
- package/web-dist/assets/{logic-CG2E-voG.js → logic-c8AsGwGr.js} +2 -2
- package/web-dist/assets/{logic-CG2E-voG.js.map → logic-c8AsGwGr.js.map} +1 -1
- package/web-dist/assets/{more-CVjg2O5h.js → more-RENHRep9.js} +2 -2
- package/web-dist/assets/{more-CVjg2O5h.js.map → more-RENHRep9.js.map} +1 -1
- package/web-dist/assets/{pencil-y_4AgVa2.js → pencil-DvO-Zlyh.js} +2 -2
- package/web-dist/assets/{pencil-y_4AgVa2.js.map → pencil-DvO-Zlyh.js.map} +1 -1
- package/web-dist/assets/{play-CYKX2aVL.js → play-CPNEXvVs.js} +2 -2
- package/web-dist/assets/{play-CYKX2aVL.js.map → play-CPNEXvVs.js.map} +1 -1
- package/web-dist/assets/{plus-B6uH1yKa.js → plus-DC4JQpXX.js} +2 -2
- package/web-dist/assets/{plus-B6uH1yKa.js.map → plus-DC4JQpXX.js.map} +1 -1
- package/web-dist/assets/{policyLogic-CioD2rMm.js → policyLogic-CXFbVtEs.js} +2 -2
- package/web-dist/assets/{policyLogic-CioD2rMm.js.map → policyLogic-CXFbVtEs.js.map} +1 -1
- package/web-dist/assets/{prefs-V29Ms2ZL.js → prefs-BTwRvULi.js} +2 -2
- package/web-dist/assets/{prefs-V29Ms2ZL.js.map → prefs-BTwRvULi.js.map} +1 -1
- package/web-dist/assets/{queue-BGK9c062.js → queue-C25GCl3M.js} +2 -2
- package/web-dist/assets/{queue-BGK9c062.js.map → queue-C25GCl3M.js.map} +1 -1
- package/web-dist/assets/{rotate-ccw-DvfmNYNE.js → rotate-ccw-DuLdXOxM.js} +2 -2
- package/web-dist/assets/{rotate-ccw-DvfmNYNE.js.map → rotate-ccw-DuLdXOxM.js.map} +1 -1
- package/web-dist/assets/{search-GTFKEqAS.js → search-tZdcGLqS.js} +2 -2
- package/web-dist/assets/{search-GTFKEqAS.js.map → search-tZdcGLqS.js.map} +1 -1
- package/web-dist/assets/selection-BVtvp1aZ.js +9 -0
- package/web-dist/assets/selection-BVtvp1aZ.js.map +1 -0
- package/web-dist/assets/settings-BApavmGp.js +7 -0
- package/web-dist/assets/settings-BApavmGp.js.map +1 -0
- package/web-dist/assets/states-CM1Zt9qO.js +60 -0
- package/web-dist/assets/states-CM1Zt9qO.js.map +1 -0
- package/web-dist/assets/{terminal-DGVFZER3.js → terminal-CEttp_7_.js} +2 -2
- package/web-dist/assets/{terminal-DGVFZER3.js.map → terminal-CEttp_7_.js.map} +1 -1
- package/web-dist/assets/{terminal-login-Gy6aLzgC.js → terminal-login-BceUiMHs.js} +2 -2
- package/web-dist/assets/{terminal-login-Gy6aLzgC.js.map → terminal-login-BceUiMHs.js.map} +1 -1
- package/web-dist/assets/{useBreakpoint-DoLUoCMf.js → useBreakpoint-CdYPa6z0.js} +2 -2
- package/web-dist/assets/{useBreakpoint-DoLUoCMf.js.map → useBreakpoint-CdYPa6z0.js.map} +1 -1
- package/web-dist/assets/useNow-CyygPGnv.js +2 -0
- package/web-dist/assets/{useNow-BS_9T7IY.js.map → useNow-CyygPGnv.js.map} +1 -1
- package/web-dist/assets/{useResource-CPN6cDQ5.js → useResource-DQOWQ7YZ.js} +2 -2
- package/web-dist/assets/{useResource-CPN6cDQ5.js.map → useResource-DQOWQ7YZ.js.map} +1 -1
- package/web-dist/assets/useSwipeTabs-CJFQTmAs.js +2 -0
- package/web-dist/assets/useSwipeTabs-CJFQTmAs.js.map +1 -0
- package/web-dist/assets/workboard-D39MZMSb.js +3 -0
- package/web-dist/assets/{workboard-FE6bAMnW.js.map → workboard-D39MZMSb.js.map} +1 -1
- package/web-dist/index.html +7 -7
- package/web-dist/sw.js +1 -1
- package/web-dist/sw.js.map +1 -1
- package/web-dist/assets/AutomationView-DwZ_2m9J.js +0 -2
- package/web-dist/assets/AutomationView-DwZ_2m9J.js.map +0 -1
- package/web-dist/assets/Field-DS2BMoqA.js +0 -2
- package/web-dist/assets/ScopeSelect-BaJjip1Y.js +0 -2
- package/web-dist/assets/ScopeSelect-BaJjip1Y.js.map +0 -1
- package/web-dist/assets/SegmentedControl-CRmhE-Kn.js +0 -2
- package/web-dist/assets/SegmentedControl-CRmhE-Kn.js.map +0 -1
- package/web-dist/assets/Tabs-_1w3hoAR.js +0 -2
- package/web-dist/assets/TextLink-BpF2vLiL.js +0 -2
- package/web-dist/assets/api-RftVSu44.js +0 -2
- package/web-dist/assets/attention-CEgIsUuq.js +0 -2
- package/web-dist/assets/attention-CEgIsUuq.js.map +0 -1
- package/web-dist/assets/board-BPxxc8G4.js +0 -6
- package/web-dist/assets/chevron-right-DuAbbYQ-.js +0 -2
- package/web-dist/assets/code-D5IB7jTT.js +0 -28
- package/web-dist/assets/code-D5IB7jTT.js.map +0 -1
- package/web-dist/assets/describe-DWsoiUix.js.map +0 -1
- package/web-dist/assets/index-BXQwol8u.css +0 -2
- package/web-dist/assets/index-cmIcNnnF.js +0 -17
- package/web-dist/assets/logic-D_vBBkcD.js.map +0 -1
- package/web-dist/assets/repo-CuL_qbqU.js +0 -5
- package/web-dist/assets/repo-CuL_qbqU.js.map +0 -1
- package/web-dist/assets/selection-CAMJBh5A.js +0 -9
- package/web-dist/assets/selection-CAMJBh5A.js.map +0 -1
- package/web-dist/assets/settings-o7k_MPK7.js +0 -9
- package/web-dist/assets/settings-o7k_MPK7.js.map +0 -1
- package/web-dist/assets/states-BUWwUyu-.js +0 -60
- package/web-dist/assets/states-BUWwUyu-.js.map +0 -1
- package/web-dist/assets/useIndicator-BKqIsw2Q.js +0 -2
- package/web-dist/assets/useIndicator-BKqIsw2Q.js.map +0 -1
- package/web-dist/assets/useNow-BS_9T7IY.js +0 -2
- package/web-dist/assets/useSwipeTabs-XRK0_O6T.js +0 -2
- package/web-dist/assets/useSwipeTabs-XRK0_O6T.js.map +0 -1
- package/web-dist/assets/workboard-FE6bAMnW.js +0 -3
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
|
|
2
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-pan-x:initial;--tw-pan-y:initial;--tw-pinch-zoom:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-pan-x:initial;--tw-pan-y:initial;--tw-pinch-zoom:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}}}@layer theme{:root,:host{--font-sans:system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--font-mono:ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-3xl:48rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-widest:.1em;--leading-tight:1.25;--leading-snug:1.375;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--ease-out:cubic-bezier(0, 0, .2, 1);--animate-spin:spin 1.4s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--default-mono-font-family:ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;--color-accent:var(--sy-accent)}}@layer base{*,:after,:before{box-sizing:border-box;border:0 solid;margin:0;padding:0}::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}html{-webkit-tap-highlight-color:transparent;-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%}html,body{background:var(--sy-bg);color:var(--sy-text);font-family:var(--font-sans);overscroll-behavior:none;overflow-x:clip}body{-webkit-font-smoothing:antialiased;min-height:100dvh;margin:0;line-height:1.5}#root{min-width:0;min-height:100dvh}:focus-visible{outline:2px solid var(--sy-focus);outline-offset:2px}code,pre,kbd,samp{font-family:var(--font-mono)}button,[role=button]{cursor:pointer}button:disabled,[aria-disabled=true]{cursor:not-allowed}}@layer components{@media (pointer:coarse){.tap{min-width:44px;min-height:44px}}.sy-prose{overflow-wrap:anywhere;min-width:0}.sy-prose>*+*{margin-top:.6em}.sy-prose h1,.sy-prose h2,.sy-prose h3,.sy-prose h4{margin-top:1em;font-weight:600;line-height:1.3}.sy-prose h1{font-size:1.25rem}.sy-prose h2{font-size:1.125rem}.sy-prose h3,.sy-prose h4{font-size:1rem}.sy-prose ul{padding-left:1.4em;list-style:outside}.sy-prose ol{padding-left:1.4em;list-style:decimal}.sy-prose a{color:var(--sy-accent);text-underline-offset:2px;text-decoration:underline}.sy-prose blockquote{border-left:3px solid var(--sy-border-strong);color:var(--sy-muted);padding-left:.75em}.sy-prose :not(pre)>code{background:var(--sy-surface-2);border:1px solid var(--sy-border);border-radius:4px;padding:0 .3em;font-size:.875em}.sy-prose hr{border-color:var(--sy-border)}.sy-prose input[type=checkbox]{margin-right:.4em}.sy-pressable{transition:transform .22s cubic-bezier(.2,.8,.2,1)}.sy-pressable[data-pressing]{transition-duration:.32s;transform:scale(.97)}.sy-pressable.sy-press-row[data-pressing]{background-color:var(--sy-surface-2);transform:none}.sy-sheet-in{animation:.26s cubic-bezier(.32,.72,0,1) sy-sheet-in}.sy-drawer-in{animation:.24s cubic-bezier(.32,.72,0,1) sy-drawer-in}.sy-pop-in{animation:.16s ease-out sy-pop-in}.sy-fade-in{animation:.2s ease-out sy-fade-in}.sy-slide-from-right{animation:.18s ease-out sy-slide-from-right}.sy-slide-from-left{animation:.18s ease-out sy-slide-from-left}.sy-prose-compact{font-size:.875rem;line-height:1.5rem}@media (min-width:768px){.sy-prose-compact{font-size:15px}}.sy-prose-compact>*+*{margin-top:.5em}.sy-prose-compact h1{font-size:1.0625rem}.sy-prose-compact h2{font-size:1rem}.sy-prose-compact h2[data-active=true]{background:var(--sy-accent-soft);box-shadow:inset 3px 0 0 var(--sy-accent);border-radius:.375rem;margin-left:-.5rem;padding:.15em .5rem}.sy-prose-compact h3,.sy-prose-compact h4{font-size:.9375rem}.sy-prose-compact h1,.sy-prose-compact h2,.sy-prose-compact h3,.sy-prose-compact h4{margin-top:1.1em;font-weight:600}.sy-prose-compact ul,.sy-prose-compact ol{padding-left:1.2em}.sy-code span[style]{color:var(--shiki-light)}@media (prefers-color-scheme:dark){.sy-code span[style]{color:var(--shiki-dark)}}}@layer utilities{.\@container{container-type:inline-size}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.\!fixed{position:fixed!important}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:0}.inset-x-0{inset-inline:0}.inset-x-2{inset-inline:calc(var(--spacing) * 2)}.inset-y-0{inset-block:0}.inset-y-0\.5{inset-block:calc(var(--spacing) * .5)}.-top-0\.5{top:calc(var(--spacing) * -.5)}.-top-1\.5{top:calc(var(--spacing) * -1.5)}.top-0{top:0}.top-0\.5{top:calc(var(--spacing) * .5)}.top-1{top:var(--spacing)}.top-1\/2{top:50%}.top-2{top:calc(var(--spacing) * 2)}.top-16{top:calc(var(--spacing) * 16)}.top-\[calc\(var\(--safe-top\)\+0\.5rem\)\]{top:calc(var(--safe-top) + .5rem)}.top-full{top:100%}.right-0{right:0}.right-1{right:var(--spacing)}.right-2{right:calc(var(--spacing) * 2)}.-bottom-3{bottom:calc(var(--spacing) * -3)}.-bottom-px{bottom:-1px}.bottom-0{bottom:0}.bottom-3{bottom:calc(var(--spacing) * 3)}.bottom-full{bottom:100%}.left-0{left:0}.left-1\/2{left:50%}.left-2{left:calc(var(--spacing) * 2)}.left-2\.5{left:calc(var(--spacing) * 2.5)}.left-3{left:calc(var(--spacing) * 3)}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\[1\]{z-index:1}.z-\[60\]{z-index:60}.z-\[70\]{z-index:70}.col-span-3{grid-column:span 3/span 3}.col-span-full{grid-column:1/-1}.col-start-1{grid-column-start:1}.col-start-3{grid-column-start:3}.col-start-4{grid-column-start:4}.row-start-1{grid-row-start:1}.row-start-2{grid-row-start:2}.row-start-3{grid-row-start:3}.row-start-4{grid-row-start:4}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.m-0{margin:0}.-mx-4{margin-inline:calc(var(--spacing) * -4)}.mx-4{margin-inline:calc(var(--spacing) * 4)}.mx-auto{margin-inline:auto}.-my-2\.5{margin-block:calc(var(--spacing) * -2.5)}.my-1{margin-block:var(--spacing)}.-mt-4{margin-top:calc(var(--spacing) * -4)}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mt-px{margin-top:1px}.-mr-1{margin-right:calc(var(--spacing) * -1)}.-mr-1\.5{margin-right:calc(var(--spacing) * -1.5)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mr-4{margin-right:calc(var(--spacing) * 4)}.mr-auto{margin-right:auto}.-mb-px{margin-bottom:-1px}.mb-1{margin-bottom:var(--spacing)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.-ml-1\.5{margin-left:calc(var(--spacing) * -1.5)}.-ml-2{margin-left:calc(var(--spacing) * -2)}.-ml-px{margin-left:-1px}.ml-1{margin-left:var(--spacing)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-2\.5{margin-left:calc(var(--spacing) * 2.5)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-6{-webkit-line-clamp:6;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-8{-webkit-line-clamp:8;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.\!block{display:block!important}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.table{display:table}.size-1\.5{width:calc(var(--spacing) * 1.5);height:calc(var(--spacing) * 1.5)}.size-2{width:calc(var(--spacing) * 2);height:calc(var(--spacing) * 2)}.size-2\.5{width:calc(var(--spacing) * 2.5);height:calc(var(--spacing) * 2.5)}.size-3{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.size-3\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-5{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.size-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-9{width:calc(var(--spacing) * 9);height:calc(var(--spacing) * 9)}.size-10{width:calc(var(--spacing) * 10);height:calc(var(--spacing) * 10)}.size-11{width:calc(var(--spacing) * 11);height:calc(var(--spacing) * 11)}.size-\[18px\]{width:18px;height:18px}.h-0\.5{height:calc(var(--spacing) * .5)}.h-1{height:var(--spacing)}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-13{height:calc(var(--spacing) * 13)}.h-14{height:calc(var(--spacing) * 14)}.h-auto{height:auto}.h-auto\!{height:auto!important}.h-dvh{height:100dvh}.h-full{height:100%}.h-px{height:1px}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-56{max-height:calc(var(--spacing) * 56)}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-72{max-height:calc(var(--spacing) * 72)}.max-h-80{max-height:calc(var(--spacing) * 80)}.max-h-\[45dvh\]{max-height:45dvh}.max-h-\[60vh\]{max-height:60vh}.max-h-\[85dvh\]{max-height:85dvh}.max-h-\[90dvh\]{max-height:90dvh}.max-h-\[calc\(100dvh-2rem\)\]{max-height:calc(100dvh - 2rem)}.max-h-\[min\(28rem\,calc\(100dvh-8rem\)\)\]{max-height:min(28rem,100dvh - 8rem)}.max-h-\[min\(90dvh\,720px\)\]{max-height:min(90dvh,720px)}.max-h-dvh{max-height:100dvh}.min-h-0{min-height:0}.min-h-8{min-height:calc(var(--spacing) * 8)}.min-h-9{min-height:calc(var(--spacing) * 9)}.min-h-11{min-height:calc(var(--spacing) * 11)}.min-h-12{min-height:calc(var(--spacing) * 12)}.min-h-14{min-height:calc(var(--spacing) * 14)}.min-h-dvh{min-height:100dvh}.min-h-full{min-height:100%}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-5{width:calc(var(--spacing) * 5)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-52{width:calc(var(--spacing) * 52)}.w-56{width:calc(var(--spacing) * 56)}.w-60{width:calc(var(--spacing) * 60)}.w-72{width:calc(var(--spacing) * 72)}.w-96{width:calc(var(--spacing) * 96)}.w-\[6\.25rem\]{width:6.25rem}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-max{width:max-content}.w-px{width:1px}.max-w-2xl{max-width:var(--container-2xl)}.max-w-3xl{max-width:var(--container-3xl)}.max-w-16{max-width:calc(var(--spacing) * 16)}.max-w-32{max-width:calc(var(--spacing) * 32)}.max-w-40{max-width:calc(var(--spacing) * 40)}.max-w-44{max-width:calc(var(--spacing) * 44)}.max-w-56{max-width:calc(var(--spacing) * 56)}.max-w-64{max-width:calc(var(--spacing) * 64)}.max-w-\[16rem\]{max-width:16rem}.max-w-\[60vw\]{max-width:60vw}.max-w-\[80ch\]{max-width:80ch}.max-w-\[85\%\]{max-width:85%}.max-w-\[calc\(100\%-8px\)\]{max-width:calc(100% - 8px)}.max-w-\[calc\(100vw-1rem\)\]{max-width:calc(100vw - 1rem)}.max-w-\[min\(20rem\,calc\(100vw-1rem\)\)\]{max-width:min(20rem,100vw - 1rem)}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.max-w-xl{max-width:var(--container-xl)}.min-w-0{min-width:0}.min-w-5{min-width:calc(var(--spacing) * 5)}.min-w-6{min-width:calc(var(--spacing) * 6)}.min-w-11{min-width:calc(var(--spacing) * 11)}.min-w-24{min-width:calc(var(--spacing) * 24)}.min-w-48{min-width:calc(var(--spacing) * 48)}.min-w-\[6\.25rem\]{min-width:6.25rem}.min-w-full{min-width:100%}.flex-1{flex:1}.flex-\[0_1_auto\]{flex:0 auto}.flex-\[1_1_10rem\]{flex:10rem}.flex-\[1_1_12rem\]{flex:12rem}.flex-\[1_1_14rem\]{flex:14rem}.flex-\[1_1_15rem\]{flex:15rem}.flex-\[1_1_16rem\]{flex:16rem}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.basis-48{flex-basis:calc(var(--spacing) * 48)}.basis-full{flex-basis:100%}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-0\.5{--tw-translate-x:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-1{--tw-translate-x:var(--spacing);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-5{--tw-translate-x:calc(var(--spacing) * 5);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-\[18px\]{--tw-translate-x:18px;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-rotate-90{rotate:-90deg}.rotate-1{rotate:1deg}.rotate-90{rotate:90deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-col-resize{cursor:col-resize}.cursor-grab{cursor:grab}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.cursor-row-resize{cursor:row-resize}.touch-pan-y{--tw-pan-y:pan-y;touch-action:var(--tw-pan-x,) var(--tw-pan-y,) var(--tw-pinch-zoom,)}.touch-none{touch-action:none}.resize{resize:both}.resize-none{resize:none}.scroll-mt-14{scroll-margin-top:calc(var(--spacing) * 14)}.scroll-mt-16{scroll-margin-top:calc(var(--spacing) * 16)}.scroll-ml-\[6\.25rem\]{scroll-margin-left:6.25rem}.\[scrollbar-width\:none\]{scrollbar-width:none}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.appearance-none{appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.grid-cols-\[auto_minmax\(0\,1fr\)\]{grid-template-columns:auto minmax(0,1fr)}.grid-cols-\[minmax\(0\,1fr\)_auto\]{grid-template-columns:minmax(0,1fr) auto}.grid-cols-\[minmax\(0\,1fr\)_auto_auto_auto\]{grid-template-columns:minmax(0,1fr) auto auto auto}.grid-cols-\[minmax\(0\,1fr\)_minmax\(320px\,400px\)\]{grid-template-columns:minmax(0,1fr) minmax(320px,400px)}.grid-cols-\[minmax\(0\,2\.4fr\)_minmax\(0\,1fr\)_5\.5rem_minmax\(0\,1\.2fr\)_minmax\(0\,1\.4fr\)_7\.5rem_7rem_auto\]{grid-template-columns:minmax(0,2.4fr) minmax(0,1fr) 5.5rem minmax(0,1.2fr) minmax(0,1.4fr) 7.5rem 7rem auto}.grid-cols-\[minmax\(7rem\,auto\)_1fr\]{grid-template-columns:minmax(7rem,auto) 1fr}.grid-cols-\[repeat\(auto-fit\,minmax\(11rem\,1fr\)\)\]{grid-template-columns:repeat(auto-fit,minmax(11rem,1fr))}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 5) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-1\.5{column-gap:calc(var(--spacing) * 1.5)}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-x-4{column-gap:calc(var(--spacing) * 4)}.gap-x-5{column-gap:calc(var(--spacing) * 5)}.gap-y-0\.5{row-gap:calc(var(--spacing) * .5)}.gap-y-1{row-gap:var(--spacing)}.gap-y-2{row-gap:calc(var(--spacing) * 2)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-border>:not(:last-child)){border-color:var(--sy-border)}.self-center{align-self:center}.self-start{align-self:flex-start}.self-stretch{align-self:stretch}.justify-self-end{justify-self:flex-end}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-clip{overflow-x:clip}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.overflow-y-hidden{overflow-y:hidden}.overscroll-contain{overscroll-behavior:contain}.overscroll-x-contain{overscroll-behavior-x:contain}.overscroll-y-contain{overscroll-behavior-y:contain}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-t-lg{border-top-left-radius:var(--radius-lg);border-top-right-radius:var(--radius-lg)}.rounded-t-xl{border-top-left-radius:var(--radius-xl);border-top-right-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-0{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-accent{border-color:var(--sy-accent)}.border-border{border-color:var(--sy-border)}.border-border-strong{border-color:var(--sy-border-strong)}.border-danger,.border-danger\/50{border-color:var(--sy-danger)}@supports (color:color-mix(in lab, red, red)){.border-danger\/50{border-color:color-mix(in oklab, var(--sy-danger) 50%, transparent)}}.border-info{border-color:var(--sy-info)}.border-success{border-color:var(--sy-success)}.border-transparent{border-color:#0000}.border-warning{border-color:var(--sy-warning)}.bg-\[\#6e7681\]{background-color:#6e7681}.bg-\[\#30a46c\]{background-color:#30a46c}.bg-\[\#0090ff\]{background-color:#0090ff}.bg-\[\#e5484d\]{background-color:#e5484d}.bg-\[\#f76b15\]{background-color:#f76b15}.bg-accent{background-color:var(--sy-accent)}.bg-accent-fg{background-color:var(--sy-accent-fg)}.bg-accent-soft{background-color:var(--sy-accent-soft)}.bg-bg{background-color:var(--sy-bg)}.bg-black{background-color:var(--color-black)}.bg-border{background-color:var(--sy-border)}.bg-border-strong{background-color:var(--sy-border-strong)}.bg-danger{background-color:var(--sy-danger)}.bg-danger-soft{background-color:var(--sy-danger-soft)}.bg-diff-add{background-color:var(--sy-diff-add)}.bg-diff-del{background-color:var(--sy-diff-del)}.bg-diff-hunk{background-color:var(--sy-diff-hunk)}.bg-info-soft{background-color:var(--sy-info-soft)}.bg-muted{background-color:var(--sy-muted)}.bg-overlay{background-color:var(--sy-overlay)}.bg-subtle{background-color:var(--sy-subtle)}.bg-success{background-color:var(--sy-success)}.bg-success-soft{background-color:var(--sy-success-soft)}.bg-surface{background-color:var(--sy-surface)}.bg-surface-2{background-color:var(--sy-surface-2)}.bg-surface-3{background-color:var(--sy-surface-3)}.bg-transparent{background-color:#0000}.bg-warning{background-color:var(--sy-warning)}.bg-warning-soft{background-color:var(--sy-warning-soft)}.bg-white{background-color:var(--color-white)}.bg-\[conic-gradient\(var\(--sy-surface-2\)_25\%\,var\(--sy-surface\)_0_50\%\,var\(--sy-surface-2\)_0_75\%\,var\(--sy-surface\)_0\)\]{background-image:conic-gradient(var(--sy-surface-2) 25%,var(--sy-surface) 0 50%,var(--sy-surface-2) 0 75%,var(--sy-surface) 0)}.bg-\[length\:16px_16px\]{background-size:16px 16px}.fill-current{fill:currentColor}.object-cover{object-fit:cover}.p-0{padding:0}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.px-0{padding-inline:0}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-10{padding-block:calc(var(--spacing) * 10)}.pt-1{padding-top:var(--spacing)}.pt-1\.5{padding-top:calc(var(--spacing) * 1.5)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-2\.5{padding-top:calc(var(--spacing) * 2.5)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-16{padding-top:calc(var(--spacing) * 16)}.safe-pt{padding-top:var(--safe-top)}.safe-pt-1{padding-top:calc(var(--spacing) * 1 + var(--safe-top))}.safe-pt-1\.5{padding-top:calc(var(--spacing) * 1.5 + var(--safe-top))}.safe-pt-4{padding-top:calc(var(--spacing) * 4 + var(--safe-top))}.safe-pt-10{padding-top:calc(var(--spacing) * 10 + var(--safe-top))}.safe-px{padding-left:var(--safe-left);padding-right:var(--safe-right)}.pr-1{padding-right:var(--spacing)}.pr-1\.5{padding-right:calc(var(--spacing) * 1.5)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-4{padding-right:calc(var(--spacing) * 4)}.pr-6{padding-right:calc(var(--spacing) * 6)}.pr-7{padding-right:calc(var(--spacing) * 7)}.pb-1{padding-bottom:var(--spacing)}.pb-1\.5{padding-bottom:calc(var(--spacing) * 1.5)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-8{padding-bottom:calc(var(--spacing) * 8)}.pb-\[calc\(var\(--safe-bottom\)\+0\.5rem\)\]{padding-bottom:calc(var(--safe-bottom) + .5rem)}.safe-pb{padding-bottom:var(--safe-bottom)}.safe-pb-2{padding-bottom:calc(var(--spacing) * 2 + var(--safe-bottom))}.safe-pb-10{padding-bottom:calc(var(--spacing) * 10 + var(--safe-bottom))}.pl-1{padding-left:var(--spacing)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-5{padding-left:calc(var(--spacing) * 5)}.pl-6{padding-left:calc(var(--spacing) * 6)}.pl-8{padding-left:calc(var(--spacing) * 8)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-top{vertical-align:top}.font-mono{font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[11px\]{font-size:11px}.text-\[13px\]{font-size:13px}.text-\[15px\]{font-size:15px}.leading-4{--tw-leading:calc(var(--spacing) * 4);line-height:calc(var(--spacing) * 4)}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-6{--tw-leading:calc(var(--spacing) * 6);line-height:calc(var(--spacing) * 6)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-normal{white-space:normal}.whitespace-normal\!{white-space:normal!important}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.text-accent{color:var(--sy-accent)}.text-accent-fg{color:var(--sy-accent-fg)}.text-danger{color:var(--sy-danger)}.text-danger-fg{color:var(--sy-danger-fg)}.text-info{color:var(--sy-info)}.text-inherit{color:inherit}.text-muted{color:var(--sy-muted)}.text-subtle{color:var(--sy-subtle)}.text-success{color:var(--sy-success)}.text-text{color:var(--sy-text)}.text-transparent{color:#0000}.text-warning{color:var(--sy-warning)}.text-white{color:var(--color-white)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.accent-\[var\(--color-accent\)\]{accent-color:var(--color-accent)}.accent-\[var\(--sy-accent\)\]{accent-color:var(--sy-accent)}.opacity-0{opacity:0}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-pop{--tw-shadow:var(--sy-shadow);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-4{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-accent{--tw-ring-color:var(--sy-accent)}.ring-accent-soft{--tw-ring-color:var(--sy-accent-soft)}.ring-offset-2{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.ring-offset-bg{--tw-ring-offset-color:var(--sy-bg)}.outline,.outline-1{outline-style:var(--tw-outline-style);outline-width:1px}.-outline-offset-1{outline-offset:calc(1px * -1)}.outline-offset-\[-2px\]{outline-offset:-2px}.outline-warning{outline-color:var(--sy-warning)}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[flex-grow\]{transition-property:flex-grow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[width\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-all{-webkit-user-select:all;user-select:all}.select-none{-webkit-user-select:none;user-select:none}.\[-webkit-touch-callout\:none\]{-webkit-touch-callout:none}.\[overflow-anchor\:none\]{overflow-anchor:none}.group-open\:rotate-90:is(:where(.group):is([open],:popover-open,:open) *){rotate:90deg}.group-focus-within\/msg\:opacity-100:is(:where(.group\/msg):focus-within *){opacity:1}@media (hover:hover){.group-hover\:h-0\.5:is(:where(.group):hover *){height:calc(var(--spacing) * .5)}.group-hover\:w-0\.5:is(:where(.group):hover *){width:calc(var(--spacing) * .5)}.group-hover\:bg-accent:is(:where(.group):hover *){background-color:var(--sy-accent)}.group-hover\:opacity-100:is(:where(.group):hover *),.group-hover\/msg\:opacity-100:is(:where(.group\/msg):hover *){opacity:1}}.group-focus-visible\:h-0\.5:is(:where(.group):focus-visible *){height:calc(var(--spacing) * .5)}.group-focus-visible\:w-0\.5:is(:where(.group):focus-visible *){width:calc(var(--spacing) * .5)}.group-focus-visible\:bg-accent:is(:where(.group):focus-visible *){background-color:var(--sy-accent)}.group-has-\[input\:focus-visible\]\:outline-2:is(:where(.group):has(:is(input:focus-visible)) *){outline-style:var(--tw-outline-style);outline-width:2px}.group-has-\[input\:focus-visible\]\:outline-offset-2:is(:where(.group):has(:is(input:focus-visible)) *){outline-offset:2px}.group-has-\[input\:focus-visible\]\:outline-accent:is(:where(.group):has(:is(input:focus-visible)) *){outline-color:var(--sy-accent)}.placeholder\:text-subtle::placeholder{color:var(--sy-subtle)}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:inset-x-0:before{content:var(--tw-content);inset-inline:0}.before\:-inset-y-2\.5:before{content:var(--tw-content);inset-block:calc(var(--spacing) * -2.5)}.before\:content-\[\'\'\]:before{--tw-content:"";content:var(--tw-content)}.first\:pt-0:first-child{padding-top:0}.last\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.last\:pb-0:last-child{padding-bottom:0}.focus-within\:opacity-100:focus-within{opacity:1}@media (hover:hover){.hover\:border-accent-hover:hover{border-color:var(--sy-accent-hover)}.hover\:border-danger-hover:hover{border-color:var(--sy-danger-hover)}.hover\:bg-accent-hover:hover{background-color:var(--sy-accent-hover)}.hover\:bg-border:hover{background-color:var(--sy-border)}.hover\:bg-danger-hover:hover{background-color:var(--sy-danger-hover)}.hover\:bg-danger-soft:hover{background-color:var(--sy-danger-soft)}.hover\:bg-surface-2:hover{background-color:var(--sy-surface-2)}.hover\:text-text:hover{color:var(--sy-text)}.hover\:underline:hover{text-decoration-line:underline}}.focus\:not-sr-only:focus{clip-path:none;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}.focus\:absolute:focus{position:absolute}.focus\:fixed:focus{position:fixed}.focus\:inset-y-1:focus{inset-block:var(--spacing)}.focus\:top-2:focus{top:calc(var(--spacing) * 2)}.focus\:left-1:focus{left:var(--spacing)}.focus\:left-2:focus{left:calc(var(--spacing) * 2)}.focus\:z-10:focus{z-index:10}.focus\:rounded-md:focus{border-radius:var(--radius-md)}.focus\:border-accent:focus{border-color:var(--sy-accent)}.focus\:bg-surface-2:focus{background-color:var(--sy-surface-2)}.focus\:px-2:focus{padding-inline:calc(var(--spacing) * 2)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:bg-surface-3:focus-visible{background-color:var(--sy-surface-3)}.focus-visible\:underline:focus-visible{text-decoration-line:underline}.focus-visible\:opacity-100:focus-visible{opacity:1}.focus-visible\:outline:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.focus-visible\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.focus-visible\:outline-offset-0:focus-visible{outline-offset:0px}.focus-visible\:outline-offset-\[-2px\]:focus-visible{outline-offset:-2px}.focus-visible\:outline-\[var\(--sy-focus\)\]:focus-visible{outline-color:var(--sy-focus)}.focus-visible\:outline-accent:focus-visible{outline-color:var(--sy-accent)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.focus-visible\:outline-solid:focus-visible{--tw-outline-style:solid;outline-style:solid}.active\:cursor-grabbing:active{cursor:grabbing}.active\:bg-surface-2:active{background-color:var(--sy-surface-2)}.active\:bg-surface-3:active{background-color:var(--sy-surface-3)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-45:disabled{opacity:.45}.disabled\:opacity-55:disabled{opacity:.55}.disabled\:opacity-60:disabled{opacity:.6}.has-\[\:focus-visible\]\:outline-2:has(:focus-visible){outline-style:var(--tw-outline-style);outline-width:2px}.has-\[\:focus-visible\]\:outline-offset-1:has(:focus-visible){outline-offset:1px}.has-\[\:focus-visible\]\:outline-offset-2:has(:focus-visible){outline-offset:2px}.has-\[\:focus-visible\]\:outline-accent:has(:focus-visible){outline-color:var(--sy-accent)}.has-\[\[data-testid\=document-interaction\]\]\:max-w-none:has([data-testid=document-interaction]){max-width:none}.aria-\[current\=true\]\:border-accent[aria-current=true]{border-color:var(--sy-accent)}.has-\[textarea\:focus\]\:border-accent:has(:is(textarea:focus)){border-color:var(--sy-accent)}.aria-\[current\=true\]\:text-text[aria-current=true]{color:var(--sy-text)}.aria-\[invalid\=true\]\:border-danger[aria-invalid=true],.aria-\[invalid\=true\]\:focus\:border-danger[aria-invalid=true]:focus{border-color:var(--sy-danger)}@media (prefers-reduced-motion:no-preference){.motion-safe\:animate-pulse{animation:var(--animate-pulse)}}@media not all and (min-width:48rem){.max-md\:static{position:static}.max-md\:hidden{display:none}.max-md\:touch-pan-y{--tw-pan-y:pan-y;touch-action:var(--tw-pan-x,) var(--tw-pan-y,) var(--tw-pinch-zoom,)}.max-md\:overflow-hidden{overflow:hidden}}@media not all and (min-width:40rem){.max-sm\:w-full{width:100%}.max-sm\:basis-full{flex-basis:100%}}@media (min-width:1800px){.min-\[1800px\]\:text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}}@media (min-width:40rem){.sm\:col-span-2{grid-column:span 2/span 2}.sm\:col-start-auto{grid-column-start:auto}.sm\:row-start-auto{grid-row-start:auto}.sm\:mb-0{margin-bottom:0}.sm\:ml-auto{margin-left:auto}.sm\:hidden{display:none}.sm\:inline{display:inline}.sm\:max-w-48{max-width:calc(var(--spacing) * 48)}.sm\:flex-1{flex:1}.sm\:basis-auto{flex-basis:auto}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-\[minmax\(0\,1fr\)_minmax\(0\,1fr\)_auto\]{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto}.sm\:grid-cols-\[minmax\(8rem\,12rem\)_minmax\(0\,1fr\)\]{grid-template-columns:minmax(8rem,12rem) minmax(0,1fr)}.sm\:flex-row{flex-direction:row}.sm\:flex-wrap{flex-wrap:wrap}.sm\:items-center{align-items:center}.sm\:items-start{align-items:flex-start}.sm\:justify-center{justify-content:center}.sm\:text-center{text-align:center}}@media (min-width:48rem){.md\:sticky{position:sticky}.md\:-top-3{top:calc(var(--spacing) * -3)}.md\:top-0{top:0}.md\:top-auto{top:auto}.md\:bottom-\[calc\(var\(--safe-bottom\)\+1rem\)\]{bottom:calc(var(--safe-bottom) + 1rem)}.md\:-mx-6{margin-inline:calc(var(--spacing) * -6)}.md\:mx-6{margin-inline:calc(var(--spacing) * 6)}.md\:block{display:block}.md\:grid{display:grid}.md\:h-8{height:calc(var(--spacing) * 8)}.md\:grid-cols-\[13rem_minmax\(0\,1fr\)\]{grid-template-columns:13rem minmax(0,1fr)}.md\:flex-row{flex-direction:row}.md\:flex-wrap{flex-wrap:wrap}.md\:items-end{align-items:flex-end}.md\:gap-3{gap:calc(var(--spacing) * 3)}.md\:gap-8{gap:calc(var(--spacing) * 8)}.md\:px-4{padding-inline:calc(var(--spacing) * 4)}.md\:px-6{padding-inline:calc(var(--spacing) * 6)}.md\:text-center{text-align:center}.md\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media (min-width:80rem){.xl\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.xl\:items-start{align-items:flex-start}}@media (min-width:96rem){.\32 xl\:max-w-\[100ch\]{max-width:100ch}.\32 xl\:grid-cols-\[15rem_minmax\(0\,1fr\)\]{grid-template-columns:15rem minmax(0,1fr)}.\32 xl\:grid-cols-\[minmax\(0\,1fr\)_390px\]{grid-template-columns:minmax(0,1fr) 390px}}@container (width>=304px){.\@min-\[304px\]\:inline{display:inline}.\@min-\[304px\]\:size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.\@min-\[304px\]\:flex-nowrap{flex-wrap:nowrap}.\@min-\[304px\]\:text-\[15px\]{font-size:15px}}@container (width>=320px){.\@min-\[320px\]\:col-span-1{grid-column:span 1/span 1}.\@min-\[320px\]\:col-start-2{grid-column-start:2}.\@min-\[320px\]\:row-start-1{grid-row-start:1}.\@min-\[320px\]\:row-start-2{grid-row-start:2}.\@min-\[320px\]\:row-start-3{grid-row-start:3}.\@min-\[320px\]\:max-w-\[84px\]{max-width:84px}.\@min-\[320px\]\:pr-12{padding-right:calc(var(--spacing) * 12)}.\@min-\[320px\]\:text-\[20px\]{font-size:20px}}@container (width>=360px){.\@min-\[360px\]\:max-w-28{max-width:calc(var(--spacing) * 28)}}@media (pointer:coarse){.pointer-coarse\:opacity-100{opacity:1}}@media (pointer:fine){.pointer-fine\:inline-flex{display:inline-flex}.pointer-fine\:h-8{height:calc(var(--spacing) * 8)}.pointer-fine\:h-9{height:calc(var(--spacing) * 9)}}.\[\&_h2\]\:scroll-mt-14 h2{scroll-margin-top:calc(var(--spacing) * 14)}.\[\&_td\]\:min-w-28 td{min-width:calc(var(--spacing) * 28)}.\[\&_td\]\:border td{border-style:var(--tw-border-style);border-width:1px}.\[\&_td\]\:border-border td{border-color:var(--sy-border)}.\[\&_td\]\:px-2 td{padding-inline:calc(var(--spacing) * 2)}.\[\&_td\]\:py-1 td{padding-block:var(--spacing)}.\[\&_td\]\:align-top td{vertical-align:top}.\[\&_th\]\:min-w-28 th{min-width:calc(var(--spacing) * 28)}.\[\&_th\]\:border th{border-style:var(--tw-border-style);border-width:1px}.\[\&_th\]\:border-border th{border-color:var(--sy-border)}.\[\&_th\]\:bg-surface-2 th{background-color:var(--sy-surface-2)}.\[\&_th\]\:px-2 th{padding-inline:calc(var(--spacing) * 2)}.\[\&_th\]\:py-1 th{padding-block:var(--spacing)}.\[\&_th\]\:text-left th{text-align:left}.\[\&\:\:-moz-range-thumb\]\:size-4::-moz-range-thumb{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&\:\:-webkit-details-marker\]\:hidden::-webkit-details-marker{display:none}.\[\&\:\:-webkit-slider-thumb\]\:size-4::-webkit-slider-thumb{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&\:\:-webkit-slider-thumb\]\:appearance-none::-webkit-slider-thumb{appearance:none}.\[data-keyboard-composer\]\:visible:is(data-keyboard-composer),.\[data-keyboard-default\]\:visible:is(data-keyboard-default),.\[data-keyboard-search\]\:visible:is(data-keyboard-search){visibility:visible}.\[\&\>button\]\:min-h-11>button{min-height:calc(var(--spacing) * 11)}.\[\&\>button\]\:flex-col>button{flex-direction:column}.\[\&\>button\]\:gap-0>button{gap:0}.\[\&\>button\]\:px-1>button{padding-inline:var(--spacing)}.\[\&\>button\]\:text-xs>button{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}@container (width>=320px){.\@min-\[320px\]\:\[\&\>button\]\:flex-row>button{flex-direction:row}.\@min-\[320px\]\:\[\&\>button\]\:gap-1\.5>button{gap:calc(var(--spacing) * 1.5)}.\@min-\[320px\]\:\[\&\>button\]\:text-\[13px\]>button{font-size:13px}}.\[\&\>button\:nth-of-type\(2\)\]\:flex-\[1\.4\]>button:nth-of-type(2){flex:1.4}.\[\&\>option\]\:text-text>option{color:var(--sy-text)}.\[\&\>span\]\:sr-only>span{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.\[\&\>svg\]\:size-\[18px\]>svg{width:18px;height:18px}@media (pointer:coarse){.\[\@media\(pointer\:coarse\)\]\:opacity-100{opacity:1}}}:root{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark;--sy-bg:#f8fafc;--sy-surface:#fff;--sy-surface-2:#f1f5f9;--sy-surface-3:#e2e8f0;--sy-border:#d5dce5;--sy-border-strong:#94a3b8;--sy-text:#0f172a;--sy-muted:#475569;--sy-subtle:#64748b;--sy-accent:#2563eb;--sy-accent-hover:#1d4ed8;--sy-accent-fg:#fff;--sy-accent-soft:#dbeafe;--sy-success:#15803d;--sy-success-soft:#dcfce7;--sy-warning:#b45309;--sy-warning-soft:#fef3c7;--sy-danger:#b91c1c;--sy-danger-hover:#991b1b;--sy-danger-fg:#fff;--sy-danger-soft:#fee2e2;--sy-info:#0369a1;--sy-info-soft:#e0f2fe;--sy-diff-add:#e6f6ea;--sy-diff-del:#fbe9e9;--sy-diff-hunk:#eef2f7;--sy-focus:#2563eb;--sy-overlay:#0f172a66;--sy-shadow:0 10px 30px #0f172a1f, 0 2px 6px #0f172a14;--rail-width:64px;--rail-expanded-width:200px;--bottom-nav-height:56px;--safe-top:env(safe-area-inset-top,0px);--safe-right:env(safe-area-inset-right,0px);--safe-bottom:env(safe-area-inset-bottom,0px);--safe-left:env(safe-area-inset-left,0px)}@media (prefers-color-scheme:dark){:root{--lightningcss-light: ;--lightningcss-dark:initial;--sy-bg:#0f1115;--sy-surface:#161a20;--sy-surface-2:#1d222a;--sy-surface-3:#262c36;--sy-border:#2e3541;--sy-border-strong:#4b5565;--sy-text:#e6e9ee;--sy-muted:#a3acb9;--sy-subtle:#8892a0;--sy-accent:#60a5fa;--sy-accent-hover:#93c5fd;--sy-accent-fg:#0b1220;--sy-accent-soft:#1e3a5f;--sy-success:#4ade80;--sy-success-soft:#14321f;--sy-warning:#fbbf24;--sy-warning-soft:#3a2c0c;--sy-danger:#f87171;--sy-danger-hover:#fca5a5;--sy-danger-fg:#1f0a0a;--sy-danger-soft:#3b1515;--sy-info:#38bdf8;--sy-info-soft:#0c2a3a;--sy-diff-add:#12291b;--sy-diff-del:#2f1517;--sy-diff-hunk:#1b2330;--sy-focus:#93c5fd;--sy-overlay:#0000008c;--sy-shadow:0 10px 30px #00000080, 0 2px 6px #0006}}@keyframes sy-sheet-in{0%{transform:translateY(100%)}}@keyframes sy-drawer-in{0%{transform:translate(100%)}}@keyframes sy-pop-in{0%{opacity:0;transform:scale(.97)}}@keyframes sy-fade-in{0%{opacity:0}}@keyframes sy-slide-from-right{0%{opacity:.4;transform:translate(24px)}}@keyframes sy-slide-from-left{0%{opacity:.4;transform:translate(-24px)}}@media (prefers-reduced-motion:reduce){*,:before,:after{transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}.animate-spin{animation:2.4s linear infinite spin!important}.sy-motion{transition-duration:.2s!important}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-pan-x{syntax:"*";inherits:false}@property --tw-pan-y{syntax:"*";inherits:false}@property --tw-pinch-zoom{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{D as e}from"./states-
|
|
2
|
-
//# sourceMappingURL=link-2-
|
|
1
|
+
import{D as e}from"./states-CM1Zt9qO.js";var t={name:`link-2`,size:24,node:[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]};t.node;var n=e(t);export{n as t};
|
|
2
|
+
//# sourceMappingURL=link-2-DXaJEVgz.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link-2-
|
|
1
|
+
{"version":3,"file":"link-2-DXaJEVgz.js","names":["createLucideIcon","__iconData","Link2"],"sources":["../../../../node_modules/.pnpm/lucide-react@1.61.0_@types+react@19.3.0_react@19.3.1/node_modules/lucide-react/dist/esm/icons/link-2.mjs"],"sourcesContent":["/**\n * @license lucide-react v1.61.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconData = {\n name: \"link-2\",\n size: 24,\n node: [\n [\"path\", { d: \"M9 17H7A5 5 0 0 1 7 7h2\", key: \"8i5ue5\" }],\n [\"path\", { d: \"M15 7h2a5 5 0 1 1 0 10h-2\", key: \"1b9ql8\" }],\n [\"line\", { x1: \"8\", x2: \"16\", y1: \"12\", y2: \"12\", key: \"1jonct\" }]\n ]\n};\n__iconData.node;\nconst Link2 = createLucideIcon(__iconData);\n\nexport { __iconData, Link2 as default };\n//# sourceMappingURL=link-2.mjs.map\n"],"ignoreList":[0],"mappings":"A,yCASA,IAAMC,EAAa,CACjB,KAAM,SACN,KAAM,GACN,KAAM,CACJ,CAAC,OAAQ,CAAE,EAAG,0BAA2B,IAAK,QAAS,CAAC,EACxD,CAAC,OAAQ,CAAE,EAAG,4BAA6B,IAAK,QAAS,CAAC,EAC1D,CAAC,OAAQ,CAAE,GAAI,IAAK,GAAI,KAAM,GAAI,KAAM,GAAI,KAAM,IAAK,QAAS,CAAC,CACnE,CACF,EACAA,EAAW,KACX,IAAMC,EAAQF,EAAiBC,CAAU,E"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`).length>=12)}function
|
|
3
|
-
`)){/^\s*```/.test(r)&&(n=!n);let e=n?null:/^##\s+(.+?)\s*$/.exec(r);e?.[1]&&t.push({text:e[1],id:U(e[1])})}return t}function ve(e,t){let[n,r]=(0,q.useState)(null),[i,a]=(0,q.useState)(null),o=e.join(`|`);(0,q.useEffect)(()=>{if(typeof IntersectionObserver>`u`||!e.length)return;let n=e.map(e=>t.current?.querySelector(`#${CSS.escape(e)}`)).filter(e=>!!e),i=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&r(t.target.id)},{rootMargin:`-56px 0px -70% 0px`});for(let e of n)i.observe(e);let o=()=>a(null);return window.addEventListener(`wheel`,o,{passive:!0}),window.addEventListener(`touchmove`,o,{passive:!0}),window.addEventListener(`keydown`,o),()=>{i.disconnect(),window.removeEventListener(`wheel`,o),window.removeEventListener(`touchmove`,o),window.removeEventListener(`keydown`,o)}},[o,t]);let s=i??n;return(0,q.useEffect)(()=>{let e=t.current;if(e){for(let t of e.querySelectorAll(`h2[data-active]`))delete t.dataset.active;if(s){let t=e.querySelector(`#${CSS.escape(s)}`);t&&(t.dataset.active=`true`)}}},[s,o,t]),[s,a]}function ye({id:e,interaction:t,node:n,onRespond:r,busy:i,disabled:a,disabledReason:o,part:c,planAnchorId:l,mobile:u,sticky:d,flush:f,className:p}){let h=(0,q.useRef)(null),g=(0,q.useRef)(null),v=(0,q.useRef)(null),y=pe(v),[b,x]=(0,q.useState)(!1),C=de(n),{title:w,rest:T}=ge((C?.body.t===`section`?C.body.children.find(e=>e.t===`markdown`):void 0)?.text??``),E=_e(T),[D,O]=ve(E.map(e=>e.id),h);if(C?.body.t!==`section`)return null;let k=C.actions.actions,A=C.body.children.find(e=>e.t===`section`),j=t.title,M=w??j,N=e=>{x(!1),r({kind:`action`,actionId:e})},P=(e,t)=>e===0||t===`primary`?`primary`:t===`danger`?`danger`:`secondary`,L=!a&&!y,R=`h-auto! min-h-9 min-w-0 py-1.5 text-left leading-tight whitespace-normal!`,z=e=>fe(e,`start`),B=()=>c===`answers`?l?document.getElementById(l):null:g.current,V=c!==`answers`||l!==void 0,U=u?(0,J.jsxs)(J.Fragment,{children:[V&&(0,J.jsx)(S,{label:`Plan start`,icon:(0,J.jsx)(F,{className:`size-4`}),variant:`secondary`,onClick:()=>z(B())}),k.length>2?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(s,{variant:`primary`,disabled:i,className:m(R,`flex-1`),onClick:()=>N(k[0].id),children:k[0].label}),(0,J.jsxs)(s,{variant:`secondary`,onClick:()=>x(!0),children:[`More (`,k.length-1,`)`]})]}):k.map((e,t)=>(0,J.jsx)(s,{variant:P(t,e.tone),disabled:i,className:m(R,`flex-1`),onClick:()=>N(e.id),children:e.label},e.id))]}):(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`span`,{className:`max-w-[16rem] min-w-0 shrink truncate text-sm font-medium`,title:j,children:j}),(0,J.jsx)(`div`,{className:`grid min-w-0 flex-1 grid-cols-[repeat(auto-fit,minmax(11rem,1fr))] gap-2`,children:k.map((e,t)=>(0,J.jsx)(s,{variant:P(t,e.tone),disabled:i,className:m(R,`w-full md:text-center`),onClick:()=>N(e.id),children:e.label},e.id))}),V&&(0,J.jsx)(S,{label:`Plan start`,icon:(0,J.jsx)(F,{className:`size-4`}),variant:`secondary`,size:`sm`,onClick:()=>z(B())})]}),W=(0,J.jsx)(_,{open:b,onClose:()=>x(!1),title:j,children:(0,J.jsx)(`div`,{className:`flex flex-col gap-2`,children:k.map((e,t)=>(0,J.jsx)(s,{block:!0,variant:P(t,e.tone),disabled:i,className:R,onClick:()=>N(e.id),children:e.label},e.id))})});if(c===`answers`)return(0,J.jsxs)(`article`,{"aria-label":`Question: ${j}`,"data-testid":`plan-answers`,className:m(`flex min-w-0 flex-col gap-2`,p),children:[u&&(0,J.jsx)(`p`,{className:`text-sm font-medium`,children:j}),o?(0,J.jsx)(`p`,{className:`text-sm text-muted`,children:o}):(0,J.jsx)(`div`,{"data-testid":`answer-bar`,className:`flex min-w-0 items-center gap-2 md:gap-3`,children:U}),W]});let G=c===`reader`;return(0,J.jsxs)(`article`,{id:e,"data-testid":`document-interaction`,"aria-label":`Question: ${j}`,className:m(`w-full min-w-0 self-stretch border-t border-border`,p),children:[(0,J.jsxs)(`header`,{className:m(`z-10 flex min-w-0 items-center gap-2 border-b border-border bg-bg px-4 py-2 md:px-6`,d&&(f?`md:sticky md:top-0`:`max-md:static md:sticky md:-top-3`)),children:[(0,J.jsx)(`h3`,{className:`min-w-0 flex-1 truncate text-[15px] leading-snug font-semibold md:text-sm`,children:M}),u&&!G&&(0,J.jsx)(ee,{kind:`interaction`,value:t.state,size:`sm`,className:`[&>span]:sr-only`}),!G&&!a&&!y&&(0,J.jsx)(H,{size:`xs`,className:`shrink-0`,onClick:()=>fe(v.current,`center`),children:`Jump to options ↓`})]}),A&&(0,J.jsx)(`aside`,{className:`mx-4 mt-3 rounded-md bg-warning-soft px-3 py-2 text-sm md:mx-6`,children:(0,J.jsx)(I,{node:A})}),(0,J.jsxs)(`div`,{className:`px-4 py-4 md:grid md:grid-cols-[13rem_minmax(0,1fr)] 2xl:grid-cols-[15rem_minmax(0,1fr)] md:gap-8 md:px-6`,children:[E.length>0&&(0,J.jsx)(`nav`,{"aria-label":`Plan sections`,className:`hidden md:block`,children:(0,J.jsxs)(`ol`,{className:`sticky top-16 flex flex-col gap-0.5 border-l border-border text-sm`,children:[(0,J.jsx)(`li`,{children:(0,J.jsx)(`button`,{type:`button`,className:`-ml-px block w-full truncate border-l-2 border-transparent py-1 pl-3 text-left text-muted hover:text-text`,onClick:()=>z(g.current),children:`Start`})}),E.map(e=>(0,J.jsx)(`li`,{children:(0,J.jsx)(`button`,{type:`button`,"aria-current":D===e.id,className:`-ml-px block w-full truncate border-l-2 border-transparent py-1 pl-3 text-left text-muted hover:text-text aria-[current=true]:border-accent aria-[current=true]:text-text`,onClick:()=>{O(e.id),z(h.current?.querySelector(`#${CSS.escape(e.id)}`)??null)},children:e.text})},e.id))]})}),(0,J.jsx)(`div`,{ref:g,className:`min-w-0 scroll-mt-14`,children:(0,J.jsx)(`div`,{ref:h,className:`sy-prose-compact max-w-[80ch] min-w-0 2xl:max-w-[100ch] min-[1800px]:text-base [&_h2]:scroll-mt-14`,children:(0,J.jsx)(te,{text:T,headingIds:!0,className:`text-inherit`})})})]}),!G&&(0,J.jsxs)(`section`,{ref:v,"data-testid":`plan-options`,"aria-label":j,className:`border-t border-border px-4 py-3 md:px-6`,children:[(0,J.jsx)(`p`,{className:`mb-2 text-sm font-medium`,children:j}),!a&&(0,J.jsx)(`div`,{className:`flex min-w-0 flex-col gap-2 md:flex-row md:flex-wrap`,children:k.map((e,t)=>(0,J.jsx)(s,{variant:P(t,e.tone),size:`md`,disabled:i,className:m(R,`md:text-center`),onClick:()=>N(e.id),children:e.label},e.id))}),(0,J.jsx)(H,{size:`xs`,className:`mt-2`,icon:(0,J.jsx)(F,{"aria-hidden":!0,className:`size-3.5`}),onClick:()=>z(g.current),children:`Back to the plan start`})]}),!G&&L&&(0,J.jsx)(`div`,{"data-testid":`answer-bar`,className:m(`z-10 flex min-w-0 items-center gap-2 border-t border-border bg-bg px-4 py-2 md:gap-3 md:px-6`,d&&!f?`sticky -bottom-3`:`sticky bottom-0`),children:U}),!G&&W]})}var be={red:`bg-[#e5484d] text-white`,orange:`bg-[#f76b15] text-white`,blue:`bg-[#0090ff] text-white`,gray:`bg-[#6e7681] text-white`,green:`bg-[#30a46c] text-white`},xe=`transform 260ms cubic-bezier(0.2, 0.9, 0.25, 1)`,Se=`input, textarea, select, [contenteditable], [data-no-swipe]`,Z=null;function Ce({leading:e=[],trailing:t=[],disabled:n,children:r,className:i,contentClassName:a}){let o=(0,q.useRef)(null),s=(0,q.useRef)(null),c=(0,q.useRef)(!1),[l,u]=(0,q.useState)(0),[d,f]=(0,q.useState)(!1),p=(0,q.useRef)(0),_=(0,q.useRef)({leading:e,trailing:t});_.current={leading:e,trailing:t};let y=!n&&(e.length>0||t.length>0),x=()=>o.current?.offsetWidth||320,S=(e,t)=>{let n=o.current;n&&(n.style.transition=t?xe:`none`,n.style.transform=e===0?``:`translateX(${e}px)`),p.current=e,u(e)},w=(0,q.useRef)(()=>{});w.current=()=>{S(0,!0),f(!1),Z===T&&(Z=null)};let[T]=(0,q.useState)(()=>()=>w.current()),E=async(e,t)=>{if(W(),e.removes){let n=x();f(!0),S(t===`leading`?n:-n,!0);try{await e.onAction()}catch{w.current();return}let r=o.current?.parentElement;r&&!window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches&&r.animate?.([{height:`${r.offsetHeight}px`},{height:`0px`}],{duration:220,easing:`cubic-bezier(0.2, 0.8, 0.2, 1)`,fill:`forwards`})}else w.current(),await e.onAction()},D=l!==0;(0,q.useEffect)(()=>{if(!D)return;let e=e=>{o.current?.parentElement?.contains(e.target)||s.current||w.current()};return document.addEventListener(`pointerdown`,e,!0),()=>document.removeEventListener(`pointerdown`,e,!0)},[D]),(0,q.useEffect)(()=>()=>{Z===T&&(Z=null)},[T]);let O=e=>{y&&e.isPrimary&&(e.pointerType===`touch`||e.pointerType===`pen`)&&(e.target.closest(Se)||(c.current=!1,s.current={id:e.pointerId,x:e.clientX,y:e.clientY,axis:null,start:p.current,raw:p.current,full:!1,samples:[]}))},k=e=>{let t=s.current;if(!t||e.pointerId!==t.id)return;let n=e.clientX-t.x;if(t.axis===null){if(t.axis=v(n,e.clientY-t.y),t.axis===null)return;if(t.axis===`y`){s.current=null;return}c.current=!0,e.currentTarget.setPointerCapture?.(e.pointerId),Z&&Z!==T&&Z()}let{leading:r,trailing:i}=_.current,a=x(),o=t.start+n;o>0&&r.length===0&&(o=g(o,a)*.15),o<0&&i.length===0&&(o=g(o,a)*.15),t.raw=o,t.samples.push({t:e.timeStamp,v:o}),t.samples=t.samples.slice(-12);let l=(o>0?r.length:i.length)*76,u=l>0&&Math.abs(o)>=b(a,l);u!==t.full&&(t.full=u,f(u),W()),S(o,!1)},A=e=>{let t=s.current;if(s.current=null,t?.axis!==`x`)return;let{leading:n,trailing:r}=_.current;if(e.type===`pointercancel`)return w.current();let i=h(t.raw,C(t.samples),{width:x(),reveal:{leading:n.length*76,trailing:r.length*76},fullSwipe:{leading:!0,trailing:!0}});if(i.kind===`close`)return w.current();let a=i.side===`leading`?n:r,o=a[0];if(!o)return w.current();if(i.kind===`commit`)return void E(o,i.side);f(!1),S((i.side===`leading`?1:-1)*a.length*76,!0),Z=T},j=l>0?`leading`:`trailing`,M=l>0?e:t,N=j===`trailing`?[...M].reverse():M;return(0,J.jsxs)(`div`,{className:m(`relative overflow-hidden`,i),"data-swipe-row":!0,children:[l!==0&&M.length>0&&(0,J.jsx)(`div`,{"aria-hidden":!0,className:m(`absolute inset-y-0 flex`,j===`leading`?`left-0`:`right-0`),style:{width:Math.abs(l)},children:N.map(e=>{let t=e===M[0];return(0,J.jsxs)(`button`,{type:`button`,tabIndex:-1,"data-swipe-action":e.id,onClick:()=>void E(e,j),style:{flexGrow:d?+!!t:1,flexBasis:0},className:m(`flex min-w-0 flex-col items-center justify-center gap-1 overflow-hidden text-xs font-semibold whitespace-nowrap transition-[flex-grow] duration-200`,be[e.tone],d&&t&&(j===`leading`?`items-start pl-6`:`items-end pr-6`)),children:[e.icon,e.label]},e.id)})}),(0,J.jsx)(`div`,{ref:o,className:m(`relative touch-pan-y bg-surface`,a),onPointerDown:O,onPointerMove:k,onPointerUp:A,onPointerCancel:A,onClickCapture:e=>{c.current?(c.current=!1,e.preventDefault(),e.stopPropagation()):p.current!==0&&(e.preventDefault(),e.stopPropagation(),w.current())},children:r})]})}function we(e){let t=r(e=>e.issues);return(0,q.useMemo)(()=>{let n=Object.values(t),r=e?A(n)(e):null;return{linked:r,candidates:e&&!r?n.filter(t=>w(t,e,n)===null).sort(O):[],canUnlink:!!r&&E(r)===null}},[t,e])}function Te({open:e,onClose:t,workspace:n,candidates:r}){let[i,o]=(0,q.useState)(null),[c,l]=(0,q.useState)(null),u=()=>{l(null),t()},d=async e=>{if(!i){o(e.id),l(null);try{await ne(e.id,n.id),B.success(`Linked to #${e.number}`),u()}catch(e){l(e)}finally{o(null)}}};return(0,J.jsx)(y,{open:e,onClose:u,title:`Link to issue`,description:`Link ${n.branch} to an issue that has no branch yet. Its sessions then stay in the issue's scope.`,footer:(0,J.jsx)(s,{onClick:u,children:`Cancel`}),children:(0,J.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[c!==null&&(0,J.jsx)(f,{compact:!0,title:`Could not link`,error:a(c)}),r.length===0&&(0,J.jsx)(`p`,{className:`text-sm text-muted`,children:`No issue without a branch in this project.`}),(0,J.jsx)(`ul`,{className:`flex min-w-0 flex-col gap-1`,children:r.map(e=>(0,J.jsx)(`li`,{className:`min-w-0`,children:(0,J.jsxs)(`button`,{type:`button`,disabled:!!i,"aria-busy":i===e.id,onClick:()=>void d(e),className:`tap flex w-full min-w-0 flex-col rounded-md px-2 py-1.5 text-left hover:bg-surface-2 disabled:opacity-55`,children:[(0,J.jsxs)(`span`,{className:`truncate text-sm`,children:[`#`,e.number,` `,e.title]}),(0,J.jsxs)(`span`,{className:`truncate text-xs text-muted`,children:[e.repository,e.board?.priority?` · ${e.board.priority.name}`:``]})]})},e.id))})]})})}var Ee=[];function De(e,n,i){let o=i&&!!e&&!n,[s,c]=(0,q.useState)(null);return(0,q.useEffect)(()=>{if(!o||!e)return;let n=new AbortController;return c({id:e,lookup:{state:`loading`}}),K.get(e,n.signal).then(e=>{r.getState().upsertSessionIfMissing(e),c(null)},r=>{n.signal.aborted||c({id:e,lookup:t(r,`not_found`)?{state:`missing`}:{state:`error`,error:a(r)}})}),()=>n.abort()},[o,e]),o?s?.id===e?s.lookup:{state:`loading`}:{state:`idle`}}function Oe(e){let t=r(t=>e?t.hosts[e.hostId]:void 0),n=r(t=>e?.projectId?t.projects[e.projectId]:void 0),i=r(t=>e?.workspaceId?t.workspaces[e.workspaceId]:void 0),a=r(e=>e.runs),o=r(e=>e.tasks),s=r(t=>e?t.adapters[e.hostId]??Ee:Ee);return(0,q.useMemo)(()=>{if(!e)return null;let r=M(a,e),c=e.taskId??r?.taskId??null;return{session:e,host:t,hostName:t?.name??`Unknown host`,link:P(t,e),project:n,workspace:i,run:r,task:c?o[c]:void 0,control:N(r),adapters:s}},[e,t,n,i,a,o,s])}function Q(e,t={}){let[n,r]=(0,q.useState)(!1),[i,o]=(0,q.useState)(null),s=(0,q.useRef)(e);s.current=e;let c=(0,q.useRef)(t);c.current=t;let l=(0,q.useRef)(!0);return(0,q.useEffect)(()=>(l.current=!0,()=>{l.current=!1}),[]),{run:(0,q.useCallback)(async(...e)=>{r(!0),o(null);try{let t=await s.current(...e),{success:n}=c.current,r=typeof n==`function`?n(t):n;return r&&B.success(r),!0}catch(e){return l.current&&o(e),c.current.errorToast&&B.error(a(e)),!1}finally{l.current&&r(!1)}},[]),busy:n,error:i,reset:(0,q.useCallback)(()=>o(null),[])}}function ke(e,t=1e3){let[n,r]=(0,q.useState)(()=>Date.now());return(0,q.useEffect)(()=>{if(!e)return;r(Date.now());let n=setInterval(()=>r(Date.now()),t);return()=>clearInterval(n)},[e,t]),n}function Ae(){let e=(0,q.useRef)(null),[t,n]=(0,q.useState)(0);return(0,q.useLayoutEffect)(()=>{let t=e.current;if(!t)return;n(t.clientWidth);let r=new ResizeObserver(([e])=>{e&&n(e.contentRect.width)});return r.observe(t),()=>r.disconnect()},[]),[e,t]}function $({label:e,value:t}){return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`dt`,{className:`text-muted`,children:e}),(0,J.jsx)(`dd`,{className:`min-w-0 font-mono text-xs break-all`,children:t})]})}function je({session:e,hostLabel:t,open:n,onClose:r}){let i=D(e),a=e.stats;return(0,J.jsx)(y,{open:n,onClose:r,title:`Session info`,children:(0,J.jsxs)(`dl`,{className:`grid grid-cols-[auto_minmax(0,1fr)] gap-x-3 gap-y-2 text-sm`,children:[(0,J.jsx)($,{label:`Switchyard session`,value:e.id}),(0,J.jsx)($,{label:`Pi session id`,value:e.nativeHandle?.sessionId??`Not started`}),(0,J.jsx)($,{label:`Session file`,value:e.nativeHandle?.sessionFile??`None yet`}),(0,J.jsx)($,{label:`Host`,value:t}),(0,J.jsx)($,{label:`Working directory`,value:e.cwd}),(0,J.jsx)($,{label:`Origin`,value:e.provenance}),(0,J.jsx)($,{label:`Profile`,value:e.profileSnapshot.name}),(0,J.jsx)($,{label:`Created`,value:o(e.createdAt)}),a?.tokens!=null&&(0,J.jsx)($,{label:`Tokens`,value:a.tokens.toLocaleString(`en-US`)}),a?.costUsd!=null&&(0,J.jsx)($,{label:`Cost`,value:`$${a.costUsd.toFixed(2)}`}),i&&(0,J.jsx)($,{label:`Context`,value:`${i.label} (${i.detail})`})]})})}function Me(t){let{session:o,run:c,control:l}=t,u=p(),[d,m]=(0,q.useState)(null),[h,g]=(0,q.useState)(o.title),_=we(o.provenance===`subagent`?null:t.workspace),v=r(e=>e.attention),b=(0,q.useMemo)(()=>Object.values(v).filter(e=>e.sessionId===o.id&&!e.resolvedAt&&n(e.reason)),[v,o.id]),S=r(e=>{if(o.provenance===`subagent`||o.archivedAt)return!1;let t=Object.values(e.sessions).filter(e=>e.archivedAt===null&&e.provenance!==`subagent`&&(o.workspaceId?e.workspaceId===o.workspaceId:e.workspaceId===null&&e.hostId===o.hostId&&e.cwd===o.cwd));return j(t)?.id===o.id}),C=Q(()=>K.takeover(o.id),{success:`You have control. Automatic continuations are paused.`,errorToast:!0}),w=Q(()=>K.returnToAutomation(o.id),{success:`Returned to automation.`,errorToast:!0}),E=Q(()=>K.stop(o.id),{success:`Session stopped.`}),D=Q(()=>K.resume(o.id),{success:`Session resumed.`,errorToast:!0}),O=Q(e=>K.rename(o.id,e),{success:`Session renamed.`}),A=Q(()=>K.cacheAlert(o.id,!o.cacheAlert),{errorToast:!0}),M=Q(()=>K.archive(o.id),{success:`Session archived.`}),N=Q(()=>K.unarchive(o.id),{success:`Session unarchived.`,errorToast:!0}),P=t.link===`connected`,F=()=>{m(null),E.reset(),O.reset(),M.reset()},I=T(o)?`Stop the session before archiving it`:null,R=(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(x,{open:d===`stop`,onClose:F,title:`Stop this session?`,description:`Stops the current execution and clears queued messages.`,confirmLabel:`Stop session`,busy:E.busy,error:E.error,errorTitle:`Could not stop`,onConfirm:()=>void E.run().then(e=>e&&m(null)),children:(0,J.jsx)(`p`,{className:`text-sm text-muted`,children:c?`The task keeps its run, marked interrupted and blocked (Stopped by user). Automation settings are unchanged.`:`Pi stays available; you can send a new message afterwards.`})}),(0,J.jsx)(y,{open:d===`rename`,onClose:F,title:`Rename session`,footer:(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(s,{onClick:F,children:`Cancel`}),(0,J.jsx)(s,{variant:`primary`,type:`submit`,form:`sy-rename-form`,busy:O.busy,disabled:!h.trim(),children:`Save`})]}),children:(0,J.jsxs)(`form`,{id:`sy-rename-form`,onSubmit:e=>{e.preventDefault(),h.trim()&&O.run(h.trim()).then(e=>e&&m(null))},className:`flex flex-col gap-2`,children:[(0,J.jsx)(L,{id:`sy-rename-input`,label:`Title`,children:(0,J.jsx)(z,{id:`sy-rename-input`,value:h,maxLength:200,onChange:e=>g(e.target.value)})}),O.error!==null&&(0,J.jsx)(f,{compact:!0,title:`Could not rename`,error:a(O.error)})]})}),(0,J.jsx)(x,{open:d===`archive`,onClose:F,title:`Archive this session?`,description:`It leaves the navigator. The Pi session file stays on the host.`,danger:!1,confirmLabel:`Archive`,busy:M.busy,error:M.error,errorTitle:`Could not archive`,onConfirm:()=>void M.run().then(e=>{e&&(m(null),u(`/code`))}),children:o.runtime===`idle`&&(0,J.jsx)(`p`,{className:`text-sm text-muted`,children:`The idle Pi process is stopped first.`})}),t.workspace&&(0,J.jsx)(Te,{open:d===`link`,onClose:F,workspace:t.workspace,candidates:_.candidates}),(0,J.jsx)(je,{session:o,hostLabel:`${t.hostName} (${t.link})`,open:d===`info`,onClose:F})]});return{canTakeover:l===`automation`,canReturn:l===`human`,canStop:T(o)&&P,canResume:!k(o)&&!!o.nativeHandle&&!o.readOnly&&P,archiveBlocked:I,takeover:()=>void C.run(),returnToAutomation:()=>void w.run(),requestStop:()=>m(`stop`),resume:()=>void D.run(),openRename:()=>{g(o.title),m(`rename`)},requestArchive:()=>{I?B.info(I):m(`archive`)},openInfo:()=>m(`info`),toggleCacheAlert:()=>void A.run(),unarchive:()=>void N.run(),dismissAttention:b.length>0?()=>{Promise.all(b.map(Ne)).then(()=>B.success(`Cleared. A question Pi is still waiting on stays.`)).catch(e=>B.error(a(e)))}:null,setPinned:(t,n)=>{let r=`/api/scopes/${encodeURIComponent(t)}/sessions/${encodeURIComponent(o.id)}`;(n?i(r):e(r)).catch(e=>B.error(a(e)))},isPrimary:S,setPrimary:e=>{K.setPrimary(o.id,e).catch(e=>B.error(a(e)))},newInBranch:o.projectId&&o.workspaceId?()=>{K.createSession({projectId:o.projectId,workspace:{existingId:o.workspaceId},prompt:``}).then(e=>{r.getState().upsertSessionIfMissing(e),u(`/code/${encodeURIComponent(e.id)}`)}).catch(e=>B.error(a(e)))}:null,issueLink:t.workspace&&o.provenance!==`subagent`?{..._,open:()=>m(`link`),unlink:()=>{let e=_.linked;e&&G(e.id).then(()=>B.success(`Unlinked from #${e.number}`)).catch(e=>B.error(a(e)))}}:null,busy:{takeover:C.busy,ret:w.busy,stop:E.busy,resume:D.busy,unarchive:N.busy},dialogs:R}}async function Ne(e){let t=await i(`/api/attention/${encodeURIComponent(e.id)}/dismiss`),n=t&&typeof t==`object`&&`id`in t?t:{...e,resolvedAt:new Date().toISOString()};return r.setState(t=>t.attention[e.id]?{attention:{...t.attention,[e.id]:n}}:{}),n}var Pe=[`needs_input`,`failed`,`ready_for_review`,`unsupported_interaction`,`host_unreachable`,`cache_expiring`];function Fe(e){let t=Object.fromEntries(Pe.map(e=>[e,[]]));for(let n of e)t[n.reason]?.push(n);return t}var Ie={dismiss:`Marks it as seen and moves it to Dismissed; it stays open, and a question keeps flagging its session.`,clear:`Resolves it now: the session loses this flag and the item moves to History.`,clearNeedsInput:`Removes this session's Needs input flag and moves it to History; a question Pi is still waiting on stays.`};function Le(e){return e===`dismissed`||e===`history`?e:`open`}function Re(e,t){return t===`history`?[]:e.filter(e=>t===`open`?!e.acknowledgedAt:!!e.acknowledgedAt)}function ze(e,t,n){return[e?.name,t?.title,n&&n.title!==t?.title?n.title:null].filter(Boolean).join(` · `)||`Switchyard`}export{X as _,Le as a,Me as c,Q as d,ke as f,le as g,Ce as h,Fe as i,je as l,De as m,Pe as n,Re as o,Oe as p,ze as r,Ne as s,Ie as t,Ae as u,he as v,oe as y};
|
|
4
|
-
//# sourceMappingURL=logic-
|
|
1
|
+
import{$t as e,Jt as t,St as n,W as r,Zt as i,_ as a,_n as o,d as s,en as c,fn as l,g as u,m as d,mn as f,n as p,v as m}from"./states-CM1Zt9qO.js";import{_ as h,g,i as _,m as v,n as y,p as b,t as x,u as S,v as C}from"./Overlay-wZFuaSA5.js";import{D as w,Ft as T,H as E,Lt as D,R as O,Rt as k,V as A,Vt as j,ut as M,v as N,zt as P}from"./selection-BVtvp1aZ.js";import{t as F}from"./arrow-up-poMxdOwI.js";import{t as I}from"./UINodeRenderer-_99GFFDS.js";import{t as L}from"./Field-DRcZixOF.js";import{t as R}from"./useBreakpoint-CdYPa6z0.js";import{$ as ee,G as z,K as B,W as V}from"./index-CbdB9RE5.js";import{t as H}from"./TextLink-irMcg7Xz.js";import{n as U,t as te}from"./Markdown-BaCvc-cI.js";import{t as W}from"./haptics-O69vKVoK.js";import{a as G,n as ne,t as K}from"./api-CzS9UH7Q.js";var q=o(f(),1),re=`This dialog can't be answered from Switchyard.`,ie=`An extension is showing its own interface in this session's terminal. Open the terminal (switchyard tui) to answer it.`,ae=`This dialog can only be answered in the terminal where Pi is running.`,oe=[{id:`abort`,label:`Stop the run`,tone:`danger`},{id:`message`,label:`Send a message to Pi`,tone:`primary`}];function se(e){if(e.t===`actions`)return e;if(e.t===`section`)for(let t of e.children){let e=se(t);if(e)return e}return null}function ce(e){if(e.t===`text`)return e.text.trim()||null;if(e.t===`section`)for(let t of e.children){let e=ce(t);if(e)return e}return null}function le(e){return e.state===`unsupported`||e.source.kind===`unsupported_custom`}function ue(e){let t=(se(e.presentation)?.actions??[]).filter(e=>e.id===`abort`||e.id===`message`).map(e=>({id:e.id,label:e.label,tone:e.tone==="default"?`secondary`:e.tone??(e.id===`abort`?`danger`:`primary`)})),n=ce(e.presentation);return{answerable:e.state===`unsupported`&&e.resolution===null,actions:t.length>0?t:oe,copy:n===ie?ae:n??`This dialog can't be answered from Switchyard.`}}function de(e){return e===`running`||e===`waiting_input`?`followUp`:`prompt`}var J=d();function Y(e){switch(e.t){case`form`:case`confirm`:case`actions`:return!0;case`list`:return e.items.some(Y);case`section`:return e.children.some(Y);case`tabs`:return e.tabs.some(e=>e.children.some(Y));default:return!1}}function X(e){return e===`host`?`the host`:e===`pi`?`Pi`:`a device`}function fe({interaction:t,readOnlyReason:n,className:a,onAnswered:o,id:l,sticky:d,flush:f,mode:h=`card`,keys:g=!0,planAnchorId:_}){let v=r(e=>e.upsertInteraction),[y,b]=(0,q.useState)(!1),[x,S]=(0,q.useState)(null),[C,w]=(0,q.useState)(null),[T,E]=(0,q.useState)(null),[D,O]=(0,q.useState)(null),k=D&&D.id===t.id&&D.revision>t.revision?D:t,A=k.state===`pending`,j=le(k),M=r(e=>e.sessions[k.sessionId]?.runtime),[N,P]=(0,q.useState)(!1),[F,L]=(0,q.useState)(``),z=async e=>{b(!0),S(null),E(e);try{let t=await i(`/api/interactions/${encodeURIComponent(k.id)}/answer`,{revision:k.revision,response:e});return t?.interaction&&(v(t.interaction),O(t.interaction),o?.(t.interaction)),!0}catch(e){if(c(e,`already_answered`)){let t=e.details?.interaction;t&&(v(t),O(t)),w(t?.resolution?.summary??`answered on another device`)}else S(e);return!1}finally{b(!1)}},B=async()=>{let e=F.trim();if(e){b(!0),S(null);try{await i(`/api/sessions/${encodeURIComponent(k.sessionId)}/prompt`,{text:e,mode:de(M)})}catch(e){S(e),b(!1);return}b(!1),await z({kind:`action`,actionId:`message`})&&(P(!1),L(``))}},V=R();if(A&&!C&&!j&&ve(k.presentation))return(0,J.jsx)(Se,{id:l,interaction:k,node:k.presentation,onRespond:e=>void z(e),busy:y,disabled:!!n,disabledReason:n??null,part:h===`reader`?`reader`:h===`dock`?`answers`:`all`,planAnchorId:_,mobile:V===`mobile`,sticky:d??!0,flush:f??!1,className:a});let H=h===`dock`;return(0,J.jsxs)(`article`,{id:l,"aria-label":`Question: ${k.title}`,className:m(H?`flex min-w-0 flex-col gap-2`:`flex min-w-0 flex-col gap-3 border-l-2 py-1 pl-3`,!H&&(A?`border-warning`:`border-border`),a),children:[H?(0,J.jsx)(`h3`,{className:`text-sm font-semibold break-words`,children:k.title}):(0,J.jsxs)(`header`,{className:`flex min-w-0 flex-wrap items-start gap-2`,children:[(0,J.jsx)(`h3`,{className:`min-w-0 flex-1 text-sm font-semibold break-words`,children:k.title}),(0,J.jsx)(ee,{kind:`interaction`,value:k.state,size:`sm`})]}),C&&(0,J.jsxs)(`p`,{role:`status`,className:`rounded-md bg-surface-2 px-3 py-2 text-sm`,children:[`Already answered: `,C]}),j?(0,J.jsx)(pe,{interaction:k,readOnlyReason:n??null,busy:y,answered:C!==null,composing:N,message:F,setMessage:L,onAction:e=>{e===`message`?P(!0):z({kind:`action`,actionId:e})},onSend:()=>void B(),onCancelMessage:()=>P(!1)}):A&&!C?(0,J.jsxs)(J.Fragment,{children:[n&&(0,J.jsx)(`p`,{className:`text-sm text-muted`,children:n}),(0,J.jsx)(I,{node:k.presentation,onRespond:e=>void z(e),busy:y,disabled:!!n,dock:H?{title:k.title,keys:g&&k.kind===`question`}:void 0}),!n&&!Y(k.presentation)&&(0,J.jsx)(`div`,{children:(0,J.jsx)(s,{busy:y,onClick:()=>void z({kind:`cancel`}),children:`Dismiss`})}),y&&(0,J.jsx)(`p`,{role:`status`,className:`text-sm text-muted`,children:`Sending answer… waiting for the host to confirm.`})]}):C?null:k.resolution?(0,J.jsxs)(`p`,{className:`text-sm text-muted`,children:[k.state===`resolved`?`Answered`:`Closed`,` by`,` `,X(k.resolution.by),` `,u(k.resolution.at),`:`,` `,(0,J.jsx)(`span`,{className:`text-text`,children:k.resolution.summary})]}):(0,J.jsx)(`p`,{className:`text-sm text-muted`,children:k.state===`expired`?`This question expired before it was answered (Pi closed the dialog).`:`This question was canceled.`}),x!==null&&(0,J.jsx)(p,{compact:!0,title:`Answer not delivered`,error:e(x),onRetry:T?()=>void z(T):void 0})]})}function pe({interaction:e,readOnlyReason:t,busy:n,answered:r,composing:i,message:a,setMessage:o,onAction:c,onSend:l,onCancelMessage:d}){let f=ue(e);return(0,J.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,J.jsx)(`p`,{className:`text-sm text-muted`,children:f.copy}),e.resolution?(0,J.jsxs)(`p`,{className:`text-sm text-muted`,children:[`Chosen by `,X(e.resolution.by),` `,u(e.resolution.at),`: `,(0,J.jsx)(`span`,{className:`text-text`,children:e.resolution.summary})]}):!f.answerable||r?null:t?(0,J.jsx)(`p`,{className:`text-sm text-muted`,children:t}):i?(0,J.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,J.jsx)(V,{"aria-label":`Message for Pi`,value:a,onChange:e=>o(e.target.value),rows:3,autoFocus:!0,placeholder:`Tell Pi what to do instead`}),(0,J.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,J.jsx)(s,{variant:`primary`,busy:n,disabled:!a.trim(),onClick:l,children:`Send message`}),(0,J.jsx)(s,{disabled:n,onClick:d,children:`Cancel`})]})]}):(0,J.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:f.actions.map(e=>(0,J.jsx)(s,{variant:e.tone,busy:n&&e.id===`abort`,disabled:n,onClick:()=>c(e.id),children:e.label},e.id))})]})}function me(e){if(e.t!==`section`||e.children.length<2)return null;let t=e.children[e.children.length-1];if(t?.t!==`actions`)return null;let n=e.children.slice(0,-1);return n.some(Y)?null:{body:{...e,children:n},actions:t}}function he(e,t){let n=window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches;e?.scrollIntoView({behavior:n?`auto`:`smooth`,block:t})}function ge(e){let[t,n]=(0,q.useState)(!0);return(0,q.useEffect)(()=>{let t=e.current;if(!t||typeof IntersectionObserver>`u`)return;let r=new IntersectionObserver(([e])=>n(!!e?.isIntersecting));return r.observe(t),()=>r.disconnect()},[e]),t}function _e(e){if(e.t===`markdown`)return e.text;if(e.t===`section`)for(let t of e.children){let e=_e(t);if(e!==null)return e}return null}function ve(e){if(!me(e))return!1;let t=_e(e);return t!==null&&(t.length>=400||t.split(`
|
|
2
|
+
`).length>=12)}function ye(e){let t=/^\s*#{1,6}\s+(.+?)\s*(?:\n+|$)/.exec(e);return t?.[1]?{title:t[1],rest:e.slice(t[0].length)}:{title:null,rest:e}}function be(e){let t=[],n=!1;for(let r of e.split(`
|
|
3
|
+
`)){/^\s*```/.test(r)&&(n=!n);let e=n?null:/^##\s+(.+?)\s*$/.exec(r);e?.[1]&&t.push({text:e[1],id:U(e[1])})}return t}function xe(e,t){let[n,r]=(0,q.useState)(null),[i,a]=(0,q.useState)(null),o=e.join(`|`);(0,q.useEffect)(()=>{if(typeof IntersectionObserver>`u`||!e.length)return;let n=e.map(e=>t.current?.querySelector(`#${CSS.escape(e)}`)).filter(e=>!!e),i=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&r(t.target.id)},{rootMargin:`-56px 0px -70% 0px`});for(let e of n)i.observe(e);let o=()=>a(null);return window.addEventListener(`wheel`,o,{passive:!0}),window.addEventListener(`touchmove`,o,{passive:!0}),window.addEventListener(`keydown`,o),()=>{i.disconnect(),window.removeEventListener(`wheel`,o),window.removeEventListener(`touchmove`,o),window.removeEventListener(`keydown`,o)}},[o,t]);let s=i??n;return(0,q.useEffect)(()=>{let e=t.current;if(e){for(let t of e.querySelectorAll(`h2[data-active]`))delete t.dataset.active;if(s){let t=e.querySelector(`#${CSS.escape(s)}`);t&&(t.dataset.active=`true`)}}},[s,o,t]),[s,a]}function Se({id:e,interaction:t,node:n,onRespond:r,busy:i,disabled:a,disabledReason:o,part:c,planAnchorId:l,mobile:u,sticky:d,flush:f,className:p}){let h=(0,q.useRef)(null),g=(0,q.useRef)(null),v=(0,q.useRef)(null),y=ge(v),[b,x]=(0,q.useState)(!1),C=me(n),{title:w,rest:T}=ye((C?.body.t===`section`?C.body.children.find(e=>e.t===`markdown`):void 0)?.text??``),E=be(T),[D,O]=xe(E.map(e=>e.id),h);if(C?.body.t!==`section`)return null;let k=C.actions.actions,A=C.body.children.find(e=>e.t===`section`),j=t.title,M=w??j,N=e=>{x(!1),r({kind:`action`,actionId:e})},P=(e,t)=>e===0||t===`primary`?`primary`:t===`danger`?`danger`:`secondary`,L=!a&&!y,R=`h-auto! min-h-9 min-w-0 py-1.5 text-left leading-tight whitespace-normal!`,z=e=>he(e,`start`),B=()=>c===`answers`?l?document.getElementById(l):null:g.current,V=c!==`answers`||l!==void 0,U=u?(0,J.jsxs)(J.Fragment,{children:[V&&(0,J.jsx)(S,{label:`Plan start`,icon:(0,J.jsx)(F,{className:`size-4`}),variant:`secondary`,onClick:()=>z(B())}),k.length>2?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(s,{variant:`primary`,disabled:i,className:m(R,`flex-1`),onClick:()=>N(k[0].id),children:k[0].label}),(0,J.jsxs)(s,{variant:`secondary`,onClick:()=>x(!0),children:[`More (`,k.length-1,`)`]})]}):k.map((e,t)=>(0,J.jsx)(s,{variant:P(t,e.tone),disabled:i,className:m(R,`flex-1`),onClick:()=>N(e.id),children:e.label},e.id))]}):(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`span`,{className:`max-w-[16rem] min-w-0 shrink truncate text-sm font-medium`,title:j,children:j}),(0,J.jsx)(`div`,{className:`grid min-w-0 flex-1 grid-cols-[repeat(auto-fit,minmax(11rem,1fr))] gap-2`,children:k.map((e,t)=>(0,J.jsx)(s,{variant:P(t,e.tone),disabled:i,className:m(R,`w-full md:text-center`),onClick:()=>N(e.id),children:e.label},e.id))}),V&&(0,J.jsx)(S,{label:`Plan start`,icon:(0,J.jsx)(F,{className:`size-4`}),variant:`secondary`,size:`sm`,onClick:()=>z(B())})]}),W=(0,J.jsx)(_,{open:b,onClose:()=>x(!1),title:j,children:(0,J.jsx)(`div`,{className:`flex flex-col gap-2`,children:k.map((e,t)=>(0,J.jsx)(s,{block:!0,variant:P(t,e.tone),disabled:i,className:R,onClick:()=>N(e.id),children:e.label},e.id))})});if(c===`answers`)return(0,J.jsxs)(`article`,{"aria-label":`Question: ${j}`,"data-testid":`plan-answers`,className:m(`flex min-w-0 flex-col gap-2`,p),children:[u&&(0,J.jsx)(`p`,{className:`text-sm font-medium`,children:j}),o?(0,J.jsx)(`p`,{className:`text-sm text-muted`,children:o}):(0,J.jsx)(`div`,{"data-testid":`answer-bar`,className:`flex min-w-0 items-center gap-2 md:gap-3`,children:U}),W]});let G=c===`reader`;return(0,J.jsxs)(`article`,{id:e,"data-testid":`document-interaction`,"aria-label":`Question: ${j}`,className:m(`w-full min-w-0 self-stretch border-t border-border`,p),children:[(0,J.jsxs)(`header`,{className:m(`z-10 flex min-w-0 items-center gap-2 border-b border-border bg-bg px-4 py-2 md:px-6`,d&&(f?`md:sticky md:top-0`:`max-md:static md:sticky md:-top-3`)),children:[(0,J.jsx)(`h3`,{className:`min-w-0 flex-1 truncate text-[15px] leading-snug font-semibold md:text-sm`,children:M}),u&&!G&&(0,J.jsx)(ee,{kind:`interaction`,value:t.state,size:`sm`,className:`[&>span]:sr-only`}),!G&&!a&&!y&&(0,J.jsx)(H,{size:`xs`,className:`shrink-0`,onClick:()=>he(v.current,`center`),children:`Jump to options ↓`})]}),A&&(0,J.jsx)(`aside`,{className:`mx-4 mt-3 rounded-md bg-warning-soft px-3 py-2 text-sm md:mx-6`,children:(0,J.jsx)(I,{node:A})}),(0,J.jsxs)(`div`,{className:`px-4 py-4 md:grid md:grid-cols-[13rem_minmax(0,1fr)] 2xl:grid-cols-[15rem_minmax(0,1fr)] md:gap-8 md:px-6`,children:[E.length>0&&(0,J.jsx)(`nav`,{"aria-label":`Plan sections`,className:`hidden md:block`,children:(0,J.jsxs)(`ol`,{className:`sticky top-16 flex flex-col gap-0.5 border-l border-border text-sm`,children:[(0,J.jsx)(`li`,{children:(0,J.jsx)(`button`,{type:`button`,className:`-ml-px block w-full truncate border-l-2 border-transparent py-1 pl-3 text-left text-muted hover:text-text`,onClick:()=>z(g.current),children:`Start`})}),E.map(e=>(0,J.jsx)(`li`,{children:(0,J.jsx)(`button`,{type:`button`,"aria-current":D===e.id,className:`-ml-px block w-full truncate border-l-2 border-transparent py-1 pl-3 text-left text-muted hover:text-text aria-[current=true]:border-accent aria-[current=true]:text-text`,onClick:()=>{O(e.id),z(h.current?.querySelector(`#${CSS.escape(e.id)}`)??null)},children:e.text})},e.id))]})}),(0,J.jsx)(`div`,{ref:g,className:`min-w-0 scroll-mt-14`,children:(0,J.jsx)(`div`,{ref:h,className:`sy-prose-compact max-w-[80ch] min-w-0 2xl:max-w-[100ch] min-[1800px]:text-base [&_h2]:scroll-mt-14`,children:(0,J.jsx)(te,{text:T,headingIds:!0,className:`text-inherit`})})})]}),!G&&(0,J.jsxs)(`section`,{ref:v,"data-testid":`plan-options`,"aria-label":j,className:`border-t border-border px-4 py-3 md:px-6`,children:[(0,J.jsx)(`p`,{className:`mb-2 text-sm font-medium`,children:j}),!a&&(0,J.jsx)(`div`,{className:`flex min-w-0 flex-col gap-2 md:flex-row md:flex-wrap`,children:k.map((e,t)=>(0,J.jsx)(s,{variant:P(t,e.tone),size:`md`,disabled:i,className:m(R,`md:text-center`),onClick:()=>N(e.id),children:e.label},e.id))}),(0,J.jsx)(H,{size:`xs`,className:`mt-2`,icon:(0,J.jsx)(F,{"aria-hidden":!0,className:`size-3.5`}),onClick:()=>z(g.current),children:`Back to the plan start`})]}),!G&&L&&(0,J.jsx)(`div`,{"data-testid":`answer-bar`,className:m(`z-10 flex min-w-0 items-center gap-2 border-t border-border bg-bg px-4 py-2 md:gap-3 md:px-6`,d&&!f?`sticky -bottom-3`:`sticky bottom-0`),children:U}),!G&&W]})}var Ce={red:`bg-[#e5484d] text-white`,orange:`bg-[#f76b15] text-white`,blue:`bg-[#0090ff] text-white`,gray:`bg-[#6e7681] text-white`,green:`bg-[#30a46c] text-white`},we=`transform 260ms cubic-bezier(0.2, 0.9, 0.25, 1)`,Te=`input, textarea, select, [contenteditable], [data-no-swipe]`,Z=null;function Ee({leading:e=[],trailing:t=[],disabled:n,children:r,className:i,contentClassName:a}){let o=(0,q.useRef)(null),s=(0,q.useRef)(null),c=(0,q.useRef)(!1),[l,u]=(0,q.useState)(0),[d,f]=(0,q.useState)(!1),p=(0,q.useRef)(0),_=(0,q.useRef)({leading:e,trailing:t});_.current={leading:e,trailing:t};let y=!n&&(e.length>0||t.length>0),x=()=>o.current?.offsetWidth||320,S=(e,t)=>{let n=o.current;n&&(n.style.transition=t?we:`none`,n.style.transform=e===0?``:`translateX(${e}px)`),p.current=e,u(e)},w=(0,q.useRef)(()=>{});w.current=()=>{S(0,!0),f(!1),Z===T&&(Z=null)};let[T]=(0,q.useState)(()=>()=>w.current()),E=async(e,t)=>{if(W(),e.removes){let n=x();f(!0),S(t===`leading`?n:-n,!0);try{await e.onAction()}catch{w.current();return}let r=o.current?.parentElement;r&&!window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches&&r.animate?.([{height:`${r.offsetHeight}px`},{height:`0px`}],{duration:220,easing:`cubic-bezier(0.2, 0.8, 0.2, 1)`,fill:`forwards`})}else w.current(),await e.onAction()},D=l!==0;(0,q.useEffect)(()=>{if(!D)return;let e=e=>{o.current?.parentElement?.contains(e.target)||s.current||w.current()};return document.addEventListener(`pointerdown`,e,!0),()=>document.removeEventListener(`pointerdown`,e,!0)},[D]),(0,q.useEffect)(()=>()=>{Z===T&&(Z=null)},[T]);let O=e=>{y&&e.isPrimary&&(e.pointerType===`touch`||e.pointerType===`pen`)&&(e.target.closest(Te)||(c.current=!1,s.current={id:e.pointerId,x:e.clientX,y:e.clientY,axis:null,start:p.current,raw:p.current,full:!1,samples:[]}))},k=e=>{let t=s.current;if(!t||e.pointerId!==t.id)return;let n=e.clientX-t.x;if(t.axis===null){if(t.axis=v(n,e.clientY-t.y),t.axis===null)return;if(t.axis===`y`){s.current=null;return}c.current=!0,e.currentTarget.setPointerCapture?.(e.pointerId),Z&&Z!==T&&Z()}let{leading:r,trailing:i}=_.current,a=x(),o=t.start+n;o>0&&r.length===0&&(o=g(o,a)*.15),o<0&&i.length===0&&(o=g(o,a)*.15),t.raw=o,t.samples.push({t:e.timeStamp,v:o}),t.samples=t.samples.slice(-12);let l=(o>0?r.length:i.length)*76,u=l>0&&Math.abs(o)>=b(a,l);u!==t.full&&(t.full=u,f(u),W()),S(o,!1)},A=e=>{let t=s.current;if(s.current=null,t?.axis!==`x`)return;let{leading:n,trailing:r}=_.current;if(e.type===`pointercancel`)return w.current();let i=h(t.raw,C(t.samples),{width:x(),reveal:{leading:n.length*76,trailing:r.length*76},fullSwipe:{leading:!0,trailing:!0}});if(i.kind===`close`)return w.current();let a=i.side===`leading`?n:r,o=a[0];if(!o)return w.current();if(i.kind===`commit`)return void E(o,i.side);f(!1),S((i.side===`leading`?1:-1)*a.length*76,!0),Z=T},j=l>0?`leading`:`trailing`,M=l>0?e:t,N=j===`trailing`?[...M].reverse():M;return(0,J.jsxs)(`div`,{className:m(`relative overflow-hidden`,i),"data-swipe-row":!0,children:[l!==0&&M.length>0&&(0,J.jsx)(`div`,{"aria-hidden":!0,className:m(`absolute inset-y-0 flex`,j===`leading`?`left-0`:`right-0`),style:{width:Math.abs(l)},children:N.map(e=>{let t=e===M[0];return(0,J.jsxs)(`button`,{type:`button`,tabIndex:-1,"data-swipe-action":e.id,onClick:()=>void E(e,j),style:{flexGrow:d?+!!t:1,flexBasis:0},className:m(`flex min-w-0 flex-col items-center justify-center gap-1 overflow-hidden text-xs font-semibold whitespace-nowrap transition-[flex-grow] duration-200`,Ce[e.tone],d&&t&&(j===`leading`?`items-start pl-6`:`items-end pr-6`)),children:[e.icon,e.label]},e.id)})}),(0,J.jsx)(`div`,{ref:o,className:m(`relative touch-pan-y bg-surface`,a),onPointerDown:O,onPointerMove:k,onPointerUp:A,onPointerCancel:A,onClickCapture:e=>{c.current?(c.current=!1,e.preventDefault(),e.stopPropagation()):p.current!==0&&(e.preventDefault(),e.stopPropagation(),w.current())},children:r})]})}function De(e){let t=r(e=>e.issues);return(0,q.useMemo)(()=>{let n=Object.values(t),r=e?k(n)(e):null;return{linked:r,candidates:e&&!r?n.filter(t=>D(t,e,n)===null).sort(T):[],canUnlink:!!r&&P(r)===null}},[t,e])}function Oe({open:t,onClose:n,workspace:r,candidates:i}){let[a,o]=(0,q.useState)(null),[c,l]=(0,q.useState)(null),u=()=>{l(null),n()},d=async e=>{if(!a){o(e.id),l(null);try{await ne(e.id,r.id),B.success(`Linked to #${e.number}`),u()}catch(e){l(e)}finally{o(null)}}};return(0,J.jsx)(y,{open:t,onClose:u,title:`Link to issue`,description:`Link ${r.branch} to an issue that has no branch yet. Its sessions then stay in the issue's scope.`,footer:(0,J.jsx)(s,{onClick:u,children:`Cancel`}),children:(0,J.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[c!==null&&(0,J.jsx)(p,{compact:!0,title:`Could not link`,error:e(c)}),i.length===0&&(0,J.jsx)(`p`,{className:`text-sm text-muted`,children:`No issue without a branch in this project.`}),(0,J.jsx)(`ul`,{className:`flex min-w-0 flex-col gap-1`,children:i.map(e=>(0,J.jsx)(`li`,{className:`min-w-0`,children:(0,J.jsxs)(`button`,{type:`button`,disabled:!!a,"aria-busy":a===e.id,onClick:()=>void d(e),className:`tap flex w-full min-w-0 flex-col rounded-md px-2 py-1.5 text-left hover:bg-surface-2 disabled:opacity-55`,children:[(0,J.jsxs)(`span`,{className:`truncate text-sm`,children:[`#`,e.number,` `,e.title]}),(0,J.jsxs)(`span`,{className:`truncate text-xs text-muted`,children:[e.repository,e.board?.priority?` · ${e.board.priority.name}`:``]})]})},e.id))})]})})}var ke=[];function Ae(t,n,i){let a=i&&!!t&&!n,[o,s]=(0,q.useState)(null);return(0,q.useEffect)(()=>{if(!a||!t)return;let n=new AbortController;return s({id:t,lookup:{state:`loading`}}),K.get(t,n.signal).then(e=>{r.getState().upsertSessionIfMissing(e),s(null)},r=>{n.signal.aborted||s({id:t,lookup:c(r,`not_found`)?{state:`missing`}:{state:`error`,error:e(r)}})}),()=>n.abort()},[a,t]),a?o?.id===t?o.lookup:{state:`loading`}:{state:`idle`}}function je(e){let t=r(t=>e?t.hosts[e.hostId]:void 0),n=r(t=>e?.projectId?t.projects[e.projectId]:void 0),i=r(t=>e?.workspaceId?t.workspaces[e.workspaceId]:void 0),a=r(e=>e.runs),o=r(e=>e.tasks),s=r(t=>e?t.adapters[e.hostId]??ke:ke);return(0,q.useMemo)(()=>{if(!e)return null;let r=M(a,e),c=e.taskId??r?.taskId??null;return{session:e,host:t,hostName:t?.name??`Unknown host`,link:O(t,e),project:n,workspace:i,run:r,task:c?o[c]:void 0,control:N(r),adapters:s}},[e,t,n,i,a,o,s])}function Q(t,n={}){let[r,i]=(0,q.useState)(!1),[a,o]=(0,q.useState)(null),s=(0,q.useRef)(t);s.current=t;let c=(0,q.useRef)(n);c.current=n;let l=(0,q.useRef)(!0);return(0,q.useEffect)(()=>(l.current=!0,()=>{l.current=!1}),[]),{run:(0,q.useCallback)(async(...t)=>{i(!0),o(null);try{let e=await s.current(...t),{success:n}=c.current,r=typeof n==`function`?n(e):n;return r&&B.success(r),!0}catch(t){return l.current&&o(t),c.current.errorToast&&B.error(e(t)),!1}finally{l.current&&i(!1)}},[]),busy:r,error:a,reset:(0,q.useCallback)(()=>o(null),[])}}function Me(e,t=1e3){let[n,r]=(0,q.useState)(()=>Date.now());return(0,q.useEffect)(()=>{if(!e)return;r(Date.now());let n=setInterval(()=>r(Date.now()),t);return()=>clearInterval(n)},[e,t]),n}function Ne(){let e=(0,q.useRef)(null),[t,n]=(0,q.useState)(0);return(0,q.useLayoutEffect)(()=>{let t=e.current;if(!t)return;n(t.clientWidth);let r=new ResizeObserver(([e])=>{e&&n(e.contentRect.width)});return r.observe(t),()=>r.disconnect()},[]),[e,t]}function $({label:e,value:t}){return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`dt`,{className:`text-muted`,children:e}),(0,J.jsx)(`dd`,{className:`min-w-0 font-mono text-xs break-all`,children:t})]})}function Pe({session:e,hostLabel:t,open:n,onClose:r}){let i=w(e),o=e.stats;return(0,J.jsx)(y,{open:n,onClose:r,title:`Session info`,children:(0,J.jsxs)(`dl`,{className:`grid grid-cols-[auto_minmax(0,1fr)] gap-x-3 gap-y-2 text-sm`,children:[(0,J.jsx)($,{label:`Switchyard session`,value:e.id}),(0,J.jsx)($,{label:`Pi session id`,value:e.nativeHandle?.sessionId??`Not started`}),(0,J.jsx)($,{label:`Session file`,value:e.nativeHandle?.sessionFile??`None yet`}),(0,J.jsx)($,{label:`Host`,value:t}),(0,J.jsx)($,{label:`Working directory`,value:e.cwd}),(0,J.jsx)($,{label:`Origin`,value:e.provenance}),(0,J.jsx)($,{label:`Profile`,value:e.profileSnapshot.name}),(0,J.jsx)($,{label:`Created`,value:a(e.createdAt)}),o?.tokens!=null&&(0,J.jsx)($,{label:`Tokens`,value:o.tokens.toLocaleString(`en-US`)}),o?.costUsd!=null&&(0,J.jsx)($,{label:`Cost`,value:`$${o.costUsd.toFixed(2)}`}),i&&(0,J.jsx)($,{label:`Context`,value:`${i.label} (${i.detail})`})]})})}function Fe(a){let{session:o,run:c,control:u}=a,d=l(),[f,m]=(0,q.useState)(null),[h,g]=(0,q.useState)(o.title),_=De(o.provenance===`subagent`?null:a.workspace),v=r(e=>e.attention),b=(0,q.useMemo)(()=>Object.values(v).filter(e=>e.sessionId===o.id&&!e.resolvedAt&&n(e.reason)),[v,o.id]),S=r(e=>{if(o.provenance===`subagent`||o.archivedAt)return!1;let t=Object.values(e.sessions).filter(e=>e.archivedAt===null&&e.provenance!==`subagent`&&(o.workspaceId?e.workspaceId===o.workspaceId:e.workspaceId===null&&e.hostId===o.hostId&&e.cwd===o.cwd));return j(t)?.id===o.id}),C=Q(()=>K.takeover(o.id),{success:`You have control. Automatic continuations are paused.`,errorToast:!0}),w=Q(()=>K.returnToAutomation(o.id),{success:`Returned to automation.`,errorToast:!0}),T=Q(()=>K.stop(o.id),{success:`Session stopped.`}),D=Q(()=>K.resume(o.id),{success:`Session resumed.`,errorToast:!0}),O=Q(e=>K.rename(o.id,e),{success:`Session renamed.`}),k=Q(()=>K.cacheAlert(o.id,!o.cacheAlert),{errorToast:!0}),M=Q(()=>K.archive(o.id),{success:`Session archived.`}),N=Q(()=>K.unarchive(o.id),{success:`Session unarchived.`,errorToast:!0}),P=a.link===`connected`,F=()=>{m(null),T.reset(),O.reset(),M.reset()},I=A(o)?`Stop the session before archiving it`:null,R=(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(x,{open:f===`stop`,onClose:F,title:`Stop this session?`,description:`Stops the current execution and clears queued messages.`,confirmLabel:`Stop session`,busy:T.busy,error:T.error,errorTitle:`Could not stop`,onConfirm:()=>void T.run().then(e=>e&&m(null)),children:(0,J.jsx)(`p`,{className:`text-sm text-muted`,children:c?`The task keeps its run, marked interrupted and blocked (Stopped by user). Automation settings are unchanged.`:`Pi stays available; you can send a new message afterwards.`})}),(0,J.jsx)(y,{open:f===`rename`,onClose:F,title:`Rename session`,footer:(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(s,{onClick:F,children:`Cancel`}),(0,J.jsx)(s,{variant:`primary`,type:`submit`,form:`sy-rename-form`,busy:O.busy,disabled:!h.trim(),children:`Save`})]}),children:(0,J.jsxs)(`form`,{id:`sy-rename-form`,onSubmit:e=>{e.preventDefault(),h.trim()&&O.run(h.trim()).then(e=>e&&m(null))},className:`flex flex-col gap-2`,children:[(0,J.jsx)(L,{id:`sy-rename-input`,label:`Title`,children:(0,J.jsx)(z,{id:`sy-rename-input`,value:h,maxLength:200,onChange:e=>g(e.target.value)})}),O.error!==null&&(0,J.jsx)(p,{compact:!0,title:`Could not rename`,error:e(O.error)})]})}),(0,J.jsx)(x,{open:f===`archive`,onClose:F,title:`Archive this session?`,description:`It leaves the navigator. The Pi session file stays on the host.`,danger:!1,confirmLabel:`Archive`,busy:M.busy,error:M.error,errorTitle:`Could not archive`,onConfirm:()=>void M.run().then(e=>{e&&(m(null),d(`/code`))}),children:o.runtime===`idle`&&(0,J.jsx)(`p`,{className:`text-sm text-muted`,children:`The idle Pi process is stopped first.`})}),a.workspace&&(0,J.jsx)(Oe,{open:f===`link`,onClose:F,workspace:a.workspace,candidates:_.candidates}),(0,J.jsx)(Pe,{session:o,hostLabel:`${a.hostName} (${a.link})`,open:f===`info`,onClose:F})]});return{canTakeover:u===`automation`,canReturn:u===`human`,canStop:A(o)&&P,canResume:!E(o)&&!!o.nativeHandle&&!o.readOnly&&P,archiveBlocked:I,takeover:()=>void C.run(),returnToAutomation:()=>void w.run(),requestStop:()=>m(`stop`),resume:()=>void D.run(),openRename:()=>{g(o.title),m(`rename`)},requestArchive:()=>{I?B.info(I):m(`archive`)},openInfo:()=>m(`info`),toggleCacheAlert:()=>void k.run(),unarchive:()=>void N.run(),dismissAttention:b.length>0?()=>{Promise.all(b.map(Ie)).then(()=>B.success(`Cleared. A question Pi is still waiting on stays.`)).catch(t=>B.error(e(t)))}:null,setPinned:(n,r)=>{let a=`/api/scopes/${encodeURIComponent(n)}/sessions/${encodeURIComponent(o.id)}`;(r?i(a):t(a)).catch(t=>B.error(e(t)))},isPrimary:S,setPrimary:t=>{K.setPrimary(o.id,t).catch(t=>B.error(e(t)))},newInBranch:o.projectId&&o.workspaceId?()=>{K.createSession({projectId:o.projectId,workspace:{existingId:o.workspaceId},prompt:``}).then(e=>{r.getState().upsertSessionIfMissing(e),d(`/code/${encodeURIComponent(e.id)}`)}).catch(t=>B.error(e(t)))}:null,issueLink:a.workspace&&o.provenance!==`subagent`?{..._,open:()=>m(`link`),unlink:()=>{let t=_.linked;t&&G(t.id).then(()=>B.success(`Unlinked from #${t.number}`)).catch(t=>B.error(e(t)))}}:null,busy:{takeover:C.busy,ret:w.busy,stop:T.busy,resume:D.busy,unarchive:N.busy},dialogs:R}}async function Ie(e){let t=await i(`/api/attention/${encodeURIComponent(e.id)}/dismiss`),n=t&&typeof t==`object`&&`id`in t?t:{...e,resolvedAt:new Date().toISOString()};return r.setState(t=>t.attention[e.id]?{attention:{...t.attention,[e.id]:n}}:{}),n}var Le=[`needs_input`,`failed`,`ready_for_review`,`unsupported_interaction`,`host_unreachable`,`cache_expiring`];function Re(e){let t=Object.fromEntries(Le.map(e=>[e,[]]));for(let n of e)t[n.reason]?.push(n);return t}var ze={dismiss:`Marks it as seen and moves it to Dismissed; it stays open, and a question keeps flagging its session.`,clear:`Resolves it now: the session loses this flag and the item moves to History.`,clearNeedsInput:`Removes this session's Needs input flag and moves it to History; a question Pi is still waiting on stays.`};function Be(e){return e===`dismissed`||e===`history`?e:`open`}function Ve(e,t){return t===`history`?[]:e.filter(e=>t===`open`?!e.acknowledgedAt:!!e.acknowledgedAt)}function He(e,t,n){return[e?.name,t?.title,n&&n.title!==t?.title?n.title:null].filter(Boolean).join(` · `)||`Switchyard`}export{X as _,Be as a,le as b,Fe as c,Q as d,Me as f,fe as g,Ee as h,Re as i,Pe as l,Ae as m,Le as n,Ve as o,je as p,He as r,Ie as s,ze as t,Ne as u,ve as v,re as y};
|
|
4
|
+
//# sourceMappingURL=logic-4hQwsm8w.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logic-4hQwsm8w.js","names":["useState","_Fragment","useRef","useRef","useState","useMemo","useState","useState","useMemo","useRef","useCallback","_Fragment","useState","useMemo","_Fragment","errorMessage","apiDelete","isInputAttentionReason","useSyncStore","apiPost","formatTime","__toESM","Button","isApiError","useNavigate","formatRelative","require_jsx_runtime","require_react","ErrorState","cn","swipeResult","Sheet","lockAxis","Dialog","fullSwipeAt","ConfirmDialog","IconButton","velocity","contextMeter","compareIssues","isLive","issueLinkProblem","hostLink","issueLookup","isBusy","primarySession","runForSession","automationControl","issueUnlinkProblem","ArrowUp","UINodeRenderer","Field","useBreakpoint","StatusChip","TextInput","toast","TextArea","TextLink","headingSlug","Markdown","haptic","unlinkIssue","linkIssue","codeApi","import_react","UNSUPPORTED_FALLBACK_COPY","LEGACY_TERMINAL_COPY","TERMINAL_COPY","DEFAULT_ACTIONS","findActions","node","c","found","findDescription","child","description","isUnsupported","i","unsupportedView","offered","a","messageMode","runtime","import_jsx_runtime","hasInteractive","t","byLabel","by","InteractionCard","fromProps","upsert","s","busy","setBusy","error","setError","alreadyAnswered","setAlreadyAnswered","lastResponse","setLastResponse","acked","setAcked","interaction","pending","unsupported","sessionRuntime","composing","setComposing","message","setMessage","respond","response","res","onAnswered","other","sendMessage","text","bp","isDocumentPresentation","DocumentInteraction","r","readOnlyReason","mode","sticky","flush","dock","className","UnsupportedBody","actionId","keys","view","answered","onSend","onCancelMessage","onAction","splitPresentation","last","rest","scrollTo","calm","el","useOnScreen","visible","setVisible","ref","io","firstMarkdown","m","md","leadingHeading","documentSections","out","fence","line","useActiveSection","active","setActive","pinned","setPinned","key","ids","els","root","e","entries","release","shown","h","bodyRef","startRef","optionsRef","optionsVisible","sheet","setSheet","split","heading","sections","pinSection","options","changes","question","title","answer","onRespond","variant","tone","showBar","disabled","wrapBtn","jump","anchor","part","planAnchorId","planStart","barContent","mobile","o","moreSheet","disabledReason","reader","TONE","SETTLE","SKIP","closeOpenRow","SwipeRow","fg","drag","dragged","offset","setOffset","full","setFull","offsetRef","actions","leading","trailing","width","place","animate","to","closeRef","stableClose","run","action","w","side","row","isOpen","onDoc","onPointerDown","onPointerMove","d","dx","l","raw","rubberBand","reveal","isFull","onPointerUp","list","outer","contentClassName","useIssueLink","issues","linked","workspace","LinkIssueDialog","close","onClose","pick","issue","candidates","NO_ADAPTERS","useSessionLookup","absent","hydrated","sessionId","session","result","setResult","ctrl","useSessionContext","host","project","runs","tasks","adapters","taskId","useMutation","fnRef","fn","optsRef","opts","mounted","args","msg","success","useNow","now","setNow","ms","useElementWidth","setWidth","ro","entry","InfoRow","label","value","SessionInfoDialog","meter","stats","hostLabel","useSessionActions","ctx","navigate","dialog","setDialog","setTitle","link","attention","st","inputAttention","isPrimary","peers","x","takeover","ret","stop","resume","rename","cacheAlert","archive","unarchive","connected","archiveBlocked","dialogs","ok","control","dismissAttentionItem","path","scopeId","primary","item","next","ATTENTION_GROUPS","groupAttention","items","ATTENTION_ACTION_HELP","normalizeShow","v","visibleAttention","show","all","attentionMeta","task"],"sources":["../../src/components/intent/unsupported.ts","../../src/components/intent/InteractionCard.tsx","../../src/components/ui/SwipeRow.tsx","../../src/features/workboard/LinkIssue.tsx","../../src/features/code/hooks.ts","../../src/features/code/SessionInfoDialog.tsx","../../src/features/code/SessionActions.tsx","../../src/features/attention/logic.ts"],"sourcesContent":["import type { Interaction, UINode } from \"@switchyard/protocol\";\n\nexport const UNSUPPORTED_FALLBACK_COPY = \"This dialog can't be answered from Switchyard.\";\n\nconst LEGACY_TERMINAL_COPY =\n \"An extension is showing its own interface in this session's terminal. Open the terminal (switchyard tui) to answer it.\";\nconst TERMINAL_COPY = \"This dialog can only be answered in the terminal where Pi is running.\";\n\nexport interface UnsupportedAction {\n id: \"abort\" | \"message\";\n label: string;\n tone: \"primary\" | \"secondary\" | \"danger\";\n}\n\nconst DEFAULT_ACTIONS: UnsupportedAction[] = [\n { id: \"abort\", label: \"Stop the run\", tone: \"danger\" },\n { id: \"message\", label: \"Send a message to Pi\", tone: \"primary\" },\n];\n\nfunction findActions(node: UINode): Extract<UINode, { t: \"actions\" }> | null {\n if (node.t === \"actions\") return node;\n if (node.t === \"section\") {\n for (const c of node.children) {\n const found = findActions(c);\n if (found) return found;\n }\n }\n return null;\n}\n\nfunction findDescription(node: UINode): string | null {\n if (node.t === \"text\") return node.text.trim() || null;\n if (node.t === \"section\") {\n for (const child of node.children) {\n const description = findDescription(child);\n if (description) return description;\n }\n }\n return null;\n}\n\nexport interface UnsupportedView {\n /** True until a person chose one of the alternatives. */\n answerable: boolean;\n actions: UnsupportedAction[];\n copy: string;\n}\n\nexport function isUnsupported(i: Interaction): boolean {\n return i.state === \"unsupported\" || i.source.kind === \"unsupported_custom\";\n}\n\n/** The alternatives the host offers for an unsupported dialog (stop the run, message). */\nexport function unsupportedView(i: Interaction): UnsupportedView {\n const node = findActions(i.presentation);\n const offered = (node?.actions ?? [])\n .filter(\n (a): a is typeof a & { id: \"abort\" | \"message\" } => a.id === \"abort\" || a.id === \"message\",\n )\n .map((a) => ({\n id: a.id,\n label: a.label,\n tone: (a.tone === \"default\"\n ? \"secondary\"\n : (a.tone ?? (a.id === \"abort\" ? \"danger\" : \"primary\"))) as UnsupportedAction[\"tone\"],\n }));\n const description = findDescription(i.presentation);\n return {\n answerable: i.state === \"unsupported\" && i.resolution === null,\n actions: offered.length > 0 ? offered : DEFAULT_ACTIONS,\n copy:\n description === LEGACY_TERMINAL_COPY\n ? TERMINAL_COPY\n : (description ?? UNSUPPORTED_FALLBACK_COPY),\n };\n}\n\n/** A follow-up while Pi is still working queues behind the current turn. */\nexport function messageMode(runtime: string | undefined): \"prompt\" | \"followUp\" {\n return runtime === \"running\" || runtime === \"waiting_input\" ? \"followUp\" : \"prompt\";\n}\n","import type { Interaction, InteractionResponse, UINode } from \"@switchyard/protocol\";\nimport { ArrowUp } from \"lucide-react\";\nimport { useEffect, useRef, useState } from \"react\";\nimport { useBreakpoint } from \"../../app/useBreakpoint\";\nimport { cn } from \"../../lib/cn\";\nimport { formatRelative } from \"../../lib/time\";\nimport { apiPost, errorMessage, isApiError } from \"../../sync/api\";\nimport { useSyncStore } from \"../../sync/store\";\nimport { Button } from \"../ui/Button\";\nimport { IconButton } from \"../ui/IconButton\";\nimport { Sheet } from \"../ui/Overlay\";\nimport { StatusChip } from \"../ui/StatusChip\";\nimport { ErrorState } from \"../ui/states\";\nimport { TextArea } from \"../ui/TextArea\";\nimport { TextLink } from \"../ui/TextLink\";\nimport { headingSlug, Markdown } from \"./Markdown\";\nimport { UINodeRenderer } from \"./UINodeRenderer\";\nimport { isUnsupported, messageMode, unsupportedView } from \"./unsupported\";\n\nexport interface InteractionCardProps {\n interaction: Interaction;\n /** Read-only session or host offline: show the question without answer controls. */\n readOnlyReason?: string | null;\n className?: string;\n /** Called after the coordinator acknowledged an answer. */\n onAnswered?: (interaction: Interaction) => void;\n /** DOM id (deep links scroll to it). */\n id?: string;\n /**\n * `card` (default) is the whole question. The session view splits it: `dock` is the answer\n * controls above the composer, `reader` a plan's text in the transcript.\n */\n mode?: \"card\" | \"dock\" | \"reader\";\n /** dock mode: number keys may answer a question (off where several questions share a page). */\n keys?: boolean;\n /** dock mode: DOM id of the plan's text in the transcript, for Plan start. */\n planAnchorId?: string;\n /** Stick the document header to the top of its scroller (false when the page scrolls). */\n sticky?: boolean;\n /** The page itself scrolls (no padded scroller): pin the header and bar flush. */\n flush?: boolean;\n}\n\nfunction hasInteractive(node: UINode): boolean {\n switch (node.t) {\n case \"form\":\n case \"confirm\":\n case \"actions\":\n return true;\n case \"list\":\n return node.items.some(hasInteractive);\n case \"section\":\n return node.children.some(hasInteractive);\n case \"tabs\":\n return node.tabs.some((t) => t.children.some(hasInteractive));\n default:\n return false;\n }\n}\n\nexport function byLabel(by: string): string {\n if (by === \"host\") return \"the host\";\n if (by === \"pi\") return \"Pi\";\n return \"a device\";\n}\n\n/**\n * A runtime interaction (extension dialog). Posts the answer with the\n * interaction revision and waits for the acknowledgement; there is no\n * optimistic resolution. A 409 shows \"Already answered: <summary>\".\n */\nexport function InteractionCard({\n interaction: fromProps,\n readOnlyReason,\n className,\n onAnswered,\n id,\n sticky,\n flush,\n mode = \"card\",\n keys = true,\n planAnchorId,\n}: InteractionCardProps) {\n const upsert = useSyncStore((s) => s.upsertInteraction);\n const [busy, setBusy] = useState(false);\n const [error, setError] = useState<unknown>(null);\n const [alreadyAnswered, setAlreadyAnswered] = useState<string | null>(null);\n const [lastResponse, setLastResponse] = useState<InteractionResponse | null>(null);\n // The acknowledged interaction from the answer/409 response, until the prop catches up.\n const [acked, setAcked] = useState<Interaction | null>(null);\n const interaction =\n acked && acked.id === fromProps.id && acked.revision > fromProps.revision ? acked : fromProps;\n\n const pending = interaction.state === \"pending\";\n const unsupported = isUnsupported(interaction);\n const sessionRuntime = useSyncStore((s) => s.sessions[interaction.sessionId]?.runtime);\n const [composing, setComposing] = useState(false);\n const [message, setMessage] = useState(\"\");\n\n const respond = async (response: InteractionResponse): Promise<boolean> => {\n setBusy(true);\n setError(null);\n setLastResponse(response);\n try {\n const res = await apiPost<{ status: string; interaction: Interaction }>(\n `/api/interactions/${encodeURIComponent(interaction.id)}/answer`,\n { revision: interaction.revision, response },\n );\n if (res?.interaction) {\n upsert(res.interaction);\n setAcked(res.interaction);\n onAnswered?.(res.interaction);\n }\n return true;\n } catch (e) {\n if (isApiError(e, \"already_answered\")) {\n const other = (e.details as { interaction?: Interaction } | undefined)?.interaction;\n if (other) {\n upsert(other);\n setAcked(other);\n }\n setAlreadyAnswered(other?.resolution?.summary ?? \"answered on another device\");\n } else {\n setError(e);\n }\n return false;\n } finally {\n setBusy(false);\n }\n };\n\n /** \"Send a message to Pi\": deliver the message first, then record the choice. */\n const sendMessage = async () => {\n const text = message.trim();\n if (!text) return;\n setBusy(true);\n setError(null);\n try {\n await apiPost(`/api/sessions/${encodeURIComponent(interaction.sessionId)}/prompt`, {\n text,\n mode: messageMode(sessionRuntime),\n });\n } catch (e) {\n setError(e);\n setBusy(false);\n return;\n }\n setBusy(false);\n if (await respond({ kind: \"action\", actionId: \"message\" })) {\n setComposing(false);\n setMessage(\"\");\n }\n };\n\n const bp = useBreakpoint();\n if (\n pending &&\n !alreadyAnswered &&\n !unsupported &&\n isDocumentPresentation(interaction.presentation)\n ) {\n return (\n <DocumentInteraction\n id={id}\n interaction={interaction}\n node={interaction.presentation}\n onRespond={(r) => void respond(r)}\n busy={busy}\n disabled={!!readOnlyReason}\n disabledReason={readOnlyReason ?? null}\n part={mode === \"reader\" ? \"reader\" : mode === \"dock\" ? \"answers\" : \"all\"}\n planAnchorId={planAnchorId}\n mobile={bp === \"mobile\"}\n sticky={sticky ?? true}\n flush={flush ?? false}\n className={className}\n />\n );\n }\n\n const dock = mode === \"dock\";\n return (\n <article\n id={id}\n aria-label={`Question: ${interaction.title}`}\n className={cn(\n dock ? \"flex min-w-0 flex-col gap-2\" : \"flex min-w-0 flex-col gap-3 border-l-2 py-1 pl-3\",\n !dock && (pending ? \"border-warning\" : \"border-border\"),\n className,\n )}\n >\n {dock ? (\n <h3 className=\"text-sm font-semibold break-words\">{interaction.title}</h3>\n ) : (\n <header className=\"flex min-w-0 flex-wrap items-start gap-2\">\n <h3 className=\"min-w-0 flex-1 text-sm font-semibold break-words\">{interaction.title}</h3>\n <StatusChip kind=\"interaction\" value={interaction.state} size=\"sm\" />\n </header>\n )}\n\n {alreadyAnswered && (\n <p role=\"status\" className=\"rounded-md bg-surface-2 px-3 py-2 text-sm\">\n Already answered: {alreadyAnswered}\n </p>\n )}\n\n {unsupported ? (\n <UnsupportedBody\n interaction={interaction}\n readOnlyReason={readOnlyReason ?? null}\n busy={busy}\n answered={alreadyAnswered !== null}\n composing={composing}\n message={message}\n setMessage={setMessage}\n onAction={(actionId) => {\n if (actionId === \"message\") setComposing(true);\n else void respond({ kind: \"action\", actionId });\n }}\n onSend={() => void sendMessage()}\n onCancelMessage={() => setComposing(false)}\n />\n ) : pending && !alreadyAnswered ? (\n <>\n {readOnlyReason && <p className=\"text-sm text-muted\">{readOnlyReason}</p>}\n <UINodeRenderer\n node={interaction.presentation}\n onRespond={(r) => void respond(r)}\n busy={busy}\n disabled={!!readOnlyReason}\n dock={\n dock\n ? { title: interaction.title, keys: keys && interaction.kind === \"question\" }\n : undefined\n }\n />\n {!readOnlyReason && !hasInteractive(interaction.presentation) && (\n <div>\n <Button busy={busy} onClick={() => void respond({ kind: \"cancel\" })}>\n Dismiss\n </Button>\n </div>\n )}\n {busy && (\n <p role=\"status\" className=\"text-sm text-muted\">\n Sending answer… waiting for the host to confirm.\n </p>\n )}\n </>\n ) : alreadyAnswered ? null : interaction.resolution ? (\n <p className=\"text-sm text-muted\">\n {interaction.state === \"resolved\" ? \"Answered\" : \"Closed\"} by{\" \"}\n {byLabel(interaction.resolution.by)} {formatRelative(interaction.resolution.at)}:{\" \"}\n <span className=\"text-text\">{interaction.resolution.summary}</span>\n </p>\n ) : (\n <p className=\"text-sm text-muted\">\n {interaction.state === \"expired\"\n ? \"This question expired before it was answered (Pi closed the dialog).\"\n : \"This question was canceled.\"}\n </p>\n )}\n\n {error !== null && (\n <ErrorState\n compact\n title=\"Answer not delivered\"\n error={errorMessage(error)}\n onRetry={lastResponse ? () => void respond(lastResponse) : undefined}\n />\n )}\n </article>\n );\n}\n\n/** A terminal-only dialog: what happened, and the alternatives the host offers until one is chosen. */\nfunction UnsupportedBody({\n interaction,\n readOnlyReason,\n busy,\n answered,\n composing,\n message,\n setMessage,\n onAction,\n onSend,\n onCancelMessage,\n}: {\n interaction: Interaction;\n readOnlyReason: string | null;\n busy: boolean;\n answered: boolean;\n composing: boolean;\n message: string;\n setMessage: (t: string) => void;\n onAction: (actionId: \"abort\" | \"message\") => void;\n onSend: () => void;\n onCancelMessage: () => void;\n}) {\n const view = unsupportedView(interaction);\n return (\n <div className=\"flex min-w-0 flex-col gap-2\">\n <p className=\"text-sm text-muted\">{view.copy}</p>\n {interaction.resolution ? (\n <p className=\"text-sm text-muted\">\n Chosen by {byLabel(interaction.resolution.by)} {formatRelative(interaction.resolution.at)}\n : <span className=\"text-text\">{interaction.resolution.summary}</span>\n </p>\n ) : !view.answerable || answered ? null : readOnlyReason ? (\n <p className=\"text-sm text-muted\">{readOnlyReason}</p>\n ) : composing ? (\n <div className=\"flex min-w-0 flex-col gap-2\">\n <TextArea\n aria-label=\"Message for Pi\"\n value={message}\n onChange={(e) => setMessage(e.target.value)}\n rows={3}\n autoFocus\n placeholder=\"Tell Pi what to do instead\"\n />\n <div className=\"flex flex-wrap gap-2\">\n <Button variant=\"primary\" busy={busy} disabled={!message.trim()} onClick={onSend}>\n Send message\n </Button>\n <Button disabled={busy} onClick={onCancelMessage}>\n Cancel\n </Button>\n </div>\n </div>\n ) : (\n <div className=\"flex flex-wrap gap-2\">\n {view.actions.map((a) => (\n <Button\n key={a.id}\n variant={a.tone}\n busy={busy && a.id === \"abort\"}\n disabled={busy}\n onClick={() => onAction(a.id)}\n >\n {a.label}\n </Button>\n ))}\n </div>\n )}\n </div>\n );\n}\n\n/** A content section that ends in a row of actions (a plan with its options), if `node` is one. */\nexport function splitPresentation(node: UINode): { body: UINode; actions: UINode } | null {\n if (node.t !== \"section\" || node.children.length < 2) return null;\n const last = node.children[node.children.length - 1];\n if (last?.t !== \"actions\") return null;\n const rest = node.children.slice(0, -1);\n if (rest.some(hasInteractive)) return null;\n return { body: { ...node, children: rest }, actions: last };\n}\n\nfunction scrollTo(el: HTMLElement | null, block: \"start\" | \"center\") {\n const calm = window.matchMedia?.(\"(prefers-reduced-motion: reduce)\").matches;\n el?.scrollIntoView({ behavior: calm ? \"auto\" : \"smooth\", block });\n}\n\n/** True while `el` is (at least partly) on screen; assumed visible without IntersectionObserver. */\nfunction useOnScreen(ref: React.RefObject<HTMLElement | null>): boolean {\n const [visible, setVisible] = useState(true);\n useEffect(() => {\n const el = ref.current;\n if (!el || typeof IntersectionObserver === \"undefined\") return;\n const io = new IntersectionObserver(([e]) => setVisible(!!e?.isIntersecting));\n io.observe(el);\n return () => io.disconnect();\n }, [ref]);\n return visible;\n}\n\nfunction firstMarkdown(node: UINode): string | null {\n if (node.t === \"markdown\") return node.text;\n if (node.t === \"section\") {\n for (const c of node.children) {\n const m = firstMarkdown(c);\n if (m !== null) return m;\n }\n }\n return null;\n}\n\n/** A long document with trailing options (a plan awaiting approval). */\nexport function isDocumentPresentation(node: UINode): boolean {\n if (!splitPresentation(node)) return false;\n const md = firstMarkdown(node);\n return md !== null && (md.length >= 400 || md.split(\"\\n\").length >= 12);\n}\n\n/** The first heading of a document, its text and the markdown without it. */\nexport function leadingHeading(md: string): { title: string | null; rest: string } {\n const m = /^\\s*#{1,6}\\s+(.+?)\\s*(?:\\n+|$)/.exec(md);\n return m?.[1] ? { title: m[1], rest: md.slice(m[0].length) } : { title: null, rest: md };\n}\n\n/** `##` headings of a document, for the outline. */\nexport function documentSections(md: string): { text: string; id: string }[] {\n const out: { text: string; id: string }[] = [];\n let fence = false;\n for (const line of md.split(\"\\n\")) {\n if (/^\\s*```/.test(line)) fence = !fence;\n const m = !fence ? /^##\\s+(.+?)\\s*$/.exec(line) : null;\n if (m?.[1]) out.push({ text: m[1], id: headingSlug(m[1]) });\n }\n return out;\n}\n\n/** Id of the outline entry whose heading is the last one scrolled past the top. */\nfunction useActiveSection(ids: string[], root: React.RefObject<HTMLElement | null>) {\n const [active, setActive] = useState<string | null>(null);\n const [pinned, setPinned] = useState<string | null>(null);\n const key = ids.join(\"|\");\n // biome-ignore lint/correctness/useExhaustiveDependencies: `key` stands for `ids`\n useEffect(() => {\n if (typeof IntersectionObserver === \"undefined\" || !ids.length) return;\n const els = ids\n .map((i) => root.current?.querySelector<HTMLElement>(`#${CSS.escape(i)}`))\n .filter((e): e is HTMLElement => !!e);\n const io = new IntersectionObserver(\n (entries) => {\n for (const e of entries) if (e.isIntersecting) setActive(e.target.id);\n },\n { rootMargin: \"-56px 0px -70% 0px\" },\n );\n for (const e of els) io.observe(e);\n // A click on an entry near the end cannot scroll it to the top: it stays selected until the\n // reader scrolls again.\n const release = () => setPinned(null);\n window.addEventListener(\"wheel\", release, { passive: true });\n window.addEventListener(\"touchmove\", release, { passive: true });\n window.addEventListener(\"keydown\", release);\n return () => {\n io.disconnect();\n window.removeEventListener(\"wheel\", release);\n window.removeEventListener(\"touchmove\", release);\n window.removeEventListener(\"keydown\", release);\n };\n }, [key, root]);\n const shown = pinned ?? active;\n // Mark the heading in the text that the outline highlights.\n // biome-ignore lint/correctness/useExhaustiveDependencies: `key` stands for `ids`\n useEffect(() => {\n const r = root.current;\n if (!r) return;\n for (const h of r.querySelectorAll<HTMLElement>(\"h2[data-active]\")) delete h.dataset.active;\n if (shown) {\n const el = r.querySelector<HTMLElement>(`#${CSS.escape(shown)}`);\n if (el) el.dataset.active = \"true\";\n }\n }, [shown, key, root]);\n return [shown, setPinned] as const;\n}\n\n/**\n * Document question (a plan awaiting approval): no card of its own. The plan's own heading titles\n * it, the question labels the answers, revisions come first. Phone: compact header, prose, a bar\n * with the answers pinned to the bottom. Desktop: a section outline beside prose at a readable\n * measure, and a wrapping bar of answers. The bar hides while the inline options are on screen.\n *\n * `part` splits it for the session view: `reader` is the text alone (in the transcript) and\n * `answers` the question with its options (in the request dock).\n */\nfunction DocumentInteraction({\n id,\n interaction,\n node,\n onRespond,\n busy,\n disabled,\n disabledReason,\n part,\n planAnchorId,\n mobile,\n sticky,\n flush,\n className,\n}: {\n id?: string;\n interaction: Interaction;\n node: UINode;\n onRespond: (r: InteractionResponse) => void;\n busy: boolean;\n disabled: boolean;\n disabledReason: string | null;\n part: \"all\" | \"reader\" | \"answers\";\n planAnchorId?: string;\n mobile: boolean;\n sticky: boolean;\n flush: boolean;\n className?: string;\n}) {\n const bodyRef = useRef<HTMLDivElement>(null);\n const startRef = useRef<HTMLDivElement>(null);\n const optionsRef = useRef<HTMLElement>(null);\n const optionsVisible = useOnScreen(optionsRef);\n const [sheet, setSheet] = useState(false);\n const split = splitPresentation(node);\n const md =\n split?.body.t === \"section\"\n ? (split.body.children.find((c) => c.t === \"markdown\") as\n | Extract<UINode, { t: \"markdown\" }>\n | undefined)\n : undefined;\n const { title: heading, rest } = leadingHeading(md?.text ?? \"\");\n const sections = documentSections(rest);\n const [active, pinSection] = useActiveSection(\n sections.map((s) => s.id),\n bodyRef,\n );\n if (split?.body.t !== \"section\") return null;\n const options = (split.actions as Extract<UINode, { t: \"actions\" }>).actions;\n const changes = split.body.children.find((c) => c.t === \"section\");\n const question = interaction.title;\n const title = heading ?? question;\n const answer = (actionId: string) => {\n setSheet(false);\n onRespond({ kind: \"action\", actionId });\n };\n const variant = (i: number, tone?: string) =>\n i === 0 || tone === \"primary\" ? \"primary\" : tone === \"danger\" ? \"danger\" : \"secondary\";\n const showBar = !disabled && !optionsVisible;\n const wrapBtn = \"h-auto! min-h-9 min-w-0 py-1.5 text-left leading-tight whitespace-normal!\";\n const jump = (el: HTMLElement | null) => scrollTo(el, \"start\");\n // The dock's answers have no text of their own: Plan start goes to the reader in the transcript.\n const anchor = () =>\n part === \"answers\"\n ? planAnchorId\n ? document.getElementById(planAnchorId)\n : null\n : startRef.current;\n const planStart = part !== \"answers\" || planAnchorId !== undefined;\n const barContent = mobile ? (\n <>\n {planStart && (\n <IconButton\n label=\"Plan start\"\n icon={<ArrowUp className=\"size-4\" />}\n variant=\"secondary\"\n onClick={() => jump(anchor())}\n />\n )}\n {options.length > 2 ? (\n <>\n <Button\n variant=\"primary\"\n disabled={busy}\n className={cn(wrapBtn, \"flex-1\")}\n onClick={() => answer(options[0]!.id)}\n >\n {options[0]!.label}\n </Button>\n <Button variant=\"secondary\" onClick={() => setSheet(true)}>\n More ({options.length - 1})\n </Button>\n </>\n ) : (\n options.map((o, i) => (\n <Button\n key={o.id}\n variant={variant(i, o.tone)}\n disabled={busy}\n className={cn(wrapBtn, \"flex-1\")}\n onClick={() => answer(o.id)}\n >\n {o.label}\n </Button>\n ))\n )}\n </>\n ) : (\n <>\n <span className=\"max-w-[16rem] min-w-0 shrink truncate text-sm font-medium\" title={question}>\n {question}\n </span>\n <div className=\"grid min-w-0 flex-1 grid-cols-[repeat(auto-fit,minmax(11rem,1fr))] gap-2\">\n {options.map((o, i) => (\n <Button\n key={o.id}\n variant={variant(i, o.tone)}\n disabled={busy}\n className={cn(wrapBtn, \"w-full md:text-center\")}\n onClick={() => answer(o.id)}\n >\n {o.label}\n </Button>\n ))}\n </div>\n {planStart && (\n <IconButton\n label=\"Plan start\"\n icon={<ArrowUp className=\"size-4\" />}\n variant=\"secondary\"\n size=\"sm\"\n onClick={() => jump(anchor())}\n />\n )}\n </>\n );\n const moreSheet = (\n <Sheet open={sheet} onClose={() => setSheet(false)} title={question}>\n <div className=\"flex flex-col gap-2\">\n {options.map((o, i) => (\n <Button\n key={o.id}\n block\n variant={variant(i, o.tone)}\n disabled={busy}\n className={wrapBtn}\n onClick={() => answer(o.id)}\n >\n {o.label}\n </Button>\n ))}\n </div>\n </Sheet>\n );\n if (part === \"answers\") {\n return (\n <article\n aria-label={`Question: ${question}`}\n data-testid=\"plan-answers\"\n className={cn(\"flex min-w-0 flex-col gap-2\", className)}\n >\n {mobile && <p className=\"text-sm font-medium\">{question}</p>}\n {disabledReason ? (\n <p className=\"text-sm text-muted\">{disabledReason}</p>\n ) : (\n <div data-testid=\"answer-bar\" className=\"flex min-w-0 items-center gap-2 md:gap-3\">\n {barContent}\n </div>\n )}\n {moreSheet}\n </article>\n );\n }\n const reader = part === \"reader\";\n return (\n <article\n id={id}\n data-testid=\"document-interaction\"\n aria-label={`Question: ${question}`}\n className={cn(\n \"w-full min-w-0 self-stretch border-t border-border\",\n\n className,\n )}\n >\n <header\n className={cn(\n \"z-10 flex min-w-0 items-center gap-2 border-b border-border bg-bg px-4 py-2 md:px-6\",\n sticky && (flush ? \"md:sticky md:top-0\" : \"max-md:static md:sticky md:-top-3\"),\n )}\n >\n <h3 className=\"min-w-0 flex-1 truncate text-[15px] leading-snug font-semibold md:text-sm\">\n {title}\n </h3>\n {mobile && !reader && (\n <StatusChip\n kind=\"interaction\"\n value={interaction.state}\n size=\"sm\"\n className=\"[&>span]:sr-only\"\n />\n )}\n {!reader && !disabled && !optionsVisible && (\n <TextLink\n size=\"xs\"\n className=\"shrink-0\"\n onClick={() => scrollTo(optionsRef.current, \"center\")}\n >\n Jump to options ↓\n </TextLink>\n )}\n </header>\n {changes && (\n <aside className=\"mx-4 mt-3 rounded-md bg-warning-soft px-3 py-2 text-sm md:mx-6\">\n <UINodeRenderer node={changes} />\n </aside>\n )}\n <div className=\"px-4 py-4 md:grid md:grid-cols-[13rem_minmax(0,1fr)] 2xl:grid-cols-[15rem_minmax(0,1fr)] md:gap-8 md:px-6\">\n {sections.length > 0 && (\n <nav aria-label=\"Plan sections\" className=\"hidden md:block\">\n <ol className=\"sticky top-16 flex flex-col gap-0.5 border-l border-border text-sm\">\n <li>\n <button\n type=\"button\"\n className=\"-ml-px block w-full truncate border-l-2 border-transparent py-1 pl-3 text-left text-muted hover:text-text\"\n onClick={() => jump(startRef.current)}\n >\n Start\n </button>\n </li>\n {sections.map((s) => (\n <li key={s.id}>\n <button\n type=\"button\"\n aria-current={active === s.id}\n className=\"-ml-px block w-full truncate border-l-2 border-transparent py-1 pl-3 text-left text-muted hover:text-text aria-[current=true]:border-accent aria-[current=true]:text-text\"\n onClick={() => {\n pinSection(s.id);\n jump(\n bodyRef.current?.querySelector<HTMLElement>(`#${CSS.escape(s.id)}`) ?? null,\n );\n }}\n >\n {s.text}\n </button>\n </li>\n ))}\n </ol>\n </nav>\n )}\n <div ref={startRef} className=\"min-w-0 scroll-mt-14\">\n <div\n ref={bodyRef}\n className=\"sy-prose-compact max-w-[80ch] min-w-0 2xl:max-w-[100ch] min-[1800px]:text-base [&_h2]:scroll-mt-14\"\n >\n <Markdown text={rest} headingIds className=\"text-inherit\" />\n </div>\n </div>\n </div>\n {!reader && (\n <section\n ref={optionsRef}\n data-testid=\"plan-options\"\n aria-label={question}\n className=\"border-t border-border px-4 py-3 md:px-6\"\n >\n <p className=\"mb-2 text-sm font-medium\">{question}</p>\n {!disabled && (\n <div className=\"flex min-w-0 flex-col gap-2 md:flex-row md:flex-wrap\">\n {options.map((o, i) => (\n <Button\n key={o.id}\n variant={variant(i, o.tone)}\n size=\"md\"\n disabled={busy}\n className={cn(wrapBtn, \"md:text-center\")}\n onClick={() => answer(o.id)}\n >\n {o.label}\n </Button>\n ))}\n </div>\n )}\n <TextLink\n size=\"xs\"\n className=\"mt-2\"\n icon={<ArrowUp aria-hidden className=\"size-3.5\" />}\n onClick={() => jump(startRef.current)}\n >\n Back to the plan start\n </TextLink>\n </section>\n )}\n {!reader && showBar && (\n <div\n data-testid=\"answer-bar\"\n className={cn(\n \"z-10 flex min-w-0 items-center gap-2 border-t border-border bg-bg px-4 py-2 md:gap-3 md:px-6\",\n sticky && !flush ? \"sticky -bottom-3\" : \"sticky bottom-0\",\n )}\n >\n {barContent}\n </div>\n )}\n {!reader && moreSheet}\n </article>\n );\n}\n","import { type ReactNode, useEffect, useRef, useState } from \"react\";\nimport { cn } from \"../../lib/cn\";\nimport {\n fullSwipeAt,\n lockAxis,\n REVEAL,\n rubberBand,\n type SwipeSide,\n swipeResult,\n velocity,\n} from \"../../lib/gestures\";\nimport { haptic } from \"../../lib/haptics\";\n\nexport interface SwipeAction {\n id: string;\n label: string;\n icon: ReactNode;\n tone: \"red\" | \"orange\" | \"blue\" | \"gray\" | \"green\";\n onAction: () => unknown;\n /** The row leaves the list when this succeeds: it slides out, and back if the action fails. */\n removes?: boolean;\n}\n\n/** Saturated, theme-independent colours, as in native swipe actions. */\nconst TONE: Record<SwipeAction[\"tone\"], string> = {\n red: \"bg-[#e5484d] text-white\",\n orange: \"bg-[#f76b15] text-white\",\n blue: \"bg-[#0090ff] text-white\",\n gray: \"bg-[#6e7681] text-white\",\n green: \"bg-[#30a46c] text-white\",\n};\n\nconst SETTLE = \"transform 260ms cubic-bezier(0.2, 0.9, 0.25, 1)\";\nconst SKIP = \"input, textarea, select, [contenteditable], [data-no-swipe]\";\n\nlet closeOpenRow: (() => void) | null = null;\n\ninterface Drag {\n id: number;\n x: number;\n y: number;\n axis: \"x\" | \"y\" | null;\n start: number;\n raw: number;\n full: boolean;\n samples: { t: number; v: number }[];\n}\n\n/**\n * A row that reveals actions when dragged sideways (touch and pen only), like a native list:\n * `leading` actions sit under the left edge, `trailing` under the right. The first action of a\n * side is the outermost one; a long swipe runs it, a shorter one leaves the buttons open.\n */\nexport function SwipeRow({\n leading = [],\n trailing = [],\n disabled,\n children,\n className,\n contentClassName,\n}: {\n leading?: SwipeAction[];\n trailing?: SwipeAction[];\n disabled?: boolean;\n children: ReactNode;\n className?: string;\n contentClassName?: string;\n}) {\n const fg = useRef<HTMLDivElement>(null);\n const drag = useRef<Drag | null>(null);\n const dragged = useRef(false);\n // The row's offset drives the action layer; the foreground moves through its style directly.\n const [offset, setOffset] = useState(0);\n const [full, setFull] = useState(false);\n const offsetRef = useRef(0);\n const actions = useRef({ leading, trailing });\n actions.current = { leading, trailing };\n const active = !disabled && (leading.length > 0 || trailing.length > 0);\n\n const width = () => fg.current?.offsetWidth || 320;\n const place = (to: number, animate: boolean) => {\n const el = fg.current;\n if (el) {\n el.style.transition = animate ? SETTLE : \"none\";\n el.style.transform = to === 0 ? \"\" : `translateX(${to}px)`;\n }\n offsetRef.current = to;\n setOffset(to);\n };\n const closeRef = useRef(() => {});\n closeRef.current = () => {\n place(0, true);\n setFull(false);\n if (closeOpenRow === stableClose) closeOpenRow = null;\n };\n const [stableClose] = useState(() => () => closeRef.current());\n\n const run = async (action: SwipeAction, side: SwipeSide) => {\n haptic();\n if (action.removes) {\n const w = width();\n setFull(true);\n place(side === \"leading\" ? w : -w, true);\n try {\n await action.onAction();\n } catch {\n closeRef.current();\n return;\n }\n // Close the gap it leaves; the list drops the row when the change arrives.\n const row = fg.current?.parentElement;\n if (row && !window.matchMedia?.(\"(prefers-reduced-motion: reduce)\").matches) {\n row.animate?.([{ height: `${row.offsetHeight}px` }, { height: \"0px\" }], {\n duration: 220,\n easing: \"cubic-bezier(0.2, 0.8, 0.2, 1)\",\n fill: \"forwards\",\n });\n }\n return;\n }\n closeRef.current();\n await action.onAction();\n };\n\n // While a row is open, a touch anywhere else closes it.\n const isOpen = offset !== 0;\n useEffect(() => {\n if (!isOpen) return;\n const onDoc = (e: PointerEvent) => {\n if (fg.current?.parentElement?.contains(e.target as Node)) return;\n if (!drag.current) closeRef.current();\n };\n document.addEventListener(\"pointerdown\", onDoc, true);\n return () => document.removeEventListener(\"pointerdown\", onDoc, true);\n }, [isOpen]);\n useEffect(\n () => () => {\n if (closeOpenRow === stableClose) closeOpenRow = null;\n },\n [stableClose],\n );\n\n const onPointerDown = (e: React.PointerEvent) => {\n if (!active || !e.isPrimary || (e.pointerType !== \"touch\" && e.pointerType !== \"pen\")) return;\n if ((e.target as HTMLElement).closest(SKIP)) return;\n dragged.current = false;\n drag.current = {\n id: e.pointerId,\n x: e.clientX,\n y: e.clientY,\n axis: null,\n start: offsetRef.current,\n raw: offsetRef.current,\n full: false,\n samples: [],\n };\n };\n const onPointerMove = (e: React.PointerEvent) => {\n const d = drag.current;\n if (!d || e.pointerId !== d.id) return;\n const dx = e.clientX - d.x;\n if (d.axis === null) {\n d.axis = lockAxis(dx, e.clientY - d.y);\n if (d.axis === null) return;\n if (d.axis === \"y\") {\n drag.current = null;\n return;\n }\n dragged.current = true;\n (e.currentTarget as HTMLElement).setPointerCapture?.(e.pointerId);\n if (closeOpenRow && closeOpenRow !== stableClose) closeOpenRow();\n }\n const { leading: l, trailing: t } = actions.current;\n const w = width();\n let raw = d.start + dx;\n // A side without actions resists, like the end of a list.\n if (raw > 0 && l.length === 0) raw = rubberBand(raw, w) * 0.15;\n if (raw < 0 && t.length === 0) raw = rubberBand(raw, w) * 0.15;\n d.raw = raw;\n d.samples.push({ t: e.timeStamp, v: raw });\n d.samples = d.samples.slice(-12);\n const reveal = (raw > 0 ? l.length : t.length) * REVEAL;\n const isFull = reveal > 0 && Math.abs(raw) >= fullSwipeAt(w, reveal);\n if (isFull !== d.full) {\n d.full = isFull;\n setFull(isFull);\n haptic();\n }\n place(raw, false);\n };\n const onPointerUp = (e: React.PointerEvent) => {\n const d = drag.current;\n drag.current = null;\n if (d?.axis !== \"x\") return;\n const { leading: l, trailing: t } = actions.current;\n if (e.type === \"pointercancel\") return closeRef.current();\n const res = swipeResult(d.raw, velocity(d.samples), {\n width: width(),\n reveal: { leading: l.length * REVEAL, trailing: t.length * REVEAL },\n fullSwipe: { leading: true, trailing: true },\n });\n if (res.kind === \"close\") return closeRef.current();\n const list = res.side === \"leading\" ? l : t;\n const outer = list[0];\n if (!outer) return closeRef.current();\n if (res.kind === \"commit\") return void run(outer, res.side);\n setFull(false);\n place((res.side === \"leading\" ? 1 : -1) * list.length * REVEAL, true);\n closeOpenRow = stableClose;\n };\n\n const side: SwipeSide = offset > 0 ? \"leading\" : \"trailing\";\n const list = offset > 0 ? leading : trailing;\n // Outermost first: on the right the first action is rightmost, so lay them out reversed.\n const shown = side === \"trailing\" ? [...list].reverse() : list;\n return (\n <div className={cn(\"relative overflow-hidden\", className)} data-swipe-row>\n {offset !== 0 && list.length > 0 && (\n <div\n aria-hidden\n className={cn(\"absolute inset-y-0 flex\", side === \"leading\" ? \"left-0\" : \"right-0\")}\n style={{ width: Math.abs(offset) }}\n >\n {shown.map((a) => {\n const outer = a === list[0];\n return (\n <button\n key={a.id}\n type=\"button\"\n tabIndex={-1}\n data-swipe-action={a.id}\n onClick={() => void run(a, side)}\n style={{ flexGrow: full ? (outer ? 1 : 0) : 1, flexBasis: 0 }}\n className={cn(\n \"flex min-w-0 flex-col items-center justify-center gap-1 overflow-hidden text-xs font-semibold whitespace-nowrap transition-[flex-grow] duration-200\",\n TONE[a.tone],\n full && outer && (side === \"leading\" ? \"items-start pl-6\" : \"items-end pr-6\"),\n )}\n >\n {a.icon}\n {a.label}\n </button>\n );\n })}\n </div>\n )}\n <div\n ref={fg}\n className={cn(\"relative touch-pan-y bg-surface\", contentClassName)}\n onPointerDown={onPointerDown}\n onPointerMove={onPointerMove}\n onPointerUp={onPointerUp}\n onPointerCancel={onPointerUp}\n onClickCapture={(e) => {\n if (dragged.current) {\n dragged.current = false;\n e.preventDefault();\n e.stopPropagation();\n } else if (offsetRef.current !== 0) {\n e.preventDefault();\n e.stopPropagation();\n closeRef.current();\n }\n }}\n >\n {children}\n </div>\n </div>\n );\n}\n","import {\n compareIssues,\n issueLinkProblem,\n issueLookup,\n issueUnlinkProblem,\n type TrackedIssue,\n type Workspace,\n} from \"@switchyard/protocol\";\nimport { useMemo, useState } from \"react\";\nimport { Button } from \"../../components/ui/Button\";\nimport { Dialog } from \"../../components/ui/Overlay\";\nimport { ErrorState } from \"../../components/ui/states\";\nimport { toast } from \"../../components/ui/Toast\";\nimport { errorMessage } from \"../../sync/api\";\nimport { useSyncStore } from \"../../sync/store\";\nimport { linkIssue } from \"./api\";\n\n/** A workspace's issue, the issues it could be linked to, and whether its link can be undone here. */\nexport function useIssueLink(workspace: Workspace | null | undefined): {\n linked: TrackedIssue | null;\n candidates: TrackedIssue[];\n canUnlink: boolean;\n} {\n const issues = useSyncStore((s) => s.issues);\n return useMemo(() => {\n const list = Object.values(issues);\n const linked = workspace ? issueLookup(list)(workspace) : null;\n const candidates =\n workspace && !linked\n ? list.filter((i) => issueLinkProblem(i, workspace, list) === null).sort(compareIssues)\n : [];\n return { linked, candidates, canUnlink: !!linked && issueUnlinkProblem(linked) === null };\n }, [issues, workspace]);\n}\n\n/** Pick a not-started issue to link a worktree's branch to. */\nexport function LinkIssueDialog({\n open,\n onClose,\n workspace,\n candidates,\n}: {\n open: boolean;\n onClose: () => void;\n workspace: Workspace;\n candidates: TrackedIssue[];\n}) {\n const [busy, setBusy] = useState<string | null>(null);\n const [error, setError] = useState<unknown>(null);\n const close = () => {\n setError(null);\n onClose();\n };\n const pick = async (issue: TrackedIssue) => {\n if (busy) return;\n setBusy(issue.id);\n setError(null);\n try {\n await linkIssue(issue.id, workspace.id);\n toast.success(`Linked to #${issue.number}`);\n close();\n } catch (e) {\n setError(e);\n } finally {\n setBusy(null);\n }\n };\n return (\n <Dialog\n open={open}\n onClose={close}\n title=\"Link to issue\"\n description={`Link ${workspace.branch} to an issue that has no branch yet. Its sessions then stay in the issue's scope.`}\n footer={<Button onClick={close}>Cancel</Button>}\n >\n <div className=\"flex min-w-0 flex-col gap-2\">\n {error !== null && (\n <ErrorState compact title=\"Could not link\" error={errorMessage(error)} />\n )}\n {candidates.length === 0 && (\n <p className=\"text-sm text-muted\">No issue without a branch in this project.</p>\n )}\n <ul className=\"flex min-w-0 flex-col gap-1\">\n {candidates.map((i) => (\n <li key={i.id} className=\"min-w-0\">\n <button\n type=\"button\"\n disabled={!!busy}\n aria-busy={busy === i.id}\n onClick={() => void pick(i)}\n className=\"tap flex w-full min-w-0 flex-col rounded-md px-2 py-1.5 text-left hover:bg-surface-2 disabled:opacity-55\"\n >\n <span className=\"truncate text-sm\">\n #{i.number} {i.title}\n </span>\n <span className=\"truncate text-xs text-muted\">\n {i.repository}\n {i.board?.priority ? ` · ${i.board.priority.name}` : \"\"}\n </span>\n </button>\n </li>\n ))}\n </ul>\n </div>\n </Dialog>\n );\n}\n","import type {\n AdapterInfo,\n Host,\n Project,\n Run,\n Session,\n Task,\n Workspace,\n} from \"@switchyard/protocol\";\nimport { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from \"react\";\nimport { toast } from \"../../components/ui/Toast\";\nimport { errorMessage, isApiError } from \"../../sync/api\";\nimport { useSyncStore } from \"../../sync/store\";\nimport { codeApi } from \"./api\";\nimport {\n type AutomationControl,\n automationControl,\n type HostLink,\n hostLink,\n runForSession,\n} from \"./model\";\n\nexport interface SessionContext {\n session: Session;\n host: Host | undefined;\n hostName: string;\n link: HostLink;\n project: Project | undefined;\n workspace: Workspace | undefined;\n run: Run | null;\n task: Task | undefined;\n control: AutomationControl;\n adapters: AdapterInfo[];\n}\n\nconst NO_ADAPTERS: AdapterInfo[] = [];\n\nexport type SessionLookup =\n | { state: \"idle\" }\n | { state: \"loading\" }\n | { state: \"missing\" }\n | { state: \"error\"; error: string };\n\n/**\n * A session the snapshot leaves out (archived) is fetched by id and kept in the sync store, so\n * its URL still opens after a reload and live events (Unarchive) update it.\n */\nexport function useSessionLookup(\n sessionId: string | null,\n session: Session | undefined,\n hydrated: boolean,\n): SessionLookup {\n const absent = hydrated && !!sessionId && !session;\n const [result, setResult] = useState<{ id: string; lookup: SessionLookup } | null>(null);\n useEffect(() => {\n if (!absent || !sessionId) return;\n const ctrl = new AbortController();\n setResult({ id: sessionId, lookup: { state: \"loading\" } });\n codeApi.get(sessionId, ctrl.signal).then(\n (s) => {\n useSyncStore.getState().upsertSessionIfMissing(s);\n setResult(null);\n },\n (e) => {\n if (ctrl.signal.aborted) return;\n setResult({\n id: sessionId,\n lookup: isApiError(e, \"not_found\")\n ? { state: \"missing\" }\n : { state: \"error\", error: errorMessage(e) },\n });\n },\n );\n return () => ctrl.abort();\n }, [absent, sessionId]);\n if (!absent) return { state: \"idle\" };\n return result?.id === sessionId ? result.lookup : { state: \"loading\" };\n}\n\n/** Everything the session views need about one session, from the store. */\nexport function useSessionContext(session: Session | undefined): SessionContext | null {\n const host = useSyncStore((s) => (session ? s.hosts[session.hostId] : undefined));\n const project = useSyncStore((s) =>\n session?.projectId ? s.projects[session.projectId] : undefined,\n );\n const workspace = useSyncStore((s) =>\n session?.workspaceId ? s.workspaces[session.workspaceId] : undefined,\n );\n const runs = useSyncStore((s) => s.runs);\n const tasks = useSyncStore((s) => s.tasks);\n const adapters = useSyncStore((s) =>\n session ? (s.adapters[session.hostId] ?? NO_ADAPTERS) : NO_ADAPTERS,\n );\n return useMemo(() => {\n if (!session) return null;\n const run = runForSession(runs, session);\n const taskId = session.taskId ?? run?.taskId ?? null;\n return {\n session,\n host,\n hostName: host?.name ?? \"Unknown host\",\n link: hostLink(host, session),\n project,\n workspace,\n run,\n task: taskId ? tasks[taskId] : undefined,\n control: automationControl(run),\n adapters,\n };\n }, [session, host, project, workspace, runs, tasks, adapters]);\n}\n\nexport interface Mutation<A extends unknown[]> {\n run: (...args: A) => Promise<boolean>;\n busy: boolean;\n error: unknown;\n reset: () => void;\n}\n\n/**\n * Wrap a REST mutation: busy state, error kept for inline display (with\n * retry), and a success toast only after the coordinator acknowledged.\n */\nexport function useMutation<A extends unknown[], R>(\n fn: (...args: A) => Promise<R>,\n opts: { success?: string | ((r: R) => string | null); errorToast?: boolean } = {},\n): Mutation<A> {\n const [busy, setBusy] = useState(false);\n const [error, setError] = useState<unknown>(null);\n const fnRef = useRef(fn);\n fnRef.current = fn;\n const optsRef = useRef(opts);\n optsRef.current = opts;\n const mounted = useRef(true);\n useEffect(() => {\n mounted.current = true;\n return () => {\n mounted.current = false;\n };\n }, []);\n const run = useCallback(async (...args: A) => {\n setBusy(true);\n setError(null);\n try {\n const r = await fnRef.current(...args);\n const { success } = optsRef.current;\n const msg = typeof success === \"function\" ? success(r) : success;\n if (msg) toast.success(msg);\n return true;\n } catch (e) {\n if (mounted.current) setError(e);\n if (optsRef.current.errorToast) toast.error(errorMessage(e));\n return false;\n } finally {\n if (mounted.current) setBusy(false);\n }\n }, []);\n const reset = useCallback(() => setError(null), []);\n return { run, busy, error, reset };\n}\n\n/** Re-render every `ms` while `active` (elapsed timers). */\nexport function useNow(active: boolean, ms = 1000): number {\n const [now, setNow] = useState(() => Date.now());\n useEffect(() => {\n if (!active) return;\n setNow(Date.now());\n const t = setInterval(() => setNow(Date.now()), ms);\n return () => clearInterval(t);\n }, [active, ms]);\n return now;\n}\n\n/** Width of an element, kept current with a ResizeObserver. */\nexport function useElementWidth<T extends HTMLElement>() {\n const ref = useRef<T>(null);\n const [width, setWidth] = useState(0);\n useLayoutEffect(() => {\n const el = ref.current;\n if (!el) return;\n setWidth(el.clientWidth);\n const ro = new ResizeObserver(([entry]) => {\n if (entry) setWidth(entry.contentRect.width);\n });\n ro.observe(el);\n return () => ro.disconnect();\n }, []);\n return [ref, width] as const;\n}\n","import type { Session } from \"@switchyard/protocol\";\nimport { Dialog } from \"../../components/ui/Overlay\";\nimport { formatTime } from \"../../lib/time\";\nimport { contextMeter } from \"./model\";\n\nfunction InfoRow({ label, value }: { label: string; value: string }) {\n return (\n <>\n <dt className=\"text-muted\">{label}</dt>\n <dd className=\"min-w-0 font-mono text-xs break-all\">{value}</dd>\n </>\n );\n}\n\nexport interface SessionInfoDialogProps {\n session: Session;\n hostLabel: string;\n open: boolean;\n onClose: () => void;\n}\n\n/** Session ids, Pi session file, tokens, cost and context. */\nexport function SessionInfoDialog({ session, hostLabel, open, onClose }: SessionInfoDialogProps) {\n const meter = contextMeter(session);\n const stats = session.stats;\n return (\n <Dialog open={open} onClose={onClose} title=\"Session info\">\n <dl className=\"grid grid-cols-[auto_minmax(0,1fr)] gap-x-3 gap-y-2 text-sm\">\n <InfoRow label=\"Switchyard session\" value={session.id} />\n <InfoRow label=\"Pi session id\" value={session.nativeHandle?.sessionId ?? \"Not started\"} />\n <InfoRow label=\"Session file\" value={session.nativeHandle?.sessionFile ?? \"None yet\"} />\n <InfoRow label=\"Host\" value={hostLabel} />\n <InfoRow label=\"Working directory\" value={session.cwd} />\n <InfoRow label=\"Origin\" value={session.provenance} />\n <InfoRow label=\"Profile\" value={session.profileSnapshot.name} />\n <InfoRow label=\"Created\" value={formatTime(session.createdAt)} />\n {stats?.tokens != null && (\n <InfoRow label=\"Tokens\" value={stats.tokens.toLocaleString(\"en-US\")} />\n )}\n {stats?.costUsd != null && <InfoRow label=\"Cost\" value={`$${stats.costUsd.toFixed(2)}`} />}\n {meter && <InfoRow label=\"Context\" value={`${meter.label} (${meter.detail})`} />}\n </dl>\n </Dialog>\n );\n}\n","import {\n type AttentionItem,\n isInputAttentionReason,\n primarySession,\n type TrackedIssue,\n} from \"@switchyard/protocol\";\nimport { type ReactNode, useMemo, useState } from \"react\";\nimport { useNavigate } from \"react-router\";\nimport { Button } from \"../../components/ui/Button\";\nimport { Field } from \"../../components/ui/Field\";\nimport { ConfirmDialog, Dialog } from \"../../components/ui/Overlay\";\nimport { ErrorState } from \"../../components/ui/states\";\nimport { TextInput } from \"../../components/ui/TextArea\";\nimport { toast } from \"../../components/ui/Toast\";\nimport { apiDelete, apiPost, errorMessage } from \"../../sync/api\";\nimport { useSyncStore } from \"../../sync/store\";\nimport { unlinkIssue } from \"../workboard/api\";\nimport { LinkIssueDialog, useIssueLink } from \"../workboard/LinkIssue\";\nimport { codeApi } from \"./api\";\nimport type { SessionContext } from \"./hooks\";\nimport { useMutation } from \"./hooks\";\nimport { isBusy, isLive } from \"./model\";\nimport { SessionInfoDialog } from \"./SessionInfoDialog\";\n\nexport interface SessionActions {\n canTakeover: boolean;\n canReturn: boolean;\n canStop: boolean;\n canResume: boolean;\n /** Why archive is unavailable, or null. */\n archiveBlocked: string | null;\n takeover: () => void;\n returnToAutomation: () => void;\n requestStop: () => void;\n resume: () => void;\n openRename: () => void;\n requestArchive: () => void;\n openInfo: () => void;\n toggleCacheAlert: () => void;\n unarchive: () => void;\n /** Clear this session's \"Needs input\" flag (its open input attention), or null when it has none. */\n dismissAttention: (() => void) | null;\n /** Pin the session to a scope, or unpin it. */\n setPinned: (scopeId: string, pinned: boolean) => void;\n /** This session is its branch's primary session. */\n isPrimary: boolean;\n setPrimary: (primary: boolean) => void;\n /** Start another session in this session's workspace, or null when it has none. */\n newInBranch: (() => void) | null;\n /** Link this worktree's branch to an issue, or undo it; null without a worktree. */\n issueLink: {\n linked: TrackedIssue | null;\n candidates: TrackedIssue[];\n canUnlink: boolean;\n open: () => void;\n unlink: () => void;\n } | null;\n busy: { takeover: boolean; ret: boolean; stop: boolean; resume: boolean; unarchive: boolean };\n /** Confirmation and form dialogs; render once in the view. */\n dialogs: ReactNode;\n}\n\n/** Session control and menu actions with confirmation dialogs (no optimistic success). */\nexport function useSessionActions(ctx: SessionContext): SessionActions {\n const { session, run, control } = ctx;\n const navigate = useNavigate();\n const [dialog, setDialog] = useState<null | \"stop\" | \"rename\" | \"archive\" | \"info\" | \"link\">(\n null,\n );\n const [title, setTitle] = useState(session.title);\n const link = useIssueLink(session.provenance === \"subagent\" ? null : ctx.workspace);\n const attention = useSyncStore((st) => st.attention);\n const inputAttention = useMemo(\n () =>\n Object.values(attention).filter(\n (a) => a.sessionId === session.id && !a.resolvedAt && isInputAttentionReason(a.reason),\n ),\n [attention, session.id],\n );\n const isPrimary = useSyncStore((st) => {\n if (session.provenance === \"subagent\" || session.archivedAt) return false;\n const peers = Object.values(st.sessions).filter(\n (x) =>\n x.archivedAt === null &&\n x.provenance !== \"subagent\" &&\n (session.workspaceId\n ? x.workspaceId === session.workspaceId\n : x.workspaceId === null && x.hostId === session.hostId && x.cwd === session.cwd),\n );\n return primarySession(peers)?.id === session.id;\n });\n\n const takeover = useMutation(() => codeApi.takeover(session.id), {\n success: \"You have control. Automatic continuations are paused.\",\n errorToast: true,\n });\n const ret = useMutation(() => codeApi.returnToAutomation(session.id), {\n success: \"Returned to automation.\",\n errorToast: true,\n });\n const stop = useMutation(() => codeApi.stop(session.id), { success: \"Session stopped.\" });\n const resume = useMutation(() => codeApi.resume(session.id), {\n success: \"Session resumed.\",\n errorToast: true,\n });\n const rename = useMutation((t: string) => codeApi.rename(session.id, t), {\n success: \"Session renamed.\",\n });\n const cacheAlert = useMutation(() => codeApi.cacheAlert(session.id, !session.cacheAlert), {\n errorToast: true,\n });\n const archive = useMutation(() => codeApi.archive(session.id), { success: \"Session archived.\" });\n const unarchive = useMutation(() => codeApi.unarchive(session.id), {\n success: \"Session unarchived.\",\n errorToast: true,\n });\n\n const connected = ctx.link === \"connected\";\n const close = () => {\n setDialog(null);\n stop.reset();\n rename.reset();\n archive.reset();\n };\n\n const archiveBlocked = isBusy(session) ? \"Stop the session before archiving it\" : null;\n\n const dialogs = (\n <>\n <ConfirmDialog\n open={dialog === \"stop\"}\n onClose={close}\n title=\"Stop this session?\"\n description=\"Stops the current execution and clears queued messages.\"\n confirmLabel=\"Stop session\"\n busy={stop.busy}\n error={stop.error}\n errorTitle=\"Could not stop\"\n onConfirm={() => void stop.run().then((ok) => ok && setDialog(null))}\n >\n <p className=\"text-sm text-muted\">\n {run\n ? \"The task keeps its run, marked interrupted and blocked (Stopped by user). Automation settings are unchanged.\"\n : \"Pi stays available; you can send a new message afterwards.\"}\n </p>\n </ConfirmDialog>\n\n <Dialog\n open={dialog === \"rename\"}\n onClose={close}\n title=\"Rename session\"\n footer={\n <>\n <Button onClick={close}>Cancel</Button>\n <Button\n variant=\"primary\"\n type=\"submit\"\n form=\"sy-rename-form\"\n busy={rename.busy}\n disabled={!title.trim()}\n >\n Save\n </Button>\n </>\n }\n >\n <form\n id=\"sy-rename-form\"\n onSubmit={(e) => {\n e.preventDefault();\n if (!title.trim()) return;\n void rename.run(title.trim()).then((ok) => ok && setDialog(null));\n }}\n className=\"flex flex-col gap-2\"\n >\n <Field id=\"sy-rename-input\" label=\"Title\">\n <TextInput\n id=\"sy-rename-input\"\n value={title}\n maxLength={200}\n onChange={(e) => setTitle(e.target.value)}\n />\n </Field>\n {rename.error !== null && (\n <ErrorState compact title=\"Could not rename\" error={errorMessage(rename.error)} />\n )}\n </form>\n </Dialog>\n\n <ConfirmDialog\n open={dialog === \"archive\"}\n onClose={close}\n title=\"Archive this session?\"\n description=\"It leaves the navigator. The Pi session file stays on the host.\"\n danger={false}\n confirmLabel=\"Archive\"\n busy={archive.busy}\n error={archive.error}\n errorTitle=\"Could not archive\"\n onConfirm={() =>\n void archive.run().then((ok) => {\n if (!ok) return;\n setDialog(null);\n navigate(\"/code\");\n })\n }\n >\n {session.runtime === \"idle\" && (\n <p className=\"text-sm text-muted\">The idle Pi process is stopped first.</p>\n )}\n </ConfirmDialog>\n\n {ctx.workspace && (\n <LinkIssueDialog\n open={dialog === \"link\"}\n onClose={close}\n workspace={ctx.workspace}\n candidates={link.candidates}\n />\n )}\n\n <SessionInfoDialog\n session={session}\n hostLabel={`${ctx.hostName} (${ctx.link})`}\n open={dialog === \"info\"}\n onClose={close}\n />\n </>\n );\n\n return {\n canTakeover: control === \"automation\",\n canReturn: control === \"human\",\n canStop: isBusy(session) && connected,\n canResume: !isLive(session) && !!session.nativeHandle && !session.readOnly && connected,\n archiveBlocked,\n takeover: () => void takeover.run(),\n returnToAutomation: () => void ret.run(),\n requestStop: () => setDialog(\"stop\"),\n resume: () => void resume.run(),\n openRename: () => {\n setTitle(session.title);\n setDialog(\"rename\");\n },\n requestArchive: () => {\n if (archiveBlocked) toast.info(archiveBlocked);\n else setDialog(\"archive\");\n },\n openInfo: () => setDialog(\"info\"),\n toggleCacheAlert: () => void cacheAlert.run(),\n unarchive: () => void unarchive.run(),\n dismissAttention:\n inputAttention.length > 0\n ? () => {\n void Promise.all(inputAttention.map(dismissAttentionItem))\n .then(() => toast.success(\"Cleared. A question Pi is still waiting on stays.\"))\n .catch((e) => toast.error(errorMessage(e)));\n }\n : null,\n setPinned: (scopeId, pinned) => {\n const path = `/api/scopes/${encodeURIComponent(scopeId)}/sessions/${encodeURIComponent(session.id)}`;\n void (pinned ? apiPost(path) : apiDelete(path)).catch((e) => toast.error(errorMessage(e)));\n },\n isPrimary,\n setPrimary: (primary) => {\n void codeApi.setPrimary(session.id, primary).catch((e) => toast.error(errorMessage(e)));\n },\n newInBranch:\n session.projectId && session.workspaceId\n ? () => {\n void codeApi\n .createSession({\n projectId: session.projectId!,\n workspace: { existingId: session.workspaceId! },\n prompt: \"\",\n })\n .then((s) => {\n useSyncStore.getState().upsertSessionIfMissing(s);\n navigate(`/code/${encodeURIComponent(s.id)}`);\n })\n .catch((e) => toast.error(errorMessage(e)));\n }\n : null,\n issueLink:\n ctx.workspace && session.provenance !== \"subagent\"\n ? {\n ...link,\n open: () => setDialog(\"link\"),\n unlink: () => {\n const i = link.linked;\n if (!i) return;\n void unlinkIssue(i.id)\n .then(() => toast.success(`Unlinked from #${i.number}`))\n .catch((e) => toast.error(errorMessage(e)));\n },\n }\n : null,\n busy: {\n takeover: takeover.busy,\n ret: ret.busy,\n stop: stop.busy,\n resume: resume.busy,\n unarchive: unarchive.busy,\n },\n dialogs,\n };\n}\n\n/** Resolve one attention item by hand and store the result. */\nexport async function dismissAttentionItem(item: AttentionItem): Promise<AttentionItem> {\n const res = await apiPost<AttentionItem>(`/api/attention/${encodeURIComponent(item.id)}/dismiss`);\n const next =\n res && typeof res === \"object\" && \"id\" in res\n ? res\n : { ...item, resolvedAt: new Date().toISOString() };\n useSyncStore.setState((st) =>\n st.attention[item.id] ? { attention: { ...st.attention, [item.id]: next } } : {},\n );\n return next;\n}\n","import type { AttentionItem, AttentionReason, Project, Session, Task } from \"@switchyard/protocol\";\n\nexport const ATTENTION_GROUPS: AttentionReason[] = [\n \"needs_input\",\n \"failed\",\n \"ready_for_review\",\n \"unsupported_interaction\",\n \"host_unreachable\",\n \"cache_expiring\",\n];\n\n/** Group open attention by reason, keeping the input order within a group. */\nexport function groupAttention(items: AttentionItem[]): Record<AttentionReason, AttentionItem[]> {\n const out = Object.fromEntries(ATTENTION_GROUPS.map((r) => [r, [] as AttentionItem[]])) as Record<\n AttentionReason,\n AttentionItem[]\n >;\n for (const a of items) out[a.reason]?.push(a);\n return out;\n}\n\n/** Tooltips and accessible descriptions of the attention actions: what each does and leaves. */\nexport const ATTENTION_ACTION_HELP = {\n dismiss:\n \"Marks it as seen and moves it to Dismissed; it stays open, and a question keeps flagging its session.\",\n clear: \"Resolves it now: the session loses this flag and the item moves to History.\",\n clearNeedsInput:\n \"Removes this session's Needs input flag and moves it to History; a question Pi is still waiting on stays.\",\n} as const;\n\nexport type AttentionShow = \"open\" | \"dismissed\" | \"history\";\n\n/** Stored prefs from before History: \"all\" (open + dismissed) and unknown values read as \"open\". */\nexport function normalizeShow(v: unknown): AttentionShow {\n return v === \"dismissed\" || v === \"history\" ? v : \"open\";\n}\n\n/** Unacknowledged items for \"open\", acknowledged for \"dismissed\"; [] for \"history\". */\nexport function visibleAttention(all: AttentionItem[], show: AttentionShow): AttentionItem[] {\n if (show === \"history\") return [];\n return all.filter((a) => (show === \"open\" ? !a.acknowledgedAt : !!a.acknowledgedAt));\n}\n\n/** \"project · task · session\" (session only when its title differs from the task's), else \"Switchyard\". */\nexport function attentionMeta(project?: Project, task?: Task, session?: Session): string {\n return (\n [project?.name, task?.title, session && session.title !== task?.title ? session.title : null]\n .filter(Boolean)\n .join(\" · \") || \"Switchyard\"\n );\n}\n"],"mappings":"A,syBAEaiE,GAA4B,iDAEnCC,GACJ,yHACIC,GAAgB,wEAQhBC,GAAuC,CAC3C,CAAE,GAAI,QAAS,MAAO,eAAgB,KAAM,QAAS,EACrD,CAAE,GAAI,UAAW,MAAO,uBAAwB,KAAM,SAAU,CAClE,EAEA,SAASC,GAAY,EAAwD,CAC3E,GAAIC,EAAK,IAAM,UAAW,OAAOA,EACjC,GAAIA,EAAK,IAAM,UACb,IAAK,IAAMC,KAAKD,EAAK,SAAU,CAC7B,IAAME,EAAQH,GAAYE,CAAC,EAC3B,GAAIC,EAAO,OAAOA,CACpB,CAEF,OAAO,IACT,CAEA,SAASC,GAAgB,EAA6B,CACpD,GAAIH,EAAK,IAAM,OAAQ,OAAOA,EAAK,KAAK,KAAK,GAAK,KAClD,GAAIA,EAAK,IAAM,UACb,IAAK,IAAMI,KAASJ,EAAK,SAAU,CACjC,IAAMK,EAAcF,GAAgBC,CAAK,EACzC,GAAIC,EAAa,OAAOA,CAC1B,CAEF,OAAO,IACT,CASA,SAAgBC,GAAc,EAAyB,CACrD,OAAOC,EAAE,QAAU,eAAiBA,EAAE,OAAO,OAAS,oBACxD,CAGA,SAAgBC,GAAgB,EAAiC,CAE/D,IAAMC,GADOV,GAAYQ,EAAE,YACV,CAAA,EAAM,SAAW,CAAC,EAAA,CAChC,OACE,GAAmDG,EAAE,KAAO,SAAWA,EAAE,KAAO,SACnF,CAAC,CACA,IAAK,IAAO,CACX,GAAIA,EAAE,GACN,MAAOA,EAAE,MACT,KAAOA,EAAE,OAAS,UACd,YACCA,EAAE,OAASA,EAAE,KAAO,QAAU,SAAW,UAChD,EAAE,EACE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